zartui 0.1.112 → 3.0.2
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 +6 -2
- package/es/badge/Badge.d.ts +66 -0
- package/es/badge/Badge.mjs +95 -0
- package/es/badge/index.css +1 -0
- package/es/badge/index.d.ts +49 -0
- package/es/badge/index.mjs +8 -0
- package/es/badge/style/index.d.ts +1 -0
- package/es/badge/style/index.mjs +2 -0
- package/es/button/Button.d.ts +154 -0
- package/es/button/Button.mjs +166 -0
- package/es/button/index.css +1 -0
- package/es/button/index.d.ts +113 -0
- package/es/button/index.mjs +8 -0
- package/es/button/style/index.d.ts +1 -0
- package/es/button/style/index.mjs +5 -0
- package/es/button/types.d.ts +5 -0
- package/es/button/types.mjs +0 -0
- package/es/cell/Cell.d.ts +128 -0
- package/es/cell/Cell.mjs +132 -0
- package/es/cell/index.css +1 -0
- package/es/cell/index.d.ts +74 -0
- package/es/cell/index.mjs +8 -0
- package/es/cell/style/index.d.ts +1 -0
- package/es/cell/style/index.mjs +4 -0
- package/es/col/Col.d.ts +38 -0
- package/es/col/Col.mjs +63 -0
- package/es/col/index.css +1 -0
- package/es/col/index.d.ts +31 -0
- package/es/col/index.mjs +8 -0
- package/es/col/style/index.d.ts +1 -0
- package/es/col/style/index.mjs +3 -0
- package/es/composables/on-popup-reopen.d.ts +3 -0
- package/es/composables/on-popup-reopen.mjs +16 -0
- package/es/composables/use-expose.d.ts +1 -0
- package/es/composables/use-expose.mjs +11 -0
- package/es/composables/use-height.d.ts +2 -0
- package/es/composables/use-height.mjs +20 -0
- package/es/composables/use-id.d.ts +1 -0
- package/es/composables/use-id.mjs +13 -0
- package/es/composables/use-lazy-render.d.ts +2 -0
- package/es/composables/use-lazy-render.mjs +17 -0
- package/es/composables/use-lock-scroll.d.ts +2 -0
- package/es/composables/use-lock-scroll.mjs +56 -0
- package/es/composables/use-placeholder.d.ts +3 -0
- package/es/composables/use-placeholder.mjs +14 -0
- package/es/composables/use-refs.d.ts +2 -0
- package/es/composables/use-refs.mjs +20 -0
- package/es/composables/use-route.d.ts +13 -0
- package/es/composables/use-route.mjs +29 -0
- package/es/composables/use-tab-status.d.ts +3 -0
- package/es/composables/use-tab-status.mjs +7 -0
- package/es/composables/use-touch.d.ts +16 -0
- package/es/composables/use-touch.mjs +61 -0
- package/es/composables/use-visibility-change.d.ts +2 -0
- package/es/composables/use-visibility-change.mjs +30 -0
- package/es/config-provider/ConfigProvider.d.ts +47 -0
- package/es/config-provider/ConfigProvider.mjs +64 -0
- package/es/config-provider/index.d.ts +33 -0
- package/es/config-provider/index.mjs +8 -0
- package/es/config-provider/style/index.d.ts +1 -0
- package/es/config-provider/style/index.mjs +1 -0
- package/es/divider/Divider.d.ts +40 -0
- package/es/divider/Divider.mjs +31 -0
- package/es/divider/index.css +1 -0
- package/es/divider/index.d.ts +32 -0
- package/es/divider/index.mjs +8 -0
- package/es/divider/style/index.d.ts +1 -0
- package/es/divider/style/index.mjs +2 -0
- package/es/empty/Empty.d.ts +29 -0
- package/es/empty/Empty.mjs +58 -0
- package/es/empty/Images.d.ts +4 -0
- package/es/empty/Images.mjs +2104 -0
- package/es/empty/index.css +1 -0
- package/es/empty/index.d.ts +24 -0
- package/es/empty/index.mjs +8 -0
- package/es/empty/style/index.d.ts +1 -0
- package/es/empty/style/index.mjs +2 -0
- package/es/icon/Icon.d.ts +45 -0
- package/es/icon/Icon.mjs +59 -0
- package/es/icon/config.d.ts +41 -0
- package/es/icon/config.mjs +139 -0
- package/es/icon/index.css +1 -0
- package/es/icon/index.d.ts +35 -0
- package/es/icon/index.mjs +8 -0
- package/es/icon/style/index.d.ts +1 -0
- package/es/icon/style/index.mjs +3 -0
- package/es/index.d.ts +35 -0
- package/es/index.mjs +105 -0
- package/es/list/List.d.ts +74 -0
- package/es/list/List.mjs +147 -0
- package/es/list/index.css +1 -0
- package/es/list/index.d.ts +59 -0
- package/es/list/index.mjs +8 -0
- package/es/list/style/index.d.ts +1 -0
- package/es/list/style/index.mjs +4 -0
- package/es/list/types.d.ts +7 -0
- package/es/list/types.mjs +0 -0
- package/es/loading/Loading.d.ts +39 -0
- package/es/loading/Loading.mjs +114 -0
- package/es/loading/index.css +1 -0
- package/es/loading/index.d.ts +31 -0
- package/es/loading/index.mjs +8 -0
- package/es/loading/style/index.d.ts +1 -0
- package/es/loading/style/index.mjs +2 -0
- package/es/locale/index.d.ts +7 -0
- package/es/locale/index.mjs +24 -0
- package/es/locale/lang/en-US.d.ts +62 -0
- package/es/locale/lang/en-US.mjs +64 -0
- package/es/locale/lang/zh-CN.d.ts +62 -0
- package/es/locale/lang/zh-CN.mjs +64 -0
- package/es/locale/style/index.d.ts +1 -0
- package/es/locale/style/index.mjs +1 -0
- package/es/notice-bar/NoticeBar.d.ts +71 -0
- package/es/notice-bar/NoticeBar.mjs +165 -0
- package/es/notice-bar/index.css +1 -0
- package/es/notice-bar/index.d.ts +56 -0
- package/es/notice-bar/index.mjs +8 -0
- package/es/notice-bar/style/index.d.ts +1 -0
- package/es/notice-bar/style/index.mjs +4 -0
- package/es/notice-bar/types.d.ts +7 -0
- package/es/notice-bar/types.mjs +0 -0
- package/es/notify/Notify.d.ts +134 -0
- package/es/notify/Notify.mjs +44 -0
- package/es/notify/function-call.d.ts +6 -0
- package/es/notify/function-call.mjs +68 -0
- package/es/notify/index.css +1 -0
- package/es/notify/index.d.ts +99 -0
- package/es/notify/index.mjs +18 -0
- package/es/notify/style/index.d.ts +1 -0
- package/es/notify/style/index.mjs +6 -0
- package/es/notify/types.d.ts +17 -0
- package/es/notify/types.mjs +0 -0
- package/es/number-keyboard/NumberKeyboard.d.ts +162 -0
- package/es/number-keyboard/NumberKeyboard.mjs +243 -0
- package/es/number-keyboard/NumberKeyboardKey.d.ts +24 -0
- package/es/number-keyboard/NumberKeyboardKey.mjs +89 -0
- package/es/number-keyboard/index.css +1 -0
- package/es/number-keyboard/index.d.ts +119 -0
- package/es/number-keyboard/index.mjs +8 -0
- package/es/number-keyboard/style/index.d.ts +1 -0
- package/es/number-keyboard/style/index.mjs +9 -0
- package/es/overlay/Overlay.d.ts +51 -0
- package/es/overlay/Overlay.mjs +47 -0
- package/es/overlay/index.css +1 -0
- package/es/overlay/index.d.ts +40 -0
- package/es/overlay/index.mjs +8 -0
- package/es/overlay/style/index.d.ts +1 -0
- package/es/overlay/style/index.mjs +2 -0
- package/es/password-input/PasswordInput.d.ts +63 -0
- package/es/password-input/PasswordInput.mjs +78 -0
- package/es/password-input/index.css +1 -0
- package/es/password-input/index.d.ts +49 -0
- package/es/password-input/index.mjs +8 -0
- package/es/password-input/style/index.d.ts +1 -0
- package/es/password-input/style/index.mjs +2 -0
- package/es/popup/Popup.d.ts +165 -0
- package/es/popup/Popup.mjs +205 -0
- package/es/popup/index.css +1 -0
- package/es/popup/index.d.ts +123 -0
- package/es/popup/index.mjs +8 -0
- package/es/popup/shared.d.ts +30 -0
- package/es/popup/shared.mjs +22 -0
- package/es/popup/style/index.d.ts +1 -0
- package/es/popup/style/index.mjs +5 -0
- package/es/popup/types.d.ts +8 -0
- package/es/popup/types.mjs +0 -0
- package/es/pull-refresh/PullRefresh.d.ts +75 -0
- package/es/pull-refresh/PullRefresh.mjs +191 -0
- package/es/pull-refresh/index.css +1 -0
- package/es/pull-refresh/index.d.ts +58 -0
- package/es/pull-refresh/index.mjs +8 -0
- package/es/pull-refresh/style/index.d.ts +1 -0
- package/es/pull-refresh/style/index.mjs +3 -0
- package/es/rate/Rate.d.ts +107 -0
- package/es/rate/Rate.mjs +217 -0
- package/es/rate/index.css +1 -0
- package/es/rate/index.d.ts +80 -0
- package/es/rate/index.mjs +8 -0
- package/es/rate/style/index.d.ts +1 -0
- package/es/rate/style/index.mjs +4 -0
- package/es/row/Row.d.ts +64 -0
- package/es/row/Row.mjs +91 -0
- package/es/row/index.css +1 -0
- package/es/row/index.d.ts +42 -0
- package/es/row/index.mjs +8 -0
- package/es/row/style/index.d.ts +1 -0
- package/es/row/style/index.mjs +2 -0
- package/es/stepper/Stepper.d.ts +181 -0
- package/es/stepper/Stepper.mjs +258 -0
- package/es/stepper/index.css +1 -0
- package/es/stepper/index.d.ts +132 -0
- package/es/stepper/index.mjs +8 -0
- package/es/stepper/style/index.d.ts +1 -0
- package/es/stepper/style/index.mjs +4 -0
- package/es/sticky/Sticky.d.ts +58 -0
- package/es/sticky/Sticky.mjs +119 -0
- package/es/sticky/index.css +1 -0
- package/es/sticky/index.d.ts +45 -0
- package/es/sticky/index.mjs +8 -0
- package/es/sticky/style/index.d.ts +1 -0
- package/es/sticky/style/index.mjs +2 -0
- package/es/style/animation.css +1 -0
- package/es/style/base.css +1 -0
- package/es/style/css-variables.css +1 -0
- package/es/style/mixins/clearfix.css +0 -0
- package/es/style/mixins/ellipsis.css +0 -0
- package/es/style/mixins/hairline.css +0 -0
- package/es/style/normalize.css +1 -0
- package/es/swipe/Swipe.d.ts +121 -0
- package/es/swipe/Swipe.mjs +353 -0
- package/es/swipe/index.css +1 -0
- package/es/swipe/index.d.ts +90 -0
- package/es/swipe/index.mjs +8 -0
- package/es/swipe/style/index.d.ts +1 -0
- package/es/swipe/style/index.mjs +2 -0
- package/es/swipe/types.d.ts +31 -0
- package/es/swipe/types.mjs +0 -0
- package/es/swipe-item/SwipeItem.d.ts +2 -0
- package/es/swipe-item/SwipeItem.mjs +82 -0
- package/es/swipe-item/index.css +1 -0
- package/es/swipe-item/index.d.ts +7 -0
- package/es/swipe-item/index.mjs +8 -0
- package/es/swipe-item/style/index.d.ts +1 -0
- package/es/swipe-item/style/index.mjs +3 -0
- package/es/switch/Switch.d.ts +58 -0
- package/es/switch/Switch.mjs +85 -0
- package/es/switch/index.css +1 -0
- package/es/switch/index.d.ts +46 -0
- package/es/switch/index.mjs +8 -0
- package/es/switch/style/index.d.ts +1 -0
- package/es/switch/style/index.mjs +3 -0
- package/es/tab/Tab.d.ts +58 -0
- package/es/tab/Tab.mjs +113 -0
- package/es/tab/index.css +1 -0
- package/es/tab/index.d.ts +45 -0
- package/es/tab/index.mjs +8 -0
- package/es/tab/style/index.d.ts +1 -0
- package/es/tab/style/index.mjs +7 -0
- package/es/tabs/Tabs.d.ts +154 -0
- package/es/tabs/Tabs.mjs +352 -0
- package/es/tabs/TabsContent.d.ts +43 -0
- package/es/tabs/TabsContent.mjs +64 -0
- package/es/tabs/TabsTitle.d.ts +45 -0
- package/es/tabs/TabsTitle.mjs +90 -0
- package/es/tabs/index.css +1 -0
- package/es/tabs/index.d.ts +114 -0
- package/es/tabs/index.mjs +8 -0
- package/es/tabs/style/index.d.ts +1 -0
- package/es/tabs/style/index.mjs +5 -0
- package/es/tabs/types.d.ts +23 -0
- package/es/tabs/types.mjs +0 -0
- package/es/tabs/utils.d.ts +3 -0
- package/es/tabs/utils.mjs +37 -0
- package/es/toast/Toast.d.ts +112 -0
- package/es/toast/Toast.mjs +119 -0
- package/es/toast/function-call.d.ts +10 -0
- package/es/toast/function-call.mjs +142 -0
- package/es/toast/index.css +1 -0
- package/es/toast/index.d.ts +79 -0
- package/es/toast/index.mjs +26 -0
- package/es/toast/lock-click.d.ts +1 -0
- package/es/toast/lock-click.mjs +17 -0
- package/es/toast/style/index.d.ts +1 -0
- package/es/toast/style/index.mjs +7 -0
- package/es/toast/types.d.ts +36 -0
- package/es/toast/types.mjs +0 -0
- package/es/utils/basic.d.ts +18 -0
- package/es/utils/basic.mjs +32 -0
- package/es/utils/constant.d.ts +8 -0
- package/es/utils/constant.mjs +18 -0
- package/es/utils/create.d.ts +17 -0
- package/es/utils/create.mjs +50 -0
- package/es/utils/deep-assign.d.ts +3 -0
- package/es/utils/deep-assign.mjs +22 -0
- package/es/utils/deep-clone.d.ts +1 -0
- package/es/utils/deep-clone.mjs +20 -0
- package/es/utils/dom.d.ts +12 -0
- package/es/utils/dom.mjs +67 -0
- package/es/utils/format.d.ts +13 -0
- package/es/utils/format.mjs +120 -0
- package/es/utils/index.d.ts +9 -0
- package/es/utils/index.mjs +9 -0
- package/es/utils/interceptor.d.ts +6 -0
- package/es/utils/interceptor.mjs +29 -0
- package/es/utils/mount-component.d.ts +14 -0
- package/es/utils/mount-component.mjs +39 -0
- package/es/utils/props.d.ts +31 -0
- package/es/utils/props.mjs +36 -0
- package/es/utils/validate.d.ts +9 -0
- package/es/utils/validate.mjs +22 -0
- package/es/utils/with-install.d.ts +13 -0
- package/es/utils/with-install.mjs +12 -0
- package/es/vue-sfc-shim.d.ts +6 -0
- package/es/vue-tsx-shim.d.ts +16 -0
- package/lib/badge/Badge.d.ts +66 -0
- package/lib/badge/Badge.js +114 -0
- package/lib/badge/index.css +1 -0
- package/lib/badge/index.d.ts +49 -0
- package/lib/badge/index.js +33 -0
- package/lib/badge/style/index.d.ts +1 -0
- package/lib/badge/style/index.js +2 -0
- package/lib/button/Button.d.ts +154 -0
- package/lib/button/Button.js +185 -0
- package/lib/button/index.css +1 -0
- package/lib/button/index.d.ts +113 -0
- package/lib/button/index.js +33 -0
- package/lib/button/style/index.d.ts +1 -0
- package/lib/button/style/index.js +5 -0
- package/lib/button/types.d.ts +5 -0
- package/lib/button/types.js +15 -0
- package/lib/cell/Cell.d.ts +128 -0
- package/lib/cell/Cell.js +151 -0
- package/lib/cell/index.css +1 -0
- package/lib/cell/index.d.ts +74 -0
- package/lib/cell/index.js +33 -0
- package/lib/cell/style/index.d.ts +1 -0
- package/lib/cell/style/index.js +4 -0
- package/lib/col/Col.d.ts +38 -0
- package/lib/col/Col.js +82 -0
- package/lib/col/index.css +1 -0
- package/lib/col/index.d.ts +31 -0
- package/lib/col/index.js +33 -0
- package/lib/col/style/index.d.ts +1 -0
- package/lib/col/style/index.js +3 -0
- package/lib/composables/on-popup-reopen.d.ts +3 -0
- package/lib/composables/on-popup-reopen.js +35 -0
- package/lib/composables/use-expose.d.ts +1 -0
- package/lib/composables/use-expose.js +30 -0
- package/lib/composables/use-height.d.ts +2 -0
- package/lib/composables/use-height.js +39 -0
- package/lib/composables/use-id.d.ts +1 -0
- package/lib/composables/use-id.js +32 -0
- package/lib/composables/use-lazy-render.d.ts +2 -0
- package/lib/composables/use-lazy-render.js +36 -0
- package/lib/composables/use-lock-scroll.d.ts +2 -0
- package/lib/composables/use-lock-scroll.js +75 -0
- package/lib/composables/use-placeholder.d.ts +3 -0
- package/lib/composables/use-placeholder.js +33 -0
- package/lib/composables/use-refs.d.ts +2 -0
- package/lib/composables/use-refs.js +39 -0
- package/lib/composables/use-route.d.ts +13 -0
- package/lib/composables/use-route.js +46 -0
- package/lib/composables/use-tab-status.d.ts +3 -0
- package/lib/composables/use-tab-status.js +26 -0
- package/lib/composables/use-touch.d.ts +16 -0
- package/lib/composables/use-touch.js +80 -0
- package/lib/composables/use-visibility-change.d.ts +2 -0
- package/lib/composables/use-visibility-change.js +49 -0
- package/lib/config-provider/ConfigProvider.d.ts +47 -0
- package/lib/config-provider/ConfigProvider.js +83 -0
- package/lib/config-provider/index.d.ts +33 -0
- package/lib/config-provider/index.js +33 -0
- package/lib/config-provider/style/index.d.ts +1 -0
- package/lib/config-provider/style/index.js +1 -0
- package/lib/divider/Divider.d.ts +40 -0
- package/lib/divider/Divider.js +50 -0
- package/lib/divider/index.css +1 -0
- package/lib/divider/index.d.ts +32 -0
- package/lib/divider/index.js +33 -0
- package/lib/divider/style/index.d.ts +1 -0
- package/lib/divider/style/index.js +2 -0
- package/lib/empty/Empty.d.ts +29 -0
- package/lib/empty/Empty.js +77 -0
- package/lib/empty/Images.d.ts +4 -0
- package/lib/empty/Images.js +2123 -0
- package/lib/empty/index.css +1 -0
- package/lib/empty/index.d.ts +24 -0
- package/lib/empty/index.js +33 -0
- package/lib/empty/style/index.d.ts +1 -0
- package/lib/empty/style/index.js +2 -0
- package/lib/icon/Icon.d.ts +45 -0
- package/lib/icon/Icon.js +78 -0
- package/lib/icon/config.d.ts +41 -0
- package/lib/icon/config.js +158 -0
- package/lib/icon/index.css +1 -0
- package/lib/icon/index.d.ts +35 -0
- package/lib/icon/index.js +33 -0
- package/lib/icon/style/index.d.ts +1 -0
- package/lib/icon/style/index.js +3 -0
- package/lib/index.css +1 -0
- package/lib/index.d.ts +35 -0
- package/lib/index.js +125 -0
- package/lib/list/List.d.ts +74 -0
- package/lib/list/List.js +166 -0
- package/lib/list/index.css +1 -0
- package/lib/list/index.d.ts +59 -0
- package/lib/list/index.js +33 -0
- package/lib/list/style/index.d.ts +1 -0
- package/lib/list/style/index.js +4 -0
- package/lib/list/types.d.ts +7 -0
- package/lib/list/types.js +15 -0
- package/lib/loading/Loading.d.ts +39 -0
- package/lib/loading/Loading.js +133 -0
- package/lib/loading/index.css +1 -0
- package/lib/loading/index.d.ts +31 -0
- package/lib/loading/index.js +33 -0
- package/lib/loading/style/index.d.ts +1 -0
- package/lib/loading/style/index.js +2 -0
- package/lib/locale/index.d.ts +7 -0
- package/lib/locale/index.js +49 -0
- package/lib/locale/lang/en-US.d.ts +62 -0
- package/lib/locale/lang/en-US.js +83 -0
- package/lib/locale/lang/zh-CN.d.ts +62 -0
- package/lib/locale/lang/zh-CN.js +83 -0
- package/lib/locale/style/index.d.ts +1 -0
- package/lib/locale/style/index.js +1 -0
- package/lib/notice-bar/NoticeBar.d.ts +71 -0
- package/lib/notice-bar/NoticeBar.js +190 -0
- package/lib/notice-bar/index.css +1 -0
- package/lib/notice-bar/index.d.ts +56 -0
- package/lib/notice-bar/index.js +33 -0
- package/lib/notice-bar/style/index.d.ts +1 -0
- package/lib/notice-bar/style/index.js +4 -0
- package/lib/notice-bar/types.d.ts +7 -0
- package/lib/notice-bar/types.js +15 -0
- package/lib/notify/Notify.d.ts +134 -0
- package/lib/notify/Notify.js +63 -0
- package/lib/notify/function-call.d.ts +6 -0
- package/lib/notify/function-call.js +93 -0
- package/lib/notify/index.css +1 -0
- package/lib/notify/index.d.ts +99 -0
- package/lib/notify/index.js +38 -0
- package/lib/notify/style/index.d.ts +1 -0
- package/lib/notify/style/index.js +6 -0
- package/lib/notify/types.d.ts +17 -0
- package/lib/notify/types.js +15 -0
- package/lib/number-keyboard/NumberKeyboard.d.ts +162 -0
- package/lib/number-keyboard/NumberKeyboard.js +268 -0
- package/lib/number-keyboard/NumberKeyboardKey.d.ts +24 -0
- package/lib/number-keyboard/NumberKeyboardKey.js +114 -0
- package/lib/number-keyboard/index.css +1 -0
- package/lib/number-keyboard/index.d.ts +119 -0
- package/lib/number-keyboard/index.js +33 -0
- package/lib/number-keyboard/style/index.d.ts +1 -0
- package/lib/number-keyboard/style/index.js +9 -0
- package/lib/overlay/Overlay.d.ts +51 -0
- package/lib/overlay/Overlay.js +66 -0
- package/lib/overlay/index.css +1 -0
- package/lib/overlay/index.d.ts +40 -0
- package/lib/overlay/index.js +33 -0
- package/lib/overlay/style/index.d.ts +1 -0
- package/lib/overlay/style/index.js +2 -0
- package/lib/password-input/PasswordInput.d.ts +63 -0
- package/lib/password-input/PasswordInput.js +97 -0
- package/lib/password-input/index.css +1 -0
- package/lib/password-input/index.d.ts +49 -0
- package/lib/password-input/index.js +33 -0
- package/lib/password-input/style/index.d.ts +1 -0
- package/lib/password-input/style/index.js +2 -0
- package/lib/popup/Popup.d.ts +165 -0
- package/lib/popup/Popup.js +224 -0
- package/lib/popup/index.css +1 -0
- package/lib/popup/index.d.ts +123 -0
- package/lib/popup/index.js +33 -0
- package/lib/popup/shared.d.ts +30 -0
- package/lib/popup/shared.js +41 -0
- package/lib/popup/style/index.d.ts +1 -0
- package/lib/popup/style/index.js +5 -0
- package/lib/popup/types.d.ts +8 -0
- package/lib/popup/types.js +15 -0
- package/lib/pull-refresh/PullRefresh.d.ts +75 -0
- package/lib/pull-refresh/PullRefresh.js +210 -0
- package/lib/pull-refresh/index.css +1 -0
- package/lib/pull-refresh/index.d.ts +58 -0
- package/lib/pull-refresh/index.js +33 -0
- package/lib/pull-refresh/style/index.d.ts +1 -0
- package/lib/pull-refresh/style/index.js +3 -0
- package/lib/rate/Rate.d.ts +107 -0
- package/lib/rate/Rate.js +236 -0
- package/lib/rate/index.css +1 -0
- package/lib/rate/index.d.ts +80 -0
- package/lib/rate/index.js +33 -0
- package/lib/rate/style/index.d.ts +1 -0
- package/lib/rate/style/index.js +4 -0
- package/lib/row/Row.d.ts +64 -0
- package/lib/row/Row.js +110 -0
- package/lib/row/index.css +1 -0
- package/lib/row/index.d.ts +42 -0
- package/lib/row/index.js +33 -0
- package/lib/row/style/index.d.ts +1 -0
- package/lib/row/style/index.js +2 -0
- package/lib/stepper/Stepper.d.ts +181 -0
- package/lib/stepper/Stepper.js +283 -0
- package/lib/stepper/index.css +1 -0
- package/lib/stepper/index.d.ts +132 -0
- package/lib/stepper/index.js +33 -0
- package/lib/stepper/style/index.d.ts +1 -0
- package/lib/stepper/style/index.js +4 -0
- package/lib/sticky/Sticky.d.ts +58 -0
- package/lib/sticky/Sticky.js +138 -0
- package/lib/sticky/index.css +1 -0
- package/lib/sticky/index.d.ts +45 -0
- package/lib/sticky/index.js +33 -0
- package/lib/sticky/style/index.d.ts +1 -0
- package/lib/sticky/style/index.js +2 -0
- package/lib/style/animation.css +1 -0
- package/lib/style/base.css +1 -0
- package/lib/style/css-variables.css +1 -0
- package/lib/style/mixins/clearfix.css +0 -0
- package/lib/style/mixins/ellipsis.css +0 -0
- package/lib/style/mixins/hairline.css +0 -0
- package/lib/style/normalize.css +1 -0
- package/lib/swipe/Swipe.d.ts +121 -0
- package/lib/swipe/Swipe.js +372 -0
- package/lib/swipe/index.css +1 -0
- package/lib/swipe/index.d.ts +90 -0
- package/lib/swipe/index.js +33 -0
- package/lib/swipe/style/index.d.ts +1 -0
- package/lib/swipe/style/index.js +2 -0
- package/lib/swipe/types.d.ts +31 -0
- package/lib/swipe/types.js +15 -0
- package/lib/swipe-item/SwipeItem.d.ts +2 -0
- package/lib/swipe-item/SwipeItem.js +101 -0
- package/lib/swipe-item/index.css +1 -0
- package/lib/swipe-item/index.d.ts +7 -0
- package/lib/swipe-item/index.js +33 -0
- package/lib/swipe-item/style/index.d.ts +1 -0
- package/lib/swipe-item/style/index.js +3 -0
- package/lib/switch/Switch.d.ts +58 -0
- package/lib/switch/Switch.js +104 -0
- package/lib/switch/index.css +1 -0
- package/lib/switch/index.d.ts +46 -0
- package/lib/switch/index.js +33 -0
- package/lib/switch/style/index.d.ts +1 -0
- package/lib/switch/style/index.js +3 -0
- package/lib/tab/Tab.d.ts +58 -0
- package/lib/tab/Tab.js +132 -0
- package/lib/tab/index.css +1 -0
- package/lib/tab/index.d.ts +45 -0
- package/lib/tab/index.js +33 -0
- package/lib/tab/style/index.d.ts +1 -0
- package/lib/tab/style/index.js +7 -0
- package/lib/tabs/Tabs.d.ts +154 -0
- package/lib/tabs/Tabs.js +377 -0
- package/lib/tabs/TabsContent.d.ts +43 -0
- package/lib/tabs/TabsContent.js +83 -0
- package/lib/tabs/TabsTitle.d.ts +45 -0
- package/lib/tabs/TabsTitle.js +109 -0
- package/lib/tabs/index.css +1 -0
- package/lib/tabs/index.d.ts +114 -0
- package/lib/tabs/index.js +33 -0
- package/lib/tabs/style/index.d.ts +1 -0
- package/lib/tabs/style/index.js +5 -0
- package/lib/tabs/types.d.ts +23 -0
- package/lib/tabs/types.js +15 -0
- package/lib/tabs/utils.d.ts +3 -0
- package/lib/tabs/utils.js +56 -0
- package/lib/toast/Toast.d.ts +112 -0
- package/lib/toast/Toast.js +138 -0
- package/lib/toast/function-call.d.ts +10 -0
- package/lib/toast/function-call.js +167 -0
- package/lib/toast/index.css +1 -0
- package/lib/toast/index.d.ts +79 -0
- package/lib/toast/index.js +42 -0
- package/lib/toast/lock-click.d.ts +1 -0
- package/lib/toast/lock-click.js +36 -0
- package/lib/toast/style/index.d.ts +1 -0
- package/lib/toast/style/index.js +7 -0
- package/lib/toast/types.d.ts +36 -0
- package/lib/toast/types.js +15 -0
- package/lib/utils/basic.d.ts +18 -0
- package/lib/utils/basic.js +51 -0
- package/lib/utils/constant.d.ts +8 -0
- package/lib/utils/constant.js +37 -0
- package/lib/utils/create.d.ts +17 -0
- package/lib/utils/create.js +75 -0
- package/lib/utils/deep-assign.d.ts +3 -0
- package/lib/utils/deep-assign.js +41 -0
- package/lib/utils/deep-clone.d.ts +1 -0
- package/lib/utils/deep-clone.js +39 -0
- package/lib/utils/dom.d.ts +12 -0
- package/lib/utils/dom.js +86 -0
- package/lib/utils/format.d.ts +13 -0
- package/lib/utils/format.js +139 -0
- package/lib/utils/index.d.ts +9 -0
- package/lib/utils/index.js +25 -0
- package/lib/utils/interceptor.d.ts +6 -0
- package/lib/utils/interceptor.js +48 -0
- package/lib/utils/mount-component.d.ts +14 -0
- package/lib/utils/mount-component.js +58 -0
- package/lib/utils/props.d.ts +31 -0
- package/lib/utils/props.js +55 -0
- package/lib/utils/validate.d.ts +9 -0
- package/lib/utils/validate.js +41 -0
- package/lib/utils/with-install.d.ts +13 -0
- package/lib/utils/with-install.js +31 -0
- package/lib/vue-sfc-shim.d.ts +6 -0
- package/lib/vue-tsx-shim.d.ts +16 -0
- package/lib/web-types.json +3197 -0
- package/lib/zartui.cjs.js +6740 -0
- package/lib/zartui.es.js +6740 -0
- package/lib/zartui.js +6974 -0
- package/lib/zartui.min.js +1 -0
- package/package.json +50 -61
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export declare const PullRefresh: import("../utils").WithInstall<import("vue").DefineComponent<{
|
|
2
|
+
disabled: BooleanConstructor;
|
|
3
|
+
modelValue: BooleanConstructor;
|
|
4
|
+
headHeight: {
|
|
5
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
6
|
+
default: number;
|
|
7
|
+
};
|
|
8
|
+
successText: StringConstructor;
|
|
9
|
+
pullingText: StringConstructor;
|
|
10
|
+
loosingText: StringConstructor;
|
|
11
|
+
loadingText: StringConstructor;
|
|
12
|
+
pullDistance: (NumberConstructor | StringConstructor)[];
|
|
13
|
+
successDuration: {
|
|
14
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
15
|
+
default: number;
|
|
16
|
+
};
|
|
17
|
+
animationDuration: {
|
|
18
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
19
|
+
default: number;
|
|
20
|
+
};
|
|
21
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue" | "refresh")[], "change" | "update:modelValue" | "refresh", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
22
|
+
disabled: BooleanConstructor;
|
|
23
|
+
modelValue: BooleanConstructor;
|
|
24
|
+
headHeight: {
|
|
25
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
26
|
+
default: number;
|
|
27
|
+
};
|
|
28
|
+
successText: StringConstructor;
|
|
29
|
+
pullingText: StringConstructor;
|
|
30
|
+
loosingText: StringConstructor;
|
|
31
|
+
loadingText: StringConstructor;
|
|
32
|
+
pullDistance: (NumberConstructor | StringConstructor)[];
|
|
33
|
+
successDuration: {
|
|
34
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
35
|
+
default: number;
|
|
36
|
+
};
|
|
37
|
+
animationDuration: {
|
|
38
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
39
|
+
default: number;
|
|
40
|
+
};
|
|
41
|
+
}>> & {
|
|
42
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
43
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
44
|
+
onRefresh?: ((...args: any[]) => any) | undefined;
|
|
45
|
+
}, {
|
|
46
|
+
disabled: boolean;
|
|
47
|
+
animationDuration: string | number;
|
|
48
|
+
modelValue: boolean;
|
|
49
|
+
headHeight: string | number;
|
|
50
|
+
successDuration: string | number;
|
|
51
|
+
}>>;
|
|
52
|
+
export default PullRefresh;
|
|
53
|
+
export type { PullRefreshProps } from './PullRefresh';
|
|
54
|
+
declare module 'vue' {
|
|
55
|
+
interface GlobalComponents {
|
|
56
|
+
ZtPullRefresh: typeof PullRefresh;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { ExtractPropTypes } from 'vue';
|
|
2
|
+
declare const rateProps: {
|
|
3
|
+
size: (NumberConstructor | StringConstructor)[];
|
|
4
|
+
icon: {
|
|
5
|
+
type: import("vue").PropType<string>;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
color: StringConstructor;
|
|
9
|
+
count: {
|
|
10
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
11
|
+
default: number;
|
|
12
|
+
};
|
|
13
|
+
gutter: (NumberConstructor | StringConstructor)[];
|
|
14
|
+
readonly: BooleanConstructor;
|
|
15
|
+
disabled: BooleanConstructor;
|
|
16
|
+
voidIcon: {
|
|
17
|
+
type: import("vue").PropType<string>;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
allowHalf: BooleanConstructor;
|
|
21
|
+
voidColor: StringConstructor;
|
|
22
|
+
touchable: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
default: true;
|
|
25
|
+
};
|
|
26
|
+
iconPrefix: StringConstructor;
|
|
27
|
+
modelValue: {
|
|
28
|
+
type: NumberConstructor;
|
|
29
|
+
default: number;
|
|
30
|
+
};
|
|
31
|
+
disabledColor: StringConstructor;
|
|
32
|
+
};
|
|
33
|
+
export declare type RateProps = ExtractPropTypes<typeof rateProps>;
|
|
34
|
+
declare const _default: import("vue").DefineComponent<{
|
|
35
|
+
size: (NumberConstructor | StringConstructor)[];
|
|
36
|
+
icon: {
|
|
37
|
+
type: import("vue").PropType<string>;
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
color: StringConstructor;
|
|
41
|
+
count: {
|
|
42
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
43
|
+
default: number;
|
|
44
|
+
};
|
|
45
|
+
gutter: (NumberConstructor | StringConstructor)[];
|
|
46
|
+
readonly: BooleanConstructor;
|
|
47
|
+
disabled: BooleanConstructor;
|
|
48
|
+
voidIcon: {
|
|
49
|
+
type: import("vue").PropType<string>;
|
|
50
|
+
default: string;
|
|
51
|
+
};
|
|
52
|
+
allowHalf: BooleanConstructor;
|
|
53
|
+
voidColor: StringConstructor;
|
|
54
|
+
touchable: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
default: true;
|
|
57
|
+
};
|
|
58
|
+
iconPrefix: StringConstructor;
|
|
59
|
+
modelValue: {
|
|
60
|
+
type: NumberConstructor;
|
|
61
|
+
default: number;
|
|
62
|
+
};
|
|
63
|
+
disabledColor: StringConstructor;
|
|
64
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
65
|
+
size: (NumberConstructor | StringConstructor)[];
|
|
66
|
+
icon: {
|
|
67
|
+
type: import("vue").PropType<string>;
|
|
68
|
+
default: string;
|
|
69
|
+
};
|
|
70
|
+
color: StringConstructor;
|
|
71
|
+
count: {
|
|
72
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
73
|
+
default: number;
|
|
74
|
+
};
|
|
75
|
+
gutter: (NumberConstructor | StringConstructor)[];
|
|
76
|
+
readonly: BooleanConstructor;
|
|
77
|
+
disabled: BooleanConstructor;
|
|
78
|
+
voidIcon: {
|
|
79
|
+
type: import("vue").PropType<string>;
|
|
80
|
+
default: string;
|
|
81
|
+
};
|
|
82
|
+
allowHalf: BooleanConstructor;
|
|
83
|
+
voidColor: StringConstructor;
|
|
84
|
+
touchable: {
|
|
85
|
+
type: BooleanConstructor;
|
|
86
|
+
default: true;
|
|
87
|
+
};
|
|
88
|
+
iconPrefix: StringConstructor;
|
|
89
|
+
modelValue: {
|
|
90
|
+
type: NumberConstructor;
|
|
91
|
+
default: number;
|
|
92
|
+
};
|
|
93
|
+
disabledColor: StringConstructor;
|
|
94
|
+
}>> & {
|
|
95
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
96
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
97
|
+
}, {
|
|
98
|
+
disabled: boolean;
|
|
99
|
+
icon: string;
|
|
100
|
+
modelValue: number;
|
|
101
|
+
count: string | number;
|
|
102
|
+
readonly: boolean;
|
|
103
|
+
voidIcon: string;
|
|
104
|
+
allowHalf: boolean;
|
|
105
|
+
touchable: boolean;
|
|
106
|
+
}>;
|
|
107
|
+
export default _default;
|
package/es/rate/Rate.mjs
ADDED
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { createVNode as _createVNode } from "vue";
|
|
2
|
+
import { computed, defineComponent, ref } from "vue";
|
|
3
|
+
import { addUnit, truthProp, numericProp, preventDefault, makeStringProp, makeNumberProp, makeNumericProp, createNamespace } from "../utils/index.mjs";
|
|
4
|
+
import { useRect, useCustomFieldValue } from "@zartui/use";
|
|
5
|
+
import { useRefs } from "../composables/use-refs.mjs";
|
|
6
|
+
import { useTouch } from "../composables/use-touch.mjs";
|
|
7
|
+
import { Icon } from "../icon/index.mjs";
|
|
8
|
+
const [name, bem] = createNamespace("rate");
|
|
9
|
+
function getRateStatus(value, index, allowHalf, readonly) {
|
|
10
|
+
if (value >= index) {
|
|
11
|
+
return {
|
|
12
|
+
status: "full",
|
|
13
|
+
value: 1
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
if (value + 0.5 >= index && allowHalf && !readonly) {
|
|
17
|
+
return {
|
|
18
|
+
status: "half",
|
|
19
|
+
value: 0.5
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
if (value + 1 >= index && allowHalf && readonly) {
|
|
23
|
+
const cardinal = 10 ** 10;
|
|
24
|
+
return {
|
|
25
|
+
status: "half",
|
|
26
|
+
value: Math.round((value - index + 1) * cardinal) / cardinal
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
status: "void",
|
|
31
|
+
value: 0
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
const rateProps = {
|
|
35
|
+
size: numericProp,
|
|
36
|
+
icon: makeStringProp("star"),
|
|
37
|
+
color: String,
|
|
38
|
+
count: makeNumericProp(5),
|
|
39
|
+
gutter: numericProp,
|
|
40
|
+
readonly: Boolean,
|
|
41
|
+
disabled: Boolean,
|
|
42
|
+
voidIcon: makeStringProp("star"),
|
|
43
|
+
allowHalf: Boolean,
|
|
44
|
+
voidColor: String,
|
|
45
|
+
touchable: truthProp,
|
|
46
|
+
iconPrefix: String,
|
|
47
|
+
modelValue: makeNumberProp(0),
|
|
48
|
+
disabledColor: String
|
|
49
|
+
};
|
|
50
|
+
var stdin_default = defineComponent({
|
|
51
|
+
name,
|
|
52
|
+
props: rateProps,
|
|
53
|
+
emits: ["change", "update:modelValue"],
|
|
54
|
+
setup(props, {
|
|
55
|
+
emit
|
|
56
|
+
}) {
|
|
57
|
+
const touch = useTouch();
|
|
58
|
+
const [itemRefs, setItemRefs] = useRefs();
|
|
59
|
+
const groupRef = ref();
|
|
60
|
+
const untouchable = () => props.readonly || props.disabled || !props.touchable;
|
|
61
|
+
const list = computed(() => Array(+props.count).fill("").map((_, i) => getRateStatus(props.modelValue, i + 1, props.allowHalf, props.readonly)));
|
|
62
|
+
let ranges;
|
|
63
|
+
let groupRefRect;
|
|
64
|
+
let minRectTop = Number.MAX_SAFE_INTEGER;
|
|
65
|
+
let maxRectTop = Number.MIN_SAFE_INTEGER;
|
|
66
|
+
const updateRanges = () => {
|
|
67
|
+
groupRefRect = useRect(groupRef);
|
|
68
|
+
const rects = itemRefs.value.map(useRect);
|
|
69
|
+
ranges = [];
|
|
70
|
+
rects.forEach((rect, index) => {
|
|
71
|
+
minRectTop = Math.min(rect.top, minRectTop);
|
|
72
|
+
maxRectTop = Math.max(rect.top, maxRectTop);
|
|
73
|
+
if (props.allowHalf) {
|
|
74
|
+
ranges.push({
|
|
75
|
+
score: index + 0.5,
|
|
76
|
+
left: rect.left,
|
|
77
|
+
top: rect.top,
|
|
78
|
+
height: rect.height
|
|
79
|
+
}, {
|
|
80
|
+
score: index + 1,
|
|
81
|
+
left: rect.left + rect.width / 2,
|
|
82
|
+
top: rect.top,
|
|
83
|
+
height: rect.height
|
|
84
|
+
});
|
|
85
|
+
} else {
|
|
86
|
+
ranges.push({
|
|
87
|
+
score: index + 1,
|
|
88
|
+
left: rect.left,
|
|
89
|
+
top: rect.top,
|
|
90
|
+
height: rect.height
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
const getScoreByPosition = (x, y) => {
|
|
96
|
+
for (let i = ranges.length - 1; i > 0; i--) {
|
|
97
|
+
if (y >= groupRefRect.top && y <= groupRefRect.bottom) {
|
|
98
|
+
if (x > ranges[i].left && y >= ranges[i].top && y <= ranges[i].top + ranges[i].height) {
|
|
99
|
+
return ranges[i].score;
|
|
100
|
+
}
|
|
101
|
+
} else {
|
|
102
|
+
const curTop = y < groupRefRect.top ? minRectTop : maxRectTop;
|
|
103
|
+
if (x > ranges[i].left && ranges[i].top === curTop) {
|
|
104
|
+
return ranges[i].score;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return props.allowHalf ? 0.5 : 1;
|
|
109
|
+
};
|
|
110
|
+
const select = (index) => {
|
|
111
|
+
if (!props.disabled && !props.readonly && index !== props.modelValue) {
|
|
112
|
+
emit("update:modelValue", index);
|
|
113
|
+
emit("change", index);
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
const onTouchStart = (event) => {
|
|
117
|
+
if (untouchable()) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
touch.start(event);
|
|
121
|
+
updateRanges();
|
|
122
|
+
};
|
|
123
|
+
const onTouchMove = (event) => {
|
|
124
|
+
if (untouchable()) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
touch.move(event);
|
|
128
|
+
if (touch.isHorizontal()) {
|
|
129
|
+
const {
|
|
130
|
+
clientX,
|
|
131
|
+
clientY
|
|
132
|
+
} = event.touches[0];
|
|
133
|
+
preventDefault(event);
|
|
134
|
+
select(getScoreByPosition(clientX, clientY));
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
const renderStar = (item, index) => {
|
|
138
|
+
const {
|
|
139
|
+
icon,
|
|
140
|
+
size,
|
|
141
|
+
color,
|
|
142
|
+
count,
|
|
143
|
+
gutter,
|
|
144
|
+
voidIcon,
|
|
145
|
+
disabled,
|
|
146
|
+
voidColor,
|
|
147
|
+
allowHalf,
|
|
148
|
+
iconPrefix,
|
|
149
|
+
disabledColor
|
|
150
|
+
} = props;
|
|
151
|
+
const score = index + 1;
|
|
152
|
+
const isFull = item.status === "full";
|
|
153
|
+
const isVoid = item.status === "void";
|
|
154
|
+
const renderHalf = allowHalf && item.value > 0 && item.value < 1;
|
|
155
|
+
let style;
|
|
156
|
+
if (gutter && score !== +count) {
|
|
157
|
+
style = {
|
|
158
|
+
paddingRight: addUnit(gutter)
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
const onClickItem = (event) => {
|
|
162
|
+
updateRanges();
|
|
163
|
+
select(allowHalf ? getScoreByPosition(event.clientX, event.clientY) : score);
|
|
164
|
+
};
|
|
165
|
+
return _createVNode("div", {
|
|
166
|
+
"key": index,
|
|
167
|
+
"ref": setItemRefs(index),
|
|
168
|
+
"role": "radio",
|
|
169
|
+
"style": style,
|
|
170
|
+
"class": bem("item"),
|
|
171
|
+
"tabindex": disabled ? void 0 : 0,
|
|
172
|
+
"aria-setsize": count,
|
|
173
|
+
"aria-posinset": score,
|
|
174
|
+
"aria-checked": !isVoid,
|
|
175
|
+
"onClick": onClickItem
|
|
176
|
+
}, [_createVNode(Icon, {
|
|
177
|
+
"size": size,
|
|
178
|
+
"name": isFull ? icon : voidIcon,
|
|
179
|
+
"class": bem("icon", {
|
|
180
|
+
disabled,
|
|
181
|
+
full: isFull
|
|
182
|
+
}),
|
|
183
|
+
"color": disabled ? disabledColor : isFull ? color : voidColor,
|
|
184
|
+
"classPrefix": iconPrefix
|
|
185
|
+
}, null), renderHalf && _createVNode(Icon, {
|
|
186
|
+
"size": size,
|
|
187
|
+
"style": {
|
|
188
|
+
width: item.value + "em"
|
|
189
|
+
},
|
|
190
|
+
"name": isVoid ? voidIcon : icon,
|
|
191
|
+
"class": bem("icon", ["half", {
|
|
192
|
+
disabled,
|
|
193
|
+
full: !isVoid
|
|
194
|
+
}]),
|
|
195
|
+
"color": disabled ? disabledColor : isVoid ? voidColor : color,
|
|
196
|
+
"classPrefix": iconPrefix
|
|
197
|
+
}, null)]);
|
|
198
|
+
};
|
|
199
|
+
useCustomFieldValue(() => props.modelValue);
|
|
200
|
+
return () => _createVNode("div", {
|
|
201
|
+
"ref": groupRef,
|
|
202
|
+
"role": "radiogroup",
|
|
203
|
+
"class": bem({
|
|
204
|
+
readonly: props.readonly,
|
|
205
|
+
disabled: props.disabled
|
|
206
|
+
}),
|
|
207
|
+
"tabindex": props.disabled ? void 0 : 0,
|
|
208
|
+
"aria-disabled": props.disabled,
|
|
209
|
+
"aria-readonly": props.readonly,
|
|
210
|
+
"onTouchstart": onTouchStart,
|
|
211
|
+
"onTouchmove": onTouchMove
|
|
212
|
+
}, [list.value.map(renderStar)]);
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
export {
|
|
216
|
+
stdin_default as default
|
|
217
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
body{--zt-rate-icon-size: 20px;--zt-rate-icon-gutter: var(--zt-padding-base);--zt-rate-icon-void-color: var(--zt-gray-5);--zt-rate-icon-full-color: var(--zt-yellow);--zt-rate-icon-disabled-color: var(--zt-gray-5)}.zt-rate{cursor:pointer;-webkit-user-select:none;user-select:none;flex-wrap:wrap;display:inline-flex;align-items:center}.zt-rate__item{position:relative}.zt-rate__item:not(:last-child){padding-right:var(--zt-rate-icon-gutter)}.zt-rate__icon{display:block;width:1em;color:var(--zt-rate-icon-void-color);font-size:var(--zt-rate-icon-size)}.zt-rate__icon--half{position:absolute;top:0;left:0;overflow:hidden}.zt-rate__icon--full{color:var(--zt-rate-icon-full-color)}.zt-rate__icon--disabled{color:var(--zt-rate-icon-disabled-color)}.zt-rate--disabled{cursor:not-allowed}.zt-rate--readonly{cursor:default}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export declare const Rate: import("../utils").WithInstall<import("vue").DefineComponent<{
|
|
2
|
+
size: (NumberConstructor | StringConstructor)[];
|
|
3
|
+
icon: {
|
|
4
|
+
type: import("vue").PropType<string>;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
color: StringConstructor;
|
|
8
|
+
count: {
|
|
9
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
10
|
+
default: number;
|
|
11
|
+
};
|
|
12
|
+
gutter: (NumberConstructor | StringConstructor)[];
|
|
13
|
+
readonly: BooleanConstructor;
|
|
14
|
+
disabled: BooleanConstructor;
|
|
15
|
+
voidIcon: {
|
|
16
|
+
type: import("vue").PropType<string>;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
allowHalf: BooleanConstructor;
|
|
20
|
+
voidColor: StringConstructor;
|
|
21
|
+
touchable: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
default: true;
|
|
24
|
+
};
|
|
25
|
+
iconPrefix: StringConstructor;
|
|
26
|
+
modelValue: {
|
|
27
|
+
type: NumberConstructor;
|
|
28
|
+
default: number;
|
|
29
|
+
};
|
|
30
|
+
disabledColor: StringConstructor;
|
|
31
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
32
|
+
size: (NumberConstructor | StringConstructor)[];
|
|
33
|
+
icon: {
|
|
34
|
+
type: import("vue").PropType<string>;
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
color: StringConstructor;
|
|
38
|
+
count: {
|
|
39
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
40
|
+
default: number;
|
|
41
|
+
};
|
|
42
|
+
gutter: (NumberConstructor | StringConstructor)[];
|
|
43
|
+
readonly: BooleanConstructor;
|
|
44
|
+
disabled: BooleanConstructor;
|
|
45
|
+
voidIcon: {
|
|
46
|
+
type: import("vue").PropType<string>;
|
|
47
|
+
default: string;
|
|
48
|
+
};
|
|
49
|
+
allowHalf: BooleanConstructor;
|
|
50
|
+
voidColor: StringConstructor;
|
|
51
|
+
touchable: {
|
|
52
|
+
type: BooleanConstructor;
|
|
53
|
+
default: true;
|
|
54
|
+
};
|
|
55
|
+
iconPrefix: StringConstructor;
|
|
56
|
+
modelValue: {
|
|
57
|
+
type: NumberConstructor;
|
|
58
|
+
default: number;
|
|
59
|
+
};
|
|
60
|
+
disabledColor: StringConstructor;
|
|
61
|
+
}>> & {
|
|
62
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
63
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
64
|
+
}, {
|
|
65
|
+
disabled: boolean;
|
|
66
|
+
icon: string;
|
|
67
|
+
modelValue: number;
|
|
68
|
+
count: string | number;
|
|
69
|
+
readonly: boolean;
|
|
70
|
+
voidIcon: string;
|
|
71
|
+
allowHalf: boolean;
|
|
72
|
+
touchable: boolean;
|
|
73
|
+
}>>;
|
|
74
|
+
export default Rate;
|
|
75
|
+
export type { RateProps } from './Rate';
|
|
76
|
+
declare module 'vue' {
|
|
77
|
+
interface GlobalComponents {
|
|
78
|
+
ZtRate: typeof Rate;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/row/Row.d.ts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { PropType, ComputedRef, InjectionKey, ExtractPropTypes } from 'vue';
|
|
2
|
+
export declare type RowSpaces = {
|
|
3
|
+
left?: number;
|
|
4
|
+
right: number;
|
|
5
|
+
}[];
|
|
6
|
+
export declare type RowProvide = {
|
|
7
|
+
spaces: ComputedRef<RowSpaces>;
|
|
8
|
+
};
|
|
9
|
+
export declare const ROW_KEY: InjectionKey<RowProvide>;
|
|
10
|
+
export declare type RowAlign = 'top' | 'center' | 'bottom';
|
|
11
|
+
export declare type RowJustify = 'start' | 'end' | 'center' | 'space-around' | 'space-between';
|
|
12
|
+
declare const rowProps: {
|
|
13
|
+
tag: {
|
|
14
|
+
type: PropType<keyof HTMLElementTagNameMap>;
|
|
15
|
+
default: keyof HTMLElementTagNameMap;
|
|
16
|
+
};
|
|
17
|
+
wrap: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: true;
|
|
20
|
+
};
|
|
21
|
+
align: PropType<RowAlign>;
|
|
22
|
+
gutter: {
|
|
23
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
24
|
+
default: number;
|
|
25
|
+
};
|
|
26
|
+
justify: PropType<RowJustify>;
|
|
27
|
+
};
|
|
28
|
+
export declare type RowProps = ExtractPropTypes<typeof rowProps>;
|
|
29
|
+
declare const _default: import("vue").DefineComponent<{
|
|
30
|
+
tag: {
|
|
31
|
+
type: PropType<keyof HTMLElementTagNameMap>;
|
|
32
|
+
default: keyof HTMLElementTagNameMap;
|
|
33
|
+
};
|
|
34
|
+
wrap: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: true;
|
|
37
|
+
};
|
|
38
|
+
align: PropType<RowAlign>;
|
|
39
|
+
gutter: {
|
|
40
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
41
|
+
default: number;
|
|
42
|
+
};
|
|
43
|
+
justify: PropType<RowJustify>;
|
|
44
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
45
|
+
tag: {
|
|
46
|
+
type: PropType<keyof HTMLElementTagNameMap>;
|
|
47
|
+
default: keyof HTMLElementTagNameMap;
|
|
48
|
+
};
|
|
49
|
+
wrap: {
|
|
50
|
+
type: BooleanConstructor;
|
|
51
|
+
default: true;
|
|
52
|
+
};
|
|
53
|
+
align: PropType<RowAlign>;
|
|
54
|
+
gutter: {
|
|
55
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
56
|
+
default: number;
|
|
57
|
+
};
|
|
58
|
+
justify: PropType<RowJustify>;
|
|
59
|
+
}>>, {
|
|
60
|
+
tag: keyof HTMLElementTagNameMap;
|
|
61
|
+
wrap: boolean;
|
|
62
|
+
gutter: string | number;
|
|
63
|
+
}>;
|
|
64
|
+
export default _default;
|
package/es/row/Row.mjs
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { createVNode as _createVNode } from "vue";
|
|
2
|
+
import { computed, defineComponent } from "vue";
|
|
3
|
+
import { truthProp, makeStringProp, makeNumericProp, createNamespace } from "../utils/index.mjs";
|
|
4
|
+
import { useChildren } from "@zartui/use";
|
|
5
|
+
const [name, bem] = createNamespace("row");
|
|
6
|
+
const ROW_KEY = Symbol(name);
|
|
7
|
+
const rowProps = {
|
|
8
|
+
tag: makeStringProp("div"),
|
|
9
|
+
wrap: truthProp,
|
|
10
|
+
align: String,
|
|
11
|
+
gutter: makeNumericProp(0),
|
|
12
|
+
justify: String
|
|
13
|
+
};
|
|
14
|
+
var stdin_default = defineComponent({
|
|
15
|
+
name,
|
|
16
|
+
props: rowProps,
|
|
17
|
+
setup(props, {
|
|
18
|
+
slots
|
|
19
|
+
}) {
|
|
20
|
+
const {
|
|
21
|
+
children,
|
|
22
|
+
linkChildren
|
|
23
|
+
} = useChildren(ROW_KEY);
|
|
24
|
+
const groups = computed(() => {
|
|
25
|
+
const groups2 = [[]];
|
|
26
|
+
let totalSpan = 0;
|
|
27
|
+
children.forEach((child, index) => {
|
|
28
|
+
totalSpan += Number(child.span);
|
|
29
|
+
if (totalSpan > 24) {
|
|
30
|
+
groups2.push([index]);
|
|
31
|
+
totalSpan -= 24;
|
|
32
|
+
} else {
|
|
33
|
+
groups2[groups2.length - 1].push(index);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
return groups2;
|
|
37
|
+
});
|
|
38
|
+
const spaces = computed(() => {
|
|
39
|
+
const gutter = Number(props.gutter);
|
|
40
|
+
const spaces2 = [];
|
|
41
|
+
if (!gutter) {
|
|
42
|
+
return spaces2;
|
|
43
|
+
}
|
|
44
|
+
groups.value.forEach((group) => {
|
|
45
|
+
const averagePadding = gutter * (group.length - 1) / group.length;
|
|
46
|
+
group.forEach((item, index) => {
|
|
47
|
+
if (index === 0) {
|
|
48
|
+
spaces2.push({
|
|
49
|
+
right: averagePadding
|
|
50
|
+
});
|
|
51
|
+
} else {
|
|
52
|
+
const left = gutter - spaces2[item - 1].right;
|
|
53
|
+
const right = averagePadding - left;
|
|
54
|
+
spaces2.push({
|
|
55
|
+
left,
|
|
56
|
+
right
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
return spaces2;
|
|
62
|
+
});
|
|
63
|
+
linkChildren({
|
|
64
|
+
spaces
|
|
65
|
+
});
|
|
66
|
+
return () => {
|
|
67
|
+
const {
|
|
68
|
+
tag,
|
|
69
|
+
wrap,
|
|
70
|
+
align,
|
|
71
|
+
justify
|
|
72
|
+
} = props;
|
|
73
|
+
return _createVNode(tag, {
|
|
74
|
+
"class": bem({
|
|
75
|
+
[`align-${align}`]: align,
|
|
76
|
+
[`justify-${justify}`]: justify,
|
|
77
|
+
nowrap: !wrap
|
|
78
|
+
})
|
|
79
|
+
}, {
|
|
80
|
+
default: () => {
|
|
81
|
+
var _a;
|
|
82
|
+
return [(_a = slots.default) == null ? void 0 : _a.call(slots)];
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
export {
|
|
89
|
+
ROW_KEY,
|
|
90
|
+
stdin_default as default
|
|
91
|
+
};
|
package/es/row/index.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.zt-row{display:flex;flex-wrap:wrap}.zt-row--nowrap{flex-wrap:nowrap}.zt-row--justify-center{justify-content:center}.zt-row--justify-end{justify-content:flex-end}.zt-row--justify-space-between{justify-content:space-between}.zt-row--justify-space-around{justify-content:space-around}.zt-row--align-center{align-items:center}.zt-row--align-bottom{align-items:flex-end}
|