@midas-ds/components 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/CHANGELOG.md +63 -1
  2. package/accordion/AccordionItem.d.ts +2 -2
  3. package/index.cjs +138 -0
  4. package/index.css +1 -0
  5. package/index.d.ts +0 -2
  6. package/index.js +27094 -105
  7. package/package.json +22 -4
  8. package/table/Table.d.ts +3 -4
  9. package/textfield/TextField.d.ts +15 -4
  10. package/theme.cjs +1 -0
  11. package/theme.js +20 -0
  12. package/tokens-BskyMDHv.cjs +1 -0
  13. package/Breadcrumbs.css +0 -1
  14. package/Button-DL6nqUco.js +0 -182
  15. package/Button.css +0 -1
  16. package/ButtonGroup.css +0 -1
  17. package/Card.css +0 -1
  18. package/Checkbox-q0dugR2t.js +0 -402
  19. package/Checkbox.css +0 -1
  20. package/Collection-KMFfVuzU.js +0 -510
  21. package/ComboBox.css +0 -1
  22. package/DatePicker.css +0 -1
  23. package/Dialog-D6Bqrpn-.js +0 -1952
  24. package/Disclosure-dAZYXyTH.js +0 -225
  25. package/Disclosure.css +0 -1
  26. package/DragAndDrop-B0T3WgjL.js +0 -40
  27. package/Dropdown.css +0 -1
  28. package/FileUpload.css +0 -1
  29. package/Flex.css +0 -1
  30. package/Flex.module-CpoxBzQX.js +0 -37
  31. package/FocusScope-B7CkxXNC.js +0 -513
  32. package/Form-BWBjJC6v.js +0 -238
  33. package/Grid.css +0 -1
  34. package/Grid.module-Ia0e9Dix.js +0 -36
  35. package/Group-D7_8007y.js +0 -42
  36. package/Heading-RCRHv6hd.js +0 -15
  37. package/Hidden-CVlUgUJM.js +0 -37
  38. package/InfoBanner.css +0 -1
  39. package/Layout.css +0 -1
  40. package/Link-BnQvB-hH.js +0 -75
  41. package/Link.css +0 -1
  42. package/LinkButton.css +0 -1
  43. package/ListBox-DBBiqvcR.js +0 -474
  44. package/ListKeyboardDelegate-gCXy-Xnn.js +0 -172
  45. package/Logo.css +0 -1
  46. package/Modal.css +0 -1
  47. package/MultiSelect.css +0 -1
  48. package/PressResponder-B4g56kDz.js +0 -31
  49. package/RSPContexts-BW2SEIqe.js +0 -11
  50. package/Radio.css +0 -1
  51. package/SearchField.css +0 -1
  52. package/Select.css +0 -1
  53. package/SelectionManager-BfXUE1qg.js +0 -1031
  54. package/Separator-BBX9m2O2.js +0 -49
  55. package/Spinner.css +0 -1
  56. package/Table.css +0 -1
  57. package/Tabs.css +0 -1
  58. package/Tag-DWt0koFj.js +0 -728
  59. package/Tag.css +0 -1
  60. package/Text-BCF0xvqL.js +0 -15
  61. package/TextArea.css +0 -1
  62. package/TextField-CX4eOQf6.js +0 -225
  63. package/TextField.css +0 -1
  64. package/TextField.module-DdICj682.js +0 -143
  65. package/Toast.css +0 -1
  66. package/VisuallyHidden-Dhr5caPC.js +0 -39
  67. package/chevron-down-Cd1bkzXT.js +0 -13
  68. package/chevron-right-DBMc9VMi.js +0 -23
  69. package/clsx-OuTLNxxd.js +0 -16
  70. package/context-BpJLnOuu.js +0 -80
  71. package/createLucideIcon-DeWljiyi.js +0 -79
  72. package/index-B-jHjTDC.js +0 -120
  73. package/index-BPdc9gJ8.js +0 -3122
  74. package/index-KSgQWWiy.js +0 -26984
  75. package/index10.js +0 -4
  76. package/index11.js +0 -5
  77. package/index12.js +0 -4
  78. package/index13.js +0 -4
  79. package/index14.js +0 -4
  80. package/index15.js +0 -6
  81. package/index16.js +0 -6
  82. package/index17.js +0 -6
  83. package/index18.js +0 -4
  84. package/index19.js +0 -6
  85. package/index2.js +0 -8
  86. package/index20.js +0 -6
  87. package/index21.js +0 -4
  88. package/index22.js +0 -5
  89. package/index23.js +0 -5
  90. package/index24.js +0 -5
  91. package/index25.js +0 -6
  92. package/index26.js +0 -6
  93. package/index27.js +0 -6
  94. package/index28.js +0 -4
  95. package/index29.js +0 -6
  96. package/index3.js +0 -6
  97. package/index30.js +0 -21
  98. package/index31.js +0 -22
  99. package/index32.js +0 -14
  100. package/index33.js +0 -11
  101. package/index34.js +0 -31
  102. package/index35.js +0 -8
  103. package/index36.js +0 -9
  104. package/index37.js +0 -19
  105. package/index38.js +0 -9
  106. package/index39.js +0 -9
  107. package/index4.js +0 -4
  108. package/index40.js +0 -23
  109. package/index41.js +0 -63
  110. package/index42.js +0 -53
  111. package/index43.js +0 -18
  112. package/index44.js +0 -27
  113. package/index45.js +0 -18
  114. package/index46.js +0 -21
  115. package/index47.js +0 -49
  116. package/index48.js +0 -5
  117. package/index49.js +0 -25
  118. package/index5.js +0 -5
  119. package/index50.js +0 -18
  120. package/index51.js +0 -9
  121. package/index52.js +0 -25
  122. package/index53.js +0 -18
  123. package/index54.js +0 -11
  124. package/index55.js +0 -12
  125. package/index56.js +0 -15
  126. package/index57.js +0 -9
  127. package/index58.js +0 -9
  128. package/index59.js +0 -19
  129. package/index6.js +0 -4
  130. package/index60.js +0 -22
  131. package/index61.js +0 -61
  132. package/index62.js +0 -15
  133. package/index63.js +0 -11
  134. package/index64.js +0 -53
  135. package/index65.js +0 -85
  136. package/index66.js +0 -74
  137. package/index67.js +0 -24
  138. package/index68.js +0 -69
  139. package/index69.js +0 -80
  140. package/index7.js +0 -9
  141. package/index70.js +0 -140
  142. package/index71.js +0 -70
  143. package/index72.js +0 -42
  144. package/index73.js +0 -82
  145. package/index74.js +0 -71
  146. package/index75.js +0 -104
  147. package/index76.js +0 -275
  148. package/index77.js +0 -723
  149. package/index78.js +0 -489
  150. package/index79.js +0 -314
  151. package/index8.js +0 -4
  152. package/index80.js +0 -389
  153. package/index81.js +0 -252
  154. package/index82.js +0 -1364
  155. package/index83.js +0 -1009
  156. package/index84.js +0 -386
  157. package/index85.js +0 -2101
  158. package/index86.js +0 -2368
  159. package/index87.js +0 -6831
  160. package/index88.js +0 -17
  161. package/index89.js +0 -14
  162. package/index9.js +0 -5
  163. package/index90.js +0 -6
  164. package/index91.js +0 -9
  165. package/intlStrings-Cd44R5hT.js +0 -278
  166. package/react.esm-sMU8Z7rL.js +0 -11060
  167. package/triangle-alert-1OYl9KWz.js +0 -56
  168. package/useControlledState-Kv9K2AYu.js +0 -30
  169. package/useDescription-B7stiK3j.js +0 -32
  170. package/useEvent-Xk5kn5Ns.js +0 -21
  171. package/useField-DMzJIIN4.js +0 -67
  172. package/useFilter-Bt9dbV1U.js +0 -35
  173. package/useFocusRing-9PXyKy2A.js +0 -1297
  174. package/useFocusable-CcEBZe40.js +0 -59
  175. package/useGridSelectionCheckbox-DYgEnElE.js +0 -22
  176. package/useHasTabbableChild-D6DwR81L.js +0 -34
  177. package/useHighlightSelectionDescription-WYAbP4No.js +0 -552
  178. package/useLabels-9zaZ9oa0.js +0 -17
  179. package/useListState-BfTeKTk5.js +0 -119
  180. package/useLocalizedStringFormatter-BlCbn-hX.js +0 -96
  181. package/useSingleSelectListState-DPkaL0la.js +0 -34
  182. package/useUpdateEffect-Dtz-i14F.js +0 -12
  183. package/x-JK7i-TQC.js +0 -14
