@epilot/spark-ui 0.32.1 → 0.32.3

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 (211) hide show
  1. package/dist/{button-i1Bgbw4p.d.ts → button-4QGaO78M.d.ts} +2 -2
  2. package/dist/{button-CT39v1M3.d.cts → button-C-KeUy2j.d.cts} +2 -2
  3. package/dist/components/accordion.cjs +2 -2
  4. package/dist/components/accordion.d.ts +1 -1
  5. package/dist/components/accordion.js +2 -2
  6. package/dist/components/alert-dialog.cjs +1 -1
  7. package/dist/components/alert-dialog.d.cts +1 -1
  8. package/dist/components/alert-dialog.d.ts +1 -1
  9. package/dist/components/alert-dialog.js +1 -1
  10. package/dist/components/attachment.cjs +3 -3
  11. package/dist/components/attachment.cjs.map +1 -1
  12. package/dist/components/attachment.d.cts +3 -3
  13. package/dist/components/attachment.d.ts +3 -3
  14. package/dist/components/attachment.js +3 -3
  15. package/dist/components/attachment.js.map +1 -1
  16. package/dist/components/autocomplete.cjs +1 -1
  17. package/dist/components/autocomplete.js +1 -1
  18. package/dist/components/avatar.js +1 -1
  19. package/dist/components/badge.cjs +1 -1
  20. package/dist/components/badge.js +2 -2
  21. package/dist/components/banner.cjs +1 -1
  22. package/dist/components/banner.js +1 -1
  23. package/dist/components/bar-chart.js +1 -1
  24. package/dist/components/breadcrumbs.cjs +1 -1
  25. package/dist/components/breadcrumbs.js +1 -1
  26. package/dist/components/bubble.cjs +2 -2
  27. package/dist/components/bubble.cjs.map +1 -1
  28. package/dist/components/bubble.d.cts +1 -1
  29. package/dist/components/bubble.d.ts +1 -1
  30. package/dist/components/bubble.js +2 -2
  31. package/dist/components/bubble.js.map +1 -1
  32. package/dist/components/button-group.cjs +1 -1
  33. package/dist/components/button-group.js +2 -2
  34. package/dist/components/button.cjs +1 -1
  35. package/dist/components/button.d.cts +1 -1
  36. package/dist/components/button.d.ts +1 -1
  37. package/dist/components/button.js +2 -2
  38. package/dist/components/calendar.cjs +3 -3
  39. package/dist/components/calendar.js +3 -3
  40. package/dist/components/callout.cjs +2 -2
  41. package/dist/components/callout.d.cts +1 -1
  42. package/dist/components/callout.d.ts +2 -2
  43. package/dist/components/callout.js +2 -2
  44. package/dist/components/card.cjs +1 -1
  45. package/dist/components/card.js +1 -1
  46. package/dist/components/checkbox-group.js +1 -1
  47. package/dist/components/checkbox.js +1 -1
  48. package/dist/components/combobox.cjs +70 -25
  49. package/dist/components/combobox.cjs.map +1 -1
  50. package/dist/components/combobox.d.cts +2 -5
  51. package/dist/components/combobox.d.ts +2 -5
  52. package/dist/components/combobox.js +70 -25
  53. package/dist/components/combobox.js.map +1 -1
  54. package/dist/components/dialog.cjs +1 -1
  55. package/dist/components/dialog.js +1 -1
  56. package/dist/components/drawer.cjs +1 -1
  57. package/dist/components/drawer.js +1 -1
  58. package/dist/components/dropdown-menu.cjs +2 -2
  59. package/dist/components/dropdown-menu.cjs.map +1 -1
  60. package/dist/components/dropdown-menu.js +2 -2
  61. package/dist/components/dropdown-menu.js.map +1 -1
  62. package/dist/components/dropzone.cjs +1 -1
  63. package/dist/components/dropzone.cjs.map +1 -1
  64. package/dist/components/dropzone.d.cts +1 -1
  65. package/dist/components/dropzone.d.ts +1 -1
  66. package/dist/components/dropzone.js +1 -1
  67. package/dist/components/dropzone.js.map +1 -1
  68. package/dist/components/empty-state.cjs +1 -1
  69. package/dist/components/empty-state.d.cts +1 -1
  70. package/dist/components/empty-state.d.ts +2 -2
  71. package/dist/components/empty-state.js +1 -1
  72. package/dist/components/entity-card.cjs +4 -4
  73. package/dist/components/entity-card.cjs.map +1 -1
  74. package/dist/components/entity-card.d.ts +1 -1
  75. package/dist/components/entity-card.js +4 -4
  76. package/dist/components/entity-card.js.map +1 -1
  77. package/dist/components/field.cjs +8 -8
  78. package/dist/components/field.cjs.map +1 -1
  79. package/dist/components/field.js +8 -8
  80. package/dist/components/field.js.map +1 -1
  81. package/dist/components/hero-metric.cjs +4 -4
  82. package/dist/components/hero-metric.cjs.map +1 -1
  83. package/dist/components/hero-metric.js +4 -4
  84. package/dist/components/hero-metric.js.map +1 -1
  85. package/dist/components/icon.js +1 -1
  86. package/dist/components/image-carousel.cjs +2 -2
  87. package/dist/components/image-carousel.d.cts +1 -1
  88. package/dist/components/image-carousel.d.ts +1 -1
  89. package/dist/components/image-carousel.js +3 -3
  90. package/dist/components/info-block.cjs +1 -1
  91. package/dist/components/info-block.js +1 -1
  92. package/dist/components/input-group.cjs +4 -4
  93. package/dist/components/input-group.cjs.map +1 -1
  94. package/dist/components/input-group.js +4 -4
  95. package/dist/components/input-group.js.map +1 -1
  96. package/dist/components/input-otp.cjs +3 -3
  97. package/dist/components/input-otp.cjs.map +1 -1
  98. package/dist/components/input-otp.js +3 -3
  99. package/dist/components/input-otp.js.map +1 -1
  100. package/dist/components/input.cjs +3 -3
  101. package/dist/components/input.cjs.map +1 -1
  102. package/dist/components/input.js +3 -3
  103. package/dist/components/input.js.map +1 -1
  104. package/dist/components/line-chart.cjs +1 -1
  105. package/dist/components/line-chart.js +2 -2
  106. package/dist/components/list.cjs +1 -1
  107. package/dist/components/list.js +1 -1
  108. package/dist/components/marker.cjs +1 -1
  109. package/dist/components/marker.d.cts +1 -1
  110. package/dist/components/marker.d.ts +1 -1
  111. package/dist/components/marker.js +1 -1
  112. package/dist/components/message-scroller.cjs +2 -2
  113. package/dist/components/message-scroller.d.cts +1 -1
  114. package/dist/components/message-scroller.d.ts +1 -1
  115. package/dist/components/message-scroller.js +2 -2
  116. package/dist/components/page-header.cjs +2 -2
  117. package/dist/components/page-header.d.cts +2 -2
  118. package/dist/components/page-header.d.ts +2 -2
  119. package/dist/components/page-header.js +2 -2
  120. package/dist/components/pagination.cjs +1 -1
  121. package/dist/components/pagination.d.cts +1 -1
  122. package/dist/components/pagination.d.ts +1 -1
  123. package/dist/components/pagination.js +1 -1
  124. package/dist/components/period-tabs.d.cts +1 -1
  125. package/dist/components/period-tabs.d.ts +1 -1
  126. package/dist/components/pill.cjs +1 -1
  127. package/dist/components/pill.d.cts +1 -1
  128. package/dist/components/pill.d.ts +1 -1
  129. package/dist/components/pill.js +2 -2
  130. package/dist/components/popover.cjs +1 -1
  131. package/dist/components/popover.js +1 -1
  132. package/dist/components/power-history-chart.cjs +1 -1
  133. package/dist/components/power-history-chart.js +2 -2
  134. package/dist/components/power-network.cjs +2 -2
  135. package/dist/components/power-network.js +2 -2
  136. package/dist/components/radio-card-group.cjs +2 -2
  137. package/dist/components/radio-card-group.cjs.map +1 -1
  138. package/dist/components/radio-card-group.js +2 -2
  139. package/dist/components/radio-card-group.js.map +1 -1
  140. package/dist/components/radio.js +1 -1
  141. package/dist/components/schedule-list.cjs +2 -2
  142. package/dist/components/schedule-list.cjs.map +1 -1
  143. package/dist/components/schedule-list.js +2 -2
  144. package/dist/components/schedule-list.js.map +1 -1
  145. package/dist/components/select.cjs +2 -2
  146. package/dist/components/select.js +2 -2
  147. package/dist/components/separator.cjs +1 -1
  148. package/dist/components/separator.js +1 -1
  149. package/dist/components/sheet.cjs +1 -1
  150. package/dist/components/sheet.js +1 -1
  151. package/dist/components/skeleton.cjs +1 -1
  152. package/dist/components/skeleton.js +1 -1
  153. package/dist/components/solar-forecast-chart.d.ts +1 -1
  154. package/dist/components/step-indicator.cjs +2 -2
  155. package/dist/components/step-indicator.js +2 -2
  156. package/dist/components/stepper.cjs +1 -1
  157. package/dist/components/stepper.js +1 -1
  158. package/dist/components/switch-group.js +1 -1
  159. package/dist/components/switch.js +1 -1
  160. package/dist/components/table.cjs +1 -1
  161. package/dist/components/table.js +1 -1
  162. package/dist/components/tabs.cjs +22 -11
  163. package/dist/components/tabs.cjs.map +1 -1
  164. package/dist/components/tabs.d.cts +5 -1
  165. package/dist/components/tabs.d.ts +5 -1
  166. package/dist/components/tabs.js +23 -12
  167. package/dist/components/tabs.js.map +1 -1
  168. package/dist/components/textarea.cjs +3 -3
  169. package/dist/components/textarea.cjs.map +1 -1
  170. package/dist/components/textarea.js +3 -3
  171. package/dist/components/textarea.js.map +1 -1
  172. package/dist/components/theme.cjs +1 -1
  173. package/dist/components/theme.js +2 -2
  174. package/dist/components/toast.cjs +4 -4
  175. package/dist/components/toast.cjs.map +1 -1
  176. package/dist/components/toast.js +4 -4
  177. package/dist/components/toast.js.map +1 -1
  178. package/dist/components/toggle-group.js +1 -1
  179. package/dist/components/toggle.d.cts +1 -1
  180. package/dist/components/toggle.d.ts +1 -1
  181. package/dist/components/toggle.js +1 -1
  182. package/dist/components/tooltip.cjs +1 -1
  183. package/dist/components/tooltip.js +1 -1
  184. package/dist/components/trace.cjs +3 -3
  185. package/dist/components/trace.cjs.map +1 -1
  186. package/dist/components/trace.js +3 -3
  187. package/dist/components/trace.js.map +1 -1
  188. package/dist/hooks/use-overflow-list.cjs +79 -0
  189. package/dist/hooks/use-overflow-list.cjs.map +1 -0
  190. package/dist/hooks/use-overflow-list.d.cts +48 -0
  191. package/dist/hooks/use-overflow-list.d.ts +48 -0
  192. package/dist/hooks/use-overflow-list.js +77 -0
  193. package/dist/hooks/use-overflow-list.js.map +1 -0
  194. package/dist/lib/calendar-lists.cjs +2 -2
  195. package/dist/lib/calendar-lists.js +2 -2
  196. package/dist/lib/date-field.cjs +8 -7
  197. package/dist/lib/date-field.cjs.map +1 -1
  198. package/dist/lib/date-field.d.cts +7 -1
  199. package/dist/lib/date-field.d.ts +7 -1
  200. package/dist/lib/date-field.js +8 -7
  201. package/dist/lib/date-field.js.map +1 -1
  202. package/dist/lib/input-box-variants.cjs +3 -3
  203. package/dist/lib/input-box-variants.cjs.map +1 -1
  204. package/dist/lib/input-box-variants.d.cts +1 -1
  205. package/dist/lib/input-box-variants.d.ts +1 -1
  206. package/dist/lib/input-box-variants.js +3 -3
  207. package/dist/lib/input-box-variants.js.map +1 -1
  208. package/dist/lib/toggle-group-context.d.cts +1 -1
  209. package/dist/lib/toggle-group-context.d.ts +1 -1
  210. package/dist/styles/theme.css +10 -5
  211. package/package.json +1 -1
