tfy-web-components 0.0.44 → 0.0.45

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 (184) hide show
  1. package/dist/{Button-BdNaawKV.js → Button-HHEfL8b9.js} +5 -4
  2. package/dist/{Button-BdNaawKV.js.map → Button-HHEfL8b9.js.map} +1 -1
  3. package/dist/CSPContext-Cldo9QDp.js +13 -0
  4. package/dist/CSPContext-Cldo9QDp.js.map +1 -0
  5. package/dist/{CompositeItem-EOSJycCk.js → CompositeItem-GNejxLcK.js} +3 -3
  6. package/dist/{CompositeItem-EOSJycCk.js.map → CompositeItem-GNejxLcK.js.map} +1 -1
  7. package/dist/{CompositeRoot-DnijP7Jm.js → CompositeRoot-7_u1HqDT.js} +9 -47
  8. package/dist/CompositeRoot-7_u1HqDT.js.map +1 -0
  9. package/dist/DropdownMenu-Crlf-J4E.js +3304 -0
  10. package/dist/DropdownMenu-Crlf-J4E.js.map +1 -0
  11. package/dist/{Input-D0UuCXLs.js → Input-BS9fWUAf.js} +3 -3
  12. package/dist/{Input-D0UuCXLs.js.map → Input-BS9fWUAf.js.map} +1 -1
  13. package/dist/{Modal-BFnf68oS.js → Modal-DaHG8mjy.js} +10 -10
  14. package/dist/{Modal-BFnf68oS.js.map → Modal-DaHG8mjy.js.map} +1 -1
  15. package/dist/Popover-A8IyEt2w.js +400 -0
  16. package/dist/Popover-A8IyEt2w.js.map +1 -0
  17. package/dist/{Popover-B6z7exNd.js → PopoverPopup-teGm7D5T.js} +25 -498
  18. package/dist/PopoverPopup-teGm7D5T.js.map +1 -0
  19. package/dist/{PrehydrationScript--08s8Mfl.js → PrehydrationScript-B3u_PP2W.js} +5 -12
  20. package/dist/PrehydrationScript-B3u_PP2W.js.map +1 -0
  21. package/dist/Select-BtX40h2K.js +2187 -0
  22. package/dist/Select-BtX40h2K.js.map +1 -0
  23. package/dist/{useValueAsRef-BfFRcMg6.js → addEventListener-D-i9O6BG.js} +8 -8
  24. package/dist/addEventListener-D-i9O6BG.js.map +1 -0
  25. package/dist/clamp-D7_nsB8C.js +30 -0
  26. package/dist/clamp-D7_nsB8C.js.map +1 -0
  27. package/dist/components/atoms/Accordion.es.js +9 -9
  28. package/dist/components/atoms/Avatar.es.js +9 -9
  29. package/dist/components/atoms/Avatar.es.js.map +1 -1
  30. package/dist/components/atoms/Badge.d.ts +5 -6
  31. package/dist/components/atoms/Badge.es.js +80 -43
  32. package/dist/components/atoms/Badge.es.js.map +1 -1
  33. package/dist/components/atoms/Button.d.ts +1 -1
  34. package/dist/components/atoms/Button.es.js +2 -2
  35. package/dist/components/atoms/ButtonGroup.es.js +1 -1
  36. package/dist/components/atoms/Combobox.d.ts +34 -0
  37. package/dist/components/atoms/Combobox.es.js +3252 -0
  38. package/dist/components/atoms/Combobox.es.js.map +1 -0
  39. package/dist/components/atoms/ContextMenu.d.ts +12 -0
  40. package/dist/components/atoms/ContextMenu.es.js +259 -0
  41. package/dist/components/atoms/ContextMenu.es.js.map +1 -0
  42. package/dist/components/atoms/DropdownMenu.d.ts +51 -0
  43. package/dist/components/atoms/DropdownMenu.es.js +31 -0
  44. package/dist/components/atoms/DropdownMenu.es.js.map +1 -0
  45. package/dist/components/atoms/IconButton.d.ts +1 -1
  46. package/dist/components/atoms/IconButton.es.js +3 -3
  47. package/dist/components/atoms/IconButton.es.js.map +1 -1
  48. package/dist/components/atoms/IconProvider.es.js +3 -1
  49. package/dist/components/atoms/IconProvider.es.js.map +1 -1
  50. package/dist/components/atoms/Modal.es.js +1 -1
  51. package/dist/components/atoms/OverflowButton.es.js +2 -2
  52. package/dist/components/atoms/PaginationDot.d.ts +14 -0
  53. package/dist/components/atoms/PaginationDot.es.js +58 -0
  54. package/dist/components/atoms/PaginationDot.es.js.map +1 -0
  55. package/dist/components/atoms/PaginationItem.d.ts +15 -0
  56. package/dist/components/atoms/PaginationItem.es.js +87 -0
  57. package/dist/components/atoms/PaginationItem.es.js.map +1 -0
  58. package/dist/components/atoms/Popover.d.ts +10 -0
  59. package/dist/components/atoms/Popover.es.js +50 -0
  60. package/dist/components/atoms/Popover.es.js.map +1 -0
  61. package/dist/components/atoms/Select.d.ts +63 -0
  62. package/dist/components/atoms/Select.es.js +23 -0
  63. package/dist/components/atoms/Select.es.js.map +1 -0
  64. package/dist/components/atoms/Switch.es.js +7 -6
  65. package/dist/components/atoms/Switch.es.js.map +1 -1
  66. package/dist/components/atoms/TabButton.es.js +14 -12
  67. package/dist/components/atoms/TabButton.es.js.map +1 -1
  68. package/dist/components/atoms/Tag.d.ts +2 -2
  69. package/dist/components/atoms/Tag.es.js +66 -33
  70. package/dist/components/atoms/Tag.es.js.map +1 -1
  71. package/dist/components/atoms/Tooltip.es.js +1153 -19
  72. package/dist/components/atoms/Tooltip.es.js.map +1 -1
  73. package/dist/components/atoms/stories/OverlayThemePanels.d.ts +8 -0
  74. package/dist/components/molecules/Alert.es.js +3 -3
  75. package/dist/components/molecules/CopyField.es.js +2 -2
  76. package/dist/components/molecules/CustomDrawer.es.js +1 -1
  77. package/dist/components/molecules/Dialog.es.js +1 -1
  78. package/dist/components/molecules/ImagesPreview.es.js +2 -2
  79. package/dist/components/molecules/Input.es.js +2 -2
  80. package/dist/components/molecules/Markdown.es.js +1 -1
  81. package/dist/components/molecules/Pagination.d.ts +58 -0
  82. package/dist/components/molecules/Pagination.es.js +272 -0
  83. package/dist/components/molecules/Pagination.es.js.map +1 -0
  84. package/dist/components/molecules/SimpleCodeEditor.es.js +3 -3
  85. package/dist/components/molecules/SimpleCodeEditor.es.js.map +1 -1
  86. package/dist/components/molecules/TagGroup.d.ts +11 -0
  87. package/dist/components/molecules/TagGroup.es.js +59 -0
  88. package/dist/components/molecules/TagGroup.es.js.map +1 -0
  89. package/dist/components/molecules/ToggleButton.es.js +2 -2
  90. package/dist/components/molecules/agent-chat/AssistantMessage.d.ts +3 -1
  91. package/dist/components/molecules/agent-chat.es.js +4 -3
  92. package/dist/components/molecules/agent-chat.es.js.map +1 -1
  93. package/dist/composite-DnShFmi7.js +551 -0
  94. package/dist/composite-DnShFmi7.js.map +1 -0
  95. package/dist/{composite-BDBV1Jsx.js → composite-IA--dSel.js} +2 -2
  96. package/dist/{composite-BDBV1Jsx.js.map → composite-IA--dSel.js.map} +1 -1
  97. package/dist/constants-BaUKmVF_.js +103 -0
  98. package/dist/constants-BaUKmVF_.js.map +1 -0
  99. package/dist/{index-B6xFUIBK.js → element-B1vbc-LG.js} +69 -111
  100. package/dist/element-B1vbc-LG.js.map +1 -0
  101. package/dist/error-nCTLdGUr.js +6 -0
  102. package/dist/{error-FX4R42W-.js.map → error-nCTLdGUr.js.map} +1 -1
  103. package/dist/index.d.ts +10 -2
  104. package/dist/index.es.js +61 -11
  105. package/dist/index.es.js.map +1 -1
  106. package/dist/{inertValue-IJM5NA30.js → inertValue-C1Ml1s55.js} +2 -2
  107. package/dist/{inertValue-IJM5NA30.js.map → inertValue-C1Ml1s55.js.map} +1 -1
  108. package/dist/isElementDisabled-lq1fKien.js +47 -0
  109. package/dist/isElementDisabled-lq1fKien.js.map +1 -0
  110. package/dist/new-components/atoms/Alert.d.ts +7 -1
  111. package/dist/new-components/atoms/Alert.es.js +23 -4
  112. package/dist/new-components/atoms/Alert.es.js.map +1 -1
  113. package/dist/new-components/atoms/Checkbox.es.js +8 -7
  114. package/dist/new-components/atoms/Checkbox.es.js.map +1 -1
  115. package/dist/new-components/atoms/EmptyState.d.ts +3 -0
  116. package/dist/new-components/atoms/EmptyState.es.js +9 -4
  117. package/dist/new-components/atoms/EmptyState.es.js.map +1 -1
  118. package/dist/new-components/atoms/Popover.es.js +3 -2
  119. package/dist/new-components/atoms/Popover.es.js.map +1 -1
  120. package/dist/new-components/atoms/Radio.es.js +13 -24
  121. package/dist/new-components/atoms/Radio.es.js.map +1 -1
  122. package/dist/new-components/atoms/SegmentedControl.es.js +7 -7
  123. package/dist/new-components/atoms/Slider.es.js +14 -43
  124. package/dist/new-components/atoms/Slider.es.js.map +1 -1
  125. package/dist/new-components/atoms/Toast.d.ts +8 -12
  126. package/dist/new-components/atoms/Toast.es.js +202 -145
  127. package/dist/new-components/atoms/Toast.es.js.map +1 -1
  128. package/dist/new-components/atoms/Toggletip.es.js +3 -2
  129. package/dist/new-components/atoms/Toggletip.es.js.map +1 -1
  130. package/dist/new-components/atoms/stories/ThemeComparison.d.ts +2 -1
  131. package/dist/serializeValue-BLvnTy3o.js +17 -0
  132. package/dist/serializeValue-BLvnTy3o.js.map +1 -0
  133. package/dist/stringifyLocale-DOx30wH1.js +13 -0
  134. package/dist/stringifyLocale-DOx30wH1.js.map +1 -0
  135. package/dist/style.css +1 -1
  136. package/dist/tokens.css +3 -0
  137. package/dist/{useAnimationFrame-DwhymJoW.js → useAnimationFrame-DqvuRtgK.js} +2 -2
  138. package/dist/{useAnimationFrame-DwhymJoW.js.map → useAnimationFrame-DqvuRtgK.js.map} +1 -1
  139. package/dist/{useAriaLabelledBy-C9SDiruE.js → useAriaLabelledBy-CP4wKTYs.js} +3 -3
  140. package/dist/{useAriaLabelledBy-C9SDiruE.js.map → useAriaLabelledBy-CP4wKTYs.js.map} +1 -1
  141. package/dist/{useBaseUiId-jtgiQp--.js → useBaseUiId-CYT1vFMG.js} +57 -37
  142. package/dist/{useBaseUiId-jtgiQp--.js.map → useBaseUiId-CYT1vFMG.js.map} +1 -1
  143. package/dist/{useButton-BalOc_EL.js → useButton-BlHadUfM.js} +4 -4
  144. package/dist/{useButton-BalOc_EL.js.map → useButton-BlHadUfM.js.map} +1 -1
  145. package/dist/{CompositeList-D4xmSZ5V.js → useCompositeListItem-DlAKWsHE.js} +59 -59
  146. package/dist/useCompositeListItem-DlAKWsHE.js.map +1 -0
  147. package/dist/{useControlled-BSyYkg5C.js → useControlled-DMDWXIzj.js} +2 -2
  148. package/dist/{useControlled-BSyYkg5C.js.map → useControlled-DMDWXIzj.js.map} +1 -1
  149. package/dist/useFocus-C__7iwl1.js +137 -0
  150. package/dist/useFocus-C__7iwl1.js.map +1 -0
  151. package/dist/{useIsoLayoutEffect-e9VA-ICd.js → useIsoLayoutEffect-D2lpsB9D.js} +8 -4
  152. package/dist/{useIsoLayoutEffect-e9VA-ICd.js.map → useIsoLayoutEffect-D2lpsB9D.js.map} +1 -1
  153. package/dist/{usePopupHandleStore-DYUo-Fyk.js → usePopupHandleStore-C_Vw7xcw.js} +1966 -2002
  154. package/dist/usePopupHandleStore-C_Vw7xcw.js.map +1 -0
  155. package/dist/{Tooltip-6R-t7wt1.js → usePositioner-BmYVsMO_.js} +17 -1403
  156. package/dist/usePositioner-BmYVsMO_.js.map +1 -0
  157. package/dist/{useOpenInteractionType-BnUZ2Eio.js → useScrollLock-By-42HSc.js} +74 -58
  158. package/dist/useScrollLock-By-42HSc.js.map +1 -0
  159. package/dist/{useLabelableId-CQqNbBk1.js → useSetFieldFocused-CcdG6FNp.js} +27 -35
  160. package/dist/useSetFieldFocused-CcdG6FNp.js.map +1 -0
  161. package/dist/{useTimeout-BXf1hDIL.js → useTimeout-D1vYJgq4.js} +3 -3
  162. package/dist/{useTimeout-BXf1hDIL.js.map → useTimeout-D1vYJgq4.js.map} +1 -1
  163. package/dist/{useTransitionStatus-C9gg_XJ-.js → useTransitionStatus-CHrs3i5F.js} +3 -3
  164. package/dist/{useTransitionStatus-C9gg_XJ-.js.map → useTransitionStatus-CHrs3i5F.js.map} +1 -1
  165. package/dist/useTriggerFocusGuards-CXAhW8P6.js +100 -0
  166. package/dist/useTriggerFocusGuards-CXAhW8P6.js.map +1 -0
  167. package/dist/useValueChanged-BnlOop8k.js +16 -0
  168. package/dist/useValueChanged-BnlOop8k.js.map +1 -0
  169. package/package.json +1 -1
  170. package/dist/CompositeList-D4xmSZ5V.js.map +0 -1
  171. package/dist/CompositeRoot-DnijP7Jm.js.map +0 -1
  172. package/dist/Popover-B6z7exNd.js.map +0 -1
  173. package/dist/PrehydrationScript--08s8Mfl.js.map +0 -1
  174. package/dist/Tooltip-6R-t7wt1.js.map +0 -1
  175. package/dist/composite-rAI4IlWK.js +0 -66
  176. package/dist/composite-rAI4IlWK.js.map +0 -1
  177. package/dist/error-FX4R42W-.js +0 -6
  178. package/dist/index-B6xFUIBK.js.map +0 -1
  179. package/dist/shadowDom-CRvvf3qf.js +0 -52
  180. package/dist/shadowDom-CRvvf3qf.js.map +0 -1
  181. package/dist/useLabelableId-CQqNbBk1.js.map +0 -1
  182. package/dist/useOpenInteractionType-BnUZ2Eio.js.map +0 -1
  183. package/dist/usePopupHandleStore-DYUo-Fyk.js.map +0 -1
  184. package/dist/useValueAsRef-BfFRcMg6.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Radio.es.js","sources":["../../../node_modules/@base-ui/react/radio/root/RadioRootDataAttributes.mjs","../../../node_modules/@base-ui/react/radio/utils/stateAttributesMapping.mjs","../../../node_modules/@base-ui/react/radio-group/RadioGroupContext.mjs","../../../node_modules/@base-ui/react/internals/serializeValue.mjs","../../../node_modules/@base-ui/react/radio/root/RadioRootContext.mjs","../../../node_modules/@base-ui/react/radio/root/RadioRoot.mjs","../../../node_modules/@base-ui/react/radio/indicator/RadioIndicator.mjs","../../../node_modules/@base-ui/react/field/root/useFieldValidation.mjs","../../../node_modules/@base-ui/react/fieldset/root/FieldsetRootContext.mjs","../../../node_modules/@base-ui/react/radio-group/RadioGroup.mjs","../../../src/new-components/atoms/Radio.tsx"],"sourcesContent":["/**\n * Present when the radio is checked.\n */\nexport const checked = 'data-checked';\n/**\n * Present when the radio is not checked.\n */\nexport const unchecked = 'data-unchecked';\n/**\n * Present when the radio is disabled.\n */\nexport const disabled = 'data-disabled';\n/**\n * Present when the radio is readonly.\n */\nexport const readonly = 'data-readonly';\n/**\n * Present when the radio is required.\n */\nexport const required = 'data-required';\n/**\n * Present when the radio is in a valid state (when wrapped in Field.Root).\n */\nexport const valid = 'data-valid';\n/**\n * Present when the radio is in an invalid state (when wrapped in Field.Root).\n */\nexport const invalid = 'data-invalid';\n/**\n * Present when the radio has been touched (when wrapped in Field.Root).\n */\nexport const touched = 'data-touched';\n/**\n * Present when the radio's value has changed (when wrapped in Field.Root).\n */\nexport const dirty = 'data-dirty';\n/**\n * Present when the radio is checked (when wrapped in Field.Root).\n */\nexport const filled = 'data-filled';\n/**\n * Present when the radio is focused (when wrapped in Field.Root).\n */\nexport const focused = 'data-focused';","import { transitionStatusMapping } from \"../../internals/stateAttributesMapping.mjs\";\nimport { fieldValidityMapping } from \"../../internals/field-constants/constants.mjs\";\nimport * as RadioRootDataAttributes from \"../root/RadioRootDataAttributes.mjs\";\nexport const stateAttributesMapping = {\n checked(value) {\n if (value) {\n return {\n [RadioRootDataAttributes.checked]: ''\n };\n }\n return {\n [RadioRootDataAttributes.unchecked]: ''\n };\n },\n ...transitionStatusMapping,\n ...fieldValidityMapping\n};","'use client';\n\nimport * as React from 'react';\nexport const RadioGroupContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") RadioGroupContext.displayName = \"RadioGroupContext\";\nexport function useRadioGroupContext() {\n return React.useContext(RadioGroupContext);\n}","export function serializeValue(value) {\n if (value == null) {\n return '';\n }\n if (typeof value === 'string') {\n return value;\n }\n try {\n return JSON.stringify(value);\n } catch {\n return String(value);\n }\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const RadioRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") RadioRootContext.displayName = \"RadioRootContext\";\nexport function useRadioRootContext() {\n const value = React.useContext(RadioRootContext);\n if (value === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: RadioRootContext is missing. Radio parts must be placed within <Radio.Root>.' : _formatErrorMessage(52));\n }\n return value;\n}","'use client';\n\nimport * as React from 'react';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { visuallyHidden, visuallyHiddenInput } from '@base-ui/utils/visuallyHidden';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { NOOP } from \"../../internals/noop.mjs\";\nimport { stateAttributesMapping } from \"../utils/stateAttributesMapping.mjs\";\nimport { dispatchClickWithModifiers } from \"../../utils/dispatchClickWithModifiers.mjs\";\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useButton } from \"../../internals/use-button/index.mjs\";\nimport { ACTIVE_COMPOSITE_ITEM } from \"../../internals/composite/constants.mjs\";\nimport { CompositeItem } from \"../../internals/composite/item/CompositeItem.mjs\";\nimport { useFieldRootContext } from \"../../internals/field-root-context/FieldRootContext.mjs\";\nimport { useSetFieldFocused } from \"../../internals/field-root-context/useSetFieldFocused.mjs\";\nimport { useFieldItemContext } from \"../../field/item/FieldItemContext.mjs\";\nimport { useLabelableContext } from \"../../internals/labelable-provider/LabelableContext.mjs\";\nimport { useAriaLabelledBy } from \"../../internals/labelable-provider/useAriaLabelledBy.mjs\";\nimport { useLabelableId } from \"../../internals/labelable-provider/useLabelableId.mjs\";\nimport { useRadioGroupContext } from \"../../radio-group/RadioGroupContext.mjs\";\nimport { serializeValue } from \"../../internals/serializeValue.mjs\";\nimport { RadioRootContext } from \"./RadioRootContext.mjs\";\n\n/**\n * Represents the radio button itself.\n * Renders a `<span>` element and a hidden `<input>` beside.\n *\n * Documentation: [Base UI Radio](https://base-ui.com/react/components/radio-group)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const RadioRoot = /*#__PURE__*/React.forwardRef(function RadioRoot(componentProps, forwardedRef) {\n const {\n render,\n className,\n disabled: disabledProp = false,\n readOnly: readOnlyProp = false,\n required: requiredProp = false,\n 'aria-labelledby': ariaLabelledByProp,\n value,\n inputRef: inputRefProp,\n nativeButton = false,\n id: idProp,\n style,\n ...elementProps\n } = componentProps;\n const groupContext = useRadioGroupContext();\n const {\n disabled: disabledGroup,\n readOnly: readOnlyGroup,\n required: requiredGroup,\n form: formGroup,\n checkedValue,\n touched = false,\n validation,\n name,\n setCheckedValue = NOOP,\n setTouched = NOOP,\n registerInputRef = NOOP\n } = groupContext ?? {};\n const {\n setTouched: setFieldTouched,\n setFilled,\n state: fieldState,\n disabled: fieldDisabled\n } = useFieldRootContext();\n const fieldItemContext = useFieldItemContext();\n const {\n labelId,\n getDescriptionProps\n } = useLabelableContext();\n const disabled = fieldDisabled || fieldItemContext.disabled || disabledGroup || disabledProp;\n const readOnly = readOnlyGroup || readOnlyProp;\n const required = requiredGroup || requiredProp;\n const form = formGroup;\n const checked = groupContext ? checkedValue === value : value === '';\n const radioRef = React.useRef(null);\n const setFieldFocused = useSetFieldFocused(disabled, radioRef);\n const inputRef = React.useRef(null);\n const registerFieldInput = validation?.registerInput;\n const registerInput = React.useCallback(element => registerFieldInput?.(element, {\n controlRef: radioRef,\n value: undefined\n }), [registerFieldInput]);\n const mergedInputRef = useMergedRefs(inputRefProp, inputRef, registerInputRef, registerInput);\n useIsoLayoutEffect(() => {\n if (inputRef.current?.checked) {\n setFilled(true);\n }\n }, [setFilled]);\n useIsoLayoutEffect(() => {\n if (!inputRef.current) {\n return;\n }\n if (disabled && checked) {\n registerInputRef(null);\n return;\n }\n registerInputRef(inputRef.current);\n }, [checked, disabled, registerInputRef]);\n const id = useBaseUiId();\n const inputId = useLabelableId({\n id: idProp\n });\n const hiddenInputId = nativeButton ? undefined : inputId;\n const ariaLabelledBy = useAriaLabelledBy(ariaLabelledByProp, labelId, inputRef, !nativeButton, hiddenInputId, elementProps['aria-label']);\n const rootProps = {\n role: 'radio',\n 'aria-checked': checked,\n 'aria-labelledby': ariaLabelledBy,\n [ACTIVE_COMPOSITE_ITEM]: checked ? '' : undefined,\n id: nativeButton ? inputId : id,\n onKeyDown(event) {\n if (event.key === 'Enter') {\n // Radio only activates with Space. Preventing the keydown's default\n // stops useButton from turning Enter into a click.\n event.preventDefault();\n }\n },\n onClick(event) {\n if (event.defaultPrevented || disabled || readOnly) {\n return;\n }\n event.preventDefault();\n const input = inputRef.current;\n if (!input) {\n return;\n }\n dispatchClickWithModifiers(input, event);\n },\n onFocus(event) {\n setFieldFocused(true);\n if (event.defaultPrevented || disabled || readOnly || !touched) {\n return;\n }\n inputRef.current?.click();\n setTouched(false);\n },\n onBlur() {\n // A grouped radio's exit is cleared by the group's `contains`-guarded blur handler, so\n // radio-to-radio moves inside the group don't churn the focused state.\n if (!groupContext) {\n setFieldFocused(false);\n }\n }\n };\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n native: nativeButton,\n composite: false\n });\n const inputProps = {\n type: 'radio',\n ref: mergedInputRef,\n form,\n id: hiddenInputId,\n name,\n tabIndex: -1,\n style: name ? visuallyHiddenInput : visuallyHidden,\n 'aria-hidden': true,\n ...(value !== undefined ? {\n value: serializeValue(value)\n } : EMPTY_OBJECT),\n disabled,\n checked,\n required,\n readOnly,\n onChange(event) {\n // Workaround for https://github.com/react/react/issues/9023\n if (event.nativeEvent.defaultPrevented) {\n return;\n }\n if (disabled || readOnly || value === undefined) {\n return;\n }\n const details = createChangeEventDetails(REASONS.none, event.nativeEvent);\n setCheckedValue(value, details);\n if (details.isCanceled) {\n return;\n }\n setFieldTouched(true);\n },\n onClick(event) {\n // Clicks dispatched on the input from the root's `onClick` and `onFocus` are an\n // implementation detail and must not reach ancestors.\n event.stopPropagation();\n },\n onFocus() {\n radioRef.current?.focus();\n }\n };\n const state = React.useMemo(() => ({\n ...fieldState,\n required,\n disabled,\n readOnly,\n checked\n }), [fieldState, disabled, readOnly, checked, required]);\n const contextValue = state;\n const isRadioGroup = groupContext !== undefined;\n const refs = [forwardedRef, radioRef, buttonRef];\n const props = [rootProps, elementProps, getButtonProps, getDescriptionProps, validation ? validationProps => validation.getValidationProps(disabled, validationProps) : EMPTY_OBJECT];\n const element = useRenderElement('span', componentProps, {\n enabled: !isRadioGroup,\n state,\n ref: refs,\n props,\n stateAttributesMapping\n });\n return /*#__PURE__*/_jsxs(RadioRootContext.Provider, {\n value: contextValue,\n children: [isRadioGroup ? /*#__PURE__*/_jsx(CompositeItem, {\n tag: \"span\",\n render: render,\n className: className,\n style: style,\n state: state,\n refs: refs,\n props: props,\n stateAttributesMapping: stateAttributesMapping\n }) : element, /*#__PURE__*/_jsx(\"input\", {\n ...inputProps,\n suppressHydrationWarning: true\n })]\n });\n});\nif (process.env.NODE_ENV !== \"production\") RadioRoot.displayName = \"RadioRoot\";","'use client';\n\nimport * as React from 'react';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useRadioRootContext } from \"../root/RadioRootContext.mjs\";\nimport { stateAttributesMapping } from \"../utils/stateAttributesMapping.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\nimport { useTransitionStatus } from \"../../internals/useTransitionStatus.mjs\";\n/**\n * Indicates whether the radio button is selected.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Radio](https://base-ui.com/react/components/radio-group)\n */\nexport const RadioIndicator = /*#__PURE__*/React.forwardRef(function RadioIndicator(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n keepMounted = false,\n ...elementProps\n } = componentProps;\n const rootState = useRadioRootContext();\n const rendered = rootState.checked;\n const {\n mounted,\n transitionStatus,\n setMounted\n } = useTransitionStatus(rendered);\n const state = {\n ...rootState,\n transitionStatus\n };\n const indicatorRef = React.useRef(null);\n const shouldRender = keepMounted || mounted;\n const element = useRenderElement('span', componentProps, {\n ref: [forwardedRef, indicatorRef],\n state,\n props: elementProps,\n stateAttributesMapping\n });\n useOpenChangeComplete({\n batch: true,\n enabled: !rendered,\n open: rendered,\n ref: indicatorRef,\n onComplete() {\n if (!rendered) {\n setMounted(false);\n }\n }\n });\n if (!shouldRender) {\n return null;\n }\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") RadioIndicator.displayName = \"RadioIndicator\";","'use client';\n\nimport * as React from 'react';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { useLabelableContext } from \"../../internals/labelable-provider/LabelableContext.mjs\";\nimport { mergeProps } from \"../../merge-props/index.mjs\";\nimport { DEFAULT_VALIDITY_STATE } from \"../../internals/field-constants/constants.mjs\";\nimport { useFormContext } from \"../../internals/form-context/FormContext.mjs\";\nimport { getCombinedFieldValidityData } from \"../utils/getCombinedFieldValidityData.mjs\";\nconst validityKeys = Object.keys(DEFAULT_VALIDITY_STATE);\n/**\n * Whether an input participates in the surrounding Base UI Form. Inputs that are effectively\n * disabled, or whose `form` attribute explicitly associates them with another form, are excluded.\n * DOM position only matters when it associates the input with a different form. Otherwise, field\n * registration is context-driven, so portaled inputs (for example inside a dialog) still belong to\n * the form for both validation and values projected into `onFormSubmit`.\n */\nexport function isEligibleInput(input, formElement) {\n if (input.matches(':disabled')) {\n return false;\n }\n if (!formElement || input.form === formElement) {\n return true;\n }\n\n // React context crosses portal boundaries. An unassociated portaled input still participates in\n // contextual validation, unless an explicit `form` attribute opts it out of the surrounding Form.\n return input.form === null && !input.hasAttribute('form');\n}\n\n/**\n * Picks the input whose native validity should represent a field that owns several inputs (such as a\n * checkbox or radio group). Prefers the first eligible currently-invalid input, where \"first\" follows\n * registration order (mount order), and otherwise returns the first eligible input.\n */\nfunction findRepresentativeInput(inputs, formElement) {\n let fallback = null;\n for (const input of inputs.keys()) {\n if (!isEligibleInput(input, formElement)) {\n continue;\n }\n if (!input.validity.valid) {\n return input;\n }\n fallback ??= input;\n }\n return fallback;\n}\nfunction makeState(customError) {\n return {\n ...DEFAULT_VALIDITY_STATE,\n valid: !customError,\n customError\n };\n}\nfunction getNativeErrors(element) {\n return element && element.validationMessage ? [element.validationMessage] : [];\n}\nexport function useFieldValidation(params) {\n const {\n elementRef,\n formRef\n } = useFormContext();\n const {\n setValidityData,\n validate,\n validityData,\n validationDebounceTime,\n invalid,\n markedDirtyRef,\n state,\n shouldValidateOnChange,\n validationMode,\n registeredFieldIdRef\n } = params;\n const {\n controlId,\n getDescriptionProps\n } = useLabelableContext();\n const timeout = useTimeout();\n const inputRef = React.useRef(null);\n const registeredInputs = useRefWithInit(() => new Map()).current;\n const validationCommitIdRef = React.useRef(0);\n // Tracks the message installed by Base UI and the custom message it displaced.\n const customValidityRef = React.useRef(null);\n\n // Groups register several inputs against a single field so focus, validation, and form-value\n // projection can use the same live controls. This also ensures a `required` checkbox can't be\n // satisfied by another input in the group, matching native per-checkbox behavior.\n const registerInput = React.useCallback((element, registration) => {\n registeredInputs.set(element, registration);\n return () => {\n registeredInputs.delete(element);\n };\n }, [registeredInputs]);\n const getInputControl = useStableCallback(() => {\n const element = findRepresentativeInput(registeredInputs, elementRef.current);\n return element && registeredInputs.get(element)?.controlRef.current || null;\n });\n const commit = useStableCallback(async (value, revalidate = false) => {\n validationCommitIdRef.current += 1;\n const validationCommitId = validationCommitIdRef.current;\n function updateRegisteredFieldValidity(nextValidityData, externalInvalid = invalid) {\n const fieldId = registeredFieldIdRef.current ?? controlId;\n if (fieldId == null) {\n return;\n }\n const currentFieldData = formRef.current.fields.get(fieldId);\n if (!currentFieldData) {\n return;\n }\n const validityDataWithFormErrors = getCombinedFieldValidityData(nextValidityData, externalInvalid);\n formRef.current.fields.set(fieldId, {\n ...currentFieldData,\n validityData: validityDataWithFormErrors\n });\n }\n function makeValidityData(validityState, errorMessages) {\n // `valueMissing` may be suppressed while the native message remains non-empty.\n const errors = validityState.valid === false ? errorMessages : [];\n return {\n value,\n state: validityState,\n error: errors[0] ?? '',\n errors,\n initialValue: validityData.initialValue\n };\n }\n function setCustomValidity(element, message) {\n // Never reinstall a native constraint message as custom validity.\n const displaced = element.validity.customError ? element.validationMessage : '';\n const ownedMessage = message.replace(/\\r\\n?/g, '\\n');\n element.setCustomValidity(ownedMessage);\n customValidityRef.current = [element, ownedMessage, displaced];\n }\n function clearCustomValidity() {\n const record = customValidityRef.current;\n customValidityRef.current = null;\n // Replacement transfers ownership; barred controls hide `validationMessage`.\n if (record && (!record[0].willValidate || record[0].validationMessage === record[1])) {\n record[0].setCustomValidity(record[2]);\n }\n }\n function publish(validityState, errorMessages, externalInvalid) {\n const nextValidityData = makeValidityData(validityState, errorMessages);\n updateRegisteredFieldValidity(nextValidityData, externalInvalid);\n setValidityData(nextValidityData);\n }\n function getState(el) {\n const computedState = validityKeys.reduce((acc, key) => {\n acc[key] = el.validity[key];\n return acc;\n }, {});\n let hasOnlyValueMissingError = false;\n for (const key of validityKeys) {\n if (key === 'valid') {\n continue;\n }\n if (key === 'valueMissing' && computedState[key]) {\n hasOnlyValueMissingError = true;\n } else if (computedState[key]) {\n return computedState;\n }\n }\n\n // Only make `valueMissing` mark the field invalid if it's been changed\n // to reduce error noise.\n if (hasOnlyValueMissingError && !markedDirtyRef.current) {\n computedState.valid = true;\n computedState.valueMissing = false;\n }\n return computedState;\n }\n\n // A field can own several inputs (such as a checkbox or radio group), but only the last-mounted\n // one wins the shared `inputRef`. Validate against the registry instead so every input counts;\n // `inputRef` is the fallback only when no inputs are registered.\n function resolveRepresentativeInput() {\n return registeredInputs.size > 0 ? findRepresentativeInput(registeredInputs, elementRef.current) : inputRef.current;\n }\n\n // A field with no eligible input has no native constraint, but its custom validator still\n // applies to the logical value at the configured validation boundary.\n let element = resolveRepresentativeInput();\n function refreshState() {\n element = resolveRepresentativeInput();\n // Barred controls expose no usable native constraint state.\n return element?.willValidate ? getState(element) : makeState(false);\n }\n if (revalidate) {\n if (state.valid !== false || !element) {\n return;\n }\n if (!element.validity.valueMissing) {\n // The 'valueMissing' (required) condition has been resolved by the user typing.\n // Temporarily mark the field as valid for this onChange event.\n // Other native errors (e.g., typeMismatch) will be caught by full validation on blur or submit.\n // The required value is now present; ignore stale external invalid state for this pass.\n clearCustomValidity();\n // Clearing can make another registered input with a custom error representative.\n const currentElement = resolveRepresentativeInput();\n const foreign = currentElement?.validity.customError ? getNativeErrors(currentElement) : [];\n publish(makeState(foreign.length > 0), foreign, false);\n return;\n }\n\n // A stale custom error can coexist with valueMissing, but defer any other native errors.\n for (const key of validityKeys) {\n if (key !== 'valid' && key !== 'valueMissing' && key !== 'customError' && element.validity[key]) {\n return;\n }\n }\n\n // Value is still missing: publish the current native state so valueMissing and the changed\n // value are observable immediately. Full custom validation still waits for its boundary.\n }\n timeout.clear();\n\n // Do not read Base UI's previous message back as a native constraint.\n clearCustomValidity();\n let nextState = refreshState();\n let validationErrors = getNativeErrors(element);\n const isValidatingOnChange = shouldValidateOnChange();\n\n // Native or externally set errors take precedence outside onChange validation.\n if (validationErrors.length === 0 || isValidatingOnChange) {\n // call the validate function because either\n // - validating on change, or\n // - native constraint validations passed, custom validity check is next\n const formValues = Array.from(formRef.current.fields.values()).reduce((acc, field) => {\n if (field.name) {\n acc[field.name] = field.getValue();\n }\n return acc;\n }, {});\n const resultOrPromise = validate(value, formValues);\n let result;\n if (typeof resultOrPromise === 'object' && resultOrPromise !== null && 'then' in resultOrPromise) {\n // Validity is unknown while the validator runs, so go neutral, but keep what must block\n // submission synchronously: native failures, and a previous custom error outside onSubmit\n // mode. A previous native error is never kept, since `nextState` already carries the fresh\n // native verdict.\n if (nextState.valid === false) {\n publish(nextState, validationErrors);\n } else if (validationMode === 'onSubmit' || !validityData.state.customError) {\n nextState.valid = null;\n publish(nextState, validationErrors);\n }\n\n // A rejected validator keeps the previously published state, so a transient\n // failure can't retire an error and unblock submission.\n result = await resultOrPromise;\n if (validationCommitId !== validationCommitIdRef.current) {\n return;\n }\n nextState = refreshState();\n } else {\n result = resultOrPromise;\n }\n\n // Empty results and empty array entries are valid.\n validationErrors = result ? [].concat(result).filter(Boolean) : [];\n if (validationErrors.length > 0) {\n nextState.valid = false;\n nextState.customError = true;\n // Keep custom errors for barred controls in field state only.\n if (element?.willValidate) {\n setCustomValidity(element, validationErrors.join('\\n'));\n }\n } else {\n validationErrors = getNativeErrors(element);\n }\n }\n publish(nextState, validationErrors);\n });\n const change = useStableCallback((value, cancelPending = false) => {\n timeout.clear();\n validationCommitIdRef.current += 1;\n if (cancelPending) {\n return;\n }\n const validateOnChange = shouldValidateOnChange();\n if (validateOnChange && value !== '' && validationDebounceTime) {\n timeout.start(validationDebounceTime, () => {\n commit(value);\n });\n } else {\n commit(value, !validateOnChange);\n }\n });\n const getValidationProps = React.useCallback((disabled, externalProps = {}) => mergeProps(getDescriptionProps(externalProps), state.valid === false && !state.disabled && !disabled ? {\n 'aria-invalid': true\n } : EMPTY_OBJECT), [getDescriptionProps, state.disabled, state.valid]);\n return React.useMemo(() => ({\n getValidationProps,\n inputRef,\n registeredInputs,\n registerInput,\n getInputControl,\n commit,\n change\n }), [getValidationProps, registeredInputs, registerInput, getInputControl, commit, change]);\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const FieldsetRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") FieldsetRootContext.displayName = \"FieldsetRootContext\";\nexport function useFieldsetRootContext(optional = false) {\n const context = React.useContext(FieldsetRootContext);\n if (!context && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: FieldsetRootContext is missing. Fieldset parts must be placed within <Fieldset.Root>.' : _formatErrorMessage(86));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { useControlled } from '@base-ui/utils/useControlled';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useBaseUiId } from \"../internals/useBaseUiId.mjs\";\nimport { contains } from \"../floating-ui-react/utils.mjs\";\nimport { SHIFT } from \"../internals/composite/composite.mjs\";\nimport { CompositeRoot } from \"../internals/composite/root/CompositeRoot.mjs\";\nimport { useFieldRootContext } from \"../internals/field-root-context/FieldRootContext.mjs\";\nimport { useRegisterFieldControl } from \"../internals/field-register-control/useRegisterFieldControl.mjs\";\nimport { fieldValidityMapping } from \"../internals/field-constants/constants.mjs\";\nimport { isEligibleInput } from \"../field/root/useFieldValidation.mjs\";\nimport { useFieldsetRootContext } from \"../fieldset/root/FieldsetRootContext.mjs\";\nimport { useFormContext } from \"../internals/form-context/FormContext.mjs\";\nimport { useLabelableContext } from \"../internals/labelable-provider/LabelableContext.mjs\";\nimport { useValueChanged } from \"../internals/useValueChanged.mjs\";\nimport { RadioGroupContext } from \"./RadioGroupContext.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst MODIFIER_KEYS = [SHIFT];\n\n/**\n * Provides shared state to a series of radio buttons.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Radio Group](https://base-ui.com/react/components/radio-group)\n */\nexport const RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(componentProps, forwardedRef) {\n const {\n render,\n className,\n disabled: disabledProp,\n readOnly,\n required,\n onValueChange: onValueChangeProp,\n value: externalValue,\n defaultValue,\n form,\n name: nameProp,\n inputRef: inputRefProp,\n id: idProp,\n style,\n ...elementProps\n } = componentProps;\n const {\n setTouched: setFieldTouched,\n setFocused,\n validationMode,\n name: fieldName,\n disabled: fieldDisabled,\n state: fieldState,\n validation,\n setDirty,\n setFilled,\n validityData\n } = useFieldRootContext();\n const {\n labelId\n } = useLabelableContext();\n const {\n clearErrors,\n elementRef\n } = useFormContext();\n const fieldsetContext = useFieldsetRootContext(true);\n const disabled = fieldDisabled || disabledProp;\n const name = fieldName ?? nameProp;\n const id = useBaseUiId(idProp);\n const [checkedValue, setCheckedValueUnwrapped] = useControlled({\n controlled: externalValue,\n default: defaultValue,\n name: 'RadioGroup',\n state: 'value'\n });\n const [touched, setTouched] = React.useState(false);\n const setCheckedValue = useStableCallback((value, eventDetails) => {\n onValueChangeProp?.(value, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n setCheckedValueUnwrapped(value);\n });\n const getInputControl = validation.getInputControl;\n const controlRef = React.useMemo(() => ({\n get current() {\n return getInputControl();\n }\n }), [getInputControl]);\n const groupInputRef = React.useRef(null);\n const firstEnabledInputRef = React.useRef(null);\n const mergedInputRef = useMergedRefs(groupInputRef, inputRefProp);\n const lastAppliedInputRef = React.useRef(mergedInputRef);\n\n // Only forwards the public `inputRef` and tracks the current representative for that forwarding.\n // The registry (`validation.registeredInputs`) is authoritative for validation and form-value\n // projection, so the group must not write `validation.inputRef`: a stale, unmounted radio left\n // there would become the Field's fallback once the registry empties and keep blocking submission.\n const setInputRef = useStableCallback(hiddenInput => {\n if (groupInputRef.current === hiddenInput && lastAppliedInputRef.current === mergedInputRef) {\n return;\n }\n lastAppliedInputRef.current = mergedInputRef;\n void mergedInputRef?.(hiddenInput);\n });\n useIsoLayoutEffect(() => {\n setInputRef(groupInputRef.current);\n }, [mergedInputRef, setInputRef]);\n const registerInputRef = useStableCallback(input => {\n if (!input) {\n return undefined;\n }\n if (!input.disabled) {\n if (!firstEnabledInputRef.current) {\n firstEnabledInputRef.current = input;\n }\n const currentInput = groupInputRef.current;\n if (input.checked || currentInput == null || currentInput.disabled) {\n setInputRef(input);\n }\n }\n\n // Detach when this input unmounts while still forwarded, so consumers don't\n // keep holding a disconnected node. The input may have become the forwarded\n // one after attach (via the re-registration effect), so always return this.\n return () => {\n if (firstEnabledInputRef.current === input) {\n firstEnabledInputRef.current = null;\n }\n if (groupInputRef.current === input) {\n setInputRef(null);\n }\n };\n });\n const getFormValue = useStableCallback(() => {\n const formElement = elementRef.current;\n if (!formElement) {\n return checkedValue ?? null;\n }\n for (const input of validation.registeredInputs.keys()) {\n if (input.checked && isEligibleInput(input, formElement)) {\n return checkedValue ?? null;\n }\n }\n return null;\n });\n useRegisterFieldControl(controlRef, id, checkedValue ?? null, getFormValue, !disabled, nameProp);\n useValueChanged(checkedValue, () => {\n clearErrors(name);\n setDirty(checkedValue !== validityData.initialValue);\n setFilled(checkedValue != null);\n validation.change(checkedValue);\n const fallbackInput = firstEnabledInputRef.current;\n if (checkedValue == null && fallbackInput && !fallbackInput.disabled) {\n setInputRef(fallbackInput);\n }\n });\n const ariaLabelledby = labelId ?? fieldsetContext?.legendId;\n const state = {\n ...fieldState,\n disabled: disabled ?? false,\n required: required ?? false,\n readOnly: readOnly ?? false\n };\n const contextValue = React.useMemo(() => ({\n checkedValue,\n disabled,\n form,\n validation,\n name,\n readOnly,\n registerInputRef,\n required,\n setCheckedValue,\n setTouched,\n touched\n }), [checkedValue, disabled, form, validation, name, readOnly, registerInputRef, required, setCheckedValue, setTouched, touched]);\n const defaultProps = {\n id: idProp,\n role: 'radiogroup',\n 'aria-required': required || undefined,\n 'aria-disabled': disabled || undefined,\n 'aria-readonly': readOnly || undefined,\n 'aria-labelledby': ariaLabelledby,\n onBlur(event) {\n if (!contains(event.currentTarget, event.relatedTarget)) {\n setTouched(false);\n setFieldTouched(true);\n setFocused(false);\n if (validationMode === 'onBlur') {\n validation.commit(checkedValue);\n }\n }\n },\n onKeyDownCapture(event) {\n if (event.key.startsWith('Arrow')) {\n setTouched(true);\n }\n }\n };\n return /*#__PURE__*/_jsx(RadioGroupContext.Provider, {\n value: contextValue,\n children: /*#__PURE__*/_jsx(CompositeRoot, {\n render: render,\n className: className,\n style: style,\n state: state,\n props: [defaultProps, elementProps, props => validation.getValidationProps(disabled ?? false, props)],\n refs: [forwardedRef],\n stateAttributesMapping: fieldValidityMapping,\n enableHomeAndEndKeys: false,\n modifierKeys: MODIFIER_KEYS\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") RadioGroup.displayName = \"RadioGroup\";","import * as React from 'react'\nimport { Radio as RadioPrimitive } from '@base-ui/react/radio'\nimport { RadioGroup as RadioGroupPrimitive } from '@base-ui/react/radio-group'\n\nimport { cn } from '@/lib/utils'\n\nexport type RadioProps<Value = string> = RadioPrimitive.Root.Props<Value> & {\n invalid?: boolean\n}\n\nfunction Radio<Value = string>({ className, invalid, ...props }: RadioProps<Value>) {\n return (\n <RadioPrimitive.Root\n data-invalid={invalid ? '' : undefined}\n aria-invalid={invalid || undefined}\n {...props}\n className={cn(\n 'inline-flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-pill border border-border-default bg-background-input transition-colors focus-ring hover:border-border-bold hover:bg-background-ghost-hover data-checked:border-background-brand-bold data-checked:bg-background-brand-bold data-checked:hover:border-background-brand-bold-selected data-checked:hover:bg-background-brand-bold-selected data-disabled:pointer-events-none data-disabled:opacity-50 data-invalid:border-status-border-error-bold',\n className,\n )}\n >\n <RadioPrimitive.Indicator className=\"size-2 rounded-pill bg-icon-on-bold\" />\n </RadioPrimitive.Root>\n )\n}\n\nexport type RadioGroupProps<Value = string> = RadioGroupPrimitive.Props<Value> & {\n orientation?: 'horizontal' | 'vertical'\n invalid?: boolean\n}\n\nfunction RadioGroup<Value = string>({\n className,\n orientation = 'vertical',\n invalid,\n ...props\n}: RadioGroupProps<Value>) {\n return (\n <RadioGroupPrimitive\n data-orientation={orientation}\n data-invalid={invalid ? '' : undefined}\n aria-invalid={invalid || undefined}\n {...props}\n className={cn(\n 'flex gap-space-12',\n orientation === 'horizontal' ? 'flex-row flex-wrap items-start' : 'flex-col',\n className,\n )}\n />\n )\n}\n\nexport { RadioGroup }\nexport default Radio\n"],"names":["RadioRootDataAttributes.checked","RadioRootDataAttributes.unchecked","_formatErrorMessage","RadioRoot","checked","element","REASONS.none","_jsxs","_jsx","RadioIndicator","RadioGroup","RadioPrimitive.Root","cn","RadioPrimitive.Indicator","RadioGroupPrimitive"],"mappings":";;;;;;;;;;;;;;;;AAGO,MAAM,UAAU;AAIhB,MAAM,YAAY;ACJlB,MAAM,yBAAyB;AAAA,EACpC,QAAQ,OAAO;AACb,QAAI,OAAO;AACT,aAAO;AAAA,QACL,CAACA,OAA+B,GAAG;AAAA,MAC3C;AAAA,IACI;AACA,WAAO;AAAA,MACL,CAACC,SAAiC,GAAG;AAAA,IAC3C;AAAA,EACE;AAAA,EACA,GAAG;AAA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AAA,IACnD,OAAO;AAAA,IACP,UAAuBA,oBAAK,eAAe;AAAA,MACzC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,OAAO,CAAC,cAAc,cAAc,WAAS,WAAW,mBAAmB,YAAY,OAAO,KAAK,CAAC;AAAA,MACpG,MAAM,CAAC,YAAY;AAAA,MACnB,wBAAwB;AAAA,MACxB,sBAAsB;AAAA,MACtB,cAAc;AAAA,IACpB,CAAK;AAAA,EACL,CAAG;AACH,CAAC;AACD,IAAI,QAAQ,IAAI,aAAa,aAAcE,cAAW,cAAc;AC7MpE,SAAS,MAAsB,EAAE,WAAW,SAAS,GAAG,SAA4B;AAClF,SACE;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,gBAAc,UAAU,KAAK;AAAA,MAC7B,gBAAc,WAAW;AAAA,MACxB,GAAG;AAAA,MACJ,WAAWC;AAAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAGF,UAAA,oBAACC,gBAAA,EAAyB,WAAU,sCAAA,CAAsC;AAAA,IAAA;AAAA,EAAA;AAGhF;AAOA,SAASH,YAA2B;AAAA,EAClC;AAAA,EACA,cAAc;AAAA,EACd;AAAA,EACA,GAAG;AACL,GAA2B;AACzB,SACE;AAAA,IAACI;AAAAA,IAAA;AAAA,MACC,oBAAkB;AAAA,MAClB,gBAAc,UAAU,KAAK;AAAA,MAC7B,gBAAc,WAAW;AAAA,MACxB,GAAG;AAAA,MACJ,WAAWF;AAAAA,QACT;AAAA,QACA,gBAAgB,eAAe,mCAAmC;AAAA,QAClE;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9]}
