@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
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
// Currently, some style is all same for all viewport size
|
|
8
|
+
// Common color style
|
|
9
|
+
const colorStyle = {
|
|
10
|
+
colorWhite: '#ffffff',
|
|
11
|
+
colorDark: '#000000',
|
|
12
|
+
colorGrey: '#5b5f6f',
|
|
13
|
+
colorPrimary: '#597EF7',
|
|
14
|
+
colorSuccess: '#11D8CD',
|
|
15
|
+
colorWarning: '#FFCA7A',
|
|
16
|
+
colorDanger: '#F495A1',
|
|
17
|
+
colorHover: 'rgba(89, 126, 247, 0.2)',
|
|
18
|
+
colorActive: 'rgba(89, 126, 247, 0.2)',
|
|
19
|
+
scrollBarColor: 'rgba(89, 126, 247, 0.3)',
|
|
20
|
+
bgColor1: '#13142e',
|
|
21
|
+
bgColor2: '#222143',
|
|
22
|
+
bgColor3: '#2d2a5d',
|
|
23
|
+
backdropBg: 'rgba(0, 0, 0, 0.75)'
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
// Common font style
|
|
27
|
+
const fontStyle = {
|
|
28
|
+
fontH1: '2.25rem',
|
|
29
|
+
fontH2: '1.5rem',
|
|
30
|
+
fontH3: '1.25rem',
|
|
31
|
+
fontBody1: '1rem',
|
|
32
|
+
fontBody2: '0.875rem',
|
|
33
|
+
fontButton: '0.875rem',
|
|
34
|
+
fontCaption: '0.75rem',
|
|
35
|
+
fontFamily: 'Helvetica',
|
|
36
|
+
fontWeightNormal: '400',
|
|
37
|
+
fontWeightBold: 'bold',
|
|
38
|
+
fontOnPrimary: colorStyle.colorWhite,
|
|
39
|
+
fontOnSuccess: colorStyle.colorWhite,
|
|
40
|
+
fontOnWarning: colorStyle.colorWhite,
|
|
41
|
+
fontOnDanger: colorStyle.colorWhite,
|
|
42
|
+
fontOnBg: colorStyle.colorWhite,
|
|
43
|
+
fontMutedColor: 'rgba(255, 255, 255, 0.5)'
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// Theme stylesheet
|
|
47
|
+
const darkTheme = {
|
|
48
|
+
desktop: {
|
|
49
|
+
...fontStyle,
|
|
50
|
+
...colorStyle,
|
|
51
|
+
boxShadow: '0px 0px 8px rgba(91, 95, 111, 0.5)',
|
|
52
|
+
borderColor: colorStyle.colorGrey,
|
|
53
|
+
borderColorTransparent: `${colorStyle.colorGrey}80`,
|
|
54
|
+
borderWidth: '1px',
|
|
55
|
+
borderRadiusS: '0.5rem',
|
|
56
|
+
borderRadius: '1rem',
|
|
57
|
+
borderRadiusL: '2rem',
|
|
58
|
+
borderRadiusRound: '50%',
|
|
59
|
+
spacerXS: '0.5rem',
|
|
60
|
+
spacerS: '1rem',
|
|
61
|
+
spacer: '1.5rem',
|
|
62
|
+
spacerL: '2rem'
|
|
63
|
+
},
|
|
64
|
+
tablet: {
|
|
65
|
+
...fontStyle,
|
|
66
|
+
...colorStyle,
|
|
67
|
+
boxShadow: '0px 0px 8px rgba(91, 95, 111, 0.5)',
|
|
68
|
+
borderColor: colorStyle.colorGrey,
|
|
69
|
+
borderColorTransparent: `${colorStyle.colorGrey}80`,
|
|
70
|
+
borderWidth: '1px',
|
|
71
|
+
borderRadiusS: '0.5rem',
|
|
72
|
+
borderRadius: '1rem',
|
|
73
|
+
borderRadiusL: '2rem',
|
|
74
|
+
borderRadiusRound: '50%',
|
|
75
|
+
spacerXS: '0.5rem',
|
|
76
|
+
spacerS: '0.75rem',
|
|
77
|
+
spacer: '1rem',
|
|
78
|
+
spacerL: '1.25rem'
|
|
79
|
+
},
|
|
80
|
+
mobile: {
|
|
81
|
+
...fontStyle,
|
|
82
|
+
...colorStyle,
|
|
83
|
+
boxShadow: '0px 0px 8px rgba(91, 95, 111, 0.5)',
|
|
84
|
+
borderColor: colorStyle.colorGrey,
|
|
85
|
+
borderColorTransparent: `${colorStyle.colorGrey}80`,
|
|
86
|
+
borderWidth: '1px',
|
|
87
|
+
borderRadiusS: '0.5rem',
|
|
88
|
+
borderRadius: '1rem',
|
|
89
|
+
borderRadiusL: '2rem',
|
|
90
|
+
borderRadiusRound: '50%',
|
|
91
|
+
spacerXS: '0.5rem',
|
|
92
|
+
spacerS: '0.75rem',
|
|
93
|
+
spacer: '1rem',
|
|
94
|
+
spacerL: '1.25rem'
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
var _default = exports.default = darkTheme;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
// Currently, some style is all same for all viewport size
|
|
8
|
+
// Common color style
|
|
9
|
+
const colorStyle = {
|
|
10
|
+
colorWhite: '#ffffff',
|
|
11
|
+
colorDark: '#353351',
|
|
12
|
+
colorGrey: '#989cad',
|
|
13
|
+
colorPrimary: '#3661ec',
|
|
14
|
+
colorSuccess: '#48d5cc',
|
|
15
|
+
colorWarning: '#feb444',
|
|
16
|
+
colorDanger: '#F495A1',
|
|
17
|
+
colorHover: 'rgba(54, 97, 236, 0.2)',
|
|
18
|
+
colorActive: 'rgba(54, 97, 236, 0.2)',
|
|
19
|
+
scrollBarColor: 'rgba(54, 97, 236, 0.3)',
|
|
20
|
+
bgColor1: '#F0ECFF',
|
|
21
|
+
bgColor2: '#F8F4FF',
|
|
22
|
+
bgColor3: '#E6E1FF',
|
|
23
|
+
backdropBg: 'rgba(0, 0, 0, 0.75)'
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
// Common font style
|
|
27
|
+
const fontStyle = {
|
|
28
|
+
fontH1: '2.25rem',
|
|
29
|
+
fontH2: '1.5rem',
|
|
30
|
+
fontH3: '1.25rem',
|
|
31
|
+
fontBody1: '1rem',
|
|
32
|
+
fontBody2: '0.875rem',
|
|
33
|
+
fontButton: '0.875rem',
|
|
34
|
+
fontCaption: '0.75rem',
|
|
35
|
+
fontFamily: 'Helvetica',
|
|
36
|
+
fontWeightNormal: '400',
|
|
37
|
+
fontWeightBold: 'bold',
|
|
38
|
+
fontOnPrimary: colorStyle.bgColor2,
|
|
39
|
+
fontOnSuccess: colorStyle.colorDark,
|
|
40
|
+
fontOnWarning: colorStyle.colorDark,
|
|
41
|
+
fontOnDanger: colorStyle.colorDark,
|
|
42
|
+
fontOnBg: colorStyle.colorDark,
|
|
43
|
+
fontMutedColor: 'rgba(53, 51, 81, 0.6)'
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// Theme stylesheet
|
|
47
|
+
const lightTheme = {
|
|
48
|
+
desktop: {
|
|
49
|
+
...fontStyle,
|
|
50
|
+
...colorStyle,
|
|
51
|
+
boxShadow: '0px 0px 8px rgba(91, 95, 111, 0.5)',
|
|
52
|
+
borderColor: colorStyle.colorGrey,
|
|
53
|
+
borderColorTransparent: `${colorStyle.colorGrey}80`,
|
|
54
|
+
borderWidth: '1px',
|
|
55
|
+
borderRadiusS: '0.5rem',
|
|
56
|
+
borderRadius: '1rem',
|
|
57
|
+
borderRadiusL: '2rem',
|
|
58
|
+
borderRadiusRound: '50%',
|
|
59
|
+
spacerXS: '0.5rem',
|
|
60
|
+
spacerS: '1rem',
|
|
61
|
+
spacer: '1.5rem',
|
|
62
|
+
spacerL: '2rem'
|
|
63
|
+
},
|
|
64
|
+
tablet: {
|
|
65
|
+
...fontStyle,
|
|
66
|
+
...colorStyle,
|
|
67
|
+
boxShadow: '0px 0px 8px rgba(91, 95, 111, 0.5)',
|
|
68
|
+
borderColor: colorStyle.colorGrey,
|
|
69
|
+
borderColorTransparent: `${colorStyle.colorGrey}80`,
|
|
70
|
+
borderWidth: '1px',
|
|
71
|
+
borderRadiusS: '0.5rem',
|
|
72
|
+
borderRadius: '1rem',
|
|
73
|
+
borderRadiusL: '2rem',
|
|
74
|
+
borderRadiusRound: '50%',
|
|
75
|
+
spacerXS: '0.5rem',
|
|
76
|
+
spacerS: '0.75rem',
|
|
77
|
+
spacer: '1rem',
|
|
78
|
+
spacerL: '1.25rem'
|
|
79
|
+
},
|
|
80
|
+
mobile: {
|
|
81
|
+
...fontStyle,
|
|
82
|
+
...colorStyle,
|
|
83
|
+
boxShadow: '0px 0px 8px rgba(91, 95, 111, 0.5)',
|
|
84
|
+
borderColor: colorStyle.colorGrey,
|
|
85
|
+
borderColorTransparent: `${colorStyle.colorGrey}80`,
|
|
86
|
+
borderWidth: '1px',
|
|
87
|
+
borderRadiusS: '0.5rem',
|
|
88
|
+
borderRadius: '1rem',
|
|
89
|
+
borderRadiusL: '2rem',
|
|
90
|
+
borderRadiusRound: '50%',
|
|
91
|
+
spacerXS: '0.5rem',
|
|
92
|
+
spacerS: '0.75rem',
|
|
93
|
+
spacer: '1rem',
|
|
94
|
+
spacerL: '1.25rem'
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
var _default = exports.default = lightTheme;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
// Currently, some style is all same for all viewport size
|
|
8
|
+
// Common color style
|
|
9
|
+
const colorStyle = {
|
|
10
|
+
colorWhite: '#ffffff',
|
|
11
|
+
colorDark: '#353351',
|
|
12
|
+
colorGrey: '#b7bbcd',
|
|
13
|
+
colorPrimary: '#345FEB',
|
|
14
|
+
colorSuccess: '#11D8CD',
|
|
15
|
+
colorWarning: '#feb444',
|
|
16
|
+
colorDanger: '#F495A1',
|
|
17
|
+
colorHover: 'rgba(52, 95, 235, 0.2)',
|
|
18
|
+
colorActive: 'rgba(52, 95, 235, 0.2)',
|
|
19
|
+
scrollBarColor: 'rgba(52, 95, 235, 0.3)',
|
|
20
|
+
bgColor1: '#EEEEEE',
|
|
21
|
+
bgColor2: '#F7F7F7',
|
|
22
|
+
bgColor3: '#FFFFFF',
|
|
23
|
+
backdropBg: 'rgba(0, 0, 0, 0.75)'
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
// Common font style
|
|
27
|
+
const fontStyle = {
|
|
28
|
+
fontH1: '2.25rem',
|
|
29
|
+
fontH2: '1.5rem',
|
|
30
|
+
fontH3: '1.25rem',
|
|
31
|
+
fontBody1: '1rem',
|
|
32
|
+
fontBody2: '0.875rem',
|
|
33
|
+
fontButton: '0.875rem',
|
|
34
|
+
fontCaption: '0.75rem',
|
|
35
|
+
fontFamily: 'Helvetica',
|
|
36
|
+
fontWeightNormal: '400',
|
|
37
|
+
fontWeightBold: 'bold',
|
|
38
|
+
fontOnPrimary: colorStyle.bgColor2,
|
|
39
|
+
fontOnSuccess: colorStyle.colorDark,
|
|
40
|
+
fontOnWarning: colorStyle.colorDark,
|
|
41
|
+
fontOnDanger: colorStyle.colorDark,
|
|
42
|
+
fontOnBg: colorStyle.colorDark,
|
|
43
|
+
fontMutedColor: 'rgba(53, 51, 81, 0.6)'
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// Theme stylesheet
|
|
47
|
+
const whiteTheme = {
|
|
48
|
+
desktop: {
|
|
49
|
+
...fontStyle,
|
|
50
|
+
...colorStyle,
|
|
51
|
+
boxShadow: '0px 0px 8px rgba(91, 95, 111, 0.5)',
|
|
52
|
+
borderColor: colorStyle.colorGrey,
|
|
53
|
+
borderColorTransparent: `${colorStyle.colorGrey}80`,
|
|
54
|
+
borderWidth: '1px',
|
|
55
|
+
borderRadiusS: '0.5rem',
|
|
56
|
+
borderRadius: '1rem',
|
|
57
|
+
borderRadiusL: '2rem',
|
|
58
|
+
borderRadiusRound: '50%',
|
|
59
|
+
spacerXS: '0.5rem',
|
|
60
|
+
spacerS: '1rem',
|
|
61
|
+
spacer: '1.5rem',
|
|
62
|
+
spacerL: '2rem'
|
|
63
|
+
},
|
|
64
|
+
tablet: {
|
|
65
|
+
...fontStyle,
|
|
66
|
+
...colorStyle,
|
|
67
|
+
boxShadow: '0px 0px 8px rgba(91, 95, 111, 0.5)',
|
|
68
|
+
borderColor: colorStyle.colorGrey,
|
|
69
|
+
borderColorTransparent: `${colorStyle.colorGrey}80`,
|
|
70
|
+
borderWidth: '1px',
|
|
71
|
+
borderRadiusS: '0.5rem',
|
|
72
|
+
borderRadius: '1rem',
|
|
73
|
+
borderRadiusL: '2rem',
|
|
74
|
+
borderRadiusRound: '50%',
|
|
75
|
+
spacerXS: '0.5rem',
|
|
76
|
+
spacerS: '0.75rem',
|
|
77
|
+
spacer: '1rem',
|
|
78
|
+
spacerL: '1.25rem'
|
|
79
|
+
},
|
|
80
|
+
mobile: {
|
|
81
|
+
...fontStyle,
|
|
82
|
+
...colorStyle,
|
|
83
|
+
boxShadow: '0px 0px 8px rgba(91, 95, 111, 0.5)',
|
|
84
|
+
borderColor: colorStyle.colorGrey,
|
|
85
|
+
borderColorTransparent: `${colorStyle.colorGrey}80`,
|
|
86
|
+
borderWidth: '1px',
|
|
87
|
+
borderRadiusS: '0.5rem',
|
|
88
|
+
borderRadius: '1rem',
|
|
89
|
+
borderRadiusL: '2rem',
|
|
90
|
+
borderRadiusRound: '50%',
|
|
91
|
+
spacerXS: '0.5rem',
|
|
92
|
+
spacerS: '0.75rem',
|
|
93
|
+
spacer: '1rem',
|
|
94
|
+
spacerL: '1.25rem'
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
var _default = exports.default = whiteTheme;
|
package/styles/themes.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _white = _interopRequireDefault(require("./theme/white.theme"));
|
|
8
|
+
var _light = _interopRequireDefault(require("./theme/light.theme"));
|
|
9
|
+
var _dark = _interopRequireDefault(require("./theme/dark.theme"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
const themes = {
|
|
12
|
+
White: _white.default,
|
|
13
|
+
Light: _light.default,
|
|
14
|
+
Dark: _dark.default
|
|
15
|
+
};
|
|
16
|
+
var _default = exports.default = themes;
|
|
@@ -0,0 +1,336 @@
|
|
|
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 _hooks = require("./hooks");
|
|
10
|
+
var _scrollbar = _interopRequireDefault(require("../styles/mixin/scrollbar"));
|
|
11
|
+
var _GridTableHeadCell = _interopRequireDefault(require("./subComponent/GridTableHeadCell"));
|
|
12
|
+
var _Resizer = _interopRequireDefault(require("./subComponent/Resizer"));
|
|
13
|
+
var _GridTableFooter = _interopRequireDefault(require("./subComponent/GridTableFooter"));
|
|
14
|
+
var _TableFooterInfo = _interopRequireDefault(require("./subComponent/TableFooterInfo"));
|
|
15
|
+
var _TableFooterPager = _interopRequireDefault(require("./subComponent/TableFooterPager"));
|
|
16
|
+
var _Paginate = _interopRequireDefault(require("../paginate/Paginate"));
|
|
17
|
+
var _Select = _interopRequireDefault(require("../select/Select"));
|
|
18
|
+
var _Popover = _interopRequireDefault(require("../popover/Popover"));
|
|
19
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
21
|
+
const GridTable = _ref => {
|
|
22
|
+
let {
|
|
23
|
+
columns,
|
|
24
|
+
data,
|
|
25
|
+
currentPage,
|
|
26
|
+
limit,
|
|
27
|
+
total,
|
|
28
|
+
onPageChange,
|
|
29
|
+
onLimitChange,
|
|
30
|
+
sortColumn,
|
|
31
|
+
sortType,
|
|
32
|
+
onSortChange,
|
|
33
|
+
backgroundReverse,
|
|
34
|
+
translation
|
|
35
|
+
} = _ref;
|
|
36
|
+
const wrapperRef = (0, _react.useRef)(null);
|
|
37
|
+
const tableRef = (0, _react.useRef)(null);
|
|
38
|
+
const {
|
|
39
|
+
start,
|
|
40
|
+
end
|
|
41
|
+
} = (0, _hooks.useCalculateDataRange)(currentPage, limit, total);
|
|
42
|
+
const [tableWidth, setTableWidth] = (0, _react.useState)(0);
|
|
43
|
+
const [restWidth, setRestWidth] = (0, _react.useState)(0);
|
|
44
|
+
const texts = (0, _react.useMemo)(() => {
|
|
45
|
+
const defaultTexts = {
|
|
46
|
+
info: 'Showing _START_ to _END_ of _TOTAL_ entries',
|
|
47
|
+
empty: 'No data available in table'
|
|
48
|
+
};
|
|
49
|
+
return {
|
|
50
|
+
...defaultTexts,
|
|
51
|
+
...translation
|
|
52
|
+
};
|
|
53
|
+
}, [translation]);
|
|
54
|
+
const handleSortChange = (0, _react.useCallback)(columnName => {
|
|
55
|
+
if (onSortChange) {
|
|
56
|
+
onSortChange(columnName);
|
|
57
|
+
}
|
|
58
|
+
}, [onSortChange]);
|
|
59
|
+
const handleResize = (0, _react.useCallback)(() => {
|
|
60
|
+
setTableWidth(tableRef.current.offsetWidth);
|
|
61
|
+
setRestWidth(previousWidth => {
|
|
62
|
+
const containerWidth = wrapperRef.current.offsetWidth;
|
|
63
|
+
const tableWidth = tableRef.current.offsetWidth - previousWidth;
|
|
64
|
+
if (containerWidth > tableWidth) {
|
|
65
|
+
return containerWidth - tableWidth;
|
|
66
|
+
}
|
|
67
|
+
return 0;
|
|
68
|
+
});
|
|
69
|
+
}, []);
|
|
70
|
+
const handleScroll = (0, _react.useCallback)(event => {
|
|
71
|
+
const {
|
|
72
|
+
target
|
|
73
|
+
} = event;
|
|
74
|
+
wrapperRef.current.scrollLeft = target.scrollLeft;
|
|
75
|
+
}, []);
|
|
76
|
+
const showFullValue = (0, _react.useCallback)(event => {
|
|
77
|
+
let {
|
|
78
|
+
id
|
|
79
|
+
} = event.target;
|
|
80
|
+
if (!id) {
|
|
81
|
+
({
|
|
82
|
+
id
|
|
83
|
+
} = event.currentTarget);
|
|
84
|
+
event.target.id = id;
|
|
85
|
+
}
|
|
86
|
+
const {
|
|
87
|
+
offsetWidth,
|
|
88
|
+
scrollWidth,
|
|
89
|
+
innerText
|
|
90
|
+
} = event.target;
|
|
91
|
+
if (scrollWidth >= offsetWidth && innerText) {
|
|
92
|
+
event.stopPropagation();
|
|
93
|
+
(0, _Popover.default)({
|
|
94
|
+
id,
|
|
95
|
+
target: event.target,
|
|
96
|
+
content: innerText,
|
|
97
|
+
boundary: tableRef.current
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}, []);
|
|
101
|
+
|
|
102
|
+
// generate sort icon area
|
|
103
|
+
const generateSort = (0, _hooks.useGenerateSort)(sortColumn, sortType);
|
|
104
|
+
const tableHeads = (0, _react.useMemo)(() => {
|
|
105
|
+
const tableHeads = columns.map((column, index) => {
|
|
106
|
+
const {
|
|
107
|
+
title,
|
|
108
|
+
fieldName,
|
|
109
|
+
width,
|
|
110
|
+
sortable,
|
|
111
|
+
align
|
|
112
|
+
} = column;
|
|
113
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_GridTableHeadCell.default, {
|
|
114
|
+
width: width,
|
|
115
|
+
align: align,
|
|
116
|
+
backgroundReverse: backgroundReverse,
|
|
117
|
+
sortable: sortable,
|
|
118
|
+
onClick: () => {
|
|
119
|
+
sortable && handleSortChange(fieldName);
|
|
120
|
+
},
|
|
121
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
122
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
123
|
+
id: fieldName,
|
|
124
|
+
onClick: showFullValue,
|
|
125
|
+
children: title
|
|
126
|
+
}), sortable && generateSort(fieldName)]
|
|
127
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Resizer.default, {
|
|
128
|
+
onResize: handleResize
|
|
129
|
+
})]
|
|
130
|
+
}, `TH${index}`);
|
|
131
|
+
});
|
|
132
|
+
tableHeads.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(_GridTableHeadCell.default, {
|
|
133
|
+
role: "presentation",
|
|
134
|
+
width: restWidth,
|
|
135
|
+
backgroundReverse: backgroundReverse
|
|
136
|
+
}, 'rest'));
|
|
137
|
+
return tableHeads;
|
|
138
|
+
}, [backgroundReverse, columns, handleSortChange, generateSort, showFullValue, handleResize, restWidth]);
|
|
139
|
+
const tableRows = (0, _react.useMemo)(() => {
|
|
140
|
+
if (data.length === 0) {
|
|
141
|
+
return null;
|
|
142
|
+
}
|
|
143
|
+
return data.map((row, rowIndex) => {
|
|
144
|
+
const tds = columns.map((column, columnIndex) => {
|
|
145
|
+
const {
|
|
146
|
+
title,
|
|
147
|
+
fieldName,
|
|
148
|
+
render,
|
|
149
|
+
custom,
|
|
150
|
+
...props
|
|
151
|
+
} = column;
|
|
152
|
+
const key = rowIndex + columnIndex.toString();
|
|
153
|
+
let renderedData = null;
|
|
154
|
+
if (custom && render) {
|
|
155
|
+
// call render function to get custom data(fully)
|
|
156
|
+
renderedData = render(row);
|
|
157
|
+
} else {
|
|
158
|
+
// call render function to get custom data(part)
|
|
159
|
+
renderedData = /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
160
|
+
id: key,
|
|
161
|
+
onClick: showFullValue,
|
|
162
|
+
children: render ? render(row[fieldName], row) : String(row[fieldName])
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(TD, {
|
|
166
|
+
"data-label": title,
|
|
167
|
+
backgroundReverse: backgroundReverse,
|
|
168
|
+
...props,
|
|
169
|
+
children: renderedData
|
|
170
|
+
}, columnIndex);
|
|
171
|
+
});
|
|
172
|
+
tds.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(TD, {
|
|
173
|
+
role: "presentation",
|
|
174
|
+
backgroundReverse: backgroundReverse
|
|
175
|
+
}, 'rest'));
|
|
176
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("tr", {
|
|
177
|
+
children: tds
|
|
178
|
+
}, rowIndex);
|
|
179
|
+
});
|
|
180
|
+
}, [backgroundReverse, columns, data, showFullValue]);
|
|
181
|
+
const generateEmptyMessage = (0, _react.useCallback)(() => {
|
|
182
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("tr", {
|
|
183
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(TD, {
|
|
184
|
+
center: true,
|
|
185
|
+
colSpan: columns.length,
|
|
186
|
+
backgroundReverse: backgroundReverse,
|
|
187
|
+
children: texts.empty
|
|
188
|
+
})
|
|
189
|
+
});
|
|
190
|
+
}, [backgroundReverse, columns, texts]);
|
|
191
|
+
(0, _react.useEffect)(() => {
|
|
192
|
+
handleResize();
|
|
193
|
+
}, [columns, handleResize]);
|
|
194
|
+
(0, _react.useEffect)(() => {
|
|
195
|
+
window.addEventListener('resize', handleResize);
|
|
196
|
+
return () => {
|
|
197
|
+
window.removeEventListener('resize', handleResize);
|
|
198
|
+
};
|
|
199
|
+
}, [handleResize]);
|
|
200
|
+
(0, _react.useEffect)(() => {
|
|
201
|
+
if (tableRef.current) {
|
|
202
|
+
setTableWidth(tableRef.current.offsetWidth);
|
|
203
|
+
}
|
|
204
|
+
}, [columns]);
|
|
205
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
206
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(TableWrapper, {
|
|
207
|
+
ref: wrapperRef,
|
|
208
|
+
backgroundReverse: backgroundReverse,
|
|
209
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(ResponsiveTable, {
|
|
210
|
+
ref: tableRef,
|
|
211
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("thead", {
|
|
212
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("tr", {
|
|
213
|
+
children: tableHeads
|
|
214
|
+
})
|
|
215
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("tbody", {
|
|
216
|
+
children: tableRows || generateEmptyMessage()
|
|
217
|
+
})]
|
|
218
|
+
})
|
|
219
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Scrollbar, {
|
|
220
|
+
backgroundReverse: backgroundReverse,
|
|
221
|
+
width: tableWidth,
|
|
222
|
+
onScroll: handleScroll
|
|
223
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_GridTableFooter.default, {
|
|
224
|
+
backgroundReverse: backgroundReverse,
|
|
225
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_TableFooterInfo.default, {
|
|
226
|
+
children: texts.info.replace('_START_', start).replace('_END_', end).replace('_TOTAL_', total)
|
|
227
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_TableFooterPager.default, {
|
|
228
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Paginate.default, {
|
|
229
|
+
currentPage: currentPage,
|
|
230
|
+
totalCount: total,
|
|
231
|
+
pageSize: limit,
|
|
232
|
+
onPageChange: onPageChange
|
|
233
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Select.default, {
|
|
234
|
+
fill: true,
|
|
235
|
+
fillReverse: !backgroundReverse,
|
|
236
|
+
allowSearch: false,
|
|
237
|
+
options: [{
|
|
238
|
+
id: 10,
|
|
239
|
+
text: '10'
|
|
240
|
+
}, {
|
|
241
|
+
id: 20,
|
|
242
|
+
text: '20'
|
|
243
|
+
}, {
|
|
244
|
+
id: 30,
|
|
245
|
+
text: '30'
|
|
246
|
+
}, {
|
|
247
|
+
id: 40,
|
|
248
|
+
text: '40'
|
|
249
|
+
}, {
|
|
250
|
+
id: 50,
|
|
251
|
+
text: '50'
|
|
252
|
+
}],
|
|
253
|
+
selected: limit,
|
|
254
|
+
onSelect: onLimitChange
|
|
255
|
+
})]
|
|
256
|
+
})]
|
|
257
|
+
})]
|
|
258
|
+
});
|
|
259
|
+
};
|
|
260
|
+
const TableWrapper = _styledComponents.default.div`
|
|
261
|
+
overflow: hidden;
|
|
262
|
+
background: ${_ref2 => {
|
|
263
|
+
let {
|
|
264
|
+
backgroundReverse
|
|
265
|
+
} = _ref2;
|
|
266
|
+
return backgroundReverse ? 'var(--color-background1)' : 'var(--color-background2)';
|
|
267
|
+
}};
|
|
268
|
+
`;
|
|
269
|
+
const ResponsiveTable = _styledComponents.default.table`
|
|
270
|
+
/* make fixed width work */
|
|
271
|
+
width: 0px;
|
|
272
|
+
color: var(--font-on-background);
|
|
273
|
+
table-layout: fixed;
|
|
274
|
+
border-collapse: collapse;
|
|
275
|
+
`;
|
|
276
|
+
const TD = _styledComponents.default.td`
|
|
277
|
+
height: 48px;
|
|
278
|
+
padding: 0 var(--spacing-xs);
|
|
279
|
+
border-top: 1px solid var(--border-color);
|
|
280
|
+
border-right: 1px solid var(--border-color);
|
|
281
|
+
border-bottom: 1px solid var(--border-color);
|
|
282
|
+
text-align: ${_ref3 => {
|
|
283
|
+
let {
|
|
284
|
+
center
|
|
285
|
+
} = _ref3;
|
|
286
|
+
return center ? 'center' : 'left';
|
|
287
|
+
}};
|
|
288
|
+
background: ${_ref4 => {
|
|
289
|
+
let {
|
|
290
|
+
backgroundReverse
|
|
291
|
+
} = _ref4;
|
|
292
|
+
return backgroundReverse ? 'var(--color-background1)' : 'var(--color-background2)';
|
|
293
|
+
}};
|
|
294
|
+
|
|
295
|
+
&:last-child {
|
|
296
|
+
border-right: none;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
> span {
|
|
300
|
+
display: inline-block;
|
|
301
|
+
width: 100%;
|
|
302
|
+
padding: 0 2px;
|
|
303
|
+
overflow: hidden;
|
|
304
|
+
white-space: pre;
|
|
305
|
+
text-overflow: ellipsis;
|
|
306
|
+
}
|
|
307
|
+
`;
|
|
308
|
+
const Scrollbar = _styledComponents.default.div`
|
|
309
|
+
position: sticky;
|
|
310
|
+
bottom: 48px;
|
|
311
|
+
width: 100%;
|
|
312
|
+
overflow: auto;
|
|
313
|
+
background: ${_ref5 => {
|
|
314
|
+
let {
|
|
315
|
+
backgroundReverse
|
|
316
|
+
} = _ref5;
|
|
317
|
+
return backgroundReverse ? 'var(--color-background1)' : 'var(--color-background2)';
|
|
318
|
+
}};
|
|
319
|
+
|
|
320
|
+
::before {
|
|
321
|
+
display: block;
|
|
322
|
+
content: '';
|
|
323
|
+
width: ${_ref6 => {
|
|
324
|
+
let {
|
|
325
|
+
width
|
|
326
|
+
} = _ref6;
|
|
327
|
+
return `${width}px`;
|
|
328
|
+
}};
|
|
329
|
+
height: 1px;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
${(0, _scrollbar.default)({
|
|
333
|
+
size: 'large'
|
|
334
|
+
})}
|
|
335
|
+
`;
|
|
336
|
+
var _default = exports.default = GridTable;
|
|
@@ -0,0 +1,45 @@
|
|
|
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 _IconFigure = _interopRequireDefault(require("../figure/IconFigure"));
|
|
9
|
+
var _ImageFluid = _interopRequireDefault(require("../image/ImageFluid"));
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
const ImageBox = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
image,
|
|
15
|
+
text
|
|
16
|
+
} = _ref;
|
|
17
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Wrapper, {
|
|
18
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_IconFigure.default, {
|
|
19
|
+
size: "large",
|
|
20
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageFluid.default, {
|
|
21
|
+
crossOrigin: "anonymous",
|
|
22
|
+
src: image,
|
|
23
|
+
alt: `${text}'s pic`,
|
|
24
|
+
roundedCircle: true
|
|
25
|
+
})
|
|
26
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Text, {
|
|
27
|
+
children: text
|
|
28
|
+
})]
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
const Wrapper = _styledComponents.default.div`
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
|
|
35
|
+
> figure {
|
|
36
|
+
flex: 0 0 auto;
|
|
37
|
+
margin-right: var(--spacing-xs);
|
|
38
|
+
}
|
|
39
|
+
`;
|
|
40
|
+
const Text = _styledComponents.default.span`
|
|
41
|
+
white-space: nowrap;
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
text-overflow: ellipsis;
|
|
44
|
+
`;
|
|
45
|
+
var _default = exports.default = ImageBox;
|