@ebscn/ui 0.0.11 → 1.0.0
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/README.md +44 -0
- package/cjs/components/alphabet-keyboard/alphabet-keyboard.css +143 -0
- package/cjs/components/alphabet-keyboard/alphabet-keyboard.d.ts +11 -0
- package/cjs/components/alphabet-keyboard/alphabet-keyboard.js +139 -0
- package/cjs/components/alphabet-keyboard/index.d.ts +4 -0
- package/cjs/components/alphabet-keyboard/index.js +9 -0
- package/cjs/components/button/button.css +152 -0
- package/cjs/components/button/button.d.ts +40 -0
- package/cjs/components/button/button.js +215 -0
- package/cjs/components/button/index.d.ts +4 -0
- package/cjs/components/button/index.js +9 -0
- package/cjs/components/card/card.css +37 -0
- package/cjs/components/card/card.d.ts +17 -0
- package/cjs/components/card/card.js +40 -0
- package/cjs/components/card/index.d.ts +4 -0
- package/cjs/components/card/index.js +10 -0
- package/cjs/components/checkbox/checkbox.css +92 -0
- package/cjs/components/checkbox/checkbox.d.ts +44 -0
- package/cjs/components/checkbox/checkbox.js +106 -0
- package/cjs/components/checkbox/group-context.d.ts +8 -0
- package/cjs/components/checkbox/group-context.js +8 -0
- package/cjs/components/checkbox/group.d.ts +10 -0
- package/cjs/components/checkbox/group.js +48 -0
- package/cjs/components/checkbox/index.d.ts +26 -0
- package/cjs/components/checkbox/index.js +14 -0
- package/cjs/components/checkbox/native-input.d.ts +10 -0
- package/cjs/components/checkbox/native-input.js +38 -0
- package/cjs/components/grid/grid.css +15 -0
- package/cjs/components/grid/grid.d.ts +15 -0
- package/cjs/components/grid/grid.js +45 -0
- package/cjs/components/grid/index.d.ts +7 -0
- package/cjs/components/grid/index.js +12 -0
- package/cjs/components/icons/check-icon.d.ts +4 -0
- package/cjs/components/icons/check-icon.js +30 -0
- package/cjs/components/icons/check-only-icon.d.ts +4 -0
- package/cjs/components/icons/check-only-icon.js +21 -0
- package/cjs/components/icons/clear-icon.d.ts +4 -0
- package/cjs/components/icons/clear-icon.js +41 -0
- package/cjs/components/icons/indeterminate-icon.d.ts +4 -0
- package/cjs/components/icons/indeterminate-icon.js +29 -0
- package/cjs/components/icons/index.d.ts +8 -0
- package/cjs/components/icons/index.js +62 -0
- package/cjs/components/icons/loading-icon.d.ts +4 -0
- package/cjs/components/icons/loading-icon.js +89 -0
- package/cjs/components/icons/search-icon.d.ts +4 -0
- package/cjs/components/icons/search-icon.js +43 -0
- package/cjs/components/icons/spin-icon.d.ts +4 -0
- package/cjs/components/icons/spin-icon.js +32 -0
- package/cjs/components/icons/uncheck-icon.d.ts +4 -0
- package/cjs/components/icons/uncheck-icon.js +26 -0
- package/cjs/components/imageViewer/imageViewer.d.ts +4 -0
- package/cjs/components/imageViewer/imageViewer.js +35 -0
- package/cjs/components/imageViewer/index.js +9 -0
- package/cjs/components/marketTag/index.d.ts +4 -0
- package/cjs/components/marketTag/index.js +9 -0
- package/cjs/components/marketTag/marketTag.css +14 -0
- package/cjs/components/marketTag/marketTag.d.ts +11 -0
- package/cjs/components/marketTag/marketTag.js +27 -0
- package/cjs/components/number-keyboard/index.d.ts +4 -0
- package/cjs/components/number-keyboard/index.js +9 -0
- package/cjs/components/number-keyboard/number-keyboard.css +77 -0
- package/cjs/components/number-keyboard/number-keyboard.d.ts +13 -0
- package/cjs/components/number-keyboard/number-keyboard.js +93 -0
- package/cjs/components/pdfLink/index.d.ts +3 -0
- package/cjs/components/pdfLink/index.js +10 -0
- package/cjs/components/pdfLink/pdfLink.css +11 -0
- package/cjs/components/pdfLink/pdfLink.d.ts +8 -0
- package/cjs/components/pdfLink/pdfLink.js +102 -0
- package/cjs/components/protocol/index.d.ts +3 -0
- package/cjs/components/protocol/index.js +10 -0
- package/cjs/components/protocol/protocol.css +46 -0
- package/cjs/components/protocol/protocol.d.ts +15 -0
- package/cjs/components/protocol/protocol.js +120 -0
- package/cjs/components/radio/group-context.d.ts +8 -0
- package/cjs/components/radio/group-context.js +8 -0
- package/cjs/components/radio/group.d.ts +10 -0
- package/cjs/components/radio/group.js +43 -0
- package/cjs/components/radio/index.d.ts +8 -0
- package/cjs/components/radio/index.js +13 -0
- package/cjs/components/radio/radio.css +92 -0
- package/cjs/components/radio/radio.d.ts +19 -0
- package/cjs/components/radio/radio.js +92 -0
- package/cjs/components/search/index.d.ts +3 -0
- package/cjs/components/search/index.js +10 -0
- package/cjs/components/search/search.css +53 -0
- package/cjs/components/search/search.d.ts +15 -0
- package/cjs/components/search/search.js +110 -0
- package/cjs/components/stock-count-keyboard/index.d.ts +4 -0
- package/cjs/components/stock-count-keyboard/index.js +9 -0
- package/cjs/components/stock-count-keyboard/stock-count-keyboard.css +74 -0
- package/cjs/components/stock-count-keyboard/stock-count-keyboard.d.ts +9 -0
- package/cjs/components/stock-count-keyboard/stock-count-keyboard.js +82 -0
- package/cjs/components/stock-keyboard/index.d.ts +4 -0
- package/cjs/components/stock-keyboard/index.js +9 -0
- package/cjs/components/stock-keyboard/stock-keyboard.css +111 -0
- package/cjs/components/stock-keyboard/stock-keyboard.d.ts +12 -0
- package/cjs/components/stock-keyboard/stock-keyboard.js +107 -0
- package/cjs/components/switch/index.d.ts +4 -0
- package/cjs/components/switch/index.js +10 -0
- package/cjs/components/switch/switch.css +104 -0
- package/cjs/components/switch/switch.d.ts +16 -0
- package/cjs/components/switch/switch.js +213 -0
- package/cjs/components/toastLoading/index.d.ts +4 -0
- package/cjs/components/toastLoading/index.js +9 -0
- package/cjs/components/toastLoading/toastLoading.css +27 -0
- package/cjs/components/toastLoading/toastLoading.d.ts +7 -0
- package/cjs/components/toastLoading/toastLoading.js +35 -0
- package/cjs/global/global.css +289 -0
- package/cjs/global/index.d.ts +1 -0
- package/cjs/global/index.js +11 -0
- package/cjs/global/theme-dark.css +18 -0
- package/cjs/global/theme-default.css +48 -0
- package/cjs/index.d.ts +18 -0
- package/cjs/index.js +149 -0
- package/cjs/utils/attach-properties-to-component.d.ts +1 -0
- package/cjs/utils/attach-properties-to-component.js +15 -0
- package/cjs/utils/bound.d.ts +1 -0
- package/cjs/utils/bound.js +16 -0
- package/cjs/utils/can-use-dom.d.ts +1 -0
- package/cjs/utils/can-use-dom.js +7 -0
- package/cjs/utils/convert-px.d.ts +1 -0
- package/cjs/utils/convert-px.js +33 -0
- package/cjs/utils/create-icon-component.d.ts +2 -0
- package/cjs/utils/create-icon-component.js +12 -0
- package/cjs/utils/dev-log.d.ts +3 -0
- package/cjs/utils/dev-log.js +45 -0
- package/cjs/utils/generate-int-array.d.ts +1 -0
- package/cjs/utils/generate-int-array.js +13 -0
- package/cjs/utils/get-container.d.ts +2 -0
- package/cjs/utils/get-container.js +10 -0
- package/cjs/utils/get-scroll-parent.d.ts +3 -0
- package/cjs/utils/get-scroll-parent.js +30 -0
- package/cjs/utils/is-dev.d.ts +1 -0
- package/cjs/utils/is-dev.js +7 -0
- package/cjs/utils/is-node-with-content.d.ts +4 -0
- package/cjs/utils/is-node-with-content.js +9 -0
- package/cjs/utils/matrix.d.ts +10 -0
- package/cjs/utils/matrix.js +47 -0
- package/cjs/utils/measure-css-length.d.ts +1 -0
- package/cjs/utils/measure-css-length.js +29 -0
- package/cjs/utils/merge-locale.d.ts +1 -0
- package/cjs/utils/merge-locale.js +21 -0
- package/cjs/utils/native-props.d.ts +8 -0
- package/cjs/utils/native-props.js +38 -0
- package/cjs/utils/nearest.d.ts +1 -0
- package/cjs/utils/nearest.js +11 -0
- package/cjs/utils/noop.d.ts +1 -0
- package/cjs/utils/noop.js +8 -0
- package/cjs/utils/reduce-and-restore-motion.d.ts +4 -0
- package/cjs/utils/reduce-and-restore-motion.js +44 -0
- package/cjs/utils/render-imperatively.d.ts +13 -0
- package/cjs/utils/render-imperatively.js +207 -0
- package/cjs/utils/render-to-body.d.ts +2 -0
- package/cjs/utils/render-to-body.js +19 -0
- package/cjs/utils/render-to-container.d.ts +3 -0
- package/cjs/utils/render-to-container.js +16 -0
- package/cjs/utils/render.d.ts +9 -0
- package/cjs/utils/render.js +196 -0
- package/cjs/utils/replace-message.d.ts +1 -0
- package/cjs/utils/replace-message.js +13 -0
- package/cjs/utils/rubberband.d.ts +2 -0
- package/cjs/utils/rubberband.js +20 -0
- package/cjs/utils/should-render.d.ts +10 -0
- package/cjs/utils/should-render.js +20 -0
- package/cjs/utils/shuffle.d.ts +6 -0
- package/cjs/utils/shuffle.js +29 -0
- package/cjs/utils/sleep.d.ts +1 -0
- package/cjs/utils/sleep.js +12 -0
- package/cjs/utils/supports-passive.d.ts +1 -0
- package/cjs/utils/supports-passive.js +19 -0
- package/cjs/utils/to-css-length.d.ts +1 -0
- package/cjs/utils/to-css-length.js +9 -0
- package/cjs/utils/traverse-react-node.d.ts +2 -0
- package/cjs/utils/traverse-react-node.js +23 -0
- package/cjs/utils/tree.d.ts +1 -0
- package/cjs/utils/tree.js +24 -0
- package/cjs/utils/undefined-fallback.d.ts +3 -0
- package/cjs/utils/undefined-fallback.js +17 -0
- package/cjs/utils/use-drag-and-pinch.d.ts +1 -0
- package/cjs/utils/use-drag-and-pinch.js +8 -0
- package/cjs/utils/use-initialized.d.ts +1 -0
- package/cjs/utils/use-initialized.js +14 -0
- package/cjs/utils/use-inner-visible.d.ts +1 -0
- package/cjs/utils/use-inner-visible.js +17 -0
- package/cjs/utils/use-isomorphic-update-layout-effect.d.ts +2 -0
- package/cjs/utils/use-isomorphic-update-layout-effect.js +8 -0
- package/cjs/utils/use-lock-scroll.d.ts +2 -0
- package/cjs/utils/use-lock-scroll.js +84 -0
- package/cjs/utils/use-mutation-effect.d.ts +2 -0
- package/cjs/utils/use-mutation-effect.js +21 -0
- package/cjs/utils/use-props-value.d.ts +8 -0
- package/cjs/utils/use-props-value.js +30 -0
- package/cjs/utils/use-ref-state.d.ts +2 -0
- package/cjs/utils/use-ref-state.js +17 -0
- package/cjs/utils/use-resize-effect.d.ts +2 -0
- package/cjs/utils/use-resize-effect.js +29 -0
- package/cjs/utils/use-tab-list-scroll.d.ts +5 -0
- package/cjs/utils/use-tab-list-scroll.js +67 -0
- package/cjs/utils/use-touch.d.ts +17 -0
- package/cjs/utils/use-touch.js +69 -0
- package/cjs/utils/validate.d.ts +8 -0
- package/cjs/utils/validate.js +39 -0
- package/cjs/utils/with-cache.d.ts +1 -0
- package/cjs/utils/with-cache.js +15 -0
- package/cjs/utils/with-default-props.d.ts +2 -0
- package/cjs/utils/with-default-props.js +32 -0
- package/cjs/utils/with-func-props.d.ts +5 -0
- package/cjs/utils/with-func-props.js +38 -0
- package/cjs/utils/with-stop-propagation.d.ts +4 -0
- package/cjs/utils/with-stop-propagation.js +37 -0
- package/es/components/alphabet-keyboard/alphabet-keyboard.css +143 -0
- package/es/components/alphabet-keyboard/alphabet-keyboard.d.ts +11 -0
- package/es/components/alphabet-keyboard/alphabet-keyboard.js +132 -0
- package/es/components/alphabet-keyboard/index.d.ts +4 -0
- package/es/components/alphabet-keyboard/index.js +3 -0
- package/es/components/button/button.css +152 -0
- package/es/components/button/button.d.ts +40 -0
- package/es/components/button/button.js +206 -0
- package/es/components/button/index.d.ts +4 -0
- package/es/components/button/index.js +3 -0
- package/es/components/card/card.css +37 -0
- package/es/components/card/card.d.ts +17 -0
- package/es/components/card/card.js +33 -0
- package/es/components/card/index.d.ts +4 -0
- package/es/components/card/index.js +3 -0
- package/es/components/checkbox/checkbox.css +92 -0
- package/es/components/checkbox/checkbox.d.ts +44 -0
- package/es/components/checkbox/checkbox.js +97 -0
- package/es/components/checkbox/group-context.d.ts +8 -0
- package/es/components/checkbox/group-context.js +2 -0
- package/es/components/checkbox/group.d.ts +10 -0
- package/es/components/checkbox/group.js +40 -0
- package/es/components/checkbox/index.d.ts +26 -0
- package/es/components/checkbox/index.js +7 -0
- package/es/components/checkbox/native-input.d.ts +10 -0
- package/es/components/checkbox/native-input.js +29 -0
- package/es/components/grid/grid.css +15 -0
- package/es/components/grid/grid.d.ts +15 -0
- package/es/components/grid/grid.js +36 -0
- package/es/components/grid/index.d.ts +7 -0
- package/es/components/grid/index.js +6 -0
- package/es/components/icons/check-icon.d.ts +4 -0
- package/es/components/icons/check-icon.js +22 -0
- package/es/components/icons/check-only-icon.d.ts +4 -0
- package/es/components/icons/check-only-icon.js +13 -0
- package/es/components/icons/clear-icon.d.ts +4 -0
- package/es/components/icons/clear-icon.js +33 -0
- package/es/components/icons/indeterminate-icon.d.ts +4 -0
- package/es/components/icons/indeterminate-icon.js +21 -0
- package/es/components/icons/index.d.ts +8 -0
- package/es/components/icons/index.js +8 -0
- package/es/components/icons/loading-icon.d.ts +4 -0
- package/es/components/icons/loading-icon.js +81 -0
- package/es/components/icons/search-icon.d.ts +4 -0
- package/es/components/icons/search-icon.js +35 -0
- package/es/components/icons/spin-icon.d.ts +4 -0
- package/es/components/icons/spin-icon.js +24 -0
- package/es/components/icons/uncheck-icon.d.ts +4 -0
- package/es/components/icons/uncheck-icon.js +18 -0
- package/es/components/imageViewer/imageViewer.d.ts +4 -0
- package/es/components/imageViewer/imageViewer.js +28 -0
- package/es/components/imageViewer/index.d.ts +7 -0
- package/es/components/imageViewer/index.js +2 -0
- package/es/components/marketTag/index.d.ts +4 -0
- package/es/components/marketTag/index.js +3 -0
- package/es/components/marketTag/marketTag.css +14 -0
- package/es/components/marketTag/marketTag.d.ts +11 -0
- package/es/components/marketTag/marketTag.js +19 -0
- package/es/components/number-keyboard/index.d.ts +4 -0
- package/es/components/number-keyboard/index.js +3 -0
- package/es/components/number-keyboard/number-keyboard.css +77 -0
- package/es/components/number-keyboard/number-keyboard.d.ts +13 -0
- package/es/components/number-keyboard/number-keyboard.js +85 -0
- package/es/components/pdfLink/index.d.ts +3 -0
- package/es/components/pdfLink/index.js +3 -0
- package/es/components/pdfLink/pdfLink.css +11 -0
- package/es/components/pdfLink/pdfLink.d.ts +8 -0
- package/es/components/pdfLink/pdfLink.js +94 -0
- package/es/components/protocol/index.d.ts +3 -0
- package/es/components/protocol/index.js +3 -0
- package/es/components/protocol/protocol.css +46 -0
- package/es/components/protocol/protocol.d.ts +15 -0
- package/es/components/protocol/protocol.js +112 -0
- package/es/components/radio/group-context.d.ts +8 -0
- package/es/components/radio/group-context.js +2 -0
- package/es/components/radio/group.d.ts +10 -0
- package/es/components/radio/group.js +35 -0
- package/es/components/radio/index.d.ts +8 -0
- package/es/components/radio/index.js +7 -0
- package/es/components/radio/radio.css +92 -0
- package/es/components/radio/radio.d.ts +19 -0
- package/es/components/radio/radio.js +82 -0
- package/es/components/search/index.d.ts +3 -0
- package/es/components/search/index.js +3 -0
- package/es/components/search/search.css +53 -0
- package/es/components/search/search.d.ts +15 -0
- package/es/components/search/search.js +102 -0
- package/es/components/stock-count-keyboard/index.d.ts +4 -0
- package/es/components/stock-count-keyboard/index.js +3 -0
- package/es/components/stock-count-keyboard/stock-count-keyboard.css +74 -0
- package/es/components/stock-count-keyboard/stock-count-keyboard.d.ts +9 -0
- package/es/components/stock-count-keyboard/stock-count-keyboard.js +74 -0
- package/es/components/stock-keyboard/index.d.ts +4 -0
- package/es/components/stock-keyboard/index.js +3 -0
- package/es/components/stock-keyboard/stock-keyboard.css +111 -0
- package/es/components/stock-keyboard/stock-keyboard.d.ts +12 -0
- package/es/components/stock-keyboard/stock-keyboard.js +99 -0
- package/es/components/switch/index.d.ts +4 -0
- package/es/components/switch/index.js +3 -0
- package/es/components/switch/switch.css +104 -0
- package/es/components/switch/switch.d.ts +16 -0
- package/es/components/switch/switch.js +204 -0
- package/es/components/toastLoading/index.d.ts +4 -0
- package/es/components/toastLoading/index.js +3 -0
- package/es/components/toastLoading/toastLoading.css +27 -0
- package/es/components/toastLoading/toastLoading.d.ts +7 -0
- package/es/components/toastLoading/toastLoading.js +27 -0
- package/es/global/global.css +289 -0
- package/es/global/index.d.ts +1 -0
- package/es/global/index.js +9 -0
- package/es/global/theme-dark.css +18 -0
- package/es/global/theme-default.css +48 -0
- package/es/index.d.ts +18 -0
- package/es/index.js +18 -0
- package/es/utils/attach-properties-to-component.d.ts +1 -0
- package/es/utils/attach-properties-to-component.js +9 -0
- package/es/utils/bound.d.ts +1 -0
- package/es/utils/bound.js +10 -0
- package/es/utils/can-use-dom.d.ts +1 -0
- package/es/utils/can-use-dom.js +1 -0
- package/es/utils/convert-px.d.ts +1 -0
- package/es/utils/convert-px.js +27 -0
- package/es/utils/create-icon-component.d.ts +2 -0
- package/es/utils/create-icon-component.js +6 -0
- package/es/utils/dev-log.d.ts +3 -0
- package/es/utils/dev-log.js +37 -0
- package/es/utils/generate-int-array.d.ts +1 -0
- package/es/utils/generate-int-array.js +7 -0
- package/es/utils/get-container.d.ts +2 -0
- package/es/utils/get-container.js +4 -0
- package/es/utils/get-scroll-parent.d.ts +3 -0
- package/es/utils/get-scroll-parent.js +24 -0
- package/es/utils/is-dev.d.ts +1 -0
- package/es/utils/is-dev.js +1 -0
- package/es/utils/is-node-with-content.d.ts +4 -0
- package/es/utils/is-node-with-content.js +3 -0
- package/es/utils/matrix.d.ts +10 -0
- package/es/utils/matrix.js +32 -0
- package/es/utils/measure-css-length.d.ts +1 -0
- package/es/utils/measure-css-length.js +23 -0
- package/es/utils/merge-locale.d.ts +1 -0
- package/es/utils/merge-locale.js +15 -0
- package/es/utils/native-props.d.ts +8 -0
- package/es/utils/native-props.js +31 -0
- package/es/utils/nearest.d.ts +1 -0
- package/es/utils/nearest.js +5 -0
- package/es/utils/noop.d.ts +1 -0
- package/es/utils/noop.js +1 -0
- package/es/utils/reduce-and-restore-motion.d.ts +4 -0
- package/es/utils/reduce-and-restore-motion.js +35 -0
- package/es/utils/render-imperatively.d.ts +13 -0
- package/es/utils/render-imperatively.js +199 -0
- package/es/utils/render-to-body.d.ts +2 -0
- package/es/utils/render-to-body.js +13 -0
- package/es/utils/render-to-container.d.ts +3 -0
- package/es/utils/render-to-container.js +10 -0
- package/es/utils/render.d.ts +9 -0
- package/es/utils/render.js +187 -0
- package/es/utils/replace-message.d.ts +1 -0
- package/es/utils/replace-message.js +7 -0
- package/es/utils/rubberband.d.ts +2 -0
- package/es/utils/rubberband.js +13 -0
- package/es/utils/should-render.d.ts +10 -0
- package/es/utils/should-render.js +12 -0
- package/es/utils/shuffle.d.ts +6 -0
- package/es/utils/shuffle.js +23 -0
- package/es/utils/sleep.d.ts +1 -0
- package/es/utils/sleep.js +5 -0
- package/es/utils/supports-passive.d.ts +1 -0
- package/es/utils/supports-passive.js +13 -0
- package/es/utils/to-css-length.d.ts +1 -0
- package/es/utils/to-css-length.js +3 -0
- package/es/utils/traverse-react-node.d.ts +2 -0
- package/es/utils/traverse-react-node.js +16 -0
- package/es/utils/tree.d.ts +1 -0
- package/es/utils/tree.js +18 -0
- package/es/utils/undefined-fallback.d.ts +3 -0
- package/es/utils/undefined-fallback.js +11 -0
- package/es/utils/use-drag-and-pinch.d.ts +1 -0
- package/es/utils/use-drag-and-pinch.js +2 -0
- package/es/utils/use-initialized.d.ts +1 -0
- package/es/utils/use-initialized.js +8 -0
- package/es/utils/use-inner-visible.d.ts +1 -0
- package/es/utils/use-inner-visible.js +11 -0
- package/es/utils/use-isomorphic-update-layout-effect.d.ts +2 -0
- package/es/utils/use-isomorphic-update-layout-effect.js +2 -0
- package/es/utils/use-lock-scroll.d.ts +2 -0
- package/es/utils/use-lock-scroll.js +78 -0
- package/es/utils/use-mutation-effect.d.ts +2 -0
- package/es/utils/use-mutation-effect.js +15 -0
- package/es/utils/use-props-value.d.ts +8 -0
- package/es/utils/use-props-value.js +24 -0
- package/es/utils/use-ref-state.d.ts +2 -0
- package/es/utils/use-ref-state.js +11 -0
- package/es/utils/use-resize-effect.d.ts +2 -0
- package/es/utils/use-resize-effect.js +23 -0
- package/es/utils/use-tab-list-scroll.d.ts +5 -0
- package/es/utils/use-tab-list-scroll.js +60 -0
- package/es/utils/use-touch.d.ts +17 -0
- package/es/utils/use-touch.js +63 -0
- package/es/utils/validate.d.ts +8 -0
- package/es/utils/validate.js +26 -0
- package/es/utils/with-cache.d.ts +1 -0
- package/es/utils/with-cache.js +9 -0
- package/es/utils/with-default-props.d.ts +2 -0
- package/es/utils/with-default-props.js +25 -0
- package/es/utils/with-func-props.d.ts +5 -0
- package/es/utils/with-func-props.js +32 -0
- package/es/utils/with-stop-propagation.d.ts +4 -0
- package/es/utils/with-stop-propagation.js +30 -0
- package/package.json +48 -20
- package/__vendor/__vendor.js +0 -1
- package/handRead/handRead.d.ts +0 -6
- package/handRead/handRead.js +0 -302
- package/handRead/index.d.ts +0 -25
- package/handRead/index.js +0 -11
- package/imageViewer/imageViewer.d.ts +0 -3
- package/imageViewer/imageViewer.js +0 -28
- package/imageViewer/index.js +0 -8
- package/index.d.ts +0 -6
- package/index.js +0 -14
- package/keyboard/index.d.ts +0 -13
- package/keyboard/index.js +0 -7
- package/keyboard/keyboard.d.ts +0 -2
- package/keyboard/keyboard.js +0 -87
- package/style.css +0 -1
- package/utils/isEqual.d.ts +0 -5
- /package/{imageViewer → cjs/components/imageViewer}/index.d.ts +0 -0
package/cjs/index.js
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _exportNames = {
|
|
7
|
+
Card: true,
|
|
8
|
+
NumberKeyboard: true,
|
|
9
|
+
AlphabetKeyboard: true,
|
|
10
|
+
StockKeyboard: true,
|
|
11
|
+
StockCountKeyboard: true,
|
|
12
|
+
ToastLoading: true,
|
|
13
|
+
ImageViewer: true,
|
|
14
|
+
MarketTag: true,
|
|
15
|
+
Checkbox: true,
|
|
16
|
+
Grid: true,
|
|
17
|
+
Radio: true,
|
|
18
|
+
Protocal: true,
|
|
19
|
+
PdfLink: true,
|
|
20
|
+
Switch: true,
|
|
21
|
+
Search: true,
|
|
22
|
+
Button: true
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "AlphabetKeyboard", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _alphabetKeyboard.default;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "Button", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _button.default;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "Card", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _card.default;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "Checkbox", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return _checkbox.default;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "Grid", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () {
|
|
51
|
+
return _grid.default;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "ImageViewer", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _imageViewer.default;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "MarketTag", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () {
|
|
63
|
+
return _marketTag.default;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "NumberKeyboard", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () {
|
|
69
|
+
return _numberKeyboard.default;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, "PdfLink", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () {
|
|
75
|
+
return _pdfLink.default;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
Object.defineProperty(exports, "Protocal", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function () {
|
|
81
|
+
return _protocol.default;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
Object.defineProperty(exports, "Radio", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: function () {
|
|
87
|
+
return _radio.default;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
Object.defineProperty(exports, "Search", {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function () {
|
|
93
|
+
return _search.default;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
Object.defineProperty(exports, "StockCountKeyboard", {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
get: function () {
|
|
99
|
+
return _stockCountKeyboard.default;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
Object.defineProperty(exports, "StockKeyboard", {
|
|
103
|
+
enumerable: true,
|
|
104
|
+
get: function () {
|
|
105
|
+
return _stockKeyboard.default;
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
Object.defineProperty(exports, "Switch", {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
get: function () {
|
|
111
|
+
return _switch.default;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
Object.defineProperty(exports, "ToastLoading", {
|
|
115
|
+
enumerable: true,
|
|
116
|
+
get: function () {
|
|
117
|
+
return _toastLoading.default;
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
require("./global");
|
|
121
|
+
var _icons = require("./components/icons");
|
|
122
|
+
Object.keys(_icons).forEach(function (key) {
|
|
123
|
+
if (key === "default" || key === "__esModule") return;
|
|
124
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
125
|
+
if (key in exports && exports[key] === _icons[key]) return;
|
|
126
|
+
Object.defineProperty(exports, key, {
|
|
127
|
+
enumerable: true,
|
|
128
|
+
get: function () {
|
|
129
|
+
return _icons[key];
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
var _card = _interopRequireDefault(require("./components/card"));
|
|
134
|
+
var _numberKeyboard = _interopRequireDefault(require("./components/number-keyboard"));
|
|
135
|
+
var _alphabetKeyboard = _interopRequireDefault(require("./components/alphabet-keyboard"));
|
|
136
|
+
var _stockKeyboard = _interopRequireDefault(require("./components/stock-keyboard"));
|
|
137
|
+
var _stockCountKeyboard = _interopRequireDefault(require("./components/stock-count-keyboard"));
|
|
138
|
+
var _toastLoading = _interopRequireDefault(require("./components/toastLoading"));
|
|
139
|
+
var _imageViewer = _interopRequireDefault(require("./components/imageViewer"));
|
|
140
|
+
var _marketTag = _interopRequireDefault(require("./components/marketTag"));
|
|
141
|
+
var _checkbox = _interopRequireDefault(require("./components/checkbox"));
|
|
142
|
+
var _grid = _interopRequireDefault(require("./components/grid"));
|
|
143
|
+
var _radio = _interopRequireDefault(require("./components/radio"));
|
|
144
|
+
var _protocol = _interopRequireDefault(require("./components/protocol"));
|
|
145
|
+
var _pdfLink = _interopRequireDefault(require("./components/pdfLink"));
|
|
146
|
+
var _switch = _interopRequireDefault(require("./components/switch"));
|
|
147
|
+
var _search = _interopRequireDefault(require("./components/search"));
|
|
148
|
+
var _button = _interopRequireDefault(require("./components/button"));
|
|
149
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function attachPropertiesToComponent<C, P extends Record<string, any>>(component: C, properties: P): C & P;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.attachPropertiesToComponent = attachPropertiesToComponent;
|
|
7
|
+
function attachPropertiesToComponent(component, properties) {
|
|
8
|
+
var ret = component;
|
|
9
|
+
for (var key in properties) {
|
|
10
|
+
if (properties.hasOwnProperty(key)) {
|
|
11
|
+
ret[key] = properties[key];
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return ret;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function bound(position: number, min: number | undefined, max: number | undefined): number;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.bound = bound;
|
|
7
|
+
function bound(position, min, max) {
|
|
8
|
+
var ret = position;
|
|
9
|
+
if (min !== undefined) {
|
|
10
|
+
ret = Math.max(position, min);
|
|
11
|
+
}
|
|
12
|
+
if (max !== undefined) {
|
|
13
|
+
ret = Math.min(ret, max);
|
|
14
|
+
}
|
|
15
|
+
return ret;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const canUseDom: boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.canUseDom = void 0;
|
|
7
|
+
var canUseDom = exports.canUseDom = !!(typeof window !== 'undefined' && typeof document !== 'undefined' && window.document && window.document.createElement);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function convertPx(px: number): number;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.convertPx = convertPx;
|
|
7
|
+
var _canUseDom = require("./can-use-dom");
|
|
8
|
+
var _isDev = require("./is-dev");
|
|
9
|
+
var _devLog = require("./dev-log");
|
|
10
|
+
var tenPxTester = null;
|
|
11
|
+
var tester = null;
|
|
12
|
+
if (_canUseDom.canUseDom) {
|
|
13
|
+
tenPxTester = document.createElement('div');
|
|
14
|
+
tenPxTester.className = 'adm-px-tester';
|
|
15
|
+
tenPxTester.style.setProperty('--size', '10');
|
|
16
|
+
document.body.appendChild(tenPxTester);
|
|
17
|
+
tester = document.createElement('div');
|
|
18
|
+
tester.className = 'adm-px-tester';
|
|
19
|
+
document.body.appendChild(tester);
|
|
20
|
+
if (_isDev.isDev) {
|
|
21
|
+
if (window.getComputedStyle(tester).position !== 'fixed') {
|
|
22
|
+
(0, _devLog.devError)('Global', 'The px tester is not rendering properly. Please make sure you have imported `antd-mobile/es/global`.');
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function convertPx(px) {
|
|
27
|
+
if (tenPxTester === null || tester === null) return px;
|
|
28
|
+
if (tenPxTester.getBoundingClientRect().height === 10) {
|
|
29
|
+
return px;
|
|
30
|
+
}
|
|
31
|
+
tester.style.setProperty('--size', px.toString());
|
|
32
|
+
return tester.getBoundingClientRect().height;
|
|
33
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.devError = devError;
|
|
7
|
+
exports.devPrint = devPrint;
|
|
8
|
+
exports.devWarning = devWarning;
|
|
9
|
+
var _isDev = require("./is-dev");
|
|
10
|
+
function devWarning(component, message) {
|
|
11
|
+
if (_isDev.isDev) {
|
|
12
|
+
console.warn("[antd-mobile: ".concat(component, "] ").concat(message));
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function devError(component, message) {
|
|
16
|
+
if (_isDev.isDev) {
|
|
17
|
+
console.error("[antd-mobile: ".concat(component, "] ").concat(message));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
var infoBox;
|
|
21
|
+
function devPrint() {
|
|
22
|
+
var message = [];
|
|
23
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
24
|
+
message[_i] = arguments[_i];
|
|
25
|
+
}
|
|
26
|
+
if (_isDev.isDev) {
|
|
27
|
+
if (!infoBox) {
|
|
28
|
+
infoBox = document.createElement('textarea');
|
|
29
|
+
document.body.append(infoBox);
|
|
30
|
+
infoBox.style.position = 'fixed';
|
|
31
|
+
infoBox.style.top = '0';
|
|
32
|
+
infoBox.style.left = '0';
|
|
33
|
+
infoBox.style.width = '100vw';
|
|
34
|
+
infoBox.style.height = '100vh';
|
|
35
|
+
infoBox.style.zIndex = '999999';
|
|
36
|
+
infoBox.style.fontSize = '12px';
|
|
37
|
+
// infoBox.style.opacity = '0.85'
|
|
38
|
+
infoBox.style.pointerEvents = 'none';
|
|
39
|
+
infoBox.style.background = 'transparent';
|
|
40
|
+
infoBox.style.textShadow = '-1px -1px 0 #FFF, -1px 1px 0 #FFF, 1px -1px 0 #FFF, 1px 1px 0 #FFF';
|
|
41
|
+
}
|
|
42
|
+
infoBox.value = "".concat(infoBox.value, "\n").concat(message.join(' ')).trim();
|
|
43
|
+
infoBox.scrollTop = infoBox.scrollHeight;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function generateIntArray(from: number, to: number): number[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.generateIntArray = generateIntArray;
|
|
7
|
+
function generateIntArray(from, to) {
|
|
8
|
+
var array = [];
|
|
9
|
+
for (var i = from; i <= to; i++) {
|
|
10
|
+
array.push(i);
|
|
11
|
+
}
|
|
12
|
+
return array;
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.resolveContainer = resolveContainer;
|
|
7
|
+
function resolveContainer(getContainer) {
|
|
8
|
+
var container = typeof getContainer === 'function' ? getContainer() : getContainer;
|
|
9
|
+
return container || document.body;
|
|
10
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getScrollParent = getScrollParent;
|
|
7
|
+
var _canUseDom = require("./can-use-dom");
|
|
8
|
+
var defaultRoot = _canUseDom.canUseDom ? window : undefined;
|
|
9
|
+
var overflowStylePatterns = ['scroll', 'auto', 'overlay'];
|
|
10
|
+
function isElement(node) {
|
|
11
|
+
var ELEMENT_NODE_TYPE = 1;
|
|
12
|
+
return node.nodeType === ELEMENT_NODE_TYPE;
|
|
13
|
+
}
|
|
14
|
+
function getScrollParent(el, root) {
|
|
15
|
+
if (root === void 0) {
|
|
16
|
+
root = defaultRoot;
|
|
17
|
+
}
|
|
18
|
+
var node = el;
|
|
19
|
+
while (node && node !== root && isElement(node)) {
|
|
20
|
+
if (node === document.body) {
|
|
21
|
+
return root;
|
|
22
|
+
}
|
|
23
|
+
var overflowY = window.getComputedStyle(node).overflowY;
|
|
24
|
+
if (overflowStylePatterns.includes(overflowY) && node.scrollHeight > node.clientHeight) {
|
|
25
|
+
return node;
|
|
26
|
+
}
|
|
27
|
+
node = node.parentNode;
|
|
28
|
+
}
|
|
29
|
+
return root;
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isDev: boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type Matrix = readonly [number, number, number, number, number, number];
|
|
2
|
+
export declare const create: () => Matrix;
|
|
3
|
+
export declare const getTranslateX: (m: Matrix) => number;
|
|
4
|
+
export declare const getTranslateY: (m: Matrix) => number;
|
|
5
|
+
export declare const getScaleX: (m: Matrix) => number;
|
|
6
|
+
export declare const getScaleY: (m: Matrix) => number;
|
|
7
|
+
export declare const translate: (m: Matrix, x: number, y: number) => Matrix;
|
|
8
|
+
export declare const scale: (m: Matrix, scaleX: number, scaleY?: number) => Matrix;
|
|
9
|
+
export declare const apply: (m: Matrix, [ox, oy]: [number, number]) => [number, number];
|
|
10
|
+
export declare const multiply: (m1: Matrix, m2: Matrix) => Matrix;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.translate = exports.scale = exports.multiply = exports.getTranslateY = exports.getTranslateX = exports.getScaleY = exports.getScaleX = exports.create = exports.apply = void 0;
|
|
7
|
+
var create = function () {
|
|
8
|
+
return [1, 0, 0, 1, 0, 0];
|
|
9
|
+
};
|
|
10
|
+
exports.create = create;
|
|
11
|
+
var getTranslateX = function (m) {
|
|
12
|
+
return m[4];
|
|
13
|
+
};
|
|
14
|
+
exports.getTranslateX = getTranslateX;
|
|
15
|
+
var getTranslateY = function (m) {
|
|
16
|
+
return m[5];
|
|
17
|
+
};
|
|
18
|
+
exports.getTranslateY = getTranslateY;
|
|
19
|
+
var getScaleX = function (m) {
|
|
20
|
+
return m[0];
|
|
21
|
+
};
|
|
22
|
+
exports.getScaleX = getScaleX;
|
|
23
|
+
var getScaleY = function (m) {
|
|
24
|
+
return m[3];
|
|
25
|
+
};
|
|
26
|
+
exports.getScaleY = getScaleY;
|
|
27
|
+
var translate = function (m, x, y) {
|
|
28
|
+
return multiply([1, 0, 0, 1, x, y], m);
|
|
29
|
+
};
|
|
30
|
+
exports.translate = translate;
|
|
31
|
+
var scale = function (m, scaleX, scaleY) {
|
|
32
|
+
if (scaleY === void 0) {
|
|
33
|
+
scaleY = scaleX;
|
|
34
|
+
}
|
|
35
|
+
return multiply([scaleX, 0, 0, scaleY, 0, 0], m);
|
|
36
|
+
};
|
|
37
|
+
exports.scale = scale;
|
|
38
|
+
var apply = function (m, _a) {
|
|
39
|
+
var ox = _a[0],
|
|
40
|
+
oy = _a[1];
|
|
41
|
+
return [m[0] * ox + m[2] * oy + m[4], m[1] * ox + m[3] * oy + m[5]];
|
|
42
|
+
};
|
|
43
|
+
exports.apply = apply;
|
|
44
|
+
var multiply = function (m1, m2) {
|
|
45
|
+
return [m1[0] * m2[0] + m1[2] * m2[1], m1[1] * m2[0] + m1[3] * m2[1], m1[0] * m2[2] + m1[2] * m2[3], m1[1] * m2[2] + m1[3] * m2[3], m1[0] * m2[4] + m1[2] * m2[5] + m1[4], m1[1] * m2[4] + m1[3] * m2[5] + m1[5]];
|
|
46
|
+
};
|
|
47
|
+
exports.multiply = multiply;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function measureCSSLength(raw: string | undefined | null): number;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.measureCSSLength = measureCSSLength;
|
|
7
|
+
var _isDev = require("./is-dev");
|
|
8
|
+
var _devLog = require("./dev-log");
|
|
9
|
+
function measureCSSLength(raw) {
|
|
10
|
+
if (raw === null || raw === undefined || raw === '') {
|
|
11
|
+
if (_isDev.isDev) {
|
|
12
|
+
(0, _devLog.devError)('Global', 'Something went wrong when calculating CSS length. Please report an issue at https://github.com/ant-design/ant-design-mobile/issues/new/choose');
|
|
13
|
+
}
|
|
14
|
+
return 0;
|
|
15
|
+
}
|
|
16
|
+
var withUnit = raw.trim();
|
|
17
|
+
if (withUnit.endsWith('px')) {
|
|
18
|
+
return parseFloat(withUnit);
|
|
19
|
+
} else if (withUnit.endsWith('rem')) {
|
|
20
|
+
return parseFloat(withUnit) * parseFloat(window.getComputedStyle(document.documentElement).fontSize);
|
|
21
|
+
} else if (withUnit.endsWith('vw')) {
|
|
22
|
+
return parseFloat(withUnit) * window.innerWidth / 100;
|
|
23
|
+
} else {
|
|
24
|
+
if (_isDev.isDev) {
|
|
25
|
+
(0, _devLog.devError)('Global', "You are using a not supported CSS unit in `".concat(raw, "`. Only `px` `rem` and `vw` are supported."));
|
|
26
|
+
}
|
|
27
|
+
return 0;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mergeLocale<T extends object, P extends object>(base: T, patch: P): T;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.mergeLocale = mergeLocale;
|
|
7
|
+
function mergeLocale(base, patch) {
|
|
8
|
+
function merge(a, b) {
|
|
9
|
+
if (typeof a !== 'object' || typeof b !== 'object' || Array.isArray(a) || Array.isArray(b)) {
|
|
10
|
+
return b !== undefined ? b : a;
|
|
11
|
+
}
|
|
12
|
+
var result = {};
|
|
13
|
+
for (var key in a) {
|
|
14
|
+
if (a.hasOwnProperty(key)) {
|
|
15
|
+
result[key] = merge(a[key], b[key]);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return result;
|
|
19
|
+
}
|
|
20
|
+
return merge(base, patch);
|
|
21
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { AriaAttributes } from 'react';
|
|
2
|
+
import type { CSSProperties, ReactElement } from 'react';
|
|
3
|
+
export type NativeProps<S extends string = never> = {
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: CSSProperties & Partial<Record<S, string>>;
|
|
6
|
+
tabIndex?: number;
|
|
7
|
+
} & AriaAttributes;
|
|
8
|
+
export declare function withNativeProps<P extends NativeProps>(props: P, element: ReactElement): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.withNativeProps = withNativeProps;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
11
|
+
__assign = Object.assign || function (t) {
|
|
12
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
13
|
+
s = arguments[i];
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
15
|
+
}
|
|
16
|
+
return t;
|
|
17
|
+
};
|
|
18
|
+
return __assign.apply(this, arguments);
|
|
19
|
+
};
|
|
20
|
+
function withNativeProps(props, element) {
|
|
21
|
+
var p = __assign({}, element.props);
|
|
22
|
+
if (props.className) {
|
|
23
|
+
p.className = (0, _classnames.default)(element.props.className, props.className);
|
|
24
|
+
}
|
|
25
|
+
if (props.style) {
|
|
26
|
+
p.style = __assign(__assign({}, p.style), props.style);
|
|
27
|
+
}
|
|
28
|
+
if (props.tabIndex !== undefined) {
|
|
29
|
+
p.tabIndex = props.tabIndex;
|
|
30
|
+
}
|
|
31
|
+
for (var key in props) {
|
|
32
|
+
if (!props.hasOwnProperty(key)) continue;
|
|
33
|
+
if (key.startsWith('data-') || key.startsWith('aria-')) {
|
|
34
|
+
p[key] = props[key];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return _react.default.cloneElement(element, p);
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function nearest(arr: number[], target: number): number;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.nearest = nearest;
|
|
7
|
+
function nearest(arr, target) {
|
|
8
|
+
return arr.reduce(function (pre, cur) {
|
|
9
|
+
return Math.abs(pre - target) < Math.abs(cur - target) ? pre : cur;
|
|
10
|
+
});
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const noop: () => void;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.isMotionReduced = isMotionReduced;
|
|
7
|
+
exports.reduceMotion = reduceMotion;
|
|
8
|
+
exports.restoreMotion = restoreMotion;
|
|
9
|
+
exports.useMotionReduced = useMotionReduced;
|
|
10
|
+
var _web = require("@react-spring/web");
|
|
11
|
+
var _shim = require("use-sync-external-store/shim");
|
|
12
|
+
var reduced = false;
|
|
13
|
+
var subscribers = new Set();
|
|
14
|
+
function notify() {
|
|
15
|
+
subscribers.forEach(function (subscriber) {
|
|
16
|
+
subscriber();
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function reduceMotion() {
|
|
20
|
+
reduced = true;
|
|
21
|
+
notify();
|
|
22
|
+
_web.Globals.assign({
|
|
23
|
+
skipAnimation: true
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function restoreMotion() {
|
|
27
|
+
reduced = false;
|
|
28
|
+
notify();
|
|
29
|
+
_web.Globals.assign({
|
|
30
|
+
skipAnimation: false
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function isMotionReduced() {
|
|
34
|
+
return reduced;
|
|
35
|
+
}
|
|
36
|
+
function subscribe(onStoreChange) {
|
|
37
|
+
subscribers.add(onStoreChange);
|
|
38
|
+
return function () {
|
|
39
|
+
subscribers.delete(onStoreChange);
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function useMotionReduced() {
|
|
43
|
+
return (0, _shim.useSyncExternalStore)(subscribe, isMotionReduced, isMotionReduced);
|
|
44
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
type ImperativeProps = {
|
|
3
|
+
visible?: boolean;
|
|
4
|
+
onClose?: () => void;
|
|
5
|
+
afterClose?: () => void;
|
|
6
|
+
};
|
|
7
|
+
type TargetElement = ReactElement<ImperativeProps>;
|
|
8
|
+
export type ImperativeHandler = {
|
|
9
|
+
close: () => void;
|
|
10
|
+
replace: (element: TargetElement) => void;
|
|
11
|
+
};
|
|
12
|
+
export declare function renderImperatively(element: TargetElement): ImperativeHandler;
|
|
13
|
+
export {};
|