@yahoo/uds 3.152.1 → 3.153.1-beta.1
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/automated-config/dist/generated/autoVariants.cjs +25 -0
- package/dist/automated-config/dist/generated/autoVariants.d.cts +6 -0
- package/dist/automated-config/dist/generated/autoVariants.d.ts +6 -0
- package/dist/automated-config/dist/generated/autoVariants.js +25 -0
- package/dist/automated-config/dist/generated/generatedConfigs.cjs +1368 -0
- package/dist/automated-config/dist/generated/generatedConfigs.d.cts +169 -1
- package/dist/automated-config/dist/generated/generatedConfigs.d.ts +169 -1
- package/dist/automated-config/dist/generated/generatedConfigs.js +1368 -1
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.cjs +198 -0
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.d.cts +2 -1
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.d.ts +2 -1
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.js +198 -0
- package/dist/automated-config/dist/types/ComponentConfig.d.cts +2 -0
- package/dist/automated-config/dist/types/ComponentConfig.d.ts +2 -0
- package/dist/automated-config/dist/utils/buildConfigSchema.cjs +13 -20
- package/dist/automated-config/dist/utils/buildConfigSchema.d.cts +14 -2
- package/dist/automated-config/dist/utils/buildConfigSchema.d.ts +14 -2
- package/dist/automated-config/dist/utils/buildConfigSchema.js +13 -20
- package/dist/automated-config/dist/utils/componentStatePseudoStates.cjs +15 -0
- package/dist/automated-config/dist/utils/componentStatePseudoStates.js +14 -0
- package/dist/automated-config/dist/utils/getConfigVariantPseudoStates.cjs +4 -2
- package/dist/automated-config/dist/utils/getConfigVariantPseudoStates.d.cts +1 -1
- package/dist/automated-config/dist/utils/getConfigVariantPseudoStates.d.ts +1 -1
- package/dist/automated-config/dist/utils/getConfigVariantPseudoStates.js +4 -2
- package/dist/automated-config/dist/utils/index.cjs +114 -48
- package/dist/automated-config/dist/utils/index.d.cts +25 -2
- package/dist/automated-config/dist/utils/index.d.ts +25 -2
- package/dist/automated-config/dist/utils/index.js +114 -49
- package/dist/components/client/IconButton.cjs +1 -1
- package/dist/components/client/IconButton.js +1 -1
- package/dist/components/client/Menu/Menu.ItemCheckbox.d.cts +1 -1
- package/dist/components/client/Menu/Menu.ItemCheckbox.d.ts +1 -1
- package/dist/components/client/Pagination/Pagination.cjs +62 -0
- package/dist/components/client/Pagination/Pagination.d.cts +28 -0
- package/dist/components/client/Pagination/Pagination.d.ts +29 -0
- package/dist/components/client/Pagination/Pagination.js +60 -0
- package/dist/components/client/Pagination/PaginationEllipsis.cjs +24 -0
- package/dist/components/client/Pagination/PaginationEllipsis.d.cts +10 -0
- package/dist/components/client/Pagination/PaginationEllipsis.d.ts +11 -0
- package/dist/components/client/Pagination/PaginationEllipsis.js +22 -0
- package/dist/components/client/Pagination/PaginationItem.cjs +52 -0
- package/dist/components/client/Pagination/PaginationItem.d.cts +10 -0
- package/dist/components/client/Pagination/PaginationItem.d.ts +11 -0
- package/dist/components/client/Pagination/PaginationItem.js +50 -0
- package/dist/components/client/Pagination/PaginationLink.cjs +53 -0
- package/dist/components/client/Pagination/PaginationLink.d.cts +9 -0
- package/dist/components/client/Pagination/PaginationLink.d.ts +10 -0
- package/dist/components/client/Pagination/PaginationLink.js +51 -0
- package/dist/components/client/Pagination/PaginationNext.cjs +56 -0
- package/dist/components/client/Pagination/PaginationNext.d.cts +9 -0
- package/dist/components/client/Pagination/PaginationNext.d.ts +10 -0
- package/dist/components/client/Pagination/PaginationNext.js +54 -0
- package/dist/components/client/Pagination/PaginationNumbers.cjs +52 -0
- package/dist/components/client/Pagination/PaginationNumbers.d.cts +9 -0
- package/dist/components/client/Pagination/PaginationNumbers.d.ts +10 -0
- package/dist/components/client/Pagination/PaginationNumbers.js +50 -0
- package/dist/components/client/Pagination/PaginationPrev.cjs +56 -0
- package/dist/components/client/Pagination/PaginationPrev.d.cts +9 -0
- package/dist/components/client/Pagination/PaginationPrev.d.ts +10 -0
- package/dist/components/client/Pagination/PaginationPrev.js +54 -0
- package/dist/components/client/Pagination/computeVisiblePages.cjs +22 -0
- package/dist/components/client/Pagination/computeVisiblePages.d.cts +18 -0
- package/dist/components/client/Pagination/computeVisiblePages.d.ts +19 -0
- package/dist/components/client/Pagination/computeVisiblePages.js +21 -0
- package/dist/components/client/Pagination/ellipsisDefault.cjs +33 -0
- package/dist/components/client/Pagination/ellipsisDefault.d.cts +10 -0
- package/dist/components/client/Pagination/ellipsisDefault.d.ts +11 -0
- package/dist/components/client/Pagination/ellipsisDefault.js +32 -0
- package/dist/components/client/Pagination/ellipsisNone.cjs +29 -0
- package/dist/components/client/Pagination/ellipsisNone.d.cts +10 -0
- package/dist/components/client/Pagination/ellipsisNone.d.ts +11 -0
- package/dist/components/client/Pagination/ellipsisNone.js +28 -0
- package/dist/components/client/Pagination/index.cjs +19 -0
- package/dist/components/client/Pagination/index.d.cts +10 -0
- package/dist/components/client/Pagination/index.d.ts +11 -0
- package/dist/components/client/Pagination/index.js +11 -0
- package/dist/components/client/Pagination/paginationContext.cjs +44 -0
- package/dist/components/client/Pagination/paginationContext.d.cts +34 -0
- package/dist/components/client/Pagination/paginationContext.d.ts +35 -0
- package/dist/components/client/Pagination/paginationContext.js +38 -0
- package/dist/components/client/Pagination/paginationStyles.cjs +72 -0
- package/dist/components/client/Pagination/paginationStyles.d.cts +14 -0
- package/dist/components/client/Pagination/paginationStyles.d.ts +15 -0
- package/dist/components/client/Pagination/paginationStyles.js +63 -0
- package/dist/components/client/Popover/UDSPopoverConfigProvider.d.cts +1 -1
- package/dist/components/client/Popover/UDSPopoverConfigProvider.d.ts +1 -1
- package/dist/components/client/index.cjs +14 -0
- package/dist/components/client/index.d.cts +8 -1
- package/dist/components/client/index.d.ts +8 -1
- package/dist/components/client/index.js +8 -1
- package/dist/components/index.cjs +14 -0
- package/dist/components/index.d.cts +8 -1
- package/dist/components/index.d.ts +8 -1
- package/dist/components/index.js +8 -1
- package/dist/config/dist/index.cjs +272 -2
- package/dist/config/dist/index.js +272 -2
- package/dist/css/dist/css/utils.cjs +5 -1
- package/dist/css/dist/css/utils.js +5 -1
- package/dist/css/dist/packages/config/dist/index.cjs +272 -2
- package/dist/css/dist/packages/config/dist/index.js +272 -2
- package/dist/css/dist/purger/optimized/utils/safelist.cjs +7 -0
- package/dist/css/dist/purger/optimized/utils/safelist.js +7 -0
- package/dist/index.cjs +16 -0
- package/dist/index.d.cts +11 -4
- package/dist/index.d.ts +11 -4
- package/dist/index.js +10 -3
- package/dist/styles/styler.d.cts +65 -59
- package/dist/styles/styler.d.ts +65 -59
- package/dist/styles/variants.d.cts +27 -0
- package/dist/styles/variants.d.ts +27 -0
- package/dist/tailwind-internal/dist/packages/automated-config/dist/generated/generatedConfigs.cjs +1368 -0
- package/dist/tailwind-internal/dist/packages/automated-config/dist/generated/generatedConfigs.js +1368 -1
- package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/componentStatePseudoStates.cjs +16 -0
- package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/componentStatePseudoStates.js +15 -0
- package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/index.cjs +113 -48
- package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/index.js +113 -48
- package/dist/tailwind-internal/dist/packages/config/dist/index.cjs +272 -2
- package/dist/tailwind-internal/dist/packages/config/dist/index.js +272 -2
- package/dist/tailwind-internal/dist/plugins/components.cjs +1 -0
- package/dist/tailwind-internal/dist/plugins/components.js +2 -1
- package/dist/tailwind-internal/dist/utils/getShadowStyles.d.cts +2 -2
- package/dist/tailwind-internal/dist/utils/getShadowStyles.d.ts +2 -2
- package/dist/tokens/automation/configs/index.cjs +1 -0
- package/dist/tokens/automation/configs/index.d.cts +2 -2
- package/dist/tokens/automation/configs/index.d.ts +2 -2
- package/dist/tokens/automation/configs/index.js +2 -2
- package/dist/tokens/automation/index.cjs +2 -0
- package/dist/tokens/automation/index.d.cts +3 -3
- package/dist/tokens/automation/index.d.ts +3 -3
- package/dist/tokens/automation/index.js +3 -3
- package/dist/tokens/index.cjs +2 -0
- package/dist/tokens/index.d.cts +4 -4
- package/dist/tokens/index.d.ts +4 -4
- package/dist/tokens/index.js +3 -3
- package/dist/tokens/types.d.cts +2 -2
- package/dist/tokens/types.d.ts +2 -2
- package/dist/types/dist/index.d.cts +83 -1
- package/dist/types/dist/index.d.ts +83 -1
- package/dist/uds/generated/componentData.cjs +1069 -690
- package/dist/uds/generated/componentData.js +1069 -690
- package/dist/uds/generated/tailwindPurge.cjs +115 -84
- package/dist/uds/generated/tailwindPurge.js +115 -84
- package/dist/uds/package.cjs +1 -0
- package/dist/uds/package.js +1 -0
- package/generated/componentData.json +1323 -864
- package/generated/tailwindPurge.ts +4 -4
- package/package.json +2 -1
|
@@ -12092,6 +12092,204 @@ const defaultUniversalTokensConfigAuto = {
|
|
|
12092
12092
|
}
|
|
12093
12093
|
}
|
|
12094
12094
|
},
|
|
12095
|
+
pagination: {
|
|
12096
|
+
defaults: {
|
|
12097
|
+
size: "md",
|
|
12098
|
+
variant: "default"
|
|
12099
|
+
},
|
|
12100
|
+
variables: {
|
|
12101
|
+
"size/md/icon": { size: { rest: {
|
|
12102
|
+
type: "iconSizes",
|
|
12103
|
+
value: "sm",
|
|
12104
|
+
valueType: "alias"
|
|
12105
|
+
} } },
|
|
12106
|
+
"size/md/item": {
|
|
12107
|
+
borderRadius: { rest: {
|
|
12108
|
+
type: "borderRadii",
|
|
12109
|
+
value: "full",
|
|
12110
|
+
valueType: "alias"
|
|
12111
|
+
} },
|
|
12112
|
+
spacing: { rest: {
|
|
12113
|
+
type: "spacingAliases",
|
|
12114
|
+
value: "2",
|
|
12115
|
+
valueType: "alias"
|
|
12116
|
+
} }
|
|
12117
|
+
},
|
|
12118
|
+
"size/md/root": { gap: { rest: {
|
|
12119
|
+
type: "spacingAliases",
|
|
12120
|
+
value: "1",
|
|
12121
|
+
valueType: "alias"
|
|
12122
|
+
} } },
|
|
12123
|
+
"size/md/text": { textVariant: { rest: {
|
|
12124
|
+
type: "textVariants",
|
|
12125
|
+
value: "ui2",
|
|
12126
|
+
valueType: "alias"
|
|
12127
|
+
} } },
|
|
12128
|
+
"size/sm/icon": { size: { rest: {
|
|
12129
|
+
type: "iconSizes",
|
|
12130
|
+
value: "sm",
|
|
12131
|
+
valueType: "alias"
|
|
12132
|
+
} } },
|
|
12133
|
+
"size/sm/item": {
|
|
12134
|
+
borderRadius: { rest: {
|
|
12135
|
+
type: "borderRadii",
|
|
12136
|
+
value: "full",
|
|
12137
|
+
valueType: "alias"
|
|
12138
|
+
} },
|
|
12139
|
+
spacing: { rest: {
|
|
12140
|
+
type: "spacingAliases",
|
|
12141
|
+
value: "1.5",
|
|
12142
|
+
valueType: "alias"
|
|
12143
|
+
} }
|
|
12144
|
+
},
|
|
12145
|
+
"size/sm/root": { gap: { rest: {
|
|
12146
|
+
type: "spacingAliases",
|
|
12147
|
+
value: "1",
|
|
12148
|
+
valueType: "alias"
|
|
12149
|
+
} } },
|
|
12150
|
+
"size/sm/text": { textVariant: { rest: {
|
|
12151
|
+
type: "textVariants",
|
|
12152
|
+
value: "ui2",
|
|
12153
|
+
valueType: "alias"
|
|
12154
|
+
} } },
|
|
12155
|
+
"variant/default/active/off/root": {
|
|
12156
|
+
backgroundColor: {
|
|
12157
|
+
hover: {
|
|
12158
|
+
type: "alwaysPaletteAliases",
|
|
12159
|
+
value: "always/transparent",
|
|
12160
|
+
valueType: "alias"
|
|
12161
|
+
},
|
|
12162
|
+
pressed: {
|
|
12163
|
+
type: "alwaysPaletteAliases",
|
|
12164
|
+
value: "always/transparent",
|
|
12165
|
+
valueType: "alias"
|
|
12166
|
+
},
|
|
12167
|
+
rest: {
|
|
12168
|
+
type: "alwaysPaletteAliases",
|
|
12169
|
+
value: "always/transparent",
|
|
12170
|
+
valueType: "alias"
|
|
12171
|
+
}
|
|
12172
|
+
},
|
|
12173
|
+
borderColor: {
|
|
12174
|
+
hover: {
|
|
12175
|
+
type: "alwaysPaletteAliases",
|
|
12176
|
+
value: "always/transparent",
|
|
12177
|
+
valueType: "alias"
|
|
12178
|
+
},
|
|
12179
|
+
pressed: {
|
|
12180
|
+
type: "alwaysPaletteAliases",
|
|
12181
|
+
value: "always/transparent",
|
|
12182
|
+
valueType: "alias"
|
|
12183
|
+
},
|
|
12184
|
+
rest: {
|
|
12185
|
+
type: "alwaysPaletteAliases",
|
|
12186
|
+
value: "always/transparent",
|
|
12187
|
+
valueType: "alias"
|
|
12188
|
+
}
|
|
12189
|
+
},
|
|
12190
|
+
borderWidth: {
|
|
12191
|
+
hover: {
|
|
12192
|
+
type: "borderWidths",
|
|
12193
|
+
value: "none",
|
|
12194
|
+
valueType: "alias"
|
|
12195
|
+
},
|
|
12196
|
+
pressed: {
|
|
12197
|
+
type: "borderWidths",
|
|
12198
|
+
value: "none",
|
|
12199
|
+
valueType: "alias"
|
|
12200
|
+
},
|
|
12201
|
+
rest: {
|
|
12202
|
+
type: "borderWidths",
|
|
12203
|
+
value: "none",
|
|
12204
|
+
valueType: "alias"
|
|
12205
|
+
}
|
|
12206
|
+
},
|
|
12207
|
+
color: {
|
|
12208
|
+
hover: {
|
|
12209
|
+
type: "foregroundPaletteColors",
|
|
12210
|
+
value: "secondary",
|
|
12211
|
+
valueType: "alias"
|
|
12212
|
+
},
|
|
12213
|
+
pressed: {
|
|
12214
|
+
type: "foregroundPaletteColors",
|
|
12215
|
+
value: "secondary",
|
|
12216
|
+
valueType: "alias"
|
|
12217
|
+
},
|
|
12218
|
+
rest: {
|
|
12219
|
+
type: "foregroundPaletteColors",
|
|
12220
|
+
value: "secondary",
|
|
12221
|
+
valueType: "alias"
|
|
12222
|
+
}
|
|
12223
|
+
},
|
|
12224
|
+
insetShadow: {
|
|
12225
|
+
hover: {
|
|
12226
|
+
type: "shadowVariantsWithInvert",
|
|
12227
|
+
value: "none",
|
|
12228
|
+
valueType: "alias"
|
|
12229
|
+
},
|
|
12230
|
+
pressed: {
|
|
12231
|
+
type: "shadowVariantsWithInvert",
|
|
12232
|
+
value: "none",
|
|
12233
|
+
valueType: "alias"
|
|
12234
|
+
},
|
|
12235
|
+
rest: {
|
|
12236
|
+
type: "shadowVariantsWithInvert",
|
|
12237
|
+
value: "none",
|
|
12238
|
+
valueType: "alias"
|
|
12239
|
+
}
|
|
12240
|
+
},
|
|
12241
|
+
shadow: {
|
|
12242
|
+
hover: {
|
|
12243
|
+
type: "shadowVariants",
|
|
12244
|
+
value: "none",
|
|
12245
|
+
valueType: "alias"
|
|
12246
|
+
},
|
|
12247
|
+
pressed: {
|
|
12248
|
+
type: "shadowVariants",
|
|
12249
|
+
value: "none",
|
|
12250
|
+
valueType: "alias"
|
|
12251
|
+
},
|
|
12252
|
+
rest: {
|
|
12253
|
+
type: "shadowVariants",
|
|
12254
|
+
value: "none",
|
|
12255
|
+
valueType: "alias"
|
|
12256
|
+
}
|
|
12257
|
+
}
|
|
12258
|
+
},
|
|
12259
|
+
"variant/default/active/on/root": {
|
|
12260
|
+
backgroundColor: { rest: {
|
|
12261
|
+
type: "alwaysPaletteAliases",
|
|
12262
|
+
value: "always/transparent",
|
|
12263
|
+
valueType: "alias"
|
|
12264
|
+
} },
|
|
12265
|
+
borderColor: { rest: {
|
|
12266
|
+
type: "alwaysPaletteAliases",
|
|
12267
|
+
value: "always/transparent",
|
|
12268
|
+
valueType: "alias"
|
|
12269
|
+
} },
|
|
12270
|
+
borderWidth: { rest: {
|
|
12271
|
+
type: "borderWidths",
|
|
12272
|
+
value: "none",
|
|
12273
|
+
valueType: "alias"
|
|
12274
|
+
} },
|
|
12275
|
+
color: { rest: {
|
|
12276
|
+
type: "foregroundPaletteColors",
|
|
12277
|
+
value: "secondary",
|
|
12278
|
+
valueType: "alias"
|
|
12279
|
+
} },
|
|
12280
|
+
insetShadow: { rest: {
|
|
12281
|
+
type: "shadowVariantsWithInvert",
|
|
12282
|
+
value: "none",
|
|
12283
|
+
valueType: "alias"
|
|
12284
|
+
} },
|
|
12285
|
+
shadow: { rest: {
|
|
12286
|
+
type: "shadowVariants",
|
|
12287
|
+
value: "none",
|
|
12288
|
+
valueType: "alias"
|
|
12289
|
+
} }
|
|
12290
|
+
}
|
|
12291
|
+
}
|
|
12292
|
+
},
|
|
12095
12293
|
popover: {
|
|
12096
12294
|
defaults: {
|
|
12097
12295
|
size: "default",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { AvatarConfig, BadgeConfig, BannerConfig, BottomSheetConfig, ButtonConfig, CheckboxConfig, ChipConfig, DividerConfig, IconButtonConfig, InputConfig, LinkConfig, MenuContentConfig, MenuItemConfig, ModalConfig, PaddleNavConfig, PopoverConfig, RadioConfig, ScrimConfig, SwitchConfig, TabConfig, TabsConfig, ToastConfig, TooltipConfig } from "./generatedConfigs.cjs";
|
|
2
|
+
import { AvatarConfig, BadgeConfig, BannerConfig, BottomSheetConfig, ButtonConfig, CheckboxConfig, ChipConfig, DividerConfig, IconButtonConfig, InputConfig, LinkConfig, MenuContentConfig, MenuItemConfig, ModalConfig, PaddleNavConfig, PaginationConfig, PopoverConfig, RadioConfig, ScrimConfig, SwitchConfig, TabConfig, TabsConfig, ToastConfig, TooltipConfig } from "./generatedConfigs.cjs";
|
|
3
3
|
import { ComponentSchema } from "../utils/buildConfigSchema.cjs";
|
|
4
4
|
|
|
5
5
|
//#region ../automated-config/dist/generated/universalTokensConfigAuto.d.ts
|
|
@@ -20,6 +20,7 @@ interface UniversalTokensConfigAuto {
|
|
|
20
20
|
menuItem: ComponentSchema<typeof MenuItemConfig>;
|
|
21
21
|
modal: ComponentSchema<typeof ModalConfig>;
|
|
22
22
|
paddleNav: ComponentSchema<typeof PaddleNavConfig>;
|
|
23
|
+
pagination: ComponentSchema<typeof PaginationConfig>;
|
|
23
24
|
popover: ComponentSchema<typeof PopoverConfig>;
|
|
24
25
|
radio: ComponentSchema<typeof RadioConfig>;
|
|
25
26
|
scrim: ComponentSchema<typeof ScrimConfig>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { AvatarConfig, BadgeConfig, BannerConfig, BottomSheetConfig, ButtonConfig, CheckboxConfig, ChipConfig, DividerConfig, IconButtonConfig, InputConfig, LinkConfig, MenuContentConfig, MenuItemConfig, ModalConfig, PaddleNavConfig, PopoverConfig, RadioConfig, ScrimConfig, SwitchConfig, TabConfig, TabsConfig, ToastConfig, TooltipConfig } from "./generatedConfigs.js";
|
|
2
|
+
import { AvatarConfig, BadgeConfig, BannerConfig, BottomSheetConfig, ButtonConfig, CheckboxConfig, ChipConfig, DividerConfig, IconButtonConfig, InputConfig, LinkConfig, MenuContentConfig, MenuItemConfig, ModalConfig, PaddleNavConfig, PaginationConfig, PopoverConfig, RadioConfig, ScrimConfig, SwitchConfig, TabConfig, TabsConfig, ToastConfig, TooltipConfig } from "./generatedConfigs.js";
|
|
3
3
|
import { ComponentSchema } from "../utils/buildConfigSchema.js";
|
|
4
4
|
|
|
5
5
|
//#region ../automated-config/dist/generated/universalTokensConfigAuto.d.ts
|
|
@@ -20,6 +20,7 @@ interface UniversalTokensConfigAuto {
|
|
|
20
20
|
menuItem: ComponentSchema<typeof MenuItemConfig>;
|
|
21
21
|
modal: ComponentSchema<typeof ModalConfig>;
|
|
22
22
|
paddleNav: ComponentSchema<typeof PaddleNavConfig>;
|
|
23
|
+
pagination: ComponentSchema<typeof PaginationConfig>;
|
|
23
24
|
popover: ComponentSchema<typeof PopoverConfig>;
|
|
24
25
|
radio: ComponentSchema<typeof RadioConfig>;
|
|
25
26
|
scrim: ComponentSchema<typeof ScrimConfig>;
|
|
@@ -12092,6 +12092,204 @@ const defaultUniversalTokensConfigAuto = {
|
|
|
12092
12092
|
}
|
|
12093
12093
|
}
|
|
12094
12094
|
},
|
|
12095
|
+
pagination: {
|
|
12096
|
+
defaults: {
|
|
12097
|
+
size: "md",
|
|
12098
|
+
variant: "default"
|
|
12099
|
+
},
|
|
12100
|
+
variables: {
|
|
12101
|
+
"size/md/icon": { size: { rest: {
|
|
12102
|
+
type: "iconSizes",
|
|
12103
|
+
value: "sm",
|
|
12104
|
+
valueType: "alias"
|
|
12105
|
+
} } },
|
|
12106
|
+
"size/md/item": {
|
|
12107
|
+
borderRadius: { rest: {
|
|
12108
|
+
type: "borderRadii",
|
|
12109
|
+
value: "full",
|
|
12110
|
+
valueType: "alias"
|
|
12111
|
+
} },
|
|
12112
|
+
spacing: { rest: {
|
|
12113
|
+
type: "spacingAliases",
|
|
12114
|
+
value: "2",
|
|
12115
|
+
valueType: "alias"
|
|
12116
|
+
} }
|
|
12117
|
+
},
|
|
12118
|
+
"size/md/root": { gap: { rest: {
|
|
12119
|
+
type: "spacingAliases",
|
|
12120
|
+
value: "1",
|
|
12121
|
+
valueType: "alias"
|
|
12122
|
+
} } },
|
|
12123
|
+
"size/md/text": { textVariant: { rest: {
|
|
12124
|
+
type: "textVariants",
|
|
12125
|
+
value: "ui2",
|
|
12126
|
+
valueType: "alias"
|
|
12127
|
+
} } },
|
|
12128
|
+
"size/sm/icon": { size: { rest: {
|
|
12129
|
+
type: "iconSizes",
|
|
12130
|
+
value: "sm",
|
|
12131
|
+
valueType: "alias"
|
|
12132
|
+
} } },
|
|
12133
|
+
"size/sm/item": {
|
|
12134
|
+
borderRadius: { rest: {
|
|
12135
|
+
type: "borderRadii",
|
|
12136
|
+
value: "full",
|
|
12137
|
+
valueType: "alias"
|
|
12138
|
+
} },
|
|
12139
|
+
spacing: { rest: {
|
|
12140
|
+
type: "spacingAliases",
|
|
12141
|
+
value: "1.5",
|
|
12142
|
+
valueType: "alias"
|
|
12143
|
+
} }
|
|
12144
|
+
},
|
|
12145
|
+
"size/sm/root": { gap: { rest: {
|
|
12146
|
+
type: "spacingAliases",
|
|
12147
|
+
value: "1",
|
|
12148
|
+
valueType: "alias"
|
|
12149
|
+
} } },
|
|
12150
|
+
"size/sm/text": { textVariant: { rest: {
|
|
12151
|
+
type: "textVariants",
|
|
12152
|
+
value: "ui2",
|
|
12153
|
+
valueType: "alias"
|
|
12154
|
+
} } },
|
|
12155
|
+
"variant/default/active/off/root": {
|
|
12156
|
+
backgroundColor: {
|
|
12157
|
+
hover: {
|
|
12158
|
+
type: "alwaysPaletteAliases",
|
|
12159
|
+
value: "always/transparent",
|
|
12160
|
+
valueType: "alias"
|
|
12161
|
+
},
|
|
12162
|
+
pressed: {
|
|
12163
|
+
type: "alwaysPaletteAliases",
|
|
12164
|
+
value: "always/transparent",
|
|
12165
|
+
valueType: "alias"
|
|
12166
|
+
},
|
|
12167
|
+
rest: {
|
|
12168
|
+
type: "alwaysPaletteAliases",
|
|
12169
|
+
value: "always/transparent",
|
|
12170
|
+
valueType: "alias"
|
|
12171
|
+
}
|
|
12172
|
+
},
|
|
12173
|
+
borderColor: {
|
|
12174
|
+
hover: {
|
|
12175
|
+
type: "alwaysPaletteAliases",
|
|
12176
|
+
value: "always/transparent",
|
|
12177
|
+
valueType: "alias"
|
|
12178
|
+
},
|
|
12179
|
+
pressed: {
|
|
12180
|
+
type: "alwaysPaletteAliases",
|
|
12181
|
+
value: "always/transparent",
|
|
12182
|
+
valueType: "alias"
|
|
12183
|
+
},
|
|
12184
|
+
rest: {
|
|
12185
|
+
type: "alwaysPaletteAliases",
|
|
12186
|
+
value: "always/transparent",
|
|
12187
|
+
valueType: "alias"
|
|
12188
|
+
}
|
|
12189
|
+
},
|
|
12190
|
+
borderWidth: {
|
|
12191
|
+
hover: {
|
|
12192
|
+
type: "borderWidths",
|
|
12193
|
+
value: "none",
|
|
12194
|
+
valueType: "alias"
|
|
12195
|
+
},
|
|
12196
|
+
pressed: {
|
|
12197
|
+
type: "borderWidths",
|
|
12198
|
+
value: "none",
|
|
12199
|
+
valueType: "alias"
|
|
12200
|
+
},
|
|
12201
|
+
rest: {
|
|
12202
|
+
type: "borderWidths",
|
|
12203
|
+
value: "none",
|
|
12204
|
+
valueType: "alias"
|
|
12205
|
+
}
|
|
12206
|
+
},
|
|
12207
|
+
color: {
|
|
12208
|
+
hover: {
|
|
12209
|
+
type: "foregroundPaletteColors",
|
|
12210
|
+
value: "secondary",
|
|
12211
|
+
valueType: "alias"
|
|
12212
|
+
},
|
|
12213
|
+
pressed: {
|
|
12214
|
+
type: "foregroundPaletteColors",
|
|
12215
|
+
value: "secondary",
|
|
12216
|
+
valueType: "alias"
|
|
12217
|
+
},
|
|
12218
|
+
rest: {
|
|
12219
|
+
type: "foregroundPaletteColors",
|
|
12220
|
+
value: "secondary",
|
|
12221
|
+
valueType: "alias"
|
|
12222
|
+
}
|
|
12223
|
+
},
|
|
12224
|
+
insetShadow: {
|
|
12225
|
+
hover: {
|
|
12226
|
+
type: "shadowVariantsWithInvert",
|
|
12227
|
+
value: "none",
|
|
12228
|
+
valueType: "alias"
|
|
12229
|
+
},
|
|
12230
|
+
pressed: {
|
|
12231
|
+
type: "shadowVariantsWithInvert",
|
|
12232
|
+
value: "none",
|
|
12233
|
+
valueType: "alias"
|
|
12234
|
+
},
|
|
12235
|
+
rest: {
|
|
12236
|
+
type: "shadowVariantsWithInvert",
|
|
12237
|
+
value: "none",
|
|
12238
|
+
valueType: "alias"
|
|
12239
|
+
}
|
|
12240
|
+
},
|
|
12241
|
+
shadow: {
|
|
12242
|
+
hover: {
|
|
12243
|
+
type: "shadowVariants",
|
|
12244
|
+
value: "none",
|
|
12245
|
+
valueType: "alias"
|
|
12246
|
+
},
|
|
12247
|
+
pressed: {
|
|
12248
|
+
type: "shadowVariants",
|
|
12249
|
+
value: "none",
|
|
12250
|
+
valueType: "alias"
|
|
12251
|
+
},
|
|
12252
|
+
rest: {
|
|
12253
|
+
type: "shadowVariants",
|
|
12254
|
+
value: "none",
|
|
12255
|
+
valueType: "alias"
|
|
12256
|
+
}
|
|
12257
|
+
}
|
|
12258
|
+
},
|
|
12259
|
+
"variant/default/active/on/root": {
|
|
12260
|
+
backgroundColor: { rest: {
|
|
12261
|
+
type: "alwaysPaletteAliases",
|
|
12262
|
+
value: "always/transparent",
|
|
12263
|
+
valueType: "alias"
|
|
12264
|
+
} },
|
|
12265
|
+
borderColor: { rest: {
|
|
12266
|
+
type: "alwaysPaletteAliases",
|
|
12267
|
+
value: "always/transparent",
|
|
12268
|
+
valueType: "alias"
|
|
12269
|
+
} },
|
|
12270
|
+
borderWidth: { rest: {
|
|
12271
|
+
type: "borderWidths",
|
|
12272
|
+
value: "none",
|
|
12273
|
+
valueType: "alias"
|
|
12274
|
+
} },
|
|
12275
|
+
color: { rest: {
|
|
12276
|
+
type: "foregroundPaletteColors",
|
|
12277
|
+
value: "secondary",
|
|
12278
|
+
valueType: "alias"
|
|
12279
|
+
} },
|
|
12280
|
+
insetShadow: { rest: {
|
|
12281
|
+
type: "shadowVariantsWithInvert",
|
|
12282
|
+
value: "none",
|
|
12283
|
+
valueType: "alias"
|
|
12284
|
+
} },
|
|
12285
|
+
shadow: { rest: {
|
|
12286
|
+
type: "shadowVariants",
|
|
12287
|
+
value: "none",
|
|
12288
|
+
valueType: "alias"
|
|
12289
|
+
} }
|
|
12290
|
+
}
|
|
12291
|
+
}
|
|
12292
|
+
},
|
|
12095
12293
|
popover: {
|
|
12096
12294
|
defaults: {
|
|
12097
12295
|
size: "default",
|
|
@@ -20,6 +20,8 @@ interface LayerConfig {
|
|
|
20
20
|
interface ComponentStateConfig {
|
|
21
21
|
label: string;
|
|
22
22
|
options: readonly string[];
|
|
23
|
+
/** Pseudo-states to omit for specific component state options (e.g. active/on). */
|
|
24
|
+
excludePseudoStatesForOptions?: Partial<Record<string, readonly PossibleStates[]>>;
|
|
23
25
|
layers: {
|
|
24
26
|
root: LayerConfig;
|
|
25
27
|
} & Record<string, LayerConfig>;
|
|
@@ -20,6 +20,8 @@ interface LayerConfig {
|
|
|
20
20
|
interface ComponentStateConfig {
|
|
21
21
|
label: string;
|
|
22
22
|
options: readonly string[];
|
|
23
|
+
/** Pseudo-states to omit for specific component state options (e.g. active/on). */
|
|
24
|
+
excludePseudoStatesForOptions?: Partial<Record<string, readonly PossibleStates[]>>;
|
|
23
25
|
layers: {
|
|
24
26
|
root: LayerConfig;
|
|
25
27
|
} & Record<string, LayerConfig>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
const require_componentStatePseudoStates = require("./componentStatePseudoStates.cjs");
|
|
2
3
|
const require_generateSchemaKey = require("./generateSchemaKey.cjs");
|
|
3
4
|
const require_variantConfigGuards = require("./variantConfigGuards.cjs");
|
|
4
5
|
const require_util = require("../../../fixtures/src/util.cjs");
|
|
@@ -16,6 +17,14 @@ function findFixtureTypeForValue(property, value) {
|
|
|
16
17
|
function findFixtureType(property, variantKey) {
|
|
17
18
|
return findFixtureTypeForValue(property, property.defaults[variantKey]);
|
|
18
19
|
}
|
|
20
|
+
function appendPseudoStateVariables(variableObject, propertyKey, property, variantOption, excludedPseudoStates = []) {
|
|
21
|
+
if (!property.pseudoStates) return;
|
|
22
|
+
for (const pseudoState of require_componentStatePseudoStates.filterPseudoStatesByExclusion(property.pseudoStates, excludedPseudoStates)) variableObject[propertyKey][pseudoState] = {
|
|
23
|
+
type: findFixtureType(property, variantOption),
|
|
24
|
+
valueType: "alias",
|
|
25
|
+
value: property.defaults[variantOption]
|
|
26
|
+
};
|
|
27
|
+
}
|
|
19
28
|
/** Builds component schema from ComponentConfig at runtime */
|
|
20
29
|
function buildConfigSchema(config) {
|
|
21
30
|
const result = {};
|
|
@@ -47,11 +56,7 @@ function buildConfigSchema(config) {
|
|
|
47
56
|
valueType: "alias",
|
|
48
57
|
value: property.defaults[variantOption]
|
|
49
58
|
} };
|
|
50
|
-
|
|
51
|
-
type: findFixtureType(property, variantOption),
|
|
52
|
-
valueType: "alias",
|
|
53
|
-
value: property.defaults[variantOption]
|
|
54
|
-
};
|
|
59
|
+
appendPseudoStateVariables(variableObject, propertyKey, property, variantOption, require_componentStatePseudoStates.getExcludedPseudoStatesForComponentStateOption(componentState, componentStateOption));
|
|
55
60
|
result.variables[schemaKey] = {
|
|
56
61
|
...result.variables[schemaKey],
|
|
57
62
|
...variableObject
|
|
@@ -77,11 +82,7 @@ function buildConfigSchema(config) {
|
|
|
77
82
|
valueType: "alias",
|
|
78
83
|
value: property.defaults[variantOption]
|
|
79
84
|
} };
|
|
80
|
-
|
|
81
|
-
type: findFixtureType(property, variantOption),
|
|
82
|
-
valueType: "alias",
|
|
83
|
-
value: property.defaults[variantOption]
|
|
84
|
-
};
|
|
85
|
+
appendPseudoStateVariables(variableObject, propertyKey, property, variantOption);
|
|
85
86
|
result.variables[schemaKey] = {
|
|
86
87
|
...result.variables[schemaKey],
|
|
87
88
|
...variableObject
|
|
@@ -118,11 +119,7 @@ function buildConfigSchema(config) {
|
|
|
118
119
|
valueType: "alias",
|
|
119
120
|
value: property.defaults[variantOption]
|
|
120
121
|
} };
|
|
121
|
-
|
|
122
|
-
type: findFixtureType(property, variantOption),
|
|
123
|
-
valueType: "alias",
|
|
124
|
-
value: property.defaults[variantOption]
|
|
125
|
-
};
|
|
122
|
+
appendPseudoStateVariables(variableObject, propertyKey, property, variantOption, require_componentStatePseudoStates.getExcludedPseudoStatesForComponentStateOption(componentState, componentStateOption));
|
|
126
123
|
result.variables[schemaKey] = {
|
|
127
124
|
...result.variables[schemaKey],
|
|
128
125
|
...variableObject
|
|
@@ -149,11 +146,7 @@ function buildConfigSchema(config) {
|
|
|
149
146
|
valueType: "alias",
|
|
150
147
|
value: property.defaults[variantOption]
|
|
151
148
|
} };
|
|
152
|
-
|
|
153
|
-
type: findFixtureType(property, variantOption),
|
|
154
|
-
valueType: "alias",
|
|
155
|
-
value: property.defaults[variantOption]
|
|
156
|
-
};
|
|
149
|
+
appendPseudoStateVariables(variableObject, propertyKey, property, variantOption);
|
|
157
150
|
result.variables[schemaKey] = {
|
|
158
151
|
...result.variables[schemaKey],
|
|
159
152
|
...variableObject
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { BannerInnerShadowOption, ElevationAlias, ShadowVariant, ShadowVariantConfig, ShadowVariantWithInvert } from "../../../types/dist/index.cjs";
|
|
3
3
|
import { ArbitraryFixtures, InferArbitraryType } from "../../../fixtures/dist/index.cjs";
|
|
4
|
-
import { AllPossibleProperties, ComponentConfig, LayerConfig, PossibleStates, VariantConfig, VariantConfigWithComponentStates, VariantConfigWithProperties } from "../types/ComponentConfig.cjs";
|
|
4
|
+
import { AllPossibleProperties, ComponentConfig, ComponentStateConfig, LayerConfig, PossibleStates, VariantConfig, VariantConfigWithComponentStates, VariantConfigWithProperties } from "../types/ComponentConfig.cjs";
|
|
5
5
|
import { SchemaStateValue } from "../types/ConfigSchema.cjs";
|
|
6
6
|
import { ConfigurablePropertiesName, SelectedConfigurableProperty } from "../properties.cjs";
|
|
7
7
|
import { OmitIndexSignature, SimplifyDeep, UnionToIntersection, WritableDeep } from "type-fest";
|
|
@@ -22,12 +22,24 @@ type InferredPropertyStates<Prop extends SelectedConfigurableProperty<Configurab
|
|
|
22
22
|
}) & (Prop extends {
|
|
23
23
|
pseudoStates: infer PS extends PossibleStates[];
|
|
24
24
|
} ? { [K in PS[number]]: InferredPropertySchema<Prop> } : {});
|
|
25
|
+
type GetExcludedPseudoStatesForOption<StateConfig extends ComponentStateConfig, StateOption extends string> = StateConfig extends {
|
|
26
|
+
excludePseudoStatesForOptions?: infer Exclusions extends Partial<Record<string, readonly PossibleStates[]>>;
|
|
27
|
+
} ? StateOption extends keyof Exclusions ? Exclusions[StateOption] : undefined : undefined;
|
|
28
|
+
/** Property states after applying per-option pseudo-state exclusions */
|
|
29
|
+
type InferredPropertyStatesForOption<Prop extends SelectedConfigurableProperty<ConfigurablePropertiesName, string>, ExcludedPseudoStates extends readonly PossibleStates[] | undefined> = (Prop['skipRestState'] extends true ? {} : {
|
|
30
|
+
rest: InferredPropertySchema<Prop>;
|
|
31
|
+
}) & (Prop extends {
|
|
32
|
+
pseudoStates: infer PS extends PossibleStates[];
|
|
33
|
+
} ? { [K in Exclude<PS[number], ExcludedPseudoStates extends readonly PossibleStates[] ? ExcludedPseudoStates[number] : never>]: InferredPropertySchema<Prop> } : {});
|
|
25
34
|
/** Infers property-to-states mappings for a layer's properties */
|
|
26
35
|
type InferredLayerProperties<Layer> = Layer extends LayerConfig ? Layer extends {
|
|
27
36
|
properties: infer Props extends LayerConfig['properties'];
|
|
28
37
|
} ? { [PropKey in keyof Props]: InferredPropertyStates<Props[PropKey]> } : {} : {};
|
|
38
|
+
type InferredLayerPropertiesForOption<Layer, ExcludedPseudoStates extends readonly PossibleStates[] | undefined> = Layer extends LayerConfig ? Layer extends {
|
|
39
|
+
properties: infer Props extends LayerConfig['properties'];
|
|
40
|
+
} ? { [PropKey in keyof Props]: InferredPropertyStatesForOption<Props[PropKey], ExcludedPseudoStates> } : {} : {};
|
|
29
41
|
/** Generates schema key → properties mappings for a variant's layers or component states */
|
|
30
|
-
type InferredSchemaMap<VarKey extends string, VarConfig extends VariantConfig, LayersOrStates extends NonNullable<VariantConfigWithComponentStates['componentStates']> | NonNullable<VariantConfigWithProperties['layers']>, Prefix extends string = ''> = LayersOrStates extends NonNullable<VariantConfigWithComponentStates['componentStates']> ? UnionToIntersection<{ [StateKey in keyof OmitIndexSignature<LayersOrStates>]: UnionToIntersection<{ [StateOption in LayersOrStates[StateKey]['options'][number]]: { [LayerKey in keyof OmitIndexSignature<LayersOrStates[StateKey]['layers']> as `${Prefix}${VarKey}/${VarConfig['options'][number]}/${StateKey & string}/${StateOption}/${LayerKey & string}`]:
|
|
42
|
+
type InferredSchemaMap<VarKey extends string, VarConfig extends VariantConfig, LayersOrStates extends NonNullable<VariantConfigWithComponentStates['componentStates']> | NonNullable<VariantConfigWithProperties['layers']>, Prefix extends string = ''> = LayersOrStates extends NonNullable<VariantConfigWithComponentStates['componentStates']> ? UnionToIntersection<{ [StateKey in keyof OmitIndexSignature<LayersOrStates>]: UnionToIntersection<{ [StateOption in LayersOrStates[StateKey]['options'][number]]: { [LayerKey in keyof OmitIndexSignature<LayersOrStates[StateKey]['layers']> as `${Prefix}${VarKey}/${VarConfig['options'][number]}/${StateKey & string}/${StateOption}/${LayerKey & string}`]: InferredLayerPropertiesForOption<LayersOrStates[StateKey]['layers'][LayerKey], GetExcludedPseudoStatesForOption<LayersOrStates[StateKey], StateOption>> } }[LayersOrStates[StateKey]['options'][number]]> }[keyof OmitIndexSignature<LayersOrStates>]> : { [LayerKey in keyof OmitIndexSignature<LayersOrStates> as `${Prefix}${VarKey}/${VarConfig['options'][number]}/${LayerKey & string}`]: InferredLayerProperties<LayersOrStates[LayerKey]> };
|
|
31
43
|
/** Routes to appropriate schema map generator based on variant configuration type */
|
|
32
44
|
type InferredVariablesFilter<VarKey extends string, VarConfig extends VariantConfig, Prefix extends string = ''> = VarConfig extends VariantConfigWithComponentStates ? InferredSchemaMap<VarKey, VarConfig, VarConfig['componentStates'], Prefix> : VarConfig extends VariantConfigWithProperties ? InferredSchemaMap<VarKey, VarConfig, VarConfig['layers'], Prefix> : {};
|
|
33
45
|
/** Collects all schema mappings from component variants and subComponents */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { BannerInnerShadowOption, ElevationAlias, ShadowVariant, ShadowVariantConfig, ShadowVariantWithInvert } from "../../../types/dist/index.js";
|
|
3
3
|
import { ArbitraryFixtures, InferArbitraryType } from "../../../fixtures/dist/index.js";
|
|
4
|
-
import { AllPossibleProperties, ComponentConfig, LayerConfig, PossibleStates, VariantConfig, VariantConfigWithComponentStates, VariantConfigWithProperties } from "../types/ComponentConfig.js";
|
|
4
|
+
import { AllPossibleProperties, ComponentConfig, ComponentStateConfig, LayerConfig, PossibleStates, VariantConfig, VariantConfigWithComponentStates, VariantConfigWithProperties } from "../types/ComponentConfig.js";
|
|
5
5
|
import { SchemaStateValue } from "../types/ConfigSchema.js";
|
|
6
6
|
import { ConfigurablePropertiesName, SelectedConfigurableProperty } from "../properties.js";
|
|
7
7
|
import { OmitIndexSignature, SimplifyDeep, UnionToIntersection, WritableDeep } from "type-fest";
|
|
@@ -22,12 +22,24 @@ type InferredPropertyStates<Prop extends SelectedConfigurableProperty<Configurab
|
|
|
22
22
|
}) & (Prop extends {
|
|
23
23
|
pseudoStates: infer PS extends PossibleStates[];
|
|
24
24
|
} ? { [K in PS[number]]: InferredPropertySchema<Prop> } : {});
|
|
25
|
+
type GetExcludedPseudoStatesForOption<StateConfig extends ComponentStateConfig, StateOption extends string> = StateConfig extends {
|
|
26
|
+
excludePseudoStatesForOptions?: infer Exclusions extends Partial<Record<string, readonly PossibleStates[]>>;
|
|
27
|
+
} ? StateOption extends keyof Exclusions ? Exclusions[StateOption] : undefined : undefined;
|
|
28
|
+
/** Property states after applying per-option pseudo-state exclusions */
|
|
29
|
+
type InferredPropertyStatesForOption<Prop extends SelectedConfigurableProperty<ConfigurablePropertiesName, string>, ExcludedPseudoStates extends readonly PossibleStates[] | undefined> = (Prop['skipRestState'] extends true ? {} : {
|
|
30
|
+
rest: InferredPropertySchema<Prop>;
|
|
31
|
+
}) & (Prop extends {
|
|
32
|
+
pseudoStates: infer PS extends PossibleStates[];
|
|
33
|
+
} ? { [K in Exclude<PS[number], ExcludedPseudoStates extends readonly PossibleStates[] ? ExcludedPseudoStates[number] : never>]: InferredPropertySchema<Prop> } : {});
|
|
25
34
|
/** Infers property-to-states mappings for a layer's properties */
|
|
26
35
|
type InferredLayerProperties<Layer> = Layer extends LayerConfig ? Layer extends {
|
|
27
36
|
properties: infer Props extends LayerConfig['properties'];
|
|
28
37
|
} ? { [PropKey in keyof Props]: InferredPropertyStates<Props[PropKey]> } : {} : {};
|
|
38
|
+
type InferredLayerPropertiesForOption<Layer, ExcludedPseudoStates extends readonly PossibleStates[] | undefined> = Layer extends LayerConfig ? Layer extends {
|
|
39
|
+
properties: infer Props extends LayerConfig['properties'];
|
|
40
|
+
} ? { [PropKey in keyof Props]: InferredPropertyStatesForOption<Props[PropKey], ExcludedPseudoStates> } : {} : {};
|
|
29
41
|
/** Generates schema key → properties mappings for a variant's layers or component states */
|
|
30
|
-
type InferredSchemaMap<VarKey extends string, VarConfig extends VariantConfig, LayersOrStates extends NonNullable<VariantConfigWithComponentStates['componentStates']> | NonNullable<VariantConfigWithProperties['layers']>, Prefix extends string = ''> = LayersOrStates extends NonNullable<VariantConfigWithComponentStates['componentStates']> ? UnionToIntersection<{ [StateKey in keyof OmitIndexSignature<LayersOrStates>]: UnionToIntersection<{ [StateOption in LayersOrStates[StateKey]['options'][number]]: { [LayerKey in keyof OmitIndexSignature<LayersOrStates[StateKey]['layers']> as `${Prefix}${VarKey}/${VarConfig['options'][number]}/${StateKey & string}/${StateOption}/${LayerKey & string}`]:
|
|
42
|
+
type InferredSchemaMap<VarKey extends string, VarConfig extends VariantConfig, LayersOrStates extends NonNullable<VariantConfigWithComponentStates['componentStates']> | NonNullable<VariantConfigWithProperties['layers']>, Prefix extends string = ''> = LayersOrStates extends NonNullable<VariantConfigWithComponentStates['componentStates']> ? UnionToIntersection<{ [StateKey in keyof OmitIndexSignature<LayersOrStates>]: UnionToIntersection<{ [StateOption in LayersOrStates[StateKey]['options'][number]]: { [LayerKey in keyof OmitIndexSignature<LayersOrStates[StateKey]['layers']> as `${Prefix}${VarKey}/${VarConfig['options'][number]}/${StateKey & string}/${StateOption}/${LayerKey & string}`]: InferredLayerPropertiesForOption<LayersOrStates[StateKey]['layers'][LayerKey], GetExcludedPseudoStatesForOption<LayersOrStates[StateKey], StateOption>> } }[LayersOrStates[StateKey]['options'][number]]> }[keyof OmitIndexSignature<LayersOrStates>]> : { [LayerKey in keyof OmitIndexSignature<LayersOrStates> as `${Prefix}${VarKey}/${VarConfig['options'][number]}/${LayerKey & string}`]: InferredLayerProperties<LayersOrStates[LayerKey]> };
|
|
31
43
|
/** Routes to appropriate schema map generator based on variant configuration type */
|
|
32
44
|
type InferredVariablesFilter<VarKey extends string, VarConfig extends VariantConfig, Prefix extends string = ''> = VarConfig extends VariantConfigWithComponentStates ? InferredSchemaMap<VarKey, VarConfig, VarConfig['componentStates'], Prefix> : VarConfig extends VariantConfigWithProperties ? InferredSchemaMap<VarKey, VarConfig, VarConfig['layers'], Prefix> : {};
|
|
33
45
|
/** Collects all schema mappings from component variants and subComponents */
|