@midas-ds/components 17.2.6 → 17.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 (106) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/accordion/index.js +1 -1
  3. package/assets/AccordionItem.css +1 -1
  4. package/assets/Button.css +1 -1
  5. package/assets/Checkbox.css +1 -1
  6. package/assets/ComboBox.css +1 -1
  7. package/assets/DateField.css +1 -1
  8. package/assets/DateRangePicker.css +1 -1
  9. package/assets/Dialog.css +1 -1
  10. package/assets/Heading.css +1 -1
  11. package/assets/LinkButton.css +1 -1
  12. package/assets/ListBox.css +1 -1
  13. package/assets/ListBoxEmptyState.css +1 -1
  14. package/assets/Popover.css +1 -1
  15. package/assets/RangeCalendar.css +1 -1
  16. package/assets/SearchField.css +1 -1
  17. package/assets/Select.css +1 -1
  18. package/assets/Separator.css +1 -1
  19. package/assets/Skeleton.css +1 -1
  20. package/assets/TabList.css +1 -1
  21. package/assets/Table.css +1 -1
  22. package/assets/TagGroup.css +1 -1
  23. package/assets/Text.css +1 -1
  24. package/assets/TextField.css +1 -1
  25. package/assets/Tooltip.css +1 -1
  26. package/assets/default.css +1 -1
  27. package/button/index.js +1 -1
  28. package/calendar/index.js +1 -1
  29. package/card/index.js +1 -1
  30. package/checkbox/index.js +2 -2
  31. package/chunks/AccordionItem-BuUIdVd_.js +129 -0
  32. package/chunks/{Button-CaLOUTDO.js → Button-BhIvfqOc.js} +1 -1
  33. package/chunks/Button.module-BW0TvYZ2.js +14 -0
  34. package/chunks/{Card-DMSnokPn.js → Card-CVwiT9zm.js} +1 -1
  35. package/chunks/{Checkbox-CRLj7_Ox.js → Checkbox-sAkQe7Q9.js} +18 -18
  36. package/chunks/{CheckboxGroup-DooCBqUG.js → CheckboxGroup-DGVV0X_Z.js} +4 -4
  37. package/chunks/{ClearButton-DPm_d7SL.js → ClearButton-DBr9Zfwq.js} +1 -1
  38. package/chunks/{ColorSchemeSwitch-DOQ0yjtt.js → ColorSchemeSwitch-DkY8VTVR.js} +1 -1
  39. package/chunks/ComboBox-Dx4GD2oe.js +102 -0
  40. package/chunks/{DateField-6CclHfL2.js → DateField-h3l0qG7u.js} +23 -23
  41. package/chunks/{DateRangePicker-BoL-sn9u.js → DateRangePicker-BCZ6i1w0.js} +27 -27
  42. package/chunks/{Dialog-BHxDzbf8.js → Dialog-DVff9MDd.js} +17 -17
  43. package/chunks/{FieldError-BMTrvSof.js → FieldError-krpMBtie.js} +1 -1
  44. package/chunks/Heading-nfcRc2QF.js +38 -0
  45. package/chunks/{InfoBanner-C4HnaXQO.js → InfoBanner-otmuemqy.js} +1 -1
  46. package/chunks/{Label-6GZmmff9.js → Label-s4J9sYdy.js} +2 -2
  47. package/chunks/{Layout-BclBqFzc.js → Layout-hXzqx4cY.js} +2 -2
  48. package/chunks/{LinkButton-B1zayj7k.js → LinkButton-DJ-D5PkB.js} +15 -15
  49. package/chunks/{ListBox-D5BBeZWL.js → ListBox-CDlOUvzJ.js} +13 -13
  50. package/chunks/{ListBoxEmptyState-_Cn38cQ6.js → ListBoxEmptyState-CXKkWQy1.js} +3 -3
  51. package/chunks/{ListBoxHeader-CL9bFH22.js → ListBoxHeader-DSYdXl2I.js} +1 -1
  52. package/chunks/{Popover-BcEtFiU1.js → Popover-CaP4LFhg.js} +12 -12
  53. package/chunks/{ProgressBar-Dg0JMQ71.js → ProgressBar-acc8946-.js} +1 -1
  54. package/chunks/{Radio-CAIyBgBp.js → Radio-DjivEe-_.js} +3 -3
  55. package/chunks/{RangeCalendar-DIMxoHhy.js → RangeCalendar-LheFd9WF.js} +26 -26
  56. package/chunks/SearchField-1DYv0w4b.js +128 -0
  57. package/chunks/Select-CV0H13h-.js +222 -0
  58. package/chunks/Separator-CkVOLF6I.js +76 -0
  59. package/chunks/{Skeleton-DqIHQLQl.js → Skeleton-D6mxKxuu.js} +22 -22
  60. package/chunks/{TabList-BaR443mu.js → TabList-BHX-cuhB.js} +20 -20
  61. package/chunks/{Table-UbdCFrkS.js → Table-Bg-AKi7d.js} +50 -50
  62. package/chunks/{TagGroup-CWe0P76-.js → TagGroup-BscTXQ_E.js} +29 -29
  63. package/chunks/{Text-BuXvuoqM.js → Text-D0r_W4lH.js} +16 -16
  64. package/chunks/{TextArea-BQuztcdA.js → TextArea-CBRE_gsN.js} +5 -5
  65. package/chunks/TextField.module-BDIbEV87.js +12 -0
  66. package/chunks/{Toast-UPM-1ipu.js → Toast-Cxm230CK.js} +1 -1
  67. package/chunks/{ToggleButtonGroup-CXKTrLbb.js → ToggleButtonGroup-Bv9xpwTT.js} +1 -1
  68. package/chunks/{Tooltip-rDmOkGmX.js → Tooltip-C1bbgr2l.js} +12 -12
  69. package/clear-button/index.js +1 -1
  70. package/color-scheme-switch/index.js +1 -1
  71. package/combobox/index.js +1 -1
  72. package/date-field/index.js +1 -1
  73. package/date-picker/index.js +1 -1
  74. package/field-error/index.js +1 -1
  75. package/heading/index.js +1 -1
  76. package/index.js +36 -36
  77. package/info-banner/index.js +1 -1
  78. package/label/index.js +1 -1
  79. package/layout/index.js +1 -1
  80. package/link-button/index.js +1 -1
  81. package/list-box/index.js +3 -3
  82. package/menu/index.js +1 -1
  83. package/modal/index.js +1 -1
  84. package/package.json +2 -2
  85. package/popover/index.js +1 -1
  86. package/progress-bar/index.js +1 -1
  87. package/radio/index.js +1 -1
  88. package/search-field/index.js +1 -1
  89. package/select/index.js +1 -1
  90. package/skeleton/index.js +1 -1
  91. package/table/index.js +1 -1
  92. package/tabs/index.js +1 -1
  93. package/tag/index.js +1 -1
  94. package/text/index.js +1 -1
  95. package/textfield/index.js +1 -1
  96. package/toast/index.js +1 -1
  97. package/toggle-button/index.js +1 -1
  98. package/tooltip/index.js +1 -1
  99. package/chunks/AccordionItem-CSvARy63.js +0 -129
  100. package/chunks/Button.module-Cm0H98vy.js +0 -14
  101. package/chunks/ComboBox-DnqZjAqe.js +0 -102
  102. package/chunks/Heading-D8tNNJkt.js +0 -38
  103. package/chunks/SearchField-C_OjgTE0.js +0 -128
  104. package/chunks/Select-D7JfpIUT.js +0 -222
  105. package/chunks/Separator-XIzn8lsq.js +0 -76
  106. package/chunks/TextField.module-DmV0iI3P.js +0 -12
