@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
package/NOTICE
CHANGED
|
@@ -4,3 +4,9 @@ Copyright 2026 LegenLee
|
|
|
4
4
|
This product bundles material-color-utilities
|
|
5
5
|
(https://github.com/material-foundation/material-color-utilities),
|
|
6
6
|
Copyright 2021 Google LLC, licensed under the Apache License, Version 2.0.
|
|
7
|
+
|
|
8
|
+
This product includes code ported from Android Jetpack (https://github.com/androidx/androidx):
|
|
9
|
+
graphics-shapes, Compose Material3's MaterialShapes and LoadingIndicator, and Compose
|
|
10
|
+
animation's spring estimation, Copyright 2020-2024 The Android Open Source Project, licensed
|
|
11
|
+
under the Apache License, Version 2.0. Each ported file says where it came from and what was
|
|
12
|
+
changed.
|
|
@@ -2,6 +2,7 @@ import { ButtonProps } 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/touch-target.css";
|
|
5
6
|
import "@rio-m3e/styles/button.css";
|
|
6
7
|
type __VLS_Slots = {
|
|
7
8
|
/** The label. */
|
|
@@ -10,11 +11,11 @@ type __VLS_Slots = {
|
|
|
10
11
|
icon?: () => unknown;
|
|
11
12
|
};
|
|
12
13
|
declare const __VLS_base: import("vue").DefineComponent<ButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
-
click: (event: MouseEvent) => any;
|
|
14
14
|
"update:selected": (selected: boolean) => any;
|
|
15
|
+
click: (event: MouseEvent) => any;
|
|
15
16
|
}, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{
|
|
16
|
-
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
17
17
|
"onUpdate:selected"?: ((selected: boolean) => any) | undefined;
|
|
18
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
18
19
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
20
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
20
21
|
declare const _default: typeof __VLS_export;
|
|
@@ -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 { createCommentVNode, createElementBlock, createElementVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderSlot, unref, useSlots, withDirectives } from "vue";
|
|
3
|
+
import { vCornerMorph } from "../corner-morph/corner-morph.js";
|
|
4
|
+
import { createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderSlot, resolveDynamicComponent, unref, useSlots, withCtx, withDirectives } from "vue";
|
|
5
5
|
import { createButton } 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
|
// src/button/Button.vue
|
|
11
12
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
@@ -19,6 +20,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
19
20
|
disabled: { type: Boolean },
|
|
20
21
|
softDisabled: { type: Boolean },
|
|
21
22
|
type: {},
|
|
23
|
+
href: {},
|
|
22
24
|
value: {}
|
|
23
25
|
},
|
|
24
26
|
emits: ["click", "update:selected"],
|
|
@@ -34,7 +36,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
34
36
|
disabled: __props.disabled,
|
|
35
37
|
softDisabled: __props.softDisabled,
|
|
36
38
|
type: __props.type,
|
|
37
|
-
value: __props.value
|
|
39
|
+
value: __props.value,
|
|
40
|
+
href: __props.href
|
|
38
41
|
}), (next) => emit("update:selected", next));
|
|
39
42
|
const button = createButton({
|
|
40
43
|
props: item.props,
|
|
@@ -43,11 +46,14 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
43
46
|
onChange: item.onChange
|
|
44
47
|
});
|
|
45
48
|
return (_ctx, _cache) => {
|
|
46
|
-
return withDirectives((openBlock(),
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
return withDirectives((openBlock(), createBlock(resolveDynamicComponent(unref(button).isLink() ? "a" : "button"), mergeProps(unref(button).parts.root(), { onClick: unref(button).handleClick }), {
|
|
50
|
+
default: withCtx(() => [
|
|
51
|
+
createElementVNode("span", normalizeProps(guardReactiveProps(unref(button).parts.touch())), null, 16),
|
|
52
|
+
unref(button).showsIcon() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 0 }, unref(button).parts.icon())), [renderSlot(_ctx.$slots, "icon")], 16)) : createCommentVNode("v-if", true),
|
|
53
|
+
createElementVNode("span", normalizeProps(guardReactiveProps(unref(button).parts.label())), [renderSlot(_ctx.$slots, "default")], 16)
|
|
54
|
+
]),
|
|
55
|
+
_: 3
|
|
56
|
+
}, 16, ["onClick"])), [[unref(vRipple)], [unref(vCornerMorph)]]);
|
|
51
57
|
};
|
|
52
58
|
}
|
|
53
59
|
});
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { useRipple } from "../ripple/ripple.js";
|
|
1
2
|
import { createElementBlock, createElementVNode, defineComponent, guardReactiveProps, mergeProps, nextTick, normalizeProps, onBeforeUnmount, onMounted, onUpdated, openBlock, unref, useTemplateRef } from "vue";
|
|
2
|
-
import { attachCheckable,
|
|
3
|
+
import { attachCheckable, createCheckbox, mergePartAttrs } from "@rio-m3e/core";
|
|
4
|
+
import "@rio-m3e/styles/base/focus-ring.css";
|
|
3
5
|
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
4
6
|
import "@rio-m3e/styles/base/ripple.css";
|
|
5
7
|
import "@rio-m3e/styles/checkbox.css";
|
|
@@ -26,8 +28,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
26
28
|
}) });
|
|
27
29
|
const input = useTemplateRef("input");
|
|
28
30
|
const state = useTemplateRef("state");
|
|
31
|
+
useRipple(input, state);
|
|
29
32
|
let checkable;
|
|
30
|
-
let ripple;
|
|
31
33
|
onMounted(() => {
|
|
32
34
|
checkable = attachCheckable(input.value, {
|
|
33
35
|
checked: () => !!__props.selected,
|
|
@@ -38,13 +40,9 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
38
40
|
nextTick(() => checkable?.sync());
|
|
39
41
|
}
|
|
40
42
|
});
|
|
41
|
-
ripple = attachRipple(input.value, { surface: state.value });
|
|
42
43
|
});
|
|
43
44
|
onUpdated(() => checkable?.sync());
|
|
44
|
-
onBeforeUnmount(() =>
|
|
45
|
-
checkable?.detach();
|
|
46
|
-
ripple?.detach();
|
|
47
|
-
});
|
|
45
|
+
onBeforeUnmount(() => checkable?.detach());
|
|
48
46
|
return (_ctx, _cache) => {
|
|
49
47
|
return openBlock(), createElementBlock("span", mergeProps(unref(checkbox).parts.root(), {
|
|
50
48
|
class: _ctx.$attrs.class,
|
|
@@ -53,12 +51,11 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
53
51
|
createElementVNode("input", mergeProps({
|
|
54
52
|
ref_key: "input",
|
|
55
53
|
ref: input
|
|
56
|
-
}, {
|
|
54
|
+
}, unref(mergePartAttrs)({
|
|
57
55
|
..._ctx.$attrs,
|
|
58
56
|
class: void 0,
|
|
59
|
-
style: void 0
|
|
60
|
-
|
|
61
|
-
}), null, 16),
|
|
57
|
+
style: void 0
|
|
58
|
+
}, unref(checkbox).parts.input())), null, 16),
|
|
62
59
|
createElementVNode("span", mergeProps({
|
|
63
60
|
ref_key: "state",
|
|
64
61
|
ref: state
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AssistChipProps } 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/base/touch-target.css";
|
|
5
|
+
import "@rio-m3e/styles/base/ripple.css";
|
|
6
|
+
import "@rio-m3e/styles/chip.css";
|
|
7
|
+
type __VLS_Slots = {
|
|
8
|
+
/** The label. */
|
|
9
|
+
default?: () => unknown;
|
|
10
|
+
/** A leading icon. It is hidden from assistive technology, so the label must stand alone. */
|
|
11
|
+
icon?: () => unknown;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<AssistChipProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
+
click: (event: MouseEvent) => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<AssistChipProps> & Readonly<{
|
|
16
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
17
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export { _default as default };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { useRipple } from "../ripple/ripple.js";
|
|
2
|
+
import { useChipSetItem } from "./context.js";
|
|
3
|
+
import { createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderSlot, resolveDynamicComponent, unref, useSlots, useTemplateRef, withCtx } from "vue";
|
|
4
|
+
import { createAssistChip } from "@rio-m3e/core";
|
|
5
|
+
import "@rio-m3e/styles/base/focus-ring.css";
|
|
6
|
+
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
7
|
+
import "@rio-m3e/styles/base/touch-target.css";
|
|
8
|
+
import "@rio-m3e/styles/base/ripple.css";
|
|
9
|
+
import "@rio-m3e/styles/chip.css";
|
|
10
|
+
// src/chip/AssistChip.vue
|
|
11
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
12
|
+
__name: "AssistChip",
|
|
13
|
+
props: {
|
|
14
|
+
elevated: { type: Boolean },
|
|
15
|
+
href: {},
|
|
16
|
+
disabled: { type: Boolean },
|
|
17
|
+
softDisabled: { type: Boolean }
|
|
18
|
+
},
|
|
19
|
+
emits: ["click"],
|
|
20
|
+
setup(__props, { emit: __emit }) {
|
|
21
|
+
const emit = __emit;
|
|
22
|
+
const slots = useSlots();
|
|
23
|
+
const item = useChipSetItem();
|
|
24
|
+
const chip = createAssistChip({
|
|
25
|
+
props: () => ({
|
|
26
|
+
elevated: __props.elevated,
|
|
27
|
+
href: __props.href,
|
|
28
|
+
disabled: __props.disabled,
|
|
29
|
+
softDisabled: __props.softDisabled
|
|
30
|
+
}),
|
|
31
|
+
content: () => ({ icon: !!slots.icon }),
|
|
32
|
+
key: item.key,
|
|
33
|
+
tabStop: item.tabStop,
|
|
34
|
+
onClick: (event) => emit("click", event)
|
|
35
|
+
});
|
|
36
|
+
useRipple(useTemplateRef("root"), useTemplateRef("state"));
|
|
37
|
+
return (_ctx, _cache) => {
|
|
38
|
+
return openBlock(), createBlock(resolveDynamicComponent(unref(chip).isLink() ? "a" : "button"), mergeProps({ ref: "root" }, unref(chip).parts.root(), { onClick: unref(chip).handleClick }), {
|
|
39
|
+
default: withCtx(() => [
|
|
40
|
+
createElementVNode("span", normalizeProps(guardReactiveProps(unref(chip).parts.touch())), null, 16),
|
|
41
|
+
createElementVNode("span", mergeProps({ ref: "state" }, unref(chip).parts.state()), null, 16),
|
|
42
|
+
unref(chip).showsIcon() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 0 }, unref(chip).parts.icon())), [renderSlot(_ctx.$slots, "icon")], 16)) : createCommentVNode("v-if", true),
|
|
43
|
+
createElementVNode("span", normalizeProps(guardReactiveProps(unref(chip).parts.label())), [renderSlot(_ctx.$slots, "default")], 16)
|
|
44
|
+
]),
|
|
45
|
+
_: 3
|
|
46
|
+
}, 16, ["onClick"]);
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ChipSetProps, ChipSetSelected } from "@rio-m3e/core";
|
|
2
|
+
import "@rio-m3e/styles/chip.css";
|
|
3
|
+
interface Props extends Omit<ChipSetProps, 'selected'> {
|
|
4
|
+
/** The selected value (`single`) or values (`multiple`), with `v-model`. */
|
|
5
|
+
modelValue?: ChipSetSelected;
|
|
6
|
+
}
|
|
7
|
+
type __VLS_Slots = {
|
|
8
|
+
/** The chips. Filter chips with a `value` take their selection from the set, with `selection`. */
|
|
9
|
+
default?: () => unknown;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
"update:modelValue": (selected: ChipSetSelected) => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
14
|
+
"onUpdate:modelValue"?: ((selected: ChipSetSelected) => 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,53 @@
|
|
|
1
|
+
import { chipSetKey } from "./context.js";
|
|
2
|
+
import { createElementBlock, defineComponent, mergeProps, onBeforeUnmount, onMounted, onUpdated, openBlock, provide, ref, renderSlot, unref, useTemplateRef } from "vue";
|
|
3
|
+
import { attachChipSet, createChipSet } from "@rio-m3e/core";
|
|
4
|
+
import "@rio-m3e/styles/chip.css";
|
|
5
|
+
// src/chip/ChipSet.vue
|
|
6
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
7
|
+
__name: "ChipSet",
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: {},
|
|
10
|
+
selection: {},
|
|
11
|
+
required: { type: Boolean },
|
|
12
|
+
scroll: { type: Boolean }
|
|
13
|
+
},
|
|
14
|
+
emits: ["update:modelValue"],
|
|
15
|
+
setup(__props, { emit: __emit }) {
|
|
16
|
+
const emit = __emit;
|
|
17
|
+
/** The key of the chip the set's tab stop is on, as `attachChipSet` reports it */
|
|
18
|
+
const tabStop = ref();
|
|
19
|
+
const set = createChipSet({
|
|
20
|
+
props: () => ({
|
|
21
|
+
selection: __props.selection,
|
|
22
|
+
required: __props.required,
|
|
23
|
+
scroll: __props.scroll,
|
|
24
|
+
selected: __props.modelValue
|
|
25
|
+
}),
|
|
26
|
+
tabStop: () => tabStop.value,
|
|
27
|
+
onChange: (selected) => emit("update:modelValue", selected)
|
|
28
|
+
});
|
|
29
|
+
provide(chipSetKey, {
|
|
30
|
+
selection: set.selection,
|
|
31
|
+
isSelected: set.isSelected,
|
|
32
|
+
select: set.select,
|
|
33
|
+
isTabStop: set.isTabStop
|
|
34
|
+
});
|
|
35
|
+
const root = useTemplateRef("root");
|
|
36
|
+
let handle;
|
|
37
|
+
onMounted(() => {
|
|
38
|
+
handle = attachChipSet(root.value, {
|
|
39
|
+
tabStop: () => tabStop.value,
|
|
40
|
+
onTabStopChange: (key) => tabStop.value = key
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
onUpdated(() => handle?.sync());
|
|
44
|
+
onBeforeUnmount(() => handle?.detach());
|
|
45
|
+
return (_ctx, _cache) => {
|
|
46
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
47
|
+
ref_key: "root",
|
|
48
|
+
ref: root
|
|
49
|
+
}, unref(set).parts.root()), [renderSlot(_ctx.$slots, "default")], 16);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { FilterChipProps } 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/base/touch-target.css";
|
|
5
|
+
import "@rio-m3e/styles/base/ripple.css";
|
|
6
|
+
import "@rio-m3e/styles/chip.css";
|
|
7
|
+
type __VLS_Slots = {
|
|
8
|
+
/** The label. */
|
|
9
|
+
default?: () => unknown;
|
|
10
|
+
/** A leading icon, shown while the chip isn't selected. Hidden from assistive technology. */
|
|
11
|
+
icon?: () => unknown;
|
|
12
|
+
/** The icon while the chip is selected, such as a checkmark. Hidden from assistive technology. */
|
|
13
|
+
'selected-icon'?: () => unknown;
|
|
14
|
+
/** A `menu` chip's trailing icon, such as a dropdown arrow, which turns over while open. */
|
|
15
|
+
'dropdown-icon'?: () => unknown;
|
|
16
|
+
};
|
|
17
|
+
declare const __VLS_base: import("vue").DefineComponent<FilterChipProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
|
+
"update:selected": (selected: boolean) => any;
|
|
19
|
+
"update:open": (open: boolean) => any;
|
|
20
|
+
click: (event: MouseEvent) => any;
|
|
21
|
+
}, string, import("vue").PublicProps, Readonly<FilterChipProps> & Readonly<{
|
|
22
|
+
"onUpdate:selected"?: ((selected: boolean) => any) | undefined;
|
|
23
|
+
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
24
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
25
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
27
|
+
declare const _default: typeof __VLS_export;
|
|
28
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export { _default as default };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { useRipple } from "../ripple/ripple.js";
|
|
2
|
+
import { useChipSetItem } from "./context.js";
|
|
3
|
+
import { createCommentVNode, createElementBlock, createElementVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderSlot, unref, useSlots, useTemplateRef } from "vue";
|
|
4
|
+
import { createFilterChip } from "@rio-m3e/core";
|
|
5
|
+
import "@rio-m3e/styles/base/focus-ring.css";
|
|
6
|
+
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
7
|
+
import "@rio-m3e/styles/base/touch-target.css";
|
|
8
|
+
import "@rio-m3e/styles/base/ripple.css";
|
|
9
|
+
import "@rio-m3e/styles/chip.css";
|
|
10
|
+
// src/chip/FilterChip.vue
|
|
11
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
12
|
+
__name: "FilterChip",
|
|
13
|
+
props: {
|
|
14
|
+
selected: { type: Boolean },
|
|
15
|
+
elevated: { type: Boolean },
|
|
16
|
+
value: {},
|
|
17
|
+
menu: { type: Boolean },
|
|
18
|
+
open: { type: Boolean },
|
|
19
|
+
disabled: { type: Boolean },
|
|
20
|
+
softDisabled: { type: Boolean }
|
|
21
|
+
},
|
|
22
|
+
emits: [
|
|
23
|
+
"click",
|
|
24
|
+
"update:selected",
|
|
25
|
+
"update:open"
|
|
26
|
+
],
|
|
27
|
+
setup(__props, { emit: __emit }) {
|
|
28
|
+
const emit = __emit;
|
|
29
|
+
const slots = useSlots();
|
|
30
|
+
const item = useChipSetItem();
|
|
31
|
+
const grouped = () => !!item.set && item.set.selection() !== "none" && __props.value !== void 0 && !__props.menu;
|
|
32
|
+
const chip = createFilterChip({
|
|
33
|
+
props: () => ({
|
|
34
|
+
selected: grouped() ? item.set.isSelected(__props.value) : __props.selected,
|
|
35
|
+
elevated: __props.elevated,
|
|
36
|
+
value: __props.value,
|
|
37
|
+
menu: __props.menu,
|
|
38
|
+
open: __props.open,
|
|
39
|
+
disabled: __props.disabled,
|
|
40
|
+
softDisabled: __props.softDisabled
|
|
41
|
+
}),
|
|
42
|
+
content: () => ({
|
|
43
|
+
icon: !!slots.icon,
|
|
44
|
+
selectedIcon: !!slots["selected-icon"],
|
|
45
|
+
dropdownIcon: !!slots["dropdown-icon"]
|
|
46
|
+
}),
|
|
47
|
+
key: item.key,
|
|
48
|
+
tabStop: item.tabStop,
|
|
49
|
+
onClick: (event) => emit("click", event),
|
|
50
|
+
onChange(next) {
|
|
51
|
+
if (grouped()) item.set.select(__props.value, next);
|
|
52
|
+
else emit("update:selected", next);
|
|
53
|
+
},
|
|
54
|
+
onOpenChange: (next) => emit("update:open", next)
|
|
55
|
+
});
|
|
56
|
+
useRipple(useTemplateRef("root"), useTemplateRef("state"));
|
|
57
|
+
return (_ctx, _cache) => {
|
|
58
|
+
return openBlock(), createElementBlock("button", mergeProps({ ref: "root" }, unref(chip).parts.root(), { onClick: _cache[0] || (_cache[0] = (...args) => unref(chip).handleClick && unref(chip).handleClick(...args)) }), [
|
|
59
|
+
createElementVNode("span", normalizeProps(guardReactiveProps(unref(chip).parts.touch())), null, 16),
|
|
60
|
+
createElementVNode("span", mergeProps({ ref: "state" }, unref(chip).parts.state()), null, 16),
|
|
61
|
+
unref(chip).showsIcon() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 0 }, unref(chip).parts.icon())), [unref(chip).showsSelectedIcon() ? renderSlot(_ctx.$slots, "selected-icon", {}, void 0, void 0, 0) : renderSlot(_ctx.$slots, "icon", {}, void 0, void 0, 1)], 16)) : createCommentVNode("v-if", true),
|
|
62
|
+
createElementVNode("span", normalizeProps(guardReactiveProps(unref(chip).parts.label())), [renderSlot(_ctx.$slots, "default")], 16),
|
|
63
|
+
unref(chip).showsTrailing() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 1 }, unref(chip).parts.trailing())), [renderSlot(_ctx.$slots, "dropdown-icon")], 16)) : createCommentVNode("v-if", true)
|
|
64
|
+
], 16);
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ChipMessages, InputChipProps } 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/base/touch-target.css";
|
|
5
|
+
import "@rio-m3e/styles/base/ripple.css";
|
|
6
|
+
import "@rio-m3e/styles/chip.css";
|
|
7
|
+
type __VLS_Props = InputChipProps & {
|
|
8
|
+
/** A language tag, for the remove button's name. Without it, the one provided, or the page's. */
|
|
9
|
+
locale?: string;
|
|
10
|
+
/** Replaces the remove button's name. */
|
|
11
|
+
messages?: Partial<ChipMessages>;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_Slots = {
|
|
14
|
+
/** The label, which names the chip and its remove button. */
|
|
15
|
+
default?: () => unknown;
|
|
16
|
+
/** A leading icon. Hidden from assistive technology. */
|
|
17
|
+
icon?: () => unknown;
|
|
18
|
+
/** A leading image, such as a person's avatar, in a 24px circle. It wins over the icon. */
|
|
19
|
+
avatar?: () => unknown;
|
|
20
|
+
/** The remove button's icon, such as an X. Hidden from assistive technology. */
|
|
21
|
+
'remove-icon'?: () => unknown;
|
|
22
|
+
};
|
|
23
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
24
|
+
click: (event: MouseEvent) => any;
|
|
25
|
+
remove: () => any;
|
|
26
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
27
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
28
|
+
onRemove?: (() => any) | undefined;
|
|
29
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
|
+
declare const _default: typeof __VLS_export;
|
|
32
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
33
|
+
new (): {
|
|
34
|
+
$slots: S;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export { _default as default };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { useLocale, useMessages } from "../locale/locale.js";
|
|
2
|
+
import { useRipple } from "../ripple/ripple.js";
|
|
3
|
+
import { useChipSetItem } from "./context.js";
|
|
4
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderSlot, resolveDynamicComponent, toDisplayString, unref, useAttrs, useId, useSlots, useTemplateRef, withCtx } from "vue";
|
|
5
|
+
import { createInputChip, mergePartAttrs } from "@rio-m3e/core";
|
|
6
|
+
import "@rio-m3e/styles/base/focus-ring.css";
|
|
7
|
+
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
8
|
+
import "@rio-m3e/styles/base/touch-target.css";
|
|
9
|
+
import "@rio-m3e/styles/base/ripple.css";
|
|
10
|
+
import "@rio-m3e/styles/chip.css";
|
|
11
|
+
// src/chip/InputChip.vue
|
|
12
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
13
|
+
inheritAttrs: false,
|
|
14
|
+
__name: "InputChip",
|
|
15
|
+
props: {
|
|
16
|
+
removeOnly: { type: Boolean },
|
|
17
|
+
disabled: { type: Boolean },
|
|
18
|
+
softDisabled: { type: Boolean },
|
|
19
|
+
locale: {},
|
|
20
|
+
messages: {}
|
|
21
|
+
},
|
|
22
|
+
emits: ["click", "remove"],
|
|
23
|
+
setup(__props, { emit: __emit }) {
|
|
24
|
+
const props = __props;
|
|
25
|
+
const emit = __emit;
|
|
26
|
+
const slots = useSlots();
|
|
27
|
+
const attrs = useAttrs();
|
|
28
|
+
const rest = computed(() => ({
|
|
29
|
+
...attrs,
|
|
30
|
+
class: void 0,
|
|
31
|
+
style: void 0
|
|
32
|
+
}));
|
|
33
|
+
const locale = useLocale(() => props.locale);
|
|
34
|
+
const messages = useMessages("chip", locale, () => props.messages);
|
|
35
|
+
const id = useId();
|
|
36
|
+
const item = useChipSetItem();
|
|
37
|
+
const chip = createInputChip({
|
|
38
|
+
props: () => ({
|
|
39
|
+
removeOnly: props.removeOnly,
|
|
40
|
+
disabled: props.disabled,
|
|
41
|
+
softDisabled: props.softDisabled
|
|
42
|
+
}),
|
|
43
|
+
content: () => ({
|
|
44
|
+
icon: !!slots.icon,
|
|
45
|
+
avatar: !!slots.avatar
|
|
46
|
+
}),
|
|
47
|
+
messages: () => messages.value,
|
|
48
|
+
ids: {
|
|
49
|
+
label: `${id}-label`,
|
|
50
|
+
removeBefore: `${id}-remove-before`,
|
|
51
|
+
removeAfter: `${id}-remove-after`
|
|
52
|
+
},
|
|
53
|
+
key: item.key,
|
|
54
|
+
tabStop: item.tabStop,
|
|
55
|
+
onClick: (event) => emit("click", event),
|
|
56
|
+
onRemove: () => emit("remove")
|
|
57
|
+
});
|
|
58
|
+
useRipple(useTemplateRef("action"), useTemplateRef("state"));
|
|
59
|
+
return (_ctx, _cache) => {
|
|
60
|
+
return openBlock(), createElementBlock("span", mergeProps(unref(chip).isAction() ? unref(chip).parts.root() : unref(mergePartAttrs)(rest.value, unref(chip).parts.root()), {
|
|
61
|
+
class: _ctx.$attrs.class,
|
|
62
|
+
style: _ctx.$attrs.style,
|
|
63
|
+
onKeydown: _cache[1] || (_cache[1] = (...args) => unref(chip).handleKeydown && unref(chip).handleKeydown(...args))
|
|
64
|
+
}), [
|
|
65
|
+
createElementVNode("span", mergeProps({ ref: "state" }, unref(chip).parts.state()), null, 16),
|
|
66
|
+
(openBlock(), createBlock(resolveDynamicComponent(unref(chip).isAction() ? "button" : "span"), mergeProps({ ref: "action" }, unref(chip).isAction() ? unref(mergePartAttrs)(rest.value, unref(chip).parts.action()) : unref(chip).parts.action(), { onClick: unref(chip).handleClick }), {
|
|
67
|
+
default: withCtx(() => [
|
|
68
|
+
createElementVNode("span", normalizeProps(guardReactiveProps(unref(chip).parts.touch())), null, 16),
|
|
69
|
+
unref(chip).showsAvatar() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 0 }, unref(chip).parts.avatar())), [renderSlot(_ctx.$slots, "avatar")], 16)) : createCommentVNode("v-if", true),
|
|
70
|
+
unref(chip).showsIcon() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 1 }, unref(chip).parts.icon())), [renderSlot(_ctx.$slots, "icon")], 16)) : createCommentVNode("v-if", true),
|
|
71
|
+
createElementVNode("span", normalizeProps(guardReactiveProps(unref(chip).parts.label())), [renderSlot(_ctx.$slots, "default")], 16)
|
|
72
|
+
]),
|
|
73
|
+
_: 3
|
|
74
|
+
}, 16, ["onClick"])),
|
|
75
|
+
createElementVNode("button", mergeProps(unref(chip).parts.remove(), { onClick: _cache[0] || (_cache[0] = (...args) => unref(chip).handleRemoveClick && unref(chip).handleRemoveClick(...args)) }), [createElementVNode("span", normalizeProps(guardReactiveProps(unref(chip).parts.removeTouch())), null, 16), createElementVNode("span", normalizeProps(guardReactiveProps(unref(chip).parts.removeIcon())), [renderSlot(_ctx.$slots, "remove-icon")], 16)], 16),
|
|
76
|
+
unref(chip).showsRemoveBefore() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 0 }, unref(chip).parts.removeBefore())), toDisplayString(unref(chip).removeText().before), 17)) : createCommentVNode("v-if", true),
|
|
77
|
+
unref(chip).showsRemoveAfter() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 1 }, unref(chip).parts.removeAfter())), toDisplayString(unref(chip).removeText().after), 17)) : createCommentVNode("v-if", true)
|
|
78
|
+
], 16);
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import "@rio-m3e/styles/base/focus-ring.css";
|
|
2
|
+
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
3
|
+
import "@rio-m3e/styles/base/touch-target.css";
|
|
4
|
+
import "@rio-m3e/styles/base/ripple.css";
|
|
5
|
+
import "@rio-m3e/styles/chip.css";
|
|
6
|
+
type __VLS_Slots = {
|
|
7
|
+
/** The label. */
|
|
8
|
+
default?: () => unknown;
|
|
9
|
+
/** A leading icon. It is hidden from assistive technology, so the label must stand alone. */
|
|
10
|
+
icon?: () => unknown;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<import("@rio-m3e/core").AssistChipProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
+
click: (event: MouseEvent) => any;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<import("@rio-m3e/core").AssistChipProps> & Readonly<{
|
|
15
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
16
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export { _default as default };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { useRipple } from "../ripple/ripple.js";
|
|
2
|
+
import { useChipSetItem } from "./context.js";
|
|
3
|
+
import { createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderSlot, resolveDynamicComponent, unref, useSlots, useTemplateRef, withCtx } from "vue";
|
|
4
|
+
import { createSuggestionChip } from "@rio-m3e/core";
|
|
5
|
+
import "@rio-m3e/styles/base/focus-ring.css";
|
|
6
|
+
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
7
|
+
import "@rio-m3e/styles/base/touch-target.css";
|
|
8
|
+
import "@rio-m3e/styles/base/ripple.css";
|
|
9
|
+
import "@rio-m3e/styles/chip.css";
|
|
10
|
+
// src/chip/SuggestionChip.vue
|
|
11
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
12
|
+
__name: "SuggestionChip",
|
|
13
|
+
props: {
|
|
14
|
+
elevated: { type: Boolean },
|
|
15
|
+
href: {},
|
|
16
|
+
disabled: { type: Boolean },
|
|
17
|
+
softDisabled: { type: Boolean }
|
|
18
|
+
},
|
|
19
|
+
emits: ["click"],
|
|
20
|
+
setup(__props, { emit: __emit }) {
|
|
21
|
+
const emit = __emit;
|
|
22
|
+
const slots = useSlots();
|
|
23
|
+
const item = useChipSetItem();
|
|
24
|
+
const chip = createSuggestionChip({
|
|
25
|
+
props: () => ({
|
|
26
|
+
elevated: __props.elevated,
|
|
27
|
+
href: __props.href,
|
|
28
|
+
disabled: __props.disabled,
|
|
29
|
+
softDisabled: __props.softDisabled
|
|
30
|
+
}),
|
|
31
|
+
content: () => ({ icon: !!slots.icon }),
|
|
32
|
+
key: item.key,
|
|
33
|
+
tabStop: item.tabStop,
|
|
34
|
+
onClick: (event) => emit("click", event)
|
|
35
|
+
});
|
|
36
|
+
useRipple(useTemplateRef("root"), useTemplateRef("state"));
|
|
37
|
+
return (_ctx, _cache) => {
|
|
38
|
+
return openBlock(), createBlock(resolveDynamicComponent(unref(chip).isLink() ? "a" : "button"), mergeProps({ ref: "root" }, unref(chip).parts.root(), { onClick: unref(chip).handleClick }), {
|
|
39
|
+
default: withCtx(() => [
|
|
40
|
+
createElementVNode("span", normalizeProps(guardReactiveProps(unref(chip).parts.touch())), null, 16),
|
|
41
|
+
createElementVNode("span", mergeProps({ ref: "state" }, unref(chip).parts.state()), null, 16),
|
|
42
|
+
unref(chip).showsIcon() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 0 }, unref(chip).parts.icon())), [renderSlot(_ctx.$slots, "icon")], 16)) : createCommentVNode("v-if", true),
|
|
43
|
+
createElementVNode("span", normalizeProps(guardReactiveProps(unref(chip).parts.label())), [renderSlot(_ctx.$slots, "default")], 16)
|
|
44
|
+
]),
|
|
45
|
+
_: 3
|
|
46
|
+
}, 16, ["onClick"]);
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { inject, useId } from "vue";
|
|
2
|
+
// src/chip/context.ts
|
|
3
|
+
const chipSetKey = Symbol("RioChipSet");
|
|
4
|
+
/**
|
|
5
|
+
* For the chips: the chip set around the chip, if any, the chip's key in it, and whether the chip
|
|
6
|
+
* is the set's tab stop. Outside a set, the chip has no key and no tab stop.
|
|
7
|
+
*/
|
|
8
|
+
function useChipSetItem() {
|
|
9
|
+
const set = inject(chipSetKey, null);
|
|
10
|
+
const key = useId();
|
|
11
|
+
return {
|
|
12
|
+
set,
|
|
13
|
+
key: () => set ? key : void 0,
|
|
14
|
+
tabStop: () => set?.isTabStop(key)
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export { chipSetKey, useChipSetItem };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { attachCornerMorph } from "@rio-m3e/core";
|
|
2
|
+
import "@rio-m3e/styles/base/corner-morph.css";
|
|
3
|
+
// src/corner-morph/corner-morph.ts
|
|
4
|
+
const handles = /* @__PURE__ */ new WeakMap();
|
|
5
|
+
/**
|
|
6
|
+
* Springs an element's corner radius toward `--rio-corner-morph-target` whenever its state
|
|
7
|
+
* attributes change. Its value, read once mounted, takes `attachCornerMorph`'s options. Used inside
|
|
8
|
+
* Rio's components; not exported yet.
|
|
9
|
+
*/
|
|
10
|
+
const vCornerMorph = {
|
|
11
|
+
mounted(el, binding) {
|
|
12
|
+
handles.set(el, attachCornerMorph(el, binding.value));
|
|
13
|
+
},
|
|
14
|
+
beforeUnmount(el) {
|
|
15
|
+
handles.get(el)?.detach();
|
|
16
|
+
handles.delete(el);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
export { vCornerMorph };
|