react-kui 3.1.2 → 3.2.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/README.zh-CN.md +3 -1
- package/ai/kui-components.json +918 -324
- package/es/_virtual/_rolldown/runtime.js +1 -1
- package/es/affix/index.js +1 -1
- package/es/alert/index.js +11 -4
- 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 +371 -347
- package/es/avatar/avatar-group-context.js +1 -1
- package/es/avatar/avatar-group.js +1 -1
- package/es/avatar/avatar.js +1 -1
- package/es/back-top/index.js +1 -1
- package/es/badge/index.js +10 -8
- package/es/base/teleport.js +1 -1
- package/es/base/transition-props.js +1 -1
- package/es/base/transition.js +1 -1
- 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 +13 -6
- package/es/calendar/index.js +20 -6
- package/es/card/index.js +11 -4
- package/es/carousel/carousel-context.js +1 -1
- package/es/carousel/carousel-item.js +1 -1
- package/es/carousel/carousel.js +1 -1
- package/es/carousel/drag.js +1 -1
- package/es/cascader/index.js +13 -10
- package/es/check-card/check-card-group.js +3 -3
- package/es/check-card/check-card.js +155 -141
- package/es/check-card/context.js +1 -1
- package/es/checkbox/checkbox-group-context.js +1 -1
- package/es/checkbox/checkbox-group.js +3 -3
- package/es/checkbox/checkbox.js +64 -244
- package/es/checkbox/index.js +1 -1
- package/es/collapse/collapse-panel.js +1 -1
- package/es/collapse/collapse.js +96 -82
- package/es/color-picker/alpha.js +1 -1
- package/es/color-picker/hue.js +1 -1
- package/es/color-picker/index.js +7 -7
- package/es/color-picker/mode.js +2 -2
- package/es/color-picker/paint.js +1 -1
- package/es/color-picker/presets.js +1 -1
- package/es/components.js +4 -4
- package/es/config/config-context.js +16 -3
- package/es/config/context.js +29 -2
- package/es/config/index.js +31 -12
- package/es/config/popup-host.js +106 -0
- package/es/config/size-context.js +1 -1
- package/es/config/use-config-appearance.js +62 -2
- package/es/const/var.js +6 -2
- package/es/date-picker/index.js +404 -885
- package/es/descriptions/descriptions-item.js +1 -1
- package/es/descriptions/descriptions.js +1 -1
- package/es/divider/index.js +1 -1
- package/es/drawer/index.js +328 -240
- package/es/dropdown/dropdown-button.js +69 -51
- package/es/dropdown/dropdown-context.js +1 -1
- package/es/dropdown/dropdown.js +137 -93
- package/es/dropdown/trigger.js +85 -33
- package/es/empty/index.js +3 -4
- package/es/feature-card/index.js +15 -4
- package/es/feedback-panel/index.js +95 -81
- package/es/flame-wrap/index.js +116 -109
- package/es/flame-wrap/types.js +54 -6
- package/es/flex/index.js +1 -1
- package/es/form/field-context.js +16 -2
- package/es/form/form-context.js +1 -1
- package/es/form/form-item.js +7 -6
- 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 +137 -123
- package/es/image/instance.js +1 -1
- package/es/image/preview.js +1 -1
- package/es/image/utils.js +1 -1
- package/es/index.js +3 -3
- package/es/input/index.js +3 -3
- package/es/input/input-base.js +7 -7
- package/es/input/input-box.js +2 -2
- package/es/input/input-group.js +43 -127
- package/es/input/input.js +1 -1
- package/es/input/textarea.js +28 -114
- package/es/input-number/index.js +7 -5
- package/es/input-otp/index.js +5 -5
- package/es/input-tag/index.js +5 -5
- package/es/kanban/index.js +79 -63
- package/es/layout/index.js +1 -1
- package/es/layout/layout-context.js +1 -1
- package/es/list-panel/index.js +96 -83
- package/es/loading/index.js +1 -1
- package/es/loading/loading-bar.js +1 -1
- package/es/locale/de.js +10 -2
- package/es/locale/el.js +10 -2
- package/es/locale/en.js +10 -2
- package/es/locale/fr.js +10 -2
- package/es/locale/it.js +10 -2
- package/es/locale/ja.js +10 -2
- package/es/locale/ko.js +10 -2
- package/es/locale/ru.js +10 -2
- package/es/locale/th.js +10 -2
- package/es/locale/uk.js +10 -2
- package/es/locale/vi.js +10 -2
- package/es/locale/zh-CN.js +10 -2
- package/es/locale/zh-TW.js +10 -2
- package/es/mentions/index.js +291 -286
- 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 +1 -1
- package/es/menu/menu-keyboard.js +41 -2
- package/es/menu/menu.js +268 -222
- package/es/menu/recursive-menu.js +1 -1
- package/es/menu/sub-menu.js +81 -23
- package/es/message/index.js +1 -1
- package/es/modal/api.js +46 -12
- package/es/modal/modal.js +441 -345
- package/es/modal/toast.js +177 -64
- 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 +13 -8
- package/es/page/responsive.js +1 -1
- package/es/page-header/index.js +1 -1
- package/es/popconfirm/index.js +36 -35
- package/es/poptip/index.js +47 -45
- package/es/popup/index.js +5 -2
- package/es/popup/layers.js +11 -2
- package/es/progress/index.js +1 -1
- package/es/qrcode/index.js +13 -7
- package/es/radio/radio-button.js +51 -44
- package/es/radio/radio-group-context.js +1 -1
- package/es/radio/radio-group.js +49 -52
- package/es/radio/radio.js +46 -197
- package/es/rate/index.js +1 -1
- package/es/rate/star.js +1 -1
- package/es/result/index.js +1 -1
- package/es/ripple/index.js +104 -97
- package/es/ripple/types.js +71 -18
- package/es/row-col/col.js +1 -1
- package/es/row-col/row.js +1 -1
- package/es/segmented/index.js +112 -92
- package/es/select/option.js +1 -1
- package/es/select/select.js +29 -29
- 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 +1 -1
- package/es/slider/thumb.js +1 -1
- package/es/space/index.js +1 -1
- 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 +2 -2
- package/es/stat-card/rollup.js +1 -1
- package/es/stat-card/stat-card.js +16 -7
- package/es/stat-card/stat-number.js +4 -3
- package/es/stat-card/utils/countup.js +1 -1
- package/es/stat-card/utils/odometer.js +1 -1
- package/es/stat-card/utils/stat-item-key.js +22 -0
- package/es/steps/index.js +1 -1
- package/es/switch/index.js +3 -3
- package/es/table/column-setting.js +104 -115
- package/es/table/index.js +556 -207
- package/es/table/utils.js +140 -3
- package/es/tabs/tab-panel.js +1 -1
- package/es/tabs/tabs.js +1 -1
- package/es/tag/index.js +12 -5
- package/es/time-line/timeline-item.js +1 -1
- package/es/time-line/timeline.js +1 -1
- package/es/tooltip/index.js +114 -94
- package/es/tour/index.js +1 -1
- package/es/transfer/index.js +190 -172
- package/es/tree/index.js +55 -44
- package/es/tree/utils.js +1 -1
- package/es/tree-select/index.js +259 -781
- package/es/typography/index.js +1 -1
- package/es/upload/file-list.js +1 -1
- package/es/upload/index.js +5 -6
- package/es/upload/picture-sort.js +1 -1
- package/es/upload/selector.js +1 -1
- package/es/utils/checked.js +1 -1
- package/es/utils/color.js +25 -2
- package/es/utils/css.js +19 -0
- package/es/utils/focus.js +63 -0
- package/es/utils/number.js +1 -1
- package/es/utils/overlay-order.js +18 -0
- package/es/utils/overlay-stack.js +33 -0
- package/es/utils/placement.js +1 -1
- package/es/utils/popup.js +1 -1
- package/es/utils/promise.js +18 -0
- package/es/utils/react-node.js +55 -30
- package/es/utils/selection-tags.js +6 -4
- package/es/utils/share.js +5 -2
- 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 +3 -2
- package/es/watermark/index.js +1 -1
- package/lib/index.cjs +2 -2
- package/lib/locale/de.cjs +2 -2
- package/lib/locale/el.cjs +2 -2
- package/lib/locale/en.cjs +2 -2
- package/lib/locale/fr.cjs +2 -2
- package/lib/locale/it.cjs +2 -2
- package/lib/locale/ja.cjs +2 -2
- package/lib/locale/ko.cjs +2 -2
- package/lib/locale/ru.cjs +2 -2
- package/lib/locale/th.cjs +2 -2
- package/lib/locale/uk.cjs +2 -2
- package/lib/locale/vi.cjs +2 -2
- package/lib/locale/zh-CN.cjs +2 -2
- package/lib/locale/zh-TW.cjs +2 -2
- package/package.json +4 -3
- package/readme.md +3 -1
- package/style/base.css +2 -2
- package/style/components.css +2 -2
- package/style/index.css +2 -2
- package/style/theme.css +2 -2
- package/types/alert/index.d.cts +2 -2
- package/types/alert/index.d.ts +2 -2
- package/types/auto-complete/index.d.cts +7 -1
- package/types/auto-complete/index.d.ts +7 -1
- package/types/badge/index.d.cts +2 -1
- package/types/badge/index.d.ts +2 -1
- package/types/button/button.d.cts +2 -2
- package/types/button/button.d.ts +2 -2
- package/types/card/index.d.cts +3 -3
- package/types/card/index.d.ts +3 -3
- package/types/cascader/index.d.cts +1 -1
- package/types/cascader/index.d.ts +1 -1
- package/types/cascader/types.d.cts +2 -0
- package/types/cascader/types.d.ts +2 -0
- package/types/check-card/context.d.cts +4 -3
- package/types/check-card/context.d.ts +4 -3
- package/types/check-card/index.d.cts +1 -1
- package/types/check-card/index.d.ts +1 -1
- package/types/check-card/types.d.cts +3 -4
- package/types/check-card/types.d.ts +3 -4
- package/types/checkbox/checkbox-group.d.cts +2 -2
- package/types/checkbox/checkbox-group.d.ts +2 -2
- package/types/checkbox/checkbox.d.cts +2 -2
- package/types/checkbox/checkbox.d.ts +2 -2
- package/types/collapse/collapse.d.cts +3 -3
- package/types/collapse/collapse.d.ts +3 -3
- package/types/color-picker/index.d.cts +3 -1
- package/types/color-picker/index.d.ts +3 -1
- package/types/components.d.cts +2 -2
- package/types/components.d.ts +2 -2
- package/types/config/config-context.d.cts +15 -2
- package/types/config/config-context.d.ts +15 -2
- package/types/config/context.d.cts +6 -0
- package/types/config/context.d.ts +6 -0
- package/types/config/popup-host.d.cts +16 -0
- package/types/config/popup-host.d.ts +16 -0
- package/types/config/use-config-appearance.d.cts +41 -2
- package/types/config/use-config-appearance.d.ts +41 -2
- package/types/const/types.d.cts +30 -1
- package/types/const/types.d.ts +30 -1
- package/types/const/var.d.cts +6 -1
- package/types/const/var.d.ts +6 -1
- package/types/date-picker/index.d.cts +3 -1
- package/types/date-picker/index.d.ts +3 -1
- package/types/descriptions/descriptions.d.cts +2 -2
- package/types/descriptions/descriptions.d.ts +2 -2
- package/types/drawer/index.d.cts +1 -0
- package/types/drawer/index.d.ts +1 -0
- package/types/dropdown/dropdown-button.d.cts +5 -2
- package/types/dropdown/dropdown-button.d.ts +5 -2
- package/types/dropdown/dropdown-context.d.cts +6 -0
- package/types/dropdown/dropdown-context.d.ts +6 -0
- package/types/dropdown/dropdown.d.cts +2 -0
- package/types/dropdown/dropdown.d.ts +2 -0
- package/types/feature-card/index.d.cts +3 -3
- package/types/feature-card/index.d.ts +3 -3
- package/types/feedback-panel/index.d.cts +3 -3
- package/types/feedback-panel/index.d.ts +3 -3
- package/types/flame-wrap/types.d.cts +18 -0
- package/types/flame-wrap/types.d.ts +18 -0
- package/types/form/field-context.d.cts +2 -0
- package/types/form/field-context.d.ts +2 -0
- package/types/image/image.d.cts +2 -2
- package/types/image/image.d.ts +2 -2
- package/types/input/input-group.d.cts +2 -2
- package/types/input/input-group.d.ts +2 -2
- package/types/input-number/index.d.cts +2 -0
- package/types/input-number/index.d.ts +2 -0
- package/types/kanban/index.d.cts +3 -2
- package/types/kanban/index.d.ts +3 -2
- package/types/list-panel/index.d.cts +3 -3
- package/types/list-panel/index.d.ts +3 -3
- package/types/locale/de.d.cts +6 -0
- package/types/locale/de.d.ts +6 -0
- package/types/locale/el.d.cts +6 -0
- package/types/locale/el.d.ts +6 -0
- package/types/locale/en.d.cts +6 -0
- package/types/locale/en.d.ts +6 -0
- package/types/locale/fr.d.cts +6 -0
- package/types/locale/fr.d.ts +6 -0
- package/types/locale/it.d.cts +6 -0
- package/types/locale/it.d.ts +6 -0
- package/types/locale/ja.d.cts +6 -0
- package/types/locale/ja.d.ts +6 -0
- package/types/locale/ko.d.cts +6 -0
- package/types/locale/ko.d.ts +6 -0
- package/types/locale/ru.d.cts +6 -0
- package/types/locale/ru.d.ts +6 -0
- package/types/locale/th.d.cts +6 -0
- package/types/locale/th.d.ts +6 -0
- package/types/locale/uk.d.cts +6 -0
- package/types/locale/uk.d.ts +6 -0
- package/types/locale/vi.d.cts +6 -0
- package/types/locale/vi.d.ts +6 -0
- package/types/locale/zh-CN.d.cts +6 -0
- package/types/locale/zh-CN.d.ts +6 -0
- package/types/locale/zh-TW.d.cts +6 -0
- package/types/locale/zh-TW.d.ts +6 -0
- package/types/mentions/index.d.cts +2 -0
- package/types/mentions/index.d.ts +2 -0
- package/types/menu/menu-keyboard.d.cts +23 -0
- package/types/menu/menu-keyboard.d.ts +23 -0
- package/types/modal/api.d.cts +6 -1
- package/types/modal/api.d.ts +6 -1
- package/types/modal/modal.d.cts +1 -0
- package/types/modal/modal.d.ts +1 -0
- package/types/modal/toast.d.cts +8 -2
- package/types/modal/toast.d.ts +8 -2
- package/types/page/index.d.cts +2 -2
- package/types/page/index.d.ts +2 -2
- package/types/popconfirm/index.d.cts +2 -0
- package/types/popconfirm/index.d.ts +2 -0
- package/types/poptip/index.d.cts +2 -0
- package/types/poptip/index.d.ts +2 -0
- package/types/popup/layers.d.cts +2 -0
- package/types/popup/layers.d.ts +2 -0
- package/types/qrcode/index.d.cts +2 -2
- package/types/qrcode/index.d.ts +2 -2
- package/types/radio/radio-button.d.cts +2 -2
- package/types/radio/radio-button.d.ts +2 -2
- package/types/radio/radio-group.d.cts +2 -2
- package/types/radio/radio-group.d.ts +2 -2
- package/types/radio/radio.d.cts +2 -2
- package/types/radio/radio.d.ts +2 -2
- package/types/ripple/types.d.cts +18 -0
- package/types/ripple/types.d.ts +18 -0
- package/types/segmented/index.d.cts +2 -1
- package/types/segmented/index.d.ts +2 -1
- package/types/select/select.d.cts +2 -0
- package/types/select/select.d.ts +2 -0
- package/types/stat-card/stat-card.d.cts +3 -3
- package/types/stat-card/stat-card.d.ts +3 -3
- package/types/stat-card/utils/stat-item-key.d.cts +11 -0
- package/types/stat-card/utils/stat-item-key.d.ts +11 -0
- package/types/table/column-setting.d.cts +4 -4
- package/types/table/column-setting.d.ts +4 -4
- package/types/table/index.d.cts +2 -2
- package/types/table/index.d.ts +2 -2
- package/types/table/types.d.cts +21 -2
- package/types/table/types.d.ts +21 -2
- package/types/table/utils.d.cts +75 -0
- package/types/table/utils.d.ts +75 -0
- package/types/tag/index.d.cts +2 -2
- package/types/tag/index.d.ts +2 -2
- package/types/tooltip/index.d.cts +2 -0
- package/types/tooltip/index.d.ts +2 -0
- package/types/transfer/index.d.cts +3 -2
- package/types/transfer/index.d.ts +3 -2
- package/types/tree-select/index.d.cts +3 -1
- package/types/tree-select/index.d.ts +3 -1
- package/types/utils/checked.d.cts +1 -1
- package/types/utils/checked.d.ts +1 -1
- package/types/utils/color.d.cts +13 -0
- package/types/utils/color.d.ts +13 -0
- package/types/utils/css.d.cts +2 -0
- package/types/utils/css.d.ts +2 -0
- package/types/utils/focus.d.cts +5 -0
- package/types/utils/focus.d.ts +5 -0
- package/types/utils/overlay-order.d.cts +6 -0
- package/types/utils/overlay-order.d.ts +6 -0
- package/types/utils/overlay-stack.d.cts +13 -0
- package/types/utils/overlay-stack.d.ts +13 -0
- package/types/utils/promise.d.cts +5 -0
- package/types/utils/promise.d.ts +5 -0
- package/types/utils/react-node.d.cts +10 -0
- package/types/utils/react-node.d.ts +10 -0
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* react-kui v3.1
|
|
2
|
+
* react-kui v3.2.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
|
|
10
|
-
import { ConfigContext } from "../config/config-context.js";
|
|
9
|
+
import { ConfigContext, DEFAULT_LOCALE } from "../config/config-context.js";
|
|
11
10
|
import Popup from "../popup/index.js";
|
|
12
|
-
import {
|
|
11
|
+
import { useFormAppearance } from "../config/use-config-appearance.js";
|
|
13
12
|
import { Loading } from "../node_modules/.pnpm/kui-icons@5.0.0/node_modules/kui-icons/dist/kui-icons.esm.js";
|
|
14
13
|
import Icon from "../icon/index.js";
|
|
15
14
|
import { useValue } from "../utils/use-value.js";
|
|
@@ -22,7 +21,9 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
22
21
|
//#region components/auto-complete/index.tsx
|
|
23
22
|
var EMPTY_OPTIONS = [];
|
|
24
23
|
var AutoComplete = (t0) => {
|
|
25
|
-
const $ = c(
|
|
24
|
+
const $ = c(175);
|
|
25
|
+
let addonAfter;
|
|
26
|
+
let addonBefore;
|
|
26
27
|
let className;
|
|
27
28
|
let disabled;
|
|
28
29
|
let loadingText;
|
|
@@ -37,116 +38,130 @@ var AutoComplete = (t0) => {
|
|
|
37
38
|
let onSearch;
|
|
38
39
|
let onSelect;
|
|
39
40
|
let open;
|
|
41
|
+
let prefix;
|
|
40
42
|
let readOnly;
|
|
41
43
|
let rest;
|
|
42
44
|
let shapeProp;
|
|
43
45
|
let sizeProp;
|
|
46
|
+
let suffix;
|
|
44
47
|
let t1;
|
|
45
48
|
let t2;
|
|
46
49
|
let t3;
|
|
47
50
|
let t4;
|
|
48
51
|
let t5;
|
|
52
|
+
let t6;
|
|
49
53
|
let themeProp;
|
|
50
54
|
let value;
|
|
51
55
|
if ($[0] !== t0) {
|
|
52
|
-
({value, options: t1, open, showOnEmpty: t2, clearable: t3, loading: t4, loadingText, size: sizeProp, shape: shapeProp, theme: themeProp, filterOption: t5, onChange, onClear, onSearch, onSelect, onOpenChange, className, disabled, readOnly, onFocus, onBlur, onKeyDown, onCompositionStart, onCompositionEnd, ...rest} = t0);
|
|
56
|
+
({value, options: t1, open, showOnEmpty: t2, clearable: t3, loading: t4, loadingText, addonBefore, addonAfter, prefix, suffix, size: sizeProp, shape: shapeProp, theme: themeProp, filterOption: t5, destroyOnClose: t6, onChange, onClear, onSearch, onSelect, onOpenChange, className, disabled, readOnly, onFocus, onBlur, onKeyDown, onCompositionStart, onCompositionEnd, ...rest} = t0);
|
|
53
57
|
$[0] = t0;
|
|
54
|
-
$[1] =
|
|
55
|
-
$[2] =
|
|
56
|
-
$[3] =
|
|
57
|
-
$[4] =
|
|
58
|
-
$[5] =
|
|
59
|
-
$[6] =
|
|
60
|
-
$[7] =
|
|
61
|
-
$[8] =
|
|
62
|
-
$[9] =
|
|
63
|
-
$[10] =
|
|
64
|
-
$[11] =
|
|
65
|
-
$[12] =
|
|
66
|
-
$[13] =
|
|
67
|
-
$[14] =
|
|
68
|
-
$[15] =
|
|
69
|
-
$[16] =
|
|
70
|
-
$[17] =
|
|
71
|
-
$[18] =
|
|
72
|
-
$[19] =
|
|
73
|
-
$[20] =
|
|
74
|
-
$[21] =
|
|
75
|
-
$[22] =
|
|
76
|
-
$[23] =
|
|
77
|
-
$[24] =
|
|
78
|
-
$[25] =
|
|
58
|
+
$[1] = addonAfter;
|
|
59
|
+
$[2] = addonBefore;
|
|
60
|
+
$[3] = className;
|
|
61
|
+
$[4] = disabled;
|
|
62
|
+
$[5] = loadingText;
|
|
63
|
+
$[6] = onBlur;
|
|
64
|
+
$[7] = onChange;
|
|
65
|
+
$[8] = onClear;
|
|
66
|
+
$[9] = onCompositionEnd;
|
|
67
|
+
$[10] = onCompositionStart;
|
|
68
|
+
$[11] = onFocus;
|
|
69
|
+
$[12] = onKeyDown;
|
|
70
|
+
$[13] = onOpenChange;
|
|
71
|
+
$[14] = onSearch;
|
|
72
|
+
$[15] = onSelect;
|
|
73
|
+
$[16] = open;
|
|
74
|
+
$[17] = prefix;
|
|
75
|
+
$[18] = readOnly;
|
|
76
|
+
$[19] = rest;
|
|
77
|
+
$[20] = shapeProp;
|
|
78
|
+
$[21] = sizeProp;
|
|
79
|
+
$[22] = suffix;
|
|
80
|
+
$[23] = t1;
|
|
81
|
+
$[24] = t2;
|
|
82
|
+
$[25] = t3;
|
|
83
|
+
$[26] = t4;
|
|
84
|
+
$[27] = t5;
|
|
85
|
+
$[28] = t6;
|
|
86
|
+
$[29] = themeProp;
|
|
87
|
+
$[30] = value;
|
|
79
88
|
} else {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
89
|
+
addonAfter = $[1];
|
|
90
|
+
addonBefore = $[2];
|
|
91
|
+
className = $[3];
|
|
92
|
+
disabled = $[4];
|
|
93
|
+
loadingText = $[5];
|
|
94
|
+
onBlur = $[6];
|
|
95
|
+
onChange = $[7];
|
|
96
|
+
onClear = $[8];
|
|
97
|
+
onCompositionEnd = $[9];
|
|
98
|
+
onCompositionStart = $[10];
|
|
99
|
+
onFocus = $[11];
|
|
100
|
+
onKeyDown = $[12];
|
|
101
|
+
onOpenChange = $[13];
|
|
102
|
+
onSearch = $[14];
|
|
103
|
+
onSelect = $[15];
|
|
104
|
+
open = $[16];
|
|
105
|
+
prefix = $[17];
|
|
106
|
+
readOnly = $[18];
|
|
107
|
+
rest = $[19];
|
|
108
|
+
shapeProp = $[20];
|
|
109
|
+
sizeProp = $[21];
|
|
110
|
+
suffix = $[22];
|
|
111
|
+
t1 = $[23];
|
|
112
|
+
t2 = $[24];
|
|
113
|
+
t3 = $[25];
|
|
114
|
+
t4 = $[26];
|
|
115
|
+
t5 = $[27];
|
|
116
|
+
t6 = $[28];
|
|
117
|
+
themeProp = $[29];
|
|
118
|
+
value = $[30];
|
|
105
119
|
}
|
|
106
120
|
const options = t1 === void 0 ? EMPTY_OPTIONS : t1;
|
|
107
121
|
const showOnEmpty = t2 === void 0 ? false : t2;
|
|
108
122
|
const clearable = t3 === void 0 ? false : t3;
|
|
109
123
|
const loading = t4 === void 0 ? false : t4;
|
|
110
124
|
const filterOption = t5 === void 0 ? true : t5;
|
|
111
|
-
const
|
|
125
|
+
const destroyOnClose = t6 === void 0 ? true : t6;
|
|
126
|
+
const inheritedAppearance = useFormAppearance();
|
|
112
127
|
const size = sizeProp ?? inheritedAppearance.size;
|
|
113
128
|
const shape = shapeProp ?? inheritedAppearance.shape;
|
|
114
129
|
const theme = themeProp ?? inheritedAppearance.theme ?? "fill";
|
|
115
|
-
const locale = useContext(ConfigContext)?.locale ||
|
|
116
|
-
const
|
|
117
|
-
let t7;
|
|
118
|
-
if ($[26] !== t6) {
|
|
119
|
-
let t8;
|
|
120
|
-
if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
|
|
121
|
-
t8 = /:/g;
|
|
122
|
-
$[28] = t8;
|
|
123
|
-
} else t8 = $[28];
|
|
124
|
-
t7 = t6.replace(t8, "");
|
|
125
|
-
$[26] = t6;
|
|
126
|
-
$[27] = t7;
|
|
127
|
-
} else t7 = $[27];
|
|
128
|
-
const listboxId = `k-auto-complete-listbox-${t7}`;
|
|
130
|
+
const locale = useContext(ConfigContext)?.locale || DEFAULT_LOCALE;
|
|
131
|
+
const t7 = useId();
|
|
129
132
|
let t8;
|
|
130
|
-
if ($[
|
|
131
|
-
|
|
132
|
-
$[
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
133
|
+
if ($[31] !== t7) {
|
|
134
|
+
let t9;
|
|
135
|
+
if ($[33] === Symbol.for("react.memo_cache_sentinel")) {
|
|
136
|
+
t9 = /:/g;
|
|
137
|
+
$[33] = t9;
|
|
138
|
+
} else t9 = $[33];
|
|
139
|
+
t8 = t7.replace(t9, "");
|
|
140
|
+
$[31] = t7;
|
|
141
|
+
$[32] = t8;
|
|
142
|
+
} else t8 = $[32];
|
|
143
|
+
const listboxId = `k-auto-complete-listbox-${t8}`;
|
|
144
|
+
let t9;
|
|
145
|
+
if ($[34] !== options) {
|
|
146
|
+
t9 = options.map(_temp);
|
|
147
|
+
$[34] = options;
|
|
148
|
+
$[35] = t9;
|
|
149
|
+
} else t9 = $[35];
|
|
150
|
+
const normalized = t9;
|
|
136
151
|
const initialCurrent = value ?? "";
|
|
137
152
|
const initiallyOpen = open ?? false;
|
|
138
|
-
let
|
|
139
|
-
if ($[
|
|
140
|
-
|
|
141
|
-
$[
|
|
142
|
-
$[
|
|
143
|
-
$[
|
|
144
|
-
$[
|
|
145
|
-
$[
|
|
146
|
-
$[
|
|
147
|
-
$[
|
|
148
|
-
} else
|
|
149
|
-
const initialShownOptions =
|
|
153
|
+
let t10;
|
|
154
|
+
if ($[36] !== filterOption || $[37] !== initialCurrent || $[38] !== initiallyOpen || $[39] !== loading || $[40] !== normalized || $[41] !== showOnEmpty) {
|
|
155
|
+
t10 = initiallyOpen && (initialCurrent || showOnEmpty) && !loading ? normalized.filter((option) => typeof filterOption === "function" ? filterOption(initialCurrent, option) : !filterOption || option.value.toLocaleLowerCase().includes(initialCurrent.toLocaleLowerCase())) : [];
|
|
156
|
+
$[36] = filterOption;
|
|
157
|
+
$[37] = initialCurrent;
|
|
158
|
+
$[38] = initiallyOpen;
|
|
159
|
+
$[39] = loading;
|
|
160
|
+
$[40] = normalized;
|
|
161
|
+
$[41] = showOnEmpty;
|
|
162
|
+
$[42] = t10;
|
|
163
|
+
} else t10 = $[42];
|
|
164
|
+
const initialShownOptions = t10;
|
|
150
165
|
const [innerValue, setInnerValue] = useValue(value, _temp2);
|
|
151
166
|
const [innerOpen, setInnerOpen] = useValue(open, _temp3);
|
|
152
167
|
const [active, setActive] = useState(-1);
|
|
@@ -160,43 +175,43 @@ var AutoComplete = (t0) => {
|
|
|
160
175
|
const current = innerValue;
|
|
161
176
|
const requestedOpen = innerOpen;
|
|
162
177
|
const visible = (loading || !suppressRemoteOptions && shownOptions.length > 0) && requestedOpen;
|
|
163
|
-
let t10;
|
|
164
|
-
if ($[38] !== filterOption || $[39] !== normalized) {
|
|
165
|
-
t10 = (input) => normalized.filter((option_0) => typeof filterOption === "function" ? filterOption(input, option_0) : !filterOption || option_0.value.toLocaleLowerCase().includes(input.toLocaleLowerCase()));
|
|
166
|
-
$[38] = filterOption;
|
|
167
|
-
$[39] = normalized;
|
|
168
|
-
$[40] = t10;
|
|
169
|
-
} else t10 = $[40];
|
|
170
|
-
const getMatches = t10;
|
|
171
178
|
let t11;
|
|
172
|
-
if ($[
|
|
173
|
-
t11 = (
|
|
179
|
+
if ($[43] !== filterOption || $[44] !== normalized) {
|
|
180
|
+
t11 = (input) => normalized.filter((option_0) => typeof filterOption === "function" ? filterOption(input, option_0) : !filterOption || option_0.value.toLocaleLowerCase().includes(input.toLocaleLowerCase()));
|
|
181
|
+
$[43] = filterOption;
|
|
182
|
+
$[44] = normalized;
|
|
183
|
+
$[45] = t11;
|
|
184
|
+
} else t11 = $[45];
|
|
185
|
+
const getMatches = t11;
|
|
186
|
+
let t12;
|
|
187
|
+
if ($[46] !== disabled || $[47] !== loading || $[48] !== onOpenChange || $[49] !== readOnly || $[50] !== setInnerOpen || $[51] !== suppressRemoteOptions) {
|
|
188
|
+
t12 = (next_1) => {
|
|
174
189
|
if (next_1 && (disabled || readOnly)) return;
|
|
175
190
|
if (next_1 && suppressRemoteOptions && !loading) return;
|
|
176
191
|
setInnerOpen(next_1);
|
|
177
192
|
if (!next_1) setActive(-1);
|
|
178
193
|
onOpenChange?.(next_1);
|
|
179
194
|
};
|
|
180
|
-
$[
|
|
181
|
-
$[
|
|
182
|
-
$[
|
|
183
|
-
$[
|
|
184
|
-
$[
|
|
185
|
-
$[
|
|
186
|
-
$[
|
|
187
|
-
} else
|
|
188
|
-
const setOpen =
|
|
189
|
-
let
|
|
190
|
-
if ($[
|
|
191
|
-
|
|
195
|
+
$[46] = disabled;
|
|
196
|
+
$[47] = loading;
|
|
197
|
+
$[48] = onOpenChange;
|
|
198
|
+
$[49] = readOnly;
|
|
199
|
+
$[50] = setInnerOpen;
|
|
200
|
+
$[51] = suppressRemoteOptions;
|
|
201
|
+
$[52] = t12;
|
|
202
|
+
} else t12 = $[52];
|
|
203
|
+
const setOpen = t12;
|
|
204
|
+
let t13;
|
|
205
|
+
if ($[53] !== getMatches) {
|
|
206
|
+
t13 = (input_0) => {
|
|
192
207
|
const matches = getMatches(input_0);
|
|
193
208
|
if (matches.length) setShownOptions(matches);
|
|
194
209
|
return matches.length > 0;
|
|
195
210
|
};
|
|
196
|
-
$[
|
|
197
|
-
$[
|
|
198
|
-
} else
|
|
199
|
-
const commitMatches =
|
|
211
|
+
$[53] = getMatches;
|
|
212
|
+
$[54] = t13;
|
|
213
|
+
} else t13 = $[54];
|
|
214
|
+
const commitMatches = t13;
|
|
200
215
|
const syncOpen = (next_2) => {
|
|
201
216
|
setInnerOpen(next_2);
|
|
202
217
|
if (!next_2) setActive(-1);
|
|
@@ -205,17 +220,17 @@ var AutoComplete = (t0) => {
|
|
|
205
220
|
revision: (state?.revision ?? 0) + 1
|
|
206
221
|
}));
|
|
207
222
|
};
|
|
208
|
-
let
|
|
209
|
-
if ($[
|
|
210
|
-
|
|
223
|
+
let t14;
|
|
224
|
+
if ($[55] !== loading || $[56] !== normalized) {
|
|
225
|
+
t14 = {
|
|
211
226
|
loading,
|
|
212
227
|
normalized
|
|
213
228
|
};
|
|
214
|
-
$[
|
|
215
|
-
$[
|
|
216
|
-
$[
|
|
217
|
-
} else
|
|
218
|
-
const [previousRemoteState, setPreviousRemoteState] = useState(
|
|
229
|
+
$[55] = loading;
|
|
230
|
+
$[56] = normalized;
|
|
231
|
+
$[57] = t14;
|
|
232
|
+
} else t14 = $[57];
|
|
233
|
+
const [previousRemoteState, setPreviousRemoteState] = useState(t14);
|
|
219
234
|
if (previousRemoteState.loading !== loading || previousRemoteState.normalized !== normalized) {
|
|
220
235
|
setPreviousRemoteState({
|
|
221
236
|
loading,
|
|
@@ -241,91 +256,91 @@ var AutoComplete = (t0) => {
|
|
|
241
256
|
setSuppressRemoteOptions(false);
|
|
242
257
|
} else setActive(-1);
|
|
243
258
|
}
|
|
244
|
-
let t14;
|
|
245
|
-
if ($[53] !== onOpenChange) {
|
|
246
|
-
t14 = (next_3) => onOpenChange?.(next_3);
|
|
247
|
-
$[53] = onOpenChange;
|
|
248
|
-
$[54] = t14;
|
|
249
|
-
} else t14 = $[54];
|
|
250
|
-
const emitSyncedOpen = useEffectEvent(t14);
|
|
251
259
|
let t15;
|
|
252
|
-
if ($[
|
|
253
|
-
t15 = () =>
|
|
260
|
+
if ($[58] !== onOpenChange) {
|
|
261
|
+
t15 = (next_3) => onOpenChange?.(next_3);
|
|
262
|
+
$[58] = onOpenChange;
|
|
263
|
+
$[59] = t15;
|
|
264
|
+
} else t15 = $[59];
|
|
265
|
+
const emitSyncedOpen = useEffectEvent(t15);
|
|
266
|
+
let t16;
|
|
267
|
+
if ($[60] !== emitSyncedOpen || $[61] !== syncedOpenChange) {
|
|
268
|
+
t16 = () => {
|
|
254
269
|
if (syncedOpenChange) emitSyncedOpen(syncedOpenChange.value);
|
|
255
270
|
};
|
|
256
|
-
$[
|
|
257
|
-
$[
|
|
258
|
-
$[
|
|
259
|
-
} else
|
|
260
|
-
let t16;
|
|
261
|
-
if ($[58] !== syncedOpenChange) {
|
|
262
|
-
t16 = [syncedOpenChange];
|
|
263
|
-
$[58] = syncedOpenChange;
|
|
264
|
-
$[59] = t16;
|
|
265
|
-
} else t16 = $[59];
|
|
266
|
-
useEffect(t15, t16);
|
|
271
|
+
$[60] = emitSyncedOpen;
|
|
272
|
+
$[61] = syncedOpenChange;
|
|
273
|
+
$[62] = t16;
|
|
274
|
+
} else t16 = $[62];
|
|
267
275
|
let t17;
|
|
276
|
+
if ($[63] !== syncedOpenChange) {
|
|
277
|
+
t17 = [syncedOpenChange];
|
|
278
|
+
$[63] = syncedOpenChange;
|
|
279
|
+
$[64] = t17;
|
|
280
|
+
} else t17 = $[64];
|
|
281
|
+
useEffect(t16, t17);
|
|
268
282
|
let t18;
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
t18 =
|
|
272
|
-
|
|
273
|
-
$[
|
|
283
|
+
let t19;
|
|
284
|
+
if ($[65] === Symbol.for("react.memo_cache_sentinel")) {
|
|
285
|
+
t18 = () => () => clearTimeout(blurTimer.current);
|
|
286
|
+
t19 = [];
|
|
287
|
+
$[65] = t18;
|
|
288
|
+
$[66] = t19;
|
|
274
289
|
} else {
|
|
275
|
-
|
|
276
|
-
|
|
290
|
+
t18 = $[65];
|
|
291
|
+
t19 = $[66];
|
|
277
292
|
}
|
|
278
|
-
useEffect(
|
|
279
|
-
let t19;
|
|
293
|
+
useEffect(t18, t19);
|
|
280
294
|
let t20;
|
|
281
|
-
|
|
282
|
-
|
|
295
|
+
let t21;
|
|
296
|
+
if ($[67] !== active || $[68] !== listboxId) {
|
|
297
|
+
t20 = () => {
|
|
283
298
|
(dropdownRef.current?.querySelector(`#${listboxId}-option-${active}`))?.scrollIntoView?.({ block: "nearest" });
|
|
284
299
|
};
|
|
285
|
-
|
|
286
|
-
$[
|
|
287
|
-
$[
|
|
288
|
-
$[
|
|
289
|
-
$[
|
|
300
|
+
t21 = [active, listboxId];
|
|
301
|
+
$[67] = active;
|
|
302
|
+
$[68] = listboxId;
|
|
303
|
+
$[69] = t20;
|
|
304
|
+
$[70] = t21;
|
|
290
305
|
} else {
|
|
291
|
-
|
|
292
|
-
|
|
306
|
+
t20 = $[69];
|
|
307
|
+
t21 = $[70];
|
|
293
308
|
}
|
|
294
|
-
useEffect(
|
|
295
|
-
let
|
|
296
|
-
if ($[
|
|
297
|
-
|
|
309
|
+
useEffect(t20, t21);
|
|
310
|
+
let t22;
|
|
311
|
+
if ($[71] !== disabled || $[72] !== onChange || $[73] !== readOnly || $[74] !== setInnerValue) {
|
|
312
|
+
t22 = (next_4) => {
|
|
298
313
|
if (disabled || readOnly) return;
|
|
299
314
|
setInnerValue(next_4);
|
|
300
315
|
onChange?.(next_4);
|
|
301
316
|
};
|
|
302
|
-
$[
|
|
303
|
-
$[
|
|
304
|
-
$[
|
|
305
|
-
$[
|
|
306
|
-
$[
|
|
307
|
-
} else
|
|
308
|
-
const update =
|
|
309
|
-
let
|
|
310
|
-
if ($[
|
|
311
|
-
|
|
317
|
+
$[71] = disabled;
|
|
318
|
+
$[72] = onChange;
|
|
319
|
+
$[73] = readOnly;
|
|
320
|
+
$[74] = setInnerValue;
|
|
321
|
+
$[75] = t22;
|
|
322
|
+
} else t22 = $[75];
|
|
323
|
+
const update = t22;
|
|
324
|
+
let t23;
|
|
325
|
+
if ($[76] !== disabled || $[77] !== onSelect || $[78] !== readOnly || $[79] !== setOpen || $[80] !== update) {
|
|
326
|
+
t23 = (option_2) => {
|
|
312
327
|
if (disabled || readOnly || option_2.disabled) return;
|
|
313
328
|
update(option_2.value);
|
|
314
329
|
onSelect?.(option_2.value, option_2);
|
|
315
330
|
setOpen(false);
|
|
316
331
|
setActive(-1);
|
|
317
332
|
};
|
|
318
|
-
$[
|
|
319
|
-
$[
|
|
320
|
-
$[
|
|
321
|
-
$[
|
|
322
|
-
$[
|
|
323
|
-
$[
|
|
324
|
-
} else
|
|
325
|
-
const choose =
|
|
333
|
+
$[76] = disabled;
|
|
334
|
+
$[77] = onSelect;
|
|
335
|
+
$[78] = readOnly;
|
|
336
|
+
$[79] = setOpen;
|
|
337
|
+
$[80] = update;
|
|
338
|
+
$[81] = t23;
|
|
339
|
+
} else t23 = $[81];
|
|
340
|
+
const choose = t23;
|
|
326
341
|
let handleInput;
|
|
327
342
|
let search;
|
|
328
|
-
if ($[
|
|
343
|
+
if ($[82] !== commitMatches || $[83] !== disabled || $[84] !== loading || $[85] !== onSearch || $[86] !== readOnly || $[87] !== setOpen || $[88] !== showOnEmpty || $[89] !== update) {
|
|
329
344
|
handleInput = (next_5) => {
|
|
330
345
|
if (disabled || readOnly) return;
|
|
331
346
|
update(next_5);
|
|
@@ -347,23 +362,23 @@ var AutoComplete = (t0) => {
|
|
|
347
362
|
}
|
|
348
363
|
setActive(-1);
|
|
349
364
|
};
|
|
350
|
-
$[
|
|
351
|
-
$[
|
|
352
|
-
$[
|
|
353
|
-
$[
|
|
354
|
-
$[
|
|
355
|
-
$[
|
|
356
|
-
$[
|
|
357
|
-
$[
|
|
358
|
-
$[
|
|
359
|
-
$[
|
|
365
|
+
$[82] = commitMatches;
|
|
366
|
+
$[83] = disabled;
|
|
367
|
+
$[84] = loading;
|
|
368
|
+
$[85] = onSearch;
|
|
369
|
+
$[86] = readOnly;
|
|
370
|
+
$[87] = setOpen;
|
|
371
|
+
$[88] = showOnEmpty;
|
|
372
|
+
$[89] = update;
|
|
373
|
+
$[90] = handleInput;
|
|
374
|
+
$[91] = search;
|
|
360
375
|
} else {
|
|
361
|
-
handleInput = $[
|
|
362
|
-
search = $[
|
|
376
|
+
handleInput = $[90];
|
|
377
|
+
search = $[91];
|
|
363
378
|
}
|
|
364
|
-
let
|
|
365
|
-
if ($[
|
|
366
|
-
|
|
379
|
+
let t24;
|
|
380
|
+
if ($[92] !== active || $[93] !== choose || $[94] !== current || $[95] !== disabled || $[96] !== getMatches || $[97] !== readOnly || $[98] !== setOpen || $[99] !== showOnEmpty || $[100] !== shownOptions || $[101] !== suppressRemoteOptions || $[102] !== visible) {
|
|
381
|
+
t24 = (event) => {
|
|
367
382
|
if (disabled || readOnly) return;
|
|
368
383
|
if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
369
384
|
if (!current && !showOnEmpty || suppressRemoteOptions) return;
|
|
@@ -385,31 +400,31 @@ var AutoComplete = (t0) => {
|
|
|
385
400
|
setOpen(false);
|
|
386
401
|
}
|
|
387
402
|
};
|
|
388
|
-
$[
|
|
389
|
-
$[
|
|
390
|
-
$[
|
|
391
|
-
$[
|
|
392
|
-
$[
|
|
393
|
-
$[
|
|
394
|
-
$[
|
|
395
|
-
$[
|
|
396
|
-
$[
|
|
397
|
-
$[
|
|
398
|
-
$[
|
|
399
|
-
$[
|
|
400
|
-
} else
|
|
401
|
-
const handleKeyDown =
|
|
402
|
-
let
|
|
403
|
-
if ($[
|
|
404
|
-
|
|
405
|
-
$[
|
|
406
|
-
$[
|
|
407
|
-
} else
|
|
408
|
-
const
|
|
409
|
-
const
|
|
410
|
-
let
|
|
411
|
-
if ($[
|
|
412
|
-
|
|
403
|
+
$[92] = active;
|
|
404
|
+
$[93] = choose;
|
|
405
|
+
$[94] = current;
|
|
406
|
+
$[95] = disabled;
|
|
407
|
+
$[96] = getMatches;
|
|
408
|
+
$[97] = readOnly;
|
|
409
|
+
$[98] = setOpen;
|
|
410
|
+
$[99] = showOnEmpty;
|
|
411
|
+
$[100] = shownOptions;
|
|
412
|
+
$[101] = suppressRemoteOptions;
|
|
413
|
+
$[102] = visible;
|
|
414
|
+
$[103] = t24;
|
|
415
|
+
} else t24 = $[103];
|
|
416
|
+
const handleKeyDown = t24;
|
|
417
|
+
let t25;
|
|
418
|
+
if ($[104] !== className) {
|
|
419
|
+
t25 = clsx("k-auto-complete", className);
|
|
420
|
+
$[104] = className;
|
|
421
|
+
$[105] = t25;
|
|
422
|
+
} else t25 = $[105];
|
|
423
|
+
const t26 = visible ? listboxId : void 0;
|
|
424
|
+
const t27 = visible && active >= 0 ? `${listboxId}-option-${active}` : void 0;
|
|
425
|
+
let t28;
|
|
426
|
+
if ($[106] !== current || $[107] !== disabled || $[108] !== getMatches || $[109] !== loading || $[110] !== onFocus || $[111] !== readOnly || $[112] !== setOpen || $[113] !== showOnEmpty) {
|
|
427
|
+
t28 = (event_0) => {
|
|
413
428
|
onFocus?.(event_0);
|
|
414
429
|
if (event_0.defaultPrevented) return;
|
|
415
430
|
if (disabled || readOnly) return;
|
|
@@ -417,61 +432,61 @@ var AutoComplete = (t0) => {
|
|
|
417
432
|
if (matches_1.length) setShownOptions(matches_1);
|
|
418
433
|
if ((current || showOnEmpty) && (matches_1.length || loading)) setOpen(true);
|
|
419
434
|
};
|
|
420
|
-
$[
|
|
421
|
-
$[
|
|
422
|
-
$[
|
|
423
|
-
$[
|
|
424
|
-
$[
|
|
425
|
-
$[
|
|
426
|
-
$[
|
|
427
|
-
$[
|
|
428
|
-
$[
|
|
429
|
-
} else
|
|
430
|
-
let
|
|
431
|
-
if ($[
|
|
432
|
-
|
|
435
|
+
$[106] = current;
|
|
436
|
+
$[107] = disabled;
|
|
437
|
+
$[108] = getMatches;
|
|
438
|
+
$[109] = loading;
|
|
439
|
+
$[110] = onFocus;
|
|
440
|
+
$[111] = readOnly;
|
|
441
|
+
$[112] = setOpen;
|
|
442
|
+
$[113] = showOnEmpty;
|
|
443
|
+
$[114] = t28;
|
|
444
|
+
} else t28 = $[114];
|
|
445
|
+
let t29;
|
|
446
|
+
if ($[115] !== onBlur || $[116] !== setOpen) {
|
|
447
|
+
t29 = (event_1) => {
|
|
433
448
|
onBlur?.(event_1);
|
|
434
449
|
if (event_1.defaultPrevented) return;
|
|
435
450
|
clearTimeout(blurTimer.current);
|
|
436
451
|
blurTimer.current = setTimeout(() => setOpen(false), 120);
|
|
437
452
|
};
|
|
438
|
-
$[
|
|
439
|
-
$[
|
|
440
|
-
$[
|
|
441
|
-
} else
|
|
442
|
-
let
|
|
443
|
-
if ($[
|
|
444
|
-
|
|
453
|
+
$[115] = onBlur;
|
|
454
|
+
$[116] = setOpen;
|
|
455
|
+
$[117] = t29;
|
|
456
|
+
} else t29 = $[117];
|
|
457
|
+
let t30;
|
|
458
|
+
if ($[118] !== onCompositionStart) {
|
|
459
|
+
t30 = (event_2) => {
|
|
445
460
|
composing.current = true;
|
|
446
461
|
onCompositionStart?.(event_2);
|
|
447
462
|
};
|
|
448
|
-
$[
|
|
449
|
-
$[
|
|
450
|
-
} else
|
|
451
|
-
let
|
|
452
|
-
if ($[
|
|
453
|
-
|
|
463
|
+
$[118] = onCompositionStart;
|
|
464
|
+
$[119] = t30;
|
|
465
|
+
} else t30 = $[119];
|
|
466
|
+
let t31;
|
|
467
|
+
if ($[120] !== onCompositionEnd || $[121] !== search) {
|
|
468
|
+
t31 = (event_3) => {
|
|
454
469
|
composing.current = false;
|
|
455
470
|
onCompositionEnd?.(event_3);
|
|
456
471
|
if (!event_3.defaultPrevented) search(event_3.currentTarget.value);
|
|
457
472
|
};
|
|
458
|
-
$[
|
|
459
|
-
$[
|
|
460
|
-
$[
|
|
461
|
-
} else
|
|
462
|
-
let
|
|
463
|
-
if ($[
|
|
464
|
-
|
|
473
|
+
$[120] = onCompositionEnd;
|
|
474
|
+
$[121] = search;
|
|
475
|
+
$[122] = t31;
|
|
476
|
+
} else t31 = $[122];
|
|
477
|
+
let t32;
|
|
478
|
+
if ($[123] !== handleKeyDown || $[124] !== onKeyDown) {
|
|
479
|
+
t32 = (event_4) => {
|
|
465
480
|
onKeyDown?.(event_4);
|
|
466
481
|
if (!event_4.defaultPrevented) handleKeyDown(event_4);
|
|
467
482
|
};
|
|
468
|
-
$[
|
|
469
|
-
$[
|
|
470
|
-
$[
|
|
471
|
-
} else
|
|
472
|
-
let
|
|
473
|
-
if ($[
|
|
474
|
-
|
|
483
|
+
$[123] = handleKeyDown;
|
|
484
|
+
$[124] = onKeyDown;
|
|
485
|
+
$[125] = t32;
|
|
486
|
+
} else t32 = $[125];
|
|
487
|
+
let t33;
|
|
488
|
+
if ($[126] !== addonAfter || $[127] !== addonBefore || $[128] !== clearable || $[129] !== current || $[130] !== disabled || $[131] !== handleInput || $[132] !== onClear || $[133] !== prefix || $[134] !== readOnly || $[135] !== rest || $[136] !== shape || $[137] !== size || $[138] !== suffix || $[139] !== t26 || $[140] !== t27 || $[141] !== t28 || $[142] !== t29 || $[143] !== t30 || $[144] !== t31 || $[145] !== t32 || $[146] !== theme || $[147] !== visible) {
|
|
489
|
+
t33 = /* @__PURE__ */ jsx(input_default, {
|
|
475
490
|
...rest,
|
|
476
491
|
value: current,
|
|
477
492
|
disabled,
|
|
@@ -480,54 +495,62 @@ var AutoComplete = (t0) => {
|
|
|
480
495
|
shape,
|
|
481
496
|
theme,
|
|
482
497
|
clearable,
|
|
498
|
+
addonBefore,
|
|
499
|
+
addonAfter,
|
|
500
|
+
prefix,
|
|
501
|
+
suffix,
|
|
483
502
|
role: "combobox",
|
|
484
503
|
"aria-autocomplete": "list",
|
|
485
504
|
"aria-expanded": visible,
|
|
486
|
-
"aria-controls":
|
|
487
|
-
"aria-activedescendant":
|
|
488
|
-
onFocus:
|
|
489
|
-
onBlur:
|
|
490
|
-
onCompositionStart:
|
|
491
|
-
onCompositionEnd:
|
|
505
|
+
"aria-controls": t26,
|
|
506
|
+
"aria-activedescendant": t27,
|
|
507
|
+
onFocus: t28,
|
|
508
|
+
onBlur: t29,
|
|
509
|
+
onCompositionStart: t30,
|
|
510
|
+
onCompositionEnd: t31,
|
|
492
511
|
onClear,
|
|
493
512
|
onChange: handleInput,
|
|
494
|
-
onKeyDown:
|
|
513
|
+
onKeyDown: t32
|
|
495
514
|
});
|
|
496
|
-
$[
|
|
497
|
-
$[
|
|
498
|
-
$[
|
|
499
|
-
$[
|
|
500
|
-
$[
|
|
501
|
-
$[
|
|
502
|
-
$[
|
|
503
|
-
$[
|
|
504
|
-
$[
|
|
505
|
-
$[
|
|
506
|
-
$[
|
|
507
|
-
$[
|
|
508
|
-
$[
|
|
509
|
-
$[
|
|
510
|
-
$[
|
|
511
|
-
$[
|
|
512
|
-
$[
|
|
513
|
-
$[
|
|
514
|
-
$[
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
"k-select-dropdown-lg": t34
|
|
523
|
-
});
|
|
524
|
-
$[140] = t33;
|
|
525
|
-
$[141] = t34;
|
|
526
|
-
$[142] = t35;
|
|
527
|
-
} else t35 = $[142];
|
|
515
|
+
$[126] = addonAfter;
|
|
516
|
+
$[127] = addonBefore;
|
|
517
|
+
$[128] = clearable;
|
|
518
|
+
$[129] = current;
|
|
519
|
+
$[130] = disabled;
|
|
520
|
+
$[131] = handleInput;
|
|
521
|
+
$[132] = onClear;
|
|
522
|
+
$[133] = prefix;
|
|
523
|
+
$[134] = readOnly;
|
|
524
|
+
$[135] = rest;
|
|
525
|
+
$[136] = shape;
|
|
526
|
+
$[137] = size;
|
|
527
|
+
$[138] = suffix;
|
|
528
|
+
$[139] = t26;
|
|
529
|
+
$[140] = t27;
|
|
530
|
+
$[141] = t28;
|
|
531
|
+
$[142] = t29;
|
|
532
|
+
$[143] = t30;
|
|
533
|
+
$[144] = t31;
|
|
534
|
+
$[145] = t32;
|
|
535
|
+
$[146] = theme;
|
|
536
|
+
$[147] = visible;
|
|
537
|
+
$[148] = t33;
|
|
538
|
+
} else t33 = $[148];
|
|
539
|
+
const t34 = size === "small";
|
|
540
|
+
const t35 = size === "large";
|
|
528
541
|
let t36;
|
|
529
|
-
if ($[
|
|
530
|
-
t36 =
|
|
542
|
+
if ($[149] !== t34 || $[150] !== t35) {
|
|
543
|
+
t36 = clsx("k-select-dropdown", "k-auto-complete-dropdown", {
|
|
544
|
+
"k-select-dropdown-sm": t34,
|
|
545
|
+
"k-select-dropdown-lg": t35
|
|
546
|
+
});
|
|
547
|
+
$[149] = t34;
|
|
548
|
+
$[150] = t35;
|
|
549
|
+
$[151] = t36;
|
|
550
|
+
} else t36 = $[151];
|
|
551
|
+
let t37;
|
|
552
|
+
if ($[152] !== active || $[153] !== choose || $[154] !== disabled || $[155] !== listboxId || $[156] !== loading || $[157] !== loadingText || $[158] !== locale || $[159] !== readOnly || $[160] !== shownOptions) {
|
|
553
|
+
t37 = loading ? /* @__PURE__ */ jsxs("div", {
|
|
531
554
|
className: "k-select-loading",
|
|
532
555
|
children: [/* @__PURE__ */ jsx(Icon, {
|
|
533
556
|
type: Loading,
|
|
@@ -547,34 +570,34 @@ var AutoComplete = (t0) => {
|
|
|
547
570
|
onClick: () => choose(option_5),
|
|
548
571
|
children: option_5.label ?? option_5.value
|
|
549
572
|
}, option_5.value)) });
|
|
550
|
-
$[
|
|
551
|
-
$[
|
|
552
|
-
$[
|
|
553
|
-
$[
|
|
554
|
-
$[
|
|
555
|
-
$[
|
|
556
|
-
$[
|
|
557
|
-
$[
|
|
558
|
-
$[
|
|
559
|
-
$[
|
|
560
|
-
} else
|
|
561
|
-
let
|
|
562
|
-
if ($[
|
|
563
|
-
|
|
573
|
+
$[152] = active;
|
|
574
|
+
$[153] = choose;
|
|
575
|
+
$[154] = disabled;
|
|
576
|
+
$[155] = listboxId;
|
|
577
|
+
$[156] = loading;
|
|
578
|
+
$[157] = loadingText;
|
|
579
|
+
$[158] = locale;
|
|
580
|
+
$[159] = readOnly;
|
|
581
|
+
$[160] = shownOptions;
|
|
582
|
+
$[161] = t37;
|
|
583
|
+
} else t37 = $[161];
|
|
584
|
+
let t38;
|
|
585
|
+
if ($[162] !== listboxId || $[163] !== t36 || $[164] !== t37) {
|
|
586
|
+
t38 = /* @__PURE__ */ jsx("div", {
|
|
564
587
|
ref: dropdownRef,
|
|
565
588
|
id: listboxId,
|
|
566
|
-
className:
|
|
589
|
+
className: t36,
|
|
567
590
|
role: "listbox",
|
|
568
|
-
children:
|
|
591
|
+
children: t37
|
|
569
592
|
});
|
|
570
|
-
$[
|
|
571
|
-
$[
|
|
572
|
-
$[
|
|
573
|
-
$[
|
|
574
|
-
} else
|
|
575
|
-
let
|
|
576
|
-
if ($[
|
|
577
|
-
|
|
593
|
+
$[162] = listboxId;
|
|
594
|
+
$[163] = t36;
|
|
595
|
+
$[164] = t37;
|
|
596
|
+
$[165] = t38;
|
|
597
|
+
} else t38 = $[165];
|
|
598
|
+
let t39;
|
|
599
|
+
if ($[166] !== destroyOnClose || $[167] !== setOpen || $[168] !== t38 || $[169] !== visible) {
|
|
600
|
+
t39 = /* @__PURE__ */ jsx(Popup, {
|
|
578
601
|
raw: true,
|
|
579
602
|
open: visible,
|
|
580
603
|
target: rootRef,
|
|
@@ -584,28 +607,29 @@ var AutoComplete = (t0) => {
|
|
|
584
607
|
transitionName: "k-select",
|
|
585
608
|
offset: 6,
|
|
586
609
|
matchTriggerWidth: true,
|
|
587
|
-
destroyOnClose
|
|
610
|
+
destroyOnClose,
|
|
588
611
|
onOpenChange: setOpen,
|
|
589
|
-
overlay:
|
|
612
|
+
overlay: t38
|
|
590
613
|
});
|
|
591
|
-
$[
|
|
592
|
-
$[
|
|
593
|
-
$[
|
|
594
|
-
$[
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
614
|
+
$[166] = destroyOnClose;
|
|
615
|
+
$[167] = setOpen;
|
|
616
|
+
$[168] = t38;
|
|
617
|
+
$[169] = visible;
|
|
618
|
+
$[170] = t39;
|
|
619
|
+
} else t39 = $[170];
|
|
620
|
+
let t40;
|
|
621
|
+
if ($[171] !== t25 || $[172] !== t33 || $[173] !== t39) {
|
|
622
|
+
t40 = /* @__PURE__ */ jsxs("div", {
|
|
599
623
|
ref: rootRef,
|
|
600
|
-
className:
|
|
601
|
-
children: [
|
|
624
|
+
className: t25,
|
|
625
|
+
children: [t33, t39]
|
|
602
626
|
});
|
|
603
|
-
$[
|
|
604
|
-
$[
|
|
605
|
-
$[
|
|
606
|
-
$[
|
|
607
|
-
} else
|
|
608
|
-
return
|
|
627
|
+
$[171] = t25;
|
|
628
|
+
$[172] = t33;
|
|
629
|
+
$[173] = t39;
|
|
630
|
+
$[174] = t40;
|
|
631
|
+
} else t40 = $[174];
|
|
632
|
+
return t40;
|
|
609
633
|
};
|
|
610
634
|
var auto_complete_default = createFormFieldComponent(AutoComplete);
|
|
611
635
|
function _temp(item) {
|