@epilot/spark-ui 0.19.0 → 0.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/dist/components/attachment.d.cts +2 -2
  2. package/dist/components/attachment.d.ts +2 -2
  3. package/dist/components/avatar.cjs +1 -1
  4. package/dist/components/avatar.cjs.map +1 -1
  5. package/dist/components/avatar.js +1 -1
  6. package/dist/components/avatar.js.map +1 -1
  7. package/dist/components/badge.cjs +1 -1
  8. package/dist/components/badge.cjs.map +1 -1
  9. package/dist/components/badge.d.cts +2 -1
  10. package/dist/components/badge.d.ts +2 -1
  11. package/dist/components/badge.js +1 -1
  12. package/dist/components/badge.js.map +1 -1
  13. package/dist/components/{energy-bar-chart.cjs → bar-chart-with-total.cjs} +4 -4
  14. package/dist/components/bar-chart-with-total.cjs.map +1 -0
  15. package/dist/components/bar-chart-with-total.d.cts +19 -0
  16. package/dist/components/bar-chart-with-total.d.ts +19 -0
  17. package/dist/components/{energy-bar-chart.js → bar-chart-with-total.js} +4 -4
  18. package/dist/components/bar-chart-with-total.js.map +1 -0
  19. package/dist/components/bar-chart.cjs +1 -1
  20. package/dist/components/bar-chart.js +2 -2
  21. package/dist/components/bubble.d.cts +1 -1
  22. package/dist/components/bubble.d.ts +1 -1
  23. package/dist/components/button-group.cjs +2 -2
  24. package/dist/components/button-group.cjs.map +1 -1
  25. package/dist/components/button-group.d.cts +1 -1
  26. package/dist/components/button-group.d.ts +1 -1
  27. package/dist/components/button-group.js +2 -2
  28. package/dist/components/button-group.js.map +1 -1
  29. package/dist/components/button.cjs +6 -4
  30. package/dist/components/button.cjs.map +1 -1
  31. package/dist/components/button.d.cts +6 -5
  32. package/dist/components/button.d.ts +6 -5
  33. package/dist/components/button.js +6 -4
  34. package/dist/components/button.js.map +1 -1
  35. package/dist/components/calendar.cjs +2 -2
  36. package/dist/components/calendar.cjs.map +1 -1
  37. package/dist/components/calendar.js +2 -2
  38. package/dist/components/calendar.js.map +1 -1
  39. package/dist/components/callout.cjs +10 -10
  40. package/dist/components/callout.cjs.map +1 -1
  41. package/dist/components/callout.d.cts +1 -1
  42. package/dist/components/callout.d.ts +1 -1
  43. package/dist/components/callout.js +10 -10
  44. package/dist/components/callout.js.map +1 -1
  45. package/dist/components/checkbox.cjs +1 -1
  46. package/dist/components/checkbox.cjs.map +1 -1
  47. package/dist/components/checkbox.js +1 -1
  48. package/dist/components/checkbox.js.map +1 -1
  49. package/dist/components/circular-gauge.cjs +7 -7
  50. package/dist/components/circular-gauge.cjs.map +1 -1
  51. package/dist/components/circular-gauge.js +7 -7
  52. package/dist/components/circular-gauge.js.map +1 -1
  53. package/dist/components/day-of-week-picker.cjs +21 -41
  54. package/dist/components/day-of-week-picker.cjs.map +1 -1
  55. package/dist/components/day-of-week-picker.d.cts +19 -23
  56. package/dist/components/day-of-week-picker.d.ts +19 -23
  57. package/dist/components/day-of-week-picker.js +21 -41
  58. package/dist/components/day-of-week-picker.js.map +1 -1
  59. package/dist/components/energy-history-chart.cjs +2 -2
  60. package/dist/components/energy-history-chart.cjs.map +1 -1
  61. package/dist/components/energy-history-chart.js +2 -2
  62. package/dist/components/energy-history-chart.js.map +1 -1
  63. package/dist/components/{device-card.cjs → entity-card.cjs} +31 -31
  64. package/dist/components/entity-card.cjs.map +1 -0
  65. package/dist/components/{device-card.d.cts → entity-card.d.cts} +15 -15
  66. package/dist/components/{device-card.d.ts → entity-card.d.ts} +15 -15
  67. package/dist/components/{device-card.js → entity-card.js} +20 -20
  68. package/dist/components/entity-card.js.map +1 -0
  69. package/dist/components/{feed-in-hero.cjs → hero-metric.cjs} +10 -15
  70. package/dist/components/hero-metric.cjs.map +1 -0
  71. package/dist/components/hero-metric.d.cts +27 -0
  72. package/dist/components/hero-metric.d.ts +27 -0
  73. package/dist/components/{feed-in-hero.js → hero-metric.js} +7 -12
  74. package/dist/components/hero-metric.js.map +1 -0
  75. package/dist/components/info-block.d.cts +1 -1
  76. package/dist/components/info-block.d.ts +1 -1
  77. package/dist/components/input-group.d.cts +1 -1
  78. package/dist/components/input-group.d.ts +1 -1
  79. package/dist/components/input-otp.cjs +1 -1
  80. package/dist/components/input-otp.js +1 -1
  81. package/dist/components/input.cjs +1 -1
  82. package/dist/components/input.js +1 -1
  83. package/dist/components/line-chart.cjs +3 -3
  84. package/dist/components/line-chart.js +4 -4
  85. package/dist/components/marker.d.cts +1 -1
  86. package/dist/components/marker.d.ts +1 -1
  87. package/dist/components/message-scroller.cjs +1 -1
  88. package/dist/components/message-scroller.js +2 -2
  89. package/dist/components/period-tabs.cjs +2 -22
  90. package/dist/components/period-tabs.cjs.map +1 -1
  91. package/dist/components/period-tabs.d.cts +5 -22
  92. package/dist/components/period-tabs.d.ts +5 -22
  93. package/dist/components/period-tabs.js +2 -22
  94. package/dist/components/period-tabs.js.map +1 -1
  95. package/dist/components/pill.cjs +2 -2
  96. package/dist/components/pill.cjs.map +1 -1
  97. package/dist/components/pill.js +2 -2
  98. package/dist/components/pill.js.map +1 -1
  99. package/dist/components/power-history-chart.cjs +3 -3
  100. package/dist/components/power-history-chart.js +4 -4
  101. package/dist/components/power-network.js +1 -1
  102. package/dist/components/progress.cjs +1 -1
  103. package/dist/components/progress.cjs.map +1 -1
  104. package/dist/components/progress.js +1 -1
  105. package/dist/components/progress.js.map +1 -1
  106. package/dist/components/radio.cjs +1 -1
  107. package/dist/components/radio.cjs.map +1 -1
  108. package/dist/components/radio.js +1 -1
  109. package/dist/components/radio.js.map +1 -1
  110. package/dist/components/segmented-control.cjs +2 -2
  111. package/dist/components/segmented-control.cjs.map +1 -1
  112. package/dist/components/segmented-control.js +2 -2
  113. package/dist/components/segmented-control.js.map +1 -1
  114. package/dist/components/select.cjs +32 -2
  115. package/dist/components/select.cjs.map +1 -1
  116. package/dist/components/select.d.cts +11 -1
  117. package/dist/components/select.d.ts +11 -1
  118. package/dist/components/select.js +32 -4
  119. package/dist/components/select.js.map +1 -1
  120. package/dist/components/solar-forecast-chart.js +1 -1
  121. package/dist/components/stepper.cjs +1 -1
  122. package/dist/components/stepper.cjs.map +1 -1
  123. package/dist/components/stepper.d.cts +4 -4
  124. package/dist/components/stepper.d.ts +4 -4
  125. package/dist/components/stepper.js +1 -1
  126. package/dist/components/stepper.js.map +1 -1
  127. package/dist/components/textarea.cjs +1 -1
  128. package/dist/components/textarea.js +1 -1
  129. package/dist/components/tooltip.cjs +1 -1
  130. package/dist/components/tooltip.cjs.map +1 -1
  131. package/dist/components/tooltip.js +1 -1
  132. package/dist/components/tooltip.js.map +1 -1
  133. package/dist/components/typography.cjs +1 -1
  134. package/dist/components/typography.cjs.map +1 -1
  135. package/dist/components/typography.d.cts +4 -1
  136. package/dist/components/typography.d.ts +4 -1
  137. package/dist/components/typography.js +1 -1
  138. package/dist/components/typography.js.map +1 -1
  139. package/dist/components/wizard-layout.cjs +57 -0
  140. package/dist/components/wizard-layout.cjs.map +1 -0
  141. package/dist/components/wizard-layout.d.cts +34 -0
  142. package/dist/components/wizard-layout.d.ts +34 -0
  143. package/dist/components/wizard-layout.js +50 -0
  144. package/dist/components/wizard-layout.js.map +1 -0
  145. package/dist/lib/accent-colors.cjs +4 -1
  146. package/dist/lib/accent-colors.cjs.map +1 -1
  147. package/dist/lib/accent-colors.d.cts +1 -1
  148. package/dist/lib/accent-colors.d.ts +1 -1
  149. package/dist/lib/accent-colors.js +4 -1
  150. package/dist/lib/accent-colors.js.map +1 -1
  151. package/dist/lib/accent-theme.cjs +2 -2
  152. package/dist/lib/accent-theme.cjs.map +1 -1
  153. package/dist/lib/accent-theme.js +2 -2
  154. package/dist/lib/accent-theme.js.map +1 -1
  155. package/dist/styles/index.css +1 -1
  156. package/dist/styles/spark-default.css +49 -314
  157. package/dist/styles/theme.css +52 -6
  158. package/package.json +1 -1
  159. package/dist/components/battery-progress-row.cjs +0 -135
  160. package/dist/components/battery-progress-row.cjs.map +0 -1
  161. package/dist/components/battery-progress-row.d.cts +0 -69
  162. package/dist/components/battery-progress-row.d.ts +0 -69
  163. package/dist/components/battery-progress-row.js +0 -125
  164. package/dist/components/battery-progress-row.js.map +0 -1
  165. package/dist/components/device-card.cjs.map +0 -1
  166. package/dist/components/device-card.js.map +0 -1
  167. package/dist/components/energy-bar-chart.cjs.map +0 -1
  168. package/dist/components/energy-bar-chart.d.cts +0 -43
  169. package/dist/components/energy-bar-chart.d.ts +0 -43
  170. package/dist/components/energy-bar-chart.js.map +0 -1
  171. package/dist/components/feed-in-hero.cjs.map +0 -1
  172. package/dist/components/feed-in-hero.d.cts +0 -32
  173. package/dist/components/feed-in-hero.d.ts +0 -32
  174. package/dist/components/feed-in-hero.js.map +0 -1
  175. package/dist/components/metering-row.cjs +0 -59
  176. package/dist/components/metering-row.cjs.map +0 -1
  177. package/dist/components/metering-row.d.cts +0 -31
  178. package/dist/components/metering-row.d.ts +0 -31
  179. package/dist/components/metering-row.js +0 -55
  180. package/dist/components/metering-row.js.map +0 -1
  181. package/dist/components/money-saved-block.cjs +0 -83
  182. package/dist/components/money-saved-block.cjs.map +0 -1
  183. package/dist/components/money-saved-block.d.cts +0 -55
  184. package/dist/components/money-saved-block.d.ts +0 -55
  185. package/dist/components/money-saved-block.js +0 -76
  186. package/dist/components/money-saved-block.js.map +0 -1
  187. package/dist/components/on-off-button.cjs +0 -32
  188. package/dist/components/on-off-button.cjs.map +0 -1
  189. package/dist/components/on-off-button.d.cts +0 -18
  190. package/dist/components/on-off-button.d.ts +0 -18
  191. package/dist/components/on-off-button.js +0 -31
  192. package/dist/components/on-off-button.js.map +0 -1
  193. package/dist/components/onboarding-layout.cjs +0 -67
  194. package/dist/components/onboarding-layout.cjs.map +0 -1
  195. package/dist/components/onboarding-layout.d.cts +0 -44
  196. package/dist/components/onboarding-layout.d.ts +0 -44
  197. package/dist/components/onboarding-layout.js +0 -60
  198. package/dist/components/onboarding-layout.js.map +0 -1
  199. package/dist/components/power-history.cjs +0 -114
  200. package/dist/components/power-history.cjs.map +0 -1
  201. package/dist/components/power-history.d.cts +0 -40
  202. package/dist/components/power-history.d.ts +0 -41
  203. package/dist/components/power-history.js +0 -114
  204. package/dist/components/power-history.js.map +0 -1
  205. package/dist/components/smart-toggle-button.cjs +0 -24
  206. package/dist/components/smart-toggle-button.cjs.map +0 -1
  207. package/dist/components/smart-toggle-button.d.cts +0 -16
  208. package/dist/components/smart-toggle-button.d.ts +0 -16
  209. package/dist/components/smart-toggle-button.js +0 -23
  210. package/dist/components/smart-toggle-button.js.map +0 -1
