Commit Graph

56 Commits

Author SHA1 Message Date
michael
2d49471ebb fix(web): .badge displays as inline-block so wrapped labels keep their shape
As a plain inline span, a badge that wraps to two lines fragments into
per-line boxes: the clip-path and ::before fill cover the wrong region,
so overflow text renders bare outside the beveled shape (storefront
DTLabel ribbons at <=375px viewports). inline-block keeps the badge one
box; the bevel and fill wrap all lines.

Revert with: git revert <this-sha>

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-12 16:03:29 -07:00
michael
e33bf70896 fix(react): a11y attrs on DTMobileFilterOverlay
Add the screen-reader semantics that were missing:
- role="dialog" + aria-modal="true" on the content panel
- aria-labelledby pointing at the heading span (id via useId)
- aria-label="Close {heading}" on the ✕ button (was just text)
- aria-hidden="true" on the click-target backdrop

Without these, screen readers can't identify the mobile filter panel
as a dialog, can't announce its label, and the close button reads as
just "X". useId so multiple overlay instances on a page don't collide
on heading IDs.

Surfaced during dt-shopify pre-launch §10 verification — two
MobileFilterMenu.test.tsx assertions were dropped to make the suite
green pending this fix; storefront can put them back now.

Revert: git revert <THIS_COMMIT_SHA>

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-03 16:38:38 -07:00
michael
a459b643e8 feat(web): dt-scale-in invisible-via-opacity during delay so children can self-measure
Prior keyframes held descendants at transform: scale(0) during the
animation-delay phase (with fill-mode: both). Any DTStaggerContainer
child performing getBoundingClientRect()-based self-measurement on
mount — most notably R3F's <Canvas>, but also chart libs, video
players, and virtualized lists — read a near-zero rect at the
transform-multiplied size and never recovered, because transform
changes don't fire ResizeObserver when they end.

New keyframes:
  0%     opacity 0, transform none    (during delay: invisible but
                                       full layout size, no transform —
                                       children measure correctly)
  0.001% opacity 0, transform scale(0) (snap to scaled-down at start)
  100%   opacity 1, transform scale(1) (animate scale + fade in)

Behavior change for consumers: entrance gains a subtle fade-in
alongside the scale-in. Functionally equivalent for the existing
DTStaggerContainer use cases. Fixes the SuggestedPlacements 3D
viewer "blank teal block until scroll" bug on the Hydrogen
storefront product pages.

Bumps @dangerousthings/web to 0.5.0 (MINOR — visual behavior change).

To revert: git revert <this-commit>

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 21:38:42 -07:00
michael
1aeceb8f24 Main package.json fix 2026-05-05 14:20:26 -07:00
michael
e664cdaf3d Showcase fix 2026-05-05 14:18:53 -07:00
michael
0cfc945960 Fixed type in label @dangerousthings/react@2.1.0 @dangerousthings/hex-background@0.2.1 2026-05-05 14:16:32 -07:00
michael
77c6a5a3bf feat(DTGallery): add optional activeIndex prop for external control
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 12:42:10 -07:00
michael
27824ae189 chore(hex-background): bump 0.2.1, changelog for animation fix 2026-04-13 16:28:59 -07:00
michael
1f67ebf48a feat(hex-background): pass animationDuration through HexGridBackground 2026-04-13 16:26:17 -07:00
michael
5112e5c057 fix(hex-background): replace lerp with duration-based easing
Hexagons now interpolate via smoothstep over a fixed duration instead of
frame-rate-dependent lerp. Prevents height convergence to mean over time.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 16:23:28 -07:00
michael
1be0070abf chore: version packages (web 0.4.1, react 2.0.1, react-native 0.4.1)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dangerousthings/react-native@0.4.1 @dangerousthings/react@2.0.1 @dangerousthings/web@0.4.1
2026-03-24 11:26:57 -07:00
michael
c8c92d187d chore: version packages (web 0.4.0, react 2.0.0, react-native 0.4.0)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dangerousthings/react-native@0.4.0 @dangerousthings/react@2.0.0 @dangerousthings/web@0.4.0
2026-03-24 11:23:14 -07:00
michael
195c47602d feat: video letterboxing, card badge styling, component updates
- Add object-fit: contain + black background for video in DTMediaFrame
- Style .dt-card-badge with mode-colored background, padding, and
  bevel-aware positioning (negative right offset for clean diagonal clip)
