@adea-ai/ui 0.117.0 → 0.118.1

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 (193) hide show
  1. package/dist/components/composites/action-button/action-button.d.ts.map +1 -1
  2. package/dist/components/composites/action-button/action-button.js +1 -0
  3. package/dist/components/composites/action-button/action-button.js.map +1 -1
  4. package/dist/components/composites/list-row/list-row-control.d.ts.map +1 -1
  5. package/dist/components/composites/list-row/list-row-control.js +1 -0
  6. package/dist/components/composites/list-row/list-row-control.js.map +1 -1
  7. package/dist/components/composites/list-row/list-row.d.ts.map +1 -1
  8. package/dist/components/composites/list-row/list-row.js +16 -9
  9. package/dist/components/composites/list-row/list-row.js.map +1 -1
  10. package/dist/components/composites/settings/settings-navigation.d.ts.map +1 -1
  11. package/dist/components/composites/settings/settings-navigation.js +15 -6
  12. package/dist/components/composites/settings/settings-navigation.js.map +1 -1
  13. package/dist/components/composites/settings/settings.d.ts +3 -2
  14. package/dist/components/composites/settings/settings.d.ts.map +1 -1
  15. package/dist/components/composites/settings/settings.js +3 -2
  16. package/dist/components/composites/settings/settings.js.map +1 -1
  17. package/dist/components/ui/alert/alert.d.ts +7 -0
  18. package/dist/components/ui/alert/alert.d.ts.map +1 -1
  19. package/dist/components/ui/alert/alert.js +18 -1
  20. package/dist/components/ui/alert/alert.js.map +1 -1
  21. package/dist/components/ui/alert/index.d.ts +1 -1
  22. package/dist/components/ui/alert/index.d.ts.map +1 -1
  23. package/dist/components/ui/alert/index.js +2 -2
  24. package/dist/components/ui/badge/badge.d.ts.map +1 -1
  25. package/dist/components/ui/badge/badge.js +1 -0
  26. package/dist/components/ui/badge/badge.js.map +1 -1
  27. package/dist/components/ui/breadcrumb/breadcrumb.d.ts +6 -0
  28. package/dist/components/ui/breadcrumb/breadcrumb.d.ts.map +1 -1
  29. package/dist/components/ui/breadcrumb/breadcrumb.js +19 -8
  30. package/dist/components/ui/breadcrumb/breadcrumb.js.map +1 -1
  31. package/dist/components/ui/breadcrumb/index.d.ts +1 -1
  32. package/dist/components/ui/breadcrumb/index.d.ts.map +1 -1
  33. package/dist/components/ui/breadcrumb/index.js +2 -2
  34. package/dist/components/ui/button/button.d.ts.map +1 -1
  35. package/dist/components/ui/button/button.js +1 -0
  36. package/dist/components/ui/button/button.js.map +1 -1
  37. package/dist/components/ui/card/card.d.ts +19 -9
  38. package/dist/components/ui/card/card.d.ts.map +1 -1
  39. package/dist/components/ui/card/card.js +21 -3
  40. package/dist/components/ui/card/card.js.map +1 -1
  41. package/dist/components/ui/card/index.d.ts +1 -1
  42. package/dist/components/ui/card/index.d.ts.map +1 -1
  43. package/dist/components/ui/card/index.js +2 -2
  44. package/dist/components/ui/checkbox/checkbox.d.ts.map +1 -1
  45. package/dist/components/ui/checkbox/checkbox.js +1 -0
  46. package/dist/components/ui/checkbox/checkbox.js.map +1 -1
  47. package/dist/components/ui/dialog/dialog.d.ts +15 -0
  48. package/dist/components/ui/dialog/dialog.d.ts.map +1 -1
  49. package/dist/components/ui/dialog/dialog.js +11 -3
  50. package/dist/components/ui/dialog/dialog.js.map +1 -1
  51. package/dist/components/ui/dialog/index.d.ts +1 -1
  52. package/dist/components/ui/dialog/index.d.ts.map +1 -1
  53. package/dist/components/ui/entity-icon/entity-icon.d.ts +10 -0
  54. package/dist/components/ui/entity-icon/entity-icon.d.ts.map +1 -1
  55. package/dist/components/ui/entity-icon/entity-icon.js +11 -2
  56. package/dist/components/ui/entity-icon/entity-icon.js.map +1 -1
  57. package/dist/components/ui/field/field.d.ts +11 -1
  58. package/dist/components/ui/field/field.d.ts.map +1 -1
  59. package/dist/components/ui/field/field.js +2 -2
  60. package/dist/components/ui/field/field.js.map +1 -1
  61. package/dist/components/ui/field/index.d.ts +1 -1
  62. package/dist/components/ui/field/index.d.ts.map +1 -1
  63. package/dist/components/ui/input-group/index.d.ts +1 -1
  64. package/dist/components/ui/input-group/index.d.ts.map +1 -1
  65. package/dist/components/ui/input-group/input-group.d.ts +8 -1
  66. package/dist/components/ui/input-group/input-group.d.ts.map +1 -1
  67. package/dist/components/ui/input-group/input-group.js +16 -20
  68. package/dist/components/ui/input-group/input-group.js.map +1 -1
  69. package/dist/components/ui/native-select/native-select.d.ts +8 -1
  70. package/dist/components/ui/native-select/native-select.d.ts.map +1 -1
  71. package/dist/components/ui/native-select/native-select.js +9 -2
  72. package/dist/components/ui/native-select/native-select.js.map +1 -1
  73. package/dist/components/ui/progress/progress.d.ts.map +1 -1
  74. package/dist/components/ui/progress/progress.js +6 -3
  75. package/dist/components/ui/progress/progress.js.map +1 -1
  76. package/dist/components/ui/radio-group/radio-group.d.ts +18 -3
  77. package/dist/components/ui/radio-group/radio-group.d.ts.map +1 -1
  78. package/dist/components/ui/radio-group/radio-group.js +32 -7
  79. package/dist/components/ui/radio-group/radio-group.js.map +1 -1
  80. package/dist/components/ui/select/select.d.ts.map +1 -1
  81. package/dist/components/ui/select/select.js +10 -7
  82. package/dist/components/ui/select/select.js.map +1 -1
  83. package/dist/components/ui/sheet/sheet.d.ts +1 -0
  84. package/dist/components/ui/sheet/sheet.d.ts.map +1 -1
  85. package/dist/components/ui/sheet/sheet.js +27 -2
  86. package/dist/components/ui/sheet/sheet.js.map +1 -1
  87. package/dist/components/ui/slider/slider.d.ts.map +1 -1
  88. package/dist/components/ui/slider/slider.js +6 -3
  89. package/dist/components/ui/slider/slider.js.map +1 -1
  90. package/dist/components/ui/status-chip/status-chip.d.ts.map +1 -1
  91. package/dist/components/ui/status-chip/status-chip.js +1 -1
  92. package/dist/components/ui/status-chip/status-chip.js.map +1 -1
  93. package/dist/components/ui/switch/switch.d.ts.map +1 -1
  94. package/dist/components/ui/switch/switch.js +1 -0
  95. package/dist/components/ui/switch/switch.js.map +1 -1
  96. package/dist/components/ui/tabs/tabs.d.ts +18 -0
  97. package/dist/components/ui/tabs/tabs.d.ts.map +1 -1
  98. package/dist/components/ui/tabs/tabs.js +22 -4
  99. package/dist/components/ui/tabs/tabs.js.map +1 -1
  100. package/dist/components/ui/toggle/toggle.d.ts.map +1 -1
  101. package/dist/components/ui/toggle/toggle.js +9 -6
  102. package/dist/components/ui/toggle/toggle.js.map +1 -1
  103. package/dist/components/ui/toggle-group/toggle-group.d.ts.map +1 -1
  104. package/dist/components/ui/toggle-group/toggle-group.js +2 -0
  105. package/dist/components/ui/toggle-group/toggle-group.js.map +1 -1
  106. package/dist/components/ui/typography/typography.d.ts +12 -1
  107. package/dist/components/ui/typography/typography.d.ts.map +1 -1
  108. package/dist/components/ui/typography/typography.js +16 -2
  109. package/dist/components/ui/typography/typography.js.map +1 -1
  110. package/dist/index.js +4 -4
  111. package/dist/lib/cn-tables.generated.js +5 -5
  112. package/dist/lib/cn-tables.generated.js.map +1 -1
  113. package/dist/lib/tokens.d.ts.map +1 -1
  114. package/dist/lib/tokens.js +7 -2
  115. package/dist/lib/tokens.js.map +1 -1
  116. package/dist/r/list-row.json +1 -0
  117. package/dist/r/registry.json +1 -0
  118. package/dist/r/src/components/composites/action-button/action-button.tsx +3 -0
  119. package/dist/r/src/components/composites/list-row/list-row-control.tsx +1 -0
  120. package/dist/r/src/components/composites/list-row/list-row.tsx +3 -2
  121. package/dist/r/src/components/composites/settings/settings-navigation.tsx +7 -3
  122. package/dist/r/src/components/composites/settings/settings.tsx +3 -2
  123. package/dist/r/src/components/ui/alert/alert.tsx +17 -0
  124. package/dist/r/src/components/ui/alert/index.ts +8 -1
  125. package/dist/r/src/components/ui/badge/badge.tsx +1 -0
  126. package/dist/r/src/components/ui/breadcrumb/breadcrumb.tsx +18 -8
  127. package/dist/r/src/components/ui/breadcrumb/index.ts +1 -0
  128. package/dist/r/src/components/ui/button/button.tsx +1 -0
  129. package/dist/r/src/components/ui/card/card.tsx +30 -13
  130. package/dist/r/src/components/ui/card/index.ts +1 -0
  131. package/dist/r/src/components/ui/checkbox/checkbox.tsx +1 -0
  132. package/dist/r/src/components/ui/dialog/dialog.tsx +26 -2
  133. package/dist/r/src/components/ui/dialog/index.ts +1 -0
  134. package/dist/r/src/components/ui/entity-icon/entity-icon.tsx +15 -0
  135. package/dist/r/src/components/ui/field/field.tsx +23 -3
  136. package/dist/r/src/components/ui/field/index.ts +1 -0
  137. package/dist/r/src/components/ui/input-group/index.ts +1 -0
  138. package/dist/r/src/components/ui/input-group/input-group.tsx +28 -5
  139. package/dist/r/src/components/ui/native-select/native-select.tsx +20 -3
  140. package/dist/r/src/components/ui/progress/progress.tsx +5 -1
  141. package/dist/r/src/components/ui/radio-group/radio-group.tsx +40 -3
  142. package/dist/r/src/components/ui/select/select.tsx +1 -0
  143. package/dist/r/src/components/ui/sheet/sheet.tsx +20 -2
  144. package/dist/r/src/components/ui/slider/slider.tsx +1 -0
  145. package/dist/r/src/components/ui/status-chip/status-chip.tsx +1 -0
  146. package/dist/r/src/components/ui/switch/switch.tsx +1 -0
  147. package/dist/r/src/components/ui/tabs/tabs.tsx +33 -4
  148. package/dist/r/src/components/ui/toggle/toggle.tsx +1 -0
  149. package/dist/r/src/components/ui/toggle-group/toggle-group.tsx +2 -0
  150. package/dist/r/src/components/ui/typography/typography.tsx +20 -1
  151. package/dist/r/src/lib/cn-tables.generated.ts +5 -5
  152. package/dist/r/src/lib/tokens.ts +7 -2
  153. package/dist/r/src/styles/base.css +4 -1
  154. package/dist/r/src/styles/theme.css +4 -0
  155. package/package.json +1 -1
  156. package/registry.json +1 -0
  157. package/src/components/composites/action-button/action-button.tsx +3 -0
  158. package/src/components/composites/list-row/list-row-control.tsx +1 -0
  159. package/src/components/composites/list-row/list-row.tsx +3 -2
  160. package/src/components/composites/settings/settings-navigation.tsx +7 -3
  161. package/src/components/composites/settings/settings.tsx +3 -2
  162. package/src/components/ui/alert/alert.tsx +17 -0
  163. package/src/components/ui/alert/index.ts +8 -1
  164. package/src/components/ui/badge/badge.tsx +1 -0
  165. package/src/components/ui/breadcrumb/breadcrumb.tsx +18 -8
  166. package/src/components/ui/breadcrumb/index.ts +1 -0
  167. package/src/components/ui/button/button.tsx +1 -0
  168. package/src/components/ui/card/card.tsx +30 -13
  169. package/src/components/ui/card/index.ts +1 -0
  170. package/src/components/ui/checkbox/checkbox.tsx +1 -0
  171. package/src/components/ui/dialog/dialog.tsx +26 -2
  172. package/src/components/ui/dialog/index.ts +1 -0
  173. package/src/components/ui/entity-icon/entity-icon.tsx +15 -0
  174. package/src/components/ui/field/field.tsx +23 -3
  175. package/src/components/ui/field/index.ts +1 -0
  176. package/src/components/ui/input-group/index.ts +1 -0
  177. package/src/components/ui/input-group/input-group.tsx +28 -5
  178. package/src/components/ui/native-select/native-select.tsx +20 -3
  179. package/src/components/ui/progress/progress.tsx +5 -1
  180. package/src/components/ui/radio-group/radio-group.tsx +40 -3
  181. package/src/components/ui/select/select.tsx +1 -0
  182. package/src/components/ui/sheet/sheet.tsx +20 -2
  183. package/src/components/ui/slider/slider.tsx +1 -0
  184. package/src/components/ui/status-chip/status-chip.tsx +1 -0
  185. package/src/components/ui/switch/switch.tsx +1 -0
  186. package/src/components/ui/tabs/tabs.tsx +33 -4
  187. package/src/components/ui/toggle/toggle.tsx +1 -0
  188. package/src/components/ui/toggle-group/toggle-group.tsx +2 -0
  189. package/src/components/ui/typography/typography.tsx +20 -1
  190. package/src/lib/cn-tables.generated.ts +5 -5
  191. package/src/lib/tokens.ts +7 -2
  192. package/src/styles/base.css +4 -1
  193. package/src/styles/theme.css +4 -0
