@astryx-vue/core 0.39.0 → 0.40.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/dist/AlertDialog/index.js +1 -1
- package/dist/{AlertDialog-DnylRSpj.js → AlertDialog-McG6w72O.js} +4 -4
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Banner/index.js +1 -1
- package/dist/{Banner-CqIYLEcx.js → Banner-CmWBciT7.js} +1 -1
- package/dist/BottomSheet/index.d.ts +1 -1
- package/dist/BottomSheet/index.js +2 -2
- package/dist/BottomSheet-BOEmV4QT.js +527 -0
- package/dist/{BottomSheet-D37eNqz5.js → BottomSheet-BkBRbF1_.js} +1379 -192
- package/dist/Breadcrumbs/index.js +1 -1
- package/dist/{Breadcrumbs-BEzCPnoe.js → Breadcrumbs-D7dac2Vx.js} +1 -1
- package/dist/Button/index.d.ts +1 -1
- package/dist/Button/index.js +1 -1
- package/dist/{Button-DGIfLwqj.js → Button-pAwKXPpg.js} +1 -1
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/ButtonGroup/index.js +1 -1
- package/dist/{ButtonGroup-CaQ7bir4.js → ButtonGroup-CuxHcLGQ.js} +2 -2
- package/dist/Calendar/index.d.ts +1 -1
- package/dist/Carousel/index.d.ts +1 -1
- package/dist/Carousel/index.js +1 -1
- package/dist/{Carousel-DmeW51vC.js → Carousel-CS2e2A7m.js} +1 -1
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-whrqE8Zj.js → Chat-BpZRcgDp.js} +1 -1
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxInput/index.js +1 -1
- package/dist/{CheckboxInput-CHO4Jz0m.js → CheckboxInput-DhacWPUS.js} +2 -2
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxListItem-C4dmrC_w.js → CheckboxListItem-D7PdrL6R.js} +3 -3
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/Code/index.js +2 -2
- package/dist/{Code-D80SHrJx.js → Code-CpOHgCdF.js} +1 -1
- package/dist/{CodeBlock-vhMVY90M.js → CodeBlock-CkGp6dGF.js} +1 -1
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-C-iXk7EB.js → CommandPalette-DiM8MlSa.js} +1 -1
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-BsdtBmd0.js → ComplexSelector-BmXhD8Oe.js} +2 -2
- package/dist/ContextMenu/index.d.ts +1 -1
- package/dist/ContextMenu/index.js +1 -1
- package/dist/{ContextMenu-GZkN9lf1.js → ContextMenu-DcqcObzD.js} +1 -1
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-Cb6eLrbU.js → DateInput-C3KNWKD5.js} +4 -4
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-BUFeQYJ6.js → DateRangeInput-C7qeaG20.js} +3 -3
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-r-MOwLs4.js → DateTimeInput-L0EZbgPe.js} +5 -5
- package/dist/Dialog/index.js +3 -3
- package/dist/{Dialog-BP2KWnEi.js → Dialog-DLg0POKn.js} +1 -1
- package/dist/{Dialog-BUl1lqE6.js → Dialog-iVqfWx9T.js} +1 -1
- package/dist/{DialogHeader-CPhEYbZ1.js → DialogHeader-B0B8oATV.js} +1 -1
- package/dist/Divider/index.d.ts +1 -1
- package/dist/Drawer/index.d.ts +1 -1
- package/dist/Drawer/index.js +1 -1
- package/dist/{Drawer-C0ntt2L9.js → Drawer-C0x5HNmD.js} +2 -2
- package/dist/DropdownMenu/index.js +1 -1
- package/dist/{DropdownMenu-CSWLdtI4.js → DropdownMenu-pqhotFvD.js} +2 -2
- package/dist/Field/index.js +3 -3
- package/dist/{Field-BYAHZ4s7.js → Field-D3W-qMmn.js} +1 -1
- package/dist/{FieldInfoTip-6IHEEEJL.js → FieldInfoTip-K-cUaCBk.js} +1 -1
- package/dist/{FieldLabel-CHaeZROf.js → FieldLabel-CIe1tEyM.js} +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-DD3DvIT0.js → FileInput-Crb5znnx.js} +3 -3
- package/dist/Heading/index.d.ts +1 -1
- package/dist/HoverCard/index.d.ts +1 -1
- package/dist/IconButton/index.js +1 -1
- package/dist/{IconButton-CzU-cz_H.js → IconButton-Cug4YcFk.js} +1 -1
- package/dist/InfoTip/index.d.ts +1 -1
- package/dist/InfoTip/index.js +1 -1
- package/dist/{InfoTip-Ckhg715K.js → InfoTip-Cu4a1mi4.js} +1 -1
- package/dist/{InputClearButton-Btjd5Lnk.js → InputClearButton-CgUhJflI.js} +1 -1
- package/dist/InputGroup/index.js +1 -1
- package/dist/{InputGroup-C388xPHC.js → InputGroup-BRsu7Tbv.js} +1 -1
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-CQhmsbhy.js → Lightbox-_RBPOxDZ.js} +1 -1
- package/dist/Link/index.d.ts +1 -1
- package/dist/List/index.d.ts +1 -1
- package/dist/List/index.js +1 -1
- package/dist/{ListItem-BEc2EF1u.js → ListItem-DZwU5RrZ.js} +1 -1
- package/dist/Markdown/index.d.ts +1 -1
- package/dist/Markdown/index.js +1 -1
- package/dist/{Markdown-BkL2wt7F.js → Markdown-CiLkzTFi.js} +1 -1
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-pvuN9vfu.js → MoreMenu-BWuzaT3K.js} +2 -2
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-sD97taHQ.js → MultiSelector-geUPBvlE.js} +3 -3
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/NumberInput/index.js +1 -1
- package/dist/{NumberInput-B3Y_NOui.js → NumberInput--sai94t9.js} +3 -3
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-BJKFuELz.js → Pagination-C10gbfyv.js} +2 -2
- package/dist/{PickerWheel-J5F_ecWb.js → PickerWheel-CpAyp6NS.js} +4 -3
- package/dist/Popover/index.js +1 -1
- package/dist/{Popover-CVZnqsUy.js → Popover-C6_p8KAA.js} +2 -2
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-BHTHVINR.js → PowerSearch-D47zbO7s.js} +18 -18
- package/dist/Radio/index.d.ts +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/{RadioGroup-CvMj98z_.js → RadioGroup-C1VXRBSf.js} +2 -2
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/RadioList/index.js +1 -1
- package/dist/{RadioListItem-CptY2wdB.js → RadioListItem-DrAwYoOz.js} +1 -1
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/SegmentedControl/index.js +1 -1
- package/dist/{SegmentedControl-DMxIY7uq.js → SegmentedControl-D9atngIc.js} +1 -1
- package/dist/SelectableCard/index.d.ts +1 -1
- package/dist/Selector/index.d.ts +1 -1
- package/dist/Selector/index.js +1 -1
- package/dist/{Selector-DhKtSP71.js → Selector-DFTryuh1.js} +2 -2
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +1 -1
- package/dist/{SideNav-DOXNxEIp.js → SideNav-Bjk5ACqf.js} +1 -1
- package/dist/Slider/index.js +1 -1
- package/dist/{Slider-D5GYcH4S.js → Slider-rOwQQK6G.js} +1 -1
- package/dist/Stack/index.d.ts +1 -1
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/{Switch-DDHf_9iJ.js → Switch-BBfZ6XqA.js} +2 -2
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/{Table-B49mlc0R.js → Table-D0yjxm9X.js} +9 -9
- package/dist/Text/index.d.ts +1 -1
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-BSB5WIpK.js → TextArea-Cr00OL0D.js} +4 -4
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-Ck-6Mtbt.js → TextInput-CVfvRHOa.js} +4 -4
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-Tg50Msul.js → Thumbnail-CJPZ299u.js} +1 -1
- package/dist/{TimeField-CLD_j1tX.js → TimeField-Csp1-lRo.js} +3 -3
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-DuijuQMd.js → TimeInput-B4JLpJ2N.js} +2 -2
- package/dist/Timer/index.d.ts +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +1 -1
- package/dist/{Timestamp-D8fyTuhk.js → Timestamp-BmH-CQ8p.js} +1 -1
- package/dist/Toast/index.js +1 -1
- package/dist/{Toast-51l_F_YA.js → Toast-Cuc1o3ph.js} +3 -5
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/ToggleButton/index.js +1 -1
- package/dist/{ToggleButton-_fEU63Nz.js → ToggleButton-BsAi9ln1.js} +3 -3
- package/dist/Token/index.d.ts +1 -1
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-wWybLovw.js → Tokenizer-CXCnZtY3.js} +257 -175
- package/dist/Toolbar/index.d.ts +1 -1
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/Typeahead/index.js +1 -1
- package/dist/{Typeahead-DtNM4311.js → Typeahead-Csob3tst.js} +2 -2
- package/dist/composables/index.js +2 -2
- package/dist/{composables-D5840uKi.js → composables-DqaKLASV.js} +1 -1
- package/dist/{index-X4S7_dmq.d.ts → index-BA8exXNP.d.ts} +1 -1
- package/dist/{index-BgT6mH3U.d.ts → index-BB9acgK8.d.ts} +1 -1
- package/dist/{index-EyFu5eSZ.d.ts → index-BFPb14Xj.d.ts} +6 -6
- package/dist/{index-CEdoNcHF.d.ts → index-BfOs5BQj.d.ts} +2 -2
- package/dist/{index-DofC9Rll.d.ts → index-BtqvPjAf.d.ts} +1 -1
- package/dist/{index-waTkqxTz.d.ts → index-C89cIh4E.d.ts} +1 -1
- package/dist/{index-rdwI-mcm.d.ts → index-CtYlR9Cu.d.ts} +1 -1
- package/dist/{index--kbwaSXW.d.ts → index-CuW4AQ7M.d.ts} +1 -1
- package/dist/{index-C8wfe0Mr.d.ts → index-D05JGsT3.d.ts} +1 -1
- package/dist/{index-ZXDolNI1.d.ts → index-DN2b-w3H.d.ts} +50 -50
- package/dist/{index-DYabo8TI.d.ts → index-DPhQZXYw.d.ts} +1 -1
- package/dist/{index-J83fLEyo.d.ts → index-DgNCHxvu.d.ts} +2 -2
- package/dist/{index-DVX2jlTQ.d.ts → index-Ds4dOCSy.d.ts} +7 -4
- package/dist/{index-DXGoFpRN.d.ts → index-LvZ3vP29.d.ts} +1 -1
- package/dist/{index-Bk2SsmEu.d.ts → index-YP5WRwXH.d.ts} +3 -3
- package/dist/index.d.ts +16 -16
- package/dist/index.js +59 -59
- package/dist/{lazyBottomSheet-DUPKYGf1.js → lazyBottomSheet-0H4ih8Oh.js} +1 -1
- package/dist/{modalOutlet-BwR9AAlm.js → modalOutlet-C2nqIYUt.js} +7 -6
- package/dist/{useActionGroupTracking-DB5xIxPW.js → useActionGroupTracking-SVkaaOzz.js} +1 -1
- package/dist/{useInputStatusIcon-DJfhmCiH.js → useInputStatusIcon-CRG-be-K.js} +1 -1
- package/dist/{useTouchHitArea-DvKV21NY.js → useTouchHitArea-BdpeksgK.js} +225 -43
- package/package.json +1 -1
- package/styles/bottom-sheet.css +61 -19
- package/styles/date-input.css +76 -0
- package/styles/tokenizer.css +88 -0
- package/dist/BottomSheet-6W3izQzr.js +0 -203
- package/dist/{index-5FGt4HsB.d.ts → index-BqhgeAT4.d.ts} +1 -1
|
@@ -1,35 +1,37 @@
|
|
|
1
|
-
import { t as _sfc_main$
|
|
1
|
+
import { t as _sfc_main$5 } from "./Icon-BUSj1-Th.js";
|
|
2
|
+
import { n as useInputGroupContext, r as useInputGroupDisabled } from "./context-Bg7eSJ47.js";
|
|
2
3
|
import { i as useSize } from "./SizeContext-BbaF-SEx.js";
|
|
3
|
-
import { t as _sfc_main$
|
|
4
|
+
import { t as _sfc_main$6 } from "./Button-pAwKXPpg.js";
|
|
4
5
|
import { t as isImeKeyEvent } from "./ime-VY8-80S8.js";
|
|
5
6
|
import { a as trackInteractionModality, t as getInteractionModality } from "./interactionModality-4Km2ibsq.js";
|
|
6
|
-
import { t as _sfc_main$
|
|
7
|
+
import { t as _sfc_main$7 } from "./ButtonTooltip-ZpQP-aQg.js";
|
|
7
8
|
import { t as useButtonTooltip } from "./useButtonTooltip-DjCaZMp_.js";
|
|
8
9
|
import { n as isDevBuild, t as devPropError } from "./devBuild-G249YcdZ.js";
|
|
9
10
|
import { t as devWarn } from "./useDevWarning-B2fsk2B-.js";
|
|
10
11
|
import { o as useComponentMessages } from "./context-B8IEFCDR.js";
|
|
11
12
|
import { t as useAnnounce } from "./announce-GU01Oix2.js";
|
|
12
|
-
import { t as useInputStatusIcon } from "./useInputStatusIcon-
|
|
13
|
+
import { t as useInputStatusIcon } from "./useInputStatusIcon-CRG-be-K.js";
|
|
13
14
|
import { t as useOverflow } from "./useOverflow-GU0pxGaU.js";
|
|
14
15
|
import { t as useResolvedLabelHidden } from "./useResolvedLabelHidden-B2rlWiaI.js";
|
|
15
|
-
import { t as
|
|
16
|
-
import { t as _sfc_main$8 } from "./
|
|
16
|
+
import { t as useScrollableArea } from "./useScrollableArea-BaHkGWbX.js";
|
|
17
|
+
import { t as _sfc_main$8 } from "./Dialog-iVqfWx9T.js";
|
|
18
|
+
import { t as _sfc_main$9 } from "./Heading-SdObK_xM.js";
|
|
17
19
|
import { t as useScrollbars } from "./useScrollbars-Ch0xqJWO.js";
|
|
18
|
-
import { t as _sfc_main$
|
|
19
|
-
import { t as _sfc_main$
|
|
20
|
-
import { t as _sfc_main$
|
|
20
|
+
import { t as _sfc_main$10 } from "./Stack-DPB-Ztf7.js";
|
|
21
|
+
import { t as _sfc_main$11 } from "./Text-CILdp7jE.js";
|
|
22
|
+
import { t as _sfc_main$12 } from "./CheckboxIndicator-fH4d-JE1.js";
|
|
21
23
|
import { t as useHeldPresentation } from "./useHeldPresentation-0Z0Untra.js";
|
|
22
|
-
import { n as preloadBottomSheet, t as LazyBottomSheet } from "./lazyBottomSheet-
|
|
24
|
+
import { n as preloadBottomSheet, t as LazyBottomSheet } from "./lazyBottomSheet-0H4ih8Oh.js";
|
|
23
25
|
import { t as useBusyAnnouncement } from "./busyAnnouncement-CExubuYm.js";
|
|
24
|
-
import { n as spinnerOwnerKey, t as _sfc_main$
|
|
25
|
-
import { t as _sfc_main$
|
|
26
|
+
import { n as spinnerOwnerKey, t as _sfc_main$13 } from "./Spinner-lLOYfbOY.js";
|
|
27
|
+
import { t as _sfc_main$14 } from "./Field-D3W-qMmn.js";
|
|
26
28
|
import { t as useFieldPartStyling } from "./fieldParts-CuE5V12i.js";
|
|
27
29
|
import { n as alertDialogMessages, t as tokenizerMessages } from "./tokenizer-C1y-55Ft.js";
|
|
28
|
-
import { t as _sfc_main$
|
|
29
|
-
import { t as _sfc_main$
|
|
30
|
+
import { t as _sfc_main$15 } from "./EmptyState-BUmLBchw.js";
|
|
31
|
+
import { t as _sfc_main$16 } from "./Token-Di7w9Cvr.js";
|
|
30
32
|
import { n as scrollOptionIntoView, r as useAnchoredListbox } from "./stillPointerGate-DXFzBeMy.js";
|
|
31
|
-
import { i as _sfc_main$
|
|
32
|
-
import { t as _sfc_main$
|
|
33
|
+
import { i as _sfc_main$17, n as useTypeaheadAnnouncement, o as useTypeaheadMenu, r as useLatchedOptionGrid, t as useTypeaheadMenuConfig } from "./useTypeaheadMenuConfig-0glQWHQd.js";
|
|
34
|
+
import { t as _sfc_main$18 } from "./TextInput-CVfvRHOa.js";
|
|
33
35
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, guardReactiveProps, isRef, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, onMounted, openBlock, provide, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, unref, useAttrs, useId, useModel, useSlots, useTemplateRef, watch, withCtx } from "vue";
|
|
34
36
|
import "../styles/layer.css";
|
|
35
37
|
import "../styles/alert-dialog.css";
|
|
@@ -41,7 +43,7 @@ import "../styles/tokenizer.css";
|
|
|
41
43
|
//#region src/layer/SheetConfirmation.vue
|
|
42
44
|
const _hoisted_1$3 = { class: "astryx-alert-dialog__content" };
|
|
43
45
|
const _hoisted_2$3 = { class: "astryx-alert-dialog__footer" };
|
|
44
|
-
const _sfc_main$
|
|
46
|
+
const _sfc_main$4 = /*@__PURE__*/ defineComponent({
|
|
45
47
|
name: "AstryxSheetConfirmation",
|
|
46
48
|
__name: "SheetConfirmation",
|
|
47
49
|
props: {
|
|
@@ -64,7 +66,7 @@ const _sfc_main$3 = /*@__PURE__*/ defineComponent({
|
|
|
64
66
|
const titleId = `astryx-sheet-confirmation-${useId()}`;
|
|
65
67
|
const descriptionId = `${titleId}-description`;
|
|
66
68
|
return (_ctx, _cache) => {
|
|
67
|
-
return openBlock(), createBlock(_sfc_main$
|
|
69
|
+
return openBlock(), createBlock(_sfc_main$8, {
|
|
68
70
|
class: "astryx-alert-dialog astryx-sheet-confirmation",
|
|
69
71
|
"is-open": __props.isOpen,
|
|
70
72
|
purpose: "info",
|
|
@@ -74,14 +76,14 @@ const _sfc_main$3 = /*@__PURE__*/ defineComponent({
|
|
|
74
76
|
width: 400,
|
|
75
77
|
onOpenChange: _cache[2] || (_cache[2] = ($event) => emit("openChange", $event))
|
|
76
78
|
}, {
|
|
77
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_1$3, [createVNode(_sfc_main$
|
|
79
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_1$3, [createVNode(_sfc_main$9, {
|
|
78
80
|
id: titleId,
|
|
79
81
|
class: "astryx-alert-dialog__title astryx-alert-dialog-title",
|
|
80
82
|
level: 2
|
|
81
83
|
}, {
|
|
82
84
|
default: withCtx(() => [createTextVNode(toDisplayString(__props.title), 1)]),
|
|
83
85
|
_: 1
|
|
84
|
-
}), createVNode(_sfc_main$
|
|
86
|
+
}), createVNode(_sfc_main$11, {
|
|
85
87
|
id: descriptionId,
|
|
86
88
|
as: "div",
|
|
87
89
|
class: "astryx-alert-dialog__description astryx-alert-dialog-description",
|
|
@@ -90,19 +92,19 @@ const _sfc_main$3 = /*@__PURE__*/ defineComponent({
|
|
|
90
92
|
}, {
|
|
91
93
|
default: withCtx(() => [createTextVNode(toDisplayString(__props.description), 1)]),
|
|
92
94
|
_: 1
|
|
93
|
-
})]), createElementVNode("div", _hoisted_2$3, [createVNode(_sfc_main$
|
|
95
|
+
})]), createElementVNode("div", _hoisted_2$3, [createVNode(_sfc_main$10, {
|
|
94
96
|
class: "astryx-alert-dialog__actions",
|
|
95
97
|
direction: "vertical",
|
|
96
98
|
gap: 4,
|
|
97
99
|
"h-align": "stretch"
|
|
98
100
|
}, {
|
|
99
|
-
default: withCtx(() => [createVNode(_sfc_main$
|
|
101
|
+
default: withCtx(() => [createVNode(_sfc_main$6, {
|
|
100
102
|
class: "astryx-sheet-confirmation__action",
|
|
101
103
|
label: __props.actionLabel,
|
|
102
104
|
variant: "destructive",
|
|
103
105
|
size: "lg",
|
|
104
106
|
onClick: _cache[0] || (_cache[0] = ($event) => emit("action"))
|
|
105
|
-
}, null, 8, ["label"]), createVNode(_sfc_main$
|
|
107
|
+
}, null, 8, ["label"]), createVNode(_sfc_main$6, {
|
|
106
108
|
class: "astryx-sheet-confirmation__action",
|
|
107
109
|
label: __props.cancelLabel,
|
|
108
110
|
variant: "secondary",
|
|
@@ -460,7 +462,7 @@ const _hoisted_9 = [
|
|
|
460
462
|
];
|
|
461
463
|
const _hoisted_10 = { class: "astryx-tokenizer-sheet__footer" };
|
|
462
464
|
const CREATABLE_ID_PREFIX = "__xds_create__";
|
|
463
|
-
const _sfc_main$
|
|
465
|
+
const _sfc_main$3 = /*@__PURE__*/ defineComponent({
|
|
464
466
|
name: "AstryxTokenizerBottomSheet",
|
|
465
467
|
__name: "TokenizerBottomSheet",
|
|
466
468
|
props: {
|
|
@@ -657,7 +659,7 @@ const _sfc_main$2 = /*@__PURE__*/ defineComponent({
|
|
|
657
659
|
onMotionComplete: _cache[9] || (_cache[9] = ($event) => emit("motionComplete", $event))
|
|
658
660
|
}, {
|
|
659
661
|
default: withCtx(() => [createElementVNode("div", _hoisted_1$2, [
|
|
660
|
-
createElementVNode("div", _hoisted_2$2, [createVNode(_sfc_main$
|
|
662
|
+
createElementVNode("div", _hoisted_2$2, [createVNode(_sfc_main$18, {
|
|
661
663
|
ref_key: "searchInput",
|
|
662
664
|
ref: searchInput,
|
|
663
665
|
"model-value": unref(query),
|
|
@@ -690,29 +692,29 @@ const _sfc_main$2 = /*@__PURE__*/ defineComponent({
|
|
|
690
692
|
onFocusout: onListFocusOut,
|
|
691
693
|
onScroll: _cache[5] || (_cache[5] = (...args) => unref(search).onScroll && unref(search).onScroll(...args))
|
|
692
694
|
}, [
|
|
693
|
-
createItem.value ? (openBlock(), createElementBlock("div", _hoisted_4$2, [createVNode(_sfc_main$
|
|
695
|
+
createItem.value ? (openBlock(), createElementBlock("div", _hoisted_4$2, [createVNode(_sfc_main$11, {
|
|
694
696
|
class: "astryx-tokenizer-sheet__create-label",
|
|
695
697
|
type: "body"
|
|
696
698
|
}, {
|
|
697
699
|
default: withCtx(() => [createTextVNode(toDisplayString(createItem.value.label), 1)]),
|
|
698
700
|
_: 1
|
|
699
|
-
}), createVNode(_sfc_main$
|
|
701
|
+
}), createVNode(_sfc_main$6, {
|
|
700
702
|
label: unref(messages).tokenizer.add,
|
|
701
703
|
"aria-label": unref(messages).tokenizer.addValue(trimmedQuery.value),
|
|
702
704
|
variant: "secondary",
|
|
703
705
|
size: "lg",
|
|
704
706
|
onClick: create
|
|
705
707
|
}, null, 8, ["label", "aria-label"])])) : createCommentVNode("v-if", true),
|
|
706
|
-
unref(isPending) ? (openBlock(), createElementBlock("div", _hoisted_5$2, [createVNode(_sfc_main$
|
|
708
|
+
unref(isPending) ? (openBlock(), createElementBlock("div", _hoisted_5$2, [createVNode(_sfc_main$13, {
|
|
707
709
|
size: "md",
|
|
708
710
|
label: unref(messages).tokenizer.loading
|
|
709
711
|
}, null, 8, ["label"])])) : createCommentVNode("v-if", true),
|
|
710
|
-
isSettledEmpty.value ? (openBlock(), createElementBlock("div", _hoisted_6$2, [renderSlot(_ctx.$slots, "empty", {}, () => [createVNode(_sfc_main$
|
|
712
|
+
isSettledEmpty.value ? (openBlock(), createElementBlock("div", _hoisted_6$2, [renderSlot(_ctx.$slots, "empty", {}, () => [createVNode(_sfc_main$15, {
|
|
711
713
|
title: __props.emptySearchText ?? unref(messages).tokenizer.empty,
|
|
712
714
|
description: unref(messages).tokenizer.noResultsDescription,
|
|
713
715
|
"is-compact": ""
|
|
714
716
|
}, {
|
|
715
|
-
icon: withCtx(() => [createVNode(_sfc_main$
|
|
717
|
+
icon: withCtx(() => [createVNode(_sfc_main$5, {
|
|
716
718
|
icon: "search",
|
|
717
719
|
size: "lg",
|
|
718
720
|
color: "secondary"
|
|
@@ -734,20 +736,20 @@ const _sfc_main$2 = /*@__PURE__*/ defineComponent({
|
|
|
734
736
|
"aria-disabled": !selectedIds.value.has(item.id) && isAtMax.value || void 0,
|
|
735
737
|
onFocus: ($event) => onRowFocus(index),
|
|
736
738
|
onClick: ($event) => toggle(item)
|
|
737
|
-
}, [createVNode(_sfc_main$
|
|
739
|
+
}, [createVNode(_sfc_main$11, {
|
|
738
740
|
class: "astryx-tokenizer-sheet__row-label",
|
|
739
741
|
type: "body"
|
|
740
742
|
}, {
|
|
741
743
|
default: withCtx(() => [createTextVNode(toDisplayString(item.label), 1)]),
|
|
742
744
|
_: 2
|
|
743
|
-
}, 1024), createVNode(_sfc_main$
|
|
745
|
+
}, 1024), createVNode(_sfc_main$12, {
|
|
744
746
|
state: selectedIds.value.has(item.id) ? "checked" : "unchecked",
|
|
745
747
|
size: "md",
|
|
746
748
|
"is-disabled": !selectedIds.value.has(item.id) && isAtMax.value
|
|
747
749
|
}, null, 8, ["state", "is-disabled"])], 40, _hoisted_9)], 8, _hoisted_8);
|
|
748
750
|
}), 128))])) : createCommentVNode("v-if", true)
|
|
749
751
|
], 40, _hoisted_3$2),
|
|
750
|
-
createElementVNode("div", _hoisted_10, [createVNode(_sfc_main$
|
|
752
|
+
createElementVNode("div", _hoisted_10, [createVNode(_sfc_main$6, {
|
|
751
753
|
ref_key: "clearAllButton",
|
|
752
754
|
ref: clearAllButton,
|
|
753
755
|
class: "astryx-tokenizer-sheet__footer-action",
|
|
@@ -761,7 +763,7 @@ const _sfc_main$2 = /*@__PURE__*/ defineComponent({
|
|
|
761
763
|
"label",
|
|
762
764
|
"is-disabled",
|
|
763
765
|
"tooltip"
|
|
764
|
-
]), createVNode(_sfc_main$
|
|
766
|
+
]), createVNode(_sfc_main$6, {
|
|
765
767
|
class: "astryx-tokenizer-sheet__footer-action",
|
|
766
768
|
label: unref(messages).tokenizer.save,
|
|
767
769
|
variant: "primary",
|
|
@@ -774,7 +776,7 @@ const _sfc_main$2 = /*@__PURE__*/ defineComponent({
|
|
|
774
776
|
"is-disabled",
|
|
775
777
|
"tooltip"
|
|
776
778
|
])]),
|
|
777
|
-
createVNode(_sfc_main$
|
|
779
|
+
createVNode(_sfc_main$4, {
|
|
778
780
|
"is-open": isClearConfirmationOpen.value,
|
|
779
781
|
title: unref(messages).tokenizer.clearAllTitle,
|
|
780
782
|
description: unref(messages).tokenizer.clearAllDescription(__props.label),
|
|
@@ -789,7 +791,7 @@ const _sfc_main$2 = /*@__PURE__*/ defineComponent({
|
|
|
789
791
|
"cancel-label",
|
|
790
792
|
"action-label"
|
|
791
793
|
]),
|
|
792
|
-
createVNode(_sfc_main$
|
|
794
|
+
createVNode(_sfc_main$4, {
|
|
793
795
|
"is-open": isDiscardConfirmationOpen.value,
|
|
794
796
|
title: unref(messages).tokenizer.discardChangesTitle,
|
|
795
797
|
description: unref(messages).tokenizer.discardChangesDescription(__props.label),
|
|
@@ -840,7 +842,7 @@ const _hoisted_6$1 = [
|
|
|
840
842
|
"disabled"
|
|
841
843
|
];
|
|
842
844
|
const _hoisted_7$1 = ["id"];
|
|
843
|
-
const _sfc_main$
|
|
845
|
+
const _sfc_main$2 = /*@__PURE__*/ defineComponent({
|
|
844
846
|
name: "AstryxTokenizerSheetField",
|
|
845
847
|
inheritAttrs: false,
|
|
846
848
|
__name: "TokenizerSheetField",
|
|
@@ -1000,7 +1002,7 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
1000
1002
|
}, [renderSlot(_ctx.$slots, "token", {
|
|
1001
1003
|
item,
|
|
1002
1004
|
remove: () => emit("remove", item)
|
|
1003
|
-
}, () => [createVNode(_sfc_main$
|
|
1005
|
+
}, () => [createVNode(_sfc_main$16, {
|
|
1004
1006
|
label: item.label,
|
|
1005
1007
|
size: __props.size,
|
|
1006
1008
|
disabled: __props.isDisabled
|
|
@@ -1042,7 +1044,7 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
1042
1044
|
hidden: ""
|
|
1043
1045
|
}, toDisplayString(item.label), 9, _hoisted_7$1);
|
|
1044
1046
|
}), 128)) : createCommentVNode("v-if", true),
|
|
1045
|
-
isSheetMounted.value ? (openBlock(), createBlock(_sfc_main$
|
|
1047
|
+
isSheetMounted.value ? (openBlock(), createBlock(_sfc_main$3, {
|
|
1046
1048
|
key: 2,
|
|
1047
1049
|
"is-open": isOpen.value,
|
|
1048
1050
|
label: __props.label,
|
|
@@ -1083,6 +1085,43 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
1083
1085
|
}
|
|
1084
1086
|
});
|
|
1085
1087
|
//#endregion
|
|
1088
|
+
//#region src/Tokenizer/TokenizerTrack.vue
|
|
1089
|
+
const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
1090
|
+
name: "AstryxTokenizerTrack",
|
|
1091
|
+
__name: "TokenizerTrack",
|
|
1092
|
+
props: { isScrollable: { type: Boolean } },
|
|
1093
|
+
setup(__props) {
|
|
1094
|
+
const scrollArea = useScrollableArea({
|
|
1095
|
+
axis: "inline",
|
|
1096
|
+
keyboardAccess: { owner: "content" }
|
|
1097
|
+
});
|
|
1098
|
+
function bindContent(element) {
|
|
1099
|
+
scrollArea.content.value = element instanceof HTMLElement ? element : null;
|
|
1100
|
+
}
|
|
1101
|
+
const fadeAttrs = computed(() => {
|
|
1102
|
+
const { inline } = scrollArea.state.value;
|
|
1103
|
+
return {
|
|
1104
|
+
"data-scrollable-inline": inline.isScrollable ? "true" : void 0,
|
|
1105
|
+
"data-scroll-inline-start": inline.atStart ? "true" : void 0,
|
|
1106
|
+
"data-scroll-inline-end": inline.atEnd ? "true" : void 0
|
|
1107
|
+
};
|
|
1108
|
+
});
|
|
1109
|
+
return (_ctx, _cache) => {
|
|
1110
|
+
return __props.isScrollable ? (openBlock(), createElementBlock("span", mergeProps({
|
|
1111
|
+
key: 0,
|
|
1112
|
+
ref: unref(scrollArea).viewport,
|
|
1113
|
+
class: "astryx-tokenizer-track"
|
|
1114
|
+
}, {
|
|
1115
|
+
...unref(scrollArea).viewportAttrs.value,
|
|
1116
|
+
...fadeAttrs.value
|
|
1117
|
+
}, { style: unref(scrollArea).viewportStyle.value }), [createElementVNode("span", {
|
|
1118
|
+
ref: bindContent,
|
|
1119
|
+
class: "astryx-tokenizer-track-content"
|
|
1120
|
+
}, [renderSlot(_ctx.$slots, "default")], 512)], 16)) : renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 1);
|
|
1121
|
+
};
|
|
1122
|
+
}
|
|
1123
|
+
});
|
|
1124
|
+
//#endregion
|
|
1086
1125
|
//#region src/Tokenizer/useTokenizerDisabled.ts
|
|
1087
1126
|
/**
|
|
1088
1127
|
* 禁用的 Tokenizer 仍是 Tab 停点:输入框用 aria-disabled 加只读,不用原生 disabled,
|
|
@@ -1090,17 +1129,17 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
1090
1129
|
* 例外是 `overflow="unfocused-layer"` 且没有说明:输入框在失焦时才展开的浮层里,
|
|
1091
1130
|
* 禁用的字段打不开那层,此时仍用原生 disabled。
|
|
1092
1131
|
*/
|
|
1093
|
-
function useTokenizerDisabled(props) {
|
|
1132
|
+
function useTokenizerDisabled(props, isDisabled) {
|
|
1094
1133
|
/** 新名 disabledMessage 优先,旧名 disabledReason 继续可用。 */
|
|
1095
1134
|
const disabledMessage = computed(() => {
|
|
1096
1135
|
const message = props.disabledMessage?.trim() ? props.disabledMessage : props.disabledReason;
|
|
1097
1136
|
return message?.trim() ? message : void 0;
|
|
1098
1137
|
});
|
|
1099
|
-
const showsDisabledMessage = computed(() =>
|
|
1138
|
+
const showsDisabledMessage = computed(() => isDisabled.value && Boolean(disabledMessage.value));
|
|
1100
1139
|
return {
|
|
1101
1140
|
disabledMessage,
|
|
1102
1141
|
showsDisabledMessage,
|
|
1103
|
-
focusableDisabled: computed(() =>
|
|
1142
|
+
focusableDisabled: computed(() => isDisabled.value && (showsDisabledMessage.value || props.overflow !== "unfocused-layer")),
|
|
1104
1143
|
disabledTooltip: useButtonTooltip(showsDisabledMessage)
|
|
1105
1144
|
};
|
|
1106
1145
|
}
|
|
@@ -1108,18 +1147,24 @@ function useTokenizerDisabled(props) {
|
|
|
1108
1147
|
//#region src/Tokenizer/useTokenizerFieldAria.ts
|
|
1109
1148
|
/** 输入框的名字、说明和状态图标。 */
|
|
1110
1149
|
function useTokenizerFieldAria(options) {
|
|
1111
|
-
const { props, attrs, inputId, fieldLabelId, disabledId, hasDisabledDescription } = options;
|
|
1150
|
+
const { props, attrs, inputId, fieldLabelId, disabledId, hasDisabledDescription, group = null } = options;
|
|
1112
1151
|
const fieldStatus = computed(() => {
|
|
1113
|
-
if (!props.statusMessage || props.status === "default") return void 0;
|
|
1152
|
+
if (group != null || !props.statusMessage || props.status === "default") return void 0;
|
|
1114
1153
|
return {
|
|
1115
1154
|
type: props.status,
|
|
1116
1155
|
message: props.statusMessage
|
|
1117
1156
|
};
|
|
1118
1157
|
});
|
|
1119
|
-
/** 调用方的 aria-labelledby
|
|
1158
|
+
/** 调用方的 aria-labelledby 接在字段自己的标签后面,不取代它;在组里,组标签排在最前。 */
|
|
1120
1159
|
const labelledBy = computed(() => {
|
|
1121
|
-
const
|
|
1122
|
-
|
|
1160
|
+
const given = attrs["aria-labelledby"];
|
|
1161
|
+
const external = typeof given === "string" && given !== "" ? given : void 0;
|
|
1162
|
+
if (group == null) return external ? `${fieldLabelId} ${external}` : void 0;
|
|
1163
|
+
return [
|
|
1164
|
+
group.labelId.value,
|
|
1165
|
+
fieldLabelId,
|
|
1166
|
+
external
|
|
1167
|
+
].filter(Boolean).join(" ");
|
|
1123
1168
|
});
|
|
1124
1169
|
const { statusIcon, statusIconProps } = useInputStatusIcon({
|
|
1125
1170
|
status: () => fieldStatus.value,
|
|
@@ -1133,14 +1178,41 @@ function useTokenizerFieldAria(options) {
|
|
|
1133
1178
|
describedBy: computed(() => {
|
|
1134
1179
|
return [
|
|
1135
1180
|
typeof attrs["aria-describedby"] === "string" ? attrs["aria-describedby"] : void 0,
|
|
1136
|
-
props.description ? `${inputId}-description` : void 0,
|
|
1137
|
-
props.statusMessage ? `${inputId}-status` : void 0,
|
|
1181
|
+
...group != null ? [group.describedBy.value] : [props.description ? `${inputId}-description` : void 0, props.statusMessage ? `${inputId}-status` : void 0],
|
|
1138
1182
|
hasDisabledDescription.value ? disabledId : void 0
|
|
1139
1183
|
].filter(Boolean).join(" ") || void 0;
|
|
1140
1184
|
})
|
|
1141
1185
|
};
|
|
1142
1186
|
}
|
|
1143
1187
|
//#endregion
|
|
1188
|
+
//#region src/Tokenizer/useTokenizerFocus.ts
|
|
1189
|
+
/** 字段里焦点的进出:从外面进来才发 `focus`,整个字段(含结果列表)都离开才发 `blur`。 */
|
|
1190
|
+
function useTokenizerFocus(options) {
|
|
1191
|
+
function isInside(node) {
|
|
1192
|
+
if (!(node instanceof Node)) return false;
|
|
1193
|
+
return Boolean(options.anchor.value?.contains(node) || options.listbox()?.contains(node));
|
|
1194
|
+
}
|
|
1195
|
+
function onFocusIn(event) {
|
|
1196
|
+
const comingFromOutside = !isInside(event.relatedTarget);
|
|
1197
|
+
options.disabledTooltip.onTooltipPointerEnter();
|
|
1198
|
+
if (!options.focused.value && options.isFloatingLayer()) options.placeholderHeight.value = options.anchor.value?.offsetHeight ?? 0;
|
|
1199
|
+
options.focused.value = true;
|
|
1200
|
+
if (event.target === options.input.value && options.showsEntriesOnFocus() && !options.isDisabled() && !options.atMax()) options.menu.open();
|
|
1201
|
+
if (comingFromOutside && !options.isHandingOffFocus()) options.onFocus(event);
|
|
1202
|
+
}
|
|
1203
|
+
function onFocusOut(event) {
|
|
1204
|
+
options.disabledTooltip.onBlur();
|
|
1205
|
+
if (isInside(event.relatedTarget)) return;
|
|
1206
|
+
options.focused.value = false;
|
|
1207
|
+
options.menu.close();
|
|
1208
|
+
options.onBlur(event);
|
|
1209
|
+
}
|
|
1210
|
+
return {
|
|
1211
|
+
onFocusIn,
|
|
1212
|
+
onFocusOut
|
|
1213
|
+
};
|
|
1214
|
+
}
|
|
1215
|
+
//#endregion
|
|
1144
1216
|
//#region src/Tokenizer/useTokenizerKeys.ts
|
|
1145
1217
|
/** 输入框和标签上的按键:退格删最后一个、方向键在标签和输入框之间移动焦点。 */
|
|
1146
1218
|
function useTokenizerKeys(options) {
|
|
@@ -1195,7 +1267,7 @@ function useTokenizerMenu(options) {
|
|
|
1195
1267
|
showOnFocus: () => showsEntriesOnFocus.value && !atMax.value,
|
|
1196
1268
|
minQueryLength: () => props.minQueryLength ?? 1,
|
|
1197
1269
|
maxItems: () => props.maxMenuItems ?? 10,
|
|
1198
|
-
disabled: () =>
|
|
1270
|
+
disabled: () => options.isDisabled() || atMax.value || props.menu?.role === "dialog",
|
|
1199
1271
|
excludeIds: () => values.value.map((item) => item.id),
|
|
1200
1272
|
blockedLabels: () => values.value.map((item) => item.label),
|
|
1201
1273
|
creatable: () => options.isCreatable.value && !atMax.value,
|
|
@@ -1221,7 +1293,7 @@ function useTokenizerMenu(options) {
|
|
|
1221
1293
|
open: () => menu.open(),
|
|
1222
1294
|
close: () => menu.close()
|
|
1223
1295
|
},
|
|
1224
|
-
isDisabled: () =>
|
|
1296
|
+
isDisabled: () => options.isDisabled(),
|
|
1225
1297
|
canOpenList: () => showsEntriesOnFocus.value || menu.query.value !== ""
|
|
1226
1298
|
});
|
|
1227
1299
|
const anchored = useAnchoredListbox({
|
|
@@ -1533,7 +1605,10 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1533
1605
|
const props = __props;
|
|
1534
1606
|
const emit = __emit;
|
|
1535
1607
|
if (isDevBuild() && props.modelValue != null && !Array.isArray(props.modelValue)) throw devPropError("Tokenizer", "modelValue", "must be an array of the selected items, for example v-model=\"selected\" with const selected = ref([]).");
|
|
1536
|
-
const
|
|
1608
|
+
const inputGroup = useInputGroupContext();
|
|
1609
|
+
const inGroup = inputGroup != null;
|
|
1610
|
+
const size = useSize(() => inGroup ? void 0 : props.size, "md");
|
|
1611
|
+
const isDisabled = useInputGroupDisabled(() => props.disabled);
|
|
1537
1612
|
const attrs = useAttrs();
|
|
1538
1613
|
const parts = useFieldPartStyling({
|
|
1539
1614
|
component: "Tokenizer",
|
|
@@ -1583,7 +1658,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1583
1658
|
});
|
|
1584
1659
|
const placeholder = computed(() => props.placeholder ?? messages.value.tokenizer.placeholder);
|
|
1585
1660
|
const emptyText = computed(() => props.emptySearchText ?? props.emptyText ?? messages.value.tokenizer.empty);
|
|
1586
|
-
const { disabledMessage, showsDisabledMessage, focusableDisabled, disabledTooltip } = useTokenizerDisabled(props);
|
|
1661
|
+
const { disabledMessage, showsDisabledMessage, focusableDisabled, disabledTooltip } = useTokenizerDisabled(props, isDisabled);
|
|
1587
1662
|
/** 两个名字任一为真就画清除按钮。 */
|
|
1588
1663
|
const showsClear = computed(() => props.hasClear || props.clearable);
|
|
1589
1664
|
/** 两个名字任一为真就在聚焦时先展开。 */
|
|
@@ -1591,7 +1666,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1591
1666
|
/** 两个名字任一为真就能从输入的文字新建标签。 */
|
|
1592
1667
|
const isCreatable = computed(() => props.hasCreate || props.creatable);
|
|
1593
1668
|
/** 禁用的字段不向表单交值:不渲染隐藏输入,而不是渲染一个原生禁用的。 */
|
|
1594
|
-
const hiddenCarrierItems = computed(() =>
|
|
1669
|
+
const hiddenCarrierItems = computed(() => isDisabled.value ? [] : values.value);
|
|
1595
1670
|
const atMax = computed(() => props.maxEntries != null && values.value.length >= props.maxEntries);
|
|
1596
1671
|
const collapsed = computed(() => props.overflow !== "none" && !focused.value);
|
|
1597
1672
|
const floating = computed(() => props.overflow === "unfocused-layer" && focused.value);
|
|
@@ -1601,13 +1676,15 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1601
1676
|
inputId,
|
|
1602
1677
|
fieldLabelId,
|
|
1603
1678
|
disabledId,
|
|
1604
|
-
hasDisabledDescription: computed(() => focusableDisabled.value && Boolean(disabledMessage.value))
|
|
1679
|
+
hasDisabledDescription: computed(() => focusableDisabled.value && Boolean(disabledMessage.value)),
|
|
1680
|
+
group: inputGroup
|
|
1605
1681
|
});
|
|
1606
1682
|
function inputAttrs() {
|
|
1607
1683
|
return pickInputAttrs(attrs);
|
|
1608
1684
|
}
|
|
1609
1685
|
const { menu, menuConfig, anchored, optionGrid, listboxRef, highlight, selectById } = useTokenizerMenu({
|
|
1610
1686
|
props,
|
|
1687
|
+
isDisabled: () => isDisabled.value,
|
|
1611
1688
|
values,
|
|
1612
1689
|
atMax,
|
|
1613
1690
|
showsEntriesOnFocus,
|
|
@@ -1642,7 +1719,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1642
1719
|
watch(collapsed, () => void nextTick(() => overflow.remeasure()));
|
|
1643
1720
|
const selection = useTokenizerSelection({
|
|
1644
1721
|
values,
|
|
1645
|
-
isDisabled: () =>
|
|
1722
|
+
isDisabled: () => isDisabled.value,
|
|
1646
1723
|
atMax,
|
|
1647
1724
|
showsEntriesOnFocus,
|
|
1648
1725
|
menu,
|
|
@@ -1668,32 +1745,28 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1668
1745
|
nextTick(() => tokenEls.get(index)?.focus());
|
|
1669
1746
|
}
|
|
1670
1747
|
function onInput(event) {
|
|
1671
|
-
if (
|
|
1748
|
+
if (isDisabled.value || atMax.value) return;
|
|
1672
1749
|
menu.setQuery(event.target.value);
|
|
1673
1750
|
}
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
emit("blur", event)
|
|
1689
|
-
}
|
|
1690
|
-
function isInsideTokenizer(node) {
|
|
1691
|
-
if (!(node instanceof Node)) return false;
|
|
1692
|
-
return Boolean(anchorRef.value?.contains(node) || listboxRef.value?.contains(node));
|
|
1693
|
-
}
|
|
1751
|
+
const { onFocusIn, onFocusOut } = useTokenizerFocus({
|
|
1752
|
+
anchor: anchorRef,
|
|
1753
|
+
listbox: () => listboxRef.value,
|
|
1754
|
+
input: inputRef,
|
|
1755
|
+
focused,
|
|
1756
|
+
placeholderHeight,
|
|
1757
|
+
menu,
|
|
1758
|
+
isDisabled: () => isDisabled.value,
|
|
1759
|
+
atMax: () => atMax.value,
|
|
1760
|
+
showsEntriesOnFocus: () => showsEntriesOnFocus.value,
|
|
1761
|
+
isFloatingLayer: () => props.overflow === "unfocused-layer",
|
|
1762
|
+
disabledTooltip,
|
|
1763
|
+
isHandingOffFocus,
|
|
1764
|
+
onFocus: (event) => emit("focus", event),
|
|
1765
|
+
onBlur: (event) => emit("blur", event)
|
|
1766
|
+
});
|
|
1694
1767
|
const { onInputKeyDown: onListKeyDown, onTokenKeyDown } = useTokenizerKeys({
|
|
1695
1768
|
values,
|
|
1696
|
-
disabled: () =>
|
|
1769
|
+
disabled: () => isDisabled.value,
|
|
1697
1770
|
menu,
|
|
1698
1771
|
optionGrid,
|
|
1699
1772
|
inputRef,
|
|
@@ -1704,7 +1777,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1704
1777
|
if (!menuConfig.closeOnEscape(event)) onListKeyDown(event);
|
|
1705
1778
|
}
|
|
1706
1779
|
function onFieldClick(event) {
|
|
1707
|
-
if (
|
|
1780
|
+
if (isDisabled.value) return;
|
|
1708
1781
|
const target = event.target;
|
|
1709
1782
|
if (target instanceof Element && target.closest("button, a")) return;
|
|
1710
1783
|
inputRef.value?.focus();
|
|
@@ -1722,7 +1795,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1722
1795
|
blur: () => isSheet.value ? sheetFieldRef.value?.blur() : inputRef.value?.blur(),
|
|
1723
1796
|
open: () => {
|
|
1724
1797
|
if (!isSheet.value) menuConfig.open();
|
|
1725
|
-
else if (!
|
|
1798
|
+
else if (!isDisabled.value) sheetOpen.value = true;
|
|
1726
1799
|
},
|
|
1727
1800
|
close: () => {
|
|
1728
1801
|
if (isSheet.value) sheetOpen.value = false;
|
|
@@ -1731,26 +1804,29 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1731
1804
|
});
|
|
1732
1805
|
return (_ctx, _cache) => {
|
|
1733
1806
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
1734
|
-
createVNode(_sfc_main$
|
|
1807
|
+
createVNode(_sfc_main$14, {
|
|
1735
1808
|
class: normalizeClass(["astryx-tokenizer", [
|
|
1736
1809
|
unref(parts).containerClass.value,
|
|
1737
1810
|
`size-${unref(size)}`,
|
|
1738
|
-
{
|
|
1811
|
+
{
|
|
1812
|
+
"is-floating": floating.value,
|
|
1813
|
+
"in-group": inGroup
|
|
1814
|
+
}
|
|
1739
1815
|
]]),
|
|
1740
1816
|
style: normalizeStyle(unref(parts).containerStyle.value),
|
|
1741
1817
|
label: props.label,
|
|
1742
1818
|
"input-id": inputId,
|
|
1743
|
-
description: props.description,
|
|
1819
|
+
description: inGroup ? void 0 : props.description,
|
|
1744
1820
|
"label-tooltip": props.labelTooltip,
|
|
1745
|
-
"is-label-hidden": unref(hideLabel),
|
|
1746
|
-
"is-disabled":
|
|
1747
|
-
"is-required": props.required,
|
|
1748
|
-
"is-optional": props.optional,
|
|
1821
|
+
"is-label-hidden": inGroup || unref(hideLabel),
|
|
1822
|
+
"is-disabled": unref(isDisabled),
|
|
1823
|
+
"is-required": inGroup ? false : props.required,
|
|
1824
|
+
"is-optional": inGroup ? false : props.optional,
|
|
1749
1825
|
status: unref(fieldStatus),
|
|
1750
1826
|
"status-variant": props.statusVariant,
|
|
1751
1827
|
width: props.width
|
|
1752
1828
|
}, {
|
|
1753
|
-
default: withCtx(() => [unref(isSheet) ? (openBlock(), createBlock(_sfc_main$
|
|
1829
|
+
default: withCtx(() => [unref(isSheet) ? (openBlock(), createBlock(_sfc_main$2, mergeProps({
|
|
1754
1830
|
key: 0,
|
|
1755
1831
|
ref_key: "sheetFieldRef",
|
|
1756
1832
|
ref: sheetFieldRef,
|
|
@@ -1764,9 +1840,9 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1764
1840
|
"described-by": unref(describedBy),
|
|
1765
1841
|
placeholder: placeholder.value,
|
|
1766
1842
|
size: unref(size),
|
|
1767
|
-
"is-disabled":
|
|
1843
|
+
"is-disabled": unref(isDisabled),
|
|
1768
1844
|
name: props.name,
|
|
1769
|
-
"control-class": [unref(parts).controlClass(), `status-${props.status}`],
|
|
1845
|
+
"control-class": [unref(parts).controlClass(), inGroup ? void 0 : `status-${props.status}`],
|
|
1770
1846
|
"control-style": unref(parts).controlStyle(),
|
|
1771
1847
|
"status-icon": unref(statusIcon),
|
|
1772
1848
|
"status-icon-props": unref(statusIconProps),
|
|
@@ -1842,104 +1918,110 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1842
1918
|
ref: anchorRef,
|
|
1843
1919
|
class: normalizeClass(["astryx-tokenizer-control", [
|
|
1844
1920
|
unref(parts).controlClass(),
|
|
1845
|
-
`status-${props.status}`,
|
|
1921
|
+
inGroup ? void 0 : `status-${props.status}`,
|
|
1846
1922
|
{
|
|
1847
1923
|
"is-open": unref(menu).combobox.isOpen.value,
|
|
1848
|
-
"is-disabled":
|
|
1924
|
+
"is-disabled": unref(isDisabled),
|
|
1849
1925
|
"is-floating": floating.value,
|
|
1850
1926
|
"has-tokens": values.value.length > 0
|
|
1851
1927
|
}
|
|
1852
1928
|
]]),
|
|
1853
1929
|
style: normalizeStyle(unref(parts).controlStyle()),
|
|
1854
1930
|
onClick: onFieldClick,
|
|
1855
|
-
onFocusin: onFocusIn,
|
|
1856
|
-
onFocusout: onFocusOut,
|
|
1857
|
-
onPointerenter: _cache[
|
|
1858
|
-
onPointerleave: _cache[
|
|
1931
|
+
onFocusin: _cache[5] || (_cache[5] = (...args) => unref(onFocusIn) && unref(onFocusIn)(...args)),
|
|
1932
|
+
onFocusout: _cache[6] || (_cache[6] = (...args) => unref(onFocusOut) && unref(onFocusOut)(...args)),
|
|
1933
|
+
onPointerenter: _cache[7] || (_cache[7] = (...args) => unref(disabledTooltip).onPointerEnter && unref(disabledTooltip).onPointerEnter(...args)),
|
|
1934
|
+
onPointerleave: _cache[8] || (_cache[8] = (...args) => unref(disabledTooltip).onPointerLeave && unref(disabledTooltip).onPointerLeave(...args))
|
|
1859
1935
|
}, [
|
|
1860
1936
|
_ctx.$slots.icon ? (openBlock(), createElementBlock("span", _hoisted_1, [renderSlot(_ctx.$slots, "icon")])) : createCommentVNode("v-if", true),
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1937
|
+
createCommentVNode(" InputGroup 里标签和输入留在一行里横向滚动;结尾的控件在轨道外面,不会被标签盖住。 "),
|
|
1938
|
+
createVNode(_sfc_main$1, { "is-scrollable": inGroup }, {
|
|
1939
|
+
default: withCtx(() => [
|
|
1940
|
+
createElementVNode("span", {
|
|
1941
|
+
ref: unref(overflow).containerRef,
|
|
1942
|
+
class: normalizeClass(["astryx-tokenizer-tokens", { "is-collapsed": collapsed.value }])
|
|
1943
|
+
}, [
|
|
1944
|
+
createCommentVNode(" eslint-disable-next-line vue-a11y/no-static-element-interactions -- 方向键在标签容器上移动焦点,删除由内部按钮处理。 "),
|
|
1945
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(visibleItems.value, (item, index) => {
|
|
1946
|
+
return openBlock(), createElementBlock("span", {
|
|
1947
|
+
key: item.id,
|
|
1948
|
+
ref_for: true,
|
|
1949
|
+
ref: (element) => setTokenEl(index, element),
|
|
1950
|
+
class: "astryx-tokenizer-token",
|
|
1951
|
+
tabindex: "-1",
|
|
1952
|
+
onKeydown: ($event) => unref(onTokenKeyDown)($event, item, index)
|
|
1953
|
+
}, [renderSlot(_ctx.$slots, "token", {
|
|
1954
|
+
item,
|
|
1955
|
+
remove: () => remove(item)
|
|
1956
|
+
}, () => [createVNode(_sfc_main$16, {
|
|
1957
|
+
label: item.label,
|
|
1958
|
+
size: unref(size),
|
|
1959
|
+
disabled: unref(isDisabled),
|
|
1960
|
+
removable: "",
|
|
1961
|
+
onRemove: ($event) => remove(item)
|
|
1962
|
+
}, null, 8, [
|
|
1963
|
+
"label",
|
|
1964
|
+
"size",
|
|
1965
|
+
"disabled",
|
|
1966
|
+
"onRemove"
|
|
1967
|
+
])])], 40, _hoisted_2);
|
|
1968
|
+
}), 128)),
|
|
1969
|
+
collapsed.value && hiddenCount.value > 0 ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(unref(messages).tokenizer.more(hiddenCount.value)), 1)) : createCommentVNode("v-if", true)
|
|
1970
|
+
], 2),
|
|
1971
|
+
createElementVNode("span", {
|
|
1972
|
+
ref: unref(overflow).measureRef,
|
|
1973
|
+
class: "astryx-tokenizer-measure",
|
|
1974
|
+
"aria-hidden": "true"
|
|
1975
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(values.value, (item) => {
|
|
1976
|
+
return openBlock(), createElementBlock("span", {
|
|
1977
|
+
key: item.id,
|
|
1978
|
+
class: "astryx-tokenizer-token"
|
|
1979
|
+
}, [createVNode(_sfc_main$16, {
|
|
1980
|
+
label: item.label,
|
|
1981
|
+
size: unref(size),
|
|
1982
|
+
removable: ""
|
|
1983
|
+
}, null, 8, ["label", "size"])]);
|
|
1984
|
+
}), 128)), createElementVNode("span", _hoisted_4, toDisplayString(measureMoreLabel.value), 1)], 512),
|
|
1985
|
+
createElementVNode("input", mergeProps(inputAttrs(), {
|
|
1986
|
+
id: inputId,
|
|
1987
|
+
ref_key: "inputRef",
|
|
1988
|
+
ref: inputRef,
|
|
1989
|
+
class: ["astryx-tokenizer-input", { "is-empty": unref(menu).query.value === "" }],
|
|
1990
|
+
type: "text",
|
|
1991
|
+
role: "combobox",
|
|
1992
|
+
autocomplete: "off",
|
|
1993
|
+
autocapitalize: "off",
|
|
1994
|
+
autocorrect: "off",
|
|
1995
|
+
enterkeyhint: "search",
|
|
1996
|
+
"data-autofocus": props.hasAutoFocus || void 0,
|
|
1997
|
+
placeholder: values.value.length === 0 ? placeholder.value : void 0,
|
|
1998
|
+
value: unref(menu).query.value,
|
|
1999
|
+
disabled: unref(isDisabled) && !unref(focusableDisabled),
|
|
2000
|
+
readonly: unref(focusableDisabled) || atMax.value || void 0,
|
|
2001
|
+
"aria-disabled": unref(focusableDisabled) ? "true" : void 0,
|
|
2002
|
+
"aria-expanded": unref(menuConfig).popupOpen.value,
|
|
2003
|
+
"aria-haspopup": unref(menuConfig).isDialog.value ? "dialog" : unref(optionGrid).popupKind.value,
|
|
2004
|
+
"aria-controls": listboxId,
|
|
2005
|
+
"aria-autocomplete": "list",
|
|
2006
|
+
"aria-activedescendant": unref(menuConfig).isDialog.value ? void 0 : unref(optionGrid).gridMode.value ? unref(optionGrid).actionGrid.activeDescendant.value : unref(menu).activeId.value ? `${listboxId}-option-${unref(menu).combobox.activeIndex.value}` : void 0,
|
|
2007
|
+
"aria-labelledby": unref(labelledBy),
|
|
2008
|
+
"aria-describedby": unref(describedBy),
|
|
2009
|
+
"aria-required": props.required || void 0,
|
|
2010
|
+
"aria-invalid": props.status === "error" ? true : void 0,
|
|
2011
|
+
onInput,
|
|
2012
|
+
onKeydown: onInputKeyDown
|
|
2013
|
+
}), null, 16, _hoisted_5)
|
|
2014
|
+
]),
|
|
2015
|
+
_: 3
|
|
2016
|
+
}),
|
|
1935
2017
|
renderSlot(_ctx.$slots, "end"),
|
|
1936
|
-
showsClear.value && values.value.length > 0 && !
|
|
2018
|
+
showsClear.value && values.value.length > 0 && !unref(isDisabled) ? (openBlock(), createElementBlock("button", {
|
|
1937
2019
|
key: 1,
|
|
1938
2020
|
type: "button",
|
|
1939
2021
|
class: "astryx-tokenizer-clear",
|
|
1940
2022
|
"aria-label": unref(messages).tokenizer.clear,
|
|
1941
2023
|
onClick: _cache[4] || (_cache[4] = (...args) => unref(selection).clearAll && unref(selection).clearAll(...args))
|
|
1942
|
-
}, [..._cache[
|
|
2024
|
+
}, [..._cache[9] || (_cache[9] = [createElementVNode("svg", {
|
|
1943
2025
|
width: "16",
|
|
1944
2026
|
height: "16",
|
|
1945
2027
|
viewBox: "0 0 16 16",
|
|
@@ -1983,7 +2065,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1983
2065
|
"status-variant",
|
|
1984
2066
|
"width"
|
|
1985
2067
|
]),
|
|
1986
|
-
unref(showsDisabledMessage) ? (openBlock(), createBlock(_sfc_main$
|
|
2068
|
+
unref(showsDisabledMessage) ? (openBlock(), createBlock(_sfc_main$7, {
|
|
1987
2069
|
key: 0,
|
|
1988
2070
|
id: disabledTooltipId,
|
|
1989
2071
|
anchor: unref(isSheet) ? sheetFieldRef.value?.element ?? null : anchorRef.value,
|
|
@@ -1998,7 +2080,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1998
2080
|
"onPointerEnter",
|
|
1999
2081
|
"onPointerLeave"
|
|
2000
2082
|
])) : createCommentVNode("v-if", true),
|
|
2001
|
-
!unref(isSheet) ? (openBlock(), createBlock(_sfc_main$
|
|
2083
|
+
!unref(isSheet) ? (openBlock(), createBlock(_sfc_main$17, {
|
|
2002
2084
|
key: 1,
|
|
2003
2085
|
id: listboxId,
|
|
2004
2086
|
ref_key: "popupRef",
|
|
@@ -2076,4 +2158,4 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
2076
2158
|
}
|
|
2077
2159
|
});
|
|
2078
2160
|
//#endregion
|
|
2079
|
-
export { _sfc_main$
|
|
2161
|
+
export { _sfc_main$4 as a, dismissSearchOnTouchDrag as i, useSheetPresentation as n, useTokenRemoveTap as r, _sfc_main as t };
|