@ttoss/ui 2.0.5 → 3.1.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/README.md +1 -20
- package/dist/esm/index.js +92 -101
- package/dist/index.d.mts +3 -9
- package/dist/index.d.ts +3 -9
- package/dist/index.js +105 -118
- package/package.json +5 -5
- package/src/components/Badge.tsx +1 -2
- package/src/components/Button.tsx +1 -1
- package/src/components/CloseButton.tsx +2 -2
- package/src/components/Input.tsx +2 -1
- package/src/components/InputNumber.tsx +2 -1
- package/src/components/Label.tsx +2 -1
- package/src/components/Select.tsx +4 -1
- package/src/components/Textarea.tsx +2 -1
- package/src/index.ts +0 -2
- package/src/components/Icon.tsx +0 -19
package/src/components/Badge.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Button, type ButtonProps } from '
|
|
3
|
-
import { Icon } from '
|
|
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;
|
package/src/components/Input.tsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Flex,
|
|
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 {
|
package/src/components/Label.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Icon
|
|
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)`
|
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';
|
package/src/components/Icon.tsx
DELETED
|
@@ -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';
|