@ttoss/ui 1.36.9 → 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 +40 -5
- package/dist/index.d.ts +7 -1
- package/dist/index.js +41 -4
- package/package.json +2 -2
- package/src/components/ActionButton.tsx +41 -0
- package/src/components/Badge.tsx +2 -1
- package/src/components/HelpText.tsx +2 -1
- package/src/components/Label.tsx +1 -0
- package/src/components/Select.tsx +2 -0
- package/src/index.ts +4 -0
package/dist/esm/index.js
CHANGED
|
@@ -64,8 +64,9 @@ var Badge = ({
|
|
|
64
64
|
fontFamily: "caption",
|
|
65
65
|
fontWeight: "normal",
|
|
66
66
|
lineHeight: "base",
|
|
67
|
-
fontSize: "
|
|
67
|
+
fontSize: "sm",
|
|
68
68
|
paddingX: "xs",
|
|
69
|
+
borderRadius: "informative",
|
|
69
70
|
paddingY: "2xs",
|
|
70
71
|
gap: "xs",
|
|
71
72
|
...sx
|
|
@@ -220,6 +221,7 @@ var Label = ({
|
|
|
220
221
|
fontFamily: "caption",
|
|
221
222
|
alignItems: "center",
|
|
222
223
|
fontSize: "sm",
|
|
224
|
+
lineHeight: "base",
|
|
223
225
|
...sx
|
|
224
226
|
},
|
|
225
227
|
...props,
|
|
@@ -281,7 +283,8 @@ var Select = /*#__PURE__*/React5.forwardRef(({
|
|
|
281
283
|
},
|
|
282
284
|
alignSelf: "center",
|
|
283
285
|
pointerEvents: "none",
|
|
284
|
-
lineHeight: 0
|
|
286
|
+
lineHeight: 0,
|
|
287
|
+
fontSize: "base"
|
|
285
288
|
},
|
|
286
289
|
children: /* @__PURE__ */jsx8(Icon, {
|
|
287
290
|
icon: "picker-down"
|
|
@@ -296,7 +299,8 @@ var Select = /*#__PURE__*/React5.forwardRef(({
|
|
|
296
299
|
},
|
|
297
300
|
alignSelf: "center",
|
|
298
301
|
pointerEvents: "none",
|
|
299
|
-
lineHeight: 0
|
|
302
|
+
lineHeight: 0,
|
|
303
|
+
fontSize: "base"
|
|
300
304
|
},
|
|
301
305
|
children: /* @__PURE__ */jsx8(Icon, {
|
|
302
306
|
icon: "error"
|
|
@@ -435,8 +439,9 @@ var HelpText = ({
|
|
|
435
439
|
return /* @__PURE__ */jsx12(Text, {
|
|
436
440
|
variant,
|
|
437
441
|
sx: {
|
|
438
|
-
fontSize: "
|
|
442
|
+
fontSize: "sm",
|
|
439
443
|
fontFamily: "caption",
|
|
444
|
+
lineHeight: "base",
|
|
440
445
|
...sx
|
|
441
446
|
},
|
|
442
447
|
"aria-disabled": disabled ? "true" : void 0,
|
|
@@ -677,4 +682,34 @@ var InputPassword = /*#__PURE__*/React13.forwardRef(({
|
|
|
677
682
|
});
|
|
678
683
|
});
|
|
679
684
|
InputPassword.displayName = "InputPassword";
|
|
680
|
-
|
|
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,
|
|
@@ -140,8 +141,9 @@ var Badge = ({
|
|
|
140
141
|
fontFamily: "caption",
|
|
141
142
|
fontWeight: "normal",
|
|
142
143
|
lineHeight: "base",
|
|
143
|
-
fontSize: "
|
|
144
|
+
fontSize: "sm",
|
|
144
145
|
paddingX: "xs",
|
|
146
|
+
borderRadius: "informative",
|
|
145
147
|
paddingY: "2xs",
|
|
146
148
|
gap: "xs",
|
|
147
149
|
...sx
|
|
@@ -296,6 +298,7 @@ var Label = ({
|
|
|
296
298
|
fontFamily: "caption",
|
|
297
299
|
alignItems: "center",
|
|
298
300
|
fontSize: "sm",
|
|
301
|
+
lineHeight: "base",
|
|
299
302
|
...sx
|
|
300
303
|
},
|
|
301
304
|
...props,
|
|
@@ -357,7 +360,8 @@ var Select = React5.forwardRef(({
|
|
|
357
360
|
},
|
|
358
361
|
alignSelf: "center",
|
|
359
362
|
pointerEvents: "none",
|
|
360
|
-
lineHeight: 0
|
|
363
|
+
lineHeight: 0,
|
|
364
|
+
fontSize: "base"
|
|
361
365
|
},
|
|
362
366
|
children: /* @__PURE__ */(0, import_jsx_runtime8.jsx)(Icon, {
|
|
363
367
|
icon: "picker-down"
|
|
@@ -372,7 +376,8 @@ var Select = React5.forwardRef(({
|
|
|
372
376
|
},
|
|
373
377
|
alignSelf: "center",
|
|
374
378
|
pointerEvents: "none",
|
|
375
|
-
lineHeight: 0
|
|
379
|
+
lineHeight: 0,
|
|
380
|
+
fontSize: "base"
|
|
376
381
|
},
|
|
377
382
|
children: /* @__PURE__ */(0, import_jsx_runtime8.jsx)(Icon, {
|
|
378
383
|
icon: "error"
|
|
@@ -511,8 +516,9 @@ var HelpText = ({
|
|
|
511
516
|
return /* @__PURE__ */(0, import_jsx_runtime12.jsx)(import_theme_ui16.Text, {
|
|
512
517
|
variant,
|
|
513
518
|
sx: {
|
|
514
|
-
fontSize: "
|
|
519
|
+
fontSize: "sm",
|
|
515
520
|
fontFamily: "caption",
|
|
521
|
+
lineHeight: "base",
|
|
516
522
|
...sx
|
|
517
523
|
},
|
|
518
524
|
"aria-disabled": disabled ? "true" : void 0,
|
|
@@ -753,8 +759,39 @@ var InputPassword = React13.forwardRef(({
|
|
|
753
759
|
});
|
|
754
760
|
});
|
|
755
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
|
+
};
|
|
756
792
|
// Annotate the CommonJS export names for ESM import in node:
|
|
757
793
|
0 && (module.exports = {
|
|
794
|
+
ActionButton,
|
|
758
795
|
Badge,
|
|
759
796
|
BaseStyles,
|
|
760
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
|
+
};
|
package/src/components/Badge.tsx
CHANGED
|
@@ -15,8 +15,9 @@ export const Badge = ({ icon, children, sx, ...props }: BadgeProps) => {
|
|
|
15
15
|
fontFamily: 'caption',
|
|
16
16
|
fontWeight: 'normal',
|
|
17
17
|
lineHeight: 'base',
|
|
18
|
-
fontSize: '
|
|
18
|
+
fontSize: 'sm',
|
|
19
19
|
paddingX: 'xs',
|
|
20
|
+
borderRadius: 'informative',
|
|
20
21
|
paddingY: '2xs',
|
|
21
22
|
gap: 'xs',
|
|
22
23
|
...sx,
|
package/src/components/Label.tsx
CHANGED
|
@@ -20,6 +20,7 @@ export const Select = React.forwardRef<HTMLSelectElement, SelectProps>(
|
|
|
20
20
|
alignSelf: 'center',
|
|
21
21
|
pointerEvents: 'none',
|
|
22
22
|
lineHeight: 0,
|
|
23
|
+
fontSize: 'base',
|
|
23
24
|
}}
|
|
24
25
|
>
|
|
25
26
|
<Icon icon="picker-down" />
|
|
@@ -38,6 +39,7 @@ export const Select = React.forwardRef<HTMLSelectElement, SelectProps>(
|
|
|
38
39
|
alignSelf: 'center',
|
|
39
40
|
pointerEvents: 'none',
|
|
40
41
|
lineHeight: 0,
|
|
42
|
+
fontSize: 'base',
|
|
41
43
|
}}
|
|
42
44
|
>
|
|
43
45
|
<Icon icon="error" />
|