@midas-ds/components 15.1.2 → 15.2.1

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 (125) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/{CharacterCounter-CTpQ12f7.cjs → CharacterCounter-BjOzWOoN.cjs} +1 -1
  3. package/{CharacterCounter-gbDGfize.js → CharacterCounter-b6RpXKDF.js} +5 -5
  4. package/Checkbox-D9X5vM4a.cjs +6 -0
  5. package/Checkbox-ujNi8mrO.js +288 -0
  6. package/{CheckboxGroup-BkzQi1FB.js → CheckboxGroup-BeBThHOu.js} +16 -13
  7. package/CheckboxGroup-BmEiqFKx.cjs +1 -0
  8. package/{ComboBox-C25vUI_6.js → ComboBox-BGXUTKrW.js} +138 -142
  9. package/{ComboBox-CdtDPQRH.cjs → ComboBox-lteAZwCb.cjs} +1 -1
  10. package/DateField-ZPcapPji.cjs +1 -0
  11. package/DateField-snXaUoBR.js +45 -0
  12. package/{DateInputDivider-DOHpVaNE.js → DateInputDivider-BjVsNVEk.js} +1 -1
  13. package/{DateInputDivider-CCrXjsUB.cjs → DateInputDivider-YOvEmapQ.cjs} +1 -1
  14. package/{DateRangePicker-mlnh0C1A.cjs → DateRangePicker-Biwt-Q8X.cjs} +2 -2
  15. package/{DateRangePicker-ezrFzzrO.js → DateRangePicker-CgvPZfMd.js} +168 -165
  16. package/{FieldError-JWxR_EqN.cjs → FieldError-DHzrxRPt.cjs} +1 -1
  17. package/{FieldError-CIxlNQCM.js → FieldError-DtEDCIQK.js} +1 -1
  18. package/{Label-C3ZSrB04.cjs → Label-Cbp1q387.cjs} +1 -1
  19. package/{Label-BqvFQoEF.js → Label-DH4JI6a4.js} +5 -5
  20. package/Layout-DQiqgjqR.cjs +16 -0
  21. package/{Layout-Hd1e_MEA.js → Layout-FveYuBny.js} +59 -58
  22. package/{ListBox-2wZ6XOeD.cjs → ListBox-CMM6O46x.cjs} +1 -1
  23. package/{ListBox-Der0Te-R.js → ListBox-CfzKpJFW.js} +33 -32
  24. package/{ListBoxLoadMoreItem-CTldtPr1.cjs → ListBoxLoadMoreItem-10BeO9ux.cjs} +1 -1
  25. package/{ListBoxLoadMoreItem-CzGGgav4.js → ListBoxLoadMoreItem-k-uwDi4f.js} +1 -1
  26. package/ListBoxSection-B5l2LIMZ.cjs +1 -0
  27. package/ListBoxSection-XoMfdRLd.js +51 -0
  28. package/{ProgressBar-BrtaxoR8.cjs → ProgressBar-C6ExqGom.cjs} +1 -1
  29. package/{ProgressBar-DhVQOs4P.js → ProgressBar-CePyiuw1.js} +1 -1
  30. package/{Radio-DClH8mWz.js → Radio-CNO4IHkf.js} +28 -28
  31. package/{Radio-VFIiuJIR.cjs → Radio-bfeheQ39.cjs} +1 -1
  32. package/{RangeCalendar-CH0CyBui.cjs → RangeCalendar-D7xj3ObC.cjs} +2 -2
  33. package/{RangeCalendar-DT_KVd80.js → RangeCalendar-DKsuoiPF.js} +101 -92
  34. package/{SearchField-Cd6X2rY4.js → SearchField-3XoN9q0k.js} +2 -2
  35. package/{SearchField-Cz5Pb0XE.cjs → SearchField-ClK2IHpM.cjs} +1 -1
  36. package/{Select-DLGsdsNN.cjs → Select-C1rNC9sy.cjs} +1 -1
  37. package/Select-CCyvb02g.cjs +1 -0
  38. package/{Select-C_AINBgj.js → Select-mz65sX1p.js} +7 -8
  39. package/{Select-CnZNRfPa.js → Select-oiNYST-S.js} +6 -6
  40. package/{Table-DxqKDp7N.js → Table-3x_iGkVe.js} +1 -1
  41. package/{Table-B1nxmW14.cjs → Table-BKbmV4Yp.cjs} +1 -1
  42. package/{Text-BBFWBNAH.js → Text-CnY7jiPS.js} +9 -9
  43. package/Text-DUIBTA3N.cjs +1 -0
  44. package/{TextArea-CcKY4TI2.js → TextArea-Bzgu6xU_.js} +6 -6
  45. package/{TextArea-D68vGjYJ.cjs → TextArea-DPeIoF7V.cjs} +1 -1
  46. package/{TextField-DtD9-arA.cjs → TextField-CdhdTYjC.cjs} +1 -1
  47. package/{TextField-DyR61bjZ.js → TextField-DFMRyd9V.js} +1 -1
  48. package/TextField.module-D9xjQoiS.js +13 -0
  49. package/TextField.module-gwQfMD2x.cjs +1 -0
  50. package/assets/CharacterCounter.css +1 -1
  51. package/assets/Checkbox.css +1 -1
  52. package/assets/ComboBox.css +1 -1
  53. package/assets/DateField.css +1 -1
  54. package/assets/DateRangePicker.css +1 -1
  55. package/assets/Label.css +1 -1
  56. package/assets/ListBox.css +1 -1
  57. package/assets/Radio.css +1 -1
  58. package/assets/RangeCalendar.css +1 -1
  59. package/assets/Text.css +1 -1
  60. package/assets/TextField.css +1 -1
  61. package/assets/default.css +1 -1
  62. package/calendar/CalendarGrid.d.ts +1 -0
  63. package/calendar/CalendarHeader.d.ts +3 -1
  64. package/calendar/index.cjs +1 -1
  65. package/calendar/index.js +1 -1
  66. package/character-counter/index.cjs +1 -1
  67. package/character-counter/index.js +1 -1
  68. package/checkbox/index.cjs +1 -1
  69. package/checkbox/index.js +2 -2
  70. package/combobox/ComboBox.d.ts +10 -3
  71. package/combobox/index.cjs +1 -1
  72. package/combobox/index.js +1 -1
  73. package/combobox/utils.d.ts +12 -3
  74. package/date-field/index.cjs +1 -1
  75. package/date-field/index.js +2 -2
  76. package/date-picker/DatePicker.d.ts +1 -2
  77. package/date-picker/DatePickerInputField.d.ts +2 -5
  78. package/date-picker/index.cjs +1 -1
  79. package/date-picker/index.js +1 -1
  80. package/field-error/index.cjs +1 -1
  81. package/field-error/index.js +1 -1
  82. package/index.cjs +1 -1
  83. package/index.js +22 -22
  84. package/label/index.cjs +1 -1
  85. package/label/index.js +1 -1
  86. package/layout/index.cjs +1 -1
  87. package/layout/index.js +1 -1
  88. package/legacy-select/Select.d.ts +1 -1
  89. package/legacy-select/index.cjs +1 -1
  90. package/legacy-select/index.js +1 -1
  91. package/legacy-select/types.d.ts +3 -0
  92. package/list-box/ListBoxItem.d.ts +3 -9
  93. package/list-box/ListBoxSection.d.ts +6 -3
  94. package/list-box/index.cjs +1 -1
  95. package/list-box/index.js +3 -3
  96. package/list-box/types.d.ts +6 -0
  97. package/package.json +2 -2
  98. package/progress-bar/index.cjs +1 -1
  99. package/progress-bar/index.js +1 -1
  100. package/radio/index.cjs +1 -1
  101. package/radio/index.js +1 -1
  102. package/search-field/index.cjs +1 -1
  103. package/search-field/index.js +1 -1
  104. package/select/index.cjs +1 -1
  105. package/select/index.js +1 -1
  106. package/table/index.cjs +1 -1
  107. package/table/index.js +1 -1
  108. package/text/index.cjs +1 -1
  109. package/text/index.js +1 -1
  110. package/textfield/index.cjs +1 -1
  111. package/textfield/index.js +1 -1
  112. package/variables-BkqZ2WGF.js +5 -0
  113. package/variables-CVumCR9l.cjs +1 -0
  114. package/Checkbox-BgrLxY6P.cjs +0 -1
  115. package/Checkbox-CdN1D5pD.js +0 -282
  116. package/CheckboxGroup-BdRG71EM.cjs +0 -1
  117. package/DateField-B9Yxknuy.cjs +0 -1
  118. package/DateField-BUZ7i9eS.js +0 -47
  119. package/Layout-BrEuHajQ.cjs +0 -16
  120. package/ListBoxSection-C_PqDyMP.cjs +0 -1
  121. package/ListBoxSection-D9EUOerv.js +0 -51
  122. package/Select-BGH_JDbz.cjs +0 -1
  123. package/Text-D5OSv6Uv.cjs +0 -1
  124. package/TextField.module-BndKUn-7.js +0 -13
  125. package/TextField.module-Du0bmSGZ.cjs +0 -1
