@rio-m3e/vue 0.5.0 → 0.6.1
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 +3 -2
- package/dist/checkbox/Checkbox.vue.d.ts +1 -0
- package/dist/checkbox/Checkbox.vue.js +5 -7
- 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 +2 -2
- package/dist/date-picker/DatePicker.vue.js +5 -4
- package/dist/date-picker/DatePickerDialog.vue.d.ts +2 -2
- package/dist/date-picker/DatePickerDialog.vue.js +7 -15
- 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 +3 -2
- package/dist/index.d.ts +39 -24
- package/dist/index.js +39 -24
- 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/menu/Menu.vue.d.ts +2 -2
- package/dist/menu/Menu.vue.js +9 -4
- package/dist/menu/SubMenu.vue.js +35 -24
- 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 +14 -12
- package/dist/rio/rio.d.ts +3 -8
- package/dist/rio/rio.js +4 -16
- 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 +2 -2
- package/dist/select/Select.vue.js +3 -2
- 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 +1 -2
- package/dist/time-picker/TimeInput.vue.d.ts +1 -0
- package/dist/time-picker/TimeInput.vue.js +5 -3
- package/dist/time-picker/TimePickerBody.vue.js +33 -7
- package/dist/time-picker/TimePickerDialog.vue.d.ts +11 -6
- package/dist/time-picker/TimePickerDialog.vue.js +16 -21
- package/dist/time-picker/TimeScroll.vue.d.ts +38 -0
- package/dist/time-picker/TimeScroll.vue.js +81 -0
- package/dist/tooltip/Tooltip.vue.js +10 -22
- package/package.json +4 -4
- package/dist/shape-morph/shape-morph.js +0 -18
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { vRipple } from "../ripple/ripple.js";
|
|
2
|
-
import {
|
|
2
|
+
import { vCornerMorph } from "../corner-morph/corner-morph.js";
|
|
3
3
|
import { createCommentVNode, createElementBlock, createElementVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, onBeforeUnmount, onMounted, openBlock, renderSlot, unref, useSlots, useTemplateRef, withDirectives } from "vue";
|
|
4
4
|
import { attachSplitButtonMenuIcon, createSplitButton } from "@rio-m3e/core";
|
|
5
5
|
import "@rio-m3e/styles/base/focus-ring.css";
|
|
6
6
|
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
7
7
|
import "@rio-m3e/styles/base/state-layer.css";
|
|
8
|
+
import "@rio-m3e/styles/base/touch-target.css";
|
|
8
9
|
import "@rio-m3e/styles/button.css";
|
|
9
10
|
import "@rio-m3e/styles/split-button.css";
|
|
10
11
|
// src/split-button/SplitButton.vue
|
|
@@ -63,10 +64,10 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
63
64
|
createElementVNode("span", normalizeProps(guardReactiveProps(unref(sb).parts.touch())), null, 16),
|
|
64
65
|
unref(sb).showsIcon() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 0 }, unref(sb).parts.icon())), [renderSlot(_ctx.$slots, "icon")], 16)) : createCommentVNode("v-if", true),
|
|
65
66
|
unref(sb).showsLabel() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 1 }, unref(sb).parts.label())), [renderSlot(_ctx.$slots, "default")], 16)) : createCommentVNode("v-if", true)
|
|
66
|
-
], 16)), [[unref(vRipple)], [unref(
|
|
67
|
+
], 16)), [[unref(vRipple)], [unref(vCornerMorph)]]), withDirectives((openBlock(), createElementBlock("button", mergeProps({
|
|
67
68
|
ref_key: "trailing",
|
|
68
69
|
ref: trailing
|
|
69
|
-
}, unref(sb).parts.trailing(), { onClick: _cache[1] || (_cache[1] = (...args) => unref(sb).handleTrailingClick && unref(sb).handleTrailingClick(...args)) }), [createElementVNode("span", normalizeProps(guardReactiveProps(unref(sb).parts.touch())), null, 16), createElementVNode("span", normalizeProps(guardReactiveProps(unref(sb).parts.menuIcon())), [renderSlot(_ctx.$slots, "menu-icon")], 16)], 16)), [[unref(vRipple)], [unref(
|
|
70
|
+
}, unref(sb).parts.trailing(), { onClick: _cache[1] || (_cache[1] = (...args) => unref(sb).handleTrailingClick && unref(sb).handleTrailingClick(...args)) }), [createElementVNode("span", normalizeProps(guardReactiveProps(unref(sb).parts.touch())), null, 16), createElementVNode("span", normalizeProps(guardReactiveProps(unref(sb).parts.menuIcon())), [renderSlot(_ctx.$slots, "menu-icon")], 16)], 16)), [[unref(vRipple)], [unref(vCornerMorph)]])], 16);
|
|
70
71
|
};
|
|
71
72
|
}
|
|
72
73
|
});
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { useRipple } from "../ripple/ripple.js";
|
|
2
|
+
import { createCommentVNode, createElementBlock, createElementVNode, defineComponent, guardReactiveProps, mergeProps, nextTick, normalizeProps, onBeforeUnmount, onMounted, onUpdated, openBlock, renderSlot, unref, useSlots, useTemplateRef } from "vue";
|
|
3
|
+
import { attachCheckable, attachSwitchHandle, createSwitch, mergePartAttrs } from "@rio-m3e/core";
|
|
3
4
|
import "@rio-m3e/styles/base/focus-ring.css";
|
|
4
5
|
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
5
6
|
import "@rio-m3e/styles/base/ripple.css";
|
|
6
7
|
import "@rio-m3e/styles/switch.css";
|
|
7
8
|
// src/switch/Switch.vue
|
|
8
9
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
10
|
+
inheritAttrs: false,
|
|
9
11
|
__name: "Switch",
|
|
10
12
|
props: {
|
|
11
13
|
selected: { type: Boolean },
|
|
@@ -16,7 +18,10 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
16
18
|
setup(__props, { emit: __emit }) {
|
|
17
19
|
const emit = __emit;
|
|
18
20
|
const slots = useSlots();
|
|
19
|
-
const onChange = (next) =>
|
|
21
|
+
const onChange = (next) => {
|
|
22
|
+
emit("update:selected", next);
|
|
23
|
+
nextTick(() => checkable?.sync());
|
|
24
|
+
};
|
|
20
25
|
const sw = createSwitch({
|
|
21
26
|
props: () => ({
|
|
22
27
|
selected: __props.selected,
|
|
@@ -30,21 +35,41 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
30
35
|
onChange
|
|
31
36
|
});
|
|
32
37
|
const root = useTemplateRef("root");
|
|
38
|
+
const input = useTemplateRef("input");
|
|
33
39
|
const state = useTemplateRef("state");
|
|
40
|
+
useRipple(input, state);
|
|
41
|
+
let checkable;
|
|
34
42
|
let handles = [];
|
|
35
43
|
onMounted(() => {
|
|
36
|
-
|
|
37
|
-
|
|
44
|
+
checkable = attachCheckable(input.value, {
|
|
45
|
+
checked: () => !!__props.selected,
|
|
46
|
+
blocked: sw.blocked,
|
|
47
|
+
onChange
|
|
48
|
+
});
|
|
49
|
+
handles = [checkable, attachSwitchHandle(root.value, {
|
|
50
|
+
input: input.value,
|
|
51
|
+
selected: () => !!__props.selected,
|
|
38
52
|
onChange
|
|
39
53
|
})];
|
|
40
54
|
});
|
|
55
|
+
onUpdated(() => checkable?.sync());
|
|
41
56
|
onBeforeUnmount(() => handles.forEach((handle) => handle.detach()));
|
|
42
57
|
return (_ctx, _cache) => {
|
|
43
|
-
return openBlock(), createElementBlock("
|
|
58
|
+
return openBlock(), createElementBlock("span", mergeProps({
|
|
44
59
|
ref_key: "root",
|
|
45
60
|
ref: root
|
|
46
|
-
}, unref(sw).parts.root(), {
|
|
47
|
-
|
|
61
|
+
}, unref(sw).parts.root(), {
|
|
62
|
+
class: _ctx.$attrs.class,
|
|
63
|
+
style: _ctx.$attrs.style
|
|
64
|
+
}), [
|
|
65
|
+
createElementVNode("input", mergeProps({
|
|
66
|
+
ref_key: "input",
|
|
67
|
+
ref: input
|
|
68
|
+
}, unref(mergePartAttrs)({
|
|
69
|
+
..._ctx.$attrs,
|
|
70
|
+
class: void 0,
|
|
71
|
+
style: void 0
|
|
72
|
+
}, unref(sw).parts.input()), { onKeydown: _cache[0] || (_cache[0] = (...args) => unref(sw).handleKeydown && unref(sw).handleKeydown(...args)) }), null, 16),
|
|
48
73
|
createElementVNode("span", mergeProps({
|
|
49
74
|
ref_key: "state",
|
|
50
75
|
ref: state
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createCommentVNode, createElementBlock, createElementVNode, defineComponent, guardReactiveProps, mergeModels, mergeProps, normalizeProps, onBeforeUnmount, onMounted,
|
|
1
|
+
import { createCommentVNode, createElementBlock, createElementVNode, defineComponent, guardReactiveProps, mergeModels, mergeProps, normalizeProps, onBeforeUnmount, onMounted, openBlock, renderSlot, toDisplayString, unref, useAttrs, useId, useModel, useSlots, useTemplateRef, vModelDynamic, vModelText, withDirectives } from "vue";
|
|
2
2
|
import { attachTextField, createTextField, mergePartAttrs } from "@rio-m3e/core";
|
|
3
3
|
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
4
4
|
import "@rio-m3e/styles/text-field.css";
|
|
@@ -69,7 +69,6 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
69
69
|
const input = useTemplateRef("input");
|
|
70
70
|
let handle;
|
|
71
71
|
onMounted(() => handle = attachTextField(container.value, () => input.value));
|
|
72
|
-
onUpdated(() => handle?.update());
|
|
73
72
|
onBeforeUnmount(() => handle?.detach());
|
|
74
73
|
return (_ctx, _cache) => {
|
|
75
74
|
return openBlock(), createElementBlock("div", mergeProps(unref(field).parts.root(), {
|
|
@@ -2,6 +2,7 @@ import { HourCycle, TimePickerMessages } 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/time-picker.css";
|
|
6
7
|
type __VLS_Props = {
|
|
7
8
|
/** A language tag. Without it, the one provided, or the document's, or the browser's. */
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { useLocale, useMessages } from "../locale/locale.js";
|
|
2
2
|
import _sfc_main$1 from "./TimePickerBody.vue.js";
|
|
3
3
|
import { createCommentVNode, createElementBlock, createVNode, defineComponent, mergeModels, mergeProps, normalizeProps, onBeforeUnmount, onMounted, openBlock, reactive, toDisplayString, unref, useId, useModel, useTemplateRef, watch } from "vue";
|
|
4
|
-
import { attachTimePicker, createTimePicker,
|
|
4
|
+
import { attachTimePicker, createTimePicker, initialTimePickerState } from "@rio-m3e/core";
|
|
5
5
|
import "@rio-m3e/styles/base/focus-ring.css";
|
|
6
6
|
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
7
7
|
import "@rio-m3e/styles/base/state-layer.css";
|
|
8
|
+
import "@rio-m3e/styles/base/touch-target.css";
|
|
8
9
|
import "@rio-m3e/styles/time-picker.css";
|
|
9
10
|
// src/time-picker/TimeInput.vue
|
|
10
11
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
@@ -25,7 +26,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
25
26
|
const locale = useLocale(() => props.locale);
|
|
26
27
|
const messages = useMessages("timePicker", locale, () => props.messages);
|
|
27
28
|
const state = reactive({
|
|
28
|
-
...
|
|
29
|
+
...initialTimePickerState(model.value),
|
|
29
30
|
mode: "input"
|
|
30
31
|
});
|
|
31
32
|
const id = useId();
|
|
@@ -55,7 +56,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
55
56
|
selection: () => state.selection,
|
|
56
57
|
hourCycle: picker.hourCycle,
|
|
57
58
|
onPick: picker.dialPick,
|
|
58
|
-
onPeriod: picker.selectPeriod
|
|
59
|
+
onPeriod: picker.selectPeriod,
|
|
60
|
+
onHover: picker.hover
|
|
59
61
|
});
|
|
60
62
|
});
|
|
61
63
|
watch(state, () => handle?.sync(), { flush: "post" });
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { vRipple } from "../ripple/ripple.js";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import { vCornerMorph } from "../corner-morph/corner-morph.js";
|
|
3
|
+
import _sfc_main$1 from "../scroll-field/ScrollField.vue.js";
|
|
4
|
+
import { Fragment, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderList, renderSlot, toDisplayString, unref, withDirectives, withKeys } from "vue";
|
|
4
5
|
// src/time-picker/TimePickerBody.vue
|
|
5
6
|
const _hoisted_1 = ["value"];
|
|
6
7
|
const _hoisted_2 = ["value"];
|
|
@@ -9,6 +10,17 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
9
10
|
__name: "TimePickerBody",
|
|
10
11
|
props: { picker: {} },
|
|
11
12
|
setup(__props) {
|
|
13
|
+
const props = __props;
|
|
14
|
+
/** A scroll field's props, its value as `v-model`'s, and its root's attributes */
|
|
15
|
+
const scrollField = (field) => {
|
|
16
|
+
const { value, ...rest } = props.picker.scrollField(field);
|
|
17
|
+
const { parts } = props.picker;
|
|
18
|
+
return {
|
|
19
|
+
...field === "hour" ? parts.hourField() : parts.minuteField(),
|
|
20
|
+
...rest,
|
|
21
|
+
modelValue: value
|
|
22
|
+
};
|
|
23
|
+
};
|
|
12
24
|
return (_ctx, _cache) => {
|
|
13
25
|
return openBlock(), createElementBlock("div", normalizeProps(guardReactiveProps(__props.picker.parts.body())), [
|
|
14
26
|
createElementVNode("div", normalizeProps(guardReactiveProps(__props.picker.parts.fields())), [__props.picker.textInput() ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
@@ -25,13 +37,27 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
25
37
|
onChange: _cache[4] || (_cache[4] = (...args) => __props.picker.commitText && __props.picker.commitText(...args)),
|
|
26
38
|
onKeydown: _cache[5] || (_cache[5] = withKeys((...args) => __props.picker.commitText && __props.picker.commitText(...args), ["enter"]))
|
|
27
39
|
}), null, 16, _hoisted_2), createElementVNode("span", normalizeProps(guardReactiveProps(__props.picker.parts.minuteLabel())), toDisplayString(__props.picker.fieldNames()[1]), 17)], 16)
|
|
28
|
-
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
29
|
-
|
|
40
|
+
], 64)) : __props.picker.showsScroll() ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
41
|
+
createCommentVNode(" The fields don't take typed text: Space and Enter switch to the text input. "),
|
|
42
|
+
createVNode(_sfc_main$1, mergeProps(scrollField("hour"), {
|
|
43
|
+
editing: false,
|
|
44
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => __props.picker.scrollPick("hour", $event)),
|
|
45
|
+
"onUpdate:editing": __props.picker.handleScrollEditing
|
|
46
|
+
}), null, 16, ["onUpdate:editing"]),
|
|
47
|
+
createElementVNode("span", normalizeProps(guardReactiveProps(__props.picker.parts.separator())), ":", 16),
|
|
48
|
+
createVNode(_sfc_main$1, mergeProps(scrollField("minute"), {
|
|
49
|
+
editing: false,
|
|
50
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => __props.picker.scrollPick("minute", $event)),
|
|
51
|
+
"onUpdate:editing": __props.picker.handleScrollEditing
|
|
52
|
+
}), null, 16, ["onUpdate:editing"])
|
|
53
|
+
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
54
|
+
withDirectives((openBlock(), createElementBlock("button", mergeProps(__props.picker.parts.hourField(), { onClick: _cache[8] || (_cache[8] = ($event) => __props.picker.selectField("hour")) }), [createTextVNode(toDisplayString(__props.picker.hourText()), 1)], 16)), [[unref(vRipple)]]),
|
|
30
55
|
createElementVNode("span", normalizeProps(guardReactiveProps(__props.picker.parts.separator())), ":", 16),
|
|
31
|
-
withDirectives((openBlock(), createElementBlock("button", mergeProps(__props.picker.parts.minuteField(), { onClick: _cache[
|
|
56
|
+
withDirectives((openBlock(), createElementBlock("button", mergeProps(__props.picker.parts.minuteField(), { onClick: _cache[9] || (_cache[9] = ($event) => __props.picker.selectField("minute")) }), [createTextVNode(toDisplayString(__props.picker.minuteText()), 1)], 16)), [[unref(vRipple)]])
|
|
32
57
|
], 64))], 16),
|
|
33
|
-
__props.picker.showsPeriod() ? (openBlock(), createElementBlock("div", normalizeProps(mergeProps({ key: 0 }, __props.picker.parts.period())), [withDirectives((openBlock(), createElementBlock("button", mergeProps(__props.picker.parts.am(), { onClick: _cache[
|
|
34
|
-
__props.picker.
|
|
58
|
+
__props.picker.showsPeriod() ? (openBlock(), createElementBlock("div", normalizeProps(mergeProps({ key: 0 }, __props.picker.parts.period())), [withDirectives((openBlock(), createElementBlock("button", mergeProps(__props.picker.parts.am(), { onClick: _cache[10] || (_cache[10] = ($event) => __props.picker.selectPeriod(false)) }), [createTextVNode(toDisplayString(__props.picker.periodNames()[0]) + " ", 1), createElementVNode("span", normalizeProps(guardReactiveProps(__props.picker.parts.periodTouch())), null, 16)], 16)), [[unref(vRipple)], [unref(vCornerMorph)]]), withDirectives((openBlock(), createElementBlock("button", mergeProps(__props.picker.parts.pm(), { onClick: _cache[11] || (_cache[11] = ($event) => __props.picker.selectPeriod(true)) }), [createTextVNode(toDisplayString(__props.picker.periodNames()[1]) + " ", 1), createElementVNode("span", normalizeProps(guardReactiveProps(__props.picker.parts.periodTouch())), null, 16)], 16)), [[unref(vRipple)], [unref(vCornerMorph)]])], 16)) : createCommentVNode("v-if", true),
|
|
59
|
+
__props.picker.showsToggle() ? (openBlock(), createElementBlock("div", normalizeProps(mergeProps({ key: 1 }, __props.picker.parts.toggle())), [renderSlot(_ctx.$slots, "toggle")], 16)) : createCommentVNode("v-if", true),
|
|
60
|
+
__props.picker.showsDial() ? (openBlock(), createElementBlock("div", normalizeProps(mergeProps({ key: 2 }, __props.picker.parts.dial())), [
|
|
35
61
|
createElementVNode("span", normalizeProps(guardReactiveProps(__props.picker.parts.dialTrack())), null, 16),
|
|
36
62
|
createElementVNode("span", normalizeProps(guardReactiveProps(__props.picker.parts.dialHandle())), null, 16),
|
|
37
63
|
createElementVNode("span", normalizeProps(guardReactiveProps(__props.picker.parts.dialCenter())), null, 16),
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { HourCycle, TimePickerLayout, TimePickerMessages, TimePickerMode } from "@rio-m3e/core";
|
|
1
|
+
import { HourCycle, TimePickerKind, TimePickerLayout, TimePickerMessages, TimePickerMode } 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/dialog.css";
|
|
6
7
|
import "@rio-m3e/styles/time-picker.css";
|
|
7
8
|
type __VLS_Props = {
|
|
@@ -11,16 +12,20 @@ type __VLS_Props = {
|
|
|
11
12
|
hourCycle?: HourCycle;
|
|
12
13
|
/** The dial beside the fields, or below them. Defaults to `'auto'`, from the window's height. */
|
|
13
14
|
layout?: TimePickerLayout;
|
|
14
|
-
/**
|
|
15
|
+
/** The picker, which switches to the text input: the dial, or scroll fields. Defaults to `'dial'`. */
|
|
16
|
+
picker?: TimePickerKind;
|
|
17
|
+
/** What each opening starts in: the picker, or the text input. Defaults to `'picker'`. */
|
|
15
18
|
initialMode?: TimePickerMode;
|
|
16
19
|
/** Replaces any of the text the dialog shows. */
|
|
17
20
|
messages?: Partial<TimePickerMessages>;
|
|
18
21
|
};
|
|
19
22
|
type __VLS_Slots = {
|
|
20
|
-
/** The mode button's icon on the dial, which switches to the text input */
|
|
23
|
+
/** The mode button's icon on the dial or the scroll fields, which switches to the text input */
|
|
21
24
|
'keyboard-icon'?: () => unknown;
|
|
22
|
-
/** The mode button's icon in the text input, which switches to the dial */
|
|
25
|
+
/** The mode button's icon in the text input, which switches back to the dial */
|
|
23
26
|
'clock-icon'?: () => unknown;
|
|
27
|
+
/** The mode button's icon in the text input, which switches back to the scroll fields */
|
|
28
|
+
'swipe-icon'?: () => unknown;
|
|
24
29
|
};
|
|
25
30
|
type __VLS_ModelProps = {
|
|
26
31
|
/** The time, `HH:MM` on a 24-hour clock, with `v-model`. It changes on OK. */
|
|
@@ -30,11 +35,11 @@ type __VLS_ModelProps = {
|
|
|
30
35
|
};
|
|
31
36
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
32
37
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
33
|
-
"update:open": (value: boolean) => any;
|
|
34
38
|
"update:modelValue": (value: string | undefined) => any;
|
|
39
|
+
"update:open": (value: boolean) => any;
|
|
35
40
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
36
|
-
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
37
41
|
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
42
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
38
43
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
39
44
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
40
45
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import _sfc_main$1 from "../button/Button.vue.js";
|
|
2
2
|
import _sfc_main$2 from "../icon-button/IconButton.vue.js";
|
|
3
3
|
import { useLocale, useMessages } from "../locale/locale.js";
|
|
4
|
+
import { keepPresses } from "../overlay/presses.js";
|
|
4
5
|
import _sfc_main$3 from "./TimePickerBody.vue.js";
|
|
5
|
-
import { Fragment, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, guardReactiveProps, mergeModels, mergeProps, normalizeProps, onBeforeUnmount, onMounted, openBlock, reactive, ref, renderSlot, toDisplayString, unref, useId, useModel, useTemplateRef, watch, withCtx
|
|
6
|
-
import { attachDialog, attachTimePicker, createTimePicker,
|
|
6
|
+
import { Fragment, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, guardReactiveProps, mergeModels, mergeProps, normalizeProps, onBeforeUnmount, onMounted, openBlock, reactive, ref, renderSlot, toDisplayString, toHandlers, unref, useId, useModel, useTemplateRef, watch, withCtx } from "vue";
|
|
7
|
+
import { attachDialog, attachTimePicker, createTimePicker, initialTimePickerState } from "@rio-m3e/core";
|
|
7
8
|
import "@rio-m3e/styles/base/focus-ring.css";
|
|
8
9
|
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
9
10
|
import "@rio-m3e/styles/base/state-layer.css";
|
|
11
|
+
import "@rio-m3e/styles/base/touch-target.css";
|
|
10
12
|
import "@rio-m3e/styles/dialog.css";
|
|
11
13
|
import "@rio-m3e/styles/time-picker.css";
|
|
12
14
|
// src/time-picker/TimePickerDialog.vue
|
|
@@ -16,6 +18,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
16
18
|
locale: {},
|
|
17
19
|
hourCycle: {},
|
|
18
20
|
layout: {},
|
|
21
|
+
picker: {},
|
|
19
22
|
initialMode: {},
|
|
20
23
|
messages: {}
|
|
21
24
|
}, {
|
|
@@ -36,7 +39,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
36
39
|
const open = useModel(__props, "open");
|
|
37
40
|
const locale = useLocale(() => props.locale);
|
|
38
41
|
const messages = useMessages("timePicker", locale, () => props.messages);
|
|
39
|
-
const state = reactive(
|
|
42
|
+
const state = reactive(initialTimePickerState(model.value));
|
|
40
43
|
const rendered = ref(open.value);
|
|
41
44
|
const id = useId();
|
|
42
45
|
const picker = createTimePicker({
|
|
@@ -47,6 +50,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
47
50
|
locale: locale.value,
|
|
48
51
|
hourCycle: props.hourCycle,
|
|
49
52
|
layout: props.layout,
|
|
53
|
+
picker: props.picker,
|
|
50
54
|
initialMode: props.initialMode,
|
|
51
55
|
rendered: rendered.value
|
|
52
56
|
}),
|
|
@@ -72,14 +76,15 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
72
76
|
onClosed: () => {
|
|
73
77
|
if (!open.value) rendered.value = false;
|
|
74
78
|
},
|
|
75
|
-
initialFocus: () => root.value?.querySelector("
|
|
79
|
+
initialFocus: () => root.value?.querySelector("[data-field=\"hour\"]")
|
|
76
80
|
});
|
|
77
81
|
dialogHandle.sync(open.value);
|
|
78
82
|
handle = attachTimePicker(root.value, {
|
|
79
83
|
selection: () => state.selection,
|
|
80
84
|
hourCycle: picker.hourCycle,
|
|
81
85
|
onPick: picker.dialPick,
|
|
82
|
-
onPeriod: picker.selectPeriod
|
|
86
|
+
onPeriod: picker.selectPeriod,
|
|
87
|
+
onHover: picker.hover
|
|
83
88
|
});
|
|
84
89
|
});
|
|
85
90
|
watch(open, (next) => dialogHandle?.sync(next), { flush: "post" });
|
|
@@ -95,31 +100,21 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
95
100
|
picker.confirm();
|
|
96
101
|
};
|
|
97
102
|
return (_ctx, _cache) => {
|
|
98
|
-
return openBlock(), createElementBlock(
|
|
103
|
+
return openBlock(), createElementBlock("dialog", mergeProps({
|
|
99
104
|
ref_key: "root",
|
|
100
105
|
ref: root
|
|
101
|
-
}, unref(picker).parts.root(), {
|
|
102
|
-
onKeydown,
|
|
103
|
-
onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"])),
|
|
104
|
-
onAuxclick: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"])),
|
|
105
|
-
onDblclick: _cache[2] || (_cache[2] = withModifiers(() => {}, ["stop"])),
|
|
106
|
-
onPointerdown: _cache[3] || (_cache[3] = withModifiers(() => {}, ["stop"])),
|
|
107
|
-
onPointerup: _cache[4] || (_cache[4] = withModifiers(() => {}, ["stop"])),
|
|
108
|
-
onMousedown: _cache[5] || (_cache[5] = withModifiers(() => {}, ["stop"])),
|
|
109
|
-
onMouseup: _cache[6] || (_cache[6] = withModifiers(() => {}, ["stop"])),
|
|
110
|
-
onContextmenu: _cache[7] || (_cache[7] = withModifiers(() => {}, ["stop"]))
|
|
111
|
-
}), [rendered.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
106
|
+
}, unref(picker).parts.root(), { onKeydown }, toHandlers(unref(keepPresses), true)), [rendered.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
112
107
|
createVNode(_sfc_main$3, { picker: unref(picker) }, null, 8, ["picker"]),
|
|
113
108
|
unref(picker).showsError() ? (openBlock(), createElementBlock("div", normalizeProps(mergeProps({ key: 0 }, unref(picker).parts.error())), toDisplayString(unref(picker).error()), 17)) : createCommentVNode("v-if", true),
|
|
114
109
|
createElementVNode("div", normalizeProps(guardReactiveProps(unref(picker).parts.actions())), [
|
|
115
110
|
createVNode(_sfc_main$2, {
|
|
116
111
|
variant: "standard",
|
|
117
112
|
label: unref(picker).modeButtonLabel(),
|
|
118
|
-
onClick: unref(picker).switchMode
|
|
113
|
+
onClick: _cache[0] || (_cache[0] = ($event) => unref(picker).switchMode())
|
|
119
114
|
}, {
|
|
120
|
-
default: withCtx(() => [
|
|
115
|
+
default: withCtx(() => [unref(picker).modeButtonIcon() === "keyboard" ? renderSlot(_ctx.$slots, "keyboard-icon", {}, void 0, void 0, 0) : unref(picker).modeButtonIcon() === "clock" ? renderSlot(_ctx.$slots, "clock-icon", {}, void 0, void 0, 1) : renderSlot(_ctx.$slots, "swipe-icon", {}, void 0, void 0, 2)]),
|
|
121
116
|
_: 3
|
|
122
|
-
}, 8, ["label"
|
|
117
|
+
}, 8, ["label"]),
|
|
123
118
|
createVNode(_sfc_main$1, {
|
|
124
119
|
variant: "text",
|
|
125
120
|
onClick: unref(picker).cancel
|
|
@@ -135,7 +130,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
135
130
|
_: 1
|
|
136
131
|
}, 8, ["onClick"])
|
|
137
132
|
], 16)
|
|
138
|
-
], 64)) : createCommentVNode("v-if", true)], 16)
|
|
133
|
+
], 64)) : createCommentVNode("v-if", true)], 16);
|
|
139
134
|
};
|
|
140
135
|
}
|
|
141
136
|
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { HourCycle, TimePickerMessages } 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/state-layer.css";
|
|
5
|
+
import "@rio-m3e/styles/base/touch-target.css";
|
|
6
|
+
import "@rio-m3e/styles/time-picker.css";
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
/** A language tag. Without it, the one provided, or the document's, or the browser's. */
|
|
9
|
+
locale?: string;
|
|
10
|
+
/** Overrides the language's clock: 12 hours with AM and PM, or 24. */
|
|
11
|
+
hourCycle?: HourCycle;
|
|
12
|
+
/** Replaces any of the text the picker shows. */
|
|
13
|
+
messages?: Partial<TimePickerMessages>;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_Slots = {
|
|
16
|
+
/** The mode button's icon on the scroll fields, which switches to the text input */
|
|
17
|
+
'keyboard-icon'?: () => unknown;
|
|
18
|
+
/** The mode button's icon in the text input, which switches back to the scroll fields */
|
|
19
|
+
'swipe-icon'?: () => unknown;
|
|
20
|
+
};
|
|
21
|
+
type __VLS_ModelProps = {
|
|
22
|
+
/** The time, `HH:MM` on a 24-hour clock, with `v-model`. */
|
|
23
|
+
modelValue?: string | undefined;
|
|
24
|
+
};
|
|
25
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
26
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
27
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
28
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
29
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
30
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
32
|
+
declare const _default: typeof __VLS_export;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export { _default as default };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import _sfc_main$1 from "../icon-button/IconButton.vue.js";
|
|
2
|
+
import { useLocale, useMessages } from "../locale/locale.js";
|
|
3
|
+
import _sfc_main$2 from "./TimePickerBody.vue.js";
|
|
4
|
+
import { createCommentVNode, createElementBlock, createVNode, defineComponent, mergeModels, mergeProps, normalizeProps, onBeforeUnmount, onMounted, openBlock, reactive, renderSlot, toDisplayString, unref, useId, useModel, useTemplateRef, watch, withCtx } from "vue";
|
|
5
|
+
import { attachTimePicker, createTimePicker, initialTimePickerState } 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/state-layer.css";
|
|
9
|
+
import "@rio-m3e/styles/base/touch-target.css";
|
|
10
|
+
import "@rio-m3e/styles/time-picker.css";
|
|
11
|
+
// src/time-picker/TimeScroll.vue
|
|
12
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
13
|
+
__name: "TimeScroll",
|
|
14
|
+
props: /*@__PURE__*/ mergeModels({
|
|
15
|
+
locale: {},
|
|
16
|
+
hourCycle: {},
|
|
17
|
+
messages: {}
|
|
18
|
+
}, {
|
|
19
|
+
"modelValue": {},
|
|
20
|
+
"modelModifiers": {}
|
|
21
|
+
}),
|
|
22
|
+
emits: ["update:modelValue"],
|
|
23
|
+
setup(__props) {
|
|
24
|
+
const props = __props;
|
|
25
|
+
/** The time, `HH:MM` on a 24-hour clock, with `v-model`. */
|
|
26
|
+
const model = useModel(__props, "modelValue");
|
|
27
|
+
const locale = useLocale(() => props.locale);
|
|
28
|
+
const messages = useMessages("timePicker", locale, () => props.messages);
|
|
29
|
+
const state = reactive(initialTimePickerState(model.value));
|
|
30
|
+
const id = useId();
|
|
31
|
+
const picker = createTimePicker({
|
|
32
|
+
variant: "scroll",
|
|
33
|
+
props: () => ({
|
|
34
|
+
value: model.value,
|
|
35
|
+
locale: locale.value,
|
|
36
|
+
hourCycle: props.hourCycle
|
|
37
|
+
}),
|
|
38
|
+
messages: () => messages.value,
|
|
39
|
+
state: () => state,
|
|
40
|
+
ids: { error: `${id}-error` },
|
|
41
|
+
onChange: (next) => model.value = next,
|
|
42
|
+
onStateChange: (next) => Object.assign(state, next)
|
|
43
|
+
});
|
|
44
|
+
picker.valueChanged();
|
|
45
|
+
watch([
|
|
46
|
+
model,
|
|
47
|
+
locale,
|
|
48
|
+
() => props.hourCycle
|
|
49
|
+
], () => picker.valueChanged());
|
|
50
|
+
const root = useTemplateRef("root");
|
|
51
|
+
let handle;
|
|
52
|
+
onMounted(() => {
|
|
53
|
+
handle = attachTimePicker(root.value, {
|
|
54
|
+
selection: () => state.selection,
|
|
55
|
+
hourCycle: picker.hourCycle,
|
|
56
|
+
onPick: picker.dialPick,
|
|
57
|
+
onPeriod: picker.selectPeriod,
|
|
58
|
+
onHover: picker.hover
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
watch(state, () => handle?.sync(), { flush: "post" });
|
|
62
|
+
onBeforeUnmount(() => handle?.detach());
|
|
63
|
+
return (_ctx, _cache) => {
|
|
64
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
65
|
+
ref_key: "root",
|
|
66
|
+
ref: root
|
|
67
|
+
}, unref(picker).parts.root()), [createVNode(_sfc_main$2, { picker: unref(picker) }, {
|
|
68
|
+
toggle: withCtx(() => [createVNode(_sfc_main$1, {
|
|
69
|
+
variant: "standard",
|
|
70
|
+
label: unref(picker).modeButtonLabel(),
|
|
71
|
+
onClick: _cache[0] || (_cache[0] = ($event) => unref(picker).switchMode())
|
|
72
|
+
}, {
|
|
73
|
+
default: withCtx(() => [unref(picker).modeButtonIcon() === "keyboard" ? renderSlot(_ctx.$slots, "keyboard-icon", {}, void 0, void 0, 0) : renderSlot(_ctx.$slots, "swipe-icon", {}, void 0, void 0, 1)]),
|
|
74
|
+
_: 3
|
|
75
|
+
}, 8, ["label"])]),
|
|
76
|
+
_: 3
|
|
77
|
+
}, 8, ["picker"]), unref(picker).showsError() ? (openBlock(), createElementBlock("div", normalizeProps(mergeProps({ key: 0 }, unref(picker).parts.error())), toDisplayString(unref(picker).error()), 17)) : createCommentVNode("v-if", true)], 16);
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
export { _sfc_main as default };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { keepPresses } from "../overlay/presses.js";
|
|
2
|
+
import { createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, guardReactiveProps, mergeModels, mergeProps, normalizeProps, onBeforeUnmount, onMounted, onUpdated, openBlock, renderSlot, toDisplayString, toHandlers, unref, useId, useModel, useSlots, useTemplateRef, watch } from "vue";
|
|
2
3
|
import { attachTooltip, createTooltip } from "@rio-m3e/core";
|
|
3
4
|
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
4
5
|
import "@rio-m3e/styles/base/anchored-position.css";
|
|
@@ -68,27 +69,14 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
68
69
|
return openBlock(), createElementBlock("span", mergeProps({
|
|
69
70
|
ref_key: "trigger",
|
|
70
71
|
ref: trigger
|
|
71
|
-
}, unref(tooltip).parts.trigger()), [
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}, unref(tooltip).parts.
|
|
78
|
-
|
|
79
|
-
onAuxclick: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"])),
|
|
80
|
-
onDblclick: _cache[2] || (_cache[2] = withModifiers(() => {}, ["stop"])),
|
|
81
|
-
onPointerdown: _cache[3] || (_cache[3] = withModifiers(() => {}, ["stop"])),
|
|
82
|
-
onPointerup: _cache[4] || (_cache[4] = withModifiers(() => {}, ["stop"])),
|
|
83
|
-
onMousedown: _cache[5] || (_cache[5] = withModifiers(() => {}, ["stop"])),
|
|
84
|
-
onMouseup: _cache[6] || (_cache[6] = withModifiers(() => {}, ["stop"])),
|
|
85
|
-
onContextmenu: _cache[7] || (_cache[7] = withModifiers(() => {}, ["stop"]))
|
|
86
|
-
}), [
|
|
87
|
-
unref(tooltip).showsSubhead() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 0 }, unref(tooltip).parts.subhead())), toDisplayString(__props.subhead), 17)) : createCommentVNode("v-if", true),
|
|
88
|
-
createElementVNode("span", normalizeProps(guardReactiveProps(unref(tooltip).parts.supportingText())), [renderSlot(_ctx.$slots, "content", {}, () => [createTextVNode(toDisplayString(__props.text), 1)])], 16),
|
|
89
|
-
unref(tooltip).showsActions() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 1 }, unref(tooltip).parts.actions())), [renderSlot(_ctx.$slots, "actions")], 16)) : createCommentVNode("v-if", true)
|
|
90
|
-
], 16)
|
|
91
|
-
], 16);
|
|
72
|
+
}, unref(tooltip).parts.trigger()), [renderSlot(_ctx.$slots, "default"), createElementVNode("span", mergeProps({
|
|
73
|
+
ref_key: "root",
|
|
74
|
+
ref: root
|
|
75
|
+
}, unref(tooltip).parts.root(), toHandlers(unref(keepPresses), true)), [
|
|
76
|
+
unref(tooltip).showsSubhead() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 0 }, unref(tooltip).parts.subhead())), toDisplayString(__props.subhead), 17)) : createCommentVNode("v-if", true),
|
|
77
|
+
createElementVNode("span", normalizeProps(guardReactiveProps(unref(tooltip).parts.supportingText())), [renderSlot(_ctx.$slots, "content", {}, () => [createTextVNode(toDisplayString(__props.text), 1)])], 16),
|
|
78
|
+
unref(tooltip).showsActions() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 1 }, unref(tooltip).parts.actions())), [renderSlot(_ctx.$slots, "actions")], 16)) : createCommentVNode("v-if", true)
|
|
79
|
+
], 16)], 16);
|
|
92
80
|
};
|
|
93
81
|
}
|
|
94
82
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rio-m3e/vue",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Vue components for Rio, a Material 3 Expressive implementation",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "LegenLee",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@rio-m3e/core": "^0.
|
|
31
|
-
"@rio-m3e/styles": "^0.
|
|
32
|
-
"@rio-m3e/tokens": "^0.
|
|
30
|
+
"@rio-m3e/core": "^0.6.1",
|
|
31
|
+
"@rio-m3e/styles": "^0.6.1",
|
|
32
|
+
"@rio-m3e/tokens": "^0.6.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@fontsource/roboto": "^5.3.0",
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { attachShapeMorph } from "@rio-m3e/core";
|
|
2
|
-
import "@rio-m3e/styles/base/shape-morph.css";
|
|
3
|
-
// src/shape-morph/shape-morph.ts
|
|
4
|
-
const handles = /* @__PURE__ */ new WeakMap();
|
|
5
|
-
/**
|
|
6
|
-
* Springs an element's corner radius toward `--rio-shape-morph-target` whenever its state
|
|
7
|
-
* attributes change. Used inside Rio's components; not exported yet.
|
|
8
|
-
*/
|
|
9
|
-
const vShapeMorph = {
|
|
10
|
-
mounted(el) {
|
|
11
|
-
handles.set(el, attachShapeMorph(el));
|
|
12
|
-
},
|
|
13
|
-
beforeUnmount(el) {
|
|
14
|
-
handles.get(el)?.detach();
|
|
15
|
-
handles.delete(el);
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
export { vShapeMorph };
|