@webority-technologies/mobile 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/{Header/Header.js → AppBar/AppBar.js} +6 -6
- package/lib/commonjs/components/{Header → AppBar}/index.js +4 -4
- package/lib/commonjs/components/{Icon/Icon.js → AppIcon/AppIcon.js} +5 -5
- package/lib/commonjs/components/{Icon → AppIcon}/index.js +4 -4
- package/lib/commonjs/components/{FAB/FAB.js → FloatingActionButton/FloatingActionButton.js} +11 -11
- package/lib/commonjs/components/{FAB → FloatingActionButton}/index.js +6 -6
- package/lib/commonjs/components/{Field/Field.js → FormField/FormField.js} +5 -5
- package/lib/commonjs/components/{LoadingSpinner → FormField}/index.js +4 -4
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +2 -2
- package/lib/commonjs/components/SearchBar/SearchBar.js +3 -3
- package/lib/commonjs/components/{SkeletonLoader/SkeletonLoader.js → Skeleton/Skeleton.js} +1 -1
- package/lib/commonjs/components/{SkeletonLoader → Skeleton}/SkeletonContent.js +14 -8
- package/lib/commonjs/components/Skeleton/SkeletonList.js +82 -0
- package/lib/commonjs/components/{SkeletonLoader → Skeleton}/index.js +15 -8
- package/lib/commonjs/components/{LoadingSpinner/LoadingSpinner.js → Spinner/Spinner.js} +5 -5
- package/lib/commonjs/components/{Field → Spinner}/index.js +4 -4
- package/lib/commonjs/components/index.js +36 -30
- package/lib/module/components/{Header/Header.js → AppBar/AppBar.js} +6 -6
- package/lib/module/components/AppBar/index.js +4 -0
- package/lib/module/components/{Icon/Icon.js → AppIcon/AppIcon.js} +5 -5
- package/lib/module/components/AppIcon/index.js +4 -0
- package/lib/module/components/{FAB/FAB.js → FloatingActionButton/FloatingActionButton.js} +10 -10
- package/lib/module/components/FloatingActionButton/index.js +4 -0
- package/lib/module/components/{Field/Field.js → FormField/FormField.js} +5 -5
- package/lib/module/components/FormField/index.js +4 -0
- package/lib/module/components/ImageGallery/ImageGallery.js +2 -2
- package/lib/module/components/SearchBar/SearchBar.js +3 -3
- package/lib/module/components/{SkeletonLoader/SkeletonLoader.js → Skeleton/Skeleton.js} +1 -1
- package/lib/module/components/{SkeletonLoader → Skeleton}/SkeletonContent.js +9 -3
- package/lib/module/components/Skeleton/SkeletonList.js +77 -0
- package/lib/module/components/Skeleton/index.js +6 -0
- package/lib/module/components/{LoadingSpinner/LoadingSpinner.js → Spinner/Spinner.js} +5 -5
- package/lib/module/components/Spinner/index.js +4 -0
- package/lib/module/components/index.js +6 -6
- package/lib/typescript/commonjs/components/{Header/Header.d.ts → AppBar/AppBar.d.ts} +13 -13
- package/lib/typescript/commonjs/components/AppBar/index.d.ts +3 -0
- package/lib/typescript/{module/components/Icon/Icon.d.ts → commonjs/components/AppIcon/AppIcon.d.ts} +5 -5
- package/lib/typescript/commonjs/components/AppIcon/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/FloatingActionButton/FloatingActionButton.d.ts +53 -0
- package/lib/typescript/commonjs/components/FloatingActionButton/index.d.ts +3 -0
- package/lib/typescript/{module/components/Field/Field.d.ts → commonjs/components/FormField/FormField.d.ts} +7 -7
- package/lib/typescript/commonjs/components/FormField/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/{SkeletonLoader/SkeletonLoader.d.ts → Skeleton/Skeleton.d.ts} +1 -1
- package/lib/typescript/{module/components/SkeletonLoader → commonjs/components/Skeleton}/SkeletonContent.d.ts +7 -1
- package/lib/typescript/commonjs/components/Skeleton/SkeletonList.d.ts +27 -0
- package/lib/typescript/commonjs/components/{SkeletonLoader → Skeleton}/index.d.ts +4 -2
- package/lib/typescript/commonjs/components/Spinner/Spinner.d.ts +20 -0
- package/lib/typescript/commonjs/components/Spinner/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/index.d.ts +12 -12
- package/lib/typescript/module/components/{Header/Header.d.ts → AppBar/AppBar.d.ts} +13 -13
- package/lib/typescript/module/components/AppBar/index.d.ts +3 -0
- package/lib/typescript/{commonjs/components/Icon/Icon.d.ts → module/components/AppIcon/AppIcon.d.ts} +5 -5
- package/lib/typescript/module/components/AppIcon/index.d.ts +3 -0
- package/lib/typescript/module/components/FloatingActionButton/FloatingActionButton.d.ts +53 -0
- package/lib/typescript/module/components/FloatingActionButton/index.d.ts +3 -0
- package/lib/typescript/{commonjs/components/Field/Field.d.ts → module/components/FormField/FormField.d.ts} +7 -7
- package/lib/typescript/module/components/FormField/index.d.ts +3 -0
- package/lib/typescript/module/components/{SkeletonLoader/SkeletonLoader.d.ts → Skeleton/Skeleton.d.ts} +1 -1
- package/lib/typescript/{commonjs/components/SkeletonLoader → module/components/Skeleton}/SkeletonContent.d.ts +7 -1
- package/lib/typescript/module/components/Skeleton/SkeletonList.d.ts +27 -0
- package/lib/typescript/module/components/{SkeletonLoader → Skeleton}/index.d.ts +4 -2
- package/lib/typescript/module/components/Spinner/Spinner.d.ts +20 -0
- package/lib/typescript/module/components/Spinner/index.d.ts +3 -0
- package/lib/typescript/module/components/index.d.ts +12 -12
- package/package.json +2 -2
- package/lib/module/components/FAB/index.js +0 -4
- package/lib/module/components/Field/index.js +0 -4
- package/lib/module/components/Header/index.js +0 -4
- package/lib/module/components/Icon/index.js +0 -4
- package/lib/module/components/LoadingSpinner/index.js +0 -4
- package/lib/module/components/SkeletonLoader/index.js +0 -5
- package/lib/typescript/commonjs/components/FAB/FAB.d.ts +0 -53
- package/lib/typescript/commonjs/components/FAB/index.d.ts +0 -3
- package/lib/typescript/commonjs/components/Field/index.d.ts +0 -3
- package/lib/typescript/commonjs/components/Header/index.d.ts +0 -3
- package/lib/typescript/commonjs/components/Icon/index.d.ts +0 -3
- package/lib/typescript/commonjs/components/LoadingSpinner/LoadingSpinner.d.ts +0 -20
- package/lib/typescript/commonjs/components/LoadingSpinner/index.d.ts +0 -3
- package/lib/typescript/module/components/FAB/FAB.d.ts +0 -53
- package/lib/typescript/module/components/FAB/index.d.ts +0 -3
- package/lib/typescript/module/components/Field/index.d.ts +0 -3
- package/lib/typescript/module/components/Header/index.d.ts +0 -3
- package/lib/typescript/module/components/Icon/index.d.ts +0 -3
- package/lib/typescript/module/components/LoadingSpinner/LoadingSpinner.d.ts +0 -20
- package/lib/typescript/module/components/LoadingSpinner/index.d.ts +0 -3
|
@@ -15,6 +15,18 @@ Object.defineProperty(exports, "AccordionGroup", {
|
|
|
15
15
|
return _index.AccordionGroup;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
+
Object.defineProperty(exports, "AppBar", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _index19.AppBar;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "AppIcon", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _index20.AppIcon;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
18
30
|
Object.defineProperty(exports, "Avatar", {
|
|
19
31
|
enumerable: true,
|
|
20
32
|
get: function () {
|
|
@@ -117,22 +129,16 @@ Object.defineProperty(exports, "EmptyState", {
|
|
|
117
129
|
return _index15.EmptyState;
|
|
118
130
|
}
|
|
119
131
|
});
|
|
120
|
-
Object.defineProperty(exports, "
|
|
132
|
+
Object.defineProperty(exports, "FloatingActionButton", {
|
|
121
133
|
enumerable: true,
|
|
122
134
|
get: function () {
|
|
123
|
-
return _index17.
|
|
135
|
+
return _index17.FloatingActionButton;
|
|
124
136
|
}
|
|
125
137
|
});
|
|
126
|
-
Object.defineProperty(exports, "
|
|
138
|
+
Object.defineProperty(exports, "FloatingActionButtonGroup", {
|
|
127
139
|
enumerable: true,
|
|
128
140
|
get: function () {
|
|
129
|
-
return _index17.
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
Object.defineProperty(exports, "Field", {
|
|
133
|
-
enumerable: true,
|
|
134
|
-
get: function () {
|
|
135
|
-
return _index16.Field;
|
|
141
|
+
return _index17.FloatingActionButtonGroup;
|
|
136
142
|
}
|
|
137
143
|
});
|
|
138
144
|
Object.defineProperty(exports, "ForceUpdateDialog", {
|
|
@@ -141,16 +147,10 @@ Object.defineProperty(exports, "ForceUpdateDialog", {
|
|
|
141
147
|
return _index18.ForceUpdateDialog;
|
|
142
148
|
}
|
|
143
149
|
});
|
|
144
|
-
Object.defineProperty(exports, "
|
|
145
|
-
enumerable: true,
|
|
146
|
-
get: function () {
|
|
147
|
-
return _index19.Header;
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
Object.defineProperty(exports, "Icon", {
|
|
150
|
+
Object.defineProperty(exports, "FormField", {
|
|
151
151
|
enumerable: true,
|
|
152
152
|
get: function () {
|
|
153
|
-
return
|
|
153
|
+
return _index16.FormField;
|
|
154
154
|
}
|
|
155
155
|
});
|
|
156
156
|
Object.defineProperty(exports, "ImageGallery", {
|
|
@@ -171,12 +171,6 @@ Object.defineProperty(exports, "ListItem", {
|
|
|
171
171
|
return _index23.ListItem;
|
|
172
172
|
}
|
|
173
173
|
});
|
|
174
|
-
Object.defineProperty(exports, "LoadingSpinner", {
|
|
175
|
-
enumerable: true,
|
|
176
|
-
get: function () {
|
|
177
|
-
return _index24.LoadingSpinner;
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
174
|
Object.defineProperty(exports, "Modal", {
|
|
181
175
|
enumerable: true,
|
|
182
176
|
get: function () {
|
|
@@ -267,6 +261,12 @@ Object.defineProperty(exports, "SkeletonContent", {
|
|
|
267
261
|
return _index35.SkeletonContent;
|
|
268
262
|
}
|
|
269
263
|
});
|
|
264
|
+
Object.defineProperty(exports, "SkeletonList", {
|
|
265
|
+
enumerable: true,
|
|
266
|
+
get: function () {
|
|
267
|
+
return _index35.SkeletonList;
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
270
|
Object.defineProperty(exports, "SkeletonListItem", {
|
|
271
271
|
enumerable: true,
|
|
272
272
|
get: function () {
|
|
@@ -285,6 +285,12 @@ Object.defineProperty(exports, "Slider", {
|
|
|
285
285
|
return _index36.Slider;
|
|
286
286
|
}
|
|
287
287
|
});
|
|
288
|
+
Object.defineProperty(exports, "Spinner", {
|
|
289
|
+
enumerable: true,
|
|
290
|
+
get: function () {
|
|
291
|
+
return _index24.Spinner;
|
|
292
|
+
}
|
|
293
|
+
});
|
|
288
294
|
Object.defineProperty(exports, "Stepper", {
|
|
289
295
|
enumerable: true,
|
|
290
296
|
get: function () {
|
|
@@ -362,15 +368,15 @@ var _index12 = require("./Dialog/index.js");
|
|
|
362
368
|
var _index13 = require("./Divider/index.js");
|
|
363
369
|
var _index14 = require("./Drawer/index.js");
|
|
364
370
|
var _index15 = require("./EmptyState/index.js");
|
|
365
|
-
var _index16 = require("./
|
|
366
|
-
var _index17 = require("./
|
|
371
|
+
var _index16 = require("./FormField/index.js");
|
|
372
|
+
var _index17 = require("./FloatingActionButton/index.js");
|
|
367
373
|
var _index18 = require("./ForceUpdateDialog/index.js");
|
|
368
|
-
var _index19 = require("./
|
|
369
|
-
var _index20 = require("./
|
|
374
|
+
var _index19 = require("./AppBar/index.js");
|
|
375
|
+
var _index20 = require("./AppIcon/index.js");
|
|
370
376
|
var _index21 = require("./ImageGallery/index.js");
|
|
371
377
|
var _index22 = require("./Input/index.js");
|
|
372
378
|
var _index23 = require("./ListItem/index.js");
|
|
373
|
-
var _index24 = require("./
|
|
379
|
+
var _index24 = require("./Spinner/index.js");
|
|
374
380
|
var _index25 = require("./Modal/index.js");
|
|
375
381
|
var _index26 = require("./NumberInput/index.js");
|
|
376
382
|
var _index27 = require("./OTPInput/index.js");
|
|
@@ -381,7 +387,7 @@ var _index31 = require("./SearchBar/index.js");
|
|
|
381
387
|
var _index32 = require("./SegmentedControl/index.js");
|
|
382
388
|
var _index33 = require("./Select/index.js");
|
|
383
389
|
var _index34 = require("./Stepper/index.js");
|
|
384
|
-
var _index35 = require("./
|
|
390
|
+
var _index35 = require("./Skeleton/index.js");
|
|
385
391
|
var _index36 = require("./Slider/index.js");
|
|
386
392
|
var _index37 = require("./Swipeable/index.js");
|
|
387
393
|
var _index38 = require("./Switch/index.js");
|
|
@@ -90,7 +90,7 @@ const ActionButton = ({
|
|
|
90
90
|
const COLLAPSE_RANGE = 60;
|
|
91
91
|
const LARGE_TITLE_SCALE_END = 0.71; // 2xl(24) -> lg(~17) ≈ 0.71
|
|
92
92
|
|
|
93
|
-
const
|
|
93
|
+
const AppBar = /*#__PURE__*/forwardRef((props, ref) => {
|
|
94
94
|
const {
|
|
95
95
|
title,
|
|
96
96
|
subtitle,
|
|
@@ -227,12 +227,12 @@ const Header = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
227
227
|
children: rightActions?.map((action, index) => /*#__PURE__*/_jsx(ActionButton, {
|
|
228
228
|
action: action,
|
|
229
229
|
side: "right"
|
|
230
|
-
}, `
|
|
230
|
+
}, `appbar-right-${index}`))
|
|
231
231
|
})]
|
|
232
232
|
})]
|
|
233
233
|
});
|
|
234
234
|
});
|
|
235
|
-
|
|
235
|
+
AppBar.displayName = 'AppBar';
|
|
236
236
|
const buildStyles = theme => StyleSheet.create({
|
|
237
237
|
root: {
|
|
238
238
|
width: '100%'
|
|
@@ -330,6 +330,6 @@ const buildActionStyles = theme => StyleSheet.create({
|
|
|
330
330
|
lineHeight: 12
|
|
331
331
|
}
|
|
332
332
|
});
|
|
333
|
-
export {
|
|
334
|
-
export default
|
|
335
|
-
//# sourceMappingURL=
|
|
333
|
+
export { AppBar };
|
|
334
|
+
export default AppBar;
|
|
335
|
+
//# sourceMappingURL=AppBar.js.map
|
|
@@ -60,7 +60,7 @@ const resolveFamily = family => {
|
|
|
60
60
|
return Feather;
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
|
-
const
|
|
63
|
+
const AppIcon = /*#__PURE__*/forwardRef((props, ref) => {
|
|
64
64
|
const {
|
|
65
65
|
name,
|
|
66
66
|
family = 'feather',
|
|
@@ -99,13 +99,13 @@ const Icon = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
99
99
|
})
|
|
100
100
|
});
|
|
101
101
|
});
|
|
102
|
-
|
|
102
|
+
AppIcon.displayName = 'AppIcon';
|
|
103
103
|
const buildStyles = () => StyleSheet.create({
|
|
104
104
|
wrapper: {
|
|
105
105
|
alignItems: 'center',
|
|
106
106
|
justifyContent: 'center'
|
|
107
107
|
}
|
|
108
108
|
});
|
|
109
|
-
export {
|
|
110
|
-
export default
|
|
111
|
-
//# sourceMappingURL=
|
|
109
|
+
export { AppIcon };
|
|
110
|
+
export default AppIcon;
|
|
111
|
+
//# sourceMappingURL=AppIcon.js.map
|
|
@@ -6,7 +6,7 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
|
6
6
|
import { useTheme } from "../../theme/index.js";
|
|
7
7
|
import { usePressAnimation } from "../../hooks/usePressAnimation.js";
|
|
8
8
|
import { triggerHaptic } from "../../utils/hapticUtils.js";
|
|
9
|
-
import {
|
|
9
|
+
import { AppIcon } from "../AppIcon/index.js";
|
|
10
10
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
11
11
|
const sizeMap = {
|
|
12
12
|
sm: {
|
|
@@ -50,7 +50,7 @@ const toneForeground = (theme, tone) => {
|
|
|
50
50
|
const isIconConfig = value => {
|
|
51
51
|
return typeof value === 'object' && value !== null && ! /*#__PURE__*/React.isValidElement(value) && typeof value.name === 'string';
|
|
52
52
|
};
|
|
53
|
-
const
|
|
53
|
+
const FloatingActionButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
54
54
|
const {
|
|
55
55
|
icon,
|
|
56
56
|
onPress,
|
|
@@ -104,7 +104,7 @@ const FAB = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
104
104
|
triggerHaptic('impactLight');
|
|
105
105
|
onPress();
|
|
106
106
|
};
|
|
107
|
-
const renderedIcon = isIconConfig(icon) ? /*#__PURE__*/_jsx(
|
|
107
|
+
const renderedIcon = isIconConfig(icon) ? /*#__PURE__*/_jsx(AppIcon, {
|
|
108
108
|
name: icon.name,
|
|
109
109
|
family: icon.family ?? 'feather',
|
|
110
110
|
size: sizeStyles.iconSize,
|
|
@@ -190,7 +190,7 @@ const FAB = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
190
190
|
})
|
|
191
191
|
});
|
|
192
192
|
});
|
|
193
|
-
|
|
193
|
+
FloatingActionButton.displayName = 'FloatingActionButton';
|
|
194
194
|
const buildStyles = _theme => StyleSheet.create({
|
|
195
195
|
base: {
|
|
196
196
|
flexDirection: 'row',
|
|
@@ -204,14 +204,14 @@ const buildStyles = _theme => StyleSheet.create({
|
|
|
204
204
|
});
|
|
205
205
|
|
|
206
206
|
// =====================================================================
|
|
207
|
-
//
|
|
208
|
-
// N secondary
|
|
207
|
+
// FloatingActionButtonGroup — speed-dial: primary button that expands radially upward into
|
|
208
|
+
// N secondary buttons. Animations use the native driver (opacity, transform)
|
|
209
209
|
// so they remain smooth during JS thread work.
|
|
210
210
|
// =====================================================================
|
|
211
211
|
|
|
212
212
|
const SECONDARY_GAP = 16;
|
|
213
213
|
const STAGGER_MS = 50;
|
|
214
|
-
const
|
|
214
|
+
const FloatingActionButtonGroup = props => {
|
|
215
215
|
const {
|
|
216
216
|
primaryIcon,
|
|
217
217
|
primaryActiveIcon,
|
|
@@ -447,6 +447,6 @@ const buildGroupStyles = _theme => StyleSheet.create({
|
|
|
447
447
|
alignSelf: 'center'
|
|
448
448
|
}
|
|
449
449
|
});
|
|
450
|
-
export {
|
|
451
|
-
export default
|
|
452
|
-
//# sourceMappingURL=
|
|
450
|
+
export { FloatingActionButton, FloatingActionButtonGroup };
|
|
451
|
+
export default FloatingActionButton;
|
|
452
|
+
//# sourceMappingURL=FloatingActionButton.js.map
|
|
@@ -4,7 +4,7 @@ import React, { forwardRef, useEffect, useMemo, useRef } from 'react';
|
|
|
4
4
|
import { Animated, StyleSheet, Text, View } from 'react-native';
|
|
5
5
|
import { useTheme } from "../../theme/index.js";
|
|
6
6
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
7
|
-
const
|
|
7
|
+
const FormField = /*#__PURE__*/forwardRef((props, ref) => {
|
|
8
8
|
const {
|
|
9
9
|
label,
|
|
10
10
|
helperText,
|
|
@@ -78,7 +78,7 @@ const Field = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
78
78
|
}) : null]
|
|
79
79
|
});
|
|
80
80
|
});
|
|
81
|
-
|
|
81
|
+
FormField.displayName = 'FormField';
|
|
82
82
|
const buildStyles = theme => StyleSheet.create({
|
|
83
83
|
rootStacked: {
|
|
84
84
|
flexDirection: 'column',
|
|
@@ -118,6 +118,6 @@ const buildStyles = theme => StyleSheet.create({
|
|
|
118
118
|
color: theme.colors.error
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
|
-
export {
|
|
122
|
-
export default
|
|
123
|
-
//# sourceMappingURL=
|
|
121
|
+
export { FormField };
|
|
122
|
+
export default FormField;
|
|
123
|
+
//# sourceMappingURL=FormField.js.map
|
|
@@ -24,7 +24,7 @@ import { Dimensions, Image, Modal as RNModal, Pressable, StyleSheet, Text, View
|
|
|
24
24
|
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
|
25
25
|
import Animated, { runOnJS, useAnimatedStyle, useSharedValue, withSpring, withTiming } from 'react-native-reanimated';
|
|
26
26
|
import { Carousel } from "../Carousel/index.js";
|
|
27
|
-
import {
|
|
27
|
+
import { AppIcon } from "../AppIcon/index.js";
|
|
28
28
|
import { useTheme } from "../../theme/index.js";
|
|
29
29
|
import { triggerHaptic } from "../../utils/index.js";
|
|
30
30
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -187,7 +187,7 @@ const Lightbox = ({
|
|
|
187
187
|
accessibilityLabel: "Close gallery",
|
|
188
188
|
style: styles.closeButton,
|
|
189
189
|
hitSlop: 12,
|
|
190
|
-
children: /*#__PURE__*/_jsx(
|
|
190
|
+
children: /*#__PURE__*/_jsx(AppIcon, {
|
|
191
191
|
name: "x",
|
|
192
192
|
family: "feather",
|
|
193
193
|
size: "lg",
|
|
@@ -5,7 +5,7 @@ import { Animated, Easing, Pressable, StyleSheet, Text, TextInput, View } from '
|
|
|
5
5
|
import { useTheme } from "../../theme/index.js";
|
|
6
6
|
import { triggerHaptic } from "../../utils/hapticUtils.js";
|
|
7
7
|
import { useDebounce } from "../../hooks/useDebounce.js";
|
|
8
|
-
import {
|
|
8
|
+
import { AppIcon } from "../AppIcon/index.js";
|
|
9
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
10
|
const sizeMap = {
|
|
11
11
|
sm: {
|
|
@@ -148,7 +148,7 @@ const SearchBar = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
148
148
|
style: [styles.leftSlot, {
|
|
149
149
|
marginRight: sizeStyles.gap
|
|
150
150
|
}],
|
|
151
|
-
children: leftIcon ? leftIcon : /*#__PURE__*/_jsx(
|
|
151
|
+
children: leftIcon ? leftIcon : /*#__PURE__*/_jsx(AppIcon, {
|
|
152
152
|
name: "search",
|
|
153
153
|
family: "feather",
|
|
154
154
|
size: sizeStyles.iconSize,
|
|
@@ -184,7 +184,7 @@ const SearchBar = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
184
184
|
style: [styles.rightSlot, {
|
|
185
185
|
marginLeft: sizeStyles.gap
|
|
186
186
|
}],
|
|
187
|
-
children: /*#__PURE__*/_jsx(
|
|
187
|
+
children: /*#__PURE__*/_jsx(AppIcon, {
|
|
188
188
|
name: "x",
|
|
189
189
|
family: "feather",
|
|
190
190
|
size: sizeStyles.iconSize,
|
|
@@ -298,4 +298,4 @@ const buildStyles = _theme => StyleSheet.create({
|
|
|
298
298
|
});
|
|
299
299
|
export { Skeleton, SkeletonCircle, SkeletonText, SkeletonAvatar, SkeletonCard, SkeletonListItem };
|
|
300
300
|
export default Skeleton;
|
|
301
|
-
//# sourceMappingURL=
|
|
301
|
+
//# sourceMappingURL=Skeleton.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import React, { Children, cloneElement, isValidElement, useState } from 'react';
|
|
4
4
|
import { Image, StyleSheet, Text, View } from 'react-native';
|
|
5
|
-
import { Skeleton } from "./
|
|
5
|
+
import { Skeleton } from "./Skeleton.js";
|
|
6
6
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
7
|
const flattenStyle = style => {
|
|
8
8
|
if (!style) return {};
|
|
@@ -108,6 +108,7 @@ const SkeletonContent = ({
|
|
|
108
108
|
variant = 'shimmer',
|
|
109
109
|
speed = 'normal',
|
|
110
110
|
mode = 'auto',
|
|
111
|
+
count = 1,
|
|
111
112
|
style,
|
|
112
113
|
testID
|
|
113
114
|
}) => {
|
|
@@ -116,13 +117,18 @@ const SkeletonContent = ({
|
|
|
116
117
|
children: children
|
|
117
118
|
});
|
|
118
119
|
}
|
|
120
|
+
const repeated = count > 1 ? Array.from({
|
|
121
|
+
length: count
|
|
122
|
+
}, (_, i) => /*#__PURE__*/_jsx(React.Fragment, {
|
|
123
|
+
children: children
|
|
124
|
+
}, `sk-rep-${i}`)) : children;
|
|
119
125
|
if (mode === 'block') {
|
|
120
126
|
return /*#__PURE__*/_jsx(BlockSkeleton, {
|
|
121
127
|
style: style,
|
|
122
128
|
testID: testID,
|
|
123
129
|
variant: variant,
|
|
124
130
|
speed: speed,
|
|
125
|
-
children:
|
|
131
|
+
children: repeated
|
|
126
132
|
});
|
|
127
133
|
}
|
|
128
134
|
return /*#__PURE__*/_jsx(View, {
|
|
@@ -132,7 +138,7 @@ const SkeletonContent = ({
|
|
|
132
138
|
accessibilityLabel: "Loading",
|
|
133
139
|
accessibilityRole: "progressbar",
|
|
134
140
|
accessibilityLiveRegion: "polite",
|
|
135
|
-
children: skeletonizeNode(
|
|
141
|
+
children: skeletonizeNode(repeated, variant, speed)
|
|
136
142
|
});
|
|
137
143
|
};
|
|
138
144
|
SkeletonContent.displayName = 'SkeletonContent';
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { FlatList, View } from 'react-native';
|
|
5
|
+
import { SkeletonContent } from "./SkeletonContent.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
/**
|
|
8
|
+
* Drop-in FlatList replacement that renders `placeholderCount` skeleton rows while
|
|
9
|
+
* `loading` is true, then transitions to a real `<FlatList>` of `data` once loaded.
|
|
10
|
+
*
|
|
11
|
+
* Solves the "FlatList with empty data renders nothing" problem so consumer screens
|
|
12
|
+
* don't have to maintain a separate placeholder branch.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* <SkeletonList
|
|
16
|
+
* loading={isLoading}
|
|
17
|
+
* data={sites}
|
|
18
|
+
* renderItem={({ item }) => <SiteCard item={item} />}
|
|
19
|
+
* renderPlaceholder={() => <SiteCard loading />}
|
|
20
|
+
* placeholderCount={3}
|
|
21
|
+
* horizontal
|
|
22
|
+
* />
|
|
23
|
+
*/
|
|
24
|
+
function SkeletonListInner(props) {
|
|
25
|
+
const {
|
|
26
|
+
loading,
|
|
27
|
+
data,
|
|
28
|
+
renderItem,
|
|
29
|
+
renderPlaceholder,
|
|
30
|
+
placeholderCount = 3,
|
|
31
|
+
variant,
|
|
32
|
+
speed,
|
|
33
|
+
placeholderContainerStyle,
|
|
34
|
+
horizontal,
|
|
35
|
+
contentContainerStyle,
|
|
36
|
+
style,
|
|
37
|
+
testID,
|
|
38
|
+
...rest
|
|
39
|
+
} = props;
|
|
40
|
+
if (loading) {
|
|
41
|
+
const slots = Array.from({
|
|
42
|
+
length: Math.max(0, placeholderCount)
|
|
43
|
+
}, (_, index) => /*#__PURE__*/_jsx(React.Fragment, {
|
|
44
|
+
children: renderPlaceholder ? renderPlaceholder(index) : null
|
|
45
|
+
}, `sk-list-${index}`));
|
|
46
|
+
return /*#__PURE__*/_jsx(SkeletonContent, {
|
|
47
|
+
loading: true,
|
|
48
|
+
variant: variant,
|
|
49
|
+
speed: speed,
|
|
50
|
+
style: style,
|
|
51
|
+
testID: testID,
|
|
52
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
53
|
+
style: [horizontal ? styles.row : styles.column, placeholderContainerStyle],
|
|
54
|
+
children: slots
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
return /*#__PURE__*/_jsx(FlatList, {
|
|
59
|
+
data: data ?? [],
|
|
60
|
+
renderItem: renderItem,
|
|
61
|
+
horizontal: horizontal,
|
|
62
|
+
contentContainerStyle: contentContainerStyle,
|
|
63
|
+
style: style,
|
|
64
|
+
testID: testID,
|
|
65
|
+
...rest
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
const styles = {
|
|
69
|
+
row: {
|
|
70
|
+
flexDirection: 'row'
|
|
71
|
+
},
|
|
72
|
+
column: {
|
|
73
|
+
flexDirection: 'column'
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
export const SkeletonList = SkeletonListInner;
|
|
77
|
+
//# sourceMappingURL=SkeletonList.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export { Skeleton, SkeletonCircle, SkeletonText, SkeletonAvatar, SkeletonCard, SkeletonListItem, default } from "./Skeleton.js";
|
|
4
|
+
export { SkeletonContent } from "./SkeletonContent.js";
|
|
5
|
+
export { SkeletonList } from "./SkeletonList.js";
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -48,7 +48,7 @@ const Dot = ({
|
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
};
|
|
51
|
-
const
|
|
51
|
+
const Spinner = /*#__PURE__*/forwardRef((props, ref) => {
|
|
52
52
|
const {
|
|
53
53
|
size = 'medium',
|
|
54
54
|
color,
|
|
@@ -139,7 +139,7 @@ const LoadingSpinner = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
139
139
|
children: inner
|
|
140
140
|
});
|
|
141
141
|
});
|
|
142
|
-
|
|
142
|
+
Spinner.displayName = 'Spinner';
|
|
143
143
|
const buildStyles = theme => StyleSheet.create({
|
|
144
144
|
inline: {
|
|
145
145
|
alignItems: 'center',
|
|
@@ -174,6 +174,6 @@ const buildStyles = theme => StyleSheet.create({
|
|
|
174
174
|
textAlign: 'center'
|
|
175
175
|
}
|
|
176
176
|
});
|
|
177
|
-
export {
|
|
178
|
-
export default
|
|
179
|
-
//# sourceMappingURL=
|
|
177
|
+
export { Spinner };
|
|
178
|
+
export default Spinner;
|
|
179
|
+
//# sourceMappingURL=Spinner.js.map
|
|
@@ -17,15 +17,15 @@ export { Dialog } from "./Dialog/index.js";
|
|
|
17
17
|
export { Divider } from "./Divider/index.js";
|
|
18
18
|
export { Drawer } from "./Drawer/index.js";
|
|
19
19
|
export { EmptyState } from "./EmptyState/index.js";
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
20
|
+
export { FormField } from "./FormField/index.js";
|
|
21
|
+
export { FloatingActionButton, FloatingActionButtonGroup } from "./FloatingActionButton/index.js";
|
|
22
22
|
export { ForceUpdateDialog } from "./ForceUpdateDialog/index.js";
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
23
|
+
export { AppBar } from "./AppBar/index.js";
|
|
24
|
+
export { AppIcon } from "./AppIcon/index.js";
|
|
25
25
|
export { ImageGallery } from "./ImageGallery/index.js";
|
|
26
26
|
export { Input } from "./Input/index.js";
|
|
27
27
|
export { ListItem } from "./ListItem/index.js";
|
|
28
|
-
export {
|
|
28
|
+
export { Spinner } from "./Spinner/index.js";
|
|
29
29
|
export { Modal } from "./Modal/index.js";
|
|
30
30
|
export { NumberInput } from "./NumberInput/index.js";
|
|
31
31
|
export { OTPInput } from "./OTPInput/index.js";
|
|
@@ -36,7 +36,7 @@ export { SearchBar } from "./SearchBar/index.js";
|
|
|
36
36
|
export { SegmentedControl } from "./SegmentedControl/index.js";
|
|
37
37
|
export { Select } from "./Select/index.js";
|
|
38
38
|
export { Stepper } from "./Stepper/index.js";
|
|
39
|
-
export { Skeleton, SkeletonAvatar, SkeletonCard, SkeletonCircle, SkeletonContent, SkeletonListItem, SkeletonText } from "./
|
|
39
|
+
export { Skeleton, SkeletonAvatar, SkeletonCard, SkeletonCircle, SkeletonContent, SkeletonList, SkeletonListItem, SkeletonText } from "./Skeleton/index.js";
|
|
40
40
|
export { Slider } from "./Slider/index.js";
|
|
41
41
|
export { Swipeable } from "./Swipeable/index.js";
|
|
42
42
|
export { Switch } from "./Switch/index.js";
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Animated, View } from 'react-native';
|
|
3
3
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
4
|
-
export type
|
|
5
|
-
export type
|
|
6
|
-
export interface
|
|
4
|
+
export type AppBarVariant = 'default' | 'large' | 'compact';
|
|
5
|
+
export type AppBarTitleAlignment = 'left' | 'center';
|
|
6
|
+
export interface AppBarAction {
|
|
7
7
|
icon: React.ReactNode;
|
|
8
8
|
onPress: () => void;
|
|
9
9
|
accessibilityLabel?: string;
|
|
10
10
|
testID?: string;
|
|
11
11
|
}
|
|
12
|
-
export interface
|
|
12
|
+
export interface AppBarRightAction extends AppBarAction {
|
|
13
13
|
badge?: number | string;
|
|
14
14
|
}
|
|
15
|
-
export interface
|
|
15
|
+
export interface AppBarProps {
|
|
16
16
|
title?: string;
|
|
17
17
|
subtitle?: string;
|
|
18
|
-
titleAlignment?:
|
|
19
|
-
leftAction?:
|
|
20
|
-
rightActions?:
|
|
21
|
-
variant?:
|
|
18
|
+
titleAlignment?: AppBarTitleAlignment;
|
|
19
|
+
leftAction?: AppBarAction;
|
|
20
|
+
rightActions?: AppBarRightAction[];
|
|
21
|
+
variant?: AppBarVariant;
|
|
22
22
|
transparent?: boolean;
|
|
23
23
|
/**
|
|
24
24
|
* Optional ScrollView vertical offset (Animated.Value) used to drive the
|
|
@@ -30,7 +30,7 @@ export interface HeaderProps {
|
|
|
30
30
|
style?: StyleProp<ViewStyle>;
|
|
31
31
|
testID?: string;
|
|
32
32
|
}
|
|
33
|
-
declare const
|
|
34
|
-
export {
|
|
35
|
-
export default
|
|
36
|
-
//# sourceMappingURL=
|
|
33
|
+
declare const AppBar: React.ForwardRefExoticComponent<AppBarProps & React.RefAttributes<View>>;
|
|
34
|
+
export { AppBar };
|
|
35
|
+
export default AppBar;
|
|
36
|
+
//# sourceMappingURL=AppBar.d.ts.map
|
package/lib/typescript/{module/components/Icon/Icon.d.ts → commonjs/components/AppIcon/AppIcon.d.ts}
RENAMED
|
@@ -4,7 +4,7 @@ import type { StyleProp, ViewStyle } from 'react-native';
|
|
|
4
4
|
export type IconFamily = 'feather' | 'material-community' | 'material' | 'ionicons';
|
|
5
5
|
export type IconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | number;
|
|
6
6
|
export type IconTone = 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info' | 'muted';
|
|
7
|
-
export interface
|
|
7
|
+
export interface AppIconProps {
|
|
8
8
|
name: string;
|
|
9
9
|
family?: IconFamily;
|
|
10
10
|
size?: IconSize;
|
|
@@ -14,7 +14,7 @@ export interface IconProps {
|
|
|
14
14
|
accessibilityLabel?: string;
|
|
15
15
|
testID?: string;
|
|
16
16
|
}
|
|
17
|
-
declare const
|
|
18
|
-
export {
|
|
19
|
-
export default
|
|
20
|
-
//# sourceMappingURL=
|
|
17
|
+
declare const AppIcon: React.ForwardRefExoticComponent<AppIconProps & React.RefAttributes<View>>;
|
|
18
|
+
export { AppIcon };
|
|
19
|
+
export default AppIcon;
|
|
20
|
+
//# sourceMappingURL=AppIcon.d.ts.map
|