@cashub/ui 0.22.8 → 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 +4 -3
- 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,60 @@
|
|
|
1
|
+
import { useState, useEffect } from 'react';
|
|
2
|
+
import InputSelect from '../InputSelect';
|
|
3
|
+
|
|
4
|
+
const metadata = {
|
|
5
|
+
title: 'Select / InputSelect',
|
|
6
|
+
component: InputSelect,
|
|
7
|
+
argTypes: {
|
|
8
|
+
options: {
|
|
9
|
+
description: 'A list of options that allows a user to select',
|
|
10
|
+
},
|
|
11
|
+
value: {
|
|
12
|
+
description: 'Filled in or selected value',
|
|
13
|
+
},
|
|
14
|
+
disabled: {
|
|
15
|
+
description:
|
|
16
|
+
'Indicates that the user can or can not interact with the element',
|
|
17
|
+
},
|
|
18
|
+
onSelect: {
|
|
19
|
+
description: 'A callback that trigger when select a option',
|
|
20
|
+
},
|
|
21
|
+
onChange: {
|
|
22
|
+
description: 'A callback that trigger when change input value',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const Default = ({ value, onChange, onSelect, ...args }) => {
|
|
28
|
+
const [localValue, setLocalValue] = useState(value);
|
|
29
|
+
|
|
30
|
+
const handleChange = (event) => {
|
|
31
|
+
setLocalValue(event.target.value);
|
|
32
|
+
onChange(event);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const handleSelect = (value) => {
|
|
36
|
+
setLocalValue(value);
|
|
37
|
+
onSelect(value);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
setLocalValue(value);
|
|
42
|
+
}, [value]);
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<InputSelect
|
|
46
|
+
{...args}
|
|
47
|
+
value={localValue}
|
|
48
|
+
onChange={handleChange}
|
|
49
|
+
onSelect={handleSelect}
|
|
50
|
+
/>
|
|
51
|
+
);
|
|
52
|
+
};
|
|
53
|
+
Default.args = {
|
|
54
|
+
options: [{ package_name: '1' }, { package_name: '2' }],
|
|
55
|
+
value: '',
|
|
56
|
+
disabled: false,
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export default metadata;
|
|
60
|
+
export { Default };
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import { Select } from '../';
|
|
3
|
+
|
|
4
|
+
const metadata = {
|
|
5
|
+
title: 'Select / Select',
|
|
6
|
+
component: Select,
|
|
7
|
+
argTypes: {
|
|
8
|
+
options: {
|
|
9
|
+
description:
|
|
10
|
+
'Array of object, each object include id and text properties',
|
|
11
|
+
},
|
|
12
|
+
selected: {
|
|
13
|
+
description: 'Current selected option',
|
|
14
|
+
},
|
|
15
|
+
onSelect: {
|
|
16
|
+
description: "A callback that return new selected option's id",
|
|
17
|
+
control: {
|
|
18
|
+
action: 'onSelect',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
onDeselect: {
|
|
22
|
+
description: "A callback that return unselect option's id",
|
|
23
|
+
},
|
|
24
|
+
multiple: {
|
|
25
|
+
description: 'Enable or disable multiple selection feature',
|
|
26
|
+
},
|
|
27
|
+
allowClear: {
|
|
28
|
+
description: 'Allow clear selected option or not',
|
|
29
|
+
},
|
|
30
|
+
allowSearch: {
|
|
31
|
+
description: 'Enable or disable search option feature',
|
|
32
|
+
},
|
|
33
|
+
disabled: {
|
|
34
|
+
description: 'Disable select component',
|
|
35
|
+
},
|
|
36
|
+
placeholder: {
|
|
37
|
+
description:
|
|
38
|
+
'Text that appears in the input when it has no option selected',
|
|
39
|
+
},
|
|
40
|
+
fullWidth: {
|
|
41
|
+
description: 'Style variant',
|
|
42
|
+
},
|
|
43
|
+
large: {
|
|
44
|
+
description: 'Style variant',
|
|
45
|
+
},
|
|
46
|
+
fill: {
|
|
47
|
+
description: 'Style variant',
|
|
48
|
+
},
|
|
49
|
+
fillReverse: {
|
|
50
|
+
description: 'Style variant',
|
|
51
|
+
},
|
|
52
|
+
onBlur: {
|
|
53
|
+
description: 'A callback, called when the Select panel is closed',
|
|
54
|
+
},
|
|
55
|
+
enableSelectAll: {
|
|
56
|
+
description: 'Enable select all function',
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const Default = ({ onSelect, onDeselect, ...args }) => {
|
|
62
|
+
const [data, setData] = useState(args.multiple ? [] : '');
|
|
63
|
+
|
|
64
|
+
const handleChangeOnDeselectValue = (value) => {
|
|
65
|
+
onDeselect(value);
|
|
66
|
+
|
|
67
|
+
setData((previousData) => {
|
|
68
|
+
const newData = [...previousData];
|
|
69
|
+
const index = newData.indexOf(value);
|
|
70
|
+
if (index > -1) {
|
|
71
|
+
newData.splice(index, 1);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return newData;
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const handleChangeOnSelectValue = (value) => {
|
|
79
|
+
onSelect(value);
|
|
80
|
+
if (args.multiple) {
|
|
81
|
+
if (!data.includes(value)) {
|
|
82
|
+
setData((previousData) => {
|
|
83
|
+
return [...previousData, value];
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
} else {
|
|
87
|
+
setData(value);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
useEffect(() => {
|
|
92
|
+
if (args.multiple) {
|
|
93
|
+
setData([]);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (!args.multiple) {
|
|
97
|
+
setData('');
|
|
98
|
+
}
|
|
99
|
+
}, [args.multiple]);
|
|
100
|
+
|
|
101
|
+
return (
|
|
102
|
+
<>
|
|
103
|
+
<Select
|
|
104
|
+
{...args}
|
|
105
|
+
selected={data}
|
|
106
|
+
onSelect={(option) => handleChangeOnSelectValue(option)}
|
|
107
|
+
onDeselect={(option) => handleChangeOnDeselectValue(option)}
|
|
108
|
+
/>
|
|
109
|
+
</>
|
|
110
|
+
);
|
|
111
|
+
};
|
|
112
|
+
Default.args = {
|
|
113
|
+
options: [
|
|
114
|
+
{ id: 1, text: 'option 1' },
|
|
115
|
+
{ id: 2, text: 'option 2' },
|
|
116
|
+
{ id: 3, text: 'option 3' },
|
|
117
|
+
{ id: 4, text: 'option 4' },
|
|
118
|
+
],
|
|
119
|
+
multiple: true,
|
|
120
|
+
allowClear: false,
|
|
121
|
+
allowSearch: true,
|
|
122
|
+
disabled: false,
|
|
123
|
+
placeholder: '',
|
|
124
|
+
fullWidth: false,
|
|
125
|
+
large: false,
|
|
126
|
+
fill: false,
|
|
127
|
+
fillReverse: false,
|
|
128
|
+
enableSelectAll: true,
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
export default metadata;
|
|
132
|
+
export { Default };
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { render, screen, fireEvent } from '@testing-library/react';
|
|
2
|
+
import Select from '../Select';
|
|
3
|
+
import userEvent from '@testing-library/user-event';
|
|
4
|
+
|
|
5
|
+
describe('Test Select component', () => {
|
|
6
|
+
const options = [
|
|
7
|
+
{ id: 'data1', text: 'data1' },
|
|
8
|
+
{ id: 'data2', text: 'data2' },
|
|
9
|
+
{ id: 'data3', text: 'data3' },
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
test('click select can show dropDown list', () => {
|
|
13
|
+
render(<Select options={options} selected='' />);
|
|
14
|
+
const select = screen.getByRole('combobox');
|
|
15
|
+
expect(select).toBeInTheDocument();
|
|
16
|
+
|
|
17
|
+
const dropDownHidden = screen.queryByRole('listbox');
|
|
18
|
+
expect(dropDownHidden).toBe(null);
|
|
19
|
+
|
|
20
|
+
userEvent.click(select);
|
|
21
|
+
const dropDown = screen.getByRole('listbox');
|
|
22
|
+
expect(dropDown).toHaveStyle('visibility: visible');
|
|
23
|
+
expect(dropDown).toBeVisible();
|
|
24
|
+
|
|
25
|
+
// 選項
|
|
26
|
+
const optionsItem1 = screen.getByText('data1', { selector: 'div' });
|
|
27
|
+
const optionsItem2 = screen.getByText('data2', { selector: 'div' });
|
|
28
|
+
const optionsItem3 = screen.getByText('data3', { selector: 'div' });
|
|
29
|
+
const searchInput = screen.getByPlaceholderText('Search', {
|
|
30
|
+
selector: 'input',
|
|
31
|
+
});
|
|
32
|
+
expect(optionsItem1).toBeVisible();
|
|
33
|
+
expect(optionsItem2).toBeVisible();
|
|
34
|
+
expect(optionsItem3).toBeVisible();
|
|
35
|
+
expect(searchInput).toBeVisible();
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
test('click a option can show selected value for single choice', () => {
|
|
39
|
+
const handleOnSelect = jest.fn();
|
|
40
|
+
let selected = '';
|
|
41
|
+
handleOnSelect.mockImplementation((value) => {
|
|
42
|
+
selected = value;
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
const { rerender } = render(
|
|
46
|
+
<Select
|
|
47
|
+
options={options}
|
|
48
|
+
onSelect={handleOnSelect}
|
|
49
|
+
selected=''
|
|
50
|
+
placeholder='pls choice'
|
|
51
|
+
/>,
|
|
52
|
+
);
|
|
53
|
+
const select = screen.getByRole('combobox');
|
|
54
|
+
expect(select).toHaveTextContent('pls choice');
|
|
55
|
+
|
|
56
|
+
userEvent.click(select);
|
|
57
|
+
const dropDown = screen.getByRole('listbox');
|
|
58
|
+
expect(dropDown).toBeVisible();
|
|
59
|
+
const optionsList = screen.getAllByRole('option');
|
|
60
|
+
expect(optionsList).toHaveLength(3);
|
|
61
|
+
|
|
62
|
+
userEvent.click(optionsList[0]);
|
|
63
|
+
|
|
64
|
+
rerender(
|
|
65
|
+
<Select
|
|
66
|
+
options={options}
|
|
67
|
+
onSelect={handleOnSelect}
|
|
68
|
+
selected={selected}
|
|
69
|
+
placeholder='pls choice'
|
|
70
|
+
/>,
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
expect(select).toHaveTextContent(options[0].text);
|
|
74
|
+
|
|
75
|
+
expect(handleOnSelect).toHaveBeenCalledTimes(1);
|
|
76
|
+
const dropDownHidden = screen.queryByRole('listbox', { name: 'dropDown' });
|
|
77
|
+
expect(dropDownHidden).toBe(null);
|
|
78
|
+
expect(select).toHaveFocus();
|
|
79
|
+
|
|
80
|
+
rerender(
|
|
81
|
+
<Select
|
|
82
|
+
options={options}
|
|
83
|
+
selected={options[0].id}
|
|
84
|
+
onSelect={handleOnSelect}
|
|
85
|
+
placeholder='pls choice'
|
|
86
|
+
/>,
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
expect(optionsList[0]).toHaveStyle({ background: 'var(--color-hover)' });
|
|
90
|
+
expect(optionsList[1]).toHaveStyle({
|
|
91
|
+
background: 'var(--color-background1)',
|
|
92
|
+
});
|
|
93
|
+
expect(select).toHaveTextContent(options[0].text);
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
test('on blur hide options', () => {
|
|
97
|
+
render(<Select options={options} selected='' />);
|
|
98
|
+
const select = screen.getByRole('combobox');
|
|
99
|
+
|
|
100
|
+
userEvent.click(select);
|
|
101
|
+
const dropDown = screen.queryByRole('listbox');
|
|
102
|
+
expect(dropDown).toHaveStyle('visibility: visible');
|
|
103
|
+
expect(dropDown).toBeVisible();
|
|
104
|
+
|
|
105
|
+
userEvent.click(document.body);
|
|
106
|
+
expect(dropDown).toHaveStyle('visibility: hidden');
|
|
107
|
+
expect(dropDown).not.toBeVisible();
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
test('disabled', () => {
|
|
111
|
+
render(<Select disabled={true} options={options} selected='' />);
|
|
112
|
+
expect(screen.getByRole('combobox')).toHaveStyle('cursor: not-allowed');
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
test('select can supports onSelect and onDeselect for multiple choice', () => {
|
|
116
|
+
let selectValue = [];
|
|
117
|
+
|
|
118
|
+
const handleOnSelect = jest.fn();
|
|
119
|
+
handleOnSelect.mockImplementation((value) => {
|
|
120
|
+
if (!selectValue.includes(value)) {
|
|
121
|
+
selectValue = [...selectValue, value];
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
const handleDeSelect = jest.fn();
|
|
126
|
+
handleDeSelect.mockImplementation((value) => {
|
|
127
|
+
const index = selectValue.indexOf(value);
|
|
128
|
+
if (index > -1) {
|
|
129
|
+
selectValue.splice(index, 1);
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
const { rerender } = render(
|
|
134
|
+
<Select
|
|
135
|
+
options={options}
|
|
136
|
+
selected={selectValue}
|
|
137
|
+
multiple={true}
|
|
138
|
+
onSelect={handleOnSelect}
|
|
139
|
+
onDeselect={handleDeSelect}
|
|
140
|
+
/>,
|
|
141
|
+
);
|
|
142
|
+
const select = screen.getByRole('combobox');
|
|
143
|
+
expect(select).toBeInTheDocument();
|
|
144
|
+
|
|
145
|
+
const dropDownHidden = screen.queryByRole('listbox');
|
|
146
|
+
expect(dropDownHidden).toBe(null);
|
|
147
|
+
|
|
148
|
+
userEvent.click(select);
|
|
149
|
+
const dropDown = screen.getByRole('listbox');
|
|
150
|
+
expect(dropDown).toHaveStyle('visibility: visible');
|
|
151
|
+
expect(dropDown).toBeVisible();
|
|
152
|
+
|
|
153
|
+
const optionsList = screen.getAllByRole('option');
|
|
154
|
+
expect(optionsList[0]).toBeVisible();
|
|
155
|
+
// 選擇一筆
|
|
156
|
+
userEvent.click(optionsList[1]);
|
|
157
|
+
expect(dropDownHidden).toBe(null);
|
|
158
|
+
|
|
159
|
+
rerender(
|
|
160
|
+
<Select
|
|
161
|
+
options={options}
|
|
162
|
+
selected={selectValue}
|
|
163
|
+
multiple={true}
|
|
164
|
+
onSelect={handleOnSelect}
|
|
165
|
+
onDeselect={handleDeSelect}
|
|
166
|
+
/>,
|
|
167
|
+
);
|
|
168
|
+
|
|
169
|
+
expect(handleOnSelect).toHaveBeenCalledTimes(1);
|
|
170
|
+
expect(handleDeSelect).toHaveBeenCalledTimes(0);
|
|
171
|
+
expect(select).toHaveTextContent(options[1].text);
|
|
172
|
+
expect(select).toHaveFocus();
|
|
173
|
+
|
|
174
|
+
const selectedOption = screen.getAllByTestId('removeOption');
|
|
175
|
+
// 刪除一筆
|
|
176
|
+
userEvent.click(selectedOption[0]);
|
|
177
|
+
|
|
178
|
+
rerender(
|
|
179
|
+
<Select
|
|
180
|
+
options={options}
|
|
181
|
+
selected={selectValue}
|
|
182
|
+
multiple={true}
|
|
183
|
+
onSelect={handleOnSelect}
|
|
184
|
+
onDeselect={handleDeSelect}
|
|
185
|
+
/>,
|
|
186
|
+
);
|
|
187
|
+
expect(handleDeSelect).toHaveBeenCalledTimes(1);
|
|
188
|
+
expect(select).not.toHaveTextContent('');
|
|
189
|
+
expect(select).toHaveFocus();
|
|
190
|
+
});
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
describe('testing SearchBox component', () => {
|
|
194
|
+
const options = [
|
|
195
|
+
{ id: '1', text: 'data1' },
|
|
196
|
+
{ id: '2', text: 'data2' },
|
|
197
|
+
{ id: '3', text: 'data3' },
|
|
198
|
+
];
|
|
199
|
+
|
|
200
|
+
test('SearchBox can type letters', () => {
|
|
201
|
+
render(<Select options={options} selected='' />);
|
|
202
|
+
const SearchBox = screen.getByPlaceholderText('Search');
|
|
203
|
+
expect(SearchBox).toBeInTheDocument();
|
|
204
|
+
|
|
205
|
+
userEvent.type(SearchBox, 'data1');
|
|
206
|
+
expect(SearchBox).toHaveValue('data1');
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
test('keyUp letters can render option', () => {
|
|
210
|
+
render(<Select options={options} selected='' />);
|
|
211
|
+
const SearchBox = screen.getByPlaceholderText('Search');
|
|
212
|
+
fireEvent.change(SearchBox, { target: { value: 'data' } });
|
|
213
|
+
|
|
214
|
+
fireEvent.keyUp(SearchBox, { key: 'Enter', keyCode: 13 || 108 });
|
|
215
|
+
|
|
216
|
+
const optionsList = screen.getAllByRole('option');
|
|
217
|
+
expect(optionsList).toHaveLength(3);
|
|
218
|
+
});
|
|
219
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
const ListBox = styled.div`
|
|
4
|
+
visibility: ${({ $display }) => ($display ? 'visible' : 'hidden')};
|
|
5
|
+
background: var(--color-background1);
|
|
6
|
+
color: var(--font-on-background);
|
|
7
|
+
border: var(--border-width) solid var(--border-color);
|
|
8
|
+
border-radius: var(--border-radius);
|
|
9
|
+
box-shadow: var(--box-shadow);
|
|
10
|
+
width: ${({ width }) => width}px;
|
|
11
|
+
z-index: 31;
|
|
12
|
+
`;
|
|
13
|
+
ListBox.displayName = 'ListBox';
|
|
14
|
+
|
|
15
|
+
export default ListBox;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
|
|
3
|
+
const Option = styled.div`
|
|
4
|
+
max-width: 100%;
|
|
5
|
+
word-break: break-all;
|
|
6
|
+
padding: 12px var(--spacing-s);
|
|
7
|
+
background: var(--color-background1);
|
|
8
|
+
transition: background 0.3s;
|
|
9
|
+
|
|
10
|
+
&:hover {
|
|
11
|
+
background: var(--color-hover);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
${({ selected, focus }) =>
|
|
15
|
+
(selected || focus) &&
|
|
16
|
+
css`
|
|
17
|
+
background: var(--color-hover);
|
|
18
|
+
`}
|
|
19
|
+
`;
|
|
20
|
+
Option.displayName = 'Option';
|
|
21
|
+
|
|
22
|
+
export default Option;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
const OptionGroup = styled.div`
|
|
4
|
+
[role='presentation'] {
|
|
5
|
+
font-weight: bold;
|
|
6
|
+
|
|
7
|
+
&:hover {
|
|
8
|
+
background: var(--color-background1);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
[role='option'] {
|
|
13
|
+
padding-left: calc(var(--spacing-s) * 2);
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
16
|
+
OptionGroup.displayName = 'OptionGroup';
|
|
17
|
+
|
|
18
|
+
export default OptionGroup;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import scrollbar from '../../styles/mixin/scrollbar';
|
|
3
|
+
|
|
4
|
+
const Options = styled.div`
|
|
5
|
+
position: relative;
|
|
6
|
+
padding: var(--spacing-xs) 0;
|
|
7
|
+
max-height: min(320px, calc(50vh - 36px - 20px - 36px));
|
|
8
|
+
overflow-y: auto;
|
|
9
|
+
overflow-x: visible;
|
|
10
|
+
border-radius: var(--border-radius);
|
|
11
|
+
|
|
12
|
+
${({ allowSearch }) =>
|
|
13
|
+
allowSearch &&
|
|
14
|
+
`
|
|
15
|
+
padding-top: 0;
|
|
16
|
+
border-top-left-radius: 0;
|
|
17
|
+
border-top-right-radius: 0;
|
|
18
|
+
`}
|
|
19
|
+
|
|
20
|
+
${scrollbar}
|
|
21
|
+
`;
|
|
22
|
+
Options.displayName = 'Options';
|
|
23
|
+
|
|
24
|
+
export default Options;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { forwardRef } from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { GoSearch } from 'react-icons/go';
|
|
4
|
+
import inputPlaceholder from '../../styles/mixin/inputPlaceholder';
|
|
5
|
+
|
|
6
|
+
const SearchBox = forwardRef((props, ref) => {
|
|
7
|
+
const handleClick = (event) => {
|
|
8
|
+
event.stopPropagation();
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<Wrapper onClick={handleClick}>
|
|
13
|
+
<GoSearch />
|
|
14
|
+
<SearchInput type='text' ref={ref} {...props} />
|
|
15
|
+
</Wrapper>
|
|
16
|
+
);
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const Wrapper = styled.div`
|
|
20
|
+
position: relative;
|
|
21
|
+
padding: var(--spacing-xs);
|
|
22
|
+
|
|
23
|
+
> svg {
|
|
24
|
+
color: var(--font-on-mute);
|
|
25
|
+
position: absolute;
|
|
26
|
+
top: 50%;
|
|
27
|
+
transform: translateY(-50%);
|
|
28
|
+
left: calc(var(--spacing-s) + var(--spacing-xs));
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
Wrapper.displayName = 'Wrapper';
|
|
32
|
+
|
|
33
|
+
const SearchInput = styled.input`
|
|
34
|
+
background: var(--color-background1);
|
|
35
|
+
color: var(--font-on-background);
|
|
36
|
+
border-radius: var(--border-radius-l);
|
|
37
|
+
border: var(--border-width) solid var(--border-color);
|
|
38
|
+
outline: none;
|
|
39
|
+
width: 100%;
|
|
40
|
+
padding: 10px var(--spacing-s) 10px calc(var(--spacing-s) * 2 + 8px);
|
|
41
|
+
max-height: 36px;
|
|
42
|
+
|
|
43
|
+
&:disabled {
|
|
44
|
+
cursor: not-allowed;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
${inputPlaceholder`
|
|
48
|
+
color: var(--font-on-mute);
|
|
49
|
+
`}
|
|
50
|
+
`;
|
|
51
|
+
SearchInput.displayName = 'SearchInput';
|
|
52
|
+
|
|
53
|
+
export default SearchBox;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { FaTimes } from 'react-icons/fa';
|
|
3
|
+
|
|
4
|
+
const SelectedMultiple = ({ content, onClick, disabled }) => {
|
|
5
|
+
return (
|
|
6
|
+
<Selected>
|
|
7
|
+
{!disabled && (
|
|
8
|
+
<span onClick={onClick} data-testid='removeOption'>
|
|
9
|
+
<FaTimes />
|
|
10
|
+
</span>
|
|
11
|
+
)}
|
|
12
|
+
{content}
|
|
13
|
+
</Selected>
|
|
14
|
+
);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const Selected = styled.div`
|
|
18
|
+
align-items: center;
|
|
19
|
+
display: flex;
|
|
20
|
+
background: var(--color-background3);
|
|
21
|
+
border-radius: var(--border-radius-l);
|
|
22
|
+
padding: 0.25rem calc(var(--spacing-xs) + 4px);
|
|
23
|
+
margin: 4px 10px 4px 0;
|
|
24
|
+
color: var(--font-on-background);
|
|
25
|
+
font-weight: var(--font-normal);
|
|
26
|
+
word-break: break-all;
|
|
27
|
+
|
|
28
|
+
> span {
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
|
|
32
|
+
> svg {
|
|
33
|
+
margin-right: var(--spacing-xs);
|
|
34
|
+
color: var(--font-on-background);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
`;
|
|
38
|
+
|
|
39
|
+
export default SelectedMultiple;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { createGlobalStyle } from 'styled-components';
|
|
2
|
+
import '../assets/css/global.css';
|
|
3
|
+
|
|
4
|
+
const GlobalStyle = createGlobalStyle`
|
|
5
|
+
body {
|
|
6
|
+
--color-white: ${({ theme }) => theme.colorWhite};
|
|
7
|
+
--color-dark: ${({ theme }) => theme.colorDark};
|
|
8
|
+
--color-grey: ${({ theme }) => theme.colorGrey};
|
|
9
|
+
--color-primary: ${({ theme }) => theme.colorPrimary};
|
|
10
|
+
--color-success: ${({ theme }) => theme.colorSuccess};
|
|
11
|
+
--color-warning: ${({ theme }) => theme.colorWarning};
|
|
12
|
+
--color-danger: ${({ theme }) => theme.colorDanger};
|
|
13
|
+
--color-hover: ${({ theme }) => theme.colorHover};
|
|
14
|
+
--color-active: ${({ theme }) => theme.colorActive};
|
|
15
|
+
--color-scroll-bar: ${({ theme }) => theme.scrollBarColor};
|
|
16
|
+
--color-background1: ${({ theme }) => theme.bgColor1};
|
|
17
|
+
--color-background2: ${({ theme }) => theme.bgColor2};
|
|
18
|
+
--color-background3: ${({ theme }) => theme.bgColor3};
|
|
19
|
+
--color-backdrop: ${({ theme }) => theme.backdropBg};
|
|
20
|
+
|
|
21
|
+
--font-h1: ${({ theme }) => theme.fontH1};
|
|
22
|
+
--font-h2: ${({ theme }) => theme.fontH2};
|
|
23
|
+
--font-h3: ${({ theme }) => theme.fontH3};
|
|
24
|
+
--font-body1: ${({ theme }) => theme.fontBody1};
|
|
25
|
+
--font-body2: ${({ theme }) => theme.fontBody2};
|
|
26
|
+
--font-button: ${({ theme }) => theme.fontButton};
|
|
27
|
+
--font-caption: ${({ theme }) => theme.fontCaption};
|
|
28
|
+
--font-family: ${({ theme }) => theme.fontFamily};
|
|
29
|
+
--font-normal: ${({ theme }) => theme.fontWeightNormal};
|
|
30
|
+
--font-bold: ${({ theme }) => theme.fontWeightBold};
|
|
31
|
+
--font-on-primary: ${({ theme }) => theme.fontOnPrimary};
|
|
32
|
+
--font-on-success: ${({ theme }) => theme.fontOnSuccess};
|
|
33
|
+
--font-on-warning: ${({ theme }) => theme.fontOnWarning};
|
|
34
|
+
--font-on-danger: ${({ theme }) => theme.fontOnDanger};
|
|
35
|
+
--font-on-background: ${({ theme }) => theme.fontOnBg};
|
|
36
|
+
--font-on-mute: ${({ theme }) => theme.fontMutedColor};
|
|
37
|
+
|
|
38
|
+
--box-shadow: ${({ theme }) => theme.boxShadow};
|
|
39
|
+
--border-color: ${({ theme }) => theme.borderColor};
|
|
40
|
+
--border-width: ${({ theme }) => theme.borderWidth};
|
|
41
|
+
--border-radius-s: ${({ theme }) => theme.borderRadiusS};
|
|
42
|
+
--border-radius: ${({ theme }) => theme.borderRadius};
|
|
43
|
+
--border-radius-l: ${({ theme }) => theme.borderRadiusL};
|
|
44
|
+
--border-radius-round: ${({ theme }) => theme.borderRadiusRound};
|
|
45
|
+
|
|
46
|
+
--spacing-xs: ${({ theme }) => theme.spacerXS};
|
|
47
|
+
--spacing-s: ${({ theme }) => theme.spacerS};
|
|
48
|
+
--spacing: ${({ theme }) => theme.spacer};
|
|
49
|
+
--spacing-l: ${({ theme }) => theme.spacerL};
|
|
50
|
+
|
|
51
|
+
background : ${({ theme }) => theme.bgColor1};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.margin-bottom-s {
|
|
55
|
+
margin-bottom: var(--spacing-s);
|
|
56
|
+
}
|
|
57
|
+
`;
|
|
58
|
+
|
|
59
|
+
export default GlobalStyle;
|