@midas-ds/components 1.0.3 → 1.1.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 (145) hide show
  1. package/{Button-B4vMZbC6.js → Button-DL6nqUco.js} +22 -22
  2. package/CHANGELOG.md +6 -1
  3. package/{Checkbox-DnKWanep.js → Checkbox-q0dugR2t.js} +8 -8
  4. package/{Collection-COLWgm24.js → Collection-KMFfVuzU.js} +2 -2
  5. package/{Dialog-Cb6toyXO.js → Dialog-D6Bqrpn-.js} +170 -169
  6. package/Disclosure-dAZYXyTH.js +225 -0
  7. package/Disclosure.css +1 -0
  8. package/{FocusScope-C8i7CH6y.js → FocusScope-B7CkxXNC.js} +1 -1
  9. package/{Form-BQQs3jUk.js → Form-BWBjJC6v.js} +42 -42
  10. package/{Group-CdwXhx8Q.js → Group-D7_8007y.js} +10 -10
  11. package/Heading-RCRHv6hd.js +15 -0
  12. package/{Hidden-DngIphiL.js → Hidden-CVlUgUJM.js} +1 -1
  13. package/{Link-iAZLB3RI.js → Link-BnQvB-hH.js} +8 -8
  14. package/{ListBox-BKWkIIm6.js → ListBox-DBBiqvcR.js} +72 -72
  15. package/{ListKeyboardDelegate-BH-K5hyq.js → ListKeyboardDelegate-gCXy-Xnn.js} +2 -2
  16. package/{PressResponder-Cz-TRBHO.js → PressResponder-B4g56kDz.js} +5 -5
  17. package/{RSPContexts-EOiWkKOf.js → RSPContexts-BW2SEIqe.js} +2 -2
  18. package/{SelectionManager-8o40f7mx.js → SelectionManager-BfXUE1qg.js} +113 -129
  19. package/{Separator-BlvmQjwz.js → Separator-BBX9m2O2.js} +2 -2
  20. package/{Tag--W5TgxmK.js → Tag-DWt0koFj.js} +74 -74
  21. package/Text-BCF0xvqL.js +15 -0
  22. package/{TextField-DeK_yiK-.js → TextField-CX4eOQf6.js} +33 -33
  23. package/{TextField.module-0-u4LVPp.js → TextField.module-DdICj682.js} +7 -7
  24. package/{VisuallyHidden-CFx06Bae.js → VisuallyHidden-Dhr5caPC.js} +1 -1
  25. package/accordion/Accordion.d.ts +8 -8
  26. package/accordion/AccordionItem.d.ts +11 -3
  27. package/accordion/index.d.ts +0 -3
  28. package/{context-Bnqknrce.js → context-BpJLnOuu.js} +11 -11
  29. package/global.css +1 -0
  30. package/index.d.ts +1 -0
  31. package/index.js +105 -110
  32. package/index10.js +1 -1
  33. package/index11.js +1 -1
  34. package/index12.js +1 -1
  35. package/index13.js +1 -1
  36. package/index14.js +1 -1
  37. package/index15.js +2 -2
  38. package/index16.js +2 -2
  39. package/index17.js +1 -1
  40. package/index18.js +1 -1
  41. package/index19.js +2 -2
  42. package/index2.js +1 -1
  43. package/index20.js +2 -2
  44. package/index21.js +1 -1
  45. package/index22.js +1 -1
  46. package/index23.js +1 -1
  47. package/index24.js +1 -1
  48. package/index25.js +2 -2
  49. package/index26.js +2 -2
  50. package/index27.js +2 -2
  51. package/index28.js +1 -1
  52. package/index29.js +2 -8
  53. package/index3.js +1 -1
  54. package/index30.js +17 -16
  55. package/index31.js +1 -1
  56. package/index32.js +1 -1
  57. package/index33.js +1 -1
  58. package/index34.js +2 -2
  59. package/index36.js +1 -1
  60. package/index37.js +1 -1
  61. package/index38.js +1 -1
  62. package/index39.js +1 -1
  63. package/index4.js +1 -1
  64. package/index40.js +19 -12
  65. package/index41.js +61 -14
  66. package/index42.js +44 -22
  67. package/index43.js +13 -11
  68. package/index44.js +25 -4
  69. package/index45.js +16 -51
  70. package/index46.js +19 -16
  71. package/index47.js +49 -27
  72. package/index48.js +5 -18
  73. package/index49.js +25 -21
  74. package/index5.js +1 -1
  75. package/index50.js +16 -47
  76. package/index51.js +7 -3
  77. package/index52.js +18 -18
  78. package/index53.js +16 -16
  79. package/index54.js +5 -3
  80. package/index55.js +7 -20
  81. package/index56.js +13 -16
  82. package/index57.js +6 -8
  83. package/index58.js +5 -8
  84. package/index59.js +17 -13
  85. package/index6.js +1 -1
  86. package/index60.js +20 -7
  87. package/index61.js +59 -7
  88. package/index62.js +13 -17
  89. package/index63.js +9 -20
  90. package/index64.js +38 -46
  91. package/index65.js +85 -15
  92. package/index66.js +74 -11
  93. package/index67.js +23 -62
  94. package/index68.js +64 -80
  95. package/index69.js +68 -62
  96. package/index7.js +1 -1
  97. package/index70.js +138 -22
  98. package/index71.js +66 -65
  99. package/index72.js +40 -78
  100. package/index73.js +75 -133
  101. package/index74.js +69 -68
  102. package/index75.js +96 -34
  103. package/index76.js +258 -65
  104. package/index77.js +715 -63
  105. package/index78.js +478 -93
  106. package/index79.js +303 -263
  107. package/index8.js +1 -1
  108. package/index80.js +343 -677
  109. package/index81.js +242 -479
  110. package/index82.js +1332 -282
  111. package/index83.js +966 -346
  112. package/index84.js +344 -210
  113. package/index85.js +2024 -1286
  114. package/index86.js +2314 -955
  115. package/index87.js +6785 -340
  116. package/index88.js +15 -2099
  117. package/index89.js +12 -2367
  118. package/index9.js +1 -1
  119. package/index90.js +4 -6834
  120. package/index91.js +7 -15
  121. package/package.json +1 -1
  122. package/useControlledState-Kv9K2AYu.js +30 -0
  123. package/{useDescription-BPs7eRff.js → useDescription-B7stiK3j.js} +1 -1
  124. package/useEvent-Xk5kn5Ns.js +21 -0
  125. package/{useField-Dz62UHCP.js → useField-DMzJIIN4.js} +5 -5
  126. package/{useFilter-ViwzkzZe.js → useFilter-Bt9dbV1U.js} +1 -1
  127. package/{useFocusRing-BKGhL91C.js → useFocusRing-9PXyKy2A.js} +26 -26
  128. package/{useFocusable-CRSmYEQc.js → useFocusable-CcEBZe40.js} +1 -1
  129. package/{useGridSelectionCheckbox-CVEvUCJL.js → useGridSelectionCheckbox-DYgEnElE.js} +3 -3
  130. package/{useHasTabbableChild-C8y4fwiY.js → useHasTabbableChild-D6DwR81L.js} +5 -5
  131. package/{useHighlightSelectionDescription-CD74uzLh.js → useHighlightSelectionDescription-WYAbP4No.js} +4 -4
  132. package/useLabels-9zaZ9oa0.js +17 -0
  133. package/{useListState-DKnP5TB5.js → useListState-BfTeKTk5.js} +1 -1
  134. package/{useLocalizedStringFormatter-DsZ-ZWSk.js → useLocalizedStringFormatter-BlCbn-hX.js} +1 -1
  135. package/{useSingleSelectListState-BHTLh8Ob.js → useSingleSelectListState-DPkaL0la.js} +2 -2
  136. package/Text-CQPW6xs7.js +0 -15
  137. package/accordion/AccordionContent.d.ts +0 -3
  138. package/accordion/AccordionTagContext.d.ts +0 -3
  139. package/accordion/AccordionTrigger.d.ts +0 -3
  140. package/index-DK9ZACEc.js +0 -642
  141. package/index.css +0 -1
  142. package/index92.js +0 -14
  143. package/index93.js +0 -6
  144. package/index94.js +0 -9
  145. package/useControlledState-DrAoodI6.js +0 -45
