@midas-ds/components 17.33.5 → 17.33.6
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.
- package/CHANGELOG.md +6 -0
- package/accordion/index.js +1 -1
- package/badge/index.js +1 -1
- package/breadcrumbs/index.js +1 -1
- package/button/index.js +1 -1
- package/calendar/index.js +1 -1
- package/card/index.js +1 -1
- package/character-counter/index.js +1 -1
- package/checkbox/index.js +1 -1
- package/chunks/{Button.module-0C2ArlRs.js → Button.module-CXkKBjuB.js} +0 -1
- package/chunks/{FeedbackStatusIcon-DvMDGBGL.js → FeedbackStatusIcon-Ba31xgcy.js} +1 -2
- package/chunks/{TextField.module-Bg4LNalb.js → TextField.module-B-5HJOZt.js} +0 -1
- package/chunks/{accordion-DRXQI8XG.js → accordion-BKnABSyU.js} +4 -5
- package/chunks/{badge-C4bXJmhn.js → badge-C5Sdu_uw.js} +1 -2
- package/chunks/{breadcrumbs-BGnyY3bO.js → breadcrumbs-BwYDyKWo.js} +1 -2
- package/chunks/{button-dpe6hXmI.js → button-S2AY4EEn.js} +4 -5
- package/chunks/{calendar-Bq2qqFIW.js → calendar-BOTC3DKx.js} +26 -27
- package/chunks/{card-C0S9Kyi2.js → card-mIB1NewO.js} +3 -4
- package/chunks/{character-counter-CSoVSrxZ.js → character-counter-IbkPoEcq.js} +0 -1
- package/chunks/{checkbox-BGxv1TyT.js → checkbox-CzH8BdsB.js} +38 -40
- package/chunks/{clear-button-DWtOkhCH.js → clear-button-CeQy0RdK.js} +2 -3
- package/chunks/{clsx-DAqHMl_k.js → clsx-BtGY0yFD.js} +1 -2
- package/chunks/{color-scheme-switch-D7EpvqTW.js → color-scheme-switch-BpmV-r9p.js} +28 -29
- package/chunks/{combobox-f4uuMJcb.js → combobox-DQ3d6pLc.js} +16 -18
- package/chunks/{date-field-BCfp9ZpN.js → date-field-DSBHnHdN.js} +16 -17
- package/chunks/{date-picker-DH8j2eU9.js → date-picker-CLizY8Vq.js} +39 -40
- package/chunks/{drop-zone-DNhEbH4w.js → drop-zone-BL3Z-Sbj.js} +1 -2
- package/chunks/{field-error-BHoPnRe4.js → field-error-C5ynuTRu.js} +2 -3
- package/chunks/{file-list-DT3zkJbO.js → file-list-etDe20pj.js} +9 -10
- package/chunks/{file-trigger-Dp5nH8oS.js → file-trigger-gOeeZzDP.js} +1 -2
- package/chunks/{grid-SIgkSK_-.js → grid-CFn_pqQX.js} +1 -2
- package/chunks/{heading-DcOjYrUM.js → heading-CIlMdywy.js} +1 -2
- package/chunks/{icons-UBHIX2oV.js → icons-a0WawN46.js} +1 -2
- package/chunks/{info-banner-DXjPEG69.js → info-banner-BKB7_CPh.js} +6 -7
- package/chunks/{label-2ac-zqbe.js → label-B5-Kmj4t.js} +8 -9
- package/chunks/{layout-BT-UgQne.js → layout-Cs8Oc8sf.js} +82 -83
- package/chunks/{link-B76JDA2N.js → link-CG_mHnLv.js} +2 -3
- package/chunks/{link-button-BeXxC22w.js → link-button-4xRbQqH2.js} +2 -3
- package/chunks/{list-box-BzBJX0nP.js → list-box-frfQGO1x.js} +5 -6
- package/chunks/{logo-DSJ1bUJZ.js → logo-Xe8PO0US.js} +2 -3
- package/chunks/{menu-DbQ98noD.js → menu-7gP2Sovj.js} +1 -2
- package/chunks/{modal-CzApHmjO.js → modal-BQrpnHT5.js} +15 -17
- package/chunks/{popover-B82BcP5n.js → popover-C7Ain5Qz.js} +1 -2
- package/chunks/{progress-bar-CJOm7oiN.js → progress-bar-DE7UoEWR.js} +9 -10
- package/chunks/{radio-DgFKSBa5.js → radio-DAB7WeIP.js} +17 -18
- package/chunks/{search-field-CpQnnJKa.js → search-field-BI1h0UBl.js} +23 -25
- package/chunks/{select-CdVW8cwA.js → select-BHpUGcW7.js} +38 -40
- package/chunks/{skeleton-R_3dS7Ro.js → skeleton-6y5HNJZp.js} +1 -2
- package/chunks/{spinner-CIjfJeGm.js → spinner-YKC-Vk3v.js} +2 -3
- package/chunks/{splitDataAttributes-_JTFOOIb.js → splitDataAttributes-ChyO_Kvc.js} +1 -2
- package/chunks/{stack-BAHKom_Q.js → stack-DKjRicm1.js} +1 -2
- package/chunks/{table-D02AQ0Xr.js → table-Fsf-jJip.js} +16 -17
- package/chunks/{tabs-CbcNTa7J.js → tabs-ZCpVhr_r.js} +2 -3
- package/chunks/{tag-BEawJnJm.js → tag-B1suqFhD.js} +2 -3
- package/chunks/{text-DnvD4Cjc.js → text-D7tnzTru.js} +1 -2
- package/chunks/textfield-C-lRIIil.js +110 -0
- package/chunks/time-field-1I6BMlaj.js +59 -0
- package/chunks/{toast-B8J42Yss.js → toast-DTqQhHFN.js} +13 -14
- package/chunks/{toggle-button-DD_bXanH.js → toggle-button-BVyG8F2K.js} +6 -7
- package/chunks/{tooltip-1GBTeMrm.js → tooltip-CR1uxtPd.js} +2 -4
- package/chunks/{useLocalizedStringFormatter-CeyBc0x0.js → useLocalizedStringFormatter-DhIAL1D7.js} +1 -2
- package/clear-button/index.js +1 -1
- package/color-scheme-switch/index.js +1 -1
- package/combobox/index.js +1 -1
- package/date-field/index.js +1 -1
- package/date-picker/index.js +1 -1
- package/drop-zone/index.js +1 -1
- package/field-error/index.js +1 -1
- package/file-list/index.js +1 -1
- package/file-trigger/index.js +1 -1
- package/grid/index.js +1 -1
- package/heading/index.js +1 -1
- package/icons/index.js +1 -1
- package/index.js +50 -52
- package/info-banner/index.js +1 -1
- package/label/index.js +1 -1
- package/layout/index.js +1 -1
- package/link/index.js +1 -1
- package/link-button/index.js +1 -1
- package/list-box/index.js +1 -1
- package/logo/index.js +1 -1
- package/menu/index.js +1 -1
- package/modal/index.js +1 -1
- package/package.json +1 -1
- package/popover/index.js +1 -1
- package/progress-bar/index.js +1 -1
- package/radio/index.js +1 -1
- package/search-field/index.js +1 -1
- package/select/index.js +1 -1
- package/skeleton/index.js +1 -1
- package/spinner/index.js +1 -1
- package/stack/index.js +1 -1
- package/table/index.js +1 -1
- package/tabs/index.js +1 -1
- package/tag/index.js +1 -1
- package/text/index.js +1 -1
- package/textfield/index.js +1 -1
- package/time-field/index.js +1 -1
- package/toast/index.js +1 -1
- package/toggle-button/index.js +1 -1
- package/tooltip/index.js +1 -1
- package/chunks/textfield-CeFppAMx.js +0 -113
- package/chunks/time-field-H-mXlxua.js +0 -60
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { t as e } from "./
|
|
3
|
-
import { t } from "./
|
|
4
|
-
import { n } from "./
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as o } from "./
|
|
8
|
-
import { t as s } from "./
|
|
2
|
+
import { t as e } from "./TextField.module-B-5HJOZt.js";
|
|
3
|
+
import { n as t } from "./button-S2AY4EEn.js";
|
|
4
|
+
import { t as n } from "./clsx-BtGY0yFD.js";
|
|
5
|
+
import { t as r } from "./field-error-C5ynuTRu.js";
|
|
6
|
+
import { t as i } from "./text-D7tnzTru.js";
|
|
7
|
+
import { n as a, t as o } from "./label-B5-Kmj4t.js";
|
|
8
|
+
import { t as s } from "./useLocalizedStringFormatter-DhIAL1D7.js";
|
|
9
9
|
import { FormContext as c, Input as l, SearchField as u, useSlottedContext as d } from "react-aria-components";
|
|
10
10
|
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
11
11
|
import { Search as h, X as g } from "lucide-react";
|
|
@@ -21,13 +21,12 @@ import '../assets/search-field.css';var _ = {
|
|
|
21
21
|
en: { search: "Search" },
|
|
22
22
|
sv: { search: "Sök" }
|
|
23
23
|
};
|
|
24
|
-
|
|
25
|
-
//#region src/search-field/SearchField.tsx
|
|
24
|
+
// src/search-field/SearchField.tsx
|
|
26
25
|
function y(e) {
|
|
27
26
|
return !!e?.length;
|
|
28
27
|
}
|
|
29
28
|
var b = ({ errorPosition: b = "top", size: x = "large", showButton: S, className: C, errorMessage: w, placeholder: T, label: E, description: D, popover: O, validationBehavior: k, inputMode: A = "search", ...j }) => {
|
|
30
|
-
let M =
|
|
29
|
+
let M = s(v), N = d(c), P = k ?? N?.validationBehavior ?? "aria", F = S !== !1, I = (e) => {
|
|
31
30
|
e && !j.isInvalid && (j.validate && y(j.validate(e)) || j.onSubmit?.(e));
|
|
32
31
|
};
|
|
33
32
|
return /* @__PURE__ */ p(u, {
|
|
@@ -35,22 +34,22 @@ var b = ({ errorPosition: b = "top", size: x = "large", showButton: S, className
|
|
|
35
34
|
inputMode: A,
|
|
36
35
|
onSubmit: I,
|
|
37
36
|
"aria-label": E ? j["aria-label"] : j["aria-label"] ?? T,
|
|
38
|
-
className:
|
|
37
|
+
className: n(_.container, C),
|
|
39
38
|
validationBehavior: P,
|
|
40
|
-
children: ({ state:
|
|
41
|
-
/* @__PURE__ */ p(
|
|
39
|
+
children: ({ state: s }) => /* @__PURE__ */ m(f, { children: [
|
|
40
|
+
/* @__PURE__ */ p(a, {
|
|
42
41
|
popover: O,
|
|
43
|
-
children: E && /* @__PURE__ */ p(
|
|
42
|
+
children: E && /* @__PURE__ */ p(o, { children: E })
|
|
44
43
|
}),
|
|
45
|
-
D && /* @__PURE__ */ p(
|
|
44
|
+
D && /* @__PURE__ */ p(i, {
|
|
46
45
|
slot: "description",
|
|
47
46
|
children: D
|
|
48
47
|
}),
|
|
49
|
-
b === "top" && /* @__PURE__ */ p(
|
|
48
|
+
b === "top" && /* @__PURE__ */ p(r, { children: ({ validationErrors: e }) => w ?? e.join(" ") }),
|
|
50
49
|
/* @__PURE__ */ m("div", {
|
|
51
50
|
className: _.inner,
|
|
52
51
|
children: [/* @__PURE__ */ m("div", {
|
|
53
|
-
className:
|
|
52
|
+
className: n(_.inputContainer, { [_.medium]: x === "medium" }),
|
|
54
53
|
children: [
|
|
55
54
|
/* @__PURE__ */ p(h, {
|
|
56
55
|
size: 20,
|
|
@@ -58,34 +57,33 @@ var b = ({ errorPosition: b = "top", size: x = "large", showButton: S, className
|
|
|
58
57
|
}),
|
|
59
58
|
/* @__PURE__ */ p(l, {
|
|
60
59
|
placeholder: T,
|
|
61
|
-
className: e
|
|
60
|
+
className: n(e.input, _.input, { [_.medium]: x === "medium" }),
|
|
62
61
|
onKeyDown: j.onSubmit ? void 0 : (e) => {
|
|
63
|
-
e.key === "Enter" &&
|
|
62
|
+
e.key === "Enter" && s.value && !j.isInvalid && e.currentTarget.form?.requestSubmit();
|
|
64
63
|
}
|
|
65
64
|
}),
|
|
66
|
-
|
|
65
|
+
s.value.length > 0 && /* @__PURE__ */ p(t, {
|
|
67
66
|
variant: "icon",
|
|
68
67
|
size: x,
|
|
69
|
-
className:
|
|
68
|
+
className: n(_.clear, { [_.medium]: x === "medium" }),
|
|
70
69
|
children: /* @__PURE__ */ p(g, {
|
|
71
70
|
size: 20,
|
|
72
71
|
"aria-hidden": !0
|
|
73
72
|
})
|
|
74
73
|
})
|
|
75
74
|
]
|
|
76
|
-
}), F && /* @__PURE__ */ p(
|
|
75
|
+
}), F && /* @__PURE__ */ p(t, {
|
|
77
76
|
slot: null,
|
|
78
77
|
excludeFromTabOrder: !0,
|
|
79
78
|
size: x,
|
|
80
79
|
isDisabled: j.isDisabled,
|
|
81
80
|
type: "button",
|
|
82
|
-
onPress: () => I(
|
|
81
|
+
onPress: () => I(s.value),
|
|
83
82
|
children: j.buttonText ?? M.format("search")
|
|
84
83
|
})]
|
|
85
84
|
}),
|
|
86
|
-
b === "bottom" && /* @__PURE__ */ p(
|
|
85
|
+
b === "bottom" && /* @__PURE__ */ p(r, { children: ({ validationErrors: e }) => w ?? e.join(" ") })
|
|
87
86
|
] })
|
|
88
87
|
});
|
|
89
88
|
};
|
|
90
|
-
//#endregion
|
|
91
89
|
export { b as t };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "./
|
|
3
|
-
import {
|
|
4
|
-
import { t as i } from "./
|
|
5
|
-
import {
|
|
6
|
-
import { t as o } from "./
|
|
7
|
-
import {
|
|
8
|
-
import { c } from "./
|
|
9
|
-
import { n as l, r as u, t as d } from "./tag-
|
|
1
|
+
import { n as e, t } from "./label-B5-Kmj4t.js";
|
|
2
|
+
import { t as n } from "./clsx-BtGY0yFD.js";
|
|
3
|
+
import { t as r } from "./text-D7tnzTru.js";
|
|
4
|
+
import { t as i } from "./field-error-C5ynuTRu.js";
|
|
5
|
+
import { n as a } from "./checkbox-CzH8BdsB.js";
|
|
6
|
+
import { t as o } from "./useLocalizedStringFormatter-DhIAL1D7.js";
|
|
7
|
+
import { c as s } from "./list-box-frfQGO1x.js";
|
|
8
|
+
import { t as c } from "./popover-C7Ain5Qz.js";
|
|
9
|
+
import { n as l, r as u, t as d } from "./tag-B1suqFhD.js";
|
|
10
10
|
import f, { useContext as p } from "react";
|
|
11
11
|
import m from "clsx";
|
|
12
12
|
import { Button as h, Select as g, SelectStateContext as _, SelectValue as v } from "react-aria-components";
|
|
@@ -43,8 +43,8 @@ import '../assets/select.css';var E = {
|
|
|
43
43
|
selectAll: "_selectAll_140qh_250",
|
|
44
44
|
tagGroup: "_tagGroup_140qh_316"
|
|
45
45
|
}, O = () => {
|
|
46
|
-
let e = f.useContext(_),
|
|
47
|
-
return /* @__PURE__ */ b(
|
|
46
|
+
let e = f.useContext(_), t = o(E);
|
|
47
|
+
return /* @__PURE__ */ b(a, {
|
|
48
48
|
className: D.selectAll,
|
|
49
49
|
isIndeterminate: !e?.selectionManager.isSelectAll && !e?.selectionManager.isEmpty,
|
|
50
50
|
isSelected: e?.selectionManager.isSelectAll,
|
|
@@ -53,29 +53,29 @@ import '../assets/select.css';var E = {
|
|
|
53
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
54
|
e.setValue(e.selectionManager.isSelectAll ? n : [...t, ...n]), e.commitValidation();
|
|
55
55
|
},
|
|
56
|
-
children:
|
|
56
|
+
children: t.format("selectAll")
|
|
57
57
|
});
|
|
58
58
|
}, k = ({ isDisabled: e }) => {
|
|
59
|
-
let
|
|
59
|
+
let t = o(E), n = (e, n) => e.length === 1 ? n : `${e.length} ${t.format("selected")}`;
|
|
60
60
|
return /* @__PURE__ */ b(v, {
|
|
61
61
|
className: D.multiSelectValue,
|
|
62
62
|
"data-disabled": e || void 0,
|
|
63
|
-
children: ({ isPlaceholder: t, selectedItems:
|
|
63
|
+
children: ({ isPlaceholder: t, selectedItems: r, selectedText: i }) => t ? /* @__PURE__ */ b(y, {}) : /* @__PURE__ */ x("div", {
|
|
64
64
|
className: D.selectValueTag,
|
|
65
65
|
"data-disabled": e || void 0,
|
|
66
66
|
children: [/* @__PURE__ */ b("span", {
|
|
67
67
|
className: D.truncate,
|
|
68
|
-
children: r
|
|
68
|
+
children: n(r, i)
|
|
69
69
|
}), /* @__PURE__ */ b(A, { isDisabled: e })]
|
|
70
70
|
})
|
|
71
71
|
});
|
|
72
72
|
}, A = ({ isDisabled: e }) => {
|
|
73
|
-
let
|
|
73
|
+
let t = f.useContext(_), n = o(E), r = T();
|
|
74
74
|
return /* @__PURE__ */ b(h, {
|
|
75
|
-
"aria-label":
|
|
75
|
+
"aria-label": n.format("clearAll"),
|
|
76
76
|
className: D.clearButton,
|
|
77
77
|
onPress: () => {
|
|
78
|
-
|
|
78
|
+
r?.focusFirst(), t?.selectionManager.clearSelection();
|
|
79
79
|
},
|
|
80
80
|
slot: null,
|
|
81
81
|
isDisabled: e,
|
|
@@ -84,21 +84,21 @@ import '../assets/select.css';var E = {
|
|
|
84
84
|
height: 20
|
|
85
85
|
})
|
|
86
86
|
});
|
|
87
|
-
}, j = ({ showTags: e, isDisabled:
|
|
88
|
-
let
|
|
89
|
-
return !
|
|
90
|
-
"aria-label":
|
|
87
|
+
}, j = ({ showTags: e, isDisabled: t }) => {
|
|
88
|
+
let n = o(E), r = p(_);
|
|
89
|
+
return !r?.selectedItems.length || !e ? null : /* @__PURE__ */ b(d, {
|
|
90
|
+
"aria-label": n.format("selectedItems"),
|
|
91
91
|
className: D.tagGroup,
|
|
92
92
|
onRemove: (e) => {
|
|
93
|
-
|
|
93
|
+
r?.selectionManager.toggleSelection(Array.from(e)[0]);
|
|
94
94
|
},
|
|
95
95
|
selectionBehavior: "toggle",
|
|
96
96
|
children: /* @__PURE__ */ b(l, {
|
|
97
|
-
items:
|
|
97
|
+
items: r.selectedItems,
|
|
98
98
|
children: (e) => /* @__PURE__ */ b(u, {
|
|
99
99
|
isDismissable: !0,
|
|
100
100
|
id: e.key,
|
|
101
|
-
isDisabled:
|
|
101
|
+
isDisabled: t,
|
|
102
102
|
textValue: e.textValue,
|
|
103
103
|
children: e.textValue
|
|
104
104
|
}, e.key)
|
|
@@ -129,25 +129,24 @@ import '../assets/select.css';var E = {
|
|
|
129
129
|
})]
|
|
130
130
|
});
|
|
131
131
|
};
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
function N({ children: t, description: s, errorMessage: l, errorPosition: u = "top", items: d, label: f, popover: p, popoverProps: m, listBoxProps: h, size: _ = "large", ...v }) {
|
|
132
|
+
// src/select/Select.tsx
|
|
133
|
+
function N({ children: a, description: o, errorMessage: l, errorPosition: u = "top", items: d, label: f, popover: p, popoverProps: m, listBoxProps: h, size: _ = "large", ...v }) {
|
|
135
134
|
return /* @__PURE__ */ b(w, { children: /* @__PURE__ */ x(g, {
|
|
136
135
|
...v,
|
|
137
|
-
className:
|
|
136
|
+
className: n(v.className, D.select),
|
|
138
137
|
children: [
|
|
139
|
-
/* @__PURE__ */ b(
|
|
138
|
+
/* @__PURE__ */ b(e, {
|
|
140
139
|
popover: p,
|
|
141
|
-
children: f && /* @__PURE__ */ b(
|
|
140
|
+
children: f && /* @__PURE__ */ b(t, {
|
|
142
141
|
"data-disabled": v.isDisabled || void 0,
|
|
143
142
|
children: f
|
|
144
143
|
})
|
|
145
144
|
}),
|
|
146
|
-
|
|
145
|
+
o && /* @__PURE__ */ b(r, {
|
|
147
146
|
slot: "description",
|
|
148
|
-
children:
|
|
147
|
+
children: o
|
|
149
148
|
}),
|
|
150
|
-
u === "top" && /* @__PURE__ */ b(
|
|
149
|
+
u === "top" && /* @__PURE__ */ b(i, { children: l }),
|
|
151
150
|
/* @__PURE__ */ x("div", {
|
|
152
151
|
className: D.triggerContainer,
|
|
153
152
|
"data-disabled": v.isDisabled || void 0,
|
|
@@ -156,22 +155,21 @@ function N({ children: t, description: s, errorMessage: l, errorPosition: u = "t
|
|
|
156
155
|
...v
|
|
157
156
|
}), v.selectionMode === "multiple" ? /* @__PURE__ */ b(k, { ...v }) : null]
|
|
158
157
|
}),
|
|
159
|
-
u === "bottom" && /* @__PURE__ */ b(
|
|
160
|
-
/* @__PURE__ */ x(
|
|
158
|
+
u === "bottom" && /* @__PURE__ */ b(i, { children: l }),
|
|
159
|
+
/* @__PURE__ */ x(c, {
|
|
161
160
|
offset: 1,
|
|
162
161
|
hideArrow: !0,
|
|
163
162
|
...m,
|
|
164
|
-
className:
|
|
165
|
-
children: [v.isSelectableAll && /* @__PURE__ */ b(O, {}), /* @__PURE__ */ b(
|
|
163
|
+
className: n(m?.className, D.popover),
|
|
164
|
+
children: [v.isSelectableAll && /* @__PURE__ */ b(O, {}), /* @__PURE__ */ b(s, {
|
|
166
165
|
escapeKeyBehavior: "none",
|
|
167
166
|
items: d,
|
|
168
167
|
...h,
|
|
169
|
-
children:
|
|
168
|
+
children: a
|
|
170
169
|
})]
|
|
171
170
|
}),
|
|
172
171
|
/* @__PURE__ */ b(j, { ...v })
|
|
173
172
|
]
|
|
174
173
|
}) });
|
|
175
174
|
}
|
|
176
|
-
//#endregion
|
|
177
175
|
export { M as n, N as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./clsx-
|
|
1
|
+
import { t as e } from "./clsx-BtGY0yFD.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
4
|
import '../assets/skeleton.css';var r = {
|
|
@@ -32,5 +32,4 @@ import '../assets/skeleton.css';var r = {
|
|
|
32
32
|
},
|
|
33
33
|
...f
|
|
34
34
|
}));
|
|
35
|
-
//#endregion
|
|
36
35
|
export { i as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./clsx-
|
|
2
|
-
import { t } from "./useLocalizedStringFormatter-
|
|
1
|
+
import { t as e } from "./clsx-BtGY0yFD.js";
|
|
2
|
+
import { t } from "./useLocalizedStringFormatter-DhIAL1D7.js";
|
|
3
3
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
4
|
import { LoaderCircle as i } from "lucide-react";
|
|
5
5
|
import { VisuallyHidden as a } from "react-aria";
|
|
@@ -25,5 +25,4 @@ import '../assets/spinner.css';var o = {
|
|
|
25
25
|
}), /* @__PURE__ */ n(a, { children: d.format("loadingPleaseWait") })]
|
|
26
26
|
});
|
|
27
27
|
};
|
|
28
|
-
//#endregion
|
|
29
28
|
export { c as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { t as e } from "./clsx-
|
|
2
|
+
import { t as e } from "./clsx-BtGY0yFD.js";
|
|
3
3
|
import * as t from "react";
|
|
4
4
|
import { jsx as n } from "react/jsx-runtime";
|
|
5
5
|
import '../assets/stack.css';var r = { stack: "_stack_1g0ly_7" }, i = t.forwardRef(({ children: t, elementType: i = "div", direction: a = "column", spacing: o = "small", alignItems: s = "stretch", justifyContent: c = "start", wrap: l = !1, className: u, role: d, ...f }, p) => {
|
|
@@ -18,5 +18,4 @@ import '../assets/stack.css';var r = { stack: "_stack_1g0ly_7" }, i = t.forwardR
|
|
|
18
18
|
});
|
|
19
19
|
});
|
|
20
20
|
i.displayName = "Stack";
|
|
21
|
-
//#endregion
|
|
22
21
|
export { i as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { n as e } from "./checkbox-CzH8BdsB.js";
|
|
3
|
+
import { t } from "./clsx-BtGY0yFD.js";
|
|
4
4
|
import { Button as n, Cell as r, Collection as i, Column as a, Row as o, Table as s, TableBody as c, TableHeader as l, useTableOptions as u } from "react-aria-components";
|
|
5
5
|
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
6
6
|
import { ArrowDown as m, ArrowUp as h, ArrowUpDown as g, GripVertical as _ } from "lucide-react";
|
|
@@ -16,21 +16,21 @@ import '../assets/table.css';var v = {
|
|
|
16
16
|
narrow: "_narrow_1lyes_98",
|
|
17
17
|
medium: "_medium_1lyes_121",
|
|
18
18
|
striped: "_striped_1lyes_132"
|
|
19
|
-
}, y = ({ size:
|
|
20
|
-
className:
|
|
21
|
-
[v.medium]:
|
|
19
|
+
}, y = ({ size: e = "large", striped: n = !1, className: r, ...i }) => /* @__PURE__ */ f(s, {
|
|
20
|
+
className: t(v.table, r, {
|
|
21
|
+
[v.medium]: e === "medium",
|
|
22
22
|
[v.striped]: n
|
|
23
23
|
}),
|
|
24
24
|
...i
|
|
25
25
|
}), b = ({ columns: n, children: r, className: a }) => {
|
|
26
26
|
let { selectionBehavior: o, selectionMode: s, allowsDragging: c } = u();
|
|
27
27
|
return /* @__PURE__ */ p(l, {
|
|
28
|
-
className:
|
|
28
|
+
className: t(a, v.tableHeader),
|
|
29
29
|
children: [
|
|
30
30
|
c && /* @__PURE__ */ f(S, {}),
|
|
31
31
|
o === "toggle" && /* @__PURE__ */ f(S, {
|
|
32
32
|
width: 50,
|
|
33
|
-
children: s === "multiple" && /* @__PURE__ */ f(
|
|
33
|
+
children: s === "multiple" && /* @__PURE__ */ f(e, {
|
|
34
34
|
className: v.selection,
|
|
35
35
|
slot: "selection"
|
|
36
36
|
})
|
|
@@ -45,14 +45,14 @@ import '../assets/table.css';var v = {
|
|
|
45
45
|
let { selectionBehavior: d, allowsDragging: m } = u();
|
|
46
46
|
return /* @__PURE__ */ p(o, {
|
|
47
47
|
id: r,
|
|
48
|
-
className:
|
|
48
|
+
className: t(c, v.row),
|
|
49
49
|
...l,
|
|
50
50
|
children: [
|
|
51
51
|
m && /* @__PURE__ */ f(C, { children: /* @__PURE__ */ f(n, {
|
|
52
52
|
slot: "drag",
|
|
53
53
|
children: /* @__PURE__ */ f(_, { size: 20 })
|
|
54
54
|
}) }),
|
|
55
|
-
d === "toggle" && /* @__PURE__ */ f(C, { children: /* @__PURE__ */ f(
|
|
55
|
+
d === "toggle" && /* @__PURE__ */ f(C, { children: /* @__PURE__ */ f(e, {
|
|
56
56
|
className: v.selection,
|
|
57
57
|
slot: "selection"
|
|
58
58
|
}) }),
|
|
@@ -62,10 +62,10 @@ import '../assets/table.css';var v = {
|
|
|
62
62
|
})
|
|
63
63
|
]
|
|
64
64
|
});
|
|
65
|
-
}, S = ({ children:
|
|
66
|
-
className:
|
|
65
|
+
}, S = ({ children: e, className: n, ...r }) => /* @__PURE__ */ f(a, {
|
|
66
|
+
className: t(n, v.column),
|
|
67
67
|
...r,
|
|
68
|
-
children: ({ allowsSorting:
|
|
68
|
+
children: ({ allowsSorting: t, sortDirection: n }) => /* @__PURE__ */ p(d, { children: [e, t && /* @__PURE__ */ f("span", {
|
|
69
69
|
"aria-hidden": "true",
|
|
70
70
|
className: v.sortIndicator,
|
|
71
71
|
children: n === "ascending" ? /* @__PURE__ */ f(h, { size: 16 }) : n === "descending" ? /* @__PURE__ */ f(m, { size: 16 }) : /* @__PURE__ */ f(g, {
|
|
@@ -73,12 +73,11 @@ import '../assets/table.css';var v = {
|
|
|
73
73
|
className: v.sortIconNeutral
|
|
74
74
|
})
|
|
75
75
|
})] })
|
|
76
|
-
}), C = ({ className:
|
|
77
|
-
className: e
|
|
76
|
+
}), C = ({ className: e, ...n }) => /* @__PURE__ */ f(r, {
|
|
77
|
+
className: t(e, v.cell),
|
|
78
78
|
...n
|
|
79
|
-
}), w = ({ className:
|
|
80
|
-
className: e
|
|
79
|
+
}), w = ({ className: e, ...n }) => /* @__PURE__ */ f(c, {
|
|
80
|
+
className: t(e, v.tableBody),
|
|
81
81
|
...n
|
|
82
82
|
});
|
|
83
|
-
//#endregion
|
|
84
83
|
export { w as a, y as i, S as n, b as o, x as r, C as t };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { t as e } from "./clsx-
|
|
2
|
+
import { t as e } from "./clsx-BtGY0yFD.js";
|
|
3
3
|
import * as t from "react";
|
|
4
4
|
import { createContext as n, useContext as r } from "react";
|
|
5
5
|
import { DialogContext as i, SelectionIndicator as a, Tab as o, TabList as s, TabPanel as c, Tabs as l, composeRenderProps as u } from "react-aria-components";
|
|
6
6
|
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
7
|
-
import '../assets/tabs.css'
|
|
7
|
+
import '../assets/tabs.css';// src/tabs/TabsContext.ts
|
|
8
8
|
var m = n({
|
|
9
9
|
variant: "uncontained",
|
|
10
10
|
size: "large"
|
|
@@ -52,5 +52,4 @@ var m = n({
|
|
|
52
52
|
className: e(h.tabList, t),
|
|
53
53
|
...n
|
|
54
54
|
});
|
|
55
|
-
//#endregion
|
|
56
55
|
export { g as i, v as n, _ as r, y as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./clsx-
|
|
2
|
-
import { n as t } from "./button-
|
|
1
|
+
import { t as e } from "./clsx-BtGY0yFD.js";
|
|
2
|
+
import { n as t } from "./button-S2AY4EEn.js";
|
|
3
3
|
import { Children as n, forwardRef as r, isValidElement as i } from "react";
|
|
4
4
|
import { Tag as a, TagGroup as o, TagGroupContext as s, TagList as c, TagListContext as l, composeRenderProps as u, useContextProps as d } from "react-aria-components";
|
|
5
5
|
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
@@ -74,5 +74,4 @@ import '../assets/tag.css';var g = {
|
|
|
74
74
|
});
|
|
75
75
|
});
|
|
76
76
|
b.displayName = "TagGroup";
|
|
77
|
-
//#endregion
|
|
78
77
|
export { y as n, _ as r, b as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./clsx-
|
|
1
|
+
import { t as e } from "./clsx-BtGY0yFD.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import { Text as t } from "react-aria-components";
|
|
4
4
|
import { jsx as n } from "react/jsx-runtime";
|
|
@@ -24,5 +24,4 @@ import '../assets/text.css';var r = {
|
|
|
24
24
|
children: a
|
|
25
25
|
});
|
|
26
26
|
};
|
|
27
|
-
//#endregion
|
|
28
27
|
export { a as t };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { t as e } from "./TextField.module-B-5HJOZt.js";
|
|
3
|
+
import { t } from "./text-D7tnzTru.js";
|
|
4
|
+
import { t as n } from "./field-error-C5ynuTRu.js";
|
|
5
|
+
import { t as r } from "./character-counter-IbkPoEcq.js";
|
|
6
|
+
import { n as i, t as a } from "./label-B5-Kmj4t.js";
|
|
7
|
+
import { t as o } from "./clsx-BtGY0yFD.js";
|
|
8
|
+
import { t as s } from "./useLocalizedStringFormatter-DhIAL1D7.js";
|
|
9
|
+
import { n as c } from "./button-S2AY4EEn.js";
|
|
10
|
+
import { forwardRef as l, useState as u } from "react";
|
|
11
|
+
import { clsx as d } from "clsx";
|
|
12
|
+
import { Input as f, InputContext as p, TextArea as m, TextField as h, TextFieldContext as g, useContextProps as _ } from "react-aria-components";
|
|
13
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
14
|
+
// src/textfield/TextFieldBase.tsx
|
|
15
|
+
var b = l((o, s) => {
|
|
16
|
+
[o] = _(o, s, g);
|
|
17
|
+
let { label: c, description: l, errorMessage: u, showCounter: f, errorPosition: p = "top", size: m = "large", popover: b, children: x } = o;
|
|
18
|
+
return /* @__PURE__ */ y(h, {
|
|
19
|
+
...o,
|
|
20
|
+
className: d(e.textField, { [e.medium]: m === "medium" }),
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ v(i, {
|
|
23
|
+
popover: b,
|
|
24
|
+
children: c && /* @__PURE__ */ v(a, { children: c })
|
|
25
|
+
}),
|
|
26
|
+
l && /* @__PURE__ */ v(t, {
|
|
27
|
+
slot: "description",
|
|
28
|
+
children: l
|
|
29
|
+
}),
|
|
30
|
+
f && /* @__PURE__ */ v(r, { isLonely: !l }),
|
|
31
|
+
p === "top" && /* @__PURE__ */ v(n, {
|
|
32
|
+
"data-testid": "fieldError",
|
|
33
|
+
children: u
|
|
34
|
+
}),
|
|
35
|
+
x,
|
|
36
|
+
p === "bottom" && /* @__PURE__ */ v(n, {
|
|
37
|
+
"data-testid": "fieldError",
|
|
38
|
+
className: e.bottomError,
|
|
39
|
+
children: u
|
|
40
|
+
})
|
|
41
|
+
]
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
b.displayName = "TextFieldBase";
|
|
45
|
+
var x = {
|
|
46
|
+
en: {
|
|
47
|
+
hide: "Hide",
|
|
48
|
+
show: "Show",
|
|
49
|
+
showPassword: "Show password"
|
|
50
|
+
},
|
|
51
|
+
sv: {
|
|
52
|
+
hide: "Dölj",
|
|
53
|
+
show: "Visa",
|
|
54
|
+
showPassword: "Visa lösenord"
|
|
55
|
+
}
|
|
56
|
+
}, S = ({ showPassword: t, onToggle: n }) => {
|
|
57
|
+
let r = s(x);
|
|
58
|
+
return /* @__PURE__ */ v(c, {
|
|
59
|
+
"aria-label": r.format("showPassword"),
|
|
60
|
+
"aria-pressed": t,
|
|
61
|
+
variant: "tertiary",
|
|
62
|
+
onPress: n,
|
|
63
|
+
className: e.passwordButton,
|
|
64
|
+
children: t ? r.format("hide") : r.format("show")
|
|
65
|
+
});
|
|
66
|
+
}, C = l(({ skipContext: t = !1, ...n }, r) => {
|
|
67
|
+
let [i, a] = _(n, r, p), s = t ? r : a, c = t ? n : i, l = c.type === "password", [d, m] = u(!1);
|
|
68
|
+
return /* @__PURE__ */ y("div", {
|
|
69
|
+
className: e.wrap,
|
|
70
|
+
children: [/* @__PURE__ */ v(f, {
|
|
71
|
+
...c,
|
|
72
|
+
ref: s,
|
|
73
|
+
type: l && d ? "text" : c.type,
|
|
74
|
+
className: o(e.input, c.className)
|
|
75
|
+
}), l && /* @__PURE__ */ v(S, {
|
|
76
|
+
showPassword: d,
|
|
77
|
+
onToggle: () => m((e) => !e)
|
|
78
|
+
})]
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
C.displayName = "Input";
|
|
82
|
+
// src/textfield/TextField.tsx
|
|
83
|
+
var w = l(({ className: e, list: t, type: n, min: r, max: i, form: a, ...s }, c) => /* @__PURE__ */ v(b, {
|
|
84
|
+
...s,
|
|
85
|
+
children: /* @__PURE__ */ v(C, {
|
|
86
|
+
className: o(e),
|
|
87
|
+
form: a,
|
|
88
|
+
list: t,
|
|
89
|
+
min: r,
|
|
90
|
+
max: i,
|
|
91
|
+
ref: c,
|
|
92
|
+
type: n,
|
|
93
|
+
skipContext: !0
|
|
94
|
+
})
|
|
95
|
+
}));
|
|
96
|
+
w.displayName = "TextField";
|
|
97
|
+
// src/textfield/TextArea.tsx
|
|
98
|
+
var T = l(({ className: t, cols: n, form: r, rows: i, wrap: a, ...s }, c) => /* @__PURE__ */ v(b, {
|
|
99
|
+
...s,
|
|
100
|
+
children: /* @__PURE__ */ v(m, {
|
|
101
|
+
className: o(e.textArea, t),
|
|
102
|
+
cols: n,
|
|
103
|
+
form: r,
|
|
104
|
+
ref: c,
|
|
105
|
+
rows: i,
|
|
106
|
+
wrap: a
|
|
107
|
+
})
|
|
108
|
+
}));
|
|
109
|
+
T.displayName = "TextArea";
|
|
110
|
+
export { b as i, w as n, C as r, T as t };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { t as e } from "./clsx-BtGY0yFD.js";
|
|
2
|
+
import { n as t, r as n } from "./date-field-DSBHnHdN.js";
|
|
3
|
+
import { t as r } from "./field-error-C5ynuTRu.js";
|
|
4
|
+
import { n as i, t as a } from "./label-B5-Kmj4t.js";
|
|
5
|
+
import { t as o } from "./text-D7tnzTru.js";
|
|
6
|
+
import { t as s } from "./clear-button-CeQy0RdK.js";
|
|
7
|
+
import { t as c } from "./useLocalizedStringFormatter-DhIAL1D7.js";
|
|
8
|
+
import * as l from "react";
|
|
9
|
+
import { TimeField as u, TimeFieldStateContext as d } from "react-aria-components";
|
|
10
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
11
|
+
import { FocusScope as m, useFocusManager as h } from "react-aria";
|
|
12
|
+
import '../assets/time-field.css';var g = {
|
|
13
|
+
en: { clear: "Clear time" },
|
|
14
|
+
sv: { clear: "Rensa tid" }
|
|
15
|
+
}, _ = {
|
|
16
|
+
timeField: "_timeField_1evr6_1",
|
|
17
|
+
inputField: "_inputField_1evr6_7",
|
|
18
|
+
medium: "_medium_1evr6_41",
|
|
19
|
+
clearButton: "_clearButton_1evr6_50"
|
|
20
|
+
}, v = ({ isClearable: t, size: n, isDisabled: r, isReadOnly: i }) => {
|
|
21
|
+
let a = c(g), o = l.useContext(d), u = h();
|
|
22
|
+
return t && o?.value != null && !i ? /* @__PURE__ */ f(s, {
|
|
23
|
+
onPress: () => {
|
|
24
|
+
o?.setValue(null), u?.focusFirst();
|
|
25
|
+
},
|
|
26
|
+
size: n,
|
|
27
|
+
isDisabled: r,
|
|
28
|
+
"aria-label": a.format("clear"),
|
|
29
|
+
className: e(_.clearButton, { [_.medium]: n === "medium" })
|
|
30
|
+
}) : null;
|
|
31
|
+
}, y = l.forwardRef(({ className: s, description: c, errorMessage: l, errorPosition: d = "top", label: h, size: g = "large", popover: y, isClearable: b = !1, isReadOnly: x, isDisabled: S, ...C }, w) => /* @__PURE__ */ p(u, {
|
|
32
|
+
...C,
|
|
33
|
+
ref: w,
|
|
34
|
+
isReadOnly: x,
|
|
35
|
+
isDisabled: S,
|
|
36
|
+
className: e(_.timeField, s),
|
|
37
|
+
children: [
|
|
38
|
+
/* @__PURE__ */ f(i, {
|
|
39
|
+
popover: y,
|
|
40
|
+
children: h && /* @__PURE__ */ f(a, { children: h })
|
|
41
|
+
}),
|
|
42
|
+
c && /* @__PURE__ */ f(o, {
|
|
43
|
+
slot: "description",
|
|
44
|
+
children: c
|
|
45
|
+
}),
|
|
46
|
+
d === "top" && /* @__PURE__ */ f(r, { children: l }),
|
|
47
|
+
/* @__PURE__ */ f("div", {
|
|
48
|
+
className: e(_.inputField, { [_.medium]: g === "medium" }),
|
|
49
|
+
children: /* @__PURE__ */ p(m, { children: [/* @__PURE__ */ f(t, { children: (e) => /* @__PURE__ */ f(n, { segment: e }) }), /* @__PURE__ */ f(v, {
|
|
50
|
+
isClearable: b,
|
|
51
|
+
size: g,
|
|
52
|
+
isDisabled: S,
|
|
53
|
+
isReadOnly: x
|
|
54
|
+
})] })
|
|
55
|
+
}),
|
|
56
|
+
d === "bottom" && /* @__PURE__ */ f(r, { children: l })
|
|
57
|
+
]
|
|
58
|
+
}));
|
|
59
|
+
export { y as t };
|