dhre-ui-kit 0.0.101 → 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 -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.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,17 +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 }, /* @__PURE__ */ React__default.createElement(
|
|
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(
|
|
2437
2482
|
CustomTypography,
|
|
2438
2483
|
{
|
|
2439
2484
|
variant: "B2_REGULAR",
|
|
2440
2485
|
text: title,
|
|
2441
2486
|
style: styles$k.headerTitle
|
|
2442
2487
|
}
|
|
2443
|
-
))
|
|
2488
|
+
)), showRightIcon && /* @__PURE__ */ React__default.createElement(
|
|
2489
|
+
CustomIcon,
|
|
2490
|
+
{
|
|
2491
|
+
icon: rightIcon,
|
|
2492
|
+
onPress: onRightPress,
|
|
2493
|
+
containerStyle: styles$k.rightIconStyle
|
|
2494
|
+
}
|
|
2495
|
+
));
|
|
2444
2496
|
};
|
|
2445
2497
|
|
|
2446
|
-
const styles$
|
|
2498
|
+
const styles$i = StyleSheet.create({
|
|
2447
2499
|
container: {
|
|
2448
2500
|
flex: 1
|
|
2449
2501
|
},
|
|
@@ -2504,19 +2556,19 @@ const SwipableList = (props) => {
|
|
|
2504
2556
|
{
|
|
2505
2557
|
testID,
|
|
2506
2558
|
onPress,
|
|
2507
|
-
style: [styles$
|
|
2559
|
+
style: [styles$i.actionButton, style]
|
|
2508
2560
|
},
|
|
2509
2561
|
icon,
|
|
2510
2562
|
/* @__PURE__ */ React__default.createElement(
|
|
2511
2563
|
CustomTypography,
|
|
2512
2564
|
{
|
|
2513
2565
|
variant: "L1_REGULAR",
|
|
2514
|
-
style: [styles$
|
|
2566
|
+
style: [styles$i.titleStyle, titleStyle],
|
|
2515
2567
|
text: title
|
|
2516
2568
|
}
|
|
2517
2569
|
)
|
|
2518
2570
|
);
|
|
2519
|
-
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(
|
|
2520
2572
|
ActionButton,
|
|
2521
2573
|
{
|
|
2522
2574
|
icon: leftPrimaryActionIcon,
|
|
@@ -2535,7 +2587,7 @@ const SwipableList = (props) => {
|
|
|
2535
2587
|
testID: `${testId}-LEFT-SECONDARY-${item.id}`
|
|
2536
2588
|
}
|
|
2537
2589
|
));
|
|
2538
|
-
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(
|
|
2539
2591
|
ActionButton,
|
|
2540
2592
|
{
|
|
2541
2593
|
icon: rightPrimaryActionIcon,
|
|
@@ -2545,7 +2597,7 @@ const SwipableList = (props) => {
|
|
|
2545
2597
|
testID: `${testId}-RIGHT-PRIMARY-${item.id}`
|
|
2546
2598
|
}
|
|
2547
2599
|
));
|
|
2548
|
-
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(
|
|
2549
2601
|
Swipeable,
|
|
2550
2602
|
{
|
|
2551
2603
|
renderLeftActions: () => leftActionHandle(
|
|
@@ -2556,7 +2608,7 @@ const SwipableList = (props) => {
|
|
|
2556
2608
|
item.isRead ? leftSecondaryActionInActiveTitle : leftSecondaryActionActiveTitle
|
|
2557
2609
|
),
|
|
2558
2610
|
renderRightActions: () => rightActionHandle(item),
|
|
2559
|
-
containerStyle: styles$
|
|
2611
|
+
containerStyle: styles$i.swippableContainer
|
|
2560
2612
|
},
|
|
2561
2613
|
props?.renderItem(item)
|
|
2562
2614
|
));
|
|
@@ -2566,49 +2618,11 @@ const SwipableList = (props) => {
|
|
|
2566
2618
|
data,
|
|
2567
2619
|
renderItem,
|
|
2568
2620
|
keyExtractor: (item) => item.id,
|
|
2569
|
-
ItemSeparatorComponent: () => /* @__PURE__ */ React__default.createElement(View, { style: styles$
|
|
2621
|
+
ItemSeparatorComponent: () => /* @__PURE__ */ React__default.createElement(View, { style: styles$i.seprator })
|
|
2570
2622
|
}
|
|
2571
2623
|
));
|
|
2572
2624
|
};
|
|
2573
2625
|
|
|
2574
|
-
const styles$i = StyleSheet.create({
|
|
2575
|
-
container: {
|
|
2576
|
-
justifyContent: "center",
|
|
2577
|
-
alignItems: "center"
|
|
2578
|
-
},
|
|
2579
|
-
title: {
|
|
2580
|
-
color: "#000"
|
|
2581
|
-
}
|
|
2582
|
-
});
|
|
2583
|
-
|
|
2584
|
-
const CustomIcon = ({
|
|
2585
|
-
icon,
|
|
2586
|
-
title,
|
|
2587
|
-
titleVariant = "L1_REGULAR",
|
|
2588
|
-
testId = "CUSTOM-ICON",
|
|
2589
|
-
onPress,
|
|
2590
|
-
containerStyle,
|
|
2591
|
-
titleStyle
|
|
2592
|
-
}) => {
|
|
2593
|
-
return /* @__PURE__ */ React__default.createElement(
|
|
2594
|
-
Pressable,
|
|
2595
|
-
{
|
|
2596
|
-
style: [styles$i.container, containerStyle],
|
|
2597
|
-
onPress,
|
|
2598
|
-
testID: testId
|
|
2599
|
-
},
|
|
2600
|
-
icon,
|
|
2601
|
-
title && /* @__PURE__ */ React__default.createElement(
|
|
2602
|
-
CustomTypography,
|
|
2603
|
-
{
|
|
2604
|
-
variant: titleVariant,
|
|
2605
|
-
text: title,
|
|
2606
|
-
style: [styles$i.title, titleStyle]
|
|
2607
|
-
}
|
|
2608
|
-
)
|
|
2609
|
-
);
|
|
2610
|
-
};
|
|
2611
|
-
|
|
2612
2626
|
const styles$h = StyleSheet.create({
|
|
2613
2627
|
container: {
|
|
2614
2628
|
flex: 1,
|