@ttoss/ui 2.0.1 → 2.0.2

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 CHANGED
@@ -147,12 +147,12 @@ import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
147
147
  var Input = /*#__PURE__*/React3.forwardRef(({
148
148
  leadingIcon,
149
149
  onLeadingIconClick,
150
- trailingIcon,
151
150
  onTrailingIconClick,
152
151
  className,
153
152
  sx,
154
153
  ...inputProps
155
154
  }, ref) => {
155
+ const trailingIcon = inputProps["aria-invalid"] ? "warning-alt" : inputProps.trailingIcon;
156
156
  return /* @__PURE__ */jsxs4(Flex, {
157
157
  className,
158
158
  sx: {
@@ -303,7 +303,7 @@ var Select = /*#__PURE__*/React5.forwardRef(({
303
303
  fontSize: "base"
304
304
  },
305
305
  children: /* @__PURE__ */jsx8(Icon, {
306
- icon: "error"
306
+ icon: "warning-alt"
307
307
  })
308
308
  })]
309
309
  }),
package/dist/index.js CHANGED
@@ -224,12 +224,12 @@ var import_jsx_runtime5 = require("react/jsx-runtime");
224
224
  var Input = React3.forwardRef(({
225
225
  leadingIcon,
226
226
  onLeadingIconClick,
227
- trailingIcon,
228
227
  onTrailingIconClick,
229
228
  className,
230
229
  sx,
231
230
  ...inputProps
232
231
  }, ref) => {
232
+ const trailingIcon = inputProps["aria-invalid"] ? "warning-alt" : inputProps.trailingIcon;
233
233
  return /* @__PURE__ */(0, import_jsx_runtime5.jsxs)(import_theme_ui8.Flex, {
234
234
  className,
235
235
  sx: {
@@ -380,7 +380,7 @@ var Select = React5.forwardRef(({
380
380
  fontSize: "base"
381
381
  },
382
382
  children: /* @__PURE__ */(0, import_jsx_runtime8.jsx)(Icon, {
383
- icon: "error"
383
+ icon: "warning-alt"
384
384
  })
385
385
  })]
386
386
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/ui",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "Primitive layout, typographic, and other components for styling applications.",
5
5
  "author": "ttoss",
6
6
  "contributors": [
@@ -14,7 +14,6 @@ export const Input = React.forwardRef<HTMLInputElement, InputProps>(
14
14
  {
15
15
  leadingIcon,
16
16
  onLeadingIconClick,
17
- trailingIcon,
18
17
  onTrailingIconClick,
19
18
  className,
20
19
  sx,
@@ -22,6 +21,10 @@ export const Input = React.forwardRef<HTMLInputElement, InputProps>(
22
21
  },
23
22
  ref
24
23
  ) => {
24
+ const trailingIcon = inputProps['aria-invalid']
25
+ ? 'warning-alt'
26
+ : inputProps.trailingIcon;
27
+
25
28
  return (
26
29
  <Flex
27
30
  className={className}
@@ -42,7 +42,7 @@ export const Select = React.forwardRef<HTMLSelectElement, SelectProps>(
42
42
  fontSize: 'base',
43
43
  }}
44
44
  >
45
- <Icon icon="error" />
45
+ <Icon icon="warning-alt" />
46
46
  </Text>
47
47
  )}
48
48
  </>