@eightshift/ui-components 7.2.0 → 7.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/dist/Autocomplete-pLMPWMFq.js +451 -0
  2. package/dist/Button-Biwg7zwt.js +223 -0
  3. package/dist/Dialog-C1sh8jbh.js +2474 -0
  4. package/dist/{Disclosure-NYWFw9RJ.js → Disclosure-B_SHgiUz.js} +50 -51
  5. package/dist/FocusScope-lGkM8AO8.js +734 -0
  6. package/dist/Form-BxIJCHYd.js +5 -0
  7. package/dist/Heading-B2EsUuu6.js +16 -0
  8. package/dist/{Hidden-8TB37dpK.js → Hidden-DYY00jLm.js} +10 -10
  9. package/dist/I18nProvider-Cm6dj5jY.js +93 -0
  10. package/dist/Label-B1TkoVOG.js +17 -0
  11. package/dist/ListBox-BquE0m8z.js +584 -0
  12. package/dist/{NumberFormatter-m5VW6MTK.js → NumberFormatter-JHF0Tadk.js} +24 -26
  13. package/dist/PortalProvider-BYcv24il.js +13 -0
  14. package/dist/RadioGroup-BxjLooWU.js +324 -0
  15. package/dist/SearchField-BkAU0HLm.js +322 -0
  16. package/dist/SelectionIndicator-Bx_EYBXD.js +13 -0
  17. package/dist/{Slider-DW1RuMVp.js → Slider-DSv6fyZ6.js} +321 -363
  18. package/dist/Text-C8pfwn0W.js +16 -0
  19. package/dist/{VisuallyHidden-CfsnJHZb.js → VisuallyHidden-KcXlGa5p.js} +12 -12
  20. package/dist/{animation-Bd2peown.js → animation-BJ-2VKdB.js} +12 -12
  21. package/dist/assets/fonts/google-sans-flex-latin-ext-full-normal.woff2 +0 -0
  22. package/dist/assets/fonts/google-sans-flex-latin-full-normal.woff2 +0 -0
  23. package/dist/assets/fonts/google-sans-flex-symbols-full-normal.woff2 +0 -0
  24. package/dist/assets/style-admin.css +1 -1
  25. package/dist/assets/style-editor.css +1 -1
  26. package/dist/assets/style.css +1 -1
  27. package/dist/{button-D9cbyHeZ.js → button-CawAzlko.js} +21 -73
  28. package/dist/{checkbox-BO5RZmO8.js → checkbox-t7VrqXv2.js} +59 -62
  29. package/dist/{color-swatch-D2ZBkuTt.js → color-swatch-gU09x9Ga.js} +417 -414
  30. package/dist/components/base-control/base-control.js +2 -2
  31. package/dist/components/base-control/container.js +1 -1
  32. package/dist/components/breakpoint-preview/breakpoint-preview.js +1 -1
  33. package/dist/components/button/button.js +1 -1
  34. package/dist/components/checkbox/checkbox.js +1 -1
  35. package/dist/components/color-pickers/color-picker.js +2 -2
  36. package/dist/components/color-pickers/color-swatch.js +1 -1
  37. package/dist/components/color-pickers/gradient-editor.js +1 -1
  38. package/dist/components/color-pickers/solid-color-picker.js +1 -1
  39. package/dist/components/component-toggle/component-toggle.js +4 -4
  40. package/dist/components/container-panel/container-panel.js +5 -5
  41. package/dist/components/draggable/draggable-handle.js +1 -1
  42. package/dist/components/draggable/draggable.js +1 -1
  43. package/dist/components/draggable-list/draggable-list-item.js +1 -1
  44. package/dist/components/draggable-list/draggable-list.js +2 -2
  45. package/dist/components/expandable/expandable.js +7 -7
  46. package/dist/components/index.js +15 -15
  47. package/dist/components/input-field/input-field.js +1 -1
  48. package/dist/components/item-collection/item-collection.js +1 -1
  49. package/dist/components/link-input/link-input.js +1 -1
  50. package/dist/components/matrix-align/matrix-align.js +5 -5
  51. package/dist/components/menu/menu.js +11 -11
  52. package/dist/components/modal/modal.js +1 -1
  53. package/dist/components/number-picker/number-picker.js +1 -1
  54. package/dist/components/option-select/option-select.js +3 -3
  55. package/dist/components/options-panel/options-panel.js +3 -3
  56. package/dist/components/placeholders/file-picker-shell.js +1 -1
  57. package/dist/components/placeholders/file-placeholder.js +1 -1
  58. package/dist/components/popover/popover.js +6 -6
  59. package/dist/components/portal-provider/portal-provider.js +2 -2
  60. package/dist/components/radio/radio.js +9 -9
  61. package/dist/components/repeater/repeater-item.js +2 -2
  62. package/dist/components/repeater/repeater.js +3 -3
  63. package/dist/components/responsive/mini-responsive.js +6 -6
  64. package/dist/components/responsive/responsive-legacy.js +5 -5
  65. package/dist/components/responsive/responsive.js +5 -5
  66. package/dist/components/responsive-preview/responsive-preview.js +2 -2
  67. package/dist/components/select/async-multi-select.js +27 -26
  68. package/dist/components/select/async-select.js +27 -26
  69. package/dist/components/select/multi-select.js +33 -32
  70. package/dist/components/select/shared.js +1 -1
  71. package/dist/components/select/single-select.js +33 -32
  72. package/dist/components/select/styles.js +1 -1
  73. package/dist/components/slider/column-config-slider.js +8 -8
  74. package/dist/components/slider/slider.js +8 -8
  75. package/dist/components/slider/utils.js +1 -1
  76. package/dist/components/smart-image/smart-image.js +1 -1
  77. package/dist/components/tabs/tabs.js +1 -1
  78. package/dist/components/toggle/switch.js +1 -1
  79. package/dist/components/toggle/toggle.js +3 -3
  80. package/dist/components/toggle-button/toggle-button.js +1 -1
  81. package/dist/components/tooltip/tooltip.js +1 -1
  82. package/dist/{draggable-CTDVJ4zd.js → draggable-Cxv-OueQ.js} +1 -1
  83. package/dist/filterDOMProps-BfW758QC.js +69 -0
  84. package/dist/{gradient-editor-xfxA_s9a.js → gradient-editor-CInqVF8v.js} +6 -11
  85. package/dist/icons/index.js +1 -1
  86. package/dist/icons/jsx-svg.js +1 -1
  87. package/dist/index.js +15 -15
  88. package/dist/{input-field-_OCWbftf.js → input-field-BdFrxQ-R.js} +46 -47
  89. package/dist/{jsx-svg-BRJ4n3pD.js → jsx-svg-DT1SBWuP.js} +6 -12
  90. package/dist/keyboard-CT41mQzR.js +55 -0
  91. package/dist/{link-input-Bh8G7Urm.js → link-input-BDFhSSvH.js} +324 -356
  92. package/dist/{modal-snrElwty.js → modal-CJDaBdPh.js} +100 -92
  93. package/dist/{number-ZZIxJukn.js → number-MWRvGfyE.js} +10 -10
  94. package/dist/{number-picker-Dhtx4409.js → number-picker-BrxrB-xq.js} +43 -42
  95. package/dist/{shared-BiWZjrGF.js → shared-CI4kcnm8.js} +482 -502
  96. package/dist/{smart-image-CBNbxJ57.js → smart-image-eGdMu9s9.js} +2 -2
  97. package/dist/{solid-color-picker-DukArNH-.js → solid-color-picker-DXgX-OAm.js} +926 -935
  98. package/dist/{switch-DmsvyQPa.js → switch-DNHFoCCx.js} +28 -28
  99. package/dist/{tabs-DaIUEc0g.js → tabs-C2tPOEYr.js} +150 -153
  100. package/dist/textSelection-BhX_2zV9.js +45 -0
  101. package/dist/{toggle-button-BlzUGfGy.js → toggle-button-DYDp11rq.js} +35 -35
  102. package/dist/{tooltip-BzJzYlcc.js → tooltip-C-hT6tN9.js} +162 -162
  103. package/dist/{useAsyncList-BNzwKoX4.js → useAsyncList-DsOh1xIx.js} +54 -74
  104. package/dist/{useButton-ra1ZSZ4z.js → useButton-BMZc4fTX.js} +11 -11
  105. package/dist/{SelectionManager-B8lLv6Ue.js → useCollection-CBVYSuGz.js} +1689 -1777
  106. package/dist/{useEvent-DkZVfgsS.js → useEvent-ypAU33vv.js} +5 -5
  107. package/dist/useField-BXf__jxy.js +32 -0
  108. package/dist/{useFilter-OiMnf6sb.js → useFilter-CfKEbIwL.js} +5 -5
  109. package/dist/{useFocusRing-DuYL4cdO.js → useFocusRing-BgYY-7ko.js} +23 -23
  110. package/dist/useFormReset-BuMc_O4y.js +17 -0
  111. package/dist/{FieldError-BWDbP5Db.js → useFormValidation-BcME9D0E.js} +63 -66
  112. package/dist/useHover-lyApu3ba.js +975 -0
  113. package/dist/{useLabel-2EohW5l6.js → useLabel-Rv8cIIKk.js} +8 -8
  114. package/dist/{useLabels-B2p7RXi5.js → useLabels-xOYtkA8o.js} +5 -5
  115. package/dist/useListState-u6DfeXHi.js +135 -0
  116. package/dist/{useLocalizedStringFormatter-Dv2diN3k.js → useLocalizedStringFormatter-CR-bmorj.js} +45 -45
  117. package/dist/{useNumberField-2xbi3jRV.js → useNumberFieldState-xL-ecwNz.js} +665 -619
  118. package/dist/useNumberFormatter-CR1PAFPG.js +10 -0
  119. package/dist/useOverlayTriggerState-AeCx45Gv.js +551 -0
  120. package/dist/usePress-Dnx5rBoD.js +593 -0
  121. package/dist/useTextField-BW3ZwGyz.js +159 -0
  122. package/dist/{useToggle-ecIirvIM.js → useToggle-BF5wptMP.js} +19 -20
  123. package/dist/useToggleState-D5P01lch.js +22 -0
  124. package/dist/useToolbar-BT25-MJg.js +55 -0
  125. package/dist/utilities/debounce-throttle.js +1 -1
  126. package/dist/utilities/es-dash.js +1 -1
  127. package/dist/utilities/index.js +3 -3
  128. package/dist/{utils-B_uiqNa4.js → utils-JFcCNFzy.js} +121 -122
  129. package/package.json +18 -18
  130. package/dist/Button-h6xF_WrP.js +0 -225
  131. package/dist/Dialog-i5VLQw1o.js +0 -2488
  132. package/dist/FocusScope-CgwbGOBB.js +0 -746
  133. package/dist/Form-DTMkbrQY.js +0 -5
  134. package/dist/Heading-Hol-wS_B.js +0 -16
  135. package/dist/Input-BURqyJXW.js +0 -161
  136. package/dist/Label-DFXXxMKY.js +0 -17
  137. package/dist/ListBox-B21SgugS.js +0 -601
  138. package/dist/OverlayArrow-BoloUPQM.js +0 -573
  139. package/dist/PortalProvider-DinZZCKX.js +0 -14
  140. package/dist/RSPContexts-C_z0bI8W.js +0 -12
  141. package/dist/RadioGroup-BwlGtCja.js +0 -329
  142. package/dist/SearchField-DR_I4_yn.js +0 -765
  143. package/dist/SelectionIndicator-31L6EI9F.js +0 -13
  144. package/dist/Text-O6VBBDlP.js +0 -16
  145. package/dist/context-C-XNeJ_l.js +0 -93
  146. package/dist/filterDOMProps-_2_3GD-K.js +0 -69
  147. package/dist/textSelection-Dv6WPj0Z.js +0 -45
  148. package/dist/useField-D0WrzR2F.js +0 -32
  149. package/dist/useFormReset-DdkykzAn.js +0 -18
  150. package/dist/useHover-qaMm3XFO.js +0 -982
  151. package/dist/useListState-CD_5vfyy.js +0 -147
  152. package/dist/useNumberFormatter-C2Cm2mNj.js +0 -10
  153. package/dist/usePress-ZP1TjkFf.js +0 -678
  154. package/dist/useToggleState-IIDbiKPl.js +0 -23
  155. /package/dist/{List-DWlgW2Ex.js → List---tsVJlI.js} +0 -0
  156. /package/dist/{build-module-Bsx62nlm.js → build-module-K6vi4xE0.js} +0 -0
  157. /package/dist/{debounce-throttle-DXxSAKpq.js → debounce-throttle-LSPAPFtq.js} +0 -0
  158. /package/dist/{dist-2gkv7_1U.js → dist-jw8wvxoG.js} +0 -0
  159. /package/dist/{es-dash-HqXWZZ3_.js → es-dash-BuShf_ht.js} +0 -0
  160. /package/dist/{utilities-lwX686oD.js → utilities-DV0KKJNR.js} +0 -0
