@retray-dev/ui-kit 13.0.0 → 13.2.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/CONSUMER.md +24 -9
- package/README.md +9 -10
- package/{COMPONENTS.md → SKILL.md} +296 -860
- package/dist/Accordion.d.mts +2 -0
- package/dist/Accordion.d.ts +2 -0
- package/dist/Accordion.js +1 -0
- package/dist/Accordion.mjs +1 -2
- package/dist/AlertBanner.mjs +0 -1
- package/dist/AppHeader.d.mts +5 -2
- package/dist/AppHeader.d.ts +5 -2
- package/dist/AppHeader.js +8 -4
- package/dist/AppHeader.mjs +1 -2
- package/dist/Avatar.mjs +0 -1
- package/dist/Badge.mjs +0 -1
- package/dist/Button.mjs +0 -1
- package/dist/ButtonGroup.mjs +0 -1
- package/dist/Card.mjs +0 -1
- package/dist/CategoryStrip.mjs +0 -1
- package/dist/Checkbox.d.mts +2 -1
- package/dist/Checkbox.d.ts +2 -1
- package/dist/Checkbox.js +3 -1
- package/dist/Checkbox.mjs +1 -2
- package/dist/Chip.mjs +0 -1
- package/dist/ConfirmDialog.d.mts +2 -1
- package/dist/ConfirmDialog.d.ts +2 -1
- package/dist/ConfirmDialog.js +26 -14
- package/dist/ConfirmDialog.mjs +1 -2
- package/dist/CurrencyDisplay.mjs +0 -1
- package/dist/CurrencyInput.mjs +0 -1
- package/dist/DetailRow.mjs +0 -1
- package/dist/EmptyState.mjs +0 -1
- package/dist/ErrorBoundary.mjs +0 -1
- package/dist/Form.mjs +0 -1
- package/dist/HolographicCard.mjs +0 -1
- package/dist/IconButton.mjs +0 -1
- package/dist/IconPicker.mjs +0 -1
- package/dist/ImageUpload.d.mts +1 -3
- package/dist/ImageUpload.d.ts +1 -3
- package/dist/ImageUpload.js +27 -26
- package/dist/ImageUpload.mjs +1 -2
- package/dist/ImageViewer.mjs +0 -1
- package/dist/Input.mjs +0 -1
- package/dist/LabelValue.mjs +0 -1
- package/dist/ListGroup.mjs +0 -1
- package/dist/ListItem.d.mts +2 -1
- package/dist/ListItem.d.ts +2 -1
- package/dist/ListItem.js +3 -1
- package/dist/ListItem.mjs +1 -2
- package/dist/MediaCard.mjs +0 -1
- package/dist/MenuGroup.mjs +0 -1
- package/dist/MenuItem.d.mts +2 -1
- package/dist/MenuItem.d.ts +2 -1
- package/dist/MenuItem.js +3 -1
- package/dist/MenuItem.mjs +1 -2
- package/dist/MonthPicker.mjs +0 -1
- package/dist/NumberStepper.d.mts +2 -1
- package/dist/NumberStepper.d.ts +2 -1
- package/dist/NumberStepper.js +4 -1
- package/dist/NumberStepper.mjs +1 -2
- package/dist/PagerDots.mjs +0 -1
- package/dist/Pressable.mjs +0 -1
- package/dist/PricingCard.mjs +0 -1
- package/dist/Progress.mjs +0 -1
- package/dist/RadioGroup.mjs +0 -1
- package/dist/RetrayProvider.mjs +0 -1
- package/dist/Select.d.mts +2 -1
- package/dist/Select.d.ts +2 -1
- package/dist/Select.js +3 -1
- package/dist/Select.mjs +1 -2
- package/dist/SelectableCard.mjs +0 -1
- package/dist/SelectableGrid.js +0 -1
- package/dist/SelectableGrid.mjs +1 -2
- package/dist/Separator.mjs +0 -1
- package/dist/Sheet.d.mts +1 -1
- package/dist/Sheet.d.ts +1 -1
- package/dist/Sheet.js +26 -13
- package/dist/Sheet.mjs +1 -2
- package/dist/SheetSelect.mjs +0 -1
- package/dist/Skeleton.mjs +0 -1
- package/dist/Slider.d.mts +2 -1
- package/dist/Slider.d.ts +2 -1
- package/dist/Slider.js +2 -0
- package/dist/Slider.mjs +1 -2
- package/dist/Spinner.mjs +0 -1
- package/dist/Stats.mjs +0 -1
- package/dist/Switch.d.mts +2 -1
- package/dist/Switch.d.ts +2 -1
- package/dist/Switch.js +2 -1
- package/dist/Switch.mjs +1 -2
- package/dist/TabBar.mjs +0 -1
- package/dist/Tabs.mjs +0 -1
- package/dist/Text.mjs +0 -1
- package/dist/Textarea.mjs +0 -1
- package/dist/Toast.d.mts +12 -10
- package/dist/Toast.d.ts +12 -10
- package/dist/Toast.mjs +0 -1
- package/dist/Toggle.mjs +0 -1
- package/dist/{chunk-TETMEKZE.mjs → chunk-2QXJDRVU.mjs} +4 -1
- package/dist/{chunk-CBIZLRYH.mjs → chunk-422IVD3H.mjs} +1 -0
- package/dist/{chunk-4ZO5PTKF.mjs → chunk-77UOVFIS.mjs} +3 -1
- package/dist/{chunk-2QOHHBJC.mjs → chunk-7BZJRB77.mjs} +25 -15
- package/dist/{chunk-UOKFSFNJ.mjs → chunk-C5ZRMR2E.mjs} +2 -0
- package/dist/{chunk-E4EQSCKR.mjs → chunk-COA2YZOX.mjs} +3 -1
- package/dist/{chunk-6QLBHUEG.mjs → chunk-CZN6L2QU.mjs} +3 -1
- package/dist/{chunk-BTUW5LSG.mjs → chunk-E2PONRJG.mjs} +2 -1
- package/dist/{chunk-6CR4S6W2.mjs → chunk-H6MQL7PS.mjs} +9 -4
- package/dist/{chunk-EROPDCB5.mjs → chunk-HHOOFDBA.mjs} +26 -21
- package/dist/{chunk-URIH43IJ.mjs → chunk-IDVUZIVY.mjs} +3 -1
- package/dist/{chunk-MP7GLMIR.mjs → chunk-NPCBNGNE.mjs} +0 -1
- package/dist/{chunk-V2ZB2XNS.mjs → chunk-UMZTPUB3.mjs} +27 -15
- package/dist/fonts.mjs +0 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +108 -64
- package/dist/index.mjs +13 -14
- package/package.json +14 -12
- package/src/components/Accordion/Accordion.tsx +3 -0
- package/src/components/AppHeader/AppHeader.tsx +25 -10
- package/src/components/Checkbox/Checkbox.tsx +3 -0
- package/src/components/ConfirmDialog/ConfirmDialog.tsx +30 -14
- package/src/components/ImageUpload/ImageUpload.tsx +33 -25
- package/src/components/ListItem/ListItem.tsx +3 -0
- package/src/components/MenuItem/MenuItem.tsx +3 -0
- package/src/components/NumberStepper/NumberStepper.tsx +4 -0
- package/src/components/Select/Select.tsx +3 -0
- package/src/components/SelectableGrid/SelectableGrid.tsx +0 -1
- package/src/components/Sheet/Sheet.tsx +27 -14
- package/src/components/Sheet/index.ts +2 -2
- package/src/components/Slider/Slider.tsx +3 -0
- package/src/components/Switch/Switch.tsx +3 -1
- package/src/components/Text/Text.tsx +1 -0
- package/dist/chunk-Y6FXYEAI.mjs +0 -8
package/dist/Accordion.d.mts
CHANGED
|
@@ -11,12 +11,14 @@ interface AccordionItem {
|
|
|
11
11
|
icon?: React.ReactNode;
|
|
12
12
|
/** Override icon color. Defaults to foregroundMuted. */
|
|
13
13
|
iconColor?: string;
|
|
14
|
+
/**
|
|
14
15
|
/**
|
|
15
16
|
* Action buttons rendered after the trigger content but before the chevron.
|
|
16
17
|
* Automatically touch-isolated — taps on actions won't toggle the accordion.
|
|
17
18
|
* Use this instead of embedding interactive elements inside `trigger`.
|
|
18
19
|
*/
|
|
19
20
|
triggerActions?: React.ReactNode;
|
|
21
|
+
accessibilityHint?: string;
|
|
20
22
|
}
|
|
21
23
|
interface AccordionProps {
|
|
22
24
|
items: AccordionItem[];
|
package/dist/Accordion.d.ts
CHANGED
|
@@ -11,12 +11,14 @@ interface AccordionItem {
|
|
|
11
11
|
icon?: React.ReactNode;
|
|
12
12
|
/** Override icon color. Defaults to foregroundMuted. */
|
|
13
13
|
iconColor?: string;
|
|
14
|
+
/**
|
|
14
15
|
/**
|
|
15
16
|
* Action buttons rendered after the trigger content but before the chevron.
|
|
16
17
|
* Automatically touch-isolated — taps on actions won't toggle the accordion.
|
|
17
18
|
* Use this instead of embedding interactive elements inside `trigger`.
|
|
18
19
|
*/
|
|
19
20
|
triggerActions?: React.ReactNode;
|
|
21
|
+
accessibilityHint?: string;
|
|
20
22
|
}
|
|
21
23
|
interface AccordionProps {
|
|
22
24
|
items: AccordionItem[];
|
package/dist/Accordion.js
CHANGED
|
@@ -142,6 +142,7 @@ function AccordionItemComponent({
|
|
|
142
142
|
accessibilityRole: "button",
|
|
143
143
|
accessibilityState: { expanded: isOpen },
|
|
144
144
|
accessibilityLabel: typeof item.trigger === "string" ? item.trigger : void 0,
|
|
145
|
+
accessibilityHint: item.accessibilityHint,
|
|
145
146
|
style: styles.trigger
|
|
146
147
|
},
|
|
147
148
|
/* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: styles.triggerContent }, resolvedIcon ? /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: styles.icon }, resolvedIcon) : null, typeof item.trigger === "string" ? /* @__PURE__ */ React3__default.default.createElement(reactNative.Text, { style: [styles.triggerText, { color: colors.foreground }], allowFontScaling: true }, item.trigger) : item.trigger),
|
package/dist/Accordion.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export { Accordion } from './chunk-
|
|
1
|
+
export { Accordion } from './chunk-422IVD3H.mjs';
|
|
2
2
|
import './chunk-M53LC4Q7.mjs';
|
|
3
3
|
import './chunk-IFYMBOEN.mjs';
|
|
4
4
|
import './chunk-ARONDO7M.mjs';
|
|
5
5
|
import './chunk-MZ6WRTD2.mjs';
|
|
6
6
|
import './chunk-KSSVIFYR.mjs';
|
|
7
7
|
import './chunk-2CE3TQVY.mjs';
|
|
8
|
-
import './chunk-Y6FXYEAI.mjs';
|
package/dist/AlertBanner.mjs
CHANGED
package/dist/AppHeader.d.mts
CHANGED
|
@@ -10,7 +10,9 @@ interface AppHeaderProps {
|
|
|
10
10
|
onBack?: () => void;
|
|
11
11
|
/** Icon name for the back button. Defaults to `'chevron-left'`. */
|
|
12
12
|
backIconName?: string;
|
|
13
|
-
/**
|
|
13
|
+
/** Icon name for a decorative icon shown left of the title, after the back button. Ignored when `left` is provided. */
|
|
14
|
+
iconName?: string;
|
|
15
|
+
/** Custom left content — overrides the back button and `iconName`. */
|
|
14
16
|
left?: React.ReactNode;
|
|
15
17
|
/** Custom right content (actions). */
|
|
16
18
|
right?: React.ReactNode;
|
|
@@ -34,7 +36,8 @@ interface AppHeaderProps {
|
|
|
34
36
|
*
|
|
35
37
|
* @example
|
|
36
38
|
* <AppHeader title="Settings" onBack={navigation.goBack} right={<IconButton iconName="more-horizontal" variant="text" />} />
|
|
39
|
+
* <AppHeader title="Perfil" iconName="user" onBack={navigation.goBack} />
|
|
37
40
|
*/
|
|
38
|
-
declare function AppHeader({ title, subtitle, onBack, backIconName, left, right, titleAlign, bordered, withSafeArea, backgroundColor, style, }: AppHeaderProps): React.JSX.Element;
|
|
41
|
+
declare function AppHeader({ title, subtitle, onBack, backIconName, iconName, left, right, titleAlign, bordered, withSafeArea, backgroundColor, style, }: AppHeaderProps): React.JSX.Element;
|
|
39
42
|
|
|
40
43
|
export { AppHeader, type AppHeaderProps };
|
package/dist/AppHeader.d.ts
CHANGED
|
@@ -10,7 +10,9 @@ interface AppHeaderProps {
|
|
|
10
10
|
onBack?: () => void;
|
|
11
11
|
/** Icon name for the back button. Defaults to `'chevron-left'`. */
|
|
12
12
|
backIconName?: string;
|
|
13
|
-
/**
|
|
13
|
+
/** Icon name for a decorative icon shown left of the title, after the back button. Ignored when `left` is provided. */
|
|
14
|
+
iconName?: string;
|
|
15
|
+
/** Custom left content — overrides the back button and `iconName`. */
|
|
14
16
|
left?: React.ReactNode;
|
|
15
17
|
/** Custom right content (actions). */
|
|
16
18
|
right?: React.ReactNode;
|
|
@@ -34,7 +36,8 @@ interface AppHeaderProps {
|
|
|
34
36
|
*
|
|
35
37
|
* @example
|
|
36
38
|
* <AppHeader title="Settings" onBack={navigation.goBack} right={<IconButton iconName="more-horizontal" variant="text" />} />
|
|
39
|
+
* <AppHeader title="Perfil" iconName="user" onBack={navigation.goBack} />
|
|
37
40
|
*/
|
|
38
|
-
declare function AppHeader({ title, subtitle, onBack, backIconName, left, right, titleAlign, bordered, withSafeArea, backgroundColor, style, }: AppHeaderProps): React.JSX.Element;
|
|
41
|
+
declare function AppHeader({ title, subtitle, onBack, backIconName, iconName, left, right, titleAlign, bordered, withSafeArea, backgroundColor, style, }: AppHeaderProps): React.JSX.Element;
|
|
39
42
|
|
|
40
43
|
export { AppHeader, type AppHeaderProps };
|
package/dist/AppHeader.js
CHANGED
|
@@ -215,6 +215,7 @@ function AppHeader({
|
|
|
215
215
|
subtitle,
|
|
216
216
|
onBack,
|
|
217
217
|
backIconName = "chevron-left",
|
|
218
|
+
iconName,
|
|
218
219
|
left,
|
|
219
220
|
right,
|
|
220
221
|
titleAlign = "auto",
|
|
@@ -228,7 +229,7 @@ function AppHeader({
|
|
|
228
229
|
const { width } = reactNative.useWindowDimensions();
|
|
229
230
|
const isWide = width >= BREAKPOINTS.wide;
|
|
230
231
|
const centered = titleAlign === "center" || titleAlign === "auto" && isWide;
|
|
231
|
-
const leftNode = left ?? (onBack ? /* @__PURE__ */ React4__default.default.createElement(
|
|
232
|
+
const leftNode = left ?? /* @__PURE__ */ React4__default.default.createElement(React4__default.default.Fragment, null, onBack ? /* @__PURE__ */ React4__default.default.createElement(
|
|
232
233
|
IconButton,
|
|
233
234
|
{
|
|
234
235
|
iconName: backIconName,
|
|
@@ -237,7 +238,7 @@ function AppHeader({
|
|
|
237
238
|
onPress: onBack,
|
|
238
239
|
accessibilityLabel: "Atr\xE1s"
|
|
239
240
|
}
|
|
240
|
-
) : null);
|
|
241
|
+
) : null, iconName && !left ? /* @__PURE__ */ React4__default.default.createElement(Icon, { name: iconName, size: 20, color: colors.foreground }) : null);
|
|
241
242
|
const titleBlock = /* @__PURE__ */ React4__default.default.createElement(reactNative.View, { style: [styles2.titleBlock, centered && styles2.titleBlockCentered], pointerEvents: "none" }, title ? /* @__PURE__ */ React4__default.default.createElement(
|
|
242
243
|
reactNative.Text,
|
|
243
244
|
{
|
|
@@ -287,10 +288,13 @@ var styles2 = reactNative.StyleSheet.create({
|
|
|
287
288
|
minWidth: s(44),
|
|
288
289
|
flexDirection: "row",
|
|
289
290
|
alignItems: "center",
|
|
290
|
-
justifyContent: "flex-start"
|
|
291
|
+
justifyContent: "flex-start",
|
|
292
|
+
paddingLeft: s(8),
|
|
293
|
+
gap: s(4)
|
|
291
294
|
},
|
|
292
295
|
sideRight: {
|
|
293
|
-
justifyContent: "flex-end"
|
|
296
|
+
justifyContent: "flex-end",
|
|
297
|
+
paddingRight: s(8)
|
|
294
298
|
},
|
|
295
299
|
titleBlock: {
|
|
296
300
|
flex: 1,
|
package/dist/AppHeader.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { AppHeader } from './chunk-
|
|
1
|
+
export { AppHeader } from './chunk-H6MQL7PS.mjs';
|
|
2
2
|
import './chunk-ZTPYUU5C.mjs';
|
|
3
3
|
import './chunk-IFYMBOEN.mjs';
|
|
4
4
|
import './chunk-ARONDO7M.mjs';
|
|
@@ -6,4 +6,3 @@ import './chunk-QY3X2UYR.mjs';
|
|
|
6
6
|
import './chunk-MZ6WRTD2.mjs';
|
|
7
7
|
import './chunk-KSSVIFYR.mjs';
|
|
8
8
|
import './chunk-2CE3TQVY.mjs';
|
|
9
|
-
import './chunk-Y6FXYEAI.mjs';
|
package/dist/Avatar.mjs
CHANGED
package/dist/Badge.mjs
CHANGED
package/dist/Button.mjs
CHANGED
package/dist/ButtonGroup.mjs
CHANGED
package/dist/Card.mjs
CHANGED
package/dist/CategoryStrip.mjs
CHANGED
package/dist/Checkbox.d.mts
CHANGED
|
@@ -8,7 +8,8 @@ interface CheckboxProps {
|
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
style?: ViewStyle;
|
|
10
10
|
accessibilityLabel?: string;
|
|
11
|
+
accessibilityHint?: string;
|
|
11
12
|
}
|
|
12
|
-
declare function Checkbox({ checked, onCheckedChange, label, disabled, style, accessibilityLabel, }: CheckboxProps): React.JSX.Element;
|
|
13
|
+
declare function Checkbox({ checked, onCheckedChange, label, disabled, style, accessibilityLabel, accessibilityHint, }: CheckboxProps): React.JSX.Element;
|
|
13
14
|
|
|
14
15
|
export { Checkbox, type CheckboxProps };
|
package/dist/Checkbox.d.ts
CHANGED
|
@@ -8,7 +8,8 @@ interface CheckboxProps {
|
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
style?: ViewStyle;
|
|
10
10
|
accessibilityLabel?: string;
|
|
11
|
+
accessibilityHint?: string;
|
|
11
12
|
}
|
|
12
|
-
declare function Checkbox({ checked, onCheckedChange, label, disabled, style, accessibilityLabel, }: CheckboxProps): React.JSX.Element;
|
|
13
|
+
declare function Checkbox({ checked, onCheckedChange, label, disabled, style, accessibilityLabel, accessibilityHint, }: CheckboxProps): React.JSX.Element;
|
|
13
14
|
|
|
14
15
|
export { Checkbox, type CheckboxProps };
|
package/dist/Checkbox.js
CHANGED
|
@@ -72,7 +72,8 @@ function Checkbox({
|
|
|
72
72
|
label,
|
|
73
73
|
disabled,
|
|
74
74
|
style,
|
|
75
|
-
accessibilityLabel
|
|
75
|
+
accessibilityLabel,
|
|
76
|
+
accessibilityHint
|
|
76
77
|
}) {
|
|
77
78
|
const { colors } = useTheme();
|
|
78
79
|
const handlePress = () => {
|
|
@@ -93,6 +94,7 @@ function Checkbox({
|
|
|
93
94
|
touchSoundDisabled: true,
|
|
94
95
|
accessibilityRole: "checkbox",
|
|
95
96
|
accessibilityLabel: accessibilityLabel ?? label,
|
|
97
|
+
accessibilityHint,
|
|
96
98
|
accessibilityState: { checked, disabled: !!disabled }
|
|
97
99
|
},
|
|
98
100
|
/* @__PURE__ */ React2__default.default.createElement(
|
package/dist/Checkbox.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
export { Checkbox } from './chunk-
|
|
1
|
+
export { Checkbox } from './chunk-77UOVFIS.mjs';
|
|
2
2
|
import './chunk-M53LC4Q7.mjs';
|
|
3
3
|
import './chunk-IFYMBOEN.mjs';
|
|
4
4
|
import './chunk-ARONDO7M.mjs';
|
|
5
5
|
import './chunk-KSSVIFYR.mjs';
|
|
6
6
|
import './chunk-2CE3TQVY.mjs';
|
|
7
|
-
import './chunk-Y6FXYEAI.mjs';
|
package/dist/Chip.mjs
CHANGED
package/dist/ConfirmDialog.d.mts
CHANGED
|
@@ -11,7 +11,8 @@ interface ConfirmDialogProps {
|
|
|
11
11
|
showCloseButton?: boolean;
|
|
12
12
|
onConfirm: () => void;
|
|
13
13
|
onCancel: () => void;
|
|
14
|
+
accessibilityHint?: string;
|
|
14
15
|
}
|
|
15
|
-
declare function ConfirmDialog({ visible, title, subtitle, confirmLabel, cancelLabel, confirmVariant, loading, showCloseButton, onConfirm, onCancel, }: ConfirmDialogProps): React.JSX.Element;
|
|
16
|
+
declare function ConfirmDialog({ visible, title, subtitle, confirmLabel, cancelLabel, confirmVariant, loading, showCloseButton, onConfirm, onCancel, accessibilityHint, }: ConfirmDialogProps): React.JSX.Element;
|
|
16
17
|
|
|
17
18
|
export { ConfirmDialog, type ConfirmDialogProps };
|
package/dist/ConfirmDialog.d.ts
CHANGED
|
@@ -11,7 +11,8 @@ interface ConfirmDialogProps {
|
|
|
11
11
|
showCloseButton?: boolean;
|
|
12
12
|
onConfirm: () => void;
|
|
13
13
|
onCancel: () => void;
|
|
14
|
+
accessibilityHint?: string;
|
|
14
15
|
}
|
|
15
|
-
declare function ConfirmDialog({ visible, title, subtitle, confirmLabel, cancelLabel, confirmVariant, loading, showCloseButton, onConfirm, onCancel, }: ConfirmDialogProps): React.JSX.Element;
|
|
16
|
+
declare function ConfirmDialog({ visible, title, subtitle, confirmLabel, cancelLabel, confirmVariant, loading, showCloseButton, onConfirm, onCancel, accessibilityHint, }: ConfirmDialogProps): React.JSX.Element;
|
|
16
17
|
|
|
17
18
|
export { ConfirmDialog, type ConfirmDialogProps };
|
package/dist/ConfirmDialog.js
CHANGED
|
@@ -261,28 +261,39 @@ function ConfirmDialog({
|
|
|
261
261
|
loading = false,
|
|
262
262
|
showCloseButton = false,
|
|
263
263
|
onConfirm,
|
|
264
|
-
onCancel
|
|
264
|
+
onCancel,
|
|
265
|
+
accessibilityHint
|
|
265
266
|
}) {
|
|
266
267
|
const { colors } = useTheme();
|
|
267
268
|
const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
268
269
|
const ref = React3.useRef(null);
|
|
269
|
-
const
|
|
270
|
-
const
|
|
270
|
+
const dialogState = React3.useRef("idle");
|
|
271
|
+
const onCancelRef = React3.useRef(onCancel);
|
|
271
272
|
const name = React3.useId();
|
|
272
|
-
const
|
|
273
|
-
|
|
274
|
-
onCancel
|
|
273
|
+
const [tick, setTick] = React3.useState(0);
|
|
274
|
+
React3.useEffect(() => {
|
|
275
|
+
onCancelRef.current = onCancel;
|
|
275
276
|
}, [onCancel]);
|
|
277
|
+
const handleDismiss = React3.useCallback(() => {
|
|
278
|
+
dialogState.current = "idle";
|
|
279
|
+
onCancelRef.current?.();
|
|
280
|
+
setTick((t) => t + 1);
|
|
281
|
+
}, []);
|
|
276
282
|
React3.useEffect(() => {
|
|
277
|
-
if (visible
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
283
|
+
if (visible) {
|
|
284
|
+
if (dialogState.current === "idle") {
|
|
285
|
+
dialogState.current = "presenting";
|
|
286
|
+
impactMedium();
|
|
287
|
+
ref.current?.present();
|
|
288
|
+
dialogState.current = "presented";
|
|
289
|
+
}
|
|
290
|
+
} else {
|
|
291
|
+
if (dialogState.current === "presented" || dialogState.current === "presenting") {
|
|
292
|
+
dialogState.current = "dismissing";
|
|
293
|
+
ref.current?.dismiss();
|
|
294
|
+
}
|
|
284
295
|
}
|
|
285
|
-
}, [visible]);
|
|
296
|
+
}, [visible, tick]);
|
|
286
297
|
const renderBackdrop = React3.useCallback(
|
|
287
298
|
(props) => /* @__PURE__ */ React3__default.default.createElement(
|
|
288
299
|
bottomSheet.BottomSheetBackdrop,
|
|
@@ -332,6 +343,7 @@ function ConfirmDialog({
|
|
|
332
343
|
notificationSuccess();
|
|
333
344
|
onConfirm();
|
|
334
345
|
},
|
|
346
|
+
accessibilityHint,
|
|
335
347
|
icon: /* @__PURE__ */ React3__default.default.createElement(
|
|
336
348
|
vectorIcons.Feather,
|
|
337
349
|
{
|
package/dist/ConfirmDialog.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ConfirmDialog } from './chunk-
|
|
1
|
+
export { ConfirmDialog } from './chunk-UMZTPUB3.mjs';
|
|
2
2
|
import './chunk-Y6YS33GM.mjs';
|
|
3
3
|
import './chunk-M53LC4Q7.mjs';
|
|
4
4
|
import './chunk-IFYMBOEN.mjs';
|
|
@@ -7,4 +7,3 @@ import './chunk-QY3X2UYR.mjs';
|
|
|
7
7
|
import './chunk-MZ6WRTD2.mjs';
|
|
8
8
|
import './chunk-KSSVIFYR.mjs';
|
|
9
9
|
import './chunk-2CE3TQVY.mjs';
|
|
10
|
-
import './chunk-Y6FXYEAI.mjs';
|
package/dist/CurrencyDisplay.mjs
CHANGED
package/dist/CurrencyInput.mjs
CHANGED
package/dist/DetailRow.mjs
CHANGED
package/dist/EmptyState.mjs
CHANGED
package/dist/ErrorBoundary.mjs
CHANGED
package/dist/Form.mjs
CHANGED
package/dist/HolographicCard.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { PressableCard } from './chunk-IFYMBOEN.mjs';
|
|
2
2
|
import { impactLight } from './chunk-ARONDO7M.mjs';
|
|
3
3
|
import { RADIUS } from './chunk-QY3X2UYR.mjs';
|
|
4
|
-
import './chunk-Y6FXYEAI.mjs';
|
|
5
4
|
import React, { useMemo, useEffect } from 'react';
|
|
6
5
|
import { Platform } from 'react-native';
|
|
7
6
|
import { useImage, vec, Canvas, Group, Image, RoundedRect, LinearGradient } from '@shopify/react-native-skia';
|
package/dist/IconButton.mjs
CHANGED
package/dist/IconPicker.mjs
CHANGED
package/dist/ImageUpload.d.mts
CHANGED
|
@@ -20,14 +20,12 @@ interface ImageUploadProps {
|
|
|
20
20
|
borderRadius?: number;
|
|
21
21
|
/** Aspect ratio for the selected image. Defaults to 'cover'. */
|
|
22
22
|
resizeMode?: 'cover' | 'contain' | 'stretch';
|
|
23
|
-
/** Whether to allow the user to crop the image after selecting. Defaults to true. */
|
|
24
|
-
allowsEditing?: boolean;
|
|
25
23
|
disabled?: boolean;
|
|
26
24
|
style?: ViewStyle;
|
|
27
25
|
accessibilityLabel?: string;
|
|
28
26
|
/** Called synchronously when user taps the upload area, before dynamic import and permission request. */
|
|
29
27
|
onPickerStarting?: () => void;
|
|
30
28
|
}
|
|
31
|
-
declare function ImageUpload({ value, onChange, loading, placeholder, showPlaceholderText, width, height, borderRadius, resizeMode,
|
|
29
|
+
declare function ImageUpload({ value, onChange, loading, placeholder, showPlaceholderText, width, height, borderRadius, resizeMode, disabled, style, accessibilityLabel, onPickerStarting, }: ImageUploadProps): React.JSX.Element;
|
|
32
30
|
|
|
33
31
|
export { ImageUpload, type ImageUploadProps };
|
package/dist/ImageUpload.d.ts
CHANGED
|
@@ -20,14 +20,12 @@ interface ImageUploadProps {
|
|
|
20
20
|
borderRadius?: number;
|
|
21
21
|
/** Aspect ratio for the selected image. Defaults to 'cover'. */
|
|
22
22
|
resizeMode?: 'cover' | 'contain' | 'stretch';
|
|
23
|
-
/** Whether to allow the user to crop the image after selecting. Defaults to true. */
|
|
24
|
-
allowsEditing?: boolean;
|
|
25
23
|
disabled?: boolean;
|
|
26
24
|
style?: ViewStyle;
|
|
27
25
|
accessibilityLabel?: string;
|
|
28
26
|
/** Called synchronously when user taps the upload area, before dynamic import and permission request. */
|
|
29
27
|
onPickerStarting?: () => void;
|
|
30
28
|
}
|
|
31
|
-
declare function ImageUpload({ value, onChange, loading, placeholder, showPlaceholderText, width, height, borderRadius, resizeMode,
|
|
29
|
+
declare function ImageUpload({ value, onChange, loading, placeholder, showPlaceholderText, width, height, borderRadius, resizeMode, disabled, style, accessibilityLabel, onPickerStarting, }: ImageUploadProps): React.JSX.Element;
|
|
32
30
|
|
|
33
31
|
export { ImageUpload, type ImageUploadProps };
|
package/dist/ImageUpload.js
CHANGED
|
@@ -11,12 +11,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
11
11
|
|
|
12
12
|
var React3__default = /*#__PURE__*/_interopDefault(React3);
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
16
|
-
}) : x)(function(x) {
|
|
17
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
18
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
19
|
-
});
|
|
14
|
+
// src/components/ImageUpload/ImageUpload.tsx
|
|
20
15
|
var _haptics = null;
|
|
21
16
|
var _loaded = false;
|
|
22
17
|
async function getHaptics() {
|
|
@@ -127,7 +122,6 @@ function ImageUpload({
|
|
|
127
122
|
height = 200,
|
|
128
123
|
borderRadius = RADIUS.lg,
|
|
129
124
|
resizeMode = "cover",
|
|
130
|
-
allowsEditing = true,
|
|
131
125
|
disabled = false,
|
|
132
126
|
style,
|
|
133
127
|
accessibilityLabel,
|
|
@@ -135,25 +129,32 @@ function ImageUpload({
|
|
|
135
129
|
}) {
|
|
136
130
|
const { colors } = useTheme();
|
|
137
131
|
const [imageLoaded, setImageLoaded] = React3.useState(false);
|
|
132
|
+
const [isPicking, setIsPicking] = React3.useState(false);
|
|
138
133
|
const handlePress = async () => {
|
|
139
|
-
if (disabled || loading) return;
|
|
134
|
+
if (disabled || loading || isPicking) return;
|
|
140
135
|
impactLight();
|
|
141
136
|
onPickerStarting?.();
|
|
142
|
-
|
|
137
|
+
setIsPicking(true);
|
|
143
138
|
try {
|
|
144
|
-
|
|
139
|
+
const { launchImageLibrary } = await import('react-native-image-picker');
|
|
140
|
+
const result = await new Promise((resolve) => {
|
|
141
|
+
launchImageLibrary(
|
|
142
|
+
{
|
|
143
|
+
mediaType: "photo",
|
|
144
|
+
quality: 0.8,
|
|
145
|
+
selectionLimit: 1,
|
|
146
|
+
includeBase64: false
|
|
147
|
+
},
|
|
148
|
+
resolve
|
|
149
|
+
);
|
|
150
|
+
});
|
|
151
|
+
if (!result.didCancel && !result.errorCode && result.assets?.[0]?.uri) {
|
|
152
|
+
setImageLoaded(false);
|
|
153
|
+
onChange?.(result.assets[0].uri);
|
|
154
|
+
}
|
|
145
155
|
} catch {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}
|
|
149
|
-
const result = await picker.launchImageLibraryAsync({
|
|
150
|
-
mediaTypes: ["images"],
|
|
151
|
-
allowsEditing,
|
|
152
|
-
quality: 0.8
|
|
153
|
-
});
|
|
154
|
-
if (!result.canceled && result.assets?.[0]) {
|
|
155
|
-
setImageLoaded(false);
|
|
156
|
-
onChange?.(result.assets[0].uri);
|
|
156
|
+
} finally {
|
|
157
|
+
setIsPicking(false);
|
|
157
158
|
}
|
|
158
159
|
};
|
|
159
160
|
const containerStyle = {
|
|
@@ -196,7 +197,7 @@ function ImageUpload({
|
|
|
196
197
|
},
|
|
197
198
|
placeholder
|
|
198
199
|
) : null),
|
|
199
|
-
loading ? /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: [styles2.loadingOverlay, { backgroundColor: colors.overlay }] }, /* @__PURE__ */ React3__default.default.createElement(Spinner, { size: "md" })) : null,
|
|
200
|
+
loading || isPicking ? /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: [styles2.loadingOverlay, { backgroundColor: colors.overlay }] }, /* @__PURE__ */ React3__default.default.createElement(Spinner, { size: "md" })) : null,
|
|
200
201
|
value && !loading ? /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: styles2.editBadge, pointerEvents: "none" }, /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: [styles2.editBadgeInner, { backgroundColor: colors.overlay }] }, /* @__PURE__ */ React3__default.default.createElement(vectorIcons.Feather, { name: "edit-2", size: ms(12), color: "#fff" }))) : null
|
|
201
202
|
);
|
|
202
203
|
}
|
|
@@ -219,12 +220,12 @@ var styles2 = reactNative.StyleSheet.create({
|
|
|
219
220
|
},
|
|
220
221
|
editBadge: {
|
|
221
222
|
position: "absolute",
|
|
222
|
-
bottom: vs(
|
|
223
|
-
right: s(
|
|
223
|
+
bottom: vs(14),
|
|
224
|
+
right: s(14)
|
|
224
225
|
},
|
|
225
226
|
editBadgeInner: {
|
|
226
|
-
width: s(
|
|
227
|
-
height: s(
|
|
227
|
+
width: s(24),
|
|
228
|
+
height: s(24),
|
|
228
229
|
borderRadius: 999,
|
|
229
230
|
alignItems: "center",
|
|
230
231
|
justifyContent: "center"
|
package/dist/ImageUpload.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export { ImageUpload } from './chunk-
|
|
1
|
+
export { ImageUpload } from './chunk-HHOOFDBA.mjs';
|
|
2
2
|
import './chunk-2VIDP72N.mjs';
|
|
3
3
|
import './chunk-IFYMBOEN.mjs';
|
|
4
4
|
import './chunk-ARONDO7M.mjs';
|
|
5
5
|
import './chunk-QY3X2UYR.mjs';
|
|
6
6
|
import './chunk-KSSVIFYR.mjs';
|
|
7
7
|
import './chunk-2CE3TQVY.mjs';
|
|
8
|
-
import './chunk-Y6FXYEAI.mjs';
|
package/dist/ImageViewer.mjs
CHANGED
package/dist/Input.mjs
CHANGED
package/dist/LabelValue.mjs
CHANGED
package/dist/ListGroup.mjs
CHANGED
package/dist/ListItem.d.mts
CHANGED
|
@@ -64,8 +64,9 @@ interface ListItemProps {
|
|
|
64
64
|
captionStyle?: TextStyle;
|
|
65
65
|
/** Accessibility label override. Defaults to the title. */
|
|
66
66
|
accessibilityLabel?: string;
|
|
67
|
+
accessibilityHint?: string;
|
|
67
68
|
}
|
|
68
|
-
declare function ListItemBase({ imageSource, leftRender, rightRender, rightActions, leftIcon, rightIcon, leftIconColor, rightIconColor, title, subtitle, caption, variant, showChevron, showSeparator, onPress, disabled, style, titleStyle, subtitleStyle, subtitleNumberOfLines, captionStyle, accessibilityLabel, }: ListItemProps): React.JSX.Element;
|
|
69
|
+
declare function ListItemBase({ imageSource, leftRender, rightRender, rightActions, leftIcon, rightIcon, leftIconColor, rightIconColor, title, subtitle, caption, variant, showChevron, showSeparator, onPress, disabled, style, titleStyle, subtitleStyle, subtitleNumberOfLines, captionStyle, accessibilityLabel, accessibilityHint, }: ListItemProps): React.JSX.Element;
|
|
69
70
|
declare const ListItem: React.MemoExoticComponent<typeof ListItemBase>;
|
|
70
71
|
|
|
71
72
|
export { ListItem, type ListItemProps };
|
package/dist/ListItem.d.ts
CHANGED
|
@@ -64,8 +64,9 @@ interface ListItemProps {
|
|
|
64
64
|
captionStyle?: TextStyle;
|
|
65
65
|
/** Accessibility label override. Defaults to the title. */
|
|
66
66
|
accessibilityLabel?: string;
|
|
67
|
+
accessibilityHint?: string;
|
|
67
68
|
}
|
|
68
|
-
declare function ListItemBase({ imageSource, leftRender, rightRender, rightActions, leftIcon, rightIcon, leftIconColor, rightIconColor, title, subtitle, caption, variant, showChevron, showSeparator, onPress, disabled, style, titleStyle, subtitleStyle, subtitleNumberOfLines, captionStyle, accessibilityLabel, }: ListItemProps): React.JSX.Element;
|
|
69
|
+
declare function ListItemBase({ imageSource, leftRender, rightRender, rightActions, leftIcon, rightIcon, leftIconColor, rightIconColor, title, subtitle, caption, variant, showChevron, showSeparator, onPress, disabled, style, titleStyle, subtitleStyle, subtitleNumberOfLines, captionStyle, accessibilityLabel, accessibilityHint, }: ListItemProps): React.JSX.Element;
|
|
69
70
|
declare const ListItem: React.MemoExoticComponent<typeof ListItemBase>;
|
|
70
71
|
|
|
71
72
|
export { ListItem, type ListItemProps };
|
package/dist/ListItem.js
CHANGED
|
@@ -120,7 +120,8 @@ function ListItemBase({
|
|
|
120
120
|
subtitleStyle,
|
|
121
121
|
subtitleNumberOfLines = 2,
|
|
122
122
|
captionStyle,
|
|
123
|
-
accessibilityLabel
|
|
123
|
+
accessibilityLabel,
|
|
124
|
+
accessibilityHint
|
|
124
125
|
}) {
|
|
125
126
|
const { colors } = useTheme();
|
|
126
127
|
const handlePress = () => {
|
|
@@ -185,6 +186,7 @@ function ListItemBase({
|
|
|
185
186
|
activateOnHover: true,
|
|
186
187
|
accessibilityRole: "button",
|
|
187
188
|
accessibilityLabel: a11yLabel,
|
|
189
|
+
accessibilityHint,
|
|
188
190
|
accessibilityState: { disabled: !!disabled }
|
|
189
191
|
},
|
|
190
192
|
content
|
package/dist/ListItem.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export { ListItem } from './chunk-
|
|
1
|
+
export { ListItem } from './chunk-CZN6L2QU.mjs';
|
|
2
2
|
import './chunk-IFYMBOEN.mjs';
|
|
3
3
|
import './chunk-ARONDO7M.mjs';
|
|
4
4
|
import './chunk-QY3X2UYR.mjs';
|
|
5
5
|
import './chunk-MZ6WRTD2.mjs';
|
|
6
6
|
import './chunk-KSSVIFYR.mjs';
|
|
7
7
|
import './chunk-2CE3TQVY.mjs';
|
|
8
|
-
import './chunk-Y6FXYEAI.mjs';
|
package/dist/MediaCard.mjs
CHANGED