@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,32 +1,35 @@
1
- //#region node_modules/@internationalized/number/dist/NumberFormatter.mjs
2
- var $488c6ddbf4ef74c2$var$formatterCache = new Map();
3
- var $488c6ddbf4ef74c2$var$supportsSignDisplay = false;
1
+ //#region node_modules/@internationalized/number/dist/private/NumberFormatter.mjs
2
+ var $1dfb119a85e764e5$var$formatterCache = new Map();
3
+ var $1dfb119a85e764e5$var$supportsSignDisplay = false;
4
4
  try {
5
- $488c6ddbf4ef74c2$var$supportsSignDisplay = new Intl.NumberFormat("de-DE", { signDisplay: "exceptZero" }).resolvedOptions().signDisplay === "exceptZero";
5
+ $1dfb119a85e764e5$var$supportsSignDisplay = new Intl.NumberFormat("de-DE", { signDisplay: "exceptZero" }).resolvedOptions().signDisplay === "exceptZero";
6
6
  } catch {}
7
- var $488c6ddbf4ef74c2$var$supportsUnit = false;
7
+ var $1dfb119a85e764e5$var$supportsUnit = false;
8
8
  try {
9
- $488c6ddbf4ef74c2$var$supportsUnit = new Intl.NumberFormat("de-DE", {
9
+ $1dfb119a85e764e5$var$supportsUnit = new Intl.NumberFormat("de-DE", {
10
10
  style: "unit",
11
11
  unit: "degree"
12
12
  }).resolvedOptions().style === "unit";
13
13
  } catch {}
14
- var $488c6ddbf4ef74c2$var$UNITS = { degree: { narrow: {
14
+ var $1dfb119a85e764e5$var$UNITS = { degree: { narrow: {
15
15
  default: "°",
16
16
  "ja-JP": " 度",
17
17
  "zh-TW": "度",
18
18
  "sl-SI": " °"
19
19
  } } };
20
- var $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5 = class {
20
+ var $1dfb119a85e764e5$export$cc77c4ff7e8673c5 = class {
21
+ constructor(locale, options = {}) {
22
+ this.numberFormatter = $1dfb119a85e764e5$var$getCachedNumberFormatter(locale, options);
23
+ this.options = options;
24
+ }
21
25
  /** Formats a number value as a string, according to the locale and options provided to the constructor. */ format(value) {
22
26
  let res = "";
23
- if (!$488c6ddbf4ef74c2$var$supportsSignDisplay && this.options.signDisplay != null) res = $488c6ddbf4ef74c2$export$711b50b3c525e0f2(this.numberFormatter, this.options.signDisplay, value);
27
+ if (!$1dfb119a85e764e5$var$supportsSignDisplay && this.options.signDisplay != null) res = $1dfb119a85e764e5$export$711b50b3c525e0f2(this.numberFormatter, this.options.signDisplay, value);
24
28
  else res = this.numberFormatter.format(value);
25
- if (this.options.style === "unit" && !$488c6ddbf4ef74c2$var$supportsUnit) {
26
- var _UNITS_unit;
29
+ if (this.options.style === "unit" && !$1dfb119a85e764e5$var$supportsUnit) {
27
30
  let { unit, unitDisplay = "short", locale } = this.resolvedOptions();
28
31
  if (!unit) return res;
29
- let values = (_UNITS_unit = $488c6ddbf4ef74c2$var$UNITS[unit]) === null || _UNITS_unit === void 0 ? void 0 : _UNITS_unit[unitDisplay];
32
+ let values = $1dfb119a85e764e5$var$UNITS[unit]?.[unitDisplay];
30
33
  res += values[locale] || values.default;
31
34
  }
32
35
  return res;
@@ -62,11 +65,11 @@ var $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5 = class {
62
65
  }
63
66
  /** Returns the resolved formatting options based on the values passed to the constructor. */ resolvedOptions() {
64
67
  let options = this.numberFormatter.resolvedOptions();
65
- if (!$488c6ddbf4ef74c2$var$supportsSignDisplay && this.options.signDisplay != null) options = {
68
+ if (!$1dfb119a85e764e5$var$supportsSignDisplay && this.options.signDisplay != null) options = {
66
69
  ...options,
67
70
  signDisplay: this.options.signDisplay
68
71
  };
69
- if (!$488c6ddbf4ef74c2$var$supportsUnit && this.options.style === "unit") options = {
72
+ if (!$1dfb119a85e764e5$var$supportsUnit && this.options.style === "unit") options = {
70
73
  ...options,
71
74
  style: "unit",
72
75
  unit: this.options.unit,
@@ -74,34 +77,29 @@ var $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5 = class {
74
77
  };
75
78
  return options;
76
79
  }
77
- constructor(locale, options = {}) {
78
- this.numberFormatter = $488c6ddbf4ef74c2$var$getCachedNumberFormatter(locale, options);
79
- this.options = options;
80
- }
81
80
  };
82
- function $488c6ddbf4ef74c2$var$getCachedNumberFormatter(locale, options = {}) {
81
+ function $1dfb119a85e764e5$var$getCachedNumberFormatter(locale, options = {}) {
83
82
  let { numberingSystem } = options;
84
83
  if (numberingSystem && locale.includes("-nu-")) {
85
84
  if (!locale.includes("-u-")) locale += "-u-";
86
85
  locale += `-nu-${numberingSystem}`;
87
86
  }
88
- if (options.style === "unit" && !$488c6ddbf4ef74c2$var$supportsUnit) {
89
- var _UNITS_unit;
87
+ if (options.style === "unit" && !$1dfb119a85e764e5$var$supportsUnit) {
90
88
  let { unit, unitDisplay = "short" } = options;
91
89
  if (!unit) throw new Error("unit option must be provided with style: \"unit\"");
92
- if (!((_UNITS_unit = $488c6ddbf4ef74c2$var$UNITS[unit]) === null || _UNITS_unit === void 0 ? void 0 : _UNITS_unit[unitDisplay])) throw new Error(`Unsupported unit ${unit} with unitDisplay = ${unitDisplay}`);
90
+ if (!$1dfb119a85e764e5$var$UNITS[unit]?.[unitDisplay]) throw new Error(`Unsupported unit ${unit} with unitDisplay = ${unitDisplay}`);
93
91
  options = {
94
92
  ...options,
95
93
  style: "decimal"
96
94
  };
97
95
  }
98
96
  let cacheKey = locale + (options ? Object.entries(options).sort((a, b) => a[0] < b[0] ? -1 : 1).join() : "");
99
- if ($488c6ddbf4ef74c2$var$formatterCache.has(cacheKey)) return $488c6ddbf4ef74c2$var$formatterCache.get(cacheKey);
97
+ if ($1dfb119a85e764e5$var$formatterCache.has(cacheKey)) return $1dfb119a85e764e5$var$formatterCache.get(cacheKey);
100
98
  let numberFormatter = new Intl.NumberFormat(locale, options);
101
- $488c6ddbf4ef74c2$var$formatterCache.set(cacheKey, numberFormatter);
99
+ $1dfb119a85e764e5$var$formatterCache.set(cacheKey, numberFormatter);
102
100
  return numberFormatter;
103
101
  }
104
- function $488c6ddbf4ef74c2$export$711b50b3c525e0f2(numberFormat, signDisplay, num) {
102
+ function $1dfb119a85e764e5$export$711b50b3c525e0f2(numberFormat, signDisplay, num) {
105
103
  if (signDisplay === "auto") return numberFormat.format(num);
106
104
  else if (signDisplay === "never") return numberFormat.format(Math.abs(num));
107
105
  else {
@@ -119,4 +117,4 @@ function $488c6ddbf4ef74c2$export$711b50b3c525e0f2(numberFormat, signDisplay, nu
119
117
  }
120
118
  }
121
119
  //#endregion
122
- export { $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5 as t };
120
+ export { $1dfb119a85e764e5$export$cc77c4ff7e8673c5 as t };
@@ -0,0 +1,13 @@
1
+ import React, { createContext, useContext } from "react";
2
+ //#region node_modules/react-aria/dist/private/overlays/PortalProvider.mjs
3
+ var $72abaeab4d80592f$export$60d741e20e0aa309 = createContext({});
4
+ function $72abaeab4d80592f$export$78efe591171d7d45(props) {
5
+ let { getContainer } = props;
6
+ let { getContainer: ctxGetContainer } = $72abaeab4d80592f$export$9fc1347d4195ccb3();
7
+ return React.createElement($72abaeab4d80592f$export$60d741e20e0aa309.Provider, { value: { getContainer: getContainer === null ? void 0 : getContainer ?? ctxGetContainer } }, props.children);
8
+ }
9
+ function $72abaeab4d80592f$export$9fc1347d4195ccb3() {
10
+ return useContext($72abaeab4d80592f$export$60d741e20e0aa309) ?? {};
11
+ }
12
+ //#endregion
13
+ export { $72abaeab4d80592f$export$9fc1347d4195ccb3 as n, $72abaeab4d80592f$export$78efe591171d7d45 as t };
@@ -0,0 +1,324 @@
1
+ import { c as $7230ffa83bc0c2cf$export$fabf2dc03a41866e, d as $4064df0d6f9620e1$export$c9058316764c140e, i as $7230ffa83bc0c2cf$export$9d4c57ee4c6ffdd8, l as $03e8ab2d84d7657a$export$4338b53315abf666, n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$df3a06d6289f983e, p as $390e54f620492c70$export$f680877a34711e37, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, s as $7230ffa83bc0c2cf$export$ef03459518577ad4, t as $7230ffa83bc0c2cf$export$2881499e37b75b9a, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-JFcCNFzy.js";
2
+ import { G as $d447af545b77c9f1$export$f21a1ffae260145a, H as $23f2114a1b82827e$export$e58f029f0fbfdb29, d as $3e6197669829fe11$export$40bfa8c7b0832715, i as $d1116acdf220c2da$export$4c014de7c8940b4c, t as $e969f22b6713ca4a$export$ae780daf29e6d456 } from "./useHover-lyApu3ba.js";
3
+ import { t as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7 } from "./I18nProvider-Cm6dj5jY.js";
4
+ import { t as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f } from "./filterDOMProps-BfW758QC.js";
5
+ import { t as $d27d541f9569d26d$export$45712eceda6fad21 } from "./usePress-Dnx5rBoD.js";
6
+ import { n as $2c9edc598a03d523$export$420e68273165f4ec, t as $0c4a58759813079a$export$4e328f61c538687f } from "./useFocusRing-BgYY-7ko.js";
7
+ import { t as $43a3b93638fe5db9$export$75b6ee27786ba447 } from "./Label-B1TkoVOG.js";
8
+ import { n as $efe09c6d1c304b50$export$9afb8bc826b033ea } from "./Text-C8pfwn0W.js";
9
+ import { t as $ea3928288112382f$export$439d29a4e110a164 } from "./VisuallyHidden-KcXlGa5p.js";
10
+ import { a as $1f3c3b1a70cec653$export$ff05c3ac10437e03, i as $fd2148440a13ec26$export$fc1a364ae1f3ff10, t as $860f7da480e22816$export$b8473d3665f3a75a } from "./useFormValidation-BcME9D0E.js";
11
+ import { t as $cdaed739b1139372$export$c24727297075ec6a } from "./Form-BxIJCHYd.js";
12
+ import { t as $191c9b6d48a0a4e2$export$294aa081a6c6f55d } from "./useField-BXf__jxy.js";
13
+ import { t as $3274bf1495747a7b$export$5add1d006293d136 } from "./useFormReset-BuMc_O4y.js";
14
+ import { n as $792f28e438b9ad5f$export$758399f318e6385a, t as $91fe5e721c7f36c1$export$c9549807523555e0 } from "./SelectionIndicator-Bx_EYBXD.js";
15
+ import { r as $535772f9d2c1f38d$export$2d6ec8fc375ceafa } from "./FocusScope-lGkM8AO8.js";
16
+ import React, { createContext, forwardRef, useMemo, useState } from "react";
17
+ //#region node_modules/react-aria/dist/private/radio/utils.mjs
18
+ var $640b6b92b30fd41a$export$37b65e5b5444d35c = new WeakMap();
19
+ //#endregion
20
+ //#region node_modules/react-aria/dist/private/radio/useRadio.mjs
21
+ function $405627c100c5b965$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 } = $d27d541f9569d26d$export$45712eceda6fad21({
31
+ onPressStart,
32
+ onPressEnd,
33
+ onPressChange,
34
+ onPress,
35
+ onPressUp,
36
+ onClick,
37
+ isDisabled
38
+ });
39
+ let { pressProps: labelProps, isPressed: isLabelPressed } = $d27d541f9569d26d$export$45712eceda6fad21({
40
+ onPressStart,
41
+ onPressEnd,
42
+ onPressChange,
43
+ onPressUp,
44
+ onClick,
45
+ isDisabled,
46
+ onPress(e) {
47
+ onPress?.(e);
48
+ state.setSelectedValue(value);
49
+ ref.current?.focus();
50
+ }
51
+ });
52
+ let { focusableProps } = $d1116acdf220c2da$export$4c014de7c8940b4c($bbaa08b3cd72f041$export$9d1611c77c2fe928(props, { onFocus: () => state.setLastFocusedValue(value) }), ref);
53
+ let interactions = $bbaa08b3cd72f041$export$9d1611c77c2fe928(pressProps, focusableProps);
54
+ let domProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props, { labelable: true });
55
+ let tabIndex = -1;
56
+ if (state.selectedValue != null) {
57
+ if (state.selectedValue === value) tabIndex = 0;
58
+ } else if (state.lastFocusedValue === value || state.lastFocusedValue == null) tabIndex = 0;
59
+ if (isDisabled) tabIndex = void 0;
60
+ let { name, form, descriptionId, errorMessageId, validationBehavior } = $640b6b92b30fd41a$export$37b65e5b5444d35c.get(state);
61
+ $3274bf1495747a7b$export$5add1d006293d136(ref, state.defaultSelectedValue, state.setSelectedValue);
62
+ $860f7da480e22816$export$b8473d3665f3a75a({ validationBehavior }, state, ref);
63
+ return {
64
+ labelProps: $bbaa08b3cd72f041$export$9d1611c77c2fe928(labelProps, useMemo(() => ({
65
+ onClick: (e) => e.preventDefault(),
66
+ onMouseDown: (e) => e.preventDefault()
67
+ }), [])),
68
+ inputProps: $bbaa08b3cd72f041$export$9d1611c77c2fe928(domProps, {
69
+ ...interactions,
70
+ type: "radio",
71
+ name,
72
+ form,
73
+ tabIndex,
74
+ disabled: isDisabled,
75
+ required: state.isRequired && validationBehavior === "native",
76
+ checked,
77
+ value,
78
+ onChange,
79
+ "aria-describedby": [
80
+ props["aria-describedby"],
81
+ state.isInvalid ? errorMessageId : null,
82
+ descriptionId
83
+ ].filter(Boolean).join(" ") || void 0
84
+ }),
85
+ isDisabled,
86
+ isSelected: checked,
87
+ isPressed: isPressed || isLabelPressed
88
+ };
89
+ }
90
+ //#endregion
91
+ //#region node_modules/react-aria/dist/private/radio/useRadioGroup.mjs
92
+ function $eecdee08e0d8a75f$export$62b9571f283ff5c2(props, state) {
93
+ let { name, form, isReadOnly, isRequired, isDisabled, orientation = "vertical", validationBehavior = "aria" } = props;
94
+ let { direction } = $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7();
95
+ let { isInvalid, validationErrors, validationDetails } = state.displayValidation;
96
+ let { labelProps, fieldProps, descriptionProps, errorMessageProps } = $191c9b6d48a0a4e2$export$294aa081a6c6f55d({
97
+ ...props,
98
+ labelElementType: "span",
99
+ isInvalid: state.isInvalid,
100
+ errorMessage: props.errorMessage || validationErrors
101
+ });
102
+ let domProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props, { labelable: true });
103
+ let { focusWithinProps } = $2c9edc598a03d523$export$420e68273165f4ec({
104
+ onBlurWithin(e) {
105
+ props.onBlur?.(e);
106
+ if (!state.selectedValue) state.setLastFocusedValue(null);
107
+ },
108
+ onFocusWithin: props.onFocus,
109
+ onFocusWithinChange: props.onFocusChange
110
+ });
111
+ let onKeyDown = (e) => {
112
+ let nextDir;
113
+ switch (e.key) {
114
+ case "ArrowRight":
115
+ if (direction === "rtl" && orientation !== "vertical") nextDir = "prev";
116
+ else nextDir = "next";
117
+ break;
118
+ case "ArrowLeft":
119
+ if (direction === "rtl" && orientation !== "vertical") nextDir = "next";
120
+ else nextDir = "prev";
121
+ break;
122
+ case "ArrowDown":
123
+ nextDir = "next";
124
+ break;
125
+ case "ArrowUp":
126
+ nextDir = "prev";
127
+ break;
128
+ default: return;
129
+ }
130
+ e.preventDefault();
131
+ let walker = $535772f9d2c1f38d$export$2d6ec8fc375ceafa(e.currentTarget, {
132
+ from: $23f2114a1b82827e$export$e58f029f0fbfdb29(e),
133
+ accept: (node) => node instanceof $d447af545b77c9f1$export$f21a1ffae260145a(node).HTMLInputElement && node.type === "radio"
134
+ });
135
+ let nextElem;
136
+ if (nextDir === "next") {
137
+ nextElem = walker.nextNode();
138
+ if (!nextElem) {
139
+ walker.currentNode = e.currentTarget;
140
+ nextElem = walker.firstChild();
141
+ }
142
+ } else {
143
+ nextElem = walker.previousNode();
144
+ if (!nextElem) {
145
+ walker.currentNode = e.currentTarget;
146
+ nextElem = walker.lastChild();
147
+ }
148
+ }
149
+ if (nextElem) {
150
+ nextElem.focus();
151
+ state.setSelectedValue(nextElem.value);
152
+ }
153
+ };
154
+ let groupName = $390e54f620492c70$export$f680877a34711e37(name);
155
+ $640b6b92b30fd41a$export$37b65e5b5444d35c.set(state, {
156
+ name: groupName,
157
+ form,
158
+ descriptionId: descriptionProps.id,
159
+ errorMessageId: errorMessageProps.id,
160
+ validationBehavior
161
+ });
162
+ return {
163
+ radioGroupProps: $bbaa08b3cd72f041$export$9d1611c77c2fe928(domProps, {
164
+ role: "radiogroup",
165
+ onKeyDown,
166
+ "aria-invalid": state.isInvalid || void 0,
167
+ "aria-errormessage": props["aria-errormessage"],
168
+ "aria-readonly": isReadOnly || void 0,
169
+ "aria-required": isRequired || void 0,
170
+ "aria-disabled": isDisabled || void 0,
171
+ "aria-orientation": orientation,
172
+ ...fieldProps,
173
+ ...focusWithinProps
174
+ }),
175
+ labelProps,
176
+ descriptionProps,
177
+ errorMessageProps,
178
+ isInvalid,
179
+ validationErrors,
180
+ validationDetails
181
+ };
182
+ }
183
+ //#endregion
184
+ //#region node_modules/react-stately/dist/private/radio/useRadioGroupState.mjs
185
+ var $384704861d32dbed$var$instance = Math.round(Math.random() * 1e10);
186
+ var $384704861d32dbed$var$i = 0;
187
+ function $384704861d32dbed$export$bca9d026f8e704eb(props) {
188
+ let name = useMemo(() => props.name || `radio-group-${$384704861d32dbed$var$instance}-${++$384704861d32dbed$var$i}`, [props.name]);
189
+ let [selectedValue, setSelected] = $3e6197669829fe11$export$40bfa8c7b0832715(props.value, props.defaultValue ?? null, props.onChange);
190
+ let [initialValue] = useState(selectedValue);
191
+ let [lastFocusedValue, setLastFocusedValue] = useState(null);
192
+ let validation = $fd2148440a13ec26$export$fc1a364ae1f3ff10({
193
+ ...props,
194
+ value: selectedValue
195
+ });
196
+ let setSelectedValue = (value) => {
197
+ if (!props.isReadOnly && !props.isDisabled) {
198
+ setSelected(value);
199
+ validation.commitValidation();
200
+ }
201
+ };
202
+ let isInvalid = validation.displayValidation.isInvalid;
203
+ return {
204
+ ...validation,
205
+ name,
206
+ selectedValue,
207
+ defaultSelectedValue: props.value !== void 0 ? initialValue : props.defaultValue ?? null,
208
+ setSelectedValue,
209
+ lastFocusedValue,
210
+ setLastFocusedValue,
211
+ isDisabled: props.isDisabled || false,
212
+ isReadOnly: props.isReadOnly || false,
213
+ isRequired: props.isRequired || false,
214
+ validationState: props.validationState || (isInvalid ? "invalid" : null),
215
+ isInvalid
216
+ };
217
+ }
218
+ //#endregion
219
+ //#region node_modules/react-aria-components/dist/private/RadioGroup.mjs
220
+ var $fe21c36db05242bb$export$a79eda4ff50e30b6 = createContext(null);
221
+ var $fe21c36db05242bb$export$b118023277d4a5c3 = createContext(null);
222
+ var $fe21c36db05242bb$export$29d84393af70866c = createContext(null);
223
+ var $fe21c36db05242bb$export$a98f0dcb43a68a25 = forwardRef(function RadioGroup(props, ref) {
224
+ [props, ref] = $7230ffa83bc0c2cf$export$29f1550f4b0d4415(props, ref, $fe21c36db05242bb$export$a79eda4ff50e30b6);
225
+ let { validationBehavior: formValidationBehavior } = $7230ffa83bc0c2cf$export$fabf2dc03a41866e($cdaed739b1139372$export$c24727297075ec6a) || {};
226
+ let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? "native";
227
+ let state = $384704861d32dbed$export$bca9d026f8e704eb({
228
+ ...props,
229
+ validationBehavior
230
+ });
231
+ let [labelRef, label] = $7230ffa83bc0c2cf$export$9d4c57ee4c6ffdd8(!props["aria-label"] && !props["aria-labelledby"]);
232
+ let { radioGroupProps, labelProps, descriptionProps, errorMessageProps, ...validation } = $eecdee08e0d8a75f$export$62b9571f283ff5c2({
233
+ ...props,
234
+ label,
235
+ validationBehavior
236
+ }, state);
237
+ let renderProps = $7230ffa83bc0c2cf$export$4d86445c2cf5e3({
238
+ ...props,
239
+ values: {
240
+ orientation: props.orientation || "vertical",
241
+ isDisabled: state.isDisabled,
242
+ isReadOnly: state.isReadOnly,
243
+ isRequired: state.isRequired,
244
+ isInvalid: state.isInvalid,
245
+ state
246
+ },
247
+ defaultClassName: "react-aria-RadioGroup"
248
+ });
249
+ let DOMProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props, { global: true });
250
+ return React.createElement($7230ffa83bc0c2cf$export$df3a06d6289f983e.div, {
251
+ ...$bbaa08b3cd72f041$export$9d1611c77c2fe928(DOMProps, renderProps, radioGroupProps),
252
+ ref,
253
+ slot: props.slot || void 0,
254
+ "data-orientation": props.orientation || "vertical",
255
+ "data-invalid": state.isInvalid || void 0,
256
+ "data-disabled": state.isDisabled || void 0,
257
+ "data-readonly": state.isReadOnly || void 0,
258
+ "data-required": state.isRequired || void 0
259
+ }, React.createElement($7230ffa83bc0c2cf$export$2881499e37b75b9a, { values: [
260
+ [$fe21c36db05242bb$export$29d84393af70866c, state],
261
+ [$43a3b93638fe5db9$export$75b6ee27786ba447, {
262
+ ...labelProps,
263
+ ref: labelRef,
264
+ elementType: "span"
265
+ }],
266
+ [$efe09c6d1c304b50$export$9afb8bc826b033ea, { slots: {
267
+ description: descriptionProps,
268
+ errorMessage: errorMessageProps
269
+ } }],
270
+ [$1f3c3b1a70cec653$export$ff05c3ac10437e03, validation]
271
+ ] }, React.createElement($792f28e438b9ad5f$export$758399f318e6385a, null, renderProps.children)));
272
+ });
273
+ var $fe21c36db05242bb$export$d7b12c4107be0d61 = forwardRef(function Radio(props, ref) {
274
+ let { inputRef: userProvidedInputRef = null, ...otherProps } = props;
275
+ [props, ref] = $7230ffa83bc0c2cf$export$29f1550f4b0d4415(otherProps, ref, $fe21c36db05242bb$export$b118023277d4a5c3);
276
+ let state = React.useContext($fe21c36db05242bb$export$29d84393af70866c);
277
+ let inputRef = $03e8ab2d84d7657a$export$4338b53315abf666(useMemo(() => $4064df0d6f9620e1$export$c9058316764c140e(userProvidedInputRef, props.inputRef !== void 0 ? props.inputRef : null), [userProvidedInputRef, props.inputRef]));
278
+ let { labelProps, inputProps, isSelected, isDisabled, isPressed } = $405627c100c5b965$export$37b0961d2f4751e2({
279
+ ...$7230ffa83bc0c2cf$export$ef03459518577ad4(props),
280
+ children: typeof props.children === "function" ? true : props.children
281
+ }, state, inputRef);
282
+ let { isFocused, isFocusVisible, focusProps } = $0c4a58759813079a$export$4e328f61c538687f();
283
+ let interactionDisabled = isDisabled || state.isReadOnly;
284
+ let { hoverProps, isHovered } = $e969f22b6713ca4a$export$ae780daf29e6d456({
285
+ ...props,
286
+ isDisabled: interactionDisabled
287
+ });
288
+ let renderProps = $7230ffa83bc0c2cf$export$4d86445c2cf5e3({
289
+ ...props,
290
+ defaultClassName: "react-aria-Radio",
291
+ values: {
292
+ isSelected,
293
+ isPressed,
294
+ isHovered,
295
+ isFocused,
296
+ isFocusVisible,
297
+ isDisabled,
298
+ isReadOnly: state.isReadOnly,
299
+ isInvalid: state.isInvalid,
300
+ isRequired: state.isRequired
301
+ }
302
+ });
303
+ let DOMProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props, { global: true });
304
+ delete DOMProps.id;
305
+ delete DOMProps.onClick;
306
+ return React.createElement($7230ffa83bc0c2cf$export$df3a06d6289f983e.label, {
307
+ ...$bbaa08b3cd72f041$export$9d1611c77c2fe928(DOMProps, labelProps, hoverProps, renderProps),
308
+ ref,
309
+ "data-selected": isSelected || void 0,
310
+ "data-pressed": isPressed || void 0,
311
+ "data-hovered": isHovered || void 0,
312
+ "data-focused": isFocused || void 0,
313
+ "data-focus-visible": isFocusVisible || void 0,
314
+ "data-disabled": isDisabled || void 0,
315
+ "data-readonly": state.isReadOnly || void 0,
316
+ "data-invalid": state.isInvalid || void 0,
317
+ "data-required": state.isRequired || void 0
318
+ }, React.createElement($ea3928288112382f$export$439d29a4e110a164, { elementType: "span" }, React.createElement("input", {
319
+ ...$bbaa08b3cd72f041$export$9d1611c77c2fe928(inputProps, focusProps),
320
+ ref: inputRef
321
+ })), React.createElement($91fe5e721c7f36c1$export$c9549807523555e0.Provider, { value: { isSelected } }, renderProps.children));
322
+ });
323
+ //#endregion
324
+ export { $fe21c36db05242bb$export$d7b12c4107be0d61 as n, $fe21c36db05242bb$export$a98f0dcb43a68a25 as t };