@ttoss/ui 2.0.5 → 3.1.1

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.
@@ -1,6 +1,5 @@
1
1
  import { type BadgeProps as BadgePropsUi, Badge as BadgeUi } from 'theme-ui';
2
-
3
- import { Icon, IconType } from './Icon';
2
+ import { Icon, IconType } from '@ttoss/react-icons';
4
3
 
5
4
  export type BadgeProps = BadgePropsUi & {
6
5
  icon?: IconType;
@@ -3,7 +3,7 @@ import {
3
3
  type ButtonProps as ButtonPropsUi,
4
4
  Button as ButtonUi,
5
5
  } from 'theme-ui';
6
- import { Icon, IconType } from './Icon';
6
+ import { Icon, IconType } from '@ttoss/react-icons';
7
7
 
8
8
  export type ButtonProps = ButtonPropsUi & {
9
9
  leftIcon?: IconType;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import { Button, type ButtonProps } from 'theme-ui';
3
- import { Icon } from './Icon';
2
+ import { Button, type ButtonProps } from './Button';
3
+ import { Icon } from '@ttoss/react-icons';
4
4
 
5
5
  export type CloseButtonProps = ButtonProps & {
6
6
  label?: string;
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
- import { Flex, Icon, type IconType, Text } from '..';
2
+ import { Flex, Text } from '..';
3
+ import { Icon, type IconType } from '@ttoss/react-icons';
3
4
  import { InputProps as InputPropsUI, Input as InputUI } from 'theme-ui';
4
5
 
5
6
  export interface InputProps extends InputPropsUI {
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
- import { Flex, Icon, Text } from '..';
2
+ import { Flex, Text } from '..';
3
+ import { Icon } from '@ttoss/react-icons';
3
4
  import { Input, type InputProps as InputPropsUI } from 'theme-ui';
4
5
 
5
6
  export type InputNumberProps = Omit<
@@ -1,5 +1,6 @@
1
- import { Icon, Text } from '..';
1
+ import { Icon } from '@ttoss/react-icons';
2
2
  import { type LabelProps as LabelPropsUi, Label as LabelUi } from 'theme-ui';
3
+ import { Text } from '..';
3
4
 
4
5
  const TOOLTIP_LABEL = 'tooltip';
5
6
 
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
- import { Icon, Text } from '..';
2
+ import { Icon } from '@ttoss/react-icons';
3
3
  import { type SelectProps, Select as SelectUi } from 'theme-ui';
4
+ import { Text } from '..';
4
5
 
5
6
  export { SelectProps };
6
7
 
@@ -14,6 +15,7 @@ export const Select = React.forwardRef<HTMLSelectElement, SelectProps>(
14
15
  {arrow ?? (
15
16
  <Text
16
17
  sx={{
18
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
17
19
  marginLeft: ({ space }: any) => {
18
20
  return space?.['2xl'] ? '-2xl' : '-28px';
19
21
  },
@@ -31,6 +33,7 @@ export const Select = React.forwardRef<HTMLSelectElement, SelectProps>(
31
33
  <Text
32
34
  className="error-icon"
33
35
  sx={{
36
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
34
37
  marginLeft: ({ space }: any) => {
35
38
  return space?.['2xl']
36
39
  ? `calc(-${space['2xl']} - 10px)`
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
- import { Flex, Icon, type IconType, Text } from '..';
2
+ import { Flex, Text } from '..';
3
+ import { Icon, type IconType } from '@ttoss/react-icons';
3
4
  import {
4
5
  type TextareaProps as TextareaPropsUI,
5
6
  Textarea as TextareaUI,
package/src/index.ts CHANGED
@@ -3,7 +3,6 @@ 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';
7
6
 
8
7
  export { useTheme } from './theme/useTheme';
9
8
 
@@ -27,7 +26,6 @@ export { Text, type TextProps } from './components/Text';
27
26
  export { Select, type SelectProps } from './components/Select';
28
27
  export { Spinner, type SpinnerProps } from './components/Spinner';
29
28
  export { Radio, type RadioProps } from './components/Radio';
30
- export { Icon, type IconProps, type IconType } from './components/Icon';
31
29
  export { IconButton, type IconButtonProps } from './components/IconButton';
32
30
  export { Slider, type SliderProps } from './components/Slider';
33
31
  export { Checkbox, type CheckboxProps } from './components/Checkbox';
@@ -1,19 +0,0 @@
1
- import * as React from 'react';
2
- import {
3
- Icon as IconifyIcon,
4
- IconifyIconHTMLElement,
5
- IconifyIconProps,
6
- } from '@iconify-icon/react';
7
- import type { IconifyIcon as IconifyIconType } from '@iconify/types';
8
-
9
- export type IconType = string | IconifyIconType;
10
-
11
- export type IconProps = Omit<IconifyIconProps, 'ref'>;
12
-
13
- export const Icon = React.forwardRef<IconifyIconHTMLElement | null, IconProps>(
14
- (props, ref) => {
15
- return <IconifyIcon ref={ref} data-testid="iconify-icon" {...props} />;
16
- }
17
- );
18
-
19
- Icon.displayName = 'Icon';