@retray-dev/ui-kit 9.3.1 → 10.1.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 +136 -22
- package/CONSUMER.md +48 -8
- package/FONTS.md +54 -13
- package/README.md +40 -3
- package/dist/Accordion.d.mts +1 -1
- package/dist/Accordion.d.ts +1 -1
- package/dist/Accordion.js +2 -2
- package/dist/Accordion.mjs +1 -1
- package/dist/ConfirmDialog.d.mts +6 -1
- package/dist/ConfirmDialog.d.ts +6 -1
- package/dist/ConfirmDialog.js +44 -14
- package/dist/ConfirmDialog.mjs +1 -1
- package/dist/ImageViewer.js +282 -141
- package/dist/ImageViewer.mjs +3 -1
- package/dist/Sheet.js +16 -13
- package/dist/Sheet.mjs +1 -1
- package/dist/Switch.js +40 -17
- package/dist/Switch.mjs +1 -1
- package/dist/{chunk-O3HA6TYM.mjs → chunk-DJ7RN37L.mjs} +2 -2
- package/dist/{chunk-FZZLPJ6B.mjs → chunk-KZL5VTYK.mjs} +43 -14
- package/dist/{chunk-QKH5ZOD5.mjs → chunk-WF2XDFRK.mjs} +40 -17
- package/dist/{chunk-Z4BVUWW6.mjs → chunk-WOEYDUJZ.mjs} +19 -31
- package/dist/{chunk-PFZTM6D5.mjs → chunk-Y2NS74WS.mjs} +9 -7
- package/dist/fonts.d.mts +39 -31
- package/dist/fonts.d.ts +39 -31
- package/dist/fonts.js +34 -39
- package/dist/fonts.mjs +35 -34
- package/dist/index.js +119 -76
- package/dist/index.mjs +5 -5
- package/package.json +3 -1
- package/scripts/build-apk.sh +84 -0
- package/scripts/copy-fonts.js +90 -0
- package/scripts/test-consumer-fonts.sh +82 -0
- package/src/components/Accordion/Accordion.tsx +7 -3
- package/src/components/ConfirmDialog/ConfirmDialog.tsx +61 -23
- package/src/components/ImageViewer/ImageViewer.tsx +25 -30
- package/src/components/Sheet/Sheet.tsx +10 -9
- package/src/components/Switch/Switch.tsx +30 -17
- package/src/fonts.ts +59 -40
package/dist/ConfirmDialog.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var React3 = require('react');
|
|
4
4
|
var reactNative = require('react-native');
|
|
5
|
-
var
|
|
5
|
+
var BottomSheet = require('@gorhom/bottom-sheet');
|
|
6
6
|
var vectorIcons = require('@expo/vector-icons');
|
|
7
7
|
var reactNativeSizeMatters = require('react-native-size-matters');
|
|
8
8
|
var AntDesign = require('@expo/vector-icons/AntDesign');
|
|
@@ -17,6 +17,7 @@ var reactNativeReanimated = require('react-native-reanimated');
|
|
|
17
17
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
18
|
|
|
19
19
|
var React3__default = /*#__PURE__*/_interopDefault(React3);
|
|
20
|
+
var BottomSheet__default = /*#__PURE__*/_interopDefault(BottomSheet);
|
|
20
21
|
var AntDesign__default = /*#__PURE__*/_interopDefault(AntDesign);
|
|
21
22
|
var Entypo__default = /*#__PURE__*/_interopDefault(Entypo);
|
|
22
23
|
var Feather__default = /*#__PURE__*/_interopDefault(Feather);
|
|
@@ -455,26 +456,29 @@ var styles = reactNative.StyleSheet.create({
|
|
|
455
456
|
function ConfirmDialog({
|
|
456
457
|
visible,
|
|
457
458
|
title,
|
|
459
|
+
subtitle,
|
|
458
460
|
description,
|
|
459
461
|
confirmLabel = "Confirm",
|
|
460
462
|
cancelLabel = "Cancel",
|
|
461
463
|
confirmVariant = "primary",
|
|
462
464
|
loading = false,
|
|
465
|
+
showCloseButton = false,
|
|
463
466
|
onConfirm,
|
|
464
467
|
onCancel
|
|
465
468
|
}) {
|
|
466
469
|
const { colors } = useTheme();
|
|
467
470
|
const ref = React3.useRef(null);
|
|
471
|
+
const effectiveSubtitle = subtitle ?? description;
|
|
468
472
|
React3.useEffect(() => {
|
|
469
473
|
if (visible) {
|
|
470
474
|
impactMedium();
|
|
471
|
-
ref.current?.
|
|
475
|
+
ref.current?.snapToIndex(0);
|
|
472
476
|
} else {
|
|
473
|
-
ref.current?.
|
|
477
|
+
ref.current?.close();
|
|
474
478
|
}
|
|
475
479
|
}, [visible]);
|
|
476
480
|
const renderBackdrop = (props) => /* @__PURE__ */ React3__default.default.createElement(
|
|
477
|
-
|
|
481
|
+
BottomSheet.BottomSheetBackdrop,
|
|
478
482
|
{
|
|
479
483
|
...props,
|
|
480
484
|
disappearsOnIndex: -1,
|
|
@@ -483,17 +487,30 @@ function ConfirmDialog({
|
|
|
483
487
|
}
|
|
484
488
|
);
|
|
485
489
|
return /* @__PURE__ */ React3__default.default.createElement(
|
|
486
|
-
|
|
490
|
+
BottomSheet__default.default,
|
|
487
491
|
{
|
|
488
492
|
ref,
|
|
493
|
+
index: -1,
|
|
494
|
+
onClose: onCancel,
|
|
489
495
|
enableDynamicSizing: true,
|
|
490
|
-
onDismiss: onCancel,
|
|
491
496
|
backdropComponent: renderBackdrop,
|
|
492
497
|
backgroundStyle: [styles2.background, { backgroundColor: colors.card }],
|
|
493
498
|
handleIndicatorStyle: [styles2.handle, { backgroundColor: colors.border }],
|
|
494
499
|
enablePanDownToClose: true
|
|
495
500
|
},
|
|
496
|
-
/* @__PURE__ */ React3__default.default.createElement(
|
|
501
|
+
/* @__PURE__ */ React3__default.default.createElement(BottomSheet.BottomSheetView, { style: styles2.content }, /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: styles2.header, accessibilityRole: "header" }, /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: styles2.headerRow }, /* @__PURE__ */ React3__default.default.createElement(reactNative.Text, { style: [styles2.title, { color: colors.foreground }], allowFontScaling: true }, title), showCloseButton ? /* @__PURE__ */ React3__default.default.createElement(
|
|
502
|
+
reactNative.TouchableOpacity,
|
|
503
|
+
{
|
|
504
|
+
onPress: onCancel,
|
|
505
|
+
style: styles2.closeButton,
|
|
506
|
+
activeOpacity: 0.6,
|
|
507
|
+
touchSoundDisabled: true,
|
|
508
|
+
accessibilityRole: "button",
|
|
509
|
+
accessibilityLabel: "Close",
|
|
510
|
+
hitSlop: { top: 12, bottom: 12, left: 12, right: 12 }
|
|
511
|
+
},
|
|
512
|
+
/* @__PURE__ */ React3__default.default.createElement(vectorIcons.Feather, { name: "x", size: ms(18), color: colors.foregroundMuted })
|
|
513
|
+
) : null), effectiveSubtitle ? /* @__PURE__ */ React3__default.default.createElement(reactNative.Text, { style: [styles2.subtitle, { color: colors.foregroundMuted }], allowFontScaling: true }, effectiveSubtitle) : null), /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: styles2.actions }, /* @__PURE__ */ React3__default.default.createElement(
|
|
497
514
|
Button,
|
|
498
515
|
{
|
|
499
516
|
label: confirmLabel,
|
|
@@ -540,19 +557,32 @@ var styles2 = reactNative.StyleSheet.create({
|
|
|
540
557
|
borderRadius: ms(2)
|
|
541
558
|
},
|
|
542
559
|
content: {
|
|
543
|
-
paddingHorizontal: s(
|
|
544
|
-
paddingBottom: vs(32)
|
|
545
|
-
|
|
560
|
+
paddingHorizontal: s(16),
|
|
561
|
+
paddingBottom: vs(32)
|
|
562
|
+
},
|
|
563
|
+
header: {
|
|
564
|
+
paddingTop: vs(4),
|
|
565
|
+
paddingBottom: vs(12),
|
|
566
|
+
gap: vs(4)
|
|
567
|
+
},
|
|
568
|
+
headerRow: {
|
|
569
|
+
flexDirection: "row",
|
|
570
|
+
alignItems: "center",
|
|
571
|
+
justifyContent: "space-between"
|
|
546
572
|
},
|
|
547
573
|
title: {
|
|
548
574
|
fontFamily: "Sohne-SemiBold",
|
|
549
575
|
fontSize: ms(18),
|
|
550
|
-
|
|
576
|
+
flex: 1
|
|
577
|
+
},
|
|
578
|
+
closeButton: {
|
|
579
|
+
padding: s(4),
|
|
580
|
+
marginLeft: s(8)
|
|
551
581
|
},
|
|
552
|
-
|
|
582
|
+
subtitle: {
|
|
553
583
|
fontFamily: "Sohne-Regular",
|
|
554
|
-
fontSize: ms(
|
|
555
|
-
lineHeight: mvs(
|
|
584
|
+
fontSize: ms(14),
|
|
585
|
+
lineHeight: mvs(20)
|
|
556
586
|
},
|
|
557
587
|
actions: {
|
|
558
588
|
gap: vs(10),
|
package/dist/ConfirmDialog.mjs
CHANGED