@plexui/react-native 0.2.24 → 0.2.26
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 +3 -0
- package/dist/es/components/BottomActions/BottomActions.js +2 -2
- package/dist/es/components/BottomSheet/BottomSheet.js +7 -3
- package/dist/es/components/Button/Button.js +22 -28
- package/dist/es/components/Card/Card.js +9 -2
- package/dist/es/components/Checkbox/Checkbox.js +4 -2
- package/dist/es/components/Chip/Chip.js +8 -7
- package/dist/es/components/Indicator/CircularProgress.js +11 -5
- package/dist/es/components/List/List.js +45 -10
- package/dist/es/components/Menu/Menu.js +15 -5
- package/dist/es/components/PageControl/PageControl.js +7 -3
- package/dist/es/components/RadioGroup/RadioGroup.js +5 -3
- package/dist/es/components/RollingNumber/RollingNumber.js +7 -7
- package/dist/es/components/Select/Select.js +4 -2
- package/dist/es/components/Switch/Switch.js +4 -2
- package/dist/es/components/TextLink/TextLink.js +5 -0
- package/dist/es/icons/plex/VerifiedFilled.js +3 -0
- package/dist/es/icons/plex/index.js +1 -0
- package/dist/es/index.js +1 -1
- package/dist/es/internal/a11y.js +12 -0
- package/dist/es/internal/row.js +40 -0
- package/dist/es/theme/ThemeProvider.js +4 -2
- package/dist/es/theme/material.js +2 -0
- package/dist/types/components/BottomActions/BottomActions.d.ts +6 -1
- package/dist/types/components/Button/Button.d.ts +6 -1
- package/dist/types/components/Card/Card.d.ts +5 -1
- package/dist/types/components/Chip/Chip.d.ts +5 -1
- package/dist/types/components/Indicator/CircularProgress.d.ts +10 -2
- package/dist/types/components/List/List.d.ts +16 -1
- package/dist/types/components/Menu/Menu.d.ts +10 -4
- package/dist/types/components/RadioGroup/RadioGroup.d.ts +5 -1
- package/dist/types/components/RollingNumber/RollingNumber.d.ts +3 -1
- package/dist/types/icons/plex/VerifiedFilled.d.ts +2 -0
- package/dist/types/icons/plex/index.d.ts +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/internal/a11y.d.ts +22 -0
- package/dist/types/internal/row.d.ts +69 -1
- package/dist/types/theme/ThemeProvider.d.ts +3 -2
- package/dist/types/theme/material.d.ts +2 -0
- package/package.json +1 -1
- package/src/components/BottomActions/BottomActions.tsx +7 -2
- package/src/components/BottomSheet/BottomSheet.tsx +9 -4
- package/src/components/Button/Button.tsx +31 -26
- package/src/components/Card/Card.tsx +8 -3
- package/src/components/Checkbox/Checkbox.tsx +5 -1
- package/src/components/Chip/Chip.tsx +17 -5
- package/src/components/Indicator/CircularProgress.tsx +27 -11
- package/src/components/List/List.tsx +67 -12
- package/src/components/Menu/Menu.tsx +27 -11
- package/src/components/PageControl/PageControl.tsx +7 -3
- package/src/components/RadioGroup/RadioGroup.tsx +10 -2
- package/src/components/RollingNumber/RollingNumber.tsx +10 -8
- package/src/components/Select/Select.tsx +4 -1
- package/src/components/Switch/Switch.tsx +5 -1
- package/src/components/TextLink/TextLink.tsx +6 -0
- package/src/icons/plex/VerifiedFilled.ts +4 -0
- package/src/icons/plex/index.ts +1 -0
- package/src/index.ts +1 -1
- package/src/internal/a11y.ts +13 -0
- package/src/internal/row.ts +49 -1
- package/src/theme/ThemeProvider.tsx +7 -4
- package/src/theme/material.ts +2 -0
|
@@ -6,7 +6,7 @@ import CheckMd from "../../icons/plex/CheckMd";
|
|
|
6
6
|
import { useDescription } from "../../internal/a11y";
|
|
7
7
|
import { ControlLabel } from "../../internal/ControlLabel";
|
|
8
8
|
import { isRTL, nextKey } from "../../internal/direction";
|
|
9
|
-
import { RowEndContext, RowHoldContext, RowStartContext, rowHold } from "../../internal/row";
|
|
9
|
+
import { RowActionContext, RowEndContext, RowHoldContext, RowStartContext, holdProps, rowHint, rowHold } from "../../internal/row";
|
|
10
10
|
import { mix } from "../../theme/material";
|
|
11
11
|
import { useTheme } from "../../theme/ThemeProvider";
|
|
12
12
|
import { ANDROID_ROW_END, androidEaseInOut, iosCheckmarkColor, selectionColor } from "../Switch/Switch";
|
|
@@ -37,7 +37,7 @@ function RadioGroupRoot({ value: valueProp, defaultValue, onChange, "aria-label"
|
|
|
37
37
|
return (_jsx(RadioContext.Provider, { value: { value, select, disabled, items }, children: _jsx(View, { accessibilityRole: "radiogroup", "aria-label": ariaLabel, testID: testID, style: [direction === "row" ? styles.rowGroup : styles.colGroup, style], children: children }) }));
|
|
38
38
|
}
|
|
39
39
|
RadioGroupRoot.displayName = "RadioGroup";
|
|
40
|
-
function RadioGroupItem({ value, children, description, disabled: itemDisabled = false, orientation = "left", "aria-label": ariaLabel, testID }) {
|
|
40
|
+
function RadioGroupItem({ value, children, description, disabled: itemDisabled = false, orientation = "left", onLongPress, longPressLabel, "aria-label": ariaLabel, testID }) {
|
|
41
41
|
const theme = useTheme();
|
|
42
42
|
const context = useContext(RadioContext);
|
|
43
43
|
if (!context)
|
|
@@ -51,6 +51,8 @@ function RadioGroupItem({ value, children, description, disabled: itemDisabled =
|
|
|
51
51
|
// Or at its start (a list with the marks first): the mark alone, as wide as its ring or its checkmark's column
|
|
52
52
|
const atStart = useContext(RowStartContext) && !hasText;
|
|
53
53
|
const hold = useContext(RowHoldContext);
|
|
54
|
+
// A row's touch and hold, held here, where the row's touches and its screen reader focus are
|
|
55
|
+
const rowAction = useContext(RowActionContext);
|
|
54
56
|
// The radio button runs 0 to 1 in 200ms on Android's default ease-in-out: the first half fills the ring inward
|
|
55
57
|
// in its gray, the second shrinks the fill to the dot while it turns the on color; unchoosing runs it back. A
|
|
56
58
|
// disabled option snaps. Android only: iOS shows a list row's checkmark, which does not animate
|
|
@@ -88,7 +90,7 @@ function RadioGroupItem({ value, children, description, disabled: itemDisabled =
|
|
|
88
90
|
const size = theme.length("--radio-group-indicator-size", 22);
|
|
89
91
|
mark = (_jsx(View, { style: { width: size, height: size, alignItems: "center", justifyContent: "center" }, children: selected ? _jsx(CheckMd, { size: 26, color: disabled ? theme.colors.textDisabled : iosCheckmarkColor(theme) }) : null }));
|
|
90
92
|
}
|
|
91
|
-
return (_jsxs(Pressable, { ...described.props, ...radioKeys(context, value, disabled, selected), accessibilityRole: "radio", accessibilityLabel: ariaLabel ?? (typeof children === "string" ? children : undefined), accessibilityState: { checked: selected, disabled }, "aria-checked": selected, disabled: disabled, ...rowHold(hold), onPress: () => !selected && context.select(value), testID: testID, style: [
|
|
93
|
+
return (_jsxs(Pressable, { ...described.props, ...radioKeys(context, value, disabled, selected), accessibilityRole: "radio", accessibilityLabel: ariaLabel ?? (typeof children === "string" ? children : undefined), accessibilityState: { checked: selected, disabled }, "aria-checked": selected, disabled: disabled, ...rowHold(hold), ...holdProps({ run: disabled ? undefined : onLongPress, label: longPressLabel }, inRow || atStart ? rowAction : null), ...rowHint(rowAction, described), onPress: () => !selected && context.select(value), testID: testID, style: [
|
|
92
94
|
styles.item,
|
|
93
95
|
// Android's gap is in the target's margins
|
|
94
96
|
{ gap: theme.isAndroid ? 0 : theme.length("--radio-group-item-gap", 6) + 5, minHeight: theme.isAndroid ? 48 : theme.length("--radio-group-target-size", 44) },
|
|
@@ -50,7 +50,7 @@ export const rollingNumberParts = (value, locales = "en-US", format) => {
|
|
|
50
50
|
* 0.3 of the font size while the new one comes in, in 320ms (ease-out quint), up for a larger number. With reduced
|
|
51
51
|
* motion it changes at once. A screen reader reads the written number.
|
|
52
52
|
*/
|
|
53
|
-
export function RollingNumber({ value, locales, format, containerStyle, style, size, variant, weight, mono, testID, accessibilityLabel, ...text }) {
|
|
53
|
+
export function RollingNumber({ value, locales, format, containerStyle, duration, style, size, variant, weight, mono, testID, accessibilityLabel, ...text }) {
|
|
54
54
|
const theme = useTheme();
|
|
55
55
|
const { text: written, glyphs, characters } = rollingNumberParts(value, locales, format);
|
|
56
56
|
const flat = StyleSheet.flatten(style);
|
|
@@ -62,14 +62,14 @@ export function RollingNumber({ value, locales, format, containerStyle, style, s
|
|
|
62
62
|
if (last.value !== value)
|
|
63
63
|
setLast({ value, up: value > last.value });
|
|
64
64
|
const glyphProps = { ...text, size, variant, weight, mono, tabularNums: true, style };
|
|
65
|
-
return (_jsx(View, { accessible: true, accessibilityRole: "text", accessibilityLabel: accessibilityLabel ?? written, testID: testID, ...(Platform.OS === "web" ? { dir: "ltr" } : null), style: [styles.row, styles.ltr, containerStyle], children: characters.map(({ character, digit, key }) => theme.isAndroid ? (_jsx(Changing, { character: character, up: last.up, lift: 0.3 * fontSize, reduced: theme.reducedMotion, text: glyphProps }, key)) : digit === null ? (_jsx(Text, { ...glyphProps, children: character }, key)) : (_jsx(Reel, { digit: digit, character: character, glyphs: glyphs, lineHeight: lineHeight, text: glyphProps }, key))) }));
|
|
65
|
+
return (_jsx(View, { accessible: true, accessibilityRole: "text", accessibilityLabel: accessibilityLabel ?? written, testID: testID, ...(Platform.OS === "web" ? { dir: "ltr" } : null), style: [styles.row, styles.ltr, containerStyle], children: characters.map(({ character, digit, key }) => theme.isAndroid ? (_jsx(Changing, { character: character, up: last.up, lift: 0.3 * fontSize, reduced: theme.reducedMotion, duration: duration ?? 320, text: glyphProps }, key)) : digit === null ? (_jsx(Text, { ...glyphProps, children: character }, key)) : (_jsx(Reel, { digit: digit, character: character, glyphs: glyphs, lineHeight: lineHeight, duration: duration, text: glyphProps }, key))) }));
|
|
66
66
|
}
|
|
67
67
|
/** iOS's reel: the digit itself, hidden, keeps the width and height; a column of 0 to 9 turns over it. */
|
|
68
|
-
function Reel({ digit, character, glyphs, lineHeight, text }) {
|
|
68
|
+
function Reel({ digit, character, glyphs, lineHeight, duration, text }) {
|
|
69
69
|
const theme = useTheme();
|
|
70
70
|
const [line, setLine] = useState(lineHeight);
|
|
71
71
|
const position = useTransitionValue(digit, {
|
|
72
|
-
duration: theme.duration("--rolling-number-duration", 600),
|
|
72
|
+
duration: duration ?? theme.duration("--rolling-number-duration", 600),
|
|
73
73
|
easing: cssEasing(theme.token("--rolling-number-ease"), curves.easeInOut),
|
|
74
74
|
native: true,
|
|
75
75
|
reducedMotion: theme.reducedMotion,
|
|
@@ -82,7 +82,7 @@ function Reel({ digit, character, glyphs, lineHeight, text }) {
|
|
|
82
82
|
return (_jsxs(View, { style: styles.digit, children: [_jsx(Text, { ...text, onLayout: onLayout, style: [text.style, styles.ghost], children: character }), _jsx(Animated.View, { style: [styles.reel, { transform: [{ translateY: position.interpolate({ inputRange: [0, 9], outputRange: [0, -9 * line] }) }] }], children: glyphs.map((glyph) => (_jsx(Text, { ...text, style: [text.style, { height: line }], children: glyph }, glyph))) })] }));
|
|
83
83
|
}
|
|
84
84
|
/** Android's animated text: a new character comes in as the old one leaves, both fading and moving by `lift`. */
|
|
85
|
-
function Changing({ character, up, lift, reduced, text }) {
|
|
85
|
+
function Changing({ character, up, lift, reduced, duration, text }) {
|
|
86
86
|
const [pair, setPair] = useState({ old: null, now: character, up });
|
|
87
87
|
if (pair.now !== character)
|
|
88
88
|
setPair({ old: pair.now, now: character, up });
|
|
@@ -95,13 +95,13 @@ function Changing({ character, up, lift, reduced, text }) {
|
|
|
95
95
|
useEffect(() => {
|
|
96
96
|
if (pair.old == null || reduced)
|
|
97
97
|
return;
|
|
98
|
-
const animation = Animated.timing(progress, { toValue: 1, duration
|
|
98
|
+
const animation = Animated.timing(progress, { toValue: 1, duration, easing: curves.easeOutQuint, useNativeDriver: nativeDriver, isInteraction: false });
|
|
99
99
|
animation.start(({ finished }) => {
|
|
100
100
|
if (finished)
|
|
101
101
|
setPair((current) => (current === pair ? { ...current, old: null } : current));
|
|
102
102
|
});
|
|
103
103
|
return () => animation.stop();
|
|
104
|
-
}, [pair, progress, reduced]);
|
|
104
|
+
}, [duration, pair, progress, reduced]);
|
|
105
105
|
const direction = pair.up ? 1 : -1;
|
|
106
106
|
return (_jsxs(View, { children: [_jsx(Animated.View, { style: pair.old == null
|
|
107
107
|
? null
|
|
@@ -6,7 +6,7 @@ import Svg, { Path } from "react-native-svg";
|
|
|
6
6
|
import ChevronUpDown from "../../icons/plex/ChevronUpDown";
|
|
7
7
|
import { spaceToggles } from "../../internal/a11y";
|
|
8
8
|
import { useRipple } from "../../internal/ripple";
|
|
9
|
-
import { RowEndContext, RowFrameContext, RowHoldContext, rowHold } from "../../internal/row";
|
|
9
|
+
import { RowActionContext, RowEndContext, RowFrameContext, RowHoldContext, rowHint, rowHold } from "../../internal/row";
|
|
10
10
|
import { androidSelector, withAlpha } from "../../theme/material";
|
|
11
11
|
import { MaterialArrowDropDown } from "../Icon/material";
|
|
12
12
|
import { useTheme } from "../../theme/ThemeProvider";
|
|
@@ -75,6 +75,8 @@ export function Select(props) {
|
|
|
75
75
|
const look = fieldLook(theme, { variant, size, pill }, { focused: open, filled: shownLabel != null, disabled, invalid });
|
|
76
76
|
const row = useContext(RowEndContext);
|
|
77
77
|
const hold = useContext(RowHoldContext);
|
|
78
|
+
// At a row's end the select takes the row's focus, and with it the row's hint
|
|
79
|
+
const rowAction = useContext(RowActionContext);
|
|
78
80
|
const rowEnd = row != null;
|
|
79
81
|
const inRow = rowEnd && !android;
|
|
80
82
|
// At the end of an Android row the select is the row's value, as in an Android value row. On both platforms a press
|
|
@@ -102,7 +104,7 @@ export function Select(props) {
|
|
|
102
104
|
const m = theme.material;
|
|
103
105
|
return (
|
|
104
106
|
// A field that moves while its menu is open takes the menu with it
|
|
105
|
-
_jsxs(View, { ref: setTrigger, collapsable: false, onLayout: shown && !dialog ? () => place() : undefined, style: [block ? styles.block : styles.hug, style], children: [_jsxs(Pressable, { accessibilityRole: "button", accessibilityLabel: ariaLabel ? `${ariaLabel}, ${shownLabel ?? placeholder}` : undefined, accessibilityState: { disabled, expanded: open }, "aria-haspopup": dialog ? "dialog" : "menu", "aria-expanded": open, disabled: disabled, ...rowHold(hold), onPress: () => (dialog ? setOpen(true) : place(() => setOpen(true))),
|
|
107
|
+
_jsxs(View, { ref: setTrigger, collapsable: false, onLayout: shown && !dialog ? () => place() : undefined, style: [block ? styles.block : styles.hug, style], children: [_jsxs(Pressable, { accessibilityRole: "button", accessibilityLabel: ariaLabel ? `${ariaLabel}, ${shownLabel ?? placeholder}` : undefined, ...(row != null ? rowHint(rowAction, { props: {} }) : null), accessibilityState: { disabled, expanded: open }, "aria-haspopup": dialog ? "dialog" : "menu", "aria-expanded": open, disabled: disabled, ...rowHold(hold), onPress: () => (dialog ? setOpen(true) : place(() => setOpen(true))),
|
|
106
108
|
// A row's value takes the presses of the row's height (where the row does not hand it its own)
|
|
107
109
|
hitSlop: androidRow && !row?.press ? ROW_SLOP : undefined, testID: testID,
|
|
108
110
|
// The arrow sits in Compose's trailing icon slot, 12 from the edge
|
|
@@ -4,7 +4,7 @@ import { Animated, Easing, StyleSheet, View } from "react-native";
|
|
|
4
4
|
import { Pressable } from "../../internal/Pressable";
|
|
5
5
|
import { spaceToggles, useDescription } from "../../internal/a11y";
|
|
6
6
|
import { ControlLabel } from "../../internal/ControlLabel";
|
|
7
|
-
import { RowEndContext, RowHoldContext, rowHold } from "../../internal/row";
|
|
7
|
+
import { RowActionContext, RowEndContext, RowHoldContext, holdProps, rowHint, rowHold } from "../../internal/row";
|
|
8
8
|
import { androidGray } from "../../theme/material";
|
|
9
9
|
import { useTheme } from "../../theme/ThemeProvider";
|
|
10
10
|
/**
|
|
@@ -59,6 +59,8 @@ export function Switch({ checked: checkedProp, defaultChecked = false, onChecked
|
|
|
59
59
|
// At the end of an Android List row with no text of its own: Android's switch stands 22dp from the row's end
|
|
60
60
|
const rowEnd = useContext(RowEndContext) != null;
|
|
61
61
|
const hold = useContext(RowHoldContext);
|
|
62
|
+
// A row's touch and hold, held here, where the row's touches and its screen reader focus are
|
|
63
|
+
const rowAction = useContext(RowActionContext);
|
|
62
64
|
const toggle = () => {
|
|
63
65
|
if (disabled)
|
|
64
66
|
return;
|
|
@@ -72,7 +74,7 @@ export function Switch({ checked: checkedProp, defaultChecked = false, onChecked
|
|
|
72
74
|
// Disabled, the switch and its text fade to half (as a switch row's), each on its own
|
|
73
75
|
const control = (pressed) => theme.isAndroid ? (_jsx(View, { style: [disabled ? styles.dim : null, rowEnd && !hasText ? styles.androidRowEnd : null], children: _jsx(AndroidTrack, { theme: theme, checked: checked, disabled: disabled, color: color, progress: progress }) })) : (_jsx(IOSTrack, { theme: theme, checked: checked, disabled: disabled, color: color, progress: progress, held: pressed && !disabled }));
|
|
74
76
|
const text = _jsx(ControlLabel, { control: "switch", label: label, description: description, disabled: disabled, descriptionId: described.id });
|
|
75
|
-
return (_jsx(Pressable, { ...described.props, ...spaceToggles(toggle), accessibilityRole: "switch", accessibilityLabel: accessibilityLabel ?? (typeof label === "string" ? label : undefined), accessibilityState: { checked, disabled }, "aria-checked": checked, disabled: disabled, ...rowHold(hold), onPress: toggle, testID: testID,
|
|
77
|
+
return (_jsx(Pressable, { ...described.props, ...spaceToggles(toggle), accessibilityRole: "switch", accessibilityLabel: accessibilityLabel ?? (typeof label === "string" ? label : undefined), accessibilityState: { checked, disabled }, "aria-checked": checked, disabled: disabled, ...rowHold(hold), ...holdProps({}, rowEnd ? rowAction : null), ...rowHint(rowAction, described), onPress: toggle, testID: testID,
|
|
76
78
|
// Android's switch row: 50dp, the text ending 11dp before the switch's 37dp view
|
|
77
79
|
style: [styles.row, { gap: theme.isAndroid ? 11 : theme.length("--switch-label-gap", 8), minHeight: theme.isAndroid ? 50 : 44 }, style], children: ({ pressed }) => (_jsxs(_Fragment, { children: [labelPosition === "start" && hasText ? _jsx(View, { style: styles.grow, children: text }) : null, control(pressed), labelPosition === "end" && hasText ? _jsx(View, { style: styles.grow, children: text }) : null] })) }));
|
|
78
80
|
}
|
|
@@ -4,6 +4,8 @@ import { Linking, Platform, Text as RNText } from "react-native";
|
|
|
4
4
|
import { controlHighlight } from "../../theme/material";
|
|
5
5
|
import { useTheme } from "../../theme/ThemeProvider";
|
|
6
6
|
const EXTERNAL = /^https?:\/\//;
|
|
7
|
+
/** The underline's distance under the letters on the web: the token, else a tenth of the type. */
|
|
8
|
+
const underlineOffset = (value) => (typeof value === "number" ? value : typeof value === "string" && value !== "" ? value : "0.1em");
|
|
7
9
|
/**
|
|
8
10
|
* A link in running text, as @plexui/ui's TextLink: put it inside a `Text`, whose face, size and color it takes
|
|
9
11
|
* (the web's `currentcolor`), underlined; `primary` colors it with `--link-primary-text-color` and drops the underline.
|
|
@@ -30,6 +32,9 @@ export function TextLink({ children, href, primary = false, underline = !primary
|
|
|
30
32
|
return (_jsx(RNText, { ...anchor, accessibilityRole: href ? "link" : onPress ? "button" : undefined, accessibilityLabel: accessibilityLabel, testID: testID, onPress: actionable ? press : undefined, onPressIn: actionable ? () => setPressed(true) : undefined, onPressOut: actionable ? () => setPressed(false) : undefined, style: [
|
|
31
33
|
primary ? { color: theme.color("--link-primary-text-color", theme.colors.textAccent) } : null,
|
|
32
34
|
underline ? { textDecorationLine: "underline" } : null,
|
|
35
|
+
// The web sets the line a tenth of the type under the letters (`--link-underline-decoration-offset`), clear of
|
|
36
|
+
// the descenders; a phone draws it where the platform does
|
|
37
|
+
underline && Platform.OS === "web" ? { textUnderlineOffset: underlineOffset(theme.token("--link-underline-decoration-offset")) } : null,
|
|
33
38
|
weight ? theme.font(weight) : null,
|
|
34
39
|
highlight,
|
|
35
40
|
style,
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// Generated by scripts/build-icons.mjs. Do not edit.
|
|
2
|
+
import { createIcon } from "../../components/Icon/createIcon";
|
|
3
|
+
export default createIcon("VerifiedFilled", "0 0 24 24", [["path", { "d": "M12.01 2.011a3.2 3.2 0 0 1 2.113 .797l.154 .145l.698 .698a1.2 1.2 0 0 0 .71 .341l.135 .008h1a3.2 3.2 0 0 1 3.195 3.018l.005 .182v1c0 .27 .092 .533 .258 .743l.09 .1l.697 .698a3.2 3.2 0 0 1 .147 4.382l-.145 .154l-.698 .698a1.2 1.2 0 0 0 -.341 .71l-.008 .135v1a3.2 3.2 0 0 1 -3.018 3.195l-.182 .005h-1a1.2 1.2 0 0 0 -.743 .258l-.1 .09l-.698 .697a3.2 3.2 0 0 1 -4.382 .147l-.154 -.145l-.698 -.698a1.2 1.2 0 0 0 -.71 -.341l-.135 -.008h-1a3.2 3.2 0 0 1 -3.195 -3.018l-.005 -.182v-1a1.2 1.2 0 0 0 -.258 -.743l-.09 -.1l-.697 -.698a3.2 3.2 0 0 1 -.147 -4.382l.145 -.154l.698 -.698a1.2 1.2 0 0 0 .341 -.71l.008 -.135v-1l.005 -.182a3.2 3.2 0 0 1 3.013 -3.013l.182 -.005h1a1.2 1.2 0 0 0 .743 -.258l.1 -.09l.698 -.697a3.2 3.2 0 0 1 2.269 -.944zm3.697 7.282a1 1 0 0 0 -1.414 0l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.32 1.497l2 2l.094 .083a1 1 0 0 0 1.32 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z", "fill": 0 }]]);
|
|
@@ -630,6 +630,7 @@ export { default as VariationV41 } from "./VariationV41";
|
|
|
630
630
|
export { default as VariationV42 } from "./VariationV42";
|
|
631
631
|
export { default as VariationV43 } from "./VariationV43";
|
|
632
632
|
export { default as VariationV44 } from "./VariationV44";
|
|
633
|
+
export { default as VerifiedFilled } from "./VerifiedFilled";
|
|
633
634
|
export { default as VersionsV1 } from "./VersionsV1";
|
|
634
635
|
export { default as Video } from "./Video";
|
|
635
636
|
export { default as VideoCaption } from "./VideoCaption";
|
package/dist/es/index.js
CHANGED
|
@@ -38,7 +38,7 @@ export { Badge } from "./components/Badge/Badge";
|
|
|
38
38
|
export { BottomActions } from "./components/BottomActions/BottomActions";
|
|
39
39
|
export { IntroHeader } from "./components/IntroHeader/IntroHeader";
|
|
40
40
|
export { Card, cardColors } from "./components/Card/Card";
|
|
41
|
-
export { List, ListItem } from "./components/List/List";
|
|
41
|
+
export { List, ListItem, useListMetrics } from "./components/List/List";
|
|
42
42
|
export { Chip } from "./components/Chip/Chip";
|
|
43
43
|
export { Skeleton } from "./components/Skeleton/Skeleton";
|
|
44
44
|
export { Progress, progressSegments } from "./components/Progress/Progress";
|
package/dist/es/internal/a11y.js
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { useId } from "react";
|
|
2
2
|
import { Platform } from "react-native";
|
|
3
3
|
import { textOf } from "./children";
|
|
4
|
+
/**
|
|
5
|
+
* A hint (what a press does) for a screen reader: `accessibilityHint` on a phone; on the web, where React Native Web
|
|
6
|
+
* drops that prop, the id of an unseen text (`nodeProps`, the text's `nativeID`) that `aria-describedby` points at.
|
|
7
|
+
*/
|
|
8
|
+
export function useHint(hint) {
|
|
9
|
+
const id = useId();
|
|
10
|
+
if (hint == null || hint === "")
|
|
11
|
+
return { id: undefined, props: {} };
|
|
12
|
+
return { id: Platform.OS === "web" ? id : undefined, props: Platform.OS === "web" ? { "aria-describedby": id } : { accessibilityHint: hint } };
|
|
13
|
+
}
|
|
14
|
+
/** Ids for `aria-describedby`, the empty ones left out. */
|
|
15
|
+
export const describedBy = (...ids) => ids.filter(Boolean).join(" ") || undefined;
|
|
4
16
|
/**
|
|
5
17
|
* The description of a control for a screen reader: read after its label and state, as VoiceOver and TalkBack
|
|
6
18
|
* read a hint, and tied to the text by `aria-describedby` on the web. Give `id` to the description's text as its
|
package/dist/es/internal/row.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createContext } from "react";
|
|
2
|
+
import { Platform } from "react-native";
|
|
2
3
|
/**
|
|
3
4
|
* Inside the end of a List row. On iOS a control there takes the row's look, as the web's controls in a `[data-row]` do.
|
|
4
5
|
* A pop-up shows its value in the row's type with the menu picker's chevrons and no field of its own; a field is the
|
|
@@ -23,3 +24,42 @@ export function rowHold(hold) {
|
|
|
23
24
|
// The touch goes with the hold: Android's row ripples from it
|
|
24
25
|
return hold ? { onPressIn: (event) => hold(true, event), onPressOut: () => hold(false) } : null;
|
|
25
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Set by a row with `onLongPress`: a control at its end that takes its own touches (a checkbox, a switch, a choice)
|
|
29
|
+
* holds for the row, and a screen reader, which reaches the control and never the row, finds the action there.
|
|
30
|
+
*/
|
|
31
|
+
export const RowActionContext = createContext(null);
|
|
32
|
+
/**
|
|
33
|
+
* A control's touch and hold: its own `onLongPress`, or its row's. Half a second, as UIKit's and a ContextMenu's;
|
|
34
|
+
* a screen reader's `longpress` action named by `label` (VoiceOver reads it, "Show meaning", not the bare name).
|
|
35
|
+
* Merges the control's own actions (`actions`, handled by `onAction`).
|
|
36
|
+
*/
|
|
37
|
+
export function holdProps(own, row, actions = [], onAction) {
|
|
38
|
+
const run = own.run ?? row?.run;
|
|
39
|
+
if (run == null)
|
|
40
|
+
return actions.length > 0 ? { accessibilityActions: actions, onAccessibilityAction: onAction } : {};
|
|
41
|
+
const label = own.run != null ? own.label : row?.label;
|
|
42
|
+
return {
|
|
43
|
+
onLongPress: run,
|
|
44
|
+
delayLongPress: 500,
|
|
45
|
+
accessibilityActions: [...actions, { name: "longpress", ...(label != null ? { label } : null) }],
|
|
46
|
+
onAccessibilityAction: (event) => {
|
|
47
|
+
if (event.nativeEvent.actionName === "longpress")
|
|
48
|
+
run();
|
|
49
|
+
else
|
|
50
|
+
onAction?.(event);
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The row's hint on the control that takes the row's focus, kept with the control's own description: a phone reads
|
|
56
|
+
* both as one hint; on the web the control is described by its description and the row's unseen hint text.
|
|
57
|
+
*/
|
|
58
|
+
export function rowHint(row, described) {
|
|
59
|
+
if (row?.hint == null)
|
|
60
|
+
return null;
|
|
61
|
+
if (Platform.OS === "web")
|
|
62
|
+
return row.hintId != null ? { "aria-describedby": [described.id, row.hintId].filter(Boolean).join(" ") } : null;
|
|
63
|
+
const own = described.props.accessibilityHint;
|
|
64
|
+
return { accessibilityHint: own ? `${own}. ${row.hint}` : row.hint };
|
|
65
|
+
}
|
|
@@ -196,8 +196,10 @@ export function ThemeProvider({ scheme, platform, selectionColor, brand, fonts:
|
|
|
196
196
|
// The phone layers of the CSS apply up to 767px: a tablet keeps the touch sizes. Only the bands of the CSS matter.
|
|
197
197
|
const band = width >= 414 ? 414 : 393;
|
|
198
198
|
const highDensity = PixelRatio.get() >= 1.5;
|
|
199
|
-
const own = brandOverrides(brand);
|
|
200
|
-
|
|
199
|
+
const own = brandOverrides(brand ?? undefined);
|
|
200
|
+
// `brand={null}` starts again from Plex UI's tokens rather than from the parent's brand
|
|
201
|
+
const inherited = brand === null ? undefined : parent?.overrides;
|
|
202
|
+
const overrides = inherited || own ? { ...inherited, ...own } : undefined;
|
|
201
203
|
const overridesKey = JSON.stringify(overrides ?? null);
|
|
202
204
|
const resolver = useMemo(() => {
|
|
203
205
|
const context = { width: band, highDensity, reducedMotion };
|
|
@@ -219,6 +219,8 @@ export const elevationShadow = {
|
|
|
219
219
|
bar: "0 2px 8px rgba(0, 0, 0, 0.06)",
|
|
220
220
|
/** The same over a dark screen, where a light shadow does not show: the controls stand apart by their fill. */
|
|
221
221
|
barDark: "0 2px 8px rgba(0, 0, 0, 0.3)",
|
|
222
|
+
/** Level 1: an elevated card. */
|
|
223
|
+
level1: "0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.15)",
|
|
222
224
|
level2: "0 2px 6px 2px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.3)",
|
|
223
225
|
level3: "0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 8px 3px rgba(0, 0, 0, 0.15)",
|
|
224
226
|
};
|
|
@@ -24,6 +24,11 @@ export type BottomActionsProps = {
|
|
|
24
24
|
background?: BottomActionsBackground;
|
|
25
25
|
/** The color the floating edge fades into: the screen's (a grouped screen's gray). @default the theme's background */
|
|
26
26
|
canvasColor?: string;
|
|
27
|
+
/**
|
|
28
|
+
* No main action: the lone Button takes the second action's look (iOS 26's glass capsule, Android's ghost button),
|
|
29
|
+
* as a step whose rows move on by themselves keeps only its way past ("Skip"). @default false
|
|
30
|
+
*/
|
|
31
|
+
secondary?: boolean;
|
|
27
32
|
testID?: string;
|
|
28
33
|
style?: StyleProp<ViewStyle>;
|
|
29
34
|
};
|
|
@@ -34,4 +39,4 @@ export type BottomActionsProps = {
|
|
|
34
39
|
* action stands under it, 8 apart. Android: the Plex Android look's 48dp full-width button, 16dp from the sides and
|
|
35
40
|
* 16 above the gesture bar. Each Button inside is a block of the size `3xl` unless it sets its own.
|
|
36
41
|
*/
|
|
37
|
-
export declare function BottomActions({ children, floating, background, canvasColor, testID, style }: BottomActionsProps): import("react").JSX.Element;
|
|
42
|
+
export declare function BottomActions({ children, floating, background, canvasColor, secondary, testID, style }: BottomActionsProps): import("react").JSX.Element;
|
|
@@ -29,6 +29,11 @@ export type ButtonProps = Omit<PressableProps, "children" | "style"> & {
|
|
|
29
29
|
uniform?: boolean;
|
|
30
30
|
/** Takes the whole width. */
|
|
31
31
|
block?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* The most lines a text label takes before it ends in an ellipsis: 2 lets a long label ("Get 3 months for €35.99" in a
|
|
34
|
+
* longer language or at a large text size) wrap within the button, which grows from its height. @default 1
|
|
35
|
+
*/
|
|
36
|
+
labelLines?: number;
|
|
32
37
|
selected?: boolean;
|
|
33
38
|
loading?: boolean;
|
|
34
39
|
disabled?: boolean;
|
|
@@ -122,7 +127,7 @@ type Colors = {
|
|
|
122
127
|
pressedText?: string;
|
|
123
128
|
border?: string;
|
|
124
129
|
};
|
|
125
|
-
export declare function buttonColors(theme: Theme, color: ButtonColor, variant: ButtonVariant, disabled: boolean, selected: boolean
|
|
130
|
+
export declare function buttonColors(theme: Theme, color: ButtonColor, variant: ButtonVariant, disabled: boolean, selected: boolean): Colors;
|
|
126
131
|
/** On Android a pressed button shows a layer of its label color at 10% (the native ripple on a device). */
|
|
127
132
|
export declare function useMaterialPress(theme: Theme): boolean;
|
|
128
133
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import { type ImageSourcePropType, type StyleProp, type ViewStyle } from "react-native";
|
|
3
3
|
import type { Theme } from "../../theme/types";
|
|
4
|
-
export type CardVariant = "outline" | "solid" | "ghost";
|
|
4
|
+
export type CardVariant = "outline" | "solid" | "ghost" | "elevated";
|
|
5
5
|
export type CardSize = "sm" | "md" | "lg";
|
|
6
6
|
/** A fill of the palette: the accent, the Plex primary, or a semantic color. */
|
|
7
7
|
export type CardColor = "accent" | "primary" | "info" | "success" | "warning" | "caution" | "danger" | "discovery";
|
|
@@ -31,6 +31,10 @@ export type CardProps = {
|
|
|
31
31
|
*/
|
|
32
32
|
export declare function cardSurface(theme: Theme, variant: CardVariant): {
|
|
33
33
|
backgroundColor: string;
|
|
34
|
+
boxShadow?: undefined;
|
|
35
|
+
} | {
|
|
36
|
+
backgroundColor: string;
|
|
37
|
+
boxShadow: string;
|
|
34
38
|
};
|
|
35
39
|
/**
|
|
36
40
|
* A card, as @plexui/ui's Card with its parts (`Card.Header`, `.Title`, `.Description`, `.Content`, `.Footer`,
|
|
@@ -42,7 +42,11 @@ export type ChipProps = {
|
|
|
42
42
|
*/
|
|
43
43
|
removeStyle?: "token" | "button";
|
|
44
44
|
disabled?: boolean;
|
|
45
|
+
/** A touch and hold on the chip (half a second): what a word means, say. */
|
|
46
|
+
onLongPress?: () => void;
|
|
47
|
+
/** The name a screen reader gives the hold's action ("Show meaning"). */
|
|
48
|
+
longPressLabel?: string;
|
|
45
49
|
testID?: string;
|
|
46
50
|
style?: StyleProp<ViewStyle>;
|
|
47
51
|
};
|
|
48
|
-
export declare function Chip({ children, selected: selectedProp, defaultSelected, onSelectedChange, onPress, icon, trailingIcon, menu, expanded, accessibilityLabel, appearance, onRemove, removeLabel, removeStyle, disabled, testID, style, }: ChipProps): import("react").JSX.Element;
|
|
52
|
+
export declare function Chip({ children, selected: selectedProp, defaultSelected, onSelectedChange, onPress, icon, trailingIcon, menu, expanded, accessibilityLabel, appearance, onRemove, removeLabel, removeStyle, onLongPress, longPressLabel, disabled, testID, style, }: ChipProps): import("react").JSX.Element;
|
|
@@ -8,8 +8,16 @@ export type CircularProgressProps = {
|
|
|
8
8
|
progress?: number;
|
|
9
9
|
/** Size of the indicator, in pixels. @default 28 */
|
|
10
10
|
size?: number;
|
|
11
|
-
/** Stroke width of the ring, in pixels of its 20px drawing, between 1 and 4. @default 2 */
|
|
11
|
+
/** Stroke width of the ring, in pixels of its 20px drawing, between 1 and 4 (with `ring="edge"`, in pixels of `size`). @default 2 */
|
|
12
12
|
strokeWidth?: number;
|
|
13
|
+
/**
|
|
14
|
+
* Where the ring stands in its box: `"inset"`, the web's drawing (a ring of radius 8 in 20, so 28 across draws a
|
|
15
|
+
* ring of about 24); `"edge"`, the ring's outside on the box's edge, `size` the ring's own size.
|
|
16
|
+
* @default "inset"
|
|
17
|
+
*/
|
|
18
|
+
ring?: "inset" | "edge";
|
|
19
|
+
/** How long a new value takes to draw, in ms. @default 300 on iOS, 200 on Android */
|
|
20
|
+
duration?: number;
|
|
13
21
|
/** Color of the active progress track (stroke): a color or a token, such as `"var(--gray-1000)"`. */
|
|
14
22
|
trackActiveColor?: string;
|
|
15
23
|
/** Color of the base track (background stroke): a color or a token, such as `"var(--alpha-15)"`. */
|
|
@@ -31,4 +39,4 @@ export declare function getSimulatedProgress(maxTime: number, elapsedTime: numbe
|
|
|
31
39
|
* of its own for this, so both draw the Plex ring; a new value moves the arc in 300ms (ease) on iOS, as the web's
|
|
32
40
|
* transition, and in Android's determinate radial progress time (200ms, decelerating); at once with reduced motion.
|
|
33
41
|
*/
|
|
34
|
-
export declare function CircularProgress({ maxDuration, done, progress: progressProp, size, strokeWidth, trackActiveColor, trackColor, "aria-label": ariaLabel, accessibilityLabel, testID, style, }: CircularProgressProps): import("react").JSX.Element;
|
|
42
|
+
export declare function CircularProgress({ maxDuration, done, progress: progressProp, size, strokeWidth, ring, duration, trackActiveColor, trackColor, "aria-label": ariaLabel, accessibilityLabel, testID, style, }: CircularProgressProps): import("react").JSX.Element;
|
|
@@ -44,6 +44,14 @@ export type ListProps = {
|
|
|
44
44
|
};
|
|
45
45
|
/** Whether a control stands in a List's rows (a FloatingLabelInput is a row there, a List of its own elsewhere). */
|
|
46
46
|
export declare function useInList(): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Where a List's rows start their text inside the card and how round the card is, for a card built beside a List
|
|
49
|
+
* that must line up with it: iOS `--list-row-inset` (20) and `--field-group-radius` (26), Android 21 and 16.
|
|
50
|
+
*/
|
|
51
|
+
export declare function useListMetrics(): {
|
|
52
|
+
rowInset: number;
|
|
53
|
+
radius: number;
|
|
54
|
+
};
|
|
47
55
|
/**
|
|
48
56
|
* A section of rows. iOS 26: a section of an inset grouped list, as @plexui/ui's FieldGroup on a phone
|
|
49
57
|
* (`--field-group-radius` 26, the grouped secondary surface, rows 20 in from its edges, hairlines between rows from
|
|
@@ -108,10 +116,17 @@ export type ListItemProps = {
|
|
|
108
116
|
onPress?: () => void;
|
|
109
117
|
/** A touch and hold on the row (half a second): a ContextMenu around the row sets it. */
|
|
110
118
|
onLongPress?: () => void;
|
|
119
|
+
/**
|
|
120
|
+
* The name a screen reader gives the hold's action ("Show meaning"), or it reads the bare action. A control at the
|
|
121
|
+
* row's end that takes the row's focus (a checkbox, a switch, a choice) carries the action and holds for the row.
|
|
122
|
+
*/
|
|
123
|
+
longPressLabel?: string;
|
|
111
124
|
disabled?: boolean;
|
|
112
125
|
/** A row in red, as a destructive action row. */
|
|
113
126
|
destructive?: boolean;
|
|
114
127
|
accessibilityLabel?: string;
|
|
128
|
+
/** What a press does, read after the name ("Edit date of birth"): on the row, or on the control that takes its focus. */
|
|
129
|
+
accessibilityHint?: string;
|
|
115
130
|
testID?: string;
|
|
116
131
|
};
|
|
117
132
|
/**
|
|
@@ -126,7 +141,7 @@ export type ListItemProps = {
|
|
|
126
141
|
* in (a multi-select list); a 1px divider from the text's start to the card's end, none under a row with a tile (a
|
|
127
142
|
* tiled row draws none).
|
|
128
143
|
*/
|
|
129
|
-
export declare function ListItem({ label, description, leading, leadingColor, value, valuePlacement, valueColor, trailing, error, checked: checkedProp, defaultChecked, onCheckedChange, disclosure, onPress, onLongPress, disabled, destructive, accessibilityLabel, testID, }: ListItemProps): import("react").JSX.Element;
|
|
144
|
+
export declare function ListItem({ label, description, leading, leadingColor, value, valuePlacement, valueColor, trailing, error, checked: checkedProp, defaultChecked, onCheckedChange, disclosure, onPress, onLongPress, longPressLabel, disabled, destructive, accessibilityLabel, accessibilityHint, testID, }: ListItemProps): import("react").JSX.Element;
|
|
130
145
|
export type StackedRowProps = {
|
|
131
146
|
/** The label over the value; none for a row whose placeholder names the field (`hideLabel`). */
|
|
132
147
|
label?: ReactNode;
|
|
@@ -63,6 +63,16 @@ export type MenuContentProps = {
|
|
|
63
63
|
align?: "start" | "end";
|
|
64
64
|
/** @default 250 on iOS; on Android the popup fits its items, 196 to 288 */
|
|
65
65
|
width?: number;
|
|
66
|
+
/**
|
|
67
|
+
* Several options to pick: a press on an item with `checked` checks or unchecks it and the menu stays open; its items
|
|
68
|
+
* read as checkboxes. @default false
|
|
69
|
+
*/
|
|
70
|
+
multiple?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* The menu opens over its trigger, as Android's popup and the web's phone menu; `false` opens it under the trigger,
|
|
73
|
+
* its top at the trigger's bottom edge, as Material's dropdown menu under a chip. @default true
|
|
74
|
+
*/
|
|
75
|
+
cover?: boolean;
|
|
66
76
|
"aria-label"?: string;
|
|
67
77
|
testID?: string;
|
|
68
78
|
};
|
|
@@ -76,10 +86,6 @@ type SurfaceProps = MenuContentProps & {
|
|
|
76
86
|
anchor: MenuAnchor | null;
|
|
77
87
|
onClose: () => void;
|
|
78
88
|
check?: boolean;
|
|
79
|
-
/** Select's `multiple`: a press checks or unchecks an option and the menu stays open. */
|
|
80
|
-
multiple?: boolean;
|
|
81
|
-
/** The menu opens over its trigger, as Android's popup and the web's phone menu (a dropdown field's list opens under it). @default true */
|
|
82
|
-
cover?: boolean;
|
|
83
89
|
/** The List row the menu opens from: on Android the screen dims around it and the popup stands under it. */
|
|
84
90
|
row?: MenuRow | null;
|
|
85
91
|
/** Opened from a bar's button: on Android the header menu, in the bar's glass. */
|
|
@@ -19,6 +19,10 @@ export type RadioGroupItemProps = {
|
|
|
19
19
|
disabled?: boolean;
|
|
20
20
|
/** Where the mark stands against the label. @default "left" */
|
|
21
21
|
orientation?: "left" | "right";
|
|
22
|
+
/** A touch and hold on the option (half a second): what a term means, say. */
|
|
23
|
+
onLongPress?: () => void;
|
|
24
|
+
/** The name a screen reader gives the hold's action ("Show meaning"). */
|
|
25
|
+
longPressLabel?: string;
|
|
22
26
|
"aria-label"?: string;
|
|
23
27
|
testID?: string;
|
|
24
28
|
};
|
|
@@ -47,7 +51,7 @@ declare function RadioGroupRoot<T extends string>({ value: valueProp, defaultVal
|
|
|
47
51
|
declare namespace RadioGroupRoot {
|
|
48
52
|
var displayName: string;
|
|
49
53
|
}
|
|
50
|
-
declare function RadioGroupItem({ value, children, description, disabled: itemDisabled, orientation, "aria-label": ariaLabel, testID }: RadioGroupItemProps): import("react").JSX.Element;
|
|
54
|
+
declare function RadioGroupItem({ value, children, description, disabled: itemDisabled, orientation, onLongPress, longPressLabel, "aria-label": ariaLabel, testID }: RadioGroupItemProps): import("react").JSX.Element;
|
|
51
55
|
declare namespace RadioGroupItem {
|
|
52
56
|
var displayName: string;
|
|
53
57
|
}
|
|
@@ -9,6 +9,8 @@ export type RollingNumberProps = Omit<TextProps, "children"> & {
|
|
|
9
9
|
format?: Intl.NumberFormatOptions;
|
|
10
10
|
/** The style of the row of characters. */
|
|
11
11
|
containerStyle?: StyleProp<ViewStyle>;
|
|
12
|
+
/** How long a change takes, in ms. @default `--rolling-number-duration` (600) on iOS, 320 on Android */
|
|
13
|
+
duration?: number;
|
|
12
14
|
};
|
|
13
15
|
type Character = {
|
|
14
16
|
character: string;
|
|
@@ -32,5 +34,5 @@ export declare const rollingNumberParts: (value: number, locales?: Intl.LocalesA
|
|
|
32
34
|
* 0.3 of the font size while the new one comes in, in 320ms (ease-out quint), up for a larger number. With reduced
|
|
33
35
|
* motion it changes at once. A screen reader reads the written number.
|
|
34
36
|
*/
|
|
35
|
-
export declare function RollingNumber({ value, locales, format, containerStyle, style, size, variant, weight, mono, testID, accessibilityLabel, ...text }: RollingNumberProps): import("react").JSX.Element;
|
|
37
|
+
export declare function RollingNumber({ value, locales, format, containerStyle, duration, style, size, variant, weight, mono, testID, accessibilityLabel, ...text }: RollingNumberProps): import("react").JSX.Element;
|
|
36
38
|
export {};
|
|
@@ -628,6 +628,7 @@ export { default as VariationV41 } from "./VariationV41";
|
|
|
628
628
|
export { default as VariationV42 } from "./VariationV42";
|
|
629
629
|
export { default as VariationV43 } from "./VariationV43";
|
|
630
630
|
export { default as VariationV44 } from "./VariationV44";
|
|
631
|
+
export { default as VerifiedFilled } from "./VerifiedFilled";
|
|
631
632
|
export { default as VersionsV1 } from "./VersionsV1";
|
|
632
633
|
export { default as Video } from "./Video";
|
|
633
634
|
export { default as VideoCaption } from "./VideoCaption";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export { Badge, type BadgeColor, type BadgeProps, type BadgeSize, type BadgeVari
|
|
|
37
37
|
export { BottomActions, type BottomActionsBackground, type BottomActionsProps } from "./components/BottomActions/BottomActions";
|
|
38
38
|
export { IntroHeader, type IntroHeaderAlign, type IntroHeaderProps } from "./components/IntroHeader/IntroHeader";
|
|
39
39
|
export { Card, cardColors, type CardColor, type CardMediaProps, type CardProps, type CardSize, type CardVariant } from "./components/Card/Card";
|
|
40
|
-
export { List, ListItem, type ListItemProps, type ListProps } from "./components/List/List";
|
|
40
|
+
export { List, ListItem, useListMetrics, type ListItemProps, type ListProps } from "./components/List/List";
|
|
41
41
|
export { Chip, type ChipProps } from "./components/Chip/Chip";
|
|
42
42
|
export { Skeleton, type SkeletonProps } from "./components/Skeleton/Skeleton";
|
|
43
43
|
export { Progress, progressSegments, type ProgressColor, type ProgressProps, type ProgressSegment, type ProgressSize } from "./components/Progress/Progress";
|
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* A hint (what a press does) for a screen reader: `accessibilityHint` on a phone; on the web, where React Native Web
|
|
4
|
+
* drops that prop, the id of an unseen text (`nodeProps`, the text's `nativeID`) that `aria-describedby` points at.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useHint(hint: string | undefined): {
|
|
7
|
+
id: undefined;
|
|
8
|
+
props: {
|
|
9
|
+
"aria-describedby"?: undefined;
|
|
10
|
+
accessibilityHint?: undefined;
|
|
11
|
+
};
|
|
12
|
+
} | {
|
|
13
|
+
id: string | undefined;
|
|
14
|
+
props: {
|
|
15
|
+
"aria-describedby": string;
|
|
16
|
+
accessibilityHint?: undefined;
|
|
17
|
+
} | {
|
|
18
|
+
accessibilityHint: string;
|
|
19
|
+
"aria-describedby"?: undefined;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
/** Ids for `aria-describedby`, the empty ones left out. */
|
|
23
|
+
export declare const describedBy: (...ids: (string | undefined)[]) => string | undefined;
|
|
2
24
|
/**
|
|
3
25
|
* The description of a control for a screen reader: read after its label and state, as VoiceOver and TalkBack
|
|
4
26
|
* read a hint, and tied to the text by `aria-describedby` on the web. Give `id` to the description's text as its
|