asma-ui-core 3.64.2 → 3.64.3
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.
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ChevronLeftIcon as
|
|
2
|
-
import { ChevronRightIcon as
|
|
3
|
-
import { StyledButton as
|
|
1
|
+
import { ChevronLeftIcon as f } from "../../../shared-components/ChevronLeftIcon.js";
|
|
2
|
+
import { ChevronRightIcon as u } from "../../../shared-components/ChevronRightIcon.js";
|
|
3
|
+
import { StyledButton as e } from "../../../shared-components/button/StyledButton.js";
|
|
4
4
|
import { jsx as t, jsxs as s } from "react/jsx-runtime";
|
|
5
5
|
import { useNavigation as y } from "react-day-picker";
|
|
6
|
-
import { isDate as v, isValid as
|
|
7
|
-
var
|
|
8
|
-
const { nextMonth:
|
|
6
|
+
import { isDate as v, isValid as x } from "date-fns";
|
|
7
|
+
var j = ({ onClose: m, isNb: n, selected: i, removeSelection: h, setMonth: a, onClear: d, required: p }) => {
|
|
8
|
+
const { nextMonth: l, previousMonth: r } = y(), c = i == null ? !1 : Array.isArray(i) ? i.length > 0 : v(i) ? x(i) : typeof i == "object" ? Object.values(i).some(Boolean) : !0;
|
|
9
9
|
return /* @__PURE__ */ s("div", {
|
|
10
10
|
style: {
|
|
11
11
|
marginTop: "8px",
|
|
@@ -13,16 +13,16 @@ var b = ({ onClose: m, isNb: e, selected: i, removeSelection: h, setMonth: l, on
|
|
|
13
13
|
justifyContent: "space-between"
|
|
14
14
|
},
|
|
15
15
|
children: [
|
|
16
|
-
/* @__PURE__ */ t(
|
|
16
|
+
/* @__PURE__ */ t(e, {
|
|
17
17
|
dataTest: "",
|
|
18
18
|
variant: "text",
|
|
19
19
|
onClick: (o) => {
|
|
20
|
-
d ? d() : h(o),
|
|
20
|
+
d ? d() : h(o), a(new Date(Date.now()));
|
|
21
21
|
},
|
|
22
22
|
size: "small",
|
|
23
|
-
disabled: !!p ||
|
|
23
|
+
disabled: !!p || !c,
|
|
24
24
|
style: { minWidth: "60px" },
|
|
25
|
-
children:
|
|
25
|
+
children: n ? "Nullstill" : "Clear"
|
|
26
26
|
}),
|
|
27
27
|
/* @__PURE__ */ s("div", {
|
|
28
28
|
style: {
|
|
@@ -30,46 +30,46 @@ var b = ({ onClose: m, isNb: e, selected: i, removeSelection: h, setMonth: l, on
|
|
|
30
30
|
gap: 8
|
|
31
31
|
},
|
|
32
32
|
children: [
|
|
33
|
-
/* @__PURE__ */ t(
|
|
33
|
+
/* @__PURE__ */ t(e, {
|
|
34
34
|
dataTest: "",
|
|
35
35
|
variant: "outlined",
|
|
36
36
|
size: "small",
|
|
37
37
|
disabled: !r,
|
|
38
38
|
onClick: () => {
|
|
39
|
-
r &&
|
|
39
|
+
r && a(r);
|
|
40
40
|
},
|
|
41
41
|
style: { minWidth: "25px" },
|
|
42
|
-
children: /* @__PURE__ */ t(
|
|
42
|
+
children: /* @__PURE__ */ t(f, {
|
|
43
43
|
width: 20,
|
|
44
44
|
height: 20
|
|
45
45
|
})
|
|
46
46
|
}),
|
|
47
|
-
/* @__PURE__ */ t(
|
|
47
|
+
/* @__PURE__ */ t(e, {
|
|
48
48
|
dataTest: "",
|
|
49
49
|
size: "small",
|
|
50
50
|
onClick: () => {
|
|
51
|
-
|
|
51
|
+
a(new Date(Date.now()));
|
|
52
52
|
},
|
|
53
53
|
variant: "outlined",
|
|
54
|
-
children:
|
|
54
|
+
children: n ? "I dag" : "Today"
|
|
55
55
|
}),
|
|
56
|
-
/* @__PURE__ */ t(
|
|
56
|
+
/* @__PURE__ */ t(e, {
|
|
57
57
|
dataTest: "",
|
|
58
58
|
variant: "outlined",
|
|
59
59
|
size: "small",
|
|
60
|
-
disabled: !
|
|
60
|
+
disabled: !l,
|
|
61
61
|
onClick: () => {
|
|
62
|
-
|
|
62
|
+
l && a(l);
|
|
63
63
|
},
|
|
64
64
|
style: { minWidth: "25px" },
|
|
65
|
-
children: /* @__PURE__ */ t(
|
|
65
|
+
children: /* @__PURE__ */ t(u, {
|
|
66
66
|
width: 20,
|
|
67
67
|
height: 20
|
|
68
68
|
})
|
|
69
69
|
})
|
|
70
70
|
]
|
|
71
71
|
}),
|
|
72
|
-
/* @__PURE__ */ t(
|
|
72
|
+
/* @__PURE__ */ t(e, {
|
|
73
73
|
dataTest: "",
|
|
74
74
|
variant: "contained",
|
|
75
75
|
size: "small",
|
|
@@ -77,11 +77,11 @@ var b = ({ onClose: m, isNb: e, selected: i, removeSelection: h, setMonth: l, on
|
|
|
77
77
|
m?.(o, "backdropClick");
|
|
78
78
|
},
|
|
79
79
|
style: { minWidth: "60px" },
|
|
80
|
-
children:
|
|
80
|
+
children: n ? "Velg" : "Select"
|
|
81
81
|
})
|
|
82
82
|
]
|
|
83
83
|
});
|
|
84
84
|
};
|
|
85
85
|
export {
|
|
86
|
-
|
|
86
|
+
j as StyledCalendarPickerFooter
|
|
87
87
|
};
|