@@ -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 { useIsomorphicLayoutEffect } from '../hooks/use-isomorphic-layout-effect'\nimport { FLOATING_ADORNMENT_SHIFT } from '../lib/input-box-variants'\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 has-[:focus-visible]:border-b-input-active has-[[data-slot=input][aria-invalid=true]]:border-b-input-invalid has-[[data-slot=input][aria-invalid=true]]:has-[:focus-visible]:border-b-(--color-error-active)! group-data-[invalid=true]/field:border-b-input-invalid! group-data-[invalid=true]/field:has-[:focus-visible]:border-b-(--color-error-active)!'\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] 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; inside an inset field the shell draws the outline\n box: 'h-11 rounded-md px-3 transition-[color,background-color,border-color] has-[input:focus-visible]:focus-outline group-data-[invalid=true]/field:has-[input:focus-visible]:outline-(--color-error-active) has-[[data-slot=input][aria-invalid=true]]:has-[input:focus-visible]:outline-(--color-error-active) 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 has-[[data-slot=input][aria-invalid=true]]:bg-base-error-soft 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 has-[input:not(:disabled)]:hover:bg-input-base-hover',\n },\n {\n chrome: 'box',\n inputStyle: 'soft',\n inputColor: 'gray',\n class: 'bg-base-gray-soft 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 group-data-[invalid=true]/field:has-[:focus-visible]:border-input-invalid! has-[[data-slot=input][aria-invalid=true]]:border-input-invalid has-[[data-slot=input][aria-invalid=true]]:has-[:focus-visible]:border-input-invalid!',\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'brand',\n class:\n 'border-input bg-base-accent-surface has-[:focus-visible]:border-input-active',\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'gray',\n class:\n 'border-input-gray bg-base-gray-surface has-[:focus-visible]:border-gray-a8',\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'brand',\n class: 'border-input has-[:focus-visible]:border-input-active',\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'gray',\n class: 'border-input-gray has-[:focus-visible]:border-gray-a8',\n },\n { chrome: 'box', inputStyle: 'ghost', class: cn(GHOST, 'h-10') },\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 const floating = field?.labelPosition === 'floating'\n return (\n <div\n data-slot=\"input-group\"\n data-floating-control={floating || undefined}\n role=\"group\"\n className={cn(\n inputGroupVariants({ chrome, inputStyle, inputColor }),\n floating &&\n (inputStyle === 'outlined'\n ? 'h-12 border-0! has-[input:focus-visible]:outline-hidden!'\n : cn(\n 'h-12 [&_[data-slot=input]]:h-full [&_[data-slot=input]]:pt-5 [&_[data-slot=input]]:pb-1 field-unlabeled:[&_[data-slot=input]]:py-0',\n inputStyle === 'surface' &&\n 'has-[input:focus-visible]:outline-offset-[-2px]!',\n )),\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 const field = useFieldContext()\n const shiftWithValue =\n field?.labelPosition === 'floating' && field.inputStyle !== 'outlined'\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(\n inputGroupAddonVariants({ align }),\n shiftWithValue && FLOATING_ADORNMENT_SHIFT,\n className,\n )}\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\nconst SUFFIX_GAP = 4\n\nfunction placeSuffix(\n suffix: HTMLSpanElement,\n mirror: HTMLSpanElement,\n unit: HTMLSpanElement,\n input: HTMLInputElement,\n) {\n const style = getComputedStyle(input)\n const basePaddingRight =\n input.dataset.suffixPaddingRight ?? style.paddingRight\n input.dataset.suffixPaddingRight = basePaddingRight\n const paddingLeft = parseFloat(style.paddingLeft)\n const paddingRight = parseFloat(basePaddingRight)\n\n mirror.textContent = input.value\n suffix.toggleAttribute('data-empty', input.value === '')\n suffix.style.font = style.font\n suffix.style.lineHeight = 'normal'\n suffix.style.letterSpacing = style.letterSpacing\n suffix.style.top = `${input.offsetTop}px`\n suffix.style.height = `${input.offsetHeight}px`\n suffix.style.paddingTop = style.paddingTop\n suffix.style.paddingBottom = style.paddingBottom\n\n const textLeft = input.offsetLeft + paddingLeft\n const available = input.clientWidth - paddingLeft - paddingRight\n const needed = mirror.offsetWidth + SUFFIX_GAP + unit.offsetWidth\n const pinned = needed > available\n suffix.toggleAttribute('data-pinned', pinned)\n suffix.style.left = `${textLeft}px`\n suffix.style.width = `${input.clientWidth - paddingLeft - paddingRight}px`\n input.style.paddingRight = pinned\n ? `${paddingRight + unit.offsetWidth + SUFFIX_GAP}px`\n : ''\n}\n\nfunction InputGroupSuffix({\n className,\n children,\n ...props\n}: React.ComponentProps<'span'>) {\n const ref = React.useRef<HTMLSpanElement>(null)\n const mirrorRef = React.useRef<HTMLSpanElement>(null)\n const unitRef = React.useRef<HTMLSpanElement>(null)\n\n useIsomorphicLayoutEffect(() => {\n const suffix = ref.current\n const mirror = mirrorRef.current\n const unit = unitRef.current\n const input = suffix\n ?.closest('[data-slot=input-group]')\n ?.querySelector<HTMLInputElement>('input[data-slot=input]')\n if (!suffix || !mirror || !unit || !input) return\n const place = () => placeSuffix(suffix, mirror, unit, input)\n place()\n input.addEventListener('input', place)\n const observer =\n typeof ResizeObserver === 'undefined' ? null : new ResizeObserver(place)\n observer?.observe(input)\n return () => {\n input.removeEventListener('input', place)\n observer?.disconnect()\n }\n })\n\n return (\n <span\n ref={ref}\n data-slot=\"input-group-suffix\"\n data-empty=\"\"\n className={cn(\n 'pointer-events-none absolute flex items-center overflow-hidden whitespace-pre text-gray group-has-[[aria-invalid=true]]/input-group:text-error group-has-[input:disabled]/input-group:text-gray-disabled group-data-[invalid=true]/field:text-error data-empty:invisible data-pinned:justify-end',\n className,\n )}\n {...props}\n >\n <span>\n <span ref={mirrorRef} aria-hidden=\"true\" className=\"invisible\" />\n <span ref={unitRef} className=\"ml-1 font-semibold\">\n {children}\n </span>\n </span>\n </span>\n )\n}\n\nexport {\n InputGroup,\n InputGroupAddon,\n InputGroupInput,\n InputGroupSuffix,\n InputGroupText,\n}\n"],"mappings":";;;;;;;;;;;;AAWA,MAAM,QACJ;AAEF,MAAM,qBAAqB,IACzB,uJACA;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,OAAO;EACT;EACA;GACE,QAAQ;GACR,YAAY,CAAC,WAAW,UAAU;GAClC,OACE;EACJ;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GAC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,aAAa,KAAK,cAC9B;CACxB,OAAO,gBAAgB,eAAe,MAAM;CAC5C,OAAO,MAAM,OAAO,GAAG,SAAS;CAChC,OAAO,MAAM,QAAQ,GAAG,MAAM,cAAc,cAAc,aAAa;CACvE,MAAM,MAAM,eAAe,SACvB,GAAG,eAAe,KAAK,cAAc,WAAW,MAChD;AACN;AAEA,SAAS,iBAAiB,EACxB,WACA,UACA,GAAG,SAC4B;CAC/B,MAAM,MAAMA,QAAM,OAAwB,IAAI;CAC9C,MAAM,YAAYA,QAAM,OAAwB,IAAI;CACpD,MAAM,UAAUA,QAAM,OAAwB,IAAI;CAElD,gCAAgC;EAC9B,MAAM,SAAS,IAAI;EACnB,MAAM,SAAS,UAAU;EACzB,MAAM,OAAO,QAAQ;EACrB,MAAM,QAAQ,QACV,QAAQ,yBAAyB,GACjC,cAAgC,wBAAwB;EAC5D,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO;EAC3C,MAAM,cAAc,YAAY,QAAQ,QAAQ,MAAM,KAAK;EAC3D,MAAM;EACN,MAAM,iBAAiB,SAAS,KAAK;EACrC,MAAM,WACJ,OAAO,mBAAmB,cAAc,OAAO,IAAI,eAAe,KAAK;EACzE,UAAU,QAAQ,KAAK;EACvB,aAAa;GACX,MAAM,oBAAoB,SAAS,KAAK;GACxC,UAAU,WAAW;EACvB;CACF,CAAC;CAED,OACE,oBAAC,QAAD;EACO;EACL,aAAU;EACV,cAAW;EACX,WAAW,GACT,oSACA,SACF;EACA,GAAI;YAEJ,qBAAC,QAAD,EAAA,UAAA,CACE,oBAAC,QAAD;GAAM,KAAK;GAAW,eAAY;GAAO,WAAU;EAAa,CAAA,GAChE,oBAAC,QAAD;GAAM,KAAK;GAAS,WAAU;GAC3B;EACG,CAAA,CACF,EAAA,CAAA;CACF,CAAA;AAEV"}
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 { useIsomorphicLayoutEffect } from '../hooks/use-isomorphic-layout-effect'\nimport { FLOATING_ADORNMENT_SHIFT } from '../lib/input-box-variants'\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 has-[:focus-visible]:border-b-input-active has-[[data-slot=input][aria-invalid=true]]:border-b-input-invalid has-[[data-slot=input][aria-invalid=true]]:has-[:focus-visible]:border-b-(--color-error-active)! group-data-[invalid=true]/field:border-b-input-invalid! group-data-[invalid=true]/field:has-[:focus-visible]:border-b-(--color-error-active)!'\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] 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; inside an inset field the shell draws the outline\n box: 'h-11 rounded-md px-3 transition-[color,background-color,border-color] has-[input:focus-visible]:focus-outline group-data-[invalid=true]/field:has-[input:focus-visible]:outline-(--color-error-active) has-[[data-slot=input][aria-invalid=true]]:has-[input:focus-visible]:outline-(--color-error-active) 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 has-[[data-slot=input][aria-invalid=true]]:bg-base-error-soft 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 has-[input:not(:disabled)]:hover:bg-input-base-hover',\n },\n {\n chrome: 'box',\n inputStyle: 'soft',\n inputColor: 'gray',\n class: 'bg-base-gray-soft 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 group-data-[invalid=true]/field:has-[:focus-visible]:border-input-invalid! has-[[data-slot=input][aria-invalid=true]]:border-input-invalid has-[[data-slot=input][aria-invalid=true]]:has-[:focus-visible]:border-input-invalid!',\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'brand',\n class:\n 'border-input bg-base-accent-surface has-[:focus-visible]:border-input-active',\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'gray',\n class:\n 'border-input-gray bg-base-gray-surface has-[:focus-visible]:border-gray-a8',\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'brand',\n class: 'border-input has-[:focus-visible]:border-input-active',\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'gray',\n class: 'border-input-gray has-[:focus-visible]:border-gray-a8',\n },\n { chrome: 'box', inputStyle: 'ghost', class: cn(GHOST, 'h-10') },\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 const floating = field?.labelPosition === 'floating'\n return (\n <div\n data-slot=\"input-group\"\n data-floating-control={floating || undefined}\n role=\"group\"\n className={cn(\n inputGroupVariants({ chrome, inputStyle, inputColor }),\n floating &&\n (inputStyle === 'outlined'\n ? 'h-12 border-0! has-[input:focus-visible]:outline-hidden!'\n : cn(\n 'h-12 [&_[data-slot=input]]:h-full [&_[data-slot=input]]:pt-5 [&_[data-slot=input]]:pb-1 field-unlabeled:[&_[data-slot=input]]:py-0',\n inputStyle === 'surface' &&\n 'has-[input:focus-visible]:outline-offset-[-2px]!',\n )),\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 const field = useFieldContext()\n const shiftWithValue =\n field?.labelPosition === 'floating' && field.inputStyle !== 'outlined'\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(\n inputGroupAddonVariants({ align }),\n shiftWithValue && FLOATING_ADORNMENT_SHIFT,\n className,\n )}\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\nconst SUFFIX_GAP = 4\n\nfunction placeSuffix(\n suffix: HTMLSpanElement,\n mirror: HTMLSpanElement,\n unit: HTMLSpanElement,\n input: HTMLInputElement,\n) {\n const style = getComputedStyle(input)\n const basePaddingRight =\n input.dataset.suffixPaddingRight ?? style.paddingRight\n input.dataset.suffixPaddingRight = basePaddingRight\n const paddingLeft = parseFloat(style.paddingLeft)\n const paddingRight = parseFloat(basePaddingRight)\n\n mirror.textContent = input.value\n suffix.toggleAttribute('data-empty', input.value === '')\n suffix.style.font = style.font\n suffix.style.lineHeight = 'normal'\n suffix.style.letterSpacing = style.letterSpacing\n suffix.style.top = `${input.offsetTop}px`\n suffix.style.height = `${input.offsetHeight}px`\n suffix.style.paddingTop = style.paddingTop\n suffix.style.paddingBottom = style.paddingBottom\n\n const textLeft = input.offsetLeft + paddingLeft\n const available = input.clientWidth - paddingLeft - paddingRight\n const needed = mirror.offsetWidth + SUFFIX_GAP + unit.offsetWidth\n const pinned = needed > available\n suffix.toggleAttribute('data-pinned', pinned)\n suffix.style.left = `${textLeft}px`\n suffix.style.width = `${input.clientWidth - paddingLeft - paddingRight}px`\n input.style.paddingRight = pinned\n ? `${paddingRight + unit.offsetWidth + SUFFIX_GAP}px`\n : ''\n}\n\nfunction InputGroupSuffix({\n className,\n children,\n ...props\n}: React.ComponentProps<'span'>) {\n const ref = React.useRef<HTMLSpanElement>(null)\n const mirrorRef = React.useRef<HTMLSpanElement>(null)\n const unitRef = React.useRef<HTMLSpanElement>(null)\n\n useIsomorphicLayoutEffect(() => {\n const suffix = ref.current\n const mirror = mirrorRef.current\n const unit = unitRef.current\n const input = suffix\n ?.closest('[data-slot=input-group]')\n ?.querySelector<HTMLInputElement>('input[data-slot=input]')\n if (!suffix || !mirror || !unit || !input) return\n const place = () => placeSuffix(suffix, mirror, unit, input)\n place()\n input.addEventListener('input', place)\n const observer =\n typeof ResizeObserver === 'undefined' ? null : new ResizeObserver(place)\n observer?.observe(input)\n return () => {\n input.removeEventListener('input', place)\n observer?.disconnect()\n }\n })\n\n return (\n <span\n ref={ref}\n data-slot=\"input-group-suffix\"\n data-empty=\"\"\n className={cn(\n 'pointer-events-none absolute flex items-center overflow-hidden whitespace-pre text-gray group-has-[input:disabled]/input-group:text-gray-disabled data-empty:invisible data-pinned:justify-end',\n className,\n )}\n {...props}\n >\n <span>\n <span ref={mirrorRef} aria-hidden=\"true\" className=\"invisible\" />\n <span ref={unitRef} className=\"ml-1 font-semibold\">\n {children}\n </span>\n </span>\n </span>\n )\n}\n\nexport {\n InputGroup,\n InputGroupAddon,\n InputGroupInput,\n InputGroupSuffix,\n InputGroupText,\n}\n"],"mappings":";;;;;;;;;;;;AAWA,MAAM,QACJ;AAEF,MAAM,qBAAqB,IACzB,uJACA;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,OAAO;EACT;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,OAAO;E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AM,cAAc,cAAc,aAAa;CACvE,MAAM,MAAM,eAAe,SACvB,GAAG,eAAe,KAAK,cAAc,WAAW,MAChD;AACN;AAEA,SAAS,iBAAiB,EACxB,WACA,UACA,GAAG,SAC4B;CAC/B,MAAM,MAAMA,QAAM,OAAwB,IAAI;CAC9C,MAAM,YAAYA,QAAM,OAAwB,IAAI;CACpD,MAAM,UAAUA,QAAM,OAAwB,IAAI;CAElD,gCAAgC;EAC9B,MAAM,SAAS,IAAI;EACnB,MAAM,SAAS,UAAU;EACzB,MAAM,OAAO,QAAQ;EACrB,MAAM,QAAQ,QACV,QAAQ,yBAAyB,GACjC,cAAgC,wBAAwB;EAC5D,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO;EAC3C,MAAM,cAAc,YAAY,QAAQ,QAAQ,MAAM,KAAK;EAC3D,MAAM;EACN,MAAM,iBAAiB,SAAS,KAAK;EACrC,MAAM,WACJ,OAAO,mBAAmB,cAAc,OAAO,IAAI,eAAe,KAAK;EACzE,UAAU,QAAQ,KAAK;EACvB,aAAa;GACX,MAAM,oBAAoB,SAAS,KAAK;GACxC,UAAU,WAAW;EACvB;CACF,CAAC;CAED,OACE,oBAAC,QAAD;EACO;EACL,aAAU;EACV,cAAW;EACX,WAAW,GACT,kMACA,SACF;EACA,GAAI;YAEJ,qBAAC,QAAD,EAAA,UAAA,CACE,oBAAC,QAAD;GAAM,KAAK;GAAW,eAAY;GAAO,WAAU;EAAa,CAAA,GAChE,oBAAC,QAAD;GAAM,KAAK;GAAS,WAAU;GAC3B;EACG,CAAA,CACF,EAAA,CAAA;CACF,CAAA;AAEV"}
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const require_lib_input_box_variants = require("../lib/input-box-variants.cjs");
4
3
  const require_components_field = require("./field.cjs");
