@epilot/spark-ui 0.26.0 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. package/dist/components/accordion.cjs.map +1 -1
  2. package/dist/components/accordion.d.cts +1 -1
  3. package/dist/components/accordion.d.ts +1 -1
  4. package/dist/components/accordion.js.map +1 -1
  5. package/dist/components/alert-dialog.cjs +2 -2
  6. package/dist/components/alert-dialog.cjs.map +1 -1
  7. package/dist/components/alert-dialog.js +2 -2
  8. package/dist/components/alert-dialog.js.map +1 -1
  9. package/dist/components/attachment.d.cts +1 -1
  10. package/dist/components/attachment.d.ts +1 -1
  11. package/dist/components/avatar.d.cts +1 -1
  12. package/dist/components/avatar.d.ts +1 -1
  13. package/dist/components/badge.cjs +10 -2
  14. package/dist/components/badge.cjs.map +1 -1
  15. package/dist/components/badge.d.cts +2 -1
  16. package/dist/components/badge.d.ts +2 -1
  17. package/dist/components/badge.js +10 -2
  18. package/dist/components/badge.js.map +1 -1
  19. package/dist/components/banner.d.cts +1 -1
  20. package/dist/components/banner.d.ts +1 -1
  21. package/dist/components/box.d.cts +1 -1
  22. package/dist/components/box.d.ts +1 -1
  23. package/dist/components/bubble.cjs +1 -1
  24. package/dist/components/bubble.cjs.map +1 -1
  25. package/dist/components/bubble.d.cts +1 -1
  26. package/dist/components/bubble.d.ts +1 -1
  27. package/dist/components/bubble.js +1 -1
  28. package/dist/components/bubble.js.map +1 -1
  29. package/dist/components/button-group.d.cts +1 -1
  30. package/dist/components/button-group.d.ts +1 -1
  31. package/dist/components/button.cjs +27 -6
  32. package/dist/components/button.cjs.map +1 -1
  33. package/dist/components/button.d.cts +9 -8
  34. package/dist/components/button.d.ts +9 -8
  35. package/dist/components/button.js +27 -6
  36. package/dist/components/button.js.map +1 -1
  37. package/dist/components/callout.cjs +1 -1
  38. package/dist/components/callout.cjs.map +1 -1
  39. package/dist/components/callout.d.cts +1 -1
  40. package/dist/components/callout.d.ts +1 -1
  41. package/dist/components/callout.js +1 -1
  42. package/dist/components/callout.js.map +1 -1
  43. package/dist/components/card.cjs +8 -4
  44. package/dist/components/card.cjs.map +1 -1
  45. package/dist/components/card.d.cts +6 -2
  46. package/dist/components/card.d.ts +6 -2
  47. package/dist/components/card.js +8 -4
  48. package/dist/components/card.js.map +1 -1
  49. package/dist/components/checkbox-group.cjs +31 -0
  50. package/dist/components/checkbox-group.cjs.map +1 -0
  51. package/dist/components/checkbox-group.d.cts +27 -0
  52. package/dist/components/checkbox-group.d.ts +27 -0
  53. package/dist/components/checkbox-group.js +28 -0
  54. package/dist/components/checkbox-group.js.map +1 -0
  55. package/dist/components/checkbox.d.cts +1 -1
  56. package/dist/components/checkbox.d.ts +1 -1
  57. package/dist/components/dialog.cjs +2 -2
  58. package/dist/components/dialog.cjs.map +1 -1
  59. package/dist/components/dialog.js +2 -2
  60. package/dist/components/dialog.js.map +1 -1
  61. package/dist/components/drawer.cjs +1 -1
  62. package/dist/components/drawer.cjs.map +1 -1
  63. package/dist/components/drawer.js +1 -1
  64. package/dist/components/drawer.js.map +1 -1
  65. package/dist/components/empty-state.cjs +3 -13
  66. package/dist/components/empty-state.cjs.map +1 -1
  67. package/dist/components/empty-state.js +3 -13
  68. package/dist/components/empty-state.js.map +1 -1
  69. package/dist/components/energy-breakdown.cjs +1 -1
  70. package/dist/components/energy-breakdown.cjs.map +1 -1
  71. package/dist/components/energy-breakdown.js +1 -1
  72. package/dist/components/energy-breakdown.js.map +1 -1
  73. package/dist/components/entity-card.cjs +1 -1
  74. package/dist/components/entity-card.cjs.map +1 -1
  75. package/dist/components/entity-card.js +1 -1
  76. package/dist/components/entity-card.js.map +1 -1
  77. package/dist/components/field.cjs +113 -18
  78. package/dist/components/field.cjs.map +1 -1
  79. package/dist/components/field.d.cts +16 -3
  80. package/dist/components/field.d.ts +16 -3
  81. package/dist/components/field.js +114 -20
  82. package/dist/components/field.js.map +1 -1
  83. package/dist/components/input-group.cjs +9 -9
  84. package/dist/components/input-group.cjs.map +1 -1
  85. package/dist/components/input-group.d.cts +1 -1
  86. package/dist/components/input-group.d.ts +1 -1
  87. package/dist/components/input-group.js +9 -9
  88. package/dist/components/input-group.js.map +1 -1
  89. package/dist/components/input.d.cts +1 -1
  90. package/dist/components/input.d.ts +1 -1
  91. package/dist/components/list.cjs +21 -5
  92. package/dist/components/list.cjs.map +1 -1
  93. package/dist/components/list.d.cts +13 -5
  94. package/dist/components/list.d.ts +13 -5
  95. package/dist/components/list.js +21 -5
  96. package/dist/components/list.js.map +1 -1
  97. package/dist/components/marker.cjs +1 -1
  98. package/dist/components/marker.cjs.map +1 -1
  99. package/dist/components/marker.js +1 -1
  100. package/dist/components/marker.js.map +1 -1
  101. package/dist/components/message-scroller.cjs +1 -1
  102. package/dist/components/message-scroller.cjs.map +1 -1
  103. package/dist/components/message-scroller.js +1 -1
  104. package/dist/components/message-scroller.js.map +1 -1
  105. package/dist/components/page-header.d.cts +1 -1
  106. package/dist/components/page-header.d.ts +1 -1
  107. package/dist/components/pill.d.cts +1 -1
  108. package/dist/components/pill.d.ts +1 -1
  109. package/dist/components/radio.cjs +6 -2
  110. package/dist/components/radio.cjs.map +1 -1
  111. package/dist/components/radio.d.cts +4 -2
  112. package/dist/components/radio.d.ts +4 -2
  113. package/dist/components/radio.js +6 -2
  114. package/dist/components/radio.js.map +1 -1
  115. package/dist/components/rating.cjs +167 -0
  116. package/dist/components/rating.cjs.map +1 -0
  117. package/dist/components/rating.d.cts +50 -0
  118. package/dist/components/rating.d.ts +50 -0
  119. package/dist/components/rating.js +162 -0
  120. package/dist/components/rating.js.map +1 -0
  121. package/dist/components/schedule-list.cjs +1 -1
  122. package/dist/components/schedule-list.cjs.map +1 -1
  123. package/dist/components/schedule-list.js +1 -1
  124. package/dist/components/schedule-list.js.map +1 -1
  125. package/dist/components/scroll-area.cjs +9 -2
  126. package/dist/components/scroll-area.cjs.map +1 -1
  127. package/dist/components/scroll-area.d.cts +1 -1
  128. package/dist/components/scroll-area.d.ts +1 -1
  129. package/dist/components/scroll-area.js +10 -3
  130. package/dist/components/scroll-area.js.map +1 -1
  131. package/dist/components/segmented-control.d.cts +1 -1
  132. package/dist/components/segmented-control.d.ts +1 -1
  133. package/dist/components/select.d.cts +1 -1
  134. package/dist/components/select.d.ts +1 -1
  135. package/dist/components/selection-item.cjs +42 -0
  136. package/dist/components/selection-item.cjs.map +1 -0
  137. package/dist/components/selection-item.d.cts +25 -0
  138. package/dist/components/selection-item.d.ts +25 -0
  139. package/dist/components/selection-item.js +39 -0
  140. package/dist/components/selection-item.js.map +1 -0
  141. package/dist/components/sheet.cjs +1 -1
  142. package/dist/components/sheet.js +1 -1
  143. package/dist/components/skeleton.cjs +1 -1
  144. package/dist/components/skeleton.cjs.map +1 -1
  145. package/dist/components/skeleton.js +1 -1
  146. package/dist/components/skeleton.js.map +1 -1
  147. package/dist/components/slider.cjs +1 -1
  148. package/dist/components/slider.cjs.map +1 -1
  149. package/dist/components/slider.js +1 -1
  150. package/dist/components/slider.js.map +1 -1
  151. package/dist/components/spinner.cjs +81 -8
  152. package/dist/components/spinner.cjs.map +1 -1
  153. package/dist/components/spinner.js +81 -8
  154. package/dist/components/spinner.js.map +1 -1
  155. package/dist/components/stat-card.cjs +1 -1
  156. package/dist/components/stat-card.cjs.map +1 -1
  157. package/dist/components/stat-card.js +1 -1
  158. package/dist/components/stat-card.js.map +1 -1
  159. package/dist/components/stepper.cjs +3 -2
  160. package/dist/components/stepper.cjs.map +1 -1
  161. package/dist/components/stepper.js +3 -2
  162. package/dist/components/stepper.js.map +1 -1
  163. package/dist/components/switch-group.cjs +32 -0
  164. package/dist/components/switch-group.cjs.map +1 -0
  165. package/dist/components/switch-group.d.cts +26 -0
  166. package/dist/components/switch-group.d.ts +26 -0
  167. package/dist/components/switch-group.js +29 -0
  168. package/dist/components/switch-group.js.map +1 -0
  169. package/dist/components/switch.d.cts +1 -1
  170. package/dist/components/switch.d.ts +1 -1
  171. package/dist/components/tabs.cjs +32 -23
  172. package/dist/components/tabs.cjs.map +1 -1
  173. package/dist/components/tabs.d.cts +5 -5
  174. package/dist/components/tabs.d.ts +5 -5
  175. package/dist/components/tabs.js +32 -23
  176. package/dist/components/tabs.js.map +1 -1
  177. package/dist/components/textarea.d.cts +1 -1
  178. package/dist/components/textarea.d.ts +1 -1
  179. package/dist/components/theme.cjs +44 -2
  180. package/dist/components/theme.cjs.map +1 -1
  181. package/dist/components/theme.d.cts +4 -2
  182. package/dist/components/theme.d.ts +4 -2
  183. package/dist/components/theme.js +44 -2
  184. package/dist/components/theme.js.map +1 -1
  185. package/dist/components/toast.cjs +2 -2
  186. package/dist/components/toast.cjs.map +1 -1
  187. package/dist/components/toast.js +2 -2
  188. package/dist/components/toast.js.map +1 -1
  189. package/dist/components/toggle-group.d.cts +1 -1
  190. package/dist/components/toggle-group.d.ts +1 -1
  191. package/dist/components/toggle.d.cts +2 -2
  192. package/dist/components/toggle.d.ts +2 -2
  193. package/dist/lib/accent-theme.d.cts +1 -1
  194. package/dist/lib/accent-theme.d.ts +1 -1
  195. package/dist/lib/container-chrome.cjs +4 -4
  196. package/dist/lib/container-chrome.cjs.map +1 -1
  197. package/dist/lib/container-chrome.d.cts +1 -1
  198. package/dist/lib/container-chrome.d.ts +1 -1
  199. package/dist/lib/container-chrome.js +4 -4
  200. package/dist/lib/container-chrome.js.map +1 -1
  201. package/dist/lib/input-box-variants.cjs +8 -8
  202. package/dist/lib/input-box-variants.cjs.map +1 -1
  203. package/dist/lib/input-box-variants.d.cts +1 -1
  204. package/dist/lib/input-box-variants.d.ts +1 -1
  205. package/dist/lib/input-box-variants.js +8 -8
  206. package/dist/lib/input-box-variants.js.map +1 -1
  207. package/dist/lib/selection-list.cjs +17 -0
  208. package/dist/lib/selection-list.cjs.map +1 -0
  209. package/dist/lib/selection-list.d.cts +11 -0
  210. package/dist/lib/selection-list.d.ts +11 -0
  211. package/dist/lib/selection-list.js +15 -0
  212. package/dist/lib/selection-list.js.map +1 -0
  213. package/dist/lib/theme-types.cjs.map +1 -1
  214. package/dist/lib/theme-types.d.cts +2 -2
  215. package/dist/lib/theme-types.d.ts +2 -2
  216. package/dist/lib/theme-types.js.map +1 -1
  217. package/dist/lib/toggle-group-context.d.cts +2 -1
  218. package/dist/lib/toggle-group-context.d.ts +2 -1
  219. package/dist/styles/spark-default.css +12 -1
  220. package/dist/styles/theme.css +98 -0
  221. package/dist/{theme-types-Bn5E15-P.d.ts → theme-types-CKZzOmSa.d.cts} +11 -2
  222. package/dist/{theme-types-Bn5E15-P.d.cts → theme-types-CKZzOmSa.d.ts} +11 -2
  223. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox-group.cjs","names":["CheckboxGroupPrimitive","accentByColor","useFieldSetInvalid","selectionListClasses"],"sources":["../../src/components/checkbox-group.tsx"],"sourcesContent":["import { CheckboxGroup as CheckboxGroupPrimitive } from '@base-ui/react/checkbox-group'\nimport * as React from 'react'\nimport { accentByColor } from '../lib/accent-colors'\nimport { selectionListClasses } from '../lib/selection-list'\nimport type { SparkInputStyle, SparkStyle } from '../lib/theme-types'\nimport { cn } from '../utils/cn'\nimport type { SparkCheckboxColor } from './checkbox'\nimport { useFieldSetInvalid } from './field'\n\ntype CheckboxGroupProps = Omit<\n React.ComponentProps<typeof CheckboxGroupPrimitive>,\n 'style'\n> & {\n styleVariant?: SparkStyle\n color?: SparkCheckboxColor\n /** How many `--spark-layout-gap` units apart each checkbox sits. */\n gap?: number\n /** Shows the options as a styled list of `SelectionItem` rows; ignores `gap`. */\n listStyle?: SparkInputStyle\n // Base UI's own `style` also accepts a state-callback form; the gap-steps var below\n // needs a plain object to merge into, so narrow it to that here.\n style?: React.CSSProperties\n}\n\nfunction CheckboxGroup({\n className,\n styleVariant,\n color,\n gap = 3,\n listStyle,\n style,\n ...props\n}: CheckboxGroupProps) {\n const hasLook = styleVariant !== undefined || color !== undefined\n const dataStyle = hasLook ? (styleVariant ?? 'solid') : undefined\n const dataAccentColor = color ? accentByColor[color] : undefined\n const invalid = useFieldSetInvalid()\n\n return (\n <CheckboxGroupPrimitive\n data-slot=\"checkbox-group\"\n data-style={dataStyle}\n data-accent-color={dataAccentColor}\n data-list-style={listStyle}\n data-invalid={invalid}\n className={cn(\n 'grid',\n listStyle\n ? selectionListClasses[listStyle]\n : 'gap-[calc(var(--spark-layout-gap)*var(--checkbox-group-gap-steps,3))]',\n className,\n )}\n style={\n { '--checkbox-group-gap-steps': gap, ...style } as React.CSSProperties\n }\n {...props}\n />\n )\n}\n\nexport { CheckboxGroup }\nexport type { CheckboxGroupProps }\n"],"mappings":";;;;;;;;;;;;AAwBA,SAAS,cAAc,EACrB,WACA,cACA,OACA,MAAM,GACN,WACA,OACA,GAAG,SACkB;CAMrB,OACE,iBAAA,GAAA,kBAAA,KAACA,8BAAAA,eAAD;EACE,aAAU;EACV,cARY,iBAAiB,KAAA,KAAa,UAAU,KAAA,IAC3B,gBAAgB,UAAW,KAAA;EAQpD,qBAPoB,QAAQC,0BAAAA,cAAc,SAAS,KAAA;EAQnD,mBAAiB;EACjB,gBARYC,yBAAAA,mBAQQ;EACpB,YAAA,GAAA,GAAA,IACE,QACA,YACIC,2BAAAA,qBAAqB,aACrB,yEACJ,SACF;EACA,OACE;GAAE,8BAA8B;GAAK,GAAG;EAAM;EAEhD,GAAI;CACL,CAAA;AAEL"}
@@ -0,0 +1,27 @@
1
+ "use client";
2
+
3
+ import { g as SparkStyle, l as SparkInputStyle } from "../theme-types-CKZzOmSa.cjs";
4
+ import { SparkCheckboxColor } from "./checkbox.cjs";
5
+ import * as React$1 from "react";
6
+ import { CheckboxGroup as CheckboxGroup$1 } from "@base-ui/react/checkbox-group";
7
+
8
+ //#region src/components/checkbox-group.d.ts
9
+ type CheckboxGroupProps = Omit<React$1.ComponentProps<typeof CheckboxGroup$1>, 'style'> & {
10
+ styleVariant?: SparkStyle;
11
+ color?: SparkCheckboxColor; /** How many `--spark-layout-gap` units apart each checkbox sits. */
12
+ gap?: number; /** Shows the options as a styled list of `SelectionItem` rows; ignores `gap`. */
13
+ listStyle?: SparkInputStyle;
14
+ style?: React$1.CSSProperties;
15
+ };
16
+ declare function CheckboxGroup({
17
+ className,
18
+ styleVariant,
19
+ color,
20
+ gap,
21
+ listStyle,
22
+ style,
23
+ ...props
24
+ }: CheckboxGroupProps): import("react/jsx-runtime").JSX.Element;
25
+ //#endregion
26
+ export { CheckboxGroup, type CheckboxGroupProps };
27
+ //# sourceMappingURL=checkbox-group.d.cts.map
@@ -0,0 +1,27 @@
1
+ "use client";
2
+
3
+ import { g as SparkStyle, l as SparkInputStyle } from "../theme-types-CKZzOmSa.js";
4
+ import { SparkCheckboxColor } from "./checkbox.js";
5
+ import * as React$1 from "react";
6
+ import { CheckboxGroup as CheckboxGroup$1 } from "@base-ui/react/checkbox-group";
7
+
8
+ //#region src/components/checkbox-group.d.ts
9
+ type CheckboxGroupProps = Omit<React$1.ComponentProps<typeof CheckboxGroup$1>, 'style'> & {
10
+ styleVariant?: SparkStyle;
11
+ color?: SparkCheckboxColor; /** How many `--spark-layout-gap` units apart each checkbox sits. */
12
+ gap?: number; /** Shows the options as a styled list of `SelectionItem` rows; ignores `gap`. */
13
+ listStyle?: SparkInputStyle;
14
+ style?: React$1.CSSProperties;
15
+ };
16
+ declare function CheckboxGroup({
17
+ className,
18
+ styleVariant,
19
+ color,
20
+ gap,
21
+ listStyle,
22
+ style,
23
+ ...props
24
+ }: CheckboxGroupProps): import("react/jsx-runtime").JSX.Element;
25
+ //#endregion
26
+ export { CheckboxGroup, type CheckboxGroupProps };
27
+ //# sourceMappingURL=checkbox-group.d.ts.map
@@ -0,0 +1,28 @@
1
+ "use client";
2
+ import { cn } from "../utils/cn.js";
3
+ import { accentByColor } from "../lib/accent-colors.js";
4
+ import { useFieldSetInvalid } from "./field.js";
5
+ import { selectionListClasses } from "../lib/selection-list.js";
6
+ import "react";
7
+ import { jsx } from "react/jsx-runtime";
8
+ import { CheckboxGroup as CheckboxGroup$1 } from "@base-ui/react/checkbox-group";
9
+ //#region src/components/checkbox-group.tsx
10
+ function CheckboxGroup({ className, styleVariant, color, gap = 3, listStyle, style, ...props }) {
11
+ return /* @__PURE__ */ jsx(CheckboxGroup$1, {
12
+ "data-slot": "checkbox-group",
13
+ "data-style": styleVariant !== void 0 || color !== void 0 ? styleVariant ?? "solid" : void 0,
14
+ "data-accent-color": color ? accentByColor[color] : void 0,
15
+ "data-list-style": listStyle,
16
+ "data-invalid": useFieldSetInvalid(),
17
+ className: cn("grid", listStyle ? selectionListClasses[listStyle] : "gap-[calc(var(--spark-layout-gap)*var(--checkbox-group-gap-steps,3))]", className),
18
+ style: {
19
+ "--checkbox-group-gap-steps": gap,
20
+ ...style
21
+ },
22
+ ...props
23
+ });
24
+ }
25
+ //#endregion
26
+ export { CheckboxGroup };
27
+
28
+ //# sourceMappingURL=checkbox-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox-group.js","names":["CheckboxGroupPrimitive"],"sources":["../../src/components/checkbox-group.tsx"],"sourcesContent":["import { CheckboxGroup as CheckboxGroupPrimitive } from '@base-ui/react/checkbox-group'\nimport * as React from 'react'\nimport { accentByColor } from '../lib/accent-colors'\nimport { selectionListClasses } from '../lib/selection-list'\nimport type { SparkInputStyle, SparkStyle } from '../lib/theme-types'\nimport { cn } from '../utils/cn'\nimport type { SparkCheckboxColor } from './checkbox'\nimport { useFieldSetInvalid } from './field'\n\ntype CheckboxGroupProps = Omit<\n React.ComponentProps<typeof CheckboxGroupPrimitive>,\n 'style'\n> & {\n styleVariant?: SparkStyle\n color?: SparkCheckboxColor\n /** How many `--spark-layout-gap` units apart each checkbox sits. */\n gap?: number\n /** Shows the options as a styled list of `SelectionItem` rows; ignores `gap`. */\n listStyle?: SparkInputStyle\n // Base UI's own `style` also accepts a state-callback form; the gap-steps var below\n // needs a plain object to merge into, so narrow it to that here.\n style?: React.CSSProperties\n}\n\nfunction CheckboxGroup({\n className,\n styleVariant,\n color,\n gap = 3,\n listStyle,\n style,\n ...props\n}: CheckboxGroupProps) {\n const hasLook = styleVariant !== undefined || color !== undefined\n const dataStyle = hasLook ? (styleVariant ?? 'solid') : undefined\n const dataAccentColor = color ? accentByColor[color] : undefined\n const invalid = useFieldSetInvalid()\n\n return (\n <CheckboxGroupPrimitive\n data-slot=\"checkbox-group\"\n data-style={dataStyle}\n data-accent-color={dataAccentColor}\n data-list-style={listStyle}\n data-invalid={invalid}\n className={cn(\n 'grid',\n listStyle\n ? selectionListClasses[listStyle]\n : 'gap-[calc(var(--spark-layout-gap)*var(--checkbox-group-gap-steps,3))]',\n className,\n )}\n style={\n { '--checkbox-group-gap-steps': gap, ...style } as React.CSSProperties\n }\n {...props}\n />\n )\n}\n\nexport { CheckboxGroup }\nexport type { CheckboxGroupProps }\n"],"mappings":";;;;;;;;;AAwBA,SAAS,cAAc,EACrB,WACA,cACA,OACA,MAAM,GACN,WACA,OACA,GAAG,SACkB;CAMrB,OACE,oBAACA,iBAAD;EACE,aAAU;EACV,cARY,iBAAiB,KAAA,KAAa,UAAU,KAAA,IAC3B,gBAAgB,UAAW,KAAA;EAQpD,qBAPoB,QAAQ,cAAc,SAAS,KAAA;EAQnD,mBAAiB;EACjB,gBARY,mBAQQ;EACpB,WAAW,GACT,QACA,YACI,qBAAqB,aACrB,yEACJ,SACF;EACA,OACE;GAAE,8BAA8B;GAAK,GAAG;EAAM;EAEhD,GAAI;CACL,CAAA;AAEL"}
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import { f as SparkStyle } from "../theme-types-Bn5E15-P.cjs";
3
+ import { g as SparkStyle } from "../theme-types-CKZzOmSa.cjs";
4
4
  import * as React$1 from "react";
5
5
  import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
6
6
 
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import { f as SparkStyle } from "../theme-types-Bn5E15-P.js";
3
+ import { g as SparkStyle } from "../theme-types-CKZzOmSa.js";
4
4
  import * as React$1 from "react";
5
5
  import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
6
6
 
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const require_chunk = require("../chunk-DY84GLCh.cjs");
4
- const require_components_button = require("./button.cjs");
5
4
  const require_components_theme = require("./theme.cjs");
5
+ const require_components_button = require("./button.cjs");
6
6
  let react = require("react");
7
7
  react = require_chunk.__toESM(react);
8
8
  let _epilot_spark_icons = require("@epilot/spark-icons");
@@ -74,7 +74,7 @@ function DialogContent({ className, ...props }) {
74
74
  function DialogHeader({ className, ...props }) {
75
75
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
76
76
  "data-slot": "dialog-header",
77
- className: (0, cn.cn)("flex flex-col gap-1", className),
77
+ className: (0, cn.cn)("flex flex-col gap-2", className),
78
78
  ...props
79
79
  });
80
80
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.cjs","names":["DialogPrimitive","PortalTheme","buttonVariants","Close"],"sources":["../../src/components/dialog.tsx"],"sourcesContent":["import { Dialog as DialogPrimitive } from '@base-ui/react/dialog'\nimport { Close } from '@epilot/spark-icons'\nimport * as React from 'react'\nimport { cn } from '../utils/cn'\nimport { buttonVariants } from './button'\nimport { PortalTheme } from './theme'\n\n// Our dialogs contain interactive elements that are mounted outside of the dialog\n// Browser extensions like password managers or grammar checkers are also mounted outside\n// We still dismiss on a click/tap outside: a genuine outside press lands on a\n// backdrop (our styled one, or Base UI's internal inert backdrop when modal)\nfunction isBackdropPress(event: Event | undefined) {\n const target = event?.target\n return (\n target instanceof HTMLElement &&\n (target.dataset.overlay === 'true' ||\n target.hasAttribute('data-base-ui-inert'))\n )\n}\n\nfunction Dialog({\n onOpenChange,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return (\n <DialogPrimitive.Root\n {...props}\n onOpenChange={(open, eventDetails) => {\n if (\n !open &&\n eventDetails.reason === 'outside-press' &&\n !isBackdropPress(eventDetails.event)\n ) {\n eventDetails.cancel()\n return\n }\n onOpenChange?.(open, eventDetails)\n }}\n />\n )\n}\n\nfunction DialogTrigger(\n props: React.ComponentProps<typeof DialogPrimitive.Trigger>,\n) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />\n}\n\nfunction DialogPortal({\n children,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return (\n <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props}>\n <PortalTheme>{children}</PortalTheme>\n </DialogPrimitive.Portal>\n )\n}\n\n// bare = the ready-made corner X (label is the consumer's, via aria-label);\n// with children or a render prop it stays the bare primitive (footer buttons, custom closes)\nfunction DialogClose({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Close>) {\n if (children || props.render) {\n return (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className={className}\n {...props}\n >\n {children}\n </DialogPrimitive.Close>\n )\n }\n\n return (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className={cn(\n buttonVariants({ size: 'icon', variant: 'tertiary' }),\n 'absolute top-2.5 right-3 rounded-full',\n className,\n )}\n {...props}\n >\n <Close className=\"[--spark-icon-size:calc(20px*var(--spark-scaling,1))]\" />\n </DialogPrimitive.Close>\n )\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Backdrop>) {\n return (\n <DialogPrimitive.Backdrop\n data-slot=\"dialog-overlay\"\n className={cn(\n 'fixed top-(--spark-viewport-top,0) right-0 left-0 z-50 h-(--spark-viewport-height,100%) bg-(--color-overlay) transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs motion-reduce:transition-none',\n className,\n )}\n data-overlay=\"true\"\n {...props}\n />\n )\n}\n\nfunction DialogContent({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Popup>) {\n return (\n <DialogPrimitive.Popup\n data-slot=\"dialog-content\"\n className={cn(\n 'fixed top-(--spark-viewport-center-y,50%) left-[50%] z-50 grid w-[90%] max-w-lg min-w-80 translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg bg-gray-2 p-4 text-gray shadow-lg transition-[top,opacity,translate,scale] duration-200 motion-reduce:transition-none sm:w-1/2',\n // enter/exit: fade + zoom + a slight upward offset (was animate-in/out)\n 'data-starting-style:translate-y-[-52%] data-starting-style:scale-95 data-starting-style:opacity-0',\n 'data-ending-style:translate-y-[-52%] data-ending-style:scale-95 data-ending-style:opacity-0',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn('flex flex-col gap-1', className)}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n 'flex flex-col-reverse gap-4 sm:flex-row sm:justify-end',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction DialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn('text-lg font-bold text-gray', className)}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn('text-sm text-gray-light', className)}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n"],"mappings":";;;;;;;;;;;;AAWA,SAAS,gBAAgB,OAA0B;CACjD,MAAM,SAAS,OAAO;CACtB,OACE,kBAAkB,gBACjB,OAAO,QAAQ,YAAY,UAC1B,OAAO,aAAa,oBAAoB;AAE9C;AAEA,SAAS,OAAO,EACd,cACA,G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;AAEA,SAAS,cAAc,EACrB,WACA,GAAG,SACkD;CACrD,OACE,iBAAA,GAAA,kBAAA,KAACA,sBAAAA,OAAgB,OAAjB;EACE,aAAU;EACV,YAAA,GAAA,GAAA,IACE,kRAEA,qGACA,+FACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,aAAa,EAAE,WAAW,GAAG,SAAsC;CAC1E,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,aAAU;EACV,YAAA,GAAA,GAAA,IAAc,uBAAuB,SAAS;EAC9C,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,aAAa,EAAE,WAAW,GAAG,SAAsC;CAC1E,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,aAAU;EACV,YAAA,GAAA,GAAA,IACE,0DACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,YAAY,EACnB,WACA,GAAG,SACkD;CACrD,OACE,iBAAA,GAAA,kBAAA,KAACA,sBAAAA,OAAgB,OAAjB;EACE,aAAU;EACV,YAAA,GAAA,GAAA,IAAc,+BAA+B,SAAS;EACtD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,kBAAkB,EACzB,WACA,GAAG,SACwD;CAC3D,OACE,iBAAA,GAAA,kBAAA,KAACA,sBAAAA,OAAgB,aAAjB;EACE,aAAU;EACV,YAAA,GAAA,GAAA,IAAc,2BAA2B,SAAS;EAClD,GAAI;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"dialog.cjs","names":["DialogPrimitive","PortalTheme","buttonVariants","Close"],"sources":["../../src/components/dialog.tsx"],"sourcesContent":["import { Dialog as DialogPrimitive } from '@base-ui/react/dialog'\nimport { Close } from '@epilot/spark-icons'\nimport * as React from 'react'\nimport { cn } from '../utils/cn'\nimport { buttonVariants } from './button'\nimport { PortalTheme } from './theme'\n\n// Our dialogs contain interactive elements that are mounted outside of the dialog\n// Browser extensions like password managers or grammar checkers are also mounted outside\n// We still dismiss on a click/tap outside: a genuine outside press lands on a\n// backdrop (our styled one, or Base UI's internal inert backdrop when modal)\nfunction isBackdropPress(event: Event | undefined) {\n const target = event?.target\n return (\n target instanceof HTMLElement &&\n (target.dataset.overlay === 'true' ||\n target.hasAttribute('data-base-ui-inert'))\n )\n}\n\nfunction Dialog({\n onOpenChange,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return (\n <DialogPrimitive.Root\n {...props}\n onOpenChange={(open, eventDetails) => {\n if (\n !open &&\n eventDetails.reason === 'outside-press' &&\n !isBackdropPress(eventDetails.event)\n ) {\n eventDetails.cancel()\n return\n }\n onOpenChange?.(open, eventDetails)\n }}\n />\n )\n}\n\nfunction DialogTrigger(\n props: React.ComponentProps<typeof DialogPrimitive.Trigger>,\n) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />\n}\n\nfunction DialogPortal({\n children,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return (\n <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props}>\n <PortalTheme>{children}</PortalTheme>\n </DialogPrimitive.Portal>\n )\n}\n\n// bare = the ready-made corner X (label is the consumer's, via aria-label);\n// with children or a render prop it stays the bare primitive (footer buttons, custom closes)\nfunction DialogClose({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Close>) {\n if (children || props.render) {\n return (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className={className}\n {...props}\n >\n {children}\n </DialogPrimitive.Close>\n )\n }\n\n return (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className={cn(\n buttonVariants({ size: 'icon', variant: 'tertiary' }),\n 'absolute top-2.5 right-3 rounded-full',\n className,\n )}\n {...props}\n >\n <Close className=\"[--spark-icon-size:calc(20px*var(--spark-scaling,1))]\" />\n </DialogPrimitive.Close>\n )\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Backdrop>) {\n return (\n <DialogPrimitive.Backdrop\n data-slot=\"dialog-overlay\"\n className={cn(\n 'fixed top-(--spark-viewport-top,0) right-0 left-0 z-50 h-(--spark-viewport-height,100%) bg-(--color-overlay) transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs motion-reduce:transition-none',\n className,\n )}\n data-overlay=\"true\"\n {...props}\n />\n )\n}\n\nfunction DialogContent({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Popup>) {\n return (\n <DialogPrimitive.Popup\n data-slot=\"dialog-content\"\n className={cn(\n 'fixed top-(--spark-viewport-center-y,50%) left-[50%] z-50 grid w-[90%] max-w-lg min-w-80 translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg bg-gray-2 p-4 text-gray shadow-lg transition-[top,opacity,translate,scale] duration-200 motion-reduce:transition-none sm:w-1/2',\n // enter/exit: fade + zoom + a slight upward offset (was animate-in/out)\n 'data-starting-style:translate-y-[-52%] data-starting-style:scale-95 data-starting-style:opacity-0',\n 'data-ending-style:translate-y-[-52%] data-ending-style:scale-95 data-ending-style:opacity-0',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn('flex flex-col gap-2', className)}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n 'flex flex-col-reverse gap-4 sm:flex-row sm:justify-end',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction DialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn('text-lg font-bold text-gray', className)}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn('text-sm text-gray-light', className)}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n"],"mappings":";;;;;;;;;;;;AAWA,SAAS,gBAAgB,OAA0B;CACjD,MAAM,SAAS,OAAO;CACtB,OACE,kBAAkB,gBACjB,OAAO,QAAQ,YAAY,UAC1B,OAAO,aAAa,oBAAoB;AAE9C;AAEA,SAAS,OAAO,EACd,cACA,GAAG,SACiD;CACpD,OACE,iBAAA,GAAA,kBAAA,KAACA,sBAAAA,OAAgB,MAAjB;EACE,GAAI;EACJ,eAAe,MAAM,iBAAiB;GACpC,IACE,CAAC,QACD,aAAa,WAAW,mBACxB,CAAC,gBAAgB,aAAa,KAAK,GACnC;IACA,aAAa,OAAO;IACpB;GACF;GACA,eAAe,MAAM,YAAY;EACnC;CACD,CAAA;AAEL;AAEA,SAAS,cACP,OACA;CACA,OAAO,iBAAA,GAAA,kBAAA,KAACA,sBAAAA,OAAgB,SAAjB;EAAyB,aAAU;EAAiB,GAAI;CAAQ,CAAA;AACzE;AAEA,SAAS,aAAa,EACpB,UACA,GAAG,SACmD;CACtD,OACE,iBAAA,GAAA,kBAAA,KAACA,sBAAAA,OAAgB,QAAjB;EAAwB,aAAU;EAAgB,GAAI;YACpD,iBAAA,GAAA,kBAAA,KAACC,yBAAAA,aAAD,EAAc,SAAsB,CAAA;CACd,CAAA;AAE5B;AAIA,SAAS,YAAY,EACnB,WACA,UACA,GAAG,SACkD;CACrD,IAAI,YAAY,MAAM,QACpB,OACE,iBAAA,GAAA,kBAAA,KAACD,sBAAAA,OAAgB,OAAjB;EACE,aAAU;EACC;EACX,GAAI;EAEH;CACoB,CAAA;CAI3B,OACE,iBAAA,GAAA,kBAAA,KAACA,sBAAAA,OAAgB,OAAjB;EACE,aAAU;EACV,YAAA,GAAA,GAAA,IACEE,0BAAAA,eAAe;GAAE,MAAM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AAEL"}
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { cn } from "../utils/cn.js";
3
- import { buttonVariants } from "./button.js";
4
3
  import { PortalTheme } from "./theme.js";
4
+ import { buttonVariants } from "./button.js";
5
5
  import "react";
6
6
  import { Close } from "@epilot/spark-icons";
7
7
  import { jsx } from "react/jsx-runtime";
@@ -71,7 +71,7 @@ function DialogContent({ className, ...props }) {
71
71
  function DialogHeader({ className, ...props }) {
72
72
  return /* @__PURE__ */ jsx("div", {
73
73
  "data-slot": "dialog-header",
74
- className: cn("flex flex-col gap-1", className),
74
+ className: cn("flex flex-col gap-2", className),
75
75
  ...props
76
76
  });
77
77
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.js","names":["DialogPrimitive"],"sources":["../../src/components/dialog.tsx"],"sourcesContent":["import { Dialog as DialogPrimitive } from '@base-ui/react/dialog'\nimport { Close } from '@epilot/spark-icons'\nimport * as React from 'react'\nimport { cn } from '../utils/cn'\nimport { buttonVariants } from './button'\nimport { PortalTheme } from './theme'\n\n// Our dialogs contain interactive elements that are mounted outside of the dialog\n// Browser extensions like password managers or grammar checkers are also mounted outside\n// We still dismiss on a click/tap outside: a genuine outside press lands on a\n// backdrop (our styled one, or Base UI's internal inert backdrop when modal)\nfunction isBackdropPress(event: Event | undefined) {\n const target = event?.target\n return (\n target instanceof HTMLElement &&\n (target.dataset.overlay === 'true' ||\n target.hasAttribute('data-base-ui-inert'))\n )\n}\n\nfunction Dialog({\n onOpenChange,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return (\n <DialogPrimitive.Root\n {...props}\n onOpenChange={(open, eventDetails) => {\n if (\n !open &&\n eventDetails.reason === 'outside-press' &&\n !isBackdropPress(eventDetails.event)\n ) {\n eventDetails.cancel()\n return\n }\n onOpenChange?.(open, eventDetails)\n }}\n />\n )\n}\n\nfunction DialogTrigger(\n props: React.ComponentProps<typeof DialogPrimitive.Trigger>,\n) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />\n}\n\nfunction DialogPortal({\n children,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return (\n <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props}>\n <PortalTheme>{children}</PortalTheme>\n </DialogPrimitive.Portal>\n )\n}\n\n// bare = the ready-made corner X (label is the consumer's, via aria-label);\n// with children or a render prop it stays the bare primitive (footer buttons, custom closes)\nfunction DialogClose({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Close>) {\n if (children || props.render) {\n return (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className={className}\n {...props}\n >\n {children}\n </DialogPrimitive.Close>\n )\n }\n\n return (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className={cn(\n buttonVariants({ size: 'icon', variant: 'tertiary' }),\n 'absolute top-2.5 right-3 rounded-full',\n className,\n )}\n {...props}\n >\n <Close className=\"[--spark-icon-size:calc(20px*var(--spark-scaling,1))]\" />\n </DialogPrimitive.Close>\n )\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Backdrop>) {\n return (\n <DialogPrimitive.Backdrop\n data-slot=\"dialog-overlay\"\n className={cn(\n 'fixed top-(--spark-viewport-top,0) right-0 left-0 z-50 h-(--spark-viewport-height,100%) bg-(--color-overlay) transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs motion-reduce:transition-none',\n className,\n )}\n data-overlay=\"true\"\n {...props}\n />\n )\n}\n\nfunction DialogContent({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Popup>) {\n return (\n <DialogPrimitive.Popup\n data-slot=\"dialog-content\"\n className={cn(\n 'fixed top-(--spark-viewport-center-y,50%) left-[50%] z-50 grid w-[90%] max-w-lg min-w-80 translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg bg-gray-2 p-4 text-gray shadow-lg transition-[top,opacity,translate,scale] duration-200 motion-reduce:transition-none sm:w-1/2',\n // enter/exit: fade + zoom + a slight upward offset (was animate-in/out)\n 'data-starting-style:translate-y-[-52%] data-starting-style:scale-95 data-starting-style:opacity-0',\n 'data-ending-style:translate-y-[-52%] data-ending-style:scale-95 data-ending-style:opacity-0',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn('flex flex-col gap-1', className)}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n 'flex flex-col-reverse gap-4 sm:flex-row sm:justify-end',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction DialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn('text-lg font-bold text-gray', className)}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn('text-sm text-gray-light', className)}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n"],"mappings":";;;;;;;;;AAWA,SAAS,gBAAgB,OAA0B;CACjD,MAAM,SAAS,OAAO;CACtB,OACE,kBAAkB,gBACjB,OAAO,QAAQ,YAAY,UAC1B,OAAO,aAAa,oBAAoB;AAE9C;AAEA,SAAS,OAAO,EACd,cACA,GAAG,SACiD;CACpD,OACE,oBAACA,SAAgB,MAAjB;EACE,GAAI;EACJ,eAAe,MAAM,iBAAiB;GACpC,IACE,CAAC,QACD,aAAa,WAAW,mBACxB,CAAC,gBAAgB,aAAa,KAAK,GACnC;IACA,aAAa,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;AAEL;AAEA,SAAS,YAAY,EACnB,WACA,GAAG,SACkD;CACrD,OACE,oBAACA,SAAgB,OAAjB;EACE,aAAU;EACV,WAAW,GAAG,+BAA+B,SAAS;EACtD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,kBAAkB,EACzB,WACA,GAAG,SACwD;CAC3D,OACE,oBAACA,SAAgB,aAAjB;EACE,aAAU;EACV,WAAW,GAAG,2BAA2B,SAAS;EAClD,GAAI;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"dialog.js","names":["DialogPrimitive"],"sources":["../../src/components/dialog.tsx"],"sourcesContent":["import { Dialog as DialogPrimitive } from '@base-ui/react/dialog'\nimport { Close } from '@epilot/spark-icons'\nimport * as React from 'react'\nimport { cn } from '../utils/cn'\nimport { buttonVariants } from './button'\nimport { PortalTheme } from './theme'\n\n// Our dialogs contain interactive elements that are mounted outside of the dialog\n// Browser extensions like password managers or grammar checkers are also mounted outside\n// We still dismiss on a click/tap outside: a genuine outside press lands on a\n// backdrop (our styled one, or Base UI's internal inert backdrop when modal)\nfunction isBackdropPress(event: Event | undefined) {\n const target = event?.target\n return (\n target instanceof HTMLElement &&\n (target.dataset.overlay === 'true' ||\n target.hasAttribute('data-base-ui-inert'))\n )\n}\n\nfunction Dialog({\n onOpenChange,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return (\n <DialogPrimitive.Root\n {...props}\n onOpenChange={(open, eventDetails) => {\n if (\n !open &&\n eventDetails.reason === 'outside-press' &&\n !isBackdropPress(eventDetails.event)\n ) {\n eventDetails.cancel()\n return\n }\n onOpenChange?.(open, eventDetails)\n }}\n />\n )\n}\n\nfunction DialogTrigger(\n props: React.ComponentProps<typeof DialogPrimitive.Trigger>,\n) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />\n}\n\nfunction DialogPortal({\n children,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return (\n <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props}>\n <PortalTheme>{children}</PortalTheme>\n </DialogPrimitive.Portal>\n )\n}\n\n// bare = the ready-made corner X (label is the consumer's, via aria-label);\n// with children or a render prop it stays the bare primitive (footer buttons, custom closes)\nfunction DialogClose({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Close>) {\n if (children || props.render) {\n return (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className={className}\n {...props}\n >\n {children}\n </DialogPrimitive.Close>\n )\n }\n\n return (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className={cn(\n buttonVariants({ size: 'icon', variant: 'tertiary' }),\n 'absolute top-2.5 right-3 rounded-full',\n className,\n )}\n {...props}\n >\n <Close className=\"[--spark-icon-size:calc(20px*var(--spark-scaling,1))]\" />\n </DialogPrimitive.Close>\n )\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Backdrop>) {\n return (\n <DialogPrimitive.Backdrop\n data-slot=\"dialog-overlay\"\n className={cn(\n 'fixed top-(--spark-viewport-top,0) right-0 left-0 z-50 h-(--spark-viewport-height,100%) bg-(--color-overlay) transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs motion-reduce:transition-none',\n className,\n )}\n data-overlay=\"true\"\n {...props}\n />\n )\n}\n\nfunction DialogContent({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Popup>) {\n return (\n <DialogPrimitive.Popup\n data-slot=\"dialog-content\"\n className={cn(\n 'fixed top-(--spark-viewport-center-y,50%) left-[50%] z-50 grid w-[90%] max-w-lg min-w-80 translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg bg-gray-2 p-4 text-gray shadow-lg transition-[top,opacity,translate,scale] duration-200 motion-reduce:transition-none sm:w-1/2',\n // enter/exit: fade + zoom + a slight upward offset (was animate-in/out)\n 'data-starting-style:translate-y-[-52%] data-starting-style:scale-95 data-starting-style:opacity-0',\n 'data-ending-style:translate-y-[-52%] data-ending-style:scale-95 data-ending-style:opacity-0',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn('flex flex-col gap-2', className)}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n 'flex flex-col-reverse gap-4 sm:flex-row sm:justify-end',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction DialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn('text-lg font-bold text-gray', className)}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn('text-sm text-gray-light', className)}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n"],"mappings":";;;;;;;;;AAWA,SAAS,gBAAgB,OAA0B;CACjD,MAAM,SAAS,OAAO;CACtB,OACE,kBAAkB,gBACjB,OAAO,QAAQ,YAAY,UAC1B,OAAO,aAAa,oBAAoB;AAE9C;AAEA,SAAS,OAAO,EACd,cACA,GAAG,SACiD;CACpD,OACE,oBAACA,SAAgB,MAAjB;EACE,GAAI;EACJ,eAAe,MAAM,iBAAiB;GACpC,IACE,CAAC,QACD,aAAa,WAAW,mBACxB,CAAC,gBAAgB,aAAa,KAAK,GACnC;IACA,aAAa,OAAO;IACpB;GACF;GACA,eAAe,MAAM,YAAY;EACnC;CACD,CAAA;AAEL;AAEA,SAAS,cACP,OACA;CACA,OAAO,oBAACA,SAAgB,SAAjB;EAAyB,aA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D,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,kBAAkB,EACzB,WACA,GAAG,SACwD;CAC3D,OACE,oBAACA,SAAgB,aAAjB;EACE,aAAU;EACV,WAAW,GAAG,2BAA2B,SAAS;EAClD,GAAI;CACL,CAAA;AAEL"}
@@ -65,7 +65,7 @@ function DrawerContent({ className, pillClassName, children, ...props }) {
65
65
  function DrawerHeader({ className, ...props }) {
66
66
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
67
67
  "data-slot": "drawer-header",
68
- className: (0, cn.cn)("flex flex-col gap-1 px-6 py-3", className),
68
+ className: (0, cn.cn)("flex flex-col gap-2 px-6 py-3", className),
69
69
  ...props
70
70
  });
71
71
  }
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.cjs","names":["DrawerPrimitive","React","PortalTheme"],"sources":["../../src/components/drawer.tsx"],"sourcesContent":["import { useRender } from '@base-ui/react/use-render'\nimport * as React from 'react'\nimport { Drawer as DrawerPrimitive } from 'vaul'\nimport { cn } from '../utils/cn'\nimport { PortalTheme } from './theme'\n\nfunction Drawer({\n shouldScaleBackground = true,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root>) {\n return (\n <DrawerPrimitive.Root\n data-slot=\"drawer\"\n shouldScaleBackground={shouldScaleBackground}\n {...props}\n />\n )\n}\n\nfunction DrawerTrigger(\n props: React.ComponentProps<typeof DrawerPrimitive.Trigger>,\n) {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />\n}\n\nfunction DrawerPortal({\n children,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Portal>) {\n return (\n <DrawerPrimitive.Portal data-slot=\"drawer-portal\" {...props}>\n {React.Children.map(children, (child) =>\n React.isValidElement(child) ? (\n <DrawerPortalChild>{child}</DrawerPortalChild>\n ) : (\n child\n ),\n )}\n </DrawerPrimitive.Portal>\n )\n}\n\n// Radix clones each portal child with the Presence ref that gates the exit animation; it must land on the part, not the theme wrapper.\nconst DrawerPortalChild = React.forwardRef<\n HTMLElement,\n { children: React.ReactElement }\n>(function DrawerPortalChild({ children }, ref) {\n const part = useRender({ render: children, ref, props: {} })\n return <PortalTheme>{part}</PortalTheme>\n})\n\nfunction DrawerClose(\n props: React.ComponentProps<typeof DrawerPrimitive.Close>,\n) {\n return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} />\n}\n\nfunction DrawerOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {\n return (\n <DrawerPrimitive.Overlay\n data-slot=\"drawer-overlay\"\n className={cn(\n 'fixed top-(--spark-viewport-top,0) right-0 left-0 z-50 h-(--spark-viewport-height,100%) bg-(--color-overlay) supports-backdrop-filter:backdrop-blur-xs motion-reduce:animate-none! motion-reduce:transition-none!',\n className,\n )}\n data-overlay=\"true\"\n {...props}\n />\n )\n}\n\ninterface DrawerContentProps extends React.ComponentProps<\n typeof DrawerPrimitive.Content\n> {\n pillClassName?: string\n}\n\nconst onInteractOutsideHandler = (event: CustomEvent) => {\n const target = event.target as HTMLElement\n const isOverlay = target.dataset.overlay === 'true'\n\n // Our drawers contain interactive elements that are mounted outside of the drawer\n // Browser extensions like password managers or grammar checkers are also mounted outside\n // We still dismiss on a click/tap outside\n if (!isOverlay) event.preventDefault()\n}\n\nfunction DrawerContent({\n className,\n pillClassName,\n children,\n ...props\n}: DrawerContentProps) {\n return (\n <DrawerPrimitive.Content\n data-slot=\"drawer-content\"\n className={cn(\n 'group/drawer-content fixed z-50 flex h-auto flex-col bg-gray-2 text-gray motion-reduce:animate-none! motion-reduce:transition-none!',\n 'data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-(--spark-viewport-bottom-offset,0) data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg',\n 'data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-(--spark-viewport-top,0) data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg',\n 'data-[vaul-drawer-direction=left]:top-(--spark-viewport-top,0) data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:h-(--spark-viewport-height,100%) data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:border-gray-a1 data-[vaul-drawer-direction=left]:sm:max-w-sm',\n 'data-[vaul-drawer-direction=right]:top-(--spark-viewport-top,0) data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:h-(--spark-viewport-height,100%) data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:border-gray-a1 data-[vaul-drawer-direction=right]:sm:max-w-sm',\n className,\n )}\n onInteractOutside={onInteractOutsideHandler}\n {...props}\n >\n <div\n className={cn(\n 'mx-auto mt-2.5 hidden h-1.5 w-16 shrink-0 rounded-full bg-base-gray-soft group-data-[vaul-drawer-direction=bottom]/drawer-content:block',\n pillClassName,\n )}\n />\n {children}\n </DrawerPrimitive.Content>\n )\n}\n\nfunction DrawerHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"drawer-header\"\n className={cn('flex flex-col gap-1 px-6 py-3', className)}\n {...props}\n />\n )\n}\n\nfunction DrawerFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"drawer-footer\"\n className={cn('mt-auto flex flex-col gap-2 text-gray', className)}\n {...props}\n />\n )\n}\n\nfunction DrawerTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Title>) {\n return (\n <DrawerPrimitive.Title\n data-slot=\"drawer-title\"\n className={cn('text-lg font-bold text-gray', className)}\n {...props}\n />\n )\n}\n\nfunction DrawerDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Description>) {\n return (\n <DrawerPrimitive.Description\n data-slot=\"drawer-description\"\n className={cn('text-sm text-gray-light', className)}\n {...props}\n />\n )\n}\n\nexport {\n Drawer,\n DrawerClose,\n DrawerContent,\n DrawerDescription,\n DrawerFooter,\n DrawerHeader,\n DrawerOverlay,\n DrawerPortal,\n DrawerTitle,\n DrawerTrigger,\n}\nexport type { DrawerContentProps }\n"],"mappings":";;;;;;;;;;;AAMA,SAAS,OAAO,EACd,wBAAwB,MACxB,GAAG,SACiD;CACpD,OACE,iBAAA,GAAA,kBAAA,KAACA,KAAAA,OAAgB,MAAjB;EACE,aAAU;EACa;EACvB,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,cACP,OACA;CACA,OAAO,iBAAA,GAAA,kBAAA,KAACA,KAAAA,OAAgB,SAAjB;EAAyB,aAAU;EAAiB,GAAI;CAAQ,CAAA;AACzE;AAEA,SAAS,aAAa,EACpB,UACA,GAAG,SACmD;CACtD,OACE,iBAAA,GAAA,kBAAA,KAACA,KAAAA,OAAgB,QAAjB;EAAwB,aAAU;EAAgB,GAAI;YACnDC,MAAM,SAAS,IAAI,WAAW,UAC7BA,MAAM,eAAe,KAAK,IACxB,iBAAA,GAAA,kBAAA,KAAC,mBAAD,EAAA,UAAoB,MAAyB,CAAA,IAE7C,KAEJ;CACsB,CAAA;AAE5B;AAGA,MAAM,oBAAoBA,MAAM,WAG9B,SAAS,kBAAkB,EAAE,YAAY,KAAK;CAE9C,OAAO,iBAAA,GAAA,kBAAA,KAACC,yBAAAA,aAAD,EAAA,WAAA,GAAA,0BAAA,WADgB;EAAE,QAAQ;EAAU;EAAK,OAAO,CAAC;CAAE,CAClC,EAAe,CAAA;AACzC,CAAC;AAED,SAAS,YACP,OACA;CACA,OAAO,iBAAA,GAAA,kBAAA,KAACF,KAAAA,OAAgB,OAAjB;EAAuB,aAAU;EAAe,GAAI;CAAQ,CAAA;AACrE;AAEA,SAAS,cAAc,EACrB,WACA,GAAG,SACoD;CACvD,OACE,iBAAA,GAAA,kBAAA,K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AAA;AAEL"}
1
+ {"version":3,"file":"drawer.cjs","names":["DrawerPrimitive","React","PortalTheme"],"sources":["../../src/components/drawer.tsx"],"sourcesContent":["import { useRender } from '@base-ui/react/use-render'\nimport * as React from 'react'\nimport { Drawer as DrawerPrimitive } from 'vaul'\nimport { cn } from '../utils/cn'\nimport { PortalTheme } from './theme'\n\nfunction Drawer({\n shouldScaleBackground = true,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root>) {\n return (\n <DrawerPrimitive.Root\n data-slot=\"drawer\"\n shouldScaleBackground={shouldScaleBackground}\n {...props}\n />\n )\n}\n\nfunction DrawerTrigger(\n props: React.ComponentProps<typeof DrawerPrimitive.Trigger>,\n) {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />\n}\n\nfunction DrawerPortal({\n children,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Portal>) {\n return (\n <DrawerPrimitive.Portal data-slot=\"drawer-portal\" {...props}>\n {React.Children.map(children, (child) =>\n React.isValidElement(child) ? (\n <DrawerPortalChild>{child}</DrawerPortalChild>\n ) : (\n child\n ),\n )}\n </DrawerPrimitive.Portal>\n )\n}\n\n// Radix clones each portal child with the Presence ref that gates the exit animation; it must land on the part, not the theme wrapper.\nconst DrawerPortalChild = React.forwardRef<\n HTMLElement,\n { children: React.ReactElement }\n>(function DrawerPortalChild({ children }, ref) {\n const part = useRender({ render: children, ref, props: {} })\n return <PortalTheme>{part}</PortalTheme>\n})\n\nfunction DrawerClose(\n props: React.ComponentProps<typeof DrawerPrimitive.Close>,\n) {\n return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} />\n}\n\nfunction DrawerOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {\n return (\n <DrawerPrimitive.Overlay\n data-slot=\"drawer-overlay\"\n className={cn(\n 'fixed top-(--spark-viewport-top,0) right-0 left-0 z-50 h-(--spark-viewport-height,100%) bg-(--color-overlay) supports-backdrop-filter:backdrop-blur-xs motion-reduce:animate-none! motion-reduce:transition-none!',\n className,\n )}\n data-overlay=\"true\"\n {...props}\n />\n )\n}\n\ninterface DrawerContentProps extends React.ComponentProps<\n typeof DrawerPrimitive.Content\n> {\n pillClassName?: string\n}\n\nconst onInteractOutsideHandler = (event: CustomEvent) => {\n const target = event.target as HTMLElement\n const isOverlay = target.dataset.overlay === 'true'\n\n // Our drawers contain interactive elements that are mounted outside of the drawer\n // Browser extensions like password managers or grammar checkers are also mounted outside\n // We still dismiss on a click/tap outside\n if (!isOverlay) event.preventDefault()\n}\n\nfunction DrawerContent({\n className,\n pillClassName,\n children,\n ...props\n}: DrawerContentProps) {\n return (\n <DrawerPrimitive.Content\n data-slot=\"drawer-content\"\n className={cn(\n 'group/drawer-content fixed z-50 flex h-auto flex-col bg-gray-2 text-gray motion-reduce:animate-none! motion-reduce:transition-none!',\n 'data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-(--spark-viewport-bottom-offset,0) data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg',\n 'data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-(--spark-viewport-top,0) data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg',\n 'data-[vaul-drawer-direction=left]:top-(--spark-viewport-top,0) data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:h-(--spark-viewport-height,100%) data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:border-gray-a1 data-[vaul-drawer-direction=left]:sm:max-w-sm',\n 'data-[vaul-drawer-direction=right]:top-(--spark-viewport-top,0) data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:h-(--spark-viewport-height,100%) data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:border-gray-a1 data-[vaul-drawer-direction=right]:sm:max-w-sm',\n className,\n )}\n onInteractOutside={onInteractOutsideHandler}\n {...props}\n >\n <div\n className={cn(\n 'mx-auto mt-2.5 hidden h-1.5 w-16 shrink-0 rounded-full bg-base-gray-soft group-data-[vaul-drawer-direction=bottom]/drawer-content:block',\n pillClassName,\n )}\n />\n {children}\n </DrawerPrimitive.Content>\n )\n}\n\nfunction DrawerHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"drawer-header\"\n className={cn('flex flex-col gap-2 px-6 py-3', className)}\n {...props}\n />\n )\n}\n\nfunction DrawerFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"drawer-footer\"\n className={cn('mt-auto flex flex-col gap-2 text-gray', className)}\n {...props}\n />\n )\n}\n\nfunction DrawerTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Title>) {\n return (\n <DrawerPrimitive.Title\n data-slot=\"drawer-title\"\n className={cn('text-lg font-bold text-gray', className)}\n {...props}\n />\n )\n}\n\nfunction DrawerDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Description>) {\n return (\n <DrawerPrimitive.Description\n data-slot=\"drawer-description\"\n className={cn('text-sm text-gray-light', className)}\n {...props}\n />\n )\n}\n\nexport {\n Drawer,\n DrawerClose,\n DrawerContent,\n DrawerDescription,\n DrawerFooter,\n DrawerHeader,\n DrawerOverlay,\n DrawerPortal,\n DrawerTitle,\n DrawerTrigger,\n}\nexport type { DrawerContentProps }\n"],"mappings":";;;;;;;;;;;AAMA,SAAS,OAAO,EACd,wBAAwB,MACxB,GAAG,SACiD;CACpD,OACE,iBAAA,GAAA,kBAAA,KAACA,KAAAA,OAAgB,MAAjB;EACE,aAAU;EACa;EACvB,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,cACP,OACA;CACA,OAAO,iBAAA,GAAA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,kBAAA,KAAC,OAAD,EACE,YAAA,GAAA,GAAA,IACE,2IACA,aACF,EACD,CAAA,GACA,QACsB;;AAE7B;AAEA,SAAS,aAAa,EAAE,WAAW,GAAG,SAAsC;CAC1E,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,aAAU;EACV,YAAA,GAAA,GAAA,IAAc,iCAAiC,SAAS;EACxD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,aAAa,EAAE,WAAW,GAAG,SAAsC;CAC1E,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,aAAU;EACV,YAAA,GAAA,GAAA,IAAc,yCAAyC,SAAS;EAChE,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,YAAY,EACnB,WACA,GAAG,SACkD;CACrD,OACE,iBAAA,GAAA,kBAAA,KAACA,KAAAA,OAAgB,OAAjB;EACE,aAAU;EACV,YAAA,GAAA,GAAA,IAAc,+BAA+B,SAAS;EACtD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,kBAAkB,EACzB,WACA,GAAG,SACwD;CAC3D,OACE,iBAAA,GAAA,kBAAA,KAACA,KAAAA,OAAgB,aAAjB;EACE,aAAU;EACV,YAAA,GAAA,GAAA,IAAc,2BAA2B,SAAS;EAClD,GAAI;CACL,CAAA;AAEL"}
@@ -62,7 +62,7 @@ function DrawerContent({ className, pillClassName, children, ...props }) {
62
62
  function DrawerHeader({ className, ...props }) {
63
63
  return /* @__PURE__ */ jsx("div", {
64
64
  "data-slot": "drawer-header",
65
- className: cn("flex flex-col gap-1 px-6 py-3", className),
65
+ className: cn("flex flex-col gap-2 px-6 py-3", className),
66
66
  ...props
67
67
  });
68
68
  }
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.js","names":["DrawerPrimitive","React"],"sources":["../../src/components/drawer.tsx"],"sourcesContent":["import { useRender } from '@base-ui/react/use-render'\nimport * as React from 'react'\nimport { Drawer as DrawerPrimitive } from 'vaul'\nimport { cn } from '../utils/cn'\nimport { PortalTheme } from './theme'\n\nfunction Drawer({\n shouldScaleBackground = true,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root>) {\n return (\n <DrawerPrimitive.Root\n data-slot=\"drawer\"\n shouldScaleBackground={shouldScaleBackground}\n {...props}\n />\n )\n}\n\nfunction DrawerTrigger(\n props: React.ComponentProps<typeof DrawerPrimitive.Trigger>,\n) {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />\n}\n\nfunction DrawerPortal({\n children,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Portal>) {\n return (\n <DrawerPrimitive.Portal data-slot=\"drawer-portal\" {...props}>\n {React.Children.map(children, (child) =>\n React.isValidElement(child) ? (\n <DrawerPortalChild>{child}</DrawerPortalChild>\n ) : (\n child\n ),\n )}\n </DrawerPrimitive.Portal>\n )\n}\n\n// Radix clones each portal child with the Presence ref that gates the exit animation; it must land on the part, not the theme wrapper.\nconst DrawerPortalChild = React.forwardRef<\n HTMLElement,\n { children: React.ReactElement }\n>(function DrawerPortalChild({ children }, ref) {\n const part = useRender({ render: children, ref, props: {} })\n return <PortalTheme>{part}</PortalTheme>\n})\n\nfunction DrawerClose(\n props: React.ComponentProps<typeof DrawerPrimitive.Close>,\n) {\n return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} />\n}\n\nfunction DrawerOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {\n return (\n <DrawerPrimitive.Overlay\n data-slot=\"drawer-overlay\"\n className={cn(\n 'fixed top-(--spark-viewport-top,0) right-0 left-0 z-50 h-(--spark-viewport-height,100%) bg-(--color-overlay) supports-backdrop-filter:backdrop-blur-xs motion-reduce:animate-none! motion-reduce:transition-none!',\n className,\n )}\n data-overlay=\"true\"\n {...props}\n />\n )\n}\n\ninterface DrawerContentProps extends React.ComponentProps<\n typeof DrawerPrimitive.Content\n> {\n pillClassName?: string\n}\n\nconst onInteractOutsideHandler = (event: CustomEvent) => {\n const target = event.target as HTMLElement\n const isOverlay = target.dataset.overlay === 'true'\n\n // Our drawers contain interactive elements that are mounted outside of the drawer\n // Browser extensions like password managers or grammar checkers are also mounted outside\n // We still dismiss on a click/tap outside\n if (!isOverlay) event.preventDefault()\n}\n\nfunction DrawerContent({\n className,\n pillClassName,\n children,\n ...props\n}: DrawerContentProps) {\n return (\n <DrawerPrimitive.Content\n data-slot=\"drawer-content\"\n className={cn(\n 'group/drawer-content fixed z-50 flex h-auto flex-col bg-gray-2 text-gray motion-reduce:animate-none! motion-reduce:transition-none!',\n 'data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-(--spark-viewport-bottom-offset,0) data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg',\n 'data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-(--spark-viewport-top,0) data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg',\n 'data-[vaul-drawer-direction=left]:top-(--spark-viewport-top,0) data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:h-(--spark-viewport-height,100%) data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:border-gray-a1 data-[vaul-drawer-direction=left]:sm:max-w-sm',\n 'data-[vaul-drawer-direction=right]:top-(--spark-viewport-top,0) data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:h-(--spark-viewport-height,100%) data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:border-gray-a1 data-[vaul-drawer-direction=right]:sm:max-w-sm',\n className,\n )}\n onInteractOutside={onInteractOutsideHandler}\n {...props}\n >\n <div\n className={cn(\n 'mx-auto mt-2.5 hidden h-1.5 w-16 shrink-0 rounded-full bg-base-gray-soft group-data-[vaul-drawer-direction=bottom]/drawer-content:block',\n pillClassName,\n )}\n />\n {children}\n </DrawerPrimitive.Content>\n )\n}\n\nfunction DrawerHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"drawer-header\"\n className={cn('flex flex-col gap-1 px-6 py-3', className)}\n {...props}\n />\n )\n}\n\nfunction DrawerFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"drawer-footer\"\n className={cn('mt-auto flex flex-col gap-2 text-gray', className)}\n {...props}\n />\n )\n}\n\nfunction DrawerTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Title>) {\n return (\n <DrawerPrimitive.Title\n data-slot=\"drawer-title\"\n className={cn('text-lg font-bold text-gray', className)}\n {...props}\n />\n )\n}\n\nfunction DrawerDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Description>) {\n return (\n <DrawerPrimitive.Description\n data-slot=\"drawer-description\"\n className={cn('text-sm text-gray-light', className)}\n {...props}\n />\n )\n}\n\nexport {\n Drawer,\n DrawerClose,\n DrawerContent,\n DrawerDescription,\n DrawerFooter,\n DrawerHeader,\n DrawerOverlay,\n DrawerPortal,\n DrawerTitle,\n DrawerTrigger,\n}\nexport type { DrawerContentProps }\n"],"mappings":";;;;;;;;AAMA,SAAS,OAAO,EACd,wBAAwB,MACxB,GAAG,SACiD;CACpD,OACE,oBAACA,SAAgB,MAAjB;EACE,aAAU;EACa;EACvB,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,cACP,OACA;CACA,OAAO,oBAACA,SAAgB,SAAjB;EAAyB,aAAU;EAAiB,GAAI;CAAQ,CAAA;AACzE;AAEA,SAAS,aAAa,EACpB,UACA,GAAG,SACmD;CACtD,OACE,oBAACA,SAAgB,QAAjB;EAAwB,aAAU;EAAgB,GAAI;YACnDC,QAAM,SAAS,IAAI,WAAW,UAC7BA,QAAM,eAAe,KAAK,IACxB,oBAAC,mBAAD,EAA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tD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,kBAAkB,EACzB,WACA,GAAG,SACwD;CAC3D,OACE,oBAACA,SAAgB,aAAjB;EACE,aAAU;EACV,WAAW,GAAG,2BAA2B,SAAS;EAClD,GAAI;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"drawer.js","names":["DrawerPrimitive","React"],"sources":["../../src/components/drawer.tsx"],"sourcesContent":["import { useRender } from '@base-ui/react/use-render'\nimport * as React from 'react'\nimport { Drawer as DrawerPrimitive } from 'vaul'\nimport { cn } from '../utils/cn'\nimport { PortalTheme } from './theme'\n\nfunction Drawer({\n shouldScaleBackground = true,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root>) {\n return (\n <DrawerPrimitive.Root\n data-slot=\"drawer\"\n shouldScaleBackground={shouldScaleBackground}\n {...props}\n />\n )\n}\n\nfunction DrawerTrigger(\n props: React.ComponentProps<typeof DrawerPrimitive.Trigger>,\n) {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />\n}\n\nfunction DrawerPortal({\n children,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Portal>) {\n return (\n <DrawerPrimitive.Portal data-slot=\"drawer-portal\" {...props}>\n {React.Children.map(children, (child) =>\n React.isValidElement(child) ? (\n <DrawerPortalChild>{child}</DrawerPortalChild>\n ) : (\n child\n ),\n )}\n </DrawerPrimitive.Portal>\n )\n}\n\n// Radix clones each portal child with the Presence ref that gates the exit animation; it must land on the part, not the theme wrapper.\nconst DrawerPortalChild = React.forwardRef<\n HTMLElement,\n { children: React.ReactElement }\n>(function DrawerPortalChild({ children }, ref) {\n const part = useRender({ render: children, ref, props: {} })\n return <PortalTheme>{part}</PortalTheme>\n})\n\nfunction DrawerClose(\n props: React.ComponentProps<typeof DrawerPrimitive.Close>,\n) {\n return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} />\n}\n\nfunction DrawerOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {\n return (\n <DrawerPrimitive.Overlay\n data-slot=\"drawer-overlay\"\n className={cn(\n 'fixed top-(--spark-viewport-top,0) right-0 left-0 z-50 h-(--spark-viewport-height,100%) bg-(--color-overlay) supports-backdrop-filter:backdrop-blur-xs motion-reduce:animate-none! motion-reduce:transition-none!',\n className,\n )}\n data-overlay=\"true\"\n {...props}\n />\n )\n}\n\ninterface DrawerContentProps extends React.ComponentProps<\n typeof DrawerPrimitive.Content\n> {\n pillClassName?: string\n}\n\nconst onInteractOutsideHandler = (event: CustomEvent) => {\n const target = event.target as HTMLElement\n const isOverlay = target.dataset.overlay === 'true'\n\n // Our drawers contain interactive elements that are mounted outside of the drawer\n // Browser extensions like password managers or grammar checkers are also mounted outside\n // We still dismiss on a click/tap outside\n if (!isOverlay) event.preventDefault()\n}\n\nfunction DrawerContent({\n className,\n pillClassName,\n children,\n ...props\n}: DrawerContentProps) {\n return (\n <DrawerPrimitive.Content\n data-slot=\"drawer-content\"\n className={cn(\n 'group/drawer-content fixed z-50 flex h-auto flex-col bg-gray-2 text-gray motion-reduce:animate-none! motion-reduce:transition-none!',\n 'data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-(--spark-viewport-bottom-offset,0) data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg',\n 'data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-(--spark-viewport-top,0) data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg',\n 'data-[vaul-drawer-direction=left]:top-(--spark-viewport-top,0) data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:h-(--spark-viewport-height,100%) data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:border-gray-a1 data-[vaul-drawer-direction=left]:sm:max-w-sm',\n 'data-[vaul-drawer-direction=right]:top-(--spark-viewport-top,0) data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:h-(--spark-viewport-height,100%) data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:border-gray-a1 data-[vaul-drawer-direction=right]:sm:max-w-sm',\n className,\n )}\n onInteractOutside={onInteractOutsideHandler}\n {...props}\n >\n <div\n className={cn(\n 'mx-auto mt-2.5 hidden h-1.5 w-16 shrink-0 rounded-full bg-base-gray-soft group-data-[vaul-drawer-direction=bottom]/drawer-content:block',\n pillClassName,\n )}\n />\n {children}\n </DrawerPrimitive.Content>\n )\n}\n\nfunction DrawerHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"drawer-header\"\n className={cn('flex flex-col gap-2 px-6 py-3', className)}\n {...props}\n />\n )\n}\n\nfunction DrawerFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"drawer-footer\"\n className={cn('mt-auto flex flex-col gap-2 text-gray', className)}\n {...props}\n />\n )\n}\n\nfunction DrawerTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Title>) {\n return (\n <DrawerPrimitive.Title\n data-slot=\"drawer-title\"\n className={cn('text-lg font-bold text-gray', className)}\n {...props}\n />\n )\n}\n\nfunction DrawerDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Description>) {\n return (\n <DrawerPrimitive.Description\n data-slot=\"drawer-description\"\n className={cn('text-sm text-gray-light', className)}\n {...props}\n />\n )\n}\n\nexport {\n Drawer,\n DrawerClose,\n DrawerContent,\n DrawerDescription,\n DrawerFooter,\n DrawerHeader,\n DrawerOverlay,\n DrawerPortal,\n DrawerTitle,\n DrawerTrigger,\n}\nexport type { DrawerContentProps }\n"],"mappings":";;;;;;;;AAMA,SAAS,OAAO,EACd,wBAAwB,MACxB,GAAG,SACiD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AAsC;CAC1E,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,iCAAiC,SAAS;EACxD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,aAAa,EAAE,WAAW,GAAG,SAAsC;CAC1E,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,yCAAyC,SAAS;EAChE,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,YAAY,EACnB,WACA,GAAG,SACkD;CACrD,OACE,oBAACA,SAAgB,OAAjB;EACE,aAAU;EACV,WAAW,GAAG,+BAA+B,SAAS;EACtD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,kBAAkB,EACzB,WACA,GAAG,SACwD;CAC3D,OACE,oBAACA,SAAgB,aAAjB;EACE,aAAU;EACV,WAAW,GAAG,2BAA2B,SAAS;EAClD,GAAI;CACL,CAAA;AAEL"}
@@ -69,21 +69,11 @@ function EmptyStateDescription({ className, ...props }) {
69
69
  ...props
70
70
  });
71
71
  }
72
- const actionsMargin = {
73
- stacked: {
74
- default: "mt-3",
75
- sm: "mt-1"
76
- },
77
- inline: {
78
- default: "mt-3",
79
- sm: "mt-2"
80
- }
81
- };
82
72
  function EmptyStateActions({ className, ...props }) {
83
- const { size, layout } = (0, react.useContext)(EmptyStateContext);
73
+ const { layout } = (0, react.useContext)(EmptyStateContext);
84
74
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
85
75
  "data-slot": "empty-state-actions",
86
- className: (0, cn.cn)("flex flex-wrap gap-2", layout === "stacked" && "justify-center", actionsMargin[layout][size], className),
76
+ className: (0, cn.cn)("mt-2 flex flex-wrap gap-2", layout === "stacked" && "justify-center", className),
87
77
  ...props
88
78
  });
89
79
  }
@@ -105,7 +95,7 @@ function EmptyState({ children, className, icon: Glyph, layout = "stacked", size
105
95
  size: size === "sm" ? "small" : "xl",
106
96
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Glyph, {})
107
97
  }) : null, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
108
- className: (0, cn.cn)("flex flex-col gap-1", layout === "inline" && "min-w-0 flex-1"),
98
+ className: (0, cn.cn)("flex flex-col gap-2", layout === "inline" && "min-w-0 flex-1"),
109
99
  children
110
100
  })]