@@ -1 +1 @@
1
- {"version":3,"file":"badge.js","names":["Polymorphic","PolymorphicProps","ComponentProps","splitProps","ValidComponent","cva","VariantProps","cn","badgeVariants","variants","variant","default","secondary","outline","success","warning","destructive","info","subtle","notification","size","sm","md","lg","defaultVariants","BadgeVariantProps","BadgeProps","T","class","Badge","props","local","rest","_$createComponent","_$mergeProps","as","_$createComponent","_$mergeProps"],"sources":["../../../../src/components/ui/badge/badge.tsx"],"sourcesContent":["import { Polymorphic, type PolymorphicProps } from '@kobalte/core/polymorphic'\nimport { type ComponentProps, splitProps, type ValidComponent } from 'solid-js'\nimport { cva, type VariantProps } from '#lib/variants'\nimport { cn } from '#lib/utils'\n\n/**\n * Badge.\n *\n * A short, non-interactive status label. If it can be clicked it is a Button\n * with `size=\"2xs\"`, not a Badge — the difference matters because a Badge\n * carries no focus or pressed state and must never be the only way to reach an\n * action.\n */\nexport const badgeVariants = cva(\n 'inline-flex w-fit shrink-0 items-center justify-center gap-1 whitespace-nowrap rounded-md border border-transparent font-medium transition-colors [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-3',\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground',\n secondary: 'bg-secondary text-secondary-foreground',\n outline: 'border-border text-foreground',\n /**\n * Tinted status fills, for counts and states rather than actions. The\n * word stays in `foreground` for contrast; the glyph takes the status\n * hue, so tags of different tones read apart at a glance.\n */\n success: 'bg-success-subtle text-foreground [&_svg]:text-success',\n warning: 'bg-warning-subtle text-foreground [&_svg]:text-warning',\n destructive: 'bg-destructive-subtle text-foreground [&_svg]:text-destructive',\n info: 'bg-info-subtle text-foreground [&_svg]:text-info',\n subtle: 'bg-primary-subtle text-primary',\n /**\n * A count that asks for attention, pinned to a corner of another control\n * (a workspace mark, a rail icon). At `sm` it is a 2xs label on whatever\n * surface sits behind the corner, where the destructive tint all but\n * disappears — so it takes the solid, contrast-measured action fill.\n */\n notification: 'bg-destructive-action text-destructive-action-foreground',\n },\n size: {\n sm: 'h-4 px-1.5 text-2xs',\n md: 'h-5 px-2 text-xs',\n lg: 'h-6 px-2.5 text-xs',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'md',\n },\n }\n)\n\ntype BadgeVariantProps = VariantProps<typeof badgeVariants>\n\nexport type BadgeProps<T extends ValidComponent = 'span'> = PolymorphicProps<\n T,\n BadgeVariantProps & { class?: string }\n>\n\nexport function Badge<T extends ValidComponent = 'span'>(props: BadgeProps<T>) {\n const [local, rest] = splitProps(props as BadgeProps, ['variant', 'size', 'class'])\n\n return (\n <Polymorphic\n as=\"span\"\n class={cn(badgeVariants({ variant: local.variant, size: local.size }), local.class)}\n {...(rest as ComponentProps<'span'>)}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AAaA,IAAaQ,gBAAgBH,IAC3B,iNACA;CACEI,UAAU;EACRC,SAAS;GACPC,SAAS;GACTC,WAAW;GACXC,SAAS;;;;;;GAMTC,SAAS;GACTC,SAAS;GACTC,aAAa;GACbC,MAAM;GACNC,QAAQ;;;;;;;GAORC,cAAc;EAChB;EACAC,MAAM;GACJC,IAAI;GACJC,IAAI;GACJC,IAAI;EACN;CACF;CACAC,iBAAiB;EACfd,SAAS;EACTU,MAAM;CACR;AACF,CACF;AASA,SAAgBS,MAAyCC,OAAsB;CAC7E,MAAM,CAACC,OAAOC,QAAQ7B,WAAW2B,OAAqB;EAAC;EAAW;EAAQ;CAAO,CAAC;CAElF,OAAAG,gBACGjC,aAAWkC,WAAA;EACVC,IAAE;EAAA,KAAA,WAAA;GAAA,OACK5B,GAAGC,cAAc;IAAEE,SAASqB,MAAMrB;IAASU,MAAMW,MAAMX;GAAK,CAAC,GAAGW,MAAMH,KAAK;EAAC;CAAA,GAC9EI,IAA8B,CAAA;AAGzC"}
1
+ {"version":3,"file":"badge.js","names":["Polymorphic","PolymorphicProps","ComponentProps","splitProps","ValidComponent","cva","VariantProps","cn","badgeVariants","variants","variant","default","secondary","outline","success","warning","destructive","info","subtle","notification","size","sm","md","lg","defaultVariants","BadgeVariantProps","BadgeProps","T","class","Badge","props","local","rest","_$createComponent","_$mergeProps","as","_$createComponent","_$mergeProps"],"sources":["../../../../src/components/ui/badge/badge.tsx"],"sourcesContent":["import { Polymorphic, type PolymorphicProps } from '@kobalte/core/polymorphic'\nimport { type ComponentProps, splitProps, type ValidComponent } from 'solid-js'\nimport { cva, type VariantProps } from '#lib/variants'\nimport { cn } from '#lib/utils'\n\n/**\n * Badge.\n *\n * A short, non-interactive status label. If it can be clicked it is a Button\n * with `size=\"2xs\"`, not a Badge — the difference matters because a Badge\n * carries no focus or pressed state and must never be the only way to reach an\n * action.\n */\nexport const badgeVariants = cva(\n 'inline-flex w-fit shrink-0 items-center justify-center gap-1 whitespace-nowrap rounded-md border border-transparent font-medium transition-colors [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-3',\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground',\n secondary: 'bg-secondary text-secondary-foreground',\n outline: 'border-border text-foreground',\n /**\n * Tinted status fills, for counts and states rather than actions. The\n * word stays in `foreground` for contrast; the glyph takes the status\n * hue, so tags of different tones read apart at a glance.\n */\n success: 'bg-success-subtle text-foreground [&_svg]:text-success',\n warning: 'bg-warning-subtle text-foreground [&_svg]:text-warning',\n destructive: 'bg-destructive-subtle text-foreground [&_svg]:text-destructive',\n info: 'bg-info-subtle text-foreground [&_svg]:text-info',\n subtle: 'bg-primary-subtle text-primary',\n /**\n * A count that asks for attention, pinned to a corner of another control\n * (a workspace mark, a rail icon). At `sm` it is a 2xs label on whatever\n * surface sits behind the corner, where the destructive tint all but\n * disappears — so it takes the solid, contrast-measured action fill.\n */\n notification: 'bg-destructive-action text-destructive-action-foreground',\n },\n size: {\n sm: 'h-4 px-1.5 text-2xs',\n md: 'h-5 px-2 text-xs',\n lg: 'h-6 px-2.5 text-xs',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'md',\n },\n }\n)\n\ntype BadgeVariantProps = VariantProps<typeof badgeVariants>\n\nexport type BadgeProps<T extends ValidComponent = 'span'> = PolymorphicProps<\n T,\n BadgeVariantProps & { class?: string }\n>\n\nexport function Badge<T extends ValidComponent = 'span'>(props: BadgeProps<T>) {\n const [local, rest] = splitProps(props as BadgeProps, ['variant', 'size', 'class'])\n\n return (\n <Polymorphic\n as=\"span\"\n data-slot=\"badge\"\n class={cn(badgeVariants({ variant: local.variant, size: local.size }), local.class)}\n {...(rest as ComponentProps<'span'>)}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AAaA,IAAaQ,gBAAgBH,IAC3B,iNACA;CACEI,UAAU;EACRC,SAAS;GACPC,SAAS;GACTC,WAAW;GACXC,SAAS;;;;;;GAMTC,SAAS;GACTC,SAAS;GACTC,aAAa;GACbC,MAAM;GACNC,QAAQ;;;;;;;GAORC,cAAc;EAChB;EACAC,MAAM;GACJC,IAAI;GACJC,IAAI;GACJC,IAAI;EACN;CACF;CACAC,iBAAiB;EACfd,SAAS;EACTU,MAAM;CACR;AACF,CACF;AASA,SAAgBS,MAAyCC,OAAsB;CAC7E,MAAM,CAACC,OAAOC,QAAQ7B,WAAW2B,OAAqB;EAAC;EAAW;EAAQ;CAAO,CAAC;CAElF,OAAAG,gBACGjC,aAAWkC,WAAA;EACVC,IAAE;EAAA,aAAA;EAAA,KAAA,WAAA;GAAA,OAEK5B,GAAGC,cAAc;IAAEE,SAASqB,MAAMrB;IAASU,MAAMW,MAAMX;GAAK,CAAC,GAAGW,MAAMH,KAAK;EAAC;CAAA,GAC9EI,IAA8B,CAAA;AAGzC"}
@@ -19,6 +19,12 @@ export type BreadcrumbLinkProps = ComponentProps<'a'> & {
19
19
  current?: boolean;
20
20
  };
21
21
  export declare function BreadcrumbLink(props: BreadcrumbLinkProps): import("solid-js").JSX.Element;
22
+ /**
23
+ * The current page: the last crumb, as text rather than a link to itself, and
24
+ * marked `aria-current="page"`. The same element `BreadcrumbLink current`
25
+ * renders, for a trail whose last crumb is never a link.
26
+ */
27
+ export declare function BreadcrumbPage(props: ComponentProps<'span'>): import("solid-js").JSX.Element;
22
28
  export declare function BreadcrumbSeparator(props: ComponentProps<'li'>): import("solid-js").JSX.Element;
23
29
  export declare function BreadcrumbEllipsis(props: ComponentProps<'span'>): import("solid-js").JSX.Element;
24
30
  //# sourceMappingURL=breadcrumb.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/breadcrumb/breadcrumb.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAI9C;;;;;;;;;;;GAWG;AACH,wBAAgB,U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9D;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,cAAc,CAAC,MAAM,CAAC,kCAe/D"}
@@ -64,13 +64,9 @@ function BreadcrumbLink(props) {
64
64
  return !local.current;
65
65
  },
66
66
  get fallback() {
67
- return (() => {
68
- var _el$5 = _tmpl$5();
69
- spread(_el$5, mergeProps({ get ["class"]() {
70
- return cn("font-medium text-foreground", local.class);
71
- } }, rest), false, false);
72
- return _el$5;
73
- })();
67
+ return createComponent(BreadcrumbPage, mergeProps({ get ["class"]() {
68
+ return local.class;
69
+ } }, rest));
74
70
  },
75
71
  get children() {
76
72
  var _el$4 = _tmpl$4();
@@ -81,6 +77,21 @@ function BreadcrumbLink(props) {
81
77
  }
82
78
  });
83
79
  }
