@pandacss/generator 0.0.0-dev-20230526204157 → 0.0.0-dev-20230528210957
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.js +16 -8
- package/dist/index.mjs +16 -8
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -214,15 +214,20 @@ function generateResetCss(scope = "") {
|
|
|
214
214
|
box-sizing: border-box;
|
|
215
215
|
border-width: 0;
|
|
216
216
|
border-style: solid;
|
|
217
|
+
border-color: var(--global-color-border, currentColor);
|
|
217
218
|
}
|
|
218
219
|
|
|
219
220
|
${scope || "html"} {
|
|
220
221
|
line-height: 1.5;
|
|
222
|
+
--font-fallback: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
|
223
|
+
'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
|
224
|
+
'Noto Color Emoji';
|
|
221
225
|
-webkit-text-size-adjust: 100%;
|
|
222
226
|
-webkit-text-size-adjust: 100%;
|
|
223
227
|
-webkit-font-smoothing: antialiased;
|
|
224
228
|
-moz-tab-size: 4;
|
|
225
229
|
tab-size: 4;
|
|
230
|
+
font-family: var(--global-font-body, var(--font-fallback));
|
|
226
231
|
}
|
|
227
232
|
|
|
228
233
|
${selector}hr {
|
|
@@ -303,6 +308,7 @@ function generateResetCss(scope = "") {
|
|
|
303
308
|
${selector}input::placeholder,
|
|
304
309
|
${selector}textarea::placeholder {
|
|
305
310
|
opacity: 1;
|
|
311
|
+
color: var(--global-color-placeholder, #9ca3af);
|
|
306
312
|
}
|
|
307
313
|
|
|
308
314
|
${selector}textarea {
|
|
@@ -356,6 +362,8 @@ function generateResetCss(scope = "") {
|
|
|
356
362
|
${selector}samp,
|
|
357
363
|
${selector}pre {
|
|
358
364
|
font-size: 1em;
|
|
365
|
+
--font-mono-fallback: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
|
|
366
|
+
font-family: var(--global-font-mono, var(--font-fallback));
|
|
359
367
|
}
|
|
360
368
|
|
|
361
369
|
${selector}[type='search'] {
|
|
@@ -996,8 +1004,8 @@ function generatePreactJsxFactory(ctx) {
|
|
|
996
1004
|
const ${componentName} = forwardRef(function ${componentName}(props, ref) {
|
|
997
1005
|
const { as: Element = Dynamic, ...restProps } = props
|
|
998
1006
|
|
|
999
|
-
const [
|
|
1000
|
-
return splitProps(restProps,
|
|
1007
|
+
const [variantProps, styleProps, htmlProps, elementProps] = useMemo(() => {
|
|
1008
|
+
return splitProps(restProps, cvaFn.variantKeys, isCssProperty, normalizeHTMLProps.keys)
|
|
1001
1009
|
}, [restProps])
|
|
1002
1010
|
|
|
1003
1011
|
function classes() {
|
|
@@ -1135,8 +1143,8 @@ function generateReactJsxFactory(ctx) {
|
|
|
1135
1143
|
const ${componentName} = forwardRef(function ${componentName}(props, ref) {
|
|
1136
1144
|
const { as: Element = Dynamic, ...restProps } = props
|
|
1137
1145
|
|
|
1138
|
-
const [
|
|
1139
|
-
return splitProps(restProps,
|
|
1146
|
+
const [variantProps, styleProps, htmlProps, elementProps] = useMemo(() => {
|
|
1147
|
+
return splitProps(restProps, cvaFn.variantKeys, isCssProperty, normalizeHTMLProps.keys)
|
|
1140
1148
|
}, [restProps])
|
|
1141
1149
|
|
|
1142
1150
|
function classes() {
|
|
@@ -1274,11 +1282,11 @@ function generateSolidJsxFactory(ctx) {
|
|
|
1274
1282
|
return function ${componentName}(props) {
|
|
1275
1283
|
const mergedProps = mergeProps({ as: element }, props)
|
|
1276
1284
|
|
|
1277
|
-
const [localProps,
|
|
1285
|
+
const [localProps, variantProps, styleProps, htmlProps, elementProps] = splitProps(
|
|
1278
1286
|
mergedProps,
|
|
1279
1287
|
['as', 'class'],
|
|
1280
|
-
allCssProperties,
|
|
1281
1288
|
cvaFn.variantKeys,
|
|
1289
|
+
allCssProperties,
|
|
1282
1290
|
normalizeHTMLProps.keys
|
|
1283
1291
|
)
|
|
1284
1292
|
|
|
@@ -1426,11 +1434,11 @@ function generateVueJsxFactory(ctx) {
|
|
|
1426
1434
|
props: { as: { type: [String, Object], default: Dynamic } },
|
|
1427
1435
|
setup(props, { slots, attrs }) {
|
|
1428
1436
|
const splittedProps = computed(() => {
|
|
1429
|
-
return splitProps(attrs,
|
|
1437
|
+
return splitProps(attrs, cvaFn.variantKeys, isCssProperty, normalizeHTMLProps.keys)
|
|
1430
1438
|
})
|
|
1431
1439
|
|
|
1432
1440
|
const classes = computed(() => {
|
|
1433
|
-
const [
|
|
1441
|
+
const [variantProps, styleProps, _htmlProps, elementProps] = splittedProps.value
|
|
1434
1442
|
const { css: cssStyles, ...propStyles } = styleProps
|
|
1435
1443
|
const cvaStyles = cvaFn.resolve(variantProps)
|
|
1436
1444
|
const styles = assignCss(cvaStyles, propStyles, cssStyles)
|
package/dist/index.mjs
CHANGED
|
@@ -183,15 +183,20 @@ function generateResetCss(scope = "") {
|
|
|
183
183
|
box-sizing: border-box;
|
|
184
184
|
border-width: 0;
|
|
185
185
|
border-style: solid;
|
|
186
|
+
border-color: var(--global-color-border, currentColor);
|
|
186
187
|
}
|
|
187
188
|
|
|
188
189
|
${scope || "html"} {
|
|
189
190
|
line-height: 1.5;
|
|
191
|
+
--font-fallback: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
|
192
|
+
'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
|
193
|
+
'Noto Color Emoji';
|
|
190
194
|
-webkit-text-size-adjust: 100%;
|
|
191
195
|
-webkit-text-size-adjust: 100%;
|
|
192
196
|
-webkit-font-smoothing: antialiased;
|
|
193
197
|
-moz-tab-size: 4;
|
|
194
198
|
tab-size: 4;
|
|
199
|
+
font-family: var(--global-font-body, var(--font-fallback));
|
|
195
200
|
}
|
|
196
201
|
|
|
197
202
|
${selector}hr {
|
|
@@ -272,6 +277,7 @@ function generateResetCss(scope = "") {
|
|
|
272
277
|
${selector}input::placeholder,
|
|
273
278
|
${selector}textarea::placeholder {
|
|
274
279
|
opacity: 1;
|
|
280
|
+
color: var(--global-color-placeholder, #9ca3af);
|
|
275
281
|
}
|
|
276
282
|
|
|
277
283
|
${selector}textarea {
|
|
@@ -325,6 +331,8 @@ function generateResetCss(scope = "") {
|
|
|
325
331
|
${selector}samp,
|
|
326
332
|
${selector}pre {
|
|
327
333
|
font-size: 1em;
|
|
334
|
+
--font-mono-fallback: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
|
|
335
|
+
font-family: var(--global-font-mono, var(--font-fallback));
|
|
328
336
|
}
|
|
329
337
|
|
|
330
338
|
${selector}[type='search'] {
|
|
@@ -965,8 +973,8 @@ function generatePreactJsxFactory(ctx) {
|
|
|
965
973
|
const ${componentName} = forwardRef(function ${componentName}(props, ref) {
|
|
966
974
|
const { as: Element = Dynamic, ...restProps } = props
|
|
967
975
|
|
|
968
|
-
const [
|
|
969
|
-
return splitProps(restProps,
|
|
976
|
+
const [variantProps, styleProps, htmlProps, elementProps] = useMemo(() => {
|
|
977
|
+
return splitProps(restProps, cvaFn.variantKeys, isCssProperty, normalizeHTMLProps.keys)
|
|
970
978
|
}, [restProps])
|
|
971
979
|
|
|
972
980
|
function classes() {
|
|
@@ -1104,8 +1112,8 @@ function generateReactJsxFactory(ctx) {
|
|
|
1104
1112
|
const ${componentName} = forwardRef(function ${componentName}(props, ref) {
|
|
1105
1113
|
const { as: Element = Dynamic, ...restProps } = props
|
|
1106
1114
|
|
|
1107
|
-
const [
|
|
1108
|
-
return splitProps(restProps,
|
|
1115
|
+
const [variantProps, styleProps, htmlProps, elementProps] = useMemo(() => {
|
|
1116
|
+
return splitProps(restProps, cvaFn.variantKeys, isCssProperty, normalizeHTMLProps.keys)
|
|
1109
1117
|
}, [restProps])
|
|
1110
1118
|
|
|
1111
1119
|
function classes() {
|
|
@@ -1243,11 +1251,11 @@ function generateSolidJsxFactory(ctx) {
|
|
|
1243
1251
|
return function ${componentName}(props) {
|
|
1244
1252
|
const mergedProps = mergeProps({ as: element }, props)
|
|
1245
1253
|
|
|
1246
|
-
const [localProps,
|
|
1254
|
+
const [localProps, variantProps, styleProps, htmlProps, elementProps] = splitProps(
|
|
1247
1255
|
mergedProps,
|
|
1248
1256
|
['as', 'class'],
|
|
1249
|
-
allCssProperties,
|
|
1250
1257
|
cvaFn.variantKeys,
|
|
1258
|
+
allCssProperties,
|
|
1251
1259
|
normalizeHTMLProps.keys
|
|
1252
1260
|
)
|
|
1253
1261
|
|
|
@@ -1395,11 +1403,11 @@ function generateVueJsxFactory(ctx) {
|
|
|
1395
1403
|
props: { as: { type: [String, Object], default: Dynamic } },
|
|
1396
1404
|
setup(props, { slots, attrs }) {
|
|
1397
1405
|
const splittedProps = computed(() => {
|
|
1398
|
-
return splitProps(attrs,
|
|
1406
|
+
return splitProps(attrs, cvaFn.variantKeys, isCssProperty, normalizeHTMLProps.keys)
|
|
1399
1407
|
})
|
|
1400
1408
|
|
|
1401
1409
|
const classes = computed(() => {
|
|
1402
|
-
const [
|
|
1410
|
+
const [variantProps, styleProps, _htmlProps, elementProps] = splittedProps.value
|
|
1403
1411
|
const { css: cssStyles, ...propStyles } = styleProps
|
|
1404
1412
|
const cvaStyles = cvaFn.resolve(variantProps)
|
|
1405
1413
|
const styles = assignCss(cvaStyles, propStyles, cssStyles)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/generator",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20230528210957",
|
|
4
4
|
"description": "The css generator for css panda",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -20,16 +20,16 @@
|
|
|
20
20
|
"pluralize": "8.0.0",
|
|
21
21
|
"postcss": "8.4.23",
|
|
22
22
|
"ts-pattern": "4.3.0",
|
|
23
|
-
"@pandacss/core": "0.0.0-dev-
|
|
24
|
-
"@pandacss/logger": "0.0.0-dev-
|
|
25
|
-
"@pandacss/is-valid-prop": "0.0.0-dev-
|
|
26
|
-
"@pandacss/shared": "0.0.0-dev-
|
|
27
|
-
"@pandacss/types": "0.0.0-dev-
|
|
28
|
-
"@pandacss/token-dictionary": "0.0.0-dev-
|
|
23
|
+
"@pandacss/core": "0.0.0-dev-20230528210957",
|
|
24
|
+
"@pandacss/logger": "0.0.0-dev-20230528210957",
|
|
25
|
+
"@pandacss/is-valid-prop": "0.0.0-dev-20230528210957",
|
|
26
|
+
"@pandacss/shared": "0.0.0-dev-20230528210957",
|
|
27
|
+
"@pandacss/types": "0.0.0-dev-20230528210957",
|
|
28
|
+
"@pandacss/token-dictionary": "0.0.0-dev-20230528210957"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/pluralize": "0.0.29",
|
|
32
|
-
"@pandacss/fixture": "0.0.0-dev-
|
|
32
|
+
"@pandacss/fixture": "0.0.0-dev-20230528210957"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"prebuild": "tsx scripts/prebuild.ts",
|