ropav 0.1.4 → 0.1.6
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.md +20 -0
- package/dist/accordion.js +11 -8
- package/dist/alert.css +18 -18
- package/dist/alert.js +27 -21
- package/dist/avatar.css +19 -19
- package/dist/avatar.js +16 -11
- package/dist/badge.css +16 -16
- package/dist/badge.js +14 -9
- package/dist/base.css +214 -69
- package/dist/button-group.js +1 -1
- package/dist/button-link.js +16 -14
- package/dist/button.css +37 -28
- package/dist/button.js +16 -14
- package/dist/{useButtonColor.js → button.scss_vue_type_style_index_0_src_true_lang.js} +8 -4
- package/dist/card.js +1 -1
- package/dist/checkbox.css +32 -32
- package/dist/checkbox.js +19 -11
- package/dist/chevron-right.js +12 -0
- package/dist/collapse.css +6 -6
- package/dist/collapse.js +4 -4
- package/dist/collectionNavigation.js +120 -0
- package/dist/color-input.css +19 -19
- package/dist/color-input.js +6 -5
- package/dist/color-picker.css +7 -7
- package/dist/color-picker.js +4 -5
- package/dist/color-swatch.js +1 -1
- package/dist/componentColors.js +135 -23
- package/dist/components/alert/types.d.ts +1 -0
- package/dist/components/alert/useAlertColor.d.ts +1 -1
- package/dist/components/avatar/types.d.ts +1 -0
- package/dist/components/avatar/useAvatarColor.d.ts +1 -1
- package/dist/components/badge/types.d.ts +1 -0
- package/dist/components/badge/useBadgeColor.d.ts +1 -1
- package/dist/components/button/types.d.ts +1 -0
- package/dist/components/button/useButtonColor.d.ts +1 -1
- package/dist/components/button-link/types.d.ts +1 -0
- package/dist/components/checkbox/types.d.ts +1 -0
- package/dist/components/checkbox/useCheckbox.d.ts +1 -1
- package/dist/components/color-input/color-input.d.ts +2 -2
- package/dist/components/color-input/useColorInput.d.ts +1 -1
- package/dist/components/dialog/dialog-core.d.ts +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-content.d.ts +2 -2
- package/dist/components/dropdown-menu/dropdown-menu-primitive-core.d.ts +2 -1
- package/dist/components/dropdown-menu/dropdown-menu-sub-content.d.ts +2 -2
- package/dist/components/dropdown-menu/dropdown-menu-utils.d.ts +0 -2
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +3 -3
- package/dist/components/dropdown-menu/index.d.ts +1 -0
- package/dist/components/dropdown-menu/types.d.ts +4 -0
- package/dist/components/dropdown-menu/useDropdownMenuDisclosure.d.ts +3 -4
- package/dist/components/dropdown-menu/useDropdownMenuInteractions.d.ts +2 -1
- package/dist/components/dropdown-menu/useDropdownMenuNavigation.d.ts +1 -0
- package/dist/components/icon-button/types.d.ts +1 -0
- package/dist/components/input/useInput.d.ts +1 -1
- package/dist/components/number-input/useNumberInput.d.ts +1 -1
- package/dist/components/pagination/index.d.ts +4 -0
- package/dist/components/pagination/index.js +2 -0
- package/dist/components/pagination/pagination.d.ts +49 -0
- package/dist/components/pagination/types.d.ts +54 -0
- package/dist/components/pagination/usePagination.d.ts +19 -0
- package/dist/components/progress/useProgress.d.ts +1 -1
- package/dist/components/radio/types.d.ts +3 -0
- package/dist/components/radio/useRadio.d.ts +2 -2
- package/dist/components/scroll-area/scrollAreaCore.d.ts +5 -0
- package/dist/components/scroll-area/types.d.ts +4 -0
- package/dist/components/scroll-area/useScrollArea.d.ts +1 -0
- package/dist/components/scroll-area/useScrollAreaMetrics.d.ts +3 -0
- package/dist/components/scroll-area/useScrollAreaPresentation.d.ts +3 -0
- package/dist/components/select/useSelect.d.ts +3 -2
- package/dist/components/select/useSelectNativeValue.d.ts +1 -7
- package/dist/components/slider/range-slider-tooltip.d.ts +2 -0
- package/dist/components/slider/sliderCore.d.ts +2 -1
- package/dist/components/slider/types.d.ts +1 -1
- package/dist/components/slider/useRangeSlider.d.ts +3 -1
- package/dist/components/slider/useSlider.d.ts +3 -1
- package/dist/components/switch/useSwitch.d.ts +1 -1
- package/dist/components/textarea/useTextarea.d.ts +1 -1
- package/dist/components/toast/types.d.ts +2 -0
- package/dist/components/toast/useToastColor.d.ts +1 -1
- package/dist/components/tooltip/types.d.ts +1 -0
- package/dist/components/tooltip/useTooltip.d.ts +1 -1
- package/dist/composables/index.d.ts +2 -0
- package/dist/composables/index.js +2 -0
- package/dist/composables/useControllableValue.d.ts +14 -0
- package/dist/dialog.js +8 -5
- package/dist/dropdown-menu.js +98 -59
- package/dist/field.js +1 -1
- package/dist/floating.js +19 -7
- package/dist/icon-button.css +12 -169
- package/dist/icon-button.js +11 -7
- package/dist/index.d.ts +6 -4
- package/dist/index.js +8 -5
- package/dist/input.css +24 -24
- package/dist/input.js +6 -5
- package/dist/modal.js +11 -7
- package/dist/number-input.css +18 -18
- package/dist/number-input.js +8 -7
- package/dist/overlay.js +1 -1
- package/dist/pagination.css +140 -0
- package/dist/pagination.js +442 -0
- package/dist/popover.js +9 -6
- package/dist/progress.css +29 -21
- package/dist/progress.js +17 -10
- package/dist/radio.js +17 -7
- package/dist/scroll-area.css +10 -1
- package/dist/scroll-area.js +82 -25
- package/dist/select.css +45 -45
- package/dist/select.js +111 -70
- package/dist/slider.css +191 -191
- package/dist/slider.js +58 -46
- package/dist/switch.css +17 -17
- package/dist/switch.js +7 -6
- package/dist/tabs.css +3 -3
- package/dist/tabs.js +25 -15
- package/dist/textarea.css +26 -26
- package/dist/textarea.js +5 -4
- package/dist/toast.css +26 -26
- package/dist/toast.js +35 -23
- package/dist/tooltip.css +12 -12
- package/dist/tooltip.js +24 -16
- package/dist/unplugin-icons.js +38 -25
- package/dist/useCollapse.js +12 -7
- package/dist/useControlState.js +1 -1
- package/dist/useControllableValue.js +33 -0
- package/dist/useFloatingPosition.js +4 -1140
- package/dist/useFormControl.js +5 -29
- package/dist/useOverlayZIndex.js +1 -1
- package/dist/useRequiredInject.js +1 -1
- package/dist/utils/componentColors.d.ts +14 -1
- package/docs/public-composables-api.md +52 -0
- package/docs/public-styles-api.md +1 -1
- package/docs/public-tokens.md +648 -508
- package/package.json +49 -36
- package/src/styles/_mixins.scss +4 -0
- package/src/styles/_tokens.scss +460 -320
- package/src/styles/_variables.scss +1 -1
- package/src/styles/styles-manifest.json +1122 -2
- package/dist/button-link.css +0 -163
- /package/dist/{composables → internal/composables}/useOverlayLayer.d.ts +0 -0
package/dist/select.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import './select.css';
|
|
2
|
-
import { t as
|
|
3
|
-
import { t as bem } from "./bem.js";
|
|
2
|
+
import { t as useControllableValue } from "./useControllableValue.js";
|
|
4
3
|
import { n as useStylesApi, t as presence } from "./styles-api.js";
|
|
4
|
+
import { t as bem } from "./bem.js";
|
|
5
5
|
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
6
|
-
import {
|
|
6
|
+
import { t as x_default } from "./x.js";
|
|
7
|
+
import { i as useFormControl } from "./useFormControl.js";
|
|
7
8
|
import { t as useControlState } from "./useControlState.js";
|
|
9
|
+
import { n as getNextEnabledIndex, r as useTypeahead, t as getEnabledIndexes } from "./collectionNavigation.js";
|
|
8
10
|
import { t as scroll_area_default } from "./scroll-area.js";
|
|
9
|
-
import { VaporTransition, child, computed, createComponent, createFor, createIf, createInvoker, createSlot, createTemplateRefSetter, defineVaporComponent, delegateEvents, extend, markRaw, next, nextTick, on, onBeforeUnmount, onMounted, ref, renderEffect, setDynamicProps, setInsertionState, setProp, setText, setValue, template, toDisplayString, txt, unref, useId, watch, watchEffect, withModifiers, withVaporModifiers } from "vue";
|
|
11
|
+
import { VaporTransition, child, computed, createComponent, createFor, createIf, createInvoker, createSlot, createTemplateRefSetter, defineVaporComponent, delegateEvents, extend, markRaw, next, nextTick, on, onBeforeUnmount, onMounted, ref, renderEffect, setDynamicProps, setInsertionState, setProp, setText, setValue, shallowRef, template, toDisplayString, txt, unref, useId, watch, watchEffect, withModifiers, withVaporModifiers } from "vue";
|
|
10
12
|
//#region ~icons/lucide/chevrons-up-down
|
|
11
13
|
var t0$1 = template("<svg viewBox=\"0 0 24 24\"width=1.2em height=1.2em><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d=\"m7 15l5 5l5-5M7 9l5-5l5 5\">", 3, 1);
|
|
12
14
|
function render(_ctx) {
|
|
@@ -17,83 +19,101 @@ var chevrons_up_down_default = markRaw(defineVaporComponent({
|
|
|
17
19
|
render
|
|
18
20
|
}));
|
|
19
21
|
//#endregion
|
|
20
|
-
//#region src/composables/useClickOutside.ts
|
|
22
|
+
//#region src/internal/composables/useClickOutside.ts
|
|
23
|
+
function isEventInside(event, element) {
|
|
24
|
+
if (event.composedPath().includes(element)) return true;
|
|
25
|
+
const eventTarget = event.target;
|
|
26
|
+
const NodeConstructor = element.ownerDocument.defaultView?.Node;
|
|
27
|
+
return Boolean(eventTarget && NodeConstructor && eventTarget instanceof NodeConstructor && element.contains(eventTarget));
|
|
28
|
+
}
|
|
21
29
|
function useClickOutside(target, active, callback) {
|
|
22
|
-
|
|
30
|
+
const targets = Array.isArray(target) ? target : [target];
|
|
31
|
+
const listeningDocuments = /* @__PURE__ */ new Set();
|
|
23
32
|
let stopWatch;
|
|
24
|
-
function handler(
|
|
25
|
-
if (!
|
|
33
|
+
function handler(event) {
|
|
34
|
+
if (!targets.some((current) => {
|
|
35
|
+
const element = current.value;
|
|
36
|
+
return element ? isEventInside(event, element) : false;
|
|
37
|
+
})) callback(event);
|
|
26
38
|
}
|
|
27
|
-
function
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
39
|
+
function detachListeners() {
|
|
40
|
+
for (const document of listeningDocuments) document.removeEventListener("click", handler, true);
|
|
41
|
+
listeningDocuments.clear();
|
|
42
|
+
}
|
|
43
|
+
function syncListeners() {
|
|
44
|
+
detachListeners();
|
|
45
|
+
if (!active.value) return;
|
|
46
|
+
for (const current of targets) {
|
|
47
|
+
const document = current.value?.ownerDocument;
|
|
48
|
+
if (!document || listeningDocuments.has(document)) continue;
|
|
49
|
+
document.addEventListener("click", handler, true);
|
|
50
|
+
listeningDocuments.add(document);
|
|
51
|
+
}
|
|
32
52
|
}
|
|
33
53
|
onMounted(() => {
|
|
34
|
-
stopWatch = watch(active,
|
|
54
|
+
stopWatch = watch([active, ...targets], syncListeners, { immediate: true });
|
|
35
55
|
});
|
|
36
56
|
onBeforeUnmount(() => {
|
|
37
57
|
stopWatch?.();
|
|
38
|
-
|
|
58
|
+
detachListeners();
|
|
39
59
|
});
|
|
40
60
|
}
|
|
41
61
|
//#endregion
|
|
42
|
-
//#region src/composables/
|
|
43
|
-
function
|
|
44
|
-
const
|
|
62
|
+
//#region src/internal/composables/useCollectionNavigation.ts
|
|
63
|
+
function useCollectionNavigation(options) {
|
|
64
|
+
const activeKey = shallowRef(null);
|
|
65
|
+
const isDisabled = options.isDisabled ?? (() => false);
|
|
45
66
|
const loop = options.loop ?? true;
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
67
|
+
const activeIndex = computed(() => {
|
|
68
|
+
if (activeKey.value == null) return -1;
|
|
69
|
+
return options.items().findIndex((item) => options.getKey(item) === activeKey.value && !isDisabled(item));
|
|
70
|
+
});
|
|
71
|
+
const enabledIndexes = computed(() => getEnabledIndexes(options.items(), isDisabled));
|
|
72
|
+
function resetActive() {
|
|
73
|
+
activeKey.value = null;
|
|
49
74
|
}
|
|
50
|
-
function
|
|
51
|
-
const
|
|
52
|
-
if (
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
if (options.items()[index] && !options.items()[index]?.disabled) {
|
|
57
|
-
localFocusedIndex.value = index;
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
let next;
|
|
61
|
-
if (direction === 1) next = indexes.find((i) => i > index);
|
|
62
|
-
else for (let i = indexes.length - 1; i >= 0; i -= 1) {
|
|
63
|
-
const candidate = indexes[i];
|
|
64
|
-
if (candidate < index) {
|
|
65
|
-
next = candidate;
|
|
66
|
-
break;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
if (next !== void 0) localFocusedIndex.value = next;
|
|
70
|
-
else if (loop) localFocusedIndex.value = direction === 1 ? indexes[0] : indexes[indexes.length - 1];
|
|
75
|
+
function setActiveIndex(index) {
|
|
76
|
+
const item = options.items()[index];
|
|
77
|
+
if (!item || isDisabled(item)) return false;
|
|
78
|
+
activeKey.value = options.getKey(item);
|
|
79
|
+
return true;
|
|
71
80
|
}
|
|
72
81
|
function focusSelected() {
|
|
73
82
|
const items = options.items();
|
|
74
|
-
const selectedIndex = options.isSelected ? items.findIndex((item) => options.isSelected(item) && !item
|
|
75
|
-
if (selectedIndex >= 0)
|
|
83
|
+
const selectedIndex = options.isSelected ? items.findIndex((item) => options.isSelected(item) && !isDisabled(item)) : -1;
|
|
84
|
+
if (selectedIndex >= 0) setActiveIndex(selectedIndex);
|
|
76
85
|
else focusFirst();
|
|
77
86
|
}
|
|
78
87
|
function focusFirst() {
|
|
79
88
|
const first = enabledIndexes.value[0];
|
|
80
|
-
|
|
89
|
+
if (first === void 0) resetActive();
|
|
90
|
+
else setActiveIndex(first);
|
|
81
91
|
}
|
|
82
92
|
function focusLast() {
|
|
83
93
|
const indexes = enabledIndexes.value;
|
|
84
|
-
|
|
94
|
+
const last = indexes[indexes.length - 1];
|
|
95
|
+
if (last === void 0) resetActive();
|
|
96
|
+
else setActiveIndex(last);
|
|
85
97
|
}
|
|
86
|
-
function moveFocus(
|
|
87
|
-
if (
|
|
88
|
-
if (
|
|
98
|
+
function moveFocus(direction) {
|
|
99
|
+
if (activeIndex.value < 0) {
|
|
100
|
+
if (direction === 1) focusFirst();
|
|
89
101
|
else focusLast();
|
|
90
102
|
return;
|
|
91
103
|
}
|
|
92
|
-
|
|
104
|
+
const nextIndex = getNextEnabledIndex(options.items(), activeIndex.value, direction, isDisabled, loop);
|
|
105
|
+
if (nextIndex === void 0) resetActive();
|
|
106
|
+
else setActiveIndex(nextIndex);
|
|
93
107
|
}
|
|
108
|
+
watch(activeIndex, (index) => {
|
|
109
|
+
if (activeKey.value != null && index < 0) resetActive();
|
|
110
|
+
}, { flush: "sync" });
|
|
94
111
|
return {
|
|
95
|
-
|
|
96
|
-
|
|
112
|
+
activeKey,
|
|
113
|
+
activeIndex,
|
|
114
|
+
enabledIndexes,
|
|
115
|
+
resetActive,
|
|
116
|
+
setActiveIndex,
|
|
97
117
|
focusSelected,
|
|
98
118
|
focusFirst,
|
|
99
119
|
focusLast,
|
|
@@ -109,23 +129,38 @@ function getSelectDisplayLabel(options, value) {
|
|
|
109
129
|
if (!hasSelectValue(value)) return "";
|
|
110
130
|
return options?.find((option) => option.value === value)?.label ?? "";
|
|
111
131
|
}
|
|
112
|
-
function getSelectActiveDescendantId(baseId, focusedIndex) {
|
|
113
|
-
return focusedIndex < 0 ? void 0 : `${baseId}-option-${focusedIndex}`;
|
|
132
|
+
function getSelectActiveDescendantId(baseId, focusedIndex, isOpen) {
|
|
133
|
+
return !isOpen || focusedIndex < 0 ? void 0 : `${baseId}-option-${focusedIndex}`;
|
|
114
134
|
}
|
|
115
135
|
function useSelect(props, emitUpdate, getValue = () => props.modelValue ?? null, triggerRef = ref(null)) {
|
|
116
136
|
const selectRef = ref(null);
|
|
117
137
|
const isOpen = ref(false);
|
|
118
138
|
const selectId = useId();
|
|
119
|
-
const
|
|
139
|
+
const popupId = `${selectId}-popup`;
|
|
140
|
+
const listboxId = `${popupId}-viewport`;
|
|
120
141
|
const control = useControlState(props);
|
|
121
142
|
const visibleOptions = computed(() => props.options ?? []);
|
|
122
143
|
const value = computed(getValue);
|
|
123
|
-
const navigation =
|
|
144
|
+
const navigation = useCollectionNavigation({
|
|
124
145
|
items: () => visibleOptions.value,
|
|
146
|
+
getKey: (item) => item.value,
|
|
147
|
+
isDisabled: (item) => Boolean(item.disabled),
|
|
125
148
|
isSelected: (item) => item.value === value.value
|
|
126
149
|
});
|
|
127
|
-
const focusedIndex = navigation.
|
|
128
|
-
const
|
|
150
|
+
const focusedIndex = navigation.activeIndex;
|
|
151
|
+
const selectedIndex = computed(() => visibleOptions.value.findIndex((option) => option.value === value.value && !option.disabled));
|
|
152
|
+
const activeDescendantId = computed(() => getSelectActiveDescendantId(selectId, focusedIndex.value, isOpen.value));
|
|
153
|
+
const typeahead = useTypeahead({
|
|
154
|
+
items: () => visibleOptions.value,
|
|
155
|
+
activeIndex: () => isOpen.value ? focusedIndex.value : selectedIndex.value,
|
|
156
|
+
getKey: (item) => item.value,
|
|
157
|
+
getTextValue: (item) => item.label,
|
|
158
|
+
isDisabled: (item) => Boolean(item.disabled),
|
|
159
|
+
onMatch(item, index) {
|
|
160
|
+
if (isOpen.value) navigation.setActiveIndex(index);
|
|
161
|
+
else if (item.value !== value.value) emitUpdate(item.value);
|
|
162
|
+
}
|
|
163
|
+
});
|
|
129
164
|
const rootClass = computed(() => bem("rp-select", {
|
|
130
165
|
open: isOpen.value,
|
|
131
166
|
[`size-${props.size}`]: Boolean(props.size),
|
|
@@ -141,12 +176,14 @@ function useSelect(props, emitUpdate, getValue = () => props.modelValue ?? null,
|
|
|
141
176
|
}
|
|
142
177
|
function open() {
|
|
143
178
|
if (control.disabled || isOpen.value) return;
|
|
179
|
+
typeahead.reset();
|
|
144
180
|
isOpen.value = true;
|
|
145
181
|
navigation.focusSelected();
|
|
146
182
|
}
|
|
147
183
|
function close() {
|
|
148
184
|
isOpen.value = false;
|
|
149
|
-
navigation.
|
|
185
|
+
navigation.resetActive();
|
|
186
|
+
typeahead.reset();
|
|
150
187
|
}
|
|
151
188
|
function toggle() {
|
|
152
189
|
if (control.disabled) return;
|
|
@@ -168,7 +205,7 @@ function useSelect(props, emitUpdate, getValue = () => props.modelValue ?? null,
|
|
|
168
205
|
focusTrigger();
|
|
169
206
|
}
|
|
170
207
|
function onOptionMouseenter(option, index) {
|
|
171
|
-
if (!option.disabled)
|
|
208
|
+
if (!option.disabled) navigation.setActiveIndex(index);
|
|
172
209
|
}
|
|
173
210
|
function onFocusout(event) {
|
|
174
211
|
const nextTarget = event.relatedTarget;
|
|
@@ -181,6 +218,7 @@ function useSelect(props, emitUpdate, getValue = () => props.modelValue ?? null,
|
|
|
181
218
|
}
|
|
182
219
|
function onTriggerKeydown(e) {
|
|
183
220
|
if (control.disabled) return;
|
|
221
|
+
if (typeahead.handleKey(e)) return;
|
|
184
222
|
switch (e.key) {
|
|
185
223
|
case "Enter":
|
|
186
224
|
e.preventDefault();
|
|
@@ -243,6 +281,7 @@ function useSelect(props, emitUpdate, getValue = () => props.modelValue ?? null,
|
|
|
243
281
|
triggerRef,
|
|
244
282
|
isOpen,
|
|
245
283
|
selectId,
|
|
284
|
+
popupId,
|
|
246
285
|
listboxId,
|
|
247
286
|
control,
|
|
248
287
|
visibleOptions,
|
|
@@ -357,12 +396,12 @@ function useSelectNativeControl(props, emitUpdate, triggerRef) {
|
|
|
357
396
|
}
|
|
358
397
|
//#endregion
|
|
359
398
|
//#region src/components/select/select.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
360
|
-
var t0 = template("<option data-v-
|
|
361
|
-
var t1 = template("<button data-v-
|
|
399
|
+
var t0 = template("<option data-v-7eb8ed79> ");
|
|
400
|
+
var t1 = template("<button data-v-7eb8ed79></button>");
|
|
362
401
|
var t2 = template("No options", 2);
|
|
363
|
-
var t3 = template("<div data-v-
|
|
364
|
-
var t4 = template("<div data-v-
|
|
365
|
-
var t5 = template("<div data-v-
|
|
402
|
+
var t3 = template("<div data-v-7eb8ed79>");
|
|
403
|
+
var t4 = template("<div data-v-7eb8ed79> ");
|
|
404
|
+
var t5 = template("<div data-v-7eb8ed79><select data-v-7eb8ed79><option data-v-7eb8ed79 value></option></select><div data-v-7eb8ed79><span data-v-7eb8ed79> </span><span data-v-7eb8ed79><span data-v-7eb8ed79 class=rp-select__arrow aria-hidden=true>", 1);
|
|
366
405
|
delegateEvents("mousedown", "click", "keydown");
|
|
367
406
|
//#endregion
|
|
368
407
|
//#region src/components/select/select.vue
|
|
@@ -411,7 +450,7 @@ var select_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
411
450
|
const emit = __emit;
|
|
412
451
|
const triggerRef = ref(null);
|
|
413
452
|
const { nativeSelectRef, selectedValue, nativeInputAttrs, requestValueUpdate } = useSelectNativeControl(props, (value) => emit("update:modelValue", value), triggerRef);
|
|
414
|
-
const { selectRef, isOpen, selectId, listboxId, control, visibleOptions, focusedIndex, activeDescendantId, rootClass, hasValue, displayLabel, canClear, toggle, selectOption, clearSelection, onOptionMouseenter, onFocusout, onTriggerKeydown } = useSelect(props, requestValueUpdate, () => selectedValue.value, triggerRef);
|
|
453
|
+
const { selectRef, isOpen, selectId, popupId, listboxId, control, visibleOptions, focusedIndex, activeDescendantId, rootClass, hasValue, displayLabel, canClear, toggle, selectOption, clearSelection, onOptionMouseenter, onFocusout, onTriggerKeydown } = useSelect(props, requestValueUpdate, () => selectedValue.value, triggerRef);
|
|
415
454
|
const { getPartAttrs, getRootAttrs } = useStylesApi(props, "root");
|
|
416
455
|
const rootAttrs = computed(() => getRootAttrs({
|
|
417
456
|
class: rootClass.value,
|
|
@@ -514,12 +553,14 @@ var select_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
514
553
|
createComponent(VaporTransition, { name: "rp-select-dropdown" }, extend(() => {
|
|
515
554
|
return createIf(() => unref(isOpen), () => {
|
|
516
555
|
return createComponent(scroll_area_default, { $: [() => unref(getPartAttrs)("content", { class: "rp-select__dropdown" }), {
|
|
517
|
-
|
|
518
|
-
id: () => unref(listboxId),
|
|
556
|
+
id: () => unref(popupId),
|
|
519
557
|
embedded: "",
|
|
520
558
|
type: "auto",
|
|
521
559
|
scrollbars: "y",
|
|
522
|
-
"viewport-attrs": () => ({
|
|
560
|
+
"viewport-attrs": () => ({
|
|
561
|
+
role: "listbox",
|
|
562
|
+
tabindex: -1
|
|
563
|
+
}),
|
|
523
564
|
"data-state": () => unref(isOpen) ? "open" : "closed"
|
|
524
565
|
}] }, extend(() => {
|
|
525
566
|
return [createIf(() => unref(visibleOptions).length === 0, () => {
|
|
@@ -566,7 +607,7 @@ var select_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
566
607
|
_setTemplateRef(n26, selectRef, null, "selectRef");
|
|
567
608
|
return n26;
|
|
568
609
|
}
|
|
569
|
-
}), [["__scopeId", "data-v-
|
|
610
|
+
}), [["__scopeId", "data-v-7eb8ed79"]]);
|
|
570
611
|
//#endregion
|
|
571
612
|
//#region src/components/select/types.ts
|
|
572
613
|
var selectParts = [
|