@midas-ds/components 1.0.3 → 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 (145) hide show
  1. package/{Button-B4vMZbC6.js → Button-DL6nqUco.js} +22 -22
  2. package/CHANGELOG.md +6 -1
  3. package/{Checkbox-DnKWanep.js → Checkbox-q0dugR2t.js} +8 -8
  4. package/{Collection-COLWgm24.js → Collection-KMFfVuzU.js} +2 -2
  5. package/{Dialog-Cb6toyXO.js → Dialog-D6Bqrpn-.js} +170 -169
  6. package/Disclosure-dAZYXyTH.js +225 -0
  7. package/Disclosure.css +1 -0
  8. package/{FocusScope-C8i7CH6y.js → FocusScope-B7CkxXNC.js} +1 -1
  9. package/{Form-BQQs3jUk.js → Form-BWBjJC6v.js} +42 -42
  10. package/{Group-CdwXhx8Q.js → Group-D7_8007y.js} +10 -10
  11. package/Heading-RCRHv6hd.js +15 -0
  12. package/{Hidden-DngIphiL.js → Hidden-CVlUgUJM.js} +1 -1
  13. package/{Link-iAZLB3RI.js → Link-BnQvB-hH.js} +8 -8
  14. package/{ListBox-BKWkIIm6.js → ListBox-DBBiqvcR.js} +72 -72
  15. package/{ListKeyboardDelegate-BH-K5hyq.js → ListKeyboardDelegate-gCXy-Xnn.js} +2 -2
  16. package/{PressResponder-Cz-TRBHO.js → PressResponder-B4g56kDz.js} +5 -5
  17. package/{RSPContexts-EOiWkKOf.js → RSPContexts-BW2SEIqe.js} +2 -2
  18. package/{SelectionManager-8o40f7mx.js → SelectionManager-BfXUE1qg.js} +113 -129
  19. package/{Separator-BlvmQjwz.js → Separator-BBX9m2O2.js} +2 -2
  20. package/{Tag--W5TgxmK.js → Tag-DWt0koFj.js} +74 -74
  21. package/Text-BCF0xvqL.js +15 -0
  22. package/{TextField-DeK_yiK-.js → TextField-CX4eOQf6.js} +33 -33
  23. package/{TextField.module-0-u4LVPp.js → TextField.module-DdICj682.js} +7 -7
  24. package/{VisuallyHidden-CFx06Bae.js → VisuallyHidden-Dhr5caPC.js} +1 -1
  25. package/accordion/Accordion.d.ts +8 -8
  26. package/accordion/AccordionItem.d.ts +11 -3
  27. package/accordion/index.d.ts +0 -3
  28. package/{context-Bnqknrce.js → context-BpJLnOuu.js} +11 -11
  29. package/global.css +1 -0
  30. package/index.d.ts +1 -0
  31. package/index.js +105 -110
  32. package/index10.js +1 -1
  33. package/index11.js +1 -1
  34. package/index12.js +1 -1
  35. package/index13.js +1 -1
  36. package/index14.js +1 -1
  37. package/index15.js +2 -2
  38. package/index16.js +2 -2
  39. package/index17.js +1 -1
  40. package/index18.js +1 -1
  41. package/index19.js +2 -2
  42. package/index2.js +1 -1
  43. package/index20.js +2 -2
  44. package/index21.js +1 -1
  45. package/index22.js +1 -1
  46. package/index23.js +1 -1
  47. package/index24.js +1 -1
  48. package/index25.js +2 -2
  49. package/index26.js +2 -2
  50. package/index27.js +2 -2
  51. package/index28.js +1 -1
  52. package/index29.js +2 -8
  53. package/index3.js +1 -1
  54. package/index30.js +17 -16
  55. package/index31.js +1 -1
  56. package/index32.js +1 -1
  57. package/index33.js +1 -1
  58. package/index34.js +2 -2
  59. package/index36.js +1 -1
  60. package/index37.js +1 -1
  61. package/index38.js +1 -1
  62. package/index39.js +1 -1
  63. package/index4.js +1 -1
  64. package/index40.js +19 -12
  65. package/index41.js +61 -14
  66. package/index42.js +44 -22
  67. package/index43.js +13 -11
  68. package/index44.js +25 -4
  69. package/index45.js +16 -51
  70. package/index46.js +19 -16
  71. package/index47.js +49 -27
  72. package/index48.js +5 -18
  73. package/index49.js +25 -21
  74. package/index5.js +1 -1
  75. package/index50.js +16 -47
  76. package/index51.js +7 -3
  77. package/index52.js +18 -18
  78. package/index53.js +16 -16
  79. package/index54.js +5 -3
  80. package/index55.js +7 -20
  81. package/index56.js +13 -16
  82. package/index57.js +6 -8
  83. package/index58.js +5 -8
  84. package/index59.js +17 -13
  85. package/index6.js +1 -1
  86. package/index60.js +20 -7
  87. package/index61.js +59 -7
  88. package/index62.js +13 -17
  89. package/index63.js +9 -20
  90. package/index64.js +38 -46
  91. package/index65.js +85 -15
  92. package/index66.js +74 -11
  93. package/index67.js +23 -62
  94. package/index68.js +64 -80
  95. package/index69.js +68 -62
  96. package/index7.js +1 -1
  97. package/index70.js +138 -22
  98. package/index71.js +66 -65
  99. package/index72.js +40 -78
  100. package/index73.js +75 -133
  101. package/index74.js +69 -68
  102. package/index75.js +96 -34
  103. package/index76.js +258 -65
  104. package/index77.js +715 -63
  105. package/index78.js +478 -93
  106. package/index79.js +303 -263
  107. package/index8.js +1 -1
  108. package/index80.js +343 -677
  109. package/index81.js +242 -479
  110. package/index82.js +1332 -282
  111. package/index83.js +966 -346
  112. package/index84.js +344 -210
  113. package/index85.js +2024 -1286
  114. package/index86.js +2314 -955
  115. package/index87.js +6785 -340
  116. package/index88.js +15 -2099
  117. package/index89.js +12 -2367
  118. package/index9.js +1 -1
  119. package/index90.js +4 -6834
  120. package/index91.js +7 -15
  121. package/package.json +1 -1
  122. package/useControlledState-Kv9K2AYu.js +30 -0
  123. package/{useDescription-BPs7eRff.js → useDescription-B7stiK3j.js} +1 -1
  124. package/useEvent-Xk5kn5Ns.js +21 -0
  125. package/{useField-Dz62UHCP.js → useField-DMzJIIN4.js} +5 -5
  126. package/{useFilter-ViwzkzZe.js → useFilter-Bt9dbV1U.js} +1 -1
  127. package/{useFocusRing-BKGhL91C.js → useFocusRing-9PXyKy2A.js} +26 -26
  128. package/{useFocusable-CRSmYEQc.js → useFocusable-CcEBZe40.js} +1 -1
  129. package/{useGridSelectionCheckbox-CVEvUCJL.js → useGridSelectionCheckbox-DYgEnElE.js} +3 -3
  130. package/{useHasTabbableChild-C8y4fwiY.js → useHasTabbableChild-D6DwR81L.js} +5 -5
  131. package/{useHighlightSelectionDescription-CD74uzLh.js → useHighlightSelectionDescription-WYAbP4No.js} +4 -4
  132. package/useLabels-9zaZ9oa0.js +17 -0
  133. package/{useListState-DKnP5TB5.js → useListState-BfTeKTk5.js} +1 -1
  134. package/{useLocalizedStringFormatter-DsZ-ZWSk.js → useLocalizedStringFormatter-BlCbn-hX.js} +1 -1
  135. package/{useSingleSelectListState-BHTLh8Ob.js → useSingleSelectListState-DPkaL0la.js} +2 -2
  136. package/Text-CQPW6xs7.js +0 -15
  137. package/accordion/AccordionContent.d.ts +0 -3
  138. package/accordion/AccordionTagContext.d.ts +0 -3
  139. package/accordion/AccordionTrigger.d.ts +0 -3
  140. package/index-DK9ZACEc.js +0 -642
  141. package/index.css +0 -1
  142. package/index92.js +0 -14
  143. package/index93.js +0 -6
  144. package/index94.js +0 -9
  145. package/useControlledState-DrAoodI6.js +0 -45
