react-kui 3.0.0 → 3.1.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/behaviors.json +3 -3
- package/ai/cli.mjs +0 -0
- package/ai/kui-components.json +1552 -1280
- package/ai/mcp.mjs +0 -0
- package/es/_virtual/_rolldown/runtime.js +1 -1
- package/es/affix/index.js +1 -1
- package/es/alert/index.js +29 -15
- package/es/anchor/anchor-context.js +1 -1
- package/es/anchor/anchor-link.js +1 -1
- package/es/anchor/anchor.js +1 -1
- package/es/auto-complete/index.js +378 -437
- package/es/avatar/avatar-group-context.js +1 -1
- package/es/avatar/avatar-group.js +1 -1
- package/es/avatar/avatar.js +2 -2
- package/es/back-top/index.js +3 -3
- package/es/badge/index.js +6 -2
- package/es/base/teleport.js +19 -30
- package/es/base/transition-props.js +1 -1
- package/es/base/transition.js +3 -3
- package/es/breadcrumb/breadcrumb-context.js +1 -1
- package/es/breadcrumb/breadcrumb-item.js +1 -1
- package/es/breadcrumb/breadcrumb.js +1 -1
- package/es/button/button-group-context.js +1 -1
- package/es/button/button-group.js +1 -1
- package/es/button/button.js +2 -2
- package/es/calendar/index.js +1 -1
- package/es/card/index.js +1 -1
- package/es/carousel/carousel-context.js +1 -1
- package/es/carousel/carousel-item.js +1 -1
- package/es/carousel/carousel.js +1 -1
- package/es/cascader/index.js +104 -170
- package/es/check-card/check-card-group.js +1 -1
- package/es/check-card/check-card.js +143 -143
- package/es/check-card/context.js +1 -1
- package/es/checkbox/checkbox-group-context.js +1 -1
- package/es/checkbox/checkbox-group.js +1 -1
- package/es/checkbox/checkbox.js +131 -112
- package/es/checkbox/index.js +1 -1
- package/es/collapse/collapse-panel.js +2 -2
- package/es/collapse/collapse.js +96 -103
- package/es/color-picker/alpha.js +81 -63
- package/es/color-picker/hue.js +69 -51
- package/es/color-picker/index.js +79 -128
- package/es/color-picker/mode.js +1 -1
- package/es/color-picker/paint.js +85 -67
- package/es/color-picker/presets.js +1 -1
- package/es/components.js +4 -2
- package/es/config/config-context.js +1 -1
- package/es/config/context.js +1 -1
- package/es/config/index.js +1 -1
- package/es/config/size-context.js +1 -1
- package/es/config/use-config-appearance.js +1 -1
- package/es/const/var.js +1 -1
- package/es/date-picker/index.js +591 -678
- package/es/descriptions/descriptions-item.js +1 -1
- package/es/descriptions/descriptions.js +2 -2
- package/es/divider/index.js +1 -1
- package/es/drawer/index.js +193 -190
- package/es/dropdown/dropdown-button.js +1 -1
- package/es/dropdown/dropdown-context.js +1 -1
- package/es/dropdown/dropdown.js +173 -331
- package/es/dropdown/trigger.js +1 -1
- package/es/empty/index.js +1 -1
- package/es/feature-card/index.js +1 -1
- package/es/feedback-panel/index.js +1 -1
- package/es/flame-wrap/index.js +1 -1
- package/es/flame-wrap/types.js +1 -1
- package/es/flex/index.js +1 -1
- package/es/form/field-context.js +1 -1
- package/es/form/form-context.js +1 -1
- package/es/form/form-item.js +2 -2
- package/es/form/form.js +1 -1
- package/es/form/utils.js +1 -1
- package/es/grid/grid-item.js +1 -1
- package/es/grid/grid.js +1 -1
- package/es/grid/useBreakpoint.js +1 -1
- package/es/icon/index.js +1 -1
- package/es/image/group.js +1 -1
- package/es/image/image-group-context.js +1 -1
- package/es/image/image.js +1 -1
- package/es/image/instance.js +1 -1
- package/es/image/preview.js +2 -2
- package/es/image/utils.js +1 -1
- package/es/index.js +3 -2
- package/es/input/index.js +1 -1
- package/es/input/input-box.js +1 -1
- package/es/input/input-group.js +2 -2
- package/es/input/input.js +1 -1
- package/es/input/textarea.js +1 -1
- package/es/input-number/index.js +1 -1
- package/es/input-otp/index.js +2 -1
- package/es/input-tag/index.js +13 -43
- package/es/kanban/index.js +1 -1
- package/es/layout/index.js +1 -1
- package/es/layout/layout-context.js +1 -1
- package/es/list-panel/index.js +1 -1
- package/es/loading/index.js +1 -1
- package/es/loading/loading-bar.js +1 -1
- package/es/locale/de.js +1 -1
- package/es/locale/el.js +1 -1
- package/es/locale/en.js +1 -1
- package/es/locale/fr.js +1 -1
- package/es/locale/it.js +1 -1
- package/es/locale/ja.js +1 -1
- package/es/locale/ko.js +1 -1
- package/es/locale/ru.js +1 -1
- package/es/locale/th.js +1 -1
- package/es/locale/uk.js +1 -1
- package/es/locale/vi.js +1 -1
- package/es/locale/zh-CN.js +1 -1
- package/es/locale/zh-TW.js +1 -1
- package/es/mentions/index.js +341 -387
- package/es/menu/menu-context.js +1 -1
- package/es/menu/menu-divider.js +1 -1
- package/es/menu/menu-group.js +1 -1
- package/es/menu/menu-item.js +3 -3
- package/es/menu/menu-keyboard.js +1 -1
- package/es/menu/menu.js +215 -220
- package/es/menu/recursive-menu.js +1 -1
- package/es/menu/sub-menu.js +3 -3
- package/es/message/index.js +1 -1
- package/es/modal/api.js +1 -1
- package/es/modal/modal.js +247 -244
- package/es/modal/toast.js +1 -1
- package/es/node_modules/.pnpm/kui-icons@5.0.0/node_modules/kui-icons/dist/kui-icons.esm.js +1 -1
- package/es/notice/container.js +1 -1
- package/es/notice/content.js +1 -1
- package/es/notice/index.js +1 -1
- package/es/notice/instance.js +1 -1
- package/es/page/index.js +3 -3
- package/es/page-header/index.js +1 -1
- package/es/popconfirm/index.js +89 -241
- package/es/poptip/index.js +83 -243
- package/es/popup/index.js +429 -0
- package/es/popup/layers.js +33 -0
- package/es/progress/index.js +1 -1
- package/es/qrcode/index.js +1 -1
- package/es/radio/radio-button.js +53 -53
- package/es/radio/radio-group-context.js +1 -1
- package/es/radio/radio-group.js +1 -1
- package/es/radio/radio.js +110 -91
- package/es/rate/index.js +58 -57
- package/es/rate/star.js +1 -1
- package/es/result/index.js +1 -1
- package/es/ripple/index.js +1 -1
- package/es/ripple/types.js +1 -1
- package/es/row-col/col.js +1 -1
- package/es/row-col/row.js +1 -1
- package/es/segmented/index.js +1 -1
- package/es/select/option.js +69 -61
- package/es/select/select.js +78 -213
- package/es/skeleton/skeleton-avatar.js +1 -1
- package/es/skeleton/skeleton-button.js +1 -1
- package/es/skeleton/skeleton-image.js +1 -1
- package/es/skeleton/skeleton-text.js +1 -1
- package/es/skeleton/skeleton.js +1 -1
- package/es/skeleton/use-skeleton-loading.js +1 -1
- package/es/slider/index.js +89 -55
- package/es/slider/thumb.js +2 -1
- package/es/space/index.js +2 -2
- package/es/spin/index.js +1 -1
- package/es/splitter/splitter-panel.js +1 -1
- package/es/splitter/splitter.js +1 -1
- package/es/stat-card/countup.js +8 -4
- package/es/stat-card/rollup.js +122 -0
- package/es/stat-card/stat-card.js +1 -1
- package/es/stat-card/stat-number.js +1 -1
- package/es/stat-card/utils/countup.js +2 -2
- package/es/stat-card/utils/odometer.js +104 -107
- package/es/steps/index.js +1 -1
- package/es/switch/index.js +7 -6
- package/es/table/column-setting.js +1 -1
- package/es/table/index.js +33 -29
- package/es/table/utils.js +1 -1
- package/es/tabs/tab-panel.js +1 -1
- package/es/tabs/tabs.js +15 -6
- package/es/tag/index.js +9 -5
- package/es/time-line/timeline-item.js +1 -1
- package/es/time-line/timeline.js +1 -1
- package/es/tooltip/index.js +127 -248
- package/es/tour/index.js +198 -193
- package/es/transfer/index.js +245 -246
- package/es/tree/index.js +72 -67
- package/es/tree/utils.js +1 -1
- package/es/tree-select/index.js +562 -655
- package/es/typography/index.js +1 -1
- package/es/upload/file-list.js +3 -1
- package/es/upload/index.js +8 -8
- package/es/upload/picture-sort.js +1 -1
- package/es/upload/selector.js +121 -116
- package/es/utils/checked.js +1 -1
- package/es/utils/color.js +1 -1
- package/es/utils/number.js +1 -1
- package/es/utils/placement.js +1 -1
- package/es/utils/popup.js +42 -0
- package/es/utils/react-node.js +1 -1
- package/es/utils/selection-tags.js +55 -0
- package/es/utils/share.js +1 -1
- package/es/utils/theme.js +1 -1
- package/es/utils/transition.js +1 -1
- package/es/utils/use-value.js +1 -1
- package/es/virtual-list/index.js +1 -1
- package/es/virtual-list/range.js +1 -1
- package/es/watermark/index.js +1 -1
- 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 +32 -29
- package/style/base.css +1 -1
- package/style/components.css +2 -2
- package/style/index.css +2 -2
- package/style/theme.css +2 -2
- package/types/affix/index.d.cts +1 -1
- package/types/affix/index.d.ts +1 -1
- package/types/alert/index.d.cts +2 -1
- package/types/alert/index.d.ts +2 -1
- package/types/anchor/anchor-link.d.cts +1 -1
- package/types/anchor/anchor-link.d.ts +1 -1
- package/types/anchor/anchor.d.cts +1 -1
- package/types/anchor/anchor.d.ts +1 -1
- package/types/auto-complete/index.d.cts +1 -2
- package/types/auto-complete/index.d.ts +1 -2
- package/types/avatar/avatar-group.d.cts +1 -1
- package/types/avatar/avatar-group.d.ts +1 -1
- package/types/avatar/avatar.d.cts +1 -1
- package/types/avatar/avatar.d.ts +1 -1
- package/types/back-top/index.d.cts +1 -1
- package/types/back-top/index.d.ts +1 -1
- package/types/badge/index.d.cts +1 -1
- package/types/badge/index.d.ts +1 -1
- package/types/base/transition.d.cts +1 -0
- package/types/base/transition.d.ts +1 -0
- package/types/breadcrumb/breadcrumb-item.d.cts +1 -1
- package/types/breadcrumb/breadcrumb-item.d.ts +1 -1
- package/types/breadcrumb/breadcrumb.d.cts +1 -1
- package/types/breadcrumb/breadcrumb.d.ts +1 -1
- package/types/button/button-group.d.cts +1 -1
- package/types/button/button-group.d.ts +1 -1
- package/types/button/button.d.cts +1 -1
- package/types/button/button.d.ts +1 -1
- package/types/calendar/index.d.cts +1 -1
- package/types/calendar/index.d.ts +1 -1
- package/types/card/index.d.cts +2 -2
- package/types/card/index.d.ts +2 -2
- package/types/carousel/carousel-item.d.cts +1 -1
- package/types/carousel/carousel-item.d.ts +1 -1
- package/types/carousel/carousel.d.cts +1 -1
- package/types/carousel/carousel.d.ts +1 -1
- package/types/cascader/index.d.cts +1 -1
- package/types/cascader/index.d.ts +1 -1
- package/types/cascader/types.d.cts +1 -2
- package/types/cascader/types.d.ts +1 -2
- package/types/check-card/types.d.cts +2 -3
- package/types/check-card/types.d.ts +2 -3
- package/types/checkbox/checkbox-group.d.cts +1 -1
- package/types/checkbox/checkbox-group.d.ts +1 -1
- package/types/checkbox/checkbox.d.cts +1 -2
- package/types/checkbox/checkbox.d.ts +1 -2
- package/types/checkbox/index.d.cts +1 -1
- package/types/checkbox/index.d.ts +1 -1
- package/types/collapse/collapse-panel.d.cts +1 -1
- package/types/collapse/collapse-panel.d.ts +1 -1
- package/types/collapse/collapse.d.cts +1 -2
- package/types/collapse/collapse.d.ts +1 -2
- package/types/color-picker/alpha.d.cts +2 -1
- package/types/color-picker/alpha.d.ts +2 -1
- package/types/color-picker/hue.d.cts +2 -1
- package/types/color-picker/hue.d.ts +2 -1
- package/types/color-picker/index.d.cts +3 -4
- package/types/color-picker/index.d.ts +3 -4
- package/types/color-picker/paint.d.cts +2 -1
- package/types/color-picker/paint.d.ts +2 -1
- package/types/components.d.cts +17 -13
- package/types/components.d.ts +17 -13
- package/types/date-picker/index.d.cts +3 -4
- package/types/date-picker/index.d.ts +3 -4
- package/types/descriptions/descriptions.d.cts +1 -1
- package/types/descriptions/descriptions.d.ts +1 -1
- package/types/divider/index.d.cts +1 -1
- package/types/divider/index.d.ts +1 -1
- package/types/drawer/index.d.cts +0 -1
- package/types/drawer/index.d.ts +0 -1
- package/types/dropdown/dropdown-button.d.cts +1 -1
- package/types/dropdown/dropdown-button.d.ts +1 -1
- package/types/dropdown/dropdown.d.cts +1 -2
- package/types/dropdown/dropdown.d.ts +1 -2
- package/types/empty/index.d.cts +1 -1
- package/types/empty/index.d.ts +1 -1
- package/types/feature-card/index.d.cts +1 -1
- package/types/feature-card/index.d.ts +1 -1
- package/types/feedback-panel/index.d.cts +1 -1
- package/types/feedback-panel/index.d.ts +1 -1
- package/types/flex/index.d.cts +1 -1
- package/types/flex/index.d.ts +1 -1
- package/types/form/form.d.cts +1 -1
- package/types/form/form.d.ts +1 -1
- package/types/grid/grid-item.d.cts +1 -1
- package/types/grid/grid-item.d.ts +1 -1
- package/types/grid/grid.d.cts +1 -1
- package/types/grid/grid.d.ts +1 -1
- package/types/icon/index.d.cts +1 -1
- package/types/icon/index.d.ts +1 -1
- package/types/image/group.d.cts +1 -1
- package/types/image/group.d.ts +1 -1
- package/types/image/image.d.cts +1 -1
- package/types/image/image.d.ts +1 -1
- package/types/input/index.d.cts +1 -1
- package/types/input/index.d.ts +1 -1
- package/types/input/input-box.d.cts +1 -1
- package/types/input/input-box.d.ts +1 -1
- package/types/input/input-group.d.cts +1 -1
- package/types/input/input-group.d.ts +1 -1
- package/types/input/input.d.cts +1 -1
- package/types/input/input.d.ts +1 -1
- package/types/input/textarea.d.cts +1 -1
- package/types/input/textarea.d.ts +1 -1
- package/types/input-number/index.d.cts +1 -1
- package/types/input-number/index.d.ts +1 -1
- package/types/input-otp/index.d.cts +1 -1
- package/types/input-otp/index.d.ts +1 -1
- package/types/input-tag/index.d.cts +1 -1
- package/types/input-tag/index.d.ts +1 -1
- package/types/kanban/index.d.cts +1 -1
- package/types/kanban/index.d.ts +1 -1
- package/types/layout/index.d.cts +2 -2
- package/types/layout/index.d.ts +2 -2
- package/types/list-panel/index.d.cts +1 -1
- package/types/list-panel/index.d.ts +1 -1
- package/types/mentions/index.d.cts +1 -1
- package/types/mentions/index.d.ts +1 -1
- package/types/menu/menu.d.cts +1 -2
- package/types/menu/menu.d.ts +1 -2
- package/types/modal/modal.d.cts +1 -2
- package/types/modal/modal.d.ts +1 -2
- package/types/page/index.d.cts +1 -1
- package/types/page/index.d.ts +1 -1
- package/types/page-header/index.d.cts +1 -1
- package/types/page-header/index.d.ts +1 -1
- package/types/popconfirm/index.d.cts +1 -2
- package/types/popconfirm/index.d.ts +1 -2
- package/types/poptip/index.d.cts +1 -2
- package/types/poptip/index.d.ts +1 -2
- package/types/popup/index.d.cts +48 -0
- package/types/popup/index.d.ts +48 -0
- package/types/popup/layers.d.cts +9 -0
- package/types/popup/layers.d.ts +9 -0
- package/types/popup/types.d.cts +15 -0
- package/types/popup/types.d.ts +15 -0
- package/types/progress/index.d.cts +1 -1
- package/types/progress/index.d.ts +1 -1
- package/types/qrcode/index.d.cts +1 -1
- package/types/qrcode/index.d.ts +1 -1
- package/types/radio/index.d.cts +1 -0
- package/types/radio/index.d.ts +1 -0
- package/types/radio/radio-button.d.cts +1 -2
- package/types/radio/radio-button.d.ts +1 -2
- package/types/radio/radio-group.d.cts +1 -1
- package/types/radio/radio-group.d.ts +1 -1
- package/types/radio/radio.d.cts +1 -2
- package/types/radio/radio.d.ts +1 -2
- package/types/rate/index.d.cts +1 -1
- package/types/rate/index.d.ts +1 -1
- package/types/result/index.d.cts +1 -1
- package/types/result/index.d.ts +1 -1
- package/types/row-col/col.d.cts +1 -1
- package/types/row-col/col.d.ts +1 -1
- package/types/row-col/row.d.cts +1 -1
- package/types/row-col/row.d.ts +1 -1
- package/types/segmented/index.d.cts +1 -1
- package/types/segmented/index.d.ts +1 -1
- package/types/select/index.d.cts +2 -2
- package/types/select/index.d.ts +2 -2
- package/types/select/option.d.cts +1 -1
- package/types/select/option.d.ts +1 -1
- package/types/select/select.d.cts +1 -2
- package/types/select/select.d.ts +1 -2
- package/types/skeleton/skeleton-avatar.d.cts +1 -1
- package/types/skeleton/skeleton-avatar.d.ts +1 -1
- package/types/skeleton/skeleton-button.d.cts +1 -1
- package/types/skeleton/skeleton-button.d.ts +1 -1
- package/types/skeleton/skeleton-image.d.cts +1 -1
- package/types/skeleton/skeleton-image.d.ts +1 -1
- package/types/skeleton/skeleton-text.d.cts +1 -1
- package/types/skeleton/skeleton-text.d.ts +1 -1
- package/types/skeleton/skeleton.d.cts +1 -1
- package/types/skeleton/skeleton.d.ts +1 -1
- package/types/slider/index.d.cts +1 -1
- package/types/slider/index.d.ts +1 -1
- package/types/space/index.d.cts +1 -1
- package/types/space/index.d.ts +1 -1
- package/types/spin/index.d.cts +1 -1
- package/types/spin/index.d.ts +1 -1
- package/types/splitter/splitter-panel.d.cts +1 -1
- package/types/splitter/splitter-panel.d.ts +1 -1
- package/types/splitter/splitter.d.cts +1 -1
- package/types/splitter/splitter.d.ts +1 -1
- package/types/stat-card/countup.d.cts +1 -1
- package/types/stat-card/countup.d.ts +1 -1
- package/types/stat-card/rollup.d.cts +3 -2
- package/types/stat-card/rollup.d.ts +3 -2
- package/types/stat-card/stat-card.d.cts +1 -1
- package/types/stat-card/stat-card.d.ts +1 -1
- package/types/stat-card/stat-number.d.cts +1 -1
- package/types/stat-card/stat-number.d.ts +1 -1
- package/types/stat-card/utils/countup.d.cts +1 -1
- package/types/stat-card/utils/countup.d.ts +1 -1
- package/types/stat-card/utils/odometer.d.cts +7 -4
- package/types/stat-card/utils/odometer.d.ts +7 -4
- package/types/steps/index.d.cts +1 -1
- package/types/steps/index.d.ts +1 -1
- package/types/switch/index.d.cts +1 -2
- package/types/switch/index.d.ts +1 -2
- package/types/table/index.d.cts +1 -1
- package/types/table/index.d.ts +1 -1
- package/types/table/types.d.cts +2 -4
- package/types/table/types.d.ts +2 -4
- package/types/tabs/index.d.cts +1 -0
- package/types/tabs/index.d.ts +1 -0
- package/types/tabs/tab-panel.d.cts +1 -1
- package/types/tabs/tab-panel.d.ts +1 -1
- package/types/tabs/tabs.d.cts +1 -1
- package/types/tabs/tabs.d.ts +1 -1
- package/types/tag/index.d.cts +2 -1
- package/types/tag/index.d.ts +2 -1
- package/types/time-line/timeline-item.d.cts +1 -1
- package/types/time-line/timeline-item.d.ts +1 -1
- package/types/time-line/timeline.d.cts +1 -1
- package/types/time-line/timeline.d.ts +1 -1
- package/types/tooltip/index.d.cts +2 -2
- package/types/tooltip/index.d.ts +2 -2
- package/types/tour/index.d.cts +0 -2
- package/types/tour/index.d.ts +0 -2
- package/types/transfer/index.d.cts +2 -3
- package/types/transfer/index.d.ts +2 -3
- package/types/tree/index.d.cts +2 -4
- package/types/tree/index.d.ts +2 -4
- package/types/tree-select/index.d.cts +2 -3
- package/types/tree-select/index.d.ts +2 -3
- package/types/typography/index.d.cts +1 -1
- package/types/typography/index.d.ts +1 -1
- package/types/upload/index.d.cts +1 -2
- package/types/upload/index.d.ts +1 -2
- package/types/upload/selector.d.cts +1 -1
- package/types/upload/selector.d.ts +1 -1
- package/types/utils/popup.d.cts +11 -0
- package/types/utils/popup.d.ts +11 -0
- package/types/utils/selection-tags.d.cts +19 -0
- package/types/utils/selection-tags.d.ts +19 -0
- package/types/virtual-list/index.d.cts +1 -1
- package/types/virtual-list/index.d.ts +1 -1
- package/types/watermark/index.d.cts +1 -1
- package/types/watermark/index.d.ts +1 -1
package/es/tour/index.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* react-kui v3.
|
|
2
|
+
* react-kui v3.1.0
|
|
3
3
|
* Copyright 2017-present, kui-react.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Homepage: https://react.k-ui.cn
|
|
6
6
|
* Author: Qiu / https://chuchur.com
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { X } from "../node_modules/.pnpm/kui-icons@5.0.0/node_modules/kui-icons/dist/kui-icons.esm.js";
|
|
10
|
-
import { toggleContainerScroll } from "../utils/react-node.js";
|
|
11
|
-
import Button from "../button/button.js";
|
|
12
9
|
import Teleport from "../base/teleport.js";
|
|
13
10
|
import { Transition } from "../base/transition.js";
|
|
11
|
+
import { toggleContainerScroll } from "../utils/react-node.js";
|
|
12
|
+
import { X } from "../node_modules/.pnpm/kui-icons@5.0.0/node_modules/kui-icons/dist/kui-icons.esm.js";
|
|
13
|
+
import { useValue } from "../utils/use-value.js";
|
|
14
|
+
import Button from "../button/button.js";
|
|
14
15
|
import { c } from "react/compiler-runtime";
|
|
15
16
|
import clsx from "clsx";
|
|
16
17
|
import { useEffect, useState } from "react";
|
|
@@ -18,44 +19,42 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
18
19
|
//#region components/tour/index.tsx
|
|
19
20
|
var Tour = (t0) => {
|
|
20
21
|
const $ = c(82);
|
|
21
|
-
const { open,
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const [innerOpen, setInnerOpen] = useState(defaultOpen);
|
|
27
|
-
const [innerCurrent, setInnerCurrent] = useState(defaultCurrent);
|
|
22
|
+
const { open, current, steps, mask: t1, closable: t2, onChange, onOpenChange, onFinish } = t0;
|
|
23
|
+
const mask = t1 === void 0 ? true : t1;
|
|
24
|
+
const closable = t2 === void 0 ? true : t2;
|
|
25
|
+
const [innerOpen, setInnerOpen] = useValue(open, _temp);
|
|
26
|
+
const [innerCurrent, setInnerCurrent] = useValue(current, _temp2);
|
|
28
27
|
const [, refresh] = useState(0);
|
|
29
|
-
const visible =
|
|
28
|
+
const visible = innerOpen;
|
|
30
29
|
const [rendered, setRendered] = useState(visible);
|
|
31
30
|
const [previousVisible, setPreviousVisible] = useState(visible);
|
|
32
31
|
if (previousVisible !== visible) {
|
|
33
32
|
setPreviousVisible(visible);
|
|
34
33
|
if (visible) setRendered(true);
|
|
35
34
|
}
|
|
36
|
-
const index =
|
|
35
|
+
const index = innerCurrent;
|
|
37
36
|
const step = steps[index];
|
|
38
|
-
let
|
|
39
|
-
let
|
|
37
|
+
let t3;
|
|
38
|
+
let t4;
|
|
40
39
|
if ($[0] !== visible) {
|
|
41
|
-
|
|
40
|
+
t3 = () => {
|
|
42
41
|
toggleContainerScroll(document.body, visible);
|
|
43
|
-
return
|
|
42
|
+
return _temp3;
|
|
44
43
|
};
|
|
45
|
-
|
|
44
|
+
t4 = [visible];
|
|
46
45
|
$[0] = visible;
|
|
47
|
-
$[1] =
|
|
48
|
-
$[2] =
|
|
46
|
+
$[1] = t3;
|
|
47
|
+
$[2] = t4;
|
|
49
48
|
} else {
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
t3 = $[1];
|
|
50
|
+
t4 = $[2];
|
|
52
51
|
}
|
|
53
|
-
useEffect(
|
|
54
|
-
let
|
|
52
|
+
useEffect(t3, t4);
|
|
53
|
+
let t5;
|
|
55
54
|
if ($[3] !== refresh || $[4] !== visible) {
|
|
56
|
-
|
|
55
|
+
t5 = () => {
|
|
57
56
|
if (!visible) return;
|
|
58
|
-
const update = () => refresh(
|
|
57
|
+
const update = () => refresh(_temp4);
|
|
59
58
|
window.addEventListener("resize", update);
|
|
60
59
|
window.addEventListener("scroll", update, true);
|
|
61
60
|
return () => {
|
|
@@ -65,56 +64,56 @@ var Tour = (t0) => {
|
|
|
65
64
|
};
|
|
66
65
|
$[3] = refresh;
|
|
67
66
|
$[4] = visible;
|
|
68
|
-
$[5] =
|
|
69
|
-
} else
|
|
70
|
-
let
|
|
67
|
+
$[5] = t5;
|
|
68
|
+
} else t5 = $[5];
|
|
69
|
+
let t6;
|
|
71
70
|
if ($[6] !== visible) {
|
|
72
|
-
|
|
71
|
+
t6 = [visible];
|
|
73
72
|
$[6] = visible;
|
|
74
|
-
$[7] =
|
|
75
|
-
} else
|
|
76
|
-
useEffect(
|
|
73
|
+
$[7] = t6;
|
|
74
|
+
} else t6 = $[7];
|
|
75
|
+
useEffect(t5, t6);
|
|
77
76
|
if (!rendered || !step || typeof document === "undefined") return null;
|
|
78
|
-
let
|
|
77
|
+
let t7;
|
|
79
78
|
if ($[8] !== step) {
|
|
80
|
-
|
|
79
|
+
t7 = typeof step.target === "function" ? step.target() : step.target;
|
|
81
80
|
$[8] = step;
|
|
82
|
-
$[9] =
|
|
83
|
-
} else
|
|
84
|
-
const target =
|
|
85
|
-
let
|
|
81
|
+
$[9] = t7;
|
|
82
|
+
} else t7 = $[9];
|
|
83
|
+
const target = t7;
|
|
84
|
+
let t8;
|
|
86
85
|
if ($[10] !== target) {
|
|
87
|
-
|
|
86
|
+
t8 = target?.getBoundingClientRect();
|
|
88
87
|
$[10] = target;
|
|
89
|
-
$[11] =
|
|
90
|
-
} else
|
|
91
|
-
const rect =
|
|
88
|
+
$[11] = t8;
|
|
89
|
+
} else t8 = $[11];
|
|
90
|
+
const rect = t8;
|
|
92
91
|
const placement = step.placement ?? "bottom";
|
|
93
|
-
let
|
|
94
|
-
if ($[12] !== onOpenChange || $[13] !==
|
|
95
|
-
|
|
96
|
-
|
|
92
|
+
let t9;
|
|
93
|
+
if ($[12] !== onOpenChange || $[13] !== setInnerOpen) {
|
|
94
|
+
t9 = () => {
|
|
95
|
+
setInnerOpen(false);
|
|
97
96
|
onOpenChange?.(false);
|
|
98
97
|
};
|
|
99
98
|
$[12] = onOpenChange;
|
|
100
|
-
$[13] =
|
|
101
|
-
$[14] =
|
|
102
|
-
} else
|
|
103
|
-
const close =
|
|
104
|
-
let
|
|
105
|
-
if ($[15] !==
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
onChange?.(
|
|
99
|
+
$[13] = setInnerOpen;
|
|
100
|
+
$[14] = t9;
|
|
101
|
+
} else t9 = $[14];
|
|
102
|
+
const close = t9;
|
|
103
|
+
let t10;
|
|
104
|
+
if ($[15] !== onChange || $[16] !== setInnerCurrent) {
|
|
105
|
+
t10 = (next_1) => {
|
|
106
|
+
setInnerCurrent(next_1);
|
|
107
|
+
onChange?.(next_1);
|
|
109
108
|
};
|
|
110
|
-
$[15] =
|
|
111
|
-
$[16] =
|
|
112
|
-
$[17] =
|
|
113
|
-
} else
|
|
114
|
-
const go =
|
|
115
|
-
let
|
|
109
|
+
$[15] = onChange;
|
|
110
|
+
$[16] = setInnerCurrent;
|
|
111
|
+
$[17] = t10;
|
|
112
|
+
} else t10 = $[17];
|
|
113
|
+
const go = t10;
|
|
114
|
+
let t11;
|
|
116
115
|
if ($[18] !== placement || $[19] !== rect) {
|
|
117
|
-
|
|
116
|
+
t11 = rect ? placement === "top" ? {
|
|
118
117
|
left: rect.left + rect.width / 2,
|
|
119
118
|
top: rect.top - 12,
|
|
120
119
|
transform: "translate(-50%, -100%)"
|
|
@@ -137,19 +136,19 @@ var Tour = (t0) => {
|
|
|
137
136
|
};
|
|
138
137
|
$[18] = placement;
|
|
139
138
|
$[19] = rect;
|
|
140
|
-
$[20] =
|
|
141
|
-
} else
|
|
142
|
-
const panelStyle =
|
|
143
|
-
let
|
|
139
|
+
$[20] = t11;
|
|
140
|
+
} else t11 = $[20];
|
|
141
|
+
const panelStyle = t11;
|
|
142
|
+
let t12;
|
|
144
143
|
if ($[21] !== mask || $[22] !== rect) {
|
|
145
|
-
|
|
144
|
+
t12 = mask && /* @__PURE__ */ jsx("div", { className: clsx("k-tour-mask", { "k-tour-mask-spotlight": !!rect }) });
|
|
146
145
|
$[21] = mask;
|
|
147
146
|
$[22] = rect;
|
|
148
|
-
$[23] =
|
|
149
|
-
} else
|
|
150
|
-
let
|
|
147
|
+
$[23] = t12;
|
|
148
|
+
} else t12 = $[23];
|
|
149
|
+
let t13;
|
|
151
150
|
if ($[24] !== mask || $[25] !== rect) {
|
|
152
|
-
|
|
151
|
+
t13 = mask && rect && /* @__PURE__ */ jsx("div", {
|
|
153
152
|
className: "k-tour-focus",
|
|
154
153
|
style: {
|
|
155
154
|
left: rect.left - 5,
|
|
@@ -160,51 +159,51 @@ var Tour = (t0) => {
|
|
|
160
159
|
});
|
|
161
160
|
$[24] = mask;
|
|
162
161
|
$[25] = rect;
|
|
163
|
-
$[26] =
|
|
164
|
-
} else
|
|
165
|
-
let
|
|
166
|
-
if ($[27] !==
|
|
167
|
-
|
|
162
|
+
$[26] = t13;
|
|
163
|
+
} else t13 = $[26];
|
|
164
|
+
let t14;
|
|
165
|
+
if ($[27] !== t12 || $[28] !== t13) {
|
|
166
|
+
t14 = /* @__PURE__ */ jsxs("div", {
|
|
168
167
|
className: "k-tour-overlay",
|
|
169
|
-
children: [
|
|
168
|
+
children: [t12, t13]
|
|
170
169
|
});
|
|
171
|
-
$[27] =
|
|
172
|
-
$[28] =
|
|
173
|
-
$[29] =
|
|
174
|
-
} else
|
|
175
|
-
let
|
|
176
|
-
if ($[30] !==
|
|
177
|
-
|
|
170
|
+
$[27] = t12;
|
|
171
|
+
$[28] = t13;
|
|
172
|
+
$[29] = t14;
|
|
173
|
+
} else t14 = $[29];
|
|
174
|
+
let t15;
|
|
175
|
+
if ($[30] !== t14 || $[31] !== visible) {
|
|
176
|
+
t15 = /* @__PURE__ */ jsx(Transition, {
|
|
178
177
|
show: visible,
|
|
179
178
|
name: "k-modal-fade",
|
|
180
179
|
appear: true,
|
|
181
|
-
children:
|
|
180
|
+
children: t14
|
|
182
181
|
});
|
|
183
|
-
$[30] =
|
|
182
|
+
$[30] = t14;
|
|
184
183
|
$[31] = visible;
|
|
185
|
-
$[32] =
|
|
186
|
-
} else
|
|
187
|
-
const
|
|
184
|
+
$[32] = t15;
|
|
185
|
+
} else t15 = $[32];
|
|
186
|
+
const t16 = `k-tour-${placement}`;
|
|
187
|
+
let t17;
|
|
188
|
+
if ($[33] !== t16) {
|
|
189
|
+
t17 = clsx("k-tour-panel", t16);
|
|
190
|
+
$[33] = t16;
|
|
191
|
+
$[34] = t17;
|
|
192
|
+
} else t17 = $[34];
|
|
193
|
+
const t18 = visible ? void 0 : "none";
|
|
188
194
|
let t19;
|
|
189
|
-
if ($[
|
|
190
|
-
t19 =
|
|
191
|
-
$[33] = t18;
|
|
192
|
-
$[34] = t19;
|
|
193
|
-
} else t19 = $[34];
|
|
194
|
-
const t20 = visible ? void 0 : "none";
|
|
195
|
-
let t21;
|
|
196
|
-
if ($[35] !== panelStyle || $[36] !== t20) {
|
|
197
|
-
t21 = {
|
|
195
|
+
if ($[35] !== panelStyle || $[36] !== t18) {
|
|
196
|
+
t19 = {
|
|
198
197
|
...panelStyle,
|
|
199
|
-
display:
|
|
198
|
+
display: t18
|
|
200
199
|
};
|
|
201
200
|
$[35] = panelStyle;
|
|
202
|
-
$[36] =
|
|
203
|
-
$[37] =
|
|
204
|
-
} else
|
|
205
|
-
let
|
|
201
|
+
$[36] = t18;
|
|
202
|
+
$[37] = t19;
|
|
203
|
+
} else t19 = $[37];
|
|
204
|
+
let t20;
|
|
206
205
|
if ($[38] !== rect) {
|
|
207
|
-
|
|
206
|
+
t20 = rect && /* @__PURE__ */ jsx("div", {
|
|
208
207
|
className: "k-tour-arrow",
|
|
209
208
|
"aria-hidden": "true",
|
|
210
209
|
children: /* @__PURE__ */ jsxs("svg", {
|
|
@@ -219,11 +218,11 @@ var Tour = (t0) => {
|
|
|
219
218
|
})
|
|
220
219
|
});
|
|
221
220
|
$[38] = rect;
|
|
222
|
-
$[39] =
|
|
223
|
-
} else
|
|
224
|
-
let
|
|
221
|
+
$[39] = t20;
|
|
222
|
+
} else t20 = $[39];
|
|
223
|
+
let t21;
|
|
225
224
|
if ($[40] !== closable || $[41] !== close) {
|
|
226
|
-
|
|
225
|
+
t21 = closable && /* @__PURE__ */ jsx(Button, {
|
|
227
226
|
className: "k-tour-close",
|
|
228
227
|
type: "text",
|
|
229
228
|
size: "small",
|
|
@@ -233,58 +232,58 @@ var Tour = (t0) => {
|
|
|
233
232
|
});
|
|
234
233
|
$[40] = closable;
|
|
235
234
|
$[41] = close;
|
|
236
|
-
$[42] =
|
|
237
|
-
} else
|
|
238
|
-
let
|
|
235
|
+
$[42] = t21;
|
|
236
|
+
} else t21 = $[42];
|
|
237
|
+
let t22;
|
|
239
238
|
if ($[43] !== step.cover) {
|
|
240
|
-
|
|
239
|
+
t22 = step.cover && /* @__PURE__ */ jsx("div", {
|
|
241
240
|
className: "k-tour-cover",
|
|
242
241
|
children: step.cover
|
|
243
242
|
});
|
|
244
243
|
$[43] = step.cover;
|
|
245
|
-
$[44] =
|
|
246
|
-
} else
|
|
247
|
-
let
|
|
244
|
+
$[44] = t22;
|
|
245
|
+
} else t22 = $[44];
|
|
246
|
+
let t23;
|
|
248
247
|
if ($[45] !== step.title) {
|
|
249
|
-
|
|
248
|
+
t23 = step.title && /* @__PURE__ */ jsx("h3", { children: step.title });
|
|
250
249
|
$[45] = step.title;
|
|
251
|
-
$[46] =
|
|
252
|
-
} else
|
|
253
|
-
let
|
|
250
|
+
$[46] = t23;
|
|
251
|
+
} else t23 = $[46];
|
|
252
|
+
let t24;
|
|
254
253
|
if ($[47] !== step.description) {
|
|
255
|
-
|
|
254
|
+
t24 = /* @__PURE__ */ jsx("div", {
|
|
256
255
|
className: "k-tour-description",
|
|
257
256
|
children: step.description
|
|
258
257
|
});
|
|
259
258
|
$[47] = step.description;
|
|
260
|
-
$[48] =
|
|
261
|
-
} else
|
|
262
|
-
const
|
|
263
|
-
let
|
|
264
|
-
if ($[49] !== steps.length || $[50] !==
|
|
265
|
-
|
|
266
|
-
|
|
259
|
+
$[48] = t24;
|
|
260
|
+
} else t24 = $[48];
|
|
261
|
+
const t25 = index + 1;
|
|
262
|
+
let t26;
|
|
263
|
+
if ($[49] !== steps.length || $[50] !== t25) {
|
|
264
|
+
t26 = /* @__PURE__ */ jsxs("span", { children: [
|
|
265
|
+
t25,
|
|
267
266
|
" / ",
|
|
268
267
|
steps.length
|
|
269
268
|
] });
|
|
270
269
|
$[49] = steps.length;
|
|
271
|
-
$[50] =
|
|
272
|
-
$[51] =
|
|
273
|
-
} else
|
|
274
|
-
let
|
|
270
|
+
$[50] = t25;
|
|
271
|
+
$[51] = t26;
|
|
272
|
+
} else t26 = $[51];
|
|
273
|
+
let t27;
|
|
275
274
|
if ($[52] !== go || $[53] !== index) {
|
|
276
|
-
|
|
275
|
+
t27 = index > 0 && /* @__PURE__ */ jsx(Button, {
|
|
277
276
|
size: "small",
|
|
278
277
|
onClick: () => go(index - 1),
|
|
279
278
|
children: "上一步"
|
|
280
279
|
});
|
|
281
280
|
$[52] = go;
|
|
282
281
|
$[53] = index;
|
|
283
|
-
$[54] =
|
|
284
|
-
} else
|
|
285
|
-
let
|
|
282
|
+
$[54] = t27;
|
|
283
|
+
} else t27 = $[54];
|
|
284
|
+
let t28;
|
|
286
285
|
if ($[55] !== close || $[56] !== go || $[57] !== index || $[58] !== onFinish || $[59] !== steps.length) {
|
|
287
|
-
|
|
286
|
+
t28 = () => {
|
|
288
287
|
if (index < steps.length - 1) go(index + 1);
|
|
289
288
|
else {
|
|
290
289
|
onFinish?.();
|
|
@@ -296,83 +295,89 @@ var Tour = (t0) => {
|
|
|
296
295
|
$[57] = index;
|
|
297
296
|
$[58] = onFinish;
|
|
298
297
|
$[59] = steps.length;
|
|
299
|
-
$[60] =
|
|
300
|
-
} else
|
|
301
|
-
const
|
|
302
|
-
let
|
|
303
|
-
if ($[61] !==
|
|
304
|
-
|
|
298
|
+
$[60] = t28;
|
|
299
|
+
} else t28 = $[60];
|
|
300
|
+
const t29 = index < steps.length - 1 ? "下一步" : "完成";
|
|
301
|
+
let t30;
|
|
302
|
+
if ($[61] !== t28 || $[62] !== t29) {
|
|
303
|
+
t30 = /* @__PURE__ */ jsx(Button, {
|
|
305
304
|
size: "small",
|
|
306
305
|
type: "primary",
|
|
307
|
-
onClick:
|
|
308
|
-
children:
|
|
306
|
+
onClick: t28,
|
|
307
|
+
children: t29
|
|
309
308
|
});
|
|
310
|
-
$[61] =
|
|
311
|
-
$[62] =
|
|
312
|
-
$[63] =
|
|
313
|
-
} else
|
|
314
|
-
let
|
|
315
|
-
if ($[64] !==
|
|
316
|
-
|
|
309
|
+
$[61] = t28;
|
|
310
|
+
$[62] = t29;
|
|
311
|
+
$[63] = t30;
|
|
312
|
+
} else t30 = $[63];
|
|
313
|
+
let t31;
|
|
314
|
+
if ($[64] !== t27 || $[65] !== t30) {
|
|
315
|
+
t31 = /* @__PURE__ */ jsxs("div", {
|
|
317
316
|
className: "k-tour-actions",
|
|
318
|
-
children: [
|
|
317
|
+
children: [t27, t30]
|
|
319
318
|
});
|
|
320
|
-
$[64] =
|
|
321
|
-
$[65] =
|
|
322
|
-
$[66] =
|
|
323
|
-
} else
|
|
324
|
-
let
|
|
325
|
-
if ($[67] !==
|
|
326
|
-
|
|
327
|
-
$[67] =
|
|
328
|
-
$[68] =
|
|
329
|
-
$[69] =
|
|
330
|
-
} else
|
|
331
|
-
let
|
|
332
|
-
if ($[70] !==
|
|
333
|
-
|
|
334
|
-
className:
|
|
335
|
-
style:
|
|
319
|
+
$[64] = t27;
|
|
320
|
+
$[65] = t30;
|
|
321
|
+
$[66] = t31;
|
|
322
|
+
} else t31 = $[66];
|
|
323
|
+
let t32;
|
|
324
|
+
if ($[67] !== t26 || $[68] !== t31) {
|
|
325
|
+
t32 = /* @__PURE__ */ jsxs("footer", { children: [t26, t31] });
|
|
326
|
+
$[67] = t26;
|
|
327
|
+
$[68] = t31;
|
|
328
|
+
$[69] = t32;
|
|
329
|
+
} else t32 = $[69];
|
|
330
|
+
let t33;
|
|
331
|
+
if ($[70] !== t17 || $[71] !== t19 || $[72] !== t20 || $[73] !== t21 || $[74] !== t22 || $[75] !== t23 || $[76] !== t24 || $[77] !== t32) {
|
|
332
|
+
t33 = /* @__PURE__ */ jsxs("section", {
|
|
333
|
+
className: t17,
|
|
334
|
+
style: t19,
|
|
336
335
|
role: "dialog",
|
|
337
336
|
"aria-modal": "true",
|
|
338
337
|
children: [
|
|
338
|
+
t20,
|
|
339
|
+
t21,
|
|
339
340
|
t22,
|
|
340
341
|
t23,
|
|
341
342
|
t24,
|
|
342
|
-
|
|
343
|
-
t26,
|
|
344
|
-
t34
|
|
343
|
+
t32
|
|
345
344
|
]
|
|
346
345
|
});
|
|
347
|
-
$[70] =
|
|
348
|
-
$[71] =
|
|
349
|
-
$[72] =
|
|
350
|
-
$[73] =
|
|
351
|
-
$[74] =
|
|
352
|
-
$[75] =
|
|
353
|
-
$[76] =
|
|
354
|
-
$[77] =
|
|
355
|
-
$[78] =
|
|
356
|
-
} else
|
|
357
|
-
let
|
|
358
|
-
if ($[79] !==
|
|
359
|
-
|
|
346
|
+
$[70] = t17;
|
|
347
|
+
$[71] = t19;
|
|
348
|
+
$[72] = t20;
|
|
349
|
+
$[73] = t21;
|
|
350
|
+
$[74] = t22;
|
|
351
|
+
$[75] = t23;
|
|
352
|
+
$[76] = t24;
|
|
353
|
+
$[77] = t32;
|
|
354
|
+
$[78] = t33;
|
|
355
|
+
} else t33 = $[78];
|
|
356
|
+
let t34;
|
|
357
|
+
if ($[79] !== t15 || $[80] !== t33) {
|
|
358
|
+
t34 = /* @__PURE__ */ jsx(Teleport, {
|
|
360
359
|
to: "body",
|
|
361
360
|
children: /* @__PURE__ */ jsxs("div", {
|
|
362
361
|
className: "k-tour-root",
|
|
363
|
-
children: [
|
|
362
|
+
children: [t15, t33]
|
|
364
363
|
})
|
|
365
364
|
});
|
|
366
|
-
$[79] =
|
|
367
|
-
$[80] =
|
|
368
|
-
$[81] =
|
|
369
|
-
} else
|
|
370
|
-
return
|
|
365
|
+
$[79] = t15;
|
|
366
|
+
$[80] = t33;
|
|
367
|
+
$[81] = t34;
|
|
368
|
+
} else t34 = $[81];
|
|
369
|
+
return t34;
|
|
371
370
|
};
|
|
372
|
-
function _temp() {
|
|
371
|
+
function _temp(next) {
|
|
372
|
+
return next ?? false;
|
|
373
|
+
}
|
|
374
|
+
function _temp2(next_0) {
|
|
375
|
+
return next_0 ?? 0;
|
|
376
|
+
}
|
|
377
|
+
function _temp3() {
|
|
373
378
|
return toggleContainerScroll(document.body, false);
|
|
374
379
|
}
|
|
375
|
-
function
|
|
380
|
+
function _temp4(n) {
|
|
376
381
|
return n + 1;
|
|
377
382
|
}
|
|
378
383
|
//#endregion
|