@midas-ds/components 17.25.2 → 17.27.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 (61) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/assets/calendar.css +1 -1
  3. package/assets/drop-zone.css +1 -0
  4. package/assets/list-box.css +1 -1
  5. package/assets/select.css +1 -1
  6. package/calendar/Calendar.d.ts +8 -1
  7. package/calendar/Calendar.stories.d.ts +2 -1
  8. package/calendar/CalendarGrid.d.ts +1 -2
  9. package/calendar/CalendarHeader.d.ts +2 -3
  10. package/calendar/CalendarPicker.d.ts +18 -0
  11. package/calendar/RangeCalendar.d.ts +8 -2
  12. package/calendar/RangeCalendar.stories.d.ts +2 -1
  13. package/calendar/index.js +1 -1
  14. package/checkbox/index.js +1 -1
  15. package/chunks/calendar-DWdU1T7E.js +111 -0
  16. package/chunks/{checkbox-ivInWvEp.js → checkbox-BgCp0edW.js} +13 -13
  17. package/chunks/{combobox-DDO4fEtI.js → combobox-B3AGDNru.js} +9 -9
  18. package/chunks/{date-field-DG5TYsTF.js → date-field-Q3bQ5P_t.js} +8 -8
  19. package/chunks/{date-picker-1W7OmCT0.js → date-picker-BPAJK8Gr.js} +15 -15
  20. package/chunks/drop-zone-DvQLpgq6.js +25 -0
  21. package/chunks/file-trigger-Dp5nH8oS.js +7 -0
  22. package/chunks/{list-box-VdBVTwZK.js → list-box-BT33Wiwt.js} +16 -15
  23. package/chunks/{radio-W0YqY7lo.js → radio-BXC6pb3z.js} +8 -8
  24. package/chunks/{search-field-d7FV4Kuv.js → search-field-dAZu3T_V.js} +8 -8
  25. package/chunks/{select-LjjT_7hr.js → select-DOLE5CtI.js} +32 -28
  26. package/chunks/{table-O7Ht2ilY.js → table-RARvkGKL.js} +1 -1
  27. package/chunks/{textfield-BsijPPRD.js → textfield-BNdiOwXq.js} +10 -10
  28. package/chunks/{time-field-BlNUOjUJ.js → time-field-CZxI9Bs6.js} +9 -9
  29. package/combobox/index.js +1 -1
  30. package/date-field/index.js +1 -1
  31. package/date-picker/index.js +1 -1
  32. package/drop-zone/DropZone.d.ts +21 -0
  33. package/drop-zone/DropZone.stories.d.ts +16 -0
  34. package/drop-zone/index.d.ts +1 -0
  35. package/drop-zone/index.js +2 -0
  36. package/file-trigger/FileTrigger.d.ts +2 -0
  37. package/file-trigger/index.d.ts +1 -0
  38. package/file-trigger/index.js +2 -0
  39. package/index.d.ts +2 -1
  40. package/index.js +36 -35
  41. package/list-box/ListBox.d.ts +6 -1
  42. package/list-box/ListBox.stories.d.ts +1 -1
  43. package/list-box/index.js +1 -1
  44. package/package.json +1 -1
  45. package/radio/index.js +1 -1
  46. package/search-field/index.js +1 -1
  47. package/select/SelectTrigger.d.ts +7 -1
  48. package/select/index.d.ts +1 -0
  49. package/select/index.js +2 -2
  50. package/table/index.js +1 -1
  51. package/textfield/TextArea.stories.d.ts +5 -5
  52. package/textfield/index.js +1 -1
  53. package/time-field/index.js +1 -1
  54. package/assets/file-upload.css +0 -1
  55. package/chunks/calendar-R7x0m8ch.js +0 -74
  56. package/chunks/file-upload-DInuSFCB.js +0 -11
  57. package/file-upload/DropZone.stories.d.ts +0 -6
  58. package/file-upload/FileUpload.d.ts +0 -4
  59. package/file-upload/FileUpload.stories.d.ts +0 -11
  60. package/file-upload/index.d.ts +0 -1
  61. package/file-upload/index.js +0 -2
@@ -0,0 +1,25 @@
1
+ 'use client';
2
+ import { t as e } from "./clsx-B1NYyfch.js";
3
+ import { forwardRef as t } from "react";
4
+ import { DropZone as n, FieldErrorContext as r, composeRenderProps as i } from "react-aria-components";
5
+ import { jsx as a } from "react/jsx-runtime";
6
+ import '../assets/drop-zone.css';var o = { dropZone: "_dropZone_1g3sx_1" }, s = t(({ className: t, isInvalid: s, children: c, ...l }, u) => {
7
+ let d = s ? {
8
+ isInvalid: !0,
9
+ validationErrors: [],
10
+ validationDetails: {}
11
+ } : null;
12
+ return /* @__PURE__ */ a(n, {
13
+ ...l,
14
+ ref: u,
15
+ "data-invalid": s || void 0,
16
+ className: e(o.dropZone, t),
17
+ children: i(c, (e) => /* @__PURE__ */ a(r.Provider, {
18
+ value: d,
19
+ children: e
20
+ }))
21
+ });
22
+ });
23
+ s.displayName = "DropZone";
24
+ //#endregion
25
+ export { s as t };
@@ -0,0 +1,7 @@
1
+ 'use client';
2
+ import { FileTrigger as e } from "react-aria-components";
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ //#region src/file-trigger/FileTrigger.tsx
5
+ var n = (n) => /* @__PURE__ */ t(e, { ...n });
6
+ //#endregion
7
+ export { n as t };
@@ -14,27 +14,28 @@ var g = class extends l {
14
14
  }), this.contentSize;