package/index57.js CHANGED
@@ -1,11 +1,9 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { r as i } from "./react.esm-sMU8Z7rL.js";
3
- import { Grid as t } from "./index48.js";
4
- describe("Grid", () => {
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { r as o } from "./react.esm-sMU8Z7rL.js";
3
+ import { Dropdown as s } from "./index73.js";
4
+ describe("Dropdown", () => {
5
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();
6
+ const { baseElement: r } = o(/* @__PURE__ */ e(s, {}));
7
+ expect(r).toBeTruthy();
10
8
  });
11
9
  });
package/index58.js CHANGED
@@ -1,12 +1,9 @@
1
- import { jsx as e } from "react/jsx-runtime";
1
+ import { jsx as r } from "react/jsx-runtime";
2
2
  import { r as t } from "./react.esm-sMU8Z7rL.js";
3
- import { Flex as m } from "./index46.js";
4
- import { FlexItem as o } from "./index47.js";
5
- describe("Flex", () => {
3
+ import { DatePicker as o } from "./index87.js";
4
+ describe("DatePicker", () => {
6
5
  it("should render successfully", () => {
7
- const { baseElement: r } = t(
8
- /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(o, { children: "Item" }) })
9
- );
10
- expect(r).toBeTruthy();
6
+ const { baseElement: e } = t(/* @__PURE__ */ r(o, { label: "Välj ett datum" }));
7
+ expect(e).toBeTruthy();
11
8
  });
12
9
  });
