@midas-ds/components 17.15.2 → 17.15.4

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 (246) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/accordion/index.js +2 -5
  3. package/assets/Button.css +1 -1
  4. package/assets/TextField.css +1 -1
  5. package/assets/accordion.css +1 -0
  6. package/assets/badge.css +1 -0
  7. package/assets/breadcrumbs.css +1 -0
  8. package/assets/button2.css +1 -0
  9. package/assets/calendar.css +1 -0
  10. package/assets/card.css +1 -0
  11. package/assets/checkbox.css +1 -0
  12. package/assets/{ColorSchemeSwitch.css → color-scheme-switch.css} +1 -1
  13. package/assets/combobox.css +1 -0
  14. package/assets/date-field.css +1 -0
  15. package/assets/date-picker.css +1 -0
  16. package/assets/default.css +1 -1
  17. package/assets/field-error.css +1 -0
  18. package/assets/file-list.css +1 -0
  19. package/assets/{FileUpload.css → file-upload.css} +1 -1
  20. package/assets/grid.css +1 -0
  21. package/assets/info-banner.css +1 -0
  22. package/assets/label.css +1 -0
  23. package/assets/layout.css +1 -0
  24. package/assets/link-button.css +1 -0
  25. package/assets/link.css +1 -0
  26. package/assets/list-box.css +1 -0
  27. package/assets/logo.css +1 -0
  28. package/assets/menu.css +1 -0
  29. package/assets/modal.css +1 -0
  30. package/assets/popover.css +1 -0
  31. package/assets/progress-bar.css +1 -0
  32. package/assets/radio.css +1 -0
  33. package/assets/search-field.css +1 -0
  34. package/assets/select.css +1 -0
  35. package/assets/skeleton.css +1 -0
  36. package/assets/spinner.css +1 -0
  37. package/assets/table.css +1 -0
  38. package/assets/tabs.css +1 -0
  39. package/assets/{TagGroup.css → tag.css} +1 -1
  40. package/assets/{Text.css → text.css} +1 -1
  41. package/assets/time-field.css +1 -0
  42. package/assets/toast.css +1 -0
  43. package/assets/toggle-button.css +1 -0
  44. package/assets/tooltip.css +1 -0
  45. package/badge/index.js +2 -5
  46. package/breadcrumbs/index.js +2 -5
  47. package/button/index.js +2 -6
  48. package/calendar/index.js +2 -5
  49. package/card/index.js +2 -12
  50. package/character-counter/index.js +2 -4
  51. package/checkbox/index.js +2 -6
  52. package/chunks/Button.module-0C2ArlRs.js +13 -0
  53. package/chunks/FeedbackStatusIcon-A1trvSCf.js +54 -0
  54. package/chunks/TextField.module-CrR3Krxn.js +12 -0
  55. package/chunks/accordion-AqEcuKz_.js +87 -0
  56. package/chunks/arrow-right-7yeXXFNV.js +10 -0
  57. package/chunks/badge-DrCn-5SX.js +22 -0
  58. package/chunks/breadcrumbs-XTH3axtt.js +23 -0
  59. package/chunks/button-CFjf-bDe.js +34 -0
  60. package/chunks/calendar-C0rlcHfr.js +74 -0
  61. package/chunks/card-CF8iwdg3.js +103 -0
  62. package/chunks/character-counter-CSoVSrxZ.js +16 -0
  63. package/chunks/check-BiPE7lAA.js +7 -0
  64. package/chunks/checkbox-B_41DFjp.js +174 -0
  65. package/chunks/chevron-down-Buf0eTzo.js +7 -0
  66. package/chunks/chevron-right-DJ7qKNKG.js +7 -0
  67. package/chunks/clear-button-Cb4MTvBR.js +17 -0
  68. package/chunks/clsx-BtlV5Vo3.js +21 -0
  69. package/chunks/color-scheme-switch-Ce4vL8Yz.js +122 -0
  70. package/chunks/combobox-BLGIYxNy.js +90 -0
  71. package/chunks/createLucideIcon-DhIhuN5D.js +39 -0
  72. package/chunks/date-field-Cy0HGw6v.js +73 -0
  73. package/chunks/date-picker-ByfWqOZh.js +191 -0
  74. package/chunks/field-error-DYp2kgFr.js +19 -0
  75. package/chunks/file-list-DYOuch5G.js +68 -0
  76. package/chunks/file-upload-CZRTVw5O.js +11 -0
  77. package/chunks/grid-CUYMbO7c.js +225 -0
  78. package/chunks/heading-595zCrRS.js +28 -0
  79. package/chunks/info-Bm2gRija.js +19 -0
  80. package/chunks/info-banner-hHq0Atii.js +59 -0
  81. package/chunks/label-uwnwLD3z.js +49 -0
  82. package/chunks/layout-BzK7P4Xn.js +426 -0
  83. package/chunks/link-Q46Ny2Po.js +40 -0
  84. package/chunks/link-button-Cm2B0s4X.js +39 -0
  85. package/chunks/list-box-Dm2itiZD.js +75 -0
  86. package/chunks/logo-D7tz-4hp.js +93 -0
  87. package/chunks/menu-CB6VDQ-u.js +49 -0
  88. package/chunks/modal-Dr0ythpF.js +66 -0
  89. package/chunks/popover-DxnYz_IT.js +27 -0
  90. package/chunks/progress-bar-Dppkp0cT.js +40 -0
  91. package/chunks/radio-PBrD5BO4.js +43 -0
  92. package/chunks/search-field-B5RciSq0.js +90 -0
  93. package/chunks/select-BZ0greL0.js +171 -0
  94. package/chunks/skeleton-OqKFBcmO.js +36 -0
  95. package/chunks/spinner-C3WiZYld.js +32 -0
  96. package/chunks/square-arrow-out-up-right-Bobm4VNc.js +17 -0
  97. package/chunks/table-BZ7VvZaq.js +150 -0
  98. package/chunks/tabs-eshGdQJJ.js +52 -0
  99. package/chunks/tag-CELJrUEQ.js +78 -0
  100. package/chunks/text-mAeDlv5N.js +23 -0
  101. package/chunks/textfield-CZSw2R67.js +112 -0
  102. package/chunks/time-field-DaQfnJQF.js +60 -0
  103. package/chunks/toast-AYzfHBcQ.js +91 -0
  104. package/chunks/toggle-button-DlPo9GJW.js +17 -0
  105. package/chunks/tooltip-BE_r_CBm.js +33 -0
  106. package/chunks/useLocalizedStringFormatter-bRLuRzVD.js +19 -0
  107. package/chunks/x-Bs_QW3q8.js +10 -0
  108. package/clear-button/index.js +2 -4
  109. package/color-scheme-switch/index.js +2 -4
  110. package/combobox/index.js +2 -4
  111. package/date-field/index.js +2 -9
  112. package/date-picker/index.js +2 -5
  113. package/field-error/index.js +2 -4
  114. package/file-list/index.js +2 -5
  115. package/file-upload/index.js +2 -5
  116. package/grid/index.js +2 -6
  117. package/heading/index.js +2 -4
  118. package/index.js +91 -165
  119. package/info-banner/index.js +2 -4
  120. package/label/index.js +2 -4
  121. package/layout/index.js +2 -8
  122. package/link/index.js +2 -6
  123. package/link-button/index.js +2 -6
  124. package/list-box/index.js +2 -13
  125. package/logo/index.js +2 -5
  126. package/menu/index.js +2 -10
  127. package/modal/index.js +2 -7
  128. package/package.json +2 -2
  129. package/popover/index.js +2 -4
  130. package/progress-bar/index.js +2 -4
  131. package/radio/index.js +2 -5
  132. package/search-field/index.js +2 -4
  133. package/select/index.js +2 -4
  134. package/skeleton/index.js +2 -4
  135. package/spinner/index.js +2 -4
  136. package/table/index.js +2 -9
  137. package/tabs/index.js +2 -7
  138. package/tag/index.js +2 -6
  139. package/text/index.js +2 -4
  140. package/textfield/index.js +2 -7
  141. package/time-field/index.js +2 -4
  142. package/toast/index.js +2 -10
  143. package/toggle-button/index.js +2 -5
  144. package/tooltip/index.js +2 -5
  145. package/assets/AccordionItem.css +0 -1
  146. package/assets/BadgeContainer.css +0 -1
  147. package/assets/Breadcrumb.css +0 -1
  148. package/assets/ButtonGroup.css +0 -1
  149. package/assets/CardHeader.css +0 -1
  150. package/assets/Checkbox.css +0 -1
  151. package/assets/ComboBox.css +0 -1
  152. package/assets/DateField.css +0 -1
  153. package/assets/DateInput.css +0 -1
  154. package/assets/DateRangePicker.css +0 -1
  155. package/assets/FieldError.css +0 -1
  156. package/assets/FileListItem.css +0 -1
  157. package/assets/GridItem.css +0 -1
  158. package/assets/InfoBanner.css +0 -1
  159. package/assets/Label.css +0 -1
  160. package/assets/Layout.css +0 -1
  161. package/assets/Link.css +0 -1
  162. package/assets/LinkButton.css +0 -1
  163. package/assets/ListBox.css +0 -1
  164. package/assets/ListBoxEmptyState.css +0 -1
  165. package/assets/Logo.css +0 -1
  166. package/assets/Modal.css +0 -1
  167. package/assets/Popover.css +0 -1
  168. package/assets/ProgressBar.css +0 -1
  169. package/assets/Radio.css +0 -1
  170. package/assets/RangeCalendar.css +0 -1
  171. package/assets/SearchField.css +0 -1
  172. package/assets/Select.css +0 -1
  173. package/assets/Separator.css +0 -1
  174. package/assets/Skeleton.css +0 -1
  175. package/assets/Spinner.css +0 -1
  176. package/assets/TabList.css +0 -1
  177. package/assets/Table.css +0 -1
  178. package/assets/TimeField.css +0 -1
  179. package/assets/Toast.css +0 -1
  180. package/assets/ToggleButtonGroup.css +0 -1
  181. package/assets/Tooltip.css +0 -1
  182. package/chunks/AccordionItem-DHhQDd6o.js +0 -129
  183. package/chunks/BadgeContainer-DyQDrY6S.js +0 -38
  184. package/chunks/Breadcrumb-Bs836gOn.js +0 -37
  185. package/chunks/Button-GCROAMSl.js +0 -56
  186. package/chunks/Button.module-byTN5rhp.js +0 -14
  187. package/chunks/ButtonGroup-Dr6HOBo2.js +0 -22
  188. package/chunks/CardHeader-BnwDMzW9.js +0 -184
  189. package/chunks/CharacterCounter-Dgnv-orm.js +0 -22
  190. package/chunks/Checkbox-CyamRrFD.js +0 -146
  191. package/chunks/CheckboxGroup-CmjQm14M.js +0 -84
  192. package/chunks/ClearButton-DkC8PIMi.js +0 -22
  193. package/chunks/ColorSchemeSwitch-CjXb7w5A.js +0 -118
  194. package/chunks/ComboBox-BCfucCKv.js +0 -102
  195. package/chunks/DateField-CpvZGNHu.js +0 -89
  196. package/chunks/DateInput-NzWcnB4y.js +0 -29
  197. package/chunks/DateInputDivider-BHAwPkIR.js +0 -13
  198. package/chunks/DateRangePicker-BBLNlQ2y.js +0 -202
  199. package/chunks/FeedbackStatusIcon-X9Bjgeta.js +0 -56
  200. package/chunks/FieldError-krpMBtie.js +0 -24
  201. package/chunks/FileListItem-CKF9HPjw.js +0 -69
  202. package/chunks/FileUpload-D6oyWcDA.js +0 -17
  203. package/chunks/Grid-C7aRFvmS.js +0 -24
  204. package/chunks/GridItem-DenBLGXB.js +0 -237
  205. package/chunks/Heading-nfcRc2QF.js +0 -38
  206. package/chunks/InfoBanner-CWLvkP6D.js +0 -76
  207. package/chunks/Label-Cqo7Xz2v.js +0 -67
  208. package/chunks/Layout-D-nVSBJY.js +0 -493
  209. package/chunks/Link-CSIZehbN.js +0 -59
  210. package/chunks/LinkButton-Dzp8ZAPs.js +0 -68
  211. package/chunks/ListBox-CJhp9Hsb.js +0 -60
  212. package/chunks/ListBoxEmptyState-BxWWr2D9.js +0 -30
  213. package/chunks/ListBoxHeader-Cl56gGEe.js +0 -63
  214. package/chunks/Logo-DDykn5b2.js +0 -150
  215. package/chunks/Modal-yigospxi.js +0 -78
  216. package/chunks/Popover-CjEPHe4A.js +0 -34
  217. package/chunks/ProgressBar-BrWLkY8H.js +0 -53
  218. package/chunks/Radio-CFolRKKY.js +0 -44
  219. package/chunks/RangeCalendar-DxLInTav.js +0 -99
  220. package/chunks/SearchField-BXIDm898.js +0 -121
  221. package/chunks/Select-BQ109AJG.js +0 -231
  222. package/chunks/Separator-CDRwpeHz.js +0 -76
  223. package/chunks/Skeleton-ClvqZoDy.js +0 -88
  224. package/chunks/Spinner-CfKMn18u.js +0 -43
  225. package/chunks/TabList-CJSnr6O0.js +0 -87
  226. package/chunks/Table-CDdv7GeG.js +0 -140
  227. package/chunks/TagGroup-C-pkXtVn.js +0 -119
  228. package/chunks/Text-D0r_W4lH.js +0 -36
  229. package/chunks/TextArea-CNP1Y3jR.js +0 -135
  230. package/chunks/TextField.module-BDIbEV87.js +0 -12
  231. package/chunks/TimeField-B3IdCqTf.js +0 -88
  232. package/chunks/Toast-BFq_0Ue4.js +0 -158
  233. package/chunks/ToggleButtonGroup-DRnEEi5-.js +0 -29
  234. package/chunks/Tooltip-BYEaNkZG.js +0 -44
  235. package/chunks/arrow-right-BVcFGZmy.js +0 -8
  236. package/chunks/check-Bt2UikoU.js +0 -5
  237. package/chunks/chevron-down-BBFYYzZq.js +0 -5
  238. package/chunks/chevron-right-DvXGOiS_.js +0 -5
  239. package/chunks/clsx-AexbMWKp.js +0 -24
  240. package/chunks/createLucideIcon-CP-mMPfa.js +0 -75
  241. package/chunks/info-N5jWZg2A.js +0 -9
  242. package/chunks/square-arrow-out-up-right-x_I6wdNi.js +0 -9
  243. package/chunks/useLocalizedStringFormatter-BHvsRxDk.js +0 -25
  244. package/chunks/x-B9bYxG31.js +0 -8
  245. /package/assets/{CharacterCounter.css → character-counter.css} +0 -0
  246. /package/assets/{Heading.css → heading.css} +0 -0
