@dashforge/tw 0.1.0-beta → 0.2.0-beta

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.
Files changed (185) hide show
  1. package/CHANGELOG.md +108 -0
  2. package/dist/index.d.ts +1 -82
  3. package/dist/index.esm.js +1563 -2
  4. package/dist/src/components/AspectRatio/AspectRatio.d.ts +36 -0
  5. package/dist/src/components/AspectRatio/AspectRatio.d.ts.map +1 -0
  6. package/dist/src/components/AspectRatio/aspectRatio.types.d.ts +50 -0
  7. package/dist/src/components/AspectRatio/aspectRatio.types.d.ts.map +1 -0
  8. package/dist/src/components/Box/Box.d.ts +36 -0
  9. package/dist/src/components/Box/Box.d.ts.map +1 -0
  10. package/dist/src/components/Box/box.types.d.ts +54 -0
  11. package/dist/src/components/Box/box.types.d.ts.map +1 -0
  12. package/dist/src/components/Box/box.variants.d.ts +402 -0
  13. package/dist/src/components/Box/box.variants.d.ts.map +1 -0
  14. package/dist/src/components/Container/Container.d.ts +35 -0
  15. package/dist/src/components/Container/Container.d.ts.map +1 -0
  16. package/dist/src/components/Container/container.types.d.ts +41 -0
  17. package/dist/src/components/Container/container.types.d.ts.map +1 -0
  18. package/dist/src/components/Container/container.variants.d.ts +93 -0
  19. package/dist/src/components/Container/container.variants.d.ts.map +1 -0
  20. package/dist/src/components/Divider/Divider.d.ts +50 -0
  21. package/dist/src/components/Divider/Divider.d.ts.map +1 -0
  22. package/dist/src/components/Divider/divider.types.d.ts +47 -0
  23. package/dist/src/components/Divider/divider.types.d.ts.map +1 -0
  24. package/dist/src/components/Divider/divider.variants.d.ts +129 -0
  25. package/dist/src/components/Divider/divider.variants.d.ts.map +1 -0
  26. package/dist/src/components/Grid/Grid.d.ts +32 -0
  27. package/dist/src/components/Grid/Grid.d.ts.map +1 -0
  28. package/dist/src/components/Grid/grid.types.d.ts +103 -0
  29. package/dist/src/components/Grid/grid.types.d.ts.map +1 -0
  30. package/dist/src/components/Grid/grid.variants.d.ts +453 -0
  31. package/dist/src/components/Grid/grid.variants.d.ts.map +1 -0
  32. package/dist/src/components/Stack/Stack.d.ts +24 -0
  33. package/dist/src/components/Stack/Stack.d.ts.map +1 -0
  34. package/dist/src/components/Stack/stack.types.d.ts +61 -0
  35. package/dist/src/components/Stack/stack.types.d.ts.map +1 -0
  36. package/dist/src/components/Stack/stack.variants.d.ts +163 -0
  37. package/dist/src/components/Stack/stack.variants.d.ts.map +1 -0
  38. package/dist/src/components/Typography/Typography.d.ts +42 -0
  39. package/dist/src/components/Typography/Typography.d.ts.map +1 -0
  40. package/dist/src/components/Typography/typography.types.d.ts +61 -0
  41. package/dist/src/components/Typography/typography.types.d.ts.map +1 -0
  42. package/dist/src/components/Typography/typography.variants.d.ts +167 -0
  43. package/dist/src/components/Typography/typography.variants.d.ts.map +1 -0
  44. package/dist/src/components/VisuallyHidden/VisuallyHidden.d.ts +42 -0
  45. package/dist/src/components/VisuallyHidden/VisuallyHidden.d.ts.map +1 -0
  46. package/dist/src/components/VisuallyHidden/visuallyHidden.types.d.ts +42 -0
  47. package/dist/src/components/VisuallyHidden/visuallyHidden.types.d.ts.map +1 -0
  48. package/dist/src/index.d.ts +22 -0
  49. package/dist/src/index.d.ts.map +1 -1
  50. package/package.json +3 -3
  51. package/src/components/AspectRatio/AspectRatio.test.tsx +173 -0
  52. package/src/components/AspectRatio/AspectRatio.tsx +73 -0
  53. package/src/components/AspectRatio/aspectRatio.types.ts +54 -0
  54. package/src/components/Box/Box.test.tsx +349 -0
  55. package/src/components/Box/Box.tsx +83 -0
  56. package/src/components/Box/box.types.ts +61 -0
  57. package/src/components/Box/box.variants.ts +211 -0
  58. package/src/components/Container/Container.test.tsx +209 -0
  59. package/src/components/Container/Container.tsx +74 -0
  60. package/src/components/Container/container.types.ts +45 -0
  61. package/src/components/Container/container.variants.ts +81 -0
  62. package/src/components/Divider/Divider.test.tsx +241 -0
  63. package/src/components/Divider/Divider.tsx +140 -0
  64. package/src/components/Divider/divider.types.ts +52 -0
  65. package/src/components/Divider/divider.variants.ts +115 -0
  66. package/src/components/Grid/Grid.test.tsx +321 -0
  67. package/src/components/Grid/Grid.tsx +148 -0
  68. package/src/components/Grid/grid.types.ts +112 -0
  69. package/src/components/Grid/grid.variants.ts +133 -0
  70. package/src/components/Stack/Stack.test.tsx +309 -0
  71. package/src/components/Stack/Stack.tsx +115 -0
  72. package/src/components/Stack/stack.types.ts +68 -0
  73. package/src/components/Stack/stack.variants.ts +80 -0
  74. package/src/components/Typography/Typography.test.tsx +230 -0
  75. package/src/components/Typography/Typography.tsx +112 -0
  76. package/src/components/Typography/typography.types.ts +65 -0
  77. package/src/components/Typography/typography.variants.ts +113 -0
  78. package/src/components/VisuallyHidden/VisuallyHidden.test.tsx +86 -0
  79. package/src/components/VisuallyHidden/VisuallyHidden.tsx +59 -0
  80. package/src/components/VisuallyHidden/visuallyHidden.types.ts +45 -0
  81. package/src/index.ts +49 -0
  82. package/dist/components/AppShell/AppShell.d.ts +0 -32
  83. package/dist/components/AppShell/AppShell.d.ts.map +0 -1
  84. package/dist/components/AppShell/appShell.types.d.ts +0 -62
  85. package/dist/components/AppShell/appShell.types.d.ts.map +0 -1
  86. package/dist/components/AppShell/appShell.variants.d.ts +0 -65
  87. package/dist/components/AppShell/appShell.variants.d.ts.map +0 -1
  88. package/dist/components/Autocomplete/Autocomplete.d.ts +0 -32
  89. package/dist/components/Autocomplete/Autocomplete.d.ts.map +0 -1
  90. package/dist/components/Autocomplete/autocomplete.types.d.ts +0 -214
  91. package/dist/components/Autocomplete/autocomplete.types.d.ts.map +0 -1
  92. package/dist/components/Autocomplete/autocomplete.variants.d.ts +0 -214
  93. package/dist/components/Autocomplete/autocomplete.variants.d.ts.map +0 -1
  94. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +0 -23
  95. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts.map +0 -1
  96. package/dist/components/Breadcrumbs/breadcrumbs.types.d.ts +0 -98
  97. package/dist/components/Breadcrumbs/breadcrumbs.types.d.ts.map +0 -1
  98. package/dist/components/Breadcrumbs/breadcrumbs.variants.d.ts +0 -85
  99. package/dist/components/Breadcrumbs/breadcrumbs.variants.d.ts.map +0 -1
  100. package/dist/components/Button/Button.d.ts +0 -44
  101. package/dist/components/Button/Button.d.ts.map +0 -1
  102. package/dist/components/Button/button.types.d.ts +0 -66
  103. package/dist/components/Button/button.types.d.ts.map +0 -1
  104. package/dist/components/Button/button.variants.d.ts +0 -104
  105. package/dist/components/Button/button.variants.d.ts.map +0 -1
  106. package/dist/components/Checkbox/Checkbox.d.ts +0 -31
  107. package/dist/components/Checkbox/Checkbox.d.ts.map +0 -1
  108. package/dist/components/Checkbox/checkbox.types.d.ts +0 -86
  109. package/dist/components/Checkbox/checkbox.types.d.ts.map +0 -1
  110. package/dist/components/Checkbox/checkbox.variants.d.ts +0 -109
  111. package/dist/components/Checkbox/checkbox.variants.d.ts.map +0 -1
  112. package/dist/components/ConfirmDialog/ConfirmDialog.d.ts +0 -38
  113. package/dist/components/ConfirmDialog/ConfirmDialog.d.ts.map +0 -1
  114. package/dist/components/ConfirmDialog/confirmDialog.types.d.ts +0 -80
  115. package/dist/components/ConfirmDialog/confirmDialog.types.d.ts.map +0 -1
  116. package/dist/components/ConfirmDialog/confirmDialog.variants.d.ts +0 -90
  117. package/dist/components/ConfirmDialog/confirmDialog.variants.d.ts.map +0 -1
  118. package/dist/components/DateTimePicker/DateTimePicker.d.ts +0 -49
  119. package/dist/components/DateTimePicker/DateTimePicker.d.ts.map +0 -1
  120. package/dist/components/DateTimePicker/dateTimePicker.types.d.ts +0 -95
  121. package/dist/components/DateTimePicker/dateTimePicker.types.d.ts.map +0 -1
  122. package/dist/components/DateTimePicker/dateTimePicker.variants.d.ts +0 -165
  123. package/dist/components/DateTimePicker/dateTimePicker.variants.d.ts.map +0 -1
  124. package/dist/components/LeftNav/LeftNav.d.ts +0 -34
  125. package/dist/components/LeftNav/LeftNav.d.ts.map +0 -1
  126. package/dist/components/LeftNav/leftNav.types.d.ts +0 -136
  127. package/dist/components/LeftNav/leftNav.types.d.ts.map +0 -1
  128. package/dist/components/LeftNav/leftNav.variants.d.ts +0 -143
  129. package/dist/components/LeftNav/leftNav.variants.d.ts.map +0 -1
  130. package/dist/components/NumberField/NumberField.d.ts +0 -18
  131. package/dist/components/NumberField/NumberField.d.ts.map +0 -1
  132. package/dist/components/NumberField/numberField.types.d.ts +0 -79
  133. package/dist/components/NumberField/numberField.types.d.ts.map +0 -1
  134. package/dist/components/NumberField/numberField.variants.d.ts +0 -169
  135. package/dist/components/NumberField/numberField.variants.d.ts.map +0 -1
  136. package/dist/components/OTPField/OTPField.d.ts +0 -25
  137. package/dist/components/OTPField/OTPField.d.ts.map +0 -1
  138. package/dist/components/OTPField/otpField.types.d.ts +0 -74
  139. package/dist/components/OTPField/otpField.types.d.ts.map +0 -1
  140. package/dist/components/OTPField/otpField.variants.d.ts +0 -105
  141. package/dist/components/OTPField/otpField.variants.d.ts.map +0 -1
  142. package/dist/components/RadioGroup/RadioGroup.d.ts +0 -35
  143. package/dist/components/RadioGroup/RadioGroup.d.ts.map +0 -1
  144. package/dist/components/RadioGroup/radioGroup.types.d.ts +0 -103
  145. package/dist/components/RadioGroup/radioGroup.types.d.ts.map +0 -1
  146. package/dist/components/RadioGroup/radioGroup.variants.d.ts +0 -166
  147. package/dist/components/RadioGroup/radioGroup.variants.d.ts.map +0 -1
  148. package/dist/components/Snackbar/Snackbar.d.ts +0 -37
  149. package/dist/components/Snackbar/Snackbar.d.ts.map +0 -1
  150. package/dist/components/Snackbar/snackbar.types.d.ts +0 -86
  151. package/dist/components/Snackbar/snackbar.types.d.ts.map +0 -1
  152. package/dist/components/Snackbar/snackbar.variants.d.ts +0 -153
  153. package/dist/components/Snackbar/snackbar.variants.d.ts.map +0 -1
  154. package/dist/components/Switch/Switch.d.ts +0 -15
  155. package/dist/components/Switch/Switch.d.ts.map +0 -1
  156. package/dist/components/Switch/switch.types.d.ts +0 -47
  157. package/dist/components/Switch/switch.types.d.ts.map +0 -1
  158. package/dist/components/Switch/switch.variants.d.ts +0 -105
  159. package/dist/components/Switch/switch.variants.d.ts.map +0 -1
  160. package/dist/components/TextField/TextField.d.ts +0 -25
  161. package/dist/components/TextField/TextField.d.ts.map +0 -1
  162. package/dist/components/TextField/textField.types.d.ts +0 -72
  163. package/dist/components/TextField/textField.types.d.ts.map +0 -1
  164. package/dist/components/TextField/textField.variants.d.ts +0 -160
  165. package/dist/components/TextField/textField.variants.d.ts.map +0 -1
  166. package/dist/components/Textarea/Textarea.d.ts +0 -16
  167. package/dist/components/Textarea/Textarea.d.ts.map +0 -1
  168. package/dist/components/Textarea/textarea.types.d.ts +0 -63
  169. package/dist/components/Textarea/textarea.types.d.ts.map +0 -1
  170. package/dist/components/Textarea/textarea.variants.d.ts +0 -197
  171. package/dist/components/Textarea/textarea.variants.d.ts.map +0 -1
  172. package/dist/components/TopBar/TopBar.d.ts +0 -33
  173. package/dist/components/TopBar/TopBar.d.ts.map +0 -1
  174. package/dist/components/TopBar/topBar.types.d.ts +0 -49
  175. package/dist/components/TopBar/topBar.types.d.ts.map +0 -1
  176. package/dist/components/TopBar/topBar.variants.d.ts +0 -79
  177. package/dist/components/TopBar/topBar.variants.d.ts.map +0 -1
  178. package/dist/components/_shared/resolveValidationState.d.ts +0 -42
  179. package/dist/components/_shared/resolveValidationState.d.ts.map +0 -1
  180. package/dist/hooks/useAccessState.d.ts +0 -37
  181. package/dist/hooks/useAccessState.d.ts.map +0 -1
  182. package/dist/index.d.ts.map +0 -1
  183. package/dist/tsconfig.lib.tsbuildinfo +0 -1
  184. package/dist/utils/cn.d.ts +0 -26
  185. package/dist/utils/cn.d.ts.map +0 -1