80
+ /**
81
+ * The current page: the last crumb, as text rather than a link to itself, and
82
+ * marked `aria-current="page"`. The same element `BreadcrumbLink current`
83
+ * renders, for a trail whose last crumb is never a link.
84
+ */
85
+ function BreadcrumbPage(props) {
86
+ const [local, rest] = splitProps(props, ["class"]);
87
+ return (() => {
88
+ var _el$5 = _tmpl$5();
89
+ spread(_el$5, mergeProps({ get ["class"]() {
90
+ return cn("font-medium text-foreground", local.class);
91
+ } }, rest), false, false);
92
+ return _el$5;
93
+ })();
94
+ }
84
95
  function BreadcrumbSeparator(props) {
85
96
  const [local, rest] = splitProps(props, ["class", "children"]);
86
97
  return (() => {
@@ -104,6 +115,6 @@ function BreadcrumbEllipsis(props) {
104
115
  })();
105
116
  }
106
117
  //#endregion
107
- export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbSeparator };
118
+ export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
108
119
 
109
120
  //# sourceMappingURL=breadcrumb.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb.js","names":["ChevronRight","MoreHorizontal","ComponentProps","Show","splitProps","cn","Breadcrumb","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","aria-label","class","BreadcrumbList","_el$2","_tmpl$2","BreadcrumbItem","_el$3","_tmpl$3","BreadcrumbLinkProps","current","BreadcrumbLink","_$createComponent","when","fallback","_el$5","_tmpl$5","children","_el$4","_tmpl$4","BreadcrumbSeparator","_el$6","_tmpl$6","_$insert","BreadcrumbEllipsis","_el$7","_tmpl$7","_el$8","firstChild","_$mergeProps","_$createComponent"],"sources":["../../../../src/components/ui/breadcrumb/breadcrumb.tsx"],"sourcesContent":["import { ChevronRight, MoreHorizontal } from 'lucide-solid'\nimport type { ComponentProps } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * Breadcrumb.\n *\n * The path to the current view, in a real `<nav>` wrapping an ordered list so\n * the structure is announced rather than read as loose text. The final crumb is\n * the current page and is marked `aria-current=\"page\"` instead of being a link\n * to itself.\n *\n * A long path collapses from the middle: the root says where the user started\n * and the last crumbs say what they are looking at, so those are the parts that\n * have to survive.\n */\nexport function Breadcrumb(props: ComponentProps<'nav'>) {\n const [local, rest] = splitProps(props, ['class', 'aria-label'])\n\n return (\n <nav\n data-slot=\"breadcrumb\"\n aria-label={local['aria-label'] ?? 'Breadcrumb'}\n class={cn('text-muted-foreground', local.class)}\n {...rest}\n />\n )\n}\n\nexport function BreadcrumbList(props: ComponentProps<'ol'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <ol\n data-slot=\"breadcrumb-list\"\n class={cn('flex flex-wrap items-center gap-1.5 text-sm break-words', local.class)}\n {...rest}\n />\n )\n}\n\nexport function BreadcrumbItem(props: ComponentProps<'li'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <li\n data-slot=\"breadcrumb-item\"\n class={cn('inline-flex items-center gap-1.5', local.class)}\n {...rest}\n />\n )\n}\n\nexport type BreadcrumbLinkProps = ComponentProps<'a'> & {\n /** Render as the current page rather than as a link. */\n current?: boolean\n}\n\nexport function BreadcrumbLink(props: BreadcrumbLinkProps) {\n const [local, rest] = splitProps(props, ['class', 'current'])\n\n return (\n <Show\n when={!local.current}\n fallback={\n <span\n data-slot=\"breadcrumb-page\"\n aria-current=\"page\"\n class={cn('font-medium text-foreground', local.class)}\n {...(rest as ComponentProps<'span'>)}\n />\n }\n >\n <a\n data-slot=\"breadcrumb-link\"\n class={cn(\n 'rounded-sm transition-colors ease-out outline-none hover:text-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n local.class\n )}\n {...rest}\n />\n </Show>\n )\n}\n\nexport function BreadcrumbSeparator(props: ComponentProps<'li'>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <li\n data-slot=\"breadcrumb-separator\"\n role=\"presentation\"\n aria-hidden=\"true\"\n class={cn('[&_svg]:size-3.5', local.class)}\n {...rest}\n >\n {local.children ?? <ChevronRight />}\n </li>\n )\n}\n\nexport function BreadcrumbEllipsis(props: ComponentProps<'span'>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <span\n data-slot=\"breadcrumb-ellipsis\"\n role=\"presentation\"\n aria-hidden=\"true\"\n class={cn('flex size-6 items-center justify-center', local.class)}\n {...rest}\n >\n <MoreHorizontal class=\"size-4\" />\n <span class=\"visually-hidden\">More</span>\n </span>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAiBA,SAAgBM,WAAWC,OAA8B;CACvD,MAAM,CAACC,OAAOC,QAAQL,WAAWG,OAAO,CAAC,SAAS,YAAY,CAAC;CAE/D,cAAA;EAAA,IAAAG,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAAA;GAAA,KAAA,gBAAA;IAAA,OAGgBL,MAAM,iBAAiB;GAAY;GAAA,KAAA,WAAA;IAAA,OACxCH,GAAG,yBAAyBG,MAAMO,KAAK;GAAC;EAAA,GAC3CN,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAC;CAAA,EAAA,CAAA;AAGd;AAEA,SAAgBM,eAAeT,O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oBAAoB1B,OAA6B;CAC/D,MAAM,CAACC,OAAOC,QAAQL,WAAWG,OAAO,CAAC,SAAS,UAAU,CAAC;CAE7D,cAAA;EAAA,IAAA2B,QAAAC,QAAA;EAAAvB,OAAAsB,OAAArB,WAAA,EAAA,KAAA,WAAA;GAAA,OAKWR,GAAG,oBAAoBG,MAAMO,KAAK;EAAC,EAAA,GACtCN,IAAI,GAAA,OAAA,IAAA;EAAA2B,OAAAF,aAEP1B,MAAMsB,YAAQL,gBAAKzB,cAAY,CAAA,CAAA,CAAG;EAAA,OAAAkC;CAAA,EAAA,CAAA;AAGzC;AAEA,SAAgBG,mBAAmB9B,OAA+B;CAChE,MAAM,CAACC,OAAOC,QAAQL,WAAWG,OAAO,CAAC,OAAO,CAAC;CAEjD,cAAA;EAAA,IAAA+B,QAAAC,QAAA,GAAAC,QAAAF,MAAAG;EAAA7B,OAAA0B,OAAAzB,WAAA,EAAA,KAAA,WAAA;GAAA,OAKWR,GAAG,2CAA2CG,MAAMO,KAAK;EAAC,EAAA,GAC7DN,IAAI,GAAA,OAAA,IAAA;EAAA2B,OAAAE,OAAAb,gBAEPxB,gBAAc,EAAA,SAAA,SAAA,CAAA,GAAAuC,KAAA;EAAA,OAAAF;CAAA,EAAA,CAAA;AAIrB"}