@@ -1,119 +0,0 @@
1
- import { $ as C, a as T, b as V } from "./SelectionManager-BfXUE1qg.js";
2
- import { useMemo as m, useCallback as W, useRef as z, useEffect as F } from "react";
3
- class D {
4
- *[Symbol.iterator]() {
5
- yield* this.iterable;
6
- }
7
- get size() {
8
- return this.keyMap.size;
9
- }
10
- getKeys() {
11
- return this.keyMap.keys();
12
- }
13
- getKeyBefore(l) {
14
- let n = this.keyMap.get(l);
15
- var e;
16
- return n && (e = n.prevKey) !== null && e !== void 0 ? e : null;
17
- }
18
- getKeyAfter(l) {
19
- let n = this.keyMap.get(l);
20
- var e;
21
- return n && (e = n.nextKey) !== null && e !== void 0 ? e : null;
22
- }
23
- getFirstKey() {
24
- return this.firstKey;
25
- }
26
- getLastKey() {
27
- return this.lastKey;
28
- }
29
- getItem(l) {
30
- var n;
31
- return (n = this.keyMap.get(l)) !== null && n !== void 0 ? n : null;
32
- }
33
- at(l) {
34
- const n = [
35
- ...this.getKeys()
36
- ];
37
- return this.getItem(n[l]);
38
- }
39
- getChildren(l) {
40
- let n = this.keyMap.get(l);
41
- return (n == null ? void 0 : n.childNodes) || [];
42
- }
43
- constructor(l) {
44
- this.keyMap = /* @__PURE__ */ new Map(), this.firstKey = null, this.lastKey = null, this.iterable = l;
45
- let n = (u) => {
46
- if (this.keyMap.set(u.key, u), u.childNodes && u.type === "section") for (let t of u.childNodes) n(t);
47
- };
48
- for (let u of l) n(u);
49
- let e = null, K = 0;
50
- for (let [u, t] of this.keyMap)
51
- e ? (e.nextKey = u, t.prevKey = e.key) : (this.firstKey = u, t.prevKey = void 0), t.type === "item" && (t.index = K++), e = t, e.nextKey = void 0;
52
- var c;
53
- this.lastKey = (c = e == null ? void 0 : e.key) !== null && c !== void 0 ? c : null;
54
- }
55
- }
56
- function A(d) {
57
- let { filter: l, layoutDelegate: n } = d, e = C(d), K = m(() => d.disabledKeys ? new Set(d.disabledKeys) : /* @__PURE__ */ new Set(), [
58
- d.disabledKeys
59
- ]), c = W((y) => l ? new D(l(y)) : new D(y), [
60
- l
61
- ]), u = m(() => ({
62
- suppressTextValueWarning: d.suppressTextValueWarning
63
- }), [
64
- d.suppressTextValueWarning
65
- ]), t = T(d, c, u), g = m(() => new V(t, e, {
66
- layoutDelegate: n
67
- }), [
68
- t,
69
- e,
70
- n
71
- ]);
72
- const o = z(null);
73
- return F(() => {
74
- if (e.focusedKey != null && !t.getItem(e.focusedKey) && o.current) {
75
- const i = o.current.getItem(e.focusedKey), x = [
76
- ...o.current.getKeys()
77
- ].map((r) => {
78
- const f = o.current.getItem(r);
79
- return (f == null ? void 0 : f.type) === "item" ? f : null;
80
- }).filter((r) => r !== null), s = [
81
- ...t.getKeys()
82
- ].map((r) => {
83
- const f = t.getItem(r);
84
- return (f == null ? void 0 : f.type) === "item" ? f : null;
85
- }).filter((r) => r !== null);
86
- var y, h;
87
- const w = ((y = x == null ? void 0 : x.length) !== null && y !== void 0 ? y : 0) - ((h = s == null ? void 0 : s.length) !== null && h !== void 0 ? h : 0);
88
- var k, p, b;
89
- let a = Math.min(w > 1 ? Math.max(((k = i == null ? void 0 : i.index) !== null && k !== void 0 ? k : 0) - w + 1, 0) : (p = i == null ? void 0 : i.index) !== null && p !== void 0 ? p : 0, ((b = s == null ? void 0 : s.length) !== null && b !== void 0 ? b : 0) - 1), v = null, S = !1;
90
- for (; a >= 0; ) {
91
- if (!g.isDisabled(s[a].key)) {
92
- v = s[a];
93
- break;
94
- }
95
- if (a < s.length - 1 && !S) a++;
96
- else {
97
- S = !0;
98
- var $, M;
99
- a > (($ = i == null ? void 0 : i.index) !== null && $ !== void 0 ? $ : 0) && (a = (M = i == null ? void 0 : i.index) !== null && M !== void 0 ? M : 0), a--;
100
- }
101
- }
102
- e.setFocusedKey(v ? v.key : null);
103
- }
104
- o.current = t;
105
- }, [
106
- t,
107
- g,
108
- e,
109
- e.focusedKey
110
- ]), {
111
- collection: t,
112
- disabledKeys: K,
113
- selectionManager: g
114
- };
115
- }
116
- export {
117
- A as $,
118
- D as a
119
- };
@@ -1,96 +0,0 @@
1
- import { $ } from "./context-BpJLnOuu.js";
2
- import { useMemo as b } from "react";
3
- const g = Symbol.for("react-aria.i18n.locale"), h = Symbol.for("react-aria.i18n.strings");
4
- let i;
5
- class c {
6
- /** Returns a localized string for the given key and locale. */
7
- getStringForLocale(e, t) {
8
- let n = this.getStringsForLocale(t)[e];
9
- if (!n) throw new Error(`Could not find intl message ${e} in ${t} locale`);
10
- return n;
11
- }
12
- /** Returns all localized strings for the given locale. */
13
- getStringsForLocale(e) {
14
- let t = this.strings[e];
15
- return t || (t = w(e, this.strings, this.defaultLocale), this.strings[e] = t), t;
16
- }
17
- static getGlobalDictionaryForPackage(e) {
18
- if (typeof window > "u") return null;
19
- let t = window[g];
20
- if (i === void 0) {
21
- let n = window[h];
22
- if (!n) return null;
23
- i = {};
24
- for (let l in n) i[l] = new c({
25
- [t]: n[l]
26
- }, t);
27
- }
28
- let r = i == null ? void 0 : i[e];
29
- if (!r) throw new Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);
30
- return r;
31
- }
32
- constructor(e, t = "en-US") {
33
- this.strings = Object.fromEntries(Object.entries(e).filter(([, r]) => r)), this.defaultLocale = t;
34
- }
35
- }
36
- function w(a, e, t = "en-US") {
37
- if (e[a]) return e[a];
38
- let r = m(a);
39
- if (e[r]) return e[r];
40
- for (let n in e)
41
- if (n.startsWith(r + "-")) return e[n];
42
- return e[t];
43
- }
44
- function m(a) {
45
- return Intl.Locale ? new Intl.Locale(a).language : a.split("-")[0];
46
- }
47
- const s = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map();
48
- class p {
49
- /** Formats a localized string for the given key with the provided variables. */
50
- format(e, t) {
51
- let r = this.strings.getStringForLocale(e, this.locale);
52
- return typeof r == "function" ? r(t, this) : r;
53
- }
54
- plural(e, t, r = "cardinal") {
55
- let n = t["=" + e];
56
- if (n) return typeof n == "function" ? n() : n;
57
- let l = this.locale + ":" + r, o = s.get(l);
58
- o || (o = new Intl.PluralRules(this.locale, {
59
- type: r
60
- }), s.set(l, o));
61
- let d = o.select(e);
62
- return n = t[d] || t.other, typeof n == "function" ? n() : n;
63
- }
64
- number(e) {
65
- let t = f.get(this.locale);
66
- return t || (t = new Intl.NumberFormat(this.locale), f.set(this.locale, t)), t.format(e);
67
- }
68
- select(e, t) {
69
- let r = e[t] || e.other;
70
- return typeof r == "function" ? r() : r;
71
- }
72
- constructor(e, t) {
73
- this.locale = e, this.strings = t;
74
- }
75
- }
76
- const u = /* @__PURE__ */ new WeakMap();
77
- function y(a) {
78
- let e = u.get(a);
79
- return e || (e = new c(a), u.set(a, e)), e;
80
- }
81
- function S(a, e) {
82
- return e && c.getGlobalDictionaryForPackage(e) || y(a);
83
- }
84
- function F(a, e) {
85
- let { locale: t } = $(), r = S(a, e);
86
- return b(() => new p(t, r), [
87
- t,
88
- r
89
- ]);
90
- }
91
- export {
92
- F as $,
93
- S as a,
94
- c as b,
95
- p as c
96
- };
@@ -1,34 +0,0 @@
1
- import { $ as r } from "./useListState-BfTeKTk5.js";
2
- import { $ as y } from "./useControlledState-Kv9K2AYu.js";
3
- import { useMemo as K } from "react";
4
- function S(l) {
5
- var t;
6
- let [e, c] = y(l.selectedKey, (t = l.defaultSelectedKey) !== null && t !== void 0 ? t : null, l.onSelectionChange), i = K(() => e != null ? [
7
- e
8
- ] : [], [
9
- e
10
- ]), { collection: o, disabledKeys: s, selectionManager: u } = r({
11
- ...l,
12
- selectionMode: "single",
13
- disallowEmptySelection: !0,
14
- allowDuplicateSelectionEvents: !0,
15
- selectedKeys: i,
16
- onSelectionChange: (d) => {
17
- if (d === "all") return;
18
- var n;
19
- let a = (n = d.values().next().value) !== null && n !== void 0 ? n : null;
20
- a === e && l.onSelectionChange && l.onSelectionChange(a), c(a);
21
- }
22
- }), f = e != null ? o.getItem(e) : null;
23
- return {
24
- collection: o,
25
- disabledKeys: s,
26
- selectionManager: u,
27
- selectedKey: e,
28
- setSelectedKey: c,
29
- selectedItem: f
30
- };
31
- }
32
- export {
33
- S as $
34
- };
@@ -1,12 +0,0 @@
1
- import { useRef as u, useEffect as f } from "react";
2
- function l(c, t) {
3
- const r = u(!0), e = u(null);
4
- f(() => (r.current = !0, () => {
5
- r.current = !1;
6
- }), []), f(() => {
7
- r.current ? r.current = !1 : (!e.current || t.some((s, n) => !Object.is(s, e[n]))) && c(), e.current = t;
8
- }, t);
9
- }
10
- export {
11
- l as $
12
- };
package/x-JK7i-TQC.js DELETED
@@ -1,14 +0,0 @@
1
- import { c as e } from "./createLucideIcon-DeWljiyi.js";
2
- /**
3
- * @license lucide-react v0.453.0 - ISC
4
- *
5
- * This source code is licensed under the ISC license.
6
- * See the LICENSE file in the root directory of this source tree.
7
- */
8
- const c = e("X", [
9
- ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
10
- ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
11
- ]);
12
- export {
13
- c as X
14
- };