@midas-ds/components 1.0.2 → 1.0.3

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/Button-B4vMZbC6.js +182 -0
  2. package/CHANGELOG.md +10 -0
  3. package/Checkbox-DnKWanep.js +402 -0
  4. package/{Collection-B3xUVWPF.js → Collection-COLWgm24.js} +179 -152
  5. package/Dialog-Cb6toyXO.js +1951 -0
  6. package/DragAndDrop-B0T3WgjL.js +40 -0
  7. package/FocusScope-C8i7CH6y.js +513 -0
  8. package/Form-BQQs3jUk.js +238 -0
  9. package/Group-CdwXhx8Q.js +42 -0
  10. package/{Hidden-BQWDvze4.js → Hidden-DngIphiL.js} +1 -1
  11. package/Link-iAZLB3RI.js +75 -0
  12. package/ListBox-BKWkIIm6.js +474 -0
  13. package/ListKeyboardDelegate-BH-K5hyq.js +172 -0
  14. package/{PressResponder-DP8ZDNGy.js → PressResponder-Cz-TRBHO.js} +10 -10
  15. package/README.md +21 -3
  16. package/SelectionManager-8o40f7mx.js +1047 -0
  17. package/Separator-BlvmQjwz.js +49 -0
  18. package/Tag--W5TgxmK.js +728 -0
  19. package/Text-CQPW6xs7.js +15 -0
  20. package/TextField-DeK_yiK-.js +225 -0
  21. package/TextField.module-0-u4LVPp.js +143 -0
  22. package/{VisuallyHidden-B_XzVvlX.js → VisuallyHidden-CFx06Bae.js} +1 -1
  23. package/{context-ScOIq_Gu.js → context-Bnqknrce.js} +1 -1
  24. package/index-B-jHjTDC.js +120 -0
  25. package/{index-CorR1LBD.js → index-BPdc9gJ8.js} +3 -3
  26. package/index-DK9ZACEc.js +642 -0
  27. package/{index-Dl1Q-tbj.js → index-KSgQWWiy.js} +5315 -5315
  28. package/index.js +45 -47
  29. package/index15.js +1 -1
  30. package/index16.js +1 -1
  31. package/index25.js +1 -1
  32. package/index26.js +1 -1
  33. package/index3.js +2 -4
  34. package/index31.js +3 -3
  35. package/index32.js +2 -2
  36. package/index33.js +2 -2
  37. package/index34.js +1 -1
  38. package/index35.js +1 -1
  39. package/index36.js +1 -1
  40. package/index37.js +1 -1
  41. package/index38.js +1 -1
  42. package/index39.js +1 -1
  43. package/index40.js +1 -1
  44. package/index41.js +1 -1
  45. package/index42.js +1 -1
  46. package/index43.js +1 -1
  47. package/index45.js +3 -3
  48. package/index5.js +1 -1
  49. package/index50.js +1 -1
  50. package/index52.js +3 -3
  51. package/index53.js +3 -3
  52. package/index54.js +1 -1
  53. package/index55.js +4 -4
  54. package/index56.js +1 -1
  55. package/index57.js +1 -1
  56. package/index58.js +1 -1
  57. package/index59.js +3 -3
  58. package/index60.js +1 -1
  59. package/index61.js +1 -1
  60. package/index62.js +1 -1
  61. package/index63.js +4 -4
  62. package/index64.js +3 -3
  63. package/index65.js +3 -3
  64. package/index66.js +1 -1
  65. package/index67.js +3 -3
  66. package/index68.js +2 -2
  67. package/index69.js +1 -1
  68. package/index71.js +1 -1
  69. package/index76.js +5 -5
  70. package/index77.js +2 -2
  71. package/index78.js +2 -2
  72. package/index79.js +1 -1
  73. package/index80.js +226 -227
  74. package/index81.js +197 -199
  75. package/index82.js +192 -195
  76. package/index83.js +181 -183
  77. package/index84.js +52 -54
  78. package/index85.js +261 -262
  79. package/index86.js +262 -262
  80. package/index87.js +209 -211
  81. package/index88.js +436 -440
  82. package/index89.js +962 -964
  83. package/index90.js +2401 -2399
  84. package/index92.js +5 -5
  85. package/index93.js +1 -1
  86. package/index94.js +1 -1
  87. package/link/Link.d.ts +2 -2
  88. package/link-button/LinkButton.d.ts +1 -1
  89. package/package.json +7 -1
  90. package/{react.esm-D8HpDGKP.js → react.esm-sMU8Z7rL.js} +1872 -1872
  91. package/textfield/index.d.ts +0 -2
  92. package/{useControlledState-S_TYcV_c.js → useControlledState-DrAoodI6.js} +1 -1
  93. package/{useDescription-D4_zk_sA.js → useDescription-BPs7eRff.js} +1 -1
  94. package/useField-Dz62UHCP.js +67 -0
  95. package/{useFilter-BnJDBCkt.js → useFilter-ViwzkzZe.js} +1 -1
  96. package/useFocusRing-BKGhL91C.js +1297 -0
  97. package/{useFocusable-C-N9wcwm.js → useFocusable-CRSmYEQc.js} +11 -8
  98. package/{useGridSelectionCheckbox-i1rsjlC-.js → useGridSelectionCheckbox-CVEvUCJL.js} +3 -3
  99. package/useHasTabbableChild-C8y4fwiY.js +34 -0
  100. package/{useHighlightSelectionDescription-JVx2MW_e.js → useHighlightSelectionDescription-CD74uzLh.js} +19 -19
  101. package/useListState-DKnP5TB5.js +119 -0
  102. package/{useLocalizedStringFormatter-DVCAZqcL.js → useLocalizedStringFormatter-DsZ-ZWSk.js} +29 -29
  103. package/{useSingleSelectListState-CmX9_L5H.js → useSingleSelectListState-BHTLh8Ob.js} +5 -5
  104. package/Button-CCevm2s3.js +0 -183
  105. package/Checkbox-CllWDBxF.js +0 -405
  106. package/Dialog-CLTyYwkS.js +0 -1889
  107. package/DragAndDrop-OTN7La7U.js +0 -42
  108. package/FocusScope-BR0SJ-cZ.js +0 -512
  109. package/Form-DXLoQL91.js +0 -240
  110. package/Group-DPMuN3h8.js +0 -44
  111. package/Label-C18A_4Z5.js +0 -69
  112. package/Link-BU1h3K2a.js +0 -77
  113. package/ListBox-D21tdwTs.js +0 -463
  114. package/ListKeyboardDelegate-DxMjfMsI.js +0 -172
  115. package/SelectionManager-D4WtKtey.js +0 -988
  116. package/Separator-DLUHK9vv.js +0 -48
  117. package/Tag-CEd6WWSc.js +0 -725
  118. package/Text-DGLaY3HR.js +0 -17
  119. package/TextField-C_hq9WeT.js +0 -226
  120. package/TextField.module-Cwq1FAm7.js +0 -141
  121. package/index-CEg5vZQH.js +0 -132
  122. package/index-CgfokhRq.js +0 -674
  123. package/useFocusRing-D97-G3fT.js +0 -1324
  124. package/useHasTabbableChild-DeuCnGGv.js +0 -34
  125. package/useListState-DSOTbsL3.js +0 -119
