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.mjs
CHANGED
|
@@ -2423,6 +2423,44 @@ const styles$k = StyleSheet.create({
|
|
|
2423
2423
|
rightIconStyle: { marginLeft: horizontalScale(8) }
|
|
2424
2424
|
});
|
|
2425
2425
|
|
|
2426
|
+
const styles$j = StyleSheet.create({
|
|
2427
|
+
container: {
|
|
2428
|
+
justifyContent: "center",
|
|
2429
|
+
alignItems: "center"
|
|
2430
|
+
},
|
|
2431
|
+
title: {
|
|
2432
|
+
color: "#000"
|
|
2433
|
+
}
|
|
2434
|
+
});
|
|
2435
|
+
|
|
2436
|
+
const CustomIcon = ({
|
|
2437
|
+
icon,
|
|
2438
|
+
title,
|
|
2439
|
+
titleVariant = "L1_REGULAR",
|
|
2440
|
+
testId = "CUSTOM-ICON",
|
|
2441
|
+
onPress,
|
|
2442
|
+
containerStyle,
|
|
2443
|
+
titleStyle
|
|
2444
|
+
}) => {
|
|
2445
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
2446
|
+
Pressable,
|
|
2447
|
+
{
|
|
2448
|
+
style: [styles$j.container, containerStyle],
|
|
2449
|
+
onPress,
|
|
2450
|
+
testID: testId
|
|
2451
|
+
},
|
|
2452
|
+
icon,
|
|
2453
|
+
title && /* @__PURE__ */ React__default.createElement(
|
|
2454
|
+
CustomTypography,
|
|
2455
|
+
{
|
|
2456
|
+
variant: titleVariant,
|
|
2457
|
+
text: title,
|
|
2458
|
+
style: [styles$j.title, titleStyle]
|
|
2459
|
+
}
|
|
2460
|
+
)
|
|
2461
|
+
);
|
|
2462
|
+
};
|
|
2463
|
+
|
|
2426
2464
|
const CustomHeader = ({
|
|
2427
2465
|
title,
|
|
2428
2466
|
testId = "CUSTOM-HEADER",
|
|
@@ -2433,27 +2471,31 @@ const CustomHeader = ({
|
|
|
2433
2471
|
onLeftPress,
|
|
2434
2472
|
onRightPress
|
|
2435
2473
|
}) => {
|
|
2436
|
-
return /* @__PURE__ */ React__default.createElement(View, { style: styles$k.container, testID: testId }, /* @__PURE__ */ React__default.createElement(View, { style: styles$k.headderContainer }, showLeftIcon && React__default.
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2474
|
+
return /* @__PURE__ */ React__default.createElement(View, { style: styles$k.container, testID: testId }, /* @__PURE__ */ React__default.createElement(View, { style: styles$k.headderContainer }, showLeftIcon && /* @__PURE__ */ React__default.createElement(
|
|
2475
|
+
CustomIcon,
|
|
2476
|
+
{
|
|
2477
|
+
icon: leftIcon,
|
|
2478
|
+
onPress: onLeftPress,
|
|
2479
|
+
containerStyle: styles$k.leftIconStyle
|
|
2480
|
+
}
|
|
2481
|
+
), /* @__PURE__ */ React__default.createElement(
|
|
2442
2482
|
CustomTypography,
|
|
2443
2483
|
{
|
|
2444
2484
|
variant: "B2_REGULAR",
|
|
2445
2485
|
text: title,
|
|
2446
2486
|
style: styles$k.headerTitle
|
|
2447
2487
|
}
|
|
2448
|
-
)), showRightIcon && React__default.
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2488
|
+
)), showRightIcon && /* @__PURE__ */ React__default.createElement(
|
|
2489
|
+
CustomIcon,
|
|
2490
|
+
{
|
|
2491
|
+
icon: rightIcon,
|
|
2492
|
+
onPress: onRightPress,
|
|
2493
|
+
containerStyle: styles$k.rightIconStyle
|
|
2494
|
+
}
|
|
2495
|
+
));
|
|
2454
2496
|
};
|
|
2455
2497
|
|
|
2456
|
-
const styles$
|
|
2498
|
+
const styles$i = StyleSheet.create({
|
|
2457
2499
|
container: {
|
|
2458
2500
|
flex: 1
|
|
2459
2501
|
},
|
|
@@ -2514,19 +2556,19 @@ const SwipableList = (props) => {
|
|
|
2514
2556
|
{
|
|
2515
2557
|
testID,
|
|
2516
2558
|
onPress,
|
|
2517
|
-
style: [styles$
|
|
2559
|
+
style: [styles$i.actionButton, style]
|
|
2518
2560
|
},
|
|
2519
2561
|
icon,
|
|
2520
2562
|
/* @__PURE__ */ React__default.createElement(
|
|
2521
2563
|
CustomTypography,
|
|
2522
2564
|
{
|
|
2523
2565
|
variant: "L1_REGULAR",
|
|
2524
|
-
style: [styles$
|
|
2566
|
+
style: [styles$i.titleStyle, titleStyle],
|
|
2525
2567
|
text: title
|
|
2526
2568
|
}
|
|
2527
2569
|
)
|
|
2528
2570
|
);
|
|
2529
|
-
const leftActionHandle = (item, leftPrimaryActionIcon, leftPrimaryActionTitle, leftSecondaryActionIcon, leftSecondaryActionTitle) => /* @__PURE__ */ React__default.createElement(View, { style: [styles$
|
|
2571
|
+
const leftActionHandle = (item, leftPrimaryActionIcon, leftPrimaryActionTitle, leftSecondaryActionIcon, leftSecondaryActionTitle) => /* @__PURE__ */ React__default.createElement(View, { style: [styles$i.leftActions, leftPrimaryActionStyle] }, leftPrimaryActionIcon && /* @__PURE__ */ React__default.createElement(
|
|
2530
2572
|
ActionButton,
|
|
2531
2573
|
{
|
|
2532
2574
|
icon: leftPrimaryActionIcon,
|
|
@@ -2545,7 +2587,7 @@ const SwipableList = (props) => {
|
|
|
2545
2587
|
testID: `${testId}-LEFT-SECONDARY-${item.id}`
|
|
2546
2588
|
}
|
|
2547
2589
|
));
|
|
2548
|
-
const rightActionHandle = (item) => /* @__PURE__ */ React__default.createElement(View, { style: [styles$
|
|
2590
|
+
const rightActionHandle = (item) => /* @__PURE__ */ React__default.createElement(View, { style: [styles$i.rightActions, rightPrimaryActionStyle] }, rightPrimaryActionIcon && /* @__PURE__ */ React__default.createElement(
|
|
2549
2591
|
ActionButton,
|
|
2550
2592
|
{
|
|
2551
2593
|
icon: rightPrimaryActionIcon,
|
|
@@ -2555,7 +2597,7 @@ const SwipableList = (props) => {
|
|
|
2555
2597
|
testID: `${testId}-RIGHT-PRIMARY-${item.id}`
|
|
2556
2598
|
}
|
|
2557
2599
|
));
|
|
2558
|
-
const renderItem = ({ item }) => /* @__PURE__ */ React__default.createElement(GestureHandlerRootView, { testID: `${testId}-LIST`, style: styles$
|
|
2600
|
+
const renderItem = ({ item }) => /* @__PURE__ */ React__default.createElement(GestureHandlerRootView, { testID: `${testId}-LIST`, style: styles$i.container }, /* @__PURE__ */ React__default.createElement(
|
|
2559
2601
|
Swipeable,
|
|
2560
2602
|
{
|
|
2561
2603
|
renderLeftActions: () => leftActionHandle(
|
|
@@ -2566,7 +2608,7 @@ const SwipableList = (props) => {
|
|
|
2566
2608
|
item.isRead ? leftSecondaryActionInActiveTitle : leftSecondaryActionActiveTitle
|
|
2567
2609
|
),
|
|
2568
2610
|
renderRightActions: () => rightActionHandle(item),
|
|
2569
|
-
containerStyle: styles$
|
|
2611
|
+
containerStyle: styles$i.swippableContainer
|
|
2570
2612
|
},
|
|
2571
2613
|
props?.renderItem(item)
|
|
2572
2614
|
));
|
|
@@ -2576,49 +2618,11 @@ const SwipableList = (props) => {
|
|
|
2576
2618
|
data,
|
|
2577
2619
|
renderItem,
|
|
2578
2620
|
keyExtractor: (item) => item.id,
|
|
2579
|
-
ItemSeparatorComponent: () => /* @__PURE__ */ React__default.createElement(View, { style: styles$
|
|
2621
|
+
ItemSeparatorComponent: () => /* @__PURE__ */ React__default.createElement(View, { style: styles$i.seprator })
|
|
2580
2622
|
}
|
|
2581
2623
|
));
|
|
2582
2624
|
};
|
|
2583
2625
|
|
|
2584
|
-
const styles$i = StyleSheet.create({
|
|
2585
|
-
container: {
|
|
2586
|
-
justifyContent: "center",
|
|
2587
|
-
alignItems: "center"
|
|
2588
|
-
},
|
|
2589
|
-
title: {
|
|
2590
|
-
color: "#000"
|
|
2591
|
-
}
|
|
2592
|
-
});
|
|
2593
|
-
|
|
2594
|
-
const CustomIcon = ({
|
|
2595
|
-
icon,
|
|
2596
|
-
title,
|
|
2597
|
-
titleVariant = "L1_REGULAR",
|
|
2598
|
-
testId = "CUSTOM-ICON",
|
|
2599
|
-
onPress,
|
|
2600
|
-
containerStyle,
|
|
2601
|
-
titleStyle
|
|
2602
|
-
}) => {
|
|
2603
|
-
return /* @__PURE__ */ React__default.createElement(
|
|
2604
|
-
Pressable,
|
|
2605
|
-
{
|
|
2606
|
-
style: [styles$i.container, containerStyle],
|
|
2607
|
-
onPress,
|
|
2608
|
-
testID: testId
|
|
2609
|
-
},
|
|
2610
|
-
icon,
|
|
2611
|
-
title && /* @__PURE__ */ React__default.createElement(
|
|
2612
|
-
CustomTypography,
|
|
2613
|
-
{
|
|
2614
|
-
variant: titleVariant,
|
|
2615
|
-
text: title,
|
|
2616
|
-
style: [styles$i.title, titleStyle]
|
|
2617
|
-
}
|
|
2618
|
-
)
|
|
2619
|
-
);
|
|
2620
|
-
};
|
|
2621
|
-
|
|
2622
2626
|
const styles$h = StyleSheet.create({
|
|
2623
2627
|
container: {
|
|
2624
2628
|
flex: 1,
|