@oxy.so/bloom 2.12.3 → 3.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/README.md +4 -4
- package/docs/button-group.mdx +46 -4
- package/docs/composition.mdx +159 -0
- package/docs/field.mdx +39 -1
- package/docs/glass.mdx +46 -0
- package/docs/layout.mdx +72 -4
- package/docs/message-bubble.mdx +37 -3
- package/docs/message-media.mdx +6 -0
- package/docs/migrating-to-3.0.mdx +169 -0
- package/docs/page-header.mdx +192 -36
- package/lib/commonjs/button/Button.js +2 -0
- package/lib/commonjs/button/Button.js.map +1 -1
- package/lib/commonjs/button-group/ButtonGroup.js +124 -19
- package/lib/commonjs/button-group/ButtonGroup.js.map +1 -1
- package/lib/commonjs/control-surface/ControlSurface.js +46 -0
- package/lib/commonjs/control-surface/ControlSurface.js.map +1 -0
- package/lib/commonjs/control-surface/context.js +84 -0
- package/lib/commonjs/control-surface/context.js.map +1 -0
- package/lib/commonjs/control-surface/index.js +26 -0
- package/lib/commonjs/control-surface/index.js.map +1 -0
- package/lib/commonjs/control-surface/types.js +6 -0
- package/lib/commonjs/control-surface/types.js.map +1 -0
- package/lib/commonjs/field/Field.js +71 -26
- package/lib/commonjs/field/Field.js.map +1 -1
- package/lib/commonjs/field/context.js +80 -0
- package/lib/commonjs/field/context.js.map +1 -0
- package/lib/commonjs/field/index.js +7 -0
- package/lib/commonjs/field/index.js.map +1 -1
- package/lib/commonjs/floating/TriggerSlot.js +32 -0
- package/lib/commonjs/floating/TriggerSlot.js.map +1 -1
- package/lib/commonjs/glass/GlassIsland.js +107 -0
- package/lib/commonjs/glass/GlassIsland.js.map +1 -0
- package/lib/commonjs/glass/GlassSurface.js +4 -1
- package/lib/commonjs/glass/GlassSurface.js.map +1 -1
- package/lib/commonjs/glass/index.js +7 -0
- package/lib/commonjs/glass/index.js.map +1 -1
- package/lib/commonjs/index.js +564 -517
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +564 -517
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/label/Label.js +4 -1
- package/lib/commonjs/label/Label.js.map +1 -1
- package/lib/commonjs/layout/bottom-edge.js +3 -42
- package/lib/commonjs/layout/bottom-edge.js.map +1 -1
- package/lib/commonjs/layout/edge-store.js +65 -0
- package/lib/commonjs/layout/edge-store.js.map +1 -0
- package/lib/commonjs/layout/index.js +32 -0
- package/lib/commonjs/layout/index.js.map +1 -1
- package/lib/commonjs/layout/scroll-offset.js +83 -0
- package/lib/commonjs/layout/scroll-offset.js.map +1 -0
- package/lib/commonjs/layout/top-edge.js +109 -0
- package/lib/commonjs/layout/top-edge.js.map +1 -0
- package/lib/commonjs/message-bubble/MessageBubble.js +16 -5
- package/lib/commonjs/message-bubble/MessageBubble.js.map +1 -1
- package/lib/commonjs/page-header/EdgeScrim.js +136 -0
- package/lib/commonjs/page-header/EdgeScrim.js.map +1 -0
- package/lib/commonjs/page-header/PageHeader.js +236 -61
- package/lib/commonjs/page-header/PageHeader.js.map +1 -1
- package/lib/commonjs/provider/BloomProvider.js +5 -2
- package/lib/commonjs/provider/BloomProvider.js.map +1 -1
- package/lib/commonjs/social-button/OxyMark.js +2 -2
- package/lib/commonjs/social-button/OxyMark.js.map +1 -1
- package/lib/commonjs/social-button/SocialButton.js +2 -2
- package/lib/commonjs/social-button/SocialButton.js.map +1 -1
- package/lib/commonjs/styles/svg-id.js +29 -0
- package/lib/commonjs/styles/svg-id.js.map +1 -0
- package/lib/commonjs/text-field/TextField.js +39 -6
- package/lib/commonjs/text-field/TextField.js.map +1 -1
- package/lib/commonjs/theme/glass-colors.js +81 -1
- package/lib/commonjs/theme/glass-colors.js.map +1 -1
- package/lib/module/button/Button.js +2 -0
- package/lib/module/button/Button.js.map +1 -1
- package/lib/module/button-group/ButtonGroup.js +124 -19
- package/lib/module/button-group/ButtonGroup.js.map +1 -1
- package/lib/module/control-surface/ControlSurface.js +41 -0
- package/lib/module/control-surface/ControlSurface.js.map +1 -0
- package/lib/module/control-surface/context.js +77 -0
- package/lib/module/control-surface/context.js.map +1 -0
- package/lib/module/control-surface/index.js +5 -0
- package/lib/module/control-surface/index.js.map +1 -0
- package/lib/module/control-surface/types.js +4 -0
- package/lib/module/control-surface/types.js.map +1 -0
- package/lib/module/field/Field.js +72 -27
- package/lib/module/field/Field.js.map +1 -1
- package/lib/module/field/context.js +74 -0
- package/lib/module/field/context.js.map +1 -0
- package/lib/module/field/index.js +1 -0
- package/lib/module/field/index.js.map +1 -1
- package/lib/module/floating/TriggerSlot.js +33 -1
- package/lib/module/floating/TriggerSlot.js.map +1 -1
- package/lib/module/glass/GlassIsland.js +102 -0
- package/lib/module/glass/GlassIsland.js.map +1 -0
- package/lib/module/glass/GlassSurface.js +5 -2
- package/lib/module/glass/GlassSurface.js.map +1 -1
- package/lib/module/glass/index.js +1 -0
- package/lib/module/glass/index.js.map +1 -1
- package/lib/module/index.js +2 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +2 -1
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/label/Label.js +4 -1
- package/lib/module/label/Label.js.map +1 -1
- package/lib/module/layout/bottom-edge.js +2 -41
- package/lib/module/layout/bottom-edge.js.map +1 -1
- package/lib/module/layout/edge-store.js +58 -0
- package/lib/module/layout/edge-store.js.map +1 -0
- package/lib/module/layout/index.js +8 -3
- package/lib/module/layout/index.js.map +1 -1
- package/lib/module/layout/scroll-offset.js +77 -0
- package/lib/module/layout/scroll-offset.js.map +1 -0
- package/lib/module/layout/top-edge.js +102 -0
- package/lib/module/layout/top-edge.js.map +1 -0
- package/lib/module/message-bubble/MessageBubble.js +16 -5
- package/lib/module/message-bubble/MessageBubble.js.map +1 -1
- package/lib/module/page-header/EdgeScrim.js +132 -0
- package/lib/module/page-header/EdgeScrim.js.map +1 -0
- package/lib/module/page-header/PageHeader.js +233 -58
- package/lib/module/page-header/PageHeader.js.map +1 -1
- package/lib/module/provider/BloomProvider.js +5 -2
- package/lib/module/provider/BloomProvider.js.map +1 -1
- package/lib/module/social-button/OxyMark.js +1 -1
- package/lib/module/social-button/OxyMark.js.map +1 -1
- package/lib/module/social-button/SocialButton.js +1 -1
- package/lib/module/social-button/SocialButton.js.map +1 -1
- package/lib/module/styles/svg-id.js +26 -0
- package/lib/module/styles/svg-id.js.map +1 -0
- package/lib/module/text-field/TextField.js +39 -6
- package/lib/module/text-field/TextField.js.map +1 -1
- package/lib/module/theme/glass-colors.js +79 -0
- package/lib/module/theme/glass-colors.js.map +1 -1
- package/lib/typescript/commonjs/button/Button.d.ts.map +1 -1
- package/lib/typescript/commonjs/button-group/ButtonGroup.d.ts.map +1 -1
- package/lib/typescript/commonjs/button-group/types.d.ts +61 -5
- package/lib/typescript/commonjs/button-group/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/control-surface/ControlSurface.d.ts +4 -0
- package/lib/typescript/commonjs/control-surface/ControlSurface.d.ts.map +1 -0
- package/lib/typescript/commonjs/control-surface/context.d.ts +21 -0
- package/lib/typescript/commonjs/control-surface/context.d.ts.map +1 -0
- package/lib/typescript/commonjs/control-surface/index.d.ts +4 -0
- package/lib/typescript/commonjs/control-surface/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/control-surface/types.d.ts +37 -0
- package/lib/typescript/commonjs/control-surface/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/field/Field.d.ts +1 -1
- package/lib/typescript/commonjs/field/Field.d.ts.map +1 -1
- package/lib/typescript/commonjs/field/context.d.ts +55 -0
- package/lib/typescript/commonjs/field/context.d.ts.map +1 -0
- package/lib/typescript/commonjs/field/index.d.ts +2 -0
- package/lib/typescript/commonjs/field/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/field/types.d.ts +22 -3
- package/lib/typescript/commonjs/field/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/floating/TriggerSlot.d.ts.map +1 -1
- package/lib/typescript/commonjs/glass/GlassIsland.d.ts +4 -0
- package/lib/typescript/commonjs/glass/GlassIsland.d.ts.map +1 -0
- package/lib/typescript/commonjs/glass/GlassSurface.d.ts.map +1 -1
- package/lib/typescript/commonjs/glass/index.d.ts +2 -1
- package/lib/typescript/commonjs/glass/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/glass/types.d.ts +43 -0
- package/lib/typescript/commonjs/glass/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +3 -2
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.web.d.ts +3 -2
- package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/label/Label.d.ts.map +1 -1
- package/lib/typescript/commonjs/label/types.d.ts +7 -1
- package/lib/typescript/commonjs/label/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/layout/bottom-edge.d.ts.map +1 -1
- package/lib/typescript/commonjs/layout/edge-store.d.ts +31 -0
- package/lib/typescript/commonjs/layout/edge-store.d.ts.map +1 -0
- package/lib/typescript/commonjs/layout/index.d.ts +8 -3
- package/lib/typescript/commonjs/layout/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/layout/scroll-offset.d.ts +16 -0
- package/lib/typescript/commonjs/layout/scroll-offset.d.ts.map +1 -0
- package/lib/typescript/commonjs/layout/top-edge.d.ts +77 -0
- package/lib/typescript/commonjs/layout/top-edge.d.ts.map +1 -0
- package/lib/typescript/commonjs/message-bubble/MessageBubble.d.ts +1 -1
- package/lib/typescript/commonjs/message-bubble/MessageBubble.d.ts.map +1 -1
- package/lib/typescript/commonjs/message-bubble/index.d.ts +1 -1
- package/lib/typescript/commonjs/message-bubble/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/message-bubble/types.d.ts +27 -5
- package/lib/typescript/commonjs/message-bubble/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/page-header/EdgeScrim.d.ts +95 -0
- package/lib/typescript/commonjs/page-header/EdgeScrim.d.ts.map +1 -0
- package/lib/typescript/commonjs/page-header/PageHeader.d.ts +1 -1
- package/lib/typescript/commonjs/page-header/PageHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/page-header/index.d.ts +1 -1
- package/lib/typescript/commonjs/page-header/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/page-header/types.d.ts +97 -10
- package/lib/typescript/commonjs/page-header/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/provider/BloomProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/styles/svg-id.d.ts +20 -0
- package/lib/typescript/commonjs/styles/svg-id.d.ts.map +1 -0
- package/lib/typescript/commonjs/text-field/TextField.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/glass-colors.d.ts +67 -0
- package/lib/typescript/commonjs/theme/glass-colors.d.ts.map +1 -1
- package/lib/typescript/module/button/Button.d.ts.map +1 -1
- package/lib/typescript/module/button-group/ButtonGroup.d.ts.map +1 -1
- package/lib/typescript/module/button-group/types.d.ts +61 -5
- package/lib/typescript/module/button-group/types.d.ts.map +1 -1
- package/lib/typescript/module/control-surface/ControlSurface.d.ts +4 -0
- package/lib/typescript/module/control-surface/ControlSurface.d.ts.map +1 -0
- package/lib/typescript/module/control-surface/context.d.ts +21 -0
- package/lib/typescript/module/control-surface/context.d.ts.map +1 -0
- package/lib/typescript/module/control-surface/index.d.ts +4 -0
- package/lib/typescript/module/control-surface/index.d.ts.map +1 -0
- package/lib/typescript/module/control-surface/types.d.ts +37 -0
- package/lib/typescript/module/control-surface/types.d.ts.map +1 -0
- package/lib/typescript/module/field/Field.d.ts +1 -1
- package/lib/typescript/module/field/Field.d.ts.map +1 -1
- package/lib/typescript/module/field/context.d.ts +55 -0
- package/lib/typescript/module/field/context.d.ts.map +1 -0
- package/lib/typescript/module/field/index.d.ts +2 -0
- package/lib/typescript/module/field/index.d.ts.map +1 -1
- package/lib/typescript/module/field/types.d.ts +22 -3
- package/lib/typescript/module/field/types.d.ts.map +1 -1
- package/lib/typescript/module/floating/TriggerSlot.d.ts.map +1 -1
- package/lib/typescript/module/glass/GlassIsland.d.ts +4 -0
- package/lib/typescript/module/glass/GlassIsland.d.ts.map +1 -0
- package/lib/typescript/module/glass/GlassSurface.d.ts.map +1 -1
- package/lib/typescript/module/glass/index.d.ts +2 -1
- package/lib/typescript/module/glass/index.d.ts.map +1 -1
- package/lib/typescript/module/glass/types.d.ts +43 -0
- package/lib/typescript/module/glass/types.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +3 -2
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/index.web.d.ts +3 -2
- package/lib/typescript/module/index.web.d.ts.map +1 -1
- package/lib/typescript/module/label/Label.d.ts.map +1 -1
- package/lib/typescript/module/label/types.d.ts +7 -1
- package/lib/typescript/module/label/types.d.ts.map +1 -1
- package/lib/typescript/module/layout/bottom-edge.d.ts.map +1 -1
- package/lib/typescript/module/layout/edge-store.d.ts +31 -0
- package/lib/typescript/module/layout/edge-store.d.ts.map +1 -0
- package/lib/typescript/module/layout/index.d.ts +8 -3
- package/lib/typescript/module/layout/index.d.ts.map +1 -1
- package/lib/typescript/module/layout/scroll-offset.d.ts +16 -0
- package/lib/typescript/module/layout/scroll-offset.d.ts.map +1 -0
- package/lib/typescript/module/layout/top-edge.d.ts +77 -0
- package/lib/typescript/module/layout/top-edge.d.ts.map +1 -0
- package/lib/typescript/module/message-bubble/MessageBubble.d.ts +1 -1
- package/lib/typescript/module/message-bubble/MessageBubble.d.ts.map +1 -1
- package/lib/typescript/module/message-bubble/index.d.ts +1 -1
- package/lib/typescript/module/message-bubble/index.d.ts.map +1 -1
- package/lib/typescript/module/message-bubble/types.d.ts +27 -5
- package/lib/typescript/module/message-bubble/types.d.ts.map +1 -1
- package/lib/typescript/module/page-header/EdgeScrim.d.ts +95 -0
- package/lib/typescript/module/page-header/EdgeScrim.d.ts.map +1 -0
- package/lib/typescript/module/page-header/PageHeader.d.ts +1 -1
- package/lib/typescript/module/page-header/PageHeader.d.ts.map +1 -1
- package/lib/typescript/module/page-header/index.d.ts +1 -1
- package/lib/typescript/module/page-header/index.d.ts.map +1 -1
- package/lib/typescript/module/page-header/types.d.ts +97 -10
- package/lib/typescript/module/page-header/types.d.ts.map +1 -1
- package/lib/typescript/module/provider/BloomProvider.d.ts.map +1 -1
- package/lib/typescript/module/styles/svg-id.d.ts +20 -0
- package/lib/typescript/module/styles/svg-id.d.ts.map +1 -0
- package/lib/typescript/module/text-field/TextField.d.ts.map +1 -1
- package/lib/typescript/module/theme/glass-colors.d.ts +67 -0
- package/lib/typescript/module/theme/glass-colors.d.ts.map +1 -1
- package/package.json +15 -1
- package/src/button/Button.tsx +10 -1
- package/src/button-group/ButtonGroup.tsx +146 -19
- package/src/button-group/types.ts +68 -5
- package/src/control-surface/ControlSurface.tsx +41 -0
- package/src/control-surface/context.ts +81 -0
- package/src/control-surface/index.ts +4 -0
- package/src/control-surface/types.ts +40 -0
- package/src/field/Field.tsx +84 -27
- package/src/field/context.ts +110 -0
- package/src/field/index.ts +3 -0
- package/src/field/types.ts +22 -3
- package/src/floating/TriggerSlot.tsx +35 -1
- package/src/glass/GlassIsland.tsx +109 -0
- package/src/glass/GlassSurface.tsx +26 -2
- package/src/glass/index.ts +3 -0
- package/src/glass/types.ts +45 -0
- package/src/index.ts +7 -0
- package/src/index.web.ts +7 -0
- package/src/label/Label.tsx +3 -1
- package/src/label/types.ts +7 -1
- package/src/layout/bottom-edge.tsx +3 -56
- package/src/layout/edge-store.ts +69 -0
- package/src/layout/index.ts +8 -3
- package/src/layout/scroll-offset.ts +76 -0
- package/src/layout/top-edge.tsx +109 -0
- package/src/message-bubble/MessageBubble.tsx +19 -5
- package/src/message-bubble/index.ts +1 -0
- package/src/message-bubble/types.ts +28 -5
- package/src/page-header/EdgeScrim.tsx +118 -0
- package/src/page-header/PageHeader.tsx +253 -61
- package/src/page-header/index.ts +9 -1
- package/src/page-header/types.ts +103 -10
- package/src/provider/BloomProvider.tsx +12 -1
- package/src/social-button/OxyMark.tsx +1 -1
- package/src/social-button/SocialButton.tsx +1 -1
- package/src/styles/svg-id.ts +23 -0
- package/src/text-field/TextField.tsx +44 -5
- package/src/theme/glass-colors.ts +80 -0
- package/lib/commonjs/social-button/use-svg-id.js +0 -16
- package/lib/commonjs/social-button/use-svg-id.js.map +0 -1
- package/lib/module/social-button/use-svg-id.js +0 -13
- package/lib/module/social-button/use-svg-id.js.map +0 -1
- package/lib/typescript/commonjs/social-button/use-svg-id.d.ts +0 -7
- package/lib/typescript/commonjs/social-button/use-svg-id.d.ts.map +0 -1
- package/lib/typescript/module/social-button/use-svg-id.d.ts +0 -7
- package/lib/typescript/module/social-button/use-svg-id.d.ts.map +0 -1
- package/src/social-button/use-svg-id.ts +0 -10
|
@@ -2,17 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
import React, { Children, createContext, Fragment, isValidElement, memo, useContext, useMemo } from 'react';
|
|
4
4
|
import { Platform, Pressable, View } from 'react-native';
|
|
5
|
+
import { useInheritedControl } from "../control-surface/index.js";
|
|
6
|
+
import { GlassIsland } from "../glass/index.js";
|
|
5
7
|
import { useTheme } from "../theme/use-theme.js";
|
|
6
8
|
import { Text } from "../typography/Typography.js";
|
|
7
9
|
import { useInteractionState } from "../hooks/use-interaction-state.js";
|
|
10
|
+
import { resolveSurfaceLevel } from "../styles/surface-levels.js";
|
|
8
11
|
import { NOT_DISABLED, interactiveWebCss, useInteractiveWebCss } from "../styles/interactive-web-css.js";
|
|
12
|
+
import { withAlpha } from "../theme/color-utils.js";
|
|
9
13
|
import { BUTTON_RADIUS, BUTTON_SHADOW, BUTTON_TRANSITION_MS, mixColor, resolveButtonRamps } from "../button/shared.js";
|
|
10
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
15
|
/**
|
|
12
|
-
* A group of
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
+
* A group of buttons the consumer has declared as ONE control.
|
|
17
|
+
*
|
|
18
|
+
* ── TWO MATERIALS, ONE GROUP ────────────────────────────────────────────────
|
|
19
|
+
*
|
|
20
|
+
* `solid` is the original: one bordered, shadowed container, items divided by
|
|
21
|
+
* 1px hairlines, only the outer ends rounded, colours from the same
|
|
22
|
+
* Bloom-derived ramps as `Button` (`button/shared.ts`).
|
|
23
|
+
*
|
|
24
|
+
* `glass` is the same group as a floating ISLAND — one translucent pane
|
|
25
|
+
* (`glass/GlassIsland`) that the items sit FLUSH on. The group owns the
|
|
26
|
+
* material and the items paint no fill of their own at rest; a second fill
|
|
27
|
+
* under a translucent pane is the thing that makes a row of controls read as a
|
|
28
|
+
* row of cards rather than as one island, and a second BLUR is not available at
|
|
29
|
+
* all on Android.
|
|
30
|
+
*
|
|
31
|
+
* Neither is a decoration a caller has to ask for by name. The variant is
|
|
32
|
+
* INHERITED from the nearest `ControlSurface`, so `<ButtonGroup>` inside a
|
|
33
|
+
* floating `PageHeader` is glass and the same group inside a card is solid,
|
|
34
|
+
* with no prop either way. An explicit `variant` still wins.
|
|
16
35
|
*
|
|
17
36
|
* medium small
|
|
18
37
|
* item h 34 30 (plus the container's 1px border = 36 / 32)
|
|
@@ -63,6 +82,51 @@ function resolveGroupPalette(theme) {
|
|
|
63
82
|
};
|
|
64
83
|
}
|
|
65
84
|
|
|
85
|
+
/**
|
|
86
|
+
* The items' paint on a GLASS island.
|
|
87
|
+
*
|
|
88
|
+
* Every state that is not "at rest" is an alpha of the theme's own `text` — an
|
|
89
|
+
* ink wash, not a fill. That is the one recipe that works on a pane whose
|
|
90
|
+
* composited colour Bloom cannot predict: a fixed neutral tuned against the
|
|
91
|
+
* island's own fill goes invisible the moment a photograph behind it moves the
|
|
92
|
+
* pane 40 levels, while a wash of the label's colour keeps the same relation to
|
|
93
|
+
* the label at every composite.
|
|
94
|
+
*
|
|
95
|
+
* `transparent` at rest is load-bearing rather than tidy. It is what makes the
|
|
96
|
+
* island ONE pane: give the items a fill and the group is a row of chips inside
|
|
97
|
+
* a capsule, which is the shape this variant exists to stop.
|
|
98
|
+
*
|
|
99
|
+
* The disabled label is read off the island's own fill with `surfaceTextOn`
|
|
100
|
+
* rather than picked from the ramp, because a ramp stop measured against the
|
|
101
|
+
* page is not measured against this surface.
|
|
102
|
+
*/
|
|
103
|
+
function resolveGlassItemPalette(theme) {
|
|
104
|
+
const {
|
|
105
|
+
accent
|
|
106
|
+
} = resolveButtonRamps(theme);
|
|
107
|
+
const level = resolveSurfaceLevel(theme, 1);
|
|
108
|
+
const ink = theme.colors.text;
|
|
109
|
+
const wash = theme.isDark ? {
|
|
110
|
+
hover: 0.12,
|
|
111
|
+
active: 0.2
|
|
112
|
+
} : {
|
|
113
|
+
hover: 0.08,
|
|
114
|
+
active: 0.14
|
|
115
|
+
};
|
|
116
|
+
return {
|
|
117
|
+
// The island owns the box: the group draws neither border nor divider.
|
|
118
|
+
groupBorder: 'transparent',
|
|
119
|
+
divider: withAlpha(ink, theme.isDark ? 0.16 : 0.12),
|
|
120
|
+
background: 'transparent',
|
|
121
|
+
hover: withAlpha(ink, wash.hover),
|
|
122
|
+
active: withAlpha(ink, wash.active),
|
|
123
|
+
disabledBackground: 'transparent',
|
|
124
|
+
foreground: ink,
|
|
125
|
+
disabledForeground: level.textGraphical,
|
|
126
|
+
ring: accent[500]
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
|
|
66
130
|
// ---------------------------------------------------------------------------
|
|
67
131
|
// Keyboard focus on web — an inset `ring-2`. Items are react-native-web
|
|
68
132
|
// `Pressable`s, so the rules hang off a `dataSet` attribute (a class never
|
|
@@ -99,7 +163,9 @@ ${SELECTOR}${NOT_DISABLED}:focus-visible {
|
|
|
99
163
|
const IS_WEB = Platform.OS === 'web';
|
|
100
164
|
const GroupContext = /*#__PURE__*/createContext(null);
|
|
101
165
|
const ButtonGroupComponent = ({
|
|
102
|
-
|
|
166
|
+
variant,
|
|
167
|
+
size: sizeProp,
|
|
168
|
+
dividers,
|
|
103
169
|
children,
|
|
104
170
|
accessibilityLabel,
|
|
105
171
|
style,
|
|
@@ -107,12 +173,36 @@ const ButtonGroupComponent = ({
|
|
|
107
173
|
}) => {
|
|
108
174
|
const theme = useTheme();
|
|
109
175
|
useInteractiveWebCss(STYLE_ID, BUTTON_GROUP_CSS);
|
|
110
|
-
const
|
|
176
|
+
const material = useInheritedControl('material', variant, 'solid');
|
|
177
|
+
const size = useInheritedControl('density', sizeProp, 'medium');
|
|
178
|
+
const palette = useMemo(() => material === 'glass' ? resolveGlassItemPalette(theme) : resolveGroupPalette(theme), [material, theme]);
|
|
111
179
|
const context = useMemo(() => ({
|
|
112
180
|
size,
|
|
181
|
+
material,
|
|
113
182
|
palette
|
|
114
|
-
}), [size, palette]);
|
|
183
|
+
}), [size, material, palette]);
|
|
115
184
|
const items = Children.toArray(children).filter(isValidElement);
|
|
185
|
+
const showDividers = dividers ?? material === 'solid';
|
|
186
|
+
const row = items.map((item, index) => /*#__PURE__*/_jsxs(Fragment, {
|
|
187
|
+
children: [showDividers && index > 0 ? /*#__PURE__*/_jsx(View, {
|
|
188
|
+
style: {
|
|
189
|
+
width: 1,
|
|
190
|
+
backgroundColor: palette.divider
|
|
191
|
+
}
|
|
192
|
+
}) : null, item]
|
|
193
|
+
}, item.key ?? index));
|
|
194
|
+
if (material === 'glass') {
|
|
195
|
+
return /*#__PURE__*/_jsx(GroupContext.Provider, {
|
|
196
|
+
value: context,
|
|
197
|
+
children: /*#__PURE__*/_jsx(GlassIsland, {
|
|
198
|
+
role: "group",
|
|
199
|
+
accessibilityLabel: accessibilityLabel,
|
|
200
|
+
style: style,
|
|
201
|
+
testID: testID,
|
|
202
|
+
children: row
|
|
203
|
+
})
|
|
204
|
+
});
|
|
205
|
+
}
|
|
116
206
|
return /*#__PURE__*/_jsx(GroupContext.Provider, {
|
|
117
207
|
value: context,
|
|
118
208
|
children: /*#__PURE__*/_jsx(View, {
|
|
@@ -130,34 +220,40 @@ const ButtonGroupComponent = ({
|
|
|
130
220
|
boxShadow: BUTTON_SHADOW[theme.isDark ? 'dark' : 'light'],
|
|
131
221
|
overflow: 'hidden'
|
|
132
222
|
}, style],
|
|
133
|
-
children:
|
|
134
|
-
children: [index > 0 ? /*#__PURE__*/_jsx(View, {
|
|
135
|
-
style: {
|
|
136
|
-
width: 1,
|
|
137
|
-
backgroundColor: palette.divider
|
|
138
|
-
}
|
|
139
|
-
}) : null, item]
|
|
140
|
-
}, item.key ?? index))
|
|
223
|
+
children: row
|
|
141
224
|
})
|
|
142
225
|
});
|
|
143
226
|
};
|
|
144
227
|
const ButtonGroupItemComponent = ({
|
|
145
228
|
onPress,
|
|
229
|
+
onLongPress,
|
|
146
230
|
children,
|
|
147
231
|
size: sizeProp,
|
|
232
|
+
variant,
|
|
148
233
|
selected = false,
|
|
149
234
|
disabled = false,
|
|
150
235
|
iconOnly = false,
|
|
151
236
|
leadingIcon: LeadingIcon,
|
|
152
237
|
trailingIcon: TrailingIcon,
|
|
153
238
|
accessibilityLabel,
|
|
239
|
+
accessibilityRole = 'button',
|
|
240
|
+
hitSlop,
|
|
241
|
+
'aria-expanded': ariaExpanded,
|
|
242
|
+
'aria-haspopup': ariaHasPopup,
|
|
154
243
|
style,
|
|
155
244
|
testID
|
|
156
245
|
}) => {
|
|
157
246
|
const theme = useTheme();
|
|
158
247
|
const group = useContext(GroupContext);
|
|
159
|
-
|
|
160
|
-
|
|
248
|
+
// An item can be rendered OUTSIDE its group's children — an anchored family's
|
|
249
|
+
// `asChild` trigger clones it into the caller's tree — so the material falls
|
|
250
|
+
// back to the inherited `ControlSurface` (which `GlassIsland` mounts) before
|
|
251
|
+
// it falls back to `solid`.
|
|
252
|
+
const inheritedMaterial = useInheritedControl('material', undefined, 'solid');
|
|
253
|
+
const inheritedDensity = useInheritedControl('density', undefined, 'medium');
|
|
254
|
+
const material = variant ?? group?.material ?? inheritedMaterial;
|
|
255
|
+
const palette = useMemo(() => group && group.material === material ? group.palette : material === 'glass' ? resolveGlassItemPalette(theme) : resolveGroupPalette(theme), [group, material, theme]);
|
|
256
|
+
const size = sizeProp ?? group?.size ?? inheritedDensity;
|
|
161
257
|
const geometry = GEOMETRY[size];
|
|
162
258
|
const {
|
|
163
259
|
state: hovered,
|
|
@@ -181,6 +277,10 @@ const ButtonGroupItemComponent = ({
|
|
|
181
277
|
justifyContent: 'center',
|
|
182
278
|
gap: 4,
|
|
183
279
|
backgroundColor: background,
|
|
280
|
+
// On glass the island does not clip (a clipping node loses its iOS drop
|
|
281
|
+
// shadow), so the item rounds its OWN highlight. On solid the container
|
|
282
|
+
// clips and a square item is what makes the fused ends read as one pill.
|
|
283
|
+
borderRadius: material === 'glass' ? BUTTON_RADIUS : undefined,
|
|
184
284
|
'--bloom-button-group-ring': palette.ring
|
|
185
285
|
};
|
|
186
286
|
const labelStyle = {
|
|
@@ -194,21 +294,26 @@ const ButtonGroupItemComponent = ({
|
|
|
194
294
|
} : {}),
|
|
195
295
|
style: [containerStyle, style],
|
|
196
296
|
onPress: disabled ? undefined : onPress,
|
|
297
|
+
onLongPress: disabled ? undefined : onLongPress,
|
|
197
298
|
onPressIn: disabled ? undefined : onPressIn,
|
|
198
299
|
onPressOut: disabled ? undefined : onPressOut,
|
|
199
300
|
onHoverIn: onHoverIn,
|
|
200
301
|
onHoverOut: onHoverOut,
|
|
302
|
+
hitSlop: hitSlop,
|
|
201
303
|
disabled: disabled,
|
|
202
|
-
accessibilityRole:
|
|
304
|
+
accessibilityRole: accessibilityRole,
|
|
203
305
|
accessibilityLabel: accessibilityLabel
|
|
204
306
|
// Both spellings: react-native-web reads only `aria-pressed`, React Native
|
|
205
307
|
// has no `aria-pressed` and reads `accessibilityState`.
|
|
206
308
|
,
|
|
207
309
|
accessibilityState: {
|
|
208
310
|
disabled,
|
|
209
|
-
selected
|
|
311
|
+
selected,
|
|
312
|
+
expanded: ariaExpanded
|
|
210
313
|
},
|
|
211
314
|
"aria-pressed": selected,
|
|
315
|
+
"aria-expanded": ariaExpanded,
|
|
316
|
+
"aria-haspopup": ariaHasPopup,
|
|
212
317
|
testID: testID,
|
|
213
318
|
children: [LeadingIcon ? /*#__PURE__*/_jsx(LeadingIcon, {
|
|
214
319
|
width: geometry.iconSize,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Children","createContext","Fragment","isValidElement","memo","useContext","useMemo","Platform","Pressable","View","useTheme","Text","useInteractionState","NOT_DISABLED","interactiveWebCss","useInteractiveWebCss","BUTTON_RADIUS","BUTTON_SHADOW","BUTTON_TRANSITION_MS","mixColor","resolveButtonRamps","jsx","_jsx","jsxs","_jsxs","GEOMETRY","medium","height","paddingHorizontal","iconSize","small","resolveGroupPalette","theme","accent","neutral","n","isDark","groupBorder","divider","background","hover","active","disabledBackground","foreground","colors","text","disabledForeground","ring","card","STYLE_ID","SELECTOR","BUTTON_GROUP_CSS","selector","varPrefix","base","transition","declarations","outlineOffset","extraRules","IS_WEB","OS","GroupContext","ButtonGroupComponent","size","children","accessibilityLabel","style","testID","palette","context","items","toArray","filter","Provider","value","role","flexDirection","alignItems","alignSelf","borderWidth","borderColor","borderRadius","backgroundColor","boxShadow","overflow","map","item","index","width","key","ButtonGroupItemComponent","onPress","sizeProp","selected","disabled","iconOnly","leadingIcon","LeadingIcon","trailingIcon","TrailingIcon","group","geometry","state","hovered","onIn","onHoverIn","onOut","onHoverOut","pressed","onPressIn","onPressOut","containerStyle","minWidth","undefined","justifyContent","gap","labelStyle","color","dataSet","bloomButtonGroupItem","accessibilityRole","accessibilityState","fill","variant","numberOfLines","ButtonGroup","displayName","ButtonGroupItem"],"sourceRoot":"../../../src","sources":["button-group/ButtonGroup.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,aAAa,EAAEC,QAAQ,EAAEC,cAAc,EAAEC,IAAI,EAAEC,UAAU,EAAEC,OAAO,QAAQ,OAAO;AAC3G,SAASC,QAAQ,EAAEC,SAAS,EAAEC,IAAI,QAAwB,cAAc;AAExE,SAASC,QAAQ,QAAQ,uBAAoB;AAC7C,SAASC,IAAI,QAAQ,6BAA0B;AAC/C,SAASC,mBAAmB,QAAQ,mCAAgC;AACpE,SAASC,YAA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S,CAAE;IAC3C,gBAAcA,QAAS;IACvB1B,MAAM,EAAEA,MAAO;IAAAH,QAAA,GAEdiC,WAAW,gBACV3E,IAAA,CAAC2E,WAAW;MAACT,KAAK,EAAEa,QAAQ,CAACxE,QAAS;MAACF,MAAM,EAAE0E,QAAQ,CAACxE,QAAS;MAAC6F,IAAI,EAAE/E;IAAW,CAAE,CAAC,GACpF,IAAI,EACP,CAACoD,QAAQ,IAAI/B,QAAQ,IAAI,IAAI,GAC5B,OAAOA,QAAQ,KAAK,QAAQ,IAAI,OAAOA,QAAQ,KAAK,QAAQ,gBAC1D1C,IAAA,CAACX,IAAI;MAACgH,OAAO,EAAC,aAAa;MAACC,aAAa,EAAE,CAAE;MAAC1D,KAAK,EAAEkD,UAAW;MAAApD,QAAA,EAC7DA;IAAQ,CACL,CAAC,GAEPA,QACD,GACC,IAAI,EACP,CAAC+B,QAAQ,IAAII,YAAY,gBACxB7E,IAAA,CAAC6E,YAAY;MAACX,KAAK,EAAEa,QAAQ,CAACxE,QAAS;MAACF,MAAM,EAAE0E,QAAQ,CAACxE,QAAS;MAAC6F,IAAI,EAAE/E;IAAW,CAAE,CAAC,GACrF,IAAI;EAAA,CACC,CAAC;AAEhB,CAAC;AAED,OAAO,MAAMkF,WAAW,gBAAGzH,IAAI,CAAC0D,oBAAoB,CAAC;AACrD+D,WAAW,CAACC,WAAW,GAAG,aAAa;AAEvC,OAAO,MAAMC,eAAe,gBAAG3H,IAAI,CAACsF,wBAAwB,CAAC;AAC7DqC,eAAe,CAACD,WAAW,GAAG,iBAAiB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","Children","createContext","Fragment","isValidElement","memo","useContext","useMemo","Platform","Pressable","View","useInheritedControl","GlassIsland","useTheme","Text","useInteractionState","resolveSurfaceLevel","NOT_DISABLED","interactiveWebCss","useInteractiveWebCss","withAlpha","BUTTON_RADIUS","BUTTON_SHADOW","BUTTON_TRANSITION_MS","mixColor","resolveButtonRamps","jsx","_jsx","jsxs","_jsxs","GEOMETRY","medium","height","paddingHorizontal","iconSize","small","resolveGroupPalette","theme","accent","neutral","n","isDark","groupBorder","divider","background","hover","active","disabledBackground","foreground","colors","text","disabledForeground","ring","card","resolveGlassItemPalette","level","ink","wash","textGraphical","STYLE_ID","SELECTOR","BUTTON_GROUP_CSS","selector","varPrefix","base","transition","declarations","outlineOffset","extraRules","IS_WEB","OS","GroupContext","ButtonGroupComponent","variant","size","sizeProp","dividers","children","accessibilityLabel","style","testID","material","palette","context","items","toArray","filter","showDividers","row","map","item","index","width","backgroundColor","key","Provider","value","role","flexDirection","alignItems","alignSelf","borderWidth","borderColor","borderRadius","boxShadow","overflow","ButtonGroupItemComponent","onPress","onLongPress","selected","disabled","iconOnly","leadingIcon","LeadingIcon","trailingIcon","TrailingIcon","accessibilityRole","hitSlop","ariaExpanded","ariaHasPopup","group","inheritedMaterial","undefined","inheritedDensity","geometry","state","hovered","onIn","onHoverIn","onOut","onHoverOut","pressed","onPressIn","onPressOut","containerStyle","minWidth","justifyContent","gap","labelStyle","color","dataSet","bloomButtonGroupItem","accessibilityState","expanded","fill","numberOfLines","ButtonGroup","displayName","ButtonGroupItem"],"sourceRoot":"../../../src","sources":["button-group/ButtonGroup.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,aAAa,EAAEC,QAAQ,EAAEC,cAAc,EAAEC,IAAI,EAAEC,UAAU,EAAEC,OAAO,QAAQ,OAAO;AAC3G,SAASC,QAAQ,EAAEC,SAAS,EAAEC,IAAI,QAAwB,cAAc;AAExE,SAASC,mBAAmB,QAAQ,6BAAoB;AACxD,SAASC,WAAW,QAAQ,mBAAU;AACtC,SAASC,QAAQ,QAAQ,uBAAoB;AAC7C,SAASC,IAAI,QAAQ,6BAA0B;AAC/C,SAASC,mBAAmB,QAAQ,mCAAgC;AACpE,SAASC,mBAAmB,QAAQ,6BAA0B;AAC9D,SAASC,YAAY,EAAEC,iBAAiB,EAAEC,oBAAoB,QAAQ,kCAA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AAa,CAAE;IACnE,gBAAcT,QAAS;IACvB,iBAAeS,YAAa;IAC5B,iBAAeC,YAAa;IAC5BvC,MAAM,EAAEA,MAAO;IAAAH,QAAA,GAEdoC,WAAW,gBACVtF,IAAA,CAACsF,WAAW;MAACrB,KAAK,EAAEgC,QAAQ,CAAC1F,QAAS;MAACF,MAAM,EAAE4F,QAAQ,CAAC1F,QAAS;MAAC8G,IAAI,EAAEhG;IAAW,CAAE,CAAC,GACpF,IAAI,EACP,CAAC+D,QAAQ,IAAIlC,QAAQ,IAAI,IAAI,GAC5B,OAAOA,QAAQ,KAAK,QAAQ,IAAI,OAAOA,QAAQ,KAAK,QAAQ,gBAC1DlD,IAAA,CAACb,IAAI;MAAC2D,OAAO,EAAC,aAAa;MAACwE,aAAa,EAAE,CAAE;MAAClE,KAAK,EAAE2D,UAAW;MAAA7D,QAAA,EAC7DA;IAAQ,CACL,CAAC,GAEPA,QACD,GACC,IAAI,EACP,CAACkC,QAAQ,IAAII,YAAY,gBACxBxF,IAAA,CAACwF,YAAY;MAACvB,KAAK,EAAEgC,QAAQ,CAAC1F,QAAS;MAACF,MAAM,EAAE4F,QAAQ,CAAC1F,QAAS;MAAC8G,IAAI,EAAEhG;IAAW,CAAE,CAAC,GACrF,IAAI;EAAA,CACC,CAAC;AAEhB,CAAC;AAED,OAAO,MAAMkG,WAAW,gBAAG7I,IAAI,CAACmE,oBAAoB,CAAC;AACrD0E,WAAW,CAACC,WAAW,GAAG,aAAa;AAEvC,OAAO,MAAMC,eAAe,gBAAG/I,IAAI,CAACqG,wBAAwB,CAAC;AAC7D0C,eAAe,CAACD,WAAW,GAAG,iBAAiB","ignoreList":[]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { memo, useMemo } from 'react';
|
|
4
|
+
import { ControlSurfaceProvider, useControlSurface } from "./context.js";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
/**
|
|
7
|
+
* Declare the presentation the controls inside should default to.
|
|
8
|
+
*
|
|
9
|
+
* Renders nothing of its own — no view, no layout node — so it can be dropped
|
|
10
|
+
* anywhere without moving anything. Bloom's own containers (`ButtonGroup`'s
|
|
11
|
+
* glass variant, `PageHeader`'s islands) mount it for you; this is the explicit
|
|
12
|
+
* entry point for an app that wants the same effect around its own controls.
|
|
13
|
+
*
|
|
14
|
+
* ```tsx
|
|
15
|
+
* <ControlSurface material="glass">
|
|
16
|
+
* <ButtonGroup accessibilityLabel="Playback">…</ButtonGroup>
|
|
17
|
+
* </ControlSurface>
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* A field left `undefined` INHERITS rather than resetting, so a nested
|
|
21
|
+
* `<ControlSurface density="small">` inside a glass island stays glass. The
|
|
22
|
+
* full precedence rule is in `control-surface/context.ts`.
|
|
23
|
+
*/
|
|
24
|
+
const ControlSurfaceComponent = ({
|
|
25
|
+
material,
|
|
26
|
+
density,
|
|
27
|
+
children
|
|
28
|
+
}) => {
|
|
29
|
+
const inherited = useControlSurface();
|
|
30
|
+
const value = useMemo(() => ({
|
|
31
|
+
material: material ?? inherited?.material ?? 'solid',
|
|
32
|
+
density: density ?? inherited?.density ?? 'medium'
|
|
33
|
+
}), [material, density, inherited?.material, inherited?.density]);
|
|
34
|
+
return /*#__PURE__*/_jsx(ControlSurfaceProvider, {
|
|
35
|
+
value: value,
|
|
36
|
+
children: children
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
export const ControlSurface = /*#__PURE__*/memo(ControlSurfaceComponent);
|
|
40
|
+
ControlSurface.displayName = 'ControlSurface';
|
|
41
|
+
//# sourceMappingURL=ControlSurface.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","memo","useMemo","ControlSurfaceProvider","useControlSurface","jsx","_jsx","ControlSurfaceComponent","material","density","children","inherited","value","ControlSurface","displayName"],"sourceRoot":"../../../src","sources":["control-surface/ControlSurface.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,IAAI,EAAEC,OAAO,QAAQ,OAAO;AAE5C,SAASC,sBAAsB,EAAEC,iBAAiB,QAAQ,cAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,uBAAsD,GAAGA,CAAC;EAC9DC,QAAQ;EACRC,OAAO;EACPC;AACF,CAAC,KAAK;EACJ,MAAMC,SAAS,GAAGP,iBAAiB,CAAC,CAAC;EACrC,MAAMQ,KAAK,GAAGV,OAAO,CACnB,OAAO;IACLM,QAAQ,EAAEA,QAAQ,IAAIG,SAAS,EAAEH,QAAQ,IAAI,OAAO;IACpDC,OAAO,EAAEA,OAAO,IAAIE,SAAS,EAAEF,OAAO,IAAI;EAC5C,CAAC,CAAC,EACF,CAACD,QAAQ,EAAEC,OAAO,EAAEE,SAAS,EAAEH,QAAQ,EAAEG,SAAS,EAAEF,OAAO,CAC7D,CAAC;EACD,oBAAOH,IAAA,CAACH,sBAAsB;IAACS,KAAK,EAAEA,KAAM;IAAAF,QAAA,EAAEA;EAAQ,CAAyB,CAAC;AAClF,CAAC;AAED,OAAO,MAAMG,cAAc,gBAAGZ,IAAI,CAACM,uBAAuB,CAAC;AAC3DM,cAAc,CAACC,WAAW,GAAG,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The inherited CONTROL PRESENTATION contract — the third of Bloom's visual
|
|
5
|
+
* contexts, beside the theme (`theme/use-theme`) and the surface ladder
|
|
6
|
+
* (`styles/surface-levels`).
|
|
7
|
+
*
|
|
8
|
+
* ## What it is for
|
|
9
|
+
*
|
|
10
|
+
* A container that owns a material has to be able to say so once, rather than
|
|
11
|
+
* have every control inside it repeat the material as a prop. A page header's
|
|
12
|
+
* action island owns its glass; the `ButtonGroup` inside it should not need
|
|
13
|
+
* `variant="glass"` written on it, and the items inside THAT should not need it
|
|
14
|
+
* either. Written as props it is three places to keep in step, and the app is
|
|
15
|
+
* the one that pays when they drift.
|
|
16
|
+
*
|
|
17
|
+
* ## Precedence, in one rule
|
|
18
|
+
*
|
|
19
|
+
* an explicit prop > the nearest container > the component's default
|
|
20
|
+
*
|
|
21
|
+
* {@link useInheritedControl} is that rule, and it is a function rather than a
|
|
22
|
+
* convention so the three consumers cannot each interpret it slightly
|
|
23
|
+
* differently. `undefined` is the only value that defers: passing
|
|
24
|
+
* `material="solid"` inside a glass island paints a solid control, which is a
|
|
25
|
+
* decision the caller is allowed to make.
|
|
26
|
+
*
|
|
27
|
+
* ## What deliberately does NOT travel through it
|
|
28
|
+
*
|
|
29
|
+
* Only VISUAL CONFIGURATION. A constraint — `disabled`, a modal's inertness,
|
|
30
|
+
* the user's reduce-transparency preference — is not a default, and the rule
|
|
31
|
+
* above is exactly wrong for one: a descendant must not be able to re-enable an
|
|
32
|
+
* action its group disabled by passing a prop. Constraints keep their own
|
|
33
|
+
* channels (a group's `disabled` is applied by the group when it renders its
|
|
34
|
+
* items; accessibility preferences are read from the OS at the point of use).
|
|
35
|
+
*
|
|
36
|
+
* Nor does STATE. `checked`, `selected`, a field's value and any business datum
|
|
37
|
+
* are owned by the component that holds them; a visual context that also
|
|
38
|
+
* carried state would make every container a place state could leak from.
|
|
39
|
+
*
|
|
40
|
+
* ## Scope
|
|
41
|
+
*
|
|
42
|
+
* One context, two fields, both of which change rarely (a container sets them
|
|
43
|
+
* once at mount). Scroll offsets, focus, form state and the overlay stack each
|
|
44
|
+
* have their own context for the opposite reason — they change often, and a
|
|
45
|
+
* consumer of one must not re-render for a change in another.
|
|
46
|
+
*/
|
|
47
|
+
import { createContext, useContext } from 'react';
|
|
48
|
+
const ControlSurfaceContext = /*#__PURE__*/createContext(null);
|
|
49
|
+
ControlSurfaceContext.displayName = 'BloomControlSurfaceContext';
|
|
50
|
+
|
|
51
|
+
/** @internal The provider `ControlSurface` renders. */
|
|
52
|
+
export const ControlSurfaceProvider = ControlSurfaceContext.Provider;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* The nearest container's presentation, or `null` when there is none.
|
|
56
|
+
*
|
|
57
|
+
* `null` rather than a default object on purpose: a control's own default is
|
|
58
|
+
* the control's to choose (`ButtonGroup` defaults to `solid`, a media overlay's
|
|
59
|
+
* toolbar could default to `glass`), and a context that invented one here would
|
|
60
|
+
* take that choice away by looking like an answer.
|
|
61
|
+
*/
|
|
62
|
+
export function useControlSurface() {
|
|
63
|
+
return useContext(ControlSurfaceContext);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Resolve one field by the precedence rule: `explicit` → container → `fallback`.
|
|
68
|
+
*
|
|
69
|
+
* ```ts
|
|
70
|
+
* const material = useInheritedControl('material', variant, 'solid');
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
export function useInheritedControl(key, explicit, fallback) {
|
|
74
|
+
const inherited = useContext(ControlSurfaceContext);
|
|
75
|
+
return explicit ?? inherited?.[key] ?? fallback;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createContext","useContext","ControlSurfaceContext","displayName","ControlSurfaceProvider","Provider","useControlSurface","useInheritedControl","key","explicit","fallback","inherited"],"sourceRoot":"../../../src","sources":["control-surface/context.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,aAAa,EAAEC,UAAU,QAAQ,OAAO;AAIjD,MAAMC,qBAAqB,gBAAGF,aAAa,CAA6B,IAAI,CAAC;AAC7EE,qBAAqB,CAACC,WAAW,GAAG,4BAA4B;;AAEhE;AACA,OAAO,MAAMC,sBAAsB,GAAGF,qBAAqB,CAACG,QAAQ;;AAEpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAAA,EAA+B;EAC9D,OAAOL,UAAU,CAACC,qBAAqB,CAAC;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASK,mBAAmBA,CACjCC,GAAM,EACNC,QAA4C,EAC5CC,QAAgC,EACR;EACxB,MAAMC,SAAS,GAAGV,UAAU,CAACC,qBAAqB,CAAC;EACnD,OAAOO,QAAQ,IAAIE,SAAS,GAAGH,GAAG,CAAC,IAAIE,QAAQ;AACjD","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ControlSurface","useControlSurface","useInheritedControl"],"sourceRoot":"../../../src","sources":["control-surface/index.ts"],"mappings":";;AAAA,SAASA,cAAc,QAAQ,qBAAkB;AACjD,SAASC,iBAAiB,EAAEC,mBAAmB,QAAQ,cAAW","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["control-surface/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import React, { memo } from 'react';
|
|
3
|
+
import React, { memo, useId, useMemo } from 'react';
|
|
4
4
|
import { View } from 'react-native';
|
|
5
5
|
import { Text } from "../typography/index.js";
|
|
6
6
|
import { Label } from "../label/index.js";
|
|
7
7
|
import { atoms as a } from "../styles/index.js";
|
|
8
8
|
import { TEXT_FIELD_STACK_GAP, useTextFieldPalette } from "../text-field/shared.js";
|
|
9
|
+
import { FieldControlProvider } from "./context.js";
|
|
9
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
11
|
/**
|
|
11
12
|
* The field stack — `Label`, the control, `HintText` — around ANY control.
|
|
@@ -15,6 +16,20 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
15
16
|
* Bloom's `Label`. Unlike `TextField` — which bakes its label/error into the
|
|
16
17
|
* input chrome — `Field` wraps any arbitrary control (a `Switch`, a
|
|
17
18
|
* `SegmentedControl`, a custom picker, etc.).
|
|
19
|
+
*
|
|
20
|
+
* ── IT ASSOCIATES, IT DOES NOT ONLY STACK ───────────────────────────────────
|
|
21
|
+
*
|
|
22
|
+
* The three pieces are wired to the control through `field/context.ts`: the
|
|
23
|
+
* control's id, `aria-describedby` for whichever of description/error is
|
|
24
|
+
* showing, the invalid state, the required state and the disabled state. A
|
|
25
|
+
* control opts in by reading `useFieldControl()`; one that does not renders
|
|
26
|
+
* exactly as before. Ids are generated from `useId` when the caller gives no
|
|
27
|
+
* `nativeID`, so they survive SSR and hydration.
|
|
28
|
+
*
|
|
29
|
+
* `multiple` is the several-controls case — a radio set, a date's three boxes.
|
|
30
|
+
* The field becomes a labelled `group` and stops handing out a control id,
|
|
31
|
+
* because one id on three inputs is invalid and one error described by three
|
|
32
|
+
* inputs is read three times.
|
|
18
33
|
*/
|
|
19
34
|
/** `HintText`: 4px under the control (`gap-1`) plus its own 1px `pt-px`. */
|
|
20
35
|
const hintStyle = {
|
|
@@ -28,38 +43,68 @@ const FieldComponent = function Field({
|
|
|
28
43
|
error,
|
|
29
44
|
required = false,
|
|
30
45
|
disabled = false,
|
|
46
|
+
multiple = false,
|
|
31
47
|
nativeID,
|
|
32
48
|
style,
|
|
33
49
|
testID
|
|
34
50
|
}) {
|
|
35
51
|
const palette = useTextFieldPalette();
|
|
36
52
|
const hasError = typeof error === 'string' && error.length > 0;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
53
|
+
// `useId` is the seed only when the caller gave no id, so an explicit
|
|
54
|
+
// `nativeID` still owns every derived id and a consumer that wired its own
|
|
55
|
+
// `aria-describedby` keeps working.
|
|
56
|
+
const generated = useId().replace(/[^a-zA-Z0-9]/g, '');
|
|
57
|
+
const base = nativeID ?? `bloom-field-${generated}`;
|
|
58
|
+
const labelID = `${base}-label`;
|
|
59
|
+
const descriptionID = `${base}-description`;
|
|
60
|
+
const errorID = `${base}-error`;
|
|
61
|
+
const hasDescription = !hasError && description != null;
|
|
62
|
+
const field = useMemo(() => ({
|
|
63
|
+
controlId: multiple ? undefined : base,
|
|
64
|
+
labelId: label != null ? labelID : undefined,
|
|
65
|
+
// In a `multiple` field the GROUP is described, not each control: an
|
|
66
|
+
// error pointed at by three inputs is announced three times.
|
|
67
|
+
describedBy: multiple ? undefined : hasError ? errorID : hasDescription ? descriptionID : undefined,
|
|
68
|
+
labelText: typeof label === 'string' ? label : undefined,
|
|
69
|
+
invalid: hasError,
|
|
70
|
+
required,
|
|
71
|
+
disabled
|
|
72
|
+
}), [multiple, base, label, labelID, hasError, errorID, hasDescription, descriptionID, required, disabled]);
|
|
73
|
+
return /*#__PURE__*/_jsx(FieldControlProvider, {
|
|
74
|
+
value: field,
|
|
75
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
76
|
+
style: [a.w_full, style],
|
|
77
|
+
testID: testID
|
|
78
|
+
// A group only when it holds several controls. A `group` around one
|
|
79
|
+
// control is a wrapper a screen reader has to step into for nothing,
|
|
80
|
+
// and it competes with the control's own name.
|
|
81
|
+
,
|
|
82
|
+
role: multiple ? 'group' : undefined,
|
|
83
|
+
"aria-labelledby": multiple && label != null ? labelID : undefined,
|
|
84
|
+
"aria-describedby": multiple ? hasError ? errorID : hasDescription ? descriptionID : undefined : undefined,
|
|
85
|
+
children: [label != null ? /*#__PURE__*/_jsx(Label, {
|
|
86
|
+
nativeID: labelID,
|
|
87
|
+
htmlFor: multiple ? null : base,
|
|
88
|
+
required: required,
|
|
89
|
+
disabled: disabled,
|
|
90
|
+
children: label
|
|
91
|
+
}) : null, children, hasError ? /*#__PURE__*/_jsx(Text, {
|
|
92
|
+
variant: "caption-1-medium",
|
|
93
|
+
nativeID: errorID,
|
|
94
|
+
accessibilityRole: "alert",
|
|
95
|
+
style: [hintStyle, {
|
|
96
|
+
color: palette.error
|
|
97
|
+
}],
|
|
98
|
+
children: error
|
|
99
|
+
}) : description != null ? /*#__PURE__*/_jsx(Text, {
|
|
100
|
+
variant: "caption-1-medium",
|
|
101
|
+
nativeID: descriptionID,
|
|
102
|
+
style: [hintStyle, {
|
|
103
|
+
color: disabled ? palette.placeholder : palette.hint
|
|
104
|
+
}],
|
|
105
|
+
children: description
|
|
106
|
+
}) : null]
|
|
107
|
+
})
|
|
63
108
|
});
|
|
64
109
|
};
|
|
65
110
|
export const Field = /*#__PURE__*/memo(FieldComponent);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","memo","View","Text","Label","atoms","a","TEXT_FIELD_STACK_GAP","useTextFieldPalette","jsx","_jsx","jsxs","_jsxs","hintStyle","marginTop","paddingTop","FieldComponent","Field","children","label","description","error","required","disabled","nativeID","style","testID","palette","hasError","length","descriptionID","undefined","
|
|
1
|
+
{"version":3,"names":["React","memo","useId","useMemo","View","Text","Label","atoms","a","TEXT_FIELD_STACK_GAP","useTextFieldPalette","FieldControlProvider","jsx","_jsx","jsxs","_jsxs","hintStyle","marginTop","paddingTop","FieldComponent","Field","children","label","description","error","required","disabled","multiple","nativeID","style","testID","palette","hasError","length","generated","replace","base","labelID","descriptionID","errorID","hasDescription","field","controlId","undefined","labelId","describedBy","labelText","invalid","value","w_full","role","htmlFor","variant","accessibilityRole","color","place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