- Restore DTStaggerContainer in react-native (was incorrectly deleted)
- Update DTGallery, DTModal, DTMobileFilterOverlay, DTMediaFrame components
- Refresh showcase pages for desktop and mobile

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 11:18:49 -07:00
michael
d1e2bf1964 fix: tune card badge position to 25% of bevel-md for responsive corner clipping 2026-03-13 05:03:46 -07:00
michael
926a282535 refactor: update showcase to use DTCard badge prop 2026-03-13 04:44:24 -07:00
michael
2dcf86c346 feat: add badge prop to DTCard for bevel-clipped badge slot 2026-03-12 19:21:11 -07:00
michael
8a91b21a11 feat: add .dt-card-badge positioning rule for card-level badge slot 2026-03-12 17:22:38 -07:00
michael
766266b799 Apply inner bevel clip-path to model-viewer and iframe elements
Extend the .dt-bevel-media inner clip-path selector to cover
model-viewer and iframe children, matching the existing treatment
for img and video. Without this, 3D viewers and embedded video
iframes filled edge-to-edge and covered the neon bevel border.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-11 13:26:48 -07:00
michael
36420868f5 Fix card-body-flush child bevel clip-path alignment
The child clip-path used bevel-md - 3px from child corner, but should
use bevel-md to align with the ::before inner surface diagonal. This
caused the bottom-right bevel border to appear too thin.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 16:51:56 -07:00
michael
c8afd90527 Refactor DTStaggerContainer: wrapper-div approach with delay/interval props
Replace CSS nth-child stagger rules with JS-driven wrapper divs that set
animationDelay inline. Adds delay (base offset) and interval (ms between
children) props. Removes --dt-stagger-interval CSS variable and 24
nth-child rules in favor of unlimited children support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 21:18:12 -07:00
michael
34be1d0b9e DTCard: make progress optional, fill top-to-bottom
Progress bar now fills top-down (was bottom-up). When progress prop is
omitted the bar stays empty and the card renders at full size. Only cards
that explicitly pass progress={0–100} show the animated bar.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 20:04:15 -07:00
michael
6816ef4825 Add documentLevel mode to DTWebThemeProvider
When documentLevel is true, sets data-brand and data-theme on
document.documentElement instead of rendering a wrapper div.
This is needed for apps where CSS ancestor selectors must match
from the document root (e.g. [data-brand="dt"] .card).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 15:39:25 -07:00
michael
b319f15092 Fix feature legend data accuracy from storefront models
- NExT v2: fix access control (Legacy, not DESFire/iCLASS), digital
  security (unsupported), magic (supported via T5577), illumination
  (supported HF LED), data sharing (1 kB), payment (unsupported)
- Replace Titan with m0422a magnet: RP 22,860 G/g sensing, ~20 g
  lifting, Push/Pull haptics, Monopole polarity detection
