@rio-m3e/vue 0.7.0 → 0.8.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/dist/app-bar/AppBar.vue.js +3 -1
- package/dist/app-bar/context.js +3 -0
- package/dist/browser/rio-vue.css +366 -78
- package/dist/browser/rio-vue.global.js +21 -21
- package/dist/browser/rio-vue.js +21 -21
- package/dist/button-group/ButtonGroup.vue.d.ts +30 -20
- package/dist/button-group/ButtonGroup.vue.js +2 -1
- package/dist/checkbox/Checkbox.vue.d.ts +1 -0
- package/dist/checkbox/Checkbox.vue.js +3 -0
- package/dist/chip/AssistChip.vue.d.ts +1 -0
- package/dist/chip/AssistChip.vue.js +3 -0
- package/dist/chip/ChipSet.vue.d.ts +27 -16
- package/dist/chip/ChipSet.vue.js +6 -2
- package/dist/chip/FilterChip.vue.d.ts +19 -3
- package/dist/chip/FilterChip.vue.js +54 -8
- package/dist/chip/InputChip.vue.d.ts +1 -0
- package/dist/chip/InputChip.vue.js +3 -0
- package/dist/chip/SuggestionChip.vue.d.ts +1 -0
- package/dist/chip/SuggestionChip.vue.js +3 -0
- package/dist/date-picker/DatePicker.vue.js +14 -11
- package/dist/date-picker/DatePickerDialog.vue.js +13 -9
- package/dist/date-picker/DateRangePickerDialog.vue.js +19 -17
- package/dist/icon-button/IconButton.vue.d.ts +1 -0
- package/dist/icon-button/IconButton.vue.js +3 -0
- package/dist/index.d.ts +8 -6
- package/dist/index.js +8 -6
- package/dist/list/List.vue.d.ts +26 -16
- package/dist/list/List.vue.js +2 -1
- package/dist/list/ListItem.vue.d.ts +7 -1
- package/dist/list/ListItem.vue.js +12 -3
- package/dist/model/model.d.ts +8 -0
- package/dist/model/model.js +15 -0
- package/dist/navigation-bar/NavigationBar.vue.d.ts +21 -16
- package/dist/navigation-bar/NavigationBar.vue.js +1 -0
- package/dist/navigation-rail/NavigationRail.vue.d.ts +33 -32
- package/dist/navigation-rail/NavigationRail.vue.js +1 -0
- package/dist/overflow/OverflowMenu.vue.js +10 -12
- package/dist/radio/Radio.vue.d.ts +1 -0
- package/dist/radio/Radio.vue.js +3 -0
- package/dist/radio/RadioGroup.vue.d.ts +23 -21
- package/dist/radio/RadioGroup.vue.js +10 -8
- package/dist/rio/rio.js +2 -0
- package/dist/scroll-field/ScrollField.vue.d.ts +28 -12
- package/dist/scroll-field/ScrollField.vue.js +6 -4
- package/dist/select/Select.vue.d.ts +42 -39
- package/dist/select/Select.vue.js +8 -5
- package/dist/switch/Switch.vue.d.ts +1 -0
- package/dist/switch/Switch.vue.js +3 -0
- package/dist/tabs/Tab.vue.d.ts +8 -1
- package/dist/tabs/Tab.vue.js +51 -26
- package/dist/tabs/TabGroup.vue.d.ts +22 -18
- package/dist/tabs/TabGroup.vue.js +5 -5
- package/dist/tabs/Tabs.vue.d.ts +24 -21
- package/dist/tabs/Tabs.vue.js +28 -15
- package/dist/text-field/TextField.vue.d.ts +28 -26
- package/dist/text-field/TextField.vue.js +15 -16
- 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/tooltip/Tooltip.vue.js +10 -3
- package/package.json +6 -5
|
@@ -1,28 +1,38 @@
|
|
|
1
|
+
import { ModelModifiers, SelectionChange } from "../model/model.js";
|
|
1
2
|
import { ButtonGroupProps, ButtonGroupSelected } from "@rio-m3e/core";
|
|
2
3
|
import "@rio-m3e/styles/button-group.css";
|
|
3
|
-
interface Props extends Omit<ButtonGroupProps, 'selected'> {
|
|
4
|
+
export interface Props<T extends ButtonGroupSelected, R extends boolean> extends Omit<ButtonGroupProps, 'selected' | 'required'> {
|
|
4
5
|
/** The selected value (`single`) or values (`multiple`), with `v-model`. */
|
|
5
|
-
modelValue?:
|
|
6
|
-
}
|
|
7
|
-
type __VLS_Slots = {
|
|
6
|
+
modelValue?: T;
|
|
8
7
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* With a selection, keeps at least one button selected: the last one can't be turned off, so a
|
|
9
|
+
* single selection never reports `undefined`.
|
|
11
10
|
*/
|
|
12
|
-
|
|
13
|
-
/** The
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
declare const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
11
|
+
required?: R & boolean;
|
|
12
|
+
/** The modifiers given to `v-model`, as `.trim` */
|
|
13
|
+
modelModifiers?: ModelModifiers;
|
|
14
|
+
}
|
|
15
|
+
declare const __VLS_export: <T extends ButtonGroupSelected, R extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
16
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<Props<T, R> & {
|
|
17
|
+
"onUpdate:modelValue"?: ((selected: SelectionChange<T, R>) => any) | undefined;
|
|
18
|
+
}> & (typeof globalThis extends {
|
|
19
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
20
|
+
} ? P : {});
|
|
21
|
+
expose: (exposed: {}) => void;
|
|
22
|
+
attrs: any;
|
|
23
|
+
slots: {
|
|
24
|
+
/**
|
|
25
|
+
* `RioButton`s and `RioIconButton`s. They take the group's size and shape unless they set their
|
|
26
|
+
* own. With `overflow`, the ones that don't fit go into the menu, last first.
|
|
27
|
+
*/
|
|
28
|
+
default?: () => unknown;
|
|
29
|
+
/** The "More options" button's icon, in place of the one the app registered (`more`) */
|
|
30
|
+
'more-icon'?: () => unknown;
|
|
26
31
|
};
|
|
32
|
+
emit: (evt: "update:modelValue", selected: SelectionChange<T, R>) => void;
|
|
33
|
+
}>) => import("vue").VNode & {
|
|
34
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
27
35
|
};
|
|
36
|
+
declare const _default: typeof __VLS_export;
|
|
37
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
|
|
28
38
|
export { _default as default };
|
|
@@ -9,12 +9,13 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
9
9
|
__name: "ButtonGroup",
|
|
10
10
|
props: {
|
|
11
11
|
modelValue: {},
|
|
12
|
+
required: { type: Boolean },
|
|
13
|
+
modelModifiers: {},
|
|
12
14
|
variant: {},
|
|
13
15
|
size: {},
|
|
14
16
|
shape: {},
|
|
15
17
|
color: {},
|
|
16
18
|
selection: {},
|
|
17
|
-
required: { type: Boolean },
|
|
18
19
|
disabled: { type: Boolean },
|
|
19
20
|
overflow: { type: Boolean },
|
|
20
21
|
maxItems: {}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CheckboxProps } from "@rio-m3e/core";
|
|
2
2
|
import "@rio-m3e/styles/base/accent.css";
|
|
3
|
+
import "@rio-m3e/styles/base/density.css";
|
|
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";
|
|
@@ -2,6 +2,7 @@ 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
4
|
import "@rio-m3e/styles/base/accent.css";
|
|
5
|
+
import "@rio-m3e/styles/base/density.css";
|
|
5
6
|
import "@rio-m3e/styles/base/focus-ring.css";
|
|
6
7
|
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
7
8
|
import "@rio-m3e/styles/base/ripple.css";
|
|
@@ -15,6 +16,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
15
16
|
indeterminate: { type: Boolean },
|
|
16
17
|
error: { type: Boolean },
|
|
17
18
|
color: {},
|
|
19
|
+
density: {},
|
|
18
20
|
disabled: { type: Boolean },
|
|
19
21
|
softDisabled: { type: Boolean }
|
|
20
22
|
},
|
|
@@ -26,6 +28,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
26
28
|
indeterminate: __props.indeterminate,
|
|
27
29
|
error: __props.error,
|
|
28
30
|
color: __props.color,
|
|
31
|
+
density: __props.density,
|
|
29
32
|
disabled: __props.disabled,
|
|
30
33
|
softDisabled: __props.softDisabled
|
|
31
34
|
}) });
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AssistChipProps } from "@rio-m3e/core";
|
|
2
2
|
import "@rio-m3e/styles/base/accent.css";
|
|
3
|
+
import "@rio-m3e/styles/base/density.css";
|
|
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/touch-target.css";
|
|
@@ -3,6 +3,7 @@ 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
5
|
import "@rio-m3e/styles/base/accent.css";
|
|
6
|
+
import "@rio-m3e/styles/base/density.css";
|
|
6
7
|
import "@rio-m3e/styles/base/focus-ring.css";
|
|
7
8
|
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
8
9
|
import "@rio-m3e/styles/base/touch-target.css";
|
|
@@ -15,6 +16,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
15
16
|
elevated: { type: Boolean },
|
|
16
17
|
href: {},
|
|
17
18
|
color: {},
|
|
19
|
+
density: {},
|
|
18
20
|
disabled: { type: Boolean },
|
|
19
21
|
softDisabled: { type: Boolean }
|
|
20
22
|
},
|
|
@@ -28,6 +30,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
28
30
|
elevated: __props.elevated,
|
|
29
31
|
href: __props.href,
|
|
30
32
|
color: __props.color,
|
|
33
|
+
density: __props.density,
|
|
31
34
|
disabled: __props.disabled,
|
|
32
35
|
softDisabled: __props.softDisabled
|
|
33
36
|
}),
|
|
@@ -1,24 +1,35 @@
|
|
|
1
|
+
import { ModelModifiers, SelectionChange } from "../model/model.js";
|
|
1
2
|
import { ChipSetProps, ChipSetSelected } from "@rio-m3e/core";
|
|
2
3
|
import "@rio-m3e/styles/base/accent.css";
|
|
4
|
+
import "@rio-m3e/styles/base/density.css";
|
|
3
5
|
import "@rio-m3e/styles/chip.css";
|
|
4
|
-
interface Props extends Omit<ChipSetProps, 'selected'> {
|
|
6
|
+
export interface Props<T extends ChipSetSelected, R extends boolean> extends Omit<ChipSetProps, 'selected' | 'required'> {
|
|
5
7
|
/** The selected value (`single`) or values (`multiple`), with `v-model`. */
|
|
6
|
-
modelValue?:
|
|
8
|
+
modelValue?: T;
|
|
9
|
+
/**
|
|
10
|
+
* With a selection, keeps at least one chip selected: the last one can't be turned off, so a
|
|
11
|
+
* single selection never reports `undefined`.
|
|
12
|
+
*/
|
|
13
|
+
required?: R & boolean;
|
|
14
|
+
/** The modifiers given to `v-model`, as `.trim` */
|
|
15
|
+
modelModifiers?: ModelModifiers;
|
|
7
16
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
20
|
-
new (): {
|
|
21
|
-
$slots: S;
|
|
17
|
+
declare const __VLS_export: <T extends ChipSetSelected, R extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
18
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<Props<T, R> & {
|
|
19
|
+
"onUpdate:modelValue"?: ((selected: SelectionChange<T, R>) => any) | undefined;
|
|
20
|
+
}> & (typeof globalThis extends {
|
|
21
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
22
|
+
} ? P : {});
|
|
23
|
+
expose: (exposed: {}) => void;
|
|
24
|
+
attrs: any;
|
|
25
|
+
slots: {
|
|
26
|
+
/** The chips. Filter chips with a `value` take their selection from the set, with `selection`. */
|
|
27
|
+
default?: () => unknown;
|
|
22
28
|
};
|
|
29
|
+
emit: (evt: "update:modelValue", selected: SelectionChange<T, R>) => void;
|
|
30
|
+
}>) => import("vue").VNode & {
|
|
31
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
23
32
|
};
|
|
33
|
+
declare const _default: typeof __VLS_export;
|
|
34
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
|
|
24
35
|
export { _default as default };
|
package/dist/chip/ChipSet.vue.js
CHANGED
|
@@ -2,16 +2,19 @@ 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
4
|
import "@rio-m3e/styles/base/accent.css";
|
|
5
|
+
import "@rio-m3e/styles/base/density.css";
|
|
5
6
|
import "@rio-m3e/styles/chip.css";
|
|
6
7
|
// src/chip/ChipSet.vue
|
|
7
8
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
8
9
|
__name: "ChipSet",
|
|
9
10
|
props: {
|
|
10
11
|
modelValue: {},
|
|
11
|
-
selection: {},
|
|
12
12
|
required: { type: Boolean },
|
|
13
|
+
modelModifiers: {},
|
|
14
|
+
selection: {},
|
|
13
15
|
scroll: { type: Boolean },
|
|
14
|
-
color: {}
|
|
16
|
+
color: {},
|
|
17
|
+
density: {}
|
|
15
18
|
},
|
|
16
19
|
emits: ["update:modelValue"],
|
|
17
20
|
setup(__props, { emit: __emit }) {
|
|
@@ -24,6 +27,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
24
27
|
required: __props.required,
|
|
25
28
|
scroll: __props.scroll,
|
|
26
29
|
color: __props.color,
|
|
30
|
+
density: __props.density,
|
|
27
31
|
selected: __props.modelValue
|
|
28
32
|
}),
|
|
29
33
|
tabStop: () => tabStop.value,
|
|
@@ -1,10 +1,19 @@
|
|
|
1
|
-
import { FilterChipProps } from "@rio-m3e/core";
|
|
1
|
+
import { ChipMessages, FilterChipProps } from "@rio-m3e/core";
|
|
2
2
|
import "@rio-m3e/styles/base/accent.css";
|
|
3
|
+
import "@rio-m3e/styles/base/density.css";
|
|
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/touch-target.css";
|
|
6
7
|
import "@rio-m3e/styles/base/ripple.css";
|
|
7
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
|
+
};
|
|
8
17
|
type __VLS_Slots = {
|
|
9
18
|
/** The label. */
|
|
10
19
|
default?: () => unknown;
|
|
@@ -20,15 +29,22 @@ type __VLS_Slots = {
|
|
|
20
29
|
* one, the `dropdown` icon registered with `createRio`.
|
|
21
30
|
*/
|
|
22
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;
|
|
23
37
|
};
|
|
24
|
-
declare const __VLS_base: import("vue").DefineComponent<
|
|
38
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
25
39
|
"update:open": (open: boolean) => any;
|
|
26
40
|
click: (event: MouseEvent) => any;
|
|
27
41
|
"update:selected": (selected: boolean) => any;
|
|
28
|
-
|
|
42
|
+
remove: () => any;
|
|
43
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
29
44
|
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
30
45
|
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
31
46
|
"onUpdate:selected"?: ((selected: boolean) => any) | undefined;
|
|
47
|
+
onRemove?: (() => any) | undefined;
|
|
32
48
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
49
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
34
50
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { useLocale, useMessages } from "../locale/locale.js";
|
|
1
2
|
import { useRipple } from "../ripple/ripple.js";
|
|
2
3
|
import { useChipSetItem } from "./context.js";
|
|
3
4
|
import _sfc_main$1 from "../icon/Icon.vue.js";
|
|
4
5
|
import { useIconOfAlias } from "../icon/icons.js";
|
|
5
|
-
import { createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderSlot, unref, useSlots, useTemplateRef } from "vue";
|
|
6
|
-
import { createFilterChip } from "@rio-m3e/core";
|
|
6
|
+
import { computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderSlot, toDisplayString, unref, useAttrs, useId, useSlots, useTemplateRef } from "vue";
|
|
7
|
+
import { createFilterChip, mergePartAttrs } from "@rio-m3e/core";
|
|
7
8
|
import "@rio-m3e/styles/base/accent.css";
|
|
9
|
+
import "@rio-m3e/styles/base/density.css";
|
|
8
10
|
import "@rio-m3e/styles/base/focus-ring.css";
|
|
9
11
|
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
10
12
|
import "@rio-m3e/styles/base/touch-target.css";
|
|
@@ -12,6 +14,7 @@ import "@rio-m3e/styles/base/ripple.css";
|
|
|
12
14
|
import "@rio-m3e/styles/chip.css";
|
|
13
15
|
// src/chip/FilterChip.vue
|
|
14
16
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
17
|
+
inheritAttrs: false,
|
|
15
18
|
__name: "FilterChip",
|
|
16
19
|
props: {
|
|
17
20
|
selected: { type: Boolean },
|
|
@@ -19,18 +22,31 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
19
22
|
value: {},
|
|
20
23
|
menu: { type: Boolean },
|
|
21
24
|
open: { type: Boolean },
|
|
25
|
+
removable: { type: Boolean },
|
|
22
26
|
color: {},
|
|
27
|
+
density: {},
|
|
23
28
|
disabled: { type: Boolean },
|
|
24
|
-
softDisabled: { type: Boolean }
|
|
29
|
+
softDisabled: { type: Boolean },
|
|
30
|
+
locale: {},
|
|
31
|
+
messages: {}
|
|
25
32
|
},
|
|
26
33
|
emits: [
|
|
27
34
|
"click",
|
|
28
35
|
"update:selected",
|
|
29
|
-
"update:open"
|
|
36
|
+
"update:open",
|
|
37
|
+
"remove"
|
|
30
38
|
],
|
|
31
39
|
setup(__props, { emit: __emit }) {
|
|
32
40
|
const emit = __emit;
|
|
33
41
|
const slots = useSlots();
|
|
42
|
+
const attrs = useAttrs();
|
|
43
|
+
const rest = computed(() => ({
|
|
44
|
+
...attrs,
|
|
45
|
+
class: void 0,
|
|
46
|
+
style: void 0
|
|
47
|
+
}));
|
|
48
|
+
const text = useMessages("chip", useLocale(() => __props.locale), () => __props.messages);
|
|
49
|
+
const id = useId();
|
|
34
50
|
const item = useChipSetItem();
|
|
35
51
|
const grouped = () => !!item.set && item.set.selection() !== "none" && __props.value !== void 0 && !__props.menu;
|
|
36
52
|
const checkIcon = useIconOfAlias("check");
|
|
@@ -42,7 +58,9 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
42
58
|
value: __props.value,
|
|
43
59
|
menu: __props.menu,
|
|
44
60
|
open: __props.open,
|
|
61
|
+
removable: __props.removable,
|
|
45
62
|
color: __props.color,
|
|
63
|
+
density: __props.density,
|
|
46
64
|
disabled: __props.disabled,
|
|
47
65
|
softDisabled: __props.softDisabled
|
|
48
66
|
}),
|
|
@@ -58,17 +76,45 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
58
76
|
if (grouped()) item.set.select(__props.value, next);
|
|
59
77
|
else emit("update:selected", next);
|
|
60
78
|
},
|
|
61
|
-
onOpenChange: (next) => emit("update:open", next)
|
|
79
|
+
onOpenChange: (next) => emit("update:open", next),
|
|
80
|
+
messages: () => text.value,
|
|
81
|
+
ids: {
|
|
82
|
+
label: `${id}-label`,
|
|
83
|
+
removeBefore: `${id}-remove-before`,
|
|
84
|
+
removeAfter: `${id}-remove-after`
|
|
85
|
+
},
|
|
86
|
+
onRemove: () => emit("remove")
|
|
62
87
|
});
|
|
63
|
-
useRipple(useTemplateRef("
|
|
88
|
+
useRipple(useTemplateRef("toggle"), useTemplateRef("state"));
|
|
64
89
|
return (_ctx, _cache) => {
|
|
65
|
-
return openBlock(), createElementBlock("
|
|
90
|
+
return unref(chip).removable() ? (openBlock(), createElementBlock("span", mergeProps({ key: 0 }, unref(chip).parts.root(), {
|
|
91
|
+
class: unref(attrs).class,
|
|
92
|
+
style: unref(attrs).style,
|
|
93
|
+
onKeydown: _cache[2] || (_cache[2] = (...args) => unref(chip).handleKeydown && unref(chip).handleKeydown(...args))
|
|
94
|
+
}), [
|
|
95
|
+
createElementVNode("span", mergeProps({ ref: "state" }, unref(chip).parts.state()), null, 16),
|
|
96
|
+
createElementVNode("button", mergeProps({ ref: "toggle" }, unref(mergePartAttrs)(rest.value, unref(chip).parts.action()), { onClick: _cache[0] || (_cache[0] = (...args) => unref(chip).handleClick && unref(chip).handleClick(...args)) }), [
|
|
97
|
+
createElementVNode("span", normalizeProps(guardReactiveProps(unref(chip).parts.touch())), null, 16),
|
|
98
|
+
unref(chip).showsIcon() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 0 }, unref(chip).parts.icon())), [unref(chip).showsSelectedIcon() ? renderSlot(_ctx.$slots, "selected-icon", {}, () => [createVNode(_sfc_main$1, { alias: "check" })], void 0, 0) : renderSlot(_ctx.$slots, "icon", {}, void 0, void 0, 1)], 16)) : createCommentVNode("v-if", true),
|
|
99
|
+
createElementVNode("span", normalizeProps(guardReactiveProps(unref(chip).parts.label())), [renderSlot(_ctx.$slots, "default")], 16)
|
|
100
|
+
], 16),
|
|
101
|
+
createElementVNode("button", mergeProps(unref(chip).parts.remove(), { onClick: _cache[1] || (_cache[1] = (...args) => unref(chip).handleRemoveClick && unref(chip).handleRemoveClick(...args)) }), [createElementVNode("span", normalizeProps(guardReactiveProps(unref(chip).parts.removeTouch())), null, 16), createElementVNode("span", normalizeProps(guardReactiveProps(unref(chip).parts.removeIcon())), [renderSlot(_ctx.$slots, "remove-icon", {}, () => [createVNode(_sfc_main$1, { alias: "remove" })])], 16)], 16),
|
|
102
|
+
unref(chip).showsRemoveBefore() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 0 }, unref(chip).parts.removeBefore())), toDisplayString(unref(chip).removeText().before), 17)) : createCommentVNode("v-if", true),
|
|
103
|
+
unref(chip).showsRemoveAfter() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 1 }, unref(chip).parts.removeAfter())), toDisplayString(unref(chip).removeText().after), 17)) : createCommentVNode("v-if", true)
|
|
104
|
+
], 16)) : (openBlock(), createElementBlock("button", mergeProps({
|
|
105
|
+
key: 1,
|
|
106
|
+
ref: "toggle"
|
|
107
|
+
}, unref(mergePartAttrs)(rest.value, unref(chip).parts.root()), {
|
|
108
|
+
class: unref(attrs).class,
|
|
109
|
+
style: unref(attrs).style,
|
|
110
|
+
onClick: _cache[3] || (_cache[3] = (...args) => unref(chip).handleClick && unref(chip).handleClick(...args))
|
|
111
|
+
}), [
|
|
66
112
|
createElementVNode("span", normalizeProps(guardReactiveProps(unref(chip).parts.touch())), null, 16),
|
|
67
113
|
createElementVNode("span", mergeProps({ ref: "state" }, unref(chip).parts.state()), null, 16),
|
|
68
114
|
unref(chip).showsIcon() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 0 }, unref(chip).parts.icon())), [unref(chip).showsSelectedIcon() ? renderSlot(_ctx.$slots, "selected-icon", {}, () => [createVNode(_sfc_main$1, { alias: "check" })], void 0, 0) : renderSlot(_ctx.$slots, "icon", {}, void 0, void 0, 1)], 16)) : createCommentVNode("v-if", true),
|
|
69
115
|
createElementVNode("span", normalizeProps(guardReactiveProps(unref(chip).parts.label())), [renderSlot(_ctx.$slots, "default")], 16),
|
|
70
116
|
unref(chip).showsTrailing() ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 1 }, unref(chip).parts.trailing())), [renderSlot(_ctx.$slots, "dropdown-icon", {}, () => [createVNode(_sfc_main$1, { alias: "dropdown" })])], 16)) : createCommentVNode("v-if", true)
|
|
71
|
-
], 16);
|
|
117
|
+
], 16));
|
|
72
118
|
};
|
|
73
119
|
}
|
|
74
120
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ChipMessages, InputChipProps } from "@rio-m3e/core";
|
|
2
2
|
import "@rio-m3e/styles/base/accent.css";
|
|
3
|
+
import "@rio-m3e/styles/base/density.css";
|
|
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/touch-target.css";
|
|
@@ -5,6 +5,7 @@ import _sfc_main$1 from "../icon/Icon.vue.js";
|
|
|
5
5
|
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderSlot, resolveDynamicComponent, toDisplayString, unref, useAttrs, useId, useSlots, useTemplateRef, withCtx } from "vue";
|
|
6
6
|
import { createInputChip, mergePartAttrs } from "@rio-m3e/core";
|
|
7
7
|
import "@rio-m3e/styles/base/accent.css";
|
|
8
|
+
import "@rio-m3e/styles/base/density.css";
|
|
8
9
|
import "@rio-m3e/styles/base/focus-ring.css";
|
|
9
10
|
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
10
11
|
import "@rio-m3e/styles/base/touch-target.css";
|
|
@@ -17,6 +18,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
17
18
|
props: {
|
|
18
19
|
removeOnly: { type: Boolean },
|
|
19
20
|
color: {},
|
|
21
|
+
density: {},
|
|
20
22
|
disabled: { type: Boolean },
|
|
21
23
|
softDisabled: { type: Boolean },
|
|
22
24
|
locale: {},
|
|
@@ -41,6 +43,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
41
43
|
props: () => ({
|
|
42
44
|
removeOnly: props.removeOnly,
|
|
43
45
|
color: props.color,
|
|
46
|
+
density: props.density,
|
|
44
47
|
disabled: props.disabled,
|
|
45
48
|
softDisabled: props.softDisabled
|
|
46
49
|
}),
|
|
@@ -3,6 +3,7 @@ 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 { createSuggestionChip } from "@rio-m3e/core";
|
|
5
5
|
import "@rio-m3e/styles/base/accent.css";
|
|
6
|
+
import "@rio-m3e/styles/base/density.css";
|
|
6
7
|
import "@rio-m3e/styles/base/focus-ring.css";
|
|
7
8
|
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
8
9
|
import "@rio-m3e/styles/base/touch-target.css";
|
|
@@ -15,6 +16,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
15
16
|
elevated: { type: Boolean },
|
|
16
17
|
href: {},
|
|
17
18
|
color: {},
|
|
19
|
+
density: {},
|
|
18
20
|
disabled: { type: Boolean },
|
|
19
21
|
softDisabled: { type: Boolean }
|
|
20
22
|
},
|
|
@@ -28,6 +30,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
28
30
|
elevated: __props.elevated,
|
|
29
31
|
href: __props.href,
|
|
30
32
|
color: __props.color,
|
|
33
|
+
density: __props.density,
|
|
31
34
|
disabled: __props.disabled,
|
|
32
35
|
softDisabled: __props.softDisabled
|
|
33
36
|
}),
|
|
@@ -97,6 +97,15 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
97
97
|
});
|
|
98
98
|
watch(open, (next) => handle?.sync(next), { flush: "post" });
|
|
99
99
|
onBeforeUnmount(() => handle?.detach());
|
|
100
|
+
/**
|
|
101
|
+
* What the field's input takes besides the text field's props: no autofill, and the picker's commit
|
|
102
|
+
* and keys, after the app's own listeners
|
|
103
|
+
*/
|
|
104
|
+
const fieldInput = {
|
|
105
|
+
autocomplete: "off",
|
|
106
|
+
onChange: picker.commitText,
|
|
107
|
+
onKeydown: picker.handleFieldKeydown
|
|
108
|
+
};
|
|
100
109
|
return (_ctx, _cache) => {
|
|
101
110
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
102
111
|
ref_key: "root",
|
|
@@ -105,21 +114,17 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
105
114
|
class: _ctx.$attrs.class,
|
|
106
115
|
style: _ctx.$attrs.style
|
|
107
116
|
}), [
|
|
108
|
-
createElementVNode("div", mergeProps(unref(picker).parts.field(), { onClick: _cache[1] || (_cache[1] = (...args) => unref(picker).handleFieldClick && unref(picker).handleFieldClick(...args)) }), [createVNode(_sfc_main$3, mergeProps({
|
|
117
|
+
createElementVNode("div", mergeProps(unref(picker).parts.field(), { onClick: _cache[1] || (_cache[1] = (...args) => unref(picker).handleFieldClick && unref(picker).handleFieldClick(...args)) }), [createVNode(_sfc_main$3, mergeProps(mergeProps({
|
|
109
118
|
..._ctx.$attrs,
|
|
110
119
|
class: void 0,
|
|
111
|
-
style: void 0
|
|
112
|
-
|
|
113
|
-
}, {
|
|
120
|
+
style: void 0
|
|
121
|
+
}, { ...unref(picker).field() }, fieldInput), {
|
|
114
122
|
"model-value": state.text,
|
|
115
123
|
variant: __props.fieldVariant ?? "outlined",
|
|
116
124
|
label: __props.label,
|
|
117
125
|
required: __props.required,
|
|
118
126
|
disabled: __props.disabled,
|
|
119
|
-
|
|
120
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = (text) => unref(picker).textInput(String(text))),
|
|
121
|
-
onChange: unref(picker).commitText,
|
|
122
|
-
onKeydown: unref(picker).handleFieldKeydown
|
|
127
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = (text) => unref(picker).textInput(String(text)))
|
|
123
128
|
}), {
|
|
124
129
|
"trailing-icon": withCtx(() => [createVNode(_sfc_main$2, mergeProps(unref(picker).parts.calendarButton(), {
|
|
125
130
|
variant: "standard",
|
|
@@ -140,9 +145,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
140
145
|
"variant",
|
|
141
146
|
"label",
|
|
142
147
|
"required",
|
|
143
|
-
"disabled"
|
|
144
|
-
"onChange",
|
|
145
|
-
"onKeydown"
|
|
148
|
+
"disabled"
|
|
146
149
|
])], 16),
|
|
147
150
|
unref(picker).submits() ? (openBlock(), createElementBlock("input", normalizeProps(mergeProps({ key: 0 }, unref(picker).parts.formValue())), null, 16)) : createCommentVNode("v-if", true),
|
|
148
151
|
unref(picker).docked() ? (openBlock(), createElementBlock("div", mergeProps({
|
|
@@ -99,6 +99,13 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
99
99
|
});
|
|
100
100
|
onUpdated(() => handle?.update());
|
|
101
101
|
onBeforeUnmount(() => handle?.detach());
|
|
102
|
+
/**
|
|
103
|
+
* What the field's input takes besides the text field's props: no autofill, and the dialog's keys
|
|
104
|
+
*/
|
|
105
|
+
const fieldInput = {
|
|
106
|
+
autocomplete: "off",
|
|
107
|
+
onKeydown: dialog.handleFieldKeydown
|
|
108
|
+
};
|
|
102
109
|
return (_ctx, _cache) => {
|
|
103
110
|
return openBlock(), createElementBlock("dialog", mergeProps({
|
|
104
111
|
ref_key: "root",
|
|
@@ -193,18 +200,15 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
193
200
|
"messages",
|
|
194
201
|
"onSelect"
|
|
195
202
|
])) : createCommentVNode("v-if", true),
|
|
196
|
-
unref(dialog).inputMode() ? (openBlock(), createElementBlock("div", normalizeProps(mergeProps({ key: 3 }, unref(dialog).parts.input())), [createVNode(_sfc_main$3, mergeProps(
|
|
203
|
+
unref(dialog).inputMode() ? (openBlock(), createElementBlock("div", normalizeProps(mergeProps({ key: 3 }, unref(dialog).parts.input())), [createVNode(_sfc_main$3, mergeProps({
|
|
204
|
+
...unref(dialog).field(),
|
|
205
|
+
...fieldInput
|
|
206
|
+
}, {
|
|
197
207
|
"model-value": state.text,
|
|
198
208
|
variant: "outlined",
|
|
199
209
|
label: unref(messages).fieldLabel,
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
onKeydown: unref(dialog).handleFieldKeydown
|
|
203
|
-
}), null, 16, [
|
|
204
|
-
"model-value",
|
|
205
|
-
"label",
|
|
206
|
-
"onKeydown"
|
|
207
|
-
])], 16)) : createCommentVNode("v-if", true),
|
|
210
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = (text) => unref(dialog).textInput(String(text)))
|
|
211
|
+
}), null, 16, ["model-value", "label"])], 16)) : createCommentVNode("v-if", true),
|
|
208
212
|
createElementVNode("div", normalizeProps(guardReactiveProps(unref(dialog).parts.actions())), [
|
|
209
213
|
unref(dialog).showsClear() ? (openBlock(), createBlock(_sfc_main$1, {
|
|
210
214
|
key: 0,
|
|
@@ -107,6 +107,14 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
107
107
|
watch(open, (next) => handle?.sync(next), { flush: "post" });
|
|
108
108
|
onUpdated(() => handle?.update());
|
|
109
109
|
onBeforeUnmount(() => handle?.detach());
|
|
110
|
+
/**
|
|
111
|
+
* What each field's input takes besides the text field's props: no autofill, and the dialog's
|
|
112
|
+
* keys
|
|
113
|
+
*/
|
|
114
|
+
const fieldInput = {
|
|
115
|
+
autocomplete: "off",
|
|
116
|
+
onKeydown: dialog.handleFieldKeydown
|
|
117
|
+
};
|
|
110
118
|
return (_ctx, _cache) => {
|
|
111
119
|
return openBlock(), createElementBlock("dialog", mergeProps({
|
|
112
120
|
ref_key: "root",
|
|
@@ -168,29 +176,23 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
168
176
|
"is-date-disabled",
|
|
169
177
|
"onSelect"
|
|
170
178
|
])) : createCommentVNode("v-if", true),
|
|
171
|
-
unref(dialog).inputMode() ? (openBlock(), createElementBlock("div", normalizeProps(mergeProps({ key: 2 }, unref(dialog).parts.input())), [createVNode(_sfc_main$3, mergeProps(
|
|
179
|
+
unref(dialog).inputMode() ? (openBlock(), createElementBlock("div", normalizeProps(mergeProps({ key: 2 }, unref(dialog).parts.input())), [createVNode(_sfc_main$3, mergeProps({
|
|
180
|
+
...unref(dialog).startField(),
|
|
181
|
+
...fieldInput
|
|
182
|
+
}, {
|
|
172
183
|
"model-value": state.startText,
|
|
173
184
|
variant: "outlined",
|
|
174
185
|
label: unref(messages).startDate,
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
"label",
|
|
181
|
-
"onKeydown"
|
|
182
|
-
]), createVNode(_sfc_main$3, mergeProps(unref(dialog).endField(), {
|
|
186
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = (text) => unref(dialog).startInput(String(text)))
|
|
187
|
+
}), null, 16, ["model-value", "label"]), createVNode(_sfc_main$3, mergeProps({
|
|
188
|
+
...unref(dialog).endField(),
|
|
189
|
+
...fieldInput
|
|
190
|
+
}, {
|
|
183
191
|
"model-value": state.endText,
|
|
184
192
|
variant: "outlined",
|
|
185
193
|
label: unref(messages).endDate,
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
onKeydown: unref(dialog).handleFieldKeydown
|
|
189
|
-
}), null, 16, [
|
|
190
|
-
"model-value",
|
|
191
|
-
"label",
|
|
192
|
-
"onKeydown"
|
|
193
|
-
])], 16)) : createCommentVNode("v-if", true),
|
|
194
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = (text) => unref(dialog).endInput(String(text)))
|
|
195
|
+
}), null, 16, ["model-value", "label"])], 16)) : createCommentVNode("v-if", true),
|
|
194
196
|
createElementVNode("div", normalizeProps(guardReactiveProps(unref(dialog).parts.actions())), [
|
|
195
197
|
unref(dialog).showsClear() ? (openBlock(), createBlock(_sfc_main$1, {
|
|
196
198
|
key: 0,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IconButtonProps } from "@rio-m3e/core";
|
|
2
2
|
import "@rio-m3e/styles/base/accent.css";
|
|
3
|
+
import "@rio-m3e/styles/base/density.css";
|
|
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/state-layer.css";
|
|
@@ -5,6 +5,7 @@ import { vCornerMorph } from "../corner-morph/corner-morph.js";
|
|
|
5
5
|
import { createBlock, createElementVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderSlot, resolveDynamicComponent, unref, useSlots, useTemplateRef, withCtx, withDirectives } from "vue";
|
|
6
6
|
import { createIconButton } from "@rio-m3e/core";
|
|
7
7
|
import "@rio-m3e/styles/base/accent.css";
|
|
8
|
+
import "@rio-m3e/styles/base/density.css";
|
|
8
9
|
import "@rio-m3e/styles/base/focus-ring.css";
|
|
9
10
|
import "@rio-m3e/styles/base/reduced-motion.css";
|
|
10
11
|
import "@rio-m3e/styles/base/state-layer.css";
|
|
@@ -21,6 +22,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
21
22
|
width: {},
|
|
22
23
|
shape: {},
|
|
23
24
|
color: {},
|
|
25
|
+
density: {},
|
|
24
26
|
toggle: { type: Boolean },
|
|
25
27
|
selected: { type: Boolean },
|
|
26
28
|
disabled: { type: Boolean },
|
|
@@ -40,6 +42,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
40
42
|
width: __props.width,
|
|
41
43
|
shape: __props.shape,
|
|
42
44
|
color: __props.color,
|
|
45
|
+
density: __props.density,
|
|
43
46
|
toggle: __props.toggle,
|
|
44
47
|
selected: __props.selected,
|
|
45
48
|
disabled: __props.disabled,
|