1
+ {"version":3,"file":"Radio.es.js","sources":["../../../node_modules/@base-ui/react/radio/root/RadioRootDataAttributes.mjs","../../../node_modules/@base-ui/react/radio/utils/stateAttributesMapping.mjs","../../../node_modules/@base-ui/react/radio-group/RadioGroupContext.mjs","../../../node_modules/@base-ui/react/radio/root/RadioRootContext.mjs","../../../node_modules/@base-ui/react/radio/root/RadioRoot.mjs","../../../node_modules/@base-ui/react/radio/indicator/RadioIndicator.mjs","../../../node_modules/@base-ui/react/field/root/useFieldValidation.mjs","../../../node_modules/@base-ui/react/fieldset/root/FieldsetRootContext.mjs","../../../node_modules/@base-ui/react/radio-group/RadioGroup.mjs","../../../src/new-components/atoms/Radio.tsx"],"sourcesContent":["/**\n * Present when the radio is checked.\n */\nexport const checked = 'data-checked';\n/**\n * Present when the radio is not checked.\n */\nexport const unchecked = 'data-unchecked';\n/**\n * Present when the radio is disabled.\n */\nexport const disabled = 'data-disabled';\n/**\n * Present when the radio is readonly.\n */\nexport const readonly = 'data-readonly';\n/**\n * Present when the radio is required.\n */\nexport const required = 'data-required';\n/**\n * Present when the radio is in a valid state (when wrapped in Field.Root).\n */\nexport const valid = 'data-valid';\n/**\n * Present when the radio is in an invalid state (when wrapped in Field.Root).\n */\nexport const invalid = 'data-invalid';\n/**\n * Present when the radio has been touched (when wrapped in Field.Root).\n */\nexport const touched = 'data-touched';\n/**\n * Present when the radio's value has changed (when wrapped in Field.Root).\n */\nexport const dirty = 'data-dirty';\n/**\n * Present when the radio is checked (when wrapped in Field.Root).\n */\nexport const filled = 'data-filled';\n/**\n * Present when the radio is focused (when wrapped in Field.Root).\n */\nexport const focused = 'data-focused';","import { transitionStatusMapping } from \"../../internals/stateAttributesMapping.mjs\";\nimport { fieldValidityMapping } from \"../../internals/field-constants/constants.mjs\";\nimport * as RadioRootDataAttributes from \"../root/RadioRootDataAttributes.mjs\";\nexport const stateAttributesMapping = {\n checked(value) {\n if (value) {\n return {\n [RadioRootDataAttributes.checked]: ''\n };\n }\n return {\n [RadioRootDataAttributes.unchecked]: ''\n };\n },\n ...transitionStatusMapping,\n ...fieldValidityMapping\n};","'use client';\n\nimport * as React from 'react';\nexport const RadioGroupContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") RadioGroupContext.displayName = \"RadioGroupContext\";\nexport function useRadioGroupContext() {\n return React.useContext(RadioGroupContext);\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const RadioRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") RadioRootContext.displayName = \"RadioRootContext\";\nexport function useRadioRootContext() {\n const value = React.useContext(RadioRootContext);\n if (value === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: RadioRootContext is missing. Radio parts must be placed within <Radio.Root>.' : _formatErrorMessage(52));\n }\n return value;\n}","'use client';\n\nimport * as React from 'react';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { visuallyHidden, visuallyHiddenInput } from '@base-ui/utils/visuallyHidden';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { NOOP } from \"../../internals/noop.mjs\";\nimport { stateAttributesMapping } from \"../utils/stateAttributesMapping.mjs\";\nimport { dispatchClickWithModifiers } from \"../../utils/dispatchClickWithModifiers.mjs\";\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useButton } from \"../../internals/use-button/index.mjs\";\nimport { ACTIVE_COMPOSITE_ITEM } from \"../../internals/composite/constants.mjs\";\nimport { CompositeItem } from \"../../internals/composite/item/CompositeItem.mjs\";\nimport { useFieldRootContext } from \"../../internals/field-root-context/FieldRootContext.mjs\";\nimport { useSetFieldFocused } from \"../../internals/field-root-context/useSetFieldFocused.mjs\";\nimport { useFieldItemContext } from \"../../field/item/FieldItemContext.mjs\";\nimport { useLabelableContext } from \"../../internals/labelable-provider/LabelableContext.mjs\";\nimport { useAriaLabelledBy } from \"../../internals/labelable-provider/useAriaLabelledBy.mjs\";\nimport { useLabelableId } from \"../../internals/labelable-provider/useLabelableId.mjs\";\nimport { useRadioGroupContext } from \"../../radio-group/RadioGroupContext.mjs\";\nimport { serializeValue } from \"../../internals/serializeValue.mjs\";\nimport { RadioRootContext } from \"./RadioRootContext.mjs\";\n\n/**\n * Represents the radio button itself.\n * Renders a `<span>` element and a hidden `<input>` beside.\n *\n * Documentation: [Base UI Radio](https://base-ui.com/react/components/radio-group)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const RadioRoot = /*#__PURE__*/React.forwardRef(function RadioRoot(componentProps, forwardedRef) {\n const {\n render,\n className,\n disabled: disabledProp = false,\n readOnly: readOnlyProp = false,\n required: requiredProp = false,\n 'aria-labelledby': ariaLabelledByProp,\n value,\n inputRef: inputRefProp,\n nativeButton = false,\n id: idProp,\n style,\n ...elementProps\n } = componentProps;\n const groupContext = useRadioGroupContext();\n const {\n disabled: disabledGroup,\n readOnly: readOnlyGroup,\n required: requiredGroup,\n form: formGroup,\n checkedValue,\n touched = false,\n validation,\n name,\n setCheckedValue = NOOP,\n setTouched = NOOP,\n registerInputRef = NOOP\n } = groupContext ?? {};\n const {\n setTouched: setFieldTouched,\n setFilled,\n state: fieldState,\n disabled: fieldDisabled\n } = useFieldRootContext();\n const fieldItemContext = useFieldItemContext();\n const {\n labelId,\n getDescriptionProps\n } = useLabelableContext();\n const disabled = fieldDisabled || fieldItemContext.disabled || disabledGroup || disabledProp;\n const readOnly = readOnlyGroup || readOnlyProp;\n const required = requiredGroup || requiredProp;\n const form = formGroup;\n const checked = groupContext ? checkedValue === value : value === '';\n const radioRef = React.useRef(null);\n const setFieldFocused = useSetFieldFocused(disabled, radioRef);\n const inputRef = React.useRef(null);\n const registerFieldInput = validation?.registerInput;\n const registerInput = React.useCallback(element => registerFieldInput?.(element, {\n controlRef: radioRef,\n value: undefined\n }), [registerFieldInput]);\n const mergedInputRef = useMergedRefs(inputRefProp, inputRef, registerInputRef, registerInput);\n useIsoLayoutEffect(() => {\n if (inputRef.current?.checked) {\n setFilled(true);\n }\n }, [setFilled]);\n useIsoLayoutEffect(() => {\n if (!inputRef.current) {\n return;\n }\n if (disabled && checked) {\n registerInputRef(null);\n return;\n }\n registerInputRef(inputRef.current);\n }, [checked, disabled, registerInputRef]);\n const id = useBaseUiId();\n const inputId = useLabelableId({\n id: idProp\n });\n const hiddenInputId = nativeButton ? undefined : inputId;\n const ariaLabelledBy = useAriaLabelledBy(ariaLabelledByProp, labelId, inputRef, !nativeButton, hiddenInputId, elementProps['aria-label']);\n const rootProps = {\n role: 'radio',\n 'aria-checked': checked,\n 'aria-labelledby': ariaLabelledBy,\n [ACTIVE_COMPOSITE_ITEM]: checked ? '' : undefined,\n id: nativeButton ? inputId : id,\n onKeyDown(event) {\n if (event.key === 'Enter') {\n // Radio only activates with Space. Preventing the keydown's default\n // stops useButton from turning Enter into a click.\n event.preventDefault();\n }\n },\n onClick(event) {\n if (event.defaultPrevented || disabled || readOnly) {\n return;\n }\n event.preventDefault();\n const input = inputRef.current;\n if (!input) {\n return;\n }\n dispatchClickWithModifiers(input, event);\n },\n onFocus(event) {\n setFieldFocused(true);\n if (event.defaultPrevented || disabled || readOnly || !touched) {\n return;\n }\n inputRef.current?.click();\n setTouched(false);\n },\n onBlur() {\n // A grouped radio's exit is cleared by the group's `contains`-guarded blur handler, so\n // radio-to-radio moves inside the group don't churn the focused state.\n if (!groupContext) {\n setFieldFocused(false);\n }\n }\n };\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n native: nativeButton,\n composite: false\n });\n const inputProps = {\n type: 'radio',\n ref: mergedInputRef,\n form,\n id: hiddenInputId,\n name,\n tabIndex: -1,\n style: name ? visuallyHiddenInput : visuallyHidden,\n 'aria-hidden': true,\n ...(value !== undefined ? {\n value: serializeValue(value)\n } : EMPTY_OBJECT),\n disabled,\n checked,\n required,\n readOnly,\n onChange(event) {\n // Workaround for https://github.com/react/react/issues/9023\n if (event.nativeEvent.defaultPrevented) {\n return;\n }\n if (disabled || readOnly || value === undefined) {\n return;\n }\n const details = createChangeEventDetails(REASONS.none, event.nativeEvent);\n setCheckedValue(value, details);\n if (details.isCanceled) {\n return;\n }\n setFieldTouched(true);\n },\n onClick(event) {\n // Clicks dispatched on the input from the root's `onClick` and `onFocus` are an\n // implementation detail and must not reach ancestors.\n event.stopPropagation();\n },\n onFocus() {\n radioRef.current?.focus();\n }\n };\n const state = React.useMemo(() => ({\n ...fieldState,\n required,\n disabled,\n readOnly,\n checked\n }), [fieldState, disabled, readOnly, checked, required]);\n const contextValue = state;\n const isRadioGroup = groupContext !== undefined;\n const refs = [forwardedRef, radioRef, buttonRef];\n const props = [rootProps, elementProps, getButtonProps, getDescriptionProps, validation ? validationProps => validation.getValidationProps(disabled, validationProps) : EMPTY_OBJECT];\n const element = useRenderElement('span', componentProps, {\n enabled: !isRadioGroup,\n state,\n ref: refs,\n props,\n stateAttributesMapping\n });\n return /*#__PURE__*/_jsxs(RadioRootContext.Provider, {\n value: contextValue,\n children: [isRadioGroup ? /*#__PURE__*/_jsx(CompositeItem, {\n tag: \"span\",\n render: render,\n className: className,\n style: style,\n state: state,\n refs: refs,\n props: props,\n stateAttributesMapping: stateAttributesMapping\n }) : element, /*#__PURE__*/_jsx(\"input\", {\n ...inputProps,\n suppressHydrationWarning: true\n })]\n });\n});\nif (process.env.NODE_ENV !== \"production\") RadioRoot.displayName = \"RadioRoot\";","'use client';\n\nimport * as React from 'react';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useRadioRootContext } from \"../root/RadioRootContext.mjs\";\nimport { stateAttributesMapping } from \"../utils/stateAttributesMapping.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\nimport { useTransitionStatus } from \"../../internals/useTransitionStatus.mjs\";\n/**\n * Indicates whether the radio button is selected.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Radio](https://base-ui.com/react/components/radio-group)\n */\nexport const RadioIndicator = /*#__PURE__*/React.forwardRef(function RadioIndicator(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n keepMounted = false,\n ...elementProps\n } = componentProps;\n const rootState = useRadioRootContext();\n const rendered = rootState.checked;\n const {\n mounted,\n transitionStatus,\n setMounted\n } = useTransitionStatus(rendered);\n const state = {\n ...rootState,\n transitionStatus\n };\n const indicatorRef = React.useRef(null);\n const shouldRender = keepMounted || mounted;\n const element = useRenderElement('span', componentProps, {\n ref: [forwardedRef, indicatorRef],\n state,\n props: elementProps,\n stateAttributesMapping\n });\n useOpenChangeComplete({\n batch: true,\n enabled: !rendered,\n open: rendered,\n ref: indicatorRef,\n onComplete() {\n if (!rendered) {\n setMounted(false);\n }\n }\n });\n if (!shouldRender) {\n return null;\n }\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") RadioIndicator.displayName = \"RadioIndicator\";","'use client';\n\nimport * as React from 'react';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { useLabelableContext } from \"../../internals/labelable-provider/LabelableContext.mjs\";\nimport { mergeProps } from \"../../merge-props/index.mjs\";\nimport { DEFAULT_VALIDITY_STATE } from \"../../internals/field-constants/constants.mjs\";\nimport { useFormContext } from \"../../internals/form-context/FormContext.mjs\";\nimport { getCombinedFieldValidityData } from \"../utils/getCombinedFieldValidityData.mjs\";\nconst validityKeys = Object.keys(DEFAULT_VALIDITY_STATE);\n/**\n * Whether an input participates in the surrounding Base UI Form. Inputs that are effectively\n * disabled, or whose `form` attribute explicitly associates them with another form, are excluded.\n * DOM position only matters when it associates the input with a different form. Otherwise, field\n * registration is context-driven, so portaled inputs (for example inside a dialog) still belong to\n * the form for both validation and values projected into `onFormSubmit`.\n */\nexport function isEligibleInput(input, formElement) {\n if (input.matches(':disabled')) {\n return false;\n }\n if (!formElement || input.form === formElement) {\n return true;\n }\n\n // React context crosses portal boundaries. An unassociated portaled input still participates in\n // contextual validation, unless an explicit `form` attribute opts it out of the surrounding Form.\n return input.form === null && !input.hasAttribute('form');\n}\n\n/**\n * Picks the input whose native validity should represent a field that owns several inputs (such as a\n * checkbox or radio group). Prefers the first eligible currently-invalid input, where \"first\" follows\n * registration order (mount order), and otherwise returns the first eligible input.\n */\nfunction findRepresentativeInput(inputs, formElement) {\n let fallback = null;\n for (const input of inputs.keys()) {\n if (!isEligibleInput(input, formElement)) {\n continue;\n }\n if (!input.validity.valid) {\n return input;\n }\n fallback ??= input;\n }\n return fallback;\n}\nfunction makeState(customError) {\n return {\n ...DEFAULT_VALIDITY_STATE,\n valid: !customError,\n customError\n };\n}\nfunction getNativeErrors(element) {\n return element && element.validationMessage ? [element.validationMessage] : [];\n}\nexport function useFieldValidation(params) {\n const {\n elementRef,\n formRef\n } = useFormContext();\n const {\n setValidityData,\n validate,\n validityData,\n validationDebounceTime,\n invalid,\n markedDirtyRef,\n state,\n shouldValidateOnChange,\n validationMode,\n registeredFieldIdRef\n } = params;\n const {\n controlId,\n getDescriptionProps\n } = useLabelableContext();\n const timeout = useTimeout();\n const inputRef = React.useRef(null);\n const registeredInputs = useRefWithInit(() => new Map()).current;\n const validationCommitIdRef = React.useRef(0);\n // Tracks the message installed by Base UI and the custom message it displaced.\n const customValidityRef = React.useRef(null);\n\n // Groups register several inputs against a single field so focus, validation, and form-value\n // projection can use the same live controls. This also ensures a `required` checkbox can't be\n // satisfied by another input in the group, matching native per-checkbox behavior.\n const registerInput = React.useCallback((element, registration) => {\n registeredInputs.set(element, registration);\n return () => {\n registeredInputs.delete(element);\n };\n }, [registeredInputs]);\n const getInputControl = useStableCallback(() => {\n const element = findRepresentativeInput(registeredInputs, elementRef.current);\n return element && registeredInputs.get(element)?.controlRef.current || null;\n });\n const commit = useStableCallback(async (value, revalidate = false) => {\n validationCommitIdRef.current += 1;\n const validationCommitId = validationCommitIdRef.current;\n function updateRegisteredFieldValidity(nextValidityData, externalInvalid = invalid) {\n const fieldId = registeredFieldIdRef.current ?? controlId;\n if (fieldId == null) {\n return;\n }\n const currentFieldData = formRef.current.fields.get(fieldId);\n if (!currentFieldData) {\n return;\n }\n const validityDataWithFormErrors = getCombinedFieldValidityData(nextValidityData, externalInvalid);\n formRef.current.fields.set(fieldId, {\n ...currentFieldData,\n validityData: validityDataWithFormErrors\n });\n }\n function makeValidityData(validityState, errorMessages) {\n // `valueMissing` may be suppressed while the native message remains non-empty.\n const errors = validityState.valid === false ? errorMessages : [];\n return {\n value,\n state: validityState,\n error: errors[0] ?? '',\n errors,\n initialValue: validityData.initialValue\n };\n }\n function setCustomValidity(element, message) {\n // Never reinstall a native constraint message as custom validity.\n const displaced = element.validity.customError ? element.validationMessage : '';\n const ownedMessage = message.replace(/\\r\\n?/g, '\\n');\n element.setCustomValidity(ownedMessage);\n customValidityRef.current = [element, ownedMessage, displaced];\n }\n function clearCustomValidity() {\n const record = customValidityRef.current;\n customValidityRef.current = null;\n // Replacement transfers ownership; barred controls hide `validationMessage`.\n if (record && (!record[0].willValidate || record[0].validationMessage === record[1])) {\n record[0].setCustomValidity(record[2]);\n }\n }\n function publish(validityState, errorMessages, externalInvalid) {\n const nextValidityData = makeValidityData(validityState, errorMessages);\n updateRegisteredFieldValidity(nextValidityData, externalInvalid);\n setValidityData(nextValidityData);\n }\n function getState(el) {\n const computedState = validityKeys.reduce((acc, key) => {\n acc[key] = el.validity[key];\n return acc;\n }, {});\n let hasOnlyValueMissingError = false;\n for (const key of validityKeys) {\n if (key === 'valid') {\n continue;\n }\n if (key === 'valueMissing' && computedState[key]) {\n hasOnlyValueMissingError = true;\n } else if (computedState[key]) {\n return computedState;\n }\n }\n\n // Only make `valueMissing` mark the field invalid if it's been changed\n // to reduce error noise.\n if (hasOnlyValueMissingError && !markedDirtyRef.current) {\n computedState.valid = true;\n computedState.valueMissing = false;\n }\n return computedState;\n }\n\n // A field can own several inputs (such as a checkbox or radio group), but only the last-mounted\n // one wins the shared `inputRef`. Validate against the registry instead so every input counts;\n // `inputRef` is the fallback only when no inputs are registered.\n function resolveRepresentativeInput() {\n return registeredInputs.size > 0 ? findRepresentativeInput(registeredInputs, elementRef.current) : inputRef.current;\n }\n\n // A field with no eligible input has no native constraint, but its custom validator still\n // applies to the logical value at the configured validation boundary.\n let element = resolveRepresentativeInput();\n function refreshState() {\n element = resolveRepresentativeInput();\n // Barred controls expose no usable native constraint state.\n return element?.willValidate ? getState(element) : makeState(false);\n }\n if (revalidate) {\n if (state.valid !== false || !element) {\n return;\n }\n if (!element.validity.valueMissing) {\n // The 'valueMissing' (required) condition has been resolved by the user typing.\n // Temporarily mark the field as valid for this onChange event.\n // Other native errors (e.g., typeMismatch) will be caught by full validation on blur or submit.\n // The required value is now present; ignore stale external invalid state for this pass.\n clearCustomValidity();\n // Clearing can make another registered input with a custom error representative.\n const currentElement = resolveRepresentativeInput();\n const foreign = currentElement?.validity.customError ? getNativeErrors(currentElement) : [];\n publish(makeState(foreign.length > 0), foreign, false);\n return;\n }\n\n // A stale custom error can coexist with valueMissing, but defer any other native errors.\n for (const key of validityKeys) {\n if (key !== 'valid' && key !== 'valueMissing' && key !== 'customError' && element.validity[key]) {\n return;\n }\n }\n\n // Value is still missing: publish the current native state so valueMissing and the changed\n // value are observable immediately. Full custom validation still waits for its boundary.\n }\n timeout.clear();\n\n // Do not read Base UI's previous message back as a native constraint.\n clearCustomValidity();\n let nextState = refreshState();\n let validationErrors = getNativeErrors(element);\n const isValidatingOnChange = shouldValidateOnChange();\n\n // Native or externally set errors take precedence outside onChange validation.\n if (validationErrors.length === 0 || isValidatingOnChange) {\n // call the validate function because either\n // - validating on change, or\n // - native constraint validations passed, custom validity check is next\n const formValues = Array.from(formRef.current.fields.values()).reduce((acc, field) => {\n if (field.name) {\n acc[field.name] = field.getValue();\n }\n return acc;\n }, {});\n const resultOrPromise = validate(value, formValues);\n let result;\n if (typeof resultOrPromise === 'object' && resultOrPromise !== null && 'then' in resultOrPromise) {\n // Validity is unknown while the validator runs, so go neutral, but keep what must block\n // submission synchronously: native failures, and a previous custom error outside onSubmit\n // mode. A previous native error is never kept, since `nextState` already carries the fresh\n // native verdict.\n if (nextState.valid === false) {\n publish(nextState, validationErrors);\n } else if (validationMode === 'onSubmit' || !validityData.state.customError) {\n nextState.valid = null;\n publish(nextState, validationErrors);\n }\n\n // A rejected validator keeps the previously published state, so a transient\n // failure can't retire an error and unblock submission.\n result = await resultOrPromise;\n if (validationCommitId !== validationCommitIdRef.current) {\n return;\n }\n nextState = refreshState();\n } else {\n result = resultOrPromise;\n }\n\n // Empty results and empty array entries are valid.\n validationErrors = result ? [].concat(result).filter(Boolean) : [];\n if (validationErrors.length > 0) {\n nextState.valid = false;\n nextState.customError = true;\n // Keep custom errors for barred controls in field state only.\n if (element?.willValidate) {\n setCustomValidity(element, validationErrors.join('\\n'));\n }\n } else {\n validationErrors = getNativeErrors(element);\n }\n }\n publish(nextState, validationErrors);\n });\n const change = useStableCallback((value, cancelPending = false) => {\n timeout.clear();\n validationCommitIdRef.current += 1;\n if (cancelPending) {\n return;\n }\n const validateOnChange = shouldValidateOnChange();\n if (validateOnChange && value !== '' && validationDebounceTime) {\n timeout.start(validationDebounceTime, () => {\n commit(value);\n });\n } else {\n commit(value, !validateOnChange);\n }\n });\n const getValidationProps = React.useCallback((disabled, externalProps = {}) => mergeProps(getDescriptionProps(externalProps), state.valid === false && !state.disabled && !disabled ? {\n 'aria-invalid': true\n } : EMPTY_OBJECT), [getDescriptionProps, state.disabled, state.valid]);\n return React.useMemo(() => ({\n getValidationProps,\n inputRef,\n registeredInputs,\n registerInput,\n getInputControl,\n commit,\n change\n }), [getValidationProps, registeredInputs, registerInput, getInputControl, commit, change]);\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const FieldsetRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") FieldsetRootContext.displayName = \"FieldsetRootContext\";\nexport function useFieldsetRootContext(optional = false) {\n const context = React.useContext(FieldsetRootContext);\n if (!context && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: FieldsetRootContext is missing. Fieldset parts must be placed within <Fieldset.Root>.' : _formatErrorMessage(86));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { useControlled } from '@base-ui/utils/useControlled';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useBaseUiId } from \"../internals/useBaseUiId.mjs\";\nimport { contains } from \"../floating-ui-react/utils.mjs\";\nimport { SHIFT } from \"../internals/composite/composite.mjs\";\nimport { CompositeRoot } from \"../internals/composite/root/CompositeRoot.mjs\";\nimport { useFieldRootContext } from \"../internals/field-root-context/FieldRootContext.mjs\";\nimport { useRegisterFieldControl } from \"../internals/field-register-control/useRegisterFieldControl.mjs\";\nimport { fieldValidityMapping } from \"../internals/field-constants/constants.mjs\";\nimport { isEligibleInput } from \"../field/root/useFieldValidation.mjs\";\nimport { useFieldsetRootContext } from \"../fieldset/root/FieldsetRootContext.mjs\";\nimport { useFormContext } from \"../internals/form-context/FormContext.mjs\";\nimport { useLabelableContext } from \"../internals/labelable-provider/LabelableContext.mjs\";\nimport { useValueChanged } from \"../internals/useValueChanged.mjs\";\nimport { RadioGroupContext } from \"./RadioGroupContext.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst MODIFIER_KEYS = [SHIFT];\n\n/**\n * Provides shared state to a series of radio buttons.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Radio Group](https://base-ui.com/react/components/radio-group)\n */\nexport const RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(componentProps, forwardedRef) {\n const {\n render,\n className,\n disabled: disabledProp,\n readOnly,\n required,\n onValueChange: onValueChangeProp,\n value: externalValue,\n defaultValue,\n form,\n name: nameProp,\n inputRef: inputRefProp,\n id: idProp,\n style,\n ...elementProps\n } = componentProps;\n const {\n setTouched: setFieldTouched,\n setFocused,\n validationMode,\n name: fieldName,\n disabled: fieldDisabled,\n state: fieldState,\n validation,\n setDirty,\n setFilled,\n validityData\n } = useFieldRootContext();\n const {\n labelId\n } = useLabelableContext();\n const {\n clearErrors,\n elementRef\n } = useFormContext();\n const fieldsetContext = useFieldsetRootContext(true);\n const disabled = fieldDisabled || disabledProp;\n const name = fieldName ?? nameProp;\n const id = useBaseUiId(idProp);\n const [checkedValue, setCheckedValueUnwrapped] = useControlled({\n controlled: externalValue,\n default: defaultValue,\n name: 'RadioGroup',\n state: 'value'\n });\n const [touched, setTouched] = React.useState(false);\n const setCheckedValue = useStableCallback((value, eventDetails) => {\n onValueChangeProp?.(value, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n setCheckedValueUnwrapped(value);\n });\n const getInputControl = validation.getInputControl;\n const controlRef = React.useMemo(() => ({\n get current() {\n return getInputControl();\n }\n }), [getInputControl]);\n const groupInputRef = React.useRef(null);\n const firstEnabledInputRef = React.useRef(null);\n const mergedInputRef = useMergedRefs(groupInputRef, inputRefProp);\n const lastAppliedInputRef = React.useRef(mergedInputRef);\n\n // Only forwards the public `inputRef` and tracks the current representative for that forwarding.\n // The registry (`validation.registeredInputs`) is authoritative for validation and form-value\n // projection, so the group must not write `validation.inputRef`: a stale, unmounted radio left\n // there would become the Field's fallback once the registry empties and keep blocking submission.\n const setInputRef = useStableCallback(hiddenInput => {\n if (groupInputRef.current === hiddenInput && lastAppliedInputRef.current === mergedInputRef) {\n return;\n }\n lastAppliedInputRef.current = mergedInputRef;\n void mergedInputRef?.(hiddenInput);\n });\n useIsoLayoutEffect(() => {\n setInputRef(groupInputRef.current);\n }, [mergedInputRef, setInputRef]);\n const registerInputRef = useStableCallback(input => {\n if (!input) {\n return undefined;\n }\n if (!input.disabled) {\n if (!firstEnabledInputRef.current) {\n firstEnabledInputRef.current = input;\n }\n const currentInput = groupInputRef.current;\n if (input.checked || currentInput == null || currentInput.disabled) {\n setInputRef(input);\n }\n }\n\n // Detach when this input unmounts while still forwarded, so consumers don't\n // keep holding a disconnected node. The input may have become the forwarded\n // one after attach (via the re-registration effect), so always return this.\n return () => {\n if (firstEnabledInputRef.current === input) {\n firstEnabledInputRef.current = null;\n }\n if (groupInputRef.current === input) {\n setInputRef(null);\n }\n };\n });\n const getFormValue = useStableCallback(() => {\n const formElement = elementRef.current;\n if (!formElement) {\n return checkedValue ?? null;\n }\n for (const input of validation.registeredInputs.keys()) {\n if (input.checked && isEligibleInput(input, formElement)) {\n return checkedValue ?? null;\n }\n }\n return null;\n });\n useRegisterFieldControl(controlRef, id, checkedValue ?? null, getFormValue, !disabled, nameProp);\n useValueChanged(checkedValue, () => {\n clearErrors(name);\n setDirty(checkedValue !== validityData.initialValue);\n setFilled(checkedValue != null);\n validation.change(checkedValue);\n const fallbackInput = firstEnabledInputRef.current;\n if (checkedValue == null && fallbackInput && !fallbackInput.disabled) {\n setInputRef(fallbackInput);\n }\n });\n const ariaLabelledby = labelId ?? fieldsetContext?.legendId;\n const state = {\n ...fieldState,\n disabled: disabled ?? false,\n required: required ?? false,\n readOnly: readOnly ?? false\n };\n const contextValue = React.useMemo(() => ({\n checkedValue,\n disabled,\n form,\n validation,\n name,\n readOnly,\n registerInputRef,\n required,\n setCheckedValue,\n setTouched,\n touched\n }), [checkedValue, disabled, form, validation, name, readOnly, registerInputRef, required, setCheckedValue, setTouched, touched]);\n const defaultProps = {\n id: idProp,\n role: 'radiogroup',\n 'aria-required': required || undefined,\n 'aria-disabled': disabled || undefined,\n 'aria-readonly': readOnly || undefined,\n 'aria-labelledby': ariaLabelledby,\n onBlur(event) {\n if (!contains(event.currentTarget, event.relatedTarget)) {\n setTouched(false);\n setFieldTouched(true);\n setFocused(false);\n if (validationMode === 'onBlur') {\n validation.commit(checkedValue);\n }\n }\n },\n onKeyDownCapture(event) {\n if (event.key.startsWith('Arrow')) {\n setTouched(true);\n }\n }\n };\n return /*#__PURE__*/_jsx(RadioGroupContext.Provider, {\n value: contextValue,\n children: /*#__PURE__*/_jsx(CompositeRoot, {\n render: render,\n className: className,\n style: style,\n state: state,\n props: [defaultProps, elementProps, props => validation.getValidationProps(disabled ?? false, props)],\n refs: [forwardedRef],\n stateAttributesMapping: fieldValidityMapping,\n enableHomeAndEndKeys: false,\n modifierKeys: MODIFIER_KEYS\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") RadioGroup.displayName = \"RadioGroup\";","import * as React from 'react'\nimport { Radio as RadioPrimitive } from '@base-ui/react/radio'\nimport { RadioGroup as RadioGroupPrimitive } from '@base-ui/react/radio-group'\n\nimport { cn } from '@/lib/utils'\n\nexport type RadioProps<Value = string> = RadioPrimitive.Root.Props<Value> & {\n invalid?: boolean\n}\n\nfunction Radio<Value = string>({ className, invalid, ...props }: RadioProps<Value>) {\n return (\n <RadioPrimitive.Root\n data-invalid={invalid ? '' : undefined}\n aria-invalid={invalid || undefined}\n {...props}\n className={cn(\n 'inline-flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-pill border border-border-default bg-background-input transition-colors focus-ring hover:border-border-bold hover:bg-background-ghost-hover data-checked:border-background-brand-bold data-checked:bg-background-brand-bold data-checked:hover:border-background-brand-bold-selected data-checked:hover:bg-background-brand-bold-selected data-disabled:pointer-events-none data-disabled:opacity-50 data-invalid:border-status-border-error-bold',\n className,\n )}\n >\n <RadioPrimitive.Indicator className=\"size-2 rounded-pill bg-icon-on-bold\" />\n </RadioPrimitive.Root>\n )\n}\n\nexport type RadioGroupProps<Value = string> = RadioGroupPrimitive.Props<Value> & {\n orientation?: 'horizontal' | 'vertical'\n invalid?: boolean\n}\n\nfunction RadioGroup<Value = string>({\n className,\n orientation = 'vertical',\n invalid,\n ...props\n}: RadioGroupProps<Value>) {\n return (\n <RadioGroupPrimitive\n data-orientation={orientation}\n data-invalid={invalid ? '' : undefined}\n aria-invalid={invalid || undefined}\n {...props}\n className={cn(\n 'flex gap-space-12',\n orientation === 'horizontal' ? 'flex-row flex-wrap items-start' : 'flex-col',\n className,\n )}\n />\n )\n}\n\nexport { RadioGroup }\nexport default Radio\n"],"names":["RadioRootDataAttributes.checked","RadioRootDataAttributes.unchecked","_formatErrorMessage","RadioRoot","checked","element","REASONS.none","_jsxs","_jsx","RadioIndicator","RadioGroup","RadioPrimitive.Root","cn","RadioPrimitive.Indicator","RadioGroupPrimitive"],"mappings":";;;;;;;;;;;;;;;;;;AAGO,MAAM,UAAU;AAIhB,MAAM,YAAY;ACJlB,MAAM,yBAAyB;AAAA,EACpC,QAAQ,OAAO;AACb,QAAI,OAAO;AACT,aAAO;AAAA,QACL,CAACA,OAA+B,GAAG;AAAA,MAC3C;AAAA,IACI;AACA,WAAO;AAAA,MACL,CAACC,SAAiC,GAAG;AAAA,IAC3C;AAAA,EACE;AAAA,EACA,GAAG;AAAA,EACH,GAAG;AACL;ACbO,MAAM,oBAAiC,sBAAM,cAAc,MAAS;AAC3E,IAAI,QAAQ,IAAI,aAAa,aAAc,mBAAkB,cAAc;AACpE,SAAS,uBAAuB;AACrC,SAAO,MAAM,WAAW,iBAAiB;AAC3C;ACHO,MAAM,mBAAgC,sBAAM,cAAc,MAAS;AAC1E,IAAI,QAAQ,IAAI,aAAa,aAAc,kBAAiB,cAAc;AACnE,SAAS,sBAAsB;AACpC,QAAM,QAAQ,MAAM,WAAW,gBAAgB;AAC/C,MAAI,UAAU,QAAW;AACvB,UAAM,IAAI,MAAM,QAAQ,IAAI,aAAa,eAAe,0FAA0FC,mBAAoB,EAAE,CAAC;AAAA,EAC3K;AACA,SAAO;AACT;ACsBO,MAAM,YAAyB,sBAAM,WAAW,SAASC,WAAU,gBAAgB,cAAc;AACtG,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,UAAU,eAAe;AAAA,IACzB,UAAU,eAAe;AAAA,IACzB,UAAU,eAAe;AAAA,IACzB,mBAAmB;AAAA,IACnB;AAAA,IACA,UAAU;AAAA,IACV,eAAe;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ACT;AAAA,QACA,gBAAgB,eAAe,mCAAmC;AAAA,QAClE;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8]}
@@ -2,15 +2,15 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
3
  import { c as cva } from "../../index-DSVg79g-.js";
