kui-vue 6.3.0 → 6.4.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/ai/kui-components.json +376 -7
- package/dist/index.js +2 -2
- package/es/index.js +1008 -479
- package/es/locale/de.js +2 -3
- package/es/locale/el.js +2 -3
- package/es/locale/en.js +2 -3
- package/es/locale/fr.js +2 -3
- package/es/locale/it.js +2 -3
- package/es/locale/ja.js +2 -3
- package/es/locale/ko.js +2 -3
- package/es/locale/ru.js +2 -3
- package/es/locale/th.js +2 -3
- package/es/locale/uk.js +2 -3
- package/es/locale/vi.js +2 -3
- package/es/locale/zh-CN.js +2 -3
- package/es/locale/zh-TW.js +2 -3
- package/lib/index.cjs +2 -2
- package/lib/locale/de.cjs +1 -1
- package/lib/locale/el.cjs +1 -1
- package/lib/locale/en.cjs +1 -1
- package/lib/locale/fr.cjs +1 -1
- package/lib/locale/it.cjs +1 -1
- package/lib/locale/ja.cjs +1 -1
- package/lib/locale/ko.cjs +1 -1
- package/lib/locale/ru.cjs +1 -1
- package/lib/locale/th.cjs +1 -1
- package/lib/locale/uk.cjs +1 -1
- package/lib/locale/vi.cjs +1 -1
- package/lib/locale/zh-CN.cjs +1 -1
- package/lib/locale/zh-TW.cjs +1 -1
- package/package.json +24 -24
- package/style/base.css +1 -1
- package/style/components.css +2 -2
- package/style/index.css +2 -2
- package/style/motion.css +1 -1
- package/style/theme.css +1 -1
- package/types/affix/index.d.cts +42 -0
- package/types/alert/index.d.cts +84 -0
- package/types/alert/index.d.ts +2 -2
- package/types/anchor/anchor-link.d.cts +23 -0
- package/types/anchor/anchor.d.cts +58 -0
- package/types/anchor/anchor.d.ts +1 -1
- package/types/anchor/context.d.cts +8 -0
- package/types/anchor/index.d.cts +5 -0
- package/types/anchor/index.d.ts +4 -4
- package/types/auto-complete/index.d.cts +181 -0
- package/types/auto-complete/index.d.ts +1 -1
- package/types/avatar/avatar-group.d.cts +42 -0
- package/types/avatar/avatar-group.d.ts +1 -1
- package/types/avatar/avatar.d.cts +49 -0
- package/types/avatar/avatar.d.ts +2 -2
- package/types/avatar/context.d.cts +8 -0
- package/types/avatar/index.d.cts +5 -0
- package/types/avatar/index.d.ts +4 -4
- package/types/back-top/index.d.cts +60 -0
- package/types/badge/index.d.cts +45 -0
- package/types/badge/index.d.ts +2 -2
- package/types/base/transition.d.cts +3 -0
- package/types/breadcrumb/breadcrumb-item.d.cts +25 -0
- package/types/breadcrumb/breadcrumb-item.d.ts +1 -1
- package/types/breadcrumb/breadcrumb.d.cts +22 -0
- package/types/breadcrumb/index.d.cts +5 -0
- package/types/breadcrumb/index.d.ts +4 -4
- package/types/button/button-group.d.cts +21 -0
- package/types/button/button-group.d.ts +1 -1
- package/types/button/button.d.cts +38 -0
- package/types/button/button.d.ts +2 -2
- package/types/button/index.d.cts +5 -0
- package/types/button/index.d.ts +4 -4
- package/types/calendar/index.d.cts +93 -0
- package/types/card/card-meta.d.cts +17 -0
- package/types/card/index.d.cts +76 -0
- package/types/card/index.d.ts +4 -4
- package/types/carousel/carousel-item.d.cts +2 -0
- package/types/carousel/carousel.d.cts +116 -0
- package/types/carousel/carousel.d.ts +1 -1
- package/types/carousel/drag.d.cts +19 -0
- package/types/carousel/index.d.cts +4 -0
- package/types/carousel/index.d.ts +3 -3
- package/types/cascader/index.d.cts +151 -0
- package/types/cascader/index.d.ts +23 -23
- package/types/cascader/types.d.cts +76 -0
- package/types/cascader/types.d.ts +2 -2
- package/types/check-card/check-card-group.d.cts +80 -0
- package/types/check-card/check-card-group.d.ts +2 -2
- package/types/check-card/check-card.d.cts +113 -0
- package/types/check-card/check-card.d.ts +3 -3
- package/types/check-card/context.d.cts +20 -0
- package/types/check-card/context.d.ts +2 -2
- package/types/check-card/index.d.cts +7 -0
- package/types/check-card/index.d.ts +5 -5
- package/types/check-card/types.d.cts +22 -0
- package/types/check-card/types.d.ts +2 -2
- package/types/checkbox/checkbox-group.d.cts +87 -0
- package/types/checkbox/checkbox-group.d.ts +2 -2
- package/types/checkbox/checkbox.d.cts +68 -0
- package/types/checkbox/checkbox.d.ts +2 -2
- package/types/checkbox/index.d.cts +7 -0
- package/types/checkbox/index.d.ts +5 -5
- package/types/checkbox/types.d.cts +12 -0
- package/types/collapse/collapse-panel.d.cts +21 -0
- package/types/collapse/collapse-panel.d.ts +1 -1
- package/types/collapse/collapse.d.cts +62 -0
- package/types/collapse/collapse.d.ts +2 -2
- package/types/collapse/context.d.cts +7 -0
- package/types/collapse/index.d.cts +6 -0
- package/types/collapse/index.d.ts +4 -4
- package/types/color-picker/alpha.d.cts +22 -0
- package/types/color-picker/hue.d.cts +21 -0
- package/types/color-picker/index.d.cts +233 -0
- package/types/color-picker/index.d.ts +9 -4
- package/types/color-picker/mode.d.cts +28 -0
- package/types/color-picker/mode.d.ts +2 -2
- package/types/color-picker/paint.d.cts +40 -0
- package/types/color-picker/presets.d.cts +22 -0
- package/types/color-picker/types.d.cts +1 -0
- package/types/components.d.cts +169 -0
- package/types/components.d.ts +169 -166
- package/types/config/context.d.cts +128 -0
- package/types/config/context.d.ts +1 -1
- package/types/config/index.d.cts +38 -0
- package/types/config/index.d.ts +2 -2
- package/types/config/popup-host.d.cts +6 -0
- package/types/config/popup.d.cts +4 -0
- package/types/const/types.d.cts +39 -0
- package/types/const/types.d.ts +1 -1
- package/types/const/var.d.cts +6 -0
- package/types/date-picker/index.d.cts +334 -0
- package/types/date-picker/index.d.ts +3 -3
- package/types/descriptions/descriptions-item.d.cts +28 -0
- package/types/descriptions/descriptions-item.d.ts +1 -1
- package/types/descriptions/descriptions.d.cts +69 -0
- package/types/descriptions/descriptions.d.ts +1 -1
- package/types/descriptions/index.d.cts +6 -0
- package/types/descriptions/index.d.ts +4 -4
- package/types/directives/outsiteclick.d.cts +2 -0
- package/types/directives/resize.d.cts +3 -0
- package/types/directives/scroll.d.cts +2 -0
- package/types/divider/index.d.cts +42 -0
- package/types/divider/index.d.ts +1 -1
- package/types/drawer/index.d.cts +197 -0
- package/types/drawer/index.d.ts +1 -1
- package/types/dropdown/dropdown-button.d.cts +65 -0
- package/types/dropdown/dropdown-button.d.ts +2 -2
- package/types/dropdown/dropdown-context.d.cts +16 -0
- package/types/dropdown/dropdown.d.cts +80 -0
- package/types/dropdown/dropdown.d.ts +1 -1
- package/types/dropdown/index.d.cts +6 -0
- package/types/dropdown/index.d.ts +4 -4
- package/types/dropdown/trigger.d.cts +13 -0
- package/types/dropdown/trigger.d.ts +2 -2
- package/types/empty/index.d.cts +12 -0
- package/types/feature-card/index.d.cts +101 -0
- package/types/feature-card/index.d.ts +2 -2
- package/types/feedback-panel/feedback-panel.d.cts +64 -0
- package/types/feedback-panel/feedback-panel.d.ts +3 -3
- package/types/feedback-panel/index.d.cts +4 -0
- package/types/feedback-panel/index.d.ts +3 -3
- package/types/flame-wrap/engine.d.cts +83 -0
- package/types/flame-wrap/index.d.cts +81 -0
- package/types/flame-wrap/index.d.ts +1 -1
- package/types/flex/index.d.cts +44 -0
- package/types/flex/index.d.ts +3 -3
- package/types/flex/types.d.cts +4 -0
- package/types/flex/types.d.ts +1 -1
- package/types/form/context.d.cts +68 -0
- package/types/form/context.d.ts +2 -2
- package/types/form/form-item.d.cts +39 -0
- package/types/form/form-item.d.ts +2 -2
- package/types/form/form.d.cts +87 -0
- package/types/form/form.d.ts +2 -2
- package/types/form/index.d.cts +8 -0
- package/types/form/index.d.ts +6 -6
- package/types/form/types.d.cts +27 -0
- package/types/global.d.cts +532 -0
- package/types/global.d.ts +16 -0
- package/types/gradient-picker/corners.d.cts +39 -0
- package/types/gradient-picker/corners.d.ts +39 -0
- package/types/gradient-picker/index.d.cts +87 -0
- package/types/gradient-picker/index.d.ts +87 -0
- package/types/gradient-picker/stops.d.cts +39 -0
- package/types/gradient-picker/stops.d.ts +39 -0
- package/types/gradient-picker/types.d.cts +34 -0
- package/types/gradient-picker/types.d.ts +34 -0
- package/types/grid/grid-item.d.cts +25 -0
- package/types/grid/grid-item.d.ts +1 -1
- package/types/grid/grid.d.cts +44 -0
- package/types/grid/grid.d.ts +2 -2
- package/types/grid/index.d.cts +6 -0
- package/types/grid/index.d.ts +5 -5
- package/types/grid/useBreakpoint.d.cts +9 -0
- package/types/icon/index.d.cts +62 -0
- package/types/icon/index.d.ts +3 -3
- package/types/icon/types.d.cts +4 -0
- package/types/image/context.d.cts +9 -0
- package/types/image/context.d.ts +1 -1
- package/types/image/group.d.cts +11 -0
- package/types/image/image.d.cts +73 -0
- package/types/image/image.d.ts +2 -2
- package/types/image/index.d.cts +6 -0
- package/types/image/index.d.ts +5 -5
- package/types/image/instance.d.cts +17 -0
- package/types/image/instance.d.ts +1 -1
- package/types/image/preview.d.cts +47 -0
- package/types/image/preview.d.ts +1 -1
- package/types/image/utils.d.cts +6 -0
- package/types/index.d.cts +1 -1
- package/types/index.d.ts +1 -1
- package/types/input/index.d.cts +8 -0
- package/types/input/index.d.ts +6 -6
- package/types/input/input-base.d.cts +186 -0
- package/types/input/input-base.d.ts +2 -2
- package/types/input/input-box.d.cts +47 -0
- package/types/input/input-box.d.ts +1 -1
- package/types/input/input-group.d.cts +54 -0
- package/types/input/input-group.d.ts +1 -1
- package/types/input/input.d.cts +114 -0
- package/types/input/input.d.ts +19 -19
- package/types/input/textarea.d.cts +81 -0
- package/types/input/textarea.d.ts +1 -1
- package/types/input-number/drag.d.cts +9 -0
- package/types/input-number/drag.d.ts +9 -0
- package/types/input-number/index.d.cts +193 -0
- package/types/input-number/index.d.ts +15 -2
- package/types/input-otp/index.d.cts +4 -0
- package/types/input-otp/index.d.ts +3 -3
- package/types/input-otp/input-otp.d.cts +113 -0
- package/types/input-otp/input-otp.d.ts +3 -3
- package/types/input-otp/types.d.cts +1 -0
- package/types/input-tag/index.d.cts +118 -0
- package/types/input-tag/index.d.ts +1 -1
- package/types/kanban/index.d.cts +124 -0
- package/types/kanban/index.d.ts +1 -1
- package/types/layout/index.d.cts +136 -0
- package/types/layout/index.d.ts +1 -1
- package/types/list-panel/index.d.cts +79 -0
- package/types/list-panel/index.d.ts +3 -3
- package/types/loading/index.d.cts +11 -0
- package/types/mentions/index.d.cts +167 -0
- package/types/mentions/index.d.ts +1 -1
- package/types/menu/index.d.cts +8 -0
- package/types/menu/index.d.ts +6 -6
- package/types/menu/menu-context.d.cts +23 -0
- package/types/menu/menu-context.d.ts +1 -1
- package/types/menu/menu-divider.d.cts +2 -0
- package/types/menu/menu-group.d.cts +11 -0
- package/types/menu/menu-item.d.cts +23 -0
- package/types/menu/menu-item.d.ts +2 -2
- package/types/menu/menu-keyboard.d.cts +30 -0
- package/types/menu/menu.d.cts +99 -0
- package/types/menu/menu.d.ts +3 -3
- package/types/menu/recursive-menu.d.cts +14 -0
- package/types/menu/recursive-menu.d.ts +1 -1
- package/types/menu/sub-menu.d.cts +19 -0
- package/types/menu/sub-menu.d.ts +2 -2
- package/types/menu/types.d.cts +14 -0
- package/types/menu/types.d.ts +1 -1
- package/types/message/index.d.cts +26 -0
- package/types/message/index.d.ts +2 -2
- package/types/modal/index.d.cts +38 -0
- package/types/modal/index.d.ts +3 -3
- package/types/modal/modal.d.cts +178 -0
- package/types/modal/modal.d.ts +2 -2
- package/types/modal/toast.d.cts +37 -0
- package/types/modal/toast.d.ts +2 -2
- package/types/notice/container.d.cts +6 -0
- package/types/notice/content.d.cts +64 -0
- package/types/notice/content.d.ts +3 -3
- package/types/notice/index.d.cts +24 -0
- package/types/notice/index.d.ts +2 -2
- package/types/notice/instance.d.cts +8 -0
- package/types/notice/instance.d.ts +1 -1
- package/types/page/index.d.cts +143 -0
- package/types/page/index.d.ts +1 -1
- package/types/page/responsive.d.cts +1 -0
- package/types/page-header/index.d.cts +14 -0
- package/types/popconfirm/index.d.cts +85 -0
- package/types/popconfirm/index.d.ts +5 -2
- package/types/poptip/index.d.cts +83 -0
- package/types/poptip/index.d.ts +5 -2
- package/types/popup/index.d.cts +255 -0
- package/types/popup/index.d.ts +7 -3
- package/types/popup/layers.d.cts +11 -0
- package/types/popup/types.d.cts +15 -0
- package/types/progress/index.d.cts +123 -0
- package/types/progress/index.d.ts +2 -2
- package/types/qrcode/index.d.cts +195 -0
- package/types/qrcode/index.d.ts +2 -2
- package/types/radio/index.d.cts +9 -0
- package/types/radio/index.d.ts +8 -8
- package/types/radio/radio-button.d.cts +84 -0
- package/types/radio/radio-button.d.ts +3 -3
- package/types/radio/radio-group.d.cts +36 -0
- package/types/radio/radio-group.d.ts +2 -2
- package/types/radio/radio.d.cts +84 -0
- package/types/radio/radio.d.ts +2 -2
- package/types/radio/types.d.cts +12 -0
- package/types/radio/types.d.ts +1 -1
- package/types/rate/index.d.cts +102 -0
- package/types/rate/index.d.ts +2 -2
- package/types/rate/star.d.cts +70 -0
- package/types/rate/star.d.ts +2 -2
- package/types/result/index.d.cts +4 -0
- package/types/result/index.d.ts +3 -3
- package/types/result/result.d.cts +34 -0
- package/types/result/result.d.ts +3 -3
- package/types/ripple/engine.d.cts +66 -0
- package/types/ripple/index.d.cts +42 -0
- package/types/ripple/index.d.ts +1 -1
- package/types/row-col/col.d.cts +52 -0
- package/types/row-col/index.d.cts +5 -0
- package/types/row-col/index.d.ts +4 -4
- package/types/row-col/row.d.cts +38 -0
- package/types/segmented/index.d.cts +49 -0
- package/types/segmented/index.d.ts +4 -3
- package/types/select/index.d.cts +6 -0
- package/types/select/index.d.ts +5 -5
- package/types/select/option.d.cts +53 -0
- package/types/select/option.d.ts +3 -3
- package/types/select/select.d.cts +81 -0
- package/types/select/select.d.ts +4 -4
- package/types/select/types.d.cts +12 -0
- package/types/skeleton/index.d.cts +11 -0
- package/types/skeleton/index.d.ts +10 -10
- package/types/skeleton/skeleton-avatar.d.cts +27 -0
- package/types/skeleton/skeleton-avatar.d.ts +9 -9
- package/types/skeleton/skeleton-button.d.cts +29 -0
- package/types/skeleton/skeleton-button.d.ts +11 -11
- package/types/skeleton/skeleton-image.d.cts +25 -0
- package/types/skeleton/skeleton-image.d.ts +5 -5
- package/types/skeleton/skeleton-text.d.cts +25 -0
- package/types/skeleton/skeleton-text.d.ts +7 -7
- package/types/skeleton/skeleton.d.cts +53 -0
- package/types/skeleton/skeleton.d.ts +9 -9
- package/types/skeleton/types.d.cts +71 -0
- package/types/skeleton/types.d.ts +1 -1
- package/types/skeleton/use-skeleton-loading.d.cts +2 -0
- package/types/slider/index.d.cts +66 -0
- package/types/slider/index.d.ts +1 -1
- package/types/slider/thumb.d.cts +70 -0
- package/types/slider/thumb.d.ts +1 -1
- package/types/space/index.d.cts +54 -0
- package/types/space/index.d.ts +1 -1
- package/types/spin/index.d.cts +71 -0
- package/types/spin/index.d.ts +1 -1
- package/types/splitter/index.d.cts +4 -0
- package/types/splitter/index.d.ts +2 -2
- package/types/splitter/splitter-panel.d.cts +35 -0
- package/types/splitter/splitter.d.cts +31 -0
- package/types/splitter/splitter.d.ts +1 -1
- package/types/stat-card/countup.d.cts +56 -0
- package/types/stat-card/index.d.cts +6 -0
- package/types/stat-card/index.d.ts +5 -5
- package/types/stat-card/rollup.d.cts +34 -0
- package/types/stat-card/stat-card.d.cts +120 -0
- package/types/stat-card/stat-card.d.ts +3 -3
- package/types/stat-card/stat-number.d.cts +110 -0
- package/types/stat-card/stat-number.d.ts +1 -1
- package/types/stat-card/types.d.cts +15 -0
- package/types/stat-card/utils/countup.d.cts +128 -0
- package/types/stat-card/utils/odometer.d.cts +17 -0
- package/types/stat-card/utils/odometer.d.ts +1 -1
- package/types/stat-card/utils/stat-item-key.d.cts +11 -0
- package/types/steps/index.d.cts +86 -0
- package/types/switch/index.d.cts +63 -0
- package/types/switch/index.d.ts +1 -1
- package/types/table/column-setting.d.cts +78 -0
- package/types/table/column-setting.d.ts +2 -2
- package/types/table/index.d.cts +262 -0
- package/types/table/index.d.ts +5 -5
- package/types/table/types.d.cts +39 -0
- package/types/table/utils.d.cts +89 -0
- package/types/table/utils.d.ts +1 -1
- package/types/tabs/index.d.cts +6 -0
- package/types/tabs/index.d.ts +5 -5
- package/types/tabs/tab-panel.d.cts +22 -0
- package/types/tabs/tab-panel.d.ts +2 -2
- package/types/tabs/tabs.d.cts +51 -0
- package/types/tabs/tabs.d.ts +1 -1
- package/types/tabs/types.d.cts +16 -0
- package/types/tabs/types.d.ts +1 -1
- package/types/tag/index.d.cts +58 -0
- package/types/tag/index.d.ts +2 -2
- package/types/time-line/index.d.cts +6 -0
- package/types/time-line/index.d.ts +5 -5
- package/types/time-line/timeline-item.d.cts +21 -0
- package/types/time-line/timeline-item.d.ts +1 -1
- package/types/time-line/timeline.d.cts +27 -0
- package/types/time-line/timeline.d.ts +2 -2
- package/types/tooltip/index.d.cts +79 -0
- package/types/tooltip/index.d.ts +5 -2
- package/types/tour/index.d.cts +122 -0
- package/types/transfer/index.d.cts +129 -0
- package/types/transfer/index.d.ts +1 -1
- package/types/tree/context.d.cts +6 -0
- package/types/tree/index.d.cts +166 -0
- package/types/tree/index.d.ts +5 -5
- package/types/tree/types.d.cts +27 -0
- package/types/tree/types.d.ts +1 -1
- package/types/tree/utils.d.cts +33 -0
- package/types/tree/utils.d.ts +1 -1
- package/types/tree-select/index.d.cts +96 -0
- package/types/tree-select/index.d.ts +4 -4
- package/types/typography/index.d.cts +316 -0
- package/types/upload/file-list.d.cts +101 -0
- package/types/upload/file-list.d.ts +3 -3
- package/types/upload/index.d.cts +229 -0
- package/types/upload/index.d.ts +4 -4
- package/types/upload/picture-sort.d.cts +2 -0
- package/types/upload/selector.d.cts +82 -0
- package/types/upload/selector.d.ts +4 -4
- package/types/upload/types.d.cts +39 -0
- package/types/upload/types.d.ts +1 -1
- package/types/utils/checked.d.cts +2 -0
- package/types/utils/checked.d.ts +1 -1
- package/types/utils/color.d.cts +14 -0
- package/types/utils/css.d.cts +2 -0
- package/types/utils/element.d.cts +17 -0
- package/types/utils/focus.d.cts +5 -0
- package/types/utils/model-value.d.cts +10 -0
- package/types/utils/mouse.d.cts +1 -0
- package/types/utils/number.d.cts +6 -0
- package/types/utils/number.d.ts +1 -1
- package/types/utils/overlay-order.d.cts +6 -0
- package/types/utils/overlay-stack.d.cts +13 -0
- package/types/utils/placement.d.cts +17 -0
- package/types/utils/placement.d.ts +2 -1
- package/types/utils/popup-arrow.d.cts +5 -0
- package/types/utils/popup-arrow.d.ts +5 -0
- package/types/utils/popup.d.cts +11 -0
- package/types/utils/promise.d.cts +5 -0
- package/types/utils/selection-tags.d.cts +18 -0
- package/types/utils/selection-tags.d.ts +1 -1
- package/types/utils/share.d.cts +12 -0
- package/types/utils/theme.d.cts +5 -0
- package/types/utils/vnode.d.cts +33 -0
- package/types/utils/vue.d.cts +17 -0
- package/types/virtual-list/index.d.cts +76 -0
- package/types/virtual-list/index.d.ts +1 -1
- package/types/virtual-list/range.d.cts +15 -0
- package/types/watermark/index.d.cts +188 -0
- package/types/watermark/index.d.ts +3 -3
- package/types/watermark/types.d.cts +11 -0
- package/vetur/attributes.json +212 -4
- package/vetur/tags.json +66 -0
- package/vetur/web-types.json +337 -5
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adapted from Canvas UI by David Haz (DavidHDev).
|
|
3
|
+
* Source: https://github.com/DavidHDev/canvas-ui
|
|
4
|
+
* License: MIT + Commons Clause.
|
|
5
|
+
*/
|
|
6
|
+
export interface FlameWrapOptions {
|
|
7
|
+
/** Flame color as [r, g, b] in 0-1 range. */
|
|
8
|
+
color?: [number, number, number];
|
|
9
|
+
/** Overall brightness of the fire (0 to 3). */
|
|
10
|
+
intensity?: number;
|
|
11
|
+
/** Reach of the flames above the top edge in CSS pixels. */
|
|
12
|
+
height?: number;
|
|
13
|
+
/** Reach of the glow on the sides and bottom in CSS pixels. */
|
|
14
|
+
spread?: number;
|
|
15
|
+
/** Corner radius of the burning outline in CSS pixels. Match your content. */
|
|
16
|
+
radius?: number;
|
|
17
|
+
/** Animation speed multiplier for the whole effect. */
|
|
18
|
+
speed?: number;
|
|
19
|
+
/** Flame detail from 0 (broad licks) to 1 (fine licks). */
|
|
20
|
+
scale?: number;
|
|
21
|
+
/** Amplitude of the turbulence waves shaping the flames (0 to 1). */
|
|
22
|
+
turbulence?: number;
|
|
23
|
+
/** Frequency multiplier of the turbulence waves (0.2 to 3). */
|
|
24
|
+
turbulenceScale?: number;
|
|
25
|
+
/** How far from the edges the heat warps the content, in CSS pixels. */
|
|
26
|
+
turbulenceReach?: number;
|
|
27
|
+
/** Brightness of the spark highlights (0 to 3). 0 disables them. */
|
|
28
|
+
sparks?: number;
|
|
29
|
+
/** Size multiplier for individual sparks (0.2 to 3). */
|
|
30
|
+
sparkSize?: number;
|
|
31
|
+
/** How many sparks fly at once (0.3 to 2.5). */
|
|
32
|
+
sparkDensity?: number;
|
|
33
|
+
/** How fast sparks rise and flicker (0.1 to 3). */
|
|
34
|
+
sparkSpeed?: number;
|
|
35
|
+
/** Strength of the molten glow hugging the edges (0 to 3). */
|
|
36
|
+
rim?: number;
|
|
37
|
+
/** How far the flames eat into the content silhouette in CSS pixels. */
|
|
38
|
+
melt?: number;
|
|
39
|
+
/** Heat shimmer displacement of the content near the edges in CSS pixels. */
|
|
40
|
+
distortion?: number;
|
|
41
|
+
/** Amount of smoke drifting off the flames (0 to 2). */
|
|
42
|
+
smoke?: number;
|
|
43
|
+
/** Brightness of the glowing ember line on the burnt edges (0 to 2). */
|
|
44
|
+
ember?: number;
|
|
45
|
+
/** Darkness of the charred band on the content edges (0 to 2). */
|
|
46
|
+
scorch?: number;
|
|
47
|
+
}
|
|
48
|
+
export interface FlameWrapElements {
|
|
49
|
+
/** Canvas with layoutsubtree that hosts the HTML content. */
|
|
50
|
+
source: HTMLCanvasElement;
|
|
51
|
+
/** The element inside the source canvas that gets captured. */
|
|
52
|
+
content: HTMLElement;
|
|
53
|
+
/** Canvas the WebGL effect renders to. */
|
|
54
|
+
output: HTMLCanvasElement;
|
|
55
|
+
}
|
|
56
|
+
export interface FlameWrapInstance {
|
|
57
|
+
/** Update effect options live. */
|
|
58
|
+
setOptions: (options: FlameWrapOptions) => void;
|
|
59
|
+
/** Re-read canvas size. Call when the element is resized. */
|
|
60
|
+
resize: () => void;
|
|
61
|
+
/** Stop the loop and release all GPU resources. */
|
|
62
|
+
destroy: () => void;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Attributes that turn a canvas into an HTML-in-Canvas host, and the matching
|
|
66
|
+
* opt-in for the element that gets drawn.
|
|
67
|
+
*/
|
|
68
|
+
export interface HtmlInCanvasMarkup {
|
|
69
|
+
canvas: Record<string, string>;
|
|
70
|
+
element: Record<string, string>;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Chrome 156 renames the experimental boolean `layoutsubtree` to the
|
|
74
|
+
* standardized `content="drawable"`, and the element handed to
|
|
75
|
+
* `drawElementImage()` now declares itself with its own `drawable` attribute
|
|
76
|
+
* (WICG html-in-canvas issue #169). Browsers advertise the new spelling with a
|
|
77
|
+
* reflected `content` IDL attribute, so the shape is read off the prototype
|
|
78
|
+
* rather than sniffed from a version string: every release only ever sees the
|
|
79
|
+
* attribute it understands.
|
|
80
|
+
*/
|
|
81
|
+
export declare function htmlInCanvasMarkup(): HtmlInCanvasMarkup;
|
|
82
|
+
export declare function supportsHtmlInCanvas(): boolean;
|
|
83
|
+
export declare function createFlameWrap(elements: FlameWrapElements, options?: FlameWrapOptions): FlameWrapInstance | null;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { type ExtractPropTypes } from "vue";
|
|
2
|
+
import { type FlameWrapInstance, type FlameWrapOptions } from "./engine.cjs";
|
|
3
|
+
declare const flameWrapProps: {
|
|
4
|
+
color: {
|
|
5
|
+
type: import("vue").PropType<[number, number, number]>;
|
|
6
|
+
validator: (value: unknown[]) => boolean;
|
|
7
|
+
};
|
|
8
|
+
intensity: NumberConstructor;
|
|
9
|
+
height: NumberConstructor;
|
|
10
|
+
spread: NumberConstructor;
|
|
11
|
+
radius: NumberConstructor;
|
|
12
|
+
speed: NumberConstructor;
|
|
13
|
+
scale: NumberConstructor;
|
|
14
|
+
turbulence: NumberConstructor;
|
|
15
|
+
turbulenceScale: NumberConstructor;
|
|
16
|
+
turbulenceReach: NumberConstructor;
|
|
17
|
+
sparks: NumberConstructor;
|
|
18
|
+
sparkSize: NumberConstructor;
|
|
19
|
+
sparkDensity: NumberConstructor;
|
|
20
|
+
sparkSpeed: NumberConstructor;
|
|
21
|
+
rim: NumberConstructor;
|
|
22
|
+
melt: NumberConstructor;
|
|
23
|
+
distortion: NumberConstructor;
|
|
24
|
+
smoke: NumberConstructor;
|
|
25
|
+
ember: NumberConstructor;
|
|
26
|
+
scorch: NumberConstructor;
|
|
27
|
+
};
|
|
28
|
+
export type FlameWrapProps = ExtractPropTypes<typeof flameWrapProps>;
|
|
29
|
+
export type { FlameWrapInstance, FlameWrapOptions };
|
|
30
|
+
declare const FlameWrap: import("vue").DefineComponent<ExtractPropTypes<{
|
|
31
|
+
color: {
|
|
32
|
+
type: import("vue").PropType<[number, number, number]>;
|
|
33
|
+
validator: (value: unknown[]) => boolean;
|
|
34
|
+
};
|
|
35
|
+
intensity: NumberConstructor;
|
|
36
|
+
height: NumberConstructor;
|
|
37
|
+
spread: NumberConstructor;
|
|
38
|
+
radius: NumberConstructor;
|
|
39
|
+
speed: NumberConstructor;
|
|
40
|
+
scale: NumberConstructor;
|
|
41
|
+
turbulence: NumberConstructor;
|
|
42
|
+
turbulenceScale: NumberConstructor;
|
|
43
|
+
turbulenceReach: NumberConstructor;
|
|
44
|
+
sparks: NumberConstructor;
|
|
45
|
+
sparkSize: NumberConstructor;
|
|
46
|
+
sparkDensity: NumberConstructor;
|
|
47
|
+
sparkSpeed: NumberConstructor;
|
|
48
|
+
rim: NumberConstructor;
|
|
49
|
+
melt: NumberConstructor;
|
|
50
|
+
distortion: NumberConstructor;
|
|
51
|
+
smoke: NumberConstructor;
|
|
52
|
+
ember: NumberConstructor;
|
|
53
|
+
scorch: NumberConstructor;
|
|
54
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
55
|
+
[key: string]: any;
|
|
56
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
|
57
|
+
color: {
|
|
58
|
+
type: import("vue").PropType<[number, number, number]>;
|
|
59
|
+
validator: (value: unknown[]) => boolean;
|
|
60
|
+
};
|
|
61
|
+
intensity: NumberConstructor;
|
|
62
|
+
height: NumberConstructor;
|
|
63
|
+
spread: NumberConstructor;
|
|
64
|
+
radius: NumberConstructor;
|
|
65
|
+
speed: NumberConstructor;
|
|
66
|
+
scale: NumberConstructor;
|
|
67
|
+
turbulence: NumberConstructor;
|
|
68
|
+
turbulenceScale: NumberConstructor;
|
|
69
|
+
turbulenceReach: NumberConstructor;
|
|
70
|
+
sparks: NumberConstructor;
|
|
71
|
+
sparkSize: NumberConstructor;
|
|
72
|
+
sparkDensity: NumberConstructor;
|
|
73
|
+
sparkSpeed: NumberConstructor;
|
|
74
|
+
rim: NumberConstructor;
|
|
75
|
+
melt: NumberConstructor;
|
|
76
|
+
distortion: NumberConstructor;
|
|
77
|
+
smoke: NumberConstructor;
|
|
78
|
+
ember: NumberConstructor;
|
|
79
|
+
scorch: NumberConstructor;
|
|
80
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
81
|
+
export default FlameWrap;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ExtractPropTypes } from "vue";
|
|
2
|
-
import { type FlameWrapInstance, type FlameWrapOptions } from "./engine";
|
|
2
|
+
import { type FlameWrapInstance, type FlameWrapOptions } from "./engine.js";
|
|
3
3
|
declare const flameWrapProps: {
|
|
4
4
|
color: {
|
|
5
5
|
type: import("vue").PropType<[number, number, number]>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { ExtractPropTypes, PropType } from "vue";
|
|
2
|
+
import type { BooleanType } from "../const/types.cjs";
|
|
3
|
+
import type { FlexAlignType, FlexJustifyType, FlexSizeType } from "./types.cjs";
|
|
4
|
+
declare const flexProps: {
|
|
5
|
+
align: {
|
|
6
|
+
type: PropType<FlexAlignType>;
|
|
7
|
+
};
|
|
8
|
+
justify: {
|
|
9
|
+
type: PropType<FlexJustifyType>;
|
|
10
|
+
};
|
|
11
|
+
vertical: BooleanType;
|
|
12
|
+
wrap: BooleanType;
|
|
13
|
+
size: {
|
|
14
|
+
type: PropType<FlexSizeType>;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export type FlexProps = ExtractPropTypes<typeof flexProps>;
|
|
18
|
+
declare const Flex: import("vue").DefineComponent<ExtractPropTypes<{
|
|
19
|
+
align: {
|
|
20
|
+
type: PropType<FlexAlignType>;
|
|
21
|
+
};
|
|
22
|
+
justify: {
|
|
23
|
+
type: PropType<FlexJustifyType>;
|
|
24
|
+
};
|
|
25
|
+
vertical: BooleanType;
|
|
26
|
+
wrap: BooleanType;
|
|
27
|
+
size: {
|
|
28
|
+
type: PropType<FlexSizeType>;
|
|
29
|
+
};
|
|
30
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
|
31
|
+
align: {
|
|
32
|
+
type: PropType<FlexAlignType>;
|
|
33
|
+
};
|
|
34
|
+
justify: {
|
|
35
|
+
type: PropType<FlexJustifyType>;
|
|
36
|
+
};
|
|
37
|
+
vertical: BooleanType;
|
|
38
|
+
wrap: BooleanType;
|
|
39
|
+
size: {
|
|
40
|
+
type: PropType<FlexSizeType>;
|
|
41
|
+
};
|
|
42
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
43
|
+
export default Flex;
|
|
44
|
+
export type { FlexAlignType, FlexJustifyType, FlexSizeType } from "./types.cjs";
|
package/types/flex/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ExtractPropTypes, PropType } from "vue";
|
|
2
|
-
import type { BooleanType } from "../const/types";
|
|
3
|
-
import type { FlexAlignType, FlexJustifyType, FlexSizeType } from "./types";
|
|
2
|
+
import type { BooleanType } from "../const/types.js";
|
|
3
|
+
import type { FlexAlignType, FlexJustifyType, FlexSizeType } from "./types.js";
|
|
4
4
|
declare const flexProps: {
|
|
5
5
|
align: {
|
|
6
6
|
type: PropType<FlexAlignType>;
|
|
@@ -41,4 +41,4 @@ declare const Flex: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
41
41
|
};
|
|
42
42
|
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
43
43
|
export default Flex;
|
|
44
|
-
export type { FlexAlignType, FlexJustifyType, FlexSizeType } from "./types";
|
|
44
|
+
export type { FlexAlignType, FlexJustifyType, FlexSizeType } from "./types.js";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SizeType } from "../const/types.cjs";
|
|
2
|
+
export type FlexSizeType = SizeType | number | (string | number)[];
|
|
3
|
+
export type FlexAlignType = "start" | "flex-start" | "end" | "flex-end" | "center" | "baseline";
|
|
4
|
+
export type FlexJustifyType = "flex-start" | "center" | "flex-end" | "space-between" | "space-around" | "space-evenly";
|
package/types/flex/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SizeType } from "../const/types";
|
|
1
|
+
import type { SizeType } from "../const/types.js";
|
|
2
2
|
export type FlexSizeType = SizeType | number | (string | number)[];
|
|
3
3
|
export type FlexAlignType = "start" | "flex-start" | "end" | "flex-end" | "center" | "baseline";
|
|
4
4
|
export type FlexJustifyType = "flex-start" | "center" | "flex-end" | "space-between" | "space-around" | "space-evenly";
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { type Attrs, type ComputedRef, type InjectionKey } from "vue";
|
|
2
|
+
import type { DirectionType, ShapeType, SizeType, ThemeType } from "../const/types.cjs";
|
|
3
|
+
import type { ColProps, FormRule, FormRules, FormValidateTrigger } from "./types.cjs";
|
|
4
|
+
export interface FormItemRegistration {
|
|
5
|
+
prop?: string;
|
|
6
|
+
rules?: FormRule | FormRule[];
|
|
7
|
+
valid: boolean;
|
|
8
|
+
validate: (rules: FormRule | FormRule[], trigger?: FormValidateTrigger) => Promise<boolean>;
|
|
9
|
+
}
|
|
10
|
+
export interface FormProviderContext {
|
|
11
|
+
getValueFromProp?: (prop: string | undefined) => unknown;
|
|
12
|
+
rules?: FormRules;
|
|
13
|
+
register?: (item: FormItemRegistration) => void;
|
|
14
|
+
unregister?: (item: FormItemRegistration, prop?: string) => void;
|
|
15
|
+
layout?: "inline" | DirectionType;
|
|
16
|
+
name?: string;
|
|
17
|
+
size?: SizeType;
|
|
18
|
+
shape?: ShapeType;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
readonly?: boolean;
|
|
21
|
+
colon?: boolean;
|
|
22
|
+
theme?: ThemeType;
|
|
23
|
+
updateModel?: (prop: string, value: unknown) => void;
|
|
24
|
+
labelCol?: ColProps;
|
|
25
|
+
wrapperCol?: ColProps;
|
|
26
|
+
cleaned?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare const FORM_INJECTION_KEY: InjectionKey<FormProviderContext>;
|
|
29
|
+
export interface FormFieldContext {
|
|
30
|
+
id: string;
|
|
31
|
+
labelId: string;
|
|
32
|
+
errorId: string;
|
|
33
|
+
prop?: string;
|
|
34
|
+
value: ComputedRef<unknown>;
|
|
35
|
+
size: ComputedRef<SizeType | undefined>;
|
|
36
|
+
shape: ComputedRef<ShapeType | undefined>;
|
|
37
|
+
theme: ComputedRef<ThemeType | undefined>;
|
|
38
|
+
disabled: ComputedRef<boolean>;
|
|
39
|
+
readonly: ComputedRef<boolean>;
|
|
40
|
+
invalid: ComputedRef<boolean>;
|
|
41
|
+
required: ComputedRef<boolean>;
|
|
42
|
+
describedBy: ComputedRef<string | undefined>;
|
|
43
|
+
update: (value: unknown) => void;
|
|
44
|
+
blur: () => void;
|
|
45
|
+
}
|
|
46
|
+
export declare const FORM_FIELD_INJECTION_KEY: InjectionKey<FormFieldContext | null>;
|
|
47
|
+
export declare const useFormField: (isolate?: boolean) => FormFieldContext | null;
|
|
48
|
+
/** Resolve appearance without letting an inherited Form value override an explicit component prop. */
|
|
49
|
+
export declare const useFormAppearance: <T extends {
|
|
50
|
+
size?: SizeType;
|
|
51
|
+
theme?: ThemeType;
|
|
52
|
+
shape?: ShapeType;
|
|
53
|
+
}>(props: T, field: FormFieldContext | null) => {
|
|
54
|
+
size: ComputedRef<SizeType | undefined>;
|
|
55
|
+
theme: ComputedRef<ThemeType | undefined>;
|
|
56
|
+
shape: ComputedRef<ShapeType | undefined>;
|
|
57
|
+
};
|
|
58
|
+
export declare const resolveFormControlAttrs: (attrs: Attrs, field: FormFieldContext | null) => {
|
|
59
|
+
id: string | undefined;
|
|
60
|
+
"aria-labelledby": string | undefined;
|
|
61
|
+
"aria-describedby": string | undefined;
|
|
62
|
+
"aria-invalid": true | "false" | "true" | "grammar" | "spelling" | undefined;
|
|
63
|
+
"aria-required": true | "false" | "true" | undefined;
|
|
64
|
+
};
|
|
65
|
+
export declare const markFormFieldComponent: <T extends object>(component: T) => T;
|
|
66
|
+
export declare const isFormFieldComponent: (component: unknown) => boolean;
|
|
67
|
+
export declare const markFormFieldWrapper: <T extends object>(component: T) => T;
|
|
68
|
+
export declare const isFormFieldWrapper: (component: unknown) => boolean;
|
package/types/form/context.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Attrs, type ComputedRef, type InjectionKey } from "vue";
|
|
2
|
-
import type { DirectionType, ShapeType, SizeType, ThemeType } from "../const/types";
|
|
3
|
-
import type { ColProps, FormRule, FormRules, FormValidateTrigger } from "./types";
|
|
2
|
+
import type { DirectionType, ShapeType, SizeType, ThemeType } from "../const/types.js";
|
|
3
|
+
import type { ColProps, FormRule, FormRules, FormValidateTrigger } from "./types.js";
|
|
4
4
|
export interface FormItemRegistration {
|
|
5
5
|
prop?: string;
|
|
6
6
|
rules?: FormRule | FormRule[];
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ExtractPropTypes, PropType } from "vue";
|
|
2
|
+
import type { BooleanType } from "../const/types.cjs";
|
|
3
|
+
import type { ColProps, FormRule } from "./types.cjs";
|
|
4
|
+
declare const formItemProps: {
|
|
5
|
+
label: StringConstructor;
|
|
6
|
+
prop: StringConstructor;
|
|
7
|
+
labelCol: PropType<ColProps>;
|
|
8
|
+
wrapperCol: PropType<ColProps>;
|
|
9
|
+
rules: PropType<FormRule | FormRule[]>;
|
|
10
|
+
colon: {
|
|
11
|
+
type: BooleanType;
|
|
12
|
+
default: undefined;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export type FormItemProps = ExtractPropTypes<typeof formItemProps>;
|
|
16
|
+
declare const FormItem: import("vue").DefineComponent<ExtractPropTypes<{
|
|
17
|
+
label: StringConstructor;
|
|
18
|
+
prop: StringConstructor;
|
|
19
|
+
labelCol: PropType<ColProps>;
|
|
20
|
+
wrapperCol: PropType<ColProps>;
|
|
21
|
+
rules: PropType<FormRule | FormRule[]>;
|
|
22
|
+
colon: {
|
|
23
|
+
type: BooleanType;
|
|
24
|
+
default: undefined;
|
|
25
|
+
};
|
|
26
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
|
27
|
+
label: StringConstructor;
|
|
28
|
+
prop: StringConstructor;
|
|
29
|
+
labelCol: PropType<ColProps>;
|
|
30
|
+
wrapperCol: PropType<ColProps>;
|
|
31
|
+
rules: PropType<FormRule | FormRule[]>;
|
|
32
|
+
colon: {
|
|
33
|
+
type: BooleanType;
|
|
34
|
+
default: undefined;
|
|
35
|
+
};
|
|
36
|
+
}>> & Readonly<{}>, {
|
|
37
|
+
colon: boolean | undefined;
|
|
38
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
39
|
+
export default FormItem;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ExtractPropTypes, PropType } from "vue";
|
|
2
|
-
import type { BooleanType } from "../const/types";
|
|
3
|
-
import type { ColProps, FormRule } from "./types";
|
|
2
|
+
import type { BooleanType } from "../const/types.js";
|
|
3
|
+
import type { ColProps, FormRule } from "./types.js";
|
|
4
4
|
declare const formItemProps: {
|
|
5
5
|
label: StringConstructor;
|
|
6
6
|
prop: StringConstructor;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { ExtractPropTypes, PropType } from "vue";
|
|
2
|
+
import type { BooleanType, DirectionType, ShapeType, SizeType, ThemeType } from "../const/types.cjs";
|
|
3
|
+
import type { ColProps, FormRules, FormSubmitEvent } from "./types.cjs";
|
|
4
|
+
declare const formProps: {
|
|
5
|
+
layout: {
|
|
6
|
+
type: PropType<DirectionType>;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
model: PropType<Record<string, unknown>>;
|
|
10
|
+
name: StringConstructor;
|
|
11
|
+
labelCol: PropType<ColProps>;
|
|
12
|
+
wrapperCol: PropType<ColProps>;
|
|
13
|
+
rules: {
|
|
14
|
+
type: PropType<FormRules>;
|
|
15
|
+
};
|
|
16
|
+
size: {
|
|
17
|
+
type: PropType<SizeType>;
|
|
18
|
+
};
|
|
19
|
+
theme: PropType<ThemeType>;
|
|
20
|
+
shape: PropType<ShapeType>;
|
|
21
|
+
disabled: BooleanType;
|
|
22
|
+
readonly: BooleanType;
|
|
23
|
+
colon: {
|
|
24
|
+
type: BooleanType;
|
|
25
|
+
default: boolean;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export type FormProps = ExtractPropTypes<typeof formProps>;
|
|
29
|
+
declare const Form: import("vue").DefineComponent<ExtractPropTypes<{
|
|
30
|
+
layout: {
|
|
31
|
+
type: PropType<DirectionType>;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
model: PropType<Record<string, unknown>>;
|
|
35
|
+
name: StringConstructor;
|
|
36
|
+
labelCol: PropType<ColProps>;
|
|
37
|
+
wrapperCol: PropType<ColProps>;
|
|
38
|
+
rules: {
|
|
39
|
+
type: PropType<FormRules>;
|
|
40
|
+
};
|
|
41
|
+
size: {
|
|
42
|
+
type: PropType<SizeType>;
|
|
43
|
+
};
|
|
44
|
+
theme: PropType<ThemeType>;
|
|
45
|
+
shape: PropType<ShapeType>;
|
|
46
|
+
disabled: BooleanType;
|
|
47
|
+
readonly: BooleanType;
|
|
48
|
+
colon: {
|
|
49
|
+
type: BooleanType;
|
|
50
|
+
default: boolean;
|
|
51
|
+
};
|
|
52
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
53
|
+
change: (model: Record<string, unknown>) => boolean;
|
|
54
|
+
reset: () => true;
|
|
55
|
+
submit: (result: FormSubmitEvent) => boolean;
|
|
56
|
+
}, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
|
57
|
+
layout: {
|
|
58
|
+
type: PropType<DirectionType>;
|
|
59
|
+
default: string;
|
|
60
|
+
};
|
|
61
|
+
model: PropType<Record<string, unknown>>;
|
|
62
|
+
name: StringConstructor;
|
|
63
|
+
labelCol: PropType<ColProps>;
|
|
64
|
+
wrapperCol: PropType<ColProps>;
|
|
65
|
+
rules: {
|
|
66
|
+
type: PropType<FormRules>;
|
|
67
|
+
};
|
|
68
|
+
size: {
|
|
69
|
+
type: PropType<SizeType>;
|
|
70
|
+
};
|
|
71
|
+
theme: PropType<ThemeType>;
|
|
72
|
+
shape: PropType<ShapeType>;
|
|
73
|
+
disabled: BooleanType;
|
|
74
|
+
readonly: BooleanType;
|
|
75
|
+
colon: {
|
|
76
|
+
type: BooleanType;
|
|
77
|
+
default: boolean;
|
|
78
|
+
};
|
|
79
|
+
}>> & Readonly<{
|
|
80
|
+
onChange?: ((model: Record<string, unknown>) => any) | undefined;
|
|
81
|
+
onReset?: (() => any) | undefined;
|
|
82
|
+
onSubmit?: ((result: FormSubmitEvent) => any) | undefined;
|
|
83
|
+
}>, {
|
|
84
|
+
layout: DirectionType;
|
|
85
|
+
colon: boolean | undefined;
|
|
86
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
87
|
+
export default Form;
|
package/types/form/form.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ExtractPropTypes, PropType } from "vue";
|
|
2
|
-
import type { BooleanType, DirectionType, ShapeType, SizeType, ThemeType } from "../const/types";
|
|
3
|
-
import type { ColProps, FormRules, FormSubmitEvent } from "./types";
|
|
2
|
+
import type { BooleanType, DirectionType, ShapeType, SizeType, ThemeType } from "../const/types.js";
|
|
3
|
+
import type { ColProps, FormRules, FormSubmitEvent } from "./types.js";
|
|
4
4
|
declare const formProps: {
|
|
5
5
|
layout: {
|
|
6
6
|
type: PropType<DirectionType>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import Form from "./form.cjs";
|
|
2
|
+
import type { FormExpose } from "./types.cjs";
|
|
3
|
+
import FormItem from "./form-item.cjs";
|
|
4
|
+
export type { FormProps } from "./form.cjs";
|
|
5
|
+
export type { FormRules, FormSubmitEvent, FormExpose, FormValidateTrigger } from "./types.cjs";
|
|
6
|
+
export type { FormItemProps } from "./form-item.cjs";
|
|
7
|
+
export { Form, FormItem };
|
|
8
|
+
export type FormContext = InstanceType<typeof Form> & FormExpose;
|
package/types/form/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import Form from "./form";
|
|
2
|
-
import type { FormExpose } from "./types";
|
|
3
|
-
import FormItem from "./form-item";
|
|
4
|
-
export type { FormProps } from "./form";
|
|
5
|
-
export type { FormRules, FormSubmitEvent, FormExpose, FormValidateTrigger } from "./types";
|
|
6
|
-
export type { FormItemProps } from "./form-item";
|
|
1
|
+
import Form from "./form.js";
|
|
2
|
+
import type { FormExpose } from "./types.js";
|
|
3
|
+
import FormItem from "./form-item.js";
|
|
4
|
+
export type { FormProps } from "./form.js";
|
|
5
|
+
export type { FormRules, FormSubmitEvent, FormExpose, FormValidateTrigger } from "./types.js";
|
|
6
|
+
export type { FormItemProps } from "./form-item.js";
|
|
7
7
|
export { Form, FormItem };
|
|
8
8
|
export type FormContext = InstanceType<typeof Form> & FormExpose;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface ColProps {
|
|
2
|
+
span?: number;
|
|
3
|
+
offset?: number;
|
|
4
|
+
}
|
|
5
|
+
/** 校验触发时机 */
|
|
6
|
+
export type FormValidateTrigger = "blur" | "change";
|
|
7
|
+
export interface FormRule {
|
|
8
|
+
required?: boolean;
|
|
9
|
+
message?: string;
|
|
10
|
+
validator?: (rule: FormRule, value: unknown, callback: (error?: Error) => void) => void | Promise<void>;
|
|
11
|
+
pattern?: RegExp;
|
|
12
|
+
type?: "mobile" | "mail" | "number";
|
|
13
|
+
min?: number;
|
|
14
|
+
max?: number;
|
|
15
|
+
/** 该规则在何时触发校验,未设置时默认在 `change` 时校验 */
|
|
16
|
+
trigger?: FormValidateTrigger | FormValidateTrigger[];
|
|
17
|
+
}
|
|
18
|
+
export type FormRules = Record<string, FormRule | FormRule[]>;
|
|
19
|
+
export interface FormSubmitEvent {
|
|
20
|
+
valid: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface FormExpose {
|
|
23
|
+
validate: (callback?: (result: FormSubmitEvent) => void) => Promise<FormSubmitEvent>;
|
|
24
|
+
reset: () => void;
|
|
25
|
+
test: (key: string, trigger?: FormValidateTrigger) => Promise<boolean> | undefined;
|
|
26
|
+
submit: () => Promise<void>;
|
|
27
|
+
}
|