react-kui 3.1.1 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.zh-CN.md +3 -1
- package/ai/kui-components.json +912 -318
- 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 +3 -3
- package/es/select/option.js +1 -1
- package/es/select/select.js +33 -36
- 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 +544 -206
- package/es/table/utils.js +141 -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/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
package/es/mentions/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* react-kui v3.
|
|
2
|
+
* react-kui v3.2.0
|
|
3
3
|
* Copyright 2017-present, kui-react.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Homepage: https://react.k-ui.cn
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import Popup from "../popup/index.js";
|
|
10
|
-
import {
|
|
10
|
+
import { useFormAppearance } from "../config/use-config-appearance.js";
|
|
11
11
|
import { CircleX, Loading } from "../node_modules/.pnpm/kui-icons@5.0.0/node_modules/kui-icons/dist/kui-icons.esm.js";
|
|
12
12
|
import Icon from "../icon/index.js";
|
|
13
13
|
import { useValue } from "../utils/use-value.js";
|
|
@@ -70,7 +70,7 @@ var caretPosition = (element) => {
|
|
|
70
70
|
};
|
|
71
71
|
var EMPTY_OPTIONS = [];
|
|
72
72
|
var Mentions = (t0) => {
|
|
73
|
-
const $ = c(
|
|
73
|
+
const $ = c(147);
|
|
74
74
|
let className;
|
|
75
75
|
let disabled;
|
|
76
76
|
let emptyText;
|
|
@@ -90,10 +90,11 @@ var Mentions = (t0) => {
|
|
|
90
90
|
let t4;
|
|
91
91
|
let t5;
|
|
92
92
|
let t6;
|
|
93
|
+
let t7;
|
|
93
94
|
let themeProp;
|
|
94
95
|
let value;
|
|
95
96
|
if ($[0] !== t0) {
|
|
96
|
-
({value, options: t1, triggers: t2, rows: t3, placement: t4, size: sizeProp, shape: shapeProp, theme: themeProp, emptyText, loading:
|
|
97
|
+
({value, options: t1, triggers: t2, rows: t3, placement: t4, destroyOnClose: t5, size: sizeProp, shape: shapeProp, theme: themeProp, emptyText, loading: t6, loadingText, clearable: t7, filterOption, onChange, onSearch, onSelect, onClear, className, disabled, readOnly, ...rest} = t0);
|
|
97
98
|
$[0] = t0;
|
|
98
99
|
$[1] = className;
|
|
99
100
|
$[2] = disabled;
|
|
@@ -114,8 +115,9 @@ var Mentions = (t0) => {
|
|
|
114
115
|
$[17] = t4;
|
|
115
116
|
$[18] = t5;
|
|
116
117
|
$[19] = t6;
|
|
117
|
-
$[20] =
|
|
118
|
-
$[21] =
|
|
118
|
+
$[20] = t7;
|
|
119
|
+
$[21] = themeProp;
|
|
120
|
+
$[22] = value;
|
|
119
121
|
} else {
|
|
120
122
|
className = $[1];
|
|
121
123
|
disabled = $[2];
|
|
@@ -136,110 +138,112 @@ var Mentions = (t0) => {
|
|
|
136
138
|
t4 = $[17];
|
|
137
139
|
t5 = $[18];
|
|
138
140
|
t6 = $[19];
|
|
139
|
-
|
|
140
|
-
|
|
141
|
+
t7 = $[20];
|
|
142
|
+
themeProp = $[21];
|
|
143
|
+
value = $[22];
|
|
141
144
|
}
|
|
142
145
|
const options = t1 === void 0 ? EMPTY_OPTIONS : t1;
|
|
143
|
-
let
|
|
144
|
-
if ($[
|
|
145
|
-
|
|
146
|
-
$[
|
|
147
|
-
$[
|
|
148
|
-
} else
|
|
149
|
-
const triggers =
|
|
146
|
+
let t8;
|
|
147
|
+
if ($[23] !== t2) {
|
|
148
|
+
t8 = t2 === void 0 ? ["@"] : t2;
|
|
149
|
+
$[23] = t2;
|
|
150
|
+
$[24] = t8;
|
|
151
|
+
} else t8 = $[24];
|
|
152
|
+
const triggers = t8;
|
|
150
153
|
const rows = t3 === void 0 ? 1 : t3;
|
|
151
154
|
const placement = t4 === void 0 ? "bottom-left" : t4;
|
|
152
|
-
const
|
|
153
|
-
const
|
|
154
|
-
const
|
|
155
|
+
const destroyOnClose = t5 === void 0 ? true : t5;
|
|
156
|
+
const loading = t6 === void 0 ? false : t6;
|
|
157
|
+
const clearable = t7 === void 0 ? true : t7;
|
|
158
|
+
const inheritedAppearance = useFormAppearance();
|
|
155
159
|
const size = sizeProp ?? inheritedAppearance.size;
|
|
156
160
|
const shape = shapeProp ?? inheritedAppearance.shape;
|
|
157
161
|
const theme = themeProp ?? inheritedAppearance.theme ?? "fill";
|
|
158
162
|
const [inner, setInner] = useValue(value, _temp);
|
|
159
|
-
const
|
|
160
|
-
let
|
|
161
|
-
if ($[
|
|
162
|
-
let
|
|
163
|
-
if ($[
|
|
164
|
-
|
|
165
|
-
$[
|
|
166
|
-
} else
|
|
167
|
-
|
|
168
|
-
$[24] = t8;
|
|
163
|
+
const t9 = useId();
|
|
164
|
+
let t10;
|
|
165
|
+
if ($[25] !== t9) {
|
|
166
|
+
let t11;
|
|
167
|
+
if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
|
|
168
|
+
t11 = /:/g;
|
|
169
|
+
$[27] = t11;
|
|
170
|
+
} else t11 = $[27];
|
|
171
|
+
t10 = t9.replace(t11, "");
|
|
169
172
|
$[25] = t9;
|
|
170
|
-
|
|
171
|
-
|
|
173
|
+
$[26] = t10;
|
|
174
|
+
} else t10 = $[26];
|
|
175
|
+
const listboxId = `k-mentions-listbox-${t10}`;
|
|
172
176
|
const [query, setQuery] = useState(null);
|
|
173
177
|
const [active, setActive] = useState(0);
|
|
174
|
-
let
|
|
175
|
-
if ($[
|
|
176
|
-
|
|
177
|
-
$[
|
|
178
|
-
} else
|
|
179
|
-
const [shown, setShown] = useState(
|
|
178
|
+
let t11;
|
|
179
|
+
if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
|
|
180
|
+
t11 = [];
|
|
181
|
+
$[28] = t11;
|
|
182
|
+
} else t11 = $[28];
|
|
183
|
+
const [shown, setShown] = useState(t11);
|
|
180
184
|
const [popupWidth, setPopupWidth] = useState(260);
|
|
181
185
|
const rootRef = useRef(null);
|
|
182
186
|
const textareaRef = useRef(null);
|
|
183
187
|
const dropdownRef = useRef(null);
|
|
184
188
|
const composing = useRef(false);
|
|
185
189
|
const current = inner;
|
|
186
|
-
let t11;
|
|
187
|
-
if ($[28] !== options) {
|
|
188
|
-
t11 = options.map(_temp2);
|
|
189
|
-
$[28] = options;
|
|
190
|
-
$[29] = t11;
|
|
191
|
-
} else t11 = $[29];
|
|
192
|
-
const normalized = t11;
|
|
193
190
|
let t12;
|
|
194
|
-
if ($[
|
|
195
|
-
t12 =
|
|
196
|
-
$[
|
|
197
|
-
$[
|
|
198
|
-
} else t12 = $[
|
|
199
|
-
const
|
|
200
|
-
const firstEnabled = _temp4;
|
|
191
|
+
if ($[29] !== options) {
|
|
192
|
+
t12 = options.map(_temp2);
|
|
193
|
+
$[29] = options;
|
|
194
|
+
$[30] = t12;
|
|
195
|
+
} else t12 = $[30];
|
|
196
|
+
const normalized = t12;
|
|
201
197
|
let t13;
|
|
202
|
-
if ($[
|
|
203
|
-
t13 = (
|
|
204
|
-
|
|
205
|
-
setActive(firstEnabled(items_0));
|
|
206
|
-
};
|
|
198
|
+
if ($[31] !== triggers) {
|
|
199
|
+
t13 = triggers.filter(Boolean);
|
|
200
|
+
$[31] = triggers;
|
|
207
201
|
$[32] = t13;
|
|
208
202
|
} else t13 = $[32];
|
|
209
|
-
const
|
|
203
|
+
const effectiveTriggers = t13;
|
|
204
|
+
const firstEnabled = _temp4;
|
|
210
205
|
let t14;
|
|
211
|
-
if ($[33]
|
|
212
|
-
t14 = (
|
|
206
|
+
if ($[33] === Symbol.for("react.memo_cache_sentinel")) {
|
|
207
|
+
t14 = (items_0) => {
|
|
208
|
+
setShown(items_0);
|
|
209
|
+
setActive(firstEnabled(items_0));
|
|
210
|
+
};
|
|
211
|
+
$[33] = t14;
|
|
212
|
+
} else t14 = $[33];
|
|
213
|
+
const setMatches = t14;
|
|
214
|
+
let t15;
|
|
215
|
+
if ($[34] !== active || $[35] !== shown) {
|
|
216
|
+
t15 = (offset) => {
|
|
213
217
|
const enabled = shown.map(_temp5).filter(_temp6);
|
|
214
218
|
if (!enabled.length) return;
|
|
215
219
|
const currentIndex = enabled.indexOf(active);
|
|
216
220
|
setActive(enabled[(Math.max(currentIndex, 0) + offset + enabled.length) % enabled.length]);
|
|
217
221
|
};
|
|
218
|
-
$[
|
|
219
|
-
$[
|
|
220
|
-
$[
|
|
221
|
-
} else
|
|
222
|
-
const moveActive =
|
|
223
|
-
let
|
|
224
|
-
if ($[
|
|
225
|
-
|
|
222
|
+
$[34] = active;
|
|
223
|
+
$[35] = shown;
|
|
224
|
+
$[36] = t15;
|
|
225
|
+
} else t15 = $[36];
|
|
226
|
+
const moveActive = t15;
|
|
227
|
+
let t16;
|
|
228
|
+
if ($[37] !== filterOption || $[38] !== normalized || $[39] !== onSearch) {
|
|
229
|
+
t16 = (state) => {
|
|
226
230
|
if (onSearch && !filterOption) return normalized;
|
|
227
231
|
return normalized.filter((option_1) => filterOption ? filterOption(state.text, option_1) : option_1.value.toLocaleLowerCase().includes(state.text.toLocaleLowerCase()));
|
|
228
232
|
};
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
232
|
-
$[
|
|
233
|
-
} else
|
|
234
|
-
const getMatches =
|
|
233
|
+
$[37] = filterOption;
|
|
234
|
+
$[38] = normalized;
|
|
235
|
+
$[39] = onSearch;
|
|
236
|
+
$[40] = t16;
|
|
237
|
+
} else t16 = $[40];
|
|
238
|
+
const getMatches = t16;
|
|
235
239
|
const [previousNormalized, setPreviousNormalized] = useState(normalized);
|
|
236
240
|
if (previousNormalized !== normalized) {
|
|
237
241
|
setPreviousNormalized(normalized);
|
|
238
242
|
if (query) setMatches(getMatches(query));
|
|
239
243
|
}
|
|
240
|
-
let
|
|
241
|
-
if ($[
|
|
242
|
-
|
|
244
|
+
let t17;
|
|
245
|
+
if ($[41] === Symbol.for("react.memo_cache_sentinel")) {
|
|
246
|
+
t17 = () => {
|
|
243
247
|
if (!textareaRef.current) return null;
|
|
244
248
|
const rect = caretPosition(textareaRef.current);
|
|
245
249
|
setPopupWidth(Math.min(260, rootRef.current?.offsetWidth || 260));
|
|
@@ -248,13 +252,13 @@ var Mentions = (t0) => {
|
|
|
248
252
|
y: rect.bottom
|
|
249
253
|
};
|
|
250
254
|
};
|
|
251
|
-
$[
|
|
252
|
-
} else
|
|
253
|
-
const getAnchorPosition =
|
|
254
|
-
let
|
|
255
|
-
if ($[
|
|
256
|
-
|
|
257
|
-
const search =
|
|
255
|
+
$[41] = t17;
|
|
256
|
+
} else t17 = $[41];
|
|
257
|
+
const getAnchorPosition = t17;
|
|
258
|
+
let t18;
|
|
259
|
+
if ($[42] !== effectiveTriggers || $[43] !== getMatches || $[44] !== onSearch || $[45] !== readOnly) {
|
|
260
|
+
t18 = (text, caret, t19) => {
|
|
261
|
+
const search = t19 === void 0 ? false : t19;
|
|
258
262
|
if (readOnly) {
|
|
259
263
|
setQuery(null);
|
|
260
264
|
return;
|
|
@@ -276,46 +280,46 @@ var Mentions = (t0) => {
|
|
|
276
280
|
if (search && nextQuery.text) onSearch?.(nextQuery.text, nextQuery.trigger);
|
|
277
281
|
} else setMatches([]);
|
|
278
282
|
};
|
|
279
|
-
$[
|
|
280
|
-
$[
|
|
281
|
-
$[
|
|
282
|
-
$[
|
|
283
|
-
$[
|
|
284
|
-
} else
|
|
285
|
-
const updateQuery =
|
|
286
|
-
let t18;
|
|
283
|
+
$[42] = effectiveTriggers;
|
|
284
|
+
$[43] = getMatches;
|
|
285
|
+
$[44] = onSearch;
|
|
286
|
+
$[45] = readOnly;
|
|
287
|
+
$[46] = t18;
|
|
288
|
+
} else t18 = $[46];
|
|
289
|
+
const updateQuery = t18;
|
|
287
290
|
let t19;
|
|
288
|
-
|
|
289
|
-
|
|
291
|
+
let t20;
|
|
292
|
+
if ($[47] !== active || $[48] !== listboxId) {
|
|
293
|
+
t19 = () => {
|
|
290
294
|
dropdownRef.current?.querySelector(`#${listboxId}-option-${active}`)?.scrollIntoView({ block: "nearest" });
|
|
291
295
|
};
|
|
292
|
-
|
|
293
|
-
$[
|
|
294
|
-
$[
|
|
295
|
-
$[48] = t18;
|
|
296
|
+
t20 = [active, listboxId];
|
|
297
|
+
$[47] = active;
|
|
298
|
+
$[48] = listboxId;
|
|
296
299
|
$[49] = t19;
|
|
300
|
+
$[50] = t20;
|
|
297
301
|
} else {
|
|
298
|
-
t18 = $[48];
|
|
299
302
|
t19 = $[49];
|
|
303
|
+
t20 = $[50];
|
|
300
304
|
}
|
|
301
|
-
useEffect(
|
|
302
|
-
let
|
|
303
|
-
if ($[
|
|
304
|
-
|
|
305
|
+
useEffect(t19, t20);
|
|
306
|
+
let t21;
|
|
307
|
+
if ($[51] !== disabled || $[52] !== onChange || $[53] !== readOnly || $[54] !== setInner) {
|
|
308
|
+
t21 = (next_0) => {
|
|
305
309
|
if (disabled || readOnly) return;
|
|
306
310
|
setInner(next_0);
|
|
307
311
|
onChange?.(next_0);
|
|
308
312
|
};
|
|
309
|
-
$[
|
|
310
|
-
$[
|
|
311
|
-
$[
|
|
312
|
-
$[
|
|
313
|
-
$[
|
|
314
|
-
} else
|
|
315
|
-
const setValue =
|
|
316
|
-
let
|
|
317
|
-
if ($[
|
|
318
|
-
|
|
313
|
+
$[51] = disabled;
|
|
314
|
+
$[52] = onChange;
|
|
315
|
+
$[53] = readOnly;
|
|
316
|
+
$[54] = setInner;
|
|
317
|
+
$[55] = t21;
|
|
318
|
+
} else t21 = $[55];
|
|
319
|
+
const setValue = t21;
|
|
320
|
+
let t22;
|
|
321
|
+
if ($[56] !== disabled || $[57] !== onClear || $[58] !== readOnly || $[59] !== setValue) {
|
|
322
|
+
t22 = (event) => {
|
|
319
323
|
if (disabled || readOnly) return;
|
|
320
324
|
event.stopPropagation();
|
|
321
325
|
setValue("");
|
|
@@ -323,16 +327,16 @@ var Mentions = (t0) => {
|
|
|
323
327
|
onClear?.();
|
|
324
328
|
textareaRef.current?.focus();
|
|
325
329
|
};
|
|
326
|
-
$[
|
|
327
|
-
$[
|
|
328
|
-
$[
|
|
329
|
-
$[
|
|
330
|
-
$[
|
|
331
|
-
} else
|
|
332
|
-
const clear =
|
|
333
|
-
let
|
|
334
|
-
if ($[
|
|
335
|
-
|
|
330
|
+
$[56] = disabled;
|
|
331
|
+
$[57] = onClear;
|
|
332
|
+
$[58] = readOnly;
|
|
333
|
+
$[59] = setValue;
|
|
334
|
+
$[60] = t22;
|
|
335
|
+
} else t22 = $[60];
|
|
336
|
+
const clear = t22;
|
|
337
|
+
let t23;
|
|
338
|
+
if ($[61] !== current || $[62] !== disabled || $[63] !== onSelect || $[64] !== query || $[65] !== readOnly || $[66] !== setValue) {
|
|
339
|
+
t23 = (option_2) => {
|
|
336
340
|
const textarea = textareaRef.current;
|
|
337
341
|
if (disabled || readOnly || !query || option_2.disabled || !textarea) return;
|
|
338
342
|
const state_0 = query;
|
|
@@ -346,72 +350,72 @@ var Mentions = (t0) => {
|
|
|
346
350
|
textarea.setSelectionRange(at, at);
|
|
347
351
|
});
|
|
348
352
|
};
|
|
349
|
-
$[
|
|
350
|
-
$[
|
|
351
|
-
$[
|
|
352
|
-
$[
|
|
353
|
-
$[
|
|
354
|
-
$[
|
|
355
|
-
$[
|
|
356
|
-
} else
|
|
357
|
-
const choose =
|
|
358
|
-
const
|
|
359
|
-
const
|
|
360
|
-
const
|
|
361
|
-
let
|
|
362
|
-
if ($[
|
|
363
|
-
|
|
364
|
-
"k-mentions-sm":
|
|
365
|
-
"k-mentions-lg":
|
|
353
|
+
$[61] = current;
|
|
354
|
+
$[62] = disabled;
|
|
355
|
+
$[63] = onSelect;
|
|
356
|
+
$[64] = query;
|
|
357
|
+
$[65] = readOnly;
|
|
358
|
+
$[66] = setValue;
|
|
359
|
+
$[67] = t23;
|
|
360
|
+
} else t23 = $[67];
|
|
361
|
+
const choose = t23;
|
|
362
|
+
const t24 = size === "small";
|
|
363
|
+
const t25 = size === "large";
|
|
364
|
+
const t26 = clearable && !!current && !disabled && !readOnly;
|
|
365
|
+
let t27;
|
|
366
|
+
if ($[68] !== className || $[69] !== disabled || $[70] !== readOnly || $[71] !== t24 || $[72] !== t25 || $[73] !== t26) {
|
|
367
|
+
t27 = clsx("k-mentions", className, {
|
|
368
|
+
"k-mentions-sm": t24,
|
|
369
|
+
"k-mentions-lg": t25,
|
|
366
370
|
"k-mentions-disabled": disabled,
|
|
367
371
|
"k-mentions-readonly": readOnly,
|
|
368
|
-
"k-mentions-has-clear":
|
|
372
|
+
"k-mentions-has-clear": t26
|
|
369
373
|
});
|
|
370
|
-
$[
|
|
371
|
-
$[
|
|
372
|
-
$[
|
|
373
|
-
$[70] = t23;
|
|
374
|
+
$[68] = className;
|
|
375
|
+
$[69] = disabled;
|
|
376
|
+
$[70] = readOnly;
|
|
374
377
|
$[71] = t24;
|
|
375
378
|
$[72] = t25;
|
|
376
379
|
$[73] = t26;
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
const t28 = query
|
|
380
|
-
const t29 = query
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
380
|
+
$[74] = t27;
|
|
381
|
+
} else t27 = $[74];
|
|
382
|
+
const t28 = Boolean(query);
|
|
383
|
+
const t29 = query ? listboxId : void 0;
|
|
384
|
+
const t30 = query && shown[active] ? `${listboxId}-option-${active}` : void 0;
|
|
385
|
+
let t31;
|
|
386
|
+
if ($[75] !== setValue || $[76] !== updateQuery) {
|
|
387
|
+
t31 = (text_0) => {
|
|
384
388
|
setValue(text_0);
|
|
385
389
|
if (composing.current) return;
|
|
386
390
|
if (textareaRef.current) updateQuery(text_0, textareaRef.current.selectionStart, true);
|
|
387
391
|
};
|
|
388
|
-
$[
|
|
389
|
-
$[
|
|
390
|
-
$[76] = t30;
|
|
391
|
-
} else t30 = $[76];
|
|
392
|
-
let t31;
|
|
393
|
-
if ($[77] === Symbol.for("react.memo_cache_sentinel")) {
|
|
394
|
-
t31 = () => {
|
|
395
|
-
composing.current = true;
|
|
396
|
-
};
|
|
392
|
+
$[75] = setValue;
|
|
393
|
+
$[76] = updateQuery;
|
|
397
394
|
$[77] = t31;
|
|
398
395
|
} else t31 = $[77];
|
|
399
396
|
let t32;
|
|
400
|
-
if ($[78]
|
|
401
|
-
t32 = (
|
|
397
|
+
if ($[78] === Symbol.for("react.memo_cache_sentinel")) {
|
|
398
|
+
t32 = () => {
|
|
399
|
+
composing.current = true;
|
|
400
|
+
};
|
|
401
|
+
$[78] = t32;
|
|
402
|
+
} else t32 = $[78];
|
|
403
|
+
let t33;
|
|
404
|
+
if ($[79] !== updateQuery) {
|
|
405
|
+
t33 = (event_0) => {
|
|
402
406
|
composing.current = false;
|
|
403
407
|
updateQuery(event_0.currentTarget.value, event_0.currentTarget.selectionStart, true);
|
|
404
408
|
};
|
|
405
|
-
$[
|
|
406
|
-
$[
|
|
407
|
-
} else
|
|
408
|
-
let t33;
|
|
409
|
+
$[79] = updateQuery;
|
|
410
|
+
$[80] = t33;
|
|
411
|
+
} else t33 = $[80];
|
|
409
412
|
let t34;
|
|
410
413
|
let t35;
|
|
411
|
-
|
|
412
|
-
|
|
414
|
+
let t36;
|
|
415
|
+
if ($[81] !== current || $[82] !== updateQuery) {
|
|
413
416
|
t34 = () => textareaRef.current && updateQuery(current, textareaRef.current.selectionStart);
|
|
414
|
-
t35 = (
|
|
417
|
+
t35 = () => textareaRef.current && updateQuery(current, textareaRef.current.selectionStart);
|
|
418
|
+
t36 = (event_1) => {
|
|
415
419
|
if ([
|
|
416
420
|
"ArrowLeft",
|
|
417
421
|
"ArrowRight",
|
|
@@ -419,19 +423,19 @@ var Mentions = (t0) => {
|
|
|
419
423
|
"End"
|
|
420
424
|
].includes(event_1.key) && textareaRef.current) updateQuery(current, textareaRef.current.selectionStart);
|
|
421
425
|
};
|
|
422
|
-
$[
|
|
423
|
-
$[
|
|
424
|
-
$[82] = t33;
|
|
426
|
+
$[81] = current;
|
|
427
|
+
$[82] = updateQuery;
|
|
425
428
|
$[83] = t34;
|
|
426
429
|
$[84] = t35;
|
|
430
|
+
$[85] = t36;
|
|
427
431
|
} else {
|
|
428
|
-
t33 = $[82];
|
|
429
432
|
t34 = $[83];
|
|
430
433
|
t35 = $[84];
|
|
434
|
+
t36 = $[85];
|
|
431
435
|
}
|
|
432
|
-
let
|
|
433
|
-
if ($[
|
|
434
|
-
|
|
436
|
+
let t37;
|
|
437
|
+
if ($[86] !== active || $[87] !== choose || $[88] !== moveActive || $[89] !== query || $[90] !== shown) {
|
|
438
|
+
t37 = (event_2) => {
|
|
435
439
|
if (!query) return;
|
|
436
440
|
if ((event_2.key === "ArrowDown" || event_2.key === "ArrowUp") && shown.length) {
|
|
437
441
|
moveActive(event_2.key === "ArrowDown" ? 1 : -1);
|
|
@@ -445,16 +449,16 @@ var Mentions = (t0) => {
|
|
|
445
449
|
setQuery(null);
|
|
446
450
|
}
|
|
447
451
|
};
|
|
448
|
-
$[
|
|
449
|
-
$[
|
|
450
|
-
$[
|
|
451
|
-
$[
|
|
452
|
-
$[
|
|
453
|
-
$[
|
|
454
|
-
} else
|
|
455
|
-
let
|
|
456
|
-
if ($[
|
|
457
|
-
|
|
452
|
+
$[86] = active;
|
|
453
|
+
$[87] = choose;
|
|
454
|
+
$[88] = moveActive;
|
|
455
|
+
$[89] = query;
|
|
456
|
+
$[90] = shown;
|
|
457
|
+
$[91] = t37;
|
|
458
|
+
} else t37 = $[91];
|
|
459
|
+
let t38;
|
|
460
|
+
if ($[92] !== current || $[93] !== disabled || $[94] !== readOnly || $[95] !== rest || $[96] !== rows || $[97] !== shape || $[98] !== size || $[99] !== t28 || $[100] !== t29 || $[101] !== t30 || $[102] !== t31 || $[103] !== t33 || $[104] !== t34 || $[105] !== t35 || $[106] !== t36 || $[107] !== t37 || $[108] !== theme) {
|
|
461
|
+
t38 = /* @__PURE__ */ jsx(textarea_default, {
|
|
458
462
|
...rest,
|
|
459
463
|
ref: textareaRef,
|
|
460
464
|
value: current,
|
|
@@ -465,39 +469,39 @@ var Mentions = (t0) => {
|
|
|
465
469
|
disabled,
|
|
466
470
|
readOnly,
|
|
467
471
|
"aria-haspopup": "listbox",
|
|
468
|
-
"aria-expanded":
|
|
469
|
-
"aria-controls":
|
|
470
|
-
"aria-activedescendant":
|
|
471
|
-
onChange:
|
|
472
|
-
onCompositionStart:
|
|
473
|
-
onCompositionEnd:
|
|
474
|
-
onClick:
|
|
475
|
-
onSelect:
|
|
476
|
-
onKeyUp:
|
|
477
|
-
onKeyDown:
|
|
472
|
+
"aria-expanded": t28,
|
|
473
|
+
"aria-controls": t29,
|
|
474
|
+
"aria-activedescendant": t30,
|
|
475
|
+
onChange: t31,
|
|
476
|
+
onCompositionStart: t32,
|
|
477
|
+
onCompositionEnd: t33,
|
|
478
|
+
onClick: t34,
|
|
479
|
+
onSelect: t35,
|
|
480
|
+
onKeyUp: t36,
|
|
481
|
+
onKeyDown: t37
|
|
478
482
|
});
|
|
479
|
-
$[
|
|
480
|
-
$[
|
|
481
|
-
$[
|
|
482
|
-
$[
|
|
483
|
-
$[
|
|
484
|
-
$[
|
|
485
|
-
$[
|
|
486
|
-
$[98] = t27;
|
|
483
|
+
$[92] = current;
|
|
484
|
+
$[93] = disabled;
|
|
485
|
+
$[94] = readOnly;
|
|
486
|
+
$[95] = rest;
|
|
487
|
+
$[96] = rows;
|
|
488
|
+
$[97] = shape;
|
|
489
|
+
$[98] = size;
|
|
487
490
|
$[99] = t28;
|
|
488
491
|
$[100] = t29;
|
|
489
492
|
$[101] = t30;
|
|
490
|
-
$[102] =
|
|
493
|
+
$[102] = t31;
|
|
491
494
|
$[103] = t33;
|
|
492
495
|
$[104] = t34;
|
|
493
496
|
$[105] = t35;
|
|
494
497
|
$[106] = t36;
|
|
495
|
-
$[107] =
|
|
496
|
-
$[108] =
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
498
|
+
$[107] = t37;
|
|
499
|
+
$[108] = theme;
|
|
500
|
+
$[109] = t38;
|
|
501
|
+
} else t38 = $[109];
|
|
502
|
+
let t39;
|
|
503
|
+
if ($[110] !== clear || $[111] !== clearable || $[112] !== current || $[113] !== disabled || $[114] !== readOnly) {
|
|
504
|
+
t39 = clearable && current && !disabled && !readOnly && /* @__PURE__ */ jsx(Icon, {
|
|
501
505
|
className: "k-mentions-clearable",
|
|
502
506
|
type: CircleX,
|
|
503
507
|
role: "button",
|
|
@@ -509,42 +513,42 @@ var Mentions = (t0) => {
|
|
|
509
513
|
if (event_4.key === "Enter" || event_4.key === " ") clear(event_4);
|
|
510
514
|
}
|
|
511
515
|
});
|
|
512
|
-
$[
|
|
513
|
-
$[
|
|
514
|
-
$[
|
|
515
|
-
$[
|
|
516
|
-
$[
|
|
517
|
-
$[
|
|
518
|
-
} else
|
|
519
|
-
const
|
|
520
|
-
let t40;
|
|
521
|
-
if ($[115] !== popupWidth) {
|
|
522
|
-
t40 = { minWidth: popupWidth };
|
|
523
|
-
$[115] = popupWidth;
|
|
524
|
-
$[116] = t40;
|
|
525
|
-
} else t40 = $[116];
|
|
516
|
+
$[110] = clear;
|
|
517
|
+
$[111] = clearable;
|
|
518
|
+
$[112] = current;
|
|
519
|
+
$[113] = disabled;
|
|
520
|
+
$[114] = readOnly;
|
|
521
|
+
$[115] = t39;
|
|
522
|
+
} else t39 = $[115];
|
|
523
|
+
const t40 = !!query;
|
|
526
524
|
let t41;
|
|
527
|
-
if ($[
|
|
528
|
-
t41 =
|
|
529
|
-
|
|
530
|
-
};
|
|
525
|
+
if ($[116] !== popupWidth) {
|
|
526
|
+
t41 = { minWidth: popupWidth };
|
|
527
|
+
$[116] = popupWidth;
|
|
531
528
|
$[117] = t41;
|
|
532
529
|
} else t41 = $[117];
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
"k-select-dropdown-sm": t42,
|
|
539
|
-
"k-select-dropdown-lg": t43
|
|
540
|
-
});
|
|
530
|
+
let t42;
|
|
531
|
+
if ($[118] === Symbol.for("react.memo_cache_sentinel")) {
|
|
532
|
+
t42 = (next_1) => {
|
|
533
|
+
if (!next_1) setQuery(null);
|
|
534
|
+
};
|
|
541
535
|
$[118] = t42;
|
|
536
|
+
} else t42 = $[118];
|
|
537
|
+
const t43 = size === "small";
|
|
538
|
+
const t44 = size === "large";
|
|
539
|
+
let t45;
|
|
540
|
+
if ($[119] !== t43 || $[120] !== t44) {
|
|
541
|
+
t45 = clsx("k-select-dropdown", "k-mentions-dropdown", {
|
|
542
|
+
"k-select-dropdown-sm": t43,
|
|
543
|
+
"k-select-dropdown-lg": t44
|
|
544
|
+
});
|
|
542
545
|
$[119] = t43;
|
|
543
546
|
$[120] = t44;
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
547
|
+
$[121] = t45;
|
|
548
|
+
} else t45 = $[121];
|
|
549
|
+
let t46;
|
|
550
|
+
if ($[122] !== active || $[123] !== choose || $[124] !== disabled || $[125] !== emptyText || $[126] !== listboxId || $[127] !== loading || $[128] !== loadingText || $[129] !== readOnly || $[130] !== shown) {
|
|
551
|
+
t46 = loading ? /* @__PURE__ */ jsxs("div", {
|
|
548
552
|
className: "k-select-loading k-mentions-loading",
|
|
549
553
|
children: [/* @__PURE__ */ jsx(Icon, {
|
|
550
554
|
type: Loading,
|
|
@@ -563,36 +567,36 @@ var Mentions = (t0) => {
|
|
|
563
567
|
onClick: () => choose(option_3),
|
|
564
568
|
children: option_3.label ?? option_3.value
|
|
565
569
|
}, option_3.value)) }) : /* @__PURE__ */ jsx(Empty, { description: emptyText });
|
|
566
|
-
$[
|
|
567
|
-
$[
|
|
568
|
-
$[
|
|
569
|
-
$[
|
|
570
|
-
$[
|
|
571
|
-
$[
|
|
572
|
-
$[
|
|
573
|
-
$[
|
|
574
|
-
$[
|
|
575
|
-
$[
|
|
576
|
-
} else
|
|
577
|
-
let
|
|
578
|
-
if ($[
|
|
579
|
-
|
|
570
|
+
$[122] = active;
|
|
571
|
+
$[123] = choose;
|
|
572
|
+
$[124] = disabled;
|
|
573
|
+
$[125] = emptyText;
|
|
574
|
+
$[126] = listboxId;
|
|
575
|
+
$[127] = loading;
|
|
576
|
+
$[128] = loadingText;
|
|
577
|
+
$[129] = readOnly;
|
|
578
|
+
$[130] = shown;
|
|
579
|
+
$[131] = t46;
|
|
580
|
+
} else t46 = $[131];
|
|
581
|
+
let t47;
|
|
582
|
+
if ($[132] !== listboxId || $[133] !== t45 || $[134] !== t46) {
|
|
583
|
+
t47 = /* @__PURE__ */ jsx("div", {
|
|
580
584
|
ref: dropdownRef,
|
|
581
585
|
id: listboxId,
|
|
582
|
-
className:
|
|
586
|
+
className: t45,
|
|
583
587
|
role: "listbox",
|
|
584
|
-
children:
|
|
588
|
+
children: t46
|
|
585
589
|
});
|
|
586
|
-
$[
|
|
587
|
-
$[132] = t44;
|
|
590
|
+
$[132] = listboxId;
|
|
588
591
|
$[133] = t45;
|
|
589
592
|
$[134] = t46;
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
593
|
+
$[135] = t47;
|
|
594
|
+
} else t47 = $[135];
|
|
595
|
+
let t48;
|
|
596
|
+
if ($[136] !== destroyOnClose || $[137] !== placement || $[138] !== t40 || $[139] !== t41 || $[140] !== t47) {
|
|
597
|
+
t48 = /* @__PURE__ */ jsx(Popup, {
|
|
594
598
|
raw: true,
|
|
595
|
-
open:
|
|
599
|
+
open: t40,
|
|
596
600
|
target: rootRef,
|
|
597
601
|
trigger: "manual",
|
|
598
602
|
placement,
|
|
@@ -600,36 +604,37 @@ var Mentions = (t0) => {
|
|
|
600
604
|
transitionName: "k-select",
|
|
601
605
|
offset: 4,
|
|
602
606
|
getAnchorPosition,
|
|
603
|
-
style:
|
|
604
|
-
destroyOnClose
|
|
607
|
+
style: t41,
|
|
608
|
+
destroyOnClose,
|
|
605
609
|
outsideEvent: "mousedown",
|
|
606
|
-
onOpenChange:
|
|
607
|
-
overlay:
|
|
610
|
+
onOpenChange: t42,
|
|
611
|
+
overlay: t47
|
|
608
612
|
});
|
|
609
|
-
$[
|
|
610
|
-
$[
|
|
611
|
-
$[
|
|
612
|
-
$[
|
|
613
|
-
$[
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
613
|
+
$[136] = destroyOnClose;
|
|
614
|
+
$[137] = placement;
|
|
615
|
+
$[138] = t40;
|
|
616
|
+
$[139] = t41;
|
|
617
|
+
$[140] = t47;
|
|
618
|
+
$[141] = t48;
|
|
619
|
+
} else t48 = $[141];
|
|
620
|
+
let t49;
|
|
621
|
+
if ($[142] !== t27 || $[143] !== t38 || $[144] !== t39 || $[145] !== t48) {
|
|
622
|
+
t49 = /* @__PURE__ */ jsxs("div", {
|
|
618
623
|
ref: rootRef,
|
|
619
|
-
className:
|
|
624
|
+
className: t27,
|
|
620
625
|
children: [
|
|
621
|
-
t37,
|
|
622
626
|
t38,
|
|
623
|
-
|
|
627
|
+
t39,
|
|
628
|
+
t48
|
|
624
629
|
]
|
|
625
630
|
});
|
|
626
|
-
$[
|
|
627
|
-
$[
|
|
628
|
-
$[
|
|
629
|
-
$[
|
|
630
|
-
$[
|
|
631
|
-
} else
|
|
632
|
-
return
|
|
631
|
+
$[142] = t27;
|
|
632
|
+
$[143] = t38;
|
|
633
|
+
$[144] = t39;
|
|
634
|
+
$[145] = t48;
|
|
635
|
+
$[146] = t49;
|
|
636
|
+
} else t49 = $[146];
|
|
637
|
+
return t49;
|
|
633
638
|
};
|
|
634
639
|
var mentions_default = createFormFieldComponent(Mentions);
|
|
635
640
|
function _temp(next) {
|