@pandacss/generator 1.4.3 → 1.5.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.js CHANGED
@@ -1158,6 +1158,8 @@ interface Dict {
1158
1158
  [k: string]: unknown
1159
1159
  }
1160
1160
 
1161
+ export type DataAttrs = Record<\`data-\${string}\`, unknown>
1162
+
1161
1163
  export interface UnstyledProps {
1162
1164
  /**
1163
1165
  * Whether to remove recipe styles
@@ -1183,7 +1185,7 @@ interface RecipeFn {
1183
1185
 
1184
1186
  export interface JsxFactoryOptions<TProps extends Dict> {
1185
1187
  dataAttr?: boolean
1186
- defaultProps?: Partial<TProps>
1188
+ defaultProps?: Partial<TProps> & DataAttrs
1187
1189
  shouldForwardProp?: (prop: string, variantKeys: string[]) => boolean
1188
1190
  forwardProps?: string[]
1189
1191
  }
@@ -1326,7 +1328,7 @@ function generatePreactCreateStyleContext(ctx) {
1326
1328
  dts: import_outdent17.outdent`
1327
1329
  ${ctx.file.importType("SlotRecipeRuntimeFn, RecipeVariantProps", "../types/recipe")}
1328
1330
  ${ctx.file.importType("JsxHTMLProps, JsxStyleProps, Assign", "../types/system-types")}
1329
- ${ctx.file.importType("JsxFactoryOptions", "../types/jsx")}
1331
+ ${ctx.file.importType("JsxFactoryOptions, DataAttrs", "../types/jsx")}
1330
1332
  import type { ComponentType, ComponentProps, JSX } from 'preact/compat'
1331
1333
 
