@uniai-fe/uds-primitives 0.12.10 → 0.12.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/dist/styles.css
CHANGED
|
@@ -4657,7 +4657,9 @@ figure.chip {
|
|
|
4657
4657
|
}
|
|
4658
4658
|
|
|
4659
4659
|
.input-time-period-field {
|
|
4660
|
+
flex: 0 1 var(--input-time-period-field-width);
|
|
4660
4661
|
width: var(--input-time-period-field-width);
|
|
4662
|
+
min-width: 0;
|
|
4661
4663
|
height: var(--input-time-field-height);
|
|
4662
4664
|
padding: 0;
|
|
4663
4665
|
border: 0;
|
|
@@ -4728,6 +4730,15 @@ figure.chip {
|
|
|
4728
4730
|
border-radius: var(--input-time-radius) 0 0 var(--input-time-radius);
|
|
4729
4731
|
}
|
|
4730
4732
|
|
|
4733
|
+
.input-time:where([data-active-unit][data-format="12h"])
|
|
4734
|
+
.input-time-trigger-input {
|
|
4735
|
+
padding-inline: var(--spacing-padding-2);
|
|
4736
|
+
}
|
|
4737
|
+
.input-time:where([data-active-unit][data-format="12h"])
|
|
4738
|
+
.input-time-icon-button {
|
|
4739
|
+
margin-left: var(--spacing-gap-2);
|
|
4740
|
+
}
|
|
4741
|
+
|
|
4731
4742
|
.input-time:where([data-size="small"]) {
|
|
4732
4743
|
--input-time-radius: var(--input-default-radius-small);
|
|
4733
4744
|
--input-time-stepper-button-height: calc(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniai-fe/uds-primitives",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.11",
|
|
4
4
|
"description": "UNIAI Design System; Primitives Components Package",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -87,11 +87,11 @@
|
|
|
87
87
|
"react-hook-form": "^7.86.0",
|
|
88
88
|
"sass": "^1.102.0",
|
|
89
89
|
"typescript": "6.0.3",
|
|
90
|
-
"@uniai-fe/eslint-config": "0.4.
|
|
91
|
-
"@uniai-fe/tsconfig": "0.2.0",
|
|
92
|
-
"@uniai-fe/uds-foundation": "0.6.0",
|
|
90
|
+
"@uniai-fe/eslint-config": "0.4.4",
|
|
93
91
|
"@uniai-fe/next-devkit": "0.4.1",
|
|
94
|
-
"@uniai-fe/util-functions": "0.4.3"
|
|
92
|
+
"@uniai-fe/util-functions": "0.4.3",
|
|
93
|
+
"@uniai-fe/tsconfig": "0.2.0",
|
|
94
|
+
"@uniai-fe/uds-foundation": "0.6.0"
|
|
95
95
|
},
|
|
96
96
|
"scripts": {
|
|
97
97
|
"check:pre-commit": "pnpm --dir ../../.. run check:pre-commit",
|
|
@@ -294,6 +294,23 @@ const InputDateTemplate = forwardRef<HTMLDivElement, InputCalendarProps>(
|
|
|
294
294
|
name={register?.name ?? name}
|
|
295
295
|
form={form ?? hiddenInputProps?.form}
|
|
296
296
|
required={required ?? hiddenInputProps?.required}
|
|
297
|
+
ref={node => {
|
|
298
|
+
register?.ref(node);
|
|
299
|
+
if (node && register) {
|
|
300
|
+
// RHF ref의 form default 적용이 끝난 뒤 Calendar 값을 DOM과 RHF storage에 동기화한다.
|
|
301
|
+
queueMicrotask(() => {
|
|
302
|
+
if (!node.isConnected) {
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
node.value = serializedCalendarValue;
|
|
306
|
+
void register.onChange({
|
|
307
|
+
target: node,
|
|
308
|
+
currentTarget: node,
|
|
309
|
+
type: "change",
|
|
310
|
+
} as unknown as ChangeEvent<HTMLInputElement>);
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
}}
|
|
297
314
|
/>
|
|
298
315
|
)}
|
|
299
316
|
</>
|
|
@@ -348,6 +348,23 @@ const InputDateRangeTemplate = forwardRef<HTMLElement, InputCalendarRangeProps>(
|
|
|
348
348
|
name={startRegister?.name ?? startName}
|
|
349
349
|
form={form ?? startHiddenInputProps?.form}
|
|
350
350
|
required={required ?? startHiddenInputProps?.required}
|
|
351
|
+
ref={node => {
|
|
352
|
+
startRegister?.ref(node);
|
|
353
|
+
if (node && startRegister) {
|
|
354
|
+
// RHF ref의 form default 적용이 끝난 뒤 range 시작값을 DOM과 RHF storage에 동기화한다.
|
|
355
|
+
queueMicrotask(() => {
|
|
356
|
+
if (!node.isConnected) {
|
|
357
|
+
return;
|
|
358
|
+
}
|
|
359
|
+
node.value = serializedStartValue;
|
|
360
|
+
void startRegister.onChange({
|
|
361
|
+
target: node,
|
|
362
|
+
currentTarget: node,
|
|
363
|
+
type: "change",
|
|
364
|
+
} as unknown as ChangeEvent<HTMLInputElement>);
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
}}
|
|
351
368
|
/>
|
|
352
369
|
)}
|
|
353
370
|
{(endRegister?.name || endName) && (
|
|
@@ -360,6 +377,23 @@ const InputDateRangeTemplate = forwardRef<HTMLElement, InputCalendarRangeProps>(
|
|
|
360
377
|
name={endRegister?.name ?? endName}
|
|
361
378
|
form={form ?? endHiddenInputProps?.form}
|
|
362
379
|
required={required ?? endHiddenInputProps?.required}
|
|
380
|
+
ref={node => {
|
|
381
|
+
endRegister?.ref(node);
|
|
382
|
+
if (node && endRegister) {
|
|
383
|
+
// RHF ref의 form default 적용이 끝난 뒤 range 종료값을 DOM과 RHF storage에 동기화한다.
|
|
384
|
+
queueMicrotask(() => {
|
|
385
|
+
if (!node.isConnected) {
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
388
|
+
node.value = serializedEndValue;
|
|
389
|
+
void endRegister.onChange({
|
|
390
|
+
target: node,
|
|
391
|
+
currentTarget: node,
|
|
392
|
+
type: "change",
|
|
393
|
+
} as unknown as ChangeEvent<HTMLInputElement>);
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
}}
|
|
363
397
|
/>
|
|
364
398
|
)}
|
|
365
399
|
</>
|
|
@@ -126,6 +126,7 @@ const InputTimeTrigger = forwardRef<HTMLDivElement, InputTimeTriggerProps>(
|
|
|
126
126
|
data-state={state}
|
|
127
127
|
data-readonly={readOnly ? "true" : undefined}
|
|
128
128
|
data-active-unit={activeUnit ?? undefined}
|
|
129
|
+
data-format={format}
|
|
129
130
|
data-icon-position={iconPosition}
|
|
130
131
|
onBlur={onRootBlur}
|
|
131
132
|
onClick={onRootClick}
|
|
@@ -85,7 +85,9 @@
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
.input-time-period-field {
|
|
88
|
+
flex: 0 1 var(--input-time-period-field-width);
|
|
88
89
|
width: var(--input-time-period-field-width);
|
|
90
|
+
min-width: 0;
|
|
89
91
|
height: var(--input-time-field-height);
|
|
90
92
|
padding: 0;
|
|
91
93
|
border: 0;
|
|
@@ -160,6 +162,16 @@
|
|
|
160
162
|
border-radius: var(--input-time-radius) 0 0 var(--input-time-radius);
|
|
161
163
|
}
|
|
162
164
|
|
|
165
|
+
.input-time:where([data-active-unit][data-format="12h"]) {
|
|
166
|
+
.input-time-trigger-input {
|
|
167
|
+
padding-inline: var(--spacing-padding-2);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.input-time-icon-button {
|
|
171
|
+
margin-left: var(--spacing-gap-2);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
163
175
|
.input-time:where([data-size="small"]) {
|
|
164
176
|
--input-time-radius: var(--input-default-radius-small);
|
|
165
177
|
--input-time-stepper-button-height: calc(
|