@@ -1,9 +1,9 @@
1
1
  import { jsx as K } from "react/jsx-runtime";
2
2
  import { e as te } from "./ListBox-5GK4ZRj1.js";
3
3
  import { g as ie, m as le } from "./Collection-BkxwF21i.js";
4
- import m, { useState as z, useRef as k, useMemo as _, useCallback as C, useEffect as oe, createContext as W, useContext as D } from "react";
4
+ import m, { useState as z, useRef as _, useMemo as k, useCallback as C, useEffect as oe, createContext as W, useContext as D } from "react";
5
5
  import { d as ne, $ as M } from "./mergeProps-Ct8m5-xW.js";
6
- import { $ as X } from "./context-Dl_saGB6.js";
6
+ import { $ as j } from "./context-Dl_saGB6.js";
7
7
  import { flushSync as V } from "react-dom";
8
8
  import { g as se } from "./OverlayArrow-CjGslX2c.js";
9
9
  import { $ as re } from "./useEvent-smuTnX4G.js";
@@ -226,7 +226,7 @@ class $ {
226
226
  }
227
227
  }
228
228
  let de = 0;
229
- class A {
229
+ class X {
230
230
  /**
231
231
  * Prepares the view for reuse. Called just before the view is removed from the DOM.
232
232
  */
@@ -246,12 +246,12 @@ class A {
246
246
  this.virtualizer = e, this.key = ++de, this.viewType = t, this.children = /* @__PURE__ */ new Set(), this.reusableViews = /* @__PURE__ */ new Map(), this.layoutInfo = null, this.content = null, this.rendered = null;
247
247
  }
248
248
  }
249
- class ce extends A {
249
+ class ce extends X {
250
250
  constructor(e) {
251
251
  super(e, "root");
252
252
  }
253
253
  }
254
- class ue extends A {
254
+ class ue extends X {
255
255
  constructor(e, t, i) {
256
256
  super(e, i), this.parent = t;
257
257
  }
@@ -388,7 +388,7 @@ class ye {
388
388
  const ve = typeof document < "u" ? m.useLayoutEffect : () => {
389
389
  };
390
390
  function pe(s) {
391
- let [e, t] = z(new f(0, 0, 0, 0)), [i, l] = z(!1), [o, n] = z({}), a = k(!1), [h] = z(() => new ye({
391
+ let [e, t] = z(new f(0, 0, 0, 0)), [i, l] = z(!1), [o, n] = z({}), a = _(!1), [h] = z(() => new ye({
392
392
  collection: s.collection,
393
393
  layout: s.layout,
394
394
  delegate: {
@@ -403,7 +403,7 @@ function pe(s) {
403
403
  ve(() => {
404
404
  a.current && (a.current = !1, s.onVisibleRectChange(e));
405
405
  });
406
- let r = _(() => s.layoutOptions != null ? {
406
+ let r = k(() => s.layoutOptions != null ? {
407
407
  ...o,
408
408
  layoutOptions: s.layoutOptions
409
409
  } : o, [
@@ -422,7 +422,7 @@ function pe(s) {
422
422
  }, []), y = C(() => {
423
423
  l(!1);
424
424
  }, []);
425
- return _(() => ({
425
+ return k(() => ({
426
426
  virtualizer: h,
427
427
  visibleViews: d,
428
428
  setVisibleRect: t,
@@ -744,7 +744,7 @@ function be(s, e) {
744
744
  return t;
745
745
  }
746
746
  function xe(s, e) {
747
- let { contentSize: t, onVisibleRectChange: i, innerStyle: l, onScrollStart: o, onScrollEnd: n, scrollDirection: a = "both", ...h } = s, r = k({
747
+ let { contentSize: t, onVisibleRectChange: i, innerStyle: l, onScrollStart: o, onScrollEnd: n, scrollDirection: a = "both", ...h } = s, r = _({
748
748
  scrollTop: 0,
749
749
  scrollLeft: 0,
750
750
  scrollEndTime: 0,
@@ -752,7 +752,7 @@ function xe(s, e) {
752
752
  width: 0,
753
753
  height: 0,
754
754
  isScrolling: !1
755
- }).current, { direction: d } = X(), [c, u] = z(!1), y = C((p) => {
755
+ }).current, { direction: d } = j(), [c, u] = z(!1), y = C((p) => {
756
756
  p.target === p.currentTarget && (s.onScroll && s.onScroll(p), V(() => {
757
757
  let w = p.currentTarget.scrollTop, H = be(p.currentTarget, d);
758
758
  r.scrollTop = Math.max(0, Math.min(w, t.height - r.height)), r.scrollLeft = Math.max(0, Math.min(H, t.width - r.width)), i(new f(r.scrollLeft, r.scrollTop, r.width, r.height)), r.isScrolling || (r.isScrolling = !0, u(!0), window.dispatchEvent(new Event("tk.disconnect-observer")), o && o());
@@ -773,7 +773,7 @@ function xe(s, e) {
773
773
  re(e, "scroll", y), oe(() => () => {
774
774
  r.scrollTimeout != null && clearTimeout(r.scrollTimeout), r.isScrolling && window.dispatchEvent(new Event("tk.connect-observer"));
775
775
  }, []);
776
- let g = k(!1), v = ne((p) => {
776
+ let g = _(!1), v = ne((p) => {
777
777
  let w = e.current;
778
778
  if (!w || g.current) return;
779
779
  g.current = !0;
@@ -783,7 +783,7 @@ function xe(s, e) {
783
783
  }), (!H && O !== w.clientWidth || P !== w.clientHeight) && (r.width = w.clientWidth, r.height = w.clientHeight, p(() => {
784
784
  i(new f(r.scrollLeft, r.scrollTop, r.width, r.height));
785
785
  }))), g.current = !1;
786
- }), L = k(null), [J, Q] = z({});
786
+ }), L = _(null), [J, Q] = z({});
787
787
  M(() => {
788
788
  if (!g.current && (L.current == null || !t.equals(L.current)))
789
789
  if (typeof IS_REACT_ACT_ENVIRONMENT == "boolean" ? IS_REACT_ACT_ENVIRONMENT : typeof jest < "u") {
@@ -852,8 +852,8 @@ function Re(s) {
852
852
  let t = new $(s.scrollWidth, s.scrollHeight);
853
853
  return s.style.height = e, t;
854
854
  }
855
- function F(s) {
856
- let { style: e, className: t, layoutInfo: i, virtualizer: l, parent: o, children: n } = s, { direction: a } = X(), h = k(null);
855
+ function A(s) {
856
+ let { style: e, className: t, layoutInfo: i, virtualizer: l, parent: o, children: n } = s, { direction: a } = j(), h = _(null);
857
857
  return Ie({
858
858
  layoutInfo: i,
859
859
  virtualizer: l,
@@ -903,11 +903,11 @@ function Se(s, e, t) {
903
903
  };
904
904
  return B.set(s, a), a;
905
905
  }
906
- const j = /* @__PURE__ */ W(null), U = /* @__PURE__ */ W(null);
906
+ const F = /* @__PURE__ */ W(null), U = /* @__PURE__ */ W(null);
907
907
  function ze(s) {
908
- let { children: e, layout: t, layoutOptions: i } = s, l = _(() => typeof t == "function" ? new t() : t, [
908
+ let { children: e, layout: t, layoutOptions: i } = s, l = k(() => typeof t == "function" ? new t() : t, [
909
909
  t
910
- ]), o = _(() => ({
910
+ ]), o = k(() => ({
911
911
  isVirtualized: !0,
912
912
  layoutDelegate: l,
913
913
  dropTargetDelegate: l.getDropTargetFromPoint ? l : void 0,
@@ -939,7 +939,7 @@ function $e({ collection: s, persistedKeys: e, scrollRef: t, renderDropIndicator
939
939
  c && (c.scrollLeft = d.x, c.scrollTop = d.y);
940
940
  },
941
941
  persistedKeys: e,
942
- layoutOptions: _(() => n && a ? {
942
+ layoutOptions: k(() => n && a ? {
943
943
  ...n,
944
944
  ...a
945
945
  } : n || a, [
@@ -952,19 +952,19 @@ function $e({ collection: s, persistedKeys: e, scrollRef: t, renderDropIndicator
952
952
  onScrollStart: h.startScrolling,
953
953
  onScrollEnd: h.endScrolling
954
954
  }, t);
955
- return /* @__PURE__ */ m.createElement("div", r, /* @__PURE__ */ m.createElement(j.Provider, {
955
+ return /* @__PURE__ */ m.createElement("div", r, /* @__PURE__ */ m.createElement(F.Provider, {
956
956
  value: h
957
957
  }, G(null, h.visibleViews, i)));
958
958
  }
959
959
  function He({ parent: s, renderDropIndicator: e }) {
960
- let i = D(j).virtualizer.getVisibleView(s.key);
960
+ let i = D(F).virtualizer.getVisibleView(s.key);
961
961
  return G(i, Array.from(i.children), e);
962
962
  }
963
963
  function G(s, e, t) {
964
- return e.map((i) => ke(s, i, t));
964
+ return e.map((i) => _e(s, i, t));
965
965
  }
966
- function ke(s, e, t) {
967
- let i = /* @__PURE__ */ m.createElement(F, {
966
+ function _e(s, e, t) {
967
+ let i = /* @__PURE__ */ m.createElement(A, {
968
968
  key: e.key,
969
969
  layoutInfo: e.layoutInfo,
970
970
  virtualizer: e.virtualizer,
@@ -982,7 +982,7 @@ function Y(s, e, t, i) {
982
982
  let l = i(t);
983
983
  if (l) {
984
984
  let o = e.virtualizer.layout.getDropTargetLayoutInfo(t);
985
- l = /* @__PURE__ */ m.createElement(F, {
985
+ l = /* @__PURE__ */ m.createElement(A, {
986
986
  layoutInfo: o,
987
987
  virtualizer: e.virtualizer,
988
988
  parent: s == null ? void 0 : s.layoutInfo
@@ -990,7 +990,7 @@ function Y(s, e, t, i) {
990
990
  }
991
991
  return l;
992
992
  }
993
- class _e extends me {
993
+ class ke extends me {
994
994
  /**
995
995
  * When using the ListLayout our scroll container height is not calculated properly when the content is partially sectioned.
996
996
  * ```ts
@@ -1015,28 +1015,29 @@ class _e extends me {
1015
1015
  }), this.contentSize;
1016
1016
  }
1017
1017
  }
1018
- const Ce = "_listBox_1k43m_4", Le = "_listBoxPopover_1k43m_16", Ee = "_listBoxSectionHeading_1k43m_31", Ne = "_listBoxButton_1k43m_43", Te = "_listBoxItem_1k43m_55", Ve = "_listBoxLoadMoreItem_1k43m_167", Me = {
1018
+ const Ce = "_listBox_1kyjv_4", Le = "_listBoxPopover_1kyjv_16", Ee = "_listBoxSectionHeading_1kyjv_31", Ne = "_listBoxButton_1kyjv_43", Te = "_listBoxItem_1kyjv_55", Ve = "_textContent_1kyjv_69", Me = "_listBoxLoadMoreItem_1kyjv_175", Oe = {
1019
1019
  listBox: Ce,
1020
1020
  listBoxPopover: Le,
1021
1021
  listBoxSectionHeading: Ee,
1022
1022
  listBoxButton: Ne,
1023
1023
  listBoxItem: Te,
1024
- listBoxLoadMoreItem: Ve
1025
- }, je = ({
1024
+ textContent: Ve,
1025
+ listBoxLoadMoreItem: Me
1026
+ }, Ue = ({
1026
1027
  className: s,
1027
1028
  children: e,
1028
1029
  ...t
1029
1030
  }) => /* @__PURE__ */ K(
1030
1031
  ze,
1031
1032
  {
1032
- layout: _e,
1033
+ layout: ke,
1033
1034
  layoutOptions: {
1034
1035
  headingHeight: 38
1035
1036
  },
1036
1037
  children: /* @__PURE__ */ K(
1037
1038
  te,
1038
1039
  {
1039
- className: ae(Me.listBox, s),
1040
+ className: ae(Oe.listBox, s),
1040
1041
  ...t,
1041
1042
  children: e
1042
1043
  }
@@ -1044,6 +1045,6 @@ const Ce = "_listBox_1k43m_4", Le = "_listBoxPopover_1k43m_16", Ee = "_listBoxSe
1044
1045
  }
1045
1046
  );
1046
1047
  export {
1047
- je as L,
1048
- Me as s
1048
+ Ue as L,
1049
+ Oe as s
1049
1050
  };
@@ -1 +1 @@
1
- "use strict";const t=require("react/jsx-runtime"),r=require("./clsx-DKOfLqne.cjs"),n=require("./ListBox-2wZ6XOeD.cjs"),c=require("./ListBox-FD30iELk.cjs"),l=require("./Spinner-DIapnvIz.cjs"),d=require("./useLocalizedStringFormatter-BSac43NO.cjs"),x=({className:s,children:e,...o})=>t.jsx("button",{type:"button",className:r.clsx(n.styles.listBoxItem,n.styles.listBoxButton,s),...o,children:e}),u={"loading...":"Loading..."},m={"loading...":"Laddar..."},L={en:u,sv:m},B=({className:s,children:e,isLoading:o,...i})=>{const a=d.useLocalizedStringFormatter(L);return t.jsx(c.$eed445e0843c11d0$export$8e6d031a08cf56a1,{className:r.clsx(n.styles.listBoxLoadMoreItem,s),isLoading:o,...i,children:e||t.jsxs(t.Fragment,{children:[t.jsx(l.Spinner,{small:!0}),t.jsx("span",{"aria-hidden":!0,children:a.format("loading...")})]})})};exports.ListBoxButton=x;exports.ListBoxLoadMoreItem=B;
1
+ "use strict";const t=require("react/jsx-runtime"),r=require("./clsx-DKOfLqne.cjs"),n=require("./ListBox-CMM6O46x.cjs"),c=require("./ListBox-FD30iELk.cjs"),l=require("./Spinner-DIapnvIz.cjs"),d=require("./useLocalizedStringFormatter-BSac43NO.cjs"),x=({className:s,children:e,...o})=>t.jsx("button",{type:"button",className:r.clsx(n.styles.listBoxItem,n.styles.listBoxButton,s),...o,children:e}),u={"loading...":"Loading..."},m={"loading...":"Laddar..."},L={en:u,sv:m},B=({className:s,children:e,isLoading:o,...i})=>{const a=d.useLocalizedStringFormatter(L);return t.jsx(c.$eed445e0843c11d0$export$8e6d031a08cf56a1,{className:r.clsx(n.styles.listBoxLoadMoreItem,s),isLoading:o,...i,children:e||t.jsxs(t.Fragment,{children:[t.jsx(l.Spinner,{small:!0}),t.jsx("span",{"aria-hidden":!0,children:a.format("loading...")})]})})};exports.ListBoxButton=x;exports.ListBoxLoadMoreItem=B;
@@ -1,6 +1,6 @@
1
1
  import { jsx as t, jsxs as m, Fragment as d } from "react/jsx-runtime";
2
2
  import { c as e } from "./clsx-jbLnTBqA.js";
3
- import { s as a } from "./ListBox-Der0Te-R.js";
3
+ import { s as a } from "./ListBox-CfzKpJFW.js";
4
4
  import { $ as c } from "./ListBox-5GK4ZRj1.js";
5
5
  import { S as l } from "./Spinner-D6Fcu_Dp.js";
6
6
  import { u as p } from "./useLocalizedStringFormatter-aOhh7wdl.js";
@@ -0,0 +1 @@
1
+ "use strict";const t=require("react/jsx-runtime"),c=require("./ListBox-FD30iELk.cjs"),x=require("./clsx-DKOfLqne.cjs"),i=require("./ListBox-CMM6O46x.cjs"),l=require("./Dialog-DycTLpdr.cjs"),B=require("./Separator-DCi4bnBr.cjs"),$=({children:e,className:s,textValue:o,...n})=>t.jsx(c.$eed445e0843c11d0$export$a11e76429ed99b4,{className:x.clsx(i.styles.listBoxItem,s),textValue:o||(typeof e=="string"?e:void 0),...n,children:a=>t.jsx("div",{className:i.styles.textContent,children:typeof e=="function"?e(a):e})}),b=({className:e,children:s,...o})=>t.jsx(l.$07b14b47974efb58$export$5b6b19405a83ff9d,{className:x.clsx(e,i.styles.listBoxPopover),offset:0,...o,children:s}),r=({className:e,...s})=>t.jsx(B.$72a5793c14baf454$export$8b251419efc915eb,{className:x.clsx(i.styles.listBoxSectionHeading,e),...s}),d=({children:e,name:s,...o})=>t.jsxs(c.$eed445e0843c11d0$export$dca12b0bb56e4fc,{...o,children:[s&&t.jsx(r,{children:s}),e]});exports.ListBoxHeader=r;exports.ListBoxItem=$;exports.ListBoxPopover=b;exports.ListBoxSection=d;
@@ -0,0 +1,51 @@
1
+ import { jsx as s, jsxs as f } from "react/jsx-runtime";
2
+ import { a as m, b as x } from "./ListBox-5GK4ZRj1.js";
3
+ import { c as r } from "./clsx-jbLnTBqA.js";
4
+ import { s as a } from "./ListBox-CfzKpJFW.js";
5
+ import { b } from "./Dialog-D4Py85wi.js";
6
+ import { $ as p } from "./Separator-CQfDz_zr.js";
7
+ const N = ({
8
+ children: o,
9
+ className: t,
10
+ textValue: e,
11
+ ...c
12
+ }) => /* @__PURE__ */ s(
13
+ m,
14
+ {
15
+ className: r(a.listBoxItem, t),
16
+ textValue: e || (typeof o == "string" ? o : void 0),
17
+ ...c,
18
+ children: (i) => /* @__PURE__ */ s("div", { className: a.textContent, children: typeof o == "function" ? o(i) : o })
19
+ }
20
+ ), u = ({
21
+ className: o,
22
+ children: t,
23
+ ...e
24
+ }) => /* @__PURE__ */ s(
25
+ b,
26
+ {
27
+ className: r(o, a.listBoxPopover),
28
+ offset: 0,
29
+ ...e,
30
+ children: t
31
+ }
32
+ ), $ = ({ className: o, ...t }) => /* @__PURE__ */ s(
33
+ p,
34
+ {
35
+ className: r(a.listBoxSectionHeading, o),
36
+ ...t
37
+ }
38
+ ), y = ({
39
+ children: o,
40
+ name: t,
41
+ ...e
42
+ }) => /* @__PURE__ */ f(x, { ...e, children: [
43
+ t && /* @__PURE__ */ s($, { children: t }),
44
+ o
45
+ ] });
46
+ export {
47
+ N as L,
48
+ u as a,
49
+ y as b,
50
+ $ as c
51
+ };
@@ -1 +1 @@
1
- "use strict";require('./assets/ProgressBar.css');const e=require("react/jsx-runtime"),u=require("./Button-1sEX8jKn.cjs"),i=require("./Label-C3ZSrB04.cjs"),t=require("./clsx-DKOfLqne.cjs"),x="_progressBar_ojm9j_1",d="_label_ojm9j_9",l="_value_ojm9j_14",N="_bar_ojm9j_19",f="_fill_ojm9j_29",c={progressBar:x,label:d,value:l,bar:N,fill:f},v=({label:a,labelProps:s,showValueLabel:r=!1,...n})=>e.jsx(u.$0393f8ab869a0f1a$export$c17561cb55d4db30,{...n,className:t.clsx(c.progressBar,n.className),children:({percentage:j,valueText:m,isIndeterminate:_})=>e.jsxs(e.Fragment,{children:[a&&e.jsx(i.Label,{elementType:"span",...s,className:t.clsx(s==null?void 0:s.className,c.label),children:a}),r&&e.jsx(i.Label,{elementType:"span",...s,id:a?"":s==null?void 0:s.id,className:t.clsx(s==null?void 0:s.className,c.value),children:m}),e.jsx("div",{className:c.bar,children:e.jsx("div",{className:c.fill,style:{width:`${_?50:j}%`}})})]})});exports.ProgressBar=v;
1
+ "use strict";require('./assets/ProgressBar.css');const e=require("react/jsx-runtime"),u=require("./Button-1sEX8jKn.cjs"),i=require("./Label-Cbp1q387.cjs"),t=require("./clsx-DKOfLqne.cjs"),x="_progressBar_ojm9j_1",d="_label_ojm9j_9",l="_value_ojm9j_14",N="_bar_ojm9j_19",f="_fill_ojm9j_29",c={progressBar:x,label:d,value:l,bar:N,fill:f},v=({label:a,labelProps:s,showValueLabel:r=!1,...n})=>e.jsx(u.$0393f8ab869a0f1a$export$c17561cb55d4db30,{...n,className:t.clsx(c.progressBar,n.className),children:({percentage:j,valueText:m,isIndeterminate:_})=>e.jsxs(e.Fragment,{children:[a&&e.jsx(i.Label,{elementType:"span",...s,className:t.clsx(s==null?void 0:s.className,c.label),children:a}),r&&e.jsx(i.Label,{elementType:"span",...s,id:a?"":s==null?void 0:s.id,className:t.clsx(s==null?void 0:s.className,c.value),children:m}),e.jsx("div",{className:c.bar,children:e.jsx("div",{className:c.fill,style:{width:`${_?50:j}%`}})})]})});exports.ProgressBar=v;
@@ -1,6 +1,6 @@
1
1
  import { jsx as a, jsxs as j, Fragment as f } from "react/jsx-runtime";
2
2
  import { b as o } from "./Button-BbfVT9Yl.js";
3
- import { L as i } from "./Label-BqvFQoEF.js";
3
+ import { L as i } from "./Label-DH4JI6a4.js";
4
4
  import { c as m } from "./clsx-jbLnTBqA.js";
5
5
  import './assets/ProgressBar.css';const N = "_progressBar_ojm9j_1", v = "_label_ojm9j_9", h = "_value_ojm9j_14", u = "_bar_ojm9j_19", x = "_fill_ojm9j_29", e = {
6
6
  progressBar: N,
@@ -1,14 +1,14 @@
1
1
  import { jsx as I, jsxs as J } from "react/jsx-runtime";
2
2
  import { a as Q } from "./Group-BAd7alBM.js";
3
3
  import { $ as N, b as X, h as Y, e as Z, a as G, c as ee, d as ae, f as ie } from "./utils-D2iKpxcZ.js";
4
- import { $ as re, F as q } from "./FieldError-CIxlNQCM.js";
4
+ import { $ as re, F as k } from "./FieldError-DtEDCIQK.js";
5
5
  import { $ as de } from "./Form-CXcEMuBf.js";
6
6
  import { c as le } from "./Button-BbfVT9Yl.js";
7
7
  import { $ as oe, a as se, c as te } from "./SelectionIndicator-C2E23-zO.js";
8
8
  import { $ as ne } from "./Text-bqP9NeVg.js";
9
9
  import { a as y, c as ce } from "./mergeProps-Ct8m5-xW.js";
10
10
  import { $ as E } from "./filterDOMProps-wsa9OcNI.js";
11
- import R, { useMemo as w, useState as O, forwardRef as T, createContext as B } from "react";
11
+ import R, { useMemo as M, useState as O, forwardRef as T, createContext as w } from "react";
12
12
  import { a as fe, b as ue, $ as be } from "./useFormValidation-By7G-T7y.js";
13
13
  import { b as L } from "./usePress-BqQIhkNY.js";
14
14
  import { a as $e } from "./useFocusable-BJj-Bkig.js";
@@ -21,9 +21,9 @@ import { $ as xe } from "./useHover-DkC5FyNd.js";
21
21
  import { $ as Re } from "./VisuallyHidden-DuW70K-5.js";
22
22
  import { $ as ye } from "./useControlledState-u436Wbp1.js";
23
23
  import { c as W } from "./clsx-jbLnTBqA.js";
24
- import { a as Ve, L as ge } from "./Label-BqvFQoEF.js";
25
- import { T as De } from "./Text-BBFWBNAH.js";
26
- import './assets/Radio.css';const j = /* @__PURE__ */ new WeakMap();
24
+ import { a as Ve, L as ge } from "./Label-DH4JI6a4.js";
25
+ import { T as De } from "./Text-CnY7jiPS.js";
26
+ import './assets/Radio.css';const A = /* @__PURE__ */ new WeakMap();
27
27
  function Ie(a, e, r) {
28
28
  let { value: l, children: t, "aria-label": d, "aria-labelledby": n, onPressStart: i, onPressEnd: u, onPressChange: c, onPress: o, onPressUp: s, onClick: $ } = a;
29
29
  const b = a.isDisabled || e.isDisabled;
@@ -56,11 +56,11 @@ function Ie(a, e, r) {
56
56
  labelable: !0
57
57
  }), x = -1;
58
58
  e.selectedValue != null ? e.selectedValue === l && (x = 0) : (e.lastFocusedValue === l || e.lastFocusedValue == null) && (x = 0), b && (x = void 0);
59
- let { name: U, form: H, descriptionId: K, errorMessageId: z, validationBehavior: k } = j.get(e);
59
+ let { name: H, form: j, descriptionId: K, errorMessageId: z, validationBehavior: B } = A.get(e);
60
60
  return fe(r, e.defaultSelectedValue, e.setSelectedValue), ue({
61
- validationBehavior: k
61
+ validationBehavior: B
62
62
  }, e, r), {
63
- labelProps: y(S, w(() => ({
63
+ labelProps: y(S, M(() => ({
64
64
  onClick: (D) => D.preventDefault(),
65
65
  // Prevent label from being focused when mouse down on it.
66
66
  // Note, this does not prevent the input from being focused in the `click` event.
@@ -69,11 +69,11 @@ function Ie(a, e, r) {
69
69
  inputProps: y(v, {
70
70
  ...h,
71
71
  type: "radio",
72
- name: U,
73
- form: H,
72
+ name: H,
73
+ form: j,
74
74
  tabIndex: x,
75
75
  disabled: b,
76
- required: e.isRequired && k === "native",
76
+ required: e.isRequired && B === "native",
77
77
  checked: P,
78
78
  value: l,
79
79
  onChange: _,
@@ -130,7 +130,7 @@ function _e(a, e) {
130
130
  }), v;
131
131
  f === "next" ? (v = h.nextNode(), v || (h.currentNode = p.currentTarget, v = h.firstChild())) : (v = h.previousNode(), v || (h.currentNode = p.currentTarget, v = h.lastChild())), v && (v.focus(), e.setSelectedValue(v.value));
132
132
  }, S = ce(r);
133
- return j.set(e, {
133
+ return A.set(e, {
134
134
  name: S,
135
135
  form: l,
136
136
  descriptionId: m.id,
@@ -160,7 +160,7 @@ function _e(a, e) {
160
160
  }
161
161
  let Ce = Math.round(Math.random() * 1e10), Ee = 0;
162
162
  function Se(a) {
163
- let e = w(() => a.name || `radio-group-${Ce}-${++Ee}`, [
163
+ let e = M(() => a.name || `radio-group-${Ce}-${++Ee}`, [
164
164
  a.name
165
165
  ]);
166
166
  var r;
@@ -186,7 +186,7 @@ function Se(a) {
186
186
  isInvalid: o
187
187
  };
188
188
  }
189
- const Fe = /* @__PURE__ */ B(null), Me = /* @__PURE__ */ B(null), A = /* @__PURE__ */ B(null), we = /* @__PURE__ */ T(function(e, r) {
189
+ const Fe = /* @__PURE__ */ w(null), qe = /* @__PURE__ */ w(null), U = /* @__PURE__ */ w(null), Me = /* @__PURE__ */ T(function(e, r) {
190
190
  [e, r] = N(e, r, Fe);
191
191
  let { validationBehavior: l } = ee(de) || {};
192
192
  var t, d;
@@ -223,7 +223,7 @@ const Fe = /* @__PURE__ */ B(null), Me = /* @__PURE__ */ B(null), A = /* @__PURE
223
223
  }, /* @__PURE__ */ R.createElement(ie, {
224
224
  values: [
225
225
  [
226
- A,
226
+ U,
227
227
  i
228
228
  ],
229
229
  [
@@ -249,10 +249,10 @@ const Fe = /* @__PURE__ */ B(null), Me = /* @__PURE__ */ B(null), A = /* @__PURE
249
249
  ]
250
250
  ]
251
251
  }, /* @__PURE__ */ R.createElement(te, null, m.children)));
252
- }), Be = /* @__PURE__ */ T(function(e, r) {
252
+ }), we = /* @__PURE__ */ T(function(e, r) {
253
253
  let { inputRef: l = null, ...t } = e;
254
- [e, r] = N(t, r, Me);
255
- let d = R.useContext(A), n = X(w(() => Y(l, e.inputRef !== void 0 ? e.inputRef : null), [
254
+ [e, r] = N(t, r, qe);
255
+ let d = R.useContext(U), n = X(M(() => Y(l, e.inputRef !== void 0 ? e.inputRef : null), [
256
256
  l,
257
257
  e.inputRef
258
258
  ])), { labelProps: i, inputProps: u, isSelected: c, isDisabled: o, isPressed: s } = Ie({
@@ -301,9 +301,9 @@ const Fe = /* @__PURE__ */ B(null), Me = /* @__PURE__ */ B(null), A = /* @__PURE
301
301
  isSelected: c
302
302
  }
303
303
  }, C.children));
304
- }), ke = "_radioGroup_1m1j7_1", qe = "_wrap_1m1j7_12", Oe = "_radio_1m1j7_1", M = {
305
- radioGroup: ke,
306
- wrap: qe,
304
+ }), Be = "_radioGroup_1q7p6_1", ke = "_wrap_1q7p6_12", Oe = "_radio_1q7p6_1", q = {
305
+ radioGroup: Be,
306
+ wrap: ke,
307
307
  radio: Oe
308
308
  }, na = ({
309
309
  label: a,
@@ -315,22 +315,22 @@ const Fe = /* @__PURE__ */ B(null), Me = /* @__PURE__ */ B(null), A = /* @__PURE
315
315
  popover: n,
316
316
  ...i
317
317
  }) => /* @__PURE__ */ J(
318
- we,
318
+ Me,
319
319
  {
320
320
  ...i,
321
- className: W(M.radioGroup, t),
321
+ className: W(q.radioGroup, t),
322
322
  children: [
323
323
  /* @__PURE__ */ I(Ve, { popover: n, children: a && /* @__PURE__ */ I(ge, { children: a }) }),
324
324
  e && /* @__PURE__ */ I(De, { slot: "description", children: e }),
325
- d === "top" && /* @__PURE__ */ I(q, { "data-testid": "fieldError", children: r }),
326
- /* @__PURE__ */ I(Q, { className: M.wrap, children: l }),
327
- d === "bottom" && /* @__PURE__ */ I(q, { "data-testid": "fieldError", children: r })
325
+ d === "top" && /* @__PURE__ */ I(k, { "data-testid": "fieldError", children: r }),
326
+ /* @__PURE__ */ I(Q, { className: q.wrap, children: l }),
327
+ d === "bottom" && /* @__PURE__ */ I(k, { "data-testid": "fieldError", children: r })
328
328
  ]
329
329
  }
330
330
  ), ca = ({ className: a, ...e }) => /* @__PURE__ */ I(
331
- Be,
331
+ we,
332
332
  {
333
- className: W(M.radio, a),
333
+ className: W(q.radio, a),
334
334
  ...e
335
335
  }
336
336
  );
@@ -1 +1 @@
1
- "use strict";require('./assets/Radio.css');const V=require("react/jsx-runtime"),K=require("./Group-B0Wj9pI8.cjs"),P=require("./utils-CtICjCYt.cjs"),_=require("./FieldError-JWxR_EqN.cjs"),z=require("./Form-BuOomA4T.cjs"),J=require("./Button-1sEX8jKn.cjs"),O=require("./SelectionIndicator-ClG0GpJu.cjs"),Q=require("./Text-0wXj3J8E.cjs"),R=require("./mergeProps-Du5A8xi8.cjs"),S=require("./filterDOMProps-RRlKPKX0.cjs"),t=require("react"),w=require("./useFormValidation-DV2Ioblb.cjs"),j=require("./usePress-DmU79HEg.cjs"),X=require("./useFocusable-M4se1KJt.cjs"),Y=require("./utils-DRIRjPUS.cjs"),Z=require("./useFocusWithin-GBjoTL5o.cjs"),ee=require("./useField-DvszkIMx.cjs"),ae=require("./context-UOrD6Zxk.cjs"),ie=require("./useFocusRing-C-XVcAE5.cjs"),de=require("./useHover-DULSfLuK.cjs"),re=require("./VisuallyHidden-BMelU6B0.cjs"),le=require("./useControlledState-D0L6S_5r.cjs"),G=require("./clsx-DKOfLqne.cjs"),L=require("./Label-C3ZSrB04.cjs"),te=require("./Text-D5OSv6Uv.cjs"),N=new WeakMap;function oe(a,e,d){let{value:l,children:n,"aria-label":r,"aria-labelledby":c,onPressStart:i,onPressEnd:$,onPressChange:u,onPress:o,onPressUp:s,onClick:v}=a;const b=a.isDisabled||e.isDisabled;let g=n!=null,h=r!=null||c!=null;!g&&!h&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let m=e.selectedValue===l,I=F=>{F.stopPropagation(),e.setSelectedValue(l)},{pressProps:C,isPressed:D}=j.$f6c31cce2adf654f$export$45712eceda6fad21({onPressStart:i,onPressEnd:$,onPressChange:u,onPress:o,onPressUp:s,onClick:v,isDisabled:b}),{pressProps:E,isPressed:x}=j.$f6c31cce2adf654f$export$45712eceda6fad21({onPressStart:i,onPressEnd:$,onPressChange:u,onPressUp:s,onClick:v,isDisabled:b,onPress(F){var M;o==null||o(F),e.setSelectedValue(l),(M=d.current)===null||M===void 0||M.focus()}}),{focusableProps:f}=X.$f645667febf57a63$export$4c014de7c8940b4c(R.$3ef42575df84b30b$export$9d1611c77c2fe928(a,{onFocus:()=>e.setLastFocusedValue(l)}),d),q=R.$3ef42575df84b30b$export$9d1611c77c2fe928(C,f),p=S.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(a,{labelable:!0}),y=-1;e.selectedValue!=null?e.selectedValue===l&&(y=0):(e.lastFocusedValue===l||e.lastFocusedValue==null)&&(y=0),b&&(y=void 0);let{name:W,form:H,descriptionId:A,errorMessageId:U,validationBehavior:k}=N.get(e);return w.$99facab73266f662$export$5add1d006293d136(d,e.defaultSelectedValue,e.setSelectedValue),w.$e93e671b31057976$export$b8473d3665f3a75a({validationBehavior:k},e,d),{labelProps:R.$3ef42575df84b30b$export$9d1611c77c2fe928(E,t.useMemo(()=>({onClick:F=>F.preventDefault(),onMouseDown:F=>F.preventDefault()}),[])),inputProps:R.$3ef42575df84b30b$export$9d1611c77c2fe928(p,{...q,type:"radio",name:W,form:H,tabIndex:y,disabled:b,required:e.isRequired&&k==="native",checked:m,value:l,onChange:I,"aria-describedby":[a["aria-describedby"],e.isInvalid?U:null,A].filter(Boolean).join(" ")||void 0}),isDisabled:b,isSelected:m,isPressed:D||x}}function se(a,e){let{name:d,form:l,isReadOnly:n,isRequired:r,isDisabled:c,orientation:i="vertical",validationBehavior:$="aria"}=a,{direction:u}=ae.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),{isInvalid:o,validationErrors:s,validationDetails:v}=e.displayValidation,{labelProps:b,fieldProps:g,descriptionProps:h,errorMessageProps:m}=ee.$2baaea4c71418dea$export$294aa081a6c6f55d({...a,labelElementType:"span",isInvalid:e.isInvalid,errorMessage:a.errorMessage||s}),I=S.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(a,{labelable:!0}),{focusWithinProps:C}=Z.$9ab94262bd0047c7$export$420e68273165f4ec({onBlurWithin(x){var f;(f=a.onBlur)===null||f===void 0||f.call(a,x),e.selectedValue||e.setLastFocusedValue(null)},onFocusWithin:a.onFocus,onFocusWithinChange:a.onFocusChange}),D=x=>{let f;switch(x.key){case"ArrowRight":u==="rtl"&&i!=="vertical"?f="prev":f="next";break;case"ArrowLeft":u==="rtl"&&i!=="vertical"?f="next":f="prev";break;case"ArrowDown":f="next";break;case"ArrowUp":f="prev";break;default:return}x.preventDefault();let q=O.$9bf71ea28793e738$export$2d6ec8fc375ceafa(x.currentTarget,{from:x.target,accept:y=>y instanceof Y.$431fbd86ca7dc216$export$f21a1ffae260145a(y).HTMLInputElement&&y.type==="radio"}),p;f==="next"?(p=q.nextNode(),p||(q.currentNode=x.currentTarget,p=q.firstChild())):(p=q.previousNode(),p||(q.currentNode=x.currentTarget,p=q.lastChild())),p&&(p.focus(),e.setSelectedValue(p.value))},E=R.$bdb11010cef70236$export$f680877a34711e37(d);return N.set(e,{name:E,form:l,descriptionId:h.id,errorMessageId:m.id,validationBehavior:$}),{radioGroupProps:R.$3ef42575df84b30b$export$9d1611c77c2fe928(I,{role:"radiogroup",onKeyDown:D,"aria-invalid":e.isInvalid||void 0,"aria-errormessage":a["aria-errormessage"],"aria-readonly":n||void 0,"aria-required":r||void 0,"aria-disabled":c||void 0,"aria-orientation":i,...g,...C}),labelProps:b,descriptionProps:h,errorMessageProps:m,isInvalid:o,validationErrors:s,validationDetails:v}}let ne=Math.round(Math.random()*1e10),ce=0;function ue(a){let e=t.useMemo(()=>a.name||`radio-group-${ne}-${++ce}`,[a.name]);var d;let[l,n]=le.$458b0a5536c1a7cf$export$40bfa8c7b0832715(a.value,(d=a.defaultValue)!==null&&d!==void 0?d:null,a.onChange),[r]=t.useState(l),[c,i]=t.useState(null),$=w.$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...a,value:l}),u=v=>{!a.isReadOnly&&!a.isDisabled&&(n(v),$.commitValidation())},o=$.displayValidation.isInvalid;var s;return{...$,name:e,selectedValue:l,defaultSelectedValue:a.value!==void 0?r:(s=a.defaultValue)!==null&&s!==void 0?s:null,setSelectedValue:u,lastFocusedValue:c,setLastFocusedValue:i,isDisabled:a.isDisabled||!1,isReadOnly:a.isReadOnly||!1,isRequired:a.isRequired||!1,validationState:a.validationState||(o?"invalid":null),isInvalid:o}}const fe=t.createContext(null),$e=t.createContext(null),T=t.createContext(null),be=t.forwardRef(function(e,d){[e,d]=P.$64fa3d84918910a7$export$29f1550f4b0d4415(e,d,fe);let{validationBehavior:l}=P.$64fa3d84918910a7$export$fabf2dc03a41866e(z.$d3e0e05bdfcf66bd$export$c24727297075ec6a)||{};var n,r;let c=(r=(n=e.validationBehavior)!==null&&n!==void 0?n:l)!==null&&r!==void 0?r:"native",i=ue({...e,validationBehavior:c}),[$,u]=P.$64fa3d84918910a7$export$9d4c57ee4c6ffdd8(!e["aria-label"]&&!e["aria-labelledby"]),{radioGroupProps:o,labelProps:s,descriptionProps:v,errorMessageProps:b,...g}=se({...e,label:u,validationBehavior:c},i),h=P.$64fa3d84918910a7$export$4d86445c2cf5e3({...e,values:{orientation:e.orientation||"vertical",isDisabled:i.isDisabled,isReadOnly:i.isReadOnly,isRequired:i.isRequired,isInvalid:i.isInvalid,state:i},defaultClassName:"react-aria-RadioGroup"}),m=S.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,{global:!0});return t.createElement("div",{...R.$3ef42575df84b30b$export$9d1611c77c2fe928(m,h,o),ref:d,slot:e.slot||void 0,"data-orientation":e.orientation||"vertical","data-invalid":i.isInvalid||void 0,"data-disabled":i.isDisabled||void 0,"data-readonly":i.isReadOnly||void 0,"data-required":i.isRequired||void 0},t.createElement(P.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[T,i],[J.$01b77f81d0f07f68$export$75b6ee27786ba447,{...s,ref:$,elementType:"span"}],[Q.$514c0188e459b4c0$export$9afb8bc826b033ea,{slots:{description:v,errorMessage:b}}],[_.$ee014567cb39d3f0$export$ff05c3ac10437e03,g]]},t.createElement(O.$c8a5a149f625efcf$export$758399f318e6385a,null,h.children)))}),ve=t.forwardRef(function(e,d){let{inputRef:l=null,...n}=e;[e,d]=P.$64fa3d84918910a7$export$29f1550f4b0d4415(n,d,$e);let r=t.useContext(T),c=P.$df56164dff5785e2$export$4338b53315abf666(t.useMemo(()=>P.$5dc95899b306f630$export$c9058316764c140e(l,e.inputRef!==void 0?e.inputRef:null),[l,e.inputRef])),{labelProps:i,inputProps:$,isSelected:u,isDisabled:o,isPressed:s}=oe({...P.$64fa3d84918910a7$export$ef03459518577ad4(e),children:typeof e.children=="function"?!0:e.children},r,c),{isFocused:v,isFocusVisible:b,focusProps:g}=ie.$f7dceffc5ad7768b$export$4e328f61c538687f(),h=o||r.isReadOnly,{hoverProps:m,isHovered:I}=de.$6179b936705e76d3$export$ae780daf29e6d456({...e,isDisabled:h}),C=P.$64fa3d84918910a7$export$4d86445c2cf5e3({...e,defaultClassName:"react-aria-Radio",values:{isSelected:u,isPressed:s,isHovered:I,isFocused:v,isFocusVisible:b,isDisabled:o,isReadOnly:r.isReadOnly,isInvalid:r.isInvalid,isRequired:r.isRequired}}),D=S.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,{global:!0});return delete D.id,delete D.onClick,t.createElement("label",{...R.$3ef42575df84b30b$export$9d1611c77c2fe928(D,i,m,C),ref:d,"data-selected":u||void 0,"data-pressed":s||void 0,"data-hovered":I||void 0,"data-focused":v||void 0,"data-focus-visible":b||void 0,"data-disabled":o||void 0,"data-readonly":r.isReadOnly||void 0,"data-invalid":r.isInvalid||void 0,"data-required":r.isRequired||void 0},t.createElement(re.$5c3e21d68f1c4674$export$439d29a4e110a164,{elementType:"span"},t.createElement("input",{...R.$3ef42575df84b30b$export$9d1611c77c2fe928($,g),ref:c})),t.createElement(O.$1d5b8b8664671ef2$export$c9549807523555e0.Provider,{value:{isSelected:u}},C.children))}),pe="_radioGroup_1m1j7_1",xe="_wrap_1m1j7_12",Pe="_radio_1m1j7_1",B={radioGroup:pe,wrap:xe,radio:Pe},he=({label:a,description:e,errorMessage:d,children:l,className:n,errorPosition:r="top",popover:c,...i})=>V.jsxs(be,{...i,className:G.clsx(B.radioGroup,n),children:[V.jsx(L.LabelWrapper,{popover:c,children:a&&V.jsx(L.Label,{children:a})}),e&&V.jsx(te.Text,{slot:"description",children:e}),r==="top"&&V.jsx(_.FieldError,{"data-testid":"fieldError",children:d}),V.jsx(K.$a049562f99e7db0e$export$eb2fcfdbd7ba97d4,{className:B.wrap,children:l}),r==="bottom"&&V.jsx(_.FieldError,{"data-testid":"fieldError",children:d})]}),me=({className:a,...e})=>V.jsx(ve,{className:G.clsx(B.radio,a),...e});exports.Radio=me;exports.RadioGroup=he;
1
+ "use strict";require('./assets/Radio.css');const V=require("react/jsx-runtime"),K=require("./Group-B0Wj9pI8.cjs"),P=require("./utils-CtICjCYt.cjs"),_=require("./FieldError-DHzrxRPt.cjs"),z=require("./Form-BuOomA4T.cjs"),J=require("./Button-1sEX8jKn.cjs"),O=require("./SelectionIndicator-ClG0GpJu.cjs"),Q=require("./Text-0wXj3J8E.cjs"),R=require("./mergeProps-Du5A8xi8.cjs"),S=require("./filterDOMProps-RRlKPKX0.cjs"),t=require("react"),w=require("./useFormValidation-DV2Ioblb.cjs"),L=require("./usePress-DmU79HEg.cjs"),X=require("./useFocusable-M4se1KJt.cjs"),Y=require("./utils-DRIRjPUS.cjs"),Z=require("./useFocusWithin-GBjoTL5o.cjs"),ee=require("./useField-DvszkIMx.cjs"),ae=require("./context-UOrD6Zxk.cjs"),ie=require("./useFocusRing-C-XVcAE5.cjs"),de=require("./useHover-DULSfLuK.cjs"),re=require("./VisuallyHidden-BMelU6B0.cjs"),le=require("./useControlledState-D0L6S_5r.cjs"),N=require("./clsx-DKOfLqne.cjs"),G=require("./Label-Cbp1q387.cjs"),te=require("./Text-DUIBTA3N.cjs"),j=new WeakMap;function oe(a,e,d){let{value:l,children:n,"aria-label":r,"aria-labelledby":c,onPressStart:i,onPressEnd:$,onPressChange:u,onPress:o,onPressUp:s,onClick:v}=a;const b=a.isDisabled||e.isDisabled;let g=n!=null,h=r!=null||c!=null;!g&&!h&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let m=e.selectedValue===l,I=F=>{F.stopPropagation(),e.setSelectedValue(l)},{pressProps:C,isPressed:D}=L.$f6c31cce2adf654f$export$45712eceda6fad21({onPressStart:i,onPressEnd:$,onPressChange:u,onPress:o,onPressUp:s,onClick:v,isDisabled:b}),{pressProps:E,isPressed:x}=L.$f6c31cce2adf654f$export$45712eceda6fad21({onPressStart:i,onPressEnd:$,onPressChange:u,onPressUp:s,onClick:v,isDisabled:b,onPress(F){var M;o==null||o(F),e.setSelectedValue(l),(M=d.current)===null||M===void 0||M.focus()}}),{focusableProps:f}=X.$f645667febf57a63$export$4c014de7c8940b4c(R.$3ef42575df84b30b$export$9d1611c77c2fe928(a,{onFocus:()=>e.setLastFocusedValue(l)}),d),q=R.$3ef42575df84b30b$export$9d1611c77c2fe928(C,f),p=S.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(a,{labelable:!0}),y=-1;e.selectedValue!=null?e.selectedValue===l&&(y=0):(e.lastFocusedValue===l||e.lastFocusedValue==null)&&(y=0),b&&(y=void 0);let{name:W,form:H,descriptionId:A,errorMessageId:U,validationBehavior:k}=j.get(e);return w.$99facab73266f662$export$5add1d006293d136(d,e.defaultSelectedValue,e.setSelectedValue),w.$e93e671b31057976$export$b8473d3665f3a75a({validationBehavior:k},e,d),{labelProps:R.$3ef42575df84b30b$export$9d1611c77c2fe928(E,t.useMemo(()=>({onClick:F=>F.preventDefault(),onMouseDown:F=>F.preventDefault()}),[])),inputProps:R.$3ef42575df84b30b$export$9d1611c77c2fe928(p,{...q,type:"radio",name:W,form:H,tabIndex:y,disabled:b,required:e.isRequired&&k==="native",checked:m,value:l,onChange:I,"aria-describedby":[a["aria-describedby"],e.isInvalid?U:null,A].filter(Boolean).join(" ")||void 0}),isDisabled:b,isSelected:m,isPressed:D||x}}function se(a,e){let{name:d,form:l,isReadOnly:n,isRequired:r,isDisabled:c,orientation:i="vertical",validationBehavior:$="aria"}=a,{direction:u}=ae.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),{isInvalid:o,validationErrors:s,validationDetails:v}=e.displayValidation,{labelProps:b,fieldProps:g,descriptionProps:h,errorMessageProps:m}=ee.$2baaea4c71418dea$export$294aa081a6c6f55d({...a,labelElementType:"span",isInvalid:e.isInvalid,errorMessage:a.errorMessage||s}),I=S.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(a,{labelable:!0}),{focusWithinProps:C}=Z.$9ab94262bd0047c7$export$420e68273165f4ec({onBlurWithin(x){var f;(f=a.onBlur)===null||f===void 0||f.call(a,x),e.selectedValue||e.setLastFocusedValue(null)},onFocusWithin:a.onFocus,onFocusWithinChange:a.onFocusChange}),D=x=>{let f;switch(x.key){case"ArrowRight":u==="rtl"&&i!=="vertical"?f="prev":f="next";break;case"ArrowLeft":u==="rtl"&&i!=="vertical"?f="next":f="prev";break;case"ArrowDown":f="next";break;case"ArrowUp":f="prev";break;default:return}x.preventDefault();let q=O.$9bf71ea28793e738$export$2d6ec8fc375ceafa(x.currentTarget,{from:x.target,accept:y=>y instanceof Y.$431fbd86ca7dc216$export$f21a1ffae260145a(y).HTMLInputElement&&y.type==="radio"}),p;f==="next"?(p=q.nextNode(),p||(q.currentNode=x.currentTarget,p=q.firstChild())):(p=q.previousNode(),p||(q.currentNode=x.currentTarget,p=q.lastChild())),p&&(p.focus(),e.setSelectedValue(p.value))},E=R.$bdb11010cef70236$export$f680877a34711e37(d);return j.set(e,{name:E,form:l,descriptionId:h.id,errorMessageId:m.id,validationBehavior:$}),{radioGroupProps:R.$3ef42575df84b30b$export$9d1611c77c2fe928(I,{role:"radiogroup",onKeyDown:D,"aria-invalid":e.isInvalid||void 0,"aria-errormessage":a["aria-errormessage"],"aria-readonly":n||void 0,"aria-required":r||void 0,"aria-disabled":c||void 0,"aria-orientation":i,...g,...C}),labelProps:b,descriptionProps:h,errorMessageProps:m,isInvalid:o,validationErrors:s,validationDetails:v}}let ne=Math.round(Math.random()*1e10),ce=0;function ue(a){let e=t.useMemo(()=>a.name||`radio-group-${ne}-${++ce}`,[a.name]);var d;let[l,n]=le.$458b0a5536c1a7cf$export$40bfa8c7b0832715(a.value,(d=a.defaultValue)!==null&&d!==void 0?d:null,a.onChange),[r]=t.useState(l),[c,i]=t.useState(null),$=w.$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...a,value:l}),u=v=>{!a.isReadOnly&&!a.isDisabled&&(n(v),$.commitValidation())},o=$.displayValidation.isInvalid;var s;return{...$,name:e,selectedValue:l,defaultSelectedValue:a.value!==void 0?r:(s=a.defaultValue)!==null&&s!==void 0?s:null,setSelectedValue:u,lastFocusedValue:c,setLastFocusedValue:i,isDisabled:a.isDisabled||!1,isReadOnly:a.isReadOnly||!1,isRequired:a.isRequired||!1,validationState:a.validationState||(o?"invalid":null),isInvalid:o}}const fe=t.createContext(null),$e=t.createContext(null),T=t.createContext(null),be=t.forwardRef(function(e,d){[e,d]=P.$64fa3d84918910a7$export$29f1550f4b0d4415(e,d,fe);let{validationBehavior:l}=P.$64fa3d84918910a7$export$fabf2dc03a41866e(z.$d3e0e05bdfcf66bd$export$c24727297075ec6a)||{};var n,r;let c=(r=(n=e.validationBehavior)!==null&&n!==void 0?n:l)!==null&&r!==void 0?r:"native",i=ue({...e,validationBehavior:c}),[$,u]=P.$64fa3d84918910a7$export$9d4c57ee4c6ffdd8(!e["aria-label"]&&!e["aria-labelledby"]),{radioGroupProps:o,labelProps:s,descriptionProps:v,errorMessageProps:b,...g}=se({...e,label:u,validationBehavior:c},i),h=P.$64fa3d84918910a7$export$4d86445c2cf5e3({...e,values:{orientation:e.orientation||"vertical",isDisabled:i.isDisabled,isReadOnly:i.isReadOnly,isRequired:i.isRequired,isInvalid:i.isInvalid,state:i},defaultClassName:"react-aria-RadioGroup"}),m=S.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,{global:!0});return t.createElement("div",{...R.$3ef42575df84b30b$export$9d1611c77c2fe928(m,h,o),ref:d,slot:e.slot||void 0,"data-orientation":e.orientation||"vertical","data-invalid":i.isInvalid||void 0,"data-disabled":i.isDisabled||void 0,"data-readonly":i.isReadOnly||void 0,"data-required":i.isRequired||void 0},t.createElement(P.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[T,i],[J.$01b77f81d0f07f68$export$75b6ee27786ba447,{...s,ref:$,elementType:"span"}],[Q.$514c0188e459b4c0$export$9afb8bc826b033ea,{slots:{description:v,errorMessage:b}}],[_.$ee014567cb39d3f0$export$ff05c3ac10437e03,g]]},t.createElement(O.$c8a5a149f625efcf$export$758399f318e6385a,null,h.children)))}),ve=t.forwardRef(function(e,d){let{inputRef:l=null,...n}=e;[e,d]=P.$64fa3d84918910a7$export$29f1550f4b0d4415(n,d,$e);let r=t.useContext(T),c=P.$df56164dff5785e2$export$4338b53315abf666(t.useMemo(()=>P.$5dc95899b306f630$export$c9058316764c140e(l,e.inputRef!==void 0?e.inputRef:null),[l,e.inputRef])),{labelProps:i,inputProps:$,isSelected:u,isDisabled:o,isPressed:s}=oe({...P.$64fa3d84918910a7$export$ef03459518577ad4(e),children:typeof e.children=="function"?!0:e.children},r,c),{isFocused:v,isFocusVisible:b,focusProps:g}=ie.$f7dceffc5ad7768b$export$4e328f61c538687f(),h=o||r.isReadOnly,{hoverProps:m,isHovered:I}=de.$6179b936705e76d3$export$ae780daf29e6d456({...e,isDisabled:h}),C=P.$64fa3d84918910a7$export$4d86445c2cf5e3({...e,defaultClassName:"react-aria-Radio",values:{isSelected:u,isPressed:s,isHovered:I,isFocused:v,isFocusVisible:b,isDisabled:o,isReadOnly:r.isReadOnly,isInvalid:r.isInvalid,isRequired:r.isRequired}}),D=S.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,{global:!0});return delete D.id,delete D.onClick,t.createElement("label",{...R.$3ef42575df84b30b$export$9d1611c77c2fe928(D,i,m,C),ref:d,"data-selected":u||void 0,"data-pressed":s||void 0,"data-hovered":I||void 0,"data-focused":v||void 0,"data-focus-visible":b||void 0,"data-disabled":o||void 0,"data-readonly":r.isReadOnly||void 0,"data-invalid":r.isInvalid||void 0,"data-required":r.isRequired||void 0},t.createElement(re.$5c3e21d68f1c4674$export$439d29a4e110a164,{elementType:"span"},t.createElement("input",{...R.$3ef42575df84b30b$export$9d1611c77c2fe928($,g),ref:c})),t.createElement(O.$1d5b8b8664671ef2$export$c9549807523555e0.Provider,{value:{isSelected:u}},C.children))}),pe="_radioGroup_1q7p6_1",xe="_wrap_1q7p6_12",Pe="_radio_1q7p6_1",B={radioGroup:pe,wrap:xe,radio:Pe},he=({label:a,description:e,errorMessage:d,children:l,className:n,errorPosition:r="top",popover:c,...i})=>V.jsxs(be,{...i,className:N.clsx(B.radioGroup,n),children:[V.jsx(G.LabelWrapper,{popover:c,children:a&&V.jsx(G.Label,{children:a})}),e&&V.jsx(te.Text,{slot:"description",children:e}),r==="top"&&V.jsx(_.FieldError,{"data-testid":"fieldError",children:d}),V.jsx(K.$a049562f99e7db0e$export$eb2fcfdbd7ba97d4,{className:B.wrap,children:l}),r==="bottom"&&V.jsx(_.FieldError,{"data-testid":"fieldError",children:d})]}),me=({className:a,...e})=>V.jsx(ve,{className:N.clsx(B.radio,a),...e});exports.Radio=me;exports.RadioGroup=he;