@cashub/ui-elv 1.0.0
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/Tab/Tab.js +28 -0
- package/Tab/TabList.js +167 -0
- package/Tab/TabPanel.js +49 -0
- package/Tab/TabTab.js +105 -0
- package/Tab/index.js +30 -0
- package/Tab/subComponent/TabContext.js +9 -0
- package/Tab/subComponent/TabListV2.js +25 -0
- package/Tab/subComponent/TabPanelV2.js +52 -0
- package/Tab/subComponent/TabTabV2.js +63 -0
- package/VerticalTab/TabList.js +27 -0
- package/VerticalTab/TabPanel.js +52 -0
- package/VerticalTab/TabTab.js +70 -0
- package/VerticalTab/VerticalTab.js +41 -0
- package/VerticalTab/index.js +16 -0
- package/VerticalTab/subComponent/TabContext.js +9 -0
- package/alert/Alert.js +29 -0
- package/alert/index.js +13 -0
- package/animate/Collapse.js +71 -0
- package/animate/Loader.js +58 -0
- package/animate/NumberCounter.js +51 -0
- package/animate/PulseRing.js +35 -0
- package/animate/Spinner.js +18 -0
- package/animate/index.js +41 -0
- package/assets/css/autocomplete.css +16 -0
- package/assets/css/font.css +4 -0
- package/assets/css/global.css +2 -0
- package/assets/font/helvetica/Helvetica.ttf +0 -0
- package/assets/font/nanumGothic/NanumGothic-Bold.ttf +0 -0
- package/assets/font/nanumGothic/NanumGothic-ExtraBold.ttf +0 -0
- package/assets/font/nanumGothic/NanumGothic-Regular.ttf +0 -0
- package/assets/icons/app-management.png +0 -0
- package/assets/icons/burger-black.png +0 -0
- package/assets/icons/burger-white.png +0 -0
- package/assets/icons/burger.png +0 -0
- package/assets/icons/file.svg +1 -0
- package/assets/icons/map_icon1.png +0 -0
- package/assets/icons/map_icon4.png +0 -0
- package/assets/images/bg-aside.png +0 -0
- package/assets/images/bg-chart-circle.png +0 -0
- package/assets/images/bg-chart-triangle.png +0 -0
- package/assets/images/cashub-logo-only.png +0 -0
- package/assets/images/default-user.jpg +0 -0
- package/assets/images/logo-cashub.png +0 -0
- package/assets/images/map.png +0 -0
- package/assets/images/qrcode.png +0 -0
- package/backdrop/BaseBackdrop.js +18 -0
- package/backdrop/LoadingBackdrop.js +17 -0
- package/backdrop/ModalBackdrop.js +15 -0
- package/backdrop/index.js +27 -0
- package/badge/Badge.js +26 -0
- package/badge/BadgeDot.js +18 -0
- package/badge/BadgeFill.js +49 -0
- package/badge/BadgeFillTriangle.js +147 -0
- package/badge/BadgeWithText.js +31 -0
- package/badge/index.js +41 -0
- package/billing/BarChart.js +51 -0
- package/billing/Grid.js +45 -0
- package/billing/Header2.js +25 -0
- package/billing/Header3.js +37 -0
- package/billing/Paragraph.js +33 -0
- package/billing/ParagraphGroup.js +22 -0
- package/billing/ParagraphText.js +26 -0
- package/billing/Section.js +50 -0
- package/billing/SectionBody.js +17 -0
- package/billing/SectionHeader.js +26 -0
- package/billing/__stories__/BarChart.stories.js_bak +46 -0
- package/billing/__stories__/Grid.stories.js_bak +57 -0
- package/billing/__stories__/Header2.stories.js_bak +62 -0
- package/billing/__stories__/Header3.stories.js_bak +69 -0
- package/billing/__stories__/Paragraph.stories.js_bak +84 -0
- package/billing/__stories__/ParagraphGroup.stories.js_bak +68 -0
- package/billing/__stories__/ParagraphText.stories.js_bak +64 -0
- package/billing/__stories__/Section.stories.js_bak +115 -0
- package/billing/__stories__/SectionBody.stories.js_bak +62 -0
- package/billing/__stories__/SectionHeader.stories.js-bak +68 -0
- package/breadcrumb/Breadcrumb.js +78 -0
- package/breadcrumb/index.js +13 -0
- package/button/Button.js +154 -0
- package/button/ButtonGroup.js +61 -0
- package/button/IconButton.js +72 -0
- package/button/ScrollToTopButton.js +54 -0
- package/button/index.js +34 -0
- package/callout/Callout.js +52 -0
- package/callout/index.js +13 -0
- package/chart/BarChart.js +148 -0
- package/chart/DoughnutChart.js +118 -0
- package/chart/LineChart.js +146 -0
- package/chart/SingleBarChart.js +42 -0
- package/chart/index.js +52 -0
- package/chart/utils/centerTextPlugin.js +62 -0
- package/chart/utils/customTooltip.js +94 -0
- package/chart/utils/htmlLegendPlugin.js +89 -0
- package/chart/utils/index.js +27 -0
- package/chart/utils/padEmptyChartBar.js +53 -0
- package/chart/utils/yAxisTopTitlePlugin.js +49 -0
- package/container/FlexContainer.js +40 -0
- package/container/index.js +13 -0
- package/cropper/Cropper.js +54 -0
- package/cropper/CropperModalHandler.js +41 -0
- package/cropper/index.js +20 -0
- package/cropper/subComponent/CropImageModal.js +79 -0
- package/datetimePicker/DatePicker.js +363 -0
- package/datetimePicker/DatePickerV2.js +407 -0
- package/datetimePicker/DatetimePicker.js +240 -0
- package/datetimePicker/DatetimePickerV2.js +395 -0
- package/datetimePicker/DatetimePickerV3.js +279 -0
- package/datetimePicker/TimeInput.js +56 -0
- package/datetimePicker/TimePicker.js +317 -0
- package/datetimePicker/TimePickerStyle.js +64 -0
- package/datetimePicker/TimePickerV2.js +208 -0
- package/datetimePicker/accordion/Month.js +254 -0
- package/datetimePicker/accordion/Year.js +284 -0
- package/datetimePicker/hooks/index.js +27 -0
- package/datetimePicker/hooks/useChangeNumber.js +42 -0
- package/datetimePicker/hooks/useDecrease.js +38 -0
- package/datetimePicker/hooks/useIncrease.js +38 -0
- package/datetimePicker/index.js +69 -0
- package/datetimePicker/provider/constant.js +43 -0
- package/datetimePicker/subComponent/Accordion.js +373 -0
- package/datetimePicker/subComponent/CustomTimeInput.js +47 -0
- package/datetimePicker/subComponent/DateTimePickerContext.js +9 -0
- package/datetimePicker/utils/GMTDate.js +15 -0
- package/datetimePicker/utils/pad.js +13 -0
- package/datetimePicker/utils/toUTC0.js +13 -0
- package/descriptionList/DescriptionDetail.js +28 -0
- package/descriptionList/DescriptionList.js +25 -0
- package/descriptionList/DescriptionTerm.js +14 -0
- package/descriptionList/index.js +27 -0
- package/divider/Divider.js +31 -0
- package/divider/index.js +13 -0
- package/dropdown/Dropdown.js +55 -0
- package/dropdown/DropdownButtonOption.js +43 -0
- package/dropdown/DropdownContent.js +90 -0
- package/dropdown/DropdownDivOption.js +26 -0
- package/dropdown/DropdownItem.js +26 -0
- package/dropdown/DropdownLinkOption.js +24 -0
- package/dropdown/DropdownToggle.js +38 -0
- package/dropdown/index.js +42 -0
- package/dropdown/subComponent/DropdownContext.js +9 -0
- package/dropzone/FileDropzone.js +479 -0
- package/dropzone/ImageDropzone.js +334 -0
- package/dropzone/index.js +20 -0
- package/dropzone/subComponent/Message.js +26 -0
- package/figure/IconFigure.js +42 -0
- package/figure/ImageFigure.js +38 -0
- package/figure/index.js +20 -0
- package/file/HiddenFileInput.js +15 -0
- package/file/index.js +13 -0
- package/form/Checkbox.js +166 -0
- package/form/Fieldset.js +18 -0
- package/form/FormItem.js +22 -0
- package/form/Input.js +66 -0
- package/form/Label.js +61 -0
- package/form/MutedText.js +21 -0
- package/form/PasswordInput.js +47 -0
- package/form/RadioButton.js +103 -0
- package/form/SearchSelect.js +181 -0
- package/form/Searchbox.js +98 -0
- package/form/Slider.js +46 -0
- package/form/SwitchButton.js +105 -0
- package/form/Textarea.js +41 -0
- package/form/TreeView.js +73 -0
- package/form/index.js +104 -0
- package/grid/Column.js +46 -0
- package/grid/Grid.js +35 -0
- package/grid/index.js +20 -0
- package/heading/Heading1.js +21 -0
- package/heading/Heading2.js +28 -0
- package/heading/Heading3.js +49 -0
- package/heading/index.js +27 -0
- package/helmet/Helmet.js +23 -0
- package/helmet/index.js +20 -0
- package/iconbox/ApplicationIconBox.js +81 -0
- package/iconbox/IconBox.js +67 -0
- package/iconbox/IconBoxV2.js +72 -0
- package/iconbox/index.js +27 -0
- package/iconbox/subComponent/IconBoxFigure.js +50 -0
- package/iconbox/subComponent/IconBoxImage.js +42 -0
- package/image/ImageFluid.js +17 -0
- package/image/UploadImage.js +250 -0
- package/image/index.js +20 -0
- package/index.js +568 -0
- package/jsoneditor/JsonEditor.js +142 -0
- package/jsoneditor/index.js +13 -0
- package/keyframe/Pulse.js +21 -0
- package/keyframe/Spin.js +13 -0
- package/layout/Aside.js +48 -0
- package/layout/AsideHeader.jsx +27 -0
- package/layout/Backdrop.js +23 -0
- package/layout/Container.js +39 -0
- package/layout/Footer.js +45 -0
- package/layout/Header.jsx +55 -0
- package/layout/Layout.jsx +84 -0
- package/layout/Logo.jsx +17 -0
- package/layout/MenuIcon.jsx +27 -0
- package/layout/Sidebar.jsx +271 -0
- package/layout/index.js +13 -0
- package/link/LinkSpan.js +69 -0
- package/link/index.js +13 -0
- package/map/GoogleMap.js +448 -0
- package/map/GoogleReverseGeolocation.js +200 -0
- package/map/LeafletMap.js +231 -0
- package/map/LeafletReverseGeolocation.js +101 -0
- package/map/index.js +34 -0
- package/map/subComponent/BasicLeafletMap.js +34 -0
- package/map/subComponent/GoogleMapContainer.js +29 -0
- package/map/subComponent/GoogleMapPopup.js +109 -0
- package/map/subComponent/GoogleMapWrapper.js +40 -0
- package/map/subComponent/LeafletDrawControl.js +127 -0
- package/map/subComponent/LeafletMapContainer.js +173 -0
- package/map/subComponent/MapSearchBoxControl.js +54 -0
- package/modal/StateModal.js +178 -0
- package/modal/TitleModal.js +250 -0
- package/modal/index.js +20 -0
- package/package.json +54 -0
- package/page/Disclaimer.js +128 -0
- package/page/index.js +13 -0
- package/paginate/Paginate.js +137 -0
- package/paginate/index.js +13 -0
- package/popover/Popover.js +91 -0
- package/popover/index.js +13 -0
- package/qrcode/QRCode.js +58 -0
- package/qrcode/QRCodeContainter.js +34 -0
- package/qrcode/index.js +20 -0
- package/ribbon/Ribbon.js +42 -0
- package/ribbon/index.js +13 -0
- package/section/Section.js +133 -0
- package/section/SectionBody.js +52 -0
- package/section/SectionHeader.js +70 -0
- package/section/SectionToolbar.js +18 -0
- package/section/SectionToolbarItem.js +17 -0
- package/section/index.js +41 -0
- package/select/InputSelect.js +270 -0
- package/select/Select.js +818 -0
- package/select/index.js +20 -0
- package/select/subComponent/Checkbox.js +48 -0
- package/select/subComponent/Footer.js +13 -0
- package/select/subComponent/ListBox.js +30 -0
- package/select/subComponent/Option.js +45 -0
- package/select/subComponent/OptionGroup.js +23 -0
- package/select/subComponent/Options.js +32 -0
- package/select/subComponent/SearchBox.js +58 -0
- package/select/subComponent/SelectedMultipleCount.js +39 -0
- package/select/subComponent/SelectedMultipleTags.js +54 -0
- package/select/subComponent/SelectedMultipleText.js +70 -0
- package/select/subComponent/SelectedSingle.js +17 -0
- package/styles/GlobalStyle.js +334 -0
- package/styles/config/breakpoint.style.js +13 -0
- package/styles/config/header.style.js +10 -0
- package/styles/config/sidebar.style.js +17 -0
- package/styles/index.js +20 -0
- package/styles/mixin/backgroundColor.js +44 -0
- package/styles/mixin/borderColor.js +37 -0
- package/styles/mixin/color.js +37 -0
- package/styles/mixin/colorOnBackground.js +37 -0
- package/styles/mixin/inputPlaceholder.js +30 -0
- package/styles/mixin/media.js +21 -0
- package/styles/mixin/rounded.js +30 -0
- package/styles/mixin/scrollbar.js +32 -0
- package/styles/theme/dark.theme.js +97 -0
- package/styles/theme/light.theme.js +97 -0
- package/styles/theme/white.theme.js +97 -0
- package/styles/themes.js +16 -0
- package/table/GridTable.js +336 -0
- package/table/ImageBox.js +45 -0
- package/table/InfiniteGridTable.js +403 -0
- package/table/PermissionTable.js +64 -0
- package/table/SimpleGridTable.js +143 -0
- package/table/Table.js +568 -0
- package/table/__mock__/columns.js +70 -0
- package/table/__mock__/data.js +536 -0
- package/table/hooks/index.js +20 -0
- package/table/hooks/useCalculateDataRange.js +28 -0
- package/table/hooks/useGenerateSort.js +39 -0
- package/table/index.js +48 -0
- package/table/subComponent/BaseTableHeadCell.js +62 -0
- package/table/subComponent/GridTableFooter.js +24 -0
- package/table/subComponent/GridTableHeadCell.js +20 -0
- package/table/subComponent/Resizer.js +77 -0
- package/table/subComponent/TableFooter.js +31 -0
- package/table/subComponent/TableFooterInfo.js +13 -0
- package/table/subComponent/TableFooterPager.js +33 -0
- package/table/subComponent/TableHeadCell.js +19 -0
- package/table/subComponent/TableSort.js +38 -0
- package/tagify/TagifyStyle.js +60 -0
- package/tagify/Tags.js +56 -0
- package/tagify/index.js +27 -0
- package/tagify/templates/getCreateButtonTemplate.js +18 -0
- package/text/Paragraph.js +86 -0
- package/text/index.js +13 -0
- package/timeline/Timeline.js +139 -0
- package/timeline/index.js +13 -0
- package/toast/CustomToastContainer.js +45 -0
- package/toast/MessageContainer.js +51 -0
- package/toast/index.js +36 -0
- package/toast/show.js +39 -0
- package/toast/style.css +1 -0
- package/tooltip/Tooltip.js +140 -0
- package/tooltip/index.js +13 -0
- package/treeView/TreeViewV2.js +38 -0
- package/treeView/TreeflexStyle.js +49 -0
- package/treeView/index.js +20 -0
- package/wizard/Wizard.js +251 -0
- package/wizard/index.js +13 -0
package/Tab/Tab.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _TabContext = _interopRequireDefault(require("./subComponent/TabContext"));
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
const Tab = _ref => {
|
|
11
|
+
let {
|
|
12
|
+
children,
|
|
13
|
+
selected,
|
|
14
|
+
onChange,
|
|
15
|
+
mode = 'view',
|
|
16
|
+
onTitleChange
|
|
17
|
+
} = _ref;
|
|
18
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_TabContext.default.Provider, {
|
|
19
|
+
value: {
|
|
20
|
+
selected,
|
|
21
|
+
onChange,
|
|
22
|
+
mode,
|
|
23
|
+
onTitleChange
|
|
24
|
+
},
|
|
25
|
+
children: children
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
var _default = exports.default = Tab;
|
package/Tab/TabList.js
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
var _fa = require("react-icons/fa");
|
|
10
|
+
var _button = require("../button");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
const MAX_MOVE_PIXEL = 300;
|
|
14
|
+
const TabList = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
children,
|
|
17
|
+
wrap = true,
|
|
18
|
+
...props
|
|
19
|
+
} = _ref;
|
|
20
|
+
const wrapperRef = (0, _react.useRef)(null);
|
|
21
|
+
const [exceedContainerWidth, setExceedContainerWidth] = (0, _react.useState)(false);
|
|
22
|
+
const [hasPrevious, setHasPrevious] = (0, _react.useState)(false);
|
|
23
|
+
const [hasNext, setHasNext] = (0, _react.useState)(false);
|
|
24
|
+
const checkExceedContainerWidth = (0, _react.useCallback)(() => {
|
|
25
|
+
if (wrapperRef.current) {
|
|
26
|
+
const {
|
|
27
|
+
offsetWidth,
|
|
28
|
+
scrollWidth
|
|
29
|
+
} = wrapperRef.current;
|
|
30
|
+
let {
|
|
31
|
+
marginLeft
|
|
32
|
+
} = getComputedStyle(wrapperRef.current);
|
|
33
|
+
const currentMarginLeft = Math.abs(parseInt(marginLeft));
|
|
34
|
+
setHasPrevious(currentMarginLeft > 0);
|
|
35
|
+
setHasNext(scrollWidth - offsetWidth > 0);
|
|
36
|
+
setExceedContainerWidth(scrollWidth > offsetWidth - currentMarginLeft);
|
|
37
|
+
}
|
|
38
|
+
}, []);
|
|
39
|
+
const handleResize = (0, _react.useCallback)(() => {
|
|
40
|
+
checkExceedContainerWidth();
|
|
41
|
+
}, []);
|
|
42
|
+
const handleTransitionend = (0, _react.useCallback)(event => {
|
|
43
|
+
// only allow margin-left transition event
|
|
44
|
+
if (event && event.propertyName !== 'margin-left') {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
checkExceedContainerWidth();
|
|
48
|
+
}, []);
|
|
49
|
+
const getMovePixel = offsetWidth => {
|
|
50
|
+
// move 1/3 pixel as default
|
|
51
|
+
const defaultMovePixel = Math.ceil(offsetWidth / 3);
|
|
52
|
+
return defaultMovePixel > MAX_MOVE_PIXEL ? MAX_MOVE_PIXEL : defaultMovePixel;
|
|
53
|
+
};
|
|
54
|
+
const updateScrollPosition = marginLeft => {
|
|
55
|
+
wrapperRef.current.style.marginLeft = marginLeft;
|
|
56
|
+
};
|
|
57
|
+
const handlePrevious = () => {
|
|
58
|
+
const {
|
|
59
|
+
offsetWidth
|
|
60
|
+
} = wrapperRef.current;
|
|
61
|
+
const {
|
|
62
|
+
marginLeft
|
|
63
|
+
} = getComputedStyle(wrapperRef.current);
|
|
64
|
+
const currentMarginLeft = Math.abs(parseInt(marginLeft));
|
|
65
|
+
const availableMovePixel = currentMarginLeft;
|
|
66
|
+
const movePixel = getMovePixel(offsetWidth - currentMarginLeft);
|
|
67
|
+
if (movePixel > availableMovePixel) {
|
|
68
|
+
// exceed edge, so move to edge only
|
|
69
|
+
updateScrollPosition('0px');
|
|
70
|
+
} else {
|
|
71
|
+
updateScrollPosition(`-${currentMarginLeft - movePixel}px`);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
const handleNext = () => {
|
|
75
|
+
const {
|
|
76
|
+
offsetWidth,
|
|
77
|
+
scrollWidth
|
|
78
|
+
} = wrapperRef.current;
|
|
79
|
+
const {
|
|
80
|
+
marginLeft
|
|
81
|
+
} = getComputedStyle(wrapperRef.current);
|
|
82
|
+
const currentMarginLeft = Math.abs(parseInt(marginLeft));
|
|
83
|
+
const availableMovePixel = scrollWidth - offsetWidth;
|
|
84
|
+
const movePixel = getMovePixel(offsetWidth - currentMarginLeft);
|
|
85
|
+
if (movePixel > availableMovePixel) {
|
|
86
|
+
// exceed edge, so move to edge only
|
|
87
|
+
updateScrollPosition(`-${currentMarginLeft + availableMovePixel}px`);
|
|
88
|
+
} else {
|
|
89
|
+
updateScrollPosition(`-${currentMarginLeft + movePixel}px`);
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
(0, _react.useEffect)(() => {
|
|
93
|
+
window.addEventListener('resize', handleResize);
|
|
94
|
+
handleResize();
|
|
95
|
+
return () => {
|
|
96
|
+
window.removeEventListener('resize', handleResize);
|
|
97
|
+
};
|
|
98
|
+
}, [wrap, children]);
|
|
99
|
+
(0, _react.useEffect)(() => {
|
|
100
|
+
if (wrapperRef.current) {
|
|
101
|
+
wrapperRef.current.addEventListener('transitionend', handleTransitionend);
|
|
102
|
+
}
|
|
103
|
+
}, [wrap]);
|
|
104
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Container, {
|
|
105
|
+
role: "tablist",
|
|
106
|
+
$wrap: wrap,
|
|
107
|
+
...props,
|
|
108
|
+
children: wrap ? children : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
109
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(TabWrapper, {
|
|
110
|
+
ref: wrapperRef,
|
|
111
|
+
children: children
|
|
112
|
+
}), exceedContainerWidth && /*#__PURE__*/(0, _jsxRuntime.jsxs)(Paginate, {
|
|
113
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
114
|
+
"aria-label": "Previous",
|
|
115
|
+
reverse: true,
|
|
116
|
+
onClick: handlePrevious,
|
|
117
|
+
iconOnly: true,
|
|
118
|
+
disabled: !hasPrevious,
|
|
119
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_fa.FaAngleLeft, {})
|
|
120
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
121
|
+
"aria-label": "Next",
|
|
122
|
+
reverse: true,
|
|
123
|
+
onClick: handleNext,
|
|
124
|
+
iconOnly: true,
|
|
125
|
+
disabled: !hasNext,
|
|
126
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_fa.FaAngleRight, {})
|
|
127
|
+
})]
|
|
128
|
+
})]
|
|
129
|
+
})
|
|
130
|
+
});
|
|
131
|
+
};
|
|
132
|
+
const Container = _styledComponents.default.div`
|
|
133
|
+
position: relative;
|
|
134
|
+
border-bottom: var(--border-width) solid var(--border-color);
|
|
135
|
+
margin-bottom: var(--spacing);
|
|
136
|
+
|
|
137
|
+
${_ref2 => {
|
|
138
|
+
let {
|
|
139
|
+
$wrap
|
|
140
|
+
} = _ref2;
|
|
141
|
+
return !$wrap && 'white-space: nowrap;';
|
|
142
|
+
}}
|
|
143
|
+
|
|
144
|
+
${_ref3 => {
|
|
145
|
+
let {
|
|
146
|
+
noMargin
|
|
147
|
+
} = _ref3;
|
|
148
|
+
return noMargin && 'margin-bottom: 0;';
|
|
149
|
+
}}
|
|
150
|
+
`;
|
|
151
|
+
const TabWrapper = _styledComponents.default.div`
|
|
152
|
+
margin-right: calc(1rem * 2 + 10px * 4 + var(--spacing-xs) * 2);
|
|
153
|
+
overflow: hidden;
|
|
154
|
+
margin-left: 0;
|
|
155
|
+
transition: margin-left 0.3s;
|
|
156
|
+
`;
|
|
157
|
+
const Paginate = _styledComponents.default.div`
|
|
158
|
+
display: flex;
|
|
159
|
+
position: absolute;
|
|
160
|
+
top: 0;
|
|
161
|
+
right: 0;
|
|
162
|
+
|
|
163
|
+
> :not(:last-child) {
|
|
164
|
+
margin-right: var(--spacing-xs);
|
|
165
|
+
}
|
|
166
|
+
`;
|
|
167
|
+
var _default = exports.default = TabList;
|
package/Tab/TabPanel.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
var _TabContext = _interopRequireDefault(require("./subComponent/TabContext"));
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
const TabPanel = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
children,
|
|
15
|
+
name,
|
|
16
|
+
...props
|
|
17
|
+
} = _ref;
|
|
18
|
+
const {
|
|
19
|
+
selected
|
|
20
|
+
} = (0, _react.useContext)(_TabContext.default);
|
|
21
|
+
const [rendered, setRendered] = (0, _react.useState)(false);
|
|
22
|
+
const tabContent = (0, _react.useMemo)(() => {
|
|
23
|
+
if (rendered) {
|
|
24
|
+
return children;
|
|
25
|
+
}
|
|
26
|
+
return null;
|
|
27
|
+
}, [rendered, children]);
|
|
28
|
+
(0, _react.useEffect)(() => {
|
|
29
|
+
if (name === selected) {
|
|
30
|
+
setRendered(true);
|
|
31
|
+
}
|
|
32
|
+
}, [selected, name]);
|
|
33
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Panel, {
|
|
34
|
+
role: "tabpanel",
|
|
35
|
+
$display: selected === name,
|
|
36
|
+
...props,
|
|
37
|
+
children: tabContent
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
const Panel = _styledComponents.default.div`
|
|
41
|
+
display: ${_ref2 => {
|
|
42
|
+
let {
|
|
43
|
+
$display
|
|
44
|
+
} = _ref2;
|
|
45
|
+
return $display ? 'block' : 'none';
|
|
46
|
+
}};
|
|
47
|
+
position: relative;
|
|
48
|
+
`;
|
|
49
|
+
var _default = exports.default = TabPanel;
|
package/Tab/TabTab.js
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _utils = require("@cashub/utils");
|
|
9
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
|
+
var _TabContext = _interopRequireDefault(require("./subComponent/TabContext"));
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
const TabTab = _ref => {
|
|
14
|
+
let {
|
|
15
|
+
children,
|
|
16
|
+
name,
|
|
17
|
+
title,
|
|
18
|
+
onClick,
|
|
19
|
+
...props
|
|
20
|
+
} = _ref;
|
|
21
|
+
const {
|
|
22
|
+
selected,
|
|
23
|
+
onChange,
|
|
24
|
+
mode,
|
|
25
|
+
onTitleChange
|
|
26
|
+
} = (0, _react.useContext)(_TabContext.default);
|
|
27
|
+
const [isModify, setIsModify] = (0, _react.useState)(false);
|
|
28
|
+
const [currentTitle, setCurrentTitle] = (0, _react.useState)(title);
|
|
29
|
+
const handleClick = (0, _react.useCallback)(() => {
|
|
30
|
+
if (selected !== name) {
|
|
31
|
+
onChange(name);
|
|
32
|
+
}
|
|
33
|
+
if (onClick && typeof onClick === 'function') {
|
|
34
|
+
onClick();
|
|
35
|
+
}
|
|
36
|
+
}, [name, selected, onChange, onClick]);
|
|
37
|
+
const handleDoubleClick = () => {
|
|
38
|
+
if (mode !== 'modify') return;
|
|
39
|
+
setIsModify(true);
|
|
40
|
+
};
|
|
41
|
+
const handleBlur = () => {
|
|
42
|
+
onTitleChange(name, currentTitle);
|
|
43
|
+
setIsModify(false);
|
|
44
|
+
};
|
|
45
|
+
const handleKeyUp = event => {
|
|
46
|
+
const key = event.keyCode;
|
|
47
|
+
if (key === _utils.KEY_CODE.ENTER) {
|
|
48
|
+
onTitleChange(name, currentTitle);
|
|
49
|
+
setIsModify(false);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
return isModify ? /*#__PURE__*/(0, _jsxRuntime.jsx)(InputTab, {
|
|
53
|
+
role: "tab",
|
|
54
|
+
type: "text",
|
|
55
|
+
value: currentTitle,
|
|
56
|
+
onChange: event => {
|
|
57
|
+
setCurrentTitle(event.target.value);
|
|
58
|
+
},
|
|
59
|
+
onBlur: handleBlur,
|
|
60
|
+
onKeyUp: handleKeyUp,
|
|
61
|
+
autoFocus: true
|
|
62
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(ButtonTab, {
|
|
63
|
+
role: "tab",
|
|
64
|
+
onClick: handleClick,
|
|
65
|
+
onDoubleClick: handleDoubleClick,
|
|
66
|
+
active: selected === name,
|
|
67
|
+
...props,
|
|
68
|
+
children: children
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
const Tab = _styledComponents.default.div`
|
|
72
|
+
background: transparent;
|
|
73
|
+
padding: 10px var(--spacing-s);
|
|
74
|
+
border: none;
|
|
75
|
+
border-bottom: 4px solid transparent;
|
|
76
|
+
`;
|
|
77
|
+
const ButtonTab = (0, _styledComponents.default)(Tab).attrs({
|
|
78
|
+
as: 'button'
|
|
79
|
+
})`
|
|
80
|
+
color: var(--font-on-mute);
|
|
81
|
+
transition: color 0.3s, border 0.3s;
|
|
82
|
+
cursor: pointer;
|
|
83
|
+
|
|
84
|
+
&:hover {
|
|
85
|
+
color: var(--font-on-background);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
${_ref2 => {
|
|
89
|
+
let {
|
|
90
|
+
active
|
|
91
|
+
} = _ref2;
|
|
92
|
+
return active && `
|
|
93
|
+
border-color: var(--color-primary);
|
|
94
|
+
color: var(--font-on-background);
|
|
95
|
+
`;
|
|
96
|
+
}}
|
|
97
|
+
`;
|
|
98
|
+
const InputTab = (0, _styledComponents.default)(Tab).attrs({
|
|
99
|
+
as: 'input'
|
|
100
|
+
})`
|
|
101
|
+
color: var(--font-on-background);
|
|
102
|
+
border-color: var(--color-primary);
|
|
103
|
+
outline: none;
|
|
104
|
+
`;
|
|
105
|
+
var _default = exports.default = TabTab;
|
package/Tab/index.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.TabV2 = void 0;
|
|
7
|
+
var _Tab = _interopRequireDefault(require("./Tab"));
|
|
8
|
+
var _TabList = _interopRequireDefault(require("./TabList"));
|
|
9
|
+
var _TabTab = _interopRequireDefault(require("./TabTab"));
|
|
10
|
+
var _TabPanel = _interopRequireDefault(require("./TabPanel"));
|
|
11
|
+
var _TabListV = _interopRequireDefault(require("./subComponent/TabListV2"));
|
|
12
|
+
var _TabTabV = _interopRequireDefault(require("./subComponent/TabTabV2"));
|
|
13
|
+
var _TabPanelV = _interopRequireDefault(require("./subComponent/TabPanelV2"));
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
+
var _default = exports.default = Object.assign(_Tab.default, {
|
|
17
|
+
List: _TabList.default,
|
|
18
|
+
Tab: _TabTab.default,
|
|
19
|
+
Panel: _TabPanel.default
|
|
20
|
+
});
|
|
21
|
+
const TabV2Base = props => {
|
|
22
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tab.default, {
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
const TabV2 = exports.TabV2 = Object.assign(TabV2Base, {
|
|
27
|
+
List: _TabListV.default,
|
|
28
|
+
Tab: _TabTabV.default,
|
|
29
|
+
Panel: _TabPanelV.default
|
|
30
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
const TabListV2 = _ref => {
|
|
11
|
+
let {
|
|
12
|
+
children,
|
|
13
|
+
...props
|
|
14
|
+
} = _ref;
|
|
15
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Container, {
|
|
16
|
+
role: "tablist",
|
|
17
|
+
...props,
|
|
18
|
+
children: children
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
const Container = _styledComponents.default.div`
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-wrap: wrap;
|
|
24
|
+
`;
|
|
25
|
+
var _default = exports.default = TabListV2;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
var _TabContext = _interopRequireDefault(require("./TabContext"));
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
const TabPanelV2 = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
children,
|
|
15
|
+
name,
|
|
16
|
+
...props
|
|
17
|
+
} = _ref;
|
|
18
|
+
const {
|
|
19
|
+
selected
|
|
20
|
+
} = (0, _react.useContext)(_TabContext.default);
|
|
21
|
+
const [rendered, setRendered] = (0, _react.useState)(false);
|
|
22
|
+
const tabContent = (0, _react.useMemo)(() => {
|
|
23
|
+
if (rendered) {
|
|
24
|
+
return children;
|
|
25
|
+
}
|
|
26
|
+
return null;
|
|
27
|
+
}, [rendered, children]);
|
|
28
|
+
(0, _react.useEffect)(() => {
|
|
29
|
+
if (name === selected) {
|
|
30
|
+
setRendered(true);
|
|
31
|
+
}
|
|
32
|
+
}, [selected, name]);
|
|
33
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Panel, {
|
|
34
|
+
role: "tabpanel",
|
|
35
|
+
$display: selected === name,
|
|
36
|
+
...props,
|
|
37
|
+
children: tabContent
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
const Panel = _styledComponents.default.div`
|
|
41
|
+
display: ${_ref2 => {
|
|
42
|
+
let {
|
|
43
|
+
$display
|
|
44
|
+
} = _ref2;
|
|
45
|
+
return $display ? 'block' : 'none';
|
|
46
|
+
}};
|
|
47
|
+
position: relative;
|
|
48
|
+
background: var(--color-background2);
|
|
49
|
+
border-bottom-left-radius: var(--border-radius-s);
|
|
50
|
+
border-bottom-right-radius: var(--border-radius-s);
|
|
51
|
+
`;
|
|
52
|
+
var _default = exports.default = TabPanelV2;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
var _TabContext = _interopRequireDefault(require("./TabContext"));
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
const TabTabV2 = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
children,
|
|
15
|
+
name,
|
|
16
|
+
...props
|
|
17
|
+
} = _ref;
|
|
18
|
+
const {
|
|
19
|
+
selected,
|
|
20
|
+
onChange
|
|
21
|
+
} = (0, _react.useContext)(_TabContext.default);
|
|
22
|
+
const handleClick = (0, _react.useCallback)(() => {
|
|
23
|
+
if (selected !== name) {
|
|
24
|
+
onChange(name);
|
|
25
|
+
}
|
|
26
|
+
}, [name, selected, onChange]);
|
|
27
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Tab, {
|
|
28
|
+
role: "tab",
|
|
29
|
+
onClick: handleClick,
|
|
30
|
+
active: selected === name,
|
|
31
|
+
...props,
|
|
32
|
+
children: children
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
const Tab = _styledComponents.default.button`
|
|
36
|
+
background: transparent;
|
|
37
|
+
color: var(--font-on-mute);
|
|
38
|
+
font-weight: bold;
|
|
39
|
+
padding: 10px var(--spacing-s);
|
|
40
|
+
border: none;
|
|
41
|
+
border-top-left-radius: var(--border-radius-s);
|
|
42
|
+
border-top-right-radius: var(--border-radius-s);
|
|
43
|
+
transition:
|
|
44
|
+
color 0.3s,
|
|
45
|
+
border 0.3s;
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
flex: 1;
|
|
48
|
+
|
|
49
|
+
&:hover {
|
|
50
|
+
color: var(--font-on-background);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
${_ref2 => {
|
|
54
|
+
let {
|
|
55
|
+
active
|
|
56
|
+
} = _ref2;
|
|
57
|
+
return active && `
|
|
58
|
+
background: var(--color-background2);
|
|
59
|
+
color: var(--font-on-background);
|
|
60
|
+
`;
|
|
61
|
+
}}
|
|
62
|
+
`;
|
|
63
|
+
var _default = exports.default = TabTabV2;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
const TabList = _ref => {
|
|
11
|
+
let {
|
|
12
|
+
children,
|
|
13
|
+
...props
|
|
14
|
+
} = _ref;
|
|
15
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Container, {
|
|
16
|
+
role: "tablist",
|
|
17
|
+
...props,
|
|
18
|
+
children: children
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
const Container = _styledComponents.default.div`
|
|
22
|
+
height: 100%;
|
|
23
|
+
width: 316px;
|
|
24
|
+
background: var(--color-background2);
|
|
25
|
+
overflow-y: auto;
|
|
26
|
+
`;
|
|
27
|
+
var _default = exports.default = TabList;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
var _TabContext = _interopRequireDefault(require("./subComponent/TabContext"));
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
const TabPanel = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
children,
|
|
15
|
+
name,
|
|
16
|
+
...props
|
|
17
|
+
} = _ref;
|
|
18
|
+
const {
|
|
19
|
+
selected
|
|
20
|
+
} = (0, _react.useContext)(_TabContext.default);
|
|
21
|
+
const [rendered, setRendered] = (0, _react.useState)(false);
|
|
22
|
+
const tabContent = (0, _react.useMemo)(() => {
|
|
23
|
+
if (rendered) {
|
|
24
|
+
return children;
|
|
25
|
+
}
|
|
26
|
+
return null;
|
|
27
|
+
}, [rendered, children]);
|
|
28
|
+
(0, _react.useEffect)(() => {
|
|
29
|
+
if (name === selected) {
|
|
30
|
+
setRendered(true);
|
|
31
|
+
}
|
|
32
|
+
}, [selected, name]);
|
|
33
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Panel, {
|
|
34
|
+
role: "tabpanel",
|
|
35
|
+
$display: selected === name,
|
|
36
|
+
...props,
|
|
37
|
+
children: tabContent
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
const Panel = _styledComponents.default.div`
|
|
41
|
+
display: ${_ref2 => {
|
|
42
|
+
let {
|
|
43
|
+
$display
|
|
44
|
+
} = _ref2;
|
|
45
|
+
return $display ? 'block' : 'none';
|
|
46
|
+
}};
|
|
47
|
+
position: relative;
|
|
48
|
+
flex: 1;
|
|
49
|
+
padding: var(--spacing-s);
|
|
50
|
+
overflow-y: auto;
|
|
51
|
+
`;
|
|
52
|
+
var _default = exports.default = TabPanel;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
var _TabContext = _interopRequireDefault(require("./subComponent/TabContext"));
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
const TabTab = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
children,
|
|
15
|
+
name,
|
|
16
|
+
...props
|
|
17
|
+
} = _ref;
|
|
18
|
+
const {
|
|
19
|
+
selected,
|
|
20
|
+
onChange
|
|
21
|
+
} = (0, _react.useContext)(_TabContext.default);
|
|
22
|
+
const handleClick = (0, _react.useCallback)(() => {
|
|
23
|
+
if (selected !== name) {
|
|
24
|
+
onChange(name);
|
|
25
|
+
}
|
|
26
|
+
}, [name, selected, onChange]);
|
|
27
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Tab, {
|
|
28
|
+
role: "tab",
|
|
29
|
+
onClick: handleClick,
|
|
30
|
+
active: selected === name,
|
|
31
|
+
...props,
|
|
32
|
+
children: children
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
const Tab = _styledComponents.default.button`
|
|
36
|
+
width: 100%;
|
|
37
|
+
padding: 12px var(--spacing-s);
|
|
38
|
+
border: none;
|
|
39
|
+
background: transparent;
|
|
40
|
+
text-align: left;
|
|
41
|
+
color: var(--font-on-background);
|
|
42
|
+
transition: 0.3s;
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
|
|
45
|
+
&:hover {
|
|
46
|
+
background: var(--color-active);
|
|
47
|
+
color: var(--color-primary);
|
|
48
|
+
font-weight: var(--font-bold);
|
|
49
|
+
|
|
50
|
+
span {
|
|
51
|
+
color: var(--color-primary);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
${_ref2 => {
|
|
56
|
+
let {
|
|
57
|
+
active
|
|
58
|
+
} = _ref2;
|
|
59
|
+
return active && `
|
|
60
|
+
background: var(--color-active);
|
|
61
|
+
color: var(--color-primary);
|
|
62
|
+
font-weight: var(--font-bold);
|
|
63
|
+
|
|
64
|
+
span {
|
|
65
|
+
color: var(--color-primary);
|
|
66
|
+
}
|
|
67
|
+
`;
|
|
68
|
+
}}
|
|
69
|
+
`;
|
|
70
|
+
var _default = exports.default = TabTab;
|