@@ -0,0 +1,49 @@
1
+ import { t as e } from "./clsx-BtlV5Vo3.js";
2
+ import { t } from "./check-BiPE7lAA.js";
3
+ import { t as n } from "./chevron-right-DJ7qKNKG.js";
4
+ import { Menu as r, MenuItem as i, MenuSection as a, MenuTrigger as o, Popover as s, Separator as c } from "react-aria-components";
5
+ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
6
+ import '../assets/menu.css';var f = {
7
+ menu: "_menu_1wm5z_1",
8
+ menuSection: "_menuSection_1wm5z_17",
9
+ medium: "_medium_1wm5z_29",
10
+ menuItem: "_menuItem_1wm5z_36",
11
+ mainContent: "_mainContent_1wm5z_105",
12
+ checkMark: "_checkMark_1wm5z_116",
13
+ separator: "_separator_1wm5z_126",
14
+ menuPopover: "_menuPopover_1wm5z_149 _dropdownAnimation_1ljkv_4"
15
+ }, p = ({ className: t, size: n = "large", ...i }) => /* @__PURE__ */ u(r, {
16
+ className: e(t, f.menu, n === "medium" && f.medium),
17
+ ...i
18
+ }), m = (r) => /* @__PURE__ */ u(i, {
19
+ ...r,
20
+ textValue: r.textValue || (typeof r.children == "string" ? r.children : void 0),
21
+ className: e(f.menuItem, r.className),
22
+ children: (e) => {
23
+ let { children: i } = r, { selectionMode: a, isSelected: o, hasSubmenu: s } = e;
24
+ return /* @__PURE__ */ d(l, { children: [
25
+ a !== "none" && /* @__PURE__ */ u(t, {
26
+ size: 16,
27
+ className: f.checkMark,
28
+ "data-selected": o || void 0
29
+ }),
30
+ /* @__PURE__ */ u("div", {
31
+ className: f.mainContent,
32
+ children: typeof i == "function" ? i(e) : i
33
+ }),
34
+ s && /* @__PURE__ */ u(n, { size: 20 })
35
+ ] });
36
+ }
37
+ }), h = ({ className: t, ...n }) => /* @__PURE__ */ u(s, {
38
+ className: e(t, f.menuPopover),
39
+ offset: 4,
40
+ ...n
41
+ }), g = ({ className: t, ...n }) => /* @__PURE__ */ u(a, {
42
+ className: e(t, f.menuSection),
43
+ ...n
44
+ }), _ = ({ className: t, ...n }) => /* @__PURE__ */ u(c, {
45
+ className: e(t, f.separator),
46
+ ...n
47
+ });
48
+ //#endregion
49
+ export { p as a, m as i, g as n, o, h as r, _ as t };
@@ -0,0 +1,66 @@
1
+ import { t as e } from "./clsx-BtlV5Vo3.js";
2
+ import { t } from "./x-Bs_QW3q8.js";
3
+ import { t as n } from "./useLocalizedStringFormatter-bRLuRzVD.js";
4
+ import { n as r } from "./button-CFjf-bDe.js";
5
+ import { t as i } from "./heading-595zCrRS.js";
6
+ import { forwardRef as a } from "react";
7
+ import { Dialog as o, DialogTrigger as s, Modal as c, ModalOverlay as l, composeRenderProps as u } from "react-aria-components";
8
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
9
+ import '../assets/modal.css';var p = {
10
+ modal: "_modal_x15md_1",
11
+ dialog: "_dialog_x15md_10",
12
+ modalHeader: "_modalHeader_x15md_39",
13
+ modalTitle: "_modalTitle_x15md_50",
14
+ modalBody: "_modalBody_x15md_56"
15
+ }, m = {
16
+ en: { close: "Close" },
17
+ sv: { close: "Stäng" }
18
+ }, h = {
19
+ modalOverlay: "_modalOverlay_gwg3f_1",
20
+ "modal-fade": "_modal-fade_gwg3f_1"
21
+ }, g = a(({ className: t, ...n }, r) => /* @__PURE__ */ d(l, {
22
+ className: e(t, h.modalOverlay),
23
+ ref: r,
24
+ ...n
25
+ }));
26
+ g.displayName = "ModalOverlay";
27
+ //#endregion
28
+ //#region packages/components/src/modal/Modal.tsx
29
+ var _ = a(({ children: e, title: a, hideCloseButton: s = !1, ...l }, h) => {
30
+ let _ = n(m);
31
+ return /* @__PURE__ */ d(g, {
32
+ ...l,
33
+ children: u(e, (e) => /* @__PURE__ */ d(c, {
34
+ className: p.modal,
35
+ ref: h,
36
+ children: /* @__PURE__ */ f(o, {
37
+ className: p.dialog,
38
+ children: [/* @__PURE__ */ f("div", {
39
+ className: p.modalHeader,
40
+ children: [/* @__PURE__ */ d("div", {
41
+ className: p.modalTitle,
42
+ children: a && /* @__PURE__ */ d(i, {
43
+ level: 3,
44
+ elementType: "h2",
45
+ slot: "title",
46
+ children: a
47
+ })
48
+ }), !s && /* @__PURE__ */ d(r, {
49
+ slot: "close",
50
+ variant: "tertiary",
51
+ icon: t,
52
+ iconPlacement: "right",
53
+ children: _.format("close")
54
+ })]
55
+ }), /* @__PURE__ */ d("div", {
56
+ className: p.modalBody,
57
+ tabIndex: -1,
58
+ children: e
59
+ })]
60
+ })
61
+ }))
62
+ });
63
+ });
64
+ _.displayName = "Modal";
65
+ //#endregion
66
+ export { _ as n, g as r, s as t };
@@ -0,0 +1,27 @@
1
+ import { t as e } from "./clsx-BtlV5Vo3.js";
2
+ import { forwardRef as t } from "react";
3
+ import { OverlayArrow as n, Popover as r, PopoverContext as i, composeRenderProps as a, useContextProps as o } from "react-aria-components";
4
+ import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
5
+ import '../assets/popover.css';var u = {
6
+ popover: "_popover_1k0dj_1",
7
+ arrow: "_arrow_1k0dj_25"
8
+ }, d = t((t, d) => {
9
+ let [f, p] = o(t, d, i), { className: m, hideArrow: h = !1, offset: g = 4, ..._ } = f;
10
+ return /* @__PURE__ */ c(r, {
11
+ className: e(u.popover, m),
12
+ offset: g,
13
+ ref: p,
14
+ ..._,
15
+ children: a(f.children, (e) => /* @__PURE__ */ l(s, { children: [!h && /* @__PURE__ */ c(n, {
16
+ className: u.arrow,
17
+ children: /* @__PURE__ */ c("svg", {
18
+ height: 16,
19
+ viewBox: "0 0 16 16",
20
+ width: 16,
21
+ children: /* @__PURE__ */ c("path", { d: "M0 0 L8 8 L16 0" })
22
+ })
23
+ }), e] }))
24
+ });
25
+ });
26
+ //#endregion
27
+ export { d as t };
@@ -0,0 +1,40 @@
1
+ import { t as e } from "./clsx-BtlV5Vo3.js";
2
+ import { t } from "./label-uwnwLD3z.js";
3
+ import "react";
4
+ import { ProgressBar as n } from "react-aria-components";
5
+ import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
6
+ import '../assets/progress-bar.css';var o = {
7
+ progressBar: "_progressBar_1hwve_1",
8
+ indeterminate: "_indeterminate_1hwve_1",
9
+ label: "_label_1hwve_9",
10
+ value: "_value_1hwve_14",
11
+ bar: "_bar_1hwve_19",
12
+ fill: "_fill_1hwve_29"
13
+ }, s = ({ label: s, labelProps: c, showValueLabel: l = !1, ...u }) => /* @__PURE__ */ i(n, {
14
+ ...u,
15
+ className: e(o.progressBar, u.className),
16
+ children: ({ percentage: n, valueText: u, isIndeterminate: d }) => /* @__PURE__ */ a(r, { children: [
17
+ s && /* @__PURE__ */ i(t, {
18
+ elementType: "span",
19
+ ...c,
20
+ className: e(c?.className, o.label),
21
+ children: s
22
+ }),
23
+ l && /* @__PURE__ */ i(t, {
24
+ elementType: "span",
25
+ ...c,
26
+ id: s ? "" : c?.id,
27
+ className: e(c?.className, o.value),
28
+ children: u
29
+ }),
30
+ /* @__PURE__ */ i("div", {
31
+ className: o.bar,
32
+ children: /* @__PURE__ */ i("div", {
33
+ className: o.fill,
34
+ style: { width: `${d ? 50 : n}%` }
35
+ })
36
+ })
37
+ ] })
38
+ });
39
+ //#endregion
40
+ export { s as t };
@@ -0,0 +1,43 @@
1
+ 'use client';
2
+ import { t as e } from "./clsx-BtlV5Vo3.js";
3
+ import { t } from "./text-mAeDlv5N.js";
4
+ import { t as n } from "./field-error-DYp2kgFr.js";
5
+ import { n as r, t as i } from "./label-uwnwLD3z.js";
6
+ import "react";
7
+ import { Group as a, Radio as o, RadioGroup as s, composeRenderProps as c } from "react-aria-components";
8
+ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
9
+ import '../assets/radio.css';var f = {
10
+ radioGroup: "_radioGroup_1oic0_1",
11
+ wrap: "_wrap_1oic0_12",
12
+ radio: "_radio_1oic0_1"
13
+ }, p = ({ label: o, description: p, errorMessage: m, children: h, className: g, errorPosition: _ = "top", popover: v, ...y }) => /* @__PURE__ */ u(s, {
14
+ ...y,
15
+ className: e(f.radioGroup, g),
16
+ children: c(h, (e) => /* @__PURE__ */ d(l, { children: [
17
+ /* @__PURE__ */ u(r, {
18
+ popover: v,
19
+ children: o && /* @__PURE__ */ u(i, { children: o })
20
+ }),
21
+ p && /* @__PURE__ */ u(t, {
22
+ slot: "description",
23
+ children: p
24
+ }),
25
+ _ === "top" && /* @__PURE__ */ u(n, {
26
+ "data-testid": "fieldError",
27
+ children: m
28
+ }),
29
+ /* @__PURE__ */ u(a, {
30
+ className: f.wrap,
31
+ children: e
32
+ }),
33
+ _ === "bottom" && /* @__PURE__ */ u(n, {
34
+ "data-testid": "fieldError",
35
+ children: m
36
+ })
37
+ ] }))
38
+ }), m = ({ className: t, ...n }) => /* @__PURE__ */ u(o, {
39
+ className: e(f.radio, t),
40
+ ...n
41
+ });
42
+ //#endregion
43
+ export { p as n, m as t };
@@ -0,0 +1,90 @@
1
+ 'use client';
2
+ import { t as e } from "./clsx-BtlV5Vo3.js";
3
+ import { t } from "./createLucideIcon-DhIhuN5D.js";
4
+ import { t as n } from "./x-Bs_QW3q8.js";
5
+ import { t as r } from "./useLocalizedStringFormatter-bRLuRzVD.js";
6
+ import { n as i } from "./button-CFjf-bDe.js";
7
+ import { t as a } from "./field-error-DYp2kgFr.js";
8
+ import { t as o } from "./TextField.module-CrR3Krxn.js";
9
+ import { FormContext as s, Input as c, SearchField as l, useSlottedContext as u } from "react-aria-components";
10
+ import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
11
+ import '../assets/search-field.css';var m = t("search", [["path", {
12
+ d: "m21 21-4.34-4.34",
13
+ key: "14j7rj"
14
+ }], ["circle", {
15
+ cx: "11",
16
+ cy: "11",
17
+ r: "8",
18
+ key: "4ej97u"
19
+ }]]), h = {
20
+ container: "_container_1msv3_1",
21
+ inner: "_inner_1msv3_10",
22
+ inputContainer: "_inputContainer_1msv3_15",
23
+ medium: "_medium_1msv3_21",
24
+ icon: "_icon_1msv3_26",
25
+ clear: "_clear_1msv3_38",
26
+ input: "_input_1msv3_15"
27
+ }, g = {
28
+ en: { search: "Search" },
29
+ sv: { search: "Sök" }
30
+ };
31
+ //#endregion
32
+ //#region packages/components/src/search-field/SearchField.tsx
33
+ function _(e) {
34
+ return !!e?.length;
35
+ }
36
+ var v = ({ errorPosition: t = "top", size: v = "large", showButton: y, className: b, errorMessage: x, placeholder: S, validationBehavior: C, inputMode: w = "search", ...T }) => {
37
+ let E = r(g), D = u(s), O = C ?? D?.validationBehavior ?? "aria", k = y !== !1, A = (e) => {
38
+ !e || T.isInvalid || T.validate && _(T.validate(e)) || T.onSubmit?.(e);
39
+ };
40
+ return /* @__PURE__ */ f(l, {
41
+ ...T,
42
+ inputMode: w,
43
+ onSubmit: A,
44
+ "aria-label": T["aria-label"] ?? S,
45
+ className: e(h.container, b),
46
+ validationBehavior: O,
47
+ children: ({ state: r }) => /* @__PURE__ */ p(d, { children: [
48
+ t === "top" && /* @__PURE__ */ f(a, { children: ({ validationErrors: e }) => x ?? e.join(" ") }),
49
+ /* @__PURE__ */ p("div", {
50
+ className: h.inner,
51
+ children: [/* @__PURE__ */ p("div", {
52
+ className: e(h.inputContainer, { [h.medium]: v === "medium" }),
53
+ children: [
54
+ /* @__PURE__ */ f(m, {
55
+ size: 20,
56
+ className: h.icon
57
+ }),
58
+ /* @__PURE__ */ f(c, {
59
+ placeholder: S,
60
+ className: e(o.input, h.input, { [h.medium]: v === "medium" }),
61
+ onKeyDown: T.onSubmit ? void 0 : (e) => {
62
+ e.key === "Enter" && r.value && !T.isInvalid && e.currentTarget.form?.requestSubmit();
63
+ }
64
+ }),
65
+ r.value.length > 0 && /* @__PURE__ */ f(i, {
66
+ variant: "icon",
67
+ size: v,
68
+ className: e(h.clear, { [h.medium]: v === "medium" }),
69
+ children: /* @__PURE__ */ f(n, {
70
+ size: 20,
71
+ "aria-hidden": !0
72
+ })
73
+ })
74
+ ]
75
+ }), k && /* @__PURE__ */ f(i, {
76
+ slot: null,
77
+ excludeFromTabOrder: !0,
78
+ size: v,
79
+ isDisabled: T.isDisabled,
80
+ type: "button",
81
+ onPress: () => A(r.value),
82
+ children: T.buttonText ?? E.format("search")
83
+ })]
84
+ }),
85
+ t === "bottom" && /* @__PURE__ */ f(a, { children: ({ validationErrors: e }) => x ?? e.join(" ") })
86
+ ] })
87
+ });
88
+ };
89
+ //#endregion
90
+ export { v as t };
@@ -0,0 +1,171 @@
1
+ import { n as e, t } from "./clsx-BtlV5Vo3.js";
2
+ import { t as n } from "./chevron-down-Buf0eTzo.js";
3
+ import { n as r } from "./checkbox-B_41DFjp.js";
4
+ import { t as i } from "./x-Bs_QW3q8.js";
5
+ import { t as a } from "./useLocalizedStringFormatter-bRLuRzVD.js";
6
+ import { t as o } from "./text-mAeDlv5N.js";
7
+ import { t as s } from "./field-error-DYp2kgFr.js";
8
+ import { n as c, t as l } from "./label-uwnwLD3z.js";
9
+ import { t as u } from "./popover-DxnYz_IT.js";
10
+ import { c as d } from "./list-box-Dm2itiZD.js";
11
+ import { n as f, r as p, t as m } from "./tag-CELJrUEQ.js";
12
+ import h, { useContext as g } from "react";
13
+ import { Button as _, Select as v, SelectStateContext as y, SelectValue as b } from "react-aria-components";
14
+ import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
15
+ import { useFocusManager as w } from "react-aria";
16
+ import { FocusScope as T } from "@react-aria/focus";
17
+ import '../assets/select.css';var E = {
18
+ en: {
19
+ clearAll: "Clear all",
20
+ selectAll: "Select all",
21
+ selectedItems: "Selected items",
22
+ selected: "selected"
23
+ },
24
+ sv: {
25
+ clearAll: "Rensa alla",
26
+ selectAll: "Välj alla",
27
+ selectedItems: "Valda objekt",
28
+ selected: "valda"
29
+ }
30
+ }, D = {
31
+ select: "_select_1vj7t_1",
32
+ triggerContainer: "_triggerContainer_1vj7t_7",
33
+ trigger: "_trigger_1vj7t_7",
34
+ medium: "_medium_1vj7t_30",
35
+ icon: "_icon_1vj7t_68",
36
+ selectValue: "_selectValue_1vj7t_74",
37
+ placeholder: "_placeholder_1vj7t_80",
38
+ multiSelectValue: "_multiSelectValue_1vj7t_90",
39
+ selectValueTag: "_selectValueTag_1vj7t_114",
40
+ clearButton: "_clearButton_1vj7t_128",
41
+ truncate: "_truncate_1vj7t_140",
42
+ popover: "_popover_1vj7t_177",
43
+ selectAll: "_selectAll_1vj7t_205",
44
+ tagGroup: "_tagGroup_1vj7t_271"
45
+ }, O = () => {
46
+ let e = h.useContext(y), t = a(E);
47
+ return /* @__PURE__ */ S(r, {
48
+ className: D.selectAll,
49
+ isIndeterminate: !e?.selectionManager.isSelectAll && !e?.selectionManager.isEmpty,
50
+ isSelected: e?.selectionManager.isSelectAll,
51
+ onChange: () => {
52
+ e?.setValue(e?.selectionManager.isSelectAll ? null : Array.from(e.collection.getKeys())), e?.commitValidation();
53
+ },
54
+ children: t.format("selectAll")
55
+ });
56
+ }, k = ({ isDisabled: e }) => {
57
+ let t = a(E), n = (e, n) => e.length === 1 ? n : `${e.length} ${t.format("selected")}`;
58
+ return /* @__PURE__ */ S(b, {
59
+ className: D.multiSelectValue,
60
+ "data-disabled": e || void 0,
61
+ children: ({ isPlaceholder: t, selectedItems: r, selectedText: i }) => t ? /* @__PURE__ */ S(x, {}) : /* @__PURE__ */ C("div", {
62
+ className: D.selectValueTag,
63
+ "data-disabled": e || void 0,
64
+ children: [/* @__PURE__ */ S("span", {
65
+ className: D.truncate,
66
+ children: n(r, i)
67
+ }), /* @__PURE__ */ S(A, { isDisabled: e })]
68
+ })
69
+ });
70
+ }, A = ({ isDisabled: e }) => {
71
+ let t = h.useContext(y), n = a(E), r = w();
72
+ return /* @__PURE__ */ S(_, {
73
+ "aria-label": n.format("clearAll"),
74
+ className: D.clearButton,
75
+ onPress: () => {
76
+ r?.focusFirst(), t?.setValue(null);
77
+ },
78
+ slot: null,
79
+ isDisabled: e,
80
+ children: /* @__PURE__ */ S(i, {
81
+ width: 20,
82
+ height: 20
83
+ })
84
+ });
85
+ }, j = ({ showTags: e, isDisabled: t }) => {
86
+ let n = a(E), r = g(y);
87
+ return !r?.selectedItems.length || !e ? null : /* @__PURE__ */ S(m, {
88
+ "aria-label": n.format("selectedItems"),
89
+ className: D.tagGroup,
90
+ onRemove: (e) => {
91
+ r?.selectionManager.toggleSelection(Array.from(e)[0]);
92
+ },
93
+ selectionBehavior: "toggle",
94
+ children: /* @__PURE__ */ S(f, {
95
+ items: r.selectedItems,
96
+ children: (e) => /* @__PURE__ */ S(p, {
97
+ isDismissable: !0,
98
+ id: e.key,
99
+ isDisabled: t,
100
+ textValue: e.textValue,
101
+ children: e.textValue
102
+ }, e.key)
103
+ })
104
+ });
105
+ }, M = ({ isDisabled: t, selectionMode: r, size: i }) => {
106
+ let a = g(y);
107
+ return /* @__PURE__ */ C(_, {
108
+ className: e({ [D.medium]: i === "medium" }, D.trigger),
109
+ "data-invalid": !!a?.displayValidation.isInvalid || void 0,
110
+ children: [/* @__PURE__ */ S(b, {
111
+ className: D.selectValue,
112
+ "data-disabled": t || void 0,
113
+ children: ({ selectedText: e, defaultChildren: t }) => /* @__PURE__ */ S("div", {
114
+ className: D.placeholder,
115
+ children: /* @__PURE__ */ S("span", {
116
+ className: D.truncate,
117
+ children: r === "multiple" && e ? null : e || t
118
+ })
119
+ })
120
+ }), /* @__PURE__ */ S("span", {
121
+ "aria-hidden": "true",
122
+ className: D.icon,
123
+ children: /* @__PURE__ */ S(n, { size: 20 })
124
+ })]
125
+ });
126
+ };
127
+ //#endregion
128
+ //#region packages/components/src/select/Select.tsx
129
+ function N({ children: e, description: n, errorMessage: r, errorPosition: i = "top", items: a, label: f, popover: p, popoverProps: m, size: h = "large", ...g }) {
130
+ return /* @__PURE__ */ S(T, { children: /* @__PURE__ */ C(v, {
131
+ ...g,
132
+ className: t(g.className, D.select),
133
+ children: [
134
+ /* @__PURE__ */ S(c, {
135
+ popover: p,
136
+ children: f && /* @__PURE__ */ S(l, {
137
+ "data-disabled": g.isDisabled || void 0,
138
+ children: f
139
+ })
140
+ }),
141
+ n && /* @__PURE__ */ S(o, {
142
+ slot: "description",
143
+ children: n
144
+ }),
145
+ i === "top" && /* @__PURE__ */ S(s, { children: r }),
146
+ /* @__PURE__ */ C("div", {
147
+ className: D.triggerContainer,
148
+ "data-disabled": g.isDisabled || void 0,
149
+ children: [/* @__PURE__ */ S(M, {
150
+ size: h,
151
+ ...g
152
+ }), g.selectionMode === "multiple" ? /* @__PURE__ */ S(k, { ...g }) : null]
153
+ }),
154
+ i === "bottom" && /* @__PURE__ */ S(s, { children: r }),
155
+ /* @__PURE__ */ C(u, {
156
+ offset: 0,
157
+ hideArrow: !0,
158
+ ...m,
159
+ className: t(m?.className, D.popover),
160
+ children: [g.isSelectableAll && /* @__PURE__ */ S(O, {}), /* @__PURE__ */ S(d, {
161
+ escapeKeyBehavior: "none",
162
+ items: a,
163
+ children: e
164
+ })]
165
+ }),
166
+ /* @__PURE__ */ S(j, { ...g })
167
+ ]
168
+ }) });
169
+ }
170
+ //#endregion
171
+ export { N as t };
@@ -0,0 +1,36 @@
1
+ import { t as e } from "./clsx-BtlV5Vo3.js";
2
+ import "react";
3
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
4
+ import '../assets/skeleton.css';var r = {
5
+ skeleton: "_skeleton_1o4vz_11",
6
+ circle: "_circle_1o4vz_25",
7
+ wave: "_wave_1o4vz_30",
8
+ onLayer01: "_onLayer01_1o4vz_54",
9
+ form: "_form_1o4vz_58",
10
+ formLabel: "_formLabel_1o4vz_64",
11
+ formDescription: "_formDescription_1o4vz_70",
12
+ formInput: "_formInput_1o4vz_76",
13
+ medium: "_medium_1o4vz_81"
14
+ }, i = ({ variant: i = "rectangle", width: a, height: o, size: s = "large", isAnimated: c = !0, className: l, style: u, isOnLayer01: d, ...f }) => (i === "circle" && o !== void 0 && console.warn("Height is not allowed when using circle, control size with width"), i === "form" ? /* @__PURE__ */ n("div", {
15
+ className: e(r.form, r[s], d && r.onLayer01, l),
16
+ style: {
17
+ width: a,
18
+ ...u
19
+ },
20
+ ...f,
21
+ children: [
22
+ /* @__PURE__ */ t("div", { className: e(r.skeleton, r.formLabel, c && r.wave, d && r.onLayer01) }),
23
+ /* @__PURE__ */ t("div", { className: e(r.skeleton, r.formDescription, c && r.wave, d && r.onLayer01) }),
24
+ /* @__PURE__ */ t("div", { className: e(r.skeleton, r.formInput, c && r.wave, d && r.onLayer01) })
25
+ ]
26
+ }) : /* @__PURE__ */ t("div", {
27
+ className: e(r.skeleton, r[i], c && r.wave, d && r.onLayer01, l),
28
+ style: {
29
+ width: a,
30
+ height: o,
31
+ ...u
32
+ },
33
+ ...f
34
+ }));
35
+ //#endregion
36
+ export { i as t };
@@ -0,0 +1,32 @@
1
+ import { t as e } from "./clsx-BtlV5Vo3.js";
2
+ import { t } from "./createLucideIcon-DhIhuN5D.js";
3
+ import { t as n } from "./useLocalizedStringFormatter-bRLuRzVD.js";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ import { VisuallyHidden as a } from "react-aria";
6
+ import '../assets/spinner.css';var o = {
7
+ container: "_container_1qexx_1",
8
+ spinner: "_spinner_1qexx_5",
9
+ rotating: "_rotating_1qexx_1",
10
+ large: "_large_1qexx_18"
11
+ }, s = t("loader-circle", [["path", {
12
+ d: "M21 12a9 9 0 1 1-6.219-8.56",
13
+ key: "13zald"
14
+ }]]), c = {
15
+ en: { loadingPleaseWait: "Loading, please wait..." },
16
+ sv: { loadingPleaseWait: "Laddar, vänligen vänta..." }
17
+ }, l = ({ small: t, color: l, className: u }) => {
18
+ let d = n(c);
19
+ return /* @__PURE__ */ i("div", {
20
+ className: e(o.container, u),
21
+ role: "status",
22
+ children: [/* @__PURE__ */ r(s, {
23
+ className: e(o.spinner, !t && o.large),
24
+ size: t ? 20 : 96,
25
+ strokeWidth: t ? 2 : 8,
26
+ absoluteStrokeWidth: !0,
27
+ color: l
28
+ }), /* @__PURE__ */ r(a, { children: d.format("loadingPleaseWait") })]
29
+ });
30
+ };
31
+ //#endregion
32
+ export { l as t };
@@ -0,0 +1,17 @@
1
+ import { t as e } from "./createLucideIcon-DhIhuN5D.js";
2
+ var t = e("square-arrow-out-up-right", [
3
+ ["path", {
4
+ d: "M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6",
5
+ key: "y09zxi"
6
+ }],
7
+ ["path", {
8
+ d: "m21 3-9 9",
9
+ key: "mpx6sq"
10
+ }],
11
+ ["path", {
12
+ d: "M15 3h6v6",
13
+ key: "1q9fwt"
14
+ }]
15
+ ]);
16
+ //#endregion
17
+ export { t };