111
101
  })
@@ -1 +1 @@
1
- {"version":3,"file":"empty-state.cjs","names":["Icon"],"sources":["../../src/components/empty-state.tsx"],"sourcesContent":["import type { SparkIcon } from '@epilot/spark-icons'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport {\n createContext,\n type HTMLAttributes,\n type ReactNode,\n useContext,\n} from 'react'\nimport { cn } from '../utils/cn'\nimport { Icon } from './icon'\n\nconst emptyStateVariants = cva('flex', {\n variants: {\n variant: {\n dashed: 'rounded-lg border border-dashed border-gray',\n ghost: '',\n },\n size: { default: '', sm: '' },\n layout: {\n stacked: 'flex-col items-center text-center',\n inline: 'flex-row items-start text-left',\n },\n },\n compoundVariants: [\n { layout: 'stacked', size: 'default', class: 'gap-4 px-6 py-12' },\n { layout: 'stacked', size: 'sm', class: 'gap-2 px-4 py-5' },\n { layout: 'inline', size: 'default', class: 'gap-4 p-6' },\n { layout: 'inline', size: 'sm', class: 'gap-3 px-4 py-3' },\n ],\n defaultVariants: {\n variant: 'dashed',\n size: 'default',\n layout: 'stacked',\n },\n})\n\ntype EmptyStateVariants = VariantProps<typeof emptyStateVariants>\n\n// A leftover `title` would otherwise compile and render as a tooltip, not a heading.\ninterface EmptyStateProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'title'>,\n Pick<EmptyStateVariants, 'variant'> {\n // null would switch off the compound cells and drop all padding and gap\n size?: NonNullable<EmptyStateVariants['size']>\n layout?: NonNullable<EmptyStateVariants['layout']>\n icon?: SparkIcon\n children: ReactNode\n}\n\nconst EmptyStateContext = createContext<{\n size: NonNullable<EmptyStateVariants['size']>\n layout: NonNullable<EmptyStateVariants['layout']>\n}>({ size: 'default', layout: 'stacked' })\n\nfunction EmptyStateTitle({\n className,\n ...props\n}: HTMLAttributes<HTMLHeadingElement>) {\n const { size } = useContext(EmptyStateContext)\n return (\n <h3\n data-slot=\"empty-state-title\"\n className={cn(\n 'text-gray',\n size === 'sm' ? 'text-sm font-semibold' : 'text-base font-bold',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction EmptyStateDescription({\n className,\n ...props\n}: HTMLAttributes<HTMLParagraphElement>) {\n const { size, layout } = useContext(EmptyStateContext)\n return (\n <p\n data-slot=\"empty-state-description\"\n className={cn(\n layout !== 'inline' && 'mx-auto',\n 'max-w-md text-gray-light',\n size === 'sm' ? 'text-xs' : 'text-sm',\n className,\n )}\n {...props}\n />\n )\n}\n\n// Margins plus the column's gap-1 reproduce the old spacing: 16/8 px stacked, 16/12 px inline.\nconst actionsMargin = {\n stacked: { default: 'mt-3', sm: 'mt-1' },\n inline: { default: 'mt-3', sm: 'mt-2' },\n} as const\n\nfunction EmptyStateActions({\n className,\n ...props\n}: HTMLAttributes<HTMLDivElement>) {\n const { size, layout } = useContext(EmptyStateContext)\n return (\n <div\n data-slot=\"empty-state-actions\"\n className={cn(\n 'flex flex-wrap gap-2',\n layout === 'stacked' && 'justify-center',\n actionsMargin[layout][size],\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction EmptyState({\n children,\n className,\n icon: Glyph,\n layout = 'stacked',\n size = 'default',\n variant,\n ...props\n}: EmptyStateProps) {\n return (\n <EmptyStateContext.Provider value={{ size, layout }}>\n <div\n data-slot=\"empty-state\"\n className={cn(emptyStateVariants({ variant, size, layout }), className)}\n {...props}\n >\n {Glyph ? (\n <Icon size={size === 'sm' ? 'small' : 'xl'}>\n <Glyph />\n </Icon>\n ) : null}\n <div\n className={cn(\n 'flex flex-col gap-1',\n layout === 'inline' && 'min-w-0 flex-1',\n )}\n >\n {children}\n </div>\n </div>\n </EmptyStateContext.Provider>\n )\n}\n\nexport { EmptyState, EmptyStateActions, EmptyStateDescription, EmptyStateTitle }\nexport type { EmptyStateProps }\n"],"mappings":";;;;;;;;AAWA,MAAM,sB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GAAA,MAAA,YAAsB,iBAAiB;CACrD,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,aAAU;EACV,YAAA,GAAA,GAAA,IACE,wBACA,WAAW,aAAa,kBACxB,cAAc,QAAQ,OACtB,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,WAAW,EAClB,UACA,WACA,MAAM,OACN,SAAS,WACT,OAAO,WACP,SACA,GAAG,SACe;CAClB,OACE,iBAAA,GAAA,kBAAA,KAAC,kBAAkB,UAAnB;EAA4B,OAAO;GAAE;GAAM;EAAO;YAChD,iBAAA,GAAA,kBAAA,MAAC,OAAD;GACE,aAAU;GACV,YAAA,GAAA,GAAA,IAAc,mBAAmB;IAAE;IAAS;IAAM;GAAO,CAAC,GAAG,SAAS;GACtE,GAAI;aAHN,CAKG,QACC,iBAAA,GAAA,kBAAA,KAACA,wBAAAA,MAAD;IAAM,MAAM,SAAS,OAAO,UAAU;cACpC,iBAAA,GAAA,kBAAA,KAAC,OAAD,CAAQ,CAAA;GACJ,CAAA,IACJ,MACJ,iBAAA,GAAA,kBAAA,KAAC,OAAD;IACE,YAAA,GAAA,GAAA,IACE,uBACA,WAAW,YAAY,gBACzB;IAEC;GACE,CAAA,CACF;;CACqB,CAAA;AAEhC"}
1
+ {"version":3,"file":"empty-state.cjs","names":["Icon"],"sources":["../../src/components/empty-state.tsx"],"sourcesContent":["import type { SparkIcon } from '@epilot/spark-icons'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport {\n createContext,\n type HTMLAttributes,\n type ReactNode,\n useContext,\n} from 'react'\nimport { cn } from '../utils/cn'\nimport { Icon } from './icon'\n\nconst emptyStateVariants = cva('flex', {\n variants: {\n variant: {\n dashed: 'rounded-lg border border-dashed border-gray',\n ghost: '',\n },\n size: { default: '', sm: '' },\n layout: {\n stacked: 'flex-col items-center text-center',\n inline: 'flex-row items-start text-left',\n },\n },\n compoundVariants: [\n { layout: 'stacked', size: 'default', class: 'gap-4 px-6 py-12' },\n { layout: 'stacked', size: 'sm', class: 'gap-2 px-4 py-5' },\n { layout: 'inline', size: 'default', class: 'gap-4 p-6' },\n { layout: 'inline', size: 'sm', class: 'gap-3 px-4 py-3' },\n ],\n defaultVariants: {\n variant: 'dashed',\n size: 'default',\n layout: 'stacked',\n },\n})\n\ntype EmptyStateVariants = VariantProps<typeof emptyStateVariants>\n\n// A leftover `title` would otherwise compile and render as a tooltip, not a heading.\ninterface EmptyStateProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'title'>,\n Pick<EmptyStateVariants, 'variant'> {\n // null would switch off the compound cells and drop all padding and gap\n size?: NonNullable<EmptyStateVariants['size']>\n layout?: NonNullable<EmptyStateVariants['layout']>\n icon?: SparkIcon\n children: ReactNode\n}\n\nconst EmptyStateContext = createContext<{\n size: NonNullable<EmptyStateVariants['size']>\n layout: NonNullable<EmptyStateVariants['layout']>\n}>({ size: 'default', layout: 'stacked' })\n\nfunction EmptyStateTitle({\n className,\n ...props\n}: HTMLAttributes<HTMLHeadingElement>) {\n const { size } = useContext(EmptyStateContext)\n return (\n <h3\n data-slot=\"empty-state-title\"\n className={cn(\n 'text-gray',\n size === 'sm' ? 'text-sm font-semibold' : 'text-base font-bold',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction EmptyStateDescription({\n className,\n ...props\n}: HTMLAttributes<HTMLParagraphElement>) {\n const { size, layout } = useContext(EmptyStateContext)\n return (\n <p\n data-slot=\"empty-state-description\"\n className={cn(\n layout !== 'inline' && 'mx-auto',\n 'max-w-md text-gray-light',\n size === 'sm' ? 'text-xs' : 'text-sm',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction EmptyStateActions({\n className,\n ...props\n}: HTMLAttributes<HTMLDivElement>) {\n const { layout } = useContext(EmptyStateContext)\n return (\n <div\n data-slot=\"empty-state-actions\"\n className={cn(\n 'mt-2 flex flex-wrap gap-2',\n layout === 'stacked' && 'justify-center',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction EmptyState({\n children,\n className,\n icon: Glyph,\n layout = 'stacked',\n size = 'default',\n variant,\n ...props\n}: EmptyStateProps) {\n return (\n <EmptyStateContext.Provider value={{ size, layout }}>\n <div\n data-slot=\"empty-state\"\n className={cn(emptyStateVariants({ variant, size, layout }), className)}\n {...props}\n >\n {Glyph ? (\n <Icon size={size === 'sm' ? 'small' : 'xl'}>\n <Glyph />\n </Icon>\n ) : null}\n <div\n className={cn(\n 'flex flex-col gap-2',\n layout === 'inline' && 'min-w-0 flex-1',\n )}\n >\n {children}\n </div>\n </div>\n </EmptyStateContext.Provider>\n )\n}\n\nexport { EmptyState, EmptyStateActions, EmptyStateDescription, EmptyStateTitle }\nexport type { EmptyStateProps }\n"],"mappings":";;;;;;;;AAWA,MAAM,sBAAA,GAAA,yBAAA,KAAyB,QAAQ;CACrC,UAAU;EACR,SAAS;GACP,QAAQ;GACR,OAAO;EACT;EACA,MAAM;GAAE,SAAS;GAAI,IAAI;EAAG;EAC5B,QAAQ;GACN,SAAS;GACT,QAAQ;EACV;CACF;CACA,kBAAkB;EAChB;GAAE,QAAQ;GAAW,MAAM;GAAW,OAAO;EAAmB;EAChE;GAAE,QAAQ;GAAW,MAAM;GAAM,OAAO;EAAkB;EAC1D;GAAE,QAAQ;GAAU,MAAM;GAAW,OAAO;EAAY;EACxD;GAAE,QAAQ;GAAU,MAAM;GAAM,OAAO;EAAkB;CAC3D;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;EACN,QAAQ;CACV;AACF,CAAC;AAgBD,MAAM,qBAAA,GAAA,MAAA,eAGH;CAAE,MAAM;CAAW,QAAQ;AAAU,CAAC;AAEzC,SAAS,gBAAgB,EACvB,WACA,GAAG,SACkC;CACrC,MAAM,EAAE,UAAA,GAAA,MAAA,YAAoB,iBAAiB;CAC7C,OACE,iBAAA,GAAA,kBAAA,KAAC,MAAD;EACE,aAAU;EACV,YAAA,GAAA,GAAA,IACE,aACA,SAAS,OAAO,0BAA0B,uBAC1C,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,sBAAsB,EAC7B,WACA,GAAG,SACoC;CACvC,MAAM,EAAE,MAAM,YAAA,GAAA,MAAA,YAAsB,iBAAiB;CACrD,OACE,iBAAA,GAAA,kBAAA,KAAC,KAAD;EACE,aAAU;EACV,YAAA,GAAA,GAAA,IACE,WAAW,YAAY,WACvB,4BACA,SAAS,OAAO,YAAY,WAC5B,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,kBAAkB,EACzB,WACA,GAAG,SAC8B;CACjC,MAAM,EAAE,YAAA,GAAA,MAAA,YAAsB,iBAAiB;CAC/C,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,aAAU;EACV,YAAA,GAAA,GAAA,IACE,6BACA,WAAW,aAAa,kBACxB,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,WAAW,EAClB,UACA,WACA,MAAM,OACN,SAAS,WACT,OAAO,WACP,SACA,GAAG,SACe;CAClB,OACE,iBAAA,GAAA,kBAAA,KAAC,kBAAkB,UAAnB;EAA4B,OAAO;GAAE;GAAM;EAAO;YAChD,iBAAA,GAAA,kBAAA,MAAC,OAAD;GACE,aAAU;GACV,YAAA,GAAA,GAAA,IAAc,mBAAmB;IAAE;IAAS;IAAM;GAAO,CAAC,GAAG,SAAS;GACtE,GAAI;aAHN,CAKG,QACC,iBAAA,GAAA,kBAAA,KAACA,wBAAAA,MAAD;IAAM,MAAM,SAAS,OAAO,UAAU;cACpC,iBAAA,GAAA,kBAAA,KAAC,OAAD,CAAQ,CAAA;GACJ,CAAA,IACJ,MACJ,iBAAA,GAAA,kBAAA,KAAC,OAAD;IACE,YAAA,GAAA,GAAA,IACE,uBACA,WAAW,YAAY,gBACzB;IAEC;GACE,CAAA,CACF;;CACqB,CAAA;AAEhC"}
@@ -68,21 +68,11 @@ function EmptyStateDescription({ className, ...props }) {
68
68
  ...props
69
69
  });
