react-kui 3.0.0 → 3.1.1
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.en-US.md +86 -1
- package/AI.md +68 -4
- package/ai/behaviors.json +114 -14
- package/ai/cli.mjs +180 -17
- package/ai/descriptions.json +446 -0
- package/ai/kui-components.json +4591 -3846
- package/ai/mcp.mjs +2 -189
- package/ai/query.mjs +195 -0
- package/ai/skills/react-kui/SKILL.md +41 -9
- package/ai/skills/react-kui/references/mcp.md +11 -1
- package/ai/skills/react-kui/references/react-to-vue.md +110 -0
- package/ai/skills/react-kui/references/vue-to-react.md +86 -0
- package/ai/validate.mjs +18 -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 +522 -274
- package/es/carousel/drag.js +169 -0
- 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-base.js +202 -0
- package/es/input/input-box.js +1 -1
- package/es/input/input-group.js +2 -2
- package/es/input/input.js +19 -188
- package/es/input/textarea.js +1 -1
- package/es/input-number/index.js +4 -4
- 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 +101 -78
- package/es/page/responsive.js +96 -0
- 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 +35 -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 +2 -1
- package/types/carousel/carousel.d.ts +2 -1
- package/types/carousel/drag.d.cts +19 -0
- package/types/carousel/drag.d.ts +19 -0
- 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-base.d.cts +31 -0
- package/types/input/input-base.d.ts +31 -0
- 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 +2 -25
- package/types/input/input.d.ts +2 -25
- 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 +2 -1
- package/types/page/index.d.ts +2 -1
- package/types/page/responsive.d.cts +1 -0
- package/types/page/responsive.d.ts +1 -0
- 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/typography/index.js
CHANGED
package/es/upload/file-list.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* react-kui v3.
|
|
2
|
+
* react-kui v3.1.1
|
|
3
3
|
* Copyright 2017-present, kui-react.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Homepage: https://react.k-ui.cn
|
|
@@ -106,12 +106,14 @@ function FileList(t0) {
|
|
|
106
106
|
size: "small",
|
|
107
107
|
icon: X,
|
|
108
108
|
title: "Cancel upload",
|
|
109
|
+
disabled,
|
|
109
110
|
onClick: () => onAbort?.(item)
|
|
110
111
|
}) : item.status === "error" ? /* @__PURE__ */ jsx(Button, {
|
|
111
112
|
type: "text",
|
|
112
113
|
size: "small",
|
|
113
114
|
icon: RotateCcw,
|
|
114
115
|
title: "Retry upload",
|
|
116
|
+
disabled,
|
|
115
117
|
onClick: () => onRetry?.(item)
|
|
116
118
|
}) : null),
|
|
117
119
|
!readOnly && /* @__PURE__ */ jsx(Button, {
|
package/es/upload/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* react-kui v3.
|
|
2
|
+
* react-kui v3.1.1
|
|
3
3
|
* Copyright 2017-present, kui-react.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Homepage: https://react.k-ui.cn
|
|
@@ -18,10 +18,10 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
18
18
|
var uploadUid = 0;
|
|
19
19
|
var createUploadUid = () => globalThis.crypto?.randomUUID?.() ?? `k-upload-${Date.now().toString(36)}-${uploadUid++}`;
|
|
20
20
|
var formatSize = (size) => size < 1024 ? `${size}B` : size < 1024 ** 2 ? `${(size / 1024).toFixed(2)}KB` : size < 1024 ** 3 ? `${(size / 1024 ** 2).toFixed(2)}MB` : `${(size / 1024 ** 3).toFixed(2)}GB`;
|
|
21
|
-
var Upload = forwardRef(function Upload({ method = "post", name = "file", action, type = "list", data = {}, disabled, readOnly, directory, multiple, accept, headers, withCredentials = false, timeout = 0, customRequest, parseResponse, showUploadList = true, transformFile, fileList,
|
|
21
|
+
var Upload = forwardRef(function Upload({ method = "post", name = "file", action, type = "list", data = {}, disabled, readOnly, directory, multiple, accept, headers, withCredentials = false, timeout = 0, customRequest, parseResponse, showUploadList = true, transformFile, fileList, autoTrigger = true, limit, minSize, maxSize, uploadText, uploadSubText, uploadIcon, draggable, sortable, preview = true, validateAccept = true, maxConcurrent = Infinity, onChange, onRemove, onSelectFiles, onExceed, onSizeError, onTypeError, onSort, onBeforeUpload, className, children, ...rest }, ref) {
|
|
22
22
|
const { locale } = useContext(ConfigContext);
|
|
23
23
|
const messages = locale ?? zh_CN_default;
|
|
24
|
-
const [files, setFiles] = useState(fileList ??
|
|
24
|
+
const [files, setFiles] = useState(fileList ?? []);
|
|
25
25
|
const filesRef = useRef(files);
|
|
26
26
|
filesRef.current = files;
|
|
27
27
|
const pendingRef = useRef(/* @__PURE__ */ new Map());
|
|
@@ -37,10 +37,10 @@ var Upload = forwardRef(function Upload({ method = "post", name = "file", action
|
|
|
37
37
|
onChangeRef.current = onChange;
|
|
38
38
|
}, [onChange]);
|
|
39
39
|
useEffect(() => {
|
|
40
|
-
|
|
41
|
-
const retained = new Set(
|
|
40
|
+
const nextFiles = fileList ?? [];
|
|
41
|
+
const retained = new Set(nextFiles.map((item) => item.uid));
|
|
42
42
|
const removed = filesRef.current.filter((item_0) => !retained.has(item_0.uid));
|
|
43
|
-
filesRef.current = [...
|
|
43
|
+
filesRef.current = [...nextFiles];
|
|
44
44
|
queueRef.current = queueRef.current.filter(({ item: item_1 }) => retained.has(item_1.uid));
|
|
45
45
|
removed.forEach((item_2) => {
|
|
46
46
|
if (!item_2.uid) return;
|
|
@@ -51,14 +51,14 @@ var Upload = forwardRef(function Upload({ method = "post", name = "file", action
|
|
|
51
51
|
handle?.abort();
|
|
52
52
|
if (activeUidsRef.current.delete(item_2.uid)) activeRef.current -= 1;
|
|
53
53
|
});
|
|
54
|
-
const activePreviews = new Set(
|
|
54
|
+
const activePreviews = new Set(nextFiles.map((item_3) => item_3.preview).filter(Boolean));
|
|
55
55
|
generatedPreviewUrlsRef.current.forEach((url) => {
|
|
56
56
|
if (!activePreviews.has(url)) {
|
|
57
57
|
URL.revokeObjectURL(url);
|
|
58
58
|
generatedPreviewUrlsRef.current.delete(url);
|
|
59
59
|
}
|
|
60
60
|
});
|
|
61
|
-
setFiles([...
|
|
61
|
+
setFiles([...nextFiles]);
|
|
62
62
|
}, [fileList]);
|
|
63
63
|
useEffect(() => {
|
|
64
64
|
unmountedRef.current = false;
|
package/es/upload/selector.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* react-kui v3.
|
|
2
|
+
* react-kui v3.1.1
|
|
3
3
|
* Copyright 2017-present, kui-react.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Homepage: https://react.k-ui.cn
|
|
@@ -14,12 +14,13 @@ import { useRef, useState } from "react";
|
|
|
14
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
15
|
//#region components/upload/selector.tsx
|
|
16
16
|
function Selector(t0) {
|
|
17
|
-
const $ = c(
|
|
17
|
+
const $ = c(58);
|
|
18
18
|
const { disabled, name: t1, accept, multiple, directory, limit, uploadText, uploadSubText, draggable, locale, fileList: t2, uploadIcon, type: t3, onSelect, children } = t0;
|
|
19
19
|
const name = t1 === void 0 ? "file" : t1;
|
|
20
20
|
const fileList = t2 === void 0 ? [] : t2;
|
|
21
21
|
const type = t3 === void 0 ? "list" : t3;
|
|
22
22
|
const [dragOver, setDragOver] = useState(false);
|
|
23
|
+
if (disabled && dragOver) setDragOver(false);
|
|
23
24
|
const inputRef = useRef(null);
|
|
24
25
|
let t4;
|
|
25
26
|
if ($[0] !== directory) {
|
|
@@ -31,88 +32,92 @@ function Selector(t0) {
|
|
|
31
32
|
const normalizedLimit = limit != null && limit >= 0 ? Math.floor(limit) : void 0;
|
|
32
33
|
if (type === "picture" && normalizedLimit !== void 0 && fileList.length >= normalizedLimit) return null;
|
|
33
34
|
let t5;
|
|
34
|
-
if ($[2] !== onSelect) {
|
|
35
|
+
if ($[2] !== disabled || $[3] !== onSelect) {
|
|
35
36
|
t5 = (files) => {
|
|
36
|
-
if (files?.length) onSelect?.(files);
|
|
37
|
+
if (!disabled && files?.length) onSelect?.(files);
|
|
37
38
|
setDragOver(false);
|
|
38
39
|
};
|
|
39
|
-
$[2] =
|
|
40
|
-
$[3] =
|
|
41
|
-
|
|
40
|
+
$[2] = disabled;
|
|
41
|
+
$[3] = onSelect;
|
|
42
|
+
$[4] = t5;
|
|
43
|
+
} else t5 = $[4];
|
|
42
44
|
const select = t5;
|
|
43
45
|
let t6;
|
|
44
|
-
if ($[
|
|
46
|
+
if ($[5] !== disabled || $[6] !== select) {
|
|
45
47
|
t6 = (event) => {
|
|
46
48
|
event.preventDefault();
|
|
47
49
|
if (!disabled) select(event.dataTransfer.files);
|
|
48
50
|
};
|
|
49
|
-
$[
|
|
50
|
-
$[
|
|
51
|
-
$[
|
|
52
|
-
} else t6 = $[
|
|
51
|
+
$[5] = disabled;
|
|
52
|
+
$[6] = select;
|
|
53
|
+
$[7] = t6;
|
|
54
|
+
} else t6 = $[7];
|
|
53
55
|
const drop = t6;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
const t7 = dragOver && !disabled;
|
|
57
|
+
let t8;
|
|
58
|
+
if ($[8] !== t7) {
|
|
59
|
+
t8 = clsx("k-upload-add", { "k-upload-drag-over": t7 });
|
|
58
60
|
$[8] = t7;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
const t9 = disabled
|
|
62
|
-
|
|
61
|
+
$[9] = t8;
|
|
62
|
+
} else t8 = $[9];
|
|
63
|
+
const t9 = disabled ? -1 : 0;
|
|
64
|
+
const t10 = disabled || void 0;
|
|
63
65
|
let t11;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
t11 = (
|
|
66
|
+
let t12;
|
|
67
|
+
if ($[10] !== disabled) {
|
|
68
|
+
t11 = () => !disabled && inputRef.current?.click();
|
|
69
|
+
t12 = (event_0) => {
|
|
67
70
|
if (event_0.key === "Enter" || event_0.key === " ") {
|
|
68
71
|
event_0.preventDefault();
|
|
69
72
|
if (!disabled) inputRef.current?.click();
|
|
70
73
|
}
|
|
71
74
|
};
|
|
72
|
-
$[
|
|
73
|
-
$[10] = t10;
|
|
75
|
+
$[10] = disabled;
|
|
74
76
|
$[11] = t11;
|
|
77
|
+
$[12] = t12;
|
|
75
78
|
} else {
|
|
76
|
-
t10 = $[10];
|
|
77
79
|
t11 = $[11];
|
|
80
|
+
t12 = $[12];
|
|
78
81
|
}
|
|
79
|
-
let t12;
|
|
80
|
-
if ($[12] !== draggable) {
|
|
81
|
-
t12 = draggable ? (event_1) => {
|
|
82
|
-
event_1.preventDefault();
|
|
83
|
-
setDragOver(true);
|
|
84
|
-
} : void 0;
|
|
85
|
-
$[12] = draggable;
|
|
86
|
-
$[13] = t12;
|
|
87
|
-
} else t12 = $[13];
|
|
88
82
|
let t13;
|
|
89
|
-
if ($[14] !== draggable) {
|
|
90
|
-
t13 = draggable ? (
|
|
91
|
-
|
|
83
|
+
if ($[13] !== disabled || $[14] !== draggable) {
|
|
84
|
+
t13 = draggable && !disabled ? (event_1) => {
|
|
85
|
+
event_1.preventDefault();
|
|
92
86
|
setDragOver(true);
|
|
93
87
|
} : void 0;
|
|
88
|
+
$[13] = disabled;
|
|
94
89
|
$[14] = draggable;
|
|
95
90
|
$[15] = t13;
|
|
96
91
|
} else t13 = $[15];
|
|
97
92
|
let t14;
|
|
98
|
-
if ($[16] !== draggable) {
|
|
99
|
-
t14 = draggable ? () =>
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
93
|
+
if ($[16] !== disabled || $[17] !== draggable) {
|
|
94
|
+
t14 = draggable && !disabled ? (event_2) => {
|
|
95
|
+
event_2.preventDefault();
|
|
96
|
+
setDragOver(true);
|
|
97
|
+
} : void 0;
|
|
98
|
+
$[16] = disabled;
|
|
99
|
+
$[17] = draggable;
|
|
100
|
+
$[18] = t14;
|
|
101
|
+
} else t14 = $[18];
|
|
102
|
+
let t15;
|
|
103
|
+
if ($[19] !== draggable) {
|
|
104
|
+
t15 = draggable ? () => setDragOver(false) : void 0;
|
|
105
|
+
$[19] = draggable;
|
|
106
|
+
$[20] = t15;
|
|
107
|
+
} else t15 = $[20];
|
|
108
|
+
const t16 = draggable && !disabled ? drop : void 0;
|
|
109
|
+
let t17;
|
|
110
|
+
if ($[21] !== select) {
|
|
111
|
+
t17 = (event_3) => {
|
|
107
112
|
select(event_3.target.files);
|
|
108
113
|
event_3.target.value = "";
|
|
109
114
|
};
|
|
110
|
-
$[
|
|
111
|
-
$[
|
|
112
|
-
} else
|
|
113
|
-
let
|
|
114
|
-
if ($[
|
|
115
|
-
|
|
115
|
+
$[21] = select;
|
|
116
|
+
$[22] = t17;
|
|
117
|
+
} else t17 = $[22];
|
|
118
|
+
let t18;
|
|
119
|
+
if ($[23] !== accept || $[24] !== directoryProps || $[25] !== disabled || $[26] !== multiple || $[27] !== name || $[28] !== t17) {
|
|
120
|
+
t18 = /* @__PURE__ */ jsx("input", {
|
|
116
121
|
ref: inputRef,
|
|
117
122
|
type: "file",
|
|
118
123
|
className: "k-upload-file",
|
|
@@ -121,87 +126,87 @@ function Selector(t0) {
|
|
|
121
126
|
disabled,
|
|
122
127
|
multiple,
|
|
123
128
|
...directoryProps,
|
|
124
|
-
onChange:
|
|
129
|
+
onChange: t17
|
|
125
130
|
});
|
|
126
|
-
$[
|
|
127
|
-
$[
|
|
128
|
-
$[
|
|
129
|
-
$[
|
|
130
|
-
$[
|
|
131
|
-
$[
|
|
132
|
-
$[
|
|
133
|
-
} else
|
|
134
|
-
let t18;
|
|
135
|
-
if ($[27] !== children || $[28] !== draggable || $[29] !== type || $[30] !== uploadIcon) {
|
|
136
|
-
t18 = type === "picture" || draggable ? /* @__PURE__ */ jsx(Icon, { type: uploadIcon ?? Plus }) : children;
|
|
137
|
-
$[27] = children;
|
|
138
|
-
$[28] = draggable;
|
|
139
|
-
$[29] = type;
|
|
140
|
-
$[30] = uploadIcon;
|
|
141
|
-
$[31] = t18;
|
|
142
|
-
} else t18 = $[31];
|
|
131
|
+
$[23] = accept;
|
|
132
|
+
$[24] = directoryProps;
|
|
133
|
+
$[25] = disabled;
|
|
134
|
+
$[26] = multiple;
|
|
135
|
+
$[27] = name;
|
|
136
|
+
$[28] = t17;
|
|
137
|
+
$[29] = t18;
|
|
138
|
+
} else t18 = $[29];
|
|
143
139
|
let t19;
|
|
144
|
-
if ($[
|
|
145
|
-
t19 =
|
|
140
|
+
if ($[30] !== children || $[31] !== draggable || $[32] !== type || $[33] !== uploadIcon) {
|
|
141
|
+
t19 = type === "picture" || draggable ? /* @__PURE__ */ jsx(Icon, { type: uploadIcon ?? Plus }) : children;
|
|
142
|
+
$[30] = children;
|
|
143
|
+
$[31] = draggable;
|
|
144
|
+
$[32] = type;
|
|
145
|
+
$[33] = uploadIcon;
|
|
146
|
+
$[34] = t19;
|
|
147
|
+
} else t19 = $[34];
|
|
148
|
+
let t20;
|
|
149
|
+
if ($[35] !== draggable || $[36] !== type || $[37] !== uploadText) {
|
|
150
|
+
t20 = (type === "picture" || draggable && uploadText) && /* @__PURE__ */ jsx("span", {
|
|
146
151
|
className: "k-upload-text",
|
|
147
152
|
children: uploadText
|
|
148
153
|
});
|
|
149
|
-
$[
|
|
150
|
-
$[
|
|
151
|
-
$[
|
|
152
|
-
$[
|
|
153
|
-
} else
|
|
154
|
-
let
|
|
155
|
-
if ($[
|
|
156
|
-
|
|
154
|
+
$[35] = draggable;
|
|
155
|
+
$[36] = type;
|
|
156
|
+
$[37] = uploadText;
|
|
157
|
+
$[38] = t20;
|
|
158
|
+
} else t20 = $[38];
|
|
159
|
+
let t21;
|
|
160
|
+
if ($[39] !== dragOver || $[40] !== draggable || $[41] !== locale?.k || $[42] !== uploadSubText) {
|
|
161
|
+
t21 = draggable && uploadSubText && /* @__PURE__ */ jsx("span", {
|
|
157
162
|
className: "k-upload-sub-text",
|
|
158
163
|
children: dragOver ? locale?.k.upload.releaseToUpload : uploadSubText
|
|
159
164
|
});
|
|
160
|
-
$[
|
|
161
|
-
$[
|
|
162
|
-
$[
|
|
163
|
-
$[
|
|
164
|
-
$[
|
|
165
|
-
} else
|
|
166
|
-
let
|
|
167
|
-
if ($[
|
|
168
|
-
|
|
165
|
+
$[39] = dragOver;
|
|
166
|
+
$[40] = draggable;
|
|
167
|
+
$[41] = locale?.k;
|
|
168
|
+
$[42] = uploadSubText;
|
|
169
|
+
$[43] = t21;
|
|
170
|
+
} else t21 = $[43];
|
|
171
|
+
let t22;
|
|
172
|
+
if ($[44] !== t10 || $[45] !== t11 || $[46] !== t12 || $[47] !== t13 || $[48] !== t14 || $[49] !== t15 || $[50] !== t16 || $[51] !== t18 || $[52] !== t19 || $[53] !== t20 || $[54] !== t21 || $[55] !== t8 || $[56] !== t9) {
|
|
173
|
+
t22 = /* @__PURE__ */ jsx("div", {
|
|
169
174
|
className: "k-upload-select",
|
|
170
175
|
children: /* @__PURE__ */ jsxs("div", {
|
|
171
|
-
className:
|
|
176
|
+
className: t8,
|
|
172
177
|
role: "button",
|
|
173
|
-
tabIndex:
|
|
174
|
-
"aria-disabled":
|
|
175
|
-
onClick:
|
|
176
|
-
onKeyDown:
|
|
177
|
-
onDragEnter:
|
|
178
|
-
onDragOver:
|
|
179
|
-
onDragLeave:
|
|
180
|
-
onDrop:
|
|
178
|
+
tabIndex: t9,
|
|
179
|
+
"aria-disabled": t10,
|
|
180
|
+
onClick: t11,
|
|
181
|
+
onKeyDown: t12,
|
|
182
|
+
onDragEnter: t13,
|
|
183
|
+
onDragOver: t14,
|
|
184
|
+
onDragLeave: t15,
|
|
185
|
+
onDrop: t16,
|
|
181
186
|
children: [
|
|
182
|
-
t17,
|
|
183
187
|
t18,
|
|
184
188
|
t19,
|
|
185
|
-
t20
|
|
189
|
+
t20,
|
|
190
|
+
t21
|
|
186
191
|
]
|
|
187
192
|
})
|
|
188
193
|
});
|
|
189
|
-
$[
|
|
190
|
-
$[
|
|
191
|
-
$[
|
|
192
|
-
$[
|
|
193
|
-
$[
|
|
194
|
-
$[
|
|
195
|
-
$[
|
|
196
|
-
$[
|
|
197
|
-
$[
|
|
198
|
-
$[
|
|
199
|
-
$[51] = t7;
|
|
200
|
-
$[52] = t8;
|
|
201
|
-
$[53] = t9;
|
|
194
|
+
$[44] = t10;
|
|
195
|
+
$[45] = t11;
|
|
196
|
+
$[46] = t12;
|
|
197
|
+
$[47] = t13;
|
|
198
|
+
$[48] = t14;
|
|
199
|
+
$[49] = t15;
|
|
200
|
+
$[50] = t16;
|
|
201
|
+
$[51] = t18;
|
|
202
|
+
$[52] = t19;
|
|
203
|
+
$[53] = t20;
|
|
202
204
|
$[54] = t21;
|
|
203
|
-
|
|
204
|
-
|
|
205
|
+
$[55] = t8;
|
|
206
|
+
$[56] = t9;
|
|
207
|
+
$[57] = t22;
|
|
208
|
+
} else t22 = $[57];
|
|
209
|
+
return t22;
|
|
205
210
|
}
|
|
206
211
|
//#endregion
|
|
207
212
|
export { Selector as default };
|
package/es/utils/checked.js
CHANGED
package/es/utils/color.js
CHANGED
package/es/utils/number.js
CHANGED
package/es/utils/placement.js
CHANGED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* react-kui v3.1.1
|
|
3
|
+
* Copyright 2017-present, kui-react.
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Homepage: https://react.k-ui.cn
|
|
6
|
+
* Author: Qiu / https://chuchur.com
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
//#region components/utils/popup.ts
|
|
10
|
+
/** One pending frame per owner; callbacks are replaced by the latest request. */
|
|
11
|
+
function createFrameScheduler() {
|
|
12
|
+
let frame;
|
|
13
|
+
const cancel = () => {
|
|
14
|
+
if (frame !== void 0) cancelAnimationFrame(frame);
|
|
15
|
+
frame = void 0;
|
|
16
|
+
};
|
|
17
|
+
const schedule = (callback) => {
|
|
18
|
+
cancel();
|
|
19
|
+
frame = requestAnimationFrame((time) => {
|
|
20
|
+
frame = void 0;
|
|
21
|
+
callback(time);
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
return {
|
|
25
|
+
schedule,
|
|
26
|
+
cancel
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function elementOf(element) {
|
|
30
|
+
return element && "$el" in element ? element.$el : element;
|
|
31
|
+
}
|
|
32
|
+
/** Includes composed paths so clicks inside a shadow-root trigger are not treated as outside. */
|
|
33
|
+
function isEventOutside(event, elements, requireAll = true) {
|
|
34
|
+
const nodes = elements.map(elementOf);
|
|
35
|
+
if (requireAll && nodes.some((node) => !node)) return false;
|
|
36
|
+
const target = event.target;
|
|
37
|
+
if (!(target instanceof Node)) return false;
|
|
38
|
+
const path = event.composedPath();
|
|
39
|
+
return nodes.every((node) => !node || !node.contains(target) && !path.includes(node));
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { createFrameScheduler, isEventOutside };
|
package/es/utils/react-node.js
CHANGED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* react-kui v3.1.1
|
|
3
|
+
* Copyright 2017-present, kui-react.
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Homepage: https://react.k-ui.cn
|
|
6
|
+
* Author: Qiu / https://chuchur.com
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import Space from "../space/index.js";
|
|
10
|
+
import Tag from "../tag/index.js";
|
|
11
|
+
import Tooltip from "../tooltip/index.js";
|
|
12
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
//#region components/utils/selection-tags.tsx
|
|
14
|
+
function renderSelectionTags({ labels, maxTagCount, size = "medium", shape, theme, disabled, readOnly, onRemove, overflowSize = "small", tagClass, restClass, tooltipClass, keys }) {
|
|
15
|
+
const count = typeof maxTagCount === "number" && Number.isFinite(maxTagCount) ? Math.max(0, Math.floor(maxTagCount)) : labels.length;
|
|
16
|
+
const renderTag = (label, index, overflow = false) => /* @__PURE__ */ jsx(Tag, {
|
|
17
|
+
className: overflow ? void 0 : tagClass,
|
|
18
|
+
size: overflow ? overflowSize : size,
|
|
19
|
+
shape,
|
|
20
|
+
theme,
|
|
21
|
+
compact: true,
|
|
22
|
+
closeable: !disabled && !readOnly,
|
|
23
|
+
onClose: () => onRemove(index),
|
|
24
|
+
children: label
|
|
25
|
+
}, `${keys?.[index] ?? label}-${index}`);
|
|
26
|
+
const tags = labels.slice(0, count).map((label, index) => renderTag(label, index));
|
|
27
|
+
const hidden = labels.slice(count);
|
|
28
|
+
const preview = /* @__PURE__ */ jsx(Space, {
|
|
29
|
+
wrap: true,
|
|
30
|
+
size: 4,
|
|
31
|
+
"theme-mode": "dark",
|
|
32
|
+
children: hidden.map((label, index) => renderTag(label, count + index, true))
|
|
33
|
+
});
|
|
34
|
+
if (hidden.length) tags.push(/* @__PURE__ */ jsx(Tooltip, {
|
|
35
|
+
title: tooltipClass ? /* @__PURE__ */ jsx("div", {
|
|
36
|
+
className: tooltipClass,
|
|
37
|
+
children: preview
|
|
38
|
+
}) : preview,
|
|
39
|
+
children: /* @__PURE__ */ jsxs(Tag, {
|
|
40
|
+
className: restClass,
|
|
41
|
+
size,
|
|
42
|
+
shape,
|
|
43
|
+
theme,
|
|
44
|
+
compact: true,
|
|
45
|
+
children: [
|
|
46
|
+
"+",
|
|
47
|
+
hidden.length,
|
|
48
|
+
"..."
|
|
49
|
+
]
|
|
50
|
+
})
|
|
51
|
+
}, "tag-more"));
|
|
52
|
+
return tags;
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
export { renderSelectionTags };
|
package/es/utils/share.js
CHANGED
package/es/utils/theme.js
CHANGED
package/es/utils/transition.js
CHANGED
package/es/utils/use-value.js
CHANGED
package/es/virtual-list/index.js
CHANGED
package/es/virtual-list/range.js
CHANGED
package/es/watermark/index.js
CHANGED