@uniai-fe/uds-primitives 0.0.17 → 0.0.18
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
|
@@ -2181,6 +2181,8 @@ figure.chip {
|
|
|
2181
2181
|
--theme-input-radius-tertiary: var(--theme-radius-large-2);
|
|
2182
2182
|
--theme-input-label-color: var(--color-label-standard);
|
|
2183
2183
|
--theme-input-helper-color: var(--color-label-neutral);
|
|
2184
|
+
--theme-input-helper-success-color: var(--color-success);
|
|
2185
|
+
--theme-input-helper-error-color: var(--color-error);
|
|
2184
2186
|
--theme-input-helper-disabled-color: var(--color-label-disabled);
|
|
2185
2187
|
--theme-input-label-accent-color: var(--color-primary-default);
|
|
2186
2188
|
--theme-input-label-error-color: var(--color-error);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniai-fe/uds-primitives",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"description": "UNIAI Design System; Primitives Components Package",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"publishConfig": {
|
|
15
15
|
"access": "public"
|
|
16
16
|
},
|
|
17
|
-
"packageManager": "pnpm@10.26.
|
|
17
|
+
"packageManager": "pnpm@10.26.2",
|
|
18
18
|
"engines": {
|
|
19
19
|
"node": ">=24",
|
|
20
20
|
"pnpm": ">=10"
|
|
@@ -138,6 +138,9 @@ const Text = forwardRef<HTMLInputElement, InputProps>(
|
|
|
138
138
|
if (resolvedState === "disabled") {
|
|
139
139
|
return "disabled";
|
|
140
140
|
}
|
|
141
|
+
if (resolvedState === "loading") {
|
|
142
|
+
return "loading";
|
|
143
|
+
}
|
|
141
144
|
if (resolvedState === "error") {
|
|
142
145
|
return "error";
|
|
143
146
|
}
|
|
@@ -183,8 +186,12 @@ const Text = forwardRef<HTMLInputElement, InputProps>(
|
|
|
183
186
|
}, [visualState]);
|
|
184
187
|
|
|
185
188
|
const effectiveClearIcon = clear ?? defaultClearIcon;
|
|
189
|
+
const shouldBlockClear =
|
|
190
|
+
resolvedState === "disabled" ||
|
|
191
|
+
resolvedState === "loading" ||
|
|
192
|
+
restProps.readOnly;
|
|
186
193
|
const showClearIcon = Boolean(
|
|
187
|
-
effectiveClearIcon && hasValue &&
|
|
194
|
+
effectiveClearIcon && hasValue && !shouldBlockClear,
|
|
188
195
|
);
|
|
189
196
|
const isDisabled = resolvedState === "disabled";
|
|
190
197
|
const labelFor = labelProps?.htmlFor ?? fieldId;
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
--theme-input-radius-tertiary: var(--theme-radius-large-2);
|
|
13
13
|
--theme-input-label-color: var(--color-label-standard);
|
|
14
14
|
--theme-input-helper-color: var(--color-label-neutral);
|
|
15
|
+
--theme-input-helper-success-color: var(--color-success);
|
|
16
|
+
--theme-input-helper-error-color: var(--color-error);
|
|
15
17
|
--theme-input-helper-disabled-color: var(--color-label-disabled);
|
|
16
18
|
--theme-input-label-accent-color: var(--color-primary-default);
|
|
17
19
|
--theme-input-label-error-color: var(--color-error);
|
|
@@ -267,6 +269,10 @@
|
|
|
267
269
|
color: var(--theme-input-border-error);
|
|
268
270
|
}
|
|
269
271
|
|
|
272
|
+
// [data-state="success"] & {
|
|
273
|
+
// color: var(--theme-input-helper-success-color);
|
|
274
|
+
// }
|
|
275
|
+
|
|
270
276
|
[data-state="disabled"] & {
|
|
271
277
|
color: var(--theme-input-helper-disabled-color);
|
|
272
278
|
}
|