@midas-ds/components 17.0.0 → 17.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._datePicker_11j8a_1{font-family:var(--midas-typography-font-family);display:flex;flex-direction:column;align-items:flex-start}._inputField_11j8a_8{box-sizing:border-box;width:100%;height:var(--midas-size-150);align-items:center;background-color:var(--midas-field-01-base);border-bottom:1px solid var(--midas-border-color-primary);padding-left:1rem;display:flex;justify-content:flex-start;gap:1rem}@media(forced-colors:active){._inputField_11j8a_8{border:1px solid var(--midas-border-color-primary)}}._inputField_11j8a_8._medium_11j8a_24{height:var(--midas-size-130)}._inputField_11j8a_8[data-disabled]{cursor:not-allowed;border-color:var(--midas-border-color-disabled)}._inputField_11j8a_8:focus-visible,._inputField_11j8a_8[data-focus-visible]{outline:none}._inputField_11j8a_8[data-invalid]{border:none;box-shadow:var(--midas-state-invalid)}@media(forced-colors:active){._inputField_11j8a_8[data-invalid]{border:1px solid var(--midas-border-color-primary)}}._inputField_11j8a_8._readOnly_11j8a_47{background-color:transparent;border-color:var(--midas-border-color-subtle)}._inputField_11j8a_8 ._buttonGroup_11j8a_52{display:flex;margin-left:auto;height:100%}._inputField_11j8a_8 ._iconButton_11j8a_58{height:100%;aspect-ratio:1;border:none;padding:0}._inputField_11j8a_8 ._iconButton_11j8a_58[data-disabled]{background-color:transparent}._inputField_11j8a_8 ._iconButton_11j8a_58:focus-visible,._inputField_11j8a_8 ._iconButton_11j8a_58[data-focus-visible]{outline:none;box-shadow:var(--midas-state-focus-inset)}@media(forced-colors:active){._inputField_11j8a_8 ._iconButton_11j8a_58:focus-visible,._inputField_11j8a_8 ._iconButton_11j8a_58[data-focus-visible]{outline:3px solid highlight;outline-offset:2px}}._dialog_11j8a_81{box-shadow:0 3px 5px #0003}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as e, jsxs as h } from "react/jsx-runtime";
|
|
3
|
-
import { Group as x, DatePickerStateContext as F, DateRangePickerStateContext as
|
|
3
|
+
import { Group as x, DatePickerStateContext as F, DateRangePickerStateContext as j, Popover as B, Dialog as M, DatePicker as S, DateRangePicker as N } from "react-aria-components";
|
|
4
4
|
import { a as k } from "./clsx-AexbMWKp.js";
|
|
5
|
-
import { C as
|
|
6
|
-
import { D as _, b as f, a as
|
|
5
|
+
import { C as R, R as G } from "./RangeCalendar-DIMxoHhy.js";
|
|
6
|
+
import { D as _, b as f, a as L } from "./DateInputDivider-DwopMIb9.js";
|
|
7
7
|
import { F as P } from "./FieldError-BMTrvSof.js";
|
|
8
8
|
import { a as y, L as v } from "./Label-6GZmmff9.js";
|
|
9
9
|
import { T as D } from "./Text-BuXvuoqM.js";
|
|
10
10
|
import * as g from "react";
|
|
11
|
-
import { C as
|
|
12
|
-
import { FocusScope as
|
|
11
|
+
import { C as I } from "./ClearButton-DPm_d7SL.js";
|
|
12
|
+
import { FocusScope as V, useFocusManager as w } from "@react-aria/focus";
|
|
13
13
|
import { B as O } from "./Button-CaLOUTDO.js";
|
|
14
14
|
import { c as T } from "./createLucideIcon-CP-mMPfa.js";
|
|
15
15
|
import { u as $ } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
@@ -27,7 +27,7 @@ import '../assets/DateRangePicker.css';const E = [
|
|
|
27
27
|
], W = T("calendar-days", E), q = { clear: "Clear date" }, A = { clear: "Rensa datum" }, H = {
|
|
28
28
|
en: q,
|
|
29
29
|
sv: A
|
|
30
|
-
}, J = "
|
|
30
|
+
}, J = "_datePicker_11j8a_1", K = "_inputField_11j8a_8", Q = "_medium_11j8a_24", U = "_readOnly_11j8a_47", X = "_buttonGroup_11j8a_52", Y = "_iconButton_11j8a_58", Z = "_dialog_11j8a_81", o = {
|
|
31
31
|
datePicker: J,
|
|
32
32
|
inputField: K,
|
|
33
33
|
medium: Q,
|
|
@@ -41,18 +41,18 @@ import '../assets/DateRangePicker.css';const E = [
|
|
|
41
41
|
isReadOnly: i,
|
|
42
42
|
size: a
|
|
43
43
|
}) => {
|
|
44
|
-
const
|
|
44
|
+
const r = g.useContext(F), s = g.useContext(j), u = $(H), l = w(), n = s ?? r, p = z(n) ? !!n.value.start && n.value.end : !!n?.value;
|
|
45
45
|
return t && p && !i ? /* @__PURE__ */ e(
|
|
46
|
-
|
|
46
|
+
I,
|
|
47
47
|
{
|
|
48
48
|
onPress: () => {
|
|
49
|
-
|
|
49
|
+
n?.setValue(null), l?.focusFirst();
|
|
50
50
|
},
|
|
51
51
|
size: a,
|
|
52
52
|
isDisabled: c,
|
|
53
53
|
"aria-label": u.format("clear"),
|
|
54
|
-
className: k(
|
|
55
|
-
[
|
|
54
|
+
className: k(o.iconButton, {
|
|
55
|
+
[o.medium]: a === "medium"
|
|
56
56
|
})
|
|
57
57
|
}
|
|
58
58
|
) : null;
|
|
@@ -61,37 +61,37 @@ import '../assets/DateRangePicker.css';const E = [
|
|
|
61
61
|
isDisabled: c,
|
|
62
62
|
isInvalid: i,
|
|
63
63
|
isReadOnly: a,
|
|
64
|
-
size:
|
|
64
|
+
size: r = "large",
|
|
65
65
|
isClearable: s = !1
|
|
66
66
|
}) => /* @__PURE__ */ e(
|
|
67
67
|
x,
|
|
68
68
|
{
|
|
69
|
-
className: k(
|
|
70
|
-
[
|
|
71
|
-
[
|
|
69
|
+
className: k(o.inputField, {
|
|
70
|
+
[o.medium]: r === "medium",
|
|
71
|
+
[o.readOnly]: a
|
|
72
72
|
}),
|
|
73
|
-
children: /* @__PURE__ */ h(
|
|
73
|
+
children: /* @__PURE__ */ h(V, { children: [
|
|
74
74
|
t,
|
|
75
|
-
/* @__PURE__ */ h("div", { className:
|
|
75
|
+
/* @__PURE__ */ h("div", { className: o.buttonGroup, children: [
|
|
76
76
|
/* @__PURE__ */ e(
|
|
77
77
|
ee,
|
|
78
78
|
{
|
|
79
79
|
isClearable: s,
|
|
80
80
|
isDisabled: c,
|
|
81
81
|
isReadOnly: a,
|
|
82
|
-
size:
|
|
82
|
+
size: r
|
|
83
83
|
}
|
|
84
84
|
),
|
|
85
85
|
/* @__PURE__ */ e(
|
|
86
86
|
O,
|
|
87
87
|
{
|
|
88
88
|
variant: "icon",
|
|
89
|
-
className: k(
|
|
90
|
-
[
|
|
91
|
-
[
|
|
89
|
+
className: k(o.iconButton, {
|
|
90
|
+
[o.medium]: r === "medium",
|
|
91
|
+
[o.readOnly]: a
|
|
92
92
|
}),
|
|
93
93
|
"data-invalid": i || void 0,
|
|
94
|
-
size:
|
|
94
|
+
size: r,
|
|
95
95
|
children: /* @__PURE__ */ e(
|
|
96
96
|
W,
|
|
97
97
|
{
|
|
@@ -106,42 +106,42 @@ import '../assets/DateRangePicker.css';const E = [
|
|
|
106
106
|
}
|
|
107
107
|
), b = ({
|
|
108
108
|
children: t
|
|
109
|
-
}) => /* @__PURE__ */ e(
|
|
109
|
+
}) => /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(M, { className: o.dialog, children: t }) }), he = ({
|
|
110
110
|
className: t,
|
|
111
111
|
description: c,
|
|
112
112
|
errorMessage: i,
|
|
113
113
|
errorPosition: a = "top",
|
|
114
|
-
label:
|
|
114
|
+
label: r,
|
|
115
115
|
popover: s,
|
|
116
116
|
isClearable: u = !1,
|
|
117
|
-
isReadOnly:
|
|
118
|
-
isDisabled:
|
|
117
|
+
isReadOnly: l,
|
|
118
|
+
isDisabled: n,
|
|
119
119
|
size: p,
|
|
120
|
-
...
|
|
120
|
+
...d
|
|
121
121
|
}) => /* @__PURE__ */ h(
|
|
122
|
-
|
|
122
|
+
S,
|
|
123
123
|
{
|
|
124
|
-
className: k(
|
|
125
|
-
isReadOnly:
|
|
126
|
-
isDisabled:
|
|
127
|
-
...
|
|
124
|
+
className: k(o.datePicker, t),
|
|
125
|
+
isReadOnly: l,
|
|
126
|
+
isDisabled: n,
|
|
127
|
+
...d,
|
|
128
128
|
children: [
|
|
129
|
-
/* @__PURE__ */ e(y, { popover: s, children:
|
|
129
|
+
/* @__PURE__ */ e(y, { popover: s, children: r && /* @__PURE__ */ e(v, { children: r }) }),
|
|
130
130
|
c && /* @__PURE__ */ e(D, { slot: "description", children: c }),
|
|
131
131
|
a === "top" && /* @__PURE__ */ e(P, { children: i }),
|
|
132
132
|
/* @__PURE__ */ e(
|
|
133
133
|
C,
|
|
134
134
|
{
|
|
135
135
|
isClearable: u,
|
|
136
|
-
isReadOnly:
|
|
137
|
-
isDisabled:
|
|
136
|
+
isReadOnly: l,
|
|
137
|
+
isDisabled: n,
|
|
138
138
|
size: p,
|
|
139
|
-
...
|
|
139
|
+
...d,
|
|
140
140
|
children: /* @__PURE__ */ e(_, { children: (m) => /* @__PURE__ */ e(f, { segment: m }) })
|
|
141
141
|
}
|
|
142
142
|
),
|
|
143
143
|
a === "bottom" && /* @__PURE__ */ e(P, { children: i }),
|
|
144
|
-
/* @__PURE__ */ e(b, { children: /* @__PURE__ */ e(
|
|
144
|
+
/* @__PURE__ */ e(b, { children: /* @__PURE__ */ e(R, {}) })
|
|
145
145
|
]
|
|
146
146
|
}
|
|
147
147
|
), ke = ({
|
|
@@ -149,41 +149,41 @@ import '../assets/DateRangePicker.css';const E = [
|
|
|
149
149
|
description: c,
|
|
150
150
|
errorMessage: i,
|
|
151
151
|
errorPosition: a = "top",
|
|
152
|
-
label:
|
|
152
|
+
label: r,
|
|
153
153
|
popover: s,
|
|
154
154
|
isClearable: u = !1,
|
|
155
|
-
isReadOnly:
|
|
156
|
-
isDisabled:
|
|
155
|
+
isReadOnly: l,
|
|
156
|
+
isDisabled: n,
|
|
157
157
|
size: p,
|
|
158
|
-
...
|
|
158
|
+
...d
|
|
159
159
|
}) => /* @__PURE__ */ h(
|
|
160
|
-
|
|
160
|
+
N,
|
|
161
161
|
{
|
|
162
|
-
className: k(
|
|
163
|
-
isReadOnly:
|
|
164
|
-
isDisabled:
|
|
165
|
-
...
|
|
162
|
+
className: k(o.datePicker, t),
|
|
163
|
+
isReadOnly: l,
|
|
164
|
+
isDisabled: n,
|
|
165
|
+
...d,
|
|
166
166
|
children: [
|
|
167
|
-
/* @__PURE__ */ e(y, { popover: s, children:
|
|
167
|
+
/* @__PURE__ */ e(y, { popover: s, children: r && /* @__PURE__ */ e(v, { children: r }) }),
|
|
168
168
|
c && /* @__PURE__ */ e(D, { slot: "description", children: c }),
|
|
169
169
|
a === "top" && /* @__PURE__ */ e(P, { children: i }),
|
|
170
170
|
/* @__PURE__ */ h(
|
|
171
171
|
C,
|
|
172
172
|
{
|
|
173
173
|
isClearable: u,
|
|
174
|
-
isReadOnly:
|
|
175
|
-
isDisabled:
|
|
174
|
+
isReadOnly: l,
|
|
175
|
+
isDisabled: n,
|
|
176
176
|
size: p,
|
|
177
|
-
...
|
|
177
|
+
...d,
|
|
178
178
|
children: [
|
|
179
179
|
/* @__PURE__ */ e(_, { slot: "start", children: (m) => /* @__PURE__ */ e(f, { segment: m }) }),
|
|
180
|
-
/* @__PURE__ */ e(
|
|
180
|
+
/* @__PURE__ */ e(L, {}),
|
|
181
181
|
/* @__PURE__ */ e(_, { slot: "end", children: (m) => /* @__PURE__ */ e(f, { segment: m }) })
|
|
182
182
|
]
|
|
183
183
|
}
|
|
184
184
|
),
|
|
185
185
|
a === "bottom" && /* @__PURE__ */ e(P, { children: i }),
|
|
186
|
-
/* @__PURE__ */ e(b, { children: /* @__PURE__ */ e(
|
|
186
|
+
/* @__PURE__ */ e(b, { children: /* @__PURE__ */ e(G, {}) })
|
|
187
187
|
]
|
|
188
188
|
}
|
|
189
189
|
);
|
package/date-picker/index.js
CHANGED
package/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import { C as N } from "./chunks/ColorSchemeSwitch-DOQ0yjtt.js";
|
|
|
13
13
|
import { C as y } from "./chunks/ComboBox-XaJDIr5h.js";
|
|
14
14
|
import { D as z } from "./chunks/DateField-6CclHfL2.js";
|
|
15
15
|
import { D as Q, a as V, b as Z } from "./chunks/DateInputDivider-DwopMIb9.js";
|
|
16
|
-
import { D as q, a as J } from "./chunks/DateRangePicker-
|
|
16
|
+
import { D as q, a as J } from "./chunks/DateRangePicker-BoL-sn9u.js";
|
|
17
17
|
import { F as U } from "./chunks/FieldError-BMTrvSof.js";
|
|
18
18
|
import { D as X, F as Y } from "./chunks/FileUpload-Cu8DCSjX.js";
|
|
19
19
|
import { G as $ } from "./chunks/Grid-CettmpaZ.js";
|
|
@@ -49,7 +49,7 @@ import { c as Na } from "./chunks/clsx-AexbMWKp.js";
|
|
|
49
49
|
import { DialogTrigger as ya, MenuTrigger as Ea, RouterProvider as za } from "react-aria-components";
|
|
50
50
|
import { u as Qa } from "./chunks/useLocalizedStringFormatter-BHvsRxDk.js";
|
|
51
51
|
import { useToastState as Za } from "react-stately";
|
|
52
|
-
const o = "17.0.
|
|
52
|
+
const o = "17.0.1", a = {
|
|
53
53
|
version: o
|
|
54
54
|
}, r = a.version;
|
|
55
55
|
export {
|
package/package.json
CHANGED