@uniai-fe/uds-primitives 0.7.0 → 0.7.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.
package/LICENSE ADDED
@@ -0,0 +1,27 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 UNIAI
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ ---
24
+
25
+ This project includes third-party software governed by additional licenses,
26
+ including Apache License 2.0. Refer to `THIRD_PARTY_NOTICES.md` for the full
27
+ text of those notices and any required attributions.
@@ -0,0 +1,25 @@
1
+ # Third Party Notices
2
+
3
+ Package: @uniai-fe/uds-primitives
4
+
5
+ This package declares the following direct third-party dependencies or peer dependencies.
6
+ Internal `@uniai-fe/*` packages are excluded from this notice file.
7
+
8
+ | Package | Relationship | Declared version | Installed metadata version | License |
9
+ | ------------------------------- | -------------------------- | ------------------ | -------------------------- | ------- |
10
+ | @mantine/core | peerDependency | ^8 | 8.3.18 | MIT |
11
+ | @mantine/dates | peerDependency | ^8 | 8.3.18 | MIT |
12
+ | @mantine/hooks | peerDependency | ^8 | 8.3.18 | MIT |
13
+ | @radix-ui/react-checkbox | dependency, peerDependency | ^1.3.3 | 1.3.4 | MIT |
14
+ | @radix-ui/react-dropdown-menu | dependency, peerDependency | ^2.1.16 | 2.1.17 | MIT |
15
+ | @radix-ui/react-popover | dependency, peerDependency | ^1.1.15 | 1.1.16 | MIT |
16
+ | @radix-ui/react-radio-group | dependency, peerDependency | ^1.3.8 | 1.4.0 | MIT |
17
+ | @radix-ui/react-tabs | dependency, peerDependency | ^1.1.13 | 1.1.14 | MIT |
18
+ | @radix-ui/react-tooltip | dependency, peerDependency | ^1.2.8 | 1.2.9 | MIT |
19
+ | @radix-ui/react-visually-hidden | dependency, peerDependency | ^1.2.4 | 1.2.5 | MIT |
20
+ | clsx | dependency, peerDependency | ^2.1.1 | 2.1.1 | MIT |
21
+ | dayjs | dependency, peerDependency | ^1.11.21, ^1.11.20 | 1.11.21 | MIT |
22
+ | react | peerDependency | ^19 | 19.2.7 | MIT |
23
+ | react-daum-postcode | dependency, peerDependency | ^4.0.0 | 4.0.0 | MIT |
24
+ | react-dom | peerDependency | ^19 | 19.2.7 | MIT |
25
+ | react-hook-form | peerDependency | ^7 | 7.78.0 | MIT |
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniai-fe/uds-primitives",
3
- "version": "0.7.0",
3
+ "version": "0.7.3",
4
4
  "description": "UNIAI Design System; Primitives Components Package",
5
5
  "type": "module",
6
6
  "private": false,
@@ -29,7 +29,8 @@
29
29
  "files": [
30
30
  "src",
31
31
  "dist",
32
- "styles.scss"
32
+ "styles.scss",
33
+ "THIRD_PARTY_NOTICES.md"
33
34
  ],
34
35
  "main": "./src/index.tsx",
35
36
  "module": "./src/index.tsx",
@@ -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
- ? ({ ["--input-time-width" as const]: widthValue } as CSSProperties)
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={maxDropdownContentHeight}
318
- scrollAreaProps={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;