package/index81.js CHANGED
@@ -1,86 +1,86 @@
1
- import { jsxs as T, jsx as p } from "react/jsx-runtime";
1
+ import { jsxs as T, jsx as v } from "react/jsx-runtime";
2
2
  import b, { useMemo as M, useRef as E, useState as w, forwardRef as z, useCallback as J, createContext as q, useContext as Q } from "react";
3
- import { a as X, $ as Y } from "./Button-CCevm2s3.js";
4
- import { a as Z, $ as ee, b as ae, c as te } from "./ListBox-D21tdwTs.js";
5
- import { e as le, f as ie, g as oe, h as se, i as re, a as ne } from "./Dialog-CLTyYwkS.js";
6
- import { n as V, e as N, k as de, G as ce, D as fe, a as W, u as j, c as ue, v as be, w as $e, d as H, x as ve } from "./useFocusRing-D97-G3fT.js";
7
- import { a as me, b as pe, $ as ye, c as ge, d as xe } from "./Form-DXLoQL91.js";
3
+ import { a as X, $ as Y } from "./Button-B4vMZbC6.js";
4
+ import { a as Z, $ as ee, b as ae, c as te } from "./ListBox-BKWkIIm6.js";
5
+ import { e as le, f as ne, g as ie, h as oe, i as de, a as se } from "./Dialog-Cb6toyXO.js";
6
+ import { n as V, e as N, l as re, K as ce, G as fe, a as W, x as j, c as ue, y as be, z as $e, d as H, A as me } from "./useFocusRing-BKGhL91C.js";
7
+ import { d as pe, e as ve, c as ye, $ as ge, a as xe } from "./Form-BQQs3jUk.js";
8
8
  import { $ as he } from "./intlStrings-Cd44R5hT.js";
