@yahoo/uds 3.157.0 → 3.157.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/generatedConfigs.cjs +67 -51
- package/dist/automated-config/dist/generated/generatedConfigs.d.cts +15 -1
- package/dist/automated-config/dist/generated/generatedConfigs.d.ts +15 -1
- package/dist/automated-config/dist/generated/generatedConfigs.js +67 -51
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.cjs +1 -1
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.d.cts +4 -1
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.d.ts +4 -1
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.js +1 -1
- package/dist/automated-config/dist/properties.cjs +8 -1
- package/dist/automated-config/dist/properties.d.cts +8 -0
- package/dist/automated-config/dist/properties.d.ts +8 -0
- package/dist/automated-config/dist/properties.js +8 -1
- package/dist/automated-config/dist/utils/buildConfigSchema.cjs +7 -0
- package/dist/automated-config/dist/utils/buildConfigSchema.d.cts +10 -3
- package/dist/automated-config/dist/utils/buildConfigSchema.d.ts +10 -3
- package/dist/automated-config/dist/utils/buildConfigSchema.js +7 -0
- package/dist/automated-config/dist/utils/getButtonControlHeight.cjs +129 -0
- package/dist/automated-config/dist/utils/getButtonControlHeight.d.cts +133 -0
- package/dist/automated-config/dist/utils/getButtonControlHeight.d.ts +133 -0
- package/dist/automated-config/dist/utils/getButtonControlHeight.js +122 -0
- package/dist/automated-config/dist/utils/getButtonControlHeightPx.cjs +114 -0
- package/dist/automated-config/dist/utils/getButtonControlHeightPx.d.cts +78 -0
- package/dist/automated-config/dist/utils/getButtonControlHeightPx.d.ts +78 -0
- package/dist/automated-config/dist/utils/getButtonControlHeightPx.js +108 -0
- package/dist/automated-config/dist/utils/getConfigVariantProperties.d.cts +2 -2
- package/dist/automated-config/dist/utils/getConfigVariantProperties.d.ts +2 -2
- package/dist/automated-config/dist/utils/iconButtonMatchButtonHeight.cjs +110 -0
- package/dist/automated-config/dist/utils/iconButtonMatchButtonHeight.d.cts +19 -0
- package/dist/automated-config/dist/utils/iconButtonMatchButtonHeight.d.ts +19 -0
- package/dist/automated-config/dist/utils/iconButtonMatchButtonHeight.js +108 -0
- package/dist/automated-config/dist/utils/index.cjs +85 -28
- package/dist/automated-config/dist/utils/index.d.cts +15 -4
- package/dist/automated-config/dist/utils/index.d.ts +15 -4
- package/dist/automated-config/dist/utils/index.js +85 -28
- package/dist/automated-config/dist/utils/isConfiguratorPropertyVisible.cjs +15 -0
- package/dist/automated-config/dist/utils/isConfiguratorPropertyVisible.d.cts +20 -0
- package/dist/automated-config/dist/utils/isConfiguratorPropertyVisible.d.ts +20 -0
- package/dist/automated-config/dist/utils/isConfiguratorPropertyVisible.js +15 -0
- package/dist/components/client/Button.cjs +3 -3
- package/dist/components/client/Button.js +3 -3
- package/dist/components/client/Menu/Menu.ItemCheckbox.d.cts +1 -1
- package/dist/components/client/Menu/Menu.ItemCheckbox.d.ts +1 -1
- package/dist/config/dist/index.cjs +5 -5
- package/dist/config/dist/index.js +5 -5
- package/dist/css/dist/packages/automated-config/dist/properties.cjs +8 -1
- package/dist/css/dist/packages/automated-config/dist/properties.js +8 -1
- package/dist/css/dist/packages/config/dist/index.cjs +5 -5
- package/dist/css/dist/packages/config/dist/index.js +5 -5
- package/dist/css-tokens/dist/index.cjs +2 -0
- package/dist/css-tokens/dist/index.d.cts +2 -1
- package/dist/css-tokens/dist/index.d.ts +2 -1
- package/dist/css-tokens/dist/index.js +2 -1
- package/dist/index.cjs +23 -0
- package/dist/index.d.cts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +6 -2
- package/dist/styles/styler.d.cts +12 -12
- package/dist/styles/styler.d.ts +12 -12
- package/dist/tailwind-internal/dist/packages/automated-config/dist/generated/generatedConfigs.cjs +67 -51
- package/dist/tailwind-internal/dist/packages/automated-config/dist/generated/generatedConfigs.js +67 -51
- package/dist/tailwind-internal/dist/packages/automated-config/dist/properties.cjs +8 -1
- package/dist/tailwind-internal/dist/packages/automated-config/dist/properties.js +8 -1
- package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/getButtonControlHeight.cjs +126 -0
- package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/getButtonControlHeight.js +123 -0
- package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/iconButtonMatchButtonHeight.cjs +20 -0
- package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/iconButtonMatchButtonHeight.js +20 -0
- package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/index.cjs +82 -28
- package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/index.js +82 -28
- package/dist/tailwind-internal/dist/packages/config/dist/index.cjs +5 -5
- package/dist/tailwind-internal/dist/packages/config/dist/index.js +5 -5
- package/dist/tailwind-internal/dist/packages/css-tokens/dist/index.cjs +2 -0
- package/dist/tailwind-internal/dist/packages/css-tokens/dist/index.js +2 -1
- package/dist/tailwind-internal/dist/plugins/components.cjs +1 -1
- package/dist/tailwind-internal/dist/plugins/components.js +1 -1
- package/dist/tokens/automation/index.cjs +22 -0
- package/dist/tokens/automation/index.d.cts +5 -1
- package/dist/tokens/automation/index.d.ts +5 -1
- package/dist/tokens/automation/index.js +5 -1
- package/dist/tokens/consts/cssTokens.cjs +1 -0
- package/dist/tokens/consts/cssTokens.d.cts +2 -2
- package/dist/tokens/consts/cssTokens.d.ts +2 -2
- package/dist/tokens/consts/cssTokens.js +2 -2
- package/dist/tokens/index.cjs +23 -0
- package/dist/tokens/index.d.cts +6 -2
- package/dist/tokens/index.d.ts +6 -2
- package/dist/tokens/index.js +6 -2
- package/dist/uds/generated/componentData.cjs +133 -130
- package/dist/uds/generated/componentData.js +133 -130
- package/dist/uds/generated/migrationSchemaVersion.cjs +1 -1
- package/dist/uds/generated/migrationSchemaVersion.js +1 -1
- package/dist/uds/generated/tailwindPurge.cjs +5 -5
- package/dist/uds/generated/tailwindPurge.js +5 -5
- package/generated/componentData.json +191 -188
- package/generated/migrationSchemaVersion.ts +1 -1
- package/generated/tailwindPurge.ts +1 -1
- package/package.json +1 -1
|
@@ -18590,7 +18590,7 @@ const IconButtonConfig = {
|
|
|
18590
18590
|
label: "icon",
|
|
18591
18591
|
properties: { size: {
|
|
18592
18592
|
defaults: {
|
|
18593
|
-
lg: "
|
|
18593
|
+
lg: "sm",
|
|
18594
18594
|
md: "sm",
|
|
18595
18595
|
sm: "sm",
|
|
18596
18596
|
xl: "lg",
|
|
@@ -18609,57 +18609,73 @@ const IconButtonConfig = {
|
|
|
18609
18609
|
},
|
|
18610
18610
|
root: {
|
|
18611
18611
|
label: "root",
|
|
18612
|
-
properties: {
|
|
18613
|
-
|
|
18614
|
-
|
|
18615
|
-
|
|
18616
|
-
|
|
18617
|
-
|
|
18618
|
-
|
|
18612
|
+
properties: {
|
|
18613
|
+
controlHeight: {
|
|
18614
|
+
defaults: {
|
|
18615
|
+
lg: 44,
|
|
18616
|
+
md: 32,
|
|
18617
|
+
sm: 24,
|
|
18618
|
+
xl: 64,
|
|
18619
|
+
xs: 28
|
|
18620
|
+
},
|
|
18621
|
+
label: "Control height",
|
|
18622
|
+
name: "controlHeight",
|
|
18623
|
+
optionalInDefaultSchema: true,
|
|
18624
|
+
typeOfFixture: ["positiveIntegers"],
|
|
18625
|
+
values: []
|
|
18619
18626
|
},
|
|
18620
|
-
|
|
18621
|
-
|
|
18622
|
-
|
|
18623
|
-
|
|
18624
|
-
|
|
18625
|
-
|
|
18626
|
-
|
|
18627
|
-
|
|
18628
|
-
"
|
|
18629
|
-
"
|
|
18630
|
-
"
|
|
18631
|
-
|
|
18632
|
-
|
|
18633
|
-
|
|
18634
|
-
|
|
18635
|
-
|
|
18636
|
-
|
|
18637
|
-
|
|
18638
|
-
|
|
18639
|
-
|
|
18640
|
-
|
|
18641
|
-
|
|
18642
|
-
|
|
18643
|
-
|
|
18644
|
-
|
|
18645
|
-
|
|
18646
|
-
|
|
18647
|
-
|
|
18648
|
-
|
|
18649
|
-
|
|
18650
|
-
|
|
18651
|
-
|
|
18652
|
-
|
|
18653
|
-
|
|
18654
|
-
|
|
18655
|
-
|
|
18656
|
-
|
|
18657
|
-
|
|
18658
|
-
|
|
18659
|
-
|
|
18660
|
-
|
|
18661
|
-
|
|
18662
|
-
|
|
18627
|
+
spacing: {
|
|
18628
|
+
defaults: {
|
|
18629
|
+
lg: "3.5",
|
|
18630
|
+
md: "3",
|
|
18631
|
+
sm: "2",
|
|
18632
|
+
xl: "4",
|
|
18633
|
+
xs: "2"
|
|
18634
|
+
},
|
|
18635
|
+
label: "Spacing",
|
|
18636
|
+
name: "spacing",
|
|
18637
|
+
typeOfFixture: ["spacingAliases"],
|
|
18638
|
+
values: [[
|
|
18639
|
+
"0",
|
|
18640
|
+
"px",
|
|
18641
|
+
"0.5",
|
|
18642
|
+
"1",
|
|
18643
|
+
"1.5",
|
|
18644
|
+
"2",
|
|
18645
|
+
"2.5",
|
|
18646
|
+
"3",
|
|
18647
|
+
"3.5",
|
|
18648
|
+
"4",
|
|
18649
|
+
"4.5",
|
|
18650
|
+
"5",
|
|
18651
|
+
"5.5",
|
|
18652
|
+
"6",
|
|
18653
|
+
"7",
|
|
18654
|
+
"8",
|
|
18655
|
+
"9",
|
|
18656
|
+
"10",
|
|
18657
|
+
"11",
|
|
18658
|
+
"12",
|
|
18659
|
+
"14",
|
|
18660
|
+
"16",
|
|
18661
|
+
"20",
|
|
18662
|
+
"24",
|
|
18663
|
+
"28",
|
|
18664
|
+
"32",
|
|
18665
|
+
"36",
|
|
18666
|
+
"40",
|
|
18667
|
+
"44",
|
|
18668
|
+
"48",
|
|
18669
|
+
"52",
|
|
18670
|
+
"56",
|
|
18671
|
+
"60",
|
|
18672
|
+
"64",
|
|
18673
|
+
"72",
|
|
18674
|
+
"80",
|
|
18675
|
+
"96"
|
|
18676
|
+
]]
|
|
18677
|
+
}
|
|
18678
|
+
}
|
|
18663
18679
|
}
|
|
18664
18680
|
},
|
|
18665
18681
|
options: [
|
|
@@ -2103,7 +2103,7 @@ declare const IconButtonConfig: {
|
|
|
2103
2103
|
readonly properties: {
|
|
2104
2104
|
readonly size: {
|
|
2105
2105
|
readonly defaults: {
|
|
2106
|
-
readonly lg: "
|
|
2106
|
+
readonly lg: "sm";
|
|
2107
2107
|
readonly md: "sm";
|
|
2108
2108
|
readonly sm: "sm";
|
|
2109
2109
|
readonly xl: "lg";
|
|
@@ -2119,6 +2119,20 @@ declare const IconButtonConfig: {
|
|
|
2119
2119
|
readonly root: {
|
|
2120
2120
|
readonly label: "root";
|
|
2121
2121
|
readonly properties: {
|
|
2122
|
+
readonly controlHeight: {
|
|
2123
|
+
readonly defaults: {
|
|
2124
|
+
readonly lg: 44;
|
|
2125
|
+
readonly md: 32;
|
|
2126
|
+
readonly sm: 24;
|
|
2127
|
+
readonly xl: 64;
|
|
2128
|
+
readonly xs: 28;
|
|
2129
|
+
};
|
|
2130
|
+
readonly label: "Control height";
|
|
2131
|
+
readonly name: "controlHeight";
|
|
2132
|
+
readonly optionalInDefaultSchema: true;
|
|
2133
|
+
readonly typeOfFixture: readonly ["positiveIntegers"];
|
|
2134
|
+
readonly values: readonly [];
|
|
2135
|
+
};
|
|
2122
2136
|
readonly spacing: {
|
|
2123
2137
|
readonly defaults: {
|
|
2124
2138
|
readonly lg: "3.5";
|
|
@@ -2103,7 +2103,7 @@ declare const IconButtonConfig: {
|
|
|
2103
2103
|
readonly properties: {
|
|
2104
2104
|
readonly size: {
|
|
2105
2105
|
readonly defaults: {
|
|
2106
|
-
readonly lg: "
|
|
2106
|
+
readonly lg: "sm";
|
|
2107
2107
|
readonly md: "sm";
|
|
2108
2108
|
readonly sm: "sm";
|
|
2109
2109
|
readonly xl: "lg";
|
|
@@ -2119,6 +2119,20 @@ declare const IconButtonConfig: {
|
|
|
2119
2119
|
readonly root: {
|
|
2120
2120
|
readonly label: "root";
|
|
2121
2121
|
readonly properties: {
|
|
2122
|
+
readonly controlHeight: {
|
|
2123
|
+
readonly defaults: {
|
|
2124
|
+
readonly lg: 44;
|
|
2125
|
+
readonly md: 32;
|
|
2126
|
+
readonly sm: 24;
|
|
2127
|
+
readonly xl: 64;
|
|
2128
|
+
readonly xs: 28;
|
|
2129
|
+
};
|
|
2130
|
+
readonly label: "Control height";
|
|
2131
|
+
readonly name: "controlHeight";
|
|
2132
|
+
readonly optionalInDefaultSchema: true;
|
|
2133
|
+
readonly typeOfFixture: readonly ["positiveIntegers"];
|
|
2134
|
+
readonly values: readonly [];
|
|
2135
|
+
};
|
|
2122
2136
|
readonly spacing: {
|
|
2123
2137
|
readonly defaults: {
|
|
2124
2138
|
readonly lg: "3.5";
|
|
@@ -18590,7 +18590,7 @@ const IconButtonConfig = {
|
|
|
18590
18590
|
label: "icon",
|
|
18591
18591
|
properties: { size: {
|
|
18592
18592
|
defaults: {
|
|
18593
|
-
lg: "
|
|
18593
|
+
lg: "sm",
|
|
18594
18594
|
md: "sm",
|
|
18595
18595
|
sm: "sm",
|
|
18596
18596
|
xl: "lg",
|
|
@@ -18609,57 +18609,73 @@ const IconButtonConfig = {
|
|
|
18609
18609
|
},
|
|
18610
18610
|
root: {
|
|
18611
18611
|
label: "root",
|
|
18612
|
-
properties: {
|
|
18613
|
-
|
|
18614
|
-
|
|
18615
|
-
|
|
18616
|
-
|
|
18617
|
-
|
|
18618
|
-
|
|
18612
|
+
properties: {
|
|
18613
|
+
controlHeight: {
|
|
18614
|
+
defaults: {
|
|
18615
|
+
lg: 44,
|
|
18616
|
+
md: 32,
|
|
18617
|
+
sm: 24,
|
|
18618
|
+
xl: 64,
|
|
18619
|
+
xs: 28
|
|
18620
|
+
},
|
|
18621
|
+
label: "Control height",
|
|
18622
|
+
name: "controlHeight",
|
|
18623
|
+
optionalInDefaultSchema: true,
|
|
18624
|
+
typeOfFixture: ["positiveIntegers"],
|
|
18625
|
+
values: []
|
|
18619
18626
|
},
|
|
18620
|
-
|
|
18621
|
-
|
|
18622
|
-
|
|
18623
|
-
|
|
18624
|
-
|
|
18625
|
-
|
|
18626
|
-
|
|
18627
|
-
|
|
18628
|
-
"
|
|
18629
|
-
"
|
|
18630
|
-
"
|
|
18631
|
-
|
|
18632
|
-
|
|
18633
|
-
|
|
18634
|
-
|
|
18635
|
-
|
|
18636
|
-
|
|
18637
|
-
|
|
18638
|
-
|
|
18639
|
-
|
|
18640
|
-
|
|
18641
|
-
|
|
18642
|
-
|
|
18643
|
-
|
|
18644
|
-
|
|
18645
|
-
|
|
18646
|
-
|
|
18647
|
-
|
|
18648
|
-
|
|
18649
|
-
|
|
18650
|
-
|
|
18651
|
-
|
|
18652
|
-
|
|
18653
|
-
|
|
18654
|
-
|
|
18655
|
-
|
|
18656
|
-
|
|
18657
|
-
|
|
18658
|
-
|
|
18659
|
-
|
|
18660
|
-
|
|
18661
|
-
|
|
18662
|
-
|
|
18627
|
+
spacing: {
|
|
18628
|
+
defaults: {
|
|
18629
|
+
lg: "3.5",
|
|
18630
|
+
md: "3",
|
|
18631
|
+
sm: "2",
|
|
18632
|
+
xl: "4",
|
|
18633
|
+
xs: "2"
|
|
18634
|
+
},
|
|
18635
|
+
label: "Spacing",
|
|
18636
|
+
name: "spacing",
|
|
18637
|
+
typeOfFixture: ["spacingAliases"],
|
|
18638
|
+
values: [[
|
|
18639
|
+
"0",
|
|
18640
|
+
"px",
|
|
18641
|
+
"0.5",
|
|
18642
|
+
"1",
|
|
18643
|
+
"1.5",
|
|
18644
|
+
"2",
|
|
18645
|
+
"2.5",
|
|
18646
|
+
"3",
|
|
18647
|
+
"3.5",
|
|
18648
|
+
"4",
|
|
18649
|
+
"4.5",
|
|
18650
|
+
"5",
|
|
18651
|
+
"5.5",
|
|
18652
|
+
"6",
|
|
18653
|
+
"7",
|
|
18654
|
+
"8",
|
|
18655
|
+
"9",
|
|
18656
|
+
"10",
|
|
18657
|
+
"11",
|
|
18658
|
+
"12",
|
|
18659
|
+
"14",
|
|
18660
|
+
"16",
|
|
18661
|
+
"20",
|
|
18662
|
+
"24",
|
|
18663
|
+
"28",
|
|
18664
|
+
"32",
|
|
18665
|
+
"36",
|
|
18666
|
+
"40",
|
|
18667
|
+
"44",
|
|
18668
|
+
"48",
|
|
18669
|
+
"52",
|
|
18670
|
+
"56",
|
|
18671
|
+
"60",
|
|
18672
|
+
"64",
|
|
18673
|
+
"72",
|
|
18674
|
+
"80",
|
|
18675
|
+
"96"
|
|
18676
|
+
]]
|
|
18677
|
+
}
|
|
18678
|
+
}
|
|
18663
18679
|
}
|
|
18664
18680
|
},
|
|
18665
18681
|
options: [
|
|
@@ -13,7 +13,10 @@ interface UniversalTokensConfigAuto {
|
|
|
13
13
|
checkbox: ComponentSchema<typeof CheckboxConfig>;
|
|
14
14
|
chip: ComponentSchema<typeof ChipConfig>;
|
|
15
15
|
divider: ComponentSchema<typeof DividerConfig>;
|
|
16
|
-
iconButton: ComponentSchema<typeof IconButtonConfig
|
|
16
|
+
iconButton: ComponentSchema<typeof IconButtonConfig> & {
|
|
17
|
+
matchButtonHeight?: Partial<Record<'xs' | 'sm' | 'md' | 'lg', true>>;
|
|
18
|
+
spacingBeforeMatchButtonHeight?: Partial<Record<'xs' | 'sm' | 'md' | 'lg', string>>;
|
|
19
|
+
};
|
|
17
20
|
input: ComponentSchema<typeof InputConfig>;
|
|
18
21
|
link: ComponentSchema<typeof LinkConfig>;
|
|
19
22
|
menuContent: ComponentSchema<typeof MenuContentConfig>;
|
|
@@ -13,7 +13,10 @@ interface UniversalTokensConfigAuto {
|
|
|
13
13
|
checkbox: ComponentSchema<typeof CheckboxConfig>;
|
|
14
14
|
chip: ComponentSchema<typeof ChipConfig>;
|
|
15
15
|
divider: ComponentSchema<typeof DividerConfig>;
|
|
16
|
-
iconButton: ComponentSchema<typeof IconButtonConfig
|
|
16
|
+
iconButton: ComponentSchema<typeof IconButtonConfig> & {
|
|
17
|
+
matchButtonHeight?: Partial<Record<'xs' | 'sm' | 'md' | 'lg', true>>;
|
|
18
|
+
spacingBeforeMatchButtonHeight?: Partial<Record<'xs' | 'sm' | 'md' | 'lg', string>>;
|
|
19
|
+
};
|
|
17
20
|
input: ComponentSchema<typeof InputConfig>;
|
|
18
21
|
link: ComponentSchema<typeof LinkConfig>;
|
|
19
22
|
menuContent: ComponentSchema<typeof MenuContentConfig>;
|
|
@@ -433,6 +433,12 @@ const paginationWidthVar = {
|
|
|
433
433
|
possibleFixtures: ["positiveIntegers"],
|
|
434
434
|
twThemePath: (_, value) => `${value}px`
|
|
435
435
|
};
|
|
436
|
+
const controlHeight = {
|
|
437
|
+
name: "controlHeight",
|
|
438
|
+
cssProperties: [],
|
|
439
|
+
possibleFixtures: ["positiveIntegers"],
|
|
440
|
+
twThemePath: (_, value) => `${value}px`
|
|
441
|
+
};
|
|
436
442
|
const publicProperties = {
|
|
437
443
|
backgroundColor,
|
|
438
444
|
borderWidth,
|
|
@@ -529,7 +535,8 @@ const publicProperties = {
|
|
|
529
535
|
twThemePath: () => "",
|
|
530
536
|
customValueRenderer: ({ value }) => `${String(value)}%`
|
|
531
537
|
},
|
|
532
|
-
paginationWidthVar
|
|
538
|
+
paginationWidthVar,
|
|
539
|
+
controlHeight
|
|
533
540
|
};
|
|
534
541
|
const internalProperties = {
|
|
535
542
|
outlineWidth,
|
|
@@ -70,6 +70,7 @@ declare const publicProperties: {
|
|
|
70
70
|
readonly scrimBackgroundColor: ConfigurableProperty<"backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases", unknown>;
|
|
71
71
|
readonly scrimOpacity: ConfigurableProperty<"opacitySteps", unknown>;
|
|
72
72
|
readonly paginationWidthVar: ConfigurableProperty<"positiveIntegers", unknown>;
|
|
73
|
+
readonly controlHeight: ConfigurableProperty<"positiveIntegers", unknown>;
|
|
73
74
|
};
|
|
74
75
|
declare const configurableProperties: {
|
|
75
76
|
outlineWidth: ConfigurableProperty<"borderWidths" | "spacingAliases", unknown>;
|
|
@@ -122,6 +123,7 @@ declare const configurableProperties: {
|
|
|
122
123
|
scrimBackgroundColor: ConfigurableProperty<"backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases", unknown>;
|
|
123
124
|
scrimOpacity: ConfigurableProperty<"opacitySteps", unknown>;
|
|
124
125
|
paginationWidthVar: ConfigurableProperty<"positiveIntegers", unknown>;
|
|
126
|
+
controlHeight: ConfigurableProperty<"positiveIntegers", unknown>;
|
|
125
127
|
};
|
|
126
128
|
type ExtendablePropertiesName = keyof typeof configurableProperties;
|
|
127
129
|
type ConfigurablePropertiesName = keyof typeof publicProperties;
|
|
@@ -131,6 +133,12 @@ interface SelectedConfigurableProperty<C extends ConfigurablePropertiesName, O e
|
|
|
131
133
|
typeOfFixture: T;
|
|
132
134
|
values: V;
|
|
133
135
|
skipRestState?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* When true, the property is omitted from `buildConfigSchema()` output and
|
|
138
|
+
* optional in stored branch configs. Used for opt-in-only vars (e.g.
|
|
139
|
+
* IconButton `controlHeight`) that are written at runtime, not seeded.
|
|
140
|
+
*/
|
|
141
|
+
optionalInDefaultSchema?: boolean;
|
|
134
142
|
/**
|
|
135
143
|
* Per-property pseudo state list (legacy). New components should declare
|
|
136
144
|
* atomic states at the layer level via `atomicStates` and use
|
|
@@ -70,6 +70,7 @@ declare const publicProperties: {
|
|
|
70
70
|
readonly scrimBackgroundColor: ConfigurableProperty<"backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases", unknown>;
|
|
71
71
|
readonly scrimOpacity: ConfigurableProperty<"opacitySteps", unknown>;
|
|
72
72
|
readonly paginationWidthVar: ConfigurableProperty<"positiveIntegers", unknown>;
|
|
73
|
+
readonly controlHeight: ConfigurableProperty<"positiveIntegers", unknown>;
|
|
73
74
|
};
|
|
74
75
|
declare const configurableProperties: {
|
|
75
76
|
outlineWidth: ConfigurableProperty<"borderWidths" | "spacingAliases", unknown>;
|
|
@@ -122,6 +123,7 @@ declare const configurableProperties: {
|
|
|
122
123
|
scrimBackgroundColor: ConfigurableProperty<"backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases", unknown>;
|
|
123
124
|
scrimOpacity: ConfigurableProperty<"opacitySteps", unknown>;
|
|
124
125
|
paginationWidthVar: ConfigurableProperty<"positiveIntegers", unknown>;
|
|
126
|
+
controlHeight: ConfigurableProperty<"positiveIntegers", unknown>;
|
|
125
127
|
};
|
|
126
128
|
type ExtendablePropertiesName = keyof typeof configurableProperties;
|
|
127
129
|
type ConfigurablePropertiesName = keyof typeof publicProperties;
|
|
@@ -131,6 +133,12 @@ interface SelectedConfigurableProperty<C extends ConfigurablePropertiesName, O e
|
|
|
131
133
|
typeOfFixture: T;
|
|
132
134
|
values: V;
|
|
133
135
|
skipRestState?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* When true, the property is omitted from `buildConfigSchema()` output and
|
|
138
|
+
* optional in stored branch configs. Used for opt-in-only vars (e.g.
|
|
139
|
+
* IconButton `controlHeight`) that are written at runtime, not seeded.
|
|
140
|
+
*/
|
|
141
|
+
optionalInDefaultSchema?: boolean;
|
|
134
142
|
/**
|
|
135
143
|
* Per-property pseudo state list (legacy). New components should declare
|
|
136
144
|
* atomic states at the layer level via `atomicStates` and use
|
|
@@ -433,6 +433,12 @@ const paginationWidthVar = {
|
|
|
433
433
|
possibleFixtures: ["positiveIntegers"],
|
|
434
434
|
twThemePath: (_, value) => `${value}px`
|
|
435
435
|
};
|
|
436
|
+
const controlHeight = {
|
|
437
|
+
name: "controlHeight",
|
|
438
|
+
cssProperties: [],
|
|
439
|
+
possibleFixtures: ["positiveIntegers"],
|
|
440
|
+
twThemePath: (_, value) => `${value}px`
|
|
441
|
+
};
|
|
436
442
|
const publicProperties = {
|
|
437
443
|
backgroundColor,
|
|
438
444
|
borderWidth,
|
|
@@ -529,7 +535,8 @@ const publicProperties = {
|
|
|
529
535
|
twThemePath: () => "",
|
|
530
536
|
customValueRenderer: ({ value }) => `${String(value)}%`
|
|
531
537
|
},
|
|
532
|
-
paginationWidthVar
|
|
538
|
+
paginationWidthVar,
|
|
539
|
+
controlHeight
|
|
533
540
|
};
|
|
534
541
|
const internalProperties = {
|
|
535
542
|
outlineWidth,
|
|
@@ -70,6 +70,9 @@ function buildPropertyStateMap(layer, property, variantOption, excludedStates =
|
|
|
70
70
|
function propertyVariesOnlyAtRest(property) {
|
|
71
71
|
return property.name === "textVariant";
|
|
72
72
|
}
|
|
73
|
+
function isOptionalInDefaultSchema(property) {
|
|
74
|
+
return property.optionalInDefaultSchema === true;
|
|
75
|
+
}
|
|
73
76
|
/** Resolves the fixture type by finding which value set contains the given value */
|
|
74
77
|
function findFixtureTypeForValue(property, value) {
|
|
75
78
|
const index = property.values.findIndex((arr) => arr.includes(value));
|
|
@@ -99,6 +102,7 @@ function emitUniversalLayerSchema(result, layers, variantKey, variantOption, sub
|
|
|
99
102
|
result.variables[schemaKey] = {};
|
|
100
103
|
for (const propertyKey in layer.properties) {
|
|
101
104
|
const property = layer.properties[propertyKey];
|
|
105
|
+
if (isOptionalInDefaultSchema(property)) continue;
|
|
102
106
|
result.variables[schemaKey] = {
|
|
103
107
|
...result.variables[schemaKey],
|
|
104
108
|
[propertyKey]: buildPropertyStateMap(layer, property, variantOption)
|
|
@@ -132,6 +136,7 @@ function buildConfigSchema(config) {
|
|
|
132
136
|
result.variables[schemaKey] = {};
|
|
133
137
|
for (const propertyKey in layer.properties) {
|
|
134
138
|
const property = layer.properties[propertyKey];
|
|
139
|
+
if (isOptionalInDefaultSchema(property)) continue;
|
|
135
140
|
result.variables[schemaKey] = {
|
|
136
141
|
...result.variables[schemaKey],
|
|
137
142
|
[propertyKey]: buildPropertyStateMap(layer, property, variantOption, require_componentStatePseudoStates.getExcludedPseudoStatesForComponentStateOption(componentState, componentStateOption))
|
|
@@ -145,6 +150,7 @@ function buildConfigSchema(config) {
|
|
|
145
150
|
result.variables[variantSchemaKey] = result.variables[variantSchemaKey] ?? {};
|
|
146
151
|
for (const propertyKey in variantConfig.variantProperties) {
|
|
147
152
|
const property = variantConfig.variantProperties[propertyKey];
|
|
153
|
+
if (isOptionalInDefaultSchema(property)) continue;
|
|
148
154
|
result.variables[variantSchemaKey] = {
|
|
149
155
|
...result.variables[variantSchemaKey],
|
|
150
156
|
[propertyKey]: buildPropertyStateMap({
|
|
@@ -180,6 +186,7 @@ function buildConfigSchema(config) {
|
|
|
180
186
|
result.variables[schemaKey] = {};
|
|
181
187
|
for (const propertyKey in layer.properties) {
|
|
182
188
|
const property = layer.properties[propertyKey];
|
|
189
|
+
if (isOptionalInDefaultSchema(property)) continue;
|
|
183
190
|
result.variables[schemaKey] = {
|
|
184
191
|
...result.variables[schemaKey],
|
|
185
192
|
[propertyKey]: buildPropertyStateMap(layer, property, variantOption, require_componentStatePseudoStates.getExcludedPseudoStatesForComponentStateOption(componentState, componentStateOption))
|
|
@@ -8,6 +8,13 @@ import { SchemaStateValue } from "../types/ConfigSchema.cjs";
|
|
|
8
8
|
import { OmitIndexSignature, SimplifyDeep, UnionToIntersection, WritableDeep } from "type-fest";
|
|
9
9
|
|
|
10
10
|
//#region ../automated-config/dist/utils/buildConfigSchema.d.ts
|
|
11
|
+
type OptionalInDefaultSchemaPropKeys<Props extends Record<string, SelectedConfigurableProperty<ConfigurablePropertiesName, string>>> = { [K in keyof Props]: Props[K] extends {
|
|
12
|
+
optionalInDefaultSchema: true;
|
|
13
|
+
} ? K : never }[keyof Props];
|
|
14
|
+
type RequiredInDefaultSchemaPropKeys<Props extends Record<string, SelectedConfigurableProperty<ConfigurablePropertiesName, string>>> = { [K in keyof Props]: Props[K] extends {
|
|
15
|
+
optionalInDefaultSchema: true;
|
|
16
|
+
} ? never : K }[keyof Props];
|
|
17
|
+
type InferredLayerPropertyMap<Props extends Record<string, SelectedConfigurableProperty<ConfigurablePropertiesName, string>>, Layer> = { [PropKey in RequiredInDefaultSchemaPropKeys<Props>]: InferredPropertyStates<Props[PropKey], Layer> } & { [PropKey in OptionalInDefaultSchemaPropKeys<Props>]?: InferredPropertyStates<Props[PropKey], Layer> };
|
|
11
18
|
/** Infers default option values from all component variants */
|
|
12
19
|
type InferredDefaults<C extends ComponentConfig> = (C['variants'] extends NonNullable<ComponentConfig['variants']> ? { [VarKey in keyof C['variants']]: C['variants'][VarKey]['options'][number] } : {}) & (C['subComponents'] extends NonNullable<ComponentConfig['subComponents']> ? UnionToIntersection<{ [SubCompKey in keyof C['subComponents']]: { [VarKey in keyof C['subComponents'][SubCompKey]['variants']]: C['subComponents'][SubCompKey]['variants'][VarKey]['options'][number] } }[keyof C['subComponents']]> : {});
|
|
13
20
|
/** Infers type-safe schema value structure for a configurable property */
|
|
@@ -54,13 +61,13 @@ type InferredPropertyStatesForOption<Prop extends SelectedConfigurableProperty<C
|
|
|
54
61
|
/** Infers property-to-states mappings for a layer's properties */
|
|
55
62
|
type InferredLayerProperties<Layer> = Layer extends LayerConfig ? Layer extends {
|
|
56
63
|
properties: infer Props extends LayerConfig['properties'];
|
|
57
|
-
} ?
|
|
64
|
+
} ? InferredLayerPropertyMap<Props, Layer> : {} : {};
|
|
58
65
|
type InferredLayerPropertiesForOption<Layer, ExcludedPseudoStates extends readonly PossibleStates[] | undefined> = Layer extends LayerConfig ? Layer extends {
|
|
59
66
|
properties: infer Props extends LayerConfig['properties'];
|
|
60
|
-
} ? { [PropKey in
|
|
67
|
+
} ? { [PropKey in RequiredInDefaultSchemaPropKeys<Props>]: InferredPropertyStatesForOption<Props[PropKey], ExcludedPseudoStates> } & { [PropKey in OptionalInDefaultSchemaPropKeys<Props>]?: InferredPropertyStatesForOption<Props[PropKey], ExcludedPseudoStates> } : {} : {};
|
|
61
68
|
/** Generates schema key → properties mappings for a variant's layers or component states */
|
|
62
69
|
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]> };
|
|
63
|
-
type InferredVariantLevelProperties<Props extends Record<string, SelectedConfigurableProperty<ConfigurablePropertiesName, string>>> = { [PropKey in
|
|
70
|
+
type InferredVariantLevelProperties<Props extends Record<string, SelectedConfigurableProperty<ConfigurablePropertiesName, string>>> = { [PropKey in RequiredInDefaultSchemaPropKeys<Props>]: InferredPropertyStates<Props[PropKey]> } & { [PropKey in OptionalInDefaultSchemaPropKeys<Props>]?: InferredPropertyStates<Props[PropKey]> };
|
|
64
71
|
type InferredVariantPropertiesMap<VarKey extends string, VarConfig extends VariantConfigWithProperties, Prefix extends string = ''> = VarConfig extends {
|
|
65
72
|
variantProperties: infer Props extends Record<string, SelectedConfigurableProperty<ConfigurablePropertiesName, string>>;
|
|
66
73
|
} ? { [Option in VarConfig['options'][number] as `${Prefix}${VarKey}/${Option}`]: InferredVariantLevelProperties<Props> } : {};
|
|
@@ -8,6 +8,13 @@ import { SchemaStateValue } from "../types/ConfigSchema.js";
|
|
|
8
8
|
import { OmitIndexSignature, SimplifyDeep, UnionToIntersection, WritableDeep } from "type-fest";
|
|
9
9
|
|
|
10
10
|
//#region ../automated-config/dist/utils/buildConfigSchema.d.ts
|
|
11
|
+
type OptionalInDefaultSchemaPropKeys<Props extends Record<string, SelectedConfigurableProperty<ConfigurablePropertiesName, string>>> = { [K in keyof Props]: Props[K] extends {
|
|
12
|
+
optionalInDefaultSchema: true;
|
|
13
|
+
} ? K : never }[keyof Props];
|
|
14
|
+
type RequiredInDefaultSchemaPropKeys<Props extends Record<string, SelectedConfigurableProperty<ConfigurablePropertiesName, string>>> = { [K in keyof Props]: Props[K] extends {
|
|
15
|
+
optionalInDefaultSchema: true;
|
|
16
|
+
} ? never : K }[keyof Props];
|
|
17
|
+
type InferredLayerPropertyMap<Props extends Record<string, SelectedConfigurableProperty<ConfigurablePropertiesName, string>>, Layer> = { [PropKey in RequiredInDefaultSchemaPropKeys<Props>]: InferredPropertyStates<Props[PropKey], Layer> } & { [PropKey in OptionalInDefaultSchemaPropKeys<Props>]?: InferredPropertyStates<Props[PropKey], Layer> };
|
|
11
18
|
/** Infers default option values from all component variants */
|
|
12
19
|
type InferredDefaults<C extends ComponentConfig> = (C['variants'] extends NonNullable<ComponentConfig['variants']> ? { [VarKey in keyof C['variants']]: C['variants'][VarKey]['options'][number] } : {}) & (C['subComponents'] extends NonNullable<ComponentConfig['subComponents']> ? UnionToIntersection<{ [SubCompKey in keyof C['subComponents']]: { [VarKey in keyof C['subComponents'][SubCompKey]['variants']]: C['subComponents'][SubCompKey]['variants'][VarKey]['options'][number] } }[keyof C['subComponents']]> : {});
|
|
13
20
|
/** Infers type-safe schema value structure for a configurable property */
|
|
@@ -54,13 +61,13 @@ type InferredPropertyStatesForOption<Prop extends SelectedConfigurableProperty<C
|
|
|
54
61
|
/** Infers property-to-states mappings for a layer's properties */
|
|
55
62
|
type InferredLayerProperties<Layer> = Layer extends LayerConfig ? Layer extends {
|
|
56
63
|
properties: infer Props extends LayerConfig['properties'];
|
|
57
|
-
} ?
|
|
64
|
+
} ? InferredLayerPropertyMap<Props, Layer> : {} : {};
|
|
58
65
|
type InferredLayerPropertiesForOption<Layer, ExcludedPseudoStates extends readonly PossibleStates[] | undefined> = Layer extends LayerConfig ? Layer extends {
|
|
59
66
|
properties: infer Props extends LayerConfig['properties'];
|
|
60
|
-
} ? { [PropKey in
|
|
67
|
+
} ? { [PropKey in RequiredInDefaultSchemaPropKeys<Props>]: InferredPropertyStatesForOption<Props[PropKey], ExcludedPseudoStates> } & { [PropKey in OptionalInDefaultSchemaPropKeys<Props>]?: InferredPropertyStatesForOption<Props[PropKey], ExcludedPseudoStates> } : {} : {};
|
|
61
68
|
/** Generates schema key → properties mappings for a variant's layers or component states */
|
|
62
69
|
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]> };
|
|
63
|
-
type InferredVariantLevelProperties<Props extends Record<string, SelectedConfigurableProperty<ConfigurablePropertiesName, string>>> = { [PropKey in
|
|
70
|
+
type InferredVariantLevelProperties<Props extends Record<string, SelectedConfigurableProperty<ConfigurablePropertiesName, string>>> = { [PropKey in RequiredInDefaultSchemaPropKeys<Props>]: InferredPropertyStates<Props[PropKey]> } & { [PropKey in OptionalInDefaultSchemaPropKeys<Props>]?: InferredPropertyStates<Props[PropKey]> };
|
|
64
71
|
type InferredVariantPropertiesMap<VarKey extends string, VarConfig extends VariantConfigWithProperties, Prefix extends string = ''> = VarConfig extends {
|
|
65
72
|
variantProperties: infer Props extends Record<string, SelectedConfigurableProperty<ConfigurablePropertiesName, string>>;
|
|
66
73
|
} ? { [Option in VarConfig['options'][number] as `${Prefix}${VarKey}/${Option}`]: InferredVariantLevelProperties<Props> } : {};
|
|
@@ -70,6 +70,9 @@ function buildPropertyStateMap(layer, property, variantOption, excludedStates =
|
|
|
70
70
|
function propertyVariesOnlyAtRest(property) {
|
|
71
71
|
return property.name === "textVariant";
|
|
72
72
|
}
|
|
73
|
+
function isOptionalInDefaultSchema(property) {
|
|
74
|
+
return property.optionalInDefaultSchema === true;
|
|
75
|
+
}
|
|
73
76
|
/** Resolves the fixture type by finding which value set contains the given value */
|
|
74
77
|
function findFixtureTypeForValue(property, value) {
|
|
75
78
|
const index = property.values.findIndex((arr) => arr.includes(value));
|
|
@@ -99,6 +102,7 @@ function emitUniversalLayerSchema(result, layers, variantKey, variantOption, sub
|
|
|
99
102
|
result.variables[schemaKey] = {};
|
|
100
103
|
for (const propertyKey in layer.properties) {
|
|
101
104
|
const property = layer.properties[propertyKey];
|
|
105
|
+
if (isOptionalInDefaultSchema(property)) continue;
|
|
102
106
|
result.variables[schemaKey] = {
|
|
103
107
|
...result.variables[schemaKey],
|
|
104
108
|
[propertyKey]: buildPropertyStateMap(layer, property, variantOption)
|
|
@@ -132,6 +136,7 @@ function buildConfigSchema(config) {
|
|
|
132
136
|
result.variables[schemaKey] = {};
|
|
133
137
|
for (const propertyKey in layer.properties) {
|
|
134
138
|
const property = layer.properties[propertyKey];
|
|
139
|
+
if (isOptionalInDefaultSchema(property)) continue;
|
|
135
140
|
result.variables[schemaKey] = {
|
|
136
141
|
...result.variables[schemaKey],
|
|
137
142
|
[propertyKey]: buildPropertyStateMap(layer, property, variantOption, getExcludedPseudoStatesForComponentStateOption(componentState, componentStateOption))
|
|
@@ -145,6 +150,7 @@ function buildConfigSchema(config) {
|
|
|
145
150
|
result.variables[variantSchemaKey] = result.variables[variantSchemaKey] ?? {};
|
|
146
151
|
for (const propertyKey in variantConfig.variantProperties) {
|
|
147
152
|
const property = variantConfig.variantProperties[propertyKey];
|
|
153
|
+
if (isOptionalInDefaultSchema(property)) continue;
|
|
148
154
|
result.variables[variantSchemaKey] = {
|
|
149
155
|
...result.variables[variantSchemaKey],
|
|
150
156
|
[propertyKey]: buildPropertyStateMap({
|
|
@@ -180,6 +186,7 @@ function buildConfigSchema(config) {
|
|
|
180
186
|
result.variables[schemaKey] = {};
|
|
181
187
|
for (const propertyKey in layer.properties) {
|
|
182
188
|
const property = layer.properties[propertyKey];
|
|
189
|
+
if (isOptionalInDefaultSchema(property)) continue;
|
|
183
190
|
result.variables[schemaKey] = {
|
|
184
191
|
...result.variables[schemaKey],
|
|
185
192
|
[propertyKey]: buildPropertyStateMap(layer, property, variantOption, getExcludedPseudoStatesForComponentStateOption(componentState, componentStateOption))
|