@rio-m3e/vue 0.6.2 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +99 -4
- package/dist/app-bar/AppBar.vue.d.ts +42 -0
- package/dist/app-bar/AppBar.vue.js +91 -0
- package/dist/badge/Badge.vue.d.ts +15 -0
- package/dist/badge/Badge.vue.js +28 -0
- package/dist/bottom-sheet/BottomSheet.vue.d.ts +34 -0
- package/dist/bottom-sheet/BottomSheet.vue.js +82 -0
- package/dist/browser/rio-vue.css +9130 -0
- package/dist/browser/rio-vue.global.js +600 -0
- package/dist/browser/rio-vue.js +600 -0
- package/dist/button/Button.vue.d.ts +1 -0
- package/dist/button/Button.vue.js +23 -2
- package/dist/button-group/ButtonGroup.vue.d.ts +6 -1
- package/dist/button-group/ButtonGroup.vue.js +27 -4
- package/dist/button-group/context.js +4 -2
- package/dist/card/Card.vue.d.ts +24 -0
- package/dist/card/Card.vue.js +44 -0
- package/dist/card/CardActions.vue.d.ts +14 -0
- package/dist/card/CardActions.vue.js +14 -0
- package/dist/card/CardContent.vue.d.ts +14 -0
- package/dist/card/CardContent.vue.js +14 -0
- package/dist/card/CardHeader.vue.d.ts +27 -0
- package/dist/card/CardHeader.vue.js +34 -0
- package/dist/card/CardMedia.vue.d.ts +14 -0
- package/dist/card/CardMedia.vue.js +14 -0
- package/dist/checkbox/Checkbox.vue.d.ts +1 -0
- package/dist/checkbox/Checkbox.vue.js +3 -0
- package/dist/chip/AssistChip.vue.d.ts +1 -0
- package/dist/chip/AssistChip.vue.js +3 -0
- package/dist/chip/ChipSet.vue.d.ts +1 -0
- package/dist/chip/ChipSet.vue.js +4 -1
- package/dist/chip/FilterChip.vue.d.ts +9 -2
- package/dist/chip/FilterChip.vue.js +12 -5
- package/dist/chip/InputChip.vue.d.ts +5 -1
- package/dist/chip/InputChip.vue.js +6 -2
- package/dist/chip/SuggestionChip.vue.d.ts +1 -0
- package/dist/chip/SuggestionChip.vue.js +3 -0
- package/dist/date-picker/DatePicker.vue.d.ts +27 -4
- package/dist/date-picker/DatePicker.vue.js +15 -5
- package/dist/date-picker/DatePickerCalendar.vue.js +11 -13
- package/dist/date-picker/DatePickerDialog.vue.d.ts +26 -3
- package/dist/date-picker/DatePickerDialog.vue.js +66 -21
- package/dist/date-picker/DateRangeCalendar.vue.js +17 -8
- package/dist/date-picker/DateRangePickerDialog.vue.d.ts +23 -3
- package/dist/date-picker/DateRangePickerDialog.vue.js +31 -17
- package/dist/dialog/Dialog.vue.d.ts +11 -2
- package/dist/dialog/Dialog.vue.js +35 -5
- package/dist/divider/Divider.vue.d.ts +5 -0
- package/dist/divider/Divider.vue.js +21 -0
- package/dist/fab/Fab.vue.d.ts +27 -0
- package/dist/fab/Fab.vue.js +70 -0
- package/dist/fab-menu/FabMenu.vue.d.ts +34 -0
- package/dist/fab-menu/FabMenu.vue.js +76 -0
- package/dist/fab-menu/FabMenuItem.vue.d.ts +22 -0
- package/dist/fab-menu/FabMenuItem.vue.js +29 -0
- package/dist/fab-menu/context.js +4 -0
- package/dist/icon/Icon.vue.d.ts +13 -0
- package/dist/icon/Icon.vue.js +30 -0
- package/dist/icon/icons.d.ts +12 -0
- package/dist/icon/icons.js +12 -0
- package/dist/icon-button/IconButton.vue.d.ts +1 -0
- package/dist/icon-button/IconButton.vue.js +23 -2
- package/dist/ime/composing.js +24 -0
- package/dist/index.d.ts +69 -39
- package/dist/index.js +69 -39
- package/dist/list/List.vue.d.ts +1 -0
- package/dist/list/List.vue.js +4 -1
- package/dist/list/ListItem.vue.d.ts +7 -1
- package/dist/list/ListItem.vue.js +4 -1
- package/dist/loading-indicator/LoadingIndicator.vue.d.ts +1 -0
- package/dist/loading-indicator/LoadingIndicator.vue.js +4 -1
- package/dist/menu/Menu.vue.d.ts +1 -0
- package/dist/menu/Menu.vue.js +12 -2
- package/dist/menu/MenuDivider.vue.d.ts +1 -0
- package/dist/menu/MenuDivider.vue.js +1 -0
- package/dist/menu/MenuGroup.vue.d.ts +1 -0
- package/dist/menu/MenuGroup.vue.js +1 -0
- package/dist/menu/MenuItem.vue.d.ts +1 -0
- package/dist/menu/MenuItem.vue.js +1 -0
- package/dist/menu/SubMenu.vue.d.ts +2 -1
- package/dist/menu/SubMenu.vue.js +7 -3
- package/dist/navigation-bar/NavigationBar.vue.d.ts +31 -0
- package/dist/navigation-bar/NavigationBar.vue.js +63 -0
- package/dist/navigation-bar/NavigationBarItem.vue.d.ts +40 -0
- package/dist/navigation-bar/NavigationBarItem.vue.js +84 -0
- package/dist/navigation-bar/context.js +3 -0
- package/dist/navigation-rail/NavigationRail.vue.d.ts +46 -0
- package/dist/navigation-rail/NavigationRail.vue.js +112 -0
- package/dist/navigation-rail/NavigationRailItem.vue.d.ts +41 -0
- package/dist/navigation-rail/NavigationRailItem.vue.js +85 -0
- package/dist/navigation-rail/NavigationRailSection.vue.d.ts +17 -0
- package/dist/navigation-rail/NavigationRailSection.vue.js +20 -0
- package/dist/navigation-rail/context.js +3 -0
- package/dist/overflow/OverflowItem.vue.d.ts +16 -0
- package/dist/overflow/OverflowItem.vue.js +24 -0
- package/dist/overflow/OverflowMenu.vue.js +94 -0
- package/dist/overflow/overflow.js +79 -0
- package/dist/progress/CircularProgress.vue.d.ts +2 -0
- package/dist/progress/CircularProgress.vue.js +6 -2
- package/dist/progress/LinearProgress.vue.d.ts +2 -0
- package/dist/progress/LinearProgress.vue.js +6 -2
- package/dist/radio/Radio.vue.d.ts +1 -0
- package/dist/radio/Radio.vue.js +4 -1
- package/dist/radio/RadioGroup.vue.d.ts +1 -0
- package/dist/radio/RadioGroup.vue.js +10 -2
- package/dist/rio/rio.d.ts +9 -1
- package/dist/rio/rio.js +11 -3
- package/dist/scroll-field/ScrollField.vue.d.ts +1 -0
- package/dist/scroll-field/ScrollField.vue.js +3 -0
- package/dist/search/Search.vue.d.ts +58 -0
- package/dist/search/Search.vue.js +161 -0
- package/dist/select/AfterOptions.vue.js +11 -0
- package/dist/select/Select.vue.d.ts +8 -3
- package/dist/select/Select.vue.js +42 -30
- package/dist/select/SelectOption.vue.d.ts +5 -1
- package/dist/select/SelectOption.vue.js +9 -5
- package/dist/side-sheet/SideSheet.vue.d.ts +43 -0
- package/dist/side-sheet/SideSheet.vue.js +103 -0
- package/dist/slider/RangeSlider.vue.d.ts +2 -0
- package/dist/slider/RangeSlider.vue.js +4 -0
- package/dist/slider/Slider.vue.d.ts +2 -0
- package/dist/slider/Slider.vue.js +4 -0
- package/dist/snackbar/Snackbar.vue.d.ts +31 -0
- package/dist/snackbar/Snackbar.vue.js +48 -0
- package/dist/snackbar/SnackbarHost.vue.d.ts +40 -0
- package/dist/snackbar/SnackbarHost.vue.js +110 -0
- package/dist/snackbar/snackbar.d.ts +16 -0
- package/dist/snackbar/snackbar.js +11 -0
- package/dist/split-button/SplitButton.vue.d.ts +4 -1
- package/dist/split-button/SplitButton.vue.js +7 -2
- package/dist/switch/Switch.vue.d.ts +1 -0
- package/dist/switch/Switch.vue.js +3 -0
- package/dist/tabs/Tab.vue.d.ts +19 -0
- package/dist/tabs/Tab.vue.js +66 -0
- package/dist/tabs/TabGroup.vue.d.ts +22 -0
- package/dist/tabs/TabGroup.vue.js +25 -0
- package/dist/tabs/TabPanel.vue.d.ts +15 -0
- package/dist/tabs/TabPanel.vue.js +20 -0
- package/dist/tabs/Tabs.vue.d.ts +32 -0
- package/dist/tabs/Tabs.vue.js +95 -0
- package/dist/tabs/context.js +5 -0
- package/dist/text-field/TextField.vue.d.ts +8 -2
- package/dist/text-field/TextField.vue.js +91 -47
- package/dist/time-picker/TimeInput.vue.d.ts +8 -1
- package/dist/time-picker/TimeInput.vue.js +6 -2
- package/dist/time-picker/TimePickerDialog.vue.d.ts +20 -4
- package/dist/time-picker/TimePickerDialog.vue.js +8 -3
- package/dist/time-picker/TimeScroll.vue.d.ts +16 -3
- package/dist/time-picker/TimeScroll.vue.js +8 -3
- package/dist/toolbar/FabPlace.vue.js +14 -0
- package/dist/toolbar/Toolbar.vue.d.ts +34 -0
- package/dist/toolbar/Toolbar.vue.js +115 -0
- package/dist/toolbar/context.js +3 -0
- package/package.json +6 -4
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { useButtonGroupItem } from "../button-group/context.js";
|
|
2
|
+
import { useOverflowItem } from "../overflow/overflow.js";
|
|
2
3
|
import { vRipple } from "../ripple/ripple.js";
|
|
3
4
|
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
|
+
import { createBlock, createElementVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderSlot, resolveDynamicComponent, unref, useSlots, useTemplateRef, withCtx, withDirectives } from "vue";
|
|
5
6
|
import { createIconButton } from "@rio-m3e/core";
|
|
7
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
6
8
|
import "@rio-m3e/styles/base/focus-ring.css";
|
|
7
9
|
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
8
10
|
import "@rio-m3e/styles/base/state-layer.css";
|
|
@@ -18,6 +20,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
18
20
|
size: {},
|
|
19
21
|
width: {},
|
|
20
22
|
shape: {},
|
|
23
|
+
color: {},
|
|
21
24
|
toggle: { type: Boolean },
|
|
22
25
|
selected: { type: Boolean },
|
|
23
26
|
disabled: { type: Boolean },
|
|
@@ -36,6 +39,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
36
39
|
size: __props.size,
|
|
37
40
|
width: __props.width,
|
|
38
41
|
shape: __props.shape,
|
|
42
|
+
color: __props.color,
|
|
39
43
|
toggle: __props.toggle,
|
|
40
44
|
selected: __props.selected,
|
|
41
45
|
disabled: __props.disabled,
|
|
@@ -50,8 +54,25 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
50
54
|
onClick: (event) => emit("click", event),
|
|
51
55
|
onChange: item.onChange
|
|
52
56
|
});
|
|
57
|
+
const root = useTemplateRef("root");
|
|
58
|
+
useOverflowItem({
|
|
59
|
+
element: () => root.value,
|
|
60
|
+
label: () => __props.label,
|
|
61
|
+
icon: () => button.showsSelectedIcon() ? slots["selected-icon"]?.() : slots.default?.(),
|
|
62
|
+
disabled: () => {
|
|
63
|
+
const p = item.props();
|
|
64
|
+
return !!(p.disabled || p.softDisabled);
|
|
65
|
+
},
|
|
66
|
+
selected: () => {
|
|
67
|
+
const p = item.props();
|
|
68
|
+
return p.toggle ? !!p.selected : void 0;
|
|
69
|
+
}
|
|
70
|
+
});
|
|
53
71
|
return (_ctx, _cache) => {
|
|
54
|
-
return withDirectives((openBlock(), createBlock(resolveDynamicComponent(unref(button).isLink() ? "a" : "button"), mergeProps(
|
|
72
|
+
return withDirectives((openBlock(), createBlock(resolveDynamicComponent(unref(button).isLink() ? "a" : "button"), mergeProps({
|
|
73
|
+
ref_key: "root",
|
|
74
|
+
ref: root
|
|
75
|
+
}, unref(button).parts.root(), { onClick: unref(button).handleClick }), {
|
|
55
76
|
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
77
|
_: 3
|
|
57
78
|
}, 16, ["onClick"])), [[unref(vRipple)], [unref(vCornerMorph)]]);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// src/ime/composing.ts
|
|
2
|
+
/**
|
|
3
|
+
* Listeners for an input with `v-model`, which hand the text being composed to `update`: a number
|
|
4
|
+
* for `type="number"`, as `v-model` gives it, and otherwise the text.
|
|
5
|
+
*/
|
|
6
|
+
function useComposingInput(update) {
|
|
7
|
+
let composing = false;
|
|
8
|
+
return {
|
|
9
|
+
/** For `compositionstart` and `compositionend` */
|
|
10
|
+
onComposition(event) {
|
|
11
|
+
composing = event.type === "compositionstart";
|
|
12
|
+
},
|
|
13
|
+
/** For `input` */
|
|
14
|
+
onInput(event) {
|
|
15
|
+
if (!composing) return;
|
|
16
|
+
const target = event.target;
|
|
17
|
+
const most = target.maxLength;
|
|
18
|
+
if (most >= 0 && target.value.length > most) return;
|
|
19
|
+
const number = target.type === "number" ? parseFloat(target.value) : NaN;
|
|
20
|
+
update(Number.isNaN(number) ? target.value : number);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export { useComposingInput };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,42 +1,72 @@
|
|
|
1
|
-
import _default
|
|
2
|
-
import _default$2 from "./
|
|
3
|
-
import _default$3 from "./
|
|
4
|
-
import _default from "./
|
|
5
|
-
import _default$
|
|
6
|
-
import _default$
|
|
7
|
-
import _default$
|
|
8
|
-
import _default$
|
|
9
|
-
import _default$
|
|
10
|
-
import _default$
|
|
11
|
-
import _default$
|
|
12
|
-
import _default$
|
|
13
|
-
import _default$
|
|
1
|
+
import _default from "./app-bar/AppBar.vue.js";
|
|
2
|
+
import _default$2 from "./badge/Badge.vue.js";
|
|
3
|
+
import _default$3 from "./bottom-sheet/BottomSheet.vue.js";
|
|
4
|
+
import _default$4 from "./button/Button.vue.js";
|
|
5
|
+
import _default$5 from "./button-group/ButtonGroup.vue.js";
|
|
6
|
+
import _default$6 from "./card/Card.vue.js";
|
|
7
|
+
import _default$7 from "./card/CardActions.vue.js";
|
|
8
|
+
import _default$8 from "./card/CardContent.vue.js";
|
|
9
|
+
import _default$9 from "./card/CardHeader.vue.js";
|
|
10
|
+
import _default$10 from "./card/CardMedia.vue.js";
|
|
11
|
+
import _default$11 from "./checkbox/Checkbox.vue.js";
|
|
12
|
+
import _default$1 from "./chip/AssistChip.vue.js";
|
|
13
|
+
import _default$12 from "./chip/ChipSet.vue.js";
|
|
14
|
+
import _default$22 from "./chip/FilterChip.vue.js";
|
|
15
|
+
import _default$25 from "./chip/InputChip.vue.js";
|
|
16
|
+
import _default$54 from "./chip/SuggestionChip.vue.js";
|
|
17
|
+
import _default$14 from "./date-picker/DatePicker.vue.js";
|
|
18
|
+
import _default$15 from "./date-picker/DatePickerDialog.vue.js";
|
|
19
|
+
import _default$16 from "./date-picker/DateRangePickerDialog.vue.js";
|
|
20
|
+
import _default$17 from "./dialog/Dialog.vue.js";
|
|
21
|
+
import _default$18 from "./divider/Divider.vue.js";
|
|
22
|
+
import _default$19 from "./fab/Fab.vue.js";
|
|
23
|
+
import _default$20 from "./fab-menu/FabMenu.vue.js";
|
|
24
|
+
import _default$21 from "./fab-menu/FabMenuItem.vue.js";
|
|
25
|
+
import _default$23 from "./icon/Icon.vue.js";
|
|
26
|
+
import { RioIconValue, RioIcons, iconsKey, useIconOfAlias } from "./icon/icons.js";
|
|
27
|
+
import _default$24 from "./icon-button/IconButton.vue.js";
|
|
14
28
|
import { localeKey, messagesKey, useLocale, useMessages } from "./locale/locale.js";
|
|
29
|
+
import _default$40 from "./overflow/OverflowItem.vue.js";
|
|
15
30
|
import { RioOptions, RioPlugin, RioThemeOptions, createRio } from "./rio/rio.js";
|
|
16
|
-
import _default$
|
|
17
|
-
import _default$
|
|
18
|
-
import _default$
|
|
19
|
-
import _default$
|
|
20
|
-
import _default$
|
|
21
|
-
import _default$
|
|
22
|
-
import _default$
|
|
23
|
-
import _default$
|
|
24
|
-
import _default$
|
|
25
|
-
import _default$
|
|
26
|
-
import _default$
|
|
27
|
-
import _default$
|
|
28
|
-
import _default$
|
|
31
|
+
import _default$27 from "./list/List.vue.js";
|
|
32
|
+
import _default$28 from "./list/ListItem.vue.js";
|
|
33
|
+
import _default$30 from "./locale/LocaleProvider.vue.js";
|
|
34
|
+
import _default$29 from "./loading-indicator/LoadingIndicator.vue.js";
|
|
35
|
+
import _default$31 from "./menu/Menu.vue.js";
|
|
36
|
+
import _default$32 from "./menu/MenuDivider.vue.js";
|
|
37
|
+
import _default$33 from "./menu/MenuGroup.vue.js";
|
|
38
|
+
import _default$34 from "./menu/MenuItem.vue.js";
|
|
39
|
+
import _default$53 from "./menu/SubMenu.vue.js";
|
|
40
|
+
import _default$35 from "./navigation-bar/NavigationBar.vue.js";
|
|
41
|
+
import _default$36 from "./navigation-bar/NavigationBarItem.vue.js";
|
|
42
|
+
import _default$37 from "./navigation-rail/NavigationRail.vue.js";
|
|
43
|
+
import _default$38 from "./navigation-rail/NavigationRailItem.vue.js";
|
|
44
|
+
import _default$39 from "./navigation-rail/NavigationRailSection.vue.js";
|
|
45
|
+
import _default$13 from "./progress/CircularProgress.vue.js";
|
|
46
|
+
import _default$26 from "./progress/LinearProgress.vue.js";
|
|
47
|
+
import _default$41 from "./radio/Radio.vue.js";
|
|
48
|
+
import _default$42 from "./radio/RadioGroup.vue.js";
|
|
29
49
|
import { vRipple } from "./ripple/ripple.js";
|
|
30
|
-
import _default$
|
|
31
|
-
import _default$
|
|
32
|
-
import _default$
|
|
33
|
-
import _default$
|
|
34
|
-
import _default$
|
|
35
|
-
import _default$
|
|
36
|
-
import _default$
|
|
37
|
-
import _default$
|
|
38
|
-
import _default$
|
|
39
|
-
import
|
|
40
|
-
import _default$
|
|
41
|
-
import _default$
|
|
42
|
-
|
|
50
|
+
import _default$44 from "./scroll-field/ScrollField.vue.js";
|
|
51
|
+
import _default$45 from "./search/Search.vue.js";
|
|
52
|
+
import _default$46 from "./select/Select.vue.js";
|
|
53
|
+
import _default$47 from "./select/SelectOption.vue.js";
|
|
54
|
+
import _default$48 from "./side-sheet/SideSheet.vue.js";
|
|
55
|
+
import _default$43 from "./slider/RangeSlider.vue.js";
|
|
56
|
+
import _default$49 from "./slider/Slider.vue.js";
|
|
57
|
+
import _default$50 from "./snackbar/Snackbar.vue.js";
|
|
58
|
+
import _default$51 from "./snackbar/SnackbarHost.vue.js";
|
|
59
|
+
import { SnackbarController, snackbarKey, useSnackbar } from "./snackbar/snackbar.js";
|
|
60
|
+
import _default$52 from "./split-button/SplitButton.vue.js";
|
|
61
|
+
import _default$55 from "./switch/Switch.vue.js";
|
|
62
|
+
import _default$56 from "./tabs/Tab.vue.js";
|
|
63
|
+
import _default$57 from "./tabs/TabGroup.vue.js";
|
|
64
|
+
import _default$58 from "./tabs/TabPanel.vue.js";
|
|
65
|
+
import _default$59 from "./tabs/Tabs.vue.js";
|
|
66
|
+
import _default$60 from "./text-field/TextField.vue.js";
|
|
67
|
+
import _default$61 from "./time-picker/TimeInput.vue.js";
|
|
68
|
+
import _default$62 from "./time-picker/TimePickerDialog.vue.js";
|
|
69
|
+
import _default$63 from "./time-picker/TimeScroll.vue.js";
|
|
70
|
+
import _default$64 from "./toolbar/Toolbar.vue.js";
|
|
71
|
+
import _default$65 from "./tooltip/Tooltip.vue.js";
|
|
72
|
+
export { _default as RioAppBar, _default$1 as RioAssistChip, _default$2 as RioBadge, _default$3 as RioBottomSheet, _default$4 as RioButton, _default$5 as RioButtonGroup, _default$6 as RioCard, _default$7 as RioCardActions, _default$8 as RioCardContent, _default$9 as RioCardHeader, _default$10 as RioCardMedia, _default$11 as RioCheckbox, _default$12 as RioChipSet, _default$13 as RioCircularProgress, _default$14 as RioDatePicker, _default$15 as RioDatePickerDialog, _default$16 as RioDateRangePickerDialog, _default$17 as RioDialog, _default$18 as RioDivider, _default$19 as RioFab, _default$20 as RioFabMenu, _default$21 as RioFabMenuItem, _default$22 as RioFilterChip, _default$23 as RioIcon, _default$24 as RioIconButton, type RioIconValue, type RioIcons, _default$25 as RioInputChip, _default$26 as RioLinearProgress, _default$27 as RioList, _default$28 as RioListItem, _default$29 as RioLoadingIndicator, _default$30 as RioLocaleProvider, _default$31 as RioMenu, _default$32 as RioMenuDivider, _default$33 as RioMenuGroup, _default$34 as RioMenuItem, _default$35 as RioNavigationBar, _default$36 as RioNavigationBarItem, _default$37 as RioNavigationRail, _default$38 as RioNavigationRailItem, _default$39 as RioNavigationRailSection, type RioOptions, _default$40 as RioOverflowItem, type RioPlugin, _default$41 as RioRadio, _default$42 as RioRadioGroup, _default$43 as RioRangeSlider, _default$44 as RioScrollField, _default$45 as RioSearch, _default$46 as RioSelect, _default$47 as RioSelectOption, _default$48 as RioSideSheet, _default$49 as RioSlider, _default$50 as RioSnackbar, _default$51 as RioSnackbarHost, _default$52 as RioSplitButton, _default$53 as RioSubMenu, _default$54 as RioSuggestionChip, _default$55 as RioSwitch, _default$56 as RioTab, _default$57 as RioTabGroup, _default$58 as RioTabPanel, _default$59 as RioTabs, _default$60 as RioTextField, type RioThemeOptions, _default$61 as RioTimeInput, _default$62 as RioTimePickerDialog, _default$63 as RioTimeScroll, _default$64 as RioToolbar, _default$65 as RioTooltip, type SnackbarController, createRio, iconsKey, localeKey, messagesKey, snackbarKey, useIconOfAlias, useLocale, useMessages, useSnackbar, vRipple };
|
package/dist/index.js
CHANGED
|
@@ -1,42 +1,72 @@
|
|
|
1
|
-
import _sfc_main
|
|
2
|
-
import _sfc_main$2 from "./
|
|
3
|
-
import _sfc_main$3 from "./
|
|
4
|
-
import _sfc_main from "./
|
|
5
|
-
import _sfc_main$
|
|
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$
|
|
13
|
-
import _sfc_main$
|
|
1
|
+
import _sfc_main from "./app-bar/AppBar.vue.js";
|
|
2
|
+
import _sfc_main$2 from "./badge/Badge.vue.js";
|
|
3
|
+
import _sfc_main$3 from "./bottom-sheet/BottomSheet.vue.js";
|
|
4
|
+
import _sfc_main$4 from "./button/Button.vue.js";
|
|
5
|
+
import _sfc_main$5 from "./button-group/ButtonGroup.vue.js";
|
|
6
|
+
import _sfc_main$6 from "./card/Card.vue.js";
|
|
7
|
+
import _sfc_main$7 from "./card/CardActions.vue.js";
|
|
8
|
+
import _sfc_main$8 from "./card/CardContent.vue.js";
|
|
9
|
+
import _sfc_main$9 from "./card/CardHeader.vue.js";
|
|
10
|
+
import _sfc_main$10 from "./card/CardMedia.vue.js";
|
|
11
|
+
import _sfc_main$11 from "./checkbox/Checkbox.vue.js";
|
|
12
|
+
import _sfc_main$1 from "./chip/AssistChip.vue.js";
|
|
13
|
+
import _sfc_main$12 from "./chip/ChipSet.vue.js";
|
|
14
|
+
import _sfc_main$22 from "./chip/FilterChip.vue.js";
|
|
15
|
+
import _sfc_main$25 from "./chip/InputChip.vue.js";
|
|
16
|
+
import _sfc_main$54 from "./chip/SuggestionChip.vue.js";
|
|
17
|
+
import _sfc_main$14 from "./date-picker/DatePicker.vue.js";
|
|
18
|
+
import _sfc_main$15 from "./date-picker/DatePickerDialog.vue.js";
|
|
19
|
+
import _sfc_main$16 from "./date-picker/DateRangePickerDialog.vue.js";
|
|
20
|
+
import _sfc_main$17 from "./dialog/Dialog.vue.js";
|
|
21
|
+
import _sfc_main$18 from "./divider/Divider.vue.js";
|
|
22
|
+
import _sfc_main$19 from "./fab/Fab.vue.js";
|
|
23
|
+
import _sfc_main$20 from "./fab-menu/FabMenu.vue.js";
|
|
24
|
+
import _sfc_main$21 from "./fab-menu/FabMenuItem.vue.js";
|
|
25
|
+
import _sfc_main$23 from "./icon/Icon.vue.js";
|
|
26
|
+
import { iconsKey, useIconOfAlias } from "./icon/icons.js";
|
|
27
|
+
import _sfc_main$24 from "./icon-button/IconButton.vue.js";
|
|
14
28
|
import { localeKey, messagesKey, useLocale, useMessages } from "./locale/locale.js";
|
|
29
|
+
import _sfc_main$40 from "./overflow/OverflowItem.vue.js";
|
|
15
30
|
import { createRio } from "./rio/rio.js";
|
|
16
|
-
import _sfc_main$
|
|
17
|
-
import _sfc_main$
|
|
18
|
-
import _sfc_main$
|
|
19
|
-
import _sfc_main$
|
|
20
|
-
import _sfc_main$
|
|
21
|
-
import _sfc_main$
|
|
22
|
-
import _sfc_main$
|
|
23
|
-
import _sfc_main$
|
|
24
|
-
import _sfc_main$
|
|
25
|
-
import _sfc_main$
|
|
26
|
-
import _sfc_main$
|
|
27
|
-
import _sfc_main$
|
|
28
|
-
import _sfc_main$
|
|
31
|
+
import _sfc_main$27 from "./list/List.vue.js";
|
|
32
|
+
import _sfc_main$28 from "./list/ListItem.vue.js";
|
|
33
|
+
import _sfc_main$30 from "./locale/LocaleProvider.vue.js";
|
|
34
|
+
import _sfc_main$29 from "./loading-indicator/LoadingIndicator.vue.js";
|
|
35
|
+
import _sfc_main$31 from "./menu/Menu.vue.js";
|
|
36
|
+
import _sfc_main$32 from "./menu/MenuDivider.vue.js";
|
|
37
|
+
import _sfc_main$33 from "./menu/MenuGroup.vue.js";
|
|
38
|
+
import _sfc_main$34 from "./menu/MenuItem.vue.js";
|
|
39
|
+
import _sfc_main$53 from "./menu/SubMenu.vue.js";
|
|
40
|
+
import _sfc_main$35 from "./navigation-bar/NavigationBar.vue.js";
|
|
41
|
+
import _sfc_main$36 from "./navigation-bar/NavigationBarItem.vue.js";
|
|
42
|
+
import _sfc_main$37 from "./navigation-rail/NavigationRail.vue.js";
|
|
43
|
+
import _sfc_main$38 from "./navigation-rail/NavigationRailItem.vue.js";
|
|
44
|
+
import _sfc_main$39 from "./navigation-rail/NavigationRailSection.vue.js";
|
|
45
|
+
import _sfc_main$13 from "./progress/CircularProgress.vue.js";
|
|
46
|
+
import _sfc_main$26 from "./progress/LinearProgress.vue.js";
|
|
47
|
+
import _sfc_main$41 from "./radio/Radio.vue.js";
|
|
48
|
+
import _sfc_main$42 from "./radio/RadioGroup.vue.js";
|
|
29
49
|
import { vRipple } from "./ripple/ripple.js";
|
|
30
|
-
import _sfc_main$
|
|
31
|
-
import _sfc_main$
|
|
32
|
-
import _sfc_main$
|
|
33
|
-
import _sfc_main$
|
|
34
|
-
import _sfc_main$
|
|
35
|
-
import _sfc_main$
|
|
36
|
-
import _sfc_main$
|
|
37
|
-
import _sfc_main$
|
|
38
|
-
import _sfc_main$
|
|
39
|
-
import
|
|
40
|
-
import _sfc_main$
|
|
41
|
-
import _sfc_main$
|
|
42
|
-
|
|
50
|
+
import _sfc_main$44 from "./scroll-field/ScrollField.vue.js";
|
|
51
|
+
import _sfc_main$45 from "./search/Search.vue.js";
|
|
52
|
+
import _sfc_main$46 from "./select/Select.vue.js";
|
|
53
|
+
import _sfc_main$47 from "./select/SelectOption.vue.js";
|
|
54
|
+
import _sfc_main$48 from "./side-sheet/SideSheet.vue.js";
|
|
55
|
+
import _sfc_main$43 from "./slider/RangeSlider.vue.js";
|
|
56
|
+
import _sfc_main$49 from "./slider/Slider.vue.js";
|
|
57
|
+
import _sfc_main$50 from "./snackbar/Snackbar.vue.js";
|
|
58
|
+
import _sfc_main$51 from "./snackbar/SnackbarHost.vue.js";
|
|
59
|
+
import { snackbarKey, useSnackbar } from "./snackbar/snackbar.js";
|
|
60
|
+
import _sfc_main$52 from "./split-button/SplitButton.vue.js";
|
|
61
|
+
import _sfc_main$55 from "./switch/Switch.vue.js";
|
|
62
|
+
import _sfc_main$56 from "./tabs/Tab.vue.js";
|
|
63
|
+
import _sfc_main$57 from "./tabs/TabGroup.vue.js";
|
|
64
|
+
import _sfc_main$58 from "./tabs/TabPanel.vue.js";
|
|
65
|
+
import _sfc_main$59 from "./tabs/Tabs.vue.js";
|
|
66
|
+
import _sfc_main$60 from "./text-field/TextField.vue.js";
|
|
67
|
+
import _sfc_main$61 from "./time-picker/TimeInput.vue.js";
|
|
68
|
+
import _sfc_main$62 from "./time-picker/TimePickerDialog.vue.js";
|
|
69
|
+
import _sfc_main$63 from "./time-picker/TimeScroll.vue.js";
|
|
70
|
+
import _sfc_main$64 from "./toolbar/Toolbar.vue.js";
|
|
71
|
+
import _sfc_main$65 from "./tooltip/Tooltip.vue.js";
|
|
72
|
+
export { _sfc_main as RioAppBar, _sfc_main$1 as RioAssistChip, _sfc_main$2 as RioBadge, _sfc_main$3 as RioBottomSheet, _sfc_main$4 as RioButton, _sfc_main$5 as RioButtonGroup, _sfc_main$6 as RioCard, _sfc_main$7 as RioCardActions, _sfc_main$8 as RioCardContent, _sfc_main$9 as RioCardHeader, _sfc_main$10 as RioCardMedia, _sfc_main$11 as RioCheckbox, _sfc_main$12 as RioChipSet, _sfc_main$13 as RioCircularProgress, _sfc_main$14 as RioDatePicker, _sfc_main$15 as RioDatePickerDialog, _sfc_main$16 as RioDateRangePickerDialog, _sfc_main$17 as RioDialog, _sfc_main$18 as RioDivider, _sfc_main$19 as RioFab, _sfc_main$20 as RioFabMenu, _sfc_main$21 as RioFabMenuItem, _sfc_main$22 as RioFilterChip, _sfc_main$23 as RioIcon, _sfc_main$24 as RioIconButton, _sfc_main$25 as RioInputChip, _sfc_main$26 as RioLinearProgress, _sfc_main$27 as RioList, _sfc_main$28 as RioListItem, _sfc_main$29 as RioLoadingIndicator, _sfc_main$30 as RioLocaleProvider, _sfc_main$31 as RioMenu, _sfc_main$32 as RioMenuDivider, _sfc_main$33 as RioMenuGroup, _sfc_main$34 as RioMenuItem, _sfc_main$35 as RioNavigationBar, _sfc_main$36 as RioNavigationBarItem, _sfc_main$37 as RioNavigationRail, _sfc_main$38 as RioNavigationRailItem, _sfc_main$39 as RioNavigationRailSection, _sfc_main$40 as RioOverflowItem, _sfc_main$41 as RioRadio, _sfc_main$42 as RioRadioGroup, _sfc_main$43 as RioRangeSlider, _sfc_main$44 as RioScrollField, _sfc_main$45 as RioSearch, _sfc_main$46 as RioSelect, _sfc_main$47 as RioSelectOption, _sfc_main$48 as RioSideSheet, _sfc_main$49 as RioSlider, _sfc_main$50 as RioSnackbar, _sfc_main$51 as RioSnackbarHost, _sfc_main$52 as RioSplitButton, _sfc_main$53 as RioSubMenu, _sfc_main$54 as RioSuggestionChip, _sfc_main$55 as RioSwitch, _sfc_main$56 as RioTab, _sfc_main$57 as RioTabGroup, _sfc_main$58 as RioTabPanel, _sfc_main$59 as RioTabs, _sfc_main$60 as RioTextField, _sfc_main$61 as RioTimeInput, _sfc_main$62 as RioTimePickerDialog, _sfc_main$63 as RioTimeScroll, _sfc_main$64 as RioToolbar, _sfc_main$65 as RioTooltip, createRio, iconsKey, localeKey, messagesKey, snackbarKey, useIconOfAlias, useLocale, useMessages, useSnackbar, vRipple };
|
package/dist/list/List.vue.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ListProps, ListSelected } from "@rio-m3e/core";
|
|
2
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
2
3
|
import "@rio-m3e/styles/list.css";
|
|
3
4
|
interface Props extends Omit<ListProps, 'selected'> {
|
|
4
5
|
/** The selected value (`single`) or values (`multiple`), with `v-model`. */
|
package/dist/list/List.vue.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { listKey } from "./context.js";
|
|
2
2
|
import { createElementBlock, defineComponent, mergeProps, onBeforeUnmount, onMounted, onUpdated, openBlock, provide, ref, renderSlot, unref, useTemplateRef } from "vue";
|
|
3
3
|
import { attachList, createList } from "@rio-m3e/core";
|
|
4
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
4
5
|
import "@rio-m3e/styles/list.css";
|
|
5
6
|
// src/list/List.vue
|
|
6
7
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
@@ -12,7 +13,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
12
13
|
required: { type: Boolean },
|
|
13
14
|
control: {},
|
|
14
15
|
controlPosition: {},
|
|
15
|
-
label: {}
|
|
16
|
+
label: {},
|
|
17
|
+
color: {}
|
|
16
18
|
},
|
|
17
19
|
emits: ["update:modelValue"],
|
|
18
20
|
setup(__props, { emit: __emit }) {
|
|
@@ -27,6 +29,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
27
29
|
control: __props.control,
|
|
28
30
|
controlPosition: __props.controlPosition,
|
|
29
31
|
label: __props.label,
|
|
32
|
+
color: __props.color,
|
|
30
33
|
selected: __props.modelValue
|
|
31
34
|
}),
|
|
32
35
|
tabStop: () => tabStop.value,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ListValue } from "@rio-m3e/core";
|
|
1
|
+
import { AccentColor, ListValue } from "@rio-m3e/core";
|
|
2
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
2
3
|
import "@rio-m3e/styles/base/focus-ring.css";
|
|
3
4
|
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
4
5
|
import "@rio-m3e/styles/list.css";
|
|
@@ -9,6 +10,11 @@ type __VLS_Props = {
|
|
|
9
10
|
href?: string;
|
|
10
11
|
/** Disabled items stay focusable among the list's items, and nothing they do happens. */
|
|
11
12
|
disabled?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* The theme color it takes while selected, and its control: `'secondary'`, `'tertiary'`,
|
|
15
|
+
* `'error'`, or a static color of the theme. Without it, the spec's, or the list's color.
|
|
16
|
+
*/
|
|
17
|
+
color?: AccentColor;
|
|
12
18
|
/** Listening for clicks makes the item a button. */
|
|
13
19
|
onClick?: (event: MouseEvent) => void;
|
|
14
20
|
};
|
|
@@ -6,6 +6,7 @@ import _sfc_main$3 from "../switch/Switch.vue.js";
|
|
|
6
6
|
import { listKey, noList } from "./context.js";
|
|
7
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
8
|
import { attachListItem, createListItem } from "@rio-m3e/core";
|
|
9
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
9
10
|
import "@rio-m3e/styles/base/focus-ring.css";
|
|
10
11
|
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
11
12
|
import "@rio-m3e/styles/list.css";
|
|
@@ -17,6 +18,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
17
18
|
value: {},
|
|
18
19
|
href: {},
|
|
19
20
|
disabled: { type: Boolean },
|
|
21
|
+
color: {},
|
|
20
22
|
onClick: { type: Function }
|
|
21
23
|
},
|
|
22
24
|
setup(__props) {
|
|
@@ -34,7 +36,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
34
36
|
value: props.value,
|
|
35
37
|
href: props.href,
|
|
36
38
|
action: !!props.onClick,
|
|
37
|
-
disabled: props.disabled
|
|
39
|
+
disabled: props.disabled,
|
|
40
|
+
color: props.color
|
|
38
41
|
}),
|
|
39
42
|
list: () => list,
|
|
40
43
|
key: useId(),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LoadingIndicatorProps } from "@rio-m3e/core";
|
|
2
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
2
3
|
import "@rio-m3e/styles/loading-indicator.css";
|
|
3
4
|
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
5
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createElementBlock, createElementVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, onBeforeUnmount, onMounted, onUpdated, openBlock, unref, useTemplateRef } from "vue";
|
|
2
2
|
import { attachLoadingIndicator, createLoadingIndicator } from "@rio-m3e/core";
|
|
3
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
3
4
|
import "@rio-m3e/styles/loading-indicator.css";
|
|
4
5
|
// src/loading-indicator/LoadingIndicator.vue
|
|
5
6
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
@@ -9,6 +10,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
9
10
|
max: {},
|
|
10
11
|
contained: { type: Boolean },
|
|
11
12
|
size: {},
|
|
13
|
+
color: {},
|
|
12
14
|
shapes: {}
|
|
13
15
|
},
|
|
14
16
|
setup(__props) {
|
|
@@ -17,7 +19,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
17
19
|
max: __props.max,
|
|
18
20
|
contained: __props.contained,
|
|
19
21
|
size: __props.size,
|
|
20
|
-
shapes: __props.shapes
|
|
22
|
+
shapes: __props.shapes,
|
|
23
|
+
color: __props.color
|
|
21
24
|
}) });
|
|
22
25
|
const root = useTemplateRef("root");
|
|
23
26
|
const path = useTemplateRef("path");
|
package/dist/menu/Menu.vue.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { MenuAnchorPoint, MenuProps, MenuSelected } from "@rio-m3e/core";
|
|
2
2
|
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
3
|
+
import "@rio-m3e/styles/base/direction.css";
|
|
3
4
|
import "@rio-m3e/styles/base/anchored-position.css";
|
|
4
5
|
import "@rio-m3e/styles/menu.css";
|
|
5
6
|
interface Props extends Omit<MenuProps, 'selected'> {
|
package/dist/menu/Menu.vue.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { keepPresses } from "../overlay/presses.js";
|
|
2
2
|
import { menuContextOf, menuKey } from "./context.js";
|
|
3
|
-
import { createElementBlock, defineComponent, mergeProps, onBeforeUnmount, onMounted, openBlock, provide, ref, renderSlot, toHandlers, unref, useTemplateRef, watch } from "vue";
|
|
3
|
+
import { createElementBlock, defineComponent, mergeProps, onBeforeUnmount, onMounted, onUpdated, openBlock, provide, ref, renderSlot, toHandlers, unref, useId, useTemplateRef, watch } from "vue";
|
|
4
4
|
import { attachMenu, createMenu } from "@rio-m3e/core";
|
|
5
5
|
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
6
|
+
import "@rio-m3e/styles/base/direction.css";
|
|
6
7
|
import "@rio-m3e/styles/base/anchored-position.css";
|
|
7
8
|
import "@rio-m3e/styles/menu.css";
|
|
8
9
|
// src/menu/Menu.vue
|
|
@@ -39,7 +40,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
39
40
|
}),
|
|
40
41
|
onChange: (selected) => emit("update:modelValue", selected),
|
|
41
42
|
onOpenChange: (next) => emit("update:open", next),
|
|
42
|
-
inactive: () => inactive.value
|
|
43
|
+
inactive: () => inactive.value,
|
|
44
|
+
id: `${useId()}-menu`
|
|
43
45
|
});
|
|
44
46
|
provide(menuKey, menuContextOf(menu));
|
|
45
47
|
/** A component's root element, or the element or point itself */
|
|
@@ -55,6 +57,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
55
57
|
offset: __props.offset
|
|
56
58
|
}),
|
|
57
59
|
onClose: () => emit("update:open", false),
|
|
60
|
+
onOpen: () => emit("update:open", true),
|
|
58
61
|
onInactiveChange: (next) => inactive.value = next
|
|
59
62
|
});
|
|
60
63
|
handle.sync(!!__props.open);
|
|
@@ -69,6 +72,13 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
69
72
|
return point ? `${point.x},${point.y}` : anchorTarget();
|
|
70
73
|
};
|
|
71
74
|
watch([anchorKey, () => pointOf()?.element], () => handle?.update(), { flush: "post" });
|
|
75
|
+
let renderedId;
|
|
76
|
+
onUpdated(() => {
|
|
77
|
+
const id = root.value?.id;
|
|
78
|
+
if (id === renderedId) return;
|
|
79
|
+
renderedId = id;
|
|
80
|
+
handle?.update();
|
|
81
|
+
});
|
|
72
82
|
onBeforeUnmount(() => handle?.detach());
|
|
73
83
|
return (_ctx, _cache) => {
|
|
74
84
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import "@rio-m3e/styles/base/direction.css";
|
|
1
2
|
import "@rio-m3e/styles/menu.css";
|
|
2
3
|
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
3
4
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createElementBlock, defineComponent, guardReactiveProps, normalizeProps, openBlock, unref } from "vue";
|
|
2
2
|
import { createMenuDivider } from "@rio-m3e/core";
|
|
3
|
+
import "@rio-m3e/styles/base/direction.css";
|
|
3
4
|
import "@rio-m3e/styles/menu.css";
|
|
4
5
|
// src/menu/MenuDivider.vue
|
|
5
6
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createCommentVNode, createElementBlock, createElementVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderSlot, toDisplayString, unref } from "vue";
|
|
2
2
|
import { createMenuGroup } from "@rio-m3e/core";
|
|
3
|
+
import "@rio-m3e/styles/base/direction.css";
|
|
3
4
|
import "@rio-m3e/styles/menu.css";
|
|
4
5
|
// src/menu/MenuGroup.vue
|
|
5
6
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { MenuItemProps } from "@rio-m3e/core";
|
|
2
2
|
import "@rio-m3e/styles/base/focus-ring.css";
|
|
3
3
|
import "@rio-m3e/styles/base/state-layer.css";
|
|
4
|
+
import "@rio-m3e/styles/base/direction.css";
|
|
4
5
|
import "@rio-m3e/styles/menu.css";
|
|
5
6
|
type __VLS_Slots = {
|
|
6
7
|
/** The label */
|
|
@@ -4,6 +4,7 @@ import { createCommentVNode, createElementBlock, createElementVNode, defineCompo
|
|
|
4
4
|
import { createMenuItem } from "@rio-m3e/core";
|
|
5
5
|
import "@rio-m3e/styles/base/focus-ring.css";
|
|
6
6
|
import "@rio-m3e/styles/base/state-layer.css";
|
|
7
|
+
import "@rio-m3e/styles/base/direction.css";
|
|
7
8
|
import "@rio-m3e/styles/menu.css";
|
|
8
9
|
// src/menu/MenuItem.vue
|
|
9
10
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
@@ -2,6 +2,7 @@ import { MenuSelected, SubMenuProps } from "@rio-m3e/core";
|
|
|
2
2
|
import "@rio-m3e/styles/base/focus-ring.css";
|
|
3
3
|
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
4
4
|
import "@rio-m3e/styles/base/state-layer.css";
|
|
5
|
+
import "@rio-m3e/styles/base/direction.css";
|
|
5
6
|
import "@rio-m3e/styles/base/anchored-position.css";
|
|
6
7
|
import "@rio-m3e/styles/menu.css";
|
|
7
8
|
interface Props extends Omit<SubMenuProps, 'selected'> {
|
|
@@ -19,7 +20,7 @@ type __VLS_Slots = {
|
|
|
19
20
|
'trailing-text'?: () => unknown;
|
|
20
21
|
/**
|
|
21
22
|
* A trailing icon on the item, hidden from assistive technology, such as an arrow pointing to the
|
|
22
|
-
* submenu.
|
|
23
|
+
* submenu. Without one, the `submenu` icon registered with `createRio`.
|
|
23
24
|
*/
|
|
24
25
|
'trailing-icon'?: () => unknown;
|
|
25
26
|
};
|
package/dist/menu/SubMenu.vue.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { vRipple } from "../ripple/ripple.js";
|
|
2
2
|
import { menuContextOf, menuKey } from "./context.js";
|
|
3
|
-
import
|
|
3
|
+
import _sfc_main$1 from "../icon/Icon.vue.js";
|
|
4
|
+
import { useIconOfAlias } from "../icon/icons.js";
|
|
5
|
+
import { Fragment, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, guardReactiveProps, inject, mergeProps, normalizeProps, onBeforeUnmount, onMounted, openBlock, provide, ref, renderSlot, toDisplayString, unref, useId, useSlots, useTemplateRef, watch, withDirectives } from "vue";
|
|
4
6
|
import { attachSubMenu, createSubMenu, mergePartAttrs } from "@rio-m3e/core";
|
|
5
7
|
import "@rio-m3e/styles/base/focus-ring.css";
|
|
6
8
|
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
7
9
|
import "@rio-m3e/styles/base/state-layer.css";
|
|
10
|
+
import "@rio-m3e/styles/base/direction.css";
|
|
8
11
|
import "@rio-m3e/styles/base/anchored-position.css";
|
|
9
12
|
import "@rio-m3e/styles/menu.css";
|
|
10
13
|
// src/menu/SubMenu.vue
|
|
@@ -25,6 +28,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
25
28
|
const open = ref(false);
|
|
26
29
|
const inactive = ref(false);
|
|
27
30
|
const id = useId();
|
|
31
|
+
const submenuIcon = useIconOfAlias("submenu");
|
|
28
32
|
const sub = createSubMenu({
|
|
29
33
|
props: () => ({
|
|
30
34
|
label: __props.label,
|
|
@@ -36,7 +40,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
36
40
|
icon: !!slots.icon,
|
|
37
41
|
supportingText: !!slots["supporting-text"],
|
|
38
42
|
trailingText: !!slots["trailing-text"],
|
|
39
|
-
trailingIcon: !!slots["trailing-icon"]
|
|
43
|
+
trailingIcon: !!slots["trailing-icon"] || !!submenuIcon.value
|
|
40
44
|
}),
|
|
41
45
|
menu: () => parent,
|
|
42
46
|
open: () => open.value,
|
|
@@ -77,7 +81,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
77
81
|
unref(item).showsIcon() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 0 }, unref(item).parts.icon())), [renderSlot(_ctx.$slots, "icon")], 16)) : createCommentVNode("v-if", true),
|
|
78
82
|
createElementVNode("span", normalizeProps(guardReactiveProps(unref(item).parts.text())), [createElementVNode("span", normalizeProps(guardReactiveProps(unref(item).parts.label())), toDisplayString(__props.label), 17), unref(item).showsSupportingText() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 0 }, unref(item).parts.supportingText())), [renderSlot(_ctx.$slots, "supporting-text")], 16)) : createCommentVNode("v-if", true)], 16),
|
|
79
83
|
unref(item).showsTrailingText() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 1 }, unref(item).parts.trailingText())), [renderSlot(_ctx.$slots, "trailing-text")], 16)) : createCommentVNode("v-if", true),
|
|
80
|
-
unref(item).showsTrailingIcon() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 2 }, unref(item).parts.trailingIcon())), [renderSlot(_ctx.$slots, "trailing-icon")], 16)) : createCommentVNode("v-if", true)
|
|
84
|
+
unref(item).showsTrailingIcon() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 2 }, unref(item).parts.trailingIcon())), [renderSlot(_ctx.$slots, "trailing-icon", {}, () => [createVNode(_sfc_main$1, { alias: "submenu" })])], 16)) : createCommentVNode("v-if", true)
|
|
81
85
|
], 16)), [[unref(vRipple)]]),
|
|
82
86
|
createCommentVNode(" Inside the menu's own element, which keeps clicks and presses in. "),
|
|
83
87
|
createElementVNode("div", mergeProps({
|