70
70
  }
71
- const actionsMargin = {
72
- stacked: {
73
- default: "mt-3",
74
- sm: "mt-1"
75
- },
76
- inline: {
77
- default: "mt-3",
78
- sm: "mt-2"
79
- }
80
- };
81
71
  function EmptyStateActions({ className, ...props }) {
82
- const { size, layout } = useContext(EmptyStateContext);
72
+ const { layout } = useContext(EmptyStateContext);
83
73
  return /* @__PURE__ */ jsx("div", {
84
74
  "data-slot": "empty-state-actions",
85
- className: cn("flex flex-wrap gap-2", layout === "stacked" && "justify-center", actionsMargin[layout][size], className),
75
+ className: cn("mt-2 flex flex-wrap gap-2", layout === "stacked" && "justify-center", className),
86
76
  ...props
87
77
  });
88
78
  }
@@ -104,7 +94,7 @@ function EmptyState({ children, className, icon: Glyph, layout = "stacked", size
104
94
  size: size === "sm" ? "small" : "xl",
105
95
  children: /* @__PURE__ */ jsx(Glyph, {})
106
96
  }) : null, /* @__PURE__ */ jsx("div", {
107
- className: cn("flex flex-col gap-1", layout === "inline" && "min-w-0 flex-1"),
97
+ className: cn("flex flex-col gap-2", layout === "inline" && "min-w-0 flex-1"),
108
98
  children
109
99
  })]
