@epilot/spark-ui 0.11.1 → 0.12.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 (125) hide show
  1. package/dist/components/avatar.d.cts +1 -1
  2. package/dist/components/avatar.d.ts +1 -1
  3. package/dist/components/badge.d.cts +1 -1
  4. package/dist/components/badge.d.ts +1 -1
  5. package/dist/components/bar-chart.js +1 -1
  6. package/dist/components/box.cjs +3 -2
  7. package/dist/components/box.cjs.map +1 -1
  8. package/dist/components/box.d.cts +8 -1
  9. package/dist/components/box.d.ts +8 -1
  10. package/dist/components/box.js +3 -2
  11. package/dist/components/box.js.map +1 -1
  12. package/dist/components/button-group.d.cts +1 -1
  13. package/dist/components/button-group.d.ts +1 -1
  14. package/dist/components/button.d.cts +2 -2
  15. package/dist/components/button.d.ts +2 -2
  16. package/dist/components/calendar.cjs +2 -2
  17. package/dist/components/calendar.cjs.map +1 -1
  18. package/dist/components/calendar.js +2 -2
  19. package/dist/components/calendar.js.map +1 -1
  20. package/dist/components/callout.cjs +1 -1
  21. package/dist/components/callout.cjs.map +1 -1
  22. package/dist/components/callout.d.cts +3 -3
  23. package/dist/components/callout.d.ts +3 -3
  24. package/dist/components/callout.js +1 -1
  25. package/dist/components/callout.js.map +1 -1
  26. package/dist/components/card.cjs +3 -2
  27. package/dist/components/card.cjs.map +1 -1
  28. package/dist/components/card.d.cts +7 -1
  29. package/dist/components/card.d.ts +7 -1
  30. package/dist/components/card.js +3 -2
  31. package/dist/components/card.js.map +1 -1
  32. package/dist/components/checkbox.d.cts +1 -1
  33. package/dist/components/checkbox.d.ts +1 -1
  34. package/dist/components/field.d.cts +1 -1
  35. package/dist/components/field.d.ts +1 -1
  36. package/dist/components/icon.cjs +1 -1
  37. package/dist/components/icon.js +1 -1
  38. package/dist/components/input-group.cjs +1 -1
  39. package/dist/components/input-group.cjs.map +1 -1
  40. package/dist/components/input-group.js +1 -1
  41. package/dist/components/input-group.js.map +1 -1
  42. package/dist/components/input.d.cts +1 -1
  43. package/dist/components/input.d.ts +1 -1
  44. package/dist/components/line-chart.cjs +1 -1
  45. package/dist/components/line-chart.js +2 -2
  46. package/dist/components/list.d.cts +1 -1
  47. package/dist/components/list.d.ts +1 -1
  48. package/dist/components/marker.d.cts +1 -1
  49. package/dist/components/marker.d.ts +1 -1
  50. package/dist/components/pill.cjs +20 -13
  51. package/dist/components/pill.cjs.map +1 -1
  52. package/dist/components/pill.d.cts +1 -1
  53. package/dist/components/pill.d.ts +1 -1
  54. package/dist/components/pill.js +20 -13
  55. package/dist/components/pill.js.map +1 -1
  56. package/dist/components/power-history-chart.cjs +1 -1
  57. package/dist/components/power-history-chart.js +2 -2
  58. package/dist/components/progress.cjs +1 -1
  59. package/dist/components/progress.cjs.map +1 -1
  60. package/dist/components/progress.js +1 -1
  61. package/dist/components/progress.js.map +1 -1
  62. package/dist/components/radio-card-group.cjs.map +1 -1
  63. package/dist/components/radio-card-group.js.map +1 -1
  64. package/dist/components/radio.d.cts +1 -1
  65. package/dist/components/radio.d.ts +1 -1
  66. package/dist/components/schedule-list.cjs +10 -7
  67. package/dist/components/schedule-list.cjs.map +1 -1
  68. package/dist/components/schedule-list.js +10 -7
  69. package/dist/components/schedule-list.js.map +1 -1
  70. package/dist/components/segmented-control.d.cts +1 -1
  71. package/dist/components/segmented-control.d.ts +1 -1
  72. package/dist/components/select.cjs +1 -1
  73. package/dist/components/select.d.cts +1 -1
  74. package/dist/components/select.d.ts +1 -1
  75. package/dist/components/select.js +1 -1
  76. package/dist/components/solar-forecast-chart.cjs +1 -1
  77. package/dist/components/solar-forecast-chart.js +2 -2
  78. package/dist/components/switch.d.cts +1 -1
  79. package/dist/components/switch.d.ts +1 -1
  80. package/dist/components/textarea.d.cts +1 -1
  81. package/dist/components/textarea.d.ts +1 -1
  82. package/dist/components/theme.cjs +18 -6
  83. package/dist/components/theme.cjs.map +1 -1
  84. package/dist/components/theme.d.cts +16 -2
  85. package/dist/components/theme.d.ts +16 -2
  86. package/dist/components/theme.js +19 -7
  87. package/dist/components/theme.js.map +1 -1
  88. package/dist/{generate-radix-colors-Bw-RYaV4.d.ts → generate-radix-colors-BY4Wjsm7.d.cts} +4 -2
  89. package/dist/{generate-radix-colors-Bw-RYaV4.d.cts → generate-radix-colors-BY4Wjsm7.d.ts} +4 -2
  90. package/dist/icons/material-symbol.cjs +1 -1
  91. package/dist/icons/material-symbol.cjs.map +1 -1
  92. package/dist/icons/material-symbol.js +1 -1
  93. package/dist/icons/material-symbol.js.map +1 -1
  94. package/dist/lib/accent-theme.cjs +367 -16
  95. package/dist/lib/accent-theme.cjs.map +1 -1
  96. package/dist/lib/accent-theme.d.cts +75 -6
  97. package/dist/lib/accent-theme.d.ts +75 -6
  98. package/dist/lib/accent-theme.js +365 -18
  99. package/dist/lib/accent-theme.js.map +1 -1
  100. package/dist/lib/container-chrome.cjs +9 -7
  101. package/dist/lib/container-chrome.cjs.map +1 -1
  102. package/dist/lib/container-chrome.d.cts +4 -3
  103. package/dist/lib/container-chrome.d.ts +4 -3
  104. package/dist/lib/container-chrome.js +9 -8
  105. package/dist/lib/container-chrome.js.map +1 -1
  106. package/dist/lib/generate-radix-colors.cjs +7 -0
  107. package/dist/lib/generate-radix-colors.cjs.map +1 -1
  108. package/dist/lib/generate-radix-colors.d.cts +2 -2
  109. package/dist/lib/generate-radix-colors.d.ts +2 -2
  110. package/dist/lib/generate-radix-colors.js +6 -1
  111. package/dist/lib/generate-radix-colors.js.map +1 -1
  112. package/dist/lib/input-box-variants.d.cts +1 -1
  113. package/dist/lib/input-box-variants.d.ts +1 -1
  114. package/dist/lib/theme-types.cjs +19 -0
  115. package/dist/lib/theme-types.cjs.map +1 -0
  116. package/dist/lib/theme-types.d.cts +2 -2
  117. package/dist/lib/theme-types.d.ts +2 -2
  118. package/dist/lib/theme-types.js +17 -1
  119. package/dist/lib/theme-types.js.map +1 -0
  120. package/dist/styles/material-symbol.css +3 -0
  121. package/dist/styles/spark-default.css +148 -0
  122. package/dist/styles/utilities.css +9 -8
  123. package/dist/{theme-types-1yB0d8mp.d.ts → theme-types-Bn5E15-P.d.cts} +12 -3
  124. package/dist/{theme-types-1yB0d8mp.d.cts → theme-types-Bn5E15-P.d.ts} +12 -3
  125. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"card.js","names":["React"],"sources":["../../src/components/card.tsx"],"sourcesContent":["import { useRender } from '@base-ui/react/use-render'\nimport { cva } from 'class-variance-authority'\nimport * as React from 'react'\nimport {\n containerChrome,\n containerInteractiveClasses,\n containerPaddingX,\n radiusClasses,\n type ContainerRadius,\n} from '../lib/container-chrome'\nimport type { SparkCardColor, SparkCardVariant } from '../lib/theme-types'\nimport { cn } from '../utils/cn'\n\ntype CardRadius = ContainerRadius\n\nconst cardVariants = cva('relative flex w-full flex-col gap-1 py-3', {\n variants: {\n variant: {\n ambient: cn(containerChrome.ambient, containerPaddingX.ambient),\n soft: cn(containerChrome.soft, containerPaddingX.soft),\n surface: cn(containerChrome.surface, containerPaddingX.surface),\n outline: cn(containerChrome.outline, containerPaddingX.outline),\n ghost: cn(containerChrome.ghost, containerPaddingX.ghost),\n solid: cn(containerChrome.solid, containerPaddingX.solid),\n },\n },\n defaultVariants: {\n variant: 'ambient',\n },\n})\n\ninterface CardProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Container chrome scoped to this card — NOT the ambient `data-style` knob\n * (that drives controls and would cascade into the card's content). Unset →\n * follows the app-level `[data-card-variant]` knob (default soft-neutral).\n */\n variant?: SparkCardVariant\n /** Chrome palette. `neutral` (default) tracks the app neutral; `accent` tints with the brand accent. */\n color?: SparkCardColor\n /** Corner radius, as a named step. Unset → `2xl`, today's fixed behaviour. */\n radius?: CardRadius\n /**\n * Base UI polymorphism. Pass `<a href/>` or `<button/>` to make the whole\n * card interactive (hover tint, focus ring, disabled styles). Omit → static.\n */\n render?: useRender.RenderProp\n}\n\nconst Card = React.forwardRef<HTMLDivElement, CardProps>(\n ({ className, variant, color, radius = '2xl', render, ...props }, ref) => {\n const interactive = render != null\n const resolved = variant ?? 'ambient'\n return useRender({\n defaultTagName: 'div',\n render,\n props: {\n 'data-slot': 'card',\n 'data-variant': variant,\n 'data-card-color': color === 'accent' ? 'accent' : undefined,\n className: cn(\n cardVariants({ variant }),\n radiusClasses[radius],\n interactive && containerInteractiveClasses(resolved),\n className,\n ),\n ref,\n ...props,\n },\n })\n },\n)\n\nCard.displayName = 'Card'\n\nconst CardHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n className={cn('flex items-center gap-4', className)}\n ref={ref}\n {...props}\n />\n))\n\nCardHeader.displayName = 'CardHeader'\n\nconst CardIcon = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n className={cn(\n 'flex shrink-0 items-center justify-center text-(--spark-card-icon,var(--spark-a11))',\n className,\n )}\n ref={ref}\n {...props}\n />\n))\n\nCardIcon.displayName = 'CardIcon'\n\nconst CardTitle = React.forwardRef<\n HTMLHeadingElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h3\n className={cn(\n 'text-base leading-5 font-medium text-(--spark-card-fg,var(--neutral-a12))',\n className,\n )}\n ref={ref}\n {...props}\n />\n))\n\nCardTitle.displayName = 'CardTitle'\n\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p\n className={cn(\n 'text-sm leading-5 text-(--spark-card-fg-muted,var(--neutral-a11))',\n className,\n )}\n ref={ref}\n {...props}\n />\n))\n\nCardDescription.displayName = 'CardDescription'\n\nconst CardContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div className={cn('', className)} ref={ref} {...props} />\n))\n\nCardContent.displayName = 'CardContent'\n\nconst CardFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n className={cn(\n 'flex items-center justify-end gap-2 pt-2 text-(--spark-card-fg,var(--neutral-a12))',\n className,\n )}\n ref={ref}\n {...props}\n />\n))\n\nCardFooter.displayName = 'CardFooter'\n\nconst CardSkeleton = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n className={cn(\n 'relative flex w-full items-center gap-4 rounded-2xl bg-spark-a3 p-4 opacity-80',\n className,\n )}\n ref={ref}\n {...props}\n >\n <div className=\"size-10 shrink-0 animate-pulse rounded-full bg-base-gray-soft motion-reduce:animate-none\" />\n <div className=\"flex flex-1 flex-col gap-y-2\">\n <div className=\"h-5 w-1/3 max-w-32 animate-pulse rounded-md bg-base-gray-soft motion-reduce:animate-none\" />\n <div className=\"h-4 w-1/2 max-w-48 animate-pulse rounded-md bg-base-gray-soft motion-reduce:animate-none\" />\n </div>\n </div>\n))\n\nCardSkeleton.displayName = 'CardSkeleton'\n\nexport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardIcon,\n CardSkeleton,\n CardTitle,\n}\nexport type { CardProps, CardRadius }\n"],"mappings":";;;;;;;;AAeA,MAAM,eAAe,IAAI,4CAA4C;CACnE,UAAU,EACR,SAAS;EACP,SAAS,GAAG,gBAAgB,SAAS,kBAAkB,OAAO;EAC9D,MAAM,GAAG,gBAAgB,MAAM,kBAAkB,IAAI;EACrD,SAAS,GAAG,gBAAgB,SAAS,kBAAkB,OAAO;EAC9D,SAAS,GAAG,gBAAgB,SAAS,kBAAkB,OAAO;EAC9D,OAAO,GAAG,gBAAgB,OAAO,kBAAkB,KAAK;EACxD,OAAO,GAAG,gBAAgB,OAAO,kBAAkB,KAAK;CAC1D,EACF;CACA,iBAAiB,EACf,SAAS,UACX;AACF,CAAC;AAoBD,MAAM,OAAOA,QAAM,YAChB,EAAE,WAAW,SA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AW,GACT,sFACA,SACF;CACK;CACL,GAAI;AACL,CAAA,CACF;AAED,WAAW,cAAc;AAEzB,MAAM,eAAeA,QAAM,YAGxB,EAAE,WAAW,GAAG,SAAS,QAC1B,qBAAC,OAAD;CACE,WAAW,GACT,kFACA,SACF;CACK;CACL,GAAI;WANN,CAQE,oBAAC,OAAD,EAAK,WAAU,2FAA4F,CAAA,GAC3G,qBAAC,OAAD;EAAK,WAAU;YAAf,CACE,oBAAC,OAAD,EAAK,WAAU,2FAA4F,CAAA,GAC3G,oBAAC,OAAD,EAAK,WAAU,2FAA4F,CAAA,CACxG;GACF;EACN;AAED,aAAa,cAAc"}
