@rific/auto-paper 0.9.2 → 0.9.4
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 +53 -4
- package/dist/index.d.mts +54 -34
- package/dist/index.d.ts +54 -34
- package/dist/index.js +350 -329
- package/dist/index.mjs +326 -308
- package/package.json +1 -1
- package/src/components/AutoAppearancePicker.tsx +17 -0
- package/src/components/AutoPalettePicker.tsx +21 -0
- package/src/components/HarmonyPicker.tsx +44 -34
- package/src/components/PalettePicker.tsx +14 -1
- package/src/index.ts +3 -0
- package/src/utils/resolveSeedColor.ts +8 -0
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ Adaptive theming for [`react-native-paper`](https://callstack.github.io/react-na
|
|
|
11
11
|
- Tinted surface, surfaceVariant, outline, and elevation levels derived from the seed
|
|
12
12
|
- Fixed `success`/`warning`/`danger` semantic color roles (each with `on*`/`*Container` variants) alongside MD3's built-in `error`
|
|
13
13
|
- Optional Redux slice for wiring appearance and color into your store
|
|
14
|
-
- Wrapper components (`Appbar`, `AppearancePicker`, `BlurView`, `BottomNavigation`, `Button`, `Chip`, `ColorPicker`, `Dialog`, `FAB`, `HarmonyPicker`, `IconButton`, `Menu`, `PalettePicker`, `TextInput`) with prop defaults via context
|
|
14
|
+
- Wrapper components (`Appbar`, `AppearancePicker`, `AutoAppearancePicker`, `AutoPalettePicker`, `BlurView`, `BottomNavigation`, `Button`, `Chip`, `ColorPicker`, `Dialog`, `FAB`, `HarmonyPicker`, `IconButton`, `Menu`, `PalettePicker`, `TextInput`) with prop defaults via context
|
|
15
15
|
- All color utilities exported for standalone use
|
|
16
16
|
|
|
17
17
|
## Installation
|
|
@@ -327,6 +327,39 @@ function SettingsScreen() {
|
|
|
327
327
|
| `showLabels` | `boolean` | Set `false` for icon-only segments, useful in tight layouts where "System" would truncate. `accessibilityLabel` is always set regardless, so screen readers still announce the full word. Defaults to `true` |
|
|
328
328
|
| `icons` | `AppearanceIcons` | Per-value icon overrides: pass just the ones you want to change (e.g. `{ system: 'theme-light-dark' }`), merged over the defaults (`monitor` / `white-balance-sunny` / `weather-night`) |
|
|
329
329
|
|
|
330
|
+
### `AutoAppearancePicker`
|
|
331
|
+
|
|
332
|
+
`AppearancePicker` wired straight to the `Provider`'s own `ThemeSettings` — for the common case where the appearance being edited IS the whole app's own theme. Reads/writes `useThemeSettings()` internally, so it takes neither `value` nor `onChange`; every other `AppearancePicker` prop still passes through. Reach for the plain `AppearancePicker` instead when it needs to be controlled by something other than the global theme (a local preview before committing, one-off UI unrelated to `Provider`).
|
|
333
|
+
|
|
334
|
+
```tsx
|
|
335
|
+
import { AutoAppearancePicker } from '@rific/auto-paper'
|
|
336
|
+
|
|
337
|
+
function SettingsScreen() {
|
|
338
|
+
return <AutoAppearancePicker showLabels={false} />
|
|
339
|
+
}
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
### `HarmonyPicker`
|
|
343
|
+
|
|
344
|
+
Switches between the 6 `ColorHarmony` modes (`triadic`, `split-complementary`, `analogous`, `square`, `complementary`, `double-split`) via `react-native-paper`'s `SegmentedButtons`. `PalettePicker` can embed this same picker in its own dialog instead of standing alone — see `onHarmonyChange` below.
|
|
345
|
+
|
|
346
|
+
```tsx
|
|
347
|
+
import { HarmonyPicker, useThemeSettings } from '@rific/auto-paper'
|
|
348
|
+
|
|
349
|
+
function SettingsScreen() {
|
|
350
|
+
const { settings: { harmony }, set } = useThemeSettings()
|
|
351
|
+
return <HarmonyPicker value={harmony} onChange={(h) => set({ harmony: h })} showLabels={false} />
|
|
352
|
+
}
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
| Prop | Type | Description |
|
|
356
|
+
|---|---|---|
|
|
357
|
+
| `value` | `ColorHarmony` | Currently selected harmony |
|
|
358
|
+
| `onChange` | `(harmony: ColorHarmony) => void` | Called when a segment is tapped |
|
|
359
|
+
| `showLabels` | `boolean` | Set `false` for icon-only segments. Also lowers Paper's default 76px-per-segment minimum width down to 0, so all 6 segments can always shrink to fit — however narrow the container, they resize down together instead of overflowing it. `accessibilityLabel` is always set regardless, so screen readers still announce the full harmony name either way. Defaults to `true` |
|
|
360
|
+
| `checkedColor` / `uncheckedColor` | `string` | Icon color for the checked and unchecked segments, matching Paper's own segmented-button vocabulary |
|
|
361
|
+
| `checkedContainerColor` / `uncheckedContainerColor` | `string` | Fill color for the checked and unchecked segments. Omit any of these four color props to fall back to Paper's default segmented-button styling |
|
|
362
|
+
|
|
330
363
|
### `Appbar`
|
|
331
364
|
|
|
332
365
|
A thin wrapper around `react-native-paper`'s `Appbar` that automatically syncs `StatusBar` background color and bar style to the current theme surface color.
|
|
@@ -432,14 +465,14 @@ import { IconButton } from '@rific/auto-paper'
|
|
|
432
465
|
|
|
433
466
|
### `PalettePicker`
|
|
434
467
|
|
|
435
|
-
Like `ColorPicker`, but each swatch (and the trigger itself) renders the seed's full triadic palette as a 3-wedge pie instead of a flat color, so you see the whole result before picking.
|
|
468
|
+
Like `ColorPicker`, but each swatch (and the trigger itself) renders the seed's full triadic palette as a 3-wedge pie instead of a flat color, so you see the whole result before picking. Pass `onHarmonyChange` to fold a compact, icon-only `HarmonyPicker` row into the same dialog, above the swatch grid — every swatch's own pie reshapes live as harmony changes, so there's one place to tune both instead of two separate controls. Omit it and this renders exactly as a plain color-only picker always has.
|
|
436
469
|
|
|
437
470
|
```tsx
|
|
438
471
|
import { PalettePicker, useThemeSettings } from '@rific/auto-paper'
|
|
439
472
|
|
|
440
473
|
function SettingsScreen() {
|
|
441
474
|
const { settings: { color, harmony }, set } = useThemeSettings()
|
|
442
|
-
return <PalettePicker value={color} harmony={harmony} onChange={(c) => set({ color: c })} />
|
|
475
|
+
return <PalettePicker value={color} harmony={harmony} onChange={(c) => set({ color: c })} onHarmonyChange={(h) => set({ harmony: h })} />
|
|
443
476
|
}
|
|
444
477
|
```
|
|
445
478
|
|
|
@@ -448,10 +481,23 @@ function SettingsScreen() {
|
|
|
448
481
|
| `value` | `string` | Currently selected seed color |
|
|
449
482
|
| `onChange` | `(color: string) => void` | Called with the seed color when a swatch is tapped |
|
|
450
483
|
| `harmony` | `ColorHarmony` | Harmony used to compute each swatch's preview palette. Defaults to `'split-complementary'` |
|
|
484
|
+
| `onHarmonyChange` | `(harmony: ColorHarmony) => void` | Opt-in: passing this renders the `HarmonyPicker` row inside the dialog. Gated on the callback itself rather than a separate boolean, so there's no way to pass one without the other |
|
|
451
485
|
| `weights` | `PaletteWeights` | Relative size of each wedge: `{ primary, secondary, tertiary }`. Defaults to `{ primary: 2, secondary: 1, tertiary: 1 }` (primary half the pie, secondary/tertiary a quarter each). Values are normalized, so any positive ratio works; keep each share at or under half the total so its wedge stays a single slice |
|
|
452
486
|
| `colors` | `SeedColor[]` | Seed color swatches to offer. Defaults to the same set as `ColorPicker` |
|
|
453
487
|
| `blur` | `boolean` | Overrides the ambient blur setting for this component's dialog |
|
|
454
488
|
|
|
489
|
+
### `AutoPalettePicker`
|
|
490
|
+
|
|
491
|
+
`PalettePicker` wired straight to the `Provider`'s own `ThemeSettings` — both color AND harmony — for the common case where the palette being edited IS the whole app's own theme. Reads/writes `useThemeSettings()` internally (narrowing `ThemeSettings.color`'s `string | TriadicPalette` down to a plain string via `resolveSeedColor`), so it takes none of `value`/`onChange`/`harmony`/`onHarmonyChange`; `weights`/`colors`/`blur` still pass through. Reach for the plain `PalettePicker` instead when it needs to be controlled by something other than the global theme.
|
|
492
|
+
|
|
493
|
+
```tsx
|
|
494
|
+
import { AutoPalettePicker } from '@rific/auto-paper'
|
|
495
|
+
|
|
496
|
+
function SettingsScreen() {
|
|
497
|
+
return <AutoPalettePicker />
|
|
498
|
+
}
|
|
499
|
+
```
|
|
500
|
+
|
|
455
501
|
### `PaperDefaults` / `usePaperDefaults`
|
|
456
502
|
|
|
457
503
|
`PaperDefaults` is the type for the `defaults` prop on `Provider`:
|
|
@@ -508,7 +554,7 @@ const appearance = useSelector((state: RootState) => selectThemeAppearance(state
|
|
|
508
554
|
### Color utilities
|
|
509
555
|
|
|
510
556
|
```ts
|
|
511
|
-
import { getTriadicPalette, getThirdColor, getBlendedColor, getColorRoles, getContrastColor, isDarkColor, getRgb, getHex, getTonalColor, getTintTextColor } from '@rific/auto-paper'
|
|
557
|
+
import { getTriadicPalette, getThirdColor, getBlendedColor, getColorRoles, getContrastColor, isDarkColor, getRgb, getHex, getTonalColor, getTintTextColor, resolveSeedColor } from '@rific/auto-paper'
|
|
512
558
|
import type { ColorHarmony, TriadicPalette } from '@rific/auto-paper'
|
|
513
559
|
|
|
514
560
|
getTriadicPalette('#6750a4') // split-complementary (default)
|
|
@@ -526,6 +572,9 @@ getContrastColor('#6750a4') // → '#ffffff' (black/white pick
|
|
|
526
572
|
isDarkColor('#6750a4') // → true
|
|
527
573
|
getRgb('coral') // → { r: 255, g: 127, b: 80 }
|
|
528
574
|
getHex('rgb(255, 0, 0)') // → '#ff0000'
|
|
575
|
+
|
|
576
|
+
resolveSeedColor('#6750a4') // → '#6750a4' (already a plain string)
|
|
577
|
+
resolveSeedColor({ primary: '#6750a4', secondary: '#a4916c', tertiary: '#916ca4' }) // → '#6750a4' (a ThemeSettings.color explicit triad narrows to its own primary)
|
|
529
578
|
```
|
|
530
579
|
|
|
531
580
|
## License
|
package/dist/index.d.mts
CHANGED
|
@@ -54,13 +54,55 @@ type AutoPaperTheme = Omit<MD3Theme, 'colors'> & {
|
|
|
54
54
|
declare function useComputedTheme(appearance: ThemeAppearance, color: string | TriadicPalette, harmony?: ColorHarmony): AutoPaperTheme | null;
|
|
55
55
|
|
|
56
56
|
type AppearanceIcons = Partial<Record<ThemeAppearance, string>>;
|
|
57
|
-
type Props$
|
|
57
|
+
type Props$5 = {
|
|
58
58
|
value: ThemeAppearance;
|
|
59
59
|
onChange: (appearance: ThemeAppearance) => void;
|
|
60
60
|
showLabels?: boolean;
|
|
61
61
|
icons?: AppearanceIcons;
|
|
62
62
|
};
|
|
63
|
-
declare const AppearancePicker: ({ value, onChange, showLabels, icons }: Props$
|
|
63
|
+
declare const AppearancePicker: ({ value, onChange, showLabels, icons }: Props$5) => react.JSX.Element;
|
|
64
|
+
|
|
65
|
+
type Props$4 = {
|
|
66
|
+
showLabels?: boolean;
|
|
67
|
+
icons?: AppearanceIcons;
|
|
68
|
+
};
|
|
69
|
+
declare const AutoAppearancePicker: (props: Props$4) => react.JSX.Element;
|
|
70
|
+
|
|
71
|
+
type SeedColor = {
|
|
72
|
+
label: string;
|
|
73
|
+
value: string;
|
|
74
|
+
};
|
|
75
|
+
declare const defaultColors: SeedColor[];
|
|
76
|
+
type Props$3 = {
|
|
77
|
+
value: string;
|
|
78
|
+
onChange: (color: string) => void;
|
|
79
|
+
colors?: SeedColor[];
|
|
80
|
+
blur?: boolean;
|
|
81
|
+
};
|
|
82
|
+
declare const ColorPicker: ({ value, onChange, colors, blur: blurProp }: Props$3) => react.JSX.Element;
|
|
83
|
+
|
|
84
|
+
type PaletteWeights = {
|
|
85
|
+
primary: number;
|
|
86
|
+
secondary: number;
|
|
87
|
+
tertiary: number;
|
|
88
|
+
};
|
|
89
|
+
type Props$2 = {
|
|
90
|
+
value: string;
|
|
91
|
+
onChange: (color: string) => void;
|
|
92
|
+
harmony?: ColorHarmony;
|
|
93
|
+
onHarmonyChange?: (harmony: ColorHarmony) => void;
|
|
94
|
+
weights?: PaletteWeights;
|
|
95
|
+
colors?: SeedColor[];
|
|
96
|
+
blur?: boolean;
|
|
97
|
+
};
|
|
98
|
+
declare const PalettePicker: ({ value, onChange, harmony, onHarmonyChange, weights, colors, blur: blurProp }: Props$2) => react.JSX.Element;
|
|
99
|
+
|
|
100
|
+
type Props$1 = {
|
|
101
|
+
weights?: PaletteWeights;
|
|
102
|
+
colors?: SeedColor[];
|
|
103
|
+
blur?: boolean;
|
|
104
|
+
};
|
|
105
|
+
declare const AutoPalettePicker: (props: Props$1) => react.JSX.Element;
|
|
64
106
|
|
|
65
107
|
interface ExpoBlurModule {
|
|
66
108
|
BlurView: ComponentType<{
|
|
@@ -114,19 +156,6 @@ type ChipProps = ChipProps$1 & {
|
|
|
114
156
|
};
|
|
115
157
|
declare function Chip({ variant, style, selectedColor, ...props }: ChipProps): react.JSX.Element;
|
|
116
158
|
|
|
117
|
-
type SeedColor = {
|
|
118
|
-
label: string;
|
|
119
|
-
value: string;
|
|
120
|
-
};
|
|
121
|
-
declare const defaultColors: SeedColor[];
|
|
122
|
-
type Props$2 = {
|
|
123
|
-
value: string;
|
|
124
|
-
onChange: (color: string) => void;
|
|
125
|
-
colors?: SeedColor[];
|
|
126
|
-
blur?: boolean;
|
|
127
|
-
};
|
|
128
|
-
declare const ColorPicker: ({ value, onChange, colors, blur: blurProp }: Props$2) => react.JSX.Element;
|
|
129
|
-
|
|
130
159
|
interface ReanimatedModule {
|
|
131
160
|
View: ComponentType<{
|
|
132
161
|
children?: ReactNode;
|
|
@@ -150,12 +179,16 @@ declare const Dialog: typeof DialogComponent;
|
|
|
150
179
|
|
|
151
180
|
declare function FAB(props: FABProps): react.JSX.Element;
|
|
152
181
|
|
|
153
|
-
type Props
|
|
182
|
+
type Props = {
|
|
154
183
|
value: ColorHarmony;
|
|
155
184
|
onChange: (harmony: ColorHarmony) => void;
|
|
156
|
-
|
|
185
|
+
showLabels?: boolean;
|
|
186
|
+
checkedColor?: string;
|
|
187
|
+
uncheckedColor?: string;
|
|
188
|
+
checkedContainerColor?: string;
|
|
189
|
+
uncheckedContainerColor?: string;
|
|
157
190
|
};
|
|
158
|
-
declare const HarmonyPicker: ({ value, onChange,
|
|
191
|
+
declare const HarmonyPicker: ({ value, onChange, showLabels, checkedColor, uncheckedColor, checkedContainerColor, uncheckedContainerColor }: Props) => react.JSX.Element;
|
|
159
192
|
|
|
160
193
|
type IconButtonProps = IconButtonProps$1 & {
|
|
161
194
|
variant?: 'primary' | 'secondary' | 'tertiary' | 'surface';
|
|
@@ -169,21 +202,6 @@ declare const Menu: (({ blur: blurProp, children, ...props }: MenuProps) => reac
|
|
|
169
202
|
Item: react__default.FC<MenuItemProps>;
|
|
170
203
|
};
|
|
171
204
|
|
|
172
|
-
type PaletteWeights = {
|
|
173
|
-
primary: number;
|
|
174
|
-
secondary: number;
|
|
175
|
-
tertiary: number;
|
|
176
|
-
};
|
|
177
|
-
type Props = {
|
|
178
|
-
value: string;
|
|
179
|
-
onChange: (color: string) => void;
|
|
180
|
-
harmony?: ColorHarmony;
|
|
181
|
-
weights?: PaletteWeights;
|
|
182
|
-
colors?: SeedColor[];
|
|
183
|
-
blur?: boolean;
|
|
184
|
-
};
|
|
185
|
-
declare const PalettePicker: ({ value, onChange, harmony, weights, colors, blur: blurProp }: Props) => react.JSX.Element;
|
|
186
|
-
|
|
187
205
|
declare const TextInput: react.ForwardRefExoticComponent<Omit<TextInputProps, "ref"> & react.RefAttributes<TextInput$1>>;
|
|
188
206
|
|
|
189
207
|
interface ExpoNavigationBarModule {
|
|
@@ -334,4 +352,6 @@ declare const getTonalColor: (color: string, lightness: number) => string;
|
|
|
334
352
|
|
|
335
353
|
declare const isDarkColor: (value: string) => boolean;
|
|
336
354
|
|
|
337
|
-
|
|
355
|
+
declare const resolveSeedColor: (color: string | TriadicPalette) => string;
|
|
356
|
+
|
|
357
|
+
export { Appbar, type AppearanceIcons, AppearancePicker, AutoAppearancePicker, AutoPalettePicker, type AutoPaperTheme, BlurView, type BlurViewProps, BottomNavigation, Button, Chip, type ChipProps, type ColorHarmony, ColorPicker, type ColorRoles, Dialog, type DialogProps, type ExpoBlurModule, type ExpoNavigationBarModule, FAB, HarmonyPicker, IconButton, type IconButtonProps, Menu, type MenuProps, PalettePicker, type PaletteWeights, type PaperDefaults, Provider, type ProviderProps, type RGB, type ReanimatedModule, SEMANTIC_BASE_COLORS, type SeedColor, type SemanticColorRoles, TextInput, type ThemeAppearance, type ThemeSettings, ThemeSettingsContext, type ThemeSettingsContextType, type ThemeState, type TriadicPalette, createThemeReducer, defaultColors, defaultThemeSettings, getBlendedColor, getColorRoles, getContrastColor, getHex, getRgb, getThirdColor, getTintTextColor, getTonalColor, getTriadicPalette, isDarkColor, resolveSeedColor, selectThemeAppearance, selectThemeBlur, selectThemeColor, selectThemeHarmony, themeActions, themeReducer, useAutoPaperTheme, useBlur, useBlurModule, useComputedTheme, useNavBarContext, usePaperDefaults, useReanimatedModule, useThemeSettings };
|
package/dist/index.d.ts
CHANGED
|
@@ -54,13 +54,55 @@ type AutoPaperTheme = Omit<MD3Theme, 'colors'> & {
|
|
|
54
54
|
declare function useComputedTheme(appearance: ThemeAppearance, color: string | TriadicPalette, harmony?: ColorHarmony): AutoPaperTheme | null;
|
|
55
55
|
|
|
56
56
|
type AppearanceIcons = Partial<Record<ThemeAppearance, string>>;
|
|
57
|
-
type Props$
|
|
57
|
+
type Props$5 = {
|
|
58
58
|
value: ThemeAppearance;
|
|
59
59
|
onChange: (appearance: ThemeAppearance) => void;
|
|
60
60
|
showLabels?: boolean;
|
|
61
61
|
icons?: AppearanceIcons;
|
|
62
62
|
};
|
|
63
|
-
declare const AppearancePicker: ({ value, onChange, showLabels, icons }: Props$
|
|
63
|
+
declare const AppearancePicker: ({ value, onChange, showLabels, icons }: Props$5) => react.JSX.Element;
|
|
64
|
+
|
|
65
|
+
type Props$4 = {
|
|
66
|
+
showLabels?: boolean;
|
|
67
|
+
icons?: AppearanceIcons;
|
|
68
|
+
};
|
|
69
|
+
declare const AutoAppearancePicker: (props: Props$4) => react.JSX.Element;
|
|
70
|
+
|
|
71
|
+
type SeedColor = {
|
|
72
|
+
label: string;
|
|
73
|
+
value: string;
|
|
74
|
+
};
|
|
75
|
+
declare const defaultColors: SeedColor[];
|
|
76
|
+
type Props$3 = {
|
|
77
|
+
value: string;
|
|
78
|
+
onChange: (color: string) => void;
|
|
79
|
+
colors?: SeedColor[];
|
|
80
|
+
blur?: boolean;
|
|
81
|
+
};
|
|
82
|
+
declare const ColorPicker: ({ value, onChange, colors, blur: blurProp }: Props$3) => react.JSX.Element;
|
|
83
|
+
|
|
84
|
+
type PaletteWeights = {
|
|
85
|
+
primary: number;
|
|
86
|
+
secondary: number;
|
|
87
|
+
tertiary: number;
|
|
88
|
+
};
|
|
89
|
+
type Props$2 = {
|
|
90
|
+
value: string;
|
|
91
|
+
onChange: (color: string) => void;
|
|
92
|
+
harmony?: ColorHarmony;
|
|
93
|
+
onHarmonyChange?: (harmony: ColorHarmony) => void;
|
|
94
|
+
weights?: PaletteWeights;
|
|
95
|
+
colors?: SeedColor[];
|
|
96
|
+
blur?: boolean;
|
|
97
|
+
};
|
|
98
|
+
declare const PalettePicker: ({ value, onChange, harmony, onHarmonyChange, weights, colors, blur: blurProp }: Props$2) => react.JSX.Element;
|
|
99
|
+
|
|
100
|
+
type Props$1 = {
|
|
101
|
+
weights?: PaletteWeights;
|
|
102
|
+
colors?: SeedColor[];
|
|
103
|
+
blur?: boolean;
|
|
104
|
+
};
|
|
105
|
+
declare const AutoPalettePicker: (props: Props$1) => react.JSX.Element;
|
|
64
106
|
|
|
65
107
|
interface ExpoBlurModule {
|
|
66
108
|
BlurView: ComponentType<{
|
|
@@ -114,19 +156,6 @@ type ChipProps = ChipProps$1 & {
|
|
|
114
156
|
};
|
|
115
157
|
declare function Chip({ variant, style, selectedColor, ...props }: ChipProps): react.JSX.Element;
|
|
116
158
|
|
|
117
|
-
type SeedColor = {
|
|
118
|
-
label: string;
|
|
119
|
-
value: string;
|
|
120
|
-
};
|
|
121
|
-
declare const defaultColors: SeedColor[];
|
|
122
|
-
type Props$2 = {
|
|
123
|
-
value: string;
|
|
124
|
-
onChange: (color: string) => void;
|
|
125
|
-
colors?: SeedColor[];
|
|
126
|
-
blur?: boolean;
|
|
127
|
-
};
|
|
128
|
-
declare const ColorPicker: ({ value, onChange, colors, blur: blurProp }: Props$2) => react.JSX.Element;
|
|
129
|
-
|
|
130
159
|
interface ReanimatedModule {
|
|
131
160
|
View: ComponentType<{
|
|
132
161
|
children?: ReactNode;
|
|
@@ -150,12 +179,16 @@ declare const Dialog: typeof DialogComponent;
|
|
|
150
179
|
|
|
151
180
|
declare function FAB(props: FABProps): react.JSX.Element;
|
|
152
181
|
|
|
153
|
-
type Props
|
|
182
|
+
type Props = {
|
|
154
183
|
value: ColorHarmony;
|
|
155
184
|
onChange: (harmony: ColorHarmony) => void;
|
|
156
|
-
|
|
185
|
+
showLabels?: boolean;
|
|
186
|
+
checkedColor?: string;
|
|
187
|
+
uncheckedColor?: string;
|
|
188
|
+
checkedContainerColor?: string;
|
|
189
|
+
uncheckedContainerColor?: string;
|
|
157
190
|
};
|
|
158
|
-
declare const HarmonyPicker: ({ value, onChange,
|
|
191
|
+
declare const HarmonyPicker: ({ value, onChange, showLabels, checkedColor, uncheckedColor, checkedContainerColor, uncheckedContainerColor }: Props) => react.JSX.Element;
|
|
159
192
|
|
|
160
193
|
type IconButtonProps = IconButtonProps$1 & {
|
|
161
194
|
variant?: 'primary' | 'secondary' | 'tertiary' | 'surface';
|
|
@@ -169,21 +202,6 @@ declare const Menu: (({ blur: blurProp, children, ...props }: MenuProps) => reac
|
|
|
169
202
|
Item: react__default.FC<MenuItemProps>;
|
|
170
203
|
};
|
|
171
204
|
|
|
172
|
-
type PaletteWeights = {
|
|
173
|
-
primary: number;
|
|
174
|
-
secondary: number;
|
|
175
|
-
tertiary: number;
|
|
176
|
-
};
|
|
177
|
-
type Props = {
|
|
178
|
-
value: string;
|
|
179
|
-
onChange: (color: string) => void;
|
|
180
|
-
harmony?: ColorHarmony;
|
|
181
|
-
weights?: PaletteWeights;
|
|
182
|
-
colors?: SeedColor[];
|
|
183
|
-
blur?: boolean;
|
|
184
|
-
};
|
|
185
|
-
declare const PalettePicker: ({ value, onChange, harmony, weights, colors, blur: blurProp }: Props) => react.JSX.Element;
|
|
186
|
-
|
|
187
205
|
declare const TextInput: react.ForwardRefExoticComponent<Omit<TextInputProps, "ref"> & react.RefAttributes<TextInput$1>>;
|
|
188
206
|
|
|
189
207
|
interface ExpoNavigationBarModule {
|
|
@@ -334,4 +352,6 @@ declare const getTonalColor: (color: string, lightness: number) => string;
|
|
|
334
352
|
|
|
335
353
|
declare const isDarkColor: (value: string) => boolean;
|
|
336
354
|
|
|
337
|
-
|
|
355
|
+
declare const resolveSeedColor: (color: string | TriadicPalette) => string;
|
|
356
|
+
|
|
357
|
+
export { Appbar, type AppearanceIcons, AppearancePicker, AutoAppearancePicker, AutoPalettePicker, type AutoPaperTheme, BlurView, type BlurViewProps, BottomNavigation, Button, Chip, type ChipProps, type ColorHarmony, ColorPicker, type ColorRoles, Dialog, type DialogProps, type ExpoBlurModule, type ExpoNavigationBarModule, FAB, HarmonyPicker, IconButton, type IconButtonProps, Menu, type MenuProps, PalettePicker, type PaletteWeights, type PaperDefaults, Provider, type ProviderProps, type RGB, type ReanimatedModule, SEMANTIC_BASE_COLORS, type SeedColor, type SemanticColorRoles, TextInput, type ThemeAppearance, type ThemeSettings, ThemeSettingsContext, type ThemeSettingsContextType, type ThemeState, type TriadicPalette, createThemeReducer, defaultColors, defaultThemeSettings, getBlendedColor, getColorRoles, getContrastColor, getHex, getRgb, getThirdColor, getTintTextColor, getTonalColor, getTriadicPalette, isDarkColor, resolveSeedColor, selectThemeAppearance, selectThemeBlur, selectThemeColor, selectThemeHarmony, themeActions, themeReducer, useAutoPaperTheme, useBlur, useBlurModule, useComputedTheme, useNavBarContext, usePaperDefaults, useReanimatedModule, useThemeSettings };
|