@dtsports/design-system 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +156 -0
- package/dist/components/accordion.d.ts +19 -0
- package/dist/components/accordion.d.ts.map +1 -0
- package/dist/components/accordion.js +26 -0
- package/dist/components/accordion.js.map +1 -0
- package/dist/components/alert.d.ts +26 -0
- package/dist/components/alert.d.ts.map +1 -0
- package/dist/components/alert.js.map +1 -0
- package/dist/components/app-shell.d.ts +21 -0
- package/dist/components/app-shell.d.ts.map +1 -0
- package/dist/components/app-shell.js +25 -0
- package/dist/components/app-shell.js.map +1 -0
- package/dist/components/aspect-ratio.d.ts +16 -0
- package/dist/components/aspect-ratio.d.ts.map +1 -0
- package/dist/components/aspect-ratio.js +17 -0
- package/dist/components/aspect-ratio.js.map +1 -0
- package/dist/components/avatar-group.d.ts +31 -0
- package/dist/components/avatar-group.d.ts.map +1 -0
- package/dist/components/avatar.d.ts +15 -0
- package/dist/components/avatar.d.ts.map +1 -0
- package/dist/components/avatar.js +20 -0
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/badge.d.ts +27 -0
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +51 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/breadcrumb.js.map +1 -0
- package/dist/components/button.d.ts +33 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +58 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/calendar.d.ts +15 -0
- package/dist/components/calendar.d.ts.map +1 -0
- package/dist/components/calendar.js +33 -0
- package/dist/components/calendar.js.map +1 -0
- package/dist/components/capacity-bar.d.ts +32 -0
- package/dist/components/capacity-bar.d.ts.map +1 -0
- package/dist/components/capacity-bar.js +29 -0
- package/dist/components/capacity-bar.js.map +1 -0
- package/dist/components/card.d.ts +26 -0
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +20 -0
- package/dist/components/checkbox.d.ts +11 -0
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +19 -0
- package/dist/components/chip.d.ts +23 -0
- package/dist/components/chip.d.ts.map +1 -0
- package/dist/components/chip.js +32 -0
- package/dist/components/chip.js.map +1 -0
- package/dist/components/collapsible.d.ts +16 -0
- package/dist/components/collapsible.js +22 -0
- package/dist/components/collapsible.js.map +1 -0
- package/dist/components/combobox.d.ts +38 -0
- package/dist/components/combobox.d.ts.map +1 -0
- package/dist/components/combobox.js +17 -0
- package/dist/components/combobox.js.map +1 -0
- package/dist/components/confirm-action.d.ts +36 -0
- package/dist/components/confirm-action.d.ts.map +1 -0
- package/dist/components/confirm-action.js +21 -0
- package/dist/components/confirm-action.js.map +1 -0
- package/dist/components/container.js.map +1 -0
- package/dist/components/date-picker.d.ts.map +1 -0
- package/dist/components/date-picker.js +22 -0
- package/dist/components/date-picker.js.map +1 -0
- package/dist/components/dialog.d.ts +28 -0
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/drawer.js +55 -0
- package/dist/components/drawer.js.map +1 -0
- package/dist/components/dropdown-menu.d.ts +39 -0
- package/dist/components/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu.js +47 -0
- package/dist/components/empty-state.d.ts +15 -0
- package/dist/components/empty-state.d.ts.map +1 -0
- package/dist/components/empty-state.js +6 -0
- package/dist/components/form-field.d.ts +32 -0
- package/dist/components/form-field.d.ts.map +1 -0
- package/dist/components/form-field.js +31 -0
- package/dist/components/form-field.js.map +1 -0
- package/dist/components/input.d.ts +10 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +6 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/label.d.ts +11 -0
- package/dist/components/label.d.ts.map +1 -0
- package/dist/components/label.js +13 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/live-pill.d.ts +14 -0
- package/dist/components/live-pill.js +15 -0
- package/dist/components/live-pill.js.map +1 -0
- package/dist/components/metric-tile.d.ts +23 -0
- package/dist/components/metric-tile.d.ts.map +1 -0
- package/dist/components/money-breakdown.d.ts +36 -0
- package/dist/components/money-breakdown.d.ts.map +1 -0
- package/dist/components/money-breakdown.js +12 -0
- package/dist/components/money-breakdown.js.map +1 -0
- package/dist/components/number-input.d.ts +16 -0
- package/dist/components/number-input.d.ts.map +1 -0
- package/dist/components/number-input.js +30 -0
- package/dist/components/number-input.js.map +1 -0
- package/dist/components/pagination.d.ts +27 -0
- package/dist/components/pagination.d.ts.map +1 -0
- package/dist/components/pagination.js +52 -0
- package/dist/components/pagination.js.map +1 -0
- package/dist/components/popover.d.ts +24 -0
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +28 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/progress.d.ts +13 -0
- package/dist/components/progress.d.ts.map +1 -0
- package/dist/components/progress.js +17 -0
- package/dist/components/radio-group.d.ts +10 -0
- package/dist/components/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group.js +17 -0
- package/dist/components/radio-group.js.map +1 -0
- package/dist/components/scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area.js +22 -0
- package/dist/components/scroll-area.js.map +1 -0
- package/dist/components/select.d.ts +27 -0
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +40 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/separator.d.ts +10 -0
- package/dist/components/separator.d.ts.map +1 -0
- package/dist/components/separator.js +14 -0
- package/dist/components/separator.js.map +1 -0
- package/dist/components/sidebar.d.ts.map +1 -0
- package/dist/components/sidebar.js +48 -0
- package/dist/components/sidebar.js.map +1 -0
- package/dist/components/skeleton.d.ts +23 -0
- package/dist/components/skeleton.js +25 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/slider.d.ts +14 -0
- package/dist/components/slider.d.ts.map +1 -0
- package/dist/components/slider.js +30 -0
- package/dist/components/slider.js.map +1 -0
- package/dist/components/spec.d.ts +35 -0
- package/dist/components/spec.js +31 -0
- package/dist/components/spec.js.map +1 -0
- package/dist/components/spinner.d.ts +20 -0
- package/dist/components/spinner.d.ts.map +1 -0
- package/dist/components/spinner.js +18 -0
- package/dist/components/spinner.js.map +1 -0
- package/dist/components/stack.d.ts +48 -0
- package/dist/components/stack.d.ts.map +1 -0
- package/dist/components/stack.js +43 -0
- package/dist/components/stack.js.map +1 -0
- package/dist/components/status-pill.js +34 -0
- package/dist/components/status-pill.js.map +1 -0
- package/dist/components/switch.d.ts +9 -0
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +15 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/table.d.ts +31 -0
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/tabs.d.ts +22 -0
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.js +28 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/textarea.d.ts +8 -0
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/textarea.js +6 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/components/theme-provider.d.ts +35 -0
- package/dist/components/theme-provider.d.ts.map +1 -0
- package/dist/components/theme-provider.js.map +1 -0
- package/dist/components/theme-toggle.d.ts +10 -0
- package/dist/components/theme-toggle.d.ts.map +1 -0
- package/dist/components/theme-toggle.js.map +1 -0
- package/dist/components/three-state.d.ts +39 -0
- package/dist/components/three-state.d.ts.map +1 -0
- package/dist/components/three-state.js +24 -0
- package/dist/components/three-state.js.map +1 -0
- package/dist/components/timestamp.d.ts +24 -0
- package/dist/components/timestamp.js +64 -0
- package/dist/components/timestamp.js.map +1 -0
- package/dist/components/toaster.d.ts +27 -0
- package/dist/components/toaster.d.ts.map +1 -0
- package/dist/components/toaster.js +21 -0
- package/dist/components/toaster.js.map +1 -0
- package/dist/components/tooltip.d.ts +28 -0
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/components/top-bar.d.ts +13 -0
- package/dist/components/top-bar.d.ts.map +1 -0
- package/dist/components/top-bar.js +16 -0
- package/dist/index.d.ts +76 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +86 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/utils.d.ts +7 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +10 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/marketing/footer.d.ts +31 -0
- package/dist/marketing/footer.d.ts.map +1 -0
- package/dist/marketing/footer.js +9 -0
- package/dist/marketing/footer.js.map +1 -0
- package/dist/marketing/hero.d.ts +29 -0
- package/dist/marketing/hero.d.ts.map +1 -0
- package/dist/marketing/hero.js +7 -0
- package/dist/marketing/hero.js.map +1 -0
- package/dist/marketing/index.d.ts +21 -0
- package/dist/marketing/index.d.ts.map +1 -0
- package/dist/marketing/index.js +21 -0
- package/dist/marketing/index.js.map +1 -0
- package/dist/marketing/logo-cloud.d.ts +15 -0
- package/dist/marketing/logo-cloud.d.ts.map +1 -0
- package/dist/marketing/logo-cloud.js +6 -0
- package/dist/marketing/logo-cloud.js.map +1 -0
- package/dist/marketing/nav.d.ts +33 -0
- package/dist/marketing/nav.d.ts.map +1 -0
- package/dist/marketing/nav.js +14 -0
- package/dist/marketing/nav.js.map +1 -0
- package/dist/marketing/prose.d.ts +12 -0
- package/dist/marketing/prose.d.ts.map +1 -0
- package/dist/marketing/prose.js +18 -0
- package/dist/marketing/prose.js.map +1 -0
- package/dist/marketing/section.d.ts +22 -0
- package/dist/marketing/section.d.ts.map +1 -0
- package/dist/marketing/section.js +7 -0
- package/dist/marketing/section.js.map +1 -0
- package/dist/showcase/components/code-block.d.ts +11 -0
- package/dist/showcase/components/code-block.d.ts.map +1 -0
- package/dist/showcase/components/code-block.js +20 -0
- package/dist/showcase/components/code-block.js.map +1 -0
- package/dist/showcase/components/example.d.ts +16 -0
- package/dist/showcase/components/example.d.ts.map +1 -0
- package/dist/showcase/components/example.js +14 -0
- package/dist/showcase/components/example.js.map +1 -0
- package/dist/showcase/components/section.d.ts +21 -0
- package/dist/showcase/components/section.d.ts.map +1 -0
- package/dist/showcase/components/section.js +10 -0
- package/dist/showcase/components/section.js.map +1 -0
- package/dist/showcase/components/swatch.d.ts +17 -0
- package/dist/showcase/components/swatch.d.ts.map +1 -0
- package/dist/showcase/components/swatch.js +6 -0
- package/dist/showcase/components/swatch.js.map +1 -0
- package/dist/showcase/index.d.ts +17 -0
- package/dist/showcase/index.d.ts.map +1 -0
- package/dist/showcase/index.js +17 -0
- package/dist/showcase/index.js.map +1 -0
- package/dist/showcase/page.d.ts +2 -0
- package/dist/showcase/page.d.ts.map +1 -0
- package/dist/showcase/page.js +1085 -0
- package/dist/showcase/page.js.map +1 -0
- package/dist/styles/generated/tokens.d.ts +131 -0
- package/dist/styles/generated/tokens.d.ts.map +1 -0
- package/dist/styles/generated/tokens.js +107 -0
- package/dist/styles/generated/tokens.js.map +1 -0
- package/dist/styles/globals.css +131 -0
- package/dist/styles/tailwind.preset.d.ts +181 -0
- package/dist/styles/tailwind.preset.d.ts.map +1 -0
- package/dist/styles/tailwind.preset.js +114 -0
- package/dist/styles/tailwind.preset.js.map +1 -0
- package/dist/tokens/index.d.ts +176 -0
- package/dist/tokens/index.d.ts.map +1 -0
- package/dist/tokens/index.js +139 -0
- package/dist/tokens/index.js.map +1 -0
- package/dist/tokens/tokens.json +154 -0
- package/package.json +124 -0
- package/src/components/accordion.tsx +76 -0
- package/src/components/alert.tsx +113 -0
- package/src/components/app-shell.tsx +43 -0
- package/src/components/aspect-ratio.tsx +18 -0
- package/src/components/avatar-group.tsx +73 -0
- package/src/components/avatar.tsx +81 -0
- package/src/components/badge.tsx +77 -0
- package/src/components/breadcrumb.tsx +121 -0
- package/src/components/button.tsx +83 -0
- package/src/components/calendar.tsx +85 -0
- package/src/components/capacity-bar.tsx +80 -0
- package/src/components/card.tsx +104 -0
- package/src/components/checkbox.tsx +46 -0
- package/src/components/chip.tsx +74 -0
- package/src/components/collapsible.tsx +54 -0
- package/src/components/combobox.tsx +140 -0
- package/src/components/confirm-action.tsx +111 -0
- package/src/components/container.tsx +39 -0
- package/src/components/date-picker.tsx +98 -0
- package/src/components/dialog.tsx +174 -0
- package/src/components/drawer.tsx +157 -0
- package/src/components/dropdown-menu.tsx +200 -0
- package/src/components/empty-state.tsx +46 -0
- package/src/components/form-field.tsx +118 -0
- package/src/components/input.tsx +29 -0
- package/src/components/label.tsx +35 -0
- package/src/components/live-pill.tsx +35 -0
- package/src/components/metric-tile.tsx +83 -0
- package/src/components/money-breakdown.tsx +92 -0
- package/src/components/number-input.tsx +113 -0
- package/src/components/pagination.tsx +157 -0
- package/src/components/popover.tsx +46 -0
- package/src/components/progress.tsx +34 -0
- package/src/components/radio-group.tsx +46 -0
- package/src/components/scroll-area.tsx +55 -0
- package/src/components/select.tsx +169 -0
- package/src/components/separator.tsx +34 -0
- package/src/components/sidebar.tsx +168 -0
- package/src/components/skeleton.tsx +85 -0
- package/src/components/slider.tsx +58 -0
- package/src/components/spec.tsx +59 -0
- package/src/components/spinner.tsx +36 -0
- package/src/components/stack.tsx +80 -0
- package/src/components/status-pill.tsx +100 -0
- package/src/components/switch.tsx +37 -0
- package/src/components/table.tsx +129 -0
- package/src/components/tabs.tsx +72 -0
- package/src/components/textarea.tsx +27 -0
- package/src/components/theme-provider.tsx +131 -0
- package/src/components/theme-toggle.tsx +34 -0
- package/src/components/three-state.tsx +90 -0
- package/src/components/timestamp.tsx +107 -0
- package/src/components/toaster.tsx +55 -0
- package/src/components/tooltip.tsx +49 -0
- package/src/components/top-bar.tsx +29 -0
- package/src/index.ts +221 -0
- package/src/lib/utils.ts +10 -0
- package/src/marketing/footer.tsx +93 -0
- package/src/marketing/hero.tsx +92 -0
- package/src/marketing/index.ts +24 -0
- package/src/marketing/logo-cloud.tsx +35 -0
- package/src/marketing/nav.tsx +122 -0
- package/src/marketing/prose.tsx +45 -0
- package/src/marketing/section.tsx +77 -0
- package/src/showcase/components/code-block.tsx +66 -0
- package/src/showcase/components/example.tsx +47 -0
- package/src/showcase/components/section.tsx +70 -0
- package/src/showcase/components/swatch.tsx +52 -0
- package/src/showcase/index.tsx +16 -0
- package/src/showcase/page.tsx +4216 -0
- package/src/styles/generated/tokens.ts +119 -0
- package/src/styles/globals.css +131 -0
- package/src/styles/tailwind.preset.ts +134 -0
- package/src/test/a11y.test.tsx +638 -0
- package/src/test/marketing-a11y.test.tsx +138 -0
- package/src/test/setup.ts +47 -0
- package/src/tokens/index.ts +154 -0
- package/src/tokens/tokens.json +154 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DT Sports
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# @dtsports/design-system
|
|
2
|
+
|
|
3
|
+
The reusable design system for every DT Sports product — **60+ components, a single-source token system (web + React Native), a marketing tier, and a live documentation page**, all shipped together and gated by accessibility, contrast, and visual-regression tests.
|
|
4
|
+
|
|
5
|
+
The folder is `dtsports_design-system/` at the repo root; the npm package name is `@dtsports/design-system`.
|
|
6
|
+
|
|
7
|
+
- **Using it in an app / publishing:** see [`npm.md`](./npm.md)
|
|
8
|
+
- **Version history:** see [`CHANGELOG.md`](./CHANGELOG.md)
|
|
9
|
+
- **Principles & foundations:** see [`design.md`](../design.md)
|
|
10
|
+
|
|
11
|
+
## Quick start
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
# In a consuming app (see npm.md for the full 3-step Next.js wiring):
|
|
15
|
+
npm install @dtsports/design-system
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
```tsx
|
|
19
|
+
import "@dtsports/design-system/styles/globals.css";
|
|
20
|
+
import { ThemeProvider, Button, Card } from "@dtsports/design-system";
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
# In this repo, to browse every component live:
|
|
25
|
+
cd dtsports_design-system
|
|
26
|
+
npm install
|
|
27
|
+
npm run dev # → http://localhost:5199
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## What's inside
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
src/
|
|
34
|
+
├── components/ ← 55 UI component files (Button, Card, Table, Dialog, …)
|
|
35
|
+
├── marketing/ ← marketing-site primitives (Hero, Section, Nav, Footer, …)
|
|
36
|
+
├── tokens/
|
|
37
|
+
│ ├── tokens.json ← SINGLE SOURCE OF TRUTH for every design token
|
|
38
|
+
│ └── index.ts ← generated: platform-agnostic tokens (RN / plain JS)
|
|
39
|
+
├── styles/
|
|
40
|
+
│ ├── globals.css ← generated CSS-variable blocks + base layer
|
|
41
|
+
│ ├── tailwind.preset.ts ← Tailwind theme (consumes generated token data)
|
|
42
|
+
│ └── generated/ ← generated preset data (do not edit)
|
|
43
|
+
├── lib/utils.ts ← `cn()` for class merging
|
|
44
|
+
├── showcase/ ← the live docs page (mountable)
|
|
45
|
+
│ ├── index.tsx · page.tsx · components/
|
|
46
|
+
├── test/ ← jest-axe accessibility suites
|
|
47
|
+
└── index.ts ← public API for the library
|
|
48
|
+
|
|
49
|
+
scripts/ ← build-tokens · check-contrast · fix-extensions
|
|
50
|
+
tests/visual/ ← Playwright screenshots + committed baselines
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Component inventory
|
|
54
|
+
|
|
55
|
+
- **Forms:** Button, Input, Textarea, Label, Checkbox, RadioGroup, Switch, Select, NumberInput, Slider, Combobox, Calendar, DatePicker, FormField
|
|
56
|
+
- **Display:** Badge, Chip, Card, Table, Avatar, AvatarGroup, Separator, Spec, Pagination, Progress
|
|
57
|
+
- **Feedback:** Alert, Toaster/`toast`, Skeleton (+ SkeletonList/SkeletonTable), Spinner
|
|
58
|
+
- **Overlays:** Dialog, Drawer, Popover, DropdownMenu, Tooltip
|
|
59
|
+
- **Disclosure / nav:** Accordion, Collapsible, Tabs, Breadcrumb
|
|
60
|
+
- **Layout / shell:** AppShell, Sidebar, TopBar, Container, Stack, AspectRatio, ScrollArea
|
|
61
|
+
- **Brand & patterns:** LivePill, StatusPill, MetricTile, CapacityBar, EmptyState, Timestamp, MoneyBreakdown, ThreeState, ConfirmAction
|
|
62
|
+
- **Theming:** ThemeProvider, useTheme, ThemeToggle
|
|
63
|
+
- **Marketing** (`/marketing`): MarketingNav, Hero, Section, Footer, LogoCloud, Prose
|
|
64
|
+
|
|
65
|
+
## Sub-entries
|
|
66
|
+
|
|
67
|
+
| Import path | What it gives you |
|
|
68
|
+
| -------------------------------------------- | ---------------------------------------------------------------- |
|
|
69
|
+
| `@dtsports/design-system` | The component library (Button, Card, …) + `cn` + `ThemeProvider` |
|
|
70
|
+
| `@dtsports/design-system/showcase` | The full docs page as a mountable component |
|
|
71
|
+
| `@dtsports/design-system/styles/globals.css` | CSS variables + base layer (import once in layout) |
|
|
72
|
+
| `@dtsports/design-system/tailwind-preset` | Theme tokens for your `tailwind.config.ts` |
|
|
73
|
+
| `@dtsports/design-system/marketing` | Marketing-site primitives (Hero, Section, Nav, Footer, Prose) |
|
|
74
|
+
| `@dtsports/design-system/tokens` | Resolved platform-agnostic tokens (React Native / plain JS) |
|
|
75
|
+
| `@dtsports/design-system/tokens.json` | Raw token source (design tools, codegen) |
|
|
76
|
+
|
|
77
|
+
## Editing tokens
|
|
78
|
+
|
|
79
|
+
`src/tokens/tokens.json` is the single source of truth for colors (light +
|
|
80
|
+
dark), typography, spacing, radii, shadows, motion, z-index, and
|
|
81
|
+
breakpoints. After editing it:
|
|
82
|
+
|
|
83
|
+
```sh
|
|
84
|
+
npm run build:tokens # regenerates globals.css vars, preset data, ./tokens
|
|
85
|
+
npm run check:contrast # WCAG gate — CI runs this too
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Never edit the generated blocks (`globals.css` marked region,
|
|
89
|
+
`src/styles/generated/`, `src/tokens/index.ts`) by hand — CI fails if
|
|
90
|
+
they're stale.
|
|
91
|
+
|
|
92
|
+
## Developing
|
|
93
|
+
|
|
94
|
+
Run everything from the `dtsports_design-system/` directory.
|
|
95
|
+
|
|
96
|
+
| Command | What it does |
|
|
97
|
+
| --------------------------------- | ------------------------------------------------------------------- |
|
|
98
|
+
| `npm run dev` | Browse the showcase at `localhost:5199` (Vite + real Tailwind) |
|
|
99
|
+
| `npm test` | jest-axe accessibility suite (41 tests, app + marketing tiers) |
|
|
100
|
+
| `npm run test:visual` | Playwright screenshots vs the 264 committed baselines |
|
|
101
|
+
| `npm run test:visual:update` | Re-baseline after an intentional visual change |
|
|
102
|
+
| `npm run build:tokens` | Regenerate CSS vars, preset data, and `./tokens` from `tokens.json` |
|
|
103
|
+
| `npm run check:tokens` | Fail if the generated token artifacts are stale |
|
|
104
|
+
| `npm run check:contrast` | WCAG contrast gate against the live tokens |
|
|
105
|
+
| `npm run lint` / `npm run format` | ESLint (`jsx-a11y`) / Prettier |
|
|
106
|
+
| `npm run typecheck` | `tsc --noEmit` |
|
|
107
|
+
| `npm run build` | Compiled ESM + `.d.ts` into `dist/` (the publish artifact) |
|
|
108
|
+
|
|
109
|
+
CI (`.github/workflows/ci.yml`) runs the whole set on every push/PR:
|
|
110
|
+
lint → format → typecheck → tokens → tests → contrast → build → publint →
|
|
111
|
+
visual.
|
|
112
|
+
|
|
113
|
+
Visual baselines are per-platform (`-darwin.png` locally, `-linux.png` in
|
|
114
|
+
CI). After the first CI run on a new platform, download the
|
|
115
|
+
`playwright-visual` artifact and commit the generated `-linux.png` files.
|
|
116
|
+
|
|
117
|
+
## Consuming from an app & releasing
|
|
118
|
+
|
|
119
|
+
Full instructions — installing (npm / monorepo / private registry), the
|
|
120
|
+
3-step Next.js wiring, React Native token usage, and the changesets
|
|
121
|
+
publish flow — live in **[`npm.md`](./npm.md)**.
|
|
122
|
+
|
|
123
|
+
The short version for a Next.js app:
|
|
124
|
+
|
|
125
|
+
```ts
|
|
126
|
+
// 1. root layout — import styles once
|
|
127
|
+
import "@dtsports/design-system/styles/globals.css";
|
|
128
|
+
|
|
129
|
+
// 2. tailwind.config.ts — extend the preset
|
|
130
|
+
import preset from "@dtsports/design-system/tailwind-preset";
|
|
131
|
+
export default { presets: [preset], content: [/* …app + DS paths */] };
|
|
132
|
+
|
|
133
|
+
// 3. mount the live docs (optional, one line)
|
|
134
|
+
export { default } from "@dtsports/design-system/showcase";
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Why the showcase ships with the library
|
|
138
|
+
|
|
139
|
+
Before consolidation the docs page lived in the consuming app. That meant:
|
|
140
|
+
|
|
141
|
+
- Every new app had to copy ~1700 lines to get the same docs page.
|
|
142
|
+
- Updates to a component required editing both the component AND the docs in every consuming app.
|
|
143
|
+
- New apps could drift from the canonical docs.
|
|
144
|
+
|
|
145
|
+
Now the docs page is part of the package. One line in any app mounts the same authoritative reference, and it always reflects the current version of the components.
|
|
146
|
+
|
|
147
|
+
## Principles
|
|
148
|
+
|
|
149
|
+
See [`design.md`](../design.md) at the repo root for the full design system
|
|
150
|
+
documentation:
|
|
151
|
+
|
|
152
|
+
- §2 Visual principles (8 rules)
|
|
153
|
+
- §3 UX principles (19 sub-rules)
|
|
154
|
+
- §4–§9 Foundations (color, type, spacing, radius, elevation, icons)
|
|
155
|
+
- §10 Components · §11 UX pattern components
|
|
156
|
+
- §12 Motion · §13 Theming · §14 Accessibility
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
3
|
+
/**
|
|
4
|
+
* Accordion — for grouped expandable sections (House rules · Policy ·
|
|
5
|
+
* About). Use `type="single"` for FAQ-style (one-open-at-a-time) and
|
|
6
|
+
* `type="multiple"` for settings panels.
|
|
7
|
+
*
|
|
8
|
+
* <Accordion type="single" collapsible>
|
|
9
|
+
* <AccordionItem value="a">
|
|
10
|
+
* <AccordionTrigger>House rules</AccordionTrigger>
|
|
11
|
+
* <AccordionContent>…</AccordionContent>
|
|
12
|
+
* </AccordionItem>
|
|
13
|
+
* </Accordion>
|
|
14
|
+
*/
|
|
15
|
+
export declare const Accordion: React.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
export declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
export declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
18
|
+
export declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
//# sourceMappingURL=accordion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../src/components/accordion.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAIhE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,SAAS,8JAA0B,CAAC;AAEjD,eAAO,MAAM,aAAa,iKASxB,CAAC;AAGH,eAAO,MAAM,gBAAgB,0KAuB3B,CAAC;AAGH,eAAO,MAAM,gBAAgB,oKAe3B,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
5
|
+
import { ChevronDown } from "lucide-react";
|
|
6
|
+
import { cn } from "../lib/utils.js";
|
|
7
|
+
/**
|
|
8
|
+
* Accordion — for grouped expandable sections (House rules · Policy ·
|
|
9
|
+
* About). Use `type="single"` for FAQ-style (one-open-at-a-time) and
|
|
10
|
+
* `type="multiple"` for settings panels.
|
|
11
|
+
*
|
|
12
|
+
* <Accordion type="single" collapsible>
|
|
13
|
+
* <AccordionItem value="a">
|
|
14
|
+
* <AccordionTrigger>House rules</AccordionTrigger>
|
|
15
|
+
* <AccordionContent>…</AccordionContent>
|
|
16
|
+
* </AccordionItem>
|
|
17
|
+
* </Accordion>
|
|
18
|
+
*/
|
|
19
|
+
export const Accordion = AccordionPrimitive.Root;
|
|
20
|
+
export const AccordionItem = React.forwardRef(({ className, ...props }, ref) => (_jsx(AccordionPrimitive.Item, { ref: ref, className: cn("border-b border-border last:border-b-0", className), ...props })));
|
|
21
|
+
AccordionItem.displayName = "AccordionItem";
|
|
22
|
+
export const AccordionTrigger = React.forwardRef(({ className, children, ...props }, ref) => (_jsx(AccordionPrimitive.Header, { className: "flex", children: _jsxs(AccordionPrimitive.Trigger, { ref: ref, className: cn("flex flex-1 items-center justify-between py-3 text-sm font-medium text-foreground transition-all duration-150", "hover:text-brand-forest", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:rounded-sm", "[&[data-state=open]>svg]:rotate-180", className), ...props, children: [children, _jsx(ChevronDown, { className: "h-3.5 w-3.5 shrink-0 text-text-muted transition-transform duration-150", strokeWidth: 1.75 })] }) })));
|
|
23
|
+
AccordionTrigger.displayName = "AccordionTrigger";
|
|
24
|
+
export const AccordionContent = React.forwardRef(({ className, children, ...props }, ref) => (_jsx(AccordionPrimitive.Content, { ref: ref, className: cn("overflow-hidden text-sm text-foreground", "data-[state=closed]:animate-fade-in data-[state=open]:animate-fade-in", className), ...props, children: _jsx("div", { className: "pb-3 pt-0", children: children }) })));
|
|
25
|
+
AccordionContent.displayName = "AccordionContent";
|
|
26
|
+
//# sourceMappingURL=accordion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion.js","sourceRoot":"","sources":["../../src/components/accordion.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,kBAAkB,CAAC,IAAI,CAAC;AAEjD,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAG3C,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,kBAAkB,CAAC,IAAI,IACtB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,wCAAwC,EAAE,SAAS,CAAC,KAC9D,KAAK,GACT,CACH,CAAC,CAAC;AACH,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC;AAE5C,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CAG9C,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAC5C,KAAC,kBAAkB,CAAC,MAAM,IAAC,SAAS,EAAC,MAAM,YACzC,MAAC,kBAAkB,CAAC,OAAO,IACzB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,+GAA+G,EAC/G,yBAAyB,EACzB,kGAAkG,EAClG,qCAAqC,EACrC,SAAS,CACV,KACG,KAAK,aAER,QAAQ,EACT,KAAC,WAAW,IACV,SAAS,EAAC,wEAAwE,EAClF,WAAW,EAAE,IAAI,GACjB,IACyB,GACH,CAC7B,CAAC,CAAC;AACH,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC;AAElD,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CAG9C,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAC5C,KAAC,kBAAkB,CAAC,OAAO,IACzB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,yCAAyC,EACzC,uEAAuE,EACvE,SAAS,CACV,KACG,KAAK,YAET,cAAK,SAAS,EAAC,WAAW,YAAE,QAAQ,GAAO,GAChB,CAC9B,CAAC,CAAC;AACH,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
/**
|
|
4
|
+
* Alert / inline notice — for status messages that aren't transient.
|
|
5
|
+
* Pair with the right variant:
|
|
6
|
+
* - info neutral notices
|
|
7
|
+
* - success confirmations that stick (booking saved, etc.)
|
|
8
|
+
* - warning needs attention (below min to run, low credit)
|
|
9
|
+
* - danger error / failure
|
|
10
|
+
*
|
|
11
|
+
* Use Toast for transient feedback; use Alert when the message belongs
|
|
12
|
+
* inline with the content.
|
|
13
|
+
*/
|
|
14
|
+
export declare const alertVariants: (props?: ({
|
|
15
|
+
variant?: "success" | "warning" | "danger" | "info" | null | undefined;
|
|
16
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
17
|
+
export interface AlertProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title">, VariantProps<typeof alertVariants> {
|
|
18
|
+
title?: React.ReactNode;
|
|
19
|
+
/** Set false to hide the leading status icon */
|
|
20
|
+
showIcon?: boolean;
|
|
21
|
+
/** Show a close (×) button. Provide onDismiss to handle the click. */
|
|
22
|
+
dismissible?: boolean;
|
|
23
|
+
onDismiss?: () => void;
|
|
24
|
+
}
|
|
25
|
+
export declare function Alert({ className, variant, title, showIcon, dismissible, onDismiss, children, ...props }: AlertProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../src/components/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa;;8EAazB,CAAC;AAgBF,MAAM,WAAW,UACf,SACE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC,EACnD,YAAY,CAAC,OAAO,aAAa,CAAC;IACpC,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sEAAsE;IACtE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,wBAAgB,KAAK,CAAC,EACpB,SAAS,EACT,OAAO,EACP,KAAK,EACL,QAAe,EACf,WAAW,EACX,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,UAAU,2CA8CZ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.js","sourceRoot":"","sources":["../../src/components/alert.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAC9B,oDAAoD,EACpD;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,IAAI,EAAE,0CAA0C;YAChD,OAAO,EAAE,gDAAgD;YACzD,OAAO,EAAE,gDAAgD;YACzD,MAAM,EAAE,8CAA8C;SACvD;KACF;IACD,eAAe,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;CACrC,CACF,CAAC;AAEF,MAAM,QAAQ,GAAG;IACf,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,YAAY;IACrB,OAAO,EAAE,aAAa;IACtB,MAAM,EAAE,OAAO;CACP,CAAC;AAEX,MAAM,cAAc,GAAG;IACrB,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,cAAc;IACvB,OAAO,EAAE,cAAc;IACvB,MAAM,EAAE,aAAa;CACb,CAAC;AAcX,MAAM,UAAU,KAAK,CAAC,EACpB,SAAS,EACT,OAAO,EACP,KAAK,EACL,QAAQ,GAAG,IAAI,EACf,WAAW,EACX,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACG;IACX,MAAM,CAAC,GAAG,OAAO,IAAI,MAAM,CAAC;IAC5B,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IACzB,MAAM,SAAS,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;IACpC,OAAO,CACL,cACE,IAAI,EAAE,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EACzC,SAAS,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,KACnD,KAAK,YAET,eAAK,SAAS,EAAC,0BAA0B,aACtC,QAAQ,IAAI,CACX,KAAC,IAAI,IACH,SAAS,EAAE,EAAE,CAAC,yBAAyB,EAAE,SAAS,CAAC,EACnD,WAAW,EAAE,CAAC,iBACF,MAAM,GAClB,CACH,EACD,eAAK,SAAS,EAAC,gBAAgB,aAC5B,KAAK,IAAI,CACR,cAAK,SAAS,EAAC,mCAAmC,YAAE,KAAK,GAAO,CACjE,EACA,QAAQ,IAAI,CACX,cACE,SAAS,EAAE,EAAE,CACX,KAAK,IAAI,MAAM,EACf,gGAAgG,CACjG,YAEA,QAAQ,GACL,CACP,IACG,EACL,WAAW,IAAI,CACd,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,SAAS,gBACP,SAAS,EACpB,SAAS,EAAC,6RAA6R,YAEvS,KAAC,CAAC,IAAC,SAAS,EAAC,SAAS,EAAC,WAAW,EAAE,IAAI,GAAI,GACrC,CACV,IACG,GACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* AppShell — flex layout for sidebar + main content.
|
|
4
|
+
* The actual sidebar and content are children; AppShell just provides
|
|
5
|
+
* the full-height flex frame.
|
|
6
|
+
*
|
|
7
|
+
* <AppShell>
|
|
8
|
+
* <Sidebar>…</Sidebar>
|
|
9
|
+
* <AppMain>
|
|
10
|
+
* <TopBar>…</TopBar>
|
|
11
|
+
* <PageContent>…</PageContent>
|
|
12
|
+
* </AppMain>
|
|
13
|
+
* </AppShell>
|
|
14
|
+
*/
|
|
15
|
+
export declare const AppShell: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
/**
|
|
17
|
+
* AppMain — main content area, scrollable, takes remaining width.
|
|
18
|
+
* Pair with TopBar (sticky) and your page content inside.
|
|
19
|
+
*/
|
|
20
|
+
export declare const AppMain: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
//# sourceMappingURL=app-shell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-shell.d.ts","sourceRoot":"","sources":["../../src/components/app-shell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,QAAQ,6GASnB,CAAC;AAGH;;;GAGG;AACH,eAAO,MAAM,OAAO,6GASlB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../lib/utils.js";
|
|
4
|
+
/**
|
|
5
|
+
* AppShell — flex layout for sidebar + main content.
|
|
6
|
+
* The actual sidebar and content are children; AppShell just provides
|
|
7
|
+
* the full-height flex frame.
|
|
8
|
+
*
|
|
9
|
+
* <AppShell>
|
|
10
|
+
* <Sidebar>…</Sidebar>
|
|
11
|
+
* <AppMain>
|
|
12
|
+
* <TopBar>…</TopBar>
|
|
13
|
+
* <PageContent>…</PageContent>
|
|
14
|
+
* </AppMain>
|
|
15
|
+
* </AppShell>
|
|
16
|
+
*/
|
|
17
|
+
export const AppShell = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("flex min-h-screen w-full", className), ...props })));
|
|
18
|
+
AppShell.displayName = "AppShell";
|
|
19
|
+
/**
|
|
20
|
+
* AppMain — main content area, scrollable, takes remaining width.
|
|
21
|
+
* Pair with TopBar (sticky) and your page content inside.
|
|
22
|
+
*/
|
|
23
|
+
export const AppMain = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("flex-1 min-w-0 flex flex-col", className), ...props })));
|
|
24
|
+
AppMain.displayName = "AppMain";
|
|
25
|
+
//# sourceMappingURL=app-shell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-shell.js","sourceRoot":"","sources":["../../src/components/app-shell.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAGtC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,0BAA0B,EAAE,SAAS,CAAC,KAChD,KAAK,GACT,CACH,CAAC,CAAC;AACH,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC;AAElC;;;GAGG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAGrC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,8BAA8B,EAAE,SAAS,CAAC,KACpD,KAAK,GACT,CACH,CAAC,CAAC;AACH,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
|
|
2
|
+
/**
|
|
3
|
+
* AspectRatio — locks a region to a given ratio without layout shift.
|
|
4
|
+
*
|
|
5
|
+
* <AspectRatio ratio={16 / 9}>
|
|
6
|
+
* <iframe src={…} className="h-full w-full" />
|
|
7
|
+
* </AspectRatio>
|
|
8
|
+
*
|
|
9
|
+
* Common ratios:
|
|
10
|
+
* - 16/9 video
|
|
11
|
+
* - 4/3 older video / photos
|
|
12
|
+
* - 1/1 square
|
|
13
|
+
* - 21/9 ultrawide / banner
|
|
14
|
+
*/
|
|
15
|
+
export declare const AspectRatio: import("react").ForwardRefExoticComponent<AspectRatioPrimitive.AspectRatioProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
|
+
//# sourceMappingURL=aspect-ratio.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aspect-ratio.d.ts","sourceRoot":"","sources":["../../src/components/aspect-ratio.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAC;AAErE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,WAAW,kIAA4B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
|
|
3
|
+
/**
|
|
4
|
+
* AspectRatio — locks a region to a given ratio without layout shift.
|
|
5
|
+
*
|
|
6
|
+
* <AspectRatio ratio={16 / 9}>
|
|
7
|
+
* <iframe src={…} className="h-full w-full" />
|
|
8
|
+
* </AspectRatio>
|
|
9
|
+
*
|
|
10
|
+
* Common ratios:
|
|
11
|
+
* - 16/9 video
|
|
12
|
+
* - 4/3 older video / photos
|
|
13
|
+
* - 1/1 square
|
|
14
|
+
* - 21/9 ultrawide / banner
|
|
15
|
+
*/
|
|
16
|
+
export const AspectRatio = AspectRatioPrimitive.Root;
|
|
17
|
+
//# sourceMappingURL=aspect-ratio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aspect-ratio.js","sourceRoot":"","sources":["../../src/components/aspect-ratio.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAC;AAErE;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,oBAAoB,CAAC,IAAI,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* AvatarGroup — stacked overlapping avatars. Shows up to `max` avatars
|
|
4
|
+
* followed by a "+N" pill for the overflow.
|
|
5
|
+
*
|
|
6
|
+
* <AvatarGroup max={4}>
|
|
7
|
+
* <Avatar name="Alex Chen" />
|
|
8
|
+
* <Avatar name="Jordan Lee" />
|
|
9
|
+
* <Avatar name="Sam Patel" />
|
|
10
|
+
* <Avatar name="Maria Garcia" />
|
|
11
|
+
* <Avatar name="Danny Tran" />
|
|
12
|
+
* </AvatarGroup>
|
|
13
|
+
*
|
|
14
|
+
* Use for: roster previews, "8 people booked" inline indicators.
|
|
15
|
+
*/
|
|
16
|
+
declare const SIZE_CLASSES: {
|
|
17
|
+
readonly sm: "h-6 w-6 text-[10px]";
|
|
18
|
+
readonly default: "h-8 w-8 text-xs";
|
|
19
|
+
readonly lg: "h-10 w-10 text-sm";
|
|
20
|
+
};
|
|
21
|
+
export interface AvatarGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
22
|
+
/** Max avatars shown before collapsing to "+N". */
|
|
23
|
+
max?: number;
|
|
24
|
+
/** Size of the overflow pill — should match the avatars inside. */
|
|
25
|
+
size?: keyof typeof SIZE_CLASSES;
|
|
26
|
+
/** Accessible label for screen readers (e.g. "8 players booked"). */
|
|
27
|
+
label?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare const AvatarGroup: React.ForwardRefExoticComponent<AvatarGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=avatar-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar-group.d.ts","sourceRoot":"","sources":["../../src/components/avatar-group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,YAAY;;;;CAIR,CAAC;AAEX,MAAM,WAAW,gBAAiB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC5E,mDAAmD;IACnD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,OAAO,YAAY,CAAC;IACjC,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,WAAW,yFAuCvB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Avatar — per design.md §10
|
|
4
|
+
* Sizes: sm 24 / default 32 / lg 64
|
|
5
|
+
* Fallback: brand-forest bg, white initials (first letter of first + last)
|
|
6
|
+
*/
|
|
7
|
+
export interface AvatarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
name: string;
|
|
9
|
+
src?: string;
|
|
10
|
+
size?: "sm" | "default" | "lg";
|
|
11
|
+
/** Optional status dot: lime = checked-in, gray = booked */
|
|
12
|
+
status?: "checked-in" | "booked";
|
|
13
|
+
}
|
|
14
|
+
export declare function Avatar({ name, src, size, status, className, ...props }: AvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=avatar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../src/components/avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B;;;;GAIG;AACH,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACvE,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC;IAC/B,4DAA4D;IAC5D,MAAM,CAAC,EAAE,YAAY,GAAG,QAAQ,CAAC;CAClC;AAeD,wBAAgB,MAAM,CAAC,EACrB,IAAI,EACJ,GAAG,EACH,IAAgB,EAChB,MAAM,EACN,SAAS,EACT,GAAG,KAAK,EACT,EAAE,WAAW,2CA4Cb"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/utils.js";
|
|
3
|
+
function initials(name) {
|
|
4
|
+
const parts = name.trim().split(/\s+/);
|
|
5
|
+
const first = parts[0]?.[0] ?? "";
|
|
6
|
+
const last = parts.length > 1 ? parts[parts.length - 1][0] : "";
|
|
7
|
+
return (first + last).toUpperCase() || "?";
|
|
8
|
+
}
|
|
9
|
+
const sizeMap = {
|
|
10
|
+
sm: { box: "h-6 w-6", text: "text-[10px]", dot: "h-1.5 w-1.5" },
|
|
11
|
+
default: { box: "h-8 w-8", text: "text-xs", dot: "h-2 w-2" },
|
|
12
|
+
lg: { box: "h-16 w-16", text: "text-lg", dot: "h-3 w-3" },
|
|
13
|
+
};
|
|
14
|
+
export function Avatar({ name, src, size = "default", status, className, ...props }) {
|
|
15
|
+
const s = sizeMap[size];
|
|
16
|
+
return (_jsxs("div", { role: "img", "aria-label": status
|
|
17
|
+
? `${name} (${status === "checked-in" ? "checked in" : "booked"})`
|
|
18
|
+
: name, className: cn("relative inline-flex shrink-0", className), ...props, children: [src ? (_jsx("img", { src: src, alt: name, className: cn("rounded-full object-cover", s.box) })) : (_jsx("div", { className: cn("flex items-center justify-center rounded-full bg-brand-forest text-brand-forest-foreground font-semibold tabular", s.box, s.text), children: initials(name) })), status && (_jsx("span", { "aria-hidden": "true", className: cn("absolute -bottom-0.5 -right-0.5 rounded-full ring-2 ring-background", s.dot, status === "checked-in" ? "bg-brand-lime" : "bg-text-subtle") }))] }));
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=avatar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar.js","sourceRoot":"","sources":["../../src/components/avatar.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAelC,SAAS,QAAQ,CAAC,IAAY;IAC5B,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACvC,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAClC,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAChE,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,WAAW,EAAE,IAAI,GAAG,CAAC;AAC7C,CAAC;AAED,MAAM,OAAO,GAAG;IACd,EAAE,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,aAAa,EAAE;IAC/D,OAAO,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE;IAC5D,EAAE,EAAE,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE;CAC1D,CAAC;AAEF,MAAM,UAAU,MAAM,CAAC,EACrB,IAAI,EACJ,GAAG,EACH,IAAI,GAAG,SAAS,EAChB,MAAM,EACN,SAAS,EACT,GAAG,KAAK,EACI;IACZ,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxB,OAAO,CACL,eACE,IAAI,EAAC,KAAK,gBAIR,MAAM;YACJ,CAAC,CAAC,GAAG,IAAI,KAAK,MAAM,KAAK,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,GAAG;YAClE,CAAC,CAAC,IAAI,EAEV,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,KACrD,KAAK,aAER,GAAG,CAAC,CAAC,CAAC,CACL,cACE,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,IAAI,EACT,SAAS,EAAE,EAAE,CAAC,2BAA2B,EAAE,CAAC,CAAC,GAAG,CAAC,GACjD,CACH,CAAC,CAAC,CAAC,CACF,cACE,SAAS,EAAE,EAAE,CACX,kHAAkH,EAClH,CAAC,CAAC,GAAG,EACL,CAAC,CAAC,IAAI,CACP,YAEA,QAAQ,CAAC,IAAI,CAAC,GACX,CACP,EACA,MAAM,IAAI,CACT,8BACc,MAAM,EAClB,SAAS,EAAE,EAAE,CACX,qEAAqE,EACrE,CAAC,CAAC,GAAG,EACL,MAAM,KAAK,YAAY,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,gBAAgB,CAC7D,GACD,CACH,IACG,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
/**
|
|
4
|
+
* Badge — per design.md §10
|
|
5
|
+
* Small uppercase pills used as status markers. Always paired with text
|
|
6
|
+
* (and optionally an icon) so they are NOT color-only signals.
|
|
7
|
+
*
|
|
8
|
+
* Sizes:
|
|
9
|
+
* - xs (default): 20px tall, 6px horizontal padding
|
|
10
|
+
* - sm: 24px tall, 8px horizontal padding
|
|
11
|
+
*
|
|
12
|
+
* Shape:
|
|
13
|
+
* - rounded-sm (default): square-ish for inline cell badges
|
|
14
|
+
* - rounded-full: pill, reserved for game status (see StatusPill)
|
|
15
|
+
*/
|
|
16
|
+
declare const badgeVariants: (props?: ({
|
|
17
|
+
variant?: "neutral" | "outline" | "forest" | "lime" | "success" | "warning" | "danger" | "info" | "muted-outline" | null | undefined;
|
|
18
|
+
size?: "xs" | "sm" | null | undefined;
|
|
19
|
+
shape?: "square" | "pill" | null | undefined;
|
|
20
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
21
|
+
export interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
|
|
22
|
+
/** Render as the child element (e.g. a link) with badge styling. */
|
|
23
|
+
asChild?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare function Badge({ className, variant, size, shape, asChild, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export { badgeVariants };
|
|
27
|
+
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/components/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,aAAa;;;;8EA+BlB,CAAC;AAEF,MAAM,WAAW,UACf,SACE,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EACrC,YAAY,CAAC,OAAO,aAAa,CAAC;IACpC,oEAAoE;IACpE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,KAAK,CAAC,EACpB,SAAS,EACT,OAAO,EACP,IAAI,EACJ,KAAK,EACL,OAAe,EACf,GAAG,KAAK,EACT,EAAE,UAAU,2CAQZ;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { cn } from "../lib/utils.js";
|
|
5
|
+
/**
|
|
6
|
+
* Badge — per design.md §10
|
|
7
|
+
* Small uppercase pills used as status markers. Always paired with text
|
|
8
|
+
* (and optionally an icon) so they are NOT color-only signals.
|
|
9
|
+
*
|
|
10
|
+
* Sizes:
|
|
11
|
+
* - xs (default): 20px tall, 6px horizontal padding
|
|
12
|
+
* - sm: 24px tall, 8px horizontal padding
|
|
13
|
+
*
|
|
14
|
+
* Shape:
|
|
15
|
+
* - rounded-sm (default): square-ish for inline cell badges
|
|
16
|
+
* - rounded-full: pill, reserved for game status (see StatusPill)
|
|
17
|
+
*/
|
|
18
|
+
const badgeVariants = cva("inline-flex items-center gap-1 font-medium uppercase tracking-[0.04em] whitespace-nowrap", {
|
|
19
|
+
variants: {
|
|
20
|
+
variant: {
|
|
21
|
+
neutral: "bg-bg-muted text-foreground",
|
|
22
|
+
outline: "border border-border-strong bg-transparent text-foreground",
|
|
23
|
+
forest: "bg-brand-forest text-brand-forest-foreground",
|
|
24
|
+
lime: "bg-brand-lime text-brand-lime-foreground",
|
|
25
|
+
success: "bg-success text-success-foreground",
|
|
26
|
+
warning: "bg-warning text-warning-foreground",
|
|
27
|
+
danger: "bg-danger text-danger-foreground",
|
|
28
|
+
info: "bg-info text-info-foreground",
|
|
29
|
+
"muted-outline": "border border-border-strong bg-transparent text-text-muted",
|
|
30
|
+
},
|
|
31
|
+
size: {
|
|
32
|
+
xs: "h-5 px-1.5 text-[10px] leading-none",
|
|
33
|
+
sm: "h-6 px-2 text-xs leading-none",
|
|
34
|
+
},
|
|
35
|
+
shape: {
|
|
36
|
+
square: "rounded-sm",
|
|
37
|
+
pill: "rounded-full",
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
defaultVariants: {
|
|
41
|
+
variant: "neutral",
|
|
42
|
+
size: "xs",
|
|
43
|
+
shape: "square",
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
export function Badge({ className, variant, size, shape, asChild = false, ...props }) {
|
|
47
|
+
const Comp = asChild ? Slot : "span";
|
|
48
|
+
return (_jsx(Comp, { className: cn(badgeVariants({ variant, size, shape }), className), ...props }));
|
|
49
|
+
}
|
|
50
|
+
export { badgeVariants };
|
|
51
|
+
//# sourceMappingURL=badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.js","sourceRoot":"","sources":["../../src/components/badge.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;;;;;;;;;;;GAYG;AACH,MAAM,aAAa,GAAG,GAAG,CACvB,0FAA0F,EAC1F;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,6BAA6B;YACtC,OAAO,EAAE,4DAA4D;YACrE,MAAM,EAAE,8CAA8C;YACtD,IAAI,EAAE,0CAA0C;YAChD,OAAO,EAAE,oCAAoC;YAC7C,OAAO,EAAE,oCAAoC;YAC7C,MAAM,EAAE,kCAAkC;YAC1C,IAAI,EAAE,8BAA8B;YACpC,eAAe,EACb,4DAA4D;SAC/D;QACD,IAAI,EAAE;YACJ,EAAE,EAAE,qCAAqC;YACzC,EAAE,EAAE,+BAA+B;SACpC;QACD,KAAK,EAAE;YACL,MAAM,EAAE,YAAY;YACpB,IAAI,EAAE,cAAc;SACrB;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,QAAQ;KAChB;CACF,CACF,CAAC;AAUF,MAAM,UAAU,KAAK,CAAC,EACpB,SAAS,EACT,OAAO,EACP,IAAI,EACJ,KAAK,EACL,OAAO,GAAG,KAAK,EACf,GAAG,KAAK,EACG;IACX,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;IACrC,OAAO,CACL,KAAC,IAAI,IACH,SAAS,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,SAAS,CAAC,KAC7D,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumb.js","sourceRoot":"","sources":["../../src/components/breadcrumb.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAGxC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,cACE,GAAG,EAAE,GAAG,gBACG,YAAY,EACvB,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,KAC/B,KAAK,GACT,CACH,CAAC,CAAC;AACH,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC;AAEtC,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAG5C,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,aACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,qDAAqD,EACrD,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC,CAAC;AACH,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC;AAE9C,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAG5C,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,aACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,kCAAkC,EAAE,SAAS,CAAC,KACxD,KAAK,GACT,CACH,CAAC,CAAC;AACH,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC;AAM9C,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAG5C,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC1C,MAAM,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAsB,CAAC;IACzD,OAAO,CACL,KAAC,IAAI,IACH,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,yDAAyD,EACzD,oFAAoF,EACpF,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AACH,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC;AAE9C,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAG5C,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,eACE,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,MAAM,mBACG,MAAM,kBACP,MAAM,EACnB,SAAS,EAAE,EAAE,CAAC,6BAA6B,EAAE,SAAS,CAAC,KACnD,KAAK,GACT,CACH,CAAC,CAAC;AACH,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC;AAE9C,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,CAAC,UAAU,CAGjD,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAC5C,aACE,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,cAAc,iBACP,MAAM,EAClB,SAAS,EAAE,EAAE,CACX,0DAA0D,EAC1D,SAAS,CACV,KACG,KAAK,YAER,QAAQ,IAAI,KAAC,YAAY,IAAC,WAAW,EAAE,IAAI,GAAI,GAC7C,CACN,CAAC,CAAC;AACH,mBAAmB,CAAC,WAAW,GAAG,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
/**
|
|
4
|
+
* Button — per design.md §10
|
|
5
|
+
*
|
|
6
|
+
* Variants:
|
|
7
|
+
* - accent The single loudest CTA on the screen (Book, Pay, Go Live). Lime, black text.
|
|
8
|
+
* - primary Default primary action. Forest, white text.
|
|
9
|
+
* - secondary Outline button. Cancel, alt actions.
|
|
10
|
+
* - ghost Toolbar / table row actions.
|
|
11
|
+
* - destructive Cancel game, refund, delete.
|
|
12
|
+
* - link In-flow inline link button.
|
|
13
|
+
*
|
|
14
|
+
* Sizes: xs (24px) · sm (28px) · default (32px) · lg (36px) · icon (32px
|
|
15
|
+
* square) · touch (44px — prominent mobile CTAs)
|
|
16
|
+
*
|
|
17
|
+
* Accessibility:
|
|
18
|
+
* - Visible focus ring (2px theme ring color) via :focus-visible
|
|
19
|
+
* - On touch devices (pointer: coarse) every size grows to a 44px
|
|
20
|
+
* minimum hit target; visual density is preserved on desktop
|
|
21
|
+
* - Disabled state has aria-friendly opacity drop; not interactive
|
|
22
|
+
* - Icon-only buttons require aria-label
|
|
23
|
+
*/
|
|
24
|
+
declare const buttonVariants: (props?: ({
|
|
25
|
+
variant?: "accent" | "primary" | "secondary" | "ghost" | "destructive" | "link" | null | undefined;
|
|
26
|
+
size?: "xs" | "sm" | "default" | "lg" | "icon" | "touch" | null | undefined;
|
|
27
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
28
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
29
|
+
asChild?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
32
|
+
export { buttonVariants };
|
|
33
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,QAAA,MAAM,cAAc;;;8EA8BnB,CAAC;AAEF,MAAM,WAAW,WACf,SACE,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAC7C,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,MAAM,uFAYlB,CAAC;AAGF,OAAO,EAAE,cAAc,EAAE,CAAC"}
|