@ttoss/ui 2.0.3 → 2.0.5

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
@@ -29,6 +29,9 @@ var ThemeProvider = ({
29
29
  });
30
30
  };
31
31
 
32
+ // src/index.ts
33
+ import { addIcon } from "@ttoss/theme";
34
+
32
35
  // src/theme/useTheme.ts
33
36
  import { useThemeUI } from "theme-ui";
34
37
  var useTheme = useThemeUI;
@@ -146,13 +149,14 @@ import { Input as InputUI } from "theme-ui";
146
149
  import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
147
150
  var Input = /*#__PURE__*/React3.forwardRef(({
148
151
  leadingIcon,
152
+ trailingIcon: trailingIconProp,
149
153
  onLeadingIconClick,
150
154
  onTrailingIconClick,
151
155
  className,
152
156
  sx,
153
157
  ...inputProps
154
158
  }, ref) => {
155
- const trailingIcon = inputProps["aria-invalid"] ? "warning-alt" : inputProps.trailingIcon;
159
+ const trailingIcon = inputProps["aria-invalid"] ? "warning-alt" : trailingIconProp;
156
160
  return /* @__PURE__ */jsxs4(Flex, {
157
161
  className,
158
162
  sx: {
@@ -721,4 +725,4 @@ var ActionButton = ({
721
725
  ...props
722
726
  });
723
727
  };
724
- export { ActionButton, Badge, BaseStyles, Box, Button, Card, Checkbox, CloseButton, Container, Divider, Flex, Global2 as Global, Grid, Heading, HelpText, Icon, IconButton, Image, InfiniteLinearProgress, Input, InputNumber, InputPassword, Label, Progress as LinearProgress, Link, Paragraph, Radio, Select, Slider, Spinner, Stack, Text, Textarea, ThemeProvider, keyframes, useBreakpointIndex, useResponsiveValue, useTheme };
728
+ export { ActionButton, Badge, BaseStyles, Box, Button, Card, Checkbox, CloseButton, Container, Divider, Flex, Global2 as Global, Grid, Heading, HelpText, Icon, IconButton, Image, InfiniteLinearProgress, Input, InputNumber, InputPassword, Label, Progress as LinearProgress, Link, Paragraph, Radio, Select, Slider, Spinner, Stack, Text, Textarea, ThemeProvider, addIcon, keyframes, useBreakpointIndex, useResponsiveValue, useTheme };
package/dist/index.d.mts CHANGED
@@ -5,6 +5,7 @@ export { useBreakpointIndex, useResponsiveValue } from '@theme-ui/match-media';
5
5
  export { Keyframes, keyframes } from '@emotion/react';
6
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
7
7
  import * as React from 'react';
8
+ export { addIcon } from '@ttoss/theme';
8
9
  import { IconifyIconProps, IconifyIconHTMLElement } from '@iconify-icon/react';
9
10
  import { IconifyIcon } from '@iconify/types';
10
11
 
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export { useBreakpointIndex, useResponsiveValue } from '@theme-ui/match-media';
5
5
  export { Keyframes, keyframes } from '@emotion/react';
6
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
7
7
  import * as React from 'react';
8
+ export { addIcon } from '@ttoss/theme';
8
9
  import { IconifyIconProps, IconifyIconHTMLElement } from '@iconify-icon/react';
9
10
  import { IconifyIcon } from '@iconify/types';
10
11
 
package/dist/index.js CHANGED
@@ -72,6 +72,7 @@ __export(src_exports, {
72
72
  Text: () => import_theme_ui16.Text,
73
73
  Textarea: () => Textarea,
74
74
  ThemeProvider: () => ThemeProvider,
75
+ addIcon: () => import_theme.addIcon,
75
76
  keyframes: () => import_react3.keyframes,
76
77
  useBreakpointIndex: () => import_match_media.useBreakpointIndex,
77
78
  useResponsiveValue: () => import_match_media.useResponsiveValue,
@@ -106,6 +107,9 @@ var ThemeProvider = ({
106
107
  });
107
108
  };
108
109
 
110
+ // src/index.ts
111
+ var import_theme = require("@ttoss/theme");
112
+
109
113
  // src/theme/useTheme.ts
110
114
  var import_theme_ui2 = require("theme-ui");
111
115
  var useTheme = import_theme_ui2.useThemeUI;
@@ -223,13 +227,14 @@ var import_theme_ui12 = require("theme-ui");
223
227
  var import_jsx_runtime5 = require("react/jsx-runtime");
224
228
  var Input = React3.forwardRef(({
225
229
  leadingIcon,
230
+ trailingIcon: trailingIconProp,
226
231
  onLeadingIconClick,
227
232
  onTrailingIconClick,
228
233
  className,
229
234
  sx,
230
235
  ...inputProps
231
236
  }, ref) => {
232
- const trailingIcon = inputProps["aria-invalid"] ? "warning-alt" : inputProps.trailingIcon;
237
+ const trailingIcon = inputProps["aria-invalid"] ? "warning-alt" : trailingIconProp;
233
238
  return /* @__PURE__ */(0, import_jsx_runtime5.jsxs)(import_theme_ui8.Flex, {
234
239
  className,
235
240
  sx: {
@@ -834,6 +839,7 @@ var ActionButton = ({
834
839
  Text,
835
840
  Textarea,
836
841
  ThemeProvider,
842
+ addIcon,
837
843
  keyframes,
838
844
  useBreakpointIndex,
839
845
  useResponsiveValue,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/ui",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
4
4
  "description": "Primitive layout, typographic, and other components for styling applications.",
5
5
  "author": "ttoss",
6
6
  "contributors": [
@@ -23,7 +23,7 @@
23
23
  "@iconify-icon/react": "^1.0.7",
24
24
  "@theme-ui/match-media": "^0.16.0",
25
25
  "theme-ui": "^0.16.0",
26
- "@ttoss/theme": "^1.5.5"
26
+ "@ttoss/theme": "^1.5.6"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "@emotion/react": "^11",
@@ -13,6 +13,7 @@ export const Input = React.forwardRef<HTMLInputElement, InputProps>(
13
13
  (
14
14
  {
15
15
  leadingIcon,
16
+ trailingIcon: trailingIconProp,
16
17
  onLeadingIconClick,
17
18
  onTrailingIconClick,
18
19
  className,
@@ -23,7 +24,7 @@ export const Input = React.forwardRef<HTMLInputElement, InputProps>(
23
24
  ) => {
24
25
  const trailingIcon = inputProps['aria-invalid']
25
26
  ? 'warning-alt'
26
- : inputProps.trailingIcon;
27
+ : trailingIconProp;
27
28
 
28
29
  return (
29
30
  <Flex
package/src/index.ts CHANGED
@@ -3,6 +3,7 @@ export { useResponsiveValue, useBreakpointIndex } from '@theme-ui/match-media';
3
3
  export { keyframes, type Keyframes } from '@emotion/react';
4
4
 
5
5
  export { ThemeProvider, type ThemeProviderProps } from './theme/ThemeProvider';
6
+ export { addIcon } from '@ttoss/theme';
6
7
 
7
8
  export { useTheme } from './theme/useTheme';
8
9