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/slider/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* react-kui v3.
|
|
2
|
+
* react-kui v3.1.1
|
|
3
3
|
* Copyright 2017-present, kui-react.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Homepage: https://react.k-ui.cn
|
|
@@ -13,12 +13,12 @@ import { getClosestStep } from "../utils/number.js";
|
|
|
13
13
|
import Thumb from "./thumb.js";
|
|
14
14
|
import { c } from "react/compiler-runtime";
|
|
15
15
|
import clsx from "clsx";
|
|
16
|
-
import { useContext, useEffect, useRef, useState } from "react";
|
|
16
|
+
import { useContext, useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
17
17
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
18
18
|
import Big from "big.js";
|
|
19
19
|
//#region components/slider/index.tsx
|
|
20
20
|
function Slider(t0) {
|
|
21
|
-
const $ = c(
|
|
21
|
+
const $ = c(65);
|
|
22
22
|
let className;
|
|
23
23
|
let marks;
|
|
24
24
|
let onChange;
|
|
@@ -164,6 +164,7 @@ function Slider(t0) {
|
|
|
164
164
|
const thumbRefs = useRef([]);
|
|
165
165
|
const activeMoveRef = useRef(null);
|
|
166
166
|
const activeUpRef = useRef(null);
|
|
167
|
+
if ((disabled || readOnly) && draggingIndex !== -1) setDraggingIndex(-1);
|
|
167
168
|
if (draggingIndex === -1 && (syncedSource.value !== value || syncedSource.min !== min || syncedSource.max !== max || syncedSource.step !== step || syncedSource.range !== range || syncedSource.marks !== marks)) {
|
|
168
169
|
const next_1 = formatValue(syncedSource.value !== value ? sourceValue : internalValue);
|
|
169
170
|
setSyncedSource({
|
|
@@ -191,25 +192,58 @@ function Slider(t0) {
|
|
|
191
192
|
t17 = $[42];
|
|
192
193
|
}
|
|
193
194
|
useEffect(t16, t17);
|
|
194
|
-
const stopDragging = () => {
|
|
195
|
-
draggingIndexRef.current = -1;
|
|
196
|
-
setDraggingIndex(-1);
|
|
197
|
-
if (activeMoveRef.current) {
|
|
198
|
-
document.removeEventListener("mousemove", activeMoveRef.current);
|
|
199
|
-
document.removeEventListener("touchmove", activeMoveRef.current);
|
|
200
|
-
}
|
|
201
|
-
if (activeUpRef.current) {
|
|
202
|
-
document.removeEventListener("mouseup", activeUpRef.current);
|
|
203
|
-
document.removeEventListener("touchend", activeUpRef.current);
|
|
204
|
-
document.removeEventListener("touchcancel", activeUpRef.current);
|
|
205
|
-
}
|
|
206
|
-
activeMoveRef.current = null;
|
|
207
|
-
activeUpRef.current = null;
|
|
208
|
-
};
|
|
209
195
|
let t18;
|
|
210
|
-
|
|
211
|
-
if ($[43] !== vertical) {
|
|
196
|
+
if ($[43] === Symbol.for("react.memo_cache_sentinel")) {
|
|
212
197
|
t18 = () => {
|
|
198
|
+
draggingIndexRef.current = -1;
|
|
199
|
+
if (activeMoveRef.current) {
|
|
200
|
+
document.removeEventListener("mousemove", activeMoveRef.current);
|
|
201
|
+
document.removeEventListener("touchmove", activeMoveRef.current);
|
|
202
|
+
}
|
|
203
|
+
if (activeUpRef.current) {
|
|
204
|
+
document.removeEventListener("mouseup", activeUpRef.current);
|
|
205
|
+
document.removeEventListener("touchend", activeUpRef.current);
|
|
206
|
+
document.removeEventListener("touchcancel", activeUpRef.current);
|
|
207
|
+
}
|
|
208
|
+
activeMoveRef.current = null;
|
|
209
|
+
activeUpRef.current = null;
|
|
210
|
+
};
|
|
211
|
+
$[43] = t18;
|
|
212
|
+
} else t18 = $[43];
|
|
213
|
+
const detachDragListeners = t18;
|
|
214
|
+
let t19;
|
|
215
|
+
if ($[44] === Symbol.for("react.memo_cache_sentinel")) {
|
|
216
|
+
t19 = () => {
|
|
217
|
+
setDraggingIndex(-1);
|
|
218
|
+
detachDragListeners();
|
|
219
|
+
};
|
|
220
|
+
$[44] = t19;
|
|
221
|
+
} else t19 = $[44];
|
|
222
|
+
const stopDragging = t19;
|
|
223
|
+
let t20;
|
|
224
|
+
let t21;
|
|
225
|
+
if ($[45] !== disabled || $[46] !== readOnly) {
|
|
226
|
+
t20 = () => {
|
|
227
|
+
if (disabled || readOnly) detachDragListeners();
|
|
228
|
+
};
|
|
229
|
+
t21 = [
|
|
230
|
+
disabled,
|
|
231
|
+
readOnly,
|
|
232
|
+
detachDragListeners
|
|
233
|
+
];
|
|
234
|
+
$[45] = disabled;
|
|
235
|
+
$[46] = readOnly;
|
|
236
|
+
$[47] = t20;
|
|
237
|
+
$[48] = t21;
|
|
238
|
+
} else {
|
|
239
|
+
t20 = $[47];
|
|
240
|
+
t21 = $[48];
|
|
241
|
+
}
|
|
242
|
+
useLayoutEffect(t20, t21);
|
|
243
|
+
let t22;
|
|
244
|
+
let t23;
|
|
245
|
+
if ($[49] !== vertical) {
|
|
246
|
+
t22 = () => {
|
|
213
247
|
const updateSize = () => {
|
|
214
248
|
if (railRef.current) setRailWidth(vertical ? railRef.current.offsetHeight : railRef.current.offsetWidth);
|
|
215
249
|
};
|
|
@@ -231,26 +265,26 @@ function Slider(t0) {
|
|
|
231
265
|
}
|
|
232
266
|
};
|
|
233
267
|
};
|
|
234
|
-
|
|
235
|
-
$[
|
|
236
|
-
$[
|
|
237
|
-
$[
|
|
268
|
+
t23 = [vertical];
|
|
269
|
+
$[49] = vertical;
|
|
270
|
+
$[50] = t22;
|
|
271
|
+
$[51] = t23;
|
|
238
272
|
} else {
|
|
239
|
-
|
|
240
|
-
|
|
273
|
+
t22 = $[50];
|
|
274
|
+
t23 = $[51];
|
|
241
275
|
}
|
|
242
|
-
useEffect(
|
|
243
|
-
let
|
|
244
|
-
if ($[
|
|
245
|
-
|
|
276
|
+
useEffect(t22, t23);
|
|
277
|
+
let t24;
|
|
278
|
+
if ($[52] !== max || $[53] !== min) {
|
|
279
|
+
t24 = (next_2) => {
|
|
246
280
|
const difference = max - min;
|
|
247
281
|
return difference === 0 ? 0 : Math.max(0, Math.min(100, (next_2 - min) / difference * 100));
|
|
248
282
|
};
|
|
249
|
-
$[
|
|
250
|
-
$[
|
|
251
|
-
$[
|
|
252
|
-
} else
|
|
253
|
-
const getPercent =
|
|
283
|
+
$[52] = max;
|
|
284
|
+
$[53] = min;
|
|
285
|
+
$[54] = t24;
|
|
286
|
+
} else t24 = $[54];
|
|
287
|
+
const getPercent = t24;
|
|
254
288
|
const getValueFromEvent = (event) => {
|
|
255
289
|
const rect = railRef.current.getBoundingClientRect();
|
|
256
290
|
const width = vertical ? rect.height : rect.width;
|
|
@@ -339,9 +373,9 @@ function Slider(t0) {
|
|
|
339
373
|
}
|
|
340
374
|
} else commit(formatValue(nextValue_1));
|
|
341
375
|
};
|
|
342
|
-
let
|
|
343
|
-
if ($[
|
|
344
|
-
|
|
376
|
+
let t25;
|
|
377
|
+
if ($[55] !== getPercent || $[56] !== railWidth || $[57] !== size) {
|
|
378
|
+
t25 = (next_4) => {
|
|
345
379
|
const percent_0 = getPercent(next_4) / 100;
|
|
346
380
|
const thumbSize_0 = size === "small" ? 18 : 24;
|
|
347
381
|
const radius_0 = thumbSize_0 / 2;
|
|
@@ -351,12 +385,12 @@ function Slider(t0) {
|
|
|
351
385
|
if (thumbPosition > railWidth - 18) return railWidth - 18 + (thumbPosition - (railWidth - 18)) / (18 - radius_0) * 18;
|
|
352
386
|
return thumbPosition;
|
|
353
387
|
};
|
|
354
|
-
$[
|
|
355
|
-
$[
|
|
356
|
-
$[
|
|
357
|
-
$[
|
|
358
|
-
} else
|
|
359
|
-
const getCoord =
|
|
388
|
+
$[55] = getPercent;
|
|
389
|
+
$[56] = railWidth;
|
|
390
|
+
$[57] = size;
|
|
391
|
+
$[58] = t25;
|
|
392
|
+
} else t25 = $[58];
|
|
393
|
+
const getCoord = t25;
|
|
360
394
|
const values_0 = range ? internalValue : [internalValue];
|
|
361
395
|
const renderTrack = () => {
|
|
362
396
|
if (!included && marks) return null;
|
|
@@ -383,25 +417,25 @@ function Slider(t0) {
|
|
|
383
417
|
});
|
|
384
418
|
};
|
|
385
419
|
const markValues_0 = Object.keys(marks ?? {}).map(Number).filter((item_1) => Number.isFinite(item_1) && item_1 >= min && item_1 <= max);
|
|
386
|
-
let
|
|
387
|
-
if ($[
|
|
388
|
-
|
|
420
|
+
let t26;
|
|
421
|
+
if ($[59] !== className || $[60] !== disabled || $[61] !== readOnly || $[62] !== reverse || $[63] !== vertical) {
|
|
422
|
+
t26 = clsx("k-slider", {
|
|
389
423
|
"k-slider-disabled": disabled,
|
|
390
424
|
"k-slider-readonly": readOnly,
|
|
391
425
|
"k-slider-vertical": vertical,
|
|
392
426
|
"k-slider-reverse": reverse
|
|
393
427
|
}, className);
|
|
394
|
-
$[
|
|
395
|
-
$[
|
|
396
|
-
$[
|
|
397
|
-
$[
|
|
398
|
-
$[
|
|
399
|
-
$[
|
|
400
|
-
} else
|
|
428
|
+
$[59] = className;
|
|
429
|
+
$[60] = disabled;
|
|
430
|
+
$[61] = readOnly;
|
|
431
|
+
$[62] = reverse;
|
|
432
|
+
$[63] = vertical;
|
|
433
|
+
$[64] = t26;
|
|
434
|
+
} else t26 = $[64];
|
|
401
435
|
return /* @__PURE__ */ jsx("div", {
|
|
402
436
|
...rest,
|
|
403
437
|
"aria-readonly": readOnly || void 0,
|
|
404
|
-
className:
|
|
438
|
+
className: t26,
|
|
405
439
|
children: /* @__PURE__ */ jsxs("div", {
|
|
406
440
|
className: "k-slider-bar",
|
|
407
441
|
children: [
|
package/es/slider/thumb.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
|
|
@@ -139,6 +139,7 @@ var Thumb = forwardRef(function Thumb(t0, ref) {
|
|
|
139
139
|
let t22;
|
|
140
140
|
if ($[29] !== t10 || $[30] !== t11 || $[31] !== t12 || $[32] !== t21 || $[33] !== t9) {
|
|
141
141
|
t22 = /* @__PURE__ */ jsx(Tooltip, {
|
|
142
|
+
trigger: "manual",
|
|
142
143
|
title: t9,
|
|
143
144
|
disabled: t10,
|
|
144
145
|
show: t11,
|
package/es/space/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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 { SizeContext } from "../config/size-context.js";
|
|
10
9
|
import { getChildren } from "../utils/react-node.js";
|
|
10
|
+
import { SizeContext } from "../config/size-context.js";
|
|
11
11
|
import clsx from "clsx";
|
|
12
12
|
import React, { useContext } from "react";
|
|
13
13
|
import { jsx } from "react/jsx-runtime";
|
package/es/spin/index.js
CHANGED
package/es/splitter/splitter.js
CHANGED
package/es/stat-card/countup.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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 { CountUp } from "./utils/countup.js";
|
|
10
9
|
import { Odometer } from "./utils/odometer.js";
|
|
10
|
+
import { CountUp } from "./utils/countup.js";
|
|
11
11
|
import { c } from "react/compiler-runtime";
|
|
12
12
|
import clsx from "clsx";
|
|
13
13
|
import { useEffect, useRef } from "react";
|
|
@@ -57,6 +57,7 @@ function CountUpNumber(t0) {
|
|
|
57
57
|
const countRef = useRef(null);
|
|
58
58
|
const currentValue = value ?? 0;
|
|
59
59
|
const latestValueRef = useRef(currentValue);
|
|
60
|
+
const renderedValueRef = useRef(currentValue);
|
|
60
61
|
let t7;
|
|
61
62
|
let t8;
|
|
62
63
|
if ($[10] !== currentValue) {
|
|
@@ -80,18 +81,19 @@ function CountUpNumber(t0) {
|
|
|
80
81
|
const observeVisibility = autoAnimate && typeof IntersectionObserver !== "undefined";
|
|
81
82
|
const safeDuration = Number.isFinite(duration) ? Math.max(0, duration) : 0;
|
|
82
83
|
const options = {
|
|
83
|
-
duration: safeDuration,
|
|
84
|
+
duration: type === "rollup" ? 0 : safeDuration,
|
|
84
85
|
separator,
|
|
85
86
|
decimalPlaces: Number.isFinite(precision) ? Math.min(100, Math.max(0, Math.floor(precision))) : 0,
|
|
86
87
|
autoAnimate: observeVisibility,
|
|
87
88
|
autoAnimateOnce,
|
|
88
89
|
plugin: type === "rollup" ? new Odometer({
|
|
89
90
|
duration: safeDuration,
|
|
90
|
-
|
|
91
|
+
mode: "continuous"
|
|
91
92
|
}) : void 0
|
|
92
93
|
};
|
|
93
94
|
const count = new CountUp(elementRef.current, latestValueRef.current, options);
|
|
94
95
|
countRef.current = count;
|
|
96
|
+
renderedValueRef.current = latestValueRef.current;
|
|
95
97
|
if (!observeVisibility) count.start();
|
|
96
98
|
return () => {
|
|
97
99
|
count.onDestroy();
|
|
@@ -123,6 +125,8 @@ function CountUpNumber(t0) {
|
|
|
123
125
|
let t12;
|
|
124
126
|
if ($[21] !== currentValue) {
|
|
125
127
|
t11 = () => {
|
|
128
|
+
if (renderedValueRef.current === currentValue) return;
|
|
129
|
+
renderedValueRef.current = currentValue;
|
|
126
130
|
countRef.current?.update(currentValue);
|
|
127
131
|
};
|
|
128
132
|
t12 = [currentValue];
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* react-kui v3.1.1
|
|
3
|
+
* Copyright 2017-present, kui-react.
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Homepage: https://react.k-ui.cn
|
|
6
|
+
* Author: Qiu / https://chuchur.com
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { Odometer } from "./utils/odometer.js";
|
|
10
|
+
import { c } from "react/compiler-runtime";
|
|
11
|
+
import clsx from "clsx";
|
|
12
|
+
import { useLayoutEffect, useRef, useState } from "react";
|
|
13
|
+
import { jsx } from "react/jsx-runtime";
|
|
14
|
+
//#region components/stat-card/rollup.tsx
|
|
15
|
+
function RollUp(t0) {
|
|
16
|
+
const $ = c(27);
|
|
17
|
+
let className;
|
|
18
|
+
let rest;
|
|
19
|
+
let t1;
|
|
20
|
+
let t2;
|
|
21
|
+
let t3;
|
|
22
|
+
let text;
|
|
23
|
+
if ($[0] !== t0) {
|
|
24
|
+
({value: t1, text, duration: t2, precision: t3, className, ...rest} = t0);
|
|
25
|
+
$[0] = t0;
|
|
26
|
+
$[1] = className;
|
|
27
|
+
$[2] = rest;
|
|
28
|
+
$[3] = t1;
|
|
29
|
+
$[4] = t2;
|
|
30
|
+
$[5] = t3;
|
|
31
|
+
$[6] = text;
|
|
32
|
+
} else {
|
|
33
|
+
className = $[1];
|
|
34
|
+
rest = $[2];
|
|
35
|
+
t1 = $[3];
|
|
36
|
+
t2 = $[4];
|
|
37
|
+
t3 = $[5];
|
|
38
|
+
text = $[6];
|
|
39
|
+
}
|
|
40
|
+
const value = t1 === void 0 ? 0 : t1;
|
|
41
|
+
const duration = t2 === void 0 ? .3 : t2;
|
|
42
|
+
const precision = t3 === void 0 ? 0 : t3;
|
|
43
|
+
const element = useRef(null);
|
|
44
|
+
const odometer = useRef(null);
|
|
45
|
+
let t4;
|
|
46
|
+
if ($[7] !== precision || $[8] !== text || $[9] !== value) {
|
|
47
|
+
t4 = text ?? new Intl.NumberFormat("en-US", {
|
|
48
|
+
minimumFractionDigits: precision,
|
|
49
|
+
maximumFractionDigits: precision
|
|
50
|
+
}).format(value);
|
|
51
|
+
$[7] = precision;
|
|
52
|
+
$[8] = text;
|
|
53
|
+
$[9] = value;
|
|
54
|
+
$[10] = t4;
|
|
55
|
+
} else t4 = $[10];
|
|
56
|
+
const formatted = t4;
|
|
57
|
+
const [initialText] = useState(formatted);
|
|
58
|
+
let t5;
|
|
59
|
+
let t6;
|
|
60
|
+
if ($[11] !== duration) {
|
|
61
|
+
t5 = () => {
|
|
62
|
+
const instance = new Odometer({ duration });
|
|
63
|
+
odometer.current = instance;
|
|
64
|
+
return () => {
|
|
65
|
+
instance.destroy();
|
|
66
|
+
odometer.current = null;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
t6 = [duration];
|
|
70
|
+
$[11] = duration;
|
|
71
|
+
$[12] = t5;
|
|
72
|
+
$[13] = t6;
|
|
73
|
+
} else {
|
|
74
|
+
t5 = $[12];
|
|
75
|
+
t6 = $[13];
|
|
76
|
+
}
|
|
77
|
+
useLayoutEffect(t5, t6);
|
|
78
|
+
let t7;
|
|
79
|
+
if ($[14] !== formatted || $[15] !== value) {
|
|
80
|
+
t7 = () => {
|
|
81
|
+
if (element.current) odometer.current?.render(element.current, formatted, value);
|
|
82
|
+
};
|
|
83
|
+
$[14] = formatted;
|
|
84
|
+
$[15] = value;
|
|
85
|
+
$[16] = t7;
|
|
86
|
+
} else t7 = $[16];
|
|
87
|
+
let t8;
|
|
88
|
+
if ($[17] !== duration || $[18] !== formatted || $[19] !== value) {
|
|
89
|
+
t8 = [
|
|
90
|
+
formatted,
|
|
91
|
+
value,
|
|
92
|
+
duration
|
|
93
|
+
];
|
|
94
|
+
$[17] = duration;
|
|
95
|
+
$[18] = formatted;
|
|
96
|
+
$[19] = value;
|
|
97
|
+
$[20] = t8;
|
|
98
|
+
} else t8 = $[20];
|
|
99
|
+
useLayoutEffect(t7, t8);
|
|
100
|
+
let t9;
|
|
101
|
+
if ($[21] !== className) {
|
|
102
|
+
t9 = clsx("k-roll-number", className);
|
|
103
|
+
$[21] = className;
|
|
104
|
+
$[22] = t9;
|
|
105
|
+
} else t9 = $[22];
|
|
106
|
+
let t10;
|
|
107
|
+
if ($[23] !== initialText || $[24] !== rest || $[25] !== t9) {
|
|
108
|
+
t10 = /* @__PURE__ */ jsx("span", {
|
|
109
|
+
...rest,
|
|
110
|
+
className: t9,
|
|
111
|
+
ref: element,
|
|
112
|
+
children: initialText
|
|
113
|
+
});
|
|
114
|
+
$[23] = initialText;
|
|
115
|
+
$[24] = rest;
|
|
116
|
+
$[25] = t9;
|
|
117
|
+
$[26] = t10;
|
|
118
|
+
} else t10 = $[26];
|
|
119
|
+
return t10;
|
|
120
|
+
}
|
|
121
|
+
//#endregion
|
|
122
|
+
export { RollUp as default };
|
|
@@ -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
|
|
@@ -212,7 +212,7 @@ var CountUp = class CountUp {
|
|
|
212
212
|
if (!this.el) return;
|
|
213
213
|
const result = this.formattingFn(val);
|
|
214
214
|
if (this.options.plugin?.render) {
|
|
215
|
-
this.options.plugin.render(this.el, result);
|
|
215
|
+
this.options.plugin.render(this.el, result, val);
|
|
216
216
|
return;
|
|
217
217
|
}
|
|
218
218
|
if (this.el.tagName === "INPUT") {
|