@easypost/easy-ui 1.0.0-alpha.60 → 1.0.0-alpha.62
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.
- package/Badge/index.js +14 -14
- package/Badge/index.mjs +14 -14
- package/Banner/index.js +5 -5
- package/Banner/index.mjs +5 -5
- package/Button/index.js +1 -1
- package/Button/index.mjs +1 -1
- package/CHANGELOG.md +12 -0
- package/Calendar/CalendarCell.d.ts.map +1 -1
- package/Calendar/index.js +2 -40
- package/Calendar/index.mjs +2 -40
- package/Card/index.js +1 -1
- package/Card/index.mjs +1 -1
- package/Checkbox/index.js +1 -1
- package/Checkbox/index.mjs +1 -1
- package/CodeBlock/index.js +14 -14
- package/CodeBlock/index.mjs +16 -16
- package/CodeSnippet/index.js +1 -1
- package/CodeSnippet/index.mjs +1 -1
- package/DataGrid/index.js +69 -68
- package/DataGrid/index.mjs +75 -74
- package/DatePicker/DateField.d.ts +14 -0
- package/DatePicker/DateField.d.ts.map +1 -0
- package/DatePicker/DatePicker.d.ts +91 -0
- package/DatePicker/DatePicker.d.ts.map +1 -0
- package/DatePicker/DatePicker.stories.d.ts +14 -0
- package/DatePicker/DatePicker.stories.d.ts.map +1 -0
- package/DatePicker/DatePicker.test.d.ts +2 -0
- package/DatePicker/DatePicker.test.d.ts.map +1 -0
- package/DatePicker/DatePickerBase.d.ts +32 -0
- package/DatePicker/DatePickerBase.d.ts.map +1 -0
- package/DatePicker/DatePickerOverlay.d.ts +12 -0
- package/DatePicker/DatePickerOverlay.d.ts.map +1 -0
- package/DatePicker/DatePickerTrigger.d.ts +20 -0
- package/DatePicker/DatePickerTrigger.d.ts.map +1 -0
- package/DatePicker/index.d.ts +2 -0
- package/DatePicker/index.d.ts.map +1 -0
- package/DatePicker/index.js +275 -0
- package/DatePicker/index.mjs +275 -0
- package/DateRangePicker/DateRangePicker.d.ts +89 -0
- package/DateRangePicker/DateRangePicker.d.ts.map +1 -0
- package/DateRangePicker/DateRangePicker.stories.d.ts +14 -0
- package/DateRangePicker/DateRangePicker.stories.d.ts.map +1 -0
- package/DateRangePicker/DateRangePicker.test.d.ts +2 -0
- package/DateRangePicker/DateRangePicker.test.d.ts.map +1 -0
- package/DateRangePicker/index.d.ts +2 -0
- package/DateRangePicker/index.d.ts.map +1 -0
- package/DateRangePicker/index.js +434 -0
- package/DateRangePicker/index.mjs +434 -0
- package/Drawer/index.js +25 -24
- package/Drawer/index.mjs +22 -21
- package/DropdownButton/index.js +13 -13
- package/DropdownButton/index.mjs +13 -13
- package/EmptyStateCard/index.js +8 -8
- package/EmptyStateCard/index.mjs +8 -8
- package/FocusedProductLayout/index.js +25 -78
- package/FocusedProductLayout/index.mjs +24 -61
- package/ForgeLayout/ForgeLayout.d.ts +14 -22
- package/ForgeLayout/ForgeLayout.d.ts.map +1 -1
- package/ForgeLayout/ForgeLayout.stories.d.ts.map +1 -1
- package/ForgeLayout/ForgeLayoutControls.d.ts +38 -0
- package/ForgeLayout/ForgeLayoutControls.d.ts.map +1 -0
- package/ForgeLayout/ForgeLayoutHeader.d.ts +18 -0
- package/ForgeLayout/ForgeLayoutHeader.d.ts.map +1 -0
- package/ForgeLayout/index.js +426 -62
- package/ForgeLayout/index.mjs +429 -65
- package/FormLayout/index.js +5 -5
- package/FormLayout/index.mjs +5 -5
- package/HorizontalGrid/index.js +1 -1
- package/HorizontalGrid/index.mjs +1 -1
- package/HorizontalStack/index.js +1 -1
- package/HorizontalStack/index.mjs +1 -1
- package/Icon/index.js +1 -1
- package/Icon/index.mjs +1 -1
- package/IconButton/index.js +13 -13
- package/IconButton/index.mjs +13 -13
- package/InputField/index.js +1 -1
- package/InputField/index.mjs +1 -1
- package/KebabButton/index.js +1 -1
- package/KebabButton/index.mjs +1 -1
- package/Menu/index.js +1 -1
- package/Menu/index.mjs +1 -1
- package/Modal/index.js +26 -25
- package/Modal/index.mjs +23 -22
- package/NexusLayout/index.js +30 -30
- package/NexusLayout/index.mjs +32 -32
- package/Notification/index.js +1 -1
- package/Notification/index.mjs +1 -1
- package/Pagination/index.js +8 -8
- package/Pagination/index.mjs +8 -8
- package/PillGroup/index.js +17 -16
- package/PillGroup/index.mjs +25 -24
- package/ProductLayout/index.js +28 -27
- package/ProductLayout/index.mjs +26 -25
- package/Provider/index.js +2 -2
- package/Provider/index.mjs +2 -2
- package/RadioButtonGroup/index.js +5 -5
- package/RadioButtonGroup/index.mjs +8 -8
- package/RadioGroup/index.js +3 -332
- package/RadioGroup/index.mjs +3 -332
- package/RangeCalendar/RangeCalendar.test.d.ts +2 -1
- package/RangeCalendar/RangeCalendar.test.d.ts.map +1 -1
- package/RangeCalendar/index.js +2 -226
- package/RangeCalendar/index.mjs +2 -226
- package/SearchNav/index.js +50 -86
- package/SearchNav/index.mjs +50 -86
- package/SectionCard/index.js +7 -7
- package/SectionCard/index.mjs +7 -7
- package/Select/index.js +8 -7
- package/Select/index.mjs +6 -5
- package/SelectorErrorTooltip/index.js +1 -1
- package/SelectorErrorTooltip/index.mjs +1 -1
- package/Spinner/index.js +1 -1
- package/Spinner/index.mjs +1 -1
- package/SplitToggleCard/index.js +4 -4
- package/SplitToggleCard/index.mjs +4 -4
- package/Stepper/index.js +1 -1
- package/Stepper/index.mjs +1 -1
- package/TabNav/index.js +1 -1
- package/TabNav/index.mjs +1 -1
- package/TabPanels/index.js +4 -4
- package/TabPanels/index.mjs +10 -10
- package/Tabs/index.js +1 -1
- package/Tabs/index.mjs +1 -1
- package/Text/index.js +1 -1
- package/Text/index.mjs +1 -1
- package/TextField/index.js +2 -43
- package/TextField/index.mjs +2 -43
- package/Textarea/index.js +1 -1
- package/Textarea/index.mjs +1 -1
- package/Toggle/index.js +1 -1
- package/Toggle/index.mjs +1 -1
- package/ToggleCard/index.js +2 -2
- package/ToggleCard/index.mjs +2 -2
- package/Tooltip/index.js +1 -1
- package/Tooltip/index.mjs +1 -1
- package/UnstyledButton/index.js +1 -1
- package/UnstyledButton/index.mjs +1 -1
- package/VerticalNav/index.js +25 -25
- package/VerticalNav/index.mjs +28 -28
- package/VerticalStack/index.js +1 -1
- package/VerticalStack/index.mjs +1 -1
- package/__chunks__/ArrowBack-BFS-tCpV.mjs +41 -0
- package/__chunks__/ArrowBack-C_LSatif.js +57 -0
- package/__chunks__/{Button-D8vjHIx8.js → Button-BvLvcmfd.js} +7 -3
- package/__chunks__/{Button-D0YAQvKG.mjs → Button-CDRssWxC.mjs} +13 -9
- package/__chunks__/{Button-bGGT-c6v.mjs → Button-D7ivIUf4.mjs} +18 -18
- package/__chunks__/{Button-DuqSI9GS.js → Button-Dcxti-xS.js} +18 -18
- package/__chunks__/Calendar-D9bC6_UA.js +41 -0
- package/__chunks__/Calendar-WxiJzkoO.mjs +42 -0
- package/__chunks__/{CalendarBase-CiBPzvL4.js → CalendarBase-BYEUj-DL.js} +97 -25
- package/__chunks__/{CalendarBase-DbXh9rhk.mjs → CalendarBase-B_2qDiO8.mjs} +104 -32
- package/__chunks__/{Card-93kQP9IL.js → Card-B0ACXPm1.js} +12 -12
- package/__chunks__/{Card-DdHvpDEw.mjs → Card-CwZYA0Rd.mjs} +12 -12
- package/__chunks__/{Checkbox-MbPCVxqs.js → Checkbox-CO5WIkp8.js} +22 -22
- package/__chunks__/{Checkbox-BRrfKcFE.mjs → Checkbox-DGX3jXaj.mjs} +24 -24
- package/__chunks__/{CodeSnippet-D9ZZXVs3.js → CodeSnippet-CY3KR9Ex.js} +2 -2
- package/__chunks__/{CodeSnippet-xb-psm_O.mjs → CodeSnippet-DIWeGxFL.mjs} +2 -2
- package/__chunks__/DatePickerBase-BP_jPq4G.mjs +3152 -0
- package/__chunks__/DatePickerBase-C6kR9zvT.js +3166 -0
- package/__chunks__/{FocusScope-Co1hHX8R.js → FocusScope-DFE0IeGl.js} +1 -1
- package/__chunks__/{FocusScope-CEeqhVmO.mjs → FocusScope-Qg8vUhZ_.mjs} +5 -5
- package/__chunks__/{HelpMenu-CCHBb1Kr.mjs → HelpMenu-QryDILTE.mjs} +7 -7
- package/__chunks__/{HelpMenu-E6z6tRl8.js → HelpMenu-nmkAgUqs.js} +7 -7
- package/__chunks__/{HorizontalGrid-vw7R2Tld.mjs → HorizontalGrid-CX45xj2U.mjs} +1 -1
- package/__chunks__/{HorizontalGrid-B7ijxURd.js → HorizontalGrid-cSfGLAIn.js} +1 -1
- package/__chunks__/{HorizontalStack-Dx9zYaH0.mjs → HorizontalStack-CdtNq_TW.mjs} +1 -1
- package/__chunks__/{HorizontalStack-1g4N72TF.js → HorizontalStack-D4ecxt6R.js} +1 -1
- package/__chunks__/{Icon-QGDwoR1f.mjs → Icon-BNi1LKXX.mjs} +2 -2
- package/__chunks__/{Icon-oPEVg2C8.js → Icon-Pxk1cmPj.js} +2 -2
- package/__chunks__/InputCaption-BzH_oClR.js +60 -0
- package/__chunks__/InputCaption-DaOqqN-Z.mjs +61 -0
- package/__chunks__/{InputField-BI73lSp6.mjs → InputField-0omK7H0I.mjs} +11 -10
- package/__chunks__/{InputField-BGBRvVMR.js → InputField-Blilgkum.js} +9 -8
- package/__chunks__/InputIcon-CUhKpP7V.mjs +112 -0
- package/__chunks__/InputIcon-DGOX-4el.js +111 -0
- package/__chunks__/{KebabButton-DBLcfQI6.mjs → KebabButton-CrkSDYoR.mjs} +5 -5
- package/__chunks__/{KebabButton-C15-V-k2.js → KebabButton-DH5KZwlY.js} +5 -5
- package/__chunks__/{LiveAnnouncer-Bi_Y3tfX.mjs → LiveAnnouncer-BSV5-C0m.mjs} +5 -1
- package/__chunks__/{LiveAnnouncer-Dwkwacle.js → LiveAnnouncer-CzeNwq2D.js} +4 -0
- package/__chunks__/{Menu-BELtbX2b.mjs → Menu-CbEch8RV.mjs} +23 -21
- package/__chunks__/{Menu-Cuqxc1iw.js → Menu-D8tCyOf5.js} +36 -34
- package/__chunks__/{Notification-lqESwByD.mjs → Notification-BS8B_D0s.mjs} +20 -20
- package/__chunks__/{Notification-D90-75ZN.js → Notification-COhKVqOV.js} +17 -17
- package/__chunks__/{Spinner-D3LMSY80.js → NumberFormatter-CXW1Iqpu.js} +1 -79
- package/__chunks__/{Spinner-tHEG0z1g.mjs → NumberFormatter-p5KNJNTT.mjs} +1 -79
- package/__chunks__/{Overlay-ZinDp2HW.js → Overlay-Dmwy9VjC.js} +59 -3
- package/__chunks__/{Overlay-CuhLUuXt.mjs → Overlay-DyfvFsGi.mjs} +64 -8
- package/__chunks__/RadioGroup-CCObCqda.js +333 -0
- package/__chunks__/RadioGroup-DZxaIqD6.mjs +334 -0
- package/__chunks__/RangeCalendar-CPEW2_Ij.mjs +228 -0
- package/__chunks__/RangeCalendar-V_YZXfhI.js +227 -0
- package/__chunks__/Search-BY7IgEyX.js +57 -0
- package/__chunks__/Search-Cyblmqo5.mjs +41 -0
- package/__chunks__/{SelectOverlay-pFcbx7UM.js → SelectOverlay-CvCbJFfX.js} +38 -36
- package/__chunks__/{SelectOverlay-CadnQpV0.mjs → SelectOverlay-DdC6a9yW.mjs} +36 -34
- package/__chunks__/{SelectionManager-IO4G_cI2.mjs → SelectionManager-DCO_d3m1.mjs} +2 -2
- package/__chunks__/{SelectorErrorTooltip-Cfzpo7X3.js → SelectorErrorTooltip-BK76kp1j.js} +4 -4
- package/__chunks__/{SelectorErrorTooltip-CFlgzXu5.mjs → SelectorErrorTooltip-Cja4A8Yq.mjs} +4 -4
- package/__chunks__/Spinner-BOumHc9g.js +100 -0
- package/__chunks__/Spinner-D5Cnx9wv.mjs +101 -0
- package/__chunks__/{Stepper-B0w3sKYh.mjs → Stepper-B4VoJaxe.mjs} +28 -28
- package/__chunks__/{Stepper-Bbihngk4.js → Stepper-CZsNTl_A.js} +26 -26
- package/__chunks__/{TabNav-2W0d3JQ0.mjs → TabNav-C0dTC1c_.mjs} +1 -1
- package/__chunks__/{TabNav-BHETvib0.js → TabNav-DFFWhGpM.js} +1 -1
- package/__chunks__/{Tabs-9dihRp0n.js → Tabs-DbfPjHiY.js} +17 -17
- package/__chunks__/{Tabs-C-D794Gi.mjs → Tabs-MBY9JDS4.mjs} +19 -19
- package/__chunks__/{Text-CEI17LPu.js → Text-Bbhl1fdd.js} +34 -34
- package/__chunks__/{Text-D8wg72pq.mjs → Text-tpkE6IlH.mjs} +34 -34
- package/__chunks__/TextField-B57OAIEI.mjs +45 -0
- package/__chunks__/TextField-Mi3s9lvx.js +44 -0
- package/__chunks__/{Toggle-DlIBs_Za.mjs → Toggle-CHcQwbtX.mjs} +14 -14
- package/__chunks__/{Toggle-4oQhSggV.js → Toggle-Ctc8EPUL.js} +12 -12
- package/__chunks__/{Tooltip-7wXzqEZl.js → Tooltip-Cf1iqjg9.js} +11 -11
- package/__chunks__/{Tooltip-Cxv7qnVD.mjs → Tooltip-DdaxfuX_.mjs} +13 -13
- package/__chunks__/{UnstyledButton-B7BScs8i.mjs → UnstyledButton-CrSLb-W8.mjs} +2 -2
- package/__chunks__/{UnstyledButton-Dn8KZHdh.js → UnstyledButton-DfjYrePV.js} +1 -1
- package/__chunks__/{VerticalStack-BTB8fX9P.js → VerticalStack-BkqSVZuy.js} +3 -3
- package/__chunks__/{VerticalStack-HnwP17N3.mjs → VerticalStack-CeDKl8Ee.mjs} +3 -3
- package/__chunks__/{VisuallyHidden-BttNIgVC.mjs → VisuallyHidden-BC5PXI9q.mjs} +2 -2
- package/__chunks__/{ariaHideOutside-DNGR3Fo6.js → ariaHideOutside-B6WqGXJj.js} +1 -25
- package/__chunks__/{ariaHideOutside-DcIkumuG.mjs → ariaHideOutside-CxWZQtI1.mjs} +5 -29
- package/__chunks__/{context-DEwqildc.mjs → context-BZCcafjG.mjs} +1 -1
- package/__chunks__/{context-C6CFGY_J.js → context-CYcq9Zvo.js} +12 -0
- package/__chunks__/{context-CgOWZch5.mjs → context-EpOG85wC.mjs} +13 -1
- package/__chunks__/{focusSafely-Dw7K4rnX.mjs → focusSafely-BWGCG3W3.mjs} +3 -3
- package/__chunks__/{focusSafely-sLifanM7.js → focusSafely-BvrXUhlW.js} +1 -1
- package/__chunks__/{isVirtualEvent-BFRy7P_p.mjs → isVirtualEvent-BPCuFO54.mjs} +2 -2
- package/__chunks__/{mergeProps-T961Q1yJ.mjs → mergeProps-DSi85raC.mjs} +4 -4
- package/__chunks__/{scrollIntoView-GfnXaOCE.mjs → scrollIntoView-CZM0k-rp.mjs} +1 -1
- package/__chunks__/{useButton-B1CurEpI.mjs → useButton-BK6hwK02.mjs} +3 -3
- package/__chunks__/{useButton-DvulUoU2.js → useButton-DZ0C3d-K.js} +2 -2
- package/__chunks__/useCollator-B-keb3wA.mjs +13 -0
- package/__chunks__/useCollator-DGrSWVh4.js +12 -0
- package/__chunks__/{useDialog-DAYxqkKY.mjs → useDialog-c-C07qhw.mjs} +5 -29
- package/__chunks__/{useDialog-Dsqz1M_N.js → useDialog-wy_ru95P.js} +3 -27
- package/__chunks__/{useEdgeInterceptors-BCHFmpf_.js → useEdgeInterceptors-CnwnUfBU.js} +5 -5
- package/__chunks__/{useEdgeInterceptors-CVxwDmQ0.mjs → useEdgeInterceptors-ax9tmtdh.mjs} +5 -5
- package/__chunks__/{useEvent-C5RCZjKr.mjs → useEvent-B0fsKtsf.mjs} +1 -1
- package/__chunks__/{useField-DWmSslhe.mjs → useField-B6VplZ_n.mjs} +2 -2
- package/__chunks__/{useFocus-DDj4i8Xy.mjs → useFocus-BJ7JikEx.mjs} +2 -2
- package/__chunks__/{useFocusRing-BE_dgxH5.mjs → useFocusRing-YOWeCHgO.mjs} +3 -3
- package/__chunks__/{useFocusVisible-CXSIZSY_.mjs → useFocusVisible-ng1Hn25t.mjs} +2 -2
- package/__chunks__/{useFocusWithin-CDX8m0Wu.mjs → useFocusWithin-B-vQAW9V.mjs} +1 -1
- package/__chunks__/{useFocusable-BfXLORiH.js → useFocusable-8kJcp2yc.js} +5 -5
- package/__chunks__/{useFocusable-DD5dAIXt.mjs → useFocusable-CNor_Zjt.mjs} +4 -4
- package/__chunks__/{useFormReset-CmXMJVpO.mjs → useFormReset-DA1Lwdha.mjs} +1 -1
- package/__chunks__/{useFormValidation-C2DoIczP.js → useFormValidation-DYz5WFze.js} +22 -0
- package/__chunks__/{useFormValidation-gwcVryr8.mjs → useFormValidation-v2O6VL2V.mjs} +26 -4
- package/__chunks__/{useHasTabbableChild-CRCY1COZ.mjs → useHasTabbableChild-BKgmY6ej.mjs} +2 -2
- package/__chunks__/{useHasTabbableChild-C34XhtMr.js → useHasTabbableChild-Cs10TUUE.js} +1 -1
- package/__chunks__/{useHighlightSelectionDescription-CsB-ufoX.js → useHighlightSelectionDescription-CT5XKTz0.js} +2 -2
- package/__chunks__/{useHighlightSelectionDescription-DnW5KkSs.mjs → useHighlightSelectionDescription-Cebr-N8X.mjs} +4 -4
- package/__chunks__/{useLabel-C0Q8946u.mjs → useLabel-D37VV43W.mjs} +2 -2
- package/__chunks__/{useLabels-Bly436JP.mjs → useLabels-5f58TiCH.mjs} +1 -1
- package/__chunks__/{useLink-BOdtE_Mk.js → useLink-DSnaSTQf.js} +2 -2
- package/__chunks__/{useLink-B__d3N9L.mjs → useLink-xdTgcuUM.mjs} +3 -3
- package/__chunks__/{useListState-CH1PXfc5.mjs → useListState-AFrlkW73.mjs} +1 -1
- package/__chunks__/{useLocalizedStringFormatter-B5ons_mh.mjs → useLocalizedStringFormatter-BHXy3Wtu.mjs} +5 -2
- package/__chunks__/{useLocalizedStringFormatter-D74_5d4h.js → useLocalizedStringFormatter-CaF1VsOH.js} +3 -0
- package/__chunks__/useModalOverlay-BljLSPJ0.js +47 -0
- package/__chunks__/useModalOverlay-S0R2uVTX.mjs +48 -0
- package/__chunks__/useObjectRef-BOGMJ5vM.js +18 -0
- package/__chunks__/useObjectRef-wU82Pkgx.mjs +19 -0
- package/__chunks__/{useOverlayPosition-B31NgShQ.mjs → useOverlayPosition-BjK7cu6U.mjs} +4 -4
- package/__chunks__/{useOverlayPosition-ucZjuzzI.js → useOverlayPosition-CMvGmqVL.js} +1 -1
- package/__chunks__/useOverlayTrigger-DDcXdZOM.mjs +28 -0
- package/__chunks__/useOverlayTrigger-Dp7RXQ9B.js +27 -0
- package/__chunks__/{usePress-Dz8YYpge.js → usePress-DNETV97g.js} +2 -3
- package/__chunks__/{usePress-lFMUra6S.mjs → usePress-Db4pSZfY.mjs} +3 -4
- package/__chunks__/{useSelectableItem-BdD2_J2D.mjs → useSelectableItem-D61t76J1.mjs} +10 -10
- package/__chunks__/{useSelectableItem-BGvBbIwY.js → useSelectableItem-DpEX9QBc.js} +4 -4
- package/__chunks__/{useSelectableList-D0uxeze4.mjs → useSelectableList-BdG5I7cy.mjs} +4 -14
- package/__chunks__/{useSelectableList-DlkRkps4.js → useSelectableList-UkBCcTuC.js} +3 -13
- package/__chunks__/{useSingleSelectListState-BuqfjUxj.mjs → useSingleSelectListState-DuCUY6dR.mjs} +1 -1
- package/__chunks__/{useToggle-b0GY9dCM.mjs → useToggle-BDx-p-Zv.mjs} +4 -4
- package/__chunks__/{useToggle-D7gzXCXF.js → useToggle-BfpHeO2F.js} +2 -2
- package/__chunks__/{useTreeState-BZxhJy4m.mjs → useTreeState-w_raYfy2.mjs} +1 -1
- package/__chunks__/{useTriggerWidth-DEToHKD3.mjs → useTriggerWidth-CRz8zSDa.mjs} +6 -335
- package/__chunks__/{useTriggerWidth-C7OT3WI9.js → useTriggerWidth-Dj7C0lza.js} +4 -333
- package/__chunks__/utilities-CaBPUKEB.js +353 -0
- package/__chunks__/utilities-DASknbaa.mjs +354 -0
- package/__chunks__/{utils-XuD3IFpv.mjs → utils-D4ddhsBL.mjs} +58 -21
- package/__chunks__/{utils-DXO9zsKE.js → utils-DIF5XAA2.js} +55 -18
- package/package.json +1 -1
- package/style.css +1851 -1635
- package/__chunks__/InputIcon-BGgFAA4L.mjs +0 -168
- package/__chunks__/InputIcon-CUOJRoq8.js +0 -167
- package/__chunks__/useSyncRef-CPg4onT-.js +0 -13
- package/__chunks__/useSyncRef-CpaiKz0R.mjs +0 -14
|
@@ -1,9 +1,41 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
import React__default, { useCallback, useMemo, useRef, useContext, useEffect, createContext, useState } from "react";
|
|
2
33
|
import { $ as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./useControlledState-CFWhSD5C.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
34
|
+
import { c as $ae1eeba8b9eafd08$export$5165eccb35aaadb5, b as $e7801be82b4b2a53$export$4debdb1a3f0fa79e } from "./context-EpOG85wC.mjs";
|
|
35
|
+
import { $ as $3ef42575df84b30b$export$9d1611c77c2fe928, e as $b5e257d569688ac6$export$535bd6ca7f90a273, d as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c } from "./mergeProps-DSi85raC.mjs";
|
|
36
|
+
import { $ as $df56164dff5785e2$export$4338b53315abf666 } from "./useObjectRef-wU82Pkgx.mjs";
|
|
37
|
+
import { c as $9bf71ea28793e738$export$20e40289641fbbb6 } from "./FocusScope-Qg8vUhZ_.mjs";
|
|
5
38
|
import ReactDOM from "react-dom";
|
|
6
|
-
import { e as $b5e257d569688ac6$export$535bd6ca7f90a273, a as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c } from "./mergeProps-T961Q1yJ.mjs";
|
|
7
39
|
function $fc909762b330b746$export$61c6a8c84e605fb6(props) {
|
|
8
40
|
let [isOpen, setOpen] = $458b0a5536c1a7cf$export$40bfa8c7b0832715(props.isOpen, props.defaultOpen || false, props.onOpenChange);
|
|
9
41
|
const open = useCallback(() => {
|
|
@@ -30,6 +62,29 @@ function $fc909762b330b746$export$61c6a8c84e605fb6(props) {
|
|
|
30
62
|
toggle
|
|
31
63
|
};
|
|
32
64
|
}
|
|
65
|
+
const $f1ab8c75478c6f73$export$3351871ee4b288b8 = /* @__PURE__ */ React__default.forwardRef((_a, ref) => {
|
|
66
|
+
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
67
|
+
let isRegistered = useRef(false);
|
|
68
|
+
let prevContext = useContext($ae1eeba8b9eafd08$export$5165eccb35aaadb5);
|
|
69
|
+
ref = $df56164dff5785e2$export$4338b53315abf666(ref || (prevContext === null || prevContext === void 0 ? void 0 : prevContext.ref));
|
|
70
|
+
let context = $3ef42575df84b30b$export$9d1611c77c2fe928(prevContext || {}, __spreadProps(__spreadValues({}, props), {
|
|
71
|
+
ref,
|
|
72
|
+
register() {
|
|
73
|
+
isRegistered.current = true;
|
|
74
|
+
if (prevContext) prevContext.register();
|
|
75
|
+
}
|
|
76
|
+
}));
|
|
77
|
+
$e7801be82b4b2a53$export$4debdb1a3f0fa79e(prevContext, ref);
|
|
78
|
+
useEffect(() => {
|
|
79
|
+
if (!isRegistered.current) {
|
|
80
|
+
console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component.");
|
|
81
|
+
isRegistered.current = true;
|
|
82
|
+
}
|
|
83
|
+
}, []);
|
|
84
|
+
return /* @__PURE__ */ React__default.createElement($ae1eeba8b9eafd08$export$5165eccb35aaadb5.Provider, {
|
|
85
|
+
value: context
|
|
86
|
+
}, children);
|
|
87
|
+
});
|
|
33
88
|
function $f1ab8c75478c6f73$export$cf75428e0b9ed1ea({ children }) {
|
|
34
89
|
let context = useMemo(() => ({
|
|
35
90
|
register: () => {
|
|
@@ -101,9 +156,10 @@ function $337b884510726a0d$export$14c98a7594375490() {
|
|
|
101
156
|
]);
|
|
102
157
|
}
|
|
103
158
|
export {
|
|
104
|
-
$dd149f63282afbbf$export$
|
|
159
|
+
$dd149f63282afbbf$export$f6211563215e3b37 as $,
|
|
105
160
|
$337b884510726a0d$export$14c98a7594375490 as a,
|
|
106
|
-
$
|
|
107
|
-
$
|
|
108
|
-
$
|
|
161
|
+
$dd149f63282afbbf$export$18fc8428861184da as b,
|
|
162
|
+
$fc909762b330b746$export$61c6a8c84e605fb6 as c,
|
|
163
|
+
$337b884510726a0d$export$c6fdb837b070b4ff as d,
|
|
164
|
+
$f1ab8c75478c6f73$export$3351871ee4b288b8 as e
|
|
109
165
|
};
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
+
var __spreadValues = (a, b) => {
|
|
10
|
+
for (var prop in b || (b = {}))
|
|
11
|
+
if (__hasOwnProp.call(b, prop))
|
|
12
|
+
__defNormalProp(a, prop, b[prop]);
|
|
13
|
+
if (__getOwnPropSymbols)
|
|
14
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
+
if (__propIsEnum.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
}
|
|
18
|
+
return a;
|
|
19
|
+
};
|
|
20
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
|
+
var __objRest = (source, exclude) => {
|
|
22
|
+
var target = {};
|
|
23
|
+
for (var prop in source)
|
|
24
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
25
|
+
target[prop] = source[prop];
|
|
26
|
+
if (source != null && __getOwnPropSymbols)
|
|
27
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
28
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
}
|
|
31
|
+
return target;
|
|
32
|
+
};
|
|
33
|
+
const React = require("react");
|
|
34
|
+
const Text = require("./Text-Bbhl1fdd.js");
|
|
35
|
+
const HorizontalStack = require("./HorizontalStack-D4ecxt6R.js");
|
|
36
|
+
const SelectorErrorTooltip = require("./SelectorErrorTooltip-BK76kp1j.js");
|
|
37
|
+
const utilities_css = require("../utilities/css.js");
|
|
38
|
+
const mergeProps = require("./mergeProps-DniMwM6P.js");
|
|
39
|
+
const filterDOMProps = require("./filterDOMProps-D3iOHP0H.js");
|
|
40
|
+
const useFormReset = require("./useFormReset-Bgj93eR3.js");
|
|
41
|
+
const useFocusable = require("./useFocusable-8kJcp2yc.js");
|
|
42
|
+
const useFormValidation = require("./useFormValidation-DYz5WFze.js");
|
|
43
|
+
const usePress = require("./usePress-DNETV97g.js");
|
|
44
|
+
const useFocusRing = require("./useFocusRing-DFRFvht_.js");
|
|
45
|
+
const useHover = require("./useHover-BIKwjrCT.js");
|
|
46
|
+
const useControlledState = require("./useControlledState-mnKBd6Uc.js");
|
|
47
|
+
const FocusScope = require("./FocusScope-DFE0IeGl.js");
|
|
48
|
+
const useField = require("./useField-BJW_bXVD.js");
|
|
49
|
+
const useFocusWithin = require("./useFocusWithin-C1ioGWec.js");
|
|
50
|
+
const context = require("./context-D3NeXov7.js");
|
|
51
|
+
let $a54cdc5c1942b639$var$instance = Math.round(Math.random() * 1e10);
|
|
52
|
+
let $a54cdc5c1942b639$var$i = 0;
|
|
53
|
+
function $a54cdc5c1942b639$export$bca9d026f8e704eb(props) {
|
|
54
|
+
let name = React.useMemo(() => props.name || `radio-group-${$a54cdc5c1942b639$var$instance}-${++$a54cdc5c1942b639$var$i}`, [
|
|
55
|
+
props.name
|
|
56
|
+
]);
|
|
57
|
+
var _props_defaultValue;
|
|
58
|
+
let [selectedValue, setSelected] = useControlledState.$458b0a5536c1a7cf$export$40bfa8c7b0832715(props.value, (_props_defaultValue = props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : null, props.onChange);
|
|
59
|
+
let [lastFocusedValue, setLastFocusedValue] = React.useState(null);
|
|
60
|
+
let validation = useFormValidation.$e5be200c675c3b3a$export$fc1a364ae1f3ff10(__spreadProps(__spreadValues({}, props), {
|
|
61
|
+
value: selectedValue
|
|
62
|
+
}));
|
|
63
|
+
let setSelectedValue = (value) => {
|
|
64
|
+
if (!props.isReadOnly && !props.isDisabled) {
|
|
65
|
+
setSelected(value);
|
|
66
|
+
validation.commitValidation();
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
let isInvalid = validation.displayValidation.isInvalid;
|
|
70
|
+
return __spreadProps(__spreadValues({}, validation), {
|
|
71
|
+
name,
|
|
72
|
+
selectedValue,
|
|
73
|
+
setSelectedValue,
|
|
74
|
+
lastFocusedValue,
|
|
75
|
+
setLastFocusedValue,
|
|
76
|
+
isDisabled: props.isDisabled || false,
|
|
77
|
+
isReadOnly: props.isReadOnly || false,
|
|
78
|
+
isRequired: props.isRequired || false,
|
|
79
|
+
validationState: props.validationState || (isInvalid ? "invalid" : null),
|
|
80
|
+
isInvalid
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
const $884aeceb3d67f00f$export$37b65e5b5444d35c = /* @__PURE__ */ new WeakMap();
|
|
84
|
+
function $0d5c49892c1215da$export$37b0961d2f4751e2(props, state, ref) {
|
|
85
|
+
let { value, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby } = props;
|
|
86
|
+
const isDisabled = props.isDisabled || state.isDisabled;
|
|
87
|
+
let hasChildren = children != null;
|
|
88
|
+
let hasAriaLabel = ariaLabel != null || ariaLabelledby != null;
|
|
89
|
+
if (!hasChildren && !hasAriaLabel) console.warn("If you do not provide children, you must specify an aria-label for accessibility");
|
|
90
|
+
let checked = state.selectedValue === value;
|
|
91
|
+
let onChange = (e) => {
|
|
92
|
+
e.stopPropagation();
|
|
93
|
+
state.setSelectedValue(value);
|
|
94
|
+
};
|
|
95
|
+
let { pressProps, isPressed } = usePress.$f6c31cce2adf654f$export$45712eceda6fad21({
|
|
96
|
+
isDisabled
|
|
97
|
+
});
|
|
98
|
+
let { pressProps: labelProps, isPressed: isLabelPressed } = usePress.$f6c31cce2adf654f$export$45712eceda6fad21({
|
|
99
|
+
isDisabled,
|
|
100
|
+
onPress() {
|
|
101
|
+
state.setSelectedValue(value);
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
let { focusableProps } = useFocusable.$e6afbd83fe6ebbd2$export$4c014de7c8940b4c(mergeProps.$3ef42575df84b30b$export$9d1611c77c2fe928(props, {
|
|
105
|
+
onFocus: () => state.setLastFocusedValue(value)
|
|
106
|
+
}), ref);
|
|
107
|
+
let interactions = mergeProps.$3ef42575df84b30b$export$9d1611c77c2fe928(pressProps, focusableProps);
|
|
108
|
+
let domProps = filterDOMProps.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
109
|
+
labelable: true
|
|
110
|
+
});
|
|
111
|
+
let tabIndex = -1;
|
|
112
|
+
if (state.selectedValue != null) {
|
|
113
|
+
if (state.selectedValue === value) tabIndex = 0;
|
|
114
|
+
} else if (state.lastFocusedValue === value || state.lastFocusedValue == null) tabIndex = 0;
|
|
115
|
+
if (isDisabled) tabIndex = void 0;
|
|
116
|
+
let { name, descriptionId, errorMessageId, validationBehavior } = $884aeceb3d67f00f$export$37b65e5b5444d35c.get(state);
|
|
117
|
+
useFormReset.$99facab73266f662$export$5add1d006293d136(ref, state.selectedValue, state.setSelectedValue);
|
|
118
|
+
useFormValidation.$e93e671b31057976$export$b8473d3665f3a75a({
|
|
119
|
+
validationBehavior
|
|
120
|
+
}, state, ref);
|
|
121
|
+
return {
|
|
122
|
+
labelProps: mergeProps.$3ef42575df84b30b$export$9d1611c77c2fe928(labelProps, {
|
|
123
|
+
onClick: (e) => e.preventDefault()
|
|
124
|
+
}),
|
|
125
|
+
inputProps: mergeProps.$3ef42575df84b30b$export$9d1611c77c2fe928(domProps, __spreadProps(__spreadValues({}, interactions), {
|
|
126
|
+
type: "radio",
|
|
127
|
+
name,
|
|
128
|
+
tabIndex,
|
|
129
|
+
disabled: isDisabled,
|
|
130
|
+
required: state.isRequired && validationBehavior === "native",
|
|
131
|
+
checked,
|
|
132
|
+
value,
|
|
133
|
+
onChange,
|
|
134
|
+
"aria-describedby": [
|
|
135
|
+
props["aria-describedby"],
|
|
136
|
+
state.isInvalid ? errorMessageId : null,
|
|
137
|
+
descriptionId
|
|
138
|
+
].filter(Boolean).join(" ") || void 0
|
|
139
|
+
})),
|
|
140
|
+
isDisabled,
|
|
141
|
+
isSelected: checked,
|
|
142
|
+
isPressed: isPressed || isLabelPressed
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
function $430f30ed08ec25fa$export$62b9571f283ff5c2(props, state) {
|
|
146
|
+
let { name, isReadOnly, isRequired, isDisabled, orientation = "vertical", validationBehavior = "aria" } = props;
|
|
147
|
+
let { direction } = context.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
|
|
148
|
+
let { isInvalid, validationErrors, validationDetails } = state.displayValidation;
|
|
149
|
+
let { labelProps, fieldProps, descriptionProps, errorMessageProps } = useField.$2baaea4c71418dea$export$294aa081a6c6f55d(__spreadProps(__spreadValues({}, props), {
|
|
150
|
+
// Radio group is not an HTML input element so it
|
|
151
|
+
// shouldn't be labeled by a <label> element.
|
|
152
|
+
labelElementType: "span",
|
|
153
|
+
isInvalid: state.isInvalid,
|
|
154
|
+
errorMessage: props.errorMessage || validationErrors
|
|
155
|
+
}));
|
|
156
|
+
let domProps = filterDOMProps.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
157
|
+
labelable: true
|
|
158
|
+
});
|
|
159
|
+
let { focusWithinProps } = useFocusWithin.$9ab94262bd0047c7$export$420e68273165f4ec({
|
|
160
|
+
onBlurWithin(e) {
|
|
161
|
+
var _props_onBlur;
|
|
162
|
+
(_props_onBlur = props.onBlur) === null || _props_onBlur === void 0 ? void 0 : _props_onBlur.call(props, e);
|
|
163
|
+
if (!state.selectedValue) state.setLastFocusedValue(null);
|
|
164
|
+
},
|
|
165
|
+
onFocusWithin: props.onFocus,
|
|
166
|
+
onFocusWithinChange: props.onFocusChange
|
|
167
|
+
});
|
|
168
|
+
let onKeyDown = (e) => {
|
|
169
|
+
let nextDir;
|
|
170
|
+
switch (e.key) {
|
|
171
|
+
case "ArrowRight":
|
|
172
|
+
if (direction === "rtl" && orientation !== "vertical") nextDir = "prev";
|
|
173
|
+
else nextDir = "next";
|
|
174
|
+
break;
|
|
175
|
+
case "ArrowLeft":
|
|
176
|
+
if (direction === "rtl" && orientation !== "vertical") nextDir = "next";
|
|
177
|
+
else nextDir = "prev";
|
|
178
|
+
break;
|
|
179
|
+
case "ArrowDown":
|
|
180
|
+
nextDir = "next";
|
|
181
|
+
break;
|
|
182
|
+
case "ArrowUp":
|
|
183
|
+
nextDir = "prev";
|
|
184
|
+
break;
|
|
185
|
+
default:
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
e.preventDefault();
|
|
189
|
+
let walker = FocusScope.$9bf71ea28793e738$export$2d6ec8fc375ceafa(e.currentTarget, {
|
|
190
|
+
from: e.target
|
|
191
|
+
});
|
|
192
|
+
let nextElem;
|
|
193
|
+
if (nextDir === "next") {
|
|
194
|
+
nextElem = walker.nextNode();
|
|
195
|
+
if (!nextElem) {
|
|
196
|
+
walker.currentNode = e.currentTarget;
|
|
197
|
+
nextElem = walker.firstChild();
|
|
198
|
+
}
|
|
199
|
+
} else {
|
|
200
|
+
nextElem = walker.previousNode();
|
|
201
|
+
if (!nextElem) {
|
|
202
|
+
walker.currentNode = e.currentTarget;
|
|
203
|
+
nextElem = walker.lastChild();
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
if (nextElem) {
|
|
207
|
+
nextElem.focus();
|
|
208
|
+
state.setSelectedValue(nextElem.value);
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
let groupName = mergeProps.$bdb11010cef70236$export$f680877a34711e37(name);
|
|
212
|
+
$884aeceb3d67f00f$export$37b65e5b5444d35c.set(state, {
|
|
213
|
+
name: groupName,
|
|
214
|
+
descriptionId: descriptionProps.id,
|
|
215
|
+
errorMessageId: errorMessageProps.id,
|
|
216
|
+
validationBehavior
|
|
217
|
+
});
|
|
218
|
+
return {
|
|
219
|
+
radioGroupProps: mergeProps.$3ef42575df84b30b$export$9d1611c77c2fe928(domProps, __spreadValues(__spreadValues({
|
|
220
|
+
// https://www.w3.org/TR/wai-aria-1.2/#radiogroup
|
|
221
|
+
role: "radiogroup",
|
|
222
|
+
onKeyDown,
|
|
223
|
+
"aria-invalid": state.isInvalid || void 0,
|
|
224
|
+
"aria-errormessage": props["aria-errormessage"],
|
|
225
|
+
"aria-readonly": isReadOnly || void 0,
|
|
226
|
+
"aria-required": isRequired || void 0,
|
|
227
|
+
"aria-disabled": isDisabled || void 0,
|
|
228
|
+
"aria-orientation": orientation
|
|
229
|
+
}, fieldProps), focusWithinProps)),
|
|
230
|
+
labelProps,
|
|
231
|
+
descriptionProps,
|
|
232
|
+
errorMessageProps,
|
|
233
|
+
isInvalid,
|
|
234
|
+
validationErrors,
|
|
235
|
+
validationDetails
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
const RadioGroupContext = React.createContext(null);
|
|
239
|
+
const useRadioGroupContext = () => {
|
|
240
|
+
const radioGroupContext = React.useContext(RadioGroupContext);
|
|
241
|
+
if (!radioGroupContext) {
|
|
242
|
+
throw new Error("Must be within a RadioGroup");
|
|
243
|
+
}
|
|
244
|
+
return radioGroupContext;
|
|
245
|
+
};
|
|
246
|
+
const RadioGroupItem$1 = "_RadioGroupItem_g11br_5";
|
|
247
|
+
const label = "_label_g11br_11";
|
|
248
|
+
const radioOuter = "_radioOuter_g11br_29";
|
|
249
|
+
const radioInner = "_radioInner_g11br_30";
|
|
250
|
+
const focusVisible = "_focusVisible_g11br_44";
|
|
251
|
+
const selected = "_selected_g11br_63";
|
|
252
|
+
const invalid = "_invalid_g11br_67";
|
|
253
|
+
const disabled = "_disabled_g11br_71";
|
|
254
|
+
const hovered = "_hovered_g11br_83";
|
|
255
|
+
const readOnly = "_readOnly_g11br_83";
|
|
256
|
+
const styles$1 = {
|
|
257
|
+
RadioGroupItem: RadioGroupItem$1,
|
|
258
|
+
label,
|
|
259
|
+
radioOuter,
|
|
260
|
+
radioInner,
|
|
261
|
+
focusVisible,
|
|
262
|
+
selected,
|
|
263
|
+
invalid,
|
|
264
|
+
disabled,
|
|
265
|
+
hovered,
|
|
266
|
+
readOnly
|
|
267
|
+
};
|
|
268
|
+
function RadioGroupItem(props) {
|
|
269
|
+
const { children, errorText, validationState } = props;
|
|
270
|
+
const ref = React.useRef(null);
|
|
271
|
+
const state = useRadioGroupContext();
|
|
272
|
+
const { inputProps, isSelected, isDisabled } = $0d5c49892c1215da$export$37b0961d2f4751e2(props, state, ref);
|
|
273
|
+
const { isFocusVisible, focusProps } = useFocusRing.$f7dceffc5ad7768b$export$4e328f61c538687f();
|
|
274
|
+
const { isHovered, hoverProps } = useHover.$6179b936705e76d3$export$ae780daf29e6d456(props);
|
|
275
|
+
const className = utilities_css.classNames(styles$1.RadioGroupItem, isSelected && styles$1.selected, isDisabled && styles$1.disabled, isFocusVisible && styles$1.focusVisible, isHovered && styles$1.hovered, validationState === "invalid" && styles$1.invalid);
|
|
276
|
+
const textColor = isDisabled ? "neutral.300" : validationState === "invalid" ? "negative.600" : "primary.800";
|
|
277
|
+
return React.createElement("div", {
|
|
278
|
+
className
|
|
279
|
+
}, React.createElement(HorizontalStack.HorizontalStack, {
|
|
280
|
+
gap: "1",
|
|
281
|
+
blockAlign: "center"
|
|
282
|
+
}, React.createElement("label", {
|
|
283
|
+
className: styles$1.label
|
|
284
|
+
}, React.createElement(HorizontalStack.HorizontalStack, __spreadValues({
|
|
285
|
+
blockAlign: "start",
|
|
286
|
+
gap: "1",
|
|
287
|
+
wrap: false
|
|
288
|
+
}, hoverProps), React.createElement("input", __spreadProps(__spreadValues(__spreadValues({
|
|
289
|
+
"aria-invalid": validationState === "invalid"
|
|
290
|
+
}, inputProps), focusProps), {
|
|
291
|
+
className: styles$1.input,
|
|
292
|
+
ref
|
|
293
|
+
})), React.createElement("span", {
|
|
294
|
+
className: styles$1.radioOuter
|
|
295
|
+
}, React.createElement("span", {
|
|
296
|
+
className: styles$1.radioInner
|
|
297
|
+
})), React.createElement(Text.Text, {
|
|
298
|
+
variant: "body1",
|
|
299
|
+
color: textColor
|
|
300
|
+
}, children))), validationState === "invalid" && errorText && React.createElement(SelectorErrorTooltip.SelectorErrorTooltip, {
|
|
301
|
+
content: errorText
|
|
302
|
+
})));
|
|
303
|
+
}
|
|
304
|
+
const RadioGroup$1 = "_RadioGroup_wn0sd_5";
|
|
305
|
+
const list = "_list_wn0sd_14";
|
|
306
|
+
const styles = {
|
|
307
|
+
RadioGroup: RadioGroup$1,
|
|
308
|
+
list
|
|
309
|
+
};
|
|
310
|
+
function RadioGroupContainer(props) {
|
|
311
|
+
const { children, label: label2 } = props;
|
|
312
|
+
const state = $a54cdc5c1942b639$export$bca9d026f8e704eb(props);
|
|
313
|
+
const { radioGroupProps, labelProps } = $430f30ed08ec25fa$export$62b9571f283ff5c2(props, state);
|
|
314
|
+
return React.createElement("fieldset", __spreadValues({
|
|
315
|
+
className: styles.RadioGroup
|
|
316
|
+
}, radioGroupProps), label2 && React.createElement("div", null, React.createElement(Text.Text, __spreadValues({
|
|
317
|
+
as: "legend",
|
|
318
|
+
variant: "subtitle1",
|
|
319
|
+
color: "gray.bold"
|
|
320
|
+
}, labelProps), label2)), React.createElement(RadioGroupContext.Provider, {
|
|
321
|
+
value: state
|
|
322
|
+
}, children));
|
|
323
|
+
}
|
|
324
|
+
function RadioGroup(props) {
|
|
325
|
+
const _a = props, { children } = _a, containerProps = __objRest(_a, ["children"]);
|
|
326
|
+
return React.createElement(RadioGroupContainer, __spreadValues({}, containerProps), React.createElement("div", {
|
|
327
|
+
className: styles.list
|
|
328
|
+
}, children));
|
|
329
|
+
}
|
|
330
|
+
RadioGroup.Container = RadioGroupContainer;
|
|
331
|
+
RadioGroup.Item = RadioGroupItem;
|
|
332
|
+
exports.RadioGroup = RadioGroup;
|
|
333
|
+
exports.useRadioGroupContext = useRadioGroupContext;
|