@midas-ds/components 17.29.0 → 17.30.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 (90) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/accordion/index.js +1 -1
  3. package/button/Button.stories.d.ts +1 -1
  4. package/button/index.js +1 -1
  5. package/calendar/index.js +1 -1
  6. package/card/index.js +1 -1
  7. package/checkbox/index.js +1 -1
  8. package/chunks/FeedbackStatusIcon-DvMDGBGL.js +36 -0
  9. package/chunks/{accordion-DIVTJU3O.js → accordion-BzmYSOS3.js} +23 -23
  10. package/chunks/{button-CenXTGXL.js → button-C-WkFek9.js} +1 -1
  11. package/chunks/calendar-Bt1FLxqr.js +107 -0
  12. package/chunks/card-CdH2UMUW.js +103 -0
  13. package/chunks/checkbox-DiFQy3MS.js +106 -0
  14. package/chunks/clear-button-Bv0YGBNG.js +17 -0
  15. package/chunks/color-scheme-switch-0axiBsna.js +160 -0
  16. package/chunks/{combobox-DIou4Z-d.js → combobox-DkZbA3o4.js} +24 -24
  17. package/chunks/{date-field-BF2f9bSf.js → date-field-CPpWZqws.js} +2 -2
  18. package/chunks/date-picker-DQ7vCG5-.js +142 -0
  19. package/chunks/file-list-D8Zc1aYS.js +139 -0
  20. package/chunks/{info-banner-osR4e6nB.js → info-banner-BVKtmVKN.js} +14 -14
  21. package/chunks/label-Dw5p84T2.js +50 -0
  22. package/chunks/layout-CUAjEEuH.js +378 -0
  23. package/chunks/link-DHu1cTmz.js +44 -0
  24. package/chunks/link-button-DYg_0p4Y.js +44 -0
  25. package/chunks/{list-box-BN_MSiOD.js → list-box-DmEoMvX1.js} +1 -1
  26. package/chunks/menu-CP0Xvmx0.js +48 -0
  27. package/chunks/modal-B_uSoXZM.js +66 -0
  28. package/chunks/{progress-bar-CknF4qAm.js → progress-bar-BfFxpqUv.js} +1 -1
  29. package/chunks/{radio-BD1EuxSa.js → radio-_z6ObjYx.js} +1 -1
  30. package/chunks/search-field-Cp_HHDl4.js +91 -0
  31. package/chunks/select-Wy6NakdH.js +176 -0
  32. package/chunks/spinner-COGZlDJB.js +29 -0
  33. package/chunks/table-O_Y45Sb7.js +84 -0
  34. package/chunks/tag-RjuYlFZI.js +78 -0
  35. package/chunks/{textfield-BSvCsAyC.js → textfield-Bu0Hg2pJ.js} +2 -2
  36. package/chunks/{time-field-CmjGBQph.js → time-field-Cnp-dYhm.js} +3 -3
  37. package/chunks/{toast-gJgjitZF.js → toast-Dg3fVjSS.js} +20 -20
  38. package/clear-button/index.js +1 -1
  39. package/color-scheme-switch/index.js +1 -1
  40. package/combobox/index.js +1 -1
  41. package/date-field/index.js +1 -1
  42. package/date-picker/index.js +1 -1
  43. package/file-list/index.js +1 -1
  44. package/index.js +49 -48
  45. package/info-banner/index.js +1 -1
  46. package/label/index.js +1 -1
  47. package/layout/index.js +1 -1
  48. package/link/index.js +1 -1
  49. package/link-button/index.js +1 -1
  50. package/list-box/index.js +1 -1
  51. package/menu/index.js +1 -1
  52. package/modal/index.js +1 -1
  53. package/package.json +3 -2
  54. package/progress-bar/index.js +1 -1
  55. package/radio/index.js +1 -1
  56. package/search-field/index.js +1 -1
  57. package/select/index.js +1 -1
  58. package/spinner/index.js +1 -1
  59. package/table/index.js +1 -1
  60. package/tag/index.js +1 -1
  61. package/textfield/index.js +1 -1
  62. package/time-field/index.js +1 -1
  63. package/toast/index.js +1 -1
  64. package/chunks/FeedbackStatusIcon-DRI7WrSU.js +0 -54
  65. package/chunks/arrow-right-Db_H9KjE.js +0 -10
  66. package/chunks/calendar-Bl_obez5.js +0 -111
  67. package/chunks/card-zIYA-SQh.js +0 -103
  68. package/chunks/check-DV00NPU0.js +0 -7
  69. package/chunks/checkbox-Bqd8B58G.js +0 -110
  70. package/chunks/chevron-down-CP7nEDei.js +0 -7
  71. package/chunks/chevron-right-DwqboCdU.js +0 -7
  72. package/chunks/clear-button-D3I1X3yG.js +0 -17
  73. package/chunks/color-scheme-switch-DVZjdwc9.js +0 -203
  74. package/chunks/createLucideIcon-BgluSHFG.js +0 -39
  75. package/chunks/date-picker-DZivTUB_.js +0 -187
  76. package/chunks/file-list-B4vG_egr.js +0 -161
  77. package/chunks/info-jCyacVsy.js +0 -19
  78. package/chunks/label-LWlgvAwz.js +0 -50
  79. package/chunks/layout-Db5um0f7.js +0 -426
  80. package/chunks/link-BAgs4RwY.js +0 -59
  81. package/chunks/link-button-BuPMEGUj.js +0 -52
  82. package/chunks/menu-aT2IR0tO.js +0 -49
  83. package/chunks/modal-C-UsxdO0.js +0 -66
  84. package/chunks/search-field-GNTRFpzf.js +0 -100
  85. package/chunks/select-oLCNpryY.js +0 -177
  86. package/chunks/spinner-LdHPVms_.js +0 -32
  87. package/chunks/square-arrow-out-up-right-DkgXD7hj.js +0 -17
  88. package/chunks/table-CmNWoAYO.js +0 -150
  89. package/chunks/tag-BIcqtf7b.js +0 -78
  90. package/chunks/x-BJAOO5a5.js +0 -10