@@ -1,222 +0,0 @@
1
- import { jsx as e, Fragment as V, jsxs as i } from "react/jsx-runtime";
2
- import { SelectStateContext as d, SelectValue as _, Button as h, TagList as j, Select as A } from "react-aria-components";
3
- import { FocusScope as C } from "@react-aria/focus";
4
- import { a as N, L as x } from "./Label-6GZmmff9.js";
5
- import { a as b, c as T } from "./clsx-AexbMWKp.js";
6
- import { T as y } from "./Text-BuXvuoqM.js";
7
- import { F as g } from "./FieldError-BMTrvSof.js";
8
- import p, { useContext as f } from "react";
9
- import { C as B } from "./Checkbox-CRLj7_Ox.js";
10
- import { u as m } from "./useLocalizedStringFormatter-BHvsRxDk.js";
11
- import { useFocusManager as M } from "react-aria";
12
- import { X as F } from "./x-B9bYxG31.js";
13
- import { L } from "./ListBox-D5BBeZWL.js";
14
- import { P as I } from "./Popover-BcEtFiU1.js";
15
- import { a as G, T as k } from "./TagGroup-CWe0P76-.js";
16
- import { C as R } from "./chevron-down-BBFYYzZq.js";
17
- import '../assets/Select.css';const $ = { clearAll: "Clear all", selectAll: "Select all", selectedItems: "Selected items", selected: "selected" }, w = { clearAll: "Rensa alla", selectAll: "Välj alla", selectedItems: "Valda objekt", selected: "valda" }, u = {
18
- en: $,
19
- sv: w
20
- }, P = "_select_11rjo_1", z = "_triggerContainer_11rjo_7", D = "_trigger_11rjo_7", E = "_medium_11rjo_29", K = "_icon_11rjo_66", W = "_selectValue_11rjo_72", X = "_placeholder_11rjo_78", q = "_multiSelectValue_11rjo_88", H = "_selectValueTag_11rjo_112", J = "_clearButton_11rjo_126", O = "_truncate_11rjo_138", Q = "_popover_11rjo_175", U = "_selectAll_11rjo_201", Y = "_tagGroup_11rjo_269", a = {
21
- select: P,
22
- triggerContainer: z,
23
- trigger: D,
24
- medium: E,
25
- icon: K,
26
- selectValue: W,
27
- placeholder: X,
28
- multiSelectValue: q,
29
- selectValueTag: H,
30
- clearButton: J,
31
- truncate: O,
32
- popover: Q,
33
- selectAll: U,
34
- tagGroup: Y
35
- }, Z = () => {
36
- const t = p.useContext(d), r = m(u), o = () => t?.setValue(
37
- t?.selectionManager.isSelectAll ? null : Array.from(t.collection.getKeys())
38
- );
39
- return /* @__PURE__ */ e(
40
- B,
41
- {
42
- className: a.selectAll,
43
- isIndeterminate: !t?.selectionManager.isSelectAll && !t?.selectionManager.isEmpty,
44
- isSelected: t?.selectionManager.isSelectAll,
45
- onChange: o,
46
- children: r.format("selectAll")
47
- }
48
- );
49
- }, ee = ({
50
- isDisabled: t
51
- }) => {
52
- const r = m(u), o = (l, c) => l.length === 1 ? c : `${l.length} ${r.format("selected")}`;
53
- return /* @__PURE__ */ e(
54
- _,
55
- {
56
- className: a.multiSelectValue,
57
- "data-disabled": t || void 0,
58
- children: ({ isPlaceholder: l, selectedItems: c, selectedText: s }) => l ? /* @__PURE__ */ e(V, {}) : /* @__PURE__ */ i(
59
- "div",
60
- {
61
- className: a.selectValueTag,
62
- "data-disabled": t || void 0,
63
- children: [
64
- /* @__PURE__ */ e("span", { className: a.truncate, children: o(c, s) }),
65
- /* @__PURE__ */ e(te, { isDisabled: t })
66
- ]
67
- }
68
- )
69
- }
70
- );
71
- }, te = ({
72
- isDisabled: t
73
- }) => {
74
- const r = p.useContext(d), o = m(u), l = M(), c = () => {
75
- l?.focusFirst(), r?.setValue(null);
76
- };
77
- return /* @__PURE__ */ e(
78
- h,
79
- {
80
- "aria-label": o.format("clearAll"),
81
- className: a.clearButton,
82
- onPress: c,
83
- slot: null,
84
- isDisabled: t,
85
- children: /* @__PURE__ */ e(
86
- F,
87
- {
88
- width: 20,
89
- height: 20
90
- }
91
- )
92
- }
93
- );
94
- }, le = ({
95
- showTags: t,
96
- isDisabled: r
97
- }) => {
98
- const o = m(u), l = f(d), c = (s) => {
99
- l?.selectionManager.toggleSelection(Array.from(s)[0]);
100
- };
101
- return !l?.selectedItems.length || !t ? null : /* @__PURE__ */ e(
102
- G,
103
- {
104
- "aria-label": o.format("selectedItems"),
105
- className: a.tagGroup,
106
- onRemove: c,
107
- selectionBehavior: "toggle",
108
- children: /* @__PURE__ */ e(j, { items: l.selectedItems, children: (s) => /* @__PURE__ */ e(
109
- k,
110
- {
111
- isDismissable: !0,
112
- id: s.key,
113
- isDisabled: r,
114
- textValue: s.textValue,
115
- children: s.textValue
116
- },
117
- s.key
118
- ) })
119
- }
120
- );
121
- }, ae = ({
122
- isDisabled: t,
123
- selectionMode: r,
124
- size: o
125
- }) => {
126
- const l = f(d);
127
- return /* @__PURE__ */ i(
128
- h,
129
- {
130
- className: b(
131
- {
132
- [a.medium]: o === "medium"
133
- },
134
- a.trigger
135
- ),
136
- "data-invalid": !!l?.displayValidation.isInvalid || void 0,
137
- children: [
138
- /* @__PURE__ */ e(
139
- _,
140
- {
141
- className: a.selectValue,
142
- "data-disabled": t || void 0,
143
- children: ({ selectedText: c, defaultChildren: s }) => /* @__PURE__ */ e("div", { className: a.placeholder, children: /* @__PURE__ */ e("span", { className: a.truncate, children: r === "multiple" && c ? null : c || s }) })
144
- }
145
- ),
146
- /* @__PURE__ */ e(
147
- "span",
148
- {
149
- "aria-hidden": "true",
150
- className: a.icon,
151
- children: /* @__PURE__ */ e(R, { size: 20 })
152
- }
153
- )
154
- ]
155
- }
156
- );
157
- };
158
- function Ve({
159
- children: t,
160
- description: r,
161
- errorMessage: o,
162
- errorPosition: l = "top",
163
- items: c,
164
- label: s,
165
- popover: S,
166
- size: v = "large",
167
- ...n
168
- }) {
169
- return /* @__PURE__ */ e(C, { children: /* @__PURE__ */ i(
170
- A,
171
- {
172
- ...n,
173
- className: T(n.className, a.select),
174
- children: [
175
- /* @__PURE__ */ e(N, { popover: S, children: s && /* @__PURE__ */ e(x, { "data-disabled": n.isDisabled || void 0, children: s }) }),
176
- r && /* @__PURE__ */ e(y, { slot: "description", children: r }),
177
- l === "top" && /* @__PURE__ */ e(g, { children: o }),
178
- /* @__PURE__ */ i(
179
- "div",
180
- {
181
- className: a.triggerContainer,
182
- "data-disabled": n.isDisabled || void 0,
183
- children: [
184
- /* @__PURE__ */ e(
185
- ae,
186
- {
187
- size: v,
188
- ...n
189
- }
190
- ),
191
- n.selectionMode === "multiple" ? /* @__PURE__ */ e(ee, { ...n }) : null
192
- ]
193
- }
194
- ),
195
- l === "bottom" && /* @__PURE__ */ e(g, { children: o }),
196
- /* @__PURE__ */ i(
197
- I,
198
- {
199
- className: a.popover,
200
- offset: 0,
201
- hideArrow: !0,
202
- children: [
203
- n.isSelectableAll && /* @__PURE__ */ e(Z, {}),
204
- /* @__PURE__ */ e(
205
- L,
206
- {
207
- escapeKeyBehavior: "none",
208
- items: c,
209
- children: t
210
- }
211
- )
212
- ]
213
- }
214
- ),
215
- /* @__PURE__ */ e(le, { ...n })
216
- ]
217
- }
218
- ) });
219
- }
220
- export {
221
- Ve as S
222
- };
@@ -1,76 +0,0 @@
1
- import { jsx as t, jsxs as r, Fragment as i } from "react/jsx-runtime";
2
- import { Menu as _, MenuItem as l, Popover as d, MenuSection as k, Separator as M } from "react-aria-components";
3
- import { c as m } from "./clsx-AexbMWKp.js";
4
- import { C as h } from "./check-Bt2UikoU.js";
5
- import { C as S } from "./chevron-right-DvXGOiS_.js";
6
- import '../assets/Separator.css';const f = "_menu_1ku97_1", p = "_menuSection_1ku97_17", v = "_medium_1ku97_29", C = "_menuItem_1ku97_35", N = "_mainContent_1ku97_105", I = "_checkMark_1ku97_116", x = "_separator_1ku97_126", P = "_menuPopover_1ku97_149", o = {
7
- menu: f,
8
- menuSection: p,
9
- medium: v,
10
- menuItem: C,
11
- mainContent: N,
12
- checkMark: I,
13
- separator: x,
14
- menuPopover: P
15
- }, z = ({
16
- className: e,
17
- size: n = "large",
18
- ...a
19
- }) => /* @__PURE__ */ t(
20
- _,
21
- {
22
- className: m(e, o.menu, n === "medium" && o.medium),
23
- ...a
24
- }
25
- ), V = (e) => /* @__PURE__ */ t(
26
- l,
27
- {
28
- ...e,
29
- textValue: e.textValue || (typeof e.children == "string" ? e.children : void 0),
30
- className: m(o.menuItem, e.className),
31
- children: (n) => {
32
- const { children: a } = e, { selectionMode: s, isSelected: c, hasSubmenu: u } = n;
33
- return /* @__PURE__ */ r(i, { children: [
34
- s !== "none" && /* @__PURE__ */ t(
35
- h,
36
- {
37
- size: 16,
38
- className: o.checkMark,
39
- "data-selected": c || void 0
40
- }
41
- ),
42
- /* @__PURE__ */ t("div", { className: o.mainContent, children: typeof a == "function" ? a(n) : a }),
43
- u && /* @__PURE__ */ t(S, { size: 20 })
44
- ] });
45
- }
46
- }
47
- ), F = ({ className: e, ...n }) => /* @__PURE__ */ t(
48
- d,
49
- {
50
- className: m(e, o.menuPopover),
51
- offset: 4,
52
- ...n
53
- }
54
- ), R = ({
55
- className: e,
56
- ...n
57
- }) => /* @__PURE__ */ t(
58
- k,
59
- {
60
- className: m(e, o.menuSection),
61
- ...n
62
- }
63
- ), q = ({ className: e, ...n }) => /* @__PURE__ */ t(
64
- M,
65
- {
66
- className: m(e, o.separator),
67
- ...n
68
- }
69
- );
70
- export {
71
- z as M,
72
- q as S,
73
- V as a,
74
- F as b,
75
- R as c
76
- };
@@ -1,12 +0,0 @@
1
- import '../assets/TextField.css';const t = "_textField_9ybf8_1", o = "_bottomError_9ybf8_20", _ = "_textArea_9ybf8_29", r = "_input_9ybf8_30", s = "_wrap_9ybf8_87", e = "_medium_9ybf8_92", n = "_passwordButton_9ybf8_159", a = {
2
- textField: t,
3
- bottomError: o,
4
- textArea: _,
5
- input: r,
6
- wrap: s,
7
- medium: e,
8
- passwordButton: n
9
- };
10
- export {
11
- a as s
12
- };