4
4
  import IconProvider from "../../components/atoms/IconProvider.es.js";
5
- import { b as useRenderElement, a as useStableCallback, E as EMPTY_ARRAY } from "../../useIsoLayoutEffect-e9VA-ICd.js";
6
- import { u as useControlled } from "../../useControlled-BSyYkg5C.js";
7
- import { C as CompositeRoot } from "../../CompositeRoot-DnijP7Jm.js";
5
+ import { b as useRenderElement, a as useStableCallback, E as EMPTY_ARRAY } from "../../useIsoLayoutEffect-D2lpsB9D.js";
6
+ import { u as useControlled } from "../../useControlled-DMDWXIzj.js";
7
+ import { C as CompositeRoot } from "../../CompositeRoot-7_u1HqDT.js";
8
8
  import { u as useToolbarRootContext } from "../../ToolbarRootContext-B_HxjkNI.js";
9
9
  import { c as classNames } from "../../classNames-B1XpQHle.js";
10
- import { e as error } from "../../error-FX4R42W-.js";
11
- import { u as useBaseUiId, c as createChangeEventDetails, n as none } from "../../useBaseUiId-jtgiQp--.js";
12
- import { a as useButton } from "../../useButton-BalOc_EL.js";
13
- import { C as CompositeItem } from "../../CompositeItem-EOSJycCk.js";
10
+ import { e as error } from "../../error-nCTLdGUr.js";
11
+ import { u as useBaseUiId, c as createChangeEventDetails, n as none } from "../../useBaseUiId-CYT1vFMG.js";
12
+ import { a as useButton } from "../../useButton-BlHadUfM.js";
13
+ import { C as CompositeItem } from "../../CompositeItem-GNejxLcK.js";
14
14
  const ToggleGroupContext = /* @__PURE__ */ React.createContext(void 0);
