@ttoss/ui 1.31.15 → 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 +19 -9
- package/dist/index.d.ts +5 -3
- package/dist/index.js +19 -9
- package/package.json +4 -4
- package/src/components/Button.tsx +1 -1
- package/src/components/IconButton.tsx +12 -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",
|
|
@@ -274,7 +274,17 @@ import { Spinner } from "theme-ui";
|
|
|
274
274
|
import { Radio } from "theme-ui";
|
|
275
275
|
|
|
276
276
|
// src/components/IconButton.tsx
|
|
277
|
-
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";
|
|
278
288
|
|
|
279
289
|
// src/components/Slider.tsx
|
|
280
290
|
import { Slider } from "theme-ui";
|
|
@@ -283,12 +293,12 @@ import { Slider } from "theme-ui";
|
|
|
283
293
|
import { Checkbox } from "theme-ui";
|
|
284
294
|
|
|
285
295
|
// src/components/InfiniteLinearProgress.tsx
|
|
286
|
-
import * as
|
|
287
|
-
import { jsx as
|
|
296
|
+
import * as React7 from "react";
|
|
297
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
288
298
|
var MAX_PROGRESS = 100;
|
|
289
299
|
var InfiniteLinearProgress = () => {
|
|
290
|
-
const [progress, setProgress] =
|
|
291
|
-
|
|
300
|
+
const [progress, setProgress] = React7.useState(0);
|
|
301
|
+
React7.useEffect(() => {
|
|
292
302
|
const timer = setInterval(() => {
|
|
293
303
|
setProgress(oldProgress => {
|
|
294
304
|
if (oldProgress === MAX_PROGRESS) {
|
|
@@ -309,7 +319,7 @@ var InfiniteLinearProgress = () => {
|
|
|
309
319
|
clearInterval(timer);
|
|
310
320
|
};
|
|
311
321
|
}, []);
|
|
312
|
-
return /* @__PURE__ */
|
|
322
|
+
return /* @__PURE__ */jsx9(Progress, {
|
|
313
323
|
max: MAX_PROGRESS,
|
|
314
324
|
value: progress,
|
|
315
325
|
role: "progressbar"
|
|
@@ -323,14 +333,14 @@ import { Textarea } from "theme-ui";
|
|
|
323
333
|
import { Container } from "theme-ui";
|
|
324
334
|
|
|
325
335
|
// src/components/HelpText.tsx
|
|
326
|
-
import { jsx as
|
|
336
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
327
337
|
var HelpText = ({
|
|
328
338
|
disabled,
|
|
329
339
|
negative,
|
|
330
340
|
...props
|
|
331
341
|
}) => {
|
|
332
342
|
const variant = ["text.help", negative ? "negative" : void 0].filter(Boolean).join(".");
|
|
333
|
-
return /* @__PURE__ */
|
|
343
|
+
return /* @__PURE__ */jsx10(Text, {
|
|
334
344
|
variant,
|
|
335
345
|
"aria-disabled": disabled ? "true" : void 0,
|
|
336
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",
|
|
@@ -343,7 +343,17 @@ var import_theme_ui18 = require("theme-ui");
|
|
|
343
343
|
var import_theme_ui19 = require("theme-ui");
|
|
344
344
|
|
|
345
345
|
// src/components/IconButton.tsx
|
|
346
|
+
var React6 = __toESM(require("react"));
|
|
346
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";
|
|
347
357
|
|
|
348
358
|
// src/components/Slider.tsx
|
|
349
359
|
var import_theme_ui21 = require("theme-ui");
|
|
@@ -352,12 +362,12 @@ var import_theme_ui21 = require("theme-ui");
|
|
|
352
362
|
var import_theme_ui22 = require("theme-ui");
|
|
353
363
|
|
|
354
364
|
// src/components/InfiniteLinearProgress.tsx
|
|
355
|
-
var
|
|
356
|
-
var
|
|
365
|
+
var React7 = __toESM(require("react"));
|
|
366
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
357
367
|
var MAX_PROGRESS = 100;
|
|
358
368
|
var InfiniteLinearProgress = () => {
|
|
359
|
-
const [progress, setProgress] =
|
|
360
|
-
|
|
369
|
+
const [progress, setProgress] = React7.useState(0);
|
|
370
|
+
React7.useEffect(() => {
|
|
361
371
|
const timer = setInterval(() => {
|
|
362
372
|
setProgress(oldProgress => {
|
|
363
373
|
if (oldProgress === MAX_PROGRESS) {
|
|
@@ -378,7 +388,7 @@ var InfiniteLinearProgress = () => {
|
|
|
378
388
|
clearInterval(timer);
|
|
379
389
|
};
|
|
380
390
|
}, []);
|
|
381
|
-
return /* @__PURE__ */(0,
|
|
391
|
+
return /* @__PURE__ */(0, import_jsx_runtime9.jsx)(import_theme_ui15.Progress, {
|
|
382
392
|
max: MAX_PROGRESS,
|
|
383
393
|
value: progress,
|
|
384
394
|
role: "progressbar"
|
|
@@ -392,14 +402,14 @@ var import_theme_ui23 = require("theme-ui");
|
|
|
392
402
|
var import_theme_ui24 = require("theme-ui");
|
|
393
403
|
|
|
394
404
|
// src/components/HelpText.tsx
|
|
395
|
-
var
|
|
405
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
396
406
|
var HelpText = ({
|
|
397
407
|
disabled,
|
|
398
408
|
negative,
|
|
399
409
|
...props
|
|
400
410
|
}) => {
|
|
401
411
|
const variant = ["text.help", negative ? "negative" : void 0].filter(Boolean).join(".");
|
|
402
|
-
return /* @__PURE__ */(0,
|
|
412
|
+
return /* @__PURE__ */(0, import_jsx_runtime10.jsx)(import_theme_ui16.Text, {
|
|
403
413
|
variant,
|
|
404
414
|
"aria-disabled": disabled ? "true" : void 0,
|
|
405
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';
|