package/index59.js CHANGED
@@ -1,15 +1,19 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { FileUpload as i } from "./index88.js";
3
- import "./index-BPdc9gJ8.js";
4
- import { j as t } from "./index-KSgQWWiy.js";
5
- import { r as a } from "./react.esm-sMU8Z7rL.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();
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { r } from "./react.esm-sMU8Z7rL.js";
3
+ import { ComboBox as t, ComboBoxItem as i } from "./index82.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();
13
18
  });
14
19
  });
15
- const r = (e) => /* @__PURE__ */ o(i, { ...e });
package/index6.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Tabs as a } from "./index83.js";
1
+ import { Tabs as a } from "./index80.js";
2
2
  export {
3
3
  a as Tabs
4
4
  };
package/index60.js CHANGED
@@ -1,9 +1,22 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { r as o } from "./react.esm-sMU8Z7rL.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();
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { r as a } from "./react.esm-sMU8Z7rL.js";
3
+ import "./index-BPdc9gJ8.js";
4
+ import { C as t } from "./Checkbox-q0dugR2t.js";
5
+ import { j as i } from "./index-KSgQWWiy.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();
8
13
  });
9
14
  });
15
+ const r = (e) => /* @__PURE__ */ o(
16
+ t,
17
+ {
18
+ "aria-label": "basic checkbox",
19
+ ...e,
20
+ children: "Click"
21
+ }
22
+ );
package/index61.js CHANGED
@@ -1,9 +1,61 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { r as t } from "./react.esm-sMU8Z7rL.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();
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import "./index-BPdc9gJ8.js";
3
+ import { r as o } from "./react.esm-sMU8Z7rL.js";
4
+ import { j as t } from "./index-KSgQWWiy.js";
5
+ import { Card as n } from "./index68.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();
8
23
  });
9
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/index62.js CHANGED
@@ -1,19 +1,15 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { r } from "./react.esm-sMU8Z7rL.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();
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import "./index-BPdc9gJ8.js";
3
+ import { r as i } from "./react.esm-sMU8Z7rL.js";
4
+ import { Button as r } from "./index66.js";
5
+ import { j as o } from "./index-KSgQWWiy.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();
18
13
  });
19
14
  });
15
+ const a = (e) => /* @__PURE__ */ t(r, { ...e });
package/index63.js CHANGED
@@ -1,22 +1,11 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { r as a } from "./react.esm-sMU8Z7rL.js";
3
- import "./index-BPdc9gJ8.js";
4
- import { C as t } from "./Checkbox-DnKWanep.js";
5
- import { j as i } from "./index-KSgQWWiy.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();
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { r as s } from "./react.esm-sMU8Z7rL.js";
3
+ import { Breadcrumbs as t } from "./index81.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();
13
10
  });
14
11
  });
15
- const r = (e) => /* @__PURE__ */ o(
16
- t,
17
- {
18
- "aria-label": "basic checkbox",
19
- ...e,
20
- children: "Click"
21
- }
22
- );
package/index64.js CHANGED
@@ -1,61 +1,53 @@
1
- import { jsx as i } from "react/jsx-runtime";
1
+ import { jsx as o, jsxs as r } from "react/jsx-runtime";
2
2
  import "./index-BPdc9gJ8.js";
3
- import { r as o } from "./react.esm-sMU8Z7rL.js";
4
3
  import { j as t } from "./index-KSgQWWiy.js";
5
- import { Card as n } from "./index71.js";
4
+ import { r as n } from "./react.esm-sMU8Z7rL.js";
5
+ import { Accordion as c } from "./index40.js";
6
+ import { AccordionItem as s } from "./index41.js";
6
7
  expect.extend(t.toHaveNoViolations);
