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/checkbox/checkbox.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
|
|
@@ -9,16 +9,17 @@
|
|
|
9
9
|
import { useConfigAppearance } from "../config/use-config-appearance.js";
|
|
10
10
|
import { Check } from "../node_modules/.pnpm/kui-icons@5.0.0/node_modules/kui-icons/dist/kui-icons.esm.js";
|
|
11
11
|
import Icon from "../icon/index.js";
|
|
12
|
+
import { useValue } from "../utils/use-value.js";
|
|
12
13
|
import { createFormFieldComponent } from "../form/field-context.js";
|
|
13
14
|
import { getValueWithType } from "../utils/checked.js";
|
|
14
15
|
import { CheckboxGroupContext } from "./checkbox-group-context.js";
|
|
15
16
|
import { c } from "react/compiler-runtime";
|
|
16
17
|
import clsx from "clsx";
|
|
17
|
-
import { useContext, useLayoutEffect, useRef
|
|
18
|
+
import { useContext, useLayoutEffect, useRef } from "react";
|
|
18
19
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
20
|
//#region components/checkbox/checkbox.tsx
|
|
20
21
|
var Checkbox = (t0) => {
|
|
21
|
-
const $ = c(
|
|
22
|
+
const $ = c(77);
|
|
22
23
|
let ariaDescribedby;
|
|
23
24
|
let ariaInvalid;
|
|
24
25
|
let ariaLabelledby;
|
|
@@ -28,6 +29,7 @@ var Checkbox = (t0) => {
|
|
|
28
29
|
let id;
|
|
29
30
|
let label;
|
|
30
31
|
let onChange;
|
|
32
|
+
let onClick;
|
|
31
33
|
let rest;
|
|
32
34
|
let sizeProp;
|
|
33
35
|
let t1;
|
|
@@ -35,11 +37,10 @@ var Checkbox = (t0) => {
|
|
|
35
37
|
let t3;
|
|
36
38
|
let t4;
|
|
37
39
|
let t5;
|
|
38
|
-
let t6;
|
|
39
40
|
let themeProp;
|
|
40
41
|
let value;
|
|
41
42
|
if ($[0] !== t0) {
|
|
42
|
-
({checked,
|
|
43
|
+
({checked, valueType: t1, value, label, theme: themeProp, disabled: t2, readOnly: t3, indeterminate: t4, size: sizeProp, onChange, children, className: t5, id, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, onClick, ...rest} = t0);
|
|
43
44
|
$[0] = t0;
|
|
44
45
|
$[1] = ariaDescribedby;
|
|
45
46
|
$[2] = ariaInvalid;
|
|
@@ -50,14 +51,14 @@ var Checkbox = (t0) => {
|
|
|
50
51
|
$[7] = id;
|
|
51
52
|
$[8] = label;
|
|
52
53
|
$[9] = onChange;
|
|
53
|
-
$[10] =
|
|
54
|
-
$[11] =
|
|
55
|
-
$[12] =
|
|
56
|
-
$[13] =
|
|
57
|
-
$[14] =
|
|
58
|
-
$[15] =
|
|
59
|
-
$[16] =
|
|
60
|
-
$[17] =
|
|
54
|
+
$[10] = onClick;
|
|
55
|
+
$[11] = rest;
|
|
56
|
+
$[12] = sizeProp;
|
|
57
|
+
$[13] = t1;
|
|
58
|
+
$[14] = t2;
|
|
59
|
+
$[15] = t3;
|
|
60
|
+
$[16] = t4;
|
|
61
|
+
$[17] = t5;
|
|
61
62
|
$[18] = themeProp;
|
|
62
63
|
$[19] = value;
|
|
63
64
|
} else {
|
|
@@ -70,23 +71,22 @@ var Checkbox = (t0) => {
|
|
|
70
71
|
id = $[7];
|
|
71
72
|
label = $[8];
|
|
72
73
|
onChange = $[9];
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
74
|
+
onClick = $[10];
|
|
75
|
+
rest = $[11];
|
|
76
|
+
sizeProp = $[12];
|
|
77
|
+
t1 = $[13];
|
|
78
|
+
t2 = $[14];
|
|
79
|
+
t3 = $[15];
|
|
80
|
+
t4 = $[16];
|
|
81
|
+
t5 = $[17];
|
|
81
82
|
themeProp = $[18];
|
|
82
83
|
value = $[19];
|
|
83
84
|
}
|
|
84
|
-
const
|
|
85
|
-
const
|
|
86
|
-
const
|
|
87
|
-
const
|
|
88
|
-
const
|
|
89
|
-
const className = t6 === void 0 ? "" : t6;
|
|
85
|
+
const valueType = t1 === void 0 ? "boolean" : t1;
|
|
86
|
+
const disabled = t2 === void 0 ? false : t2;
|
|
87
|
+
const readOnly = t3 === void 0 ? false : t3;
|
|
88
|
+
const indeterminate = t4 === void 0 ? false : t4;
|
|
89
|
+
const className = t5 === void 0 ? "" : t5;
|
|
90
90
|
const inheritedAppearance = useConfigAppearance();
|
|
91
91
|
const theme = themeProp ?? inheritedAppearance.theme ?? "fill";
|
|
92
92
|
const size = sizeProp ?? inheritedAppearance.size;
|
|
@@ -94,16 +94,16 @@ var Checkbox = (t0) => {
|
|
|
94
94
|
const inputRef = useRef(null);
|
|
95
95
|
const isGroup = !!group;
|
|
96
96
|
const groupChecked = isGroup && group.value ? group.value.indexOf(value) > -1 : false;
|
|
97
|
-
const [localChecked, setLocalChecked] =
|
|
98
|
-
const isChecked = isGroup ? groupChecked :
|
|
97
|
+
const [localChecked, setLocalChecked] = useValue(checked, _temp);
|
|
98
|
+
const isChecked = isGroup ? groupChecked : localChecked;
|
|
99
99
|
const currentDisabled = disabled || isGroup && group.disabled;
|
|
100
100
|
const currentReadOnly = readOnly || Boolean(isGroup && group.readOnly);
|
|
101
101
|
const currentTheme = themeProp ?? group?.theme ?? theme;
|
|
102
102
|
const currentSize = sizeProp ?? group?.size ?? size;
|
|
103
|
-
let
|
|
104
|
-
if ($[20] !==
|
|
105
|
-
|
|
106
|
-
if (!isGroup
|
|
103
|
+
let t6;
|
|
104
|
+
if ($[20] !== children || $[21] !== group || $[22] !== isGroup || $[23] !== label || $[24] !== onChange || $[25] !== setLocalChecked || $[26] !== value || $[27] !== valueType) {
|
|
105
|
+
t6 = (newChecked) => {
|
|
106
|
+
if (!isGroup) setLocalChecked(newChecked);
|
|
107
107
|
const labelVal = label ?? children ?? (typeof value === "string" || typeof value === "number" ? value : void 0);
|
|
108
108
|
const eventObj = {
|
|
109
109
|
checked: newChecked,
|
|
@@ -113,52 +113,52 @@ var Checkbox = (t0) => {
|
|
|
113
113
|
onChange?.(eventObj);
|
|
114
114
|
group?.onChange?.(eventObj);
|
|
115
115
|
};
|
|
116
|
-
$[20] =
|
|
117
|
-
$[21] =
|
|
118
|
-
$[22] =
|
|
119
|
-
$[23] =
|
|
120
|
-
$[24] =
|
|
121
|
-
$[25] =
|
|
116
|
+
$[20] = children;
|
|
117
|
+
$[21] = group;
|
|
118
|
+
$[22] = isGroup;
|
|
119
|
+
$[23] = label;
|
|
120
|
+
$[24] = onChange;
|
|
121
|
+
$[25] = setLocalChecked;
|
|
122
122
|
$[26] = value;
|
|
123
123
|
$[27] = valueType;
|
|
124
|
-
$[28] =
|
|
125
|
-
} else
|
|
126
|
-
const emitValue =
|
|
127
|
-
let
|
|
124
|
+
$[28] = t6;
|
|
125
|
+
} else t6 = $[28];
|
|
126
|
+
const emitValue = t6;
|
|
127
|
+
let t7;
|
|
128
128
|
if ($[29] !== currentDisabled || $[30] !== currentReadOnly || $[31] !== emitValue) {
|
|
129
|
-
|
|
129
|
+
t7 = (e) => {
|
|
130
130
|
if (currentDisabled || currentReadOnly) return;
|
|
131
131
|
emitValue(e.target.checked);
|
|
132
132
|
};
|
|
133
133
|
$[29] = currentDisabled;
|
|
134
134
|
$[30] = currentReadOnly;
|
|
135
135
|
$[31] = emitValue;
|
|
136
|
-
$[32] =
|
|
137
|
-
} else
|
|
138
|
-
const handleInputChange =
|
|
139
|
-
let
|
|
136
|
+
$[32] = t7;
|
|
137
|
+
} else t7 = $[32];
|
|
138
|
+
const handleInputChange = t7;
|
|
139
|
+
let t8;
|
|
140
140
|
if ($[33] !== indeterminate) {
|
|
141
|
-
|
|
141
|
+
t8 = () => {
|
|
142
142
|
if (inputRef.current) inputRef.current.indeterminate = indeterminate;
|
|
143
143
|
};
|
|
144
144
|
$[33] = indeterminate;
|
|
145
|
-
$[34] =
|
|
146
|
-
} else
|
|
147
|
-
useLayoutEffect(
|
|
148
|
-
const
|
|
149
|
-
const
|
|
150
|
-
const
|
|
151
|
-
const
|
|
152
|
-
let
|
|
153
|
-
if ($[35] !== className || $[36] !== currentDisabled || $[37] !== currentReadOnly || $[38] !== indeterminate || $[39] !== t10 || $[40] !== t11 || $[41] !== t12 || $[42] !==
|
|
154
|
-
|
|
155
|
-
"k-checkbox-fill":
|
|
145
|
+
$[34] = t8;
|
|
146
|
+
} else t8 = $[34];
|
|
147
|
+
useLayoutEffect(t8);
|
|
148
|
+
const t9 = currentTheme === "fill";
|
|
149
|
+
const t10 = isChecked && !indeterminate;
|
|
150
|
+
const t11 = currentSize === "small";
|
|
151
|
+
const t12 = currentSize === "large";
|
|
152
|
+
let t13;
|
|
153
|
+
if ($[35] !== className || $[36] !== currentDisabled || $[37] !== currentReadOnly || $[38] !== indeterminate || $[39] !== t10 || $[40] !== t11 || $[41] !== t12 || $[42] !== t9) {
|
|
154
|
+
t13 = clsx("k-checkbox", {
|
|
155
|
+
"k-checkbox-fill": t9,
|
|
156
156
|
"k-checkbox-disabled": currentDisabled,
|
|
157
157
|
"k-checkbox-readonly": currentReadOnly,
|
|
158
|
-
"k-checkbox-checked":
|
|
158
|
+
"k-checkbox-checked": t10,
|
|
159
159
|
"k-checkbox-indeterminate": indeterminate,
|
|
160
|
-
"k-checkbox-sm":
|
|
161
|
-
"k-checkbox-lg":
|
|
160
|
+
"k-checkbox-sm": t11,
|
|
161
|
+
"k-checkbox-lg": t12
|
|
162
162
|
}, className);
|
|
163
163
|
$[35] = className;
|
|
164
164
|
$[36] = currentDisabled;
|
|
@@ -167,33 +167,47 @@ var Checkbox = (t0) => {
|
|
|
167
167
|
$[39] = t10;
|
|
168
168
|
$[40] = t11;
|
|
169
169
|
$[41] = t12;
|
|
170
|
-
$[42] =
|
|
171
|
-
$[43] =
|
|
172
|
-
} else
|
|
173
|
-
const rootClasses =
|
|
174
|
-
let
|
|
170
|
+
$[42] = t9;
|
|
171
|
+
$[43] = t13;
|
|
172
|
+
} else t13 = $[43];
|
|
173
|
+
const rootClasses = t13;
|
|
174
|
+
let t14;
|
|
175
175
|
if ($[44] !== indeterminate || $[45] !== isChecked) {
|
|
176
|
-
|
|
176
|
+
t14 = isChecked && !indeterminate ? /* @__PURE__ */ jsx(Icon, { type: Check }) : null;
|
|
177
177
|
$[44] = indeterminate;
|
|
178
178
|
$[45] = isChecked;
|
|
179
|
-
$[46] =
|
|
180
|
-
} else
|
|
181
|
-
const innerNode =
|
|
179
|
+
$[46] = t14;
|
|
180
|
+
} else t14 = $[46];
|
|
181
|
+
const innerNode = t14;
|
|
182
182
|
const labelNode = label ?? children;
|
|
183
|
-
const
|
|
183
|
+
const t15 = currentReadOnly || void 0;
|
|
184
|
+
let t16;
|
|
185
|
+
if ($[47] !== currentDisabled || $[48] !== onClick) {
|
|
186
|
+
t16 = (event) => {
|
|
187
|
+
if (currentDisabled) {
|
|
188
|
+
event.preventDefault();
|
|
189
|
+
event.stopPropagation();
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
onClick?.(event);
|
|
193
|
+
};
|
|
194
|
+
$[47] = currentDisabled;
|
|
195
|
+
$[48] = onClick;
|
|
196
|
+
$[49] = t16;
|
|
197
|
+
} else t16 = $[49];
|
|
184
198
|
const t17 = indeterminate ? "mixed" : isChecked;
|
|
185
199
|
const t18 = currentReadOnly || void 0;
|
|
186
200
|
let t19;
|
|
187
|
-
if ($[
|
|
188
|
-
t19 = (
|
|
189
|
-
if (currentReadOnly)
|
|
201
|
+
if ($[50] !== currentReadOnly) {
|
|
202
|
+
t19 = (event_0) => {
|
|
203
|
+
if (currentReadOnly) event_0.preventDefault();
|
|
190
204
|
};
|
|
191
|
-
$[
|
|
192
|
-
$[
|
|
193
|
-
} else t19 = $[
|
|
205
|
+
$[50] = currentReadOnly;
|
|
206
|
+
$[51] = t19;
|
|
207
|
+
} else t19 = $[51];
|
|
194
208
|
const t20 = !!isChecked;
|
|
195
209
|
let t21;
|
|
196
|
-
if ($[
|
|
210
|
+
if ($[52] !== ariaDescribedby || $[53] !== ariaInvalid || $[54] !== ariaLabelledby || $[55] !== ariaRequired || $[56] !== currentDisabled || $[57] !== currentReadOnly || $[58] !== handleInputChange || $[59] !== id || $[60] !== t17 || $[61] !== t18 || $[62] !== t19 || $[63] !== t20) {
|
|
197
211
|
t21 = /* @__PURE__ */ jsx("input", {
|
|
198
212
|
id,
|
|
199
213
|
type: "checkbox",
|
|
@@ -211,54 +225,56 @@ var Checkbox = (t0) => {
|
|
|
211
225
|
checked: t20,
|
|
212
226
|
onChange: handleInputChange
|
|
213
227
|
});
|
|
214
|
-
$[
|
|
215
|
-
$[
|
|
216
|
-
$[
|
|
217
|
-
$[
|
|
218
|
-
$[
|
|
219
|
-
$[
|
|
220
|
-
$[
|
|
221
|
-
$[
|
|
222
|
-
$[
|
|
223
|
-
$[
|
|
224
|
-
$[
|
|
225
|
-
$[
|
|
226
|
-
$[
|
|
227
|
-
} else t21 = $[
|
|
228
|
+
$[52] = ariaDescribedby;
|
|
229
|
+
$[53] = ariaInvalid;
|
|
230
|
+
$[54] = ariaLabelledby;
|
|
231
|
+
$[55] = ariaRequired;
|
|
232
|
+
$[56] = currentDisabled;
|
|
233
|
+
$[57] = currentReadOnly;
|
|
234
|
+
$[58] = handleInputChange;
|
|
235
|
+
$[59] = id;
|
|
236
|
+
$[60] = t17;
|
|
237
|
+
$[61] = t18;
|
|
238
|
+
$[62] = t19;
|
|
239
|
+
$[63] = t20;
|
|
240
|
+
$[64] = t21;
|
|
241
|
+
} else t21 = $[64];
|
|
228
242
|
let t22;
|
|
229
|
-
if ($[
|
|
243
|
+
if ($[65] !== innerNode || $[66] !== t21) {
|
|
230
244
|
t22 = /* @__PURE__ */ jsxs("span", {
|
|
231
245
|
className: "k-checkbox-symbol",
|
|
232
246
|
children: [t21, innerNode]
|
|
233
247
|
});
|
|
234
|
-
$[
|
|
235
|
-
$[
|
|
236
|
-
$[
|
|
237
|
-
} else t22 = $[
|
|
248
|
+
$[65] = innerNode;
|
|
249
|
+
$[66] = t21;
|
|
250
|
+
$[67] = t22;
|
|
251
|
+
} else t22 = $[67];
|
|
238
252
|
let t23;
|
|
239
|
-
if ($[
|
|
253
|
+
if ($[68] !== labelNode) {
|
|
240
254
|
t23 = labelNode ? /* @__PURE__ */ jsx("span", {
|
|
241
255
|
className: "k-checkbox-label",
|
|
242
256
|
children: labelNode
|
|
243
257
|
}) : null;
|
|
244
|
-
$[
|
|
245
|
-
$[
|
|
246
|
-
} else t23 = $[
|
|
258
|
+
$[68] = labelNode;
|
|
259
|
+
$[69] = t23;
|
|
260
|
+
} else t23 = $[69];
|
|
247
261
|
let t24;
|
|
248
|
-
if ($[
|
|
262
|
+
if ($[70] !== rest || $[71] !== rootClasses || $[72] !== t15 || $[73] !== t16 || $[74] !== t22 || $[75] !== t23) {
|
|
249
263
|
t24 = /* @__PURE__ */ jsxs("label", {
|
|
250
264
|
className: rootClasses,
|
|
251
|
-
"aria-readonly":
|
|
265
|
+
"aria-readonly": t15,
|
|
252
266
|
...rest,
|
|
267
|
+
onClick: t16,
|
|
253
268
|
children: [t22, t23]
|
|
254
269
|
});
|
|
255
|
-
$[
|
|
256
|
-
$[
|
|
257
|
-
$[
|
|
258
|
-
$[
|
|
259
|
-
$[
|
|
260
|
-
$[
|
|
261
|
-
|
|
270
|
+
$[70] = rest;
|
|
271
|
+
$[71] = rootClasses;
|
|
272
|
+
$[72] = t15;
|
|
273
|
+
$[73] = t16;
|
|
274
|
+
$[74] = t22;
|
|
275
|
+
$[75] = t23;
|
|
276
|
+
$[76] = t24;
|
|
277
|
+
} else t24 = $[76];
|
|
262
278
|
return t24;
|
|
263
279
|
};
|
|
264
280
|
var checkbox_default = createFormFieldComponent(Checkbox, {
|
|
@@ -266,5 +282,8 @@ var checkbox_default = createFormFieldComponent(Checkbox, {
|
|
|
266
282
|
getFieldValue: (value) => value === true || value === 1 || value === "1",
|
|
267
283
|
getChangeValue: (event) => event.checked
|
|
268
284
|
});
|
|
285
|
+
function _temp(next) {
|
|
286
|
+
return next ?? false;
|
|
287
|
+
}
|
|
269
288
|
//#endregion
|
|
270
289
|
export { checkbox_default as default };
|
package/es/checkbox/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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
|
|
6
6
|
* Author: Qiu / https://chuchur.com
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
import { Transition } from "../base/transition.js";
|
|
9
10
|
import { ChevronUp } from "../node_modules/.pnpm/kui-icons@5.0.0/node_modules/kui-icons/dist/kui-icons.esm.js";
|
|
10
11
|
import Icon from "../icon/index.js";
|
|
11
|
-
import { Transition } from "../base/transition.js";
|
|
12
12
|
import { c } from "react/compiler-runtime";
|
|
13
13
|
import clsx from "clsx";
|
|
14
14
|
import "react";
|
package/es/collapse/collapse.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
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
|
|
6
6
|
* Author: Qiu / https://chuchur.com
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { normalizeSurfaceShape, useConfigAppearance } from "../config/use-config-appearance.js";
|
|
10
9
|
import { getChildren } from "../utils/react-node.js";
|
|
10
|
+
import { normalizeSurfaceShape, useConfigAppearance } from "../config/use-config-appearance.js";
|
|
11
|
+
import { useValue } from "../utils/use-value.js";
|
|
11
12
|
import { c } from "react/compiler-runtime";
|
|
12
13
|
import clsx from "clsx";
|
|
13
14
|
import React, { useState } from "react";
|
|
14
15
|
import { jsx } from "react/jsx-runtime";
|
|
15
16
|
//#region components/collapse/collapse.tsx
|
|
16
17
|
var Collapse = (t0) => {
|
|
17
|
-
const $ = c(
|
|
18
|
+
const $ = c(46);
|
|
18
19
|
let children;
|
|
19
20
|
let onChange;
|
|
20
21
|
let onOpenKeysChange;
|
|
@@ -24,10 +25,9 @@ var Collapse = (t0) => {
|
|
|
24
25
|
let t1;
|
|
25
26
|
let t2;
|
|
26
27
|
let t3;
|
|
27
|
-
let t4;
|
|
28
28
|
let themeProp;
|
|
29
29
|
if ($[0] !== t0) {
|
|
30
|
-
({openKeys,
|
|
30
|
+
({openKeys, accordion: t1, sample: t2, theme: themeProp, shape: shapeProp, onChange, onOpenKeysChange, children, className: t3, ...rest} = t0);
|
|
31
31
|
$[0] = t0;
|
|
32
32
|
$[1] = children;
|
|
33
33
|
$[2] = onChange;
|
|
@@ -38,8 +38,7 @@ var Collapse = (t0) => {
|
|
|
38
38
|
$[7] = t1;
|
|
39
39
|
$[8] = t2;
|
|
40
40
|
$[9] = t3;
|
|
41
|
-
$[10] =
|
|
42
|
-
$[11] = themeProp;
|
|
41
|
+
$[10] = themeProp;
|
|
43
42
|
} else {
|
|
44
43
|
children = $[1];
|
|
45
44
|
onChange = $[2];
|
|
@@ -50,88 +49,79 @@ var Collapse = (t0) => {
|
|
|
50
49
|
t1 = $[7];
|
|
51
50
|
t2 = $[8];
|
|
52
51
|
t3 = $[9];
|
|
53
|
-
|
|
54
|
-
themeProp = $[11];
|
|
52
|
+
themeProp = $[10];
|
|
55
53
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
$[12] = t1;
|
|
60
|
-
$[13] = t5;
|
|
61
|
-
} else t5 = $[13];
|
|
62
|
-
const defaultOpenKeys = t5;
|
|
63
|
-
const accordion = t2 === void 0 ? false : t2;
|
|
64
|
-
const sample = t3 === void 0 ? false : t3;
|
|
65
|
-
const className = t4 === void 0 ? "" : t4;
|
|
54
|
+
const accordion = t1 === void 0 ? false : t1;
|
|
55
|
+
const sample = t2 === void 0 ? false : t2;
|
|
56
|
+
const className = t3 === void 0 ? "" : t3;
|
|
66
57
|
const inheritedAppearance = useConfigAppearance();
|
|
67
58
|
const theme = themeProp ?? inheritedAppearance.theme ?? "outline";
|
|
68
|
-
const
|
|
69
|
-
let
|
|
70
|
-
if ($[
|
|
71
|
-
|
|
59
|
+
const t4 = shapeProp ?? inheritedAppearance.shape ?? "round";
|
|
60
|
+
let t5;
|
|
61
|
+
if ($[11] !== t4) {
|
|
62
|
+
t5 = normalizeSurfaceShape(t4);
|
|
63
|
+
$[11] = t4;
|
|
64
|
+
$[12] = t5;
|
|
65
|
+
} else t5 = $[12];
|
|
66
|
+
const shape = t5;
|
|
67
|
+
const [innerActiveKeys, setInnerActiveKeys] = useValue(openKeys, _temp);
|
|
68
|
+
const activeKeys = innerActiveKeys;
|
|
69
|
+
let t6;
|
|
70
|
+
if ($[13] !== openKeys) {
|
|
71
|
+
t6 = () => new Map((openKeys ?? []).map(_temp2));
|
|
72
|
+
$[13] = openKeys;
|
|
72
73
|
$[14] = t6;
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
const shape = t7;
|
|
76
|
-
const [innerActiveKeys, setInnerActiveKeys] = useState(defaultOpenKeys);
|
|
77
|
-
const activeKeys = openKeys ?? innerActiveKeys;
|
|
78
|
-
let t8;
|
|
79
|
-
if ($[16] !== defaultOpenKeys || $[17] !== openKeys) {
|
|
80
|
-
t8 = () => new Map([...defaultOpenKeys, ...openKeys ?? []].map(_temp));
|
|
81
|
-
$[16] = defaultOpenKeys;
|
|
82
|
-
$[17] = openKeys;
|
|
83
|
-
$[18] = t8;
|
|
84
|
-
} else t8 = $[18];
|
|
85
|
-
const [keyRegistry, setKeyRegistry] = useState(t8);
|
|
74
|
+
} else t6 = $[14];
|
|
75
|
+
const [keyRegistry, setKeyRegistry] = useState(t6);
|
|
86
76
|
let resolvedKeys;
|
|
87
|
-
if ($[
|
|
77
|
+
if ($[15] !== activeKeys || $[16] !== keyRegistry) {
|
|
88
78
|
resolvedKeys = new Map(keyRegistry);
|
|
89
79
|
activeKeys.forEach((key_0) => resolvedKeys.set(String(key_0), key_0));
|
|
90
|
-
$[
|
|
91
|
-
$[
|
|
92
|
-
$[
|
|
93
|
-
} else resolvedKeys = $[
|
|
80
|
+
$[15] = activeKeys;
|
|
81
|
+
$[16] = keyRegistry;
|
|
82
|
+
$[17] = resolvedKeys;
|
|
83
|
+
} else resolvedKeys = $[17];
|
|
94
84
|
if (activeKeys.some((key_1) => keyRegistry.get(String(key_1)) !== key_1)) setKeyRegistry(resolvedKeys);
|
|
95
|
-
const keysEqual =
|
|
96
|
-
let
|
|
97
|
-
if ($[
|
|
98
|
-
|
|
85
|
+
const keysEqual = _temp3;
|
|
86
|
+
let t7;
|
|
87
|
+
if ($[18] !== accordion || $[19] !== activeKeys || $[20] !== onChange || $[21] !== onOpenKeysChange || $[22] !== setInnerActiveKeys) {
|
|
88
|
+
t7 = (key_2) => {
|
|
99
89
|
if (!key_2 && key_2 !== 0) return;
|
|
100
90
|
let nextKeys = [...activeKeys];
|
|
101
91
|
if (nextKeys.findIndex((item) => keysEqual(item, key_2)) >= 0) nextKeys = accordion ? [] : nextKeys.filter((k) => !keysEqual(k, key_2));
|
|
102
92
|
else nextKeys = accordion ? [key_2] : [...nextKeys, key_2];
|
|
103
|
-
|
|
93
|
+
setInnerActiveKeys(nextKeys);
|
|
104
94
|
onOpenKeysChange?.(nextKeys);
|
|
105
95
|
onChange?.(key_2);
|
|
106
96
|
};
|
|
107
|
-
$[
|
|
108
|
-
$[
|
|
109
|
-
$[
|
|
110
|
-
$[
|
|
111
|
-
$[
|
|
112
|
-
$[
|
|
113
|
-
} else
|
|
114
|
-
const handleExpand =
|
|
97
|
+
$[18] = accordion;
|
|
98
|
+
$[19] = activeKeys;
|
|
99
|
+
$[20] = onChange;
|
|
100
|
+
$[21] = onOpenKeysChange;
|
|
101
|
+
$[22] = setInnerActiveKeys;
|
|
102
|
+
$[23] = t7;
|
|
103
|
+
} else t7 = $[23];
|
|
104
|
+
const handleExpand = t7;
|
|
105
|
+
let t8;
|
|
106
|
+
if ($[24] !== className || $[25] !== sample || $[26] !== shape || $[27] !== theme) {
|
|
107
|
+
t8 = clsx("k-collapse", { "k-collapse-sample": sample }, `k-collapse-${theme}`, `k-collapse-${shape}`, className);
|
|
108
|
+
$[24] = className;
|
|
109
|
+
$[25] = sample;
|
|
110
|
+
$[26] = shape;
|
|
111
|
+
$[27] = theme;
|
|
112
|
+
$[28] = t8;
|
|
113
|
+
} else t8 = $[28];
|
|
114
|
+
const classes = t8;
|
|
115
115
|
let t10;
|
|
116
|
-
if ($[28] !== className || $[29] !== sample || $[30] !== shape || $[31] !== theme) {
|
|
117
|
-
t10 = clsx("k-collapse", { "k-collapse-sample": sample }, `k-collapse-${theme}`, `k-collapse-${shape}`, className);
|
|
118
|
-
$[28] = className;
|
|
119
|
-
$[29] = sample;
|
|
120
|
-
$[30] = shape;
|
|
121
|
-
$[31] = theme;
|
|
122
|
-
$[32] = t10;
|
|
123
|
-
} else t10 = $[32];
|
|
124
|
-
const classes = t10;
|
|
125
116
|
let t11;
|
|
126
|
-
let
|
|
127
|
-
|
|
128
|
-
if ($[33] !== activeKeys || $[34] !== children || $[35] !== classes || $[36] !== handleExpand || $[37] !== resolvedKeys || $[38] !== rest) {
|
|
117
|
+
let t9;
|
|
118
|
+
if ($[29] !== activeKeys || $[30] !== children || $[31] !== classes || $[32] !== handleExpand || $[33] !== resolvedKeys || $[34] !== rest) {
|
|
129
119
|
const childList = getChildren(children);
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
let
|
|
133
|
-
if ($[
|
|
134
|
-
|
|
120
|
+
t9 = classes;
|
|
121
|
+
t10 = rest;
|
|
122
|
+
let t12;
|
|
123
|
+
if ($[38] !== activeKeys || $[39] !== handleExpand || $[40] !== resolvedKeys) {
|
|
124
|
+
t12 = (child, index_0) => {
|
|
135
125
|
if (!React.isValidElement(child)) return child;
|
|
136
126
|
const rawKey = child.props.panelKey ?? child.key ?? index_0;
|
|
137
127
|
const key_3 = child.props.panelKey ?? resolvedKeys.get(String(rawKey)) ?? rawKey;
|
|
@@ -142,44 +132,47 @@ var Collapse = (t0) => {
|
|
|
142
132
|
onExpand: handleExpand
|
|
143
133
|
});
|
|
144
134
|
};
|
|
145
|
-
$[
|
|
146
|
-
$[
|
|
147
|
-
$[
|
|
148
|
-
$[
|
|
149
|
-
} else
|
|
150
|
-
|
|
151
|
-
$[
|
|
152
|
-
$[
|
|
153
|
-
$[
|
|
154
|
-
$[
|
|
155
|
-
$[
|
|
156
|
-
$[
|
|
157
|
-
$[
|
|
158
|
-
$[
|
|
159
|
-
$[
|
|
135
|
+
$[38] = activeKeys;
|
|
136
|
+
$[39] = handleExpand;
|
|
137
|
+
$[40] = resolvedKeys;
|
|
138
|
+
$[41] = t12;
|
|
139
|
+
} else t12 = $[41];
|
|
140
|
+
t11 = childList.map(t12);
|
|
141
|
+
$[29] = activeKeys;
|
|
142
|
+
$[30] = children;
|
|
143
|
+
$[31] = classes;
|
|
144
|
+
$[32] = handleExpand;
|
|
145
|
+
$[33] = resolvedKeys;
|
|
146
|
+
$[34] = rest;
|
|
147
|
+
$[35] = t10;
|
|
148
|
+
$[36] = t11;
|
|
149
|
+
$[37] = t9;
|
|
160
150
|
} else {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
151
|
+
t10 = $[35];
|
|
152
|
+
t11 = $[36];
|
|
153
|
+
t9 = $[37];
|
|
164
154
|
}
|
|
165
|
-
let
|
|
166
|
-
if ($[
|
|
167
|
-
|
|
168
|
-
className:
|
|
169
|
-
...
|
|
170
|
-
children:
|
|
155
|
+
let t12;
|
|
156
|
+
if ($[42] !== t10 || $[43] !== t11 || $[44] !== t9) {
|
|
157
|
+
t12 = /* @__PURE__ */ jsx("div", {
|
|
158
|
+
className: t9,
|
|
159
|
+
...t10,
|
|
160
|
+
children: t11
|
|
171
161
|
});
|
|
172
|
-
$[
|
|
173
|
-
$[
|
|
174
|
-
$[
|
|
175
|
-
$[
|
|
176
|
-
} else
|
|
177
|
-
return
|
|
162
|
+
$[42] = t10;
|
|
163
|
+
$[43] = t11;
|
|
164
|
+
$[44] = t9;
|
|
165
|
+
$[45] = t12;
|
|
166
|
+
} else t12 = $[45];
|
|
167
|
+
return t12;
|
|
178
168
|
};
|
|
179
|
-
function _temp(
|
|
169
|
+
function _temp(next) {
|
|
170
|
+
return next ?? [];
|
|
171
|
+
}
|
|
172
|
+
function _temp2(key) {
|
|
180
173
|
return [String(key), key];
|
|
181
174
|
}
|
|
182
|
-
function
|
|
175
|
+
function _temp3(left, right) {
|
|
183
176
|
return left === right || String(left) === String(right);
|
|
184
177
|
}
|
|
185
178
|
//#endregion
|