@thecb/components 3.7.0-beta.1 → 3.7.0-beta.2
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/dist/index.cjs.js
CHANGED
|
@@ -13099,7 +13099,8 @@ var SettingsIconSmall = function SettingsIconSmall(_ref) {
|
|
|
13099
13099
|
var SettingsIconSmall$1 = themeComponent(SettingsIconSmall, "Icons", fallbackValues$2, "primary");
|
|
13100
13100
|
|
|
13101
13101
|
var ChevronIcon = function ChevronIcon(_ref) {
|
|
13102
|
-
var themeValues = _ref.themeValues
|
|
13102
|
+
var themeValues = _ref.themeValues,
|
|
13103
|
+
iconFill = _ref.iconFill;
|
|
13103
13104
|
return /*#__PURE__*/React__default.createElement("svg", {
|
|
13104
13105
|
width: "24",
|
|
13105
13106
|
height: "24",
|
|
@@ -13120,16 +13121,16 @@ var ChevronIcon = function ChevronIcon(_ref) {
|
|
|
13120
13121
|
}, /*#__PURE__*/React__default.createElement("mask", {
|
|
13121
13122
|
id: "icon-chevron-mask-2"
|
|
13122
13123
|
}, /*#__PURE__*/React__default.createElement("use", {
|
|
13123
|
-
fill: themeValues.singleIconColor,
|
|
13124
|
+
fill: iconFill !== null && iconFill !== void 0 ? iconFill : themeValues.singleIconColor,
|
|
13124
13125
|
xlinkHref: "#icon-chevron-path-1"
|
|
13125
13126
|
})), /*#__PURE__*/React__default.createElement("use", {
|
|
13126
|
-
fill: themeValues.singleIconColor,
|
|
13127
|
+
fill: iconFill !== null && iconFill !== void 0 ? iconFill : themeValues.singleIconColor,
|
|
13127
13128
|
id: "icon-chevron-Fill-2",
|
|
13128
13129
|
xlinkHref: "#icon-chevron-path-1"
|
|
13129
13130
|
}), /*#__PURE__*/React__default.createElement("g", {
|
|
13130
13131
|
id: "Colors/Blue-Dark",
|
|
13131
13132
|
mask: "url(#icon-chevron-mask-2)",
|
|
13132
|
-
fill: themeValues.singleIconColor
|
|
13133
|
+
fill: iconFill !== null && iconFill !== void 0 ? iconFill : themeValues.singleIconColor
|
|
13133
13134
|
}, /*#__PURE__*/React__default.createElement("rect", {
|
|
13134
13135
|
id: "icon-chevron-rect",
|
|
13135
13136
|
width: "24",
|
|
@@ -36458,7 +36459,8 @@ var PAGING_INIT_SPACE = 3; // first delimiter should appear after 3 pages
|
|
|
36458
36459
|
|
|
36459
36460
|
var PrevNextButton = function PrevNextButton(_ref) {
|
|
36460
36461
|
var action = _ref.action,
|
|
36461
|
-
type = _ref.type
|
|
36462
|
+
type = _ref.type,
|
|
36463
|
+
arrowColor = _ref.arrowColor;
|
|
36462
36464
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
36463
36465
|
padding: "0 10px 0",
|
|
36464
36466
|
minHeight: "40px",
|
|
@@ -36472,7 +36474,8 @@ var PrevNextButton = function PrevNextButton(_ref) {
|
|
|
36472
36474
|
padding: "0",
|
|
36473
36475
|
extraStyles: type === "prev" && "transform: scaleX(-1)"
|
|
36474
36476
|
}, /*#__PURE__*/React__default.createElement(ChevronIcon$1, {
|
|
36475
|
-
variant: "darkMode"
|
|
36477
|
+
variant: "darkMode",
|
|
36478
|
+
iconFill: arrowColor
|
|
36476
36479
|
}))));
|
|
36477
36480
|
};
|
|
36478
36481
|
|
|
@@ -36527,7 +36530,9 @@ var Pagination = function Pagination(_ref2) {
|
|
|
36527
36530
|
pageNext = _ref2.pageNext,
|
|
36528
36531
|
setCurrentPage = _ref2.setCurrentPage,
|
|
36529
36532
|
currentPage = _ref2.currentPage,
|
|
36530
|
-
pageCount = _ref2.pageCount
|
|
36533
|
+
pageCount = _ref2.pageCount,
|
|
36534
|
+
numberColor = _ref2.numberColor,
|
|
36535
|
+
arrowColor = _ref2.arrowColor;
|
|
36531
36536
|
return /*#__PURE__*/React__default.createElement(Cluster, {
|
|
36532
36537
|
justify: "center",
|
|
36533
36538
|
childGap: "10px"
|
|
@@ -36537,7 +36542,7 @@ var Pagination = function Pagination(_ref2) {
|
|
|
36537
36542
|
}), getPagesPanel(currentPage, pageCount).map(function (item, index) {
|
|
36538
36543
|
return item.isButton ? /*#__PURE__*/React__default.createElement(Box, {
|
|
36539
36544
|
padding: "0",
|
|
36540
|
-
border: item.active && "1px solid ".concat(MATISSE_BLUE),
|
|
36545
|
+
border: item.active && "1px solid ".concat(numberColor !== null && numberColor !== void 0 ? numberColor : MATISSE_BLUE),
|
|
36541
36546
|
borderRadius: item.active && "3px",
|
|
36542
36547
|
extraStyles: "max-height: 40px;"
|
|
36543
36548
|
}, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
@@ -36551,7 +36556,7 @@ var Pagination = function Pagination(_ref2) {
|
|
|
36551
36556
|
});
|
|
36552
36557
|
} : noop,
|
|
36553
36558
|
textExtraStyles: "font-size: 17px; font-weight: 900;",
|
|
36554
|
-
extraStyles: "\n min-width: 40px; min-height: 100%; padding: 0;\n &:hover, &:focus {\n text-decoration: none;\n > * > span {\n text-decoration: none;\n }\n }\n }\n &:hover { ".concat(item.active ? "cursor: default;" : "background-color: ".concat(ALABASTER_WHITE), " }\n "),
|
|
36559
|
+
extraStyles: "\n min-width: 40px; min-height: 100%; padding: 0;\n &:hover, &:focus {\n text-decoration: none;\n > * > span {\n text-decoration: none;\n }\n }\n color: ".concat(numberColor !== null && numberColor !== void 0 ? numberColor : MATISSE_BLUE, "\n }\n &:hover { ").concat(item.active ? "cursor: default;" : "background-color: ".concat(ALABASTER_WHITE), " }\n "),
|
|
36555
36560
|
dataQa: index
|
|
36556
36561
|
}, item.index)) : /*#__PURE__*/React__default.createElement(Box, {
|
|
36557
36562
|
padding: "0 10px"
|
|
@@ -36561,11 +36566,12 @@ var Pagination = function Pagination(_ref2) {
|
|
|
36561
36566
|
key: index,
|
|
36562
36567
|
variant: "pXL",
|
|
36563
36568
|
weight: "900",
|
|
36564
|
-
color: MATISSE_BLUE
|
|
36569
|
+
color: numberColor !== null && numberColor !== void 0 ? numberColor : MATISSE_BLUE
|
|
36565
36570
|
}, "...")));
|
|
36566
36571
|
}), currentPage < pageCount && /*#__PURE__*/React__default.createElement(PrevNextButton, {
|
|
36567
36572
|
type: "next",
|
|
36568
|
-
action: pageNext
|
|
36573
|
+
action: pageNext,
|
|
36574
|
+
arrowColor: arrowColor
|
|
36569
36575
|
}));
|
|
36570
36576
|
};
|
|
36571
36577
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { fallbackValues } from "./Icons.theme";
|
|
3
3
|
import { themeComponent } from "../../../util/themeUtils";
|
|
4
4
|
|
|
5
|
-
const ChevronIcon = ({ themeValues }) => {
|
|
5
|
+
const ChevronIcon = ({ themeValues, iconFill }) => {
|
|
6
6
|
return (
|
|
7
7
|
<svg
|
|
8
8
|
width="24"
|
|
@@ -21,20 +21,20 @@ const ChevronIcon = ({ themeValues }) => {
|
|
|
21
21
|
<g id={`icon-chevron-Icon/Chevron-Down`} fill="none" fillRule="evenodd">
|
|
22
22
|
<mask id={`icon-chevron-mask-2`}>
|
|
23
23
|
<use
|
|
24
|
-
fill={themeValues.singleIconColor}
|
|
24
|
+
fill={iconFill ?? themeValues.singleIconColor}
|
|
25
25
|
xlinkHref={`#icon-chevron-path-1`}
|
|
26
26
|
/>
|
|
27
27
|
</mask>
|
|
28
28
|
|
|
29
29
|
<use
|
|
30
|
-
fill={themeValues.singleIconColor}
|
|
30
|
+
fill={iconFill ?? themeValues.singleIconColor}
|
|
31
31
|
id={`icon-chevron-Fill-2`}
|
|
32
32
|
xlinkHref={`#icon-chevron-path-1`}
|
|
33
33
|
/>
|
|
34
34
|
<g
|
|
35
35
|
id="Colors/Blue-Dark"
|
|
36
36
|
mask={`url(#icon-chevron-mask-2)`}
|
|
37
|
-
fill={themeValues.singleIconColor}
|
|
37
|
+
fill={iconFill ?? themeValues.singleIconColor}
|
|
38
38
|
>
|
|
39
39
|
<rect id={`icon-chevron-rect`} width="24" height="24" />
|
|
40
40
|
</g>
|
|
@@ -9,7 +9,7 @@ import { noop } from "../../../util/general";
|
|
|
9
9
|
const PAGING_SPACE = 2; // how many pages we want to have before/after delimiter
|
|
10
10
|
const PAGING_INIT_SPACE = 3; // first delimiter should appear after 3 pages
|
|
11
11
|
|
|
12
|
-
const PrevNextButton = ({ action, type }) => (
|
|
12
|
+
const PrevNextButton = ({ action, type, arrowColor }) => (
|
|
13
13
|
<Box padding="0 10px 0" minHeight="40px" extraStyles="max-height: 40px;">
|
|
14
14
|
<ButtonWithAction
|
|
15
15
|
action={action}
|
|
@@ -24,7 +24,7 @@ const PrevNextButton = ({ action, type }) => (
|
|
|
24
24
|
`}
|
|
25
25
|
>
|
|
26
26
|
<Box padding="0" extraStyles={type === "prev" && "transform: scaleX(-1)"}>
|
|
27
|
-
<ChevronIcon variant="darkMode" />
|
|
27
|
+
<ChevronIcon variant="darkMode" iconFill={arrowColor} />
|
|
28
28
|
</Box>
|
|
29
29
|
</ButtonWithAction>
|
|
30
30
|
</Box>
|
|
@@ -63,7 +63,9 @@ const Pagination = ({
|
|
|
63
63
|
pageNext,
|
|
64
64
|
setCurrentPage,
|
|
65
65
|
currentPage,
|
|
66
|
-
pageCount
|
|
66
|
+
pageCount,
|
|
67
|
+
numberColor,
|
|
68
|
+
arrowColor
|
|
67
69
|
}) => (
|
|
68
70
|
<Cluster justify="center" childGap="10px">
|
|
69
71
|
{currentPage > 1 && <PrevNextButton type="prev" action={pagePrevious} />}
|
|
@@ -71,7 +73,7 @@ const Pagination = ({
|
|
|
71
73
|
item.isButton ? (
|
|
72
74
|
<Box
|
|
73
75
|
padding="0"
|
|
74
|
-
border={item.active && `1px solid ${MATISSE_BLUE}`}
|
|
76
|
+
border={item.active && `1px solid ${numberColor ?? MATISSE_BLUE}`}
|
|
75
77
|
borderRadius={item.active && "3px"}
|
|
76
78
|
extraStyles="max-height: 40px;"
|
|
77
79
|
>
|
|
@@ -94,6 +96,7 @@ const Pagination = ({
|
|
|
94
96
|
text-decoration: none;
|
|
95
97
|
}
|
|
96
98
|
}
|
|
99
|
+
color: ${numberColor ?? MATISSE_BLUE}
|
|
97
100
|
}
|
|
98
101
|
&:hover { ${
|
|
99
102
|
item.active
|
|
@@ -109,7 +112,12 @@ const Pagination = ({
|
|
|
109
112
|
) : (
|
|
110
113
|
<Box padding="0 10px">
|
|
111
114
|
<Cluster justify="flex-end">
|
|
112
|
-
<Text
|
|
115
|
+
<Text
|
|
116
|
+
key={index}
|
|
117
|
+
variant="pXL"
|
|
118
|
+
weight="900"
|
|
119
|
+
color={numberColor ?? MATISSE_BLUE}
|
|
120
|
+
>
|
|
113
121
|
{"..."}
|
|
114
122
|
</Text>
|
|
115
123
|
</Cluster>
|
|
@@ -117,7 +125,7 @@ const Pagination = ({
|
|
|
117
125
|
)
|
|
118
126
|
)}
|
|
119
127
|
{currentPage < pageCount && (
|
|
120
|
-
<PrevNextButton type="next" action={pageNext} />
|
|
128
|
+
<PrevNextButton type="next" action={pageNext} arrowColor={arrowColor} />
|
|
121
129
|
)}
|
|
122
130
|
</Cluster>
|
|
123
131
|
);
|