diginet-core-ui 1.4.39 → 1.4.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.browserslistrc +6 -0
- package/.eslintrc.js +91 -0
- package/.husky/pre-commit +4 -0
- package/.prettierrc +32 -0
- package/.storybook/main.js +4 -0
- package/.storybook/manager.js +10 -0
- package/.storybook/preview-head.html +17 -0
- package/.storybook/preview.js +36 -0
- package/.storybook/themeDecorator.js +19 -0
- package/babel.config.json +17 -0
- package/bitbucket-pipelines.yml +18 -0
- package/jsconfig.json +8 -0
- package/package.json +78 -44
- package/package.json.tmp +44 -0
- package/postcss.config.js +9 -0
- package/readme.md +5 -0
- package/src/assets/images/menu/dhr/MHRP15N0002.svg +17 -0
- package/src/assets/images/menu/dhr/MHRP15N0003.svg +26 -0
- package/src/components/accordion/context.js +5 -0
- package/src/components/accordion/details.js +80 -0
- package/src/components/accordion/group.js +140 -0
- package/src/components/accordion/index.js +207 -0
- package/src/components/accordion/index.stories.js +278 -0
- package/src/components/accordion/summary.js +380 -0
- package/src/components/alert/index.js +312 -0
- package/src/components/alert/index.stories.js +109 -0
- package/src/components/alert/notify.js +179 -0
- package/src/components/avatar/index.js +472 -0
- package/src/components/avatar/index.stories.js +80 -0
- package/src/components/badge/index.js +307 -0
- package/src/components/badge/index.stories.js +187 -0
- package/src/components/breadcrumb/index.js +280 -0
- package/src/components/breadcrumb/index.stories.js +69 -0
- package/src/components/button/button.stories.js +34 -0
- package/src/components/button/buttonIcon.stories.js +36 -0
- package/src/components/button/buttonMore.stories.js +58 -0
- package/src/components/button/icon.js +468 -0
- package/src/components/button/index.js +582 -0
- package/src/components/button/more.js +249 -0
- package/src/components/button/ripple-effect.js +95 -0
- package/src/components/button/sample.stories.js +194 -0
- package/src/components/card/body.js +73 -0
- package/src/components/card/extra.js +73 -0
- package/src/components/card/footer.js +73 -0
- package/src/components/card/header.js +74 -0
- package/src/components/card/index.js +256 -0
- package/src/components/card/index.stories.js +242 -0
- package/src/components/chart/Pie/Circle.js +68 -0
- package/src/components/chart/Pie/Sector.js +134 -0
- package/src/components/chart/Pie/Sectors.js +96 -0
- package/src/components/chart/Pie/index.js +312 -0
- package/src/components/chart/Pie/index.stories.js +77 -0
- package/src/components/chart/Pie-v2/Circle.js +62 -0
- package/src/components/chart/Pie-v2/Sector.js +128 -0
- package/src/components/chart/Pie-v2/Sectors.js +353 -0
- package/src/components/chart/Pie-v2/index.js +499 -0
- package/src/components/chart/Pie-v2/index.stories.js +77 -0
- package/src/components/chart/bar/Axis.js +67 -0
- package/src/components/chart/bar/Bar.js +365 -0
- package/src/components/chart/bar/Grid.js +111 -0
- package/src/components/chart/bar/Labels.js +193 -0
- package/src/components/chart/bar/Points.js +112 -0
- package/src/components/chart/bar/index.js +170 -0
- package/src/components/chart/bar/index.stories.js +174 -0
- package/src/components/chart/bar-v2/Axis.js +67 -0
- package/src/components/chart/bar-v2/Bar.js +372 -0
- package/src/components/chart/bar-v2/Grid.js +111 -0
- package/src/components/chart/bar-v2/Labels.js +193 -0
- package/src/components/chart/bar-v2/Points.js +112 -0
- package/src/components/chart/bar-v2/index.js +170 -0
- package/src/components/chart/bar-v2/index.stories.js +174 -0
- package/src/components/chart/line/Axis.js +68 -0
- package/src/components/chart/line/Grid.js +98 -0
- package/src/components/chart/line/Labels.js +191 -0
- package/src/components/chart/line/Path.js +155 -0
- package/src/components/chart/line/Point.js +358 -0
- package/src/components/chart/line/Title.js +50 -0
- package/src/components/chart/line/index.js +202 -0
- package/src/components/chart/line/index.stories.js +148 -0
- package/src/components/chart/line-v2/Axis.js +66 -0
- package/src/components/chart/line-v2/Grid.js +111 -0
- package/src/components/chart/line-v2/Labels.js +190 -0
- package/src/components/chart/line-v2/Path.js +154 -0
- package/src/components/chart/line-v2/Point.js +336 -0
- package/src/components/chart/line-v2/Title.js +50 -0
- package/src/components/chart/line-v2/index.js +172 -0
- package/src/components/chart/line-v2/index.stories.js +148 -0
- package/src/components/check-text/index.js +168 -0
- package/src/components/check-text/index.stories.js +50 -0
- package/src/components/check-text/interview-confirmation.js +169 -0
- package/src/components/check-text/interview-status.js +142 -0
- package/src/components/chip/attach.js +156 -0
- package/src/components/chip/index.js +366 -0
- package/src/components/chip/index.stories.js +190 -0
- package/src/components/collapse/index.js +104 -0
- package/src/components/collapse/index.stories.js +35 -0
- package/src/components/dialogs/colors.js +13 -0
- package/src/components/divider/index.js +87 -0
- package/src/components/divider/index.stories.js +52 -0
- package/src/components/form-control/attachment/index.js +1770 -0
- package/src/components/form-control/attachment/index.stories.js +106 -0
- package/src/components/form-control/calendar/function.js +959 -0
- package/src/components/form-control/calendar/index.js +413 -0
- package/src/components/form-control/calendar/index.stories.js +40 -0
- package/src/components/form-control/calendar/range.js +329 -0
- package/src/components/form-control/checkbox/index.js +382 -0
- package/src/components/form-control/checkbox/index.stories.js +110 -0
- package/src/components/form-control/control/index.js +99 -0
- package/src/components/form-control/date-input/DateField.js +191 -0
- package/src/components/form-control/date-input/index.js +315 -0
- package/src/components/form-control/date-input/index.stories.js +96 -0
- package/src/components/form-control/date-input/useDateInputState.js +138 -0
- package/src/components/form-control/date-input/useIsFocused.js +25 -0
- package/src/components/form-control/date-input/useKeyboardInputEvent.js +45 -0
- package/src/components/form-control/date-input/utils.js +293 -0
- package/src/components/form-control/date-picker/index.js +429 -0
- package/src/components/form-control/date-picker/index.stories.js +141 -0
- package/src/components/form-control/date-range-picker/index.js +1349 -0
- package/src/components/form-control/date-range-picker/index.stories.js +43 -0
- package/src/components/form-control/dropdown/index.js +1858 -0
- package/src/components/form-control/dropdown/index.stories.js +222 -0
- package/src/components/form-control/dropdown-box/index.js +271 -0
- package/src/components/form-control/dropdown-box/index.stories.js +103 -0
- package/src/components/form-control/form/context.js +5 -0
- package/src/components/form-control/form/index.js +39 -0
- package/src/components/form-control/form-group/index.js +131 -0
- package/src/components/form-control/form-group/index.stories.js +57 -0
- package/src/components/form-control/helper-text/index.js +92 -0
- package/src/components/form-control/helper-text/index.stories.js +29 -0
- package/src/components/form-control/input-base/UncontrolledInputBase.js +499 -0
- package/src/components/form-control/input-base/index.js +706 -0
- package/src/components/form-control/input-base/index.stories.js +69 -0
- package/src/components/form-control/label/index.js +127 -0
- package/src/components/form-control/label/index.stories.js +69 -0
- package/src/components/form-control/money-input/index.js +622 -0
- package/src/components/form-control/money-input/index.stories.js +42 -0
- package/src/components/form-control/number-input/index.js +582 -0
- package/src/components/form-control/number-input/index.stories.js +53 -0
- package/src/components/form-control/number-input/index2.js +531 -0
- package/src/components/form-control/password-input/index.js +259 -0
- package/src/components/form-control/password-input/index.stories.js +32 -0
- package/src/components/form-control/phone-input/index.js +382 -0
- package/src/components/form-control/phone-input/index.stories.js +39 -0
- package/src/components/form-control/radio/index.js +241 -0
- package/src/components/form-control/radio/index.stories.js +51 -0
- package/src/components/form-control/text-input/index.js +254 -0
- package/src/components/form-control/text-input/index.stories.js +60 -0
- package/src/components/form-control/time-picker/index.js +782 -0
- package/src/components/form-control/time-picker/index.mdx +49 -0
- package/src/components/form-control/time-picker/index.stories.js +69 -0
- package/src/components/form-control/time-picker/swiper.js +568 -0
- package/src/components/form-control/time-picker/v2/index.js +785 -0
- package/src/components/form-control/time-picker/v2/index.stories.js +43 -0
- package/src/components/form-control/toggle/index.js +247 -0
- package/src/components/form-control/toggle/index.stories.js +51 -0
- package/src/components/form-view/helper-text.js +30 -0
- package/src/components/form-view/index.js +100 -0
- package/src/components/form-view/index.stories.js +25 -0
- package/src/components/form-view/input.js +134 -0
- package/src/components/form-view/label.js +39 -0
- package/src/components/grid/Col.js +89 -0
- package/src/components/grid/Container.js +99 -0
- package/src/components/grid/Row.js +97 -0
- package/src/components/grid/context.js +5 -0
- package/src/components/grid/index.js +323 -0
- package/src/components/grid/index.stories.js +523 -0
- package/src/components/image/index.js +191 -0
- package/src/components/image/index.stories.js +53 -0
- package/src/components/index.js +157 -0
- package/src/components/list/index.stories.js +261 -0
- package/src/components/list/list-item-action.js +94 -0
- package/src/components/list/list-item-icon.js +89 -0
- package/src/components/list/list-item-text.js +69 -0
- package/src/components/list/list-item.js +131 -0
- package/src/components/list/list.js +164 -0
- package/src/components/list/sub-header.js +79 -0
- package/src/components/modal/body.js +84 -0
- package/src/components/modal/context.js +5 -0
- package/src/components/modal/footer.js +90 -0
- package/src/components/modal/header.js +145 -0
- package/src/components/modal/index.js +59 -0
- package/src/components/modal/index.stories.js +95 -0
- package/src/components/modal/modal.js +330 -0
- package/src/components/others/date/index.stories.js +217 -0
- package/src/components/others/extra/index.js +129 -0
- package/src/components/others/extra/index.mdx +39 -0
- package/src/components/others/extra/index.stories.js +17 -0
- package/src/components/others/import/index.js +66 -0
- package/src/components/others/import/index.stories.js +70 -0
- package/src/components/others/locale/index.stories.js +42 -0
- package/src/components/others/option-wrapper/index.js +34 -0
- package/src/components/others/scrollbar/index.js +106 -0
- package/src/components/others/scrollbar/index.stories.js +68 -0
- package/src/components/others/validate/index.stories.js +113 -0
- package/src/components/paging/index.stories.js +76 -0
- package/src/components/paging/page-info.js +637 -0
- package/src/components/paging/page-selector.js +437 -0
- package/src/components/paper/index.js +128 -0
- package/src/components/paper/index.stories.js +37 -0
- package/src/components/popover/body.js +98 -0
- package/src/components/popover/footer.js +96 -0
- package/src/components/popover/header.js +99 -0
- package/src/components/popover/index.js +718 -0
- package/src/components/popover/index.stories.js +189 -0
- package/src/components/popup/danger_popup.js +196 -0
- package/src/components/popup/index.js +464 -0
- package/src/components/popup/v2/index.js +556 -0
- package/src/components/popup/v2/index.stories.js +113 -0
- package/src/components/progress/circular.js +326 -0
- package/src/components/progress/index.stories.js +51 -0
- package/src/components/progress/linear.js +361 -0
- package/src/components/rating/index.js +309 -0
- package/src/components/rating/index.stories.js +78 -0
- package/src/components/skeleton/index.js +79 -0
- package/src/components/skeleton/index.stories.js +29 -0
- package/src/components/slider/index.stories.js +50 -0
- package/src/components/slider/slider-container.js +415 -0
- package/src/components/slider/slider-item.js +222 -0
- package/src/components/status/index.js +145 -0
- package/src/components/status/index.stories.js +71 -0
- package/src/components/tab/context.js +5 -0
- package/src/components/tab/index.stories.js +123 -0
- package/src/components/tab/tab-container.js +109 -0
- package/src/components/tab/tab-header.js +177 -0
- package/src/components/tab/tab-panel.js +101 -0
- package/src/components/tab/tab.js +249 -0
- package/src/components/tooltip/index.js +580 -0
- package/src/components/tooltip/index.stories.js +282 -0
- package/src/components/tooltip/portal.js +10 -0
- package/src/components/transfer/index.js +555 -0
- package/src/components/transfer/index.stories.js +53 -0
- package/src/components/tree-view/index.js +1085 -0
- package/src/components/tree-view/index.stories.js +347 -0
- package/src/components/typography/index.js +331 -0
- package/src/components/typography/index.stories.js +166 -0
- package/src/docs/changelog/changelog.md +1354 -0
- package/src/docs/changelog/index.stories.js +20 -0
- package/src/global/index.js +247 -0
- package/src/icons/basic.js +5930 -0
- package/src/icons/basic.stories.js +178 -0
- package/src/icons/effect.js +167 -0
- package/src/icons/general/clock/clock.js +16 -0
- package/src/icons/general/color-handler/background.js +34 -0
- package/src/icons/general/color-handler/text.js +34 -0
- package/src/icons/general/emoji/emoji.js +27 -0
- package/src/icons/general/font-properties/bold.js +17 -0
- package/src/icons/general/font-properties/font-family.js +27 -0
- package/src/icons/general/font-properties/font-size.js +24 -0
- package/src/icons/general/font-properties/italic.js +17 -0
- package/src/icons/general/font-properties/underline.js +26 -0
- package/src/icons/general/hyperlink/hyperlink.js +33 -0
- package/src/icons/general/indent/decrease.js +54 -0
- package/src/icons/general/indent/increase.js +54 -0
- package/src/icons/general/index.js +21 -0
- package/src/icons/general/index.mdx +68 -0
- package/src/icons/general/list/bullets.js +76 -0
- package/src/icons/general/list/numbering.js +69 -0
- package/src/icons/general/picture/picture.js +17 -0
- package/src/icons/general/steps/redo.js +17 -0
- package/src/icons/general/steps/undo.js +17 -0
- package/src/icons/general/text-align/center.js +17 -0
- package/src/icons/general/text-align/justify.js +17 -0
- package/src/icons/general/text-align/left.js +17 -0
- package/src/icons/general/text-align/right.js +17 -0
- package/src/icons/index.js +3 -0
- package/src/icons/index.stories.js +22 -0
- package/src/icons/menu/dhr.js +2625 -0
- package/src/icons/menu/erp.js +513 -0
- package/src/icons/menu/index.js +6 -0
- package/src/icons/menu/index.stories.js +107 -0
- package/src/icons/menu/v2/index.js +77 -0
- package/src/icons/menu/v2/index.stories.js +426 -0
- package/src/locale/index.js +13 -0
- package/src/scss/styles.scss +10 -0
- package/src/styles/animation.js +930 -0
- package/src/styles/animations.js +13 -0
- package/src/styles/color-helper.js +364 -0
- package/src/styles/colors.js +504 -0
- package/src/styles/colors.stories.js +105 -0
- package/src/styles/font.js +26 -0
- package/src/styles/general.js +824 -0
- package/src/styles/sx/index.js +35 -0
- package/src/styles/typography.js +181 -0
- package/src/styles/utils.js +35 -0
- package/src/theme/createBreakpoints.js +95 -0
- package/src/theme/createSpacing.js +12 -0
- package/src/theme/createTheme.js +29 -0
- package/src/theme/createZIndex.js +10 -0
- package/src/theme/docs/breakpoints.md +242 -0
- package/src/theme/docs/colors.md +64 -0
- package/src/theme/docs/components.md +32 -0
- package/src/theme/docs/darkMode.md +20 -0
- package/src/theme/docs/spacing.md +52 -0
- package/src/theme/docs/theming.md +69 -0
- package/src/theme/docs/zIndex.md +27 -0
- package/src/theme/index.js +15 -0
- package/src/theme/make-styles.js +32 -0
- package/src/theme/settings.js +816 -0
- package/src/theme/stories/breakpoints.stories.js +20 -0
- package/src/theme/stories/colors.stories.js +20 -0
- package/src/theme/stories/components.stories.js +20 -0
- package/src/theme/stories/darkMode.stories.js +20 -0
- package/src/theme/stories/spacing.stories.js +20 -0
- package/src/theme/stories/theming.stories.js +20 -0
- package/src/theme/stories/zIndex.stories.js +20 -0
- package/src/theme/theme-provider.js +101 -0
- package/src/theme/theme.js +57 -0
- package/src/theme/use-classes.js +19 -0
- package/src/theme/utils/getThemeProps.js +11 -0
- package/src/theme/utils/resolveProps.js +16 -0
- package/src/theme/utils/useThemeProps.js +8 -0
- package/src/utils/array/array.js +197 -0
- package/src/utils/classNames/index.js +28 -0
- package/src/utils/classNames/index.stories.js +61 -0
- package/src/utils/console.js +30 -0
- package/src/utils/date.js +391 -0
- package/src/utils/error/error.js +65 -0
- package/src/utils/error/errors.js +250 -0
- package/src/utils/getFileType.js +24 -0
- package/src/utils/handleBreakpoints.js +27 -0
- package/src/utils/hexToRGBA/index.js +25 -0
- package/src/utils/hexToRGBA/index.stories.js +43 -0
- package/src/utils/index.js +40 -0
- package/src/utils/intersectionObserver.js +45 -0
- package/src/utils/isMobile/index.js +22 -0
- package/src/utils/isMobile/index.stories.js +49 -0
- package/src/utils/isUndefined.js +3 -0
- package/src/utils/iterator.js +45 -0
- package/src/utils/map-parent.js +49 -0
- package/src/utils/object/deepmerge.js +129 -0
- package/src/utils/object/extend.js +55 -0
- package/src/utils/object/object.js +61 -0
- package/src/utils/parseHTML.js +20 -0
- package/src/utils/promisify.js +37 -0
- package/src/utils/randomString.js +22 -0
- package/src/utils/refMethodType.js +9 -0
- package/src/utils/refType.js +5 -0
- package/src/utils/remove-unicode.js +13 -0
- package/src/utils/render-portal.js +87 -0
- package/src/utils/renderHTML.js +17 -0
- package/src/utils/renderIcon.js +41 -0
- package/src/utils/sb-template.js +115 -0
- package/src/utils/storybook/index.js +1 -0
- package/src/utils/storybook/refArgTypes.js +46 -0
- package/src/utils/string/capitalize.js +6 -0
- package/src/utils/string/capitalizeSentenceCase.js +9 -0
- package/src/utils/string/string.js +83 -0
- package/src/utils/type.js +121 -0
- package/src/utils/updatePosition.js +27 -0
- package/src/utils/useControlled/index.js +23 -0
- package/src/utils/useDelayUnmount.js +17 -0
- package/src/utils/useElementSize.js +59 -0
- package/src/utils/useEventListener.js +54 -0
- package/src/utils/useInput.js +39 -0
- package/src/utils/useMediaQuery/index.js +50 -0
- package/src/utils/useMediaQuery/index.stories.js +55 -0
- package/src/utils/useOnClickOutside.js +28 -0
- package/src/utils/usePortal.js +54 -0
- package/src/utils/validate.js +135 -0
- package/components/accordion/context.js +0 -6
- package/components/accordion/details.js +0 -76
- package/components/accordion/group.js +0 -135
- package/components/accordion/index.js +0 -178
- package/components/accordion/summary.js +0 -324
- package/components/alert/index.js +0 -257
- package/components/alert/notify.js +0 -140
- package/components/avatar/index.js +0 -388
- package/components/badge/index.js +0 -231
- package/components/breadcrumb/index.js +0 -220
- package/components/button/icon.js +0 -357
- package/components/button/index.js +0 -444
- package/components/button/more.js +0 -210
- package/components/button/ripple-effect.js +0 -81
- package/components/card/body.js +0 -76
- package/components/card/extra.js +0 -76
- package/components/card/footer.js +0 -76
- package/components/card/header.js +0 -80
- package/components/card/index.js +0 -203
- package/components/chart/Pie/Circle.js +0 -50
- package/components/chart/Pie/Sector.js +0 -124
- package/components/chart/Pie/Sectors.js +0 -81
- package/components/chart/Pie/index.js +0 -277
- package/components/chart/Pie-v2/Circle.js +0 -48
- package/components/chart/Pie-v2/Sector.js +0 -108
- package/components/chart/Pie-v2/Sectors.js +0 -204
- package/components/chart/Pie-v2/index.js +0 -488
- package/components/chart/bar/Axis.js +0 -67
- package/components/chart/bar/Bar.js +0 -344
- package/components/chart/bar/Grid.js +0 -97
- package/components/chart/bar/Labels.js +0 -162
- package/components/chart/bar/Points.js +0 -94
- package/components/chart/bar/index.js +0 -161
- package/components/chart/bar-v2/Axis.js +0 -67
- package/components/chart/bar-v2/Bar.js +0 -354
- package/components/chart/bar-v2/Grid.js +0 -97
- package/components/chart/bar-v2/Labels.js +0 -162
- package/components/chart/bar-v2/Points.js +0 -94
- package/components/chart/bar-v2/index.js +0 -161
- package/components/chart/line/Axis.js +0 -68
- package/components/chart/line/Grid.js +0 -99
- package/components/chart/line/Labels.js +0 -160
- package/components/chart/line/Path.js +0 -154
- package/components/chart/line/Point.js +0 -343
- package/components/chart/line/Title.js +0 -52
- package/components/chart/line/index.js +0 -199
- package/components/chart/line-v2/Axis.js +0 -66
- package/components/chart/line-v2/Grid.js +0 -97
- package/components/chart/line-v2/Labels.js +0 -160
- package/components/chart/line-v2/Path.js +0 -153
- package/components/chart/line-v2/Point.js +0 -326
- package/components/chart/line-v2/Title.js +0 -52
- package/components/chart/line-v2/index.js +0 -165
- package/components/check-text/index.js +0 -155
- package/components/check-text/interview-confirmation.js +0 -171
- package/components/check-text/interview-status.js +0 -137
- package/components/chip/attach.js +0 -167
- package/components/chip/index.js +0 -275
- package/components/collapse/index.js +0 -93
- package/components/dialogs/colors.js +0 -13
- package/components/divider/index.js +0 -89
- package/components/form-control/attachment/index.js +0 -1537
- package/components/form-control/calendar/function.js +0 -752
- package/components/form-control/calendar/index.js +0 -317
- package/components/form-control/calendar/range.js +0 -291
- package/components/form-control/checkbox/index.js +0 -329
- package/components/form-control/control/index.js +0 -91
- package/components/form-control/date-input/DateField.js +0 -187
- package/components/form-control/date-input/index.js +0 -292
- package/components/form-control/date-input/useDateInputState.js +0 -129
- package/components/form-control/date-input/useIsFocused.js +0 -20
- package/components/form-control/date-input/useKeyboardInputEvent.js +0 -45
- package/components/form-control/date-input/utils.js +0 -290
- package/components/form-control/date-picker/index.js +0 -357
- package/components/form-control/date-range-picker/index.js +0 -1183
- package/components/form-control/dropdown/index.js +0 -1624
- package/components/form-control/dropdown-box/index.js +0 -238
- package/components/form-control/form/context.js +0 -5
- package/components/form-control/form/index.js +0 -40
- package/components/form-control/form-group/index.js +0 -117
- package/components/form-control/helper-text/index.js +0 -88
- package/components/form-control/input-base/UncontrolledInputBase.js +0 -450
- package/components/form-control/input-base/index.js +0 -646
- package/components/form-control/label/index.js +0 -117
- package/components/form-control/money-input/index.js +0 -513
- package/components/form-control/number-input/index.js +0 -582
- package/components/form-control/number-input/index2.js +0 -481
- package/components/form-control/password-input/index.js +0 -242
- package/components/form-control/phone-input/index.js +0 -364
- package/components/form-control/radio/index.js +0 -224
- package/components/form-control/text-input/index.js +0 -239
- package/components/form-control/time-picker/index.js +0 -781
- package/components/form-control/time-picker/swiper.js +0 -540
- package/components/form-control/time-picker/v2/index.js +0 -809
- package/components/form-control/toggle/index.js +0 -222
- package/components/form-view/helper-text.js +0 -33
- package/components/form-view/index.js +0 -95
- package/components/form-view/input.js +0 -117
- package/components/form-view/label.js +0 -37
- package/components/grid/Col.js +0 -91
- package/components/grid/Container.js +0 -85
- package/components/grid/Row.js +0 -81
- package/components/grid/context.js +0 -3
- package/components/grid/index.js +0 -251
- package/components/image/index.js +0 -170
- package/components/index.js +0 -156
- package/components/list/list-item-action.js +0 -82
- package/components/list/list-item-icon.js +0 -71
- package/components/list/list-item-text.js +0 -56
- package/components/list/list-item.js +0 -108
- package/components/list/list.js +0 -149
- package/components/list/sub-header.js +0 -63
- package/components/modal/body.js +0 -74
- package/components/modal/context.js +0 -6
- package/components/modal/footer.js +0 -78
- package/components/modal/header.js +0 -128
- package/components/modal/index.js +0 -63
- package/components/modal/modal.js +0 -292
- package/components/others/extra/index.js +0 -116
- package/components/others/import/index.js +0 -71
- package/components/others/option-wrapper/index.js +0 -39
- package/components/others/scrollbar/index.js +0 -94
- package/components/paging/page-info.js +0 -582
- package/components/paging/page-selector.js +0 -381
- package/components/paper/index.js +0 -112
- package/components/popover/body.js +0 -86
- package/components/popover/footer.js +0 -84
- package/components/popover/header.js +0 -88
- package/components/popover/index.js +0 -663
- package/components/popup/danger_popup.js +0 -189
- package/components/popup/index.js +0 -414
- package/components/popup/v2/index.js +0 -398
- package/components/progress/circular.js +0 -296
- package/components/progress/linear.js +0 -324
- package/components/rating/index.js +0 -243
- package/components/skeleton/index.js +0 -79
- package/components/slider/slider-container.js +0 -340
- package/components/slider/slider-item.js +0 -205
- package/components/status/index.js +0 -111
- package/components/tab/context.js +0 -3
- package/components/tab/tab-container.js +0 -100
- package/components/tab/tab-header.js +0 -160
- package/components/tab/tab-panel.js +0 -91
- package/components/tab/tab.js +0 -210
- package/components/tooltip/index.js +0 -522
- package/components/tooltip/portal.js +0 -11
- package/components/transfer/index.js +0 -434
- package/components/tree-view/index.js +0 -1017
- package/components/typography/index.js +0 -193
- package/css/styles.css +0 -1
- package/css/styles.css.map +0 -1
- package/global/index.js +0 -194
- package/icons/basic.js +0 -7864
- package/icons/effect.js +0 -131
- package/icons/general/clock/clock.js +0 -20
- package/icons/general/color-handler/background.js +0 -40
- package/icons/general/color-handler/text.js +0 -40
- package/icons/general/emoji/emoji.js +0 -34
- package/icons/general/font-properties/bold.js +0 -20
- package/icons/general/font-properties/font-family.js +0 -34
- package/icons/general/font-properties/font-size.js +0 -26
- package/icons/general/font-properties/italic.js +0 -20
- package/icons/general/font-properties/underline.js +0 -30
- package/icons/general/hyperlink/hyperlink.js +0 -37
- package/icons/general/indent/decrease.js +0 -54
- package/icons/general/indent/increase.js +0 -54
- package/icons/general/index.js +0 -21
- package/icons/general/list/bullets.js +0 -76
- package/icons/general/list/numbering.js +0 -70
- package/icons/general/picture/picture.js +0 -20
- package/icons/general/steps/redo.js +0 -20
- package/icons/general/steps/undo.js +0 -20
- package/icons/general/text-align/center.js +0 -20
- package/icons/general/text-align/justify.js +0 -20
- package/icons/general/text-align/left.js +0 -20
- package/icons/general/text-align/right.js +0 -20
- package/icons/index.js +0 -3
- package/icons/menu/dhr.js +0 -2442
- package/icons/menu/erp.js +0 -491
- package/icons/menu/index.js +0 -5
- package/icons/menu/v2/index.js +0 -71
- package/locale/index.js +0 -11
- package/styles/animation.js +0 -848
- package/styles/animations.js +0 -13
- package/styles/color-helper.js +0 -343
- package/styles/colors.js +0 -476
- package/styles/font.js +0 -24
- package/styles/general.js +0 -568
- package/styles/sx/index.js +0 -28
- package/styles/typography.js +0 -156
- package/styles/utils.js +0 -35
- package/theme/createBreakpoints.js +0 -82
- package/theme/createSpacing.js +0 -10
- package/theme/createTheme.js +0 -26
- package/theme/createZIndex.js +0 -9
- package/theme/index.js +0 -14
- package/theme/make-styles.js +0 -30
- package/theme/settings.js +0 -861
- package/theme/theme-provider.js +0 -102
- package/theme/theme.js +0 -57
- package/theme/use-classes.js +0 -15
- package/theme/utils/getThemeProps.js +0 -12
- package/theme/utils/resolveProps.js +0 -17
- package/theme/utils/useThemeProps.js +0 -14
- package/utils/array/array.js +0 -169
- package/utils/classNames/index.js +0 -25
- package/utils/console.js +0 -27
- package/utils/date.js +0 -401
- package/utils/error/error.js +0 -53
- package/utils/error/errors.js +0 -200
- package/utils/getFileType.js +0 -23
- package/utils/handleBreakpoints.js +0 -25
- package/utils/hexToRGBA/index.js +0 -23
- package/utils/index.js +0 -38
- package/utils/intersectionObserver.js +0 -37
- package/utils/isMobile/index.js +0 -21
- package/utils/isUndefined.js +0 -2
- package/utils/iterator.js +0 -36
- package/utils/map-parent.js +0 -46
- package/utils/object/deepmerge.js +0 -103
- package/utils/object/extend.js +0 -47
- package/utils/object/object.js +0 -54
- package/utils/parseHTML.js +0 -18
- package/utils/promisify.js +0 -34
- package/utils/randomString.js +0 -26
- package/utils/refMethodType.js +0 -6
- package/utils/refType.js +0 -5
- package/utils/remove-unicode.js +0 -5
- package/utils/render-portal.js +0 -87
- package/utils/renderHTML.js +0 -18
- package/utils/renderIcon.js +0 -53
- package/utils/sb-template.js +0 -113
- package/utils/storybook/index.js +0 -1
- package/utils/storybook/refArgTypes.js +0 -41
- package/utils/string/capitalize.js +0 -3
- package/utils/string/capitalizeSentenceCase.js +0 -8
- package/utils/string/string.js +0 -60
- package/utils/type.js +0 -69
- package/utils/updatePosition.js +0 -35
- package/utils/useControlled/index.js +0 -14
- package/utils/useDelayUnmount.js +0 -15
- package/utils/useElementSize.js +0 -55
- package/utils/useEventListener.js +0 -51
- package/utils/useInput.js +0 -33
- package/utils/useMediaQuery/index.js +0 -44
- package/utils/useOnClickOutside.js +0 -21
- package/utils/usePortal.js +0 -49
- package/utils/validate.js +0 -135
- /package/{assets → src/assets}/avatar/default.svg +0 -0
- /package/{assets → src/assets}/fonts/SF-Pro-Display-Bold.otf +0 -0
- /package/{assets → src/assets}/fonts/SF-Pro-Display-Medium.otf +0 -0
- /package/{assets → src/assets}/fonts/SF-Pro-Display-Regular.otf +0 -0
- /package/{assets → src/assets}/fonts/text-security-disc-compat.eot +0 -0
- /package/{assets → src/assets}/fonts/text-security-disc-compat.ttf +0 -0
- /package/{assets → src/assets}/fonts/text-security-disc-compat.woff2 +0 -0
- /package/{assets → src/assets}/fonts/text-security-disc.woff2 +0 -0
- /package/{assets → src/assets}/image/default.png +0 -0
- /package/{assets → src/assets}/images/icons/wifi.svg +0 -0
- /package/{assets → src/assets}/images/menu/bem/WA3F0100.svg +0 -0
- /package/{assets → src/assets}/images/menu/bem/WA3F1025.svg +0 -0
- /package/{assets → src/assets}/images/menu/bem/WA3F2000.svg +0 -0
- /package/{assets → src/assets}/images/menu/bem/WA3F2020.svg +0 -0
- /package/{assets → src/assets}/images/menu/bem/WA3F2030.svg +0 -0
- /package/{assets → src/assets}/images/menu/bem/WA3F2040.svg +0 -0
- /package/{assets → src/assets}/images/menu/bem/WA3F2100.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/ALL.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/D00.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/D09.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/D13.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/D15.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/D21.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/D25.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/D29.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/D38.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/D39.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/D51.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/D52.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/D77.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/D84.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/D89.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/Default.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MAHR21N0000.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MAHR29N0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MAHR29N0002.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MAHR29N0003.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MAHR29N0004.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MAHR29N0011.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MAHR29N0012.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MAHR29N0013.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MAHR75N0005.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MAHR75N0006.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MAHR75N0007.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MAHR75N0008.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MAHR75N0009.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MAHR75N0010.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MAHR89N0014.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MAHR89N0015.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM00N0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM00N0002.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM00N0003.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM00N0004.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM00N0005.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM00N0006.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM00N0007.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM09N0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM09N0002.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM09N0003.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM09N0004.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM09N0005.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM09N1010.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM09N1015.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM09N1020.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM09N1025.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM09N1030.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM09N1035.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM09N1040.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM09N1400.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM13N0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM13N0002.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM13N0003.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM13N0004.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM15N0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM25N0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM29N0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM29N0002.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM29N0003.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM29N0004.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM29N0005.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM29N0015.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM38N0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM38N0002.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM38N0003.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM39N0012.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM39N0013.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM39N0014.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM39N0015.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM39N0016.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM39N0017.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM39N0018.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM39N0019.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM39N0020.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM39N0021.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM39N0022.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM39N0023.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM51N0005.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM51N0006.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM51N0007.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM77N0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM77N0003.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM82N0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM82N0002.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM84N0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM84N0002.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM89N0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRM89N0002.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP00N0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0002.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0003.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0004.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0005.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0006.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0007.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0008.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0009.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0010.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0011.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0012.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0013.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0014.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0015.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0016.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0017.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0018.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0019.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0020.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0021.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0022.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0023.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0024.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0025.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0026.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0027.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0028.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0029.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0030.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0031.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0032.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0033.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0034.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP09N0035.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP13N0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP13N0005.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP13N0006.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP21N0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP21N0002.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP25L0101.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP25L0501.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP25N0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP25N0002.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP25N0003.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP25N0004.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP25N0005.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP29N0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP29N0002.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP29N0003.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP29N0004.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP29N0005.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP29N0006.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP29N0007.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP29N0008.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP29N0009.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP29N0010.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP29N0011.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP29N0012.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP29N0013.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP29N0014.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP29N0016.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP29N0017.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP29N0018.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP29N0019.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP29N0020.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP29N0021.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP29N0022.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP29N0023.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP29N0026.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP29N0027.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP29N0028.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP29N0029.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP29N0030.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP38N0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP38N0002.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP39N0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP39N0002.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP39N0003.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP39N0004.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP39N0005.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP39N0006.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP39N0007.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP39N0008.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP39N0009.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP39N0010.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP39N0011.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP39N0013.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP39N0014.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP39N0015.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP39N0017.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP39N0018.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP39N0019.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP39N0020.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP39N0021.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP39N1222.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP51N0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP51N0002.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP51N0003.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP51N0004.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP52N0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP52N0002.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP52N0003.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP75N0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP75N0002.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP75N0003.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP75N0006.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP75N0007.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP75N0008.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP77N0007.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP77N0008.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP77N0009.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP77N0010.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP77N0011.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP89N1000.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/MHRP89N1001.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/TASK.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/W00F0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/W00F0002.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/W00F0003.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/W00F0004.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/W00F0005.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/W09F2000-WEB5.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/W09F2000.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/W09F2002-WEB5.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/W09F2005-WEB5.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/W09F2020-WEB5.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/W09F2022-WEB5.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/W09F2150-WEB5.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/W09F2152-WEB5.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/W09F2160-WEB5.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/W09F2162-WEB5.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/W29F4006-WEB5.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/W75F2260-WEB5.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/W75F2261-WEB5.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/W75F3005-WEB5.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/W75F4070-WEB5.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/W75F4071-WEB5.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/W75F4100-WEB5.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/W77F1011.svg +0 -0
- /package/{assets → src/assets}/images/menu/dhr/W77F1013.svg +0 -0
- /package/{assets → src/assets}/images/menu/eo/W00F0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/eo/W00F0002.svg +0 -0
- /package/{assets → src/assets}/images/menu/eo/W00F0003.svg +0 -0
- /package/{assets → src/assets}/images/menu/eo/W00F0004.svg +0 -0
- /package/{assets → src/assets}/images/menu/eo/WEO76APP0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/eo/WEO76APP0002.svg +0 -0
- /package/{assets → src/assets}/images/menu/eo/WEO76LIS0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/eo/WEO76LIS0002.svg +0 -0
- /package/{assets → src/assets}/images/menu/eo/WEO76LIS0003.svg +0 -0
- /package/{assets → src/assets}/images/menu/eo/WEO76LIS0004.svg +0 -0
- /package/{assets → src/assets}/images/menu/eo/WEO76LIS0005.svg +0 -0
- /package/{assets → src/assets}/images/menu/eo/WEO76LIS0006.svg +0 -0
- /package/{assets → src/assets}/images/menu/eo/WEO76LIS0007.svg +0 -0
- /package/{assets → src/assets}/images/menu/eo/WEO76REQ0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/eo/WEO76REQ0002.svg +0 -0
- /package/{assets → src/assets}/images/menu/eo/WEO76REQ0003.svg +0 -0
- /package/{assets → src/assets}/images/menu/eo/WEO76TRA0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/eo/WTM76ACC0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/eo/WTM76INF0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/eo/WTM76PRO0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/eo/WTM76SYS0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/erp/D05.svg +0 -0
- /package/{assets → src/assets}/images/menu/erp/D06.svg +0 -0
- /package/{assets → src/assets}/images/menu/erp/D90R.svg +0 -0
- /package/{assets → src/assets}/images/menu/erp/DBC.svg +0 -0
- /package/{assets → src/assets}/images/menu/erp/W00F0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/erp/W00F0002.svg +0 -0
- /package/{assets → src/assets}/images/menu/erp/W00F0003.svg +0 -0
- /package/{assets → src/assets}/images/menu/erp/W00F0004.svg +0 -0
- /package/{assets → src/assets}/images/menu/erp/W05F0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/erp/W05F0001N0000.svg +0 -0
- /package/{assets → src/assets}/images/menu/erp/W05F0004N0000.svg +0 -0
- /package/{assets → src/assets}/images/menu/erp/W05F0006N0000.svg +0 -0
- /package/{assets → src/assets}/images/menu/erp/W05F0007N0000.svg +0 -0
- /package/{assets → src/assets}/images/menu/erp/W05F0008N0000.svg +0 -0
- /package/{assets → src/assets}/images/menu/erp/W05F0011N0000.svg +0 -0
- /package/{assets → src/assets}/images/menu/erp/W05F0013N0000.svg +0 -0
- /package/{assets → src/assets}/images/menu/erp/W05F4000N0000.svg +0 -0
- /package/{assets → src/assets}/images/menu/erp/W06F0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/erp/W06F0001N0000.svg +0 -0
- /package/{assets → src/assets}/images/menu/erp/W06F0004N0000.svg +0 -0
- /package/{assets → src/assets}/images/menu/erp/W06F0005N0000.svg +0 -0
- /package/{assets → src/assets}/images/menu/erp/W06F0006N0000.svg +0 -0
- /package/{assets → src/assets}/images/menu/erp/W06F0008N0000.svg +0 -0
- /package/{assets → src/assets}/images/menu/erp/W94F1000N0000.svg +0 -0
- /package/{assets → src/assets}/images/menu/erp/W94F1000N0001.svg +0 -0
- /package/{assets → src/assets}/images/menu/erp/WA3F1025.svg +0 -0
- /package/{assets → src/assets}/images/menu/erp/WA3F2100.svg +0 -0
- /package/{assets → src/assets}/storybook/avatar01.svg +0 -0
- /package/{assets → src/assets}/storybook/cover01.svg +0 -0
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
/** @jsxRuntime classic */
|
|
2
|
-
/** @jsx jsx */
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import { memo, forwardRef } from 'react';
|
|
5
|
-
import { jsx } from '@emotion/core';
|
|
6
|
-
import Axis from "./Axis";
|
|
7
|
-
import Labels from "./Labels";
|
|
8
|
-
import Grid from "./Grid";
|
|
9
|
-
import Points from "./Point";
|
|
10
|
-
// import Title from './Title';
|
|
11
|
-
import Path from "./Path";
|
|
12
|
-
import { randomString } from "../../../utils";
|
|
13
|
-
const LineChart = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
14
|
-
labelsVisible,
|
|
15
|
-
labelsCharacterWidth,
|
|
16
|
-
labelsCountY,
|
|
17
|
-
data,
|
|
18
|
-
viewBoxHeight,
|
|
19
|
-
labelsOffsetY,
|
|
20
|
-
viewBoxWidth,
|
|
21
|
-
labelsOffsetX,
|
|
22
|
-
labelsHeightX,
|
|
23
|
-
// unitWidth,
|
|
24
|
-
style,
|
|
25
|
-
className,
|
|
26
|
-
...props
|
|
27
|
-
}, ref) => {
|
|
28
|
-
// const colors = [
|
|
29
|
-
// '#FFD600',
|
|
30
|
-
// '#FFA800',
|
|
31
|
-
// '#FF7A00',
|
|
32
|
-
// '#FF0000',
|
|
33
|
-
// '#B61414',
|
|
34
|
-
// '#8FFF00',
|
|
35
|
-
// '#629000',
|
|
36
|
-
// '#019A5A',
|
|
37
|
-
// '#00C875',
|
|
38
|
-
// '#00FFD1',
|
|
39
|
-
// '#4200FF',
|
|
40
|
-
// '#0075FF',
|
|
41
|
-
// '#0095FF',
|
|
42
|
-
// '#00C2FF',
|
|
43
|
-
// '#00E0FF',
|
|
44
|
-
// '#8F00FF',
|
|
45
|
-
// '#BD00FF',
|
|
46
|
-
// '#FA00FF',
|
|
47
|
-
// '#FF00B8',
|
|
48
|
-
// '#FF3D71',
|
|
49
|
-
// ];
|
|
50
|
-
|
|
51
|
-
const dataSource = data.map((item, i) => ({
|
|
52
|
-
...item,
|
|
53
|
-
x: i
|
|
54
|
-
}));
|
|
55
|
-
|
|
56
|
-
// console.log(dataSource);
|
|
57
|
-
|
|
58
|
-
const UNIT_WIDTH = 1;
|
|
59
|
-
const id = 'DGN-CUI-LineChart-' + randomString(6, {
|
|
60
|
-
allowNumber: false,
|
|
61
|
-
allowSymbol: false
|
|
62
|
-
});
|
|
63
|
-
const round = n => {
|
|
64
|
-
return Math.round(n * 100) / 100;
|
|
65
|
-
};
|
|
66
|
-
const getMinX = () => {
|
|
67
|
-
var _dataSource$;
|
|
68
|
-
return (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) > 0 ? (_dataSource$ = dataSource[0]) === null || _dataSource$ === void 0 ? void 0 : _dataSource$.x : 0;
|
|
69
|
-
};
|
|
70
|
-
const getMinY = () => {
|
|
71
|
-
return 0;
|
|
72
|
-
};
|
|
73
|
-
const getMaxX = () => {
|
|
74
|
-
var _dataSource;
|
|
75
|
-
return (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) > 0 ? (_dataSource = dataSource[(dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) - 1]) === null || _dataSource === void 0 ? void 0 : _dataSource.x : 0;
|
|
76
|
-
};
|
|
77
|
-
const getMaxY = () => {
|
|
78
|
-
var _dataSource$2;
|
|
79
|
-
const yStep = labelsCountY > 0 ? labelsCountY : 1;
|
|
80
|
-
const maxY = (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) > 0 ? dataSource.reduce((max, point) => point.quantity > max ? point.quantity : max, (_dataSource$2 = dataSource[0]) === null || _dataSource$2 === void 0 ? void 0 : _dataSource$2.quantity) : 0;
|
|
81
|
-
return maxY ? Math.ceil(maxY / yStep) * yStep : yStep;
|
|
82
|
-
};
|
|
83
|
-
const getSvgX = x => {
|
|
84
|
-
const minX = getMinX();
|
|
85
|
-
const maxX = getMaxX();
|
|
86
|
-
const paddingLeft = getLabelsYWidth();
|
|
87
|
-
return round((x - minX) / (maxX + 1 - minX) * (Math.abs(viewBoxWidth) - paddingLeft));
|
|
88
|
-
};
|
|
89
|
-
const getSvgY = y => {
|
|
90
|
-
const paddingBottom = labelsVisible ? labelsHeightX + labelsOffsetX : 0;
|
|
91
|
-
const height = Math.abs(viewBoxHeight) - paddingBottom;
|
|
92
|
-
const maxY = getMaxY();
|
|
93
|
-
return round(height - y / maxY * height);
|
|
94
|
-
};
|
|
95
|
-
const getLabelsYWidth = () => {
|
|
96
|
-
const maxY = getMaxY();
|
|
97
|
-
return labelsVisible ? maxY.toString().length * labelsCharacterWidth + labelsOffsetY : 0;
|
|
98
|
-
};
|
|
99
|
-
const minX = getMinX();
|
|
100
|
-
const maxX = getMaxX();
|
|
101
|
-
const maxY = getMaxY();
|
|
102
|
-
const minY = getMinY();
|
|
103
|
-
const commonProps = {
|
|
104
|
-
getX: getSvgX.bind(),
|
|
105
|
-
getY: getSvgY.bind(),
|
|
106
|
-
maxX: maxX,
|
|
107
|
-
maxY: maxY,
|
|
108
|
-
minX: minX,
|
|
109
|
-
minY: minY,
|
|
110
|
-
round: round,
|
|
111
|
-
labelsWidthY: getLabelsYWidth(),
|
|
112
|
-
unitWidth: UNIT_WIDTH
|
|
113
|
-
};
|
|
114
|
-
return jsx("svg", {
|
|
115
|
-
id: id,
|
|
116
|
-
className: ['DGN-CUI-LineChart', className].join(' ').trim().replace(/\s+/g, ' '),
|
|
117
|
-
viewBox: `0 0 ${Math.abs(viewBoxWidth)} ${Math.abs(viewBoxHeight)}`,
|
|
118
|
-
style: {
|
|
119
|
-
display: 'block',
|
|
120
|
-
overflow: 'visible',
|
|
121
|
-
margin: `${getLabelsYWidth() * 2}`,
|
|
122
|
-
...style
|
|
123
|
-
},
|
|
124
|
-
ref: ref
|
|
125
|
-
}, jsx(Axis, {
|
|
126
|
-
...props,
|
|
127
|
-
...commonProps
|
|
128
|
-
}), jsx(Grid, {
|
|
129
|
-
...props,
|
|
130
|
-
...commonProps
|
|
131
|
-
}), jsx(Labels, {
|
|
132
|
-
data: dataSource,
|
|
133
|
-
...props,
|
|
134
|
-
...commonProps
|
|
135
|
-
}), jsx(Path, {
|
|
136
|
-
data: dataSource,
|
|
137
|
-
viewBoxWidth: viewBoxWidth,
|
|
138
|
-
...props,
|
|
139
|
-
...commonProps
|
|
140
|
-
}), jsx(Points, {
|
|
141
|
-
data: dataSource,
|
|
142
|
-
viewBoxWidth: viewBoxWidth,
|
|
143
|
-
...props,
|
|
144
|
-
...commonProps
|
|
145
|
-
}));
|
|
146
|
-
}));
|
|
147
|
-
LineChart.defaultProps = {
|
|
148
|
-
style: {},
|
|
149
|
-
className: '',
|
|
150
|
-
data: [],
|
|
151
|
-
viewBoxHeight: 200,
|
|
152
|
-
viewBoxWidth: 500,
|
|
153
|
-
...Axis.defaultProps,
|
|
154
|
-
...Labels.defaultProps,
|
|
155
|
-
...Points.defaultProps,
|
|
156
|
-
...Grid.defaultProps
|
|
157
|
-
};
|
|
158
|
-
LineChart.propTypes = {
|
|
159
|
-
/** style inline for component */
|
|
160
|
-
style: PropTypes.object,
|
|
161
|
-
/** className for component */
|
|
162
|
-
className: PropTypes.string,
|
|
163
|
-
data: PropTypes.array.isRequired,
|
|
164
|
-
/** drawn Ratio of viewBoxHeight entered by user, default is: 200px */
|
|
165
|
-
viewBoxHeight: PropTypes.number,
|
|
166
|
-
/** drawn Ratio of viewBoxWidth entered by user, default is: 500px */
|
|
167
|
-
viewBoxWidth: PropTypes.number,
|
|
168
|
-
/** the axisColor change color */
|
|
169
|
-
axisColor: PropTypes.string,
|
|
170
|
-
/** the axisVisible Hide or show the Axis axis */
|
|
171
|
-
axisVisible: PropTypes.bool,
|
|
172
|
-
/** change style show of label ['', 'italic'], default: 'italic' */
|
|
173
|
-
labelStyle: PropTypes.string,
|
|
174
|
-
/** change Line grid display style ['full' , 'horizontal', 'none'], default: 'full'*/
|
|
175
|
-
GridLines: PropTypes.string,
|
|
176
|
-
/** show data information when hovering in the area containing the column */
|
|
177
|
-
pointsIsHoverOnZone: PropTypes.bool,
|
|
178
|
-
/** show or hidden point */
|
|
179
|
-
pointsVisible: PropTypes.bool,
|
|
180
|
-
/** change the inner color of the point button */
|
|
181
|
-
pointsColor: PropTypes.string,
|
|
182
|
-
/** change the radius of the point is created */
|
|
183
|
-
pointsRadius: PropTypes.number,
|
|
184
|
-
/** the thickness of the line to be drawn */
|
|
185
|
-
STROKE: PropTypes.number,
|
|
186
|
-
/** shows the line to be drawn */
|
|
187
|
-
PathVisible: PropTypes.bool,
|
|
188
|
-
/** The color of the line drawn is the default color according to the data returned from the API, otherwise it will be generated by the design. */
|
|
189
|
-
pathColor: PropTypes.string,
|
|
190
|
-
/** show or hidden the line to be drawn smooth */
|
|
191
|
-
Smooth: PropTypes.bool,
|
|
192
|
-
/** the direction to display tootip */
|
|
193
|
-
pointHoverAlignment: PropTypes.oneOf(['top', 'bottom', 'left', 'right']),
|
|
194
|
-
...Axis.propTypes,
|
|
195
|
-
...Labels.propTypes,
|
|
196
|
-
...Points.propTypes,
|
|
197
|
-
...Grid.propTypes
|
|
198
|
-
};
|
|
199
|
-
export default LineChart;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/** @jsxRuntime classic */
|
|
2
|
-
/** @jsx jsx */
|
|
3
|
-
import PropTypes from "prop-types";
|
|
4
|
-
import { jsx } from '@emotion/core';
|
|
5
|
-
const Axis = ({
|
|
6
|
-
axisColor,
|
|
7
|
-
axisVisible,
|
|
8
|
-
axisWidth,
|
|
9
|
-
getX,
|
|
10
|
-
getY,
|
|
11
|
-
maxX,
|
|
12
|
-
maxY,
|
|
13
|
-
minX,
|
|
14
|
-
minY,
|
|
15
|
-
unitWidth
|
|
16
|
-
}) => {
|
|
17
|
-
// drawn Oxygen coordinate systems for width and height are entered or by default
|
|
18
|
-
return axisVisible ? jsx("g", {
|
|
19
|
-
className: 'DGN-Axis-LineChart',
|
|
20
|
-
stroke: axisColor,
|
|
21
|
-
strokeWidth: axisWidth
|
|
22
|
-
}, jsx("line", {
|
|
23
|
-
x1: getX(minX),
|
|
24
|
-
y1: getY(minY),
|
|
25
|
-
x2: getX(maxX + unitWidth + 0.5),
|
|
26
|
-
y2: getY(minY)
|
|
27
|
-
}), jsx("line", {
|
|
28
|
-
x1: getX(minX),
|
|
29
|
-
y1: getY(minX),
|
|
30
|
-
x2: getX(minX),
|
|
31
|
-
y2: getY(maxY + 10)
|
|
32
|
-
})) : null;
|
|
33
|
-
};
|
|
34
|
-
Axis.defaultProps = {
|
|
35
|
-
axisColor: '#7F828E',
|
|
36
|
-
axisVisible: true,
|
|
37
|
-
axisWidth: 0.5,
|
|
38
|
-
getX: x => x,
|
|
39
|
-
getY: quantity => quantity,
|
|
40
|
-
unitWidth: 1
|
|
41
|
-
};
|
|
42
|
-
Axis.propTypes = {
|
|
43
|
-
/** the axisColor change color */
|
|
44
|
-
axisColor: PropTypes.string,
|
|
45
|
-
/** the axisOpacity property sets the opacity of an element*/
|
|
46
|
-
axisOpacity: PropTypes.number,
|
|
47
|
-
/** the axisVisible Hide or show the Axis axis */
|
|
48
|
-
axisVisible: PropTypes.bool,
|
|
49
|
-
/** the axisWidth change the thickness of the column */
|
|
50
|
-
axisWidth: PropTypes.number,
|
|
51
|
-
/** the getX position x on Ox*/
|
|
52
|
-
getX: PropTypes.func,
|
|
53
|
-
/** the getY position y on Oy */
|
|
54
|
-
getY: PropTypes.func,
|
|
55
|
-
/** the maxX is maximum of Ox quantity returned by data*/
|
|
56
|
-
maxX: PropTypes.number,
|
|
57
|
-
/** the maxY is maximum of Oy quantity returned by data*/
|
|
58
|
-
maxY: PropTypes.number,
|
|
59
|
-
/** the minX is minimum of OX quantity returned by data*/
|
|
60
|
-
minX: PropTypes.number,
|
|
61
|
-
/** the minY is minimum of Oy quantity returned by data*/
|
|
62
|
-
minY: PropTypes.number,
|
|
63
|
-
/** the unitWidth */
|
|
64
|
-
unitWidth: PropTypes.number
|
|
65
|
-
};
|
|
66
|
-
export default Axis;
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
/** @jsxRuntime classic */
|
|
2
|
-
/** @jsx jsx */
|
|
3
|
-
import PropTypes from "prop-types";
|
|
4
|
-
import { jsx } from '@emotion/core';
|
|
5
|
-
const Grid = ({
|
|
6
|
-
getX,
|
|
7
|
-
getY,
|
|
8
|
-
gridColor,
|
|
9
|
-
GridLines,
|
|
10
|
-
gridWidth,
|
|
11
|
-
labelsCountY,
|
|
12
|
-
maxX,
|
|
13
|
-
maxY,
|
|
14
|
-
minX,
|
|
15
|
-
minY,
|
|
16
|
-
unitWidth
|
|
17
|
-
}) => {
|
|
18
|
-
let gridX = [];
|
|
19
|
-
let gridY = [];
|
|
20
|
-
for (let i = minX; i <= maxX; i++) {
|
|
21
|
-
gridX.push(jsx("line", {
|
|
22
|
-
key: i,
|
|
23
|
-
x1: getX(i + unitWidth / 1.5),
|
|
24
|
-
y1: getY(minY),
|
|
25
|
-
x2: getX(i + unitWidth / 1.5),
|
|
26
|
-
y2: getY(maxY + 10)
|
|
27
|
-
}));
|
|
28
|
-
}
|
|
29
|
-
const yStep = labelsCountY > 0 ? labelsCountY : unitWidth;
|
|
30
|
-
for (let i = minY; i <= maxY; i += Math.floor(maxY / yStep)) {
|
|
31
|
-
gridY.push(jsx("line", {
|
|
32
|
-
key: i,
|
|
33
|
-
x1: getX(minX),
|
|
34
|
-
y1: getY(i),
|
|
35
|
-
x2: getX(maxX + unitWidth + 0.5),
|
|
36
|
-
y2: getY(i)
|
|
37
|
-
}));
|
|
38
|
-
}
|
|
39
|
-
if (GridLines === 'full') {
|
|
40
|
-
return jsx("g", {
|
|
41
|
-
className: 'DGN-Grid-LineChart',
|
|
42
|
-
stroke: gridColor,
|
|
43
|
-
strokeWidth: gridWidth
|
|
44
|
-
}, gridX, gridY);
|
|
45
|
-
}
|
|
46
|
-
if (GridLines === 'horizontal') {
|
|
47
|
-
return jsx("g", {
|
|
48
|
-
className: 'DGN-Grid-LineChart',
|
|
49
|
-
stroke: gridColor,
|
|
50
|
-
strokeWidth: gridWidth
|
|
51
|
-
}, gridY);
|
|
52
|
-
}
|
|
53
|
-
if (GridLines === 'none') {
|
|
54
|
-
return null;
|
|
55
|
-
} else {
|
|
56
|
-
return jsx("g", {
|
|
57
|
-
className: 'DGN-Grid-LineChart',
|
|
58
|
-
stroke: gridColor,
|
|
59
|
-
strokeWidth: gridWidth
|
|
60
|
-
}, gridY);
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
Grid.propTypes = {
|
|
64
|
-
/** the getX position x on Ox*/
|
|
65
|
-
getX: PropTypes.func,
|
|
66
|
-
/** the getY position y on Oy */
|
|
67
|
-
getY: PropTypes.func,
|
|
68
|
-
/** change color of grid Line*/
|
|
69
|
-
gridColor: PropTypes.string,
|
|
70
|
-
/** change Line grid display style ['full' , 'horizontal', 'none'], default: 'full'*/
|
|
71
|
-
GridLines: PropTypes.string,
|
|
72
|
-
/** hiden or show grid Line*/
|
|
73
|
-
gridVisible: PropTypes.bool,
|
|
74
|
-
gridWidth: PropTypes.number,
|
|
75
|
-
labelsCountY: PropTypes.number,
|
|
76
|
-
/** the maxX is maximum of Ox quantity returned by data*/
|
|
77
|
-
maxX: PropTypes.number,
|
|
78
|
-
/** the maxY is maximum of Oy quantity returned by data*/
|
|
79
|
-
maxY: PropTypes.number,
|
|
80
|
-
/** the minX is minimum of OX quantity returned by data*/
|
|
81
|
-
minX: PropTypes.number,
|
|
82
|
-
/** the minY is minimum of Oy quantity returned by data*/
|
|
83
|
-
minY: PropTypes.number,
|
|
84
|
-
/** the unitWidth */
|
|
85
|
-
unitWidth: PropTypes.number
|
|
86
|
-
};
|
|
87
|
-
Grid.defaultProps = {
|
|
88
|
-
getX: x => x,
|
|
89
|
-
getY: y => y,
|
|
90
|
-
gridColor: 'rgba(127, 130, 142, 0.15)',
|
|
91
|
-
GridLines: 'full',
|
|
92
|
-
gridVisible: false,
|
|
93
|
-
gridWidth: 0.5,
|
|
94
|
-
labelsCountY: 5,
|
|
95
|
-
unitWidth: 1
|
|
96
|
-
};
|
|
97
|
-
export default Grid;
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
/* eslint-disable react/prop-types */
|
|
2
|
-
/** @jsxRuntime classic */
|
|
3
|
-
/** @jsx jsx */
|
|
4
|
-
import { css, jsx } from '@emotion/core';
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
6
|
-
import { useTheme } from "../../../theme";
|
|
7
|
-
import { getProp } from "../../../utils";
|
|
8
|
-
const Labels = ({
|
|
9
|
-
getX,
|
|
10
|
-
getY,
|
|
11
|
-
data,
|
|
12
|
-
labelsColor: labelsColorProp,
|
|
13
|
-
labelsCountY,
|
|
14
|
-
labelsFormatX,
|
|
15
|
-
labelsFormatY,
|
|
16
|
-
labelsHeightX,
|
|
17
|
-
labelsOffsetX,
|
|
18
|
-
labelStyle,
|
|
19
|
-
labelsOffsetY,
|
|
20
|
-
labelsVisible,
|
|
21
|
-
maxY,
|
|
22
|
-
minX,
|
|
23
|
-
unitWidth
|
|
24
|
-
}) => {
|
|
25
|
-
const theme = useTheme();
|
|
26
|
-
const {
|
|
27
|
-
colors,
|
|
28
|
-
typography
|
|
29
|
-
} = theme;
|
|
30
|
-
const labelsColor = getProp(colors, labelsColorProp, labelsColorProp);
|
|
31
|
-
const labelContainerCSS = css`
|
|
32
|
-
transform: translate(0, ${labelsOffsetX}px);
|
|
33
|
-
`;
|
|
34
|
-
const Label = css`
|
|
35
|
-
align-items: center;
|
|
36
|
-
justify-content: center;
|
|
37
|
-
text-align: center;
|
|
38
|
-
`;
|
|
39
|
-
const LabelCSS = labelStyle === 'italic' ? css`
|
|
40
|
-
fill: ${getProp(colors, 'system/rest')};
|
|
41
|
-
text-anchor: start;
|
|
42
|
-
${typography.paragraph3};
|
|
43
|
-
text-transform: capitalize;
|
|
44
|
-
cursor: pointer;
|
|
45
|
-
display: inline-block;
|
|
46
|
-
transform-box: fill-box;
|
|
47
|
-
transform: rotateZ(45deg);
|
|
48
|
-
` : css`
|
|
49
|
-
color: ${getProp(colors, 'system/rest')};
|
|
50
|
-
text-anchor: middle;
|
|
51
|
-
${typography.paragraph3};
|
|
52
|
-
text-transform: capitalize;
|
|
53
|
-
display: inline-block;
|
|
54
|
-
word-break: break-word;
|
|
55
|
-
`;
|
|
56
|
-
const TextCSS = css`
|
|
57
|
-
${typography.paragraph3};
|
|
58
|
-
fill: ${getProp(colors, 'system/rest')};
|
|
59
|
-
`;
|
|
60
|
-
if (labelsVisible) {
|
|
61
|
-
let xLabels;
|
|
62
|
-
let yLabels;
|
|
63
|
-
let tile = 4;
|
|
64
|
-
let tile2 = 9;
|
|
65
|
-
const TiLe = () => {
|
|
66
|
-
// eslint-disable-next-line no-undef
|
|
67
|
-
if (viewBoxWidth >= 800) {
|
|
68
|
-
return tile;
|
|
69
|
-
} else {
|
|
70
|
-
return tile2;
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
xLabels = labelStyle === 'italic' ? data.map((point, x) => jsx("text", {
|
|
74
|
-
key: x,
|
|
75
|
-
css: LabelCSS,
|
|
76
|
-
fill: labelsColor,
|
|
77
|
-
x: getX(point.x + unitWidth / 1.5),
|
|
78
|
-
y: getY(0) + labelsHeightX
|
|
79
|
-
}, labelsFormatX(point.name))) : data.map((point, x) => jsx("foreignObject", {
|
|
80
|
-
key: x,
|
|
81
|
-
css: Label,
|
|
82
|
-
x: getX(point.x + unitWidth / TiLe()),
|
|
83
|
-
y: getY(0) + labelsHeightX,
|
|
84
|
-
width: "40",
|
|
85
|
-
height: "80"
|
|
86
|
-
}, jsx("span", {
|
|
87
|
-
css: LabelCSS
|
|
88
|
-
}, labelsFormatX(point.name))));
|
|
89
|
-
const yLabelsRange = [];
|
|
90
|
-
const yStep = labelsCountY > 0 ? labelsCountY : 1;
|
|
91
|
-
for (let i = 0; i <= maxY; i += Math.floor(maxY / yStep)) {
|
|
92
|
-
yLabelsRange.push(i);
|
|
93
|
-
}
|
|
94
|
-
yLabels = yLabelsRange.map(quantity => jsx("text", {
|
|
95
|
-
key: quantity,
|
|
96
|
-
fill: labelsColor,
|
|
97
|
-
x: getX(minX),
|
|
98
|
-
y: getY(quantity) + labelsHeightX / 3,
|
|
99
|
-
transform: `translate(-${labelsOffsetY}, 0)`,
|
|
100
|
-
textAnchor: "end",
|
|
101
|
-
css: TextCSS
|
|
102
|
-
}, labelsFormatY(quantity)));
|
|
103
|
-
return jsx("g", {
|
|
104
|
-
className: 'DGN-Labels-LineChart'
|
|
105
|
-
}, xLabels && jsx("g", {
|
|
106
|
-
id: 'DGN-AxisX',
|
|
107
|
-
css: labelContainerCSS
|
|
108
|
-
}, xLabels), yLabels && jsx("g", {
|
|
109
|
-
id: 'DGN-AxisY'
|
|
110
|
-
}, yLabels));
|
|
111
|
-
} else {
|
|
112
|
-
return null;
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
Labels.defaultProps = {
|
|
116
|
-
getX: x => x,
|
|
117
|
-
getY: quantity => quantity,
|
|
118
|
-
labelsCharacterWidth: 10,
|
|
119
|
-
labelsColor: 'system/rest',
|
|
120
|
-
labelsCountY: 5,
|
|
121
|
-
labelsFormatX: label => label,
|
|
122
|
-
labelsFormatY: quantity => quantity,
|
|
123
|
-
labelsHeightX: 5,
|
|
124
|
-
labelsOffsetX: 10,
|
|
125
|
-
labelsOffsetY: 10,
|
|
126
|
-
labelsStepX: 1,
|
|
127
|
-
labelsVisible: true,
|
|
128
|
-
unitWidth: 1,
|
|
129
|
-
labelStyle: 'italic'
|
|
130
|
-
};
|
|
131
|
-
Labels.propTypes = {
|
|
132
|
-
/** the getX position x on Ox*/
|
|
133
|
-
getX: PropTypes.func,
|
|
134
|
-
/** the getY position y on Oy */
|
|
135
|
-
getY: PropTypes.func,
|
|
136
|
-
/** the labelsColor change color */
|
|
137
|
-
labelsColor: PropTypes.string,
|
|
138
|
-
/** change style show of label ['', 'italic'], default: 'italic' */
|
|
139
|
-
labelStyle: PropTypes.string,
|
|
140
|
-
labelsCountY: PropTypes.number,
|
|
141
|
-
labelsFormatX: PropTypes.func,
|
|
142
|
-
labelsFormatY: PropTypes.func,
|
|
143
|
-
labelsHeightX: PropTypes.number,
|
|
144
|
-
labelsOffsetX: PropTypes.number,
|
|
145
|
-
labelsOffsetY: PropTypes.number,
|
|
146
|
-
labelsStepX: PropTypes.number,
|
|
147
|
-
/** change show or hiden of label */
|
|
148
|
-
labelsVisible: PropTypes.bool,
|
|
149
|
-
/** the maxX is maximum of Ox quantity returned by data*/
|
|
150
|
-
maxX: PropTypes.number,
|
|
151
|
-
/** the maxY is maximum of Oy quantity returned by data*/
|
|
152
|
-
maxY: PropTypes.number,
|
|
153
|
-
/** the minX is minimum of OX quantity returned by data*/
|
|
154
|
-
minX: PropTypes.number,
|
|
155
|
-
/** the minY is minimum of Oy quantity returned by data*/
|
|
156
|
-
minY: PropTypes.number,
|
|
157
|
-
/** the unitWidth */
|
|
158
|
-
unitWidth: PropTypes.number
|
|
159
|
-
};
|
|
160
|
-
export default Labels;
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
/* eslint-disable react/prop-types */
|
|
2
|
-
/** @jsxRuntime classic */
|
|
3
|
-
/** @jsx jsx */
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
|
-
import { jsx, css } from '@emotion/core';
|
|
6
|
-
const Path = ({
|
|
7
|
-
data,
|
|
8
|
-
getX,
|
|
9
|
-
getY,
|
|
10
|
-
Smooth,
|
|
11
|
-
PathVisible,
|
|
12
|
-
STROKE,
|
|
13
|
-
STROKEHover,
|
|
14
|
-
pathColor,
|
|
15
|
-
unitWidth
|
|
16
|
-
}) => {
|
|
17
|
-
const point = data.map(element => {
|
|
18
|
-
const x = getX(element.x + unitWidth / 1.5);
|
|
19
|
-
const y = getY(element.quantity);
|
|
20
|
-
return [x, y];
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
// const Colors = data.map(element => {
|
|
24
|
-
// const colors = element.color;
|
|
25
|
-
// return colors;
|
|
26
|
-
// });
|
|
27
|
-
|
|
28
|
-
const PathCSS = css`
|
|
29
|
-
stroke: ${pathColor};
|
|
30
|
-
stroke-width: ${STROKE};
|
|
31
|
-
stroke-linecap: round;
|
|
32
|
-
stroke-linejoin: round;
|
|
33
|
-
/* &:hover {
|
|
34
|
-
cursor: pointer;
|
|
35
|
-
stroke: ${pathColor};
|
|
36
|
-
stroke-linecap: round;
|
|
37
|
-
stroke-linejoin: round;
|
|
38
|
-
stroke-width: ${STROKEHover};
|
|
39
|
-
} */
|
|
40
|
-
`;
|
|
41
|
-
|
|
42
|
-
// Properties of a line
|
|
43
|
-
// I: - pointA (array) [x,y]: coordinates
|
|
44
|
-
// - pointB (array) [x,y]: coordinates
|
|
45
|
-
// O: - (object) { length: l, angle: a }: properties of the line
|
|
46
|
-
const line = (pointA, pointB) => {
|
|
47
|
-
const lengthX = pointB[0] - pointA[0];
|
|
48
|
-
const lengthY = pointB[1] - pointA[1];
|
|
49
|
-
const Balance = 0.005 * Math.PI;
|
|
50
|
-
const Re = 0.38 * Math.PI;
|
|
51
|
-
let angle = Math.atan2(lengthY, lengthX);
|
|
52
|
-
if (angle < -0.32 * Math.PI) {
|
|
53
|
-
angle += Re; // make sure the returned angle is in the range of (-PI/2, 3PI/2]
|
|
54
|
-
}
|
|
55
|
-
if (angle > 0.16 * Math.PI) {
|
|
56
|
-
angle -= Balance;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// console.log(angle);
|
|
60
|
-
|
|
61
|
-
return {
|
|
62
|
-
length: Math.sqrt(Math.pow(lengthX, 2) + Math.pow(lengthY, 2)),
|
|
63
|
-
angle
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
// Position of a control point
|
|
68
|
-
// I: - current (array) [x, y]: current point coordinates
|
|
69
|
-
// - previous (array) [x, y]: previous point coordinates
|
|
70
|
-
// - next (array) [x, y]: next point coordinates
|
|
71
|
-
// - reverse (boolean, optional): sets the direction
|
|
72
|
-
// O: - (array) [x,y]: a tuple of coordinates
|
|
73
|
-
const controlPoint = (current, previous, next, reverse) => {
|
|
74
|
-
// When 'current' is the first or last point of the array
|
|
75
|
-
// 'previous' or 'next' don't exist.
|
|
76
|
-
// Replace with 'current'
|
|
77
|
-
const c = current;
|
|
78
|
-
const p = previous ? previous : c;
|
|
79
|
-
const n = next ? next : c;
|
|
80
|
-
// The smoothing ratio
|
|
81
|
-
const smoothing = 0.15;
|
|
82
|
-
// Properties of the opposed-line
|
|
83
|
-
const o = line(p, n);
|
|
84
|
-
// If is end-control-point, add PI to the angle to go backward
|
|
85
|
-
const rev = reverse ? Math.PI : 0;
|
|
86
|
-
// The control point position is relative to the current point
|
|
87
|
-
const x = c[0] + Math.cos(o.angle + rev) * o.length * smoothing;
|
|
88
|
-
const y = c[1] + Math.sin(o.angle * 0.095 + rev) * o.length * smoothing;
|
|
89
|
-
return [x, y];
|
|
90
|
-
};
|
|
91
|
-
const svgPathRender = point => {
|
|
92
|
-
const d = point.reduce((acc, e, i, a) => {
|
|
93
|
-
if (i > 0) {
|
|
94
|
-
const cs = controlPoint(a[i - 1], a[i - 2], e);
|
|
95
|
-
const ce = controlPoint(e, a[i - 1], a[i + 1], true);
|
|
96
|
-
return `${acc} C ${cs[0]},${cs[1]} ${ce[0]},${ce[1]} ${e[0]},${e[1]}`;
|
|
97
|
-
} else {
|
|
98
|
-
return `${acc} M ${e[0]},${e[1]}`;
|
|
99
|
-
}
|
|
100
|
-
}, '');
|
|
101
|
-
return jsx("path", {
|
|
102
|
-
d: d,
|
|
103
|
-
css: PathCSS,
|
|
104
|
-
fill: 'none'
|
|
105
|
-
});
|
|
106
|
-
};
|
|
107
|
-
const command = point => `L ${point[0]} ${point[1]} `;
|
|
108
|
-
const svgPath = points => {
|
|
109
|
-
// build the d attributes by looping over the points
|
|
110
|
-
const d = points.reduce((acc, point, i, a) => i === 0 ?
|
|
111
|
-
// if first point
|
|
112
|
-
`M ${point[0]},${point[1]}` :
|
|
113
|
-
// else
|
|
114
|
-
`${acc} ${command(point, i, a)}`, '');
|
|
115
|
-
return jsx("path", {
|
|
116
|
-
d: d,
|
|
117
|
-
css: PathCSS,
|
|
118
|
-
fill: 'none'
|
|
119
|
-
});
|
|
120
|
-
};
|
|
121
|
-
return PathVisible ? jsx("g", {
|
|
122
|
-
className: 'DGN-Path-LineChart'
|
|
123
|
-
}, Smooth ? svgPathRender(point) : svgPath(point)) : null;
|
|
124
|
-
};
|
|
125
|
-
Path.defaultProps = {
|
|
126
|
-
data: PropTypes.arrayOf(PropTypes.shape({
|
|
127
|
-
x: PropTypes.number,
|
|
128
|
-
quantity: PropTypes.number
|
|
129
|
-
})).isRequired,
|
|
130
|
-
/** the getX position x on Ox*/
|
|
131
|
-
getX: PropTypes.func,
|
|
132
|
-
/** the getY position y on Oy */
|
|
133
|
-
getY: PropTypes.func,
|
|
134
|
-
/** The color of the line drawn is the default color according to the data returned from the API, otherwise it will be generated by the design. */
|
|
135
|
-
pathColor: PropTypes.string,
|
|
136
|
-
/** shows the line to be drawn */
|
|
137
|
-
PathVisible: PropTypes.bool,
|
|
138
|
-
/** show or hiden the line to be drawn smooth */
|
|
139
|
-
Smooth: PropTypes.bool,
|
|
140
|
-
/** the thickness of the line to be drawn */
|
|
141
|
-
STROKE: PropTypes.number,
|
|
142
|
-
/** the unitWidth */
|
|
143
|
-
unitWidth: PropTypes.number
|
|
144
|
-
};
|
|
145
|
-
Path.defaultProps = {
|
|
146
|
-
unitWidth: 1,
|
|
147
|
-
PathVisible: true,
|
|
148
|
-
pathColor: '#0095FF',
|
|
149
|
-
Smooth: false,
|
|
150
|
-
STROKE: 2,
|
|
151
|
-
STROKEHover: 3
|
|
152
|
-
};
|
|
153
|
-
export default Path;
|