@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
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import _sfc_main$1 from "../icon-button/IconButton.vue.js";
|
|
2
|
+
import _sfc_main$2 from "../icon/Icon.vue.js";
|
|
3
|
+
import { useLocale, useMessages } from "../locale/locale.js";
|
|
4
|
+
import _sfc_main$3 from "../menu/Menu.vue.js";
|
|
5
|
+
import _sfc_main$4 from "../menu/MenuItem.vue.js";
|
|
6
|
+
import _sfc_main$5 from "../tooltip/Tooltip.vue.js";
|
|
7
|
+
import { overflowKey } from "./overflow.js";
|
|
8
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createSlots, createVNode, defineComponent, openBlock, provide, ref, renderList, renderSlot, unref, useTemplateRef, watchEffect, withCtx } from "vue";
|
|
9
|
+
import "@rio-m3e/styles/base/overflow.css";
|
|
10
|
+
// src/overflow/OverflowMenu.vue
|
|
11
|
+
const _hoisted_1 = { class: "rio-overflow" };
|
|
12
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
13
|
+
__name: "OverflowMenu",
|
|
14
|
+
props: { host: {} },
|
|
15
|
+
setup(__props) {
|
|
16
|
+
provide(overflowKey, null);
|
|
17
|
+
const text = useMessages("overflow", useLocale(() => void 0), () => void 0);
|
|
18
|
+
const open = ref(false);
|
|
19
|
+
const indicator = useTemplateRef("indicator");
|
|
20
|
+
watchEffect(() => __props.host.indicator.value = indicator.value?.$el ?? null);
|
|
21
|
+
/** Renders what an entry gives: text, or a slot of the button it stands for */
|
|
22
|
+
const Render = (props) => props.content();
|
|
23
|
+
const toggles = computed(() => __props.host.overflowed.value.filter((each) => each.selected?.() !== void 0));
|
|
24
|
+
const selected = computed(() => toggles.value.filter((each) => each.selected()).map((each) => each.id));
|
|
25
|
+
const choose = (record) => record.element()?.click();
|
|
26
|
+
/** A toggle chosen in the menu: the one whose state the new selection turns */
|
|
27
|
+
const onSelect = (next) => {
|
|
28
|
+
const values = new Set(Array.isArray(next) ? next : next === void 0 ? [] : [next]);
|
|
29
|
+
for (const each of toggles.value) if (values.has(each.id) !== !!each.selected()) choose(each);
|
|
30
|
+
};
|
|
31
|
+
return (_ctx, _cache) => {
|
|
32
|
+
return openBlock(), createElementBlock("span", _hoisted_1, [createVNode(_sfc_main$5, { text: unref(text).more }, {
|
|
33
|
+
default: withCtx(() => [createVNode(_sfc_main$1, {
|
|
34
|
+
ref_key: "indicator",
|
|
35
|
+
ref: indicator,
|
|
36
|
+
label: unref(text).more,
|
|
37
|
+
variant: __props.host.indicatorVariant(),
|
|
38
|
+
"aria-haspopup": "menu",
|
|
39
|
+
"aria-expanded": open.value,
|
|
40
|
+
onClick: _cache[0] || (_cache[0] = ($event) => open.value = !open.value)
|
|
41
|
+
}, {
|
|
42
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "icon", {}, () => [createVNode(_sfc_main$2, { alias: "more" })])]),
|
|
43
|
+
_: 3
|
|
44
|
+
}, 8, [
|
|
45
|
+
"label",
|
|
46
|
+
"variant",
|
|
47
|
+
"aria-expanded"
|
|
48
|
+
])]),
|
|
49
|
+
_: 3
|
|
50
|
+
}, 8, ["text"]), createVNode(_sfc_main$3, {
|
|
51
|
+
open: open.value,
|
|
52
|
+
"onUpdate:open": _cache[1] || (_cache[1] = ($event) => open.value = $event),
|
|
53
|
+
anchor: __props.host.indicator.value,
|
|
54
|
+
label: unref(text).more,
|
|
55
|
+
selection: "multiple",
|
|
56
|
+
"model-value": selected.value,
|
|
57
|
+
"onUpdate:modelValue": onSelect
|
|
58
|
+
}, {
|
|
59
|
+
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.host.overflowed.value, (record) => {
|
|
60
|
+
return openBlock(), createElementBlock(Fragment, { key: record.id }, [record.menu ? (openBlock(), createBlock(Render, {
|
|
61
|
+
key: 0,
|
|
62
|
+
content: record.menu
|
|
63
|
+
}, null, 8, ["content"])) : (openBlock(), createBlock(_sfc_main$4, {
|
|
64
|
+
key: 1,
|
|
65
|
+
value: record.selected?.() === void 0 ? void 0 : record.id,
|
|
66
|
+
disabled: record.disabled?.(),
|
|
67
|
+
onClick: ($event) => record.selected?.() === void 0 && choose(record)
|
|
68
|
+
}, createSlots({
|
|
69
|
+
default: withCtx(() => [record.label ? (openBlock(), createBlock(Render, {
|
|
70
|
+
key: 0,
|
|
71
|
+
content: record.label
|
|
72
|
+
}, null, 8, ["content"])) : createCommentVNode("v-if", true)]),
|
|
73
|
+
_: 2
|
|
74
|
+
}, [record.icon ? {
|
|
75
|
+
name: "icon",
|
|
76
|
+
fn: withCtx(() => [createVNode(Render, { content: record.icon }, null, 8, ["content"])]),
|
|
77
|
+
key: "0"
|
|
78
|
+
} : void 0]), 1032, [
|
|
79
|
+
"value",
|
|
80
|
+
"disabled",
|
|
81
|
+
"onClick"
|
|
82
|
+
]))], 64);
|
|
83
|
+
}), 128))]),
|
|
84
|
+
_: 1
|
|
85
|
+
}, 8, [
|
|
86
|
+
"open",
|
|
87
|
+
"anchor",
|
|
88
|
+
"label",
|
|
89
|
+
"model-value"
|
|
90
|
+
])]);
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { computed, inject, onBeforeUnmount, onMounted, onUpdated, provide, ref, shallowRef, watch } from "vue";
|
|
2
|
+
import { attachOverflow } from "@rio-m3e/core";
|
|
3
|
+
// src/overflow/overflow.ts
|
|
4
|
+
/** What a host provides. `null` inside the menu itself, so its button doesn't register. */
|
|
5
|
+
const overflowKey = Symbol("RioOverflow");
|
|
6
|
+
let ids = 0;
|
|
7
|
+
/** For an item: registers with the host around it, if there is one, while mounted. */
|
|
8
|
+
function useOverflowItem(entry) {
|
|
9
|
+
const host = inject(overflowKey, null);
|
|
10
|
+
if (!host) return;
|
|
11
|
+
let unregister;
|
|
12
|
+
onMounted(() => unregister = host.register(entry));
|
|
13
|
+
onBeforeUnmount(() => unregister?.());
|
|
14
|
+
}
|
|
15
|
+
/** For a host: provides the context, and measures its items while `overflow` is on. */
|
|
16
|
+
function useOverflowHost(options) {
|
|
17
|
+
const records = shallowRef([]);
|
|
18
|
+
/** The elements in the menu, as `attachOverflow` reports them */
|
|
19
|
+
const gone = shallowRef([]);
|
|
20
|
+
const indicator = ref(null);
|
|
21
|
+
const enabled = () => options.overflow().enabled;
|
|
22
|
+
provide(overflowKey, { register(entry) {
|
|
23
|
+
const record = {
|
|
24
|
+
...entry,
|
|
25
|
+
id: ++ids
|
|
26
|
+
};
|
|
27
|
+
records.value = [...records.value, record];
|
|
28
|
+
return () => records.value = records.value.filter((each) => each !== record);
|
|
29
|
+
} });
|
|
30
|
+
const items = () => records.value.map((record) => record.element()).filter((element) => !!element);
|
|
31
|
+
const overflowed = computed(() => {
|
|
32
|
+
if (!enabled()) return [];
|
|
33
|
+
const byElement = new Map(records.value.map((record) => [record.element(), record]));
|
|
34
|
+
return gone.value.map((element) => byElement.get(element)).filter((record) => !!record);
|
|
35
|
+
});
|
|
36
|
+
let handle;
|
|
37
|
+
/** The container the primitive measures, which a host may replace, as a toolbar a FAB comes to */
|
|
38
|
+
let attached = null;
|
|
39
|
+
const release = () => {
|
|
40
|
+
handle?.detach();
|
|
41
|
+
handle = void 0;
|
|
42
|
+
attached = null;
|
|
43
|
+
gone.value = [];
|
|
44
|
+
};
|
|
45
|
+
const sync = () => {
|
|
46
|
+
const container = options.container.value;
|
|
47
|
+
if (!enabled() || !container) {
|
|
48
|
+
release();
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
if (handle && attached === container) {
|
|
52
|
+
handle.update();
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
release();
|
|
56
|
+
attached = container;
|
|
57
|
+
handle = attachOverflow(container, {
|
|
58
|
+
items,
|
|
59
|
+
indicator: () => indicator.value,
|
|
60
|
+
maxItems: () => options.overflow().maxItems,
|
|
61
|
+
axis: options.axis,
|
|
62
|
+
room: options.room,
|
|
63
|
+
held: () => !!options.overflow().held,
|
|
64
|
+
onOverflowedChange: (next) => gone.value = next
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
onMounted(sync);
|
|
68
|
+
onUpdated(sync);
|
|
69
|
+
watch([records, options.container], sync, { flush: "post" });
|
|
70
|
+
onBeforeUnmount(release);
|
|
71
|
+
return {
|
|
72
|
+
overflowed,
|
|
73
|
+
indicator,
|
|
74
|
+
enabled,
|
|
75
|
+
overflowing: () => enabled() && overflowed.value.length > 0,
|
|
76
|
+
indicatorVariant: () => options.overflow().indicatorVariant
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
export { overflowKey, useOverflowHost, useOverflowItem };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { CircularProgressProps } from "@rio-m3e/core";
|
|
2
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
3
|
+
import "@rio-m3e/styles/base/direction.css";
|
|
2
4
|
import "@rio-m3e/styles/progress.css";
|
|
3
5
|
declare const __VLS_export: import("vue").DefineComponent<CircularProgressProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CircularProgressProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
4
6
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { createCommentVNode, createElementBlock, createElementVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, onBeforeUnmount, onMounted, onUpdated, openBlock, unref, useTemplateRef } from "vue";
|
|
2
2
|
import { attachCircularProgress, createCircularProgress } from "@rio-m3e/core";
|
|
3
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
4
|
+
import "@rio-m3e/styles/base/direction.css";
|
|
3
5
|
import "@rio-m3e/styles/progress.css";
|
|
4
6
|
// src/progress/CircularProgress.vue
|
|
5
7
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
@@ -9,7 +11,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
9
11
|
value: {},
|
|
10
12
|
max: {},
|
|
11
13
|
wavy: { type: Boolean },
|
|
12
|
-
thickness: {}
|
|
14
|
+
thickness: {},
|
|
15
|
+
color: {}
|
|
13
16
|
},
|
|
14
17
|
setup(__props) {
|
|
15
18
|
const progress = createCircularProgress({ props: () => ({
|
|
@@ -17,7 +20,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
17
20
|
max: __props.max,
|
|
18
21
|
wavy: __props.wavy,
|
|
19
22
|
thickness: __props.thickness,
|
|
20
|
-
size: __props.size
|
|
23
|
+
size: __props.size,
|
|
24
|
+
color: __props.color
|
|
21
25
|
}) });
|
|
22
26
|
const root = useTemplateRef("root");
|
|
23
27
|
const indicator = useTemplateRef("indicator");
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
2
|
+
import "@rio-m3e/styles/base/direction.css";
|
|
1
3
|
import "@rio-m3e/styles/progress.css";
|
|
2
4
|
declare const __VLS_export: import("vue").DefineComponent<import("@rio-m3e/core").ProgressCommonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("@rio-m3e/core").ProgressCommonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
5
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { createCommentVNode, createElementBlock, createElementVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, onBeforeUnmount, onMounted, onUpdated, openBlock, unref, useTemplateRef } from "vue";
|
|
2
2
|
import { attachLinearProgress, createLinearProgress } from "@rio-m3e/core";
|
|
3
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
4
|
+
import "@rio-m3e/styles/base/direction.css";
|
|
3
5
|
import "@rio-m3e/styles/progress.css";
|
|
4
6
|
// src/progress/LinearProgress.vue
|
|
5
7
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
@@ -8,14 +10,16 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
8
10
|
value: {},
|
|
9
11
|
max: {},
|
|
10
12
|
wavy: { type: Boolean },
|
|
11
|
-
thickness: {}
|
|
13
|
+
thickness: {},
|
|
14
|
+
color: {}
|
|
12
15
|
},
|
|
13
16
|
setup(__props) {
|
|
14
17
|
const progress = createLinearProgress({ props: () => ({
|
|
15
18
|
value: __props.value,
|
|
16
19
|
max: __props.max,
|
|
17
20
|
wavy: __props.wavy,
|
|
18
|
-
thickness: __props.thickness
|
|
21
|
+
thickness: __props.thickness,
|
|
22
|
+
color: __props.color
|
|
19
23
|
}) });
|
|
20
24
|
const root = useTemplateRef("root");
|
|
21
25
|
const indicator = useTemplateRef("indicator");
|
package/dist/radio/Radio.vue.js
CHANGED
|
@@ -2,6 +2,7 @@ import { useRipple } from "../ripple/ripple.js";
|
|
|
2
2
|
import { radioGroupKey } from "./context.js";
|
|
3
3
|
import { createElementBlock, createElementVNode, defineComponent, guardReactiveProps, inject, mergeProps, normalizeProps, onBeforeUnmount, onMounted, onUpdated, openBlock, unref, useTemplateRef } from "vue";
|
|
4
4
|
import { attachCheckable, createRadio, mergePartAttrs } from "@rio-m3e/core";
|
|
5
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
5
6
|
import "@rio-m3e/styles/base/focus-ring.css";
|
|
6
7
|
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
7
8
|
import "@rio-m3e/styles/base/ripple.css";
|
|
@@ -13,6 +14,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
13
14
|
props: {
|
|
14
15
|
value: {},
|
|
15
16
|
selected: { type: Boolean },
|
|
17
|
+
color: {},
|
|
16
18
|
disabled: { type: Boolean },
|
|
17
19
|
softDisabled: { type: Boolean }
|
|
18
20
|
},
|
|
@@ -23,7 +25,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
23
25
|
const radio = createRadio({
|
|
24
26
|
props: () => ({
|
|
25
27
|
selected: isSelected(),
|
|
26
|
-
|
|
28
|
+
color: __props.color,
|
|
29
|
+
disabled: __props.disabled || group?.disabled() || void 0,
|
|
27
30
|
softDisabled: __props.softDisabled
|
|
28
31
|
}),
|
|
29
32
|
name: () => group?.name() ?? "",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { RadioGroupProps, RadioValue } from "@rio-m3e/core";
|
|
2
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
2
3
|
import "@rio-m3e/styles/radio.css";
|
|
3
4
|
interface Props extends RadioGroupProps {
|
|
4
5
|
/** The `name` the radio buttons submit their value under. Defaults to a unique one. */
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { radioGroupKey } from "./context.js";
|
|
2
2
|
import { createElementBlock, defineComponent, mergeModels, mergeProps, nextTick, onBeforeUnmount, onMounted, openBlock, provide, renderSlot, unref, useId, useModel, useTemplateRef, watch } from "vue";
|
|
3
3
|
import { attachRadioGroup, createRadioGroup } from "@rio-m3e/core";
|
|
4
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
4
5
|
import "@rio-m3e/styles/radio.css";
|
|
5
6
|
// src/radio/RadioGroup.vue
|
|
6
7
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
7
8
|
__name: "RadioGroup",
|
|
8
9
|
props: /*@__PURE__*/ mergeModels({
|
|
9
10
|
name: {},
|
|
10
|
-
label: {}
|
|
11
|
+
label: {},
|
|
12
|
+
color: {},
|
|
13
|
+
disabled: { type: Boolean }
|
|
11
14
|
}, {
|
|
12
15
|
"modelValue": {},
|
|
13
16
|
"modelModifiers": {}
|
|
@@ -16,13 +19,18 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
16
19
|
setup(__props) {
|
|
17
20
|
/** The selected radio button's value, with `v-model`. */
|
|
18
21
|
const model = useModel(__props, "modelValue");
|
|
19
|
-
const group = createRadioGroup({ props: () => ({
|
|
22
|
+
const group = createRadioGroup({ props: () => ({
|
|
23
|
+
label: __props.label,
|
|
24
|
+
color: __props.color,
|
|
25
|
+
disabled: __props.disabled
|
|
26
|
+
}) });
|
|
20
27
|
const id = useId();
|
|
21
28
|
const inputs = /* @__PURE__ */ new Set();
|
|
22
29
|
const resync = () => void nextTick(() => inputs.forEach((input) => input.sync()));
|
|
23
30
|
watch(model, resync);
|
|
24
31
|
provide(radioGroupKey, {
|
|
25
32
|
name: () => __props.name ?? `${id}-radio`,
|
|
33
|
+
disabled: group.disabled,
|
|
26
34
|
isSelected: (value) => model.value === value,
|
|
27
35
|
select: (value) => model.value = value,
|
|
28
36
|
register(input) {
|
package/dist/rio/rio.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RioIcons } from "../icon/icons.js";
|
|
1
2
|
import { App, MaybeRefOrGetter } from "vue";
|
|
2
3
|
import { PartialMessages } from "@rio-m3e/core";
|
|
3
4
|
import { ThemeOptions } from "@rio-m3e/tokens";
|
|
@@ -6,7 +7,8 @@ export type RioThemeOptions = ThemeOptions;
|
|
|
6
7
|
export interface RioOptions {
|
|
7
8
|
/**
|
|
8
9
|
* The theme, written as `--rio-*` variables on the document's root as the app installs Rio,
|
|
9
|
-
* before it mounts. A ref or a getter writes it again when it changes.
|
|
10
|
+
* before it mounts. A ref or a getter writes it again when it changes. Without its own
|
|
11
|
+
* `languageHeight`, the line heights follow the script of the app's language (`locale`).
|
|
10
12
|
*/
|
|
11
13
|
theme?: MaybeRefOrGetter<RioThemeOptions | undefined>;
|
|
12
14
|
/**
|
|
@@ -18,6 +20,12 @@ export interface RioOptions {
|
|
|
18
20
|
fallbackLocale?: MaybeRefOrGetter<string | undefined>;
|
|
19
21
|
/** Message tables by language tag: languages Rio has no table for, or messages that replace Rio's. */
|
|
20
22
|
messages?: MaybeRefOrGetter<Record<string, PartialMessages> | undefined>;
|
|
23
|
+
/**
|
|
24
|
+
* The app's icons: the ones the components draw on their own, by what they do (`aliases`),
|
|
25
|
+
* where the app's slot gives none, and `resolve`, which turns a name into an icon, as for
|
|
26
|
+
* `RioIcon`'s `icon`. Rio ships no icons.
|
|
27
|
+
*/
|
|
28
|
+
icons?: MaybeRefOrGetter<RioIcons | undefined>;
|
|
21
29
|
}
|
|
22
30
|
/** A Vue plugin, for `app.use` */
|
|
23
31
|
export interface RioPlugin {
|
package/dist/rio/rio.js
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
import { iconsKey } from "../icon/icons.js";
|
|
1
2
|
import { localeKey, messagesKey } from "../locale/locale.js";
|
|
2
3
|
import { computed, effectScope, toRef, toValue, watchEffect } from "vue";
|
|
3
|
-
import {
|
|
4
|
+
import { resolveLocale } from "@rio-m3e/core";
|
|
5
|
+
import { attachTheme, createThemeCss, languageHeightOf } from "@rio-m3e/tokens";
|
|
4
6
|
// src/rio/rio.ts
|
|
7
|
+
/** The theme, with the line heights for the language's script unless it gives its own */
|
|
8
|
+
const withLanguageHeight = (theme, locale) => theme && {
|
|
9
|
+
...theme,
|
|
10
|
+
languageHeight: theme.languageHeight ?? languageHeightOf(resolveLocale(locale))
|
|
11
|
+
};
|
|
5
12
|
/**
|
|
6
13
|
* Rio for a whole app: `app.use(createRio({ theme: { sourceColor: '#6750a4' }, locale: 'ko' }))`.
|
|
7
14
|
* A `RioLocaleProvider` inside, or a component's own `locale`, takes over the language from it.
|
|
@@ -9,11 +16,12 @@ import { attachTheme, createThemeCss } from "@rio-m3e/tokens";
|
|
|
9
16
|
function createRio(options = {}) {
|
|
10
17
|
return {
|
|
11
18
|
get css() {
|
|
12
|
-
const theme = toValue(options.theme);
|
|
19
|
+
const theme = withLanguageHeight(toValue(options.theme), toValue(options.locale));
|
|
13
20
|
return theme ? createThemeCss(theme) : "";
|
|
14
21
|
},
|
|
15
22
|
install(app) {
|
|
16
23
|
app.provide(localeKey, toRef(options.locale));
|
|
24
|
+
app.provide(iconsKey, computed(() => toValue(options.icons)));
|
|
17
25
|
app.provide(messagesKey, computed(() => ({
|
|
18
26
|
messages: toValue(options.messages),
|
|
19
27
|
fallbackLocale: toValue(options.fallbackLocale)
|
|
@@ -21,7 +29,7 @@ function createRio(options = {}) {
|
|
|
21
29
|
if (options.theme === void 0 || typeof document === "undefined") return;
|
|
22
30
|
const theme = attachTheme(document.documentElement);
|
|
23
31
|
const scope = effectScope(true);
|
|
24
|
-
scope.run(() => watchEffect(() => theme.update(toValue(options.theme))));
|
|
32
|
+
scope.run(() => watchEffect(() => theme.update(withLanguageHeight(toValue(options.theme), toValue(options.locale)))));
|
|
25
33
|
app.onUnmount(() => {
|
|
26
34
|
scope.stop();
|
|
27
35
|
theme.detach();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useLocale } from "../locale/locale.js";
|
|
2
2
|
import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, isMemoSame, mergeProps, normalizeProps, onBeforeUnmount, onMounted, onUpdated, openBlock, ref, renderList, toDisplayString, unref, useId, useModel, useTemplateRef } from "vue";
|
|
3
3
|
import { attachScrollField, createScrollField } from "@rio-m3e/core";
|
|
4
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
4
5
|
import "@rio-m3e/styles/base/focus-ring.css";
|
|
5
6
|
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
6
7
|
import "@rio-m3e/styles/scroll-field.css";
|
|
@@ -20,6 +21,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
20
21
|
invalid: { type: Boolean },
|
|
21
22
|
locale: {},
|
|
22
23
|
name: {},
|
|
24
|
+
color: {},
|
|
23
25
|
disabled: { type: Boolean },
|
|
24
26
|
softDisabled: { type: Boolean },
|
|
25
27
|
modelValue: {}
|
|
@@ -53,6 +55,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
53
55
|
invalid: invalid.value,
|
|
54
56
|
locale: locale.value,
|
|
55
57
|
name: props.name,
|
|
58
|
+
color: props.color,
|
|
56
59
|
disabled: props.disabled,
|
|
57
60
|
softDisabled: props.softDisabled
|
|
58
61
|
}),
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { SearchMessages, SearchProps } 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/search.css";
|
|
5
|
+
interface Props extends Omit<SearchProps, 'open' | 'value'> {
|
|
6
|
+
/**
|
|
7
|
+
* A language tag, for the hinted text and the buttons. Without it, the one provided, or the
|
|
8
|
+
* page's.
|
|
9
|
+
*/
|
|
10
|
+
locale?: string;
|
|
11
|
+
/** Replaces the hinted text's default, the buttons' names, and what the status announces. */
|
|
12
|
+
messages?: Partial<SearchMessages>;
|
|
13
|
+
}
|
|
14
|
+
type __VLS_Props = Props;
|
|
15
|
+
type __VLS_Slots = {
|
|
16
|
+
/** The suggestions or results, as a `RioList`, shown in the view */
|
|
17
|
+
default?: () => unknown;
|
|
18
|
+
/**
|
|
19
|
+
* Before the hinted text in the bar: a search icon by default (`search`), or an icon button,
|
|
20
|
+
* such as a menu button. The view shows a back button there.
|
|
21
|
+
*/
|
|
22
|
+
leading?: () => unknown;
|
|
23
|
+
/**
|
|
24
|
+
* Up to two icon buttons, or one and an avatar, after the text, in the bar and in the view.
|
|
25
|
+
* `open` tells which.
|
|
26
|
+
*/
|
|
27
|
+
trailing?: (props: {
|
|
28
|
+
open: boolean;
|
|
29
|
+
}) => unknown;
|
|
30
|
+
/** The view's back button's icon, in place of the one the app registered (`back`) */
|
|
31
|
+
'back-icon'?: () => unknown;
|
|
32
|
+
/** The view's clear button's icon, in place of the one the app registered (`close`) */
|
|
33
|
+
'clear-icon'?: () => unknown;
|
|
34
|
+
};
|
|
35
|
+
type __VLS_ModelProps = {
|
|
36
|
+
/** The query, with `v-model` */
|
|
37
|
+
modelValue?: string;
|
|
38
|
+
/** Whether the search view is open, with `v-model:open` */
|
|
39
|
+
'open'?: boolean;
|
|
40
|
+
};
|
|
41
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
42
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
43
|
+
"update:open": (value: boolean) => any;
|
|
44
|
+
"update:modelValue": (value: string) => any;
|
|
45
|
+
search: (value: string) => any;
|
|
46
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
47
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
48
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
49
|
+
onSearch?: ((value: string) => any) | undefined;
|
|
50
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
51
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
52
|
+
declare const _default: typeof __VLS_export;
|
|
53
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
54
|
+
new (): {
|
|
55
|
+
$slots: S;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
export { _default as default };
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import _sfc_main$1 from "../icon-button/IconButton.vue.js";
|
|
2
|
+
import { useComposingInput } from "../ime/composing.js";
|
|
3
|
+
import _sfc_main$2 from "../icon/Icon.vue.js";
|
|
4
|
+
import { useLocale, useMessages } from "../locale/locale.js";
|
|
5
|
+
import { keepPresses } from "../overlay/presses.js";
|
|
6
|
+
import { createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, guardReactiveProps, mergeModels, mergeProps, normalizeProps, onBeforeUnmount, onMounted, onUpdated, openBlock, ref, renderSlot, shallowRef, toDisplayString, toHandlers, unref, useId, useModel, useSlots, useTemplateRef, vModelDynamic, watch, withCtx, withDirectives } from "vue";
|
|
7
|
+
import { attachSearch, createSearch, mergePartAttrs } from "@rio-m3e/core";
|
|
8
|
+
import "@rio-m3e/styles/base/focus-ring.css";
|
|
9
|
+
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
10
|
+
import "@rio-m3e/styles/search.css";
|
|
11
|
+
// src/search/Search.vue
|
|
12
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
13
|
+
inheritAttrs: false,
|
|
14
|
+
__name: "Search",
|
|
15
|
+
props: /*@__PURE__*/ mergeModels({
|
|
16
|
+
locale: {},
|
|
17
|
+
messages: {},
|
|
18
|
+
placeholder: {},
|
|
19
|
+
layout: {},
|
|
20
|
+
disabled: { type: Boolean }
|
|
21
|
+
}, {
|
|
22
|
+
"modelValue": { default: "" },
|
|
23
|
+
"modelModifiers": {},
|
|
24
|
+
"open": {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: false
|
|
27
|
+
},
|
|
28
|
+
"openModifiers": {}
|
|
29
|
+
}),
|
|
30
|
+
emits: /*@__PURE__*/ mergeModels(["search"], ["update:modelValue", "update:open"]),
|
|
31
|
+
setup(__props, { emit: __emit }) {
|
|
32
|
+
/** The query, with `v-model` */
|
|
33
|
+
const model = useModel(__props, "modelValue");
|
|
34
|
+
/** Whether the search view is open, with `v-model:open` */
|
|
35
|
+
const open = useModel(__props, "open");
|
|
36
|
+
const emit = __emit;
|
|
37
|
+
const slots = useSlots();
|
|
38
|
+
const text = useMessages("search", useLocale(() => __props.locale), () => __props.messages);
|
|
39
|
+
const id = useId();
|
|
40
|
+
const compact = ref(false);
|
|
41
|
+
const results = ref(false);
|
|
42
|
+
const announcing = ref(false);
|
|
43
|
+
/** Where a docked view goes, as `attachSearch` reports it */
|
|
44
|
+
const place = shallowRef();
|
|
45
|
+
const search = createSearch({
|
|
46
|
+
props: () => ({
|
|
47
|
+
open: open.value,
|
|
48
|
+
value: model.value,
|
|
49
|
+
placeholder: __props.placeholder,
|
|
50
|
+
layout: __props.layout,
|
|
51
|
+
disabled: __props.disabled
|
|
52
|
+
}),
|
|
53
|
+
content: () => ({
|
|
54
|
+
leading: !!slots.leading,
|
|
55
|
+
trailing: !!slots.trailing
|
|
56
|
+
}),
|
|
57
|
+
messages: () => text.value,
|
|
58
|
+
ids: {
|
|
59
|
+
view: `${id}-view`,
|
|
60
|
+
text: `${id}-text`
|
|
61
|
+
},
|
|
62
|
+
compact: () => compact.value,
|
|
63
|
+
results: () => results.value,
|
|
64
|
+
announcing: () => announcing.value,
|
|
65
|
+
place: () => place.value,
|
|
66
|
+
onOpenChange: (next) => open.value = next,
|
|
67
|
+
onChange: (next) => model.value = next,
|
|
68
|
+
onSearch: (value) => emit("search", value)
|
|
69
|
+
});
|
|
70
|
+
const { onComposition, onInput } = useComposingInput((next) => model.value = String(next));
|
|
71
|
+
const bar = useTemplateRef("bar");
|
|
72
|
+
const field = useTemplateRef("field");
|
|
73
|
+
const view = useTemplateRef("view");
|
|
74
|
+
const input = useTemplateRef("input");
|
|
75
|
+
const list = useTemplateRef("results");
|
|
76
|
+
let handle;
|
|
77
|
+
onMounted(() => {
|
|
78
|
+
handle = attachSearch({
|
|
79
|
+
bar: bar.value,
|
|
80
|
+
field: field.value,
|
|
81
|
+
view: view.value,
|
|
82
|
+
input: input.value,
|
|
83
|
+
results: list.value
|
|
84
|
+
}, {
|
|
85
|
+
onOpenChange: (next) => open.value = next,
|
|
86
|
+
onResultsChange: (next) => results.value = next,
|
|
87
|
+
onAnnounceChange: (next) => announcing.value = next,
|
|
88
|
+
onCompactChange: (next) => compact.value = next,
|
|
89
|
+
onPlaceChange: (next) => place.value = next
|
|
90
|
+
});
|
|
91
|
+
handle.sync(open.value);
|
|
92
|
+
});
|
|
93
|
+
watch(open, (next) => handle?.sync(next), { flush: "post" });
|
|
94
|
+
onUpdated(() => handle?.update());
|
|
95
|
+
onBeforeUnmount(() => handle?.detach());
|
|
96
|
+
const clear = () => {
|
|
97
|
+
search.clear();
|
|
98
|
+
handle?.focusInput();
|
|
99
|
+
};
|
|
100
|
+
return (_ctx, _cache) => {
|
|
101
|
+
return openBlock(), createElementBlock("div", mergeProps(unref(search).parts.root(), {
|
|
102
|
+
class: _ctx.$attrs.class,
|
|
103
|
+
style: _ctx.$attrs.style
|
|
104
|
+
}), [createElementVNode("div", mergeProps({
|
|
105
|
+
ref_key: "bar",
|
|
106
|
+
ref: bar
|
|
107
|
+
}, unref(search).parts.bar()), [
|
|
108
|
+
createElementVNode("div", normalizeProps(guardReactiveProps(unref(search).parts.leading())), [renderSlot(_ctx.$slots, "leading", {}, () => [createVNode(_sfc_main$2, { alias: "search" })])], 16),
|
|
109
|
+
createElementVNode("button", mergeProps({
|
|
110
|
+
ref_key: "field",
|
|
111
|
+
ref: field
|
|
112
|
+
}, unref(search).parts.field(), {
|
|
113
|
+
onClick: _cache[0] || (_cache[0] = (...args) => unref(search).handleFieldClick && unref(search).handleFieldClick(...args)),
|
|
114
|
+
onKeydown: _cache[1] || (_cache[1] = (...args) => unref(search).handleFieldKeydown && unref(search).handleFieldKeydown(...args))
|
|
115
|
+
}), [createElementVNode("span", normalizeProps(guardReactiveProps(unref(search).parts.text())), toDisplayString(unref(search).fieldText()), 17)], 16),
|
|
116
|
+
unref(search).showsTrailing() ? (openBlock(), createElementBlock("div", normalizeProps(mergeProps({ key: 0 }, unref(search).parts.trailing())), [renderSlot(_ctx.$slots, "trailing", { open: false })], 16)) : createCommentVNode("v-if", true)
|
|
117
|
+
], 16), createElementVNode("dialog", mergeProps({
|
|
118
|
+
ref_key: "view",
|
|
119
|
+
ref: view
|
|
120
|
+
}, unref(search).parts.view(), toHandlers(unref(keepPresses), true)), [
|
|
121
|
+
createElementVNode("div", normalizeProps(guardReactiveProps(unref(search).parts.header())), [
|
|
122
|
+
createElementVNode("div", normalizeProps(guardReactiveProps(unref(search).parts.back())), [createVNode(_sfc_main$1, {
|
|
123
|
+
label: unref(text).back,
|
|
124
|
+
variant: "standard",
|
|
125
|
+
onClick: unref(search).close
|
|
126
|
+
}, {
|
|
127
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "back-icon", {}, () => [createVNode(_sfc_main$2, { alias: "back" })])]),
|
|
128
|
+
_: 3
|
|
129
|
+
}, 8, ["label", "onClick"])], 16),
|
|
130
|
+
createElementVNode("form", mergeProps(unref(search).parts.form(), { onSubmit: _cache[6] || (_cache[6] = (...args) => unref(search).handleSubmit && unref(search).handleSubmit(...args)) }), [createCommentVNode(" v-model, which keeps the input as it is while an IME composes, and onInput "), withDirectives(createElementVNode("input", mergeProps({
|
|
131
|
+
ref_key: "input",
|
|
132
|
+
ref: input,
|
|
133
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => model.value = $event),
|
|
134
|
+
onCompositionstart: _cache[3] || (_cache[3] = (...args) => unref(onComposition) && unref(onComposition)(...args)),
|
|
135
|
+
onCompositionend: _cache[4] || (_cache[4] = (...args) => unref(onComposition) && unref(onComposition)(...args)),
|
|
136
|
+
onInput: _cache[5] || (_cache[5] = (...args) => unref(onInput) && unref(onInput)(...args))
|
|
137
|
+
}, unref(mergePartAttrs)({
|
|
138
|
+
..._ctx.$attrs,
|
|
139
|
+
class: void 0,
|
|
140
|
+
style: void 0
|
|
141
|
+
}, unref(search).parts.input())), null, 16), [[vModelDynamic, model.value]])], 16),
|
|
142
|
+
unref(search).showsClear() ? (openBlock(), createElementBlock("div", normalizeProps(mergeProps({ key: 0 }, unref(search).parts.clear())), [createVNode(_sfc_main$1, {
|
|
143
|
+
label: unref(text).clear,
|
|
144
|
+
variant: "standard",
|
|
145
|
+
onClick: clear
|
|
146
|
+
}, {
|
|
147
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "clear-icon", {}, () => [createVNode(_sfc_main$2, { alias: "close" })])]),
|
|
148
|
+
_: 3
|
|
149
|
+
}, 8, ["label"])], 16)) : createCommentVNode("v-if", true),
|
|
150
|
+
unref(search).showsTrailing() ? (openBlock(), createElementBlock("div", normalizeProps(mergeProps({ key: 1 }, unref(search).parts.viewTrailing())), [renderSlot(_ctx.$slots, "trailing", { open: true })], 16)) : createCommentVNode("v-if", true)
|
|
151
|
+
], 16),
|
|
152
|
+
createElementVNode("div", mergeProps({
|
|
153
|
+
ref_key: "results",
|
|
154
|
+
ref: results
|
|
155
|
+
}, unref(search).parts.results()), [renderSlot(_ctx.$slots, "default")], 16),
|
|
156
|
+
createElementVNode("div", normalizeProps(guardReactiveProps(unref(search).parts.status())), toDisplayString(unref(search).statusText()), 17)
|
|
157
|
+
], 16)], 16);
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { defineComponent, renderSlot } from "vue";
|
|
2
|
+
// src/select/AfterOptions.vue
|
|
3
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
4
|
+
__name: "AfterOptions",
|
|
5
|
+
setup(__props) {
|
|
6
|
+
return (_ctx, _cache) => {
|
|
7
|
+
return renderSlot(_ctx.$slots, "default");
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
export { _sfc_main as default };
|