@midas-ds/components 17.33.6 → 17.34.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 (69) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/accordion/index.js +1 -1
  3. package/aria/index.d.ts +3 -0
  4. package/aria/index.js +3 -0
  5. package/assets/date-field.css +1 -1
  6. package/assets/date-picker.css +1 -1
  7. package/button/index.js +1 -1
  8. package/calendar/index.js +1 -1
  9. package/checkbox/index.js +1 -1
  10. package/chunks/{FeedbackStatusIcon-Ba31xgcy.js → FeedbackStatusIcon-DX5ndhm3.js} +1 -1
  11. package/chunks/{accordion-BKnABSyU.js → accordion-DCylOvk-.js} +2 -2
  12. package/chunks/button-Vq0ARno3.js +34 -0
  13. package/chunks/{calendar-BOTC3DKx.js → calendar-CdKnEG5o.js} +3 -3
  14. package/chunks/{checkbox-CzH8BdsB.js → checkbox-BAYWLn77.js} +2 -2
  15. package/chunks/{clear-button-CeQy0RdK.js → clear-button-q2aTPqmU.js} +1 -1
  16. package/chunks/{color-scheme-switch-BpmV-r9p.js → color-scheme-switch-D--ppbpi.js} +2 -2
  17. package/chunks/{combobox-DQ3d6pLc.js → combobox-DC8escnY.js} +3 -3
  18. package/chunks/{date-field-DSBHnHdN.js → date-field-B6STeIzX.js} +29 -25
  19. package/chunks/date-picker-DCFHCDjr.js +144 -0
  20. package/chunks/{file-list-etDe20pj.js → file-list-BqPDm31w.js} +4 -4
  21. package/chunks/{info-banner-BKB7_CPh.js → info-banner-DxN9h_6W.js} +3 -3
  22. package/chunks/{label-B5-Kmj4t.js → label-aX8yboSc.js} +3 -3
  23. package/chunks/{layout-Cs8Oc8sf.js → layout-CHum4Cpf.js} +3 -3
  24. package/chunks/{link-CG_mHnLv.js → link-CyjmtEZP.js} +1 -1
  25. package/chunks/{link-button-4xRbQqH2.js → link-button-D6t-8zQQ.js} +1 -1
  26. package/chunks/{list-box-frfQGO1x.js → list-box-Cs65YWMd.js} +26 -25
  27. package/chunks/{logo-Xe8PO0US.js → logo-CBGOnROk.js} +1 -1
  28. package/chunks/{modal-BQrpnHT5.js → modal-RqzWc_NN.js} +2 -2
  29. package/chunks/{progress-bar-DE7UoEWR.js → progress-bar-BHdz8PFO.js} +1 -1
  30. package/chunks/{radio-DAB7WeIP.js → radio-D0PA15IV.js} +1 -1
  31. package/chunks/{search-field-BI1h0UBl.js → search-field-h6K4GeXC.js} +3 -3
  32. package/chunks/{select-BHpUGcW7.js → select-C0o_SEd0.js} +5 -5
  33. package/chunks/{spinner-YKC-Vk3v.js → spinner-V6QnHHAH.js} +1 -1
  34. package/chunks/{table-Fsf-jJip.js → table-EjKTmTGr.js} +27 -26
  35. package/chunks/{tag-B1suqFhD.js → tag-BNARNuvq.js} +1 -1
  36. package/chunks/{textfield-C-lRIIil.js → textfield-DGF0M-RX.js} +3 -3
  37. package/chunks/{time-field-1I6BMlaj.js → time-field-KpetgpDY.js} +4 -4
  38. package/chunks/{toast-DTqQhHFN.js → toast-BO158amn.js} +2 -2
  39. package/chunks/{useLocalizedStringFormatter-DhIAL1D7.js → useLocalizedStringFormatter-DU97U9ZX.js} +4 -4
  40. package/clear-button/index.js +1 -1
  41. package/color-scheme-switch/index.js +1 -1
  42. package/combobox/index.js +1 -1
  43. package/date-field/index.js +1 -1
  44. package/date-picker/index.js +1 -1
  45. package/file-list/index.js +1 -1
  46. package/index.d.ts +1 -0
  47. package/index.js +51 -50
  48. package/info-banner/index.js +1 -1
  49. package/label/index.js +1 -1
  50. package/layout/index.js +1 -1
  51. package/link/index.js +1 -1
  52. package/link-button/index.js +1 -1
  53. package/list-box/index.js +1 -1
  54. package/logo/index.js +1 -1
  55. package/modal/index.js +1 -1
  56. package/package.json +1 -1
  57. package/progress-bar/index.js +1 -1
  58. package/radio/index.js +1 -1
  59. package/search-field/index.js +1 -1
  60. package/select/index.js +1 -1
  61. package/spinner/index.js +1 -1
  62. package/table/index.js +1 -1
  63. package/tag/index.js +1 -1
  64. package/textfield/index.js +1 -1
  65. package/time-field/index.js +1 -1
  66. package/toast/index.js +1 -1
  67. package/utils/intl/useLocalizedStringFormatter.d.ts +0 -2
  68. package/chunks/button-S2AY4EEn.js +0 -33
  69. package/chunks/date-picker-CLizY8Vq.js +0 -141
