@ttoss/ui 1.21.1 → 1.21.3
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 +17 -0
- package/dist/index.d.ts +10 -3
- package/dist/index.js +19 -0
- package/package.json +4 -3
- package/src/components/Icon/Icon.tsx +15 -0
- package/src/components/Slider/Slider.tsx +1 -0
- package/src/index.ts +2 -0
package/dist/esm/index.js
CHANGED
|
@@ -182,6 +182,21 @@ import { Spinner } from "theme-ui";
|
|
|
182
182
|
|
|
183
183
|
// src/components/Radio/Radio.tsx
|
|
184
184
|
import { Radio } from "theme-ui";
|
|
185
|
+
|
|
186
|
+
// src/components/Icon/Icon.tsx
|
|
187
|
+
import { Icon as IconUI } from "@iconify/react";
|
|
188
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
189
|
+
var Icon = ({ icon, sx }) => {
|
|
190
|
+
return /* @__PURE__ */ jsx3(Text, {
|
|
191
|
+
sx,
|
|
192
|
+
children: /* @__PURE__ */ jsx3(IconUI, {
|
|
193
|
+
icon
|
|
194
|
+
})
|
|
195
|
+
});
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
// src/components/Slider/Slider.tsx
|
|
199
|
+
import { Slider } from "theme-ui";
|
|
185
200
|
export {
|
|
186
201
|
Box,
|
|
187
202
|
Button,
|
|
@@ -190,6 +205,7 @@ export {
|
|
|
190
205
|
Flex,
|
|
191
206
|
Grid,
|
|
192
207
|
Heading,
|
|
208
|
+
Icon,
|
|
193
209
|
Image,
|
|
194
210
|
Input,
|
|
195
211
|
Label,
|
|
@@ -197,6 +213,7 @@ export {
|
|
|
197
213
|
Link,
|
|
198
214
|
Radio,
|
|
199
215
|
Select,
|
|
216
|
+
Slider,
|
|
200
217
|
Spinner,
|
|
201
218
|
Text,
|
|
202
219
|
ThemeProvider_default as ThemeProvider,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as theme_ui from 'theme-ui';
|
|
2
|
-
import { Theme, ButtonProps } from 'theme-ui';
|
|
3
|
-
export { Box, BoxProps, ButtonProps, Card, CardProps, Divider, DividerProps, Flex, FlexProps, Grid, GridProps, Heading, HeadingProps, Image, ImageProps, Input, InputProps, Label, LabelProps, Progress as LinearProgress, ProgressProps as LinearProgressProps, Link, LinkProps, Radio, RadioProps, Select, SelectProps, Spinner, SpinnerProps, Text, TextProps, Theme } from 'theme-ui';
|
|
2
|
+
import { Theme, ButtonProps, TextProps } from 'theme-ui';
|
|
3
|
+
export { Box, BoxProps, ButtonProps, Card, CardProps, Divider, DividerProps, Flex, FlexProps, Grid, GridProps, Heading, HeadingProps, Image, ImageProps, Input, InputProps, Label, LabelProps, Progress as LinearProgress, ProgressProps as LinearProgressProps, Link, LinkProps, Radio, RadioProps, Select, SelectProps, Slider, SliderProps, Spinner, SpinnerProps, Text, TextProps, Theme } from 'theme-ui';
|
|
4
4
|
export { useBreakpointIndex, useResponsiveValue } from '@theme-ui/match-media';
|
|
5
5
|
import * as React from 'react';
|
|
6
|
+
import { IconProps as IconProps$1 } from '@iconify/react';
|
|
6
7
|
|
|
7
8
|
declare type ThemeProviderProps = {
|
|
8
9
|
children?: React.ReactNode;
|
|
@@ -18,4 +19,10 @@ declare const useTheme: () => theme_ui.ThemeUIContextValue;
|
|
|
18
19
|
|
|
19
20
|
declare const Button: (props: ButtonProps) => JSX.Element;
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
declare type IconProps = {
|
|
23
|
+
icon: IconProps$1['icon'];
|
|
24
|
+
sx?: TextProps['sx'];
|
|
25
|
+
};
|
|
26
|
+
declare const Icon: ({ icon, sx }: IconProps) => JSX.Element;
|
|
27
|
+
|
|
28
|
+
export { Button, Icon, IconProps, ThemeProvider, ThemeProviderProps, useTheme };
|
package/dist/index.js
CHANGED
|
@@ -34,6 +34,7 @@ __export(src_exports, {
|
|
|
34
34
|
Flex: () => import_theme_ui7.Flex,
|
|
35
35
|
Grid: () => import_theme_ui8.Grid,
|
|
36
36
|
Heading: () => import_theme_ui9.Heading,
|
|
37
|
+
Icon: () => Icon,
|
|
37
38
|
Image: () => import_theme_ui10.Image,
|
|
38
39
|
Input: () => import_theme_ui11.Input,
|
|
39
40
|
Label: () => import_theme_ui12.Label,
|
|
@@ -41,6 +42,7 @@ __export(src_exports, {
|
|
|
41
42
|
Link: () => import_theme_ui13.Link,
|
|
42
43
|
Radio: () => import_theme_ui18.Radio,
|
|
43
44
|
Select: () => import_theme_ui16.Select,
|
|
45
|
+
Slider: () => import_theme_ui19.Slider,
|
|
44
46
|
Spinner: () => import_theme_ui17.Spinner,
|
|
45
47
|
Text: () => import_theme_ui15.Text,
|
|
46
48
|
ThemeProvider: () => ThemeProvider_default,
|
|
@@ -230,6 +232,21 @@ var import_theme_ui17 = require("theme-ui");
|
|
|
230
232
|
|
|
231
233
|
// src/components/Radio/Radio.tsx
|
|
232
234
|
var import_theme_ui18 = require("theme-ui");
|
|
235
|
+
|
|
236
|
+
// src/components/Icon/Icon.tsx
|
|
237
|
+
var import_react2 = require("@iconify/react");
|
|
238
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
239
|
+
var Icon = ({ icon, sx }) => {
|
|
240
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_theme_ui15.Text, {
|
|
241
|
+
sx,
|
|
242
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react2.Icon, {
|
|
243
|
+
icon
|
|
244
|
+
})
|
|
245
|
+
});
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
// src/components/Slider/Slider.tsx
|
|
249
|
+
var import_theme_ui19 = require("theme-ui");
|
|
233
250
|
// Annotate the CommonJS export names for ESM import in node:
|
|
234
251
|
0 && (module.exports = {
|
|
235
252
|
Box,
|
|
@@ -239,6 +256,7 @@ var import_theme_ui18 = require("theme-ui");
|
|
|
239
256
|
Flex,
|
|
240
257
|
Grid,
|
|
241
258
|
Heading,
|
|
259
|
+
Icon,
|
|
242
260
|
Image,
|
|
243
261
|
Input,
|
|
244
262
|
Label,
|
|
@@ -246,6 +264,7 @@ var import_theme_ui18 = require("theme-ui");
|
|
|
246
264
|
Link,
|
|
247
265
|
Radio,
|
|
248
266
|
Select,
|
|
267
|
+
Slider,
|
|
249
268
|
Spinner,
|
|
250
269
|
Text,
|
|
251
270
|
ThemeProvider,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/ui",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.3",
|
|
4
4
|
"description": "Primitive layout, typographic, and other components for styling applications.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "ttoss",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"typings": "dist/index.d.ts",
|
|
22
22
|
"dependencies": {
|
|
23
|
+
"@iconify/react": "^4.0.0",
|
|
23
24
|
"@theme-ui/match-media": "^0.15.1",
|
|
24
25
|
"theme-ui": "^0.15.1"
|
|
25
26
|
},
|
|
@@ -31,7 +32,7 @@
|
|
|
31
32
|
"@emotion/react": "^11.10.4",
|
|
32
33
|
"@ttoss/config": "^1.18.3",
|
|
33
34
|
"@ttoss/test-utils": "^1.16.10",
|
|
34
|
-
"@ttoss/theme": "^1.0.
|
|
35
|
+
"@ttoss/theme": "^1.0.3",
|
|
35
36
|
"@types/jest": "^29.1.1",
|
|
36
37
|
"jest": "^29.1.2",
|
|
37
38
|
"tsup": "^6.2.3"
|
|
@@ -44,5 +45,5 @@
|
|
|
44
45
|
"publishConfig": {
|
|
45
46
|
"access": "public"
|
|
46
47
|
},
|
|
47
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "aa9d30b8c4e8f74d2e0b78872f0519ca4a550ee4"
|
|
48
49
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IconProps as IconPropsUI, Icon as IconUI } from '@iconify/react';
|
|
2
|
+
import { Text, TextProps } from '../Text/Text';
|
|
3
|
+
|
|
4
|
+
export type IconProps = {
|
|
5
|
+
icon: IconPropsUI['icon'];
|
|
6
|
+
sx?: TextProps['sx'];
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const Icon = ({ icon, sx }: IconProps) => {
|
|
10
|
+
return (
|
|
11
|
+
<Text sx={sx}>
|
|
12
|
+
<IconUI icon={icon} />
|
|
13
|
+
</Text>
|
|
14
|
+
);
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Slider, type SliderProps } from 'theme-ui';
|
package/src/index.ts
CHANGED
|
@@ -27,3 +27,5 @@ export { Text, type TextProps } from './components/Text/Text';
|
|
|
27
27
|
export { Select, type SelectProps } from './components/Select/Select';
|
|
28
28
|
export { Spinner, type SpinnerProps } from './components/Spinner/Spinner';
|
|
29
29
|
export { Radio, type RadioProps } from './components/Radio/Radio';
|
|
30
|
+
export { Icon, type IconProps } from './components/Icon/Icon';
|
|
31
|
+
export { Slider, type SliderProps } from './components/Slider/Slider';
|