@xaui/native 0.0.26 → 0.0.28
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/LICENSE +21 -0
- package/README.md +105 -228
- package/dist/alert/index.cjs +92 -166
- package/dist/alert/index.js +2 -1
- package/dist/app-bar/index.cjs +24 -98
- package/dist/app-bar/index.js +2 -1
- package/dist/autocomplete/index.cjs +192 -281
- package/dist/autocomplete/index.js +36 -48
- package/dist/avatar/index.cjs +59 -133
- package/dist/avatar/index.js +2 -1
- package/dist/badge/index.cjs +26 -99
- package/dist/badge/index.js +2 -1
- package/dist/bottom-sheet/index.cjs +5 -456
- package/dist/bottom-sheet/index.js +4 -363
- package/dist/bottom-tab-bar/index.cjs +93 -167
- package/dist/bottom-tab-bar/index.js +2 -2
- package/dist/button/index.cjs +73 -525
- package/dist/button/index.js +3 -2
- package/dist/card/index.cjs +76 -169
- package/dist/card/index.js +2 -2
- package/dist/carousel/index.cjs +68 -145
- package/dist/carousel/index.js +1 -1
- package/dist/chart/index.cjs +132 -173
- package/dist/checkbox/index.cjs +70 -143
- package/dist/checkbox/index.js +2 -1
- package/dist/chip/index.cjs +89 -164
- package/dist/chip/index.js +2 -1
- package/dist/chunk-BD72HIPR.cjs +75 -0
- package/dist/chunk-DHSTKO3K.cjs +19 -0
- package/dist/{chunk-CZFDZPAS.js → chunk-DXXNBF5P.js} +5 -0
- package/dist/{chunk-UI5L26KD.js → chunk-F7WH4DMG.js} +1 -1
- package/dist/chunk-GBHQCAKW.js +19 -0
- package/dist/chunk-HC2SSHNU.js +368 -0
- package/dist/chunk-HSPTLUFA.cjs +7 -0
- package/dist/chunk-JEGEPGVU.js +287 -0
- package/dist/chunk-KTLGDLCB.cjs +287 -0
- package/dist/{chunk-GHCVNQET.js → chunk-LTKYHG5V.js} +5 -12
- package/dist/{chunk-ULJSCNPE.js → chunk-LUBWRVI2.js} +1 -1
- package/dist/chunk-OQ2BLOOG.cjs +138 -0
- package/dist/chunk-QMYWIWSX.cjs +384 -0
- package/dist/chunk-XFPPR2VB.cjs +368 -0
- package/dist/core/index.cjs +22 -168
- package/dist/core/index.d.cts +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +5 -3
- package/dist/datepicker/index.cjs +239 -320
- package/dist/datepicker/index.js +2 -1
- package/dist/divider/index.cjs +5 -145
- package/dist/divider/index.js +3 -2
- package/dist/drawer/index.cjs +39 -112
- package/dist/drawer/index.js +2 -1
- package/dist/expansion-panel/index.cjs +91 -230
- package/dist/expansion-panel/index.js +3 -2
- package/dist/fab/index.cjs +6 -722
- package/dist/fab/index.js +4 -3
- package/dist/fab-menu/index.cjs +81 -814
- package/dist/fab-menu/index.js +4 -3
- package/dist/feature-discovery/index.cjs +72 -139
- package/dist/feature-discovery/index.js +2 -2
- package/dist/index.cjs +1 -18
- package/dist/indicator/index.cjs +5 -445
- package/dist/indicator/index.js +3 -2
- package/dist/input/index.cjs +214 -282
- package/dist/input/index.js +2 -2
- package/dist/list/index.cjs +71 -146
- package/dist/list/index.js +2 -1
- package/dist/menu/index.cjs +59 -127
- package/dist/menu/index.js +2 -2
- package/dist/menubox/index.cjs +60 -132
- package/dist/menubox/index.js +2 -1
- package/dist/pager/index.cjs +42 -80
- package/dist/progress/index.cjs +43 -114
- package/dist/progress/index.js +2 -1
- package/dist/radio/index.cjs +82 -154
- package/dist/radio/index.js +2 -1
- package/dist/segment-button/index.cjs +60 -147
- package/dist/segment-button/index.js +2 -2
- package/dist/select/index.cjs +149 -224
- package/dist/select/index.js +10 -22
- package/dist/skeleton/index.cjs +23 -94
- package/dist/skeleton/index.js +2 -2
- package/dist/slider/index.cjs +77 -156
- package/dist/slider/index.js +2 -1
- package/dist/snackbar/index.cjs +420 -0
- package/dist/snackbar/index.d.cts +175 -0
- package/dist/snackbar/index.d.ts +175 -0
- package/dist/snackbar/index.js +420 -0
- package/dist/stepper/index.cjs +121 -195
- package/dist/stepper/index.js +2 -1
- package/dist/switch/index.cjs +48 -121
- package/dist/switch/index.js +2 -1
- package/dist/tabs/index.cjs +67 -151
- package/dist/tabs/index.js +2 -1
- package/dist/timepicker/index.cjs +135 -593
- package/dist/timepicker/index.js +24 -383
- package/dist/toolbar/index.cjs +59 -128
- package/dist/toolbar/index.js +2 -1
- package/dist/typography/index.cjs +37 -92
- package/dist/typography/index.d.cts +1 -1
- package/dist/typography/index.d.ts +1 -1
- package/dist/typography/index.js +20 -1
- package/dist/view/index.cjs +178 -223
- package/package.json +7 -1
- package/dist/chunk-3XSXTM3G.js +0 -661
- package/dist/chunk-4KSZLONZ.js +0 -79
- package/dist/chunk-I4V5Y5GD.js +0 -76
- package/dist/chunk-URBEEDFX.js +0 -79
package/dist/stepper/index.cjs
CHANGED
|
@@ -1,54 +1,22 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }require('../chunk-HSPTLUFA.cjs');
|
|
29
2
|
|
|
30
|
-
|
|
31
|
-
var
|
|
32
|
-
__export(stepper_exports, {
|
|
33
|
-
Stepper: () => Stepper,
|
|
34
|
-
StepperItem: () => StepperItem
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(stepper_exports);
|
|
3
|
+
|
|
4
|
+
var _chunkOQ2BLOOGcjs = require('../chunk-OQ2BLOOG.cjs');
|
|
37
5
|
|
|
38
6
|
// src/components/stepper/stepper.tsx
|
|
39
|
-
var
|
|
40
|
-
var
|
|
7
|
+
var _react = require('react'); var _react2 = _interopRequireDefault(_react);
|
|
8
|
+
var _reactnative = require('react-native');
|
|
41
9
|
|
|
42
10
|
// src/components/stepper/stepper-context.ts
|
|
43
|
-
|
|
44
|
-
var StepperContext = (0,
|
|
11
|
+
|
|
12
|
+
var StepperContext = _react.createContext.call(void 0,
|
|
45
13
|
void 0
|
|
46
14
|
);
|
|
47
|
-
var useStepperContext = () => (0,
|
|
15
|
+
var useStepperContext = () => _react.useContext.call(void 0, StepperContext);
|
|
48
16
|
|
|
49
17
|
// src/components/stepper/stepper.style.ts
|
|
50
|
-
|
|
51
|
-
var styles =
|
|
18
|
+
|
|
19
|
+
var styles = _reactnative.StyleSheet.create({
|
|
52
20
|
container: {
|
|
53
21
|
width: "100%"
|
|
54
22
|
},
|
|
@@ -151,16 +119,16 @@ var Stepper = ({
|
|
|
151
119
|
style,
|
|
152
120
|
customAppearance
|
|
153
121
|
}) => {
|
|
154
|
-
const items =
|
|
155
|
-
const keys = (0,
|
|
122
|
+
const items = _react2.default.Children.toArray(children);
|
|
123
|
+
const keys = _react.useMemo.call(void 0,
|
|
156
124
|
() => items.map((child) => {
|
|
157
|
-
if (!
|
|
125
|
+
if (!_react2.default.isValidElement(child)) return void 0;
|
|
158
126
|
return child.props.itemKey;
|
|
159
127
|
}).filter((key) => typeof key === "string"),
|
|
160
128
|
[items]
|
|
161
129
|
);
|
|
162
|
-
const [internalActiveKey, setInternalActiveKey] = (0,
|
|
163
|
-
defaultActiveKey
|
|
130
|
+
const [internalActiveKey, setInternalActiveKey] = _react.useState.call(void 0,
|
|
131
|
+
_nullishCoalesce(defaultActiveKey, () => ( keys[0]))
|
|
164
132
|
);
|
|
165
133
|
const isControlled = typeof activeKey === "string";
|
|
166
134
|
const resolvedActiveKey = isControlled ? activeKey : internalActiveKey;
|
|
@@ -169,9 +137,9 @@ var Stepper = ({
|
|
|
169
137
|
if (!isControlled) {
|
|
170
138
|
setInternalActiveKey(key);
|
|
171
139
|
}
|
|
172
|
-
onStepChange
|
|
140
|
+
_optionalChain([onStepChange, 'optionalCall', _ => _(key)]);
|
|
173
141
|
};
|
|
174
|
-
const contextValue = (0,
|
|
142
|
+
const contextValue = _react.useMemo.call(void 0,
|
|
175
143
|
() => ({
|
|
176
144
|
activeKey: resolvedActiveKey,
|
|
177
145
|
activeIndex,
|
|
@@ -198,14 +166,14 @@ var Stepper = ({
|
|
|
198
166
|
customAppearance
|
|
199
167
|
]
|
|
200
168
|
);
|
|
201
|
-
return /* @__PURE__ */
|
|
202
|
-
|
|
169
|
+
return /* @__PURE__ */ _react2.default.createElement(StepperContext.Provider, { value: contextValue }, /* @__PURE__ */ _react2.default.createElement(
|
|
170
|
+
_reactnative.View,
|
|
203
171
|
{
|
|
204
172
|
style: [
|
|
205
173
|
styles.container,
|
|
206
174
|
direction === "horizontal" ? styles.horizontalContainer : styles.verticalContainer,
|
|
207
175
|
style,
|
|
208
|
-
customAppearance
|
|
176
|
+
_optionalChain([customAppearance, 'optionalAccess', _2 => _2.container])
|
|
209
177
|
]
|
|
210
178
|
},
|
|
211
179
|
children
|
|
@@ -213,54 +181,13 @@ var Stepper = ({
|
|
|
213
181
|
};
|
|
214
182
|
|
|
215
183
|
// src/components/stepper/stepper-item.tsx
|
|
216
|
-
var import_react9 = __toESM(require("react"), 1);
|
|
217
|
-
var import_react_native6 = require("react-native");
|
|
218
|
-
var import_icons = require("@xaui/icons");
|
|
219
|
-
|
|
220
|
-
// src/components/stepper/stepper.hook.ts
|
|
221
|
-
var import_react8 = require("react");
|
|
222
|
-
var import_core = require("@xaui/core");
|
|
223
|
-
|
|
224
|
-
// src/core/theme-context.tsx
|
|
225
|
-
var import_react6 = __toESM(require("react"), 1);
|
|
226
|
-
var import_react_native4 = require("react-native");
|
|
227
|
-
var import_theme = require("@xaui/core/theme");
|
|
228
|
-
var import_palette = require("@xaui/core/palette");
|
|
229
|
-
|
|
230
|
-
// src/core/portal/portal.tsx
|
|
231
|
-
var import_react4 = require("react");
|
|
232
|
-
|
|
233
|
-
// src/core/portal/portal-context.ts
|
|
234
|
-
var import_react3 = require("react");
|
|
235
|
-
var PortalContext = (0, import_react3.createContext)(null);
|
|
236
184
|
|
|
237
|
-
// src/core/portal/portal-host.tsx
|
|
238
|
-
var import_react5 = __toESM(require("react"), 1);
|
|
239
|
-
var import_react_native3 = require("react-native");
|
|
240
|
-
var hostStyles = import_react_native3.StyleSheet.create({
|
|
241
|
-
container: {
|
|
242
|
-
flex: 1
|
|
243
|
-
}
|
|
244
|
-
});
|
|
245
|
-
|
|
246
|
-
// src/core/theme-context.tsx
|
|
247
|
-
var XUIThemeContext = (0, import_react6.createContext)(null);
|
|
248
|
-
|
|
249
|
-
// src/core/theme-hooks.ts
|
|
250
|
-
var import_react7 = require("react");
|
|
251
|
-
var import_react_native5 = require("react-native");
|
|
252
|
-
function useXUITheme() {
|
|
253
|
-
const theme = (0, import_react7.useContext)(XUIThemeContext);
|
|
254
|
-
if (!theme) {
|
|
255
|
-
throw new Error("useXUITheme must be used within XUIProvider");
|
|
256
|
-
}
|
|
257
|
-
return theme;
|
|
258
|
-
}
|
|
259
185
|
|
|
260
|
-
|
|
261
|
-
var import_theme2 = require("@xaui/core/theme");
|
|
186
|
+
var _icons = require('@xaui/icons');
|
|
262
187
|
|
|
263
188
|
// src/components/stepper/stepper.hook.ts
|
|
189
|
+
|
|
190
|
+
var _core = require('@xaui/core');
|
|
264
191
|
var sizeMap = {
|
|
265
192
|
sm: {
|
|
266
193
|
indicatorSize: 22,
|
|
@@ -294,28 +221,28 @@ var sizeMap = {
|
|
|
294
221
|
}
|
|
295
222
|
};
|
|
296
223
|
var useStepperSizeStyles = (size) => {
|
|
297
|
-
return (0,
|
|
224
|
+
return _react.useMemo.call(void 0, () => sizeMap[size], [size]);
|
|
298
225
|
};
|
|
299
226
|
var useStepperColors = (themeColor) => {
|
|
300
|
-
const theme = useXUITheme();
|
|
301
|
-
const scheme = theme.colors[(0,
|
|
302
|
-
return (0,
|
|
227
|
+
const theme = _chunkOQ2BLOOGcjs.useXUITheme.call(void 0, );
|
|
228
|
+
const scheme = theme.colors[_core.getSafeThemeColor.call(void 0, themeColor)];
|
|
229
|
+
return _react.useMemo.call(void 0,
|
|
303
230
|
() => ({
|
|
304
231
|
activeIndicatorBackground: scheme.main,
|
|
305
232
|
activeIndicatorBorder: scheme.main,
|
|
306
233
|
activeIndicatorText: scheme.foreground,
|
|
307
|
-
completedIndicatorBackground: (0,
|
|
234
|
+
completedIndicatorBackground: _core.withOpacity.call(void 0, scheme.main, 0.2),
|
|
308
235
|
completedIndicatorBorder: scheme.main,
|
|
309
236
|
completedIndicatorText: scheme.main,
|
|
310
|
-
lockedIndicatorBackground: (0,
|
|
311
|
-
lockedIndicatorBorder: (0,
|
|
312
|
-
lockedIndicatorText: (0,
|
|
237
|
+
lockedIndicatorBackground: _core.withOpacity.call(void 0, theme.colors.foreground, 0.08),
|
|
238
|
+
lockedIndicatorBorder: _core.withOpacity.call(void 0, theme.colors.foreground, 0.22),
|
|
239
|
+
lockedIndicatorText: _core.withOpacity.call(void 0, theme.colors.foreground, 0.42),
|
|
313
240
|
inactiveIndicatorBackground: theme.colors.background,
|
|
314
|
-
inactiveIndicatorBorder: (0,
|
|
315
|
-
inactiveIndicatorText: (0,
|
|
241
|
+
inactiveIndicatorBorder: _core.withOpacity.call(void 0, theme.colors.foreground, 0.22),
|
|
242
|
+
inactiveIndicatorText: _core.withOpacity.call(void 0, theme.colors.foreground, 0.72),
|
|
316
243
|
title: theme.colors.foreground,
|
|
317
|
-
description: (0,
|
|
318
|
-
line: (0,
|
|
244
|
+
description: _core.withOpacity.call(void 0, theme.colors.foreground, 0.72),
|
|
245
|
+
line: _core.withOpacity.call(void 0, theme.colors.foreground, 0.16),
|
|
319
246
|
activeLine: scheme.main
|
|
320
247
|
}),
|
|
321
248
|
[scheme, theme.colors.background, theme.colors.foreground]
|
|
@@ -337,21 +264,21 @@ var StepperItem = ({
|
|
|
337
264
|
customAppearance
|
|
338
265
|
}) => {
|
|
339
266
|
const context = useStepperContext();
|
|
340
|
-
const direction = context
|
|
341
|
-
const showLines = context
|
|
342
|
-
const lineDisplayMode = context
|
|
343
|
-
const groupDisabled = context
|
|
344
|
-
const size = context
|
|
345
|
-
const themeColor = context
|
|
267
|
+
const direction = _nullishCoalesce(_optionalChain([context, 'optionalAccess', _3 => _3.direction]), () => ( "horizontal"));
|
|
268
|
+
const showLines = _nullishCoalesce(_optionalChain([context, 'optionalAccess', _4 => _4.showLines]), () => ( true));
|
|
269
|
+
const lineDisplayMode = _nullishCoalesce(_optionalChain([context, 'optionalAccess', _5 => _5.lineDisplayMode]), () => ( "progress"));
|
|
270
|
+
const groupDisabled = _nullishCoalesce(_optionalChain([context, 'optionalAccess', _6 => _6.isDisabled]), () => ( false));
|
|
271
|
+
const size = _nullishCoalesce(_optionalChain([context, 'optionalAccess', _7 => _7.size]), () => ( "md"));
|
|
272
|
+
const themeColor = _nullishCoalesce(_optionalChain([context, 'optionalAccess', _8 => _8.themeColor]), () => ( "primary"));
|
|
346
273
|
const sizeStyles = useStepperSizeStyles(size);
|
|
347
|
-
const
|
|
348
|
-
const index = context
|
|
349
|
-
const isActive = context
|
|
350
|
-
const hasActiveStep = (context
|
|
351
|
-
const isCompleted = hasActiveStep && index >= 0 && index < (context
|
|
352
|
-
const isLast = index === (context
|
|
274
|
+
const colors = useStepperColors(themeColor);
|
|
275
|
+
const index = _nullishCoalesce(_optionalChain([context, 'optionalAccess', _9 => _9.keys, 'access', _10 => _10.indexOf, 'call', _11 => _11(itemKey)]), () => ( -1));
|
|
276
|
+
const isActive = _optionalChain([context, 'optionalAccess', _12 => _12.activeKey]) === itemKey;
|
|
277
|
+
const hasActiveStep = (_nullishCoalesce(_optionalChain([context, 'optionalAccess', _13 => _13.activeIndex]), () => ( -1))) >= 0;
|
|
278
|
+
const isCompleted = hasActiveStep && index >= 0 && index < (_nullishCoalesce(_optionalChain([context, 'optionalAccess', _14 => _14.activeIndex]), () => ( -1)));
|
|
279
|
+
const isLast = index === (_nullishCoalesce(_optionalChain([context, 'optionalAccess', _15 => _15.keys, 'access', _16 => _16.length]), () => ( 0))) - 1;
|
|
353
280
|
const lineTargetProgress = isCompleted ? 1 : 0;
|
|
354
|
-
const lineProgress = (0,
|
|
281
|
+
const lineProgress = _react.useRef.call(void 0, new _reactnative.Animated.Value(lineTargetProgress)).current;
|
|
355
282
|
const disabled = groupDisabled || isDisabled;
|
|
356
283
|
const blocked = disabled || isLocked;
|
|
357
284
|
const indicatorState = {
|
|
@@ -361,7 +288,7 @@ var StepperItem = ({
|
|
|
361
288
|
isLocked,
|
|
362
289
|
isDisabled: disabled
|
|
363
290
|
};
|
|
364
|
-
const indicatorNode = (0,
|
|
291
|
+
const indicatorNode = _react.useMemo.call(void 0, () => {
|
|
365
292
|
if (typeof indicator === "function") {
|
|
366
293
|
return indicator(indicatorState);
|
|
367
294
|
}
|
|
@@ -370,23 +297,23 @@ var StepperItem = ({
|
|
|
370
297
|
}
|
|
371
298
|
const iconSize = Math.max(12, Math.floor(sizeStyles.indicatorSize * 0.54));
|
|
372
299
|
if (isLocked) {
|
|
373
|
-
return /* @__PURE__ */
|
|
374
|
-
|
|
300
|
+
return /* @__PURE__ */ _react2.default.createElement(
|
|
301
|
+
_icons.LockClosedIcon,
|
|
375
302
|
{
|
|
376
303
|
key: `lock-${itemKey}-${isLocked ? "on" : "off"}`,
|
|
377
304
|
size: iconSize,
|
|
378
|
-
color:
|
|
305
|
+
color: colors.lockedIndicatorText,
|
|
379
306
|
isAnimated: true
|
|
380
307
|
}
|
|
381
308
|
);
|
|
382
309
|
}
|
|
383
310
|
if (isCompleted) {
|
|
384
|
-
return /* @__PURE__ */
|
|
385
|
-
|
|
311
|
+
return /* @__PURE__ */ _react2.default.createElement(
|
|
312
|
+
_icons.CheckmarkIcon,
|
|
386
313
|
{
|
|
387
314
|
key: `done-${itemKey}-${isCompleted ? "on" : "off"}`,
|
|
388
315
|
size: iconSize,
|
|
389
|
-
color:
|
|
316
|
+
color: colors.completedIndicatorText,
|
|
390
317
|
isAnimated: true
|
|
391
318
|
}
|
|
392
319
|
);
|
|
@@ -399,20 +326,20 @@ var StepperItem = ({
|
|
|
399
326
|
isLocked,
|
|
400
327
|
isCompleted,
|
|
401
328
|
itemKey,
|
|
402
|
-
|
|
329
|
+
colors
|
|
403
330
|
]);
|
|
404
|
-
(0,
|
|
405
|
-
|
|
331
|
+
_react.useEffect.call(void 0, () => {
|
|
332
|
+
_reactnative.Animated.timing(lineProgress, {
|
|
406
333
|
toValue: lineTargetProgress,
|
|
407
334
|
duration: 240,
|
|
408
335
|
useNativeDriver: true
|
|
409
336
|
}).start();
|
|
410
337
|
}, [lineProgress, lineTargetProgress]);
|
|
411
|
-
const indicatorText = isStringOrNumber(indicatorNode) ? /* @__PURE__ */
|
|
412
|
-
|
|
338
|
+
const indicatorText = isStringOrNumber(indicatorNode) ? /* @__PURE__ */ _react2.default.createElement(
|
|
339
|
+
_reactnative.Text,
|
|
413
340
|
{
|
|
414
341
|
style: {
|
|
415
|
-
color: isLocked ?
|
|
342
|
+
color: isLocked ? colors.lockedIndicatorText : isActive ? colors.activeIndicatorText : isCompleted ? colors.completedIndicatorText : colors.inactiveIndicatorText,
|
|
416
343
|
fontSize: sizeStyles.titleFontSize,
|
|
417
344
|
fontWeight: "700"
|
|
418
345
|
}
|
|
@@ -430,17 +357,17 @@ var StepperItem = ({
|
|
|
430
357
|
minHeight: sizeStyles.verticalGap
|
|
431
358
|
},
|
|
432
359
|
{
|
|
433
|
-
backgroundColor: lineDisplayMode === "all" ?
|
|
360
|
+
backgroundColor: lineDisplayMode === "all" ? colors.line : "transparent"
|
|
434
361
|
},
|
|
435
|
-
context
|
|
362
|
+
_optionalChain([context, 'optionalAccess', _17 => _17.customAppearance, 'optionalAccess', _18 => _18.line])
|
|
436
363
|
];
|
|
437
|
-
return /* @__PURE__ */
|
|
438
|
-
|
|
364
|
+
return /* @__PURE__ */ _react2.default.createElement(
|
|
365
|
+
_reactnative.Pressable,
|
|
439
366
|
{
|
|
440
367
|
onPress: () => {
|
|
441
368
|
if (blocked) return;
|
|
442
|
-
context
|
|
443
|
-
onPress
|
|
369
|
+
_optionalChain([context, 'optionalAccess', _19 => _19.onStepChange, 'optionalCall', _20 => _20(itemKey)]);
|
|
370
|
+
_optionalChain([onPress, 'optionalCall', _21 => _21(itemKey)]);
|
|
444
371
|
},
|
|
445
372
|
disabled: blocked,
|
|
446
373
|
accessibilityRole: "tab",
|
|
@@ -449,12 +376,12 @@ var StepperItem = ({
|
|
|
449
376
|
direction === "horizontal" ? styles.horizontalItem : styles.verticalItem,
|
|
450
377
|
blocked && (isLocked ? styles.locked : styles.disabled),
|
|
451
378
|
style,
|
|
452
|
-
customAppearance
|
|
453
|
-
context
|
|
379
|
+
_optionalChain([customAppearance, 'optionalAccess', _22 => _22.container]),
|
|
380
|
+
_optionalChain([context, 'optionalAccess', _23 => _23.customAppearance, 'optionalAccess', _24 => _24.itemContainer])
|
|
454
381
|
]
|
|
455
382
|
},
|
|
456
|
-
direction === "horizontal" ? /* @__PURE__ */
|
|
457
|
-
|
|
383
|
+
direction === "horizontal" ? /* @__PURE__ */ _react2.default.createElement(_react2.default.Fragment, null, /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.horizontalTopRow }, /* @__PURE__ */ _react2.default.createElement(
|
|
384
|
+
_reactnative.View,
|
|
458
385
|
{
|
|
459
386
|
style: [
|
|
460
387
|
styles.indicator,
|
|
@@ -463,79 +390,79 @@ var StepperItem = ({
|
|
|
463
390
|
height: sizeStyles.indicatorSize,
|
|
464
391
|
borderRadius: sizeStyles.indicatorSize / 2,
|
|
465
392
|
borderWidth: sizeStyles.indicatorBorderWidth,
|
|
466
|
-
borderColor: isLocked ?
|
|
467
|
-
backgroundColor: isLocked ?
|
|
393
|
+
borderColor: isLocked ? colors.lockedIndicatorBorder : isActive ? colors.activeIndicatorBorder : isCompleted ? colors.completedIndicatorBorder : colors.inactiveIndicatorBorder,
|
|
394
|
+
backgroundColor: isLocked ? colors.lockedIndicatorBackground : isActive ? colors.activeIndicatorBackground : isCompleted ? colors.completedIndicatorBackground : colors.inactiveIndicatorBackground
|
|
468
395
|
},
|
|
469
|
-
customAppearance
|
|
470
|
-
isActive && customAppearance
|
|
471
|
-
isCompleted && customAppearance
|
|
472
|
-
isLocked && customAppearance
|
|
396
|
+
_optionalChain([customAppearance, 'optionalAccess', _25 => _25.indicator]),
|
|
397
|
+
isActive && _optionalChain([customAppearance, 'optionalAccess', _26 => _26.activeIndicator]),
|
|
398
|
+
isCompleted && _optionalChain([customAppearance, 'optionalAccess', _27 => _27.completedIndicator]),
|
|
399
|
+
isLocked && _optionalChain([customAppearance, 'optionalAccess', _28 => _28.lockedIndicator])
|
|
473
400
|
]
|
|
474
401
|
},
|
|
475
402
|
indicatorText
|
|
476
|
-
), showLines && !isLast ? /* @__PURE__ */
|
|
477
|
-
|
|
403
|
+
), showLines && !isLast ? /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: lineStyle }, /* @__PURE__ */ _react2.default.createElement(
|
|
404
|
+
_reactnative.View,
|
|
478
405
|
{
|
|
479
406
|
style: [
|
|
480
407
|
styles.lineProgressWrap,
|
|
481
408
|
direction === "horizontal" ? styles.lineProgressHorizontal : styles.lineProgressVertical
|
|
482
409
|
]
|
|
483
410
|
},
|
|
484
|
-
/* @__PURE__ */
|
|
485
|
-
|
|
411
|
+
/* @__PURE__ */ _react2.default.createElement(
|
|
412
|
+
_reactnative.Animated.View,
|
|
486
413
|
{
|
|
487
414
|
style: [
|
|
488
415
|
styles.lineProgress,
|
|
489
416
|
{
|
|
490
|
-
backgroundColor:
|
|
417
|
+
backgroundColor: colors.activeLine,
|
|
491
418
|
transform: [
|
|
492
419
|
direction === "horizontal" ? { scaleX: lineProgress } : { scaleY: lineProgress }
|
|
493
420
|
]
|
|
494
421
|
},
|
|
495
|
-
context
|
|
422
|
+
_optionalChain([context, 'optionalAccess', _29 => _29.customAppearance, 'optionalAccess', _30 => _30.activeLine])
|
|
496
423
|
]
|
|
497
424
|
}
|
|
498
425
|
)
|
|
499
|
-
)) : null), /* @__PURE__ */
|
|
500
|
-
|
|
426
|
+
)) : null), /* @__PURE__ */ _react2.default.createElement(
|
|
427
|
+
_reactnative.View,
|
|
501
428
|
{
|
|
502
429
|
style: [
|
|
503
430
|
styles.horizontalContent,
|
|
504
431
|
{ marginTop: sizeStyles.verticalSpacing }
|
|
505
432
|
]
|
|
506
433
|
},
|
|
507
|
-
title ? /* @__PURE__ */
|
|
508
|
-
|
|
434
|
+
title ? /* @__PURE__ */ _react2.default.createElement(
|
|
435
|
+
_reactnative.Text,
|
|
509
436
|
{
|
|
510
437
|
style: [
|
|
511
438
|
styles.title,
|
|
512
439
|
{
|
|
513
440
|
fontSize: sizeStyles.titleFontSize,
|
|
514
|
-
color:
|
|
441
|
+
color: colors.title
|
|
515
442
|
},
|
|
516
|
-
customAppearance
|
|
443
|
+
_optionalChain([customAppearance, 'optionalAccess', _31 => _31.title])
|
|
517
444
|
]
|
|
518
445
|
},
|
|
519
446
|
title
|
|
520
447
|
) : null,
|
|
521
|
-
description ? /* @__PURE__ */
|
|
522
|
-
|
|
448
|
+
description ? /* @__PURE__ */ _react2.default.createElement(
|
|
449
|
+
_reactnative.Text,
|
|
523
450
|
{
|
|
524
451
|
style: [
|
|
525
452
|
styles.description,
|
|
526
453
|
{
|
|
527
454
|
fontSize: sizeStyles.descriptionFontSize,
|
|
528
|
-
color:
|
|
455
|
+
color: colors.description,
|
|
529
456
|
marginTop: 2
|
|
530
457
|
},
|
|
531
|
-
customAppearance
|
|
458
|
+
_optionalChain([customAppearance, 'optionalAccess', _32 => _32.description])
|
|
532
459
|
]
|
|
533
460
|
},
|
|
534
461
|
description
|
|
535
462
|
) : null,
|
|
536
463
|
children
|
|
537
|
-
)) : /* @__PURE__ */
|
|
538
|
-
|
|
464
|
+
)) : /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.verticalRow }, /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: { alignItems: "center" } }, /* @__PURE__ */ _react2.default.createElement(
|
|
465
|
+
_reactnative.View,
|
|
539
466
|
{
|
|
540
467
|
style: [
|
|
541
468
|
styles.indicator,
|
|
@@ -544,36 +471,36 @@ var StepperItem = ({
|
|
|
544
471
|
height: sizeStyles.indicatorSize,
|
|
545
472
|
borderRadius: sizeStyles.indicatorSize / 2,
|
|
546
473
|
borderWidth: sizeStyles.indicatorBorderWidth,
|
|
547
|
-
borderColor: isLocked ?
|
|
548
|
-
backgroundColor: isLocked ?
|
|
474
|
+
borderColor: isLocked ? colors.lockedIndicatorBorder : isActive ? colors.activeIndicatorBorder : isCompleted ? colors.completedIndicatorBorder : colors.inactiveIndicatorBorder,
|
|
475
|
+
backgroundColor: isLocked ? colors.lockedIndicatorBackground : isActive ? colors.activeIndicatorBackground : isCompleted ? colors.completedIndicatorBackground : colors.inactiveIndicatorBackground
|
|
549
476
|
},
|
|
550
|
-
customAppearance
|
|
551
|
-
isActive && customAppearance
|
|
552
|
-
isCompleted && customAppearance
|
|
553
|
-
isLocked && customAppearance
|
|
477
|
+
_optionalChain([customAppearance, 'optionalAccess', _33 => _33.indicator]),
|
|
478
|
+
isActive && _optionalChain([customAppearance, 'optionalAccess', _34 => _34.activeIndicator]),
|
|
479
|
+
isCompleted && _optionalChain([customAppearance, 'optionalAccess', _35 => _35.completedIndicator]),
|
|
480
|
+
isLocked && _optionalChain([customAppearance, 'optionalAccess', _36 => _36.lockedIndicator])
|
|
554
481
|
]
|
|
555
482
|
},
|
|
556
483
|
indicatorText
|
|
557
|
-
), showLines && !isLast ? /* @__PURE__ */
|
|
558
|
-
|
|
484
|
+
), showLines && !isLast ? /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.verticalLineWrap }, /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: lineStyle }, /* @__PURE__ */ _react2.default.createElement(
|
|
485
|
+
_reactnative.View,
|
|
559
486
|
{
|
|
560
487
|
style: [styles.lineProgressWrap, styles.lineProgressVertical]
|
|
561
488
|
},
|
|
562
|
-
/* @__PURE__ */
|
|
563
|
-
|
|
489
|
+
/* @__PURE__ */ _react2.default.createElement(
|
|
490
|
+
_reactnative.Animated.View,
|
|
564
491
|
{
|
|
565
492
|
style: [
|
|
566
493
|
styles.lineProgress,
|
|
567
494
|
{
|
|
568
|
-
backgroundColor:
|
|
495
|
+
backgroundColor: colors.activeLine,
|
|
569
496
|
transform: [{ scaleY: lineProgress }]
|
|
570
497
|
},
|
|
571
|
-
context
|
|
498
|
+
_optionalChain([context, 'optionalAccess', _37 => _37.customAppearance, 'optionalAccess', _38 => _38.activeLine])
|
|
572
499
|
]
|
|
573
500
|
}
|
|
574
501
|
)
|
|
575
|
-
))) : null), /* @__PURE__ */
|
|
576
|
-
|
|
502
|
+
))) : null), /* @__PURE__ */ _react2.default.createElement(
|
|
503
|
+
_reactnative.View,
|
|
577
504
|
{
|
|
578
505
|
style: [
|
|
579
506
|
styles.verticalContent,
|
|
@@ -581,33 +508,33 @@ var StepperItem = ({
|
|
|
581
508
|
{ marginLeft: sizeStyles.horizontalSpacing }
|
|
582
509
|
]
|
|
583
510
|
},
|
|
584
|
-
title ? /* @__PURE__ */
|
|
585
|
-
|
|
511
|
+
title ? /* @__PURE__ */ _react2.default.createElement(
|
|
512
|
+
_reactnative.Text,
|
|
586
513
|
{
|
|
587
514
|
style: [
|
|
588
515
|
styles.title,
|
|
589
516
|
styles.titleVertical,
|
|
590
517
|
{
|
|
591
518
|
fontSize: sizeStyles.titleFontSize,
|
|
592
|
-
color:
|
|
519
|
+
color: colors.title
|
|
593
520
|
},
|
|
594
|
-
customAppearance
|
|
521
|
+
_optionalChain([customAppearance, 'optionalAccess', _39 => _39.title])
|
|
595
522
|
]
|
|
596
523
|
},
|
|
597
524
|
title
|
|
598
525
|
) : null,
|
|
599
|
-
description ? /* @__PURE__ */
|
|
600
|
-
|
|
526
|
+
description ? /* @__PURE__ */ _react2.default.createElement(
|
|
527
|
+
_reactnative.Text,
|
|
601
528
|
{
|
|
602
529
|
style: [
|
|
603
530
|
styles.description,
|
|
604
531
|
styles.descriptionVertical,
|
|
605
532
|
{
|
|
606
533
|
fontSize: sizeStyles.descriptionFontSize,
|
|
607
|
-
color:
|
|
534
|
+
color: colors.description,
|
|
608
535
|
marginTop: 2
|
|
609
536
|
},
|
|
610
|
-
customAppearance
|
|
537
|
+
_optionalChain([customAppearance, 'optionalAccess', _40 => _40.description])
|
|
611
538
|
]
|
|
612
539
|
},
|
|
613
540
|
description
|
|
@@ -617,8 +544,7 @@ var StepperItem = ({
|
|
|
617
544
|
);
|
|
618
545
|
};
|
|
619
546
|
StepperItem.displayName = "StepperItem";
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
});
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
exports.Stepper = Stepper; exports.StepperItem = StepperItem;
|