@ttoss/ui 5.0.14 → 5.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/dist/esm/index.js +517 -487
- package/dist/index.d.ts +65 -63
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import * as theme_ui from 'theme-ui';
|
|
2
|
-
import { Theme, BadgeProps as BadgeProps$1, ButtonProps as ButtonProps$1, InputProps as InputProps$1, LabelProps as LabelProps$1, LinkProps as LinkProps$1, SxProp, IconButtonProps, CheckboxProps as CheckboxProps$1, TextareaProps as TextareaProps$1, TextProps, FlexProps } from 'theme-ui';
|
|
3
|
-
export { BaseStyles, Box, BoxProps, Card, CardProps, ContainerProps, Divider, DividerProps, Flex, FlexProps, Global, Grid, GridProps, Heading, HeadingProps, IconButtonProps, Image, ImageProps, Progress as LinearProgress, ProgressProps as LinearProgressProps, Paragraph, ParagraphProps, Radio, RadioProps, Slider, SliderProps, Spinner, SpinnerProps, SxProp, Text, TextProps, Theme, ThemeUIStyleObject } from 'theme-ui';
|
|
4
|
-
export { useBreakpointIndex, useResponsiveValue } from '@theme-ui/match-media';
|
|
5
|
-
export { Keyframes, keyframes } from '@emotion/react';
|
|
6
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
2
|
import * as React from 'react';
|
|
3
|
+
import * as theme_ui from 'theme-ui';
|
|
4
|
+
import { ButtonProps as ButtonProps$1, BadgeProps as BadgeProps$1, CheckboxProps as CheckboxProps$1, TextProps, IconButtonProps, InputProps as InputProps$1, LabelProps as LabelProps$1, LinkProps as LinkProps$1, SxProp, FlexProps, SwitchProps, TextareaProps as TextareaProps$1, Theme } from 'theme-ui';
|
|
5
|
+
export { BaseStyles, Box, BoxProps, Card, CardProps, ContainerProps, Divider, DividerProps, Flex, FlexProps, Global, Grid, GridProps, Heading, HeadingProps, IconButtonProps, Image, ImageProps, Progress as LinearProgress, ProgressProps as LinearProgressProps, Paragraph, ParagraphProps, Radio, RadioProps, Slider, SliderProps, Spinner, SpinnerProps, SwitchProps, SxProp, Text, TextProps, Theme, ThemeUIStyleObject } from 'theme-ui';
|
|
8
6
|
import { IconType } from '@ttoss/react-icons';
|
|
9
7
|
import { Props } from 'react-select';
|
|
8
|
+
export { Keyframes, keyframes } from '@emotion/react';
|
|
9
|
+
export { useBreakpointIndex, useResponsiveValue } from '@theme-ui/match-media';
|
|
10
10
|
|
|
11
|
-
type
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* Fonts URLs.
|
|
16
|
-
*/
|
|
17
|
-
fonts?: string[];
|
|
11
|
+
type ButtonProps = ButtonProps$1 & {
|
|
12
|
+
leftIcon?: IconType;
|
|
13
|
+
rightIcon?: IconType;
|
|
14
|
+
loading?: boolean;
|
|
18
15
|
};
|
|
19
|
-
declare const
|
|
16
|
+
declare const Button: React.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
20
17
|
|
|
21
|
-
|
|
18
|
+
type ActionButtonProps = Omit<ButtonProps, 'rightIcon' | 'leftIcon' | 'variant'> & {
|
|
19
|
+
icon: ButtonProps['leftIcon'];
|
|
20
|
+
variant?: 'default' | 'accent' | 'quiet';
|
|
21
|
+
};
|
|
22
|
+
declare const ActionButton: ({ icon, variant, sx, ...props }: ActionButtonProps) => react_jsx_runtime.JSX.Element;
|
|
22
23
|
|
|
23
24
|
type BadgeProps = BadgeProps$1 & {
|
|
24
25
|
icon?: IconType;
|
|
@@ -27,12 +28,28 @@ type BadgeProps = BadgeProps$1 & {
|
|
|
27
28
|
};
|
|
28
29
|
declare const Badge: ({ icon, children, sx, chip, onDelete, ...props }: BadgeProps) => react_jsx_runtime.JSX.Element;
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
interface CheckboxProps extends CheckboxProps$1 {
|
|
32
|
+
indeterminate?: boolean;
|
|
33
|
+
}
|
|
34
|
+
declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
35
|
+
|
|
36
|
+
type CloseButtonProps = ButtonProps & {
|
|
37
|
+
label?: string;
|
|
38
|
+
onlyText?: boolean;
|
|
34
39
|
};
|
|
35
|
-
declare const
|
|
40
|
+
declare const CloseButton: React.ForwardRefExoticComponent<Omit<CloseButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
41
|
+
|
|
42
|
+
declare const Container: React.ForwardRefExoticComponent<theme_ui.BoxProps & React.RefAttributes<HTMLDivElement>>;
|
|
43
|
+
|
|
44
|
+
type HelpTextProps = Omit<TextProps, 'variant'> & {
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
negative?: boolean;
|
|
47
|
+
};
|
|
48
|
+
declare const HelpText: ({ sx, disabled, negative, ...props }: HelpTextProps) => react_jsx_runtime.JSX.Element;
|
|
49
|
+
|
|
50
|
+
declare const IconButton: React.ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
51
|
+
|
|
52
|
+
declare const InfiniteLinearProgress: () => react_jsx_runtime.JSX.Element;
|
|
36
53
|
|
|
37
54
|
interface InputProps extends InputProps$1 {
|
|
38
55
|
leadingIcon?: IconType;
|
|
@@ -42,6 +59,19 @@ interface InputProps extends InputProps$1 {
|
|
|
42
59
|
}
|
|
43
60
|
declare const Input: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
44
61
|
|
|
62
|
+
type InputNumberProps = Omit<InputProps$1, 'type' | 'variant' | 'onChange'> & {
|
|
63
|
+
onChange: (value: number) => void;
|
|
64
|
+
value?: number;
|
|
65
|
+
infoIcon?: boolean;
|
|
66
|
+
onClickInfoIcon?: () => void;
|
|
67
|
+
};
|
|
68
|
+
declare const InputNumber: React.ForwardRefExoticComponent<Omit<InputNumberProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
69
|
+
|
|
70
|
+
type InputPasswordProps = Omit<InputProps, 'trailingIcon' | 'onTrailingIconClick' | 'type'> & {
|
|
71
|
+
showPasswordByDefault?: boolean;
|
|
72
|
+
};
|
|
73
|
+
declare const InputPassword: React.ForwardRefExoticComponent<Omit<InputPasswordProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
74
|
+
|
|
45
75
|
type LabelProps = LabelProps$1 & {
|
|
46
76
|
tooltip?: boolean;
|
|
47
77
|
onTooltipClick?: () => void;
|
|
@@ -87,57 +117,29 @@ declare const Select: React.ForwardRefExoticComponent<Omit<Props<SelectOption, f
|
|
|
87
117
|
trailingIcon?: IconType;
|
|
88
118
|
} & React.RefAttributes<any>>;
|
|
89
119
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
120
|
+
type StackProps = FlexProps;
|
|
121
|
+
/**
|
|
122
|
+
* A component that renders its children in a column.
|
|
123
|
+
*/
|
|
124
|
+
declare const Stack: React.ForwardRefExoticComponent<theme_ui.BoxProps & React.RefAttributes<HTMLElement>>;
|
|
96
125
|
|
|
97
|
-
declare const
|
|
126
|
+
declare const Switch: (props: SwitchProps) => react_jsx_runtime.JSX.Element;
|
|
98
127
|
|
|
99
128
|
interface TextareaProps extends TextareaProps$1 {
|
|
100
129
|
trailingIcon?: IconType;
|
|
101
130
|
}
|
|
102
131
|
declare const Textarea: React.ForwardRefExoticComponent<Omit<TextareaProps, "ref"> & React.RefAttributes<HTMLTextAreaElement>>;
|
|
103
132
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
type CloseButtonProps = ButtonProps & {
|
|
113
|
-
label?: string;
|
|
114
|
-
onlyText?: boolean;
|
|
115
|
-
};
|
|
116
|
-
declare const CloseButton: React.ForwardRefExoticComponent<Omit<CloseButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
117
|
-
|
|
118
|
-
type InputNumberProps = Omit<InputProps$1, 'type' | 'variant' | 'onChange'> & {
|
|
119
|
-
onChange: (value: number) => void;
|
|
120
|
-
value?: number;
|
|
121
|
-
infoIcon?: boolean;
|
|
122
|
-
onClickInfoIcon?: () => void;
|
|
123
|
-
};
|
|
124
|
-
declare const InputNumber: React.ForwardRefExoticComponent<Omit<InputNumberProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
125
|
-
|
|
126
|
-
type StackProps = FlexProps;
|
|
127
|
-
/**
|
|
128
|
-
* A component that renders its children in a column.
|
|
129
|
-
*/
|
|
130
|
-
declare const Stack: React.ForwardRefExoticComponent<theme_ui.BoxProps & React.RefAttributes<HTMLElement>>;
|
|
131
|
-
|
|
132
|
-
type InputPasswordProps = Omit<InputProps, 'trailingIcon' | 'onTrailingIconClick' | 'type'> & {
|
|
133
|
-
showPasswordByDefault?: boolean;
|
|
133
|
+
type ThemeProviderProps = {
|
|
134
|
+
children?: React.ReactNode;
|
|
135
|
+
theme?: Theme;
|
|
136
|
+
/**
|
|
137
|
+
* Fonts URLs.
|
|
138
|
+
*/
|
|
139
|
+
fonts?: string[];
|
|
134
140
|
};
|
|
135
|
-
declare const
|
|
141
|
+
declare const ThemeProvider: ({ children, theme, fonts, }: ThemeProviderProps) => react_jsx_runtime.JSX.Element;
|
|
136
142
|
|
|
137
|
-
|
|
138
|
-
icon: ButtonProps['leftIcon'];
|
|
139
|
-
variant?: 'default' | 'accent' | 'quiet';
|
|
140
|
-
};
|
|
141
|
-
declare const ActionButton: ({ icon, variant, sx, ...props }: ActionButtonProps) => react_jsx_runtime.JSX.Element;
|
|
143
|
+
declare const useTheme: () => theme_ui.ThemeUIContextValue;
|
|
142
144
|
|
|
143
|
-
export { ActionButton, type ActionButtonProps, Badge, type BadgeProps, Button, type ButtonProps, Checkbox, type CheckboxProps, CloseButton, type CloseButtonProps, Container, HelpText, type HelpTextProps, IconButton, InfiniteLinearProgress, Input, InputNumber, type InputNumberProps, InputPassword, type InputPasswordProps, type InputProps, Label, type LabelProps, Link, type LinkProps, Select, type SelectOption, type SelectOptions, type SelectProps, Stack, type StackProps, Textarea, type TextareaProps, ThemeProvider, type ThemeProviderProps, useTheme };
|
|
145
|
+
export { ActionButton, type ActionButtonProps, Badge, type BadgeProps, Button, type ButtonProps, Checkbox, type CheckboxProps, CloseButton, type CloseButtonProps, Container, HelpText, type HelpTextProps, IconButton, InfiniteLinearProgress, Input, InputNumber, type InputNumberProps, InputPassword, type InputPasswordProps, type InputProps, Label, type LabelProps, Link, type LinkProps, Select, type SelectOption, type SelectOptions, type SelectProps, Stack, type StackProps, Switch, Textarea, type TextareaProps, ThemeProvider, type ThemeProviderProps, useTheme };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/ui",
|
|
3
|
-
"version": "5.0
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "Primitive layout, typographic, and other components for styling applications.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ttoss",
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"@theme-ui/match-media": "^0.17.1",
|
|
28
28
|
"react-select": "^5.9.0",
|
|
29
29
|
"theme-ui": "^0.17.1",
|
|
30
|
-
"@ttoss/theme": "^1.8.
|
|
30
|
+
"@ttoss/theme": "^1.8.6"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@emotion/react": "^11",
|
|
34
34
|
"react": ">=16.8.0",
|
|
35
|
-
"@ttoss/react-icons": "^0.4.
|
|
35
|
+
"@ttoss/react-icons": "^0.4.9"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@emotion/react": "^11.14.0",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"jest": "^29.7.0",
|
|
43
43
|
"react": "^19.0.0",
|
|
44
44
|
"tsup": "^8.3.5",
|
|
45
|
-
"@ttoss/react-icons": "^0.4.8",
|
|
46
45
|
"@ttoss/config": "^1.35.2",
|
|
47
|
-
"@ttoss/
|
|
46
|
+
"@ttoss/react-icons": "^0.4.9",
|
|
47
|
+
"@ttoss/test-utils": "^2.1.22"
|
|
48
48
|
},
|
|
49
49
|
"keywords": [
|
|
50
50
|
"React",
|