@ttoss/ui 1.31.14 → 1.31.16
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 +21 -10
- package/dist/index.d.ts +5 -3
- package/dist/index.js +21 -10
- package/package.json +4 -4
- package/src/components/Button.tsx +1 -1
- package/src/components/IconButton.tsx +12 -1
- package/src/components/Label.tsx +4 -1
package/dist/esm/index.js
CHANGED
|
@@ -86,9 +86,9 @@ var Button = /*#__PURE__*/React3.forwardRef((props, ref) => {
|
|
|
86
86
|
...restProps
|
|
87
87
|
} = props;
|
|
88
88
|
return /* @__PURE__ */jsxs3(ButtonUi, {
|
|
89
|
-
ref,
|
|
90
89
|
type: "button",
|
|
91
90
|
...restProps,
|
|
91
|
+
ref,
|
|
92
92
|
sx: {
|
|
93
93
|
cursor: "pointer",
|
|
94
94
|
paddingX: "xl",
|
|
@@ -198,7 +198,8 @@ var Label = ({
|
|
|
198
198
|
...props,
|
|
199
199
|
children: [children, tooltip && /* @__PURE__ */jsx6(Text, {
|
|
200
200
|
sx: {
|
|
201
|
-
color: "currentcolor"
|
|
201
|
+
color: "currentcolor",
|
|
202
|
+
cursor: onTooltipClick ? "pointer" : void 0
|
|
202
203
|
},
|
|
203
204
|
onClick: onTooltipClick,
|
|
204
205
|
"aria-label": TOOLTIP_LABEL,
|
|
@@ -273,7 +274,17 @@ import { Spinner } from "theme-ui";
|
|
|
273
274
|
import { Radio } from "theme-ui";
|
|
274
275
|
|
|
275
276
|
// src/components/IconButton.tsx
|
|
276
|
-
import
|
|
277
|
+
import * as React6 from "react";
|
|
278
|
+
import { IconButton as IconButtonUi } from "theme-ui";
|
|
279
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
280
|
+
var IconButton = /*#__PURE__*/React6.forwardRef((props, ref) => {
|
|
281
|
+
return /* @__PURE__ */jsx8(IconButtonUi, {
|
|
282
|
+
type: "button",
|
|
283
|
+
...props,
|
|
284
|
+
ref
|
|
285
|
+
});
|
|
286
|
+
});
|
|
287
|
+
IconButton.displayName = "IconButton";
|
|
277
288
|
|
|
278
289
|
// src/components/Slider.tsx
|
|
279
290
|
import { Slider } from "theme-ui";
|
|
@@ -282,12 +293,12 @@ import { Slider } from "theme-ui";
|
|
|
282
293
|
import { Checkbox } from "theme-ui";
|
|
283
294
|
|
|
284
295
|
// src/components/InfiniteLinearProgress.tsx
|
|
285
|
-
import * as
|
|
286
|
-
import { jsx as
|
|
296
|
+
import * as React7 from "react";
|
|
297
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
287
298
|
var MAX_PROGRESS = 100;
|
|
288
299
|
var InfiniteLinearProgress = () => {
|
|
289
|
-
const [progress, setProgress] =
|
|
290
|
-
|
|
300
|
+
const [progress, setProgress] = React7.useState(0);
|
|
301
|
+
React7.useEffect(() => {
|
|
291
302
|
const timer = setInterval(() => {
|
|
292
303
|
setProgress(oldProgress => {
|
|
293
304
|
if (oldProgress === MAX_PROGRESS) {
|
|
@@ -308,7 +319,7 @@ var InfiniteLinearProgress = () => {
|
|
|
308
319
|
clearInterval(timer);
|
|
309
320
|
};
|
|
310
321
|
}, []);
|
|
311
|
-
return /* @__PURE__ */
|
|
322
|
+
return /* @__PURE__ */jsx9(Progress, {
|
|
312
323
|
max: MAX_PROGRESS,
|
|
313
324
|
value: progress,
|
|
314
325
|
role: "progressbar"
|
|
@@ -322,14 +333,14 @@ import { Textarea } from "theme-ui";
|
|
|
322
333
|
import { Container } from "theme-ui";
|
|
323
334
|
|
|
324
335
|
// src/components/HelpText.tsx
|
|
325
|
-
import { jsx as
|
|
336
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
326
337
|
var HelpText = ({
|
|
327
338
|
disabled,
|
|
328
339
|
negative,
|
|
329
340
|
...props
|
|
330
341
|
}) => {
|
|
331
342
|
const variant = ["text.help", negative ? "negative" : void 0].filter(Boolean).join(".");
|
|
332
|
-
return /* @__PURE__ */
|
|
343
|
+
return /* @__PURE__ */jsx10(Text, {
|
|
333
344
|
variant,
|
|
334
345
|
"aria-disabled": disabled ? "true" : void 0,
|
|
335
346
|
...props
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
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, SelectProps as SelectProps$1, TextProps } from 'theme-ui';
|
|
3
|
-
export { BaseStyles, Box, BoxProps, Card, CardProps, Checkbox, CheckboxProps, Container, ContainerProps, Divider, DividerProps, Flex, FlexProps, Grid, GridProps, Heading, HeadingProps,
|
|
2
|
+
import { Theme, BadgeProps as BadgeProps$1, ButtonProps as ButtonProps$1, InputProps as InputProps$1, LabelProps as LabelProps$1, SelectProps as SelectProps$1, IconButtonProps, TextProps } from 'theme-ui';
|
|
3
|
+
export { BaseStyles, Box, BoxProps, Card, CardProps, Checkbox, CheckboxProps, Container, ContainerProps, Divider, DividerProps, Flex, FlexProps, Grid, GridProps, Heading, HeadingProps, IconButtonProps, Image, ImageProps, Progress as LinearProgress, ProgressProps as LinearProgressProps, Link, LinkProps, Radio, RadioProps, Slider, SliderProps, Spinner, SpinnerProps, Text, TextProps, Textarea, TextareaProps, Theme } from 'theme-ui';
|
|
4
4
|
export { useBreakpointIndex, useResponsiveValue } from '@theme-ui/match-media';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import React__default from 'react';
|
|
@@ -49,6 +49,8 @@ declare const Label: ({ children, onTooltipClick, tooltip, ...props }: LabelProp
|
|
|
49
49
|
type SelectProps = SelectProps$1;
|
|
50
50
|
declare const Select: React__default.ForwardRefExoticComponent<Omit<SelectProps$1, "ref"> & React__default.RefAttributes<HTMLSelectElement>>;
|
|
51
51
|
|
|
52
|
+
declare const IconButton: React.ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
53
|
+
|
|
52
54
|
declare const InfiniteLinearProgress: () => JSX.Element;
|
|
53
55
|
|
|
54
56
|
type HelpTextProps = Omit<TextProps, 'variant'> & {
|
|
@@ -57,4 +59,4 @@ type HelpTextProps = Omit<TextProps, 'variant'> & {
|
|
|
57
59
|
};
|
|
58
60
|
declare const HelpText: ({ disabled, negative, ...props }: HelpTextProps) => JSX.Element;
|
|
59
61
|
|
|
60
|
-
export { Badge, BadgeProps, Button, ButtonProps, HelpText, HelpTextProps, Icon, IconProps, IconType, InfiniteLinearProgress, Input, InputProps, Label, LabelProps, Select, SelectProps, ThemeProvider, ThemeProviderProps, useTheme };
|
|
62
|
+
export { Badge, BadgeProps, Button, ButtonProps, HelpText, HelpTextProps, Icon, IconButton, IconProps, IconType, InfiniteLinearProgress, Input, InputProps, Label, LabelProps, Select, SelectProps, ThemeProvider, ThemeProviderProps, useTheme };
|
package/dist/index.js
CHANGED
|
@@ -51,7 +51,7 @@ __export(src_exports, {
|
|
|
51
51
|
Heading: () => import_theme_ui10.Heading,
|
|
52
52
|
HelpText: () => HelpText,
|
|
53
53
|
Icon: () => Icon,
|
|
54
|
-
IconButton: () =>
|
|
54
|
+
IconButton: () => IconButton,
|
|
55
55
|
Image: () => import_theme_ui11.Image,
|
|
56
56
|
InfiniteLinearProgress: () => InfiniteLinearProgress,
|
|
57
57
|
Input: () => Input,
|
|
@@ -155,9 +155,9 @@ var Button = React3.forwardRef((props, ref) => {
|
|
|
155
155
|
...restProps
|
|
156
156
|
} = props;
|
|
157
157
|
return /* @__PURE__ */(0, import_jsx_runtime4.jsxs)(import_theme_ui5.Button, {
|
|
158
|
-
ref,
|
|
159
158
|
type: "button",
|
|
160
159
|
...restProps,
|
|
160
|
+
ref,
|
|
161
161
|
sx: {
|
|
162
162
|
cursor: "pointer",
|
|
163
163
|
paddingX: "xl",
|
|
@@ -267,7 +267,8 @@ var Label = ({
|
|
|
267
267
|
...props,
|
|
268
268
|
children: [children, tooltip && /* @__PURE__ */(0, import_jsx_runtime6.jsx)(import_theme_ui16.Text, {
|
|
269
269
|
sx: {
|
|
270
|
-
color: "currentcolor"
|
|
270
|
+
color: "currentcolor",
|
|
271
|
+
cursor: onTooltipClick ? "pointer" : void 0
|
|
271
272
|
},
|
|
272
273
|
onClick: onTooltipClick,
|
|
273
274
|
"aria-label": TOOLTIP_LABEL,
|
|
@@ -342,7 +343,17 @@ var import_theme_ui18 = require("theme-ui");
|
|
|
342
343
|
var import_theme_ui19 = require("theme-ui");
|
|
343
344
|
|
|
344
345
|
// src/components/IconButton.tsx
|
|
346
|
+
var React6 = __toESM(require("react"));
|
|
345
347
|
var import_theme_ui20 = require("theme-ui");
|
|
348
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
349
|
+
var IconButton = React6.forwardRef((props, ref) => {
|
|
350
|
+
return /* @__PURE__ */(0, import_jsx_runtime8.jsx)(import_theme_ui20.IconButton, {
|
|
351
|
+
type: "button",
|
|
352
|
+
...props,
|
|
353
|
+
ref
|
|
354
|
+
});
|
|
355
|
+
});
|
|
356
|
+
IconButton.displayName = "IconButton";
|
|
346
357
|
|
|
347
358
|
// src/components/Slider.tsx
|
|
348
359
|
var import_theme_ui21 = require("theme-ui");
|
|
@@ -351,12 +362,12 @@ var import_theme_ui21 = require("theme-ui");
|
|
|
351
362
|
var import_theme_ui22 = require("theme-ui");
|
|
352
363
|
|
|
353
364
|
// src/components/InfiniteLinearProgress.tsx
|
|
354
|
-
var
|
|
355
|
-
var
|
|
365
|
+
var React7 = __toESM(require("react"));
|
|
366
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
356
367
|
var MAX_PROGRESS = 100;
|
|
357
368
|
var InfiniteLinearProgress = () => {
|
|
358
|
-
const [progress, setProgress] =
|
|
359
|
-
|
|
369
|
+
const [progress, setProgress] = React7.useState(0);
|
|
370
|
+
React7.useEffect(() => {
|
|
360
371
|
const timer = setInterval(() => {
|
|
361
372
|
setProgress(oldProgress => {
|
|
362
373
|
if (oldProgress === MAX_PROGRESS) {
|
|
@@ -377,7 +388,7 @@ var InfiniteLinearProgress = () => {
|
|
|
377
388
|
clearInterval(timer);
|
|
378
389
|
};
|
|
379
390
|
}, []);
|
|
380
|
-
return /* @__PURE__ */(0,
|
|
391
|
+
return /* @__PURE__ */(0, import_jsx_runtime9.jsx)(import_theme_ui15.Progress, {
|
|
381
392
|
max: MAX_PROGRESS,
|
|
382
393
|
value: progress,
|
|
383
394
|
role: "progressbar"
|
|
@@ -391,14 +402,14 @@ var import_theme_ui23 = require("theme-ui");
|
|
|
391
402
|
var import_theme_ui24 = require("theme-ui");
|
|
392
403
|
|
|
393
404
|
// src/components/HelpText.tsx
|
|
394
|
-
var
|
|
405
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
395
406
|
var HelpText = ({
|
|
396
407
|
disabled,
|
|
397
408
|
negative,
|
|
398
409
|
...props
|
|
399
410
|
}) => {
|
|
400
411
|
const variant = ["text.help", negative ? "negative" : void 0].filter(Boolean).join(".");
|
|
401
|
-
return /* @__PURE__ */(0,
|
|
412
|
+
return /* @__PURE__ */(0, import_jsx_runtime10.jsx)(import_theme_ui16.Text, {
|
|
402
413
|
variant,
|
|
403
414
|
"aria-disabled": disabled ? "true" : void 0,
|
|
404
415
|
...props
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/ui",
|
|
3
|
-
"version": "1.31.
|
|
3
|
+
"version": "1.31.16",
|
|
4
4
|
"description": "Primitive layout, typographic, and other components for styling applications.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "ttoss",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@emotion/react": "^11.10.6",
|
|
25
25
|
"@iconify-icon/react": "^1.0.7",
|
|
26
|
-
"@theme-ui/match-media": "^0.15.
|
|
26
|
+
"@theme-ui/match-media": "^0.15.7",
|
|
27
27
|
"@ttoss/theme": "^1.4.13",
|
|
28
|
-
"theme-ui": "^0.15.
|
|
28
|
+
"theme-ui": "^0.15.7"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"react": ">=16.8.0"
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "aa31505953d2717d84fa5e69dbae5b488ef04986"
|
|
50
50
|
}
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type IconButtonProps, IconButton as IconButtonUi } from 'theme-ui';
|
|
3
|
+
|
|
4
|
+
export type { IconButtonProps };
|
|
5
|
+
|
|
6
|
+
export const IconButton = React.forwardRef<HTMLButtonElement, IconButtonProps>(
|
|
7
|
+
(props, ref) => {
|
|
8
|
+
return <IconButtonUi type="button" {...props} ref={ref} />;
|
|
9
|
+
}
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
IconButton.displayName = 'IconButton';
|
package/src/components/Label.tsx
CHANGED