5
- let class_variance_authority = require("class-variance-authority");
4
+ const require_lib_input_box_variants = require("../lib/input-box-variants.cjs");
6
5
  let react_jsx_runtime = require("react/jsx-runtime");
6
+ let class_variance_authority = require("class-variance-authority");
7
7
  let _base_ui_react_otp_field = require("@base-ui/react/otp-field");
8
8
  let cn = require("cn");
9
9
  //#region src/components/input-otp.tsx
10
- const slotVariants = (0, class_variance_authority.cva)("flex w-11 min-w-0 items-center justify-center bg-transparent text-center text-base font-medium text-gray tabular-nums transition-[color,background-color,border-color] group-data-[invalid=true]/field:text-error placeholder:text-gray-placeholder disabled:cursor-not-allowed disabled:text-gray-disabled disabled:placeholder:text-gray-disabled aria-invalid:text-error motion-reduce:transition-none", {
10
+ const slotVariants = (0, class_variance_authority.cva)("flex w-11 min-w-0 items-center justify-center bg-transparent text-center text-base font-medium text-gray tabular-nums transition-[color,background-color,border-color] placeholder:text-gray-placeholder disabled:cursor-not-allowed disabled:text-gray-disabled disabled:placeholder:text-gray-disabled motion-reduce:transition-none", {
11
11
  variants: {
12
12
  chrome: {
13
13
  inset: require_lib_input_box_variants.INSET_UNDERLINE,
@@ -1 +1 @@
1
- {"version":3,"file":"input-otp.cjs","names":["INSET_UNDERLINE","boxChrome","useFieldControl","OTPField"],"sources":["../../src/components/input-otp.tsx"],"sourcesContent":["import { OTPField, type OTPFieldRootProps } from '@base-ui/react/otp-field'\nimport { cva } from 'class-variance-authority'\nimport { boxChrome, INSET_UNDERLINE } from '../lib/input-box-variants'\nimport { cn } from '../utils/cn'\nimport { useFieldControl, useKeepLabelOutset } from './field'\n\n// One code box per slot. Mirrors Input's box/underline carrier model so the\n// slots read like the rest of the input family across every style/color knob.\nconst slotVariants = cva(\n 'flex w-11 min-w-0 items-center justify-center bg-transparent text-center text-base font-medium text-gray tabular-nums transition-[color,background-color,border-color] group-data-[invalid=true]/field:text-error placeholder:text-gray-placeholder disabled:cursor-not-allowed disabled:text-gray-disabled disabled:placeholder:text-gray-disabled aria-invalid:text-error motion-reduce:transition-none',\n {\n variants: {\n chrome: {\n // inside an inset field the shell is the box; slots keep the classic\n // underline (the pre-knob default look)\n inset: INSET_UNDERLINE,\n box: 'h-11 rounded-md',\n },\n inputStyle: { soft: '', surface: '', outlined: '', ghost: '' },\n inputColor: { brand: '', gray: '' },\n },\n compoundVariants: [\n {\n chrome: 'box',\n inputStyle: 'soft',\n inputColor: 'brand',\n class: boxChrome.soft.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'soft',\n inputColor: 'gray',\n class: boxChrome.soft.gray,\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'brand',\n class: boxChrome.surface.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'gray',\n class: boxChrome.surface.gray,\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'brand',\n class: boxChrome.outlined.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'gray',\n class: boxChrome.outlined.gray,\n },\n {\n chrome: 'box',\n inputStyle: 'ghost',\n inputColor: 'brand',\n class: boxChrome.ghost.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'ghost',\n inputColor: 'gray',\n class: boxChrome.ghost.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\ninterface InputOtpProps extends Pick<\n OTPFieldRootProps,\n | 'value'\n | 'defaultValue'\n | 'onValueChange'\n | 'disabled'\n | 'className'\n | 'id'\n | 'validationType'\n> {\n /** Number of code slots. */\n length?: number\n /** Fired when every slot is filled. */\n onComplete?: OTPFieldRootProps['onValueComplete']\n /** Accessible name per slot (for localization). */\n slotAriaLabel?: (index: number) => string\n}\n\nfunction InputOtp({\n length = 6,\n className,\n id: idProp,\n onComplete,\n slotAriaLabel = (index) => `Character ${index + 1}`,\n validationType = 'alphanumeric',\n ...props\n}: InputOtpProps) {\n const { field, id, ariaDescribedBy, ariaInvalid, inputStyle, inputColor } =\n useFieldControl({ id: idProp })\n useKeepLabelOutset()\n const chrome = field?.labelPosition === 'inset' ? 'inset' : 'box'\n\n return (\n <OTPField.Root\n data-slot=\"input-otp\"\n length={length}\n id={id}\n validationType={validationType}\n onValueComplete={onComplete}\n className={cn('flex items-center gap-2', className)}\n {...props}\n >\n {Array.from({ length }, (_, index) => (\n <OTPField.Input\n key={index}\n data-slot=\"input-otp-slot\"\n // the first slot is named by the Field label (Base UI ignores\n // aria-label there); the rest get a positional name for a11y\n aria-label={index === 0 ? undefined : slotAriaLabel(index)}\n aria-describedby={index === 0 ? ariaDescribedBy : undefined}\n aria-invalid={index === 0 ? ariaInvalid : undefined}\n className={cn(slotVariants({ chrome, inputStyle, inputColor }))}\n />\n ))}\n </OTPField.Root>\n )\n}\n\nexport { InputOtp }\nexport type { InputOtpProps }\n"],"mappings":";;;;;;;;;AAQA,MAAM,gBAAA,GAAA,yBAAA,KACJ,6YACA;CACE,UAAU;EACR,QAAQ;GAGN,OAAOA,+BAAAA;GACP,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;GACZ,YAAY;GACZ,OAAOC,+BAAAA,UAAU,KAAK;EACxB;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAOA,+BAAAA,UAAU,KAAK;EACxB;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAOA,+BAAAA,UAAU,QAAQ;EAC3B;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAOA,+BAAAA,UAAU,QAAQ;EAC3B;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAOA,+BAAAA,UAAU,SAAS;EAC5B;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAOA,+BAAAA,UAAU,SAAS;EAC5B;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAOA,+BAAAA,UAAU,MAAM;EACzB;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAOA,+BAAAA,UAAU,MAAM;EACzB;EACA;GAAE,QAAQ;GAAS,YAAY;GAAS,OAAO;EAAiB;EAChE;GAAE,QAAQ;GAAS,YAAY;GAAQ,OAAO;EAAsB;CACtE;AACF,CACF;AAoBA,SAAS,SAAS,EAChB,SAAS,GACT,WACA,IAAI,QACJ,YACA,iBAAiB,UAAU,aAAa,QAAQ,KAChD,iBAAiB,gBACjB,GAAG,SACa;CAChB,MAAM,EAAE,OAAO,IAAI,iBAAiB,aAAa,YAAY,eAC3DC,yBAAAA,gBAAgB,EAAE,IAAI,OAAO,CAAC;CAChC,yBAAA,mBAAmB;CACnB,MAAM,SAAS,OAAO,kBAAkB,UAAU,UAAU;CAE5D,OACE,iBAAA,GAAA,kBAAA,KAACC,yBAAAA,SAAS,MAAV;EACE,aAAU;EACF;EACJ;EACY;EAChB,iBAAiB;EACjB,YAAA,GAAA,GAAA,IAAc,2BAA2B,SAAS;EAClD,GAAI;YAEH,MAAM,KAAK,EAAE,OAAO,IAAI,GAAG,UAC1B,iBAAA,GAAA,kBAAA,KAACA,yBAAAA,SAAS,OAAV;GAEE,aAAU;GAGV,cAAY,UAAU,IAAI,KAAA,IAAY,cAAc,KAAK;GACzD,oBAAkB,UAAU,IAAI,kBAAkB,KAAA;GAClD,gBAAc,UAAU,IAAI,cAAc,KAAA;GAC1C,YAAA,GAAA,GAAA,IAAc,aAAa;IAAE;IAAQ;IAAY;GAAW,CAAC,CAAC;EAC/D,GARM,KAQN,CACF;CACY,CAAA;AAEnB"}
1
+ {"version":3,"file":"input-otp.cjs","names":["INSET_UNDERLINE","boxChrome","useFieldControl","OTPField"],"sources":["../../src/components/input-otp.tsx"],"sourcesContent":["import { OTPField, type OTPFieldRootProps } from '@base-ui/react/otp-field'\nimport { cva } from 'class-variance-authority'\nimport { boxChrome, INSET_UNDERLINE } from '../lib/input-box-variants'\nimport { cn } from '../utils/cn'\nimport { useFieldControl, useKeepLabelOutset } from './field'\n\n// One code box per slot. Mirrors Input's box/underline carrier model so the\n// slots read like the rest of the input family across every style/color knob.\nconst slotVariants = cva(\n 'flex w-11 min-w-0 items-center justify-center bg-transparent text-center text-base font-medium text-gray tabular-nums transition-[color,background-color,border-color] placeholder:text-gray-placeholder disabled:cursor-not-allowed disabled:text-gray-disabled disabled:placeholder:text-gray-disabled motion-reduce:transition-none',\n {\n variants: {\n chrome: {\n // inside an inset field the shell is the box; slots keep the classic\n // underline (the pre-knob default look)\n inset: INSET_UNDERLINE,\n box: 'h-11 rounded-md',\n },\n inputStyle: { soft: '', surface: '', outlined: '', ghost: '' },\n inputColor: { brand: '', gray: '' },\n },\n compoundVariants: [\n {\n chrome: 'box',\n inputStyle: 'soft',\n inputColor: 'brand',\n class: boxChrome.soft.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'soft',\n inputColor: 'gray',\n class: boxChrome.soft.gray,\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'brand',\n class: boxChrome.surface.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'gray',\n class: boxChrome.surface.gray,\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'brand',\n class: boxChrome.outlined.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'gray',\n class: boxChrome.outlined.gray,\n },\n {\n chrome: 'box',\n inputStyle: 'ghost',\n inputColor: 'brand',\n class: boxChrome.ghost.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'ghost',\n inputColor: 'gray',\n class: boxChrome.ghost.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\ninterface InputOtpProps extends Pick<\n OTPFieldRootProps,\n | 'value'\n | 'defaultValue'\n | 'onValueChange'\n | 'disabled'\n | 'className'\n | 'id'\n | 'validationType'\n> {\n /** Number of code slots. */\n length?: number\n /** Fired when every slot is filled. */\n onComplete?: OTPFieldRootProps['onValueComplete']\n /** Accessible name per slot (for localization). */\n slotAriaLabel?: (index: number) => string\n}\n\nfunction InputOtp({\n length = 6,\n className,\n id: idProp,\n onComplete,\n slotAriaLabel = (index) => `Character ${index + 1}`,\n validationType = 'alphanumeric',\n ...props\n}: InputOtpProps) {\n const { field, id, ariaDescribedBy, ariaInvalid, inputStyle, inputColor } =\n useFieldControl({ id: idProp })\n useKeepLabelOutset()\n const chrome = field?.labelPosition === 'inset' ? 'inset' : 'box'\n\n return (\n <OTPField.Root\n data-slot=\"input-otp\"\n length={length}\n id={id}\n validationType={validationType}\n onValueComplete={onComplete}\n className={cn('flex items-center gap-2', className)}\n {...props}\n >\n {Array.from({ length }, (_, index) => (\n <OTPField.Input\n key={index}\n data-slot=\"input-otp-slot\"\n // the first slot is named by the Field label (Base UI ignores\n // aria-label there); the rest get a positional name for a11y\n aria-label={index === 0 ? undefined : slotAriaLabel(index)}\n aria-describedby={index === 0 ? ariaDescribedBy : undefined}\n aria-invalid={index === 0 ? ariaInvalid : undefined}\n className={cn(slotVariants({ chrome, inputStyle, inputColor }))}\n />\n ))}\n </OTPField.Root>\n )\n}\n\nexport { InputOtp }\nexport type { InputOtpProps }\n"],"mappings":";;;;;;;;;AAQA,MAAM,gBAAA,GAAA,yBAAA,KACJ,0UACA;CACE,UAAU;EACR,QAAQ;GAGN,OAAOA,+BAAAA;GACP,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;GACZ,YAAY;GACZ,OAAOC,+BAAAA,UAAU,KAAK;EACxB;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAOA,+BAAAA,UAAU,KAAK;EACxB;E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AAA;GAClD,gBAAc,UAAU,IAAI,cAAc,KAAA;GAC1C,YAAA,GAAA,GAAA,IAAc,aAAa;IAAE;IAAQ;IAAY;GAAW,CAAC,CAAC;EAC/D,GARM,KAQN,CACF;CACY,CAAA;AAEnB"}
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
  import { cn } from "../utils/cn.js";
3
- import { INSET_UNDERLINE, boxChrome } from "../lib/input-box-variants.js";
4
3
  import { useFieldControl, useKeepLabelOutset } from "./field.js";
5
- import { cva } from "class-variance-authority";
4
+ import { INSET_UNDERLINE, boxChrome } from "../lib/input-box-variants.js";
6
5
  import { jsx } from "react/jsx-runtime";
6
+ import { cva } from "class-variance-authority";
7
7
  import { OTPField } from "@base-ui/react/otp-field";
8
8
  //#region src/components/input-otp.tsx
9
- const slotVariants = cva("flex w-11 min-w-0 items-center justify-center bg-transparent text-center text-base font-medium text-gray tabular-nums transition-[color,background-color,border-color] group-data-[invalid=true]/field:text-error placeholder:text-gray-placeholder disabled:cursor-not-allowed disabled:text-gray-disabled disabled:placeholder:text-gray-disabled aria-invalid:text-error motion-reduce:transition-none", {
9
+ const slotVariants = cva("flex w-11 min-w-0 items-center justify-center bg-transparent text-center text-base font-medium text-gray tabular-nums transition-[color,background-color,border-color] placeholder:text-gray-placeholder disabled:cursor-not-allowed disabled:text-gray-disabled disabled:placeholder:text-gray-disabled motion-reduce:transition-none", {
10
10
  variants: {
11
11
  chrome: {
12
12
  inset: INSET_UNDERLINE,
@@ -1 +1 @@
1
- {"version":3,"file":"input-otp.js","names":[],"sources":["../../src/components/input-otp.tsx"],"sourcesContent":["import { OTPField, type OTPFieldRootProps } from '@base-ui/react/otp-field'\nimport { cva } from 'class-variance-authority'\nimport { boxChrome, INSET_UNDERLINE } from '../lib/input-box-variants'\nimport { cn } from '../utils/cn'\nimport { useFieldControl, useKeepLabelOutset } from './field'\n\n// One code box per slot. Mirrors Input's box/underline carrier model so the\n// slots read like the rest of the input family across every style/color knob.\nconst slotVariants = cva(\n 'flex w-11 min-w-0 items-center justify-center bg-transparent text-center text-base font-medium text-gray tabular-nums transition-[color,background-color,border-color] group-data-[invalid=true]/field:text-error placeholder:text-gray-placeholder disabled:cursor-not-allowed disabled:text-gray-disabled disabled:placeholder:text-gray-disabled aria-invalid:text-error motion-reduce:transition-none',\n {\n variants: {\n chrome: {\n // inside an inset field the shell is the box; slots keep the classic\n // underline (the pre-knob default look)\n inset: INSET_UNDERLINE,\n box: 'h-11 rounded-md',\n },\n inputStyle: { soft: '', surface: '', outlined: '', ghost: '' },\n inputColor: { brand: '', gray: '' },\n },\n compoundVariants: [\n {\n chrome: 'box',\n inputStyle: 'soft',\n inputColor: 'brand',\n class: boxChrome.soft.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'soft',\n inputColor: 'gray',\n class: boxChrome.soft.gray,\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'brand',\n class: boxChrome.surface.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'gray',\n class: boxChrome.surface.gray,\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'brand',\n class: boxChrome.outlined.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'gray',\n class: boxChrome.outlined.gray,\n },\n {\n chrome: 'box',\n inputStyle: 'ghost',\n inputColor: 'brand',\n class: boxChrome.ghost.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'ghost',\n inputColor: 'gray',\n class: boxChrome.ghost.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\ninterface InputOtpProps extends Pick<\n OTPFieldRootProps,\n | 'value'\n | 'defaultValue'\n | 'onValueChange'\n | 'disabled'\n | 'className'\n | 'id'\n | 'validationType'\n> {\n /** Number of code slots. */\n length?: number\n /** Fired when every slot is filled. */\n onComplete?: OTPFieldRootProps['onValueComplete']\n /** Accessible name per slot (for localization). */\n slotAriaLabel?: (index: number) => string\n}\n\nfunction InputOtp({\n length = 6,\n className,\n id: idProp,\n onComplete,\n slotAriaLabel = (index) => `Character ${index + 1}`,\n validationType = 'alphanumeric',\n ...props\n}: InputOtpProps) {\n const { field, id, ariaDescribedBy, ariaInvalid, inputStyle, inputColor } =\n useFieldControl({ id: idProp })\n useKeepLabelOutset()\n const chrome = field?.labelPosition === 'inset' ? 'inset' : 'box'\n\n return (\n <OTPField.Root\n data-slot=\"input-otp\"\n length={length}\n id={id}\n validationType={validationType}\n onValueComplete={onComplete}\n className={cn('flex items-center gap-2', className)}\n {...props}\n >\n {Array.from({ length }, (_, index) => (\n <OTPField.Input\n key={index}\n data-slot=\"input-otp-slot\"\n // the first slot is named by the Field label (Base UI ignores\n // aria-label there); the rest get a positional name for a11y\n aria-label={index === 0 ? undefined : slotAriaLabel(index)}\n aria-describedby={index === 0 ? ariaDescribedBy : undefined}\n aria-invalid={index === 0 ? ariaInvalid : undefined}\n className={cn(slotVariants({ chrome, inputStyle, inputColor }))}\n />\n ))}\n </OTPField.Root>\n )\n}\n\nexport { InputOtp }\nexport type { InputOtpProps }\n"],"mappings":";;;;;;;;AAQA,MAAM,eAAe,IACnB,6YACA;CACE,UAAU;EACR,QAAQ;GAGN,OAAO;GACP,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;GACZ,YAAY;GACZ,OAAO,UAAU,KAAK;EACxB;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAO,UAAU,KAAK;EACxB;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAO,UAAU,QAAQ;EAC3B;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAO,UAAU,QAAQ;EAC3B;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAO,UAAU,SAAS;EAC5B;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAO,UAAU,SAAS;EAC5B;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAO,UAAU,MAAM;EACzB;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAO,UAAU,MAAM;EACzB;EACA;GAAE,QAAQ;GAAS,YAAY;GAAS,OAAO;EAAiB;EAChE;GAAE,QAAQ;GAAS,YAAY;GAAQ,OAAO;EAAsB;CACtE;AACF,CACF;AAoBA,SAAS,SAAS,EAChB,SAAS,GACT,WACA,IAAI,QACJ,YACA,iBAAiB,UAAU,aAAa,QAAQ,KAChD,iBAAiB,gBACjB,GAAG,SACa;CAChB,MAAM,EAAE,OAAO,IAAI,iBAAiB,aAAa,YAAY,eAC3D,gBAAgB,EAAE,IAAI,OAAO,CAAC;CAChC,mBAAmB;CACnB,MAAM,SAAS,OAAO,kBAAkB,UAAU,UAAU;CAE5D,OACE,oBAAC,SAAS,MAAV;EACE,aAAU;EACF;EACJ;EACY;EAChB,iBAAiB;EACjB,WAAW,GAAG,2BAA2B,SAAS;EAClD,GAAI;YAEH,MAAM,KAAK,EAAE,OAAO,IAAI,GAAG,UAC1B,oBAAC,SAAS,OAAV;GAEE,aAAU;GAGV,cAAY,UAAU,IAAI,KAAA,IAAY,cAAc,KAAK;GACzD,oBAAkB,UAAU,IAAI,kBAAkB,KAAA;GAClD,gBAAc,UAAU,IAAI,cAAc,KAAA;GAC1C,WAAW,GAAG,aAAa;IAAE;IAAQ;IAAY;GAAW,CAAC,CAAC;EAC/D,GARM,KAQN,CACF;CACY,CAAA;AAEnB"}
1
+ {"version":3,"file":"input-otp.js","names":[],"sources":["../../src/components/input-otp.tsx"],"sourcesContent":["import { OTPField, type OTPFieldRootProps } from '@base-ui/react/otp-field'\nimport { cva } from 'class-variance-authority'\nimport { boxChrome, INSET_UNDERLINE } from '../lib/input-box-variants'\nimport { cn } from '../utils/cn'\nimport { useFieldControl, useKeepLabelOutset } from './field'\n\n// One code box per slot. Mirrors Input's box/underline carrier model so the\n// slots read like the rest of the input family across every style/color knob.\nconst slotVariants = cva(\n 'flex w-11 min-w-0 items-center justify-center bg-transparent text-center text-base font-medium text-gray tabular-nums transition-[color,background-color,border-color] placeholder:text-gray-placeholder disabled:cursor-not-allowed disabled:text-gray-disabled disabled:placeholder:text-gray-disabled motion-reduce:transition-none',\n {\n variants: {\n chrome: {\n // inside an inset field the shell is the box; slots keep the classic\n // underline (the pre-knob default look)\n inset: INSET_UNDERLINE,\n box: 'h-11 rounded-md',\n },\n inputStyle: { soft: '', surface: '', outlined: '', ghost: '' },\n inputColor: { brand: '', gray: '' },\n },\n compoundVariants: [\n {\n chrome: 'box',\n inputStyle: 'soft',\n inputColor: 'brand',\n class: boxChrome.soft.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'soft',\n inputColor: 'gray',\n class: boxChrome.soft.gray,\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'brand',\n class: boxChrome.surface.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'gray',\n class: boxChrome.surface.gray,\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'brand',\n class: boxChrome.outlined.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'gray',\n class: boxChrome.outlined.gray,\n },\n {\n chrome: 'box',\n inputStyle: 'ghost',\n inputColor: 'brand',\n class: boxChrome.ghost.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'ghost',\n inputColor: 'gray',\n class: boxChrome.ghost.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\ninterface InputOtpProps extends Pick<\n OTPFieldRootProps,\n | 'value'\n | 'defaultValue'\n | 'onValueChange'\n | 'disabled'\n | 'className'\n | 'id'\n | 'validationType'\n> {\n /** Number of code slots. */\n length?: number\n /** Fired when every slot is filled. */\n onComplete?: OTPFieldRootProps['onValueComplete']\n /** Accessible name per slot (for localization). */\n slotAriaLabel?: (index: number) => string\n}\n\nfunction InputOtp({\n length = 6,\n className,\n id: idProp,\n onComplete,\n slotAriaLabel = (index) => `Character ${index + 1}`,\n validationType = 'alphanumeric',\n ...props\n}: InputOtpProps) {\n const { field, id, ariaDescribedBy, ariaInvalid, inputStyle, inputColor } =\n useFieldControl({ id: idProp })\n useKeepLabelOutset()\n const chrome = field?.labelPosition === 'inset' ? 'inset' : 'box'\n\n return (\n <OTPField.Root\n data-slot=\"input-otp\"\n length={length}\n id={id}\n validationType={validationType}\n onValueComplete={onComplete}\n className={cn('flex items-center gap-2', className)}\n {...props}\n >\n {Array.from({ length }, (_, index) => (\n <OTPField.Input\n key={index}\n data-slot=\"input-otp-slot\"\n // the first slot is named by the Field label (Base UI ignores\n // aria-label there); the rest get a positional name for a11y\n aria-label={index === 0 ? undefined : slotAriaLabel(index)}\n aria-describedby={index === 0 ? ariaDescribedBy : undefined}\n aria-invalid={index === 0 ? ariaInvalid : undefined}\n className={cn(slotVariants({ chrome, inputStyle, inputColor }))}\n />\n ))}\n </OTPField.Root>\n )\n}\n\nexport { InputOtp }\nexport type { InputOtpProps }\n"],"mappings":";;;;;;;;AAQA,MAAM,eAAe,IACnB,0UACA;CACE,UAAU;EACR,QAAQ;GAGN,OAAO;GACP,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;GACZ,YAAY;GACZ,OAAO,UAAU,KAAK;EACxB;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAO,UAAU,KAAK;EACxB;EACA;GACE,QAAQ;GACR,YAA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
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_input_box_variants = require("../lib/input-box-variants.cjs");
5
4
  const require_components_field = require("./field.cjs");
5
+ const require_lib_input_box_variants = require("../lib/input-box-variants.cjs");
6
6
  let react = require("react");
7
7
  react = require_chunk.__toESM(react);
8
- let class_variance_authority = require("class-variance-authority");
9
8
  let react_jsx_runtime = require("react/jsx-runtime");
9
+ let class_variance_authority = require("class-variance-authority");
10
10
  let cn = require("cn");
11
11
  //#region src/components/input.tsx
12
- const inputVariants = (0, class_variance_authority.cva)("flex h-10 w-full min-w-0 [appearance:textfield] bg-transparent text-gray transition-[color,background-color,border-color] group-data-[invalid=true]/field:text-error placeholder:text-gray-placeholder disabled:cursor-not-allowed disabled:text-gray-disabled disabled:placeholder:text-gray-disabled aria-invalid:text-error motion-reduce:transition-none [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none", {
12
+ const inputVariants = (0, class_variance_authority.cva)("flex h-10 w-full min-w-0 [appearance:textfield] bg-transparent text-gray transition-[color,background-color,border-color] placeholder:text-gray-placeholder disabled:cursor-not-allowed disabled:text-gray-disabled disabled:placeholder:text-gray-disabled motion-reduce:transition-none [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none", {
13
13
  variants: {
14
14
  chrome: {
15
15
  none: "border-0 px-0 focus-visible:outline-hidden",
@@ -1 +1 @@
1
- {"version":3,"file":"input.cjs","names":["INSET_UNDERLINE","boxChrome","React","useFieldControl","floatingChrome"],"sources":["../../src/components/input.tsx"],"sourcesContent":["import { cva } from 'class-variance-authority'\nimport * as React from 'react'\nimport {\n boxChrome,\n FLOATING_PLACEHOLDER,\n floatingChrome,\n INSET_UNDERLINE,\n} from '../lib/input-box-variants'\nimport type { SparkInputStyle } from '../lib/theme-types'\nimport { cn } from '../utils/cn'\nimport { useFieldControl } from './field'\n\ntype InputVariant = SparkInputStyle | 'none'\n\nconst inputVariants = cva(\n 'flex h-10 w-full min-w-0 [appearance:textfield] bg-transparent text-gray transition-[color,background-color,border-color] group-data-[invalid=true]/field:text-error placeholder:text-gray-placeholder disabled:cursor-not-allowed disabled:text-gray-disabled disabled:placeholder:text-gray-disabled aria-invalid:text-error motion-reduce:transition-none [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none',\n {\n variants: {\n chrome: {\n none: 'border-0 px-0 focus-visible:outline-hidden',\n // inside an inset field the shell is the box; the input keeps the\n // classic underline (the pre-knob default look)\n inset: INSET_UNDERLINE,\n box: 'h-11 rounded-md px-3 py-1 text-base transition-[color,background-color,border-color] 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 inputColor: 'brand',\n class: boxChrome.soft.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'soft',\n inputColor: 'gray',\n class: boxChrome.soft.gray,\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'brand',\n class: boxChrome.surface.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'gray',\n class: boxChrome.surface.gray,\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'brand',\n class: boxChrome.outlined.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'gray',\n class: boxChrome.outlined.gray,\n },\n {\n chrome: 'box',\n inputStyle: 'ghost',\n inputColor: 'brand',\n class: boxChrome.ghost.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'ghost',\n inputColor: 'gray',\n class: boxChrome.ghost.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\ninterface InputProps extends React.ComponentProps<'input'> {\n variant?: InputVariant\n}\n\n// forwardRef keeps refs working for React 18 consumers (ref-as-prop is 19-only)\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(function Input(\n {\n variant,\n className,\n placeholder,\n id: idProp,\n 'aria-describedby': ariaDescribedByProp,\n ...props\n },\n ref,\n) {\n const { field, id, ariaDescribedBy, ariaInvalid, inputStyle, inputColor } =\n useFieldControl({\n id: idProp,\n ariaDescribedBy: ariaDescribedByProp,\n variant: variant !== 'none' ? variant : undefined,\n })\n // an explicit variant prop keeps the box even inside an inset field\n const chrome =\n variant === 'none'\n ? 'none'\n : !variant && field?.labelPosition === 'inset'\n ? 'inset'\n : 'box'\n const floating = field?.labelPosition === 'floating'\n const floatingBox = floating && chrome === 'box'\n\n return (\n <input\n data-slot=\"input\"\n data-floating-control={floatingBox || undefined}\n className={cn(\n inputVariants({ chrome, inputStyle, inputColor }),\n floatingBox && floatingChrome(inputStyle),\n className,\n )}\n id={id}\n placeholder={placeholder ?? (floating ? FLOATING_PLACEHOLDER : undefined)}\n ref={ref}\n aria-invalid={ariaInvalid}\n {...props}\n aria-describedby={ariaDescribedBy}\n />\n )\n})\n\nexport { Input }\nexport type { InputProps, InputVariant }\n"],"mappings":";;;;;;;;;;;AAcA,MAAM,iBAAA,GAAA,yBAAA,KACJ,8bACA;CACE,UAAU;EACR,QAAQ;GACN,MAAM;GAGN,OAAOA,+BAAAA;GACP,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;GACZ,YAAY;GACZ,OAAOC,+BAAAA,UAAU,KAAK;EACxB;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAOA,+BAAAA,UAAU,KAAK;EACxB;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAOA,+BAAAA,UAAU,QAAQ;EAC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"file":"input.cjs","names":["INSET_UNDERLINE","boxChrome","React","useFieldControl","floatingChrome"],"sources":["../../src/components/input.tsx"],"sourcesContent":["import { cva } from 'class-variance-authority'\nimport * as React from 'react'\nimport {\n boxChrome,\n FLOATING_PLACEHOLDER,\n floatingChrome,\n INSET_UNDERLINE,\n} from '../lib/input-box-variants'\nimport type { SparkInputStyle } from '../lib/theme-types'\nimport { cn } from '../utils/cn'\nimport { useFieldControl } from './field'\n\ntype InputVariant = SparkInputStyle | 'none'\n\nconst inputVariants = cva(\n 'flex h-10 w-full min-w-0 [appearance:textfield] bg-transparent text-gray transition-[color,background-color,border-color] placeholder:text-gray-placeholder disabled:cursor-not-allowed disabled:text-gray-disabled disabled:placeholder:text-gray-disabled motion-reduce:transition-none [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none',\n {\n variants: {\n chrome: {\n none: 'border-0 px-0 focus-visible:outline-hidden',\n // inside an inset field the shell is the box; the input keeps the\n // classic underline (the pre-knob default look)\n inset: INSET_UNDERLINE,\n box: 'h-11 rounded-md px-3 py-1 text-base transition-[color,background-color,border-color] 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 inputColor: 'brand',\n class: boxChrome.soft.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'soft',\n inputColor: 'gray',\n class: boxChrome.soft.gray,\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'brand',\n class: boxChrome.surface.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'gray',\n class: boxChrome.surface.gray,\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'brand',\n class: boxChrome.outlined.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'gray',\n class: boxChrome.outlined.gray,\n },\n {\n chrome: 'box',\n inputStyle: 'ghost',\n inputColor: 'brand',\n class: boxChrome.ghost.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'ghost',\n inputColor: 'gray',\n class: boxChrome.ghost.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\ninterface InputProps extends React.ComponentProps<'input'> {\n variant?: InputVariant\n}\n\n// forwardRef keeps refs working for React 18 consumers (ref-as-prop is 19-only)\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(function Input(\n {\n variant,\n className,\n placeholder,\n id: idProp,\n 'aria-describedby': ariaDescribedByProp,\n ...props\n },\n ref,\n) {\n const { field, id, ariaDescribedBy, ariaInvalid, inputStyle, inputColor } =\n useFieldControl({\n id: idProp,\n ariaDescribedBy: ariaDescribedByProp,\n variant: variant !== 'none' ? variant : undefined,\n })\n // an explicit variant prop keeps the box even inside an inset field\n const chrome =\n variant === 'none'\n ? 'none'\n : !variant && field?.labelPosition === 'inset'\n ? 'inset'\n : 'box'\n const floating = field?.labelPosition === 'floating'\n const floatingBox = floating && chrome === 'box'\n\n return (\n <input\n data-slot=\"input\"\n data-floating-control={floatingBox || undefined}\n className={cn(\n inputVariants({ chrome, inputStyle, inputColor }),\n floatingBox && floatingChrome(inputStyle),\n className,\n )}\n id={id}\n placeholder={placeholder ?? (floating ? FLOATING_PLACEHOLDER : undefined)}\n ref={ref}\n aria-invalid={ariaInvalid}\n {...props}\n aria-describedby={ariaDescribedBy}\n />\n )\n})\n\nexport { Input }\nexport type { InputProps, InputVariant }\n"],"mappings":";;;;;;;;;;;AAcA,MAAM,iBAAA,GAAA,yBAAA,KACJ,2XACA;CACE,UAAU;EACR,QAAQ;GACN,MAAM;GAGN,OAAOA,+BAAAA;GACP,KAAK;EACP;EACA,YAAY;GAAE,MAAM;GAAI,SAAS;GAAI,UAAU;GAAI,OAAO;EAAG;EAC7D,YAAY;GAAE,OAAO;GAAI,MAAM;EAAG;CACpC;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,eAAe,KAAA;EACtC,YAAA,GAAA,GAAA,IACE,cAAc;GAAE;GAAQ;GAAY;EAAW,CAAC,GAChD,eAAeC,+BAAAA,eAAe,UAAU,GACxC,SACF;EACI;EACJ,aAAa,gBAAgB,WAAA,MAAkC,KAAA;EAC1D;EACL,gBAAc;EACd,GAAI;EACJ,oBAAkB;CACnB,CAAA;AAEL,CAAC"}
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
  import { cn } from "../utils/cn.js";
3
- import { INSET_UNDERLINE, boxChrome, floatingChrome } from "../lib/input-box-variants.js";
4
3
  import { useFieldControl } from "./field.js";
4
+ import { INSET_UNDERLINE, boxChrome, floatingChrome } from "../lib/input-box-variants.js";
5
5
  import * as React$1 from "react";
6
- import { cva } from "class-variance-authority";
7
6
  import { jsx } from "react/jsx-runtime";
7
+ import { cva } from "class-variance-authority";
8
8
  //#region src/components/input.tsx
9
- const inputVariants = cva("flex h-10 w-full min-w-0 [appearance:textfield] bg-transparent text-gray transition-[color,background-color,border-color] group-data-[invalid=true]/field:text-error placeholder:text-gray-placeholder disabled:cursor-not-allowed disabled:text-gray-disabled disabled:placeholder:text-gray-disabled aria-invalid:text-error motion-reduce:transition-none [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none", {
9
+ const inputVariants = cva("flex h-10 w-full min-w-0 [appearance:textfield] bg-transparent text-gray transition-[color,background-color,border-color] placeholder:text-gray-placeholder disabled:cursor-not-allowed disabled:text-gray-disabled disabled:placeholder:text-gray-disabled motion-reduce:transition-none [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none", {
10
10
  variants: {
11
11
  chrome: {
12
12
  none: "border-0 px-0 focus-visible:outline-hidden",
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","names":["React"],"sources":["../../src/components/input.tsx"],"sourcesContent":["import { cva } from 'class-variance-authority'\nimport * as React from 'react'\nimport {\n boxChrome,\n FLOATING_PLACEHOLDER,\n floatingChrome,\n INSET_UNDERLINE,\n} from '../lib/input-box-variants'\nimport type { SparkInputStyle } from '../lib/theme-types'\nimport { cn } from '../utils/cn'\nimport { useFieldControl } from './field'\n\ntype InputVariant = SparkInputStyle | 'none'\n\nconst inputVariants = cva(\n 'flex h-10 w-full min-w-0 [appearance:textfield] bg-transparent text-gray transition-[color,background-color,border-color] group-data-[invalid=true]/field:text-error placeholder:text-gray-placeholder disabled:cursor-not-allowed disabled:text-gray-disabled disabled:placeholder:text-gray-disabled aria-invalid:text-error motion-reduce:transition-none [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none',\n {\n variants: {\n chrome: {\n none: 'border-0 px-0 focus-visible:outline-hidden',\n // inside an inset field the shell is the box; the input keeps the\n // classic underline (the pre-knob default look)\n inset: INSET_UNDERLINE,\n box: 'h-11 rounded-md px-3 py-1 text-base transition-[color,background-color,border-color] 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 inputColor: 'brand',\n class: boxChrome.soft.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'soft',\n inputColor: 'gray',\n class: boxChrome.soft.gray,\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'brand',\n class: boxChrome.surface.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'gray',\n class: boxChrome.surface.gray,\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'brand',\n class: boxChrome.outlined.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'gray',\n class: boxChrome.outlined.gray,\n },\n {\n chrome: 'box',\n inputStyle: 'ghost',\n inputColor: 'brand',\n class: boxChrome.ghost.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'ghost',\n inputColor: 'gray',\n class: boxChrome.ghost.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\ninterface InputProps extends React.ComponentProps<'input'> {\n variant?: InputVariant\n}\n\n// forwardRef keeps refs working for React 18 consumers (ref-as-prop is 19-only)\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(function Input(\n {\n variant,\n className,\n placeholder,\n id: idProp,\n 'aria-describedby': ariaDescribedByProp,\n ...props\n },\n ref,\n) {\n const { field, id, ariaDescribedBy, ariaInvalid, inputStyle, inputColor } =\n useFieldControl({\n id: idProp,\n ariaDescribedBy: ariaDescribedByProp,\n variant: variant !== 'none' ? variant : undefined,\n })\n // an explicit variant prop keeps the box even inside an inset field\n const chrome =\n variant === 'none'\n ? 'none'\n : !variant && field?.labelPosition === 'inset'\n ? 'inset'\n : 'box'\n const floating = field?.labelPosition === 'floating'\n const floatingBox = floating && chrome === 'box'\n\n return (\n <input\n data-slot=\"input\"\n data-floating-control={floatingBox || undefined}\n className={cn(\n inputVariants({ chrome, inputStyle, inputColor }),\n floatingBox && floatingChrome(inputStyle),\n className,\n )}\n id={id}\n placeholder={placeholder ?? (floating ? FLOATING_PLACEHOLDER : undefined)}\n ref={ref}\n aria-invalid={ariaInvalid}\n {...props}\n aria-describedby={ariaDescribedBy}\n />\n )\n})\n\nexport { Input }\nexport type { InputProps, InputVariant }\n"],"mappings":";;;;;;;;AAcA,MAAM,gBAAgB,IACpB,8bACA;CACE,UAAU;EACR,QAAQ;GACN,MAAM;GAGN,OAAO;GACP,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;GACZ,YAAY;GACZ,OAAO,UAAU,KAAK;EACxB;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAO,UAAU,KAAK;EACxB;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAO,UAAU,QAAQ;EAC3B;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAO,UAAU,QAAQ;EAC3B;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAO,UAAU,SAAS;EAC5B;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAO,UAAU,SAAS;EAC5B;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAO,UAAU,MAAM;EACzB;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAO,UAAU,MAAM;EACzB;EACA;GAAE,QAAQ;GAAS,YAAY;GAAS,OAAO;EAAiB;EAChE;GAAE,QAAQ;GAAS,YAAY;GAAQ,OAAO;EAAsB;CACtE;AACF,CACF;AAOA,MAAM,QAAQA,QAAM,WAAyC,SAAS,MACpE,EACE,SACA,WACA,aACA,IAAI,QACJ,oBAAoB,qBACpB,GAAG,SAEL,KACA;CACA,MAAM,EAAE,OAAO,IAAI,iBAAiB,aAAa,YAAY,eAC3D,gBAAgB;EACd,IAAI;EACJ,iBAAiB;EACjB,SAAS,YAAY,SAAS,UAAU,KAAA;CAC1C,CAAC;CAEH,MAAM,SACJ,YAAY,SACR,SACA,CAAC,WAAW,OAAO,kBAAkB,UACnC,UACA;CACR,MAAM,WAAW,OAAO,kBAAkB;CAC1C,MAAM,cAAc,YAAY,WAAW;CAE3C,OACE,oBAAC,SAAD;EACE,aAAU;EACV,yBAAuB,eAAe,KAAA;EACtC,WAAW,GACT,cAAc;GAAE;GAAQ;GAAY;EAAW,CAAC,GAChD,eAAe,eAAe,UAAU,GACxC,SACF;EACI;EACJ,aAAa,gBAAgB,WAAA,MAAkC,KAAA;EAC1D;EACL,gBAAc;EACd,GAAI;EACJ,oBAAkB;CACnB,CAAA;AAEL,CAAC"}
1
+ {"version":3,"file":"input.js","names":["React"],"sources":["../../src/components/input.tsx"],"sourcesContent":["import { cva } from 'class-variance-authority'\nimport * as React from 'react'\nimport {\n boxChrome,\n FLOATING_PLACEHOLDER,\n floatingChrome,\n INSET_UNDERLINE,\n} from '../lib/input-box-variants'\nimport type { SparkInputStyle } from '../lib/theme-types'\nimport { cn } from '../utils/cn'\nimport { useFieldControl } from './field'\n\ntype InputVariant = SparkInputStyle | 'none'\n\nconst inputVariants = cva(\n 'flex h-10 w-full min-w-0 [appearance:textfield] bg-transparent text-gray transition-[color,background-color,border-color] placeholder:text-gray-placeholder disabled:cursor-not-allowed disabled:text-gray-disabled disabled:placeholder:text-gray-disabled motion-reduce:transition-none [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none',\n {\n variants: {\n chrome: {\n none: 'border-0 px-0 focus-visible:outline-hidden',\n // inside an inset field the shell is the box; the input keeps the\n // classic underline (the pre-knob default look)\n inset: INSET_UNDERLINE,\n box: 'h-11 rounded-md px-3 py-1 text-base transition-[color,background-color,border-color] 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 inputColor: 'brand',\n class: boxChrome.soft.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'soft',\n inputColor: 'gray',\n class: boxChrome.soft.gray,\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'brand',\n class: boxChrome.surface.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'gray',\n class: boxChrome.surface.gray,\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'brand',\n class: boxChrome.outlined.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'gray',\n class: boxChrome.outlined.gray,\n },\n {\n chrome: 'box',\n inputStyle: 'ghost',\n inputColor: 'brand',\n class: boxChrome.ghost.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'ghost',\n inputColor: 'gray',\n class: boxChrome.ghost.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\ninterface InputProps extends React.ComponentProps<'input'> {\n variant?: InputVariant\n}\n\n// forwardRef keeps refs working for React 18 consumers (ref-as-prop is 19-only)\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(function Input(\n {\n variant,\n className,\n placeholder,\n id: idProp,\n 'aria-describedby': ariaDescribedByProp,\n ...props\n },\n ref,\n) {\n const { field, id, ariaDescribedBy, ariaInvalid, inputStyle, inputColor } =\n useFieldControl({\n id: idProp,\n ariaDescribedBy: ariaDescribedByProp,\n variant: variant !== 'none' ? variant : undefined,\n })\n // an explicit variant prop keeps the box even inside an inset field\n const chrome =\n variant === 'none'\n ? 'none'\n : !variant && field?.labelPosition === 'inset'\n ? 'inset'\n : 'box'\n const floating = field?.labelPosition === 'floating'\n const floatingBox = floating && chrome === 'box'\n\n return (\n <input\n data-slot=\"input\"\n data-floating-control={floatingBox || undefined}\n className={cn(\n inputVariants({ chrome, inputStyle, inputColor }),\n floatingBox && floatingChrome(inputStyle),\n className,\n )}\n id={id}\n placeholder={placeholder ?? (floating ? FLOATING_PLACEHOLDER : undefined)}\n ref={ref}\n aria-invalid={ariaInvalid}\n {...props}\n aria-describedby={ariaDescribedBy}\n />\n )\n})\n\nexport { Input }\nexport type { InputProps, InputVariant }\n"],"mappings":";;;;;;;;AAcA,MAAM,gBAAgB,IACpB,2XACA;CACE,UAAU;EACR,QAAQ;GACN,MAAM;GAGN,OAAO;GACP,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;GACZ,YAAY;GACZ,OAAO,UAAU,KAAK;EACxB;EACA;GACE,QAAQ;GACR,YAAY;G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@ -1,11 +1,11 @@
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_hooks_use_chart_zoom = require("../hooks/use-chart-zoom.cjs");
5
4
  const require_hooks_use_reduced_motion = require("../hooks/use-reduced-motion.cjs");
6
5
  const require_utils_format = require("../utils/format.cjs");
7
6
  const require_utils_chart_scale = require("../utils/chart-scale.cjs");
8
7
  const require_components_chart = require("./chart.cjs");
8
+ const require_hooks_use_chart_zoom = require("../hooks/use-chart-zoom.cjs");
9
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);
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import { useAnimatedChartDomain, useChartZoom } from "../hooks/use-chart-zoom.js";
3
- import { useReducedMotion } from "../hooks/use-reduced-motion.js";
4
2
  import { cn } from "../utils/cn.js";
3
+ import { useReducedMotion } from "../hooks/use-reduced-motion.js";
5
4
  import { getDocumentLang, localeNumberFormat } from "../utils/format.js";
6
5
  import { buildYAxisScale, formatYAxisTick } from "../utils/chart-scale.js";
7
6
  import { ChartTooltipCard, ChartZoomResetButton, clampTooltipPosition, useMeasuredSize } from "./chart.js";
7
+ import { useAnimatedChartDomain, useChartZoom } from "../hooks/use-chart-zoom.js";
8
8
  import { buildTimeTicks } from "../utils/chart-time-ticks.js";
9
9
  import * as React$1 from "react";
10
10
  import { useCallback, useMemo } from "react";
@@ -4,9 +4,9 @@ const require_chunk = require("../chunk-DY84GLCh.cjs");
4
4
  const require_components_skeleton = require("./skeleton.cjs");
5
5
  let react = require("react");
6
6
  react = require_chunk.__toESM(react);
7
+ let react_jsx_runtime = require("react/jsx-runtime");
7
8
  let class_variance_authority = require("class-variance-authority");
8
9
  let _base_ui_react_use_render = require("@base-ui/react/use-render");
9
- let react_jsx_runtime = require("react/jsx-runtime");
10
10
  let cn = require("cn");
11
11
  //#region src/components/list.tsx
12
12
  const radiusRowClasses = {
@@ -2,9 +2,9 @@
2
2
  import { cn } from "../utils/cn.js";
3
3
  import { Skeleton } from "./skeleton.js";
4
4
  import * as React$1 from "react";
5
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
6
  import { cva } from "class-variance-authority";
6
7
  import { useRender } from "@base-ui/react/use-render";
7
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
8
  //#region src/components/list.tsx
9
9
  const radiusRowClasses = {
10
10
  none: "group-data-[list-radius=none]/list:first:rounded-t-none group-data-[list-radius=none]/list:last:rounded-b-none",
@@ -3,10 +3,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const require_chunk = require("../chunk-DY84GLCh.cjs");
4
4
  let react = require("react");
5
5
  react = require_chunk.__toESM(react);
6
+ let react_jsx_runtime = require("react/jsx-runtime");
6
7
  let class_variance_authority = require("class-variance-authority");
7
8
  let _base_ui_react_merge_props = require("@base-ui/react/merge-props");
8
9
  let _base_ui_react_use_render = require("@base-ui/react/use-render");
9
- let react_jsx_runtime = require("react/jsx-runtime");
10
10
  let cn = require("cn");
11
11
  //#region src/components/marker.tsx
12
12
  const markerVariants = (0, class_variance_authority.cva)("group/marker relative flex min-h-4 w-full items-center gap-2 text-left text-sm text-gray-light [&_svg:not([class*='size-'])]:size-4 [a]:underline [a]:underline-offset-3 [a]:hover:text-gray [&:is(button,a)]:focus-visible:rounded-sm", { variants: { variant: {
@@ -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,10 +1,10 @@
1
1
  "use client";
2
2
  import { cn } from "../utils/cn.js";
3
3
  import "react";
4
+ import { jsx } from "react/jsx-runtime";
4
5
  import { cva } from "class-variance-authority";
5
6
  import { mergeProps } from "@base-ui/react/merge-props";
6
7
  import { useRender } from "@base-ui/react/use-render";
7
- import { jsx } from "react/jsx-runtime";
8
8
  //#region src/components/marker.tsx
9
9
  const markerVariants = cva("group/marker relative flex min-h-4 w-full items-center gap-2 text-left text-sm text-gray-light [&_svg:not([class*='size-'])]:size-4 [a]:underline [a]:underline-offset-3 [a]:hover:text-gray [&:is(button,a)]:focus-visible:rounded-sm", { variants: { variant: {
10
10
  default: "[&:is(button,a)]:touch-target",
@@ -1,12 +1,12 @@
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_hooks_use_reduced_motion = require("../hooks/use-reduced-motion.cjs");
5
4
  const require_components_button = require("./button.cjs");
5
+ const require_hooks_use_reduced_motion = require("../hooks/use-reduced-motion.cjs");
6
6
  const require_lib_message_animations = require("../lib/message-animations.cjs");
7
+ let _epilot_spark_icons = require("@epilot/spark-icons");
7
8
  let react = require("react");
8
9
  react = require_chunk.__toESM(react);
9
- let _epilot_spark_icons = require("@epilot/spark-icons");
10
10
  let react_jsx_runtime = require("react/jsx-runtime");
11
11
  let _shadcn_react_message_scroller = require("@shadcn/react/message-scroller");
12
12
  let motion_react = require("motion/react");
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import { r as ButtonProps } from "../button-CT39v1M3.cjs";
3
+ import { r as ButtonProps } from "../button-C-KeUy2j.cjs";
4
4
  import * as React$1 from "react";
5
5
  import { MessageScroller as MessageScroller$1, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from "@shadcn/react/message-scroller";
6
6
 
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import { r as ButtonProps } from "../button-i1Bgbw4p.js";
3
+ import { r as ButtonProps } from "../button-4QGaO78M.js";
4
4
  import * as React$1 from "react";
5
5
  import { MessageScroller as MessageScroller$1, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from "@shadcn/react/message-scroller";
6
6
 
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import { useReducedMotion } from "../hooks/use-reduced-motion.js";
3
2
  import { cn } from "../utils/cn.js";
4
3
  import { Button } from "./button.js";
4
+ import { useReducedMotion } from "../hooks/use-reduced-motion.js";
5
5
  import { MESSAGE_ANIMATIONS } from "../lib/message-animations.js";
6
- import * as React$1 from "react";
7
6
  import { ArrowDownward, ArrowUpward } from "@epilot/spark-icons";
7
+ import * as React$1 from "react";
8
8
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
9
  import { MessageScroller as MessageScroller$1, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from "@shadcn/react/message-scroller";
10
10
  import { LazyMotion, domAnimation } from "motion/react";
@@ -3,12 +3,12 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const require_chunk = require("../chunk-DY84GLCh.cjs");
4
4
  const require_components_button = require("./button.cjs");
5
5
  const require_components_typography = require("./typography.cjs");
6
+ let _epilot_spark_icons = require("@epilot/spark-icons");
6
7
  let react = require("react");
7
8
  react = require_chunk.__toESM(react);
8
- let _epilot_spark_icons = require("@epilot/spark-icons");
9
+ let react_jsx_runtime = require("react/jsx-runtime");
9
10
  let _base_ui_react_merge_props = require("@base-ui/react/merge-props");
10
11
  let _base_ui_react_use_render = require("@base-ui/react/use-render");
11
- let react_jsx_runtime = require("react/jsx-runtime");
12
12
  let cn = require("cn");
13
13
  //#region src/components/page-header.tsx
14
14
  const PageHeader = react.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("header", {
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
 
3
- import { r as ButtonProps } from "../button-CT39v1M3.cjs";
3
+ import { r as ButtonProps } from "../button-C-KeUy2j.cjs";
4
4
  import * as React$1 from "react";
5
5
  import { useRender } from "@base-ui/react/use-render";
6
6
 
7
7
  //#region src/components/page-header.d.ts
8
8
  declare const PageHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & React$1.RefAttributes<HTMLElement>>;
9
- declare const PageHeaderBackButton: React$1.ForwardRefExoticComponent<Omit<ButtonProps, "size" | "styleVariant" | "color"> & React$1.RefAttributes<HTMLButtonElement>>;
9
+ declare const PageHeaderBackButton: React$1.ForwardRefExoticComponent<Omit<ButtonProps, "color" | "size" | "styleVariant"> & React$1.RefAttributes<HTMLButtonElement>>;
10
10
  declare const PageHeaderTitle: ({
11
11
  className,
12
12
  ...props
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
 
3
- import { r as ButtonProps } from "../button-i1Bgbw4p.js";
3
+ import { r as ButtonProps } from "../button-4QGaO78M.js";
4
4
  import * as React$1 from "react";
5
5
  import { useRender } from "@base-ui/react/use-render";
6
6
 
7
7
  //#region src/components/page-header.d.ts
8
8
  declare const PageHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & React$1.RefAttributes<HTMLElement>>;
9
- declare const PageHeaderBackButton: React$1.ForwardRefExoticComponent<Omit<ButtonProps, "size" | "styleVariant" | "color"> & React$1.RefAttributes<HTMLButtonElement>>;
9
+ declare const PageHeaderBackButton: React$1.ForwardRefExoticComponent<Omit<ButtonProps, "color" | "size" | "styleVariant"> & React$1.RefAttributes<HTMLButtonElement>>;
10
10
  declare const PageHeaderTitle: ({
11
11
  className,
12
12
  ...props
@@ -2,11 +2,11 @@
2
2
  import { cn } from "../utils/cn.js";
3
3
  import { Button } from "./button.js";
4
4
  import { PageTitle } from "./typography.js";
5
- import * as React$1 from "react";
6
5
  import { ChevronLeft } from "@epilot/spark-icons";
6
+ import * as React$1 from "react";
7
+ import { jsx } from "react/jsx-runtime";
7
8
  import { mergeProps } from "@base-ui/react/merge-props";
8
9
  import { useRender } from "@base-ui/react/use-render";
9
- import { jsx } from "react/jsx-runtime";
10
10
  //#region src/components/page-header.tsx
11
11
  const PageHeader = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("header", {
12
12
  ref,
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const require_chunk = require("../chunk-DY84GLCh.cjs");
5
5
  const require_components_button = require("./button.cjs");
6
+ let _epilot_spark_icons = require("@epilot/spark-icons");
6
7
  let react = require("react");
7
8
  react = require_chunk.__toESM(react);
8
- let _epilot_spark_icons = require("@epilot/spark-icons");
9
9
  let react_jsx_runtime = require("react/jsx-runtime");
10
10
  let cn = require("cn");
11
11
  //#region src/components/pagination.tsx
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import { r as ButtonProps } from "../button-CT39v1M3.cjs";
3
+ import { r as ButtonProps } from "../button-C-KeUy2j.cjs";
4
4
  import * as React$1 from "react";
5
5
 
6
6
  //#region src/components/pagination.d.ts
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import { r as ButtonProps } from "../button-i1Bgbw4p.js";
3
+ import { r as ButtonProps } from "../button-4QGaO78M.js";
4
4
  import * as React$1 from "react";
5
5
 
6
6
  //#region src/components/pagination.d.ts
@@ -2,8 +2,8 @@
2
2
  "use client";
3
3
  import { cn } from "../utils/cn.js";
4
4
  import { Button } from "./button.js";
5
- import * as React$1 from "react";
6
5
  import { ChevronLeft, ChevronRight, FirstPage, LastPage } from "@epilot/spark-icons";
6
+ import * as React$1 from "react";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  //#region src/components/pagination.tsx
9
9
  const PaginationContext = React$1.createContext(null);
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import { r as ButtonProps } from "../button-CT39v1M3.cjs";
3
+ import { r as ButtonProps } from "../button-C-KeUy2j.cjs";
4
4
 
5
5
  //#region src/components/period-tabs.d.ts
6
6
  type PeriodStepperButtonProps = Omit<ButtonProps, 'styleVariant' | 'color' | 'size' | 'children' | 'aria-label'> & {
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import { r as ButtonProps } from "../button-i1Bgbw4p.js";
3
+ import { r as ButtonProps } from "../button-4QGaO78M.js";
4
4
 
5
5
  //#region src/components/period-tabs.d.ts
6
6
  type PeriodStepperButtonProps = Omit<ButtonProps, 'styleVariant' | 'color' | 'size' | 'children' | 'aria-label'> & {
@@ -5,8 +5,8 @@ const require_chunk = require("../chunk-DY84GLCh.cjs");
5
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
- let _base_ui_react_button = require("@base-ui/react/button");
9
8
  let react_jsx_runtime = require("react/jsx-runtime");
9
+ let _base_ui_react_button = require("@base-ui/react/button");
10
10
  let cn = require("cn");
11
11
  //#region src/components/pill.tsx
12
12
  const PillDisabledContext = react.createContext(false);
@@ -27,7 +27,7 @@ type PillButtonProps = Omit<React$1.ComponentProps<typeof Button>, 'ref' | 'clas
27
27
  'aria-label': string;
28
28
  };
29
29
  /** A button inside a static `Pill` (no `onClick`); it is disabled with the pill. */
30
- declare const PillButton: React$1.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").ButtonProps, "ref"> & React$1.RefAttributes<HTMLElement>, "ref" | "className" | "aria-label"> & {
30
+ declare const PillButton: React$1.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").ButtonProps, "ref"> & React$1.RefAttributes<HTMLElement>, "className" | "ref" | "aria-label"> & {
31
31
  className?: string; /** Names the button; the icon inside is decorative. */
32
32
  'aria-label': string;
33
33
  } & React$1.RefAttributes<HTMLButtonElement>>;
@@ -27,7 +27,7 @@ type PillButtonProps = Omit<React$1.ComponentProps<typeof Button>, 'ref' | 'clas
27
27
  'aria-label': string;
28
28
  };
29
29
  /** A button inside a static `Pill` (no `onClick`); it is disabled with the pill. */
30
- declare const PillButton: React$1.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").ButtonProps, "ref"> & React$1.RefAttributes<HTMLElement>, "ref" | "className" | "aria-label"> & {
30
+ declare const PillButton: React$1.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").ButtonProps, "ref"> & React$1.RefAttributes<HTMLElement>, "className" | "ref" | "aria-label"> & {
31
31
  className?: string; /** Names the button; the icon inside is decorative. */
32
32
  'aria-label': string;
33
33
  } & React$1.RefAttributes<HTMLButtonElement>>;