@midas-ds/components 1.0.2 → 1.1.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 (175) hide show
  1. package/Button-DL6nqUco.js +182 -0
  2. package/CHANGELOG.md +15 -0
  3. package/Checkbox-q0dugR2t.js +402 -0
  4. package/{Collection-B3xUVWPF.js → Collection-KMFfVuzU.js} +179 -152
  5. package/Dialog-D6Bqrpn-.js +1952 -0
  6. package/Disclosure-dAZYXyTH.js +225 -0
  7. package/Disclosure.css +1 -0
  8. package/DragAndDrop-B0T3WgjL.js +40 -0
  9. package/FocusScope-B7CkxXNC.js +513 -0
  10. package/{Form-DXLoQL91.js → Form-BWBjJC6v.js} +79 -81
  11. package/Group-D7_8007y.js +42 -0
  12. package/Heading-RCRHv6hd.js +15 -0
  13. package/{Hidden-BQWDvze4.js → Hidden-CVlUgUJM.js} +1 -1
  14. package/Link-BnQvB-hH.js +75 -0
  15. package/ListBox-DBBiqvcR.js +474 -0
  16. package/ListKeyboardDelegate-gCXy-Xnn.js +172 -0
  17. package/PressResponder-B4g56kDz.js +31 -0
  18. package/README.md +21 -3
  19. package/{RSPContexts-EOiWkKOf.js → RSPContexts-BW2SEIqe.js} +2 -2
  20. package/SelectionManager-BfXUE1qg.js +1031 -0
  21. package/Separator-BBX9m2O2.js +49 -0
  22. package/Tag-DWt0koFj.js +728 -0
  23. package/Text-BCF0xvqL.js +15 -0
  24. package/TextField-CX4eOQf6.js +225 -0
  25. package/TextField.module-DdICj682.js +143 -0
  26. package/{VisuallyHidden-B_XzVvlX.js → VisuallyHidden-Dhr5caPC.js} +1 -1
  27. package/accordion/Accordion.d.ts +8 -8
  28. package/accordion/AccordionItem.d.ts +11 -3
  29. package/accordion/index.d.ts +0 -3
  30. package/{context-ScOIq_Gu.js → context-BpJLnOuu.js} +11 -11
  31. package/global.css +1 -0
  32. package/index-B-jHjTDC.js +120 -0
  33. package/{index-CorR1LBD.js → index-BPdc9gJ8.js} +3 -3
  34. package/{index-Dl1Q-tbj.js → index-KSgQWWiy.js} +5315 -5315
  35. package/index.d.ts +1 -0
  36. package/index.js +105 -112
  37. package/index10.js +1 -1
  38. package/index11.js +1 -1
  39. package/index12.js +1 -1
  40. package/index13.js +1 -1
  41. package/index14.js +1 -1
  42. package/index15.js +2 -2
  43. package/index16.js +2 -2
  44. package/index17.js +1 -1
  45. package/index18.js +1 -1
  46. package/index19.js +2 -2
  47. package/index2.js +1 -1
  48. package/index20.js +2 -2
  49. package/index21.js +1 -1
  50. package/index22.js +1 -1
  51. package/index23.js +1 -1
  52. package/index24.js +1 -1
  53. package/index25.js +2 -2
  54. package/index26.js +2 -2
  55. package/index27.js +2 -2
  56. package/index28.js +1 -1
  57. package/index29.js +2 -8
  58. package/index3.js +2 -4
  59. package/index30.js +17 -16
  60. package/index31.js +3 -3
  61. package/index32.js +3 -3
  62. package/index33.js +2 -2
  63. package/index34.js +3 -3
  64. package/index35.js +1 -1
  65. package/index36.js +2 -2
  66. package/index37.js +2 -2
  67. package/index38.js +2 -2
  68. package/index39.js +2 -2
  69. package/index4.js +1 -1
  70. package/index40.js +19 -12
  71. package/index41.js +61 -14
  72. package/index42.js +44 -22
  73. package/index43.js +13 -11
  74. package/index44.js +25 -4
  75. package/index45.js +16 -51
  76. package/index46.js +19 -16
  77. package/index47.js +49 -27
  78. package/index48.js +5 -18
  79. package/index49.js +25 -21
  80. package/index5.js +1 -1
  81. package/index50.js +16 -47
  82. package/index51.js +7 -3
  83. package/index52.js +18 -18
  84. package/index53.js +16 -16
  85. package/index54.js +6 -4
  86. package/index55.js +8 -21
  87. package/index56.js +13 -16
  88. package/index57.js +6 -8
  89. package/index58.js +6 -9
  90. package/index59.js +17 -13
  91. package/index6.js +1 -1
  92. package/index60.js +20 -7
  93. package/index61.js +59 -7
  94. package/index62.js +13 -17
  95. package/index63.js +9 -20
  96. package/index64.js +40 -48
  97. package/index65.js +85 -15
  98. package/index66.js +74 -11
  99. package/index67.js +23 -62
  100. package/index68.js +64 -80
  101. package/index69.js +68 -62
  102. package/index7.js +1 -1
  103. package/index70.js +138 -22
  104. package/index71.js +66 -65
  105. package/index72.js +40 -78
  106. package/index73.js +75 -133
  107. package/index74.js +69 -68
  108. package/index75.js +96 -34
  109. package/index76.js +258 -65
  110. package/index77.js +715 -63
  111. package/index78.js +478 -93
  112. package/index79.js +303 -263
  113. package/index8.js +1 -1
  114. package/index80.js +343 -678
  115. package/index81.js +242 -481
  116. package/index82.js +1329 -282
  117. package/index83.js +968 -350
  118. package/index84.js +343 -211
  119. package/index85.js +2025 -1288
  120. package/index86.js +2313 -954
  121. package/index87.js +6782 -339
  122. package/index88.js +15 -2103
  123. package/index89.js +12 -2369
  124. package/index9.js +1 -1
  125. package/index90.js +4 -6832
  126. package/index91.js +7 -15
  127. package/link/Link.d.ts +2 -2
  128. package/link-button/LinkButton.d.ts +1 -1
  129. package/package.json +7 -1
  130. package/{react.esm-D8HpDGKP.js → react.esm-sMU8Z7rL.js} +1872 -1872
  131. package/textfield/index.d.ts +0 -2
  132. package/useControlledState-Kv9K2AYu.js +30 -0
  133. package/{useDescription-D4_zk_sA.js → useDescription-B7stiK3j.js} +1 -1
  134. package/useEvent-Xk5kn5Ns.js +21 -0
  135. package/useField-DMzJIIN4.js +67 -0
  136. package/{useFilter-BnJDBCkt.js → useFilter-Bt9dbV1U.js} +1 -1
  137. package/useFocusRing-9PXyKy2A.js +1297 -0
  138. package/{useFocusable-C-N9wcwm.js → useFocusable-CcEBZe40.js} +11 -8
  139. package/{useGridSelectionCheckbox-i1rsjlC-.js → useGridSelectionCheckbox-DYgEnElE.js} +3 -3
  140. package/useHasTabbableChild-D6DwR81L.js +34 -0
  141. package/{useHighlightSelectionDescription-JVx2MW_e.js → useHighlightSelectionDescription-WYAbP4No.js} +19 -19
  142. package/useLabels-9zaZ9oa0.js +17 -0
  143. package/useListState-BfTeKTk5.js +119 -0
  144. package/{useLocalizedStringFormatter-DVCAZqcL.js → useLocalizedStringFormatter-BlCbn-hX.js} +29 -29
  145. package/{useSingleSelectListState-CmX9_L5H.js → useSingleSelectListState-DPkaL0la.js} +5 -5
  146. package/Button-CCevm2s3.js +0 -183
  147. package/Checkbox-CllWDBxF.js +0 -405
  148. package/Dialog-CLTyYwkS.js +0 -1889
  149. package/DragAndDrop-OTN7La7U.js +0 -42
  150. package/FocusScope-BR0SJ-cZ.js +0 -512
  151. package/Group-DPMuN3h8.js +0 -44
  152. package/Label-C18A_4Z5.js +0 -69
  153. package/Link-BU1h3K2a.js +0 -77
  154. package/ListBox-D21tdwTs.js +0 -463
  155. package/ListKeyboardDelegate-DxMjfMsI.js +0 -172
  156. package/PressResponder-DP8ZDNGy.js +0 -31
  157. package/SelectionManager-D4WtKtey.js +0 -988
  158. package/Separator-DLUHK9vv.js +0 -48
  159. package/Tag-CEd6WWSc.js +0 -725
  160. package/Text-DGLaY3HR.js +0 -17
  161. package/TextField-C_hq9WeT.js +0 -226
  162. package/TextField.module-Cwq1FAm7.js +0 -141
  163. package/accordion/AccordionContent.d.ts +0 -3
  164. package/accordion/AccordionTagContext.d.ts +0 -3
  165. package/accordion/AccordionTrigger.d.ts +0 -3
  166. package/index-CEg5vZQH.js +0 -132
  167. package/index-CgfokhRq.js +0 -674
  168. package/index.css +0 -1
  169. package/index92.js +0 -14
  170. package/index93.js +0 -6
  171. package/index94.js +0 -9
  172. package/useControlledState-S_TYcV_c.js +0 -45
  173. package/useFocusRing-D97-G3fT.js +0 -1324
  174. package/useHasTabbableChild-DeuCnGGv.js +0 -34
  175. package/useListState-DSOTbsL3.js +0 -119
