@oxyhq/bloom 0.73.1 → 0.74.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/design-tokens/theme.css +22 -0
- package/lib/commonjs/fab/Fab.js +9 -0
- package/lib/commonjs/fab/Fab.js.map +1 -1
- package/lib/commonjs/fab/Fab.web.js +11 -0
- package/lib/commonjs/fab/Fab.web.js.map +1 -1
- package/lib/commonjs/theme/BloomThemeProvider.js.map +1 -1
- package/lib/commonjs/theme/build-theme-from-seed.js +7 -5
- package/lib/commonjs/theme/build-theme-from-seed.js.map +1 -1
- package/lib/commonjs/theme/build-theme.js +9 -4
- package/lib/commonjs/theme/build-theme.js.map +1 -1
- package/lib/commonjs/theme/color-policy.js +320 -0
- package/lib/commonjs/theme/color-policy.js.map +1 -0
- package/lib/commonjs/theme/color-scope/seed-scope.js +13 -1
- package/lib/commonjs/theme/color-scope/seed-scope.js.map +1 -1
- package/lib/commonjs/theme/color-scope/style-builder.js +6 -0
- package/lib/commonjs/theme/color-scope/style-builder.js.map +1 -1
- package/lib/commonjs/theme/preset-vars.js +9 -1
- package/lib/commonjs/theme/preset-vars.js.map +1 -1
- package/lib/commonjs/theme/token-registry.js +11 -1
- package/lib/commonjs/theme/token-registry.js.map +1 -1
- package/lib/module/design-tokens/theme.css +22 -0
- package/lib/module/fab/Fab.js +9 -0
- package/lib/module/fab/Fab.js.map +1 -1
- package/lib/module/fab/Fab.web.js +11 -0
- package/lib/module/fab/Fab.web.js.map +1 -1
- package/lib/module/theme/BloomThemeProvider.js.map +1 -1
- package/lib/module/theme/build-theme-from-seed.js +7 -5
- package/lib/module/theme/build-theme-from-seed.js.map +1 -1
- package/lib/module/theme/build-theme.js +9 -4
- package/lib/module/theme/build-theme.js.map +1 -1
- package/lib/module/theme/color-policy.js +315 -0
- package/lib/module/theme/color-policy.js.map +1 -0
- package/lib/module/theme/color-scope/seed-scope.js +13 -1
- package/lib/module/theme/color-scope/seed-scope.js.map +1 -1
- package/lib/module/theme/color-scope/style-builder.js +6 -0
- package/lib/module/theme/color-scope/style-builder.js.map +1 -1
- package/lib/module/theme/preset-vars.js +9 -1
- package/lib/module/theme/preset-vars.js.map +1 -1
- package/lib/module/theme/token-registry.js +11 -1
- package/lib/module/theme/token-registry.js.map +1 -1
- package/lib/typescript/commonjs/fab/Fab.d.ts.map +1 -1
- package/lib/typescript/commonjs/fab/Fab.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/fab/types.d.ts +6 -1
- package/lib/typescript/commonjs/fab/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/icons/common.d.ts +1 -1
- package/lib/typescript/commonjs/theme/BloomThemeProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/build-theme-from-seed.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/build-theme.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/color-policy.d.ts +48 -0
- package/lib/typescript/commonjs/theme/color-policy.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-scope/seed-scope.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/color-scope/style-builder.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/preset-vars.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/token-registry.d.ts +1 -1
- package/lib/typescript/commonjs/theme/token-registry.d.ts.map +1 -1
- package/lib/typescript/module/fab/Fab.d.ts.map +1 -1
- package/lib/typescript/module/fab/Fab.web.d.ts.map +1 -1
- package/lib/typescript/module/fab/types.d.ts +6 -1
- package/lib/typescript/module/fab/types.d.ts.map +1 -1
- package/lib/typescript/module/icons/common.d.ts +1 -1
- package/lib/typescript/module/theme/BloomThemeProvider.d.ts.map +1 -1
- package/lib/typescript/module/theme/build-theme-from-seed.d.ts.map +1 -1
- package/lib/typescript/module/theme/build-theme.d.ts.map +1 -1
- package/lib/typescript/module/theme/color-policy.d.ts +48 -0
- package/lib/typescript/module/theme/color-policy.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-scope/seed-scope.d.ts.map +1 -1
- package/lib/typescript/module/theme/color-scope/style-builder.d.ts.map +1 -1
- package/lib/typescript/module/theme/preset-vars.d.ts.map +1 -1
- package/lib/typescript/module/theme/token-registry.d.ts +1 -1
- package/lib/typescript/module/theme/token-registry.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/preset-vars.test.ts +27 -15
- package/src/design-tokens/theme.css +22 -0
- package/src/fab/Fab.tsx +3 -0
- package/src/fab/Fab.web.tsx +3 -0
- package/src/fab/types.ts +6 -1
- package/src/theme/BloomThemeProvider.tsx +7 -4
- package/src/theme/__tests__/__fixtures__/golden-resolved-tokens.json +1300 -312
- package/src/theme/__tests__/__snapshots__/visual-gallery.test.tsx.snap +442 -442
- package/src/theme/__tests__/policy-legibility.test.ts +118 -0
- package/src/theme/__tests__/theme-colors-parity.test.ts +11 -6
- package/src/theme/build-theme-from-seed.ts +7 -4
- package/src/theme/build-theme.ts +9 -4
- package/src/theme/color-policy.ts +346 -0
- package/src/theme/color-scope/seed-scope.ts +13 -1
- package/src/theme/color-scope/style-builder.ts +6 -0
- package/src/theme/preset-vars.ts +10 -1
- package/src/theme/token-registry.ts +32 -0
package/src/fab/Fab.web.tsx
CHANGED
|
@@ -166,6 +166,9 @@ function resolveVariant(
|
|
|
166
166
|
): { background: string; foreground: string; ring: string } {
|
|
167
167
|
switch (variant) {
|
|
168
168
|
case 'secondary':
|
|
169
|
+
return { background: c.secondary, foreground: c.secondaryForeground, ring: c.secondary };
|
|
170
|
+
case 'tertiary':
|
|
171
|
+
return { background: c.tertiary, foreground: c.tertiaryForeground, ring: c.tertiary };
|
|
169
172
|
case 'surface':
|
|
170
173
|
return { background: c.card, foreground: c.text, ring: c.primary };
|
|
171
174
|
case 'primary':
|
package/src/fab/types.ts
CHANGED
|
@@ -9,7 +9,12 @@ import type { StyleProp, ViewStyle, TextStyle } from 'react-native';
|
|
|
9
9
|
* A lower-emphasis FAB that still reads as elevated.
|
|
10
10
|
* - `surface` — alias of `secondary`, named for Material-style "surface" FABs.
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
|
+
* M3 defines four FAB colour variants. Bloom previously mapped `secondary` onto
|
|
14
|
+
* the neutral card surface, so a "secondary FAB" was a grey circle and the
|
|
15
|
+
* accent trio had no home in the component that most wants one.
|
|
16
|
+
*/
|
|
17
|
+
export type FabVariant = 'primary' | 'secondary' | 'tertiary' | 'surface';
|
|
13
18
|
|
|
14
19
|
/**
|
|
15
20
|
* FAB size presets, matching Material-ish conventions but in Bloom's scale:
|
|
@@ -410,10 +410,13 @@ export function BloomThemeProvider({
|
|
|
410
410
|
const themeColors = useMemo(
|
|
411
411
|
() =>
|
|
412
412
|
effectiveSeed
|
|
413
|
-
? buildThemeFromSeed(
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
413
|
+
? buildThemeFromSeed(
|
|
414
|
+
effectiveSeed,
|
|
415
|
+
resolved,
|
|
416
|
+
undefined,
|
|
417
|
+
undefined,
|
|
418
|
+
{ secondarySeed: effectiveSecondary, tertiarySeed: effectiveTertiary }
|
|
419
|
+
)
|
|
417
420
|
: buildTheme(colorPreset, resolved, isAdaptive, explicitAccents),
|
|
418
421
|
[
|
|
419
422
|
effectiveSeed,
|