@midas-ds/components 1.0.2
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/Breadcrumbs.css +1 -0
- package/Button-CCevm2s3.js +183 -0
- package/Button.css +1 -0
- package/ButtonGroup.css +1 -0
- package/CHANGELOG.md +76 -0
- package/Card.css +1 -0
- package/Checkbox-CllWDBxF.js +405 -0
- package/Checkbox.css +1 -0
- package/Collection-B3xUVWPF.js +483 -0
- package/ComboBox.css +1 -0
- package/DatePicker.css +1 -0
- package/Dialog-CLTyYwkS.js +1889 -0
- package/DragAndDrop-OTN7La7U.js +42 -0
- package/Dropdown.css +1 -0
- package/FileUpload.css +1 -0
- package/Flex.css +1 -0
- package/Flex.module-CpoxBzQX.js +37 -0
- package/FocusScope-BR0SJ-cZ.js +512 -0
- package/Form-DXLoQL91.js +240 -0
- package/Grid.css +1 -0
- package/Grid.module-Ia0e9Dix.js +36 -0
- package/Group-DPMuN3h8.js +44 -0
- package/Hidden-BQWDvze4.js +37 -0
- package/InfoBanner.css +1 -0
- package/Label-C18A_4Z5.js +69 -0
- package/Layout.css +1 -0
- package/Link-BU1h3K2a.js +77 -0
- package/Link.css +1 -0
- package/LinkButton.css +1 -0
- package/ListBox-D21tdwTs.js +463 -0
- package/ListKeyboardDelegate-DxMjfMsI.js +172 -0
- package/Logo.css +1 -0
- package/Modal.css +1 -0
- package/MultiSelect.css +1 -0
- package/PressResponder-DP8ZDNGy.js +31 -0
- package/README.md +7 -0
- package/RSPContexts-EOiWkKOf.js +11 -0
- package/Radio.css +1 -0
- package/SearchField.css +1 -0
- package/Select.css +1 -0
- package/SelectionManager-D4WtKtey.js +988 -0
- package/Separator-DLUHK9vv.js +48 -0
- package/Spinner.css +1 -0
- package/Table.css +1 -0
- package/Tabs.css +1 -0
- package/Tag-CEd6WWSc.js +725 -0
- package/Tag.css +1 -0
- package/Text-DGLaY3HR.js +17 -0
- package/TextArea.css +1 -0
- package/TextField-C_hq9WeT.js +226 -0
- package/TextField.css +1 -0
- package/TextField.module-Cwq1FAm7.js +141 -0
- package/Toast.css +1 -0
- package/VisuallyHidden-B_XzVvlX.js +39 -0
- package/accordion/Accordion.d.ts +13 -0
- package/accordion/AccordionContent.d.ts +3 -0
- package/accordion/AccordionItem.d.ts +3 -0
- package/accordion/AccordionTagContext.d.ts +3 -0
- package/accordion/AccordionTrigger.d.ts +3 -0
- package/accordion/index.d.ts +5 -0
- package/breadcrumbs/Breadcrumbs.d.ts +9 -0
- package/breadcrumbs/index.d.ts +1 -0
- package/button/Button.d.ts +41 -0
- package/button/ButtonGroup.d.ts +12 -0
- package/button/index.d.ts +2 -0
- package/card/Card.d.ts +34 -0
- package/card/index.d.ts +1 -0
- package/checkbox/Checkbox.d.ts +2 -0
- package/checkbox/CheckboxGroup.d.ts +10 -0
- package/checkbox/index.d.ts +2 -0
- package/chevron-down-Cd1bkzXT.js +13 -0
- package/chevron-right-DBMc9VMi.js +23 -0
- package/clsx-OuTLNxxd.js +16 -0
- package/combobox/ComboBox.d.ts +12 -0
- package/combobox/index.d.ts +1 -0
- package/context-ScOIq_Gu.js +80 -0
- package/createLucideIcon-DeWljiyi.js +79 -0
- package/date-picker/DatePicker.d.ts +14 -0
- package/date-picker/index.d.ts +2 -0
- package/dropdown/Dropdown.d.ts +8 -0
- package/dropdown/index.d.ts +1 -0
- package/file-upload/FileUpload.d.ts +11 -0
- package/file-upload/index.d.ts +1 -0
- package/flex/Flex.d.ts +17 -0
- package/flex/FlexItem.d.ts +15 -0
- package/flex/index.d.ts +2 -0
- package/grid/Grid.d.ts +16 -0
- package/grid/GridItem.d.ts +7 -0
- package/grid/index.d.ts +2 -0
- package/index-CEg5vZQH.js +132 -0
- package/index-CgfokhRq.js +674 -0
- package/index-CorR1LBD.js +3122 -0
- package/index-Dl1Q-tbj.js +26984 -0
- package/index.css +1 -0
- package/index.d.ts +29 -0
- package/index.js +114 -0
- package/index10.js +4 -0
- package/index11.js +5 -0
- package/index12.js +4 -0
- package/index13.js +4 -0
- package/index14.js +4 -0
- package/index15.js +6 -0
- package/index16.js +6 -0
- package/index17.js +6 -0
- package/index18.js +4 -0
- package/index19.js +6 -0
- package/index2.js +8 -0
- package/index20.js +6 -0
- package/index21.js +4 -0
- package/index22.js +5 -0
- package/index23.js +5 -0
- package/index24.js +5 -0
- package/index25.js +6 -0
- package/index26.js +6 -0
- package/index27.js +6 -0
- package/index28.js +4 -0
- package/index29.js +12 -0
- package/index3.js +8 -0
- package/index30.js +20 -0
- package/index31.js +22 -0
- package/index32.js +14 -0
- package/index33.js +11 -0
- package/index34.js +31 -0
- package/index35.js +8 -0
- package/index36.js +9 -0
- package/index37.js +19 -0
- package/index38.js +9 -0
- package/index39.js +9 -0
- package/index4.js +4 -0
- package/index40.js +16 -0
- package/index41.js +16 -0
- package/index42.js +31 -0
- package/index43.js +16 -0
- package/index44.js +6 -0
- package/index45.js +53 -0
- package/index46.js +18 -0
- package/index47.js +27 -0
- package/index48.js +18 -0
- package/index49.js +21 -0
- package/index5.js +5 -0
- package/index50.js +49 -0
- package/index51.js +5 -0
- package/index52.js +25 -0
- package/index53.js +18 -0
- package/index54.js +9 -0
- package/index55.js +25 -0
- package/index56.js +18 -0
- package/index57.js +11 -0
- package/index58.js +12 -0
- package/index59.js +15 -0
- package/index6.js +4 -0
- package/index60.js +9 -0
- package/index61.js +9 -0
- package/index62.js +19 -0
- package/index63.js +22 -0
- package/index64.js +61 -0
- package/index65.js +15 -0
- package/index66.js +11 -0
- package/index67.js +63 -0
- package/index68.js +85 -0
- package/index69.js +74 -0
- package/index7.js +9 -0
- package/index70.js +24 -0
- package/index71.js +69 -0
- package/index72.js +80 -0
- package/index73.js +140 -0
- package/index74.js +70 -0
- package/index75.js +42 -0
- package/index76.js +82 -0
- package/index77.js +71 -0
- package/index78.js +104 -0
- package/index79.js +274 -0
- package/index8.js +4 -0
- package/index80.js +724 -0
- package/index81.js +491 -0
- package/index82.js +317 -0
- package/index83.js +391 -0
- package/index84.js +254 -0
- package/index85.js +1364 -0
- package/index86.js +1009 -0
- package/index87.js +388 -0
- package/index88.js +2105 -0
- package/index89.js +2371 -0
- package/index9.js +5 -0
- package/index90.js +6834 -0
- package/index91.js +17 -0
- package/index92.js +14 -0
- package/index93.js +6 -0
- package/index94.js +9 -0
- package/info-banner/InfoBanner.d.ts +21 -0
- package/info-banner/index.d.ts +1 -0
- package/intlStrings-Cd44R5hT.js +278 -0
- package/layout/Layout.d.ts +51 -0
- package/layout/index.d.ts +1 -0
- package/link/Link.d.ts +13 -0
- package/link/index.d.ts +1 -0
- package/link-button/LinkButton.d.ts +18 -0
- package/link-button/index.d.ts +1 -0
- package/logo/Logo.d.ts +16 -0
- package/logo/index.d.ts +1 -0
- package/modal/Modal.d.ts +13 -0
- package/modal/index.d.ts +1 -0
- package/multi-select/MultiSelect.d.ts +28 -0
- package/multi-select/index.d.ts +1 -0
- package/package.json +29 -0
- package/radio/Radio.d.ts +20 -0
- package/radio/index.d.ts +1 -0
- package/react.esm-D8HpDGKP.js +11060 -0
- package/search-field/SearchField.d.ts +13 -0
- package/search-field/index.d.ts +1 -0
- package/select/Select.d.ts +11 -0
- package/select/index.d.ts +1 -0
- package/spinner/Spinner.d.ts +11 -0
- package/spinner/index.d.ts +1 -0
- package/table/Table.d.ts +12 -0
- package/table/index.d.ts +1 -0
- package/tabs/Tabs.d.ts +12 -0
- package/tabs/index.d.ts +1 -0
- package/tag/Tag.d.ts +11 -0
- package/tag/index.d.ts +1 -0
- package/textarea/TextArea.d.ts +20 -0
- package/textarea/index.d.ts +1 -0
- package/textfield/TextField.d.ts +16 -0
- package/textfield/index.d.ts +3 -0
- package/theme/index.d.ts +138 -0
- package/theme/tokens.d.ts +135 -0
- package/toast/Toast.d.ts +25 -0
- package/toast/index.d.ts +1 -0
- package/tokens-CjXmpXTi.js +160 -0
- package/triangle-alert-1OYl9KWz.js +56 -0
- package/useControlledState-S_TYcV_c.js +45 -0
- package/useDescription-D4_zk_sA.js +32 -0
- package/useFilter-BnJDBCkt.js +35 -0
- package/useFocusRing-D97-G3fT.js +1324 -0
- package/useFocusable-C-N9wcwm.js +56 -0
- package/useGridSelectionCheckbox-i1rsjlC-.js +22 -0
- package/useHasTabbableChild-DeuCnGGv.js +34 -0
- package/useHighlightSelectionDescription-JVx2MW_e.js +552 -0
- package/useListState-DSOTbsL3.js +119 -0
- package/useLocalizedStringFormatter-DVCAZqcL.js +96 -0
- package/useSingleSelectListState-CmX9_L5H.js +34 -0
- package/useUpdateEffect-Dtz-i14F.js +12 -0
- package/x-JK7i-TQC.js +14 -0
package/index47.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { s } from "./Flex.module-CpoxBzQX.js";
|
|
3
|
+
import { c as r } from "./clsx-OuTLNxxd.js";
|
|
4
|
+
const x = ({
|
|
5
|
+
children: l,
|
|
6
|
+
col: o,
|
|
7
|
+
offset: t,
|
|
8
|
+
...c
|
|
9
|
+
}) => {
|
|
10
|
+
const m = o ? `col-${o}` : "", a = t ? `offset-${t}` : "";
|
|
11
|
+
return /* @__PURE__ */ e(
|
|
12
|
+
"div",
|
|
13
|
+
{
|
|
14
|
+
className: r(
|
|
15
|
+
s.col,
|
|
16
|
+
s[m],
|
|
17
|
+
s[a],
|
|
18
|
+
c.className
|
|
19
|
+
),
|
|
20
|
+
...c,
|
|
21
|
+
children: l
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
x as FlexItem
|
|
27
|
+
};
|
package/index48.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { s } from "./Grid.module-Ia0e9Dix.js";
|
|
3
|
+
import { c as o } from "./clsx-OuTLNxxd.js";
|
|
4
|
+
const t = ({
|
|
5
|
+
children: i,
|
|
6
|
+
fluid: m = !1,
|
|
7
|
+
...r
|
|
8
|
+
}) => /* @__PURE__ */ a(
|
|
9
|
+
"div",
|
|
10
|
+
{
|
|
11
|
+
className: o(s.container, m && s.fluid, r.className),
|
|
12
|
+
...r,
|
|
13
|
+
children: /* @__PURE__ */ a("div", { className: s.grid, children: i })
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
export {
|
|
17
|
+
t as Grid
|
|
18
|
+
};
|
package/index49.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { s as m } from "./Grid.module-Ia0e9Dix.js";
|
|
3
|
+
import { c as a } from "./clsx-OuTLNxxd.js";
|
|
4
|
+
const p = ({
|
|
5
|
+
children: r,
|
|
6
|
+
col: s,
|
|
7
|
+
...o
|
|
8
|
+
}) => {
|
|
9
|
+
const c = s ? `col-${s}` : "";
|
|
10
|
+
return /* @__PURE__ */ t(
|
|
11
|
+
"div",
|
|
12
|
+
{
|
|
13
|
+
className: a(m.col, m[c], o.className),
|
|
14
|
+
...o,
|
|
15
|
+
children: r
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
p as GridItem
|
|
21
|
+
};
|
package/index5.js
ADDED
package/index50.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { r as t } from "./react.esm-D8HpDGKP.js";
|
|
3
|
+
import { MultiSelect as a } from "./index80.js";
|
|
4
|
+
const o = [
|
|
5
|
+
"Apple",
|
|
6
|
+
"Banana",
|
|
7
|
+
"Kiwi",
|
|
8
|
+
"Elderflower",
|
|
9
|
+
"Nectarine",
|
|
10
|
+
"Watermelon",
|
|
11
|
+
"Pineapple",
|
|
12
|
+
"Apricot",
|
|
13
|
+
"Cloudberry",
|
|
14
|
+
"Mango",
|
|
15
|
+
"Strawberry",
|
|
16
|
+
"Blueberry",
|
|
17
|
+
"Raspberry",
|
|
18
|
+
"Blackberry",
|
|
19
|
+
"Cherry",
|
|
20
|
+
"Peach",
|
|
21
|
+
"Plum",
|
|
22
|
+
"Grape",
|
|
23
|
+
"Orange",
|
|
24
|
+
"Lemon",
|
|
25
|
+
"Lime",
|
|
26
|
+
"Coconut",
|
|
27
|
+
"Fig",
|
|
28
|
+
"Papaya",
|
|
29
|
+
"Guava",
|
|
30
|
+
"Pomegranate",
|
|
31
|
+
"Dragonfruit",
|
|
32
|
+
"Starfruit",
|
|
33
|
+
"Passionfruit"
|
|
34
|
+
], i = o.map((e) => ({ name: e, id: e.toLocaleLowerCase() }));
|
|
35
|
+
describe("MultiSelect", () => {
|
|
36
|
+
it("should render successfully", () => {
|
|
37
|
+
const { baseElement: e } = t(
|
|
38
|
+
/* @__PURE__ */ r(
|
|
39
|
+
a,
|
|
40
|
+
{
|
|
41
|
+
label: "Label",
|
|
42
|
+
description: "Etikett",
|
|
43
|
+
items: i
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
);
|
|
47
|
+
expect(e).toBeTruthy();
|
|
48
|
+
});
|
|
49
|
+
});
|
package/index51.js
ADDED
package/index52.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { r } from "./react.esm-D8HpDGKP.js";
|
|
3
|
+
import "./index-CorR1LBD.js";
|
|
4
|
+
import { Logo as i } from "./index73.js";
|
|
5
|
+
import { j as t } from "./index-Dl1Q-tbj.js";
|
|
6
|
+
expect.extend(t.toHaveNoViolations);
|
|
7
|
+
describe("given a default Logo", () => {
|
|
8
|
+
let e;
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
e = r(
|
|
11
|
+
/* @__PURE__ */ o(
|
|
12
|
+
a,
|
|
13
|
+
{
|
|
14
|
+
primary: !0,
|
|
15
|
+
background: !0
|
|
16
|
+
}
|
|
17
|
+
)
|
|
18
|
+
);
|
|
19
|
+
}), it("should render successfully", () => {
|
|
20
|
+
expect(e).toBeTruthy();
|
|
21
|
+
}), it("should have no accessibility violations", async () => {
|
|
22
|
+
expect(await t.axe(await e.findByRole("img"))).toHaveNoViolations();
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
const a = (e) => /* @__PURE__ */ o(i, { ...e });
|
package/index53.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import "./index-CorR1LBD.js";
|
|
3
|
+
import { r as n } from "./react.esm-D8HpDGKP.js";
|
|
4
|
+
import { j as t } from "./index-Dl1Q-tbj.js";
|
|
5
|
+
import { LinkButton as a } from "./index78.js";
|
|
6
|
+
expect.extend(t.toHaveNoViolations);
|
|
7
|
+
describe("given a default link", () => {
|
|
8
|
+
let e, i;
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
e = n(/* @__PURE__ */ o(r, { onPress: i }));
|
|
11
|
+
}), it("should have no accessibility violations", async () => {
|
|
12
|
+
expect(await t.axe(e.container)).toHaveNoViolations();
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
const r = (e) => (
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
/* @__PURE__ */ o(a, { ...e, children: "Click" })
|
|
18
|
+
);
|
package/index54.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { r as i } from "./react.esm-D8HpDGKP.js";
|
|
3
|
+
import { Link as o } from "./index77.js";
|
|
4
|
+
describe("Link", () => {
|
|
5
|
+
it("should render successfully", () => {
|
|
6
|
+
const { baseElement: e } = i(/* @__PURE__ */ r(o, { children: "Link" }));
|
|
7
|
+
expect(e).toBeTruthy();
|
|
8
|
+
});
|
|
9
|
+
});
|
package/index55.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { r as o } from "./react.esm-D8HpDGKP.js";
|
|
3
|
+
import { Layout as t } from "./index79.js";
|
|
4
|
+
describe("Sidebar", () => {
|
|
5
|
+
it("should render successfully", () => {
|
|
6
|
+
const { baseElement: e } = o(
|
|
7
|
+
/* @__PURE__ */ r(
|
|
8
|
+
t,
|
|
9
|
+
{
|
|
10
|
+
items: [],
|
|
11
|
+
title: "",
|
|
12
|
+
children: void 0,
|
|
13
|
+
headerChildren: void 0,
|
|
14
|
+
user: { name: "", title: "" },
|
|
15
|
+
app: {
|
|
16
|
+
name: "",
|
|
17
|
+
shortName: "",
|
|
18
|
+
color: void 0
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
)
|
|
22
|
+
);
|
|
23
|
+
expect(e).toBeTruthy();
|
|
24
|
+
});
|
|
25
|
+
});
|
package/index56.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { r as s } from "./react.esm-D8HpDGKP.js";
|
|
3
|
+
import { InfoBanner as t } from "./index72.js";
|
|
4
|
+
describe("InfoBanner", () => {
|
|
5
|
+
it("should render successfully", () => {
|
|
6
|
+
const { baseElement: e } = s(
|
|
7
|
+
/* @__PURE__ */ r(
|
|
8
|
+
t,
|
|
9
|
+
{
|
|
10
|
+
type: "info",
|
|
11
|
+
title: "Title",
|
|
12
|
+
message: "Message"
|
|
13
|
+
}
|
|
14
|
+
)
|
|
15
|
+
);
|
|
16
|
+
expect(e).toBeTruthy();
|
|
17
|
+
});
|
|
18
|
+
});
|
package/index57.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { r as i } from "./react.esm-D8HpDGKP.js";
|
|
3
|
+
import { Grid as t } from "./index48.js";
|
|
4
|
+
describe("Grid", () => {
|
|
5
|
+
it("should render successfully", () => {
|
|
6
|
+
const { baseElement: e } = i(
|
|
7
|
+
/* @__PURE__ */ r(t, { children: /* @__PURE__ */ r("div", { children: "Item" }) })
|
|
8
|
+
);
|
|
9
|
+
expect(e).toBeTruthy();
|
|
10
|
+
});
|
|
11
|
+
});
|
package/index58.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { r as t } from "./react.esm-D8HpDGKP.js";
|
|
3
|
+
import { Flex as m } from "./index46.js";
|
|
4
|
+
import { FlexItem as o } from "./index47.js";
|
|
5
|
+
describe("Flex", () => {
|
|
6
|
+
it("should render successfully", () => {
|
|
7
|
+
const { baseElement: r } = t(
|
|
8
|
+
/* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(o, { children: "Item" }) })
|
|
9
|
+
);
|
|
10
|
+
expect(r).toBeTruthy();
|
|
11
|
+
});
|
|
12
|
+
});
|
package/index59.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { FileUpload as i } from "./index88.js";
|
|
3
|
+
import "./index-CorR1LBD.js";
|
|
4
|
+
import { j as t } from "./index-Dl1Q-tbj.js";
|
|
5
|
+
import { r as a } from "./react.esm-D8HpDGKP.js";
|
|
6
|
+
expect.extend(t.toHaveNoViolations);
|
|
7
|
+
describe("given default fileupload", () => {
|
|
8
|
+
let e;
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
e = a(/* @__PURE__ */ o(r, { label: "Etikett" }));
|
|
11
|
+
}), it("should have no accessibility violations", async () => {
|
|
12
|
+
expect(await t.axe(e.container)).toHaveNoViolations();
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
const r = (e) => /* @__PURE__ */ o(i, { ...e });
|
package/index6.js
ADDED
package/index60.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { r as o } from "./react.esm-D8HpDGKP.js";
|
|
3
|
+
import { Dropdown as s } from "./index76.js";
|
|
4
|
+
describe("Dropdown", () => {
|
|
5
|
+
it("should render successfully", () => {
|
|
6
|
+
const { baseElement: r } = o(/* @__PURE__ */ e(s, {}));
|
|
7
|
+
expect(r).toBeTruthy();
|
|
8
|
+
});
|
|
9
|
+
});
|
package/index61.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { r as t } from "./react.esm-D8HpDGKP.js";
|
|
3
|
+
import { DatePicker as o } from "./index90.js";
|
|
4
|
+
describe("DatePicker", () => {
|
|
5
|
+
it("should render successfully", () => {
|
|
6
|
+
const { baseElement: e } = t(/* @__PURE__ */ r(o, { label: "Välj ett datum" }));
|
|
7
|
+
expect(e).toBeTruthy();
|
|
8
|
+
});
|
|
9
|
+
});
|
package/index62.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { r } from "./react.esm-D8HpDGKP.js";
|
|
3
|
+
import { ComboBox as t, ComboBoxItem as i } from "./index85.js";
|
|
4
|
+
describe("Combobox", () => {
|
|
5
|
+
it("should render successfully", () => {
|
|
6
|
+
const { baseElement: o } = r(
|
|
7
|
+
/* @__PURE__ */ e(
|
|
8
|
+
t,
|
|
9
|
+
{
|
|
10
|
+
description: "Beskrivning",
|
|
11
|
+
label: "Etikett",
|
|
12
|
+
placeholder: "One item...",
|
|
13
|
+
children: /* @__PURE__ */ e(i, { children: "Item A" })
|
|
14
|
+
}
|
|
15
|
+
)
|
|
16
|
+
);
|
|
17
|
+
expect(o).toBeTruthy();
|
|
18
|
+
});
|
|
19
|
+
});
|
package/index63.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { r as a } from "./react.esm-D8HpDGKP.js";
|
|
3
|
+
import "./index-CorR1LBD.js";
|
|
4
|
+
import { C as t } from "./Checkbox-CllWDBxF.js";
|
|
5
|
+
import { j as i } from "./index-Dl1Q-tbj.js";
|
|
6
|
+
expect.extend(i.toHaveNoViolations);
|
|
7
|
+
describe("given a default Checkbox", () => {
|
|
8
|
+
let e;
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
e = a(/* @__PURE__ */ o(r, {}));
|
|
11
|
+
}), it("should have no accessibility violations", async () => {
|
|
12
|
+
expect(await i.axe(e.container)).toHaveNoViolations();
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
const r = (e) => /* @__PURE__ */ o(
|
|
16
|
+
t,
|
|
17
|
+
{
|
|
18
|
+
"aria-label": "basic checkbox",
|
|
19
|
+
...e,
|
|
20
|
+
children: "Click"
|
|
21
|
+
}
|
|
22
|
+
);
|
package/index64.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import "./index-CorR1LBD.js";
|
|
3
|
+
import { r as o } from "./react.esm-D8HpDGKP.js";
|
|
4
|
+
import { j as t } from "./index-Dl1Q-tbj.js";
|
|
5
|
+
import { Card as n } from "./index71.js";
|
|
6
|
+
expect.extend(t.toHaveNoViolations);
|
|
7
|
+
const a = { children: "Läs mer", href: "#" };
|
|
8
|
+
describe("given a default card", () => {
|
|
9
|
+
let e;
|
|
10
|
+
beforeEach(() => {
|
|
11
|
+
e = o(
|
|
12
|
+
/* @__PURE__ */ i(
|
|
13
|
+
r,
|
|
14
|
+
{
|
|
15
|
+
title: "Rubrik",
|
|
16
|
+
content: "Lorem ipsum",
|
|
17
|
+
link: a
|
|
18
|
+
}
|
|
19
|
+
)
|
|
20
|
+
);
|
|
21
|
+
}), it("should have no accessibility violations", async () => {
|
|
22
|
+
expect(await t.axe(e.container)).toHaveNoViolations();
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
describe("given a card with background", () => {
|
|
26
|
+
let e;
|
|
27
|
+
beforeEach(() => {
|
|
28
|
+
e = o(
|
|
29
|
+
/* @__PURE__ */ i(
|
|
30
|
+
r,
|
|
31
|
+
{
|
|
32
|
+
title: "Rubrik",
|
|
33
|
+
content: "Lorem ipsum",
|
|
34
|
+
background: !0,
|
|
35
|
+
link: a
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
);
|
|
39
|
+
}), it("should have no accessibility violations", async () => {
|
|
40
|
+
expect(await t.axe(e.container)).toHaveNoViolations();
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
describe("given a card with image", () => {
|
|
44
|
+
let e;
|
|
45
|
+
beforeEach(() => {
|
|
46
|
+
e = o(
|
|
47
|
+
/* @__PURE__ */ i(
|
|
48
|
+
r,
|
|
49
|
+
{
|
|
50
|
+
title: "Rubrik",
|
|
51
|
+
content: "Lorem ipsum",
|
|
52
|
+
image: { source: "", description: "" },
|
|
53
|
+
link: a
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
);
|
|
57
|
+
}), it("should have no accessibility violations", async () => {
|
|
58
|
+
expect(await t.axe(e.container)).toHaveNoViolations();
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
const r = (e) => /* @__PURE__ */ i(n, { ...e });
|
package/index65.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import "./index-CorR1LBD.js";
|
|
3
|
+
import { r as i } from "./react.esm-D8HpDGKP.js";
|
|
4
|
+
import { Button as r } from "./index69.js";
|
|
5
|
+
import { j as o } from "./index-Dl1Q-tbj.js";
|
|
6
|
+
expect.extend(o.toHaveNoViolations);
|
|
7
|
+
describe("given a default button", () => {
|
|
8
|
+
let e;
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
e = i(/* @__PURE__ */ t(a, { children: "Click me!" }));
|
|
11
|
+
}), it("should have no accessibility violations", async () => {
|
|
12
|
+
expect(await o.axe(e.container)).toHaveNoViolations();
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
const a = (e) => /* @__PURE__ */ t(r, { ...e });
|
package/index66.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { r as s } from "./react.esm-D8HpDGKP.js";
|
|
3
|
+
import { Breadcrumbs as t } from "./index84.js";
|
|
4
|
+
describe("Breadcrumbs", () => {
|
|
5
|
+
it("should render successfully", () => {
|
|
6
|
+
const { baseElement: e } = s(
|
|
7
|
+
/* @__PURE__ */ r(t, { items: [{ title: "Länk", href: "#" }] })
|
|
8
|
+
);
|
|
9
|
+
expect(e).toBeTruthy();
|
|
10
|
+
});
|
|
11
|
+
});
|
package/index67.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsx as t, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import "./index-CorR1LBD.js";
|
|
3
|
+
import { j as n } from "./index-Dl1Q-tbj.js";
|
|
4
|
+
import { r } from "./react.esm-D8HpDGKP.js";
|
|
5
|
+
import { Accordion as c } from "./index40.js";
|
|
6
|
+
import { AccordionItem as l } from "./index41.js";
|
|
7
|
+
import { AccordionTrigger as s } from "./index42.js";
|
|
8
|
+
import { AccordionContent as d } from "./index43.js";
|
|
9
|
+
import "./index44.js";
|
|
10
|
+
expect.extend(n.toHaveNoViolations);
|
|
11
|
+
const h = ["One", "Two", "Three"];
|
|
12
|
+
describe("given a single Accordion", () => {
|
|
13
|
+
let o, e;
|
|
14
|
+
describe("with default orientation=vertical", () => {
|
|
15
|
+
beforeEach(() => {
|
|
16
|
+
o = jest.fn(), e = r(
|
|
17
|
+
/* @__PURE__ */ t(
|
|
18
|
+
a,
|
|
19
|
+
{
|
|
20
|
+
type: "single",
|
|
21
|
+
collapsible: !0,
|
|
22
|
+
onValueChange: o
|
|
23
|
+
}
|
|
24
|
+
)
|
|
25
|
+
);
|
|
26
|
+
}), it("should have no accessibility violations in default state", async () => {
|
|
27
|
+
expect(await n.axe(e.container)).toHaveNoViolations();
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
describe("given a multiple Accordion", () => {
|
|
32
|
+
let o, e;
|
|
33
|
+
beforeEach(() => {
|
|
34
|
+
o = jest.fn(), e = r(
|
|
35
|
+
/* @__PURE__ */ t(
|
|
36
|
+
a,
|
|
37
|
+
{
|
|
38
|
+
type: "multiple",
|
|
39
|
+
onValueChange: o
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
);
|
|
43
|
+
}), it("should have no accessibility violations in default state", async () => {
|
|
44
|
+
expect(await n.axe(e.container)).toHaveNoViolations();
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
const a = (o) => /* @__PURE__ */ t(c, { ...o, children: h.map((e) => /* @__PURE__ */ i(
|
|
48
|
+
l,
|
|
49
|
+
{
|
|
50
|
+
value: e,
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ i(s, { children: [
|
|
53
|
+
"Trigger ",
|
|
54
|
+
e
|
|
55
|
+
] }),
|
|
56
|
+
/* @__PURE__ */ i(d, { children: [
|
|
57
|
+
"Content ",
|
|
58
|
+
e
|
|
59
|
+
] })
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
e
|
|
63
|
+
)) });
|
package/index68.js
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsx as n, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { $ as y, I as k, a as _ } from "./TextField-C_hq9WeT.js";
|
|
3
|
+
import { T as $ } from "./TextField.module-Cwq1FAm7.js";
|
|
4
|
+
import * as E from "react";
|
|
5
|
+
import { c as A } from "./clsx-OuTLNxxd.js";
|
|
6
|
+
import './TextArea.css';const R = '"../theme/tokens.css"', T = '"Inter", sans-serif', W = "#ffdfdf", F = "(max-width: 767px)", I = "#f2f2f2", N = "#e6e6e6", V = "#bfbfbf", j = "#000000", w = "#e62323", B = "#2e7ca5", S = "500", v = "400", D = "#1f1f1f", q = "0 0 0 2px #ffffff, 0 0 0 4px #000000", z = "_textArea_1tbo6_4", G = "_count_1tbo6_40", H = "_countExceeded_1tbo6_48", o = {
|
|
7
|
+
tokens: R,
|
|
8
|
+
display: T,
|
|
9
|
+
signalRed10: W,
|
|
10
|
+
smBreakpoint: F,
|
|
11
|
+
gray10: I,
|
|
12
|
+
gray20: N,
|
|
13
|
+
gray50: V,
|
|
14
|
+
black: j,
|
|
15
|
+
signalRed100: w,
|
|
16
|
+
blue100: B,
|
|
17
|
+
mediumWeight: S,
|
|
18
|
+
regularWeight: v,
|
|
19
|
+
inputText: D,
|
|
20
|
+
focus: q,
|
|
21
|
+
textArea: z,
|
|
22
|
+
count: G,
|
|
23
|
+
countExceeded: H
|
|
24
|
+
}, O = ({
|
|
25
|
+
label: u,
|
|
26
|
+
description: i,
|
|
27
|
+
rows: f,
|
|
28
|
+
maxCharacters: t,
|
|
29
|
+
errorMessage: d,
|
|
30
|
+
showCounter: g,
|
|
31
|
+
validate: r,
|
|
32
|
+
...p
|
|
33
|
+
}) => {
|
|
34
|
+
const [s, m] = E.useState(""), a = (e) => {
|
|
35
|
+
const c = e.target.value;
|
|
36
|
+
m(c);
|
|
37
|
+
}, x = () => t ? /* @__PURE__ */ l(
|
|
38
|
+
"span",
|
|
39
|
+
{
|
|
40
|
+
className: A(
|
|
41
|
+
o.count,
|
|
42
|
+
s.length > t && o.countExceeded
|
|
43
|
+
),
|
|
44
|
+
children: [
|
|
45
|
+
s.length,
|
|
46
|
+
" / ",
|
|
47
|
+
t
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
) : g ? /* @__PURE__ */ n("span", { className: o.count, children: s.length }) : null, h = (e) => {
|
|
51
|
+
const c = t && e.length > t ? `Du har angett ${e.length - t} tecken för mycket. Fältet är begränsat till ${t} tecken.` : null, b = r ? r(e) : null;
|
|
52
|
+
return c || b || !0;
|
|
53
|
+
};
|
|
54
|
+
return /* @__PURE__ */ n(
|
|
55
|
+
y,
|
|
56
|
+
{
|
|
57
|
+
className: $.inputField,
|
|
58
|
+
validate: h,
|
|
59
|
+
...p,
|
|
60
|
+
children: /* @__PURE__ */ l(
|
|
61
|
+
k,
|
|
62
|
+
{
|
|
63
|
+
label: u,
|
|
64
|
+
description: i,
|
|
65
|
+
errorMessage: d,
|
|
66
|
+
children: [
|
|
67
|
+
/* @__PURE__ */ n(x, {}),
|
|
68
|
+
/* @__PURE__ */ n(
|
|
69
|
+
_,
|
|
70
|
+
{
|
|
71
|
+
className: o.textArea,
|
|
72
|
+
rows: f,
|
|
73
|
+
onFocus: a,
|
|
74
|
+
onChange: a
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
};
|
|
83
|
+
export {
|
|
84
|
+
O as TextArea
|
|
85
|
+
};
|
package/index69.js
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsx as c, jsxs as f, Fragment as m } from "react/jsx-runtime";
|
|
2
|
+
import { $ as _ } from "./Button-CCevm2s3.js";
|
|
3
|
+
import { c as g } from "./clsx-OuTLNxxd.js";
|
|
4
|
+
import './Button.css';const y = '"../theme/tokens.css"', u = "#143c50", b = "#25607f", h = "#4289ad", p = '"Inter", sans-serif', R = "1rem", k = "500", x = "#ffffff", w = "#bfbfbf", B = "#f2f2f2", v = "#e6e6e6", $ = "#000000", z = "undefined", S = "(max-width: 767px)", j = "0 0 0 2px #ffffff, 0 0 0 4px #000000", W = "#e62323", F = "#b31b1b", I = "#801313", N = "_button_1tedv_4", q = "_primary_1tedv_36", A = "_secondary_1tedv_42", D = "_tertiary_1tedv_66", E = "_iconBtn_1tedv_88", G = "_danger_1tedv_109", H = "_iconRight_1tedv_131", J = "_fullwidth_1tedv_135", K = "_small_1tedv_139", t = {
|
|
5
|
+
tokens: y,
|
|
6
|
+
blue150: u,
|
|
7
|
+
blue130: b,
|
|
8
|
+
blue90: h,
|
|
9
|
+
display: p,
|
|
10
|
+
desktopSize: R,
|
|
11
|
+
mediumWeight: k,
|
|
12
|
+
white: x,
|
|
13
|
+
gray50: w,
|
|
14
|
+
gray10: B,
|
|
15
|
+
gray20: v,
|
|
16
|
+
black: $,
|
|
17
|
+
medium: z,
|
|
18
|
+
smBreakpoint: S,
|
|
19
|
+
focus: j,
|
|
20
|
+
signalRed100: W,
|
|
21
|
+
signalRed130: F,
|
|
22
|
+
signalRed150: I,
|
|
23
|
+
button: N,
|
|
24
|
+
primary: q,
|
|
25
|
+
secondary: A,
|
|
26
|
+
tertiary: D,
|
|
27
|
+
iconBtn: E,
|
|
28
|
+
danger: G,
|
|
29
|
+
iconRight: H,
|
|
30
|
+
fullwidth: J,
|
|
31
|
+
small: K
|
|
32
|
+
}, P = ({
|
|
33
|
+
variant: e = "primary",
|
|
34
|
+
fullwidth: i,
|
|
35
|
+
className: r,
|
|
36
|
+
iconPlacement: d,
|
|
37
|
+
size: n,
|
|
38
|
+
icon: s,
|
|
39
|
+
iconSize: a,
|
|
40
|
+
...o
|
|
41
|
+
}) => {
|
|
42
|
+
const l = n === "small" ? 14 : a || 20;
|
|
43
|
+
return /* @__PURE__ */ c(
|
|
44
|
+
_,
|
|
45
|
+
{
|
|
46
|
+
className: g(
|
|
47
|
+
t.button,
|
|
48
|
+
e === "primary" && t.primary,
|
|
49
|
+
e === "secondary" && t.secondary,
|
|
50
|
+
e === "tertiary" && t.tertiary,
|
|
51
|
+
e === "danger" && t.danger,
|
|
52
|
+
e === "icon" && t.iconBtn,
|
|
53
|
+
i && t.fullwidth,
|
|
54
|
+
n === "small" && t.small,
|
|
55
|
+
d === "right" && t.iconRight,
|
|
56
|
+
r
|
|
57
|
+
),
|
|
58
|
+
...o,
|
|
59
|
+
children: /* @__PURE__ */ f(m, { children: [
|
|
60
|
+
s && /* @__PURE__ */ c(
|
|
61
|
+
s,
|
|
62
|
+
{
|
|
63
|
+
"aria-hidden": !0,
|
|
64
|
+
size: l
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
o.children
|
|
68
|
+
] })
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
};
|
|
72
|
+
export {
|
|
73
|
+
P as Button
|
|
74
|
+
};
|