@dotss/ui 0.0.10 → 0.0.11
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/Accordion/Accordion.cjs +13 -7
- package/Accordion/Accordion.d.ts +2 -0
- package/Accordion/Accordion.es.js +86 -65
- package/Autocomplete/Autocomplete.cjs +1 -1
- package/Autocomplete/Autocomplete.d.ts +1 -1
- package/Autocomplete/Autocomplete.es.js +235 -80
- package/BottomSheet/BottomSheet.cjs +5 -5
- package/BottomSheet/BottomSheet.d.ts +3 -0
- package/BottomSheet/BottomSheet.es.js +88 -70
- package/BottomSheet/BottomSheetText/BottomSheetText.cjs +2 -2
- package/BottomSheet/BottomSheetText/BottomSheetText.es.js +18 -6
- package/BottomSheet/BottomSheetTitle/BottomSheetTitle.cjs +6 -6
- package/BottomSheet/BottomSheetTitle/BottomSheetTitle.d.ts +2 -1
- package/BottomSheet/BottomSheetTitle/BottomSheetTitle.es.js +26 -15
- package/Button/Button.cjs +6 -6
- package/Button/Button.es.js +35 -29
- package/ChainPicker/ChainPicker.cjs +16 -6
- package/ChainPicker/ChainPicker.d.ts +4 -2
- package/ChainPicker/ChainPicker.es.js +155 -110
- package/ChainPicker/ChainPicker.stories.d.ts +1 -1
- package/Checkbox/Checkbox.cjs +3 -3
- package/Checkbox/Checkbox.es.js +12 -10
- package/CircularProgressIndicator/CircularProgressIndicator.cjs +5 -5
- package/CircularProgressIndicator/CircularProgressIndicator.es.js +26 -23
- package/DatePicker/DatePicker.cjs +37 -20
- package/DatePicker/DatePicker.d.ts +2 -1
- package/DatePicker/DatePicker.es.js +345 -320
- package/DatePicker/DatePicker.stories.d.ts +1 -0
- package/DatePicker/EventDot/EventDot.cjs +8 -0
- package/DatePicker/EventDot/EventDot.d.ts +8 -0
- package/DatePicker/EventDot/EventDot.es.js +19 -0
- package/DatePicker/EventDot/index.cjs +1 -0
- package/DatePicker/EventDot/index.d.ts +3 -0
- package/DatePicker/EventDot/index.es.js +4 -0
- package/DatePicker/EventDotGroup/EventDotGroup.cjs +8 -0
- package/DatePicker/EventDotGroup/EventDotGroup.d.ts +8 -0
- package/DatePicker/EventDotGroup/EventDotGroup.es.js +39 -0
- package/DatePicker/EventDotGroup/index.cjs +1 -0
- package/DatePicker/EventDotGroup/index.d.ts +3 -0
- package/DatePicker/EventDotGroup/index.es.js +4 -0
- package/DatePicker/index.cjs +1 -1
- package/DatePicker/index.d.ts +2 -0
- package/DatePicker/index.es.js +6 -2
- package/Dialog/Dialog.cjs +2 -2
- package/Dialog/Dialog.d.ts +2 -0
- package/Dialog/Dialog.es.js +45 -40
- package/Dialog/Dialog.stories.d.ts +10 -0
- package/Dialog/DialogText/DialogText.cjs +1 -1
- package/Dialog/DialogText/DialogText.es.js +1 -1
- package/Dialog/DialogTitle/DialogTitle.cjs +4 -4
- package/Dialog/DialogTitle/DialogTitle.d.ts +2 -1
- package/Dialog/DialogTitle/DialogTitle.es.js +17 -17
- package/FocusBoundary/FocusBoundary.cjs +1 -1
- package/FocusBoundary/FocusBoundary.d.ts +3 -1
- package/FocusBoundary/FocusBoundary.es.js +49 -42
- package/FormControlText/FormControlText.cjs +7 -5
- package/FormControlText/FormControlText.d.ts +2 -0
- package/FormControlText/FormControlText.es.js +50 -40
- package/Icon/Icon.cjs +1 -1
- package/Icon/Icon.es.js +1 -1
- package/IconButton/IconButton.cjs +8 -8
- package/IconButton/IconButton.es.js +32 -25
- package/LineProgressIndicator/LineProgressIndicator.cjs +6 -6
- package/LineProgressIndicator/LineProgressIndicator.es.js +35 -23
- package/Menu/Menu.cjs +16 -16
- package/Menu/Menu.d.ts +3 -2
- package/Menu/Menu.es.js +115 -81
- package/Menu/Menu.stories.d.ts +1 -0
- package/Menu/MenuBlock/MenuBlock.cjs +14 -7
- package/Menu/MenuBlock/MenuBlock.d.ts +1 -0
- package/Menu/MenuBlock/MenuBlock.es.js +47 -35
- package/Menu/MenuButton/MenuButton.cjs +1 -0
- package/Menu/MenuButton/MenuButton.d.ts +10 -0
- package/Menu/MenuButton/MenuButton.es.js +44 -0
- package/Menu/MenuButton/index.cjs +1 -0
- package/Menu/MenuButton/index.d.ts +3 -0
- package/Menu/MenuButton/index.es.js +4 -0
- package/Menu/index.cjs +1 -1
- package/Menu/index.d.ts +1 -0
- package/Menu/index.es.js +4 -2
- package/NumberKeypad/NumberKeypad.cjs +2 -2
- package/NumberKeypad/NumberKeypad.es.js +18 -16
- package/NumberKeypad/NumberKeypadBlock/NumberKeypadBlock.cjs +1 -1
- package/NumberKeypad/NumberKeypadBlock/NumberKeypadBlock.es.js +10 -1
- package/PageControl/PageControl.cjs +16 -5
- package/PageControl/PageControl.d.ts +3 -0
- package/PageControl/PageControl.es.js +77 -24
- package/PageControl/PageControl.stories.d.ts +1 -0
- package/Radio/Radio.cjs +3 -3
- package/Radio/Radio.es.js +22 -20
- package/RadioGroup/RadioGroup.cjs +1 -0
- package/RadioGroup/RadioGroup.d.ts +8 -0
- package/RadioGroup/RadioGroup.es.js +28 -0
- package/RadioGroup/RadioGroup.stories.d.ts +14 -0
- package/RadioGroup/index.cjs +1 -0
- package/RadioGroup/index.d.ts +3 -0
- package/RadioGroup/index.es.js +4 -0
- package/SegmentedButton/SegmentedButton.cjs +14 -3
- package/SegmentedButton/SegmentedButton.es.js +108 -34
- package/Select/Select.cjs +4 -4
- package/Select/Select.es.js +95 -86
- package/Slider/Slider.cjs +27 -12
- package/Slider/Slider.d.ts +1 -0
- package/Slider/Slider.es.js +177 -90
- package/Switch/Switch.cjs +28 -11
- package/Switch/Switch.d.ts +2 -0
- package/Switch/Switch.es.js +185 -65
- package/Switch/Switch.stories.d.ts +1 -0
- package/Tab/Tab.es.js +2 -4
- package/TextArea/TextArea.cjs +42 -34
- package/TextArea/TextArea.es.js +116 -82
- package/TextArea/TextArea.stories.d.ts +1 -1
- package/TextField/TextField.cjs +29 -13
- package/TextField/TextField.d.ts +2 -1
- package/TextField/TextField.es.js +122 -79
- package/TextField/TextField.stories.d.ts +1 -0
- package/Tooltip/Tooltip.cjs +7 -6
- package/Tooltip/Tooltip.d.ts +8 -3
- package/Tooltip/Tooltip.es.js +248 -146
- package/Tooltip/Tooltip.stories.d.ts +1 -0
- package/hooks/index.cjs +1 -1
- package/hooks/index.d.ts +3 -0
- package/hooks/index.es.js +7 -1
- package/hooks/useCheckHasFocus/useCheckHasFocus.cjs +1 -0
- package/hooks/useCheckHasFocus/useCheckHasFocus.d.ts +9 -0
- package/hooks/useCheckHasFocus/useCheckHasFocus.es.js +21 -0
- package/hooks/useCheckKeyboardMode/useCheckKeyboardMode.cjs +1 -0
- package/hooks/useCheckKeyboardMode/useCheckKeyboardMode.d.ts +4 -0
- package/hooks/useCheckKeyboardMode/useCheckKeyboardMode.es.js +30 -0
- package/hooks/useFocusBoundary/useFocusBoundary.cjs +1 -0
- package/hooks/useFocusBoundary/useFocusBoundary.d.ts +12 -0
- package/hooks/useFocusBoundary/useFocusBoundary.es.js +63 -0
- package/index.cjs +1 -1
- package/index.d.ts +2 -1
- package/index.es.js +97 -90
- package/package.json +3 -3
- package/resources/tictoccroc/icons/fill/certified-fill.svg-B_RVx6K_.cjs +1 -0
- package/resources/tictoccroc/icons/fill/certified-fill.svg-CK7UqYft.js +5 -0
- package/resources/tictoccroc/icons/fill/index.d.ts +3 -0
- package/resources/tictoccroc/icons/fill/location-fill.svg-DfSHAnsd.js +5 -0
- package/resources/tictoccroc/icons/fill/location-fill.svg-Die9mxQH.cjs +1 -0
- package/resources/tictoccroc/icons/fill/send-fill.svg-CItD_2L1.js +5 -0
- package/resources/tictoccroc/icons/fill/send-fill.svg-D197Lwl0.cjs +1 -0
- package/resources/tictoccroc/icons/index.ts-BmqvB_n6.cjs +1 -0
- package/resources/tictoccroc/icons/index.ts-CzTh-XsD.js +228 -0
- package/resources/tictoccroc/icons/line/index.d.ts +4 -0
- package/resources/tictoccroc/icons/line/list-line.svg-r5d5htjN.cjs +1 -0
- package/resources/tictoccroc/icons/line/list-line.svg-yFfhZxUp.js +5 -0
- package/resources/tictoccroc/icons/line/monthly-line.svg-BdyaJ1t_.cjs +1 -0
- package/resources/tictoccroc/icons/line/monthly-line.svg-DY5-Xv34.js +5 -0
- package/resources/tictoccroc/icons/line/review-line.svg-B4rfJrsO.js +5 -0
- package/resources/tictoccroc/icons/line/review-line.svg-DYUuUybx.cjs +1 -0
- package/resources/tictoccroc/icons/line/weekly-line.svg-BCO-LS_a.cjs +1 -0
- package/resources/tictoccroc/icons/line/weekly-line.svg-BUPmmgeE.js +5 -0
- package/utils/getIconLabel/getIconLabel.cjs +1 -1
- package/utils/getIconLabel/getIconLabel.es.js +8 -1
- package/utils/getSibling/getSibling.es.js +1 -2
- package/resources/tictoccroc/icons/index.ts-CarI_z7q.js +0 -214
- package/resources/tictoccroc/icons/index.ts-IVJAK4qr.cjs +0 -1
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
1
|
+
import { jsxs as H, jsx as u } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Pt, useState as Y, useRef as v, useCallback as te, useLayoutEffect as Yt, useEffect as Z } from "react";
|
|
3
|
+
import ct from "../IconButton/IconButton.es.js";
|
|
4
|
+
import ee from "../Menu/Menu.es.js";
|
|
5
|
+
import ne from "../Menu/MenuBlock/MenuBlock.es.js";
|
|
6
|
+
import "../Menu/MenuButton/MenuButton.es.js";
|
|
7
|
+
import re from "../core/useTheme.es.js";
|
|
8
|
+
import x from "@emotion/styled";
|
|
9
|
+
import P from "../utils/getContrastingTextColor/getContrastingTextColor.es.js";
|
|
10
|
+
const ie = x.div`
|
|
11
|
+
position: relative;
|
|
10
12
|
display: flex;
|
|
11
13
|
flex-direction: column;
|
|
12
14
|
gap: ${({ theme: { spacing: t } }) => t.content(2)}px;
|
|
13
|
-
`,
|
|
15
|
+
`, se = x.div`
|
|
14
16
|
display: inline-flex;
|
|
15
17
|
align-items: center;
|
|
16
18
|
justify-content: flex-start;
|
|
@@ -28,7 +30,7 @@ const Zt = T.div`
|
|
|
28
30
|
lineHeight: t.lineHeight,
|
|
29
31
|
letterSpacing: t.letterSpacing
|
|
30
32
|
})};
|
|
31
|
-
`,
|
|
33
|
+
`, oe = x.div`
|
|
32
34
|
display: flex;
|
|
33
35
|
align-items: center;
|
|
34
36
|
justify-content: center;
|
|
@@ -44,10 +46,10 @@ const Zt = T.div`
|
|
|
44
46
|
lineHeight: t.lineHeight,
|
|
45
47
|
letterSpacing: t.letterSpacing
|
|
46
48
|
})};
|
|
47
|
-
`,
|
|
49
|
+
`, ce = x.div`
|
|
48
50
|
display: flex;
|
|
49
51
|
align-items: center;
|
|
50
|
-
padding: 0 ${({ theme: { spacing: t }, edgeSpacing:
|
|
52
|
+
padding: 0 ${({ theme: { spacing: t }, edgeSpacing: n }) => t.content(n || 0)}px;
|
|
51
53
|
|
|
52
54
|
& > span {
|
|
53
55
|
margin: 5px 0;
|
|
@@ -56,44 +58,55 @@ const Zt = T.div`
|
|
|
56
58
|
${({
|
|
57
59
|
theme: {
|
|
58
60
|
palette: { grey: t },
|
|
59
|
-
typography: { b4M:
|
|
61
|
+
typography: { b4M: n }
|
|
60
62
|
}
|
|
61
63
|
}) => ({
|
|
62
|
-
fontSize:
|
|
63
|
-
fontWeight:
|
|
64
|
-
lineHeight:
|
|
65
|
-
letterSpacing:
|
|
64
|
+
fontSize: n.size,
|
|
65
|
+
fontWeight: n.weight,
|
|
66
|
+
lineHeight: n.lineHeight,
|
|
67
|
+
letterSpacing: n.letterSpacing,
|
|
66
68
|
color: t[50]
|
|
67
69
|
})};
|
|
68
70
|
}
|
|
69
|
-
`,
|
|
71
|
+
`, ae = x.div`
|
|
70
72
|
overflow: hidden;
|
|
71
|
-
`,
|
|
73
|
+
`, le = x.div`
|
|
72
74
|
display: flex;
|
|
73
75
|
transform: translate3d(0, 0, 0);
|
|
74
|
-
`,
|
|
76
|
+
`, Ft = x.div`
|
|
75
77
|
display: flex;
|
|
76
78
|
flex-direction: column;
|
|
77
79
|
min-width: 100%;
|
|
78
80
|
gap: ${({ theme: { spacing: t } }) => t.content(2)}px;
|
|
79
81
|
padding: ${({ theme: { spacing: t } }) => t.content(2)}px
|
|
80
|
-
${({ theme: { spacing: t }, edgeSpacing:
|
|
81
|
-
`,
|
|
82
|
+
${({ theme: { spacing: t }, edgeSpacing: n }) => t.content(n || 0)}px;
|
|
83
|
+
`, jt = x.div`
|
|
82
84
|
display: flex;
|
|
83
85
|
width: 100%;
|
|
84
|
-
`,
|
|
86
|
+
`, Ot = x.div`
|
|
85
87
|
position: relative;
|
|
86
88
|
display: inline-flex;
|
|
87
89
|
align-items: center;
|
|
88
90
|
justify-content: center;
|
|
91
|
+
flex-direction: column;
|
|
92
|
+
gap: ${({ theme: { spacing: t } }) => t.content(1)}px;
|
|
89
93
|
flex: 1;
|
|
90
|
-
min-width: 30px;
|
|
91
|
-
min-height: 30px;
|
|
92
|
-
max-height: 30px;
|
|
93
94
|
cursor: ${({ disabled: t }) => t ? "not-allowed" : "pointer"};
|
|
94
95
|
pointer-events: ${({ disabled: t }) => t ? "none" : "auto"};
|
|
95
|
-
|
|
96
|
+
min-width: 30px;
|
|
97
|
+
|
|
98
|
+
& > div:nth-of-type(1) {
|
|
99
|
+
position: relative;
|
|
100
|
+
display: inline-flex;
|
|
101
|
+
align-items: center;
|
|
102
|
+
justify-content: center;
|
|
103
|
+
width: 100%;
|
|
104
|
+
min-height: 30px;
|
|
96
105
|
z-index: 1;
|
|
106
|
+
|
|
107
|
+
& > span {
|
|
108
|
+
z-index: 2;
|
|
109
|
+
}
|
|
97
110
|
}
|
|
98
111
|
|
|
99
112
|
${({
|
|
@@ -109,18 +122,18 @@ const Zt = T.div`
|
|
|
109
122
|
|
|
110
123
|
${({
|
|
111
124
|
theme: {
|
|
112
|
-
palette: { brand: t, grey:
|
|
125
|
+
palette: { brand: t, grey: n }
|
|
113
126
|
},
|
|
114
|
-
variant:
|
|
115
|
-
today:
|
|
116
|
-
selected:
|
|
117
|
-
disabled:
|
|
127
|
+
variant: r,
|
|
128
|
+
today: i,
|
|
129
|
+
selected: o,
|
|
130
|
+
disabled: l
|
|
118
131
|
}) => {
|
|
119
|
-
if (
|
|
120
|
-
let
|
|
132
|
+
if (o) {
|
|
133
|
+
let s = {
|
|
121
134
|
fontWeight: 700,
|
|
122
|
-
color:
|
|
123
|
-
"
|
|
135
|
+
color: P(t.primary.main, [n.white, n[100]]),
|
|
136
|
+
"& > div:nth-of-type(1):before": {
|
|
124
137
|
content: '""',
|
|
125
138
|
position: "absolute",
|
|
126
139
|
top: "50%",
|
|
@@ -128,15 +141,15 @@ const Zt = T.div`
|
|
|
128
141
|
width: 30,
|
|
129
142
|
height: 30,
|
|
130
143
|
transform: "translate(-50%, -50%)",
|
|
131
|
-
backgroundColor:
|
|
144
|
+
backgroundColor: l ? t.primary.disable : t.primary.main,
|
|
132
145
|
borderRadius: "50%"
|
|
133
146
|
}
|
|
134
147
|
};
|
|
135
|
-
return
|
|
148
|
+
return r === "start" && (s = {
|
|
136
149
|
fontWeight: 700,
|
|
137
|
-
color:
|
|
150
|
+
color: P(t.primary.main, [n.white, n[100]]),
|
|
138
151
|
overflow: "hidden",
|
|
139
|
-
"
|
|
152
|
+
"& > div:nth-of-type(1):before": {
|
|
140
153
|
content: '""',
|
|
141
154
|
position: "absolute",
|
|
142
155
|
top: "50%",
|
|
@@ -144,11 +157,11 @@ const Zt = T.div`
|
|
|
144
157
|
width: 30,
|
|
145
158
|
height: 30,
|
|
146
159
|
transform: "translate(-50%, -50%)",
|
|
147
|
-
backgroundColor:
|
|
160
|
+
backgroundColor: l ? t.primary.disable : t.primary.main,
|
|
148
161
|
borderTopLeftRadius: 100,
|
|
149
162
|
borderBottomLeftRadius: 100
|
|
150
163
|
},
|
|
151
|
-
"
|
|
164
|
+
"& > div:nth-of-type(1):after": {
|
|
152
165
|
content: '""',
|
|
153
166
|
position: "absolute",
|
|
154
167
|
top: "50%",
|
|
@@ -156,13 +169,13 @@ const Zt = T.div`
|
|
|
156
169
|
width: "100%",
|
|
157
170
|
height: 30,
|
|
158
171
|
transform: "translateY(-50%)",
|
|
159
|
-
backgroundColor:
|
|
172
|
+
backgroundColor: l ? t.primary.disable : t.primary.main
|
|
160
173
|
}
|
|
161
|
-
}),
|
|
174
|
+
}), r === "end" && (s = {
|
|
162
175
|
fontWeight: 700,
|
|
163
|
-
color:
|
|
176
|
+
color: P(t.primary.main, [n.white, n[100]]),
|
|
164
177
|
overflow: "hidden",
|
|
165
|
-
"
|
|
178
|
+
"& > div:nth-of-type(1):before": {
|
|
166
179
|
content: '""',
|
|
167
180
|
position: "absolute",
|
|
168
181
|
top: "50%",
|
|
@@ -170,25 +183,25 @@ const Zt = T.div`
|
|
|
170
183
|
width: 30,
|
|
171
184
|
height: 30,
|
|
172
185
|
transform: "translate(-50%, -50%)",
|
|
173
|
-
backgroundColor:
|
|
186
|
+
backgroundColor: l ? t.primary.disable : t.primary.main,
|
|
174
187
|
borderTopRightRadius: 100,
|
|
175
188
|
borderBottomRightRadius: 100
|
|
176
189
|
},
|
|
177
|
-
"
|
|
190
|
+
"& > div:nth-of-type(1):after": {
|
|
178
191
|
content: '""',
|
|
179
192
|
position: "absolute",
|
|
180
193
|
top: "50%",
|
|
181
|
-
right:
|
|
194
|
+
right: "50%",
|
|
182
195
|
width: "100%",
|
|
183
196
|
height: 30,
|
|
184
197
|
transform: "translateY(-50%)",
|
|
185
|
-
backgroundColor:
|
|
198
|
+
backgroundColor: l ? t.primary.disable : t.primary.main
|
|
186
199
|
}
|
|
187
|
-
}),
|
|
200
|
+
}), r === "middle" && (s = {
|
|
188
201
|
fontWeight: 700,
|
|
189
|
-
color:
|
|
202
|
+
color: P(t.primary.main, [n.white, n[100]]),
|
|
190
203
|
overflow: "hidden",
|
|
191
|
-
"
|
|
204
|
+
"& > div:nth-of-type(1):after": {
|
|
192
205
|
content: '""',
|
|
193
206
|
position: "absolute",
|
|
194
207
|
top: "50%",
|
|
@@ -196,12 +209,12 @@ const Zt = T.div`
|
|
|
196
209
|
width: "calc(100% + 1px)",
|
|
197
210
|
height: 30,
|
|
198
211
|
transform: "translate(-50%, -50%)",
|
|
199
|
-
backgroundColor:
|
|
212
|
+
backgroundColor: l ? t.primary.disable : t.primary.main
|
|
200
213
|
}
|
|
201
|
-
}),
|
|
214
|
+
}), s;
|
|
202
215
|
}
|
|
203
|
-
return
|
|
204
|
-
"
|
|
216
|
+
return i ? {
|
|
217
|
+
"& > div:nth-of-type(1):after": {
|
|
205
218
|
content: '""',
|
|
206
219
|
position: "absolute",
|
|
207
220
|
top: "50%",
|
|
@@ -217,383 +230,395 @@ const Zt = T.div`
|
|
|
217
230
|
|
|
218
231
|
${({
|
|
219
232
|
theme: {
|
|
220
|
-
palette: { grey: t, pink:
|
|
233
|
+
palette: { grey: t, pink: n, brand: r }
|
|
221
234
|
},
|
|
222
|
-
holiday:
|
|
223
|
-
disabled:
|
|
224
|
-
selected:
|
|
235
|
+
holiday: i,
|
|
236
|
+
disabled: o,
|
|
237
|
+
selected: l
|
|
225
238
|
}) => {
|
|
226
|
-
let
|
|
227
|
-
return
|
|
228
|
-
color:
|
|
229
|
-
|
|
230
|
-
|
|
239
|
+
let s = null;
|
|
240
|
+
return i && (s = {
|
|
241
|
+
color: P(l ? r.primary.main : "transparent", [
|
|
242
|
+
n[30],
|
|
243
|
+
n[100]
|
|
231
244
|
])
|
|
232
|
-
}),
|
|
245
|
+
}), o && (s = {
|
|
233
246
|
color: t[30]
|
|
234
|
-
}),
|
|
235
|
-
color:
|
|
236
|
-
}),
|
|
247
|
+
}), o && i && (s = {
|
|
248
|
+
color: n[30]
|
|
249
|
+
}), s;
|
|
237
250
|
}}
|
|
238
|
-
`,
|
|
251
|
+
`, fe = x.div`
|
|
239
252
|
display: flex;
|
|
240
253
|
align-items: center;
|
|
241
254
|
justify-content: center;
|
|
242
255
|
|
|
243
256
|
cursor: ${({ clickable: t }) => t ? "pointer" : "default"};
|
|
244
|
-
`,
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
257
|
+
`, Xt = x.span`
|
|
258
|
+
width: 100%;
|
|
259
|
+
min-width: 100%;
|
|
260
|
+
height: 6px;
|
|
261
|
+
min-height: 6px;
|
|
262
|
+
`, ue = 30, xe = Pt(function({
|
|
263
|
+
children: n,
|
|
264
|
+
onChange: r,
|
|
265
|
+
value: i,
|
|
266
|
+
date: o,
|
|
267
|
+
minDate: l,
|
|
268
|
+
maxDate: s,
|
|
269
|
+
holidayDates: h,
|
|
270
|
+
disableDates: K,
|
|
271
|
+
showWeekHead: at = !1,
|
|
272
|
+
multiple: T = !1,
|
|
273
|
+
period: tt = !1,
|
|
274
|
+
enableMonthSelect: b = !1,
|
|
275
|
+
showToday: At = !1,
|
|
276
|
+
edgeSpacing: lt = 0,
|
|
277
|
+
renderEvent: z,
|
|
278
|
+
inlineCSS: Et,
|
|
279
|
+
...Nt
|
|
280
|
+
}, qt) {
|
|
281
|
+
const { spacing: St } = re(), [O, ft] = Y(
|
|
282
|
+
(typeof o == "string" || typeof o == "number" ? new Date(o) : o) || /* @__PURE__ */ new Date()
|
|
283
|
+
), [g, U] = Y(() => Array.isArray(i) && i.length > 0 ? $(i[0]) : $(i)), [I, et] = Y(() => Array.isArray(i) && i.length > 1 ? $(i[i.length - 1]) : null), [M, vt] = Y(0), [w, X] = Y(1), [kt, Rt] = Y(!1), [ut, Wt] = Y(!1), dt = v(null), m = v(null), nt = v(0), R = v(0), A = v(!1), V = v(w), ht = v(), mt = v(null), pt = v(null), W = O.getFullYear(), rt = O.getMonth(), Ht = Tt(W, rt), C = j(rt), _ = $(i), B = $(h), E = $(K), yt = q(O, l) || _t(O, l), gt = F(O, s) || _t(O, s), it = new Date(W, rt - 1), st = new Date(W, rt + 1), J = `${W}. ${C}`, N = tt && !!g && !!I, bt = [
|
|
264
284
|
{
|
|
265
|
-
year:
|
|
266
|
-
month:
|
|
267
|
-
weeks:
|
|
285
|
+
year: it.getFullYear(),
|
|
286
|
+
month: j(it.getMonth()),
|
|
287
|
+
weeks: Tt(it.getFullYear(), it.getMonth())
|
|
268
288
|
},
|
|
269
289
|
{
|
|
270
|
-
year:
|
|
271
|
-
month:
|
|
272
|
-
weeks:
|
|
290
|
+
year: W,
|
|
291
|
+
month: C,
|
|
292
|
+
weeks: Ht
|
|
273
293
|
},
|
|
274
294
|
{
|
|
275
|
-
year:
|
|
276
|
-
month:
|
|
277
|
-
weeks:
|
|
295
|
+
year: st.getFullYear(),
|
|
296
|
+
month: j(st.getMonth()),
|
|
297
|
+
weeks: Tt(st.getFullYear(), st.getMonth())
|
|
278
298
|
}
|
|
279
|
-
],
|
|
280
|
-
|
|
281
|
-
},
|
|
282
|
-
if (!A.current)
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
e == null || e(r, D);
|
|
299
|
+
], Dt = typeof z == "function", Gt = bt[1].weeks.length * (ue + (Dt ? 10 : 0) + St.content(2)) + St.content(2), zt = (e) => () => {
|
|
300
|
+
T && (m.current && (m.current.style.transition = "none", m.current.style.cursor = "grabbing"), nt.current = e, A.current = !0);
|
|
301
|
+
}, L = te(() => {
|
|
302
|
+
if (!A.current) return;
|
|
303
|
+
const e = M - R.current, f = Math.abs(M - e), a = M * 0.1;
|
|
304
|
+
m.current && (m.current.style.transform = `translate3d(-${M * w}px, 0, 0)`, m.current.style.cursor = "grab", m.current.style.transition = "transform 0.2s"), nt.current = 0, R.current = 0, A.current = !1, !(f <= a) && (M < e ? X((p) => p + 1) : M > e && X((p) => p - 1));
|
|
305
|
+
}, [M, w]), It = (e) => () => {
|
|
306
|
+
if (!(A.current || w !== 1)) {
|
|
307
|
+
if (!tt) {
|
|
308
|
+
r == null || r(e, $);
|
|
290
309
|
return;
|
|
291
310
|
}
|
|
292
|
-
if (k(
|
|
293
|
-
|
|
311
|
+
if (k(e, g) && Array.isArray(i) && i.length === 1) {
|
|
312
|
+
U(null), et(null), r == null || r([], $);
|
|
294
313
|
return;
|
|
295
|
-
} else if (k(
|
|
296
|
-
|
|
314
|
+
} else if (k(e, g) && !Array.isArray(i) && k(e, i)) {
|
|
315
|
+
U(null), et(null), r == null || r([], $);
|
|
297
316
|
return;
|
|
298
317
|
}
|
|
299
318
|
if (!g) {
|
|
300
|
-
|
|
319
|
+
U(e), r == null || r(e, $);
|
|
301
320
|
return;
|
|
302
321
|
}
|
|
303
|
-
if (!
|
|
304
|
-
const [
|
|
305
|
-
|
|
306
|
-
const p =
|
|
307
|
-
|
|
322
|
+
if (!I && g) {
|
|
323
|
+
const [f, a] = F(e, g) ? [g, e] : [e, g];
|
|
324
|
+
U(f), et(a);
|
|
325
|
+
const p = Bt([f, a], K);
|
|
326
|
+
r == null || r(p, $);
|
|
308
327
|
return;
|
|
309
328
|
}
|
|
310
|
-
g &&
|
|
329
|
+
g && I && (U(e), et(null), r == null || r(e, $));
|
|
311
330
|
}
|
|
312
|
-
},
|
|
313
|
-
|
|
314
|
-
},
|
|
315
|
-
|
|
316
|
-
},
|
|
317
|
-
if (!
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
ot(new Date(l, c - 1)), At(!1);
|
|
331
|
+
}, Kt = (e) => zt(e.clientX)(), Ut = (e) => zt(e.touches[0].clientX)(), Vt = () => {
|
|
332
|
+
kt || (m.current && (m.current.style.transition = "transform 0.2s"), X((e) => e - 1));
|
|
333
|
+
}, Ct = () => {
|
|
334
|
+
kt || (m.current && (m.current.style.transition = "transform 0.2s"), X((e) => e + 1));
|
|
335
|
+
}, $t = () => Wt((e) => !e), Jt = (e) => {
|
|
336
|
+
if (!e) return;
|
|
337
|
+
const [f, a] = e.toString().split(".").map(Number);
|
|
338
|
+
ft(new Date(f, a - 1)), Wt(!1);
|
|
321
339
|
};
|
|
322
|
-
return
|
|
323
|
-
var
|
|
324
|
-
|
|
325
|
-
}, [
|
|
326
|
-
const
|
|
327
|
-
var
|
|
328
|
-
|
|
340
|
+
return Yt(() => {
|
|
341
|
+
var e;
|
|
342
|
+
vt(((e = dt.current) == null ? void 0 : e.clientWidth) || 0);
|
|
343
|
+
}, [T]), Z(() => {
|
|
344
|
+
const e = () => {
|
|
345
|
+
var f;
|
|
346
|
+
vt(((f = dt.current) == null ? void 0 : f.clientWidth) || 0);
|
|
329
347
|
};
|
|
330
|
-
return window.addEventListener("resize",
|
|
331
|
-
window.removeEventListener("resize",
|
|
348
|
+
return window.addEventListener("resize", e), window.addEventListener("scroll", e), () => {
|
|
349
|
+
window.removeEventListener("resize", e), window.removeEventListener("scroll", e);
|
|
332
350
|
};
|
|
333
|
-
}, [
|
|
334
|
-
const
|
|
335
|
-
if (!
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
z();
|
|
351
|
+
}, [T]), Z(() => {
|
|
352
|
+
const e = m.current, f = (c, y, D) => {
|
|
353
|
+
if (!e || !A.current) return;
|
|
354
|
+
R.current = c - nt.current;
|
|
355
|
+
const d = y - nt.current, S = 5;
|
|
356
|
+
if (A.current = A.current || Math.abs(R.current) > S && Math.abs(d) < S * 2, D.cancelable && D.preventDefault(), A.current) {
|
|
357
|
+
if (yt && R.current > 0) {
|
|
358
|
+
L();
|
|
342
359
|
return;
|
|
343
360
|
}
|
|
344
|
-
if (
|
|
345
|
-
|
|
361
|
+
if (gt && R.current < 0) {
|
|
362
|
+
L();
|
|
346
363
|
return;
|
|
347
364
|
}
|
|
348
|
-
Math.abs(R.current) >= 10 && (
|
|
365
|
+
Math.abs(R.current) >= 10 && (e.style.transform = `translate3d(${R.current - M * w}px, 0, 0)`, e.style.cursor = "grabbing");
|
|
349
366
|
}
|
|
350
|
-
},
|
|
351
|
-
A.current &&
|
|
367
|
+
}, a = (c) => f(c.touches[0].clientX, c.touches[0].clientY, c), p = (c) => {
|
|
368
|
+
A.current && f(c.clientX, c.clientY, c);
|
|
352
369
|
};
|
|
353
|
-
return
|
|
354
|
-
|
|
370
|
+
return e == null || e.addEventListener("mousemove", p), e == null || e.addEventListener("touchmove", a), () => {
|
|
371
|
+
e == null || e.removeEventListener("mousemove", p), e == null || e.removeEventListener("touchmove", a);
|
|
355
372
|
};
|
|
356
|
-
}, [M,
|
|
357
|
-
|
|
358
|
-
|
|
373
|
+
}, [M, w, L, gt, yt]), Z(() => {
|
|
374
|
+
Rt(!0), ht.current = setTimeout(() => {
|
|
375
|
+
m.current && (m.current.style.transition = "none"), w > V.current ? (X(1), ft((e) => new Date(e.setMonth(e.getMonth() + 1))), V.current = 1) : w < V.current ? (ft((e) => new Date(e.setMonth(e.getMonth() - 1))), X(1), V.current = 1) : V.current = w, Rt(!1);
|
|
359
376
|
}, 200);
|
|
360
|
-
}, [
|
|
361
|
-
if (!
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
c == null || c.scrollIntoView({
|
|
377
|
+
}, [w]), Yt(() => {
|
|
378
|
+
if (!tt || !Array.isArray(i)) return;
|
|
379
|
+
const e = Bt(i, K);
|
|
380
|
+
i.length < e.length && (r == null || r(e, $));
|
|
381
|
+
}, [tt, i, r, K]), Z(() => {
|
|
382
|
+
let e;
|
|
383
|
+
return ut && (e = setTimeout(() => {
|
|
384
|
+
if (pt.current) {
|
|
385
|
+
const f = pt.current.querySelector("ul"), a = f == null ? void 0 : f.querySelector(`[data-value="${J}"]`);
|
|
386
|
+
a == null || a.scrollIntoView({
|
|
371
387
|
block: "start"
|
|
372
388
|
});
|
|
373
389
|
}
|
|
374
390
|
}, 200)), () => {
|
|
375
|
-
clearTimeout(
|
|
391
|
+
clearTimeout(e);
|
|
376
392
|
};
|
|
377
|
-
}, [
|
|
378
|
-
|
|
379
|
-
}, []), /* @__PURE__ */
|
|
380
|
-
|
|
381
|
-
/* @__PURE__ */
|
|
382
|
-
|
|
393
|
+
}, [ut, J]), Z(() => () => {
|
|
394
|
+
ht.current && clearTimeout(ht.current);
|
|
395
|
+
}, []), /* @__PURE__ */ H(ie, { ref: qt, ...Nt, css: Et, children: [
|
|
396
|
+
T ? /* @__PURE__ */ H(oe, { children: [
|
|
397
|
+
/* @__PURE__ */ u(
|
|
398
|
+
ct,
|
|
383
399
|
{
|
|
384
400
|
name: "ChevronLeftLine",
|
|
385
401
|
size: "small",
|
|
386
|
-
onClick:
|
|
387
|
-
disabled:
|
|
402
|
+
onClick: Vt,
|
|
403
|
+
disabled: yt
|
|
388
404
|
}
|
|
389
405
|
),
|
|
390
|
-
/* @__PURE__ */
|
|
391
|
-
|
|
406
|
+
/* @__PURE__ */ H(
|
|
407
|
+
fe,
|
|
392
408
|
{
|
|
393
|
-
ref:
|
|
394
|
-
clickable: !!
|
|
395
|
-
onClick:
|
|
409
|
+
ref: mt,
|
|
410
|
+
clickable: !!b,
|
|
411
|
+
onClick: b ? $t : void 0,
|
|
396
412
|
children: [
|
|
397
|
-
|
|
398
|
-
|
|
413
|
+
J,
|
|
414
|
+
b && /* @__PURE__ */ u(ct, { name: "ArrowDownFill", size: "xSmall" })
|
|
399
415
|
]
|
|
400
416
|
}
|
|
401
417
|
),
|
|
402
|
-
/* @__PURE__ */
|
|
403
|
-
|
|
418
|
+
/* @__PURE__ */ u(
|
|
419
|
+
ct,
|
|
404
420
|
{
|
|
405
421
|
name: "ChevronRightLine",
|
|
406
422
|
size: "small",
|
|
407
|
-
onClick:
|
|
408
|
-
disabled:
|
|
423
|
+
onClick: Ct,
|
|
424
|
+
disabled: gt
|
|
409
425
|
}
|
|
410
426
|
)
|
|
411
|
-
] }) : /* @__PURE__ */
|
|
412
|
-
|
|
427
|
+
] }) : /* @__PURE__ */ H(
|
|
428
|
+
se,
|
|
413
429
|
{
|
|
414
|
-
ref:
|
|
415
|
-
clickable: !!
|
|
416
|
-
onClick:
|
|
430
|
+
ref: mt,
|
|
431
|
+
clickable: !!b,
|
|
432
|
+
onClick: b ? $t : void 0,
|
|
417
433
|
children: [
|
|
418
|
-
|
|
419
|
-
|
|
434
|
+
J,
|
|
435
|
+
b && /* @__PURE__ */ u(ct, { name: "ArrowDownFill", size: "xSmall" })
|
|
420
436
|
]
|
|
421
437
|
}
|
|
422
438
|
),
|
|
423
|
-
|
|
424
|
-
|
|
439
|
+
b && /* @__PURE__ */ u(
|
|
440
|
+
ee,
|
|
425
441
|
{
|
|
426
|
-
anchorRef:
|
|
427
|
-
ref:
|
|
428
|
-
open:
|
|
429
|
-
onClose:
|
|
430
|
-
onChange:
|
|
431
|
-
value:
|
|
432
|
-
placement:
|
|
442
|
+
anchorRef: mt,
|
|
443
|
+
ref: pt,
|
|
444
|
+
open: ut,
|
|
445
|
+
onClose: $t,
|
|
446
|
+
onChange: Jt,
|
|
447
|
+
value: J,
|
|
448
|
+
placement: T ? "bottom-center" : "bottom-left",
|
|
433
449
|
width: 160,
|
|
434
450
|
fitToAnchorWidth: !1,
|
|
435
451
|
maxHeight: 368,
|
|
436
|
-
children: Array.from({ length: 130 }, (
|
|
437
|
-
const
|
|
438
|
-
return Array.from({ length: 12 }, (p,
|
|
439
|
-
const
|
|
440
|
-
return
|
|
452
|
+
children: Array.from({ length: 130 }, (e, f) => {
|
|
453
|
+
const a = 1970 + f;
|
|
454
|
+
return Array.from({ length: 12 }, (p, c) => {
|
|
455
|
+
const y = c + 1, D = y < 10 ? `0${y}` : y, d = new Date(a, c + 1, 0).getDate(), S = `${a}-${D}-${d}`, Q = `${a}-${D}-01`;
|
|
456
|
+
return q(S, l) || F(Q, s) ? null : /* @__PURE__ */ u(ne, { value: `${a}. ${D}`, children: `${a}. ${D}` }, `${a}-${D}`);
|
|
441
457
|
});
|
|
442
458
|
})
|
|
443
459
|
}
|
|
444
460
|
),
|
|
445
|
-
|
|
446
|
-
/* @__PURE__ */
|
|
447
|
-
/* @__PURE__ */
|
|
448
|
-
/* @__PURE__ */
|
|
449
|
-
/* @__PURE__ */
|
|
450
|
-
/* @__PURE__ */
|
|
451
|
-
/* @__PURE__ */
|
|
452
|
-
/* @__PURE__ */
|
|
461
|
+
at && /* @__PURE__ */ H(ce, { edgeSpacing: lt, children: [
|
|
462
|
+
/* @__PURE__ */ u("span", { children: "일" }),
|
|
463
|
+
/* @__PURE__ */ u("span", { children: "월" }),
|
|
464
|
+
/* @__PURE__ */ u("span", { children: "화" }),
|
|
465
|
+
/* @__PURE__ */ u("span", { children: "수" }),
|
|
466
|
+
/* @__PURE__ */ u("span", { children: "목" }),
|
|
467
|
+
/* @__PURE__ */ u("span", { children: "금" }),
|
|
468
|
+
/* @__PURE__ */ u("span", { children: "토" })
|
|
453
469
|
] }),
|
|
454
|
-
/* @__PURE__ */
|
|
455
|
-
|
|
470
|
+
/* @__PURE__ */ u(ae, { ref: dt, children: /* @__PURE__ */ H(
|
|
471
|
+
le,
|
|
456
472
|
{
|
|
457
|
-
ref:
|
|
458
|
-
onMouseDown:
|
|
459
|
-
onMouseUp:
|
|
460
|
-
onMouseLeave:
|
|
461
|
-
onTouchStart:
|
|
462
|
-
onTouchEnd:
|
|
463
|
-
onTouchCancel:
|
|
473
|
+
ref: m,
|
|
474
|
+
onMouseDown: Kt,
|
|
475
|
+
onMouseUp: L,
|
|
476
|
+
onMouseLeave: L,
|
|
477
|
+
onTouchStart: Ut,
|
|
478
|
+
onTouchEnd: L,
|
|
479
|
+
onTouchCancel: L,
|
|
464
480
|
style: {
|
|
465
|
-
transform:
|
|
466
|
-
cursor:
|
|
467
|
-
maxHeight:
|
|
481
|
+
transform: T ? `translate3d(-${M * w}px, 0, 0)` : void 0,
|
|
482
|
+
cursor: T ? "grab" : void 0,
|
|
483
|
+
maxHeight: Gt
|
|
468
484
|
},
|
|
469
485
|
children: [
|
|
470
|
-
|
|
471
|
-
|
|
486
|
+
T && bt.map(({ year: e, month: f, weeks: a }) => /* @__PURE__ */ u(
|
|
487
|
+
Ft,
|
|
472
488
|
{
|
|
473
|
-
edgeSpacing:
|
|
474
|
-
children:
|
|
475
|
-
const d = `${
|
|
476
|
-
return /* @__PURE__ */
|
|
477
|
-
|
|
489
|
+
edgeSpacing: lt,
|
|
490
|
+
children: a.map((p, c) => /* @__PURE__ */ u(jt, { children: p.map((y, D) => {
|
|
491
|
+
const d = `${e}-${f}-${G(y || 0)}`, S = !y, Q = k(d, /* @__PURE__ */ new Date()), wt = Array.isArray(B) ? B.includes(d) : B === d, xt = Array.isArray(_) ? _.includes(d) : _ === d, Mt = !y || (Array.isArray(E) ? E.includes(d) : E === d) || F(d, s) || q(d, l), ot = N && k(d, g), Qt = N && k(d, I), Zt = N && F(d, g) && q(d, I), Lt = z == null ? void 0 : z(d);
|
|
492
|
+
return /* @__PURE__ */ H(
|
|
493
|
+
Ot,
|
|
478
494
|
{
|
|
479
|
-
variant:
|
|
480
|
-
onClick:
|
|
481
|
-
today:
|
|
482
|
-
holiday:
|
|
483
|
-
selected:
|
|
484
|
-
disabled:
|
|
485
|
-
children:
|
|
495
|
+
variant: ot ? "start" : Qt ? "end" : Zt ? "middle" : void 0,
|
|
496
|
+
onClick: It(d),
|
|
497
|
+
today: At && Q,
|
|
498
|
+
holiday: wt,
|
|
499
|
+
selected: xt,
|
|
500
|
+
disabled: Mt,
|
|
501
|
+
children: [
|
|
502
|
+
/* @__PURE__ */ u("div", { children: /* @__PURE__ */ u("span", { children: y }) }),
|
|
503
|
+
!S && Lt,
|
|
504
|
+
!S && Dt && !Lt && /* @__PURE__ */ u(Xt, {})
|
|
505
|
+
]
|
|
486
506
|
},
|
|
487
|
-
`${
|
|
507
|
+
`${e}-${f}-week-row-${D}-${y ? d : `${c}-${D}`}`
|
|
488
508
|
);
|
|
489
|
-
}) }, `${
|
|
509
|
+
}) }, `${e}-${f}-week-row-${String(p)}`))
|
|
490
510
|
},
|
|
491
|
-
`week-body-${
|
|
511
|
+
`week-body-${e}-${f}`
|
|
492
512
|
)),
|
|
493
|
-
!
|
|
494
|
-
const
|
|
495
|
-
return /* @__PURE__ */
|
|
496
|
-
|
|
513
|
+
!T && /* @__PURE__ */ u(Ft, { edgeSpacing: lt, children: Ht.map((e, f) => /* @__PURE__ */ u(jt, { children: e.map((a, p) => {
|
|
514
|
+
const c = `${W}-${C}-${G(a || 0)}`, y = !a, D = k(c, /* @__PURE__ */ new Date()), d = Array.isArray(B) ? B.includes(c) : B === c, S = Array.isArray(_) ? _.includes(c) : _ === c, Q = !a || (Array.isArray(E) ? E.includes(c) : E === c) || F(c, s) || q(c, l), wt = N && k(c, g), xt = N && k(c, I), Mt = N && F(c, g) && q(c, I), ot = z == null ? void 0 : z(c);
|
|
515
|
+
return /* @__PURE__ */ H(
|
|
516
|
+
Ot,
|
|
497
517
|
{
|
|
498
|
-
variant:
|
|
499
|
-
onClick:
|
|
500
|
-
today:
|
|
501
|
-
holiday:
|
|
502
|
-
selected:
|
|
503
|
-
disabled:
|
|
504
|
-
children:
|
|
518
|
+
variant: wt ? "start" : xt ? "end" : Mt ? "middle" : void 0,
|
|
519
|
+
onClick: It(c),
|
|
520
|
+
today: At && D,
|
|
521
|
+
holiday: d,
|
|
522
|
+
selected: S,
|
|
523
|
+
disabled: Q,
|
|
524
|
+
children: [
|
|
525
|
+
/* @__PURE__ */ u("div", { children: /* @__PURE__ */ u("span", { children: a }) }),
|
|
526
|
+
!y && ot,
|
|
527
|
+
!y && Dt && !ot && /* @__PURE__ */ u(Xt, {})
|
|
528
|
+
]
|
|
505
529
|
},
|
|
506
|
-
`${
|
|
530
|
+
`${W}-${C}-week-row-${e}-${a ? c : `${f}-${p}`}`
|
|
507
531
|
);
|
|
508
|
-
}) }, `${
|
|
532
|
+
}) }, `${W}-${C}-week-row-${String(e)}`)) })
|
|
509
533
|
]
|
|
510
534
|
}
|
|
511
|
-
) })
|
|
535
|
+
) }),
|
|
536
|
+
n
|
|
512
537
|
] });
|
|
513
538
|
});
|
|
514
|
-
function
|
|
515
|
-
let
|
|
516
|
-
const
|
|
517
|
-
let
|
|
518
|
-
for (let
|
|
519
|
-
|
|
520
|
-
return
|
|
521
|
-
(
|
|
522
|
-
),
|
|
539
|
+
function Tt(t, n) {
|
|
540
|
+
let r = [];
|
|
541
|
+
const i = new Date(t, n, 1), o = new Date(t, n + 1, 0).getDate(), l = i.getDay();
|
|
542
|
+
let s = Array.from({ length: l }).fill(null);
|
|
543
|
+
for (let h = 1; h <= o; h += 1)
|
|
544
|
+
s.push(h), (s.length === 7 || h === o) && (r.push(s), s = []);
|
|
545
|
+
return r = r.map(
|
|
546
|
+
(h) => Array.from({ length: 7 }).map((K, at) => h[at] || null)
|
|
547
|
+
), r;
|
|
523
548
|
}
|
|
524
|
-
function
|
|
549
|
+
function j(t) {
|
|
525
550
|
return String(t + 1).length === 1 ? `0${t + 1}` : t + 1;
|
|
526
551
|
}
|
|
527
|
-
function
|
|
552
|
+
function G(t) {
|
|
528
553
|
return String(t).length === 1 ? `0${t}` : t;
|
|
529
554
|
}
|
|
530
|
-
function
|
|
555
|
+
function $(t) {
|
|
531
556
|
if (Array.isArray(t))
|
|
532
|
-
return t.map((
|
|
557
|
+
return t.map((n) => n instanceof Date ? `${n.getFullYear()}-${j(n.getMonth())}-${G(n.getDate())}` : n);
|
|
533
558
|
if (t instanceof Date)
|
|
534
|
-
return `${t.getFullYear()}-${
|
|
559
|
+
return `${t.getFullYear()}-${j(t.getMonth())}-${G(t.getDate())}`;
|
|
535
560
|
if (typeof t == "number") {
|
|
536
|
-
const
|
|
537
|
-
return `${
|
|
561
|
+
const n = new Date(t);
|
|
562
|
+
return `${n.getFullYear()}-${j(n.getMonth())}-${G(n.getDate())}`;
|
|
538
563
|
}
|
|
539
564
|
return t;
|
|
540
565
|
}
|
|
541
|
-
function
|
|
542
|
-
if (!t || !
|
|
566
|
+
function F(t, n) {
|
|
567
|
+
if (!t || !n)
|
|
543
568
|
return !1;
|
|
544
|
-
const
|
|
545
|
-
|
|
546
|
-
const
|
|
547
|
-
|
|
548
|
-
const
|
|
549
|
-
return
|
|
569
|
+
const r = t instanceof Date ? t : new Date(t);
|
|
570
|
+
r.setHours(0), r.setMinutes(0), r.setSeconds(0), r.setMilliseconds(0);
|
|
571
|
+
const i = r.getTime(), o = n instanceof Date ? n : new Date(n);
|
|
572
|
+
o.setHours(0), o.setMinutes(0), o.setSeconds(0), o.setMilliseconds(0);
|
|
573
|
+
const l = o.getTime();
|
|
574
|
+
return i > l;
|
|
550
575
|
}
|
|
551
|
-
function
|
|
552
|
-
if (!t || !
|
|
576
|
+
function q(t, n) {
|
|
577
|
+
if (!t || !n)
|
|
553
578
|
return !1;
|
|
554
|
-
const
|
|
555
|
-
|
|
556
|
-
const
|
|
557
|
-
|
|
558
|
-
const
|
|
559
|
-
return
|
|
579
|
+
const r = t instanceof Date ? t : new Date(t);
|
|
580
|
+
r.setHours(0), r.setMinutes(0), r.setSeconds(0), r.setMilliseconds(0);
|
|
581
|
+
const i = r.getTime(), o = n instanceof Date ? n : new Date(n);
|
|
582
|
+
o.setHours(0), o.setMinutes(0), o.setSeconds(0), o.setMilliseconds(0);
|
|
583
|
+
const l = o.getTime();
|
|
584
|
+
return i < l;
|
|
560
585
|
}
|
|
561
|
-
function
|
|
562
|
-
if (!t || !
|
|
586
|
+
function _t(t, n) {
|
|
587
|
+
if (!t || !n)
|
|
563
588
|
return !1;
|
|
564
|
-
const
|
|
565
|
-
return `${
|
|
589
|
+
const r = t instanceof Date ? t : new Date(t), i = n instanceof Date ? n : new Date(n);
|
|
590
|
+
return `${r.getFullYear()}-${r.getMonth()}` == `${i.getFullYear()}-${i.getMonth()}`;
|
|
566
591
|
}
|
|
567
|
-
function k(t,
|
|
568
|
-
if (!t || !
|
|
592
|
+
function k(t, n) {
|
|
593
|
+
if (!t || !n)
|
|
569
594
|
return !1;
|
|
570
|
-
const
|
|
571
|
-
|
|
572
|
-
const
|
|
573
|
-
|
|
574
|
-
const
|
|
575
|
-
return
|
|
595
|
+
const r = t instanceof Date ? t : new Date(t);
|
|
596
|
+
r.setHours(0), r.setMinutes(0), r.setSeconds(0), r.setMilliseconds(0);
|
|
597
|
+
const i = r.getTime(), o = n instanceof Date ? n : new Date(n);
|
|
598
|
+
o.setHours(0), o.setMinutes(0), o.setSeconds(0), o.setMilliseconds(0);
|
|
599
|
+
const l = o.getTime();
|
|
600
|
+
return i === l;
|
|
576
601
|
}
|
|
577
|
-
function
|
|
602
|
+
function Bt(t, n) {
|
|
578
603
|
if (!t || !Array.isArray(t) || t.length === 0)
|
|
579
604
|
return [];
|
|
580
|
-
const
|
|
581
|
-
for (;
|
|
582
|
-
if (Array.isArray(
|
|
583
|
-
|
|
605
|
+
const r = t.map((h) => h instanceof Date ? h : h === null ? /* @__PURE__ */ new Date() : new Date(h)), i = new Date(Math.min(...r.map((h) => h.getTime()))), o = new Date(Math.max(...r.map((h) => h.getTime()))), l = [], s = new Date(i);
|
|
606
|
+
for (; s <= o; ) {
|
|
607
|
+
if (Array.isArray(n) && n.includes(s)) {
|
|
608
|
+
s.setDate(s.getDate() + 1);
|
|
584
609
|
continue;
|
|
585
|
-
} else if (
|
|
586
|
-
|
|
610
|
+
} else if (n === s) {
|
|
611
|
+
s.setDate(s.getDate() + 1);
|
|
587
612
|
continue;
|
|
588
613
|
}
|
|
589
|
-
|
|
590
|
-
`${
|
|
591
|
-
|
|
614
|
+
l.push(
|
|
615
|
+
`${s.getFullYear()}-${j(s.getMonth())}-${G(
|
|
616
|
+
s.getDate()
|
|
592
617
|
)}`
|
|
593
|
-
),
|
|
618
|
+
), s.setDate(s.getDate() + 1);
|
|
594
619
|
}
|
|
595
|
-
return
|
|
620
|
+
return l;
|
|
596
621
|
}
|
|
597
622
|
export {
|
|
598
|
-
|
|
623
|
+
xe as default
|
|
599
624
|
};
|