diginet-core-ui 1.3.24
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/assets/avatar/default.svg +3 -0
- package/assets/images/menu/dhr/Default.svg +13 -0
- package/assets/images/menu/dhr/MHRM00N0001.svg +14 -0
- package/assets/images/menu/dhr/MHRM09N0001.svg +1 -0
- package/assets/images/menu/dhr/MHRM09N0002.svg +3 -0
- package/assets/images/menu/dhr/MHRM09N0003.svg +25 -0
- package/assets/images/menu/dhr/MHRM25N0001.svg +26 -0
- package/assets/images/menu/dhr/MHRM29N0001.svg +30 -0
- package/assets/images/menu/dhr/MHRM29N0015.svg +63 -0
- package/assets/images/menu/dhr/MHRM39N0012.svg +43 -0
- package/assets/images/menu/dhr/MHRM39N0013.svg +24 -0
- package/assets/images/menu/dhr/MHRM39N0014.svg +14 -0
- package/assets/images/menu/dhr/MHRM39N0015.svg +36 -0
- package/assets/images/menu/dhr/MHRM39N0016.svg +23 -0
- package/assets/images/menu/dhr/MHRM77N0001.svg +28 -0
- package/assets/images/menu/dhr/MHRM84N0001.svg +27 -0
- package/assets/images/menu/dhr/MHRM84N0002.svg +24 -0
- package/assets/images/menu/dhr/MHRM89N0001.svg +16 -0
- package/assets/images/menu/dhr/MHRP00N0001.svg +10 -0
- package/assets/images/menu/dhr/MHRP09N0001.svg +22 -0
- package/assets/images/menu/dhr/MHRP09N0002.svg +19 -0
- package/assets/images/menu/dhr/MHRP09N0003.svg +12 -0
- package/assets/images/menu/dhr/MHRP09N0004.svg +6 -0
- package/assets/images/menu/dhr/MHRP09N0005.svg +10 -0
- package/assets/images/menu/dhr/MHRP09N0006.svg +17 -0
- package/assets/images/menu/dhr/MHRP09N0007.svg +15 -0
- package/assets/images/menu/dhr/MHRP09N0008.svg +8 -0
- package/assets/images/menu/dhr/MHRP09N0009.svg +10 -0
- package/assets/images/menu/dhr/MHRP09N0010.svg +12 -0
- package/assets/images/menu/dhr/MHRP09N0011.svg +16 -0
- package/assets/images/menu/dhr/MHRP09N0012.svg +6 -0
- package/assets/images/menu/dhr/MHRP09N0013.svg +8 -0
- package/assets/images/menu/dhr/MHRP09N0014.svg +11 -0
- package/assets/images/menu/dhr/MHRP09N0015.svg +12 -0
- package/assets/images/menu/dhr/MHRP09N0016.svg +18 -0
- package/assets/images/menu/dhr/MHRP09N0017.svg +18 -0
- package/assets/images/menu/dhr/MHRP09N0018.svg +12 -0
- package/assets/images/menu/dhr/MHRP09N0019.svg +13 -0
- package/assets/images/menu/dhr/MHRP09N0020.svg +17 -0
- package/assets/images/menu/dhr/MHRP09N0021.svg +10 -0
- package/assets/images/menu/dhr/MHRP09N0022.svg +16 -0
- package/assets/images/menu/dhr/MHRP09N0023.svg +8 -0
- package/assets/images/menu/dhr/MHRP09N0024.svg +15 -0
- package/assets/images/menu/dhr/MHRP09N0025.svg +16 -0
- package/assets/images/menu/dhr/MHRP09N0026.svg +13 -0
- package/assets/images/menu/dhr/MHRP09N0027.svg +10 -0
- package/assets/images/menu/dhr/MHRP13N0001.svg +9 -0
- package/assets/images/menu/dhr/MHRP21N0001.svg +12 -0
- package/assets/images/menu/dhr/MHRP21N0002.svg +13 -0
- package/assets/images/menu/dhr/MHRP25N0001.svg +13 -0
- package/assets/images/menu/dhr/MHRP25N0002.svg +16 -0
- package/assets/images/menu/dhr/MHRP25N0003.svg +38 -0
- package/assets/images/menu/dhr/MHRP25N0004.svg +17 -0
- package/assets/images/menu/dhr/MHRP25N0005.svg +20 -0
- package/assets/images/menu/dhr/MHRP29N0001.svg +18 -0
- package/assets/images/menu/dhr/MHRP29N0002.svg +15 -0
- package/assets/images/menu/dhr/MHRP29N0003.svg +20 -0
- package/assets/images/menu/dhr/MHRP29N0004.svg +21 -0
- package/assets/images/menu/dhr/MHRP29N0005.svg +21 -0
- package/assets/images/menu/dhr/MHRP29N0006.svg +14 -0
- package/assets/images/menu/dhr/MHRP29N0007.svg +19 -0
- package/assets/images/menu/dhr/MHRP29N0008.svg +20 -0
- package/assets/images/menu/dhr/MHRP29N0009.svg +11 -0
- package/assets/images/menu/dhr/MHRP29N0010.svg +11 -0
- package/assets/images/menu/dhr/MHRP29N0011.svg +12 -0
- package/assets/images/menu/dhr/MHRP29N0013.svg +27 -0
- package/assets/images/menu/dhr/MHRP29N0014.svg +32 -0
- package/assets/images/menu/dhr/MHRP29N0016.svg +54 -0
- package/assets/images/menu/dhr/MHRP29N0017.svg +24 -0
- package/assets/images/menu/dhr/MHRP29N0018.svg +44 -0
- package/assets/images/menu/dhr/MHRP29N0019.svg +17 -0
- package/assets/images/menu/dhr/MHRP29N0020.svg +11 -0
- package/assets/images/menu/dhr/MHRP38N0001.svg +13 -0
- package/assets/images/menu/dhr/MHRP38N0002.svg +14 -0
- package/assets/images/menu/dhr/MHRP39N0001.svg +15 -0
- package/assets/images/menu/dhr/MHRP39N0002.svg +13 -0
- package/assets/images/menu/dhr/MHRP39N0003.svg +16 -0
- package/assets/images/menu/dhr/MHRP39N0004.svg +22 -0
- package/assets/images/menu/dhr/MHRP39N0005.svg +16 -0
- package/assets/images/menu/dhr/MHRP39N0006.svg +17 -0
- package/assets/images/menu/dhr/MHRP39N0007.svg +13 -0
- package/assets/images/menu/dhr/MHRP39N0008.svg +3 -0
- package/assets/images/menu/dhr/MHRP39N0009.svg +3 -0
- package/assets/images/menu/dhr/MHRP39N0010.svg +7 -0
- package/assets/images/menu/dhr/MHRP39N0011.svg +14 -0
- package/assets/images/menu/dhr/MHRP39N0013.svg +10 -0
- package/assets/images/menu/dhr/MHRP39N0014.svg +11 -0
- package/assets/images/menu/dhr/MHRP39N1222.svg +12 -0
- package/assets/images/menu/dhr/MHRP51N0001.svg +9 -0
- package/assets/images/menu/dhr/MHRP51N0002.svg +13 -0
- package/assets/images/menu/dhr/MHRP52N0001.svg +21 -0
- package/assets/images/menu/dhr/MHRP52N0002.svg +21 -0
- package/assets/images/menu/dhr/MHRP52N0003.svg +16 -0
- package/assets/images/menu/dhr/MHRP75N0001.svg +19 -0
- package/assets/images/menu/dhr/MHRP75N0002.svg +25 -0
- package/assets/images/menu/dhr/MHRP75N0003.svg +3 -0
- package/assets/images/menu/dhr/MHRP75N0006.svg +14 -0
- package/assets/images/menu/dhr/MHRP75N0007.svg +19 -0
- package/assets/images/menu/dhr/MHRP75N0008.svg +19 -0
- package/assets/images/menu/dhr/MHRP77N0007.svg +28 -0
- package/assets/images/menu/dhr/MHRP77N0008.svg +17 -0
- package/assets/images/menu/dhr/MHRP77N0009.svg +19 -0
- package/assets/images/menu/dhr/MHRP77N0010.svg +20 -0
- package/assets/images/menu/dhr/MHRP89N1000.svg +6 -0
- package/assets/images/menu/dhr/MHRP89N1001.svg +6 -0
- package/assets/images/menu/dhr/W00F0001.svg +3 -0
- package/assets/images/menu/dhr/W00F0002.svg +3 -0
- package/assets/images/menu/dhr/W00F0003.svg +3 -0
- package/assets/images/menu/dhr/W00F0004.svg +3 -0
- package/assets/images/menu/dhr/W00F0005.svg +1 -0
- package/assets/images/menu/dhr/W09F2000-WEB5.svg +17 -0
- package/assets/images/menu/dhr/W09F2000.svg +6 -0
- package/assets/images/menu/dhr/W09F2002-WEB5.svg +21 -0
- package/assets/images/menu/dhr/W09F2005-WEB5.svg +13 -0
- package/assets/images/menu/dhr/W09F2020-WEB5.svg +16 -0
- package/assets/images/menu/dhr/W09F2022-WEB5.svg +20 -0
- package/assets/images/menu/dhr/W09F2150-WEB5.svg +16 -0
- package/assets/images/menu/dhr/W09F2152-WEB5.svg +20 -0
- package/assets/images/menu/dhr/W09F2160-WEB5.svg +14 -0
- package/assets/images/menu/dhr/W09F2162-WEB5.svg +18 -0
- package/assets/images/menu/dhr/W29F4006-WEB5.svg +19 -0
- package/assets/images/menu/dhr/W75F2260-WEB5.svg +15 -0
- package/assets/images/menu/dhr/W75F2261-WEB5.svg +19 -0
- package/assets/images/menu/dhr/W75F3005-WEB5.svg +13 -0
- package/assets/images/menu/dhr/W75F4070-WEB5.svg +21 -0
- package/assets/images/menu/dhr/W75F4071-WEB5.svg +17 -0
- package/assets/images/menu/dhr/W75F4100-WEB5.svg +14 -0
- package/assets/images/menu/dhr/W77F1011.svg +19 -0
- package/assets/images/menu/dhr/W77F1013.svg +22 -0
- package/assets/images/menu/erp/W00F0001.svg +3 -0
- package/assets/images/menu/erp/W00F0002.svg +3 -0
- package/assets/images/menu/erp/W00F0003.svg +3 -0
- package/assets/images/menu/erp/W00F0004.svg +3 -0
- package/assets/images/menu/erp/W05F0001.svg +16 -0
- package/assets/images/menu/erp/W05F0001N0000.svg +16 -0
- package/assets/images/menu/erp/W05F0004N0000.svg +6 -0
- package/assets/images/menu/erp/W05F0006.svg +30 -0
- package/assets/images/menu/erp/W05F0007N0000.svg +6 -0
- package/assets/images/menu/erp/W05F0008.svg +14 -0
- package/assets/images/menu/erp/W05F4000.svg +9 -0
- package/assets/images/menu/erp/W06F0001.svg +17 -0
- package/assets/images/menu/erp/W06F0001N0000.svg +17 -0
- package/assets/images/menu/erp/W06F0004N0000.svg +22 -0
- package/assets/images/menu/erp/W06F0005.svg +22 -0
- package/assets/images/menu/erp/W06F0006.svg +55 -0
- package/assets/images/menu/erp/W06F0008.svg +17 -0
- package/assets/images/menu/erp/WA3F1025.svg +5 -0
- package/assets/images/menu/erp/WA3F2100.svg +10 -0
- package/components/accordion/context.js +6 -0
- package/components/accordion/css.js +159 -0
- package/components/accordion/details.js +60 -0
- package/components/accordion/group.js +122 -0
- package/components/accordion/index.js +117 -0
- package/components/accordion/summary.js +175 -0
- package/components/alert/index.js +264 -0
- package/components/alert/notify.js +192 -0
- package/components/avatar/index.js +556 -0
- package/components/badge/index.js +223 -0
- package/components/button/icon.js +493 -0
- package/components/button/index.js +653 -0
- package/components/button/more.js +135 -0
- package/components/button/ripple-effect.js +85 -0
- package/components/card/body-card.js +67 -0
- package/components/card/card.js +127 -0
- package/components/card/context.js +6 -0
- package/components/card/index.js +50 -0
- package/components/chart/Pie/Circle.js +50 -0
- package/components/chart/Pie/Sector.js +142 -0
- package/components/chart/Pie/Sectors.js +91 -0
- package/components/chart/Pie/index.js +311 -0
- package/components/chart/Pie-v2/Circle.js +50 -0
- package/components/chart/Pie-v2/Sector.js +128 -0
- package/components/chart/Pie-v2/Sectors.js +224 -0
- package/components/chart/Pie-v2/index.js +397 -0
- package/components/chart/bar/Axis.js +79 -0
- package/components/chart/bar/Bar.js +365 -0
- package/components/chart/bar/Grid.js +115 -0
- package/components/chart/bar/Labels.js +175 -0
- package/components/chart/bar/Points.js +111 -0
- package/components/chart/bar/index.js +172 -0
- package/components/chart/bar-v2/Axis.js +79 -0
- package/components/chart/bar-v2/Bar.js +374 -0
- package/components/chart/bar-v2/Grid.js +115 -0
- package/components/chart/bar-v2/Labels.js +175 -0
- package/components/chart/bar-v2/Points.js +111 -0
- package/components/chart/bar-v2/index.js +172 -0
- package/components/chart/line/Axis.js +79 -0
- package/components/chart/line/Grid.js +115 -0
- package/components/chart/line/Labels.js +172 -0
- package/components/chart/line/Path.js +163 -0
- package/components/chart/line/Point.js +348 -0
- package/components/chart/line/Title.js +56 -0
- package/components/chart/line/index.js +174 -0
- package/components/chart/line-v2/Axis.js +79 -0
- package/components/chart/line-v2/Grid.js +115 -0
- package/components/chart/line-v2/Labels.js +172 -0
- package/components/chart/line-v2/Path.js +163 -0
- package/components/chart/line-v2/Point.js +354 -0
- package/components/chart/line-v2/Title.js +56 -0
- package/components/chart/line-v2/index.js +174 -0
- package/components/check-text/index.js +157 -0
- package/components/check-text/interview-confirmation.js +172 -0
- package/components/check-text/interview-status.js +138 -0
- package/components/chip/attach.js +180 -0
- package/components/chip/index.js +340 -0
- package/components/collapse/index.js +67 -0
- package/components/dialogs/colors.js +11 -0
- package/components/divider/index.js +71 -0
- package/components/divider/style.js +12 -0
- package/components/form-control/attachment/index.js +1890 -0
- package/components/form-control/calendar/function.js +673 -0
- package/components/form-control/calendar/index.js +248 -0
- package/components/form-control/calendar/range.js +293 -0
- package/components/form-control/checkbox/index.js +306 -0
- package/components/form-control/control/index.js +92 -0
- package/components/form-control/date-picker/index-old.js +953 -0
- package/components/form-control/date-picker/index.js +676 -0
- package/components/form-control/date-range-picker/index.js +1305 -0
- package/components/form-control/dropdown/index.js +1865 -0
- package/components/form-control/dropdown-box/index.js +292 -0
- package/components/form-control/form/context.js +5 -0
- package/components/form-control/form/index.js +41 -0
- package/components/form-control/form-group/index.js +118 -0
- package/components/form-control/helper-text/index.js +71 -0
- package/components/form-control/input-base/index.js +733 -0
- package/components/form-control/label/index.js +73 -0
- package/components/form-control/money-input/index.js +491 -0
- package/components/form-control/number-input/index.js +633 -0
- package/components/form-control/phone-input/index.js +433 -0
- package/components/form-control/radio/index.js +263 -0
- package/components/form-control/text-input/index.js +523 -0
- package/components/form-control/time-picker/index.js +829 -0
- package/components/form-control/time-picker/swiper.js +590 -0
- package/components/form-control/toggle/index.js +250 -0
- package/components/form-view/helper-text.js +33 -0
- package/components/form-view/index.js +107 -0
- package/components/form-view/input.js +129 -0
- package/components/form-view/label.js +38 -0
- package/components/index.js +100 -0
- package/components/list/list-item-action.js +82 -0
- package/components/list/list-item-icon.js +76 -0
- package/components/list/list-item-text.js +57 -0
- package/components/list/list-item.js +114 -0
- package/components/list/list.js +155 -0
- package/components/list/sub-header.js +61 -0
- package/components/modal/body.js +71 -0
- package/components/modal/context.js +6 -0
- package/components/modal/footer.js +63 -0
- package/components/modal/header.js +108 -0
- package/components/modal/index.js +69 -0
- package/components/modal/modal.js +339 -0
- package/components/others/extra/index.js +124 -0
- package/components/others/scrollbar/index.js +95 -0
- package/components/paging/page-info.js +298 -0
- package/components/paging/page-selector.js +281 -0
- package/components/paper/index.js +119 -0
- package/components/popover/index.js +417 -0
- package/components/popup/danger_popup.js +215 -0
- package/components/popup/index.js +469 -0
- package/components/popup/proposals_popup.js +364 -0
- package/components/popup/v2/danger-popup.js +17 -0
- package/components/popup/v2/index.js +460 -0
- package/components/popup/v2/info-popup.js +17 -0
- package/components/popup/v2/success-popup.js +17 -0
- package/components/popup/v2/warning-popup.js +17 -0
- package/components/popup/v2/yes-no-popup.js +20 -0
- package/components/progress/circular.js +414 -0
- package/components/progress/linear.js +327 -0
- package/components/rating/index.js +392 -0
- package/components/slider/slider-container.js +356 -0
- package/components/slider/slider-item.js +183 -0
- package/components/status/index.js +123 -0
- package/components/tab/context.js +3 -0
- package/components/tab/tab-container.js +83 -0
- package/components/tab/tab-header.js +133 -0
- package/components/tab/tab-panel.js +51 -0
- package/components/tab/tab.js +206 -0
- package/components/tooltip/index.js +602 -0
- package/components/tooltip/portal.js +13 -0
- package/components/transfer/index.js +489 -0
- package/components/tree-view/css.js +94 -0
- package/components/tree-view/index.js +1009 -0
- package/components/typography/index.js +218 -0
- package/css/styles.css +1 -0
- package/css/styles.css.map +1 -0
- package/global/index.js +175 -0
- package/icons/basic.js +6326 -0
- package/icons/effect.js +171 -0
- package/icons/general/clock/clock.js +21 -0
- package/icons/general/color-handler/background.js +41 -0
- package/icons/general/color-handler/text.js +41 -0
- package/icons/general/emoji/emoji.js +35 -0
- package/icons/general/font-properties/bold.js +21 -0
- package/icons/general/font-properties/font-family.js +35 -0
- package/icons/general/font-properties/font-size.js +27 -0
- package/icons/general/font-properties/italic.js +21 -0
- package/icons/general/font-properties/underline.js +31 -0
- package/icons/general/hyperlink/hyperlink.js +38 -0
- package/icons/general/indent/decrease.js +55 -0
- package/icons/general/indent/increase.js +55 -0
- package/icons/general/index.js +21 -0
- package/icons/general/list/bullets.js +77 -0
- package/icons/general/list/numbering.js +71 -0
- package/icons/general/picture/picture.js +21 -0
- package/icons/general/steps/redo.js +21 -0
- package/icons/general/steps/undo.js +21 -0
- package/icons/general/text-align/center.js +21 -0
- package/icons/general/text-align/justify.js +21 -0
- package/icons/general/text-align/left.js +21 -0
- package/icons/general/text-align/right.js +21 -0
- package/icons/index.js +3 -0
- package/icons/menu/dhr.js +2440 -0
- package/icons/menu/erp.js +490 -0
- package/icons/menu/index.js +5 -0
- package/icons/menu/v2/index.js +52 -0
- package/locale/index.js +11 -0
- package/package.json +45 -0
- package/readme.md +517 -0
- package/styles/animation.js +890 -0
- package/styles/color-helper.js +504 -0
- package/styles/colors.js +306 -0
- package/styles/general.js +48 -0
- package/styles/media-queries.js +10 -0
- package/styles/typography.js +122 -0
- package/styles/utils.js +10 -0
- package/theme/index.js +5 -0
- package/theme/make-styles.js +95 -0
- package/theme/set-theme.js +39 -0
- package/theme/settings.js +230 -0
- package/theme/theme-provider.js +68 -0
- package/theme/theme.js +56 -0
- package/theme/with-styles.js +17 -0
- package/theme/with-theme.js +11 -0
- package/utils/array/array.js +186 -0
- package/utils/console.js +34 -0
- package/utils/date.js +471 -0
- package/utils/error/error.js +62 -0
- package/utils/error/errors.js +247 -0
- package/utils/getFileType.js +32 -0
- package/utils/index.js +23 -0
- package/utils/iterator.js +45 -0
- package/utils/map-parent.js +53 -0
- package/utils/number.js +64 -0
- package/utils/object/extend.js +57 -0
- package/utils/object/object.js +68 -0
- package/utils/parseHTML.js +8 -0
- package/utils/promisify.js +38 -0
- package/utils/randomString.js +33 -0
- package/utils/remove-unicode.js +6 -0
- package/utils/render-portal.js +90 -0
- package/utils/renderHTML.js +21 -0
- package/utils/renderIcon.js +57 -0
- package/utils/string/capitalize.js +3 -0
- package/utils/string/capitalizeSentenceCase.js +10 -0
- package/utils/string/string.js +81 -0
- package/utils/type.js +90 -0
- package/utils/updatePosition.js +36 -0
- package/utils/useOnClickOutside.js +23 -0
- package/utils/usePortal.js +56 -0
- package/utils/validate.js +149 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
/** @jsxRuntime classic */
|
|
4
|
+
|
|
5
|
+
/** @jsx jsx */
|
|
6
|
+
import { jsx } from '@emotion/core';
|
|
7
|
+
import { memo, forwardRef } from 'react';
|
|
8
|
+
import PopupV2 from '.';
|
|
9
|
+
const InfoPopup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({ ...props
|
|
10
|
+
}, ref) => {
|
|
11
|
+
return jsx(PopupV2, _extends({
|
|
12
|
+
ref: ref
|
|
13
|
+
}, props, {
|
|
14
|
+
type: 'info'
|
|
15
|
+
}));
|
|
16
|
+
}));
|
|
17
|
+
export default InfoPopup;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
/** @jsxRuntime classic */
|
|
4
|
+
|
|
5
|
+
/** @jsx jsx */
|
|
6
|
+
import { jsx } from '@emotion/core';
|
|
7
|
+
import { memo, forwardRef } from 'react';
|
|
8
|
+
import PopupV2 from '.';
|
|
9
|
+
const SuccessPopup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({ ...props
|
|
10
|
+
}, ref) => {
|
|
11
|
+
return jsx(PopupV2, _extends({
|
|
12
|
+
ref: ref
|
|
13
|
+
}, props, {
|
|
14
|
+
type: 'success'
|
|
15
|
+
}));
|
|
16
|
+
}));
|
|
17
|
+
export default SuccessPopup;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
/** @jsxRuntime classic */
|
|
4
|
+
|
|
5
|
+
/** @jsx jsx */
|
|
6
|
+
import { jsx } from '@emotion/core';
|
|
7
|
+
import { memo, forwardRef } from 'react';
|
|
8
|
+
import PopupV2 from '.';
|
|
9
|
+
const WarningPopup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({ ...props
|
|
10
|
+
}, ref) => {
|
|
11
|
+
return jsx(PopupV2, _extends({
|
|
12
|
+
ref: ref
|
|
13
|
+
}, props, {
|
|
14
|
+
type: 'warning'
|
|
15
|
+
}));
|
|
16
|
+
}));
|
|
17
|
+
export default WarningPopup;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
/** @jsxRuntime classic */
|
|
4
|
+
|
|
5
|
+
/** @jsx jsx */
|
|
6
|
+
import { jsx } from '@emotion/core';
|
|
7
|
+
import { memo, forwardRef } from 'react';
|
|
8
|
+
import PopupV2 from '.';
|
|
9
|
+
const YesNoPopup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
10
|
+
onConfirm,
|
|
11
|
+
onCancel,
|
|
12
|
+
...props
|
|
13
|
+
}, ref) => {
|
|
14
|
+
return jsx(PopupV2, _extends({
|
|
15
|
+
ref: ref
|
|
16
|
+
}, props, {
|
|
17
|
+
type: 'yesno'
|
|
18
|
+
}));
|
|
19
|
+
}));
|
|
20
|
+
export default YesNoPopup;
|
|
@@ -0,0 +1,414 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
/** @jsxRuntime classic */
|
|
4
|
+
|
|
5
|
+
/** @jsx jsx */
|
|
6
|
+
import { css, jsx, keyframes } from '@emotion/core';
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
|
+
import { forwardRef, memo, useMemo, useRef } from 'react';
|
|
9
|
+
import theme from '../../theme/settings';
|
|
10
|
+
|
|
11
|
+
const validatePercent = percent => {
|
|
12
|
+
let per = +percent.toString().replace('%', '');
|
|
13
|
+
return Math.max(Math.min(per, 100), 0);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const getDimension = size => {
|
|
17
|
+
let rect, strokeWidth, labelStyle;
|
|
18
|
+
|
|
19
|
+
switch (size) {
|
|
20
|
+
case 'xl':
|
|
21
|
+
case 'extraLarge':
|
|
22
|
+
labelStyle = { ...theme.typography.h1
|
|
23
|
+
};
|
|
24
|
+
rect = 120;
|
|
25
|
+
strokeWidth = 16;
|
|
26
|
+
break;
|
|
27
|
+
|
|
28
|
+
case 'lg':
|
|
29
|
+
case 'large':
|
|
30
|
+
labelStyle = { ...theme.typography.h2
|
|
31
|
+
};
|
|
32
|
+
rect = 80;
|
|
33
|
+
strokeWidth = 12;
|
|
34
|
+
break;
|
|
35
|
+
|
|
36
|
+
case 'md':
|
|
37
|
+
case 'medium':
|
|
38
|
+
labelStyle = { ...theme.typography.p1
|
|
39
|
+
};
|
|
40
|
+
rect = 60;
|
|
41
|
+
strokeWidth = 8;
|
|
42
|
+
break;
|
|
43
|
+
|
|
44
|
+
case 'sm':
|
|
45
|
+
case 'small':
|
|
46
|
+
labelStyle = { ...theme.typography.p2
|
|
47
|
+
};
|
|
48
|
+
rect = 40;
|
|
49
|
+
strokeWidth = 6;
|
|
50
|
+
break;
|
|
51
|
+
|
|
52
|
+
case 'xs':
|
|
53
|
+
case 'extraSmall':
|
|
54
|
+
labelStyle = { ...theme.typography.p3
|
|
55
|
+
};
|
|
56
|
+
rect = 20;
|
|
57
|
+
strokeWidth = 4;
|
|
58
|
+
break;
|
|
59
|
+
|
|
60
|
+
default:
|
|
61
|
+
labelStyle = { ...theme.typography.h2
|
|
62
|
+
};
|
|
63
|
+
rect = 80;
|
|
64
|
+
strokeWidth = 8;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
;
|
|
68
|
+
return {
|
|
69
|
+
labelStyle,
|
|
70
|
+
rect,
|
|
71
|
+
strokeWidth
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Determinate circular progress
|
|
76
|
+
*/
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
const Determinate = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
80
|
+
background,
|
|
81
|
+
circleRef,
|
|
82
|
+
color,
|
|
83
|
+
direction,
|
|
84
|
+
duration,
|
|
85
|
+
percentColor,
|
|
86
|
+
percent,
|
|
87
|
+
showValue,
|
|
88
|
+
size,
|
|
89
|
+
strokeWidth,
|
|
90
|
+
width,
|
|
91
|
+
...props
|
|
92
|
+
}, ref) => {
|
|
93
|
+
if (!ref) ref = useRef(null);
|
|
94
|
+
if (!circleRef) circleRef = useRef(null);
|
|
95
|
+
const dimension = getDimension(size);
|
|
96
|
+
const containerW = width ? Math.max(24, width) : dimension.rect * 2;
|
|
97
|
+
const circleStrokeW = strokeWidth ? Math.max(2, strokeWidth) : dimension.strokeWidth;
|
|
98
|
+
const radius = containerW / 2 - circleStrokeW;
|
|
99
|
+
const circumference = radius * 2 * Math.PI;
|
|
100
|
+
|
|
101
|
+
const getDirection = direction => {
|
|
102
|
+
let angle;
|
|
103
|
+
|
|
104
|
+
switch (direction) {
|
|
105
|
+
case 'right':
|
|
106
|
+
angle = 0;
|
|
107
|
+
break;
|
|
108
|
+
|
|
109
|
+
case 'left':
|
|
110
|
+
angle = -180;
|
|
111
|
+
break;
|
|
112
|
+
|
|
113
|
+
case 'bottom':
|
|
114
|
+
angle = 90;
|
|
115
|
+
break;
|
|
116
|
+
|
|
117
|
+
case 'top':
|
|
118
|
+
angle = -90;
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return angle;
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* style
|
|
126
|
+
*/
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
const containerCSS = css`
|
|
130
|
+
border-radius: 50%;
|
|
131
|
+
height : ${containerW}px;
|
|
132
|
+
overflow : hidden;
|
|
133
|
+
position : relative;
|
|
134
|
+
width : ${containerW}px;
|
|
135
|
+
`;
|
|
136
|
+
const circleBackgroundCSS = css`
|
|
137
|
+
border-radius: 50%;
|
|
138
|
+
fill : transparent;
|
|
139
|
+
overflow : hidden;
|
|
140
|
+
stroke : ${background};
|
|
141
|
+
stroke-width : ${circleStrokeW}px;
|
|
142
|
+
`;
|
|
143
|
+
const circleMainCSS = css`
|
|
144
|
+
border-radius : 50%;
|
|
145
|
+
fill : transparent;
|
|
146
|
+
overflow : hidden;
|
|
147
|
+
stroke : ${color};
|
|
148
|
+
stroke-dasharray : ${`${circumference} ${circumference}`};
|
|
149
|
+
stroke-dashoffset: ${circumference - validatePercent(percent) / 100 * circumference};
|
|
150
|
+
stroke-linecap : round;
|
|
151
|
+
stroke-width : ${circleStrokeW}px;
|
|
152
|
+
transform : rotate(${getDirection(direction)}deg);
|
|
153
|
+
transform-origin : 50% 50%;
|
|
154
|
+
transition : stroke-dashoffset ${duration}s cubic-bezier(0.770, 0.000, 0.175, 1.000); /* easeInOutQuart */
|
|
155
|
+
`;
|
|
156
|
+
const textCSS = css`
|
|
157
|
+
fill : ${percentColor ? percentColor : color};
|
|
158
|
+
font-family: ${dimension.labelStyle.fontFamily};
|
|
159
|
+
font-size : ${dimension.labelStyle.fontSize};
|
|
160
|
+
line-height: ${dimension.labelStyle.lineHeight};
|
|
161
|
+
text-anchor: middle;
|
|
162
|
+
user-select: none;
|
|
163
|
+
`;
|
|
164
|
+
const CircleBackgroundMemo = useMemo(() => jsx("circle", {
|
|
165
|
+
css: circleBackgroundCSS,
|
|
166
|
+
cx: containerW / 2,
|
|
167
|
+
cy: containerW / 2,
|
|
168
|
+
r: radius
|
|
169
|
+
}), [background, direction, size, strokeWidth, width]);
|
|
170
|
+
const CircleMainMemo = useMemo(() => jsx("circle", {
|
|
171
|
+
css: circleMainCSS,
|
|
172
|
+
cx: containerW / 2,
|
|
173
|
+
cy: containerW / 2,
|
|
174
|
+
r: radius,
|
|
175
|
+
ref: circleRef
|
|
176
|
+
}), [color, direction, percent, size, strokeWidth, width]);
|
|
177
|
+
const PercentTextMemo = useMemo(() => showValue && jsx("text", {
|
|
178
|
+
css: textCSS,
|
|
179
|
+
dominantBaseline: 'middle',
|
|
180
|
+
x: containerW / 2,
|
|
181
|
+
y: containerW / 2 + containerW / 80
|
|
182
|
+
}, validatePercent(percent), "%"), [color, percentColor, percent, size, strokeWidth, showValue, width]);
|
|
183
|
+
return jsx("svg", _extends({}, props, {
|
|
184
|
+
css: containerCSS,
|
|
185
|
+
ref: ref
|
|
186
|
+
}), CircleBackgroundMemo, CircleMainMemo, PercentTextMemo);
|
|
187
|
+
}));
|
|
188
|
+
Determinate.defaultProps = {
|
|
189
|
+
background: theme.colors.bgProgress,
|
|
190
|
+
color: theme.colors.info,
|
|
191
|
+
direction: 'top',
|
|
192
|
+
duration: 2,
|
|
193
|
+
percent: 25,
|
|
194
|
+
showValue: false,
|
|
195
|
+
size: 'medium'
|
|
196
|
+
};
|
|
197
|
+
Determinate.propTypes = {
|
|
198
|
+
/** Color for background stroke of the circular progress. */
|
|
199
|
+
background: PropTypes.string,
|
|
200
|
+
|
|
201
|
+
/** Color for main stroke of the circular progress. */
|
|
202
|
+
color: PropTypes.string,
|
|
203
|
+
|
|
204
|
+
/** Direction of the start point. */
|
|
205
|
+
direction: PropTypes.oneOf(['top', 'right', 'bottom', 'left']),
|
|
206
|
+
|
|
207
|
+
/** Time to processing. */
|
|
208
|
+
duration: PropTypes.number,
|
|
209
|
+
|
|
210
|
+
/** The percent of the progress. */
|
|
211
|
+
percent: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
212
|
+
|
|
213
|
+
/** Color percent-label of the progress. */
|
|
214
|
+
percentColor: PropTypes.string,
|
|
215
|
+
|
|
216
|
+
/** It's boolean to show the percent-label. */
|
|
217
|
+
showValue: PropTypes.bool,
|
|
218
|
+
|
|
219
|
+
/** Static dimensions default. */
|
|
220
|
+
size: PropTypes.oneOf(['xl', 'lg', 'md', 'sm', 'xs', 'extraLarge', 'large', 'medium', 'small', 'extraSmall']),
|
|
221
|
+
|
|
222
|
+
/** Dynamic width dimensions of the progress circle. */
|
|
223
|
+
strokeWidth: PropTypes.number,
|
|
224
|
+
|
|
225
|
+
/** Dynamic width and height dimensions of the container. */
|
|
226
|
+
width: PropTypes.number
|
|
227
|
+
};
|
|
228
|
+
export const DeterminateCircularProgress = Determinate;
|
|
229
|
+
/**
|
|
230
|
+
* Indeterminate circular progress
|
|
231
|
+
*/
|
|
232
|
+
|
|
233
|
+
const Indeterminate = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
234
|
+
background,
|
|
235
|
+
circleRef,
|
|
236
|
+
color,
|
|
237
|
+
size,
|
|
238
|
+
strokeWidth,
|
|
239
|
+
width,
|
|
240
|
+
...props
|
|
241
|
+
}, ref) => {
|
|
242
|
+
if (!ref) ref = useRef(null);
|
|
243
|
+
if (!circleRef) circleRef = useRef(null);
|
|
244
|
+
const dimension = getDimension(size);
|
|
245
|
+
const containerW = width ? Math.max(16, width) : dimension.rect * 2;
|
|
246
|
+
const circleStrokeW = strokeWidth ? Math.max(2, strokeWidth) : dimension.strokeWidth;
|
|
247
|
+
const radius = containerW / 2 - circleStrokeW;
|
|
248
|
+
const radiusX10 = radius * 10;
|
|
249
|
+
const keyframeRotate = keyframes`
|
|
250
|
+
100%{ transform: rotate(360deg);}
|
|
251
|
+
`;
|
|
252
|
+
|
|
253
|
+
const keyframeDash = r => keyframes`
|
|
254
|
+
0%{
|
|
255
|
+
stroke-dasharray: 1, ${r};
|
|
256
|
+
stroke-dashoffset: 0;
|
|
257
|
+
}
|
|
258
|
+
40%{
|
|
259
|
+
stroke-dasharray: ${r * 89 / 200}, ${r};
|
|
260
|
+
stroke-dashoffset: -${r * 35 / 200};
|
|
261
|
+
}
|
|
262
|
+
100%{
|
|
263
|
+
stroke-dasharray: ${r * 89 / 200}, ${r};
|
|
264
|
+
stroke-dashoffset: -${r * 124 / 200};
|
|
265
|
+
}
|
|
266
|
+
`;
|
|
267
|
+
/**
|
|
268
|
+
* style
|
|
269
|
+
*/
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
const containerCSS = css`
|
|
273
|
+
animation : ${keyframeRotate} 2s linear infinite;
|
|
274
|
+
border-radius: 50%;
|
|
275
|
+
height : ${containerW}px;
|
|
276
|
+
overflow : hidden;
|
|
277
|
+
position : relative;
|
|
278
|
+
width : ${containerW}px;
|
|
279
|
+
`;
|
|
280
|
+
const circleBackgroundCSS = css`
|
|
281
|
+
border-radius : 50%;
|
|
282
|
+
fill : transparent;
|
|
283
|
+
overflow : hidden;
|
|
284
|
+
stroke : ${background};
|
|
285
|
+
stroke-linecap: round;
|
|
286
|
+
stroke-width : ${circleStrokeW};
|
|
287
|
+
`;
|
|
288
|
+
const circleMainCSS = css`
|
|
289
|
+
animation : ${keyframeDash(radiusX10)} 2s ease-in-out infinite;
|
|
290
|
+
border-radius : 50%;
|
|
291
|
+
fill : transparent;
|
|
292
|
+
overflow : hidden;
|
|
293
|
+
stroke : ${color};
|
|
294
|
+
stroke-dasharray : 10, ${radiusX10};
|
|
295
|
+
stroke-dashoffset: 0;
|
|
296
|
+
stroke-linecap : round;
|
|
297
|
+
stroke-width : ${circleStrokeW};
|
|
298
|
+
`;
|
|
299
|
+
/**
|
|
300
|
+
* component
|
|
301
|
+
*/
|
|
302
|
+
|
|
303
|
+
const CircleBackgroundMemo = useMemo(() => jsx("circle", {
|
|
304
|
+
css: circleBackgroundCSS,
|
|
305
|
+
cx: containerW / 2,
|
|
306
|
+
cy: containerW / 2,
|
|
307
|
+
r: radius
|
|
308
|
+
}), [background, size, strokeWidth, width]);
|
|
309
|
+
const CircleMainMemo = useMemo(() => jsx("circle", {
|
|
310
|
+
css: circleMainCSS,
|
|
311
|
+
cx: containerW / 2,
|
|
312
|
+
cy: containerW / 2,
|
|
313
|
+
r: radius,
|
|
314
|
+
ref: circleRef
|
|
315
|
+
}), [color, size, strokeWidth, width]);
|
|
316
|
+
return jsx("svg", _extends({}, props, {
|
|
317
|
+
css: containerCSS,
|
|
318
|
+
ref: ref
|
|
319
|
+
}), CircleBackgroundMemo, CircleMainMemo);
|
|
320
|
+
}));
|
|
321
|
+
Indeterminate.defaultProps = {
|
|
322
|
+
background: theme.colors.bgProgress,
|
|
323
|
+
color: theme.colors.info,
|
|
324
|
+
size: 'medium'
|
|
325
|
+
};
|
|
326
|
+
Indeterminate.propTypes = {
|
|
327
|
+
/** Color for background stroke of the circular progress. */
|
|
328
|
+
background: PropTypes.string,
|
|
329
|
+
|
|
330
|
+
/** Color for main stroke of the circular progress. */
|
|
331
|
+
color: PropTypes.string,
|
|
332
|
+
|
|
333
|
+
/** Static dimensions default. */
|
|
334
|
+
size: PropTypes.oneOf(['xl', 'lg', 'md', 'sm', 'xs', 'extraLarge', 'large', 'medium', 'small', 'extraSmall']),
|
|
335
|
+
|
|
336
|
+
/** Dynamic width dimensions of the progress circle. */
|
|
337
|
+
strokeWidth: PropTypes.number,
|
|
338
|
+
|
|
339
|
+
/** Dynamic width and height dimensions of the container. */
|
|
340
|
+
width: PropTypes.number
|
|
341
|
+
};
|
|
342
|
+
export const IndeterminateCircularProgress = Indeterminate;
|
|
343
|
+
/**
|
|
344
|
+
* Circular progress
|
|
345
|
+
*/
|
|
346
|
+
|
|
347
|
+
const CircularProgress = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
348
|
+
determinate,
|
|
349
|
+
direction,
|
|
350
|
+
duration,
|
|
351
|
+
percent,
|
|
352
|
+
percentColor,
|
|
353
|
+
showValue,
|
|
354
|
+
...props
|
|
355
|
+
}, ref) => {
|
|
356
|
+
if (!ref) ref = useRef(null);
|
|
357
|
+
return determinate ? jsx(DeterminateCircularProgress, _extends({
|
|
358
|
+
direction: direction,
|
|
359
|
+
duration: duration,
|
|
360
|
+
percent: percent,
|
|
361
|
+
percentColor: percentColor,
|
|
362
|
+
showValue: true
|
|
363
|
+
}, props, {
|
|
364
|
+
ref: ref
|
|
365
|
+
})) : jsx(IndeterminateCircularProgress, _extends({}, props, {
|
|
366
|
+
ref: ref
|
|
367
|
+
}));
|
|
368
|
+
}));
|
|
369
|
+
CircularProgress.defaultProps = {
|
|
370
|
+
background: theme.colors.bgProgress,
|
|
371
|
+
color: theme.colors.info,
|
|
372
|
+
determinate: false,
|
|
373
|
+
direction: 'top',
|
|
374
|
+
duration: 1,
|
|
375
|
+
percent: 25,
|
|
376
|
+
percentColor: theme.colors.info,
|
|
377
|
+
showValue: false,
|
|
378
|
+
size: 'medium'
|
|
379
|
+
};
|
|
380
|
+
CircularProgress.propTypes = {
|
|
381
|
+
/** Color for background stroke of the circular progress. */
|
|
382
|
+
background: PropTypes.string,
|
|
383
|
+
|
|
384
|
+
/** Color for main stroke of the circular progress. */
|
|
385
|
+
color: PropTypes.string,
|
|
386
|
+
|
|
387
|
+
/** Determinate or Indeterminate. */
|
|
388
|
+
determinate: PropTypes.bool,
|
|
389
|
+
|
|
390
|
+
/** Direction of the start point. */
|
|
391
|
+
direction: PropTypes.oneOf(['top', 'right', 'bottom', 'left']),
|
|
392
|
+
|
|
393
|
+
/** Time to processing. */
|
|
394
|
+
duration: PropTypes.number,
|
|
395
|
+
|
|
396
|
+
/** The percent of the determinate progress. */
|
|
397
|
+
percent: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
398
|
+
|
|
399
|
+
/** Color percent-label of the progress. */
|
|
400
|
+
percentColor: PropTypes.string,
|
|
401
|
+
|
|
402
|
+
/** It's boolean to show the percent-label. */
|
|
403
|
+
showValue: PropTypes.bool,
|
|
404
|
+
|
|
405
|
+
/** Static dimensions default. */
|
|
406
|
+
size: PropTypes.oneOf(['xl', 'lg', 'md', 'sm', 'xs', 'extraLarge', 'large', 'medium', 'small', 'extraSmall']),
|
|
407
|
+
|
|
408
|
+
/** Dynamic width dimensions of the progress circle. */
|
|
409
|
+
strokeWidth: PropTypes.number,
|
|
410
|
+
|
|
411
|
+
/** Dynamic width and height dimensions of the container. */
|
|
412
|
+
width: PropTypes.number
|
|
413
|
+
};
|
|
414
|
+
export default CircularProgress;
|