@uniai-fe/uds-primitives 0.7.0 → 0.7.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/dist/styles.css
CHANGED
|
@@ -601,6 +601,7 @@
|
|
|
601
601
|
--input-time-dropdown-border-color: var(--color-border-standard-cool-gray);
|
|
602
602
|
--input-time-dropdown-surface-color: var(--color-common-100);
|
|
603
603
|
--input-time-dropdown-shadow: 0px 4px 22px rgba(19, 22, 32, 0.12);
|
|
604
|
+
--input-time-dropdown-content-height: 200px;
|
|
604
605
|
--input-time-dropdown-group-gap: var(--spacing-gap-3);
|
|
605
606
|
--input-time-option-gap: var(--spacing-gap-1);
|
|
606
607
|
--input-time-scrollarea-width: 64px;
|
|
@@ -4044,22 +4045,27 @@ figure.chip {
|
|
|
4044
4045
|
position: absolute;
|
|
4045
4046
|
z-index: 20;
|
|
4046
4047
|
box-sizing: border-box;
|
|
4048
|
+
max-height: calc(var(--input-time-dropdown-content-height) + var(--input-time-dropdown-padding) + var(--input-time-dropdown-padding));
|
|
4047
4049
|
padding: var(--input-time-dropdown-padding);
|
|
4048
4050
|
border: var(--input-time-dropdown-border-width) solid var(--input-time-dropdown-border-color);
|
|
4049
4051
|
border-radius: var(--input-time-dropdown-radius);
|
|
4050
4052
|
background-color: var(--input-time-dropdown-surface-color);
|
|
4051
4053
|
box-shadow: var(--input-time-dropdown-shadow);
|
|
4054
|
+
overflow: hidden;
|
|
4052
4055
|
}
|
|
4053
4056
|
|
|
4054
4057
|
.input-time-scrollarea {
|
|
4055
4058
|
position: relative;
|
|
4056
4059
|
min-width: var(--input-time-scrollarea-width);
|
|
4060
|
+
height: var(--input-time-dropdown-content-height);
|
|
4061
|
+
max-height: var(--input-time-dropdown-content-height);
|
|
4057
4062
|
overflow: hidden;
|
|
4058
4063
|
}
|
|
4059
4064
|
|
|
4060
4065
|
.input-time-scrollarea .mantine-ScrollArea-viewport {
|
|
4061
4066
|
box-sizing: border-box;
|
|
4062
4067
|
height: 100%;
|
|
4068
|
+
max-height: var(--input-time-dropdown-content-height);
|
|
4063
4069
|
padding-inline-end: var(--input-time-scrollarea-gutter);
|
|
4064
4070
|
scrollbar-gutter: stable;
|
|
4065
4071
|
overflow: auto;
|
|
@@ -4068,6 +4074,8 @@ figure.chip {
|
|
|
4068
4074
|
.input-time-controls-list-group {
|
|
4069
4075
|
display: flex;
|
|
4070
4076
|
gap: var(--input-time-dropdown-group-gap);
|
|
4077
|
+
max-height: var(--input-time-dropdown-content-height);
|
|
4078
|
+
overflow: hidden;
|
|
4071
4079
|
}
|
|
4072
4080
|
|
|
4073
4081
|
.input-time-controls-list {
|
package/package.json
CHANGED
|
@@ -31,6 +31,8 @@ const INPUT_TIME_CLASS_NAMES = {
|
|
|
31
31
|
scrollarea: "input-time-scrollarea",
|
|
32
32
|
} satisfies Partial<Record<TimePickerStylesNames, string>>;
|
|
33
33
|
|
|
34
|
+
const INPUT_TIME_DROPDOWN_CONTENT_HEIGHT = 200;
|
|
35
|
+
|
|
34
36
|
/**
|
|
35
37
|
* Input Time Picker; Mantine TimePicker 기반 UDS adapter.
|
|
36
38
|
* `Input.Time.Picker` public namespace에서 사용하며 Calendar/date 하위에 속하지 않는다.
|
|
@@ -178,13 +180,21 @@ const InputTimePicker = forwardRef<HTMLDivElement, InputTimePickerProps>(
|
|
|
178
180
|
: undefined;
|
|
179
181
|
const widthValue =
|
|
180
182
|
width !== undefined ? getFormFieldWidthValue(width) : undefined;
|
|
183
|
+
const dropdownContentHeight =
|
|
184
|
+
maxDropdownContentHeight ?? INPUT_TIME_DROPDOWN_CONTENT_HEIGHT;
|
|
181
185
|
const containerStyle: CSSProperties | undefined =
|
|
182
|
-
widthValue !== undefined
|
|
183
|
-
? ({
|
|
186
|
+
widthValue !== undefined || maxDropdownContentHeight !== undefined
|
|
187
|
+
? ({
|
|
188
|
+
"--input-time-width": widthValue,
|
|
189
|
+
"--input-time-dropdown-content-height":
|
|
190
|
+
maxDropdownContentHeight !== undefined
|
|
191
|
+
? `${maxDropdownContentHeight}px`
|
|
192
|
+
: undefined,
|
|
193
|
+
} as CSSProperties)
|
|
184
194
|
: undefined;
|
|
185
195
|
const resolvedIcon = icon === undefined ? <ClockIcon /> : icon;
|
|
186
196
|
const showClearButton = Boolean(
|
|
187
|
-
clearable && timeValue && !isDisabled && !readOnly,
|
|
197
|
+
clearable && timeValue && isFocused && !isDisabled && !readOnly,
|
|
188
198
|
);
|
|
189
199
|
const reserveClearSpace = Boolean(clearable && !isDisabled && !readOnly);
|
|
190
200
|
const rightSectionWidth =
|
|
@@ -267,6 +277,11 @@ const InputTimePicker = forwardRef<HTMLDivElement, InputTimePickerProps>(
|
|
|
267
277
|
) : (
|
|
268
278
|
clearButton
|
|
269
279
|
);
|
|
280
|
+
const resolvedScrollAreaProps = {
|
|
281
|
+
h: "var(--input-time-dropdown-content-height)",
|
|
282
|
+
mah: "var(--input-time-dropdown-content-height)",
|
|
283
|
+
...scrollAreaProps,
|
|
284
|
+
};
|
|
270
285
|
|
|
271
286
|
return (
|
|
272
287
|
<div
|
|
@@ -314,8 +329,8 @@ const InputTimePicker = forwardRef<HTMLDivElement, InputTimePickerProps>(
|
|
|
314
329
|
secondsPlaceholder={secondsPlaceholder}
|
|
315
330
|
pasteSplit={pasteSplit}
|
|
316
331
|
presets={presets}
|
|
317
|
-
maxDropdownContentHeight={
|
|
318
|
-
scrollAreaProps={
|
|
332
|
+
maxDropdownContentHeight={dropdownContentHeight}
|
|
333
|
+
scrollAreaProps={resolvedScrollAreaProps}
|
|
319
334
|
reverseTimeControlsList={reverseTimeControlsList}
|
|
320
335
|
popoverProps={{
|
|
321
336
|
width: "target",
|
|
@@ -340,23 +340,31 @@
|
|
|
340
340
|
position: absolute;
|
|
341
341
|
z-index: 20;
|
|
342
342
|
box-sizing: border-box;
|
|
343
|
+
max-height: calc(
|
|
344
|
+
var(--input-time-dropdown-content-height) +
|
|
345
|
+
var(--input-time-dropdown-padding) + var(--input-time-dropdown-padding)
|
|
346
|
+
);
|
|
343
347
|
padding: var(--input-time-dropdown-padding);
|
|
344
348
|
border: var(--input-time-dropdown-border-width) solid
|
|
345
349
|
var(--input-time-dropdown-border-color);
|
|
346
350
|
border-radius: var(--input-time-dropdown-radius);
|
|
347
351
|
background-color: var(--input-time-dropdown-surface-color);
|
|
348
352
|
box-shadow: var(--input-time-dropdown-shadow);
|
|
353
|
+
overflow: hidden;
|
|
349
354
|
}
|
|
350
355
|
|
|
351
356
|
.input-time-scrollarea {
|
|
352
357
|
position: relative;
|
|
353
358
|
min-width: var(--input-time-scrollarea-width);
|
|
359
|
+
height: var(--input-time-dropdown-content-height);
|
|
360
|
+
max-height: var(--input-time-dropdown-content-height);
|
|
354
361
|
overflow: hidden;
|
|
355
362
|
}
|
|
356
363
|
|
|
357
364
|
.input-time-scrollarea .mantine-ScrollArea-viewport {
|
|
358
365
|
box-sizing: border-box;
|
|
359
366
|
height: 100%;
|
|
367
|
+
max-height: var(--input-time-dropdown-content-height);
|
|
360
368
|
padding-inline-end: var(--input-time-scrollarea-gutter);
|
|
361
369
|
scrollbar-gutter: stable;
|
|
362
370
|
overflow: auto;
|
|
@@ -365,6 +373,8 @@
|
|
|
365
373
|
.input-time-controls-list-group {
|
|
366
374
|
display: flex;
|
|
367
375
|
gap: var(--input-time-dropdown-group-gap);
|
|
376
|
+
max-height: var(--input-time-dropdown-content-height);
|
|
377
|
+
overflow: hidden;
|
|
368
378
|
}
|
|
369
379
|
|
|
370
380
|
.input-time-controls-list {
|
|
@@ -200,6 +200,7 @@
|
|
|
200
200
|
--input-time-dropdown-border-color: var(--color-border-standard-cool-gray);
|
|
201
201
|
--input-time-dropdown-surface-color: var(--color-common-100);
|
|
202
202
|
--input-time-dropdown-shadow: 0px 4px 22px rgba(19, 22, 32, 0.12);
|
|
203
|
+
--input-time-dropdown-content-height: 200px;
|
|
203
204
|
--input-time-dropdown-group-gap: var(--spacing-gap-3);
|
|
204
205
|
--input-time-option-gap: var(--spacing-gap-1);
|
|
205
206
|
--input-time-scrollarea-width: 64px;
|