@retray-dev/ui-kit 7.0.1 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/COMPONENTS.md +554 -11
- package/EXAMPLES.md +2 -2
- package/README.md +14 -8
- package/dist/Accordion.js +57 -5
- package/dist/Accordion.mjs +4 -3
- package/dist/AlertBanner.js +4 -1
- package/dist/AlertBanner.mjs +3 -2
- package/dist/AppHeader.d.mts +40 -0
- package/dist/AppHeader.d.ts +40 -0
- package/dist/AppHeader.js +515 -0
- package/dist/AppHeader.mjs +10 -0
- package/dist/Avatar.js +39 -29
- package/dist/Avatar.mjs +2 -1
- package/dist/Badge.js +11 -1
- package/dist/Badge.mjs +2 -1
- package/dist/Button.d.mts +8 -3
- package/dist/Button.d.ts +8 -3
- package/dist/Button.js +126 -108
- package/dist/Button.mjs +6 -5
- package/dist/ButtonGroup.mjs +1 -0
- package/dist/Card.js +90 -70
- package/dist/Card.mjs +5 -4
- package/dist/CategoryStrip.js +79 -22
- package/dist/CategoryStrip.mjs +6 -6
- package/dist/Checkbox.js +118 -86
- package/dist/Checkbox.mjs +5 -5
- package/dist/Chip.js +113 -80
- package/dist/Chip.mjs +5 -5
- package/dist/ConfirmDialog.js +140 -110
- package/dist/ConfirmDialog.mjs +7 -6
- package/dist/CurrencyDisplay.mjs +1 -0
- package/dist/CurrencyInput.d.mts +1 -1
- package/dist/CurrencyInput.d.ts +1 -1
- package/dist/CurrencyInput.js +9 -5
- package/dist/CurrencyInput.mjs +5 -4
- package/dist/DetailRow.mjs +1 -0
- package/dist/EmptyState.js +131 -111
- package/dist/EmptyState.mjs +7 -6
- package/dist/ErrorBoundary.d.mts +42 -0
- package/dist/ErrorBoundary.d.ts +42 -0
- package/dist/ErrorBoundary.js +351 -0
- package/dist/ErrorBoundary.mjs +7 -0
- package/dist/Form.mjs +1 -0
- package/dist/HolographicCard.d.mts +55 -0
- package/dist/HolographicCard.d.ts +55 -0
- package/dist/HolographicCard.js +316 -0
- package/dist/HolographicCard.mjs +191 -0
- package/dist/IconButton.d.mts +8 -3
- package/dist/IconButton.d.ts +8 -3
- package/dist/IconButton.js +115 -98
- package/dist/IconButton.mjs +5 -4
- package/dist/ImageViewer.d.mts +23 -0
- package/dist/ImageViewer.d.ts +23 -0
- package/dist/ImageViewer.js +582 -0
- package/dist/ImageViewer.mjs +8 -0
- package/dist/Input.mjs +4 -3
- package/dist/LabelValue.mjs +1 -0
- package/dist/ListGroup.mjs +1 -0
- package/dist/ListItem.js +131 -117
- package/dist/ListItem.mjs +6 -5
- package/dist/MediaCard.js +54 -6
- package/dist/MediaCard.mjs +6 -5
- package/dist/MenuGroup.mjs +1 -0
- package/dist/MenuItem.js +91 -79
- package/dist/MenuItem.mjs +6 -5
- package/dist/MonthPicker.d.mts +10 -2
- package/dist/MonthPicker.d.ts +10 -2
- package/dist/MonthPicker.js +80 -17
- package/dist/MonthPicker.mjs +3 -2
- package/dist/PagerDots.d.mts +35 -0
- package/dist/PagerDots.d.ts +35 -0
- package/dist/PagerDots.js +392 -0
- package/dist/PagerDots.mjs +7 -0
- package/dist/Pressable.d.mts +5 -5
- package/dist/Pressable.d.ts +5 -5
- package/dist/Pressable.js +97 -86
- package/dist/Pressable.mjs +5 -4
- package/dist/PricingCard.d.mts +50 -0
- package/dist/PricingCard.d.ts +50 -0
- package/dist/PricingCard.js +636 -0
- package/dist/PricingCard.mjs +11 -0
- package/dist/Progress.mjs +3 -2
- package/dist/RadioGroup.js +81 -30
- package/dist/RadioGroup.mjs +5 -5
- package/dist/RetrayProvider.d.mts +2 -0
- package/dist/RetrayProvider.d.ts +2 -0
- package/dist/RetrayProvider.js +214 -0
- package/dist/RetrayProvider.mjs +5 -0
- package/dist/Select.js +51 -4
- package/dist/Select.mjs +5 -4
- package/dist/SelectableGrid.d.mts +44 -0
- package/dist/SelectableGrid.d.ts +44 -0
- package/dist/SelectableGrid.js +448 -0
- package/dist/SelectableGrid.mjs +9 -0
- package/dist/Separator.mjs +1 -0
- package/dist/Sheet.d.mts +13 -1
- package/dist/Sheet.d.ts +13 -1
- package/dist/Sheet.js +115 -5
- package/dist/Sheet.mjs +4 -2
- package/dist/Skeleton.d.mts +50 -0
- package/dist/Skeleton.d.ts +50 -0
- package/dist/Skeleton.js +61 -0
- package/dist/Skeleton.mjs +4 -2
- package/dist/Slider.js +51 -4
- package/dist/Slider.mjs +3 -2
- package/dist/Spinner.js +28 -7
- package/dist/Spinner.mjs +2 -1
- package/dist/Switch.js +98 -48
- package/dist/Switch.mjs +4 -3
- package/dist/TabBar.d.mts +42 -0
- package/dist/TabBar.d.ts +42 -0
- package/dist/TabBar.js +361 -0
- package/dist/TabBar.mjs +6 -0
- package/dist/Tabs.js +92 -62
- package/dist/Tabs.mjs +5 -4
- package/dist/Text.js +16 -0
- package/dist/Text.mjs +2 -1
- package/dist/Textarea.mjs +4 -3
- package/dist/Toast.d.mts +7 -7
- package/dist/Toast.d.ts +7 -7
- package/dist/Toast.mjs +1 -0
- package/dist/Toggle.d.mts +6 -3
- package/dist/Toggle.d.ts +6 -3
- package/dist/Toggle.js +135 -120
- package/dist/Toggle.mjs +5 -5
- package/dist/VirtualList.mjs +1 -0
- package/dist/{chunk-7H2OR44A.mjs → chunk-26BCI223.mjs} +1 -1
- package/dist/{chunk-CRYBX2CM.mjs → chunk-2TFTAWVJ.mjs} +44 -59
- package/dist/chunk-3DKJ2GIC.mjs +30 -0
- package/dist/{chunk-KWCPOM6W.mjs → chunk-3U4SSNWP.mjs} +32 -48
- package/dist/chunk-4I7D47FH.mjs +139 -0
- package/dist/chunk-4K625MVM.mjs +142 -0
- package/dist/{chunk-MN7OG7IY.mjs → chunk-6OAZJ577.mjs} +6 -4
- package/dist/{chunk-L7E7TVEZ.mjs → chunk-756RAKE4.mjs} +2 -2
- package/dist/{chunk-HSPSMN6U.mjs → chunk-7QHVVCB3.mjs} +2 -2
- package/dist/{chunk-URLL5JBR.mjs → chunk-A3A6KNQN.mjs} +3 -3
- package/dist/chunk-AJ7ZDNBT.mjs +120 -0
- package/dist/{chunk-FTLJOUOQ.mjs → chunk-AV4EMIRH.mjs} +25 -28
- package/dist/chunk-AZJF2BLK.mjs +115 -0
- package/dist/chunk-BNP626TY.mjs +159 -0
- package/dist/{chunk-5IKW3VNC.mjs → chunk-DVK4G2GT.mjs} +17 -1
- package/dist/{chunk-6LQYY7HC.mjs → chunk-EH745HE5.mjs} +2 -2
- package/dist/chunk-EJ7ZPXOH.mjs +163 -0
- package/dist/{chunk-RKLHUDZS.mjs → chunk-GD6KXMG5.mjs} +29 -15
- package/dist/{chunk-RR2VQLKE.mjs → chunk-GQYFLP3D.mjs} +14 -17
- package/dist/{chunk-Y6MXOREN.mjs → chunk-ID72TK46.mjs} +8 -17
- package/dist/{chunk-NQGVLMWG.mjs → chunk-JMOZEC77.mjs} +1 -1
- package/dist/{chunk-GCWOGZYL.mjs → chunk-JT7HKXRB.mjs} +39 -29
- package/dist/{chunk-LWG526VX.mjs → chunk-KIHCWCWL.mjs} +47 -62
- package/dist/chunk-LXJIIOYQ.mjs +104 -0
- package/dist/{chunk-SBZYEV4S.mjs → chunk-M6ZXVBTK.mjs} +5 -2
- package/dist/{chunk-XDMN67KV.mjs → chunk-MAC465BB.mjs} +10 -8
- package/dist/chunk-MBMXYJJV.mjs +36 -0
- package/dist/chunk-MLF3EZFW.mjs +119 -0
- package/dist/chunk-NA7PARID.mjs +147 -0
- package/dist/{chunk-QXGYKWI7.mjs → chunk-O3HA6TYM.mjs} +9 -4
- package/dist/{chunk-63357L2X.mjs → chunk-OB4JUQ3O.mjs} +1 -1
- package/dist/{chunk-AU2VDY4P.mjs → chunk-PFZTM6D5.mjs} +52 -4
- package/dist/chunk-QKH5ZOD5.mjs +97 -0
- package/dist/{chunk-KZJRQOIU.mjs → chunk-TERDKCLE.mjs} +11 -1
- package/dist/{chunk-U4N7WF4Z.mjs → chunk-UREA2GYY.mjs} +28 -23
- package/dist/{chunk-TAJ2PQ2O.mjs → chunk-VGTDN7SW.mjs} +7 -6
- package/dist/{chunk-URDE3EUU.mjs → chunk-VQ57HWPL.mjs} +27 -15
- package/dist/chunk-WBOOUHSS.mjs +62 -0
- package/dist/{chunk-GNGLDL6Z.mjs → chunk-WJLKJMKR.mjs} +18 -0
- package/dist/{chunk-YZJAFS4P.mjs → chunk-X4G6APW6.mjs} +22 -19
- package/dist/chunk-Y6FXYEAI.mjs +8 -0
- package/dist/chunk-YFZ3ELX5.mjs +16 -0
- package/dist/{chunk-QCNARS3X.mjs → chunk-YNROWHQJ.mjs} +1 -1
- package/dist/chunk-Z4BVUWW6.mjs +196 -0
- package/dist/{chunk-GPOUINK5.mjs → chunk-ZJKGQMYH.mjs} +10 -27
- package/dist/index-wt-orHUi.d.mts +85 -0
- package/dist/index-wt-orHUi.d.ts +85 -0
- package/dist/index.d.mts +59 -51
- package/dist/index.d.ts +59 -51
- package/dist/index.js +1940 -744
- package/dist/index.mjs +49 -39
- package/package.json +35 -5
- package/src/components/Accordion/Accordion.tsx +12 -1
- package/src/components/AlertBanner/AlertBanner.tsx +5 -0
- package/src/components/AppHeader/AppHeader.tsx +172 -0
- package/src/components/AppHeader/index.ts +1 -0
- package/src/components/Avatar/Avatar.tsx +10 -2
- package/src/components/Badge/Badge.tsx +8 -1
- package/src/components/Button/Button.tsx +20 -27
- package/src/components/Card/Card.tsx +12 -23
- package/src/components/CategoryStrip/CategoryStrip.tsx +17 -21
- package/src/components/Checkbox/Checkbox.tsx +26 -40
- package/src/components/Chip/Chip.tsx +24 -33
- package/src/components/CurrencyInput/CurrencyInput.tsx +10 -8
- package/src/components/EmptyState/EmptyState.tsx +2 -1
- package/src/components/ErrorBoundary/ErrorBoundary.tsx +153 -0
- package/src/components/ErrorBoundary/index.ts +1 -0
- package/src/components/HolographicCard/HolographicCard.tsx +315 -0
- package/src/components/HolographicCard/index.ts +1 -0
- package/src/components/IconButton/IconButton.tsx +19 -27
- package/src/components/ImageViewer/ImageViewer.tsx +290 -0
- package/src/components/ImageViewer/index.ts +1 -0
- package/src/components/ListItem/ListItem.tsx +70 -67
- package/src/components/MediaCard/MediaCard.tsx +8 -2
- package/src/components/MenuItem/MenuItem.tsx +10 -25
- package/src/components/MonthPicker/MonthPicker.tsx +39 -13
- package/src/components/MonthPicker/index.ts +1 -1
- package/src/components/PagerDots/PagerDots.tsx +200 -0
- package/src/components/PagerDots/index.ts +1 -0
- package/src/components/Pressable/Pressable.tsx +19 -35
- package/src/components/PricingCard/PricingCard.tsx +220 -0
- package/src/components/PricingCard/index.ts +1 -0
- package/src/components/RadioGroup/RadioGroup.tsx +14 -27
- package/src/components/RetrayProvider/RetrayProvider.tsx +59 -0
- package/src/components/RetrayProvider/index.ts +1 -0
- package/src/components/SelectableGrid/SelectableGrid.tsx +205 -0
- package/src/components/SelectableGrid/index.ts +1 -0
- package/src/components/Sheet/Sheet.tsx +65 -1
- package/src/components/Skeleton/Skeleton.tsx +142 -1
- package/src/components/Spinner/Spinner.tsx +17 -2
- package/src/components/Switch/Switch.tsx +30 -58
- package/src/components/TabBar/TabBar.tsx +169 -0
- package/src/components/TabBar/index.ts +1 -0
- package/src/components/Tabs/Tabs.tsx +23 -26
- package/src/components/Text/Text.tsx +2 -0
- package/src/components/Toggle/Toggle.tsx +35 -51
- package/src/fonts.ts +4 -1
- package/src/index.ts +23 -2
- package/src/utils/animations.ts +29 -1
- package/src/utils/fontGuard.ts +34 -0
- package/src/utils/haptics.ts +211 -9
- package/src/utils/pressable.ts +66 -0
- package/dist/chunk-76PFOSM2.mjs +0 -41
- package/dist/chunk-DITNP6PL.mjs +0 -106
- package/dist/chunk-JBLL7U3U.mjs +0 -64
- package/dist/chunk-LG4DO3DK.mjs +0 -174
- package/dist/chunk-RMMK64W5.mjs +0 -54
- package/dist/chunk-RTC3CFXF.mjs +0 -29
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A personal React Native / Expo UI component library with a built-in design system, dark mode support, haptic feedback, and smooth animations.
|
|
4
4
|
|
|
5
|
-
-
|
|
5
|
+
- 49 components across 9 categories (plus the deep-import `HolographicCard`)
|
|
6
6
|
- Light/dark theme with 12 public tokens (25 resolved) and full customization
|
|
7
7
|
- Apple HIG–compliant touch targets and haptic feedback
|
|
8
8
|
- Animated interactions: spring press, sliding tabs, accordion easing, animated progress
|
|
@@ -23,11 +23,15 @@ pnpm add @retray-dev/ui-kit
|
|
|
23
23
|
Install these in your app if not already present:
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
|
-
pnpm add expo-font expo-haptics expo-linear-gradient react-native-safe-area-context @gorhom/bottom-sheet react-native-reanimated react-native-gesture-handler react-native-worklets @react-native-picker/picker @react-native-community/slider @expo/vector-icons react-native-size-matters react-native-svg react-native-screens
|
|
26
|
+
pnpm add expo-font expo-haptics expo-linear-gradient react-native-safe-area-context @gorhom/bottom-sheet react-native-reanimated react-native-gesture-handler react-native-worklets @react-native-picker/picker @react-native-community/slider @expo/vector-icons react-native-size-matters react-native-svg react-native-screens sonner-native pressto
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
For Expo projects, run `npx expo install` instead to get SDK-compatible versions.
|
|
30
30
|
|
|
31
|
+
`pressto` is **required** — it powers the press animations on every interactive component. Omitting it crashes the import. `sonner-native` is **required** for `Toast`.
|
|
32
|
+
|
|
33
|
+
**Optional:** for richer haptics in a custom dev build (not Expo Go), also `pnpm add react-native-pulsar`. The kit falls back to `expo-haptics` automatically when it is absent. For the deep-import `HolographicCard`, add `@shopify/react-native-skia expo-sensors`.
|
|
34
|
+
|
|
31
35
|
Add the Worklets Babel plugin to `babel.config.js` (required by `@gorhom/bottom-sheet`):
|
|
32
36
|
|
|
33
37
|
```js
|
|
@@ -141,14 +145,16 @@ import { SPACING, ICON_SIZES, RADIUS, SHADOWS, BREAKPOINTS, TYPOGRAPHY } from '@
|
|
|
141
145
|
| Category | Components |
|
|
142
146
|
| ----------- | ----------------------------------------------------------------------------------------------- |
|
|
143
147
|
| Display | `Text`, `Badge`, `Avatar`, `Separator`, `Spinner`, `Skeleton`, `Progress`, `CurrencyDisplay` |
|
|
144
|
-
| Surfaces | `Card`, `AlertBanner`, `EmptyState`, `MediaCard`
|
|
145
|
-
| Form | `Button`, `ButtonGroup`, `IconButton`, `Input`, `CurrencyInput`, `Textarea`, `Checkbox`, `Switch`, `Toggle`, `RadioGroup`, `Select`, `Slider` |
|
|
148
|
+
| Surfaces | `Card`, `AlertBanner`, `EmptyState`, `MediaCard`, `PricingCard` |
|
|
149
|
+
| Form | `Form` (+ `Form.Field` / `Form.Section` / `Form.Footer`), `Button`, `ButtonGroup`, `IconButton`, `Input`, `CurrencyInput`, `Textarea`, `Checkbox`, `Switch`, `Toggle`, `RadioGroup`, `Select`, `Slider`, `SelectableGrid` |
|
|
146
150
|
| Composition | `Tabs`, `Accordion` |
|
|
147
|
-
|
|
|
151
|
+
| Navigation | `AppHeader`, `TabBar`, `PagerDots` |
|
|
152
|
+
| Overlays | `Sheet`, `ConfirmDialog`, `ImageViewer` |
|
|
148
153
|
| Feedback | `Toast` / `ToastProvider` / `useToast` |
|
|
149
|
-
| Data | `ListItem`, `ListGroup
|
|
150
|
-
|
|
|
151
|
-
|
|
154
|
+
| Data | `ListItem`, `ListGroup` (+ `.Header` / `.Footer`), `MenuItem`, `MenuGroup` (+ `.Header` / `.Footer`), `VirtualList`, `Chip` / `ChipGroup`, `LabelValue`, `MonthPicker`, `CategoryStrip`, `DetailRow` |
|
|
155
|
+
| Utilities | `Pressable`, `Icon`, `RetrayProvider`, `ErrorBoundary` |
|
|
156
|
+
|
|
157
|
+
Deep-import only: `HolographicCard` — `import { HolographicCard } from '@retray-dev/ui-kit/HolographicCard'`.
|
|
152
158
|
|
|
153
159
|
### Quick examples
|
|
154
160
|
|
package/dist/Accordion.js
CHANGED
|
@@ -23,18 +23,65 @@ var FontAwesome5__default = /*#__PURE__*/_interopDefault(FontAwesome5);
|
|
|
23
23
|
var MaterialIcons__default = /*#__PURE__*/_interopDefault(MaterialIcons);
|
|
24
24
|
var Ionicons__default = /*#__PURE__*/_interopDefault(Ionicons);
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
27
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
28
|
+
}) : x)(function(x) {
|
|
29
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
30
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
31
|
+
});
|
|
27
32
|
var _haptics = null;
|
|
33
|
+
var _hapticsLoaded = false;
|
|
28
34
|
async function getHaptics() {
|
|
29
35
|
if (reactNative.Platform.OS === "web") return null;
|
|
30
|
-
if (!
|
|
31
|
-
|
|
36
|
+
if (!_hapticsLoaded) {
|
|
37
|
+
_hapticsLoaded = true;
|
|
38
|
+
try {
|
|
39
|
+
_haptics = await import('expo-haptics');
|
|
40
|
+
} catch {
|
|
41
|
+
_haptics = null;
|
|
42
|
+
}
|
|
32
43
|
}
|
|
33
44
|
return _haptics;
|
|
34
45
|
}
|
|
46
|
+
var _pulsar = null;
|
|
47
|
+
var _pulsarChecked = false;
|
|
48
|
+
var _pulsarAvailable = false;
|
|
49
|
+
function isPulsarNativeRegistered() {
|
|
50
|
+
try {
|
|
51
|
+
const g = globalThis;
|
|
52
|
+
if (typeof g.__turboModuleProxy === "function") {
|
|
53
|
+
return g.__turboModuleProxy("RNPulsar") != null;
|
|
54
|
+
}
|
|
55
|
+
return reactNative.NativeModules?.RNPulsar != null;
|
|
56
|
+
} catch {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function getPulsar() {
|
|
61
|
+
if (reactNative.Platform.OS === "web") return null;
|
|
62
|
+
if (!_pulsarChecked) {
|
|
63
|
+
_pulsarChecked = true;
|
|
64
|
+
try {
|
|
65
|
+
if (isPulsarNativeRegistered()) {
|
|
66
|
+
_pulsar = __require("react-native-pulsar");
|
|
67
|
+
_pulsarAvailable = true;
|
|
68
|
+
}
|
|
69
|
+
} catch {
|
|
70
|
+
_pulsar = null;
|
|
71
|
+
_pulsarAvailable = false;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return _pulsarAvailable ? _pulsar : null;
|
|
75
|
+
}
|
|
35
76
|
function selectionAsync() {
|
|
36
77
|
if (reactNative.Platform.OS === "web") return;
|
|
37
|
-
getHaptics().then((h) =>
|
|
78
|
+
getHaptics().then((h) => {
|
|
79
|
+
if (h) {
|
|
80
|
+
h.selectionAsync();
|
|
81
|
+
} else {
|
|
82
|
+
getPulsar()?.Presets.System.selection();
|
|
83
|
+
}
|
|
84
|
+
});
|
|
38
85
|
}
|
|
39
86
|
|
|
40
87
|
// src/theme/colorUtils.ts
|
|
@@ -267,7 +314,7 @@ function AccordionItemComponent({
|
|
|
267
314
|
height.value = e.nativeEvent.layout.height;
|
|
268
315
|
}
|
|
269
316
|
},
|
|
270
|
-
item.content
|
|
317
|
+
typeof item.content === "string" || typeof item.content === "number" ? /* @__PURE__ */ React3__default.default.createElement(reactNative.Text, { style: [styles.contentText, { color: colors.foregroundMuted }], allowFontScaling: true }, item.content) : item.content
|
|
271
318
|
)));
|
|
272
319
|
}
|
|
273
320
|
function Accordion({ items, type = "single", defaultValue, style }) {
|
|
@@ -334,6 +381,11 @@ var styles = reactNative.StyleSheet.create({
|
|
|
334
381
|
paddingBottom: vs(12),
|
|
335
382
|
position: "absolute",
|
|
336
383
|
width: "100%"
|
|
384
|
+
},
|
|
385
|
+
contentText: {
|
|
386
|
+
fontFamily: "Sohne-Regular",
|
|
387
|
+
fontSize: ms(14),
|
|
388
|
+
lineHeight: ms(20)
|
|
337
389
|
}
|
|
338
390
|
});
|
|
339
391
|
|
package/dist/Accordion.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export { Accordion } from './chunk-
|
|
1
|
+
export { Accordion } from './chunk-O3HA6TYM.mjs';
|
|
2
|
+
import './chunk-EJ7ZPXOH.mjs';
|
|
3
|
+
import './chunk-DVK4G2GT.mjs';
|
|
2
4
|
import './chunk-T7XZ7H7Y.mjs';
|
|
3
|
-
import './chunk-RTC3CFXF.mjs';
|
|
4
|
-
import './chunk-5IKW3VNC.mjs';
|
|
5
5
|
import './chunk-SOYNZDVY.mjs';
|
|
6
6
|
import './chunk-2CE3TQVY.mjs';
|
|
7
|
+
import './chunk-Y6FXYEAI.mjs';
|
package/dist/AlertBanner.js
CHANGED
|
@@ -205,6 +205,7 @@ function AlertBanner({ title, description, variant = "default", icon, iconName,
|
|
|
205
205
|
/* @__PURE__ */ React3__default.default.createElement(vectorIcons.Entypo, { name: "info-with-circle", size: ms(16), color: accentColor })
|
|
206
206
|
);
|
|
207
207
|
const effectiveIcon = iconName ? renderIcon(iconName, ms(16), iconColor ?? accentColor) : icon ?? defaultIcon;
|
|
208
|
+
const a11yLabel = description ? `${title}. ${description}` : title;
|
|
208
209
|
return /* @__PURE__ */ React3__default.default.createElement(
|
|
209
210
|
reactNative.View,
|
|
210
211
|
{
|
|
@@ -212,7 +213,9 @@ function AlertBanner({ title, description, variant = "default", icon, iconName,
|
|
|
212
213
|
styles.container,
|
|
213
214
|
{ backgroundColor: bgColor, borderWidth: 1, borderColor },
|
|
214
215
|
style
|
|
215
|
-
]
|
|
216
|
+
],
|
|
217
|
+
accessibilityRole: "alert",
|
|
218
|
+
accessibilityLabel: a11yLabel
|
|
216
219
|
},
|
|
217
220
|
/* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: styles.iconSlot }, effectiveIcon),
|
|
218
221
|
/* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: styles.content }, /* @__PURE__ */ React3__default.default.createElement(reactNative.Text, { style: [styles.title, { color: colors.foreground }], allowFontScaling: true }, title), description ? /* @__PURE__ */ React3__default.default.createElement(reactNative.Text, { style: [styles.description, { color: colors.foreground, opacity: 0.85 }], allowFontScaling: true }, description) : null)
|
package/dist/AlertBanner.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export { AlertBanner } from './chunk-
|
|
2
|
-
import './chunk-T7XZ7H7Y.mjs';
|
|
1
|
+
export { AlertBanner } from './chunk-M6ZXVBTK.mjs';
|
|
3
2
|
import './chunk-QY3X2UYR.mjs';
|
|
3
|
+
import './chunk-T7XZ7H7Y.mjs';
|
|
4
4
|
import './chunk-SOYNZDVY.mjs';
|
|
5
5
|
import './chunk-2CE3TQVY.mjs';
|
|
6
|
+
import './chunk-Y6FXYEAI.mjs';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ViewStyle } from 'react-native';
|
|
3
|
+
|
|
4
|
+
interface AppHeaderProps {
|
|
5
|
+
/** Primary title. */
|
|
6
|
+
title?: string;
|
|
7
|
+
/** Secondary text below the title. */
|
|
8
|
+
subtitle?: string;
|
|
9
|
+
/** Show a back button on the left and call this when pressed. */
|
|
10
|
+
onBack?: () => void;
|
|
11
|
+
/** Icon name for the back button. Defaults to `'chevron-left'`. */
|
|
12
|
+
backIconName?: string;
|
|
13
|
+
/** Custom left content — overrides the back button. */
|
|
14
|
+
left?: React.ReactNode;
|
|
15
|
+
/** Custom right content (actions). */
|
|
16
|
+
right?: React.ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Title alignment.
|
|
19
|
+
* - `'auto'` (default): left on narrow screens, centered when width ≥ `BREAKPOINTS.wide`.
|
|
20
|
+
* - `'left'` / `'center'`: force alignment.
|
|
21
|
+
*/
|
|
22
|
+
titleAlign?: 'auto' | 'left' | 'center';
|
|
23
|
+
/** Render a hairline border under the header. Defaults to true. */
|
|
24
|
+
bordered?: boolean;
|
|
25
|
+
/** Apply the top safe-area inset as padding. Defaults to true. */
|
|
26
|
+
withSafeArea?: boolean;
|
|
27
|
+
/** Background color. Defaults to theme `background`. */
|
|
28
|
+
backgroundColor?: string;
|
|
29
|
+
style?: ViewStyle;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Top app bar / screen chrome — back button, title/subtitle, and a right action
|
|
33
|
+
* slot. Responsive: the title left-aligns on phones and centers on wide layouts.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* <AppHeader title="Settings" onBack={navigation.goBack} right={<IconButton iconName="more-horizontal" variant="text" />} />
|
|
37
|
+
*/
|
|
38
|
+
declare function AppHeader({ title, subtitle, onBack, backIconName, left, right, titleAlign, bordered, withSafeArea, backgroundColor, style, }: AppHeaderProps): React.JSX.Element;
|
|
39
|
+
|
|
40
|
+
export { AppHeader, type AppHeaderProps };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ViewStyle } from 'react-native';
|
|
3
|
+
|
|
4
|
+
interface AppHeaderProps {
|
|
5
|
+
/** Primary title. */
|
|
6
|
+
title?: string;
|
|
7
|
+
/** Secondary text below the title. */
|
|
8
|
+
subtitle?: string;
|
|
9
|
+
/** Show a back button on the left and call this when pressed. */
|
|
10
|
+
onBack?: () => void;
|
|
11
|
+
/** Icon name for the back button. Defaults to `'chevron-left'`. */
|
|
12
|
+
backIconName?: string;
|
|
13
|
+
/** Custom left content — overrides the back button. */
|
|
14
|
+
left?: React.ReactNode;
|
|
15
|
+
/** Custom right content (actions). */
|
|
16
|
+
right?: React.ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Title alignment.
|
|
19
|
+
* - `'auto'` (default): left on narrow screens, centered when width ≥ `BREAKPOINTS.wide`.
|
|
20
|
+
* - `'left'` / `'center'`: force alignment.
|
|
21
|
+
*/
|
|
22
|
+
titleAlign?: 'auto' | 'left' | 'center';
|
|
23
|
+
/** Render a hairline border under the header. Defaults to true. */
|
|
24
|
+
bordered?: boolean;
|
|
25
|
+
/** Apply the top safe-area inset as padding. Defaults to true. */
|
|
26
|
+
withSafeArea?: boolean;
|
|
27
|
+
/** Background color. Defaults to theme `background`. */
|
|
28
|
+
backgroundColor?: string;
|
|
29
|
+
style?: ViewStyle;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Top app bar / screen chrome — back button, title/subtitle, and a right action
|
|
33
|
+
* slot. Responsive: the title left-aligns on phones and centers on wide layouts.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* <AppHeader title="Settings" onBack={navigation.goBack} right={<IconButton iconName="more-horizontal" variant="text" />} />
|
|
37
|
+
*/
|
|
38
|
+
declare function AppHeader({ title, subtitle, onBack, backIconName, left, right, titleAlign, bordered, withSafeArea, backgroundColor, style, }: AppHeaderProps): React.JSX.Element;
|
|
39
|
+
|
|
40
|
+
export { AppHeader, type AppHeaderProps };
|