@rio-m3e/vue 0.6.3 → 0.8.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.
Files changed (147) hide show
  1. package/README.md +99 -4
  2. package/dist/app-bar/AppBar.vue.d.ts +42 -0
  3. package/dist/app-bar/AppBar.vue.js +93 -0
  4. package/dist/app-bar/context.js +3 -0
  5. package/dist/badge/Badge.vue.d.ts +15 -0
  6. package/dist/badge/Badge.vue.js +28 -0
  7. package/dist/bottom-sheet/BottomSheet.vue.d.ts +34 -0
  8. package/dist/bottom-sheet/BottomSheet.vue.js +82 -0
  9. package/dist/browser/rio-vue.css +9418 -0
  10. package/dist/browser/rio-vue.global.js +600 -0
  11. package/dist/browser/rio-vue.js +600 -0
  12. package/dist/button/Button.vue.d.ts +1 -0
  13. package/dist/button/Button.vue.js +23 -2
  14. package/dist/button-group/ButtonGroup.vue.d.ts +6 -1
  15. package/dist/button-group/ButtonGroup.vue.js +27 -4
  16. package/dist/button-group/context.js +4 -2
  17. package/dist/card/Card.vue.d.ts +24 -0
  18. package/dist/card/Card.vue.js +44 -0
  19. package/dist/card/CardActions.vue.d.ts +14 -0
  20. package/dist/card/CardActions.vue.js +14 -0
  21. package/dist/card/CardContent.vue.d.ts +14 -0
  22. package/dist/card/CardContent.vue.js +14 -0
  23. package/dist/card/CardHeader.vue.d.ts +27 -0
  24. package/dist/card/CardHeader.vue.js +34 -0
  25. package/dist/card/CardMedia.vue.d.ts +14 -0
  26. package/dist/card/CardMedia.vue.js +14 -0
  27. package/dist/checkbox/Checkbox.vue.d.ts +2 -0
  28. package/dist/checkbox/Checkbox.vue.js +6 -0
  29. package/dist/chip/AssistChip.vue.d.ts +2 -0
  30. package/dist/chip/AssistChip.vue.js +6 -0
  31. package/dist/chip/ChipSet.vue.d.ts +2 -0
  32. package/dist/chip/ChipSet.vue.js +7 -1
  33. package/dist/chip/FilterChip.vue.d.ts +22 -5
  34. package/dist/chip/FilterChip.vue.js +57 -8
  35. package/dist/chip/InputChip.vue.d.ts +2 -0
  36. package/dist/chip/InputChip.vue.js +6 -0
  37. package/dist/chip/SuggestionChip.vue.d.ts +2 -0
  38. package/dist/chip/SuggestionChip.vue.js +6 -0
  39. package/dist/date-picker/DatePicker.vue.d.ts +16 -3
  40. package/dist/date-picker/DatePicker.vue.js +13 -4
  41. package/dist/date-picker/DatePickerCalendar.vue.js +1 -4
  42. package/dist/date-picker/DatePickerDialog.vue.d.ts +17 -3
  43. package/dist/date-picker/DatePickerDialog.vue.js +66 -22
  44. package/dist/date-picker/DateRangeCalendar.vue.js +17 -8
  45. package/dist/date-picker/DateRangePickerDialog.vue.d.ts +17 -3
  46. package/dist/date-picker/DateRangePickerDialog.vue.js +29 -16
  47. package/dist/dialog/Dialog.vue.d.ts +11 -2
  48. package/dist/dialog/Dialog.vue.js +35 -5
  49. package/dist/divider/Divider.vue.d.ts +5 -0
  50. package/dist/divider/Divider.vue.js +21 -0
  51. package/dist/fab/Fab.vue.d.ts +27 -0
  52. package/dist/fab/Fab.vue.js +70 -0
  53. package/dist/fab-menu/FabMenu.vue.d.ts +34 -0
  54. package/dist/fab-menu/FabMenu.vue.js +76 -0
  55. package/dist/fab-menu/FabMenuItem.vue.d.ts +22 -0
  56. package/dist/fab-menu/FabMenuItem.vue.js +29 -0
  57. package/dist/fab-menu/context.js +4 -0
  58. package/dist/icon-button/IconButton.vue.d.ts +2 -0
  59. package/dist/icon-button/IconButton.vue.js +26 -2
  60. package/dist/ime/composing.js +24 -0
  61. package/dist/index.d.ts +70 -40
  62. package/dist/index.js +70 -40
  63. package/dist/list/List.vue.d.ts +1 -0
  64. package/dist/list/List.vue.js +4 -1
  65. package/dist/list/ListItem.vue.d.ts +13 -1
  66. package/dist/list/ListItem.vue.js +15 -3
  67. package/dist/loading-indicator/LoadingIndicator.vue.d.ts +1 -0
  68. package/dist/loading-indicator/LoadingIndicator.vue.js +4 -1
  69. package/dist/menu/Menu.vue.d.ts +2 -2
  70. package/dist/menu/Menu.vue.js +11 -2
  71. package/dist/navigation-bar/NavigationBar.vue.d.ts +31 -0
  72. package/dist/navigation-bar/NavigationBar.vue.js +63 -0
  73. package/dist/navigation-bar/NavigationBarItem.vue.d.ts +40 -0
  74. package/dist/navigation-bar/NavigationBarItem.vue.js +84 -0
  75. package/dist/navigation-bar/context.js +3 -0
  76. package/dist/navigation-rail/NavigationRail.vue.d.ts +46 -0
  77. package/dist/navigation-rail/NavigationRail.vue.js +112 -0
  78. package/dist/navigation-rail/NavigationRailItem.vue.d.ts +41 -0
  79. package/dist/navigation-rail/NavigationRailItem.vue.js +85 -0
  80. package/dist/navigation-rail/NavigationRailSection.vue.d.ts +17 -0
  81. package/dist/navigation-rail/NavigationRailSection.vue.js +20 -0
  82. package/dist/navigation-rail/context.js +3 -0
  83. package/dist/overflow/OverflowItem.vue.d.ts +16 -0
  84. package/dist/overflow/OverflowItem.vue.js +24 -0
  85. package/dist/overflow/OverflowMenu.vue.js +94 -0
  86. package/dist/overflow/overflow.js +79 -0
  87. package/dist/progress/CircularProgress.vue.d.ts +1 -0
  88. package/dist/progress/CircularProgress.vue.js +5 -2
  89. package/dist/progress/LinearProgress.vue.d.ts +1 -0
  90. package/dist/progress/LinearProgress.vue.js +5 -2
  91. package/dist/radio/Radio.vue.d.ts +2 -0
  92. package/dist/radio/Radio.vue.js +7 -1
  93. package/dist/radio/RadioGroup.vue.d.ts +2 -0
  94. package/dist/radio/RadioGroup.vue.js +13 -2
  95. package/dist/rio/rio.js +2 -0
  96. package/dist/scroll-field/ScrollField.vue.d.ts +1 -0
  97. package/dist/scroll-field/ScrollField.vue.js +3 -0
  98. package/dist/search/Search.vue.d.ts +58 -0
  99. package/dist/search/Search.vue.js +161 -0
  100. package/dist/select/AfterOptions.vue.js +11 -0
  101. package/dist/select/Select.vue.d.ts +6 -4
  102. package/dist/select/Select.vue.js +44 -31
  103. package/dist/select/SelectOption.vue.d.ts +4 -1
  104. package/dist/select/SelectOption.vue.js +8 -5
  105. package/dist/side-sheet/SideSheet.vue.d.ts +43 -0
  106. package/dist/side-sheet/SideSheet.vue.js +103 -0
  107. package/dist/slider/RangeSlider.vue.d.ts +1 -0
  108. package/dist/slider/RangeSlider.vue.js +3 -0
  109. package/dist/slider/Slider.vue.d.ts +1 -0
  110. package/dist/slider/Slider.vue.js +3 -0
  111. package/dist/snackbar/Snackbar.vue.d.ts +31 -0
  112. package/dist/snackbar/Snackbar.vue.js +48 -0
  113. package/dist/snackbar/SnackbarHost.vue.d.ts +40 -0
  114. package/dist/snackbar/SnackbarHost.vue.js +110 -0
  115. package/dist/snackbar/snackbar.d.ts +16 -0
  116. package/dist/snackbar/snackbar.js +11 -0
  117. package/dist/split-button/SplitButton.vue.d.ts +3 -2
  118. package/dist/split-button/SplitButton.vue.js +3 -0
  119. package/dist/switch/Switch.vue.d.ts +2 -0
  120. package/dist/switch/Switch.vue.js +6 -0
  121. package/dist/tabs/Tab.vue.d.ts +26 -0
  122. package/dist/tabs/Tab.vue.js +91 -0
  123. package/dist/tabs/TabGroup.vue.d.ts +22 -0
  124. package/dist/tabs/TabGroup.vue.js +25 -0
  125. package/dist/tabs/TabPanel.vue.d.ts +15 -0
  126. package/dist/tabs/TabPanel.vue.js +20 -0
  127. package/dist/tabs/Tabs.vue.d.ts +34 -0
  128. package/dist/tabs/Tabs.vue.js +109 -0
  129. package/dist/tabs/context.js +5 -0
  130. package/dist/text-field/TextField.vue.d.ts +9 -2
  131. package/dist/text-field/TextField.vue.js +94 -47
  132. package/dist/theme/ThemeProvider.vue.d.ts +22 -0
  133. package/dist/theme/ThemeProvider.vue.js +26 -0
  134. package/dist/theme/context.d.ts +7 -0
  135. package/dist/theme/context.js +7 -0
  136. package/dist/time-picker/TimeInput.vue.d.ts +7 -1
  137. package/dist/time-picker/TimeInput.vue.js +5 -2
  138. package/dist/time-picker/TimePickerDialog.vue.d.ts +9 -3
  139. package/dist/time-picker/TimePickerDialog.vue.js +5 -2
  140. package/dist/time-picker/TimeScroll.vue.d.ts +7 -1
  141. package/dist/time-picker/TimeScroll.vue.js +5 -2
  142. package/dist/toolbar/FabPlace.vue.js +14 -0
  143. package/dist/toolbar/Toolbar.vue.d.ts +34 -0
  144. package/dist/toolbar/Toolbar.vue.js +115 -0
  145. package/dist/toolbar/context.js +3 -0
  146. package/dist/tooltip/Tooltip.vue.js +10 -3
  147. package/package.json +6 -4