15
15
  if (process.env.NODE_ENV !== "production") ToggleGroupContext.displayName = "ToggleGroupContext";
16
16
  function useToggleGroupContext() {
@@ -1,42 +1,22 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { c as classNames } from "../../classNames-B1XpQHle.js";
3
3
  import * as React from "react";
4
- import { o as ownerDocument, m as matchesFocusVisible } from "../../index-B6xFUIBK.js";
5
- import { u as useControlled } from "../../useControlled-BSyYkg5C.js";
6
- import { f as formatErrorMessage, a as useStableCallback, w as warn, u as useIsoLayoutEffect, b as useRenderElement, m as mergeProps, c as useMergedRefs } from "../../useIsoLayoutEffect-e9VA-ICd.js";
7
- import { u as useBaseUiId, n as none, c as createChangeEventDetails, q as createGenericEventDetails, r as keyboard, s as inputChange, b as getWindow, v as isElement, w as drag, x as trackPress } from "../../useBaseUiId-jtgiQp--.js";
8
- import { f as fieldValidityMapping, u as useFormContext, a as useFieldRootContext, b as useLabelableContext, e as useRegisterFieldControl, g as useValueChanged, c as useSetFieldFocused, d as useLabelableId } from "../../useLabelableId-CQqNbBk1.js";
9
- import { C as CompositeList, u as useCompositeListItem } from "../../CompositeList-D4xmSZ5V.js";
10
- import { c as contains, a as activeElement, g as getTarget } from "../../shadowDom-CRvvf3qf.js";
11
- import { u as useValueAsRef, a as addEventListener } from "../../useValueAsRef-BfFRcMg6.js";
12
- import { u as useAnimationFrame } from "../../useAnimationFrame-DwhymJoW.js";
4
+ import { o as ownerDocument, m as matchesFocusVisible } from "../../element-B1vbc-LG.js";
5
+ import { u as useControlled } from "../../useControlled-DMDWXIzj.js";
6
+ import { f as formatErrorMessage, a as useStableCallback, w as warn, u as useIsoLayoutEffect, b as useRenderElement, m as mergeProps, c as useMergedRefs } from "../../useIsoLayoutEffect-D2lpsB9D.js";
7
+ import { c as clamp, g as getDefaultLabelId, r as resolveAriaLabelledBy, a as areArraysEqual } from "../../clamp-D7_nsB8C.js";
8
+ import { u as useBaseUiId, n as none, c as createChangeEventDetails, l as createGenericEventDetails, C as keyboard, p as inputChange, b as getWindow, A as isElement, K as drag, L as trackPress } from "../../useBaseUiId-CYT1vFMG.js";
9
+ import { u as useValueChanged } from "../../useValueChanged-BnlOop8k.js";
10
+ import { C as CompositeList, u as useCompositeListItem } from "../../useCompositeListItem-DlAKWsHE.js";
11
+ import { f as fieldValidityMapping, u as useFormContext, a as useFieldRootContext, b as useLabelableContext, e as useRegisterFieldControl, c as useSetFieldFocused, d as useLabelableId } from "../../useSetFieldFocused-CcdG6FNp.js";
12
+ import { c as contains, a as activeElement, g as getTarget } from "../../constants-BaUKmVF_.js";
13
+ import { u as useValueAsRef, a as addEventListener } from "../../addEventListener-D-i9O6BG.js";
14
+ import { u as useAnimationFrame } from "../../useAnimationFrame-DqvuRtgK.js";
13
15
  import { u as useDirection } from "../../DirectionContext-Pb9yafF5.js";
14
- import { u as useIsHydrating, P as PrehydrationScript, s as script } from "../../PrehydrationScript--08s8Mfl.js";
16
+ import { u as useIsHydrating, P as PrehydrationScript, s as script } from "../../PrehydrationScript-B3u_PP2W.js";
15
17
  import { a as visuallyHidden } from "../../visuallyHidden-B6H2X3_Y.js";
16
- import { C as COMPOSITE_KEYS, H as HOME, E as END, P as PAGE_DOWN, a as PAGE_UP, A as ARROW_LEFT, b as ARROW_DOWN, c as ARROW_RIGHT, d as ARROW_UP } from "../../composite-BDBV1Jsx.js";
17
- function clamp(val, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) {
18
- return Math.max(min, Math.min(val, max));
19
- }
20
- function areArraysEqual(array1, array2, itemComparer = Object.is) {
21
- const {
22
- length
23
- } = array1;
24
- if (length !== array2.length) {
25
- return false;
26
- }
27
- for (let i = 0; i < length; i += 1) {
28
- if (!itemComparer(array1[i], array2[i])) {
29
- return false;
30
- }
31
- }
32
- return true;
33
- }
34
- function getDefaultLabelId(id) {
35
- return id == null ? void 0 : `${id}-label`;
36
- }
37
- function resolveAriaLabelledBy(fieldLabelId, localLabelId) {
38
- return fieldLabelId ?? localLabelId;
39
- }
18
+ import { s as stringifyLocale } from "../../stringifyLocale-DOx30wH1.js";
19
+ import { C as COMPOSITE_KEYS, H as HOME, E as END, P as PAGE_DOWN, a as PAGE_UP, A as ARROW_LEFT, b as ARROW_DOWN, c as ARROW_RIGHT, d as ARROW_UP } from "../../composite-IA--dSel.js";
40
20
  function asc(a, b) {
41
21
  return a - b;
42
22
  }
@@ -307,15 +287,6 @@ const SliderRoot = /* @__PURE__ */ React.forwardRef(function SliderRoot2(compone
307
287
  });
308
288
  });
309
289
  if (process.env.NODE_ENV !== "production") SliderRoot.displayName = "SliderRoot";
310
- function stringifyLocale(locale) {
311
- if (Array.isArray(locale)) {
312
- return locale.map((value) => stringifyLocale(value)).join(",");
313
- }
314
- if (locale == null) {
315
- return "";
316
- }
317
- return String(locale);
318
- }
319
290
  const cache = /* @__PURE__ */ new Map();
320
291
  function getFormatter(locale, options) {
321
292
  const optionsString = JSON.stringify({