dhre-ui-kit 0.0.101 → 0.0.104
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 -48
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +62 -48
- 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,17 +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 }, /* @__PURE__ */ React__default["default"].createElement(
|
|
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(
|
|
2470
2515
|
CustomTypography,
|
|
2471
2516
|
{
|
|
2472
2517
|
variant: "B2_REGULAR",
|
|
2473
2518
|
text: title,
|
|
2474
2519
|
style: styles$k.headerTitle
|
|
2475
2520
|
}
|
|
2476
|
-
))
|
|
2521
|
+
)), showRightIcon && /* @__PURE__ */ React__default["default"].createElement(
|
|
2522
|
+
CustomIcon,
|
|
2523
|
+
{
|
|
2524
|
+
icon: rightIcon,
|
|
2525
|
+
onPress: onRightPress,
|
|
2526
|
+
containerStyle: styles$k.rightIconStyle
|
|
2527
|
+
}
|
|
2528
|
+
));
|
|
2477
2529
|
};
|
|
2478
2530
|
|
|
2479
|
-
const styles$
|
|
2531
|
+
const styles$i = reactNative.StyleSheet.create({
|
|
2480
2532
|
container: {
|
|
2481
2533
|
flex: 1
|
|
2482
2534
|
},
|
|
@@ -2537,19 +2589,19 @@ const SwipableList = (props) => {
|
|
|
2537
2589
|
{
|
|
2538
2590
|
testID,
|
|
2539
2591
|
onPress,
|
|
2540
|
-
style: [styles$
|
|
2592
|
+
style: [styles$i.actionButton, style]
|
|
2541
2593
|
},
|
|
2542
2594
|
icon,
|
|
2543
2595
|
/* @__PURE__ */ React__default["default"].createElement(
|
|
2544
2596
|
CustomTypography,
|
|
2545
2597
|
{
|
|
2546
2598
|
variant: "L1_REGULAR",
|
|
2547
|
-
style: [styles$
|
|
2599
|
+
style: [styles$i.titleStyle, titleStyle],
|
|
2548
2600
|
text: title
|
|
2549
2601
|
}
|
|
2550
2602
|
)
|
|
2551
2603
|
);
|
|
2552
|
-
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(
|
|
2553
2605
|
ActionButton,
|
|
2554
2606
|
{
|
|
2555
2607
|
icon: leftPrimaryActionIcon,
|
|
@@ -2568,7 +2620,7 @@ const SwipableList = (props) => {
|
|
|
2568
2620
|
testID: `${testId}-LEFT-SECONDARY-${item.id}`
|
|
2569
2621
|
}
|
|
2570
2622
|
));
|
|
2571
|
-
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(
|
|
2572
2624
|
ActionButton,
|
|
2573
2625
|
{
|
|
2574
2626
|
icon: rightPrimaryActionIcon,
|
|
@@ -2578,7 +2630,7 @@ const SwipableList = (props) => {
|
|
|
2578
2630
|
testID: `${testId}-RIGHT-PRIMARY-${item.id}`
|
|
2579
2631
|
}
|
|
2580
2632
|
));
|
|
2581
|
-
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(
|
|
2582
2634
|
reactNativeGestureHandler.Swipeable,
|
|
2583
2635
|
{
|
|
2584
2636
|
renderLeftActions: () => leftActionHandle(
|
|
@@ -2589,7 +2641,7 @@ const SwipableList = (props) => {
|
|
|
2589
2641
|
item.isRead ? leftSecondaryActionInActiveTitle : leftSecondaryActionActiveTitle
|
|
2590
2642
|
),
|
|
2591
2643
|
renderRightActions: () => rightActionHandle(item),
|
|
2592
|
-
containerStyle: styles$
|
|
2644
|
+
containerStyle: styles$i.swippableContainer
|
|
2593
2645
|
},
|
|
2594
2646
|
props?.renderItem(item)
|
|
2595
2647
|
));
|
|
@@ -2599,49 +2651,11 @@ const SwipableList = (props) => {
|
|
|
2599
2651
|
data,
|
|
2600
2652
|
renderItem,
|
|
2601
2653
|
keyExtractor: (item) => item.id,
|
|
2602
|
-
ItemSeparatorComponent: () => /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$
|
|
2654
|
+
ItemSeparatorComponent: () => /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$i.seprator })
|
|
2603
2655
|
}
|
|
2604
2656
|
));
|
|
2605
2657
|
};
|
|
2606
2658
|
|
|
2607
|
-
const styles$i = reactNative.StyleSheet.create({
|
|
2608
|
-
container: {
|
|
2609
|
-
justifyContent: "center",
|
|
2610
|
-
alignItems: "center"
|
|
2611
|
-
},
|
|
2612
|
-
title: {
|
|
2613
|
-
color: "#000"
|
|
2614
|
-
}
|
|
2615
|
-
});
|
|
2616
|
-
|
|
2617
|
-
const CustomIcon = ({
|
|
2618
|
-
icon,
|
|
2619
|
-
title,
|
|
2620
|
-
titleVariant = "L1_REGULAR",
|
|
2621
|
-
testId = "CUSTOM-ICON",
|
|
2622
|
-
onPress,
|
|
2623
|
-
containerStyle,
|
|
2624
|
-
titleStyle
|
|
2625
|
-
}) => {
|
|
2626
|
-
return /* @__PURE__ */ React__default["default"].createElement(
|
|
2627
|
-
reactNative.Pressable,
|
|
2628
|
-
{
|
|
2629
|
-
style: [styles$i.container, containerStyle],
|
|
2630
|
-
onPress,
|
|
2631
|
-
testID: testId
|
|
2632
|
-
},
|
|
2633
|
-
icon,
|
|
2634
|
-
title && /* @__PURE__ */ React__default["default"].createElement(
|
|
2635
|
-
CustomTypography,
|
|
2636
|
-
{
|
|
2637
|
-
variant: titleVariant,
|
|
2638
|
-
text: title,
|
|
2639
|
-
style: [styles$i.title, titleStyle]
|
|
2640
|
-
}
|
|
2641
|
-
)
|
|
2642
|
-
);
|
|
2643
|
-
};
|
|
2644
|
-
|
|
2645
2659
|
const styles$h = reactNative.StyleSheet.create({
|
|
2646
2660
|
container: {
|
|
2647
2661
|
flex: 1,
|