@ttoss/ui 5.4.0 → 5.5.0
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/esm/index.js +8 -4
- package/package.json +4 -4
package/dist/esm/index.js
CHANGED
|
@@ -386,8 +386,9 @@ var Input = React6.forwardRef(({
|
|
|
386
386
|
...inputProps
|
|
387
387
|
}, ref) => {
|
|
388
388
|
const trailingIcon = inputProps["aria-invalid"] ? "warning-alt" : trailingIconProp;
|
|
389
|
+
const isWarning = !inputProps["aria-invalid"] && trailingIcon === "warning-alt";
|
|
389
390
|
return /* @__PURE__ */jsxs4(Flex, {
|
|
390
|
-
className
|
|
391
|
+
className: `${className} ${isWarning ? "is-warning" : ""}`,
|
|
391
392
|
sx: {
|
|
392
393
|
...sx,
|
|
393
394
|
position: "relative",
|
|
@@ -425,7 +426,9 @@ var Input = React6.forwardRef(({
|
|
|
425
426
|
position: "absolute",
|
|
426
427
|
right: "1rem",
|
|
427
428
|
alignSelf: "center",
|
|
428
|
-
|
|
429
|
+
color: isWarning ? "feedback.text.caution.default" : void 0,
|
|
430
|
+
cursor: onTrailingIconClick ? "pointer" : "default",
|
|
431
|
+
fontSize: "xl"
|
|
429
432
|
},
|
|
430
433
|
variant: "trailing-icon",
|
|
431
434
|
onClick: onTrailingIconClick,
|
|
@@ -635,6 +638,7 @@ var Label = ({
|
|
|
635
638
|
fontSize: "sm",
|
|
636
639
|
lineHeight: "normal",
|
|
637
640
|
width: "fit-content",
|
|
641
|
+
color: "input.text.secondary.default",
|
|
638
642
|
...sx
|
|
639
643
|
},
|
|
640
644
|
...props,
|
|
@@ -696,7 +700,7 @@ var Control = props => {
|
|
|
696
700
|
if (hasError) {
|
|
697
701
|
return "display.border.negative.default";
|
|
698
702
|
}
|
|
699
|
-
return "";
|
|
703
|
+
return "display.border.muted.default";
|
|
700
704
|
})();
|
|
701
705
|
const backgroundColor = (() => {
|
|
702
706
|
if (isDisabled) {
|
|
@@ -710,7 +714,7 @@ var Control = props => {
|
|
|
710
714
|
borderColor,
|
|
711
715
|
backgroundColor,
|
|
712
716
|
paddingX: "4",
|
|
713
|
-
paddingY: "
|
|
717
|
+
paddingY: "3"
|
|
714
718
|
}
|
|
715
719
|
},
|
|
716
720
|
children: /* @__PURE__ */jsx16(components.Control, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/ui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.5.0",
|
|
4
4
|
"description": "Primitive layout, typographic, and other components for styling applications.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ttoss",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"react-select": "^5.9.0",
|
|
29
29
|
"react-tooltip": "^5.28.0",
|
|
30
30
|
"theme-ui": "^0.17.1",
|
|
31
|
-
"@ttoss/theme": "^2.
|
|
31
|
+
"@ttoss/theme": "^2.5.0"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@emotion/react": "^11",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"jest": "^29.7.0",
|
|
44
44
|
"react": "^19.0.0",
|
|
45
45
|
"tsup": "^8.3.5",
|
|
46
|
-
"@ttoss/config": "^1.35.2",
|
|
47
46
|
"@ttoss/react-icons": "^0.4.9",
|
|
48
|
-
"@ttoss/test-utils": "^2.1.22"
|
|
47
|
+
"@ttoss/test-utils": "^2.1.22",
|
|
48
|
+
"@ttoss/config": "^1.35.2"
|
|
49
49
|
},
|
|
50
50
|
"keywords": [
|
|
51
51
|
"React",
|