@oxyhq/bloom 1.0.0 → 1.0.2
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/README.md +16 -4
- package/docs/accordion.mdx +69 -0
- package/docs/activity-heatmap.mdx +71 -0
- package/docs/admonition.mdx +77 -0
- package/docs/alert-dialog.mdx +75 -0
- package/docs/alert.mdx +93 -0
- package/docs/animated-check.mdx +53 -0
- package/docs/aspect-ratio.mdx +45 -0
- package/docs/avatar-group.mdx +91 -0
- package/docs/avatar.mdx +126 -0
- package/docs/badge.mdx +74 -0
- package/docs/benefit-list.mdx +56 -0
- package/docs/bottom-sheet.mdx +103 -0
- package/docs/button.mdx +218 -0
- package/docs/card.mdx +106 -0
- package/docs/checkbox.mdx +59 -0
- package/docs/chip.mdx +53 -0
- package/docs/code.mdx +50 -0
- package/docs/combobox.mdx +64 -0
- package/docs/command.mdx +85 -0
- package/docs/composition-bar.mdx +63 -0
- package/docs/connection-dots.mdx +50 -0
- package/docs/connection-status.mdx +56 -0
- package/docs/content-panel.mdx +62 -0
- package/docs/context-menu.mdx +65 -0
- package/docs/design-tokens.mdx +254 -0
- package/docs/dialog.mdx +277 -0
- package/docs/divider.mdx +56 -0
- package/docs/dot-grid-meter.mdx +66 -0
- package/docs/dropdown-menu.mdx +161 -0
- package/docs/error-boundary.mdx +72 -0
- package/docs/fab.mdx +67 -0
- package/docs/field.mdx +70 -0
- package/docs/fill.mdx +58 -0
- package/docs/fonts.mdx +144 -0
- package/docs/frosted-icon-button.mdx +60 -0
- package/docs/getting-started.mdx +75 -0
- package/docs/grid.mdx +64 -0
- package/docs/hooks.mdx +81 -0
- package/docs/icon-circle.mdx +66 -0
- package/docs/icons.mdx +69 -0
- package/docs/image-aspect-ratio-cache.mdx +63 -0
- package/docs/image-resolver.mdx +66 -0
- package/docs/index.mdx +44 -0
- package/docs/input-group.mdx +58 -0
- package/docs/item.mdx +69 -0
- package/docs/kbd.mdx +57 -0
- package/docs/label.mdx +50 -0
- package/docs/link-preview.mdx +66 -0
- package/docs/list.mdx +72 -0
- package/docs/loading.mdx +129 -0
- package/docs/media-inset-border.mdx +52 -0
- package/docs/menubar.mdx +86 -0
- package/docs/migrating-to-1.0.mdx +434 -0
- package/docs/motion.mdx +83 -0
- package/docs/overlay.mdx +75 -0
- package/docs/popover.mdx +73 -0
- package/docs/portal.mdx +63 -0
- package/docs/pressable-scale.mdx +51 -0
- package/docs/profile-card.mdx +66 -0
- package/docs/progressive-blur.mdx +54 -0
- package/docs/prompt-input.mdx +183 -0
- package/docs/provider.mdx +64 -0
- package/docs/radio-indicator.mdx +60 -0
- package/docs/radio.mdx +65 -0
- package/docs/scroll.mdx +66 -0
- package/docs/search.mdx +67 -0
- package/docs/segmented-control.mdx +76 -0
- package/docs/select.mdx +93 -0
- package/docs/settings-list.mdx +186 -0
- package/docs/skeleton.mdx +66 -0
- package/docs/slider.mdx +73 -0
- package/docs/stat-bar.mdx +59 -0
- package/docs/stat-widgets.mdx +33 -0
- package/docs/styles.mdx +61 -0
- package/docs/subtle-hover.mdx +53 -0
- package/docs/surfaces.mdx +72 -0
- package/docs/switch.mdx +90 -0
- package/docs/tab-bar.mdx +386 -0
- package/docs/tabs.mdx +75 -0
- package/docs/text-field.mdx +187 -0
- package/docs/theme.mdx +67 -0
- package/docs/toast.mdx +285 -0
- package/docs/tooltip.mdx +67 -0
- package/docs/typography.mdx +88 -0
- package/docs/user-hover-card.mdx +140 -0
- package/docs/zoomable-image-gallery.mdx +66 -0
- package/lib/commonjs/design-tokens/color-roles.js +21 -1
- package/lib/commonjs/design-tokens/color-roles.js.map +1 -1
- package/lib/commonjs/design-tokens/index.js +6 -0
- package/lib/commonjs/design-tokens/index.js.map +1 -1
- package/lib/commonjs/design-tokens/tailwind-preset.js +3 -1
- package/lib/commonjs/design-tokens/tailwind-preset.js.map +1 -1
- package/lib/commonjs/design-tokens/theme-css.js +1 -0
- package/lib/commonjs/design-tokens/theme-css.js.map +1 -1
- package/lib/commonjs/design-tokens/theme.css +3 -0
- package/lib/commonjs/design-tokens/tokens-json.js +13 -4
- package/lib/commonjs/design-tokens/tokens-json.js.map +1 -1
- package/lib/commonjs/design-tokens/tokens.json +6227 -265
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +7 -0
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/theme/ambient-store.js +16 -1
- package/lib/commonjs/theme/ambient-store.js.map +1 -1
- package/lib/commonjs/theme/color-policy.js +30 -33
- package/lib/commonjs/theme/color-policy.js.map +1 -1
- package/lib/commonjs/theme/color-presets.js +413 -166
- package/lib/commonjs/theme/color-presets.js.map +1 -1
- package/lib/commonjs/theme/color-scope/seed-scope.js +1 -0
- package/lib/commonjs/theme/color-scope/seed-scope.js.map +1 -1
- package/lib/commonjs/theme/glass-colors.js +18 -21
- package/lib/commonjs/theme/glass-colors.js.map +1 -1
- package/lib/commonjs/theme/index.js +30 -0
- package/lib/commonjs/theme/index.js.map +1 -1
- package/lib/commonjs/theme/index.web.js +30 -0
- package/lib/commonjs/theme/index.web.js.map +1 -1
- package/lib/module/design-tokens/color-roles.js +20 -0
- package/lib/module/design-tokens/color-roles.js.map +1 -1
- package/lib/module/design-tokens/index.js +2 -2
- package/lib/module/design-tokens/index.js.map +1 -1
- package/lib/module/design-tokens/tailwind-preset.js +4 -2
- package/lib/module/design-tokens/tailwind-preset.js.map +1 -1
- package/lib/module/design-tokens/theme-css.js +2 -1
- package/lib/module/design-tokens/theme-css.js.map +1 -1
- package/lib/module/design-tokens/theme.css +3 -0
- package/lib/module/design-tokens/tokens-json.js +14 -5
- package/lib/module/design-tokens/tokens-json.js.map +1 -1
- package/lib/module/design-tokens/tokens.json +6227 -265
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +1 -1
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/theme/ambient-store.js +16 -1
- package/lib/module/theme/ambient-store.js.map +1 -1
- package/lib/module/theme/color-policy.js +30 -33
- package/lib/module/theme/color-policy.js.map +1 -1
- package/lib/module/theme/color-presets.js +412 -165
- package/lib/module/theme/color-presets.js.map +1 -1
- package/lib/module/theme/color-scope/seed-scope.js +2 -1
- package/lib/module/theme/color-scope/seed-scope.js.map +1 -1
- package/lib/module/theme/glass-colors.js +18 -21
- package/lib/module/theme/glass-colors.js.map +1 -1
- package/lib/module/theme/index.js +1 -1
- package/lib/module/theme/index.js.map +1 -1
- package/lib/module/theme/index.web.js +1 -1
- package/lib/module/theme/index.web.js.map +1 -1
- package/lib/typescript/commonjs/design-tokens/color-roles.d.ts +20 -0
- package/lib/typescript/commonjs/design-tokens/color-roles.d.ts.map +1 -1
- package/lib/typescript/commonjs/design-tokens/index.d.ts +3 -3
- package/lib/typescript/commonjs/design-tokens/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/design-tokens/tailwind-preset.d.ts.map +1 -1
- package/lib/typescript/commonjs/design-tokens/theme-css.d.ts.map +1 -1
- package/lib/typescript/commonjs/design-tokens/tokens-json.d.ts +12 -3
- package/lib/typescript/commonjs/design-tokens/tokens-json.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +2 -2
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.web.d.ts +2 -2
- package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/ambient-store.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/color-policy.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/color-presets.d.ts +386 -62
- package/lib/typescript/commonjs/theme/color-presets.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/color-scope/seed-scope.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/glass-colors.d.ts +18 -21
- package/lib/typescript/commonjs/theme/glass-colors.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/index.d.ts +2 -2
- package/lib/typescript/commonjs/theme/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/index.web.d.ts +2 -2
- package/lib/typescript/commonjs/theme/index.web.d.ts.map +1 -1
- package/lib/typescript/module/design-tokens/color-roles.d.ts +20 -0
- package/lib/typescript/module/design-tokens/color-roles.d.ts.map +1 -1
- package/lib/typescript/module/design-tokens/index.d.ts +3 -3
- package/lib/typescript/module/design-tokens/index.d.ts.map +1 -1
- package/lib/typescript/module/design-tokens/tailwind-preset.d.ts.map +1 -1
- package/lib/typescript/module/design-tokens/theme-css.d.ts.map +1 -1
- package/lib/typescript/module/design-tokens/tokens-json.d.ts +12 -3
- package/lib/typescript/module/design-tokens/tokens-json.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +2 -2
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/index.web.d.ts +2 -2
- package/lib/typescript/module/index.web.d.ts.map +1 -1
- package/lib/typescript/module/theme/ambient-store.d.ts.map +1 -1
- package/lib/typescript/module/theme/color-policy.d.ts.map +1 -1
- package/lib/typescript/module/theme/color-presets.d.ts +386 -62
- package/lib/typescript/module/theme/color-presets.d.ts.map +1 -1
- package/lib/typescript/module/theme/color-scope/seed-scope.d.ts.map +1 -1
- package/lib/typescript/module/theme/glass-colors.d.ts +18 -21
- package/lib/typescript/module/theme/glass-colors.d.ts.map +1 -1
- package/lib/typescript/module/theme/index.d.ts +2 -2
- package/lib/typescript/module/theme/index.d.ts.map +1 -1
- package/lib/typescript/module/theme/index.web.d.ts +2 -2
- package/lib/typescript/module/theme/index.web.d.ts.map +1 -1
- package/package.json +5 -2
- package/src/__tests__/support/collision-fixture-barrel.ts +20 -0
- package/src/__tests__/support/constructed-style-sheets.ts +68 -0
- package/src/__tests__/support/press-host.ts +30 -0
- package/src/__tests__/support/rendered-style.ts +99 -0
- package/src/__tests__/support/unread-hook-fixture.ts +33 -0
- package/src/design-tokens/color-roles.ts +21 -0
- package/src/design-tokens/index.ts +3 -2
- package/src/design-tokens/tailwind-preset.ts +3 -2
- package/src/design-tokens/theme-css.ts +2 -1
- package/src/design-tokens/theme.css +3 -0
- package/src/design-tokens/tokens-json.ts +29 -9
- package/src/design-tokens/tokens.json +6227 -265
- package/src/glass/GlassSurface.tsx +2 -2
- package/src/index.ts +2 -0
- package/src/index.web.ts +2 -0
- package/src/theme/__tests__/__fixtures__/golden-resolved-tokens.json +4082 -0
- package/src/theme/__tests__/fixtures/color-engine-golden.json +1 -0
- package/src/theme/ambient-store.ts +21 -1
- package/src/theme/color-policy.ts +33 -38
- package/src/theme/color-presets.ts +473 -146
- package/src/theme/color-scope/seed-scope.ts +2 -1
- package/src/theme/glass-colors.ts +18 -21
- package/src/theme/index.ts +16 -1
- package/src/theme/index.web.ts +16 -1
|
@@ -89,23 +89,22 @@ import { withAlpha } from './color-utils';
|
|
|
89
89
|
*
|
|
90
90
|
* The 15% that bleeds through moves the pane TOWARD the surface under it, and
|
|
91
91
|
* in light mode that means lighter — which is the direction a white label can
|
|
92
|
-
* least afford. Measured over
|
|
92
|
+
* least afford. Measured over 34 presets x 2 modes x 5 Bloom surfaces:
|
|
93
93
|
*
|
|
94
|
-
* `Button` primary
|
|
95
|
-
* 4.17..4.49, ALL of them in LIGHT mode, across
|
|
96
|
-
* presets (blue, faircoin, green,
|
|
97
|
-
* rose, sky, yellow).
|
|
98
|
-
* `Button` destructive 0 of
|
|
94
|
+
* `Button` primary 38 of 340 rows fall below WCAG AA, in the band
|
|
95
|
+
* 4.17..4.49, ALL of them in LIGHT mode, across fourteen
|
|
96
|
+
* presets (blue, faircoin, green, lagoon, lavender, mint,
|
|
97
|
+
* olive, orange, pine, plum, pumpkin, rose, sky, yellow).
|
|
98
|
+
* `Button` destructive 0 of 340. Worst 5.32.
|
|
99
99
|
*
|
|
100
|
-
* As a SOLID fill all
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
* bar; re-measure both numbers on every alpha or surface change.
|
|
100
|
+
* As a SOLID fill all 680 Button rows pass. The original 18 presets retain
|
|
101
|
+
* their exact 30/180 shipped failure set; all eight added failures belong to
|
|
102
|
+
* the new recipes. A browser helper briefly reported 45 only because it parsed
|
|
103
|
+
* the structured `GLASS_SHEEN.bottom` stop as CSS; that was measurement drift,
|
|
104
|
+
* never the shipped oracle and never a threshold being relaxed.
|
|
106
105
|
*
|
|
107
106
|
* The alpha at which the failures reach zero is **0.89** (worst 4.52), and the
|
|
108
|
-
* curve between is steep: 0.86 ->
|
|
107
|
+
* curve between is steep: 0.86 -> 25 rows, 0.87 -> 14, 0.88 -> 5, 0.89 -> 0.
|
|
109
108
|
* So AA compliance costs four hundredths of alpha. 0.85 is kept because it is
|
|
110
109
|
* the reference's own value and matching the reference is the requirement;
|
|
111
110
|
* `glass-colors.test.ts` pins the compromise as an EXACT failure count and an
|
|
@@ -241,7 +240,7 @@ export interface GlassColors {
|
|
|
241
240
|
* `colors.negative`, `colors.success` — rather than a tone name, because the
|
|
242
241
|
* caller is the only one who knows which token its variant means. `Button`'s
|
|
243
242
|
* `destructive` is `colors.negative` (the engine's error ROLE) and not
|
|
244
|
-
* `colors.error` (the fixed status seed): measured, those two differ in all
|
|
243
|
+
* `colors.error` (the fixed status seed): measured, those two differ in all 68
|
|
245
244
|
* preset x mode combinations and by as much as `rgb(255 180 171)` against
|
|
246
245
|
* `rgb(209 45 50)` on `teal`/dark, so a tone vocabulary here would have
|
|
247
246
|
* silently repainted every destructive button on the way past.
|
|
@@ -256,13 +255,11 @@ export interface GlassColors {
|
|
|
256
255
|
* It is worth writing down WHY it is that token, because at 0.25 it was
|
|
257
256
|
* `colors.text` and that was correct THEN: a pane that is three-quarters
|
|
258
257
|
* backdrop takes its luminance from the page, so it needed the page's reading
|
|
259
|
-
* colour
|
|
260
|
-
*
|
|
261
|
-
*
|
|
262
|
-
*
|
|
263
|
-
*
|
|
264
|
-
* alpha did. Neither count is permanent; the gate re-measures both on every
|
|
265
|
-
* alpha or surface change and reports them side by side.
|
|
258
|
+
* colour. At 0.85 the pane is the fill, so it takes the fill's own label: on
|
|
259
|
+
* the complete 2040-row matrix (34 presets x 2 modes x 6 tones x 5 surfaces),
|
|
260
|
+
* `colors.text` fails AA on 1714 rows (worst 1.21) against the on-fill token's
|
|
261
|
+
* 305 (worst 4.17). Neither count is permanent; the gate re-measures and pins
|
|
262
|
+
* both on every alpha or surface change.
|
|
266
263
|
*/
|
|
267
264
|
export function resolveGlassColors(fill: string): GlassColors {
|
|
268
265
|
return {
|
package/src/theme/index.ts
CHANGED
|
@@ -38,9 +38,24 @@ export type {
|
|
|
38
38
|
export { useNavigationTheme } from './use-navigation-theme';
|
|
39
39
|
export type { NavigationTheme, NavigationThemeFont } from './use-navigation-theme';
|
|
40
40
|
export type { Theme, ThemeColors, ThemeMode, ThemeGradient, ThemeGradients } from './types';
|
|
41
|
-
export type {
|
|
41
|
+
export type {
|
|
42
|
+
AppColorName,
|
|
43
|
+
AppColorPreset,
|
|
44
|
+
ColorPresetFamily,
|
|
45
|
+
ColorPresetFamilyDefinition,
|
|
46
|
+
ColorPresetGate,
|
|
47
|
+
ColorPresetGroup,
|
|
48
|
+
ColorPresetPairing,
|
|
49
|
+
ColorPresetRecipe,
|
|
50
|
+
PresetTokens,
|
|
51
|
+
} from './color-presets';
|
|
42
52
|
export {
|
|
43
53
|
APP_COLOR_NAMES,
|
|
54
|
+
COLOR_PLAYGROUND_NAMES,
|
|
55
|
+
COLOR_PRESET_FAMILIES,
|
|
56
|
+
COLOR_PRESET_FAMILY_REGISTRY,
|
|
57
|
+
COLOR_PRESET_GROUPS,
|
|
58
|
+
COLOR_PRESET_REGISTRY,
|
|
44
59
|
FREE_COLOR_NAMES,
|
|
45
60
|
HANDLE_COLOR_NAMES,
|
|
46
61
|
PREMIUM_COLOR_NAMES,
|
package/src/theme/index.web.ts
CHANGED
|
@@ -43,9 +43,24 @@ export type {
|
|
|
43
43
|
export { useNavigationTheme } from './use-navigation-theme';
|
|
44
44
|
export type { NavigationTheme, NavigationThemeFont } from './use-navigation-theme';
|
|
45
45
|
export type { Theme, ThemeColors, ThemeMode, ThemeGradient, ThemeGradients } from './types';
|
|
46
|
-
export type {
|
|
46
|
+
export type {
|
|
47
|
+
AppColorName,
|
|
48
|
+
AppColorPreset,
|
|
49
|
+
ColorPresetFamily,
|
|
50
|
+
ColorPresetFamilyDefinition,
|
|
51
|
+
ColorPresetGate,
|
|
52
|
+
ColorPresetGroup,
|
|
53
|
+
ColorPresetPairing,
|
|
54
|
+
ColorPresetRecipe,
|
|
55
|
+
PresetTokens,
|
|
56
|
+
} from './color-presets';
|
|
47
57
|
export {
|
|
48
58
|
APP_COLOR_NAMES,
|
|
59
|
+
COLOR_PLAYGROUND_NAMES,
|
|
60
|
+
COLOR_PRESET_FAMILIES,
|
|
61
|
+
COLOR_PRESET_FAMILY_REGISTRY,
|
|
62
|
+
COLOR_PRESET_GROUPS,
|
|
63
|
+
COLOR_PRESET_REGISTRY,
|
|
49
64
|
FREE_COLOR_NAMES,
|
|
50
65
|
HANDLE_COLOR_NAMES,
|
|
51
66
|
PREMIUM_COLOR_NAMES,
|