110
100
  })
@@ -1 +1 @@
1
- {"version":3,"file":"empty-state.js","names":[],"sources":["../../src/components/empty-state.tsx"],"sourcesContent":["import type { SparkIcon } from '@epilot/spark-icons'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport {\n createContext,\n type HTMLAttributes,\n type ReactNode,\n useContext,\n} from 'react'\nimport { cn } from '../utils/cn'\nimport { Icon } from './icon'\n\nconst emptyStateVariants = cva('flex', {\n variants: {\n variant: {\n dashed: 'rounded-lg border border-dashed border-gray',\n ghost: '',\n },\n size: { default: '', sm: '' },\n layout: {\n stacked: 'flex-col items-center text-center',\n inline: 'flex-row items-start text-left',\n },\n },\n compoundVariants: [\n { layout: 'stacked', size: 'default', class: 'gap-4 px-6 py-12' },\n { layout: 'stacked', size: 'sm', class: 'gap-2 px-4 py-5' },\n { layout: 'inline', size: 'default', class: 'gap-4 p-6' },\n { layout: 'inline', size: 'sm', class: 'gap-3 px-4 py-3' },\n ],\n defaultVariants: {\n variant: 'dashed',\n size: 'default',\n layout: 'stacked',\n },\n})\n\ntype EmptyStateVariants = VariantProps<typeof emptyStateVariants>\n\n// A leftover `title` would otherwise compile and render as a tooltip, not a heading.\ninterface EmptyStateProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'title'>,\n Pick<EmptyStateVariants, 'variant'> {\n // null would switch off the compound cells and drop all padding and gap\n size?: NonNullable<EmptyStateVariants['size']>\n layout?: NonNullable<EmptyStateVariants['layout']>\n icon?: SparkIcon\n children: ReactNode\n}\n\nconst EmptyStateContext = createContext<{\n size: NonNullable<EmptyStateVariants['size']>\n layout: NonNullable<EmptyStateVariants['layout']>\n}>({ size: 'default', layout: 'stacked' })\n\nfunction EmptyStateTitle({\n className,\n ...props\n}: HTMLAttributes<HTMLHeadingElement>) {\n const { size } = useContext(EmptyStateContext)\n return (\n <h3\n data-slot=\"empty-state-title\"\n className={cn(\n 'text-gray',\n size === 'sm' ? 'text-sm font-semibold' : 'text-base font-bold',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction EmptyStateDescription({\n className,\n ...props\n}: HTMLAttributes<HTMLParagraphElement>) {\n const { size, layout } = useContext(EmptyStateContext)\n return (\n <p\n data-slot=\"empty-state-description\"\n className={cn(\n layout !== 'inline' && 'mx-auto',\n 'max-w-md text-gray-light',\n size === 'sm' ? 'text-xs' : 'text-sm',\n className,\n )}\n {...props}\n />\n )\n}\n\n// Margins plus the column's gap-1 reproduce the old spacing: 16/8 px stacked, 16/12 px inline.\nconst actionsMargin = {\n stacked: { default: 'mt-3', sm: 'mt-1' },\n inline: { default: 'mt-3', sm: 'mt-2' },\n} as const\n\nfunction EmptyStateActions({\n className,\n ...props\n}: HTMLAttributes<HTMLDivElement>) {\n const { size, layout } = useContext(EmptyStateContext)\n return (\n <div\n data-slot=\"empty-state-actions\"\n className={cn(\n 'flex flex-wrap gap-2',\n layout === 'stacked' && 'justify-center',\n actionsMargin[layout][size],\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction EmptyState({\n children,\n className,\n icon: Glyph,\n layout = 'stacked',\n size = 'default',\n variant,\n ...props\n}: EmptyStateProps) {\n return (\n <EmptyStateContext.Provider value={{ size, layout }}>\n <div\n data-slot=\"empty-state\"\n className={cn(emptyStateVariants({ variant, size, layout }), className)}\n {...props}\n >\n {Glyph ? (\n <Icon size={size === 'sm' ? 'small' : 'xl'}>\n <Glyph />\n </Icon>\n ) : null}\n <div\n className={cn(\n 'flex flex-col gap-1',\n layout === 'inline' && 'min-w-0 flex-1',\n )}\n >\n {children}\n </div>\n </div>\n </EmptyStateContext.Provider>\n )\n}\n\nexport { EmptyState, EmptyStateActions, EmptyStateDescription, EmptyStateTitle }\nexport type { EmptyStateProps }\n"],"mappings":";;;;;;;AAWA,MAAM,qBAAqB,IAAI,QAAQ;CACrC,UAAU;EACR,SAAS;GACP,QAAQ;GACR,OAAO;EACT;EACA,MAAM;GAAE,SAAS;GAAI,IAAI;EAAG;EAC5B,QAAQ;GACN,SAAS;GACT,QAAQ;EACV;CACF;CACA,kBAAkB;EAChB;GAAE,QAAQ;GAAW,MAAM;GAAW,OAAO;EAAmB;EAChE;GAAE,QAAQ;GAAW,MAAM;GAAM,OAAO;EAAkB;EAC1D;GAAE,QAAQ;GAAU,MAAM;GAAW,OAAO;EAAY;EACxD;GAAE,QAAQ;GAAU,MAAM;GAAM,OAAO;EAAkB;CAC3D;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;EACN,QAAQ;CACV;AACF,CAAC;AAgBD,MAAM,oBAAoB,cAGvB;CAAE,MAAM;CAAW,QAAQ;AAAU,CAAC;AAEzC,SAAS,gBAAgB,EACvB,WACA,GAAG,SACkC;CACrC,MAAM,EAAE,SAAS,WAAW,iBAAiB;CAC7C,OACE,oBAAC,MAAD;EACE,aAAU;EACV,WAAW,GACT,aACA,SAAS,OAAO,0BAA0B,uBAC1C,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,sBAAsB,EAC7B,WACA,GAAG,SACoC;CACvC,MAAM,EAAE,MAAM,WAAW,WAAW,iBAAiB;CACrD,OACE,oBAAC,KAAD;EACE,aAAU;EACV,WAAW,GACT,WAAW,YAAY,WACvB,4BACA,SAAS,OAAO,YAAY,WAC5B,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAGA,MAAM,gBAAgB;CACpB,SAAS;EAAE,SAAS;EAAQ,IAAI;CAAO;CACvC,QAAQ;EAAE,SAAS;EAAQ,IAAI;CAAO;AACxC;AAEA,SAAS,kBAAkB,EACzB,WACA,GAAG,SAC8B;CACjC,MAAM,EAAE,MAAM,WAAW,WAAW,iBAAiB;CACrD,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,wBACA,WAAW,aAAa,kBACxB,cAAc,QAAQ,OACtB,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,WAAW,EAClB,UACA,WACA,MAAM,OACN,SAAS,WACT,OAAO,WACP,SACA,GAAG,SACe;CAClB,OACE,oBAAC,kBAAkB,UAAnB;EAA4B,OAAO;GAAE;GAAM;EAAO;YAChD,qBAAC,OAAD;GACE,aAAU;GACV,WAAW,GAAG,mBAAmB;IAAE;IAAS;IAAM;GAAO,CAAC,GAAG,SAAS;GACtE,GAAI;aAHN,CAKG,QACC,oBAAC,MAAD;IAAM,MAAM,SAAS,OAAO,UAAU;cACpC,oBAAC,OAAD,CAAQ,CAAA;GACJ,CAAA,IACJ,MACJ,oBAAC,OAAD;IACE,WAAW,GACT,uBACA,WAAW,YAAY,gBACzB;IAEC;GACE,CAAA,CACF;;CACqB,CAAA;AAEhC"}
1
+ {"version":3,"file":"empty-state.js","names":[],"sources":["../../src/components/empty-state.tsx"],"sourcesContent":["import type { SparkIcon } from '@epilot/spark-icons'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport {\n createContext,\n type HTMLAttributes,\n type ReactNode,\n useContext,\n} from 'react'\nimport { cn } from '../utils/cn'\nimport { Icon } from './icon'\n\nconst emptyStateVariants = cva('flex', {\n variants: {\n variant: {\n dashed: 'rounded-lg border border-dashed border-gray',\n ghost: '',\n },\n size: { default: '', sm: '' },\n layout: {\n stacked: 'flex-col items-center text-center',\n inline: 'flex-row items-start text-left',\n },\n },\n compoundVariants: [\n { layout: 'stacked', size: 'default', class: 'gap-4 px-6 py-12' },\n { layout: 'stacked', size: 'sm', class: 'gap-2 px-4 py-5' },\n { layout: 'inline', size: 'default', class: 'gap-4 p-6' },\n { layout: 'inline', size: 'sm', class: 'gap-3 px-4 py-3' },\n ],\n defaultVariants: {\n variant: 'dashed',\n size: 'default',\n layout: 'stacked',\n },\n})\n\ntype EmptyStateVariants = VariantProps<typeof emptyStateVariants>\n\n// A leftover `title` would otherwise compile and render as a tooltip, not a heading.\ninterface EmptyStateProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'title'>,\n Pick<EmptyStateVariants, 'variant'> {\n // null would switch off the compound cells and drop all padding and gap\n size?: NonNullable<EmptyStateVariants['size']>\n layout?: NonNullable<EmptyStateVariants['layout']>\n icon?: SparkIcon\n children: ReactNode\n}\n\nconst EmptyStateContext = createContext<{\n size: NonNullable<EmptyStateVariants['size']>\n layout: NonNullable<EmptyStateVariants['layout']>\n}>({ size: 'default', layout: 'stacked' })\n\nfunction EmptyStateTitle({\n className,\n ...props\n}: HTMLAttributes<HTMLHeadingElement>) {\n const { size } = useContext(EmptyStateContext)\n return (\n <h3\n data-slot=\"empty-state-title\"\n className={cn(\n 'text-gray',\n size === 'sm' ? 'text-sm font-semibold' : 'text-base font-bold',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction EmptyStateDescription({\n className,\n ...props\n}: HTMLAttributes<HTMLParagraphElement>) {\n const { size, layout } = useContext(EmptyStateContext)\n return (\n <p\n data-slot=\"empty-state-description\"\n className={cn(\n layout !== 'inline' && 'mx-auto',\n 'max-w-md text-gray-light',\n size === 'sm' ? 'text-xs' : 'text-sm',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction EmptyStateActions({\n className,\n ...props\n}: HTMLAttributes<HTMLDivElement>) {\n const { layout } = useContext(EmptyStateContext)\n return (\n <div\n data-slot=\"empty-state-actions\"\n className={cn(\n 'mt-2 flex flex-wrap gap-2',\n layout === 'stacked' && 'justify-center',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction EmptyState({\n children,\n className,\n icon: Glyph,\n layout = 'stacked',\n size = 'default',\n variant,\n ...props\n}: EmptyStateProps) {\n return (\n <EmptyStateContext.Provider value={{ size, layout }}>\n <div\n data-slot=\"empty-state\"\n className={cn(emptyStateVariants({ variant, size, layout }), className)}\n {...props}\n >\n {Glyph ? (\n <Icon size={size === 'sm' ? 'small' : 'xl'}>\n <Glyph />\n </Icon>\n ) : null}\n <div\n className={cn(\n 'flex flex-col gap-2',\n layout === 'inline' && 'min-w-0 flex-1',\n )}\n >\n {children}\n </div>\n </div>\n </EmptyStateContext.Provider>\n )\n}\n\nexport { EmptyState, EmptyStateActions, EmptyStateDescription, EmptyStateTitle }\nexport type { EmptyStateProps }\n"],"mappings":";;;;;;;AAWA,MAAM,qBAAqB,IAAI,QAAQ;CACrC,UAAU;EACR,SAAS;GACP,QAAQ;GACR,OAAO;EACT;EACA,MAAM;GAAE,SAAS;GAAI,IAAI;EAAG;EAC5B,QAAQ;GACN,SAAS;GACT,QAAQ;EACV;CACF;CACA,kBAAkB;EAChB;GAAE,QAAQ;GAAW,MAAM;GAAW,OAAO;EAAmB;EAChE;GAAE,QAAQ;GAAW,MAAM;GAAM,OAAO;EAAkB;EAC1D;GAAE,QAAQ;GAAU,MAAM;GAAW,OAAO;EAAY;EACxD;GAAE,QAAQ;GAAU,MAAM;GAAM,OAAO;EAAkB;CAC3D;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;EACN,QAAQ;CACV;AACF,CAAC;AAgBD,MAAM,oBAAoB,cAGvB;CAAE,MAAM;CAAW,QAAQ;AAAU,CAAC;AAEzC,SAAS,gBAAgB,EACvB,WACA,GAAG,SACkC;CACrC,MAAM,EAAE,SAAS,WAAW,iBAAiB;CAC7C,OACE,oBAAC,MAAD;EACE,aAAU;EACV,WAAW,GACT,aACA,SAAS,OAAO,0BAA0B,uBAC1C,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,sBAAsB,EAC7B,WACA,GAAG,SACoC;CACvC,MAAM,EAAE,MAAM,WAAW,WAAW,iBAAiB;CACrD,OACE,oBAAC,KAAD;EACE,aAAU;EACV,WAAW,GACT,WAAW,YAAY,WACvB,4BACA,SAAS,OAAO,YAAY,WAC5B,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,kBAAkB,EACzB,WACA,GAAG,SAC8B;CACjC,MAAM,EAAE,WAAW,WAAW,iBAAiB;CAC/C,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,6BACA,WAAW,aAAa,kBACxB,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,WAAW,EAClB,UACA,WACA,MAAM,OACN,SAAS,WACT,OAAO,WACP,SACA,GAAG,SACe;CAClB,OACE,oBAAC,kBAAkB,UAAnB;EAA4B,OAAO;GAAE;GAAM;EAAO;YAChD,qBAAC,OAAD;GACE,aAAU;GACV,WAAW,GAAG,mBAAmB;IAAE;IAAS;IAAM;GAAO,CAAC,GAAG,SAAS;GACtE,GAAI;aAHN,CAKG,QACC,oBAAC,MAAD;IAAM,MAAM,SAAS,OAAO,UAAU;cACpC,oBAAC,OAAD,CAAQ,CAAA;GACJ,CAAA,IACJ,MACJ,oBAAC,OAAD;IACE,WAAW,GACT,uBACA,WAAW,YAAY,gBACzB;IAEC;GACE,CAAA,CACF;;CACqB,CAAA;AAEhC"}
@@ -20,7 +20,7 @@ function EnergyBreakdown({ title, subtitle, items, centerSub = "kWh" }) {
20
20
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
21
21
  className: "flex flex-col gap-4 pt-3 pb-5",
22
22
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
23
- className: "flex flex-col gap-0.5",
23
+ className: "flex flex-col gap-2",
24
24
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
25
25
  className: "text-sm font-semibold text-gray",
26
26
  children: title
@@ -1 +1 @@
1
- {"version":3,"file":"energy-breakdown.cjs","names":["formatThousands","integerFormat","oneDecimalFormat","twoDecimalFormat","DonutChart","formatEnergy"],"sources":["../../src/components/energy-breakdown.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { NARROW_NBSP } from '../utils/chars'\nimport {\n formatEnergy,\n formatThousands,\n integerFormat,\n oneDecimalFormat,\n twoDecimalFormat,\n} from '../utils/format'\nimport { DonutChart } from './donut-chart'\n\nexport type BreakdownItem = {\n label: string\n value: number\n color: string\n excludeFromCenterTotal?: boolean\n}\n\nexport type EnergyBreakdownProps = {\n title: string\n subtitle: string\n items: BreakdownItem[]\n centerSub?: string\n}\n\nfunction formatBreakdownCenter(v: number) {\n if (v >= 1000) return formatThousands(v)\n if (v >= 100) return integerFormat.format(v)\n if (v >= 10) return oneDecimalFormat.format(v)\n return twoDecimalFormat.format(v)\n}\n\nexport function EnergyBreakdown({\n title,\n subtitle,\n items,\n centerSub = 'kWh',\n}: EnergyBreakdownProps) {\n const sortedItems = useMemo(\n () => items.toSorted((a, b) => b.value - a.value),\n [items],\n )\n\n const total = items.reduce((s, i) => s + i.value, 0)\n const centerTotal = items\n .filter((i) => !i.excludeFromCenterTotal)\n .reduce((s, i) => s + i.value, 0)\n\n const dataEmpty = total === 0\n\n if (dataEmpty) return null\n\n return (\n <div className=\"flex flex-col gap-4 pt-3 pb-5\">\n <div className=\"flex flex-col gap-0.5\">\n <span className=\"text-sm font-semibold text-gray\">{title}</span>\n <span className=\"text-xs text-gray-light\">{subtitle}</span>\n </div>\n\n <div className=\"flex items-center gap-6\">\n <DonutChart\n centerLabel={formatBreakdownCenter(centerTotal)}\n centerSub={centerSub}\n segments={sortedItems.map(({ value, color }) => ({ value, color }))}\n />\n\n <div className=\"flex flex-1 flex-col gap-3\">\n {sortedItems.map(({ label, value, color }) => {\n const pct = (value / total) * 100\n return (\n <div key={label} className=\"flex flex-col gap-1.5\">\n <div className=\"flex items-baseline justify-between gap-2\">\n <span className=\"min-w-0 truncate text-sm font-medium text-gray\">\n {label}\n </span>\n <span className=\"flex shrink-0 items-baseline gap-1.5 text-xs tabular-nums\">\n <span className=\"text-gray-light\">\n {formatEnergy(value)}\n </span>\n <span className=\"font-semibold text-gray\">\n {`${integerFormat.format(pct)}${NARROW_NBSP}%`}\n </span>\n </span>\n </div>\n <div className=\"h-1 w-full overflow-hidden rounded-full bg-gray-a4\">\n <div\n className=\"h-full rounded-full\"\n style={{ width: `${pct}%`, background: color }}\n />\n </div>\n </div>\n )\n })}\n </div>\n </div>\n </div>\n )\n}\n"],"mappings":";;;;;;;;AAyBA,SAAS,sBAAsB,GAAW;CACxC,IAAI,KAAK,KAAM,OAAOA,qBAAAA,gBAAgB,CAAC;CACvC,IAAI,KAAK,KAAK,OAAOC,qBAAAA,cAAc,OAAO,CAAC;CAC3C,IAAI,KAAK,IAAI,OAAOC,qBAAAA,iBAAiB,OAAO,CAAC;CAC7C,OAAOC,qBAAAA,iBAAiB,OAAO,CAAC;AAClC;AAEA,SAAgB,gBAAgB,EAC9B,OACA,UACA,OACA,YAAY,SACW;CACvB,MAAM,eAAA,GAAA,MAAA,eACE,MAAM,UAAU,GAAG,MAAM,EAAE,QAAQ,EAAE,KAAK,GAChD,CAAC,KAAK,CACR;CAEA,MAAM,QAAQ,MAAM,QAAQ,GAAG,MAAM,IAAI,EAAE,OAAO,CAAC;CACnD,MAAM,cAAc,MACjB,QAAQ,MAAM,CAAC,EAAE,sBAAsB,EACvC,QAAQ,GAAG,MAAM,IAAI,EAAE,OAAO,CAAC;CAIlC,IAFkB,UAAU,GAEb,OAAO;CAEtB,OACE,iBAAA,GAAA,kBAAA,MAAC,OAAD;EAAK,WAAU;YAAf,CACE,iBAAA,GAAA,kBAAA,MAAC,OAAD;GAAK,WAAU;aAAf,CACE,iBAAA,GAAA,kBAAA,KAAC,QAAD;IAAM,WAAU;cAAmC;GAAY,CAAA,GAC/D,iBAAA,GAAA,kBAAA,KAAC,QAAD;IAAM,WAAU;cAA2B;GAAe,CAAA,CACvD;MAEL,iBAAA,GAAA,kBAAA,MAAC,OAAD;GAAK,WAAU;aAAf,CACE,iBAAA,GAAA,kBAAA,KAACC,+BAAAA,YAAD;IACE,aAAa,sBAAsB,WAAW;IACnC;IACX,UAAU,YAAY,KAAK,EAAE,OAAO,aAAa;KAAE;KAAO;IAAM,EAAE;GACnE,CAAA,GAED,iBAAA,GAAA,kBAAA,KAAC,OAAD;IAAK,WAAU;cACZ,YAAY,KAAK,EAAE,OAAO,OAAO,YAAY;KAC5C,MAAM,MAAO,QAAQ,QAAS;KAC9B,OACE,iBAAA,GAAA,kBAAA,MAAC,OAAD;MAAiB,WAAU;gBAA3B,CACE,iBAAA,GAAA,kBAAA,MAAC,OAAD;OAAK,WAAU;iBAAf,CACE,iBAAA,GAAA,kBAAA,KAAC,QAAD;QAAM,WAAU;kBACb;OACG,CAAA,GACN,iBAAA,GAAA,kBAAA,MAAC,QAAD;QAAM,WAAU;kBAAhB,CACE,iBAAA,GAAA,kBAAA,KAAC,QAAD;SAAM,WAAU;mBACbC,qBAAAA,aAAa,KAAK;QACf,CAAA,GACN,iBAAA,GAAA,kBAAA,KAAC,QAAD;SAAM,WAAU;mBACb,GAAGJ,qBAAAA,cAAc,OAAO,GAAG;QACxB,CAAA,CACF;SACH;UACL,iBAAA,GAAA,kBAAA,KAAC,OAAD;OAAK,WAAU;iBACb,iBAAA,GAAA,kBAAA,KAAC,OAAD;QACE,WAAU;QACV,OAAO;SAAE,OAAO,GAAG,IAAI;SAAI,YAAY;QAAM;OAC9C,CAAA;MACE,CAAA,CACF;QApBK,KAoBL;IAET,CAAC;GACE,CAAA,CACF;IACF;;AAET"}
1
+ {"version":3,"file":"energy-breakdown.cjs","names":["formatThousands","integerFormat","oneDecimalFormat","twoDecimalFormat","DonutChart","formatEnergy"],"sources":["../../src/components/energy-breakdown.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { NARROW_NBSP } from '../utils/chars'\nimport {\n formatEnergy,\n formatThousands,\n integerFormat,\n oneDecimalFormat,\n twoDecimalFormat,\n} from '../utils/format'\nimport { DonutChart } from './donut-chart'\n\nexport type BreakdownItem = {\n label: string\n value: number\n color: string\n excludeFromCenterTotal?: boolean\n}\n\nexport type EnergyBreakdownProps = {\n title: string\n subtitle: string\n items: BreakdownItem[]\n centerSub?: string\n}\n\nfunction formatBreakdownCenter(v: number) {\n if (v >= 1000) return formatThousands(v)\n if (v >= 100) return integerFormat.format(v)\n if (v >= 10) return oneDecimalFormat.format(v)\n return twoDecimalFormat.format(v)\n}\n\nexport function EnergyBreakdown({\n title,\n subtitle,\n items,\n centerSub = 'kWh',\n}: EnergyBreakdownProps) {\n const sortedItems = useMemo(\n () => items.toSorted((a, b) => b.value - a.value),\n [items],\n )\n\n const total = items.reduce((s, i) => s + i.value, 0)\n const centerTotal = items\n .filter((i) => !i.excludeFromCenterTotal)\n .reduce((s, i) => s + i.value, 0)\n\n const dataEmpty = total === 0\n\n if (dataEmpty) return null\n\n return (\n <div className=\"flex flex-col gap-4 pt-3 pb-5\">\n <div className=\"flex flex-col gap-2\">\n <span className=\"text-sm font-semibold text-gray\">{title}</span>\n <span className=\"text-xs text-gray-light\">{subtitle}</span>\n </div>\n\n <div className=\"flex items-center gap-6\">\n <DonutChart\n centerLabel={formatBreakdownCenter(centerTotal)}\n centerSub={centerSub}\n segments={sortedItems.map(({ value, color }) => ({ value, color }))}\n />\n\n <div className=\"flex flex-1 flex-col gap-3\">\n {sortedItems.map(({ label, value, color }) => {\n const pct = (value / total) * 100\n return (\n <div key={label} className=\"flex flex-col gap-1.5\">\n <div className=\"flex items-baseline justify-between gap-2\">\n <span className=\"min-w-0 truncate text-sm font-medium text-gray\">\n {label}\n </span>\n <span className=\"flex shrink-0 items-baseline gap-1.5 text-xs tabular-nums\">\n <span className=\"text-gray-light\">\n {formatEnergy(value)}\n </span>\n <span className=\"font-semibold text-gray\">\n {`${integerFormat.format(pct)}${NARROW_NBSP}%`}\n </span>\n </span>\n </div>\n <div className=\"h-1 w-full overflow-hidden rounded-full bg-gray-a4\">\n <div\n className=\"h-full rounded-full\"\n style={{ width: `${pct}%`, background: color }}\n />\n </div>\n </div>\n )\n })}\n </div>\n </div>\n </div>\n )\n}\n"],"mappings":";;;;;;;;AAyBA,SAAS,sBAAsB,GAAW;CACxC,IAAI,KAAK,KAAM,OAAOA,qBAAAA,gBAAgB,CAAC;CACvC,IAAI,KAAK,KAAK,OAAOC,qBAAAA,cAAc,OAAO,CAAC;CAC3C,IAAI,KAAK,IAAI,OAAOC,qBAAAA,iBAAiB,OAAO,CAAC;CAC7C,OAAOC,qBAAAA,iBAAiB,OAAO,CAAC;AAClC;AAEA,SAAgB,gBAAgB,EAC9B,OACA,UACA,OACA,YAAY,SACW;CACvB,MAAM,eAAA,GAAA,MAAA,eACE,MAAM,UAAU,GAAG,MAAM,EAAE,QAAQ,EAAE,KAAK,GAChD,CAAC,KAAK,CACR;CAEA,MAAM,QAAQ,MAAM,QAAQ,GAAG,MAAM,IAAI,EAAE,OAAO,CAAC;CACnD,MAAM,cAAc,MACjB,QAAQ,MAAM,CAAC,EAAE,sBAAsB,EACvC,QAAQ,GAAG,MAAM,IAAI,EAAE,OAAO,CAAC;CAIlC,IAFkB,UAAU,GAEb,OAAO;CAEtB,OACE,iBAAA,GAAA,kBAAA,MAAC,OAAD;EAAK,WAAU;YAAf,CACE,iBAAA,GAAA,kBAAA,MAAC,OAAD;GAAK,WAAU;aAAf,CACE,iBAAA,GAAA,kBAAA,KAAC,QAAD;IAAM,WAAU;cAAmC;GAAY,CAAA,GAC/D,iBAAA,GAAA,kBAAA,KAAC,QAAD;IAAM,WAAU;cAA2B;GAAe,CAAA,CACvD;MAEL,iBAAA,GAAA,kBAAA,MAAC,OAAD;GAAK,WAAU;aAAf,CACE,iBAAA,GAAA,kBAAA,KAACC,+BAAAA,YAAD;IACE,aAAa,sBAAsB,WAAW;IACnC;IACX,UAAU,YAAY,KAAK,EAAE,OAAO,aAAa;KAAE;KAAO;IAAM,EAAE;GACnE,CAAA,GAED,iBAAA,GAAA,kBAAA,KAAC,OAAD;IAAK,WAAU;cACZ,YAAY,KAAK,EAAE,OAAO,OAAO,YAAY;KAC5C,MAAM,MAAO,QAAQ,QAAS;KAC9B,OACE,iBAAA,GAAA,kBAAA,MAAC,OAAD;MAAiB,WAAU;gBAA3B,CACE,iBAAA,GAAA,kBAAA,MAAC,OAAD;OAAK,WAAU;iBAAf,CACE,iBAAA,GAAA,kBAAA,KAAC,QAAD;QAAM,WAAU;kBACb;OACG,CAAA,GACN,iBAAA,GAAA,kBAAA,MAAC,QAAD;QAAM,WAAU;kBAAhB,CACE,iBAAA,GAAA,kBAAA,KAAC,QAAD;SAAM,WAAU;mBACbC,qBAAAA,aAAa,KAAK;QACf,CAAA,GACN,iBAAA,GAAA,kBAAA,KAAC,QAAD;SAAM,WAAU;mBACb,GAAGJ,qBAAAA,cAAc,OAAO,GAAG;QACxB,CAAA,CACF;SACH;UACL,iBAAA,GAAA,kBAAA,KAAC,OAAD;OAAK,WAAU;iBACb,iBAAA,GAAA,kBAAA,KAAC,OAAD;QACE,WAAU;QACV,OAAO;SAAE,OAAO,GAAG,IAAI;SAAI,YAAY;QAAM;OAC9C,CAAA;MACE,CAAA,CACF;QApBK,KAoBL;IAET,CAAC;GACE,CAAA,CACF;IACF;;AAET"}
@@ -19,7 +19,7 @@ function EnergyBreakdown({ title, subtitle, items, centerSub = "kWh" }) {
19
19
  return /* @__PURE__ */ jsxs("div", {
20
20
  className: "flex flex-col gap-4 pt-3 pb-5",
21
21
  children: [/* @__PURE__ */ jsxs("div", {
22
- className: "flex flex-col gap-0.5",
22
+ className: "flex flex-col gap-2",
23
23
  children: [/* @__PURE__ */ jsx("span", {
24
24
  className: "text-sm font-semibold text-gray",
25
25
  children: title
@@ -1 +1 @@
1
- {"version":3,"file":"energy-breakdown.js","names":[],"sources":["../../src/components/energy-breakdown.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { NARROW_NBSP } from '../utils/chars'\nimport {\n formatEnergy,\n formatThousands,\n integerFormat,\n oneDecimalFormat,\n twoDecimalFormat,\n} from '../utils/format'\nimport { DonutChart } from './donut-chart'\n\nexport type BreakdownItem = {\n label: string\n value: number\n color: string\n excludeFromCenterTotal?: boolean\n}\n\nexport type EnergyBreakdownProps = {\n title: string\n subtitle: string\n items: BreakdownItem[]\n centerSub?: string\n}\n\nfunction formatBreakdownCenter(v: number) {\n if (v >= 1000) return formatThousands(v)\n if (v >= 100) return integerFormat.format(v)\n if (v >= 10) return oneDecimalFormat.format(v)\n return twoDecimalFormat.format(v)\n}\n\nexport function EnergyBreakdown({\n title,\n subtitle,\n items,\n centerSub = 'kWh',\n}: EnergyBreakdownProps) {\n const sortedItems = useMemo(\n () => items.toSorted((a, b) => b.value - a.value),\n [items],\n )\n\n const total = items.reduce((s, i) => s + i.value, 0)\n const centerTotal = items\n .filter((i) => !i.excludeFromCenterTotal)\n .reduce((s, i) => s + i.value, 0)\n\n const dataEmpty = total === 0\n\n if (dataEmpty) return null\n\n return (\n <div className=\"flex flex-col gap-4 pt-3 pb-5\">\n <div className=\"flex flex-col gap-0.5\">\n <span className=\"text-sm font-semibold text-gray\">{title}</span>\n <span className=\"text-xs text-gray-light\">{subtitle}</span>\n </div>\n\n <div className=\"flex items-center gap-6\">\n <DonutChart\n centerLabel={formatBreakdownCenter(centerTotal)}\n centerSub={centerSub}\n segments={sortedItems.map(({ value, color }) => ({ value, color }))}\n />\n\n <div className=\"flex flex-1 flex-col gap-3\">\n {sortedItems.map(({ label, value, color }) => {\n const pct = (value / total) * 100\n return (\n <div key={label} className=\"flex flex-col gap-1.5\">\n <div className=\"flex items-baseline justify-between gap-2\">\n <span className=\"min-w-0 truncate text-sm font-medium text-gray\">\n {label}\n </span>\n <span className=\"flex shrink-0 items-baseline gap-1.5 text-xs tabular-nums\">\n <span className=\"text-gray-light\">\n {formatEnergy(value)}\n </span>\n <span className=\"font-semibold text-gray\">\n {`${integerFormat.format(pct)}${NARROW_NBSP}%`}\n </span>\n </span>\n </div>\n <div className=\"h-1 w-full overflow-hidden rounded-full bg-gray-a4\">\n <div\n className=\"h-full rounded-full\"\n style={{ width: `${pct}%`, background: color }}\n />\n </div>\n </div>\n )\n })}\n </div>\n </div>\n </div>\n )\n}\n"],"mappings":";;;;;;;AAyBA,SAAS,sBAAsB,GAAW;CACxC,IAAI,KAAK,KAAM,OAAO,gBAAgB,CAAC;CACvC,IAAI,KAAK,KAAK,OAAO,cAAc,OAAO,CAAC;CAC3C,IAAI,KAAK,IAAI,OAAO,iBAAiB,OAAO,CAAC;CAC7C,OAAO,iBAAiB,OAAO,CAAC;AAClC;AAEA,SAAgB,gBAAgB,EAC9B,OACA,UACA,OACA,YAAY,SACW;CACvB,MAAM,cAAc,cACZ,MAAM,UAAU,GAAG,MAAM,EAAE,QAAQ,EAAE,KAAK,GAChD,CAAC,KAAK,CACR;CAEA,MAAM,QAAQ,MAAM,QAAQ,GAAG,MAAM,IAAI,EAAE,OAAO,CAAC;CACnD,MAAM,cAAc,MACjB,QAAQ,MAAM,CAAC,EAAE,sBAAsB,EACvC,QAAQ,GAAG,MAAM,IAAI,EAAE,OAAO,CAAC;CAIlC,IAFkB,UAAU,GAEb,OAAO;CAEtB,OACE,qBAAC,OAAD;EAAK,WAAU;YAAf,CACE,qBAAC,OAAD;GAAK,WAAU;aAAf,CACE,oBAAC,QAAD;IAAM,WAAU;cAAmC;GAAY,CAAA,GAC/D,oBAAC,QAAD;IAAM,WAAU;cAA2B;GAAe,CAAA,CACvD;MAEL,qBAAC,OAAD;GAAK,WAAU;aAAf,CACE,oBAAC,YAAD;IACE,aAAa,sBAAsB,WAAW;IACnC;IACX,UAAU,YAAY,KAAK,EAAE,OAAO,aAAa;KAAE;KAAO;IAAM,EAAE;GACnE,CAAA,GAED,oBAAC,OAAD;IAAK,WAAU;cACZ,YAAY,KAAK,EAAE,OAAO,OAAO,YAAY;KAC5C,MAAM,MAAO,QAAQ,QAAS;KAC9B,OACE,qBAAC,OAAD;MAAiB,WAAU;gBAA3B,CACE,qBAAC,OAAD;OAAK,WAAU;iBAAf,CACE,oBAAC,QAAD;QAAM,WAAU;kBACb;OACG,CAAA,GACN,qBAAC,QAAD;QAAM,WAAU;kBAAhB,CACE,oBAAC,QAAD;SAAM,WAAU;mBACb,aAAa,KAAK;QACf,CAAA,GACN,oBAAC,QAAD;SAAM,WAAU;mBACb,GAAG,cAAc,OAAO,GAAG;QACxB,CAAA,CACF;SACH;UACL,oBAAC,OAAD;OAAK,WAAU;iBACb,oBAAC,OAAD;QACE,WAAU;QACV,OAAO;SAAE,OAAO,GAAG,IAAI;SAAI,YAAY;QAAM;OAC9C,CAAA;MACE,CAAA,CACF;QApBK,KAoBL;IAET,CAAC;GACE,CAAA,CACF;IACF;;AAET"}
1
+ {"version":3,"file":"energy-breakdown.js","names":[],"sources":["../../src/components/energy-breakdown.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { NARROW_NBSP } from '../utils/chars'\nimport {\n formatEnergy,\n formatThousands,\n integerFormat,\n oneDecimalFormat,\n twoDecimalFormat,\n} from '../utils/format'\nimport { DonutChart } from './donut-chart'\n\nexport type BreakdownItem = {\n label: string\n value: number\n color: string\n excludeFromCenterTotal?: boolean\n}\n\nexport type EnergyBreakdownProps = {\n title: string\n subtitle: string\n items: BreakdownItem[]\n centerSub?: string\n}\n\nfunction formatBreakdownCenter(v: number) {\n if (v >= 1000) return formatThousands(v)\n if (v >= 100) return integerFormat.format(v)\n if (v >= 10) return oneDecimalFormat.format(v)\n return twoDecimalFormat.format(v)\n}\n\nexport function EnergyBreakdown({\n title,\n subtitle,\n items,\n centerSub = 'kWh',\n}: EnergyBreakdownProps) {\n const sortedItems = useMemo(\n () => items.toSorted((a, b) => b.value - a.value),\n [items],\n )\n\n const total = items.reduce((s, i) => s + i.value, 0)\n const centerTotal = items\n .filter((i) => !i.excludeFromCenterTotal)\n .reduce((s, i) => s + i.value, 0)\n\n const dataEmpty = total === 0\n\n if (dataEmpty) return null\n\n return (\n <div className=\"flex flex-col gap-4 pt-3 pb-5\">\n <div className=\"flex flex-col gap-2\">\n <span className=\"text-sm font-semibold text-gray\">{title}</span>\n <span className=\"text-xs text-gray-light\">{subtitle}</span>\n </div>\n\n <div className=\"flex items-center gap-6\">\n <DonutChart\n centerLabel={formatBreakdownCenter(centerTotal)}\n centerSub={centerSub}\n segments={sortedItems.map(({ value, color }) => ({ value, color }))}\n />\n\n <div className=\"flex flex-1 flex-col gap-3\">\n {sortedItems.map(({ label, value, color }) => {\n const pct = (value / total) * 100\n return (\n <div key={label} className=\"flex flex-col gap-1.5\">\n <div className=\"flex items-baseline justify-between gap-2\">\n <span className=\"min-w-0 truncate text-sm font-medium text-gray\">\n {label}\n </span>\n <span className=\"flex shrink-0 items-baseline gap-1.5 text-xs tabular-nums\">\n <span className=\"text-gray-light\">\n {formatEnergy(value)}\n </span>\n <span className=\"font-semibold text-gray\">\n {`${integerFormat.format(pct)}${NARROW_NBSP}%`}\n </span>\n </span>\n </div>\n <div className=\"h-1 w-full overflow-hidden rounded-full bg-gray-a4\">\n <div\n className=\"h-full rounded-full\"\n style={{ width: `${pct}%`, background: color }}\n />\n </div>\n </div>\n )\n })}\n </div>\n </div>\n </div>\n )\n}\n"],"mappings":";;;;;;;AAyBA,SAAS,sBAAsB,GAAW;CACxC,IAAI,KAAK,KAAM,OAAO,gBAAgB,CAAC;CACvC,IAAI,KAAK,KAAK,OAAO,cAAc,OAAO,CAAC;CAC3C,IAAI,KAAK,IAAI,OAAO,iBAAiB,OAAO,CAAC;CAC7C,OAAO,iBAAiB,OAAO,CAAC;AAClC;AAEA,SAAgB,gBAAgB,EAC9B,OACA,UACA,OACA,YAAY,SACW;CACvB,MAAM,cAAc,cACZ,MAAM,UAAU,GAAG,MAAM,EAAE,QAAQ,EAAE,KAAK,GAChD,C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one, ...rest }) => /* @__PURE
43
43
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Glyph, { className: "[--spark-icon-size:18px]" })
44
44
  });
45
45
  const EntityCardTitleColumn = ({ className, ...rest }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
46
- className: (0, cn.cn)("flex min-w-0 flex-1 flex-col gap-0.5", className),
46
+ className: (0, cn.cn)("flex min-w-0 flex-1 flex-col gap-1", className),
47
47
  ...rest
48
48
  });
49
49
  const EntityCardTitle = ({ className, ...rest }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {