@yahoo/uds 3.157.0 → 3.158.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/automated-config/dist/generated/autoVariants.cjs +26 -0
- package/dist/automated-config/dist/generated/autoVariants.d.cts +17 -0
- package/dist/automated-config/dist/generated/autoVariants.d.ts +17 -0
- package/dist/automated-config/dist/generated/autoVariants.js +26 -0
- package/dist/automated-config/dist/generated/generatedConfigs.cjs +3287 -596
- package/dist/automated-config/dist/generated/generatedConfigs.d.cts +350 -12
- package/dist/automated-config/dist/generated/generatedConfigs.d.ts +350 -12
- package/dist/automated-config/dist/generated/generatedConfigs.js +3285 -597
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.cjs +276 -45
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.d.cts +8 -2
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.d.ts +8 -2
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.js +276 -45
- 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/types/ComponentConfig.d.cts +3 -1
- package/dist/automated-config/dist/types/ComponentConfig.d.ts +3 -1
- package/dist/automated-config/dist/utils/buildConfigSchema.cjs +48 -33
- package/dist/automated-config/dist/utils/buildConfigSchema.d.cts +14 -4
- package/dist/automated-config/dist/utils/buildConfigSchema.d.ts +14 -4
- package/dist/automated-config/dist/utils/buildConfigSchema.js +49 -34
- package/dist/automated-config/dist/utils/componentStatePseudoStates.cjs +4 -0
- package/dist/automated-config/dist/utils/componentStatePseudoStates.js +4 -1
- 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/getConfigVariantPseudoStates.cjs +5 -2
- package/dist/automated-config/dist/utils/getConfigVariantPseudoStates.js +6 -3
- 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 +106 -33
- package/dist/automated-config/dist/utils/index.d.cts +16 -4
- package/dist/automated-config/dist/utils/index.d.ts +16 -4
- package/dist/automated-config/dist/utils/index.js +107 -34
- 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/automated-config/dist/utils/pseudoStateSelectors.cjs +6 -3
- package/dist/automated-config/dist/utils/pseudoStateSelectors.d.cts +1 -1
- package/dist/automated-config/dist/utils/pseudoStateSelectors.d.ts +1 -1
- package/dist/automated-config/dist/utils/pseudoStateSelectors.js +6 -3
- package/dist/components/client/Button.cjs +3 -3
- package/dist/components/client/Button.js +3 -3
- package/dist/components/client/Input/Input.cjs +1 -1
- package/dist/components/client/Input/Input.js +1 -1
- package/dist/components/client/Menu/Menu.Item.cjs +1 -0
- package/dist/components/client/Menu/Menu.Item.js +1 -0
- package/dist/components/client/Select/Select.cjs +179 -0
- package/dist/components/client/Select/Select.d.cts +55 -0
- package/dist/components/client/Select/Select.d.ts +56 -0
- package/dist/components/client/Select/Select.js +176 -0
- package/dist/components/client/Select/SelectContent.cjs +75 -0
- package/dist/components/client/Select/SelectContent.d.cts +44 -0
- package/dist/components/client/Select/SelectContent.d.ts +45 -0
- package/dist/components/client/Select/SelectContent.js +73 -0
- package/dist/components/client/Select/SelectDivider.cjs +63 -0
- package/dist/components/client/Select/SelectDivider.d.cts +44 -0
- package/dist/components/client/Select/SelectDivider.d.ts +45 -0
- package/dist/components/client/Select/SelectDivider.js +61 -0
- package/dist/components/client/Select/SelectHelpText.cjs +51 -0
- package/dist/components/client/Select/SelectHelpText.d.cts +27 -0
- package/dist/components/client/Select/SelectHelpText.d.ts +28 -0
- package/dist/components/client/Select/SelectHelpText.js +48 -0
- package/dist/components/client/Select/SelectItem.cjs +172 -0
- package/dist/components/client/Select/SelectItem.d.cts +29 -0
- package/dist/components/client/Select/SelectItem.d.ts +30 -0
- package/dist/components/client/Select/SelectItem.js +170 -0
- package/dist/components/client/Select/SelectTrigger.cjs +138 -0
- package/dist/components/client/Select/SelectTrigger.d.cts +27 -0
- package/dist/components/client/Select/SelectTrigger.d.ts +28 -0
- package/dist/components/client/Select/SelectTrigger.js +136 -0
- package/dist/components/client/Select/SelectValue.cjs +28 -0
- package/dist/components/client/Select/SelectValue.d.cts +19 -0
- package/dist/components/client/Select/SelectValue.d.ts +20 -0
- package/dist/components/client/Select/SelectValue.js +26 -0
- package/dist/components/client/Select/index.cjs +11 -0
- package/dist/components/client/Select/index.d.cts +6 -0
- package/dist/components/client/Select/index.d.ts +7 -0
- package/dist/components/client/Select/index.js +7 -0
- package/dist/components/client/Select/selectContext.cjs +20 -0
- package/dist/components/client/Select/selectContext.d.cts +23 -0
- package/dist/components/client/Select/selectContext.d.ts +24 -0
- package/dist/components/client/Select/selectContext.js +16 -0
- package/dist/components/client/Select/selectFieldStyles.cjs +85 -0
- package/dist/components/client/Select/selectFieldStyles.d.cts +37 -0
- package/dist/components/client/Select/selectFieldStyles.d.ts +38 -0
- package/dist/components/client/Select/selectFieldStyles.js +75 -0
- package/dist/components/client/index.cjs +8 -0
- package/dist/components/client/index.d.cts +5 -1
- package/dist/components/client/index.d.ts +5 -1
- package/dist/components/client/index.js +5 -1
- package/dist/components/index.cjs +8 -0
- package/dist/components/index.d.cts +5 -1
- package/dist/components/index.d.ts +5 -1
- package/dist/components/index.js +5 -1
- package/dist/config/dist/index.cjs +383 -73
- package/dist/config/dist/index.js +383 -73
- package/dist/css/dist/css/utils.cjs +3 -0
- package/dist/css/dist/css/utils.js +3 -0
- 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 +383 -73
- package/dist/css/dist/packages/config/dist/index.js +383 -73
- 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 +34 -0
- package/dist/index.d.cts +12 -4
- package/dist/index.d.ts +12 -4
- package/dist/index.js +11 -3
- package/dist/styles/styler.d.cts +29 -12
- package/dist/styles/styler.d.ts +29 -12
- package/dist/styles/variants.d.cts +54 -0
- package/dist/styles/variants.d.ts +54 -0
- package/dist/tailwind/utils/index.cjs +3 -0
- package/dist/tailwind/utils/index.d.cts +2 -1
- package/dist/tailwind/utils/index.d.ts +2 -1
- package/dist/tailwind/utils/index.js +2 -1
- package/dist/tailwind-internal/dist/base/addColorModeVars.cjs +1 -1
- package/dist/tailwind-internal/dist/base/addColorModeVars.js +1 -1
- package/dist/tailwind-internal/dist/base/addColorModeVarsV2.cjs +1 -1
- package/dist/tailwind-internal/dist/base/addColorModeVarsV2.js +1 -1
- package/dist/tailwind-internal/dist/components/getFocusRingStyles.cjs +74 -6
- package/dist/tailwind-internal/dist/components/getFocusRingStyles.d.cts +14 -0
- package/dist/tailwind-internal/dist/components/getFocusRingStyles.d.ts +14 -0
- package/dist/tailwind-internal/dist/components/getFocusRingStyles.js +74 -7
- package/dist/tailwind-internal/dist/components/getResponsiveTextStyles.cjs +1 -1
- package/dist/tailwind-internal/dist/components/getResponsiveTextStyles.js +1 -1
- package/dist/tailwind-internal/dist/index.d.cts +1 -0
- package/dist/tailwind-internal/dist/index.d.ts +1 -0
- package/dist/tailwind-internal/dist/packages/automated-config/dist/generated/generatedConfigs.cjs +3287 -596
- package/dist/tailwind-internal/dist/packages/automated-config/dist/generated/generatedConfigs.js +3285 -597
- 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/componentStatePseudoStates.cjs +4 -0
- package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/componentStatePseudoStates.js +4 -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 +103 -33
- package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/index.js +104 -34
- package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/pseudoStateSelectors.cjs +6 -3
- package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/pseudoStateSelectors.js +6 -3
- package/dist/tailwind-internal/dist/packages/config/dist/index.cjs +383 -73
- package/dist/tailwind-internal/dist/packages/config/dist/index.js +383 -73
- package/dist/tailwind-internal/dist/packages/css-tokens/dist/index.cjs +12 -10
- package/dist/tailwind-internal/dist/packages/css-tokens/dist/index.js +3 -2
- package/dist/tailwind-internal/dist/plugins/a11y.cjs +6 -2
- package/dist/tailwind-internal/dist/plugins/a11y.js +6 -2
- package/dist/tailwind-internal/dist/plugins/blurBgFallback.cjs +1 -1
- package/dist/tailwind-internal/dist/plugins/blurBgFallback.js +1 -1
- package/dist/tailwind-internal/dist/plugins/borderRadius.cjs +1 -1
- package/dist/tailwind-internal/dist/plugins/borderRadius.js +1 -1
- package/dist/tailwind-internal/dist/plugins/borderWidth.cjs +1 -1
- package/dist/tailwind-internal/dist/plugins/borderWidth.js +1 -1
- package/dist/tailwind-internal/dist/plugins/colors.cjs +2 -2
- package/dist/tailwind-internal/dist/plugins/colors.js +2 -2
- package/dist/tailwind-internal/dist/plugins/components.cjs +5 -2
- package/dist/tailwind-internal/dist/plugins/components.js +6 -3
- package/dist/tailwind-internal/dist/plugins/elevation.cjs +1 -1
- package/dist/tailwind-internal/dist/plugins/elevation.js +1 -1
- package/dist/tailwind-internal/dist/plugins/shadows.cjs +1 -1
- package/dist/tailwind-internal/dist/plugins/shadows.js +1 -1
- package/dist/tailwind-internal/dist/plugins/typography.cjs +2 -2
- package/dist/tailwind-internal/dist/plugins/typography.js +2 -2
- package/dist/tailwind-internal/dist/utils/getElevationStyles.cjs +1 -1
- package/dist/tailwind-internal/dist/utils/getElevationStyles.js +1 -1
- package/dist/tailwind-internal/dist/utils/getFontStyles.cjs +1 -1
- package/dist/tailwind-internal/dist/utils/getFontStyles.js +1 -1
- package/dist/tailwind-internal/dist/utils/getMotionStyles.cjs +1 -1
- package/dist/tailwind-internal/dist/utils/getMotionStyles.js +1 -1
- package/dist/tailwind-internal/dist/utils/getShadowPresetValues.cjs +1 -1
- package/dist/tailwind-internal/dist/utils/getShadowPresetValues.js +1 -1
- package/dist/tailwind-internal/dist/utils/getShadowStyles.cjs +1 -1
- package/dist/tailwind-internal/dist/utils/getShadowStyles.js +1 -1
- package/dist/tailwind-internal/dist/utils/parseTokens.cjs +2 -2
- package/dist/tailwind-internal/dist/utils/parseTokens.js +2 -2
- package/dist/tokens/automation/configs/index.cjs +3 -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 +25 -0
- package/dist/tokens/automation/index.d.cts +6 -2
- package/dist/tokens/automation/index.d.ts +6 -2
- package/dist/tokens/automation/index.js +6 -2
- 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 +26 -0
- package/dist/tokens/index.d.cts +8 -4
- package/dist/tokens/index.d.ts +8 -4
- package/dist/tokens/index.js +7 -3
- package/dist/tokens/types.d.cts +2 -2
- package/dist/tokens/types.d.ts +2 -2
- package/dist/types/dist/index.d.cts +36 -1
- package/dist/types/dist/index.d.ts +36 -1
- package/dist/uds/generated/componentData.cjs +718 -308
- package/dist/uds/generated/componentData.js +718 -308
- package/dist/uds/generated/migrationSchemaVersion.cjs +1 -1
- package/dist/uds/generated/migrationSchemaVersion.js +1 -1
- package/dist/uds/generated/tailwindPurge.cjs +1501 -315
- package/dist/uds/generated/tailwindPurge.js +1501 -315
- package/generated/componentData.json +897 -398
- package/generated/migrationSchemaVersion.ts +1 -1
- package/generated/tailwindPurge.ts +4 -4
- package/package.json +1 -1
|
@@ -12,12 +12,16 @@ import { getConfigDefaultValue, isConfigDefaultValue } from "./defaults.js";
|
|
|
12
12
|
import { generateDefaultClassName } from "./generateDefaultClassName.js";
|
|
13
13
|
import { generateKeyFromFlatConfigPath } from "./generateKeyFromFlatConfigPath.js";
|
|
14
14
|
import { generateSchemaKey } from "./generateSchemaKey.js";
|
|
15
|
+
import { IconButtonMatchButtonHeightConfig, IconButtonMatchButtonHeightSize, disableIconButtonMatchButtonHeight, enableIconButtonMatchButtonHeight, isIconButtonMatchButtonHeightEnabled } from "./iconButtonMatchButtonHeight.js";
|
|
16
|
+
import { ButtonControlSchema, SHARED_BUTTON_ICONBUTTON_SIZES, applyButtonControlHeightDeclarations, applyIconButtonControlHeightDeclarations, getButtonContentLineHeight, getButtonControlContentSize, getButtonControlHeight, getButtonIconSizeVar, getIconButtonControlHeight } from "./getButtonControlHeight.js";
|
|
17
|
+
import { getButtonControlHeightPx, getIconButtonControlHeightPx, getIconButtonOnlyControlHeightPx, syncButtonControlHeightVarForSize, syncIconButtonControlHeightVarForSize, syncIconButtonOnlyControlHeightVarForSize } from "./getButtonControlHeightPx.js";
|
|
15
18
|
import { getConfigComponentVariant } from "./getConfigComponentVariant.js";
|
|
16
19
|
import { getConfigVariantComponentStates, getConfigVariantComponentStatesMatrix } from "./getConfigVariantComponentStatesMatrix.js";
|
|
17
20
|
import { getConfigVariantProperties } from "./getConfigVariantProperties.js";
|
|
18
21
|
import { getConfigVariantPseudoStates } from "./getConfigVariantPseudoStates.js";
|
|
19
22
|
import { getConfigVariants } from "./getConfigVariants.js";
|
|
20
23
|
import { PaginationWidthConfig, getPaginationControlWidthPx, syncPaginationWidthVarForSize } from "./getPaginationControlWidthPx.js";
|
|
24
|
+
import { isConfiguratorPropertyVisible } from "./isConfiguratorPropertyVisible.js";
|
|
21
25
|
import { getStateDocsClass, getStateSelector, isKnownStateAtom } from "./pseudoStateSelectors.js";
|
|
22
26
|
import { resolvePropertyStates } from "./resolvePropertyStates.js";
|
|
23
27
|
import { PropertyStates, StateSlot, propertyUsesPerStateEnabled, resolveSlotByCascade } from "./resolveSlotByCascade.js";
|
|
@@ -97,7 +101,8 @@ declare function generateDeclaration({
|
|
|
97
101
|
excludedPseudoStates,
|
|
98
102
|
emit,
|
|
99
103
|
fallbackStateMap,
|
|
100
|
-
bumpRootSpecificity
|
|
104
|
+
bumpRootSpecificity,
|
|
105
|
+
buttonHeightReferenceSchema
|
|
101
106
|
}: {
|
|
102
107
|
componentName: string;
|
|
103
108
|
subComponentName?: string;
|
|
@@ -121,10 +126,13 @@ declare function generateDeclaration({
|
|
|
121
126
|
emit?: EmitMode;
|
|
122
127
|
fallbackStateMap?: VariableState;
|
|
123
128
|
bumpRootSpecificity?: boolean;
|
|
129
|
+
buttonHeightReferenceSchema?: ButtonControlSchema;
|
|
124
130
|
}): Record<string, Record<string, string>>;
|
|
125
131
|
declare function generateConfigStyles<C extends ComponentConfig>(config: C, schema: ComponentSchema<ComponentConfig>, theme: ThemeFn, previewOptions?: {
|
|
126
|
-
generatePseudoStateClassModifier
|
|
127
|
-
}, emit?: EmitMode
|
|
132
|
+
generatePseudoStateClassModifier?: boolean;
|
|
133
|
+
}, emit?: EmitMode, generateStylesContext?: {
|
|
134
|
+
buttonHeightReferenceSchema?: ButtonControlSchema;
|
|
135
|
+
}): Record<string, Record<string, string>>;
|
|
128
136
|
/**
|
|
129
137
|
* Public entry point. Generates a component's CSS, emitting each declared state
|
|
130
138
|
* as its own rule (one selector per rule) so the cascade is carried entirely by
|
|
@@ -143,6 +151,8 @@ declare function generateConfigStyles<C extends ComponentConfig>(config: C, sche
|
|
|
143
151
|
declare const generateStyles: (config: ComponentConfig, schema: ComponentSchema<ComponentConfig>, theme: ThemeFn, previewOptions: {
|
|
144
152
|
generatePseudoStateClassModifier: boolean;
|
|
145
153
|
emit?: EmitMode;
|
|
154
|
+
}, generateStylesContext?: {
|
|
155
|
+
buttonHeightReferenceSchema?: ButtonControlSchema;
|
|
146
156
|
}) => Record<string, Record<string, string>>;
|
|
147
157
|
declare function createConfigurableProperty<C extends ConfigurablePropertiesName, O extends string, T extends (typeof configurableProperties)[C]['possibleFixtures'], V extends readonly (readonly unknown[])[] = readonly (readonly unknown[])[]>(prop: {
|
|
148
158
|
name: C;
|
|
@@ -150,7 +160,8 @@ declare function createConfigurableProperty<C extends ConfigurablePropertiesName
|
|
|
150
160
|
values: V;
|
|
151
161
|
defaults: { [K in O]: V[number][number] | (Extract<T[number], ArbitraryFixtures> extends never ? never : InferArbitraryType<Extract<T[number], ArbitraryFixtures>>) };
|
|
152
162
|
label: string;
|
|
153
|
-
skipRestState?: boolean;
|
|
163
|
+
skipRestState?: boolean;
|
|
164
|
+
optionalInDefaultSchema?: boolean; /** @deprecated Prefer layer-level `atomicStates` + `excludeAtomics`. */
|
|
154
165
|
pseudoStates?: PossibleStates[];
|
|
155
166
|
excludeAtomics?: AtomicState[];
|
|
156
167
|
supportsCustom?: boolean;
|
|
@@ -189,6 +200,7 @@ declare function createComponentStates<T extends {
|
|
|
189
200
|
label: string;
|
|
190
201
|
options: readonly string[];
|
|
191
202
|
excludePseudoStatesForOptions?: Partial<Record<string, readonly PossibleStates[]>>;
|
|
203
|
+
excludeLayersForOptions?: Partial<Record<string, readonly string[]>>;
|
|
192
204
|
layers?: {
|
|
193
205
|
root: LayerConfig;
|
|
194
206
|
} & Record<string, LayerConfig>;
|
|
@@ -3,13 +3,16 @@ import { BUTTON_GAP_VAR, BUTTON_SCALE_EFFECT_HOVER, BUTTON_SCALE_EFFECT_PRESSED,
|
|
|
3
3
|
import { mapTextVariantFixtureToValue } from "../mapTextVariantFixtureToValue.js";
|
|
4
4
|
import { configurableProperties } from "../properties.js";
|
|
5
5
|
import { INTERACTIVE_ATOMICS, MODIFIER_ATOMICS, comparePriority } from "../types/StateAxis.js";
|
|
6
|
-
import { getExcludedPseudoStatesForComponentStateOption } from "./componentStatePseudoStates.js";
|
|
6
|
+
import { getExcludedLayersForComponentStateOption, getExcludedPseudoStatesForComponentStateOption } from "./componentStatePseudoStates.js";
|
|
7
7
|
import { generateSchemaKey } from "./generateSchemaKey.js";
|
|
8
8
|
import "./canonicalizeStateKey.js";
|
|
9
9
|
import { atomicAndCompoundStateKeys, resolvePropertyStates } from "./resolvePropertyStates.js";
|
|
10
10
|
import { isVariantConfigWithComponentStates, isVariantConfigWithProperties } from "./variantConfigGuards.js";
|
|
11
11
|
import { findFixtureTypeForValue } from "./buildConfigSchema.js";
|
|
12
12
|
import { generateDefaultClassName } from "./generateDefaultClassName.js";
|
|
13
|
+
import { applyButtonControlHeightDeclarations, applyIconButtonControlHeightDeclarations, getButtonContentLineHeight } from "./getButtonControlHeight.js";
|
|
14
|
+
import "./iconButtonMatchButtonHeight.js";
|
|
15
|
+
import "./getButtonControlHeightPx.js";
|
|
13
16
|
import { getStateDocsClass, getStateSelector } from "./pseudoStateSelectors.js";
|
|
14
17
|
import { resolveSlotByCascade } from "./resolveSlotByCascade.js";
|
|
15
18
|
import "./cartesianProduct.js";
|
|
@@ -23,6 +26,7 @@ import "./getConfigVariantProperties.js";
|
|
|
23
26
|
import "./getConfigVariantPseudoStates.js";
|
|
24
27
|
import "./getConfigVariants.js";
|
|
25
28
|
import "./getPaginationControlWidthPx.js";
|
|
29
|
+
import "./isConfiguratorPropertyVisible.js";
|
|
26
30
|
import { isFunction, mergeWith } from "lodash-es";
|
|
27
31
|
//#region ../automated-config/dist/utils/index.js
|
|
28
32
|
/*! © 2026 Yahoo, Inc. UDS Default Config v0.0.0-development */
|
|
@@ -85,7 +89,8 @@ const COMPONENTS_WITH_SHADOW_BORDERS = [
|
|
|
85
89
|
const LEGACY_STATE_KEYS = [
|
|
86
90
|
"disabled",
|
|
87
91
|
"focused",
|
|
88
|
-
"focused-keyboard"
|
|
92
|
+
"focused-keyboard",
|
|
93
|
+
"selected"
|
|
89
94
|
];
|
|
90
95
|
/**
|
|
91
96
|
* Enumerates every canonical state key the system supports: rest, every atom,
|
|
@@ -126,15 +131,9 @@ function buildStateRecord(transform) {
|
|
|
126
131
|
}
|
|
127
132
|
const statePseudoMapDocsMode = buildStateRecord(getStateDocsClass);
|
|
128
133
|
/**
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
* @returns Enhanced line-height CSS value with max(), or original value if icon size unavailable
|
|
134
|
+
* Layout line-height for button root: icon size only (not textVariant line-height).
|
|
135
|
+
* @see getButtonContentLineHeight
|
|
132
136
|
*/
|
|
133
|
-
function getButtonLineHeightWithIconMinimum({ lineHeight, schema, iconLayerKey, state, theme }) {
|
|
134
|
-
const iconSizeValue = schema.variables?.[iconLayerKey]?.size?.[state]?.value;
|
|
135
|
-
if (iconSizeValue) return `max(${lineHeight}, ${theme(configurableProperties.iconSize.twThemePath("iconSizes", iconSizeValue))})`;
|
|
136
|
-
return lineHeight;
|
|
137
|
-
}
|
|
138
137
|
/**
|
|
139
138
|
* Shared pagination control content size: max(icon size, text line-height).
|
|
140
139
|
* Keeps page numbers and prev/next icons vertically centered when typography exceeds icon height.
|
|
@@ -255,6 +254,14 @@ function generateClassName({ componentName, subComponentName, variantKey, varian
|
|
|
255
254
|
if (layerOptionalPseudoSelector) className = `${className}${layerOptionalPseudoSelector}`;
|
|
256
255
|
return className.replaceAll(/\s+/g, "-");
|
|
257
256
|
}
|
|
257
|
+
/**
|
|
258
|
+
* Select triggers carry `uds-ring-shadow` and draw focus via the focus-ring tokens.
|
|
259
|
+
* Input wrappers still use `focus-within` border styling, so exclude `.uds-ring` and
|
|
260
|
+
* `.uds-select-field-trigger` descendants from those rules.
|
|
261
|
+
*/
|
|
262
|
+
function getLayerClassSelector(layer, className, componentName, propertyStateSelector) {
|
|
263
|
+
return componentName === "input" && (layer === "inputWrapperDynamic" || layer === "inputWrapper") && propertyStateSelector.includes("focus-within") ? `.${className}:not(.uds-ring):not(.uds-select-field-trigger)` : `.${className}`;
|
|
264
|
+
}
|
|
258
265
|
const getTheCssPropertyValue = (schema, theme, propertyName, schemaStateValue, existingValue, originalPropertyDefinition) => {
|
|
259
266
|
const { value, type } = schemaStateValue;
|
|
260
267
|
const propertyConfig = configurableProperties[propertyName];
|
|
@@ -316,8 +323,16 @@ function selectiveEmittedStates(stateMap, orderedStateKeys, emittableStates) {
|
|
|
316
323
|
}
|
|
317
324
|
return emitted;
|
|
318
325
|
}
|
|
319
|
-
function generateDeclaration({ componentName, subComponentName, variantKey, variantValue, layer, layerOptionalPseudoSelector, componentStateKey, componentStateValue, schema, propertyKey, originalPropertyDefinition, declaredStates, layerUsesAtomicStates, theme, currentStyles, previewOptions, excludedPseudoStates = [], emit, fallbackStateMap, bumpRootSpecificity }) {
|
|
326
|
+
function generateDeclaration({ componentName, subComponentName, variantKey, variantValue, layer, layerOptionalPseudoSelector, componentStateKey, componentStateValue, schema, propertyKey, originalPropertyDefinition, declaredStates, layerUsesAtomicStates, theme, currentStyles, previewOptions, excludedPseudoStates = [], emit, fallbackStateMap, bumpRootSpecificity, buttonHeightReferenceSchema }) {
|
|
320
327
|
const shouldUseExhaustive = (emit ?? "exhaustive") === "exhaustive" && layerUsesAtomicStates;
|
|
328
|
+
const { cssProperties: configuredCssProperties, extendedProperties: configuredExtendedGetter } = configurableProperties[originalPropertyDefinition.name];
|
|
329
|
+
const configuredExtendedProperties = isFunction(configuredExtendedGetter) ? configuredExtendedGetter({
|
|
330
|
+
componentName,
|
|
331
|
+
subComponentName,
|
|
332
|
+
layer,
|
|
333
|
+
propertyKey
|
|
334
|
+
}) : configuredExtendedGetter;
|
|
335
|
+
if (!(typeof configuredCssProperties === "string" && configuredCssProperties.length > 0 || Array.isArray(configuredCssProperties) && configuredCssProperties.length > 0 || Array.isArray(configuredExtendedProperties) && configuredExtendedProperties.length > 0)) return {};
|
|
321
336
|
const schemaKey = generateSchemaKey({
|
|
322
337
|
variantKey,
|
|
323
338
|
variantValue,
|
|
@@ -346,7 +361,8 @@ function generateDeclaration({ componentName, subComponentName, variantKey, vari
|
|
|
346
361
|
for (const propStateStr of orderedStateKeys) {
|
|
347
362
|
if (!emittableStates.has(propStateStr)) continue;
|
|
348
363
|
const propertyState = propStateStr;
|
|
349
|
-
|
|
364
|
+
let propertyStateSelector = getStateSelector(propertyState);
|
|
365
|
+
if (componentName === "selectitem" && propertyState === "focused") propertyStateSelector = ":is(:focus, [data-active-item])";
|
|
350
366
|
const schemaValueForState = shouldUseExhaustive || layerUsesAtomicStates ? resolveSlotByCascade(propStateStr, resolutionStates) : propertyStateMap[propertyState];
|
|
351
367
|
if (!schemaValueForState) continue;
|
|
352
368
|
if (!shouldUseExhaustive) {
|
|
@@ -405,7 +421,8 @@ function generateDeclaration({ componentName, subComponentName, variantKey, vari
|
|
|
405
421
|
layerOptionalPseudoSelector,
|
|
406
422
|
subComponentName
|
|
407
423
|
});
|
|
408
|
-
|
|
424
|
+
const layerClassSelector = getLayerClassSelector(layer, className, componentName, propertyStateSelector);
|
|
425
|
+
fullClassName = `.${rootVariantClassName}${propertyStateSelector}.${rootVariantClassNameWithComponentState} ${layerClassSelector}`;
|
|
409
426
|
} else {
|
|
410
427
|
className = generateClassName({
|
|
411
428
|
componentName,
|
|
@@ -415,7 +432,8 @@ function generateDeclaration({ componentName, subComponentName, variantKey, vari
|
|
|
415
432
|
layerOptionalPseudoSelector,
|
|
416
433
|
subComponentName
|
|
417
434
|
});
|
|
418
|
-
|
|
435
|
+
const layerClassSelector = getLayerClassSelector(layer, className, componentName, propertyStateSelector);
|
|
436
|
+
fullClassName = bumpRootSpecificity ? `.${rootVariantClassName}.${rootVariantClassName}${propertyStateSelector} ${layerClassSelector}` : `.${rootVariantClassName}${propertyStateSelector} ${layerClassSelector}`;
|
|
419
437
|
}
|
|
420
438
|
}
|
|
421
439
|
const { cssProperties, extendedProperties: extendedPropertiesGetter } = configurableProperties[originalPropertyDefinition.name];
|
|
@@ -452,6 +470,28 @@ function generateDeclaration({ componentName, subComponentName, variantKey, vari
|
|
|
452
470
|
*/
|
|
453
471
|
if (componentName === "button" && layer === "root") {
|
|
454
472
|
if (propertyKey === CSS_GAP) cssDeclarations[BUTTON_GAP_VAR] = cssDeclarations[CSS_GAP];
|
|
473
|
+
if (propertyKey === "spacingVertical") {
|
|
474
|
+
const paddingVertical = cssDeclarations["padding-top"];
|
|
475
|
+
if (paddingVertical) applyButtonControlHeightDeclarations({
|
|
476
|
+
cssDeclarations,
|
|
477
|
+
paddingVertical,
|
|
478
|
+
schema,
|
|
479
|
+
rootLayerKey: generateSchemaKey({
|
|
480
|
+
variantKey,
|
|
481
|
+
variantValue,
|
|
482
|
+
layer: "root",
|
|
483
|
+
subComponentName
|
|
484
|
+
}),
|
|
485
|
+
iconLayerKey: generateSchemaKey({
|
|
486
|
+
variantKey,
|
|
487
|
+
variantValue,
|
|
488
|
+
layer: "icon",
|
|
489
|
+
subComponentName
|
|
490
|
+
}),
|
|
491
|
+
state: propertyState,
|
|
492
|
+
theme
|
|
493
|
+
});
|
|
494
|
+
}
|
|
455
495
|
if (propertyKey === "scaleEffect" && propertyState === "hover") {
|
|
456
496
|
const rootClassName = `.${className}`;
|
|
457
497
|
const renderValue = (schemaValue) => configurableProperties.scaleEffect.customValueRenderer?.(schemaValue, schema, () => "") ?? "1";
|
|
@@ -460,17 +500,39 @@ function generateDeclaration({ componentName, subComponentName, variantKey, vari
|
|
|
460
500
|
if (propertyStateMap.hover) styles[rootClassName][BUTTON_SCALE_EFFECT_HOVER] = renderValue(propertyStateMap.hover);
|
|
461
501
|
if (propertyStateMap.pressed) styles[rootClassName][BUTTON_SCALE_EFFECT_PRESSED] = renderValue(propertyStateMap.pressed);
|
|
462
502
|
}
|
|
463
|
-
if (cssDeclarations[CSS_LINE_HEIGHT]) {
|
|
464
|
-
|
|
503
|
+
if (cssDeclarations[CSS_LINE_HEIGHT]) cssDeclarations[CSS_LINE_HEIGHT] = getButtonContentLineHeight({
|
|
504
|
+
schema,
|
|
505
|
+
rootLayerKey: generateSchemaKey({
|
|
506
|
+
variantKey,
|
|
507
|
+
variantValue,
|
|
508
|
+
layer: "root",
|
|
509
|
+
subComponentName
|
|
510
|
+
}),
|
|
511
|
+
iconLayerKey: generateSchemaKey({
|
|
465
512
|
variantKey,
|
|
466
513
|
variantValue,
|
|
467
514
|
layer: "icon",
|
|
468
515
|
subComponentName
|
|
469
|
-
})
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
516
|
+
}),
|
|
517
|
+
state: propertyState,
|
|
518
|
+
theme
|
|
519
|
+
});
|
|
520
|
+
}
|
|
521
|
+
if (componentName === "iconbutton" && layer === "root") {
|
|
522
|
+
if (propertyKey === "spacing") {
|
|
523
|
+
const paddingVertical = cssDeclarations[CSS_PADDING];
|
|
524
|
+
if (paddingVertical) applyIconButtonControlHeightDeclarations({
|
|
525
|
+
cssDeclarations,
|
|
526
|
+
paddingVertical,
|
|
527
|
+
iconButtonSchema: schema,
|
|
528
|
+
buttonHeightReferenceSchema,
|
|
529
|
+
variantValue,
|
|
530
|
+
iconLayerKey: generateSchemaKey({
|
|
531
|
+
variantKey,
|
|
532
|
+
variantValue,
|
|
533
|
+
layer: "icon",
|
|
534
|
+
subComponentName
|
|
535
|
+
}),
|
|
474
536
|
state: propertyState,
|
|
475
537
|
theme
|
|
476
538
|
});
|
|
@@ -512,8 +574,8 @@ function generateDeclaration({ componentName, subComponentName, variantKey, vari
|
|
|
512
574
|
});
|
|
513
575
|
}
|
|
514
576
|
}
|
|
577
|
+
if (propertyKey === "borderRadius" && cssDeclarations[CSS_BORDER_RADIUS] && (componentName === "paddlenav" && layer === "root" || componentName === "input" && layer === "inputWrapperDynamic")) cssDeclarations[NESTED_BORDER_RADIUS_SIZE_VAR] = cssDeclarations[CSS_BORDER_RADIUS];
|
|
515
578
|
if (componentName === "paddlenav" && layer === "root") {
|
|
516
|
-
if (propertyKey === "borderRadius" && cssDeclarations[CSS_BORDER_RADIUS]) cssDeclarations[NESTED_BORDER_RADIUS_SIZE_VAR] = cssDeclarations[CSS_BORDER_RADIUS];
|
|
517
579
|
if (propertyKey === "borderWidth" && cssDeclarations[CSS_BORDER_WIDTH]) cssDeclarations[NESTED_BORDER_RADIUS_WIDTH_VAR] = cssDeclarations[CSS_BORDER_WIDTH];
|
|
518
580
|
}
|
|
519
581
|
if ((componentName === "tabs" || componentName === "tab") && layer === "root") {
|
|
@@ -649,7 +711,7 @@ function emitSchemaOverrideStyles({ componentName, subComponentName, variantKey,
|
|
|
649
711
|
* layers express the variant's universal baseline, with per-state overrides
|
|
650
712
|
* winning via class-compound specificity).
|
|
651
713
|
*/
|
|
652
|
-
function emitUniversalLayers({ componentName, subComponentName, variantKey, variantOption, layers, schema, theme, previewOptions, emit, currentStyles, bumpRootSpecificity }) {
|
|
714
|
+
function emitUniversalLayers({ componentName, subComponentName, variantKey, variantOption, layers, schema, theme, previewOptions, emit, currentStyles, bumpRootSpecificity, buttonHeightReferenceSchema }) {
|
|
653
715
|
let styles = currentStyles;
|
|
654
716
|
const variables = schema.variables;
|
|
655
717
|
for (const layerKey in layers) {
|
|
@@ -680,14 +742,15 @@ function emitUniversalLayers({ componentName, subComponentName, variantKey, vari
|
|
|
680
742
|
currentStyles: styles,
|
|
681
743
|
previewOptions,
|
|
682
744
|
emit,
|
|
683
|
-
bumpRootSpecificity
|
|
745
|
+
bumpRootSpecificity,
|
|
746
|
+
buttonHeightReferenceSchema
|
|
684
747
|
});
|
|
685
748
|
styles = deepMerge(styles, declarations);
|
|
686
749
|
}
|
|
687
750
|
}
|
|
688
751
|
return styles;
|
|
689
752
|
}
|
|
690
|
-
function generateConfigStyles(config, schema, theme, previewOptions, emit) {
|
|
753
|
+
function generateConfigStyles(config, schema, theme, previewOptions, emit, generateStylesContext) {
|
|
691
754
|
const componentName = config.label.toLowerCase();
|
|
692
755
|
let styles = {};
|
|
693
756
|
for (const variantKey in config.variants) {
|
|
@@ -703,14 +766,17 @@ function generateConfigStyles(config, schema, theme, previewOptions, emit) {
|
|
|
703
766
|
previewOptions,
|
|
704
767
|
emit,
|
|
705
768
|
currentStyles: styles,
|
|
706
|
-
bumpRootSpecificity: true
|
|
769
|
+
bumpRootSpecificity: true,
|
|
770
|
+
buttonHeightReferenceSchema: generateStylesContext?.buttonHeightReferenceSchema
|
|
707
771
|
});
|
|
708
772
|
const componentStates = variantConfig.componentStates;
|
|
709
773
|
for (const componentStateKey in componentStates) {
|
|
710
774
|
const componentState = componentStates[componentStateKey];
|
|
711
775
|
for (const componentStateOption of componentState.options) {
|
|
712
776
|
const excludedPseudoStates = getExcludedPseudoStatesForComponentStateOption(componentState, componentStateOption);
|
|
777
|
+
const excludedLayers = new Set(getExcludedLayersForComponentStateOption(componentState, componentStateOption));
|
|
713
778
|
for (const layerKey in componentState.layers) {
|
|
779
|
+
if (excludedLayers.has(layerKey)) continue;
|
|
714
780
|
const layer = componentState.layers[layerKey];
|
|
715
781
|
for (const propertyKey in layer.properties) {
|
|
716
782
|
const originalPropertyDefinition = layer.properties[propertyKey];
|
|
@@ -731,7 +797,8 @@ function generateConfigStyles(config, schema, theme, previewOptions, emit) {
|
|
|
731
797
|
currentStyles: styles,
|
|
732
798
|
previewOptions,
|
|
733
799
|
excludedPseudoStates,
|
|
734
|
-
emit
|
|
800
|
+
emit,
|
|
801
|
+
buttonHeightReferenceSchema: generateStylesContext?.buttonHeightReferenceSchema
|
|
735
802
|
});
|
|
736
803
|
styles = deepMerge(styles, declarations);
|
|
737
804
|
}
|
|
@@ -758,7 +825,8 @@ function generateConfigStyles(config, schema, theme, previewOptions, emit) {
|
|
|
758
825
|
theme,
|
|
759
826
|
previewOptions,
|
|
760
827
|
emit,
|
|
761
|
-
currentStyles: styles
|
|
828
|
+
currentStyles: styles,
|
|
829
|
+
buttonHeightReferenceSchema: generateStylesContext?.buttonHeightReferenceSchema
|
|
762
830
|
});
|
|
763
831
|
}
|
|
764
832
|
if (config.subComponents) {
|
|
@@ -777,14 +845,17 @@ function generateConfigStyles(config, schema, theme, previewOptions, emit) {
|
|
|
777
845
|
previewOptions,
|
|
778
846
|
emit,
|
|
779
847
|
currentStyles: styles,
|
|
780
|
-
bumpRootSpecificity: true
|
|
848
|
+
bumpRootSpecificity: true,
|
|
849
|
+
buttonHeightReferenceSchema: generateStylesContext?.buttonHeightReferenceSchema
|
|
781
850
|
});
|
|
782
851
|
const componentStates = variantConfig.componentStates;
|
|
783
852
|
for (const componentStateKey in componentStates) {
|
|
784
853
|
const componentState = componentStates[componentStateKey];
|
|
785
854
|
for (const componentStateOption of componentState.options) {
|
|
786
855
|
const excludedPseudoStates = getExcludedPseudoStatesForComponentStateOption(componentState, componentStateOption);
|
|
856
|
+
const excludedLayers = new Set(getExcludedLayersForComponentStateOption(componentState, componentStateOption));
|
|
787
857
|
for (const layerKey in componentState.layers) {
|
|
858
|
+
if (excludedLayers.has(layerKey)) continue;
|
|
788
859
|
const layer = componentState.layers[layerKey];
|
|
789
860
|
for (const propertyKey in layer.properties) {
|
|
790
861
|
const originalPropertyDefinition = layer.properties[propertyKey];
|
|
@@ -806,7 +877,8 @@ function generateConfigStyles(config, schema, theme, previewOptions, emit) {
|
|
|
806
877
|
currentStyles: styles,
|
|
807
878
|
previewOptions,
|
|
808
879
|
excludedPseudoStates,
|
|
809
|
-
emit
|
|
880
|
+
emit,
|
|
881
|
+
buttonHeightReferenceSchema: generateStylesContext?.buttonHeightReferenceSchema
|
|
810
882
|
});
|
|
811
883
|
styles = deepMerge(styles, declarations);
|
|
812
884
|
}
|
|
@@ -835,7 +907,8 @@ function generateConfigStyles(config, schema, theme, previewOptions, emit) {
|
|
|
835
907
|
theme,
|
|
836
908
|
previewOptions,
|
|
837
909
|
emit,
|
|
838
|
-
currentStyles: styles
|
|
910
|
+
currentStyles: styles,
|
|
911
|
+
buttonHeightReferenceSchema: generateStylesContext?.buttonHeightReferenceSchema
|
|
839
912
|
});
|
|
840
913
|
}
|
|
841
914
|
}
|
|
@@ -869,8 +942,8 @@ function generateConfigStyles(config, schema, theme, previewOptions, emit) {
|
|
|
869
942
|
* @param previewOptions - Options for generating preview mode class modifiers
|
|
870
943
|
* @returns CSS styles object with grouped selectors for default aliases
|
|
871
944
|
*/
|
|
872
|
-
const generateStylesInner = (config, schema, theme, previewOptions) => {
|
|
873
|
-
const styles = generateConfigStyles(config, schema, theme, previewOptions, previewOptions.emit ?? "exhaustive");
|
|
945
|
+
const generateStylesInner = (config, schema, theme, previewOptions, generateStylesContext) => {
|
|
946
|
+
const styles = generateConfigStyles(config, schema, theme, previewOptions, previewOptions.emit ?? "exhaustive", generateStylesContext);
|
|
874
947
|
if (!config.variants && !config.subComponents) return styles;
|
|
875
948
|
const componentName = config.label.toLowerCase();
|
|
876
949
|
if (componentName !== "button" && componentName !== "iconbutton") return styles;
|
|
@@ -951,7 +1024,7 @@ const generateStylesInner = (config, schema, theme, previewOptions) => {
|
|
|
951
1024
|
* list, so minifiers leave their specificity intact. (gzip already collapses the
|
|
952
1025
|
* repeated declaration blocks, so the shipped-size cost is minimal.)
|
|
953
1026
|
*/
|
|
954
|
-
const generateStyles = (config, schema, theme, previewOptions) => generateStylesInner(config, schema, theme, previewOptions);
|
|
1027
|
+
const generateStyles = (config, schema, theme, previewOptions, generateStylesContext) => generateStylesInner(config, schema, theme, previewOptions, generateStylesContext);
|
|
955
1028
|
/**
|
|
956
1029
|
* Throws if `values` contains a duplicate entry. Runs at config-import time so
|
|
957
1030
|
* a typo like `atomicStates: ['hover', 'hover']` fails the UDS build instead
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
//#region ../automated-config/dist/utils/isConfiguratorPropertyVisible.js
|
|
3
|
+
/*! © 2026 Yahoo, Inc. UDS Default Config v0.0.0-development */
|
|
4
|
+
/**
|
|
5
|
+
* Opt-in schema properties (`optionalInDefaultSchema`) are written at runtime
|
|
6
|
+
* (e.g. IconButton `controlHeight` when match-button-height is enabled) for
|
|
7
|
+
* CSS/Figma sync — not for direct editing in the configurator. Hide them so the
|
|
8
|
+
* sidebar never calls `getConfigPseudoStateVariables` on slots that may exist
|
|
9
|
+
* on `branch.config` before `resolvedConfig` catches up.
|
|
10
|
+
*/
|
|
11
|
+
function isConfiguratorPropertyVisible(_config, _componentName, _variableKey, _propertyKey, property) {
|
|
12
|
+
return property.optionalInDefaultSchema !== true;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
exports.isConfiguratorPropertyVisible = isConfiguratorPropertyVisible;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
import { UniversalTokensConfigAuto } from "../generated/universalTokensConfigAuto.cjs";
|
|
3
|
+
|
|
4
|
+
//#region ../automated-config/dist/utils/isConfiguratorPropertyVisible.d.ts
|
|
5
|
+
//#region src/utils/isConfiguratorPropertyVisible.d.ts
|
|
6
|
+
type ConfigWithComponentVariables = { [K in keyof UniversalTokensConfigAuto]?: {
|
|
7
|
+
variables?: Record<string, Record<string, unknown>>;
|
|
8
|
+
} };
|
|
9
|
+
/**
|
|
10
|
+
* Opt-in schema properties (`optionalInDefaultSchema`) are written at runtime
|
|
11
|
+
* (e.g. IconButton `controlHeight` when match-button-height is enabled) for
|
|
12
|
+
* CSS/Figma sync — not for direct editing in the configurator. Hide them so the
|
|
13
|
+
* sidebar never calls `getConfigPseudoStateVariables` on slots that may exist
|
|
14
|
+
* on `branch.config` before `resolvedConfig` catches up.
|
|
15
|
+
*/
|
|
16
|
+
declare function isConfiguratorPropertyVisible(_config: Readonly<ConfigWithComponentVariables>, _componentName: keyof UniversalTokensConfigAuto, _variableKey: string, _propertyKey: string, property: {
|
|
17
|
+
optionalInDefaultSchema?: boolean;
|
|
18
|
+
}): boolean; //#endregion
|
|
19
|
+
//#endregion
|
|
20
|
+
export { isConfiguratorPropertyVisible };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
import { UniversalTokensConfigAuto } from "../generated/universalTokensConfigAuto.js";
|
|
3
|
+
|
|
4
|
+
//#region ../automated-config/dist/utils/isConfiguratorPropertyVisible.d.ts
|
|
5
|
+
//#region src/utils/isConfiguratorPropertyVisible.d.ts
|
|
6
|
+
type ConfigWithComponentVariables = { [K in keyof UniversalTokensConfigAuto]?: {
|
|
7
|
+
variables?: Record<string, Record<string, unknown>>;
|
|
8
|
+
} };
|
|
9
|
+
/**
|
|
10
|
+
* Opt-in schema properties (`optionalInDefaultSchema`) are written at runtime
|
|
11
|
+
* (e.g. IconButton `controlHeight` when match-button-height is enabled) for
|
|
12
|
+
* CSS/Figma sync — not for direct editing in the configurator. Hide them so the
|
|
13
|
+
* sidebar never calls `getConfigPseudoStateVariables` on slots that may exist
|
|
14
|
+
* on `branch.config` before `resolvedConfig` catches up.
|
|
15
|
+
*/
|
|
16
|
+
declare function isConfiguratorPropertyVisible(_config: Readonly<ConfigWithComponentVariables>, _componentName: keyof UniversalTokensConfigAuto, _variableKey: string, _propertyKey: string, property: {
|
|
17
|
+
optionalInDefaultSchema?: boolean;
|
|
18
|
+
}): boolean; //#endregion
|
|
19
|
+
//#endregion
|
|
20
|
+
export { isConfiguratorPropertyVisible };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
//#region ../automated-config/dist/utils/isConfiguratorPropertyVisible.js
|
|
3
|
+
/*! © 2026 Yahoo, Inc. UDS Default Config v0.0.0-development */
|
|
4
|
+
/**
|
|
5
|
+
* Opt-in schema properties (`optionalInDefaultSchema`) are written at runtime
|
|
6
|
+
* (e.g. IconButton `controlHeight` when match-button-height is enabled) for
|
|
7
|
+
* CSS/Figma sync — not for direct editing in the configurator. Hide them so the
|
|
8
|
+
* sidebar never calls `getConfigPseudoStateVariables` on slots that may exist
|
|
9
|
+
* on `branch.config` before `resolvedConfig` catches up.
|
|
10
|
+
*/
|
|
11
|
+
function isConfiguratorPropertyVisible(_config, _componentName, _variableKey, _propertyKey, property) {
|
|
12
|
+
return property.optionalInDefaultSchema !== true;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { isConfiguratorPropertyVisible };
|
|
@@ -6,7 +6,8 @@ const require_canonicalizeStateKey = require("./canonicalizeStateKey.cjs");
|
|
|
6
6
|
const LEGACY_STATE_ATOMS = new Set([
|
|
7
7
|
"disabled",
|
|
8
8
|
"focused",
|
|
9
|
-
"focused-keyboard"
|
|
9
|
+
"focused-keyboard",
|
|
10
|
+
"selected"
|
|
10
11
|
]);
|
|
11
12
|
function isKnownStateAtom(atom) {
|
|
12
13
|
return require_StateAxis.isAtomicState(atom) || LEGACY_STATE_ATOMS.has(atom);
|
|
@@ -64,7 +65,8 @@ const ATOMIC_SELECTORS = {
|
|
|
64
65
|
readonly: ":has(:read-only:where(input, textarea))",
|
|
65
66
|
invalid: ":has([aria-invalid=\"true\"])",
|
|
66
67
|
"placeholder-shown": ":has(:placeholder-shown)",
|
|
67
|
-
autofill: ":has(:autofill, :-webkit-autofill)"
|
|
68
|
+
autofill: ":has(:autofill, :-webkit-autofill)",
|
|
69
|
+
selected: "[aria-selected=\"true\"]"
|
|
68
70
|
};
|
|
69
71
|
const ATOMIC_DOCS_CLASSES = {
|
|
70
72
|
hover: "hover",
|
|
@@ -78,7 +80,8 @@ const ATOMIC_DOCS_CLASSES = {
|
|
|
78
80
|
readonly: "input-readonly",
|
|
79
81
|
invalid: "has-input-invalid",
|
|
80
82
|
"placeholder-shown": "has-input-placeholder-shown",
|
|
81
|
-
autofill: "has-input-autofill"
|
|
83
|
+
autofill: "has-input-autofill",
|
|
84
|
+
selected: "aria-selected"
|
|
82
85
|
};
|
|
83
86
|
/**
|
|
84
87
|
* Returns the CSS pseudo-selector string for a state key.
|
|
@@ -8,7 +8,7 @@ import { AtomicState } from "../types/StateAxis.cjs";
|
|
|
8
8
|
* unmigrated configs. They aren't composable through `StateAxis`, so the new
|
|
9
9
|
* resolver/StateBuilder never emit them.
|
|
10
10
|
*/
|
|
11
|
-
type LegacyStateAtom = 'disabled' | 'focused' | 'focused-keyboard';
|
|
11
|
+
type LegacyStateAtom = 'disabled' | 'focused' | 'focused-keyboard' | 'selected';
|
|
12
12
|
type KnownStateAtom = AtomicState | LegacyStateAtom;
|
|
13
13
|
declare function isKnownStateAtom(atom: string): atom is KnownStateAtom;
|
|
14
14
|
/**
|
|
@@ -8,7 +8,7 @@ import { AtomicState } from "../types/StateAxis.js";
|
|
|
8
8
|
* unmigrated configs. They aren't composable through `StateAxis`, so the new
|
|
9
9
|
* resolver/StateBuilder never emit them.
|
|
10
10
|
*/
|
|
11
|
-
type LegacyStateAtom = 'disabled' | 'focused' | 'focused-keyboard';
|
|
11
|
+
type LegacyStateAtom = 'disabled' | 'focused' | 'focused-keyboard' | 'selected';
|
|
12
12
|
type KnownStateAtom = AtomicState | LegacyStateAtom;
|
|
13
13
|
declare function isKnownStateAtom(atom: string): atom is KnownStateAtom;
|
|
14
14
|
/**
|
|
@@ -6,7 +6,8 @@ import { splitStateKey } from "./canonicalizeStateKey.js";
|
|
|
6
6
|
const LEGACY_STATE_ATOMS = new Set([
|
|
7
7
|
"disabled",
|
|
8
8
|
"focused",
|
|
9
|
-
"focused-keyboard"
|
|
9
|
+
"focused-keyboard",
|
|
10
|
+
"selected"
|
|
10
11
|
]);
|
|
11
12
|
function isKnownStateAtom(atom) {
|
|
12
13
|
return isAtomicState(atom) || LEGACY_STATE_ATOMS.has(atom);
|
|
@@ -64,7 +65,8 @@ const ATOMIC_SELECTORS = {
|
|
|
64
65
|
readonly: ":has(:read-only:where(input, textarea))",
|
|
65
66
|
invalid: ":has([aria-invalid=\"true\"])",
|
|
66
67
|
"placeholder-shown": ":has(:placeholder-shown)",
|
|
67
|
-
autofill: ":has(:autofill, :-webkit-autofill)"
|
|
68
|
+
autofill: ":has(:autofill, :-webkit-autofill)",
|
|
69
|
+
selected: "[aria-selected=\"true\"]"
|
|
68
70
|
};
|
|
69
71
|
const ATOMIC_DOCS_CLASSES = {
|
|
70
72
|
hover: "hover",
|
|
@@ -78,7 +80,8 @@ const ATOMIC_DOCS_CLASSES = {
|
|
|
78
80
|
readonly: "input-readonly",
|
|
79
81
|
invalid: "has-input-invalid",
|
|
80
82
|
"placeholder-shown": "has-input-placeholder-shown",
|
|
81
|
-
autofill: "has-input-autofill"
|
|
83
|
+
autofill: "has-input-autofill",
|
|
84
|
+
selected: "aria-selected"
|
|
82
85
|
};
|
|
83
86
|
/**
|
|
84
87
|
* Returns the CSS pseudo-selector string for a state key.
|
|
@@ -146,7 +146,7 @@ const Button = (0, react.forwardRef)(function Button({ size, variant, startIcon,
|
|
|
146
146
|
className: require_styles_styler.cx([
|
|
147
147
|
"uds-ring",
|
|
148
148
|
"uds-hit-target",
|
|
149
|
-
"inline-flex overflow-hidden justify-center items-center whitespace-nowrap select-none",
|
|
149
|
+
"inline-flex max-w-full overflow-hidden justify-center items-center whitespace-nowrap select-none",
|
|
150
150
|
"[transform-origin:center]",
|
|
151
151
|
"[backface-visibility:hidden]",
|
|
152
152
|
"[transition-property:color,background-color,border-color,box-shadow,text-decoration-color,fill,stroke]",
|
|
@@ -161,14 +161,14 @@ const Button = (0, react.forwardRef)(function Button({ size, variant, startIcon,
|
|
|
161
161
|
className
|
|
162
162
|
])
|
|
163
163
|
}),
|
|
164
|
-
iconContainer: "flex overflow-clip uds-button-icon-container",
|
|
164
|
+
iconContainer: "flex shrink-0 overflow-clip uds-button-icon-container",
|
|
165
165
|
icon: require_styles_styler.getStyles({ className: require_styles_styler.cx([iconSizeClass, iconVariantClass]) }),
|
|
166
166
|
loadingIcon: require_styles_styler.getStyles({ className: require_styles_styler.cx([
|
|
167
167
|
"animate-spin",
|
|
168
168
|
iconSizeClass,
|
|
169
169
|
iconVariantClass
|
|
170
170
|
]) }),
|
|
171
|
-
content: require_styles_styler.cx(["truncate"])
|
|
171
|
+
content: require_styles_styler.cx(["min-w-0 truncate"])
|
|
172
172
|
}), [
|
|
173
173
|
className,
|
|
174
174
|
disableEffects,
|
|
@@ -143,7 +143,7 @@ const Button = forwardRef(function Button({ size, variant, startIcon, endIcon, i
|
|
|
143
143
|
className: cx([
|
|
144
144
|
"uds-ring",
|
|
145
145
|
"uds-hit-target",
|
|
146
|
-
"inline-flex overflow-hidden justify-center items-center whitespace-nowrap select-none",
|
|
146
|
+
"inline-flex max-w-full overflow-hidden justify-center items-center whitespace-nowrap select-none",
|
|
147
147
|
"[transform-origin:center]",
|
|
148
148
|
"[backface-visibility:hidden]",
|
|
149
149
|
"[transition-property:color,background-color,border-color,box-shadow,text-decoration-color,fill,stroke]",
|
|
@@ -158,14 +158,14 @@ const Button = forwardRef(function Button({ size, variant, startIcon, endIcon, i
|
|
|
158
158
|
className
|
|
159
159
|
])
|
|
160
160
|
}),
|
|
161
|
-
iconContainer: "flex overflow-clip uds-button-icon-container",
|
|
161
|
+
iconContainer: "flex shrink-0 overflow-clip uds-button-icon-container",
|
|
162
162
|
icon: getStyles({ className: cx([iconSizeClass, iconVariantClass]) }),
|
|
163
163
|
loadingIcon: getStyles({ className: cx([
|
|
164
164
|
"animate-spin",
|
|
165
165
|
iconSizeClass,
|
|
166
166
|
iconVariantClass
|
|
167
167
|
]) }),
|
|
168
|
-
content: cx(["truncate"])
|
|
168
|
+
content: cx(["min-w-0 truncate"])
|
|
169
169
|
}), [
|
|
170
170
|
className,
|
|
171
171
|
disableEffects,
|
|
@@ -147,7 +147,7 @@ const Input = (0, react.forwardRef)(function Input({ id, label, type = "text", s
|
|
|
147
147
|
inputSizeInputWrapperDynamic: size,
|
|
148
148
|
inputVariantInputWrapper: "default",
|
|
149
149
|
inputVariantValueInputWrapper: !value ? "empty" : "filled"
|
|
150
|
-
}), "min-w-[200px]", inputWrapperClassName),
|
|
150
|
+
}), "min-w-[200px]", "uds-ring-shadow", "uds-ring-within", inputWrapperClassName),
|
|
151
151
|
input: require_styles_styler.getStyles({
|
|
152
152
|
inputSizeInput: size,
|
|
153
153
|
inputVariantInput: "default",
|
|
@@ -144,7 +144,7 @@ const Input = forwardRef(function Input({ id, label, type = "text", size = "md",
|
|
|
144
144
|
inputSizeInputWrapperDynamic: size,
|
|
145
145
|
inputVariantInputWrapper: "default",
|
|
146
146
|
inputVariantValueInputWrapper: !value ? "empty" : "filled"
|
|
147
|
-
}), "min-w-[200px]", inputWrapperClassName),
|
|
147
|
+
}), "min-w-[200px]", "uds-ring-shadow", "uds-ring-within", inputWrapperClassName),
|
|
148
148
|
input: getStyles({
|
|
149
149
|
inputSizeInput: size,
|
|
150
150
|
inputVariantInput: "default",
|
|
@@ -66,6 +66,7 @@ const MenuItem = (0, react.forwardRef)(function MenuItem({ active, hideOnClick,
|
|
|
66
66
|
},
|
|
67
67
|
text: {
|
|
68
68
|
className: require_styles_styler.cx(require_styles_styler.getStyles({
|
|
69
|
+
menuitemSizeText: "default",
|
|
69
70
|
menuitemItemVariantText: "default",
|
|
70
71
|
menuitemItemVariantActiveText: active ? "on" : "off"
|
|
71
72
|
}), slotProps?.text?.className),
|
|
@@ -64,6 +64,7 @@ const MenuItem = forwardRef(function MenuItem({ active, hideOnClick, slotProps,
|
|
|
64
64
|
},
|
|
65
65
|
text: {
|
|
66
66
|
className: cx(getStyles({
|
|
67
|
+
menuitemSizeText: "default",
|
|
67
68
|
menuitemItemVariantText: "default",
|
|
68
69
|
menuitemItemVariantActiveText: active ? "on" : "off"
|
|
69
70
|
}), slotProps?.text?.className),
|