1332
1334
  interface UnstyledProps {
@@ -1334,7 +1336,7 @@ function generatePreactCreateStyleContext(ctx) {
1334
1336
  }
1335
1337
 
1336
1338
  interface WithProviderOptions<P = {}> {
1337
- defaultProps?: Partial<P> | undefined
1339
+ defaultProps?: (Partial<P> & DataAttrs) | undefined
1338
1340
  }
1339
1341
 
1340
1342
  type ElementType = JSX.ElementType
@@ -1689,6 +1691,8 @@ interface Dict {
1689
1691
  [k: string]: unknown
1690
1692
  }
1691
1693
 
1694
+ export type DataAttrs = Record<\`data-\${string}\`, unknown>
1695
+
1692
1696
  export interface UnstyledProps {
1693
1697
  /**
1694
1698
  * Whether to remove recipe styles
@@ -1711,7 +1715,7 @@ interface RecipeFn {
1711
1715
 
1712
1716
  export interface JsxFactoryOptions<TProps extends Dict> {
1713
1717
  dataAttr?: boolean
1714
- defaultProps?: Partial<TProps>
1718
+ defaultProps?: Partial<TProps> & DataAttrs
1715
1719
  shouldForwardProp?: (prop: string, variantKeys: string[]) => boolean
1716
1720
  forwardProps?: string[]
1717
1721
  }
@@ -2046,6 +2050,8 @@ interface Dict {
2046
2050
  [k: string]: unknown
2047
2051
  }
2048
2052
 
2053
+ export type DataAttrs = Record<\`data-\${string}\`, unknown>
2054
+
2049
2055
  export interface UnstyledProps {
2050
2056
  /**
2051
2057
  * Whether to remove recipe styles
@@ -2075,7 +2081,7 @@ interface RecipeFn {
2075
2081
 
2076
2082
  export interface JsxFactoryOptions<TProps extends Dict> {
2077
2083
  dataAttr?: boolean
2078
- defaultProps?: Partial<TProps>
2084
+ defaultProps?: Partial<TProps> & DataAttrs
2079
2085
  shouldForwardProp?: (prop: string, variantKeys: string[]) => boolean
2080
2086
  forwardProps?: string[]
2081
2087
  }
@@ -2217,7 +2223,7 @@ function generateReactCreateStyleContext(ctx) {
2217
2223
  dts: import_outdent28.outdent`
2218
2224
  ${ctx.file.importType("SlotRecipeRuntimeFn, RecipeVariantProps", "../types/recipe")}
2219
2225
  ${ctx.file.importType("JsxHTMLProps, JsxStyleProps, Assign", "../types/system-types")}
2220
- ${ctx.file.importType("JsxFactoryOptions, ComponentProps", "../types/jsx")}
2226
+ ${ctx.file.importType("JsxFactoryOptions, ComponentProps, DataAttrs", "../types/jsx")}
2221
2227
  import type { ComponentType, ElementType } from 'react'
2222
2228
 
2223
2229
  interface UnstyledProps {
@@ -2231,11 +2237,11 @@ function generateReactCreateStyleContext(ctx) {
2231
2237
  (props?: any): any
2232
2238
  }
2233
2239
  type SlotRecipe = SvaFn | SlotRecipeFn
2234
-
2240
+
2235
2241
  type InferSlot<R extends SlotRecipe> = R extends SlotRecipeFn ? R['__slot'] : R extends SvaFn<infer S> ? S : never
2236
-
2242
+
2237
2243
  interface WithProviderOptions<P = {}> {
2238
- defaultProps?: Partial<P> | undefined
2244
+ defaultProps?: (Partial<P> & DataAttrs) | undefined
2239
2245
  }
2240
2246
 
2241
2247
  type StyleContextProvider<T extends ElementType, R extends SlotRecipe> = ComponentType<
@@ -2625,6 +2631,8 @@ interface Dict {
2625
2631
  [k: string]: unknown
2626
2632
  }
2627
2633
 
2634
+ export type DataAttrs = Record<\`data-\${string}\`, unknown>
2635
+
2628
2636
  export interface UnstyledProps {
2629
2637
  /**
2630
2638
  * Whether to remove recipe styles
@@ -2652,7 +2660,7 @@ interface RecipeFn {
2652
2660
 
2653
2661
  export interface JsxFactoryOptions<TProps extends Dict> {
2654
2662
  dataAttr?: boolean
2655
- defaultProps?: Partial<TProps>
2663
+ defaultProps?: Partial<TProps> & DataAttrs
2656
2664
  shouldForwardProp?: (prop: string, variantKeys: string[]) => boolean
2657
2665
  forwardProps?: string[]
2658
2666
  }
@@ -2839,7 +2847,7 @@ function generateSolidCreateStyleContext(ctx) {
2839
2847
  dts: import_outdent34.outdent`
2840
2848
  ${ctx.file.importType("SlotRecipeRuntimeFn, RecipeVariantProps", "../types/recipe")}
2841
2849
  ${ctx.file.importType("JsxHTMLProps, JsxStyleProps, Assign", "../types/system-types")}
2842
- ${ctx.file.importType("JsxFactoryOptions", "../types/jsx")}
2850
+ ${ctx.file.importType("JsxFactoryOptions, DataAttrs", "../types/jsx")}
2843
2851
  import type { Component, JSX, ComponentProps } from 'solid-js'
2844
2852
 
2845
2853
  interface UnstyledProps {
@@ -2847,7 +2855,7 @@ function generateSolidCreateStyleContext(ctx) {
2847
2855
  }
2848
2856
 
2849
2857
  interface WithProviderOptions<P> {
2850
- defaultProps?: Partial<P> | undefined
2858
+ defaultProps?: (Partial<P> & DataAttrs) | undefined
2851
2859
  }
2852
2860
 
2853
2861
  type ElementType = keyof JSX.IntrinsicElements | Component<any>
@@ -3261,6 +3269,8 @@ interface Dict {
3261
3269
  [k: string]: unknown
3262
3270
  }
3263
3271
 
3272
+ export type DataAttrs = Record<\`data-\${string}\`, unknown>
3273
+
3264
3274
  export interface UnstyledProps {
3265
3275
  /**
3266
3276
  * Whether to remove recipe styles
@@ -3285,7 +3295,7 @@ interface RecipeFn {
3285
3295
 
3286
3296
  export interface JsxFactoryOptions<TProps extends Dict> {
3287
3297
  dataAttr?: boolean
3288
- defaultProps?: Partial<TProps>
3298
+ defaultProps?: Partial<TProps> & DataAttrs
3289
3299
  shouldForwardProp?: (prop: string, variantKeys: string[]) => boolean
3290
3300
  forwardProps?: string[]
3291
3301
  }
@@ -3452,7 +3462,7 @@ function generateVueCreateStyleContext(ctx) {
3452
3462
  dts: import_outdent40.outdent`
3453
3463
  ${ctx.file.importType("SlotRecipeRuntimeFn, RecipeVariantProps", "../types/recipe")}
3454
3464
  ${ctx.file.importType("JsxHTMLProps, JsxStyleProps, Assign", "../types/system-types")}
3455
- ${ctx.file.importType("JsxFactoryOptions", "../types/jsx")}
3465
+ ${ctx.file.importType("JsxFactoryOptions, DataAttrs", "../types/jsx")}
3456
3466
  import type { Component, FunctionalComponent, NativeElements } from 'vue'
3457
3467
 
3458
3468
  interface UnstyledProps {
@@ -3460,7 +3470,7 @@ function generateVueCreateStyleContext(ctx) {
3460
3470
  }
3461
3471
 
3462
3472
  interface WithProviderOptions<P = {}> {
3463
- defaultProps?: Partial<P> | undefined
3473
+ defaultProps?: (Partial<P> & DataAttrs) | undefined
3464
3474
  }
3465
3475
 
3466
3476
  // Add v-model support types
package/dist/index.mjs CHANGED
@@ -1122,6 +1122,8 @@ interface Dict {
1122
1122
  [k: string]: unknown
1123
1123
  }
1124
1124
 
1125
+ export type DataAttrs = Record<\`data-\${string}\`, unknown>
1126
+
1125
1127
  export interface UnstyledProps {
1126
1128
  /**
1127
1129
  * Whether to remove recipe styles
@@ -1147,7 +1149,7 @@ interface RecipeFn {
1147
1149
 
1148
1150
  export interface JsxFactoryOptions<TProps extends Dict> {
1149
1151
  dataAttr?: boolean
1150
- defaultProps?: Partial<TProps>
1152
+ defaultProps?: Partial<TProps> & DataAttrs
1151
1153
  shouldForwardProp?: (prop: string, variantKeys: string[]) => boolean
1152
1154
  forwardProps?: string[]
1153
1155
  }
@@ -1290,7 +1292,7 @@ function generatePreactCreateStyleContext(ctx) {
1290
1292
  dts: outdent17`
1291
1293
  ${ctx.file.importType("SlotRecipeRuntimeFn, RecipeVariantProps", "../types/recipe")}
1292
1294
  ${ctx.file.importType("JsxHTMLProps, JsxStyleProps, Assign", "../types/system-types")}
1293
- ${ctx.file.importType("JsxFactoryOptions", "../types/jsx")}
1295
+ ${ctx.file.importType("JsxFactoryOptions, DataAttrs", "../types/jsx")}
1294
1296
  import type { ComponentType, ComponentProps, JSX } from 'preact/compat'
1295
1297
 
1296
1298
  interface UnstyledProps {
@@ -1298,7 +1300,7 @@ function generatePreactCreateStyleContext(ctx) {
1298
1300
  }
1299
1301
 
1300
1302
  interface WithProviderOptions<P = {}> {
1301
- defaultProps?: Partial<P> | undefined
1303
+ defaultProps?: (Partial<P> & DataAttrs) | undefined
1302
1304
  }
1303
1305
 
1304
1306
  type ElementType = JSX.ElementType
@@ -1653,6 +1655,8 @@ interface Dict {
1653
1655
  [k: string]: unknown
1654
1656
  }
1655
1657
 
1658
+ export type DataAttrs = Record<\`data-\${string}\`, unknown>
1659
+
1656
1660
  export interface UnstyledProps {
1657
1661
  /**
1658
1662
  * Whether to remove recipe styles
@@ -1675,7 +1679,7 @@ interface RecipeFn {
1675
1679
 
1676
1680
  export interface JsxFactoryOptions<TProps extends Dict> {
1677
1681
  dataAttr?: boolean
1678
- defaultProps?: Partial<TProps>
1682
+ defaultProps?: Partial<TProps> & DataAttrs
1679
1683
  shouldForwardProp?: (prop: string, variantKeys: string[]) => boolean
1680
1684
  forwardProps?: string[]
1681
1685
  }
@@ -2010,6 +2014,8 @@ interface Dict {
2010
2014
  [k: string]: unknown
2011
2015
  }
2012
2016
 
2017
+ export type DataAttrs = Record<\`data-\${string}\`, unknown>
2018
+
2013
2019
  export interface UnstyledProps {
2014
2020
  /**
2015
2021
  * Whether to remove recipe styles
@@ -2039,7 +2045,7 @@ interface RecipeFn {
2039
2045
 
2040
2046
  export interface JsxFactoryOptions<TProps extends Dict> {
2041
2047
  dataAttr?: boolean
2042
- defaultProps?: Partial<TProps>
2048
+ defaultProps?: Partial<TProps> & DataAttrs
2043
2049
  shouldForwardProp?: (prop: string, variantKeys: string[]) => boolean
2044
2050
  forwardProps?: string[]
2045
2051
  }
@@ -2181,7 +2187,7 @@ function generateReactCreateStyleContext(ctx) {
2181
2187
  dts: outdent28`
2182
2188
  ${ctx.file.importType("SlotRecipeRuntimeFn, RecipeVariantProps", "../types/recipe")}
2183
2189
  ${ctx.file.importType("JsxHTMLProps, JsxStyleProps, Assign", "../types/system-types")}
2184
- ${ctx.file.importType("JsxFactoryOptions, ComponentProps", "../types/jsx")}
2190
+ ${ctx.file.importType("JsxFactoryOptions, ComponentProps, DataAttrs", "../types/jsx")}
2185
2191
  import type { ComponentType, ElementType } from 'react'
2186
2192
 
2187
2193
  interface UnstyledProps {
@@ -2195,11 +2201,11 @@ function generateReactCreateStyleContext(ctx) {
2195
2201
  (props?: any): any
2196
2202
  }
2197
2203
  type SlotRecipe = SvaFn | SlotRecipeFn
2198
-
2204
+
2199
2205
  type InferSlot<R extends SlotRecipe> = R extends SlotRecipeFn ? R['__slot'] : R extends SvaFn<infer S> ? S : never
2200
-
2206
+
2201
2207
  interface WithProviderOptions<P = {}> {
2202
- defaultProps?: Partial<P> | undefined
2208
+ defaultProps?: (Partial<P> & DataAttrs) | undefined
2203
2209
  }
2204
2210
 
2205
2211
  type StyleContextProvider<T extends ElementType, R extends SlotRecipe> = ComponentType<
@@ -2589,6 +2595,8 @@ interface Dict {
2589
2595
  [k: string]: unknown
2590
2596
  }
2591
2597
 
2598
+ export type DataAttrs = Record<\`data-\${string}\`, unknown>
2599
+
2592
2600
  export interface UnstyledProps {
2593
2601
  /**
2594
2602
  * Whether to remove recipe styles
@@ -2616,7 +2624,7 @@ interface RecipeFn {
2616
2624
 
2617
2625
  export interface JsxFactoryOptions<TProps extends Dict> {
2618
2626
  dataAttr?: boolean
2619
- defaultProps?: Partial<TProps>
2627
+ defaultProps?: Partial<TProps> & DataAttrs
2620
2628
  shouldForwardProp?: (prop: string, variantKeys: string[]) => boolean
2621
2629
  forwardProps?: string[]
2622
2630
  }
@@ -2803,7 +2811,7 @@ function generateSolidCreateStyleContext(ctx) {
2803
2811
  dts: outdent34`
2804
2812
  ${ctx.file.importType("SlotRecipeRuntimeFn, RecipeVariantProps", "../types/recipe")}
2805
2813
  ${ctx.file.importType("JsxHTMLProps, JsxStyleProps, Assign", "../types/system-types")}
2806
- ${ctx.file.importType("JsxFactoryOptions", "../types/jsx")}
2814
+ ${ctx.file.importType("JsxFactoryOptions, DataAttrs", "../types/jsx")}
2807
2815
  import type { Component, JSX, ComponentProps } from 'solid-js'
2808
2816
 
2809
2817
  interface UnstyledProps {
@@ -2811,7 +2819,7 @@ function generateSolidCreateStyleContext(ctx) {
2811
2819
  }
2812
2820
 
2813
2821
  interface WithProviderOptions<P> {
2814
- defaultProps?: Partial<P> | undefined
2822
+ defaultProps?: (Partial<P> & DataAttrs) | undefined
2815
2823
  }
2816
2824
 
2817
2825
  type ElementType = keyof JSX.IntrinsicElements | Component<any>
@@ -3225,6 +3233,8 @@ interface Dict {
3225
3233
  [k: string]: unknown
3226
3234
  }
3227
3235
 
3236
+ export type DataAttrs = Record<\`data-\${string}\`, unknown>
3237
+
3228
3238
  export interface UnstyledProps {
3229
3239
  /**
3230
3240
  * Whether to remove recipe styles
@@ -3249,7 +3259,7 @@ interface RecipeFn {
3249
3259
 
3250
3260
  export interface JsxFactoryOptions<TProps extends Dict> {
3251
3261
  dataAttr?: boolean
3252
- defaultProps?: Partial<TProps>
3262
+ defaultProps?: Partial<TProps> & DataAttrs
3253
3263
  shouldForwardProp?: (prop: string, variantKeys: string[]) => boolean
3254
3264
  forwardProps?: string[]
3255
3265
  }
@@ -3416,7 +3426,7 @@ function generateVueCreateStyleContext(ctx) {
3416
3426
  dts: outdent40`
3417
3427
  ${ctx.file.importType("SlotRecipeRuntimeFn, RecipeVariantProps", "../types/recipe")}
3418
3428
  ${ctx.file.importType("JsxHTMLProps, JsxStyleProps, Assign", "../types/system-types")}
3419
- ${ctx.file.importType("JsxFactoryOptions", "../types/jsx")}
3429
+ ${ctx.file.importType("JsxFactoryOptions, DataAttrs", "../types/jsx")}
3420
3430
  import type { Component, FunctionalComponent, NativeElements } from 'vue'
3421
3431
 
3422
3432
  interface UnstyledProps {
@@ -3424,7 +3434,7 @@ function generateVueCreateStyleContext(ctx) {
3424
3434
  }
3425
3435
 
3426
3436
  interface WithProviderOptions<P = {}> {
3427
- defaultProps?: Partial<P> | undefined
3437
+ defaultProps?: (Partial<P> & DataAttrs) | undefined
3428
3438
  }
3429
3439
 
3430
3440
  // Add v-model support types
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/generator",
3
- "version": "1.4.3",
3
+ "version": "1.5.0",
4
4
  "description": "The css generator for css panda",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -38,12 +38,12 @@
38
38
  "pluralize": "8.0.0",
39
39
  "postcss": "8.5.6",
40
40
  "ts-pattern": "5.8.0",
41
- "@pandacss/core": "1.4.3",
42
- "@pandacss/is-valid-prop": "^1.4.3",
43
- "@pandacss/logger": "1.4.3",
44
- "@pandacss/shared": "1.4.3",
45
- "@pandacss/token-dictionary": "1.4.3",
46
- "@pandacss/types": "1.4.3"
41
+ "@pandacss/core": "1.5.0",
42
+ "@pandacss/is-valid-prop": "^1.5.0",
43
+ "@pandacss/logger": "1.5.0",
44
+ "@pandacss/shared": "1.5.0",
45
+ "@pandacss/token-dictionary": "1.5.0",
46
+ "@pandacss/types": "1.5.0"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/pluralize": "0.0.33"