@@ -2,6 +2,7 @@ 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
4
  import { attachTimePicker, createTimePicker, initialTimePickerState } 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/state-layer.css";
@@ -14,7 +15,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
14
15
  props: /*@__PURE__*/ mergeModels({
15
16
  locale: {},
16
17
  hourCycle: {},
17
- messages: {}
18
+ messages: {},
19
+ color: {}
18
20
  }, {
19
21
  "modelValue": {},
20
22
  "modelModifiers": {}
@@ -36,7 +38,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
36
38
  props: () => ({
37
39
  value: model.value,
38
40
  locale: locale.value,
39
- hourCycle: props.hourCycle
41
+ hourCycle: props.hourCycle,
42
+ color: props.color
40
43
  }),
41
44
  messages: () => messages.value,
42
45
  state: () => state,
@@ -1,4 +1,5 @@
1
- import { HourCycle, TimePickerKind, TimePickerLayout, TimePickerMessages, TimePickerMode } from "@rio-m3e/core";
1
+ import { AccentColor, HourCycle, TimePickerKind, TimePickerLayout, TimePickerMessages, TimePickerMode } from "@rio-m3e/core";
2
+ import "@rio-m3e/styles/base/accent.css";
2
3
  import "@rio-m3e/styles/base/focus-ring.css";
3
4
  import "@rio-m3e/styles/base/reduced-motion.css";
4
5
  import "@rio-m3e/styles/base/state-layer.css";
@@ -19,6 +20,11 @@ type __VLS_Props = {
19
20
  initialMode?: TimePickerMode;
20
21
  /** Replaces any of the text the dialog shows. */
21
22
  messages?: Partial<TimePickerMessages>;
23
+ /**
24
+ * The theme color it takes in place of the spec's accents: `'secondary'`, `'tertiary'`,
25
+ * `'error'`, or a static color of the theme. Its buttons take it too.
26
+ */
27
+ color?: AccentColor;
22
28
  };
23
29
  type __VLS_Slots = {
24
30
  /**
@@ -45,11 +51,11 @@ type __VLS_ModelProps = {
45
51
  };
46
52
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
47
53
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
48
- "update:modelValue": (value: string | undefined) => any;
49
54
  "update:open": (value: boolean) => any;
55
+ "update:modelValue": (value: string | undefined) => any;
50
56
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
51
- "onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
52
57
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
58
+ "onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
53
59
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
54
60
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
55
61
  declare const _default: typeof __VLS_export;
@@ -6,6 +6,7 @@ import _sfc_main$3 from "./TimePickerBody.vue.js";
6
6
  import _sfc_main$4 from "../icon/Icon.vue.js";
7
7
  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";
8
8
  import { attachDialog, attachTimePicker, createTimePicker, initialTimePickerState } from "@rio-m3e/core";
9
+ import "@rio-m3e/styles/base/accent.css";
9
10
  import "@rio-m3e/styles/base/focus-ring.css";
10
11
  import "@rio-m3e/styles/base/reduced-motion.css";
11
12
  import "@rio-m3e/styles/base/state-layer.css";
@@ -22,7 +23,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
22
23
  layout: {},
23
24
  picker: {},
24
25
  initialMode: {},
25
- messages: {}
26
+ messages: {},
27
+ color: {}
26
28
  }, {
27
29
  "modelValue": {},
28
30
  "modelModifiers": {},
@@ -54,7 +56,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
54
56
  layout: props.layout,
55
57
  picker: props.picker,
56
58
  initialMode: props.initialMode,
57
- rendered: rendered.value
59
+ rendered: rendered.value,
60
+ color: props.color
58
61
  }),
59
62
  messages: () => messages.value,
60
63
  state: () => state,
@@ -1,4 +1,5 @@
1
- import { HourCycle, TimePickerMessages } from "@rio-m3e/core";
1
+ import { AccentColor, HourCycle, TimePickerMessages } from "@rio-m3e/core";
2
+ import "@rio-m3e/styles/base/accent.css";
2
3
  import "@rio-m3e/styles/base/focus-ring.css";
3
4
  import "@rio-m3e/styles/base/reduced-motion.css";
4
5
  import "@rio-m3e/styles/base/state-layer.css";
@@ -12,6 +13,11 @@ type __VLS_Props = {
12
13
  hourCycle?: HourCycle;
13
14
  /** Replaces any of the text the picker shows. */
14
15
  messages?: Partial<TimePickerMessages>;
16
+ /**
17
+ * The theme color it takes in place of the spec's accents: `'secondary'`, `'tertiary'`,
18
+ * `'error'`, or a static color of the theme. Its buttons take it too.
19
+ */
20
+ color?: AccentColor;
15
21
  };
16
22
  type __VLS_Slots = {
17
23
  /**
@@ -4,6 +4,7 @@ import _sfc_main$2 from "./TimePickerBody.vue.js";
4
4
  import _sfc_main$3 from "../icon/Icon.vue.js";
5
5
  import { createCommentVNode, createElementBlock, createVNode, defineComponent, mergeModels, mergeProps, normalizeProps, onBeforeUnmount, onMounted, openBlock, reactive, renderSlot, toDisplayString, unref, useId, useModel, useTemplateRef, watch, withCtx } from "vue";
6
6
  import { attachTimePicker, createTimePicker, initialTimePickerState } from "@rio-m3e/core";
7
+ import "@rio-m3e/styles/base/accent.css";
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";
@@ -16,7 +17,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
16
17
  props: /*@__PURE__*/ mergeModels({
17
18
  locale: {},
18
19
  hourCycle: {},
19
- messages: {}
20
+ messages: {},
21
+ color: {}
20
22
  }, {
21
23
  "modelValue": {},
22
24
  "modelModifiers": {}
@@ -35,7 +37,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
35
37
  props: () => ({
36
38
  value: model.value,
37
39
  locale: locale.value,
38
- hourCycle: props.hourCycle
40
+ hourCycle: props.hourCycle,
41
+ color: props.color
39
42
  }),
40
43
  messages: () => messages.value,
41
44
  state: () => state,
@@ -0,0 +1,14 @@
1
+ import { toolbarFabKey } from "./context.js";
2
+ import { defineComponent, provide, renderSlot } from "vue";
3
+ // src/toolbar/FabPlace.vue
4
+ const _sfc_main = /*@__PURE__*/ defineComponent({
5
+ __name: "FabPlace",
6
+ props: { context: {} },
7
+ setup(__props) {
8
+ provide(toolbarFabKey, __props.context);
9
+ return (_ctx, _cache) => {
10
+ return renderSlot(_ctx.$slots, "default");
11
+ };
12
+ }
13
+ });
14
+ export { _sfc_main as default };
@@ -0,0 +1,34 @@
1
+ import { ToolbarProps } from "@rio-m3e/core";
2
+ import "@rio-m3e/styles/base/reduced-motion.css";
3
+ import "@rio-m3e/styles/base/direction.css";
4
+ import "@rio-m3e/styles/toolbar.css";
5
+ interface Props extends ToolbarProps {
6
+ /**
7
+ * The element whose scrolling hides the toolbar, with `hideOnScroll`, or collapses it, with
8
+ * `collapseOnScroll`. Defaults to the window.
9
+ */
10
+ scrollTarget?: HTMLElement | null;
11
+ }
12
+ type __VLS_Slots = {
13
+ /**
14
+ * The items: buttons, icon buttons, text fields, or anything else. With `overflow`, the buttons
15
+ * that don't fit go into the menu, last first; `RioOverflowItem` takes content of the app's own.
16
+ */
17
+ default?: () => unknown;
18
+ /** The "More options" button's icon, in place of the one the app registered (`more`) */
19
+ 'more-icon'?: () => unknown;
20
+ /**
21
+ * A `RioFab` beside a floating toolbar, at its end, or under a vertical one: it takes its size,
22
+ * variant, and color from the toolbar unless it sets its own. A docked toolbar shows none.
23
+ */
24
+ fab?: () => unknown;
25
+ };
26
+ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
27
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
28
+ declare const _default: typeof __VLS_export;
29
+ type __VLS_WithSlots<T, S> = T & {
30
+ new (): {
31
+ $slots: S;
32
+ };
33
+ };
34
+ export { _default as default };
@@ -0,0 +1,115 @@
1
+ import _sfc_main$1 from "../overflow/OverflowMenu.vue.js";
2
+ import { useOverflowHost } from "../overflow/overflow.js";
3
+ import _sfc_main$2 from "./FabPlace.vue.js";
4
+ import { createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, onBeforeUnmount, onUpdated, openBlock, ref, renderSlot, shallowRef, unref, useSlots, useTemplateRef, watch, withCtx } from "vue";
5
+ import { attachToolbar, createToolbar, mergePartAttrs } from "@rio-m3e/core";
6
+ import "@rio-m3e/styles/base/reduced-motion.css";
7
+ import "@rio-m3e/styles/base/direction.css";
8
+ import "@rio-m3e/styles/toolbar.css";
9
+ // src/toolbar/Toolbar.vue
10
+ const _sfc_main = /*@__PURE__*/ defineComponent({
11
+ inheritAttrs: false,
12
+ __name: "Toolbar",
13
+ props: {
14
+ scrollTarget: {},
15
+ type: {},
16
+ variant: {},
17
+ orientation: {},
18
+ flat: { type: Boolean },
19
+ hideOnScroll: { type: Boolean },
20
+ expanded: {
21
+ type: Boolean,
22
+ default: () => void 0
23
+ },
24
+ collapseOnScroll: { type: Boolean },
25
+ overflow: { type: Boolean },
26
+ maxItems: {}
27
+ },
28
+ setup(__props) {
29
+ const slots = useSlots();
30
+ /** Whether the content has scrolled the toolbar into its FAB, as `attachToolbar` reports it */
31
+ const collapsedByScroll = ref(false);
32
+ /** The lengths it holds as it collapses into its FAB or expands, as `attachToolbar` reports them */
33
+ const lengths = shallowRef();
34
+ const toolbar = createToolbar({
35
+ props: () => ({
36
+ type: __props.type,
37
+ variant: __props.variant,
38
+ orientation: __props.orientation,
39
+ flat: __props.flat,
40
+ hideOnScroll: __props.hideOnScroll,
41
+ overflow: __props.overflow,
42
+ maxItems: __props.maxItems,
43
+ expanded: __props.expanded,
44
+ collapseOnScroll: __props.collapseOnScroll
45
+ }),
46
+ content: () => ({ fab: !!slots.fab }),
47
+ collapsedByScroll: () => collapsedByScroll.value,
48
+ overflowing: () => more.overflowing(),
49
+ lengths: () => lengths.value
50
+ });
51
+ /** What the FAB in the `fab` slot takes from the toolbar */
52
+ const fabContext = { fab: () => toolbar.showsFab() ? toolbar.fab() : void 0 };
53
+ const root = useTemplateRef("root");
54
+ const more = useOverflowHost({
55
+ overflow: toolbar.overflow,
56
+ container: root,
57
+ axis: toolbar.orientation
58
+ });
59
+ const group = useTemplateRef("group");
60
+ let handle;
61
+ watch([root, group], ([element, around]) => {
62
+ handle?.detach();
63
+ handle = element ? attachToolbar(element, {
64
+ hidesToward: toolbar.hidesToward,
65
+ target: () => __props.scrollTarget ?? void 0,
66
+ group: around,
67
+ collapsesOnScroll: toolbar.collapsesOnScroll,
68
+ onCollapsedByScrollChange: (next) => collapsedByScroll.value = next,
69
+ collapsed: toolbar.collapsed,
70
+ onLengthsChange: (next) => lengths.value = next
71
+ }) : void 0;
72
+ }, { flush: "post" });
73
+ onUpdated(() => handle?.update());
74
+ onBeforeUnmount(() => handle?.detach());
75
+ return (_ctx, _cache) => {
76
+ return unref(toolbar).showsFab() ? (openBlock(), createElementBlock("div", mergeProps({
77
+ key: 0,
78
+ ref_key: "group",
79
+ ref: group
80
+ }, unref(toolbar).parts.group(), {
81
+ class: _ctx.$attrs.class,
82
+ style: _ctx.$attrs.style
83
+ }), [createElementVNode("div", mergeProps({
84
+ ref_key: "root",
85
+ ref: root
86
+ }, unref(mergePartAttrs)({
87
+ ..._ctx.$attrs,
88
+ class: void 0,
89
+ style: void 0
90
+ }, unref(toolbar).parts.root())), [renderSlot(_ctx.$slots, "default"), unref(more).enabled() ? (openBlock(), createBlock(_sfc_main$1, {
91
+ key: 0,
92
+ host: unref(more)
93
+ }, createSlots({ _: 2 }, [_ctx.$slots["more-icon"] ? {
94
+ name: "icon",
95
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "more-icon")]),
96
+ key: "0"
97
+ } : void 0]), 1032, ["host"])) : createCommentVNode("v-if", true)], 16), createElementVNode("div", normalizeProps(guardReactiveProps(unref(toolbar).parts.fab())), [createVNode(_sfc_main$2, { context: fabContext }, {
98
+ default: withCtx(() => [renderSlot(_ctx.$slots, "fab")]),
99
+ _: 3
100
+ })], 16)], 16)) : (openBlock(), createElementBlock("div", mergeProps({
101
+ key: 1,
102
+ ref_key: "root",
103
+ ref: root
104
+ }, mergeProps(unref(toolbar).parts.root(), _ctx.$attrs)), [renderSlot(_ctx.$slots, "default"), unref(more).enabled() ? (openBlock(), createBlock(_sfc_main$1, {
105
+ key: 0,
106
+ host: unref(more)
107
+ }, createSlots({ _: 2 }, [_ctx.$slots["more-icon"] ? {
108
+ name: "icon",
109
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "more-icon")]),
110
+ key: "0"
111
+ } : void 0]), 1032, ["host"])) : createCommentVNode("v-if", true)], 16));
112
+ };
113
+ }
114
+ });
115
+ export { _sfc_main as default };
@@ -0,0 +1,3 @@
1
+ // src/toolbar/context.ts
2
+ const toolbarFabKey = Symbol("RioToolbarFab");
3
+ export { toolbarFabKey };
@@ -1,5 +1,6 @@
1
+ import { appBarKey } from "../app-bar/context.js";
1
2
  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";
