@koslibs/components 1.15.0 → 1.17.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.
- package/CHANGELOG.md +14 -0
- package/dist/components/Chips/chips.d.ts +2 -0
- package/dist/components/Chips/chips.js +48 -0
- package/dist/components/Chips/hooks/use-chips-state.d.ts +7 -0
- package/dist/components/Chips/hooks/use-chips-state.js +56 -0
- package/dist/components/Chips/index.d.ts +2 -0
- package/dist/components/Chips/index.js +1 -0
- package/dist/components/Chips/index.module.js +9 -0
- package/dist/components/Chips/index_module.css +99 -0
- package/dist/components/Chips/types.d.ts +86 -0
- package/dist/components/Chips/types.js +0 -0
- package/dist/components/Chips/utils/normalize-value.d.ts +2 -0
- package/dist/components/Chips/utils/normalize-value.js +9 -0
- package/dist/components/Chips/vars.css +19 -0
- package/dist/components/Datepicker/components/calendar-month.d.ts +8 -0
- package/dist/components/Datepicker/components/calendar-month.js +68 -0
- package/dist/components/Datepicker/components/range-calendar.d.ts +5 -0
- package/dist/components/Datepicker/components/range-calendar.js +78 -0
- package/dist/components/Datepicker/datepicker-panel.d.ts +2 -0
- package/dist/components/Datepicker/datepicker-panel.js +187 -0
- package/dist/components/Datepicker/datepicker.d.ts +2 -0
- package/dist/components/Datepicker/datepicker.js +194 -0
- package/dist/components/Datepicker/hooks/use-datepicker-draft.d.ts +22 -0
- package/dist/components/Datepicker/hooks/use-datepicker-draft.js +105 -0
- package/dist/components/Datepicker/hooks/use-datepicker-state.d.ts +23 -0
- package/dist/components/Datepicker/hooks/use-datepicker-state.js +106 -0
- package/dist/components/Datepicker/hooks/use-datepicker-value.d.ts +8 -0
- package/dist/components/Datepicker/hooks/use-datepicker-value.js +31 -0
- package/dist/components/Datepicker/hooks/use-range-scroll.d.ts +15 -0
- package/dist/components/Datepicker/hooks/use-range-scroll.js +219 -0
- package/dist/components/Datepicker/index.d.ts +3 -0
- package/dist/components/Datepicker/index.js +2 -0
- package/dist/components/Datepicker/index.module.js +37 -0
- package/dist/components/Datepicker/index_module.css +251 -0
- package/dist/components/Datepicker/panel.module.js +39 -0
- package/dist/components/Datepicker/panel_module.css +375 -0
- package/dist/components/Datepicker/types.d.ts +133 -0
- package/dist/components/Datepicker/types.js +0 -0
- package/dist/components/Datepicker/utils/date-utils.d.ts +17 -0
- package/dist/components/Datepicker/utils/date-utils.js +80 -0
- package/dist/components/Datepicker/utils/range-scroll-geometry.d.ts +15 -0
- package/dist/components/Datepicker/utils/range-scroll-geometry.js +29 -0
- package/dist/components/Datepicker/vars.css +26 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +2 -0
- package/package.json +2 -2
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import { normalizeValue } from "../utils/date-utils.js";
|
|
3
|
+
function useDatepickerValue(props) {
|
|
4
|
+
const mode = props.mode ?? 'single';
|
|
5
|
+
const controlled = void 0 !== props.value;
|
|
6
|
+
const [localValue, setLocalValue] = useState(()=>normalizeValue(mode, props.defaultValue));
|
|
7
|
+
const value = normalizeValue(mode, controlled ? props.value : localValue);
|
|
8
|
+
return {
|
|
9
|
+
value,
|
|
10
|
+
commit (event, next) {
|
|
11
|
+
const normalized = normalizeValue(mode, next);
|
|
12
|
+
if (!normalized) return false;
|
|
13
|
+
if (!controlled) setLocalValue(normalized);
|
|
14
|
+
if ('range' === props.mode) {
|
|
15
|
+
if ('object' == typeof normalized) props.onChange?.(event, {
|
|
16
|
+
value: normalized
|
|
17
|
+
});
|
|
18
|
+
} else if ('string' == typeof normalized) props.onChange?.(event, {
|
|
19
|
+
value: normalized
|
|
20
|
+
});
|
|
21
|
+
return true;
|
|
22
|
+
},
|
|
23
|
+
clear () {
|
|
24
|
+
if (!controlled) setLocalValue(null);
|
|
25
|
+
},
|
|
26
|
+
reset () {
|
|
27
|
+
if (!controlled) setLocalValue(normalizeValue(mode, props.defaultValue));
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export { useDatepickerValue };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare function useRangeScroll(month: number, navigationVersion: number): {
|
|
2
|
+
calendarRef: import("react").RefObject<HTMLDivElement>;
|
|
3
|
+
monthsRef: import("react").RefObject<HTMLDivElement>;
|
|
4
|
+
windowRef: import("react").RefObject<HTMLDivElement>;
|
|
5
|
+
registerCalendarMonth(monthIndex: number, element: HTMLDivElement | null): void;
|
|
6
|
+
registerMonth(monthIndex: number, element: HTMLButtonElement | null): void;
|
|
7
|
+
visible: {
|
|
8
|
+
first: number;
|
|
9
|
+
last: number;
|
|
10
|
+
};
|
|
11
|
+
calendarScroll: () => void;
|
|
12
|
+
monthsScroll: () => void;
|
|
13
|
+
calendars: number[];
|
|
14
|
+
months: number[];
|
|
15
|
+
};
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { useLayoutEffect, useRef, useState } from "react";
|
|
2
|
+
import { LAST_MONTH } from "../utils/date-utils.js";
|
|
3
|
+
import { measureMonths, offsetFor, positionAt } from "../utils/range-scroll-geometry.js";
|
|
4
|
+
const CALENDAR_BUFFER = 12;
|
|
5
|
+
const MONTH_BUFFER = 36;
|
|
6
|
+
const calendarStartFor = (month)=>Math.max(0, Math.min(LAST_MONTH - CALENDAR_BUFFER + 1, month - 6));
|
|
7
|
+
const monthStartFor = (month)=>Math.max(0, Math.min(LAST_MONTH - MONTH_BUFFER + 1, month - 12));
|
|
8
|
+
function setScroll(viewport, offset) {
|
|
9
|
+
viewport.scrollTop = Math.max(0, Math.min(offset, viewport.scrollHeight - viewport.clientHeight));
|
|
10
|
+
}
|
|
11
|
+
function useRangeScroll(month, navigationVersion) {
|
|
12
|
+
const [calendarStart, setCalendarStart] = useState(()=>calendarStartFor(month));
|
|
13
|
+
const [monthStart, setMonthStart] = useState(()=>monthStartFor(month));
|
|
14
|
+
const [visible, setVisible] = useState({
|
|
15
|
+
first: month,
|
|
16
|
+
last: month + 1
|
|
17
|
+
});
|
|
18
|
+
const calendarRef = useRef(null);
|
|
19
|
+
const monthsRef = useRef(null);
|
|
20
|
+
const windowRef = useRef(null);
|
|
21
|
+
const calendarElements = useRef(new Map());
|
|
22
|
+
const monthElements = useRef(new Map());
|
|
23
|
+
const navigation = useRef('');
|
|
24
|
+
const pendingPosition = useRef(null);
|
|
25
|
+
const monthAnchor = useRef(null);
|
|
26
|
+
const calendarTop = useRef(0);
|
|
27
|
+
const monthsTop = useRef(0);
|
|
28
|
+
const windowTop = useRef(0);
|
|
29
|
+
function readGeometry() {
|
|
30
|
+
const viewport = calendarRef.current;
|
|
31
|
+
const list = monthsRef.current;
|
|
32
|
+
return viewport && list ? {
|
|
33
|
+
calendar: measureMonths(calendarElements.current),
|
|
34
|
+
months: measureMonths(monthElements.current)
|
|
35
|
+
} : null;
|
|
36
|
+
}
|
|
37
|
+
function cancelPendingSeek() {
|
|
38
|
+
if (!pendingPosition.current) return;
|
|
39
|
+
pendingPosition.current = null;
|
|
40
|
+
setCalendarStart(calendarStart);
|
|
41
|
+
}
|
|
42
|
+
function recenterMonthList(target, months) {
|
|
43
|
+
const list = monthsRef.current;
|
|
44
|
+
const targetStart = monthStartFor(target);
|
|
45
|
+
if (!list || targetStart === monthStart) return false;
|
|
46
|
+
const anchor = months.find((row)=>row.month === target);
|
|
47
|
+
monthAnchor.current = anchor ? {
|
|
48
|
+
month: target,
|
|
49
|
+
offset: anchor.start - list.scrollTop
|
|
50
|
+
} : null;
|
|
51
|
+
setMonthStart(targetStart);
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
function syncFromCalendar(geometry = readGeometry()) {
|
|
55
|
+
const viewport = calendarRef.current;
|
|
56
|
+
const list = monthsRef.current;
|
|
57
|
+
const indicator = windowRef.current;
|
|
58
|
+
if (!viewport || !list || !indicator || !geometry) return;
|
|
59
|
+
calendarTop.current = viewport.scrollTop;
|
|
60
|
+
const children = geometry.calendar;
|
|
61
|
+
const first = children.find((child)=>child.contentEnd > viewport.scrollTop + 1) ?? children[children.length - 1];
|
|
62
|
+
const last = children.findLast((child)=>child.start < viewport.scrollTop + viewport.clientHeight - 1) ?? first;
|
|
63
|
+
if (first && last && viewport.clientHeight) {
|
|
64
|
+
const next = {
|
|
65
|
+
first: first.month,
|
|
66
|
+
last: last.month
|
|
67
|
+
};
|
|
68
|
+
setVisible((current)=>current.first === next.first && current.last === next.last ? current : next);
|
|
69
|
+
}
|
|
70
|
+
const start = positionAt(children, viewport.scrollTop);
|
|
71
|
+
const end = positionAt(children, viewport.scrollTop + viewport.clientHeight);
|
|
72
|
+
if (!start || !end) return;
|
|
73
|
+
const top = offsetFor(geometry.months, start);
|
|
74
|
+
const bottom = offsetFor(geometry.months, end);
|
|
75
|
+
if (null === top || null === bottom) return void recenterMonthList(start.month, geometry.months);
|
|
76
|
+
indicator.style.top = top + 'px';
|
|
77
|
+
indicator.style.height = Math.max(0, bottom - top) + 'px';
|
|
78
|
+
windowTop.current = top;
|
|
79
|
+
const centeredTop = (top + bottom - list.clientHeight) / 2;
|
|
80
|
+
if ((centeredTop < 0 || centeredTop > list.scrollHeight - list.clientHeight) && recenterMonthList(start.month, geometry.months)) return;
|
|
81
|
+
setScroll(list, centeredTop);
|
|
82
|
+
monthsTop.current = list.scrollTop;
|
|
83
|
+
}
|
|
84
|
+
useLayoutEffect(()=>{
|
|
85
|
+
const viewport = calendarRef.current;
|
|
86
|
+
const list = monthsRef.current;
|
|
87
|
+
if (!viewport || !list) return;
|
|
88
|
+
const key = month + ':' + navigationVersion;
|
|
89
|
+
if (navigation.current !== key) {
|
|
90
|
+
navigation.current = key;
|
|
91
|
+
pendingPosition.current = {
|
|
92
|
+
month,
|
|
93
|
+
fraction: 0
|
|
94
|
+
};
|
|
95
|
+
const targetStart = calendarStartFor(month);
|
|
96
|
+
if (targetStart !== calendarStart) return void setCalendarStart(targetStart);
|
|
97
|
+
}
|
|
98
|
+
const geometry = readGeometry();
|
|
99
|
+
if (!geometry) return;
|
|
100
|
+
if (monthAnchor.current) {
|
|
101
|
+
const { month: anchorMonth, offset } = monthAnchor.current;
|
|
102
|
+
const anchor = geometry.months.find((row)=>row.month === anchorMonth);
|
|
103
|
+
if (anchor) setScroll(list, anchor.start - offset);
|
|
104
|
+
monthAnchor.current = null;
|
|
105
|
+
monthsTop.current = list.scrollTop;
|
|
106
|
+
}
|
|
107
|
+
if (pendingPosition.current) {
|
|
108
|
+
const target = offsetFor(geometry.calendar, pendingPosition.current);
|
|
109
|
+
if (null === target) return void setCalendarStart(calendarStartFor(pendingPosition.current.month));
|
|
110
|
+
setScroll(viewport, target);
|
|
111
|
+
pendingPosition.current = null;
|
|
112
|
+
}
|
|
113
|
+
syncFromCalendar(geometry);
|
|
114
|
+
}, [
|
|
115
|
+
month,
|
|
116
|
+
navigationVersion,
|
|
117
|
+
calendarStart,
|
|
118
|
+
monthStart
|
|
119
|
+
]);
|
|
120
|
+
useLayoutEffect(()=>{
|
|
121
|
+
const viewport = calendarRef.current;
|
|
122
|
+
const list = monthsRef.current;
|
|
123
|
+
if (!viewport || !list) return;
|
|
124
|
+
const resize = ()=>syncFromCalendar();
|
|
125
|
+
if ("u" > typeof ResizeObserver) {
|
|
126
|
+
const observer = new ResizeObserver(resize);
|
|
127
|
+
observer.observe(viewport);
|
|
128
|
+
observer.observe(list);
|
|
129
|
+
return ()=>observer.disconnect();
|
|
130
|
+
}
|
|
131
|
+
window.addEventListener('resize', resize);
|
|
132
|
+
return ()=>window.removeEventListener('resize', resize);
|
|
133
|
+
}, [
|
|
134
|
+
calendarStart,
|
|
135
|
+
monthStart
|
|
136
|
+
]);
|
|
137
|
+
function recycleCalendar(geometry) {
|
|
138
|
+
const viewport = calendarRef.current;
|
|
139
|
+
if (!viewport) return;
|
|
140
|
+
const first = positionAt(geometry, viewport.scrollTop);
|
|
141
|
+
const last = positionAt(geometry, viewport.scrollTop + viewport.clientHeight);
|
|
142
|
+
if (!first || !last) return;
|
|
143
|
+
let start = calendarStart;
|
|
144
|
+
if (first.month <= calendarStart + 1 && calendarStart > 0) start = Math.max(0, calendarStart - 4);
|
|
145
|
+
else if (last.month >= calendarStart + CALENDAR_BUFFER - 2 && calendarStart + CALENDAR_BUFFER <= LAST_MONTH) start = Math.min(LAST_MONTH - CALENDAR_BUFFER + 1, calendarStart + 4);
|
|
146
|
+
if (start !== calendarStart) {
|
|
147
|
+
pendingPosition.current = first;
|
|
148
|
+
setCalendarStart(start);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
function calendarScroll() {
|
|
152
|
+
const viewport = calendarRef.current;
|
|
153
|
+
if (!viewport || viewport.scrollTop === calendarTop.current) return;
|
|
154
|
+
cancelPendingSeek();
|
|
155
|
+
const geometry = readGeometry();
|
|
156
|
+
if (!geometry) return;
|
|
157
|
+
syncFromCalendar(geometry);
|
|
158
|
+
recycleCalendar(geometry.calendar);
|
|
159
|
+
}
|
|
160
|
+
function monthsScroll() {
|
|
161
|
+
const list = monthsRef.current;
|
|
162
|
+
const viewport = calendarRef.current;
|
|
163
|
+
if (!list || !viewport) return;
|
|
164
|
+
const delta = list.scrollTop - monthsTop.current;
|
|
165
|
+
monthsTop.current = list.scrollTop;
|
|
166
|
+
if (!delta) return;
|
|
167
|
+
const geometry = readGeometry();
|
|
168
|
+
if (!geometry) return;
|
|
169
|
+
if (monthAnchor.current) monthAnchor.current.offset -= delta;
|
|
170
|
+
const base = pendingPosition.current ? offsetFor(geometry.months, pendingPosition.current) ?? windowTop.current : windowTop.current;
|
|
171
|
+
const target = positionAt(geometry.months, base + delta);
|
|
172
|
+
if (target) {
|
|
173
|
+
const offset = offsetFor(geometry.calendar, target);
|
|
174
|
+
const targetStart = calendarStartFor(target.month);
|
|
175
|
+
if (null === offset || offset + viewport.clientHeight > viewport.scrollHeight && targetStart !== calendarStart) {
|
|
176
|
+
pendingPosition.current = target;
|
|
177
|
+
setCalendarStart(targetStart);
|
|
178
|
+
} else {
|
|
179
|
+
cancelPendingSeek();
|
|
180
|
+
setScroll(viewport, offset);
|
|
181
|
+
syncFromCalendar(geometry);
|
|
182
|
+
recycleCalendar(geometry.calendar);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
let start = monthStart;
|
|
186
|
+
if (list.scrollTop < 72 && monthStart > 0) start = Math.max(0, monthStart - 12);
|
|
187
|
+
else if (list.scrollTop + list.clientHeight >= list.scrollHeight - 72 && monthStart + MONTH_BUFFER <= LAST_MONTH) start = Math.min(LAST_MONTH - MONTH_BUFFER + 1, monthStart + 12);
|
|
188
|
+
if (start === monthStart) return;
|
|
189
|
+
const anchor = geometry.months.find((row)=>row.month === Math.max(start, monthStart));
|
|
190
|
+
if (anchor) monthAnchor.current = {
|
|
191
|
+
month: anchor.month,
|
|
192
|
+
offset: anchor.start - list.scrollTop
|
|
193
|
+
};
|
|
194
|
+
setMonthStart(start);
|
|
195
|
+
}
|
|
196
|
+
return {
|
|
197
|
+
calendarRef,
|
|
198
|
+
monthsRef,
|
|
199
|
+
windowRef,
|
|
200
|
+
registerCalendarMonth (monthIndex, element) {
|
|
201
|
+
if (element) calendarElements.current.set(monthIndex, element);
|
|
202
|
+
else calendarElements.current.delete(monthIndex);
|
|
203
|
+
},
|
|
204
|
+
registerMonth (monthIndex, element) {
|
|
205
|
+
if (element) monthElements.current.set(monthIndex, element);
|
|
206
|
+
else monthElements.current.delete(monthIndex);
|
|
207
|
+
},
|
|
208
|
+
visible,
|
|
209
|
+
calendarScroll,
|
|
210
|
+
monthsScroll,
|
|
211
|
+
calendars: Array.from({
|
|
212
|
+
length: CALENDAR_BUFFER
|
|
213
|
+
}, (_, index)=>calendarStart + index),
|
|
214
|
+
months: Array.from({
|
|
215
|
+
length: MONTH_BUFFER
|
|
216
|
+
}, (_, index)=>monthStart + index)
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
export { useRangeScroll };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import "./index_module.css";
|
|
2
|
+
const index_module = {
|
|
3
|
+
component: "component-XIM8MH",
|
|
4
|
+
block: "block-bqbbVY",
|
|
5
|
+
secondary: "secondary-PcSgFC",
|
|
6
|
+
readOnly: "readOnly-h13qVH",
|
|
7
|
+
error: "error-c8nacQ",
|
|
8
|
+
disabled: "disabled-khgRiN",
|
|
9
|
+
"size-40": "size-40-h9qqeQ",
|
|
10
|
+
size40: "size-40-h9qqeQ",
|
|
11
|
+
"size-48": "size-48-aaoiXa",
|
|
12
|
+
size48: "size-48-aaoiXa",
|
|
13
|
+
"size-56": "size-56-OGJpdt",
|
|
14
|
+
size56: "size-56-OGJpdt",
|
|
15
|
+
"size-64": "size-64-kBX3a2",
|
|
16
|
+
size64: "size-64-kBX3a2",
|
|
17
|
+
"size-72": "size-72-BC6gqa",
|
|
18
|
+
size72: "size-72-BC6gqa",
|
|
19
|
+
field: "field-fNIrel",
|
|
20
|
+
hasOutline: "hasOutline-HAFy7G",
|
|
21
|
+
open: "open-S1x_K5",
|
|
22
|
+
trigger: "trigger-yqmoik",
|
|
23
|
+
valueColumn: "valueColumn-yqimvV",
|
|
24
|
+
value: "value-AslTvH",
|
|
25
|
+
placeholder: "placeholder-kZMY22",
|
|
26
|
+
label: "label-EQek4i",
|
|
27
|
+
innerLabel: "innerLabel-qjRhOo",
|
|
28
|
+
labelRaised: "labelRaised-X1UZfx",
|
|
29
|
+
hasInnerLabel: "hasInnerLabel-KmtJKD",
|
|
30
|
+
icon: "icon-QZ2qDs",
|
|
31
|
+
clear: "clear-Rcrq1X",
|
|
32
|
+
message: "message-IkNTrK",
|
|
33
|
+
popup: "popup-a9mcwf",
|
|
34
|
+
panelContainer: "panelContainer-xno_kL",
|
|
35
|
+
rangePopup: "rangePopup-AVJC5u"
|
|
36
|
+
};
|
|
37
|
+
export default index_module;
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
@import "../../styles/theme.css";
|
|
2
|
+
@import "./vars.css";
|
|
3
|
+
|
|
4
|
+
.component-XIM8MH {
|
|
5
|
+
--field-background: var(--input-primary-background-color);
|
|
6
|
+
--field-color: var(--input-color);
|
|
7
|
+
--field-label-color: var(--input-label-color);
|
|
8
|
+
--field-icon-color: var(--input-icon-color);
|
|
9
|
+
--field-border: transparent;
|
|
10
|
+
gap: var(--input-gap);
|
|
11
|
+
width: var(--datepicker-width);
|
|
12
|
+
vertical-align: top;
|
|
13
|
+
min-width: 0;
|
|
14
|
+
max-width: 100%;
|
|
15
|
+
font-family: var(--font-primary);
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
display: inline-flex;
|
|
18
|
+
|
|
19
|
+
&.block-bqbbVY {
|
|
20
|
+
width: 100%;
|
|
21
|
+
display: flex;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&.secondary-PcSgFC {
|
|
25
|
+
--field-background: var(--input-secondary-background-color);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&.readOnly-h13qVH {
|
|
29
|
+
--field-border: var(--input-read-only-border-color);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&.error-c8nacQ {
|
|
33
|
+
--field-border: var(--input-error-border-color);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&.disabled-khgRiN {
|
|
37
|
+
--field-background: var(--input-disabled-background-color);
|
|
38
|
+
--field-color: var(--input-disabled-color);
|
|
39
|
+
--field-label-color: var(--input-disabled-color);
|
|
40
|
+
--field-icon-color: var(--input-disabled-color);
|
|
41
|
+
--field-border: transparent;
|
|
42
|
+
cursor: not-allowed;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.size-40-h9qqeQ {
|
|
47
|
+
--field-height: 40px;
|
|
48
|
+
--field-padding: var(--input-padding-40);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.size-48-aaoiXa {
|
|
52
|
+
--field-height: 48px;
|
|
53
|
+
--field-padding: var(--input-padding-48);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.size-56-OGJpdt {
|
|
57
|
+
--field-height: 56px;
|
|
58
|
+
--field-padding: var(--input-padding-56);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.size-64-kBX3a2 {
|
|
62
|
+
--field-height: 64px;
|
|
63
|
+
--field-padding: var(--input-padding-64);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.size-72-BC6gqa {
|
|
67
|
+
--field-height: 72px;
|
|
68
|
+
--field-padding: var(--input-padding-72);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.field-fNIrel {
|
|
72
|
+
box-sizing: border-box;
|
|
73
|
+
align-items: center;
|
|
74
|
+
gap: var(--input-gap);
|
|
75
|
+
height: var(--field-height);
|
|
76
|
+
padding: 0 var(--field-padding);
|
|
77
|
+
border-radius: var(--input-border-radius);
|
|
78
|
+
background: var(--field-background);
|
|
79
|
+
box-shadow: inset 0 0 0 1px var(--field-border);
|
|
80
|
+
color: var(--field-color);
|
|
81
|
+
display: flex;
|
|
82
|
+
position: relative;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@media (hover: hover) {
|
|
86
|
+
.component-XIM8MH:not(.disabled-khgRiN, .readOnly-h13qVH, .error-c8nacQ) .field-fNIrel:hover {
|
|
87
|
+
box-shadow: inset 0 0 0 1px var(--input-hover-border-color);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.component-XIM8MH.hasOutline-HAFy7G:not(.disabled-khgRiN) .field-fNIrel:focus-within, .component-XIM8MH.hasOutline-HAFy7G.open-S1x_K5 .field-fNIrel {
|
|
92
|
+
box-shadow: none;
|
|
93
|
+
outline: 2px solid var(--input-focus-border-color);
|
|
94
|
+
outline-offset: 0;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.component-XIM8MH.hasOutline-HAFy7G.error-c8nacQ .field-fNIrel:focus-within, .component-XIM8MH.hasOutline-HAFy7G.error-c8nacQ.open-S1x_K5 .field-fNIrel {
|
|
98
|
+
outline-color: var(--input-error-border-color);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.trigger-yqmoik {
|
|
102
|
+
min-width: 0;
|
|
103
|
+
color: inherit;
|
|
104
|
+
text-align: left;
|
|
105
|
+
cursor: pointer;
|
|
106
|
+
appearance: none;
|
|
107
|
+
background: none;
|
|
108
|
+
border: 0;
|
|
109
|
+
outline: none;
|
|
110
|
+
flex: 1;
|
|
111
|
+
align-self: stretch;
|
|
112
|
+
padding: 0;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.trigger-yqmoik:after {
|
|
116
|
+
content: "";
|
|
117
|
+
border-radius: inherit;
|
|
118
|
+
position: absolute;
|
|
119
|
+
inset: 0;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.valueColumn-yqimvV {
|
|
123
|
+
justify-content: center;
|
|
124
|
+
gap: var(--size-2);
|
|
125
|
+
flex-direction: column;
|
|
126
|
+
min-width: 0;
|
|
127
|
+
height: 100%;
|
|
128
|
+
display: flex;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.value-AslTvH {
|
|
132
|
+
width: 100%;
|
|
133
|
+
min-width: 0;
|
|
134
|
+
color: var(--field-color);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.placeholder-kZMY22 {
|
|
138
|
+
color: var(--input-placeholder-color);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.label-EQek4i, .innerLabel-qjRhOo {
|
|
142
|
+
min-width: 0;
|
|
143
|
+
color: var(--field-label-color);
|
|
144
|
+
overflow-wrap: anywhere;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.innerLabel-qjRhOo {
|
|
148
|
+
transform: translateY(calc(50% + var(--size-2) / 2));
|
|
149
|
+
transition: transform .18s, font-size .18s;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.component-XIM8MH.labelRaised-X1UZfx .innerLabel-qjRhOo {
|
|
153
|
+
transform: translateY(0);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.component-XIM8MH.hasInnerLabel-KmtJKD .value-AslTvH {
|
|
157
|
+
opacity: 0;
|
|
158
|
+
transition: opacity .18s;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.component-XIM8MH.hasInnerLabel-KmtJKD.labelRaised-X1UZfx .value-AslTvH {
|
|
162
|
+
opacity: 1;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.icon-QZ2qDs {
|
|
166
|
+
pointer-events: none;
|
|
167
|
+
color: var(--field-icon-color);
|
|
168
|
+
flex-shrink: 0;
|
|
169
|
+
display: block;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.component-XIM8MH .clear-Rcrq1X {
|
|
173
|
+
z-index: 1;
|
|
174
|
+
width: 18px;
|
|
175
|
+
min-width: 0;
|
|
176
|
+
height: 24px;
|
|
177
|
+
min-height: 0;
|
|
178
|
+
color: var(--field-icon-color);
|
|
179
|
+
flex-shrink: 0;
|
|
180
|
+
justify-content: center;
|
|
181
|
+
align-items: center;
|
|
182
|
+
margin: 0;
|
|
183
|
+
padding: 0;
|
|
184
|
+
display: flex;
|
|
185
|
+
position: relative;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.component-XIM8MH .clear-Rcrq1X:hover, .component-XIM8MH .clear-Rcrq1X:active {
|
|
189
|
+
color: var(--field-icon-color);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.component-XIM8MH.hasOutline-HAFy7G .clear-Rcrq1X:focus-visible {
|
|
193
|
+
outline: 2px solid var(--input-focus-border-color);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.component-XIM8MH.disabled-khgRiN .trigger-yqmoik, .component-XIM8MH.disabled-khgRiN .label-EQek4i {
|
|
197
|
+
cursor: not-allowed;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.component-XIM8MH.disabled-khgRiN .placeholder-kZMY22 {
|
|
201
|
+
color: var(--input-disabled-color);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.component-XIM8MH.readOnly-h13qVH:not(.disabled-khgRiN) .trigger-yqmoik {
|
|
205
|
+
cursor: default;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.component-XIM8MH .message-IkNTrK {
|
|
209
|
+
color: var(--input-hint-color);
|
|
210
|
+
overflow-wrap: anywhere;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.component-XIM8MH.error-c8nacQ .message-IkNTrK {
|
|
214
|
+
color: var(--input-error-message-color);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.component-XIM8MH.disabled-khgRiN .message-IkNTrK {
|
|
218
|
+
color: var(--input-disabled-color);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.popup-a9mcwf {
|
|
222
|
+
--popover-shadow: none;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.panelContainer-xno_kL {
|
|
226
|
+
min-width: 0;
|
|
227
|
+
min-height: 0;
|
|
228
|
+
max-height: inherit;
|
|
229
|
+
flex-direction: column;
|
|
230
|
+
display: flex;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
@media (height <= 700px) {
|
|
234
|
+
.popup-a9mcwf.rangePopup-AVJC5u {
|
|
235
|
+
max-height: calc(100dvh - 16px);
|
|
236
|
+
top: 8px !important;
|
|
237
|
+
left: 50% !important;
|
|
238
|
+
transform: translateX(-50%) !important;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.popup-a9mcwf.rangePopup-AVJC5u .panelContainer-xno_kL {
|
|
242
|
+
--datepicker-popup-calendar-height: max(96px, calc(100dvh - 230px));
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
@media (prefers-reduced-motion: reduce) {
|
|
247
|
+
.innerLabel-qjRhOo, .component-XIM8MH.hasInnerLabel-KmtJKD .value-AslTvH {
|
|
248
|
+
transition: none;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import "./panel_module.css";
|
|
2
|
+
const panel_module = {
|
|
3
|
+
panel: "panel-Yl5t0N",
|
|
4
|
+
range: "range-PDIlXe",
|
|
5
|
+
title: "title-ORgvzc",
|
|
6
|
+
fields: "fields-G9X5NH",
|
|
7
|
+
input: "input-qmus0w",
|
|
8
|
+
inputField: "inputField-CJpjrk",
|
|
9
|
+
inputLabel: "inputLabel-zecPMt",
|
|
10
|
+
inputError: "inputError-G3MvZq",
|
|
11
|
+
body: "body-CHCACA",
|
|
12
|
+
singleCalendar: "singleCalendar-waNors",
|
|
13
|
+
navigation: "navigation-rr0ZWk",
|
|
14
|
+
arrow: "arrow-dli_dq",
|
|
15
|
+
weekdays: "weekdays-szhUFV",
|
|
16
|
+
month: "month-ojfniN",
|
|
17
|
+
monthTitle: "monthTitle-uMM8rO",
|
|
18
|
+
days: "days-L0OFe5",
|
|
19
|
+
day: "day-GR9k0b",
|
|
20
|
+
inRange: "inRange-XI5Z3W",
|
|
21
|
+
selected: "selected-Rn_79k",
|
|
22
|
+
rangeStart: "rangeStart-Ga7FdA",
|
|
23
|
+
rangeEnd: "rangeEnd-tPWcVm",
|
|
24
|
+
oneDay: "oneDay-ySm0RF",
|
|
25
|
+
previewEnd: "previewEnd-GpQ9Ct",
|
|
26
|
+
monthButton: "monthButton-Sg7pGr",
|
|
27
|
+
footer: "footer-Qcalpd",
|
|
28
|
+
count: "count-aMO4wG",
|
|
29
|
+
cancel: "cancel-GFcLkD",
|
|
30
|
+
rangeCalendar: "rangeCalendar-GJigFT",
|
|
31
|
+
months: "months-jIb0DO",
|
|
32
|
+
monthWindow: "monthWindow-rLvStO",
|
|
33
|
+
year: "year-MkIbMv",
|
|
34
|
+
monthVisible: "monthVisible-zRAM6M",
|
|
35
|
+
calendars: "calendars-kqa7kX",
|
|
36
|
+
calendarMonths: "calendarMonths-XpAPCj",
|
|
37
|
+
monthBlock: "monthBlock-GdHkqH"
|
|
38
|
+
};
|
|
39
|
+
export default panel_module;
|