@@ -0,0 +1,93 @@
1
+ import { type VariantProps } from 'tailwind-variants';
2
+ /**
3
+ * `containerVariants` — centered max-width wrapper for page layouts.
4
+ *
5
+ * Architectural role:
6
+ *
7
+ * Every web app has the same pattern at the page-root level: a div
8
+ * that's `mx-auto`, capped at some `max-w-*`, with responsive
9
+ * horizontal padding. Without Container, every page rewrites:
10
+ *
11
+ * <div className="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
12
+ *
13
+ * Container collapses that into one typed prop set, with size names
14
+ * that mirror Tailwind's breakpoint vocabulary so the muscle memory
15
+ * carries over (`size="lg"` ↔ `max-w-screen-lg`).
16
+ *
17
+ * Size axis — maps to Tailwind's `max-w-screen-*` aliases:
18
+ * • sm → max-w-screen-sm (640px)
19
+ * • md → max-w-screen-md (768px)
20
+ * • lg → max-w-screen-lg (1024px) — most common doc/content cap
21
+ * • xl → max-w-screen-xl (1280px) — default; comfortable for full apps
22
+ * • 2xl → max-w-screen-2xl (1536px) — wide dashboards
23
+ * • fluid → no max-width at all (full bleed, padding still applies)
24
+ *
25
+ * Padding axis (`px`):
26
+ * • true (default) — responsive horizontal padding (px-4 sm:px-6 lg:px-8)
27
+ * The canonical Tailwind responsive padding ramp. Designed to keep
28
+ * edges from kissing the viewport on mobile and breathing more on
29
+ * larger screens.
30
+ * • false — no padding. Use when the consumer wants full bleed AND
31
+ * handles edge padding inside (e.g. a hero section with its own
32
+ * internal spacing scale).
33
+ *
34
+ * Center content axis (`centerContent`):
35
+ * • true — turns the Container into a flex column with items-center
36
+ * so the page content stacks centered horizontally. Common for
37
+ * marketing pages, sign-in flows, "single artifact" layouts.
38
+ * • false (default) — children flow normally (block stacking).
39
+ */
40
+ export declare const containerVariants: import("tailwind-variants").TVReturnType<{
41
+ size: {
42
+ sm: string;
43
+ md: string;
44
+ lg: string;
45
+ xl: string;
46
+ '2xl': string;
47
+ fluid: string;
48
+ };
49
+ px: {
50
+ true: string;
51
+ false: string;
52
+ };
53
+ centerContent: {
54
+ true: string;
55
+ false: string;
56
+ };
57
+ }, undefined, "mx-auto w-full", {
58
+ size: {
59
+ sm: string;
60
+ md: string;
61
+ lg: string;
62
+ xl: string;
63
+ '2xl': string;
64
+ fluid: string;
65
+ };
66
+ px: {
67
+ true: string;
68
+ false: string;
69
+ };
70
+ centerContent: {
71
+ true: string;
72
+ false: string;
73
+ };
74
+ }, undefined, import("tailwind-variants").TVReturnType<{
75
+ size: {
76
+ sm: string;
77
+ md: string;
78
+ lg: string;
79
+ xl: string;
80
+ '2xl': string;
81
+ fluid: string;
82
+ };
83
+ px: {
84
+ true: string;
85
+ false: string;
86
+ };
87
+ centerContent: {
88
+ true: string;
89
+ false: string;
90
+ };
91
+ }, undefined, "mx-auto w-full", unknown, unknown, undefined>>;
92
+ export type ContainerVariants = VariantProps<typeof containerVariants>;
93
+ //# sourceMappingURL=container.variants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container.variants.d.ts","sourceRoot":"","sources":["../../../../src/components/Container/container.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6DAsC5B,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -0,0 +1,50 @@
1
+ import type { DividerProps } from './divider.types.js';
2
+ /**
3
+ * `<Divider>` — visual separator. Two modes:
4
+ *
5
+ * 1. Line-only (no children):
6
+ *
7
+ * <Divider />
8
+ * → <hr role="separator" aria-orientation="horizontal" />
9
+ *
10
+ * Renders a single horizontal line via `border-t-*` on an `<hr>`
11
+ * (which by default has no `display`, no margin in our reset, just
12
+ * acts as the border carrier).
13
+ *
14
+ * 2. Labeled (with children):
15
+ *
16
+ * <Divider><Typography variant="overline">OR</Typography></Divider>
17
+ * → <div role="separator" aria-orientation="horizontal">
18
+ * <span aria-hidden className="flex-1 border-t" />
19
+ * <span className="px-3">OR</span>
20
+ * <span aria-hidden className="flex-1 border-t" />
21
+ * </div>
22
+ *
23
+ * Two line segments share the available space; the label sits
24
+ * between them with horizontal padding for breathing room. Each
25
+ * line segment is `aria-hidden` (the role="separator" on the root
26
+ * conveys the separator semantics — duplicating it would confuse
27
+ * screen readers).
28
+ *
29
+ * Alignment:
30
+ * • align="start" → label hugs the left, right segment grows
31
+ * • align="center" (default) → both segments equal
32
+ * • align="end" → label hugs the right, left segment grows
33
+ *
34
+ * Implemented by setting `flex-basis: 0` to either segment to keep
35
+ * it minimal. We use `basis-[2rem]` (32px short stub) rather than
36
+ * `basis-0` so a tiny line still hints at the divider on the squashed
37
+ * side — pure flex-1 vs basis-0 would collapse it invisibly.
38
+ *
39
+ * Vertical orientation:
40
+ * The line orientation flips (border-l instead of border-t). Vertical
41
+ * labeled dividers are RARE in practice — supported for parity but
42
+ * the typical use is line-only between flex row items.
43
+ *
44
+ * a11y:
45
+ * • Root element gets `role="separator"` (or implicit via `<hr>`)
46
+ * • `aria-orientation` is set explicitly so AT knows the axis
47
+ * • Labeled mode: label has no extra role; the visual layout speaks
48
+ */
49
+ export declare const Divider: import("react").ForwardRefExoticComponent<DividerProps & import("react").RefAttributes<HTMLElement>>;
50
+ //# sourceMappingURL=Divider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../../src/components/Divider/Divider.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,eAAO,MAAM,OAAO,sGAqFnB,CAAC"}
@@ -0,0 +1,47 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ import type { DividerVariants, DividerLineVariants } from './divider.variants.js';
3
+ /**
4
+ * Props for `<Divider>` — visual separator with optional inline label.
5
+ *
6
+ * Two rendering modes:
7
+ * • Line-only (no `children`) — renders an `<hr>` (horizontal) or
8
+ * `<div role="separator">` (vertical).
9
+ * • Labeled (with `children`) — renders a flex row: two line
10
+ * segments around the centered label.
11
+ * Canonical "OR" separator pattern.
12
+ *
13
+ * The user passes ONE consistent prop set; the implementation chooses
14
+ * the mode based on whether `children` is provided.
15
+ */
16
+ export interface DividerProps extends Omit<HTMLAttributes<HTMLElement>, 'className' | 'color' | 'children'>, Pick<DividerVariants, 'orientation' | 'align'>, Pick<DividerLineVariants, 'variant' | 'color'> {
17
+ /**
18
+ * Optional inline label. When present, the divider switches from
19
+ * "single line" to "two segments + label" layout — the canonical
20
+ * "OR" separator pattern between sign-in methods, section titled
21
+ * separators, etc.
22
+ *
23
+ * Accepts any node (string, Typography element, Stack with icon,
24
+ * etc.). Recommended: `<Typography variant="overline">OR</Typography>`
25
+ * for short uppercase labels.
26
+ */
27
+ children?: ReactNode;
28
+ /**
29
+ * In a flex Stack `direction="row"`, a `<Divider orientation="vertical">`
30
+ * with `flexItem` stretches to the row's cross-axis height (via
31
+ * `self-stretch`). Without it, vertical dividers may collapse to
32
+ * 0 height because there's nothing to anchor them.
33
+ *
34
+ * Implementation note: `self-stretch` is already applied on the
35
+ * vertical line segment by default in the TV — this prop is a
36
+ * no-op for now, kept for API parity with MUI's same flag (and as
37
+ * a forward-compatibility hook if we ever change the default).
38
+ */
39
+ flexItem?: boolean;
40
+ /**
41
+ * Utility classes appended to the variant chain. Resolved via
42
+ * `tailwind-merge`. Useful for one-off margin (`sx="my-8"`) or
43
+ * a custom border weight (`sx="border-t-2"`).
44
+ */
45
+ sx?: string;
46
+ }
47
+ //# sourceMappingURL=divider.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"divider.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Divider/divider.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAElF;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,YACf,SAAQ,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,GAAG,OAAO,GAAG,UAAU,CAAC,EACrE,IAAI,CAAC,eAAe,EAAE,aAAa,GAAG,OAAO,CAAC,EAC9C,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,OAAO,CAAC;IACtD;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;OAIG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;CACb"}
@@ -0,0 +1,129 @@
1
+ import { type VariantProps } from 'tailwind-variants';
2
+ /**
3
+ * `dividerVariants` — visual separator with two rendering modes (line-only
4
+ * vs labeled). Two interconnected TV recipes:
5
+ *
6
+ * • `dividerVariants` — root container (block layout, alignment)
7
+ * • `dividerLineVariants` — the actual line segments (border style,
8
+ * color, orientation)
9
+ *
10
+ * Two recipes (not one with slots) because the labeled mode renders
11
+ * THREE elements (left line · label · right line) while the line-only
12
+ * mode is ONE element. Splitting keeps each TV catalogue small and
13
+ * the type unions narrow.
14
+ *
15
+ * Mental model:
16
+ * • Without `children` → renders an `<hr>` (or a div if vertical)
17
+ * with the line styles applied directly.
18
+ * • With `children` → renders a flex row with two `<span>` line
19
+ * segments either side of the label. The label's flex-shrink keeps
20
+ * it from being squashed; the line segments share the remaining
21
+ * space according to `align`.
22
+ *
23
+ * a11y: the root always carries `role="separator"` + `aria-orientation`
24
+ * — handled in Divider.tsx, not in TV (it's a prop, not a class).
25
+ */
26
+ export declare const dividerVariants: import("tailwind-variants").TVReturnType<{
27
+ orientation: {
28
+ horizontal: string;
29
+ vertical: string;
30
+ };
31
+ align: {
32
+ start: string;
33
+ center: string;
34
+ end: string;
35
+ };
36
+ }, undefined, "flex items-center", {
37
+ orientation: {
38
+ horizontal: string;
39
+ vertical: string;
40
+ };
41
+ align: {
42
+ start: string;
43
+ center: string;
44
+ end: string;
45
+ };
46
+ }, undefined, import("tailwind-variants").TVReturnType<{
47
+ orientation: {
48
+ horizontal: string;
49
+ vertical: string;
50
+ };
51
+ align: {
52
+ start: string;
53
+ center: string;
54
+ end: string;
55
+ };
56
+ }, undefined, "flex items-center", unknown, unknown, undefined>>;
57
+ export type DividerVariants = VariantProps<typeof dividerVariants>;
58
+ export declare const dividerLineVariants: import("tailwind-variants").TVReturnType<{
59
+ orientation: {
60
+ horizontal: string;
61
+ vertical: string;
62
+ };
63
+ variant: {
64
+ solid: string;
65
+ dashed: string;
66
+ dotted: string;
67
+ };
68
+ color: {
69
+ neutral: string;
70
+ primary: string;
71
+ secondary: string;
72
+ success: string;
73
+ warning: string;
74
+ danger: string;
75
+ info: string;
76
+ };
77
+ segment: {
78
+ full: string;
79
+ grow: string;
80
+ };
81
+ }, undefined, "", {
82
+ orientation: {
83
+ horizontal: string;
84
+ vertical: string;
85
+ };
86
+ variant: {
87
+ solid: string;
88
+ dashed: string;
89
+ dotted: string;
90
+ };
91
+ color: {
92
+ neutral: string;
93
+ primary: string;
94
+ secondary: string;
95
+ success: string;
96
+ warning: string;
97
+ danger: string;
98
+ info: string;
99
+ };
100
+ segment: {
101
+ full: string;
102
+ grow: string;
103
+ };
104
+ }, undefined, import("tailwind-variants").TVReturnType<{
105
+ orientation: {
106
+ horizontal: string;
107
+ vertical: string;
108
+ };
109
+ variant: {
110
+ solid: string;
111
+ dashed: string;
112
+ dotted: string;
113
+ };
114
+ color: {
115
+ neutral: string;
116
+ primary: string;
117
+ secondary: string;
118
+ success: string;
119
+ warning: string;
120
+ danger: string;
121
+ info: string;
122
+ };
123
+ segment: {
124
+ full: string;
125
+ grow: string;
126
+ };
127
+ }, undefined, "", unknown, unknown, undefined>>;
128
+ export type DividerLineVariants = VariantProps<typeof dividerLineVariants>;
129
+ //# sourceMappingURL=divider.variants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"divider.variants.d.ts","sourceRoot":"","sources":["../../../../src/components/Divider/divider.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gEA0B1B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC;AAYnE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+CAyC9B,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
@@ -0,0 +1,32 @@
1
+ import type { GridProps } from './grid.types.js';
2
+ /**
3
+ * `<Grid>` — CSS Grid container + item, polymorphic in role.
4
+ *
5
+ * API surface mirrors MUI Grid v2:
6
+ * • <Grid container spacing={4} cols={12}> ← container
7
+ * • <Grid xs={12} md={6}> ← item
8
+ *
9
+ * Engine is REAL CSS Grid (not flexbox, unlike MUI v2 internals).
10
+ * Benefits over flexbox-based implementation:
11
+ * • Native `gap` (no negative-margin tricks)
12
+ * • `col-span-N` maps directly to `grid-column: span N`
13
+ * • Vertical alignment without manual `align-items` per item
14
+ * • Auto-flow for dense packing without DOM gymnastics
15
+ *
16
+ * TypeScript discriminated union (see grid.types.ts) makes mixing
17
+ * impossible: `<Grid container xs={6}>` won't compile. Same for the
18
+ * inverse. IntelliSense filters by role.
19
+ *
20
+ * Defaults at the component level (not at the TV level — see the
21
+ * variants file for the rationale):
22
+ * • container: cols defaults to 12 (MUI convention)
23
+ * • item: xs defaults to 'full' so a forgotten prop doesn't
24
+ * collapse the cell to 1/12th of a row
25
+ *
26
+ * `asChild` on a CONTAINER is technically allowed but rarely useful:
27
+ * `display:grid` only applies to direct children, so the slotted
28
+ * element has to already be a viable container parent. Use sparingly;
29
+ * test asserts the wrapping still emits the right class chain.
30
+ */
31
+ export declare const Grid: import("react").ForwardRefExoticComponent<GridProps & import("react").RefAttributes<HTMLElement>>;
32
+ //# sourceMappingURL=Grid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../../../src/components/Grid/Grid.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,SAAS,EAKV,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,IAAI,mGAwGhB,CAAC"}
@@ -0,0 +1,103 @@
1
+ import type { ElementType, HTMLAttributes } from 'react';
2
+ /**
3
+ * Grid types — discriminated union for container vs item role.
4
+ *
5
+ * Pattern is MUI v2: a single `<Grid>` component that switches role
6
+ * based on the `container` prop. Container exposes layout axes
7
+ * (cols, spacing, autoFlow). Item exposes per-breakpoint span axes
8
+ * (xs/sm/md/lg/xl).
9
+ *
10
+ * TypeScript-level enforcement (the key win over MUI):
11
+ * • `<Grid container xs={6}>` is a TYPE ERROR — `xs` doesn't exist
12
+ * on the container shape.
13
+ * • `<Grid xs={6} spacing={4}>` is a TYPE ERROR — `spacing` doesn't
14
+ * exist on the item shape.
15
+ * IntelliSense filters suggestions per role, so the developer never
16
+ * sees props that don't apply.
17
+ *
18
+ * Type-only file (no runtime). Lives separate from the variants so the
19
+ * union doesn't widen with the variant catalogue's enum unions.
20
+ */
21
+ /**
22
+ * Valid column-span values for a grid item, at any breakpoint.
23
+ * • 1..12 — explicit span count
24
+ * • 'auto' — content-sized (CSS Grid auto-track)
25
+ * • 'full' — `col-span-full` (spans all columns regardless of count)
26
+ */
27
+ export type ColSpan = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 'auto' | 'full';
28
+ /**
29
+ * Token-scale spacing step. Mirror of Box.p / Stack.gap so the value
30
+ * space across primitives is identical — `<Grid container spacing={4}>`
31
+ * and `<Stack gap={4}>` produce visually equivalent gaps.
32
+ */
33
+ export type GridSpacingStep = 0 | '0.5' | 1 | 2 | 3 | 4 | 6 | 8 | 12 | 16 | 24;
34
+ /**
35
+ * Container-role props. Discriminated on `container: true`.
36
+ *
37
+ * NOTE on `cols`: defaults to 12 in the component implementation
38
+ * (not in TV) — the MUI v2 convention. Override to 6/4/3/2/1 for
39
+ * dense dashboard layouts.
40
+ */
41
+ export interface GridContainerProps {
42
+ /** Discriminator — `true` makes this a grid container. */
43
+ container: true;
44
+ /** Number of columns. Default 12. */
45
+ cols?: 1 | 2 | 3 | 4 | 6 | 12;
46
+ /** Gap between cells. Shorthand for spacingX + spacingY. */
47
+ spacing?: GridSpacingStep;
48
+ /** Horizontal gap override (wins over `spacing`). */
49
+ spacingX?: GridSpacingStep;
50
+ /** Vertical gap override (wins over `spacing`). */
51
+ spacingY?: GridSpacingStep;
52
+ /** `grid-auto-flow` — useful for dense or column-major packing. */
53
+ autoFlow?: 'row' | 'col' | 'dense' | 'row-dense' | 'col-dense';
54
+ }
55
+ /**
56
+ * Item-role props. Discriminated on `container: false | undefined`.
57
+ *
58
+ * Each breakpoint accepts a `ColSpan`. The cascade is Tailwind-native
59
+ * mobile-first: `xs` is the base (no media query), `sm/md/lg/xl`
60
+ * override at the corresponding min-width.
61
+ *
62
+ * Default behaviour when no breakpoint is set: spans `full` — the
63
+ * "comfortable default" so a forgotten prop doesn't collapse the cell
64
+ * to 1/12th of a row.
65
+ */
66
+ export interface GridItemProps {
67
+ /** Discriminator — absent (or `false`) makes this a grid item. */
68
+ container?: false;
69
+ /** Base breakpoint (no media query). Default `'full'`. */
70
+ xs?: ColSpan;
71
+ /** Span at sm breakpoint and up. */
72
+ sm?: ColSpan;
73
+ /** Span at md breakpoint and up. */
74
+ md?: ColSpan;
75
+ /** Span at lg breakpoint and up. */
76
+ lg?: ColSpan;
77
+ /** Span at xl breakpoint and up. */
78
+ xl?: ColSpan;
79
+ }
80
+ /**
81
+ * Common props shared by both roles. Kept in a separate intersection
82
+ * so the discriminated union stays narrow and IntelliSense fast.
83
+ */
84
+ interface GridCommonProps extends Omit<HTMLAttributes<HTMLDivElement>, 'className'> {
85
+ /** Override the rendered HTML tag. Default `'div'`. Ignored under `asChild`. */
86
+ as?: ElementType;
87
+ /**
88
+ * Render via Radix Slot onto the single child. Wins over `as`.
89
+ * Note: container Grids using `asChild` don't make sense for most
90
+ * cases — the Slot pattern collapses our wrapper, but Grid's
91
+ * `display:grid` only applies to direct children, so the child
92
+ * needs to BE a container with the right children.
93
+ */
94
+ asChild?: boolean;
95
+ /** Utility-class override, merged via tailwind-merge. */
96
+ sx?: string;
97
+ }
98
+ /**
99
+ * `<Grid>` props — discriminated union: container OR item, never both.
100
+ */
101
+ export type GridProps = (GridContainerProps | GridItemProps) & GridCommonProps;
102
+ export {};
103
+ //# sourceMappingURL=grid.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grid.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Grid/grid.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEzD;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;GAKG;AACH,MAAM,MAAM,OAAO,GACf,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAChD,MAAM,GACN,MAAM,CAAC;AAEX;;;;GAIG;AACH,MAAM,MAAM,eAAe,GACvB,CAAC,GAAG,KAAK,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAErD;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IACjC,0DAA0D;IAC1D,SAAS,EAAE,IAAI,CAAC;IAChB,qCAAqC;IACrC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;IAC9B,4DAA4D;IAC5D,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,qDAAqD;IACrD,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,mDAAmD;IACnD,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,mEAAmE;IACnE,QAAQ,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,WAAW,GAAG,WAAW,CAAC;CAChE;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,aAAa;IAC5B,kEAAkE;IAClE,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,0DAA0D;IAC1D,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,oCAAoC;IACpC,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,oCAAoC;IACpC,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,oCAAoC;IACpC,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,oCAAoC;IACpC,EAAE,CAAC,EAAE,OAAO,CAAC;CACd;AAED;;;GAGG;AACH,UAAU,eAAgB,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,WAAW,CAAC;IACjF,gFAAgF;IAChF,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,yDAAyD;IACzD,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,kBAAkB,GAAG,aAAa,CAAC,GAAG,eAAe,CAAC"}