1
+ {"version":3,"file":"card.js","names":["React"],"sources":["../../src/components/card.tsx"],"sourcesContent":["import { useRender } from '@base-ui/react/use-render'\nimport { cva } from 'class-variance-authority'\nimport * as React from 'react'\nimport {\n containerChrome,\n containerElevated,\n containerInteractiveClasses,\n containerPaddingX,\n radiusClasses,\n type ContainerRadius,\n} from '../lib/container-chrome'\nimport type { SparkCardColor, SparkCardVariant } from '../lib/theme-types'\nimport { cn } from '../utils/cn'\n\ntype CardRadius = ContainerRadius\n\nconst cardVariants = cva('relative flex w-full flex-col gap-1 py-3', {\n variants: {\n variant: {\n ambient: cn(containerChrome.ambient, containerPaddingX.ambient),\n soft: cn(containerChrome.soft, containerPaddingX.soft),\n surface: cn(containerChrome.surface, containerPaddingX.surface),\n outline: cn(containerChrome.outline, containerPaddingX.outline),\n ghost: cn(containerChrome.ghost, containerPaddingX.ghost),\n solid: cn(containerChrome.solid, containerPaddingX.solid),\n },\n },\n defaultVariants: {\n variant: 'ambient',\n },\n})\n\ninterface CardProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Container chrome scoped to this card — NOT the ambient `data-style` knob\n * (that drives controls and would cascade into the card's content). Unset →\n * follows the app-level `[data-card-variant]` knob (default soft-neutral).\n */\n variant?: SparkCardVariant\n /** Chrome palette. `neutral` (default) tracks the app neutral; `accent` tints with the brand accent. */\n color?: SparkCardColor\n /** Corner radius, as a named step. Unset → `2xl`, today's fixed behaviour. */\n radius?: CardRadius\n /**\n * Lift the card off an arbitrary backdrop (a photo, not the flat app canvas):\n * an opaque `--spark-elevated` fill plus a shadow, so no `variant`/`color`\n * combination — including a translucent one like `soft` — can bleed it through.\n */\n elevated?: boolean\n /**\n * Base UI polymorphism. Pass `<a href/>` or `<button/>` to make the whole\n * card interactive (hover tint, focus ring, disabled styles). Omit → static.\n */\n render?: useRender.RenderProp\n}\n\nconst Card = React.forwardRef<HTMLDivElement, CardProps>(\n (\n { className, variant, color, radius = '2xl', elevated, render, ...props },\n ref,\n ) => {\n const interactive = render != null\n const resolved = variant ?? 'ambient'\n return useRender({\n defaultTagName: 'div',\n render,\n props: {\n 'data-slot': 'card',\n 'data-variant': variant,\n 'data-card-color': color === 'accent' ? 'accent' : undefined,\n 'data-elevated': elevated ? '' : undefined,\n className: cn(\n cardVariants({ variant }),\n radiusClasses[radius],\n elevated && containerElevated,\n interactive && containerInteractiveClasses(resolved, elevated),\n className,\n ),\n ref,\n ...props,\n },\n })\n },\n)\n\nCard.displayName = 'Card'\n\nconst CardHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n className={cn('flex items-center gap-4', className)}\n ref={ref}\n {...props}\n />\n))\n\nCardHeader.displayName = 'CardHeader'\n\nconst CardIcon = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n className={cn(\n 'flex shrink-0 items-center justify-center text-(--spark-card-icon,var(--spark-a11))',\n className,\n )}\n ref={ref}\n {...props}\n />\n))\n\nCardIcon.displayName = 'CardIcon'\n\nconst CardTitle = React.forwardRef<\n HTMLHeadingElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h3\n className={cn(\n 'text-base leading-5 font-medium text-(--spark-card-fg,var(--neutral-a12))',\n className,\n )}\n ref={ref}\n {...props}\n />\n))\n\nCardTitle.displayName = 'CardTitle'\n\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p\n className={cn(\n 'text-sm leading-5 text-(--spark-card-fg-muted,var(--neutral-a11))',\n className,\n )}\n ref={ref}\n {...props}\n />\n))\n\nCardDescription.displayName = 'CardDescription'\n\nconst CardContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div className={cn('', className)} ref={ref} {...props} />\n))\n\nCardContent.displayName = 'CardContent'\n\nconst CardFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n className={cn(\n 'flex items-center justify-end gap-2 pt-2 text-(--spark-card-fg,var(--neutral-a12))',\n className,\n )}\n ref={ref}\n {...props}\n />\n))\n\nCardFooter.displayName = 'CardFooter'\n\nconst CardSkeleton = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n className={cn(\n 'relative flex w-full items-center gap-4 rounded-2xl bg-spark-a3 p-4 opacity-80',\n className,\n )}\n ref={ref}\n {...props}\n >\n <div className=\"size-10 shrink-0 animate-pulse rounded-full bg-base-gray-soft motion-reduce:animate-none\" />\n <div className=\"flex flex-1 flex-col gap-y-2\">\n <div className=\"h-5 w-1/3 max-w-32 animate-pulse rounded-md bg-base-gray-soft motion-reduce:animate-none\" />\n <div className=\"h-4 w-1/2 max-w-48 animate-pulse rounded-md bg-base-gray-soft motion-reduce:animate-none\" />\n </div>\n </div>\n))\n\nCardSkeleton.displayName = 'CardSkeleton'\n\nexport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardIcon,\n CardSkeleton,\n CardTitle,\n}\nexport type { CardProps, CardRadius }\n"],"mappings":";;;;;;;;AAgBA,MAAM,eAAe,I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W,GACT,6EACA,SACF;CACK;CACL,GAAI;AACL,CAAA,CACF;AAED,UAAU,cAAc;AAExB,MAAM,kBAAkBA,QAAM,YAG3B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,KAAD;CACE,WAAW,GACT,qEACA,SACF;CACK;CACL,GAAI;AACL,CAAA,CACF;AAED,gBAAgB,cAAc;AAE9B,MAAM,cAAcA,QAAM,YAGvB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,OAAD;CAAK,WAAW,GAAG,IAAI,SAAS;CAAQ;CAAK,GAAI;AAAQ,CAAA,CAC1D;AAED,YAAY,cAAc;AAE1B,MAAM,aAAaA,QAAM,YAGtB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,OAAD;CACE,WAAW,GACT,sFACA,SACF;CACK;CACL,GAAI;AACL,CAAA,CACF;AAED,WAAW,cAAc;AAEzB,MAAM,eAAeA,QAAM,YAGxB,EAAE,WAAW,GAAG,SAAS,QAC1B,qBAAC,OAAD;CACE,WAAW,GACT,kFACA,SACF;CACK;CACL,GAAI;WANN,CAQE,oBAAC,OAAD,EAAK,WAAU,2FAA4F,CAAA,GAC3G,qBAAC,OAAD;EAAK,WAAU;YAAf,CACE,oBAAC,OAAD,EAAK,WAAU,2FAA4F,CAAA,GAC3G,oBAAC,OAAD,EAAK,WAAU,2FAA4F,CAAA,CACxG;GACF;EACN;AAED,aAAa,cAAc"}
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import { u as SparkStyle } from "../theme-types-1yB0d8mp.cjs";
3
+ import { f as SparkStyle } from "../theme-types-Bn5E15-P.cjs";
4
4
  import * as React$1 from "react";
5
5
  import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
6
6
 
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import { u as SparkStyle } from "../theme-types-1yB0d8mp.js";
3
+ import { f as SparkStyle } from "../theme-types-Bn5E15-P.js";
4
4
  import * as React$1 from "react";
5
5
  import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
6
6
 
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import { a as SparkLabelPosition, i as SparkInputStyle, r as SparkInputColor } from "../theme-types-1yB0d8mp.cjs";
3
+ import { a as SparkInputStyle, i as SparkInputColor, o as SparkLabelPosition } from "../theme-types-Bn5E15-P.cjs";
4
4
  import * as React$1 from "react";
5
5
 
6
6
  //#region src/components/field.d.ts
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import { a as SparkLabelPosition, i as SparkInputStyle, r as SparkInputColor } from "../theme-types-1yB0d8mp.js";
3
+ import { a as SparkInputStyle, i as SparkInputColor, o as SparkLabelPosition } from "../theme-types-Bn5E15-P.js";
4
4
  import * as React$1 from "react";
5
5
 
6
6
  //#region src/components/field.d.ts
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const require_chunk = require("../chunk-DY84GLCh.cjs");
4
- const require_lib_accent_colors = require("../lib/accent-colors.cjs");
5
4
  const require_icons_material_symbol = require("../icons/material-symbol.cjs");
5
+ const require_lib_accent_colors = require("../lib/accent-colors.cjs");
6
6
  let react = require("react");
7
7
  react = require_chunk.__toESM(react);
8
8
  let react_jsx_runtime = require("react/jsx-runtime");
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { cn } from "../utils/cn.js";
3
- import { accentByColor } from "../lib/accent-colors.js";
4
3
  import { MaterialSymbol } from "../icons/material-symbol.js";
4
+ import { accentByColor } from "../lib/accent-colors.js";
5
5
  import "react";
6
6
  import { jsx } from "react/jsx-runtime";
7
7
  //#region src/components/icon.tsx
@@ -130,7 +130,7 @@ const inputGroupAddonVariants = (0, class_variance_authority.cva)("flex h-auto c
130
130
  });