@@ -1,13 +1,13 @@
1
- import { m as I, e as x, n as E, a as w, c as F, b as N, d as O, l as y } from "./useFocusRing-BKGhL91C.js";
1
+ import { n as I, e as x, o as E, a as w, c as F, b as N, d as O, k as y } from "./useFocusRing-9PXyKy2A.js";
2
2
  import L, { createContext as A, useRef as S, useEffect as V } from "react";
3
- import { $ as M } from "./Hidden-DngIphiL.js";
4
- import { $ as R } from "./useFocusable-CRSmYEQc.js";
5
- function H(n, e) {
3
+ import { $ as M } from "./Hidden-CVlUgUJM.js";
4
+ import { $ as R } from "./useFocusable-CcEBZe40.js";
5
+ function k(n, e) {
6
6
  let {
7
7
  elementType: t = "button",
8
8
  isDisabled: d,
9
9
  onPress: i,
10
- onPressStart: s,
10
+ onPressStart: a,
11
11
  onPressEnd: r,
12
12
  onPressUp: v,
13
13
  onPressChange: l,
@@ -34,7 +34,7 @@ function H(n, e) {
34
34
  rel: t === "a" ? u : void 0
35
35
  };
36
36
  let { pressProps: b, isPressed: p } = I({
37
- onPressStart: s,
37
+ onPressStart: a,
38
38
  onPressEnd: r,
39
39
  onPressChange: l,
40
40
  onPress: i,
@@ -61,16 +61,16 @@ function H(n, e) {
61
61
  };
62
62
  }
63
63
  const T = 7e3;
64
- let a = null;
64
+ let s = null;
65
65
  function C(n, e = "assertive", t = T) {
66
- a ? a.announce(n, e, t) : (a = new U(), (typeof IS_REACT_ACT_ENVIRONMENT == "boolean" ? IS_REACT_ACT_ENVIRONMENT : typeof jest < "u") ? a.announce(n, e, t) : setTimeout(() => {
67
- a != null && a.isAttached() && (a == null || a.announce(n, e, t));
66
+ s ? s.announce(n, e, t) : (s = new H(), (typeof IS_REACT_ACT_ENVIRONMENT == "boolean" ? IS_REACT_ACT_ENVIRONMENT : typeof jest < "u") ? s.announce(n, e, t) : setTimeout(() => {
67
+ s != null && s.isAttached() && (s == null || s.announce(n, e, t));
68
68
  }, 100));
69
69
  }
70
70
  function z(n) {
71
- a && a.clear(n);
71
+ s && s.clear(n);
72
72
  }
73
- class U {
73
+ class H {
74
74
  isAttached() {
75
75
  var e;
76
76
  return (e = this.node) === null || e === void 0 ? void 0 : e.isConnected;
@@ -83,10 +83,10 @@ class U {
83
83
  this.node && (document.body.removeChild(this.node), this.node = null);
84
84
  }
85
85
  announce(e, t = "assertive", d = T) {
86
- var i, s;
86
+ var i, a;
87
87
  if (!this.node) return;
88
88
  let r = document.createElement("div");
89
- typeof e == "object" ? (r.setAttribute("role", "img"), r.setAttribute("aria-labelledby", e["aria-labelledby"])) : r.textContent = e, t === "assertive" ? (i = this.assertiveLog) === null || i === void 0 || i.appendChild(r) : (s = this.politeLog) === null || s === void 0 || s.appendChild(r), e !== "" && setTimeout(() => {
89
+ typeof e == "object" ? (r.setAttribute("role", "img"), r.setAttribute("aria-labelledby", e["aria-labelledby"])) : r.textContent = e, t === "assertive" ? (i = this.assertiveLog) === null || i === void 0 || i.appendChild(r) : (a = this.politeLog) === null || a === void 0 || a.appendChild(r), e !== "" && setTimeout(() => {
90
90
  r.remove();
91
91
  }, d);
92
92
  }
@@ -108,7 +108,7 @@ class U {
108
108
  }), this.assertiveLog = this.createLog("assertive"), this.node.appendChild(this.assertiveLog), this.politeLog = this.createLog("polite"), this.node.appendChild(this.politeLog), document.body.prepend(this.node));
109
109
  }
110
110
  }
111
- const k = /* @__PURE__ */ A(null), j = /* @__PURE__ */ new Set([
111
+ const U = /* @__PURE__ */ A(null), j = /* @__PURE__ */ new Set([
112
112
  "form",
113
113
  "formAction",
114
114
  "formEncType",
@@ -119,7 +119,7 @@ const k = /* @__PURE__ */ A(null), j = /* @__PURE__ */ new Set([
119
119
  "value"
120
120
  ]), B = /* @__PURE__ */ A({}), J = /* @__PURE__ */ M(function(e, t) {
121
121
  [e, t] = w(e, t, B), e = K(e);
122
- let d = e, { isPending: i } = d, { buttonProps: s, isPressed: r } = H(e, t), { focusProps: v, isFocused: l, isFocusVisible: $ } = F(e), { hoverProps: g, isHovered: c } = N({
122
+ let d = e, { isPending: i } = d, { buttonProps: a, isPressed: r } = k(e, t), { focusProps: v, isFocused: l, isFocusVisible: $ } = F(e), { hoverProps: g, isHovered: c } = N({
123
123
  ...e,
124
124
  isDisabled: e.isDisabled || i
125
125
  }), h = {
@@ -133,8 +133,8 @@ const k = /* @__PURE__ */ A(null), j = /* @__PURE__ */ new Set([
133
133
  ...e,
134
134
  values: h,
135
135
  defaultClassName: "react-aria-Button"
136
- }), u = y(s.id), f = y(), o = s["aria-labelledby"];
137
- i && (o ? o = `${o} ${f}` : s["aria-label"] && (o = `${u} ${f}`));
136
+ }), u = y(a.id), f = y(), o = a["aria-labelledby"];
137
+ i && (o ? o = `${o} ${f}` : a["aria-label"] && (o = `${u} ${f}`));
138
138
  let b = S(i);
139
139
  return V(() => {
140
140
  let p = {
@@ -150,21 +150,21 @@ const k = /* @__PURE__ */ A(null), j = /* @__PURE__ */ new Set([
150
150
  ...E(e, {
151
151
  propNames: j
152
152
  }),
153
- ...x(s, v, g),
153
+ ...x(a, v, g),
154
154
  ...P,
155
- type: s.type === "submit" && i ? "button" : s.type,
155
+ type: a.type === "submit" && i ? "button" : a.type,
156
156
  id: u,
157
157
  ref: t,
158
158
  "aria-labelledby": o,
159
159
  slot: e.slot || void 0,
160
- "aria-disabled": i ? "true" : s["aria-disabled"],
160
+ "aria-disabled": i ? "true" : a["aria-disabled"],
161
161
  "data-disabled": e.isDisabled || void 0,
162
162
  "data-pressed": h.isPressed || void 0,
163
163
  "data-hovered": c || void 0,
164
164
  "data-focused": l || void 0,
165
165
  "data-pending": i || void 0,
166
166
  "data-focus-visible": $ || void 0
167
- }, /* @__PURE__ */ L.createElement(k.Provider, {
167
+ }, /* @__PURE__ */ L.createElement(U.Provider, {
168
168
  value: {
169
169
  id: f
170
170
  }
@@ -177,6 +177,6 @@ export {
177
177
  J as $,
178
178
  B as a,
179
179
  C as b,
180
- H as c,
180
+ k as c,
181
181
  z as d
182
182
  };
package/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
- ## 1.0.3 (2025-01-30)
1
+ ## 1.1.0 (2025-01-31)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **components:** new api and style for accordion
2
6
 
3
7
  ### 🩹 Fixes
4
8
 
@@ -7,6 +11,7 @@
7
11
  ### ❤️ Thank You
8
12
 
9
13
  - pixelrickdreamer
14
+ - Wilhelm Hjelm
10
15
 
11
16
  ## 1.0.2 (2025-01-27)
12
17
 
@@ -1,14 +1,14 @@
1
1
  import { jsx as P, jsxs as K, Fragment as Q } from "react/jsx-runtime";
2
2
  import { c as U } from "./clsx-OuTLNxxd.js";
3
- import { $ as X } from "./RSPContexts-EOiWkKOf.js";
4
- import { m as D, e as g, n as S, f as Y, a as w, x as M, y as Z, d as E, A as ee, i as ae, I as ie, z as q, c as de, b as le } from "./useFocusRing-BKGhL91C.js";
5
- import { d as ne, c as B, e as te, f as F, g as se, h as re, $ as W, a as oe } from "./Form-BQQs3jUk.js";
6
- import { b as ce, $ as fe } from "./useField-Dz62UHCP.js";
7
- import { $ as ue } from "./Text-CQPW6xs7.js";
3
+ import { a as X } from "./RSPContexts-BW2SEIqe.js";
4
+ import { n as D, e as g, o as S, f as Y, a as w, y as M, z as Z, d as E, B as ee, i as ae, F as ie, A as q, c as de, b as le } from "./useFocusRing-9PXyKy2A.js";
5
+ import { d as ne, c as B, e as te, f as F, g as se, h as re, $ as W, a as oe } from "./Form-BWBjJC6v.js";
6
+ import { b as ce, $ as fe } from "./useField-DMzJIIN4.js";
7
+ import { $ as ue } from "./Text-BCF0xvqL.js";
8
8
  import R, { useEffect as G, useRef as N, forwardRef as L, useContext as be, createContext as j } from "react";
9
- import { $ as H } from "./useControlledState-DrAoodI6.js";
10
- import { $ as ve } from "./useFocusable-CRSmYEQc.js";
11
- import { a as $e } from "./VisuallyHidden-CFx06Bae.js";
9
+ import { $ as H } from "./useControlledState-Kv9K2AYu.js";
10
+ import { $ as ve } from "./useFocusable-CcEBZe40.js";
11
+ import { a as $e } from "./VisuallyHidden-Dhr5caPC.js";
12
12
  import './Checkbox.css';function he(a, e, d) {
13
13
  let { isDisabled: t = !1, isReadOnly: s = !1, value: r, name: o, children: l, "aria-label": f, "aria-labelledby": i, validationState: n = "valid", isInvalid: c } = a, v = (y) => {
14
14
  y.stopPropagation(), e.setSelected(y.target.checked);
@@ -1,7 +1,7 @@
1
- import { a as P } from "./Hidden-DngIphiL.js";
1
+ import { a as P } from "./Hidden-CVlUgUJM.js";
2
2
  import { createPortal as _ } from "react-dom";
3
3
  import u, { useMemo as S, cloneElement as z, forwardRef as $, useContext as y, createContext as p, useRef as A, useCallback as m, useState as I } from "react";
4
- import { g as w, k as T } from "./useFocusRing-BKGhL91C.js";
4
+ import { g as w, l as T } from "./useFocusRing-9PXyKy2A.js";
5
5
  import { s as V } from "./index-B-jHjTDC.js";
6
6
  class x {
7
7
  get childNodes() {