@ttoss/ui 1.32.8 → 1.34.0
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/README.md +39 -2
- package/dist/esm/index.js +3 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +5 -0
- package/package.json +2 -2
- package/src/index.ts +2 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```shell
|
|
8
|
-
|
|
8
|
+
pnpm add @ttoss/ui
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Quick start
|
|
@@ -62,10 +62,47 @@ export const Component = () => {
|
|
|
62
62
|
|
|
63
63
|
:::note Note
|
|
64
64
|
|
|
65
|
-
You don't need to use the custom
|
|
65
|
+
You don't need to use the custom `/** @jsxImportSource theme-ui */` pragma if you use the `sx` prop directly on the components of the library.
|
|
66
66
|
|
|
67
67
|
:::
|
|
68
68
|
|
|
69
69
|
## Components
|
|
70
70
|
|
|
71
71
|
You can check all the components of the library `@ttoss/ui` on the [Storybook](https://storybook.ttoss.dev/?path=/story/ui).
|
|
72
|
+
|
|
73
|
+
### Global
|
|
74
|
+
|
|
75
|
+
Wrapper around the Emotion Global component, made Theme UI theme-aware.
|
|
76
|
+
|
|
77
|
+
```tsx
|
|
78
|
+
import { Global } from '@ttoss/ui';
|
|
79
|
+
|
|
80
|
+
export const Provider = (props) => {
|
|
81
|
+
return (
|
|
82
|
+
<Global
|
|
83
|
+
styles={{
|
|
84
|
+
button: {
|
|
85
|
+
m: 0,
|
|
86
|
+
bg: 'primary',
|
|
87
|
+
color: 'background',
|
|
88
|
+
border: 0,
|
|
89
|
+
},
|
|
90
|
+
}}
|
|
91
|
+
/>
|
|
92
|
+
);
|
|
93
|
+
};
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Misc
|
|
97
|
+
|
|
98
|
+
### keyframes
|
|
99
|
+
|
|
100
|
+
```tsx
|
|
101
|
+
import { Box, keyframes } from '@ttoss/ui';
|
|
102
|
+
|
|
103
|
+
const fadeIn = keyframes({ from: { opacity: 0 }, to: { opacity: 1 } });
|
|
104
|
+
|
|
105
|
+
export const Component = (props) => {
|
|
106
|
+
return <Box {...props} sx={{ animation: `${fadeIn} 1s backwards` }} />;
|
|
107
|
+
};
|
|
108
|
+
```
|
package/dist/esm/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
2
|
|
|
3
3
|
// src/index.ts
|
|
4
|
-
import { BaseStyles } from "theme-ui";
|
|
4
|
+
import { BaseStyles, Global as Global2 } from "theme-ui";
|
|
5
5
|
import { useResponsiveValue, useBreakpointIndex } from "@theme-ui/match-media";
|
|
6
|
+
import { keyframes } from "@emotion/react";
|
|
6
7
|
|
|
7
8
|
// src/theme/ThemeProvider.tsx
|
|
8
9
|
import { BruttalFonts, BruttalTheme } from "@ttoss/theme/Bruttal";
|
|
@@ -563,4 +564,4 @@ var Stack = /*#__PURE__*/React12.forwardRef((props, ref) => {
|
|
|
563
564
|
});
|
|
564
565
|
});
|
|
565
566
|
Stack.displayName = "Stack";
|
|
566
|
-
export { Badge, BaseStyles, Box, Button, Card, Checkbox, CloseButton, Container, Divider, Flex, Grid, Heading, HelpText, Icon, IconButton, Image, InfiniteLinearProgress, Input, InputNumber, Label, Progress as LinearProgress, Link, Radio, Select, Slider, Spinner, Stack, Text, Textarea, ThemeProvider, useBreakpointIndex, useResponsiveValue, useTheme };
|
|
567
|
+
export { Badge, BaseStyles, Box, Button, Card, Checkbox, CloseButton, Container, Divider, Flex, Global2 as Global, Grid, Heading, HelpText, Icon, IconButton, Image, InfiniteLinearProgress, Input, InputNumber, Label, Progress as LinearProgress, Link, Radio, Select, Slider, Spinner, Stack, Text, Textarea, ThemeProvider, keyframes, useBreakpointIndex, useResponsiveValue, useTheme };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as theme_ui from 'theme-ui';
|
|
2
2
|
import { Theme, BadgeProps as BadgeProps$1, ButtonProps as ButtonProps$1, InputProps as InputProps$1, LabelProps as LabelProps$1, LinkProps as LinkProps$1, SelectProps, IconButtonProps, TextareaProps as TextareaProps$1, TextProps, FlexProps } 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, Radio, RadioProps, SelectProps, Slider, SliderProps, Spinner, SpinnerProps, Text, TextProps, Theme } from 'theme-ui';
|
|
3
|
+
export { BaseStyles, Box, BoxProps, Card, CardProps, Checkbox, CheckboxProps, Container, ContainerProps, Divider, DividerProps, Flex, FlexProps, Global, Grid, GridProps, Heading, HeadingProps, IconButtonProps, Image, ImageProps, Progress as LinearProgress, ProgressProps as LinearProgressProps, Radio, RadioProps, SelectProps, Slider, SliderProps, Spinner, SpinnerProps, SxProp, Text, TextProps, Theme } from 'theme-ui';
|
|
4
4
|
export { useBreakpointIndex, useResponsiveValue } from '@theme-ui/match-media';
|
|
5
|
+
export { Keyframes, keyframes } from '@emotion/react';
|
|
5
6
|
import * as React from 'react';
|
|
6
7
|
import React__default from 'react';
|
|
7
8
|
import { IconifyIconProps, IconifyIconHTMLElement } from '@iconify-icon/react';
|
package/dist/index.js
CHANGED
|
@@ -48,6 +48,7 @@ __export(src_exports, {
|
|
|
48
48
|
Container: () => import_theme_ui24.Container,
|
|
49
49
|
Divider: () => import_theme_ui7.Divider,
|
|
50
50
|
Flex: () => import_theme_ui8.Flex,
|
|
51
|
+
Global: () => import_theme_ui27.Global,
|
|
51
52
|
Grid: () => import_theme_ui9.Grid,
|
|
52
53
|
Heading: () => import_theme_ui10.Heading,
|
|
53
54
|
HelpText: () => HelpText,
|
|
@@ -68,6 +69,7 @@ __export(src_exports, {
|
|
|
68
69
|
Text: () => import_theme_ui16.Text,
|
|
69
70
|
Textarea: () => Textarea,
|
|
70
71
|
ThemeProvider: () => ThemeProvider,
|
|
72
|
+
keyframes: () => import_react9.keyframes,
|
|
71
73
|
useBreakpointIndex: () => import_match_media.useBreakpointIndex,
|
|
72
74
|
useResponsiveValue: () => import_match_media.useResponsiveValue,
|
|
73
75
|
useTheme: () => useTheme
|
|
@@ -75,6 +77,7 @@ __export(src_exports, {
|
|
|
75
77
|
module.exports = __toCommonJS(src_exports);
|
|
76
78
|
var import_theme_ui27 = require("theme-ui");
|
|
77
79
|
var import_match_media = require("@theme-ui/match-media");
|
|
80
|
+
var import_react9 = require("@emotion/react");
|
|
78
81
|
|
|
79
82
|
// src/theme/ThemeProvider.tsx
|
|
80
83
|
var import_Bruttal = require("@ttoss/theme/Bruttal");
|
|
@@ -647,6 +650,7 @@ Stack.displayName = "Stack";
|
|
|
647
650
|
Container,
|
|
648
651
|
Divider,
|
|
649
652
|
Flex,
|
|
653
|
+
Global,
|
|
650
654
|
Grid,
|
|
651
655
|
Heading,
|
|
652
656
|
HelpText,
|
|
@@ -667,6 +671,7 @@ Stack.displayName = "Stack";
|
|
|
667
671
|
Text,
|
|
668
672
|
Textarea,
|
|
669
673
|
ThemeProvider,
|
|
674
|
+
keyframes,
|
|
670
675
|
useBreakpointIndex,
|
|
671
676
|
useResponsiveValue,
|
|
672
677
|
useTheme
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.34.0",
|
|
4
4
|
"description": "Primitive layout, typographic, and other components for styling applications.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "ttoss",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"publishConfig": {
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "c759e6382b5adf6e9d19e98509c2e089246e553d"
|
|
52
52
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export { BaseStyles, type Theme } from 'theme-ui';
|
|
1
|
+
export { BaseStyles, type Theme, Global, type SxProp } from 'theme-ui';
|
|
2
2
|
export { useResponsiveValue, useBreakpointIndex } from '@theme-ui/match-media';
|
|
3
|
+
export { keyframes, type Keyframes } from '@emotion/react';
|
|
3
4
|
|
|
4
5
|
export { ThemeProvider, type ThemeProviderProps } from './theme/ThemeProvider';
|
|
5
6
|
|