1
+ {"version":3,"file":"breadcrumb.js","names":["ChevronRight","MoreHorizontal","ComponentProps","Show","splitProps","cn","Breadcrumb","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","aria-label","class","BreadcrumbList","_el$2","_tmpl$2","BreadcrumbItem","_el$3","_tmpl$3","BreadcrumbLinkProps","current","BreadcrumbLink","_$createComponent","when","fallback","BreadcrumbPage","children","_el$4","_tmpl$4","_el$5","_tmpl$5","BreadcrumbSeparator","_el$6","_tmpl$6","_$insert","BreadcrumbEllipsis","_el$7","_tmpl$7","_el$8","firstChild","_$mergeProps","_$createComponent"],"sources":["../../../../src/components/ui/breadcrumb/breadcrumb.tsx"],"sourcesContent":["import { ChevronRight, MoreHorizontal } from 'lucide-solid'\nimport type { ComponentProps } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * Breadcrumb.\n *\n * The path to the current view, in a real `<nav>` wrapping an ordered list so\n * the structure is announced rather than read as loose text. The final crumb is\n * the current page and is marked `aria-current=\"page\"` instead of being a link\n * to itself.\n *\n * A long path collapses from the middle: the root says where the user started\n * and the last crumbs say what they are looking at, so those are the parts that\n * have to survive.\n */\nexport function Breadcrumb(props: ComponentProps<'nav'>) {\n const [local, rest] = splitProps(props, ['class', 'aria-label'])\n\n return (\n <nav\n data-slot=\"breadcrumb\"\n aria-label={local['aria-label'] ?? 'Breadcrumb'}\n class={cn('text-muted-foreground', local.class)}\n {...rest}\n />\n )\n}\n\nexport function BreadcrumbList(props: ComponentProps<'ol'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <ol\n data-slot=\"breadcrumb-list\"\n class={cn('flex flex-wrap items-center gap-1.5 text-sm break-words', local.class)}\n {...rest}\n />\n )\n}\n\nexport function BreadcrumbItem(props: ComponentProps<'li'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <li\n data-slot=\"breadcrumb-item\"\n class={cn('inline-flex items-center gap-1.5', local.class)}\n {...rest}\n />\n )\n}\n\nexport type BreadcrumbLinkProps = ComponentProps<'a'> & {\n /** Render as the current page rather than as a link. */\n current?: boolean\n}\n\nexport function BreadcrumbLink(props: BreadcrumbLinkProps) {\n const [local, rest] = splitProps(props, ['class', 'current'])\n\n return (\n <Show\n when={!local.current}\n fallback={<BreadcrumbPage class={local.class} {...(rest as ComponentProps<'span'>)} />}\n >\n <a\n data-slot=\"breadcrumb-link\"\n class={cn(\n 'rounded-sm transition-colors ease-out outline-none hover:text-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n local.class\n )}\n {...rest}\n />\n </Show>\n )\n}\n\n/**\n * The current page: the last crumb, as text rather than a link to itself, and\n * marked `aria-current=\"page\"`. The same element `BreadcrumbLink current`\n * renders, for a trail whose last crumb is never a link.\n */\nexport function BreadcrumbPage(props: ComponentProps<'span'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <span\n data-slot=\"breadcrumb-page\"\n aria-current=\"page\"\n class={cn('font-medium text-foreground', local.class)}\n {...rest}\n />\n )\n}\n\nexport function BreadcrumbSeparator(props: ComponentProps<'li'>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <li\n data-slot=\"breadcrumb-separator\"\n role=\"presentation\"\n aria-hidden=\"true\"\n class={cn('[&_svg]:size-3.5', local.class)}\n {...rest}\n >\n {local.children ?? <ChevronRight />}\n </li>\n )\n}\n\nexport function BreadcrumbEllipsis(props: ComponentProps<'span'>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <span\n data-slot=\"breadcrumb-ellipsis\"\n role=\"presentation\"\n aria-hidden=\"true\"\n class={cn('flex size-6 items-center justify-center', local.class)}\n {...rest}\n >\n <MoreHorizontal class=\"size-4\" />\n <span class=\"visually-hidden\">More</span>\n </span>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAiBA,SAAgBM,WAAWC,OAA8B;CACvD,MAAM,CAACC,OAAOC,QAAQL,WAAWG,OAAO,CAAC,SAAS,YAAY,CAAC;CAE/D,cAAA;EAAA,IAAAG,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAAA;GAAA,KAAA,gBAAA;IAAA,OAGgBL,MAAM,iBAAiB;GAAY;GAAA,KAAA,WAAA;IAAA,OACxCH,GAAG,yBAAyBG,MAAMO,KAAK;GAAC;EAAA,GAC3CN,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAC;CAAA,EAAA,CAAA;AAGd;AAEA,SAAgBM,eAAeT,OAA6B;CAC1D,MAAM,CAACC,OAAOC,QAAQL,WAAWG,OAAO,CAAC,OAAO,CAAC;CACjD,cAAA;EAAA,IAAAU,QAAAC,QAAA;EAAAN,OAAAK,OAAAJ,WAAA,EAAA,K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A,OAAA,KAAA;EAAA,OAAAuB;CAAA,EAAA,CAAA;AAGd;AAEA,SAAgBE,oBAAoB3B,OAA6B;CAC/D,MAAM,CAACC,OAAOC,QAAQL,WAAWG,OAAO,CAAC,SAAS,UAAU,CAAC;CAE7D,cAAA;EAAA,IAAA4B,QAAAC,QAAA;EAAAxB,OAAAuB,OAAAtB,WAAA,EAAA,KAAA,WAAA;GAAA,OAKWR,GAAG,oBAAoBG,MAAMO,KAAK;EAAC,EAAA,GACtCN,IAAI,GAAA,OAAA,IAAA;EAAA4B,OAAAF,aAEP3B,MAAMqB,YAAQJ,gBAAKzB,cAAY,CAAA,CAAA,CAAG;EAAA,OAAAmC;CAAA,EAAA,CAAA;AAGzC;AAEA,SAAgBG,mBAAmB/B,OAA+B;CAChE,MAAM,CAACC,OAAOC,QAAQL,WAAWG,OAAO,CAAC,OAAO,CAAC;CAEjD,cAAA;EAAA,IAAAgC,QAAAC,QAAA,GAAAC,QAAAF,MAAAG;EAAA9B,OAAA2B,OAAA1B,WAAA,EAAA,KAAA,WAAA;GAAA,OAKWR,GAAG,2CAA2CG,MAAMO,KAAK;EAAC,EAAA,GAC7DN,IAAI,GAAA,OAAA,IAAA;EAAA4B,OAAAE,OAAAd,gBAEPxB,gBAAc,EAAA,SAAA,SAAA,CAAA,GAAAwC,KAAA;EAAA,OAAAF;CAAA,EAAA,CAAA;AAIrB"}
@@ -1,2 +1,2 @@
1
- export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbSeparator, type BreadcrumbLinkProps, } from './breadcrumb';
1
+ export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, type BreadcrumbLinkProps, } from './breadcrumb';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/breadcrumb/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,KAAK,mBAAmB,GACzB,MAAM,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/breadcrumb/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,KAAK,mBAAmB,GACzB,MAAM,cAAc,CAAA"}
@@ -1,2 +1,2 @@
1
- import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbSeparator } from "./breadcrumb.js";
2
- export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbSeparator };
1
+ import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "./breadcrumb.js";
2
+ export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAC9E,OAAO,EAAmC,KAAK,cAAc,EAAE,MAAM,UAAU,CAAA;AAC/E,OAAO,EAAwC,KAAK,YAAY,EAAE,MAAM,eAAe,CAAA;AAGvF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc;;;;8EAmD1B,CAAA;AAED,KAAK,kBAAkB,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAA;AAE7D,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,cAAc,GAAG,QAAQ,IAAI,gBAAgB,CAC7E,CAAC,EACD,kBAAkB,GAAG;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CACF,CAAA;AAED,wBAAgB,MAAM,CAAC,CAAC,SAAS,cAAc,GAAG,QAAQ,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,kCAuBhF"}
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAC9E,OAAO,EAAmC,KAAK,cAAc,EAAE,MAAM,UAAU,CAAA;AAC/E,OAAO,EAAwC,KAAK,YAAY,EAAE,MAAM,eAAe,CAAA;AAGvF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc;;;;8EAmD1B,CAAA;AAED,KAAK,kBAAkB,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAA;AAE7D,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,cAAc,GAAG,QAAQ,IAAI,gBAAgB,CAC7E,CAAC,EACD,kBAAkB,GAAG;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CACF,CAAA;AAED,wBAAgB,MAAM,CAAC,CAAC,SAAS,cAAc,GAAG,QAAQ,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,kCAwBhF"}
@@ -71,6 +71,7 @@ function Button(props) {
71
71
  return createComponent(Polymorphic, mergeProps({
72
72
  as: "button",
73
73
  type: "button",
74
+ "data-slot": "button",
74
75
  get ["class"]() {
75
76
  return cn(buttonVariants({
76
77
  variant: local.variant,
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","names":["Polymorphic","PolymorphicProps","ComponentProps","splitProps","ValidComponent","cva","controlInteractive","controlSize","VariantProps","cn","buttonVariants","variants","variant","default","secondary","destructive","outline","ghost","subtle","success","link","size","xs","sm","md","lg","xl","touchTarget","comfortable","defaultVariants","ButtonVariantProps","ButtonProps","T","class","Button","props","local","rest","_$createComponent","_$mergeProps","as","type","_$createComponent","_$mergeProps"],"sources":["../../../../src/components/ui/button/button.tsx"],"sourcesContent":["import { Polymorphic, type PolymorphicProps } from '@kobalte/core/polymorphic'\nimport { type ComponentProps, splitProps, type ValidComponent } from 'solid-js'\nimport { cva, controlInteractive, controlSize, type VariantProps } from '#lib/variants'\nimport { cn } from '#lib/utils'\n\n/**\n * Button.\n *\n * One appearance ladder shared by every pressable thing in the system: a\n * button, a toolbar control, a dialog action, and a menu row all draw from the\n * same tokens, so a row of them cannot drift apart.\n *\n * The variants answer \"what is this for\", never \"what colour is it\". A caller\n * that wants a red button writes `variant=\"destructive\"`; the red lives here.\n * That is also what lets the design-system linter tell a caller which variant\n * to use instead of only which class was wrong.\n *\n * Polymorphic: pass `as=\"a\"` (or any component) and the button becomes it\n * while keeping the same styling contract. This replaces the React-era\n * `asChild` primitive, which has no Solid equivalent that preserves props.\n */\nexport const buttonVariants = cva(\n `${controlInteractive} inline-flex shrink-0 items-center justify-center rounded-md font-medium whitespace-nowrap select-none [&_svg]:pointer-events-none [&_svg]:shrink-0`,\n {\n variants: {\n variant: {\n /** The one primary action in a view. */\n default: 'bg-primary text-primary-foreground hover:bg-primary-hover',\n secondary: 'bg-secondary text-secondary-foreground hover:bg-surface-hover',\n /** For the action that destroys something. Never the default. */\n destructive:\n 'bg-destructive-action text-destructive-action-foreground hover:bg-destructive-action/90 focus-visible:ring-destructive-subtle',\n /** A bordered button for a surface that already has a fill. */\n outline:\n 'border border-border bg-transparent text-foreground hover:bg-surface-hover hover:border-input',\n /** No chrome until hover. The default for toolbar and row actions. */\n ghost: 'text-foreground hover:bg-surface-hover',\n /** A tinted primary, for a secondary action inside a primary flow. */\n subtle: 'bg-primary-subtle text-primary hover:bg-primary-subtle/80',\n success: 'bg-success text-success-foreground hover:bg-success/90',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n size: {\n '2xs': `${controlSize['2xs']} [&_svg]:size-3`,\n xs: `${controlSize.xs} [&_svg]:size-3.5`,\n sm: `${controlSize.sm} [&_svg]:size-3.5`,\n md: `${controlSize.md} [&_svg]:size-4`,\n lg: `${controlSize.lg} [&_svg]:size-4`,\n xl: `${controlSize.xl} [&_svg]:size-5`,\n '2xl': `${controlSize['2xl']} [&_svg]:size-6`,\n /* Square, for an icon with no label. The accessible name then has to\n come from `aria-label` or a visually hidden label — an icon-only\n button with neither is the accessibility finding the Storybook lane\n catches on every story. */\n 'icon-2xs': 'size-control-2xs p-0 [&_svg]:size-3',\n 'icon-xs': 'size-control-xs p-0 [&_svg]:size-3.5',\n 'icon-sm': 'size-control-sm p-0 [&_svg]:size-3.5',\n 'icon-md': 'size-control-md p-0 [&_svg]:size-4',\n 'icon-lg': 'size-control-lg p-0 [&_svg]:size-4',\n 'icon-xl': 'size-control-xl p-0 [&_svg]:size-5',\n 'icon-2xl': 'size-control-2xl p-0 [&_svg]:size-6',\n },\n /** Opt in to a stable touch target on devices with any coarse pointer. */\n touchTarget: {\n comfortable: 'touch-target-comfortable',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'md',\n },\n }\n)\n\ntype ButtonVariantProps = VariantProps<typeof buttonVariants>\n\nexport type ButtonProps<T extends ValidComponent = 'button'> = PolymorphicProps<\n T,\n ButtonVariantProps & {\n class?: string\n }\n>\n\nexport function Button<T extends ValidComponent = 'button'>(props: ButtonProps<T>) {\n const [local, rest] = splitProps(props as ButtonProps, [\n 'variant',\n 'size',\n 'touchTarget',\n 'class',\n ])\n\n return (\n <Polymorphic\n as=\"button\"\n type=\"button\"\n class={cn(\n buttonVariants({\n variant: local.variant,\n size: local.size,\n touchTarget: local.touchTarget,\n }),\n local.class\n )}\n {...(rest as ComponentProps<'button'>)}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAqBA,IAAaU,iBAAiBL,IAC5B,GAAGC,mBAAkB,sJACrB;CACEK,UAAU;EACRC,SAAS;;GAEPC,SAAS;GACTC,WAAW;;GAEXC,aACE;;GAEFC,SACE;;GAEFC,OAAO;;GAEPC,QAAQ;GACRC,SAAS;GACTC,MAAM;EACR;EACAC,MAAM;GACJ,OAAO,GAAGd,YAAY,OAAM;GAC5Be,IAAI,GAAGf,YAAYe,GAAE;GACrBC,IAAI,GAAGhB,YAAYgB,GAAE;GACrBC,IAAI,GAAGjB,YAAYiB,GAAE;GACrBC,IAAI,GAAGlB,YAAYkB,GAAE;GACrBC,IAAI,GAAGnB,YAAYmB,GAAE;GACrB,OAAO,GAAGnB,YAAY,OAAM;GAK5B,YAAY;GACZ,WAAW;GACX,WAAW;GACX,WAAW;GACX,WAAW;GACX,WAAW;GACX,YAAY;EACd;;EAEAoB,aAAa,EACXC,aAAa,2BACf;CACF;CACAC,iBAAiB;EACfjB,SAAS;EACTS,MAAM;CACR;AACF,CACF;AAWA,SAAgBa,OAA4CC,OAAuB;CACjF,MAAM,CAACC,OAAOC,QAAQlC,WAAWgC,OAAsB;EACrD;EACA;EACA;EACA;CAAO,CACR;CAED,OAAAG,gBACGtC,aAAWuC,WAAA;EACVC,IAAE;EACFC,MAAI;EAAA,KAAA,WAAA;GAAA,OACGhC,GACLC,eAAe;IACbE,SAASwB,MAAMxB;IACfS,MAAMe,MAAMf;IACZM,aAAaS,MAAMT;GACrB,CAAC,GACDS,MAAMH,KACR;EAAC;CAAA,GACII,IAAgC,CAAA;AAG3C"}
1
+ {"version":3,"file":"button.js","names":["Polymorphic","PolymorphicProps","ComponentProps","splitProps","ValidComponent","cva","controlInteractive","controlSize","VariantProps","cn","buttonVariants","variants","variant","default","secondary","destructive","outline","ghost","subtle","success","link","size","xs","sm","md","lg","xl","touchTarget","comfortable","defaultVariants","ButtonVariantProps","ButtonProps","T","class","Button","props","local","rest","_$createComponent","_$mergeProps","as","type","_$createComponent","_$mergeProps"],"sources":["../../../../src/components/ui/button/button.tsx"],"sourcesContent":["import { Polymorphic, type PolymorphicProps } from '@kobalte/core/polymorphic'\nimport { type ComponentProps, splitProps, type ValidComponent } from 'solid-js'\nimport { cva, controlInteractive, controlSize, type VariantProps } from '#lib/variants'\nimport { cn } from '#lib/utils'\n\n/**\n * Button.\n *\n * One appearance ladder shared by every pressable thing in the system: a\n * button, a toolbar control, a dialog action, and a menu row all draw from the\n * same tokens, so a row of them cannot drift apart.\n *\n * The variants answer \"what is this for\", never \"what colour is it\". A caller\n * that wants a red button writes `variant=\"destructive\"`; the red lives here.\n * That is also what lets the design-system linter tell a caller which variant\n * to use instead of only which class was wrong.\n *\n * Polymorphic: pass `as=\"a\"` (or any component) and the button becomes it\n * while keeping the same styling contract. This replaces the React-era\n * `asChild` primitive, which has no Solid equivalent that preserves props.\n */\nexport const buttonVariants = cva(\n `${controlInteractive} inline-flex shrink-0 items-center justify-center rounded-md font-medium whitespace-nowrap select-none [&_svg]:pointer-events-none [&_svg]:shrink-0`,\n {\n variants: {\n variant: {\n /** The one primary action in a view. */\n default: 'bg-primary text-primary-foreground hover:bg-primary-hover',\n secondary: 'bg-secondary text-secondary-foreground hover:bg-surface-hover',\n /** For the action that destroys something. Never the default. */\n destructive:\n 'bg-destructive-action text-destructive-action-foreground hover:bg-destructive-action/90 focus-visible:ring-destructive-subtle',\n /** A bordered button for a surface that already has a fill. */\n outline:\n 'border border-border bg-transparent text-foreground hover:bg-surface-hover hover:border-input',\n /** No chrome until hover. The default for toolbar and row actions. */\n ghost: 'text-foreground hover:bg-surface-hover',\n /** A tinted primary, for a secondary action inside a primary flow. */\n subtle: 'bg-primary-subtle text-primary hover:bg-primary-subtle/80',\n success: 'bg-success text-success-foreground hover:bg-success/90',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n size: {\n '2xs': `${controlSize['2xs']} [&_svg]:size-3`,\n xs: `${controlSize.xs} [&_svg]:size-3.5`,\n sm: `${controlSize.sm} [&_svg]:size-3.5`,\n md: `${controlSize.md} [&_svg]:size-4`,\n lg: `${controlSize.lg} [&_svg]:size-4`,\n xl: `${controlSize.xl} [&_svg]:size-5`,\n '2xl': `${controlSize['2xl']} [&_svg]:size-6`,\n /* Square, for an icon with no label. The accessible name then has to\n come from `aria-label` or a visually hidden label — an icon-only\n button with neither is the accessibility finding the Storybook lane\n catches on every story. */\n 'icon-2xs': 'size-control-2xs p-0 [&_svg]:size-3',\n 'icon-xs': 'size-control-xs p-0 [&_svg]:size-3.5',\n 'icon-sm': 'size-control-sm p-0 [&_svg]:size-3.5',\n 'icon-md': 'size-control-md p-0 [&_svg]:size-4',\n 'icon-lg': 'size-control-lg p-0 [&_svg]:size-4',\n 'icon-xl': 'size-control-xl p-0 [&_svg]:size-5',\n 'icon-2xl': 'size-control-2xl p-0 [&_svg]:size-6',\n },\n /** Opt in to a stable touch target on devices with any coarse pointer. */\n touchTarget: {\n comfortable: 'touch-target-comfortable',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'md',\n },\n }\n)\n\ntype ButtonVariantProps = VariantProps<typeof buttonVariants>\n\nexport type ButtonProps<T extends ValidComponent = 'button'> = PolymorphicProps<\n T,\n ButtonVariantProps & {\n class?: string\n }\n>\n\nexport function Button<T extends ValidComponent = 'button'>(props: ButtonProps<T>) {\n const [local, rest] = splitProps(props as ButtonProps, [\n 'variant',\n 'size',\n 'touchTarget',\n 'class',\n ])\n\n return (\n <Polymorphic\n as=\"button\"\n type=\"button\"\n data-slot=\"button\"\n class={cn(\n buttonVariants({\n variant: local.variant,\n size: local.size,\n touchTarget: local.touchTarget,\n }),\n local.class\n )}\n {...(rest as ComponentProps<'button'>)}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAqBA,IAAaU,iBAAiBL,IAC5B,GAAGC,mBAAkB,sJACrB;CACEK,UAAU;EACRC,SAAS;;GAEPC,SAAS;GACTC,WAAW;;GAEXC,aACE;;GAEFC,SACE;;GAEFC,OAAO;;GAEPC,QAAQ;GACRC,SAAS;GACTC,MAAM;EACR;EACAC,MAAM;GACJ,OAAO,GAAGd,YAAY,OAAM;GAC5Be,IAAI,GAAGf,YAAYe,GAAE;GACrBC,IAAI,GAAGhB,YAAYgB,GAAE;GACrBC,IAAI,GAAGjB,YAAYiB,GAAE;GACrBC,IAAI,GAAGlB,YAAYkB,GAAE;GACrBC,IAAI,GAAGnB,YAAYmB,GAAE;GACrB,OAAO,GAAGnB,YAAY,OAAM;GAK5B,YAAY;GACZ,WAAW;GACX,WAAW;GACX,WAAW;GACX,WAAW;GACX,WAAW;GACX,YAAY;EACd;;EAEAoB,aAAa,EACXC,aAAa,2BACf;CACF;CACAC,iBAAiB;EACfjB,SAAS;EACTS,MAAM;CACR;AACF,CACF;AAWA,SAAgBa,OAA4CC,OAAuB;CACjF,MAAM,CAACC,OAAOC,QAAQlC,WAAWgC,OAAsB;EACrD;EACA;EACA;EACA;CAAO,CACR;CAED,OAAAG,gBACGtC,aAAWuC,WAAA;EACVC,IAAE;EACFC,MAAI;EAAA,aAAA;EAAA,KAAA,WAAA;GAAA,OAEGhC,GACLC,eAAe;IACbE,SAASwB,MAAMxB;IACfS,MAAMe,MAAMf;IACZM,aAAaS,MAAMT;GACrB,CAAC,GACDS,MAAMH,KACR;EAAC;CAAA,GACII,IAAgC,CAAA;AAG3C"}
@@ -1,4 +1,5 @@
1
- import type { ComponentProps, JSX } from 'solid-js';
1
+ import type { ComponentProps } from 'solid-js';
2
+ import { type VariantProps } from '#lib/variants';
2
3
  /**
3
4
  * Card.
4
5
  *
@@ -11,13 +12,22 @@ import type { ComponentProps, JSX } from 'solid-js';
11
12
  * The parts are separate components rather than a template because a card's
12
13
  * header, content and footer have different padding on purpose: the header and
13
14
  * footer are tight, the content breathes.
15
+ *
16
+ * `size` is the card's padding rung, so a caller never sets `p-*` or `gap-*` on
17
+ * a card to make it denser. `sm` tightens the card and its header, content and
18
+ * footer together (the parts' inline padding follows the card, so they stay
19
+ * aligned with each other); `flush` removes the block padding and gap for a
20
+ * card whose body is a list of rows or a scroll area that runs edge to edge.
14
21
  */
15
- export declare function Card(props: ComponentProps<'div'>): JSX.Element;
16
- export declare function CardHeader(props: ComponentProps<'div'>): JSX.Element;
17
- export declare function CardTitle(props: ComponentProps<'div'>): JSX.Element;
18
- export declare function CardDescription(props: ComponentProps<'div'>): JSX.Element;
19
- export declare function CardAction(props: ComponentProps<'div'>): JSX.Element;
20
- export declare function CardContent(props: ComponentProps<'div'>): JSX.Element;
21
- export declare function CardFooter(props: ComponentProps<'div'>): JSX.Element;
22
- export type CardProps = ComponentProps<'div'> & JSX.HTMLAttributes<HTMLDivElement>;
22
+ export declare const cardVariants: (props?: ({
23
+ size?: "sm" | "default" | "flush" | null | undefined;
24
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
25
+ export type CardProps = ComponentProps<'div'> & VariantProps<typeof cardVariants>;
26
+ export declare function Card(props: CardProps): import("solid-js").JSX.Element;
27
+ export declare function CardHeader(props: ComponentProps<'div'>): import("solid-js").JSX.Element;
28
+ export declare function CardTitle(props: ComponentProps<'div'>): import("solid-js").JSX.Element;
29
+ export declare function CardDescription(props: ComponentProps<'div'>): import("solid-js").JSX.Element;
30
+ export declare function CardAction(props: ComponentProps<'div'>): import("solid-js").JSX.Element;
31
+ export declare function CardContent(props: ComponentProps<'div'>): import("solid-js").JSX.Element;
32
+ export declare function CardFooter(props: ComponentProps<'div'>): import("solid-js").JSX.Element;
23
33
  //# sourceMappingURL=card.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/card/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAKnD;;;;;;;;;;;;GAYG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,eAYhD;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,eAKtD;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,eASrD;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,eAS3D;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,eAStD;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,eAGvD;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,eAGtD;AAED,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,cAAc,CAAC,cAAc,CAAC,CAAA"}
1
+ {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/card/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAE9C,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,eAAe,CAAA;AAItD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,YAAY;;8EAexB,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAA;AAEjF,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,kCAKpC;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,kCAKtD;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,kCASrD;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,kCAS3D;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,kCAStD;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,kCAGvD;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,kCAGtD"}
@@ -1,4 +1,5 @@
1
1
  import { cn } from "../../../lib/utils.js";
2
+ import { cva } from "../../../lib/variants.js";
2
3
  import { headingVariants } from "../typography/typography.js";
3
4
  import { mergeProps, spread, template } from "solid-js/web";
4
5
  import { splitProps } from "solid-js";
@@ -22,13 +23,30 @@ var _tmpl$7 = /*#__PURE__*/ template(`<div data-slot=card-footer>`);
22
23
  * The parts are separate components rather than a template because a card's
23
24
  * header, content and footer have different padding on purpose: the header and
24
25
  * footer are tight, the content breathes.
26
+ *
27
+ * `size` is the card's padding rung, so a caller never sets `p-*` or `gap-*` on
28
+ * a card to make it denser. `sm` tightens the card and its header, content and
29
+ * footer together (the parts' inline padding follows the card, so they stay
30
+ * aligned with each other); `flush` removes the block padding and gap for a
31
+ * card whose body is a list of rows or a scroll area that runs edge to edge.
25
32
  */
33
+ var cardVariants = cva("bg-card text-card-foreground flex flex-col rounded-xl border border-border shadow-xs", {
34
+ variants: { size: {
35
+ /** 16px block padding and gap; the parts carry 16px inline padding. */
36
+ default: "gap-4 py-4",
37
+ /** 12px everywhere: a dense settings or status card. */
38
+ sm: "gap-3 py-3 *:data-[slot=card-content]:px-3 *:data-[slot=card-footer]:px-3 *:data-[slot=card-header]:px-3",
39
+ /** No block padding or gap: the card hosts a row list or a scroller. */
40
+ flush: "gap-0 py-0"
41
+ } },
42
+ defaultVariants: { size: "default" }
43
+ });
26
44
  function Card(props) {
27
- const [local, rest] = splitProps(props, ["class"]);
45
+ const [local, rest] = splitProps(props, ["class", "size"]);
28
46
  return (() => {
29
47
  var _el$ = _tmpl$();
30
48
  spread(_el$, mergeProps({ get ["class"]() {
31
- return cn("bg-card text-card-foreground flex flex-col gap-4 rounded-xl border border-border py-4 shadow-xs", local.class);
49
+ return cn(cardVariants({ size: local.size }), local.class);
32
50
  } }, rest), false, false);
33
51
  return _el$;
34
52
  })();
@@ -97,6 +115,6 @@ function CardFooter(props) {
97
115
  })();
98
116
  }
99
117
  //#endregion
100
- export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
118
+ export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cardVariants };
101
119
 
102
120
  //# sourceMappingURL=card.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"card.js","names":["ComponentProps","JSX","splitProps","cn","headingVariants","Card","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","class","CardHeader","_el$2","_tmpl$2","CardTitle","_el$3","_tmpl$3","size","leading","CardDescription","_el$4","_tmpl$4","CardAction","_el$5","_tmpl$5","CardContent","_el$6","_tmpl$6","CardFooter","_el$7","_tmpl$7","CardProps","HTMLAttributes","HTMLDivElement","_$mergeProps"],"sources":["../../../../src/components/ui/card/card.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { headingVariants } from '../typography'\n\n/**\n * Card.\n *\n * A surface that sits on the canvas. Every card carries its own edge — a\n * border — because in the light theme `--card` is one faint step off a white\n * `--background`, and a borderless card there all but disappears. Making the border\n * structural rather than optional is what stops one app's cards from reading\n * as floating panels and another's as nothing at all.\n *\n * The parts are separate components rather than a template because a card's\n * header, content and footer have different padding on purpose: the header and\n * footer are tight, the content breathes.\n */\nexport function Card(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"card\"\n class={cn(\n 'bg-card text-card-foreground flex flex-col gap-4 rounded-xl border border-border py-4 shadow-xs',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function CardHeader(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div data-slot=\"card-header\" class={cn('flex flex-col gap-1 px-4', local.class)} {...rest} />\n )\n}\n\nexport function CardTitle(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"card-title\"\n class={cn(headingVariants({ size: 'card', leading: 'none' }), local.class)}\n {...rest}\n />\n )\n}\n\nexport function CardDescription(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"card-description\"\n class={cn('text-muted-foreground text-sm', local.class)}\n {...rest}\n />\n )\n}\n\nexport function CardAction(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"card-action\"\n class={cn('col-start-2 row-span-2 row-start-1 self-start justify-self-end', local.class)}\n {...rest}\n />\n )\n}\n\nexport function CardContent(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return <div data-slot=\"card-content\" class={cn('px-4', local.class)} {...rest} />\n}\n\nexport function CardFooter(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return <div data-slot=\"card-footer\" class={cn('flex items-center px-4', local.class)} {...rest} />\n}\n\nexport type CardProps = ComponentProps<'div'> & JSX.HTMLAttributes<HTMLDivElement>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,SAAgBK,KAAKC,OAA8B;CACjD,MAAM,CAACC,OAAOC,QAAQN,WAAWI,OAAO,CAAC,OAAO,CAAC;CACjD,cAAA;EAAA,IAAAG,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWT,GACL,mGACAI,MAAMM,KACR;EAAC,EAAA,GACGL,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAC;CAAA,EAAA,CAAA;AAGd;AAEA,SAAgBK,WAAWR,OAA8B;CACvD,MAAM,CAACC,OAAOC,QAAQN,WAAWI,OAAO,CAAC,OAAO,CAAC;CACjD,cAAA;EAAA,IAAAS,QAAAC,QAAA;EAAAL,OAAAI,OAAAH,WAAA,EAAA,KAAA,WAAA;GAAA,OACsCT,GAAG,4BAA4BI,MAAMM,KAAK;EAAC,EAAA,GAAML,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAO;CAAA,EAAA,CAAA;AAE7F;AAEA,SAAgBE,UAAUX,OAA8B;CACtD,MAAM,CAACC,OAAOC,QAAQN,WAAWI,OAAO,CAAC,OAAO,CAAC;CACjD,cAAA;EAAA,IAA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AO,CAAC;CACjD,cAAA;EAAA,IAAA0B,QAAAC,QAAA;EAAAtB,OAAAqB,OAAApB,WAAA,EAAA,KAAA,WAAA;GAAA,OAA2CT,GAAG,0BAA0BI,MAAMM,KAAK;EAAC,EAAA,GAAML,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAwB;CAAA,EAAA,CAAA;AAChG"}
1
+ {"version":3,"file":"card.js","names":["ComponentProps","splitProps","cva","VariantProps","cn","headingVariants","cardVariants","variants","size","default","sm","flush","defaultVariants","CardProps","Card","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","class","CardHeader","_el$2","_tmpl$2","CardTitle","_el$3","_tmpl$3","leading","CardDescription","_el$4","_tmpl$4","CardAction","_el$5","_tmpl$5","CardContent","_el$6","_tmpl$6","CardFooter","_el$7","_tmpl$7","_$mergeProps"],"sources":["../../../../src/components/ui/card/card.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { cva, type VariantProps } from '#lib/variants'\nimport { cn } from '#lib/utils'\nimport { headingVariants } from '../typography'\n\n/**\n * Card.\n *\n * A surface that sits on the canvas. Every card carries its own edge — a\n * border — because in the light theme `--card` is one faint step off a white\n * `--background`, and a borderless card there all but disappears. Making the border\n * structural rather than optional is what stops one app's cards from reading\n * as floating panels and another's as nothing at all.\n *\n * The parts are separate components rather than a template because a card's\n * header, content and footer have different padding on purpose: the header and\n * footer are tight, the content breathes.\n *\n * `size` is the card's padding rung, so a caller never sets `p-*` or `gap-*` on\n * a card to make it denser. `sm` tightens the card and its header, content and\n * footer together (the parts' inline padding follows the card, so they stay\n * aligned with each other); `flush` removes the block padding and gap for a\n * card whose body is a list of rows or a scroll area that runs edge to edge.\n */\nexport const cardVariants = cva(\n 'bg-card text-card-foreground flex flex-col rounded-xl border border-border shadow-xs',\n {\n variants: {\n size: {\n /** 16px block padding and gap; the parts carry 16px inline padding. */\n default: 'gap-4 py-4',\n /** 12px everywhere: a dense settings or status card. */\n sm: 'gap-3 py-3 *:data-[slot=card-content]:px-3 *:data-[slot=card-footer]:px-3 *:data-[slot=card-header]:px-3',\n /** No block padding or gap: the card hosts a row list or a scroller. */\n flush: 'gap-0 py-0',\n },\n },\n defaultVariants: { size: 'default' },\n }\n)\n\nexport type CardProps = ComponentProps<'div'> & VariantProps<typeof cardVariants>\n\nexport function Card(props: CardProps) {\n const [local, rest] = splitProps(props, ['class', 'size'])\n return (\n <div data-slot=\"card\" class={cn(cardVariants({ size: local.size }), local.class)} {...rest} />\n )\n}\n\nexport function CardHeader(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div data-slot=\"card-header\" class={cn('flex flex-col gap-1 px-4', local.class)} {...rest} />\n )\n}\n\nexport function CardTitle(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"card-title\"\n class={cn(headingVariants({ size: 'card', leading: 'none' }), local.class)}\n {...rest}\n />\n )\n}\n\nexport function CardDescription(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"card-description\"\n class={cn('text-muted-foreground text-sm', local.class)}\n {...rest}\n />\n )\n}\n\nexport function CardAction(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"card-action\"\n class={cn('col-start-2 row-span-2 row-start-1 self-start justify-self-end', local.class)}\n {...rest}\n />\n )\n}\n\nexport function CardContent(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return <div data-slot=\"card-content\" class={cn('px-4', local.class)} {...rest} />\n}\n\nexport function CardFooter(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return <div data-slot=\"card-footer\" class={cn('flex items-center px-4', local.class)} {...rest} />\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,IAAaM,eAAeJ,IAC1B,wFACA;CACEK,UAAU,EACRC,MAAM;;EAEJC,S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,OAAAW,OAAAV,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWjB,GAAG,iCAAiCY,MAAMM,KAAK;EAAC,EAAA,GACnDL,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAc;CAAA,EAAA,CAAA;AAGd;AAEA,SAAgBE,WAAWlB,OAA8B;CACvD,MAAM,CAACC,OAAOC,QAAQhB,WAAWc,OAAO,CAAC,OAAO,CAAC;CACjD,cAAA;EAAA,IAAAmB,QAAAC,QAAA;EAAAf,OAAAc,OAAAb,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWjB,GAAG,kEAAkEY,MAAMM,KAAK;EAAC,EAAA,GACpFL,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAiB;CAAA,EAAA,CAAA;AAGd;AAEA,SAAgBE,YAAYrB,OAA8B;CACxD,MAAM,CAACC,OAAOC,QAAQhB,WAAWc,OAAO,CAAC,OAAO,CAAC;CACjD,cAAA;EAAA,IAAAsB,QAAAC,QAAA;EAAAlB,OAAAiB,OAAAhB,WAAA,EAAA,KAAA,WAAA;GAAA,OAA4CjB,GAAG,QAAQY,MAAMM,KAAK;EAAC,EAAA,GAAML,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAoB;CAAA,EAAA,CAAA;AAC/E;AAEA,SAAgBE,WAAWxB,OAA8B;CACvD,MAAM,CAACC,OAAOC,QAAQhB,WAAWc,OAAO,CAAC,OAAO,CAAC;CACjD,cAAA;EAAA,IAAAyB,QAAAC,QAAA;EAAArB,OAAAoB,OAAAnB,WAAA,EAAA,KAAA,WAAA;GAAA,OAA2CjB,GAAG,0BAA0BY,MAAMM,KAAK;EAAC,EAAA,GAAML,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAuB;CAAA,EAAA,CAAA;AAChG"}
@@ -1,2 +1,2 @@
1
- export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CardProps, } from './card';
1
+ export { Card, cardVariants, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CardProps, } from './card';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,UAAU,EACV,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,SAAS,EACT,KAAK,SAAS,GACf,MAAM,QAAQ,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,YAAY,EACZ,UAAU,EACV,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,SAAS,EACT,KAAK,SAAS,GACf,MAAM,QAAQ,CAAA"}
@@ -1,2 +1,2 @@
1
- import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "./card.js";
2
- export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
1
+ import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cardVariants } from "./card.js";
2
+ export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cardVariants };
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/checkbox/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAEpE,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAKnD;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,EAAE,UAAU,CAAC,GAAG;IACrF,8EAA8E;IAC9E,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB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c,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,eAGhF;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,eAAe,CAAC,WAAW,CAAC,eAQ5F"}
@@ -35,6 +35,7 @@ function Checkbox$1(props) {
35
35
  "aria-errormessage": local["aria-errormessage"]
36
36
  });
37
37
  return createComponent(Checkbox, mergeProps({
38
+ "data-slot": "checkbox",
38
39
  get id() {
39
40
  return field ? void 0 : local.id;
40
41
  },
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.js","names":["Checkbox","KobalteCheckbox","Check","Minus","ComponentProps","JSX","splitProps","useFormFieldControl","cn","CheckboxProps","Omit","inputId","controlClass","labelClass","descriptionClass","label","Element","description","children","props","local","rest","field","id","_$createComponent","_$mergeProps","undefined","title","class","Input","aria-label","aria-labelledby","aria-describedby","aria-invalid","aria-errormessage","aria-busy","Control","Indicator","_$memo","indeterminate","_el$","_tmpl$","_$insert","_c$","Label","_c$2","Description","CheckboxLabel","CheckboxDescription","Checkbox","_$createComponent","KobalteCheckbox","_$mergeProps","_$memo"],"sources":["../../../../src/components/ui/checkbox/checkbox.tsx"],"sourcesContent":["import { Checkbox as KobalteCheckbox } from '@kobalte/core/checkbox'\nimport { Check, Minus } from 'lucide-solid'\nimport type { ComponentProps, JSX } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { useFormFieldControl } from '#lib/form-field'\nimport { cn } from '#lib/utils'\n\n/**\n * Checkbox.\n *\n * Three states: unchecked, checked, and indeterminate. Indeterminate is what a\n * \"select all\" box shows when only some rows are selected; Kobalte expresses\n * it through `checked=\"indeterminate\"` rather than a second boolean, so there\n * is no way to render a box that is both.\n *\n * The paint is `Control` and the value is a real hidden `Input`, so the control\n * participates in a form submission and in native validation while looking\n * nothing like a browser checkbox. Focus is tracked by the input, which is why\n * the ring lives on the control and reads the input's focus state.\n */\nexport type CheckboxProps = Omit<ComponentProps<typeof KobalteCheckbox>, 'children'> & {\n /** ID for the hidden native checkbox input; useful with an external label. */\n inputId?: string\n controlClass?: string\n labelClass?: string\n descriptionClass?: string\n label?: JSX.Element\n description?: JSX.Element\n /**\n * Replaces the control and label. Omit it to get the default control beside\n * `label` and `description`; supply it to compose the parts yourself.\n */\n children?: JSX.Element\n}\n\nexport function Checkbox(props: CheckboxProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'controlClass',\n 'labelClass',\n 'descriptionClass',\n 'children',\n 'label',\n 'description',\n 'indeterminate',\n 'aria-label',\n 'aria-labelledby',\n 'aria-describedby',\n 'aria-invalid',\n 'aria-errormessage',\n 'aria-busy',\n 'id',\n 'inputId',\n 'title',\n ])\n const field = useFormFieldControl('control', {\n id: local.inputId ?? local.id,\n 'aria-label': local['aria-label'],\n 'aria-labelledby': local['aria-labelledby'],\n 'aria-describedby': local['aria-describedby'],\n 'aria-invalid': local['aria-invalid'],\n 'aria-errormessage': local['aria-errormessage'],\n })\n\n return (\n <KobalteCheckbox\n id={field ? undefined : local.id}\n title={local.title}\n class={cn('group/checkbox flex items-start gap-2.5', local.class)}\n {...rest}\n >\n {/*\n * The name goes on the input, which is what carries the value and takes\n * focus. On the Root it would land on a plain div and name nothing — the\n * box would announce its state with no subject.\n */}\n <KobalteCheckbox.Input\n id={field?.id ?? local.inputId}\n aria-label={local['aria-label']}\n aria-labelledby={field?.['aria-labelledby'] ?? local['aria-labelledby']}\n aria-describedby={field?.['aria-describedby'] ?? local['aria-describedby']}\n aria-invalid={field?.['aria-invalid'] ?? local['aria-invalid']}\n aria-errormessage={field?.['aria-errormessage'] ?? local['aria-errormessage']}\n aria-busy={local['aria-busy']}\n title={local.title}\n />\n <KobalteCheckbox.Control\n class={cn(\n 'border-input bg-transparent flex size-4 shrink-0 items-center justify-center rounded-sm border',\n 'transition-[color,box-shadow,border-color,background-color] ease-out outline-none',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'data-[checked]:bg-primary data-[checked]:border-primary data-[checked]:text-primary-foreground',\n 'data-[indeterminate]:bg-primary data-[indeterminate]:border-primary data-[indeterminate]:text-primary-foreground',\n 'data-[invalid]:border-destructive data-[invalid]:ring-3 data-[invalid]:ring-destructive-subtle',\n 'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50',\n local.controlClass\n )}\n >\n <KobalteCheckbox.Indicator class=\"flex items-center justify-center\">\n {local.indeterminate ? <Minus class=\"size-3\" /> : <Check class=\"size-3\" />}\n </KobalteCheckbox.Indicator>\n </KobalteCheckbox.Control>\n {local.children ??\n (local.label || local.description ? (\n <div class=\"grid gap-0.5\">\n {local.label ? (\n <KobalteCheckbox.Label class={cn('text-sm font-medium', local.labelClass)}>\n {local.label}\n </KobalteCheckbox.Label>\n ) : null}\n {local.description ? (\n <KobalteCheckbox.Description\n class={cn('text-muted-foreground text-sm', local.descriptionClass)}\n >\n {local.description}\n </KobalteCheckbox.Description>\n ) : null}\n </div>\n ) : null)}\n </KobalteCheckbox>\n )\n}\n\n/**\n * The box's own label. Valid only inside a `<Checkbox>`, for the same reason as\n * `SwitchLabel`: outside its root there is no control to associate with.\n */\nexport function CheckboxLabel(props: ComponentProps<typeof KobalteCheckbox.Label>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteCheckbox.Label class={cn('text-sm font-medium', local.class)} {...rest} />\n}\n\nexport function CheckboxDescription(props: ComponentProps<typeof KobalteCheckbox.Description>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteCheckbox.Description\n class={cn('text-muted-foreground text-sm', local.class)}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;;AAmCA,SAAgBA,WAASmB,OAAsB;CAC7C,MAAM,CAACC,OAAOC,QAAQf,WAAWa,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAO,CACR;CACD,MAAMG,QAAQf,oBAAoB,WAAW;EAC3CgB,IAAIH,MAAMT,WAAWS,MAAMG;EAC3B,cAAcH,M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Q,KAAK;CAAC,EAAA,GACnDP,IAAI,CAAA;AAGd"}
1
+ {"version":3,"file":"checkbox.js","names":["Checkbox","KobalteCheckbox","Check","Minus","ComponentProps","JSX","splitProps","useFormFieldControl","cn","CheckboxProps","Omit","inputId","controlClass","labelClass","descriptionClass","label","Element","description","children","props","local","rest","field","id","_$createComponent","_$mergeProps","undefined","title","class","Input","aria-label","aria-labelledby","aria-describedby","aria-invalid","aria-errormessage","aria-busy","Control","Indicator","_$memo","indeterminate","_el$","_tmpl$","_$insert","_c$","Label","_c$2","Description","CheckboxLabel","CheckboxDescription","Checkbox","_$createComponent","KobalteCheckbox","_$mergeProps","_$memo"],"sources":["../../../../src/components/ui/checkbox/checkbox.tsx"],"sourcesContent":["import { Checkbox as KobalteCheckbox } from '@kobalte/core/checkbox'\nimport { Check, Minus } from 'lucide-solid'\nimport type { ComponentProps, JSX } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { useFormFieldControl } from '#lib/form-field'\nimport { cn } from '#lib/utils'\n\n/**\n * Checkbox.\n *\n * Three states: unchecked, checked, and indeterminate. Indeterminate is what a\n * \"select all\" box shows when only some rows are selected; Kobalte expresses\n * it through `checked=\"indeterminate\"` rather than a second boolean, so there\n * is no way to render a box that is both.\n *\n * The paint is `Control` and the value is a real hidden `Input`, so the control\n * participates in a form submission and in native validation while looking\n * nothing like a browser checkbox. Focus is tracked by the input, which is why\n * the ring lives on the control and reads the input's focus state.\n */\nexport type CheckboxProps = Omit<ComponentProps<typeof KobalteCheckbox>, 'children'> & {\n /** ID for the hidden native checkbox input; useful with an external label. */\n inputId?: string\n controlClass?: string\n labelClass?: string\n descriptionClass?: string\n label?: JSX.Element\n description?: JSX.Element\n /**\n * Replaces the control and label. Omit it to get the default control beside\n * `label` and `description`; supply it to compose the parts yourself.\n */\n children?: JSX.Element\n}\n\nexport function Checkbox(props: CheckboxProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'controlClass',\n 'labelClass',\n 'descriptionClass',\n 'children',\n 'label',\n 'description',\n 'indeterminate',\n 'aria-label',\n 'aria-labelledby',\n 'aria-describedby',\n 'aria-invalid',\n 'aria-errormessage',\n 'aria-busy',\n 'id',\n 'inputId',\n 'title',\n ])\n const field = useFormFieldControl('control', {\n id: local.inputId ?? local.id,\n 'aria-label': local['aria-label'],\n 'aria-labelledby': local['aria-labelledby'],\n 'aria-describedby': local['aria-describedby'],\n 'aria-invalid': local['aria-invalid'],\n 'aria-errormessage': local['aria-errormessage'],\n })\n\n return (\n <KobalteCheckbox\n data-slot=\"checkbox\"\n id={field ? undefined : local.id}\n title={local.title}\n class={cn('group/checkbox flex items-start gap-2.5', local.class)}\n {...rest}\n >\n {/*\n * The name goes on the input, which is what carries the value and takes\n * focus. On the Root it would land on a plain div and name nothing — the\n * box would announce its state with no subject.\n */}\n <KobalteCheckbox.Input\n id={field?.id ?? local.inputId}\n aria-label={local['aria-label']}\n aria-labelledby={field?.['aria-labelledby'] ?? local['aria-labelledby']}\n aria-describedby={field?.['aria-describedby'] ?? local['aria-describedby']}\n aria-invalid={field?.['aria-invalid'] ?? local['aria-invalid']}\n aria-errormessage={field?.['aria-errormessage'] ?? local['aria-errormessage']}\n aria-busy={local['aria-busy']}\n title={local.title}\n />\n <KobalteCheckbox.Control\n class={cn(\n 'border-input bg-transparent flex size-4 shrink-0 items-center justify-center rounded-sm border',\n 'transition-[color,box-shadow,border-color,background-color] ease-out outline-none',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'data-[checked]:bg-primary data-[checked]:border-primary data-[checked]:text-primary-foreground',\n 'data-[indeterminate]:bg-primary data-[indeterminate]:border-primary data-[indeterminate]:text-primary-foreground',\n 'data-[invalid]:border-destructive data-[invalid]:ring-3 data-[invalid]:ring-destructive-subtle',\n 'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50',\n local.controlClass\n )}\n >\n <KobalteCheckbox.Indicator class=\"flex items-center justify-center\">\n {local.indeterminate ? <Minus class=\"size-3\" /> : <Check class=\"size-3\" />}\n </KobalteCheckbox.Indicator>\n </KobalteCheckbox.Control>\n {local.children ??\n (local.label || local.description ? (\n <div class=\"grid gap-0.5\">\n {local.label ? (\n <KobalteCheckbox.Label class={cn('text-sm font-medium', local.labelClass)}>\n {local.label}\n </KobalteCheckbox.Label>\n ) : null}\n {local.description ? (\n <KobalteCheckbox.Description\n class={cn('text-muted-foreground text-sm', local.descriptionClass)}\n >\n {local.description}\n </KobalteCheckbox.Description>\n ) : null}\n </div>\n ) : null)}\n </KobalteCheckbox>\n )\n}\n\n/**\n * The box's own label. Valid only inside a `<Checkbox>`, for the same reason as\n * `SwitchLabel`: outside its root there is no control to associate with.\n */\nexport function CheckboxLabel(props: ComponentProps<typeof KobalteCheckbox.Label>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteCheckbox.Label class={cn('text-sm font-medium', local.class)} {...rest} />\n}\n\nexport function CheckboxDescription(props: ComponentProps<typeof KobalteCheckbox.Description>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteCheckbox.Description\n class={cn('text-muted-foreground text-sm', local.class)}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;;AAmCA,SAAgBA,WAASmB,OAAsB;CAC7C,MAAM,CAACC,OAAOC,QAAQf,WAAWa,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAO,CACR;CACD,MAAMG,QAAQf,oBAAoB,WAAW;EAC3CgB,IAAIH,MAAMT,WAAWS,MAAMG;EAC3B,cAAcH,MAAM;EACpB,mBAAmBA,MAAM;EACzB,oBAAoBA,MAAM;EAC1B,gBAAgBA,MAAM;EACtB,qBAAqBA,MAAM;CAC7B,CAAC;CAED,OAAAI,gBACGvB,UAAewB,WAAA;EAAA,aAAA;EAAA,IAEdF,KAAE;GAAA,OAAED,QAAQI,KAAAA,IAAYN,MAAMG;EAAE;EAAA,IAChCI,QAAK;GAAA,OAAEP,M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,SAAgB2C,OAAK;MAAA,KAAA,WAAA;OAAA,OAAQpC,GAAG,uBAAuBY,MAAMP,UAAU;MAAC;MAAA,IAAAK,WAAA;OAAA,OACtEE,MAAML;MAAK;KAAA,CAAA,IAEZ;IAAI,EAAA,CAAA,GAAA,IAAA;IAAA2B,OAAAF,aAAA;KAAA,IAAAK,OAAAP,WAAA,CAAA,CACPlB,MAAMH,WAAW;KAAA,aAAjB4B,KAAA,IAAArB,gBACEvB,SAAgB6C,aAAW;MAAA,KAAA,WAAA;OAAA,OACnBtC,GAAG,iCAAiCY,MAAMN,gBAAgB;MAAC;MAAA,IAAAI,WAAA;OAAA,OAEjEE,MAAMH;MAAW;KAAA,CAAA,IAElB;IAAI,EAAA,CAAA,GAAA,IAAA;IAAA,OAAAuB;GAAA,EAAA,CAAA,IAER,KAAK;EAAA;CAAA,EAAA,CAAA,CAAA;AAGjB;;;;;AAMA,SAAgBO,cAAc5B,OAAqD;CACjF,MAAM,CAACC,OAAOC,QAAQf,WAAWa,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAK,gBAAQvB,SAAgB2C,OAAKnB,WAAA,EAAA,KAAA,WAAA;EAAA,OAAQjB,GAAG,uBAAuBY,MAAMQ,KAAK;CAAC,EAAA,GAAMP,IAAI,CAAA;AACvF;AAEA,SAAgB2B,oBAAoB7B,OAA2D;CAC7F,MAAM,CAACC,OAAOC,QAAQf,WAAWa,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAK,gBACGvB,SAAgB6C,aAAWrB,WAAA,EAAA,KAAA,WAAA;EAAA,OACnBjB,GAAG,iCAAiCY,MAAMQ,KAAK;CAAC,EAAA,GACnDP,IAAI,CAAA;AAGd"}
@@ -40,7 +40,22 @@ export type DialogContentProps = ComponentProps<typeof KobalteDialogContent> & {
40
40
  closeButton?: JSX.Element | false;
41
41
  /** Use a 1rem inset as the positioner bounds for tall, viewport-filling surfaces. */
42
42
  positioner?: 'default' | 'inset';
43
+ /**
44
+ * The panel's maximum width. `md` (32rem) is the default and right for a
45
+ * confirmation or a short form; `sm` (28rem) for a single question; `lg`
46
+ * (42rem) for a picker or a form with two columns; `xl` (48rem) for a
47
+ * multi-step flow that needs a table or a preview beside its fields.
48
+ */
49
+ size?: DialogContentSize;
50
+ };
51
+ /** The dialog width ladder, so a caller picks a rung instead of a `max-w-*`. */
52
+ export declare const dialogContentSizes: {
53
+ readonly sm: "max-w-md";
54
+ readonly md: "max-w-lg";
55
+ readonly lg: "max-w-2xl";
56
+ readonly xl: "max-w-3xl";
43
57
  };
58
+ export type DialogContentSize = keyof typeof dialogContentSizes;
44
59
  export declare function DialogContent(props: DialogContentProps): JSX.Element;
45
60
  /**
46
61
  * The dialog's title block. `band` steps it onto the elevation ladder's
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/dialog/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,IAAI,aAAa,EACvB,OAAO,IAAI,oBAAoB,EAC/B,OAAO,IAAI,oBAAoB,EAChC,MAAM,sBAAsB,CAAA;AAG7B,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AA+C7D,KAAK,6BAA6B,GAAG;IACnC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;IACvB,eAAe,CAAC,EAAE,QAAQ,CAAC,WAAW,GAAG,SAAS,CAAC,CAAA;IACnD,eAAe,CAAC,EAAE,cAAc,CAAC,OAAO,oBAAoB,CAAC,CAAC,iBAAiB,CAAC,CAAA;IAChF,gBAAgB,CAAC,EAAE,cAAc,CAAC,OAAO,oBAAoB,CAAC,CAAC,kBAAkB,CAAC,CAAA;CACnF,CAAA;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,IAAI,EACJ,eAAe,EACf,eAAe,EAAE,qBAAqB,EACtC,gBAAgB,EAAE,sBAAsB,GACzC,EAAE,6BAA6B;6BA6DE,KAAK;8B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,CAAC,OAAO,GAAG,KAAK,CAAA;IACjC,qFAAqF;IACrF,UAAU,CAAC,EAAE,SAAS,GAAG,OAAO,CAAA;IAChC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,iBAAiB,CAAA;CACzB,CAAA;AAED,gFAAgF;AAChF,eAAO,MAAM,kBAAkB;;;;;CAKrB,CAAA;AAEV,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,kBAAkB,CAAA;AAE/D,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,eA8CtD;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,eAS7E;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,eASxD;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,aAAa,CAAC,KAAK,CAAC,eAG5E;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,aAAa,CAAC,WAAW,CAAC,eAKxF;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,aAAa,CAAC,WAAW,CAAC,eAGxF;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,aAAa,CAAC,WAAW,CAAC,eAGlF"}
@@ -158,18 +158,26 @@ function DialogOverlay(props) {
158
158
  return cn(overlayScrim, "data-expanded:animate-in data-expanded:fade-in-0 data-closed:animate-out data-closed:fade-out-0", local.class);
159
159
  } }, rest));
160
160
  }
161
+ /** The dialog width ladder, so a caller picks a rung instead of a `max-w-*`. */
162
+ var dialogContentSizes = {
163
+ sm: "max-w-md",
164
+ md: "max-w-lg",
165
+ lg: "max-w-2xl",
166
+ xl: "max-w-3xl"
167
+ };
161
168
  function DialogContent(props) {
162
169
  const [local, rest] = splitProps(props, [
163
170
  "class",
164
171
  "children",
165
172
  "closeButton",
166
- "positioner"
173
+ "positioner",
174
+ "size"
167
175
  ]);
168
176
  return createComponent(Dialog.Portal, { get children() {
169
177
  return [createComponent(DialogOverlay, {}), (() => {
170
178
  var _el$ = _tmpl$();
171
179
  insert(_el$, createComponent(Content, mergeProps({ get ["class"]() {
172
- return cn(dialogSurface, overlayMotion, "relative grid w-full max-w-lg gap-4 p-5", local.class);
180
+ return cn(dialogSurface, overlayMotion, "relative grid w-full gap-4 p-5", dialogContentSizes[local.size ?? "md"], local.class);
173
181
  } }, rest, { get children() {
174
182
  return [memo(() => local.children), createComponent(Show, {
175
183
  get when() {
@@ -256,6 +264,6 @@ function DialogClose(props) {
256
264
  } }, rest));
257
265
  }
258
266
  //#endregion
259
- export { Dialog$1 as Dialog, DialogClose, DialogCloseButton, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, createDialogFocusRestoration };
267
+ export { Dialog$1 as Dialog, DialogClose, DialogCloseButton, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, createDialogFocusRestoration, dialogContentSizes };
260
268
 
261
269
  //# sourceMappingURL=dialog.js.map