react-kui 2.0.0 → 3.0.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.en-US.md +23 -0
- package/AI.md +76 -0
- package/LICENSE +21 -21
- package/README.zh-CN.md +142 -0
- package/ai/behaviors.json +16 -0
- package/ai/cli.mjs +27 -0
- package/ai/evals/README.md +59 -0
- package/ai/evals/cases.json +207 -0
- package/ai/evals/config.json +4 -0
- package/ai/evals/evaluate.mjs +267 -0
- package/ai/evals/run.mjs +118 -0
- package/ai/kui-components.json +58292 -0
- package/ai/kui-components.schema.json +143 -0
- package/ai/mcp.mjs +290 -0
- package/ai/skills/react-kui/SKILL.md +16 -0
- package/ai/skills/react-kui/references/components.md +9 -0
- package/ai/skills/react-kui/references/mcp.md +14 -0
- package/ai/templates/form.tsx +69 -0
- package/ai/templates/index.json +23 -0
- package/ai/templates/modal-editor.tsx +80 -0
- package/ai/templates/table.tsx +85 -0
- package/ai/validate.d.mts +16 -0
- package/ai/validate.mjs +184 -0
- package/es/_virtual/_rolldown/runtime.js +21 -0
- package/es/affix/index.js +222 -0
- package/es/alert/index.js +71 -0
- package/es/anchor/anchor-context.js +13 -0
- package/es/anchor/anchor-link.js +121 -0
- package/es/anchor/anchor.js +431 -0
- package/es/auto-complete/index.js +692 -0
- package/es/avatar/avatar-group-context.js +13 -0
- package/es/avatar/avatar-group.js +145 -0
- package/es/avatar/avatar.js +204 -0
- package/es/back-top/index.js +224 -0
- package/es/badge/index.js +66 -0
- package/es/base/teleport.js +83 -0
- package/es/base/transition-props.js +56 -0
- package/es/base/transition.js +108 -0
- package/es/breadcrumb/breadcrumb-context.js +13 -0
- package/es/breadcrumb/breadcrumb-item.js +128 -0
- package/es/breadcrumb/breadcrumb.js +75 -0
- package/es/button/button-group-context.js +13 -0
- package/es/button/button-group.js +100 -0
- package/es/button/button.js +99 -0
- package/es/calendar/index.js +271 -0
- package/es/card/index.js +157 -0
- package/es/carousel/carousel-context.js +17 -0
- package/es/carousel/carousel-item.js +71 -0
- package/es/carousel/carousel.js +453 -0
- package/es/cascader/index.js +435 -0
- package/es/check-card/check-card-group.js +211 -0
- package/es/check-card/check-card.js +326 -0
- package/es/check-card/context.js +13 -0
- package/es/checkbox/checkbox-group-context.js +13 -0
- package/es/checkbox/checkbox-group.js +168 -0
- package/es/checkbox/checkbox.js +270 -0
- package/es/checkbox/index.js +14 -0
- package/es/collapse/collapse-panel.js +233 -0
- package/es/collapse/collapse.js +186 -0
- package/es/color-picker/alpha.js +131 -0
- package/es/color-picker/hue.js +111 -0
- package/es/color-picker/index.js +329 -0
- package/es/color-picker/mode.js +178 -0
- package/es/color-picker/paint.js +175 -0
- package/es/color-picker/presets.js +80 -0
- package/es/components.js +260 -0
- package/es/config/config-context.js +13 -0
- package/es/config/context.js +26 -0
- package/es/config/index.js +52 -0
- package/es/config/size-context.js +13 -0
- package/es/config/use-config-appearance.js +39 -0
- package/es/const/var.js +31 -0
- package/es/date-picker/index.js +1257 -0
- package/es/descriptions/descriptions-item.js +25 -0
- package/es/descriptions/descriptions.js +285 -0
- package/es/divider/index.js +38 -0
- package/es/drawer/index.js +432 -0
- package/es/dropdown/dropdown-button.js +139 -0
- package/es/dropdown/dropdown-context.js +16 -0
- package/es/dropdown/dropdown.js +351 -0
- package/es/dropdown/trigger.js +88 -0
- package/es/empty/index.js +133 -0
- package/es/feature-card/index.js +74 -0
- package/es/feedback-panel/index.js +179 -0
- package/es/flame-wrap/index.js +262 -0
- package/es/flame-wrap/types.js +593 -0
- package/es/flex/index.js +46 -0
- package/es/form/field-context.js +102 -0
- package/es/form/form-context.js +13 -0
- package/es/form/form-item.js +327 -0
- package/es/form/form.js +303 -0
- package/es/form/utils.js +44 -0
- package/es/grid/grid-item.js +130 -0
- package/es/grid/grid.js +177 -0
- package/es/grid/useBreakpoint.js +64 -0
- package/es/icon/index.js +161 -0
- package/es/image/group.js +121 -0
- package/es/image/image-group-context.js +13 -0
- package/es/image/image.js +314 -0
- package/es/image/instance.js +47 -0
- package/es/image/preview.js +383 -0
- package/es/image/utils.js +39 -0
- package/es/index.js +129 -0
- package/es/input/index.js +15 -0
- package/es/input/input-box.js +40 -0
- package/es/input/input-group.js +150 -0
- package/es/input/input.js +203 -0
- package/es/input/textarea.js +135 -0
- package/es/input-number/index.js +153 -0
- package/es/input-otp/index.js +142 -0
- package/es/input-tag/index.js +178 -0
- package/es/kanban/index.js +254 -0
- package/es/layout/index.js +256 -0
- package/es/layout/layout-context.js +13 -0
- package/es/list-panel/index.js +194 -0
- package/es/loading/index.js +69 -0
- package/es/loading/loading-bar.js +133 -0
- package/es/locale/de.js +69 -0
- package/es/locale/el.js +69 -0
- package/es/locale/en.js +69 -0
- package/es/locale/fr.js +69 -0
- package/es/locale/it.js +69 -0
- package/es/locale/ja.js +69 -0
- package/es/locale/ko.js +69 -0
- package/es/locale/ru.js +69 -0
- package/es/locale/th.js +69 -0
- package/es/locale/uk.js +69 -0
- package/es/locale/vi.js +69 -0
- package/es/locale/zh-CN.js +69 -0
- package/es/locale/zh-TW.js +69 -0
- package/es/mentions/index.js +710 -0
- package/es/menu/menu-context.js +20 -0
- package/es/menu/menu-divider.js +29 -0
- package/es/menu/menu-group.js +49 -0
- package/es/menu/menu-item.js +79 -0
- package/es/menu/menu-keyboard.js +35 -0
- package/es/menu/menu.js +484 -0
- package/es/menu/recursive-menu.js +68 -0
- package/es/menu/sub-menu.js +256 -0
- package/es/message/index.js +67 -0
- package/es/modal/api.js +62 -0
- package/es/modal/modal.js +589 -0
- package/es/modal/toast.js +99 -0
- package/es/node_modules/.pnpm/kui-icons@5.0.0/node_modules/kui-icons/dist/kui-icons.esm.js +189 -0
- package/es/notice/container.js +123 -0
- package/es/notice/content.js +92 -0
- package/es/notice/index.js +52 -0
- package/es/notice/instance.js +65 -0
- package/es/page/index.js +275 -0
- package/es/page-header/index.js +134 -0
- package/es/popconfirm/index.js +275 -0
- package/es/poptip/index.js +270 -0
- package/es/progress/index.js +253 -0
- package/es/qrcode/index.js +204 -0
- package/es/radio/radio-button.js +158 -0
- package/es/radio/radio-group-context.js +13 -0
- package/es/radio/radio-group.js +264 -0
- package/es/radio/radio.js +232 -0
- package/es/rate/index.js +253 -0
- package/es/rate/star.js +150 -0
- package/es/result/index.js +147 -0
- package/es/ripple/index.js +245 -0
- package/es/ripple/types.js +433 -0
- package/es/row-col/col.js +163 -0
- package/es/row-col/row.js +37 -0
- package/es/segmented/index.js +240 -0
- package/es/select/option.js +124 -0
- package/es/select/select.js +655 -0
- package/es/skeleton/skeleton-avatar.js +44 -0
- package/es/skeleton/skeleton-button.js +43 -0
- package/es/skeleton/skeleton-image.js +131 -0
- package/es/skeleton/skeleton-text.js +113 -0
- package/es/skeleton/skeleton.js +148 -0
- package/es/skeleton/use-skeleton-loading.js +53 -0
- package/es/slider/index.js +484 -0
- package/es/slider/thumb.js +158 -0
- package/es/space/index.js +94 -0
- package/es/spin/index.js +61 -0
- package/es/splitter/splitter-panel.js +50 -0
- package/es/splitter/splitter.js +310 -0
- package/es/stat-card/countup.js +157 -0
- package/es/stat-card/stat-card.js +63 -0
- package/es/stat-card/stat-number.js +125 -0
- package/es/stat-card/utils/countup.js +291 -0
- package/es/stat-card/utils/odometer.js +129 -0
- package/es/steps/index.js +139 -0
- package/es/switch/index.js +72 -0
- package/es/table/column-setting.js +179 -0
- package/es/table/index.js +506 -0
- package/es/table/utils.js +34 -0
- package/es/tabs/tab-panel.js +86 -0
- package/es/tabs/tabs.js +263 -0
- package/es/tag/index.js +74 -0
- package/es/time-line/timeline-item.js +133 -0
- package/es/time-line/timeline.js +55 -0
- package/es/tooltip/index.js +278 -0
- package/es/tour/index.js +379 -0
- package/es/transfer/index.js +511 -0
- package/es/tree/index.js +488 -0
- package/es/tree/utils.js +101 -0
- package/es/tree-select/index.js +938 -0
- package/es/typography/index.js +359 -0
- package/es/upload/file-list.js +143 -0
- package/es/upload/index.js +434 -0
- package/es/upload/picture-sort.js +142 -0
- package/es/upload/selector.js +207 -0
- package/es/utils/checked.js +24 -0
- package/es/utils/color.js +15 -0
- package/es/utils/number.js +74 -0
- package/es/utils/placement.js +151 -0
- package/es/utils/react-node.js +63 -0
- package/es/utils/share.js +12 -0
- package/es/utils/theme.js +57 -0
- package/es/utils/transition.js +58 -0
- package/es/utils/use-value.js +60 -0
- package/es/virtual-list/index.js +252 -0
- package/es/virtual-list/range.js +27 -0
- package/es/watermark/index.js +313 -0
- package/lib/index.cjs +9 -0
- package/lib/locale/de.cjs +9 -0
- package/lib/locale/el.cjs +9 -0
- package/lib/locale/en.cjs +9 -0
- package/lib/locale/fr.cjs +9 -0
- package/lib/locale/it.cjs +9 -0
- package/lib/locale/ja.cjs +9 -0
- package/lib/locale/ko.cjs +9 -0
- package/lib/locale/ru.cjs +9 -0
- package/lib/locale/th.cjs +9 -0
- package/lib/locale/uk.cjs +9 -0
- package/lib/locale/vi.cjs +9 -0
- package/lib/locale/zh-CN.cjs +9 -0
- package/lib/locale/zh-TW.cjs +9 -0
- package/package.json +175 -94
- package/readme.md +142 -82
- package/style/base.css +9 -0
- package/style/components.css +9 -0
- package/style/index.css +9 -0
- package/style/theme.css +9 -0
- package/types/affix/index.d.cts +9 -0
- package/types/affix/index.d.ts +9 -0
- package/types/alert/index.d.cts +18 -0
- package/types/alert/index.d.ts +18 -0
- package/types/anchor/anchor-context.d.cts +7 -0
- package/types/anchor/anchor-context.d.ts +7 -0
- package/types/anchor/anchor-link.d.cts +6 -0
- package/types/anchor/anchor-link.d.ts +6 -0
- package/types/anchor/anchor.d.cts +10 -0
- package/types/anchor/anchor.d.ts +10 -0
- package/types/anchor/index.d.cts +5 -0
- package/types/anchor/index.d.ts +5 -0
- package/types/auto-complete/index.d.cts +28 -0
- package/types/auto-complete/index.d.ts +28 -0
- package/types/avatar/avatar-group-context.d.cts +7 -0
- package/types/avatar/avatar-group-context.d.ts +7 -0
- package/types/avatar/avatar-group.d.cts +11 -0
- package/types/avatar/avatar-group.d.ts +11 -0
- package/types/avatar/avatar.d.cts +14 -0
- package/types/avatar/avatar.d.ts +14 -0
- package/types/avatar/index.d.cts +5 -0
- package/types/avatar/index.d.ts +5 -0
- package/types/back-top/index.d.cts +11 -0
- package/types/back-top/index.d.ts +11 -0
- package/types/badge/index.d.cts +15 -0
- package/types/badge/index.d.ts +15 -0
- package/types/base/teleport.d.cts +13 -0
- package/types/base/teleport.d.ts +13 -0
- package/types/base/transition-props.d.cts +4 -0
- package/types/base/transition-props.d.ts +4 -0
- package/types/base/transition.d.cts +27 -0
- package/types/base/transition.d.ts +27 -0
- package/types/breadcrumb/breadcrumb-context.d.cts +2 -0
- package/types/breadcrumb/breadcrumb-context.d.ts +2 -0
- package/types/breadcrumb/breadcrumb-item.d.cts +11 -0
- package/types/breadcrumb/breadcrumb-item.d.ts +11 -0
- package/types/breadcrumb/breadcrumb.d.cts +7 -0
- package/types/breadcrumb/breadcrumb.d.ts +7 -0
- package/types/breadcrumb/index.d.cts +5 -0
- package/types/breadcrumb/index.d.ts +5 -0
- package/types/button/button-group-context.d.cts +6 -0
- package/types/button/button-group-context.d.ts +6 -0
- package/types/button/button-group.d.cts +9 -0
- package/types/button/button-group.d.ts +9 -0
- package/types/button/button.d.cts +20 -0
- package/types/button/button.d.ts +20 -0
- package/types/button/index.d.cts +5 -0
- package/types/button/index.d.ts +5 -0
- package/types/calendar/index.d.cts +36 -0
- package/types/calendar/index.d.ts +36 -0
- package/types/card/index.d.cts +22 -0
- package/types/card/index.d.ts +22 -0
- package/types/carousel/carousel-context.d.cts +6 -0
- package/types/carousel/carousel-context.d.ts +6 -0
- package/types/carousel/carousel-item.d.cts +3 -0
- package/types/carousel/carousel-item.d.ts +3 -0
- package/types/carousel/carousel.d.cts +18 -0
- package/types/carousel/carousel.d.ts +18 -0
- package/types/carousel/index.d.cts +5 -0
- package/types/carousel/index.d.ts +5 -0
- package/types/cascader/index.d.cts +5 -0
- package/types/cascader/index.d.ts +5 -0
- package/types/cascader/types.d.cts +38 -0
- package/types/cascader/types.d.ts +38 -0
- package/types/check-card/check-card-group.d.cts +4 -0
- package/types/check-card/check-card-group.d.ts +4 -0
- package/types/check-card/check-card.d.cts +4 -0
- package/types/check-card/check-card.d.ts +4 -0
- package/types/check-card/context.d.cts +14 -0
- package/types/check-card/context.d.ts +14 -0
- package/types/check-card/index.d.cts +4 -0
- package/types/check-card/index.d.ts +4 -0
- package/types/check-card/types.d.cts +46 -0
- package/types/check-card/types.d.ts +46 -0
- package/types/checkbox/checkbox-group-context.d.cts +11 -0
- package/types/checkbox/checkbox-group-context.d.ts +11 -0
- package/types/checkbox/checkbox-group.d.cts +22 -0
- package/types/checkbox/checkbox-group.d.ts +22 -0
- package/types/checkbox/checkbox.d.cts +23 -0
- package/types/checkbox/checkbox.d.ts +23 -0
- package/types/checkbox/index.d.cts +6 -0
- package/types/checkbox/index.d.ts +6 -0
- package/types/collapse/collapse-panel.d.cts +12 -0
- package/types/collapse/collapse-panel.d.ts +12 -0
- package/types/collapse/collapse.d.cts +15 -0
- package/types/collapse/collapse.d.ts +15 -0
- package/types/collapse/index.d.cts +6 -0
- package/types/collapse/index.d.ts +6 -0
- package/types/color-picker/alpha.d.cts +6 -0
- package/types/color-picker/alpha.d.ts +6 -0
- package/types/color-picker/hue.d.cts +5 -0
- package/types/color-picker/hue.d.ts +5 -0
- package/types/color-picker/index.d.cts +30 -0
- package/types/color-picker/index.d.ts +30 -0
- package/types/color-picker/mode.d.cts +10 -0
- package/types/color-picker/mode.d.ts +10 -0
- package/types/color-picker/paint.d.cts +7 -0
- package/types/color-picker/paint.d.ts +7 -0
- package/types/color-picker/presets.d.cts +7 -0
- package/types/color-picker/presets.d.ts +7 -0
- package/types/components.d.cts +165 -0
- package/types/components.d.ts +165 -0
- package/types/config/config-context.d.cts +11 -0
- package/types/config/config-context.d.ts +11 -0
- package/types/config/context.d.cts +7 -0
- package/types/config/context.d.ts +7 -0
- package/types/config/index.d.cts +14 -0
- package/types/config/index.d.ts +14 -0
- package/types/config/size-context.d.cts +3 -0
- package/types/config/size-context.d.ts +3 -0
- package/types/config/use-config-appearance.d.cts +7 -0
- package/types/config/use-config-appearance.d.ts +7 -0
- package/types/const/types.d.cts +22 -0
- package/types/const/types.d.ts +22 -0
- package/types/const/var.d.cts +1 -0
- package/types/const/var.d.ts +1 -0
- package/types/date-picker/index.d.cts +54 -0
- package/types/date-picker/index.d.ts +54 -0
- package/types/descriptions/descriptions-item.d.cts +5 -0
- package/types/descriptions/descriptions-item.d.ts +5 -0
- package/types/descriptions/descriptions.d.cts +21 -0
- package/types/descriptions/descriptions.d.ts +21 -0
- package/types/descriptions/index.d.cts +4 -0
- package/types/descriptions/index.d.ts +4 -0
- package/types/directives/outsiteclick.d.cts +3 -0
- package/types/directives/outsiteclick.d.ts +3 -0
- package/types/directives/resize.d.cts +3 -0
- package/types/directives/resize.d.ts +3 -0
- package/types/directives/scroll.d.cts +3 -0
- package/types/directives/scroll.d.ts +3 -0
- package/types/directives/transfer.d.cts +2 -0
- package/types/directives/transfer.d.ts +2 -0
- package/types/divider/index.d.cts +14 -0
- package/types/divider/index.d.ts +14 -0
- package/types/drawer/index.d.cts +27 -0
- package/types/drawer/index.d.ts +27 -0
- package/types/dropdown/dropdown-button.d.cts +17 -0
- package/types/dropdown/dropdown-button.d.ts +17 -0
- package/types/dropdown/dropdown-context.d.cts +11 -0
- package/types/dropdown/dropdown-context.d.ts +11 -0
- package/types/dropdown/dropdown.d.cts +18 -0
- package/types/dropdown/dropdown.d.ts +18 -0
- package/types/dropdown/index.d.cts +4 -0
- package/types/dropdown/index.d.ts +4 -0
- package/types/dropdown/trigger.d.cts +9 -0
- package/types/dropdown/trigger.d.ts +9 -0
- package/types/empty/index.d.cts +9 -0
- package/types/empty/index.d.ts +9 -0
- package/types/feature-card/index.d.cts +20 -0
- package/types/feature-card/index.d.ts +20 -0
- package/types/feedback-panel/index.d.cts +15 -0
- package/types/feedback-panel/index.d.ts +15 -0
- package/types/flame-wrap/index.d.cts +3 -0
- package/types/flame-wrap/index.d.ts +3 -0
- package/types/flame-wrap/types.d.cts +71 -0
- package/types/flame-wrap/types.d.ts +71 -0
- package/types/flex/index.d.cts +15 -0
- package/types/flex/index.d.ts +15 -0
- package/types/form/field-context.d.cts +39 -0
- package/types/form/field-context.d.ts +39 -0
- package/types/form/form-context.d.cts +22 -0
- package/types/form/form-context.d.ts +22 -0
- package/types/form/form-item.d.cts +12 -0
- package/types/form/form-item.d.ts +12 -0
- package/types/form/form.d.cts +40 -0
- package/types/form/form.d.ts +40 -0
- package/types/form/index.d.cts +7 -0
- package/types/form/index.d.ts +7 -0
- package/types/form/types.d.cts +20 -0
- package/types/form/types.d.ts +20 -0
- package/types/form/utils.d.cts +6 -0
- package/types/form/utils.d.ts +6 -0
- package/types/grid/grid-item.d.cts +10 -0
- package/types/grid/grid-item.d.ts +10 -0
- package/types/grid/grid.d.cts +17 -0
- package/types/grid/grid.d.ts +17 -0
- package/types/grid/index.d.cts +6 -0
- package/types/grid/index.d.ts +6 -0
- package/types/grid/useBreakpoint.d.cts +11 -0
- package/types/grid/useBreakpoint.d.ts +11 -0
- package/types/icon/index.d.cts +15 -0
- package/types/icon/index.d.ts +15 -0
- package/types/image/group.d.cts +5 -0
- package/types/image/group.d.ts +5 -0
- package/types/image/image-group-context.d.cts +8 -0
- package/types/image/image-group-context.d.ts +8 -0
- package/types/image/image.d.cts +28 -0
- package/types/image/image.d.ts +28 -0
- package/types/image/index.d.cts +6 -0
- package/types/image/index.d.ts +6 -0
- package/types/image/instance.d.cts +5 -0
- package/types/image/instance.d.ts +5 -0
- package/types/image/preview.d.cts +19 -0
- package/types/image/preview.d.ts +19 -0
- package/types/image/utils.d.cts +6 -0
- package/types/image/utils.d.ts +6 -0
- package/types/index.d.cts +8 -0
- package/types/index.d.ts +8 -0
- package/types/input/index.d.cts +8 -0
- package/types/input/index.d.ts +8 -0
- package/types/input/input-box.d.cts +14 -0
- package/types/input/input-box.d.ts +14 -0
- package/types/input/input-group.d.cts +11 -0
- package/types/input/input-group.d.ts +11 -0
- package/types/input/input.d.cts +28 -0
- package/types/input/input.d.ts +28 -0
- package/types/input/textarea.d.cts +11 -0
- package/types/input/textarea.d.ts +11 -0
- package/types/input-number/index.d.cts +27 -0
- package/types/input-number/index.d.ts +27 -0
- package/types/input-otp/index.d.cts +27 -0
- package/types/input-otp/index.d.ts +27 -0
- package/types/input-tag/index.d.cts +23 -0
- package/types/input-tag/index.d.ts +23 -0
- package/types/kanban/index.d.cts +31 -0
- package/types/kanban/index.d.ts +31 -0
- package/types/layout/index.d.cts +29 -0
- package/types/layout/index.d.ts +29 -0
- package/types/layout/layout-context.d.cts +1 -0
- package/types/layout/layout-context.d.ts +1 -0
- package/types/list-panel/index.d.cts +16 -0
- package/types/list-panel/index.d.ts +16 -0
- package/types/loading/index.d.cts +10 -0
- package/types/loading/index.d.ts +10 -0
- package/types/loading/loading-bar.d.cts +12 -0
- package/types/loading/loading-bar.d.ts +12 -0
- package/types/locale/de.d.cts +65 -0
- package/types/locale/de.d.ts +65 -0
- package/types/locale/el.d.cts +65 -0
- package/types/locale/el.d.ts +65 -0
- package/types/locale/en.d.cts +65 -0
- package/types/locale/en.d.ts +65 -0
- package/types/locale/fr.d.cts +65 -0
- package/types/locale/fr.d.ts +65 -0
- package/types/locale/it.d.cts +65 -0
- package/types/locale/it.d.ts +65 -0
- package/types/locale/ja.d.cts +65 -0
- package/types/locale/ja.d.ts +65 -0
- package/types/locale/ko.d.cts +65 -0
- package/types/locale/ko.d.ts +65 -0
- package/types/locale/ru.d.cts +65 -0
- package/types/locale/ru.d.ts +65 -0
- package/types/locale/th.d.cts +65 -0
- package/types/locale/th.d.ts +65 -0
- package/types/locale/uk.d.cts +65 -0
- package/types/locale/uk.d.ts +65 -0
- package/types/locale/vi.d.cts +65 -0
- package/types/locale/vi.d.ts +65 -0
- package/types/locale/zh-CN.d.cts +65 -0
- package/types/locale/zh-CN.d.ts +65 -0
- package/types/locale/zh-TW.d.cts +65 -0
- package/types/locale/zh-TW.d.ts +65 -0
- package/types/mentions/index.d.cts +28 -0
- package/types/mentions/index.d.ts +28 -0
- package/types/menu/index.d.cts +7 -0
- package/types/menu/index.d.ts +7 -0
- package/types/menu/menu-context.d.cts +24 -0
- package/types/menu/menu-context.d.ts +24 -0
- package/types/menu/menu-divider.d.cts +3 -0
- package/types/menu/menu-divider.d.ts +3 -0
- package/types/menu/menu-group.d.cts +7 -0
- package/types/menu/menu-group.d.ts +7 -0
- package/types/menu/menu-item.d.cts +15 -0
- package/types/menu/menu-item.d.ts +15 -0
- package/types/menu/menu-keyboard.d.cts +7 -0
- package/types/menu/menu-keyboard.d.ts +7 -0
- package/types/menu/menu.d.cts +33 -0
- package/types/menu/menu.d.ts +33 -0
- package/types/menu/recursive-menu.d.cts +7 -0
- package/types/menu/recursive-menu.d.ts +7 -0
- package/types/menu/sub-menu.d.cts +12 -0
- package/types/menu/sub-menu.d.ts +12 -0
- package/types/message/index.d.cts +24 -0
- package/types/message/index.d.ts +24 -0
- package/types/modal/api.d.cts +26 -0
- package/types/modal/api.d.ts +26 -0
- package/types/modal/index.d.cts +4 -0
- package/types/modal/index.d.ts +4 -0
- package/types/modal/modal.d.cts +32 -0
- package/types/modal/modal.d.ts +32 -0
- package/types/modal/toast.d.cts +15 -0
- package/types/modal/toast.d.ts +15 -0
- package/types/notice/container.d.cts +9 -0
- package/types/notice/container.d.ts +9 -0
- package/types/notice/content.d.cts +22 -0
- package/types/notice/content.d.ts +22 -0
- package/types/notice/index.d.cts +24 -0
- package/types/notice/index.d.ts +24 -0
- package/types/notice/instance.d.cts +7 -0
- package/types/notice/instance.d.ts +7 -0
- package/types/page/index.d.cts +19 -0
- package/types/page/index.d.ts +19 -0
- package/types/page-header/index.d.cts +10 -0
- package/types/page-header/index.d.ts +10 -0
- package/types/popconfirm/index.d.cts +27 -0
- package/types/popconfirm/index.d.ts +27 -0
- package/types/poptip/index.d.cts +25 -0
- package/types/poptip/index.d.ts +25 -0
- package/types/progress/index.d.cts +21 -0
- package/types/progress/index.d.ts +21 -0
- package/types/qrcode/index.d.cts +28 -0
- package/types/qrcode/index.d.ts +28 -0
- package/types/radio/index.d.cts +7 -0
- package/types/radio/index.d.ts +7 -0
- package/types/radio/radio-button.d.cts +20 -0
- package/types/radio/radio-button.d.ts +20 -0
- package/types/radio/radio-group-context.d.cts +13 -0
- package/types/radio/radio-group-context.d.ts +13 -0
- package/types/radio/radio-group.d.cts +26 -0
- package/types/radio/radio-group.d.ts +26 -0
- package/types/radio/radio.d.cts +17 -0
- package/types/radio/radio.d.ts +17 -0
- package/types/radio/types.d.cts +5 -0
- package/types/radio/types.d.ts +5 -0
- package/types/rate/index.d.cts +22 -0
- package/types/rate/index.d.ts +22 -0
- package/types/rate/star.d.cts +19 -0
- package/types/rate/star.d.ts +19 -0
- package/types/result/index.d.cts +12 -0
- package/types/result/index.d.ts +12 -0
- package/types/ripple/index.d.cts +10 -0
- package/types/ripple/index.d.ts +10 -0
- package/types/ripple/types.d.cts +48 -0
- package/types/ripple/types.d.ts +48 -0
- package/types/row-col/col.d.cts +26 -0
- package/types/row-col/col.d.ts +26 -0
- package/types/row-col/index.d.cts +5 -0
- package/types/row-col/index.d.ts +5 -0
- package/types/row-col/row.d.cts +9 -0
- package/types/row-col/row.d.ts +9 -0
- package/types/segmented/index.d.cts +25 -0
- package/types/segmented/index.d.ts +25 -0
- package/types/select/index.d.cts +5 -0
- package/types/select/index.d.ts +5 -0
- package/types/select/option.d.cts +17 -0
- package/types/select/option.d.ts +17 -0
- package/types/select/select.d.cts +51 -0
- package/types/select/select.d.ts +51 -0
- package/types/skeleton/index.d.cts +11 -0
- package/types/skeleton/index.d.ts +11 -0
- package/types/skeleton/skeleton-avatar.d.cts +13 -0
- package/types/skeleton/skeleton-avatar.d.ts +13 -0
- package/types/skeleton/skeleton-button.d.cts +14 -0
- package/types/skeleton/skeleton-button.d.ts +14 -0
- package/types/skeleton/skeleton-image.d.cts +11 -0
- package/types/skeleton/skeleton-image.d.ts +11 -0
- package/types/skeleton/skeleton-text.d.cts +12 -0
- package/types/skeleton/skeleton-text.d.ts +12 -0
- package/types/skeleton/skeleton.d.cts +19 -0
- package/types/skeleton/skeleton.d.ts +19 -0
- package/types/skeleton/use-skeleton-loading.d.cts +1 -0
- package/types/skeleton/use-skeleton-loading.d.ts +1 -0
- package/types/slider/index.d.cts +21 -0
- package/types/slider/index.d.ts +21 -0
- package/types/slider/thumb.d.cts +17 -0
- package/types/slider/thumb.d.ts +17 -0
- package/types/space/index.d.cts +15 -0
- package/types/space/index.d.ts +15 -0
- package/types/spin/index.d.cts +11 -0
- package/types/spin/index.d.ts +11 -0
- package/types/splitter/index.d.cts +4 -0
- package/types/splitter/index.d.ts +4 -0
- package/types/splitter/splitter-panel.d.cts +7 -0
- package/types/splitter/splitter-panel.d.ts +7 -0
- package/types/splitter/splitter.d.cts +9 -0
- package/types/splitter/splitter.d.ts +9 -0
- package/types/stat-card/countup.d.cts +11 -0
- package/types/stat-card/countup.d.ts +11 -0
- package/types/stat-card/index.d.cts +5 -0
- package/types/stat-card/index.d.ts +5 -0
- package/types/stat-card/rollup.d.cts +7 -0
- package/types/stat-card/rollup.d.ts +7 -0
- package/types/stat-card/stat-card.d.cts +31 -0
- package/types/stat-card/stat-card.d.ts +31 -0
- package/types/stat-card/stat-number.d.cts +13 -0
- package/types/stat-card/stat-number.d.ts +13 -0
- package/types/stat-card/utils/countup.d.cts +128 -0
- package/types/stat-card/utils/countup.d.ts +128 -0
- package/types/stat-card/utils/odometer.d.cts +14 -0
- package/types/stat-card/utils/odometer.d.ts +14 -0
- package/types/steps/index.d.cts +20 -0
- package/types/steps/index.d.ts +20 -0
- package/types/switch/index.d.cts +21 -0
- package/types/switch/index.d.ts +21 -0
- package/types/table/column-setting.d.cts +28 -0
- package/types/table/column-setting.d.ts +28 -0
- package/types/table/index.d.cts +5 -0
- package/types/table/index.d.ts +5 -0
- package/types/table/types.d.cts +66 -0
- package/types/table/types.d.ts +66 -0
- package/types/table/utils.d.cts +14 -0
- package/types/table/utils.d.ts +14 -0
- package/types/tabs/index.d.cts +5 -0
- package/types/tabs/index.d.ts +5 -0
- package/types/tabs/tab-panel.d.cts +17 -0
- package/types/tabs/tab-panel.d.ts +17 -0
- package/types/tabs/tabs.d.cts +16 -0
- package/types/tabs/tabs.d.ts +16 -0
- package/types/tabs/types.d.cts +16 -0
- package/types/tabs/types.d.ts +16 -0
- package/types/tag/index.d.cts +16 -0
- package/types/tag/index.d.ts +16 -0
- package/types/time-line/index.d.cts +5 -0
- package/types/time-line/index.d.ts +5 -0
- package/types/time-line/timeline-item.d.cts +10 -0
- package/types/time-line/timeline-item.d.ts +10 -0
- package/types/time-line/timeline.d.cts +6 -0
- package/types/time-line/timeline.d.ts +6 -0
- package/types/tooltip/index.d.cts +23 -0
- package/types/tooltip/index.d.ts +23 -0
- package/types/tour/index.d.cts +22 -0
- package/types/tour/index.d.ts +22 -0
- package/types/transfer/index.d.cts +33 -0
- package/types/transfer/index.d.ts +33 -0
- package/types/tree/index.d.cts +51 -0
- package/types/tree/index.d.ts +51 -0
- package/types/tree/types.d.cts +27 -0
- package/types/tree/types.d.ts +27 -0
- package/types/tree/utils.d.cts +33 -0
- package/types/tree/utils.d.ts +33 -0
- package/types/tree-select/index.d.cts +60 -0
- package/types/tree-select/index.d.ts +60 -0
- package/types/typography/index.d.cts +40 -0
- package/types/typography/index.d.ts +40 -0
- package/types/upload/file-list.d.cts +19 -0
- package/types/upload/file-list.d.ts +19 -0
- package/types/upload/index.d.cts +90 -0
- package/types/upload/index.d.ts +90 -0
- package/types/upload/picture-sort.d.cts +2 -0
- package/types/upload/picture-sort.d.ts +2 -0
- package/types/upload/selector.d.cts +21 -0
- package/types/upload/selector.d.ts +21 -0
- package/types/utils/checked.d.cts +2 -0
- package/types/utils/checked.d.ts +2 -0
- package/types/utils/color.d.cts +1 -0
- package/types/utils/color.d.ts +1 -0
- package/types/utils/element.d.cts +2 -0
- package/types/utils/element.d.ts +2 -0
- package/types/utils/mouse.d.cts +1 -0
- package/types/utils/mouse.d.ts +1 -0
- package/types/utils/number.d.cts +6 -0
- package/types/utils/number.d.ts +6 -0
- package/types/utils/placement.d.cts +16 -0
- package/types/utils/placement.d.ts +16 -0
- package/types/utils/react-node.d.cts +5 -0
- package/types/utils/react-node.d.ts +5 -0
- package/types/utils/share.d.cts +12 -0
- package/types/utils/share.d.ts +12 -0
- package/types/utils/theme.d.cts +5 -0
- package/types/utils/theme.d.ts +5 -0
- package/types/utils/transition.d.cts +3 -0
- package/types/utils/transition.d.ts +3 -0
- package/types/utils/use-value.d.cts +2 -0
- package/types/utils/use-value.d.ts +2 -0
- package/types/virtual-list/index.d.cts +17 -0
- package/types/virtual-list/index.d.ts +17 -0
- package/types/virtual-list/range.d.cts +15 -0
- package/types/virtual-list/range.d.ts +15 -0
- package/types/watermark/index.d.cts +27 -0
- package/types/watermark/index.d.ts +27 -0
- package/dist/k-ui.css +0 -7
- package/dist/k-ui.js +0 -13
|
@@ -0,0 +1,506 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* react-kui v3.0.0
|
|
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 { normalizeSurfaceShape, useConfigAppearance } from "../config/use-config-appearance.js";
|
|
10
|
+
import { ChevronDown, ChevronRight, Triangle } from "../node_modules/.pnpm/kui-icons@5.0.0/node_modules/kui-icons/dist/kui-icons.esm.js";
|
|
11
|
+
import Icon from "../icon/index.js";
|
|
12
|
+
import Empty from "../empty/index.js";
|
|
13
|
+
import checkbox_default from "../checkbox/checkbox.js";
|
|
14
|
+
import { getVirtualRange } from "../virtual-list/range.js";
|
|
15
|
+
import Spin from "../spin/index.js";
|
|
16
|
+
import { countColumnLeaves, flattenColumns, flattenTreeData, getRecordValue } from "./utils.js";
|
|
17
|
+
import { TableColumnSetting } from "./column-setting.js";
|
|
18
|
+
import clsx from "clsx";
|
|
19
|
+
import { useEffect, useMemo, useRef, useState } from "react";
|
|
20
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
21
|
+
import { flushSync } from "react-dom";
|
|
22
|
+
//#region components/table/index.tsx
|
|
23
|
+
function Table({ data = [], columns = [], selectedKeys, defaultSelectedKeys = [], disabledKeys = [], rowKey = "key", childrenColumnName = "children", expandedKeys, defaultExpandedKeys = [], defaultExpandAllRows = false, expandRowByClick = false, indentSize = 20, scroll = {}, size: sizeProp, striped, bordered = false, shape: shapeProp, checkable, loading, emptyText, header, footer, virtual = false, itemHeight = 44, overscan = 5, hiddenColumnKeys = [], onSort, onRowClick, onSelect, onSelectAll, onSelectedKeysChange, onExpand, onExpandedKeysChange, className, ...rest }) {
|
|
24
|
+
const inheritedAppearance = useConfigAppearance();
|
|
25
|
+
const size = sizeProp ?? inheritedAppearance.size;
|
|
26
|
+
const shape = normalizeSurfaceShape(shapeProp ?? inheritedAppearance.shape ?? "round");
|
|
27
|
+
const headerRef = useRef(null);
|
|
28
|
+
const bodyRef = useRef(null);
|
|
29
|
+
const scrollFrameRef = useRef(0);
|
|
30
|
+
const controlledSelection = selectedKeys !== void 0;
|
|
31
|
+
const [innerSelected, setInnerSelected] = useState(new Set(selectedKeys ?? defaultSelectedKeys));
|
|
32
|
+
const [innerExpanded, setInnerExpanded] = useState(() => new Set(defaultExpandAllRows ? flattenTreeData({
|
|
33
|
+
data,
|
|
34
|
+
childrenColumnName,
|
|
35
|
+
getKey: (record) => {
|
|
36
|
+
if (typeof rowKey === "function") return rowKey(record);
|
|
37
|
+
const key = getRecordValue(record, rowKey);
|
|
38
|
+
return typeof key === "string" || typeof key === "number" ? key : "";
|
|
39
|
+
}
|
|
40
|
+
}).filter((row) => row.hasChildren).map((row_0) => typeof rowKey === "function" ? rowKey(row_0.record) : getRecordValue(row_0.record, rowKey) ?? "") : defaultExpandedKeys));
|
|
41
|
+
const [sort, setSort] = useState({
|
|
42
|
+
key: "",
|
|
43
|
+
order: null
|
|
44
|
+
});
|
|
45
|
+
const [ping, setPing] = useState({
|
|
46
|
+
left: false,
|
|
47
|
+
right: false
|
|
48
|
+
});
|
|
49
|
+
const [scrollbarWidth, setScrollbarWidth] = useState(0);
|
|
50
|
+
const [scrollTop, setScrollTop] = useState(0);
|
|
51
|
+
const [viewportHeight, setViewportHeight] = useState(0);
|
|
52
|
+
const selected = controlledSelection ? new Set(selectedKeys) : innerSelected;
|
|
53
|
+
const currentExpanded = expandedKeys === void 0 ? innerExpanded : new Set(expandedKeys);
|
|
54
|
+
const visibleColumns = useMemo(() => {
|
|
55
|
+
const filter = (items) => items.flatMap((column) => {
|
|
56
|
+
if (hiddenColumnKeys.includes(column.key)) return [];
|
|
57
|
+
if (!column.children?.length) return [column];
|
|
58
|
+
const children = filter(column.children);
|
|
59
|
+
return children.length ? [{
|
|
60
|
+
...column,
|
|
61
|
+
children
|
|
62
|
+
}] : [];
|
|
63
|
+
});
|
|
64
|
+
return filter(columns);
|
|
65
|
+
}, [columns, hiddenColumnKeys]);
|
|
66
|
+
const leaves = useMemo(() => flattenColumns(visibleColumns), [visibleColumns]);
|
|
67
|
+
const split = scroll.y != null;
|
|
68
|
+
const virtualEnabled = virtual && split;
|
|
69
|
+
const keyOf = (record_0) => {
|
|
70
|
+
if (typeof rowKey === "function") return rowKey(record_0);
|
|
71
|
+
const key_0 = getRecordValue(record_0, rowKey);
|
|
72
|
+
return typeof key_0 === "string" || typeof key_0 === "number" ? key_0 : "";
|
|
73
|
+
};
|
|
74
|
+
const isDisabled = (key_1) => disabledKeys.includes(key_1);
|
|
75
|
+
const headerInfo = useMemo(() => {
|
|
76
|
+
let maxDepth = 1;
|
|
77
|
+
const depth = (items_0, level = 1) => items_0.forEach((item) => item.children?.length ? depth(item.children, level + 1) : maxDepth = Math.max(maxDepth, level));
|
|
78
|
+
depth(visibleColumns);
|
|
79
|
+
const headerRows = [];
|
|
80
|
+
const visit = (items_1, level_0) => {
|
|
81
|
+
headerRows[level_0] ??= [];
|
|
82
|
+
items_1.forEach((item_0) => {
|
|
83
|
+
headerRows[level_0].push({
|
|
84
|
+
...item_0,
|
|
85
|
+
headerColSpan: countColumnLeaves(item_0),
|
|
86
|
+
headerRowSpan: item_0.children?.length ? 1 : maxDepth - level_0
|
|
87
|
+
});
|
|
88
|
+
if (item_0.children?.length) visit(item_0.children, level_0 + 1);
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
visit(visibleColumns, 0);
|
|
92
|
+
return {
|
|
93
|
+
rows: headerRows,
|
|
94
|
+
maxDepth
|
|
95
|
+
};
|
|
96
|
+
}, [visibleColumns]);
|
|
97
|
+
const fixed = useMemo(() => {
|
|
98
|
+
const header_0 = {};
|
|
99
|
+
const body = {};
|
|
100
|
+
let left = checkable ? 50 : 0;
|
|
101
|
+
leaves.forEach((column_0) => {
|
|
102
|
+
if (column_0.fixed === "left") {
|
|
103
|
+
const style = {
|
|
104
|
+
position: "sticky",
|
|
105
|
+
left
|
|
106
|
+
};
|
|
107
|
+
header_0[column_0.key] = style;
|
|
108
|
+
body[column_0.key] = style;
|
|
109
|
+
left += column_0.width ?? 150;
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
let right = 0;
|
|
113
|
+
[...leaves].reverse().forEach((column_1) => {
|
|
114
|
+
if (column_1.fixed === "right") {
|
|
115
|
+
body[column_1.key] = {
|
|
116
|
+
position: "sticky",
|
|
117
|
+
right
|
|
118
|
+
};
|
|
119
|
+
header_0[column_1.key] = {
|
|
120
|
+
position: "sticky",
|
|
121
|
+
right: split ? right + scrollbarWidth : right
|
|
122
|
+
};
|
|
123
|
+
right += column_1.width ?? 150;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
return {
|
|
127
|
+
header: header_0,
|
|
128
|
+
body
|
|
129
|
+
};
|
|
130
|
+
}, [
|
|
131
|
+
checkable,
|
|
132
|
+
leaves,
|
|
133
|
+
scrollbarWidth,
|
|
134
|
+
split
|
|
135
|
+
]);
|
|
136
|
+
const fixedClass = (column_2, index) => clsx({
|
|
137
|
+
"k-table-cell-fix-left": column_2.fixed === "left",
|
|
138
|
+
"k-table-cell-fix-left-last": column_2.fixed === "left" && leaves[index + 1]?.fixed !== "left",
|
|
139
|
+
"k-table-cell-fix-right": column_2.fixed === "right",
|
|
140
|
+
"k-table-cell-fix-right-first": column_2.fixed === "right" && leaves[index - 1]?.fixed !== "right",
|
|
141
|
+
"k-table-cell-sorter": column_2.sorter
|
|
142
|
+
});
|
|
143
|
+
const leafIndexOf = (column_3) => leaves.findIndex((item_1) => item_1.key === column_3.key);
|
|
144
|
+
const sortRecords = (records) => {
|
|
145
|
+
const result = [...records];
|
|
146
|
+
if (sort.key && sort.order && leaves.find((column_4) => column_4.key === sort.key)?.sorter === true) result.sort((a, b) => {
|
|
147
|
+
const first = getRecordValue(a, sort.key), second = getRecordValue(b, sort.key);
|
|
148
|
+
if (first === second) return 0;
|
|
149
|
+
const comparison = typeof first === "number" && typeof second === "number" || typeof first === "string" && typeof second === "string" ? first > second ? 1 : -1 : 0;
|
|
150
|
+
return sort.order === "asc" ? comparison : -comparison;
|
|
151
|
+
});
|
|
152
|
+
return result;
|
|
153
|
+
};
|
|
154
|
+
const allRows = flattenTreeData({
|
|
155
|
+
data,
|
|
156
|
+
childrenColumnName,
|
|
157
|
+
getKey: keyOf
|
|
158
|
+
});
|
|
159
|
+
const rows = flattenTreeData({
|
|
160
|
+
data,
|
|
161
|
+
childrenColumnName,
|
|
162
|
+
expandedKeys: currentExpanded,
|
|
163
|
+
getKey: keyOf,
|
|
164
|
+
sortRecords
|
|
165
|
+
});
|
|
166
|
+
const virtualRange = useMemo(() => {
|
|
167
|
+
if (!virtualEnabled) return {
|
|
168
|
+
start: 0,
|
|
169
|
+
end: rows.length,
|
|
170
|
+
offset: 0,
|
|
171
|
+
total: 0
|
|
172
|
+
};
|
|
173
|
+
return getVirtualRange({
|
|
174
|
+
count: rows.length,
|
|
175
|
+
scrollTop,
|
|
176
|
+
viewportHeight,
|
|
177
|
+
itemHeight,
|
|
178
|
+
overscan
|
|
179
|
+
});
|
|
180
|
+
}, [
|
|
181
|
+
virtualEnabled,
|
|
182
|
+
rows.length,
|
|
183
|
+
scrollTop,
|
|
184
|
+
viewportHeight,
|
|
185
|
+
itemHeight,
|
|
186
|
+
overscan
|
|
187
|
+
]);
|
|
188
|
+
const treeEnabled = allRows.some((row_1) => row_1.hasChildren);
|
|
189
|
+
const matrix = useMemo(() => {
|
|
190
|
+
if (!leaves.some((column_5) => column_5.rowSpan !== void 0 || column_5.colSpan !== void 0)) return [];
|
|
191
|
+
const result_0 = rows.map(() => leaves.map(() => ({
|
|
192
|
+
rowSpan: 1,
|
|
193
|
+
colSpan: 1,
|
|
194
|
+
show: true
|
|
195
|
+
})));
|
|
196
|
+
rows.forEach(({ record: record_1 }, row_2) => leaves.forEach((column_6, col) => {
|
|
197
|
+
if (!result_0[row_2][col].show) return;
|
|
198
|
+
const rowSpan = typeof column_6.rowSpan === "function" ? column_6.rowSpan(record_1, row_2) : column_6.rowSpan ?? 1;
|
|
199
|
+
const colSpan = typeof column_6.colSpan === "function" ? column_6.colSpan(record_1, row_2) : column_6.colSpan ?? 1;
|
|
200
|
+
const normalizedRowSpan = Number.isFinite(rowSpan) ? Math.max(0, Math.floor(rowSpan)) : 1;
|
|
201
|
+
const normalizedColSpan = Number.isFinite(colSpan) ? Math.max(0, Math.floor(colSpan)) : 1;
|
|
202
|
+
if (normalizedRowSpan === 0 || normalizedColSpan === 0) {
|
|
203
|
+
result_0[row_2][col].show = false;
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
result_0[row_2][col] = {
|
|
207
|
+
rowSpan: normalizedRowSpan,
|
|
208
|
+
colSpan: normalizedColSpan,
|
|
209
|
+
show: true
|
|
210
|
+
};
|
|
211
|
+
for (let r = 0; r < normalizedRowSpan; r++) for (let c = 0; c < normalizedColSpan; c++) if (r || c) {
|
|
212
|
+
const cell = result_0[row_2 + r]?.[col + c];
|
|
213
|
+
if (cell) cell.show = false;
|
|
214
|
+
}
|
|
215
|
+
}));
|
|
216
|
+
return result_0;
|
|
217
|
+
}, [leaves, rows]);
|
|
218
|
+
const enabled = allRows.map((row_3) => row_3.record).filter((record_2) => !isDisabled(keyOf(record_2)));
|
|
219
|
+
const checkedCount = enabled.filter((record_3) => selected.has(keyOf(record_3))).length;
|
|
220
|
+
const allChecked = enabled.length > 0 && checkedCount === enabled.length;
|
|
221
|
+
const indeterminate = checkedCount > 0 && checkedCount < enabled.length;
|
|
222
|
+
const commitSelection = (next) => {
|
|
223
|
+
const keys = [...next];
|
|
224
|
+
if (!controlledSelection) setInnerSelected(next);
|
|
225
|
+
onSelectedKeysChange?.(keys);
|
|
226
|
+
return keys;
|
|
227
|
+
};
|
|
228
|
+
const toggleAll = ({ checked }) => {
|
|
229
|
+
const next_0 = new Set(selected);
|
|
230
|
+
allRows.forEach(({ record: record_4 }) => {
|
|
231
|
+
const key_2 = keyOf(record_4);
|
|
232
|
+
if (!isDisabled(key_2)) {
|
|
233
|
+
if (checked) next_0.add(key_2);
|
|
234
|
+
else next_0.delete(key_2);
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
const keys_0 = commitSelection(next_0);
|
|
238
|
+
onSelectAll?.(checked, keys_0);
|
|
239
|
+
};
|
|
240
|
+
const toggleOne = (event, record_5) => {
|
|
241
|
+
const key_3 = keyOf(record_5);
|
|
242
|
+
if (isDisabled(key_3)) return;
|
|
243
|
+
const next_1 = new Set(selected);
|
|
244
|
+
if (event.checked) next_1.add(key_3);
|
|
245
|
+
else next_1.delete(key_3);
|
|
246
|
+
const keys_1 = commitSelection(next_1);
|
|
247
|
+
onSelect?.(record_5, event.checked, keys_1);
|
|
248
|
+
};
|
|
249
|
+
const toggleExpand = (record_6) => {
|
|
250
|
+
const key_4 = keyOf(record_6);
|
|
251
|
+
const next_2 = new Set(currentExpanded);
|
|
252
|
+
const nextExpanded = !next_2.has(key_4);
|
|
253
|
+
if (nextExpanded) next_2.add(key_4);
|
|
254
|
+
else next_2.delete(key_4);
|
|
255
|
+
if (expandedKeys === void 0) setInnerExpanded(next_2);
|
|
256
|
+
onExpandedKeysChange?.([...next_2]);
|
|
257
|
+
onExpand?.(nextExpanded, record_6);
|
|
258
|
+
};
|
|
259
|
+
const changeSort = (column_7) => {
|
|
260
|
+
if (!column_7.sorter) return;
|
|
261
|
+
const next_3 = {
|
|
262
|
+
key: column_7.key,
|
|
263
|
+
order: sort.key !== column_7.key ? "asc" : sort.order === "asc" ? "desc" : sort.order === "desc" ? null : "asc"
|
|
264
|
+
};
|
|
265
|
+
setSort(next_3);
|
|
266
|
+
if (typeof column_7.sorter === "function") column_7.sorter(next_3);
|
|
267
|
+
onSort?.(next_3);
|
|
268
|
+
};
|
|
269
|
+
const handleScroll = (event_0) => {
|
|
270
|
+
const target = event_0.currentTarget;
|
|
271
|
+
if (scrollFrameRef.current) return;
|
|
272
|
+
scrollFrameRef.current = requestAnimationFrame(() => {
|
|
273
|
+
scrollFrameRef.current = 0;
|
|
274
|
+
const body_0 = bodyRef.current ?? target;
|
|
275
|
+
if (split && headerRef.current) headerRef.current.scrollLeft = body_0.scrollLeft;
|
|
276
|
+
const max = Math.max(0, body_0.scrollWidth - body_0.clientWidth);
|
|
277
|
+
const update = () => {
|
|
278
|
+
if (virtualEnabled) setScrollTop(body_0.scrollTop);
|
|
279
|
+
const nextPing = {
|
|
280
|
+
left: body_0.scrollLeft > .5,
|
|
281
|
+
right: body_0.scrollLeft < max - .5
|
|
282
|
+
};
|
|
283
|
+
setPing((current) => current.left === nextPing.left && current.right === nextPing.right ? current : nextPing);
|
|
284
|
+
};
|
|
285
|
+
if (virtualEnabled) flushSync(update);
|
|
286
|
+
else update();
|
|
287
|
+
});
|
|
288
|
+
};
|
|
289
|
+
useEffect(() => {
|
|
290
|
+
const body_1 = bodyRef.current;
|
|
291
|
+
if (!body_1) return;
|
|
292
|
+
const measure = () => {
|
|
293
|
+
setScrollbarWidth(split ? Math.max(0, body_1.offsetWidth - body_1.clientWidth - (bordered ? 1 : 0)) : 0);
|
|
294
|
+
setViewportHeight(body_1.clientHeight);
|
|
295
|
+
const max_0 = Math.max(0, body_1.scrollWidth - body_1.clientWidth);
|
|
296
|
+
const nextPing_0 = {
|
|
297
|
+
left: body_1.scrollLeft > .5,
|
|
298
|
+
right: body_1.scrollLeft < max_0 - .5
|
|
299
|
+
};
|
|
300
|
+
setPing((current_0) => current_0.left === nextPing_0.left && current_0.right === nextPing_0.right ? current_0 : nextPing_0);
|
|
301
|
+
};
|
|
302
|
+
measure();
|
|
303
|
+
if (typeof ResizeObserver !== "undefined") {
|
|
304
|
+
const observer = new ResizeObserver(measure);
|
|
305
|
+
observer.observe(body_1);
|
|
306
|
+
return () => {
|
|
307
|
+
observer.disconnect();
|
|
308
|
+
cancelAnimationFrame(scrollFrameRef.current);
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
return () => cancelAnimationFrame(scrollFrameRef.current);
|
|
312
|
+
}, [bordered, split]);
|
|
313
|
+
const colgroup = (headerTable = false) => /* @__PURE__ */ jsxs("colgroup", { children: [
|
|
314
|
+
checkable && /* @__PURE__ */ jsx("col", { style: { width: 50 } }),
|
|
315
|
+
leaves.map((column_8) => /* @__PURE__ */ jsx("col", { style: {
|
|
316
|
+
width: column_8.width ?? 150,
|
|
317
|
+
minWidth: column_8.width ?? 150
|
|
318
|
+
} }, column_8.key)),
|
|
319
|
+
headerTable && split && /* @__PURE__ */ jsx("col", { style: { width: scrollbarWidth } })
|
|
320
|
+
] });
|
|
321
|
+
const thead = /* @__PURE__ */ jsx("thead", { children: headerInfo.rows.map((row_4, rowIndex) => /* @__PURE__ */ jsxs("tr", { children: [
|
|
322
|
+
checkable && rowIndex === 0 && /* @__PURE__ */ jsx("th", {
|
|
323
|
+
rowSpan: headerInfo.maxDepth,
|
|
324
|
+
className: clsx("k-table-cell-fix-left", { "k-table-cell-fix-left-last": ping.left }),
|
|
325
|
+
style: {
|
|
326
|
+
left: 0,
|
|
327
|
+
zIndex: 3
|
|
328
|
+
},
|
|
329
|
+
children: /* @__PURE__ */ jsx(checkbox_default, {
|
|
330
|
+
checked: allChecked,
|
|
331
|
+
indeterminate,
|
|
332
|
+
onChange: toggleAll,
|
|
333
|
+
disabled: !enabled.length
|
|
334
|
+
})
|
|
335
|
+
}),
|
|
336
|
+
row_4.map((column_9, index_0) => /* @__PURE__ */ jsx("th", {
|
|
337
|
+
colSpan: column_9.headerColSpan,
|
|
338
|
+
rowSpan: column_9.headerRowSpan,
|
|
339
|
+
className: fixedClass(column_9, leafIndexOf(column_9)),
|
|
340
|
+
style: fixed.header[column_9.key],
|
|
341
|
+
onClick: () => changeSort(column_9),
|
|
342
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
343
|
+
className: "k-table-header-col",
|
|
344
|
+
children: [column_9.renderHeader?.(column_9, index_0) ?? column_9.title, column_9.sorter && /* @__PURE__ */ jsxs("span", {
|
|
345
|
+
className: "k-table-sorter",
|
|
346
|
+
children: [/* @__PURE__ */ jsx(Icon, {
|
|
347
|
+
type: Triangle,
|
|
348
|
+
reverseFill: true,
|
|
349
|
+
className: clsx("k-table-sorter-up", { "k-table-sorter-active": sort.key === column_9.key && sort.order === "asc" })
|
|
350
|
+
}), /* @__PURE__ */ jsx(Icon, {
|
|
351
|
+
type: Triangle,
|
|
352
|
+
reverseFill: true,
|
|
353
|
+
className: clsx("k-table-sorter-down", { "k-table-sorter-active": sort.key === column_9.key && sort.order === "desc" })
|
|
354
|
+
})]
|
|
355
|
+
})]
|
|
356
|
+
})
|
|
357
|
+
}, column_9.key)),
|
|
358
|
+
split && rowIndex === 0 && /* @__PURE__ */ jsx("th", {
|
|
359
|
+
rowSpan: headerInfo.maxDepth,
|
|
360
|
+
className: "k-table-scrollbar-patch",
|
|
361
|
+
style: { width: scrollbarWidth }
|
|
362
|
+
})
|
|
363
|
+
] }, rowIndex)) });
|
|
364
|
+
const renderedRows = useMemo(() => {
|
|
365
|
+
const start = virtualRange.start;
|
|
366
|
+
const end = virtualRange.end;
|
|
367
|
+
return rows.slice(start, end).map((row_5, idx) => ({
|
|
368
|
+
...row_5,
|
|
369
|
+
rowIndex: start + idx
|
|
370
|
+
}));
|
|
371
|
+
}, [rows, virtualRange]);
|
|
372
|
+
const tbody = /* @__PURE__ */ jsxs("tbody", { children: [
|
|
373
|
+
virtualEnabled && virtualRange.offset > 0 && /* @__PURE__ */ jsx("tr", {
|
|
374
|
+
className: "k-table-virtual-spacer k-table-virtual-spacer-top",
|
|
375
|
+
"aria-hidden": "true",
|
|
376
|
+
children: /* @__PURE__ */ jsx("td", {
|
|
377
|
+
colSpan: leaves.length + (checkable ? 1 : 0),
|
|
378
|
+
style: { height: virtualRange.offset }
|
|
379
|
+
})
|
|
380
|
+
}),
|
|
381
|
+
renderedRows.map(({ record: record_7, depth: depth_0, hasChildren, rowIndex: rowIndex_0 }) => /* @__PURE__ */ jsxs("tr", {
|
|
382
|
+
className: virtualEnabled && rowIndex_0 % 2 === 1 ? "k-table-row-even" : void 0,
|
|
383
|
+
style: virtualEnabled ? { height: itemHeight } : void 0,
|
|
384
|
+
onClick: (event_1) => {
|
|
385
|
+
if (event_1.target.closest(".k-checkbox, .k-table-tree-toggle")) return;
|
|
386
|
+
if (expandRowByClick && hasChildren) toggleExpand(record_7);
|
|
387
|
+
onRowClick?.(record_7, rowIndex_0);
|
|
388
|
+
},
|
|
389
|
+
children: [checkable && /* @__PURE__ */ jsx("td", {
|
|
390
|
+
className: clsx("k-table-cell-fix-left", { "k-table-cell-fix-left-last": ping.left }),
|
|
391
|
+
style: {
|
|
392
|
+
width: 50,
|
|
393
|
+
left: 0
|
|
394
|
+
},
|
|
395
|
+
children: /* @__PURE__ */ jsx(checkbox_default, {
|
|
396
|
+
checked: selected.has(keyOf(record_7)),
|
|
397
|
+
disabled: isDisabled(keyOf(record_7)),
|
|
398
|
+
onChange: (event_2) => toggleOne(event_2, record_7)
|
|
399
|
+
})
|
|
400
|
+
}), leaves.map((column_10, colIndex) => {
|
|
401
|
+
const cell_0 = matrix[rowIndex_0]?.[colIndex] ?? {
|
|
402
|
+
rowSpan: 1,
|
|
403
|
+
colSpan: 1,
|
|
404
|
+
show: true
|
|
405
|
+
};
|
|
406
|
+
if (!cell_0.show) return null;
|
|
407
|
+
const value = getRecordValue(record_7, column_10.key);
|
|
408
|
+
const content = column_10.render?.(value, record_7, rowIndex_0, column_10) ?? value;
|
|
409
|
+
return /* @__PURE__ */ jsx("td", {
|
|
410
|
+
rowSpan: cell_0.rowSpan > 1 ? cell_0.rowSpan : void 0,
|
|
411
|
+
colSpan: cell_0.colSpan > 1 ? cell_0.colSpan : void 0,
|
|
412
|
+
className: fixedClass(column_10, colIndex),
|
|
413
|
+
style: fixed.body[column_10.key],
|
|
414
|
+
children: treeEnabled && colIndex === 0 ? /* @__PURE__ */ jsxs("div", {
|
|
415
|
+
className: "k-table-tree-cell",
|
|
416
|
+
style: { paddingLeft: depth_0 * indentSize },
|
|
417
|
+
children: [hasChildren ? /* @__PURE__ */ jsx("button", {
|
|
418
|
+
type: "button",
|
|
419
|
+
className: "k-table-tree-toggle",
|
|
420
|
+
"aria-label": currentExpanded.has(keyOf(record_7)) ? "Collapse row" : "Expand row",
|
|
421
|
+
"aria-expanded": currentExpanded.has(keyOf(record_7)),
|
|
422
|
+
onClick: () => toggleExpand(record_7),
|
|
423
|
+
children: /* @__PURE__ */ jsx(Icon, { type: currentExpanded.has(keyOf(record_7)) ? ChevronDown : ChevronRight })
|
|
424
|
+
}) : /* @__PURE__ */ jsx("span", { className: "k-table-tree-indent" }), /* @__PURE__ */ jsx("span", {
|
|
425
|
+
className: "k-table-tree-content",
|
|
426
|
+
children: content
|
|
427
|
+
})]
|
|
428
|
+
}) : content
|
|
429
|
+
}, column_10.key);
|
|
430
|
+
})]
|
|
431
|
+
}, keyOf(record_7))),
|
|
432
|
+
virtualEnabled && virtualRange.offset + (virtualRange.end - virtualRange.start) * itemHeight < virtualRange.total && /* @__PURE__ */ jsx("tr", {
|
|
433
|
+
className: "k-table-virtual-spacer k-table-virtual-spacer-bottom",
|
|
434
|
+
"aria-hidden": "true",
|
|
435
|
+
children: /* @__PURE__ */ jsx("td", {
|
|
436
|
+
colSpan: leaves.length + (checkable ? 1 : 0),
|
|
437
|
+
style: { height: virtualRange.total - virtualRange.offset - (virtualRange.end - virtualRange.start) * itemHeight }
|
|
438
|
+
})
|
|
439
|
+
})
|
|
440
|
+
] });
|
|
441
|
+
const tableStyle = {
|
|
442
|
+
width: "100%",
|
|
443
|
+
minWidth: typeof scroll.x === "number" ? scroll.x : scroll.x || "100%",
|
|
444
|
+
tableLayout: "fixed"
|
|
445
|
+
};
|
|
446
|
+
const renderTable = (showHeader, showBody, headerTable_0 = false) => /* @__PURE__ */ jsxs("table", {
|
|
447
|
+
style: tableStyle,
|
|
448
|
+
children: [
|
|
449
|
+
colgroup(headerTable_0),
|
|
450
|
+
showHeader && thead,
|
|
451
|
+
showBody && tbody
|
|
452
|
+
]
|
|
453
|
+
});
|
|
454
|
+
const empty = !rows.length || !visibleColumns.length;
|
|
455
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
456
|
+
...rest,
|
|
457
|
+
className: clsx("k-table", {
|
|
458
|
+
"k-table-striped": striped,
|
|
459
|
+
"k-table-sm": size === "small",
|
|
460
|
+
"k-table-lg": size === "large",
|
|
461
|
+
"k-table-bordered": bordered,
|
|
462
|
+
"k-table-has-footer": !!footer,
|
|
463
|
+
[`k-table-${shape}`]: shape,
|
|
464
|
+
"k-table-ping-left": ping.left,
|
|
465
|
+
"k-table-ping-right": ping.right,
|
|
466
|
+
"k-table-virtual": virtualEnabled
|
|
467
|
+
}, className),
|
|
468
|
+
children: [
|
|
469
|
+
header && /* @__PURE__ */ jsx("div", {
|
|
470
|
+
className: "k-table-header",
|
|
471
|
+
children: header
|
|
472
|
+
}),
|
|
473
|
+
split && /* @__PURE__ */ jsx("div", {
|
|
474
|
+
className: "k-table-thead",
|
|
475
|
+
ref: headerRef,
|
|
476
|
+
style: { overflow: "hidden" },
|
|
477
|
+
children: renderTable(true, false, true)
|
|
478
|
+
}),
|
|
479
|
+
/* @__PURE__ */ jsxs("div", {
|
|
480
|
+
className: "k-table-body k-scroll",
|
|
481
|
+
ref: bodyRef,
|
|
482
|
+
style: {
|
|
483
|
+
overflowY: scroll.y ? "scroll" : "auto",
|
|
484
|
+
overflowX: data.length ? "auto" : "hidden",
|
|
485
|
+
maxHeight: scroll.y
|
|
486
|
+
},
|
|
487
|
+
onScroll: handleScroll,
|
|
488
|
+
children: [
|
|
489
|
+
renderTable(!split, true),
|
|
490
|
+
empty && loading && /* @__PURE__ */ jsx("div", {
|
|
491
|
+
className: "k-table-loading-placeholder",
|
|
492
|
+
"aria-hidden": "true"
|
|
493
|
+
}),
|
|
494
|
+
empty && !loading && /* @__PURE__ */ jsx(Empty, { description: emptyText })
|
|
495
|
+
]
|
|
496
|
+
}),
|
|
497
|
+
footer && /* @__PURE__ */ jsx("div", {
|
|
498
|
+
className: "k-table-footer",
|
|
499
|
+
children: footer
|
|
500
|
+
}),
|
|
501
|
+
loading && /* @__PURE__ */ jsx(Spin, {})
|
|
502
|
+
]
|
|
503
|
+
});
|
|
504
|
+
}
|
|
505
|
+
//#endregion
|
|
506
|
+
export { TableColumnSetting, Table as default };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* react-kui v3.0.0
|
|
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/table/utils.ts
|
|
10
|
+
var flattenColumns = (columns) => columns.flatMap((column) => column.children?.length ? flattenColumns(column.children) : column);
|
|
11
|
+
var countColumnLeaves = (column) => column.children?.length ? column.children.reduce((sum, child) => sum + countColumnLeaves(child), 0) : 1;
|
|
12
|
+
var getRecordValue = (record, key) => key in record ? record[key] : void 0;
|
|
13
|
+
var getTreeChildren = (record, childrenColumnName) => {
|
|
14
|
+
const children = getRecordValue(record, childrenColumnName);
|
|
15
|
+
return Array.isArray(children) ? children : [];
|
|
16
|
+
};
|
|
17
|
+
var flattenTreeData = ({ data, childrenColumnName, expandedKeys, getKey, sortRecords = (records) => records }) => {
|
|
18
|
+
const rows = [];
|
|
19
|
+
const visit = (records, depth) => {
|
|
20
|
+
sortRecords(records).forEach((record) => {
|
|
21
|
+
const children = getTreeChildren(record, childrenColumnName);
|
|
22
|
+
rows.push({
|
|
23
|
+
record,
|
|
24
|
+
depth,
|
|
25
|
+
hasChildren: children.length > 0
|
|
26
|
+
});
|
|
27
|
+
if (children.length && (!expandedKeys || expandedKeys.has(getKey(record)))) visit(children, depth + 1);
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
visit(data, 0);
|
|
31
|
+
return rows;
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
export { countColumnLeaves, flattenColumns, flattenTreeData, getRecordValue, getTreeChildren };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* react-kui v3.0.0
|
|
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 { c } from "react/compiler-runtime";
|
|
10
|
+
import clsx from "clsx";
|
|
11
|
+
import "react";
|
|
12
|
+
import { jsx } from "react/jsx-runtime";
|
|
13
|
+
//#region components/tabs/tab-panel.tsx
|
|
14
|
+
var TabPanel = (props) => {
|
|
15
|
+
const $ = c(19);
|
|
16
|
+
let activeKey;
|
|
17
|
+
let children;
|
|
18
|
+
let rest;
|
|
19
|
+
let t0;
|
|
20
|
+
let tabKey;
|
|
21
|
+
let tabsId;
|
|
22
|
+
if ($[0] !== props) {
|
|
23
|
+
({tabKey, activeKey, tabsId, children, className: t0, ...rest} = props);
|
|
24
|
+
$[0] = props;
|
|
25
|
+
$[1] = activeKey;
|
|
26
|
+
$[2] = children;
|
|
27
|
+
$[3] = rest;
|
|
28
|
+
$[4] = t0;
|
|
29
|
+
$[5] = tabKey;
|
|
30
|
+
$[6] = tabsId;
|
|
31
|
+
} else {
|
|
32
|
+
activeKey = $[1];
|
|
33
|
+
children = $[2];
|
|
34
|
+
rest = $[3];
|
|
35
|
+
t0 = $[4];
|
|
36
|
+
tabKey = $[5];
|
|
37
|
+
tabsId = $[6];
|
|
38
|
+
}
|
|
39
|
+
const className = t0 === void 0 ? "" : t0;
|
|
40
|
+
let domProps;
|
|
41
|
+
if ($[7] !== rest) {
|
|
42
|
+
domProps = {
|
|
43
|
+
...rest,
|
|
44
|
+
title: void 0
|
|
45
|
+
};
|
|
46
|
+
delete domProps.icon;
|
|
47
|
+
delete domProps.disabled;
|
|
48
|
+
delete domProps.closable;
|
|
49
|
+
$[7] = rest;
|
|
50
|
+
$[8] = domProps;
|
|
51
|
+
} else domProps = $[8];
|
|
52
|
+
const htmlProps = domProps;
|
|
53
|
+
const isActive = tabKey !== void 0 && String(activeKey) === String(tabKey);
|
|
54
|
+
let t1;
|
|
55
|
+
if ($[9] !== className || $[10] !== isActive) {
|
|
56
|
+
t1 = clsx("k-tabs-tabpanel", { "k-tabs-tabpanel-active": isActive }, className);
|
|
57
|
+
$[9] = className;
|
|
58
|
+
$[10] = isActive;
|
|
59
|
+
$[11] = t1;
|
|
60
|
+
} else t1 = $[11];
|
|
61
|
+
const t2 = tabKey !== void 0 ? `${tabsId}-panel-${String(tabKey)}` : void 0;
|
|
62
|
+
const t3 = tabKey !== void 0 ? `${tabsId}-tab-${String(tabKey)}` : void 0;
|
|
63
|
+
const t4 = !isActive;
|
|
64
|
+
let t5;
|
|
65
|
+
if ($[12] !== children || $[13] !== htmlProps || $[14] !== t1 || $[15] !== t2 || $[16] !== t3 || $[17] !== t4) {
|
|
66
|
+
t5 = /* @__PURE__ */ jsx("div", {
|
|
67
|
+
className: t1,
|
|
68
|
+
id: t2,
|
|
69
|
+
role: "tabpanel",
|
|
70
|
+
"aria-labelledby": t3,
|
|
71
|
+
"aria-hidden": t4,
|
|
72
|
+
...htmlProps,
|
|
73
|
+
children
|
|
74
|
+
});
|
|
75
|
+
$[12] = children;
|
|
76
|
+
$[13] = htmlProps;
|
|
77
|
+
$[14] = t1;
|
|
78
|
+
$[15] = t2;
|
|
79
|
+
$[16] = t3;
|
|
80
|
+
$[17] = t4;
|
|
81
|
+
$[18] = t5;
|
|
82
|
+
} else t5 = $[18];
|
|
83
|
+
return t5;
|
|
84
|
+
};
|
|
85
|
+
//#endregion
|
|
86
|
+
export { TabPanel as default };
|