package/index78.js CHANGED
@@ -1,104 +1,489 @@
1
- import { jsxs as u, jsx as n } from "react/jsx-runtime";
2
- import { $ as p } from "./Link-BU1h3K2a.js";
3
- import { c as m } from "./clsx-OuTLNxxd.js";
4
- import { c as y } from "./createLucideIcon-DeWljiyi.js";
5
- import { C as _, a as g } from "./chevron-right-DBMc9VMi.js";
6
- import { $ as Z } from "./useFocusRing-D97-G3fT.js";
7
- import './LinkButton.css';/**
8
- * @license lucide-react v0.453.0 - ISC
9
- *
10
- * This source code is licensed under the ISC license.
11
- * See the LICENSE file in the root directory of this source tree.
12
- */
13
- const h = y("SquareArrowOutUpRight", [
14
- ["path", { d: "M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6", key: "y09zxi" }],
15
- ["path", { d: "m21 3-9 9", key: "mpx6sq" }],
16
- ["path", { d: "M15 3h6v6", key: "1q9fwt" }]
17
- ]), b = '"../theme/tokens.css"', k = "#143c50", q = "#25607f", x = "#4289ad", B = '"Inter", sans-serif', w = "1rem", R = "500", z = "#ffffff", L = "#bfbfbf", N = "#f2f2f2", $ = "#e6e6e6", S = "#000000", C = "undefined", j = "0 0 0 2px #ffffff, 0 0 0 4px #000000", A = "(max-width: 767px)", I = "#e62323", M = "#b31b1b", O = "#801313", U = "_linkButton_7qa6p_4", W = "_secondary_7qa6p_43", v = "_tertiary_7qa6p_67", H = "_danger_7qa6p_88", V = "_iconBtn_7qa6p_110", D = "_iconLeft_7qa6p_131", E = "_fullwidth_7qa6p_135", F = "_button_7qa6p_140", t = {
18
- tokens: b,
19
- blue150: k,
20
- blue130: q,
21
- blue90: x,
22
- display: B,
23
- desktopSize: w,
24
- mediumWeight: R,
25
- white: z,
26
- gray50: L,
27
- gray10: N,
28
- gray20: $,
29
- black: S,
30
- medium: C,
31
- focus: j,
32
- smBreakpoint: A,
33
- signalRed100: I,
34
- signalRed130: M,
35
- signalRed150: O,
36
- linkButton: U,
37
- secondary: W,
38
- tertiary: v,
39
- danger: H,
40
- iconBtn: V,
41
- iconLeft: D,
42
- fullwidth: E,
43
- button: F
44
- }, T = ({
45
- children: a,
46
- variant: e,
47
- fullwidth: r,
48
- icon: o,
49
- iconPlacement: s,
50
- className: i,
51
- as: f,
52
- ...c
53
- }) => {
54
- const d = f || p, l = () => o ? /* @__PURE__ */ n(
55
- o,
56
- {
57
- size: 20,
58
- className: t.icon
1
+ import { jsxs as T, jsx as v } from "react/jsx-runtime";
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-DL6nqUco.js";
4
+ import { a as Z, $ as ee, b as ae, c as te } from "./ListBox-DBBiqvcR.js";
5
+ import { e as le, f as ne, g as ie, h as oe, i as de, a as se } from "./Dialog-D6Bqrpn-.js";
6
+ import { o as V, e as N, k as re, K as ce, I as fe, a as W, y as j, c as ue, z as be, A as $e, d as H, B as me } from "./useFocusRing-9PXyKy2A.js";
7
+ import { d as pe, e as ve, c as ye, $ as ge, a as xe } from "./Form-BWBjJC6v.js";
8
+ import { $ as he } from "./intlStrings-Cd44R5hT.js";
9
+ import { b as Pe, $ as De } from "./useField-DMzJIIN4.js";
10
+ import { $ as U } from "./Text-BCF0xvqL.js";
11
+ import { $ as Re } from "./Collection-KMFfVuzU.js";
12
+ import { $ as Se } from "./useSingleSelectListState-DPkaL0la.js";
13
+ import { $ as Ie, a as Be } from "./ListKeyboardDelegate-gCXy-Xnn.js";
14
+ import { g as Ce } from "./SelectionManager-BfXUE1qg.js";
15
+ import { $ as Fe } from "./VisuallyHidden-Dhr5caPC.js";
16
+ import { $ as ke } from "./useLocalizedStringFormatter-BlCbn-hX.js";
17
+ import { I as Ke } from "./TextField-CX4eOQf6.js";
18
+ import { C as _e } from "./chevron-down-Cd1bkzXT.js";
19
+ import './Select.css';const A = /* @__PURE__ */ new WeakMap();
20
+ function Ee(e, a, d) {
21
+ let { keyboardDelegate: i, isDisabled: l, isRequired: o, name: r, validationBehavior: t = "aria" } = e, n = Ie({
22
+ usage: "search",
23
+ sensitivity: "base"
24
+ }), c = M(() => i || new Be(a.collection, a.disabledKeys, d, n), [
25
+ i,
26
+ a.collection,
27
+ a.disabledKeys,
28
+ n
29
+ ]), { menuTriggerProps: s, menuProps: f } = le({
30
+ isDisabled: l,
31
+ type: "listbox"
32
+ }, a, d), p = (u) => {
33
+ switch (u.key) {
34
+ case "ArrowLeft": {
35
+ var x, h;
36
+ u.preventDefault();
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
+ break;
40
+ }
41
+ case "ArrowRight": {
42
+ var K, _;
43
+ u.preventDefault();
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
+ break;
47
+ }
59
48
  }
60
- ) : c.target === "_blank" ? /* @__PURE__ */ n(
61
- h,
62
- {
63
- size: 20,
64
- className: t.icon
49
+ }, { typeSelectProps: m } = Ce({
50
+ keyboardDelegate: c,
51
+ selectionManager: a.selectionManager,
52
+ onTypeSelect(u) {
53
+ a.setSelectedKey(u);
65
54
  }
66
- ) : s === "left" ? /* @__PURE__ */ n(
67
- _,
68
- {
69
- size: 20,
70
- className: t.icon
55
+ }), { isInvalid: y, validationErrors: P, validationDetails: B } = a.displayValidation, { labelProps: C, fieldProps: D, descriptionProps: g, errorMessageProps: F } = Pe({
56
+ ...e,
57
+ labelElementType: "span",
58
+ isInvalid: y,
59
+ errorMessage: e.errorMessage || P
60
+ });
61
+ m.onKeyDown = m.onKeyDownCapture, delete m.onKeyDownCapture;
62
+ let k = V(e, {
63
+ labelable: !0
64
+ }), $ = N(m, s, D), I = re();
65
+ return A.set(a, {
66
+ isDisabled: l,
67
+ isRequired: o,
68
+ name: r,
69
+ validationBehavior: t
70
+ }), {
71
+ labelProps: {
72
+ ...C,
73
+ onClick: () => {
74
+ if (!e.isDisabled) {
75
+ var u;
76
+ (u = d.current) === null || u === void 0 || u.focus(), ce("keyboard");
77
+ }
78
+ }
79
+ },
80
+ triggerProps: N(k, {
81
+ ...$,
82
+ isDisabled: l,
83
+ onKeyDown: fe($.onKeyDown, p, e.onKeyDown),
84
+ onKeyUp: e.onKeyUp,
85
+ "aria-labelledby": [
86
+ I,
87
+ $["aria-labelledby"],
88
+ $["aria-label"] && !$["aria-labelledby"] ? $.id : null
89
+ ].filter(Boolean).join(" "),
90
+ onFocus(u) {
91
+ a.isFocused || (e.onFocus && e.onFocus(u), e.onFocusChange && e.onFocusChange(!0), a.setFocused(!0));
92
+ },
93
+ onBlur(u) {
94
+ a.isOpen || (e.onBlur && e.onBlur(u), e.onFocusChange && e.onFocusChange(!1), a.setFocused(!1));
95
+ }
96
+ }),
97
+ valueProps: {
98
+ id: I
99
+ },
100
+ menuProps: {
101
+ ...f,
102
+ autoFocus: a.focusStrategy || !0,
103
+ shouldSelectOnPressUp: !0,
104
+ shouldFocusOnHover: !0,
105
+ disallowEmptySelection: !0,
106
+ linkBehavior: "selection",
107
+ onBlur: (u) => {
108
+ u.currentTarget.contains(u.relatedTarget) || (e.onBlur && e.onBlur(u), e.onFocusChange && e.onFocusChange(!1), a.setFocused(!1));
109
+ },
110
+ "aria-labelledby": [
111
+ D["aria-labelledby"],
112
+ $["aria-label"] && !D["aria-labelledby"] ? $.id : null
113
+ ].filter(Boolean).join(" ")
114
+ },
115
+ descriptionProps: g,
116
+ errorMessageProps: F,
117
+ isInvalid: y,
118
+ validationErrors: P,
119
+ validationDetails: B
120
+ };
121
+ }
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
+ validationBehavior: t,
126
+ focus: () => {
127
+ var f;
128
+ return (f = d.current) === null || f === void 0 ? void 0 : f.focus();
71
129
  }
72
- ) : /* @__PURE__ */ n(
73
- g,
74
- {
75
- size: 20,
76
- className: t.icon
130
+ }, a, e.selectRef);
131
+ var s;
132
+ return {
133
+ containerProps: {
134
+ ...c,
135
+ "aria-hidden": !0,
136
+ // @ts-ignore
137
+ "data-react-aria-prevent-focus": !0,
138
+ // @ts-ignore
139
+ "data-a11y-ignore": "aria-hidden-focus"
140
+ },
141
+ inputProps: {
142
+ style: {
143
+ display: "none"
144
+ }
145
+ },
146
+ selectProps: {
147
+ tabIndex: -1,
148
+ autoComplete: l,
149
+ disabled: r,
150
+ required: t === "native" && n,
151
+ name: o,
152
+ value: (s = a.selectedKey) !== null && s !== void 0 ? s : "",
153
+ onChange: (f) => a.setSelectedKey(f.target.value)
77
154
  }
78
- );
79
- return /* @__PURE__ */ u(
80
- d,
155
+ };
156
+ }
157
+ function Me(e) {
158
+ let { state: a, triggerRef: d, label: i, name: l, isDisabled: o } = e, r = E(null), { containerProps: t, selectProps: n } = we({
159
+ ...e,
160
+ selectRef: r
161
+ }, a, d);
162
+ var c;
163
+ return a.collection.size <= 300 ? /* @__PURE__ */ b.createElement("div", {
164
+ ...t,
165
+ "data-testid": "hidden-select-container"
166
+ }, /* @__PURE__ */ b.createElement("label", null, i, /* @__PURE__ */ b.createElement("select", {
167
+ ...n,
168
+ ref: r
169
+ }, /* @__PURE__ */ b.createElement("option", null), [
170
+ ...a.collection.getKeys()
171
+ ].map((s) => {
172
+ let f = a.collection.getItem(s);
173
+ if (f && f.type === "item") return /* @__PURE__ */ b.createElement("option", {
174
+ key: f.key,
175
+ value: f.key
176
+ }, f.textValue);
177
+ })))) : l ? /* @__PURE__ */ b.createElement("input", {
178
+ type: "hidden",
179
+ autoComplete: n.autoComplete,
180
+ name: l,
181
+ disabled: o,
182
+ value: (c = a.selectedKey) !== null && c !== void 0 ? c : ""
183
+ }) : null;
184
+ }
185
+ function qe(e) {
186
+ let a = ne(e), [d, i] = w(null), l = Se({
187
+ ...e,
188
+ onSelectionChange: (n) => {
189
+ e.onSelectionChange != null && e.onSelectionChange(n), a.close(), o.commitValidation();
190
+ }
191
+ }), o = ye({
192
+ ...e,
193
+ value: l.selectedKey
194
+ }), [r, t] = w(!1);
195
+ return {
196
+ ...o,
197
+ ...l,
198
+ ...a,
199
+ focusStrategy: d,
200
+ open(n = null) {
201
+ l.collection.size !== 0 && (i(n), a.open());
202
+ },
203
+ toggle(n = null) {
204
+ l.collection.size !== 0 && (i(n), a.toggle());
205
+ },
206
+ isFocused: r,
207
+ setFocused: t
208
+ };
209
+ }
210
+ function Ve(e) {
211
+ return e && e.__esModule ? e.default : e;
212
+ }
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({
216
+ isOpen: !1,
217
+ isDisabled: l,
218
+ isInvalid: o,
219
+ isRequired: r,
220
+ isFocused: !1,
221
+ isFocusVisible: !1,
222
+ defaultChildren: null
223
+ }) : i, [
224
+ i,
225
+ l,
226
+ o,
227
+ r
228
+ ]);
229
+ return /* @__PURE__ */ b.createElement(Re, {
230
+ content: t
231
+ }, (n) => /* @__PURE__ */ b.createElement(Te, {
232
+ props: a,
233
+ collection: n,
234
+ selectRef: d
235
+ }));
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({
241
+ ...e,
242
+ collection: d,
243
+ children: void 0,
244
+ validationBehavior: r
245
+ }), { isFocusVisible: n, focusProps: c } = ue({
246
+ within: !0
247
+ }), s = E(null), [f, p] = be(), { labelProps: m, triggerProps: y, valueProps: P, menuProps: B, descriptionProps: C, errorMessageProps: D, ...g } = Ee({
248
+ ...$e(e),
249
+ label: p,
250
+ validationBehavior: r
251
+ }, t, s), [F, k] = w(null), $ = J(() => {
252
+ s.current && k(s.current.offsetWidth + "px");
253
+ }, [
254
+ s
255
+ ]);
256
+ ie({
257
+ ref: s,
258
+ onResize: $
259
+ });
260
+ let I = M(() => ({
261
+ isOpen: t.isOpen,
262
+ isFocused: t.isFocused,
263
+ isFocusVisible: n,
264
+ isDisabled: e.isDisabled || !1,
265
+ isInvalid: g.isInvalid || !1,
266
+ isRequired: e.isRequired || !1
267
+ }), [
268
+ t.isOpen,
269
+ t.isFocused,
270
+ n,
271
+ e.isDisabled,
272
+ g.isInvalid,
273
+ e.isRequired
274
+ ]), u = H({
275
+ ...e,
276
+ values: I,
277
+ defaultClassName: "react-aria-Select"
278
+ }), x = V(e);
279
+ delete x.id;
280
+ let h = E(null);
281
+ return /* @__PURE__ */ b.createElement(me, {
282
+ values: [
283
+ [
284
+ O,
285
+ e
286
+ ],
287
+ [
288
+ L,
289
+ t
290
+ ],
291
+ [
292
+ G,
293
+ P
294
+ ],
295
+ [
296
+ De,
297
+ {
298
+ ...m,
299
+ ref: f,
300
+ elementType: "span"
301
+ }
302
+ ],
303
+ [
304
+ X,
305
+ {
306
+ ...y,
307
+ ref: s,
308
+ isPressed: t.isOpen
309
+ }
310
+ ],
311
+ [
312
+ oe,
313
+ t
314
+ ],
315
+ [
316
+ de,
317
+ {
318
+ trigger: "Select",
319
+ triggerRef: s,
320
+ scrollRef: h,
321
+ placement: "bottom start",
322
+ style: {
323
+ "--trigger-width": F
324
+ }
325
+ }
326
+ ],
327
+ [
328
+ Z,
329
+ {
330
+ ...B,
331
+ ref: h
332
+ }
333
+ ],
334
+ [
335
+ ee,
336
+ t
337
+ ],
338
+ [
339
+ U,
340
+ {
341
+ slots: {
342
+ description: C,
343
+ errorMessage: D
344
+ }
345
+ }
346
+ ],
347
+ [
348
+ xe,
349
+ g
350
+ ]
351
+ ]
352
+ }, /* @__PURE__ */ b.createElement("div", {
353
+ ...x,
354
+ ...u,
355
+ ...c,
356
+ ref: a,
357
+ slot: e.slot || void 0,
358
+ "data-focused": t.isFocused || void 0,
359
+ "data-focus-visible": n || void 0,
360
+ "data-open": t.isOpen || void 0,
361
+ "data-disabled": e.isDisabled || void 0,
362
+ "data-invalid": g.isInvalid || void 0,
363
+ "data-required": e.isRequired || void 0
364
+ }), /* @__PURE__ */ b.createElement(Me, {
365
+ autoComplete: e.autoComplete,
366
+ state: t,
367
+ triggerRef: s,
368
+ label: p,
369
+ name: e.name,
370
+ isDisabled: e.isDisabled
371
+ }));
372
+ }
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({
378
+ isHovered: !1,
379
+ isPressed: !1,
380
+ isSelected: !1,
381
+ isFocused: !1,
382
+ isFocusVisible: !1,
383
+ isDisabled: !1,
384
+ selectionMode: "single",
385
+ selectionBehavior: "toggle"
386
+ }));
387
+ let c = ke(Ve(he), "react-aria-components");
388
+ var s, f, p;
389
+ let m = H({
390
+ ...a,
391
+ defaultChildren: (s = n ?? r) !== null && s !== void 0 ? s : c.format("selectPlaceholder"),
392
+ defaultClassName: "react-aria-SelectValue",
393
+ values: {
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
397
+ }
398
+ }), y = V(a);
399
+ return /* @__PURE__ */ b.createElement("span", {
400
+ ref: d,
401
+ ...y,
402
+ ...m,
403
+ "data-placeholder": !t || void 0
404
+ }, /* @__PURE__ */ b.createElement(U.Provider, {
405
+ value: void 0
406
+ }, m.children));
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
422
+ };
423
+ function ga({
424
+ label: e,
425
+ description: a,
426
+ errorMessage: d,
427
+ children: i,
428
+ items: l,
429
+ ...o
430
+ }) {
431
+ const r = b.useRef(null);
432
+ return /* @__PURE__ */ T(
433
+ Oe,
81
434
  {
82
- className: m(
83
- t.linkButton,
84
- e === "primary" && t.primary,
85
- e === "secondary" && t.secondary,
86
- e === "tertiary" && t.tertiary,
87
- e === "danger" && t.danger,
88
- e === "icon" && t.iconBtn,
89
- r && t.fullwidth,
90
- s === "left" && t.iconLeft,
91
- i
92
- ),
93
- ...c,
435
+ className: S.select,
436
+ ref: r,
437
+ ...o,
94
438
  children: [
95
- a,
96
- /* @__PURE__ */ n(l, {})
439
+ /* @__PURE__ */ v(
440
+ Ke,
441
+ {
442
+ label: e,
443
+ description: a,
444
+ errorMessage: d,
445
+ children: /* @__PURE__ */ T(Y, { className: S.button, children: [
446
+ /* @__PURE__ */ v(Ne, {}),
447
+ /* @__PURE__ */ v(
448
+ "div",
449
+ {
450
+ className: S.icon,
451
+ "aria-hidden": "true",
452
+ children: /* @__PURE__ */ v(
453
+ _e,
454
+ {
455
+ size: 20,
456
+ "aria-hidden": !0
457
+ }
458
+ )
459
+ }
460
+ )
461
+ ] })
462
+ }
463
+ ),
464
+ /* @__PURE__ */ v(
465
+ se,
466
+ {
467
+ className: S.popover,
468
+ offset: 0,
469
+ UNSTABLE_portalContainer: r.current || void 0,
470
+ children: /* @__PURE__ */ v(ae, { items: l, children: i })
471
+ }
472
+ )
97
473
  ]
98
474
  }
99
475
  );
100
- };
476
+ }
477
+ function xa(e) {
478
+ return /* @__PURE__ */ v(
479
+ te,
480
+ {
481
+ className: S.listBoxItem,
482
+ ...e
483
+ }
484
+ );
485
+ }
101
486
  export {
102
- T as LinkButton,
103
- Z as RouterProvider
487
+ xa as Item,
488
+ ga as Select
104
489
  };