@midas-ds/components 17.2.6 → 17.3.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 (106) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/accordion/index.js +1 -1
  3. package/assets/AccordionItem.css +1 -1
  4. package/assets/Button.css +1 -1
  5. package/assets/Checkbox.css +1 -1
  6. package/assets/ComboBox.css +1 -1
  7. package/assets/DateField.css +1 -1
  8. package/assets/DateRangePicker.css +1 -1
  9. package/assets/Dialog.css +1 -1
  10. package/assets/Heading.css +1 -1
  11. package/assets/LinkButton.css +1 -1
  12. package/assets/ListBox.css +1 -1
  13. package/assets/ListBoxEmptyState.css +1 -1
  14. package/assets/Popover.css +1 -1
  15. package/assets/RangeCalendar.css +1 -1
  16. package/assets/SearchField.css +1 -1
  17. package/assets/Select.css +1 -1
  18. package/assets/Separator.css +1 -1
  19. package/assets/Skeleton.css +1 -1
  20. package/assets/TabList.css +1 -1
  21. package/assets/Table.css +1 -1
  22. package/assets/TagGroup.css +1 -1
  23. package/assets/Text.css +1 -1
  24. package/assets/TextField.css +1 -1
  25. package/assets/Tooltip.css +1 -1
  26. package/assets/default.css +1 -1
  27. package/button/index.js +1 -1
  28. package/calendar/index.js +1 -1
  29. package/card/index.js +1 -1
  30. package/checkbox/index.js +2 -2
  31. package/chunks/AccordionItem-BuUIdVd_.js +129 -0
  32. package/chunks/{Button-CaLOUTDO.js → Button-BhIvfqOc.js} +1 -1
  33. package/chunks/Button.module-BW0TvYZ2.js +14 -0
  34. package/chunks/{Card-DMSnokPn.js → Card-CVwiT9zm.js} +1 -1
  35. package/chunks/{Checkbox-CRLj7_Ox.js → Checkbox-sAkQe7Q9.js} +18 -18
  36. package/chunks/{CheckboxGroup-DooCBqUG.js → CheckboxGroup-DGVV0X_Z.js} +4 -4
  37. package/chunks/{ClearButton-DPm_d7SL.js → ClearButton-DBr9Zfwq.js} +1 -1
  38. package/chunks/{ColorSchemeSwitch-DOQ0yjtt.js → ColorSchemeSwitch-DkY8VTVR.js} +1 -1
  39. package/chunks/ComboBox-Dx4GD2oe.js +102 -0
  40. package/chunks/{DateField-6CclHfL2.js → DateField-h3l0qG7u.js} +23 -23
  41. package/chunks/{DateRangePicker-BoL-sn9u.js → DateRangePicker-BCZ6i1w0.js} +27 -27
  42. package/chunks/{Dialog-BHxDzbf8.js → Dialog-DVff9MDd.js} +17 -17
  43. package/chunks/{FieldError-BMTrvSof.js → FieldError-krpMBtie.js} +1 -1
  44. package/chunks/Heading-nfcRc2QF.js +38 -0
  45. package/chunks/{InfoBanner-C4HnaXQO.js → InfoBanner-otmuemqy.js} +1 -1
  46. package/chunks/{Label-6GZmmff9.js → Label-s4J9sYdy.js} +2 -2
  47. package/chunks/{Layout-BclBqFzc.js → Layout-hXzqx4cY.js} +2 -2
  48. package/chunks/{LinkButton-B1zayj7k.js → LinkButton-DJ-D5PkB.js} +15 -15
  49. package/chunks/{ListBox-D5BBeZWL.js → ListBox-CDlOUvzJ.js} +13 -13
  50. package/chunks/{ListBoxEmptyState-_Cn38cQ6.js → ListBoxEmptyState-CXKkWQy1.js} +3 -3
  51. package/chunks/{ListBoxHeader-CL9bFH22.js → ListBoxHeader-DSYdXl2I.js} +1 -1
  52. package/chunks/{Popover-BcEtFiU1.js → Popover-CaP4LFhg.js} +12 -12
  53. package/chunks/{ProgressBar-Dg0JMQ71.js → ProgressBar-acc8946-.js} +1 -1
  54. package/chunks/{Radio-CAIyBgBp.js → Radio-DjivEe-_.js} +3 -3
  55. package/chunks/{RangeCalendar-DIMxoHhy.js → RangeCalendar-LheFd9WF.js} +26 -26
  56. package/chunks/SearchField-1DYv0w4b.js +128 -0
  57. package/chunks/Select-CV0H13h-.js +222 -0
  58. package/chunks/Separator-CkVOLF6I.js +76 -0
  59. package/chunks/{Skeleton-DqIHQLQl.js → Skeleton-D6mxKxuu.js} +22 -22
  60. package/chunks/{TabList-BaR443mu.js → TabList-BHX-cuhB.js} +20 -20
  61. package/chunks/{Table-UbdCFrkS.js → Table-Bg-AKi7d.js} +50 -50
  62. package/chunks/{TagGroup-CWe0P76-.js → TagGroup-BscTXQ_E.js} +29 -29
  63. package/chunks/{Text-BuXvuoqM.js → Text-D0r_W4lH.js} +16 -16
  64. package/chunks/{TextArea-BQuztcdA.js → TextArea-CBRE_gsN.js} +5 -5
  65. package/chunks/TextField.module-BDIbEV87.js +12 -0
  66. package/chunks/{Toast-UPM-1ipu.js → Toast-Cxm230CK.js} +1 -1
  67. package/chunks/{ToggleButtonGroup-CXKTrLbb.js → ToggleButtonGroup-Bv9xpwTT.js} +1 -1
  68. package/chunks/{Tooltip-rDmOkGmX.js → Tooltip-C1bbgr2l.js} +12 -12
  69. package/clear-button/index.js +1 -1
  70. package/color-scheme-switch/index.js +1 -1
  71. package/combobox/index.js +1 -1
  72. package/date-field/index.js +1 -1
  73. package/date-picker/index.js +1 -1
  74. package/field-error/index.js +1 -1
  75. package/heading/index.js +1 -1
  76. package/index.js +36 -36
  77. package/info-banner/index.js +1 -1
  78. package/label/index.js +1 -1
  79. package/layout/index.js +1 -1
  80. package/link-button/index.js +1 -1
  81. package/list-box/index.js +3 -3
  82. package/menu/index.js +1 -1
  83. package/modal/index.js +1 -1
  84. package/package.json +2 -2
  85. package/popover/index.js +1 -1
  86. package/progress-bar/index.js +1 -1
  87. package/radio/index.js +1 -1
  88. package/search-field/index.js +1 -1
  89. package/select/index.js +1 -1
  90. package/skeleton/index.js +1 -1
  91. package/table/index.js +1 -1
  92. package/tabs/index.js +1 -1
  93. package/tag/index.js +1 -1
  94. package/text/index.js +1 -1
  95. package/textfield/index.js +1 -1
  96. package/toast/index.js +1 -1
  97. package/toggle-button/index.js +1 -1
  98. package/tooltip/index.js +1 -1
  99. package/chunks/AccordionItem-CSvARy63.js +0 -129
  100. package/chunks/Button.module-Cm0H98vy.js +0 -14
  101. package/chunks/ComboBox-DnqZjAqe.js +0 -102
  102. package/chunks/Heading-D8tNNJkt.js +0 -38
  103. package/chunks/SearchField-C_OjgTE0.js +0 -128
  104. package/chunks/Select-D7JfpIUT.js +0 -222
  105. package/chunks/Separator-XIzn8lsq.js +0 -76
  106. package/chunks/TextField.module-DmV0iI3P.js +0 -12