15
15
  }
16
16
  }, _ = {
17
- listBox: "_listBox_48j4n_4",
18
- listBoxPopover: "_listBoxPopover_48j4n_16 _dropdownAnimation_1ljkv_4",
19
- listBoxSectionHeading: "_listBoxSectionHeading_48j4n_31",
20
- listBoxButton: "_listBoxButton_48j4n_43",
21
- listBoxItem: "_listBoxItem_48j4n_55",
22
- textContent: "_textContent_48j4n_68",
23
- listBoxLoadMoreItem: "_listBoxLoadMoreItem_48j4n_176",
24
- item: "_item_48j4n_187",
25
- option: "_option_48j4n_188",
26
- inputCheckbox: "_inputCheckbox_48j4n_188"
27
- }, v = ({ className: t, children: n, virtualized: r = !0, ...i }) => {
28
- let o = /* @__PURE__ */ m(a, {
17
+ listBox: "_listBox_6csy4_4",
18
+ listBoxItem: "_listBoxItem_6csy4_18",
19
+ textContent: "_textContent_6csy4_51",
20
+ listBoxPopover: "_listBoxPopover_6csy4_67 _dropdownAnimation_1ljkv_4",
21
+ listBoxSectionHeading: "_listBoxSectionHeading_6csy4_96",
22
+ listBoxButton: "_listBoxButton_6csy4_108",
23
+ listBoxLoadMoreItem: "_listBoxLoadMoreItem_6csy4_241",
24
+ item: "_item_6csy4_252",
25
+ option: "_option_6csy4_253",
26
+ inputCheckbox: "_inputCheckbox_6csy4_253"
27
+ }, v = ({ className: t, children: n, virtualized: r = !0, size: i, ...o }) => {
28
+ let s = /* @__PURE__ */ m(a, {
29
29
  className: e(_.listBox, t),
30
- ...i,
30
+ "data-size": i,
31
+ ...o,
31
32
  children: n
32
33
  });
33
34
  return r ? /* @__PURE__ */ m(d, {
34
35
  layout: g,
35
36
  layoutOptions: { estimatedHeadingSize: 38 },
36
- children: o
37
- }) : o;
37
+ children: s
38
+ }) : s;
38
39
  }, y = ({ className: t, children: n, ...r }) => /* @__PURE__ */ m("button", {
39
40
  type: "button",
40
41
  className: e(_.listBoxItem, _.listBoxButton, t),
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./clsx-B1NYyfch.js";
2
- import { t } from "./text-EUdAWwZz.js";
3
- import { t as n } from "./field-error-pJiSw4PN.js";
4
- import { n as r, t as i } from "./label-CEYHiWSa.js";
2
+ import { n as t, t as n } from "./label-CEYHiWSa.js";
3
+ import { t as r } from "./text-EUdAWwZz.js";
4
+ import { t as i } from "./field-error-pJiSw4PN.js";
5
5
  import { Group as a, RadioButton as o, RadioField as s, RadioGroup as c, composeRenderProps as l } from "react-aria-components";
6
6
  import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
7
7
  import '../assets/radio.css';//#region src/radio/RadioField.tsx
@@ -22,15 +22,15 @@ var p = (e) => /* @__PURE__ */ d(s, { ...e }), m = {
22
22
  ...y,
23
23
  className: e(m.radioGroup, g),
24
24
  children: l(h, (e) => /* @__PURE__ */ f(u, { children: [
25
- /* @__PURE__ */ d(r, {
25
+ /* @__PURE__ */ d(t, {
26
26
  popover: v,
27
- children: o && /* @__PURE__ */ d(i, { children: o })
27
+ children: o && /* @__PURE__ */ d(n, { children: o })
28
28
  }),
29
- s && /* @__PURE__ */ d(t, {
29
+ s && /* @__PURE__ */ d(r, {
30
30
  slot: "description",
31
31
  children: s
32
32
  }),
33
- _ === "top" && /* @__PURE__ */ d(n, {
33
+ _ === "top" && /* @__PURE__ */ d(i, {
34
34
  "data-testid": "fieldError",
35
35
  children: p
36
36
  }),
@@ -38,7 +38,7 @@ var p = (e) => /* @__PURE__ */ d(s, { ...e }), m = {
38
38
  className: m.wrap,
39
39
  children: e
40
40
  }),
41
- _ === "bottom" && /* @__PURE__ */ d(n, {
41
+ _ === "bottom" && /* @__PURE__ */ d(i, {
42
42
  "data-testid": "fieldError",
43
43
  children: p
44
44
  })
@@ -4,9 +4,9 @@ import { t } from "./createLucideIcon-BgluSHFG.js";
4
4
  import { t as n } from "./x-BJAOO5a5.js";
5
5
  import { t as r } from "./useLocalizedStringFormatter-CeyBc0x0.js";
6
6
  import { n as i } from "./button-Ch860h28.js";
7
- import { t as a } from "./text-EUdAWwZz.js";
8
- import { t as o } from "./field-error-pJiSw4PN.js";
9
- import { n as s, t as c } from "./label-CEYHiWSa.js";
7
+ import { n as a, t as o } from "./label-CEYHiWSa.js";
8
+ import { t as s } from "./text-EUdAWwZz.js";
9
+ import { t as c } from "./field-error-pJiSw4PN.js";
10
10
  import { t as l } from "./TextField.module-D_tUnemB.js";
11
11
  import { FormContext as u, Input as d, SearchField as f, useSlottedContext as p } from "react-aria-components";
12
12
  import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
@@ -47,15 +47,15 @@ var x = ({ errorPosition: t = "top", size: x = "large", showButton: S, className
47
47
  className: e(v.container, C),
48
48
  validationBehavior: P,
49
49
  children: ({ state: r }) => /* @__PURE__ */ g(m, { children: [
50
- /* @__PURE__ */ h(s, {
50
+ /* @__PURE__ */ h(a, {
51
51
  popover: O,
52
- children: E && /* @__PURE__ */ h(c, { children: E })
52
+ children: E && /* @__PURE__ */ h(o, { children: E })
53
53
  }),
54
- D && /* @__PURE__ */ h(a, {
54
+ D && /* @__PURE__ */ h(s, {
55
55
  slot: "description",
56
56
  children: D
57
57
  }),
58
- t === "top" && /* @__PURE__ */ h(o, { children: ({ validationErrors: e }) => w ?? e.join(" ") }),
58
+ t === "top" && /* @__PURE__ */ h(c, { children: ({ validationErrors: e }) => w ?? e.join(" ") }),
59
59
  /* @__PURE__ */ g("div", {
60
60
  className: v.inner,
61
61
  children: [/* @__PURE__ */ g("div", {
@@ -92,7 +92,7 @@ var x = ({ errorPosition: t = "top", size: x = "large", showButton: S, className
92
92
  children: j.buttonText ?? M.format("search")
93
93
  })]
94
94
  }),
95
- t === "bottom" && /* @__PURE__ */ h(o, { children: ({ validationErrors: e }) => w ?? e.join(" ") })
95
+ t === "bottom" && /* @__PURE__ */ h(c, { children: ({ validationErrors: e }) => w ?? e.join(" ") })
96
96
  ] })
97
97
  });
98
98
  };
@@ -1,13 +1,13 @@
1
1
  import { n as e, t } from "./clsx-B1NYyfch.js";
2
2
  import { t as n } from "./chevron-down-CP7nEDei.js";
3
- import { n as r } from "./checkbox-ivInWvEp.js";
3
+ import { n as r } from "./checkbox-BgCp0edW.js";
4
4
  import { t as i } from "./x-BJAOO5a5.js";
5
5
  import { t as a } from "./useLocalizedStringFormatter-CeyBc0x0.js";
6
- import { t as o } from "./text-EUdAWwZz.js";
7
- import { t as s } from "./field-error-pJiSw4PN.js";
8
- import { n as c, t as l } from "./label-CEYHiWSa.js";
9
- import { t as u } from "./popover-wAwxm_cM.js";
10
- import { c as d } from "./list-box-VdBVTwZK.js";
6
+ import { n as o, t as s } from "./label-CEYHiWSa.js";
7
+ import { t as c } from "./popover-wAwxm_cM.js";
8
+ import { t as l } from "./text-EUdAWwZz.js";
9
+ import { t as u } from "./field-error-pJiSw4PN.js";
10
+ import { c as d } from "./list-box-BT33Wiwt.js";
11
11
  import { n as f, r as p, t as m } from "./tag-mzNjP8EX.js";
12
12
  import h, { useContext as g } from "react";
13
13
  import { Button as _, Select as v, SelectStateContext as y, SelectValue as b } from "react-aria-components";
@@ -27,20 +27,21 @@ import '../assets/select.css';var E = {
27
27
  selected: "valda"
28
28
  }
29
29
  }, D = {
30
- select: "_select_mawme_1",
31
- triggerContainer: "_triggerContainer_mawme_7",
32
- trigger: "_trigger_mawme_7",
33
- medium: "_medium_mawme_30",
34
- icon: "_icon_mawme_72",
35
- selectValue: "_selectValue_mawme_78",
36
- placeholder: "_placeholder_mawme_84",
37
- multiSelectValue: "_multiSelectValue_mawme_94",
38
- selectValueTag: "_selectValueTag_mawme_118",
39
- clearButton: "_clearButton_mawme_132",
40
- truncate: "_truncate_mawme_147",
41
- popover: "_popover_mawme_184",
42
- selectAll: "_selectAll_mawme_212",
43
- tagGroup: "_tagGroup_mawme_278"
30
+ select: "_select_140qh_1",
31
+ triggerContainer: "_triggerContainer_140qh_7",
32
+ trigger: "_trigger_140qh_7",
33
+ medium: "_medium_140qh_30",
34
+ small: "_small_140qh_37",
35
+ selectValue: "_selectValue_140qh_60",
36
+ icon: "_icon_140qh_110",
37
+ placeholder: "_placeholder_140qh_122",
38
+ multiSelectValue: "_multiSelectValue_140qh_132",
39
+ selectValueTag: "_selectValueTag_140qh_156",
40
+ clearButton: "_clearButton_140qh_170",
41
+ truncate: "_truncate_140qh_185",
42
+ popover: "_popover_140qh_222",
43
+ selectAll: "_selectAll_140qh_250",
44
+ tagGroup: "_tagGroup_140qh_316"
44
45
  }, O = () => {
45
46
  let e = h.useContext(y), t = a(E);
46
47
  return /* @__PURE__ */ S(r, {
@@ -106,7 +107,10 @@ import '../assets/select.css';var E = {
106
107
  }, M = ({ isDisabled: t, selectionMode: r, size: i }) => {
107
108
  let a = g(y);
108
109
  return /* @__PURE__ */ C(_, {
109
- className: e({ [D.medium]: i === "medium" }, D.trigger),
110
+ className: e({
111
+ [D.medium]: i === "medium",
112
+ [D.small]: i === "small"
113
+ }, D.trigger),
110
114
  "data-invalid": !!a?.displayValidation.isInvalid || void 0,
111
115
  children: [/* @__PURE__ */ S(b, {
112
116
  className: D.selectValue,
@@ -132,18 +136,18 @@ function N({ children: e, description: n, errorMessage: r, errorPosition: i = "t
132
136
  ..._,
133
137
  className: t(_.className, D.select),
134
138
  children: [
135
- /* @__PURE__ */ S(c, {
139
+ /* @__PURE__ */ S(o, {
136
140
  popover: p,
137
- children: f && /* @__PURE__ */ S(l, {
141
+ children: f && /* @__PURE__ */ S(s, {
138
142
  "data-disabled": _.isDisabled || void 0,
139
143
  children: f
140
144
  })
141
145
  }),
142
- n && /* @__PURE__ */ S(o, {
146
+ n && /* @__PURE__ */ S(l, {
143
147
  slot: "description",
144
148
  children: n
145
149
  }),
146
- i === "top" && /* @__PURE__ */ S(s, { children: r }),
150
+ i === "top" && /* @__PURE__ */ S(u, { children: r }),
147
151
  /* @__PURE__ */ C("div", {
148
152
  className: D.triggerContainer,
149
153
  "data-disabled": _.isDisabled || void 0,
@@ -152,8 +156,8 @@ function N({ children: e, description: n, errorMessage: r, errorPosition: i = "t
152
156
  ..._
153
157
  }), _.selectionMode === "multiple" ? /* @__PURE__ */ S(k, { ..._ }) : null]
154
158
  }),
155
- i === "bottom" && /* @__PURE__ */ S(s, { children: r }),
156
- /* @__PURE__ */ C(u, {
159
+ i === "bottom" && /* @__PURE__ */ S(u, { children: r }),
160
+ /* @__PURE__ */ C(c, {
157
161
  offset: 1,
158
162
  hideArrow: !0,
159
163
  ...m,
@@ -170,4 +174,4 @@ function N({ children: e, description: n, errorMessage: r, errorPosition: i = "t
170
174
  }) });
171
175
  }
172
176
  //#endregion
173
- export { N as t };
177
+ export { M as n, N as t };
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { t as e } from "./clsx-B1NYyfch.js";
3
3
  import { t } from "./createLucideIcon-BgluSHFG.js";
4
- import { n } from "./checkbox-ivInWvEp.js";
4
+ import { n } from "./checkbox-BgCp0edW.js";
5
5
  import { Button as r, Cell as i, Collection as a, Column as o, Row as s, Table as c, TableBody as l, TableHeader as u, useTableOptions as d } from "react-aria-components";
6
6
  import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
7
7
  import '../assets/table.css';var h = t("arrow-down", [["path", {
@@ -2,10 +2,10 @@
2
2
  import { n as e, t } from "./clsx-B1NYyfch.js";
3
3
  import { t as n } from "./useLocalizedStringFormatter-CeyBc0x0.js";
4
4
  import { n as r } from "./button-Ch860h28.js";
5
- import { t as i } from "./text-EUdAWwZz.js";
6
- import { t as a } from "./field-error-pJiSw4PN.js";
7
- import { t as o } from "./character-counter-CSoVSrxZ.js";
8
- import { n as s, t as c } from "./label-CEYHiWSa.js";
5
+ import { n as i, t as a } from "./label-CEYHiWSa.js";
6
+ import { t as o } from "./text-EUdAWwZz.js";
7
+ import { t as s } from "./field-error-pJiSw4PN.js";
8
+ import { t as c } from "./character-counter-CSoVSrxZ.js";
9
9
  import { t as l } from "./TextField.module-D_tUnemB.js";
10
10
  import { forwardRef as u, useState as d } from "react";
11
11
  import { Input as f, InputContext as p, TextArea as m, TextField as h, TextFieldContext as g, useContextProps as _ } from "react-aria-components";
@@ -18,21 +18,21 @@ var b = u((t, n) => {
18
18
  ...t,
19
19
  className: e(l.textField, { [l.medium]: m === "medium" }),
20
20
  children: [
21
- /* @__PURE__ */ v(s, {
21
+ /* @__PURE__ */ v(i, {
22
22
  popover: b,
23
- children: r && /* @__PURE__ */ v(c, { children: r })
23
+ children: r && /* @__PURE__ */ v(a, { children: r })
24
24
  }),
25
- u && /* @__PURE__ */ v(i, {
25
+ u && /* @__PURE__ */ v(o, {
26
26
  slot: "description",
27
27
  children: u
28
28
  }),
29
- f && /* @__PURE__ */ v(o, { isLonely: !u }),
30
- p === "top" && /* @__PURE__ */ v(a, {
29
+ f && /* @__PURE__ */ v(c, { isLonely: !u }),
30
+ p === "top" && /* @__PURE__ */ v(s, {
31
31
  "data-testid": "fieldError",
32
32
  children: d
33
33
  }),
34
34
  x,
35
- p === "bottom" && /* @__PURE__ */ v(a, {
35
+ p === "bottom" && /* @__PURE__ */ v(s, {
36
36
  "data-testid": "fieldError",
37
37
  className: l.bottomError,
38
38
  children: d
@@ -1,10 +1,10 @@
1
1
  import { t as e } from "./clsx-B1NYyfch.js";
2
2
  import { t } from "./useLocalizedStringFormatter-CeyBc0x0.js";
3
- import { t as n } from "./text-EUdAWwZz.js";
4
- import { t as r } from "./field-error-pJiSw4PN.js";
5
- import { n as i, t as a } from "./label-CEYHiWSa.js";
3
+ import { n, t as r } from "./label-CEYHiWSa.js";
4
+ import { t as i } from "./text-EUdAWwZz.js";
5
+ import { t as a } from "./field-error-pJiSw4PN.js";
6
6
  import { t as o } from "./clear-button-la4Fb9_w.js";
7
- import { n as s, r as c } from "./date-field-DG5TYsTF.js";
7
+ import { n as s, r as c } from "./date-field-Q3bQ5P_t.js";
8
8
  import * as l from "react";
9
9
  import { TimeField as u, TimeFieldStateContext as d } from "react-aria-components";
10
10
  import { jsx as f, jsxs as p } from "react/jsx-runtime";
@@ -35,15 +35,15 @@ import '../assets/time-field.css';var g = {
35
35
  isDisabled: S,
36
36
  className: e(_.timeField, t),
37
37
  children: [
38
- /* @__PURE__ */ f(i, {
38
+ /* @__PURE__ */ f(n, {
39
39
  popover: y,
40
- children: h && /* @__PURE__ */ f(a, { children: h })
40
+ children: h && /* @__PURE__ */ f(r, { children: h })
41
41
  }),
42
- o && /* @__PURE__ */ f(n, {
42
+ o && /* @__PURE__ */ f(i, {
43
43
  slot: "description",
44
44
  children: o
45
45
  }),
46
- d === "top" && /* @__PURE__ */ f(r, { children: l }),
46
+ d === "top" && /* @__PURE__ */ f(a, { children: l }),
47
47
  /* @__PURE__ */ f("div", {
48
48
  className: e(_.inputField, { [_.medium]: g === "medium" }),
49
49
  children: /* @__PURE__ */ p(m, { children: [/* @__PURE__ */ f(s, { children: (e) => /* @__PURE__ */ f(c, { segment: e }) }), /* @__PURE__ */ f(v, {
@@ -53,7 +53,7 @@ import '../assets/time-field.css';var g = {
53
53
  isReadOnly: x
54
54
  })] })
55
55
  }),
56
- d === "bottom" && /* @__PURE__ */ f(r, { children: l })
56
+ d === "bottom" && /* @__PURE__ */ f(a, { children: l })
57
57
  ]
58
58
  }));
59
59
  //#endregion
package/combobox/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/combobox-DDO4fEtI.js";
1
+ import { t as e } from "../chunks/combobox-B3AGDNru.js";
2
2
  export { e as ComboBox };
@@ -1,2 +1,2 @@
1
- import { i as e, n as t, r as n, t as r } from "../chunks/date-field-DG5TYsTF.js";
1
+ import { i as e, n as t, r as n, t as r } from "../chunks/date-field-Q3bQ5P_t.js";
2
2
  export { e as DateField, t as DateInput, r as DateInputDivider, n as DateSegment };
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "../chunks/date-picker-1W7OmCT0.js";
1
+ import { n as e, t } from "../chunks/date-picker-BPAJK8Gr.js";
2
2
  export { e as DatePicker, t as DateRangePicker };
@@ -0,0 +1,21 @@
1
+ import { DropZoneProps as AriaDropZoneProps } from 'react-aria-components';
2
+ export interface DropZoneProps extends AriaDropZoneProps {
3
+ /**
4
+ * Marks the dropzone as invalid, e.g. after a failed validation. Pair with
5
+ * `FieldError` to render the error message, either inside or below the
6
+ * dropzone depending on where it's composed.
7
+ *
8
+ * @default false
9
+ */
10
+ isInvalid?: boolean;
11
+ }
12
+ /**
13
+ * A drop zone is an area into which one or multiple objects can be dragged
14
+ * and dropped. Content is fully composable — pair it with `FileTrigger` for
15
+ * file uploads, or use it for any other drag-and-drop interaction.
16
+ *
17
+ * @interface DropZoneProps
18
+ *
19
+ * @see {@link https://react-spectrum.adobe.com/react-aria/DropZone.html|React Aria DropZone}
20
+ */
21
+ export declare const DropZone: import('react').ForwardRefExoticComponent<DropZoneProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,16 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { DropZone } from './DropZone';
3
+ declare const meta: Meta<typeof DropZone>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const WithUploadButton: Story;
8
+ export declare const WithFieldLabel: Story;
9
+ export declare const Invalid: Story;
10
+ export declare const RejectsWrongFileType: Story;
11
+ export declare const RejectsTypeBeforeDrop: Story;
12
+ export declare const Disabled: Story;
13
+ interface DropZoneTestContainerProps {
14
+ onSelect: (files: File[]) => void;
15
+ }
16
+ export declare const WithFileTrigger: StoryObj<DropZoneTestContainerProps>;
@@ -0,0 +1 @@
1
+ export * from './DropZone';
@@ -0,0 +1,2 @@
1
+ import { t as e } from "../chunks/drop-zone-DvQLpgq6.js";
2
+ export { e as DropZone };
@@ -0,0 +1,2 @@
1
+ import { FileTriggerProps } from 'react-aria-components';
2
+ export declare const FileTrigger: (props: FileTriggerProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { FileTrigger } from './FileTrigger';
@@ -0,0 +1,2 @@
1
+ import { t as e } from "../chunks/file-trigger-Dp5nH8oS.js";
2
+ export { e as FileTrigger };
package/index.d.ts CHANGED
@@ -11,9 +11,10 @@ export * from './combobox';
11
11
  export * from './common/types';
12
12
  export * from './date-field';
13
13
  export * from './date-picker';
14
+ export * from './drop-zone';
14
15
  export * from './field-error';
15
16
  export * from './file-list';
16
- export * from './file-upload';
17
+ export * from './file-trigger';
17
18
  export * from './grid';
18
19
  export * from './heading';
19
20
  export * from './info-banner';
package/index.js CHANGED
@@ -5,49 +5,50 @@ import { t as n } from "./chunks/clsx-B1NYyfch.js";
5
5
  import { t as r } from "./chunks/spinner-DMR5G-6u.js";
6
6
  import { a as i, i as a, n as o, r as s, t as c } from "./chunks/layout-DVj8wSj3.js";
7
7
  import { n as l, t as u } from "./chunks/link-CQoSw1Pv.js";
8
- import { a as d, i as f, n as p, o as m, r as h, t as g } from "./chunks/table-O7Ht2ilY.js";
8
+ import { a as d, i as f, n as p, o as m, r as h, t as g } from "./chunks/table-RARvkGKL.js";
9
9
  import { t as _ } from "./chunks/link-button-BMFzCHH8.js";
10
- import { n as v, t as y } from "./chunks/date-picker-1W7OmCT0.js";
11
- import { n as b, t as x } from "./chunks/calendar-R7x0m8ch.js";
12
- import { i as S, n as C, r as w, t as T } from "./chunks/checkbox-ivInWvEp.js";
10
+ import { n as v, t as y } from "./chunks/date-picker-BPAJK8Gr.js";
11
+ import { n as b, t as x } from "./chunks/calendar-DWdU1T7E.js";
12
+ import { i as S, n as C, r as w, t as T } from "./chunks/checkbox-BgCp0edW.js";
13
13
  import { n as E, t as D } from "./chunks/color-scheme-switch-jgoxUu3x.js";
14
- import { t as O } from "./chunks/search-field-d7FV4Kuv.js";
14
+ import { t as O } from "./chunks/search-field-dAZu3T_V.js";
15
15
  import { n as k, t as A } from "./chunks/file-list-DM1Vtkun.js";
16
16
  import { t as j } from "./chunks/useLocalizedStringFormatter-CeyBc0x0.js";
17
17
  import { n as M, t as N } from "./chunks/button-Ch860h28.js";
18
18
  import { t as P } from "./chunks/heading-bnDePIbv.js";
19
19
  import { n as F, t as I } from "./chunks/badge-BplGU5BS.js";
20
20
  import { n as L, t as R } from "./chunks/breadcrumbs-C-Z6UlQn.js";
21
- import { t as z } from "./chunks/text-EUdAWwZz.js";
22
- import { t as B } from "./chunks/field-error-pJiSw4PN.js";
23
- import { a as V, c as H, i as U, l as W, n as G, o as K, r as q, s as J, t as Y } from "./chunks/card-Bzc8kToe.js";
24
- import { t as X } from "./chunks/character-counter-CSoVSrxZ.js";
25
- import { t as Z } from "./chunks/label-CEYHiWSa.js";
26
- import { t as Q } from "./chunks/popover-wAwxm_cM.js";
27
- import { n as $, r as ee, t as te } from "./chunks/modal-C-xHt7Ds.js";
28
- import { t as ne } from "./chunks/icons-UBHIX2oV.js";
29
- import { n as re, t as ie } from "./chunks/toggle-button-BgUQKcK-.js";
30
- import { a as ae, i as oe, n as se, o as ce, r as le, t as ue } from "./chunks/menu-CPCGm0MC.js";
31
- import { t as de } from "./chunks/combobox-DDO4fEtI.js";
32
- import { a as fe, c as pe, i as me, n as he, o as ge, r as _e, s as ve, t as ye } from "./chunks/list-box-VdBVTwZK.js";
33
- import { i as be, n as xe, r as Se, t as Ce } from "./chunks/date-field-DG5TYsTF.js";
34
- import { n as we, t as Te } from "./chunks/file-upload-DInuSFCB.js";
35
- import { n as Ee, t as De } from "./chunks/grid-DZB3GGDg.js";
36
- import { t as Oe } from "./chunks/info-banner-DnFNZ1_o.js";
37
- import { n as ke, t as Ae } from "./chunks/tooltip-D7LYQwj0.js";
38
- import { n as je, t as Me } from "./chunks/logo-CDxNjDeI.js";
39
- import { t as Ne } from "./chunks/progress-bar-Cft_RPHz.js";
40
- import { i as Pe, n as Fe, r as Ie, t as Le } from "./chunks/radio-W0YqY7lo.js";
41
- import { t as Re } from "./chunks/select-LjjT_7hr.js";
42
- import { n as ze, r as Be, t as Ve } from "./chunks/tag-mzNjP8EX.js";
43
- import { t as He } from "./chunks/skeleton-DWmvym7R.js";
44
- import { i as Ue, n as We, r as Ge, t as Ke } from "./chunks/tabs-BFFTnO4i.js";
45
- import { i as qe, n as Je, r as Ye, t as Xe } from "./chunks/textfield-BsijPPRD.js";
46
- import { t as Ze } from "./chunks/time-field-BlNUOjUJ.js";
47
- import { a as Qe, i as $e, n as et, o as tt, r as nt, t as rt } from "./chunks/toast-Cz0JDIr1.js";
21
+ import { t as z } from "./chunks/label-CEYHiWSa.js";
22
+ import { t as B } from "./chunks/popover-wAwxm_cM.js";
23
+ import { n as V, r as H, t as U } from "./chunks/modal-C-xHt7Ds.js";
24
+ import { t as W } from "./chunks/text-EUdAWwZz.js";
25
+ import { t as G } from "./chunks/field-error-pJiSw4PN.js";
26
+ import { n as K, t as q } from "./chunks/select-DOLE5CtI.js";
27
+ import { a as J, c as Y, i as X, n as Z, o as Q, r as $, s as ee, t as te } from "./chunks/list-box-BT33Wiwt.js";
28
+ import { n as ne, r as re, t as ie } from "./chunks/tag-mzNjP8EX.js";
29
+ import { a as ae, c as oe, i as se, l as ce, n as le, o as ue, r as de, s as fe, t as pe } from "./chunks/card-Bzc8kToe.js";
30
+ import { t as me } from "./chunks/character-counter-CSoVSrxZ.js";
31
+ import { t as he } from "./chunks/icons-UBHIX2oV.js";
32
+ import { n as ge, t as _e } from "./chunks/toggle-button-BgUQKcK-.js";
33
+ import { a as ve, i as ye, n as be, o as xe, r as Se, t as Ce } from "./chunks/menu-CPCGm0MC.js";
34
+ import { t as we } from "./chunks/combobox-B3AGDNru.js";
35
+ import { i as Te, n as Ee, r as De, t as Oe } from "./chunks/date-field-Q3bQ5P_t.js";
36
+ import { t as ke } from "./chunks/drop-zone-DvQLpgq6.js";
37
+ import { t as Ae } from "./chunks/file-trigger-Dp5nH8oS.js";
38
+ import { n as je, t as Me } from "./chunks/grid-DZB3GGDg.js";
39
+ import { t as Ne } from "./chunks/info-banner-DnFNZ1_o.js";
40
+ import { n as Pe, t as Fe } from "./chunks/tooltip-D7LYQwj0.js";
41
+ import { n as Ie, t as Le } from "./chunks/logo-CDxNjDeI.js";
42
+ import { t as Re } from "./chunks/progress-bar-Cft_RPHz.js";
43
+ import { i as ze, n as Be, r as Ve, t as He } from "./chunks/radio-BXC6pb3z.js";
44
+ import { t as Ue } from "./chunks/skeleton-DWmvym7R.js";
45
+ import { i as We, n as Ge, r as Ke, t as qe } from "./chunks/tabs-BFFTnO4i.js";
46
+ import { i as Je, n as Ye, r as Xe, t as Ze } from "./chunks/textfield-BNdiOwXq.js";
47
+ import { t as Qe } from "./chunks/time-field-CZxI9Bs6.js";
48
+ import { a as $e, i as et, n as tt, o as nt, r as rt, t as it } from "./chunks/toast-Cz0JDIr1.js";
48
49
  //#endregion
49
50
  //#region src/version.ts
50
- var it = {
51
+ var at = {
51
52
  name: "@midas-ds/components",
52
53
  author: { name: "Migrationsverket" },
53
54
  keywords: [
@@ -59,7 +60,7 @@ var it = {
59
60
  description: "Midas Components",
60
61
  homepage: "https://designsystem.migrationsverket.se/",
61
62
  license: "CC0-1.0",
62
- version: "17.25.2",
63
+ version: "17.27.0",
63
64
  module: "./index.js",
64
65
  type: "module",
65
66
  main: "./index.js",
@@ -91,4 +92,4 @@ var it = {
91
92
  }
92
93
  }.version;
93
94
  //#endregion
94
- export { e as Accordion, t as AccordionItem, F as Badge, I as BadgeContainer, R as Breadcrumb, L as Breadcrumbs, M as Button, N as ButtonGroup, b as Calendar, q as Card, U as CardActionArea, V as CardActions, G as CardBody, K as CardContent, Y as CardHeader, J as CardImage, H as CardLink, W as CardTitle, g as Cell, X as CharacterCounter, C as Checkbox, w as CheckboxButton, S as CheckboxField, T as CheckboxGroup, E as ColorSchemeSwitch, D as ColorSchemeSwitchMenu, p as Column, de as ComboBox, ne as ContrastFilled, be as DateField, xe as DateInput, Ce as DateInputDivider, v as DatePicker, y as DateRangePicker, Se as DateSegment, te as DialogTrigger, Te as DropZone, B as FieldError, k as FileList, A as FileListItem, we as FileTrigger, rt as GlobalToastRegion, Ee as Grid, De as GridItem, s as Header, P as Heading, Oe as InfoBanner, Ye as Input, Z as Label, c as Layout, u as Link, _ as LinkButton, pe as ListBox, ve as ListBoxButton, ye as ListBoxEmptyState, he as ListBoxHeader, ge as ListBoxItem, _e as ListBoxLoadMoreItem, fe as ListBoxPopover, me as ListBoxSection, Me as Logo, je as LogoContext, ae as Menu, oe as MenuItem, le as MenuPopover, se as MenuSection, ce as MenuTrigger, $ as Modal, ee as ModalOverlay, o as Navbar, Q as Popover, Ne as ProgressBar, Fe as Radio, Ie as RadioButton, Pe as RadioField, Le as RadioGroup, x as RangeCalendar, l as RouterProvider, h as Row, O as SearchField, Re as Select, ue as Separator, a as Sidebar, i as SidebarLink, He as Skeleton, r as Spinner, Ge as Tab, Ke as TabList, We as TabPanel, f as Table, d as TableBody, m as TableHeader, Ue as Tabs, Be as Tag, Ve as TagGroup, ze as TagList, z as Text, Xe as TextArea, Je as TextField, qe as TextFieldBase, Ze as TimeField, et as Toast, nt as ToastProvider, $e as ToastRegion, re as ToggleButton, ie as ToggleButtonGroup, Ae as Tooltip, ke as TooltipTrigger, it as VERSION, n as clsx, Qe as toastQueue, j as useLocalizedStringFormatter, tt as useToastState };
95
+ export { e as Accordion, t as AccordionItem, F as Badge, I as BadgeContainer, R as Breadcrumb, L as Breadcrumbs, M as Button, N as ButtonGroup, b as Calendar, de as Card, se as CardActionArea, ae as CardActions, le as CardBody, ue as CardContent, pe as CardHeader, fe as CardImage, oe as CardLink, ce as CardTitle, g as Cell, me as CharacterCounter, C as Checkbox, w as CheckboxButton, S as CheckboxField, T as CheckboxGroup, E as ColorSchemeSwitch, D as ColorSchemeSwitchMenu, p as Column, we as ComboBox, he as ContrastFilled, Te as DateField, Ee as DateInput, Oe as DateInputDivider, v as DatePicker, y as DateRangePicker, De as DateSegment, U as DialogTrigger, ke as DropZone, G as FieldError, k as FileList, A as FileListItem, Ae as FileTrigger, it as GlobalToastRegion, je as Grid, Me as GridItem, s as Header, P as Heading, Ne as InfoBanner, Xe as Input, z as Label, c as Layout, u as Link, _ as LinkButton, Y as ListBox, ee as ListBoxButton, te as ListBoxEmptyState, Z as ListBoxHeader, Q as ListBoxItem, $ as ListBoxLoadMoreItem, J as ListBoxPopover, X as ListBoxSection, Le as Logo, Ie as LogoContext, ve as Menu, ye as MenuItem, Se as MenuPopover, be as MenuSection, xe as MenuTrigger, V as Modal, H as ModalOverlay, o as Navbar, B as Popover, Re as ProgressBar, Be as Radio, Ve as RadioButton, ze as RadioField, He as RadioGroup, x as RangeCalendar, l as RouterProvider, h as Row, O as SearchField, q as Select, K as SelectTrigger, Ce as Separator, a as Sidebar, i as SidebarLink, Ue as Skeleton, r as Spinner, Ke as Tab, qe as TabList, Ge as TabPanel, f as Table, d as TableBody, m as TableHeader, We as Tabs, re as Tag, ie as TagGroup, ne as TagList, W as Text, Ze as TextArea, Ye as TextField, Je as TextFieldBase, Qe as TimeField, tt as Toast, rt as ToastProvider, et as ToastRegion, ge as ToggleButton, _e as ToggleButtonGroup, Fe as Tooltip, Pe as TooltipTrigger, at as VERSION, n as clsx, $e as toastQueue, j as useLocalizedStringFormatter, nt as useToastState };
@@ -2,5 +2,10 @@ import { ListBoxProps as AriaListBoxProps } from 'react-aria-components';
2
2
  export interface ListBoxProps<T extends object> extends AriaListBoxProps<T> {
3
3
  /** @default true */
4
4
  virtualized?: boolean;
5
+ /**
6
+ * Compact item sizing (smaller text/padding) for standalone use in
7
+ * confined spaces, e.g. the Calendar month/year picker.
8
+ */
9
+ size?: 'small';
5
10
  }
6
- export declare const ListBox: <T extends object>({ className, children, virtualized, ...rest }: ListBoxProps<T>) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const ListBox: <T extends object>({ className, children, virtualized, size, ...rest }: ListBoxProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -3,7 +3,7 @@ import { Fruit, optionsWithSections } from '../../../../tools/test-utils/src/ind
3
3
  import { ListBox } from './ListBox';
4
4
  type Story<T extends object = Fruit> = StoryObj<typeof ListBox<T>>;
5
5
  declare const _default: {
6
- component: <T extends object>({ className, children, virtualized, ...rest }: import('./ListBox').ListBoxProps<T>) => import("react/jsx-runtime").JSX.Element;
6
+ component: <T extends object>({ className, children, virtualized, size, ...rest }: import('./ListBox').ListBoxProps<T>) => import("react/jsx-runtime").JSX.Element;
7
7
  subcomponents: {
8
8
  ListBoxItem: <T extends object>({ children, className, textValue, ...rest }: import('react-aria-components').ListBoxItemProps<T>) => import("react/jsx-runtime").JSX.Element;
9
9
  };
package/list-box/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../chunks/list-box-VdBVTwZK.js";
1
+ import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../chunks/list-box-BT33Wiwt.js";
2
2
  export { t as ListBox, o as ListBoxButton, s as ListBoxEmptyState, r as ListBoxHeader, i as ListBoxItem, a as ListBoxLoadMoreItem, e as ListBoxPopover, n as ListBoxSection };
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "description": "Midas Components",
15
15
  "homepage": "https://designsystem.migrationsverket.se/",
16
16
  "license": "CC0-1.0",
17
- "version": "17.25.2",
17
+ "version": "17.27.0",
18
18
  "module": "./index.js",
19
19
  "type": "module",
20
20
  "main": "./index.js",
package/radio/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { i as e, n as t, r as n, t as r } from "../chunks/radio-W0YqY7lo.js";
1
+ import { i as e, n as t, r as n, t as r } from "../chunks/radio-BXC6pb3z.js";
2
2
  export { t as Radio, n as RadioButton, e as RadioField, r as RadioGroup };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/search-field-d7FV4Kuv.js";
1
+ import { t as e } from "../chunks/search-field-dAZu3T_V.js";
2
2
  export { e as SearchField };