- xLED HF: correct illumination colors and Low prominence
- All data sourced from dt-shopify-storefront model definitions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 13:12:03 -07:00
michael
68234e66f4 Add repository field to showcase desktop package.json
electron-builder requires a repository field to detect the
GitHub repo for publishing artifacts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 12:41:03 -07:00
michael
2c9f7b8495 Fix showcase release: build all design system packages
Replace selective turbo filters with full build to ensure all
dependencies (tokens, web, tailwind-preset, hex-background, react)
are available for both desktop and mobile showcase builds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
showcase-v0.2.0
2026-03-08 12:04:53 -07:00
michael
b137a99c78 Fix showcase release: add tailwind-preset to build filter
Desktop showcase depends on @dangerousthings/tailwind-preset
via its Tailwind config. Add it to the turbo build filter
alongside tokens and web.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 11:40:42 -07:00
michael
4f477a50d8 Add Windows and macOS builds to showcase release workflow
- Add desktop-windows job (NSIS installer + portable exe)
- Add desktop-macos job (dmg + zip, unsigned, x64 + arm64)
- Update create-release to collect artifacts from all platforms
- Update release notes with all artifact types

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 10:59:20 -07:00
michael
741ee69079 Fix package-lock.json sync for CI
Regenerate lock file without --legacy-peer-deps to include
all resolved peer dependencies (react, react-native, etc.)
that npm ci requires.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dangerousthings/tailwind-preset@0.1.1
2026-03-08 10:22:05 -07:00
michael
89aaac9548 Merge branch 'main' of https://github.com/dangerous-tac0s/dt-design-system 2026-03-08 10:07:23 -07:00
michael
09143edab8 Add hex background to showcase with interactive controls
- Render HexGridBackground globally on every page
- Add dedicated Hex Background page with sliders for all 8 props
- Lift hex props state to App for real-time global updates
- Add three, @react-three/fiber, hex-background deps

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 10:05:47 -07:00
michael
5d2b245f5a Update docs to reflect current 6-package architecture
- README: add all 6 packages, React/Tailwind usage sections, remove glows refs
- CLAUDE.md: rewrite for 6 packages, 4-layer parity, build.cjs, storefront migration as implemented reference
- Package READMEs: fix monorepo links, remove glows references

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 10:04:41 -07:00
michael
0cfa83259e Remove glows, refine feature legend, forms, and showcase pages
- Delete glows.css and GlowsPage (unused)
- Enhance DTFeatureLegend and feature-legend.css with improved layout
- Update DTRadioGroup styling
- Refine bevels.css, forms-dt.css
- Update AnimationsPage, CardsAdvancedPage, FormsPage, HomePage
- Add type:module to web package.json

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 10:03:48 -07:00
dangerous-tac0s
3d9ec57523 Merge pull request #4 from dangerous-tac0s/changeset-release/main
chore: version packages
2026-03-07 11:25:43 -08:00
github-actions[bot]
b9eb83fa23 chore: version packages 2026-03-07 19:11:50 +00:00
michael
54b58a6ac6 Merge branch 'main' of https://github.com/dangerous-tac0s/dt-design-system 2026-03-07 11:10:36 -08:00
michael
568a1490e3 Add changeset for tailwind-preset npm readiness
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 11:10:11 -08:00
dangerous-tac0s
a7fa6fba84 Merge pull request #3 from dangerous-tac0s/changeset-release/main
chore: version packages
2026-03-07 11:04:14 -08:00
github-actions[bot]
2d3a693797 chore: version packages 2026-03-07 18:44:38 +00:00
michael
358ecb05cb Prepare all packages for npm publishing
- Add author, repository, homepage, keywords, and engines fields to
  all 6 publishable package.json files
- Add README.md to react, tailwind-preset, and hex-background packages
- Add "type": "module" to web and react-native for consistency
- Rename web build script to .cjs for ESM package compatibility
- Remove overly broad "./dist/*" export from web package

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 10:43:42 -08:00
michael
30a0510a5e Fix CI build failure and add missing LICENSE files
Add "require" export condition to tailwind-preset for Node 18 CJS
compatibility (jiti resolution). Add LICENSE files to react,
tailwind-preset, and hex-background packages. Add license field to
showcase packages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 10:31:55 -08:00
michael
21acd98260 More fine tuning 2026-03-06 10:18:39 -08:00
michael
8a8d4d4adc Improve showcase pages: drawers, modals, badges, and Vite caching fix
- DTDrawer: storefront-matching dual-element bevel border, slide-in/out
  animations from correct edge, 99vh height, bold 2em header, box shadow
- DTModal: interactive demos on Bevels page with all 5 mode variants
- Badges: solid color fill with contrasting text (black on dark, white on light)
  instead of transparent fill with colored text
- Animations: add dt-slide-right and dt-slide-left keyframes for drawers
- Bevels page: remove trash "Button Bevels", add interactive modal/drawer
  demos, fix media frame to use real images with proper bevel styling
