@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.
- package/README.md +99 -4
- package/dist/app-bar/AppBar.vue.d.ts +42 -0
- package/dist/app-bar/AppBar.vue.js +93 -0
- package/dist/app-bar/context.js +3 -0
- package/dist/badge/Badge.vue.d.ts +15 -0
- package/dist/badge/Badge.vue.js +28 -0
- package/dist/bottom-sheet/BottomSheet.vue.d.ts +34 -0
- package/dist/bottom-sheet/BottomSheet.vue.js +82 -0
- package/dist/browser/rio-vue.css +9418 -0
- package/dist/browser/rio-vue.global.js +600 -0
- package/dist/browser/rio-vue.js +600 -0
- package/dist/button/Button.vue.d.ts +1 -0
- package/dist/button/Button.vue.js +23 -2
- package/dist/button-group/ButtonGroup.vue.d.ts +6 -1
- package/dist/button-group/ButtonGroup.vue.js +27 -4
- package/dist/button-group/context.js +4 -2
- package/dist/card/Card.vue.d.ts +24 -0
- package/dist/card/Card.vue.js +44 -0
- package/dist/card/CardActions.vue.d.ts +14 -0
- package/dist/card/CardActions.vue.js +14 -0
- package/dist/card/CardContent.vue.d.ts +14 -0
- package/dist/card/CardContent.vue.js +14 -0
- package/dist/card/CardHeader.vue.d.ts +27 -0
- package/dist/card/CardHeader.vue.js +34 -0
- package/dist/card/CardMedia.vue.d.ts +14 -0
- package/dist/card/CardMedia.vue.js +14 -0
- package/dist/checkbox/Checkbox.vue.d.ts +2 -0
- package/dist/checkbox/Checkbox.vue.js +6 -0
- package/dist/chip/AssistChip.vue.d.ts +2 -0
- package/dist/chip/AssistChip.vue.js +6 -0
- package/dist/chip/ChipSet.vue.d.ts +2 -0
- package/dist/chip/ChipSet.vue.js +7 -1
- package/dist/chip/FilterChip.vue.d.ts +22 -5
- package/dist/chip/FilterChip.vue.js +57 -8
- package/dist/chip/InputChip.vue.d.ts +2 -0
- package/dist/chip/InputChip.vue.js +6 -0
- package/dist/chip/SuggestionChip.vue.d.ts +2 -0
- package/dist/chip/SuggestionChip.vue.js +6 -0
- package/dist/date-picker/DatePicker.vue.d.ts +16 -3
- package/dist/date-picker/DatePicker.vue.js +13 -4
- package/dist/date-picker/DatePickerCalendar.vue.js +1 -4
- package/dist/date-picker/DatePickerDialog.vue.d.ts +17 -3
- package/dist/date-picker/DatePickerDialog.vue.js +66 -22
- package/dist/date-picker/DateRangeCalendar.vue.js +17 -8
- package/dist/date-picker/DateRangePickerDialog.vue.d.ts +17 -3
- package/dist/date-picker/DateRangePickerDialog.vue.js +29 -16
- package/dist/dialog/Dialog.vue.d.ts +11 -2
- package/dist/dialog/Dialog.vue.js +35 -5
- package/dist/divider/Divider.vue.d.ts +5 -0
- package/dist/divider/Divider.vue.js +21 -0
- package/dist/fab/Fab.vue.d.ts +27 -0
- package/dist/fab/Fab.vue.js +70 -0
- package/dist/fab-menu/FabMenu.vue.d.ts +34 -0
- package/dist/fab-menu/FabMenu.vue.js +76 -0
- package/dist/fab-menu/FabMenuItem.vue.d.ts +22 -0
- package/dist/fab-menu/FabMenuItem.vue.js +29 -0
- package/dist/fab-menu/context.js +4 -0
- package/dist/icon-button/IconButton.vue.d.ts +2 -0
- package/dist/icon-button/IconButton.vue.js +26 -2
- package/dist/ime/composing.js +24 -0
- package/dist/index.d.ts +70 -40
- package/dist/index.js +70 -40
- package/dist/list/List.vue.d.ts +1 -0
- package/dist/list/List.vue.js +4 -1
- package/dist/list/ListItem.vue.d.ts +13 -1
- package/dist/list/ListItem.vue.js +15 -3
- package/dist/loading-indicator/LoadingIndicator.vue.d.ts +1 -0
- package/dist/loading-indicator/LoadingIndicator.vue.js +4 -1
- package/dist/menu/Menu.vue.d.ts +2 -2
- package/dist/menu/Menu.vue.js +11 -2
- package/dist/navigation-bar/NavigationBar.vue.d.ts +31 -0
- package/dist/navigation-bar/NavigationBar.vue.js +63 -0
- package/dist/navigation-bar/NavigationBarItem.vue.d.ts +40 -0
- package/dist/navigation-bar/NavigationBarItem.vue.js +84 -0
- package/dist/navigation-bar/context.js +3 -0
- package/dist/navigation-rail/NavigationRail.vue.d.ts +46 -0
- package/dist/navigation-rail/NavigationRail.vue.js +112 -0
- package/dist/navigation-rail/NavigationRailItem.vue.d.ts +41 -0
- package/dist/navigation-rail/NavigationRailItem.vue.js +85 -0
- package/dist/navigation-rail/NavigationRailSection.vue.d.ts +17 -0
- package/dist/navigation-rail/NavigationRailSection.vue.js +20 -0
- package/dist/navigation-rail/context.js +3 -0
- package/dist/overflow/OverflowItem.vue.d.ts +16 -0
- package/dist/overflow/OverflowItem.vue.js +24 -0
- package/dist/overflow/OverflowMenu.vue.js +94 -0
- package/dist/overflow/overflow.js +79 -0
- package/dist/progress/CircularProgress.vue.d.ts +1 -0
- package/dist/progress/CircularProgress.vue.js +5 -2
- package/dist/progress/LinearProgress.vue.d.ts +1 -0
- package/dist/progress/LinearProgress.vue.js +5 -2
- package/dist/radio/Radio.vue.d.ts +2 -0
- package/dist/radio/Radio.vue.js +7 -1
- package/dist/radio/RadioGroup.vue.d.ts +2 -0
- package/dist/radio/RadioGroup.vue.js +13 -2
- package/dist/rio/rio.js +2 -0
- package/dist/scroll-field/ScrollField.vue.d.ts +1 -0
- package/dist/scroll-field/ScrollField.vue.js +3 -0
- package/dist/search/Search.vue.d.ts +58 -0
- package/dist/search/Search.vue.js +161 -0
- package/dist/select/AfterOptions.vue.js +11 -0
- package/dist/select/Select.vue.d.ts +6 -4
- package/dist/select/Select.vue.js +44 -31
- package/dist/select/SelectOption.vue.d.ts +4 -1
- package/dist/select/SelectOption.vue.js +8 -5
- package/dist/side-sheet/SideSheet.vue.d.ts +43 -0
- package/dist/side-sheet/SideSheet.vue.js +103 -0
- package/dist/slider/RangeSlider.vue.d.ts +1 -0
- package/dist/slider/RangeSlider.vue.js +3 -0
- package/dist/slider/Slider.vue.d.ts +1 -0
- package/dist/slider/Slider.vue.js +3 -0
- package/dist/snackbar/Snackbar.vue.d.ts +31 -0
- package/dist/snackbar/Snackbar.vue.js +48 -0
- package/dist/snackbar/SnackbarHost.vue.d.ts +40 -0
- package/dist/snackbar/SnackbarHost.vue.js +110 -0
- package/dist/snackbar/snackbar.d.ts +16 -0
- package/dist/snackbar/snackbar.js +11 -0
- package/dist/split-button/SplitButton.vue.d.ts +3 -2
- package/dist/split-button/SplitButton.vue.js +3 -0
- package/dist/switch/Switch.vue.d.ts +2 -0
- package/dist/switch/Switch.vue.js +6 -0
- package/dist/tabs/Tab.vue.d.ts +26 -0
- package/dist/tabs/Tab.vue.js +91 -0
- package/dist/tabs/TabGroup.vue.d.ts +22 -0
- package/dist/tabs/TabGroup.vue.js +25 -0
- package/dist/tabs/TabPanel.vue.d.ts +15 -0
- package/dist/tabs/TabPanel.vue.js +20 -0
- package/dist/tabs/Tabs.vue.d.ts +34 -0
- package/dist/tabs/Tabs.vue.js +109 -0
- package/dist/tabs/context.js +5 -0
- package/dist/text-field/TextField.vue.d.ts +9 -2
- package/dist/text-field/TextField.vue.js +94 -47
- package/dist/theme/ThemeProvider.vue.d.ts +22 -0
- package/dist/theme/ThemeProvider.vue.js +26 -0
- package/dist/theme/context.d.ts +7 -0
- package/dist/theme/context.js +7 -0
- package/dist/time-picker/TimeInput.vue.d.ts +7 -1
- package/dist/time-picker/TimeInput.vue.js +5 -2
- package/dist/time-picker/TimePickerDialog.vue.d.ts +9 -3
- package/dist/time-picker/TimePickerDialog.vue.js +5 -2
- package/dist/time-picker/TimeScroll.vue.d.ts +7 -1
- package/dist/time-picker/TimeScroll.vue.js +5 -2
- package/dist/toolbar/FabPlace.vue.js +14 -0
- package/dist/toolbar/Toolbar.vue.d.ts +34 -0
- package/dist/toolbar/Toolbar.vue.js +115 -0
- package/dist/toolbar/context.js +3 -0
- package/dist/tooltip/Tooltip.vue.js +10 -3
- package/package.json +6 -4
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { useButtonGroupItem } from "../button-group/context.js";
|
|
2
|
+
import { useOverflowItem } from "../overflow/overflow.js";
|
|
2
3
|
import { vRipple } from "../ripple/ripple.js";
|
|
3
4
|
import { vCornerMorph } from "../corner-morph/corner-morph.js";
|
|
4
|
-
import { createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderSlot, resolveDynamicComponent, unref, useSlots, withCtx, withDirectives } from "vue";
|
|
5
|
+
import { createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderSlot, resolveDynamicComponent, unref, useSlots, useTemplateRef, withCtx, withDirectives } from "vue";
|
|
5
6
|
import { createButton } from "@rio-m3e/core";
|
|
7
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
6
8
|
import "@rio-m3e/styles/base/focus-ring.css";
|
|
7
9
|
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
8
10
|
import "@rio-m3e/styles/base/state-layer.css";
|
|
@@ -15,6 +17,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
15
17
|
variant: {},
|
|
16
18
|
size: {},
|
|
17
19
|
shape: {},
|
|
20
|
+
color: {},
|
|
18
21
|
toggle: { type: Boolean },
|
|
19
22
|
selected: { type: Boolean },
|
|
20
23
|
disabled: { type: Boolean },
|
|
@@ -31,6 +34,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
31
34
|
variant: __props.variant,
|
|
32
35
|
size: __props.size,
|
|
33
36
|
shape: __props.shape,
|
|
37
|
+
color: __props.color,
|
|
34
38
|
toggle: __props.toggle,
|
|
35
39
|
selected: __props.selected,
|
|
36
40
|
disabled: __props.disabled,
|
|
@@ -45,8 +49,25 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
45
49
|
onClick: (event) => emit("click", event),
|
|
46
50
|
onChange: item.onChange
|
|
47
51
|
});
|
|
52
|
+
const root = useTemplateRef("root");
|
|
53
|
+
useOverflowItem({
|
|
54
|
+
element: () => root.value,
|
|
55
|
+
label: () => slots.default?.(),
|
|
56
|
+
icon: slots.icon ? () => slots.icon?.() : void 0,
|
|
57
|
+
disabled: () => {
|
|
58
|
+
const p = item.props();
|
|
59
|
+
return !!(p.disabled || p.softDisabled);
|
|
60
|
+
},
|
|
61
|
+
selected: () => {
|
|
62
|
+
const p = item.props();
|
|
63
|
+
return p.toggle ? !!p.selected : void 0;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
48
66
|
return (_ctx, _cache) => {
|
|
49
|
-
return withDirectives((openBlock(), createBlock(resolveDynamicComponent(unref(button).isLink() ? "a" : "button"), mergeProps(
|
|
67
|
+
return withDirectives((openBlock(), createBlock(resolveDynamicComponent(unref(button).isLink() ? "a" : "button"), mergeProps({
|
|
68
|
+
ref_key: "root",
|
|
69
|
+
ref: root
|
|
70
|
+
}, unref(button).parts.root(), { onClick: unref(button).handleClick }), {
|
|
50
71
|
default: withCtx(() => [
|
|
51
72
|
createElementVNode("span", normalizeProps(guardReactiveProps(unref(button).parts.touch())), null, 16),
|
|
52
73
|
unref(button).showsIcon() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 0 }, unref(button).parts.icon())), [renderSlot(_ctx.$slots, "icon")], 16)) : createCommentVNode("v-if", true),
|
|
@@ -5,8 +5,13 @@ interface Props extends Omit<ButtonGroupProps, 'selected'> {
|
|
|
5
5
|
modelValue?: ButtonGroupSelected;
|
|
6
6
|
}
|
|
7
7
|
type __VLS_Slots = {
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* `RioButton`s and `RioIconButton`s. They take the group's size and shape unless they set their
|
|
10
|
+
* own. With `overflow`, the ones that don't fit go into the menu, last first.
|
|
11
|
+
*/
|
|
9
12
|
default?: () => unknown;
|
|
13
|
+
/** The "More options" button's icon, in place of the one the app registered (`more`) */
|
|
14
|
+
'more-icon'?: () => unknown;
|
|
10
15
|
};
|
|
11
16
|
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
17
|
"update:modelValue": (selected: ButtonGroupSelected) => any;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import _sfc_main$1 from "../overflow/OverflowMenu.vue.js";
|
|
2
|
+
import { useOverflowHost } from "../overflow/overflow.js";
|
|
1
3
|
import { buttonGroupKey } from "./context.js";
|
|
2
|
-
import { createElementBlock, defineComponent, mergeProps, onBeforeUnmount, onMounted, openBlock, provide, renderSlot, unref, useTemplateRef } from "vue";
|
|
4
|
+
import { createBlock, createCommentVNode, createElementBlock, createSlots, defineComponent, mergeProps, onBeforeUnmount, onMounted, openBlock, provide, renderSlot, unref, useTemplateRef, withCtx } from "vue";
|
|
3
5
|
import { attachButtonGroup, createButtonGroup } from "@rio-m3e/core";
|
|
4
6
|
import "@rio-m3e/styles/button-group.css";
|
|
5
7
|
// src/button-group/ButtonGroup.vue
|
|
@@ -10,8 +12,12 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
10
12
|
variant: {},
|
|
11
13
|
size: {},
|
|
12
14
|
shape: {},
|
|
15
|
+
color: {},
|
|
13
16
|
selection: {},
|
|
14
|
-
required: { type: Boolean }
|
|
17
|
+
required: { type: Boolean },
|
|
18
|
+
disabled: { type: Boolean },
|
|
19
|
+
overflow: { type: Boolean },
|
|
20
|
+
maxItems: {}
|
|
15
21
|
},
|
|
16
22
|
emits: ["update:modelValue"],
|
|
17
23
|
setup(__props, { emit: __emit }) {
|
|
@@ -21,20 +27,30 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
21
27
|
variant: __props.variant,
|
|
22
28
|
size: __props.size,
|
|
23
29
|
shape: __props.shape,
|
|
30
|
+
color: __props.color,
|
|
24
31
|
selection: __props.selection,
|
|
25
32
|
required: __props.required,
|
|
33
|
+
overflow: __props.overflow,
|
|
34
|
+
maxItems: __props.maxItems,
|
|
35
|
+
disabled: __props.disabled,
|
|
26
36
|
selected: __props.modelValue
|
|
27
37
|
}),
|
|
28
|
-
onChange: (selected) => emit("update:modelValue", selected)
|
|
38
|
+
onChange: (selected) => emit("update:modelValue", selected),
|
|
39
|
+
overflowing: () => more.overflowing()
|
|
29
40
|
});
|
|
30
41
|
provide(buttonGroupKey, {
|
|
31
42
|
size: group.size,
|
|
32
43
|
shape: group.shape,
|
|
33
44
|
selection: group.selection,
|
|
45
|
+
disabled: group.disabled,
|
|
34
46
|
isSelected: group.isSelected,
|
|
35
47
|
select: group.select
|
|
36
48
|
});
|
|
37
49
|
const root = useTemplateRef("root");
|
|
50
|
+
const more = useOverflowHost({
|
|
51
|
+
overflow: group.overflow,
|
|
52
|
+
container: root
|
|
53
|
+
});
|
|
38
54
|
let handle;
|
|
39
55
|
onMounted(() => {
|
|
40
56
|
handle = attachButtonGroup(root.value);
|
|
@@ -44,7 +60,14 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
44
60
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
45
61
|
ref_key: "root",
|
|
46
62
|
ref: root
|
|
47
|
-
}, unref(group).parts.root()), [renderSlot(_ctx.$slots, "default")
|
|
63
|
+
}, unref(group).parts.root()), [renderSlot(_ctx.$slots, "default"), unref(more).enabled() ? (openBlock(), createBlock(_sfc_main$1, {
|
|
64
|
+
key: 0,
|
|
65
|
+
host: unref(more)
|
|
66
|
+
}, createSlots({ _: 2 }, [_ctx.$slots["more-icon"] ? {
|
|
67
|
+
name: "icon",
|
|
68
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "more-icon")]),
|
|
69
|
+
key: "0"
|
|
70
|
+
} : void 0]), 1032, ["host"])) : createCommentVNode("v-if", true)], 16);
|
|
48
71
|
};
|
|
49
72
|
}
|
|
50
73
|
});
|
|
@@ -3,8 +3,9 @@ import { inject } from "vue";
|
|
|
3
3
|
const buttonGroupKey = Symbol("RioButtonGroup");
|
|
4
4
|
/**
|
|
5
5
|
* For `RioButton` and `RioIconButton`: takes the size and shape of the button group around the
|
|
6
|
-
* button unless the button sets its own, and
|
|
7
|
-
* with a `value` a toggle whose state the group owns.
|
|
6
|
+
* button unless the button sets its own, and the group's `disabled` over its own, and, in a group
|
|
7
|
+
* that keeps a selection, makes a button with a `value` a toggle whose state the group owns.
|
|
8
|
+
* Outside a group it changes nothing.
|
|
8
9
|
*/
|
|
9
10
|
function useButtonGroupItem(props, emitChange) {
|
|
10
11
|
const group = inject(buttonGroupKey, null);
|
|
@@ -17,6 +18,7 @@ function useButtonGroupItem(props, emitChange) {
|
|
|
17
18
|
...own,
|
|
18
19
|
size: own.size ?? group?.size(),
|
|
19
20
|
shape: own.shape ?? group?.shape(),
|
|
21
|
+
disabled: own.disabled || group?.disabled() || void 0,
|
|
20
22
|
...grouped() ? {
|
|
21
23
|
toggle: true,
|
|
22
24
|
selected: group.isSelected(own.value)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CardProps } from "@rio-m3e/core";
|
|
2
|
+
import "@rio-m3e/styles/base/focus-ring.css";
|
|
3
|
+
import "@rio-m3e/styles/base/state-layer.css";
|
|
4
|
+
import "@rio-m3e/styles/card.css";
|
|
5
|
+
interface Props extends CardProps {
|
|
6
|
+
/**
|
|
7
|
+
* A press on the card. With it, and without `href`, the card is a button: then it holds no
|
|
8
|
+
* buttons or links of its own.
|
|
9
|
+
*/
|
|
10
|
+
onClick?: (event: MouseEvent) => void;
|
|
11
|
+
}
|
|
12
|
+
type __VLS_Slots = {
|
|
13
|
+
/** The content: the card's blocks (`RioCardMedia`, `RioCardHeader`, ...), or anything else */
|
|
14
|
+
default?: () => unknown;
|
|
15
|
+
};
|
|
16
|
+
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>;
|
|
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,44 @@
|
|
|
1
|
+
import { vRipple } from "../ripple/ripple.js";
|
|
2
|
+
import { createBlock, defineComponent, mergeProps, onBeforeUnmount, openBlock, renderSlot, resolveDynamicComponent, unref, useTemplateRef, watch, withCtx, withDirectives } from "vue";
|
|
3
|
+
import { attachCard, createCard } from "@rio-m3e/core";
|
|
4
|
+
import "@rio-m3e/styles/base/focus-ring.css";
|
|
5
|
+
import "@rio-m3e/styles/base/state-layer.css";
|
|
6
|
+
import "@rio-m3e/styles/card.css";
|
|
7
|
+
// src/card/Card.vue
|
|
8
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
9
|
+
__name: "Card",
|
|
10
|
+
props: {
|
|
11
|
+
onClick: { type: Function },
|
|
12
|
+
variant: {},
|
|
13
|
+
href: {},
|
|
14
|
+
disabled: { type: Boolean }
|
|
15
|
+
},
|
|
16
|
+
setup(__props) {
|
|
17
|
+
const card = createCard({
|
|
18
|
+
props: () => ({
|
|
19
|
+
variant: __props.variant,
|
|
20
|
+
href: __props.href,
|
|
21
|
+
disabled: __props.disabled
|
|
22
|
+
}),
|
|
23
|
+
listeners: () => ({ action: !!__props.onClick }),
|
|
24
|
+
onClick: (event) => __props.onClick?.(event)
|
|
25
|
+
});
|
|
26
|
+
const root = useTemplateRef("root");
|
|
27
|
+
let handle;
|
|
28
|
+
watch(root, (element) => {
|
|
29
|
+
handle?.detach();
|
|
30
|
+
handle = element ? attachCard(element) : void 0;
|
|
31
|
+
}, { flush: "post" });
|
|
32
|
+
onBeforeUnmount(() => handle?.detach());
|
|
33
|
+
return (_ctx, _cache) => {
|
|
34
|
+
return withDirectives((openBlock(), createBlock(resolveDynamicComponent(unref(card).tag()), mergeProps({
|
|
35
|
+
ref_key: "root",
|
|
36
|
+
ref: root
|
|
37
|
+
}, unref(card).parts.root(), { onClick: unref(card).handleClick }), {
|
|
38
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
39
|
+
_: 3
|
|
40
|
+
}, 16, ["onClick"])), [[unref(vRipple), unref(card).acts()]]);
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "@rio-m3e/styles/card.css";
|
|
2
|
+
type __VLS_Slots = {
|
|
3
|
+
/** Buttons, as Learn more or Add to cart, at the card's end */
|
|
4
|
+
default?: () => unknown;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
7
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export { _default as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createElementBlock, defineComponent, guardReactiveProps, normalizeProps, openBlock, renderSlot, unref } from "vue";
|
|
2
|
+
import { createCardActions } from "@rio-m3e/core";
|
|
3
|
+
import "@rio-m3e/styles/card.css";
|
|
4
|
+
// src/card/CardActions.vue
|
|
5
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
6
|
+
__name: "CardActions",
|
|
7
|
+
setup(__props) {
|
|
8
|
+
const actions = createCardActions();
|
|
9
|
+
return (_ctx, _cache) => {
|
|
10
|
+
return openBlock(), createElementBlock("div", normalizeProps(guardReactiveProps(unref(actions).parts.root())), [renderSlot(_ctx.$slots, "default")], 16);
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "@rio-m3e/styles/card.css";
|
|
2
|
+
type __VLS_Slots = {
|
|
3
|
+
/** Supporting text, as a summary, or other content, 16px in from the card's sides */
|
|
4
|
+
default?: () => unknown;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
7
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export { _default as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createElementBlock, defineComponent, guardReactiveProps, normalizeProps, openBlock, renderSlot, unref } from "vue";
|
|
2
|
+
import { createCardContent } from "@rio-m3e/core";
|
|
3
|
+
import "@rio-m3e/styles/card.css";
|
|
4
|
+
// src/card/CardContent.vue
|
|
5
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
6
|
+
__name: "CardContent",
|
|
7
|
+
setup(__props) {
|
|
8
|
+
const content = createCardContent();
|
|
9
|
+
return (_ctx, _cache) => {
|
|
10
|
+
return openBlock(), createElementBlock("div", normalizeProps(guardReactiveProps(unref(content).parts.root())), [renderSlot(_ctx.$slots, "default")], 16);
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CardHeaderProps } from "@rio-m3e/core";
|
|
2
|
+
import "@rio-m3e/styles/card.css";
|
|
3
|
+
interface Props extends CardHeaderProps {
|
|
4
|
+
/** The headline's text, as the card's subject. The `headline` slot takes its place. */
|
|
5
|
+
headline?: string;
|
|
6
|
+
/** The subhead's text, as a byline. The `subhead` slot takes its place. */
|
|
7
|
+
subhead?: string;
|
|
8
|
+
}
|
|
9
|
+
type __VLS_Slots = {
|
|
10
|
+
/** A thumbnail before the text, as an avatar or a logo */
|
|
11
|
+
leading?: () => unknown;
|
|
12
|
+
/** The headline, in place of `headline` */
|
|
13
|
+
headline?: () => unknown;
|
|
14
|
+
/** The subhead, in place of `subhead` */
|
|
15
|
+
subhead?: () => unknown;
|
|
16
|
+
/** An element after the text, as an icon button that opens an overflow menu */
|
|
17
|
+
trailing?: () => unknown;
|
|
18
|
+
};
|
|
19
|
+
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>;
|
|
20
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export { _default as default };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderSlot, resolveDynamicComponent, toDisplayString, unref, useSlots, withCtx } from "vue";
|
|
2
|
+
import { createCardHeader } from "@rio-m3e/core";
|
|
3
|
+
import "@rio-m3e/styles/card.css";
|
|
4
|
+
// src/card/CardHeader.vue
|
|
5
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
6
|
+
__name: "CardHeader",
|
|
7
|
+
props: {
|
|
8
|
+
headline: {},
|
|
9
|
+
subhead: {},
|
|
10
|
+
headingLevel: {}
|
|
11
|
+
},
|
|
12
|
+
setup(__props) {
|
|
13
|
+
const slots = useSlots();
|
|
14
|
+
const header = createCardHeader({
|
|
15
|
+
props: () => ({ headingLevel: __props.headingLevel }),
|
|
16
|
+
content: () => ({
|
|
17
|
+
leading: !!slots.leading,
|
|
18
|
+
subhead: !!slots.subhead || !!__props.subhead,
|
|
19
|
+
trailing: !!slots.trailing
|
|
20
|
+
})
|
|
21
|
+
});
|
|
22
|
+
return (_ctx, _cache) => {
|
|
23
|
+
return openBlock(), createElementBlock("div", normalizeProps(guardReactiveProps(unref(header).parts.root())), [
|
|
24
|
+
unref(header).showsLeading() ? (openBlock(), createElementBlock("div", normalizeProps(mergeProps({ key: 0 }, unref(header).parts.leading())), [renderSlot(_ctx.$slots, "leading")], 16)) : createCommentVNode("v-if", true),
|
|
25
|
+
createElementVNode("div", normalizeProps(guardReactiveProps(unref(header).parts.text())), [(openBlock(), createBlock(resolveDynamicComponent(unref(header).headlineTag()), normalizeProps(guardReactiveProps(unref(header).parts.headline())), {
|
|
26
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "headline", {}, () => [createTextVNode(toDisplayString(__props.headline), 1)])]),
|
|
27
|
+
_: 3
|
|
28
|
+
}, 16)), unref(header).showsSubhead() ? (openBlock(), createElementBlock("div", normalizeProps(mergeProps({ key: 0 }, unref(header).parts.subhead())), [renderSlot(_ctx.$slots, "subhead", {}, () => [createTextVNode(toDisplayString(__props.subhead), 1)])], 16)) : createCommentVNode("v-if", true)], 16),
|
|
29
|
+
unref(header).showsTrailing() ? (openBlock(), createElementBlock("div", normalizeProps(mergeProps({ key: 1 }, unref(header).parts.trailing())), [renderSlot(_ctx.$slots, "trailing")], 16)) : createCommentVNode("v-if", true)
|
|
30
|
+
], 16);
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "@rio-m3e/styles/card.css";
|
|
2
|
+
type __VLS_Slots = {
|
|
3
|
+
/** An image, a video, or other media, to the card's edges */
|
|
4
|
+
default?: () => unknown;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
7
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export { _default as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createElementBlock, defineComponent, guardReactiveProps, normalizeProps, openBlock, renderSlot, unref } from "vue";
|
|
2
|
+
import { createCardMedia } from "@rio-m3e/core";
|
|
3
|
+
import "@rio-m3e/styles/card.css";
|
|
4
|
+
// src/card/CardMedia.vue
|
|
5
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
6
|
+
__name: "CardMedia",
|
|
7
|
+
setup(__props) {
|
|
8
|
+
const media = createCardMedia();
|
|
9
|
+
return (_ctx, _cache) => {
|
|
10
|
+
return openBlock(), createElementBlock("div", normalizeProps(guardReactiveProps(unref(media).parts.root())), [renderSlot(_ctx.$slots, "default")], 16);
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
export { _sfc_main as default };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { CheckboxProps } from "@rio-m3e/core";
|
|
2
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
3
|
+
import "@rio-m3e/styles/base/density.css";
|
|
2
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";
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { useRipple } from "../ripple/ripple.js";
|
|
2
2
|
import { createElementBlock, createElementVNode, defineComponent, guardReactiveProps, mergeProps, nextTick, normalizeProps, onBeforeUnmount, onMounted, onUpdated, openBlock, unref, useTemplateRef } from "vue";
|
|
3
3
|
import { attachCheckable, createCheckbox, mergePartAttrs } from "@rio-m3e/core";
|
|
4
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
5
|
+
import "@rio-m3e/styles/base/density.css";
|
|
4
6
|
import "@rio-m3e/styles/base/focus-ring.css";
|
|
5
7
|
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
6
8
|
import "@rio-m3e/styles/base/ripple.css";
|
|
@@ -13,6 +15,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
13
15
|
selected: { type: Boolean },
|
|
14
16
|
indeterminate: { type: Boolean },
|
|
15
17
|
error: { type: Boolean },
|
|
18
|
+
color: {},
|
|
19
|
+
density: {},
|
|
16
20
|
disabled: { type: Boolean },
|
|
17
21
|
softDisabled: { type: Boolean }
|
|
18
22
|
},
|
|
@@ -23,6 +27,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
23
27
|
selected: __props.selected,
|
|
24
28
|
indeterminate: __props.indeterminate,
|
|
25
29
|
error: __props.error,
|
|
30
|
+
color: __props.color,
|
|
31
|
+
density: __props.density,
|
|
26
32
|
disabled: __props.disabled,
|
|
27
33
|
softDisabled: __props.softDisabled
|
|
28
34
|
}) });
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { AssistChipProps } from "@rio-m3e/core";
|
|
2
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
3
|
+
import "@rio-m3e/styles/base/density.css";
|
|
2
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/touch-target.css";
|
|
@@ -2,6 +2,8 @@ import { useRipple } from "../ripple/ripple.js";
|
|
|
2
2
|
import { useChipSetItem } from "./context.js";
|
|
3
3
|
import { createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderSlot, resolveDynamicComponent, unref, useSlots, useTemplateRef, withCtx } from "vue";
|
|
4
4
|
import { createAssistChip } from "@rio-m3e/core";
|
|
5
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
6
|
+
import "@rio-m3e/styles/base/density.css";
|
|
5
7
|
import "@rio-m3e/styles/base/focus-ring.css";
|
|
6
8
|
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
7
9
|
import "@rio-m3e/styles/base/touch-target.css";
|
|
@@ -13,6 +15,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
13
15
|
props: {
|
|
14
16
|
elevated: { type: Boolean },
|
|
15
17
|
href: {},
|
|
18
|
+
color: {},
|
|
19
|
+
density: {},
|
|
16
20
|
disabled: { type: Boolean },
|
|
17
21
|
softDisabled: { type: Boolean }
|
|
18
22
|
},
|
|
@@ -25,6 +29,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
25
29
|
props: () => ({
|
|
26
30
|
elevated: __props.elevated,
|
|
27
31
|
href: __props.href,
|
|
32
|
+
color: __props.color,
|
|
33
|
+
density: __props.density,
|
|
28
34
|
disabled: __props.disabled,
|
|
29
35
|
softDisabled: __props.softDisabled
|
|
30
36
|
}),
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { ChipSetProps, ChipSetSelected } from "@rio-m3e/core";
|
|
2
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
3
|
+
import "@rio-m3e/styles/base/density.css";
|
|
2
4
|
import "@rio-m3e/styles/chip.css";
|
|
3
5
|
interface Props extends Omit<ChipSetProps, 'selected'> {
|
|
4
6
|
/** The selected value (`single`) or values (`multiple`), with `v-model`. */
|
package/dist/chip/ChipSet.vue.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { chipSetKey } from "./context.js";
|
|
2
2
|
import { createElementBlock, defineComponent, mergeProps, onBeforeUnmount, onMounted, onUpdated, openBlock, provide, ref, renderSlot, unref, useTemplateRef } from "vue";
|
|
3
3
|
import { attachChipSet, createChipSet } from "@rio-m3e/core";
|
|
4
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
5
|
+
import "@rio-m3e/styles/base/density.css";
|
|
4
6
|
import "@rio-m3e/styles/chip.css";
|
|
5
7
|
// src/chip/ChipSet.vue
|
|
6
8
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
@@ -9,7 +11,9 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
9
11
|
modelValue: {},
|
|
10
12
|
selection: {},
|
|
11
13
|
required: { type: Boolean },
|
|
12
|
-
scroll: { type: Boolean }
|
|
14
|
+
scroll: { type: Boolean },
|
|
15
|
+
color: {},
|
|
16
|
+
density: {}
|
|
13
17
|
},
|
|
14
18
|
emits: ["update:modelValue"],
|
|
15
19
|
setup(__props, { emit: __emit }) {
|
|
@@ -21,6 +25,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
21
25
|
selection: __props.selection,
|
|
22
26
|
required: __props.required,
|
|
23
27
|
scroll: __props.scroll,
|
|
28
|
+
color: __props.color,
|
|
29
|
+
density: __props.density,
|
|
24
30
|
selected: __props.modelValue
|
|
25
31
|
}),
|
|
26
32
|
tabStop: () => tabStop.value,
|
|
@@ -1,9 +1,19 @@
|
|
|
1
|
-
import { FilterChipProps } from "@rio-m3e/core";
|
|
1
|
+
import { ChipMessages, FilterChipProps } from "@rio-m3e/core";
|
|
2
|
+
import "@rio-m3e/styles/base/accent.css";
|
|
3
|
+
import "@rio-m3e/styles/base/density.css";
|
|
2
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/touch-target.css";
|
|
5
7
|
import "@rio-m3e/styles/base/ripple.css";
|
|
6
8
|
import "@rio-m3e/styles/chip.css";
|
|
9
|
+
type __VLS_Props = FilterChipProps & {
|
|
10
|
+
/**
|
|
11
|
+
* A language tag, for the remove button's name. Without it, the one provided, or the page's.
|
|
12
|
+
*/
|
|
13
|
+
locale?: string;
|
|
14
|
+
/** Replaces the remove button's name. */
|
|
15
|
+
messages?: Partial<ChipMessages>;
|
|
16
|
+
};
|
|
7
17
|
type __VLS_Slots = {
|
|
8
18
|
/** The label. */
|
|
9
19
|
default?: () => unknown;
|
|
@@ -19,15 +29,22 @@ type __VLS_Slots = {
|
|
|
19
29
|
* one, the `dropdown` icon registered with `createRio`.
|
|
20
30
|
*/
|
|
21
31
|
'dropdown-icon'?: () => unknown;
|
|
32
|
+
/**
|
|
33
|
+
* A `removable` chip's remove icon, such as an X. Hidden from assistive technology. Without one,
|
|
34
|
+
* the `remove` icon registered with `createRio`.
|
|
35
|
+
*/
|
|
36
|
+
'remove-icon'?: () => unknown;
|
|
22
37
|
};
|
|
23
|
-
declare const __VLS_base: import("vue").DefineComponent<
|
|
38
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
39
|
+
"update:open": (open: boolean) => any;
|
|
24
40
|
click: (event: MouseEvent) => any;
|
|
25
41
|
"update:selected": (selected: boolean) => any;
|
|
26
|
-
|
|
27
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
42
|
+
remove: () => any;
|
|
43
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
44
|
+
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
28
45
|
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
29
46
|
"onUpdate:selected"?: ((selected: boolean) => any) | undefined;
|
|
30
|
-
|
|
47
|
+
onRemove?: (() => any) | undefined;
|
|
31
48
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
32
49
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
33
50
|
declare const _default: typeof __VLS_export;
|