7
- const a = { children: "Läs mer", href: "#" };
8
- describe("given a default card", () => {
8
+ const l = ["One", "Two", "Three"];
9
+ describe("given a single Accordion", () => {
9
10
  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();
11
+ describe("with default orientation=vertical", () => {
12
+ beforeEach(() => {
13
+ e = n(
14
+ /* @__PURE__ */ o(
15
+ a,
16
+ {
17
+ variant: "uncontained",
18
+ type: "single"
19
+ }
20
+ )
21
+ );
22
+ }), it("should have no accessibility violations in default state", async () => {
23
+ expect(await t.axe(e.container)).toHaveNoViolations();
24
+ });
41
25
  });
42
26
  });
43
- describe("given a card with image", () => {
27
+ describe("given a multiple Accordion", () => {
44
28
  let e;
45
29
  beforeEach(() => {
46
- e = o(
47
- /* @__PURE__ */ i(
48
- r,
30
+ e = n(
31
+ /* @__PURE__ */ o(
32
+ a,
49
33
  {
50
- title: "Rubrik",
51
- content: "Lorem ipsum",
52
- image: { source: "", description: "" },
53
- link: a
34
+ variant: "uncontained",
35
+ type: "multiple"
54
36
  }
55
37
  )
56
38
  );
57
- }), it("should have no accessibility violations", async () => {
39
+ }), it("should have no accessibility violations in default state", async () => {
58
40
  expect(await t.axe(e.container)).toHaveNoViolations();
59
41
  });
60
42
  });
61
- const r = (e) => /* @__PURE__ */ i(n, { ...e });
43
+ const a = (e) => /* @__PURE__ */ o(c, { ...e, children: l.map((i) => /* @__PURE__ */ r(
44
+ s,
45
+ {
46
+ title: "En öppningsbar panel " + i.toLocaleLowerCase(),
47
+ children: [
48
+ "Innehåll i öppningsbarpanel ",
49
+ i
50
+ ]
51
+ },
52
+ i
53
+ )) });
package/index65.js CHANGED
@@ -1,15 +1,85 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import "./index-BPdc9gJ8.js";
3
- import { r as i } from "./react.esm-sMU8Z7rL.js";
4
- import { Button as r } from "./index69.js";
5
- import { j as o } from "./index-KSgQWWiy.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 });
1
+ import { jsx as n, jsxs as l } from "react/jsx-runtime";
2
+ import { $ as y, I as $, a as k } from "./TextField-CX4eOQf6.js";
3
+ import { T as _ } from "./TextField.module-DdICj682.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", S = "#bfbfbf", V = "#000000", j = "#e62323", w = "#2e7ca5", B = "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: S,
14
+ black: V,
15
+ signalRed100: j,
16
+ blue100: w,
17
+ mediumWeight: B,
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, b = (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, h = r ? r(e) : null;
52
+ return c || h || !0;
53
+ };
54
+ return /* @__PURE__ */ n(
55
+ y,
56
+ {
57
+ className: _.inputField,
58
+ validate: b,
59
+ ...p,
60
+ children: /* @__PURE__ */ l(
61
+ $,
62
+ {
63
+ label: u,
64
+ description: i,
65
+ errorMessage: d,
66
+ children: [
67
+ /* @__PURE__ */ n(x, {}),
68
+ /* @__PURE__ */ n(
69
+ k,
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/index66.js CHANGED
@@ -1,11 +1,74 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { r as s } from "./react.esm-sMU8Z7rL.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
- });
1
+ import { jsx as c, jsxs as f, Fragment as m } from "react/jsx-runtime";
2
+ import { $ as _ } from "./Button-DL6nqUco.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
+ };
package/index67.js CHANGED
@@ -1,63 +1,24 @@
1
- import { jsx as t, jsxs as i } from "react/jsx-runtime";
2
- import "./index-BPdc9gJ8.js";
3
- import { j as n } from "./index-KSgQWWiy.js";
4
- import { r } from "./react.esm-sMU8Z7rL.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,
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { c as e } from "./clsx-OuTLNxxd.js";
3
+ import './ButtonGroup.css';const p = '"../theme/tokens.css"', a = "(max-width: 767px)", u = "_buttonGroup_5pd8y_4", c = {
4
+ tokens: p,
5
+ smBreakpoint: a,
6
+ buttonGroup: u
7
+ }, l = ({
8
+ children: o,
9
+ className: t,
10
+ "aria-label": s,
11
+ ...r
12
+ }) => /* @__PURE__ */ n(
13
+ "div",
49
14
  {
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
- )) });
15
+ role: "group",
16
+ "aria-label": s,
17
+ className: e(c.buttonGroup, t),
18
+ ...r,
19
+ children: o
20
+ }
21
+ );
22
+ export {
23
+ l as ButtonGroup
24
+ };