131
131
  function InputGroupAddon({ className, align = "inline-start", ...props }) {
132
132
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
133
- role: "group",
133
+ role: "presentation",
134
134
  "data-slot": "input-group-addon",
135
135
  "data-align": align,
136
136
  className: (0, cnfast.cn)(inputGroupAddonVariants({ align }), className),
@@ -1 +1 @@
1
- {"version":3,"file":"input-group.cjs","names":["useFieldContext","useTheme","React","Input"],"sources":["../../src/components/input-group.tsx"],"sourcesContent":["'use client'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\nimport { cn } from '../utils/cn'\nimport { useFieldContext } from './field'\nimport { Input, type InputProps } from './input'\nimport { useTheme } from './theme'\n\nconst GHOST =\n 'rounded-none border-0 border-b-2 px-0 focus-within:border-b-input-active has-[[data-slot=input][aria-invalid=true]]:border-b-input-invalid has-[[data-slot=input][aria-invalid=true]]:focus-within:border-b-red-a8! group-data-[invalid=true]/field:border-b-input-invalid! group-data-[invalid=true]/field:focus-within:border-b-red-a8!'\n\nconst inputGroupVariants = cva(\n 'group/input-group relative flex h-10 w-full min-w-0 items-center gap-2 bg-transparent transition-[color,border-color] outline-none motion-reduce:transition-none',\n {\n variants: {\n chrome: {\n // inside an inset field the shell is the box; the group keeps the\n // classic underline (inputs inside stay chrome-less)\n inset: GHOST,\n // h-11 matches the standalone Input box\n box: 'h-11 rounded-lg px-3 transition-all motion-reduce:transition-none',\n },\n inputStyle: { soft: '', surface: '', outlined: '', ghost: '' },\n inputColor: { brand: '', gray: '' },\n },\n compoundVariants: [\n {\n chrome: 'box',\n inputStyle: 'soft',\n // invalid hover deepens the error tint instead of the accent hover\n class:\n 'group-data-[invalid=true]/field:bg-base-error-soft focus-within:ring-2 focus-within:ring-offset-2 group-data-[invalid=true]/field:focus-within:ring-red-a8 has-[[data-slot=input][aria-invalid=true]]:bg-base-error-soft has-[[data-slot=input][aria-invalid=true]]:focus-within:ring-red-a8 has-[[data-slot=input][aria-invalid=true]:not(:disabled)]:hover:bg-red-a4 group-data-[invalid=true]/field:has-[input:not(:disabled)]:hover:bg-red-a4',\n },\n {\n chrome: 'box',\n inputStyle: 'soft',\n inputColor: 'brand',\n class:\n 'bg-input-base focus-within:ring-input-active has-[input:not(:disabled)]:hover:bg-input-base-hover',\n },\n {\n chrome: 'box',\n inputStyle: 'soft',\n inputColor: 'gray',\n class:\n 'bg-base-gray-soft focus-within:ring-gray-a8 has-[input:not(:disabled)]:hover:bg-gray-a4',\n },\n {\n chrome: 'box',\n inputStyle: ['surface', 'outlined'],\n class:\n 'border group-data-[invalid=true]/field:border-input-invalid focus-within:ring-1 group-data-[invalid=true]/field:focus-within:border-input-invalid! group-data-[invalid=true]/field:focus-within:ring-red-a4! has-[[data-slot=input][aria-invalid=true]]:border-input-invalid has-[[data-slot=input][aria-invalid=true]]:focus-within:border-input-invalid! has-[[data-slot=input][aria-invalid=true]]:focus-within:ring-red-a4!',\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'brand',\n class:\n 'border-input bg-base-accent-surface focus-within:border-input-active focus-within:ring-spark-a4',\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'gray',\n class:\n 'border-input-gray bg-base-gray-surface focus-within:border-gray-a8 focus-within:ring-gray-a4',\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'brand',\n class:\n 'border-input focus-within:border-input-active focus-within:ring-spark-a4',\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'gray',\n class:\n 'border-input-gray focus-within:border-gray-a8 focus-within:ring-gray-a4',\n },\n { chrome: 'box', inputStyle: 'ghost', class: GHOST },\n {\n chrome: 'box',\n inputStyle: 'ghost',\n inputColor: 'brand',\n class: 'border-b-input',\n },\n {\n chrome: 'box',\n inputStyle: 'ghost',\n inputColor: 'gray',\n class: 'border-b-input-gray',\n },\n { chrome: 'inset', inputColor: 'brand', class: 'border-b-input' },\n { chrome: 'inset', inputColor: 'gray', class: 'border-b-input-gray' },\n ],\n },\n)\n\n// The group carries the box + focus/invalid states; inputs inside are\n// chrome-less (variant=\"none\"). Style follows the enclosing Field's knobs,\n// else the <Theme> input-style/input-color knobs.\nfunction InputGroup({ className, ...props }: React.ComponentProps<'div'>) {\n const field = useFieldContext()\n const theme = useTheme()\n const inputStyle = field?.inputStyle ?? theme.inputStyle ?? 'soft'\n const inputColor = field?.inputColor ?? theme.inputColor ?? 'brand'\n const chrome = field?.labelPosition === 'inset' ? 'inset' : 'box'\n return (\n <div\n data-slot=\"input-group\"\n role=\"group\"\n className={cn(\n inputGroupVariants({ chrome, inputStyle, inputColor }),\n className,\n )}\n {...props}\n />\n )\n}\n\nconst inputGroupAddonVariants = cva(\n 'flex h-auto cursor-text items-center justify-center gap-2 py-2 text-sm font-medium text-gray-light select-none [&_svg:not([class*=size-])]:size-4',\n {\n variants: {\n align: {\n // button addons bring their own inner padding — pull them halfway\n // into the group's px so the visual gap matches the text side\n 'inline-start': 'order-first has-[>button]:-ml-2',\n 'inline-end': 'order-last has-[>button]:-mr-2',\n },\n },\n defaultVariants: {\n align: 'inline-start',\n },\n },\n)\n\nfunction InputGroupAddon({\n className,\n align = 'inline-start',\n ...props\n}: React.ComponentProps<'div'> & VariantProps<typeof inputGroupAddonVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"input-group-addon\"\n data-align={align}\n className={cn(inputGroupAddonVariants({ align }), className)}\n onClick={(event) => {\n if ((event.target as HTMLElement).closest('button')) return\n event.currentTarget.parentElement?.querySelector('input')?.focus()\n }}\n {...props}\n />\n )\n}\n\nfunction InputGroupText({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n className={cn(\n 'flex items-center gap-2 text-xs text-gray-light [&_svg]:pointer-events-none [&_svg:not([class*=size-])]:size-4',\n className,\n )}\n {...props}\n />\n )\n}\n\nconst InputGroupInput = React.forwardRef<HTMLInputElement, InputProps>(\n function InputGroupInput({ className, ...props }, ref) {\n return (\n <Input\n data-slot=\"input\"\n variant=\"none\"\n className={cn('flex-1', className)}\n ref={ref}\n {...props}\n />\n )\n },\n)\n\nexport { InputGroup, InputGroupAddon, InputGroupInput, InputGroupText }\n"],"mappings":";;;;;;;;;;;;;AASA,MAAM,QAC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GAAA,OAAA,IACE,mBAAmB;GAAE,QANZ,OAAO,kBAAkB,UAAU,UAAU;GAMzB;GAAY;EAAW,CAAC,GACrD,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,MAAM,2BAAA,GAAA,yBAAA,KACJ,qJACA;CACE,UAAU,EACR,OAAO;EAGL,gBAAgB;EAChB,cAAc;CAChB,EACF;CACA,iBAAiB,EACf,OAAO,eACT;AACF,CACF;AAEA,SAAS,gBAAgB,EACvB,WACA,QAAQ,gBACR,GAAG,SAC0E;CAC7E,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,MAAK;EACL,aAAU;EACV,cAAY;EACZ,YAAA,GAAA,OAAA,IAAc,wBAAwB,EAAE,MAAM,CAAC,GAAG,SAAS;EAC3D,UAAU,UAAU;GAClB,IAAK,MAAM,OAAuB,QAAQ,QAAQ,GAAG;GACrD,MAAM,cAAc,eAAe,cAAc,OAAO,GAAG,MAAM;EACnE;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,eAAe,EAAE,WAAW,GAAG,SAAuC;CAC7E,OACE,iBAAA,GAAA,kBAAA,KAAC,QAAD;EACE,YAAA,GAAA,OAAA,IACE,kHACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,MAAM,kBAAkBC,MAAM,WAC5B,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAS,KAAK;CACrD,OACE,iBAAA,GAAA,kBAAA,KAACC,yBAAAA,OAAD;EACE,aAAU;EACV,SAAQ;EACR,YAAA,GAAA,OAAA,IAAc,UAAU,SAAS;EAC5B;EACL,GAAI;CACL,CAAA;AAEL,CACF"}
1
+ {"version":3,"file":"input-group.cjs","names":["useFieldContext","useTheme","React","Input"],"sources":["../../src/components/input-group.tsx"],"sourcesContent":["'use client'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\nimport { cn } from '../utils/cn'\nimport { useFieldContext } from './field'\nimport { Input, type InputProps } from './input'\nimport { useTheme } from './theme'\n\nconst GHOST =\n 'rounded-none border-0 border-b-2 px-0 focus-within:border-b-input-active has-[[data-slot=input][aria-invalid=true]]:border-b-input-invalid has-[[data-slot=input][aria-invalid=true]]:focus-within:border-b-red-a8! group-data-[invalid=true]/field:border-b-input-invalid! group-data-[invalid=true]/field:focus-within:border-b-red-a8!'\n\nconst inputGroupVariants = cva(\n 'group/input-group relative flex h-10 w-full min-w-0 items-center gap-2 bg-transparent transition-[color,border-color] outline-none motion-reduce:transition-none',\n {\n variants: {\n chrome: {\n // inside an inset field the shell is the box; the group keeps the\n // classic underline (inputs inside stay chrome-less)\n inset: GHOST,\n // h-11 matches the standalone Input box\n box: 'h-11 rounded-lg px-3 transition-all motion-reduce:transition-none',\n },\n inputStyle: { soft: '', surface: '', outlined: '', ghost: '' },\n inputColor: { brand: '', gray: '' },\n },\n compoundVariants: [\n {\n chrome: 'box',\n inputStyle: 'soft',\n // invalid hover deepens the error tint instead of the accent hover\n class:\n 'group-data-[invalid=true]/field:bg-base-error-soft focus-within:ring-2 focus-within:ring-offset-2 group-data-[invalid=true]/field:focus-within:ring-red-a8 has-[[data-slot=input][aria-invalid=true]]:bg-base-error-soft has-[[data-slot=input][aria-invalid=true]]:focus-within:ring-red-a8 has-[[data-slot=input][aria-invalid=true]:not(:disabled)]:hover:bg-red-a4 group-data-[invalid=true]/field:has-[input:not(:disabled)]:hover:bg-red-a4',\n },\n {\n chrome: 'box',\n inputStyle: 'soft',\n inputColor: 'brand',\n class:\n 'bg-input-base focus-within:ring-input-active has-[input:not(:disabled)]:hover:bg-input-base-hover',\n },\n {\n chrome: 'box',\n inputStyle: 'soft',\n inputColor: 'gray',\n class:\n 'bg-base-gray-soft focus-within:ring-gray-a8 has-[input:not(:disabled)]:hover:bg-gray-a4',\n },\n {\n chrome: 'box',\n inputStyle: ['surface', 'outlined'],\n class:\n 'border group-data-[invalid=true]/field:border-input-invalid focus-within:ring-1 group-data-[invalid=true]/field:focus-within:border-input-invalid! group-data-[invalid=true]/field:focus-within:ring-red-a4! has-[[data-slot=input][aria-invalid=true]]:border-input-invalid has-[[data-slot=input][aria-invalid=true]]:focus-within:border-input-invalid! has-[[data-slot=input][aria-invalid=true]]:focus-within:ring-red-a4!',\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'brand',\n class:\n 'border-input bg-base-accent-surface focus-within:border-input-active focus-within:ring-spark-a4',\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'gray',\n class:\n 'border-input-gray bg-base-gray-surface focus-within:border-gray-a8 focus-within:ring-gray-a4',\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'brand',\n class:\n 'border-input focus-within:border-input-active focus-within:ring-spark-a4',\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'gray',\n class:\n 'border-input-gray focus-within:border-gray-a8 focus-within:ring-gray-a4',\n },\n { chrome: 'box', inputStyle: 'ghost', class: GHOST },\n {\n chrome: 'box',\n inputStyle: 'ghost',\n inputColor: 'brand',\n class: 'border-b-input',\n },\n {\n chrome: 'box',\n inputStyle: 'ghost',\n inputColor: 'gray',\n class: 'border-b-input-gray',\n },\n { chrome: 'inset', inputColor: 'brand', class: 'border-b-input' },\n { chrome: 'inset', inputColor: 'gray', class: 'border-b-input-gray' },\n ],\n },\n)\n\n// The group carries the box + focus/invalid states; inputs inside are\n// chrome-less (variant=\"none\"). Style follows the enclosing Field's knobs,\n// else the <Theme> input-style/input-color knobs.\nfunction InputGroup({ className, ...props }: React.ComponentProps<'div'>) {\n const field = useFieldContext()\n const theme = useTheme()\n const inputStyle = field?.inputStyle ?? theme.inputStyle ?? 'soft'\n const inputColor = field?.inputColor ?? theme.inputColor ?? 'brand'\n const chrome = field?.labelPosition === 'inset' ? 'inset' : 'box'\n return (\n <div\n data-slot=\"input-group\"\n role=\"group\"\n className={cn(\n inputGroupVariants({ chrome, inputStyle, inputColor }),\n className,\n )}\n {...props}\n />\n )\n}\n\nconst inputGroupAddonVariants = cva(\n 'flex h-auto cursor-text items-center justify-center gap-2 py-2 text-sm font-medium text-gray-light select-none [&_svg:not([class*=size-])]:size-4',\n {\n variants: {\n align: {\n // button addons bring their own inner padding — pull them halfway\n // into the group's px so the visual gap matches the text side\n 'inline-start': 'order-first has-[>button]:-ml-2',\n 'inline-end': 'order-last has-[>button]:-mr-2',\n },\n },\n defaultVariants: {\n align: 'inline-start',\n },\n },\n)\n\nfunction InputGroupAddon({\n className,\n align = 'inline-start',\n ...props\n}: React.ComponentProps<'div'> & VariantProps<typeof inputGroupAddonVariants>) {\n return (\n <div\n // chrome, not a control: the click only forwards focus to the input the\n // way a label would, and Tab already reaches that input directly\n role=\"presentation\"\n data-slot=\"input-group-addon\"\n data-align={align}\n className={cn(inputGroupAddonVariants({ align }), className)}\n onClick={(event) => {\n if ((event.target as HTMLElement).closest('button')) return\n event.currentTarget.parentElement?.querySelector('input')?.focus()\n }}\n {...props}\n />\n )\n}\n\nfunction InputGroupText({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n className={cn(\n 'flex items-center gap-2 text-xs text-gray-light [&_svg]:pointer-events-none [&_svg:not([class*=size-])]:size-4',\n className,\n )}\n {...props}\n />\n )\n}\n\nconst InputGroupInput = React.forwardRef<HTMLInputElement, InputProps>(\n function InputGroupInput({ className, ...props }, ref) {\n return (\n <Input\n data-slot=\"input\"\n variant=\"none\"\n className={cn('flex-1', className)}\n ref={ref}\n {...props}\n />\n )\n },\n)\n\nexport { InputGroup, InputGroupAddon, InputGroupInput, InputGroupText }\n"],"mappings":";;;;;;;;;;;;;AASA,MAAM,QACJ;AAEF,MAAM,sBAAA,GAAA,yBAAA,KACJ,oKACA;CACE,UAAU;EACR,QAAQ;GAGN,OAAO;GAEP,KAAK;EACP;EACA,YAAY;GAAE,MAAM;GAAI,SAAS;GAAI,UAAU;GAAI,OAAO;EAAG;EAC7D,YAAY;GAAE,OAAO;GAAI,MAAM;EAAG;CACpC;CACA,kBAAkB;EAChB;GACE,QAAQ;GACR,Y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AO,eACT;AACF,CACF;AAEA,SAAS,gBAAgB,EACvB,WACA,QAAQ,gBACR,GAAG,SAC0E;CAC7E,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EAGE,MAAK;EACL,aAAU;EACV,cAAY;EACZ,YAAA,GAAA,OAAA,IAAc,wBAAwB,EAAE,MAAM,CAAC,GAAG,SAAS;EAC3D,UAAU,UAAU;GAClB,IAAK,MAAM,OAAuB,QAAQ,QAAQ,GAAG;GACrD,MAAM,cAAc,eAAe,cAAc,OAAO,GAAG,MAAM;EACnE;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,eAAe,EAAE,WAAW,GAAG,SAAuC;CAC7E,OACE,iBAAA,GAAA,kBAAA,KAAC,QAAD;EACE,YAAA,GAAA,OAAA,IACE,kHACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,MAAM,kBAAkBC,MAAM,WAC5B,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAS,KAAK;CACrD,OACE,iBAAA,GAAA,kBAAA,KAACC,yBAAAA,OAAD;EACE,aAAU;EACV,SAAQ;EACR,YAAA,GAAA,OAAA,IAAc,UAAU,SAAS;EAC5B;EACL,GAAI;CACL,CAAA;AAEL,CACF"}
@@ -127,7 +127,7 @@ const inputGroupAddonVariants = cva("flex h-auto cursor-text items-center justif
127
127
  });
