@ttoss/ui 1.36.8 → 1.36.10
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 +19 -5
- package/dist/index.d.ts +1 -0
- package/dist/index.js +19 -5
- package/package.json +2 -2
- package/src/components/Badge.tsx +2 -1
- package/src/components/Button.tsx +4 -2
- package/src/components/CloseButton.tsx +5 -0
- package/src/components/HelpText.tsx +2 -1
- package/src/components/Label.tsx +1 -0
- package/src/components/Select.tsx +2 -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
|
|
@@ -90,6 +91,7 @@ var Button = /*#__PURE__*/React2.forwardRef((props, ref) => {
|
|
|
90
91
|
children,
|
|
91
92
|
leftIcon,
|
|
92
93
|
rightIcon,
|
|
94
|
+
loading,
|
|
93
95
|
...restProps
|
|
94
96
|
} = props;
|
|
95
97
|
return /* @__PURE__ */jsxs3(ButtonUi, {
|
|
@@ -106,7 +108,10 @@ var Button = /*#__PURE__*/React2.forwardRef((props, ref) => {
|
|
|
106
108
|
gap: "lg",
|
|
107
109
|
...restProps.sx
|
|
108
110
|
},
|
|
109
|
-
children: [
|
|
111
|
+
children: [loading && /* @__PURE__ */jsx4(Icon, {
|
|
112
|
+
inline: true,
|
|
113
|
+
icon: "three-dots-loading"
|
|
114
|
+
}), !loading && leftIcon && /* @__PURE__ */jsx4(Icon, {
|
|
110
115
|
inline: true,
|
|
111
116
|
icon: leftIcon
|
|
112
117
|
}), children, rightIcon && /* @__PURE__ */jsx4(Icon, {
|
|
@@ -216,6 +221,7 @@ var Label = ({
|
|
|
216
221
|
fontFamily: "caption",
|
|
217
222
|
alignItems: "center",
|
|
218
223
|
fontSize: "sm",
|
|
224
|
+
lineHeight: "base",
|
|
219
225
|
...sx
|
|
220
226
|
},
|
|
221
227
|
...props,
|
|
@@ -277,7 +283,8 @@ var Select = /*#__PURE__*/React5.forwardRef(({
|
|
|
277
283
|
},
|
|
278
284
|
alignSelf: "center",
|
|
279
285
|
pointerEvents: "none",
|
|
280
|
-
lineHeight: 0
|
|
286
|
+
lineHeight: 0,
|
|
287
|
+
fontSize: "base"
|
|
281
288
|
},
|
|
282
289
|
children: /* @__PURE__ */jsx8(Icon, {
|
|
283
290
|
icon: "picker-down"
|
|
@@ -292,7 +299,8 @@ var Select = /*#__PURE__*/React5.forwardRef(({
|
|
|
292
299
|
},
|
|
293
300
|
alignSelf: "center",
|
|
294
301
|
pointerEvents: "none",
|
|
295
|
-
lineHeight: 0
|
|
302
|
+
lineHeight: 0,
|
|
303
|
+
fontSize: "base"
|
|
296
304
|
},
|
|
297
305
|
children: /* @__PURE__ */jsx8(Icon, {
|
|
298
306
|
icon: "error"
|
|
@@ -431,8 +439,9 @@ var HelpText = ({
|
|
|
431
439
|
return /* @__PURE__ */jsx12(Text, {
|
|
432
440
|
variant,
|
|
433
441
|
sx: {
|
|
434
|
-
fontSize: "
|
|
442
|
+
fontSize: "sm",
|
|
435
443
|
fontFamily: "caption",
|
|
444
|
+
lineHeight: "base",
|
|
436
445
|
...sx
|
|
437
446
|
},
|
|
438
447
|
"aria-disabled": disabled ? "true" : void 0,
|
|
@@ -463,9 +472,14 @@ var CloseButton = /*#__PURE__*/React9.forwardRef(({
|
|
|
463
472
|
display: "inline-flex",
|
|
464
473
|
alignItems: "center",
|
|
465
474
|
cursor: "pointer",
|
|
475
|
+
lineHeight: "normal",
|
|
466
476
|
gap: "sm",
|
|
467
477
|
padding: "sm",
|
|
468
478
|
width: "fit-content",
|
|
479
|
+
transition: "all 0.2s",
|
|
480
|
+
"& > iconify-icon": {
|
|
481
|
+
fontSize: "base"
|
|
482
|
+
},
|
|
469
483
|
...sx
|
|
470
484
|
},
|
|
471
485
|
...props,
|
package/dist/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ declare const Badge: ({ icon, children, sx, ...props }: BadgeProps) => react_jsx
|
|
|
32
32
|
type ButtonProps = ButtonProps$1 & {
|
|
33
33
|
leftIcon?: IconType;
|
|
34
34
|
rightIcon?: IconType;
|
|
35
|
+
loading?: boolean;
|
|
35
36
|
};
|
|
36
37
|
declare const Button: React.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
37
38
|
|
package/dist/index.js
CHANGED
|
@@ -140,8 +140,9 @@ var Badge = ({
|
|
|
140
140
|
fontFamily: "caption",
|
|
141
141
|
fontWeight: "normal",
|
|
142
142
|
lineHeight: "base",
|
|
143
|
-
fontSize: "
|
|
143
|
+
fontSize: "sm",
|
|
144
144
|
paddingX: "xs",
|
|
145
|
+
borderRadius: "informative",
|
|
145
146
|
paddingY: "2xs",
|
|
146
147
|
gap: "xs",
|
|
147
148
|
...sx
|
|
@@ -166,6 +167,7 @@ var Button = React2.forwardRef((props, ref) => {
|
|
|
166
167
|
children,
|
|
167
168
|
leftIcon,
|
|
168
169
|
rightIcon,
|
|
170
|
+
loading,
|
|
169
171
|
...restProps
|
|
170
172
|
} = props;
|
|
171
173
|
return /* @__PURE__ */(0, import_jsx_runtime4.jsxs)(import_theme_ui5.Button, {
|
|
@@ -182,7 +184,10 @@ var Button = React2.forwardRef((props, ref) => {
|
|
|
182
184
|
gap: "lg",
|
|
183
185
|
...restProps.sx
|
|
184
186
|
},
|
|
185
|
-
children: [
|
|
187
|
+
children: [loading && /* @__PURE__ */(0, import_jsx_runtime4.jsx)(Icon, {
|
|
188
|
+
inline: true,
|
|
189
|
+
icon: "three-dots-loading"
|
|
190
|
+
}), !loading && leftIcon && /* @__PURE__ */(0, import_jsx_runtime4.jsx)(Icon, {
|
|
186
191
|
inline: true,
|
|
187
192
|
icon: leftIcon
|
|
188
193
|
}), children, rightIcon && /* @__PURE__ */(0, import_jsx_runtime4.jsx)(Icon, {
|
|
@@ -292,6 +297,7 @@ var Label = ({
|
|
|
292
297
|
fontFamily: "caption",
|
|
293
298
|
alignItems: "center",
|
|
294
299
|
fontSize: "sm",
|
|
300
|
+
lineHeight: "base",
|
|
295
301
|
...sx
|
|
296
302
|
},
|
|
297
303
|
...props,
|
|
@@ -353,7 +359,8 @@ var Select = React5.forwardRef(({
|
|
|
353
359
|
},
|
|
354
360
|
alignSelf: "center",
|
|
355
361
|
pointerEvents: "none",
|
|
356
|
-
lineHeight: 0
|
|
362
|
+
lineHeight: 0,
|
|
363
|
+
fontSize: "base"
|
|
357
364
|
},
|
|
358
365
|
children: /* @__PURE__ */(0, import_jsx_runtime8.jsx)(Icon, {
|
|
359
366
|
icon: "picker-down"
|
|
@@ -368,7 +375,8 @@ var Select = React5.forwardRef(({
|
|
|
368
375
|
},
|
|
369
376
|
alignSelf: "center",
|
|
370
377
|
pointerEvents: "none",
|
|
371
|
-
lineHeight: 0
|
|
378
|
+
lineHeight: 0,
|
|
379
|
+
fontSize: "base"
|
|
372
380
|
},
|
|
373
381
|
children: /* @__PURE__ */(0, import_jsx_runtime8.jsx)(Icon, {
|
|
374
382
|
icon: "error"
|
|
@@ -507,8 +515,9 @@ var HelpText = ({
|
|
|
507
515
|
return /* @__PURE__ */(0, import_jsx_runtime12.jsx)(import_theme_ui16.Text, {
|
|
508
516
|
variant,
|
|
509
517
|
sx: {
|
|
510
|
-
fontSize: "
|
|
518
|
+
fontSize: "sm",
|
|
511
519
|
fontFamily: "caption",
|
|
520
|
+
lineHeight: "base",
|
|
512
521
|
...sx
|
|
513
522
|
},
|
|
514
523
|
"aria-disabled": disabled ? "true" : void 0,
|
|
@@ -539,9 +548,14 @@ var CloseButton = React9.forwardRef(({
|
|
|
539
548
|
display: "inline-flex",
|
|
540
549
|
alignItems: "center",
|
|
541
550
|
cursor: "pointer",
|
|
551
|
+
lineHeight: "normal",
|
|
542
552
|
gap: "sm",
|
|
543
553
|
padding: "sm",
|
|
544
554
|
width: "fit-content",
|
|
555
|
+
transition: "all 0.2s",
|
|
556
|
+
"& > iconify-icon": {
|
|
557
|
+
fontSize: "base"
|
|
558
|
+
},
|
|
545
559
|
...sx
|
|
546
560
|
},
|
|
547
561
|
...props,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/ui",
|
|
3
|
-
"version": "1.36.
|
|
3
|
+
"version": "1.36.10",
|
|
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.37"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"react": ">=16.8.0"
|
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,
|
|
@@ -8,11 +8,12 @@ import { Icon, IconType } from './Icon';
|
|
|
8
8
|
export type ButtonProps = ButtonPropsUi & {
|
|
9
9
|
leftIcon?: IconType;
|
|
10
10
|
rightIcon?: IconType;
|
|
11
|
+
loading?: boolean;
|
|
11
12
|
};
|
|
12
13
|
|
|
13
14
|
export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
14
15
|
(props, ref) => {
|
|
15
|
-
const { children, leftIcon, rightIcon, ...restProps } = props;
|
|
16
|
+
const { children, leftIcon, rightIcon, loading, ...restProps } = props;
|
|
16
17
|
|
|
17
18
|
return (
|
|
18
19
|
<ButtonUi
|
|
@@ -30,7 +31,8 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
30
31
|
...restProps.sx,
|
|
31
32
|
}}
|
|
32
33
|
>
|
|
33
|
-
{
|
|
34
|
+
{loading && <Icon inline icon="three-dots-loading" />}
|
|
35
|
+
{!loading && leftIcon && <Icon inline icon={leftIcon} />}
|
|
34
36
|
{children}
|
|
35
37
|
{rightIcon && <Icon inline icon={rightIcon} />}
|
|
36
38
|
</ButtonUi>
|
|
@@ -26,9 +26,14 @@ export const CloseButton = React.forwardRef<
|
|
|
26
26
|
display: 'inline-flex',
|
|
27
27
|
alignItems: 'center',
|
|
28
28
|
cursor: 'pointer',
|
|
29
|
+
lineHeight: 'normal',
|
|
29
30
|
gap: 'sm',
|
|
30
31
|
padding: 'sm',
|
|
31
32
|
width: 'fit-content',
|
|
33
|
+
transition: 'all 0.2s',
|
|
34
|
+
'& > iconify-icon': {
|
|
35
|
+
fontSize: 'base',
|
|
36
|
+
},
|
|
32
37
|
...sx,
|
|
33
38
|
}}
|
|
34
39
|
{...props}
|
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" />
|