react-native-terra-ui 0.10.1 → 0.11.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/CHANGELOG.md +29 -0
- package/README.md +8 -4
- package/lib/module/components/button/Button.js +21 -13
- package/lib/module/components/button/Button.js.map +1 -1
- package/lib/module/components/button/index.js.map +1 -1
- package/lib/module/components/divider/Divider.js +127 -0
- package/lib/module/components/divider/Divider.js.map +1 -0
- package/lib/module/components/divider/index.js +4 -0
- package/lib/module/components/divider/index.js.map +1 -0
- package/lib/module/components/index.js +2 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/pressable/index.js +4 -0
- package/lib/module/components/pressable/index.js.map +1 -0
- package/lib/module/components/pressable/variants/PressableScale/index.js +110 -0
- package/lib/module/components/pressable/variants/PressableScale/index.js.map +1 -0
- package/lib/module/context/ThemeProvider.js +5 -5
- package/lib/module/context/ThemeProvider.js.map +1 -1
- package/lib/module/theme/define-config.js +5 -5
- package/lib/module/theme/define-config.js.map +1 -1
- package/lib/module/theme/errors.js +1 -1
- package/lib/module/theme/index.js +2 -2
- package/lib/module/theme/index.js.map +1 -1
- package/lib/module/theme/registry.js +15 -21
- package/lib/module/theme/registry.js.map +1 -1
- package/lib/module/theme/resolve-config.js +68 -68
- package/lib/module/theme/resolve-config.js.map +1 -1
- package/lib/module/theme/runtime.js +11 -11
- package/lib/module/theme/runtime.js.map +1 -1
- package/lib/module/theme/selection-store.js +7 -7
- package/lib/module/theme/selection-store.js.map +1 -1
- package/lib/module/theme/unistyles-adapter.js +1 -1
- package/lib/module/utils/accent-utils.js +24 -24
- package/lib/module/utils/accent-utils.js.map +1 -1
- package/lib/typescript/src/components/button/Button.d.ts +7 -0
- package/lib/typescript/src/components/button/Button.d.ts.map +1 -1
- package/lib/typescript/src/components/button/index.d.ts +1 -1
- package/lib/typescript/src/components/button/index.d.ts.map +1 -1
- package/lib/typescript/src/components/divider/Divider.d.ts +49 -0
- package/lib/typescript/src/components/divider/Divider.d.ts.map +1 -0
- package/lib/typescript/src/components/divider/index.d.ts +3 -0
- package/lib/typescript/src/components/divider/index.d.ts.map +1 -0
- package/lib/typescript/src/components/index.d.ts +2 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/components/pressable/index.d.ts +3 -0
- package/lib/typescript/src/components/pressable/index.d.ts.map +1 -0
- package/lib/typescript/src/components/pressable/variants/PressableScale/index.d.ts +47 -0
- package/lib/typescript/src/components/pressable/variants/PressableScale/index.d.ts.map +1 -0
- package/lib/typescript/src/context/ThemeProvider.d.ts +7 -7
- package/lib/typescript/src/context/ThemeProvider.d.ts.map +1 -1
- package/lib/typescript/src/theme/define-config.d.ts +11 -8
- package/lib/typescript/src/theme/define-config.d.ts.map +1 -1
- package/lib/typescript/src/theme/errors.d.ts +1 -1
- package/lib/typescript/src/theme/index.d.ts +3 -3
- package/lib/typescript/src/theme/index.d.ts.map +1 -1
- package/lib/typescript/src/theme/registry.d.ts +5 -5
- package/lib/typescript/src/theme/registry.d.ts.map +1 -1
- package/lib/typescript/src/theme/resolve-config.d.ts +25 -25
- package/lib/typescript/src/theme/resolve-config.d.ts.map +1 -1
- package/lib/typescript/src/theme/runtime.d.ts +5 -5
- package/lib/typescript/src/theme/runtime.d.ts.map +1 -1
- package/lib/typescript/src/theme/selection-store.d.ts +5 -5
- package/lib/typescript/src/theme/selection-store.d.ts.map +1 -1
- package/lib/typescript/src/theme/types.d.ts +20 -47
- package/lib/typescript/src/theme/types.d.ts.map +1 -1
- package/lib/typescript/src/theme/unistyles-adapter.d.ts +1 -1
- package/lib/typescript/src/utils/accent-utils.d.ts +6 -7
- package/lib/typescript/src/utils/accent-utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/button/Button.tsx +32 -13
- package/src/components/button/index.ts +1 -0
- package/src/components/divider/Divider.tsx +164 -0
- package/src/components/divider/index.ts +7 -0
- package/src/components/index.ts +2 -0
- package/src/components/pressable/index.ts +5 -0
- package/src/components/pressable/variants/PressableScale/index.tsx +166 -0
- package/src/context/ThemeProvider.tsx +10 -10
- package/src/theme/define-config.ts +12 -7
- package/src/theme/errors.ts +1 -1
- package/src/theme/index.ts +6 -8
- package/src/theme/registry.ts +15 -23
- package/src/theme/resolve-config.ts +88 -95
- package/src/theme/runtime.ts +11 -11
- package/src/theme/selection-store.ts +9 -9
- package/src/theme/types.ts +21 -47
- package/src/theme/unistyles-adapter.ts +1 -1
- package/src/utils/accent-utils.ts +25 -25
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* those has to import the other.
|
|
5
5
|
*
|
|
6
6
|
* Holds two things, both private to `theme/`:
|
|
7
|
-
* - the installed {@link NormalizedThemeConfig} — immutable; every
|
|
7
|
+
* - the installed {@link NormalizedThemeConfig} — immutable; every theme
|
|
8
8
|
* selection is re-resolved from it, never layered on a previous result;
|
|
9
|
-
* - the selection snapshot (`
|
|
9
|
+
* - the selection snapshot (`themeName`, `mode`) behind a `useSyncExternalStore`
|
|
10
10
|
* compatible subscribe/get pair. The snapshot object keeps its identity until
|
|
11
11
|
* a value actually changes, so subscribers only re-render on real changes.
|
|
12
12
|
*
|
|
@@ -18,10 +18,10 @@ import type { ThemeMode } from "./types.js";
|
|
|
18
18
|
export declare const getInstalledConfig: () => NormalizedThemeConfig;
|
|
19
19
|
/** @internal Replaces the installed config; only `registry.ts` should call this. */
|
|
20
20
|
export declare function setInstalledConfig(config: NormalizedThemeConfig): void;
|
|
21
|
-
/** The current runtime selection: which
|
|
21
|
+
/** The current runtime selection: which theme is applied and how the scheme is chosen. */
|
|
22
22
|
export interface ThemeSelection {
|
|
23
|
-
/** Applied
|
|
24
|
-
readonly
|
|
23
|
+
/** Applied theme name, or `undefined` for the base themes. */
|
|
24
|
+
readonly themeName: string | undefined;
|
|
25
25
|
/** `system` follows the OS appearance; `light` / `dark` pin a scheme. */
|
|
26
26
|
readonly mode: ThemeMode;
|
|
27
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selection-store.d.ts","sourceRoot":"","sources":["../../../../src/theme/selection-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,KAAK,qBAAqB,EAAuB,MAAM,qBAAkB,CAAC;AACnF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAS,CAAC;AAUzC,0DAA0D;AAC1D,eAAO,MAAM,kBAAkB,QAAO,qBAAwC,CAAC;AAE/E,oFAAoF;AACpF,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,qBAAqB,GAAG,IAAI,CAEtE;AAID,
|
|
1
|
+
{"version":3,"file":"selection-store.d.ts","sourceRoot":"","sources":["../../../../src/theme/selection-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,KAAK,qBAAqB,EAAuB,MAAM,qBAAkB,CAAC;AACnF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAS,CAAC;AAUzC,0DAA0D;AAC1D,eAAO,MAAM,kBAAkB,QAAO,qBAAwC,CAAC;AAE/E,oFAAoF;AACpF,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,qBAAqB,GAAG,IAAI,CAEtE;AAID,0FAA0F;AAC1F,MAAM,WAAW,cAAc;IAC7B,8DAA8D;IAC9D,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,yEAAyE;IACzE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;CAC1B;AAMD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,QAAO,cAA2B,CAAC;AAEjE,wEAAwE;AACxE,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAKxE;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,IAAI,CASzE"}
|
|
@@ -139,10 +139,10 @@ declare global {
|
|
|
139
139
|
namespace TerraUI {
|
|
140
140
|
/**
|
|
141
141
|
* Augment to declare app-specific semantic color keys. Declared keys become
|
|
142
|
-
* valid in `shared` /
|
|
142
|
+
* valid in `shared` / named theme tokens, `theme.color`, and
|
|
143
143
|
* component color props. Keys must not collide with built-in canonical or
|
|
144
144
|
* deprecated names. Type augmentation alone cannot prove a value exists at
|
|
145
|
-
* runtime — provide every declared color through `shared` or
|
|
145
|
+
* runtime — provide every declared color through `shared` or each theme's light/dark entries.
|
|
146
146
|
*
|
|
147
147
|
* @example
|
|
148
148
|
* declare global {
|
|
@@ -229,41 +229,19 @@ export type Scheme = "light" | "dark";
|
|
|
229
229
|
* `light` / `dark` pin a scheme and stop following the system.
|
|
230
230
|
*/
|
|
231
231
|
export type ThemeMode = "system" | "light" | "dark";
|
|
232
|
-
/**
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
* `accent.solid.bg` in `overrides` when an exact fill is required.
|
|
236
|
-
*/
|
|
237
|
-
export interface AccentSeed {
|
|
238
|
-
/** Opaque six-digit sRGB hex (`#rrggbb`). Other formats are rejected at configure time. */
|
|
232
|
+
/** Explicit theme tokens plus a seed-generated accent palette. */
|
|
233
|
+
export type ThemeSeed = TerraThemeOverride & {
|
|
234
|
+
/** Opaque six-digit hex color. Explicit `color` values win over generation. */
|
|
239
235
|
seed: string;
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
* override beats every generated value.
|
|
244
|
-
*/
|
|
245
|
-
overrides?: Partial<ThemeColor>;
|
|
246
|
-
}
|
|
247
|
-
/**
|
|
248
|
-
* One scheme's accent input:
|
|
249
|
-
* - a color string — equivalent to `{ seed: value }`;
|
|
250
|
-
* - `{ seed, overrides }` — generation with explicit exceptions;
|
|
251
|
-
* - a full {@link TerraThemeOverride} — skips generation (expert path).
|
|
252
|
-
*/
|
|
253
|
-
export type AccentSchemeInput = string | AccentSeed | TerraThemeOverride;
|
|
254
|
-
/**
|
|
255
|
-
* A named, runtime-switchable overlay on each scheme. A missing scheme leaves
|
|
256
|
-
* that scheme unmodified; the other scheme's seed is never copied implicitly.
|
|
257
|
-
*/
|
|
258
|
-
export type Accent = Partial<Record<Scheme, AccentSchemeInput>>;
|
|
259
|
-
/** @deprecated Use {@link Accent} — a color string per scheme. */
|
|
260
|
-
export type AccentShorthand = Record<Scheme, string>;
|
|
261
|
-
/** @deprecated Use {@link Accent} — a {@link TerraThemeOverride} per scheme. */
|
|
262
|
-
export type AccentOverride = Partial<Record<Scheme, TerraThemeOverride>>;
|
|
236
|
+
};
|
|
237
|
+
/** A seed shorthand, explicit theme tokens, or both via `{ seed, color, ... }`. */
|
|
238
|
+
export type ThemeSchemeInput = string | ThemeSeed | TerraThemeOverride;
|
|
263
239
|
/**
|
|
264
|
-
*
|
|
265
|
-
*
|
|
240
|
+
* A complete named light/dark theme. Missing schemes inherit defaults + shared;
|
|
241
|
+
* seeds are never copied from the other scheme.
|
|
266
242
|
*/
|
|
243
|
+
export type NamedTheme = Partial<Record<Scheme, ThemeSchemeInput>>;
|
|
244
|
+
/** Output of the legacy normalizeAccent helper. */
|
|
267
245
|
export interface NormalizedAccent {
|
|
268
246
|
light: DeepPartial<TerraTheme>;
|
|
269
247
|
dark: DeepPartial<TerraTheme>;
|
|
@@ -357,13 +335,8 @@ export interface ComponentDefaults {
|
|
|
357
335
|
export interface TerraConfig {
|
|
358
336
|
/** Scheme-agnostic token overrides, applied to both light and dark themes. */
|
|
359
337
|
shared?: TerraThemeOverride;
|
|
360
|
-
/**
|
|
361
|
-
|
|
362
|
-
light?: TerraThemeOverride;
|
|
363
|
-
dark?: TerraThemeOverride;
|
|
364
|
-
};
|
|
365
|
-
/** Runtime-switchable named overrides (hue shorthand or full partial). */
|
|
366
|
-
accents?: Record<string, Accent>;
|
|
338
|
+
/** Named light/dark themes applied over defaults + shared. */
|
|
339
|
+
themes?: Record<string, NamedTheme>;
|
|
367
340
|
/**
|
|
368
341
|
* App-provided icon overrides. Semantic icons (`navigation.*`, `status.*`)
|
|
369
342
|
* fall back to the built-in defaults when omitted; app icons (`add`, etc.)
|
|
@@ -376,8 +349,8 @@ export interface TerraConfig {
|
|
|
376
349
|
* `resizeMode`. Wrap third-party components to match `TerraImageProps`.
|
|
377
350
|
*/
|
|
378
351
|
image?: TerraImageComponent;
|
|
379
|
-
/** Name of the
|
|
380
|
-
|
|
352
|
+
/** Name of the theme (from `themes`) to apply by default. */
|
|
353
|
+
defaultTheme?: string;
|
|
381
354
|
/** Per-component default props (e.g. `{ button: { radius: 'full' } }`). */
|
|
382
355
|
components?: ComponentDefaults;
|
|
383
356
|
/**
|
|
@@ -392,13 +365,13 @@ export interface TerraConfig {
|
|
|
392
365
|
initialScheme?: Scheme;
|
|
393
366
|
}
|
|
394
367
|
/** The subset of {@link TerraConfig} that affects resolved theme tokens. */
|
|
395
|
-
export type TerraThemeInput = Pick<TerraConfig, "shared" | "
|
|
368
|
+
export type TerraThemeInput = Pick<TerraConfig, "shared" | "themes" | "defaultTheme">;
|
|
396
369
|
/** Options for pure theme creation. */
|
|
397
370
|
export interface CreateTerraThemesOptions {
|
|
398
371
|
/**
|
|
399
|
-
*
|
|
400
|
-
* with no
|
|
372
|
+
* Named theme to select. Omitted → `defaultTheme`; `null` → the base themes
|
|
373
|
+
* with no named theme. An unknown name throws.
|
|
401
374
|
*/
|
|
402
|
-
|
|
375
|
+
theme?: string | null;
|
|
403
376
|
}
|
|
404
377
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/theme/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAe,CAAC;A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MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACpC;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAC3D;;;;OAIG;IACH,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B,6DAA6D;IAC7D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,8EAA8E;IAC9E,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mFAAmF;IACnF,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,4EAA4E;AAC5E,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,WAAW,EAAE,QAAQ,GAAG,QAAQ,GAAG,cAAc,CAAC,CAAC;AAEtF,uCAAuC;AACvC,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB"}
|
|
@@ -20,7 +20,7 @@ export declare function configureUnistyles({ themes, mode, }: {
|
|
|
20
20
|
* runtime holds the new `light` theme and the previous `dark` theme. Callers
|
|
21
21
|
* publish registry/selection state only after this returns, so on a throw Terra
|
|
22
22
|
* still reports the previous selection; calling the same command again with the
|
|
23
|
-
* previous selection (e.g. `
|
|
23
|
+
* previous selection (e.g. `setTheme(getCurrentTheme() ?? null)`) rewrites
|
|
24
24
|
* both themes and restores consistency. No automatic rollback is attempted.
|
|
25
25
|
*/
|
|
26
26
|
export declare function updateThemes(themes: Record<Scheme, TerraTheme>): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { NamedTheme, NormalizedAccent, Scheme } from "../theme/types";
|
|
2
2
|
import { type AccentGenerationContext } from "./accent-generator.js";
|
|
3
3
|
/**
|
|
4
4
|
* The generation context of a built-in default theme: its four ordinary
|
|
@@ -7,11 +7,10 @@ import { type AccentGenerationContext } from "./accent-generator.js";
|
|
|
7
7
|
*/
|
|
8
8
|
export declare function defaultAccentContext(scheme: Scheme): AccentGenerationContext;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* pass through unchanged. Pure and independent of the registry.
|
|
10
|
+
* @deprecated Prefer createTerraThemes for complete theme resolution.
|
|
11
|
+
* Generates per-scheme patches without shared config. Explicit unseeded patches
|
|
12
|
+
* pass through unchanged; seeded entries generate against their own surface and
|
|
13
|
+
* color tokens and carry the remainder of the patch through unresolved.
|
|
15
14
|
*/
|
|
16
|
-
export declare function normalizeAccent(accent:
|
|
15
|
+
export declare function normalizeAccent(accent: NamedTheme): NormalizedAccent;
|
|
17
16
|
//# sourceMappingURL=accent-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accent-utils.d.ts","sourceRoot":"","sources":["../../../../src/utils/accent-utils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"accent-utils.d.ts","sourceRoot":"","sources":["../../../../src/utils/accent-utils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,UAAU,EACV,gBAAgB,EAChB,MAAM,EAIP,MAAM,cAAc,CAAC;AACtB,OAAO,EAEL,KAAK,uBAAuB,EAG7B,MAAM,uBAAoB,CAAC;AAG5B;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,uBAAuB,CAK5E;AAmCD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,UAAU,GAAG,gBAAgB,CAKpE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Children, type ComponentRef, createContext, forwardRef, type ReactNode, useContext } from "react";
|
|
2
|
-
import type { PressableProps } from "react-native";
|
|
3
|
-
import { Pressable } from "react-native";
|
|
2
|
+
import type { Pressable, PressableProps, PressableStateCallbackType } from "react-native";
|
|
4
3
|
|
|
5
4
|
import { StyleSheet, useUnistyles } from "react-native-unistyles";
|
|
6
5
|
|
|
@@ -9,12 +8,17 @@ import type { ColorToken, FontWeightToken, TerraIconName, TerraTheme, TextVarian
|
|
|
9
8
|
import { readableOn } from "#utils/color-utils";
|
|
10
9
|
import { resolveThemeColor } from "#utils/resolve-theme-color";
|
|
11
10
|
import { Icon } from "../icon";
|
|
11
|
+
import { PressableScale } from "../pressable";
|
|
12
12
|
import { Spinner } from "../spinner";
|
|
13
13
|
import { Text } from "../text";
|
|
14
14
|
|
|
15
15
|
export type ButtonVariant = "primary" | "secondary" | "outline" | "ghost" | "danger";
|
|
16
16
|
export type ButtonSize = "sm" | "md" | "lg";
|
|
17
17
|
export type ButtonRadius = "none" | "sm" | "md" | "lg" | "xl" | "full";
|
|
18
|
+
export type ButtonAnimation = "scale" | "opacity" | "none";
|
|
19
|
+
|
|
20
|
+
/** Matches pressto's `minScale` default — enough to feel, not enough to distract. */
|
|
21
|
+
const PRESSED_SCALE = 0.96;
|
|
18
22
|
|
|
19
23
|
export interface ButtonProps extends Omit<PressableProps, "style" | "children" | "disabled"> {
|
|
20
24
|
variant?: ButtonVariant;
|
|
@@ -31,6 +35,12 @@ export interface ButtonProps extends Omit<PressableProps, "style" | "children" |
|
|
|
31
35
|
fullWidth?: boolean;
|
|
32
36
|
/** Remove the button's built-in horizontal padding. */
|
|
33
37
|
compact?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Press feedback. `'scale'` shrinks the button to 0.96, `'opacity'` dims it
|
|
40
|
+
* to `opacity.pressed`, `'none'` leaves it static. The two are mutually
|
|
41
|
+
* exclusive. Defaults to `'scale'`.
|
|
42
|
+
*/
|
|
43
|
+
animation?: ButtonAnimation;
|
|
34
44
|
/**
|
|
35
45
|
* Overrides the variant's resolved background color (theme token or raw
|
|
36
46
|
* CSS color). The label/icon/spinner foreground automatically switches to
|
|
@@ -182,6 +192,7 @@ const ButtonRoot = forwardRef<ComponentRef<typeof Pressable>, ButtonProps>(funct
|
|
|
182
192
|
isIconOnly = false,
|
|
183
193
|
fullWidth = true,
|
|
184
194
|
compact = false,
|
|
195
|
+
animation = "scale",
|
|
185
196
|
background,
|
|
186
197
|
children,
|
|
187
198
|
onPress,
|
|
@@ -206,27 +217,35 @@ const ButtonRoot = forwardRef<ComponentRef<typeof Pressable>, ButtonProps>(funct
|
|
|
206
217
|
style?: PressableProps["style"];
|
|
207
218
|
};
|
|
208
219
|
|
|
220
|
+
const ownStyles = [
|
|
221
|
+
styles.base,
|
|
222
|
+
{ backgroundColor: bg, borderColor: border, borderWidth },
|
|
223
|
+
compact ? styles.compact : null,
|
|
224
|
+
isDisabled ? { opacity: theme.opacity.disabled } : null,
|
|
225
|
+
];
|
|
226
|
+
// Only the function form forces a re-render per touch, so keep the array form
|
|
227
|
+
// whenever the caller's style doesn't need the pressed state.
|
|
228
|
+
const style =
|
|
229
|
+
typeof externalStyle === "function"
|
|
230
|
+
? (state: PressableStateCallbackType) => [...ownStyles, externalStyle(state)]
|
|
231
|
+
: [...ownStyles, externalStyle];
|
|
232
|
+
|
|
209
233
|
return (
|
|
210
234
|
<ButtonContext.Provider value={{ color: fg, size }}>
|
|
211
|
-
<
|
|
235
|
+
<PressableScale
|
|
212
236
|
ref={ref}
|
|
213
237
|
onPress={blocked ? undefined : onPress}
|
|
214
|
-
|
|
238
|
+
isDisabled={blocked}
|
|
239
|
+
minScale={animation === "scale" ? PRESSED_SCALE : 1}
|
|
240
|
+
pressedOpacity={animation === "opacity" ? theme.opacity.pressed : undefined}
|
|
215
241
|
accessibilityRole="button"
|
|
216
242
|
accessibilityState={{ disabled: blocked, busy: isLoading }}
|
|
217
243
|
{...pressableRest}
|
|
218
|
-
style={
|
|
219
|
-
styles.base,
|
|
220
|
-
{ backgroundColor: bg, borderColor: border, borderWidth },
|
|
221
|
-
compact ? styles.compact : null,
|
|
222
|
-
state.pressed && !blocked ? { opacity: theme.opacity.pressed } : null,
|
|
223
|
-
isDisabled ? { opacity: theme.opacity.disabled } : null,
|
|
224
|
-
typeof externalStyle === "function" ? externalStyle(state) : externalStyle,
|
|
225
|
-
]}
|
|
244
|
+
style={style}
|
|
226
245
|
>
|
|
227
246
|
{isLoading && <Spinner size="sm" color={fg} />}
|
|
228
247
|
{renderChildren(children)}
|
|
229
|
-
</
|
|
248
|
+
</PressableScale>
|
|
230
249
|
</ButtonContext.Provider>
|
|
231
250
|
);
|
|
232
251
|
});
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { Children, type ComponentRef, forwardRef, type ReactNode } from "react";
|
|
2
|
+
import { StyleSheet as RNStyleSheet, View, type ViewProps } from "react-native";
|
|
3
|
+
|
|
4
|
+
import { StyleSheet, useUnistyles } from "react-native-unistyles";
|
|
5
|
+
|
|
6
|
+
import type { ColorToken, SpacingKey } from "#theme/types";
|
|
7
|
+
import { resolveThemeColor } from "#utils/resolve-theme-color";
|
|
8
|
+
import { Text } from "../text";
|
|
9
|
+
|
|
10
|
+
export type DividerOrientation = "horizontal" | "vertical";
|
|
11
|
+
export type DividerLabelAlign = "start" | "center" | "end";
|
|
12
|
+
|
|
13
|
+
/** `number | 'hairline'`, mirroring `Box`'s `borderWidth`. */
|
|
14
|
+
export type DividerThickness = number | "hairline";
|
|
15
|
+
|
|
16
|
+
export interface DividerProps extends ViewProps {
|
|
17
|
+
/** Rule direction. Defaults to `'horizontal'`. */
|
|
18
|
+
orientation?: DividerOrientation;
|
|
19
|
+
/** Rule color. Defaults to `'border.default'`. */
|
|
20
|
+
color?: ColorToken;
|
|
21
|
+
/**
|
|
22
|
+
* Rule weight. `'hairline'` is the thinnest line the display can draw —
|
|
23
|
+
* a true 1px rule at any density. Defaults to `'hairline'`.
|
|
24
|
+
*/
|
|
25
|
+
thickness?: DividerThickness;
|
|
26
|
+
/**
|
|
27
|
+
* Symmetric margin on the cross axis — above and below a horizontal rule,
|
|
28
|
+
* either side of a vertical one. Defaults to `undefined` (no margin).
|
|
29
|
+
*/
|
|
30
|
+
spacing?: SpacingKey;
|
|
31
|
+
/**
|
|
32
|
+
* Where the label sits along the rule. Ignored without `children`.
|
|
33
|
+
* Defaults to `'center'`.
|
|
34
|
+
*/
|
|
35
|
+
labelAlign?: DividerLabelAlign;
|
|
36
|
+
/**
|
|
37
|
+
* An optional label, drawn with the rule running either side of it. Strings
|
|
38
|
+
* and numbers are wrapped in `Text` automatically. Horizontal only — a
|
|
39
|
+
* vertical divider ignores children.
|
|
40
|
+
*/
|
|
41
|
+
children?: ReactNode;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function resolveThickness(thickness: DividerThickness): number {
|
|
45
|
+
return thickness === "hairline" ? RNStyleSheet.hairlineWidth : thickness;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function renderLabel(children: ReactNode): ReactNode {
|
|
49
|
+
return Children.map(children, (child) => {
|
|
50
|
+
if (typeof child === "string") {
|
|
51
|
+
return child.trim().length > 0 ? (
|
|
52
|
+
<Text variant="label-sm" color="text.secondary">
|
|
53
|
+
{child}
|
|
54
|
+
</Text>
|
|
55
|
+
) : null;
|
|
56
|
+
}
|
|
57
|
+
if (typeof child === "number") {
|
|
58
|
+
return (
|
|
59
|
+
<Text variant="label-sm" color="text.secondary">
|
|
60
|
+
{child}
|
|
61
|
+
</Text>
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
return child;
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* A rule that separates content.
|
|
70
|
+
*
|
|
71
|
+
* Decorative by default — screen readers skip it, because the separation it
|
|
72
|
+
* expresses is already carried by the content either side. A labelled divider
|
|
73
|
+
* keeps its label readable.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* <Divider />
|
|
77
|
+
* <Divider spacing="4" />
|
|
78
|
+
* <Divider orientation="vertical" />
|
|
79
|
+
* <Divider>OR</Divider>
|
|
80
|
+
*/
|
|
81
|
+
export const Divider = forwardRef<ComponentRef<typeof View>, DividerProps>(function Divider(
|
|
82
|
+
{
|
|
83
|
+
orientation = "horizontal",
|
|
84
|
+
color = "border.default",
|
|
85
|
+
thickness = "hairline",
|
|
86
|
+
spacing,
|
|
87
|
+
labelAlign = "center",
|
|
88
|
+
children,
|
|
89
|
+
style,
|
|
90
|
+
...rest
|
|
91
|
+
},
|
|
92
|
+
ref
|
|
93
|
+
) {
|
|
94
|
+
const { theme } = useUnistyles();
|
|
95
|
+
const isVertical = orientation === "vertical";
|
|
96
|
+
// A vertical rule has no room to run either side of a label, so children are
|
|
97
|
+
// dropped rather than silently laid out in a direction they were not written for.
|
|
98
|
+
const label = isVertical ? null : renderLabel(children);
|
|
99
|
+
const hasLabel = Children.count(label) > 0;
|
|
100
|
+
|
|
101
|
+
const lineColor = resolveThemeColor(color, theme);
|
|
102
|
+
const weight = resolveThickness(thickness);
|
|
103
|
+
const margin = spacing !== undefined ? theme.spacing[spacing] : undefined;
|
|
104
|
+
|
|
105
|
+
const line = {
|
|
106
|
+
backgroundColor: lineColor,
|
|
107
|
+
...(isVertical ? { width: weight } : { height: weight }),
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
if (!hasLabel) {
|
|
111
|
+
return (
|
|
112
|
+
<View
|
|
113
|
+
ref={ref}
|
|
114
|
+
accessibilityElementsHidden
|
|
115
|
+
importantForAccessibility="no-hide-descendants"
|
|
116
|
+
aria-hidden
|
|
117
|
+
{...rest}
|
|
118
|
+
style={[
|
|
119
|
+
styles.rule,
|
|
120
|
+
line,
|
|
121
|
+
margin !== undefined
|
|
122
|
+
? isVertical
|
|
123
|
+
? { marginHorizontal: margin }
|
|
124
|
+
: { marginVertical: margin }
|
|
125
|
+
: null,
|
|
126
|
+
style,
|
|
127
|
+
]}
|
|
128
|
+
/>
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// The label stays readable, so the wrapper is not hidden from accessibility —
|
|
133
|
+
// only the two rule segments are, and each is a bare decorative View.
|
|
134
|
+
return (
|
|
135
|
+
<View
|
|
136
|
+
ref={ref}
|
|
137
|
+
{...rest}
|
|
138
|
+
style={[styles.labelledRoot, margin !== undefined ? { marginVertical: margin } : null, style]}
|
|
139
|
+
>
|
|
140
|
+
{labelAlign !== "start" && <View style={[styles.labelledSegment, line]} />}
|
|
141
|
+
{label}
|
|
142
|
+
{labelAlign !== "end" && <View style={[styles.labelledSegment, line]} />}
|
|
143
|
+
</View>
|
|
144
|
+
);
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
// ─── Styles ───────────────────────────────────────────────────────────────────
|
|
148
|
+
|
|
149
|
+
const styles = StyleSheet.create((theme) => ({
|
|
150
|
+
// Stretches across its parent's cross axis: full width in a column, full
|
|
151
|
+
// height in a row. The `line` style supplies the other dimension.
|
|
152
|
+
rule: {
|
|
153
|
+
alignSelf: "stretch",
|
|
154
|
+
},
|
|
155
|
+
labelledRoot: {
|
|
156
|
+
alignSelf: "stretch",
|
|
157
|
+
flexDirection: "row",
|
|
158
|
+
alignItems: "center",
|
|
159
|
+
gap: theme.spacing["3"],
|
|
160
|
+
},
|
|
161
|
+
labelledSegment: {
|
|
162
|
+
flex: 1,
|
|
163
|
+
},
|
|
164
|
+
}));
|
package/src/components/index.ts
CHANGED
|
@@ -2,12 +2,14 @@ export * from "./avatar";
|
|
|
2
2
|
export * from "./box";
|
|
3
3
|
export * from "./button";
|
|
4
4
|
export * from "./chip";
|
|
5
|
+
export * from "./divider";
|
|
5
6
|
export * from "./empty-state";
|
|
6
7
|
export * from "./header";
|
|
7
8
|
export * from "./icon";
|
|
8
9
|
export * from "./image";
|
|
9
10
|
export * from "./page-indicator";
|
|
10
11
|
export * from "./portal";
|
|
12
|
+
export * from "./pressable";
|
|
11
13
|
export * from "./screen";
|
|
12
14
|
export * from "./slot";
|
|
13
15
|
export * from "./spinner";
|