@marigold/system 5.6.0 → 6.0.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/dist/index.d.ts +636 -249
- package/dist/index.js +634 -321
- package/dist/index.mjs +602 -318
- package/package.json +6 -7
package/dist/index.mjs
CHANGED
|
@@ -1,310 +1,133 @@
|
|
|
1
|
-
// src/components/
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
|
-
import { jsx } from "@emotion/react";
|
|
4
|
-
import { css as transformStyleObject } from "@theme-ui/css";
|
|
5
|
-
import merge from "deepmerge";
|
|
1
|
+
// src/components/SVG/SVG.tsx
|
|
2
|
+
import React, { forwardRef } from "react";
|
|
6
3
|
|
|
7
|
-
// src/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
var state = {
|
|
18
|
-
none: [""],
|
|
19
|
-
hover: [":hover:not([disabled])", "[data-hover]"],
|
|
20
|
-
focus: [":focus", "[data-focus]"],
|
|
21
|
-
focusVisible: [":focus-visible", "[data-focus-visible]"],
|
|
22
|
-
active: [":active", "[data-active]"],
|
|
23
|
-
disabled: ["[disabled]", "[aria-disabled=true]", "[data-disabled]"],
|
|
24
|
-
readOnly: ["[readonly]", "[aria-readonly=true]", "[data-read-only]"],
|
|
25
|
-
checked: ["[aria-checked=true]", "[data-checked]"],
|
|
26
|
-
indeterminate: ["[aria-checked=mixed]", "[data-indeterminate]"],
|
|
27
|
-
selected: ["[aria-selected=true]", "[data-selected]"],
|
|
28
|
-
error: [":invalid", "[aria-invalid=true]", "[data-error]"],
|
|
29
|
-
expanded: ["[aria-expanded=true]", "[data-expanded]"],
|
|
30
|
-
required: [":required", "[aria-required]"],
|
|
31
|
-
hasIcon: ["[data-has-icon]"]
|
|
32
|
-
};
|
|
33
|
-
var pseudos = {
|
|
34
|
-
"&:hover": createteSelector([selector.self], state.hover),
|
|
35
|
-
"&:focus": createteSelector([selector.self], state.focus),
|
|
36
|
-
"&:focus-visible": createteSelector([selector.self], state.focusVisible),
|
|
37
|
-
"&:active": createteSelector([selector.self], state.active),
|
|
38
|
-
"&:disabled": createteSelector([selector.self], state.disabled),
|
|
39
|
-
"&:read-only": createteSelector([selector.self], state.readOnly),
|
|
40
|
-
"&:checked": createteSelector([selector.self], state.checked),
|
|
41
|
-
"&:selected": createteSelector([selector.self], state.selected),
|
|
42
|
-
"&:indeterminate": createteSelector([selector.self], state.indeterminate),
|
|
43
|
-
"&:error": createteSelector([selector.self], state.error),
|
|
44
|
-
"&:expanded": createteSelector([selector.self], state.expanded),
|
|
45
|
-
"&:required": createteSelector([selector.self], state.required),
|
|
46
|
-
"&:has-icon": createteSelector([selector.self], state.hasIcon),
|
|
47
|
-
// Selector for elements that are part of a group
|
|
48
|
-
"&:in-group": createteSelector(selector.grouped, state.none, selector.self),
|
|
49
|
-
"&:hover-group": createteSelector(
|
|
50
|
-
selector.grouped,
|
|
51
|
-
state.hover,
|
|
52
|
-
selector.self
|
|
53
|
-
),
|
|
54
|
-
"&:focus-group": createteSelector(
|
|
55
|
-
selector.grouped,
|
|
56
|
-
state.focus,
|
|
57
|
-
selector.self
|
|
58
|
-
),
|
|
59
|
-
"&:active-group": createteSelector(
|
|
60
|
-
selector.grouped,
|
|
61
|
-
state.active,
|
|
62
|
-
selector.self
|
|
63
|
-
),
|
|
64
|
-
"&:error-group": createteSelector(
|
|
65
|
-
selector.grouped,
|
|
66
|
-
state.error,
|
|
67
|
-
selector.self
|
|
68
|
-
)
|
|
4
|
+
// src/utils.ts
|
|
5
|
+
import { cx } from "class-variance-authority";
|
|
6
|
+
import { twMerge } from "tailwind-merge";
|
|
7
|
+
import { cva as _cva } from "class-variance-authority";
|
|
8
|
+
var cva = (base, config) => {
|
|
9
|
+
function styles(props) {
|
|
10
|
+
return twMerge(_cva(base, config)(props));
|
|
11
|
+
}
|
|
12
|
+
styles.variants = config == null ? void 0 : config.variants;
|
|
13
|
+
return styles;
|
|
69
14
|
};
|
|
70
|
-
var
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
result[key] = value;
|
|
15
|
+
var cn = (...inputs) => twMerge(cx(inputs));
|
|
16
|
+
var createVar = (o) => Object.fromEntries(
|
|
17
|
+
Object.entries(o).map(([name, val]) => [`--${name}`, val])
|
|
18
|
+
);
|
|
19
|
+
var get = (obj, path, fallback) => {
|
|
20
|
+
const key = path.split(".");
|
|
21
|
+
let result = obj;
|
|
22
|
+
for (let i = 0, length = key.length; i < length; i++) {
|
|
23
|
+
if (!result)
|
|
24
|
+
break;
|
|
25
|
+
result = result[key[i]];
|
|
82
26
|
}
|
|
83
|
-
return result;
|
|
27
|
+
return result === void 0 ? fallback : result;
|
|
84
28
|
};
|
|
85
29
|
|
|
86
|
-
// src/components/
|
|
87
|
-
var
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
...Array.isArray(css) ? css.map((c) => transformStyleObject(c)(theme)) : [transformStyleObject(css)(theme)]
|
|
91
|
-
]);
|
|
92
|
-
return transformPseudos(themedStyles);
|
|
93
|
-
};
|
|
94
|
-
var Box = forwardRef(
|
|
95
|
-
({ as = "div", children, __baseCSS, css, ...props }, ref) => jsx(
|
|
96
|
-
as,
|
|
30
|
+
// src/components/SVG/SVG.tsx
|
|
31
|
+
var SVG = forwardRef(
|
|
32
|
+
({ size = 24, children, className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
33
|
+
"svg",
|
|
97
34
|
{
|
|
98
35
|
...props,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
ref
|
|
36
|
+
ref,
|
|
37
|
+
width: `${props.width || size}px`,
|
|
38
|
+
height: `${props.height || size}px`,
|
|
39
|
+
className: cn("flex-none fill-current", className)
|
|
104
40
|
},
|
|
105
41
|
children
|
|
106
42
|
)
|
|
107
43
|
);
|
|
108
44
|
|
|
109
|
-
// src/
|
|
110
|
-
import React2 from "react";
|
|
111
|
-
|
|
45
|
+
// src/hooks/useTheme.tsx
|
|
46
|
+
import React2, { createContext, useContext } from "react";
|
|
47
|
+
|
|
48
|
+
// src/defaultTheme.ts
|
|
49
|
+
var defaultTheme = {
|
|
50
|
+
name: "default",
|
|
51
|
+
screens: {
|
|
52
|
+
sm: "640px",
|
|
53
|
+
md: "768px",
|
|
54
|
+
lg: "1024px",
|
|
55
|
+
xl: "1280px",
|
|
56
|
+
"2xl": "1536px"
|
|
57
|
+
},
|
|
58
|
+
components: {}
|
|
59
|
+
};
|
|
112
60
|
|
|
113
61
|
// src/hooks/useTheme.tsx
|
|
114
|
-
|
|
115
|
-
createContext,
|
|
116
|
-
useCallback,
|
|
117
|
-
useContext
|
|
118
|
-
} from "react";
|
|
119
|
-
import {
|
|
120
|
-
css as transformStyleObject2,
|
|
121
|
-
get as getfromTheme
|
|
122
|
-
} from "@theme-ui/css";
|
|
123
|
-
import { ThemeProvider as EmotionProvider } from "@emotion/react";
|
|
124
|
-
var __defaultTheme = {};
|
|
125
|
-
var InternalContext = createContext(__defaultTheme);
|
|
62
|
+
var InternalContext = createContext(defaultTheme);
|
|
126
63
|
var useTheme = () => {
|
|
127
64
|
const theme = useContext(InternalContext);
|
|
128
|
-
|
|
129
|
-
(style) => transformStyleObject2(style)(theme),
|
|
130
|
-
[theme]
|
|
131
|
-
);
|
|
132
|
-
const get2 = useCallback((path) => getfromTheme(theme, path), [theme]);
|
|
133
|
-
return { theme, css, get: get2 };
|
|
65
|
+
return theme;
|
|
134
66
|
};
|
|
135
67
|
function ThemeProvider({
|
|
136
68
|
theme,
|
|
137
69
|
children
|
|
138
70
|
}) {
|
|
139
|
-
|
|
71
|
+
var _a, _b;
|
|
72
|
+
return /* @__PURE__ */ React2.createElement("div", { "data-theme": theme.name, className: (_b = (_a = theme.root) == null ? void 0 : _a.call(theme)) != null ? _b : "" }, /* @__PURE__ */ React2.createElement(InternalContext.Provider, { value: theme }, children));
|
|
140
73
|
}
|
|
141
74
|
|
|
142
|
-
// src/
|
|
143
|
-
var
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
lineHeight: 1.5,
|
|
156
|
-
WebkitFontSmoothing: "antialiased",
|
|
157
|
-
/**
|
|
158
|
-
* We have to duplicate this here, since the "*" selector will not be
|
|
159
|
-
* applied to the body element if a custom `selector` is used.
|
|
160
|
-
*/
|
|
161
|
-
margin: 0
|
|
162
|
-
},
|
|
163
|
-
/**
|
|
164
|
-
* CSS snippet and idea from:
|
|
165
|
-
* https://css-tricks.com/revisiting-prefers-reduced-motion-the-reduced-motion-media-query/
|
|
166
|
-
*/
|
|
167
|
-
"@media screen and (prefers-reduced-motion: reduce), (update: slow)": {
|
|
168
|
-
"*": {
|
|
169
|
-
animationDuration: "0.001ms !important",
|
|
170
|
-
animationIterationCount: "1 !important",
|
|
171
|
-
transitionDuration: "0.001ms !important"
|
|
172
|
-
}
|
|
75
|
+
// src/hooks/useClassNames.tsx
|
|
76
|
+
var useClassNames = ({
|
|
77
|
+
component,
|
|
78
|
+
className,
|
|
79
|
+
variant,
|
|
80
|
+
size
|
|
81
|
+
}) => {
|
|
82
|
+
const theme = useTheme();
|
|
83
|
+
const styles = theme.components[component];
|
|
84
|
+
if (!styles) {
|
|
85
|
+
throw new Error(
|
|
86
|
+
`Component "${component}" is missing styles in the current theme.`
|
|
87
|
+
);
|
|
173
88
|
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
"*": {
|
|
180
|
-
margin: 0
|
|
181
|
-
},
|
|
182
|
-
a: {
|
|
183
|
-
textDecoration: "none"
|
|
184
|
-
},
|
|
185
|
-
"p, h1, h2, h3, h4, h5, h6": {
|
|
186
|
-
overflowWrap: "break-word"
|
|
187
|
-
},
|
|
188
|
-
"img, picture, video, canvas, svg": {
|
|
189
|
-
display: "block",
|
|
190
|
-
maxWidth: "100%"
|
|
191
|
-
},
|
|
192
|
-
/**
|
|
193
|
-
* No `maxWidth` for SVG since this makes them responsive
|
|
194
|
-
* and will cause icons to shrink.
|
|
195
|
-
*/
|
|
196
|
-
svg: {
|
|
197
|
-
display: "block",
|
|
198
|
-
fill: "currentColor"
|
|
199
|
-
},
|
|
200
|
-
button: {
|
|
201
|
-
display: "block",
|
|
202
|
-
appearance: "none",
|
|
203
|
-
font: "inherit",
|
|
204
|
-
background: "transparent",
|
|
205
|
-
textAlign: "center"
|
|
206
|
-
},
|
|
207
|
-
input: {
|
|
208
|
-
display: "block",
|
|
209
|
-
appearance: "none",
|
|
210
|
-
font: "inherit",
|
|
211
|
-
"&::-ms-clear": {
|
|
212
|
-
display: "none"
|
|
213
|
-
},
|
|
214
|
-
"&::-webkit-search-cancel-button": {
|
|
215
|
-
WebkitAppearance: "none"
|
|
216
|
-
}
|
|
217
|
-
},
|
|
218
|
-
select: {
|
|
219
|
-
display: "block",
|
|
220
|
-
appearance: "none",
|
|
221
|
-
font: "inherit",
|
|
222
|
-
"&::-ms-expand": {
|
|
223
|
-
display: "none"
|
|
89
|
+
if (typeof styles === "function") {
|
|
90
|
+
if (className !== void 0 && typeof className !== "string") {
|
|
91
|
+
throw new Error(
|
|
92
|
+
'"className" must be a string, when using a component without slots'
|
|
93
|
+
);
|
|
224
94
|
}
|
|
225
|
-
|
|
226
|
-
textarea: {
|
|
227
|
-
display: "block",
|
|
228
|
-
appearance: "none",
|
|
229
|
-
font: "inherit"
|
|
95
|
+
return cn(styles({ variant, size, className }));
|
|
230
96
|
}
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
...body,
|
|
236
|
-
...rest
|
|
237
|
-
} : {
|
|
238
|
-
body,
|
|
239
|
-
...rest
|
|
240
|
-
};
|
|
241
|
-
var Global = ({ normalizeDocument = true, selector: selector2 }) => {
|
|
242
|
-
const { css, theme } = useTheme();
|
|
243
|
-
const rootStyles = css((theme == null ? void 0 : theme.root) || {});
|
|
244
|
-
const styles = [
|
|
245
|
-
normalizeDocument ? document : {},
|
|
246
|
-
// Prefix normalization and root styles with selector if provided.
|
|
247
|
-
selector2 ? { [`:where(${selector2})`]: element } : element,
|
|
248
|
-
selector2 ? { [`:where(${selector2})`]: mergeRoot(rootStyles) } : rootStyles
|
|
249
|
-
];
|
|
250
|
-
return /* @__PURE__ */ React2.createElement(EmotionGlobal, { styles });
|
|
251
|
-
};
|
|
252
|
-
|
|
253
|
-
// src/components/SVG/SVG.tsx
|
|
254
|
-
import { forwardRef as forwardRef2 } from "react";
|
|
255
|
-
import { jsx as jsx2 } from "@emotion/react";
|
|
256
|
-
|
|
257
|
-
// src/hooks/useComponentStyles.ts
|
|
258
|
-
import merge2 from "deepmerge";
|
|
259
|
-
import { useRef } from "react";
|
|
260
|
-
import isEqual from "react-fast-compare";
|
|
261
|
-
var get = (obj, path, fallback) => {
|
|
262
|
-
const key = path.split(".");
|
|
263
|
-
let result = obj;
|
|
264
|
-
for (let i = 0, length = key.length; i < length; i++) {
|
|
265
|
-
if (!result)
|
|
266
|
-
break;
|
|
267
|
-
result = result[key[i]];
|
|
97
|
+
if (className !== void 0 && typeof className !== "object") {
|
|
98
|
+
throw new Error(
|
|
99
|
+
'"className" must be a object, when using a component with slots'
|
|
100
|
+
);
|
|
268
101
|
}
|
|
269
|
-
return
|
|
102
|
+
return Object.fromEntries(
|
|
103
|
+
Object.entries(styles).map(([slot, style]) => {
|
|
104
|
+
return [
|
|
105
|
+
slot,
|
|
106
|
+
cn(
|
|
107
|
+
style({
|
|
108
|
+
variant,
|
|
109
|
+
size,
|
|
110
|
+
className: className && className[slot]
|
|
111
|
+
})
|
|
112
|
+
)
|
|
113
|
+
];
|
|
114
|
+
})
|
|
115
|
+
);
|
|
270
116
|
};
|
|
271
|
-
function useComponentStyles(componentName, props = {}, options = {}) {
|
|
272
|
-
var _a, _b;
|
|
273
|
-
const { theme } = useTheme();
|
|
274
|
-
const componentStyles = get(theme, `components.${componentName}`);
|
|
275
|
-
const stylesRef = useRef({});
|
|
276
|
-
if (componentStyles) {
|
|
277
|
-
const base = componentStyles.base || {};
|
|
278
|
-
const size = ((_a = componentStyles.size) == null ? void 0 : _a[props.size]) || {};
|
|
279
|
-
const variant = ((_b = componentStyles.variant) == null ? void 0 : _b[props.variant]) || {};
|
|
280
|
-
let styles = merge2.all([base, size, variant]);
|
|
281
|
-
if (options.parts) {
|
|
282
|
-
styles = options.parts.reduce((result, part) => {
|
|
283
|
-
result[part] = styles[part] || {};
|
|
284
|
-
return result;
|
|
285
|
-
}, {});
|
|
286
|
-
}
|
|
287
|
-
if (!isEqual(stylesRef.current, styles)) {
|
|
288
|
-
stylesRef.current = styles;
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
return stylesRef.current;
|
|
292
|
-
}
|
|
293
117
|
|
|
294
118
|
// src/hooks/useResponsiveValue.ts
|
|
295
119
|
import { useEffect, useState } from "react";
|
|
296
|
-
var emptyBreakpoints = ["40em", "52em", "64em"];
|
|
297
120
|
var useResponsiveValue = (values, defaultIndex = 0) => {
|
|
298
|
-
const
|
|
299
|
-
const
|
|
300
|
-
if (defaultIndex < 0 || defaultIndex >=
|
|
121
|
+
const theme = useTheme();
|
|
122
|
+
const screens = theme.screens || defaultTheme.screens;
|
|
123
|
+
if (defaultIndex < 0 || defaultIndex >= Object.keys(screens).length + 1) {
|
|
301
124
|
throw new RangeError(
|
|
302
|
-
`Default breakpoint index is out of bounds. Theme has ${
|
|
125
|
+
`Default breakpoint index is out of bounds. Theme has ${Object.keys(screens).length + 1} breakpoints, default is ${defaultIndex}.`
|
|
303
126
|
);
|
|
304
127
|
}
|
|
305
128
|
const [index, setIndex] = useState(defaultIndex);
|
|
306
129
|
useEffect(() => {
|
|
307
|
-
const getIndex = () =>
|
|
130
|
+
const getIndex = () => Object.values(screens).filter(
|
|
308
131
|
(breakpoint) => window.matchMedia(`screen and (min-width: ${breakpoint})`).matches
|
|
309
132
|
).length;
|
|
310
133
|
const handleResize = () => {
|
|
@@ -316,77 +139,538 @@ var useResponsiveValue = (values, defaultIndex = 0) => {
|
|
|
316
139
|
handleResize();
|
|
317
140
|
window.addEventListener("resize", handleResize);
|
|
318
141
|
return () => window.removeEventListener("resize", handleResize);
|
|
319
|
-
}, [
|
|
142
|
+
}, [screens, index]);
|
|
320
143
|
return values[index >= values.length ? values.length - 1 : index];
|
|
321
144
|
};
|
|
322
145
|
|
|
323
146
|
// src/hooks/useStateProps.ts
|
|
324
|
-
import { useRef
|
|
325
|
-
import
|
|
147
|
+
import { useRef } from "react";
|
|
148
|
+
import isEqual from "react-fast-compare";
|
|
326
149
|
var KEBAB_REGEX = /[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g;
|
|
327
150
|
var toKebap = (val) => val.replace(KEBAB_REGEX, (match) => `-${match.toLocaleLowerCase()}`);
|
|
328
151
|
var useStateProps = (states) => {
|
|
329
|
-
const statePropsRef =
|
|
152
|
+
const statePropsRef = useRef({});
|
|
330
153
|
let stateProps = {};
|
|
331
|
-
for (let
|
|
332
|
-
if (states[
|
|
333
|
-
const key = `data-${toKebap(
|
|
154
|
+
for (let state in states) {
|
|
155
|
+
if (states[state]) {
|
|
156
|
+
const key = `data-${toKebap(state)}`;
|
|
334
157
|
stateProps[key] = "";
|
|
335
158
|
}
|
|
336
159
|
}
|
|
337
|
-
if (!
|
|
160
|
+
if (!isEqual(statePropsRef.current, stateProps)) {
|
|
338
161
|
statePropsRef.current = stateProps;
|
|
339
162
|
}
|
|
340
163
|
return statePropsRef.current;
|
|
341
164
|
};
|
|
342
165
|
|
|
343
|
-
// src/
|
|
344
|
-
|
|
345
|
-
var
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
);
|
|
366
|
-
|
|
367
|
-
// src/keyframes.ts
|
|
368
|
-
import { keyframes } from "@emotion/react";
|
|
166
|
+
// src/hooks/useSmallScreen.ts
|
|
167
|
+
import { useCallback, useEffect as useEffect2, useState as useState2 } from "react";
|
|
168
|
+
var useSmallScreen = () => {
|
|
169
|
+
const getMatches = () => {
|
|
170
|
+
if (typeof window == "undefined") {
|
|
171
|
+
return false;
|
|
172
|
+
}
|
|
173
|
+
return window.matchMedia("(max-width: 600px)").matches;
|
|
174
|
+
};
|
|
175
|
+
const [matches, setMatches] = useState2(getMatches());
|
|
176
|
+
const handleResize = useCallback(() => {
|
|
177
|
+
setMatches(getMatches());
|
|
178
|
+
}, []);
|
|
179
|
+
useEffect2(() => {
|
|
180
|
+
handleResize();
|
|
181
|
+
if (typeof window == "undefined")
|
|
182
|
+
return;
|
|
183
|
+
window.addEventListener("resize", handleResize);
|
|
184
|
+
return () => window.removeEventListener("resize", handleResize);
|
|
185
|
+
}, [handleResize]);
|
|
186
|
+
return matches;
|
|
187
|
+
};
|
|
369
188
|
|
|
370
|
-
// src/
|
|
371
|
-
var
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
189
|
+
// src/style-props.tsx
|
|
190
|
+
var width = {
|
|
191
|
+
full: "w-full",
|
|
192
|
+
auto: "w-auto",
|
|
193
|
+
px: "w-px",
|
|
194
|
+
0: "w-0",
|
|
195
|
+
"0.5": "w-0.5",
|
|
196
|
+
1: "w-1",
|
|
197
|
+
"1.5": "w-1.5",
|
|
198
|
+
2: "w-2",
|
|
199
|
+
"2.5": "w-2.5",
|
|
200
|
+
3: "w-3",
|
|
201
|
+
"3.5": "w-3.5",
|
|
202
|
+
4: "w-4",
|
|
203
|
+
5: "w-5",
|
|
204
|
+
6: "w-6",
|
|
205
|
+
7: "w-7",
|
|
206
|
+
8: "w-8",
|
|
207
|
+
9: "w-9",
|
|
208
|
+
10: "w-10",
|
|
209
|
+
11: "w-11",
|
|
210
|
+
12: "w-12",
|
|
211
|
+
14: "w-14",
|
|
212
|
+
16: "w-16",
|
|
213
|
+
20: "w-20",
|
|
214
|
+
24: "w-24",
|
|
215
|
+
28: "w-28",
|
|
216
|
+
32: "w-32",
|
|
217
|
+
36: "w-36",
|
|
218
|
+
40: "w-40",
|
|
219
|
+
44: "w-44",
|
|
220
|
+
48: "w-48",
|
|
221
|
+
52: "w-52",
|
|
222
|
+
56: "w-56",
|
|
223
|
+
60: "w-60",
|
|
224
|
+
64: "w-64",
|
|
225
|
+
72: "w-72",
|
|
226
|
+
80: "w-80",
|
|
227
|
+
96: "w-96",
|
|
228
|
+
"1/2": "w-1/2",
|
|
229
|
+
"1/3": "w-1/3",
|
|
230
|
+
"2/3": "w-2/3",
|
|
231
|
+
"1/4": "w-1/4",
|
|
232
|
+
"2/4": "w-2/4",
|
|
233
|
+
"3/4": "w-3/4",
|
|
234
|
+
"1/5": "w-1/5",
|
|
235
|
+
"2/5": "w-2/5",
|
|
236
|
+
"3/5": "w-3/5",
|
|
237
|
+
"1/6": "w-1/6",
|
|
238
|
+
"2/6": "w-2/6",
|
|
239
|
+
"3/6": "w-3/6",
|
|
240
|
+
"4/6": "w-4/6",
|
|
241
|
+
"5/6": "w-5/6",
|
|
242
|
+
"1/12": "w-1/12",
|
|
243
|
+
"2/12": "w-2/12",
|
|
244
|
+
"3/12": "w-3/12",
|
|
245
|
+
"4/12": "w-4/12",
|
|
246
|
+
"5/12": "w-5/12",
|
|
247
|
+
"6/12": "w-6/12",
|
|
248
|
+
"7/12": "w-7/12",
|
|
249
|
+
"8/12": "w-8/12",
|
|
250
|
+
"9/12": "w-9/12",
|
|
251
|
+
"10/12": "w-10/12",
|
|
252
|
+
"11/12": "w-11/12"
|
|
253
|
+
};
|
|
254
|
+
var fontWeight = {
|
|
255
|
+
thin: "font-thin",
|
|
256
|
+
extralight: "font-extralight",
|
|
257
|
+
light: "font-light",
|
|
258
|
+
normal: "font-normal",
|
|
259
|
+
medium: "font-medium",
|
|
260
|
+
semibold: "font-semibold",
|
|
261
|
+
bold: "font-bold",
|
|
262
|
+
extrabold: "font-extrabold",
|
|
263
|
+
black: "font-black"
|
|
264
|
+
};
|
|
265
|
+
var textSize = {
|
|
266
|
+
xs: "text-[13px]",
|
|
267
|
+
sm: "text-sm",
|
|
268
|
+
base: "text-base",
|
|
269
|
+
lg: "text-lg",
|
|
270
|
+
xl: "text-xl",
|
|
271
|
+
"2xl": "text-2xl",
|
|
272
|
+
"3xl": "text-3xl",
|
|
273
|
+
"4xl": "text-4xl",
|
|
274
|
+
"5xl": "text-5xl"
|
|
275
|
+
};
|
|
276
|
+
var textStyle = {
|
|
277
|
+
italic: "italic",
|
|
278
|
+
normal: "not-italic"
|
|
279
|
+
};
|
|
280
|
+
var gapSpace = {
|
|
281
|
+
0: "gap-0",
|
|
282
|
+
1: "gap-1",
|
|
283
|
+
2: "gap-2",
|
|
284
|
+
3: "gap-3",
|
|
285
|
+
4: "gap-4",
|
|
286
|
+
5: "gap-5",
|
|
287
|
+
6: "gap-6",
|
|
288
|
+
7: "gap-7",
|
|
289
|
+
8: "gap-8",
|
|
290
|
+
9: "gap-9",
|
|
291
|
+
10: "gap-10",
|
|
292
|
+
11: "gap-11",
|
|
293
|
+
12: "gap-12",
|
|
294
|
+
14: "gap-14",
|
|
295
|
+
16: "gap-16",
|
|
296
|
+
20: "gap-20",
|
|
297
|
+
24: "gap-24",
|
|
298
|
+
28: "gap-28",
|
|
299
|
+
32: "gap-32",
|
|
300
|
+
36: "gap-36",
|
|
301
|
+
40: "gap-40",
|
|
302
|
+
44: "gap-44",
|
|
303
|
+
48: "gap-48",
|
|
304
|
+
52: "gap-52",
|
|
305
|
+
56: "gap-56",
|
|
306
|
+
60: "gap-60",
|
|
307
|
+
64: "gap-64",
|
|
308
|
+
72: "gap-72",
|
|
309
|
+
80: "gap-80",
|
|
310
|
+
96: "gap-96"
|
|
311
|
+
};
|
|
312
|
+
var paddingSpace = {
|
|
313
|
+
0: "p-0",
|
|
314
|
+
1: "p-1",
|
|
315
|
+
2: "p-2",
|
|
316
|
+
3: "p-3",
|
|
317
|
+
4: "p-4",
|
|
318
|
+
5: "p-5",
|
|
319
|
+
6: "p-6",
|
|
320
|
+
7: "p-7",
|
|
321
|
+
8: "p-8",
|
|
322
|
+
9: "p-9",
|
|
323
|
+
10: "p-10",
|
|
324
|
+
11: "p-11",
|
|
325
|
+
12: "p-12",
|
|
326
|
+
14: "p-14",
|
|
327
|
+
16: "p-16",
|
|
328
|
+
20: "p-20",
|
|
329
|
+
24: "p-24",
|
|
330
|
+
28: "p-28",
|
|
331
|
+
32: "p-32",
|
|
332
|
+
36: "p-36",
|
|
333
|
+
40: "p-40",
|
|
334
|
+
44: "p-44",
|
|
335
|
+
48: "p-48",
|
|
336
|
+
52: "p-52",
|
|
337
|
+
56: "p-56",
|
|
338
|
+
60: "p-60",
|
|
339
|
+
64: "p-64",
|
|
340
|
+
72: "p-72",
|
|
341
|
+
80: "p-80",
|
|
342
|
+
96: "p-96"
|
|
343
|
+
};
|
|
344
|
+
var paddingSpaceX = {
|
|
345
|
+
0: "px-0",
|
|
346
|
+
1: "px-1",
|
|
347
|
+
2: "px-2",
|
|
348
|
+
3: "px-3",
|
|
349
|
+
4: "px-4",
|
|
350
|
+
5: "px-5",
|
|
351
|
+
6: "px-6",
|
|
352
|
+
7: "px-7",
|
|
353
|
+
8: "px-8",
|
|
354
|
+
9: "px-9",
|
|
355
|
+
10: "px-10",
|
|
356
|
+
11: "px-11",
|
|
357
|
+
12: "px-12",
|
|
358
|
+
14: "px-14",
|
|
359
|
+
16: "px-16",
|
|
360
|
+
20: "px-20",
|
|
361
|
+
24: "px-24",
|
|
362
|
+
28: "px-28",
|
|
363
|
+
32: "px-32",
|
|
364
|
+
36: "px-36",
|
|
365
|
+
40: "px-40",
|
|
366
|
+
44: "px-44",
|
|
367
|
+
48: "px-48",
|
|
368
|
+
52: "px-52",
|
|
369
|
+
56: "px-56",
|
|
370
|
+
60: "px-60",
|
|
371
|
+
64: "px-64",
|
|
372
|
+
72: "px-72",
|
|
373
|
+
80: "px-80",
|
|
374
|
+
96: "px-96"
|
|
375
|
+
};
|
|
376
|
+
var paddingSpaceY = {
|
|
377
|
+
0: "py-0",
|
|
378
|
+
1: "py-1",
|
|
379
|
+
2: "py-2",
|
|
380
|
+
3: "py-3",
|
|
381
|
+
4: "py-4",
|
|
382
|
+
5: "py-5",
|
|
383
|
+
6: "py-6",
|
|
384
|
+
7: "py-7",
|
|
385
|
+
8: "py-8",
|
|
386
|
+
9: "py-9",
|
|
387
|
+
10: "py-10",
|
|
388
|
+
11: "py-11",
|
|
389
|
+
12: "py-12",
|
|
390
|
+
14: "py-14",
|
|
391
|
+
16: "py-16",
|
|
392
|
+
20: "py-20",
|
|
393
|
+
24: "py-24",
|
|
394
|
+
28: "py-28",
|
|
395
|
+
32: "py-32",
|
|
396
|
+
36: "py-36",
|
|
397
|
+
40: "py-40",
|
|
398
|
+
44: "py-44",
|
|
399
|
+
48: "py-48",
|
|
400
|
+
52: "py-52",
|
|
401
|
+
56: "py-56",
|
|
402
|
+
60: "py-60",
|
|
403
|
+
64: "py-64",
|
|
404
|
+
72: "py-72",
|
|
405
|
+
80: "py-80",
|
|
406
|
+
96: "py-96"
|
|
407
|
+
};
|
|
408
|
+
var paddingRight = {
|
|
409
|
+
0: "pr-0",
|
|
410
|
+
1: "pr-1",
|
|
411
|
+
2: "pr-2",
|
|
412
|
+
3: "pr-3",
|
|
413
|
+
4: "pr-4",
|
|
414
|
+
5: "pr-5",
|
|
415
|
+
6: "pr-6",
|
|
416
|
+
7: "pr-7",
|
|
417
|
+
8: "pr-8",
|
|
418
|
+
9: "pr-9",
|
|
419
|
+
10: "pr-10",
|
|
420
|
+
11: "pr-11",
|
|
421
|
+
12: "pr-12",
|
|
422
|
+
14: "pr-14",
|
|
423
|
+
16: "pr-16",
|
|
424
|
+
20: "pr-20",
|
|
425
|
+
24: "pr-24",
|
|
426
|
+
28: "pr-28",
|
|
427
|
+
32: "pr-32",
|
|
428
|
+
36: "pr-36",
|
|
429
|
+
40: "pr-40",
|
|
430
|
+
44: "pr-44",
|
|
431
|
+
48: "pr-48",
|
|
432
|
+
52: "pr-52",
|
|
433
|
+
56: "pr-56",
|
|
434
|
+
60: "pr-60",
|
|
435
|
+
64: "pr-64",
|
|
436
|
+
72: "pr-72",
|
|
437
|
+
80: "pr-80",
|
|
438
|
+
96: "pr-96"
|
|
439
|
+
};
|
|
440
|
+
var paddingLeft = {
|
|
441
|
+
0: "pl-0",
|
|
442
|
+
1: "pl-1",
|
|
443
|
+
2: "pl-2",
|
|
444
|
+
3: "pl-3",
|
|
445
|
+
4: "pl-4",
|
|
446
|
+
5: "pl-5",
|
|
447
|
+
6: "pl-6",
|
|
448
|
+
7: "pl-7",
|
|
449
|
+
8: "pl-8",
|
|
450
|
+
9: "pl-9",
|
|
451
|
+
10: "pl-10",
|
|
452
|
+
11: "pl-11",
|
|
453
|
+
12: "pl-12",
|
|
454
|
+
14: "pl-14",
|
|
455
|
+
16: "pl-16",
|
|
456
|
+
20: "pl-20",
|
|
457
|
+
24: "pl-24",
|
|
458
|
+
28: "pl-28",
|
|
459
|
+
32: "pl-32",
|
|
460
|
+
36: "pl-36",
|
|
461
|
+
40: "pl-40",
|
|
462
|
+
44: "pl-44",
|
|
463
|
+
48: "pl-48",
|
|
464
|
+
52: "pl-52",
|
|
465
|
+
56: "pl-56",
|
|
466
|
+
60: "pl-60",
|
|
467
|
+
64: "pl-64",
|
|
468
|
+
72: "pl-72",
|
|
469
|
+
80: "pl-80",
|
|
470
|
+
96: "pl-96"
|
|
471
|
+
};
|
|
472
|
+
var paddingTop = {
|
|
473
|
+
0: "pt-0",
|
|
474
|
+
1: "pt-1",
|
|
475
|
+
2: "pt-2",
|
|
476
|
+
3: "pt-3",
|
|
477
|
+
4: "pt-4",
|
|
478
|
+
5: "pt-5",
|
|
479
|
+
6: "pt-6",
|
|
480
|
+
7: "pt-7",
|
|
481
|
+
8: "pt-8",
|
|
482
|
+
9: "pt-9",
|
|
483
|
+
10: "pt-10",
|
|
484
|
+
11: "pt-11",
|
|
485
|
+
12: "pt-12",
|
|
486
|
+
14: "pt-14",
|
|
487
|
+
16: "pt-16",
|
|
488
|
+
20: "pt-20",
|
|
489
|
+
24: "pt-24",
|
|
490
|
+
28: "pt-28",
|
|
491
|
+
32: "pt-32",
|
|
492
|
+
36: "pt-36",
|
|
493
|
+
40: "pt-40",
|
|
494
|
+
44: "pt-44",
|
|
495
|
+
48: "pt-48",
|
|
496
|
+
52: "pt-52",
|
|
497
|
+
56: "pt-56",
|
|
498
|
+
60: "pt-60",
|
|
499
|
+
64: "pt-64",
|
|
500
|
+
72: "pt-72",
|
|
501
|
+
80: "pt-80",
|
|
502
|
+
96: "pt-96"
|
|
503
|
+
};
|
|
504
|
+
var paddingBottom = {
|
|
505
|
+
0: "pb-0",
|
|
506
|
+
1: "pb-1",
|
|
507
|
+
2: "pb-2",
|
|
508
|
+
3: "pb-3",
|
|
509
|
+
4: "pb-4",
|
|
510
|
+
5: "pb-5",
|
|
511
|
+
6: "pb-6",
|
|
512
|
+
7: "pb-7",
|
|
513
|
+
8: "pb-8",
|
|
514
|
+
9: "pb-9",
|
|
515
|
+
10: "pb-10",
|
|
516
|
+
11: "pb-11",
|
|
517
|
+
12: "pb-12",
|
|
518
|
+
14: "pb-14",
|
|
519
|
+
16: "pb-16",
|
|
520
|
+
20: "pb-20",
|
|
521
|
+
24: "pb-24",
|
|
522
|
+
28: "pb-28",
|
|
523
|
+
32: "pb-32",
|
|
524
|
+
36: "pb-36",
|
|
525
|
+
40: "pb-40",
|
|
526
|
+
44: "pb-44",
|
|
527
|
+
48: "pb-48",
|
|
528
|
+
52: "pb-52",
|
|
529
|
+
56: "pb-56",
|
|
530
|
+
60: "pb-60",
|
|
531
|
+
64: "pb-64",
|
|
532
|
+
72: "pb-72",
|
|
533
|
+
80: "pb-80",
|
|
534
|
+
96: "pb-96"
|
|
535
|
+
};
|
|
536
|
+
var alignment = {
|
|
537
|
+
vertical: {
|
|
538
|
+
alignmentX: {
|
|
539
|
+
none: void 0,
|
|
540
|
+
left: "items-start",
|
|
541
|
+
center: "items-center",
|
|
542
|
+
right: "items-end"
|
|
543
|
+
},
|
|
544
|
+
alignmentY: {
|
|
545
|
+
none: void 0,
|
|
546
|
+
top: "justify-start",
|
|
547
|
+
center: "justify-center",
|
|
548
|
+
bottom: "justify-end"
|
|
549
|
+
}
|
|
550
|
+
},
|
|
551
|
+
horizontal: {
|
|
552
|
+
alignmentY: {
|
|
553
|
+
none: void 0,
|
|
554
|
+
top: "items-start",
|
|
555
|
+
center: "items-center",
|
|
556
|
+
bottom: "items-end"
|
|
557
|
+
},
|
|
558
|
+
alignmentX: {
|
|
559
|
+
none: void 0,
|
|
560
|
+
left: "justify-start",
|
|
561
|
+
center: "justify-center",
|
|
562
|
+
right: "justify-end"
|
|
563
|
+
}
|
|
378
564
|
}
|
|
379
565
|
};
|
|
566
|
+
var placeItems = {
|
|
567
|
+
none: void 0,
|
|
568
|
+
left: "place-items-start",
|
|
569
|
+
center: "place-items-center",
|
|
570
|
+
right: "place-items-end"
|
|
571
|
+
};
|
|
572
|
+
var textAlign = {
|
|
573
|
+
none: void 0,
|
|
574
|
+
left: "text-left",
|
|
575
|
+
center: "text-center",
|
|
576
|
+
right: "text-right"
|
|
577
|
+
};
|
|
578
|
+
var gridColsAlign = {
|
|
579
|
+
left: "grid-cols-[minmax(0,_var(--maxWidth))_1fr_1fr]",
|
|
580
|
+
center: "grid-cols-[1fr_minmax(0,_var(--maxWidth))_1fr]",
|
|
581
|
+
right: " grid-cols-[1fr_1fr_minmax(0,_var(--maxWidth))]"
|
|
582
|
+
};
|
|
583
|
+
var gridColumn = {
|
|
584
|
+
left: "[&>*]:col-[1]",
|
|
585
|
+
center: "[&>*]:col-[2]",
|
|
586
|
+
right: "[&>*]:col-[3]"
|
|
587
|
+
};
|
|
588
|
+
var aspect = {
|
|
589
|
+
square: "aspect-[1]",
|
|
590
|
+
landscape: "aspect-[4/3]",
|
|
591
|
+
portrait: "aspect-[3/4]",
|
|
592
|
+
widescreen: "aspect-[16/9]",
|
|
593
|
+
ultrawide: "aspect-[18/5]",
|
|
594
|
+
golden: "aspect-[1.6180/1]"
|
|
595
|
+
};
|
|
596
|
+
var objectFit = {
|
|
597
|
+
contain: "object-contain",
|
|
598
|
+
cover: "object-cover",
|
|
599
|
+
fill: "object-fill",
|
|
600
|
+
none: "unset",
|
|
601
|
+
scaleDown: "object-scale-down"
|
|
602
|
+
};
|
|
603
|
+
var objectPosition = {
|
|
604
|
+
none: void 0,
|
|
605
|
+
bottom: "object-bottom",
|
|
606
|
+
center: "object-center",
|
|
607
|
+
left: "object-left",
|
|
608
|
+
leftBottom: "object-left-bottom",
|
|
609
|
+
leftTop: "object-left-top",
|
|
610
|
+
right: "object-right",
|
|
611
|
+
rightBottom: "object-right-bottom",
|
|
612
|
+
rightTop: "object-right-top",
|
|
613
|
+
top: "object-top"
|
|
614
|
+
};
|
|
615
|
+
var cursorStyle = {
|
|
616
|
+
auto: "cursor-auto",
|
|
617
|
+
default: "cursor-default",
|
|
618
|
+
pointer: "cursor-pointer",
|
|
619
|
+
wait: "cursor-wait",
|
|
620
|
+
text: "cursor-text",
|
|
621
|
+
move: "cursor-move",
|
|
622
|
+
help: "cursor-help",
|
|
623
|
+
notAllowed: "cursor-not-allowed",
|
|
624
|
+
none: "cursor-none",
|
|
625
|
+
progress: "cursor-progress",
|
|
626
|
+
cell: "cursor-cell",
|
|
627
|
+
crosshair: "cursor-crosshair",
|
|
628
|
+
vertical: "cursor-vertical-text",
|
|
629
|
+
alias: "cursor-alias",
|
|
630
|
+
copy: "cursor-copy",
|
|
631
|
+
noDrop: "cursor-no-drop",
|
|
632
|
+
grap: "cursor-grab",
|
|
633
|
+
grapping: "cursor-grapping",
|
|
634
|
+
scroll: "cursor-all-scroll",
|
|
635
|
+
colResize: "cursor-col-resize",
|
|
636
|
+
rowResize: "cursor-row-resize",
|
|
637
|
+
ewResize: "cursor-ew-resize",
|
|
638
|
+
nsResize: "cursor-ns-resize",
|
|
639
|
+
zoomIn: "cursor-zoom-in",
|
|
640
|
+
zoomOut: "cursor-zoom-out"
|
|
641
|
+
};
|
|
380
642
|
export {
|
|
381
|
-
Box,
|
|
382
|
-
Global,
|
|
383
643
|
SVG,
|
|
384
644
|
ThemeProvider,
|
|
385
|
-
|
|
645
|
+
alignment,
|
|
646
|
+
aspect,
|
|
647
|
+
cn,
|
|
648
|
+
createVar,
|
|
649
|
+
cursorStyle,
|
|
650
|
+
cva,
|
|
386
651
|
defaultTheme,
|
|
387
|
-
|
|
388
|
-
|
|
652
|
+
fontWeight,
|
|
653
|
+
gapSpace,
|
|
654
|
+
get,
|
|
655
|
+
gridColsAlign,
|
|
656
|
+
gridColumn,
|
|
657
|
+
objectFit,
|
|
658
|
+
objectPosition,
|
|
659
|
+
paddingBottom,
|
|
660
|
+
paddingLeft,
|
|
661
|
+
paddingRight,
|
|
662
|
+
paddingSpace,
|
|
663
|
+
paddingSpaceX,
|
|
664
|
+
paddingSpaceY,
|
|
665
|
+
paddingTop,
|
|
666
|
+
placeItems,
|
|
667
|
+
textAlign,
|
|
668
|
+
textSize,
|
|
669
|
+
textStyle,
|
|
670
|
+
useClassNames,
|
|
389
671
|
useResponsiveValue,
|
|
672
|
+
useSmallScreen,
|
|
390
673
|
useStateProps,
|
|
391
|
-
useTheme
|
|
674
|
+
useTheme,
|
|
675
|
+
width
|
|
392
676
|
};
|