@@ -1,59 +0,0 @@
1
- 'use client';
2
- import { t as e } from "./clsx-Di52oYUU.js";
3
- import { t } from "./createLucideIcon-BgluSHFG.js";
4
- import { t as n } from "./arrow-right-Db_H9KjE.js";
5
- import { t as r } from "./square-arrow-out-up-right-DkgXD7hj.js";
6
- import { t as i } from "./useLocalizedStringFormatter-CeyBc0x0.js";
7
- import { Link as a, RouterProvider as o } from "react-aria-components";
8
- import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
9
- import { VisuallyHidden as u } from "react-aria";
10
- import '../assets/link.css';var d = t("arrow-down-to-line", [
11
- ["path", {
12
- d: "M12 17V3",
13
- key: "1cwfxf"
14
- }],
15
- ["path", {
16
- d: "m6 11 6 6 6-6",
17
- key: "12ii2o"
18
- }],
19
- ["path", {
20
- d: "M19 21H5",
21
- key: "150jfl"
22
- }]
23
- ]), f = {
24
- link: "_link_duep2_1",
25
- icon: "_icon_duep2_53",
26
- standalone: "_standalone_duep2_57",
27
- stretched: "_stretched_duep2_76"
28
- }, p = {
29
- en: {
30
- opensInNewTab: "Opens in new tab",
31
- downloadsFile: "Downloads file"
32
- },
33
- sv: {
34
- opensInNewTab: "Öppnas i ny flik",
35
- downloadsFile: "Hämtar fil"
36
- }
37
- }, m = ({ children: t, standalone: o, target: m, stretched: g, download: _, icon: v, className: y, as: b, ...x }) => {
38
- let S = b || a, C = i(p), w = v ? { icon: v } : _ ? {
39
- icon: d,
40
- label: C.format("downloadsFile")
41
- } : m === "_blank" ? {
42
- icon: r,
43
- label: C.format("opensInNewTab")
44
- } : o ? { icon: n } : null;
45
- return /* @__PURE__ */ l(S, {
46
- className: e(f.link, o && f.standalone, g && f.stretched, y),
47
- ...x,
48
- target: m,
49
- download: _,
50
- children: [t, w ? /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(h, {
51
- className: f.icon,
52
- icon: w.icon,
53
- size: 16,
54
- "aria-hidden": !0
55
- }), w.label && /* @__PURE__ */ c(u, { children: w.label })] }) : null]
56
- });
57
- }, h = ({ icon: e, ...t }) => /* @__PURE__ */ c(e, { ...t });
58
- //#endregion
59
- export { o as n, m as t };
@@ -1,52 +0,0 @@
1
- 'use client';
2
- import { t as e } from "./clsx-Di52oYUU.js";
3
- import { t } from "./createLucideIcon-BgluSHFG.js";
4
- import { t as n } from "./arrow-right-Db_H9KjE.js";
5
- import { t as r } from "./square-arrow-out-up-right-DkgXD7hj.js";
6
- import { t as i } from "./useLocalizedStringFormatter-CeyBc0x0.js";
7
- import "react";
8
- import { Link as a, RouterProvider as o } from "react-aria-components";
9
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
10
- import { VisuallyHidden as l } from "react-aria";
11
- import '../assets/link-button.css';var u = t("arrow-left", [["path", {
12
- d: "m12 19-7-7 7-7",
13
- key: "1l729n"
14
- }], ["path", {
15
- d: "M19 12H5",
16
- key: "x3x0zl"
17
- }]]), d = {
18
- linkButton: "_linkButton_1k5w6_1",
19
- secondary: "_secondary_1k5w6_58",
20
- icon: "_icon_1k5w6_63",
21
- tertiary: "_tertiary_1k5w6_102",
22
- danger: "_danger_1k5w6_130",
23
- iconBtn: "_iconBtn_1k5w6_149",
24
- medium: "_medium_1k5w6_173",
25
- iconLeft: "_iconLeft_1k5w6_178",
26
- fullwidth: "_fullwidth_1k5w6_182",
27
- button: "_button_1k5w6_192"
28
- }, f = {
29
- en: { opensInNewTab: "Opens in new tab" },
30
- sv: { opensInNewTab: "Öppnas i ny flik" }
31
- }, p = ({ children: t, variant: o, fullwidth: p, icon: h, iconPlacement: g, className: _, as: v, size: y = "large", ...b }) => {
32
- let x = v || a, S = i(f), C = h ? { icon: h } : b.target === "_blank" ? {
33
- icon: r,
34
- label: S.format("opensInNewTab")
35
- } : g === "left" ? { icon: u } : { icon: n };
36
- return /* @__PURE__ */ c(x, {
37
- className: e(d.linkButton, o === "primary" && d.primary, o === "secondary" && d.secondary, o === "tertiary" && d.tertiary, o === "danger" && d.danger, o === "icon" && d.iconBtn, y === "medium" && d.medium, p && d.fullwidth, g === "left" && d.iconLeft, _),
38
- ...b,
39
- children: [
40
- t,
41
- /* @__PURE__ */ s(m, {
42
- className: d.icon,
43
- icon: C.icon,
44
- size: 20,
45
- "aria-hidden": !0
46
- }),
47
- C.label && /* @__PURE__ */ s(l, { children: C.label })
48
- ]
49
- });
50
- }, m = ({ icon: e, ...t }) => /* @__PURE__ */ s(e, { ...t });
51
- //#endregion
52
- export { o as n, p as t };
@@ -1,49 +0,0 @@
1
- import { t as e } from "./clsx-Di52oYUU.js";
2
- import { t } from "./check-DV00NPU0.js";
3
- import { t as n } from "./chevron-right-DwqboCdU.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 };
@@ -1,66 +0,0 @@
1
- import { t as e } from "./clsx-Di52oYUU.js";
2
- import { t } from "./x-BJAOO5a5.js";
3
- import { t as n } from "./useLocalizedStringFormatter-CeyBc0x0.js";
4
- import { n as r } from "./button-CenXTGXL.js";
5
- import { t as i } from "./heading-BEl_z-5T.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 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 };
@@ -1,100 +0,0 @@
1
- 'use client';
2
- import { t as e } from "./clsx-Di52oYUU.js";
3
- import { t } from "./createLucideIcon-BgluSHFG.js";
4
- import { t as n } from "./x-BJAOO5a5.js";
5
- import { t as r } from "./useLocalizedStringFormatter-CeyBc0x0.js";
6
- import { n as i } from "./button-CenXTGXL.js";
7
- import { n as a, t as o } from "./label-LWlgvAwz.js";
8
- import { t as s } from "./text-DwmZ-ew8.js";
9
- import { t as c } from "./field-error-LtNtEKDp.js";
10
- import { t as l } from "./TextField.module-BLGiCC4q.js";
11
- import { FormContext as u, Input as d, SearchField as f, useSlottedContext as p } from "react-aria-components";
12
- import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
13
- import '../assets/search-field.css';var _ = t("search", [["path", {
14
- d: "m21 21-4.34-4.34",
15
- key: "14j7rj"
16
- }], ["circle", {
17
- cx: "11",
18
- cy: "11",
19
- r: "8",
20
- key: "4ej97u"
21
- }]]), v = {
22
- container: "_container_onquj_1",
23
- inner: "_inner_onquj_12",
24
- inputContainer: "_inputContainer_onquj_17",
25
- medium: "_medium_onquj_23",
26
- icon: "_icon_onquj_28",
27
- clear: "_clear_onquj_40",
28
- input: "_input_onquj_17"
29
- }, y = {
30
- en: { search: "Search" },
31
- sv: { search: "Sök" }
32
- };
33
- //#endregion
34
- //#region src/search-field/SearchField.tsx
35
- function b(e) {
36
- return !!e?.length;
37
- }
38
- var x = ({ errorPosition: t = "top", size: x = "large", showButton: S, className: C, errorMessage: w, placeholder: T, label: E, description: D, popover: O, validationBehavior: k, inputMode: A = "search", ...j }) => {
39
- let M = r(y), N = p(u), P = k ?? N?.validationBehavior ?? "aria", F = S !== !1, I = (e) => {
40
- e && !j.isInvalid && (j.validate && b(j.validate(e)) || j.onSubmit?.(e));
41
- };
42
- return /* @__PURE__ */ h(f, {
43
- ...j,
44
- inputMode: A,
45
- onSubmit: I,
46
- "aria-label": E ? j["aria-label"] : j["aria-label"] ?? T,
47
- className: e(v.container, C),
48
- validationBehavior: P,
49
- children: ({ state: r }) => /* @__PURE__ */ g(m, { children: [
50
- /* @__PURE__ */ h(a, {
51
- popover: O,
52
- children: E && /* @__PURE__ */ h(o, { children: E })
53
- }),
54
- D && /* @__PURE__ */ h(s, {
55
- slot: "description",
56
- children: D
57
- }),
58
- t === "top" && /* @__PURE__ */ h(c, { children: ({ validationErrors: e }) => w ?? e.join(" ") }),
59
- /* @__PURE__ */ g("div", {
60
- className: v.inner,
61
- children: [/* @__PURE__ */ g("div", {
62
- className: e(v.inputContainer, { [v.medium]: x === "medium" }),
63
- children: [
64
- /* @__PURE__ */ h(_, {
65
- size: 20,
66
- className: v.icon
67
- }),
68
- /* @__PURE__ */ h(d, {
69
- placeholder: T,
70
- className: e(l.input, v.input, { [v.medium]: x === "medium" }),
71
- onKeyDown: j.onSubmit ? void 0 : (e) => {
72
- e.key === "Enter" && r.value && !j.isInvalid && e.currentTarget.form?.requestSubmit();
73
- }
74
- }),
75
- r.value.length > 0 && /* @__PURE__ */ h(i, {
76
- variant: "icon",
77
- size: x,
78
- className: e(v.clear, { [v.medium]: x === "medium" }),
79
- children: /* @__PURE__ */ h(n, {
80
- size: 20,
81
- "aria-hidden": !0
82
- })
83
- })
84
- ]
85
- }), F && /* @__PURE__ */ h(i, {
86
- slot: null,
87
- excludeFromTabOrder: !0,
88
- size: x,
89
- isDisabled: j.isDisabled,
90
- type: "button",
91
- onPress: () => I(r.value),
92
- children: j.buttonText ?? M.format("search")
93
- })]
94
- }),
95
- t === "bottom" && /* @__PURE__ */ h(c, { children: ({ validationErrors: e }) => w ?? e.join(" ") })
96
- ] })
97
- });
98
- };
99
- //#endregion
100
- export { x as t };
@@ -1,177 +0,0 @@
1
- import { n as e, t } from "./clsx-Di52oYUU.js";
2
- import { t as n } from "./chevron-down-CP7nEDei.js";
3
- import { n as r } from "./checkbox-Bqd8B58G.js";
4
- import { t as i } from "./x-BJAOO5a5.js";
5
- import { t as a } from "./useLocalizedStringFormatter-CeyBc0x0.js";
6
- import { n as o, t as s } from "./label-LWlgvAwz.js";
7
- import { t as c } from "./popover-DGcogqbS.js";
8
- import { t as l } from "./text-DwmZ-ew8.js";
9
- import { t as u } from "./field-error-LtNtEKDp.js";
10
- import { c as d } from "./list-box-BN_MSiOD.js";
11
- import { n as f, r as p, t as m } from "./tag-BIcqtf7b.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 { FocusScope as w, useFocusManager as T } from "react-aria";
16
- import '../assets/select.css';var E = {
17
- en: {
18
- clearAll: "Clear all",
19
- selectAll: "Select all",
20
- selectedItems: "Selected items",
21
- selected: "selected"
22
- },
23
- sv: {
24
- clearAll: "Rensa alla",
25
- selectAll: "Välj alla",
26
- selectedItems: "Valda objekt",
27
- selected: "valda"
28
- }
29
- }, D = {
30
- select: "_select_140qh_1",
31
- triggerContainer: "_triggerContainer_140qh_7",
32
- trigger: "_trigger_140qh_7",
33
- medium: "_medium_140qh_30",
34
- small: "_small_140qh_37",
35
- selectValue: "_selectValue_140qh_60",
36
- icon: "_icon_140qh_110",
37
- placeholder: "_placeholder_140qh_122",
38
- multiSelectValue: "_multiSelectValue_140qh_132",
39
- selectValueTag: "_selectValueTag_140qh_156",
40
- clearButton: "_clearButton_140qh_170",
41
- truncate: "_truncate_140qh_185",
42
- popover: "_popover_140qh_222",
43
- selectAll: "_selectAll_140qh_250",
44
- tagGroup: "_tagGroup_140qh_316"
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
- if (!e) return;
53
- let t = Array.from(e.collection.getKeys()).filter((t) => e.collection.getItem(t)?.type === "item" && e.selectionManager.canSelectItem(t)), n = Array.from(e.selectionManager.selectedKeys).filter((t) => !e.selectionManager.canSelectItem(t));
54
- e.setValue(e.selectionManager.isSelectAll ? n : [...t, ...n]), e.commitValidation();
55
- },
56
- children: t.format("selectAll")
57
- });
58
- }, k = ({ isDisabled: e }) => {
59
- let t = a(E), n = (e, n) => e.length === 1 ? n : `${e.length} ${t.format("selected")}`;
60
- return /* @__PURE__ */ S(b, {
61
- className: D.multiSelectValue,
62
- "data-disabled": e || void 0,
63
- children: ({ isPlaceholder: t, selectedItems: r, selectedText: i }) => t ? /* @__PURE__ */ S(x, {}) : /* @__PURE__ */ C("div", {
64
- className: D.selectValueTag,
65
- "data-disabled": e || void 0,
66
- children: [/* @__PURE__ */ S("span", {
67
- className: D.truncate,
68
- children: n(r, i)
69
- }), /* @__PURE__ */ S(A, { isDisabled: e })]
70
- })
71
- });
72
- }, A = ({ isDisabled: e }) => {
73
- let t = h.useContext(y), n = a(E), r = T();
74
- return /* @__PURE__ */ S(_, {
75
- "aria-label": n.format("clearAll"),
76
- className: D.clearButton,
77
- onPress: () => {
78
- r?.focusFirst(), t?.selectionManager.clearSelection();
79
- },
80
- slot: null,
81
- isDisabled: e,
82
- children: /* @__PURE__ */ S(i, {
83
- width: 20,
84
- height: 20
85
- })
86
- });
87
- }, j = ({ showTags: e, isDisabled: t }) => {
88
- let n = a(E), r = g(y);
89
- return !r?.selectedItems.length || !e ? null : /* @__PURE__ */ S(m, {
90
- "aria-label": n.format("selectedItems"),
91
- className: D.tagGroup,
92
- onRemove: (e) => {
93
- r?.selectionManager.toggleSelection(Array.from(e)[0]);
94
- },
95
- selectionBehavior: "toggle",
96
- children: /* @__PURE__ */ S(f, {
97
- items: r.selectedItems,
98
- children: (e) => /* @__PURE__ */ S(p, {
99
- isDismissable: !0,
100
- id: e.key,
101
- isDisabled: t,
102
- textValue: e.textValue,
103
- children: e.textValue
104
- }, e.key)
105
- })
106
- });
107
- }, M = ({ isDisabled: t, selectionMode: r, size: i }) => {
108
- let a = g(y);
109
- return /* @__PURE__ */ C(_, {
110
- className: e({
111
- [D.medium]: i === "medium",
112
- [D.small]: i === "small"
113
- }, D.trigger),
114
- "data-invalid": !!a?.displayValidation.isInvalid || void 0,
115
- children: [/* @__PURE__ */ S(b, {
116
- className: D.selectValue,
117
- "data-disabled": t || void 0,
118
- children: ({ selectedText: e, defaultChildren: t }) => /* @__PURE__ */ S("div", {
119
- className: D.placeholder,
120
- children: /* @__PURE__ */ S("span", {
121
- className: D.truncate,
122
- children: r === "multiple" && e ? null : e || t
123
- })
124
- })
125
- }), /* @__PURE__ */ S("span", {
126
- "aria-hidden": "true",
127
- className: D.icon,
128
- children: /* @__PURE__ */ S(n, { size: 20 })
129
- })]
130
- });
131
- };
132
- //#endregion
133
- //#region src/select/Select.tsx
134
- function N({ children: e, description: n, errorMessage: r, errorPosition: i = "top", items: a, label: f, popover: p, popoverProps: m, listBoxProps: h, size: g = "large", ..._ }) {
135
- return /* @__PURE__ */ S(w, { children: /* @__PURE__ */ C(v, {
136
- ..._,
137
- className: t(_.className, D.select),
138
- children: [
139
- /* @__PURE__ */ S(o, {
140
- popover: p,
141
- children: f && /* @__PURE__ */ S(s, {
142
- "data-disabled": _.isDisabled || void 0,
143
- children: f
144
- })
145
- }),
146
- n && /* @__PURE__ */ S(l, {
147
- slot: "description",
148
- children: n
149
- }),
150
- i === "top" && /* @__PURE__ */ S(u, { children: r }),
151
- /* @__PURE__ */ C("div", {
152
- className: D.triggerContainer,
153
- "data-disabled": _.isDisabled || void 0,
154
- children: [/* @__PURE__ */ S(M, {
155
- size: g,
156
- ..._
157
- }), _.selectionMode === "multiple" ? /* @__PURE__ */ S(k, { ..._ }) : null]
158
- }),
159
- i === "bottom" && /* @__PURE__ */ S(u, { children: r }),
160
- /* @__PURE__ */ C(c, {
161
- offset: 1,
162
- hideArrow: !0,
163
- ...m,
164
- className: t(m?.className, D.popover),
165
- children: [_.isSelectableAll && /* @__PURE__ */ S(O, {}), /* @__PURE__ */ S(d, {
166
- escapeKeyBehavior: "none",
167
- items: a,
168
- ...h,
169
- children: e
170
- })]
171
- }),
172
- /* @__PURE__ */ S(j, { ..._ })
173
- ]
174
- }) });
175
- }
176
- //#endregion
177
- export { M as n, N as t };
@@ -1,32 +0,0 @@
1
- import { t as e } from "./clsx-Di52oYUU.js";
2
- import { t } from "./createLucideIcon-BgluSHFG.js";
3
- import { t as n } from "./useLocalizedStringFormatter-CeyBc0x0.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 };
@@ -1,17 +0,0 @@
1
- import { t as e } from "./createLucideIcon-BgluSHFG.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 };