@@ -1,329 +0,0 @@
1
- import { c as $64fa3d84918910a7$export$fabf2dc03a41866e, d as $5dc95899b306f630$export$c9058316764c140e, i as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, l as $df56164dff5785e2$export$4338b53315abf666, m as $bdb11010cef70236$export$f680877a34711e37, n as $64fa3d84918910a7$export$29f1550f4b0d4415, o as $64fa3d84918910a7$export$df3a06d6289f983e, r as $64fa3d84918910a7$export$4d86445c2cf5e3, s as $64fa3d84918910a7$export$ef03459518577ad4, t as $64fa3d84918910a7$export$2881499e37b75b9a, u as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-B_uiqNa4.js";
2
- import { G as $431fbd86ca7dc216$export$f21a1ffae260145a, H as $d4ee10de306f2510$export$e58f029f0fbfdb29, r as $f645667febf57a63$export$4c014de7c8940b4c, t as $6179b936705e76d3$export$ae780daf29e6d456, v as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./useHover-qaMm3XFO.js";
3
- import { r as $9bf71ea28793e738$export$2d6ec8fc375ceafa } from "./FocusScope-CgwbGOBB.js";
4
- import { t as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-_2_3GD-K.js";
5
- import { t as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-DdkykzAn.js";
6
- import { t as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-C-XNeJ_l.js";
7
- import { t as $f6c31cce2adf654f$export$45712eceda6fad21 } from "./usePress-ZP1TjkFf.js";
8
- import { n as $9ab94262bd0047c7$export$420e68273165f4ec, t as $f7dceffc5ad7768b$export$4e328f61c538687f } from "./useFocusRing-DuYL4cdO.js";
9
- import { t as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "./VisuallyHidden-CfsnJHZb.js";
10
- import { t as $2baaea4c71418dea$export$294aa081a6c6f55d } from "./useField-D0WrzR2F.js";
11
- import { a as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, n as $e93e671b31057976$export$b8473d3665f3a75a, t as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "./FieldError-BWDbP5Db.js";
12
- import { t as $01b77f81d0f07f68$export$75b6ee27786ba447 } from "./Label-DFXXxMKY.js";
13
- import { n as $514c0188e459b4c0$export$9afb8bc826b033ea } from "./Text-O6VBBDlP.js";
14
- import { t as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "./Form-DTMkbrQY.js";
15
- import { n as $c8a5a149f625efcf$export$758399f318e6385a, t as $1d5b8b8664671ef2$export$c9549807523555e0 } from "./SelectionIndicator-31L6EI9F.js";
16
- import React, { createContext, forwardRef, useMemo, useState } from "react";
17
- //#region node_modules/@react-aria/radio/dist/utils.mjs
18
- var $884aeceb3d67f00f$export$37b65e5b5444d35c = new WeakMap();
19
- //#endregion
20
- //#region node_modules/@react-aria/radio/dist/useRadio.mjs
21
- function $0d5c49892c1215da$export$37b0961d2f4751e2(props, state, ref) {
22
- let { value, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, onPressStart, onPressEnd, onPressChange, onPress, onPressUp, onClick } = props;
23
- const isDisabled = props.isDisabled || state.isDisabled;
24
- if (!(children != null) && !(ariaLabel != null || ariaLabelledby != null) && process.env.NODE_ENV !== "production") console.warn("If you do not provide children, you must specify an aria-label for accessibility");
25
- let checked = state.selectedValue === value;
26
- let onChange = (e) => {
27
- e.stopPropagation();
28
- state.setSelectedValue(value);
29
- };
30
- let { pressProps, isPressed } = $f6c31cce2adf654f$export$45712eceda6fad21({
31
- onPressStart,
32
- onPressEnd,
33
- onPressChange,
34
- onPress,
35
- onPressUp,
36
- onClick,
37
- isDisabled
38
- });
39
- let { pressProps: labelProps, isPressed: isLabelPressed } = $f6c31cce2adf654f$export$45712eceda6fad21({
40
- onPressStart,
41
- onPressEnd,
42
- onPressChange,
43
- onPressUp,
44
- onClick,
45
- isDisabled,
46
- onPress(e) {
47
- var _ref_current;
48
- onPress === null || onPress === void 0 || onPress(e);
49
- state.setSelectedValue(value);
50
- (_ref_current = ref.current) === null || _ref_current === void 0 || _ref_current.focus();
51
- }
52
- });
53
- let { focusableProps } = $f645667febf57a63$export$4c014de7c8940b4c($3ef42575df84b30b$export$9d1611c77c2fe928(props, { onFocus: () => state.setLastFocusedValue(value) }), ref);
54
- let interactions = $3ef42575df84b30b$export$9d1611c77c2fe928(pressProps, focusableProps);
55
- let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, { labelable: true });
56
- let tabIndex = -1;
57
- if (state.selectedValue != null) {
58
- if (state.selectedValue === value) tabIndex = 0;
59
- } else if (state.lastFocusedValue === value || state.lastFocusedValue == null) tabIndex = 0;
60
- if (isDisabled) tabIndex = void 0;
61
- let { name, form, descriptionId, errorMessageId, validationBehavior } = $884aeceb3d67f00f$export$37b65e5b5444d35c.get(state);
62
- $99facab73266f662$export$5add1d006293d136(ref, state.defaultSelectedValue, state.setSelectedValue);
63
- $e93e671b31057976$export$b8473d3665f3a75a({ validationBehavior }, state, ref);
64
- return {
65
- labelProps: $3ef42575df84b30b$export$9d1611c77c2fe928(labelProps, useMemo(() => ({
66
- onClick: (e) => e.preventDefault(),
67
- onMouseDown: (e) => e.preventDefault()
68
- }), [])),
69
- inputProps: $3ef42575df84b30b$export$9d1611c77c2fe928(domProps, {
70
- ...interactions,
71
- type: "radio",
72
- name,
73
- form,
74
- tabIndex,
75
- disabled: isDisabled,
76
- required: state.isRequired && validationBehavior === "native",
77
- checked,
78
- value,
79
- onChange,
80
- "aria-describedby": [
81
- props["aria-describedby"],
82
- state.isInvalid ? errorMessageId : null,
83
- descriptionId
84
- ].filter(Boolean).join(" ") || void 0
85
- }),
86
- isDisabled,
87
- isSelected: checked,
88
- isPressed: isPressed || isLabelPressed
89
- };
90
- }
91
- //#endregion
92
- //#region node_modules/@react-aria/radio/dist/useRadioGroup.mjs
93
- function $430f30ed08ec25fa$export$62b9571f283ff5c2(props, state) {
94
- let { name, form, isReadOnly, isRequired, isDisabled, orientation = "vertical", validationBehavior = "aria" } = props;
95
- let { direction } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
96
- let { isInvalid, validationErrors, validationDetails } = state.displayValidation;
97
- let { labelProps, fieldProps, descriptionProps, errorMessageProps } = $2baaea4c71418dea$export$294aa081a6c6f55d({
98
- ...props,
99
- labelElementType: "span",
100
- isInvalid: state.isInvalid,
101
- errorMessage: props.errorMessage || validationErrors
102
- });
103
- let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, { labelable: true });
104
- let { focusWithinProps } = $9ab94262bd0047c7$export$420e68273165f4ec({
105
- onBlurWithin(e) {
106
- var _props_onBlur;
107
- (_props_onBlur = props.onBlur) === null || _props_onBlur === void 0 || _props_onBlur.call(props, e);
108
- if (!state.selectedValue) state.setLastFocusedValue(null);
109
- },
110
- onFocusWithin: props.onFocus,
111
- onFocusWithinChange: props.onFocusChange
112
- });
113
- let onKeyDown = (e) => {
114
- let nextDir;
115
- switch (e.key) {
116
- case "ArrowRight":
117
- if (direction === "rtl" && orientation !== "vertical") nextDir = "prev";
118
- else nextDir = "next";
119
- break;
120
- case "ArrowLeft":
121
- if (direction === "rtl" && orientation !== "vertical") nextDir = "next";
122
- else nextDir = "prev";
123
- break;
124
- case "ArrowDown":
125
- nextDir = "next";
126
- break;
127
- case "ArrowUp":
128
- nextDir = "prev";
129
- break;
130
- default: return;
131
- }
132
- e.preventDefault();
133
- let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(e.currentTarget, {
134
- from: $d4ee10de306f2510$export$e58f029f0fbfdb29(e),
135
- accept: (node) => node instanceof $431fbd86ca7dc216$export$f21a1ffae260145a(node).HTMLInputElement && node.type === "radio"
136
- });
137
- let nextElem;
138
- if (nextDir === "next") {
139
- nextElem = walker.nextNode();
140
- if (!nextElem) {
141
- walker.currentNode = e.currentTarget;
142
- nextElem = walker.firstChild();
143
- }
144
- } else {
145
- nextElem = walker.previousNode();
146
- if (!nextElem) {
147
- walker.currentNode = e.currentTarget;
148
- nextElem = walker.lastChild();
149
- }
150
- }
151
- if (nextElem) {
152
- nextElem.focus();
153
- state.setSelectedValue(nextElem.value);
154
- }
155
- };
156
- let groupName = $bdb11010cef70236$export$f680877a34711e37(name);
157
- $884aeceb3d67f00f$export$37b65e5b5444d35c.set(state, {
158
- name: groupName,
159
- form,
160
- descriptionId: descriptionProps.id,
161
- errorMessageId: errorMessageProps.id,
162
- validationBehavior
163
- });
164
- return {
165
- radioGroupProps: $3ef42575df84b30b$export$9d1611c77c2fe928(domProps, {
166
- role: "radiogroup",
167
- onKeyDown,
168
- "aria-invalid": state.isInvalid || void 0,
169
- "aria-errormessage": props["aria-errormessage"],
170
- "aria-readonly": isReadOnly || void 0,
171
- "aria-required": isRequired || void 0,
172
- "aria-disabled": isDisabled || void 0,
173
- "aria-orientation": orientation,
174
- ...fieldProps,
175
- ...focusWithinProps
176
- }),
177
- labelProps,
178
- descriptionProps,
179
- errorMessageProps,
180
- isInvalid,
181
- validationErrors,
182
- validationDetails
183
- };
184
- }
185
- //#endregion
186
- //#region node_modules/@react-stately/radio/dist/useRadioGroupState.mjs
187
- var $a54cdc5c1942b639$var$instance = Math.round(Math.random() * 1e10);
188
- var $a54cdc5c1942b639$var$i = 0;
189
- function $a54cdc5c1942b639$export$bca9d026f8e704eb(props) {
190
- let name = useMemo(() => props.name || `radio-group-${$a54cdc5c1942b639$var$instance}-${++$a54cdc5c1942b639$var$i}`, [props.name]);
191
- var _props_defaultValue;
192
- let [selectedValue, setSelected] = $458b0a5536c1a7cf$export$40bfa8c7b0832715(props.value, (_props_defaultValue = props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : null, props.onChange);
193
- let [initialValue] = useState(selectedValue);
194
- let [lastFocusedValue, setLastFocusedValue] = useState(null);
195
- let validation = $e5be200c675c3b3a$export$fc1a364ae1f3ff10({
196
- ...props,
197
- value: selectedValue
198
- });
199
- let setSelectedValue = (value) => {
200
- if (!props.isReadOnly && !props.isDisabled) {
201
- setSelected(value);
202
- validation.commitValidation();
203
- }
204
- };
205
- let isInvalid = validation.displayValidation.isInvalid;
206
- var _props_defaultValue1;
207
- return {
208
- ...validation,
209
- name,
210
- selectedValue,
211
- defaultSelectedValue: props.value !== void 0 ? initialValue : (_props_defaultValue1 = props.defaultValue) !== null && _props_defaultValue1 !== void 0 ? _props_defaultValue1 : null,
212
- setSelectedValue,
213
- lastFocusedValue,
214
- setLastFocusedValue,
215
- isDisabled: props.isDisabled || false,
216
- isReadOnly: props.isReadOnly || false,
217
- isRequired: props.isRequired || false,
218
- validationState: props.validationState || (isInvalid ? "invalid" : null),
219
- isInvalid
220
- };
221
- }
222
- //#endregion
223
- //#region node_modules/react-aria-components/dist/RadioGroup.mjs
224
- var $b6c3ddc6086f204d$export$a79eda4ff50e30b6 = createContext(null);
225
- var $b6c3ddc6086f204d$export$b118023277d4a5c3 = createContext(null);
226
- var $b6c3ddc6086f204d$export$29d84393af70866c = createContext(null);
227
- var $b6c3ddc6086f204d$export$a98f0dcb43a68a25 = forwardRef(function RadioGroup(props, ref) {
228
- [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $b6c3ddc6086f204d$export$a79eda4ff50e30b6);
229
- let { validationBehavior: formValidationBehavior } = $64fa3d84918910a7$export$fabf2dc03a41866e($d3e0e05bdfcf66bd$export$c24727297075ec6a) || {};
230
- var _props_validationBehavior, _ref;
231
- let validationBehavior = (_ref = (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== void 0 ? _props_validationBehavior : formValidationBehavior) !== null && _ref !== void 0 ? _ref : "native";
232
- let state = $a54cdc5c1942b639$export$bca9d026f8e704eb({
233
- ...props,
234
- validationBehavior
235
- });
236
- let [labelRef, label] = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8(!props["aria-label"] && !props["aria-labelledby"]);
237
- let { radioGroupProps, labelProps, descriptionProps, errorMessageProps, ...validation } = $430f30ed08ec25fa$export$62b9571f283ff5c2({
238
- ...props,
239
- label,
240
- validationBehavior
241
- }, state);
242
- let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
243
- ...props,
244
- values: {
245
- orientation: props.orientation || "vertical",
246
- isDisabled: state.isDisabled,
247
- isReadOnly: state.isReadOnly,
248
- isRequired: state.isRequired,
249
- isInvalid: state.isInvalid,
250
- state
251
- },
252
- defaultClassName: "react-aria-RadioGroup"
253
- });
254
- let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, { global: true });
255
- return React.createElement($64fa3d84918910a7$export$df3a06d6289f983e.div, {
256
- ...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, radioGroupProps),
257
- ref,
258
- slot: props.slot || void 0,
259
- "data-orientation": props.orientation || "vertical",
260
- "data-invalid": state.isInvalid || void 0,
261
- "data-disabled": state.isDisabled || void 0,
262
- "data-readonly": state.isReadOnly || void 0,
263
- "data-required": state.isRequired || void 0
264
- }, React.createElement($64fa3d84918910a7$export$2881499e37b75b9a, { values: [
265
- [$b6c3ddc6086f204d$export$29d84393af70866c, state],
266
- [$01b77f81d0f07f68$export$75b6ee27786ba447, {
267
- ...labelProps,
268
- ref: labelRef,
269
- elementType: "span"
270
- }],
271
- [$514c0188e459b4c0$export$9afb8bc826b033ea, { slots: {
272
- description: descriptionProps,
273
- errorMessage: errorMessageProps
274
- } }],
275
- [$ee014567cb39d3f0$export$ff05c3ac10437e03, validation]
276
- ] }, React.createElement($c8a5a149f625efcf$export$758399f318e6385a, null, renderProps.children)));
277
- });
278
- var $b6c3ddc6086f204d$export$d7b12c4107be0d61 = forwardRef(function Radio(props, ref) {
279
- let { inputRef: userProvidedInputRef = null, ...otherProps } = props;
280
- [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(otherProps, ref, $b6c3ddc6086f204d$export$b118023277d4a5c3);
281
- let state = React.useContext($b6c3ddc6086f204d$export$29d84393af70866c);
282
- let inputRef = $df56164dff5785e2$export$4338b53315abf666(useMemo(() => $5dc95899b306f630$export$c9058316764c140e(userProvidedInputRef, props.inputRef !== void 0 ? props.inputRef : null), [userProvidedInputRef, props.inputRef]));
283
- let { labelProps, inputProps, isSelected, isDisabled, isPressed } = $0d5c49892c1215da$export$37b0961d2f4751e2({
284
- ...$64fa3d84918910a7$export$ef03459518577ad4(props),
285
- children: typeof props.children === "function" ? true : props.children
286
- }, state, inputRef);
287
- let { isFocused, isFocusVisible, focusProps } = $f7dceffc5ad7768b$export$4e328f61c538687f();
288
- let interactionDisabled = isDisabled || state.isReadOnly;
289
- let { hoverProps, isHovered } = $6179b936705e76d3$export$ae780daf29e6d456({
290
- ...props,
291
- isDisabled: interactionDisabled
292
- });
293
- let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
294
- ...props,
295
- defaultClassName: "react-aria-Radio",
296
- values: {
297
- isSelected,
298
- isPressed,
299
- isHovered,
300
- isFocused,
301
- isFocusVisible,
302
- isDisabled,
303
- isReadOnly: state.isReadOnly,
304
- isInvalid: state.isInvalid,
305
- isRequired: state.isRequired
306
- }
307
- });
308
- let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, { global: true });
309
- delete DOMProps.id;
310
- delete DOMProps.onClick;
311
- return React.createElement($64fa3d84918910a7$export$df3a06d6289f983e.label, {
312
- ...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, labelProps, hoverProps, renderProps),
313
- ref,
314
- "data-selected": isSelected || void 0,
315
- "data-pressed": isPressed || void 0,
316
- "data-hovered": isHovered || void 0,
317
- "data-focused": isFocused || void 0,
318
- "data-focus-visible": isFocusVisible || void 0,
319
- "data-disabled": isDisabled || void 0,
320
- "data-readonly": state.isReadOnly || void 0,
321
- "data-invalid": state.isInvalid || void 0,
322
- "data-required": state.isRequired || void 0
323
- }, React.createElement($5c3e21d68f1c4674$export$439d29a4e110a164, { elementType: "span" }, React.createElement("input", {
324
- ...$3ef42575df84b30b$export$9d1611c77c2fe928(inputProps, focusProps),
325
- ref: inputRef
326
- })), React.createElement($1d5b8b8664671ef2$export$c9549807523555e0.Provider, { value: { isSelected } }, renderProps.children));
327
- });
328
- //#endregion
329
- export { $b6c3ddc6086f204d$export$d7b12c4107be0d61 as n, $b6c3ddc6086f204d$export$a98f0dcb43a68a25 as t };