@xanui/core 1.1.0 → 1.1.2
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/main.tsx +97 -0
- package/package.json +51 -22
- package/src/ServerStyleTags.tsx +12 -0
- package/src/Tag/cssPropList.ts +191 -0
- package/src/Tag/index.tsx +11 -0
- package/{Tag/types.d.ts → src/Tag/types.ts} +13 -9
- package/src/Tag/useTagProps.ts +28 -0
- package/src/Transition/index.tsx +148 -0
- package/src/Transition/variants.ts +178 -0
- package/src/breakpoint/index.tsx +52 -0
- package/src/breakpoint/useBreakpoint.ts +31 -0
- package/src/breakpoint/useBreakpointProps.ts +57 -0
- package/src/css/aliases.ts +35 -0
- package/src/css/getProps.ts +38 -0
- package/src/css/getValue.ts +117 -0
- package/src/css/index.ts +78 -0
- package/{css/types.d.ts → src/css/types.ts} +22 -16
- package/src/index.ts +34 -0
- package/src/isWindow.ts +3 -0
- package/src/theme/ThemeCssVars.ts +107 -0
- package/src/theme/ThemeDefaultOptions.ts +146 -0
- package/src/theme/ThemeProvider.tsx +140 -0
- package/src/theme/core.ts +21 -0
- package/src/theme/createColor.ts +53 -0
- package/src/theme/createTheme.ts +33 -0
- package/src/theme/createThemeSwitcher.ts +18 -0
- package/src/theme/index.tsx +17 -0
- package/{theme/types.d.ts → src/theme/types.ts} +103 -46
- package/src/useAnimation.ts +40 -0
- package/src/useColorTemplate.ts +11 -0
- package/src/useInterface.ts +13 -0
- package/tsconfig.json +28 -0
- package/ServerStyleTags.cjs +0 -2
- package/ServerStyleTags.cjs.map +0 -7
- package/ServerStyleTags.d.ts +0 -3
- package/ServerStyleTags.mjs +0 -2
- package/ServerStyleTags.mjs.map +0 -7
- package/Tag/cssPropList.cjs +0 -2
- package/Tag/cssPropList.cjs.map +0 -7
- package/Tag/cssPropList.d.ts +0 -2
- package/Tag/cssPropList.mjs +0 -2
- package/Tag/cssPropList.mjs.map +0 -7
- package/Tag/index.cjs +0 -2
- package/Tag/index.cjs.map +0 -7
- package/Tag/index.d.ts +0 -4
- package/Tag/index.mjs +0 -2
- package/Tag/index.mjs.map +0 -7
- package/Tag/types.cjs +0 -2
- package/Tag/types.cjs.map +0 -7
- package/Tag/types.mjs +0 -1
- package/Tag/types.mjs.map +0 -7
- package/Tag/useTagProps.cjs +0 -2
- package/Tag/useTagProps.cjs.map +0 -7
- package/Tag/useTagProps.d.ts +0 -3
- package/Tag/useTagProps.mjs +0 -2
- package/Tag/useTagProps.mjs.map +0 -7
- package/Transition/index.cjs +0 -2
- package/Transition/index.cjs.map +0 -7
- package/Transition/index.d.ts +0 -31
- package/Transition/index.mjs +0 -2
- package/Transition/index.mjs.map +0 -7
- package/Transition/variants.cjs +0 -2
- package/Transition/variants.cjs.map +0 -7
- package/Transition/variants.d.ts +0 -131
- package/Transition/variants.mjs +0 -2
- package/Transition/variants.mjs.map +0 -7
- package/breakpoint/index.cjs +0 -2
- package/breakpoint/index.cjs.map +0 -7
- package/breakpoint/index.d.ts +0 -6
- package/breakpoint/index.mjs +0 -2
- package/breakpoint/index.mjs.map +0 -7
- package/breakpoint/useBreakpoint.cjs +0 -2
- package/breakpoint/useBreakpoint.cjs.map +0 -7
- package/breakpoint/useBreakpoint.d.ts +0 -10
- package/breakpoint/useBreakpoint.mjs +0 -2
- package/breakpoint/useBreakpoint.mjs.map +0 -7
- package/breakpoint/useBreakpointProps.cjs +0 -2
- package/breakpoint/useBreakpointProps.cjs.map +0 -7
- package/breakpoint/useBreakpointProps.d.ts +0 -6
- package/breakpoint/useBreakpointProps.mjs +0 -2
- package/breakpoint/useBreakpointProps.mjs.map +0 -7
- package/css/aliases.cjs +0 -2
- package/css/aliases.cjs.map +0 -7
- package/css/aliases.d.ts +0 -4
- package/css/aliases.mjs +0 -2
- package/css/aliases.mjs.map +0 -7
- package/css/getProps.cjs +0 -2
- package/css/getProps.cjs.map +0 -7
- package/css/getProps.d.ts +0 -3
- package/css/getProps.mjs +0 -2
- package/css/getProps.mjs.map +0 -7
- package/css/getValue.cjs +0 -2
- package/css/getValue.cjs.map +0 -7
- package/css/getValue.d.ts +0 -3
- package/css/getValue.mjs +0 -2
- package/css/getValue.mjs.map +0 -7
- package/css/index.cjs +0 -2
- package/css/index.cjs.map +0 -7
- package/css/index.d.ts +0 -15
- package/css/index.mjs +0 -2
- package/css/index.mjs.map +0 -7
- package/css/types.cjs +0 -2
- package/css/types.cjs.map +0 -7
- package/css/types.mjs +0 -1
- package/css/types.mjs.map +0 -7
- package/index.cjs +0 -2
- package/index.cjs.map +0 -7
- package/index.d.ts +0 -21
- package/index.mjs +0 -2
- package/index.mjs.map +0 -7
- package/isWindow.cjs +0 -2
- package/isWindow.cjs.map +0 -7
- package/isWindow.d.ts +0 -2
- package/isWindow.mjs +0 -2
- package/isWindow.mjs.map +0 -7
- package/theme/ThemeCssVars.cjs +0 -2
- package/theme/ThemeCssVars.cjs.map +0 -7
- package/theme/ThemeCssVars.d.ts +0 -3
- package/theme/ThemeCssVars.mjs +0 -2
- package/theme/ThemeCssVars.mjs.map +0 -7
- package/theme/ThemeDefaultOptions.cjs +0 -2
- package/theme/ThemeDefaultOptions.cjs.map +0 -7
- package/theme/ThemeDefaultOptions.d.ts +0 -68
- package/theme/ThemeDefaultOptions.mjs +0 -2
- package/theme/ThemeDefaultOptions.mjs.map +0 -7
- package/theme/ThemeProvider.cjs +0 -2
- package/theme/ThemeProvider.cjs.map +0 -7
- package/theme/ThemeProvider.d.ts +0 -11
- package/theme/ThemeProvider.mjs +0 -2
- package/theme/ThemeProvider.mjs.map +0 -7
- package/theme/core.cjs +0 -2
- package/theme/core.cjs.map +0 -7
- package/theme/core.d.ts +0 -7
- package/theme/core.mjs +0 -2
- package/theme/core.mjs.map +0 -7
- package/theme/createColor.cjs +0 -2
- package/theme/createColor.cjs.map +0 -7
- package/theme/createColor.d.ts +0 -41
- package/theme/createColor.mjs +0 -2
- package/theme/createColor.mjs.map +0 -7
- package/theme/createTheme.cjs +0 -2
- package/theme/createTheme.cjs.map +0 -7
- package/theme/createTheme.d.ts +0 -2
- package/theme/createTheme.mjs +0 -2
- package/theme/createTheme.mjs.map +0 -7
- package/theme/createThemeSwitcher.cjs +0 -2
- package/theme/createThemeSwitcher.cjs.map +0 -7
- package/theme/createThemeSwitcher.d.ts +0 -6
- package/theme/createThemeSwitcher.mjs +0 -2
- package/theme/createThemeSwitcher.mjs.map +0 -7
- package/theme/index.cjs +0 -2
- package/theme/index.cjs.map +0 -7
- package/theme/index.d.ts +0 -5
- package/theme/index.mjs +0 -2
- package/theme/index.mjs.map +0 -7
- package/theme/types.cjs +0 -2
- package/theme/types.cjs.map +0 -7
- package/theme/types.mjs +0 -1
- package/theme/types.mjs.map +0 -7
- package/useAnimation.cjs +0 -2
- package/useAnimation.cjs.map +0 -7
- package/useAnimation.d.ts +0 -18
- package/useAnimation.mjs +0 -2
- package/useAnimation.mjs.map +0 -7
- package/useColorTemplate.cjs +0 -2
- package/useColorTemplate.cjs.map +0 -7
- package/useColorTemplate.d.ts +0 -4
- package/useColorTemplate.mjs +0 -2
- package/useColorTemplate.mjs.map +0 -7
- package/useInterface.cjs +0 -2
- package/useInterface.cjs.map +0 -7
- package/useInterface.d.ts +0 -2
- package/useInterface.mjs +0 -2
- package/useInterface.mjs.map +0 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BreakpointKeys, GlobalCSS } from "../css/types";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
|
|
3
|
+
export type ObjectType = { [key: string]: any }
|
|
4
|
+
|
|
5
5
|
export type ThemeColorItem = {
|
|
6
6
|
primary: string;
|
|
7
7
|
secondary: string;
|
|
@@ -14,54 +14,57 @@ export type ThemeColorItem = {
|
|
|
14
14
|
border: number;
|
|
15
15
|
borderColor: string;
|
|
16
16
|
hover: {
|
|
17
|
-
bgcolor: string
|
|
18
|
-
color: string
|
|
19
|
-
}
|
|
20
|
-
}
|
|
17
|
+
bgcolor: string,
|
|
18
|
+
color: string,
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
21
|
fill: {
|
|
22
22
|
bgcolor: string;
|
|
23
|
-
color: string
|
|
23
|
+
color: string,
|
|
24
24
|
hover: {
|
|
25
25
|
bgcolor: string;
|
|
26
26
|
color: string;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
29
|
text: {
|
|
30
30
|
bgcolor: string;
|
|
31
31
|
color: string;
|
|
32
32
|
hover: {
|
|
33
33
|
bgcolor: string;
|
|
34
34
|
color: string;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
37
|
alpha: {
|
|
38
|
-
bgcolor: string
|
|
38
|
+
bgcolor: string
|
|
39
39
|
color: string;
|
|
40
40
|
hover: {
|
|
41
41
|
bgcolor: string;
|
|
42
42
|
color: string;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
47
48
|
export type ThemeTypographyItem = {
|
|
48
49
|
fontSize: number;
|
|
49
50
|
lineHeight: number;
|
|
50
51
|
fontWeight: number;
|
|
51
|
-
}
|
|
52
|
+
}
|
|
53
|
+
|
|
52
54
|
export type ThemeColor = {
|
|
53
55
|
background: Omit<ThemeColorItem, "text">;
|
|
54
56
|
text: Omit<ThemeColorItem, "text" | "alpha" | "template">;
|
|
55
57
|
divider: string;
|
|
56
58
|
brand: ThemeColorItem;
|
|
57
59
|
accent: ThemeColorItem;
|
|
58
|
-
success: ThemeColorItem
|
|
59
|
-
info: ThemeColorItem
|
|
60
|
-
warning: ThemeColorItem
|
|
61
|
-
danger: ThemeColorItem
|
|
60
|
+
success: ThemeColorItem
|
|
61
|
+
info: ThemeColorItem
|
|
62
|
+
warning: ThemeColorItem
|
|
63
|
+
danger: ThemeColorItem
|
|
62
64
|
};
|
|
65
|
+
|
|
63
66
|
export type ThemeTypographyType = {
|
|
64
|
-
fontFamily: string
|
|
67
|
+
fontFamily: string,
|
|
65
68
|
h1: ThemeTypographyItem;
|
|
66
69
|
h2: ThemeTypographyItem;
|
|
67
70
|
h3: ThemeTypographyItem;
|
|
@@ -71,36 +74,35 @@ export type ThemeTypographyType = {
|
|
|
71
74
|
text: ThemeTypographyItem;
|
|
72
75
|
button: ThemeTypographyItem;
|
|
73
76
|
small: ThemeTypographyItem;
|
|
74
|
-
}
|
|
77
|
+
}
|
|
78
|
+
|
|
75
79
|
export interface ThemeOptions {
|
|
76
80
|
name: string;
|
|
77
81
|
rtl: boolean;
|
|
78
|
-
globalStyle: GlobalCSS
|
|
79
|
-
breakpoints: {
|
|
80
|
-
[key in BreakpointKeys]: number;
|
|
81
|
-
};
|
|
82
|
+
globalStyle: GlobalCSS,
|
|
83
|
+
breakpoints: { [key in BreakpointKeys]: number };
|
|
82
84
|
shadow: string[];
|
|
83
|
-
interfaces: {
|
|
84
|
-
[name: string]: <P extends object>(defaultProps: P, theme: ThemeOptions) => P;
|
|
85
|
-
};
|
|
85
|
+
interfaces: { [name: string]: <P extends object>(defaultProps: P, theme: ThemeOptions) => P };
|
|
86
86
|
colors: ThemeColor;
|
|
87
87
|
typography: ThemeTypographyType;
|
|
88
88
|
}
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
|
|
90
|
+
// Theme Input
|
|
91
|
+
export type ThemeColorItemInput = Partial<Omit<ThemeColorItem, "alpha">>
|
|
92
|
+
export type ThemeTypographyItemInput = Partial<ThemeTypographyItem>
|
|
91
93
|
export type ThemeColorInput = {
|
|
92
|
-
background?: Omit<ThemeColorItemInput, "text"
|
|
93
|
-
text?: Omit<ThemeColorItemInput, "text"
|
|
94
|
+
background?: Omit<ThemeColorItemInput, "text">
|
|
95
|
+
text?: Omit<ThemeColorItemInput, "text">
|
|
94
96
|
divider?: string;
|
|
95
97
|
brand?: ThemeColorItemInput;
|
|
96
98
|
accent?: ThemeColorItemInput;
|
|
97
|
-
success?: ThemeColorItemInput
|
|
98
|
-
info?: ThemeColorItemInput
|
|
99
|
-
warning?: ThemeColorItemInput
|
|
100
|
-
danger?: ThemeColorItemInput
|
|
99
|
+
success?: ThemeColorItemInput
|
|
100
|
+
info?: ThemeColorItemInput
|
|
101
|
+
warning?: ThemeColorItemInput
|
|
102
|
+
danger?: ThemeColorItemInput
|
|
101
103
|
};
|
|
102
104
|
export type ThemeTypographyInputType = {
|
|
103
|
-
fontFamily?: string
|
|
105
|
+
fontFamily?: string,
|
|
104
106
|
h1?: ThemeTypographyItemInput;
|
|
105
107
|
h2?: ThemeTypographyItemInput;
|
|
106
108
|
h3?: ThemeTypographyItemInput;
|
|
@@ -113,12 +115,67 @@ export type ThemeTypographyInputType = {
|
|
|
113
115
|
};
|
|
114
116
|
export interface ThemeOptionInput {
|
|
115
117
|
rtl?: boolean;
|
|
116
|
-
globalStyle?: GlobalCSS
|
|
117
|
-
interfaces?: {
|
|
118
|
-
[name: string]: <P extends object>(defaultProps: P, theme: ThemeOptions) => P;
|
|
119
|
-
};
|
|
118
|
+
globalStyle?: GlobalCSS,
|
|
119
|
+
interfaces?: { [name: string]: <P extends object>(defaultProps: P, theme: ThemeOptions) => P };
|
|
120
120
|
colors?: ThemeColorInput;
|
|
121
121
|
typography?: ThemeTypographyInputType;
|
|
122
122
|
}
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
|
|
124
|
+
// ============ Reference Types
|
|
125
|
+
|
|
126
|
+
export type TypographyRefTypes =
|
|
127
|
+
| "h1"
|
|
128
|
+
| "h2"
|
|
129
|
+
| "h3"
|
|
130
|
+
| "h4"
|
|
131
|
+
| "h5"
|
|
132
|
+
| "h6"
|
|
133
|
+
| "text"
|
|
134
|
+
| "button"
|
|
135
|
+
| "small"
|
|
136
|
+
|
|
137
|
+
export type ColorsRefTypes =
|
|
138
|
+
| "text"
|
|
139
|
+
| "text.primary"
|
|
140
|
+
| "text.secondary"
|
|
141
|
+
|
|
142
|
+
| "background"
|
|
143
|
+
| "background.primary"
|
|
144
|
+
| "background.secondary"
|
|
145
|
+
| "background.alpha"
|
|
146
|
+
|
|
147
|
+
| "brand"
|
|
148
|
+
| "brand.primary"
|
|
149
|
+
| "brand.secondary"
|
|
150
|
+
| "brand.alpha"
|
|
151
|
+
| "brand.text"
|
|
152
|
+
|
|
153
|
+
| "accent"
|
|
154
|
+
| "accent.primary"
|
|
155
|
+
| "accent.secondary"
|
|
156
|
+
| "accent.alpha"
|
|
157
|
+
| "accent.text"
|
|
158
|
+
|
|
159
|
+
| "info"
|
|
160
|
+
| "info.primary"
|
|
161
|
+
| "info.secondary"
|
|
162
|
+
| "info.alpha"
|
|
163
|
+
| "info.text"
|
|
164
|
+
|
|
165
|
+
| "success"
|
|
166
|
+
| "success.primary"
|
|
167
|
+
| "success.secondary"
|
|
168
|
+
| "success.alpha"
|
|
169
|
+
| "success.text"
|
|
170
|
+
|
|
171
|
+
| "warning"
|
|
172
|
+
| "warning.primary"
|
|
173
|
+
| "warning.secondary"
|
|
174
|
+
| "warning.alpha"
|
|
175
|
+
| "warning.text"
|
|
176
|
+
|
|
177
|
+
| "danger"
|
|
178
|
+
| "danger.primary"
|
|
179
|
+
| "danger.secondary"
|
|
180
|
+
| "danger.alpha"
|
|
181
|
+
| "danger.text"
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { css } from './css'
|
|
2
|
+
import { useId } from 'react'
|
|
3
|
+
import { CSSProps } from './css/types'
|
|
4
|
+
|
|
5
|
+
export const animationEases = {
|
|
6
|
+
easeInOut: "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
7
|
+
easeOut: "cubic-bezier(0.0, 0, 0.2, 1)",
|
|
8
|
+
easeIn: "cubic-bezier(0.4, 0, 1, 1)",
|
|
9
|
+
sharp: "cubic-bezier(0.4, 0, 0.6, 1)",
|
|
10
|
+
linear: "cubic-bezier(0, 0, 1, 1)",
|
|
11
|
+
easeBounceOut: "cubic-bezier(0.68, -0.55, 0.265, 1.55)"
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface UseAnimationProps {
|
|
15
|
+
delay?: number;
|
|
16
|
+
duration?: number;
|
|
17
|
+
from: CSSProps;
|
|
18
|
+
to: CSSProps;
|
|
19
|
+
ease?: keyof typeof animationEases;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const useAnimation = ({ from, to, delay, ease, duration }: UseAnimationProps) => {
|
|
23
|
+
let _delay = delay || 0;
|
|
24
|
+
let _duration = duration || 600;
|
|
25
|
+
let _ease = ease || "easeBounceOut"
|
|
26
|
+
const id = "anim" + useId().replace(/:/g, "")
|
|
27
|
+
const anim = css({
|
|
28
|
+
animationName: id,
|
|
29
|
+
animationDelay: _delay + "ms",
|
|
30
|
+
animationDuration: _duration + "ms",
|
|
31
|
+
animationTimingFunction: animationEases[_ease] || animationEases.easeBounceOut,
|
|
32
|
+
[`@keyframes ${id}`]: {
|
|
33
|
+
from: from as any,
|
|
34
|
+
to: to as any
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
return anim.classname
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export default useAnimation
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useTheme } from "./theme"
|
|
2
|
+
export type ColorTemplateColors = "default" | "brand" | "accent" | "info" | "success" | "warning" | "danger"
|
|
3
|
+
export type ColorTemplateType = "fill" | "outline" | "text" | "alpha"
|
|
4
|
+
|
|
5
|
+
const useColorTemplate = (color: ColorTemplateColors, type: ColorTemplateType) => {
|
|
6
|
+
const theme: any = useTheme()
|
|
7
|
+
let _color = color === 'default' ? "background" : color as any
|
|
8
|
+
return theme.colors[_color]?.template[type]
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default useColorTemplate
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useTheme } from "./theme"
|
|
2
|
+
|
|
3
|
+
const useInterface = <P extends object>(name: string, userPorps: P, defaultProps: P) => {
|
|
4
|
+
const theme = useTheme()
|
|
5
|
+
const _interface = theme.interfaces[name]
|
|
6
|
+
|
|
7
|
+
if (_interface) {
|
|
8
|
+
defaultProps = _interface<P>({ ...defaultProps, ...userPorps }, theme)
|
|
9
|
+
}
|
|
10
|
+
return [{ ...defaultProps, ...userPorps }, theme]
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default useInterface
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es2015", // <-- Change from "es5" to "es2015"
|
|
4
|
+
"lib": [
|
|
5
|
+
"dom",
|
|
6
|
+
"dom.iterable",
|
|
7
|
+
"esnext"
|
|
8
|
+
],
|
|
9
|
+
"allowJs": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"esModuleInterop": true,
|
|
12
|
+
"allowSyntheticDefaultImports": true,
|
|
13
|
+
"strict": true,
|
|
14
|
+
"forceConsistentCasingInFileNames": true,
|
|
15
|
+
"module": "esnext",
|
|
16
|
+
"moduleResolution": "node",
|
|
17
|
+
"resolveJsonModule": true,
|
|
18
|
+
"isolatedModules": true,
|
|
19
|
+
"noEmit": true,
|
|
20
|
+
"jsx": "react"
|
|
21
|
+
},
|
|
22
|
+
"include": [
|
|
23
|
+
"src"
|
|
24
|
+
],
|
|
25
|
+
"exclude": [
|
|
26
|
+
"node_modules"
|
|
27
|
+
]
|
|
28
|
+
}
|
package/ServerStyleTags.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var n=Object.create;var t=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var c=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty;var p=(r,a)=>{for(var e in a)t(r,e,{get:a[e],enumerable:!0})},m=(r,a,e,o)=>{if(a&&typeof a=="object"||typeof a=="function")for(let s of S(a))!f.call(r,s)&&s!==e&&t(r,s,{get:()=>a[s],enumerable:!(o=y(a,s))||o.enumerable});return r};var u=(r,a,e)=>(e=r!=null?n(c(r)):{},m(a||!r||!r.__esModule?t(e,"default",{value:r,enumerable:!0}):e,r)),d=r=>m(t({},"__esModule",{value:!0}),r);var T={};p(T,{default:()=>v});module.exports=d(T);var g=u(require("react"),1),l=require("oncss");const i=()=>Array.from(l.CSSFactory.values()).map((r,a)=>g.createElement("style",{key:r.classname+a,"data-oncss":r.classname,dangerouslySetInnerHTML:{__html:r.css}}));var v=i;
|
|
2
|
-
//# sourceMappingURL=ServerStyleTags.cjs.map
|
package/ServerStyleTags.cjs.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/ServerStyleTags.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react'\nimport { CSSFactory } from 'oncss'\n\nconst ServerStyleTags = () => {\n return Array.from(CSSFactory.values()).map((c, idx) => <style\n key={c.classname + idx}\n data-oncss={c.classname}\n dangerouslySetInnerHTML={{ __html: c.css }}\n />)\n}\n\nexport default ServerStyleTags"],
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAuB,sBACvBC,EAA2B,iBAE3B,MAAMC,EAAkB,IACb,MAAM,KAAK,aAAW,OAAO,CAAC,EAAE,IAAI,CAACC,EAAGC,IAAQJ,EAAA,cAAC,SACpD,IAAKG,EAAE,UAAYC,EACnB,aAAYD,EAAE,UACd,wBAAyB,CAAE,OAAQA,EAAE,GAAI,EAC7C,CAAE,EAGN,IAAOL,EAAQI",
|
|
6
|
-
"names": ["ServerStyleTags_exports", "__export", "ServerStyleTags_default", "__toCommonJS", "React", "import_oncss", "ServerStyleTags", "c", "idx"]
|
|
7
|
-
}
|
package/ServerStyleTags.d.ts
DELETED
package/ServerStyleTags.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import*as e from"react";import{CSSFactory as s}from"oncss";const t=()=>Array.from(s.values()).map((r,a)=>e.createElement("style",{key:r.classname+a,"data-oncss":r.classname,dangerouslySetInnerHTML:{__html:r.css}}));var m=t;export{m as default};
|
|
2
|
-
//# sourceMappingURL=ServerStyleTags.mjs.map
|
package/ServerStyleTags.mjs.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/ServerStyleTags.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react'\nimport { CSSFactory } from 'oncss'\n\nconst ServerStyleTags = () => {\n return Array.from(CSSFactory.values()).map((c, idx) => <style\n key={c.classname + idx}\n data-oncss={c.classname}\n dangerouslySetInnerHTML={{ __html: c.css }}\n />)\n}\n\nexport default ServerStyleTags"],
|
|
5
|
-
"mappings": "AAAA,UAAYA,MAAW,QACvB,OAAS,cAAAC,MAAkB,QAE3B,MAAMC,EAAkB,IACb,MAAM,KAAKD,EAAW,OAAO,CAAC,EAAE,IAAI,CAACE,EAAGC,IAAQJ,EAAA,cAAC,SACpD,IAAKG,EAAE,UAAYC,EACnB,aAAYD,EAAE,UACd,wBAAyB,CAAE,OAAQA,EAAE,GAAI,EAC7C,CAAE,EAGN,IAAOE,EAAQH",
|
|
6
|
-
"names": ["React", "CSSFactory", "ServerStyleTags", "c", "idx", "ServerStyleTags_default"]
|
|
7
|
-
}
|
package/Tag/cssPropList.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var n=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var l=(o,i)=>{for(var r in i)n(o,r,{get:i[r],enumerable:!0})},m=(o,i,r,e)=>{if(i&&typeof i=="object"||typeof i=="function")for(let t of d(i))!g.call(o,t)&&t!==r&&n(o,t,{get:()=>i[t],enumerable:!(e=a(i,t))||e.enumerable});return o};var p=o=>m(n({},"__esModule",{value:!0}),o);var f={};l(f,{default:()=>s});module.exports=p(f);const b={typography:1,bgcolor:1,bgimage:1,bg:1,p:1,pt:1,pr:1,pb:1,pl:1,px:1,py:1,m:1,mt:1,mr:1,mb:1,ml:1,mx:1,my:1,radius:1,shadow:1,flexBox:1,flexRow:1,flexColumn:1,flexWraped:1,disabled:1,spacing:1,gradient:1,alignContent:1,alignItems:1,alignSelf:1,animation:1,animationComposition:1,animationDelay:1,animationDirection:1,animationDuration:1,animationFillMode:1,animationIterationCount:1,animationName:1,animationTimingFunction:1,backdropFilter:1,background:1,backgroundAttachment:1,backgroundColor:1,backgroundImage:1,backgroundOrigin:1,backgroundPosition:1,backgroundRepeat:1,backgroundSize:1,border:1,borderBottom:1,borderBottomColor:1,borderBottomStyle:1,borderBottomWidth:1,borderColor:1,borderImage:1,borderLeft:1,borderLeftColor:1,borderLeftStyle:1,borderLeftWidth:1,borderRadius:1,borderRight:1,borderRightColor:1,borderRightStyle:1,borderRightWidth:1,borderStyle:1,borderTop:1,borderTopColor:1,borderTopLeftRadius:1,borderTopRightRadius:1,borderTopStyle:1,borderTopWidth:1,borderWidth:1,bottom:1,boxShadow:1,boxSizing:1,cursor:1,color:1,display:1,direction:1,filter:1,flex:1,flexBasis:1,flexDirection:1,flexFlow:1,flexGrow:1,flexShrink:1,flexWrap:1,float:1,fontFamily:1,fontSize:1,fontStyle:1,fontWeight:1,font:1,gap:1,grid:1,gridArea:1,gridAutoColumns:1,gridAutoFlow:1,gridAutoRows:1,gridColumn:1,gridColumnEnd:1,gridColumnGap:1,gridColumnStart:1,gridGap:1,gridRow:1,gridRowEnd:1,gridRowGap:1,gridRowStart:1,gridTemplate:1,gridTemplateAreas:1,gridTemplateColumns:1,gridTemplateRows:1,height:1,justifyContent:1,justifyItems:1,justifySelf:1,left:1,letterSpacing:1,lineBreak:1,lineHeight:1,listStyle:1,margin:1,marginBlock:1,marginBlockEnd:1,marginBlockStart:1,marginBottom:1,marginInline:1,marginInlineEnd:1,marginInlineStart:1,marginLeft:1,marginRight:1,marginTop:1,maxHeight:1,maxWidth:1,minHeight:1,minWidth:1,objectFit:1,objectPosition:1,opacity:1,order:1,outline:1,overflow:1,overflowX:1,overflowY:1,padding:1,paddingBlock:1,paddingBlockEnd:1,paddingBlockStart:1,paddingBottom:1,paddingInline:1,paddingInlineEnd:1,paddingInlineStart:1,paddingLeft:1,paddingRight:1,paddingTop:1,perspective:1,perspectiveOrigin:1,pointerEvents:1,position:1,resize:1,right:1,textAlign:1,textDecoration:1,textShadow:1,textTransform:1,top:1,transform:1,transformOrigin:1,transformStyle:1,transition:1,transitionDelay:1,transitionDuration:1,transitionProperty:1,transitionTimingFunction:1,userSelect:1,verticalAlign:1,visibility:1,whiteSpace:1,width:1,wordBreak:1,wordSpacing:1,wordWrap:1,zIndex:1};var s=b;
|
|
2
|
-
//# sourceMappingURL=cssPropList.cjs.map
|
package/Tag/cssPropList.cjs.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/Tag/cssPropList.ts"],
|
|
4
|
-
"sourcesContent": ["\nconst CSS_PROP_LIST: any = {\n typography: 1,\n bgcolor: 1,\n bgimage: 1,\n bg: 1,\n p: 1,\n pt: 1,\n pr: 1,\n pb: 1,\n pl: 1,\n px: 1,\n py: 1,\n m: 1,\n mt: 1,\n mr: 1,\n mb: 1,\n ml: 1,\n mx: 1,\n my: 1,\n radius: 1,\n shadow: 1,\n flexBox: 1,\n flexRow: 1,\n flexColumn: 1,\n flexWraped: 1,\n disabled: 1,\n spacing: 1,\n\n gradient: 1,\n\n // CSS Props\n alignContent: 1,\n alignItems: 1,\n alignSelf: 1,\n animation: 1,\n animationComposition: 1,\n animationDelay: 1,\n animationDirection: 1,\n animationDuration: 1,\n animationFillMode: 1,\n animationIterationCount: 1,\n animationName: 1,\n animationTimingFunction: 1,\n backdropFilter: 1,\n background: 1,\n backgroundAttachment: 1,\n backgroundColor: 1,\n backgroundImage: 1,\n backgroundOrigin: 1,\n backgroundPosition: 1,\n backgroundRepeat: 1,\n backgroundSize: 1,\n border: 1,\n borderBottom: 1,\n borderBottomColor: 1,\n borderBottomStyle: 1,\n borderBottomWidth: 1,\n borderColor: 1,\n borderImage: 1,\n borderLeft: 1,\n borderLeftColor: 1,\n borderLeftStyle: 1,\n borderLeftWidth: 1,\n borderRadius: 1,\n borderRight: 1,\n borderRightColor: 1,\n borderRightStyle: 1,\n borderRightWidth: 1,\n borderStyle: 1,\n borderTop: 1,\n borderTopColor: 1,\n borderTopLeftRadius: 1,\n borderTopRightRadius: 1,\n borderTopStyle: 1,\n borderTopWidth: 1,\n borderWidth: 1,\n bottom: 1,\n boxShadow: 1,\n boxSizing: 1,\n cursor: 1,\n color: 1,\n display: 1,\n direction: 1,\n filter: 1,\n flex: 1,\n flexBasis: 1,\n flexDirection: 1,\n flexFlow: 1,\n flexGrow: 1,\n flexShrink: 1,\n flexWrap: 1,\n float: 1,\n fontFamily: 1,\n fontSize: 1,\n fontStyle: 1,\n fontWeight: 1,\n font: 1,\n gap: 1,\n grid: 1,\n gridArea: 1,\n gridAutoColumns: 1,\n gridAutoFlow: 1,\n gridAutoRows: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnGap: 1,\n gridColumnStart: 1,\n gridGap: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowGap: 1,\n gridRowStart: 1,\n gridTemplate: 1,\n gridTemplateAreas: 1,\n gridTemplateColumns: 1,\n gridTemplateRows: 1,\n height: 1,\n justifyContent: 1,\n justifyItems: 1,\n justifySelf: 1,\n left: 1,\n letterSpacing: 1,\n lineBreak: 1,\n lineHeight: 1,\n listStyle: 1,\n margin: 1,\n marginBlock: 1,\n marginBlockEnd: 1,\n marginBlockStart: 1,\n marginBottom: 1,\n marginInline: 1,\n marginInlineEnd: 1,\n marginInlineStart: 1,\n marginLeft: 1,\n marginRight: 1,\n marginTop: 1,\n maxHeight: 1,\n maxWidth: 1,\n minHeight: 1,\n minWidth: 1,\n objectFit: 1,\n objectPosition: 1,\n opacity: 1,\n order: 1,\n outline: 1,\n overflow: 1,\n overflowX: 1,\n overflowY: 1,\n padding: 1,\n paddingBlock: 1,\n paddingBlockEnd: 1,\n paddingBlockStart: 1,\n paddingBottom: 1,\n paddingInline: 1,\n paddingInlineEnd: 1,\n paddingInlineStart: 1,\n paddingLeft: 1,\n paddingRight: 1,\n paddingTop: 1,\n perspective: 1,\n perspectiveOrigin: 1,\n pointerEvents: 1,\n position: 1,\n resize: 1,\n right: 1,\n textAlign: 1,\n textDecoration: 1,\n textShadow: 1,\n textTransform: 1,\n top: 1,\n transform: 1,\n transformOrigin: 1,\n transformStyle: 1,\n transition: 1,\n transitionDelay: 1,\n transitionDuration: 1,\n transitionProperty: 1,\n transitionTimingFunction: 1,\n userSelect: 1,\n verticalAlign: 1,\n visibility: 1,\n whiteSpace: 1,\n width: 1,\n wordBreak: 1,\n wordSpacing: 1,\n wordWrap: 1,\n zIndex: 1,\n}\n\nexport default CSS_PROP_LIST"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GACA,MAAMI,EAAqB,CACvB,WAAY,EACZ,QAAS,EACT,QAAS,EACT,GAAI,EACJ,EAAG,EACH,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,EAAG,EACH,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,OAAQ,EACR,OAAQ,EACR,QAAS,EACT,QAAS,EACT,WAAY,EACZ,WAAY,EACZ,SAAU,EACV,QAAS,EAET,SAAU,EAGV,aAAc,EACd,WAAY,EACZ,UAAW,EACX,UAAW,EACX,qBAAsB,EACtB,eAAgB,EAChB,mBAAoB,EACpB,kBAAmB,EACnB,kBAAmB,EACnB,wBAAyB,EACzB,cAAe,EACf,wBAAyB,EACzB,eAAgB,EAChB,WAAY,EACZ,qBAAsB,EACtB,gBAAiB,EACjB,gBAAiB,EACjB,iBAAkB,EAClB,mBAAoB,EACpB,iBAAkB,EAClB,eAAgB,EAChB,OAAQ,EACR,aAAc,EACd,kBAAmB,EACnB,kBAAmB,EACnB,kBAAmB,EACnB,YAAa,EACb,YAAa,EACb,WAAY,EACZ,gBAAiB,EACjB,gBAAiB,EACjB,gBAAiB,EACjB,aAAc,EACd,YAAa,EACb,iBAAkB,EAClB,iBAAkB,EAClB,iBAAkB,EAClB,YAAa,EACb,UAAW,EACX,eAAgB,EAChB,oBAAqB,EACrB,qBAAsB,EACtB,eAAgB,EAChB,eAAgB,EAChB,YAAa,EACb,OAAQ,EACR,UAAW,EACX,UAAW,EACX,OAAQ,EACR,MAAO,EACP,QAAS,EACT,UAAW,EACX,OAAQ,EACR,KAAM,EACN,UAAW,EACX,cAAe,EACf,SAAU,EACV,SAAU,EACV,WAAY,EACZ,SAAU,EACV,MAAO,EACP,WAAY,EACZ,SAAU,EACV,UAAW,EACX,WAAY,EACZ,KAAM,EACN,IAAK,EACL,KAAM,EACN,SAAU,EACV,gBAAiB,EACjB,aAAc,EACd,aAAc,EACd,WAAY,EACZ,cAAe,EACf,cAAe,EACf,gBAAiB,EACjB,QAAS,EACT,QAAS,EACT,WAAY,EACZ,WAAY,EACZ,aAAc,EACd,aAAc,EACd,kBAAmB,EACnB,oBAAqB,EACrB,iBAAkB,EAClB,OAAQ,EACR,eAAgB,EAChB,aAAc,EACd,YAAa,EACb,KAAM,EACN,cAAe,EACf,UAAW,EACX,WAAY,EACZ,UAAW,EACX,OAAQ,EACR,YAAa,EACb,eAAgB,EAChB,iBAAkB,EAClB,aAAc,EACd,aAAc,EACd,gBAAiB,EACjB,kBAAmB,EACnB,WAAY,EACZ,YAAa,EACb,UAAW,EACX,UAAW,EACX,SAAU,EACV,UAAW,EACX,SAAU,EACV,UAAW,EACX,eAAgB,EAChB,QAAS,EACT,MAAO,EACP,QAAS,EACT,SAAU,EACV,UAAW,EACX,UAAW,EACX,QAAS,EACT,aAAc,EACd,gBAAiB,EACjB,kBAAmB,EACnB,cAAe,EACf,cAAe,EACf,iBAAkB,EAClB,mBAAoB,EACpB,YAAa,EACb,aAAc,EACd,WAAY,EACZ,YAAa,EACb,kBAAmB,EACnB,cAAe,EACf,SAAU,EACV,OAAQ,EACR,MAAO,EACP,UAAW,EACX,eAAgB,EAChB,WAAY,EACZ,cAAe,EACf,IAAK,EACL,UAAW,EACX,gBAAiB,EACjB,eAAgB,EAChB,WAAY,EACZ,gBAAiB,EACjB,mBAAoB,EACpB,mBAAoB,EACpB,yBAA0B,EAC1B,WAAY,EACZ,cAAe,EACf,WAAY,EACZ,WAAY,EACZ,MAAO,EACP,UAAW,EACX,YAAa,EACb,SAAU,EACV,OAAQ,CACZ,EAEA,IAAOF,EAAQE",
|
|
6
|
-
"names": ["cssPropList_exports", "__export", "cssPropList_default", "__toCommonJS", "CSS_PROP_LIST"]
|
|
7
|
-
}
|
package/Tag/cssPropList.d.ts
DELETED
package/Tag/cssPropList.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const i={typography:1,bgcolor:1,bgimage:1,bg:1,p:1,pt:1,pr:1,pb:1,pl:1,px:1,py:1,m:1,mt:1,mr:1,mb:1,ml:1,mx:1,my:1,radius:1,shadow:1,flexBox:1,flexRow:1,flexColumn:1,flexWraped:1,disabled:1,spacing:1,gradient:1,alignContent:1,alignItems:1,alignSelf:1,animation:1,animationComposition:1,animationDelay:1,animationDirection:1,animationDuration:1,animationFillMode:1,animationIterationCount:1,animationName:1,animationTimingFunction:1,backdropFilter:1,background:1,backgroundAttachment:1,backgroundColor:1,backgroundImage:1,backgroundOrigin:1,backgroundPosition:1,backgroundRepeat:1,backgroundSize:1,border:1,borderBottom:1,borderBottomColor:1,borderBottomStyle:1,borderBottomWidth:1,borderColor:1,borderImage:1,borderLeft:1,borderLeftColor:1,borderLeftStyle:1,borderLeftWidth:1,borderRadius:1,borderRight:1,borderRightColor:1,borderRightStyle:1,borderRightWidth:1,borderStyle:1,borderTop:1,borderTopColor:1,borderTopLeftRadius:1,borderTopRightRadius:1,borderTopStyle:1,borderTopWidth:1,borderWidth:1,bottom:1,boxShadow:1,boxSizing:1,cursor:1,color:1,display:1,direction:1,filter:1,flex:1,flexBasis:1,flexDirection:1,flexFlow:1,flexGrow:1,flexShrink:1,flexWrap:1,float:1,fontFamily:1,fontSize:1,fontStyle:1,fontWeight:1,font:1,gap:1,grid:1,gridArea:1,gridAutoColumns:1,gridAutoFlow:1,gridAutoRows:1,gridColumn:1,gridColumnEnd:1,gridColumnGap:1,gridColumnStart:1,gridGap:1,gridRow:1,gridRowEnd:1,gridRowGap:1,gridRowStart:1,gridTemplate:1,gridTemplateAreas:1,gridTemplateColumns:1,gridTemplateRows:1,height:1,justifyContent:1,justifyItems:1,justifySelf:1,left:1,letterSpacing:1,lineBreak:1,lineHeight:1,listStyle:1,margin:1,marginBlock:1,marginBlockEnd:1,marginBlockStart:1,marginBottom:1,marginInline:1,marginInlineEnd:1,marginInlineStart:1,marginLeft:1,marginRight:1,marginTop:1,maxHeight:1,maxWidth:1,minHeight:1,minWidth:1,objectFit:1,objectPosition:1,opacity:1,order:1,outline:1,overflow:1,overflowX:1,overflowY:1,padding:1,paddingBlock:1,paddingBlockEnd:1,paddingBlockStart:1,paddingBottom:1,paddingInline:1,paddingInlineEnd:1,paddingInlineStart:1,paddingLeft:1,paddingRight:1,paddingTop:1,perspective:1,perspectiveOrigin:1,pointerEvents:1,position:1,resize:1,right:1,textAlign:1,textDecoration:1,textShadow:1,textTransform:1,top:1,transform:1,transformOrigin:1,transformStyle:1,transition:1,transitionDelay:1,transitionDuration:1,transitionProperty:1,transitionTimingFunction:1,userSelect:1,verticalAlign:1,visibility:1,whiteSpace:1,width:1,wordBreak:1,wordSpacing:1,wordWrap:1,zIndex:1};var o=i;export{o as default};
|
|
2
|
-
//# sourceMappingURL=cssPropList.mjs.map
|
package/Tag/cssPropList.mjs.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/Tag/cssPropList.ts"],
|
|
4
|
-
"sourcesContent": ["\nconst CSS_PROP_LIST: any = {\n typography: 1,\n bgcolor: 1,\n bgimage: 1,\n bg: 1,\n p: 1,\n pt: 1,\n pr: 1,\n pb: 1,\n pl: 1,\n px: 1,\n py: 1,\n m: 1,\n mt: 1,\n mr: 1,\n mb: 1,\n ml: 1,\n mx: 1,\n my: 1,\n radius: 1,\n shadow: 1,\n flexBox: 1,\n flexRow: 1,\n flexColumn: 1,\n flexWraped: 1,\n disabled: 1,\n spacing: 1,\n\n gradient: 1,\n\n // CSS Props\n alignContent: 1,\n alignItems: 1,\n alignSelf: 1,\n animation: 1,\n animationComposition: 1,\n animationDelay: 1,\n animationDirection: 1,\n animationDuration: 1,\n animationFillMode: 1,\n animationIterationCount: 1,\n animationName: 1,\n animationTimingFunction: 1,\n backdropFilter: 1,\n background: 1,\n backgroundAttachment: 1,\n backgroundColor: 1,\n backgroundImage: 1,\n backgroundOrigin: 1,\n backgroundPosition: 1,\n backgroundRepeat: 1,\n backgroundSize: 1,\n border: 1,\n borderBottom: 1,\n borderBottomColor: 1,\n borderBottomStyle: 1,\n borderBottomWidth: 1,\n borderColor: 1,\n borderImage: 1,\n borderLeft: 1,\n borderLeftColor: 1,\n borderLeftStyle: 1,\n borderLeftWidth: 1,\n borderRadius: 1,\n borderRight: 1,\n borderRightColor: 1,\n borderRightStyle: 1,\n borderRightWidth: 1,\n borderStyle: 1,\n borderTop: 1,\n borderTopColor: 1,\n borderTopLeftRadius: 1,\n borderTopRightRadius: 1,\n borderTopStyle: 1,\n borderTopWidth: 1,\n borderWidth: 1,\n bottom: 1,\n boxShadow: 1,\n boxSizing: 1,\n cursor: 1,\n color: 1,\n display: 1,\n direction: 1,\n filter: 1,\n flex: 1,\n flexBasis: 1,\n flexDirection: 1,\n flexFlow: 1,\n flexGrow: 1,\n flexShrink: 1,\n flexWrap: 1,\n float: 1,\n fontFamily: 1,\n fontSize: 1,\n fontStyle: 1,\n fontWeight: 1,\n font: 1,\n gap: 1,\n grid: 1,\n gridArea: 1,\n gridAutoColumns: 1,\n gridAutoFlow: 1,\n gridAutoRows: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnGap: 1,\n gridColumnStart: 1,\n gridGap: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowGap: 1,\n gridRowStart: 1,\n gridTemplate: 1,\n gridTemplateAreas: 1,\n gridTemplateColumns: 1,\n gridTemplateRows: 1,\n height: 1,\n justifyContent: 1,\n justifyItems: 1,\n justifySelf: 1,\n left: 1,\n letterSpacing: 1,\n lineBreak: 1,\n lineHeight: 1,\n listStyle: 1,\n margin: 1,\n marginBlock: 1,\n marginBlockEnd: 1,\n marginBlockStart: 1,\n marginBottom: 1,\n marginInline: 1,\n marginInlineEnd: 1,\n marginInlineStart: 1,\n marginLeft: 1,\n marginRight: 1,\n marginTop: 1,\n maxHeight: 1,\n maxWidth: 1,\n minHeight: 1,\n minWidth: 1,\n objectFit: 1,\n objectPosition: 1,\n opacity: 1,\n order: 1,\n outline: 1,\n overflow: 1,\n overflowX: 1,\n overflowY: 1,\n padding: 1,\n paddingBlock: 1,\n paddingBlockEnd: 1,\n paddingBlockStart: 1,\n paddingBottom: 1,\n paddingInline: 1,\n paddingInlineEnd: 1,\n paddingInlineStart: 1,\n paddingLeft: 1,\n paddingRight: 1,\n paddingTop: 1,\n perspective: 1,\n perspectiveOrigin: 1,\n pointerEvents: 1,\n position: 1,\n resize: 1,\n right: 1,\n textAlign: 1,\n textDecoration: 1,\n textShadow: 1,\n textTransform: 1,\n top: 1,\n transform: 1,\n transformOrigin: 1,\n transformStyle: 1,\n transition: 1,\n transitionDelay: 1,\n transitionDuration: 1,\n transitionProperty: 1,\n transitionTimingFunction: 1,\n userSelect: 1,\n verticalAlign: 1,\n visibility: 1,\n whiteSpace: 1,\n width: 1,\n wordBreak: 1,\n wordSpacing: 1,\n wordWrap: 1,\n zIndex: 1,\n}\n\nexport default CSS_PROP_LIST"],
|
|
5
|
-
"mappings": "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",
|
|
6
|
-
"names": ["CSS_PROP_LIST", "cssPropList_default"]
|
|
7
|
-
}
|
package/Tag/index.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var f=Object.create;var p=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var c=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty;var i=(o,e)=>{for(var r in e)p(o,r,{get:e[r],enumerable:!0})},n=(o,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of R(e))!d.call(o,t)&&t!==r&&p(o,t,{get:()=>e[t],enumerable:!(a=g(e,t))||a.enumerable});return o};var T=(o,e,r)=>(r=o!=null?f(c(o)):{},n(e||!o||!o.__esModule?p(r,"default",{value:o,enumerable:!0}):r,o)),y=o=>n(p({},"__esModule",{value:!0}),o);var l={};i(l,{default:()=>P});module.exports=y(l);var m=T(require("react"),1),s=T(require("./useTagProps"),1);const u=m.forwardRef(({component:o,children:e,...r},a)=>{const t=(0,s.default)(r);return t.ref=a,m.createElement(o||"div",t,e)});var P=u;
|
|
2
|
-
//# sourceMappingURL=index.cjs.map
|
package/Tag/index.cjs.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/Tag/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react'\nimport { TagComponentType, TagPropsRoot } from './types';\nimport useTagProps from './useTagProps';\n\nconst Tag = React.forwardRef(<T extends TagComponentType = 'div'>({ component, children, ...rest }: TagPropsRoot<T>, ref: React.Ref<any>) => {\n const props: any = useTagProps(rest)\n props.ref = ref\n return React.createElement(component || \"div\", props, children)\n})\n\nexport default Tag"],
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAuB,sBAEvBC,EAAwB,8BAExB,MAAMC,EAAMF,EAAM,WAAW,CAAqC,CAAE,UAAAG,EAAW,SAAAC,EAAU,GAAGC,CAAK,EAAoBC,IAAwB,CACzI,MAAMC,KAAa,EAAAC,SAAYH,CAAI,EACnC,OAAAE,EAAM,IAAMD,EACLN,EAAM,cAAcG,GAAa,MAAOI,EAAOH,CAAQ,CAClE,CAAC,EAED,IAAON,EAAQI",
|
|
6
|
-
"names": ["Tag_exports", "__export", "Tag_default", "__toCommonJS", "React", "import_useTagProps", "Tag", "component", "children", "rest", "ref", "props", "useTagProps"]
|
|
7
|
-
}
|
package/Tag/index.d.ts
DELETED
package/Tag/index.mjs
DELETED
package/Tag/index.mjs.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/Tag/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react'\nimport { TagComponentType, TagPropsRoot } from './types';\nimport useTagProps from './useTagProps';\n\nconst Tag = React.forwardRef(<T extends TagComponentType = 'div'>({ component, children, ...rest }: TagPropsRoot<T>, ref: React.Ref<any>) => {\n const props: any = useTagProps(rest)\n props.ref = ref\n return React.createElement(component || \"div\", props, children)\n})\n\nexport default Tag"],
|
|
5
|
-
"mappings": "AAAA,UAAYA,MAAW,QAEvB,OAAOC,MAAiB,gBAExB,MAAMC,EAAMF,EAAM,WAAW,CAAqC,CAAE,UAAAG,EAAW,SAAAC,EAAU,GAAGC,CAAK,EAAoBC,IAAwB,CACzI,MAAMC,EAAaN,EAAYI,CAAI,EACnC,OAAAE,EAAM,IAAMD,EACLN,EAAM,cAAcG,GAAa,MAAOI,EAAOH,CAAQ,CAClE,CAAC,EAED,IAAOI,EAAQN",
|
|
6
|
-
"names": ["React", "useTagProps", "Tag", "component", "children", "rest", "ref", "props", "Tag_default"]
|
|
7
|
-
}
|
package/Tag/types.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var r=Object.defineProperty;var t=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var n=(a,e,i,S)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of l(e))!p.call(a,o)&&o!==i&&r(a,o,{get:()=>e[o],enumerable:!(S=t(e,o))||S.enumerable});return a};var y=a=>n(r({},"__esModule",{value:!0}),a);var T={};module.exports=y(T);
|
|
2
|
-
//# sourceMappingURL=types.cjs.map
|
package/Tag/types.cjs.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/Tag/types.ts"],
|
|
4
|
-
"sourcesContent": ["import * as CSS from 'csstype'\nimport { Aliases, BreakpointKeys, CSSProps, CSSValueType } from \"../css/types\"\nimport { ColorsRefTypes, TypographyRefTypes } from '../theme/types';\nimport { classNamesTypes } from 'pretty-class'\n\nexport type TagComponentType = keyof React.JSX.IntrinsicElements | React.ComponentType<any>\nexport type TagProps<T extends TagComponentType = 'div'> = Omit<React.HTMLProps<T>, 'width' | 'height'> & {\n component?: T;\n children?: React.ReactNode;\n ref?: any;\n} & CSSPropAsAttr\n\nexport type TagPropsRoot<T extends TagComponentType = 'div'> = TagProps<T> & {\n sxr?: CSSProps\n}\n\n\ninterface TagCSSProperties {\n alignContent: CSSValueType<\"alignContent\">;\n alignItems: CSSValueType<\"alignItems\">;\n alignSelf: CSSValueType<\"alignSelf\">;\n animation: CSSValueType<\"animation\">;\n animationComposition: CSSValueType<\"animationComposition\">;\n animationDelay: CSSValueType<\"animationDelay\">;\n animationDirection: CSSValueType<\"animationDirection\">;\n animationDuration: CSSValueType<\"animationDuration\">;\n animationFillMode: CSSValueType<\"animationFillMode\">;\n animationIterationCount: CSSValueType<\"animationIterationCount\">;\n animationName: CSSValueType<\"animationName\">;\n animationTimingFunction: CSSValueType<\"animationTimingFunction\">;\n backdropFilter: CSSValueType<\"backdropFilter\">;\n background: CSSValueType<\"background\"> | ColorsRefTypes;\n backgroundAttachment: CSSValueType<\"backgroundAttachment\">;\n backgroundColor: CSSValueType<\"backgroundColor\"> | ColorsRefTypes;\n backgroundImage: CSSValueType<\"backgroundImage\">;\n backgroundOrigin: CSSValueType<\"backgroundOrigin\">;\n backgroundPosition: CSSValueType<\"backgroundPosition\">;\n backgroundRepeat: CSSValueType<\"backgroundRepeat\">;\n backgroundSize: CSSValueType<\"backgroundSize\">;\n border: CSSValueType<\"border\">;\n borderBottom: CSSValueType<\"borderBottom\">;\n borderBottomColor: CSSValueType<\"borderBottomColor\"> | ColorsRefTypes;\n borderBottomStyle: CSSValueType<\"borderBottomStyle\">;\n borderBottomWidth: CSSValueType<\"borderBottomWidth\">;\n borderColor: CSS.Properties['borderColor'] | ColorsRefTypes;\n borderImage: CSSValueType<\"borderImage\">;\n borderLeft: CSSValueType<\"borderLeft\">;\n borderLeftColor: CSSValueType<\"borderLeftColor\"> | ColorsRefTypes;\n borderLeftStyle: CSSValueType<\"borderLeftStyle\">;\n borderLeftWidth: CSSValueType<\"borderLeftWidth\">;\n borderRadius: CSSValueType<\"borderRadius\">;\n borderRight: CSSValueType<\"borderRight\">;\n borderRightColor: CSSValueType<\"borderRightColor\"> | ColorsRefTypes;\n borderRightStyle: CSSValueType<\"borderRightStyle\">;\n borderRightWidth: CSSValueType<\"borderRightWidth\">;\n borderStyle: CSSValueType<\"borderStyle\">;\n borderTop: CSSValueType<\"borderTop\">;\n borderTopColor: CSSValueType<\"borderTopColor\"> | ColorsRefTypes;\n borderTopLeftRadius: CSSValueType<\"borderTopLeftRadius\">;\n borderTopRightRadius: CSSValueType<\"borderTopRightRadius\">;\n borderTopStyle: CSSValueType<\"borderTopStyle\">;\n borderTopWidth: CSSValueType<\"borderTopWidth\">;\n borderWidth: CSSValueType<\"borderWidth\">;\n bottom: CSSValueType<\"bottom\">;\n boxShadow: CSSValueType<\"boxShadow\"> | number;\n boxSizing: CSSValueType<\"boxSizing\">;\n cursor: CSSValueType<\"cursor\">;\n color: CSS.Properties['color'] | ColorsRefTypes;\n display: CSSValueType<\"display\">;\n direction: \"row\" | \"column\" | CSSValueType<\"direction\">;\n filter: CSSValueType<\"filter\">;\n flex: CSSValueType<\"flex\">;\n flexBasis: CSSValueType<\"flexBasis\">;\n flexDirection: CSSValueType<\"flexDirection\">;\n flexFlow: CSSValueType<\"flexFlow\">;\n flexGrow: CSSValueType<\"flexGrow\">;\n flexShrink: CSSValueType<\"flexShrink\">;\n flexWrap: CSSValueType<\"flexWrap\">;\n float: CSSValueType<\"float\">;\n fontFamily: CSSValueType<\"fontFamily\"> | \"default\";\n fontSize: CSSValueType<\"fontSize\"> | TypographyRefTypes;\n fontStyle: CSSValueType<\"fontStyle\">;\n fontWeight: CSSValueType<\"fontWeight\"> | TypographyRefTypes;\n font: CSSValueType<\"font\"> | TypographyRefTypes;\n gap: CSSValueType<\"gap\">;\n grid: CSSValueType<\"grid\">;\n gridArea: CSSValueType<\"gridArea\">;\n gridAutoColumns: CSSValueType<\"gridAutoColumns\">;\n gridAutoFlow: CSSValueType<\"gridAutoFlow\">;\n gridAutoRows: CSSValueType<\"gridAutoRows\">;\n gridColumn: CSSValueType<\"gridColumn\">;\n gridColumnEnd: CSSValueType<\"gridColumnEnd\">;\n gridColumnGap: CSSValueType<\"gridColumnGap\">;\n gridColumnStart: CSSValueType<\"gridColumnStart\">;\n gridGap: CSSValueType<\"gridGap\">;\n gridRow: CSSValueType<\"gridRow\">;\n gridRowEnd: CSSValueType<\"gridRowEnd\">;\n gridRowGap: CSSValueType<\"gridRowGap\">;\n gridRowStart: CSSValueType<\"gridRowStart\">;\n gridTemplate: CSSValueType<\"gridTemplate\">;\n gridTemplateAreas: CSSValueType<\"gridTemplateAreas\">;\n gridTemplateColumns: CSSValueType<\"gridTemplateColumns\">;\n gridTemplateRows: CSSValueType<\"gridTemplateRows\">;\n height: CSSValueType<\"height\">;\n justifyContent: CSSValueType<\"justifyContent\">;\n justifyItems: CSSValueType<\"justifyItems\">;\n justifySelf: CSSValueType<\"justifySelf\">;\n left: CSSValueType<\"left\">;\n letterSpacing: CSSValueType<\"letterSpacing\">;\n lineBreak: CSSValueType<\"lineBreak\">;\n lineHeight: CSSValueType<\"lineHeight\"> | TypographyRefTypes;\n listStyle: CSSValueType<\"listStyle\">;\n margin: CSSValueType<\"margin\">;\n marginBlock: CSSValueType<\"marginBlock\">;\n marginBlockEnd: CSSValueType<\"marginBlockEnd\">;\n marginBlockStart: CSSValueType<\"marginBlockStart\">;\n marginBottom: CSSValueType<\"marginBottom\">;\n marginInline: CSSValueType<\"marginInline\">;\n marginInlineEnd: CSSValueType<\"marginInlineEnd\">;\n marginInlineStart: CSSValueType<\"marginInlineStart\">;\n marginLeft: CSSValueType<\"marginLeft\">;\n marginRight: CSSValueType<\"marginRight\">;\n marginTop: CSSValueType<\"marginTop\">;\n maxHeight: CSSValueType<\"maxHeight\">;\n maxWidth: CSSValueType<\"maxWidth\"> | BreakpointKeys;\n minHeight: CSSValueType<\"minHeight\">;\n minWidth: CSSValueType<\"minWidth\"> | BreakpointKeys;\n objectFit: CSSValueType<\"objectFit\">;\n objectPosition: CSSValueType<\"objectPosition\">;\n opacity: CSSValueType<\"opacity\">;\n order: CSSValueType<\"order\">;\n outline: CSSValueType<\"outline\">;\n overflow: CSSValueType<\"overflow\">;\n overflowX: CSSValueType<\"overflowX\">;\n overflowY: CSSValueType<\"overflowY\">;\n padding: CSSValueType<\"padding\">;\n paddingBlock: CSSValueType<\"paddingBlock\">;\n paddingBlockEnd: CSSValueType<\"paddingBlockEnd\">;\n paddingBlockStart: CSSValueType<\"paddingBlockStart\">;\n paddingBottom: CSSValueType<\"paddingBottom\">;\n paddingInline: CSSValueType<\"paddingInline\">;\n paddingInlineEnd: CSSValueType<\"paddingInlineEnd\">;\n paddingInlineStart: CSSValueType<\"paddingInlineStart\">;\n paddingLeft: CSSValueType<\"paddingLeft\">;\n paddingRight: CSSValueType<\"paddingRight\">;\n paddingTop: CSSValueType<\"paddingTop\">;\n perspective: CSSValueType<\"perspective\">;\n perspectiveOrigin: CSSValueType<\"perspectiveOrigin\">;\n pointerEvents: CSSValueType<\"pointerEvents\">;\n position: CSSValueType<\"position\">;\n right: CSSValueType<\"right\">;\n textAlign: CSSValueType<\"textAlign\">;\n textDecoration: CSSValueType<\"textDecoration\">;\n textShadow: CSSValueType<\"textShadow\">;\n textTransform: CSSValueType<\"textTransform\">;\n top: CSSValueType<\"top\">;\n transform: CSSValueType<\"transform\">;\n transformOrigin: CSSValueType<\"transformOrigin\">;\n transformStyle: CSSValueType<\"transformStyle\">;\n transition: CSSValueType<\"transition\">;\n transitionDelay: CSSValueType<\"transitionDelay\">;\n transitionDuration: CSSValueType<\"transitionDuration\">;\n transitionProperty: CSSValueType<\"transitionProperty\">;\n transitionTimingFunction: CSSValueType<\"transitionTimingFunction\">;\n translate: CSSValueType<\"translate\">;\n userSelect: CSSValueType<\"userSelect\">;\n verticalAlign: CSSValueType<\"verticalAlign\">;\n visibility: CSSValueType<\"visibility\">;\n whiteSpace: CSSValueType<\"whiteSpace\">;\n width: CSSValueType<\"width\"> | BreakpointKeys;\n wordBreak: CSSValueType<\"wordBreak\">;\n wordSpacing: CSSValueType<\"wordSpacing\">;\n wordWrap: CSSValueType<\"wordWrap\">;\n zIndex: CSSValueType<\"zIndex\">;\n}\n\nexport type CSSPropAsAttr = Partial<TagCSSProperties> & Aliases & {\n baseClass?: string;\n sx?: CSSProps;\n hover?: CSSProps;\n disabled?: boolean;\n classNames?: classNamesTypes;\n}"],
|
|
5
|
-
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
-
"names": ["types_exports", "__toCommonJS"]
|
|
7
|
-
}
|
package/Tag/types.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=types.mjs.map
|
package/Tag/types.mjs.map
DELETED
package/Tag/useTagProps.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var d=Object.create;var t=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,x=Object.prototype.hasOwnProperty;var _=(s,o)=>{for(var a in o)t(s,a,{get:o[a],enumerable:!0})},i=(s,o,a,p)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of N(o))!x.call(s,e)&&e!==a&&t(s,e,{get:()=>o[e],enumerable:!(p=u(o,e))||p.enumerable});return s};var v=(s,o,a)=>(a=s!=null?d(k(s)):{},i(o||!s||!s.__esModule?t(a,"default",{value:s,enumerable:!0}):a,s)),R=s=>i(t({},"__esModule",{value:!0}),s);var h={};_(h,{default:()=>L});module.exports=R(h);var l=v(require("./cssPropList"),1),y=require("../css"),f=require("pretty-class");const C=({sxr:s,sx:o,baseClass:a,classNames:p,hover:e,...n})=>{let T={...s,...o,...n};e&&(T["&:hover"]=e);const m=(0,y.css)(T,{skipProps:(r,j,g)=>g===1&&!l.default[r]});let P=m.skiped[m.classname]||[];const c={};for(let r of P)c[r]=n[r];return c.className=(0,f.classNames)([a?"xui-"+a:"",m.classname,n.className,...p||[]]),c};var L=C;
|
|
2
|
-
//# sourceMappingURL=useTagProps.cjs.map
|
package/Tag/useTagProps.cjs.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/Tag/useTagProps.ts"],
|
|
4
|
-
"sourcesContent": ["import { TagComponentType, TagProps, TagPropsRoot } from './types';\nimport cssPropList from './cssPropList';\nimport { css } from '../css';\nimport { classNames } from 'pretty-class';\n\nconst useTagProps = <T extends TagComponentType = \"div\">({ sxr, sx, baseClass, classNames: clses, hover, ...props }: TagPropsRoot<T>): TagProps<T> => {\n let _css: any = { ...sxr, ...sx, ...props }\n if (hover) _css['&:hover'] = hover\n const style = css(_css, {\n skipProps: (prop, _val, dept): any => dept === 1 && !cssPropList[prop]\n })\n\n let skipProps = style.skiped[style.classname as any] || []\n const _props: any = {};\n for (let prop of skipProps) {\n _props[prop] = (props as any)[prop]\n }\n _props.className = classNames([\n baseClass ? \"xui-\" + baseClass : \"\",\n style.classname,\n props.className,\n ...(clses as any || []),\n ])\n return _props\n}\n\n\nexport default useTagProps"],
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GACA,IAAAI,EAAwB,8BACxBC,EAAoB,kBACpBC,EAA2B,wBAE3B,MAAMC,EAAc,CAAqC,CAAE,IAAAC,EAAK,GAAAC,EAAI,UAAAC,EAAW,WAAYC,EAAO,MAAAC,EAAO,GAAGC,CAAM,IAAoC,CACnJ,IAAIC,EAAY,CAAE,GAAGN,EAAK,GAAGC,EAAI,GAAGI,CAAM,EACtCD,IAAOE,EAAK,SAAS,EAAIF,GAC7B,MAAMG,KAAQ,OAAID,EAAM,CACrB,UAAW,CAACE,EAAMC,EAAMC,IAAcA,IAAS,GAAK,CAAC,EAAAC,QAAYH,CAAI,CACxE,CAAC,EAED,IAAII,EAAYL,EAAM,OAAOA,EAAM,SAAgB,GAAK,CAAC,EACzD,MAAMM,EAAc,CAAC,EACrB,QAASL,KAAQI,EACdC,EAAOL,CAAI,EAAKH,EAAcG,CAAI,EAErC,OAAAK,EAAO,aAAY,cAAW,CAC3BX,EAAY,OAASA,EAAY,GACjCK,EAAM,UACNF,EAAM,UACN,GAAIF,GAAgB,CAAC,CACxB,CAAC,EACMU,CACV,EAGA,IAAOnB,EAAQK",
|
|
6
|
-
"names": ["useTagProps_exports", "__export", "useTagProps_default", "__toCommonJS", "import_cssPropList", "import_css", "import_pretty_class", "useTagProps", "sxr", "sx", "baseClass", "clses", "hover", "props", "_css", "style", "prop", "_val", "dept", "cssPropList", "skipProps", "_props"]
|
|
7
|
-
}
|
package/Tag/useTagProps.d.ts
DELETED
package/Tag/useTagProps.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import l from"./cssPropList";import{css as y}from"../css";import{classNames as f}from"pretty-class";const P=({sxr:n,sx:m,baseClass:p,classNames:c,hover:r,...o})=>{let t={...n,...m,...o};r&&(t["&:hover"]=r);const a=y(t,{skipProps:(s,g,i)=>i===1&&!l[s]});let T=a.skiped[a.classname]||[];const e={};for(let s of T)e[s]=o[s];return e.className=f([p?"xui-"+p:"",a.classname,o.className,...c||[]]),e};var R=P;export{R as default};
|
|
2
|
-
//# sourceMappingURL=useTagProps.mjs.map
|
package/Tag/useTagProps.mjs.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/Tag/useTagProps.ts"],
|
|
4
|
-
"sourcesContent": ["import { TagComponentType, TagProps, TagPropsRoot } from './types';\nimport cssPropList from './cssPropList';\nimport { css } from '../css';\nimport { classNames } from 'pretty-class';\n\nconst useTagProps = <T extends TagComponentType = \"div\">({ sxr, sx, baseClass, classNames: clses, hover, ...props }: TagPropsRoot<T>): TagProps<T> => {\n let _css: any = { ...sxr, ...sx, ...props }\n if (hover) _css['&:hover'] = hover\n const style = css(_css, {\n skipProps: (prop, _val, dept): any => dept === 1 && !cssPropList[prop]\n })\n\n let skipProps = style.skiped[style.classname as any] || []\n const _props: any = {};\n for (let prop of skipProps) {\n _props[prop] = (props as any)[prop]\n }\n _props.className = classNames([\n baseClass ? \"xui-\" + baseClass : \"\",\n style.classname,\n props.className,\n ...(clses as any || []),\n ])\n return _props\n}\n\n\nexport default useTagProps"],
|
|
5
|
-
"mappings": "AACA,OAAOA,MAAiB,gBACxB,OAAS,OAAAC,MAAW,SACpB,OAAS,cAAAC,MAAkB,eAE3B,MAAMC,EAAc,CAAqC,CAAE,IAAAC,EAAK,GAAAC,EAAI,UAAAC,EAAW,WAAYC,EAAO,MAAAC,EAAO,GAAGC,CAAM,IAAoC,CACnJ,IAAIC,EAAY,CAAE,GAAGN,EAAK,GAAGC,EAAI,GAAGI,CAAM,EACtCD,IAAOE,EAAK,SAAS,EAAIF,GAC7B,MAAMG,EAAQV,EAAIS,EAAM,CACrB,UAAW,CAACE,EAAMC,EAAMC,IAAcA,IAAS,GAAK,CAACd,EAAYY,CAAI,CACxE,CAAC,EAED,IAAIG,EAAYJ,EAAM,OAAOA,EAAM,SAAgB,GAAK,CAAC,EACzD,MAAMK,EAAc,CAAC,EACrB,QAASJ,KAAQG,EACdC,EAAOJ,CAAI,EAAKH,EAAcG,CAAI,EAErC,OAAAI,EAAO,UAAYd,EAAW,CAC3BI,EAAY,OAASA,EAAY,GACjCK,EAAM,UACNF,EAAM,UACN,GAAIF,GAAgB,CAAC,CACxB,CAAC,EACMS,CACV,EAGA,IAAOC,EAAQd",
|
|
6
|
-
"names": ["cssPropList", "css", "classNames", "useTagProps", "sxr", "sx", "baseClass", "clses", "hover", "props", "_css", "style", "prop", "_val", "dept", "skipProps", "_props", "useTagProps_default"]
|
|
7
|
-
}
|
package/Transition/index.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";"use client";var z=Object.create;var f=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var G=Object.getOwnPropertyNames;var K=Object.getPrototypeOf,Q=Object.prototype.hasOwnProperty;var U=(t,e)=>{for(var i in e)f(t,i,{get:e[i],enumerable:!0})},x=(t,e,i,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of G(e))!Q.call(t,o)&&o!==i&&f(t,o,{get:()=>e[o],enumerable:!(r=F(e,o))||r.enumerable});return t};var S=(t,e,i)=>(i=t!=null?z(K(t)):{},x(e||!t||!t.__esModule?f(i,"default",{value:t,enumerable:!0}):i,t)),X=t=>x(f({},"__esModule",{value:!0}),t);var te={};U(te,{default:()=>ee});module.exports=X(te);var n=S(require("react"),1),A=S(require("../Tag"),1),h=require("../useAnimation"),I=require("../css"),R=require("oncss"),Y=S(require("./variants"),1);const Z=({children:t,open:e,...i})=>{let{disableInitialTransition:r,variant:o,duration:g,delay:L,ease:k,easing:H,onOpen:E,onOpened:v,onClose:C,onClosed:O,onState:m}=i,M=k||h.animationEases[H]||h.animationEases.easeBounceOut;r??(r=!1),g??(g=400),o??(o="fade");const u=(0,n.useId)().replace(/:/g,""),[l,N]=(0,n.useState)(!1),[_,j]=(0,n.useState)(!1),[q,b]=(0,n.useState)(e?r?"opened":"open":"closed"),[B,J]=(0,n.useState)({height:0,width:0,rect:null});typeof o=="string"&&(o=Y[o](B));let c=o.from,d=o.to;const[P,y]=(0,n.useState)(e?d:c);(0,n.useEffect)(()=>{const s=document.querySelector(`.trans-${u}`);s&&(N(!0),J({height:s.clientHeight,width:s.clientWidth,rect:s.getBoundingClientRect()}),!r&&e&&y(c))},[]),(0,n.useEffect)(()=>{const s=document.querySelector(`.trans-${u}`);if(l&&s){let p=null,w=null;s.ontransitionstart=()=>{clearTimeout(p),p=setTimeout(()=>{const a=Array.from(s.classList).includes("trans-open");E&&a&&E(),C&&!a&&C(),m&&m(a?"open":"close"),b(a?"open":"close")},1)},s.ontransitionend=()=>{clearTimeout(w),w=setTimeout(()=>{const a=Array.from(s.classList).includes("trans-open");v&&a&&v(),O&&!a&&O(),m&&m(a?"opened":"closed"),b(a?"opened":"closed")},1)}}},[l]),(0,n.useEffect)(()=>{l&&(_?y(e?d:c):(j(!0),setTimeout(()=>{y(e?d:c)},50)))},[l,e,JSON.stringify(c),JSON.stringify(d)]);let $={};if(l){let s=` ${g}ms ${M} ${L||0}ms`;$={...P,transition:Object.keys(P||{}).map(p=>(0,R.formatCSSProp)(p)).join(s+", ")+s}}const V=(0,I.css)($);if(!t||Array.isArray(t))throw new Error("Invalid children in Transition");const D=n.Children.toArray(t).shift();let W=`${V.classname} trans-${u} trans-${e?"open":"close"} trans-state-${q}`;const T=(0,n.cloneElement)(D,{classNames:[W]});return l||!l&&r&&e?T:n.default.createElement(A.default,{height:0,overflow:"hidden"},T)};var ee=Z;
|
|
2
|
-
//# sourceMappingURL=index.cjs.map
|
package/Transition/index.cjs.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/Transition/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React, { ReactElement, cloneElement, Children, useState, useEffect, useId } from 'react';\nimport Tag from '../Tag';\nimport { animationEases } from '../useAnimation';\nimport { css } from '../css';\nimport { formatCSSProp } from 'oncss';\nimport { CSSProps } from '../css/types';\nimport * as variants from './variants'\nexport type TransitionVariantTypes = keyof typeof variants\n\nexport type TransitionElementProps = {\n height: number;\n width: number;\n rect: DOMRect | null\n}\n\nexport type TransitionState = \"open\" | \"opened\" | \"close\" | \"closed\"\n\nexport type TransitionProps = {\n children: ReactElement;\n open: boolean;\n variant: {\n from: CSSProps;\n to: CSSProps;\n } | TransitionVariantTypes;\n ease?: string;\n easing?: keyof typeof animationEases;\n duration?: number;\n delay?: number;\n disableInitialTransition?: boolean;\n onOpen?: () => void;\n onOpened?: () => void;\n onClose?: () => void;\n onClosed?: () => void;\n onState?: (state: TransitionState) => void;\n}\n\nconst Transition = ({ children, open, ...props }: TransitionProps) => {\n let { disableInitialTransition, variant, duration, delay, ease, easing, onOpen, onOpened, onClose, onClosed, onState } = props as TransitionProps\n let _ease = ease || (animationEases as any)[easing as any] || animationEases.easeBounceOut\n disableInitialTransition ??= false\n duration ??= 400\n variant ??= \"fade\"\n\n const id = useId().replace(/:/g, \"\")\n const [rendered, setRendered] = useState(false)\n const [initial, setInitial] = useState(false)\n const [transitionState, setTransitionState] = useState<TransitionState>(open ? (disableInitialTransition ? \"opened\" : \"open\") : \"closed\")\n const [element, setElement] = useState<TransitionElementProps>({\n height: 0,\n width: 0,\n rect: null\n });\n\n if (typeof variant === 'string') {\n variant = (variants as any)[variant](element)\n }\n\n let from = (variant as any).from\n let to = (variant as any).to\n\n const [_css, setCss] = useState(open ? to : from)\n\n useEffect(() => {\n const ele: HTMLElement = document.querySelector(`.trans-${id}`) as any\n if (ele) {\n setRendered(true)\n setElement({\n height: ele.clientHeight,\n width: ele.clientWidth,\n rect: ele.getBoundingClientRect()\n })\n if (!disableInitialTransition && open) {\n setCss(from)\n }\n }\n }, [])\n\n useEffect(() => {\n const ele: HTMLElement = document.querySelector(`.trans-${id}`) as any\n if (rendered && ele) {\n let stimer: any = null\n let etimer: any = null\n ele.ontransitionstart = () => {\n clearTimeout(stimer)\n stimer = setTimeout(() => {\n const isOpen = Array.from(ele.classList).includes(\"trans-open\");\n (onOpen && isOpen) && onOpen();\n (onClose && !isOpen) && onClose()\n onState && onState(isOpen ? \"open\" : \"close\")\n setTransitionState(isOpen ? \"open\" : \"close\")\n }, 1)\n }\n ele.ontransitionend = () => {\n clearTimeout(etimer)\n etimer = setTimeout(() => {\n const isOpen = Array.from(ele.classList).includes(\"trans-open\");\n (onOpened && isOpen) && onOpened();\n (onClosed && !isOpen) && onClosed();\n onState && onState(isOpen ? \"opened\" : \"closed\")\n setTransitionState(isOpen ? \"opened\" : \"closed\")\n }, 1)\n }\n }\n }, [rendered])\n\n useEffect(() => {\n if (rendered) {\n if (!initial) {\n setInitial(true)\n setTimeout(() => {\n setCss(open ? to : from)\n }, 50);\n } else {\n setCss(open ? to : from)\n }\n }\n }, [rendered, open, JSON.stringify(from), JSON.stringify(to)])\n\n let _: any = {}\n if (rendered) {\n let trans = ` ${duration}ms ${_ease} ${delay || 0}ms`\n _ = {\n ..._css,\n transition: Object.keys(_css || {}).map(k => formatCSSProp(k)).join(trans + \", \") + trans,\n }\n }\n\n const cls = css(_)\n if (!children || Array.isArray(children)) throw new Error(\"Invalid children in Transition\")\n const first: any = Children.toArray(children).shift();\n let classname = `${cls.classname} trans-${id} trans-${(open ? \"open\" : \"close\")} trans-state-${transitionState}`\n const child = cloneElement(first, { classNames: [classname] })\n if (rendered) return child\n if (!rendered && disableInitialTransition && open) return child\n\n return (\n <Tag\n height={0}\n overflow=\"hidden\"\n >\n {child}\n </Tag>\n )\n}\n\n\nexport default Transition"],
|
|
5
|
-
"mappings": "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",
|
|
6
|
-
"names": ["Transition_exports", "__export", "Transition_default", "__toCommonJS", "import_react", "import_Tag", "import_useAnimation", "import_css", "import_oncss", "variants", "Transition", "children", "open", "props", "disableInitialTransition", "variant", "duration", "delay", "ease", "easing", "onOpen", "onOpened", "onClose", "onClosed", "onState", "_ease", "id", "rendered", "setRendered", "initial", "setInitial", "transitionState", "setTransitionState", "element", "setElement", "from", "to", "_css", "setCss", "ele", "stimer", "etimer", "isOpen", "_", "trans", "k", "cls", "first", "classname", "child", "React", "Tag"]
|
|
7
|
-
}
|
package/Transition/index.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React, { ReactElement } from 'react';
|
|
2
|
-
import { animationEases } from '../useAnimation';
|
|
3
|
-
import { CSSProps } from '../css/types';
|
|
4
|
-
import * as variants from './variants';
|
|
5
|
-
export type TransitionVariantTypes = keyof typeof variants;
|
|
6
|
-
export type TransitionElementProps = {
|
|
7
|
-
height: number;
|
|
8
|
-
width: number;
|
|
9
|
-
rect: DOMRect | null;
|
|
10
|
-
};
|
|
11
|
-
export type TransitionState = "open" | "opened" | "close" | "closed";
|
|
12
|
-
export type TransitionProps = {
|
|
13
|
-
children: ReactElement;
|
|
14
|
-
open: boolean;
|
|
15
|
-
variant: {
|
|
16
|
-
from: CSSProps;
|
|
17
|
-
to: CSSProps;
|
|
18
|
-
} | TransitionVariantTypes;
|
|
19
|
-
ease?: string;
|
|
20
|
-
easing?: keyof typeof animationEases;
|
|
21
|
-
duration?: number;
|
|
22
|
-
delay?: number;
|
|
23
|
-
disableInitialTransition?: boolean;
|
|
24
|
-
onOpen?: () => void;
|
|
25
|
-
onOpened?: () => void;
|
|
26
|
-
onClose?: () => void;
|
|
27
|
-
onClosed?: () => void;
|
|
28
|
-
onState?: (state: TransitionState) => void;
|
|
29
|
-
};
|
|
30
|
-
declare const Transition: ({ children, open, ...props }: TransitionProps) => React.JSX.Element;
|
|
31
|
-
export default Transition;
|
package/Transition/index.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";import B,{cloneElement as J,Children as V,useState as a,useEffect as y,useId as D}from"react";import W from"../Tag";import{animationEases as P}from"../useAnimation";import{css as z}from"../css";import{formatCSSProp as F}from"oncss";import*as G from"./variants";const K=({children:d,open:n,...$})=>{let{disableInitialTransition:r,variant:o,duration:T,delay:w,ease:x,easing:A,onOpen:S,onOpened:h,onClose:g,onClosed:E,onState:l}=$,I=x||P[A]||P.easeBounceOut;r??(r=!1),T??(T=400),o??(o="fade");const p=D().replace(/:/g,""),[s,R]=a(!1),[L,k]=a(!1),[H,v]=a(n?r?"opened":"open":"closed"),[M,N]=a({height:0,width:0,rect:null});typeof o=="string"&&(o=G[o](M));let i=o.from,c=o.to;const[C,f]=a(n?c:i);y(()=>{const e=document.querySelector(`.trans-${p}`);e&&(R(!0),N({height:e.clientHeight,width:e.clientWidth,rect:e.getBoundingClientRect()}),!r&&n&&f(i))},[]),y(()=>{const e=document.querySelector(`.trans-${p}`);if(s&&e){let m=null,b=null;e.ontransitionstart=()=>{clearTimeout(m),m=setTimeout(()=>{const t=Array.from(e.classList).includes("trans-open");S&&t&&S(),g&&!t&&g(),l&&l(t?"open":"close"),v(t?"open":"close")},1)},e.ontransitionend=()=>{clearTimeout(b),b=setTimeout(()=>{const t=Array.from(e.classList).includes("trans-open");h&&t&&h(),E&&!t&&E(),l&&l(t?"opened":"closed"),v(t?"opened":"closed")},1)}}},[s]),y(()=>{s&&(L?f(n?c:i):(k(!0),setTimeout(()=>{f(n?c:i)},50)))},[s,n,JSON.stringify(i),JSON.stringify(c)]);let O={};if(s){let e=` ${T}ms ${I} ${w||0}ms`;O={...C,transition:Object.keys(C||{}).map(m=>F(m)).join(e+", ")+e}}const _=z(O);if(!d||Array.isArray(d))throw new Error("Invalid children in Transition");const j=V.toArray(d).shift();let q=`${_.classname} trans-${p} trans-${n?"open":"close"} trans-state-${H}`;const u=J(j,{classNames:[q]});return s||!s&&r&&n?u:B.createElement(W,{height:0,overflow:"hidden"},u)};var se=K;export{se as default};
|
|
2
|
-
//# sourceMappingURL=index.mjs.map
|