dhre-ui-kit 0.0.100 → 0.0.102
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/index.js +62 -58
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +62 -58
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -2456,6 +2456,44 @@ const styles$k = reactNative.StyleSheet.create({
|
|
|
2456
2456
|
rightIconStyle: { marginLeft: horizontalScale(8) }
|
|
2457
2457
|
});
|
|
2458
2458
|
|
|
2459
|
+
const styles$j = reactNative.StyleSheet.create({
|
|
2460
|
+
container: {
|
|
2461
|
+
justifyContent: "center",
|
|
2462
|
+
alignItems: "center"
|
|
2463
|
+
},
|
|
2464
|
+
title: {
|
|
2465
|
+
color: "#000"
|
|
2466
|
+
}
|
|
2467
|
+
});
|
|
2468
|
+
|
|
2469
|
+
const CustomIcon = ({
|
|
2470
|
+
icon,
|
|
2471
|
+
title,
|
|
2472
|
+
titleVariant = "L1_REGULAR",
|
|
2473
|
+
testId = "CUSTOM-ICON",
|
|
2474
|
+
onPress,
|
|
2475
|
+
containerStyle,
|
|
2476
|
+
titleStyle
|
|
2477
|
+
}) => {
|
|
2478
|
+
return /* @__PURE__ */ React__default["default"].createElement(
|
|
2479
|
+
reactNative.Pressable,
|
|
2480
|
+
{
|
|
2481
|
+
style: [styles$j.container, containerStyle],
|
|
2482
|
+
onPress,
|
|
2483
|
+
testID: testId
|
|
2484
|
+
},
|
|
2485
|
+
icon,
|
|
2486
|
+
title && /* @__PURE__ */ React__default["default"].createElement(
|
|
2487
|
+
CustomTypography,
|
|
2488
|
+
{
|
|
2489
|
+
variant: titleVariant,
|
|
2490
|
+
text: title,
|
|
2491
|
+
style: [styles$j.title, titleStyle]
|
|
2492
|
+
}
|
|
2493
|
+
)
|
|
2494
|
+
);
|
|
2495
|
+
};
|
|
2496
|
+
|
|
2459
2497
|
const CustomHeader = ({
|
|
2460
2498
|
title,
|
|
2461
2499
|
testId = "CUSTOM-HEADER",
|
|
@@ -2466,27 +2504,31 @@ const CustomHeader = ({
|
|
|
2466
2504
|
onLeftPress,
|
|
2467
2505
|
onRightPress
|
|
2468
2506
|
}) => {
|
|
2469
|
-
return /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$k.container, testID: testId }, /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$k.headderContainer }, showLeftIcon && React__default["default"].
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2507
|
+
return /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$k.container, testID: testId }, /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$k.headderContainer }, showLeftIcon && /* @__PURE__ */ React__default["default"].createElement(
|
|
2508
|
+
CustomIcon,
|
|
2509
|
+
{
|
|
2510
|
+
icon: leftIcon,
|
|
2511
|
+
onPress: onLeftPress,
|
|
2512
|
+
containerStyle: styles$k.leftIconStyle
|
|
2513
|
+
}
|
|
2514
|
+
), /* @__PURE__ */ React__default["default"].createElement(
|
|
2475
2515
|
CustomTypography,
|
|
2476
2516
|
{
|
|
2477
2517
|
variant: "B2_REGULAR",
|
|
2478
2518
|
text: title,
|
|
2479
2519
|
style: styles$k.headerTitle
|
|
2480
2520
|
}
|
|
2481
|
-
)), showRightIcon && React__default["default"].
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2521
|
+
)), showRightIcon && /* @__PURE__ */ React__default["default"].createElement(
|
|
2522
|
+
CustomIcon,
|
|
2523
|
+
{
|
|
2524
|
+
icon: rightIcon,
|
|
2525
|
+
onPress: onRightPress,
|
|
2526
|
+
containerStyle: styles$k.rightIconStyle
|
|
2527
|
+
}
|
|
2528
|
+
));
|
|
2487
2529
|
};
|
|
2488
2530
|
|
|
2489
|
-
const styles$
|
|
2531
|
+
const styles$i = reactNative.StyleSheet.create({
|
|
2490
2532
|
container: {
|
|
2491
2533
|
flex: 1
|
|
2492
2534
|
},
|
|
@@ -2547,19 +2589,19 @@ const SwipableList = (props) => {
|
|
|
2547
2589
|
{
|
|
2548
2590
|
testID,
|
|
2549
2591
|
onPress,
|
|
2550
|
-
style: [styles$
|
|
2592
|
+
style: [styles$i.actionButton, style]
|
|
2551
2593
|
},
|
|
2552
2594
|
icon,
|
|
2553
2595
|
/* @__PURE__ */ React__default["default"].createElement(
|
|
2554
2596
|
CustomTypography,
|
|
2555
2597
|
{
|
|
2556
2598
|
variant: "L1_REGULAR",
|
|
2557
|
-
style: [styles$
|
|
2599
|
+
style: [styles$i.titleStyle, titleStyle],
|
|
2558
2600
|
text: title
|
|
2559
2601
|
}
|
|
2560
2602
|
)
|
|
2561
2603
|
);
|
|
2562
|
-
const leftActionHandle = (item, leftPrimaryActionIcon, leftPrimaryActionTitle, leftSecondaryActionIcon, leftSecondaryActionTitle) => /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: [styles$
|
|
2604
|
+
const leftActionHandle = (item, leftPrimaryActionIcon, leftPrimaryActionTitle, leftSecondaryActionIcon, leftSecondaryActionTitle) => /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: [styles$i.leftActions, leftPrimaryActionStyle] }, leftPrimaryActionIcon && /* @__PURE__ */ React__default["default"].createElement(
|
|
2563
2605
|
ActionButton,
|
|
2564
2606
|
{
|
|
2565
2607
|
icon: leftPrimaryActionIcon,
|
|
@@ -2578,7 +2620,7 @@ const SwipableList = (props) => {
|
|
|
2578
2620
|
testID: `${testId}-LEFT-SECONDARY-${item.id}`
|
|
2579
2621
|
}
|
|
2580
2622
|
));
|
|
2581
|
-
const rightActionHandle = (item) => /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: [styles$
|
|
2623
|
+
const rightActionHandle = (item) => /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: [styles$i.rightActions, rightPrimaryActionStyle] }, rightPrimaryActionIcon && /* @__PURE__ */ React__default["default"].createElement(
|
|
2582
2624
|
ActionButton,
|
|
2583
2625
|
{
|
|
2584
2626
|
icon: rightPrimaryActionIcon,
|
|
@@ -2588,7 +2630,7 @@ const SwipableList = (props) => {
|
|
|
2588
2630
|
testID: `${testId}-RIGHT-PRIMARY-${item.id}`
|
|
2589
2631
|
}
|
|
2590
2632
|
));
|
|
2591
|
-
const renderItem = ({ item }) => /* @__PURE__ */ React__default["default"].createElement(reactNativeGestureHandler.GestureHandlerRootView, { testID: `${testId}-LIST`, style: styles$
|
|
2633
|
+
const renderItem = ({ item }) => /* @__PURE__ */ React__default["default"].createElement(reactNativeGestureHandler.GestureHandlerRootView, { testID: `${testId}-LIST`, style: styles$i.container }, /* @__PURE__ */ React__default["default"].createElement(
|
|
2592
2634
|
reactNativeGestureHandler.Swipeable,
|
|
2593
2635
|
{
|
|
2594
2636
|
renderLeftActions: () => leftActionHandle(
|
|
@@ -2599,7 +2641,7 @@ const SwipableList = (props) => {
|
|
|
2599
2641
|
item.isRead ? leftSecondaryActionInActiveTitle : leftSecondaryActionActiveTitle
|
|
2600
2642
|
),
|
|
2601
2643
|
renderRightActions: () => rightActionHandle(item),
|
|
2602
|
-
containerStyle: styles$
|
|
2644
|
+
containerStyle: styles$i.swippableContainer
|
|
2603
2645
|
},
|
|
2604
2646
|
props?.renderItem(item)
|
|
2605
2647
|
));
|
|
@@ -2609,49 +2651,11 @@ const SwipableList = (props) => {
|
|
|
2609
2651
|
data,
|
|
2610
2652
|
renderItem,
|
|
2611
2653
|
keyExtractor: (item) => item.id,
|
|
2612
|
-
ItemSeparatorComponent: () => /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$
|
|
2654
|
+
ItemSeparatorComponent: () => /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$i.seprator })
|
|
2613
2655
|
}
|
|
2614
2656
|
));
|
|
2615
2657
|
};
|
|
2616
2658
|
|
|
2617
|
-
const styles$i = reactNative.StyleSheet.create({
|
|
2618
|
-
container: {
|
|
2619
|
-
justifyContent: "center",
|
|
2620
|
-
alignItems: "center"
|
|
2621
|
-
},
|
|
2622
|
-
title: {
|
|
2623
|
-
color: "#000"
|
|
2624
|
-
}
|
|
2625
|
-
});
|
|
2626
|
-
|
|
2627
|
-
const CustomIcon = ({
|
|
2628
|
-
icon,
|
|
2629
|
-
title,
|
|
2630
|
-
titleVariant = "L1_REGULAR",
|
|
2631
|
-
testId = "CUSTOM-ICON",
|
|
2632
|
-
onPress,
|
|
2633
|
-
containerStyle,
|
|
2634
|
-
titleStyle
|
|
2635
|
-
}) => {
|
|
2636
|
-
return /* @__PURE__ */ React__default["default"].createElement(
|
|
2637
|
-
reactNative.Pressable,
|
|
2638
|
-
{
|
|
2639
|
-
style: [styles$i.container, containerStyle],
|
|
2640
|
-
onPress,
|
|
2641
|
-
testID: testId
|
|
2642
|
-
},
|
|
2643
|
-
icon,
|
|
2644
|
-
title && /* @__PURE__ */ React__default["default"].createElement(
|
|
2645
|
-
CustomTypography,
|
|
2646
|
-
{
|
|
2647
|
-
variant: titleVariant,
|
|
2648
|
-
text: title,
|
|
2649
|
-
style: [styles$i.title, titleStyle]
|
|
2650
|
-
}
|
|
2651
|
-
)
|
|
2652
|
-
);
|
|
2653
|
-
};
|
|
2654
|
-
|
|
2655
2659
|
const styles$h = reactNative.StyleSheet.create({
|
|
2656
2660
|
container: {
|
|
2657
2661
|
flex: 1,
|