@pandacss/studio 0.0.0-dev-20230829122546 → 0.0.0-dev-20230829124704
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/package.json +8 -8
- package/styled-system/global.css +30 -33
- package/styled-system/helpers.mjs +165 -154
- package/styled-system/reset.css +4 -3
- package/styled-system/static.css +3 -3
- package/styled-system/styles.css +50 -50
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/studio",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20230829124704",
|
|
4
4
|
"description": "The automated token documentation for Panda CSS",
|
|
5
5
|
"main": "dist/studio.js",
|
|
6
6
|
"module": "dist/studio.mjs",
|
|
@@ -33,19 +33,19 @@
|
|
|
33
33
|
"react": "18.2.0",
|
|
34
34
|
"react-dom": "18.2.0",
|
|
35
35
|
"vite": "4.4.9",
|
|
36
|
-
"@pandacss/types": "0.0.0-dev-
|
|
37
|
-
"@pandacss/config": "0.0.0-dev-
|
|
38
|
-
"@pandacss/shared": "0.0.0-dev-
|
|
39
|
-
"@pandacss/token-dictionary": "0.0.0-dev-
|
|
40
|
-
"@pandacss/logger": "0.0.0-dev-
|
|
41
|
-
"@pandacss/node": "0.0.0-dev-
|
|
36
|
+
"@pandacss/types": "0.0.0-dev-20230829124704",
|
|
37
|
+
"@pandacss/config": "0.0.0-dev-20230829124704",
|
|
38
|
+
"@pandacss/shared": "0.0.0-dev-20230829124704",
|
|
39
|
+
"@pandacss/token-dictionary": "0.0.0-dev-20230829124704",
|
|
40
|
+
"@pandacss/logger": "0.0.0-dev-20230829124704",
|
|
41
|
+
"@pandacss/node": "0.0.0-dev-20230829124704"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/react": "18.2.18",
|
|
45
45
|
"@types/react-dom": "18.2.7",
|
|
46
46
|
"@vitejs/plugin-react": "4.0.4",
|
|
47
47
|
"execa": "7.2.0",
|
|
48
|
-
"@pandacss/dev": "0.0.0-dev-
|
|
48
|
+
"@pandacss/dev": "0.0.0-dev-20230829124704"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"codegen": "panda",
|
package/styled-system/global.css
CHANGED
|
@@ -1,30 +1,27 @@
|
|
|
1
1
|
@layer base {
|
|
2
2
|
:root {
|
|
3
|
-
--made-with-panda: '🐼'
|
|
4
|
-
|
|
3
|
+
--made-with-panda: '🐼'
|
|
4
|
+
}
|
|
5
5
|
|
|
6
|
-
*,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
--
|
|
11
|
-
--
|
|
12
|
-
--
|
|
13
|
-
--
|
|
14
|
-
--
|
|
15
|
-
--
|
|
16
|
-
--
|
|
17
|
-
--
|
|
18
|
-
--
|
|
19
|
-
--backdrop-
|
|
20
|
-
--backdrop-
|
|
21
|
-
--backdrop-
|
|
22
|
-
--backdrop-
|
|
23
|
-
--backdrop-
|
|
24
|
-
--backdrop-
|
|
25
|
-
--backdrop-opacity: ;
|
|
26
|
-
--backdrop-saturate: ;
|
|
27
|
-
--backdrop-sepia: ;
|
|
6
|
+
*, *::before, *::after, ::backdrop {
|
|
7
|
+
--blur: ;
|
|
8
|
+
--brightness: ;
|
|
9
|
+
--contrast: ;
|
|
10
|
+
--grayscale: ;
|
|
11
|
+
--hue-rotate: ;
|
|
12
|
+
--invert: ;
|
|
13
|
+
--saturate: ;
|
|
14
|
+
--sepia: ;
|
|
15
|
+
--drop-shadow: ;
|
|
16
|
+
--backdrop-blur: ;
|
|
17
|
+
--backdrop-brightness: ;
|
|
18
|
+
--backdrop-contrast: ;
|
|
19
|
+
--backdrop-grayscale: ;
|
|
20
|
+
--backdrop-hue-rotate: ;
|
|
21
|
+
--backdrop-invert: ;
|
|
22
|
+
--backdrop-opacity: ;
|
|
23
|
+
--backdrop-saturate: ;
|
|
24
|
+
--backdrop-sepia: ;
|
|
28
25
|
--scroll-snap-strictness: proximity;
|
|
29
26
|
--border-spacing-x: 0;
|
|
30
27
|
--border-spacing-y: 0;
|
|
@@ -34,8 +31,8 @@
|
|
|
34
31
|
--skew-x: 0;
|
|
35
32
|
--skew-y: 0;
|
|
36
33
|
--scale-x: 1;
|
|
37
|
-
--scale-y: 1
|
|
38
|
-
|
|
34
|
+
--scale-y: 1
|
|
35
|
+
}
|
|
39
36
|
|
|
40
37
|
:root {
|
|
41
38
|
--global-color-border: var(--colors-border);
|
|
@@ -46,16 +43,16 @@
|
|
|
46
43
|
font-weight: var(--font-weights-normal);
|
|
47
44
|
color-scheme: light dark;
|
|
48
45
|
color: var(--colors-text);
|
|
49
|
-
background: var(--colors-bg)
|
|
50
|
-
|
|
46
|
+
background: var(--colors-bg)
|
|
47
|
+
}
|
|
51
48
|
|
|
52
49
|
a {
|
|
53
50
|
color: unset;
|
|
54
|
-
text-decoration: none
|
|
55
|
-
|
|
51
|
+
text-decoration: none
|
|
52
|
+
}
|
|
56
53
|
|
|
57
54
|
body {
|
|
58
55
|
margin: var(--spacing-0);
|
|
59
|
-
min-height: 100vh
|
|
60
|
-
|
|
61
|
-
}
|
|
56
|
+
min-height: 100vh
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -1,272 +1,278 @@
|
|
|
1
1
|
// src/assert.ts
|
|
2
2
|
function isObject(value) {
|
|
3
|
-
return typeof value ===
|
|
3
|
+
return typeof value === "object" && value != null && !Array.isArray(value);
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
// src/compact.ts
|
|
7
7
|
function compact(value) {
|
|
8
|
-
return Object.fromEntries(Object.entries(value ?? {}).filter(([_, value2]) => value2 !== void 0))
|
|
8
|
+
return Object.fromEntries(Object.entries(value ?? {}).filter(([_, value2]) => value2 !== void 0));
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
// src/condition.ts
|
|
12
|
-
var isBaseCondition = (v) => v ===
|
|
12
|
+
var isBaseCondition = (v) => v === "base";
|
|
13
13
|
function filterBaseConditions(c) {
|
|
14
|
-
return c.slice().filter((v) => !isBaseCondition(v))
|
|
14
|
+
return c.slice().filter((v) => !isBaseCondition(v));
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
// src/css-important.ts
|
|
18
|
-
var importantRegex = /!(important)
|
|
18
|
+
var importantRegex = /!(important)?$/;
|
|
19
19
|
function isImportant(value) {
|
|
20
|
-
return typeof value ===
|
|
20
|
+
return typeof value === "string" ? importantRegex.test(value) : false;
|
|
21
21
|
}
|
|
22
22
|
function withoutImportant(value) {
|
|
23
|
-
return typeof value ===
|
|
23
|
+
return typeof value === "string" ? value.replace(importantRegex, "").trim() : value;
|
|
24
24
|
}
|
|
25
25
|
function withoutSpace(str) {
|
|
26
|
-
return typeof str ===
|
|
26
|
+
return typeof str === "string" ? str.replaceAll(" ", "_") : str;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
// src/hash.ts
|
|
30
30
|
function toChar(code) {
|
|
31
|
-
return String.fromCharCode(code + (code > 25 ? 39 : 97))
|
|
31
|
+
return String.fromCharCode(code + (code > 25 ? 39 : 97));
|
|
32
32
|
}
|
|
33
33
|
function toName(code) {
|
|
34
|
-
let name =
|
|
35
|
-
let x
|
|
36
|
-
for (x = Math.abs(code); x > 52; x =
|
|
37
|
-
|
|
34
|
+
let name = "";
|
|
35
|
+
let x;
|
|
36
|
+
for (x = Math.abs(code); x > 52; x = x / 52 | 0)
|
|
37
|
+
name = toChar(x % 52) + name;
|
|
38
|
+
return toChar(x % 52) + name;
|
|
38
39
|
}
|
|
39
40
|
function toPhash(h, x) {
|
|
40
|
-
let i = x.length
|
|
41
|
-
while (i)
|
|
42
|
-
|
|
41
|
+
let i = x.length;
|
|
42
|
+
while (i)
|
|
43
|
+
h = h * 33 ^ x.charCodeAt(--i);
|
|
44
|
+
return h;
|
|
43
45
|
}
|
|
44
46
|
function toHash(value) {
|
|
45
|
-
return toName(toPhash(5381, value) >>> 0)
|
|
47
|
+
return toName(toPhash(5381, value) >>> 0);
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
// src/merge-props.ts
|
|
49
51
|
function mergeProps(...sources) {
|
|
50
|
-
const result = {}
|
|
52
|
+
const result = {};
|
|
51
53
|
for (const source of sources) {
|
|
52
54
|
for (const [key, value] of Object.entries(source)) {
|
|
53
55
|
if (isObject(value)) {
|
|
54
|
-
result[key] = mergeProps(result[key] || {}, value)
|
|
56
|
+
result[key] = mergeProps(result[key] || {}, value);
|
|
55
57
|
} else {
|
|
56
|
-
result[key] = value
|
|
58
|
+
result[key] = value;
|
|
57
59
|
}
|
|
58
60
|
}
|
|
59
61
|
}
|
|
60
|
-
return result
|
|
62
|
+
return result;
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
// src/walk-object.ts
|
|
64
|
-
var isNotNullish = (element) => element != null
|
|
66
|
+
var isNotNullish = (element) => element != null;
|
|
65
67
|
function walkObject(target, predicate, options = {}) {
|
|
66
|
-
const { stop, getKey } = options
|
|
68
|
+
const { stop, getKey } = options;
|
|
67
69
|
function inner(value, path = []) {
|
|
68
70
|
if (isObject(value) || Array.isArray(value)) {
|
|
69
|
-
const result = {}
|
|
71
|
+
const result = {};
|
|
70
72
|
for (const [prop, child] of Object.entries(value)) {
|
|
71
|
-
const key = getKey?.(prop) ?? prop
|
|
72
|
-
const childPath = [...path, key]
|
|
73
|
+
const key = getKey?.(prop) ?? prop;
|
|
74
|
+
const childPath = [...path, key];
|
|
73
75
|
if (stop?.(value, childPath)) {
|
|
74
|
-
return predicate(value, path)
|
|
76
|
+
return predicate(value, path);
|
|
75
77
|
}
|
|
76
|
-
const next = inner(child, childPath)
|
|
78
|
+
const next = inner(child, childPath);
|
|
77
79
|
if (isNotNullish(next)) {
|
|
78
|
-
result[key] = next
|
|
80
|
+
result[key] = next;
|
|
79
81
|
}
|
|
80
82
|
}
|
|
81
|
-
return result
|
|
83
|
+
return result;
|
|
82
84
|
}
|
|
83
|
-
return predicate(value, path)
|
|
85
|
+
return predicate(value, path);
|
|
84
86
|
}
|
|
85
|
-
return inner(target)
|
|
87
|
+
return inner(target);
|
|
86
88
|
}
|
|
87
89
|
function mapObject(obj, fn) {
|
|
88
|
-
if (!isObject(obj))
|
|
89
|
-
|
|
90
|
+
if (!isObject(obj))
|
|
91
|
+
return fn(obj);
|
|
92
|
+
return walkObject(obj, (value) => fn(value));
|
|
90
93
|
}
|
|
91
94
|
|
|
92
95
|
// src/normalize-style-object.ts
|
|
93
96
|
function toResponsiveObject(values, breakpoints) {
|
|
94
97
|
return values.reduce((acc, current, index) => {
|
|
95
|
-
const key = breakpoints[index]
|
|
98
|
+
const key = breakpoints[index];
|
|
96
99
|
if (current != null) {
|
|
97
|
-
acc[key] = current
|
|
100
|
+
acc[key] = current;
|
|
98
101
|
}
|
|
99
|
-
return acc
|
|
100
|
-
}, {})
|
|
102
|
+
return acc;
|
|
103
|
+
}, {});
|
|
101
104
|
}
|
|
102
105
|
function normalizeShorthand(styles, context) {
|
|
103
|
-
const { hasShorthand, resolveShorthand } = context.utility
|
|
106
|
+
const { hasShorthand, resolveShorthand } = context.utility;
|
|
104
107
|
return walkObject(styles, (v) => v, {
|
|
105
108
|
getKey: (prop) => {
|
|
106
|
-
return hasShorthand ? resolveShorthand(prop) : prop
|
|
107
|
-
}
|
|
108
|
-
})
|
|
109
|
+
return hasShorthand ? resolveShorthand(prop) : prop;
|
|
110
|
+
}
|
|
111
|
+
});
|
|
109
112
|
}
|
|
110
113
|
function normalizeStyleObject(styles, context) {
|
|
111
|
-
const { utility, conditions } = context
|
|
112
|
-
const { hasShorthand, resolveShorthand } = utility
|
|
114
|
+
const { utility, conditions } = context;
|
|
115
|
+
const { hasShorthand, resolveShorthand } = utility;
|
|
113
116
|
return walkObject(
|
|
114
117
|
styles,
|
|
115
118
|
(value) => {
|
|
116
|
-
return Array.isArray(value) ? toResponsiveObject(value, conditions.breakpoints.keys) : value
|
|
119
|
+
return Array.isArray(value) ? toResponsiveObject(value, conditions.breakpoints.keys) : value;
|
|
117
120
|
},
|
|
118
121
|
{
|
|
119
122
|
stop: (value) => Array.isArray(value),
|
|
120
123
|
getKey: (prop) => {
|
|
121
|
-
return hasShorthand ? resolveShorthand(prop) : prop
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
)
|
|
124
|
+
return hasShorthand ? resolveShorthand(prop) : prop;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
);
|
|
125
128
|
}
|
|
126
129
|
|
|
127
130
|
// src/classname.ts
|
|
128
131
|
var fallbackCondition = {
|
|
129
132
|
shift: (v) => v,
|
|
130
133
|
finalize: (v) => v,
|
|
131
|
-
breakpoints: { keys: [] }
|
|
132
|
-
}
|
|
133
|
-
var sanitize = (value) =>
|
|
134
|
+
breakpoints: { keys: [] }
|
|
135
|
+
};
|
|
136
|
+
var sanitize = (value) => typeof value === "string" ? value.replaceAll(/[\n\s]+/g, " ") : value;
|
|
134
137
|
function createCss(context) {
|
|
135
|
-
const { utility, hash, conditions: conds = fallbackCondition } = context
|
|
136
|
-
const formatClassName = (str) => [utility.prefix, str].filter(Boolean).join(
|
|
138
|
+
const { utility, hash, conditions: conds = fallbackCondition } = context;
|
|
139
|
+
const formatClassName = (str) => [utility.prefix, str].filter(Boolean).join("-");
|
|
137
140
|
const hashFn = (conditions, className) => {
|
|
138
|
-
let result
|
|
141
|
+
let result;
|
|
139
142
|
if (hash) {
|
|
140
|
-
const baseArray = [...conds.finalize(conditions), className]
|
|
141
|
-
result = formatClassName(toHash(baseArray.join(
|
|
143
|
+
const baseArray = [...conds.finalize(conditions), className];
|
|
144
|
+
result = formatClassName(toHash(baseArray.join(":")));
|
|
142
145
|
} else {
|
|
143
|
-
const baseArray = [...conds.finalize(conditions), formatClassName(className)]
|
|
144
|
-
result = baseArray.join(
|
|
146
|
+
const baseArray = [...conds.finalize(conditions), formatClassName(className)];
|
|
147
|
+
result = baseArray.join(":");
|
|
145
148
|
}
|
|
146
|
-
return result
|
|
147
|
-
}
|
|
149
|
+
return result;
|
|
150
|
+
};
|
|
148
151
|
return (styleObject = {}) => {
|
|
149
|
-
const normalizedObject = normalizeStyleObject(styleObject, context)
|
|
150
|
-
const classNames = /* @__PURE__ */ new Set()
|
|
152
|
+
const normalizedObject = normalizeStyleObject(styleObject, context);
|
|
153
|
+
const classNames = /* @__PURE__ */ new Set();
|
|
151
154
|
walkObject(normalizedObject, (value, paths) => {
|
|
152
|
-
const important = isImportant(value)
|
|
153
|
-
if (value == null)
|
|
154
|
-
|
|
155
|
-
const
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
155
|
+
const important = isImportant(value);
|
|
156
|
+
if (value == null)
|
|
157
|
+
return;
|
|
158
|
+
const [prop, ...allConditions] = conds.shift(paths);
|
|
159
|
+
const conditions = filterBaseConditions(allConditions);
|
|
160
|
+
const transformed = utility.transform(prop, withoutImportant(sanitize(value)));
|
|
161
|
+
let className = hashFn(conditions, transformed.className);
|
|
162
|
+
if (important)
|
|
163
|
+
className = `${className}!`;
|
|
164
|
+
classNames.add(className);
|
|
165
|
+
});
|
|
166
|
+
return Array.from(classNames).join(" ");
|
|
167
|
+
};
|
|
163
168
|
}
|
|
164
169
|
function compactStyles(...styles) {
|
|
165
|
-
return styles.filter((style) => isObject(style) && Object.keys(compact(style)).length > 0)
|
|
170
|
+
return styles.filter((style) => isObject(style) && Object.keys(compact(style)).length > 0);
|
|
166
171
|
}
|
|
167
172
|
function createMergeCss(context) {
|
|
168
173
|
function resolve(styles) {
|
|
169
|
-
const allStyles = compactStyles(...styles)
|
|
170
|
-
if (allStyles.length === 1)
|
|
171
|
-
|
|
174
|
+
const allStyles = compactStyles(...styles);
|
|
175
|
+
if (allStyles.length === 1)
|
|
176
|
+
return allStyles;
|
|
177
|
+
return allStyles.map((style) => normalizeShorthand(style, context));
|
|
172
178
|
}
|
|
173
179
|
function mergeCss(...styles) {
|
|
174
|
-
return mergeProps(...resolve(styles))
|
|
180
|
+
return mergeProps(...resolve(styles));
|
|
175
181
|
}
|
|
176
182
|
function assignCss(...styles) {
|
|
177
|
-
return Object.assign({}, ...resolve(styles))
|
|
183
|
+
return Object.assign({}, ...resolve(styles));
|
|
178
184
|
}
|
|
179
|
-
return { mergeCss, assignCss }
|
|
185
|
+
return { mergeCss, assignCss };
|
|
180
186
|
}
|
|
181
187
|
|
|
182
188
|
// src/memo.ts
|
|
183
189
|
var memo = (fn) => {
|
|
184
|
-
const cache = /* @__PURE__ */ new Map()
|
|
190
|
+
const cache = /* @__PURE__ */ new Map();
|
|
185
191
|
const get = (...args) => {
|
|
186
|
-
const key = JSON.stringify(args)
|
|
192
|
+
const key = JSON.stringify(args);
|
|
187
193
|
if (cache.has(key)) {
|
|
188
|
-
return cache.get(key)
|
|
194
|
+
return cache.get(key);
|
|
189
195
|
}
|
|
190
|
-
const result = fn(...args)
|
|
191
|
-
cache.set(key, result)
|
|
192
|
-
return result
|
|
193
|
-
}
|
|
194
|
-
return get
|
|
195
|
-
}
|
|
196
|
+
const result = fn(...args);
|
|
197
|
+
cache.set(key, result);
|
|
198
|
+
return result;
|
|
199
|
+
};
|
|
200
|
+
return get;
|
|
201
|
+
};
|
|
196
202
|
|
|
197
203
|
// src/hypenate-property.ts
|
|
198
|
-
var wordRegex = /([A-Z])/g
|
|
199
|
-
var msRegex = /^ms
|
|
204
|
+
var wordRegex = /([A-Z])/g;
|
|
205
|
+
var msRegex = /^ms-/;
|
|
200
206
|
var hypenateProperty = memo((property) => {
|
|
201
|
-
if (property.startsWith(
|
|
202
|
-
|
|
203
|
-
|
|
207
|
+
if (property.startsWith("--"))
|
|
208
|
+
return property;
|
|
209
|
+
return property.replace(wordRegex, "-$1").replace(msRegex, "-ms-").toLowerCase();
|
|
210
|
+
});
|
|
204
211
|
|
|
205
212
|
// src/slot.ts
|
|
206
213
|
var assign = (obj, path, value) => {
|
|
207
|
-
const last = path.pop()
|
|
214
|
+
const last = path.pop();
|
|
208
215
|
const target = path.reduce((acc, key) => {
|
|
209
|
-
if (acc[key] == null)
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
216
|
+
if (acc[key] == null)
|
|
217
|
+
acc[key] = {};
|
|
218
|
+
return acc[key];
|
|
219
|
+
}, obj);
|
|
220
|
+
if (last != null)
|
|
221
|
+
target[last] = value;
|
|
222
|
+
};
|
|
214
223
|
var getSlotRecipes = (recipe) => {
|
|
215
|
-
const parts = recipe.slots
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
224
|
+
const parts = recipe.slots.map((slot) => [
|
|
225
|
+
slot,
|
|
226
|
+
// setup base recipe
|
|
227
|
+
{
|
|
228
|
+
// create class-base on BEM
|
|
229
|
+
className: [recipe.className ?? "", slot].join("__"),
|
|
230
|
+
base: {},
|
|
231
|
+
variants: {},
|
|
232
|
+
defaultVariants: recipe.defaultVariants ?? {},
|
|
233
|
+
compoundVariants: []
|
|
234
|
+
}
|
|
235
|
+
]).map(([slot, cva]) => {
|
|
236
|
+
const base = recipe.base[slot];
|
|
237
|
+
if (base)
|
|
238
|
+
cva.base = base;
|
|
239
|
+
walkObject(
|
|
240
|
+
recipe.variants ?? {},
|
|
241
|
+
(variant, path) => {
|
|
242
|
+
if (!variant[slot])
|
|
243
|
+
return;
|
|
244
|
+
assign(cva, ["variants", ...path], variant[slot]);
|
|
226
245
|
},
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
const base = recipe.base[slot]
|
|
230
|
-
if (base) cva.base = base
|
|
231
|
-
walkObject(
|
|
232
|
-
recipe.variants ?? {},
|
|
233
|
-
(variant, path) => {
|
|
234
|
-
if (!variant[slot]) return
|
|
235
|
-
assign(cva, ['variants', ...path], variant[slot])
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
stop: (_value, path) => path.includes(slot),
|
|
239
|
-
},
|
|
240
|
-
)
|
|
241
|
-
if (recipe.compoundVariants) {
|
|
242
|
-
cva.compoundVariants = getSlotCompoundVariant(recipe.compoundVariants, slot)
|
|
246
|
+
{
|
|
247
|
+
stop: (_value, path) => path.includes(slot)
|
|
243
248
|
}
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
249
|
+
);
|
|
250
|
+
if (recipe.compoundVariants) {
|
|
251
|
+
cva.compoundVariants = getSlotCompoundVariant(recipe.compoundVariants, slot);
|
|
252
|
+
}
|
|
253
|
+
return [slot, cva];
|
|
254
|
+
});
|
|
255
|
+
return Object.fromEntries(parts);
|
|
256
|
+
};
|
|
257
|
+
var getSlotCompoundVariant = (compoundVariants, slotName) => compoundVariants.filter((compoundVariant) => compoundVariant.css[slotName]).map((compoundVariant) => ({ ...compoundVariant, css: compoundVariant.css[slotName] }));
|
|
252
258
|
|
|
253
259
|
// src/split-props.ts
|
|
254
260
|
function splitProps(props, ...keys) {
|
|
255
|
-
const descriptors = Object.getOwnPropertyDescriptors(props)
|
|
256
|
-
const dKeys = Object.keys(descriptors)
|
|
261
|
+
const descriptors = Object.getOwnPropertyDescriptors(props);
|
|
262
|
+
const dKeys = Object.keys(descriptors);
|
|
257
263
|
const split = (k) => {
|
|
258
|
-
const clone = {}
|
|
264
|
+
const clone = {};
|
|
259
265
|
for (let i = 0; i < k.length; i++) {
|
|
260
|
-
const key = k[i]
|
|
266
|
+
const key = k[i];
|
|
261
267
|
if (descriptors[key]) {
|
|
262
|
-
Object.defineProperty(clone, key, descriptors[key])
|
|
263
|
-
delete descriptors[key]
|
|
268
|
+
Object.defineProperty(clone, key, descriptors[key]);
|
|
269
|
+
delete descriptors[key];
|
|
264
270
|
}
|
|
265
271
|
}
|
|
266
|
-
return clone
|
|
267
|
-
}
|
|
268
|
-
const fn = (key) => split(Array.isArray(key) ? key : dKeys.filter(key))
|
|
269
|
-
return keys.map(fn).concat(split(dKeys))
|
|
272
|
+
return clone;
|
|
273
|
+
};
|
|
274
|
+
const fn = (key) => split(Array.isArray(key) ? key : dKeys.filter(key));
|
|
275
|
+
return keys.map(fn).concat(split(dKeys));
|
|
270
276
|
}
|
|
271
277
|
export {
|
|
272
278
|
compact,
|
|
@@ -284,19 +290,24 @@ export {
|
|
|
284
290
|
splitProps,
|
|
285
291
|
toHash,
|
|
286
292
|
walkObject,
|
|
287
|
-
withoutSpace
|
|
288
|
-
}
|
|
293
|
+
withoutSpace
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
|
|
289
297
|
|
|
290
298
|
// src/normalize-html.ts
|
|
291
|
-
var htmlProps = [
|
|
299
|
+
var htmlProps = ["htmlSize", "htmlTranslate", "htmlWidth", "htmlHeight"];
|
|
292
300
|
function convert(key) {
|
|
293
|
-
return htmlProps.includes(key) ? key.replace(
|
|
301
|
+
return htmlProps.includes(key) ? key.replace("html", "").toLowerCase() : key;
|
|
294
302
|
}
|
|
295
303
|
function normalizeHTMLProps(props) {
|
|
296
|
-
return Object.fromEntries(Object.entries(props).map(([key, value]) => [convert(key), value]))
|
|
304
|
+
return Object.fromEntries(Object.entries(props).map(([key, value]) => [convert(key), value]));
|
|
297
305
|
}
|
|
298
|
-
normalizeHTMLProps.keys = htmlProps
|
|
299
|
-
export {
|
|
306
|
+
normalizeHTMLProps.keys = htmlProps;
|
|
307
|
+
export {
|
|
308
|
+
normalizeHTMLProps
|
|
309
|
+
};
|
|
310
|
+
|
|
300
311
|
|
|
301
312
|
export function __spreadValues(a, b) {
|
|
302
313
|
return { ...a, ...b }
|
|
@@ -304,4 +315,4 @@ export function __spreadValues(a, b) {
|
|
|
304
315
|
|
|
305
316
|
export function __objRest(source, exclude) {
|
|
306
317
|
return Object.fromEntries(Object.entries(source).filter(([key]) => !exclude.includes(key)))
|
|
307
|
-
}
|
|
318
|
+
}
|
package/styled-system/reset.css
CHANGED
|
@@ -16,8 +16,9 @@
|
|
|
16
16
|
|
|
17
17
|
html {
|
|
18
18
|
line-height: 1.5;
|
|
19
|
-
--font-fallback: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
|
20
|
-
Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
|
19
|
+
--font-fallback: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
|
20
|
+
'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
|
21
|
+
'Noto Color Emoji';
|
|
21
22
|
-webkit-text-size-adjust: 100%;
|
|
22
23
|
-webkit-text-size-adjust: 100%;
|
|
23
24
|
-webkit-font-smoothing: antialiased;
|
|
@@ -187,4 +188,4 @@
|
|
|
187
188
|
:-moz-focusring {
|
|
188
189
|
outline: auto;
|
|
189
190
|
}
|
|
190
|
-
}
|
|
191
|
+
}
|
package/styled-system/static.css
CHANGED
package/styled-system/styles.css
CHANGED
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
|
|
13
13
|
@layer utilities {
|
|
14
14
|
.styles\:dark\:text_green500.dark,
|
|
15
|
-
|
|
15
|
+
.dark .styles\:dark\:text_green500 {
|
|
16
16
|
color: green500;
|
|
17
|
-
|
|
17
|
+
}
|
|
18
18
|
|
|
19
19
|
.font_12px\/1\.5_Helvetica\,_Arial\,_sans-serif {
|
|
20
20
|
font: 12px/1.5 Helvetica, Arial, sans-serif;
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
|
|
51
51
|
.highlighted\:bg_border[data-highlighted] {
|
|
52
52
|
background: var(--colors-border);
|
|
53
|
-
|
|
53
|
+
}
|
|
54
54
|
|
|
55
55
|
.isolation_isolate {
|
|
56
56
|
isolation: isolate;
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
|
|
63
63
|
.expanded\:transform_rotate\(180deg\):where([aria-expanded='true'], [data-expanded]) {
|
|
64
64
|
transform: rotate(180deg);
|
|
65
|
-
|
|
65
|
+
}
|
|
66
66
|
|
|
67
67
|
.transition_all_\.2s_ease {
|
|
68
68
|
transition: all 0.2s ease;
|
|
@@ -215,35 +215,35 @@
|
|
|
215
215
|
|
|
216
216
|
.before\:content_\'\'::before {
|
|
217
217
|
content: '';
|
|
218
|
-
|
|
218
|
+
}
|
|
219
219
|
|
|
220
220
|
.before\:pos_absolute::before {
|
|
221
221
|
position: absolute;
|
|
222
|
-
|
|
222
|
+
}
|
|
223
223
|
|
|
224
224
|
.before\:rounded_sm::before {
|
|
225
225
|
border-radius: var(--radii-sm);
|
|
226
|
-
|
|
226
|
+
}
|
|
227
227
|
|
|
228
228
|
.before\:w_100\%::before {
|
|
229
229
|
width: 100%;
|
|
230
|
-
|
|
230
|
+
}
|
|
231
231
|
|
|
232
232
|
.before\:h_100\%::before {
|
|
233
233
|
height: 100%;
|
|
234
|
-
|
|
234
|
+
}
|
|
235
235
|
|
|
236
236
|
.before\:bg_24px::before {
|
|
237
237
|
background-size: 24px;
|
|
238
|
-
|
|
238
|
+
}
|
|
239
239
|
|
|
240
240
|
.before\:z_-1::before {
|
|
241
241
|
z-index: -1;
|
|
242
|
-
|
|
242
|
+
}
|
|
243
243
|
|
|
244
244
|
.before\:bg-img_check::before {
|
|
245
245
|
background-image: var(--assets-check);
|
|
246
|
-
|
|
246
|
+
}
|
|
247
247
|
|
|
248
248
|
.gap_0\.5 {
|
|
249
249
|
gap: var(--spacing-0\.5);
|
|
@@ -362,9 +362,9 @@
|
|
|
362
362
|
}
|
|
363
363
|
|
|
364
364
|
.dark\:text_neutral\.300.dark,
|
|
365
|
-
|
|
365
|
+
.dark .dark\:text_neutral\.300 {
|
|
366
366
|
color: var(--colors-neutral-300);
|
|
367
|
-
|
|
367
|
+
}
|
|
368
368
|
|
|
369
369
|
.shadow_sm {
|
|
370
370
|
box-shadow: var(--shadows-sm);
|
|
@@ -377,11 +377,11 @@
|
|
|
377
377
|
.divide-y_1px > :not([hidden]) ~ :not([hidden]) {
|
|
378
378
|
border-top-width: 1px;
|
|
379
379
|
border-bottom-width: 0px;
|
|
380
|
-
|
|
380
|
+
}
|
|
381
381
|
|
|
382
382
|
.divide_card > :not([hidden]) ~ :not([hidden]) {
|
|
383
383
|
border-color: var(--colors-card);
|
|
384
|
-
|
|
384
|
+
}
|
|
385
385
|
|
|
386
386
|
.mt_1\.5 {
|
|
387
387
|
margin-top: var(--spacing-1\.5);
|
|
@@ -401,23 +401,23 @@
|
|
|
401
401
|
|
|
402
402
|
.\[\&_svg\]\:font_normal svg {
|
|
403
403
|
font-weight: var(--font-weights-normal);
|
|
404
|
-
|
|
404
|
+
}
|
|
405
405
|
|
|
406
406
|
.\[\&_svg\]\:fs_xx-large svg {
|
|
407
407
|
font-size: xx-large;
|
|
408
|
-
|
|
408
|
+
}
|
|
409
409
|
|
|
410
410
|
.\[\&_svg\]\:mb_6 svg {
|
|
411
411
|
margin-bottom: var(--spacing-6);
|
|
412
|
-
|
|
412
|
+
}
|
|
413
413
|
|
|
414
414
|
.\[\&_svg\]\:h_6 svg {
|
|
415
415
|
height: var(--sizes-6);
|
|
416
|
-
|
|
416
|
+
}
|
|
417
417
|
|
|
418
418
|
.\[\&_svg\]\:w_6 svg {
|
|
419
419
|
width: var(--sizes-6);
|
|
420
|
-
|
|
420
|
+
}
|
|
421
421
|
|
|
422
422
|
.mt_3 {
|
|
423
423
|
margin-top: var(--spacing-3);
|
|
@@ -525,7 +525,7 @@
|
|
|
525
525
|
|
|
526
526
|
.currentPage\:text_yellow\.300[aria-current='page'] {
|
|
527
527
|
color: var(--colors-yellow-300);
|
|
528
|
-
|
|
528
|
+
}
|
|
529
529
|
|
|
530
530
|
.fs_small {
|
|
531
531
|
font-size: small;
|
|
@@ -619,7 +619,7 @@
|
|
|
619
619
|
|
|
620
620
|
.\[\&\.active\]\:text_yellow\.300.active {
|
|
621
621
|
color: var(--colors-yellow-300);
|
|
622
|
-
|
|
622
|
+
}
|
|
623
623
|
|
|
624
624
|
.sr_true {
|
|
625
625
|
position: absolute;
|
|
@@ -659,7 +659,7 @@
|
|
|
659
659
|
|
|
660
660
|
.\[\&_li\]\:cursor_pointer li {
|
|
661
661
|
cursor: pointer;
|
|
662
|
-
|
|
662
|
+
}
|
|
663
663
|
|
|
664
664
|
.list-style_none {
|
|
665
665
|
list-style: none;
|
|
@@ -959,90 +959,90 @@
|
|
|
959
959
|
|
|
960
960
|
.focusWithin\:outline-style_solid:focus-within {
|
|
961
961
|
outline-style: solid;
|
|
962
|
-
|
|
962
|
+
}
|
|
963
963
|
|
|
964
964
|
.focusWithin\:ring_2px:focus-within {
|
|
965
965
|
outline-width: 2px;
|
|
966
|
-
|
|
966
|
+
}
|
|
967
967
|
|
|
968
968
|
.focusWithin\:ring_2px:focus-within {
|
|
969
969
|
outline-offset: 2px;
|
|
970
|
-
|
|
970
|
+
}
|
|
971
971
|
|
|
972
972
|
.focusWithin\:ring_neutral\.400:focus-within {
|
|
973
973
|
outline-color: var(--colors-neutral-400);
|
|
974
|
-
|
|
974
|
+
}
|
|
975
975
|
|
|
976
976
|
.hover\:bg_gray\.100:where(:hover, [data-hover]) {
|
|
977
977
|
background-color: var(--colors-gray-100);
|
|
978
|
-
|
|
978
|
+
}
|
|
979
979
|
|
|
980
980
|
.hover\:shadow_lg:where(:hover, [data-hover]) {
|
|
981
981
|
box-shadow: var(--shadows-lg);
|
|
982
|
-
|
|
982
|
+
}
|
|
983
983
|
|
|
984
984
|
.hover\:text_yellow\.300:where(:hover, [data-hover]) {
|
|
985
985
|
color: var(--colors-yellow-300);
|
|
986
|
-
|
|
986
|
+
}
|
|
987
987
|
|
|
988
988
|
.hover\:opacity_0\.8:where(:hover, [data-hover]) {
|
|
989
989
|
opacity: 0.8;
|
|
990
|
-
|
|
990
|
+
}
|
|
991
991
|
|
|
992
992
|
.hover\:bg_border:where(:hover, [data-hover]) {
|
|
993
993
|
background-color: var(--colors-border);
|
|
994
|
-
|
|
994
|
+
}
|
|
995
995
|
|
|
996
996
|
.hover\:bg_border:where(:hover, [data-hover]) {
|
|
997
997
|
background: var(--colors-border);
|
|
998
|
-
|
|
998
|
+
}
|
|
999
999
|
|
|
1000
1000
|
.hover\:opacity_0\.6:where(:hover, [data-hover]) {
|
|
1001
1001
|
opacity: 0.6;
|
|
1002
|
-
|
|
1002
|
+
}
|
|
1003
1003
|
|
|
1004
1004
|
.hover\:opacity_1:where(:hover, [data-hover]) {
|
|
1005
1005
|
opacity: 1;
|
|
1006
|
-
|
|
1006
|
+
}
|
|
1007
1007
|
|
|
1008
1008
|
.hover\:border-b_black:where(:hover, [data-hover]) {
|
|
1009
1009
|
border-bottom-color: var(--colors-black);
|
|
1010
|
-
|
|
1010
|
+
}
|
|
1011
1011
|
|
|
1012
1012
|
.\[\&\:hover\]\:text_blue:hover {
|
|
1013
1013
|
color: blue;
|
|
1014
|
-
|
|
1014
|
+
}
|
|
1015
1015
|
|
|
1016
1016
|
.\[\&\:hover\]\:bg_\#4049f0:hover {
|
|
1017
1017
|
background: #4049f0;
|
|
1018
|
-
|
|
1018
|
+
}
|
|
1019
1019
|
|
|
1020
1020
|
.\[\&\:hover\]\:shadow_lg:hover {
|
|
1021
1021
|
box-shadow: var(--shadows-lg);
|
|
1022
|
-
|
|
1022
|
+
}
|
|
1023
1023
|
|
|
1024
1024
|
.\[\&_li\]\:hover\:opacity_0\.8 li:where(:hover, [data-hover]) {
|
|
1025
1025
|
opacity: 0.8;
|
|
1026
|
-
|
|
1026
|
+
}
|
|
1027
1027
|
|
|
1028
1028
|
@media screen and (min-width: 640px) {
|
|
1029
1029
|
@media screen and (min-width: 768px) {
|
|
1030
1030
|
.styles\:dark\:sm\:md\:text_red200.dark,
|
|
1031
|
-
|
|
1032
|
-
color: red200
|
|
1033
|
-
}
|
|
1031
|
+
.dark .styles\:dark\:sm\:md\:text_red200 {
|
|
1032
|
+
color: red200
|
|
1034
1033
|
}
|
|
1035
|
-
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
1036
|
|
|
1037
1037
|
@media screen and (min-width: 768px) {
|
|
1038
1038
|
.md\:px_6 {
|
|
1039
|
-
padding-inline: var(--spacing-6)
|
|
1040
|
-
}
|
|
1039
|
+
padding-inline: var(--spacing-6)
|
|
1041
1040
|
}
|
|
1041
|
+
}
|
|
1042
1042
|
|
|
1043
1043
|
@media screen and (min-width: 1024px) {
|
|
1044
1044
|
.lg\:px_8 {
|
|
1045
|
-
padding-inline: var(--spacing-8)
|
|
1046
|
-
}
|
|
1045
|
+
padding-inline: var(--spacing-8)
|
|
1047
1046
|
}
|
|
1048
|
-
}
|
|
1047
|
+
}
|
|
1048
|
+
}
|