128
128
  function InputGroupAddon({ className, align = "inline-start", ...props }) {
129
129
  return /* @__PURE__ */ jsx("div", {
130
- role: "group",
130
+ role: "presentation",
131
131
  "data-slot": "input-group-addon",
132
132
  "data-align": align,
133
133
  className: cn(inputGroupAddonVariants({ align }), className),
@@ -1 +1 @@
1
- {"version":3,"file":"input-group.js","names":["React"],"sources":["../../src/components/input-group.tsx"],"sourcesContent":["'use client'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\nimport { cn } from '../utils/cn'\nimport { useFieldContext } from './field'\nimport { Input, type InputProps } from './input'\nimport { useTheme } from './theme'\n\nconst GHOST =\n 'rounded-none border-0 border-b-2 px-0 focus-within:border-b-input-active has-[[data-slot=input][aria-invalid=true]]:border-b-input-invalid has-[[data-slot=input][aria-invalid=true]]:focus-within:border-b-red-a8! group-data-[invalid=true]/field:border-b-input-invalid! group-data-[invalid=true]/field:focus-within:border-b-red-a8!'\n\nconst inputGroupVariants = cva(\n 'group/input-group relative flex h-10 w-full min-w-0 items-center gap-2 bg-transparent transition-[color,border-color] outline-none motion-reduce:transition-none',\n {\n variants: {\n chrome: {\n // inside an inset field the shell is the box; the group keeps the\n // classic underline (inputs inside stay chrome-less)\n inset: GHOST,\n // h-11 matches the standalone Input box\n box: 'h-11 rounded-lg px-3 transition-all motion-reduce:transition-none',\n },\n inputStyle: { soft: '', surface: '', outlined: '', ghost: '' },\n inputColor: { brand: '', gray: '' },\n },\n compoundVariants: [\n {\n chrome: 'box',\n inputStyle: 'soft',\n // invalid hover deepens the error tint instead of the accent hover\n class:\n 'group-data-[invalid=true]/field:bg-base-error-soft focus-within:ring-2 focus-within:ring-offset-2 group-data-[invalid=true]/field:focus-within:ring-red-a8 has-[[data-slot=input][aria-invalid=true]]:bg-base-error-soft has-[[data-slot=input][aria-invalid=true]]:focus-within:ring-red-a8 has-[[data-slot=input][aria-invalid=true]:not(:disabled)]:hover:bg-red-a4 group-data-[invalid=true]/field:has-[input:not(:disabled)]:hover:bg-red-a4',\n },\n {\n chrome: 'box',\n inputStyle: 'soft',\n inputColor: 'brand',\n class:\n 'bg-input-base focus-within:ring-input-active has-[input:not(:disabled)]:hover:bg-input-base-hover',\n },\n {\n chrome: 'box',\n inputStyle: 'soft',\n inputColor: 'gray',\n class:\n 'bg-base-gray-soft focus-within:ring-gray-a8 has-[input:not(:disabled)]:hover:bg-gray-a4',\n },\n {\n chrome: 'box',\n inputStyle: ['surface', 'outlined'],\n class:\n 'border group-data-[invalid=true]/field:border-input-invalid focus-within:ring-1 group-data-[invalid=true]/field:focus-within:border-input-invalid! group-data-[invalid=true]/field:focus-within:ring-red-a4! has-[[data-slot=input][aria-invalid=true]]:border-input-invalid has-[[data-slot=input][aria-invalid=true]]:focus-within:border-input-invalid! has-[[data-slot=input][aria-invalid=true]]:focus-within:ring-red-a4!',\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'brand',\n class:\n 'border-input bg-base-accent-surface focus-within:border-input-active focus-within:ring-spark-a4',\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'gray',\n class:\n 'border-input-gray bg-base-gray-surface focus-within:border-gray-a8 focus-within:ring-gray-a4',\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'brand',\n class:\n 'border-input focus-within:border-input-active focus-within:ring-spark-a4',\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'gray',\n class:\n 'border-input-gray focus-within:border-gray-a8 focus-within:ring-gray-a4',\n },\n { chrome: 'box', inputStyle: 'ghost', class: GHOST },\n {\n chrome: 'box',\n inputStyle: 'ghost',\n inputColor: 'brand',\n class: 'border-b-input',\n },\n {\n chrome: 'box',\n inputStyle: 'ghost',\n inputColor: 'gray',\n class: 'border-b-input-gray',\n },\n { chrome: 'inset', inputColor: 'brand', class: 'border-b-input' },\n { chrome: 'inset', inputColor: 'gray', class: 'border-b-input-gray' },\n ],\n },\n)\n\n// The group carries the box + focus/invalid states; inputs inside are\n// chrome-less (variant=\"none\"). Style follows the enclosing Field's knobs,\n// else the <Theme> input-style/input-color knobs.\nfunction InputGroup({ className, ...props }: React.ComponentProps<'div'>) {\n const field = useFieldContext()\n const theme = useTheme()\n const inputStyle = field?.inputStyle ?? theme.inputStyle ?? 'soft'\n const inputColor = field?.inputColor ?? theme.inputColor ?? 'brand'\n const chrome = field?.labelPosition === 'inset' ? 'inset' : 'box'\n return (\n <div\n data-slot=\"input-group\"\n role=\"group\"\n className={cn(\n inputGroupVariants({ chrome, inputStyle, inputColor }),\n className,\n )}\n {...props}\n />\n )\n}\n\nconst inputGroupAddonVariants = cva(\n 'flex h-auto cursor-text items-center justify-center gap-2 py-2 text-sm font-medium text-gray-light select-none [&_svg:not([class*=size-])]:size-4',\n {\n variants: {\n align: {\n // button addons bring their own inner padding — pull them halfway\n // into the group's px so the visual gap matches the text side\n 'inline-start': 'order-first has-[>button]:-ml-2',\n 'inline-end': 'order-last has-[>button]:-mr-2',\n },\n },\n defaultVariants: {\n align: 'inline-start',\n },\n },\n)\n\nfunction InputGroupAddon({\n className,\n align = 'inline-start',\n ...props\n}: React.ComponentProps<'div'> & VariantProps<typeof inputGroupAddonVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"input-group-addon\"\n data-align={align}\n className={cn(inputGroupAddonVariants({ align }), className)}\n onClick={(event) => {\n if ((event.target as HTMLElement).closest('button')) return\n event.currentTarget.parentElement?.querySelector('input')?.focus()\n }}\n {...props}\n />\n )\n}\n\nfunction InputGroupText({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n className={cn(\n 'flex items-center gap-2 text-xs text-gray-light [&_svg]:pointer-events-none [&_svg:not([class*=size-])]:size-4',\n className,\n )}\n {...props}\n />\n )\n}\n\nconst InputGroupInput = React.forwardRef<HTMLInputElement, InputProps>(\n function InputGroupInput({ className, ...props }, ref) {\n return (\n <Input\n data-slot=\"input\"\n variant=\"none\"\n className={cn('flex-1', className)}\n ref={ref}\n {...props}\n />\n )\n },\n)\n\nexport { InputGroup, InputGroupAddon, InputGroupInput, InputGroupText }\n"],"mappings":";;;;;;;;;;AASA,MAAM,QACJ;AAEF,MAAM,qBAAqB,IACzB,oKACA;CACE,UAAU;EACR,QAAQ;GAGN,OAAO;GAEP,KAAK;EACP;EACA,YAAY;GAAE,MAAM;GAAI,SAAS;GAAI,UAAU;GAAI,OAAO;EAAG;EAC7D,YAAY;GAAE,OAAO;GAAI,MAAM;EAAG;CACpC;CACA,kBAAkB;EAChB;GACE,QAAQ;GACR,YAAY;GAEZ,OACE;EACJ;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OACE;EACJ;EACA;GACE,Q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G,wBAAwB,EAAE,MAAM,CAAC,GAAG,SAAS;EAC3D,UAAU,UAAU;GAClB,IAAK,MAAM,OAAuB,QAAQ,QAAQ,GAAG;GACrD,MAAM,cAAc,eAAe,cAAc,OAAO,GAAG,MAAM;EACnE;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,eAAe,EAAE,WAAW,GAAG,SAAuC;CAC7E,OACE,oBAAC,QAAD;EACE,WAAW,GACT,kHACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,MAAM,kBAAkBA,QAAM,WAC5B,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAS,KAAK;CACrD,OACE,oBAAC,OAAD;EACE,aAAU;EACV,SAAQ;EACR,WAAW,GAAG,UAAU,SAAS;EAC5B;EACL,GAAI;CACL,CAAA;AAEL,CACF"}
1
+ {"version":3,"file":"input-group.js","names":["React"],"sources":["../../src/components/input-group.tsx"],"sourcesContent":["'use client'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\nimport { cn } from '../utils/cn'\nimport { useFieldContext } from './field'\nimport { Input, type InputProps } from './input'\nimport { useTheme } from './theme'\n\nconst GHOST =\n 'rounded-none border-0 border-b-2 px-0 focus-within:border-b-input-active has-[[data-slot=input][aria-invalid=true]]:border-b-input-invalid has-[[data-slot=input][aria-invalid=true]]:focus-within:border-b-red-a8! group-data-[invalid=true]/field:border-b-input-invalid! group-data-[invalid=true]/field:focus-within:border-b-red-a8!'\n\nconst inputGroupVariants = cva(\n 'group/input-group relative flex h-10 w-full min-w-0 items-center gap-2 bg-transparent transition-[color,border-color] outline-none motion-reduce:transition-none',\n {\n variants: {\n chrome: {\n // inside an inset field the shell is the box; the group keeps the\n // classic underline (inputs inside stay chrome-less)\n inset: GHOST,\n // h-11 matches the standalone Input box\n box: 'h-11 rounded-lg px-3 transition-all motion-reduce:transition-none',\n },\n inputStyle: { soft: '', surface: '', outlined: '', ghost: '' },\n inputColor: { brand: '', gray: '' },\n },\n compoundVariants: [\n {\n chrome: 'box',\n inputStyle: 'soft',\n // invalid hover deepens the error tint instead of the accent hover\n class:\n 'group-data-[invalid=true]/field:bg-base-error-soft focus-within:ring-2 focus-within:ring-offset-2 group-data-[invalid=true]/field:focus-within:ring-red-a8 has-[[data-slot=input][aria-invalid=true]]:bg-base-error-soft has-[[data-slot=input][aria-invalid=true]]:focus-within:ring-red-a8 has-[[data-slot=input][aria-invalid=true]:not(:disabled)]:hover:bg-red-a4 group-data-[invalid=true]/field:has-[input:not(:disabled)]:hover:bg-red-a4',\n },\n {\n chrome: 'box',\n inputStyle: 'soft',\n inputColor: 'brand',\n class:\n 'bg-input-base focus-within:ring-input-active has-[input:not(:disabled)]:hover:bg-input-base-hover',\n },\n {\n chrome: 'box',\n inputStyle: 'soft',\n inputColor: 'gray',\n class:\n 'bg-base-gray-soft focus-within:ring-gray-a8 has-[input:not(:disabled)]:hover:bg-gray-a4',\n },\n {\n chrome: 'box',\n inputStyle: ['surface', 'outlined'],\n class:\n 'border group-data-[invalid=true]/field:border-input-invalid focus-within:ring-1 group-data-[invalid=true]/field:focus-within:border-input-invalid! group-data-[invalid=true]/field:focus-within:ring-red-a4! has-[[data-slot=input][aria-invalid=true]]:border-input-invalid has-[[data-slot=input][aria-invalid=true]]:focus-within:border-input-invalid! has-[[data-slot=input][aria-invalid=true]]:focus-within:ring-red-a4!',\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'brand',\n class:\n 'border-input bg-base-accent-surface focus-within:border-input-active focus-within:ring-spark-a4',\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'gray',\n class:\n 'border-input-gray bg-base-gray-surface focus-within:border-gray-a8 focus-within:ring-gray-a4',\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'brand',\n class:\n 'border-input focus-within:border-input-active focus-within:ring-spark-a4',\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'gray',\n class:\n 'border-input-gray focus-within:border-gray-a8 focus-within:ring-gray-a4',\n },\n { chrome: 'box', inputStyle: 'ghost', class: GHOST },\n {\n chrome: 'box',\n inputStyle: 'ghost',\n inputColor: 'brand',\n class: 'border-b-input',\n },\n {\n chrome: 'box',\n inputStyle: 'ghost',\n inputColor: 'gray',\n class: 'border-b-input-gray',\n },\n { chrome: 'inset', inputColor: 'brand', class: 'border-b-input' },\n { chrome: 'inset', inputColor: 'gray', class: 'border-b-input-gray' },\n ],\n },\n)\n\n// The group carries the box + focus/invalid states; inputs inside are\n// chrome-less (variant=\"none\"). Style follows the enclosing Field's knobs,\n// else the <Theme> input-style/input-color knobs.\nfunction InputGroup({ className, ...props }: React.ComponentProps<'div'>) {\n const field = useFieldContext()\n const theme = useTheme()\n const inputStyle = field?.inputStyle ?? theme.inputStyle ?? 'soft'\n const inputColor = field?.inputColor ?? theme.inputColor ?? 'brand'\n const chrome = field?.labelPosition === 'inset' ? 'inset' : 'box'\n return (\n <div\n data-slot=\"input-group\"\n role=\"group\"\n className={cn(\n inputGroupVariants({ chrome, inputStyle, inputColor }),\n className,\n )}\n {...props}\n />\n )\n}\n\nconst inputGroupAddonVariants = cva(\n 'flex h-auto cursor-text items-center justify-center gap-2 py-2 text-sm font-medium text-gray-light select-none [&_svg:not([class*=size-])]:size-4',\n {\n variants: {\n align: {\n // button addons bring their own inner padding — pull them halfway\n // into the group's px so the visual gap matches the text side\n 'inline-start': 'order-first has-[>button]:-ml-2',\n 'inline-end': 'order-last has-[>button]:-mr-2',\n },\n },\n defaultVariants: {\n align: 'inline-start',\n },\n },\n)\n\nfunction InputGroupAddon({\n className,\n align = 'inline-start',\n ...props\n}: React.ComponentProps<'div'> & VariantProps<typeof inputGroupAddonVariants>) {\n return (\n <div\n // chrome, not a control: the click only forwards focus to the input the\n // way a label would, and Tab already reaches that input directly\n role=\"presentation\"\n data-slot=\"input-group-addon\"\n data-align={align}\n className={cn(inputGroupAddonVariants({ align }), className)}\n onClick={(event) => {\n if ((event.target as HTMLElement).closest('button')) return\n event.currentTarget.parentElement?.querySelector('input')?.focus()\n }}\n {...props}\n />\n )\n}\n\nfunction InputGroupText({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n className={cn(\n 'flex items-center gap-2 text-xs text-gray-light [&_svg]:pointer-events-none [&_svg:not([class*=size-])]:size-4',\n className,\n )}\n {...props}\n />\n )\n}\n\nconst InputGroupInput = React.forwardRef<HTMLInputElement, InputProps>(\n function InputGroupInput({ className, ...props }, ref) {\n return (\n <Input\n data-slot=\"input\"\n variant=\"none\"\n className={cn('flex-1', className)}\n ref={ref}\n {...props}\n />\n )\n },\n)\n\nexport { InputGroup, InputGroupAddon, InputGroupInput, InputGroupText }\n"],"mappings":";;;;;;;;;;AASA,MAAM,QACJ;AAEF,MAAM,qBAAqB,IACzB,oKACA;CACE,UAAU;EACR,QAAQ;GAGN,OAAO;GAEP,KAAK;EACP;EACA,YAAY;GAAE,MAAM;GAAI,SAAS;GAAI,UAAU;GAAI,OAAO;EAAG;EAC7D,YAAY;GAAE,OAAO;GAAI,MAAM;EAAG;CACpC;CACA,kBAAkB;EAChB;GACE,QAAQ;GACR,YAAY;GAEZ,OACE;EACJ;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OACE;EACJ;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OACE;EACJ;EACA;GACE,QAAQ;GACR,YAAY,CAAC,WAAW,UAAU;GAClC,OACE;EACJ;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OACE;EACJ;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OACE;EACJ;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OACE;EACJ;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OACE;EACJ;EACA;GAAE,QAAQ;GAAO,YAAY;GAAS,OAAO;EAAM;EACnD;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAO;EACT;EACA;GACE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GAAG,UAAU,SAAS;EAC5B;EACL,GAAI;CACL,CAAA;AAEL,CACF"}
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import { i as SparkInputStyle } from "../theme-types-1yB0d8mp.cjs";
3
+ import { a as SparkInputStyle } from "../theme-types-Bn5E15-P.cjs";
4
4
  import * as React$1 from "react";
5
5
 
6
6
  //#region src/components/input.d.ts
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import { i as SparkInputStyle } from "../theme-types-1yB0d8mp.js";
3
+ import { a as SparkInputStyle } from "../theme-types-Bn5E15-P.js";
4
4
  import * as React$1 from "react";
5
5
 
6
6
  //#region src/components/input.d.ts
@@ -5,8 +5,8 @@ const require_hooks_use_chart_zoom = require("../hooks/use-chart-zoom.cjs");
5
5
  const require_hooks_use_reduced_motion = require("../hooks/use-reduced-motion.cjs");
6
6
  const require_utils_format = require("../utils/format.cjs");
7
7
  const require_utils_chart_scale = require("../utils/chart-scale.cjs");
8
- const require_utils_chart_time_ticks = require("../utils/chart-time-ticks.cjs");
9
8
  const require_components_chart = require("./chart.cjs");
9
+ const require_utils_chart_time_ticks = require("../utils/chart-time-ticks.cjs");
10
10
  let react = require("react");
11
11
  react = require_chunk.__toESM(react);
12
12
  let react_jsx_runtime = require("react/jsx-runtime");
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import { useAnimatedChartDomain, useChartZoom } from "../hooks/use-chart-zoom.js";
3
3
  import { useReducedMotion } from "../hooks/use-reduced-motion.js";
4
+ import { cn } from "../utils/cn.js";
4
5
  import { localeNumberFormat } from "../utils/format.js";
5
6
  import { buildYAxisScale, formatYAxisTick } from "../utils/chart-scale.js";
6
- import { buildTimeTicks } from "../utils/chart-time-ticks.js";
7
- import { cn } from "../utils/cn.js";
8
7
  import { ChartTooltipCard, ChartZoomResetButton, clampTooltipPosition, useMeasuredSize } from "./chart.js";
8
+ import { buildTimeTicks } from "../utils/chart-time-ticks.js";
9
9
  import * as React$1 from "react";
10
10
  import { useCallback, useMemo } from "react";
11
11
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import { n as SparkCardVariant, t as SparkCardColor } from "../theme-types-1yB0d8mp.cjs";
3
+ import { n as SparkCardColor, r as SparkCardVariant } from "../theme-types-Bn5E15-P.cjs";
4
4
  import { ContainerRadius } from "../lib/container-chrome.cjs";
5
5
  import * as React$1 from "react";
6
6
  import { useRender } from "@base-ui/react/use-render";
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import { n as SparkCardVariant, t as SparkCardColor } from "../theme-types-1yB0d8mp.js";
3
+ import { n as SparkCardColor, r as SparkCardVariant } from "../theme-types-Bn5E15-P.js";
4
4
  import { ContainerRadius } from "../lib/container-chrome.js";
5
5
  import * as React$1 from "react";
6
6
  import { useRender } from "@base-ui/react/use-render";
@@ -6,7 +6,7 @@ import { useRender } from "@base-ui/react/use-render";
6
6
 
7
7
  //#region src/components/marker.d.ts
8
8
  declare const markerVariants: (props?: ({
9
- variant?: "default" | "separator" | "border" | null | undefined;
9
+ variant?: "separator" | "default" | "border" | null | undefined;
10
10
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
11
11
  declare function Marker({
12
12
  className,
@@ -6,7 +6,7 @@ import { useRender } from "@base-ui/react/use-render";
6
6
 
7
7
  //#region src/components/marker.d.ts
8
8
  declare const markerVariants: (props?: ({
9
- variant?: "default" | "separator" | "border" | null | undefined;
9
+ variant?: "separator" | "default" | "border" | null | undefined;
10
10
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
11
11
  declare function Marker({
12
12
  className,
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const require_chunk = require("../chunk-DY84GLCh.cjs");
4
- const require_lib_accent_colors = require("../lib/accent-colors.cjs");
5
4
  const require_icons_material_symbol = require("../icons/material-symbol.cjs");
5
+ const require_lib_accent_colors = require("../lib/accent-colors.cjs");
6
6
  let react = require("react");
7
7
  react = require_chunk.__toESM(react);
8
8
  let react_jsx_runtime = require("react/jsx-runtime");
@@ -17,24 +17,31 @@ const Pill = react.forwardRef(function Pill({ className, children, styleVariant,
17
17
  const clickable = !disabled && onClick !== void 0;
18
18
  const removable = !disabled && onRemove !== void 0;
19
19
  const focusable = clickable || removable;
20
+ const hasLook = styleVariant !== void 0 || color !== void 0;
21
+ const handleKeyDown = (event) => {
22
+ onKeyDown?.(event);
23
+ if (clickable && (event.key === "Enter" || event.key === " ")) {
24
+ if (event.key === " ") event.preventDefault();
25
+ onClick?.(event);
26
+ }
27
+ if (removable && (event.key === "Delete" || event.key === "Backspace")) onRemove?.(event);
28
+ };
29
+ const interaction = {
30
+ onKeyDown: handleKeyDown,
31
+ ...clickable && {
32
+ role: "button",
33
+ onClick
34
+ },
35
+ ...focusable && { tabIndex: 0 }
36
+ };
20
37
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
21
38
  "aria-disabled": disabled || void 0,
22
39
  "aria-keyshortcuts": removable ? "Delete" : void 0,
23
40
  "data-slot": "pill",
24
- "data-style": styleVariant !== void 0 || color !== void 0 ? styleVariant ?? "soft" : void 0,
41
+ "data-style": hasLook ? styleVariant ?? "soft" : void 0,
25
42
  "data-accent-color": color ? require_lib_accent_colors.accentByColor[color] : void 0,
26
- onClick: clickable ? onClick : void 0,
27
- onKeyDown: (event) => {
28
- onKeyDown?.(event);
29
- if (clickable && (event.key === "Enter" || event.key === " ")) {
30
- if (event.key === " ") event.preventDefault();
31
- onClick?.(event);
32
- }
33
- if (removable && (event.key === "Delete" || event.key === "Backspace")) onRemove?.(event);
34
- },
43
+ ...interaction,
35
44
  ref,
36
- role: clickable ? "button" : void 0,
37
- tabIndex: focusable ? 0 : void 0,
38
45
  className: (0, cnfast.cn)("inline-flex h-7 items-center gap-1 rounded-full px-2.5 text-xs font-medium select-none", "bg-(--spark-style-bg,var(--neutral-a3)) text-(--spark-style-fg,var(--neutral-a11))", focusable && "transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden motion-reduce:transition-none", clickable && "cursor-pointer hover:bg-(--spark-style-bg-hover)", disabled && "pointer-events-none opacity-50", className),
39
46
  ...props,
40
47
  children: [children, removable ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
@@ -1 +1 @@
1
- {"version":3,"file":"pill.cjs","names":["React","accentByColor","MaterialSymbol"],"sources":["../../src/components/pill.tsx"],"sourcesContent":["import * as React from 'react'\nimport { MaterialSymbol } from '../icons/material-symbol'\nimport { accentByColor } from '../lib/accent-colors'\nimport type { SparkAccentColor } from '../lib/accent-colors'\nimport type { SparkStyle } from '../lib/theme-types'\nimport { cn } from '../utils/cn'\n\ntype PillRemoveProps =\n | { onRemove?: undefined; removeLabel?: string }\n | {\n /** Fires on a pointer click of the (decorative) glyph, or Delete/Backspace while the pill has focus. */\n onRemove: (event: React.SyntheticEvent) => void\n /** Visually-hidden text folded into the pill's accessible name -- the glyph itself is `aria-hidden`. */\n removeLabel: string\n }\n\ntype PillProps = Omit<React.HTMLAttributes<HTMLSpanElement>, 'onClick'> &\n PillRemoveProps & {\n styleVariant?: SparkStyle\n color?: SparkAccentColor\n disabled?: boolean\n onClick?: (event: React.SyntheticEvent<HTMLSpanElement>) => void\n }\n\n/**\n * Like Badge, but interactive: `onClick` makes the whole pill a button\n * (Enter/Space), `onRemove` adds a Delete/Backspace-and-click affordance.\n * Both are optional -- with neither, it's a static label.\n */\nconst Pill = React.forwardRef<HTMLSpanElement, PillProps>(function Pill(\n {\n className,\n children,\n styleVariant,\n color,\n disabled = false,\n onClick,\n onRemove,\n removeLabel,\n onKeyDown,\n ...props\n },\n ref,\n) {\n const clickable = !disabled && onClick !== undefined\n const removable = !disabled && onRemove !== undefined\n const focusable = clickable || removable\n const hasLook = styleVariant !== undefined || color !== undefined\n\n return (\n <span\n aria-disabled={disabled || undefined}\n aria-keyshortcuts={removable ? 'Delete' : undefined}\n data-slot=\"pill\"\n data-style={hasLook ? (styleVariant ?? 'soft') : undefined}\n data-accent-color={color ? accentByColor[color] : undefined}\n onClick={clickable ? onClick : undefined}\n onKeyDown={(event) => {\n onKeyDown?.(event)\n if (clickable && (event.key === 'Enter' || event.key === ' ')) {\n if (event.key === ' ') event.preventDefault()\n onClick?.(event)\n }\n if (\n removable &&\n (event.key === 'Delete' || event.key === 'Backspace')\n ) {\n onRemove?.(event)\n }\n }}\n ref={ref}\n role={clickable ? 'button' : undefined}\n tabIndex={focusable ? 0 : undefined}\n className={cn(\n 'inline-flex h-7 items-center gap-1 rounded-full px-2.5 text-xs font-medium select-none',\n 'bg-(--spark-style-bg,var(--neutral-a3)) text-(--spark-style-fg,var(--neutral-a11))',\n focusable &&\n 'transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden motion-reduce:transition-none',\n clickable && 'cursor-pointer hover:bg-(--spark-style-bg-hover)',\n disabled && 'pointer-events-none opacity-50',\n className,\n )}\n {...props}\n >\n {children}\n {removable ? (\n <>\n {/* aria-hidden hides the glyph itself; this carries removeLabel into the pill's own accessible name */}\n <span className=\"sr-only\">{removeLabel}</span>\n <span\n aria-hidden=\"true\"\n data-slot=\"pill-remove\"\n onClick={(event) => {\n event.stopPropagation()\n onRemove?.(event)\n }}\n className=\"-mr-1 inline-flex size-4 shrink-0 items-center justify-center rounded-full transition-colors hover:bg-(--spark-style-bg-hover) motion-reduce:transition-none\"\n >\n <MaterialSymbol className=\"[--spark-icon-size:14px]\" name=\"close\" />\n </span>\n </>\n ) : null}\n </span>\n )\n})\n\nPill.displayName = 'Pill'\n\nexport { Pill }\nexport type { PillProps }\n"],"mappings":";;;;;;;;;;;;;;;AA6BA,MAAM,OAAOA,MAAM,WAAuC,SAAS,KACjE,EACE,WACA,UACA,cACA,OACA,WAAW,OACX,SACA,UACA,aACA,WACA,GAAG,SAEL,KACA;CACA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":["React","accentByColor","MaterialSymbol"],"sources":["../../src/components/pill.tsx"],"sourcesContent":["import * as React from 'react'\nimport { MaterialSymbol } from '../icons/material-symbol'\nimport { accentByColor } from '../lib/accent-colors'\nimport type { SparkAccentColor } from '../lib/accent-colors'\nimport type { SparkStyle } from '../lib/theme-types'\nimport { cn } from '../utils/cn'\n\ntype PillRemoveProps =\n | { onRemove?: undefined; removeLabel?: string }\n | {\n /** Fires on a pointer click of the (decorative) glyph, or Delete/Backspace while the pill has focus. */\n onRemove: (event: React.SyntheticEvent) => void\n /** Visually-hidden text folded into the pill's accessible name -- the glyph itself is `aria-hidden`. */\n removeLabel: string\n }\n\ntype PillProps = Omit<React.HTMLAttributes<HTMLSpanElement>, 'onClick'> &\n PillRemoveProps & {\n styleVariant?: SparkStyle\n color?: SparkAccentColor\n disabled?: boolean\n onClick?: (event: React.SyntheticEvent<HTMLSpanElement>) => void\n }\n\n/**\n * Like Badge, but interactive: `onClick` makes the whole pill a button\n * (Enter/Space), `onRemove` adds a Delete/Backspace-and-click affordance.\n * Both are optional -- with neither, it's a static label.\n */\nconst Pill = React.forwardRef<HTMLSpanElement, PillProps>(function Pill(\n {\n className,\n children,\n styleVariant,\n color,\n disabled = false,\n onClick,\n onRemove,\n removeLabel,\n onKeyDown,\n ...props\n },\n ref,\n) {\n const clickable = !disabled && onClick !== undefined\n const removable = !disabled && onRemove !== undefined\n const focusable = clickable || removable\n const hasLook = styleVariant !== undefined || color !== undefined\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLSpanElement>) => {\n onKeyDown?.(event)\n if (clickable && (event.key === 'Enter' || event.key === ' ')) {\n if (event.key === ' ') event.preventDefault()\n onClick?.(event)\n }\n if (removable && (event.key === 'Delete' || event.key === 'Backspace')) {\n onRemove?.(event)\n }\n }\n\n // button role and click handler travel together, so a clickable pill always\n // answers Enter/Space; a removable-only pill stays generic and answers Delete\n const interaction = {\n onKeyDown: handleKeyDown,\n ...(clickable && { role: 'button' as const, onClick }),\n ...(focusable && { tabIndex: 0 }),\n }\n\n return (\n <span\n aria-disabled={disabled || undefined}\n aria-keyshortcuts={removable ? 'Delete' : undefined}\n data-slot=\"pill\"\n data-style={hasLook ? (styleVariant ?? 'soft') : undefined}\n data-accent-color={color ? accentByColor[color] : undefined}\n {...interaction}\n ref={ref}\n className={cn(\n 'inline-flex h-7 items-center gap-1 rounded-full px-2.5 text-xs font-medium select-none',\n 'bg-(--spark-style-bg,var(--neutral-a3)) text-(--spark-style-fg,var(--neutral-a11))',\n focusable &&\n 'transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden motion-reduce:transition-none',\n clickable && 'cursor-pointer hover:bg-(--spark-style-bg-hover)',\n disabled && 'pointer-events-none opacity-50',\n className,\n )}\n {...props}\n >\n {children}\n {removable ? (\n <>\n {/* aria-hidden hides the glyph itself; this carries removeLabel into the pill's own accessible name */}\n <span className=\"sr-only\">{removeLabel}</span>\n <span\n aria-hidden=\"true\"\n data-slot=\"pill-remove\"\n onClick={(event) => {\n event.stopPropagation()\n onRemove?.(event)\n }}\n className=\"-mr-1 inline-flex size-4 shrink-0 items-center justify-center rounded-full transition-colors hover:bg-(--spark-style-bg-hover) motion-reduce:transition-none\"\n >\n <MaterialSymbol className=\"[--spark-icon-size:14px]\" name=\"close\" />\n </span>\n </>\n ) : null}\n </span>\n )\n})\n\nPill.displayName = 'Pill'\n\nexport { Pill }\nexport type { PillProps }\n"],"mappings":";;;;;;;;;;;;;;;AA6BA,MAAM,OAAOA,MAAM,WAAuC,SAAS,KACjE,EACE,WACA,UACA,cACA,OACA,WAAW,OACX,SACA,UACA,aACA,WACA,GAAG,SAEL,KACA;CACA,MAAM,YAAY,CAAC,YAAY,YAAY,KAAA;CAC3C,MAAM,YAAY,CAAC,YAAY,aAAa,KAAA;CAC5C,MAAM,YAAY,aAAa;CAC/B,MAAM,UAAU,iBAAiB,KAAA,KAAa,UAAU,KAAA;CAExD,MAAM,iBAAiB,UAAgD;EACrE,YAAY,KAAK;EACjB,IAAI,cAAc,MAAM,QAAQ,WAAW,MAAM,QAAQ,MAAM;GAC7D,IAAI,MAAM,QAAQ,KAAK,MAAM,eAAe;GAC5C,UAAU,KAAK;EACjB;EACA,IAAI,cAAc,MAAM,QAAQ,YAAY,MAAM,QAAQ,cACxD,WAAW,KAAK;CAEpB;CAIA,MAAM,cAAc;EAClB,WAAW;EACX,GAAI,aAAa;GAAE,MAAM;GAAmB;EAAQ;EACpD,GAAI,aAAa,EAAE,UAAU,EAAE;CACjC;CAEA,OACE,iBAAA,GAAA,kBAAA,MAAC,QAAD;EACE,iBAAe,YAAY,KAAA;EAC3B,qBAAmB,YAAY,WAAW,KAAA;EAC1C,aAAU;EACV,cAAY,UAAW,gBAAgB,SAAU,KAAA;EACjD,qBAAmB,QAAQC,0BAAAA,cAAc,SAAS,KAAA;EAClD,GAAI;EACC;EACL,YAAA,GAAA,OAAA,IACE,0FACA,sFACA,aACE,iIACF,aAAa,oDACb,YAAY,kCACZ,SACF;EACA,GAAI;YAjBN,CAmBG,UACA,YACC,iBAAA,GAAA,kBAAA,MAAA,kBAAA,UAAA,EAAA,UAAA,CAEE,iBAAA,GAAA,kBAAA,KAAC,QAAD;GAAM,WAAU;aAAW;EAAkB,CAAA,GAC7C,iBAAA,GAAA,kBAAA,KAAC,QAAD;GACE,eAAY;GACZ,aAAU;GACV,UAAU,UAAU;IAClB,MAAM,gBAAgB;IACtB,WAAW,KAAK;GAClB;GACA,WAAU;aAEV,iBAAA,GAAA,kBAAA,KAACC,8BAAAA,gBAAD;IAAgB,WAAU;IAA2B,MAAK;GAAS,CAAA;EAC/D,CAAA,CACN,EAAA,CAAA,IACA,IACA;;AAEV,CAAC;AAED,KAAK,cAAc"}
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import { u as SparkStyle } from "../theme-types-1yB0d8mp.cjs";
3
+ import { f as SparkStyle } from "../theme-types-Bn5E15-P.cjs";
4
4
  import { SparkAccentColor } from "../lib/accent-colors.cjs";
5
5
  import * as React$1 from "react";
6
6
 
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import { u as SparkStyle } from "../theme-types-1yB0d8mp.js";
3
+ import { f as SparkStyle } from "../theme-types-Bn5E15-P.js";
4
4
  import { SparkAccentColor } from "../lib/accent-colors.js";
5
5
  import * as React$1 from "react";
6
6
 
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { cn } from "../utils/cn.js";
3
- import { accentByColor } from "../lib/accent-colors.js";
4
3
  import { MaterialSymbol } from "../icons/material-symbol.js";
4
+ import { accentByColor } from "../lib/accent-colors.js";
5
5
  import * as React$1 from "react";
6
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
7
  //#region src/components/pill.tsx
@@ -14,24 +14,31 @@ const Pill = React$1.forwardRef(function Pill({ className, children, styleVarian
14
14
  const clickable = !disabled && onClick !== void 0;
15
15
  const removable = !disabled && onRemove !== void 0;
16
16
  const focusable = clickable || removable;
17
+ const hasLook = styleVariant !== void 0 || color !== void 0;
18
+ const handleKeyDown = (event) => {
19
+ onKeyDown?.(event);
20
+ if (clickable && (event.key === "Enter" || event.key === " ")) {
21
+ if (event.key === " ") event.preventDefault();
22
+ onClick?.(event);
23
+ }
24
+ if (removable && (event.key === "Delete" || event.key === "Backspace")) onRemove?.(event);
25
+ };
26
+ const interaction = {
27
+ onKeyDown: handleKeyDown,
28
+ ...clickable && {
29
+ role: "button",
30
+ onClick
31
+ },
32
+ ...focusable && { tabIndex: 0 }
33
+ };
17
34
  return /* @__PURE__ */ jsxs("span", {
18
35
  "aria-disabled": disabled || void 0,
19
36
  "aria-keyshortcuts": removable ? "Delete" : void 0,
20
37
  "data-slot": "pill",
21
- "data-style": styleVariant !== void 0 || color !== void 0 ? styleVariant ?? "soft" : void 0,
38
+ "data-style": hasLook ? styleVariant ?? "soft" : void 0,
22
39
  "data-accent-color": color ? accentByColor[color] : void 0,
23
- onClick: clickable ? onClick : void 0,
24
- onKeyDown: (event) => {
25
- onKeyDown?.(event);
26
- if (clickable && (event.key === "Enter" || event.key === " ")) {
27
- if (event.key === " ") event.preventDefault();
28
- onClick?.(event);
29
- }
30
- if (removable && (event.key === "Delete" || event.key === "Backspace")) onRemove?.(event);
31
- },
40
+ ...interaction,
32
41
  ref,
33
- role: clickable ? "button" : void 0,
34
- tabIndex: focusable ? 0 : void 0,
35
42
  className: cn("inline-flex h-7 items-center gap-1 rounded-full px-2.5 text-xs font-medium select-none", "bg-(--spark-style-bg,var(--neutral-a3)) text-(--spark-style-fg,var(--neutral-a11))", focusable && "transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden motion-reduce:transition-none", clickable && "cursor-pointer hover:bg-(--spark-style-bg-hover)", disabled && "pointer-events-none opacity-50", className),
36
43
  ...props,
37
44
  children: [children, removable ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
@@ -1 +1 @@
1
- {"version":3,"file":"pill.js","names":["React"],"sources":["../../src/components/pill.tsx"],"sourcesContent":["import * as React from 'react'\nimport { MaterialSymbol } from '../icons/material-symbol'\nimport { accentByColor } from '../lib/accent-colors'\nimport type { SparkAccentColor } from '../lib/accent-colors'\nimport type { SparkStyle } from '../lib/theme-types'\nimport { cn } from '../utils/cn'\n\ntype PillRemoveProps =\n | { onRemove?: undefined; removeLabel?: string }\n | {\n /** Fires on a pointer click of the (decorative) glyph, or Delete/Backspace while the pill has focus. */\n onRemove: (event: React.SyntheticEvent) => void\n /** Visually-hidden text folded into the pill's accessible name -- the glyph itself is `aria-hidden`. */\n removeLabel: string\n }\n\ntype PillProps = Omit<React.HTMLAttributes<HTMLSpanElement>, 'onClick'> &\n PillRemoveProps & {\n styleVariant?: SparkStyle\n color?: SparkAccentColor\n disabled?: boolean\n onClick?: (event: React.SyntheticEvent<HTMLSpanElement>) => void\n }\n\n/**\n * Like Badge, but interactive: `onClick` makes the whole pill a button\n * (Enter/Space), `onRemove` adds a Delete/Backspace-and-click affordance.\n * Both are optional -- with neither, it's a static label.\n */\nconst Pill = React.forwardRef<HTMLSpanElement, PillProps>(function Pill(\n {\n className,\n children,\n styleVariant,\n color,\n disabled = false,\n onClick,\n onRemove,\n removeLabel,\n onKeyDown,\n ...props\n },\n ref,\n) {\n const clickable = !disabled && onClick !== undefined\n const removable = !disabled && onRemove !== undefined\n const focusable = clickable || removable\n const hasLook = styleVariant !== undefined || color !== undefined\n\n return (\n <span\n aria-disabled={disabled || undefined}\n aria-keyshortcuts={removable ? 'Delete' : undefined}\n data-slot=\"pill\"\n data-style={hasLook ? (styleVariant ?? 'soft') : undefined}\n data-accent-color={color ? accentByColor[color] : undefined}\n onClick={clickable ? onClick : undefined}\n onKeyDown={(event) => {\n onKeyDown?.(event)\n if (clickable && (event.key === 'Enter' || event.key === ' ')) {\n if (event.key === ' ') event.preventDefault()\n onClick?.(event)\n }\n if (\n removable &&\n (event.key === 'Delete' || event.key === 'Backspace')\n ) {\n onRemove?.(event)\n }\n }}\n ref={ref}\n role={clickable ? 'button' : undefined}\n tabIndex={focusable ? 0 : undefined}\n className={cn(\n 'inline-flex h-7 items-center gap-1 rounded-full px-2.5 text-xs font-medium select-none',\n 'bg-(--spark-style-bg,var(--neutral-a3)) text-(--spark-style-fg,var(--neutral-a11))',\n focusable &&\n 'transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden motion-reduce:transition-none',\n clickable && 'cursor-pointer hover:bg-(--spark-style-bg-hover)',\n disabled && 'pointer-events-none opacity-50',\n className,\n )}\n {...props}\n >\n {children}\n {removable ? (\n <>\n {/* aria-hidden hides the glyph itself; this carries removeLabel into the pill's own accessible name */}\n <span className=\"sr-only\">{removeLabel}</span>\n <span\n aria-hidden=\"true\"\n data-slot=\"pill-remove\"\n onClick={(event) => {\n event.stopPropagation()\n onRemove?.(event)\n }}\n className=\"-mr-1 inline-flex size-4 shrink-0 items-center justify-center rounded-full transition-colors hover:bg-(--spark-style-bg-hover) motion-reduce:transition-none\"\n >\n <MaterialSymbol className=\"[--spark-icon-size:14px]\" name=\"close\" />\n </span>\n </>\n ) : null}\n </span>\n )\n})\n\nPill.displayName = 'Pill'\n\nexport { Pill }\nexport type { PillProps }\n"],"mappings":";;;;;;;;;;;;AA6BA,MAAM,OAAOA,QAAM,WAAuC,SAAS,KACjE,EACE,WACA,UACA,cACA,OACA,WAAW,OACX,SACA,UACA,aACA,WACA,GAAG,SAEL,KACA;CACA,MAAM,YAAY,CAAC,YAAY,YAAY,KAAA;CAC3C,MAAM,YAAY,CAAC,YAAY,aAAa,KAAA;CAC5C,MAAM,YAAY,aAAa;CAG/B,OACE,qBAAC,QAAD;EACE,iBAAe,YAAY,KAAA;EAC3B,qBAAmB,YAAY,WAAW,KAAA;EAC1C,aAAU;EACV,cAPY,iBAAiB,KAAA,KAAa,UAAU,KAAA,IAO7B,gBAAgB,SAAU,KAAA;EACjD,qBAAmB,QAAQ,cAAc,SAAS,KAAA;EAClD,SAAS,YAAY,UAAU,KAAA;EAC/B,YAAY,UAAU;GACpB,YAAY,KAAK;GACjB,IAAI,cAAc,MAAM,QAAQ,WAAW,MAAM,QAAQ,MAAM;IAC7D,IAAI,MAAM,QAAQ,KAAK,MAAM,eAAe;IAC5C,UAAU,KAAK;GACjB;GACA,IACE,cACC,MAAM,QAAQ,YAAY,MAAM,QAAQ,cAEzC,WAAW,KAAK;EAEpB;EACK;EACL,MAAM,YAAY,WAAW,KAAA;EAC7B,UAAU,YAAY,IAAI,KAAA;EAC1B,WAAW,GACT,0FACA,sFACA,aACE,iIACF,aAAa,oDACb,YAAY,kCACZ,SACF;EACA,GAAI;YAhCN,CAkCG,UACA,YACC,qBAAA,UAAA,EAAA,UAAA,CAEE,oBAAC,QAAD;GAAM,WAAU;aAAW;EAAkB,CAAA,GAC7C,oBAAC,QAAD;GACE,eAAY;GACZ,aAAU;GACV,UAAU,UAAU;IAClB,MAAM,gBAAgB;IACtB,WAAW,KAAK;GAClB;GACA,WAAU;aAEV,oBAAC,gBAAD;IAAgB,WAAU;IAA2B,MAAK;GAAS,CAAA;EAC/D,CAAA,CACN,EAAA,CAAA,IACA,IACA;;AAEV,CAAC;AAED,KAAK,cAAc"}
1
+ {"version":3,"file":"pill.js","names":["React"],"sources":["../../src/components/pill.tsx"],"sourcesContent":["import * as React from 'react'\nimport { MaterialSymbol } from '../icons/material-symbol'\nimport { accentByColor } from '../lib/accent-colors'\nimport type { SparkAccentColor } from '../lib/accent-colors'\nimport type { SparkStyle } from '../lib/theme-types'\nimport { cn } from '../utils/cn'\n\ntype PillRemoveProps =\n | { onRemove?: undefined; removeLabel?: string }\n | {\n /** Fires on a pointer click of the (decorative) glyph, or Delete/Backspace while the pill has focus. */\n onRemove: (event: React.SyntheticEvent) => void\n /** Visually-hidden text folded into the pill's accessible name -- the glyph itself is `aria-hidden`. */\n removeLabel: string\n }\n\ntype PillProps = Omit<React.HTMLAttributes<HTMLSpanElement>, 'onClick'> &\n PillRemoveProps & {\n styleVariant?: SparkStyle\n color?: SparkAccentColor\n disabled?: boolean\n onClick?: (event: React.SyntheticEvent<HTMLSpanElement>) => void\n }\n\n/**\n * Like Badge, but interactive: `onClick` makes the whole pill a button\n * (Enter/Space), `onRemove` adds a Delete/Backspace-and-click affordance.\n * Both are optional -- with neither, it's a static label.\n */\nconst Pill = React.forwardRef<HTMLSpanElement, PillProps>(function Pill(\n {\n className,\n children,\n styleVariant,\n color,\n disabled = false,\n onClick,\n onRemove,\n removeLabel,\n onKeyDown,\n ...props\n },\n ref,\n) {\n const clickable = !disabled && onClick !== undefined\n const removable = !disabled && onRemove !== undefined\n const focusable = clickable || removable\n const hasLook = styleVariant !== undefined || color !== undefined\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLSpanElement>) => {\n onKeyDown?.(event)\n if (clickable && (event.key === 'Enter' || event.key === ' ')) {\n if (event.key === ' ') event.preventDefault()\n onClick?.(event)\n }\n if (removable && (event.key === 'Delete' || event.key === 'Backspace')) {\n onRemove?.(event)\n }\n }\n\n // button role and click handler travel together, so a clickable pill always\n // answers Enter/Space; a removable-only pill stays generic and answers Delete\n const interaction = {\n onKeyDown: handleKeyDown,\n ...(clickable && { role: 'button' as const, onClick }),\n ...(focusable && { tabIndex: 0 }),\n }\n\n return (\n <span\n aria-disabled={disabled || undefined}\n aria-keyshortcuts={removable ? 'Delete' : undefined}\n data-slot=\"pill\"\n data-style={hasLook ? (styleVariant ?? 'soft') : undefined}\n data-accent-color={color ? accentByColor[color] : undefined}\n {...interaction}\n ref={ref}\n className={cn(\n 'inline-flex h-7 items-center gap-1 rounded-full px-2.5 text-xs font-medium select-none',\n 'bg-(--spark-style-bg,var(--neutral-a3)) text-(--spark-style-fg,var(--neutral-a11))',\n focusable &&\n 'transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden motion-reduce:transition-none',\n clickable && 'cursor-pointer hover:bg-(--spark-style-bg-hover)',\n disabled && 'pointer-events-none opacity-50',\n className,\n )}\n {...props}\n >\n {children}\n {removable ? (\n <>\n {/* aria-hidden hides the glyph itself; this carries removeLabel into the pill's own accessible name */}\n <span className=\"sr-only\">{removeLabel}</span>\n <span\n aria-hidden=\"true\"\n data-slot=\"pill-remove\"\n onClick={(event) => {\n event.stopPropagation()\n onRemove?.(event)\n }}\n className=\"-mr-1 inline-flex size-4 shrink-0 items-center justify-center rounded-full transition-colors hover:bg-(--spark-style-bg-hover) motion-reduce:transition-none\"\n >\n <MaterialSymbol className=\"[--spark-icon-size:14px]\" name=\"close\" />\n </span>\n </>\n ) : null}\n </span>\n )\n})\n\nPill.displayName = 'Pill'\n\nexport { Pill }\nexport type { PillProps }\n"],"mappings":";;;;;;;;;;;;AA6BA,MAAM,OAAOA,QAAM,WAAuC,SAAS,KACjE,EACE,WACA,UACA,cACA,OACA,WAAW,OACX,SACA,UACA,aACA,WACA,GAAG,SAEL,KACA;CACA,MAAM,YAAY,CAAC,YAAY,YAAY,KAAA;CAC3C,MAAM,YAAY,CAAC,YAAY,aAAa,KAAA;CAC5C,MAAM,YAAY,aAAa;CAC/B,MAAM,UAAU,iBAAiB,KAAA,KAAa,UAAU,KAAA;CAExD,MAAM,iBAAiB,UAAgD;EACrE,YAAY,KAAK;EACjB,IAAI,cAAc,MAAM,QAAQ,WAAW,MAAM,QAAQ,MAAM;GAC7D,IAAI,MAAM,QAAQ,KAAK,MAAM,eAAe;GAC5C,UAAU,KAAK;EACjB;EACA,IAAI,cAAc,MAAM,QAAQ,YAAY,MAAM,QAAQ,cACxD,WAAW,KAAK;CAEpB;CAIA,MAAM,cAAc;EAClB,WAAW;EACX,GAAI,aAAa;GAAE,MAAM;GAAmB;EAAQ;EACpD,GAAI,aAAa,EAAE,UAAU,EAAE;CACjC;CAEA,OACE,qBAAC,QAAD;EACE,iBAAe,YAAY,KAAA;EAC3B,qBAAmB,YAAY,WAAW,KAAA;EAC1C,aAAU;EACV,cAAY,UAAW,gBAAgB,SAAU,KAAA;EACjD,qBAAmB,QAAQ,cAAc,SAAS,KAAA;EAClD,GAAI;EACC;EACL,WAAW,GACT,0FACA,sFACA,aACE,iIACF,aAAa,oDACb,YAAY,kCACZ,SACF;EACA,GAAI;YAjBN,CAmBG,UACA,YACC,qBAAA,UAAA,EAAA,UAAA,CAEE,oBAAC,QAAD;GAAM,WAAU;aAAW;EAAkB,CAAA,GAC7C,oBAAC,QAAD;GACE,eAAY;GACZ,aAAU;GACV,UAAU,UAAU;IAClB,MAAM,gBAAgB;IACtB,WAAW,KAAK;GAClB;GACA,WAAU;aAEV,oBAAC,gBAAD;IAAgB,WAAU;IAA2B,MAAK;GAAS,CAAA;EAC/D,CAAA,CACN,EAAA,CAAA,IACA,IACA;;AAEV,CAAC;AAED,KAAK,cAAc"}
@@ -6,10 +6,10 @@ const require_hooks_use_reduced_motion = require("../hooks/use-reduced-motion.cj
6
6
  require("../utils/chars.cjs");
7
7
  const require_utils_format = require("../utils/format.cjs");
8
8
  const require_utils_chart_scale = require("../utils/chart-scale.cjs");
9
- const require_utils_chart_time_ticks = require("../utils/chart-time-ticks.cjs");
10
9
  const require_components_chart = require("./chart.cjs");
11
10
  const require_components_series_legend = require("./series-legend.cjs");
12
11
  const require_components_typography = require("./typography.cjs");
12
+ const require_utils_chart_time_ticks = require("../utils/chart-time-ticks.cjs");
13
13
  let react = require("react");
14
14
  react = require_chunk.__toESM(react);
15
15
  let react_jsx_runtime = require("react/jsx-runtime");
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
  import { useAnimatedChartDomain, useChartZoom } from "../hooks/use-chart-zoom.js";
3
3
  import { useReducedMotion } from "../hooks/use-reduced-motion.js";
4
+ import { cn } from "../utils/cn.js";
4
5
  import "../utils/chars.js";
5
6
  import { twoDecimalFormat } from "../utils/format.js";
6
7
  import { buildYAxisScale, formatYAxisTick, measureYAxisGutter } from "../utils/chart-scale.js";
7
- import { buildTimeTicks } from "../utils/chart-time-ticks.js";
8
- import { cn } from "../utils/cn.js";
9
8
  import { ChartTooltipCard, ChartZoomResetButton, clampTooltipPosition, useMeasuredSize } from "./chart.js";
10
9
  import { SeriesLegend } from "./series-legend.js";
11
10
  import { SectionTitle } from "./typography.js";
11
+ import { buildTimeTicks } from "../utils/chart-time-ticks.js";
12
12
  import * as React$1 from "react";
13
13
  import { useCallback, useEffect, useMemo, useRef, useState } from "react";
14
14
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -22,7 +22,7 @@ const Progress = react.forwardRef(({ className, value, max = 100, size = "defaul
22
22
  role: "progressbar",
23
23
  ...props,
24
24
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
25
- className: "h-full rounded-full bg-spark-9 transition-all duration-300",
25
+ className: "h-full rounded-full bg-(--spark-style-bg,var(--spark-9)) transition-all duration-300",
26
26
  style: { width: `${percentage}%` }
27
27
  })
28
28
  });
@@ -1 +1 @@
1
- {"version":3,"file":"progress.cjs","names":["React"],"sources":["../../src/components/progress.tsx"],"sourcesContent":["import * as React from 'react'\nimport { cn } from '../utils/cn'\n\nexport interface ProgressProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Current value */\n value: number\n /** Maximum value. Default: 100 */\n max?: number\n /** Height variant */\n size?: 'sm' | 'default' | 'lg'\n}\n\nconst sizeClasses = {\n sm: 'h-1',\n default: 'h-2',\n lg: 'h-3',\n} as const\n\nconst Progress = React.forwardRef<HTMLDivElement, ProgressProps>(\n ({ className, value, max = 100, size = 'default', ...props }, ref) => {\n const percentage = Math.min(100, Math.max(0, (value / max) * 100))\n\n return (\n <div\n aria-valuemax={max}\n aria-valuemin={0}\n aria-valuenow={value}\n className={cn(\n 'w-full overflow-hidden rounded-full bg-gray-a4',\n sizeClasses[size],\n className,\n )}\n ref={ref}\n role=\"progressbar\"\n {...props}\n >\n <div\n className=\"h-full rounded-full bg-spark-9 transition-all duration-300\"\n style={{ width: `${percentage}%` }}\n />\n </div>\n )\n },\n)\n\nProgress.displayName = 'Progress'\n\nexport { Progress }\n"],"mappings":";;;;;;;;AAYA,MAAM,cAAc;CAClB,IAAI;CACJ,SAAS;CACT,IAAI;AACN;AAEA,MAAM,WAAWA,MAAM,YACpB,EAAE,WAAW,OAAO,MAAM,KAAK,OAAO,WAAW,GAAG,SAAS,QAAQ;CACpE,MAAM,aAAa,KAAK,IAAI,KAAK,KAAK,IAAI,GAAI,QAAQ,MAAO,GAAG,CAAC;CAEjE,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,iBAAe;EACf,iBAAe;EACf,iBAAe;EACf,YAAA,GAAA,OAAA,IACE,kDACA,YAAY,OACZ,SACF;EACK;EACL,MAAK;EACL,GAAI;YAEJ,iBAAA,GAAA,kBAAA,KAAC,OAAD;GACE,WAAU;GACV,OAAO,EAAE,OAAO,GAAG,WAAW,GAAG;EAClC,CAAA;CACE,CAAA;AAET,CACF;AAEA,SAAS,cAAc"}
1
+ {"version":3,"file":"progress.cjs","names":["React"],"sources":["../../src/components/progress.tsx"],"sourcesContent":["import * as React from 'react'\nimport { cn } from '../utils/cn'\n\nexport interface ProgressProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Current value */\n value: number\n /** Maximum value. Default: 100 */\n max?: number\n /** Height variant */\n size?: 'sm' | 'default' | 'lg'\n}\n\nconst sizeClasses = {\n sm: 'h-1',\n default: 'h-2',\n lg: 'h-3',\n} as const\n\nconst Progress = React.forwardRef<HTMLDivElement, ProgressProps>(\n ({ className, value, max = 100, size = 'default', ...props }, ref) => {\n const percentage = Math.min(100, Math.max(0, (value / max) * 100))\n\n return (\n <div\n aria-valuemax={max}\n aria-valuemin={0}\n aria-valuenow={value}\n className={cn(\n 'w-full overflow-hidden rounded-full bg-gray-a4',\n sizeClasses[size],\n className,\n )}\n ref={ref}\n role=\"progressbar\"\n {...props}\n >\n <div\n className=\"h-full rounded-full bg-(--spark-style-bg,var(--spark-9)) transition-all duration-300\"\n style={{ width: `${percentage}%` }}\n />\n </div>\n )\n },\n)\n\nProgress.displayName = 'Progress'\n\nexport { Progress }\n"],"mappings":";;;;;;;;AAYA,MAAM,cAAc;CAClB,IAAI;CACJ,SAAS;CACT,IAAI;AACN;AAEA,MAAM,WAAWA,MAAM,YACpB,EAAE,WAAW,OAAO,MAAM,KAAK,OAAO,WAAW,GAAG,SAAS,QAAQ;CACpE,MAAM,aAAa,KAAK,IAAI,KAAK,KAAK,IAAI,GAAI,QAAQ,MAAO,GAAG,CAAC;CAEjE,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,iBAAe;EACf,iBAAe;EACf,iBAAe;EACf,YAAA,GAAA,OAAA,IACE,kDACA,YAAY,OACZ,SACF;EACK;EACL,MAAK;EACL,GAAI;YAEJ,iBAAA,GAAA,kBAAA,KAAC,OAAD;GACE,WAAU;GACV,OAAO,EAAE,OAAO,GAAG,WAAW,GAAG;EAClC,CAAA;CACE,CAAA;AAET,CACF;AAEA,SAAS,cAAc"}
@@ -19,7 +19,7 @@ const Progress = React$1.forwardRef(({ className, value, max = 100, size = "defa
19
19
  role: "progressbar",
20
20
  ...props,
21
21
  children: /* @__PURE__ */ jsx("div", {
22
- className: "h-full rounded-full bg-spark-9 transition-all duration-300",
22
+ className: "h-full rounded-full bg-(--spark-style-bg,var(--spark-9)) transition-all duration-300",
23
23
  style: { width: `${percentage}%` }
24
24
  })
25
25
  });
@@ -1 +1 @@
1
- {"version":3,"file":"progress.js","names":["React"],"sources":["../../src/components/progress.tsx"],"sourcesContent":["import * as React from 'react'\nimport { cn } from '../utils/cn'\n\nexport interface ProgressProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Current value */\n value: number\n /** Maximum value. Default: 100 */\n max?: number\n /** Height variant */\n size?: 'sm' | 'default' | 'lg'\n}\n\nconst sizeClasses = {\n sm: 'h-1',\n default: 'h-2',\n lg: 'h-3',\n} as const\n\nconst Progress = React.forwardRef<HTMLDivElement, ProgressProps>(\n ({ className, value, max = 100, size = 'default', ...props }, ref) => {\n const percentage = Math.min(100, Math.max(0, (value / max) * 100))\n\n return (\n <div\n aria-valuemax={max}\n aria-valuemin={0}\n aria-valuenow={value}\n className={cn(\n 'w-full overflow-hidden rounded-full bg-gray-a4',\n sizeClasses[size],\n className,\n )}\n ref={ref}\n role=\"progressbar\"\n {...props}\n >\n <div\n className=\"h-full rounded-full bg-spark-9 transition-all duration-300\"\n style={{ width: `${percentage}%` }}\n />\n </div>\n )\n },\n)\n\nProgress.displayName = 'Progress'\n\nexport { Progress }\n"],"mappings":";;;;;AAYA,MAAM,cAAc;CAClB,IAAI;CACJ,SAAS;CACT,IAAI;AACN;AAEA,MAAM,WAAWA,QAAM,YACpB,EAAE,WAAW,OAAO,MAAM,KAAK,OAAO,WAAW,GAAG,SAAS,QAAQ;CACpE,MAAM,aAAa,KAAK,IAAI,KAAK,KAAK,IAAI,GAAI,QAAQ,MAAO,GAAG,CAAC;CAEjE,OACE,oBAAC,OAAD;EACE,iBAAe;EACf,iBAAe;EACf,iBAAe;EACf,WAAW,GACT,kDACA,YAAY,OACZ,SACF;EACK;EACL,MAAK;EACL,GAAI;YAEJ,oBAAC,OAAD;GACE,WAAU;GACV,OAAO,EAAE,OAAO,GAAG,WAAW,GAAG;EAClC,CAAA;CACE,CAAA;AAET,CACF;AAEA,SAAS,cAAc"}
1
+ {"version":3,"file":"progress.js","names":["React"],"sources":["../../src/components/progress.tsx"],"sourcesContent":["import * as React from 'react'\nimport { cn } from '../utils/cn'\n\nexport interface ProgressProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Current value */\n value: number\n /** Maximum value. Default: 100 */\n max?: number\n /** Height variant */\n size?: 'sm' | 'default' | 'lg'\n}\n\nconst sizeClasses = {\n sm: 'h-1',\n default: 'h-2',\n lg: 'h-3',\n} as const\n\nconst Progress = React.forwardRef<HTMLDivElement, ProgressProps>(\n ({ className, value, max = 100, size = 'default', ...props }, ref) => {\n const percentage = Math.min(100, Math.max(0, (value / max) * 100))\n\n return (\n <div\n aria-valuemax={max}\n aria-valuemin={0}\n aria-valuenow={value}\n className={cn(\n 'w-full overflow-hidden rounded-full bg-gray-a4',\n sizeClasses[size],\n className,\n )}\n ref={ref}\n role=\"progressbar\"\n {...props}\n >\n <div\n className=\"h-full rounded-full bg-(--spark-style-bg,var(--spark-9)) transition-all duration-300\"\n style={{ width: `${percentage}%` }}\n />\n </div>\n )\n },\n)\n\nProgress.displayName = 'Progress'\n\nexport { Progress }\n"],"mappings":";;;;;AAYA,MAAM,cAAc;CAClB,IAAI;CACJ,SAAS;CACT,IAAI;AACN;AAEA,MAAM,WAAWA,QAAM,YACpB,EAAE,WAAW,OAAO,MAAM,KAAK,OAAO,WAAW,GAAG,SAAS,QAAQ;CACpE,MAAM,aAAa,KAAK,IAAI,KAAK,KAAK,IAAI,GAAI,QAAQ,MAAO,GAAG,CAAC;CAEjE,OACE,oBAAC,OAAD;EACE,iBAAe;EACf,iBAAe;EACf,iBAAe;EACf,WAAW,GACT,kDACA,YAAY,OACZ,SACF;EACK;EACL,MAAK;EACL,GAAI;YAEJ,oBAAC,OAAD;GACE,WAAU;GACV,OAAO,EAAE,OAAO,GAAG,WAAW,GAAG;EAClC,CAAA;CACE,CAAA;AAET,CACF;AAEA,SAAS,cAAc"}