@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
package/index79.js CHANGED
@@ -1,274 +1,314 @@
1
- import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
- import { LinkButton as f } from "./index78.js";
3
- import { Button as k } from "./index69.js";
4
- import { c as h } from "./clsx-OuTLNxxd.js";
5
- import { FlexItem as N } from "./index47.js";
6
- import { Logo as g } from "./index73.js";
7
- import b from "react";
8
- import { m as v } from "./tokens-CjXmpXTi.js";
9
- import { Dropdown as x, DropdownItem as C } from "./index76.js";
10
- import { $ as L } from "./useFocusRing-BKGhL91C.js";
11
- import { c as y } from "./createLucideIcon-DeWljiyi.js";
12
- import { X as T } from "./x-JK7i-TQC.js";
13
- import './Layout.css';/**
14
- * @license lucide-react v0.453.0 - ISC
15
- *
16
- * This source code is licensed under the ISC license.
17
- * See the LICENSE file in the root directory of this source tree.
18
- */
19
- const I = y("Menu", [
20
- ["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }],
21
- ["line", { x1: "4", x2: "20", y1: "6", y2: "6", key: "1owob3" }],
22
- ["line", { x1: "4", x2: "20", y1: "18", y2: "18", key: "yk5zj1" }]
23
- ]);
24
- /**
25
- * @license lucide-react v0.453.0 - ISC
26
- *
27
- * This source code is licensed under the ISC license.
28
- * See the LICENSE file in the root directory of this source tree.
29
- */
30
- const B = y("PanelLeftClose", [
31
- ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
32
- ["path", { d: "M9 3v18", key: "fh3hqa" }],
33
- ["path", { d: "m16 15-3-3 3-3", key: "14y99z" }]
34
- ]);
35
- /**
36
- * @license lucide-react v0.453.0 - ISC
37
- *
38
- * This source code is licensed under the ISC license.
39
- * See the LICENSE file in the root directory of this source tree.
40
- */
41
- const M = y("PanelRightClose", [
42
- ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
43
- ["path", { d: "M15 3v18", key: "14nvp0" }],
44
- ["path", { d: "m8 9 3 3-3 3", key: "12hl5m" }]
45
- ]), P = '"../theme/tokens.css"', H = '"Inter", sans-serif', O = "#143c50", z = "#f2f2f2", E = "#d9d9d9", F = "#b3b3b3", $ = "#a6a6a6", G = "#5d5d5d", S = "(min-width: 768px)", j = "#b90835", D = "_baseLayout_1w6p5_4", R = "_mainContent_1w6p5_13", q = "_header_1w6p5_18", X = "_headerContent_1w6p5_35", A = "_headerItems_1w6p5_52", J = "_logo_1w6p5_53", K = "_headerMenu_1w6p5_61", Q = "_toggleButton_1w6p5_69", U = "_sidebar_1w6p5_77", V = "_main_1w6p5_13", W = "_app_1w6p5_112", Y = "_sidebarOpened_1w6p5_121", Z = "_sidebarHeader_1w6p5_125", ee = "_sidebarFooter_1w6p5_134", ae = "_sidebarCollapsed_1w6p5_148", te = "_userName_1w6p5_165", se = "_abbr_1w6p5_177", ne = "_userTitle_1w6p5_183", ie = "_title_1w6p5_194", re = "_sidebarNav_1w6p5_205", oe = "_list_1w6p5_211", le = "_listGroupTitle_1w6p5_218", de = "_listItem_1w6p5_227", ce = "_listItemCollapsed_1w6p5_231", me = "_listLink_1w6p5_235", pe = "_linkText_1w6p5_242", _e = "_linkTextCollapsed_1w6p5_252", he = "_listLinkCollapsed_1w6p5_263", be = "_collapseButton_1w6p5_267", ye = "_backdrop_1w6p5_272", ue = "_backdropOpened_1w6p5_281", a = {
46
- tokens: P,
47
- display: H,
48
- primaryBackground: O,
49
- gray10: z,
50
- gray30: E,
51
- gray60: F,
52
- gray70: $,
53
- gray130: G,
54
- mdBreakpoint: S,
55
- logoPrimary: j,
56
- baseLayout: D,
57
- mainContent: R,
58
- header: q,
59
- headerContent: X,
60
- headerItems: A,
61
- logo: J,
62
- headerMenu: K,
63
- toggleButton: Q,
64
- sidebar: U,
65
- main: V,
66
- app: W,
67
- sidebarOpened: Y,
68
- sidebarHeader: Z,
69
- sidebarFooter: ee,
70
- sidebarCollapsed: ae,
71
- userName: te,
72
- abbr: se,
73
- userTitle: ne,
74
- title: ie,
75
- sidebarNav: re,
76
- list: oe,
77
- listGroupTitle: le,
78
- listItem: de,
79
- listItemCollapsed: ce,
80
- listLink: me,
81
- linkText: pe,
82
- linkTextCollapsed: _e,
83
- listLinkCollapsed: he,
84
- collapseButton: be,
85
- backdrop: ye,
86
- backdropOpened: ue
87
- }, He = ({
88
- items: p,
89
- title: r,
90
- user: d,
91
- app: t,
92
- children: i,
93
- headerChildren: o,
94
- clientSideRouter: c
95
- }) => {
96
- const [m, s] = b.useState(!1), [n, _] = b.useState(!1);
97
- return b.useEffect(() => {
98
- const u = (w) => {
99
- w.key === "Escape" && _(!1);
100
- };
101
- return window.addEventListener("keydown", u), () => {
102
- window.removeEventListener("keydown", u);
103
- };
104
- }, []), /* @__PURE__ */ l("div", { className: a.baseLayout, children: [
105
- /* @__PURE__ */ e(
106
- we,
107
- {
108
- title: r,
109
- headerChildren: o,
110
- user: d,
111
- app: t,
112
- isOpened: n,
113
- setIsOpened: _,
114
- setIsCollapsed: s
115
- }
116
- ),
117
- /* @__PURE__ */ l("div", { className: a.mainContent, children: [
118
- /* @__PURE__ */ e(
119
- ke,
120
- {
121
- items: p,
122
- app: t,
123
- isOpened: n,
124
- isCollapsed: m,
125
- setIsCollapsed: s,
126
- clientSideRouter: c
127
- }
128
- ),
129
- /* @__PURE__ */ e(N, { children: /* @__PURE__ */ e("main", { className: a.main, children: /* @__PURE__ */ e("div", { className: a.app, children: i }) }) }),
130
- /* @__PURE__ */ e(
131
- "div",
1
+ import { jsx as I } from "react/jsx-runtime";
2
+ import { $ as L } from "./Group-D7_8007y.js";
3
+ import { n as w, e as y, o as F, f as E, k as G, a as _, y as N, z as T, d as S, B as W, i as A, F as H, A as j, c as K, b as z } from "./useFocusRing-9PXyKy2A.js";
4
+ import { d as U, e as J, c as Q, $ as X, a as Y } from "./Form-BWBjJC6v.js";
5
+ import { b as Z, $ as ee } from "./useField-DMzJIIN4.js";
6
+ import { $ as ae } from "./Text-BCF0xvqL.js";
7
+ import V, { useMemo as ie, useState as de, forwardRef as M, createContext as q } from "react";
8
+ import { $ as re } from "./useControlledState-Kv9K2AYu.js";
9
+ import { $ as le } from "./FocusScope-B7CkxXNC.js";
10
+ import { $ as se } from "./context-BpJLnOuu.js";
11
+ import { $ as ne } from "./useFocusable-CcEBZe40.js";
12
+ import { a as te } from "./VisuallyHidden-Dhr5caPC.js";
13
+ import { I as oe } from "./TextField-CX4eOQf6.js";
14
+ import './Radio.css';const C = /* @__PURE__ */ new WeakMap();
15
+ function ce(a, e, d) {
16
+ let { value: r, children: s, "aria-label": l, "aria-labelledby": n } = a;
17
+ const i = a.isDisabled || e.isDisabled;
18
+ let u = s != null, f = l != null || n != null;
19
+ !u && !f && console.warn("If you do not provide children, you must specify an aria-label for accessibility");
20
+ let t = e.selectedValue === r, v = (B) => {
21
+ B.stopPropagation(), e.setSelectedValue(r);
22
+ }, { pressProps: m, isPressed: x } = w({
23
+ isDisabled: i
24
+ }), { pressProps: P, isPressed: $ } = w({
25
+ isDisabled: i,
26
+ onPress() {
27
+ e.setSelectedValue(r);
28
+ }
29
+ }), { focusableProps: D } = ne(y(a, {
30
+ onFocus: () => e.setLastFocusedValue(r)
31
+ }), d), R = y(m, D), g = F(a, {
32
+ labelable: !0
33
+ }), p = -1;
34
+ e.selectedValue != null ? e.selectedValue === r && (p = 0) : (e.lastFocusedValue === r || e.lastFocusedValue == null) && (p = 0), i && (p = void 0);
35
+ let { name: b, descriptionId: o, errorMessageId: h, validationBehavior: c } = C.get(e);
36
+ return U(d, e.selectedValue, e.setSelectedValue), J({
37
+ validationBehavior: c
38
+ }, e, d), {
39
+ labelProps: y(P, {
40
+ onClick: (B) => B.preventDefault()
41
+ }),
42
+ inputProps: y(g, {
43
+ ...R,
44
+ type: "radio",
45
+ name: b,
46
+ tabIndex: p,
47
+ disabled: i,
48
+ required: e.isRequired && c === "native",
49
+ checked: t,
50
+ value: r,
51
+ onChange: v,
52
+ "aria-describedby": [
53
+ a["aria-describedby"],
54
+ e.isInvalid ? h : null,
55
+ o
56
+ ].filter(Boolean).join(" ") || void 0
57
+ }),
58
+ isDisabled: i,
59
+ isSelected: t,
60
+ isPressed: x || $
61
+ };
62
+ }
63
+ function fe(a, e) {
64
+ let { name: d, isReadOnly: r, isRequired: s, isDisabled: l, orientation: n = "vertical", validationBehavior: i = "aria" } = a, { direction: u } = se(), { isInvalid: f, validationErrors: t, validationDetails: v } = e.displayValidation, { labelProps: m, fieldProps: x, descriptionProps: P, errorMessageProps: $ } = Z({
65
+ ...a,
66
+ // Radio group is not an HTML input element so it
67
+ // shouldn't be labeled by a <label> element.
68
+ labelElementType: "span",
69
+ isInvalid: e.isInvalid,
70
+ errorMessage: a.errorMessage || t
71
+ }), D = F(a, {
72
+ labelable: !0
73
+ }), { focusWithinProps: R } = E({
74
+ onBlurWithin(b) {
75
+ var o;
76
+ (o = a.onBlur) === null || o === void 0 || o.call(a, b), e.selectedValue || e.setLastFocusedValue(null);
77
+ },
78
+ onFocusWithin: a.onFocus,
79
+ onFocusWithinChange: a.onFocusChange
80
+ }), g = (b) => {
81
+ let o;
82
+ switch (b.key) {
83
+ case "ArrowRight":
84
+ u === "rtl" && n !== "vertical" ? o = "prev" : o = "next";
85
+ break;
86
+ case "ArrowLeft":
87
+ u === "rtl" && n !== "vertical" ? o = "next" : o = "prev";
88
+ break;
89
+ case "ArrowDown":
90
+ o = "next";
91
+ break;
92
+ case "ArrowUp":
93
+ o = "prev";
94
+ break;
95
+ default:
96
+ return;
97
+ }
98
+ b.preventDefault();
99
+ let h = le(b.currentTarget, {
100
+ from: b.target
101
+ }), c;
102
+ o === "next" ? (c = h.nextNode(), c || (h.currentNode = b.currentTarget, c = h.firstChild())) : (c = h.previousNode(), c || (h.currentNode = b.currentTarget, c = h.lastChild())), c && (c.focus(), e.setSelectedValue(c.value));
103
+ }, p = G(d);
104
+ return C.set(e, {
105
+ name: p,
106
+ descriptionId: P.id,
107
+ errorMessageId: $.id,
108
+ validationBehavior: i
109
+ }), {
110
+ radioGroupProps: y(D, {
111
+ // https://www.w3.org/TR/wai-aria-1.2/#radiogroup
112
+ role: "radiogroup",
113
+ onKeyDown: g,
114
+ "aria-invalid": e.isInvalid || void 0,
115
+ "aria-errormessage": a["aria-errormessage"],
116
+ "aria-readonly": r || void 0,
117
+ "aria-required": s || void 0,
118
+ "aria-disabled": l || void 0,
119
+ "aria-orientation": n,
120
+ ...x,
121
+ ...R
122
+ }),
123
+ labelProps: m,
124
+ descriptionProps: P,
125
+ errorMessageProps: $,
126
+ isInvalid: f,
127
+ validationErrors: t,
128
+ validationDetails: v
129
+ };
130
+ }
131
+ let ue = Math.round(Math.random() * 1e10), be = 0;
132
+ function $e(a) {
133
+ let e = ie(() => a.name || `radio-group-${ue}-${++be}`, [
134
+ a.name
135
+ ]);
136
+ var d;
137
+ let [r, s] = re(a.value, (d = a.defaultValue) !== null && d !== void 0 ? d : null, a.onChange), [l, n] = de(null), i = Q({
138
+ ...a,
139
+ value: r
140
+ }), u = (t) => {
141
+ !a.isReadOnly && !a.isDisabled && (s(t), i.commitValidation());
142
+ }, f = i.displayValidation.isInvalid;
143
+ return {
144
+ ...i,
145
+ name: e,
146
+ selectedValue: r,
147
+ setSelectedValue: u,
148
+ lastFocusedValue: l,
149
+ setLastFocusedValue: n,
150
+ isDisabled: a.isDisabled || !1,
151
+ isReadOnly: a.isReadOnly || !1,
152
+ isRequired: a.isRequired || !1,
153
+ validationState: a.validationState || (f ? "invalid" : null),
154
+ isInvalid: f
155
+ };
156
+ }
157
+ const pe = /* @__PURE__ */ q(null), ve = /* @__PURE__ */ q(null), O = /* @__PURE__ */ q(null), me = /* @__PURE__ */ M(function(e, d) {
158
+ [e, d] = _(e, d, pe);
159
+ let { validationBehavior: r } = N(X) || {};
160
+ var s, l;
161
+ let n = (l = (s = e.validationBehavior) !== null && s !== void 0 ? s : r) !== null && l !== void 0 ? l : "native", i = $e({
162
+ ...e,
163
+ validationBehavior: n
164
+ }), [u, f] = T(), { radioGroupProps: t, labelProps: v, descriptionProps: m, errorMessageProps: x, ...P } = fe({
165
+ ...e,
166
+ label: f,
167
+ validationBehavior: n
168
+ }, i), $ = S({
169
+ ...e,
170
+ values: {
171
+ orientation: e.orientation || "vertical",
172
+ isDisabled: i.isDisabled,
173
+ isReadOnly: i.isReadOnly,
174
+ isRequired: i.isRequired,
175
+ isInvalid: i.isInvalid,
176
+ state: i
177
+ },
178
+ defaultClassName: "react-aria-RadioGroup"
179
+ });
180
+ return /* @__PURE__ */ V.createElement("div", {
181
+ ...t,
182
+ ...$,
183
+ ref: d,
184
+ slot: e.slot || void 0,
185
+ "data-orientation": e.orientation || "vertical",
186
+ "data-invalid": i.isInvalid || void 0,
187
+ "data-disabled": i.isDisabled || void 0,
188
+ "data-readonly": i.isReadOnly || void 0,
189
+ "data-required": i.isRequired || void 0
190
+ }, /* @__PURE__ */ V.createElement(W, {
191
+ values: [
192
+ [
193
+ O,
194
+ i
195
+ ],
196
+ [
197
+ ee,
132
198
  {
133
- className: h(a.backdrop, n && a.backdropOpened),
134
- onClick: () => _(!1),
135
- "aria-hidden": !0
199
+ ...v,
200
+ ref: u,
201
+ elementType: "span"
136
202
  }
137
- )
138
- ] })
139
- ] });
140
- }, ke = ({
141
- items: p,
142
- app: r,
143
- isOpened: d,
144
- isCollapsed: t,
145
- setIsCollapsed: i,
146
- clientSideRouter: o
147
- }) => {
148
- const c = () => /* @__PURE__ */ e("div", { className: a.sidebarHeader, children: t ? /* @__PURE__ */ e("p", { className: a.name, children: r.shortName }) : /* @__PURE__ */ e("p", { className: a.abbr, children: r.name }) }), m = ({ group: s }) => /* @__PURE__ */ e("ul", { className: a.list, children: s.items.map((n, _) => /* @__PURE__ */ e(
149
- "li",
150
- {
151
- className: h(
152
- a.listItem,
153
- t && a.listItemCollapsed
154
- ),
155
- children: /* @__PURE__ */ e(
156
- f,
203
+ ],
204
+ [
205
+ ae,
157
206
  {
158
- iconPlacement: "left",
159
- href: n.href,
160
- icon: n.icon,
161
- className: h(
162
- a.listLink,
163
- t && a.listLinkCollapsed
164
- ),
165
- variant: "tertiary",
166
- children: /* @__PURE__ */ e(
167
- "span",
168
- {
169
- className: h(
170
- a.linkText,
171
- t && a.linkTextCollapsed
172
- ),
173
- children: n.title
174
- }
175
- )
176
- }
177
- )
178
- },
179
- "link_" + _
180
- )) });
181
- return /* @__PURE__ */ l(
182
- "aside",
183
- {
184
- id: "midasMainMenu",
185
- className: h(
186
- a.sidebar,
187
- t && a.sidebarCollapsed,
188
- d && a.sidebarOpened
189
- ),
190
- children: [
191
- /* @__PURE__ */ e(c, {}),
192
- /* @__PURE__ */ e("nav", { className: a.sidebarNav, children: /* @__PURE__ */ e("ul", { className: a.list, children: p.map((s, n) => /* @__PURE__ */ l("li", { children: [
193
- s.title && !t && /* @__PURE__ */ e("p", { className: a.listGroupTitle, children: s.title }),
194
- o ? /* @__PURE__ */ e(L, { navigate: o, children: /* @__PURE__ */ e(m, { group: s }) }) : /* @__PURE__ */ e(m, { group: s })
195
- ] }, "list_" + n)) }) }),
196
- /* @__PURE__ */ e("div", { className: a.sidebarFooter, children: /* @__PURE__ */ e(
197
- k,
198
- {
199
- variant: "tertiary",
200
- "aria-label": t ? "Maximera sidomenyn" : "Minimera sidomenyn",
201
- onPress: () => i(!t),
202
- className: a.collapseButton,
203
- children: t ? /* @__PURE__ */ e(M, {}) : /* @__PURE__ */ e(B, {})
207
+ slots: {
208
+ description: m,
209
+ errorMessage: x
204
210
  }
205
- ) })
211
+ }
212
+ ],
213
+ [
214
+ Y,
215
+ P
206
216
  ]
217
+ ]
218
+ }, $.children));
219
+ }), xe = /* @__PURE__ */ M(function(e, d) {
220
+ let { inputRef: r = null, ...s } = e;
221
+ [e, d] = _(s, d, ve);
222
+ let l = V.useContext(O), n = A(H(r, e.inputRef !== void 0 ? e.inputRef : null)), { labelProps: i, inputProps: u, isSelected: f, isDisabled: t, isPressed: v } = ce({
223
+ ...j(e),
224
+ // ReactNode type doesn't allow function children.
225
+ children: typeof e.children == "function" ? !0 : e.children
226
+ }, l, n), { isFocused: m, isFocusVisible: x, focusProps: P } = K(), $ = t || l.isReadOnly, { hoverProps: D, isHovered: R } = z({
227
+ ...e,
228
+ isDisabled: $
229
+ }), g = S({
230
+ ...e,
231
+ defaultClassName: "react-aria-Radio",
232
+ values: {
233
+ isSelected: f,
234
+ isPressed: v,
235
+ isHovered: R,
236
+ isFocused: m,
237
+ isFocusVisible: x,
238
+ isDisabled: t,
239
+ isReadOnly: l.isReadOnly,
240
+ isInvalid: l.isInvalid,
241
+ isRequired: l.isRequired
207
242
  }
208
- );
209
- }, we = ({
210
- title: p,
211
- user: r,
212
- app: d,
213
- headerChildren: t,
214
- isOpened: i,
215
- setIsOpened: o,
216
- setIsCollapsed: c
217
- }) => /* @__PURE__ */ l(
218
- "header",
243
+ }), p = F(e);
244
+ return delete p.id, /* @__PURE__ */ V.createElement("label", {
245
+ ...y(p, i, D, g),
246
+ ref: d,
247
+ "data-selected": f || void 0,
248
+ "data-pressed": v || void 0,
249
+ "data-hovered": R || void 0,
250
+ "data-focused": m || void 0,
251
+ "data-focus-visible": x || void 0,
252
+ "data-disabled": t || void 0,
253
+ "data-readonly": l.isReadOnly || void 0,
254
+ "data-invalid": l.isInvalid || void 0,
255
+ "data-required": l.isRequired || void 0
256
+ }, /* @__PURE__ */ V.createElement(te, {
257
+ elementType: "span"
258
+ }, /* @__PURE__ */ V.createElement("input", {
259
+ ...y(u, P),
260
+ ref: n
261
+ })), g.children);
262
+ }), Pe = '"../theme/tokens.css"', he = '"Inter", sans-serif', ye = "undefined", Re = "#1f1f1f", ge = "#000000", Ve = "#143c50", De = "#bfbfbf", Ie = "#b3b3b3", Be = "#ffdfdf", ke = "#e62323", Fe = "undefined", qe = "#1f1f1f", we = "undefined", _e = "(max-width: 767px)", Se = "0 0 0 2px #ffffff, 0 0 0 4px #000000", Me = "(min-width: 768px)", Ce = "#b3b3b3", Oe = "_radioGroup_1vn0q_4", Le = "_wrap_1vn0q_17", Ee = "_radio_1vn0q_4", k = {
263
+ tokens: Pe,
264
+ display: he,
265
+ inputLabel: ye,
266
+ inputText: Re,
267
+ black: ge,
268
+ blue150: Ve,
269
+ gray50: De,
270
+ gray60: Ie,
271
+ signalRed10: Be,
272
+ signalRed100: ke,
273
+ medium: Fe,
274
+ gray150: qe,
275
+ regular: we,
276
+ smBreakpoint: _e,
277
+ focus: Se,
278
+ mdBreakpoint: Me,
279
+ borderSecondary: Ce,
280
+ radioGroup: Oe,
281
+ wrap: Le,
282
+ radio: Ee
283
+ }, Ye = ({
284
+ label: a,
285
+ description: e,
286
+ errorMessage: d,
287
+ children: r,
288
+ ...s
289
+ }) => /* @__PURE__ */ I(
290
+ me,
219
291
  {
220
- className: a.header,
221
- style: {
222
- borderTop: `solid 4px ${d.color ? d.color : v.logoPrimary}`
223
- },
224
- children: [
225
- /* @__PURE__ */ l("div", { className: a.headerContent, children: [
226
- /* @__PURE__ */ e(
227
- g,
228
- {
229
- padding: !1,
230
- size: "small",
231
- className: a.logo
232
- }
233
- ),
234
- i !== void 0 && c && o && /* @__PURE__ */ e(
235
- k,
236
- {
237
- variant: "icon",
238
- className: a.toggleButton,
239
- "aria-label": i ? "Stäng meny" : "Öppna meny",
240
- "aria-controls": "midasMainMenu",
241
- onPress: () => {
242
- c(!1), o(!i);
243
- },
244
- children: i ? /* @__PURE__ */ e(
245
- T,
246
- {
247
- size: 20,
248
- "aria-hidden": !0
249
- }
250
- ) : /* @__PURE__ */ e(
251
- I,
252
- {
253
- size: 20,
254
- "aria-hidden": !0
255
- }
256
- )
257
- }
258
- ),
259
- /* @__PURE__ */ l("div", { children: [
260
- /* @__PURE__ */ e("p", { className: a.userName, children: r.name }),
261
- /* @__PURE__ */ e("p", { className: a.userTitle, children: r.title }),
262
- /* @__PURE__ */ e("p", { className: a.title, children: p })
263
- ] })
264
- ] }),
265
- /* @__PURE__ */ e("div", { className: a.headerItems, children: t }),
266
- /* @__PURE__ */ e("div", { className: a.headerMenu, children: /* @__PURE__ */ e(x, { children: b.Children.map(t, (m) => /* @__PURE__ */ e(C, { children: m })) }) })
267
- ]
292
+ ...s,
293
+ className: k.radioGroup,
294
+ children: /* @__PURE__ */ I(
295
+ oe,
296
+ {
297
+ label: a,
298
+ description: e,
299
+ errorMessage: d,
300
+ children: /* @__PURE__ */ I(L, { className: k.wrap, children: r })
301
+ }
302
+ )
303
+ }
304
+ ), Ze = (a) => /* @__PURE__ */ I(
305
+ xe,
306
+ {
307
+ className: k.radio,
308
+ ...a
268
309
  }
269
310
  );
270
311
  export {
271
- we as Header,
272
- He as Layout,
273
- ke as Sidebar
312
+ Ze as Radio,
313
+ Ye as RadioGroup
274
314
  };
package/index8.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Spinner as n } from "./index75.js";
1
+ import { Spinner as n } from "./index72.js";
2
2
  export {
3
3
  n as Spinner
4
4
  };