react-gldn-kit 0.1.39 → 0.1.40
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.js +1 -1
- package/dist/lib/components/Layouts/BonusCardLayout/index.js +2 -2
- package/dist/lib/components/Layouts/BonusCardLayout/types.d.ts +1 -0
- package/dist/lib/components/ui/Tabs/index.js +5 -4
- package/dist/lib/components/ui/Tabs/types.d.ts +3 -0
- package/dist/main.css +2 -1
- package/package.json +1 -1
|
@@ -47,8 +47,8 @@ var InfoSecondSvg_1 = require("components/ui/Icons/InfoSecondSvg");
|
|
|
47
47
|
var styles = __importStar(require("./BonusCardLayout.module.css"));
|
|
48
48
|
var BonusCardLayout = function (props) {
|
|
49
49
|
var _a;
|
|
50
|
-
var bonusImagePath = props.bonusImagePath, title = props.title, value = props.value, _b = props.endTimestamp, endTimestamp = _b === void 0 ? 0 : _b, description = props.description, buttonText = props.buttonText, handleClaim = props.handleClaim, counterProps = props.counterProps, categoryName = props.categoryName, currencyName = props.currencyName, _c = props.isAvailable, isAvailable = _c === void 0 ? true : _c, lockImagePath = props.lockImagePath, infoCallback = props.infoCallback;
|
|
51
|
-
return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.wrapperBonusCardLayout }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.container }, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.info }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.row }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.categoryName }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: categoryName }) })), (0, jsx_runtime_1.jsx)(InfoSecondSvg_1.InfoSecondSvg, { classes: styles.infoSvg, handleClick: infoCallback })] })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.box }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.row }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.title }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: title }) })) })), (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.description }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: description }) })), !!endTimestamp && ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.timer }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.expiration }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "bonusCabinet.expiration" }) })), (0, jsx_runtime_1.jsx)(CountDown_1.CountDown, __assign({}, counterProps, { endTimestamp: endTimestamp, wrapperClasses: (0, classnames_1.default)(styles.maxWidth, styles.timerBg), type: "row", timeBlockClasses: styles.timeBlock }))] }))), value && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.row }, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.value }, { children: [currencyName, value] })) })))] }))] })) })), (0, jsx_runtime_1.jsx)(Buttons_1.BaseButton, { text: buttonText, handleClick: handleClaim, buttonHeight: "--button-height-full", size: "--button-full", color: "primary", disabled: !+value, centreText: true, classes: (0, classnames_1.default)(styles.btn, (_a = {},
|
|
50
|
+
var bonusImagePath = props.bonusImagePath, title = props.title, value = props.value, _b = props.endTimestamp, endTimestamp = _b === void 0 ? 0 : _b, description = props.description, buttonText = props.buttonText, handleClaim = props.handleClaim, counterProps = props.counterProps, categoryName = props.categoryName, currencyName = props.currencyName, _c = props.isAvailable, isAvailable = _c === void 0 ? true : _c, lockImagePath = props.lockImagePath, infoCallback = props.infoCallback, isWithInfo = props.isWithInfo;
|
|
51
|
+
return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.wrapperBonusCardLayout }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.container }, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.info }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.row }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.categoryName }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: categoryName }) })), isWithInfo && ((0, jsx_runtime_1.jsx)(InfoSecondSvg_1.InfoSecondSvg, { classes: styles.infoSvg, handleClick: infoCallback }))] })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.box }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.row }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.title }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: title }) })) })), (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.description }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: description }) })), !!endTimestamp && ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.timer }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: styles.expiration }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "bonusCabinet.expiration" }) })), (0, jsx_runtime_1.jsx)(CountDown_1.CountDown, __assign({}, counterProps, { endTimestamp: endTimestamp, wrapperClasses: (0, classnames_1.default)(styles.maxWidth, styles.timerBg), type: "row", timeBlockClasses: styles.timeBlock }))] }))), value && isAvailable && ((0, jsx_runtime_1.jsx)("div", __assign({ className: styles.row }, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.value }, { children: [currencyName, value] })) })))] }))] })) })), (0, jsx_runtime_1.jsx)(Buttons_1.BaseButton, { text: buttonText, handleClick: handleClaim, buttonHeight: "--button-height-full", size: "--button-full", color: "primary", disabled: !+value, centreText: true, classes: (0, classnames_1.default)(styles.btn, (_a = {},
|
|
52
52
|
_a[styles.dark] = !+value,
|
|
53
53
|
_a)) }), (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.img }, { children: (0, jsx_runtime_1.jsx)("img", { src: bonusImagePath, className: styles.wrapperBonusCard }) })), !isAvailable && ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.blockedContent }, { children: [(0, jsx_runtime_1.jsx)("img", { src: lockImagePath, className: styles.lock }), (0, jsx_runtime_1.jsx)("div", __assign({ className: styles.blockedText }, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: "bonusCabinet.availableFrom" }) }))] })))] })));
|
|
54
54
|
};
|
|
@@ -46,7 +46,7 @@ var useElementResize_1 = require("hooks/useElementResize");
|
|
|
46
46
|
var styles = __importStar(require("./Tabs.module.css"));
|
|
47
47
|
var Tabs = function (props) {
|
|
48
48
|
var _a, _b;
|
|
49
|
-
var activeValue = props.activeValue, onChange = props.onChange, data = props.data, _c = props.classes, classes = _c === void 0 ? '' : _c, _d = props.tabClasses, tabClasses = _d === void 0 ? '' : _d, startItem = props.startItem, endItem = props.endItem, _e = props.type, type = _e === void 0 ? 'button' : _e;
|
|
49
|
+
var activeValue = props.activeValue, onChange = props.onChange, data = props.data, _c = props.classes, classes = _c === void 0 ? '' : _c, _d = props.tabClasses, tabClasses = _d === void 0 ? '' : _d, startItem = props.startItem, endItem = props.endItem, _e = props.type, type = _e === void 0 ? 'button' : _e, indicatorClasses = props.indicatorClasses, activeTabClasses = props.activeTabClasses;
|
|
50
50
|
var container = (0, react_1.useRef)(null);
|
|
51
51
|
var indicator = (0, react_1.useRef)(null);
|
|
52
52
|
var _f = (0, react_1.useState)(null), activeInx = _f[0], setActiveInx = _f[1];
|
|
@@ -99,12 +99,13 @@ var Tabs = function (props) {
|
|
|
99
99
|
_a[styles.bg] = isButtonView,
|
|
100
100
|
_a)), ref: container }, { children: [startItem, data.map(function (d) {
|
|
101
101
|
var _a;
|
|
102
|
-
return ((0, jsx_runtime_1.
|
|
102
|
+
return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.tab, tabClasses, (_a = {},
|
|
103
103
|
_a[styles.buttonTab] = isButtonView,
|
|
104
104
|
_a[styles.buttonTabActive] = isButtonView && activeValue === d.value,
|
|
105
|
-
_a
|
|
105
|
+
_a[activeTabClasses] = activeValue === d.value,
|
|
106
|
+
_a)), onClick: handleChange(d.value) }, { children: [d.startIcon, (0, jsx_runtime_1.jsx)(Text_1.Text, { idT: d.label })] }), d.value));
|
|
106
107
|
}), activeInx !== null && ((0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(styles.activeBlockIndicator, (_b = {},
|
|
107
108
|
_b[styles.buttonActiveIndicator] = isButtonView,
|
|
108
|
-
_b)), ref: indicator })), endItem] })));
|
|
109
|
+
_b), indicatorClasses), ref: indicator })), endItem] })));
|
|
109
110
|
};
|
|
110
111
|
exports.Tabs = Tabs;
|
|
@@ -8,8 +8,11 @@ export type TabsProps = {
|
|
|
8
8
|
startItem?: React.ReactElement;
|
|
9
9
|
endItem?: React.ReactElement;
|
|
10
10
|
type?: 'button' | 'underline';
|
|
11
|
+
indicatorClasses?: string;
|
|
12
|
+
activeTabClasses?: string;
|
|
11
13
|
};
|
|
12
14
|
export type Tab = {
|
|
15
|
+
startIcon?: string;
|
|
13
16
|
label: string;
|
|
14
17
|
value: number;
|
|
15
18
|
};
|
package/dist/main.css
CHANGED
|
@@ -1194,6 +1194,7 @@
|
|
|
1194
1194
|
transition: 0.3s;
|
|
1195
1195
|
cursor: pointer;
|
|
1196
1196
|
display: flex;
|
|
1197
|
+
align-items: center;
|
|
1197
1198
|
justify-content: center;
|
|
1198
1199
|
position: relative;
|
|
1199
1200
|
z-index: 2;
|
|
@@ -1201,6 +1202,7 @@
|
|
|
1201
1202
|
white-space: nowrap;
|
|
1202
1203
|
text-overflow: ellipsis;
|
|
1203
1204
|
width: 100%;
|
|
1205
|
+
gap: var(--indent-s);
|
|
1204
1206
|
}
|
|
1205
1207
|
.KIT__Tabs-module__wrapperTabs___rFoBY .KIT__Tabs-module__tab___NBVtA.KIT__Tabs-module__buttonTab___Tpphz {
|
|
1206
1208
|
padding: var(--indent-s);
|
|
@@ -1788,7 +1790,6 @@
|
|
|
1788
1790
|
.KIT__BonusCardLayout-module__wrapperBonusCardLayout___klMSg {
|
|
1789
1791
|
position: relative;
|
|
1790
1792
|
width: 100%;
|
|
1791
|
-
height: 100%;
|
|
1792
1793
|
min-height: 220px;
|
|
1793
1794
|
min-width: 280px;
|
|
1794
1795
|
padding: var(--indent-m);
|