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,155 @@
|
|
|
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 { memo, useRef, forwardRef, useEffect, useMemo } from 'react';
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
|
+
import { jsx, css } from '@emotion/core';
|
|
9
|
+
import theme from '../../theme/settings';
|
|
10
|
+
const levels = [0, 1, 'second', 'third', 'fourth', 'fifth'];
|
|
11
|
+
const List = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
12
|
+
className,
|
|
13
|
+
width,
|
|
14
|
+
maxWidth,
|
|
15
|
+
children,
|
|
16
|
+
style,
|
|
17
|
+
scrollAble,
|
|
18
|
+
maxHeight,
|
|
19
|
+
level,
|
|
20
|
+
refs,
|
|
21
|
+
...props
|
|
22
|
+
}, ref) => {
|
|
23
|
+
if (!ref) {
|
|
24
|
+
ref = useRef(null);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const ListRoot = css`
|
|
28
|
+
display: block;
|
|
29
|
+
position: relative;
|
|
30
|
+
width: ${isNaN(width) ? width : width + 'px'};
|
|
31
|
+
max-width: ${isNaN(maxWidth) ? maxWidth : maxWidth + 'px'};
|
|
32
|
+
height: auto;
|
|
33
|
+
padding: 5px 0;
|
|
34
|
+
background-color: #FFF;
|
|
35
|
+
box-sizing: border-box;
|
|
36
|
+
&.scroll-able {
|
|
37
|
+
max-height: ${maxHeight ? isNaN(maxHeight) ? maxHeight : maxHeight + 'px' : '300px'};
|
|
38
|
+
overflow-y: auto;
|
|
39
|
+
padding-top: 0;
|
|
40
|
+
&::-webkit-scrollbar {
|
|
41
|
+
width: 6px;
|
|
42
|
+
background-color: white;
|
|
43
|
+
border-radius: 4px;
|
|
44
|
+
}
|
|
45
|
+
&::-webkit-scrollbar-thumb{
|
|
46
|
+
border-radius: 10px;
|
|
47
|
+
mix-blend-mode: normal;
|
|
48
|
+
background-color: ${theme.colors.disabled};
|
|
49
|
+
background-clip: content-box;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
.second {
|
|
53
|
+
padding: 0;
|
|
54
|
+
.DGN-UI-List-Item {
|
|
55
|
+
padding-left: 32px;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
.third {
|
|
59
|
+
padding: 0;
|
|
60
|
+
.DGN-UI-List-Item {
|
|
61
|
+
padding-left: 48px;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
.fourth {
|
|
65
|
+
padding: 0;
|
|
66
|
+
.DGN-UI-List-Item {
|
|
67
|
+
padding-left: 64px;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
.fifth {
|
|
71
|
+
padding: 0;
|
|
72
|
+
.DGN-UI-List-Item {
|
|
73
|
+
padding-left: 80px;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
`;
|
|
77
|
+
useEffect(() => {
|
|
78
|
+
if (refs) refs(ref);
|
|
79
|
+
}, []);
|
|
80
|
+
useEffect(() => {
|
|
81
|
+
if (level && level > 1 && level < levels.length) {
|
|
82
|
+
ref.current.classList.add(levels[level]);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return () => {
|
|
86
|
+
if (ref.current && level && level > 1 && level < levels.length) {
|
|
87
|
+
ref.current.classList.remove(levels[level]);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
}, [level]);
|
|
91
|
+
useEffect(() => {
|
|
92
|
+
if (scrollAble || maxHeight) {
|
|
93
|
+
ref.current.classList.add('scroll-able');
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return () => {
|
|
97
|
+
if (ref.current && (scrollAble || maxHeight)) {
|
|
98
|
+
ref.current.classList.remove('scroll-able');
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
}, [scrollAble, maxHeight]);
|
|
102
|
+
useEffect(() => {
|
|
103
|
+
if (style) {
|
|
104
|
+
Object.assign(ref.current.style, style);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return () => {
|
|
108
|
+
if (style && ref.current) {
|
|
109
|
+
ref.current.style = null;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
}, [style]);
|
|
113
|
+
const ListView = useMemo(() => jsx("div", _extends({
|
|
114
|
+
css: ListRoot,
|
|
115
|
+
ref: ref,
|
|
116
|
+
className: ('DGN-UI-List ' + className).trim()
|
|
117
|
+
}, props), children), [children]);
|
|
118
|
+
return ListView;
|
|
119
|
+
}));
|
|
120
|
+
List.defaultProps = {
|
|
121
|
+
scrollAble: false,
|
|
122
|
+
width: '100%',
|
|
123
|
+
maxWidth: '360px',
|
|
124
|
+
className: ''
|
|
125
|
+
};
|
|
126
|
+
List.propTypes = {
|
|
127
|
+
/** fixed height of List and positive scroll list items */
|
|
128
|
+
scrollAble: PropTypes.bool,
|
|
129
|
+
|
|
130
|
+
/** class for List */
|
|
131
|
+
className: PropTypes.string,
|
|
132
|
+
|
|
133
|
+
/** width of list */
|
|
134
|
+
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
135
|
+
|
|
136
|
+
/** max width */
|
|
137
|
+
maxWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
138
|
+
|
|
139
|
+
/** fixed height of List and positive scroll list items */
|
|
140
|
+
maxHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
141
|
+
|
|
142
|
+
/** represents the level of nested List, The higher the level, the content will be pushed */
|
|
143
|
+
level: PropTypes.number,
|
|
144
|
+
// [1,2,3,4,5]
|
|
145
|
+
|
|
146
|
+
/** the function to get ref */
|
|
147
|
+
refs: PropTypes.func,
|
|
148
|
+
|
|
149
|
+
/** style inline for List */
|
|
150
|
+
style: PropTypes.object,
|
|
151
|
+
|
|
152
|
+
/** include list subheader, list items */
|
|
153
|
+
children: PropTypes.node
|
|
154
|
+
};
|
|
155
|
+
export default List;
|
|
@@ -0,0 +1,61 @@
|
|
|
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 { memo, useRef, forwardRef, useEffect, useMemo } from 'react';
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
|
+
import { jsx, css } from '@emotion/core';
|
|
9
|
+
import theme from '../../theme/settings';
|
|
10
|
+
import { Typography } from '../';
|
|
11
|
+
const ListSubHeader = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
12
|
+
children,
|
|
13
|
+
style,
|
|
14
|
+
refs,
|
|
15
|
+
...props
|
|
16
|
+
}, ref) => {
|
|
17
|
+
if (!ref) {
|
|
18
|
+
ref = useRef(null);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const ListSubHeaderRoot = css`
|
|
22
|
+
display: block;
|
|
23
|
+
position: sticky;
|
|
24
|
+
top: 0;
|
|
25
|
+
width: 100%;
|
|
26
|
+
height: auto;
|
|
27
|
+
padding: 0 16px;
|
|
28
|
+
background-color: inherit;
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
user-select: none;
|
|
31
|
+
text-align: left;
|
|
32
|
+
z-index: 2;
|
|
33
|
+
`;
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
if (refs) refs(ref);
|
|
36
|
+
}, []);
|
|
37
|
+
const ListSubHeaderRootView = useMemo(() => jsx("div", _extends({
|
|
38
|
+
css: ListSubHeaderRoot,
|
|
39
|
+
ref: ref,
|
|
40
|
+
style: style
|
|
41
|
+
}, props), jsx(Typography, {
|
|
42
|
+
type: 'h4',
|
|
43
|
+
color: theme.colors.disabled,
|
|
44
|
+
style: {
|
|
45
|
+
textTransform: 'initial',
|
|
46
|
+
lineHeight: '32px'
|
|
47
|
+
}
|
|
48
|
+
}, children)), [children]);
|
|
49
|
+
return ListSubHeaderRootView;
|
|
50
|
+
}));
|
|
51
|
+
ListSubHeader.propTypes = {
|
|
52
|
+
/** the function to get ref of ListSubHeader */
|
|
53
|
+
refs: PropTypes.func,
|
|
54
|
+
|
|
55
|
+
/** style inline of ListSubHeader */
|
|
56
|
+
style: PropTypes.object,
|
|
57
|
+
|
|
58
|
+
/** element to display is a subtitle */
|
|
59
|
+
children: PropTypes.node
|
|
60
|
+
};
|
|
61
|
+
export default ListSubHeader;
|
|
@@ -0,0 +1,71 @@
|
|
|
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 { memo, useMemo, useEffect, forwardRef } from 'react';
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
|
+
import { jsx, css } from '@emotion/core';
|
|
9
|
+
import { useTheme } from '../../theme';
|
|
10
|
+
const {
|
|
11
|
+
colors: {
|
|
12
|
+
scrollbar
|
|
13
|
+
}
|
|
14
|
+
} = useTheme();
|
|
15
|
+
const ModalBody = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
16
|
+
children,
|
|
17
|
+
className,
|
|
18
|
+
style,
|
|
19
|
+
refs,
|
|
20
|
+
...props
|
|
21
|
+
}, ref) => {
|
|
22
|
+
const ModalBodyBox = css`
|
|
23
|
+
display: block;
|
|
24
|
+
position: relative;
|
|
25
|
+
width: 100%;
|
|
26
|
+
height: auto;
|
|
27
|
+
padding: 2px 24px;
|
|
28
|
+
margin: 10px 0;
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
overflow: auto;
|
|
31
|
+
order: 2;
|
|
32
|
+
&::-webkit-scrollbar {
|
|
33
|
+
width: 24px;
|
|
34
|
+
}
|
|
35
|
+
&::-webkit-scrollbar-thumb{
|
|
36
|
+
border-radius: 10px;
|
|
37
|
+
mix-blend-mode: normal;
|
|
38
|
+
background-color: ${scrollbar};
|
|
39
|
+
background-clip: content-box;
|
|
40
|
+
border: 8px solid transparent;
|
|
41
|
+
}
|
|
42
|
+
`;
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
!!refs && refs(ref);
|
|
45
|
+
}, []);
|
|
46
|
+
const Body = useMemo(() => jsx("div", _extends({
|
|
47
|
+
css: ModalBodyBox,
|
|
48
|
+
className: 'DGN-UI-Modal-Body ' + className
|
|
49
|
+
}, props, {
|
|
50
|
+
style: style,
|
|
51
|
+
ref: ref
|
|
52
|
+
}), children), [children, style]);
|
|
53
|
+
return Body;
|
|
54
|
+
}));
|
|
55
|
+
ModalBody.defaultProps = {
|
|
56
|
+
className: ''
|
|
57
|
+
};
|
|
58
|
+
ModalBody.propTypes = {
|
|
59
|
+
/** customize style inline */
|
|
60
|
+
style: PropTypes.object,
|
|
61
|
+
|
|
62
|
+
/** class of ModalBody */
|
|
63
|
+
className: PropTypes.string,
|
|
64
|
+
|
|
65
|
+
/** get modal header ref by function */
|
|
66
|
+
refs: PropTypes.func,
|
|
67
|
+
|
|
68
|
+
/** child content in header (like title) */
|
|
69
|
+
children: PropTypes.node
|
|
70
|
+
};
|
|
71
|
+
export default ModalBody;
|
|
@@ -0,0 +1,63 @@
|
|
|
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 { memo, useMemo, useEffect, useRef, forwardRef } from 'react';
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
|
+
import { jsx, css } from '@emotion/core';
|
|
9
|
+
const ModalFooter = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
10
|
+
children,
|
|
11
|
+
className,
|
|
12
|
+
style,
|
|
13
|
+
refs,
|
|
14
|
+
...props
|
|
15
|
+
}, ref) => {
|
|
16
|
+
if (!ref) {
|
|
17
|
+
ref = useRef(null);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const ModalFooterBox = css`
|
|
21
|
+
display: flex;
|
|
22
|
+
position: relative;
|
|
23
|
+
width: 100%;
|
|
24
|
+
min-height: 56px;
|
|
25
|
+
margin-top: 2px;
|
|
26
|
+
padding: 16px 24px;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: flex-end;
|
|
29
|
+
border-radius: 0px 0px 4px 4px;
|
|
30
|
+
box-sizing: border-box;
|
|
31
|
+
/* box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.25); */
|
|
32
|
+
box-shadow: 0px -1px 1px rgba(0, 0, 0, 0.25);
|
|
33
|
+
order: 3;
|
|
34
|
+
`;
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
!!refs && refs(ref);
|
|
37
|
+
}, []);
|
|
38
|
+
const Footer = useMemo(() => jsx("div", _extends({
|
|
39
|
+
css: ModalFooterBox,
|
|
40
|
+
className: 'DGN-UI-Modal-Footer ' + className
|
|
41
|
+
}, props, {
|
|
42
|
+
style: style,
|
|
43
|
+
ref: ref
|
|
44
|
+
}), children), [children, style]);
|
|
45
|
+
return Footer;
|
|
46
|
+
}));
|
|
47
|
+
ModalFooter.defaultProps = {
|
|
48
|
+
className: ''
|
|
49
|
+
};
|
|
50
|
+
ModalFooter.propTypes = {
|
|
51
|
+
/** customize style inline */
|
|
52
|
+
style: PropTypes.object,
|
|
53
|
+
|
|
54
|
+
/** class of ModalFooter */
|
|
55
|
+
className: PropTypes.string,
|
|
56
|
+
|
|
57
|
+
/** get modal header ref by function */
|
|
58
|
+
refs: PropTypes.func,
|
|
59
|
+
|
|
60
|
+
/** child content in header (like title) */
|
|
61
|
+
children: PropTypes.node
|
|
62
|
+
};
|
|
63
|
+
export default ModalFooter;
|
|
@@ -0,0 +1,108 @@
|
|
|
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 { memo, useMemo, useEffect, useContext, useRef, forwardRef } from 'react';
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
|
+
import { jsx, css } from '@emotion/core';
|
|
9
|
+
import ModalContext from './context';
|
|
10
|
+
import { brand22 } from '../../styles/colors';
|
|
11
|
+
import { Typography } from '../';
|
|
12
|
+
import Icon from '../../icons';
|
|
13
|
+
const ModalHeader = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
14
|
+
title,
|
|
15
|
+
className,
|
|
16
|
+
children,
|
|
17
|
+
style,
|
|
18
|
+
refs,
|
|
19
|
+
...props
|
|
20
|
+
}, ref) => {
|
|
21
|
+
if (!ref) {
|
|
22
|
+
ref = useRef(null);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const modal = useContext(ModalContext);
|
|
26
|
+
const ModalHeaderBox = css`
|
|
27
|
+
display: flex;
|
|
28
|
+
position: relative;
|
|
29
|
+
background-color: ${brand22};
|
|
30
|
+
width: 100%;
|
|
31
|
+
height: 56px;
|
|
32
|
+
padding: 16px 24px;
|
|
33
|
+
margin-bottom: 2px;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: space-between;
|
|
36
|
+
border-radius: 4px 4px 0px 0px;
|
|
37
|
+
box-sizing: border-box;
|
|
38
|
+
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.25);
|
|
39
|
+
cursor: ${modal.onMoveModal ? 'move' : 'inherit'};
|
|
40
|
+
order: 1;
|
|
41
|
+
`;
|
|
42
|
+
const HeaderTitle = css`
|
|
43
|
+
display: flex;
|
|
44
|
+
position: relative;
|
|
45
|
+
align-items: center;
|
|
46
|
+
width: calc(100% - 40px);
|
|
47
|
+
`;
|
|
48
|
+
const ClearIconBox = css`
|
|
49
|
+
display: flex;
|
|
50
|
+
position: relative;
|
|
51
|
+
width: 24px;
|
|
52
|
+
height: 24px;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
align-items: center;
|
|
55
|
+
margin-left: 16px;
|
|
56
|
+
`;
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
!!refs && refs(ref);
|
|
59
|
+
}, []);
|
|
60
|
+
const Header = useMemo(() => jsx("div", _extends({
|
|
61
|
+
css: ModalHeaderBox,
|
|
62
|
+
className: 'DGN-UI-Modal-Header ' + className
|
|
63
|
+
}, props, {
|
|
64
|
+
style: style,
|
|
65
|
+
onMouseDown: modal.onMoveModal,
|
|
66
|
+
ref: ref
|
|
67
|
+
}), jsx("div", {
|
|
68
|
+
css: HeaderTitle
|
|
69
|
+
}, jsx(Typography, {
|
|
70
|
+
type: 'h3',
|
|
71
|
+
style: {
|
|
72
|
+
whiteSpace: 'nowrap',
|
|
73
|
+
overflow: 'hidden',
|
|
74
|
+
textOverflow: 'ellipsis'
|
|
75
|
+
}
|
|
76
|
+
}, children ? children : title)), jsx("div", {
|
|
77
|
+
css: ClearIconBox
|
|
78
|
+
}, jsx(Icon, {
|
|
79
|
+
name: 'close',
|
|
80
|
+
viewBox: true,
|
|
81
|
+
onClick: modal.close,
|
|
82
|
+
style: {
|
|
83
|
+
padding: 0
|
|
84
|
+
}
|
|
85
|
+
}))), [children, title, style]);
|
|
86
|
+
return Header;
|
|
87
|
+
}));
|
|
88
|
+
ModalHeader.defaultProps = {
|
|
89
|
+
title: '',
|
|
90
|
+
className: ''
|
|
91
|
+
};
|
|
92
|
+
ModalHeader.propTypes = {
|
|
93
|
+
/** customize style inline */
|
|
94
|
+
style: PropTypes.object,
|
|
95
|
+
|
|
96
|
+
/** class of ModalHeader */
|
|
97
|
+
className: PropTypes.string,
|
|
98
|
+
|
|
99
|
+
/** get modal header ref by function */
|
|
100
|
+
refs: PropTypes.func,
|
|
101
|
+
|
|
102
|
+
/** title for header */
|
|
103
|
+
title: PropTypes.node,
|
|
104
|
+
|
|
105
|
+
/** child content in header (like title) */
|
|
106
|
+
children: PropTypes.node
|
|
107
|
+
};
|
|
108
|
+
export default ModalHeader;
|