@multiplatform.one/theme 7.90.6 → 8.0.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/cjs/index.gnome.cjs +432 -0
- package/dist/cjs/index.gnome.native.js +435 -0
- package/dist/cjs/index.gnome.native.js.map +1 -0
- package/dist/cjs/{theme/useColorScale.native.js → nativeTwins.cjs} +11 -10
- package/dist/cjs/{theme/useColorScale.cjs → nativeTwins.native.js} +14 -24
- package/dist/cjs/nativeTwins.native.js.map +1 -0
- package/dist/cjs/theme/Surface.cjs +2 -10
- package/dist/cjs/theme/Surface.native.js +3 -12
- package/dist/cjs/theme/Surface.native.js.map +1 -1
- package/dist/cjs/theme/devtools/ColorLineVisualizer.cjs +91 -89
- package/dist/cjs/theme/devtools/ColorLineVisualizer.native.js +79 -88
- package/dist/cjs/theme/devtools/ColorLineVisualizer.native.js.map +1 -1
- package/dist/cjs/theme/devtools/index.cjs +25 -0
- package/dist/cjs/theme/devtools/index.native.js +28 -0
- package/dist/cjs/theme/devtools/index.native.js.map +1 -0
- package/dist/cjs/theme/devtools/knobIcons.cjs +147 -149
- package/dist/cjs/theme/devtools/knobIcons.native.js +135 -149
- package/dist/cjs/theme/devtools/knobIcons.native.js.map +1 -1
- package/dist/cjs/theme/nativePresetSwitch.cjs +45 -0
- package/dist/cjs/theme/nativePresetSwitch.native.js +50 -0
- package/dist/cjs/theme/nativePresetSwitch.native.js.map +1 -0
- package/dist/cjs/theme/nativeSchemePreference.cjs +72 -0
- package/dist/cjs/theme/nativeSchemePreference.native.js +80 -0
- package/dist/cjs/theme/nativeSchemePreference.native.js.map +1 -0
- package/dist/cjs/theme/nativeTheme.cjs +107 -0
- package/dist/cjs/theme/nativeTheme.native.js +115 -0
- package/dist/cjs/theme/nativeTheme.native.js.map +1 -0
- package/dist/cjs/theme/nativeTransitionProps.cjs +69 -0
- package/dist/cjs/theme/nativeTransitionProps.native.js +81 -0
- package/dist/cjs/theme/nativeTransitionProps.native.js.map +1 -0
- package/dist/cjs/theme/recipeInputs.native.js.map +1 -1
- package/dist/cjs/theme/resolveKnobs.cjs +0 -5
- package/dist/cjs/theme/resolveKnobs.native.js +0 -5
- package/dist/cjs/theme/resolveKnobs.native.js.map +1 -1
- package/dist/cjs/theme/sizeRecipes.cjs +3 -13
- package/dist/cjs/theme/sizeRecipes.native.js +3 -13
- package/dist/cjs/theme/sizeRecipes.native.js.map +1 -1
- package/dist/cjs/theme/theme.native.js +2 -94
- package/dist/cjs/theme/theme.native.js.map +1 -1
- package/dist/cjs/theme/transitionProps.native.js +2 -60
- package/dist/cjs/theme/transitionProps.native.js.map +1 -1
- package/dist/cjs/theme/usePresetSwitch.native.js +2 -29
- package/dist/cjs/theme/usePresetSwitch.native.js.map +1 -1
- package/dist/cjs/theme/useSchemePreference.native.js +2 -59
- package/dist/cjs/theme/useSchemePreference.native.js.map +1 -1
- package/dist/esm/index.gnome.mjs +48 -0
- package/dist/esm/index.gnome.mjs.map +1 -0
- package/dist/esm/index.gnome.native.js +48 -0
- package/dist/esm/index.gnome.native.js.map +1 -0
- package/dist/esm/nativeTwins.mjs +6 -0
- package/dist/esm/nativeTwins.mjs.map +1 -0
- package/dist/esm/nativeTwins.native.js +6 -0
- package/dist/esm/nativeTwins.native.js.map +1 -0
- package/dist/esm/theme/Surface.mjs +2 -9
- package/dist/esm/theme/Surface.mjs.map +1 -1
- package/dist/esm/theme/Surface.native.js +3 -11
- package/dist/esm/theme/Surface.native.js.map +1 -1
- package/dist/esm/theme/devtools/ColorLineVisualizer.mjs +80 -89
- package/dist/esm/theme/devtools/ColorLineVisualizer.mjs.map +1 -1
- package/dist/esm/theme/devtools/ColorLineVisualizer.native.js +79 -88
- package/dist/esm/theme/devtools/ColorLineVisualizer.native.js.map +1 -1
- package/dist/esm/theme/devtools/index.mjs +7 -0
- package/dist/esm/theme/devtools/index.mjs.map +1 -0
- package/dist/esm/theme/devtools/index.native.js +7 -0
- package/dist/esm/theme/devtools/index.native.js.map +1 -0
- package/dist/esm/theme/devtools/knobIcons.mjs +136 -149
- package/dist/esm/theme/devtools/knobIcons.mjs.map +1 -1
- package/dist/esm/theme/devtools/knobIcons.native.js +135 -149
- package/dist/esm/theme/devtools/knobIcons.native.js.map +1 -1
- package/dist/esm/theme/nativePresetSwitch.mjs +20 -0
- package/dist/esm/theme/nativePresetSwitch.mjs.map +1 -0
- package/dist/esm/theme/nativePresetSwitch.native.js +22 -0
- package/dist/esm/theme/nativePresetSwitch.native.js.map +1 -0
- package/dist/esm/theme/nativeSchemePreference.mjs +47 -0
- package/dist/esm/theme/nativeSchemePreference.mjs.map +1 -0
- package/dist/esm/theme/nativeSchemePreference.native.js +52 -0
- package/dist/esm/theme/nativeSchemePreference.native.js.map +1 -0
- package/dist/esm/theme/nativeTheme.mjs +82 -0
- package/dist/esm/theme/nativeTheme.mjs.map +1 -0
- package/dist/esm/theme/nativeTheme.native.js +87 -0
- package/dist/esm/theme/nativeTheme.native.js.map +1 -0
- package/dist/esm/theme/nativeTransitionProps.mjs +44 -0
- package/dist/esm/theme/nativeTransitionProps.mjs.map +1 -0
- package/dist/esm/theme/nativeTransitionProps.native.js +53 -0
- package/dist/esm/theme/nativeTransitionProps.native.js.map +1 -0
- package/dist/esm/theme/recipeInputs.mjs.map +1 -1
- package/dist/esm/theme/recipeInputs.native.js.map +1 -1
- package/dist/esm/theme/resolveKnobs.mjs +0 -5
- package/dist/esm/theme/resolveKnobs.mjs.map +1 -1
- package/dist/esm/theme/resolveKnobs.native.js +0 -5
- package/dist/esm/theme/resolveKnobs.native.js.map +1 -1
- package/dist/esm/theme/sizeRecipes.mjs +4 -9
- package/dist/esm/theme/sizeRecipes.mjs.map +1 -1
- package/dist/esm/theme/sizeRecipes.native.js +4 -9
- package/dist/esm/theme/sizeRecipes.native.js.map +1 -1
- package/dist/esm/theme/theme.native.js +1 -86
- package/dist/esm/theme/theme.native.js.map +1 -1
- package/dist/esm/theme/transitionProps.native.js +1 -52
- package/dist/esm/theme/transitionProps.native.js.map +1 -1
- package/dist/esm/theme/usePresetSwitch.native.js +1 -21
- package/dist/esm/theme/usePresetSwitch.native.js.map +1 -1
- package/dist/esm/theme/useSchemePreference.native.js +1 -51
- package/dist/esm/theme/useSchemePreference.native.js.map +1 -1
- package/package.json +54 -6
- package/src/index.gnome.ts +544 -0
- package/src/nativeTwins.ts +11 -0
- package/src/theme/Surface.spec.tsx +0 -34
- package/src/theme/Surface.tsx +1 -20
- package/src/theme/devtools/ColorLineVisualizer.tsx +1 -0
- package/src/theme/devtools/index.ts +14 -0
- package/src/theme/devtools/knobIcons.tsx +1 -0
- package/src/theme/mpo19Proof.spec.ts +0 -5
- package/src/theme/nativePresetSwitch.ts +32 -0
- package/src/theme/nativeSchemePreference.ts +58 -0
- package/src/theme/nativeTheme.tsx +113 -0
- package/src/theme/nativeTransitionProps.ts +74 -0
- package/src/theme/recipeInputs.ts +0 -5
- package/src/theme/recipes.ts +1 -7
- package/src/theme/resolveKnobs.spec.ts +4 -7
- package/src/theme/resolveKnobs.ts +0 -5
- package/src/theme/shared.tsx +4 -4
- package/src/theme/sizeLadder.spec.ts +4 -5
- package/src/theme/sizeRecipes.spec.ts +11 -16
- package/src/theme/sizeRecipes.ts +12 -19
- package/src/theme/theme.native.tsx +1 -113
- package/src/theme/theme.provider.spec.ts +1 -1
- package/src/theme/transitionProps.native.ts +1 -74
- package/src/theme/usePresetSwitch.native.ts +1 -32
- package/src/theme/useResolvedKnobs.hydration.spec.tsx +1 -1
- package/src/theme/useResolvedKnobsBehavior.spec.tsx +3 -3
- package/src/theme/useSchemePreference.native.ts +1 -58
- package/types/index.gnome.d.ts +84 -0
- package/types/index.gnome.d.ts.map +1 -0
- package/types/nativeTwins.d.ts +11 -0
- package/types/nativeTwins.d.ts.map +1 -0
- package/types/theme/Surface.d.ts +2 -13
- package/types/theme/Surface.d.ts.map +1 -1
- package/types/theme/devtools/ColorLineVisualizer.d.ts +3 -1
- package/types/theme/devtools/ColorLineVisualizer.d.ts.map +1 -1
- package/types/theme/devtools/index.d.ts +14 -0
- package/types/theme/devtools/index.d.ts.map +1 -0
- package/types/theme/devtools/knobIcons.d.ts +1 -0
- package/types/theme/devtools/knobIcons.d.ts.map +1 -1
- package/types/theme/nativePresetSwitch.d.ts +10 -0
- package/types/theme/nativePresetSwitch.d.ts.map +1 -0
- package/types/theme/nativeSchemePreference.d.ts +8 -0
- package/types/theme/nativeSchemePreference.d.ts.map +1 -0
- package/types/theme/nativeTheme.d.ts +19 -0
- package/types/theme/nativeTheme.d.ts.map +1 -0
- package/types/theme/nativeTransitionProps.d.ts +15 -0
- package/types/theme/nativeTransitionProps.d.ts.map +1 -0
- package/types/theme/recipeInputs.d.ts +0 -4
- package/types/theme/recipeInputs.d.ts.map +1 -1
- package/types/theme/recipes.d.ts +2 -9
- package/types/theme/recipes.d.ts.map +1 -1
- package/types/theme/resolveKnobs.d.ts.map +1 -1
- package/types/theme/shared.d.ts +4 -4
- package/types/theme/shared.d.ts.map +1 -1
- package/types/theme/sizeRecipes.d.ts +8 -13
- package/types/theme/sizeRecipes.d.ts.map +1 -1
- package/types/theme/theme.native.d.ts +1 -18
- package/types/theme/theme.native.d.ts.map +1 -1
- package/types/theme/transitionProps.native.d.ts +1 -14
- package/types/theme/transitionProps.native.d.ts.map +1 -1
- package/types/theme/usePresetSwitch.native.d.ts +1 -9
- package/types/theme/usePresetSwitch.native.d.ts.map +1 -1
- package/types/theme/useSchemePreference.native.d.ts +1 -7
- package/types/theme/useSchemePreference.native.d.ts.map +1 -1
- package/dist/cjs/theme/useColorScale.native.js.map +0 -1
- package/dist/esm/theme/useColorScale.mjs +0 -22
- package/dist/esm/theme/useColorScale.mjs.map +0 -1
- package/dist/esm/theme/useColorScale.native.js +0 -5
- package/dist/esm/theme/useColorScale.native.js.map +0 -1
- package/src/theme/useColorScale.native.ts +0 -7
- package/src/theme/useColorScale.ts +0 -29
- package/types/theme/useColorScale.d.ts +0 -7
- package/types/theme/useColorScale.d.ts.map +0 -1
- package/types/theme/useColorScale.native.d.ts +0 -6
- package/types/theme/useColorScale.native.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/theme",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "Tamagui theme system for multiplatform.one",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"multiplatform",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"types": "types/index.d.ts",
|
|
31
31
|
"exports": {
|
|
32
32
|
"./package.json": "./package.json",
|
|
33
|
-
"./src/*": "./src/*",
|
|
34
33
|
".": {
|
|
34
|
+
"gnome": "./src/index.gnome.ts",
|
|
35
35
|
"source": "./src/index.ts",
|
|
36
36
|
"types": "./types/index.d.ts",
|
|
37
37
|
"react-native": {
|
|
@@ -109,14 +109,62 @@
|
|
|
109
109
|
"react-native": "./src/expo.ts",
|
|
110
110
|
"browser": "./src/expo.ts",
|
|
111
111
|
"default": "./expo.cjs"
|
|
112
|
+
},
|
|
113
|
+
"./devtools": {
|
|
114
|
+
"source": "./src/theme/devtools/index.ts",
|
|
115
|
+
"types": "./types/theme/devtools/index.d.ts",
|
|
116
|
+
"react-native": {
|
|
117
|
+
"types": "./types/theme/devtools/index.d.ts",
|
|
118
|
+
"import": "./dist/esm/theme/devtools/index.native.js",
|
|
119
|
+
"require": "./dist/cjs/theme/devtools/index.native.js"
|
|
120
|
+
},
|
|
121
|
+
"import": "./dist/esm/theme/devtools/index.mjs",
|
|
122
|
+
"require": "./dist/cjs/theme/devtools/index.cjs",
|
|
123
|
+
"default": "./dist/esm/theme/devtools/index.mjs"
|
|
124
|
+
},
|
|
125
|
+
"./dates": {
|
|
126
|
+
"source": "./src/dates.ts",
|
|
127
|
+
"types": "./types/dates.d.ts",
|
|
128
|
+
"react-native": {
|
|
129
|
+
"types": "./types/dates.d.ts",
|
|
130
|
+
"import": "./dist/esm/dates.native.js",
|
|
131
|
+
"require": "./dist/cjs/dates.native.js"
|
|
132
|
+
},
|
|
133
|
+
"import": "./dist/esm/dates.mjs",
|
|
134
|
+
"require": "./dist/cjs/dates.cjs",
|
|
135
|
+
"default": "./dist/esm/dates.mjs"
|
|
136
|
+
},
|
|
137
|
+
"./fonts": {
|
|
138
|
+
"source": "./src/fonts/index.ts",
|
|
139
|
+
"types": "./types/fonts/index.d.ts",
|
|
140
|
+
"react-native": {
|
|
141
|
+
"types": "./types/fonts/index.d.ts",
|
|
142
|
+
"import": "./dist/esm/fonts/index.native.js",
|
|
143
|
+
"require": "./dist/cjs/fonts/index.native.js"
|
|
144
|
+
},
|
|
145
|
+
"import": "./dist/esm/fonts/index.mjs",
|
|
146
|
+
"require": "./dist/cjs/fonts/index.cjs",
|
|
147
|
+
"default": "./dist/esm/fonts/index.mjs"
|
|
148
|
+
},
|
|
149
|
+
"./native-twins": {
|
|
150
|
+
"source": "./src/nativeTwins.ts",
|
|
151
|
+
"types": "./types/nativeTwins.d.ts",
|
|
152
|
+
"react-native": {
|
|
153
|
+
"types": "./types/nativeTwins.d.ts",
|
|
154
|
+
"import": "./dist/esm/nativeTwins.native.js",
|
|
155
|
+
"require": "./dist/cjs/nativeTwins.native.js"
|
|
156
|
+
},
|
|
157
|
+
"import": "./dist/esm/nativeTwins.mjs",
|
|
158
|
+
"require": "./dist/cjs/nativeTwins.cjs",
|
|
159
|
+
"default": "./dist/esm/nativeTwins.mjs"
|
|
112
160
|
}
|
|
113
161
|
},
|
|
114
162
|
"publishConfig": {
|
|
115
163
|
"access": "public"
|
|
116
164
|
},
|
|
117
165
|
"dependencies": {
|
|
118
|
-
"@multiplatform.one/platform": "^
|
|
119
|
-
"@multiplatform.one/store": "^
|
|
166
|
+
"@multiplatform.one/platform": "^8.0.0",
|
|
167
|
+
"@multiplatform.one/store": "^8.0.0",
|
|
120
168
|
"@tamagui/animations-react-native": "2.7.6",
|
|
121
169
|
"@tamagui/colors": "2.7.6",
|
|
122
170
|
"@tamagui/config": "2.7.6",
|
|
@@ -132,8 +180,8 @@
|
|
|
132
180
|
},
|
|
133
181
|
"devDependencies": {
|
|
134
182
|
"@expo/prebuild-config": "55.0.18",
|
|
135
|
-
"@multiplatform.one/config": "
|
|
136
|
-
"@multiplatform.one/test-utils": "
|
|
183
|
+
"@multiplatform.one/config": "8.0.0",
|
|
184
|
+
"@multiplatform.one/test-utils": "8.0.0",
|
|
137
185
|
"@tamagui/animations-css": "2.7.6",
|
|
138
186
|
"@tamagui/animations-reanimated": "2.7.6",
|
|
139
187
|
"@tamagui/build": "2.7.6",
|
|
@@ -0,0 +1,544 @@
|
|
|
1
|
+
export {
|
|
2
|
+
assertNoPrebuiltThemes,
|
|
3
|
+
createDefaultThemeConfig,
|
|
4
|
+
TAMAGUI_ERA,
|
|
5
|
+
tamaguiEra,
|
|
6
|
+
} from "./theme/createDefaultThemeConfig";
|
|
7
|
+
export type { CreateDefaultThemeConfigOptions } from "./theme/createDefaultThemeConfig";
|
|
8
|
+
export {
|
|
9
|
+
createThemesBuilder,
|
|
10
|
+
houseComponentThemes,
|
|
11
|
+
houseGrandChildrenThemes,
|
|
12
|
+
houseTemplates,
|
|
13
|
+
tintHueNames,
|
|
14
|
+
} from "./theme/createThemes";
|
|
15
|
+
export type {
|
|
16
|
+
BaseThemeBuilderDefinition,
|
|
17
|
+
CreateThemesBuilderOptions,
|
|
18
|
+
GetThemeProps,
|
|
19
|
+
Shadows,
|
|
20
|
+
ThemeBuilderDefinition,
|
|
21
|
+
} from "./theme/createThemes";
|
|
22
|
+
export {
|
|
23
|
+
clearPresets,
|
|
24
|
+
createThemeConfig,
|
|
25
|
+
getPreset,
|
|
26
|
+
getPresetNames,
|
|
27
|
+
registerPreset,
|
|
28
|
+
resolveThemeFromPreset,
|
|
29
|
+
} from "./theme/shared";
|
|
30
|
+
export type { ThemeConfig, ThemeConfigScaleOptions } from "./theme/shared";
|
|
31
|
+
export {
|
|
32
|
+
BodyFont,
|
|
33
|
+
BorderRadius,
|
|
34
|
+
BorderWidth,
|
|
35
|
+
BulkBarPlacement,
|
|
36
|
+
CornerSmoothing,
|
|
37
|
+
defaultKnobs,
|
|
38
|
+
DisabledStyle,
|
|
39
|
+
Elevation,
|
|
40
|
+
emptyStateKnobs,
|
|
41
|
+
FieldLabelPlacement,
|
|
42
|
+
FillStyle,
|
|
43
|
+
FontCategory,
|
|
44
|
+
FontWeight,
|
|
45
|
+
FormAutofocus,
|
|
46
|
+
HeadingFont,
|
|
47
|
+
interactionStates,
|
|
48
|
+
normalizeAnimationKnob,
|
|
49
|
+
PageTitleScale,
|
|
50
|
+
RequiredMarking,
|
|
51
|
+
SelectAllScope,
|
|
52
|
+
TableZebra,
|
|
53
|
+
TextAccent,
|
|
54
|
+
TimestampStyle,
|
|
55
|
+
} from "./theme/knobs";
|
|
56
|
+
export type { Animation, InteractionState, Knobs, StateKnobs } from "./theme/knobs";
|
|
57
|
+
export { defaultIntents } from "./theme/intents";
|
|
58
|
+
export type {
|
|
59
|
+
CardLiftProps,
|
|
60
|
+
ControlStateProps,
|
|
61
|
+
CornerSmoothingCarrier,
|
|
62
|
+
DisabledAssemblyProps,
|
|
63
|
+
DisabledChromeProps,
|
|
64
|
+
DisabledRecipe,
|
|
65
|
+
DisabledSurfaceProps,
|
|
66
|
+
DisabledTextProps,
|
|
67
|
+
ElevationChromeProps,
|
|
68
|
+
ElevationPaintProps,
|
|
69
|
+
ElevationStateProps,
|
|
70
|
+
KnobProps,
|
|
71
|
+
KnobPropsOverride,
|
|
72
|
+
KnobRecipe,
|
|
73
|
+
PageTitleFragment,
|
|
74
|
+
ResolvedKnobs,
|
|
75
|
+
SelectedRecipe,
|
|
76
|
+
StateRecipes,
|
|
77
|
+
TextRoleFragment,
|
|
78
|
+
TextStateProps,
|
|
79
|
+
} from "./theme/recipes";
|
|
80
|
+
export {
|
|
81
|
+
borderRadiusMap,
|
|
82
|
+
capContainerRadius,
|
|
83
|
+
capFieldRadius,
|
|
84
|
+
cardElevationMap,
|
|
85
|
+
cardLift,
|
|
86
|
+
containerCapProps,
|
|
87
|
+
containerRadiusMap,
|
|
88
|
+
edgeColorAt,
|
|
89
|
+
elevationMap,
|
|
90
|
+
getHeadingFontFamily,
|
|
91
|
+
labelFontSizeFor,
|
|
92
|
+
nestedControlPx,
|
|
93
|
+
normalizeSizeToken,
|
|
94
|
+
overlayElevationMap,
|
|
95
|
+
paintedCardFill,
|
|
96
|
+
panelPaddingPx,
|
|
97
|
+
radiusStopFromToken,
|
|
98
|
+
railFillRadius,
|
|
99
|
+
resolveKnobs,
|
|
100
|
+
resolvePageTitleScale,
|
|
101
|
+
resolveTextRoles,
|
|
102
|
+
sizedElevation,
|
|
103
|
+
sizeKeyBelow,
|
|
104
|
+
spacingRoles,
|
|
105
|
+
} from "./theme/resolveKnobs";
|
|
106
|
+
export type {
|
|
107
|
+
CappedContainer,
|
|
108
|
+
ColorScheme,
|
|
109
|
+
ContainerCapDeclaration,
|
|
110
|
+
ResolveKnobsEnvironment,
|
|
111
|
+
} from "./theme/resolveKnobs";
|
|
112
|
+
export {
|
|
113
|
+
applyRadiusStop,
|
|
114
|
+
applyTouchFloor,
|
|
115
|
+
cloneSizeRecipeInputs,
|
|
116
|
+
createRecipeFamilies,
|
|
117
|
+
DEFAULT_SIZE_RECIPE_INPUTS,
|
|
118
|
+
defaultRecipeInputs,
|
|
119
|
+
generateSizeRecipes,
|
|
120
|
+
generateSizeRecipeTables,
|
|
121
|
+
getGeneratedSizeRecipes,
|
|
122
|
+
getSizeRecipeFamily,
|
|
123
|
+
getSizeRecipeInputs,
|
|
124
|
+
getTileSizeLadder,
|
|
125
|
+
mergeRecipeInputs,
|
|
126
|
+
recipeFamilies,
|
|
127
|
+
recipeFromTokenChannels,
|
|
128
|
+
recipeKeyAbove,
|
|
129
|
+
recipeKeyBelow,
|
|
130
|
+
resolveControlRadius,
|
|
131
|
+
resolveSizeRecipeInputs,
|
|
132
|
+
setSizeRecipeInputs,
|
|
133
|
+
SIZE_RECIPE_FAMILY_NAMES,
|
|
134
|
+
SIZE_RECIPE_RADIUS_STOPS,
|
|
135
|
+
SIZE_RECIPE_RADIUS_TOKEN_TO_STOP,
|
|
136
|
+
SIZE_RECIPE_TOKENS,
|
|
137
|
+
SIZE_TOKEN_EXPONENTS,
|
|
138
|
+
sizeRecipeBoxVariants,
|
|
139
|
+
sizeRecipeEscape,
|
|
140
|
+
sizeRecipeForToken,
|
|
141
|
+
sizeRecipeFromHeight,
|
|
142
|
+
sizeRecipeIconVariants,
|
|
143
|
+
sizeRecipes,
|
|
144
|
+
sizeRecipeTypeVariants,
|
|
145
|
+
textFieldInset,
|
|
146
|
+
tileSizeLadder,
|
|
147
|
+
TOUCH_HEIGHT_FLOOR,
|
|
148
|
+
} from "./theme/sizeRecipes";
|
|
149
|
+
export type {
|
|
150
|
+
GeneratedSizeRecipes,
|
|
151
|
+
RecipeFamilies,
|
|
152
|
+
SizeRecipe,
|
|
153
|
+
SizeRecipeBoxVariant,
|
|
154
|
+
SizeRecipeFamily,
|
|
155
|
+
SizeRecipeFamilyName,
|
|
156
|
+
SizeRecipeIconVariant,
|
|
157
|
+
SizeRecipeInputs,
|
|
158
|
+
SizeRecipeRadiusStop,
|
|
159
|
+
SizeRecipeRatios,
|
|
160
|
+
SizeRecipeTables,
|
|
161
|
+
SizeRecipeToken,
|
|
162
|
+
SizeRecipeTokenChannels,
|
|
163
|
+
SizeRecipeTokenTable,
|
|
164
|
+
SizeRecipeTypeVariant,
|
|
165
|
+
} from "./theme/sizeRecipes";
|
|
166
|
+
export {
|
|
167
|
+
cloneTileSizeInputs,
|
|
168
|
+
defaultTileSizeInputs,
|
|
169
|
+
defaultWidthFactors,
|
|
170
|
+
generateTileSizeLadder,
|
|
171
|
+
mediaAspectRatios,
|
|
172
|
+
resolveMediaAspect,
|
|
173
|
+
resolveTileSizeInputs,
|
|
174
|
+
tileColumnsForWidth,
|
|
175
|
+
tileRungFlexProps,
|
|
176
|
+
tileSizeRungs,
|
|
177
|
+
tileSizeStepExponents,
|
|
178
|
+
} from "./theme/tileSizes";
|
|
179
|
+
export type {
|
|
180
|
+
MediaAspect,
|
|
181
|
+
MediaAspectName,
|
|
182
|
+
TileRungFlexProps,
|
|
183
|
+
TileSizeInputs,
|
|
184
|
+
TileSizeLadder,
|
|
185
|
+
TileSizeRung,
|
|
186
|
+
TileSizeStop,
|
|
187
|
+
} from "./theme/tileSizes";
|
|
188
|
+
export { PresetContext, usePresetContext, usePresetTints } from "./theme/PresetContext";
|
|
189
|
+
export type { PresetContextValue } from "./theme/PresetContext";
|
|
190
|
+
export { applyColorTheme, Preset } from "./theme/Preset";
|
|
191
|
+
export type { PresetProps } from "./theme/Preset";
|
|
192
|
+
export {
|
|
193
|
+
clampSurfaceSize,
|
|
194
|
+
compareSizeTokens,
|
|
195
|
+
sizeTokenBelow,
|
|
196
|
+
sizeTokenStep,
|
|
197
|
+
sizeTokenStop,
|
|
198
|
+
Surface,
|
|
199
|
+
SurfaceContext,
|
|
200
|
+
surfaceSizeRank,
|
|
201
|
+
useBarSurface,
|
|
202
|
+
useElevatedSurface,
|
|
203
|
+
useFieldSurface,
|
|
204
|
+
} from "./theme/Surface";
|
|
205
|
+
export type { SurfaceIntent, SurfaceSize } from "./theme/Surface";
|
|
206
|
+
export {
|
|
207
|
+
controlTierDisabled,
|
|
208
|
+
controlTierPaint,
|
|
209
|
+
controlTierWash,
|
|
210
|
+
isDarkThemeName,
|
|
211
|
+
} from "./theme/controlTiers";
|
|
212
|
+
export type { ControlTier, ControlTierPaint } from "./theme/controlTiers";
|
|
213
|
+
export {
|
|
214
|
+
AlertDialogContent,
|
|
215
|
+
AlertDialogOverlay,
|
|
216
|
+
DialogContent,
|
|
217
|
+
DialogOverlay,
|
|
218
|
+
DialogRegionContext,
|
|
219
|
+
DialogSheetFaceProvider,
|
|
220
|
+
DialogShowFocus,
|
|
221
|
+
overlayScrim,
|
|
222
|
+
PopoverContent,
|
|
223
|
+
sheetGrabber,
|
|
224
|
+
sheetGrabberClearance,
|
|
225
|
+
sheetGrabberZone,
|
|
226
|
+
useDialogRegionContext,
|
|
227
|
+
useDialogSheetFace,
|
|
228
|
+
useIsInDialogRegion,
|
|
229
|
+
} from "./theme/overlaySurfaces";
|
|
230
|
+
export type { DialogContentProps, DialogRegionContextValue } from "./theme/overlaySurfaces";
|
|
231
|
+
export {
|
|
232
|
+
boldPreset,
|
|
233
|
+
consolePreset,
|
|
234
|
+
defaultPreset,
|
|
235
|
+
densePreset,
|
|
236
|
+
heroPreset,
|
|
237
|
+
roomyPreset,
|
|
238
|
+
storefrontPreset,
|
|
239
|
+
} from "./theme/presets";
|
|
240
|
+
export {
|
|
241
|
+
IntentContext,
|
|
242
|
+
solidButtonIntents,
|
|
243
|
+
solidPaletteThemes,
|
|
244
|
+
useIntentContext,
|
|
245
|
+
useResolvedKnobs,
|
|
246
|
+
} from "./theme/useResolvedKnobs";
|
|
247
|
+
export type { UseResolvedKnobsOptions } from "./theme/useResolvedKnobs";
|
|
248
|
+
export { useTheme } from "./theme/useTheme";
|
|
249
|
+
export type { ThemeScheme } from "./theme/useTheme";
|
|
250
|
+
export { createDefaultFont } from "./font";
|
|
251
|
+
export {
|
|
252
|
+
__resetDevWarnSeen,
|
|
253
|
+
__resetThemeDevWarnSeen,
|
|
254
|
+
devWarn,
|
|
255
|
+
DIALOG_MAX_ACTIONS,
|
|
256
|
+
themeDevWarn,
|
|
257
|
+
warnBannedErrorWords,
|
|
258
|
+
warnBareDisabled,
|
|
259
|
+
warnCancelDisabled,
|
|
260
|
+
warnDialogTooManyActions,
|
|
261
|
+
warnOutlinedIgnored,
|
|
262
|
+
warnOutlineNone,
|
|
263
|
+
warnPlaceholderAsLabel,
|
|
264
|
+
warnPositiveTabIndex,
|
|
265
|
+
warnSelectTooFewOptions,
|
|
266
|
+
warnSizeRecipeEscape,
|
|
267
|
+
warnTooltipOnDisabled,
|
|
268
|
+
} from "./devWarn";
|
|
269
|
+
export type { DevWarnCode, DevWarnDetail, GuardrailSpecimenParameter } from "./devWarn";
|
|
270
|
+
export {
|
|
271
|
+
defaultMaxPanes,
|
|
272
|
+
DETAIL_READABLE_WIDTH,
|
|
273
|
+
FORM_READABLE_WIDTH,
|
|
274
|
+
FORM_READABLE_WIDTH_MAX,
|
|
275
|
+
FORM_READABLE_WIDTH_MIN,
|
|
276
|
+
getLayoutSizeClass,
|
|
277
|
+
isTouchSurface,
|
|
278
|
+
LAYOUT_SIZE_CLASS_ORDER,
|
|
279
|
+
layoutBreakpoints,
|
|
280
|
+
layoutSizeClassAtLeast,
|
|
281
|
+
MIN_PRESS_TARGET,
|
|
282
|
+
NARROW_BREAKPOINT,
|
|
283
|
+
OVERLAY_ANCHOR_GAP,
|
|
284
|
+
OVERLAY_ATTACH_GAP,
|
|
285
|
+
OVERLAY_BREAKPOINT,
|
|
286
|
+
pressTargetHitSlop,
|
|
287
|
+
pressTargetStyle,
|
|
288
|
+
READING_WIDTH_BODY_FALLBACK,
|
|
289
|
+
READING_WIDTH_CH,
|
|
290
|
+
READING_WIDTH_CH_EM,
|
|
291
|
+
READING_WIDTH_MAX_CH,
|
|
292
|
+
READING_WIDTH_MIN_CH,
|
|
293
|
+
readingWidthStyle,
|
|
294
|
+
useLayoutSizeClass,
|
|
295
|
+
useMultiPane,
|
|
296
|
+
useReadingWidthStyle,
|
|
297
|
+
useSemanticGaps,
|
|
298
|
+
} from "./theme/layoutTokens";
|
|
299
|
+
export type {
|
|
300
|
+
HitSlopInsets,
|
|
301
|
+
LayoutBreakpointName,
|
|
302
|
+
LayoutSizeClass,
|
|
303
|
+
PressTargetStyle,
|
|
304
|
+
ReadingWidthStyle,
|
|
305
|
+
} from "./theme/layoutTokens";
|
|
306
|
+
export { Intent } from "./theme/Intent";
|
|
307
|
+
export type { IntentProps } from "./theme/Intent";
|
|
308
|
+
export {
|
|
309
|
+
ensureFocusVisibleRing,
|
|
310
|
+
FOCUS_RING_CLIPPED_OFFSET,
|
|
311
|
+
FOCUS_RING_FLUSH_OFFSET,
|
|
312
|
+
FOCUS_RING_HALO_OFFSET,
|
|
313
|
+
FOCUS_RING_MIN_CONTRAST,
|
|
314
|
+
FOCUS_RING_MIN_WIDTH,
|
|
315
|
+
FOCUS_VISIBLE_RING,
|
|
316
|
+
FOCUS_VISIBLE_RING_HALO,
|
|
317
|
+
FOCUS_VISIBLE_RING_INSET,
|
|
318
|
+
focusRingColorMeetsContrast,
|
|
319
|
+
isSanctionedFocusRingOffset,
|
|
320
|
+
SANCTIONED_FOCUS_RING_OFFSETS,
|
|
321
|
+
STATE_LAYER_HOVER,
|
|
322
|
+
STATE_LAYER_PRESS,
|
|
323
|
+
withDefaultStateLayer,
|
|
324
|
+
} from "./theme/focusState";
|
|
325
|
+
export {
|
|
326
|
+
FIELD_FOCUS_COLOR,
|
|
327
|
+
FIELD_FOCUS_REST,
|
|
328
|
+
FIELD_FOCUS_STYLE,
|
|
329
|
+
fieldFocusCss,
|
|
330
|
+
fieldFocusHoldsContrast,
|
|
331
|
+
} from "./theme/fieldFocus";
|
|
332
|
+
export {
|
|
333
|
+
ensureHairlineFallback,
|
|
334
|
+
hairline,
|
|
335
|
+
hairlineBorderWidth,
|
|
336
|
+
hairlineFallbackCss,
|
|
337
|
+
hairlineWidth,
|
|
338
|
+
} from "./theme/hairline";
|
|
339
|
+
export {
|
|
340
|
+
compositeFocusRingCss,
|
|
341
|
+
ensureCompositeFocusRing,
|
|
342
|
+
ensureKeyboardModalityTracking,
|
|
343
|
+
focusOnOpen,
|
|
344
|
+
keyboardFocusRingProps,
|
|
345
|
+
wasKeyboardFocus,
|
|
346
|
+
} from "./keyboardFocusRing";
|
|
347
|
+
export {
|
|
348
|
+
CLOCK_TIME,
|
|
349
|
+
formatAbsoluteDate,
|
|
350
|
+
formatAbsoluteDateTime,
|
|
351
|
+
formatCalendarDate,
|
|
352
|
+
formatDayLong,
|
|
353
|
+
formatDayOfMonth,
|
|
354
|
+
formatMonthYear,
|
|
355
|
+
formatRelativeTimestamp,
|
|
356
|
+
formatTimeOfDay,
|
|
357
|
+
getMonthNames,
|
|
358
|
+
getWeekdayNames,
|
|
359
|
+
ISO_DATE_ONLY,
|
|
360
|
+
parseCalendarDate,
|
|
361
|
+
} from "./dates";
|
|
362
|
+
export type {
|
|
363
|
+
AbsoluteDateFormatOptions,
|
|
364
|
+
CalendarDateShape,
|
|
365
|
+
DateInput,
|
|
366
|
+
DayLongFormatOptions,
|
|
367
|
+
MonthYearFormatOptions,
|
|
368
|
+
TimeOfDayFormatOptions,
|
|
369
|
+
WeekdayNamesOptions,
|
|
370
|
+
} from "./dates";
|
|
371
|
+
export {
|
|
372
|
+
menuRowChecked,
|
|
373
|
+
menuRowCheckGlyph,
|
|
374
|
+
menuRowCheckInk,
|
|
375
|
+
menuRowFrame,
|
|
376
|
+
menuRowIconGlyph,
|
|
377
|
+
resolveMenuRowCheckInk,
|
|
378
|
+
useMenuRowCheckInk,
|
|
379
|
+
} from "./menuRow";
|
|
380
|
+
export type { MenuRowGlyph } from "./menuRow";
|
|
381
|
+
export {
|
|
382
|
+
currencyAffix,
|
|
383
|
+
formatCurrency,
|
|
384
|
+
formatNumber,
|
|
385
|
+
formatPercent,
|
|
386
|
+
resolveCurrencyCode,
|
|
387
|
+
} from "./numbers";
|
|
388
|
+
export type {
|
|
389
|
+
CurrencyAffix,
|
|
390
|
+
CurrencyFormatOptions,
|
|
391
|
+
NumberFormatOptions,
|
|
392
|
+
NumberInput,
|
|
393
|
+
PercentFormatOptions,
|
|
394
|
+
} from "./numbers";
|
|
395
|
+
export {
|
|
396
|
+
radiusClassProps,
|
|
397
|
+
radiusOverrideFor,
|
|
398
|
+
radiusResolutionProps,
|
|
399
|
+
resolveRadiusClass,
|
|
400
|
+
resolveRadiusForPart,
|
|
401
|
+
} from "./theme/radiusClass";
|
|
402
|
+
export type {
|
|
403
|
+
KnobImmuneRadiusClass,
|
|
404
|
+
RadiusClassDeclaration,
|
|
405
|
+
RadiusClassGeometry,
|
|
406
|
+
RadiusResolutionDeclaration,
|
|
407
|
+
ResolvedPartRadius,
|
|
408
|
+
ResolvedRadiusSource,
|
|
409
|
+
ResolveRadiusForPartOptions,
|
|
410
|
+
} from "./theme/radiusClass";
|
|
411
|
+
export {
|
|
412
|
+
$color,
|
|
413
|
+
aaTextContrastRatio,
|
|
414
|
+
apcaContrast,
|
|
415
|
+
assertContrast,
|
|
416
|
+
buttonColors,
|
|
417
|
+
contrastRatio,
|
|
418
|
+
fillLabelLc,
|
|
419
|
+
findReadableStep,
|
|
420
|
+
holdHueToFloor,
|
|
421
|
+
holdInkFloor,
|
|
422
|
+
inputColors,
|
|
423
|
+
inSwitchOffBand,
|
|
424
|
+
isLightGround,
|
|
425
|
+
measureContrast,
|
|
426
|
+
minContrastRatio,
|
|
427
|
+
normalizeColorScale,
|
|
428
|
+
normalizeToHex,
|
|
429
|
+
pickReadableForeground,
|
|
430
|
+
plateContrastRatio,
|
|
431
|
+
relativeLuminance,
|
|
432
|
+
resolveThemeContrast,
|
|
433
|
+
semanticGroups,
|
|
434
|
+
switchOffFillAlpha,
|
|
435
|
+
switchOffFillBand,
|
|
436
|
+
systemFillHex,
|
|
437
|
+
systemFillLuminance,
|
|
438
|
+
} from "./theme/colorRules";
|
|
439
|
+
export type {
|
|
440
|
+
ButtonColorConfig,
|
|
441
|
+
ColorRamp,
|
|
442
|
+
ColorStep,
|
|
443
|
+
ComponentColorConfig,
|
|
444
|
+
ContrastPair,
|
|
445
|
+
ContrastReport,
|
|
446
|
+
SemanticGroup,
|
|
447
|
+
ThemeContrastPair,
|
|
448
|
+
} from "./theme/colorRules";
|
|
449
|
+
export {
|
|
450
|
+
getGroupPosition,
|
|
451
|
+
GroupPositionContext,
|
|
452
|
+
stackEdgeRadius,
|
|
453
|
+
stackRadiusProps,
|
|
454
|
+
useGroupPosition,
|
|
455
|
+
} from "./theme/groupGeometry";
|
|
456
|
+
export type { GroupOrientation, GroupPosition, StackRadiusFragment } from "./theme/groupGeometry";
|
|
457
|
+
export {
|
|
458
|
+
resolveAccentOnSurface,
|
|
459
|
+
resolveAccentTintedSurface,
|
|
460
|
+
resolveActiveTabInk,
|
|
461
|
+
resolveIdentityInk,
|
|
462
|
+
resolveLegibleInkOn,
|
|
463
|
+
useAccentOnSurface,
|
|
464
|
+
useAccentTintedSurface,
|
|
465
|
+
useActiveTabInk,
|
|
466
|
+
useIdentityHue,
|
|
467
|
+
useIdentityInkOnSurface,
|
|
468
|
+
useLegibleInkOn,
|
|
469
|
+
useReadableTextOn,
|
|
470
|
+
} from "./theme/readableColor";
|
|
471
|
+
export type {
|
|
472
|
+
ResolveAccentTintedSurfaceInput,
|
|
473
|
+
ResolveActiveTabInkInput,
|
|
474
|
+
} from "./theme/readableColor";
|
|
475
|
+
export {
|
|
476
|
+
accentIdentityCandidates,
|
|
477
|
+
resolveChartPalette,
|
|
478
|
+
useChartPalette,
|
|
479
|
+
} from "./theme/chartPalette";
|
|
480
|
+
export type { ChartPalette, ResolveChartPaletteInput } from "./theme/chartPalette";
|
|
481
|
+
export {
|
|
482
|
+
animationConfig,
|
|
483
|
+
animationDurations,
|
|
484
|
+
animationNames,
|
|
485
|
+
animations,
|
|
486
|
+
animationConfig as cssAnimationConfig,
|
|
487
|
+
motionStops,
|
|
488
|
+
} from "./theme/animations/css";
|
|
489
|
+
export type { AnimationName, MotionStop } from "./theme/animations/css";
|
|
490
|
+
export {
|
|
491
|
+
motionDurationMs,
|
|
492
|
+
motionExitFactor,
|
|
493
|
+
motionFor,
|
|
494
|
+
motionHideDelayMs,
|
|
495
|
+
motionRoleProperties,
|
|
496
|
+
motionSeconds,
|
|
497
|
+
motionSettleMs,
|
|
498
|
+
} from "./theme/motion";
|
|
499
|
+
export type { MotionRole, MotionRoleName } from "./theme/motion";
|
|
500
|
+
export { resolveGlyphPaint, useGlyphColor } from "./theme/glyphPaint";
|
|
501
|
+
export {
|
|
502
|
+
GLYPH_CONTRAST_FLOOR,
|
|
503
|
+
glyphTintFallback,
|
|
504
|
+
GlyphTintFallbackProvider,
|
|
505
|
+
platformSystemTint,
|
|
506
|
+
resolveGlyphTint,
|
|
507
|
+
useGlyphTintOnSurface,
|
|
508
|
+
} from "./theme/glyphTint";
|
|
509
|
+
export type { GlyphTintFallback, ResolveGlyphTintInput } from "./theme/glyphTint";
|
|
510
|
+
export { IconSlot } from "./theme/IconSlot";
|
|
511
|
+
export type { IconSlotValue } from "./theme/IconSlot";
|
|
512
|
+
export { transitionProps } from "./theme/transitionProps";
|
|
513
|
+
export { Anchor, Paragraph, SizableText, Text } from "./theme/Text";
|
|
514
|
+
export type { AnchorProps, ParagraphProps, SizableTextProps, TextProps } from "./theme/Text";
|
|
515
|
+
export { H1, H2, H3, H4, H5, H6, Heading } from "./theme/Heading";
|
|
516
|
+
export type { HeadingProps } from "./theme/Heading";
|
|
517
|
+
export {
|
|
518
|
+
negateSpaceToken,
|
|
519
|
+
PageGutter,
|
|
520
|
+
ScreenNesting,
|
|
521
|
+
usePageGutter,
|
|
522
|
+
useParentScreen,
|
|
523
|
+
usePhoneTableBleed,
|
|
524
|
+
} from "./theme/pageGutter";
|
|
525
|
+
export type { PageGutterProps, ParentScreen, PhoneTableBleed } from "./theme/pageGutter";
|
|
526
|
+
export {
|
|
527
|
+
dynamicTypeFit,
|
|
528
|
+
effectiveFontScale,
|
|
529
|
+
headingMaxFontScale,
|
|
530
|
+
maxFontScaleToFit,
|
|
531
|
+
} from "./theme/dynamicType";
|
|
532
|
+
export { animationConfig as nativeAnimationConfig } from "./theme/animations/reactNative";
|
|
533
|
+
export {
|
|
534
|
+
getActiveScaleTokens,
|
|
535
|
+
scaleRadiusPx,
|
|
536
|
+
scaleSpaceFractionPx,
|
|
537
|
+
setActiveScaleTokens,
|
|
538
|
+
} from "./theme/scale/activeScale";
|
|
539
|
+
export type { IntentOverride, Preset as PresetDefinition } from "./theme/preset.types";
|
|
540
|
+
export type { ThemeSubset } from "./theme/subsetThemes";
|
|
541
|
+
export type { SizeKey } from "./theme/scale/scaleInputs";
|
|
542
|
+
export { listHeightForRows } from "./theme/listRows";
|
|
543
|
+
export { useTouchSurface } from "./theme/useTouchSurface";
|
|
544
|
+
export type { GenericFonts, MediaQueryKey, ThemeName } from "@tamagui/web";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Native twins by name, as `@multiplatform.one/theme/native-twins`. A phone
|
|
3
|
+
* build picks these through its platform resolver from the `.native` files,
|
|
4
|
+
* which re-export the modules below. A harness that resolves web-first
|
|
5
|
+
* (vitest under react-native-web) imports them here to run what a phone runs.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export { ThemeProvider, type ThemeProviderProps } from "./theme/nativeTheme";
|
|
9
|
+
export { usePresetSwitch, type PresetSwitch } from "./theme/nativePresetSwitch";
|
|
10
|
+
export { useSchemePreference, type SchemePreference } from "./theme/nativeSchemePreference";
|
|
11
|
+
export { transitionProps } from "./theme/nativeTransitionProps";
|
|
@@ -188,40 +188,6 @@ describe("Surface field (LC-176, FZ-8711)", () => {
|
|
|
188
188
|
});
|
|
189
189
|
});
|
|
190
190
|
|
|
191
|
-
describe("Surface topBar (LC-176, FZ-8989)", () => {
|
|
192
|
-
function read(tree: (probe: ReactNode) => ReactNode): SurfaceIntent {
|
|
193
|
-
let intent: SurfaceIntent | undefined;
|
|
194
|
-
render(tree(createElement(Probe, { onRead: (value) => (intent = value) })) as never);
|
|
195
|
-
if (!intent) throw new Error("Surface probe did not render");
|
|
196
|
-
return intent;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
it("the page's top bar marks its subtree, through a size-only surface", () => {
|
|
200
|
-
expect(read((probe) => probe).topBar).toBe(false);
|
|
201
|
-
expect(
|
|
202
|
-
read((probe) =>
|
|
203
|
-
createElement(
|
|
204
|
-
Surface,
|
|
205
|
-
{ bar: true, topBar: true },
|
|
206
|
-
createElement(Surface, { size: "$3" }, probe),
|
|
207
|
-
),
|
|
208
|
-
),
|
|
209
|
-
).toMatchObject({ bar: true, topBar: true });
|
|
210
|
-
});
|
|
211
|
-
|
|
212
|
-
it("a bar of its own (a sheet header) or a painted surface resets it", () => {
|
|
213
|
-
const top = (child: ReactNode) => createElement(Surface, { bar: true, topBar: true }, child);
|
|
214
|
-
expect(read((probe) => top(createElement(Surface, { bar: true }, probe)))).toMatchObject({
|
|
215
|
-
bar: true,
|
|
216
|
-
topBar: false,
|
|
217
|
-
});
|
|
218
|
-
expect(
|
|
219
|
-
read((probe) => top(createElement(Surface, { painted: false, elevated: true }, probe)))
|
|
220
|
-
.topBar,
|
|
221
|
-
).toBe(false);
|
|
222
|
-
});
|
|
223
|
-
});
|
|
224
|
-
|
|
225
191
|
describe("useResolvedKnobs inside Surface", () => {
|
|
226
192
|
const inSurface =
|
|
227
193
|
(size: SizeTokens) =>
|