@@ -1,141 +0,0 @@
1
- 'use client';
2
- import { t as e } from "./clear-button-CeQy0RdK.js";
3
- import { t } from "./useLocalizedStringFormatter-DhIAL1D7.js";
4
- import { n } from "./button-S2AY4EEn.js";
5
- import { n as r, t as i } from "./calendar-BOTC3DKx.js";
6
- import { n as a, r as o, t as s } from "./date-field-DSBHnHdN.js";
7
- import { t as c } from "./field-error-C5ynuTRu.js";
8
- import { n as l, t as u } from "./label-B5-Kmj4t.js";
9
- import { t as d } from "./text-D7tnzTru.js";
10
- import * as f from "react";
11
- import { clsx as p } from "clsx";
12
- import { DatePicker as m, DatePickerStateContext as h, DateRangePicker as g, DateRangePickerStateContext as _, Group as v, Popover as y } from "react-aria-components";
13
- import { jsx as b, jsxs as x } from "react/jsx-runtime";
14
- import { CalendarDays as S } from "lucide-react";
15
- import { FocusScope as C, useFocusManager as w } from "react-aria";
16
- import '../assets/date-picker.css';var T = {
17
- en: {
18
- clear: "Clear date",
19
- "open-calendar": "Open calendar"
20
- },
21
- sv: {
22
- clear: "Rensa datum",
23
- "open-calendar": "Öppna kalender"
24
- }
25
- }, E = {
26
- datePicker: "_datePicker_14wog_1",
27
- inputField: "_inputField_14wog_8",
28
- medium: "_medium_14wog_24",
29
- readOnly: "_readOnly_14wog_47",
30
- buttonGroup: "_buttonGroup_14wog_52",
31
- iconButton: "_iconButton_14wog_58",
32
- popover: "_popover_14wog_81 _dropdownAnimation_1ljkv_4"
33
- }, D = (e) => !!e && !!e.value && Object.prototype.hasOwnProperty.call(e.value, "start"), O = ({ isClearable: n, isDisabled: r, isReadOnly: i, size: a }) => {
34
- let o = f.useContext(h), s = f.useContext(_), c = t(T), l = w(), u = s ?? o, d = D(u) ? !!u.value.start && u.value.end : !!u?.value;
35
- return n && d && !i ? /* @__PURE__ */ b(e, {
36
- onPress: () => {
37
- u?.setValue(null), l?.focusFirst();
38
- },
39
- size: a,
40
- isDisabled: r,
41
- "aria-label": c.format("clear"),
42
- className: p(E.iconButton, { [E.medium]: a === "medium" })
43
- }) : null;
44
- }, k = ({ children: e, isDisabled: r, isInvalid: i, isReadOnly: a, size: o = "large", isClearable: s = !1 }) => {
45
- let c = t(T);
46
- return /* @__PURE__ */ b(v, {
47
- className: p(E.inputField, {
48
- [E.medium]: o === "medium",
49
- [E.readOnly]: a
50
- }),
51
- children: /* @__PURE__ */ x(C, { children: [e, /* @__PURE__ */ x("div", {
52
- className: E.buttonGroup,
53
- children: [/* @__PURE__ */ b(O, {
54
- isClearable: s,
55
- isDisabled: r,
56
- isReadOnly: a,
57
- size: o
58
- }), /* @__PURE__ */ b(n, {
59
- variant: "icon",
60
- "aria-label": c.format("open-calendar"),
61
- className: p(E.iconButton, {
62
- [E.medium]: o === "medium",
63
- [E.readOnly]: a
64
- }),
65
- "data-invalid": i || void 0,
66
- size: o,
67
- children: /* @__PURE__ */ b(S, {
68
- "aria-hidden": !0,
69
- size: 20
70
- })
71
- })]
72
- })] })
73
- });
74
- }, A = ({ children: e }) => /* @__PURE__ */ b(y, {
75
- className: E.popover,
76
- children: e
77
- }), j = f.forwardRef(({ className: e, description: t, errorMessage: n, errorPosition: i = "top", label: s, popover: f, isClearable: h = !1, isReadOnly: g, isDisabled: _, size: v, ...y }, S) => /* @__PURE__ */ x(m, {
78
- className: p(E.datePicker, e),
79
- isReadOnly: g,
80
- isDisabled: _,
81
- ref: S,
82
- ...y,
83
- children: [
84
- /* @__PURE__ */ b(l, {
85
- popover: f,
86
- children: s && /* @__PURE__ */ b(u, { children: s })
87
- }),
88
- t && /* @__PURE__ */ b(d, {
89
- slot: "description",
90
- children: t
91
- }),
92
- i === "top" && /* @__PURE__ */ b(c, { children: n }),
93
- /* @__PURE__ */ b(k, {
94
- isClearable: h,
95
- isReadOnly: g,
96
- isDisabled: _,
97
- size: v,
98
- ...y,
99
- children: /* @__PURE__ */ b(a, { children: (e) => /* @__PURE__ */ b(o, { segment: e }) })
100
- }),
101
- i === "bottom" && /* @__PURE__ */ b(c, { children: n }),
102
- /* @__PURE__ */ b(A, { children: /* @__PURE__ */ b(r, {}) })
103
- ]
104
- })), M = ({ className: e, description: t, errorMessage: n, errorPosition: r = "top", label: f, popover: m, isClearable: h = !1, isReadOnly: _, isDisabled: v, size: y, ...S }) => /* @__PURE__ */ x(g, {
105
- className: p(E.datePicker, e),
106
- isReadOnly: _,
107
- isDisabled: v,
108
- ...S,
109
- children: [
110
- /* @__PURE__ */ b(l, {
111
- popover: m,
112
- children: f && /* @__PURE__ */ b(u, { children: f })
113
- }),
114
- t && /* @__PURE__ */ b(d, {
115
- slot: "description",
116
- children: t
117
- }),
118
- r === "top" && /* @__PURE__ */ b(c, { children: n }),
119
- /* @__PURE__ */ x(k, {
120
- isClearable: h,
121
- isReadOnly: _,
122
- isDisabled: v,
123
- size: y,
124
- ...S,
125
- children: [
126
- /* @__PURE__ */ b(a, {
127
- slot: "start",
128
- children: (e) => /* @__PURE__ */ b(o, { segment: e })
129
- }),
130
- /* @__PURE__ */ b(s, {}),
131
- /* @__PURE__ */ b(a, {
132
- slot: "end",
133
- children: (e) => /* @__PURE__ */ b(o, { segment: e })
134
- })
135
- ]
136
- }),
137
- r === "bottom" && /* @__PURE__ */ b(c, { children: n }),
138
- /* @__PURE__ */ b(A, { children: /* @__PURE__ */ b(i, {}) })
139
- ]
140
- });
141
- export { j as n, M as t };