3
+ import { createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, guardReactiveProps, inject, mergeModels, mergeProps, normalizeProps, onBeforeUnmount, onMounted, onUpdated, openBlock, ref, renderSlot, toDisplayString, toHandlers, unref, useId, useModel, useSlots, useTemplateRef, watch } from "vue";
3
4
  import { attachTooltip, createTooltip } from "@rio-m3e/core";
4
5
  import "@rio-m3e/styles/base/reduced-motion.css";
5
6
  import "@rio-m3e/styles/base/anchored-position.css";
@@ -31,6 +32,9 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
31
32
  const open = useModel(__props, "open");
32
33
  const slots = useSlots();
33
34
  const id = useId();
35
+ const appBar = inject(appBarKey, null);
36
+ /** Whether the element's name already holds the text, as `attachTooltip` finds */
37
+ const repeatsName = ref(false);
34
38
  const tooltip = createTooltip({
35
39
  props: () => ({
36
40
  variant: __props.variant,
@@ -48,7 +52,9 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
48
52
  root: `${id}-tooltip`,
49
53
  subhead: `${id}-subhead`,
50
54
  supportingText: `${id}-text`
51
- }
55
+ },
56
+ inAppBar: () => !!appBar,
57
+ repeatsName: () => repeatsName.value
52
58
  });
