@multiplatform.one/theme 7.34.4 → 7.36.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/package.json +20 -5
- package/src/audit/constraintAudit.spec.ts +274 -87
- package/src/audit/constraintAudit.ts +135 -120
- package/src/audit/constraintScope.spec.ts +1 -1
- package/src/audit/designTokens.ts +42 -0
- package/src/audit/themeMatrix.spec.ts +83 -2
- package/src/audit/themeMatrix.ts +33 -1
- package/src/figma/figmaTokens.spec.ts +26 -34
- package/src/figma/figmaTokens.ts +26 -50
- package/src/fonts/createFontLoader.ts +4 -1
- package/src/menuRow.ts +4 -1
- package/src/theme/FontKnobStyles.tsx +2 -1
- package/src/theme/Preset.stories.tsx +0 -1
- package/src/theme/Preset.tsx +6 -1
- package/src/theme/PresetContext.ts +4 -0
- package/src/theme/Surface.spec.tsx +114 -67
- package/src/theme/Surface.stories.tsx +8 -25
- package/src/theme/Surface.tsx +87 -43
- package/src/theme/accentFloor.spec.ts +37 -11
- package/src/theme/activateThemeConfig.ts +22 -6
- package/src/theme/animations/animations.spec.ts +62 -0
- package/src/theme/animations/css.ts +9 -35
- package/src/theme/animations/reactNative.ts +98 -25
- package/src/theme/boundaryFloor.spec.ts +57 -0
- package/src/theme/chartPalette.spec.ts +56 -27
- package/src/theme/chartPalette.ts +33 -28
- package/src/theme/colorRules.spec.ts +32 -72
- package/src/theme/cookies.spec.ts +49 -18
- package/src/theme/cookies.ts +36 -7
- package/src/theme/cookiesPersistence.spec.ts +5 -5
- package/src/theme/createDefaultThemeConfig.spec.ts +182 -20
- package/src/theme/createDefaultThemeConfig.ts +34 -28
- package/src/theme/createThemes.ts +169 -218
- package/src/theme/defaults/accent.ts +3 -35
- package/src/theme/defaults/base.ts +14 -53
- package/src/theme/defaults/builderOptions.ts +68 -85
- package/src/theme/defaults/categoryFonts.ts +10 -0
- package/src/theme/defaults/fonts.spec.ts +84 -4
- package/src/theme/defaults/fonts.ts +166 -124
- package/src/theme/defaults/house.ts +48 -0
- package/src/theme/defaults/index.ts +1 -0
- package/src/theme/defaults/neutralRamp.spec.ts +52 -47
- package/src/theme/devtools/ColorLineVisualizer.tsx +6 -6
- package/src/theme/devtools/ThemeDevtoolsPanel.setMarkers.spec.tsx +13 -6
- package/src/theme/devtools/ThemeDevtoolsPanel.tsx +14 -77
- package/src/theme/devtools/animationOptions.spec.ts +23 -37
- package/src/theme/devtools/animationOptions.ts +4 -6
- package/src/theme/devtools/buildSnapshot.ts +0 -3
- package/src/theme/devtools/knobIcons.tsx +4 -24
- package/src/theme/focusState.spec.ts +9 -30
- package/src/theme/index.ts +17 -0
- package/src/theme/intentFill.spec.ts +42 -0
- package/src/theme/knobs.ts +14 -42
- package/src/theme/layoutTokens.ts +15 -1
- package/src/theme/layoutTokensHooks.spec.tsx +8 -4
- package/src/theme/mergedTokens.ts +20 -0
- package/src/theme/motion.spec.ts +84 -0
- package/src/theme/motion.ts +53 -0
- package/src/theme/motionStops.ts +17 -0
- package/src/theme/motionTiming.ts +59 -0
- package/src/theme/mpo13Proof.spec.ts +43 -46
- package/src/theme/mpo19Proof.spec.ts +13 -14
- package/src/theme/namedInkFloor.spec.ts +60 -0
- package/src/theme/overlaySurfaces.tsx +330 -0
- package/src/theme/preset.types.ts +16 -0
- package/src/theme/presetPreview.ts +32 -0
- package/src/theme/presetRoot.spec.tsx +89 -0
- package/src/theme/presetStore.persistence.spec.ts +141 -0
- package/src/theme/presetStore.spec.ts +205 -0
- package/src/theme/presetStore.ts +286 -0
- package/src/theme/presetUserSync.spec.tsx +168 -0
- package/src/theme/presetUserSync.ts +47 -0
- package/src/theme/presets.spec.ts +22 -15
- package/src/theme/presets.ts +22 -10
- package/src/theme/radiusClass.spec.ts +60 -41
- package/src/theme/radiusClass.ts +17 -4
- package/src/theme/radiusClassTable.generated.ts +3 -3
- package/src/theme/readableColor.spec.ts +59 -152
- package/src/theme/readableColor.ts +34 -174
- package/src/theme/recipeInputs.ts +153 -295
- package/src/theme/recipes.ts +58 -18
- package/src/theme/resolveKnobs.spec.ts +528 -588
- package/src/theme/resolveKnobs.ts +250 -325
- package/src/theme/scale/ScaleStyles.native.tsx +19 -0
- package/src/theme/scale/ScaleStyles.tsx +48 -0
- package/src/theme/scale/activeScale.ts +30 -0
- package/src/theme/scale/deriveRecipeInputs.ts +110 -0
- package/src/theme/scale/generateScale.spec.ts +260 -0
- package/src/theme/scale/generateScale.ts +147 -0
- package/src/theme/scale/index.ts +54 -0
- package/src/theme/scale/installScaleConfig.native.spec.ts +77 -0
- package/src/theme/scale/installScaleConfig.native.ts +57 -0
- package/src/theme/scale/installScaleConfig.ts +7 -0
- package/src/theme/scale/scaleAttribute.ts +21 -0
- package/src/theme/scale/scaleCss.probe.spec.tsx +64 -0
- package/src/theme/scale/scaleCss.spec.ts +132 -0
- package/src/theme/scale/scaleCss.ts +95 -0
- package/src/theme/scale/scaleFonts.ts +106 -0
- package/src/theme/scale/scaleInputs.ts +322 -0
- package/src/theme/scale/themeScales.ts +181 -0
- package/src/theme/scale/useActiveScale.spec.tsx +129 -0
- package/src/theme/scale/useActiveScale.ts +95 -0
- package/src/theme/schemeStore.spec.ts +81 -0
- package/src/theme/schemeStore.ts +67 -0
- package/src/theme/shared.spec.ts +7 -6
- package/src/theme/shared.tsx +37 -3
- package/src/theme/sizeLadder.spec.ts +37 -36
- package/src/theme/sizeRecipes.spec.ts +179 -85
- package/src/theme/sizeRecipes.ts +48 -25
- package/src/theme/subsetThemes.spec.ts +9 -3
- package/src/theme/switchThumb.spec.ts +69 -0
- package/src/theme/syntaxFloor.spec.ts +11 -8
- package/src/theme/theme.hydration.native.spec.tsx +51 -0
- package/src/theme/theme.native.tsx +59 -21
- package/src/theme/theme.palette.spec.tsx +76 -0
- package/src/theme/theme.preset.native.spec.tsx +73 -0
- package/src/theme/theme.provider.spec.ts +143 -1
- package/src/theme/theme.tsx +61 -25
- package/src/theme/tileSizes.ts +6 -7
- package/src/theme/transitionProps.native.ts +25 -2
- package/src/theme/transitionProps.spec.ts +34 -0
- package/src/theme/transitionProps.ts +26 -2
- package/src/theme/usePresetSwitch.native.spec.tsx +68 -0
- package/src/theme/usePresetSwitch.native.ts +32 -0
- package/src/theme/usePresetSwitch.spec.tsx +103 -0
- package/src/theme/usePresetSwitch.ts +54 -0
- package/src/theme/useResolvedKnobs.hydration.spec.tsx +2 -2
- package/src/theme/useResolvedKnobs.ts +23 -90
- package/src/theme/useResolvedKnobsBehavior.spec.tsx +25 -30
- package/src/theme/useSchemePreference.native.ts +33 -0
- package/src/theme/useSchemePreference.spec.tsx +51 -0
- package/src/theme/useSchemePreference.ts +32 -0
- package/src/theme/useSchemePreference.web.spec.tsx +32 -0
- package/src/theme/useTheme.native.spec.tsx +68 -0
- package/src/theme/useTheme.native.ts +49 -24
- package/src/theme/useTheme.ts +7 -4
- package/types/audit/constraintAudit.d.ts +6 -5
- package/types/audit/constraintAudit.d.ts.map +1 -1
- package/types/audit/designTokens.d.ts +13 -0
- package/types/audit/designTokens.d.ts.map +1 -0
- package/types/audit/themeMatrix.d.ts +10 -0
- package/types/audit/themeMatrix.d.ts.map +1 -1
- package/types/figma/figmaTokens.d.ts +11 -28
- package/types/figma/figmaTokens.d.ts.map +1 -1
- package/types/fonts/createFontLoader.d.ts.map +1 -1
- package/types/menuRow.d.ts +4 -1
- package/types/menuRow.d.ts.map +1 -1
- package/types/theme/FontKnobStyles.d.ts.map +1 -1
- package/types/theme/Preset.d.ts.map +1 -1
- package/types/theme/PresetContext.d.ts +4 -0
- package/types/theme/PresetContext.d.ts.map +1 -1
- package/types/theme/Surface.d.ts +57 -26
- package/types/theme/Surface.d.ts.map +1 -1
- package/types/theme/activateThemeConfig.d.ts +5 -3
- package/types/theme/activateThemeConfig.d.ts.map +1 -1
- package/types/theme/animations/css.d.ts +27 -34
- package/types/theme/animations/css.d.ts.map +1 -1
- package/types/theme/animations/reactNative.d.ts +196 -45
- package/types/theme/animations/reactNative.d.ts.map +1 -1
- package/types/theme/chartPalette.d.ts +11 -3
- package/types/theme/chartPalette.d.ts.map +1 -1
- package/types/theme/colorRules.d.ts +1 -1
- package/types/theme/cookies.d.ts +12 -1
- package/types/theme/cookies.d.ts.map +1 -1
- package/types/theme/createDefaultThemeConfig.d.ts +13 -13
- package/types/theme/createDefaultThemeConfig.d.ts.map +1 -1
- package/types/theme/createThemes.d.ts +58 -2
- package/types/theme/createThemes.d.ts.map +1 -1
- package/types/theme/defaults/accent.d.ts.map +1 -1
- package/types/theme/defaults/base.d.ts.map +1 -1
- package/types/theme/defaults/builderOptions.d.ts.map +1 -1
- package/types/theme/defaults/categoryFonts.d.ts +10 -0
- package/types/theme/defaults/categoryFonts.d.ts.map +1 -1
- package/types/theme/defaults/fonts.d.ts +330 -30
- package/types/theme/defaults/fonts.d.ts.map +1 -1
- package/types/theme/defaults/house.d.ts +8 -0
- package/types/theme/defaults/house.d.ts.map +1 -0
- package/types/theme/defaults/index.d.ts +1 -0
- package/types/theme/defaults/index.d.ts.map +1 -1
- package/types/theme/devtools/ThemeDevtoolsPanel.d.ts +3 -3
- package/types/theme/devtools/ThemeDevtoolsPanel.d.ts.map +1 -1
- package/types/theme/devtools/animationOptions.d.ts.map +1 -1
- package/types/theme/devtools/buildSnapshot.d.ts.map +1 -1
- package/types/theme/devtools/knobIcons.d.ts +0 -3
- package/types/theme/devtools/knobIcons.d.ts.map +1 -1
- package/types/theme/index.d.ts +11 -0
- package/types/theme/index.d.ts.map +1 -1
- package/types/theme/knobs.d.ts +8 -36
- package/types/theme/knobs.d.ts.map +1 -1
- package/types/theme/layoutTokens.d.ts +13 -1
- package/types/theme/layoutTokens.d.ts.map +1 -1
- package/types/theme/mergedTokens.d.ts +11 -0
- package/types/theme/mergedTokens.d.ts.map +1 -0
- package/types/theme/motion.d.ts +17 -0
- package/types/theme/motion.d.ts.map +1 -0
- package/types/theme/motionStops.d.ts +3 -0
- package/types/theme/motionStops.d.ts.map +1 -0
- package/types/theme/motionTiming.d.ts +36 -0
- package/types/theme/motionTiming.d.ts.map +1 -0
- package/types/theme/overlaySurfaces.d.ts +70 -0
- package/types/theme/overlaySurfaces.d.ts.map +1 -0
- package/types/theme/preset.types.d.ts +16 -0
- package/types/theme/preset.types.d.ts.map +1 -1
- package/types/theme/presetPreview.d.ts +14 -0
- package/types/theme/presetPreview.d.ts.map +1 -0
- package/types/theme/presetStore.d.ts +40 -0
- package/types/theme/presetStore.d.ts.map +1 -0
- package/types/theme/presetUserSync.d.ts +7 -0
- package/types/theme/presetUserSync.d.ts.map +1 -0
- package/types/theme/presets.d.ts +12 -4
- package/types/theme/presets.d.ts.map +1 -1
- package/types/theme/radiusClass.d.ts +5 -2
- package/types/theme/radiusClass.d.ts.map +1 -1
- package/types/theme/radiusClassTable.generated.d.ts +3 -3
- package/types/theme/readableColor.d.ts +11 -49
- package/types/theme/readableColor.d.ts.map +1 -1
- package/types/theme/recipeInputs.d.ts +39 -70
- package/types/theme/recipeInputs.d.ts.map +1 -1
- package/types/theme/recipes.d.ts +79 -18
- package/types/theme/recipes.d.ts.map +1 -1
- package/types/theme/resolveKnobs.d.ts +64 -32
- package/types/theme/resolveKnobs.d.ts.map +1 -1
- package/types/theme/scale/ScaleStyles.d.ts +18 -0
- package/types/theme/scale/ScaleStyles.d.ts.map +1 -0
- package/types/theme/scale/ScaleStyles.native.d.ts +10 -0
- package/types/theme/scale/ScaleStyles.native.d.ts.map +1 -0
- package/types/theme/scale/activeScale.d.ts +13 -0
- package/types/theme/scale/activeScale.d.ts.map +1 -0
- package/types/theme/scale/deriveRecipeInputs.d.ts +10 -0
- package/types/theme/scale/deriveRecipeInputs.d.ts.map +1 -0
- package/types/theme/scale/generateScale.d.ts +38 -0
- package/types/theme/scale/generateScale.d.ts.map +1 -0
- package/types/theme/scale/index.d.ts +17 -0
- package/types/theme/scale/index.d.ts.map +1 -0
- package/types/theme/scale/installScaleConfig.d.ts +4 -0
- package/types/theme/scale/installScaleConfig.d.ts.map +1 -0
- package/types/theme/scale/installScaleConfig.native.d.ts +13 -0
- package/types/theme/scale/installScaleConfig.native.d.ts.map +1 -0
- package/types/theme/scale/scaleAttribute.d.ts +14 -0
- package/types/theme/scale/scaleAttribute.d.ts.map +1 -0
- package/types/theme/scale/scaleCss.d.ts +25 -0
- package/types/theme/scale/scaleCss.d.ts.map +1 -0
- package/types/theme/scale/scaleFonts.d.ts +16 -0
- package/types/theme/scale/scaleFonts.d.ts.map +1 -0
- package/types/theme/scale/scaleInputs.d.ts +66 -0
- package/types/theme/scale/scaleInputs.d.ts.map +1 -0
- package/types/theme/scale/themeScales.d.ts +52 -0
- package/types/theme/scale/themeScales.d.ts.map +1 -0
- package/types/theme/scale/useActiveScale.d.ts +31 -0
- package/types/theme/scale/useActiveScale.d.ts.map +1 -0
- package/types/theme/schemeStore.d.ts +6 -0
- package/types/theme/schemeStore.d.ts.map +1 -0
- package/types/theme/shared.d.ts +18 -0
- package/types/theme/shared.d.ts.map +1 -1
- package/types/theme/sizeRecipes.d.ts +20 -15
- package/types/theme/sizeRecipes.d.ts.map +1 -1
- package/types/theme/theme.d.ts +2 -1
- package/types/theme/theme.d.ts.map +1 -1
- package/types/theme/theme.native.d.ts +10 -1
- package/types/theme/theme.native.d.ts.map +1 -1
- package/types/theme/tileSizes.d.ts +6 -7
- package/types/theme/tileSizes.d.ts.map +1 -1
- package/types/theme/transitionProps.d.ts +3 -1
- package/types/theme/transitionProps.d.ts.map +1 -1
- package/types/theme/transitionProps.native.d.ts +3 -1
- package/types/theme/transitionProps.native.d.ts.map +1 -1
- package/types/theme/usePresetSwitch.d.ts +10 -0
- package/types/theme/usePresetSwitch.d.ts.map +1 -0
- package/types/theme/usePresetSwitch.native.d.ts +10 -0
- package/types/theme/usePresetSwitch.native.d.ts.map +1 -0
- package/types/theme/useResolvedKnobs.d.ts +13 -13
- package/types/theme/useResolvedKnobs.d.ts.map +1 -1
- package/types/theme/useSchemePreference.d.ts +8 -0
- package/types/theme/useSchemePreference.d.ts.map +1 -0
- package/types/theme/useSchemePreference.native.d.ts +8 -0
- package/types/theme/useSchemePreference.native.d.ts.map +1 -0
- package/types/theme/useTheme.d.ts +4 -2
- package/types/theme/useTheme.d.ts.map +1 -1
- package/types/theme/useTheme.native.d.ts +10 -1
- package/types/theme/useTheme.native.d.ts.map +1 -1
package/src/theme/recipes.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { MotionRole, MotionRoleName } from "./motion";
|
|
1
2
|
import type { ColorTokens, FontSizeTokens, TransitionProp } from "tamagui";
|
|
2
3
|
import type { Knobs } from "./knobs";
|
|
3
4
|
import type { HitSlopInsets } from "./layoutTokens";
|
|
@@ -8,7 +9,6 @@ export interface ControlStateProps {
|
|
|
8
9
|
borderRadius?: string;
|
|
9
10
|
borderWidth?: number;
|
|
10
11
|
backgroundColor?: string;
|
|
11
|
-
padding?: string;
|
|
12
12
|
/** Focus-visible ring (DG-A11Y-01); always ≥2 via `ensureFocusVisibleRing`. */
|
|
13
13
|
outlineWidth?: number;
|
|
14
14
|
outlineStyle?: "solid" | "none";
|
|
@@ -28,7 +28,7 @@ export interface ElevationPaintProps {
|
|
|
28
28
|
shadowOffset?: { width: number; height: number };
|
|
29
29
|
shadowOpacity?: number;
|
|
30
30
|
shadowRadius?: number;
|
|
31
|
-
/** Web:
|
|
31
|
+
/** Web: size-formula shadow with var(--shadowColor), matching the shadow props. */
|
|
32
32
|
style?: { boxShadow: string };
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -45,7 +45,7 @@ export interface ElevationStateProps extends ElevationPaintProps {
|
|
|
45
45
|
* `inputBackground`; overlays read `elevatedSurface.backgroundColor`.
|
|
46
46
|
*/
|
|
47
47
|
export interface ElevationChromeProps extends ElevationPaintProps {
|
|
48
|
-
/** Android dp
|
|
48
|
+
/** Android dp is twice the size-formula offsetY. */
|
|
49
49
|
elevation?: number;
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -168,10 +168,11 @@ export interface KnobProps {
|
|
|
168
168
|
controlBorderOutlined: { borderColor: string; borderWidth: number };
|
|
169
169
|
/**
|
|
170
170
|
* Axiom 1 child-clip cap for padded containers (Card/Panel/DialogContent):
|
|
171
|
-
*
|
|
171
|
+
* two radius keys above the control, or the padding px once it would exceed
|
|
172
172
|
* the container's own inset. Spread after the radius-bearing fragment.
|
|
173
173
|
*/
|
|
174
174
|
containerRadius: { borderRadius: string | number } & CornerSmoothingCarrier;
|
|
175
|
+
fieldRadius: { borderRadius: string | number } & CornerSmoothingCarrier;
|
|
175
176
|
/** Size token on web ("$1"); numeric tokens.size value on native (RN-safe). */
|
|
176
177
|
elevation: string | number | undefined;
|
|
177
178
|
/**
|
|
@@ -182,9 +183,10 @@ export interface KnobProps {
|
|
|
182
183
|
overlayElevation: string | number | undefined;
|
|
183
184
|
/**
|
|
184
185
|
* Complete shadow fragment for E-CONTROL / wrapper Views. Spread whole.
|
|
185
|
-
* Empty when `elevation=none`. Android `elevation` here is
|
|
186
|
+
* Empty when `elevation=none`. Android `elevation` here is twice the size-formula offsetY.
|
|
186
187
|
*/
|
|
187
188
|
elevationChrome: ElevationChromeProps;
|
|
189
|
+
thumbShadow: ElevationChromeProps;
|
|
188
190
|
/** Resolved scheme the fragments were built for (LC-85). */
|
|
189
191
|
scheme: "light" | "dark";
|
|
190
192
|
surface: { backgroundColor: string; borderColor: string; borderWidth: number };
|
|
@@ -214,22 +216,27 @@ export interface KnobProps {
|
|
|
214
216
|
shadowRadius: number;
|
|
215
217
|
} & CornerSmoothingCarrier;
|
|
216
218
|
inputSurface: { borderWidth: number };
|
|
219
|
+
/** Container inset role (SP-GAP): `$space.$4` of the active scale. */
|
|
217
220
|
panelPadding: { padding: string };
|
|
221
|
+
/** Tight role (SP-GAP): label to control, chip to chip, icon to text. `$space.$2`. */
|
|
222
|
+
gapSm: { gap: string };
|
|
223
|
+
/** Within-group role (SP-GAP): field to field, row to row. `$space.$3`. */
|
|
218
224
|
gap: { gap: string };
|
|
225
|
+
/** Between-groups role (SP-GAP): section to section. `$space.$5`. */
|
|
219
226
|
gapLg: { gap: string };
|
|
220
227
|
/**
|
|
221
|
-
*
|
|
222
|
-
*
|
|
223
|
-
* `
|
|
228
|
+
* The size token this subtree renders controls at: Tamagui's own `size`
|
|
229
|
+
* key ("$4", "$3"), from a `size` prop or a `<Surface size>` ceiling,
|
|
230
|
+
* `$true` by default. styled() variants switch on it; control internals
|
|
231
|
+
* read `control` / `controlType` / `controlIcon` (LC-65).
|
|
224
232
|
*/
|
|
225
233
|
sizeToken: string;
|
|
226
234
|
/**
|
|
227
|
-
* Control-chrome type (labels, calendar digits, weekday headers)
|
|
228
|
-
*
|
|
229
|
-
*
|
|
230
|
-
* box), not a type step ($4 font = 14px).
|
|
235
|
+
* Control-chrome type (labels, calendar digits, weekday headers): the body
|
|
236
|
+
* key one below `sizeToken`. NEVER pass `sizeToken` as `fontSize`: that
|
|
237
|
+
* token is a control HEIGHT ($4 = 40px box), not a type step.
|
|
231
238
|
*/
|
|
232
|
-
label: { fontSize: FontSizeTokens; fontFamily: string; fontWeight
|
|
239
|
+
label: { fontSize: FontSizeTokens; fontFamily: string; fontWeight?: string };
|
|
233
240
|
/**
|
|
234
241
|
* Nested hit-target (calendar days, overlay chips): visual box BELOW the
|
|
235
242
|
* 44px floor, press restored with `hitSlop` (LC-54 / LC-71). Spread the
|
|
@@ -251,7 +258,35 @@ export interface KnobProps {
|
|
|
251
258
|
controlType: { fontSize: number };
|
|
252
259
|
/** Coordinated control icon box. Spread whole. */
|
|
253
260
|
controlIcon: { width: number; height: number };
|
|
254
|
-
|
|
261
|
+
/**
|
|
262
|
+
* Menu / listbox / command row box from the `menuRow` family: one size key
|
|
263
|
+
* below the control token (36 at default), padX `$3`, 44 on touch.
|
|
264
|
+
* Spread whole onto the row; Select reads `minHeight` as its row pitch.
|
|
265
|
+
*/
|
|
266
|
+
menuRow: { minHeight: number; paddingHorizontal: number; gap: number };
|
|
267
|
+
/** Menu row type: the control token's own label size. Spread whole. */
|
|
268
|
+
menuRowType: { fontSize: number };
|
|
269
|
+
/** Tab box from the `tab` family: height and padX one key below the control token, 44 on touch. */
|
|
270
|
+
tab: { height: number; paddingHorizontal: number; gap: number };
|
|
271
|
+
/** Tab type: the control token's own label size. Spread whole. */
|
|
272
|
+
tabType: { fontSize: number };
|
|
273
|
+
/** Press-target extension that lifts the painted tab to the 44 press target (zero once it paints 44). */
|
|
274
|
+
tabHitSlop: HitSlopInsets;
|
|
275
|
+
/**
|
|
276
|
+
* Top-bar fragment (Navbar, DeskShell, BackofficeShell, Awesomebar): spread
|
|
277
|
+
* `frame` onto the bar row and render bar controls at `sizeToken` (wrap
|
|
278
|
+
* them in `<Surface size={bar.sizeToken}>`). `frame.minHeight` is the
|
|
279
|
+
* default control height plus the vertical padding, 52 at default.
|
|
280
|
+
*/
|
|
281
|
+
bar: {
|
|
282
|
+
frame: {
|
|
283
|
+
paddingVertical: string;
|
|
284
|
+
paddingHorizontal: string;
|
|
285
|
+
minHeight: number;
|
|
286
|
+
};
|
|
287
|
+
sizeToken: "$3";
|
|
288
|
+
};
|
|
289
|
+
heading: { fontFamily: string; fontWeight?: string };
|
|
255
290
|
/**
|
|
256
291
|
* Page-title type step (D-11 hero-H1 dial) — the complete size fragment for
|
|
257
292
|
* the single page-title heading, spread whole onto the title node. Product
|
|
@@ -261,17 +296,22 @@ export interface KnobProps {
|
|
|
261
296
|
pageTitle: { size: FontSizeTokens };
|
|
262
297
|
/** color is set only for solid semantic-intent Buttons (error/warning/success). */
|
|
263
298
|
body: { fontFamily: string; fontWeight: string; color?: ColorTokens };
|
|
299
|
+
typography: {
|
|
300
|
+
mutedMono: { fontFamily: "$mono"; color: string };
|
|
301
|
+
tabular: {
|
|
302
|
+
fontVariant?: ["tabular-nums"];
|
|
303
|
+
style?: { fontVariantNumeric: "tabular-nums" };
|
|
304
|
+
};
|
|
305
|
+
};
|
|
264
306
|
textWeight: { fontWeight: string };
|
|
307
|
+
motion: Record<MotionRoleName, MotionRole>;
|
|
308
|
+
/** @deprecated read a role from knobProps.motion */
|
|
265
309
|
transition: TransitionProp | undefined;
|
|
266
310
|
outlined: boolean;
|
|
267
311
|
pointy: boolean;
|
|
268
312
|
textAccent: string;
|
|
269
313
|
textAccentColor: string;
|
|
270
314
|
inputBackground: string;
|
|
271
|
-
space: string;
|
|
272
|
-
size: string;
|
|
273
|
-
/** Effective density mode after compact override resolution. */
|
|
274
|
-
density: string;
|
|
275
315
|
/** House decision knobs — pass-through for consumers (forms/tables). */
|
|
276
316
|
fieldLabelPlacement: string;
|
|
277
317
|
requiredMarking: string;
|