9
- import { $ as Pe, a as De } from "./Label-C18A_4Z5.js";
10
- import { $ as U } from "./Text-DGLaY3HR.js";
11
- import { c as Re } from "./Collection-B3xUVWPF.js";
12
- import { $ as Se } from "./useSingleSelectListState-CmX9_L5H.js";
13
- import { $ as Ie, a as Be } from "./ListKeyboardDelegate-DxMjfMsI.js";
14
- import { g as Fe } from "./SelectionManager-D4WtKtey.js";
15
- import { $ as Ce } from "./VisuallyHidden-B_XzVvlX.js";
16
- import { $ as ke } from "./useLocalizedStringFormatter-DVCAZqcL.js";
17
- import { I as Ke } from "./TextField-C_hq9WeT.js";
9
+ import { b as Pe, $ as De } from "./useField-Dz62UHCP.js";
10
+ import { $ as U } from "./Text-CQPW6xs7.js";
11
+ import { $ as Re } from "./Collection-COLWgm24.js";
12
+ import { $ as Se } from "./useSingleSelectListState-BHTLh8Ob.js";
13
+ import { $ as Ie, a as Be } from "./ListKeyboardDelegate-BH-K5hyq.js";
14
+ import { g as Ce } from "./SelectionManager-8o40f7mx.js";
15
+ import { $ as Fe } from "./VisuallyHidden-CFx06Bae.js";
16
+ import { $ as Ke } from "./useLocalizedStringFormatter-DsZ-ZWSk.js";
17
+ import { I as ke } from "./TextField-DeK_yiK-.js";
18
18
  import { C as _e } from "./chevron-down-Cd1bkzXT.js";
19
19
  import './Select.css';const A = /* @__PURE__ */ new WeakMap();