53
59
  const trigger = useTemplateRef("trigger");
54
60
  const root = useTemplateRef("root");
@@ -58,7 +64,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
58
64
  placement: tooltip.placement,
59
65
  persistent: tooltip.persistent,
60
66
  interactive: tooltip.interactive,
61
- onOpenChange: (next) => open.value = next
67
+ onOpenChange: (next) => open.value = next,
68
+ onRepeatsNameChange: (next) => repeatsName.value = next
62
69
  });
63
70
  handle.sync(open.value);
64
71
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rio-m3e/vue",
3
- "version": "0.6.3",
3
+ "version": "0.8.0",
4
4
  "description": "Vue components for Rio, a Material 3 Expressive implementation",
5
5
  "license": "Apache-2.0",
6
6
  "author": "LegenLee",
@@ -15,6 +15,8 @@
15
15
  ],
16
16
  "type": "module",
17
17
  "sideEffects": false,
18
+ "unpkg": "dist/browser/rio-vue.global.js",
19
+ "jsdelivr": "dist/browser/rio-vue.global.js",
18
20
  "exports": {
19
21
  ".": {
20
22
  "@rio-m3e/source": "./src/index.ts",
@@ -27,9 +29,9 @@
27
29
  "access": "public"
28
30
  },
29
31
  "dependencies": {
30
- "@rio-m3e/core": "^0.6.3",
31
- "@rio-m3e/styles": "^0.6.3",
32
- "@rio-m3e/tokens": "^0.6.3"
32
+ "@rio-m3e/core": "^0.8.0",
33
+ "@rio-m3e/styles": "^0.8.0",
34
+ "@rio-m3e/tokens": "^0.8.0"
33
35
  },
34
36
  "devDependencies": {
35
37
  "@fontsource/roboto": "^5.3.0",