@cashub/ui 0.22.7 → 0.22.9
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/package.json +50 -0
- package/{table → dist/table}/Table.js +6 -5
- package/package.json +59 -50
- package/setupTests.js +9 -0
- package/src/Tab/Tab.js +11 -0
- package/src/Tab/TabList.js +20 -0
- package/src/Tab/TabPanel.js +35 -0
- package/src/Tab/TabTab.js +42 -0
- package/src/Tab/__stories__/Tab.stories.js +48 -0
- package/src/Tab/__stories__/TabList.stories.js +26 -0
- package/src/Tab/__stories__/TabPanel.stories.js +45 -0
- package/src/Tab/__stories__/TabTab.stories.js +30 -0
- package/src/Tab/__test__/Tab.test.js +43 -0
- package/src/Tab/__test__/TabList.test.js +22 -0
- package/src/Tab/__test__/TabPanel.test.js +27 -0
- package/src/Tab/__test__/TabTab.test.js +58 -0
- package/src/Tab/index.js +10 -0
- package/src/Tab/subComponent/TabContext.js +5 -0
- package/src/animate/Collapse.js +68 -0
- package/src/animate/Loader.js +36 -0
- package/src/animate/NumberCounter.js +49 -0
- package/src/animate/PulseRing.js +25 -0
- package/src/animate/Spinner.js +13 -0
- package/src/animate/__stories__/Collapse.stories.js +60 -0
- package/src/animate/__stories__/Loader.stories.js +33 -0
- package/src/animate/__stories__/NumberCounter.stories.js +29 -0
- package/src/animate/__stories__/PulseRing.stories.js +17 -0
- package/src/animate/__stories__/Spinner.stories.js +13 -0
- package/src/animate/__test__/Collapse.test.js +125 -0
- package/src/animate/__test__/Loader.test.js +42 -0
- package/src/animate/__test__/NumberCounter.test.js +71 -0
- package/src/animate/__test__/PulseRing.test.js +37 -0
- package/src/animate/__test__/Spinner.test.js +18 -0
- package/src/animate/index.js +5 -0
- package/src/assets/css/autocomplete.css +16 -0
- package/src/assets/css/font.css +4 -0
- package/src/assets/css/global.css +3 -0
- package/src/assets/css/normalize.css +386 -0
- package/src/assets/font/helvetica/Helvetica.ttf +0 -0
- package/src/assets/font/nanumGothic/NanumGothic-Bold.ttf +0 -0
- package/src/assets/font/nanumGothic/NanumGothic-ExtraBold.ttf +0 -0
- package/src/assets/font/nanumGothic/NanumGothic-Regular.ttf +0 -0
- package/src/assets/icons/app-management.png +0 -0
- package/src/assets/icons/burger.png +0 -0
- package/src/assets/icons/file.svg +1 -0
- package/src/assets/icons/map_icon1.png +0 -0
- package/src/assets/icons/map_icon4.png +0 -0
- package/src/assets/images/bg-chart-circle.png +0 -0
- package/src/assets/images/bg-chart-triangle.png +0 -0
- package/src/assets/images/cashub-logo-only.png +0 -0
- package/src/assets/images/default-user.jpg +0 -0
- package/src/assets/images/logo-cashub.png +0 -0
- package/src/assets/images/map.png +0 -0
- package/src/assets/images/qrcode.png +0 -0
- package/src/backdrop/BaseBackdrop.js +13 -0
- package/src/backdrop/LoadingBackdrop.js +12 -0
- package/src/backdrop/ModalBackdrop.js +10 -0
- package/src/backdrop/__test__/BaseBackdrop.test.js +10 -0
- package/src/backdrop/__test__/LoadingBackdrop.test.js +9 -0
- package/src/backdrop/__test__/ModalBackdrop.test.js +8 -0
- package/src/backdrop/index.js +3 -0
- package/src/badge/Badge.js +21 -0
- package/src/badge/BadgeDot.js +13 -0
- package/src/badge/BadgeFill.js +29 -0
- package/src/badge/BadgeWithText.js +21 -0
- package/src/badge/__stories__/Badge.stories.js +43 -0
- package/src/badge/__stories__/BadgeDot.stories.js +23 -0
- package/src/badge/__stories__/BadgeFill.stories.js +29 -0
- package/src/badge/__stories__/BadgeWithText.stories.js +26 -0
- package/src/badge/__test__/Badge.test.js +19 -0
- package/src/badge/__test__/BadgeDot.test.js +22 -0
- package/src/badge/__test__/BadgeFill.test.js +41 -0
- package/src/badge/__test__/BadgeWithText.test.js +22 -0
- package/src/badge/index.js +4 -0
- package/src/billing/BarChart.js +42 -0
- package/src/billing/Grid.js +30 -0
- package/src/billing/Header2.js +15 -0
- package/src/billing/Header3.js +32 -0
- package/src/billing/Paragraph.js +27 -0
- package/src/billing/ParagraphGroup.js +12 -0
- package/src/billing/ParagraphText.js +16 -0
- package/src/billing/Section.js +48 -0
- package/src/billing/SectionBody.js +7 -0
- package/src/billing/SectionHeader.js +16 -0
- package/src/billing/__stories__/BarChart.stories.js_bak +46 -0
- package/src/billing/__stories__/Grid.stories.js_bak +57 -0
- package/src/billing/__stories__/Header2.stories.js_bak +62 -0
- package/src/billing/__stories__/Header3.stories.js_bak +69 -0
- package/src/billing/__stories__/Paragraph.stories.js_bak +84 -0
- package/src/billing/__stories__/ParagraphGroup.stories.js_bak +68 -0
- package/src/billing/__stories__/ParagraphText.stories.js_bak +64 -0
- package/src/billing/__stories__/Section.stories.js_bak +115 -0
- package/src/billing/__stories__/SectionBody.stories.js_bak +62 -0
- package/src/billing/__stories__/SectionHeader.stories.js-bak +68 -0
- package/src/breadcrumb/Breadcrumb.js +66 -0
- package/src/breadcrumb/__stories__/Breadcrumb.stories.js +31 -0
- package/src/breadcrumb/__test__/breadcrumb.test.js +27 -0
- package/src/breadcrumb/index.js +1 -0
- package/src/button/Button.js +80 -0
- package/src/button/ButtonGroup.js +33 -0
- package/src/button/IconButton.js +40 -0
- package/src/button/ScrollToTopButton.js +48 -0
- package/src/button/__stories__/Button.stories.js +70 -0
- package/src/button/__stories__/ButtonGroup.stories.js +48 -0
- package/src/button/__stories__/IconButton.stories.js +30 -0
- package/src/button/__stories__/ScrollToTopButton.stories.js +22 -0
- package/src/button/__test__/Button.test.js +32 -0
- package/src/button/__test__/ButtonGroup.test.js +25 -0
- package/src/button/__test__/IconButton.test.js +34 -0
- package/src/button/__test__/ScrollToTopButton.test.js +19 -0
- package/src/button/index.js +4 -0
- package/src/callout/Callout.js +52 -0
- package/src/callout/__stories__/Callout.stories.js +23 -0
- package/src/callout/__test__/Callout.test.js +29 -0
- package/src/callout/index.js +1 -0
- package/src/chart/BarChart.js +134 -0
- package/src/chart/DoughnutChart.js +82 -0
- package/src/chart/LineChart.js +114 -0
- package/src/chart/SingleBarChart.js +27 -0
- package/src/chart/__stories__/BarChart.stories.js +54 -0
- package/src/chart/__stories__/DoughnutChart.stories.js +33 -0
- package/src/chart/__stories__/LineChart.stories.js +73 -0
- package/src/chart/__stories__/SingleBarChart.stories.js +22 -0
- package/src/chart/index.js +5 -0
- package/src/chart/utils/customTooltip.js +108 -0
- package/src/chart/utils/htmlLegendPlugin.js +88 -0
- package/src/chart/utils/index.js +3 -0
- package/src/chart/utils/padEmptyChartBar.js +37 -0
- package/src/container/FlexContainer.js +13 -0
- package/src/container/__stories__/FlexContainer.stories.js +39 -0
- package/src/container/__test__/FlexContainer.test.js +21 -0
- package/src/container/index.js +1 -0
- package/src/cropper/Cropper.js +49 -0
- package/src/cropper/CropperModalHandler.js +36 -0
- package/src/cropper/__stories__/Cropper.stories.js +32 -0
- package/src/cropper/__test__/Cropper.test.js +90 -0
- package/src/cropper/index.js +2 -0
- package/src/cropper/subComponent/CropImageModal.js +84 -0
- package/src/datetimePicker/DatePicker.js +493 -0
- package/src/datetimePicker/DatePickerV2.js +500 -0
- package/src/datetimePicker/DatetimePicker.js +218 -0
- package/src/datetimePicker/DatetimePickerV2.js +512 -0
- package/src/datetimePicker/TimeInput.js +45 -0
- package/src/datetimePicker/TimePicker.js +318 -0
- package/src/datetimePicker/TimePickerStyle.js +59 -0
- package/src/datetimePicker/__stories__/DatePicker.stories.js +51 -0
- package/src/datetimePicker/__stories__/DatePickerV2.stories.js +73 -0
- package/src/datetimePicker/__stories__/DatetimePicker.stories.js +71 -0
- package/src/datetimePicker/__stories__/DatetimePickerV2.stories.js +91 -0
- package/src/datetimePicker/__stories__/TimeInput.stories.js +67 -0
- package/src/datetimePicker/__stories__/TimePicker.stories.js +29 -0
- package/src/datetimePicker/__test__/CustomTimeInput.test.js +25 -0
- package/src/datetimePicker/__test__/DatetimePicker.test.js +121 -0
- package/src/datetimePicker/__test__/TimeInput.test.js +22 -0
- package/src/datetimePicker/accordion/Month.js +258 -0
- package/src/datetimePicker/accordion/Year.js +307 -0
- package/src/datetimePicker/hooks/index.js +3 -0
- package/src/datetimePicker/hooks/useChangeNumber.js +42 -0
- package/src/datetimePicker/hooks/useDecrease.js +31 -0
- package/src/datetimePicker/hooks/useIncrease.js +31 -0
- package/src/datetimePicker/index.js +7 -0
- package/src/datetimePicker/provider/constant.js +16 -0
- package/src/datetimePicker/subComponent/Accordion.js +407 -0
- package/src/datetimePicker/subComponent/CustomTimeInput.js +48 -0
- package/src/datetimePicker/subComponent/DateTimePickerContext.js +5 -0
- package/src/datetimePicker/utils/GMTDate.js +13 -0
- package/src/datetimePicker/utils/pad.js +9 -0
- package/src/datetimePicker/utils/toUTC0.js +10 -0
- package/src/descriptionList/DescriptionDetail.js +18 -0
- package/src/descriptionList/DescriptionList.js +15 -0
- package/src/descriptionList/DescriptionTerm.js +9 -0
- package/src/descriptionList/__stories__/DescriptionDetail.stories.js +39 -0
- package/src/descriptionList/__stories__/DescriptionList.stories.js +39 -0
- package/src/descriptionList/__stories__/DescriptionTerm.stories.js +13 -0
- package/src/descriptionList/__test__/DescriptionDetail.test.js +13 -0
- package/src/descriptionList/__test__/DescriptionList.test.js +12 -0
- package/src/descriptionList/__test__/DescriptionTerm.test.js +7 -0
- package/src/descriptionList/index.js +3 -0
- package/src/divider/Divider.js +21 -0
- package/src/divider/__stories__/Divider.stories.js +23 -0
- package/src/divider/__test__/Divider.test.js +24 -0
- package/src/divider/index.js +1 -0
- package/src/dropdown/Dropdown.js +50 -0
- package/src/dropdown/DropdownButtonOption.js +25 -0
- package/src/dropdown/DropdownContent.js +78 -0
- package/src/dropdown/DropdownDivOption.js +21 -0
- package/src/dropdown/DropdownItem.js +17 -0
- package/src/dropdown/DropdownLinkOption.js +19 -0
- package/src/dropdown/DropdownToggle.js +26 -0
- package/src/dropdown/__stories__/Dropdown.stories.js +46 -0
- package/src/dropdown/__stories__/DropdownButtonOption.stories.js +33 -0
- package/src/dropdown/__stories__/DropdownContent.stories.js +34 -0
- package/src/dropdown/__stories__/DropdownDivOption.stories.js +27 -0
- package/src/dropdown/__stories__/DropdownItem.stories.js +48 -0
- package/src/dropdown/__stories__/DropdownLinkOption.stories.js +63 -0
- package/src/dropdown/__stories__/DropdownToggle.stories.js +40 -0
- package/src/dropdown/__test__/Dropdown.test.js +132 -0
- package/src/dropdown/__test__/DropdownButtonOption.test.js +8 -0
- package/src/dropdown/__test__/DropdownContent.test.js +85 -0
- package/src/dropdown/__test__/DropdownDivOption.test.js +8 -0
- package/src/dropdown/__test__/DropdownItem.test.js +55 -0
- package/src/dropdown/__test__/DropdownLinkOption.test.js +14 -0
- package/src/dropdown/__test__/DropdownToggle.test.js +53 -0
- package/src/dropdown/index.js +12 -0
- package/src/dropdown/subComponent/DropdownContext.js +5 -0
- package/src/dropzone/FileDropzone.js +543 -0
- package/src/dropzone/ImageDropzone.js +365 -0
- package/src/dropzone/__stories__/FileDropzone.stories.js +148 -0
- package/src/dropzone/__stories__/ImageDropzone.stories.js +101 -0
- package/src/dropzone/__test__/FileDropzone.test.js +382 -0
- package/src/dropzone/__test__/ImageDropzone.test.js +290 -0
- package/src/dropzone/__test__/Message.test.js +14 -0
- package/src/dropzone/index.js +2 -0
- package/src/dropzone/subComponent/Message.js +16 -0
- package/src/figure/IconFigure.js +31 -0
- package/src/figure/ImageFigure.js +25 -0
- package/src/figure/__stories__/IconFigure.stories.js +25 -0
- package/src/figure/__stories__/ImageFigure.stories.js +26 -0
- package/src/figure/__test__/IconFigure.test.js +28 -0
- package/src/figure/__test__/ImageFigure.test.js +38 -0
- package/src/figure/index.js +2 -0
- package/src/file/HiddenFileInput.js +10 -0
- package/src/file/index.js +1 -0
- package/src/form/Checkbox.js +127 -0
- package/src/form/FormItem.js +7 -0
- package/src/form/Input.js +42 -0
- package/src/form/Label.js +33 -0
- package/src/form/MutedText.js +11 -0
- package/src/form/RadioButton.js +80 -0
- package/src/form/Searchbox.js +95 -0
- package/src/form/Slider.js +34 -0
- package/src/form/SwitchButton.js +86 -0
- package/src/form/Textarea.js +36 -0
- package/src/form/TreeView.js +77 -0
- package/src/form/__stories__/Checkbox.stories.js +63 -0
- package/src/form/__stories__/FormItem.stories.js +28 -0
- package/src/form/__stories__/Input.stories.js +30 -0
- package/src/form/__stories__/Label.stories.js +38 -0
- package/src/form/__stories__/MutedText.stories.js +27 -0
- package/src/form/__stories__/RadioButton.stories.js +48 -0
- package/src/form/__stories__/Searchbox.stories.js +24 -0
- package/src/form/__stories__/Slider.stories.js +46 -0
- package/src/form/__stories__/SwitchButton.stories.js +48 -0
- package/src/form/__stories__/Textarea.stories.js +19 -0
- package/src/form/__stories__/TreeView.stories.js +76 -0
- package/src/form/__test__/Checkbox.test.js +68 -0
- package/src/form/__test__/FormItem.test.js +8 -0
- package/src/form/__test__/Input.test.js +28 -0
- package/src/form/__test__/Label.test.js +33 -0
- package/src/form/__test__/MutedText.test.js +18 -0
- package/src/form/__test__/RadioButton.test.js +57 -0
- package/src/form/__test__/Searchbox.test.js +50 -0
- package/src/form/__test__/Textarea.test.js +25 -0
- package/src/form/index.js +11 -0
- package/src/grid/Column.js +36 -0
- package/src/grid/Grid.js +15 -0
- package/src/grid/__stories__/Grid.stories.js +38 -0
- package/src/grid/__test__/Grid.test.js +44 -0
- package/src/grid/index.js +2 -0
- package/src/heading/Heading1.js +11 -0
- package/src/heading/Heading2.js +13 -0
- package/src/heading/Heading3.js +21 -0
- package/src/heading/__stories__/Heading1.stories.js +24 -0
- package/src/heading/__stories__/Heading2.stories.js +24 -0
- package/src/heading/__stories__/Heading3.stories.js +24 -0
- package/src/heading/__test__/Heading1.test.js +21 -0
- package/src/heading/__test__/Heading2.test.js +34 -0
- package/src/heading/__test__/Heading3.test.js +46 -0
- package/src/heading/index.js +3 -0
- package/src/helmet/Helmet.js +12 -0
- package/src/helmet/__test__/Helmet.test.js +38 -0
- package/src/helmet/index.js +2 -0
- package/src/iconbox/ApplicationIconBox.js +62 -0
- package/src/iconbox/IconBox.js +54 -0
- package/src/iconbox/IconBoxV2.js +49 -0
- package/src/iconbox/__stories__/ApplicationIconBox.stories.js +53 -0
- package/src/iconbox/__stories__/IconBox.stories.js +34 -0
- package/src/iconbox/__stories__/IconBoxFigure.stories.js +67 -0
- package/src/iconbox/__stories__/IconBoxFigure.stories_V2.stories.js +41 -0
- package/src/iconbox/__stories__/IconBoxImage.stories.js +32 -0
- package/src/iconbox/__stories__/IconBoxV2.stories.js +60 -0
- package/src/iconbox/__test__/ApplicationIconBox.test.js +77 -0
- package/src/iconbox/__test__/IconBox.test.js +22 -0
- package/src/iconbox/__test__/IconBoxFigure.test.js +37 -0
- package/src/iconbox/__test__/IconBoxImage.test.js +32 -0
- package/src/iconbox/__test__/IconBoxV2.test.js +51 -0
- package/src/iconbox/index.js +3 -0
- package/src/iconbox/subComponent/IconBoxFigure.js +16 -0
- package/src/iconbox/subComponent/IconBoxImage.js +26 -0
- package/src/image/ImageFluid.js +12 -0
- package/src/image/UploadImage.js +287 -0
- package/src/image/__stories__/ImageFluid.stories.js +25 -0
- package/src/image/__stories__/UploadImage.stories.js +56 -0
- package/src/image/__test__/ImageFluid.test.js +44 -0
- package/src/image/__test__/UploadImage.test.js +315 -0
- package/src/image/index.js +2 -0
- package/src/index.js +42 -0
- package/src/jsoneditor/JsonEditor.js +132 -0
- package/src/jsoneditor/__stories__/JsonEditor.stories.js +55 -0
- package/src/jsoneditor/__test__/JsonEditor.test.js +52 -0
- package/src/jsoneditor/index.js +1 -0
- package/src/keyframe/Pulse.js +17 -0
- package/src/keyframe/Spin.js +9 -0
- package/src/link/LinkSpan.js +44 -0
- package/src/link/__stories__/LinkSpan.stories.js +27 -0
- package/src/link/__test__/LinkSpan.test.js +52 -0
- package/src/link/index.js +1 -0
- package/src/map/GoogleMap.js +383 -0
- package/src/map/GoogleReverseGeolocation.js +197 -0
- package/src/map/LeafletMap.js +264 -0
- package/src/map/LeafletReverseGeolocation.js +89 -0
- package/src/map/__stories__/GoogleMap.stories.js +137 -0
- package/src/map/__stories__/GoogleReverseGeolocation.stories.js +95 -0
- package/src/map/__stories__/LeafletMap.stories.js +136 -0
- package/src/map/__stories__/LeafletReverseGeolocation.stories.js +91 -0
- package/src/map/__test__/LeafletReverseGeolocation.test.js +245 -0
- package/src/map/__test__/MapSearchBoxControl.test.js +89 -0
- package/src/map/index.js +4 -0
- package/src/map/subComponent/BasicLeafletMap.js +33 -0
- package/src/map/subComponent/GoogleMapContainer.js +19 -0
- package/src/map/subComponent/GoogleMapPopup.js +115 -0
- package/src/map/subComponent/GoogleMapWrapper.js +27 -0
- package/src/map/subComponent/GoogleMarkerSpiderfier.js +13 -0
- package/src/map/subComponent/LeafletDrawControl.js +133 -0
- package/src/map/subComponent/LeafletMapContainer.js +163 -0
- package/src/map/subComponent/MapSearchBoxControl.js +43 -0
- package/src/modal/StateModal.js +139 -0
- package/src/modal/TitleModal.js +229 -0
- package/src/modal/__stories__/StateModal.stories.js +46 -0
- package/src/modal/__stories__/TitleModal.stories.js +56 -0
- package/src/modal/__test__/StateModal.test.js +144 -0
- package/src/modal/index.js +2 -0
- package/src/paginate/Paginate.js +132 -0
- package/src/paginate/__stories__/Paginate.stories.js +49 -0
- package/src/paginate/__test__/Paginate.test.js +124 -0
- package/src/paginate/index.js +1 -0
- package/src/popover/Popover.js +82 -0
- package/src/popover/__stories__/Popover.stories.js +44 -0
- package/src/popover/index.js +1 -0
- package/src/qrcode/QRCode.js +54 -0
- package/src/qrcode/QRCodeContainter.js +25 -0
- package/src/qrcode/__stories__/QRCode.stories.js +36 -0
- package/src/qrcode/__stories__/QRCodeContainter.stories.js +28 -0
- package/src/qrcode/index.js +2 -0
- package/src/ribbon/Ribbon.js +38 -0
- package/src/ribbon/__stories__/Ribbon.stories.js +25 -0
- package/src/ribbon/index.js +1 -0
- package/src/section/Section.js +66 -0
- package/src/section/SectionBody.js +34 -0
- package/src/section/SectionHeader.js +41 -0
- package/src/section/SectionToolbar.js +13 -0
- package/src/section/SectionToolbarItem.js +12 -0
- package/src/section/__stories__/Section.stories.js +52 -0
- package/src/section/__stories__/SectionBody.stories.js +40 -0
- package/src/section/__stories__/SectionHeader.stories.js +67 -0
- package/src/section/__stories__/SectionToolbar.stories.js +43 -0
- package/src/section/__test__/Section.test.js +98 -0
- package/src/section/__test__/SectionBody.test.js +89 -0
- package/src/section/__test__/SectionHeader.test.js +35 -0
- package/src/section/__test__/SectionToolbar.test.js +17 -0
- package/src/section/index.js +5 -0
- package/src/select/InputSelect.js +314 -0
- package/src/select/Select.js +764 -0
- package/src/select/__stories__/InputSelect.stories.js +60 -0
- package/src/select/__stories__/Select.stories.js +132 -0
- package/src/select/__test__/Select.test.js +219 -0
- package/src/select/index.js +2 -0
- package/src/select/subComponent/ListBox.js +15 -0
- package/src/select/subComponent/Option.js +22 -0
- package/src/select/subComponent/OptionGroup.js +18 -0
- package/src/select/subComponent/Options.js +24 -0
- package/src/select/subComponent/SearchBox.js +53 -0
- package/src/select/subComponent/SelectedMultiple.js +39 -0
- package/src/select/subComponent/SelectedSingle.js +10 -0
- package/src/styles/GlobalStyle.js +59 -0
- package/src/styles/config/breakpoint.style.js +8 -0
- package/src/styles/config/header.style.js +5 -0
- package/src/styles/config/sidebar.style.js +12 -0
- package/src/styles/index.js +2 -0
- package/src/styles/mixin/backgroundColor.js +13 -0
- package/src/styles/mixin/borderColor.js +13 -0
- package/src/styles/mixin/color.js +13 -0
- package/src/styles/mixin/colorOnBackground.js +13 -0
- package/src/styles/mixin/inputPlaceholder.js +26 -0
- package/src/styles/mixin/media.js +14 -0
- package/src/styles/mixin/rounded.js +12 -0
- package/src/styles/mixin/scrollbar.js +26 -0
- package/src/styles/theme/dark.theme.js +95 -0
- package/src/styles/theme/light.theme.js +95 -0
- package/src/styles/theme/white.theme.js +95 -0
- package/src/styles/themes.js +11 -0
- package/src/table/GridTable.js +325 -0
- package/src/table/ImageBox.js +37 -0
- package/src/table/PermissionTable.js +36 -0
- package/src/table/Table.js +441 -0
- package/src/table/__mock__/columns.js +28 -0
- package/src/table/__mock__/data.js +334 -0
- package/src/table/__stories__/GridTable.stories.js +129 -0
- package/src/table/__stories__/ImageBox.stories.js +27 -0
- package/src/table/__stories__/PermissionTable.stories.js +52 -0
- package/src/table/__stories__/Table.stories.js +138 -0
- package/src/table/hooks/index.js +2 -0
- package/src/table/hooks/useCalculateDataRange.js +26 -0
- package/src/table/hooks/useGenerateSort.js +37 -0
- package/src/table/index.js +4 -0
- package/src/table/subComponent/BaseTableHeadCell.js +48 -0
- package/src/table/subComponent/GridTableFooter.js +18 -0
- package/src/table/subComponent/GridTableHeadCell.js +14 -0
- package/src/table/subComponent/Resizer.js +79 -0
- package/src/table/subComponent/TableFooter.js +16 -0
- package/src/table/subComponent/TableFooterInfo.js +8 -0
- package/src/table/subComponent/TableFooterPager.js +26 -0
- package/src/table/subComponent/TableHeadCell.js +14 -0
- package/src/table/subComponent/TableSort.js +25 -0
- package/src/tagify/TagifyStyle.js +35 -0
- package/src/tagify/Tags.js +46 -0
- package/src/tagify/__stories__/Tags.stories.js +28 -0
- package/src/tagify/index.js +2 -0
- package/src/text/Paragraph.js +34 -0
- package/src/text/__stories__/Paragraph.stories.js +40 -0
- package/src/text/index.js +1 -0
- package/src/timeline/Timeline.js +98 -0
- package/src/timeline/__stories__/Timeline.stories.js +49 -0
- package/src/timeline/index.js +1 -0
- package/src/toast/CustomToastContainer.js +30 -0
- package/src/toast/MessageContainer.js +40 -0
- package/src/toast/__stories__/MessageContainer.stories.js +35 -0
- package/src/toast/index.js +3 -0
- package/src/toast/show.js +34 -0
- package/src/toast/style.css +1 -0
- package/src/tooltip/Tooltip.js +146 -0
- package/src/tooltip/__stories__/Tooltip.stories.js +49 -0
- package/src/tooltip/__test__/tooltip.test.js +130 -0
- package/src/tooltip/index.js +1 -0
- package/src/wizard/Wizard.js +276 -0
- package/src/wizard/__stories__/Wizard.stories.js +81 -0
- package/src/wizard/__test__/Wizard.test.js +173 -0
- package/src/wizard/index.js +1 -0
- package/transformer/fileTransformer.js +9 -0
- /package/{Tab → dist/Tab}/Tab.js +0 -0
- /package/{Tab → dist/Tab}/TabList.js +0 -0
- /package/{Tab → dist/Tab}/TabPanel.js +0 -0
- /package/{Tab → dist/Tab}/TabTab.js +0 -0
- /package/{Tab → dist/Tab}/index.js +0 -0
- /package/{Tab → dist/Tab}/subComponent/TabContext.js +0 -0
- /package/{animate → dist/animate}/Collapse.js +0 -0
- /package/{animate → dist/animate}/Loader.js +0 -0
- /package/{animate → dist/animate}/NumberCounter.js +0 -0
- /package/{animate → dist/animate}/PulseRing.js +0 -0
- /package/{animate → dist/animate}/Spinner.js +0 -0
- /package/{animate → dist/animate}/index.js +0 -0
- /package/{assets → dist/assets}/css/autocomplete.css +0 -0
- /package/{assets → dist/assets}/css/font.css +0 -0
- /package/{assets → dist/assets}/css/global.css +0 -0
- /package/{assets → dist/assets}/css/normalize.css +0 -0
- /package/{assets → dist/assets}/font/helvetica/Helvetica.ttf +0 -0
- /package/{assets → dist/assets}/font/nanumGothic/NanumGothic-Bold.ttf +0 -0
- /package/{assets → dist/assets}/font/nanumGothic/NanumGothic-ExtraBold.ttf +0 -0
- /package/{assets → dist/assets}/font/nanumGothic/NanumGothic-Regular.ttf +0 -0
- /package/{assets → dist/assets}/icons/app-management.png +0 -0
- /package/{assets → dist/assets}/icons/burger.png +0 -0
- /package/{assets → dist/assets}/icons/file.svg +0 -0
- /package/{assets → dist/assets}/icons/map_icon1.png +0 -0
- /package/{assets → dist/assets}/icons/map_icon4.png +0 -0
- /package/{assets → dist/assets}/images/bg-chart-circle.png +0 -0
- /package/{assets → dist/assets}/images/bg-chart-triangle.png +0 -0
- /package/{assets → dist/assets}/images/cashub-logo-only.png +0 -0
- /package/{assets → dist/assets}/images/default-user.jpg +0 -0
- /package/{assets → dist/assets}/images/logo-cashub.png +0 -0
- /package/{assets → dist/assets}/images/map.png +0 -0
- /package/{assets → dist/assets}/images/qrcode.png +0 -0
- /package/{backdrop → dist/backdrop}/BaseBackdrop.js +0 -0
- /package/{backdrop → dist/backdrop}/LoadingBackdrop.js +0 -0
- /package/{backdrop → dist/backdrop}/ModalBackdrop.js +0 -0
- /package/{backdrop → dist/backdrop}/index.js +0 -0
- /package/{badge → dist/badge}/Badge.js +0 -0
- /package/{badge → dist/badge}/BadgeDot.js +0 -0
- /package/{badge → dist/badge}/BadgeFill.js +0 -0
- /package/{badge → dist/badge}/BadgeWithText.js +0 -0
- /package/{badge → dist/badge}/index.js +0 -0
- /package/{billing → dist/billing}/BarChart.js +0 -0
- /package/{billing → dist/billing}/Grid.js +0 -0
- /package/{billing → dist/billing}/Header2.js +0 -0
- /package/{billing → dist/billing}/Header3.js +0 -0
- /package/{billing → dist/billing}/Paragraph.js +0 -0
- /package/{billing → dist/billing}/ParagraphGroup.js +0 -0
- /package/{billing → dist/billing}/ParagraphText.js +0 -0
- /package/{billing → dist/billing}/Section.js +0 -0
- /package/{billing → dist/billing}/SectionBody.js +0 -0
- /package/{billing → dist/billing}/SectionHeader.js +0 -0
- /package/{billing → dist/billing}/__stories__/BarChart.stories.js_bak +0 -0
- /package/{billing → dist/billing}/__stories__/Grid.stories.js_bak +0 -0
- /package/{billing → dist/billing}/__stories__/Header2.stories.js_bak +0 -0
- /package/{billing → dist/billing}/__stories__/Header3.stories.js_bak +0 -0
- /package/{billing → dist/billing}/__stories__/Paragraph.stories.js_bak +0 -0
- /package/{billing → dist/billing}/__stories__/ParagraphGroup.stories.js_bak +0 -0
- /package/{billing → dist/billing}/__stories__/ParagraphText.stories.js_bak +0 -0
- /package/{billing → dist/billing}/__stories__/Section.stories.js_bak +0 -0
- /package/{billing → dist/billing}/__stories__/SectionBody.stories.js_bak +0 -0
- /package/{billing → dist/billing}/__stories__/SectionHeader.stories.js-bak +0 -0
- /package/{breadcrumb → dist/breadcrumb}/Breadcrumb.js +0 -0
- /package/{breadcrumb → dist/breadcrumb}/index.js +0 -0
- /package/{button → dist/button}/Button.js +0 -0
- /package/{button → dist/button}/ButtonGroup.js +0 -0
- /package/{button → dist/button}/IconButton.js +0 -0
- /package/{button → dist/button}/ScrollToTopButton.js +0 -0
- /package/{button → dist/button}/index.js +0 -0
- /package/{callout → dist/callout}/Callout.js +0 -0
- /package/{callout → dist/callout}/index.js +0 -0
- /package/{chart → dist/chart}/BarChart.js +0 -0
- /package/{chart → dist/chart}/DoughnutChart.js +0 -0
- /package/{chart → dist/chart}/LineChart.js +0 -0
- /package/{chart → dist/chart}/SingleBarChart.js +0 -0
- /package/{chart → dist/chart}/index.js +0 -0
- /package/{chart → dist/chart}/utils/customTooltip.js +0 -0
- /package/{chart → dist/chart}/utils/htmlLegendPlugin.js +0 -0
- /package/{chart → dist/chart}/utils/index.js +0 -0
- /package/{chart → dist/chart}/utils/padEmptyChartBar.js +0 -0
- /package/{container → dist/container}/FlexContainer.js +0 -0
- /package/{container → dist/container}/index.js +0 -0
- /package/{cropper → dist/cropper}/Cropper.js +0 -0
- /package/{cropper → dist/cropper}/CropperModalHandler.js +0 -0
- /package/{cropper → dist/cropper}/index.js +0 -0
- /package/{cropper → dist/cropper}/subComponent/CropImageModal.js +0 -0
- /package/{datetimePicker → dist/datetimePicker}/DatePicker.js +0 -0
- /package/{datetimePicker → dist/datetimePicker}/DatePickerV2.js +0 -0
- /package/{datetimePicker → dist/datetimePicker}/DatetimePicker.js +0 -0
- /package/{datetimePicker → dist/datetimePicker}/DatetimePickerV2.js +0 -0
- /package/{datetimePicker → dist/datetimePicker}/TimeInput.js +0 -0
- /package/{datetimePicker → dist/datetimePicker}/TimePicker.js +0 -0
- /package/{datetimePicker → dist/datetimePicker}/TimePickerStyle.js +0 -0
- /package/{datetimePicker → dist/datetimePicker}/accordion/Month.js +0 -0
- /package/{datetimePicker → dist/datetimePicker}/accordion/Year.js +0 -0
- /package/{datetimePicker → dist/datetimePicker}/hooks/index.js +0 -0
- /package/{datetimePicker → dist/datetimePicker}/hooks/useChangeNumber.js +0 -0
- /package/{datetimePicker → dist/datetimePicker}/hooks/useDecrease.js +0 -0
- /package/{datetimePicker → dist/datetimePicker}/hooks/useIncrease.js +0 -0
- /package/{datetimePicker → dist/datetimePicker}/index.js +0 -0
- /package/{datetimePicker → dist/datetimePicker}/provider/constant.js +0 -0
- /package/{datetimePicker → dist/datetimePicker}/subComponent/Accordion.js +0 -0
- /package/{datetimePicker → dist/datetimePicker}/subComponent/CustomTimeInput.js +0 -0
- /package/{datetimePicker → dist/datetimePicker}/subComponent/DateTimePickerContext.js +0 -0
- /package/{datetimePicker → dist/datetimePicker}/utils/GMTDate.js +0 -0
- /package/{datetimePicker → dist/datetimePicker}/utils/pad.js +0 -0
- /package/{datetimePicker → dist/datetimePicker}/utils/toUTC0.js +0 -0
- /package/{descriptionList → dist/descriptionList}/DescriptionDetail.js +0 -0
- /package/{descriptionList → dist/descriptionList}/DescriptionList.js +0 -0
- /package/{descriptionList → dist/descriptionList}/DescriptionTerm.js +0 -0
- /package/{descriptionList → dist/descriptionList}/index.js +0 -0
- /package/{divider → dist/divider}/Divider.js +0 -0
- /package/{divider → dist/divider}/index.js +0 -0
- /package/{dropdown → dist/dropdown}/Dropdown.js +0 -0
- /package/{dropdown → dist/dropdown}/DropdownButtonOption.js +0 -0
- /package/{dropdown → dist/dropdown}/DropdownContent.js +0 -0
- /package/{dropdown → dist/dropdown}/DropdownDivOption.js +0 -0
- /package/{dropdown → dist/dropdown}/DropdownItem.js +0 -0
- /package/{dropdown → dist/dropdown}/DropdownLinkOption.js +0 -0
- /package/{dropdown → dist/dropdown}/DropdownToggle.js +0 -0
- /package/{dropdown → dist/dropdown}/index.js +0 -0
- /package/{dropdown → dist/dropdown}/subComponent/DropdownContext.js +0 -0
- /package/{dropzone → dist/dropzone}/FileDropzone.js +0 -0
- /package/{dropzone → dist/dropzone}/ImageDropzone.js +0 -0
- /package/{dropzone → dist/dropzone}/index.js +0 -0
- /package/{dropzone → dist/dropzone}/subComponent/Message.js +0 -0
- /package/{figure → dist/figure}/IconFigure.js +0 -0
- /package/{figure → dist/figure}/ImageFigure.js +0 -0
- /package/{figure → dist/figure}/index.js +0 -0
- /package/{file → dist/file}/HiddenFileInput.js +0 -0
- /package/{file → dist/file}/index.js +0 -0
- /package/{form → dist/form}/Checkbox.js +0 -0
- /package/{form → dist/form}/FormItem.js +0 -0
- /package/{form → dist/form}/Input.js +0 -0
- /package/{form → dist/form}/Label.js +0 -0
- /package/{form → dist/form}/MutedText.js +0 -0
- /package/{form → dist/form}/RadioButton.js +0 -0
- /package/{form → dist/form}/Searchbox.js +0 -0
- /package/{form → dist/form}/Slider.js +0 -0
- /package/{form → dist/form}/SwitchButton.js +0 -0
- /package/{form → dist/form}/Textarea.js +0 -0
- /package/{form → dist/form}/TreeView.js +0 -0
- /package/{form → dist/form}/index.js +0 -0
- /package/{grid → dist/grid}/Column.js +0 -0
- /package/{grid → dist/grid}/Grid.js +0 -0
- /package/{grid → dist/grid}/index.js +0 -0
- /package/{heading → dist/heading}/Heading1.js +0 -0
- /package/{heading → dist/heading}/Heading2.js +0 -0
- /package/{heading → dist/heading}/Heading3.js +0 -0
- /package/{heading → dist/heading}/index.js +0 -0
- /package/{helmet → dist/helmet}/Helmet.js +0 -0
- /package/{helmet → dist/helmet}/index.js +0 -0
- /package/{iconbox → dist/iconbox}/ApplicationIconBox.js +0 -0
- /package/{iconbox → dist/iconbox}/IconBox.js +0 -0
- /package/{iconbox → dist/iconbox}/IconBoxV2.js +0 -0
- /package/{iconbox → dist/iconbox}/index.js +0 -0
- /package/{iconbox → dist/iconbox}/subComponent/IconBoxFigure.js +0 -0
- /package/{iconbox → dist/iconbox}/subComponent/IconBoxImage.js +0 -0
- /package/{image → dist/image}/ImageFluid.js +0 -0
- /package/{image → dist/image}/UploadImage.js +0 -0
- /package/{image → dist/image}/index.js +0 -0
- /package/{index.js → dist/index.js} +0 -0
- /package/{jsoneditor → dist/jsoneditor}/JsonEditor.js +0 -0
- /package/{jsoneditor → dist/jsoneditor}/index.js +0 -0
- /package/{keyframe → dist/keyframe}/Pulse.js +0 -0
- /package/{keyframe → dist/keyframe}/Spin.js +0 -0
- /package/{link → dist/link}/LinkSpan.js +0 -0
- /package/{link → dist/link}/index.js +0 -0
- /package/{map → dist/map}/GoogleMap.js +0 -0
- /package/{map → dist/map}/GoogleReverseGeolocation.js +0 -0
- /package/{map → dist/map}/LeafletMap.js +0 -0
- /package/{map → dist/map}/LeafletReverseGeolocation.js +0 -0
- /package/{map → dist/map}/index.js +0 -0
- /package/{map → dist/map}/subComponent/BasicLeafletMap.js +0 -0
- /package/{map → dist/map}/subComponent/GoogleMapContainer.js +0 -0
- /package/{map → dist/map}/subComponent/GoogleMapPopup.js +0 -0
- /package/{map → dist/map}/subComponent/GoogleMapWrapper.js +0 -0
- /package/{map → dist/map}/subComponent/GoogleMarkerSpiderfier.js +0 -0
- /package/{map → dist/map}/subComponent/LeafletDrawControl.js +0 -0
- /package/{map → dist/map}/subComponent/LeafletMapContainer.js +0 -0
- /package/{map → dist/map}/subComponent/MapSearchBoxControl.js +0 -0
- /package/{modal → dist/modal}/StateModal.js +0 -0
- /package/{modal → dist/modal}/TitleModal.js +0 -0
- /package/{modal → dist/modal}/index.js +0 -0
- /package/{paginate → dist/paginate}/Paginate.js +0 -0
- /package/{paginate → dist/paginate}/index.js +0 -0
- /package/{popover → dist/popover}/Popover.js +0 -0
- /package/{popover → dist/popover}/index.js +0 -0
- /package/{qrcode → dist/qrcode}/QRCode.js +0 -0
- /package/{qrcode → dist/qrcode}/QRCodeContainter.js +0 -0
- /package/{qrcode → dist/qrcode}/index.js +0 -0
- /package/{ribbon → dist/ribbon}/Ribbon.js +0 -0
- /package/{ribbon → dist/ribbon}/index.js +0 -0
- /package/{section → dist/section}/Section.js +0 -0
- /package/{section → dist/section}/SectionBody.js +0 -0
- /package/{section → dist/section}/SectionHeader.js +0 -0
- /package/{section → dist/section}/SectionToolbar.js +0 -0
- /package/{section → dist/section}/SectionToolbarItem.js +0 -0
- /package/{section → dist/section}/index.js +0 -0
- /package/{select → dist/select}/InputSelect.js +0 -0
- /package/{select → dist/select}/Select.js +0 -0
- /package/{select → dist/select}/index.js +0 -0
- /package/{select → dist/select}/subComponent/ListBox.js +0 -0
- /package/{select → dist/select}/subComponent/Option.js +0 -0
- /package/{select → dist/select}/subComponent/OptionGroup.js +0 -0
- /package/{select → dist/select}/subComponent/Options.js +0 -0
- /package/{select → dist/select}/subComponent/SearchBox.js +0 -0
- /package/{select → dist/select}/subComponent/SelectedMultiple.js +0 -0
- /package/{select → dist/select}/subComponent/SelectedSingle.js +0 -0
- /package/{styles → dist/styles}/GlobalStyle.js +0 -0
- /package/{styles → dist/styles}/config/breakpoint.style.js +0 -0
- /package/{styles → dist/styles}/config/header.style.js +0 -0
- /package/{styles → dist/styles}/config/sidebar.style.js +0 -0
- /package/{styles → dist/styles}/index.js +0 -0
- /package/{styles → dist/styles}/mixin/backgroundColor.js +0 -0
- /package/{styles → dist/styles}/mixin/borderColor.js +0 -0
- /package/{styles → dist/styles}/mixin/color.js +0 -0
- /package/{styles → dist/styles}/mixin/colorOnBackground.js +0 -0
- /package/{styles → dist/styles}/mixin/inputPlaceholder.js +0 -0
- /package/{styles → dist/styles}/mixin/media.js +0 -0
- /package/{styles → dist/styles}/mixin/rounded.js +0 -0
- /package/{styles → dist/styles}/mixin/scrollbar.js +0 -0
- /package/{styles → dist/styles}/theme/dark.theme.js +0 -0
- /package/{styles → dist/styles}/theme/light.theme.js +0 -0
- /package/{styles → dist/styles}/theme/white.theme.js +0 -0
- /package/{styles → dist/styles}/themes.js +0 -0
- /package/{table → dist/table}/GridTable.js +0 -0
- /package/{table → dist/table}/ImageBox.js +0 -0
- /package/{table → dist/table}/PermissionTable.js +0 -0
- /package/{table → dist/table}/__mock__/columns.js +0 -0
- /package/{table → dist/table}/__mock__/data.js +0 -0
- /package/{table → dist/table}/hooks/index.js +0 -0
- /package/{table → dist/table}/hooks/useCalculateDataRange.js +0 -0
- /package/{table → dist/table}/hooks/useGenerateSort.js +0 -0
- /package/{table → dist/table}/index.js +0 -0
- /package/{table → dist/table}/subComponent/BaseTableHeadCell.js +0 -0
- /package/{table → dist/table}/subComponent/GridTableFooter.js +0 -0
- /package/{table → dist/table}/subComponent/GridTableHeadCell.js +0 -0
- /package/{table → dist/table}/subComponent/Resizer.js +0 -0
- /package/{table → dist/table}/subComponent/TableFooter.js +0 -0
- /package/{table → dist/table}/subComponent/TableFooterInfo.js +0 -0
- /package/{table → dist/table}/subComponent/TableFooterPager.js +0 -0
- /package/{table → dist/table}/subComponent/TableHeadCell.js +0 -0
- /package/{table → dist/table}/subComponent/TableSort.js +0 -0
- /package/{tagify → dist/tagify}/TagifyStyle.js +0 -0
- /package/{tagify → dist/tagify}/Tags.js +0 -0
- /package/{tagify → dist/tagify}/index.js +0 -0
- /package/{text → dist/text}/Paragraph.js +0 -0
- /package/{text → dist/text}/index.js +0 -0
- /package/{timeline → dist/timeline}/Timeline.js +0 -0
- /package/{timeline → dist/timeline}/index.js +0 -0
- /package/{toast → dist/toast}/CustomToastContainer.js +0 -0
- /package/{toast → dist/toast}/MessageContainer.js +0 -0
- /package/{toast → dist/toast}/index.js +0 -0
- /package/{toast → dist/toast}/show.js +0 -0
- /package/{toast → dist/toast}/style.css +0 -0
- /package/{tooltip → dist/tooltip}/Tooltip.js +0 -0
- /package/{tooltip → dist/tooltip}/index.js +0 -0
- /package/{wizard → dist/wizard}/Wizard.js +0 -0
- /package/{wizard → dist/wizard}/index.js +0 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { render, screen } from '@testing-library/react';
|
|
2
|
+
import userEvent from '@testing-library/user-event';
|
|
3
|
+
import 'jest-styled-components';
|
|
4
|
+
import Paginate from '../Paginate';
|
|
5
|
+
|
|
6
|
+
describe('Test Paginate Component', () => {
|
|
7
|
+
// component template
|
|
8
|
+
const renderComponent = (currentPage, onPageChange, alignRight) => {
|
|
9
|
+
return (
|
|
10
|
+
<Paginate
|
|
11
|
+
currentPage={currentPage}
|
|
12
|
+
totalCount={100}
|
|
13
|
+
pageSize={15}
|
|
14
|
+
onPageChange={onPageChange}
|
|
15
|
+
alignRight={alignRight}
|
|
16
|
+
/>
|
|
17
|
+
);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
test('render component', () => {
|
|
21
|
+
render(renderComponent(1));
|
|
22
|
+
|
|
23
|
+
const paginate = screen.getByRole('list');
|
|
24
|
+
expect(paginate).toBeInTheDocument();
|
|
25
|
+
expect(paginate).not.toHaveStyle('justify-content: flex-end');
|
|
26
|
+
|
|
27
|
+
const paginateButtons = screen.getAllByRole('listitem');
|
|
28
|
+
expect(paginateButtons).toHaveLength(9);
|
|
29
|
+
|
|
30
|
+
const [previousButton, button1, , , , , dots, , nextButton] =
|
|
31
|
+
paginateButtons;
|
|
32
|
+
paginateButtons.forEach((button, index) => {
|
|
33
|
+
// avoid check last button(next button)
|
|
34
|
+
if (index === paginateButtons.length - 1) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
expect(button).toHaveStyle('margin-right: var(--spacing-xs)');
|
|
39
|
+
});
|
|
40
|
+
expect(nextButton).toHaveStyleRule('margin-right', 'var(--spacing-xs)', {
|
|
41
|
+
modifier: '&:not(:last-child)',
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
expect(previousButton).toHaveStyle({
|
|
45
|
+
opacity: '0.5',
|
|
46
|
+
cursor: 'no-drop',
|
|
47
|
+
});
|
|
48
|
+
paginateButtons.forEach((button, index) => {
|
|
49
|
+
// avoid check first button(previous button)
|
|
50
|
+
if (index === 0) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
expect(button).not.toHaveStyle({
|
|
55
|
+
opacity: '0.5',
|
|
56
|
+
cursor: 'no-drop',
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
expect(button1).toHaveStyle('background-color: var(--color-primary)');
|
|
61
|
+
|
|
62
|
+
expect(dots).toHaveStyle('cursor: default');
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
test('variant style', () => {
|
|
66
|
+
render(renderComponent(1, null, true));
|
|
67
|
+
|
|
68
|
+
const paginate = screen.getByRole('list');
|
|
69
|
+
expect(paginate).toBeInTheDocument();
|
|
70
|
+
expect(paginate).toHaveStyle('justify-content: flex-end');
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
test('change page', () => {
|
|
74
|
+
let currentPage = 1;
|
|
75
|
+
const handlePageChange = jest.fn().mockImplementation((page) => {
|
|
76
|
+
currentPage = page;
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
const { rerender } = render(renderComponent(currentPage, handlePageChange));
|
|
80
|
+
|
|
81
|
+
const paginateButtons = screen.getAllByRole('listitem');
|
|
82
|
+
const [previousButton, , button2, , , , , button7, nextButton] =
|
|
83
|
+
paginateButtons;
|
|
84
|
+
|
|
85
|
+
userEvent.click(button2);
|
|
86
|
+
rerender(renderComponent(currentPage, handlePageChange));
|
|
87
|
+
expect(handlePageChange).toHaveBeenLastCalledWith(2);
|
|
88
|
+
|
|
89
|
+
userEvent.click(previousButton);
|
|
90
|
+
rerender(renderComponent(currentPage, handlePageChange));
|
|
91
|
+
expect(handlePageChange).toHaveBeenLastCalledWith(1);
|
|
92
|
+
expect(previousButton).toHaveStyle({
|
|
93
|
+
opacity: '0.5',
|
|
94
|
+
cursor: 'no-drop',
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
userEvent.click(previousButton);
|
|
98
|
+
rerender(renderComponent(currentPage, handlePageChange));
|
|
99
|
+
expect(handlePageChange).toHaveBeenCalledTimes(2);
|
|
100
|
+
|
|
101
|
+
userEvent.click(nextButton);
|
|
102
|
+
rerender(renderComponent(currentPage, handlePageChange));
|
|
103
|
+
expect(handlePageChange).toHaveBeenLastCalledWith(2);
|
|
104
|
+
|
|
105
|
+
userEvent.click(button7);
|
|
106
|
+
rerender(renderComponent(currentPage, handlePageChange));
|
|
107
|
+
expect(handlePageChange).toHaveBeenLastCalledWith(7);
|
|
108
|
+
expect(nextButton).toHaveStyle({
|
|
109
|
+
opacity: '0.5',
|
|
110
|
+
cursor: 'no-drop',
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
userEvent.click(nextButton);
|
|
114
|
+
rerender(renderComponent(currentPage, handlePageChange));
|
|
115
|
+
expect(handlePageChange).toHaveBeenCalledTimes(4);
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
test('invalid page range', () => {
|
|
119
|
+
render(renderComponent(0));
|
|
120
|
+
|
|
121
|
+
const paginate = screen.queryByRole('list');
|
|
122
|
+
expect(paginate).not.toBeInTheDocument();
|
|
123
|
+
});
|
|
124
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Paginate } from './Paginate';
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import ReactDOM, { unmountComponentAtNode } from 'react-dom';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import OutsideClickHandler from 'react-outside-click-handler';
|
|
5
|
+
import { useCustomPopper } from '@cashub/hooks';
|
|
6
|
+
import { appendElementTo } from '@cashub/utils';
|
|
7
|
+
|
|
8
|
+
const Popover = ({ container, id, ...props }) => {
|
|
9
|
+
const rootElement = appendElementTo('PopoverContainer', 'div', container);
|
|
10
|
+
|
|
11
|
+
const handleClose = () => {
|
|
12
|
+
// unmount component and clear event handler and state before remove container
|
|
13
|
+
unmountComponentAtNode(rootElement);
|
|
14
|
+
rootElement.remove();
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const result = document.getElementById(`popover${id}`);
|
|
18
|
+
// found previous element mean want to close popover now, so remove it
|
|
19
|
+
if (result) {
|
|
20
|
+
handleClose();
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
ReactDOM.render(
|
|
25
|
+
<Box {...props} id={`popover${id}`} handleClose={handleClose} />,
|
|
26
|
+
rootElement,
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const Box = ({ target, id, handleClose, content, boundary }) => {
|
|
31
|
+
const [popoverElement, setTooltipElement] = useState(null);
|
|
32
|
+
|
|
33
|
+
const { styles, attributes, state } = useCustomPopper(
|
|
34
|
+
target,
|
|
35
|
+
popoverElement,
|
|
36
|
+
{
|
|
37
|
+
boundary,
|
|
38
|
+
},
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<OutsideClickHandler
|
|
43
|
+
onOutsideClick={(event) => {
|
|
44
|
+
if (`popover${event.target.id}` !== id) {
|
|
45
|
+
handleClose();
|
|
46
|
+
}
|
|
47
|
+
}}
|
|
48
|
+
>
|
|
49
|
+
<Wrapper>
|
|
50
|
+
<PopoverBox
|
|
51
|
+
id={id}
|
|
52
|
+
ref={setTooltipElement}
|
|
53
|
+
style={styles.popper}
|
|
54
|
+
{...attributes.popper}
|
|
55
|
+
placement={state && state.placement}
|
|
56
|
+
>
|
|
57
|
+
{content}
|
|
58
|
+
</PopoverBox>
|
|
59
|
+
</Wrapper>
|
|
60
|
+
</OutsideClickHandler>
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const Wrapper = styled.div`
|
|
65
|
+
position: relative;
|
|
66
|
+
`;
|
|
67
|
+
|
|
68
|
+
const PopoverBox = styled.div`
|
|
69
|
+
border: 1px solid var(--border-color);
|
|
70
|
+
color: var(--font-on-background);
|
|
71
|
+
background: var(--color-background2);
|
|
72
|
+
box-shadow: var(--box-shadow);
|
|
73
|
+
border-radius: calc(var(--border-radius) / 2);
|
|
74
|
+
padding: var(--spacing-xs);
|
|
75
|
+
z-index: 80;
|
|
76
|
+
font-size: var(--font-body1);
|
|
77
|
+
font-weight: var(--font-normal);
|
|
78
|
+
max-width: 50vw;
|
|
79
|
+
word-break: break-all;
|
|
80
|
+
`;
|
|
81
|
+
|
|
82
|
+
export default Popover;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import Popover from '../Popover';
|
|
2
|
+
|
|
3
|
+
const metadata = {
|
|
4
|
+
title: 'Popover/Popover',
|
|
5
|
+
component: Popover,
|
|
6
|
+
argTypes: {
|
|
7
|
+
target: {
|
|
8
|
+
description: 'target is a element',
|
|
9
|
+
},
|
|
10
|
+
content: {
|
|
11
|
+
description: 'popover content',
|
|
12
|
+
},
|
|
13
|
+
boundary: {
|
|
14
|
+
description: 'boundary is a element',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const Template = (args) => {
|
|
20
|
+
const showPopover = (args) => {
|
|
21
|
+
return Popover({ ...args });
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<div>
|
|
26
|
+
<button
|
|
27
|
+
id='button'
|
|
28
|
+
onClick={(event) => {
|
|
29
|
+
showPopover({ ...args, target: event.target });
|
|
30
|
+
}}
|
|
31
|
+
>
|
|
32
|
+
Click
|
|
33
|
+
</button>
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const Default = Template.bind({});
|
|
39
|
+
Default.args = {
|
|
40
|
+
content: 'Click Button!',
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export default metadata;
|
|
44
|
+
export { Default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Popover } from './Popover';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import QRCode from 'qrcode.react';
|
|
3
|
+
import CashubLogoOnly from '../assets/images/cashub-logo-only.png';
|
|
4
|
+
|
|
5
|
+
const QRCodeBox = ({ content, options = {} }) => {
|
|
6
|
+
return (
|
|
7
|
+
<Wrapper>
|
|
8
|
+
<Container>
|
|
9
|
+
<QRCode
|
|
10
|
+
value={content}
|
|
11
|
+
size={300}
|
|
12
|
+
imageSettings={{
|
|
13
|
+
src: CashubLogoOnly,
|
|
14
|
+
x: null,
|
|
15
|
+
y: null,
|
|
16
|
+
height: 40,
|
|
17
|
+
width: 40,
|
|
18
|
+
excavate: true,
|
|
19
|
+
}}
|
|
20
|
+
/>
|
|
21
|
+
|
|
22
|
+
{options.text && <Text>{options.text}</Text>}
|
|
23
|
+
</Container>
|
|
24
|
+
|
|
25
|
+
{options.message && <Message>{options.message}</Message>}
|
|
26
|
+
</Wrapper>
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const Wrapper = styled.div`
|
|
31
|
+
color: var(--font-on-background);
|
|
32
|
+
text-align: center;
|
|
33
|
+
font-weight: var(--font-bold);
|
|
34
|
+
`;
|
|
35
|
+
|
|
36
|
+
const Container = styled.div`
|
|
37
|
+
display: inline-block;
|
|
38
|
+
padding: var(--spacing);
|
|
39
|
+
background: #fff;
|
|
40
|
+
border-radius: var(--border-radius);
|
|
41
|
+
`;
|
|
42
|
+
|
|
43
|
+
const Text = styled.p`
|
|
44
|
+
margin-top: var(--spacing-s);
|
|
45
|
+
font-size: var(--font-h3);
|
|
46
|
+
color: #000;
|
|
47
|
+
`;
|
|
48
|
+
|
|
49
|
+
const Message = styled.p`
|
|
50
|
+
margin-top: var(--spacing);
|
|
51
|
+
font-size: var(--font-h2);
|
|
52
|
+
`;
|
|
53
|
+
|
|
54
|
+
export default QRCodeBox;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
const QRCodeContainter = ({ src, alt }) => {
|
|
4
|
+
return (
|
|
5
|
+
<Figure>
|
|
6
|
+
<Image src={src} alt={alt} />
|
|
7
|
+
</Figure>
|
|
8
|
+
);
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const Figure = styled.figure`
|
|
12
|
+
height: 240px;
|
|
13
|
+
padding: var(--spacing-s);
|
|
14
|
+
text-align: center;
|
|
15
|
+
border: var(--border-width) solid var(--border-color);
|
|
16
|
+
border-radius: var(--border-radius);
|
|
17
|
+
`;
|
|
18
|
+
|
|
19
|
+
const Image = styled.img`
|
|
20
|
+
height: 100%;
|
|
21
|
+
object-fit: contain;
|
|
22
|
+
border-radius: var(--border-radius);
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
export default QRCodeContainter;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import QRCode from '../QRCode';
|
|
2
|
+
|
|
3
|
+
const metadata = {
|
|
4
|
+
title: 'QRcode/QRCode',
|
|
5
|
+
component: QRCode,
|
|
6
|
+
argTypes: {
|
|
7
|
+
content: {
|
|
8
|
+
description: 'content include url and key,it is a object data',
|
|
9
|
+
control: 'object',
|
|
10
|
+
},
|
|
11
|
+
options: {
|
|
12
|
+
description: 'options include text and message,it is a object data',
|
|
13
|
+
control: 'object',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const Template = (args) => {
|
|
19
|
+
const data = {
|
|
20
|
+
url: 'http://localhost:10085/kitting',
|
|
21
|
+
key: '172017257412',
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
return <QRCode {...args} content={JSON.stringify(data)} />;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const Default = Template.bind({});
|
|
28
|
+
Default.args = {
|
|
29
|
+
options: {
|
|
30
|
+
text: '172017257412',
|
|
31
|
+
message: 'Scan the merchant QR Code for kitting',
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export default metadata;
|
|
36
|
+
export { Default };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import QRCodeContainter from '../QRCodeContainter';
|
|
2
|
+
import QRcode from '../../assets/images/qrcode.png';
|
|
3
|
+
|
|
4
|
+
const metadata = {
|
|
5
|
+
title: 'QRcode/QRCodeContainter',
|
|
6
|
+
component: QRCodeContainter,
|
|
7
|
+
argTypes: {
|
|
8
|
+
src: {
|
|
9
|
+
description: 'image',
|
|
10
|
+
control: { type: 'file', accept: '.png,.jpg,.jpeg,.bmp' },
|
|
11
|
+
},
|
|
12
|
+
alt: {
|
|
13
|
+
description:
|
|
14
|
+
'The required alt attribute specifies an alternate text for an image, if the image cannot be displayed.',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const Template = (args) => {
|
|
20
|
+
return <QRCodeContainter {...args} alt='picture' />;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const Default = Template.bind({});
|
|
24
|
+
Default.args = {
|
|
25
|
+
src: [`${QRcode}`],
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default metadata;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import backgroundColor from '../styles/mixin/backgroundColor';
|
|
3
|
+
import colorOnBackground from '../styles/mixin/colorOnBackground';
|
|
4
|
+
|
|
5
|
+
const Ribbon = styled.div`
|
|
6
|
+
width: 120px;
|
|
7
|
+
height: 120px;
|
|
8
|
+
position: absolute;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
top: -3px;
|
|
11
|
+
left: -3px;
|
|
12
|
+
`;
|
|
13
|
+
|
|
14
|
+
const RibbonContent = styled.span`
|
|
15
|
+
position: absolute;
|
|
16
|
+
text-transform: uppercase;
|
|
17
|
+
text-align: center;
|
|
18
|
+
display: block;
|
|
19
|
+
width: 200px;
|
|
20
|
+
transform: rotate(-45deg);
|
|
21
|
+
top: 25px;
|
|
22
|
+
right: -25px;
|
|
23
|
+
padding: 5px 0;
|
|
24
|
+
|
|
25
|
+
&::before,
|
|
26
|
+
&::after {
|
|
27
|
+
display: block;
|
|
28
|
+
content: '';
|
|
29
|
+
border: 1px solid rgba(255, 255, 255, 0.4);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
${backgroundColor}
|
|
33
|
+
${colorOnBackground}
|
|
34
|
+
`;
|
|
35
|
+
|
|
36
|
+
export default Object.assign(Ribbon, {
|
|
37
|
+
Content: RibbonContent,
|
|
38
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import Ribbon from '../Ribbon';
|
|
2
|
+
|
|
3
|
+
const metadata = {
|
|
4
|
+
title: 'Ribbon/Ribbon',
|
|
5
|
+
component: Ribbon,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const Template = (args) => (
|
|
9
|
+
<Ribbon>
|
|
10
|
+
<Ribbon.Content danger {...args}>
|
|
11
|
+
Disabled
|
|
12
|
+
</Ribbon.Content>
|
|
13
|
+
</Ribbon>
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
const Default = Template.bind({});
|
|
17
|
+
Default.args = {
|
|
18
|
+
primary: false,
|
|
19
|
+
success: false,
|
|
20
|
+
warning: false,
|
|
21
|
+
danger: true,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default metadata;
|
|
25
|
+
export { Default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Ribbon } from './Ribbon';
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import bgChartTriangle from '../assets/images/bg-chart-triangle.png';
|
|
3
|
+
import bgChartCircle from '../assets/images/bg-chart-circle.png';
|
|
4
|
+
import bgMap from '../assets/images/map.png';
|
|
5
|
+
|
|
6
|
+
const Section = styled.div`
|
|
7
|
+
background: var(--color-background1);
|
|
8
|
+
border-radius: var(--border-radius);
|
|
9
|
+
color: var(--font-on-background);
|
|
10
|
+
padding: var(--spacing);
|
|
11
|
+
margin-bottom: var(--spacing);
|
|
12
|
+
|
|
13
|
+
${({ backgroundReverse }) =>
|
|
14
|
+
backgroundReverse && 'background: var(--color-background2);'}
|
|
15
|
+
|
|
16
|
+
${({ paddingS }) => paddingS && 'padding: var(--spacing-s);'}
|
|
17
|
+
|
|
18
|
+
${({ paddingXS }) => paddingXS && 'padding: var(--spacing-xs);'}
|
|
19
|
+
|
|
20
|
+
${({ noPadding }) => noPadding && 'padding: 0;'}
|
|
21
|
+
|
|
22
|
+
${({ noPaddingX }) => noPaddingX && 'padding-left: 0; padding-right: 0;'}
|
|
23
|
+
|
|
24
|
+
${({ noPaddingTop }) => noPaddingTop && 'padding-top: 0;'}
|
|
25
|
+
|
|
26
|
+
${({ noPaddingBottom }) => noPaddingBottom && 'padding-bottom: 0;'}
|
|
27
|
+
|
|
28
|
+
${({ marginBottomS }) => marginBottomS && 'margin-bottom: var(--spacing-s);'}
|
|
29
|
+
|
|
30
|
+
${({ noMarginBottom }) => noMarginBottom && 'margin-bottom: 0;'}
|
|
31
|
+
|
|
32
|
+
${({ fullHeight }) => fullHeight && 'height: calc(100% - var(--spacing));'}
|
|
33
|
+
|
|
34
|
+
${({ backgroundMarker }) =>
|
|
35
|
+
backgroundMarker &&
|
|
36
|
+
`
|
|
37
|
+
background: var(--color-background2);
|
|
38
|
+
background-image: url(${bgChartCircle}), url(${bgChartTriangle});
|
|
39
|
+
background-repeat: no-repeat;
|
|
40
|
+
background-position: left top, right bottom;
|
|
41
|
+
background-size: 337px 312px, 166px 225px;
|
|
42
|
+
`}
|
|
43
|
+
|
|
44
|
+
${({ backgroundMap }) =>
|
|
45
|
+
backgroundMap &&
|
|
46
|
+
`
|
|
47
|
+
background: var(--color-background2);
|
|
48
|
+
background-image: url(${bgMap});
|
|
49
|
+
background-repeat: no-repeat;
|
|
50
|
+
background-size: cover;
|
|
51
|
+
`}
|
|
52
|
+
|
|
53
|
+
${({ border }) =>
|
|
54
|
+
border && 'border: var(--border-width) solid var(--border-color);'}
|
|
55
|
+
|
|
56
|
+
${({ checkboxGroup }) =>
|
|
57
|
+
checkboxGroup &&
|
|
58
|
+
`
|
|
59
|
+
background: transparent;
|
|
60
|
+
width: 50%;
|
|
61
|
+
margin-left: auto;
|
|
62
|
+
margin-right: auto;
|
|
63
|
+
`}
|
|
64
|
+
`;
|
|
65
|
+
|
|
66
|
+
export default Section;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import scrollbar from '../styles/mixin/scrollbar';
|
|
3
|
+
import media from '../styles/mixin/media';
|
|
4
|
+
|
|
5
|
+
const SectionBody = styled.div`
|
|
6
|
+
// fix: overflow element(relate to z-index problem)
|
|
7
|
+
// position: relative;
|
|
8
|
+
background: transparent;
|
|
9
|
+
padding: var(--spacing) 0 0 0;
|
|
10
|
+
|
|
11
|
+
${({ noPadding }) => noPadding && 'padding: 0;'}
|
|
12
|
+
|
|
13
|
+
${({ maxHeight }) =>
|
|
14
|
+
maxHeight &&
|
|
15
|
+
css`
|
|
16
|
+
max-height: ${maxHeight}px;
|
|
17
|
+
overflow-y: auto;
|
|
18
|
+
overflow-x: hidden;
|
|
19
|
+
${scrollbar}
|
|
20
|
+
`}
|
|
21
|
+
|
|
22
|
+
${({ maxHeightLaptop }) =>
|
|
23
|
+
maxHeightLaptop &&
|
|
24
|
+
css`
|
|
25
|
+
${media.laptop`
|
|
26
|
+
max-height: ${maxHeightLaptop}px;
|
|
27
|
+
overflow-y: auto;
|
|
28
|
+
overflow-x: hidden;
|
|
29
|
+
${scrollbar}
|
|
30
|
+
`}
|
|
31
|
+
`}
|
|
32
|
+
`;
|
|
33
|
+
|
|
34
|
+
export default SectionBody;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import headerStyle from '../styles/config/header.style';
|
|
3
|
+
|
|
4
|
+
const SectionHeader = styled.div`
|
|
5
|
+
background: transparent;
|
|
6
|
+
padding: 0;
|
|
7
|
+
margin-bottom: calc(var(--spacing-s) * -1);
|
|
8
|
+
|
|
9
|
+
> * {
|
|
10
|
+
padding-bottom: var(--spacing-s);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
${({ inline }) =>
|
|
14
|
+
inline &&
|
|
15
|
+
css`
|
|
16
|
+
display: flex;
|
|
17
|
+
justify-content: space-between;
|
|
18
|
+
align-items: center;
|
|
19
|
+
`}
|
|
20
|
+
|
|
21
|
+
${({ flexStart }) => flexStart && 'justify-content: flex-start;'}
|
|
22
|
+
|
|
23
|
+
${({ border }) =>
|
|
24
|
+
border && 'border-bottom: var(--border-width) solid var(--border-color);'}
|
|
25
|
+
|
|
26
|
+
${({ backgroundFill }) =>
|
|
27
|
+
backgroundFill && 'background: var(--color-background1);'}
|
|
28
|
+
|
|
29
|
+
${({ backgroundReverse }) => {
|
|
30
|
+
return backgroundReverse && 'background: var(--color-background2);';
|
|
31
|
+
}}
|
|
32
|
+
|
|
33
|
+
${({ sticky }) =>
|
|
34
|
+
sticky &&
|
|
35
|
+
`position: sticky;
|
|
36
|
+
z-index:20;
|
|
37
|
+
top: ${headerStyle.height};
|
|
38
|
+
`}
|
|
39
|
+
`;
|
|
40
|
+
|
|
41
|
+
export default SectionHeader;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
const SectionToolbar = styled.div`
|
|
4
|
+
display: flex;
|
|
5
|
+
justify-content: space-between;
|
|
6
|
+
align-items: center;
|
|
7
|
+
|
|
8
|
+
> *:not(:first-child) {
|
|
9
|
+
margin-left: var(--spacing-s);
|
|
10
|
+
}
|
|
11
|
+
`;
|
|
12
|
+
|
|
13
|
+
export default SectionToolbar;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import Section from '../Section';
|
|
2
|
+
|
|
3
|
+
const metadata = {
|
|
4
|
+
title: 'Section/Section',
|
|
5
|
+
component: Section,
|
|
6
|
+
decorators: [
|
|
7
|
+
(Story) => (
|
|
8
|
+
<div style={{ color: 'white' }}>
|
|
9
|
+
<Story />
|
|
10
|
+
</div>
|
|
11
|
+
),
|
|
12
|
+
],
|
|
13
|
+
argTypes: {
|
|
14
|
+
backgroundMarker: {
|
|
15
|
+
description: 'background insert image',
|
|
16
|
+
},
|
|
17
|
+
backgroundMap: {
|
|
18
|
+
description: 'background insert image',
|
|
19
|
+
},
|
|
20
|
+
checkboxGroup: {
|
|
21
|
+
description: 'for checkbox element, width=50%,center space ',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const Template = (args) => {
|
|
27
|
+
return (
|
|
28
|
+
<div style={{ border: '1px solid #000' }}>
|
|
29
|
+
<Section {...args}></Section>
|
|
30
|
+
</div>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const Default = Template.bind({});
|
|
35
|
+
Default.args = {
|
|
36
|
+
backgroundReverse: false,
|
|
37
|
+
paddingS: false,
|
|
38
|
+
noPadding: false,
|
|
39
|
+
noPaddingX: false,
|
|
40
|
+
noPaddingTop: false,
|
|
41
|
+
noPaddingBottom: false,
|
|
42
|
+
marginBottomS: false,
|
|
43
|
+
noMarginBottom: false,
|
|
44
|
+
fullHeight: false,
|
|
45
|
+
backgroundMarker: false,
|
|
46
|
+
backgroundMap: false,
|
|
47
|
+
border: false,
|
|
48
|
+
checkboxGroup: false,
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export default metadata;
|
|
52
|
+
export { Default };
|