20
- function Ee(e, a, i) {
21
- let { keyboardDelegate: o, isDisabled: l, isRequired: d, name: s, validationBehavior: t = "aria" } = e, c = Ie({
20
+ function Ee(e, a, d) {
21
+ let { keyboardDelegate: i, isDisabled: l, isRequired: o, name: r, validationBehavior: t = "aria" } = e, n = Ie({
22
22
  usage: "search",
23
23
  sensitivity: "base"
24
- }), r = M(() => o || new Be(a.collection, a.disabledKeys, i, c), [
25
- o,
24
+ }), c = M(() => i || new Be(a.collection, a.disabledKeys, d, n), [
25
+ i,
26
26
  a.collection,
27
27
  a.disabledKeys,
28
- c
29
- ]), { menuTriggerProps: n, menuProps: f } = le({
28
+ n
29
+ ]), { menuTriggerProps: s, menuProps: f } = le({
30
30
  isDisabled: l,
31
31
  type: "listbox"
32
- }, a, i), m = (u) => {
32
+ }, a, d), p = (u) => {
33
33
  switch (u.key) {
34
34
  case "ArrowLeft": {
35
- var g, x;
35
+ var x, h;
36
36
  u.preventDefault();
37
- let D = a.selectedKey != null ? (g = r.getKeyAbove) === null || g === void 0 ? void 0 : g.call(r, a.selectedKey) : (x = r.getFirstKey) === null || x === void 0 ? void 0 : x.call(r);
38
- D && a.setSelectedKey(D);
37
+ let R = a.selectedKey != null ? (x = c.getKeyAbove) === null || x === void 0 ? void 0 : x.call(c, a.selectedKey) : (h = c.getFirstKey) === null || h === void 0 ? void 0 : h.call(c);
38
+ R && a.setSelectedKey(R);
39
39
  break;
40
40
  }
41
41
  case "ArrowRight": {
42
- var K, _;
42
+ var k, _;
43
43
  u.preventDefault();
44
- let D = a.selectedKey != null ? (K = r.getKeyBelow) === null || K === void 0 ? void 0 : K.call(r, a.selectedKey) : (_ = r.getFirstKey) === null || _ === void 0 ? void 0 : _.call(r);
45
- D && a.setSelectedKey(D);
44
+ let R = a.selectedKey != null ? (k = c.getKeyBelow) === null || k === void 0 ? void 0 : k.call(c, a.selectedKey) : (_ = c.getFirstKey) === null || _ === void 0 ? void 0 : _.call(c);
45
+ R && a.setSelectedKey(R);
46
46
  break;
47
47
  }
48
48
  }
49
- }, { typeSelectProps: v } = Fe({
50
- keyboardDelegate: r,
49
+ }, { typeSelectProps: m } = Ce({
50
+ keyboardDelegate: c,
51
51
  selectionManager: a.selectionManager,
52
52
  onTypeSelect(u) {
53
53
  a.setSelectedKey(u);
54
54
  }
55
- }), { isInvalid: h, validationErrors: S, validationDetails: B } = a.displayValidation, { labelProps: F, fieldProps: P, descriptionProps: y, errorMessageProps: C } = Pe({
55
+ }), { isInvalid: y, validationErrors: P, validationDetails: B } = a.displayValidation, { labelProps: C, fieldProps: D, descriptionProps: g, errorMessageProps: F } = Pe({
56
56
  ...e,
57
57
  labelElementType: "span",
58
- isInvalid: h,
59
- errorMessage: e.errorMessage || S
58
+ isInvalid: y,
59
+ errorMessage: e.errorMessage || P
60
60
  });
61
- v.onKeyDown = v.onKeyDownCapture, delete v.onKeyDownCapture;
62
- let k = V(e, {
61
+ m.onKeyDown = m.onKeyDownCapture, delete m.onKeyDownCapture;
62
+ let K = V(e, {
63
63
  labelable: !0
64
- }), $ = N(v, n, P), I = de();
64
+ }), $ = N(m, s, D), I = re();
65
65
  return A.set(a, {
66
66
  isDisabled: l,
67
- isRequired: d,
68
- name: s,
67
+ isRequired: o,
68
+ name: r,
69
69
  validationBehavior: t
70
70
  }), {
71
71
  labelProps: {
72
- ...F,
72
+ ...C,
73
73
  onClick: () => {
74
74
  if (!e.isDisabled) {
75
75
  var u;
76
- (u = i.current) === null || u === void 0 || u.focus(), ce("keyboard");
76
+ (u = d.current) === null || u === void 0 || u.focus(), ce("keyboard");
77
77
  }
78
78
  }
79
79
  },
80
- triggerProps: N(k, {
80
+ triggerProps: N(K, {
81
81
  ...$,
82
82
  isDisabled: l,
83
- onKeyDown: fe($.onKeyDown, m, e.onKeyDown),
83
+ onKeyDown: fe($.onKeyDown, p, e.onKeyDown),
84
84
  onKeyUp: e.onKeyUp,
85
85
  "aria-labelledby": [
86
86
  I,
@@ -108,30 +108,30 @@ function Ee(e, a, i) {
108
108
  u.currentTarget.contains(u.relatedTarget) || (e.onBlur && e.onBlur(u), e.onFocusChange && e.onFocusChange(!1), a.setFocused(!1));
109
109
  },
110
110
  "aria-labelledby": [
111
- P["aria-labelledby"],
112
- $["aria-label"] && !P["aria-labelledby"] ? $.id : null
111
+ D["aria-labelledby"],
112
+ $["aria-label"] && !D["aria-labelledby"] ? $.id : null
113
113
  ].filter(Boolean).join(" ")
114
114
  },
115
- descriptionProps: y,
116
- errorMessageProps: C,
117
- isInvalid: h,
118
- validationErrors: S,
115
+ descriptionProps: g,
116
+ errorMessageProps: F,
117
+ isInvalid: y,
118
+ validationErrors: P,
119
119
  validationDetails: B
120
120
  };
121
121
  }
122
- function we(e, a, i) {
123
- let o = A.get(a) || {}, { autoComplete: l, name: d = o.name, isDisabled: s = o.isDisabled } = e, { validationBehavior: t, isRequired: c } = o, { visuallyHiddenProps: r } = Ce();
124
- me(e.selectRef, a.selectedKey, a.setSelectedKey), pe({
122
+ function we(e, a, d) {
123
+ let i = A.get(a) || {}, { autoComplete: l, name: o = i.name, isDisabled: r = i.isDisabled } = e, { validationBehavior: t, isRequired: n } = i, { visuallyHiddenProps: c } = Fe();
124
+ pe(e.selectRef, a.selectedKey, a.setSelectedKey), ve({
125
125
  validationBehavior: t,
126
126
  focus: () => {
127
127
  var f;
128
- return (f = i.current) === null || f === void 0 ? void 0 : f.focus();
128
+ return (f = d.current) === null || f === void 0 ? void 0 : f.focus();
129
129
  }
130
130
  }, a, e.selectRef);
131
- var n;
131
+ var s;
132
132
  return {
133
133
  containerProps: {
134
- ...r,
134
+ ...c,
135
135
  "aria-hidden": !0,
136
136
  // @ts-ignore
137
137
  "data-react-aria-prevent-focus": !0,
@@ -146,140 +146,139 @@ function we(e, a, i) {
146
146
  selectProps: {
147
147
  tabIndex: -1,
148
148
  autoComplete: l,
149
- disabled: s,
150
- required: t === "native" && c,
151
- name: d,
152
- value: (n = a.selectedKey) !== null && n !== void 0 ? n : "",
149
+ disabled: r,
150
+ required: t === "native" && n,
151
+ name: o,
152
+ value: (s = a.selectedKey) !== null && s !== void 0 ? s : "",
153
153
  onChange: (f) => a.setSelectedKey(f.target.value)
154
154
  }
155
155
  };
156
156
  }
157
157
  function Me(e) {
158
- let { state: a, triggerRef: i, label: o, name: l, isDisabled: d } = e, s = E(null), { containerProps: t, selectProps: c } = we({
158
+ let { state: a, triggerRef: d, label: i, name: l, isDisabled: o } = e, r = E(null), { containerProps: t, selectProps: n } = we({
159
159
  ...e,
160
- selectRef: s
161
- }, a, i);
162
- var r;
160
+ selectRef: r
161
+ }, a, d);
162
+ var c;
163
163
  return a.collection.size <= 300 ? /* @__PURE__ */ b.createElement("div", {
164
164
  ...t,
165
165
  "data-testid": "hidden-select-container"
166
- }, /* @__PURE__ */ b.createElement("label", null, o, /* @__PURE__ */ b.createElement("select", {
167
- ...c,
168
- ref: s
166
+ }, /* @__PURE__ */ b.createElement("label", null, i, /* @__PURE__ */ b.createElement("select", {
167
+ ...n,
168
+ ref: r
169
169
  }, /* @__PURE__ */ b.createElement("option", null), [
170
170
  ...a.collection.getKeys()
171
- ].map((n) => {
172
- let f = a.collection.getItem(n);
171
+ ].map((s) => {
172
+ let f = a.collection.getItem(s);
173
173
  if (f && f.type === "item") return /* @__PURE__ */ b.createElement("option", {
174
174
  key: f.key,
175
175
  value: f.key
176
176
  }, f.textValue);
177
177
  })))) : l ? /* @__PURE__ */ b.createElement("input", {
178
178
  type: "hidden",
179
- autoComplete: c.autoComplete,
179
+ autoComplete: n.autoComplete,
180
180
  name: l,
181
- disabled: d,
182
- value: (r = a.selectedKey) !== null && r !== void 0 ? r : ""
181
+ disabled: o,
182
+ value: (c = a.selectedKey) !== null && c !== void 0 ? c : ""
183
183
  }) : null;
184
184
  }
185
185
  function qe(e) {
186
- let a = ie(e), [i, o] = w(null), l = Se({
186
+ let a = ne(e), [d, i] = w(null), l = Se({
187
187
  ...e,
188
- onSelectionChange: (c) => {
189
- e.onSelectionChange != null && e.onSelectionChange(c), a.close(), d.commitValidation();
188
+ onSelectionChange: (n) => {
189
+ e.onSelectionChange != null && e.onSelectionChange(n), a.close(), o.commitValidation();
190
190
  }
191
- }), d = ye({
191
+ }), o = ye({
192
192
  ...e,
193
193
  value: l.selectedKey
194
- }), [s, t] = w(!1);
194
+ }), [r, t] = w(!1);
195
195
  return {
196
- ...d,
196
+ ...o,
197
197
  ...l,
198
198
  ...a,
199
- focusStrategy: i,
200
- open(c = null) {
201
- l.collection.size !== 0 && (o(c), a.open());
199
+ focusStrategy: d,
200
+ open(n = null) {
201
+ l.collection.size !== 0 && (i(n), a.open());
202
202
  },
203
- toggle(c = null) {
204
- l.collection.size !== 0 && (o(c), a.toggle());
203
+ toggle(n = null) {
204
+ l.collection.size !== 0 && (i(n), a.toggle());
205
205
  },
206
- isFocused: s,
206
+ isFocused: r,
207
207
  setFocused: t
208
208
  };
209
209
  }
210
210
  function Ve(e) {
211
211
  return e && e.__esModule ? e.default : e;
212
212
  }
213
- const O = /* @__PURE__ */ q(null), L = /* @__PURE__ */ q(null);
214
- function Oe(e, a) {
215
- [e, a] = W(e, a, O);
216
- let { children: i, isDisabled: o = !1, isInvalid: l = !1, isRequired: d = !1 } = e, s = M(() => typeof i == "function" ? i({
213
+ const O = /* @__PURE__ */ q(null), L = /* @__PURE__ */ q(null), Oe = /* @__PURE__ */ z(function(a, d) {
214
+ [a, d] = W(a, d, O);
215
+ let { children: i, isDisabled: l = !1, isInvalid: o = !1, isRequired: r = !1 } = a, t = M(() => typeof i == "function" ? i({
217
216
  isOpen: !1,
218
- isDisabled: o,
219
- isInvalid: l,
220
- isRequired: d,
217
+ isDisabled: l,
218
+ isInvalid: o,
219
+ isRequired: r,
221
220
  isFocused: !1,
222
221
  isFocusVisible: !1,
223
222
  defaultChildren: null
224
223
  }) : i, [
225
224
  i,
226
- o,
227
225
  l,
228
- d
226
+ o,
227
+ r
229
228
  ]);
230
229
  return /* @__PURE__ */ b.createElement(Re, {
231
- content: s
232
- }, (t) => /* @__PURE__ */ b.createElement(Te, {
233
- props: e,
234
- collection: t,
235
- selectRef: a
230
+ content: t
231
+ }, (n) => /* @__PURE__ */ b.createElement(Te, {
232
+ props: a,
233
+ collection: n,
234
+ selectRef: d
236
235
  }));
237
- }
238
- function Te({ props: e, selectRef: a, collection: i }) {
239
- let { validationBehavior: o } = j(ge) || {};
240
- var l, d;
241
- let s = (d = (l = e.validationBehavior) !== null && l !== void 0 ? l : o) !== null && d !== void 0 ? d : "native", t = qe({
236
+ });
237
+ function Te({ props: e, selectRef: a, collection: d }) {
238
+ let { validationBehavior: i } = j(ge) || {};
239
+ var l, o;
240
+ let r = (o = (l = e.validationBehavior) !== null && l !== void 0 ? l : i) !== null && o !== void 0 ? o : "native", t = qe({
242
241
  ...e,
243
- collection: i,
242
+ collection: d,
244
243
  children: void 0,
245
- validationBehavior: s
246
- }), { isFocusVisible: c, focusProps: r } = ue({
244
+ validationBehavior: r
245
+ }), { isFocusVisible: n, focusProps: c } = ue({
247
246
  within: !0
248
- }), n = E(null), [f, m] = be(), { labelProps: v, triggerProps: h, valueProps: S, menuProps: B, descriptionProps: F, errorMessageProps: P, ...y } = Ee({
247
+ }), s = E(null), [f, p] = be(), { labelProps: m, triggerProps: y, valueProps: P, menuProps: B, descriptionProps: C, errorMessageProps: D, ...g } = Ee({
249
248
  ...$e(e),
250
- label: m,
251
- validationBehavior: s
252
- }, t, n), [C, k] = w(null), $ = J(() => {
253
- n.current && k(n.current.offsetWidth + "px");
249
+ label: p,
250
+ validationBehavior: r
251
+ }, t, s), [F, K] = w(null), $ = J(() => {
252
+ s.current && K(s.current.offsetWidth + "px");
254
253
  }, [
255
- n
254
+ s
256
255
  ]);
257
- oe({
258
- ref: n,
256
+ ie({
257
+ ref: s,
259
258
  onResize: $
260
259
  });
261
260
  let I = M(() => ({
262
261
  isOpen: t.isOpen,
263
262
  isFocused: t.isFocused,
264
- isFocusVisible: c,
263
+ isFocusVisible: n,
265
264
  isDisabled: e.isDisabled || !1,
266
- isInvalid: y.isInvalid || !1,
265
+ isInvalid: g.isInvalid || !1,
267
266
  isRequired: e.isRequired || !1
268
267
  }), [
269
268
  t.isOpen,
270
269
  t.isFocused,
271
- c,
270
+ n,
272
271
  e.isDisabled,
273
- y.isInvalid,
272
+ g.isInvalid,
274
273
  e.isRequired
275
274
  ]), u = H({
276
275
  ...e,
277
276
  values: I,
278
277
  defaultClassName: "react-aria-Select"
279
- }), g = V(e);
280
- delete g.id;
281
- let x = E(null);
282
- return /* @__PURE__ */ b.createElement(ve, {
278
+ }), x = V(e);
279
+ delete x.id;
280
+ let h = E(null);
281
+ return /* @__PURE__ */ b.createElement(me, {
283
282
  values: [
284
283
  [
285
284
  O,
@@ -291,12 +290,12 @@ function Te({ props: e, selectRef: a, collection: i }) {
291
290
  ],
292
291
  [
293
292
  G,
294
- S
293
+ P
295
294
  ],
296
295
  [
297
296
  De,
298
297
  {
299
- ...v,
298
+ ...m,
300
299
  ref: f,
301
300
  elementType: "span"
302
301
  }
@@ -304,24 +303,24 @@ function Te({ props: e, selectRef: a, collection: i }) {
304
303
  [
305
304
  X,
306
305
  {
307
- ...h,
308
- ref: n,
306
+ ...y,
307
+ ref: s,
309
308
  isPressed: t.isOpen
310
309
  }
311
310
  ],
312
311
  [
313
- se,
312
+ oe,
314
313
  t
315
314
  ],
316
315
  [
317
- re,
316
+ de,
318
317
  {
319
318
  trigger: "Select",
320
- triggerRef: n,
321
- scrollRef: x,
319
+ triggerRef: s,
320
+ scrollRef: h,
322
321
  placement: "bottom start",
323
322
  style: {
324
- "--trigger-width": C
323
+ "--trigger-width": F
325
324
  }
326
325
  }
327
326
  ],
@@ -329,7 +328,7 @@ function Te({ props: e, selectRef: a, collection: i }) {
329
328
  Z,
330
329
  {
331
330
  ...B,
332
- ref: x
331
+ ref: h
333
332
  }
334
333
  ],
335
334
  [
@@ -340,42 +339,42 @@ function Te({ props: e, selectRef: a, collection: i }) {
340
339
  U,
341
340
  {
342
341
  slots: {
343
- description: F,
344
- errorMessage: P
342
+ description: C,
343
+ errorMessage: D
345
344
  }
346
345
  }
347
346
  ],
348
347
  [
349
348
  xe,
350
- y
349
+ g
351
350
  ]
352
351
  ]
353
352
  }, /* @__PURE__ */ b.createElement("div", {
354
- ...g,
353
+ ...x,
355
354
  ...u,
356
- ...r,
355
+ ...c,
357
356
  ref: a,
358
357
  slot: e.slot || void 0,
359
358
  "data-focused": t.isFocused || void 0,
360
- "data-focus-visible": c || void 0,
359
+ "data-focus-visible": n || void 0,
361
360
  "data-open": t.isOpen || void 0,
362
361
  "data-disabled": e.isDisabled || void 0,
363
- "data-invalid": y.isInvalid || void 0,
362
+ "data-invalid": g.isInvalid || void 0,
364
363
  "data-required": e.isRequired || void 0
365
364
  }), /* @__PURE__ */ b.createElement(Me, {
365
+ autoComplete: e.autoComplete,
366
366
  state: t,
367
- triggerRef: n,
368
- label: m,
367
+ triggerRef: s,
368
+ label: p,
369
369
  name: e.name,
370
370
  isDisabled: e.isDisabled
371
371
  }));
372
372
  }
373
- const Ne = /* @__PURE__ */ z(Oe), G = /* @__PURE__ */ q(null);
374
- function ze(e, a) {
375
- var i, o;
376
- [e, a] = W(e, a, G);
377
- let l = Q(L), { placeholder: d } = j(O), s = l.selectedKey != null ? l.collection.getItem(l.selectedKey) : null, t = s == null ? void 0 : s.props.children;
378
- typeof t == "function" && (t = t({
373
+ const G = /* @__PURE__ */ q(null), Ne = /* @__PURE__ */ z(function(a, d) {
374
+ var i, l;
375
+ [a, d] = W(a, d, G);
376
+ let o = Q(L), { placeholder: r } = j(O), t = o.selectedKey != null ? o.collection.getItem(o.selectedKey) : null, n = t == null ? void 0 : t.props.children;
377
+ typeof n == "function" && (n = n({
379
378
  isHovered: !1,
380
379
  isPressed: !1,
381
380
  isSelected: !1,
@@ -385,73 +384,72 @@ function ze(e, a) {
385
384
  selectionMode: "single",
386
385
  selectionBehavior: "toggle"
387
386
  }));
388
- let c = ke(Ve(he), "react-aria-components");
389
- var r, n, f;
387
+ let c = Ke(Ve(he), "react-aria-components");
388
+ var s, f, p;
390
389
  let m = H({
391
- ...e,
392
- defaultChildren: (r = t ?? d) !== null && r !== void 0 ? r : c.format("selectPlaceholder"),
390
+ ...a,
391
+ defaultChildren: (s = n ?? r) !== null && s !== void 0 ? s : c.format("selectPlaceholder"),
393
392
  defaultClassName: "react-aria-SelectValue",
394
393
  values: {
395
- selectedItem: (n = (i = l.selectedItem) === null || i === void 0 ? void 0 : i.value) !== null && n !== void 0 ? n : null,
396
- selectedText: (f = (o = l.selectedItem) === null || o === void 0 ? void 0 : o.textValue) !== null && f !== void 0 ? f : null,
397
- isPlaceholder: !s
394
+ selectedItem: (f = (i = o.selectedItem) === null || i === void 0 ? void 0 : i.value) !== null && f !== void 0 ? f : null,
395
+ selectedText: (p = (l = o.selectedItem) === null || l === void 0 ? void 0 : l.textValue) !== null && p !== void 0 ? p : null,
396
+ isPlaceholder: !t
398
397
  }
399
- }), v = V(e);
398
+ }), y = V(a);
400
399
  return /* @__PURE__ */ b.createElement("span", {
401
- ref: a,
402
- ...v,
400
+ ref: d,
401
+ ...y,
403
402
  ...m,
404
- "data-placeholder": !s || void 0
403
+ "data-placeholder": !t || void 0
405
404
  }, /* @__PURE__ */ b.createElement(U.Provider, {
406
405
  value: void 0
407
406
  }, m.children));
408
- }
409
- const We = /* @__PURE__ */ z(ze), je = '"../theme/tokens.css"', He = '"Inter", sans-serif', Ue = "#000000", Ae = "#b31b1b", Le = "(max-width: 767px)", Ge = "#bfbfbf", Je = "#e6e6e6", Qe = "0 0 0 2px #ffffff, 0 0 0 4px #000000", Xe = "#f2f2f2", Ye = "_button_1n8ts_4", Ze = "_select_1n8ts_41", ea = "_popover_1n8ts_57", aa = "_listBoxItem_1n8ts_65", ta = "_icon_1n8ts_87", R = {
410
- tokens: je,
411
- display: He,
412
- black: Ue,
413
- signalRed130: Ae,
414
- smBreakpoint: Le,
415
- gray50: Ge,
416
- gray20: Je,
417
- focus: Qe,
418
- backgroundSecondary: Xe,
419
- button: Ye,
420
- select: Ze,
421
- popover: ea,
422
- listBoxItem: aa,
423
- icon: ta
407
+ }), ze = '"../theme/tokens.css"', We = '"Inter", sans-serif', je = "#000000", He = "#b31b1b", Ue = "(max-width: 767px)", Ae = "#bfbfbf", Le = "#e6e6e6", Ge = "0 0 0 2px #ffffff, 0 0 0 4px #000000", Je = "#f2f2f2", Qe = "_button_1n8ts_4", Xe = "_select_1n8ts_41", Ye = "_popover_1n8ts_57", Ze = "_listBoxItem_1n8ts_65", ea = "_icon_1n8ts_87", S = {
408
+ tokens: ze,
409
+ display: We,
410
+ black: je,
411
+ signalRed130: He,
412
+ smBreakpoint: Ue,
413
+ gray50: Ae,
414
+ gray20: Le,
415
+ focus: Ge,
416
+ backgroundSecondary: Je,
417
+ button: Qe,
418
+ select: Xe,
419
+ popover: Ye,
420
+ listBoxItem: Ze,
421
+ icon: ea
424
422
  };
425
- function ha({
423
+ function ga({
426
424
  label: e,
427
425
  description: a,
428
- errorMessage: i,
429
- children: o,
426
+ errorMessage: d,
427
+ children: i,
430
428
  items: l,
431
- ...d
429
+ ...o
432
430
  }) {
433
- const s = b.useRef(null);
431
+ const r = b.useRef(null);
434
432
  return /* @__PURE__ */ T(
435
- Ne,
433
+ Oe,
436
434
  {
437
- className: R.select,
438
- ref: s,
439
- ...d,
435
+ className: S.select,
436
+ ref: r,
437
+ ...o,
440
438
  children: [
441
- /* @__PURE__ */ p(
442
- Ke,
439
+ /* @__PURE__ */ v(
440
+ ke,
443
441
  {
444
442
  label: e,
445
443
  description: a,
446
- errorMessage: i,
447
- children: /* @__PURE__ */ T(Y, { className: R.button, children: [
448
- /* @__PURE__ */ p(We, {}),
449
- /* @__PURE__ */ p(
444
+ errorMessage: d,
445
+ children: /* @__PURE__ */ T(Y, { className: S.button, children: [
446
+ /* @__PURE__ */ v(Ne, {}),
447
+ /* @__PURE__ */ v(
450
448
  "div",
451
449
  {
452
- className: R.icon,
450
+ className: S.icon,
453
451
  "aria-hidden": "true",
454
- children: /* @__PURE__ */ p(
452
+ children: /* @__PURE__ */ v(
455
453
  _e,
456
454
  {
457
455
  size: 20,
@@ -463,29 +461,29 @@ function ha({
463
461
  ] })
464
462
  }
465
463
  ),
466
- /* @__PURE__ */ p(
467
- ne,
464
+ /* @__PURE__ */ v(
465
+ se,
468
466
  {
469
- className: R.popover,
467
+ className: S.popover,
470
468
  offset: 0,
471
- UNSTABLE_portalContainer: s.current || void 0,
472
- children: /* @__PURE__ */ p(ae, { items: l, children: o })
469
+ UNSTABLE_portalContainer: r.current || void 0,
470
+ children: /* @__PURE__ */ v(ae, { items: l, children: i })
473
471
  }
474
472
  )
475
473
  ]
476
474
  }
477
475
  );
478
476
  }
479
- function Pa(e) {
480
- return /* @__PURE__ */ p(
477
+ function xa(e) {
478
+ return /* @__PURE__ */ v(
481
479
  te,
482
480
  {
483
- className: R.listBoxItem,
481
+ className: S.listBoxItem,
484
482
  ...e
485
483
  }
486
484
  );
487
485
  }
488
486
  export {
489
- Pa as Item,
490
- ha as Select
487
+ xa as Item,
488
+ ga as Select
491
489
  };