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/modal/modal.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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
|
|
@@ -8,10 +8,11 @@
|
|
|
8
8
|
|
|
9
9
|
import zh_CN_default from "../locale/zh-CN.js";
|
|
10
10
|
import { ConfigContext } from "../config/config-context.js";
|
|
11
|
-
import { X } from "../node_modules/.pnpm/kui-icons@5.0.0/node_modules/kui-icons/dist/kui-icons.esm.js";
|
|
12
|
-
import Button from "../button/button.js";
|
|
13
11
|
import Teleport from "../base/teleport.js";
|
|
14
12
|
import { Transition } from "../base/transition.js";
|
|
13
|
+
import { X } from "../node_modules/.pnpm/kui-icons@5.0.0/node_modules/kui-icons/dist/kui-icons.esm.js";
|
|
14
|
+
import { useValue } from "../utils/use-value.js";
|
|
15
|
+
import Button from "../button/button.js";
|
|
15
16
|
import { getMousePoint } from "../config/context.js";
|
|
16
17
|
import { c } from "react/compiler-runtime";
|
|
17
18
|
import clsx from "clsx";
|
|
@@ -20,23 +21,22 @@ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
|
20
21
|
//#region components/modal/modal.tsx
|
|
21
22
|
var Modal = (t0) => {
|
|
22
23
|
const $ = c(117);
|
|
23
|
-
const { className, open,
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
const panelOnly = t13 === void 0 ? false : t13;
|
|
24
|
+
const { className, open, title, okText, cancelText, width: t1, top: t2, mask: t3, maskClosable: t4, maximized: t5, centered: t6, draggable: t7, showClose: t8, loading: t9, footer: t10, escKey: t11, panelOnly: t12, onClose, onOk, onCancel, onOpenChange, onAfterClose, content, children } = t0;
|
|
25
|
+
const width = t1 === void 0 ? 520 : t1;
|
|
26
|
+
const top = t2 === void 0 ? 100 : t2;
|
|
27
|
+
const mask = t3 === void 0 ? true : t3;
|
|
28
|
+
const maskClosable = t4 === void 0 ? false : t4;
|
|
29
|
+
const maximized = t5 === void 0 ? false : t5;
|
|
30
|
+
const centered = t6 === void 0 ? false : t6;
|
|
31
|
+
const draggable = t7 === void 0 ? false : t7;
|
|
32
|
+
const showClose = t8 === void 0 ? true : t8;
|
|
33
|
+
const loading = t9 === void 0 ? false : t9;
|
|
34
|
+
const footer = t10 === void 0 ? true : t10;
|
|
35
|
+
const escKey = t11 === void 0 ? true : t11;
|
|
36
|
+
const panelOnly = t12 === void 0 ? false : t12;
|
|
37
37
|
const locale = useContext(ConfigContext)?.locale || zh_CN_default;
|
|
38
|
-
const [innerOpen, setInnerOpen] =
|
|
39
|
-
const currentOpen =
|
|
38
|
+
const [innerOpen, setInnerOpen] = useValue(open, _temp);
|
|
39
|
+
const currentOpen = innerOpen;
|
|
40
40
|
const [visible, setVisible] = useState(false);
|
|
41
41
|
const [showInner, setShowInner] = useState(false);
|
|
42
42
|
const [rendered, setRendered] = useState(false);
|
|
@@ -44,36 +44,36 @@ var Modal = (t0) => {
|
|
|
44
44
|
const [topPos, setTopPos] = useState(top);
|
|
45
45
|
const [isMousePressed, setIsMousePressed] = useState(false);
|
|
46
46
|
const [mousedownIn, setMousedownIn] = useState(false);
|
|
47
|
-
let
|
|
47
|
+
let t13;
|
|
48
48
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
49
|
-
|
|
49
|
+
t13 = {
|
|
50
50
|
x: 0,
|
|
51
51
|
y: 0
|
|
52
52
|
};
|
|
53
|
-
$[0] =
|
|
54
|
-
} else
|
|
55
|
-
const startPos = useRef(
|
|
53
|
+
$[0] = t13;
|
|
54
|
+
} else t13 = $[0];
|
|
55
|
+
const startPos = useRef(t13);
|
|
56
56
|
const refModal = useRef(null);
|
|
57
57
|
const refWrap = useRef(null);
|
|
58
58
|
const refHeader = useRef(null);
|
|
59
59
|
const previousActiveRef = useRef(null);
|
|
60
60
|
const hideTimerRef = useRef(null);
|
|
61
|
-
const getOffset =
|
|
62
|
-
let
|
|
61
|
+
const getOffset = _temp2;
|
|
62
|
+
let t14;
|
|
63
63
|
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
64
|
-
|
|
64
|
+
t14 = () => {
|
|
65
65
|
if (refModal.current) {
|
|
66
66
|
const { x, y } = getMousePoint();
|
|
67
67
|
const p = getOffset(refModal.current);
|
|
68
68
|
refModal.current.style.transformOrigin = `${x - p.left}px ${y - p.top}px`;
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
|
-
$[1] =
|
|
72
|
-
} else
|
|
73
|
-
const updateOrigin =
|
|
74
|
-
let
|
|
71
|
+
$[1] = t14;
|
|
72
|
+
} else t14 = $[1];
|
|
73
|
+
const updateOrigin = t14;
|
|
74
|
+
let t15;
|
|
75
75
|
if ($[2] !== draggable || $[3] !== rendered || $[4] !== top) {
|
|
76
|
-
|
|
76
|
+
t15 = (value) => {
|
|
77
77
|
if (!rendered && value) {
|
|
78
78
|
setRendered(true);
|
|
79
79
|
return;
|
|
@@ -100,24 +100,24 @@ var Modal = (t0) => {
|
|
|
100
100
|
$[2] = draggable;
|
|
101
101
|
$[3] = rendered;
|
|
102
102
|
$[4] = top;
|
|
103
|
-
$[5] =
|
|
104
|
-
} else
|
|
105
|
-
const toggle =
|
|
106
|
-
let
|
|
107
|
-
if ($[6] !== onOpenChange || $[7] !==
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
onOpenChange?.(
|
|
103
|
+
$[5] = t15;
|
|
104
|
+
} else t15 = $[5];
|
|
105
|
+
const toggle = t15;
|
|
106
|
+
let t16;
|
|
107
|
+
if ($[6] !== onOpenChange || $[7] !== setInnerOpen) {
|
|
108
|
+
t16 = (next_0) => {
|
|
109
|
+
setInnerOpen(next_0);
|
|
110
|
+
onOpenChange?.(next_0);
|
|
111
111
|
};
|
|
112
112
|
$[6] = onOpenChange;
|
|
113
|
-
$[7] =
|
|
114
|
-
$[8] =
|
|
115
|
-
} else
|
|
116
|
-
const requestOpen =
|
|
113
|
+
$[7] = setInnerOpen;
|
|
114
|
+
$[8] = t16;
|
|
115
|
+
} else t16 = $[8];
|
|
116
|
+
const requestOpen = t16;
|
|
117
|
+
let t17;
|
|
117
118
|
let t18;
|
|
118
|
-
let t19;
|
|
119
119
|
if ($[9] !== currentOpen || $[10] !== panelOnly || $[11] !== rendered || $[12] !== toggle || $[13] !== visible) {
|
|
120
|
-
|
|
120
|
+
t17 = () => {
|
|
121
121
|
if (panelOnly) return;
|
|
122
122
|
const timer = setTimeout(() => {
|
|
123
123
|
if (currentOpen && !rendered) {
|
|
@@ -127,7 +127,7 @@ var Modal = (t0) => {
|
|
|
127
127
|
}, 0);
|
|
128
128
|
return () => clearTimeout(timer);
|
|
129
129
|
};
|
|
130
|
-
|
|
130
|
+
t18 = [
|
|
131
131
|
currentOpen,
|
|
132
132
|
panelOnly,
|
|
133
133
|
toggle,
|
|
@@ -139,58 +139,58 @@ var Modal = (t0) => {
|
|
|
139
139
|
$[11] = rendered;
|
|
140
140
|
$[12] = toggle;
|
|
141
141
|
$[13] = visible;
|
|
142
|
-
$[14] =
|
|
143
|
-
$[15] =
|
|
142
|
+
$[14] = t17;
|
|
143
|
+
$[15] = t18;
|
|
144
144
|
} else {
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
t17 = $[14];
|
|
146
|
+
t18 = $[15];
|
|
147
147
|
}
|
|
148
|
-
useEffect(
|
|
148
|
+
useEffect(t17, t18);
|
|
149
|
+
let t19;
|
|
149
150
|
let t20;
|
|
150
|
-
let t21;
|
|
151
151
|
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
152
|
-
|
|
152
|
+
t19 = () => () => {
|
|
153
153
|
if (hideTimerRef.current) clearTimeout(hideTimerRef.current);
|
|
154
154
|
};
|
|
155
|
-
|
|
156
|
-
$[16] =
|
|
157
|
-
$[17] =
|
|
155
|
+
t20 = [];
|
|
156
|
+
$[16] = t19;
|
|
157
|
+
$[17] = t20;
|
|
158
158
|
} else {
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
t19 = $[16];
|
|
160
|
+
t20 = $[17];
|
|
161
161
|
}
|
|
162
|
-
useEffect(
|
|
163
|
-
let
|
|
162
|
+
useEffect(t19, t20);
|
|
163
|
+
let t21;
|
|
164
164
|
if ($[18] !== onClose || $[19] !== requestOpen) {
|
|
165
|
-
|
|
165
|
+
t21 = () => {
|
|
166
166
|
requestOpen(false);
|
|
167
167
|
onClose?.();
|
|
168
168
|
};
|
|
169
169
|
$[18] = onClose;
|
|
170
170
|
$[19] = requestOpen;
|
|
171
|
-
$[20] =
|
|
172
|
-
} else
|
|
173
|
-
const close =
|
|
174
|
-
let
|
|
171
|
+
$[20] = t21;
|
|
172
|
+
} else t21 = $[20];
|
|
173
|
+
const close = t21;
|
|
174
|
+
let t22;
|
|
175
175
|
if ($[21] !== close) {
|
|
176
|
-
|
|
176
|
+
t22 = (e) => {
|
|
177
177
|
if (e.key === "Escape") close();
|
|
178
178
|
};
|
|
179
179
|
$[21] = close;
|
|
180
|
-
$[22] =
|
|
181
|
-
} else
|
|
182
|
-
const escToClose =
|
|
180
|
+
$[22] = t22;
|
|
181
|
+
} else t22 = $[22];
|
|
182
|
+
const escToClose = t22;
|
|
183
|
+
let t23;
|
|
183
184
|
let t24;
|
|
184
|
-
let t25;
|
|
185
185
|
if ($[23] !== escKey || $[24] !== escToClose || $[25] !== panelOnly) {
|
|
186
|
-
|
|
186
|
+
t23 = () => {
|
|
187
187
|
if (panelOnly || !escKey) return;
|
|
188
188
|
document.addEventListener("keydown", escToClose);
|
|
189
189
|
return () => {
|
|
190
190
|
document.removeEventListener("keydown", escToClose);
|
|
191
191
|
};
|
|
192
192
|
};
|
|
193
|
-
|
|
193
|
+
t24 = [
|
|
194
194
|
escKey,
|
|
195
195
|
escToClose,
|
|
196
196
|
panelOnly
|
|
@@ -198,57 +198,57 @@ var Modal = (t0) => {
|
|
|
198
198
|
$[23] = escKey;
|
|
199
199
|
$[24] = escToClose;
|
|
200
200
|
$[25] = panelOnly;
|
|
201
|
-
$[26] =
|
|
202
|
-
$[27] =
|
|
201
|
+
$[26] = t23;
|
|
202
|
+
$[27] = t24;
|
|
203
203
|
} else {
|
|
204
|
-
|
|
205
|
-
|
|
204
|
+
t23 = $[26];
|
|
205
|
+
t24 = $[27];
|
|
206
206
|
}
|
|
207
|
-
useEffect(
|
|
208
|
-
let
|
|
207
|
+
useEffect(t23, t24);
|
|
208
|
+
let t25;
|
|
209
209
|
if ($[28] !== onOk) {
|
|
210
|
-
|
|
210
|
+
t25 = () => onOk?.();
|
|
211
211
|
$[28] = onOk;
|
|
212
|
-
$[29] =
|
|
213
|
-
} else
|
|
214
|
-
const ok =
|
|
215
|
-
let
|
|
212
|
+
$[29] = t25;
|
|
213
|
+
} else t25 = $[29];
|
|
214
|
+
const ok = t25;
|
|
215
|
+
let t26;
|
|
216
216
|
if ($[30] !== onCancel || $[31] !== requestOpen) {
|
|
217
|
-
|
|
217
|
+
t26 = () => {
|
|
218
218
|
requestOpen(false);
|
|
219
219
|
onCancel?.();
|
|
220
220
|
};
|
|
221
221
|
$[30] = onCancel;
|
|
222
222
|
$[31] = requestOpen;
|
|
223
|
-
$[32] =
|
|
224
|
-
} else
|
|
225
|
-
const cancel =
|
|
226
|
-
let
|
|
223
|
+
$[32] = t26;
|
|
224
|
+
} else t26 = $[32];
|
|
225
|
+
const cancel = t26;
|
|
226
|
+
let t27;
|
|
227
227
|
if ($[33] !== onAfterClose) {
|
|
228
|
-
|
|
228
|
+
t27 = () => {
|
|
229
229
|
previousActiveRef.current?.focus();
|
|
230
230
|
previousActiveRef.current = null;
|
|
231
231
|
onAfterClose?.();
|
|
232
232
|
};
|
|
233
233
|
$[33] = onAfterClose;
|
|
234
|
-
$[34] =
|
|
235
|
-
} else
|
|
236
|
-
const afterClose =
|
|
237
|
-
let
|
|
234
|
+
$[34] = t27;
|
|
235
|
+
} else t27 = $[34];
|
|
236
|
+
const afterClose = t27;
|
|
237
|
+
let t28;
|
|
238
238
|
if ($[35] !== close || $[36] !== loading || $[37] !== maskClosable || $[38] !== mousedownIn) {
|
|
239
|
-
|
|
239
|
+
t28 = (e_0) => {
|
|
240
240
|
if (!loading && maskClosable && !refModal.current?.contains(e_0.target) && !mousedownIn) close();
|
|
241
241
|
};
|
|
242
242
|
$[35] = close;
|
|
243
243
|
$[36] = loading;
|
|
244
244
|
$[37] = maskClosable;
|
|
245
245
|
$[38] = mousedownIn;
|
|
246
|
-
$[39] =
|
|
247
|
-
} else
|
|
248
|
-
const clickMaskToClose =
|
|
249
|
-
let
|
|
246
|
+
$[39] = t28;
|
|
247
|
+
} else t28 = $[39];
|
|
248
|
+
const clickMaskToClose = t28;
|
|
249
|
+
let t29;
|
|
250
250
|
if ($[40] !== draggable || $[41] !== isMousePressed) {
|
|
251
|
-
|
|
251
|
+
t29 = (e_1) => {
|
|
252
252
|
if (isMousePressed && draggable) {
|
|
253
253
|
const { x: x_0, y: y_0 } = startPos.current;
|
|
254
254
|
setLeftPos((prev) => prev + e_1.clientX - x_0);
|
|
@@ -263,20 +263,20 @@ var Modal = (t0) => {
|
|
|
263
263
|
};
|
|
264
264
|
$[40] = draggable;
|
|
265
265
|
$[41] = isMousePressed;
|
|
266
|
-
$[42] =
|
|
267
|
-
} else
|
|
268
|
-
const mousemove =
|
|
269
|
-
let
|
|
266
|
+
$[42] = t29;
|
|
267
|
+
} else t29 = $[42];
|
|
268
|
+
const mousemove = t29;
|
|
269
|
+
let t30;
|
|
270
270
|
if ($[43] === Symbol.for("react.memo_cache_sentinel")) {
|
|
271
|
-
|
|
271
|
+
t30 = () => {
|
|
272
272
|
setIsMousePressed(false);
|
|
273
273
|
};
|
|
274
|
-
$[43] =
|
|
275
|
-
} else
|
|
276
|
-
const mouseup =
|
|
277
|
-
let
|
|
274
|
+
$[43] = t30;
|
|
275
|
+
} else t30 = $[43];
|
|
276
|
+
const mouseup = t30;
|
|
277
|
+
let t31;
|
|
278
278
|
if ($[44] !== draggable || $[45] !== visible) {
|
|
279
|
-
|
|
279
|
+
t31 = (e_2) => {
|
|
280
280
|
if (e_2.button === 0 && draggable && refHeader.current && refHeader.current.contains(e_2.target)) {
|
|
281
281
|
setIsMousePressed(true);
|
|
282
282
|
startPos.current = {
|
|
@@ -288,13 +288,13 @@ var Modal = (t0) => {
|
|
|
288
288
|
};
|
|
289
289
|
$[44] = draggable;
|
|
290
290
|
$[45] = visible;
|
|
291
|
-
$[46] =
|
|
292
|
-
} else
|
|
293
|
-
const handleMouseDown =
|
|
291
|
+
$[46] = t31;
|
|
292
|
+
} else t31 = $[46];
|
|
293
|
+
const handleMouseDown = t31;
|
|
294
|
+
let t32;
|
|
294
295
|
let t33;
|
|
295
|
-
let t34;
|
|
296
296
|
if ($[47] !== handleMouseDown || $[48] !== mousemove || $[49] !== panelOnly) {
|
|
297
|
-
|
|
297
|
+
t32 = () => {
|
|
298
298
|
if (panelOnly) return;
|
|
299
299
|
document.addEventListener("mousedown", handleMouseDown);
|
|
300
300
|
document.addEventListener("mousemove", mousemove);
|
|
@@ -305,7 +305,7 @@ var Modal = (t0) => {
|
|
|
305
305
|
document.removeEventListener("mouseup", mouseup);
|
|
306
306
|
};
|
|
307
307
|
};
|
|
308
|
-
|
|
308
|
+
t33 = [
|
|
309
309
|
handleMouseDown,
|
|
310
310
|
mousemove,
|
|
311
311
|
mouseup,
|
|
@@ -314,20 +314,20 @@ var Modal = (t0) => {
|
|
|
314
314
|
$[47] = handleMouseDown;
|
|
315
315
|
$[48] = mousemove;
|
|
316
316
|
$[49] = panelOnly;
|
|
317
|
-
$[50] =
|
|
318
|
-
$[51] =
|
|
317
|
+
$[50] = t32;
|
|
318
|
+
$[51] = t33;
|
|
319
319
|
} else {
|
|
320
|
-
|
|
321
|
-
|
|
320
|
+
t32 = $[50];
|
|
321
|
+
t33 = $[51];
|
|
322
322
|
}
|
|
323
|
-
useEffect(
|
|
323
|
+
useEffect(t32, t33);
|
|
324
324
|
const okLabel = okText || locale?.k?.common?.ok;
|
|
325
325
|
const cancelLabel = cancelText || locale?.k?.common?.cancel;
|
|
326
326
|
let contentNode = content;
|
|
327
327
|
if (!contentNode) {
|
|
328
|
-
let
|
|
328
|
+
let t34;
|
|
329
329
|
if ($[52] !== cancel || $[53] !== cancelLabel || $[54] !== footer || $[55] !== loading || $[56] !== ok || $[57] !== okLabel) {
|
|
330
|
-
|
|
330
|
+
t34 = footer === true ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Button, {
|
|
331
331
|
onClick: cancel,
|
|
332
332
|
children: cancelLabel
|
|
333
333
|
}), /* @__PURE__ */ jsx(Button, {
|
|
@@ -342,12 +342,12 @@ var Modal = (t0) => {
|
|
|
342
342
|
$[55] = loading;
|
|
343
343
|
$[56] = ok;
|
|
344
344
|
$[57] = okLabel;
|
|
345
|
-
$[58] =
|
|
346
|
-
} else
|
|
347
|
-
const footerContent =
|
|
348
|
-
let
|
|
345
|
+
$[58] = t34;
|
|
346
|
+
} else t34 = $[58];
|
|
347
|
+
const footerContent = t34;
|
|
348
|
+
let t35;
|
|
349
349
|
if ($[59] !== close || $[60] !== showClose) {
|
|
350
|
-
|
|
350
|
+
t35 = showClose && /* @__PURE__ */ jsx(Button, {
|
|
351
351
|
icon: X,
|
|
352
352
|
size: "small",
|
|
353
353
|
onClick: close,
|
|
@@ -356,11 +356,11 @@ var Modal = (t0) => {
|
|
|
356
356
|
});
|
|
357
357
|
$[59] = close;
|
|
358
358
|
$[60] = showClose;
|
|
359
|
-
$[61] =
|
|
360
|
-
} else
|
|
361
|
-
let
|
|
359
|
+
$[61] = t35;
|
|
360
|
+
} else t35 = $[61];
|
|
361
|
+
let t36;
|
|
362
362
|
if ($[62] !== title) {
|
|
363
|
-
|
|
363
|
+
t36 = title !== void 0 && /* @__PURE__ */ jsx("div", {
|
|
364
364
|
className: "k-modal-header",
|
|
365
365
|
ref: refHeader,
|
|
366
366
|
children: /* @__PURE__ */ jsx("div", {
|
|
@@ -369,64 +369,64 @@ var Modal = (t0) => {
|
|
|
369
369
|
})
|
|
370
370
|
});
|
|
371
371
|
$[62] = title;
|
|
372
|
-
$[63] =
|
|
373
|
-
} else
|
|
374
|
-
let
|
|
372
|
+
$[63] = t36;
|
|
373
|
+
} else t36 = $[63];
|
|
374
|
+
let t37;
|
|
375
375
|
if ($[64] !== children) {
|
|
376
|
-
|
|
376
|
+
t37 = /* @__PURE__ */ jsx("div", {
|
|
377
377
|
className: "k-modal-body",
|
|
378
378
|
children
|
|
379
379
|
});
|
|
380
380
|
$[64] = children;
|
|
381
|
-
$[65] =
|
|
382
|
-
} else
|
|
383
|
-
let
|
|
381
|
+
$[65] = t37;
|
|
382
|
+
} else t37 = $[65];
|
|
383
|
+
let t38;
|
|
384
384
|
if ($[66] !== footer || $[67] !== footerContent) {
|
|
385
|
-
|
|
385
|
+
t38 = footer !== false && /* @__PURE__ */ jsx("div", {
|
|
386
386
|
className: "k-modal-footer",
|
|
387
387
|
children: footerContent
|
|
388
388
|
});
|
|
389
389
|
$[66] = footer;
|
|
390
390
|
$[67] = footerContent;
|
|
391
|
-
$[68] =
|
|
392
|
-
} else
|
|
393
|
-
let
|
|
394
|
-
if ($[69] !==
|
|
395
|
-
|
|
391
|
+
$[68] = t38;
|
|
392
|
+
} else t38 = $[68];
|
|
393
|
+
let t39;
|
|
394
|
+
if ($[69] !== t35 || $[70] !== t36 || $[71] !== t37 || $[72] !== t38) {
|
|
395
|
+
t39 = /* @__PURE__ */ jsxs("div", {
|
|
396
396
|
className: "k-modal-content",
|
|
397
397
|
tabIndex: 0,
|
|
398
398
|
children: [
|
|
399
|
+
t35,
|
|
399
400
|
t36,
|
|
400
401
|
t37,
|
|
401
|
-
t38
|
|
402
|
-
t39
|
|
402
|
+
t38
|
|
403
403
|
]
|
|
404
404
|
});
|
|
405
|
-
$[69] =
|
|
406
|
-
$[70] =
|
|
407
|
-
$[71] =
|
|
408
|
-
$[72] =
|
|
409
|
-
$[73] =
|
|
410
|
-
} else
|
|
411
|
-
contentNode =
|
|
405
|
+
$[69] = t35;
|
|
406
|
+
$[70] = t36;
|
|
407
|
+
$[71] = t37;
|
|
408
|
+
$[72] = t38;
|
|
409
|
+
$[73] = t39;
|
|
410
|
+
} else t39 = $[73];
|
|
411
|
+
contentNode = t39;
|
|
412
412
|
}
|
|
413
413
|
if (panelOnly) {
|
|
414
|
-
let
|
|
414
|
+
let t34;
|
|
415
415
|
if ($[74] !== className) {
|
|
416
|
-
|
|
416
|
+
t34 = clsx("k-modal", "k-modal-panel", className);
|
|
417
417
|
$[74] = className;
|
|
418
|
-
$[75] =
|
|
419
|
-
} else
|
|
420
|
-
const
|
|
418
|
+
$[75] = t34;
|
|
419
|
+
} else t34 = $[75];
|
|
420
|
+
const t35 = typeof width === "number" ? `${width}px` : width;
|
|
421
|
+
let t36;
|
|
422
|
+
if ($[76] !== t35) {
|
|
423
|
+
t36 = { width: t35 };
|
|
424
|
+
$[76] = t35;
|
|
425
|
+
$[77] = t36;
|
|
426
|
+
} else t36 = $[77];
|
|
421
427
|
let t37;
|
|
422
|
-
if ($[76] !== t36) {
|
|
423
|
-
t37 = { width: t36 };
|
|
424
|
-
$[76] = t36;
|
|
425
|
-
$[77] = t37;
|
|
426
|
-
} else t37 = $[77];
|
|
427
|
-
let t38;
|
|
428
428
|
if ($[78] !== contentNode) {
|
|
429
|
-
|
|
429
|
+
t37 = /* @__PURE__ */ jsx("div", {
|
|
430
430
|
className: "k-modal-wrap",
|
|
431
431
|
children: /* @__PURE__ */ jsx("div", {
|
|
432
432
|
className: "k-modal-inner",
|
|
@@ -434,25 +434,25 @@ var Modal = (t0) => {
|
|
|
434
434
|
})
|
|
435
435
|
});
|
|
436
436
|
$[78] = contentNode;
|
|
437
|
-
$[79] =
|
|
438
|
-
} else
|
|
439
|
-
let
|
|
440
|
-
if ($[80] !==
|
|
441
|
-
|
|
442
|
-
className:
|
|
443
|
-
style:
|
|
444
|
-
children:
|
|
437
|
+
$[79] = t37;
|
|
438
|
+
} else t37 = $[79];
|
|
439
|
+
let t38;
|
|
440
|
+
if ($[80] !== t34 || $[81] !== t36 || $[82] !== t37) {
|
|
441
|
+
t38 = /* @__PURE__ */ jsx("div", {
|
|
442
|
+
className: t34,
|
|
443
|
+
style: t36,
|
|
444
|
+
children: t37
|
|
445
445
|
});
|
|
446
|
-
$[80] =
|
|
447
|
-
$[81] =
|
|
448
|
-
$[82] =
|
|
449
|
-
$[83] =
|
|
450
|
-
} else
|
|
451
|
-
return
|
|
446
|
+
$[80] = t34;
|
|
447
|
+
$[81] = t36;
|
|
448
|
+
$[82] = t37;
|
|
449
|
+
$[83] = t38;
|
|
450
|
+
} else t38 = $[83];
|
|
451
|
+
return t38;
|
|
452
452
|
}
|
|
453
|
-
let
|
|
453
|
+
let t34;
|
|
454
454
|
if ($[84] !== draggable || $[85] !== leftPos || $[86] !== maximized || $[87] !== topPos || $[88] !== width) {
|
|
455
|
-
|
|
455
|
+
t34 = maximized ? null : {
|
|
456
456
|
width: typeof width === "number" ? `${width}px` : width,
|
|
457
457
|
top: `${topPos}px`,
|
|
458
458
|
left: draggable ? `${leftPos}px` : void 0
|
|
@@ -462,30 +462,30 @@ var Modal = (t0) => {
|
|
|
462
462
|
$[86] = maximized;
|
|
463
463
|
$[87] = topPos;
|
|
464
464
|
$[88] = width;
|
|
465
|
-
$[89] =
|
|
466
|
-
} else
|
|
467
|
-
const modalStyle =
|
|
468
|
-
const
|
|
469
|
-
let
|
|
470
|
-
if ($[90] !== centered || $[91] !== className || $[92] !== draggable || $[93] !== maximized || $[94] !==
|
|
471
|
-
|
|
465
|
+
$[89] = t34;
|
|
466
|
+
} else t34 = $[89];
|
|
467
|
+
const modalStyle = t34;
|
|
468
|
+
const t35 = footer !== false && footer != null;
|
|
469
|
+
let t36;
|
|
470
|
+
if ($[90] !== centered || $[91] !== className || $[92] !== draggable || $[93] !== maximized || $[94] !== t35) {
|
|
471
|
+
t36 = clsx("k-modal", className, {
|
|
472
472
|
"k-modal-draggable": draggable,
|
|
473
473
|
"k-modal-maximized": maximized,
|
|
474
474
|
"k-modal-centered": centered,
|
|
475
|
-
"k-modal-has-footer":
|
|
475
|
+
"k-modal-has-footer": t35
|
|
476
476
|
});
|
|
477
477
|
$[90] = centered;
|
|
478
478
|
$[91] = className;
|
|
479
479
|
$[92] = draggable;
|
|
480
480
|
$[93] = maximized;
|
|
481
|
-
$[94] =
|
|
482
|
-
$[95] =
|
|
483
|
-
} else
|
|
484
|
-
const classes =
|
|
481
|
+
$[94] = t35;
|
|
482
|
+
$[95] = t36;
|
|
483
|
+
} else t36 = $[95];
|
|
484
|
+
const classes = t36;
|
|
485
485
|
if (!rendered) return null;
|
|
486
|
-
let
|
|
486
|
+
let t37;
|
|
487
487
|
if ($[96] !== mask || $[97] !== visible) {
|
|
488
|
-
|
|
488
|
+
t37 = mask && /* @__PURE__ */ jsx(Transition, {
|
|
489
489
|
show: visible,
|
|
490
490
|
name: "k-modal-fade",
|
|
491
491
|
timeout: 400,
|
|
@@ -493,78 +493,78 @@ var Modal = (t0) => {
|
|
|
493
493
|
});
|
|
494
494
|
$[96] = mask;
|
|
495
495
|
$[97] = visible;
|
|
496
|
-
$[98] =
|
|
497
|
-
} else
|
|
498
|
-
const
|
|
499
|
-
let
|
|
500
|
-
if ($[99] !==
|
|
501
|
-
|
|
502
|
-
$[99] =
|
|
503
|
-
$[100] =
|
|
504
|
-
} else
|
|
505
|
-
const
|
|
506
|
-
let
|
|
496
|
+
$[98] = t37;
|
|
497
|
+
} else t37 = $[98];
|
|
498
|
+
const t38 = showInner ? void 0 : "none";
|
|
499
|
+
let t39;
|
|
500
|
+
if ($[99] !== t38) {
|
|
501
|
+
t39 = { display: t38 };
|
|
502
|
+
$[99] = t38;
|
|
503
|
+
$[100] = t39;
|
|
504
|
+
} else t39 = $[100];
|
|
505
|
+
const t40 = modalStyle || void 0;
|
|
506
|
+
let t41;
|
|
507
507
|
if ($[101] === Symbol.for("react.memo_cache_sentinel")) {
|
|
508
|
-
|
|
509
|
-
$[101] =
|
|
510
|
-
} else
|
|
511
|
-
let
|
|
512
|
-
if ($[102] !== contentNode || $[103] !==
|
|
513
|
-
|
|
508
|
+
t41 = /* @__PURE__ */ jsx("div", { tabIndex: 0 });
|
|
509
|
+
$[101] = t41;
|
|
510
|
+
} else t41 = $[101];
|
|
511
|
+
let t42;
|
|
512
|
+
if ($[102] !== contentNode || $[103] !== t40) {
|
|
513
|
+
t42 = /* @__PURE__ */ jsxs("div", {
|
|
514
514
|
ref: refModal,
|
|
515
515
|
className: "k-modal-inner",
|
|
516
|
-
style:
|
|
517
|
-
children: [contentNode,
|
|
516
|
+
style: t40,
|
|
517
|
+
children: [contentNode, t41]
|
|
518
518
|
});
|
|
519
519
|
$[102] = contentNode;
|
|
520
|
-
$[103] =
|
|
521
|
-
$[104] =
|
|
522
|
-
} else
|
|
523
|
-
let
|
|
524
|
-
if ($[105] !== afterClose || $[106] !==
|
|
525
|
-
|
|
520
|
+
$[103] = t40;
|
|
521
|
+
$[104] = t42;
|
|
522
|
+
} else t42 = $[104];
|
|
523
|
+
let t43;
|
|
524
|
+
if ($[105] !== afterClose || $[106] !== t42 || $[107] !== visible) {
|
|
525
|
+
t43 = /* @__PURE__ */ jsx(Transition, {
|
|
526
526
|
show: visible,
|
|
527
527
|
name: "k-modal-zoom",
|
|
528
528
|
timeout: 250,
|
|
529
529
|
onAfterLeave: afterClose,
|
|
530
|
-
children:
|
|
530
|
+
children: t42
|
|
531
531
|
});
|
|
532
532
|
$[105] = afterClose;
|
|
533
|
-
$[106] =
|
|
533
|
+
$[106] = t42;
|
|
534
534
|
$[107] = visible;
|
|
535
|
-
$[108] =
|
|
536
|
-
} else
|
|
537
|
-
let
|
|
538
|
-
if ($[109] !== clickMaskToClose || $[110] !==
|
|
539
|
-
|
|
535
|
+
$[108] = t43;
|
|
536
|
+
} else t43 = $[108];
|
|
537
|
+
let t44;
|
|
538
|
+
if ($[109] !== clickMaskToClose || $[110] !== t39 || $[111] !== t43) {
|
|
539
|
+
t44 = /* @__PURE__ */ jsx("div", {
|
|
540
540
|
ref: refWrap,
|
|
541
541
|
className: "k-modal-wrap",
|
|
542
542
|
tabIndex: -1,
|
|
543
543
|
role: "dialog",
|
|
544
|
-
style:
|
|
544
|
+
style: t39,
|
|
545
545
|
onClick: clickMaskToClose,
|
|
546
|
-
children:
|
|
546
|
+
children: t43
|
|
547
547
|
});
|
|
548
548
|
$[109] = clickMaskToClose;
|
|
549
|
-
$[110] =
|
|
550
|
-
$[111] =
|
|
551
|
-
$[112] =
|
|
552
|
-
} else
|
|
553
|
-
let
|
|
554
|
-
if ($[113] !== classes || $[114] !==
|
|
555
|
-
|
|
549
|
+
$[110] = t39;
|
|
550
|
+
$[111] = t43;
|
|
551
|
+
$[112] = t44;
|
|
552
|
+
} else t44 = $[112];
|
|
553
|
+
let t45;
|
|
554
|
+
if ($[113] !== classes || $[114] !== t37 || $[115] !== t44) {
|
|
555
|
+
t45 = /* @__PURE__ */ jsx(Teleport, {
|
|
556
556
|
to: "body",
|
|
557
557
|
children: /* @__PURE__ */ jsxs("div", {
|
|
558
558
|
className: classes,
|
|
559
|
-
children: [
|
|
559
|
+
children: [t37, t44]
|
|
560
560
|
})
|
|
561
561
|
});
|
|
562
562
|
$[113] = classes;
|
|
563
|
-
$[114] =
|
|
564
|
-
$[115] =
|
|
565
|
-
$[116] =
|
|
566
|
-
} else
|
|
567
|
-
return
|
|
563
|
+
$[114] = t37;
|
|
564
|
+
$[115] = t44;
|
|
565
|
+
$[116] = t45;
|
|
566
|
+
} else t45 = $[116];
|
|
567
|
+
return t45;
|
|
568
568
|
};
|
|
569
569
|
function ModalPanel(props) {
|
|
570
570
|
const $ = c(2);
|
|
@@ -579,7 +579,10 @@ function ModalPanel(props) {
|
|
|
579
579
|
} else t0 = $[1];
|
|
580
580
|
return t0;
|
|
581
581
|
}
|
|
582
|
-
function _temp(
|
|
582
|
+
function _temp(next) {
|
|
583
|
+
return next ?? false;
|
|
584
|
+
}
|
|
585
|
+
function _temp2(el) {
|
|
583
586
|
return {
|
|
584
587
|
left: el.offsetLeft,
|
|
585
588
|
top: el.offsetTop
|