@spark-ui/components 17.4.1 → 17.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/dist/accordion/index.js.map +1 -1
  2. package/dist/accordion/index.mjs.map +1 -1
  3. package/dist/alert-dialog/index.js.map +1 -1
  4. package/dist/alert-dialog/index.mjs.map +1 -1
  5. package/dist/avatar/index.js +1 -1
  6. package/dist/avatar/index.js.map +1 -1
  7. package/dist/avatar/index.mjs +8 -2
  8. package/dist/avatar/index.mjs.map +1 -1
  9. package/dist/badge/index.js.map +1 -1
  10. package/dist/badge/index.mjs.map +1 -1
  11. package/dist/breadcrumb/index.js.map +1 -1
  12. package/dist/breadcrumb/index.mjs.map +1 -1
  13. package/dist/button-B-sMnDc_.js.map +1 -1
  14. package/dist/button-C6nlNPdv.mjs.map +1 -1
  15. package/dist/card/index.js.map +1 -1
  16. package/dist/card/index.mjs.map +1 -1
  17. package/dist/carousel/index.js.map +1 -1
  18. package/dist/carousel/index.mjs.map +1 -1
  19. package/dist/checkbox-DjwbAH09.js.map +1 -1
  20. package/dist/checkbox-xsURzANi.mjs.map +1 -1
  21. package/dist/chip/index.js.map +1 -1
  22. package/dist/chip/index.mjs.map +1 -1
  23. package/dist/circular-meter/index.js.map +1 -1
  24. package/dist/circular-meter/index.mjs.map +1 -1
  25. package/dist/collapsible/index.js.map +1 -1
  26. package/dist/collapsible/index.mjs.map +1 -1
  27. package/dist/combobox/index.js.map +1 -1
  28. package/dist/combobox/index.mjs.map +1 -1
  29. package/dist/dialog/index.js.map +1 -1
  30. package/dist/dialog/index.mjs.map +1 -1
  31. package/dist/divider/index.js.map +1 -1
  32. package/dist/divider/index.mjs.map +1 -1
  33. package/dist/drawer/index.js.map +1 -1
  34. package/dist/drawer/index.mjs.map +1 -1
  35. package/dist/dropdown/index.js.map +1 -1
  36. package/dist/dropdown/index.mjs.map +1 -1
  37. package/dist/file-upload/index.js.map +1 -1
  38. package/dist/file-upload/index.mjs.map +1 -1
  39. package/dist/form-field-81wzFxM0.js.map +1 -1
  40. package/dist/form-field-GTAuK_nO.mjs.map +1 -1
  41. package/dist/icon-CRPcdgYp.js.map +1 -1
  42. package/dist/icon-D05Uqh8_.mjs.map +1 -1
  43. package/dist/icon-button-CYz_Fitz.js.map +1 -1
  44. package/dist/icon-button-DpucUC_L.mjs.map +1 -1
  45. package/dist/input-BUSYZ_VO.js.map +1 -1
  46. package/dist/input-CiWFuTs_.mjs.map +1 -1
  47. package/dist/input-otp/index.js.map +1 -1
  48. package/dist/input-otp/index.mjs.map +1 -1
  49. package/dist/kbd/index.js.map +1 -1
  50. package/dist/kbd/index.mjs.map +1 -1
  51. package/dist/label-BCSEss4U.js.map +1 -1
  52. package/dist/label-DDBRKLUX.mjs.map +1 -1
  53. package/dist/link-box/index.js.map +1 -1
  54. package/dist/link-box/index.mjs.map +1 -1
  55. package/dist/meter/index.js.map +1 -1
  56. package/dist/meter/index.mjs.map +1 -1
  57. package/dist/pagination/index.js.map +1 -1
  58. package/dist/pagination/index.mjs.map +1 -1
  59. package/dist/popover-CrKp_TKk.js.map +1 -1
  60. package/dist/popover-DsBY8eYl.mjs.map +1 -1
  61. package/dist/portal/index.js.map +1 -1
  62. package/dist/portal/index.mjs.map +1 -1
  63. package/dist/progress-BjqJSRnK.js.map +1 -1
  64. package/dist/progress-C3w4PmxY.mjs.map +1 -1
  65. package/dist/progress-tracker/index.js.map +1 -1
  66. package/dist/progress-tracker/index.mjs.map +1 -1
  67. package/dist/radio-group/index.js.map +1 -1
  68. package/dist/radio-group/index.mjs.map +1 -1
  69. package/dist/rating/index.js.map +1 -1
  70. package/dist/rating/index.mjs.map +1 -1
  71. package/dist/rating-display/index.js.map +1 -1
  72. package/dist/rating-display/index.mjs.map +1 -1
  73. package/dist/scrolling-list/index.js.map +1 -1
  74. package/dist/scrolling-list/index.mjs.map +1 -1
  75. package/dist/segmented-control/index.js.map +1 -1
  76. package/dist/segmented-control/index.mjs.map +1 -1
  77. package/dist/segmented-gauge/index.js.map +1 -1
  78. package/dist/segmented-gauge/index.mjs.map +1 -1
  79. package/dist/select/index.js.map +1 -1
  80. package/dist/select/index.mjs.map +1 -1
  81. package/dist/skeleton/index.js.map +1 -1
  82. package/dist/skeleton/index.mjs.map +1 -1
  83. package/dist/slider/index.js.map +1 -1
  84. package/dist/slider/index.mjs.map +1 -1
  85. package/dist/slot/index.js.map +1 -1
  86. package/dist/slot/index.mjs.map +1 -1
  87. package/dist/spinner-DFUoYvmm.js.map +1 -1
  88. package/dist/spinner-DULLiM6a.mjs.map +1 -1
  89. package/dist/src/accordion/index.d.mts +3 -0
  90. package/dist/src/accordion/index.d.ts +3 -0
  91. package/dist/src/alert-dialog/index.d.mts +3 -0
  92. package/dist/src/alert-dialog/index.d.ts +3 -0
  93. package/dist/src/avatar/index.d.mts +7 -5
  94. package/dist/src/avatar/index.d.ts +7 -5
  95. package/dist/src/badge/Badge.d.ts +3 -0
  96. package/dist/src/breadcrumb/index.d.mts +3 -0
  97. package/dist/src/breadcrumb/index.d.ts +3 -0
  98. package/dist/src/button/Button.d.ts +3 -0
  99. package/dist/src/card/index.d.mts +3 -0
  100. package/dist/src/card/index.d.ts +3 -0
  101. package/dist/src/carousel/index.d.mts +3 -0
  102. package/dist/src/carousel/index.d.ts +3 -0
  103. package/dist/src/checkbox/Checkbox.d.ts +3 -0
  104. package/dist/src/checkbox/CheckboxGroup.d.ts +4 -0
  105. package/dist/src/chip/index.d.mts +3 -0
  106. package/dist/src/chip/index.d.ts +3 -0
  107. package/dist/src/circular-meter/index.d.mts +3 -0
  108. package/dist/src/circular-meter/index.d.ts +3 -0
  109. package/dist/src/collapsible/index.d.mts +3 -0
  110. package/dist/src/collapsible/index.d.ts +3 -0
  111. package/dist/src/combobox/index.d.mts +3 -0
  112. package/dist/src/combobox/index.d.ts +3 -0
  113. package/dist/src/dialog/index.d.mts +3 -0
  114. package/dist/src/dialog/index.d.ts +3 -0
  115. package/dist/src/divider/index.d.mts +3 -0
  116. package/dist/src/divider/index.d.ts +3 -0
  117. package/dist/src/drawer/index.d.mts +3 -0
  118. package/dist/src/drawer/index.d.ts +3 -0
  119. package/dist/src/dropdown/index.d.mts +3 -0
  120. package/dist/src/dropdown/index.d.ts +3 -0
  121. package/dist/src/file-upload/index.d.mts +3 -0
  122. package/dist/src/file-upload/index.d.ts +3 -0
  123. package/dist/src/form-field/index.d.mts +3 -0
  124. package/dist/src/form-field/index.d.ts +3 -0
  125. package/dist/src/icon/Icon.d.ts +3 -0
  126. package/dist/src/icon-button/IconButton.d.ts +3 -0
  127. package/dist/src/input/Input.d.ts +3 -0
  128. package/dist/src/input/index.d.mts +4 -0
  129. package/dist/src/input/index.d.ts +4 -0
  130. package/dist/src/input-otp/index.d.mts +3 -0
  131. package/dist/src/input-otp/index.d.ts +3 -0
  132. package/dist/src/kbd/Kbd.d.ts +3 -0
  133. package/dist/src/label/index.d.mts +3 -0
  134. package/dist/src/label/index.d.ts +3 -0
  135. package/dist/src/link-box/index.d.mts +3 -0
  136. package/dist/src/link-box/index.d.ts +3 -0
  137. package/dist/src/meter/index.d.mts +3 -0
  138. package/dist/src/meter/index.d.ts +3 -0
  139. package/dist/src/pagination/index.d.mts +3 -0
  140. package/dist/src/pagination/index.d.ts +3 -0
  141. package/dist/src/popover/index.d.mts +3 -0
  142. package/dist/src/popover/index.d.ts +3 -0
  143. package/dist/src/portal/Portal.d.ts +3 -0
  144. package/dist/src/progress/index.d.mts +3 -0
  145. package/dist/src/progress/index.d.ts +3 -0
  146. package/dist/src/progress-tracker/index.d.mts +3 -0
  147. package/dist/src/progress-tracker/index.d.ts +3 -0
  148. package/dist/src/radio-group/index.d.mts +3 -0
  149. package/dist/src/radio-group/index.d.ts +3 -0
  150. package/dist/src/rating/Rating.d.ts +3 -0
  151. package/dist/src/rating-display/index.d.mts +3 -0
  152. package/dist/src/rating-display/index.d.ts +3 -0
  153. package/dist/src/scrolling-list/index.d.mts +3 -0
  154. package/dist/src/scrolling-list/index.d.ts +3 -0
  155. package/dist/src/segmented-control/index.d.mts +3 -0
  156. package/dist/src/segmented-control/index.d.ts +3 -0
  157. package/dist/src/segmented-gauge/index.d.mts +3 -0
  158. package/dist/src/segmented-gauge/index.d.ts +3 -0
  159. package/dist/src/select/index.d.mts +3 -0
  160. package/dist/src/select/index.d.ts +3 -0
  161. package/dist/src/skeleton/index.d.mts +3 -0
  162. package/dist/src/skeleton/index.d.ts +3 -0
  163. package/dist/src/slider/index.d.mts +3 -0
  164. package/dist/src/slider/index.d.ts +3 -0
  165. package/dist/src/slot/Slot.d.ts +4 -0
  166. package/dist/src/spinner/Spinner.d.ts +3 -0
  167. package/dist/src/stepper/index.d.mts +3 -0
  168. package/dist/src/stepper/index.d.ts +3 -0
  169. package/dist/src/switch/Switch.d.ts +3 -0
  170. package/dist/src/table/index.d.mts +6 -2
  171. package/dist/src/table/index.d.ts +6 -2
  172. package/dist/src/table/internal/TableRootWrapper.d.ts +3 -0
  173. package/dist/src/tabs/index.d.mts +3 -0
  174. package/dist/src/tabs/index.d.ts +3 -0
  175. package/dist/src/tag/Tag.d.ts +3 -0
  176. package/dist/src/text-link/TextLink.d.ts +3 -0
  177. package/dist/src/textarea/Textarea.d.ts +3 -0
  178. package/dist/src/textarea/index.d.mts +4 -0
  179. package/dist/src/textarea/index.d.ts +4 -0
  180. package/dist/src/toast/index.d.mts +3 -0
  181. package/dist/src/toast/index.d.ts +3 -0
  182. package/dist/src/visually-hidden/VisuallyHidden.d.ts +3 -0
  183. package/dist/stepper/index.js.map +1 -1
  184. package/dist/stepper/index.mjs.map +1 -1
  185. package/dist/switch/index.js.map +1 -1
  186. package/dist/switch/index.mjs.map +1 -1
  187. package/dist/table/index.js +1 -1
  188. package/dist/table/index.js.map +1 -1
  189. package/dist/table/index.mjs +1 -1
  190. package/dist/table/index.mjs.map +1 -1
  191. package/dist/tabs/index.js.map +1 -1
  192. package/dist/tabs/index.mjs.map +1 -1
  193. package/dist/tag/index.js.map +1 -1
  194. package/dist/tag/index.mjs.map +1 -1
  195. package/dist/text-link/index.js.map +1 -1
  196. package/dist/text-link/index.mjs.map +1 -1
  197. package/dist/textarea/index.js.map +1 -1
  198. package/dist/textarea/index.mjs.map +1 -1
  199. package/dist/toast/index.js.map +1 -1
  200. package/dist/toast/index.mjs.map +1 -1
  201. package/dist/visually-hidden/index.js.map +1 -1
  202. package/dist/visually-hidden/index.mjs.map +1 -1
  203. package/package.json +16 -18
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../src/slider/Slider.styles.ts","../../src/slider/SliderContext.tsx","../../src/slider/Slider.tsx","../../src/slider/SliderControl.tsx","../../src/slider/SliderTrack.styles.ts","../../src/slider/SliderIndicator.tsx","../../src/slider/SliderLabel.tsx","../../src/slider/SliderMaxValue.tsx","../../src/slider/SliderMinValue.tsx","../../src/slider/SliderThumb.styles.ts","../../src/slider/SliderThumbContext.tsx","../../src/slider/SliderThumb.tsx","../../src/slider/SliderTrack.tsx","../../src/slider/useSliderValueBoundaries.ts","../../src/slider/SliderValue.tsx","../../src/slider/index.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nexport const rootStyles = cva([\n 'grid grid-cols-[1fr_auto] gap-y-sm gap-x-md relative',\n 'touch-none select-none',\n 'data-disabled:cursor-not-allowed data-disabled:opacity-dim-3',\n])\n","import type { RefObject } from 'react'\nimport { createContext, useContext } from 'react'\n\nimport type { SliderProps } from './Slider'\n\nexport type SliderContextInterface = Pick<SliderProps, 'intent' | 'min' | 'max'> & {\n fieldLabelId?: string\n fieldId?: string\n onLabelId?: (id: string | undefined) => void\n hasValueInThumb: boolean\n registerValueInThumb: () => () => void\n controlRef: RefObject<HTMLElement | null>\n thumbRef: RefObject<HTMLElement | null>\n}\n\nexport const SliderContext = createContext<SliderContextInterface>({} as SliderContextInterface)\n\nexport const useSliderContext = () => useContext(SliderContext)\n","import { Slider as BaseSlider } from '@base-ui/react/slider'\nimport { useFormFieldControl } from '@spark-ui/components/form-field'\nimport { ComponentProps, type PropsWithChildren, Ref, useCallback, useRef, useState } from 'react'\n\nimport { rootStyles } from './Slider.styles'\nimport { SliderContext } from './SliderContext'\nimport type { SliderRangeVariantsProps } from './SliderTrack.styles'\n\nexport interface SliderProps\n extends\n Omit<\n ComponentProps<typeof BaseSlider.Root>,\n 'render' | 'orientation' | 'onValueChange' | 'onValueCommitted'\n >,\n PropsWithChildren<SliderRangeVariantsProps> {\n /**\n * The value of the slider when initially rendered. Use when you do not need to control the state of the slider.\n */\n defaultValue?: number\n /**\n * The controlled value of the slider. Must be used in conjunction with `onValueChange`.\n */\n value?: number\n /**\n * Event handler called when the value changes.\n */\n onValueChange?: (value: number) => void\n /**\n * Event handler called when the value changes at the end of an interaction. Useful when you only need to capture a final value e.g. to update a backend service.\n */\n onValueCommit?: (value: number) => void\n /**\n * The name of the slider. Submitted with its owning form as part of a name/value pair.\n * If wrapped with a FormField with a name, will be inherited from it.\n */\n name?: string\n /**\n * When `true`, prevents the user from interacting with the slider.\n * @default false\n */\n disabled?: boolean\n /**\n * Sets the slider as interactive or not.\n */\n readOnly?: boolean\n /**\n * The minimum value for the range.\n * @default 0\n */\n min?: number\n /**\n * The maximum value for the range.\n * @default 100\n */\n max?: number\n /**\n * The stepping interval.\n * @default 1\n */\n step?: number\n ref?: Ref<HTMLDivElement>\n}\n\nexport const Slider = ({\n intent = 'support',\n children,\n className,\n ref,\n value: valueProp,\n defaultValue: defaultValueProp,\n disabled: disabledProp,\n readOnly: readOnlyProp,\n name: nameProp,\n onValueChange,\n onValueCommit,\n min = 0,\n max = 100,\n ...rest\n}: SliderProps) => {\n const field = useFormFieldControl()\n\n const disabled = field.disabled ?? disabledProp\n const readOnly = field.readOnly ?? readOnlyProp\n const name = field.name ?? nameProp\n\n const [labelId, setLabelId] = useState<string | undefined>(field.labelId)\n const [valueInThumbCount, setValueInThumbCount] = useState(0)\n const controlRef = useRef<HTMLElement | null>(null)\n const thumbRef = useRef<HTMLElement | null>(null)\n\n const handleLabelId = useCallback((id: string | undefined) => {\n setLabelId(id)\n }, [])\n\n const registerValueInThumb = useCallback(() => {\n setValueInThumbCount(c => c + 1)\n\n return () => setValueInThumbCount(c => c - 1)\n }, [])\n\n return (\n <SliderContext.Provider\n value={{\n intent,\n min,\n max,\n fieldLabelId: field.labelId || labelId,\n fieldId: field.id,\n onLabelId: handleLabelId,\n hasValueInThumb: valueInThumbCount > 0,\n registerValueInThumb,\n controlRef,\n thumbRef,\n }}\n >\n <BaseSlider.Root\n ref={ref}\n data-spark-component=\"slider\"\n className={rootStyles({ className })}\n orientation=\"horizontal\"\n disabled={disabled || readOnly}\n thumbAlignment=\"edge\"\n name={name}\n aria-describedby={field.description}\n aria-invalid={field.isInvalid}\n aria-disabled={disabled || readOnly ? true : undefined}\n value={valueProp !== undefined ? [valueProp] : undefined}\n defaultValue={defaultValueProp !== undefined ? [defaultValueProp] : undefined}\n onValueChange={\n onValueChange\n ? (value: number | readonly number[]) => {\n const v = Array.isArray(value) ? (value[0] ?? 0) : value\n onValueChange(v)\n }\n : undefined\n }\n onValueCommitted={\n onValueCommit\n ? (value: number | readonly number[]) => {\n const v = Array.isArray(value) ? (value[0] ?? 0) : value\n onValueCommit(v)\n }\n : undefined\n }\n min={min}\n max={max}\n {...rest}\n >\n {children}\n </BaseSlider.Root>\n </SliderContext.Provider>\n )\n}\n\nSlider.displayName = 'Slider'\n","import { Slider as BaseSlider } from '@base-ui/react/slider'\nimport { useMergeRefs } from '@spark-ui/hooks/use-merge-refs'\nimport { cx } from 'class-variance-authority'\nimport { ComponentProps } from 'react'\n\nimport { useSliderContext } from './SliderContext'\n\nexport type SliderControlProps = Omit<ComponentProps<typeof BaseSlider.Control>, 'render'>\n\nexport const SliderControl = ({ className, ref, ...rest }: SliderControlProps) => {\n const { hasValueInThumb, controlRef } = useSliderContext()\n const mergedRef = useMergeRefs(controlRef, ref)\n\n return (\n <BaseSlider.Control\n data-spark-component=\"slider-control\"\n ref={mergedRef}\n className={cx(\n 'min-h-sz-24 relative col-span-2 flex w-full min-w-0 flex-1 items-center',\n hasValueInThumb && 'mt-xl',\n className\n )}\n {...rest}\n />\n )\n}\n\nSliderControl.displayName = 'Slider.Control'\n","import { cva, VariantProps } from 'class-variance-authority'\n\nexport const trackVariants = cva(['relative grow h-sz-4 bg-on-background/dim-4 rounded-sm'])\n\nexport const rangeVariants = cva(\n [\n 'absolute h-full rounded-sm',\n // Disable transitions during drag to eliminate latency\n 'transition-none',\n ],\n {\n variants: {\n intent: {\n main: ['bg-main'],\n support: ['bg-support'],\n accent: ['bg-accent'],\n info: ['bg-info'],\n neutral: ['bg-neutral'],\n success: ['bg-success'],\n alert: ['bg-alert'],\n error: ['bg-error'],\n },\n },\n defaultVariants: {\n intent: 'support',\n },\n }\n)\n\nexport type SliderRangeVariantsProps = VariantProps<typeof rangeVariants>\n","import { Slider as BaseSlider } from '@base-ui/react/slider'\nimport { ComponentProps } from 'react'\n\nimport { useSliderContext } from './SliderContext'\nimport { rangeVariants } from './SliderTrack.styles'\n\nexport type SliderIndicatorProps = Omit<ComponentProps<typeof BaseSlider.Indicator>, 'render'>\n\nexport const SliderIndicator = ({ className, ref, ...rest }: SliderIndicatorProps) => {\n const { intent } = useSliderContext()\n\n return (\n <BaseSlider.Indicator\n data-spark-component=\"slider-indicator\"\n ref={ref}\n className={rangeVariants({ intent, className })}\n {...rest}\n />\n )\n}\n\nSliderIndicator.displayName = 'Slider.Indicator'\n","import { useFormFieldControl } from '@spark-ui/components/form-field'\nimport { useMergeRefs } from '@spark-ui/hooks/use-merge-refs'\nimport { cx } from 'class-variance-authority'\nimport { ReactNode, Ref, useEffect, useId, useRef } from 'react'\n\nimport { FormFieldRequiredIndicator } from '../form-field/FormFieldRequiredIndicator'\nimport { Label, LabelProps } from '../label'\nimport { Slottable } from '../slot'\nimport { useSliderContext } from './SliderContext'\n\nconst ID_PREFIX = ':slider-label'\n\nexport interface SliderLabelProps extends LabelProps {\n /**\n * Element shown when the input is required inside the label.\n */\n requiredIndicator?: ReactNode\n ref?: Ref<HTMLLabelElement>\n}\n\nexport const SliderLabel = ({\n htmlFor: htmlForProp,\n id: idProp,\n className,\n children,\n requiredIndicator = <FormFieldRequiredIndicator />,\n asChild,\n ref,\n ...others\n}: SliderLabelProps) => {\n const field = useFormFieldControl()\n const { fieldLabelId, fieldId, onLabelId } = useSliderContext()\n\n // Generate an id if not provided and no FormField labelId is available\n const internalId = useId()\n const generatedId = `${ID_PREFIX}-${internalId}`\n const labelId = idProp || fieldLabelId || field.labelId || generatedId\n\n // Use FormField id for htmlFor if present, otherwise use fieldId from context, or the prop\n const htmlFor = asChild ? undefined : htmlForProp || fieldId || field.id\n\n // Get disabled and required state from FormField if present\n const disabled = field.disabled\n const isRequired = field.isRequired\n\n // Notify SliderContext of the label id if no FormField is present\n const labelRef = useRef<HTMLLabelElement>(null)\n const mergedRef = useMergeRefs(ref, labelRef)\n\n useEffect(() => {\n if (onLabelId && !fieldLabelId && !field.labelId) {\n onLabelId(labelId)\n }\n }, [onLabelId, fieldLabelId, field.labelId, labelId])\n\n return (\n <Label\n ref={mergedRef}\n id={labelId}\n data-spark-component=\"slider-label\"\n htmlFor={htmlFor}\n className={cx(disabled ? 'text-on-surface/dim-3 pointer-events-none' : undefined, className)}\n asChild={asChild}\n {...others}\n >\n <>\n <Slottable>{children}</Slottable>\n {isRequired && requiredIndicator}\n </>\n </Label>\n )\n}\n\nSliderLabel.displayName = 'Slider.Label'\n","import { cx } from 'class-variance-authority'\nimport { forwardRef, type ReactNode } from 'react'\n\nimport { useSliderContext } from './SliderContext'\n\nexport interface SliderMaxValueProps {\n className?: string\n children?: (value: number) => ReactNode\n}\n\nexport const SliderMaxValue = forwardRef<HTMLDivElement, SliderMaxValueProps>(\n ({ className, children }, ref) => {\n const { max = 100 } = useSliderContext()\n\n const content = children ? children(max) : max\n\n return (\n <div\n data-spark-component=\"slider-max-value\"\n ref={ref}\n className={cx('text-on-surface/dim-1 text-body-2 col-start-2 text-right', className)}\n >\n {content}\n </div>\n )\n }\n)\n\nSliderMaxValue.displayName = 'Slider.MaxValue'\n","import { cx } from 'class-variance-authority'\nimport { forwardRef, type ReactNode } from 'react'\n\nimport { useSliderContext } from './SliderContext'\n\nexport interface SliderMinValueProps {\n className?: string\n children?: (value: number) => ReactNode\n}\n\nexport const SliderMinValue = forwardRef<HTMLDivElement, SliderMinValueProps>(\n ({ className, children }, ref) => {\n const { min = 0 } = useSliderContext()\n\n const content = children ? children(min) : min\n\n return (\n <div\n data-spark-component=\"slider-min-value\"\n ref={ref}\n className={cx('text-on-surface/dim-1 text-body-2 col-start-1 text-left', className)}\n >\n {content}\n </div>\n )\n }\n)\n\nSliderMinValue.displayName = 'Slider.MinValue'\n","import { cva, VariantProps } from 'class-variance-authority'\n\nexport const thumbVariants = cva(\n [\n 'relative block size-sz-24 rounded-full cursor-pointer',\n 'outline-hidden',\n 'has-focus-visible:ring-2 has-focus-visible:ring-offset-2 has-focus-visible:ring-focus',\n 'data-disabled:hover:ring-0 data-disabled:cursor-not-allowed data-disabled:before:hidden',\n // visual thumb\n 'after:absolute after:left-1/2 after:top-1/2 after:-translate-x-1/2 after:-translate-y-1/2',\n 'after:size-sz-24 after:rounded-full',\n // hover effect\n 'before:absolute before:left-1/2 before:top-1/2 before:-translate-x-1/2 before:-translate-y-1/2',\n 'before:size-sz-24 before:rounded-full before:border-solid before:border-sm before:transition-all before:duration-75',\n 'hover:before:size-sz-32 data-dragging:before:size-sz-32',\n ],\n {\n variants: {\n intent: {\n main: ['after:bg-main', 'before:bg-main-container before:border-main'],\n support: ['after:bg-support', 'before:bg-support-container before:border-support'],\n accent: ['after:bg-accent', 'before:bg-accent-container before:border-accent'],\n info: ['after:bg-info', 'before:bg-info-container before:border-info'],\n neutral: ['after:bg-neutral', 'before:bg-neutral-container before:border-neutral'],\n success: ['after:bg-success', 'before:bg-success-container before:border-success'],\n alert: ['after:bg-alert', 'before:bg-alert-container before:border-alert'],\n error: ['after:bg-error', 'before:bg-error-container before:border-error'],\n },\n },\n defaultVariants: {\n intent: 'support',\n },\n }\n)\n\nexport type SliderThumbVariantsProps = VariantProps<typeof thumbVariants>\n","import { createContext, useContext } from 'react'\n\nexport interface SliderThumbContextValue {\n isInsideThumb: true\n}\n\nexport const SliderThumbContext = createContext<SliderThumbContextValue | null>(null)\n\nexport const useSliderThumbContext = () => useContext(SliderThumbContext)\n","import { Slider as BaseSlider } from '@base-ui/react/slider'\nimport { useMergeRefs } from '@spark-ui/hooks/use-merge-refs'\nimport { ComponentProps, type PropsWithChildren, useRef } from 'react'\n\nimport { useSliderContext } from './SliderContext'\nimport { thumbVariants } from './SliderThumb.styles'\nimport { SliderThumbContext } from './SliderThumbContext'\n\nexport type SliderThumbProps = Omit<ComponentProps<typeof BaseSlider.Thumb>, 'render' | 'index'> &\n PropsWithChildren\n\nexport const SliderThumb = ({\n className,\n ref: forwardedRef,\n children,\n ...rest\n}: SliderThumbProps) => {\n const { intent, fieldLabelId, fieldId, thumbRef: contextThumbRef } = useSliderContext()\n\n const innerRef = useRef<HTMLDivElement>(null)\n const ref = useMergeRefs(contextThumbRef, forwardedRef ?? innerRef)\n\n return (\n <SliderThumbContext.Provider value={{ isInsideThumb: true }}>\n <BaseSlider.Thumb\n data-spark-component=\"slider-thumb\"\n ref={ref}\n id={fieldId}\n className={thumbVariants({ intent, className })}\n aria-labelledby={fieldLabelId}\n {...rest}\n >\n {children}\n </BaseSlider.Thumb>\n </SliderThumbContext.Provider>\n )\n}\n\nSliderThumb.displayName = 'Slider.Thumb'\n","import { Slider as BaseSlider } from '@base-ui/react/slider'\nimport { ComponentProps } from 'react'\n\nimport { trackVariants } from './SliderTrack.styles'\n\nexport type SliderTrackProps = Omit<ComponentProps<typeof BaseSlider.Track>, 'render'>\n\nexport const SliderTrack = ({ className, ref, ...rest }: SliderTrackProps) => {\n return (\n <BaseSlider.Track\n data-spark-component=\"slider-track\"\n ref={ref}\n className={trackVariants({ className })}\n {...rest}\n />\n )\n}\n\nSliderTrack.displayName = 'Slider.Track'\n","import type { RefObject } from 'react'\nimport { useLayoutEffect, useState } from 'react'\n\n/**\n * Computes the translateX (in pixels) to apply to the value element so it stays\n * within the horizontal bounds of the slider control when displayed inside the thumb.\n *\n * @param controlRef - Ref to the slider control (track container)\n * @param thumbRef - Ref to the thumb element\n * @param valueRef - Ref to the value label element\n * @param value - Current slider value (0–100 or min–max), used to re-run when thumb moves\n * @returns translateX in pixels (positive = right, negative = left), or 0 if refs are missing\n */\nexport function useSliderValueBoundaries(\n controlRef: RefObject<HTMLElement | null>,\n thumbRef: RefObject<HTMLElement | null>,\n valueRef: RefObject<HTMLElement | null>,\n value: number\n): number {\n const [translateX, setTranslateX] = useState(0)\n const [refsRetryScheduled, setRefsRetryScheduled] = useState(false)\n\n useLayoutEffect(() => {\n const control = controlRef.current\n const thumb = thumbRef.current\n const valueEl = valueRef.current\n\n if (!control || !thumb || !valueEl) {\n setTranslateX(0)\n // Re-run once on next frame when refs may be set (e.g. Slider.Value mounts after Control/Thumb)\n if (!refsRetryScheduled) {\n requestAnimationFrame(() => setRefsRetryScheduled(true))\n }\n\n return\n }\n\n let cancelled = false\n\n const compute = () => {\n if (cancelled) return\n\n const controlRect = control.getBoundingClientRect()\n const thumbRect = thumb.getBoundingClientRect()\n const valueWidth = valueEl.scrollWidth\n\n // Skip until value label has been laid out (content from render prop may not be ready on first paint)\n if (valueWidth === 0) {\n requestAnimationFrame(compute)\n\n return\n }\n\n const thumbCenterPx = thumbRect.left - controlRect.left + thumbRect.width / 2\n\n const valueCenterMin = valueWidth / 2\n const valueCenterMax = controlRect.width - valueWidth / 2\n\n const clampedCenter = Math.max(valueCenterMin, Math.min(valueCenterMax, thumbCenterPx))\n const nextTranslateX = clampedCenter - thumbCenterPx\n\n setTranslateX(prev => (prev !== nextTranslateX ? nextTranslateX : prev))\n }\n\n compute()\n\n const resizeObserver = new ResizeObserver(compute)\n resizeObserver.observe(control)\n resizeObserver.observe(valueEl)\n\n return () => {\n cancelled = true\n resizeObserver.disconnect()\n }\n }, [controlRef, thumbRef, valueRef, value, refsRetryScheduled])\n\n return translateX\n}\n","import { Slider as BaseSlider } from '@base-ui/react/slider'\nimport { useMergeRefs } from '@spark-ui/hooks/use-merge-refs'\nimport { cx } from 'class-variance-authority'\nimport type { ReactNode } from 'react'\nimport { ComponentProps, useCallback, useEffect, useRef, useState } from 'react'\n\nimport { useSliderContext } from './SliderContext'\nimport { useSliderThumbContext } from './SliderThumbContext'\nimport { useSliderValueBoundaries } from './useSliderValueBoundaries'\n\nexport type SliderValueProps = Omit<\n ComponentProps<typeof BaseSlider.Value>,\n 'render' | 'children'\n> & {\n children?: ReactNode | ((formatted: string, value: number) => ReactNode)\n}\n\n/**\n * Normalizes Base UI's (formattedValues, values) to single (formatted, value) for the render prop.\n */\nexport const SliderValue = ({ className, children, ref, ...rest }: SliderValueProps) => {\n const { registerValueInThumb, controlRef, thumbRef } = useSliderContext()\n const thumbContext = useSliderThumbContext()\n const isInsideThumb = thumbContext !== null\n\n const valueRef = useRef<HTMLOutputElement | null>(null)\n const mergedRef = useMergeRefs(valueRef, ref)\n\n const [currentValue, setCurrentValue] = useState(0)\n const translateX = useSliderValueBoundaries(controlRef, thumbRef, valueRef, currentValue)\n\n useEffect(() => {\n if (!isInsideThumb) return\n\n return registerValueInThumb()\n }, [isInsideThumb, registerValueInThumb])\n\n const resolvedClassName = cx(\n isInsideThumb\n ? 'absolute left-1/2 -translate-x-1/2 top-[calc(-100%-var(--spacing-sm))] text-body-1 font-bold whitespace-nowrap'\n : 'default:text-body-1 col-start-2 text-right default:font-bold',\n className\n )\n\n const normalizedChildren = useCallback(\n (formattedValues: readonly string[], values: readonly number[]) => {\n const formatted = formattedValues[0] ?? String(values[0] ?? '')\n const value = values[0] ?? 0\n setCurrentValue(value)\n if (typeof children === 'function') {\n return children(formatted, value)\n }\n\n return formatted\n },\n [children]\n )\n\n const style = isInsideThumb\n ? { transform: `translate(calc(0% + ${translateX}px), 0)` }\n : undefined\n\n return (\n <BaseSlider.Value\n data-spark-component=\"slider-value\"\n ref={mergedRef}\n className={resolvedClassName}\n style={style}\n {...rest}\n >\n {normalizedChildren}\n </BaseSlider.Value>\n )\n}\n\nSliderValue.displayName = 'Slider.Value'\n","import { Slider as Root, type SliderProps } from './Slider'\nimport { SliderControl as Control, type SliderControlProps } from './SliderControl'\nimport { SliderIndicator as Indicator, type SliderIndicatorProps } from './SliderIndicator'\nimport { SliderLabel as Label, type SliderLabelProps } from './SliderLabel'\nimport { SliderMaxValue as MaxValue, type SliderMaxValueProps } from './SliderMaxValue'\nimport { SliderMinValue as MinValue, type SliderMinValueProps } from './SliderMinValue'\nimport { SliderThumb as Thumb, type SliderThumbProps } from './SliderThumb'\nimport { SliderTrack as Track, type SliderTrackProps } from './SliderTrack'\nimport { SliderValue as Value, type SliderValueProps } from './SliderValue'\n\nexport const Slider: typeof Root & {\n Control: typeof Control\n Indicator: typeof Indicator\n Label: typeof Label\n MaxValue: typeof MaxValue\n MinValue: typeof MinValue\n Thumb: typeof Thumb\n Track: typeof Track\n Value: typeof Value\n} = Object.assign(Root, {\n Control,\n Indicator,\n Label,\n MaxValue,\n MinValue,\n Thumb,\n Track,\n Value,\n})\n\nSlider.displayName = 'Slider'\nControl.displayName = 'Slider.Control'\nIndicator.displayName = 'Slider.Indicator'\nLabel.displayName = 'Slider.Label'\nMaxValue.displayName = 'Slider.MaxValue'\nMinValue.displayName = 'Slider.MinValue'\nThumb.displayName = 'Slider.Thumb'\nTrack.displayName = 'Slider.Track'\nValue.displayName = 'Slider.Value'\n\nexport type {\n SliderProps,\n SliderControlProps,\n SliderIndicatorProps,\n SliderLabelProps,\n SliderMaxValueProps,\n SliderMinValueProps,\n SliderThumbProps,\n SliderTrackProps,\n SliderValueProps,\n}\n"],"mappings":";;;;;;;;;;AAEA,IAAa,IAAa,EAAI;CAC5B;CACA;CACA;CACD,CAAC,ECSW,IAAgB,EAAsC,EAAE,CAA2B,EAEnF,UAAyB,EAAW,EAAc,EC8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ACL,WAAW;EACJ;EACP,GAAI;YAEH;EACgB,CAAA;;AAIvB,EAAY,cAAc;;;ACjE1B,IAAa,IAST,OAAO,OAAO,GAAM;CACtB,SAAA;CACA,WAAA;CACA,OAAA;CACA,UAAA;CACA,UAAA;CACA,OAAA;CACA,OAAA;CACA,OAAA;CACD,CAAC;AAEF,EAAO,cAAc,UACrB,EAAQ,cAAc,kBACtB,EAAU,cAAc,oBACxB,EAAM,cAAc,gBACpB,EAAS,cAAc,mBACvB,EAAS,cAAc,mBACvB,EAAM,cAAc,gBACpB,EAAM,cAAc,gBACpB,EAAM,cAAc"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../src/slider/Slider.styles.ts","../../src/slider/SliderContext.tsx","../../src/slider/Slider.tsx","../../src/slider/SliderControl.tsx","../../src/slider/SliderTrack.styles.ts","../../src/slider/SliderIndicator.tsx","../../src/slider/SliderLabel.tsx","../../src/slider/SliderMaxValue.tsx","../../src/slider/SliderMinValue.tsx","../../src/slider/SliderThumb.styles.ts","../../src/slider/SliderThumbContext.tsx","../../src/slider/SliderThumb.tsx","../../src/slider/SliderTrack.tsx","../../src/slider/useSliderValueBoundaries.ts","../../src/slider/SliderValue.tsx","../../src/slider/index.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nexport const rootStyles = cva([\n 'grid grid-cols-[1fr_auto] gap-y-sm gap-x-md relative',\n 'touch-none select-none',\n 'data-disabled:cursor-not-allowed data-disabled:opacity-dim-3',\n])\n","import type { RefObject } from 'react'\nimport { createContext, useContext } from 'react'\n\nimport type { SliderProps } from './Slider'\n\nexport type SliderContextInterface = Pick<SliderProps, 'intent' | 'min' | 'max'> & {\n fieldLabelId?: string\n fieldId?: string\n onLabelId?: (id: string | undefined) => void\n hasValueInThumb: boolean\n registerValueInThumb: () => () => void\n controlRef: RefObject<HTMLElement | null>\n thumbRef: RefObject<HTMLElement | null>\n}\n\nexport const SliderContext = createContext<SliderContextInterface>({} as SliderContextInterface)\n\nexport const useSliderContext = () => useContext(SliderContext)\n","import { Slider as BaseSlider } from '@base-ui/react/slider'\nimport { useFormFieldControl } from '@spark-ui/components/form-field'\nimport { ComponentProps, type PropsWithChildren, Ref, useCallback, useRef, useState } from 'react'\n\nimport { rootStyles } from './Slider.styles'\nimport { SliderContext } from './SliderContext'\nimport type { SliderRangeVariantsProps } from './SliderTrack.styles'\n\nexport interface SliderProps\n extends\n Omit<\n ComponentProps<typeof BaseSlider.Root>,\n 'render' | 'orientation' | 'onValueChange' | 'onValueCommitted'\n >,\n PropsWithChildren<SliderRangeVariantsProps> {\n /**\n * The value of the slider when initially rendered. Use when you do not need to control the state of the slider.\n */\n defaultValue?: number\n /**\n * The controlled value of the slider. Must be used in conjunction with `onValueChange`.\n */\n value?: number\n /**\n * Event handler called when the value changes.\n */\n onValueChange?: (value: number) => void\n /**\n * Event handler called when the value changes at the end of an interaction. Useful when you only need to capture a final value e.g. to update a backend service.\n */\n onValueCommit?: (value: number) => void\n /**\n * The name of the slider. Submitted with its owning form as part of a name/value pair.\n * If wrapped with a FormField with a name, will be inherited from it.\n */\n name?: string\n /**\n * When `true`, prevents the user from interacting with the slider.\n * @default false\n */\n disabled?: boolean\n /**\n * Sets the slider as interactive or not.\n */\n readOnly?: boolean\n /**\n * The minimum value for the range.\n * @default 0\n */\n min?: number\n /**\n * The maximum value for the range.\n * @default 100\n */\n max?: number\n /**\n * The stepping interval.\n * @default 1\n */\n step?: number\n ref?: Ref<HTMLDivElement>\n}\n\nexport const Slider = ({\n intent = 'support',\n children,\n className,\n ref,\n value: valueProp,\n defaultValue: defaultValueProp,\n disabled: disabledProp,\n readOnly: readOnlyProp,\n name: nameProp,\n onValueChange,\n onValueCommit,\n min = 0,\n max = 100,\n ...rest\n}: SliderProps) => {\n const field = useFormFieldControl()\n\n const disabled = field.disabled ?? disabledProp\n const readOnly = field.readOnly ?? readOnlyProp\n const name = field.name ?? nameProp\n\n const [labelId, setLabelId] = useState<string | undefined>(field.labelId)\n const [valueInThumbCount, setValueInThumbCount] = useState(0)\n const controlRef = useRef<HTMLElement | null>(null)\n const thumbRef = useRef<HTMLElement | null>(null)\n\n const handleLabelId = useCallback((id: string | undefined) => {\n setLabelId(id)\n }, [])\n\n const registerValueInThumb = useCallback(() => {\n setValueInThumbCount(c => c + 1)\n\n return () => setValueInThumbCount(c => c - 1)\n }, [])\n\n return (\n <SliderContext.Provider\n value={{\n intent,\n min,\n max,\n fieldLabelId: field.labelId || labelId,\n fieldId: field.id,\n onLabelId: handleLabelId,\n hasValueInThumb: valueInThumbCount > 0,\n registerValueInThumb,\n controlRef,\n thumbRef,\n }}\n >\n <BaseSlider.Root\n ref={ref}\n data-spark-component=\"slider\"\n className={rootStyles({ className })}\n orientation=\"horizontal\"\n disabled={disabled || readOnly}\n thumbAlignment=\"edge\"\n name={name}\n aria-describedby={field.description}\n aria-invalid={field.isInvalid}\n aria-disabled={disabled || readOnly ? true : undefined}\n value={valueProp !== undefined ? [valueProp] : undefined}\n defaultValue={defaultValueProp !== undefined ? [defaultValueProp] : undefined}\n onValueChange={\n onValueChange\n ? (value: number | readonly number[]) => {\n const v = Array.isArray(value) ? (value[0] ?? 0) : value\n onValueChange(v)\n }\n : undefined\n }\n onValueCommitted={\n onValueCommit\n ? (value: number | readonly number[]) => {\n const v = Array.isArray(value) ? (value[0] ?? 0) : value\n onValueCommit(v)\n }\n : undefined\n }\n min={min}\n max={max}\n {...rest}\n >\n {children}\n </BaseSlider.Root>\n </SliderContext.Provider>\n )\n}\n\nSlider.displayName = 'Slider'\n","import { Slider as BaseSlider } from '@base-ui/react/slider'\nimport { useMergeRefs } from '@spark-ui/hooks/use-merge-refs'\nimport { cx } from 'class-variance-authority'\nimport { ComponentProps } from 'react'\n\nimport { useSliderContext } from './SliderContext'\n\nexport type SliderControlProps = Omit<ComponentProps<typeof BaseSlider.Control>, 'render'>\n\nexport const SliderControl = ({ className, ref, ...rest }: SliderControlProps) => {\n const { hasValueInThumb, controlRef } = useSliderContext()\n const mergedRef = useMergeRefs(controlRef, ref)\n\n return (\n <BaseSlider.Control\n data-spark-component=\"slider-control\"\n ref={mergedRef}\n className={cx(\n 'min-h-sz-24 relative col-span-2 flex w-full min-w-0 flex-1 items-center',\n hasValueInThumb && 'mt-xl',\n className\n )}\n {...rest}\n />\n )\n}\n\nSliderControl.displayName = 'Slider.Control'\n","import { cva, VariantProps } from 'class-variance-authority'\n\nexport const trackVariants = cva(['relative grow h-sz-4 bg-on-background/dim-4 rounded-sm'])\n\nexport const rangeVariants = cva(\n [\n 'absolute h-full rounded-sm',\n // Disable transitions during drag to eliminate latency\n 'transition-none',\n ],\n {\n variants: {\n intent: {\n main: ['bg-main'],\n support: ['bg-support'],\n accent: ['bg-accent'],\n info: ['bg-info'],\n neutral: ['bg-neutral'],\n success: ['bg-success'],\n alert: ['bg-alert'],\n error: ['bg-error'],\n },\n },\n defaultVariants: {\n intent: 'support',\n },\n }\n)\n\nexport type SliderRangeVariantsProps = VariantProps<typeof rangeVariants>\n","import { Slider as BaseSlider } from '@base-ui/react/slider'\nimport { ComponentProps } from 'react'\n\nimport { useSliderContext } from './SliderContext'\nimport { rangeVariants } from './SliderTrack.styles'\n\nexport type SliderIndicatorProps = Omit<ComponentProps<typeof BaseSlider.Indicator>, 'render'>\n\nexport const SliderIndicator = ({ className, ref, ...rest }: SliderIndicatorProps) => {\n const { intent } = useSliderContext()\n\n return (\n <BaseSlider.Indicator\n data-spark-component=\"slider-indicator\"\n ref={ref}\n className={rangeVariants({ intent, className })}\n {...rest}\n />\n )\n}\n\nSliderIndicator.displayName = 'Slider.Indicator'\n","import { useFormFieldControl } from '@spark-ui/components/form-field'\nimport { useMergeRefs } from '@spark-ui/hooks/use-merge-refs'\nimport { cx } from 'class-variance-authority'\nimport { ReactNode, Ref, useEffect, useId, useRef } from 'react'\n\nimport { FormFieldRequiredIndicator } from '../form-field/FormFieldRequiredIndicator'\nimport { Label, LabelProps } from '../label'\nimport { Slottable } from '../slot'\nimport { useSliderContext } from './SliderContext'\n\nconst ID_PREFIX = ':slider-label'\n\nexport interface SliderLabelProps extends LabelProps {\n /**\n * Element shown when the input is required inside the label.\n */\n requiredIndicator?: ReactNode\n ref?: Ref<HTMLLabelElement>\n}\n\nexport const SliderLabel = ({\n htmlFor: htmlForProp,\n id: idProp,\n className,\n children,\n requiredIndicator = <FormFieldRequiredIndicator />,\n asChild,\n ref,\n ...others\n}: SliderLabelProps) => {\n const field = useFormFieldControl()\n const { fieldLabelId, fieldId, onLabelId } = useSliderContext()\n\n // Generate an id if not provided and no FormField labelId is available\n const internalId = useId()\n const generatedId = `${ID_PREFIX}-${internalId}`\n const labelId = idProp || fieldLabelId || field.labelId || generatedId\n\n // Use FormField id for htmlFor if present, otherwise use fieldId from context, or the prop\n const htmlFor = asChild ? undefined : htmlForProp || fieldId || field.id\n\n // Get disabled and required state from FormField if present\n const disabled = field.disabled\n const isRequired = field.isRequired\n\n // Notify SliderContext of the label id if no FormField is present\n const labelRef = useRef<HTMLLabelElement>(null)\n const mergedRef = useMergeRefs(ref, labelRef)\n\n useEffect(() => {\n if (onLabelId && !fieldLabelId && !field.labelId) {\n onLabelId(labelId)\n }\n }, [onLabelId, fieldLabelId, field.labelId, labelId])\n\n return (\n <Label\n ref={mergedRef}\n id={labelId}\n data-spark-component=\"slider-label\"\n htmlFor={htmlFor}\n className={cx(disabled ? 'text-on-surface/dim-3 pointer-events-none' : undefined, className)}\n asChild={asChild}\n {...others}\n >\n <>\n <Slottable>{children}</Slottable>\n {isRequired && requiredIndicator}\n </>\n </Label>\n )\n}\n\nSliderLabel.displayName = 'Slider.Label'\n","import { cx } from 'class-variance-authority'\nimport { forwardRef, type ReactNode } from 'react'\n\nimport { useSliderContext } from './SliderContext'\n\nexport interface SliderMaxValueProps {\n className?: string\n children?: (value: number) => ReactNode\n}\n\nexport const SliderMaxValue = forwardRef<HTMLDivElement, SliderMaxValueProps>(\n ({ className, children }, ref) => {\n const { max = 100 } = useSliderContext()\n\n const content = children ? children(max) : max\n\n return (\n <div\n data-spark-component=\"slider-max-value\"\n ref={ref}\n className={cx('text-on-surface/dim-1 text-body-2 col-start-2 text-right', className)}\n >\n {content}\n </div>\n )\n }\n)\n\nSliderMaxValue.displayName = 'Slider.MaxValue'\n","import { cx } from 'class-variance-authority'\nimport { forwardRef, type ReactNode } from 'react'\n\nimport { useSliderContext } from './SliderContext'\n\nexport interface SliderMinValueProps {\n className?: string\n children?: (value: number) => ReactNode\n}\n\nexport const SliderMinValue = forwardRef<HTMLDivElement, SliderMinValueProps>(\n ({ className, children }, ref) => {\n const { min = 0 } = useSliderContext()\n\n const content = children ? children(min) : min\n\n return (\n <div\n data-spark-component=\"slider-min-value\"\n ref={ref}\n className={cx('text-on-surface/dim-1 text-body-2 col-start-1 text-left', className)}\n >\n {content}\n </div>\n )\n }\n)\n\nSliderMinValue.displayName = 'Slider.MinValue'\n","import { cva, VariantProps } from 'class-variance-authority'\n\nexport const thumbVariants = cva(\n [\n 'relative block size-sz-24 rounded-full cursor-pointer',\n 'outline-hidden',\n 'has-focus-visible:ring-2 has-focus-visible:ring-offset-2 has-focus-visible:ring-focus',\n 'data-disabled:hover:ring-0 data-disabled:cursor-not-allowed data-disabled:before:hidden',\n // visual thumb\n 'after:absolute after:left-1/2 after:top-1/2 after:-translate-x-1/2 after:-translate-y-1/2',\n 'after:size-sz-24 after:rounded-full',\n // hover effect\n 'before:absolute before:left-1/2 before:top-1/2 before:-translate-x-1/2 before:-translate-y-1/2',\n 'before:size-sz-24 before:rounded-full before:border-solid before:border-sm before:transition-all before:duration-75',\n 'hover:before:size-sz-32 data-dragging:before:size-sz-32',\n ],\n {\n variants: {\n intent: {\n main: ['after:bg-main', 'before:bg-main-container before:border-main'],\n support: ['after:bg-support', 'before:bg-support-container before:border-support'],\n accent: ['after:bg-accent', 'before:bg-accent-container before:border-accent'],\n info: ['after:bg-info', 'before:bg-info-container before:border-info'],\n neutral: ['after:bg-neutral', 'before:bg-neutral-container before:border-neutral'],\n success: ['after:bg-success', 'before:bg-success-container before:border-success'],\n alert: ['after:bg-alert', 'before:bg-alert-container before:border-alert'],\n error: ['after:bg-error', 'before:bg-error-container before:border-error'],\n },\n },\n defaultVariants: {\n intent: 'support',\n },\n }\n)\n\nexport type SliderThumbVariantsProps = VariantProps<typeof thumbVariants>\n","import { createContext, useContext } from 'react'\n\nexport interface SliderThumbContextValue {\n isInsideThumb: true\n}\n\nexport const SliderThumbContext = createContext<SliderThumbContextValue | null>(null)\n\nexport const useSliderThumbContext = () => useContext(SliderThumbContext)\n","import { Slider as BaseSlider } from '@base-ui/react/slider'\nimport { useMergeRefs } from '@spark-ui/hooks/use-merge-refs'\nimport { ComponentProps, type PropsWithChildren, useRef } from 'react'\n\nimport { useSliderContext } from './SliderContext'\nimport { thumbVariants } from './SliderThumb.styles'\nimport { SliderThumbContext } from './SliderThumbContext'\n\nexport type SliderThumbProps = Omit<ComponentProps<typeof BaseSlider.Thumb>, 'render' | 'index'> &\n PropsWithChildren\n\nexport const SliderThumb = ({\n className,\n ref: forwardedRef,\n children,\n ...rest\n}: SliderThumbProps) => {\n const { intent, fieldLabelId, fieldId, thumbRef: contextThumbRef } = useSliderContext()\n\n const innerRef = useRef<HTMLDivElement>(null)\n const ref = useMergeRefs(contextThumbRef, forwardedRef ?? innerRef)\n\n return (\n <SliderThumbContext.Provider value={{ isInsideThumb: true }}>\n <BaseSlider.Thumb\n data-spark-component=\"slider-thumb\"\n ref={ref}\n id={fieldId}\n className={thumbVariants({ intent, className })}\n aria-labelledby={fieldLabelId}\n {...rest}\n >\n {children}\n </BaseSlider.Thumb>\n </SliderThumbContext.Provider>\n )\n}\n\nSliderThumb.displayName = 'Slider.Thumb'\n","import { Slider as BaseSlider } from '@base-ui/react/slider'\nimport { ComponentProps } from 'react'\n\nimport { trackVariants } from './SliderTrack.styles'\n\nexport type SliderTrackProps = Omit<ComponentProps<typeof BaseSlider.Track>, 'render'>\n\nexport const SliderTrack = ({ className, ref, ...rest }: SliderTrackProps) => {\n return (\n <BaseSlider.Track\n data-spark-component=\"slider-track\"\n ref={ref}\n className={trackVariants({ className })}\n {...rest}\n />\n )\n}\n\nSliderTrack.displayName = 'Slider.Track'\n","import type { RefObject } from 'react'\nimport { useLayoutEffect, useState } from 'react'\n\n/**\n * Computes the translateX (in pixels) to apply to the value element so it stays\n * within the horizontal bounds of the slider control when displayed inside the thumb.\n *\n * @param controlRef - Ref to the slider control (track container)\n * @param thumbRef - Ref to the thumb element\n * @param valueRef - Ref to the value label element\n * @param value - Current slider value (0–100 or min–max), used to re-run when thumb moves\n * @returns translateX in pixels (positive = right, negative = left), or 0 if refs are missing\n */\nexport function useSliderValueBoundaries(\n controlRef: RefObject<HTMLElement | null>,\n thumbRef: RefObject<HTMLElement | null>,\n valueRef: RefObject<HTMLElement | null>,\n value: number\n): number {\n const [translateX, setTranslateX] = useState(0)\n const [refsRetryScheduled, setRefsRetryScheduled] = useState(false)\n\n useLayoutEffect(() => {\n const control = controlRef.current\n const thumb = thumbRef.current\n const valueEl = valueRef.current\n\n if (!control || !thumb || !valueEl) {\n setTranslateX(0)\n // Re-run once on next frame when refs may be set (e.g. Slider.Value mounts after Control/Thumb)\n if (!refsRetryScheduled) {\n requestAnimationFrame(() => setRefsRetryScheduled(true))\n }\n\n return\n }\n\n let cancelled = false\n\n const compute = () => {\n if (cancelled) return\n\n const controlRect = control.getBoundingClientRect()\n const thumbRect = thumb.getBoundingClientRect()\n const valueWidth = valueEl.scrollWidth\n\n // Skip until value label has been laid out (content from render prop may not be ready on first paint)\n if (valueWidth === 0) {\n requestAnimationFrame(compute)\n\n return\n }\n\n const thumbCenterPx = thumbRect.left - controlRect.left + thumbRect.width / 2\n\n const valueCenterMin = valueWidth / 2\n const valueCenterMax = controlRect.width - valueWidth / 2\n\n const clampedCenter = Math.max(valueCenterMin, Math.min(valueCenterMax, thumbCenterPx))\n const nextTranslateX = clampedCenter - thumbCenterPx\n\n setTranslateX(prev => (prev !== nextTranslateX ? nextTranslateX : prev))\n }\n\n compute()\n\n const resizeObserver = new ResizeObserver(compute)\n resizeObserver.observe(control)\n resizeObserver.observe(valueEl)\n\n return () => {\n cancelled = true\n resizeObserver.disconnect()\n }\n }, [controlRef, thumbRef, valueRef, value, refsRetryScheduled])\n\n return translateX\n}\n","import { Slider as BaseSlider } from '@base-ui/react/slider'\nimport { useMergeRefs } from '@spark-ui/hooks/use-merge-refs'\nimport { cx } from 'class-variance-authority'\nimport type { ReactNode } from 'react'\nimport { ComponentProps, useCallback, useEffect, useRef, useState } from 'react'\n\nimport { useSliderContext } from './SliderContext'\nimport { useSliderThumbContext } from './SliderThumbContext'\nimport { useSliderValueBoundaries } from './useSliderValueBoundaries'\n\nexport type SliderValueProps = Omit<\n ComponentProps<typeof BaseSlider.Value>,\n 'render' | 'children'\n> & {\n children?: ReactNode | ((formatted: string, value: number) => ReactNode)\n}\n\n/**\n * Normalizes Base UI's (formattedValues, values) to single (formatted, value) for the render prop.\n */\nexport const SliderValue = ({ className, children, ref, ...rest }: SliderValueProps) => {\n const { registerValueInThumb, controlRef, thumbRef } = useSliderContext()\n const thumbContext = useSliderThumbContext()\n const isInsideThumb = thumbContext !== null\n\n const valueRef = useRef<HTMLOutputElement | null>(null)\n const mergedRef = useMergeRefs(valueRef, ref)\n\n const [currentValue, setCurrentValue] = useState(0)\n const translateX = useSliderValueBoundaries(controlRef, thumbRef, valueRef, currentValue)\n\n useEffect(() => {\n if (!isInsideThumb) return\n\n return registerValueInThumb()\n }, [isInsideThumb, registerValueInThumb])\n\n const resolvedClassName = cx(\n isInsideThumb\n ? 'absolute left-1/2 -translate-x-1/2 top-[calc(-100%-var(--spacing-sm))] text-body-1 font-bold whitespace-nowrap'\n : 'default:text-body-1 col-start-2 text-right default:font-bold',\n className\n )\n\n const normalizedChildren = useCallback(\n (formattedValues: readonly string[], values: readonly number[]) => {\n const formatted = formattedValues[0] ?? String(values[0] ?? '')\n const value = values[0] ?? 0\n setCurrentValue(value)\n if (typeof children === 'function') {\n return children(formatted, value)\n }\n\n return formatted\n },\n [children]\n )\n\n const style = isInsideThumb\n ? { transform: `translate(calc(0% + ${translateX}px), 0)` }\n : undefined\n\n return (\n <BaseSlider.Value\n data-spark-component=\"slider-value\"\n ref={mergedRef}\n className={resolvedClassName}\n style={style}\n {...rest}\n >\n {normalizedChildren}\n </BaseSlider.Value>\n )\n}\n\nSliderValue.displayName = 'Slider.Value'\n","import { Slider as Root, type SliderProps } from './Slider'\nimport { SliderControl as Control, type SliderControlProps } from './SliderControl'\nimport { SliderIndicator as Indicator, type SliderIndicatorProps } from './SliderIndicator'\nimport { SliderLabel as Label, type SliderLabelProps } from './SliderLabel'\nimport { SliderMaxValue as MaxValue, type SliderMaxValueProps } from './SliderMaxValue'\nimport { SliderMinValue as MinValue, type SliderMinValueProps } from './SliderMinValue'\nimport { SliderThumb as Thumb, type SliderThumbProps } from './SliderThumb'\nimport { SliderTrack as Track, type SliderTrackProps } from './SliderTrack'\nimport { SliderValue as Value, type SliderValueProps } from './SliderValue'\n\n/**\n * An input control that allows users to select a value from a continuous range by dragging a handle.\n */\nexport const Slider: typeof Root & {\n Control: typeof Control\n Indicator: typeof Indicator\n Label: typeof Label\n MaxValue: typeof MaxValue\n MinValue: typeof MinValue\n Thumb: typeof Thumb\n Track: typeof Track\n Value: typeof Value\n} = Object.assign(Root, {\n Control,\n Indicator,\n Label,\n MaxValue,\n MinValue,\n Thumb,\n Track,\n Value,\n})\n\nSlider.displayName = 'Slider'\nControl.displayName = 'Slider.Control'\nIndicator.displayName = 'Slider.Indicator'\nLabel.displayName = 'Slider.Label'\nMaxValue.displayName = 'Slider.MaxValue'\nMinValue.displayName = 'Slider.MinValue'\nThumb.displayName = 'Slider.Thumb'\nTrack.displayName = 'Slider.Track'\nValue.displayName = 'Slider.Value'\n\nexport type {\n SliderProps,\n SliderControlProps,\n SliderIndicatorProps,\n SliderLabelProps,\n SliderMaxValueProps,\n SliderMinValueProps,\n SliderThumbProps,\n SliderTrackProps,\n SliderValueProps,\n}\n"],"mappings":";;;;;;;;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EK,IAAQ,IACV,EAAE,WAAW,uBAAuB,EAAW,UAAU,GACzD,KAAA;AAEJ,QACE,kBAAC,EAAW,OAAZ;EACE,wBAAqB;EACrB,KAAK;EACL,WAAW;EACJ;EACP,GAAI;YAEH;EACgB,CAAA;;AAIvB,EAAY,cAAc;;;AC9D1B,IAAa,IAST,OAAO,OAAO,GAAM;CACtB,SAAA;CACA,WAAA;CACA,OAAA;CACA,UAAA;CACA,UAAA;CACA,OAAA;CACA,OAAA;CACA,OAAA;CACD,CAAC;AAEF,EAAO,cAAc,UACrB,EAAQ,cAAc,kBACtB,EAAU,cAAc,oBACxB,EAAM,cAAc,gBACpB,EAAS,cAAc,mBACvB,EAAS,cAAc,mBACvB,EAAM,cAAc,gBACpB,EAAM,cAAc,gBACpB,EAAM,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/slot/Slot.tsx"],"sourcesContent":["import { Slot as RadixSlot } from 'radix-ui'\nimport {\n cloneElement,\n HTMLAttributes,\n isValidElement,\n PropsWithChildren,\n ReactNode,\n Ref,\n} from 'react'\n\nexport const Slottable: typeof RadixSlot.Slottable = RadixSlot.Slottable\n\nexport type SlotProps = PropsWithChildren<HTMLAttributes<HTMLElement>> & {\n ref?: Ref<HTMLElement>\n}\n\nexport const Slot = ({ ref, ...props }: SlotProps) => {\n return <RadixSlot.Root ref={ref} {...props} />\n}\n\n/**\n * When using Radix `Slot` component, it will consider its first child to merge its props with.\n * In some cases, you might need to wrap the top child with additional markup without breaking this behaviour.\n */\nexport const wrapPolymorphicSlot = (\n asChild: boolean | undefined,\n children: ReactNode,\n callback: (children: ReactNode) => ReactNode\n) => {\n if (!asChild) return callback(children) // If polymorphic behaviour is not used, we keep the original children\n\n return isValidElement(children)\n ? cloneElement(\n children,\n undefined,\n callback((children.props as { children: ReactNode }).children)\n )\n : null\n}\n"],"mappings":"+KAUA,IAAa,EAAwC,EAAA,KAAU,UAMlD,GAAQ,CAAE,MAAK,GAAG,MACtB,EAAA,EAAA,KAAC,EAAA,KAAU,KAAX,CAAqB,MAAK,GAAI,EAAS,CAAA,CAOnC,GACX,EACA,EACA,IAEK,GAEL,EAAA,EAAA,gBAAsB,EAAS,EAAA,EAAA,EAAA,cAEzB,EACA,IAAA,GACA,EAAU,EAAS,MAAkC,SAAS,CAC/D,CACD,KARiB,EAAS,EAAS"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/slot/Slot.tsx"],"sourcesContent":["import { Slot as RadixSlot } from 'radix-ui'\nimport {\n cloneElement,\n HTMLAttributes,\n isValidElement,\n PropsWithChildren,\n ReactNode,\n Ref,\n} from 'react'\n\nexport const Slottable: typeof RadixSlot.Slottable = RadixSlot.Slottable\n\nexport type SlotProps = PropsWithChildren<HTMLAttributes<HTMLElement>> & {\n ref?: Ref<HTMLElement>\n}\n\n/**\n * A utility component that merges its props with its child component, enabling polymorphic\n * component patterns through the `asChild` prop for flexible composition.\n */\nexport const Slot = ({ ref, ...props }: SlotProps) => {\n return <RadixSlot.Root ref={ref} {...props} />\n}\n\n/**\n * When using Radix `Slot` component, it will consider its first child to merge its props with.\n * In some cases, you might need to wrap the top child with additional markup without breaking this behaviour.\n */\nexport const wrapPolymorphicSlot = (\n asChild: boolean | undefined,\n children: ReactNode,\n callback: (children: ReactNode) => ReactNode\n) => {\n if (!asChild) return callback(children) // If polymorphic behaviour is not used, we keep the original children\n\n return isValidElement(children)\n ? cloneElement(\n children,\n undefined,\n callback((children.props as { children: ReactNode }).children)\n )\n : null\n}\n"],"mappings":"+KAUA,IAAa,EAAwC,EAAA,KAAU,UAUlD,GAAQ,CAAE,MAAK,GAAG,MACtB,EAAA,EAAA,KAAC,EAAA,KAAU,KAAX,CAAqB,MAAK,GAAI,EAAS,CAAA,CAOnC,GACX,EACA,EACA,IAEK,GAEL,EAAA,EAAA,gBAAsB,EAAS,EAAA,EAAA,EAAA,cAEzB,EACA,IAAA,GACA,EAAU,EAAS,MAAkC,SAAS,CAC/D,CACD,KARiB,EAAS,EAAS"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../src/slot/Slot.tsx"],"sourcesContent":["import { Slot as RadixSlot } from 'radix-ui'\nimport {\n cloneElement,\n HTMLAttributes,\n isValidElement,\n PropsWithChildren,\n ReactNode,\n Ref,\n} from 'react'\n\nexport const Slottable: typeof RadixSlot.Slottable = RadixSlot.Slottable\n\nexport type SlotProps = PropsWithChildren<HTMLAttributes<HTMLElement>> & {\n ref?: Ref<HTMLElement>\n}\n\nexport const Slot = ({ ref, ...props }: SlotProps) => {\n return <RadixSlot.Root ref={ref} {...props} />\n}\n\n/**\n * When using Radix `Slot` component, it will consider its first child to merge its props with.\n * In some cases, you might need to wrap the top child with additional markup without breaking this behaviour.\n */\nexport const wrapPolymorphicSlot = (\n asChild: boolean | undefined,\n children: ReactNode,\n callback: (children: ReactNode) => ReactNode\n) => {\n if (!asChild) return callback(children) // If polymorphic behaviour is not used, we keep the original children\n\n return isValidElement(children)\n ? cloneElement(\n children,\n undefined,\n callback((children.props as { children: ReactNode }).children)\n )\n : null\n}\n"],"mappings":";;;;AAUA,IAAa,IAAwC,EAAU,WAMlD,KAAQ,EAAE,QAAK,GAAG,QACtB,kBAAC,EAAU,MAAX;CAAqB;CAAK,GAAI;CAAS,CAAA,EAOnC,KACX,GACA,GACA,MAEK,IAEE,EAAe,EAAS,GAC3B,EACE,GACA,KAAA,GACA,EAAU,EAAS,MAAkC,SAAS,CAC/D,GACD,OARiB,EAAS,EAAS"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../src/slot/Slot.tsx"],"sourcesContent":["import { Slot as RadixSlot } from 'radix-ui'\nimport {\n cloneElement,\n HTMLAttributes,\n isValidElement,\n PropsWithChildren,\n ReactNode,\n Ref,\n} from 'react'\n\nexport const Slottable: typeof RadixSlot.Slottable = RadixSlot.Slottable\n\nexport type SlotProps = PropsWithChildren<HTMLAttributes<HTMLElement>> & {\n ref?: Ref<HTMLElement>\n}\n\n/**\n * A utility component that merges its props with its child component, enabling polymorphic\n * component patterns through the `asChild` prop for flexible composition.\n */\nexport const Slot = ({ ref, ...props }: SlotProps) => {\n return <RadixSlot.Root ref={ref} {...props} />\n}\n\n/**\n * When using Radix `Slot` component, it will consider its first child to merge its props with.\n * In some cases, you might need to wrap the top child with additional markup without breaking this behaviour.\n */\nexport const wrapPolymorphicSlot = (\n asChild: boolean | undefined,\n children: ReactNode,\n callback: (children: ReactNode) => ReactNode\n) => {\n if (!asChild) return callback(children) // If polymorphic behaviour is not used, we keep the original children\n\n return isValidElement(children)\n ? cloneElement(\n children,\n undefined,\n callback((children.props as { children: ReactNode }).children)\n )\n : null\n}\n"],"mappings":";;;;AAUA,IAAa,IAAwC,EAAU,WAUlD,KAAQ,EAAE,QAAK,GAAG,QACtB,kBAAC,EAAU,MAAX;CAAqB;CAAK,GAAI;CAAS,CAAA,EAOnC,KACX,GACA,GACA,MAEK,IAEE,EAAe,EAAS,GAC3B,EACE,GACA,KAAA,GACA,EAAU,EAAS,MAAkC,SAAS,CAC/D,GACD,OARiB,EAAS,EAAS"}
@@ -1 +1 @@
1
- {"version":3,"file":"spinner-DFUoYvmm.js","names":[],"sources":["../src/spinner/Spinner.styles.tsx","../src/spinner/Spinner.tsx"],"sourcesContent":["import { makeVariants } from '@spark-ui/internal-utils'\nimport { cva, VariantProps } from 'class-variance-authority'\n\nconst defaultVariants = {\n intent: 'current',\n size: 'current',\n isBackgroundVisible: false,\n} as const\n\nexport const spinnerStyles = cva(\n ['inline-block', 'border-solid', 'rounded-full', 'border-md', 'animate-spin'],\n {\n variants: {\n /**\n * Use `size` prop to set the size of the spinner. If you want to set the full size for the spinner, don't forget to add a wrapping container with its own size.\n */\n size: {\n current: ['u-current-font-size'],\n sm: ['w-sz-20', 'h-sz-20'],\n md: ['w-sz-28', 'h-sz-28'],\n full: ['w-full', 'h-full'],\n },\n /**\n * Color scheme of the spinner.\n */\n intent: makeVariants<\n 'intent',\n ['current', 'main', 'support', 'accent', 'success', 'alert', 'error', 'info', 'neutral']\n >({\n current: ['border-current'],\n main: ['border-main'],\n support: ['border-support'],\n accent: ['border-accent'],\n success: ['border-success'],\n alert: ['border-alert'],\n error: ['border-error'],\n info: ['border-info'],\n neutral: ['border-neutral'],\n }),\n /**\n * Size of the button.\n */\n isBackgroundVisible: {\n true: ['border-b-neutral-container', 'border-l-neutral-container'],\n false: ['border-b-transparent', 'border-l-transparent'],\n },\n },\n defaultVariants,\n }\n)\n\nexport type SpinnerStylesProps = VariantProps<typeof spinnerStyles>\n","import { ComponentPropsWithRef, PropsWithChildren } from 'react'\n\nimport { VisuallyHidden } from '../visually-hidden'\nimport { spinnerStyles, SpinnerStylesProps } from './Spinner.styles'\n\nexport interface SpinnerProps extends ComponentPropsWithRef<'div'>, SpinnerStylesProps {\n /**\n * Use `label` prop for accessibility, it is important to add a fallback loading text. This text will be visible to screen readers.\n */\n label?: string\n}\n\nexport const Spinner = ({\n className,\n size = 'current',\n intent = 'current',\n label,\n isBackgroundVisible,\n ref,\n ...others\n}: PropsWithChildren<SpinnerProps>) => {\n return (\n <span\n role=\"status\"\n data-spark-component=\"spinner\"\n ref={ref}\n className={spinnerStyles({ className, size, intent, isBackgroundVisible })}\n {...others}\n >\n {label && <VisuallyHidden>{label}</VisuallyHidden>}\n </span>\n )\n}\n"],"mappings":"4LASA,IAAa,GAAA,EAAA,EAAA,KACX,CAAC,eAAgB,eAAgB,eAAgB,YAAa,eAAe,CAC7E,CACE,SAAU,CAIR,KAAM,CACJ,QAAS,CAAC,sBAAsB,CAChC,GAAI,CAAC,UAAW,UAAU,CAC1B,GAAI,CAAC,UAAW,UAAU,CAC1B,KAAM,CAAC,SAAU,SAAS,CAC3B,CAID,QAAA,EAAA,EAAA,cAGE,CACA,QAAS,CAAC,iBAAiB,CAC3B,KAAM,CAAC,cAAc,CACrB,QAAS,CAAC,iBAAiB,CAC3B,OAAQ,CAAC,gBAAgB,CACzB,QAAS,CAAC,iBAAiB,CAC3B,MAAO,CAAC,eAAe,CACvB,MAAO,CAAC,eAAe,CACvB,KAAM,CAAC,cAAc,CACrB,QAAS,CAAC,iBAAiB,CAC5B,CAAC,CAIF,oBAAqB,CACnB,KAAM,CAAC,6BAA8B,6BAA6B,CAClE,MAAO,CAAC,uBAAwB,uBAAuB,CACxD,CACF,CACD,gBA5CoB,CACtB,OAAQ,UACR,KAAM,UACN,oBAAqB,GACtB,CAyCE,CACF,CCrCY,GAAW,CACtB,YACA,OAAO,UACP,SAAS,UACT,QACA,sBACA,MACA,GAAG,MAGD,EAAA,EAAA,KAAC,OAAD,CACE,KAAK,SACL,uBAAqB,UAChB,MACL,UAAW,EAAc,CAAE,YAAW,OAAM,SAAQ,sBAAqB,CAAC,CAC1E,GAAI,WAEH,IAAS,EAAA,EAAA,KAAC,EAAA,eAAD,CAAA,SAAiB,EAAuB,CAAA,CAC7C,CAAA"}
1
+ {"version":3,"file":"spinner-DFUoYvmm.js","names":[],"sources":["../src/spinner/Spinner.styles.tsx","../src/spinner/Spinner.tsx"],"sourcesContent":["import { makeVariants } from '@spark-ui/internal-utils'\nimport { cva, VariantProps } from 'class-variance-authority'\n\nconst defaultVariants = {\n intent: 'current',\n size: 'current',\n isBackgroundVisible: false,\n} as const\n\nexport const spinnerStyles = cva(\n ['inline-block', 'border-solid', 'rounded-full', 'border-md', 'animate-spin'],\n {\n variants: {\n /**\n * Use `size` prop to set the size of the spinner. If you want to set the full size for the spinner, don't forget to add a wrapping container with its own size.\n */\n size: {\n current: ['u-current-font-size'],\n sm: ['w-sz-20', 'h-sz-20'],\n md: ['w-sz-28', 'h-sz-28'],\n full: ['w-full', 'h-full'],\n },\n /**\n * Color scheme of the spinner.\n */\n intent: makeVariants<\n 'intent',\n ['current', 'main', 'support', 'accent', 'success', 'alert', 'error', 'info', 'neutral']\n >({\n current: ['border-current'],\n main: ['border-main'],\n support: ['border-support'],\n accent: ['border-accent'],\n success: ['border-success'],\n alert: ['border-alert'],\n error: ['border-error'],\n info: ['border-info'],\n neutral: ['border-neutral'],\n }),\n /**\n * Size of the button.\n */\n isBackgroundVisible: {\n true: ['border-b-neutral-container', 'border-l-neutral-container'],\n false: ['border-b-transparent', 'border-l-transparent'],\n },\n },\n defaultVariants,\n }\n)\n\nexport type SpinnerStylesProps = VariantProps<typeof spinnerStyles>\n","import { ComponentPropsWithRef, PropsWithChildren } from 'react'\n\nimport { VisuallyHidden } from '../visually-hidden'\nimport { spinnerStyles, SpinnerStylesProps } from './Spinner.styles'\n\nexport interface SpinnerProps extends ComponentPropsWithRef<'div'>, SpinnerStylesProps {\n /**\n * Use `label` prop for accessibility, it is important to add a fallback loading text. This text will be visible to screen readers.\n */\n label?: string\n}\n\n/**\n * An animated indicator that shows a loading or processing state to users.\n */\nexport const Spinner = ({\n className,\n size = 'current',\n intent = 'current',\n label,\n isBackgroundVisible,\n ref,\n ...others\n}: PropsWithChildren<SpinnerProps>) => {\n return (\n <span\n role=\"status\"\n data-spark-component=\"spinner\"\n ref={ref}\n className={spinnerStyles({ className, size, intent, isBackgroundVisible })}\n {...others}\n >\n {label && <VisuallyHidden>{label}</VisuallyHidden>}\n </span>\n )\n}\n"],"mappings":"4LASA,IAAa,GAAA,EAAA,EAAA,KACX,CAAC,eAAgB,eAAgB,eAAgB,YAAa,eAAe,CAC7E,CACE,SAAU,CAIR,KAAM,CACJ,QAAS,CAAC,sBAAsB,CAChC,GAAI,CAAC,UAAW,UAAU,CAC1B,GAAI,CAAC,UAAW,UAAU,CAC1B,KAAM,CAAC,SAAU,SAAS,CAC3B,CAID,QAAA,EAAA,EAAA,cAGE,CACA,QAAS,CAAC,iBAAiB,CAC3B,KAAM,CAAC,cAAc,CACrB,QAAS,CAAC,iBAAiB,CAC3B,OAAQ,CAAC,gBAAgB,CACzB,QAAS,CAAC,iBAAiB,CAC3B,MAAO,CAAC,eAAe,CACvB,MAAO,CAAC,eAAe,CACvB,KAAM,CAAC,cAAc,CACrB,QAAS,CAAC,iBAAiB,CAC5B,CAAC,CAIF,oBAAqB,CACnB,KAAM,CAAC,6BAA8B,6BAA6B,CAClE,MAAO,CAAC,uBAAwB,uBAAuB,CACxD,CACF,CACD,gBA5CoB,CACtB,OAAQ,UACR,KAAM,UACN,oBAAqB,GACtB,CAyCE,CACF,CClCY,GAAW,CACtB,YACA,OAAO,UACP,SAAS,UACT,QACA,sBACA,MACA,GAAG,MAGD,EAAA,EAAA,KAAC,OAAD,CACE,KAAK,SACL,uBAAqB,UAChB,MACL,UAAW,EAAc,CAAE,YAAW,OAAM,SAAQ,sBAAqB,CAAC,CAC1E,GAAI,WAEH,IAAS,EAAA,EAAA,KAAC,EAAA,eAAD,CAAA,SAAiB,EAAuB,CAAA,CAC7C,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"spinner-DULLiM6a.mjs","names":[],"sources":["../src/spinner/Spinner.styles.tsx","../src/spinner/Spinner.tsx"],"sourcesContent":["import { makeVariants } from '@spark-ui/internal-utils'\nimport { cva, VariantProps } from 'class-variance-authority'\n\nconst defaultVariants = {\n intent: 'current',\n size: 'current',\n isBackgroundVisible: false,\n} as const\n\nexport const spinnerStyles = cva(\n ['inline-block', 'border-solid', 'rounded-full', 'border-md', 'animate-spin'],\n {\n variants: {\n /**\n * Use `size` prop to set the size of the spinner. If you want to set the full size for the spinner, don't forget to add a wrapping container with its own size.\n */\n size: {\n current: ['u-current-font-size'],\n sm: ['w-sz-20', 'h-sz-20'],\n md: ['w-sz-28', 'h-sz-28'],\n full: ['w-full', 'h-full'],\n },\n /**\n * Color scheme of the spinner.\n */\n intent: makeVariants<\n 'intent',\n ['current', 'main', 'support', 'accent', 'success', 'alert', 'error', 'info', 'neutral']\n >({\n current: ['border-current'],\n main: ['border-main'],\n support: ['border-support'],\n accent: ['border-accent'],\n success: ['border-success'],\n alert: ['border-alert'],\n error: ['border-error'],\n info: ['border-info'],\n neutral: ['border-neutral'],\n }),\n /**\n * Size of the button.\n */\n isBackgroundVisible: {\n true: ['border-b-neutral-container', 'border-l-neutral-container'],\n false: ['border-b-transparent', 'border-l-transparent'],\n },\n },\n defaultVariants,\n }\n)\n\nexport type SpinnerStylesProps = VariantProps<typeof spinnerStyles>\n","import { ComponentPropsWithRef, PropsWithChildren } from 'react'\n\nimport { VisuallyHidden } from '../visually-hidden'\nimport { spinnerStyles, SpinnerStylesProps } from './Spinner.styles'\n\nexport interface SpinnerProps extends ComponentPropsWithRef<'div'>, SpinnerStylesProps {\n /**\n * Use `label` prop for accessibility, it is important to add a fallback loading text. This text will be visible to screen readers.\n */\n label?: string\n}\n\nexport const Spinner = ({\n className,\n size = 'current',\n intent = 'current',\n label,\n isBackgroundVisible,\n ref,\n ...others\n}: PropsWithChildren<SpinnerProps>) => {\n return (\n <span\n role=\"status\"\n data-spark-component=\"spinner\"\n ref={ref}\n className={spinnerStyles({ className, size, intent, isBackgroundVisible })}\n {...others}\n >\n {label && <VisuallyHidden>{label}</VisuallyHidden>}\n </span>\n )\n}\n"],"mappings":";;;;AASA,IAAa,IAAgB,EAC3B;CAAC;CAAgB;CAAgB;CAAgB;CAAa;CAAe,EAC7E;CACE,UAAU;EAIR,MAAM;GACJ,SAAS,CAAC,sBAAsB;GAChC,IAAI,CAAC,WAAW,UAAU;GAC1B,IAAI,CAAC,WAAW,UAAU;GAC1B,MAAM,CAAC,UAAU,SAAS;GAC3B;EAID,QAAQ,EAGN;GACA,SAAS,CAAC,iBAAiB;GAC3B,MAAM,CAAC,cAAc;GACrB,SAAS,CAAC,iBAAiB;GAC3B,QAAQ,CAAC,gBAAgB;GACzB,SAAS,CAAC,iBAAiB;GAC3B,OAAO,CAAC,eAAe;GACvB,OAAO,CAAC,eAAe;GACvB,MAAM,CAAC,cAAc;GACrB,SAAS,CAAC,iBAAiB;GAC5B,CAAC;EAIF,qBAAqB;GACnB,MAAM,CAAC,8BAA8B,6BAA6B;GAClE,OAAO,CAAC,wBAAwB,uBAAuB;GACxD;EACF;CACD,iBA5CoB;EACtB,QAAQ;EACR,MAAM;EACN,qBAAqB;EACtB;CAyCE,CACF,ECrCY,KAAW,EACtB,cACA,UAAO,WACP,YAAS,WACT,UACA,wBACA,QACA,GAAG,QAGD,kBAAC,QAAD;CACE,MAAK;CACL,wBAAqB;CAChB;CACL,WAAW,EAAc;EAAE;EAAW;EAAM;EAAQ;EAAqB,CAAC;CAC1E,GAAI;WAEH,KAAS,kBAAC,GAAD,EAAA,UAAiB,GAAuB,CAAA;CAC7C,CAAA"}
1
+ {"version":3,"file":"spinner-DULLiM6a.mjs","names":[],"sources":["../src/spinner/Spinner.styles.tsx","../src/spinner/Spinner.tsx"],"sourcesContent":["import { makeVariants } from '@spark-ui/internal-utils'\nimport { cva, VariantProps } from 'class-variance-authority'\n\nconst defaultVariants = {\n intent: 'current',\n size: 'current',\n isBackgroundVisible: false,\n} as const\n\nexport const spinnerStyles = cva(\n ['inline-block', 'border-solid', 'rounded-full', 'border-md', 'animate-spin'],\n {\n variants: {\n /**\n * Use `size` prop to set the size of the spinner. If you want to set the full size for the spinner, don't forget to add a wrapping container with its own size.\n */\n size: {\n current: ['u-current-font-size'],\n sm: ['w-sz-20', 'h-sz-20'],\n md: ['w-sz-28', 'h-sz-28'],\n full: ['w-full', 'h-full'],\n },\n /**\n * Color scheme of the spinner.\n */\n intent: makeVariants<\n 'intent',\n ['current', 'main', 'support', 'accent', 'success', 'alert', 'error', 'info', 'neutral']\n >({\n current: ['border-current'],\n main: ['border-main'],\n support: ['border-support'],\n accent: ['border-accent'],\n success: ['border-success'],\n alert: ['border-alert'],\n error: ['border-error'],\n info: ['border-info'],\n neutral: ['border-neutral'],\n }),\n /**\n * Size of the button.\n */\n isBackgroundVisible: {\n true: ['border-b-neutral-container', 'border-l-neutral-container'],\n false: ['border-b-transparent', 'border-l-transparent'],\n },\n },\n defaultVariants,\n }\n)\n\nexport type SpinnerStylesProps = VariantProps<typeof spinnerStyles>\n","import { ComponentPropsWithRef, PropsWithChildren } from 'react'\n\nimport { VisuallyHidden } from '../visually-hidden'\nimport { spinnerStyles, SpinnerStylesProps } from './Spinner.styles'\n\nexport interface SpinnerProps extends ComponentPropsWithRef<'div'>, SpinnerStylesProps {\n /**\n * Use `label` prop for accessibility, it is important to add a fallback loading text. This text will be visible to screen readers.\n */\n label?: string\n}\n\n/**\n * An animated indicator that shows a loading or processing state to users.\n */\nexport const Spinner = ({\n className,\n size = 'current',\n intent = 'current',\n label,\n isBackgroundVisible,\n ref,\n ...others\n}: PropsWithChildren<SpinnerProps>) => {\n return (\n <span\n role=\"status\"\n data-spark-component=\"spinner\"\n ref={ref}\n className={spinnerStyles({ className, size, intent, isBackgroundVisible })}\n {...others}\n >\n {label && <VisuallyHidden>{label}</VisuallyHidden>}\n </span>\n )\n}\n"],"mappings":";;;;AASA,IAAa,IAAgB,EAC3B;CAAC;CAAgB;CAAgB;CAAgB;CAAa;CAAe,EAC7E;CACE,UAAU;EAIR,MAAM;GACJ,SAAS,CAAC,sBAAsB;GAChC,IAAI,CAAC,WAAW,UAAU;GAC1B,IAAI,CAAC,WAAW,UAAU;GAC1B,MAAM,CAAC,UAAU,SAAS;GAC3B;EAID,QAAQ,EAGN;GACA,SAAS,CAAC,iBAAiB;GAC3B,MAAM,CAAC,cAAc;GACrB,SAAS,CAAC,iBAAiB;GAC3B,QAAQ,CAAC,gBAAgB;GACzB,SAAS,CAAC,iBAAiB;GAC3B,OAAO,CAAC,eAAe;GACvB,OAAO,CAAC,eAAe;GACvB,MAAM,CAAC,cAAc;GACrB,SAAS,CAAC,iBAAiB;GAC5B,CAAC;EAIF,qBAAqB;GACnB,MAAM,CAAC,8BAA8B,6BAA6B;GAClE,OAAO,CAAC,wBAAwB,uBAAuB;GACxD;EACF;CACD,iBA5CoB;EACtB,QAAQ;EACR,MAAM;EACN,qBAAqB;EACtB;CAyCE,CACF,EClCY,KAAW,EACtB,cACA,UAAO,WACP,YAAS,WACT,UACA,wBACA,QACA,GAAG,QAGD,kBAAC,QAAD;CACE,MAAK;CACL,wBAAqB;CAChB;CACL,WAAW,EAAc;EAAE;EAAW;EAAM;EAAQ;EAAqB,CAAC;CAC1E,GAAI;WAEH,KAAS,kBAAC,GAAD,EAAA,UAAiB,GAAuB,CAAA;CAC7C,CAAA"}
@@ -3,6 +3,9 @@ import { Item } from './AccordionItem';
3
3
  import { ItemContent } from './AccordionItemContent';
4
4
  import { ItemHeader } from './AccordionItemHeader';
5
5
  import { ItemTrigger } from './AccordionItemTrigger';
6
+ /**
7
+ * A vertically stacked set of expandable sections that allow users to show and hide content.
8
+ */
6
9
  export declare const Accordion: typeof Root & {
7
10
  Item: typeof Item;
8
11
  ItemHeader: typeof ItemHeader;
@@ -3,6 +3,9 @@ import { Item } from './AccordionItem';
3
3
  import { ItemContent } from './AccordionItemContent';
4
4
  import { ItemHeader } from './AccordionItemHeader';
5
5
  import { ItemTrigger } from './AccordionItemTrigger';
6
+ /**
7
+ * A vertically stacked set of expandable sections that allow users to show and hide content.
8
+ */
6
9
  export declare const Accordion: typeof Root & {
7
10
  Item: typeof Item;
8
11
  ItemHeader: typeof ItemHeader;
@@ -23,6 +23,9 @@ export { type AlertDialogOverlayProps } from './AlertDialogOverlay';
23
23
  export { type AlertDialogPortalProps } from './AlertDialogPortal';
24
24
  export { type AlertDialogTitleProps } from './AlertDialogTitle';
25
25
  export { type AlertDialogTriggerProps } from './AlertDialogTrigger';
26
+ /**
27
+ * A modal dialog that interrupts the user with important content and requires a response.
28
+ */
26
29
  export declare const AlertDialog: typeof Root & {
27
30
  Action: typeof AlertDialogAction;
28
31
  Body: typeof AlertDialogBody;
@@ -23,6 +23,9 @@ export { type AlertDialogOverlayProps } from './AlertDialogOverlay';
23
23
  export { type AlertDialogPortalProps } from './AlertDialogPortal';
24
24
  export { type AlertDialogTitleProps } from './AlertDialogTitle';
25
25
  export { type AlertDialogTriggerProps } from './AlertDialogTrigger';
26
+ /**
27
+ * A modal dialog that interrupts the user with important content and requires a response.
28
+ */
26
29
  export declare const AlertDialog: typeof Root & {
27
30
  Action: typeof AlertDialogAction;
28
31
  Body: typeof AlertDialogBody;
@@ -1,15 +1,17 @@
1
+ import { Avatar as Root } from './Avatar';
1
2
  import { AvatarAction } from './AvatarAction';
2
3
  import { AvatarImage } from './AvatarImage';
3
4
  import { AvatarOnlineBadge } from './AvatarOnlineBadge';
4
5
  import { AvatarPlaceholder } from './AvatarPlaceholder';
5
6
  import { AvatarUser } from './AvatarUser';
6
- import { AvatarProps } from './types';
7
- export interface AvatarComponent extends React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLDivElement>> {
7
+ /**
8
+ * A graphical representation of a user, typically displaying an image, initials, or icon.
9
+ */
10
+ export declare const Avatar: typeof Root & {
8
11
  Image: typeof AvatarImage;
9
12
  Action: typeof AvatarAction;
10
13
  OnlineBadge: typeof AvatarOnlineBadge;
11
14
  User: typeof AvatarUser;
12
15
  Placeholder: typeof AvatarPlaceholder;
13
- }
14
- declare const AvatarComponent: AvatarComponent;
15
- export { AvatarComponent as Avatar };
16
+ };
17
+ export type { AvatarProps } from './types';
@@ -1,15 +1,17 @@
1
+ import { Avatar as Root } from './Avatar';
1
2
  import { AvatarAction } from './AvatarAction';
2
3
  import { AvatarImage } from './AvatarImage';
3
4
  import { AvatarOnlineBadge } from './AvatarOnlineBadge';
4
5
  import { AvatarPlaceholder } from './AvatarPlaceholder';
5
6
  import { AvatarUser } from './AvatarUser';
6
- import { AvatarProps } from './types';
7
- export interface AvatarComponent extends React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLDivElement>> {
7
+ /**
8
+ * A graphical representation of a user, typically displaying an image, initials, or icon.
9
+ */
10
+ export declare const Avatar: typeof Root & {
8
11
  Image: typeof AvatarImage;
9
12
  Action: typeof AvatarAction;
10
13
  OnlineBadge: typeof AvatarOnlineBadge;
11
14
  User: typeof AvatarUser;
12
15
  Placeholder: typeof AvatarPlaceholder;
13
- }
14
- declare const AvatarComponent: AvatarComponent;
15
- export { AvatarComponent as Avatar };
16
+ };
17
+ export type { AvatarProps } from './types';
@@ -3,6 +3,9 @@ import { BadgeItemProps } from './BadgeItem';
3
3
  export type BadgeProps = PropsWithChildren<Omit<BadgeItemProps, 'type'>> & {
4
4
  ref?: Ref<HTMLElement>;
5
5
  };
6
+ /**
7
+ * A visual indicator that displays a count or status, typically positioned on top of another element.
8
+ */
6
9
  export declare const Badge: {
7
10
  ({ children, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
8
11
  displayName: string;
@@ -3,6 +3,9 @@ import { CurrentPage } from './BreadcrumbCurrentPage';
3
3
  import { Item } from './BreadcrumbItem';
4
4
  import { Link } from './BreadcrumbLink';
5
5
  import { Separator } from './BreadcrumbSeparator';
6
+ /**
7
+ * A navigation component that shows the user's current location in a hierarchical structure.
8
+ */
6
9
  export declare const Breadcrumb: typeof Root & {
7
10
  Item: typeof Item;
8
11
  Link: typeof Link;
@@ -3,6 +3,9 @@ import { CurrentPage } from './BreadcrumbCurrentPage';
3
3
  import { Item } from './BreadcrumbItem';
4
4
  import { Link } from './BreadcrumbLink';
5
5
  import { Separator } from './BreadcrumbSeparator';
6
+ /**
7
+ * A navigation component that shows the user's current location in a hierarchical structure.
8
+ */
6
9
  export declare const Breadcrumb: typeof Root & {
7
10
  Item: typeof Item;
8
11
  Link: typeof Link;
@@ -26,6 +26,9 @@ export interface ButtonProps extends Omit<ComponentPropsWithoutRef<'button'>, 'd
26
26
  ariaDisabled?: boolean;
27
27
  ref?: Ref<HTMLButtonElement>;
28
28
  }
29
+ /**
30
+ * A clickable element that triggers an action or event when activated by the user.
31
+ */
29
32
  export declare const Button: {
30
33
  ({ children, design, disabled, ariaDisabled, intent, isLoading, loadingLabel, loadingText, shape, size, asChild, className, underline, ref, ...others }: ButtonProps): import("react/jsx-runtime").JSX.Element;
31
34
  displayName: string;
@@ -1,6 +1,9 @@
1
1
  import { Backdrop } from './Backdrop';
2
2
  import { Card as Root } from './Card';
3
3
  import { Content } from './Content';
4
+ /**
5
+ * A container component that groups related content and actions in a single, styled surface.
6
+ */
4
7
  export declare const Card: typeof Root & {
5
8
  Content: typeof Content;
6
9
  Backdrop: typeof Backdrop;
@@ -1,6 +1,9 @@
1
1
  import { Backdrop } from './Backdrop';
2
2
  import { Card as Root } from './Card';
3
3
  import { Content } from './Content';
4
+ /**
5
+ * A container component that groups related content and actions in a single, styled surface.
6
+ */
4
7
  export declare const Card: typeof Root & {
5
8
  Content: typeof Content;
6
9
  Backdrop: typeof Backdrop;
@@ -7,6 +7,9 @@ import { CarouselPrevButton as PrevButton } from './CarouselPrevButton';
7
7
  import { CarouselSlide as Slide } from './CarouselSlide';
8
8
  import { CarouselSlides as Slides } from './CarouselSlides';
9
9
  import { CarouselViewport as Viewport } from './CarouselViewport';
10
+ /**
11
+ * A slideshow component that displays a series of content items in a scrollable container.
12
+ */
10
13
  export declare const Carousel: typeof Root & {
11
14
  Controls: typeof Controls;
12
15
  NextButton: typeof NextButton;
@@ -7,6 +7,9 @@ import { CarouselPrevButton as PrevButton } from './CarouselPrevButton';
7
7
  import { CarouselSlide as Slide } from './CarouselSlide';
8
8
  import { CarouselSlides as Slides } from './CarouselSlides';
9
9
  import { CarouselViewport as Viewport } from './CarouselViewport';
10
+ /**
11
+ * A slideshow component that displays a series of content items in a scrollable container.
12
+ */
10
13
  export declare const Carousel: typeof Root & {
11
14
  Controls: typeof Controls;
12
15
  NextButton: typeof NextButton;
@@ -4,6 +4,9 @@ import { CheckboxInputProps } from './CheckboxInput';
4
4
  export type CheckboxProps = CheckboxInputProps & Pick<CheckboxGroupContextState, 'reverse'> & {
5
5
  ref?: Ref<HTMLButtonElement>;
6
6
  };
7
+ /**
8
+ * A control that allows users to select one or multiple options from a set.
9
+ */
7
10
  export declare const Checkbox: {
8
11
  ({ id: idProp, className, intent: intentProp, checked: checkedProp, value, disabled, reverse, onCheckedChange, children, ref: forwardedRef, ...others }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
9
12
  displayName: string;
@@ -12,6 +12,10 @@ export interface CheckboxGroupProps extends Omit<ComponentPropsWithoutRef<'div'>
12
12
  onCheckedChange?: (value: string[]) => void;
13
13
  ref?: Ref<HTMLDivElement>;
14
14
  }
15
+ /**
16
+ * A group component that allows users to select one or more checkboxes from a list of choices,
17
+ * managing their state collectively with support for controlled and uncontrolled modes.
18
+ */
15
19
  export declare const CheckboxGroup: {
16
20
  ({ name: nameProp, value: valueProp, defaultValue, className, intent, orientation, onCheckedChange: onCheckedChangeProp, reverse, children, ref, ...others }: CheckboxGroupProps): import("react/jsx-runtime").JSX.Element;
17
21
  displayName: string;
@@ -3,6 +3,9 @@ import { ChipClearButton } from './ChipClearButton';
3
3
  import { ChipContent } from './ChipContent';
4
4
  import { ChipLeadingIcon } from './ChipLeadingIcon';
5
5
  import { ChipTrailingIcon } from './ChipTrailingIcon';
6
+ /**
7
+ * A compact, interactive element used for input, filtering, or representing attributes.
8
+ */
6
9
  export declare const Chip: typeof Root & {
7
10
  Content: typeof ChipContent;
8
11
  LeadingIcon: typeof ChipLeadingIcon;
@@ -3,6 +3,9 @@ import { ChipClearButton } from './ChipClearButton';
3
3
  import { ChipContent } from './ChipContent';
4
4
  import { ChipLeadingIcon } from './ChipLeadingIcon';
5
5
  import { ChipTrailingIcon } from './ChipTrailingIcon';
6
+ /**
7
+ * A compact, interactive element used for input, filtering, or representing attributes.
8
+ */
6
9
  export declare const Chip: typeof Root & {
7
10
  Content: typeof ChipContent;
8
11
  LeadingIcon: typeof ChipLeadingIcon;
@@ -3,6 +3,9 @@ import { CircularMeterContent } from './CircularMeterContent';
3
3
  import { CircularMeterLabel } from './CircularMeterLabel';
4
4
  import { CircularMeterTrack } from './CircularMeterTrack';
5
5
  import { CircularMeterValue } from './CircularMeterValue';
6
+ /**
7
+ * A circular progress indicator that displays a value within a defined range.
8
+ */
6
9
  export declare const CircularMeter: typeof Root & {
7
10
  Content: typeof CircularMeterContent;
8
11
  Label: typeof CircularMeterLabel;
@@ -3,6 +3,9 @@ import { CircularMeterContent } from './CircularMeterContent';
3
3
  import { CircularMeterLabel } from './CircularMeterLabel';
4
4
  import { CircularMeterTrack } from './CircularMeterTrack';
5
5
  import { CircularMeterValue } from './CircularMeterValue';
6
+ /**
7
+ * A circular progress indicator that displays a value within a defined range.
8
+ */
6
9
  export declare const CircularMeter: typeof Root & {
7
10
  Content: typeof CircularMeterContent;
8
11
  Label: typeof CircularMeterLabel;
@@ -1,6 +1,9 @@
1
1
  import { Content } from './Content';
2
2
  import { Root } from './Root';
3
3
  import { Trigger } from './Trigger';
4
+ /**
5
+ * A component that allows users to expand and collapse content sections.
6
+ */
4
7
  export declare const Collapsible: typeof Root & {
5
8
  Trigger: typeof Trigger;
6
9
  Content: typeof Content;
@@ -1,6 +1,9 @@
1
1
  import { Content } from './Content';
2
2
  import { Root } from './Root';
3
3
  import { Trigger } from './Trigger';
4
+ /**
5
+ * A component that allows users to expand and collapse content sections.
6
+ */
4
7
  export declare const Collapsible: typeof Root & {
5
8
  Trigger: typeof Trigger;
6
9
  Content: typeof Content;
@@ -16,6 +16,9 @@ import { Portal } from './ComboboxPortal';
16
16
  import { SelectedItems } from './ComboboxSelectedItems';
17
17
  import { Trigger } from './ComboboxTrigger';
18
18
  export { useComboboxContext, ComboboxProvider };
19
+ /**
20
+ * A searchable dropdown that combines a text input with a list of selectable options.
21
+ */
19
22
  export declare const Combobox: typeof Root & {
20
23
  Group: typeof Group;
21
24
  Item: typeof Item;
@@ -16,6 +16,9 @@ import { Portal } from './ComboboxPortal';
16
16
  import { SelectedItems } from './ComboboxSelectedItems';
17
17
  import { Trigger } from './ComboboxTrigger';
18
18
  export { useComboboxContext, ComboboxProvider };
19
+ /**
20
+ * A searchable dropdown that combines a text input with a list of selectable options.
21
+ */
19
22
  export declare const Combobox: typeof Root & {
20
23
  Group: typeof Group;
21
24
  Item: typeof Item;
@@ -10,6 +10,9 @@ import { Overlay } from './DialogOverlay';
10
10
  import { Portal } from './DialogPortal';
11
11
  import { Title } from './DialogTitle';
12
12
  import { Trigger } from './DialogTrigger';
13
+ /**
14
+ * A modal window that displays content on top of the main page, requiring user interaction before returning to the main flow.
15
+ */
13
16
  export declare const Dialog: typeof Root & {
14
17
  Trigger: typeof Trigger;
15
18
  Portal: typeof Portal;
@@ -10,6 +10,9 @@ import { Overlay } from './DialogOverlay';
10
10
  import { Portal } from './DialogPortal';
11
11
  import { Title } from './DialogTitle';
12
12
  import { Trigger } from './DialogTrigger';
13
+ /**
14
+ * A modal window that displays content on top of the main page, requiring user interaction before returning to the main flow.
15
+ */
13
16
  export declare const Dialog: typeof Root & {
14
17
  Trigger: typeof Trigger;
15
18
  Portal: typeof Portal;
@@ -1,6 +1,9 @@
1
1
  import { Divider as Root } from './Divider';
2
2
  import { DividerContent } from './DividerContent';
3
3
  export { type DividerContentProps } from './DividerContent';
4
+ /**
5
+ * A visual separator that divides content into distinct sections or groups.
6
+ */
4
7
  export declare const Divider: typeof Root & {
5
8
  Content: typeof DividerContent;
6
9
  };
@@ -1,6 +1,9 @@
1
1
  import { Divider as Root } from './Divider';
2
2
  import { DividerContent } from './DividerContent';
3
3
  export { type DividerContentProps } from './DividerContent';
4
+ /**
5
+ * A visual separator that divides content into distinct sections or groups.
6
+ */
4
7
  export declare const Divider: typeof Root & {
5
8
  Content: typeof DividerContent;
6
9
  };
@@ -10,6 +10,9 @@ import { DrawerOverlay } from './DrawerOverlay';
10
10
  import { DrawerPortal } from './DrawerPortal';
11
11
  import { DrawerTitle } from './DrawerTitle';
12
12
  import { DrawerTrigger } from './DrawerTrigger';
13
+ /**
14
+ * A panel that slides in from the edge of the screen, typically used for navigation or displaying additional content.
15
+ */
13
16
  export declare const Drawer: typeof Root & {
14
17
  Trigger: typeof DrawerTrigger;
15
18
  Portal: typeof DrawerPortal;
@@ -10,6 +10,9 @@ import { DrawerOverlay } from './DrawerOverlay';
10
10
  import { DrawerPortal } from './DrawerPortal';
11
11
  import { DrawerTitle } from './DrawerTitle';
12
12
  import { DrawerTrigger } from './DrawerTrigger';
13
+ /**
14
+ * A panel that slides in from the edge of the screen, typically used for navigation or displaying additional content.
15
+ */
13
16
  export declare const Drawer: typeof Root & {
14
17
  Trigger: typeof DrawerTrigger;
15
18
  Portal: typeof DrawerPortal;
@@ -13,6 +13,9 @@ import { Portal } from './DropdownPortal';
13
13
  import { Trigger } from './DropdownTrigger';
14
14
  import { Value } from './DropdownValue';
15
15
  export { useDropdownContext, DropdownProvider };
16
+ /**
17
+ * A list of options that appears when users interact with a trigger element.
18
+ */
16
19
  export declare const Dropdown: typeof Root & {
17
20
  Group: typeof Group;
18
21
  Item: typeof Item;
@@ -13,6 +13,9 @@ import { Portal } from './DropdownPortal';
13
13
  import { Trigger } from './DropdownTrigger';
14
14
  import { Value } from './DropdownValue';
15
15
  export { useDropdownContext, DropdownProvider };
16
+ /**
17
+ * A list of options that appears when users interact with a trigger element.
18
+ */
16
19
  export declare const Dropdown: typeof Root & {
17
20
  Group: typeof Group;
18
21
  Item: typeof Item;