@uniai-fe/uds-primitives 0.3.55 → 0.3.57
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 +5 -6
- package/package.json +1 -1
- package/src/components/input/markup/foundation/TextArea.tsx +1 -0
- package/src/components/input/styles/foundation.scss +1 -1
- package/src/components/input/styles/variables.scss +1 -2
- package/src/components/select/markup/Default.tsx +16 -0
- package/src/components/select/markup/foundation/Selected.tsx +10 -0
- package/src/components/select/styles/select.scss +3 -1
- package/src/components/select/styles/variables.scss +2 -2
package/dist/styles.css
CHANGED
|
@@ -428,8 +428,7 @@
|
|
|
428
428
|
--input-text-disabled-color: var(--color-label-disabled);
|
|
429
429
|
--input-placeholder-color: var(--color-label-alternative);
|
|
430
430
|
--input-placeholder-disabled-color: var(--color-label-disabled);
|
|
431
|
-
|
|
432
|
-
--input-placeholder-readonly-color: transparent;
|
|
431
|
+
--input-placeholder-readonly-color: var(--input-placeholder-color);
|
|
433
432
|
--input-font-size: var(--input-text-medium-size);
|
|
434
433
|
--input-line-height: var(--input-text-medium-line-height);
|
|
435
434
|
--input-font-weight: var(--input-text-medium-weight);
|
|
@@ -590,7 +589,7 @@
|
|
|
590
589
|
/* 변경: placeholder disabled/readonly 토큰을 분리해 상태별 제어 지점을 고정한다. */
|
|
591
590
|
--select-primary-color-placeholder-disabled: var(--color-label-disabled);
|
|
592
591
|
--select-primary-color-placeholder-readonly: var(
|
|
593
|
-
--select-primary-color-placeholder
|
|
592
|
+
--select-primary-color-placeholder
|
|
594
593
|
);
|
|
595
594
|
--select-primary-color-surface: var(--input-surface-color);
|
|
596
595
|
--select-primary-color-text: var(--color-label-alternative);
|
|
@@ -618,7 +617,7 @@
|
|
|
618
617
|
--select-secondary-color-placeholder: var(--color-label-alternative);
|
|
619
618
|
--select-secondary-color-placeholder-disabled: var(--color-label-disabled);
|
|
620
619
|
--select-secondary-color-placeholder-readonly: var(
|
|
621
|
-
--select-secondary-color-placeholder
|
|
620
|
+
--select-secondary-color-placeholder
|
|
622
621
|
);
|
|
623
622
|
--select-color-surface-secondary: transparent;
|
|
624
623
|
--select-color-surface-secondary-hover: var(--color-surface-static-cool-gray);
|
|
@@ -2778,7 +2777,7 @@ figure.chip {
|
|
|
2778
2777
|
box-shadow: none;
|
|
2779
2778
|
}
|
|
2780
2779
|
|
|
2781
|
-
.input-field[data-has-value=true] .input-element {
|
|
2780
|
+
.input-field[data-has-value=true] .input-element:not(:disabled) {
|
|
2782
2781
|
color: var(--input-text-color);
|
|
2783
2782
|
caret-color: var(--input-text-color);
|
|
2784
2783
|
}
|
|
@@ -4074,7 +4073,7 @@ figure.chip {
|
|
|
4074
4073
|
color: var(--select-secondary-color-text-readonly);
|
|
4075
4074
|
}
|
|
4076
4075
|
|
|
4077
|
-
.select-value[data-has-value=true] .select-input-label {
|
|
4076
|
+
.select-button:where(:not([data-state=disabled])) .select-value[data-has-value=true] .select-input-label {
|
|
4078
4077
|
color: var(--select-color-text-value);
|
|
4079
4078
|
caret-color: var(--select-color-text-value);
|
|
4080
4079
|
}
|
package/package.json
CHANGED
|
@@ -192,6 +192,7 @@ const InputTextArea = forwardRef<HTMLTextAreaElement, InputTextAreaProps>(
|
|
|
192
192
|
data-state={visualState}
|
|
193
193
|
data-priority={priority}
|
|
194
194
|
data-size={resolvedSize}
|
|
195
|
+
data-has-value={currentLength > 0 ? "true" : "false"}
|
|
195
196
|
data-readonly={isReadOnly ? "true" : undefined}
|
|
196
197
|
data-block={resolvedBlock ? "true" : undefined}
|
|
197
198
|
>
|
|
@@ -85,8 +85,7 @@
|
|
|
85
85
|
--input-text-disabled-color: var(--color-label-disabled);
|
|
86
86
|
--input-placeholder-color: var(--color-label-alternative);
|
|
87
87
|
--input-placeholder-disabled-color: var(--color-label-disabled);
|
|
88
|
-
|
|
89
|
-
--input-placeholder-readonly-color: transparent;
|
|
88
|
+
--input-placeholder-readonly-color: var(--input-placeholder-color);
|
|
90
89
|
--input-font-size: var(--input-text-medium-size);
|
|
91
90
|
--input-line-height: var(--input-text-medium-line-height);
|
|
92
91
|
--input-font-weight: var(--input-text-medium-weight);
|
|
@@ -233,6 +233,22 @@ export function SelectDefault<OptionData = unknown>({
|
|
|
233
233
|
onSelectOption?.(option, previousOption, event);
|
|
234
234
|
|
|
235
235
|
if (hasChanged) {
|
|
236
|
+
const nextRegisterValue =
|
|
237
|
+
String(option.value) === SELECT_CUSTOM_OPTION_VALUE && !customRegister
|
|
238
|
+
? ""
|
|
239
|
+
: option.value;
|
|
240
|
+
|
|
241
|
+
if (register?.name) {
|
|
242
|
+
// 변경 설명: hidden input value 변경만으로는 RHF context가 갱신되지 않으므로 source field change를 명시적으로 전파한다.
|
|
243
|
+
register.onChange?.({
|
|
244
|
+
target: {
|
|
245
|
+
name: register.name,
|
|
246
|
+
value: nextRegisterValue,
|
|
247
|
+
},
|
|
248
|
+
type: "change",
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
|
|
236
252
|
setUncontrolledSelectedValue(option.value);
|
|
237
253
|
onSelectChange?.(option, previousOption, event);
|
|
238
254
|
}
|
|
@@ -162,6 +162,16 @@ const SelectTriggerSelected = ({
|
|
|
162
162
|
onChange={event => {
|
|
163
163
|
// 6) RHF(customRegister) → 외부 inputProps → 내부 state 콜백 순으로 변경을 전파한다.
|
|
164
164
|
customRegister?.onChange?.(event);
|
|
165
|
+
if (!customRegister && register?.name) {
|
|
166
|
+
// 변경 설명: customRegister가 없는 직접입력은 source field(register)에 현재 텍스트를 그대로 기록한다.
|
|
167
|
+
register.onChange?.({
|
|
168
|
+
target: {
|
|
169
|
+
name: register.name,
|
|
170
|
+
value: event.currentTarget.value,
|
|
171
|
+
},
|
|
172
|
+
type: "change",
|
|
173
|
+
});
|
|
174
|
+
}
|
|
165
175
|
inputProps?.onChange?.(event);
|
|
166
176
|
onLabelChange?.(event.currentTarget.value);
|
|
167
177
|
}}
|
|
@@ -297,7 +297,9 @@
|
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
|
|
300
|
-
.select-
|
|
300
|
+
.select-button:where(:not([data-state="disabled"]))
|
|
301
|
+
.select-value[data-has-value="true"]
|
|
302
|
+
.select-input-label {
|
|
301
303
|
color: var(--select-color-text-value);
|
|
302
304
|
caret-color: var(--select-color-text-value);
|
|
303
305
|
}
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
/* 변경: placeholder disabled/readonly 토큰을 분리해 상태별 제어 지점을 고정한다. */
|
|
96
96
|
--select-primary-color-placeholder-disabled: var(--color-label-disabled);
|
|
97
97
|
--select-primary-color-placeholder-readonly: var(
|
|
98
|
-
--select-primary-color-placeholder
|
|
98
|
+
--select-primary-color-placeholder
|
|
99
99
|
);
|
|
100
100
|
--select-primary-color-surface: var(--input-surface-color);
|
|
101
101
|
--select-primary-color-text: var(--color-label-alternative);
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
--select-secondary-color-placeholder: var(--color-label-alternative);
|
|
124
124
|
--select-secondary-color-placeholder-disabled: var(--color-label-disabled);
|
|
125
125
|
--select-secondary-color-placeholder-readonly: var(
|
|
126
|
-
--select-secondary-color-placeholder
|
|
126
|
+
--select-secondary-color-placeholder
|
|
127
127
|
);
|
|
128
128
|
--select-color-surface-secondary: transparent;
|
|
129
129
|
--select-color-surface-secondary-hover: var(--color-surface-static-cool-gray);
|