bt-core-app 2.2.5 → 2.2.7
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/_virtual/VCheckbox.sass.mjs +1 -0
- package/dist/_virtual/VChip.sass.mjs +1 -0
- package/dist/_virtual/VChipGroup.sass.mjs +1 -0
- package/dist/_virtual/VColorPicker.sass.mjs +1 -0
- package/dist/_virtual/VColorPickerCanvas.sass.mjs +1 -0
- package/dist/_virtual/VColorPickerEdit.sass.mjs +1 -0
- package/dist/_virtual/VColorPickerPreview.sass.mjs +1 -0
- package/dist/_virtual/VColorPickerSwatches.sass.mjs +1 -0
- package/dist/_virtual/VCombobox.sass.mjs +1 -0
- package/dist/_virtual/VContainer.sass.mjs +1 -0
- package/dist/_virtual/VCounter.sass.mjs +1 -0
- package/dist/_virtual/VDialog.sass.mjs +1 -0
- package/dist/_virtual/VField.sass.mjs +1 -0
- package/dist/_virtual/VGrid.sass.mjs +1 -0
- package/dist/_virtual/VInput.sass.mjs +1 -0
- package/dist/_virtual/VLabel.sass.mjs +1 -0
- package/dist/_virtual/VMessages.sass.mjs +1 -0
- package/dist/_virtual/VNavigationDrawer.sass.mjs +1 -0
- package/dist/_virtual/VPagination.sass.mjs +1 -0
- package/dist/_virtual/VPicker.sass.mjs +1 -0
- package/dist/_virtual/VRating.sass.mjs +1 -0
- package/dist/_virtual/VSelect.sass.mjs +1 -0
- package/dist/_virtual/VSelectionControl.sass.mjs +1 -0
- package/dist/_virtual/VSelectionControlGroup.sass.mjs +1 -0
- package/dist/_virtual/VSheet.sass.mjs +1 -0
- package/dist/_virtual/VSlideGroup.sass.mjs +1 -0
- package/dist/_virtual/VSlider.sass.mjs +1 -0
- package/dist/_virtual/VSliderThumb.sass.mjs +1 -0
- package/dist/_virtual/VSliderTrack.sass.mjs +1 -0
- package/dist/_virtual/VSpacer.sass.mjs +1 -0
- package/dist/_virtual/VSwitch.sass.mjs +1 -0
- package/dist/_virtual/VTab.sass.mjs +1 -0
- package/dist/_virtual/VTable.sass.mjs +1 -0
- package/dist/_virtual/VTabs.sass.mjs +1 -0
- package/dist/_virtual/VTextField.sass.mjs +1 -0
- package/dist/_virtual/VTextarea.sass.mjs +1 -0
- package/dist/_virtual/VVirtualScroll.sass.mjs +1 -0
- package/dist/_virtual/VWindow.sass.mjs +1 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VBtnToggle/VBtnToggle.mjs +14 -14
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VCheckbox/VCheckbox.mjs +74 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VCheckbox/VCheckboxBtn.mjs +53 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VChip/VChip.mjs +263 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VChipGroup/VChipGroup.mjs +87 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VColorPicker/VColorPicker.mjs +161 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VColorPicker/VColorPickerCanvas.mjs +166 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VColorPicker/VColorPickerEdit.mjs +97 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VColorPicker/VColorPickerPreview.mjs +123 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VColorPicker/VColorPickerSwatches.mjs +72 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VColorPicker/util/index.mjs +193 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VCombobox/VCombobox.mjs +501 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VCounter/VCounter.mjs +51 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VDialog/VDialog.mjs +103 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VField/VField.mjs +295 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VField/VFieldLabel.mjs +28 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VForm/VForm.mjs +53 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VGrid/VCol.mjs +98 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VGrid/VContainer.mjs +41 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VGrid/VRow.mjs +104 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VGrid/VSpacer.mjs +6 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VHover/VHover.mjs +41 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VInput/InputIcon.mjs +40 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VInput/VInput.mjs +154 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VLabel/VLabel.mjs +36 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VMessages/VMessages.mjs +55 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +247 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VNavigationDrawer/sticky.mjs +44 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VNavigationDrawer/touch.mjs +100 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VPagination/VPagination.mjs +315 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VRating/VRating.mjs +217 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VSelect/VSelect.mjs +475 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VSelect/useScrolling.mjs +57 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VSelectionControl/VSelectionControl.mjs +183 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs +106 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VSheet/VSheet.mjs +61 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VSlideGroup/VSlideGroup.mjs +287 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VSlideGroup/helpers.mjs +54 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VSlider/VSlider.mjs +159 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VSlider/VSliderThumb.mjs +176 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VSlider/VSliderTrack.mjs +109 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VSlider/slider.mjs +242 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VSwitch/VSwitch.mjs +172 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VTable/VTable.mjs +66 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VTabs/VTab.mjs +126 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VTabs/VTabs.mjs +153 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VTabs/VTabsWindow.mjs +48 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VTabs/VTabsWindowItem.mjs +29 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VTabs/shared.mjs +4 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VTextField/VTextField.mjs +204 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VTextarea/VTextarea.mjs +258 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VToolbar/VToolbarItems.mjs +38 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VVirtualScroll/VVirtualScroll.mjs +106 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VVirtualScroll/VVirtualScrollItem.mjs +47 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VWindow/VWindow.mjs +211 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VWindow/VWindowItem.mjs +93 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/transitions/index.mjs +20 -19
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/autocomplete.mjs +21 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/autofocus.mjs +14 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/display.mjs +21 -12
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/filter.mjs +125 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/focus.mjs +31 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/focusGroups.mjs +54 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/form.mjs +112 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/goto.mjs +86 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/icons.mjs +4 -4
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/layout.mjs +43 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/list-items.mjs +92 -5
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/menuActivator.mjs +24 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/nested/nested.mjs +1 -1
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/refs.mjs +15 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/touch.mjs +73 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/validation.mjs +139 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/virtual.mjs +164 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/directives/touch/index.mjs +89 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/labs/VPicker/VPicker.mjs +77 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/labs/VPicker/VPickerTitle.mjs +5 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/labs/rules/rules.mjs +15 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/color/transformSRGB.mjs +16 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/colorUtils.mjs +133 -50
- package/dist/bt-core/core/node_modules/vuetify/lib/util/easing.mjs +20 -4
- package/dist/bt-core/core/node_modules/vuetify/lib/util/globals.mjs +2 -1
- package/dist/bt-core/core/node_modules/vuetify/lib/util/helpers.mjs +248 -141
- package/dist/components/BT-Assistant-Menu.vue.mjs +226 -211
- package/dist/components/BT-Avatar.vue.mjs +31 -31
- package/dist/components/BT-Background-Task.vue.mjs +52 -52
- package/dist/components/BT-Blade-Item.vue.mjs +110 -100
- package/dist/components/BT-Blade-Items.vue.mjs +2 -2
- package/dist/components/BT-Blade-Items.vue2.mjs +411 -399
- package/dist/components/BT-Blade-Steps.vue.mjs +2 -2
- package/dist/components/BT-Blade-Steps.vue2.mjs +641 -626
- package/dist/components/BT-Blade.vue.mjs +190 -192
- package/dist/components/BT-Btn.vue.mjs +23 -25
- package/dist/components/BT-Camera-Overlay.vue.mjs +144 -142
- package/dist/components/BT-Col.vue.mjs +17 -19
- package/dist/components/BT-Color-Picker-Menu.vue.mjs +51 -49
- package/dist/components/BT-Cosmetics-Menu.vue.mjs +180 -173
- package/dist/components/BT-Cron.vue.mjs +264 -249
- package/dist/components/BT-Date-Select.vue.mjs +46 -47
- package/dist/components/BT-Demo-Profile-Select.vue.mjs +40 -40
- package/dist/components/BT-Dialog-Confirm.vue.mjs +39 -39
- package/dist/components/BT-Dialog-Date.vue.mjs +22 -19
- package/dist/components/BT-Dialog-Number.vue.mjs +125 -121
- package/dist/components/BT-Dialog-Select.vue.mjs +96 -85
- package/dist/components/BT-Divider.vue.mjs +20 -21
- package/dist/components/BT-Drag-Counter.vue.mjs +2 -2
- package/dist/components/BT-Drag-Counter.vue2.mjs +89 -89
- package/dist/components/BT-Entity.vue.mjs +82 -82
- package/dist/components/BT-Error.vue.mjs +26 -27
- package/dist/components/BT-Field-Checkbox.vue.mjs +30 -31
- package/dist/components/BT-Field-Date.vue.mjs +87 -84
- package/dist/components/BT-Field-Entity.vue.mjs +20 -16
- package/dist/components/BT-Field-Select-Simple.vue.mjs +24 -26
- package/dist/components/BT-Field-Select.vue.mjs +32 -34
- package/dist/components/BT-Field-String.vue.mjs +54 -52
- package/dist/components/BT-Field-Switch.vue.mjs +44 -43
- package/dist/components/BT-Field-Tags.vue.mjs +57 -55
- package/dist/components/BT-Field-Textarea.vue.mjs +44 -43
- package/dist/components/BT-Field-Trigger.vue.mjs +276 -270
- package/dist/components/BT-Field.vue.mjs +39 -38
- package/dist/components/BT-Form-Builder.vue.mjs +346 -325
- package/dist/components/BT-Form-Field.vue.mjs +88 -81
- package/dist/components/BT-Form.vue.mjs +280 -269
- package/dist/components/BT-Header-Option.vue.mjs +21 -19
- package/dist/components/BT-Image-Select.vue.mjs +186 -177
- package/dist/components/BT-Json.vue.mjs +29 -30
- package/dist/components/BT-Loader.vue.mjs +32 -31
- package/dist/components/BT-Nav-Sidebar.vue.mjs +130 -124
- package/dist/components/BT-Number.vue.mjs +2 -2
- package/dist/components/BT-Number.vue2.mjs +17 -19
- package/dist/components/BT-Numpad.vue.mjs +147 -144
- package/dist/components/BT-Select-List-Box.vue.mjs +287 -276
- package/dist/components/BT-Select-Simple.vue.mjs +21 -23
- package/dist/components/BT-Select.vue.mjs +36 -37
- package/dist/components/BT-Signature-Overlay.vue.mjs +113 -112
- package/dist/components/BT-Signature.vue.mjs +96 -96
- package/dist/components/BT-Slider.vue.mjs +109 -103
- package/dist/components/BT-Square-Check.vue.mjs +65 -65
- package/dist/components/BT-Status-Item.vue.mjs +18 -16
- package/dist/components/BT-Tags.vue.mjs +21 -22
- package/dist/components/BT-Tour.vue.mjs +69 -65
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { ref as k, computed as s, shallowRef as T, watch as N, nextTick as S, provide as L, toRef as b, createVNode as x, createElementVNode as v, withDirectives as V, normalizeClass as I, normalizeStyle as Y } from "vue";
|
|
2
|
+
import "../../../../../../../_virtual/VWindow.sass.mjs";
|
|
3
|
+
import { makeComponentProps as j } from "../../composables/component.mjs";
|
|
4
|
+
import { useGroup as M } from "../../composables/group.mjs";
|
|
5
|
+
import { useRtl as U, useLocale as G } from "../../composables/locale.mjs";
|
|
6
|
+
import { makeTagProps as K } from "../../composables/tag.mjs";
|
|
7
|
+
import { makeThemeProps as q, provideTheme as H } from "../../composables/theme.mjs";
|
|
8
|
+
import C from "../../directives/touch/index.mjs";
|
|
9
|
+
import { getScrollParent as J } from "../../util/getScrollParent.mjs";
|
|
10
|
+
import { VBtn as D } from "../VBtn/VBtn.mjs";
|
|
11
|
+
import { propsFactory as Q } from "../../util/propsFactory.mjs";
|
|
12
|
+
import { genericComponent as X } from "../../util/defineComponent.mjs";
|
|
13
|
+
import { IN_BROWSER as E, PREFERS_REDUCED_MOTION as Z } from "../../util/globals.mjs";
|
|
14
|
+
import { useRender as ee } from "../../util/useRender.mjs";
|
|
15
|
+
import { convertToUnit as oe } from "../../util/helpers.mjs";
|
|
16
|
+
const te = Symbol.for("vuetify:v-window"), ne = Symbol.for("vuetify:v-window-group"), re = Q({
|
|
17
|
+
continuous: Boolean,
|
|
18
|
+
nextIcon: {
|
|
19
|
+
type: [Boolean, String, Function, Object],
|
|
20
|
+
default: "$next"
|
|
21
|
+
},
|
|
22
|
+
prevIcon: {
|
|
23
|
+
type: [Boolean, String, Function, Object],
|
|
24
|
+
default: "$prev"
|
|
25
|
+
},
|
|
26
|
+
reverse: Boolean,
|
|
27
|
+
showArrows: {
|
|
28
|
+
type: [Boolean, String],
|
|
29
|
+
validator: (e) => typeof e == "boolean" || e === "hover"
|
|
30
|
+
},
|
|
31
|
+
verticalArrows: [Boolean, String],
|
|
32
|
+
touch: {
|
|
33
|
+
type: [Object, Boolean],
|
|
34
|
+
default: void 0
|
|
35
|
+
},
|
|
36
|
+
direction: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: "horizontal"
|
|
39
|
+
},
|
|
40
|
+
modelValue: null,
|
|
41
|
+
disabled: Boolean,
|
|
42
|
+
selectedClass: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: "v-window-item--active"
|
|
45
|
+
},
|
|
46
|
+
// TODO: mandatory should probably not be exposed but do this for now
|
|
47
|
+
mandatory: {
|
|
48
|
+
type: [Boolean, String],
|
|
49
|
+
default: "force"
|
|
50
|
+
},
|
|
51
|
+
crossfade: Boolean,
|
|
52
|
+
transitionDuration: Number,
|
|
53
|
+
...j(),
|
|
54
|
+
...K(),
|
|
55
|
+
...q()
|
|
56
|
+
}, "VWindow"), Ae = X()({
|
|
57
|
+
name: "VWindow",
|
|
58
|
+
directives: {
|
|
59
|
+
vTouch: C
|
|
60
|
+
},
|
|
61
|
+
props: re(),
|
|
62
|
+
emits: {
|
|
63
|
+
"update:modelValue": (e) => !0
|
|
64
|
+
},
|
|
65
|
+
setup(e, $) {
|
|
66
|
+
let {
|
|
67
|
+
slots: i
|
|
68
|
+
} = $;
|
|
69
|
+
const {
|
|
70
|
+
themeClasses: O
|
|
71
|
+
} = H(e), {
|
|
72
|
+
isRtl: f
|
|
73
|
+
} = U(), {
|
|
74
|
+
t: p
|
|
75
|
+
} = G(), r = M(e, ne), d = k(), c = s(() => f.value ? !e.reverse : e.reverse), a = T(!1), P = s(() => {
|
|
76
|
+
if (e.crossfade)
|
|
77
|
+
return "v-window-crossfade-transition";
|
|
78
|
+
const o = e.direction === "vertical" ? "y" : "x", t = (c.value ? !a.value : a.value) ? "-reverse" : "";
|
|
79
|
+
return `v-window-${o}${t}-transition`;
|
|
80
|
+
}), W = T(0), A = k(void 0), w = s(() => r.items.value.findIndex((o) => r.selected.value.includes(o.id)));
|
|
81
|
+
N(w, (o, n) => {
|
|
82
|
+
let t;
|
|
83
|
+
const l = {
|
|
84
|
+
left: 0,
|
|
85
|
+
top: 0
|
|
86
|
+
};
|
|
87
|
+
E && n >= 0 && (t = J(d.value), l.left = t == null ? void 0 : t.scrollLeft, l.top = t == null ? void 0 : t.scrollTop);
|
|
88
|
+
const _ = r.items.value.length, B = _ - 1;
|
|
89
|
+
_ <= 2 ? a.value = o < n : o === B && n === 0 ? a.value = !1 : o === 0 && n === B ? a.value = !0 : a.value = o < n, S(() => {
|
|
90
|
+
if (!E || !t)
|
|
91
|
+
return;
|
|
92
|
+
t.scrollTop !== l.top && t.scrollTo({
|
|
93
|
+
...l,
|
|
94
|
+
behavior: "instant"
|
|
95
|
+
}), requestAnimationFrame(() => {
|
|
96
|
+
if (!t)
|
|
97
|
+
return;
|
|
98
|
+
t.scrollTop !== l.top && t.scrollTo({
|
|
99
|
+
...l,
|
|
100
|
+
behavior: "instant"
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
}, {
|
|
105
|
+
flush: "sync"
|
|
106
|
+
}), L(te, {
|
|
107
|
+
transition: P,
|
|
108
|
+
isReversed: a,
|
|
109
|
+
transitionCount: W,
|
|
110
|
+
transitionHeight: A,
|
|
111
|
+
rootRef: d
|
|
112
|
+
});
|
|
113
|
+
const m = b(() => e.continuous || w.value !== 0), h = b(() => e.continuous || w.value !== r.items.value.length - 1);
|
|
114
|
+
function y() {
|
|
115
|
+
m.value && r.prev();
|
|
116
|
+
}
|
|
117
|
+
function g() {
|
|
118
|
+
h.value && r.next();
|
|
119
|
+
}
|
|
120
|
+
const R = s(() => {
|
|
121
|
+
const o = [], n = {
|
|
122
|
+
icon: f.value ? e.nextIcon : e.prevIcon,
|
|
123
|
+
class: `v-window__${c.value ? "right" : "left"}`,
|
|
124
|
+
onClick: r.prev,
|
|
125
|
+
"aria-label": p("$vuetify.carousel.prev")
|
|
126
|
+
};
|
|
127
|
+
o.push(m.value ? i.prev ? i.prev({
|
|
128
|
+
props: n
|
|
129
|
+
}) : x(D, n, null) : v("div", null, null));
|
|
130
|
+
const t = {
|
|
131
|
+
icon: f.value ? e.prevIcon : e.nextIcon,
|
|
132
|
+
class: `v-window__${c.value ? "left" : "right"}`,
|
|
133
|
+
onClick: r.next,
|
|
134
|
+
"aria-label": p("$vuetify.carousel.next")
|
|
135
|
+
};
|
|
136
|
+
return o.push(h.value ? i.next ? i.next({
|
|
137
|
+
props: t
|
|
138
|
+
}) : x(D, t, null) : v("div", null, null)), o;
|
|
139
|
+
}), F = s(() => e.touch === !1 ? e.touch : {
|
|
140
|
+
...{
|
|
141
|
+
left: () => {
|
|
142
|
+
c.value ? y() : g();
|
|
143
|
+
},
|
|
144
|
+
right: () => {
|
|
145
|
+
c.value ? g() : y();
|
|
146
|
+
},
|
|
147
|
+
start: (n) => {
|
|
148
|
+
let {
|
|
149
|
+
originalEvent: t
|
|
150
|
+
} = n;
|
|
151
|
+
t.stopPropagation();
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
...e.touch === !0 ? {} : e.touch
|
|
155
|
+
});
|
|
156
|
+
function z(o) {
|
|
157
|
+
(e.direction === "horizontal" && o.key === "ArrowLeft" || e.direction === "vertical" && o.key === "ArrowUp") && (o.preventDefault(), y(), S(() => {
|
|
158
|
+
m.value ? u(0) : u(1);
|
|
159
|
+
})), (e.direction === "horizontal" && o.key === "ArrowRight" || e.direction === "vertical" && o.key === "ArrowDown") && (o.preventDefault(), g(), S(() => {
|
|
160
|
+
h.value ? u(1) : u(0);
|
|
161
|
+
}));
|
|
162
|
+
}
|
|
163
|
+
function u(o) {
|
|
164
|
+
var l;
|
|
165
|
+
const n = R.value[o];
|
|
166
|
+
if (!n)
|
|
167
|
+
return;
|
|
168
|
+
(l = (Array.isArray(n) ? n[0] : n).el) == null || l.focus();
|
|
169
|
+
}
|
|
170
|
+
return ee(() => V(x(e.tag, {
|
|
171
|
+
ref: d,
|
|
172
|
+
class: I(["v-window", {
|
|
173
|
+
"v-window--show-arrows-on-hover": e.showArrows === "hover",
|
|
174
|
+
"v-window--vertical-arrows": !!e.verticalArrows,
|
|
175
|
+
"v-window--crossfade": !!e.crossfade
|
|
176
|
+
}, O.value, e.class]),
|
|
177
|
+
style: Y([e.style, {
|
|
178
|
+
"--v-window-transition-duration": Z() ? null : oe(e.transitionDuration, "ms")
|
|
179
|
+
}])
|
|
180
|
+
}, {
|
|
181
|
+
default: () => {
|
|
182
|
+
var o, n;
|
|
183
|
+
return [v("div", {
|
|
184
|
+
class: "v-window__container",
|
|
185
|
+
style: {
|
|
186
|
+
height: A.value
|
|
187
|
+
}
|
|
188
|
+
}, [(o = i.default) == null ? void 0 : o.call(i, {
|
|
189
|
+
group: r
|
|
190
|
+
}), e.showArrows !== !1 && v("div", {
|
|
191
|
+
class: I(["v-window__controls", {
|
|
192
|
+
"v-window__controls--left": e.verticalArrows === "left" || e.verticalArrows === !0
|
|
193
|
+
}, {
|
|
194
|
+
"v-window__controls--right": e.verticalArrows === "right"
|
|
195
|
+
}]),
|
|
196
|
+
onKeydown: z
|
|
197
|
+
}, [R.value])]), (n = i.additional) == null ? void 0 : n.call(i, {
|
|
198
|
+
group: r
|
|
199
|
+
})];
|
|
200
|
+
}
|
|
201
|
+
}), [[C, F.value]])), {
|
|
202
|
+
group: r
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
export {
|
|
207
|
+
Ae as VWindow,
|
|
208
|
+
ne as VWindowGroupSymbol,
|
|
209
|
+
te as VWindowSymbol,
|
|
210
|
+
re as makeVWindowProps
|
|
211
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { inject as y, shallowRef as C, computed as f, nextTick as T, createVNode as g, withDirectives as h, createElementVNode as V, normalizeClass as S, normalizeStyle as I, vShow as W } from "vue";
|
|
2
|
+
import { makeComponentProps as B } from "../../composables/component.mjs";
|
|
3
|
+
import { makeGroupItemProps as E, useGroupItem as b } from "../../composables/group.mjs";
|
|
4
|
+
import { makeLazyProps as k, useLazy as H } from "../../composables/lazy.mjs";
|
|
5
|
+
import { useSsrBoot as L } from "../../composables/ssrBoot.mjs";
|
|
6
|
+
import { MaybeTransition as R } from "../../composables/transition.mjs";
|
|
7
|
+
import z from "../../directives/touch/index.mjs";
|
|
8
|
+
import { VWindowSymbol as P, VWindowGroupSymbol as A } from "./VWindow.mjs";
|
|
9
|
+
import { propsFactory as G } from "../../util/propsFactory.mjs";
|
|
10
|
+
import { genericComponent as x } from "../../util/defineComponent.mjs";
|
|
11
|
+
import { useRender as N } from "../../util/useRender.mjs";
|
|
12
|
+
import { convertToUnit as v } from "../../util/helpers.mjs";
|
|
13
|
+
const j = G({
|
|
14
|
+
reverseTransition: {
|
|
15
|
+
type: [Boolean, String],
|
|
16
|
+
default: void 0
|
|
17
|
+
},
|
|
18
|
+
transition: {
|
|
19
|
+
type: [Boolean, String],
|
|
20
|
+
default: void 0
|
|
21
|
+
},
|
|
22
|
+
...B(),
|
|
23
|
+
...E(),
|
|
24
|
+
...k()
|
|
25
|
+
}, "VWindowItem"), _ = x()({
|
|
26
|
+
name: "VWindowItem",
|
|
27
|
+
directives: {
|
|
28
|
+
vTouch: z
|
|
29
|
+
},
|
|
30
|
+
props: j(),
|
|
31
|
+
emits: {
|
|
32
|
+
"group:selected": (n) => !0
|
|
33
|
+
},
|
|
34
|
+
setup(n, d) {
|
|
35
|
+
let {
|
|
36
|
+
slots: r
|
|
37
|
+
} = d;
|
|
38
|
+
const e = y(P), i = b(n, A), {
|
|
39
|
+
isBooted: s
|
|
40
|
+
} = L();
|
|
41
|
+
if (!e || !i)
|
|
42
|
+
throw new Error("[Vuetify] VWindowItem must be used inside VWindow");
|
|
43
|
+
const o = C(!1), l = f(() => s.value && (e.isReversed.value ? n.reverseTransition !== !1 : n.transition !== !1));
|
|
44
|
+
function a() {
|
|
45
|
+
!o.value || !e || (o.value = !1, e.transitionCount.value > 0 && (e.transitionCount.value -= 1, e.transitionCount.value === 0 && (e.transitionHeight.value = void 0)));
|
|
46
|
+
}
|
|
47
|
+
function u() {
|
|
48
|
+
var t;
|
|
49
|
+
o.value || !e || (o.value = !0, e.transitionCount.value === 0 && (e.transitionHeight.value = v((t = e.rootRef.value) == null ? void 0 : t.clientHeight)), e.transitionCount.value += 1);
|
|
50
|
+
}
|
|
51
|
+
function m() {
|
|
52
|
+
a();
|
|
53
|
+
}
|
|
54
|
+
function c(t) {
|
|
55
|
+
o.value && T(() => {
|
|
56
|
+
!l.value || !o.value || !e || (e.transitionHeight.value = v(t.clientHeight));
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
const p = f(() => {
|
|
60
|
+
const t = e.isReversed.value ? n.reverseTransition : n.transition;
|
|
61
|
+
return l.value ? {
|
|
62
|
+
name: typeof t != "string" ? e.transition.value : t,
|
|
63
|
+
onBeforeEnter: u,
|
|
64
|
+
onAfterEnter: a,
|
|
65
|
+
onEnterCancelled: m,
|
|
66
|
+
onBeforeLeave: u,
|
|
67
|
+
onAfterLeave: a,
|
|
68
|
+
onLeaveCancelled: m,
|
|
69
|
+
onEnter: c
|
|
70
|
+
} : !1;
|
|
71
|
+
}), {
|
|
72
|
+
hasContent: w
|
|
73
|
+
} = H(n, i.isSelected);
|
|
74
|
+
return N(() => g(R, {
|
|
75
|
+
transition: p.value,
|
|
76
|
+
disabled: !s.value
|
|
77
|
+
}, {
|
|
78
|
+
default: () => {
|
|
79
|
+
var t;
|
|
80
|
+
return [h(V("div", {
|
|
81
|
+
class: S(["v-window-item", i.selectedClass.value, n.class]),
|
|
82
|
+
style: I(n.style)
|
|
83
|
+
}, [w.value && ((t = r.default) == null ? void 0 : t.call(r))]), [[W, i.isSelected.value]])];
|
|
84
|
+
}
|
|
85
|
+
})), {
|
|
86
|
+
groupItem: i
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
export {
|
|
91
|
+
_ as VWindowItem,
|
|
92
|
+
j as makeVWindowItemProps
|
|
93
|
+
};
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { createCssTransition as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
t("slide-x-reverse-transition");
|
|
14
|
-
t("slide-y-transition");
|
|
15
|
-
t("slide-y-reverse-transition");
|
|
16
|
-
const s = i("expand-transition", n());
|
|
17
|
-
i("expand-x-transition", n("", "x"));
|
|
18
|
-
i("expand-both-transition", n("", "both"));
|
|
1
|
+
import { createCssTransition as n, createJavascriptTransition as i } from "./createTransition.mjs";
|
|
2
|
+
import t from "./expand-transition.mjs";
|
|
3
|
+
n("fab-transition", "center center", "out-in");
|
|
4
|
+
n("dialog-bottom-transition");
|
|
5
|
+
n("dialog-top-transition");
|
|
6
|
+
const s = n("fade-transition"), a = n("scale-transition");
|
|
7
|
+
n("scroll-x-transition");
|
|
8
|
+
n("scroll-x-reverse-transition");
|
|
9
|
+
n("scroll-y-transition");
|
|
10
|
+
n("scroll-y-reverse-transition");
|
|
11
|
+
const e = n("slide-x-transition"), l = n("slide-x-reverse-transition"), c = n("slide-y-transition"), d = n("slide-y-reverse-transition"), x = i("expand-transition", t()), p = i("expand-x-transition", t("", "x"));
|
|
12
|
+
i("expand-both-transition", t("", "both"));
|
|
19
13
|
export {
|
|
20
|
-
|
|
14
|
+
x as VExpandTransition,
|
|
15
|
+
p as VExpandXTransition,
|
|
16
|
+
s as VFadeTransition,
|
|
17
|
+
a as VScaleTransition,
|
|
18
|
+
l as VSlideXReverseTransition,
|
|
19
|
+
e as VSlideXTransition,
|
|
20
|
+
d as VSlideYReverseTransition,
|
|
21
|
+
c as VSlideYTransition
|
|
21
22
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useId as m, shallowRef as l, toRef as o } from "vue";
|
|
2
|
+
import { propsFactory as c } from "../util/propsFactory.mjs";
|
|
3
|
+
const f = c({
|
|
4
|
+
autocomplete: String
|
|
5
|
+
}, "autocomplete");
|
|
6
|
+
function p(e) {
|
|
7
|
+
const n = m(), u = l(0), t = o(() => e.autocomplete === "suppress"), a = o(() => {
|
|
8
|
+
if (e.name)
|
|
9
|
+
return t.value ? `${e.name}-${n}-${u.value}` : e.name;
|
|
10
|
+
}), r = o(() => t.value ? "off" : e.autocomplete);
|
|
11
|
+
return {
|
|
12
|
+
isSuppressing: t,
|
|
13
|
+
fieldAutocomplete: r,
|
|
14
|
+
fieldName: a,
|
|
15
|
+
update: () => u.value = (/* @__PURE__ */ new Date()).getTime()
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
f as makeAutocompleteProps,
|
|
20
|
+
p as useAutocomplete
|
|
21
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
function r(u) {
|
|
2
|
+
function n(o, c) {
|
|
3
|
+
if (!u.autofocus || !o)
|
|
4
|
+
return;
|
|
5
|
+
const t = c[0].target, e = t.matches("input,textarea") ? t : t.querySelector("input,textarea");
|
|
6
|
+
e == null || e.focus();
|
|
7
|
+
}
|
|
8
|
+
return {
|
|
9
|
+
onIntersect: n
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
r as useAutofocus
|
|
14
|
+
};
|
|
@@ -1,23 +1,32 @@
|
|
|
1
|
-
import { inject as
|
|
2
|
-
import { getCurrentInstanceName as
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { inject as n, computed as i, toRef as s } from "vue";
|
|
2
|
+
import { getCurrentInstanceName as a } from "../util/getCurrentInstance.mjs";
|
|
3
|
+
import { propsFactory as m } from "../util/propsFactory.mjs";
|
|
4
|
+
const d = ["sm", "md", "lg", "xl", "xxl"], u = Symbol.for("vuetify:display"), y = m({
|
|
5
|
+
mobile: {
|
|
6
|
+
type: Boolean,
|
|
7
|
+
default: !1
|
|
8
|
+
},
|
|
9
|
+
mobileBreakpoint: [Number, String]
|
|
10
|
+
}, "display");
|
|
11
|
+
function c() {
|
|
5
12
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
|
|
6
13
|
mobile: null
|
|
7
|
-
},
|
|
8
|
-
const t =
|
|
14
|
+
}, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : a();
|
|
15
|
+
const t = n(u);
|
|
9
16
|
if (!t)
|
|
10
17
|
throw new Error("Could not find Vuetify display injection");
|
|
11
|
-
const
|
|
12
|
-
[`${
|
|
18
|
+
const o = i(() => e.mobile ? !0 : typeof e.mobileBreakpoint == "number" ? t.width.value < e.mobileBreakpoint : e.mobileBreakpoint ? t.width.value < t.thresholds.value[e.mobileBreakpoint] : e.mobile === null ? t.mobile.value : !1), l = s(() => r ? {
|
|
19
|
+
[`${r}--mobile`]: o.value
|
|
13
20
|
} : {});
|
|
14
21
|
return {
|
|
15
22
|
...t,
|
|
16
|
-
displayClasses:
|
|
17
|
-
mobile:
|
|
23
|
+
displayClasses: l,
|
|
24
|
+
mobile: o
|
|
18
25
|
};
|
|
19
26
|
}
|
|
20
27
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
28
|
+
u as DisplaySymbol,
|
|
29
|
+
d as breakpoints,
|
|
30
|
+
y as makeDisplayProps,
|
|
31
|
+
c as useDisplay
|
|
23
32
|
};
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { shallowRef as j, computed as A, unref as F, watchEffect as S, createElementVNode as b, normalizeClass as w, Fragment as x } from "vue";
|
|
2
|
+
import { propsFactory as C } from "../util/propsFactory.mjs";
|
|
3
|
+
import { wrapInArray as v, getPropertyFromItem as E } from "../util/helpers.mjs";
|
|
4
|
+
const $ = (t, r, e) => {
|
|
5
|
+
if (t == null || r == null)
|
|
6
|
+
return -1;
|
|
7
|
+
if (!r.length)
|
|
8
|
+
return 0;
|
|
9
|
+
t = t.toString().toLocaleLowerCase(), r = r.toString().toLocaleLowerCase();
|
|
10
|
+
const l = [];
|
|
11
|
+
let n = t.indexOf(r);
|
|
12
|
+
for (; ~n; )
|
|
13
|
+
l.push([n, n + r.length]), n = t.indexOf(r, n + r.length);
|
|
14
|
+
return l.length ? l : -1;
|
|
15
|
+
};
|
|
16
|
+
function I(t, r) {
|
|
17
|
+
if (!(t == null || typeof t == "boolean" || t === -1))
|
|
18
|
+
return typeof t == "number" ? [[t, t + r.length]] : Array.isArray(t[0]) ? t : [t];
|
|
19
|
+
}
|
|
20
|
+
const N = C({
|
|
21
|
+
customFilter: Function,
|
|
22
|
+
customKeyFilter: Object,
|
|
23
|
+
filterKeys: [Array, String],
|
|
24
|
+
filterMode: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: "intersection"
|
|
27
|
+
},
|
|
28
|
+
noFilter: Boolean
|
|
29
|
+
}, "filter");
|
|
30
|
+
function P(t, r, e) {
|
|
31
|
+
var c, M;
|
|
32
|
+
const l = [], n = (e == null ? void 0 : e.default) ?? $, i = e != null && e.filterKeys ? v(e.filterKeys) : !1, u = Object.keys((e == null ? void 0 : e.customKeyFilter) ?? {}).length;
|
|
33
|
+
if (!(t != null && t.length))
|
|
34
|
+
return l;
|
|
35
|
+
let a = [];
|
|
36
|
+
e:
|
|
37
|
+
for (let d = 0; d < t.length; d++) {
|
|
38
|
+
const [f, m = f] = v(t[d]), h = {}, g = {};
|
|
39
|
+
let s = -1;
|
|
40
|
+
if ((r || u > 0) && !(e != null && e.noFilter)) {
|
|
41
|
+
let k = !1;
|
|
42
|
+
if (typeof f == "object") {
|
|
43
|
+
if (f.type === "divider" || f.type === "subheader") {
|
|
44
|
+
(((c = a.at(-1)) == null ? void 0 : c.type) !== "divider" || f.type !== "subheader") && (a = []), a.push({
|
|
45
|
+
index: d,
|
|
46
|
+
matches: {},
|
|
47
|
+
type: f.type
|
|
48
|
+
});
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
const O = i || Object.keys(m);
|
|
52
|
+
k = O.length === u;
|
|
53
|
+
for (const K of O) {
|
|
54
|
+
const L = E(m, K), o = (M = e == null ? void 0 : e.customKeyFilter) == null ? void 0 : M[K];
|
|
55
|
+
if (s = o ? o(L, r, f) : n(L, r, f), s !== -1 && s !== !1)
|
|
56
|
+
o ? h[K] = I(s, r) : g[K] = I(s, r);
|
|
57
|
+
else if ((e == null ? void 0 : e.filterMode) === "every")
|
|
58
|
+
continue e;
|
|
59
|
+
}
|
|
60
|
+
} else
|
|
61
|
+
s = n(f, r, f), s !== -1 && s !== !1 && (g.title = I(s, r));
|
|
62
|
+
const y = Object.keys(g).length, _ = Object.keys(h).length;
|
|
63
|
+
if (!y && !_ || (e == null ? void 0 : e.filterMode) === "union" && _ !== u && !y || (e == null ? void 0 : e.filterMode) === "intersection" && (_ !== u || !y && u > 0 && !k))
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
a.length && (l.push(...a), a = []), l.push({
|
|
67
|
+
index: d,
|
|
68
|
+
matches: {
|
|
69
|
+
...g,
|
|
70
|
+
...h
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
return l;
|
|
75
|
+
}
|
|
76
|
+
function Q(t, r, e, l) {
|
|
77
|
+
const n = j([]), i = j(/* @__PURE__ */ new Map()), u = A(() => l != null && l.transform ? F(r).map((c) => [c, l.transform(c)]) : F(r));
|
|
78
|
+
S(() => {
|
|
79
|
+
const c = typeof e == "function" ? e() : F(e), M = typeof c != "string" && typeof c != "number" ? "" : String(c), d = P(u.value, M, {
|
|
80
|
+
customKeyFilter: {
|
|
81
|
+
...t.customKeyFilter,
|
|
82
|
+
...F(l == null ? void 0 : l.customKeyFilter)
|
|
83
|
+
},
|
|
84
|
+
default: t.customFilter,
|
|
85
|
+
filterKeys: t.filterKeys,
|
|
86
|
+
filterMode: t.filterMode,
|
|
87
|
+
noFilter: t.noFilter
|
|
88
|
+
}), f = F(r), m = [], h = /* @__PURE__ */ new Map();
|
|
89
|
+
d.forEach((g) => {
|
|
90
|
+
let {
|
|
91
|
+
index: s,
|
|
92
|
+
matches: k
|
|
93
|
+
} = g;
|
|
94
|
+
const y = f[s];
|
|
95
|
+
m.push(y), h.set(y.value, k);
|
|
96
|
+
}), n.value = m, i.value = h;
|
|
97
|
+
});
|
|
98
|
+
function a(c) {
|
|
99
|
+
return i.value.get(c.value);
|
|
100
|
+
}
|
|
101
|
+
return {
|
|
102
|
+
filteredItems: n,
|
|
103
|
+
filteredMatches: i,
|
|
104
|
+
getMatches: a
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
function V(t, r, e) {
|
|
108
|
+
return e == null || !e.length ? r : e.map((l, n) => {
|
|
109
|
+
const i = n === 0 ? 0 : e[n - 1][1], u = [b("span", {
|
|
110
|
+
class: w(`${t}__unmask`)
|
|
111
|
+
}, [r.slice(i, l[0])]), b("span", {
|
|
112
|
+
class: w(`${t}__mask`)
|
|
113
|
+
}, [r.slice(l[0], l[1])])];
|
|
114
|
+
return n === e.length - 1 && u.push(b("span", {
|
|
115
|
+
class: w(`${t}__unmask`)
|
|
116
|
+
}, [r.slice(l[1])])), b(x, null, [u]);
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
export {
|
|
120
|
+
$ as defaultFilter,
|
|
121
|
+
P as filterItems,
|
|
122
|
+
V as highlightResult,
|
|
123
|
+
N as makeFilterProps,
|
|
124
|
+
Q as useFilter
|
|
125
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { useProxiedModel as n } from "./proxiedModel.mjs";
|
|
2
|
+
import { toRef as c } from "vue";
|
|
3
|
+
import { getCurrentInstanceName as f } from "../util/getCurrentInstance.mjs";
|
|
4
|
+
import { propsFactory as m } from "../util/propsFactory.mjs";
|
|
5
|
+
import { EventProp as a } from "../util/helpers.mjs";
|
|
6
|
+
const v = m({
|
|
7
|
+
focused: Boolean,
|
|
8
|
+
"onUpdate:focused": a()
|
|
9
|
+
}, "focus");
|
|
10
|
+
function F(e) {
|
|
11
|
+
let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : f();
|
|
12
|
+
const o = n(e, "focused"), t = c(() => ({
|
|
13
|
+
[`${r}--focused`]: o.value
|
|
14
|
+
}));
|
|
15
|
+
function u() {
|
|
16
|
+
o.value = !0;
|
|
17
|
+
}
|
|
18
|
+
function s() {
|
|
19
|
+
o.value = !1;
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
focusClasses: t,
|
|
23
|
+
isFocused: o,
|
|
24
|
+
focus: u,
|
|
25
|
+
blur: s
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
v as makeFocusProps,
|
|
30
|
+
F as useFocus
|
|
31
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { toValue as f } from "vue";
|
|
2
|
+
import { focusableChildren as G } from "../util/helpers.mjs";
|
|
3
|
+
function x(l) {
|
|
4
|
+
let {
|
|
5
|
+
groups: r,
|
|
6
|
+
onLeave: p
|
|
7
|
+
} = l;
|
|
8
|
+
function d(n) {
|
|
9
|
+
var o;
|
|
10
|
+
return n.type === "list" ? (o = n.contentRef.value) == null ? void 0 : o.$el : n.contentRef.value;
|
|
11
|
+
}
|
|
12
|
+
function g(n) {
|
|
13
|
+
const o = d(n);
|
|
14
|
+
return o ? G(o) : [];
|
|
15
|
+
}
|
|
16
|
+
function m(n) {
|
|
17
|
+
var c;
|
|
18
|
+
const o = n.target, s = n.shiftKey ? "backward" : "forward", i = r.map(g), a = r.map((t) => {
|
|
19
|
+
var e;
|
|
20
|
+
return t.type === "list" ? (e = t.contentRef.value) == null ? void 0 : e.$el : t.contentRef.value;
|
|
21
|
+
}).findIndex((t) => t == null ? void 0 : t.contains(o)), u = y(i, a, s, o);
|
|
22
|
+
if (u === null) {
|
|
23
|
+
const t = r[a], e = i[a];
|
|
24
|
+
(t.type === "list" || (s === "forward" ? e.at(-1) === n.target : e.at(0) === n.target)) && p();
|
|
25
|
+
} else {
|
|
26
|
+
n.preventDefault(), n.stopImmediatePropagation();
|
|
27
|
+
const t = r[u];
|
|
28
|
+
if (t.type === "list" && f(t.displayItemsCount) > 0)
|
|
29
|
+
(c = t.contentRef.value) == null || c.focus(0);
|
|
30
|
+
else {
|
|
31
|
+
const e = s === "forward";
|
|
32
|
+
i[u].at(e ? 0 : -1).focus();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function y(n, o, s, i) {
|
|
37
|
+
const a = r[o], u = n[o];
|
|
38
|
+
if (a.type !== "list" && !(s === "forward" ? u.at(-1) === i : u.at(0) === i))
|
|
39
|
+
return null;
|
|
40
|
+
const c = s === "forward" ? 1 : -1;
|
|
41
|
+
for (let t = o + c; t >= 0 && t < r.length; t += c) {
|
|
42
|
+
const e = r[t];
|
|
43
|
+
if (n[t].length > 0 || e.type === "list" && f(e.displayItemsCount) > 0)
|
|
44
|
+
return t;
|
|
45
|
+
}
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
onTabKeydown: m
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export {
|
|
53
|
+
x as useFocusGroups
|
|
54
|
+
};
|