package/card/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C, a as d, b as s, c as e, d as t, e as n, f as o } from "../chunks/Card-DMSnokPn.js";
1
+ import { C, a as d, b as s, c as e, d as t, e as n, f as o } from "../chunks/Card-CVwiT9zm.js";
2
2
  export {
3
3
  C as Card,
4
4
  d as CardActionArea,
package/checkbox/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { C as e } from "../chunks/Checkbox-CRLj7_Ox.js";
2
- import { C } from "../chunks/CheckboxGroup-DooCBqUG.js";
1
+ import { C as e } from "../chunks/Checkbox-sAkQe7Q9.js";
2
+ import { C } from "../chunks/CheckboxGroup-DGVV0X_Z.js";
3
3
  export {
4
4
  e as Checkbox,
5
5
  C as CheckboxGroup
@@ -0,0 +1,129 @@
1
+ 'use client';
2
+ import { jsx as n, jsxs as m } from "react/jsx-runtime";
3
+ import { c as _ } from "./clsx-AexbMWKp.js";
4
+ import { DisclosureGroup as v, Disclosure as x, DisclosurePanel as C } from "react-aria-components";
5
+ import { createContext as I, useContext as N, useEffect as B } from "react";
6
+ import { B as b } from "./Button-BhIvfqOc.js";
7
+ import { H as k } from "./Heading-nfcRc2QF.js";
8
+ import { F as w } from "./FeedbackStatusIcon-X9Bjgeta.js";
9
+ import { C as A } from "./chevron-down-BBFYYzZq.js";
10
+ import '../assets/AccordionItem.css';const T = "_root_17bdp_1", D = "_contained_17bdp_5", a = {
11
+ root: T,
12
+ contained: D
13
+ }, d = I(void 0), et = ({
14
+ children: o,
15
+ className: s,
16
+ isContained: i,
17
+ size: c = "large",
18
+ ...e
19
+ }) => /* @__PURE__ */ n(d.Provider, { value: { isContained: i, size: c }, children: /* @__PURE__ */ n(
20
+ v,
21
+ {
22
+ className: _(
23
+ a.root,
24
+ i ? a.contained : a.uncontained,
25
+ s
26
+ ),
27
+ ...e,
28
+ children: o
29
+ }
30
+ ) }), M = "_item_1l4iy_1", j = "_contained_1l4iy_18", z = "_medium_1l4iy_28", F = "_success_1l4iy_33", H = "_warning_1l4iy_39", P = "_info_1l4iy_45", S = "_important_1l4iy_51", E = "_triggerButton_1l4iy_62", G = "_triggerText_1l4iy_66", R = "_trigger_1l4iy_62", W = "_triggerMainContent_1l4iy_77", $ = "_chevronIcon_1l4iy_94", q = "_statusIcon_1l4iy_100", J = "_panel_1l4iy_122", K = "_content_1l4iy_130", L = "_hasBackground_1l4iy_135", O = "_header_1l4iy_139", t = {
31
+ item: M,
32
+ contained: j,
33
+ medium: z,
34
+ success: F,
35
+ warning: H,
36
+ info: P,
37
+ important: S,
38
+ triggerButton: E,
39
+ triggerText: G,
40
+ trigger: R,
41
+ triggerMainContent: W,
42
+ " ": "_ _1l4iy_1",
43
+ chevronIcon: $,
44
+ statusIcon: q,
45
+ panel: J,
46
+ content: K,
47
+ hasBackground: L,
48
+ header: O
49
+ }, ot = ({
50
+ title: o,
51
+ children: s,
52
+ className: i,
53
+ headingLevel: c = "h2",
54
+ type: e,
55
+ hasBackground: g = !0,
56
+ size: u = "large",
57
+ isContained: h,
58
+ iconAriaLabel: y,
59
+ ...f
60
+ }) => {
61
+ const l = N(d), r = h ?? l?.isContained ?? !1, p = typeof o == "object";
62
+ return B(() => {
63
+ e && !r && console.warn(
64
+ "AccordionItem: When 'type' is set, it is recommended to also set 'isContained' to true for visual consistency."
65
+ );
66
+ }, [e, r]), /* @__PURE__ */ m(
67
+ x,
68
+ {
69
+ ...f,
70
+ className: _(
71
+ t.item,
72
+ e && t[e],
73
+ (u === "medium" || l?.size === "medium") && t.medium,
74
+ r && t.contained,
75
+ i
76
+ ),
77
+ children: [
78
+ /* @__PURE__ */ n("div", { className: t.trigger, children: /* @__PURE__ */ m(
79
+ b,
80
+ {
81
+ className: t.triggerButton,
82
+ slot: "trigger",
83
+ variant: "icon",
84
+ children: [
85
+ /* @__PURE__ */ n(
86
+ A,
87
+ {
88
+ size: 20,
89
+ className: t.chevronIcon
90
+ }
91
+ ),
92
+ /* @__PURE__ */ n("div", { className: t.triggerMainContent, children: p ? o : /* @__PURE__ */ n(
93
+ k,
94
+ {
95
+ level: 3,
96
+ elementType: c,
97
+ className: t.triggerText,
98
+ children: o
99
+ }
100
+ ) }),
101
+ e && /* @__PURE__ */ n(
102
+ w,
103
+ {
104
+ "aria-label": y,
105
+ className: t.statusIcon,
106
+ status: e
107
+ }
108
+ )
109
+ ]
110
+ }
111
+ ) }),
112
+ /* @__PURE__ */ n(C, { className: t.panel, children: /* @__PURE__ */ n(
113
+ "div",
114
+ {
115
+ className: _(
116
+ t.content,
117
+ g && t.hasBackground
118
+ ),
119
+ children: s
120
+ }
121
+ ) })
122
+ ]
123
+ }
124
+ );
125
+ };
126
+ export {
127
+ et as A,
128
+ ot as a
129
+ };
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { jsx as e, jsxs as h, Fragment as y } from "react/jsx-runtime";
3
- import { B as r } from "./Button.module-Cm0H98vy.js";
3
+ import { B as r } from "./Button.module-BW0TvYZ2.js";
4
4
  import { useContextProps as B, ButtonContext as x, Button as P } from "react-aria-components";
5
5
  import { c as S } from "./clsx-AexbMWKp.js";
6
6
  import { S as w } from "./Spinner-CfKMn18u.js";
@@ -0,0 +1,14 @@
1
+ import '../assets/Button.css';const n = "_button_7n7qm_1", t = "_secondary_7n7qm_48", _ = "_tertiary_7n7qm_71", o = "_iconBtn_7n7qm_91", i = "_medium_7n7qm_111", c = "_danger_7n7qm_116", r = "_iconRight_7n7qm_138", m = "_fullwidth_7n7qm_142", s = "_primary_7n7qm_152", e = {
2
+ button: n,
3
+ secondary: t,
4
+ tertiary: _,
5
+ iconBtn: o,
6
+ medium: i,
7
+ danger: c,
8
+ iconRight: r,
9
+ fullwidth: m,
10
+ primary: s
11
+ };
12
+ export {
13
+ e as B
14
+ };
@@ -1,7 +1,7 @@
1
1
  import { jsx as r, jsxs as l } from "react/jsx-runtime";
2
2
  import { c } from "./clsx-AexbMWKp.js";
3
3
  import * as i from "react";
4
- import { H as m } from "./Heading-D8tNNJkt.js";
4
+ import { H as m } from "./Heading-nfcRc2QF.js";
5
5
  import { Button as _, Link as C } from "react-aria-components";
6
6
  import { A as x } from "./arrow-right-BVcFGZmy.js";
7
7
  import '../assets/Card.css';const A = "_card_1x9yi_1", h = "_horizontal_1x9yi_11", u = "_cardLink_1x9yi_16", I = "_cardContent_1x9yi_21", z = "_cardActions_1x9yi_40", k = "_cardActionArea_1x9yi_50", p = "_cardImage_1x9yi_83", y = "_cardLinkIcon_1x9yi_115", n = {
@@ -1,13 +1,13 @@
1
- import { jsxs as L, jsx as t } from "react/jsx-runtime";
2
- import S, { forwardRef as u, useContext as H, useRef as j } from "react";
1
+ import { jsxs as S, jsx as t } from "react/jsx-runtime";
2
+ import H, { forwardRef as u, useContext as j, useRef as z } from "react";
3
3
  import { VisuallyHidden as D, mergeProps as h, useCheckboxGroupItem as M, useCheckbox as O, useHover as V, usePress as q, useFocusRing as w } from "react-aria";
4
4
  import { useContextProps as A, CheckboxContext as T, useSlottedContext as E, FormContext as J } from "react-aria-components";
5
5
  import { a as x } from "./clsx-AexbMWKp.js";
6
- import { variables as m } from "@midas-ds/theme";
6
+ import { variables as k } from "@midas-ds/theme";
7
7
  import { c as K } from "./createLucideIcon-CP-mMPfa.js";
8
8
  import { C as Q } from "./check-Bt2UikoU.js";
9
9
  import { useToggleState as U } from "@react-stately/toggle";
10
- import '../assets/Checkbox.css';const W = [["path", { d: "M5 12h14", key: "1ays0h" }]], X = K("minus", W), Y = S.createContext(null), Z = "_checkboxInner_tzrii_1", $ = "_checkbox_tzrii_1", ee = "_checkboxGroup_tzrii_143", oe = "_checkboxList_tzrii_154", b = {
10
+ import '../assets/Checkbox.css';const W = [["path", { d: "M5 12h14", key: "1ays0h" }]], X = K("minus", W), Y = H.createContext(null), Z = "_checkboxInner_3tk0i_1", $ = "_checkbox_3tk0i_1", ee = "_checkboxGroup_3tk0i_143", oe = "_checkboxList_3tk0i_154", m = {
11
11
  checkboxInner: Z,
12
12
  checkbox: $,
13
13
  checkboxGroup: ee,
@@ -30,14 +30,14 @@ import '../assets/Checkbox.css';const W = [["path", { d: "M5 12h14", key: "1ays0
30
30
  inputRef: I,
31
31
  children: R
32
32
  }, y) => {
33
- const { hoverProps: G, isHovered: P } = e, { pressProps: g, isPressed: N } = o, { isFocused: z, isFocusVisible: B, focusProps: F } = c;
34
- return /* @__PURE__ */ L(
33
+ const { hoverProps: G, isHovered: P } = e, { pressProps: g, isPressed: N } = o, { isFocused: B, isFocusVisible: F, focusProps: L } = c;
34
+ return /* @__PURE__ */ S(
35
35
  "label",
36
36
  {
37
37
  ref: y,
38
38
  ...h(G, g, i),
39
39
  slot: n || void 0,
40
- className: x(b.checkbox, a),
40
+ className: x(m.checkbox, a),
41
41
  "data-hovered": P || void 0,
42
42
  "data-selected": r || void 0,
43
43
  "data-indeterminate": s || void 0,
@@ -45,27 +45,27 @@ import '../assets/Checkbox.css';const W = [["path", { d: "M5 12h14", key: "1ays0
45
45
  "data-disabled": d || void 0,
46
46
  "data-readonly": f || void 0,
47
47
  "data-invalid": C || void 0,
48
- "data-focused": z || void 0,
49
- "data-focus-visible": B || void 0,
48
+ "data-focused": B || void 0,
49
+ "data-focus-visible": F || void 0,
50
50
  "data-required": _ || void 0,
51
51
  children: [
52
- /* @__PURE__ */ t("div", { className: x(b.checkboxInner), children: s ? /* @__PURE__ */ t(
52
+ /* @__PURE__ */ t("div", { className: x(m.checkboxInner), children: s ? /* @__PURE__ */ t(
53
53
  X,
54
54
  {
55
55
  size: 14,
56
- color: m.iconOnColor
56
+ color: k.iconOnColor
57
57
  }
58
58
  ) : /* @__PURE__ */ t(
59
59
  Q,
60
60
  {
61
61
  size: 14,
62
- color: m.iconOnColor
62
+ color: k.iconOnColor
63
63
  }
64
64
  ) }),
65
65
  /* @__PURE__ */ t(D, { children: /* @__PURE__ */ t(
66
66
  "input",
67
67
  {
68
- ...h(p, F),
68
+ ...h(p, L),
69
69
  ref: I
70
70
  }
71
71
  ) }),
@@ -76,7 +76,7 @@ import '../assets/Checkbox.css';const W = [["path", { d: "M5 12h14", key: "1ays0
76
76
  }
77
77
  );
78
78
  l.displayName = "CheckboxInner";
79
- const k = u((e, o) => {
79
+ const b = u((e, o) => {
80
80
  const c = M(
81
81
  {
82
82
  ...e,
@@ -94,7 +94,7 @@ const k = u((e, o) => {
94
94
  }
95
95
  );
96
96
  });
97
- k.displayName = "CheckBoxGroupItem";
97
+ b.displayName = "CheckBoxGroupItem";
98
98
  const v = u((e, o) => {
99
99
  const c = O(e, U(e), e.inputRef);
100
100
  return /* @__PURE__ */ t(
@@ -110,12 +110,12 @@ v.displayName = "SingleCheckbox";
110
110
  const te = u(
111
111
  (e, o) => {
112
112
  [e, o] = A(e, o, T);
113
- const c = E(J), i = e.validationBehavior ?? c?.validationBehavior ?? "native", n = H(Y), a = j(null), r = V(e), s = q({
113
+ const c = E(J), i = e.validationBehavior ?? c?.validationBehavior ?? "native", n = j(Y), a = z(null), r = V(e), s = q({
114
114
  ref: o,
115
115
  isDisabled: e.isDisabled
116
116
  }), d = w();
117
117
  return n ? /* @__PURE__ */ t(
118
- k,
118
+ b,
119
119
  {
120
120
  ...e,
121
121
  state: n,
@@ -142,5 +142,5 @@ te.displayName = "Checkbox";
142
142
  export {
143
143
  te as C,
144
144
  Y as a,
145
- b as s
145
+ m as s
146
146
  };
@@ -1,12 +1,12 @@
1
1
  import { jsx as o, jsxs as h } from "react/jsx-runtime";
2
2
  import { useCheckboxGroup as C } from "react-aria";
3
3
  import { useCheckboxGroupState as v } from "react-stately";
4
- import { a as k, L as S } from "./Label-6GZmmff9.js";
5
- import { T as y } from "./Text-BuXvuoqM.js";
4
+ import { a as k, L as S } from "./Label-s4J9sYdy.js";
5
+ import { T as y } from "./Text-D0r_W4lH.js";
6
6
  import * as r from "react";
7
- import { C as d, s as u, a as g } from "./Checkbox-CRLj7_Ox.js";
7
+ import { C as d, s as u, a as g } from "./Checkbox-sAkQe7Q9.js";
8
8
  import { FieldErrorContext as A } from "react-aria-components";
9
- import { F as P } from "./FieldError-BMTrvSof.js";
9
+ import { F as P } from "./FieldError-krpMBtie.js";
10
10
  import { u as V } from "./useLocalizedStringFormatter-BHvsRxDk.js";
11
11
  const F = (e, { value: t }) => {
12
12
  const a = r.Children.toArray(e).filter(
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { jsx as r } from "react/jsx-runtime";
3
- import { B as o } from "./Button-CaLOUTDO.js";
3
+ import { B as o } from "./Button-BhIvfqOc.js";
4
4
  import { X as i } from "./x-B9bYxG31.js";
5
5
  const m = (t) => /* @__PURE__ */ r(
6
6
  o,
@@ -2,7 +2,7 @@
2
2
  import { jsxs as e, jsx as t } from "react/jsx-runtime";
3
3
  import * as i from "react";
4
4
  import { VisuallyHidden as a } from "react-aria";
5
- import { a as y, T as r } from "./ToggleButtonGroup-CXKTrLbb.js";
5
+ import { a as y, T as r } from "./ToggleButtonGroup-Bv9xpwTT.js";
6
6
  import { c as d } from "./createLucideIcon-CP-mMPfa.js";
7
7
  import { u } from "./useLocalizedStringFormatter-BHvsRxDk.js";
8
8
  import '../assets/ColorSchemeSwitch.css';const g = [
@@ -0,0 +1,102 @@
1
+ 'use client';
2
+ import { jsxs as c, jsx as o } from "react/jsx-runtime";
3
+ import L from "react";
4
+ import { ComboBox as F, Input as w, Button as R } from "react-aria-components";
5
+ import { c as s } from "./clsx-AexbMWKp.js";
6
+ import { a as y, L as B } from "./Label-s4J9sYdy.js";
7
+ import { T as C } from "./Text-D0r_W4lH.js";
8
+ import { F as u } from "./FieldError-krpMBtie.js";
9
+ import { L as N } from "./ListBox-CDlOUvzJ.js";
10
+ import { a as g, L as E } from "./ListBoxEmptyState-CXKkWQy1.js";
11
+ import { C as S } from "./chevron-down-BBFYYzZq.js";
12
+ import { u as T } from "./useLocalizedStringFormatter-BHvsRxDk.js";
13
+ import '../assets/ComboBox.css';const j = "_combobox_1v46d_1", I = "_inputField_1v46d_6", O = "_medium_1v46d_27", U = "_wrap_1v46d_79", z = "_button_1v46d_85", D = "_icon_1v46d_121", t = {
14
+ combobox: j,
15
+ inputField: I,
16
+ medium: O,
17
+ wrap: U,
18
+ button: z,
19
+ icon: D
20
+ }, M = { showList: "Show list", noResultsFound: "No results found" }, V = { showList: "Visa lista", noResultsFound: "Inga träffar" }, W = {
21
+ en: M,
22
+ sv: V
23
+ };
24
+ function Y({
25
+ label: i,
26
+ description: r,
27
+ errorMessage: n,
28
+ children: p,
29
+ items: f,
30
+ className: _,
31
+ errorPosition: a = "top",
32
+ size: d = "large",
33
+ popover: h,
34
+ listBoxProps: b,
35
+ ...e
36
+ }) {
37
+ const m = L.useRef(null), l = T(W), x = (v) => {
38
+ v.currentTarget.value && m.current?.select();
39
+ };
40
+ return /* @__PURE__ */ c(
41
+ F,
42
+ {
43
+ className: s(t.combobox, _),
44
+ ...e,
45
+ "data-readonly": e.isReadOnly || void 0,
46
+ children: [
47
+ /* @__PURE__ */ o(y, { popover: h, children: i && /* @__PURE__ */ o(B, { children: i }) }),
48
+ r && /* @__PURE__ */ o(C, { slot: "description", children: r }),
49
+ a === "top" && /* @__PURE__ */ o(u, { "data-testid": "fieldError", children: n }),
50
+ /* @__PURE__ */ c("div", { className: t.wrap, children: [
51
+ /* @__PURE__ */ o(
52
+ w,
53
+ {
54
+ className: s(t.inputField, {
55
+ [t.medium]: d === "medium"
56
+ }),
57
+ "data-readonly": e.isReadOnly || void 0,
58
+ onMouseUp: x,
59
+ ref: m
60
+ }
61
+ ),
62
+ /* @__PURE__ */ o(
63
+ R,
64
+ {
65
+ className: s(t.button, {
66
+ [t.medium]: d === "medium"
67
+ }),
68
+ "aria-label": l.format("showList"),
69
+ children: /* @__PURE__ */ o(
70
+ "div",
71
+ {
72
+ className: t.icon,
73
+ "aria-hidden": "true",
74
+ children: /* @__PURE__ */ o(
75
+ S,
76
+ {
77
+ size: 20,
78
+ "aria-hidden": !0
79
+ }
80
+ )
81
+ }
82
+ )
83
+ }
84
+ )
85
+ ] }),
86
+ a === "bottom" && /* @__PURE__ */ o(u, { "data-testid": "fieldError", children: n }),
87
+ /* @__PURE__ */ o(g, { offset: 4, children: /* @__PURE__ */ o(
88
+ N,
89
+ {
90
+ items: f,
91
+ renderEmptyState: () => /* @__PURE__ */ o(E, { children: l.format("noResultsFound") }),
92
+ ...b,
93
+ children: p
94
+ }
95
+ ) })
96
+ ]
97
+ }
98
+ );
99
+ }
100
+ export {
101
+ Y as C
102
+ };
@@ -1,18 +1,18 @@
1
1
  import { jsxs as p, jsx as e } from "react/jsx-runtime";
2
2
  import * as x from "react";
3
- import { DateField as g, DateFieldStateContext as h } from "react-aria-components";
3
+ import { DateField as h, DateFieldStateContext as D } from "react-aria-components";
4
4
  import { c as d } from "./clsx-AexbMWKp.js";
5
- import { D, b as B } from "./DateInputDivider-DwopMIb9.js";
6
- import { F } from "./FieldError-BMTrvSof.js";
7
- import { a as C, L as b } from "./Label-6GZmmff9.js";
8
- import { T as L } from "./Text-BuXvuoqM.js";
9
- import { C as S } from "./ClearButton-DPm_d7SL.js";
5
+ import { D as g, b as B } from "./DateInputDivider-DwopMIb9.js";
6
+ import { F } from "./FieldError-krpMBtie.js";
7
+ import { a as C, L as b } from "./Label-s4J9sYdy.js";
8
+ import { T as L } from "./Text-D0r_W4lH.js";
9
+ import { C as S } from "./ClearButton-DBr9Zfwq.js";
10
10
  import { FocusScope as v, useFocusManager as N } from "@react-aria/focus";
11
11
  import { u as V } from "./useLocalizedStringFormatter-BHvsRxDk.js";
12
12
  import '../assets/DateField.css';const j = { clear: "Clear date" }, T = { clear: "Rensa datum" }, E = {
13
13
  en: j,
14
14
  sv: T
15
- }, I = "_dateField_g5lxa_1", M = "_inputField_g5lxa_7", P = "_medium_g5lxa_38", R = "_clearButton_g5lxa_47", l = {
15
+ }, I = "_dateField_58xuo_1", M = "_inputField_58xuo_7", P = "_medium_58xuo_38", R = "_clearButton_58xuo_47", o = {
16
16
  dateField: I,
17
17
  inputField: M,
18
18
  medium: P,
@@ -21,20 +21,20 @@ import '../assets/DateField.css';const j = { clear: "Clear date" }, T = { clear:
21
21
  isClearable: i,
22
22
  size: t,
23
23
  isDisabled: s,
24
- isReadOnly: o
24
+ isReadOnly: r
25
25
  }) => {
26
- const r = V(E), a = x.useContext(h), n = N(), m = () => {
26
+ const l = V(E), a = x.useContext(D), n = N(), m = () => {
27
27
  a?.setValue(null), n?.focusFirst();
28
28
  };
29
- return i && a?.value != null && !o ? /* @__PURE__ */ e(
29
+ return i && a?.value != null && !r ? /* @__PURE__ */ e(
30
30
  S,
31
31
  {
32
32
  onPress: m,
33
33
  size: t,
34
34
  isDisabled: s,
35
- "aria-label": r.format("clear"),
36
- className: d(l.clearButton, {
37
- [l.medium]: t === "medium"
35
+ "aria-label": l.format("clear"),
36
+ className: d(o.clearButton, {
37
+ [o.medium]: t === "medium"
38
38
  })
39
39
  }
40
40
  ) : null;
@@ -42,8 +42,8 @@ import '../assets/DateField.css';const j = { clear: "Clear date" }, T = { clear:
42
42
  className: i,
43
43
  description: t,
44
44
  errorMessage: s,
45
- errorPosition: o = "top",
46
- label: r,
45
+ errorPosition: r = "top",
46
+ label: l,
47
47
  size: a = "large",
48
48
  popover: n,
49
49
  isClearable: m = !1,
@@ -51,25 +51,25 @@ import '../assets/DateField.css';const j = { clear: "Clear date" }, T = { clear:
51
51
  isDisabled: u,
52
52
  ...f
53
53
  }) => /* @__PURE__ */ p(
54
- g,
54
+ h,
55
55
  {
56
56
  ...f,
57
57
  isReadOnly: c,
58
58
  isDisabled: u,
59
- className: d(l.dateField, i),
59
+ className: d(o.dateField, i),
60
60
  children: [
61
- /* @__PURE__ */ e(C, { popover: n, children: r && /* @__PURE__ */ e(b, { children: r }) }),
61
+ /* @__PURE__ */ e(C, { popover: n, children: l && /* @__PURE__ */ e(b, { children: l }) }),
62
62
  t && /* @__PURE__ */ e(L, { slot: "description", children: t }),
63
- o === "top" && /* @__PURE__ */ e(F, { children: s }),
63
+ r === "top" && /* @__PURE__ */ e(F, { children: s }),
64
64
  /* @__PURE__ */ e(
65
65
  "div",
66
66
  {
67
- className: d(l.inputField, {
68
- [l.medium]: a === "medium"
67
+ className: d(o.inputField, {
68
+ [o.medium]: a === "medium"
69
69
  }),
70
70
  "data-testid": "date-field_input-field",
71
71
  children: /* @__PURE__ */ p(v, { children: [
72
- /* @__PURE__ */ e(D, { children: (_) => /* @__PURE__ */ e(B, { segment: _ }) }),
72
+ /* @__PURE__ */ e(g, { children: (_) => /* @__PURE__ */ e(B, { segment: _ }) }),
73
73
  /* @__PURE__ */ e(
74
74
  W,
75
75
  {
@@ -82,7 +82,7 @@ import '../assets/DateField.css';const j = { clear: "Clear date" }, T = { clear:
82
82
  ] })
83
83
  }
84
84
  ),
85
- o === "bottom" && /* @__PURE__ */ e(F, { children: s })
85
+ r === "bottom" && /* @__PURE__ */ e(F, { children: s })
86
86
  ]
87
87
  }
88
88
  );