@rio-m3e/vue 0.4.0 → 0.6.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/NOTICE +6 -0
- package/dist/button/Button.vue.d.ts +3 -2
- package/dist/button/Button.vue.js +14 -8
- package/dist/checkbox/Checkbox.vue.d.ts +1 -0
- package/dist/checkbox/Checkbox.vue.js +8 -11
- package/dist/chip/AssistChip.vue.d.ts +25 -0
- package/dist/chip/AssistChip.vue.js +50 -0
- package/dist/chip/ChipSet.vue.d.ts +23 -0
- package/dist/chip/ChipSet.vue.js +53 -0
- package/dist/chip/FilterChip.vue.d.ts +33 -0
- package/dist/chip/FilterChip.vue.js +68 -0
- package/dist/chip/InputChip.vue.d.ts +37 -0
- package/dist/chip/InputChip.vue.js +82 -0
- package/dist/chip/SuggestionChip.vue.d.ts +24 -0
- package/dist/chip/SuggestionChip.vue.js +50 -0
- package/dist/chip/context.js +17 -0
- package/dist/corner-morph/corner-morph.js +19 -0
- package/dist/date-picker/DatePicker.vue.d.ts +67 -0
- package/dist/date-picker/DatePicker.vue.js +239 -0
- package/dist/date-picker/DatePickerCalendar.vue.js +146 -0
- package/dist/date-picker/DatePickerDialog.vue.d.ts +58 -0
- package/dist/date-picker/DatePickerDialog.vue.js +191 -0
- package/dist/date-picker/DateRangeCalendar.vue.js +89 -0
- package/dist/date-picker/DateRangePickerDialog.vue.d.ts +56 -0
- package/dist/date-picker/DateRangePickerDialog.vue.js +208 -0
- package/dist/dialog/Dialog.vue.js +12 -13
- package/dist/icon-button/IconButton.vue.d.ts +3 -2
- package/dist/icon-button/IconButton.vue.js +10 -4
- package/dist/index.d.ts +41 -17
- package/dist/index.js +41 -17
- package/dist/list/List.vue.d.ts +23 -0
- package/dist/list/List.vue.js +61 -0
- package/dist/list/ListItem.vue.d.ts +49 -0
- package/dist/list/ListItem.vue.js +106 -0
- package/dist/list/context.js +12 -0
- package/dist/loading-indicator/LoadingIndicator.vue.d.ts +5 -0
- package/dist/loading-indicator/LoadingIndicator.vue.js +45 -0
- package/dist/locale/LocaleProvider.vue.d.ts +16 -0
- package/dist/locale/LocaleProvider.vue.js +14 -0
- package/dist/locale/locale.d.ts +16 -0
- package/dist/locale/locale.js +27 -0
- package/dist/menu/Menu.vue.js +9 -4
- package/dist/menu/SubMenu.vue.js +36 -17
- package/dist/overlay/presses.js +9 -0
- package/dist/progress/CircularProgress.vue.d.ts +5 -0
- package/dist/progress/CircularProgress.vue.js +54 -0
- package/dist/progress/LinearProgress.vue.d.ts +4 -0
- package/dist/progress/LinearProgress.vue.js +62 -0
- package/dist/radio/Radio.vue.d.ts +3 -2
- package/dist/radio/Radio.vue.js +17 -16
- package/dist/rio/rio.d.ts +32 -0
- package/dist/rio/rio.js +32 -0
- package/dist/ripple/ripple.js +14 -1
- package/dist/scroll-field/ScrollField.vue.d.ts +19 -0
- package/dist/scroll-field/ScrollField.vue.js +121 -0
- package/dist/select/Select.vue.d.ts +46 -0
- package/dist/select/Select.vue.js +179 -0
- package/dist/select/SelectOption.vue.d.ts +30 -0
- package/dist/select/SelectOption.vue.js +58 -0
- package/dist/select/context.js +3 -0
- package/dist/slider/RangeSlider.vue.d.ts +17 -0
- package/dist/slider/RangeSlider.vue.js +92 -0
- package/dist/slider/Slider.vue.d.ts +25 -0
- package/dist/slider/Slider.vue.js +102 -0
- package/dist/split-button/SplitButton.vue.d.ts +3 -2
- package/dist/split-button/SplitButton.vue.js +4 -3
- package/dist/switch/Switch.vue.js +33 -8
- package/dist/text-field/TextField.vue.js +8 -11
- package/dist/time-picker/TimeInput.vue.d.ts +26 -0
- package/dist/time-picker/TimeInput.vue.js +73 -0
- package/dist/time-picker/TimePickerBody.vue.js +72 -0
- package/dist/time-picker/TimePickerDialog.vue.d.ts +51 -0
- package/dist/time-picker/TimePickerDialog.vue.js +137 -0
- package/dist/time-picker/TimeScroll.vue.d.ts +38 -0
- package/dist/time-picker/TimeScroll.vue.js +81 -0
- package/dist/tooltip/Tooltip.vue.js +10 -22
- package/package.json +4 -4
- package/dist/shape-morph/shape-morph.js +0 -18
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { useButtonGroupItem } from "../button-group/context.js";
|
|
2
2
|
import { vRipple } from "../ripple/ripple.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { vCornerMorph } from "../corner-morph/corner-morph.js";
|
|
4
|
+
import { createBlock, createElementVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderSlot, resolveDynamicComponent, unref, useSlots, withCtx, withDirectives } from "vue";
|
|
5
5
|
import { createIconButton } from "@rio-m3e/core";
|
|
6
6
|
import "@rio-m3e/styles/base/focus-ring.css";
|
|
7
7
|
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
8
8
|
import "@rio-m3e/styles/base/state-layer.css";
|
|
9
|
+
import "@rio-m3e/styles/base/touch-target.css";
|
|
9
10
|
import "@rio-m3e/styles/button.css";
|
|
10
11
|
import "@rio-m3e/styles/icon-button.css";
|
|
11
12
|
// src/icon-button/IconButton.vue
|
|
@@ -22,6 +23,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
22
23
|
disabled: { type: Boolean },
|
|
23
24
|
softDisabled: { type: Boolean },
|
|
24
25
|
type: {},
|
|
26
|
+
href: {},
|
|
25
27
|
value: {}
|
|
26
28
|
},
|
|
27
29
|
emits: ["click", "update:selected"],
|
|
@@ -39,7 +41,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
39
41
|
disabled: __props.disabled,
|
|
40
42
|
softDisabled: __props.softDisabled,
|
|
41
43
|
type: __props.type,
|
|
42
|
-
value: __props.value
|
|
44
|
+
value: __props.value,
|
|
45
|
+
href: __props.href
|
|
43
46
|
}), (next) => emit("update:selected", next));
|
|
44
47
|
const button = createIconButton({
|
|
45
48
|
props: item.props,
|
|
@@ -48,7 +51,10 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
48
51
|
onChange: item.onChange
|
|
49
52
|
});
|
|
50
53
|
return (_ctx, _cache) => {
|
|
51
|
-
return withDirectives((openBlock(),
|
|
54
|
+
return withDirectives((openBlock(), createBlock(resolveDynamicComponent(unref(button).isLink() ? "a" : "button"), mergeProps(unref(button).parts.root(), { onClick: unref(button).handleClick }), {
|
|
55
|
+
default: withCtx(() => [createElementVNode("span", normalizeProps(guardReactiveProps(unref(button).parts.touch())), null, 16), createElementVNode("span", normalizeProps(guardReactiveProps(unref(button).parts.icon())), [unref(button).showsSelectedIcon() ? renderSlot(_ctx.$slots, "selected-icon", {}, void 0, void 0, 0) : renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 1)], 16)]),
|
|
56
|
+
_: 3
|
|
57
|
+
}, 16, ["onClick"])), [[unref(vRipple)], [unref(vCornerMorph)]]);
|
|
52
58
|
};
|
|
53
59
|
}
|
|
54
60
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,42 @@
|
|
|
1
|
-
import _default from "./button/Button.vue.js";
|
|
2
|
-
import _default$
|
|
3
|
-
import _default$
|
|
4
|
-
import _default
|
|
5
|
-
import _default$4 from "./
|
|
6
|
-
import _default$
|
|
7
|
-
import _default$
|
|
8
|
-
import _default$
|
|
9
|
-
import _default$
|
|
10
|
-
import _default$
|
|
11
|
-
import _default$
|
|
12
|
-
import _default$
|
|
1
|
+
import _default$1 from "./button/Button.vue.js";
|
|
2
|
+
import _default$2 from "./button-group/ButtonGroup.vue.js";
|
|
3
|
+
import _default$3 from "./checkbox/Checkbox.vue.js";
|
|
4
|
+
import _default from "./chip/AssistChip.vue.js";
|
|
5
|
+
import _default$4 from "./chip/ChipSet.vue.js";
|
|
6
|
+
import _default$10 from "./chip/FilterChip.vue.js";
|
|
7
|
+
import _default$12 from "./chip/InputChip.vue.js";
|
|
8
|
+
import _default$31 from "./chip/SuggestionChip.vue.js";
|
|
9
|
+
import _default$6 from "./date-picker/DatePicker.vue.js";
|
|
10
|
+
import _default$7 from "./date-picker/DatePickerDialog.vue.js";
|
|
11
|
+
import _default$8 from "./date-picker/DateRangePickerDialog.vue.js";
|
|
12
|
+
import _default$9 from "./dialog/Dialog.vue.js";
|
|
13
|
+
import _default$11 from "./icon-button/IconButton.vue.js";
|
|
14
|
+
import { localeKey, messagesKey, useLocale, useMessages } from "./locale/locale.js";
|
|
15
|
+
import { RioOptions, RioPlugin, RioThemeOptions, createRio } from "./rio/rio.js";
|
|
16
|
+
import _default$14 from "./list/List.vue.js";
|
|
17
|
+
import _default$15 from "./list/ListItem.vue.js";
|
|
18
|
+
import _default$17 from "./locale/LocaleProvider.vue.js";
|
|
19
|
+
import _default$16 from "./loading-indicator/LoadingIndicator.vue.js";
|
|
20
|
+
import _default$18 from "./menu/Menu.vue.js";
|
|
21
|
+
import _default$19 from "./menu/MenuDivider.vue.js";
|
|
22
|
+
import _default$20 from "./menu/MenuGroup.vue.js";
|
|
23
|
+
import _default$21 from "./menu/MenuItem.vue.js";
|
|
24
|
+
import _default$30 from "./menu/SubMenu.vue.js";
|
|
25
|
+
import _default$5 from "./progress/CircularProgress.vue.js";
|
|
26
|
+
import _default$13 from "./progress/LinearProgress.vue.js";
|
|
27
|
+
import _default$22 from "./radio/Radio.vue.js";
|
|
28
|
+
import _default$23 from "./radio/RadioGroup.vue.js";
|
|
13
29
|
import { vRipple } from "./ripple/ripple.js";
|
|
14
|
-
import _default$
|
|
15
|
-
import _default$
|
|
16
|
-
import _default$
|
|
17
|
-
import _default$
|
|
18
|
-
|
|
30
|
+
import _default$25 from "./scroll-field/ScrollField.vue.js";
|
|
31
|
+
import _default$26 from "./select/Select.vue.js";
|
|
32
|
+
import _default$27 from "./select/SelectOption.vue.js";
|
|
33
|
+
import _default$24 from "./slider/RangeSlider.vue.js";
|
|
34
|
+
import _default$28 from "./slider/Slider.vue.js";
|
|
35
|
+
import _default$29 from "./split-button/SplitButton.vue.js";
|
|
36
|
+
import _default$32 from "./switch/Switch.vue.js";
|
|
37
|
+
import _default$33 from "./text-field/TextField.vue.js";
|
|
38
|
+
import _default$34 from "./time-picker/TimeInput.vue.js";
|
|
39
|
+
import _default$35 from "./time-picker/TimePickerDialog.vue.js";
|
|
40
|
+
import _default$36 from "./time-picker/TimeScroll.vue.js";
|
|
41
|
+
import _default$37 from "./tooltip/Tooltip.vue.js";
|
|
42
|
+
export { _default as RioAssistChip, _default$1 as RioButton, _default$2 as RioButtonGroup, _default$3 as RioCheckbox, _default$4 as RioChipSet, _default$5 as RioCircularProgress, _default$6 as RioDatePicker, _default$7 as RioDatePickerDialog, _default$8 as RioDateRangePickerDialog, _default$9 as RioDialog, _default$10 as RioFilterChip, _default$11 as RioIconButton, _default$12 as RioInputChip, _default$13 as RioLinearProgress, _default$14 as RioList, _default$15 as RioListItem, _default$16 as RioLoadingIndicator, _default$17 as RioLocaleProvider, _default$18 as RioMenu, _default$19 as RioMenuDivider, _default$20 as RioMenuGroup, _default$21 as RioMenuItem, type RioOptions, type RioPlugin, _default$22 as RioRadio, _default$23 as RioRadioGroup, _default$24 as RioRangeSlider, _default$25 as RioScrollField, _default$26 as RioSelect, _default$27 as RioSelectOption, _default$28 as RioSlider, _default$29 as RioSplitButton, _default$30 as RioSubMenu, _default$31 as RioSuggestionChip, _default$32 as RioSwitch, _default$33 as RioTextField, type RioThemeOptions, _default$34 as RioTimeInput, _default$35 as RioTimePickerDialog, _default$36 as RioTimeScroll, _default$37 as RioTooltip, createRio, localeKey, messagesKey, useLocale, useMessages, vRipple };
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,42 @@
|
|
|
1
|
-
import _sfc_main from "./button/Button.vue.js";
|
|
2
|
-
import _sfc_main$
|
|
3
|
-
import _sfc_main$
|
|
4
|
-
import _sfc_main
|
|
5
|
-
import _sfc_main$4 from "./
|
|
6
|
-
import _sfc_main$
|
|
7
|
-
import _sfc_main$
|
|
8
|
-
import _sfc_main$
|
|
9
|
-
import _sfc_main$
|
|
10
|
-
import _sfc_main$
|
|
11
|
-
import _sfc_main$
|
|
12
|
-
import _sfc_main$
|
|
1
|
+
import _sfc_main$1 from "./button/Button.vue.js";
|
|
2
|
+
import _sfc_main$2 from "./button-group/ButtonGroup.vue.js";
|
|
3
|
+
import _sfc_main$3 from "./checkbox/Checkbox.vue.js";
|
|
4
|
+
import _sfc_main from "./chip/AssistChip.vue.js";
|
|
5
|
+
import _sfc_main$4 from "./chip/ChipSet.vue.js";
|
|
6
|
+
import _sfc_main$10 from "./chip/FilterChip.vue.js";
|
|
7
|
+
import _sfc_main$12 from "./chip/InputChip.vue.js";
|
|
8
|
+
import _sfc_main$31 from "./chip/SuggestionChip.vue.js";
|
|
9
|
+
import _sfc_main$6 from "./date-picker/DatePicker.vue.js";
|
|
10
|
+
import _sfc_main$7 from "./date-picker/DatePickerDialog.vue.js";
|
|
11
|
+
import _sfc_main$8 from "./date-picker/DateRangePickerDialog.vue.js";
|
|
12
|
+
import _sfc_main$9 from "./dialog/Dialog.vue.js";
|
|
13
|
+
import _sfc_main$11 from "./icon-button/IconButton.vue.js";
|
|
14
|
+
import { localeKey, messagesKey, useLocale, useMessages } from "./locale/locale.js";
|
|
15
|
+
import { createRio } from "./rio/rio.js";
|
|
16
|
+
import _sfc_main$14 from "./list/List.vue.js";
|
|
17
|
+
import _sfc_main$15 from "./list/ListItem.vue.js";
|
|
18
|
+
import _sfc_main$17 from "./locale/LocaleProvider.vue.js";
|
|
19
|
+
import _sfc_main$16 from "./loading-indicator/LoadingIndicator.vue.js";
|
|
20
|
+
import _sfc_main$18 from "./menu/Menu.vue.js";
|
|
21
|
+
import _sfc_main$19 from "./menu/MenuDivider.vue.js";
|
|
22
|
+
import _sfc_main$20 from "./menu/MenuGroup.vue.js";
|
|
23
|
+
import _sfc_main$21 from "./menu/MenuItem.vue.js";
|
|
24
|
+
import _sfc_main$30 from "./menu/SubMenu.vue.js";
|
|
25
|
+
import _sfc_main$5 from "./progress/CircularProgress.vue.js";
|
|
26
|
+
import _sfc_main$13 from "./progress/LinearProgress.vue.js";
|
|
27
|
+
import _sfc_main$22 from "./radio/Radio.vue.js";
|
|
28
|
+
import _sfc_main$23 from "./radio/RadioGroup.vue.js";
|
|
13
29
|
import { vRipple } from "./ripple/ripple.js";
|
|
14
|
-
import _sfc_main$
|
|
15
|
-
import _sfc_main$
|
|
16
|
-
import _sfc_main$
|
|
17
|
-
import _sfc_main$
|
|
18
|
-
|
|
30
|
+
import _sfc_main$25 from "./scroll-field/ScrollField.vue.js";
|
|
31
|
+
import _sfc_main$26 from "./select/Select.vue.js";
|
|
32
|
+
import _sfc_main$27 from "./select/SelectOption.vue.js";
|
|
33
|
+
import _sfc_main$24 from "./slider/RangeSlider.vue.js";
|
|
34
|
+
import _sfc_main$28 from "./slider/Slider.vue.js";
|
|
35
|
+
import _sfc_main$29 from "./split-button/SplitButton.vue.js";
|
|
36
|
+
import _sfc_main$32 from "./switch/Switch.vue.js";
|
|
37
|
+
import _sfc_main$33 from "./text-field/TextField.vue.js";
|
|
38
|
+
import _sfc_main$34 from "./time-picker/TimeInput.vue.js";
|
|
39
|
+
import _sfc_main$35 from "./time-picker/TimePickerDialog.vue.js";
|
|
40
|
+
import _sfc_main$36 from "./time-picker/TimeScroll.vue.js";
|
|
41
|
+
import _sfc_main$37 from "./tooltip/Tooltip.vue.js";
|
|
42
|
+
export { _sfc_main as RioAssistChip, _sfc_main$1 as RioButton, _sfc_main$2 as RioButtonGroup, _sfc_main$3 as RioCheckbox, _sfc_main$4 as RioChipSet, _sfc_main$5 as RioCircularProgress, _sfc_main$6 as RioDatePicker, _sfc_main$7 as RioDatePickerDialog, _sfc_main$8 as RioDateRangePickerDialog, _sfc_main$9 as RioDialog, _sfc_main$10 as RioFilterChip, _sfc_main$11 as RioIconButton, _sfc_main$12 as RioInputChip, _sfc_main$13 as RioLinearProgress, _sfc_main$14 as RioList, _sfc_main$15 as RioListItem, _sfc_main$16 as RioLoadingIndicator, _sfc_main$17 as RioLocaleProvider, _sfc_main$18 as RioMenu, _sfc_main$19 as RioMenuDivider, _sfc_main$20 as RioMenuGroup, _sfc_main$21 as RioMenuItem, _sfc_main$22 as RioRadio, _sfc_main$23 as RioRadioGroup, _sfc_main$24 as RioRangeSlider, _sfc_main$25 as RioScrollField, _sfc_main$26 as RioSelect, _sfc_main$27 as RioSelectOption, _sfc_main$28 as RioSlider, _sfc_main$29 as RioSplitButton, _sfc_main$30 as RioSubMenu, _sfc_main$31 as RioSuggestionChip, _sfc_main$32 as RioSwitch, _sfc_main$33 as RioTextField, _sfc_main$34 as RioTimeInput, _sfc_main$35 as RioTimePickerDialog, _sfc_main$36 as RioTimeScroll, _sfc_main$37 as RioTooltip, createRio, localeKey, messagesKey, useLocale, useMessages, vRipple };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ListProps, ListSelected } from "@rio-m3e/core";
|
|
2
|
+
import "@rio-m3e/styles/list.css";
|
|
3
|
+
interface Props extends Omit<ListProps, 'selected'> {
|
|
4
|
+
/** The selected value (`single`) or values (`multiple`), with `v-model`. */
|
|
5
|
+
modelValue?: ListSelected;
|
|
6
|
+
}
|
|
7
|
+
type __VLS_Slots = {
|
|
8
|
+
/** The items (`RioListItem`). With `selection`, those with a `value` are chosen. */
|
|
9
|
+
default?: () => unknown;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
"update:modelValue": (selected: ListSelected) => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
14
|
+
"onUpdate:modelValue"?: ((selected: ListSelected) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export { _default as default };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { listKey } from "./context.js";
|
|
2
|
+
import { createElementBlock, defineComponent, mergeProps, onBeforeUnmount, onMounted, onUpdated, openBlock, provide, ref, renderSlot, unref, useTemplateRef } from "vue";
|
|
3
|
+
import { attachList, createList } from "@rio-m3e/core";
|
|
4
|
+
import "@rio-m3e/styles/list.css";
|
|
5
|
+
// src/list/List.vue
|
|
6
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
7
|
+
__name: "List",
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: {},
|
|
10
|
+
variant: {},
|
|
11
|
+
selection: {},
|
|
12
|
+
required: { type: Boolean },
|
|
13
|
+
control: {},
|
|
14
|
+
controlPosition: {},
|
|
15
|
+
label: {}
|
|
16
|
+
},
|
|
17
|
+
emits: ["update:modelValue"],
|
|
18
|
+
setup(__props, { emit: __emit }) {
|
|
19
|
+
const emit = __emit;
|
|
20
|
+
/** The key of the item the list's tab stop is on, as `attachList` reports it */
|
|
21
|
+
const tabStop = ref();
|
|
22
|
+
const list = createList({
|
|
23
|
+
props: () => ({
|
|
24
|
+
variant: __props.variant,
|
|
25
|
+
selection: __props.selection,
|
|
26
|
+
required: __props.required,
|
|
27
|
+
control: __props.control,
|
|
28
|
+
controlPosition: __props.controlPosition,
|
|
29
|
+
label: __props.label,
|
|
30
|
+
selected: __props.modelValue
|
|
31
|
+
}),
|
|
32
|
+
tabStop: () => tabStop.value,
|
|
33
|
+
onChange: (selected) => emit("update:modelValue", selected)
|
|
34
|
+
});
|
|
35
|
+
provide(listKey, {
|
|
36
|
+
selection: list.selection,
|
|
37
|
+
control: list.control,
|
|
38
|
+
controlPosition: list.controlPosition,
|
|
39
|
+
isSelected: list.isSelected,
|
|
40
|
+
toggle: list.toggle,
|
|
41
|
+
isTabStop: list.isTabStop
|
|
42
|
+
});
|
|
43
|
+
const root = useTemplateRef("root");
|
|
44
|
+
let handle;
|
|
45
|
+
onMounted(() => {
|
|
46
|
+
handle = attachList(root.value, {
|
|
47
|
+
tabStop: () => tabStop.value,
|
|
48
|
+
onTabStopChange: (key) => tabStop.value = key
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
onUpdated(() => handle?.sync());
|
|
52
|
+
onBeforeUnmount(() => handle?.detach());
|
|
53
|
+
return (_ctx, _cache) => {
|
|
54
|
+
return openBlock(), createElementBlock("ul", mergeProps({
|
|
55
|
+
ref_key: "root",
|
|
56
|
+
ref: root
|
|
57
|
+
}, unref(list).parts.root()), [renderSlot(_ctx.$slots, "default")], 16);
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ListValue } from "@rio-m3e/core";
|
|
2
|
+
import "@rio-m3e/styles/base/focus-ring.css";
|
|
3
|
+
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
4
|
+
import "@rio-m3e/styles/list.css";
|
|
5
|
+
type __VLS_Props = {
|
|
6
|
+
/** Identifies the item in a list with `selection`. */
|
|
7
|
+
value?: ListValue;
|
|
8
|
+
/** Makes the item a link to this address. */
|
|
9
|
+
href?: string;
|
|
10
|
+
/** Disabled items stay focusable among the list's items, and nothing they do happens. */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/** Listening for clicks makes the item a button. */
|
|
13
|
+
onClick?: (event: MouseEvent) => void;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_Slots = {
|
|
16
|
+
/** The label */
|
|
17
|
+
default?: () => unknown;
|
|
18
|
+
/** Above the label */
|
|
19
|
+
overline?: () => unknown;
|
|
20
|
+
/** Under the label */
|
|
21
|
+
supporting?: () => unknown;
|
|
22
|
+
/**
|
|
23
|
+
* Before the text: an icon, an avatar, an image, or a selection control. In a list with
|
|
24
|
+
* `selection`, it takes neither presses nor the focus, and in place of the list's control, when
|
|
25
|
+
* `controlPosition` is `leading`: bind `selected` to a checkbox, a radio button, or a switch
|
|
26
|
+
* there, to show the item's state.
|
|
27
|
+
*/
|
|
28
|
+
leading?: (props: {
|
|
29
|
+
selected: boolean;
|
|
30
|
+
disabled: boolean;
|
|
31
|
+
}) => unknown;
|
|
32
|
+
/**
|
|
33
|
+
* After the text: trailing text, an icon, a selection control, or in an action item, buttons. In
|
|
34
|
+
* a list with `selection`, as `leading`, in place of the list's control by default.
|
|
35
|
+
*/
|
|
36
|
+
trailing?: (props: {
|
|
37
|
+
selected: boolean;
|
|
38
|
+
disabled: boolean;
|
|
39
|
+
}) => unknown;
|
|
40
|
+
};
|
|
41
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
42
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
43
|
+
declare const _default: typeof __VLS_export;
|
|
44
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
45
|
+
new (): {
|
|
46
|
+
$slots: S;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export { _default as default };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import _sfc_main$1 from "../checkbox/Checkbox.vue.js";
|
|
2
|
+
import { vCornerMorph } from "../corner-morph/corner-morph.js";
|
|
3
|
+
import _sfc_main$2 from "../radio/Radio.vue.js";
|
|
4
|
+
import { useRipple } from "../ripple/ripple.js";
|
|
5
|
+
import _sfc_main$3 from "../switch/Switch.vue.js";
|
|
6
|
+
import { listKey, noList } from "./context.js";
|
|
7
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, guardReactiveProps, inject, mergeProps, normalizeProps, onBeforeUnmount, onMounted, onUpdated, openBlock, ref, renderSlot, resolveDynamicComponent, unref, useAttrs, useId, useSlots, useTemplateRef, withCtx, withDirectives } from "vue";
|
|
8
|
+
import { attachListItem, createListItem } from "@rio-m3e/core";
|
|
9
|
+
import "@rio-m3e/styles/base/focus-ring.css";
|
|
10
|
+
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
11
|
+
import "@rio-m3e/styles/list.css";
|
|
12
|
+
// src/list/ListItem.vue
|
|
13
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
14
|
+
inheritAttrs: false,
|
|
15
|
+
__name: "ListItem",
|
|
16
|
+
props: {
|
|
17
|
+
value: {},
|
|
18
|
+
href: {},
|
|
19
|
+
disabled: { type: Boolean },
|
|
20
|
+
onClick: { type: Function }
|
|
21
|
+
},
|
|
22
|
+
setup(__props) {
|
|
23
|
+
const props = __props;
|
|
24
|
+
const slots = useSlots();
|
|
25
|
+
const attrs = useAttrs();
|
|
26
|
+
const rest = computed(() => {
|
|
27
|
+
const { class: _class, style: _style, ...others } = attrs;
|
|
28
|
+
return others;
|
|
29
|
+
});
|
|
30
|
+
const list = inject(listKey, noList);
|
|
31
|
+
const multiline = ref(false);
|
|
32
|
+
const item = createListItem({
|
|
33
|
+
props: () => ({
|
|
34
|
+
value: props.value,
|
|
35
|
+
href: props.href,
|
|
36
|
+
action: !!props.onClick,
|
|
37
|
+
disabled: props.disabled
|
|
38
|
+
}),
|
|
39
|
+
list: () => list,
|
|
40
|
+
key: useId(),
|
|
41
|
+
content: () => ({
|
|
42
|
+
leading: !!slots.leading,
|
|
43
|
+
overline: !!slots.overline,
|
|
44
|
+
supporting: !!slots.supporting,
|
|
45
|
+
trailing: !!slots.trailing
|
|
46
|
+
}),
|
|
47
|
+
multiline: () => multiline.value
|
|
48
|
+
});
|
|
49
|
+
const slotProps = computed(() => ({
|
|
50
|
+
selected: item.selected(),
|
|
51
|
+
disabled: !!props.disabled
|
|
52
|
+
}));
|
|
53
|
+
const controls = {
|
|
54
|
+
checkbox: _sfc_main$1,
|
|
55
|
+
radio: _sfc_main$2,
|
|
56
|
+
switch: _sfc_main$3
|
|
57
|
+
};
|
|
58
|
+
const leadingControl = computed(() => item.controlIn("leading"));
|
|
59
|
+
const trailingControl = computed(() => item.controlIn("trailing"));
|
|
60
|
+
const onClick = (event) => {
|
|
61
|
+
if (item.handleClick(event)) props.onClick?.(event);
|
|
62
|
+
};
|
|
63
|
+
const root = useTemplateRef("root");
|
|
64
|
+
const action = useTemplateRef("action");
|
|
65
|
+
const pressed = computed(() => item.kind() === "option" ? root.value : item.acts() ? action.value : null);
|
|
66
|
+
useRipple(pressed, root);
|
|
67
|
+
let handle;
|
|
68
|
+
onMounted(() => {
|
|
69
|
+
handle = attachListItem(root.value, { onMultilineChange: (next) => multiline.value = next });
|
|
70
|
+
});
|
|
71
|
+
onUpdated(() => handle?.sync());
|
|
72
|
+
onBeforeUnmount(() => handle?.detach());
|
|
73
|
+
return (_ctx, _cache) => {
|
|
74
|
+
return withDirectives((openBlock(), createElementBlock("li", mergeProps({
|
|
75
|
+
ref_key: "root",
|
|
76
|
+
ref: root
|
|
77
|
+
}, {
|
|
78
|
+
...unref(item).parts.root(),
|
|
79
|
+
...unref(item).acts() ? {} : rest.value
|
|
80
|
+
}, {
|
|
81
|
+
class: unref(attrs).class,
|
|
82
|
+
style: unref(attrs).style,
|
|
83
|
+
onClick: _cache[0] || (_cache[0] = ($event) => unref(item).kind() === "option" ? onClick($event) : void 0)
|
|
84
|
+
}), [unref(item).acts() ? (openBlock(), createBlock(resolveDynamicComponent(unref(item).kind() === "link" ? "a" : "button"), mergeProps({
|
|
85
|
+
key: 0,
|
|
86
|
+
ref_key: "action",
|
|
87
|
+
ref: action
|
|
88
|
+
}, {
|
|
89
|
+
...unref(item).parts.action(),
|
|
90
|
+
...rest.value
|
|
91
|
+
}, { onClick }), {
|
|
92
|
+
default: withCtx(() => [unref(item).showsLeading() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 0 }, unref(item).parts.leading())), [renderSlot(_ctx.$slots, "leading", normalizeProps(guardReactiveProps(slotProps.value)))], 16)) : createCommentVNode("v-if", true), createElementVNode("span", normalizeProps(guardReactiveProps(unref(item).parts.text())), [
|
|
93
|
+
unref(item).showsOverline() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 0 }, unref(item).parts.overline())), [renderSlot(_ctx.$slots, "overline")], 16)) : createCommentVNode("v-if", true),
|
|
94
|
+
createElementVNode("span", normalizeProps(guardReactiveProps(unref(item).parts.label())), [renderSlot(_ctx.$slots, "default")], 16),
|
|
95
|
+
unref(item).showsSupporting() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 1 }, unref(item).parts.supporting())), [renderSlot(_ctx.$slots, "supporting")], 16)) : createCommentVNode("v-if", true)
|
|
96
|
+
], 16)]),
|
|
97
|
+
_: 3
|
|
98
|
+
}, 16)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [unref(item).showsLeading() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 0 }, unref(item).parts.leading())), [renderSlot(_ctx.$slots, "leading", normalizeProps(guardReactiveProps(slotProps.value)), () => [leadingControl.value ? (openBlock(), createBlock(resolveDynamicComponent(controls[leadingControl.value]), normalizeProps(mergeProps({ key: 0 }, slotProps.value)), null, 16)) : createCommentVNode("v-if", true)])], 16)) : createCommentVNode("v-if", true), createElementVNode("span", normalizeProps(guardReactiveProps(unref(item).parts.text())), [
|
|
99
|
+
unref(item).showsOverline() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 0 }, unref(item).parts.overline())), [renderSlot(_ctx.$slots, "overline")], 16)) : createCommentVNode("v-if", true),
|
|
100
|
+
createElementVNode("span", normalizeProps(guardReactiveProps(unref(item).parts.label())), [renderSlot(_ctx.$slots, "default")], 16),
|
|
101
|
+
unref(item).showsSupporting() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 1 }, unref(item).parts.supporting())), [renderSlot(_ctx.$slots, "supporting")], 16)) : createCommentVNode("v-if", true)
|
|
102
|
+
], 16)], 64)), unref(item).showsTrailing() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 2 }, unref(item).parts.trailing())), [renderSlot(_ctx.$slots, "trailing", normalizeProps(guardReactiveProps(slotProps.value)), () => [trailingControl.value ? (openBlock(), createBlock(resolveDynamicComponent(controls[trailingControl.value]), normalizeProps(mergeProps({ key: 0 }, slotProps.value)), null, 16)) : createCommentVNode("v-if", true)])], 16)) : createCommentVNode("v-if", true)], 16)), [[unref(vCornerMorph), { axis: "block" }]]);
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// src/list/context.ts
|
|
2
|
+
const listKey = Symbol("RioList");
|
|
3
|
+
/** An item outside a list acts on its own: no selection, and its own tab stop. */
|
|
4
|
+
const noList = {
|
|
5
|
+
selection: () => "none",
|
|
6
|
+
control: () => "none",
|
|
7
|
+
controlPosition: () => "trailing",
|
|
8
|
+
isSelected: () => false,
|
|
9
|
+
toggle: () => {},
|
|
10
|
+
isTabStop: () => true
|
|
11
|
+
};
|
|
12
|
+
export { listKey, noList };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { LoadingIndicatorProps } from "@rio-m3e/core";
|
|
2
|
+
import "@rio-m3e/styles/loading-indicator.css";
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<LoadingIndicatorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LoadingIndicatorProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
4
|
+
declare const _default: typeof __VLS_export;
|
|
5
|
+
export { _default as default };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { createElementBlock, createElementVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, onBeforeUnmount, onMounted, onUpdated, openBlock, unref, useTemplateRef } from "vue";
|
|
2
|
+
import { attachLoadingIndicator, createLoadingIndicator } from "@rio-m3e/core";
|
|
3
|
+
import "@rio-m3e/styles/loading-indicator.css";
|
|
4
|
+
// src/loading-indicator/LoadingIndicator.vue
|
|
5
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
6
|
+
__name: "LoadingIndicator",
|
|
7
|
+
props: {
|
|
8
|
+
value: {},
|
|
9
|
+
max: {},
|
|
10
|
+
contained: { type: Boolean },
|
|
11
|
+
size: {},
|
|
12
|
+
shapes: {}
|
|
13
|
+
},
|
|
14
|
+
setup(__props) {
|
|
15
|
+
const indicator = createLoadingIndicator({ props: () => ({
|
|
16
|
+
value: __props.value,
|
|
17
|
+
max: __props.max,
|
|
18
|
+
contained: __props.contained,
|
|
19
|
+
size: __props.size,
|
|
20
|
+
shapes: __props.shapes
|
|
21
|
+
}) });
|
|
22
|
+
const root = useTemplateRef("root");
|
|
23
|
+
const path = useTemplateRef("path");
|
|
24
|
+
let handle;
|
|
25
|
+
onMounted(() => {
|
|
26
|
+
handle = attachLoadingIndicator(root.value, {
|
|
27
|
+
indicator: () => path.value,
|
|
28
|
+
indeterminate: indicator.indeterminate,
|
|
29
|
+
drawing: indicator.drawing
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
onUpdated(() => handle?.sync());
|
|
33
|
+
onBeforeUnmount(() => handle?.detach());
|
|
34
|
+
return (_ctx, _cache) => {
|
|
35
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
36
|
+
ref_key: "root",
|
|
37
|
+
ref: root
|
|
38
|
+
}, unref(indicator).parts.root()), [(openBlock(), createElementBlock("svg", normalizeProps(guardReactiveProps(unref(indicator).parts.svg())), [createElementVNode("path", mergeProps({
|
|
39
|
+
ref_key: "path",
|
|
40
|
+
ref: path
|
|
41
|
+
}, unref(indicator).parts.indicator()), null, 16)], 16))], 16);
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** A language tag, such as `ko` or `en-GB`, for Rio's components inside */
|
|
3
|
+
locale?: string;
|
|
4
|
+
};
|
|
5
|
+
type __VLS_Slots = {
|
|
6
|
+
default?: () => unknown;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
12
|
+
new (): {
|
|
13
|
+
$slots: S;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export { _default as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { localeKey } from "./locale.js";
|
|
2
|
+
import { defineComponent, provide, renderSlot, toRef } from "vue";
|
|
3
|
+
// src/locale/LocaleProvider.vue
|
|
4
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
5
|
+
__name: "LocaleProvider",
|
|
6
|
+
props: { locale: {} },
|
|
7
|
+
setup(__props) {
|
|
8
|
+
provide(localeKey, toRef(() => __props.locale));
|
|
9
|
+
return (_ctx, _cache) => {
|
|
10
|
+
return renderSlot(_ctx.$slots, "default");
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComputedRef, InjectionKey, Ref } from "vue";
|
|
2
|
+
import { MessageOptions, RioMessages } from "@rio-m3e/core";
|
|
3
|
+
/** The language a `RioLocaleProvider` or `createRio` gives the components inside */
|
|
4
|
+
export declare const localeKey: InjectionKey<Ref<string | undefined>>;
|
|
5
|
+
/** The app's message tables and fallback language, from `createRio` */
|
|
6
|
+
export declare const messagesKey: InjectionKey<Ref<MessageOptions>>;
|
|
7
|
+
/**
|
|
8
|
+
* The language a component uses: its own `locale`, or the nearest one provided, or the document's,
|
|
9
|
+
* the browser's, or English (`resolveLocale`). Call it in `setup`.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useLocale(own: () => string | undefined): ComputedRef<string>;
|
|
12
|
+
/**
|
|
13
|
+
* A component's messages in its language: Rio's tables and the app's (`createRio`), with the
|
|
14
|
+
* component's own `messages` over them. Call it in `setup`.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useMessages<Group extends keyof RioMessages>(group: Group, locale: Ref<string>, own: () => Partial<RioMessages[Group]> | undefined): ComputedRef<RioMessages[Group]>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { computed, inject } from "vue";
|
|
2
|
+
import { messagesFor, resolveLocale } from "@rio-m3e/core";
|
|
3
|
+
// src/locale/locale.ts
|
|
4
|
+
/** The language a `RioLocaleProvider` or `createRio` gives the components inside */
|
|
5
|
+
const localeKey = Symbol("RioLocale");
|
|
6
|
+
/** The app's message tables and fallback language, from `createRio` */
|
|
7
|
+
const messagesKey = Symbol("RioMessages");
|
|
8
|
+
/**
|
|
9
|
+
* The language a component uses: its own `locale`, or the nearest one provided, or the document's,
|
|
10
|
+
* the browser's, or English (`resolveLocale`). Call it in `setup`.
|
|
11
|
+
*/
|
|
12
|
+
function useLocale(own) {
|
|
13
|
+
const provided = inject(localeKey, void 0);
|
|
14
|
+
return computed(() => resolveLocale(own() ?? provided?.value));
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A component's messages in its language: Rio's tables and the app's (`createRio`), with the
|
|
18
|
+
* component's own `messages` over them. Call it in `setup`.
|
|
19
|
+
*/
|
|
20
|
+
function useMessages(group, locale, own) {
|
|
21
|
+
const options = inject(messagesKey, void 0);
|
|
22
|
+
return computed(() => ({
|
|
23
|
+
...messagesFor(locale.value, options?.value)[group],
|
|
24
|
+
...own()
|
|
25
|
+
}));
|
|
26
|
+
}
|
|
27
|
+
export { localeKey, messagesKey, useLocale, useMessages };
|
package/dist/menu/Menu.vue.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { keepPresses } from "../overlay/presses.js";
|
|
1
2
|
import { menuContextOf, menuKey } from "./context.js";
|
|
2
|
-
import { createElementBlock, defineComponent, mergeProps, onBeforeUnmount, onMounted, openBlock, provide, renderSlot, unref, useTemplateRef, watch } from "vue";
|
|
3
|
+
import { createElementBlock, defineComponent, mergeProps, onBeforeUnmount, onMounted, openBlock, provide, ref, renderSlot, toHandlers, unref, useTemplateRef, watch } from "vue";
|
|
3
4
|
import { attachMenu, createMenu } from "@rio-m3e/core";
|
|
4
5
|
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
5
6
|
import "@rio-m3e/styles/base/anchored-position.css";
|
|
@@ -22,6 +23,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
22
23
|
emits: ["update:open", "update:modelValue"],
|
|
23
24
|
setup(__props, { emit: __emit }) {
|
|
24
25
|
const emit = __emit;
|
|
26
|
+
/** The inactive shape, with another open menu of its tree active */
|
|
27
|
+
const inactive = ref(false);
|
|
25
28
|
const menu = createMenu({
|
|
26
29
|
props: () => ({
|
|
27
30
|
open: __props.open,
|
|
@@ -35,7 +38,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
35
38
|
instant: __props.instant
|
|
36
39
|
}),
|
|
37
40
|
onChange: (selected) => emit("update:modelValue", selected),
|
|
38
|
-
onOpenChange: (next) => emit("update:open", next)
|
|
41
|
+
onOpenChange: (next) => emit("update:open", next),
|
|
42
|
+
inactive: () => inactive.value
|
|
39
43
|
});
|
|
40
44
|
provide(menuKey, menuContextOf(menu));
|
|
41
45
|
/** A component's root element, or the element or point itself */
|
|
@@ -50,7 +54,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
50
54
|
align: __props.align,
|
|
51
55
|
offset: __props.offset
|
|
52
56
|
}),
|
|
53
|
-
onClose: () => emit("update:open", false)
|
|
57
|
+
onClose: () => emit("update:open", false),
|
|
58
|
+
onInactiveChange: (next) => inactive.value = next
|
|
54
59
|
});
|
|
55
60
|
handle.sync(!!__props.open);
|
|
56
61
|
});
|
|
@@ -69,7 +74,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
69
74
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
70
75
|
ref_key: "root",
|
|
71
76
|
ref: root
|
|
72
|
-
}, unref(menu).parts.root()), [renderSlot(_ctx.$slots, "default")], 16);
|
|
77
|
+
}, unref(menu).parts.root(), toHandlers(unref(keepPresses), true)), [renderSlot(_ctx.$slots, "default")], 16);
|
|
73
78
|
};
|
|
74
79
|
}
|
|
75
80
|
});
|