- Advanced Cards: remove redundant media frame sections, rename "Menu Items"
  to "Buttons", remove DTButton/dt-btn references
- Forms page: rename "Menu Items" to "Buttons"
- Vite config: exclude design system packages from optimizeDeps pre-bundling
  and watch dist directories to prevent stale CSS during development

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 10:18:39 -08:00
michael
e74c285b70 Add storefront component migration: cards, badges, progress bars, animations, and React wrapper package
Major feature migration from dt-shopify-storefront into the design system:

- Card system: per-card color modes (normal/emphasis/warning/success/other),
  progress bars, full-bleed card body (card-body-flush), image bevel clip-paths,
  and visible structural borders at bevel corners
- Badge system: dt-card-badge with position-aware offsets for cards vs media frames
- Media frames: dt-bevel-media with inner surface fill, image clipping, and
  "MISSING MEDIA" placeholder for empty containers
- Interactive bevel buttons: dt-btn with hover/selected states and pulse animation
- Menu items: dt-menu-item with active states and level indentation
- Animations: scale-in, fade-in, slide-up, pulse, ping, spin keyframes
- Feature legend: CSS grid for product feature icons with state colors
- Scrollbar styling for DT brand
- New @dangerousthings/react package wrapping web CSS components
- New @dangerousthings/tailwind-preset package
- New @dangerousthings/hex-background package
- Desktop showcase rewritten in React with Tailwind CSS
- Mobile showcase updated with new screens (animations, filters, advanced cards)
- Tokens: added mode color tokens, RGB variants, and selected-state tokens

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 10:18:39 -08:00
michael
47e8085581 Make RN components fully theme-driven for multi-brand support
Refactor all 18 React Native components from static DTColors imports to
dynamic useDTTheme() context, enabling proper visual differentiation
when switching between DT and Classic brands.

Key changes:
- Replace static DTColors with theme context in all components
- Add shape tokens (bevel/radius) to DTExtendedTheme interface
- Conditionally render SVG bevels (DT) vs borderRadius (Classic)
- Configure fonts per brand (Tektur for DT, system sans-serif for Classic)
- Update buildThemeFromBrand to parse shape and typography tokens
- Fix Metro config for monorepo singleton resolution

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 10:18:39 -08:00
michael
1b0d09313c Add showcase release workflow and gitignore build artifacts
- Remove 541MB of committed Electron build artifacts from git
- Add .gitignore patterns for release/, *.apk, *.aab, *.ipa
- Add GitHub Actions workflow for building showcase releases
  (manual dispatch with version input, builds Linux desktop +
  Android APK, creates GitHub Release with attached artifacts)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 10:18:39 -08:00
michael
baf8cd3b2a Remove supra brand from design system
Supra (VivoKey MD3 theme) has been extracted into a standalone
Dangerous-Pi theme plugin. Remove all supra references from tokens,
web CSS, showcase apps, and documentation.

- Delete supra brand tokens and elevation.css
- Update ThemeBrand type to "dt" | "classic"
- Remove supra from CSS generation, imports, and bevels
- Update CLAUDE.md and package READMEs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 10:18:39 -08:00
michael
da84736b4b Add desktop (Electron) and mobile (Expo) showcase apps
New workspace packages for demonstrating design system components:
- Desktop: Electron + Vite app with brand/theme switching
- Mobile: Expo React Native app with brand switching

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 10:18:38 -08:00
michael
852a3af854 Fix hardcoded colors in classic tokens and form components
Replace hardcoded hex/opacity values with CSS custom properties for
proper theming support across brands.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 10:18:37 -08:00
dangerous-tac0s
ca55f5a497 Merge pull request #2 from dangerous-tac0s/changeset-release/main
chore: version packages
@dangerousthings/tokens@0.2.1 @dangerousthings/web@0.2.1 @dangerousthings/react-native@0.2.1
2026-03-03 20:38:15 -08:00
github-actions[bot]
5b215716cc chore: version packages 2026-03-04 04:36:26 +00:00