@@ -10,16 +10,18 @@ import { cva } from "class-variance-authority";
10
10
  const buttonVariants = cva("group/button touch-target inline-flex cursor-pointer items-center justify-center gap-2 rounded-[max(var(--spark-rounded-md),var(--spark-rounded-full))] text-base font-medium whitespace-nowrap transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 motion-reduce:transition-none [&_svg]:pointer-events-none [&_svg]:shrink-0", {
11
11
  variants: {
12
12
  variant: {
13
- primary: "bg-(--spark-style-bg,var(--spark-9)) text-(--spark-style-fg,var(--spark-contrast)) hover:bg-(--spark-style-bg-hover,var(--spark-10))",
13
+ primary: "bg-(--spark-style-bg,var(--color-primary)) text-(--spark-style-fg,var(--color-primary-foreground)) hover:bg-(--spark-style-bg-hover,var(--color-primary-hover))",
14
14
  secondary: "bg-gray-2 text-gray-a11 shadow-[inset_0_0_0_1px_var(--neutral-a7)] hover:bg-gray-a3",
15
15
  tertiary: "bg-transparent text-gray-a11 hover:bg-gray-a3",
16
16
  bare: "rounded-none! text-gray-12 outline-hidden!",
17
- destructive: "bg-red-a3 text-red-a11 hover:bg-red-a4 focus-visible:ring-base-error-solid"
17
+ destructive: "bg-destructive-soft text-destructive-soft-foreground hover:bg-destructive-soft-hover focus-visible:ring-destructive"
18
18
  },
19
19
  color: {
20
20
  accent: "",
21
+ primary: "",
21
22
  neutral: "",
22
- danger: "focus-visible:ring-base-error-solid"
23
+ danger: "focus-visible:ring-destructive",
24
+ destructive: "focus-visible:ring-destructive"
23
25
  },
24
26
  size: {
25
27
  small: "h-9 px-3 text-sm [--spark-icon-size:16px] [&_svg:not([class*=size-])]:size-4",
@@ -32,7 +34,7 @@ const buttonVariants = cva("group/button touch-target inline-flex cursor-pointer
32
34
  },
33
35
  defaultVariants: { size: "default" }
34
36
  });
35
- const buttonRecipe = "bg-(--spark-style-bg,var(--spark-9)) text-(--spark-style-fg,var(--spark-contrast)) hover:bg-(--spark-style-bg-hover,var(--spark-10)) shadow-[inset_0_0_0_var(--spark-style-border-width,1px)_var(--spark-style-border,transparent)]";
37
+ const buttonRecipe = "bg-(--spark-style-bg,var(--color-primary)) text-(--spark-style-fg,var(--color-primary-foreground)) hover:bg-(--spark-style-bg-hover,var(--color-primary-hover)) shadow-[inset_0_0_0_var(--spark-style-border-width,1px)_var(--spark-style-border,transparent)]";
36
38
  const Button = React$1.forwardRef(function Button({ className, styleVariant, color, size, render, nativeButton, variant: _variant, ...props }, ref) {
37
39
  return /* @__PURE__ */ jsx(Button$1, {
38
40
  "data-style": styleVariant !== void 0 || color !== void 0 ? styleVariant ?? "solid" : void 0,
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","names":["React","ButtonPrimitive"],"sources":["../../src/components/button.tsx"],"sourcesContent":["'use client'\n\nimport { Button as ButtonPrimitive } from '@base-ui/react/button'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\nimport { accentByColor } from '../lib/accent-colors'\nimport type { SparkStyle } from '../lib/theme-types'\nimport { cn } from '../utils/cn'\n\nconst buttonVariants = cva(\n 'group/button touch-target inline-flex cursor-pointer items-center justify-center gap-2 rounded-[max(var(--spark-rounded-md),var(--spark-rounded-full))] text-base font-medium whitespace-nowrap transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 motion-reduce:transition-none [&_svg]:pointer-events-none [&_svg]:shrink-0',\n {\n variants: {\n variant: {\n primary:\n 'bg-(--spark-style-bg,var(--spark-9)) text-(--spark-style-fg,var(--spark-contrast)) hover:bg-(--spark-style-bg-hover,var(--spark-10))',\n secondary:\n 'bg-gray-2 text-gray-a11 shadow-[inset_0_0_0_1px_var(--neutral-a7)] hover:bg-gray-a3',\n tertiary: 'bg-transparent text-gray-a11 hover:bg-gray-a3',\n bare: 'rounded-none! text-gray-12 outline-hidden!',\n destructive:\n 'bg-red-a3 text-red-a11 hover:bg-red-a4 focus-visible:ring-base-error-solid',\n },\n color: {\n accent: '',\n neutral: '',\n danger: 'focus-visible:ring-base-error-solid',\n },\n size: {\n small:\n 'h-9 px-3 text-sm [--spark-icon-size:16px] [&_svg:not([class*=size-])]:size-4',\n default:\n 'h-10 px-3 [--spark-icon-size:20px] [&_svg:not([class*=size-])]:size-5',\n medium:\n 'h-11 px-4 [--spark-icon-size:24px] [&_svg:not([class*=size-])]:size-6',\n 'icon-small':\n 'size-9 [--spark-icon-size:16px] [&_svg:not([class*=size-])]:size-4',\n icon: 'size-10 [--spark-icon-size:20px] [&_svg:not([class*=size-])]:size-5',\n 'icon-medium':\n 'size-11 [--spark-icon-size:24px] [&_svg:not([class*=size-])]:size-6',\n },\n },\n defaultVariants: {\n size: 'default',\n },\n },\n)\n\nconst buttonRecipe =\n 'bg-(--spark-style-bg,var(--spark-9)) text-(--spark-style-fg,var(--spark-contrast)) hover:bg-(--spark-style-bg-hover,var(--spark-10)) shadow-[inset_0_0_0_var(--spark-style-border-width,1px)_var(--spark-style-border,transparent)]'\n\nexport type SparkButtonColor = 'accent' | 'neutral' | 'danger'\n\nexport interface ButtonProps\n extends\n Omit<React.ComponentProps<typeof ButtonPrimitive>, 'ref'>,\n Omit<VariantProps<typeof buttonVariants>, 'variant' | 'color'> {\n styleVariant?: SparkStyle\n color?: SparkButtonColor\n /**\n * @deprecated Not a `<Button>` prop and silently ignored -- use `styleVariant`\n * (`solid | soft | surface | ghost | outline`) and `color`\n * (`accent | neutral | danger`) instead. The `variant` axis on\n * `buttonVariants` exists only for class-string callers.\n */\n variant?: never\n}\n\n// forwardRef keeps refs working for React 18 consumers (ref-as-prop is 19-only)\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n className,\n styleVariant,\n color,\n size,\n render,\n nativeButton,\n variant: _variant,\n ...props\n },\n ref,\n) {\n const hasLook = styleVariant !== undefined || color !== undefined\n const dataStyle = hasLook ? (styleVariant ?? 'solid') : undefined\n const dataAccentColor = color ? accentByColor[color] : undefined\n\n return (\n <ButtonPrimitive\n data-style={dataStyle}\n data-accent-color={dataAccentColor}\n nativeButton={nativeButton ?? render === undefined}\n render={render}\n className={cn(buttonVariants({ size, color }), buttonRecipe, className)}\n ref={ref}\n {...props}\n />\n )\n})\n\nButton.displayName = 'Button'\n\nexport { Button, buttonVariants }\n"],"mappings":";;;;;;;;;AASA,MAAM,iBAAiB,IACrB,0dACA;CACE,UAAU;EACR,SAAS;GACP,SACE;GACF,WACE;GACF,UAAU;GACV,MAAM;GACN,aACE;EACJ;EACA,OAAO;GACL,QAAQ;GACR,SAAS;GACT,QAAQ;EACV;EACA,MAAM;GACJ,OACE;GACF,SACE;GACF,QACE;GACF,cACE;GACF,MAAM;GACN,eACE;EACJ;CACF;CACA,iBAAiB,EACf,MAAM,UACR;AACF,CACF;AAEA,MAAM,eACJ;AAoBF,MAAM,SAASA,QAAM,WAA2C,SAAS,OACvE,EACE,WACA,cACA,OACA,MACA,QACA,cACA,SAAS,UACT,GAAG,SAEL,KACA;CAKA,OACE,oBAACC,UAAD;EACE,cANY,iBAAiB,KAAA,KAAa,UAAU,KAAA,IAC3B,gBAAgB,UAAW,KAAA;EAMpD,qBALoB,QAAQ,cAAc,SAAS,KAAA;EAMnD,cAAc,gBAAgB,WAAW,KAAA;EACjC;EACR,WAAW,GAAG,eAAe;GAAE;GAAM;EAAM,CAAC,GAAG,cAAc,SAAS;EACjE;EACL,GAAI;CACL,CAAA;AAEL,CAAC;AAED,OAAO,cAAc"}
1
+ {"version":3,"file":"button.js","names":["React","ButtonPrimitive"],"sources":["../../src/components/button.tsx"],"sourcesContent":["'use client'\n\nimport { Button as ButtonPrimitive } from '@base-ui/react/button'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\nimport { accentByColor } from '../lib/accent-colors'\nimport type { SparkStyle } from '../lib/theme-types'\nimport { cn } from '../utils/cn'\n\nconst buttonVariants = cva(\n 'group/button touch-target inline-flex cursor-pointer items-center justify-center gap-2 rounded-[max(var(--spark-rounded-md),var(--spark-rounded-full))] text-base font-medium whitespace-nowrap transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 motion-reduce:transition-none [&_svg]:pointer-events-none [&_svg]:shrink-0',\n {\n variants: {\n variant: {\n primary:\n 'bg-(--spark-style-bg,var(--color-primary)) text-(--spark-style-fg,var(--color-primary-foreground)) hover:bg-(--spark-style-bg-hover,var(--color-primary-hover))',\n secondary:\n 'bg-gray-2 text-gray-a11 shadow-[inset_0_0_0_1px_var(--neutral-a7)] hover:bg-gray-a3',\n tertiary: 'bg-transparent text-gray-a11 hover:bg-gray-a3',\n bare: 'rounded-none! text-gray-12 outline-hidden!',\n destructive:\n 'bg-destructive-soft text-destructive-soft-foreground hover:bg-destructive-soft-hover focus-visible:ring-destructive',\n },\n color: {\n accent: '',\n primary: '',\n neutral: '',\n danger: 'focus-visible:ring-destructive',\n destructive: 'focus-visible:ring-destructive',\n },\n size: {\n small:\n 'h-9 px-3 text-sm [--spark-icon-size:16px] [&_svg:not([class*=size-])]:size-4',\n default:\n 'h-10 px-3 [--spark-icon-size:20px] [&_svg:not([class*=size-])]:size-5',\n medium:\n 'h-11 px-4 [--spark-icon-size:24px] [&_svg:not([class*=size-])]:size-6',\n 'icon-small':\n 'size-9 [--spark-icon-size:16px] [&_svg:not([class*=size-])]:size-4',\n icon: 'size-10 [--spark-icon-size:20px] [&_svg:not([class*=size-])]:size-5',\n 'icon-medium':\n 'size-11 [--spark-icon-size:24px] [&_svg:not([class*=size-])]:size-6',\n },\n },\n defaultVariants: {\n size: 'default',\n },\n },\n)\n\nconst buttonRecipe =\n 'bg-(--spark-style-bg,var(--color-primary)) text-(--spark-style-fg,var(--color-primary-foreground)) hover:bg-(--spark-style-bg-hover,var(--color-primary-hover)) shadow-[inset_0_0_0_var(--spark-style-border-width,1px)_var(--spark-style-border,transparent)]'\n\n/** Preferred: `primary` | `neutral` | `destructive`. `accent` / `danger` stay as aliases. */\nexport type SparkButtonColor =\n | 'primary'\n | 'accent'\n | 'neutral'\n | 'destructive'\n | 'danger'\n\nexport interface ButtonProps\n extends\n Omit<React.ComponentProps<typeof ButtonPrimitive>, 'ref'>,\n Omit<VariantProps<typeof buttonVariants>, 'variant' | 'color'> {\n styleVariant?: SparkStyle\n color?: SparkButtonColor\n /**\n * @deprecated Not a `<Button>` prop and silently ignored -- use `styleVariant`\n * (`solid | soft | surface | ghost | outline`) and `color`\n * (`primary | neutral | destructive`) instead. The `variant` axis on\n * `buttonVariants` exists only for class-string callers.\n */\n variant?: never\n}\n\n// forwardRef keeps refs working for React 18 consumers (ref-as-prop is 19-only)\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n className,\n styleVariant,\n color,\n size,\n render,\n nativeButton,\n variant: _variant,\n ...props\n },\n ref,\n) {\n const hasLook = styleVariant !== undefined || color !== undefined\n const dataStyle = hasLook ? (styleVariant ?? 'solid') : undefined\n const dataAccentColor = color ? accentByColor[color] : undefined\n\n return (\n <ButtonPrimitive\n data-style={dataStyle}\n data-accent-color={dataAccentColor}\n nativeButton={nativeButton ?? render === undefined}\n render={render}\n className={cn(buttonVariants({ size, color }), buttonRecipe, className)}\n ref={ref}\n {...props}\n />\n )\n})\n\nButton.displayName = 'Button'\n\nexport { Button, buttonVariants }\n"],"mappings":";;;;;;;;;AASA,MAAM,iBAAiB,IACrB,0dACA;CACE,UAAU;EACR,SAAS;GACP,SACE;GACF,WACE;GACF,UAAU;GACV,MAAM;GACN,aACE;EACJ;EACA,OAAO;GACL,QAAQ;GACR,SAAS;GACT,SAAS;GACT,QAAQ;GACR,aAAa;EACf;EACA,MAAM;GACJ,OACE;GACF,SACE;GACF,QACE;GACF,cACE;GACF,MAAM;GACN,eACE;EACJ;CACF;CACA,iBAAiB,EACf,MAAM,UACR;AACF,CACF;AAEA,MAAM,eACJ;AA0BF,MAAM,SAASA,QAAM,WAA2C,SAAS,OACvE,EACE,WACA,cACA,OACA,MACA,QACA,cACA,SAAS,UACT,GAAG,SAEL,KACA;CAKA,OACE,oBAACC,UAAD;EACE,cANY,iBAAiB,KAAA,KAAa,UAAU,KAAA,IAC3B,gBAAgB,UAAW,KAAA;EAMpD,qBALoB,QAAQ,cAAc,SAAS,KAAA;EAMnD,cAAc,gBAAgB,WAAW,KAAA;EACjC;EACR,WAAW,GAAG,eAAe;GAAE;GAAM;EAAM,CAAC,GAAG,cAAc,SAAS;EACjE;EACL,GAAI;CACL,CAAA;AAEL,CAAC;AAED,OAAO,cAAc"}
@@ -33,11 +33,11 @@ function Calendar({ className, classNames, showOutsideDays = true, fixedWeeks =
33
33
  day_button: (0, cnfast.cn)(require_components_button.buttonVariants({
34
34
  size: "icon",
35
35
  variant: "tertiary"
36
- }), "size-10 shrink-0 rounded-full p-0 font-normal text-gray in-aria-selected:rounded-full in-aria-selected:bg-(--spark-style-bg,var(--spark-9)) in-aria-selected:text-(--spark-style-fg,var(--spark-contrast)) hover:in-aria-selected:bg-(--spark-style-bg-hover,var(--spark-10)) [[data-high-contrast]_[data-outside]:not([data-disabled])_&]:text-gray-a12 [[data-outside]:not([data-disabled])_&]:text-gray-light"),
36
+ }), "size-10 shrink-0 rounded-full p-0 font-normal text-gray in-aria-selected:rounded-full in-aria-selected:bg-(--spark-style-bg,var(--color-primary)) in-aria-selected:text-(--spark-style-fg,var(--color-primary-foreground)) hover:in-aria-selected:bg-(--spark-style-bg-hover,var(--color-primary-hover)) [[data-high-contrast]_[data-outside]:not([data-disabled])_&]:text-gray-a12 [[data-outside]:not([data-disabled])_&]:text-gray-light"),
37
37
  range_start: "range-start",
38
38
  range_end: "range-end",
39
39
  selected: "rounded-full",
40
- today: (0, cnfast.cn)("relative bg-base-gray-soft text-gray", showTodayDot && "after:absolute after:right-0 after:-bottom-1 after:left-0 after:m-auto after:inline-flex after:h-1 after:w-1 after:rounded-full after:bg-(--spark-style-bg,var(--spark-9)) after:content-[\"\"]"),
40
+ today: (0, cnfast.cn)("relative bg-base-gray-soft text-gray", showTodayDot && "after:absolute after:right-0 after:-bottom-1 after:left-0 after:m-auto after:inline-flex after:h-1 after:w-1 after:rounded-full after:bg-(--spark-style-bg,var(--color-primary)) after:content-[\"\"]"),
41
41
  outside: "outside aria-selected:bg-base-gray-soft aria-selected:text-gray-light",
42
42
  disabled: "text-gray-light opacity-50",
43
43
  range_middle: "aria-selected:bg-base-gray-soft aria-selected:text-gray",
@@ -1 +1 @@
1
- {"version":3,"file":"calendar.cjs","names":["DayPicker","buttonVariants","ChevronRight","ChevronLeft"],"sources":["../../src/components/calendar.tsx"],"sourcesContent":["import { DayPicker } from '@daypicker/react'\nimport { ChevronLeft, ChevronRight } from '@epilot/spark-icons'\nimport * as React from 'react'\nimport { cn } from '../utils/cn'\nimport { buttonVariants } from './button'\n\ntype CalendarProps = React.ComponentProps<typeof DayPicker> & {\n showTodayDot?: boolean\n}\n\n// Pass `locale` (from '@daypicker/react/locale') for localized month/weekday\n// names — the library ships no language default.\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n fixedWeeks = true,\n showTodayDot = true,\n ...props\n}: CalendarProps) {\n return (\n <DayPicker\n className={cn('p-3', className)}\n classNames={{\n months: 'relative',\n month: 'flex flex-col gap-2',\n month_caption: 'flex h-10 items-center justify-center',\n caption_label: 'text-sm font-bold text-gray',\n button_previous: cn(\n buttonVariants({ size: 'icon', variant: 'tertiary' }),\n 'absolute top-0 left-0 z-10 text-gray-light hover:text-gray [[data-high-contrast]_&]:text-gray-a12',\n ),\n button_next: cn(\n buttonVariants({ size: 'icon', variant: 'tertiary' }),\n 'absolute top-0 right-0 z-10 text-gray-light hover:text-gray [[data-high-contrast]_&]:text-gray-a12',\n ),\n month_grid: 'w-full border-collapse',\n weekdays: 'flex w-full justify-between',\n weekday:\n 'mt-0.5 flex h-10 w-10 items-center justify-center rounded-full text-sm font-bold text-gray',\n week: 'mt-1 flex w-full justify-between',\n day: cn(\n 'relative mx-0.5 flex h-10 w-10 items-center justify-center rounded-full p-0 text-center text-sm focus-within:relative focus-within:z-20',\n props.mode === 'range'\n ? '[&:has(>.range-end)]:rounded-r-full [&:has(>.range-start)]:rounded-l-full first:[&:has([aria-selected])]:rounded-l-full last:[&:has([aria-selected])]:rounded-r-full'\n : '[&:has([aria-selected])]:rounded-full',\n ),\n day_button: cn(\n buttonVariants({ size: 'icon', variant: 'tertiary' }),\n // hover:…:bg-(--spark-style-bg-hover) outranks tertiary's hover:bg-gray-a3 —\n // selected days darken like a solid button instead of washing out gray\n 'size-10 shrink-0 rounded-full p-0 font-normal text-gray in-aria-selected:rounded-full in-aria-selected:bg-(--spark-style-bg,var(--spark-9)) in-aria-selected:text-(--spark-style-fg,var(--spark-contrast)) hover:in-aria-selected:bg-(--spark-style-bg-hover,var(--spark-10)) [[data-high-contrast]_[data-outside]:not([data-disabled])_&]:text-gray-a12 [[data-outside]:not([data-disabled])_&]:text-gray-light',\n ),\n range_start: 'range-start',\n range_end: 'range-end',\n selected: 'rounded-full',\n today: cn(\n 'relative bg-base-gray-soft text-gray',\n showTodayDot &&\n 'after:absolute after:right-0 after:-bottom-1 after:left-0 after:m-auto after:inline-flex after:h-1 after:w-1 after:rounded-full after:bg-(--spark-style-bg,var(--spark-9)) after:content-[\"\"]',\n ),\n outside:\n 'outside aria-selected:bg-base-gray-soft aria-selected:text-gray-light',\n disabled: 'text-gray-light opacity-50',\n range_middle: 'aria-selected:bg-base-gray-soft aria-selected:text-gray',\n hidden: 'invisible',\n ...classNames,\n }}\n components={{\n Chevron: ({ orientation }) => {\n const Glyph = orientation === 'right' ? ChevronRight : ChevronLeft\n return (\n <Glyph\n className={cn(\n '[--spark-icon-size:20px]',\n orientation === 'up' && 'rotate-90',\n orientation === 'down' && '-rotate-90',\n )}\n />\n )\n },\n }}\n fixedWeeks={fixedWeeks}\n showOutsideDays={showOutsideDays}\n {...props}\n />\n )\n}\n\nexport { Calendar }\nexport type { CalendarProps }\n"],"mappings":";;;;;;;;;;;AAYA,SAAS,SAAS,EAChB,WACA,YACA,kBAAkB,MAClB,aAAa,MACb,eAAe,MACf,GAAG,SACa;CAChB,OACE,iBAAA,GAAA,kBAAA,KAACA,iBAAAA,WAAD;EACE,YAAA,GAAA,OAAA,IAAc,OAAO,SAAS;EAC9B,YAAY;GACV,QAAQ;GACR,OAAO;GACP,eAAe;GACf,eAAe;GACf,kBAAA,GAAA,OAAA,IACEC,0BAAAA,eAAe;IAAE,MAAM;IAAQ,SAAS;GAAW,CAAC,GACpD,mGACF;GACA,cAAA,GAAA,OAAA,IACEA,0BAAAA,eAAe;IAAE,MAAM;IAAQ,SAAS;GAAW,CAAC,GACpD,oGACF;GACA,YAAY;GACZ,UAAU;GACV,SACE;GACF,MAAM;GACN,MAAA,GAAA,OAAA,IACE,2IACA,MAAM,SAAS,UACX,yKACA,uCACN;GACA,aAAA,GAAA,OAAA,IACEA,0BAAAA,eAAe;IAAE,MAAM;IAAQ,SAAS;GAAW,CAAC,GAGpD,kZACF;GACA,aAAa;GACb,WAAW;GACX,UAAU;GACV,QAAA,GAAA,OAAA,IACE,wCACA,gBACE,iMACJ;GACA,SACE;GACF,UAAU;GACV,cAAc;GACd,QAAQ;GACR,GAAG;EACL;EACA,YAAY,EACV,UAAU,EAAE,kBAAkB;GAE5B,OACE,iBAAA,GAAA,kBAAA,KAFY,gBAAgB,UAAUC,oBAAAA,eAAeC,oBAAAA,aAErD,EACE,YAAA,GAAA,OAAA,IACE,4BACA,gBAAgB,QAAQ,aACxB,gBAAgB,UAAU,YAC5B,EACD,CAAA;EAEL,EACF;EACY;EACK;EACjB,GAAI;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"calendar.cjs","names":["DayPicker","buttonVariants","ChevronRight","ChevronLeft"],"sources":["../../src/components/calendar.tsx"],"sourcesContent":["import { DayPicker } from '@daypicker/react'\nimport { ChevronLeft, ChevronRight } from '@epilot/spark-icons'\nimport * as React from 'react'\nimport { cn } from '../utils/cn'\nimport { buttonVariants } from './button'\n\ntype CalendarProps = React.ComponentProps<typeof DayPicker> & {\n showTodayDot?: boolean\n}\n\n// Pass `locale` (from '@daypicker/react/locale') for localized month/weekday\n// names — the library ships no language default.\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n fixedWeeks = true,\n showTodayDot = true,\n ...props\n}: CalendarProps) {\n return (\n <DayPicker\n className={cn('p-3', className)}\n classNames={{\n months: 'relative',\n month: 'flex flex-col gap-2',\n month_caption: 'flex h-10 items-center justify-center',\n caption_label: 'text-sm font-bold text-gray',\n button_previous: cn(\n buttonVariants({ size: 'icon', variant: 'tertiary' }),\n 'absolute top-0 left-0 z-10 text-gray-light hover:text-gray [[data-high-contrast]_&]:text-gray-a12',\n ),\n button_next: cn(\n buttonVariants({ size: 'icon', variant: 'tertiary' }),\n 'absolute top-0 right-0 z-10 text-gray-light hover:text-gray [[data-high-contrast]_&]:text-gray-a12',\n ),\n month_grid: 'w-full border-collapse',\n weekdays: 'flex w-full justify-between',\n weekday:\n 'mt-0.5 flex h-10 w-10 items-center justify-center rounded-full text-sm font-bold text-gray',\n week: 'mt-1 flex w-full justify-between',\n day: cn(\n 'relative mx-0.5 flex h-10 w-10 items-center justify-center rounded-full p-0 text-center text-sm focus-within:relative focus-within:z-20',\n props.mode === 'range'\n ? '[&:has(>.range-end)]:rounded-r-full [&:has(>.range-start)]:rounded-l-full first:[&:has([aria-selected])]:rounded-l-full last:[&:has([aria-selected])]:rounded-r-full'\n : '[&:has([aria-selected])]:rounded-full',\n ),\n day_button: cn(\n buttonVariants({ size: 'icon', variant: 'tertiary' }),\n // hover:…:bg-(--spark-style-bg-hover) outranks tertiary's hover:bg-gray-a3 —\n // selected days darken like a solid button instead of washing out gray\n 'size-10 shrink-0 rounded-full p-0 font-normal text-gray in-aria-selected:rounded-full in-aria-selected:bg-(--spark-style-bg,var(--color-primary)) in-aria-selected:text-(--spark-style-fg,var(--color-primary-foreground)) hover:in-aria-selected:bg-(--spark-style-bg-hover,var(--color-primary-hover)) [[data-high-contrast]_[data-outside]:not([data-disabled])_&]:text-gray-a12 [[data-outside]:not([data-disabled])_&]:text-gray-light',\n ),\n range_start: 'range-start',\n range_end: 'range-end',\n selected: 'rounded-full',\n today: cn(\n 'relative bg-base-gray-soft text-gray',\n showTodayDot &&\n 'after:absolute after:right-0 after:-bottom-1 after:left-0 after:m-auto after:inline-flex after:h-1 after:w-1 after:rounded-full after:bg-(--spark-style-bg,var(--color-primary)) after:content-[\"\"]',\n ),\n outside:\n 'outside aria-selected:bg-base-gray-soft aria-selected:text-gray-light',\n disabled: 'text-gray-light opacity-50',\n range_middle: 'aria-selected:bg-base-gray-soft aria-selected:text-gray',\n hidden: 'invisible',\n ...classNames,\n }}\n components={{\n Chevron: ({ orientation }) => {\n const Glyph = orientation === 'right' ? ChevronRight : ChevronLeft\n return (\n <Glyph\n className={cn(\n '[--spark-icon-size:20px]',\n orientation === 'up' && 'rotate-90',\n orientation === 'down' && '-rotate-90',\n )}\n />\n )\n },\n }}\n fixedWeeks={fixedWeeks}\n showOutsideDays={showOutsideDays}\n {...props}\n />\n )\n}\n\nexport { Calendar }\nexport type { CalendarProps }\n"],"mappings":";;;;;;;;;;;AAYA,SAAS,SAAS,EAChB,WACA,YACA,kBAAkB,MAClB,aAAa,MACb,eAAe,MACf,GAAG,SACa;CAChB,OACE,iBAAA,GAAA,kBAAA,KAACA,iBAAAA,WAAD;EACE,YAAA,GAAA,OAAA,IAAc,OAAO,SAAS;EAC9B,YAAY;GACV,QAAQ;GACR,OAAO;GACP,eAAe;GACf,eAAe;GACf,kBAAA,GAAA,OAAA,IACEC,0BAAAA,eAAe;IAAE,MAAM;IAAQ,SAAS;GAAW,CAAC,GACpD,mGACF;GACA,cAAA,GAAA,OAAA,IACEA,0BAAAA,eAAe;IAAE,MAAM;IAAQ,SAAS;GAAW,CAAC,GACpD,oGACF;GACA,YAAY;GACZ,UAAU;GACV,SACE;GACF,MAAM;GACN,MAAA,GAAA,OAAA,IACE,2IACA,MAAM,SAAS,UACX,yKACA,uCACN;GACA,aAAA,GAAA,OAAA,IACEA,0BAAAA,eAAe;IAAE,MAAM;IAAQ,SAAS;GAAW,CAAC,GAGpD,6aACF;GACA,aAAa;GACb,WAAW;GACX,UAAU;GACV,QAAA,GAAA,OAAA,IACE,wCACA,gBACE,uMACJ;GACA,SACE;GACF,UAAU;GACV,cAAc;GACd,QAAQ;GACR,GAAG;EACL;EACA,YAAY,EACV,UAAU,EAAE,kBAAkB;GAE5B,OACE,iBAAA,GAAA,kBAAA,KAFY,gBAAgB,UAAUC,oBAAAA,eAAeC,oBAAAA,aAErD,EACE,YAAA,GAAA,OAAA,IACE,4BACA,gBAAgB,QAAQ,aACxB,gBAAgB,UAAU,YAC5B,EACD,CAAA;EAEL,EACF;EACY;EACK;EACjB,GAAI;CACL,CAAA;AAEL"}
@@ -30,11 +30,11 @@ function Calendar({ className, classNames, showOutsideDays = true, fixedWeeks =
30
30
  day_button: cn(buttonVariants({
31
31
  size: "icon",
32
32
  variant: "tertiary"
33
- }), "size-10 shrink-0 rounded-full p-0 font-normal text-gray in-aria-selected:rounded-full in-aria-selected:bg-(--spark-style-bg,var(--spark-9)) in-aria-selected:text-(--spark-style-fg,var(--spark-contrast)) hover:in-aria-selected:bg-(--spark-style-bg-hover,var(--spark-10)) [[data-high-contrast]_[data-outside]:not([data-disabled])_&]:text-gray-a12 [[data-outside]:not([data-disabled])_&]:text-gray-light"),
33
+ }), "size-10 shrink-0 rounded-full p-0 font-normal text-gray in-aria-selected:rounded-full in-aria-selected:bg-(--spark-style-bg,var(--color-primary)) in-aria-selected:text-(--spark-style-fg,var(--color-primary-foreground)) hover:in-aria-selected:bg-(--spark-style-bg-hover,var(--color-primary-hover)) [[data-high-contrast]_[data-outside]:not([data-disabled])_&]:text-gray-a12 [[data-outside]:not([data-disabled])_&]:text-gray-light"),
34
34
  range_start: "range-start",
35
35
  range_end: "range-end",
36
36
  selected: "rounded-full",
37
- today: cn("relative bg-base-gray-soft text-gray", showTodayDot && "after:absolute after:right-0 after:-bottom-1 after:left-0 after:m-auto after:inline-flex after:h-1 after:w-1 after:rounded-full after:bg-(--spark-style-bg,var(--spark-9)) after:content-[\"\"]"),
37
+ today: cn("relative bg-base-gray-soft text-gray", showTodayDot && "after:absolute after:right-0 after:-bottom-1 after:left-0 after:m-auto after:inline-flex after:h-1 after:w-1 after:rounded-full after:bg-(--spark-style-bg,var(--color-primary)) after:content-[\"\"]"),
38
38
  outside: "outside aria-selected:bg-base-gray-soft aria-selected:text-gray-light",
39
39
  disabled: "text-gray-light opacity-50",
40
40
  range_middle: "aria-selected:bg-base-gray-soft aria-selected:text-gray",
@@ -1 +1 @@
1
- {"version":3,"file":"calendar.js","names":[],"sources":["../../src/components/calendar.tsx"],"sourcesContent":["import { DayPicker } from '@daypicker/react'\nimport { ChevronLeft, ChevronRight } from '@epilot/spark-icons'\nimport * as React from 'react'\nimport { cn } from '../utils/cn'\nimport { buttonVariants } from './button'\n\ntype CalendarProps = React.ComponentProps<typeof DayPicker> & {\n showTodayDot?: boolean\n}\n\n// Pass `locale` (from '@daypicker/react/locale') for localized month/weekday\n// names — the library ships no language default.\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n fixedWeeks = true,\n showTodayDot = true,\n ...props\n}: CalendarProps) {\n return (\n <DayPicker\n className={cn('p-3', className)}\n classNames={{\n months: 'relative',\n month: 'flex flex-col gap-2',\n month_caption: 'flex h-10 items-center justify-center',\n caption_label: 'text-sm font-bold text-gray',\n button_previous: cn(\n buttonVariants({ size: 'icon', variant: 'tertiary' }),\n 'absolute top-0 left-0 z-10 text-gray-light hover:text-gray [[data-high-contrast]_&]:text-gray-a12',\n ),\n button_next: cn(\n buttonVariants({ size: 'icon', variant: 'tertiary' }),\n 'absolute top-0 right-0 z-10 text-gray-light hover:text-gray [[data-high-contrast]_&]:text-gray-a12',\n ),\n month_grid: 'w-full border-collapse',\n weekdays: 'flex w-full justify-between',\n weekday:\n 'mt-0.5 flex h-10 w-10 items-center justify-center rounded-full text-sm font-bold text-gray',\n week: 'mt-1 flex w-full justify-between',\n day: cn(\n 'relative mx-0.5 flex h-10 w-10 items-center justify-center rounded-full p-0 text-center text-sm focus-within:relative focus-within:z-20',\n props.mode === 'range'\n ? '[&:has(>.range-end)]:rounded-r-full [&:has(>.range-start)]:rounded-l-full first:[&:has([aria-selected])]:rounded-l-full last:[&:has([aria-selected])]:rounded-r-full'\n : '[&:has([aria-selected])]:rounded-full',\n ),\n day_button: cn(\n buttonVariants({ size: 'icon', variant: 'tertiary' }),\n // hover:…:bg-(--spark-style-bg-hover) outranks tertiary's hover:bg-gray-a3 —\n // selected days darken like a solid button instead of washing out gray\n 'size-10 shrink-0 rounded-full p-0 font-normal text-gray in-aria-selected:rounded-full in-aria-selected:bg-(--spark-style-bg,var(--spark-9)) in-aria-selected:text-(--spark-style-fg,var(--spark-contrast)) hover:in-aria-selected:bg-(--spark-style-bg-hover,var(--spark-10)) [[data-high-contrast]_[data-outside]:not([data-disabled])_&]:text-gray-a12 [[data-outside]:not([data-disabled])_&]:text-gray-light',\n ),\n range_start: 'range-start',\n range_end: 'range-end',\n selected: 'rounded-full',\n today: cn(\n 'relative bg-base-gray-soft text-gray',\n showTodayDot &&\n 'after:absolute after:right-0 after:-bottom-1 after:left-0 after:m-auto after:inline-flex after:h-1 after:w-1 after:rounded-full after:bg-(--spark-style-bg,var(--spark-9)) after:content-[\"\"]',\n ),\n outside:\n 'outside aria-selected:bg-base-gray-soft aria-selected:text-gray-light',\n disabled: 'text-gray-light opacity-50',\n range_middle: 'aria-selected:bg-base-gray-soft aria-selected:text-gray',\n hidden: 'invisible',\n ...classNames,\n }}\n components={{\n Chevron: ({ orientation }) => {\n const Glyph = orientation === 'right' ? ChevronRight : ChevronLeft\n return (\n <Glyph\n className={cn(\n '[--spark-icon-size:20px]',\n orientation === 'up' && 'rotate-90',\n orientation === 'down' && '-rotate-90',\n )}\n />\n )\n },\n }}\n fixedWeeks={fixedWeeks}\n showOutsideDays={showOutsideDays}\n {...props}\n />\n )\n}\n\nexport { Calendar }\nexport type { CalendarProps }\n"],"mappings":";;;;;;;;AAYA,SAAS,SAAS,EAChB,WACA,YACA,kBAAkB,MAClB,aAAa,MACb,eAAe,MACf,GAAG,SACa;CAChB,OACE,oBAAC,WAAD;EACE,WAAW,GAAG,OAAO,SAAS;EAC9B,YAAY;GACV,QAAQ;GACR,OAAO;GACP,eAAe;GACf,eAAe;GACf,iBAAiB,GACf,eAAe;IAAE,MAAM;IAAQ,SAAS;GAAW,CAAC,GACpD,mGACF;GACA,aAAa,GACX,eAAe;IAAE,MAAM;IAAQ,SAAS;GAAW,CAAC,GACpD,oGACF;GACA,YAAY;GACZ,UAAU;GACV,SACE;GACF,MAAM;GACN,KAAK,GACH,2IACA,MAAM,SAAS,UACX,yKACA,uCACN;GACA,YAAY,GACV,eAAe;IAAE,MAAM;IAAQ,SAAS;GAAW,CAAC,GAGpD,kZACF;GACA,aAAa;GACb,WAAW;GACX,UAAU;GACV,OAAO,GACL,wCACA,gBACE,iMACJ;GACA,SACE;GACF,UAAU;GACV,cAAc;GACd,QAAQ;GACR,GAAG;EACL;EACA,YAAY,EACV,UAAU,EAAE,kBAAkB;GAE5B,OACE,oBAFY,gBAAgB,UAAU,eAAe,aAErD,EACE,WAAW,GACT,4BACA,gBAAgB,QAAQ,aACxB,gBAAgB,UAAU,YAC5B,EACD,CAAA;EAEL,EACF;EACY;EACK;EACjB,GAAI;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"calendar.js","names":[],"sources":["../../src/components/calendar.tsx"],"sourcesContent":["import { DayPicker } from '@daypicker/react'\nimport { ChevronLeft, ChevronRight } from '@epilot/spark-icons'\nimport * as React from 'react'\nimport { cn } from '../utils/cn'\nimport { buttonVariants } from './button'\n\ntype CalendarProps = React.ComponentProps<typeof DayPicker> & {\n showTodayDot?: boolean\n}\n\n// Pass `locale` (from '@daypicker/react/locale') for localized month/weekday\n// names — the library ships no language default.\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n fixedWeeks = true,\n showTodayDot = true,\n ...props\n}: CalendarProps) {\n return (\n <DayPicker\n className={cn('p-3', className)}\n classNames={{\n months: 'relative',\n month: 'flex flex-col gap-2',\n month_caption: 'flex h-10 items-center justify-center',\n caption_label: 'text-sm font-bold text-gray',\n button_previous: cn(\n buttonVariants({ size: 'icon', variant: 'tertiary' }),\n 'absolute top-0 left-0 z-10 text-gray-light hover:text-gray [[data-high-contrast]_&]:text-gray-a12',\n ),\n button_next: cn(\n buttonVariants({ size: 'icon', variant: 'tertiary' }),\n 'absolute top-0 right-0 z-10 text-gray-light hover:text-gray [[data-high-contrast]_&]:text-gray-a12',\n ),\n month_grid: 'w-full border-collapse',\n weekdays: 'flex w-full justify-between',\n weekday:\n 'mt-0.5 flex h-10 w-10 items-center justify-center rounded-full text-sm font-bold text-gray',\n week: 'mt-1 flex w-full justify-between',\n day: cn(\n 'relative mx-0.5 flex h-10 w-10 items-center justify-center rounded-full p-0 text-center text-sm focus-within:relative focus-within:z-20',\n props.mode === 'range'\n ? '[&:has(>.range-end)]:rounded-r-full [&:has(>.range-start)]:rounded-l-full first:[&:has([aria-selected])]:rounded-l-full last:[&:has([aria-selected])]:rounded-r-full'\n : '[&:has([aria-selected])]:rounded-full',\n ),\n day_button: cn(\n buttonVariants({ size: 'icon', variant: 'tertiary' }),\n // hover:…:bg-(--spark-style-bg-hover) outranks tertiary's hover:bg-gray-a3 —\n // selected days darken like a solid button instead of washing out gray\n 'size-10 shrink-0 rounded-full p-0 font-normal text-gray in-aria-selected:rounded-full in-aria-selected:bg-(--spark-style-bg,var(--color-primary)) in-aria-selected:text-(--spark-style-fg,var(--color-primary-foreground)) hover:in-aria-selected:bg-(--spark-style-bg-hover,var(--color-primary-hover)) [[data-high-contrast]_[data-outside]:not([data-disabled])_&]:text-gray-a12 [[data-outside]:not([data-disabled])_&]:text-gray-light',\n ),\n range_start: 'range-start',\n range_end: 'range-end',\n selected: 'rounded-full',\n today: cn(\n 'relative bg-base-gray-soft text-gray',\n showTodayDot &&\n 'after:absolute after:right-0 after:-bottom-1 after:left-0 after:m-auto after:inline-flex after:h-1 after:w-1 after:rounded-full after:bg-(--spark-style-bg,var(--color-primary)) after:content-[\"\"]',\n ),\n outside:\n 'outside aria-selected:bg-base-gray-soft aria-selected:text-gray-light',\n disabled: 'text-gray-light opacity-50',\n range_middle: 'aria-selected:bg-base-gray-soft aria-selected:text-gray',\n hidden: 'invisible',\n ...classNames,\n }}\n components={{\n Chevron: ({ orientation }) => {\n const Glyph = orientation === 'right' ? ChevronRight : ChevronLeft\n return (\n <Glyph\n className={cn(\n '[--spark-icon-size:20px]',\n orientation === 'up' && 'rotate-90',\n orientation === 'down' && '-rotate-90',\n )}\n />\n )\n },\n }}\n fixedWeeks={fixedWeeks}\n showOutsideDays={showOutsideDays}\n {...props}\n />\n )\n}\n\nexport { Calendar }\nexport type { CalendarProps }\n"],"mappings":";;;;;;;;AAYA,SAAS,SAAS,EAChB,WACA,YACA,kBAAkB,MAClB,aAAa,MACb,eAAe,MACf,GAAG,SACa;CAChB,OACE,oBAAC,WAAD;EACE,WAAW,GAAG,OAAO,SAAS;EAC9B,YAAY;GACV,QAAQ;GACR,OAAO;GACP,eAAe;GACf,eAAe;GACf,iBAAiB,GACf,eAAe;IAAE,MAAM;IAAQ,SAAS;GAAW,CAAC,GACpD,mGACF;GACA,aAAa,GACX,eAAe;IAAE,MAAM;IAAQ,SAAS;GAAW,CAAC,GACpD,oGACF;GACA,YAAY;GACZ,UAAU;GACV,SACE;GACF,MAAM;GACN,KAAK,GACH,2IACA,MAAM,SAAS,UACX,yKACA,uCACN;GACA,YAAY,GACV,eAAe;IAAE,MAAM;IAAQ,SAAS;GAAW,CAAC,GAGpD,6aACF;GACA,aAAa;GACb,WAAW;GACX,UAAU;GACV,OAAO,GACL,wCACA,gBACE,uMACJ;GACA,SACE;GACF,UAAU;GACV,cAAc;GACd,QAAQ;GACR,GAAG;EACL;EACA,YAAY,EACV,UAAU,EAAE,kBAAkB;GAE5B,OACE,oBAFY,gBAAgB,UAAU,eAAe,aAErD,EACE,WAAW,GACT,4BACA,gBAAgB,QAAQ,aACxB,gBAAgB,UAAU,YAC5B,EACD,CAAA;EAEL,EACF;EACY;EACK;EACjB,GAAI;CACL,CAAA;AAEL"}
@@ -11,9 +11,9 @@ let cnfast = require("cnfast");
11
11
  //#region src/components/callout.tsx
12
12
  const calloutVariants = (0, class_variance_authority.cva)("group/callout flex w-full items-start gap-2 rounded-lg px-4 py-3 text-sm transition-colors duration-150 ease-out motion-reduce:transition-none", {
13
13
  variants: { variant: {
14
- error: "bg-base-error-soft text-error",
15
- success: "bg-base-success-soft text-success",
16
- warning: "bg-base-warning-soft text-warning",
14
+ error: "bg-error-soft text-error-soft-foreground",
15
+ success: "bg-success-soft text-success-soft-foreground",
16
+ warning: "bg-warning-soft text-warning-soft-foreground",
17
17
  info: "bg-base-info-soft text-info",
18
18
  neutral: "bg-base-gray-soft text-gray"
19
19
  } },
@@ -22,15 +22,15 @@ const calloutVariants = (0, class_variance_authority.cva)("group/callout flex w-
22
22
  const CALLOUT_ICONS = {
23
23
  error: {
24
24
  icon: _epilot_spark_icons.Cancel,
25
- className: "text-error-light"
25
+ className: "text-error-soft-foreground"
26
26
  },
27
27
  success: {
28
28
  icon: _epilot_spark_icons.CheckCircle,
29
- className: "text-success-light"
29
+ className: "text-success-soft-foreground"
30
30
  },
31
31
  warning: {
32
32
  icon: _epilot_spark_icons.Warning,
33
- className: "text-warning-light"
33
+ className: "text-warning-soft-foreground"
34
34
  },
35
35
  info: {
36
36
  icon: _epilot_spark_icons.Info,
@@ -53,9 +53,9 @@ const CalloutDescription = ({ className, ...props }) => /* @__PURE__ */ (0, reac
53
53
  });
54
54
  const CalloutVariantContext = react.createContext("info");
55
55
  const CALLOUT_ACTION_COLORS = {
56
- error: "bg-base-error-soft text-error hover:bg-red-a4 focus-visible:bg-red-a4",
57
- success: "bg-base-success-soft text-success hover:bg-green-a4 focus-visible:bg-green-a4",
58
- warning: "bg-base-warning-soft text-warning hover:bg-orange-a4 focus-visible:bg-orange-a4",
56
+ error: "bg-error-soft text-error-soft-foreground hover:bg-error-soft-hover focus-visible:bg-error-soft-hover",
57
+ success: "bg-success-soft text-success-soft-foreground hover:bg-success-soft-hover focus-visible:bg-success-soft-hover",
58
+ warning: "bg-warning-soft text-warning-soft-foreground hover:bg-warning-soft-hover focus-visible:bg-warning-soft-hover",
59
59
  info: "bg-base-info-soft text-info hover:bg-blue-a4 focus-visible:bg-blue-a4",
60
60
  neutral: "bg-base-gray-soft text-gray hover:bg-gray-a4 focus-visible:bg-gray-a4"
61
61
  };
@@ -70,7 +70,7 @@ const CalloutAction = ({ className, align = "start", primary = false, ...props }
70
70
  "data-slot": "callout-action",
71
71
  size: "small",
72
72
  styleVariant: primary ? "solid" : "surface",
73
- color: primary ? "accent" : "neutral",
73
+ color: primary ? "primary" : "neutral",
74
74
  className: (0, cnfast.cn)("mt-2 w-fit", {
75
75
  "self-start": align === "start",
76
76
  "self-end": align === "end"
@@ -1 +1 @@
1
- {"version":3,"file":"callout.cjs","names":["Cancel","CheckCircle","Warning","Info","React","Button"],"sources":["../../src/components/callout.tsx"],"sourcesContent":["import {\n Cancel,\n CheckCircle,\n Info,\n Warning,\n type SparkIcon,\n} from '@epilot/spark-icons'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\nimport { cn } from '../utils/cn'\nimport { Button, type ButtonProps } from './button'\n\ntype CalloutVariant = 'error' | 'info' | 'neutral' | 'success' | 'warning'\n\nconst calloutVariants = cva(\n 'group/callout flex w-full items-start gap-2 rounded-lg px-4 py-3 text-sm transition-colors duration-150 ease-out motion-reduce:transition-none',\n {\n variants: {\n variant: {\n error: 'bg-base-error-soft text-error',\n success: 'bg-base-success-soft text-success',\n warning: 'bg-base-warning-soft text-warning',\n info: 'bg-base-info-soft text-info',\n neutral: 'bg-base-gray-soft text-gray',\n },\n },\n defaultVariants: {\n variant: 'info',\n },\n },\n)\n\nconst CALLOUT_ICONS: Record<\n CalloutVariant,\n { icon: SparkIcon; className: string }\n> = {\n error: { icon: Cancel, className: 'text-error-light' },\n success: { icon: CheckCircle, className: 'text-success-light' },\n warning: { icon: Warning, className: 'text-warning-light' },\n info: { icon: Info, className: 'text-info-light' },\n neutral: { icon: Info, className: 'text-gray-light' },\n}\n\ninterface CalloutProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof calloutVariants> {\n /** Overrides the variant's default icon; the variant's color is kept. `false` renders no icon. */\n icon?: SparkIcon | false\n}\n\nconst CalloutTitle = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => (\n <span\n data-slot=\"callout-title\"\n className={cn('text-base leading-5 font-semibold', className)}\n {...props}\n />\n)\n\nconst CalloutDescription = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLParagraphElement>) => (\n <p\n data-slot=\"callout-description\"\n className={cn('text-sm', className)}\n {...props}\n />\n)\n\nconst CalloutVariantContext = React.createContext<CalloutVariant>('info')\n\nconst CALLOUT_ACTION_COLORS: Record<CalloutVariant, string> = {\n error:\n 'bg-base-error-soft text-error hover:bg-red-a4 focus-visible:bg-red-a4',\n success:\n 'bg-base-success-soft text-success hover:bg-green-a4 focus-visible:bg-green-a4',\n warning:\n 'bg-base-warning-soft text-warning hover:bg-orange-a4 focus-visible:bg-orange-a4',\n info: 'bg-base-info-soft text-info hover:bg-blue-a4 focus-visible:bg-blue-a4',\n neutral:\n 'bg-base-gray-soft text-gray hover:bg-gray-a4 focus-visible:bg-gray-a4',\n}\n\nconst CalloutActions = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n data-slot=\"callout-actions\"\n className={cn(\n 'mt-2 flex flex-wrap items-center gap-2 [&_[data-slot=callout-action]]:mt-0',\n className,\n )}\n {...props}\n />\n)\n\ntype CalloutActionType = Omit<ButtonProps, 'styleVariant' | 'color'> & {\n align?: 'start' | 'end'\n primary?: boolean\n}\n\nconst CalloutAction = ({\n className,\n align = 'start',\n primary = false,\n ...props\n}: CalloutActionType) => {\n const calloutVariant = React.useContext(CalloutVariantContext)\n\n return (\n <Button\n data-slot=\"callout-action\"\n size=\"small\"\n styleVariant={primary ? 'solid' : 'surface'}\n color={primary ? 'accent' : 'neutral'}\n className={cn(\n 'mt-2 w-fit',\n { 'self-start': align === 'start', 'self-end': align === 'end' },\n !primary && CALLOUT_ACTION_COLORS[calloutVariant],\n className,\n )}\n {...props}\n />\n )\n}\n\nconst Callout = ({\n variant = 'info',\n icon,\n className,\n children,\n ...props\n}: CalloutProps) => {\n const variantIcon = CALLOUT_ICONS[variant ?? 'info']\n const Glyph = icon === false ? null : (icon ?? variantIcon.icon)\n\n return (\n <CalloutVariantContext.Provider value={variant ?? 'info'}>\n <div\n data-slot=\"callout\"\n className={cn(calloutVariants({ variant }), className)}\n {...props}\n >\n {Glyph ? (\n <Glyph\n className={cn(\n '[--spark-icon-size:calc(20px*var(--spark-scaling,1))]',\n variantIcon.className,\n )}\n />\n ) : null}\n <div className=\"flex w-full min-w-0 flex-col gap-1\">{children}</div>\n </div>\n </CalloutVariantContext.Provider>\n )\n}\n\nexport {\n Callout,\n CalloutAction,\n CalloutActions,\n CalloutDescription,\n CalloutTitle,\n calloutVariants,\n}\nexport type { CalloutProps, CalloutVariant }\n"],"mappings":";;;;;;;;;;;AAcA,MAAM,mBAAA,GAAA,yBAAA,KACJ,kJACA;CACE,UAAU,EACR,SAAS;EACP,OAAO;EACP,SAAS;EACT,SAAS;EACT,MAAM;EACN,SAAS;CACX,EACF;CACA,iBAAiB,EACf,SAAS,OACX;AACF,CACF;AAEA,MAAM,gBAGF;CACF,OAAO;EAAE,MAAMA,oBAAAA;EAAQ,WAAW;CAAmB;CACrD,SAAS;EAAE,MAAMC,oBAAAA;EAAa,WAAW;CAAqB;CAC9D,SAAS;EAAE,MAAMC,oBAAAA;EAAS,WAAW;CAAqB;CAC1D,MAAM;EAAE,MAAMC,oBAAAA;EAAM,WAAW;CAAkB;CACjD,SAAS;EAAE,MAAMA,oBAAAA;EAAM,WAAW;CAAkB;AACtD;AAUA,MAAM,gBAAgB,EACpB,WACA,GAAG,YAEH,iBAAA,GAAA,kBAAA,KAAC,QAAD;CACE,aAAU;CACV,YAAA,GAAA,OAAA,IAAc,qCAAqC,SAAS;CAC5D,GAAI;AACL,CAAA;AAGH,MAAM,sBAAsB,EAC1B,WACA,GAAG,YAEH,iBAAA,GAAA,kBAAA,KAAC,KAAD;CACE,aAAU;CACV,YAAA,GAAA,OAAA,IAAc,WAAW,SAAS;CAClC,GAAI;AACL,CAAA;AAGH,MAAM,wBAAwBC,MAAM,cAA8B,MAAM;AAExE,MAAM,wBAAwD;CAC5D,OACE;CACF,SACE;CACF,SACE;CACF,MAAM;CACN,SACE;AACJ;AAEA,MAAM,kBAAkB,EACtB,WACA,GAAG,YAEH,iBAAA,GAAA,kBAAA,KAAC,OAAD;CACE,aAAU;CACV,YAAA,GAAA,OAAA,IACE,8EACA,SACF;CACA,GAAI;AACL,CAAA;AAQH,MAAM,iBAAiB,EACrB,WACA,QAAQ,SACR,UAAU,OACV,GAAG,YACoB;CACvB,MAAM,iBAAiBA,MAAM,WAAW,qBAAqB;CAE7D,OACE,iBAAA,GAAA,kBAAA,KAACC,0BAAAA,QAAD;EACE,aAAU;EACV,MAAK;EACL,cAAc,UAAU,UAAU;EAClC,OAAO,UAAU,WAAW;EAC5B,YAAA,GAAA,OAAA,IACE,cACA;GAAE,cAAc,UAAU;GAAS,YAAY,UAAU;EAAM,GAC/D,CAAC,WAAW,sBAAsB,iBAClC,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,MAAM,WAAW,EACf,UAAU,QACV,MACA,WACA,UACA,GAAG,YACe;CAClB,MAAM,cAAc,cAAc,WAAW;CAC7C,MAAM,QAAQ,SAAS,QAAQ,OAAQ,QAAQ,YAAY;CAE3D,OACE,iBAAA,GAAA,kBAAA,KAAC,sBAAsB,UAAvB;EAAgC,OAAO,WAAW;YAChD,iBAAA,GAAA,kBAAA,MAAC,OAAD;GACE,aAAU;GACV,YAAA,GAAA,OAAA,IAAc,gBAAgB,EAAE,QAAQ,CAAC,GAAG,SAAS;GACrD,GAAI;aAHN,CAKG,QACC,iBAAA,GAAA,kBAAA,KAAC,OAAD,EACE,YAAA,GAAA,OAAA,IACE,yDACA,YAAY,SACd,EACD,CAAA,IACC,MACJ,iBAAA,GAAA,kBAAA,KAAC,OAAD;IAAK,WAAU;IAAsC;GAAc,CAAA,CAChE;;CACyB,CAAA;AAEpC"}
1
+ {"version":3,"file":"callout.cjs","names":["Cancel","CheckCircle","Warning","Info","React","Button"],"sources":["../../src/components/callout.tsx"],"sourcesContent":["import {\n Cancel,\n CheckCircle,\n Info,\n Warning,\n type SparkIcon,\n} from '@epilot/spark-icons'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\nimport { cn } from '../utils/cn'\nimport { Button, type ButtonProps } from './button'\n\ntype CalloutVariant = 'error' | 'info' | 'neutral' | 'success' | 'warning'\n\nconst calloutVariants = cva(\n 'group/callout flex w-full items-start gap-2 rounded-lg px-4 py-3 text-sm transition-colors duration-150 ease-out motion-reduce:transition-none',\n {\n variants: {\n variant: {\n error: 'bg-error-soft text-error-soft-foreground',\n success: 'bg-success-soft text-success-soft-foreground',\n warning: 'bg-warning-soft text-warning-soft-foreground',\n info: 'bg-base-info-soft text-info',\n neutral: 'bg-base-gray-soft text-gray',\n },\n },\n defaultVariants: {\n variant: 'info',\n },\n },\n)\n\nconst CALLOUT_ICONS: Record<\n CalloutVariant,\n { icon: SparkIcon; className: string }\n> = {\n error: { icon: Cancel, className: 'text-error-soft-foreground' },\n success: { icon: CheckCircle, className: 'text-success-soft-foreground' },\n warning: { icon: Warning, className: 'text-warning-soft-foreground' },\n info: { icon: Info, className: 'text-info-light' },\n neutral: { icon: Info, className: 'text-gray-light' },\n}\n\ninterface CalloutProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof calloutVariants> {\n /** Overrides the variant's default icon; the variant's color is kept. `false` renders no icon. */\n icon?: SparkIcon | false\n}\n\nconst CalloutTitle = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => (\n <span\n data-slot=\"callout-title\"\n className={cn('text-base leading-5 font-semibold', className)}\n {...props}\n />\n)\n\nconst CalloutDescription = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLParagraphElement>) => (\n <p\n data-slot=\"callout-description\"\n className={cn('text-sm', className)}\n {...props}\n />\n)\n\nconst CalloutVariantContext = React.createContext<CalloutVariant>('info')\n\nconst CALLOUT_ACTION_COLORS: Record<CalloutVariant, string> = {\n error:\n 'bg-error-soft text-error-soft-foreground hover:bg-error-soft-hover focus-visible:bg-error-soft-hover',\n success:\n 'bg-success-soft text-success-soft-foreground hover:bg-success-soft-hover focus-visible:bg-success-soft-hover',\n warning:\n 'bg-warning-soft text-warning-soft-foreground hover:bg-warning-soft-hover focus-visible:bg-warning-soft-hover',\n info: 'bg-base-info-soft text-info hover:bg-blue-a4 focus-visible:bg-blue-a4',\n neutral:\n 'bg-base-gray-soft text-gray hover:bg-gray-a4 focus-visible:bg-gray-a4',\n}\n\nconst CalloutActions = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n data-slot=\"callout-actions\"\n className={cn(\n 'mt-2 flex flex-wrap items-center gap-2 [&_[data-slot=callout-action]]:mt-0',\n className,\n )}\n {...props}\n />\n)\n\ntype CalloutActionType = Omit<ButtonProps, 'styleVariant' | 'color'> & {\n align?: 'start' | 'end'\n primary?: boolean\n}\n\nconst CalloutAction = ({\n className,\n align = 'start',\n primary = false,\n ...props\n}: CalloutActionType) => {\n const calloutVariant = React.useContext(CalloutVariantContext)\n\n return (\n <Button\n data-slot=\"callout-action\"\n size=\"small\"\n styleVariant={primary ? 'solid' : 'surface'}\n color={primary ? 'primary' : 'neutral'}\n className={cn(\n 'mt-2 w-fit',\n { 'self-start': align === 'start', 'self-end': align === 'end' },\n !primary && CALLOUT_ACTION_COLORS[calloutVariant],\n className,\n )}\n {...props}\n />\n )\n}\n\nconst Callout = ({\n variant = 'info',\n icon,\n className,\n children,\n ...props\n}: CalloutProps) => {\n const variantIcon = CALLOUT_ICONS[variant ?? 'info']\n const Glyph = icon === false ? null : (icon ?? variantIcon.icon)\n\n return (\n <CalloutVariantContext.Provider value={variant ?? 'info'}>\n <div\n data-slot=\"callout\"\n className={cn(calloutVariants({ variant }), className)}\n {...props}\n >\n {Glyph ? (\n <Glyph\n className={cn(\n '[--spark-icon-size:calc(20px*var(--spark-scaling,1))]',\n variantIcon.className,\n )}\n />\n ) : null}\n <div className=\"flex w-full min-w-0 flex-col gap-1\">{children}</div>\n </div>\n </CalloutVariantContext.Provider>\n )\n}\n\nexport {\n Callout,\n CalloutAction,\n CalloutActions,\n CalloutDescription,\n CalloutTitle,\n calloutVariants,\n}\nexport type { CalloutProps, CalloutVariant }\n"],"mappings":";;;;;;;;;;;AAcA,MAAM,mBAAA,GAAA,yBAAA,KACJ,kJACA;CACE,UAAU,EACR,SAAS;EACP,OAAO;EACP,SAAS;EACT,SAAS;EACT,MAAM;EACN,SAAS;CACX,EACF;CACA,iBAAiB,EACf,SAAS,OACX;AACF,CACF;AAEA,MAAM,gBAGF;CACF,OAAO;EAAE,MAAMA,oBAAAA;EAAQ,WAAW;CAA6B;CAC/D,SAAS;EAAE,MAAMC,oBAAAA;EAAa,WAAW;CAA+B;CACxE,SAAS;EAAE,MAAMC,oBAAAA;EAAS,WAAW;CAA+B;CACpE,MAAM;EAAE,MAAMC,oBAAAA;EAAM,WAAW;CAAkB;CACjD,SAAS;EAAE,MAAMA,oBAAAA;EAAM,WAAW;CAAkB;AACtD;AAUA,MAAM,gBAAgB,EACpB,WACA,GAAG,YAEH,iBAAA,GAAA,kBAAA,KAAC,QAAD;CACE,aAAU;CACV,YAAA,GAAA,OAAA,IAAc,qCAAqC,SAAS;CAC5D,GAAI;AACL,CAAA;AAGH,MAAM,sBAAsB,EAC1B,WACA,GAAG,YAEH,iBAAA,GAAA,kBAAA,KAAC,KAAD;CACE,aAAU;CACV,YAAA,GAAA,OAAA,IAAc,WAAW,SAAS;CAClC,GAAI;AACL,CAAA;AAGH,MAAM,wBAAwBC,MAAM,cAA8B,MAAM;AAExE,MAAM,wBAAwD;CAC5D,OACE;CACF,SACE;CACF,SACE;CACF,MAAM;CACN,SACE;AACJ;AAEA,MAAM,kBAAkB,EACtB,WACA,GAAG,YAEH,iBAAA,GAAA,kBAAA,KAAC,OAAD;CACE,aAAU;CACV,YAAA,GAAA,OAAA,IACE,8EACA,SACF;CACA,GAAI;AACL,CAAA;AAQH,MAAM,iBAAiB,EACrB,WACA,QAAQ,SACR,UAAU,OACV,GAAG,YACoB;CACvB,MAAM,iBAAiBA,MAAM,WAAW,qBAAqB;CAE7D,OACE,iBAAA,GAAA,kBAAA,KAACC,0BAAAA,QAAD;EACE,aAAU;EACV,MAAK;EACL,cAAc,UAAU,UAAU;EAClC,OAAO,UAAU,YAAY;EAC7B,YAAA,GAAA,OAAA,IACE,cACA;GAAE,cAAc,UAAU;GAAS,YAAY,UAAU;EAAM,GAC/D,CAAC,WAAW,sBAAsB,iBAClC,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,MAAM,WAAW,EACf,UAAU,QACV,MACA,WACA,UACA,GAAG,YACe;CAClB,MAAM,cAAc,cAAc,WAAW;CAC7C,MAAM,QAAQ,SAAS,QAAQ,OAAQ,QAAQ,YAAY;CAE3D,OACE,iBAAA,GAAA,kBAAA,KAAC,sBAAsB,UAAvB;EAAgC,OAAO,WAAW;YAChD,iBAAA,GAAA,kBAAA,MAAC,OAAD;GACE,aAAU;GACV,YAAA,GAAA,OAAA,IAAc,gBAAgB,EAAE,QAAQ,CAAC,GAAG,SAAS;GACrD,GAAI;aAHN,CAKG,QACC,iBAAA,GAAA,kBAAA,KAAC,OAAD,EACE,YAAA,GAAA,OAAA,IACE,yDACA,YAAY,SACd,EACD,CAAA,IACC,MACJ,iBAAA,GAAA,kBAAA,KAAC,OAAD;IAAK,WAAU;IAAsC;GAAc,CAAA,CAChE;;CACyB,CAAA;AAEpC"}
@@ -8,7 +8,7 @@ import { SparkIcon } from "@epilot/spark-icons";
8
8
  //#region src/components/callout.d.ts
9
9
  type CalloutVariant = 'error' | 'info' | 'neutral' | 'success' | 'warning';
10
10
  declare const calloutVariants: (props?: ({
11
- variant?: "neutral" | "success" | "warning" | "error" | "info" | null | undefined;
11
+ variant?: "neutral" | "error" | "success" | "warning" | "info" | null | undefined;
12
12
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
13
13
  interface CalloutProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof calloutVariants> {
14
14
  /** Overrides the variant's default icon; the variant's color is kept. `false` renders no icon. */
@@ -8,7 +8,7 @@ import { VariantProps } from "class-variance-authority";
8
8
  //#region src/components/callout.d.ts
9
9
  type CalloutVariant = 'error' | 'info' | 'neutral' | 'success' | 'warning';
10
10
  declare const calloutVariants: (props?: ({
11
- variant?: "neutral" | "success" | "warning" | "error" | "info" | null | undefined;
11
+ variant?: "neutral" | "error" | "success" | "warning" | "info" | null | undefined;
12
12
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
13
13
  interface CalloutProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof calloutVariants> {
14
14
  /** Overrides the variant's default icon; the variant's color is kept. `false` renders no icon. */
@@ -8,9 +8,9 @@ import { cva } from "class-variance-authority";
8
8
  //#region src/components/callout.tsx
9
9
  const calloutVariants = cva("group/callout flex w-full items-start gap-2 rounded-lg px-4 py-3 text-sm transition-colors duration-150 ease-out motion-reduce:transition-none", {
10
10
  variants: { variant: {
11
- error: "bg-base-error-soft text-error",
12
- success: "bg-base-success-soft text-success",
13
- warning: "bg-base-warning-soft text-warning",
11
+ error: "bg-error-soft text-error-soft-foreground",
12
+ success: "bg-success-soft text-success-soft-foreground",
13
+ warning: "bg-warning-soft text-warning-soft-foreground",
14
14
  info: "bg-base-info-soft text-info",
15
15
  neutral: "bg-base-gray-soft text-gray"
16
16
  } },
@@ -19,15 +19,15 @@ const calloutVariants = cva("group/callout flex w-full items-start gap-2 rounded
19
19
  const CALLOUT_ICONS = {
20
20
  error: {
21
21
  icon: Cancel,
22
- className: "text-error-light"
22
+ className: "text-error-soft-foreground"
23
23
  },
24
24
  success: {
25
25
  icon: CheckCircle,
26
- className: "text-success-light"
26
+ className: "text-success-soft-foreground"
27
27
  },
28
28
  warning: {
29
29
  icon: Warning,
30
- className: "text-warning-light"
30
+ className: "text-warning-soft-foreground"
31
31
  },
32
32
  info: {
33
33
  icon: Info,
@@ -50,9 +50,9 @@ const CalloutDescription = ({ className, ...props }) => /* @__PURE__ */ jsx("p",
50
50
  });
51
51
  const CalloutVariantContext = React$1.createContext("info");
52
52
  const CALLOUT_ACTION_COLORS = {
53
- error: "bg-base-error-soft text-error hover:bg-red-a4 focus-visible:bg-red-a4",
54
- success: "bg-base-success-soft text-success hover:bg-green-a4 focus-visible:bg-green-a4",
55
- warning: "bg-base-warning-soft text-warning hover:bg-orange-a4 focus-visible:bg-orange-a4",
53
+ error: "bg-error-soft text-error-soft-foreground hover:bg-error-soft-hover focus-visible:bg-error-soft-hover",
54
+ success: "bg-success-soft text-success-soft-foreground hover:bg-success-soft-hover focus-visible:bg-success-soft-hover",
55
+ warning: "bg-warning-soft text-warning-soft-foreground hover:bg-warning-soft-hover focus-visible:bg-warning-soft-hover",
56
56
  info: "bg-base-info-soft text-info hover:bg-blue-a4 focus-visible:bg-blue-a4",
57
57
  neutral: "bg-base-gray-soft text-gray hover:bg-gray-a4 focus-visible:bg-gray-a4"
58
58
  };
@@ -67,7 +67,7 @@ const CalloutAction = ({ className, align = "start", primary = false, ...props }
67
67
  "data-slot": "callout-action",
68
68
  size: "small",
69
69
  styleVariant: primary ? "solid" : "surface",
70
- color: primary ? "accent" : "neutral",
70
+ color: primary ? "primary" : "neutral",
71
71
  className: cn("mt-2 w-fit", {
72
72
  "self-start": align === "start",
73
73
  "self-end": align === "end"
@@ -1 +1 @@
1
- {"version":3,"file":"callout.js","names":["React"],"sources":["../../src/components/callout.tsx"],"sourcesContent":["import {\n Cancel,\n CheckCircle,\n Info,\n Warning,\n type SparkIcon,\n} from '@epilot/spark-icons'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\nimport { cn } from '../utils/cn'\nimport { Button, type ButtonProps } from './button'\n\ntype CalloutVariant = 'error' | 'info' | 'neutral' | 'success' | 'warning'\n\nconst calloutVariants = cva(\n 'group/callout flex w-full items-start gap-2 rounded-lg px-4 py-3 text-sm transition-colors duration-150 ease-out motion-reduce:transition-none',\n {\n variants: {\n variant: {\n error: 'bg-base-error-soft text-error',\n success: 'bg-base-success-soft text-success',\n warning: 'bg-base-warning-soft text-warning',\n info: 'bg-base-info-soft text-info',\n neutral: 'bg-base-gray-soft text-gray',\n },\n },\n defaultVariants: {\n variant: 'info',\n },\n },\n)\n\nconst CALLOUT_ICONS: Record<\n CalloutVariant,\n { icon: SparkIcon; className: string }\n> = {\n error: { icon: Cancel, className: 'text-error-light' },\n success: { icon: CheckCircle, className: 'text-success-light' },\n warning: { icon: Warning, className: 'text-warning-light' },\n info: { icon: Info, className: 'text-info-light' },\n neutral: { icon: Info, className: 'text-gray-light' },\n}\n\ninterface CalloutProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof calloutVariants> {\n /** Overrides the variant's default icon; the variant's color is kept. `false` renders no icon. */\n icon?: SparkIcon | false\n}\n\nconst CalloutTitle = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => (\n <span\n data-slot=\"callout-title\"\n className={cn('text-base leading-5 font-semibold', className)}\n {...props}\n />\n)\n\nconst CalloutDescription = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLParagraphElement>) => (\n <p\n data-slot=\"callout-description\"\n className={cn('text-sm', className)}\n {...props}\n />\n)\n\nconst CalloutVariantContext = React.createContext<CalloutVariant>('info')\n\nconst CALLOUT_ACTION_COLORS: Record<CalloutVariant, string> = {\n error:\n 'bg-base-error-soft text-error hover:bg-red-a4 focus-visible:bg-red-a4',\n success:\n 'bg-base-success-soft text-success hover:bg-green-a4 focus-visible:bg-green-a4',\n warning:\n 'bg-base-warning-soft text-warning hover:bg-orange-a4 focus-visible:bg-orange-a4',\n info: 'bg-base-info-soft text-info hover:bg-blue-a4 focus-visible:bg-blue-a4',\n neutral:\n 'bg-base-gray-soft text-gray hover:bg-gray-a4 focus-visible:bg-gray-a4',\n}\n\nconst CalloutActions = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n data-slot=\"callout-actions\"\n className={cn(\n 'mt-2 flex flex-wrap items-center gap-2 [&_[data-slot=callout-action]]:mt-0',\n className,\n )}\n {...props}\n />\n)\n\ntype CalloutActionType = Omit<ButtonProps, 'styleVariant' | 'color'> & {\n align?: 'start' | 'end'\n primary?: boolean\n}\n\nconst CalloutAction = ({\n className,\n align = 'start',\n primary = false,\n ...props\n}: CalloutActionType) => {\n const calloutVariant = React.useContext(CalloutVariantContext)\n\n return (\n <Button\n data-slot=\"callout-action\"\n size=\"small\"\n styleVariant={primary ? 'solid' : 'surface'}\n color={primary ? 'accent' : 'neutral'}\n className={cn(\n 'mt-2 w-fit',\n { 'self-start': align === 'start', 'self-end': align === 'end' },\n !primary && CALLOUT_ACTION_COLORS[calloutVariant],\n className,\n )}\n {...props}\n />\n )\n}\n\nconst Callout = ({\n variant = 'info',\n icon,\n className,\n children,\n ...props\n}: CalloutProps) => {\n const variantIcon = CALLOUT_ICONS[variant ?? 'info']\n const Glyph = icon === false ? null : (icon ?? variantIcon.icon)\n\n return (\n <CalloutVariantContext.Provider value={variant ?? 'info'}>\n <div\n data-slot=\"callout\"\n className={cn(calloutVariants({ variant }), className)}\n {...props}\n >\n {Glyph ? (\n <Glyph\n className={cn(\n '[--spark-icon-size:calc(20px*var(--spark-scaling,1))]',\n variantIcon.className,\n )}\n />\n ) : null}\n <div className=\"flex w-full min-w-0 flex-col gap-1\">{children}</div>\n </div>\n </CalloutVariantContext.Provider>\n )\n}\n\nexport {\n Callout,\n CalloutAction,\n CalloutActions,\n CalloutDescription,\n CalloutTitle,\n calloutVariants,\n}\nexport type { CalloutProps, CalloutVariant }\n"],"mappings":";;;;;;;;AAcA,MAAM,kBAAkB,IACtB,kJACA;CACE,UAAU,EACR,SAAS;EACP,OAAO;EACP,SAAS;EACT,SAAS;EACT,MAAM;EACN,SAAS;CACX,EACF;CACA,iBAAiB,EACf,SAAS,OACX;AACF,CACF;AAEA,MAAM,gBAGF;CACF,OAAO;EAAE,MAAM;EAAQ,WAAW;CAAmB;CACrD,SAAS;EAAE,MAAM;EAAa,WAAW;CAAqB;CAC9D,SAAS;EAAE,MAAM;EAAS,WAAW;CAAqB;CAC1D,MAAM;EAAE,MAAM;EAAM,WAAW;CAAkB;CACjD,SAAS;EAAE,MAAM;EAAM,WAAW;CAAkB;AACtD;AAUA,MAAM,gBAAgB,EACpB,WACA,GAAG,YAEH,oBAAC,QAAD;CACE,aAAU;CACV,WAAW,GAAG,qCAAqC,SAAS;CAC5D,GAAI;AACL,CAAA;AAGH,MAAM,sBAAsB,EAC1B,WACA,GAAG,YAEH,oBAAC,KAAD;CACE,aAAU;CACV,WAAW,GAAG,WAAW,SAAS;CAClC,GAAI;AACL,CAAA;AAGH,MAAM,wBAAwBA,QAAM,cAA8B,MAAM;AAExE,MAAM,wBAAwD;CAC5D,OACE;CACF,SACE;CACF,SACE;CACF,MAAM;CACN,SACE;AACJ;AAEA,MAAM,kBAAkB,EACtB,WACA,GAAG,YAEH,oBAAC,OAAD;CACE,aAAU;CACV,WAAW,GACT,8EACA,SACF;CACA,GAAI;AACL,CAAA;AAQH,MAAM,iBAAiB,EACrB,WACA,QAAQ,SACR,UAAU,OACV,GAAG,YACoB;CACvB,MAAM,iBAAiBA,QAAM,WAAW,qBAAqB;CAE7D,OACE,oBAAC,QAAD;EACE,aAAU;EACV,MAAK;EACL,cAAc,UAAU,UAAU;EAClC,OAAO,UAAU,WAAW;EAC5B,WAAW,GACT,cACA;GAAE,cAAc,UAAU;GAAS,YAAY,UAAU;EAAM,GAC/D,CAAC,WAAW,sBAAsB,iBAClC,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,MAAM,WAAW,EACf,UAAU,QACV,MACA,WACA,UACA,GAAG,YACe;CAClB,MAAM,cAAc,cAAc,WAAW;CAC7C,MAAM,QAAQ,SAAS,QAAQ,OAAQ,QAAQ,YAAY;CAE3D,OACE,oBAAC,sBAAsB,UAAvB;EAAgC,OAAO,WAAW;YAChD,qBAAC,OAAD;GACE,aAAU;GACV,WAAW,GAAG,gBAAgB,EAAE,QAAQ,CAAC,GAAG,SAAS;GACrD,GAAI;aAHN,CAKG,QACC,oBAAC,OAAD,EACE,WAAW,GACT,yDACA,YAAY,SACd,EACD,CAAA,IACC,MACJ,oBAAC,OAAD;IAAK,WAAU;IAAsC;GAAc,CAAA,CAChE;;CACyB,CAAA;AAEpC"}
1
+ {"version":3,"file":"callout.js","names":["React"],"sources":["../../src/components/callout.tsx"],"sourcesContent":["import {\n Cancel,\n CheckCircle,\n Info,\n Warning,\n type SparkIcon,\n} from '@epilot/spark-icons'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\nimport { cn } from '../utils/cn'\nimport { Button, type ButtonProps } from './button'\n\ntype CalloutVariant = 'error' | 'info' | 'neutral' | 'success' | 'warning'\n\nconst calloutVariants = cva(\n 'group/callout flex w-full items-start gap-2 rounded-lg px-4 py-3 text-sm transition-colors duration-150 ease-out motion-reduce:transition-none',\n {\n variants: {\n variant: {\n error: 'bg-error-soft text-error-soft-foreground',\n success: 'bg-success-soft text-success-soft-foreground',\n warning: 'bg-warning-soft text-warning-soft-foreground',\n info: 'bg-base-info-soft text-info',\n neutral: 'bg-base-gray-soft text-gray',\n },\n },\n defaultVariants: {\n variant: 'info',\n },\n },\n)\n\nconst CALLOUT_ICONS: Record<\n CalloutVariant,\n { icon: SparkIcon; className: string }\n> = {\n error: { icon: Cancel, className: 'text-error-soft-foreground' },\n success: { icon: CheckCircle, className: 'text-success-soft-foreground' },\n warning: { icon: Warning, className: 'text-warning-soft-foreground' },\n info: { icon: Info, className: 'text-info-light' },\n neutral: { icon: Info, className: 'text-gray-light' },\n}\n\ninterface CalloutProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof calloutVariants> {\n /** Overrides the variant's default icon; the variant's color is kept. `false` renders no icon. */\n icon?: SparkIcon | false\n}\n\nconst CalloutTitle = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => (\n <span\n data-slot=\"callout-title\"\n className={cn('text-base leading-5 font-semibold', className)}\n {...props}\n />\n)\n\nconst CalloutDescription = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLParagraphElement>) => (\n <p\n data-slot=\"callout-description\"\n className={cn('text-sm', className)}\n {...props}\n />\n)\n\nconst CalloutVariantContext = React.createContext<CalloutVariant>('info')\n\nconst CALLOUT_ACTION_COLORS: Record<CalloutVariant, string> = {\n error:\n 'bg-error-soft text-error-soft-foreground hover:bg-error-soft-hover focus-visible:bg-error-soft-hover',\n success:\n 'bg-success-soft text-success-soft-foreground hover:bg-success-soft-hover focus-visible:bg-success-soft-hover',\n warning:\n 'bg-warning-soft text-warning-soft-foreground hover:bg-warning-soft-hover focus-visible:bg-warning-soft-hover',\n info: 'bg-base-info-soft text-info hover:bg-blue-a4 focus-visible:bg-blue-a4',\n neutral:\n 'bg-base-gray-soft text-gray hover:bg-gray-a4 focus-visible:bg-gray-a4',\n}\n\nconst CalloutActions = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n data-slot=\"callout-actions\"\n className={cn(\n 'mt-2 flex flex-wrap items-center gap-2 [&_[data-slot=callout-action]]:mt-0',\n className,\n )}\n {...props}\n />\n)\n\ntype CalloutActionType = Omit<ButtonProps, 'styleVariant' | 'color'> & {\n align?: 'start' | 'end'\n primary?: boolean\n}\n\nconst CalloutAction = ({\n className,\n align = 'start',\n primary = false,\n ...props\n}: CalloutActionType) => {\n const calloutVariant = React.useContext(CalloutVariantContext)\n\n return (\n <Button\n data-slot=\"callout-action\"\n size=\"small\"\n styleVariant={primary ? 'solid' : 'surface'}\n color={primary ? 'primary' : 'neutral'}\n className={cn(\n 'mt-2 w-fit',\n { 'self-start': align === 'start', 'self-end': align === 'end' },\n !primary && CALLOUT_ACTION_COLORS[calloutVariant],\n className,\n )}\n {...props}\n />\n )\n}\n\nconst Callout = ({\n variant = 'info',\n icon,\n className,\n children,\n ...props\n}: CalloutProps) => {\n const variantIcon = CALLOUT_ICONS[variant ?? 'info']\n const Glyph = icon === false ? null : (icon ?? variantIcon.icon)\n\n return (\n <CalloutVariantContext.Provider value={variant ?? 'info'}>\n <div\n data-slot=\"callout\"\n className={cn(calloutVariants({ variant }), className)}\n {...props}\n >\n {Glyph ? (\n <Glyph\n className={cn(\n '[--spark-icon-size:calc(20px*var(--spark-scaling,1))]',\n variantIcon.className,\n )}\n />\n ) : null}\n <div className=\"flex w-full min-w-0 flex-col gap-1\">{children}</div>\n </div>\n </CalloutVariantContext.Provider>\n )\n}\n\nexport {\n Callout,\n CalloutAction,\n CalloutActions,\n CalloutDescription,\n CalloutTitle,\n calloutVariants,\n}\nexport type { CalloutProps, CalloutVariant }\n"],"mappings":";;;;;;;;AAcA,MAAM,kBAAkB,IACtB,kJACA;CACE,UAAU,EACR,SAAS;EACP,OAAO;EACP,SAAS;EACT,SAAS;EACT,MAAM;EACN,SAAS;CACX,EACF;CACA,iBAAiB,EACf,SAAS,OACX;AACF,CACF;AAEA,MAAM,gBAGF;CACF,OAAO;EAAE,MAAM;EAAQ,WAAW;CAA6B;CAC/D,SAAS;EAAE,MAAM;EAAa,WAAW;CAA+B;CACxE,SAAS;EAAE,MAAM;EAAS,WAAW;CAA+B;CACpE,MAAM;EAAE,MAAM;EAAM,WAAW;CAAkB;CACjD,SAAS;EAAE,MAAM;EAAM,WAAW;CAAkB;AACtD;AAUA,MAAM,gBAAgB,EACpB,WACA,GAAG,YAEH,oBAAC,QAAD;CACE,aAAU;CACV,WAAW,GAAG,qCAAqC,SAAS;CAC5D,GAAI;AACL,CAAA;AAGH,MAAM,sBAAsB,EAC1B,WACA,GAAG,YAEH,oBAAC,KAAD;CACE,aAAU;CACV,WAAW,GAAG,WAAW,SAAS;CAClC,GAAI;AACL,CAAA;AAGH,MAAM,wBAAwBA,QAAM,cAA8B,MAAM;AAExE,MAAM,wBAAwD;CAC5D,OACE;CACF,SACE;CACF,SACE;CACF,MAAM;CACN,SACE;AACJ;AAEA,MAAM,kBAAkB,EACtB,WACA,GAAG,YAEH,oBAAC,OAAD;CACE,aAAU;CACV,WAAW,GACT,8EACA,SACF;CACA,GAAI;AACL,CAAA;AAQH,MAAM,iBAAiB,EACrB,WACA,QAAQ,SACR,UAAU,OACV,GAAG,YACoB;CACvB,MAAM,iBAAiBA,QAAM,WAAW,qBAAqB;CAE7D,OACE,oBAAC,QAAD;EACE,aAAU;EACV,MAAK;EACL,cAAc,UAAU,UAAU;EAClC,OAAO,UAAU,YAAY;EAC7B,WAAW,GACT,cACA;GAAE,cAAc,UAAU;GAAS,YAAY,UAAU;EAAM,GAC/D,CAAC,WAAW,sBAAsB,iBAClC,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,MAAM,WAAW,EACf,UAAU,QACV,MACA,WACA,UACA,GAAG,YACe;CAClB,MAAM,cAAc,cAAc,WAAW;CAC7C,MAAM,QAAQ,SAAS,QAAQ,OAAQ,QAAQ,YAAY;CAE3D,OACE,oBAAC,sBAAsB,UAAvB;EAAgC,OAAO,WAAW;YAChD,qBAAC,OAAD;GACE,aAAU;GACV,WAAW,GAAG,gBAAgB,EAAE,QAAQ,CAAC,GAAG,SAAS;GACrD,GAAI;aAHN,CAKG,QACC,oBAAC,OAAD,EACE,WAAW,GACT,yDACA,YAAY,SACd,EACD,CAAA,IACC,MACJ,oBAAC,OAAD;IAAK,WAAU;IAAsC;GAAc,CAAA,CAChE;;CACyB,CAAA;AAEpC"}
@@ -16,7 +16,7 @@ const Checkbox = react.forwardRef(({ className, size: _size, bordered: _bordered
16
16
  "data-accent-color": dataAccentColor,
17
17
  nativeButton: nativeButton ?? render === void 0,
18
18
  render: render ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {}),
19
- className: (0, cnfast.cn)("peer touch-target relative my-2 inline-flex size-6 shrink-0 cursor-pointer items-center justify-center border-(length:--spark-style-border-width,2px) p-0 transition-colors any-pointer-coarse:my-[calc((2.75rem-var(--spacing)*6)/2)]", "before:absolute before:top-1/2 before:left-1/2 before:size-10 before:-translate-x-1/2 before:-translate-y-1/2 before:content-['']", "rounded-[min(var(--spark-rounded-md),40%)]", "focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden", "data-disabled:cursor-not-allowed data-disabled:opacity-50", "border-(--spark-style-idle-border,var(--spark-a7)) bg-base-accent-soft", "data-checked:border-(--spark-style-border,var(--spark-9)) data-checked:bg-(--spark-style-bg,var(--spark-9))", "data-indeterminate:border-(--spark-style-border,var(--spark-9)) data-indeterminate:bg-(--spark-style-bg,var(--spark-9))", className),
19
+ className: (0, cnfast.cn)("peer touch-target relative my-2 inline-flex size-6 shrink-0 cursor-pointer items-center justify-center border-(length:--spark-style-border-width,2px) p-0 transition-colors any-pointer-coarse:my-[calc((2.75rem-var(--spacing)*6)/2)]", "before:absolute before:top-1/2 before:left-1/2 before:size-10 before:-translate-x-1/2 before:-translate-y-1/2 before:content-['']", "rounded-[min(var(--spark-rounded-md),40%)]", "focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden", "data-disabled:cursor-not-allowed data-disabled:opacity-50", "border-(--spark-style-idle-border,var(--color-accent-ui)) bg-base-accent-soft", "data-checked:border-(--spark-style-border,var(--color-primary)) data-checked:bg-(--spark-style-bg,var(--color-primary))", "data-indeterminate:border-(--spark-style-border,var(--color-primary)) data-indeterminate:bg-(--spark-style-bg,var(--color-primary))", className),
20
20
  ref,
21
21
  ...props,
22
22
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_base_ui_react_checkbox.Checkbox.Indicator, {
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.cjs","names":["React","accentByColor","CheckboxPrimitive"],"sources":["../../src/components/checkbox.tsx"],"sourcesContent":["import { Checkbox as CheckboxPrimitive } from '@base-ui/react/checkbox'\nimport * as React from 'react'\nimport { accentByColor } from '../lib/accent-colors'\nimport type { SparkStyle } from '../lib/theme-types'\nimport { cn } from '../utils/cn'\n\nexport type SparkCheckboxColor = 'accent' | 'neutral' | 'danger'\n\ntype CheckboxProps = CheckboxPrimitive.Root.Props & {\n /**\n * @deprecated The checkbox now renders a single 24px size (with a 40px hit\n * area). Accepted for back-compat but ignored.\n */\n size?: 'default' | 'large'\n /**\n * @deprecated The checkbox is always bordered now. Accepted for back-compat\n * but ignored.\n */\n bordered?: boolean\n styleVariant?: SparkStyle\n color?: SparkCheckboxColor\n}\n\nconst Checkbox = React.forwardRef<\n React.ComponentRef<typeof CheckboxPrimitive.Root>,\n CheckboxProps\n>(\n (\n {\n className,\n size: _size,\n bordered: _bordered,\n styleVariant,\n color,\n render,\n nativeButton,\n ...props\n },\n ref,\n ) => {\n const hasLook = styleVariant !== undefined || color !== undefined\n const dataStyle = hasLook ? (styleVariant ?? 'solid') : undefined\n const dataAccentColor = color ? accentByColor[color] : undefined\n\n return (\n <CheckboxPrimitive.Root\n data-style={dataStyle}\n data-accent-color={dataAccentColor}\n // a native button owns the caller's `id`; on Base UI's default <span> the\n // `id` lands on the hidden input and the control gets a generated one\n nativeButton={nativeButton ?? render === undefined}\n render={render ?? <button />}\n className={cn(\n // p-0 defends the 24px box against the UA button padding when the\n // consumer's CSS has no Tailwind preflight\n 'peer touch-target relative my-2 inline-flex size-6 shrink-0 cursor-pointer items-center justify-center border-(length:--spark-style-border-width,2px) p-0 transition-colors any-pointer-coarse:my-[calc((2.75rem-var(--spacing)*6)/2)]',\n // both overlays are reserved as layout, so neither can bleed into a scroller;\n // the coarse margin tracks --spacing so the 44px reserve holds at any [data-scaling]\n \"before:absolute before:top-1/2 before:left-1/2 before:size-10 before:-translate-x-1/2 before:-translate-y-1/2 before:content-['']\",\n 'rounded-[min(var(--spark-rounded-md),40%)]',\n 'focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden',\n 'data-disabled:cursor-not-allowed data-disabled:opacity-50',\n 'border-(--spark-style-idle-border,var(--spark-a7)) bg-base-accent-soft',\n 'data-checked:border-(--spark-style-border,var(--spark-9)) data-checked:bg-(--spark-style-bg,var(--spark-9))',\n 'data-indeterminate:border-(--spark-style-border,var(--spark-9)) data-indeterminate:bg-(--spark-style-bg,var(--spark-9))',\n className,\n )}\n ref={ref}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"group inline-flex items-center justify-center text-(--spark-style-fg,var(--spark-on-solid))\">\n {/* custom-drawn glyphs; group-data toggles which one the mounted indicator shows */}\n <svg\n aria-hidden=\"true\"\n className=\"hidden size-5 group-data-checked:block\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <path\n className=\"animate-check-draw [stroke-dasharray:1] motion-reduce:animate-none\"\n d=\"M5.5 12.5 L10 17 L18.5 7.5\"\n pathLength={1}\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2.5}\n />\n </svg>\n <span className=\"hidden h-0.5 w-3 origin-center animate-dash-pop rounded-full bg-current group-data-indeterminate:block motion-reduce:animate-none\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n )\n },\n)\n\nCheckbox.displayName = 'Checkbox'\n\nexport { Checkbox }\nexport type { CheckboxProps }\n"],"mappings":";;;;;;;;;;AAuBA,MAAM,WAAWA,MAAM,YAKnB,EACE,WACA,MAAM,OACN,UAAU,WACV,cACA,OACA,QACA,cACA,GAAG,SAEL,QACG;CAEH,MAAM,YADU,iBAAiB,KAAA,KAAa,UAAU,KAAA,IAC3B,gBAAgB,UAAW,KAAA;CACxD,MAAM,kBAAkB,QAAQC,0BAAAA,cAAc,SAAS,KAAA;CAEvD,OACE,iBAAA,GAAA,kBAAA,KAACC,wBAAAA,SAAkB,MAAnB;EACE,cAAY;EACZ,qBAAmB;EAGnB,cAAc,gBAAgB,WAAW,KAAA;EACzC,QAAQ,UAAU,iBAAA,GAAA,kBAAA,KAAC,UAAD,CAAS,CAAA;EAC3B,YAAA,GAAA,OAAA,IAGE,0OAGA,qIACA,8CACA,iFACA,6DACA,0EACA,+GACA,2HACA,SACF;EACK;EACL,GAAI;YAEJ,iBAAA,GAAA,kBAAA,MAACA,wBAAAA,SAAkB,WAAnB;GAA6B,WAAU;aAAvC,CAEE,iBAAA,GAAA,kBAAA,KAAC,OAAD;IACE,eAAY;IACZ,WAAU;IACV,MAAK;IACL,SAAQ;cAER,iBAAA,GAAA,kBAAA,KAAC,QAAD;KACE,WAAU;KACV,GAAE;KACF,YAAY;KACZ,QAAO;KACP,eAAc;KACd,gBAAe;KACf,aAAa;IACd,CAAA;GACE,CAAA,GACL,iBAAA,GAAA,kBAAA,KAAC,QAAD,EAAM,WAAU,oIAAqI,CAAA,CAC1H;;CACP,CAAA;AAE5B,CACF;AAEA,SAAS,cAAc"}
1
+ {"version":3,"file":"checkbox.cjs","names":["React","accentByColor","CheckboxPrimitive"],"sources":["../../src/components/checkbox.tsx"],"sourcesContent":["import { Checkbox as CheckboxPrimitive } from '@base-ui/react/checkbox'\nimport * as React from 'react'\nimport { accentByColor } from '../lib/accent-colors'\nimport type { SparkStyle } from '../lib/theme-types'\nimport { cn } from '../utils/cn'\n\nexport type SparkCheckboxColor = 'accent' | 'neutral' | 'danger'\n\ntype CheckboxProps = CheckboxPrimitive.Root.Props & {\n /**\n * @deprecated The checkbox now renders a single 24px size (with a 40px hit\n * area). Accepted for back-compat but ignored.\n */\n size?: 'default' | 'large'\n /**\n * @deprecated The checkbox is always bordered now. Accepted for back-compat\n * but ignored.\n */\n bordered?: boolean\n styleVariant?: SparkStyle\n color?: SparkCheckboxColor\n}\n\nconst Checkbox = React.forwardRef<\n React.ComponentRef<typeof CheckboxPrimitive.Root>,\n CheckboxProps\n>(\n (\n {\n className,\n size: _size,\n bordered: _bordered,\n styleVariant,\n color,\n render,\n nativeButton,\n ...props\n },\n ref,\n ) => {\n const hasLook = styleVariant !== undefined || color !== undefined\n const dataStyle = hasLook ? (styleVariant ?? 'solid') : undefined\n const dataAccentColor = color ? accentByColor[color] : undefined\n\n return (\n <CheckboxPrimitive.Root\n data-style={dataStyle}\n data-accent-color={dataAccentColor}\n // a native button owns the caller's `id`; on Base UI's default <span> the\n // `id` lands on the hidden input and the control gets a generated one\n nativeButton={nativeButton ?? render === undefined}\n render={render ?? <button />}\n className={cn(\n // p-0 defends the 24px box against the UA button padding when the\n // consumer's CSS has no Tailwind preflight\n 'peer touch-target relative my-2 inline-flex size-6 shrink-0 cursor-pointer items-center justify-center border-(length:--spark-style-border-width,2px) p-0 transition-colors any-pointer-coarse:my-[calc((2.75rem-var(--spacing)*6)/2)]',\n // both overlays are reserved as layout, so neither can bleed into a scroller;\n // the coarse margin tracks --spacing so the 44px reserve holds at any [data-scaling]\n \"before:absolute before:top-1/2 before:left-1/2 before:size-10 before:-translate-x-1/2 before:-translate-y-1/2 before:content-['']\",\n 'rounded-[min(var(--spark-rounded-md),40%)]',\n 'focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden',\n 'data-disabled:cursor-not-allowed data-disabled:opacity-50',\n 'border-(--spark-style-idle-border,var(--color-accent-ui)) bg-base-accent-soft',\n 'data-checked:border-(--spark-style-border,var(--color-primary)) data-checked:bg-(--spark-style-bg,var(--color-primary))',\n 'data-indeterminate:border-(--spark-style-border,var(--color-primary)) data-indeterminate:bg-(--spark-style-bg,var(--color-primary))',\n className,\n )}\n ref={ref}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"group inline-flex items-center justify-center text-(--spark-style-fg,var(--spark-on-solid))\">\n {/* custom-drawn glyphs; group-data toggles which one the mounted indicator shows */}\n <svg\n aria-hidden=\"true\"\n className=\"hidden size-5 group-data-checked:block\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <path\n className=\"animate-check-draw [stroke-dasharray:1] motion-reduce:animate-none\"\n d=\"M5.5 12.5 L10 17 L18.5 7.5\"\n pathLength={1}\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2.5}\n />\n </svg>\n <span className=\"hidden h-0.5 w-3 origin-center animate-dash-pop rounded-full bg-current group-data-indeterminate:block motion-reduce:animate-none\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n )\n },\n)\n\nCheckbox.displayName = 'Checkbox'\n\nexport { Checkbox }\nexport type { CheckboxProps }\n"],"mappings":";;;;;;;;;;AAuBA,MAAM,WAAWA,MAAM,YAKnB,EACE,WACA,MAAM,OACN,UAAU,WACV,cACA,OACA,QACA,cACA,GAAG,SAEL,QACG;CAEH,MAAM,YADU,iBAAiB,KAAA,KAAa,UAAU,KAAA,IAC3B,gBAAgB,UAAW,KAAA;CACxD,MAAM,kBAAkB,QAAQC,0BAAAA,cAAc,SAAS,KAAA;CAEvD,OACE,iBAAA,GAAA,kBAAA,KAACC,wBAAAA,SAAkB,MAAnB;EACE,cAAY;EACZ,qBAAmB;EAGnB,cAAc,gBAAgB,WAAW,KAAA;EACzC,QAAQ,UAAU,iBAAA,GAAA,kBAAA,KAAC,UAAD,CAAS,CAAA;EAC3B,YAAA,GAAA,OAAA,IAGE,0OAGA,qIACA,8CACA,iFACA,6DACA,iFACA,2HACA,uIACA,SACF;EACK;EACL,GAAI;YAEJ,iBAAA,GAAA,kBAAA,MAACA,wBAAAA,SAAkB,WAAnB;GAA6B,WAAU;aAAvC,CAEE,iBAAA,GAAA,kBAAA,KAAC,OAAD;IACE,eAAY;IACZ,WAAU;IACV,MAAK;IACL,SAAQ;cAER,iBAAA,GAAA,kBAAA,KAAC,QAAD;KACE,WAAU;KACV,GAAE;KACF,YAAY;KACZ,QAAO;KACP,eAAc;KACd,gBAAe;KACf,aAAa;IACd,CAAA;GACE,CAAA,GACL,iBAAA,GAAA,kBAAA,KAAC,QAAD,EAAM,WAAU,oIAAqI,CAAA,CAC1H;;CACP,CAAA;AAE5B,CACF;AAEA,SAAS,cAAc"}
@@ -13,7 +13,7 @@ const Checkbox = React$1.forwardRef(({ className, size: _size, bordered: _border
13
13
  "data-accent-color": dataAccentColor,
14
14
  nativeButton: nativeButton ?? render === void 0,
15
15
  render: render ?? /* @__PURE__ */ jsx("button", {}),
16
- className: cn("peer touch-target relative my-2 inline-flex size-6 shrink-0 cursor-pointer items-center justify-center border-(length:--spark-style-border-width,2px) p-0 transition-colors any-pointer-coarse:my-[calc((2.75rem-var(--spacing)*6)/2)]", "before:absolute before:top-1/2 before:left-1/2 before:size-10 before:-translate-x-1/2 before:-translate-y-1/2 before:content-['']", "rounded-[min(var(--spark-rounded-md),40%)]", "focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden", "data-disabled:cursor-not-allowed data-disabled:opacity-50", "border-(--spark-style-idle-border,var(--spark-a7)) bg-base-accent-soft", "data-checked:border-(--spark-style-border,var(--spark-9)) data-checked:bg-(--spark-style-bg,var(--spark-9))", "data-indeterminate:border-(--spark-style-border,var(--spark-9)) data-indeterminate:bg-(--spark-style-bg,var(--spark-9))", className),
16
+ className: cn("peer touch-target relative my-2 inline-flex size-6 shrink-0 cursor-pointer items-center justify-center border-(length:--spark-style-border-width,2px) p-0 transition-colors any-pointer-coarse:my-[calc((2.75rem-var(--spacing)*6)/2)]", "before:absolute before:top-1/2 before:left-1/2 before:size-10 before:-translate-x-1/2 before:-translate-y-1/2 before:content-['']", "rounded-[min(var(--spark-rounded-md),40%)]", "focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden", "data-disabled:cursor-not-allowed data-disabled:opacity-50", "border-(--spark-style-idle-border,var(--color-accent-ui)) bg-base-accent-soft", "data-checked:border-(--spark-style-border,var(--color-primary)) data-checked:bg-(--spark-style-bg,var(--color-primary))", "data-indeterminate:border-(--spark-style-border,var(--color-primary)) data-indeterminate:bg-(--spark-style-bg,var(--color-primary))", className),
17
17
  ref,
18
18
  ...props,
19
19
  children: /* @__PURE__ */ jsxs(Checkbox$1.Indicator, {
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.js","names":["React","CheckboxPrimitive"],"sources":["../../src/components/checkbox.tsx"],"sourcesContent":["import { Checkbox as CheckboxPrimitive } from '@base-ui/react/checkbox'\nimport * as React from 'react'\nimport { accentByColor } from '../lib/accent-colors'\nimport type { SparkStyle } from '../lib/theme-types'\nimport { cn } from '../utils/cn'\n\nexport type SparkCheckboxColor = 'accent' | 'neutral' | 'danger'\n\ntype CheckboxProps = CheckboxPrimitive.Root.Props & {\n /**\n * @deprecated The checkbox now renders a single 24px size (with a 40px hit\n * area). Accepted for back-compat but ignored.\n */\n size?: 'default' | 'large'\n /**\n * @deprecated The checkbox is always bordered now. Accepted for back-compat\n * but ignored.\n */\n bordered?: boolean\n styleVariant?: SparkStyle\n color?: SparkCheckboxColor\n}\n\nconst Checkbox = React.forwardRef<\n React.ComponentRef<typeof CheckboxPrimitive.Root>,\n CheckboxProps\n>(\n (\n {\n className,\n size: _size,\n bordered: _bordered,\n styleVariant,\n color,\n render,\n nativeButton,\n ...props\n },\n ref,\n ) => {\n const hasLook = styleVariant !== undefined || color !== undefined\n const dataStyle = hasLook ? (styleVariant ?? 'solid') : undefined\n const dataAccentColor = color ? accentByColor[color] : undefined\n\n return (\n <CheckboxPrimitive.Root\n data-style={dataStyle}\n data-accent-color={dataAccentColor}\n // a native button owns the caller's `id`; on Base UI's default <span> the\n // `id` lands on the hidden input and the control gets a generated one\n nativeButton={nativeButton ?? render === undefined}\n render={render ?? <button />}\n className={cn(\n // p-0 defends the 24px box against the UA button padding when the\n // consumer's CSS has no Tailwind preflight\n 'peer touch-target relative my-2 inline-flex size-6 shrink-0 cursor-pointer items-center justify-center border-(length:--spark-style-border-width,2px) p-0 transition-colors any-pointer-coarse:my-[calc((2.75rem-var(--spacing)*6)/2)]',\n // both overlays are reserved as layout, so neither can bleed into a scroller;\n // the coarse margin tracks --spacing so the 44px reserve holds at any [data-scaling]\n \"before:absolute before:top-1/2 before:left-1/2 before:size-10 before:-translate-x-1/2 before:-translate-y-1/2 before:content-['']\",\n 'rounded-[min(var(--spark-rounded-md),40%)]',\n 'focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden',\n 'data-disabled:cursor-not-allowed data-disabled:opacity-50',\n 'border-(--spark-style-idle-border,var(--spark-a7)) bg-base-accent-soft',\n 'data-checked:border-(--spark-style-border,var(--spark-9)) data-checked:bg-(--spark-style-bg,var(--spark-9))',\n 'data-indeterminate:border-(--spark-style-border,var(--spark-9)) data-indeterminate:bg-(--spark-style-bg,var(--spark-9))',\n className,\n )}\n ref={ref}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"group inline-flex items-center justify-center text-(--spark-style-fg,var(--spark-on-solid))\">\n {/* custom-drawn glyphs; group-data toggles which one the mounted indicator shows */}\n <svg\n aria-hidden=\"true\"\n className=\"hidden size-5 group-data-checked:block\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <path\n className=\"animate-check-draw [stroke-dasharray:1] motion-reduce:animate-none\"\n d=\"M5.5 12.5 L10 17 L18.5 7.5\"\n pathLength={1}\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2.5}\n />\n </svg>\n <span className=\"hidden h-0.5 w-3 origin-center animate-dash-pop rounded-full bg-current group-data-indeterminate:block motion-reduce:animate-none\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n )\n },\n)\n\nCheckbox.displayName = 'Checkbox'\n\nexport { Checkbox }\nexport type { CheckboxProps }\n"],"mappings":";;;;;;;AAuBA,MAAM,WAAWA,QAAM,YAKnB,EACE,WACA,MAAM,OACN,UAAU,WACV,cACA,OACA,QACA,cACA,GAAG,SAEL,QACG;CAEH,MAAM,YADU,iBAAiB,KAAA,KAAa,UAAU,KAAA,IAC3B,gBAAgB,UAAW,KAAA;CACxD,MAAM,kBAAkB,QAAQ,cAAc,SAAS,KAAA;CAEvD,OACE,oBAACC,WAAkB,MAAnB;EACE,cAAY;EACZ,qBAAmB;EAGnB,cAAc,gBAAgB,WAAW,KAAA;EACzC,QAAQ,UAAU,oBAAC,UAAD,CAAS,CAAA;EAC3B,WAAW,GAGT,0OAGA,qIACA,8CACA,iFACA,6DACA,0EACA,+GACA,2HACA,SACF;EACK;EACL,GAAI;YAEJ,qBAACA,WAAkB,WAAnB;GAA6B,WAAU;aAAvC,CAEE,oBAAC,OAAD;IACE,eAAY;IACZ,WAAU;IACV,MAAK;IACL,SAAQ;cAER,oBAAC,QAAD;KACE,WAAU;KACV,GAAE;KACF,YAAY;KACZ,QAAO;KACP,eAAc;KACd,gBAAe;KACf,aAAa;IACd,CAAA;GACE,CAAA,GACL,oBAAC,QAAD,EAAM,WAAU,oIAAqI,CAAA,CAC1H;;CACP,CAAA;AAE5B,CACF;AAEA,SAAS,cAAc"}
1
+ {"version":3,"file":"checkbox.js","names":["React","CheckboxPrimitive"],"sources":["../../src/components/checkbox.tsx"],"sourcesContent":["import { Checkbox as CheckboxPrimitive } from '@base-ui/react/checkbox'\nimport * as React from 'react'\nimport { accentByColor } from '../lib/accent-colors'\nimport type { SparkStyle } from '../lib/theme-types'\nimport { cn } from '../utils/cn'\n\nexport type SparkCheckboxColor = 'accent' | 'neutral' | 'danger'\n\ntype CheckboxProps = CheckboxPrimitive.Root.Props & {\n /**\n * @deprecated The checkbox now renders a single 24px size (with a 40px hit\n * area). Accepted for back-compat but ignored.\n */\n size?: 'default' | 'large'\n /**\n * @deprecated The checkbox is always bordered now. Accepted for back-compat\n * but ignored.\n */\n bordered?: boolean\n styleVariant?: SparkStyle\n color?: SparkCheckboxColor\n}\n\nconst Checkbox = React.forwardRef<\n React.ComponentRef<typeof CheckboxPrimitive.Root>,\n CheckboxProps\n>(\n (\n {\n className,\n size: _size,\n bordered: _bordered,\n styleVariant,\n color,\n render,\n nativeButton,\n ...props\n },\n ref,\n ) => {\n const hasLook = styleVariant !== undefined || color !== undefined\n const dataStyle = hasLook ? (styleVariant ?? 'solid') : undefined\n const dataAccentColor = color ? accentByColor[color] : undefined\n\n return (\n <CheckboxPrimitive.Root\n data-style={dataStyle}\n data-accent-color={dataAccentColor}\n // a native button owns the caller's `id`; on Base UI's default <span> the\n // `id` lands on the hidden input and the control gets a generated one\n nativeButton={nativeButton ?? render === undefined}\n render={render ?? <button />}\n className={cn(\n // p-0 defends the 24px box against the UA button padding when the\n // consumer's CSS has no Tailwind preflight\n 'peer touch-target relative my-2 inline-flex size-6 shrink-0 cursor-pointer items-center justify-center border-(length:--spark-style-border-width,2px) p-0 transition-colors any-pointer-coarse:my-[calc((2.75rem-var(--spacing)*6)/2)]',\n // both overlays are reserved as layout, so neither can bleed into a scroller;\n // the coarse margin tracks --spacing so the 44px reserve holds at any [data-scaling]\n \"before:absolute before:top-1/2 before:left-1/2 before:size-10 before:-translate-x-1/2 before:-translate-y-1/2 before:content-['']\",\n 'rounded-[min(var(--spark-rounded-md),40%)]',\n 'focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden',\n 'data-disabled:cursor-not-allowed data-disabled:opacity-50',\n 'border-(--spark-style-idle-border,var(--color-accent-ui)) bg-base-accent-soft',\n 'data-checked:border-(--spark-style-border,var(--color-primary)) data-checked:bg-(--spark-style-bg,var(--color-primary))',\n 'data-indeterminate:border-(--spark-style-border,var(--color-primary)) data-indeterminate:bg-(--spark-style-bg,var(--color-primary))',\n className,\n )}\n ref={ref}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"group inline-flex items-center justify-center text-(--spark-style-fg,var(--spark-on-solid))\">\n {/* custom-drawn glyphs; group-data toggles which one the mounted indicator shows */}\n <svg\n aria-hidden=\"true\"\n className=\"hidden size-5 group-data-checked:block\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <path\n className=\"animate-check-draw [stroke-dasharray:1] motion-reduce:animate-none\"\n d=\"M5.5 12.5 L10 17 L18.5 7.5\"\n pathLength={1}\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2.5}\n />\n </svg>\n <span className=\"hidden h-0.5 w-3 origin-center animate-dash-pop rounded-full bg-current group-data-indeterminate:block motion-reduce:animate-none\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n )\n },\n)\n\nCheckbox.displayName = 'Checkbox'\n\nexport { Checkbox }\nexport type { CheckboxProps }\n"],"mappings":";;;;;;;AAuBA,MAAM,WAAWA,QAAM,YAKnB,EACE,WACA,MAAM,OACN,UAAU,WACV,cACA,OACA,QACA,cACA,GAAG,SAEL,QACG;CAEH,MAAM,YADU,iBAAiB,KAAA,KAAa,UAAU,KAAA,IAC3B,gBAAgB,UAAW,KAAA;CACxD,MAAM,kBAAkB,QAAQ,cAAc,SAAS,KAAA;CAEvD,OACE,oBAACC,WAAkB,MAAnB;EACE,cAAY;EACZ,qBAAmB;EAGnB,cAAc,gBAAgB,WAAW,KAAA;EACzC,QAAQ,UAAU,oBAAC,UAAD,CAAS,CAAA;EAC3B,WAAW,GAGT,0OAGA,qIACA,8CACA,iFACA,6DACA,iFACA,2HACA,uIACA,SACF;EACK;EACL,GAAI;YAEJ,qBAACA,WAAkB,WAAnB;GAA6B,WAAU;aAAvC,CAEE,oBAAC,OAAD;IACE,eAAY;IACZ,WAAU;IACV,MAAK;IACL,SAAQ;cAER,oBAAC,QAAD;KACE,WAAU;KACV,GAAE;KACF,YAAY;KACZ,QAAO;KACP,eAAc;KACd,gBAAe;KACf,aAAa;IACd,CAAA;GACE,CAAA,GACL,oBAAC,QAAD,EAAM,WAAU,oIAAqI,CAAA,CAC1H;;CACP,CAAA;AAE5B,CACF;AAEA,SAAS,cAAc"}
@@ -7,17 +7,17 @@ let react_jsx_runtime = require("react/jsx-runtime");
7
7
  let cnfast = require("cnfast");
8
8
  //#region src/components/circular-gauge.tsx
9
9
  const TRACK_TONE_CLASSES = {
10
- success: "stroke-base-success-soft",
11
- warning: "stroke-base-warning-soft",
12
- error: "stroke-base-error-soft",
13
- accent: "stroke-base-accent-soft",
10
+ success: "stroke-success-soft",
11
+ warning: "stroke-warning-soft",
12
+ error: "stroke-error-soft",
13
+ accent: "stroke-primary-soft",
14
14
  neutral: "stroke-base-gray-soft"
15
15
  };
16
16
  const INDICATOR_TONE_CLASSES = {
17
17
  success: "stroke-base-success-solid",
18
- warning: "stroke-warning-active",
19
- error: "stroke-error-active",
20
- accent: "stroke-accent",
18
+ warning: "stroke-base-warning-solid",
19
+ error: "stroke-base-error-solid",
20
+ accent: "stroke-primary",
21
21
  neutral: "stroke-gray"
22
22
  };
23
23
  const CircularGauge = ({ className, value, max = 100, tone = "accent", size = 44, strokeWidth = 4, children, ...rest }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"circular-gauge.cjs","names":[],"sources":["../../src/components/circular-gauge.tsx"],"sourcesContent":["import * as React from 'react'\nimport type { Tone } from '../lib/tones'\nimport { cn } from '../utils/cn'\n\nconst TRACK_TONE_CLASSES: Record<Tone, string> = {\n success: 'stroke-base-success-soft',\n warning: 'stroke-base-warning-soft',\n error: 'stroke-base-error-soft',\n accent: 'stroke-base-accent-soft',\n neutral: 'stroke-base-gray-soft',\n}\n\nconst INDICATOR_TONE_CLASSES: Record<Tone, string> = {\n // solid ramp, not `-active`: keeps the ring in step with DeviceCardState's dot\n success: 'stroke-base-success-solid',\n warning: 'stroke-warning-active',\n error: 'stroke-error-active',\n accent: 'stroke-accent',\n neutral: 'stroke-gray',\n}\n\n/**\n * Consumers should pass an `aria-label` to name the metric the gauge represents\n * (e.g. \"Battery\"); `aria-valuetext` defaults to the value as a percentage.\n */\nexport interface CircularGaugeProps extends Omit<\n React.ComponentProps<'div'>,\n 'children'\n> {\n /** Current value (0–max). */\n value: number\n /** Maximum value. Default: 100 */\n max?: number\n /** Tone color for the indicator/track pair. Default: \"accent\" */\n tone?: Tone\n /** Diameter in pixels. Default: 44 */\n size?: number\n /** Stroke thickness in pixels. Default: 4 */\n strokeWidth?: number\n /** Optional content rendered centered inside the gauge (e.g. percentage, icon). */\n children?: React.ReactNode\n}\n\nconst CircularGauge = ({\n className,\n value,\n max = 100,\n tone = 'accent',\n size = 44,\n strokeWidth = 4,\n children,\n ...rest\n}: CircularGaugeProps) => {\n const clamped = Math.min(Math.max(value, 0), max)\n const radius = (size - strokeWidth) / 2\n const circumference = 2 * Math.PI * radius\n const offset = circumference * (1 - clamped / max)\n const percent = Math.round((clamped / max) * 100)\n\n return (\n <div\n className={cn('relative inline-flex shrink-0', className)}\n style={{ width: size, height: size }}\n role=\"meter\"\n aria-valuemin={0}\n aria-valuemax={max}\n aria-valuenow={value}\n aria-valuetext={`${percent}%`}\n {...rest}\n >\n <svg\n className=\"size-full -rotate-90\"\n width={size}\n height={size}\n viewBox={`0 0 ${size} ${size}`}\n aria-hidden=\"true\"\n >\n <circle\n cx={size / 2}\n cy={size / 2}\n r={radius}\n fill=\"none\"\n strokeWidth={strokeWidth}\n className={TRACK_TONE_CLASSES[tone]}\n />\n <circle\n cx={size / 2}\n cy={size / 2}\n r={radius}\n fill=\"none\"\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeDasharray={circumference}\n strokeDashoffset={offset}\n className={cn(\n 'transition-[stroke-dashoffset] duration-300',\n INDICATOR_TONE_CLASSES[tone],\n )}\n />\n </svg>\n {children !== undefined && (\n <span className=\"absolute inset-0 flex items-center justify-center text-[11px] leading-none font-semibold tabular-nums\">\n {children}\n </span>\n )}\n </div>\n )\n}\n\nexport { CircularGauge }\n"],"mappings":";;;;;;;;AAIA,MAAM,qBAA2C;CAC/C,SAAS;CACT,SAAS;CACT,OAAO;CACP,QAAQ;CACR,SAAS;AACX;AAEA,MAAM,yBAA+C;CAEnD,SAAS;CACT,SAAS;CACT,OAAO;CACP,QAAQ;CACR,SAAS;AACX;AAwBA,MAAM,iBAAiB,EACrB,WACA,OACA,MAAM,KACN,OAAO,UACP,OAAO,IACP,cAAc,GACd,UACA,GAAG,WACqB;CACxB,MAAM,UAAU,KAAK,IAAI,KAAK,IAAI,OAAO,CAAC,GAAG,GAAG;CAChD,MAAM,UAAU,OAAO,eAAe;CACtC,MAAM,gBAAgB,IAAI,KAAK,KAAK;CACpC,MAAM,SAAS,iBAAiB,IAAI,UAAU;CAC9C,MAAM,UAAU,KAAK,MAAO,UAAU,MAAO,GAAG;CAEhD,OACE,iBAAA,GAAA,kBAAA,MAAC,OAAD;EACE,YAAA,GAAA,OAAA,IAAc,iCAAiC,SAAS;EACxD,OAAO;GAAE,OAAO;GAAM,QAAQ;EAAK;EACnC,MAAK;EACL,iBAAe;EACf,iBAAe;EACf,iBAAe;EACf,kBAAgB,GAAG,QAAQ;EAC3B,GAAI;YARN,CAUE,iBAAA,GAAA,kBAAA,MAAC,OAAD;GACE,WAAU;GACV,OAAO;GACP,QAAQ;GACR,SAAS,OAAO,KAAK,GAAG;GACxB,eAAY;aALd,CAOE,iBAAA,GAAA,kBAAA,KAAC,UAAD;IACE,IAAI,OAAO;IACX,IAAI,OAAO;IACX,GAAG;IACH,MAAK;IACQ;IACb,WAAW,mBAAmB;GAC/B,CAAA,GACD,iBAAA,GAAA,kBAAA,KAAC,UAAD;IACE,IAAI,OAAO;IACX,IAAI,OAAO;IACX,GAAG;IACH,MAAK;IACQ;IACb,eAAc;IACd,iBAAiB;IACjB,kBAAkB;IAClB,YAAA,GAAA,OAAA,IACE,+CACA,uBAAuB,KACzB;GACD,CAAA,CACE;MACJ,aAAa,KAAA,KACZ,iBAAA,GAAA,kBAAA,KAAC,QAAD;GAAM,WAAU;GACb;EACG,CAAA,CAEL;;AAET"}
1
+ {"version":3,"file":"circular-gauge.cjs","names":[],"sources":["../../src/components/circular-gauge.tsx"],"sourcesContent":["import * as React from 'react'\nimport type { Tone } from '../lib/tones'\nimport { cn } from '../utils/cn'\n\nconst TRACK_TONE_CLASSES: Record<Tone, string> = {\n success: 'stroke-success-soft',\n warning: 'stroke-warning-soft',\n error: 'stroke-error-soft',\n accent: 'stroke-primary-soft',\n neutral: 'stroke-base-gray-soft',\n}\n\nconst INDICATOR_TONE_CLASSES: Record<Tone, string> = {\n // solid ramp, not `-active`: keeps the ring in step with EntityCardState's dot\n success: 'stroke-base-success-solid',\n warning: 'stroke-base-warning-solid',\n error: 'stroke-base-error-solid',\n accent: 'stroke-primary',\n neutral: 'stroke-gray',\n}\n\n/**\n * Consumers should pass an `aria-label` to name the metric the gauge represents\n * (e.g. \"Battery\"); `aria-valuetext` defaults to the value as a percentage.\n */\nexport interface CircularGaugeProps extends Omit<\n React.ComponentProps<'div'>,\n 'children'\n> {\n /** Current value (0–max). */\n value: number\n /** Maximum value. Default: 100 */\n max?: number\n /** Tone color for the indicator/track pair. Default: \"accent\" */\n tone?: Tone\n /** Diameter in pixels. Default: 44 */\n size?: number\n /** Stroke thickness in pixels. Default: 4 */\n strokeWidth?: number\n /** Optional content rendered centered inside the gauge (e.g. percentage, icon). */\n children?: React.ReactNode\n}\n\nconst CircularGauge = ({\n className,\n value,\n max = 100,\n tone = 'accent',\n size = 44,\n strokeWidth = 4,\n children,\n ...rest\n}: CircularGaugeProps) => {\n const clamped = Math.min(Math.max(value, 0), max)\n const radius = (size - strokeWidth) / 2\n const circumference = 2 * Math.PI * radius\n const offset = circumference * (1 - clamped / max)\n const percent = Math.round((clamped / max) * 100)\n\n return (\n <div\n className={cn('relative inline-flex shrink-0', className)}\n style={{ width: size, height: size }}\n role=\"meter\"\n aria-valuemin={0}\n aria-valuemax={max}\n aria-valuenow={value}\n aria-valuetext={`${percent}%`}\n {...rest}\n >\n <svg\n className=\"size-full -rotate-90\"\n width={size}\n height={size}\n viewBox={`0 0 ${size} ${size}`}\n aria-hidden=\"true\"\n >\n <circle\n cx={size / 2}\n cy={size / 2}\n r={radius}\n fill=\"none\"\n strokeWidth={strokeWidth}\n className={TRACK_TONE_CLASSES[tone]}\n />\n <circle\n cx={size / 2}\n cy={size / 2}\n r={radius}\n fill=\"none\"\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeDasharray={circumference}\n strokeDashoffset={offset}\n className={cn(\n 'transition-[stroke-dashoffset] duration-300',\n INDICATOR_TONE_CLASSES[tone],\n )}\n />\n </svg>\n {children !== undefined && (\n <span className=\"absolute inset-0 flex items-center justify-center text-[11px] leading-none font-semibold tabular-nums\">\n {children}\n </span>\n )}\n </div>\n )\n}\n\nexport { CircularGauge }\n"],"mappings":";;;;;;;;AAIA,MAAM,qBAA2C;CAC/C,SAAS;CACT,SAAS;CACT,OAAO;CACP,QAAQ;CACR,SAAS;AACX;AAEA,MAAM,yBAA+C;CAEnD,SAAS;CACT,SAAS;CACT,OAAO;CACP,QAAQ;CACR,SAAS;AACX;AAwBA,MAAM,iBAAiB,EACrB,WACA,OACA,MAAM,KACN,OAAO,UACP,OAAO,IACP,cAAc,GACd,UACA,GAAG,WACqB;CACxB,MAAM,UAAU,KAAK,IAAI,KAAK,IAAI,OAAO,CAAC,GAAG,GAAG;CAChD,MAAM,UAAU,OAAO,eAAe;CACtC,MAAM,gBAAgB,IAAI,KAAK,KAAK;CACpC,MAAM,SAAS,iBAAiB,IAAI,UAAU;CAC9C,MAAM,UAAU,KAAK,MAAO,UAAU,MAAO,GAAG;CAEhD,OACE,iBAAA,GAAA,kBAAA,MAAC,OAAD;EACE,YAAA,GAAA,OAAA,IAAc,iCAAiC,SAAS;EACxD,OAAO;GAAE,OAAO;GAAM,QAAQ;EAAK;EACnC,MAAK;EACL,iBAAe;EACf,iBAAe;EACf,iBAAe;EACf,kBAAgB,GAAG,QAAQ;EAC3B,GAAI;YARN,CAUE,iBAAA,GAAA,kBAAA,MAAC,OAAD;GACE,WAAU;GACV,OAAO;GACP,QAAQ;GACR,SAAS,OAAO,KAAK,GAAG;GACxB,eAAY;aALd,CAOE,iBAAA,GAAA,kBAAA,KAAC,UAAD;IACE,IAAI,OAAO;IACX,IAAI,OAAO;IACX,GAAG;IACH,MAAK;IACQ;IACb,WAAW,mBAAmB;GAC/B,CAAA,GACD,iBAAA,GAAA,kBAAA,KAAC,UAAD;IACE,IAAI,OAAO;IACX,IAAI,OAAO;IACX,GAAG;IACH,MAAK;IACQ;IACb,eAAc;IACd,iBAAiB;IACjB,kBAAkB;IAClB,YAAA,GAAA,OAAA,IACE,+CACA,uBAAuB,KACzB;GACD,CAAA,CACE;MACJ,aAAa,KAAA,KACZ,iBAAA,GAAA,kBAAA,KAAC,QAAD;GAAM,WAAU;GACb;EACG,CAAA,CAEL;;AAET"}
@@ -4,17 +4,17 @@ import "react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  //#region src/components/circular-gauge.tsx
6
6
  const TRACK_TONE_CLASSES = {
7
- success: "stroke-base-success-soft",
8
- warning: "stroke-base-warning-soft",
9
- error: "stroke-base-error-soft",
10
- accent: "stroke-base-accent-soft",
7
+ success: "stroke-success-soft",
8
+ warning: "stroke-warning-soft",
9
+ error: "stroke-error-soft",
10
+ accent: "stroke-primary-soft",
11
11
  neutral: "stroke-base-gray-soft"
12
12
  };
13
13
  const INDICATOR_TONE_CLASSES = {
14
14
  success: "stroke-base-success-solid",
15
- warning: "stroke-warning-active",
16
- error: "stroke-error-active",
17
- accent: "stroke-accent",
15
+ warning: "stroke-base-warning-solid",
16
+ error: "stroke-base-error-solid",
17
+ accent: "stroke-primary",
18
18
  neutral: "stroke-gray"
19
19
  };
20
20
  const CircularGauge = ({ className, value, max = 100, tone = "accent", size = 44, strokeWidth = 4, children, ...rest }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"circular-gauge.js","names":[],"sources":["../../src/components/circular-gauge.tsx"],"sourcesContent":["import * as React from 'react'\nimport type { Tone } from '../lib/tones'\nimport { cn } from '../utils/cn'\n\nconst TRACK_TONE_CLASSES: Record<Tone, string> = {\n success: 'stroke-base-success-soft',\n warning: 'stroke-base-warning-soft',\n error: 'stroke-base-error-soft',\n accent: 'stroke-base-accent-soft',\n neutral: 'stroke-base-gray-soft',\n}\n\nconst INDICATOR_TONE_CLASSES: Record<Tone, string> = {\n // solid ramp, not `-active`: keeps the ring in step with DeviceCardState's dot\n success: 'stroke-base-success-solid',\n warning: 'stroke-warning-active',\n error: 'stroke-error-active',\n accent: 'stroke-accent',\n neutral: 'stroke-gray',\n}\n\n/**\n * Consumers should pass an `aria-label` to name the metric the gauge represents\n * (e.g. \"Battery\"); `aria-valuetext` defaults to the value as a percentage.\n */\nexport interface CircularGaugeProps extends Omit<\n React.ComponentProps<'div'>,\n 'children'\n> {\n /** Current value (0–max). */\n value: number\n /** Maximum value. Default: 100 */\n max?: number\n /** Tone color for the indicator/track pair. Default: \"accent\" */\n tone?: Tone\n /** Diameter in pixels. Default: 44 */\n size?: number\n /** Stroke thickness in pixels. Default: 4 */\n strokeWidth?: number\n /** Optional content rendered centered inside the gauge (e.g. percentage, icon). */\n children?: React.ReactNode\n}\n\nconst CircularGauge = ({\n className,\n value,\n max = 100,\n tone = 'accent',\n size = 44,\n strokeWidth = 4,\n children,\n ...rest\n}: CircularGaugeProps) => {\n const clamped = Math.min(Math.max(value, 0), max)\n const radius = (size - strokeWidth) / 2\n const circumference = 2 * Math.PI * radius\n const offset = circumference * (1 - clamped / max)\n const percent = Math.round((clamped / max) * 100)\n\n return (\n <div\n className={cn('relative inline-flex shrink-0', className)}\n style={{ width: size, height: size }}\n role=\"meter\"\n aria-valuemin={0}\n aria-valuemax={max}\n aria-valuenow={value}\n aria-valuetext={`${percent}%`}\n {...rest}\n >\n <svg\n className=\"size-full -rotate-90\"\n width={size}\n height={size}\n viewBox={`0 0 ${size} ${size}`}\n aria-hidden=\"true\"\n >\n <circle\n cx={size / 2}\n cy={size / 2}\n r={radius}\n fill=\"none\"\n strokeWidth={strokeWidth}\n className={TRACK_TONE_CLASSES[tone]}\n />\n <circle\n cx={size / 2}\n cy={size / 2}\n r={radius}\n fill=\"none\"\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeDasharray={circumference}\n strokeDashoffset={offset}\n className={cn(\n 'transition-[stroke-dashoffset] duration-300',\n INDICATOR_TONE_CLASSES[tone],\n )}\n />\n </svg>\n {children !== undefined && (\n <span className=\"absolute inset-0 flex items-center justify-center text-[11px] leading-none font-semibold tabular-nums\">\n {children}\n </span>\n )}\n </div>\n )\n}\n\nexport { CircularGauge }\n"],"mappings":";;;;;AAIA,MAAM,qBAA2C;CAC/C,SAAS;CACT,SAAS;CACT,OAAO;CACP,QAAQ;CACR,SAAS;AACX;AAEA,MAAM,yBAA+C;CAEnD,SAAS;CACT,SAAS;CACT,OAAO;CACP,QAAQ;CACR,SAAS;AACX;AAwBA,MAAM,iBAAiB,EACrB,WACA,OACA,MAAM,KACN,OAAO,UACP,OAAO,IACP,cAAc,GACd,UACA,GAAG,WACqB;CACxB,MAAM,UAAU,KAAK,IAAI,KAAK,IAAI,OAAO,CAAC,GAAG,GAAG;CAChD,MAAM,UAAU,OAAO,eAAe;CACtC,MAAM,gBAAgB,IAAI,KAAK,KAAK;CACpC,MAAM,SAAS,iBAAiB,IAAI,UAAU;CAC9C,MAAM,UAAU,KAAK,MAAO,UAAU,MAAO,GAAG;CAEhD,OACE,qBAAC,OAAD;EACE,WAAW,GAAG,iCAAiC,SAAS;EACxD,OAAO;GAAE,OAAO;GAAM,QAAQ;EAAK;EACnC,MAAK;EACL,iBAAe;EACf,iBAAe;EACf,iBAAe;EACf,kBAAgB,GAAG,QAAQ;EAC3B,GAAI;YARN,CAUE,qBAAC,OAAD;GACE,WAAU;GACV,OAAO;GACP,QAAQ;GACR,SAAS,OAAO,KAAK,GAAG;GACxB,eAAY;aALd,CAOE,oBAAC,UAAD;IACE,IAAI,OAAO;IACX,IAAI,OAAO;IACX,GAAG;IACH,MAAK;IACQ;IACb,WAAW,mBAAmB;GAC/B,CAAA,GACD,oBAAC,UAAD;IACE,IAAI,OAAO;IACX,IAAI,OAAO;IACX,GAAG;IACH,MAAK;IACQ;IACb,eAAc;IACd,iBAAiB;IACjB,kBAAkB;IAClB,WAAW,GACT,+CACA,uBAAuB,KACzB;GACD,CAAA,CACE;MACJ,aAAa,KAAA,KACZ,oBAAC,QAAD;GAAM,WAAU;GACb;EACG,CAAA,CAEL;;AAET"}
1
+ {"version":3,"file":"circular-gauge.js","names":[],"sources":["../../src/components/circular-gauge.tsx"],"sourcesContent":["import * as React from 'react'\nimport type { Tone } from '../lib/tones'\nimport { cn } from '../utils/cn'\n\nconst TRACK_TONE_CLASSES: Record<Tone, string> = {\n success: 'stroke-success-soft',\n warning: 'stroke-warning-soft',\n error: 'stroke-error-soft',\n accent: 'stroke-primary-soft',\n neutral: 'stroke-base-gray-soft',\n}\n\nconst INDICATOR_TONE_CLASSES: Record<Tone, string> = {\n // solid ramp, not `-active`: keeps the ring in step with EntityCardState's dot\n success: 'stroke-base-success-solid',\n warning: 'stroke-base-warning-solid',\n error: 'stroke-base-error-solid',\n accent: 'stroke-primary',\n neutral: 'stroke-gray',\n}\n\n/**\n * Consumers should pass an `aria-label` to name the metric the gauge represents\n * (e.g. \"Battery\"); `aria-valuetext` defaults to the value as a percentage.\n */\nexport interface CircularGaugeProps extends Omit<\n React.ComponentProps<'div'>,\n 'children'\n> {\n /** Current value (0–max). */\n value: number\n /** Maximum value. Default: 100 */\n max?: number\n /** Tone color for the indicator/track pair. Default: \"accent\" */\n tone?: Tone\n /** Diameter in pixels. Default: 44 */\n size?: number\n /** Stroke thickness in pixels. Default: 4 */\n strokeWidth?: number\n /** Optional content rendered centered inside the gauge (e.g. percentage, icon). */\n children?: React.ReactNode\n}\n\nconst CircularGauge = ({\n className,\n value,\n max = 100,\n tone = 'accent',\n size = 44,\n strokeWidth = 4,\n children,\n ...rest\n}: CircularGaugeProps) => {\n const clamped = Math.min(Math.max(value, 0), max)\n const radius = (size - strokeWidth) / 2\n const circumference = 2 * Math.PI * radius\n const offset = circumference * (1 - clamped / max)\n const percent = Math.round((clamped / max) * 100)\n\n return (\n <div\n className={cn('relative inline-flex shrink-0', className)}\n style={{ width: size, height: size }}\n role=\"meter\"\n aria-valuemin={0}\n aria-valuemax={max}\n aria-valuenow={value}\n aria-valuetext={`${percent}%`}\n {...rest}\n >\n <svg\n className=\"size-full -rotate-90\"\n width={size}\n height={size}\n viewBox={`0 0 ${size} ${size}`}\n aria-hidden=\"true\"\n >\n <circle\n cx={size / 2}\n cy={size / 2}\n r={radius}\n fill=\"none\"\n strokeWidth={strokeWidth}\n className={TRACK_TONE_CLASSES[tone]}\n />\n <circle\n cx={size / 2}\n cy={size / 2}\n r={radius}\n fill=\"none\"\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeDasharray={circumference}\n strokeDashoffset={offset}\n className={cn(\n 'transition-[stroke-dashoffset] duration-300',\n INDICATOR_TONE_CLASSES[tone],\n )}\n />\n </svg>\n {children !== undefined && (\n <span className=\"absolute inset-0 flex items-center justify-center text-[11px] leading-none font-semibold tabular-nums\">\n {children}\n </span>\n )}\n </div>\n )\n}\n\nexport { CircularGauge }\n"],"mappings":";;;;;AAIA,MAAM,qBAA2C;CAC/C,SAAS;CACT,SAAS;CACT,OAAO;CACP,QAAQ;CACR,SAAS;AACX;AAEA,MAAM,yBAA+C;CAEnD,SAAS;CACT,SAAS;CACT,OAAO;CACP,QAAQ;CACR,SAAS;AACX;AAwBA,MAAM,iBAAiB,EACrB,WACA,OACA,MAAM,KACN,OAAO,UACP,OAAO,IACP,cAAc,GACd,UACA,GAAG,WACqB;CACxB,MAAM,UAAU,KAAK,IAAI,KAAK,IAAI,OAAO,CAAC,GAAG,GAAG;CAChD,MAAM,UAAU,OAAO,eAAe;CACtC,MAAM,gBAAgB,IAAI,KAAK,KAAK;CACpC,MAAM,SAAS,iBAAiB,IAAI,UAAU;CAC9C,MAAM,UAAU,KAAK,MAAO,UAAU,MAAO,GAAG;CAEhD,OACE,qBAAC,OAAD;EACE,WAAW,GAAG,iCAAiC,SAAS;EACxD,OAAO;GAAE,OAAO;GAAM,QAAQ;EAAK;EACnC,MAAK;EACL,iBAAe;EACf,iBAAe;EACf,iBAAe;EACf,kBAAgB,GAAG,QAAQ;EAC3B,GAAI;YARN,CAUE,qBAAC,OAAD;GACE,WAAU;GACV,OAAO;GACP,QAAQ;GACR,SAAS,OAAO,KAAK,GAAG;GACxB,eAAY;aALd,CAOE,oBAAC,UAAD;IACE,IAAI,OAAO;IACX,IAAI,OAAO;IACX,GAAG;IACH,MAAK;IACQ;IACb,WAAW,mBAAmB;GAC/B,CAAA,GACD,oBAAC,UAAD;IACE,IAAI,OAAO;IACX,IAAI,OAAO;IACX,GAAG;IACH,MAAK;IACQ;IACb,eAAc;IACd,iBAAiB;IACjB,kBAAkB;IAClB,WAAW,GACT,+CACA,uBAAuB,KACzB;GACD,CAAA,CACE;MACJ,aAAa,KAAA,KACZ,oBAAC,QAAD;GAAM,WAAU;GACb;EACG,CAAA,CAEL;;AAET"}