aport-tools 4.4.2 → 4.4.3
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/dist/index.esm.js +40 -10
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +39 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! aport-tools v4.4.
|
1
|
+
/*! aport-tools v4.4.3 | ISC */
|
2
2
|
'use strict';
|
3
3
|
|
4
4
|
var React = require('react');
|
@@ -233,17 +233,47 @@ var Stepper = function Stepper(_a) {
|
|
233
233
|
switch (stepType) {
|
234
234
|
case "icon":
|
235
235
|
if (Array.isArray(icon)) {
|
236
|
-
|
236
|
+
var stepIcon = icon[index];
|
237
|
+
if (typeof stepIcon === "string") {
|
238
|
+
return /*#__PURE__*/React.createElement(reactNative.Image, {
|
239
|
+
source: {
|
240
|
+
uri: stepIcon
|
241
|
+
},
|
242
|
+
style: {
|
243
|
+
width: 24,
|
244
|
+
height: 24
|
245
|
+
},
|
246
|
+
resizeMode: "contain"
|
247
|
+
});
|
248
|
+
} else {
|
249
|
+
console.error("Invalid icon value for step ".concat(index, ". Expected a string URI."));
|
250
|
+
return null;
|
251
|
+
}
|
237
252
|
}
|
238
|
-
|
239
|
-
|
253
|
+
if (typeof icon === "string") {
|
254
|
+
return /*#__PURE__*/React.createElement(reactNative.Image, {
|
255
|
+
source: {
|
256
|
+
uri: icon
|
257
|
+
},
|
258
|
+
style: {
|
259
|
+
width: 24,
|
260
|
+
height: 24
|
261
|
+
},
|
262
|
+
resizeMode: "contain"
|
263
|
+
});
|
264
|
+
}
|
265
|
+
console.error("Icon prop must be a string or an array of strings.");
|
266
|
+
return null;
|
240
267
|
case "empty":
|
241
268
|
return null;
|
242
|
-
// Render nothing inside the step circle
|
243
269
|
case "number":
|
244
270
|
default:
|
245
|
-
return
|
246
|
-
|
271
|
+
return /*#__PURE__*/React.createElement(Text, {
|
272
|
+
style: {
|
273
|
+
fontSize: 16,
|
274
|
+
fontWeight: "bold"
|
275
|
+
}
|
276
|
+
}, index + 1);
|
247
277
|
}
|
248
278
|
};
|
249
279
|
return /*#__PURE__*/React.createElement(reactNative.View, {
|
@@ -275,7 +305,8 @@ var Stepper = function Stepper(_a) {
|
|
275
305
|
style: styles$9.separatorBackground
|
276
306
|
}), /*#__PURE__*/React.createElement(reactNative.Animated.View, {
|
277
307
|
style: [styles$9.separatorProgress, {
|
278
|
-
width: getSeparatorWidth(index)
|
308
|
+
width: getSeparatorWidth(index),
|
309
|
+
backgroundColor: colors.primary.hex
|
279
310
|
}]
|
280
311
|
}))));
|
281
312
|
}));
|
@@ -328,7 +359,6 @@ var styles$9 = reactNative.StyleSheet.create({
|
|
328
359
|
separatorProgress: {
|
329
360
|
position: "absolute",
|
330
361
|
height: "100%",
|
331
|
-
backgroundColor: "#3498db",
|
332
362
|
borderRadius: 2
|
333
363
|
}
|
334
364
|
});
|