@pisell/materials 2.2.13 → 2.2.14
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/build/lowcode/assets-daily.json +13 -13
- package/build/lowcode/assets-dev.json +4 -4
- package/build/lowcode/assets-prod.json +13 -13
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +142 -142
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +29 -27
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +22 -20
- package/es/components/button/index.d.ts +4 -3
- package/es/components/button/index.js +14 -3
- package/es/components/iconfont/index.d.ts +2 -1
- package/es/components/iconfont/index.js +1 -1
- package/es/components/page/index.css +0 -0
- package/es/components/page/index.d.ts +2 -2
- package/es/components/page/index.js +226 -186
- package/es/components/pisell-config-provider/context.d.ts +20 -0
- package/es/components/pisell-config-provider/context.js +36 -0
- package/es/components/pisell-config-provider/hooks/usePisellConfig.d.ts +5 -0
- package/es/components/pisell-config-provider/hooks/usePisellConfig.js +11 -0
- package/es/components/pisell-config-provider/index.d.ts +12 -0
- package/es/components/pisell-config-provider/index.js +36 -0
- package/es/components/pisellAlert/index.d.ts +22 -0
- package/es/components/pisellAlert/index.js +73 -0
- package/es/components/pisellAlert/index.less +149 -0
- package/es/components/pisellCard/index.d.ts +12 -0
- package/es/components/pisellCard/index.js +16 -0
- package/es/components/pisellCard/index.less +9 -0
- package/es/components/pisellCardList/index.d.ts +43 -0
- package/es/components/pisellCardList/index.js +72 -0
- package/es/components/pisellCardList/index.less +75 -0
- package/es/components/pisellCheckboxGroup/index.d.ts +34 -0
- package/es/components/pisellCheckboxGroup/index.js +173 -0
- package/es/components/pisellCheckboxGroup/index.less +36 -0
- package/es/components/pisellCheckboxGroup/mock.d.ts +4 -0
- package/es/components/pisellCheckboxGroup/mock.js +16 -0
- package/es/components/pisellContainer/components/Portal/index.d.ts +10 -0
- package/es/components/pisellContainer/components/Portal/index.js +7 -0
- package/es/components/pisellContainer/containers.d.ts +1 -0
- package/es/components/pisellContainer/containers.js +8 -0
- package/es/components/pisellContainer/index.d.ts +22 -0
- package/es/components/pisellContainer/index.js +19 -0
- package/es/components/pisellCountdown/index.d.ts +24 -0
- package/es/components/pisellCountdown/index.js +44 -0
- package/es/components/pisellCountdown/utils.d.ts +7 -0
- package/es/components/pisellCountdown/utils.js +50 -0
- package/es/components/pisellDatePicker/datePickerCpt.d.ts +22 -0
- package/es/components/pisellDatePicker/datePickerCpt.js +191 -0
- package/es/components/pisellDatePicker/detePickerCpt.less +22 -0
- package/es/components/pisellDatePicker/index.d.ts +3 -0
- package/es/components/pisellDatePicker/index.js +17 -0
- package/es/components/pisellEmpty/index.d.ts +16 -0
- package/es/components/pisellEmpty/index.js +38 -0
- package/es/components/pisellEmpty/index.less +34 -0
- package/es/components/pisellInformationEntry/Input/index.d.ts +8 -0
- package/es/components/pisellInformationEntry/Input/index.js +50 -0
- package/es/components/pisellInformationEntry/Input/index.less +14 -0
- package/es/components/pisellInformationEntry/Scan/index.d.ts +8 -0
- package/es/components/pisellInformationEntry/Scan/index.js +25 -0
- package/es/components/pisellInformationEntry/Scan/index.less +8 -0
- package/es/components/pisellInformationEntry/constants.d.ts +3 -0
- package/es/components/pisellInformationEntry/constants.js +21 -0
- package/es/components/pisellInformationEntry/index.d.ts +31 -0
- package/es/components/pisellInformationEntry/index.js +188 -0
- package/es/components/pisellInformationEntry/index.less +40 -0
- package/es/components/pisellInformationEntry/utils.d.ts +4 -0
- package/es/components/pisellInformationEntry/utils.js +38 -0
- package/es/components/pisellInput/components/BankCard/cardPng/AMEX.png +0 -0
- package/es/components/pisellInput/components/BankCard/cardPng/Discover.png +0 -0
- package/es/components/pisellInput/components/BankCard/cardPng/JCB.png +0 -0
- package/es/components/pisellInput/components/BankCard/cardPng/MasterCard.png +0 -0
- package/es/components/pisellInput/components/BankCard/cardPng/UnionPay.png +0 -0
- package/es/components/pisellInput/components/BankCard/cardPng/VISA.png +0 -0
- package/es/components/pisellInput/components/BankCard/index.d.ts +11 -0
- package/es/components/pisellInput/components/BankCard/index.js +82 -0
- package/es/components/pisellInput/components/BankCard/index.less +4 -0
- package/es/components/pisellInput/components/BankCard/utils.d.ts +11 -0
- package/es/components/pisellInput/components/BankCard/utils.js +65 -0
- package/es/components/pisellInput/components/Copy/index.d.ts +11 -0
- package/es/components/pisellInput/components/Copy/index.js +53 -0
- package/es/components/pisellInput/components/SecurityCode/card.png +0 -0
- package/es/components/pisellInput/components/SecurityCode/index.d.ts +12 -0
- package/es/components/pisellInput/components/SecurityCode/index.js +46 -0
- package/es/components/pisellInput/components/SecurityCode/index.less +4 -0
- package/es/components/pisellInput/index.d.ts +13 -0
- package/es/components/pisellInput/index.js +15 -0
- package/es/components/pisellLoading/index.d.ts +18 -0
- package/es/components/pisellLoading/index.js +45 -0
- package/es/components/pisellLoading/index.less +35 -0
- package/es/components/pisellMessage/index.d.ts +4 -0
- package/es/components/pisellMessage/index.js +5 -0
- package/es/components/pisellModal/components/Information/index.d.ts +21 -0
- package/es/components/pisellModal/components/Information/index.js +25 -0
- package/es/components/pisellModal/components/Information/index.less +16 -0
- package/es/components/pisellModal/components/IpadModal/index.d.ts +6 -0
- package/es/components/pisellModal/components/IpadModal/index.js +6 -0
- package/es/components/pisellModal/components/MobileModal/index.d.ts +9 -0
- package/es/components/pisellModal/components/MobileModal/index.js +27 -0
- package/es/components/pisellModal/components/MobileModal/index.less +60 -0
- package/es/components/pisellModal/components/PcModal/index.d.ts +30 -0
- package/es/components/pisellModal/components/PcModal/index.js +129 -0
- package/es/components/pisellModal/components/PcModal/index.less +105 -0
- package/es/components/pisellModal/components/functions/index.d.ts +12 -0
- package/es/components/pisellModal/components/functions/index.js +44 -0
- package/es/components/pisellModal/components/functions/index.less +25 -0
- package/es/components/pisellModal/components/index.d.ts +10 -0
- package/es/components/pisellModal/components/index.js +9 -0
- package/es/components/pisellModal/constants.d.ts +6 -0
- package/es/components/pisellModal/constants.js +6 -0
- package/es/components/pisellModal/index.d.ts +43 -0
- package/es/components/pisellModal/index.js +30 -0
- package/es/components/pisellRow/index.d.ts +22 -0
- package/es/components/pisellRow/index.js +67 -0
- package/es/components/pisellRow/index.less +13 -0
- package/es/components/pisellScan/index.d.ts +21 -0
- package/es/components/pisellScan/index.js +80 -0
- package/es/components/pisellScan/index.less +12 -0
- package/es/components/pisellText/components/Amount/index.d.ts +18 -0
- package/es/components/pisellText/components/Amount/index.js +25 -0
- package/es/components/pisellText/index.d.ts +8 -0
- package/es/components/pisellText/index.js +7 -0
- package/es/components/pisellToast/index.d.ts +16 -0
- package/es/components/pisellToast/index.js +32 -0
- package/es/components/pisellToast/index.less +26 -0
- package/es/components/pisellTooltip/index.d.ts +10 -0
- package/es/components/pisellTooltip/index.js +15 -0
- package/es/components/pisellTooltip/index.less +5 -0
- package/es/components/pisellWalletPassCard/bg.jpeg +0 -0
- package/es/components/pisellWalletPassCard/index.d.ts +54 -0
- package/es/components/pisellWalletPassCard/index.js +93 -0
- package/es/components/pisellWalletPassCard/index.less +100 -0
- package/es/hooks/useCssVariables.d.ts +8 -0
- package/es/hooks/useCssVariables.js +21 -0
- package/es/index.d.ts +23 -0
- package/es/index.js +26 -1
- package/es/locales/en-US.d.ts +9 -0
- package/es/locales/en-US.js +13 -1
- package/es/locales/index.js +3 -1
- package/es/locales/zh-CN.d.ts +9 -0
- package/es/locales/zh-CN.js +13 -1
- package/es/locales/zh-TW.d.ts +9 -0
- package/es/locales/zh-TW.js +13 -1
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +15 -1
- package/es/utils/locale.js +2 -1
- package/lib/components/button/index.d.ts +4 -3
- package/lib/components/button/index.js +13 -9
- package/lib/components/iconfont/index.d.ts +2 -1
- package/lib/components/iconfont/index.js +1 -1
- package/lib/components/page/index.css +0 -0
- package/lib/components/page/index.d.ts +2 -2
- package/lib/components/page/index.js +201 -161
- package/lib/components/pisell-config-provider/context.d.ts +20 -0
- package/lib/components/pisell-config-provider/context.js +49 -0
- package/lib/components/pisell-config-provider/hooks/usePisellConfig.d.ts +5 -0
- package/lib/components/pisell-config-provider/hooks/usePisellConfig.js +31 -0
- package/lib/components/pisell-config-provider/index.d.ts +12 -0
- package/lib/components/pisell-config-provider/index.js +69 -0
- package/lib/components/pisellAlert/index.d.ts +22 -0
- package/lib/components/pisellAlert/index.js +95 -0
- package/lib/components/pisellAlert/index.less +149 -0
- package/lib/components/pisellCard/index.d.ts +12 -0
- package/lib/components/pisellCard/index.js +48 -0
- package/lib/components/pisellCard/index.less +9 -0
- package/lib/components/pisellCardList/index.d.ts +43 -0
- package/lib/components/pisellCardList/index.js +108 -0
- package/lib/components/pisellCardList/index.less +75 -0
- package/lib/components/pisellCheckboxGroup/index.d.ts +34 -0
- package/lib/components/pisellCheckboxGroup/index.js +150 -0
- package/lib/components/pisellCheckboxGroup/index.less +36 -0
- package/lib/components/pisellCheckboxGroup/mock.d.ts +4 -0
- package/lib/components/pisellCheckboxGroup/mock.js +35 -0
- package/lib/components/pisellContainer/components/Portal/index.d.ts +10 -0
- package/lib/components/pisellContainer/components/Portal/index.js +40 -0
- package/lib/components/pisellContainer/containers.d.ts +1 -0
- package/lib/components/pisellContainer/containers.js +46 -0
- package/lib/components/pisellContainer/index.d.ts +22 -0
- package/lib/components/pisellContainer/index.js +49 -0
- package/lib/components/pisellCountdown/index.d.ts +24 -0
- package/lib/components/pisellCountdown/index.js +63 -0
- package/lib/components/pisellCountdown/utils.d.ts +7 -0
- package/lib/components/pisellCountdown/utils.js +60 -0
- package/lib/components/pisellDatePicker/datePickerCpt.d.ts +22 -0
- package/lib/components/pisellDatePicker/datePickerCpt.js +157 -0
- package/lib/components/pisellDatePicker/detePickerCpt.less +22 -0
- package/lib/components/pisellDatePicker/index.d.ts +3 -0
- package/lib/components/pisellDatePicker/index.js +48 -0
- package/lib/components/pisellEmpty/index.d.ts +16 -0
- package/lib/components/pisellEmpty/index.js +61 -0
- package/lib/components/pisellEmpty/index.less +34 -0
- package/lib/components/pisellInformationEntry/Input/index.d.ts +8 -0
- package/lib/components/pisellInformationEntry/Input/index.js +56 -0
- package/lib/components/pisellInformationEntry/Input/index.less +14 -0
- package/lib/components/pisellInformationEntry/Scan/index.d.ts +8 -0
- package/lib/components/pisellInformationEntry/Scan/index.js +64 -0
- package/lib/components/pisellInformationEntry/Scan/index.less +8 -0
- package/lib/components/pisellInformationEntry/constants.d.ts +3 -0
- package/lib/components/pisellInformationEntry/constants.js +49 -0
- package/lib/components/pisellInformationEntry/index.d.ts +31 -0
- package/lib/components/pisellInformationEntry/index.js +162 -0
- package/lib/components/pisellInformationEntry/index.less +40 -0
- package/lib/components/pisellInformationEntry/utils.d.ts +4 -0
- package/lib/components/pisellInformationEntry/utils.js +40 -0
- package/lib/components/pisellInput/components/BankCard/cardPng/AMEX.png +0 -0
- package/lib/components/pisellInput/components/BankCard/cardPng/Discover.png +0 -0
- package/lib/components/pisellInput/components/BankCard/cardPng/JCB.png +0 -0
- package/lib/components/pisellInput/components/BankCard/cardPng/MasterCard.png +0 -0
- package/lib/components/pisellInput/components/BankCard/cardPng/UnionPay.png +0 -0
- package/lib/components/pisellInput/components/BankCard/cardPng/VISA.png +0 -0
- package/lib/components/pisellInput/components/BankCard/index.d.ts +11 -0
- package/lib/components/pisellInput/components/BankCard/index.js +98 -0
- package/lib/components/pisellInput/components/BankCard/index.less +4 -0
- package/lib/components/pisellInput/components/BankCard/utils.d.ts +11 -0
- package/lib/components/pisellInput/components/BankCard/utils.js +103 -0
- package/lib/components/pisellInput/components/Copy/index.d.ts +11 -0
- package/lib/components/pisellInput/components/Copy/index.js +61 -0
- package/lib/components/pisellInput/components/SecurityCode/card.png +0 -0
- package/lib/components/pisellInput/components/SecurityCode/index.d.ts +12 -0
- package/lib/components/pisellInput/components/SecurityCode/index.js +74 -0
- package/lib/components/pisellInput/components/SecurityCode/index.less +4 -0
- package/lib/components/pisellInput/index.d.ts +13 -0
- package/lib/components/pisellInput/index.js +46 -0
- package/lib/components/pisellLoading/index.d.ts +18 -0
- package/lib/components/pisellLoading/index.js +69 -0
- package/lib/components/pisellLoading/index.less +35 -0
- package/lib/components/pisellMessage/index.d.ts +4 -0
- package/lib/components/pisellMessage/index.js +34 -0
- package/lib/components/pisellModal/components/Information/index.d.ts +21 -0
- package/lib/components/pisellModal/components/Information/index.js +54 -0
- package/lib/components/pisellModal/components/Information/index.less +16 -0
- package/lib/components/pisellModal/components/IpadModal/index.d.ts +6 -0
- package/lib/components/pisellModal/components/IpadModal/index.js +40 -0
- package/lib/components/pisellModal/components/MobileModal/index.d.ts +9 -0
- package/lib/components/pisellModal/components/MobileModal/index.js +67 -0
- package/lib/components/pisellModal/components/MobileModal/index.less +60 -0
- package/lib/components/pisellModal/components/PcModal/index.d.ts +30 -0
- package/lib/components/pisellModal/components/PcModal/index.js +143 -0
- package/lib/components/pisellModal/components/PcModal/index.less +105 -0
- package/lib/components/pisellModal/components/functions/index.d.ts +12 -0
- package/lib/components/pisellModal/components/functions/index.js +90 -0
- package/lib/components/pisellModal/components/functions/index.less +25 -0
- package/lib/components/pisellModal/components/index.d.ts +10 -0
- package/lib/components/pisellModal/components/index.js +52 -0
- package/lib/components/pisellModal/constants.d.ts +6 -0
- package/lib/components/pisellModal/constants.js +33 -0
- package/lib/components/pisellModal/index.d.ts +43 -0
- package/lib/components/pisellModal/index.js +63 -0
- package/lib/components/pisellRow/index.d.ts +22 -0
- package/lib/components/pisellRow/index.js +82 -0
- package/lib/components/pisellRow/index.less +13 -0
- package/lib/components/pisellScan/index.d.ts +21 -0
- package/lib/components/pisellScan/index.js +100 -0
- package/lib/components/pisellScan/index.less +12 -0
- package/lib/components/pisellText/components/Amount/index.d.ts +18 -0
- package/lib/components/pisellText/components/Amount/index.js +64 -0
- package/lib/components/pisellText/index.d.ts +8 -0
- package/lib/components/pisellText/index.js +41 -0
- package/lib/components/pisellToast/index.d.ts +16 -0
- package/lib/components/pisellToast/index.js +59 -0
- package/lib/components/pisellToast/index.less +26 -0
- package/lib/components/pisellTooltip/index.d.ts +10 -0
- package/lib/components/pisellTooltip/index.js +53 -0
- package/lib/components/pisellTooltip/index.less +5 -0
- package/lib/components/pisellWalletPassCard/bg.jpeg +0 -0
- package/lib/components/pisellWalletPassCard/index.d.ts +54 -0
- package/lib/components/pisellWalletPassCard/index.js +101 -0
- package/lib/components/pisellWalletPassCard/index.less +100 -0
- package/lib/hooks/useCssVariables.d.ts +8 -0
- package/lib/hooks/useCssVariables.js +36 -0
- package/lib/index.d.ts +23 -0
- package/lib/index.js +71 -0
- package/lib/locales/en-US.d.ts +9 -0
- package/lib/locales/en-US.js +13 -1
- package/lib/locales/index.js +3 -1
- package/lib/locales/zh-CN.d.ts +9 -0
- package/lib/locales/zh-CN.js +13 -1
- package/lib/locales/zh-TW.d.ts +9 -0
- package/lib/locales/zh-TW.js +13 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +16 -0
- package/lib/utils/locale.js +2 -1
- package/lowcode/_utils/transform-meta.ts +31 -10
- package/lowcode/button/__screenshots__/pisell-modal-information.png +0 -0
- package/lowcode/button/meta.ts +30 -0
- package/lowcode/button/snippets.ts +28 -0
- package/lowcode/information-modal/meta.ts +1931 -0
- package/lowcode/modal/meta.ts +1 -1
- package/lowcode/page/meta.ts +8 -1
- package/lowcode/pisell-alert/meta.ts +117 -0
- package/lowcode/pisell-alert/snippets.ts +50 -0
- package/lowcode/pisell-card/__screenshots__/card-1.png +0 -0
- package/lowcode/pisell-card/meta.ts +100 -0
- package/lowcode/pisell-card/snippets.ts +10 -0
- package/lowcode/pisell-card-list/meta.ts +145 -0
- package/lowcode/pisell-card-list/snippets.ts +9 -0
- package/lowcode/pisell-checkbox-group/meta.ts +112 -0
- package/lowcode/pisell-checkbox-group/snippets.ts +13 -0
- package/lowcode/pisell-container/meta.ts +71 -0
- package/lowcode/pisell-container/snippets.ts +14 -0
- package/lowcode/pisell-countdown/meta.ts +71 -0
- package/lowcode/pisell-countdown/snippets.ts +12 -0
- package/lowcode/pisell-date-picker/meta.ts +76 -0
- package/lowcode/pisell-date-picker/snippets.ts +9 -0
- package/lowcode/pisell-empty/__screenshots__/empty-1.png +0 -0
- package/lowcode/pisell-empty/meta.ts +85 -0
- package/lowcode/pisell-empty/snippets.ts +10 -0
- package/lowcode/pisell-information-entry/meta.ts +131 -0
- package/lowcode/pisell-information-entry/snippets.ts +17 -0
- package/lowcode/pisell-input/__screenshots__/input-1.png +0 -0
- package/lowcode/pisell-input/meta.ts +193 -0
- package/lowcode/pisell-input/snippets.ts +11 -0
- package/lowcode/pisell-input.bank-card-input/__screenshots__/pisell-input.bank-card-input.png +0 -0
- package/lowcode/pisell-input.bank-card-input/meta.ts +62 -0
- package/lowcode/pisell-input.bank-card-input/snippets.ts +11 -0
- package/lowcode/pisell-input.copy/meta.ts +73 -0
- package/lowcode/pisell-input.copy/snippets.ts +10 -0
- package/lowcode/pisell-input.security-code/__screenshots__/pisell-input.security-code.png +0 -0
- package/lowcode/pisell-input.security-code/meta.ts +92 -0
- package/lowcode/pisell-input.security-code/snippets.ts +11 -0
- package/lowcode/pisell-loading/meta.ts +98 -0
- package/lowcode/pisell-loading/snippets.ts +11 -0
- package/lowcode/pisell-modal/__screenshots__/modal-1.png +0 -0
- package/lowcode/pisell-modal/__screenshots__/modal-2.png +0 -0
- package/lowcode/pisell-modal/meta.ts +200 -0
- package/lowcode/pisell-modal/snippets.ts +38 -0
- package/lowcode/pisell-modal.information/__screenshots__/pisell-modal.information.png +0 -0
- package/lowcode/pisell-modal.information/meta.ts +116 -0
- package/lowcode/pisell-modal.information/snippets.ts +17 -0
- package/lowcode/pisell-row/meta.ts +127 -0
- package/lowcode/pisell-row/snippets.ts +24 -0
- package/lowcode/pisell-scan/meta.ts +53 -0
- package/lowcode/pisell-scan/snippets.ts +13 -0
- package/lowcode/pisell-text/meta.ts +8117 -0
- package/lowcode/pisell-text.amount/meta.ts +61 -0
- package/lowcode/pisell-text.amount/snippets.ts +15 -0
- package/lowcode/pisell-tooltip/__screenshots__/tooltip-1.jpg +0 -0
- package/lowcode/pisell-tooltip/meta.ts +306 -0
- package/lowcode/pisell-tooltip/snippets.ts +12 -0
- package/lowcode/pisell-wallet-pass-card/meta.ts +189 -0
- package/lowcode/pisell-wallet-pass-card/snippets.ts +20 -0
- package/package.json +4 -3
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.pisell-modal-information-title {
|
|
2
|
+
color: var(--Gray-900, #101828);
|
|
3
|
+
font-size: 24px;
|
|
4
|
+
font-style: normal;
|
|
5
|
+
font-weight: 600;
|
|
6
|
+
line-height: 28px; /* 155.556% */
|
|
7
|
+
margin-bottom: 4px;
|
|
8
|
+
}
|
|
9
|
+
.pisell-modal-information-describe {
|
|
10
|
+
color: var(--Gray-900, #101828);
|
|
11
|
+
font-size: 16px;
|
|
12
|
+
font-style: normal;
|
|
13
|
+
font-weight: 400;
|
|
14
|
+
line-height: 20px; /* 142.857% */
|
|
15
|
+
margin-bottom: 16px;
|
|
16
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PcModalProps } from '../PcModal';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export interface MobileModalProps extends PcModalProps {
|
|
5
|
+
/** 移动端展示时弹窗高度 默认null 在移动端全屏 */
|
|
6
|
+
mobileModalHeight?: string | number;
|
|
7
|
+
}
|
|
8
|
+
declare const MobileModal: (props: MobileModalProps) => React.JSX.Element;
|
|
9
|
+
export default MobileModal;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
3
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
5
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import classNames from 'classnames';
|
|
8
|
+
import PcModal from "../PcModal";
|
|
9
|
+
import "./index.less";
|
|
10
|
+
var MobileModal = function MobileModal(props) {
|
|
11
|
+
var wrapClassName = props.wrapClassName,
|
|
12
|
+
mobileModalHeight = props.mobileModalHeight;
|
|
13
|
+
return /*#__PURE__*/React.createElement(PcModal, _extends({}, props, {
|
|
14
|
+
transitionName: "pisell-move-down",
|
|
15
|
+
width: "100%",
|
|
16
|
+
wrapClassName: classNames('pisell-mobile-modal', _defineProperty({}, wrapClassName, wrapClassName)),
|
|
17
|
+
modalRender: function modalRender(node) {
|
|
18
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
19
|
+
className: classNames(_defineProperty({}, 'pisell-mobile-modal-render', mobileModalHeight)),
|
|
20
|
+
style: {
|
|
21
|
+
height: mobileModalHeight || '100%'
|
|
22
|
+
}
|
|
23
|
+
}, node);
|
|
24
|
+
}
|
|
25
|
+
}));
|
|
26
|
+
};
|
|
27
|
+
export default MobileModal;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
.pisell-lowcode-modal-root {
|
|
2
|
+
.pisell-mobile-modal {
|
|
3
|
+
.pisell-lowcode-modal {
|
|
4
|
+
margin: 0;
|
|
5
|
+
height: 100%;
|
|
6
|
+
max-width: 100%;
|
|
7
|
+
bottom: 0;
|
|
8
|
+
top: auto;
|
|
9
|
+
padding-bottom: 0;
|
|
10
|
+
vertical-align: bottom;
|
|
11
|
+
}
|
|
12
|
+
.pisell-mobile-modal-render {
|
|
13
|
+
position: absolute;
|
|
14
|
+
width: 100%;
|
|
15
|
+
bottom: 0;
|
|
16
|
+
border-radius: 12px 12px 0 0;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
max-height: 90%;
|
|
19
|
+
min-height: 200px;
|
|
20
|
+
}
|
|
21
|
+
.pisell-lowcode-modal-content {
|
|
22
|
+
padding: 0;
|
|
23
|
+
border-radius: 0;
|
|
24
|
+
height: 100%;
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
max-height: none;
|
|
28
|
+
.pisell-lowcode-modal-close {
|
|
29
|
+
padding: 10px;
|
|
30
|
+
top: 8px;
|
|
31
|
+
right: 16px;
|
|
32
|
+
box-sizing: content-box;
|
|
33
|
+
}
|
|
34
|
+
.pisell-lowcode-modal-header {
|
|
35
|
+
padding: 16px 24px;
|
|
36
|
+
border-bottom: 1px solid var(--Gray-200, #eaecf0);
|
|
37
|
+
margin: 0;
|
|
38
|
+
.pisell-lowcode-modal-title {
|
|
39
|
+
color: var(--Gray-900, #101828);
|
|
40
|
+
font-size: 18px;
|
|
41
|
+
font-style: normal;
|
|
42
|
+
font-weight: 600;
|
|
43
|
+
line-height: 24px;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
.pisell-lowcode-modal-body {
|
|
47
|
+
padding: 0 24px;
|
|
48
|
+
flex: 1;
|
|
49
|
+
overflow: auto;
|
|
50
|
+
}
|
|
51
|
+
.pisell-lowcode-modal-footer {
|
|
52
|
+
display: flex;
|
|
53
|
+
gap: 12px;
|
|
54
|
+
border-top: 1px solid var(--Gray-200, #eaecf0);
|
|
55
|
+
padding: 24px;
|
|
56
|
+
margin: 0;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ButtonProps, ModalProps } from 'antd';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export interface PcModalProps extends ModalProps {
|
|
5
|
+
/**
|
|
6
|
+
* 弹窗大小
|
|
7
|
+
* large 800
|
|
8
|
+
* middle 480
|
|
9
|
+
* small 400
|
|
10
|
+
* */
|
|
11
|
+
size?: 'large' | 'middle' | 'small';
|
|
12
|
+
/** 头部分割线是否展示 */
|
|
13
|
+
headerDivider?: boolean;
|
|
14
|
+
/** 底部分割线是否展示 */
|
|
15
|
+
footerDivider?: boolean;
|
|
16
|
+
/** 删除按钮props */
|
|
17
|
+
deleteButtonProps?: ButtonProps | null;
|
|
18
|
+
/** 删除事件 */
|
|
19
|
+
onDelete?: () => void;
|
|
20
|
+
/** footer中额外操作按钮 */
|
|
21
|
+
actions?: React.ReactNode;
|
|
22
|
+
/** 取消按钮是否展示 */
|
|
23
|
+
cancelVisible?: boolean;
|
|
24
|
+
/** 确认按钮是否展示 */
|
|
25
|
+
okVisible?: boolean;
|
|
26
|
+
/** header是否展示 */
|
|
27
|
+
header?: boolean | null;
|
|
28
|
+
}
|
|
29
|
+
declare const PcModal: (props: PcModalProps) => React.JSX.Element;
|
|
30
|
+
export default PcModal;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
8
|
+
import React, { useMemo } from 'react';
|
|
9
|
+
import { Button } from 'antd';
|
|
10
|
+
import classNames from 'classnames';
|
|
11
|
+
import { isBoolean, isUndefined } from '@pisell/utils';
|
|
12
|
+
import XClose from '@pisell/icon/es/XClose';
|
|
13
|
+
import Delete_wght300_24px from '@pisell/icon/src/Delete_wght300_24px';
|
|
14
|
+
import Modal from "../../../modal";
|
|
15
|
+
import { sizeMap } from "../../constants";
|
|
16
|
+
import "./index.less";
|
|
17
|
+
var PcModal = function PcModal(props) {
|
|
18
|
+
var wrapClassName = props.wrapClassName,
|
|
19
|
+
okButtonProps = props.okButtonProps,
|
|
20
|
+
cancelButtonProps = props.cancelButtonProps,
|
|
21
|
+
propsWidth = props.width,
|
|
22
|
+
_props$size = props.size,
|
|
23
|
+
size = _props$size === void 0 ? 'middle' : _props$size,
|
|
24
|
+
propsCloseIcon = props.closeIcon,
|
|
25
|
+
headerDivider = props.headerDivider,
|
|
26
|
+
footerDivider = props.footerDivider,
|
|
27
|
+
title = props.title,
|
|
28
|
+
_props$centered = props.centered,
|
|
29
|
+
centered = _props$centered === void 0 ? true : _props$centered,
|
|
30
|
+
deleteButtonProps = props.deleteButtonProps,
|
|
31
|
+
onDelete = props.onDelete,
|
|
32
|
+
_props$cancelVisible = props.cancelVisible,
|
|
33
|
+
cancelVisible = _props$cancelVisible === void 0 ? true : _props$cancelVisible,
|
|
34
|
+
_props$okVisible = props.okVisible,
|
|
35
|
+
okVisible = _props$okVisible === void 0 ? true : _props$okVisible,
|
|
36
|
+
actions = props.actions,
|
|
37
|
+
footer = props.footer,
|
|
38
|
+
header = props.header;
|
|
39
|
+
var width = useMemo(function () {
|
|
40
|
+
// 如果没有设置宽度,则根据size来设置宽度
|
|
41
|
+
return propsWidth || sizeMap[size];
|
|
42
|
+
}, [propsWidth, size]);
|
|
43
|
+
var closeIcon = useMemo(function () {
|
|
44
|
+
if (isUndefined(propsCloseIcon)) {
|
|
45
|
+
return /*#__PURE__*/React.createElement(XClose, {
|
|
46
|
+
style: {
|
|
47
|
+
fontSize: 20
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}, [propsCloseIcon]);
|
|
52
|
+
var deleteBtn = useMemo(function () {
|
|
53
|
+
if (!deleteButtonProps) {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
57
|
+
style: {
|
|
58
|
+
flexShrink: 0
|
|
59
|
+
}
|
|
60
|
+
}, /*#__PURE__*/React.createElement(Button, _extends({
|
|
61
|
+
icon: /*#__PURE__*/React.createElement(Delete_wght300_24px, {
|
|
62
|
+
style: {
|
|
63
|
+
fontSize: 20
|
|
64
|
+
}
|
|
65
|
+
}),
|
|
66
|
+
size: 'large'
|
|
67
|
+
}, deleteButtonProps, {
|
|
68
|
+
onClick: function onClick(e) {
|
|
69
|
+
var _deleteButtonProps$on;
|
|
70
|
+
deleteButtonProps === null || deleteButtonProps === void 0 ? void 0 : (_deleteButtonProps$on = deleteButtonProps.onClick) === null || _deleteButtonProps$on === void 0 ? void 0 : _deleteButtonProps$on.call(deleteButtonProps, e);
|
|
71
|
+
onDelete === null || onDelete === void 0 ? void 0 : onDelete();
|
|
72
|
+
}
|
|
73
|
+
})));
|
|
74
|
+
}, [deleteButtonProps]);
|
|
75
|
+
var isHideFooter = useMemo(function () {
|
|
76
|
+
return isBoolean(footer) && !footer || footer === null;
|
|
77
|
+
}, [footer]);
|
|
78
|
+
var isHideHeader = useMemo(function () {
|
|
79
|
+
return isBoolean(header) && !header || header === null;
|
|
80
|
+
}, [header]);
|
|
81
|
+
var renderFooter = function renderFooter(_, _ref) {
|
|
82
|
+
var OkBtn = _ref.OkBtn,
|
|
83
|
+
CancelBtn = _ref.CancelBtn;
|
|
84
|
+
if (footer) {
|
|
85
|
+
return footer;
|
|
86
|
+
}
|
|
87
|
+
if ([deleteBtn, actions, cancelVisible, okVisible].every(function (item) {
|
|
88
|
+
return !item;
|
|
89
|
+
})) {
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, deleteBtn, actions, cancelVisible && /*#__PURE__*/React.createElement(CancelBtn, null), okVisible && /*#__PURE__*/React.createElement(OkBtn, null));
|
|
93
|
+
};
|
|
94
|
+
return /*#__PURE__*/React.createElement(Modal, _extends({
|
|
95
|
+
keyboard: false
|
|
96
|
+
}, props, {
|
|
97
|
+
centered: centered,
|
|
98
|
+
title: title || /*#__PURE__*/React.createElement("div", {
|
|
99
|
+
style: {
|
|
100
|
+
height: 24
|
|
101
|
+
}
|
|
102
|
+
}),
|
|
103
|
+
width: width,
|
|
104
|
+
wrapClassName: classNames('pisell-pc-modal', _defineProperty({}, wrapClassName, wrapClassName)),
|
|
105
|
+
closeIcon: closeIcon,
|
|
106
|
+
footer: isHideFooter ? null : renderFooter,
|
|
107
|
+
okButtonProps: _objectSpread({
|
|
108
|
+
block: true,
|
|
109
|
+
size: 'large',
|
|
110
|
+
style: {
|
|
111
|
+
margin: 0
|
|
112
|
+
}
|
|
113
|
+
}, okButtonProps || {}),
|
|
114
|
+
cancelButtonProps: _objectSpread({
|
|
115
|
+
block: true,
|
|
116
|
+
size: 'large'
|
|
117
|
+
}, cancelButtonProps || {}),
|
|
118
|
+
styles: {
|
|
119
|
+
header: {
|
|
120
|
+
borderBottom: headerDivider ? '1px solid var(--Gray-200, #EAECF0)' : 'none',
|
|
121
|
+
display: isHideHeader ? 'none' : 'block'
|
|
122
|
+
},
|
|
123
|
+
footer: {
|
|
124
|
+
borderTop: footerDivider ? '1px solid var(--Gray-200, #EAECF0)' : 'none'
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}));
|
|
128
|
+
};
|
|
129
|
+
export default PcModal;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
.pisell-lowcode-modal-root {
|
|
2
|
+
.pisell-pc-modal {
|
|
3
|
+
overflow: hidden;
|
|
4
|
+
.pisell-lowcode-modal-content {
|
|
5
|
+
padding: 0 !important;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
max-height: 90vh;
|
|
9
|
+
min-height: 260px;
|
|
10
|
+
.pisell-lowcode-modal-close {
|
|
11
|
+
top: 8px;
|
|
12
|
+
right: 16px;
|
|
13
|
+
padding: 10px;
|
|
14
|
+
box-sizing: content-box;
|
|
15
|
+
width: 24px;
|
|
16
|
+
height: 24px;
|
|
17
|
+
}
|
|
18
|
+
.pisell-lowcode-modal-header {
|
|
19
|
+
padding: 16px 24px;
|
|
20
|
+
border-bottom: 1px solid var(--Gray-200, #EAECF0);
|
|
21
|
+
margin: 0;
|
|
22
|
+
.pisell-lowcode-modal-title {
|
|
23
|
+
color: var(--Gray-900, #101828);
|
|
24
|
+
font-size: 18px;
|
|
25
|
+
font-style: normal;
|
|
26
|
+
font-weight: 600;
|
|
27
|
+
line-height: 24px;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
.pisell-lowcode-modal-body {
|
|
31
|
+
padding: 0 24px;
|
|
32
|
+
overflow: auto;
|
|
33
|
+
flex: 1;
|
|
34
|
+
}
|
|
35
|
+
.pisell-lowcode-modal-footer {
|
|
36
|
+
display: flex;
|
|
37
|
+
gap: 12px;
|
|
38
|
+
border-top: 1px solid var(--Gray-200, #EAECF0);
|
|
39
|
+
padding: 24px;
|
|
40
|
+
margin: 0;
|
|
41
|
+
.pisell-lowcode-btn-icon {
|
|
42
|
+
width: auto !important;
|
|
43
|
+
}
|
|
44
|
+
.pisell-lowcode-btn {
|
|
45
|
+
margin: 0;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@keyframes pisellMoveDownIn {
|
|
53
|
+
0% {
|
|
54
|
+
transform: translateY(100%);
|
|
55
|
+
transform-origin: 0 0;
|
|
56
|
+
opacity: 0;
|
|
57
|
+
}
|
|
58
|
+
100% {
|
|
59
|
+
transform: translateY(0%);
|
|
60
|
+
transform-origin: 0 0;
|
|
61
|
+
opacity: 1;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
@keyframes pisellMoveDownOut {
|
|
65
|
+
0% {
|
|
66
|
+
transform: translateY(0%);
|
|
67
|
+
transform-origin: 0 0;
|
|
68
|
+
opacity: 1;
|
|
69
|
+
}
|
|
70
|
+
100% {
|
|
71
|
+
transform: translateY(100%);
|
|
72
|
+
transform-origin: 0 0;
|
|
73
|
+
opacity: 0;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.pisell-move-down-enter,
|
|
78
|
+
.pisell-move-down-appear {
|
|
79
|
+
animation-duration: 0.2s;
|
|
80
|
+
animation-fill-mode: both;
|
|
81
|
+
animation-play-state: paused;
|
|
82
|
+
}
|
|
83
|
+
.pisell-move-down-leave {
|
|
84
|
+
animation-duration: 0.2s;
|
|
85
|
+
animation-fill-mode: both;
|
|
86
|
+
animation-play-state: paused;
|
|
87
|
+
}
|
|
88
|
+
.pisell-move-down-enter.pisell-move-down-enter-active,
|
|
89
|
+
.pisell-move-down-appear.pisell-move-down-appear-active {
|
|
90
|
+
animation-name: pisellMoveDownIn;
|
|
91
|
+
animation-play-state: running;
|
|
92
|
+
}
|
|
93
|
+
.pisell-move-down-leave.pisell-move-down-leave-active {
|
|
94
|
+
animation-name: pisellMoveDownOut;
|
|
95
|
+
animation-play-state: running;
|
|
96
|
+
pointer-events: none;
|
|
97
|
+
}
|
|
98
|
+
.pisell-move-down-enter,
|
|
99
|
+
.pisell-move-down-appear {
|
|
100
|
+
opacity: 0;
|
|
101
|
+
animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);
|
|
102
|
+
}
|
|
103
|
+
.pisell-move-down-leave {
|
|
104
|
+
animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.34);
|
|
105
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ModalFuncProps } from 'antd';
|
|
2
|
+
import { PisellContextType } from '../../../pisell-config-provider/context';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export interface PisellModalFuncProps extends ModalFuncProps {
|
|
5
|
+
platform?: PisellContextType['platform'];
|
|
6
|
+
}
|
|
7
|
+
export declare const info: (props: PisellModalFuncProps) => any;
|
|
8
|
+
export declare const success: (props: PisellModalFuncProps) => any;
|
|
9
|
+
export declare const error: (props: PisellModalFuncProps) => any;
|
|
10
|
+
export declare const warning: (props: PisellModalFuncProps) => any;
|
|
11
|
+
export declare const warn: (props: PisellModalFuncProps) => any;
|
|
12
|
+
export declare const confirm: (props: PisellModalFuncProps) => any;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
+
import Modal from "../../../modal";
|
|
8
|
+
import classNames from 'classnames';
|
|
9
|
+
import { globalConfig } from "../../../pisell-config-provider/context";
|
|
10
|
+
import "./index.less";
|
|
11
|
+
var genConfig = function genConfig(props) {
|
|
12
|
+
var _globalConfig$getConf = globalConfig.getConfig(),
|
|
13
|
+
platform = _globalConfig$getConf.platform;
|
|
14
|
+
return _objectSpread(_objectSpread({}, props), {}, {
|
|
15
|
+
wrapClassName: classNames('pisell-modal-function-wrap', _defineProperty({}, 'pisell-modal-mobile-function-wrap', platform === 'h5')),
|
|
16
|
+
cancelButtonProps: _objectSpread({
|
|
17
|
+
block: true,
|
|
18
|
+
size: 'large'
|
|
19
|
+
}, props.cancelButtonProps || {}),
|
|
20
|
+
okButtonProps: _objectSpread({
|
|
21
|
+
block: true,
|
|
22
|
+
size: 'large'
|
|
23
|
+
}, props.okButtonProps || {}),
|
|
24
|
+
icon: null
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
export var info = function info(props) {
|
|
28
|
+
return Modal.info(genConfig(props));
|
|
29
|
+
};
|
|
30
|
+
export var success = function success(props) {
|
|
31
|
+
return Modal.success(genConfig(props));
|
|
32
|
+
};
|
|
33
|
+
export var error = function error(props) {
|
|
34
|
+
return Modal.error(genConfig(props));
|
|
35
|
+
};
|
|
36
|
+
export var warning = function warning(props) {
|
|
37
|
+
return Modal.warning(genConfig(props));
|
|
38
|
+
};
|
|
39
|
+
export var warn = function warn(props) {
|
|
40
|
+
return Modal.warn(genConfig(props));
|
|
41
|
+
};
|
|
42
|
+
export var confirm = function confirm(props) {
|
|
43
|
+
return Modal.confirm(genConfig(props));
|
|
44
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.pisell-lowcode-modal-root {
|
|
2
|
+
.pisell-modal-function-wrap {
|
|
3
|
+
.pisell-lowcode-modal-confirm-btns {
|
|
4
|
+
display: flex;
|
|
5
|
+
gap: 12px;
|
|
6
|
+
button {
|
|
7
|
+
margin: 0 !important;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
.pisell-modal-mobile-function-wrap {
|
|
12
|
+
.pisell-lowcode-modal {
|
|
13
|
+
width: 100% !important;
|
|
14
|
+
max-width: 100%;
|
|
15
|
+
margin: 0;
|
|
16
|
+
padding: 0;
|
|
17
|
+
position: absolute;
|
|
18
|
+
bottom: 0;
|
|
19
|
+
top: auto;
|
|
20
|
+
.pisell-lowcode-modal-content {
|
|
21
|
+
border-radius: 12px 12px 0 0;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import IpadModal from './IpadModal';
|
|
3
|
+
import MobileModal from './MobileModal';
|
|
4
|
+
import PcModal from './PcModal';
|
|
5
|
+
declare const platformCpt: {
|
|
6
|
+
h5: (props: import("./MobileModal").MobileModalProps) => import("react").JSX.Element;
|
|
7
|
+
pc: (props: import("./PcModal").PcModalProps) => import("react").JSX.Element;
|
|
8
|
+
ipad: (props: import("./IpadModal").IpadModalProps) => import("react").JSX.Element;
|
|
9
|
+
};
|
|
10
|
+
export { IpadModal, MobileModal, PcModal, platformCpt };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ModalProps, ButtonProps } from 'antd';
|
|
3
|
+
import { PisellContextType } from '../pisell-config-provider/context';
|
|
4
|
+
export interface PisellModalProps extends ModalProps {
|
|
5
|
+
/** 平台 */
|
|
6
|
+
platform?: PisellContextType['platform'];
|
|
7
|
+
/**
|
|
8
|
+
* 弹窗大小
|
|
9
|
+
* large 800
|
|
10
|
+
* middle 600
|
|
11
|
+
* small 400
|
|
12
|
+
* */
|
|
13
|
+
size?: 'large' | 'middle' | 'small';
|
|
14
|
+
/** 头部分割线是否展示 */
|
|
15
|
+
headerDivider?: boolean;
|
|
16
|
+
/** 底部分割线是否展示 */
|
|
17
|
+
footerDivider?: boolean;
|
|
18
|
+
/** 删除按钮props */
|
|
19
|
+
deleteButtonProps?: ButtonProps | null;
|
|
20
|
+
/** 删除事件 */
|
|
21
|
+
onDelete?: () => void;
|
|
22
|
+
/** 移动端展示时弹窗高度 默认null 在移动端全屏 */
|
|
23
|
+
mobileModalHeight?: string | number;
|
|
24
|
+
/** footer中额外操作按钮 */
|
|
25
|
+
actions?: React.ReactNode;
|
|
26
|
+
/** 取消按钮是否展示 */
|
|
27
|
+
cancelVisible?: boolean;
|
|
28
|
+
/** 确认按钮是否展示 */
|
|
29
|
+
okVisible?: boolean;
|
|
30
|
+
/** 是否展示header */
|
|
31
|
+
header?: boolean | null;
|
|
32
|
+
}
|
|
33
|
+
declare const PisellModal: {
|
|
34
|
+
(props: PisellModalProps): React.JSX.Element;
|
|
35
|
+
confirm: (props: import("./components/functions").PisellModalFuncProps) => any;
|
|
36
|
+
info: (props: import("./components/functions").PisellModalFuncProps) => any;
|
|
37
|
+
error: (props: import("./components/functions").PisellModalFuncProps) => any;
|
|
38
|
+
warn: (props: import("./components/functions").PisellModalFuncProps) => any;
|
|
39
|
+
warning: (props: import("./components/functions").PisellModalFuncProps) => any;
|
|
40
|
+
success: (props: import("./components/functions").PisellModalFuncProps) => any;
|
|
41
|
+
Information: (props: import("./components/Information").InformationProps) => React.JSX.Element;
|
|
42
|
+
};
|
|
43
|
+
export default PisellModal;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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
|
+
import React, { useEffect } from 'react';
|
|
3
|
+
import usePisellConfig from "../pisell-config-provider/hooks/usePisellConfig";
|
|
4
|
+
import { platformCpt } from "./components";
|
|
5
|
+
import { confirm, info, error, warn, warning, success } from "./components/functions";
|
|
6
|
+
import Information from "./components/Information";
|
|
7
|
+
var PisellModal = function PisellModal(props) {
|
|
8
|
+
var platform = props.platform,
|
|
9
|
+
_props$headerDivider = props.headerDivider,
|
|
10
|
+
headerDivider = _props$headerDivider === void 0 ? true : _props$headerDivider,
|
|
11
|
+
_props$footerDivider = props.footerDivider,
|
|
12
|
+
footerDivider = _props$footerDivider === void 0 ? true : _props$footerDivider;
|
|
13
|
+
var config = usePisellConfig();
|
|
14
|
+
var ModalCpt = platformCpt[platform || config.platform];
|
|
15
|
+
useEffect(function () {
|
|
16
|
+
document.body.id = 'body';
|
|
17
|
+
}, []);
|
|
18
|
+
return /*#__PURE__*/React.createElement(ModalCpt, _extends({}, props, {
|
|
19
|
+
headerDivider: headerDivider,
|
|
20
|
+
footerDivider: footerDivider
|
|
21
|
+
}));
|
|
22
|
+
};
|
|
23
|
+
PisellModal.confirm = confirm;
|
|
24
|
+
PisellModal.info = info;
|
|
25
|
+
PisellModal.error = error;
|
|
26
|
+
PisellModal.warn = warn;
|
|
27
|
+
PisellModal.warning = warning;
|
|
28
|
+
PisellModal.success = success;
|
|
29
|
+
PisellModal.Information = Information;
|
|
30
|
+
export default PisellModal;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PisellContextType } from '../pisell-config-provider/context';
|
|
3
|
+
import './index.less';
|
|
4
|
+
interface PisellRowProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
5
|
+
platform?: PisellContextType['platform'];
|
|
6
|
+
gap?: number;
|
|
7
|
+
padding?: number;
|
|
8
|
+
leftContent?: React.ReactNode;
|
|
9
|
+
rightContent?: React.ReactNode;
|
|
10
|
+
centerContent?: React.ReactNode;
|
|
11
|
+
centerContentFill?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* @title: Pisell Row
|
|
15
|
+
* @description: 左中右布局组件
|
|
16
|
+
* @param {PisellRowProps} props
|
|
17
|
+
* @return {*}
|
|
18
|
+
* @Author: zhiwei.Wang
|
|
19
|
+
* @Date: 2024-08-16 10:38
|
|
20
|
+
*/
|
|
21
|
+
declare const PisellRow: (props: PisellRowProps) => React.JSX.Element;
|
|
22
|
+
export default PisellRow;
|