@ttoss/ui 1.36.10 → 1.36.11
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 +31 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +32 -0
- package/package.json +2 -2
- package/src/components/ActionButton.tsx +41 -0
- package/src/index.ts +4 -0
package/dist/esm/index.js
CHANGED
|
@@ -682,4 +682,34 @@ var InputPassword = /*#__PURE__*/React13.forwardRef(({
|
|
|
682
682
|
});
|
|
683
683
|
});
|
|
684
684
|
InputPassword.displayName = "InputPassword";
|
|
685
|
-
|
|
685
|
+
|
|
686
|
+
// src/components/ActionButton.tsx
|
|
687
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
688
|
+
var ActionButton = ({
|
|
689
|
+
icon,
|
|
690
|
+
variant = "default",
|
|
691
|
+
sx,
|
|
692
|
+
...props
|
|
693
|
+
}) => {
|
|
694
|
+
return /* @__PURE__ */jsx17(Button, {
|
|
695
|
+
variant: `buttons.actionButton.${variant}`,
|
|
696
|
+
leftIcon: icon,
|
|
697
|
+
sx: {
|
|
698
|
+
padding: "sm",
|
|
699
|
+
gap: "xs",
|
|
700
|
+
fontFamily: "caption",
|
|
701
|
+
borderRadius: "action",
|
|
702
|
+
outlineColor: "transparent",
|
|
703
|
+
":disabled": props.disabled ? {
|
|
704
|
+
backgroundColor: "muted",
|
|
705
|
+
color: "onMuted",
|
|
706
|
+
cursor: "not-allowed",
|
|
707
|
+
border: "muted",
|
|
708
|
+
borderColor: "onMuted"
|
|
709
|
+
} : void 0,
|
|
710
|
+
...sx
|
|
711
|
+
},
|
|
712
|
+
...props
|
|
713
|
+
});
|
|
714
|
+
};
|
|
715
|
+
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -97,4 +97,10 @@ type InputPasswordProps = Omit<InputProps, 'trailingIcon' | 'onTrailingIconClick
|
|
|
97
97
|
};
|
|
98
98
|
declare const InputPassword: React.ForwardRefExoticComponent<Omit<InputPasswordProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
type ActionButtonProps = Omit<ButtonProps, 'rightIcon' | 'leftIcon' | 'variant'> & {
|
|
101
|
+
icon: ButtonProps['leftIcon'];
|
|
102
|
+
variant?: 'default' | 'accent' | 'quiet';
|
|
103
|
+
};
|
|
104
|
+
declare const ActionButton: ({ icon, variant, sx, ...props }: ActionButtonProps) => react_jsx_runtime.JSX.Element;
|
|
105
|
+
|
|
106
|
+
export { ActionButton, ActionButtonProps, Badge, BadgeProps, Button, ButtonProps, CloseButton, CloseButtonProps, HelpText, HelpTextProps, Icon, IconButton, IconProps, IconType, InfiniteLinearProgress, Input, InputNumber, InputNumberProps, InputPassword, InputPasswordProps, InputProps, Label, LabelProps, Link, LinkProps, Select, Stack, StackProps, Textarea, TextareaProps, ThemeProvider, ThemeProviderProps, useTheme };
|
package/dist/index.js
CHANGED
|
@@ -38,6 +38,7 @@ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
|
38
38
|
// src/index.ts
|
|
39
39
|
var src_exports = {};
|
|
40
40
|
__export(src_exports, {
|
|
41
|
+
ActionButton: () => ActionButton,
|
|
41
42
|
Badge: () => Badge,
|
|
42
43
|
BaseStyles: () => import_theme_ui28.BaseStyles,
|
|
43
44
|
Box: () => import_theme_ui4.Box,
|
|
@@ -758,8 +759,39 @@ var InputPassword = React13.forwardRef(({
|
|
|
758
759
|
});
|
|
759
760
|
});
|
|
760
761
|
InputPassword.displayName = "InputPassword";
|
|
762
|
+
|
|
763
|
+
// src/components/ActionButton.tsx
|
|
764
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
765
|
+
var ActionButton = ({
|
|
766
|
+
icon,
|
|
767
|
+
variant = "default",
|
|
768
|
+
sx,
|
|
769
|
+
...props
|
|
770
|
+
}) => {
|
|
771
|
+
return /* @__PURE__ */(0, import_jsx_runtime17.jsx)(Button, {
|
|
772
|
+
variant: `buttons.actionButton.${variant}`,
|
|
773
|
+
leftIcon: icon,
|
|
774
|
+
sx: {
|
|
775
|
+
padding: "sm",
|
|
776
|
+
gap: "xs",
|
|
777
|
+
fontFamily: "caption",
|
|
778
|
+
borderRadius: "action",
|
|
779
|
+
outlineColor: "transparent",
|
|
780
|
+
":disabled": props.disabled ? {
|
|
781
|
+
backgroundColor: "muted",
|
|
782
|
+
color: "onMuted",
|
|
783
|
+
cursor: "not-allowed",
|
|
784
|
+
border: "muted",
|
|
785
|
+
borderColor: "onMuted"
|
|
786
|
+
} : void 0,
|
|
787
|
+
...sx
|
|
788
|
+
},
|
|
789
|
+
...props
|
|
790
|
+
});
|
|
791
|
+
};
|
|
761
792
|
// Annotate the CommonJS export names for ESM import in node:
|
|
762
793
|
0 && (module.exports = {
|
|
794
|
+
ActionButton,
|
|
763
795
|
Badge,
|
|
764
796
|
BaseStyles,
|
|
765
797
|
Box,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/ui",
|
|
3
|
-
"version": "1.36.
|
|
3
|
+
"version": "1.36.11",
|
|
4
4
|
"description": "Primitive layout, typographic, and other components for styling applications.",
|
|
5
5
|
"author": "ttoss",
|
|
6
6
|
"contributors": [
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@iconify-icon/react": "^1.0.7",
|
|
20
20
|
"@theme-ui/match-media": "^0.15.7",
|
|
21
21
|
"theme-ui": "^0.15.7",
|
|
22
|
-
"@ttoss/theme": "^1.4.
|
|
22
|
+
"@ttoss/theme": "^1.4.38"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"react": ">=16.8.0"
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Button, type ButtonProps } from './Button';
|
|
2
|
+
|
|
3
|
+
export type ActionButtonProps = Omit<
|
|
4
|
+
ButtonProps,
|
|
5
|
+
'rightIcon' | 'leftIcon' | 'variant'
|
|
6
|
+
> & {
|
|
7
|
+
icon: ButtonProps['leftIcon'];
|
|
8
|
+
variant?: 'default' | 'accent' | 'quiet';
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const ActionButton = ({
|
|
12
|
+
icon,
|
|
13
|
+
variant = 'default',
|
|
14
|
+
sx,
|
|
15
|
+
...props
|
|
16
|
+
}: ActionButtonProps) => {
|
|
17
|
+
return (
|
|
18
|
+
<Button
|
|
19
|
+
variant={`buttons.actionButton.${variant}`}
|
|
20
|
+
leftIcon={icon}
|
|
21
|
+
sx={{
|
|
22
|
+
padding: 'sm',
|
|
23
|
+
gap: 'xs',
|
|
24
|
+
fontFamily: 'caption',
|
|
25
|
+
borderRadius: 'action',
|
|
26
|
+
outlineColor: 'transparent',
|
|
27
|
+
':disabled': props.disabled
|
|
28
|
+
? {
|
|
29
|
+
backgroundColor: 'muted',
|
|
30
|
+
color: 'onMuted',
|
|
31
|
+
cursor: 'not-allowed',
|
|
32
|
+
border: 'muted',
|
|
33
|
+
borderColor: 'onMuted',
|
|
34
|
+
}
|
|
35
|
+
: undefined,
|
|
36
|
+
...sx,
|
|
37
|
+
}}
|
|
38
|
+
{...props}
|
|
39
|
+
/>
|
|
40
|
+
);
|
|
41
|
+
};
|