morya-ui 0.3.0 → 0.3.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/CHANGELOG.md +32 -0
- package/dist/{Button-B5X_R4Md.js → Button-smoDleh0.js} +1 -1
- package/dist/Icon-od9Ob-Ay.js +393 -0
- package/dist/Loading-BSsRs6v9.js +420 -0
- package/dist/{Pagination-CVrH8Ypi.js → Pagination-DrXmzcEy.js} +1 -1
- package/dist/accordion/style.css +4 -0
- package/dist/auto-complete/index.js +1 -1
- package/dist/auto-complete/style.css +18 -6
- package/dist/avatar/index.js +1 -1
- package/dist/avatar/style.css +4 -0
- package/dist/badge/style.css +4 -0
- package/dist/block-ui/style.css +4 -0
- package/dist/breadcrumb/style.css +4 -0
- package/dist/button/index.js +1 -1
- package/dist/button/style.css +4 -0
- package/dist/card/style.css +4 -0
- package/dist/carousel/index.js +72 -64
- package/dist/carousel/style.css +31 -10
- package/dist/cascade-select/index.js +1 -1
- package/dist/cascade-select/style.css +18 -6
- package/dist/checkbox/style.css +4 -0
- package/dist/chip/index.js +1 -1
- package/dist/chip/style.css +4 -0
- package/dist/command-menu/index.js +2 -2
- package/dist/command-menu/style.css +4 -0
- package/dist/components/Carousel/Carousel.vue.d.ts.map +1 -1
- package/dist/components/Carousel/styles.css +27 -10
- package/dist/components/DataView/DataView.vue.d.ts +7 -7
- package/dist/components/DataView/DataView.vue.d.ts.map +1 -1
- package/dist/components/DataView/styles.css +0 -20
- package/dist/components/Dropdown/Dropdown.vue.d.ts +2 -2
- package/dist/components/Dropdown/Dropdown.vue.d.ts.map +1 -1
- package/dist/components/Dropdown/DropdownNodes.vue.d.ts +8 -9
- package/dist/components/Dropdown/DropdownNodes.vue.d.ts.map +1 -1
- package/dist/components/Dropdown/styles.css +24 -5
- package/dist/components/Icon/Icon.vue.d.ts.map +1 -1
- package/dist/components/Icon/icon-categories.d.ts.map +1 -1
- package/dist/components/Icon/icons-types.d.ts +4 -2
- package/dist/components/Icon/icons-types.d.ts.map +1 -1
- package/dist/components/Icon/icons.d.ts +250 -561
- package/dist/components/Icon/icons.d.ts.map +1 -1
- package/dist/components/Icon/index.d.ts +2 -2
- package/dist/components/Icon/index.d.ts.map +1 -1
- package/dist/components/Layout/styles.css +5 -2
- package/dist/components/Menu/styles.css +6 -0
- package/dist/components/Menubar/Menubar.vue.d.ts.map +1 -1
- package/dist/components/Menubar/styles.css +4 -0
- package/dist/components/Scrollbar/Scrollbar.vue.d.ts +1 -1
- package/dist/components/Select/Select.vue.d.ts +9 -5
- package/dist/components/Select/Select.vue.d.ts.map +1 -1
- package/dist/components/Select/styles.css +30 -1
- package/dist/components/Select/types.d.ts +11 -1
- package/dist/components/Select/types.d.ts.map +1 -1
- package/dist/components/Slider/styles.css +9 -0
- package/dist/components/SplitButton/styles.css +5 -0
- package/dist/components/Table/Table.vue.d.ts +26 -26
- package/dist/components/Table/Table.vue.d.ts.map +1 -1
- package/dist/components/Table/TableLoadingLine.vue.d.ts.map +1 -1
- package/dist/components/Table/styles.css +58 -38
- package/dist/components/TreeSelect/TreeSelect.vue.d.ts.map +1 -1
- package/dist/components/TreeSelect/styles.css +1 -1
- package/dist/config-provider/style.css +4 -0
- package/dist/confirm-dialog/index.js +2 -2
- package/dist/confirm-dialog/style.css +4 -0
- package/dist/confirm-popup/index.js +2 -2
- package/dist/confirm-popup/style.css +4 -0
- package/dist/context-menu/index.js +2 -2
- package/dist/context-menu/style.css +4 -0
- package/dist/data-view/index.js +47 -47
- package/dist/data-view/style.css +399 -106
- package/dist/data-view/style.js +1 -1
- package/dist/date-picker/index.js +1 -1
- package/dist/date-picker/style.css +4 -0
- package/dist/dialog/index.js +2 -2
- package/dist/dialog/style.css +4 -0
- package/dist/divider/style.css +4 -0
- package/dist/dock/index.js +2 -2
- package/dist/dock/style.css +4 -0
- package/dist/drawer/index.js +1 -1
- package/dist/drawer/style.css +4 -0
- package/dist/dropdown/index.js +110 -91
- package/dist/dropdown/style.css +28 -5
- package/dist/empty/index.js +1 -1
- package/dist/empty/style.css +4 -0
- package/dist/fieldset/index.js +1 -1
- package/dist/fieldset/style.css +4 -0
- package/dist/file-upload/index.js +1 -1
- package/dist/file-upload/style.css +4 -0
- package/dist/flex/style.css +4 -0
- package/dist/float-label/style.css +4 -0
- package/dist/fluid/style.css +4 -0
- package/dist/form/style.css +4 -0
- package/dist/gallery/index.js +1 -1
- package/dist/gallery/style.css +4 -0
- package/dist/grid/style.css +4 -0
- package/dist/icon/index.js +93 -39
- package/dist/icon/style.css +4 -0
- package/dist/icon-COrt_N8A.js +18 -0
- package/dist/icon-field/style.css +4 -0
- package/dist/index.js +2733 -2801
- package/dist/inplace/style.css +4 -0
- package/dist/input/index.js +1 -1
- package/dist/input/style.css +4 -0
- package/dist/input-color/style.css +4 -0
- package/dist/input-group/style.css +4 -0
- package/dist/input-number/index.js +1 -1
- package/dist/input-number/style.css +4 -0
- package/dist/input-otp/style.css +4 -0
- package/dist/input-password/index.js +1 -1
- package/dist/input-password/style.css +4 -0
- package/dist/input-tags/index.js +1 -1
- package/dist/input-tags/style.css +4 -0
- package/dist/knob/style.css +4 -0
- package/dist/label/style.css +4 -0
- package/dist/layout/index.js +1 -1
- package/dist/layout/style.css +9 -2
- package/dist/listbox/style.css +4 -0
- package/dist/loading/index.js +32 -446
- package/dist/loading/style.css +4 -0
- package/dist/mega-menu/index.js +2 -2
- package/dist/mega-menu/style.css +4 -0
- package/dist/menu/index.js +2 -2
- package/dist/menu/style.css +10 -0
- package/dist/menubar/index.js +6 -3
- package/dist/menubar/style.css +8 -0
- package/dist/message/index.js +1 -1
- package/dist/message/style.css +4 -0
- package/dist/meter-group/style.css +4 -0
- package/dist/order-list/index.js +1 -1
- package/dist/order-list/style.css +4 -0
- package/dist/page/index.js +1 -1
- package/dist/page/style.css +4 -0
- package/dist/pagination/index.js +1 -1
- package/dist/pagination/style.css +4 -0
- package/dist/panel/index.js +1 -1
- package/dist/panel/style.css +4 -0
- package/dist/pick-list/index.js +1 -1
- package/dist/pick-list/style.css +4 -0
- package/dist/popover/style.css +4 -0
- package/dist/progress-bar/style.css +4 -0
- package/dist/progress-spinner/index.js +105 -2
- package/dist/progress-spinner/style.css +4 -0
- package/dist/radio/style.css +4 -0
- package/dist/rating/index.js +1 -1
- package/dist/rating/style.css +4 -0
- package/dist/result/index.js +1 -1
- package/dist/result/style.css +4 -0
- package/dist/scroll-top/index.js +1 -1
- package/dist/scroll-top/style.css +4 -0
- package/dist/scrollbar/style.css +4 -0
- package/dist/select/index.js +284 -217
- package/dist/select/style.css +48 -7
- package/dist/select-button/style.css +4 -0
- package/dist/shared/menu/icon.d.ts.map +1 -1
- package/dist/shared/styles/select-overlay.css +14 -6
- package/dist/sidebar/index.js +2 -2
- package/dist/sidebar/style.css +4 -0
- package/dist/skeleton/style.css +4 -0
- package/dist/slider/style.css +13 -0
- package/dist/space/style.css +4 -0
- package/dist/speed-dial/index.js +2 -2
- package/dist/speed-dial/style.css +4 -0
- package/dist/split-button/index.js +1 -1
- package/dist/split-button/style.css +9 -0
- package/dist/splitter/style.css +4 -0
- package/dist/status/index.js +1 -1
- package/dist/status/style.css +4 -0
- package/dist/stepper/index.js +1 -1
- package/dist/stepper/style.css +4 -0
- package/dist/styles/base.css +4 -0
- package/dist/styles.css +1 -1
- package/dist/switch/style.css +4 -0
- package/dist/table/index.js +344 -338
- package/dist/table/style.css +457 -124
- package/dist/table/style.js +1 -1
- package/dist/tabs/index.js +1 -1
- package/dist/tabs/style.css +4 -0
- package/dist/tag/index.js +1 -1
- package/dist/tag/style.css +4 -0
- package/dist/terminal/style.css +4 -0
- package/dist/textarea/index.js +1 -1
- package/dist/textarea/style.css +4 -0
- package/dist/tiered-menu/index.js +1 -1
- package/dist/tiered-menu/style.css +4 -0
- package/dist/timeline/index.js +1 -1
- package/dist/timeline/style.css +4 -0
- package/dist/toast/index.js +1 -1
- package/dist/toast/style.css +4 -0
- package/dist/toggle-button/index.js +2 -2
- package/dist/toggle-button/style.css +4 -0
- package/dist/toolbar/style.css +4 -0
- package/dist/tooltip/style.css +4 -0
- package/dist/tree/index.js +1 -1
- package/dist/tree/style.css +4 -0
- package/dist/tree-select/index.js +2 -1
- package/dist/tree-select/style.css +19 -7
- package/dist/tree-table/index.js +1 -1
- package/dist/tree-table/style.css +4 -0
- package/dist/virtual-scroller/style.css +4 -0
- package/package.json +1 -1
- package/dist/Icon-lcN1rS87.js +0 -610
- package/dist/ProgressSpinner-BeWVF6Jv.js +0 -105
- package/dist/components/Icon/icons-tabler.d.ts +0 -77
- package/dist/components/Icon/icons-tabler.d.ts.map +0 -1
- package/dist/icon-DWXkh-RM.js +0 -27
package/dist/dropdown/index.js
CHANGED
|
@@ -1,49 +1,54 @@
|
|
|
1
1
|
import { a as e } from "../useComponentAttrs-e-5QAjdw.js";
|
|
2
|
-
import { t } from "../Icon-
|
|
2
|
+
import { t } from "../Icon-od9Ob-Ay.js";
|
|
3
3
|
import { t as n } from "../useMotionTransition-Bxnnb_9u.js";
|
|
4
4
|
import { n as r, t as i } from "../overlay-oR-5MDuE.js";
|
|
5
5
|
import { t as a } from "../overlayPlacement-Cd20JTD_.js";
|
|
6
6
|
import { t as o } from "../useFloatingViewportSync-DZdJ7W8n.js";
|
|
7
7
|
import { t as s } from "../Scrollbar-DTeJ8P5b.js";
|
|
8
|
-
import { t as c } from "../icon-
|
|
8
|
+
import { t as c } from "../icon-COrt_N8A.js";
|
|
9
9
|
import { t as l } from "../key-CaQYVkjh.js";
|
|
10
10
|
import { t as u } from "../FlyoutSubmenu-BrUPmJa1.js";
|
|
11
11
|
import { c as d } from "../config-CapALqt3.js";
|
|
12
12
|
import { n as f } from "../locale-Bzm2nbEp.js";
|
|
13
13
|
import "./style.js";
|
|
14
|
-
import { Fragment as p, Teleport as m, Transition as h, computed as g, createBlock as ee, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createSlots as b, createTextVNode as x, createVNode as S, defineComponent as C, mergeProps as w, nextTick as te, normalizeClass as T, normalizeStyle as E, onBeforeUnmount as
|
|
14
|
+
import { Fragment as p, Teleport as m, Transition as h, computed as g, createBlock as ee, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createSlots as b, createTextVNode as x, createVNode as S, defineComponent as C, mergeProps as w, nextTick as te, normalizeClass as T, normalizeStyle as E, onBeforeUnmount as D, openBlock as O, ref as k, renderList as A, renderSlot as j, toDisplayString as M, unref as N, useAttrs as ne, watch as re, withCtx as P } from "vue";
|
|
15
15
|
//#region src/components/Dropdown/DropdownNodes.vue?vue&type=script&setup=true&lang.ts
|
|
16
|
-
var
|
|
16
|
+
var F = {
|
|
17
17
|
key: 0,
|
|
18
18
|
class: "m-dropdown__separator",
|
|
19
19
|
role: "separator"
|
|
20
|
-
},
|
|
20
|
+
}, I = {
|
|
21
21
|
key: 1,
|
|
22
22
|
class: "m-dropdown__group"
|
|
23
|
-
},
|
|
23
|
+
}, L = { class: "m-dropdown__group-label" }, R = ["onMouseenter"], z = ["disabled"], B = {
|
|
24
24
|
key: 0,
|
|
25
25
|
class: "m-dropdown__icon",
|
|
26
26
|
"aria-hidden": "true"
|
|
27
|
-
},
|
|
27
|
+
}, V = {
|
|
28
28
|
class: "m-dropdown__caret",
|
|
29
29
|
"aria-hidden": "true"
|
|
30
|
-
},
|
|
30
|
+
}, H = [
|
|
31
31
|
"disabled",
|
|
32
32
|
"onMouseenter",
|
|
33
33
|
"onClick"
|
|
34
|
-
],
|
|
34
|
+
], U = {
|
|
35
35
|
key: 0,
|
|
36
36
|
class: "m-dropdown__icon",
|
|
37
37
|
"aria-hidden": "true"
|
|
38
|
-
},
|
|
38
|
+
}, W = /* @__PURE__ */ C({
|
|
39
39
|
__name: "DropdownNodes",
|
|
40
40
|
props: {
|
|
41
41
|
items: {},
|
|
42
42
|
highlightedValue: {}
|
|
43
43
|
},
|
|
44
|
-
emits: [
|
|
44
|
+
emits: [
|
|
45
|
+
"select",
|
|
46
|
+
"highlight",
|
|
47
|
+
"submenuEnter",
|
|
48
|
+
"submenuLeave"
|
|
49
|
+
],
|
|
45
50
|
setup(e, { emit: n }) {
|
|
46
|
-
let r = n, i =
|
|
51
|
+
let r = n, i = k(null), a = k(null), o;
|
|
47
52
|
function d() {
|
|
48
53
|
o && clearTimeout(o), o = void 0;
|
|
49
54
|
}
|
|
@@ -61,35 +66,41 @@ var P = {
|
|
|
61
66
|
function g(e, t) {
|
|
62
67
|
return l(e, t, "dd");
|
|
63
68
|
}
|
|
64
|
-
function
|
|
69
|
+
function C(e) {
|
|
65
70
|
return c(e.icon);
|
|
66
71
|
}
|
|
67
|
-
function
|
|
72
|
+
function w(e, t, n) {
|
|
68
73
|
if (e.disabled || m(e) || h(e) || (d(), r("highlight", e.value), !e.items?.length)) return;
|
|
69
74
|
i.value = g(e, t);
|
|
70
75
|
let o = n.currentTarget;
|
|
71
76
|
a.value = o?.querySelector(".m-dropdown__item--parent") ?? o;
|
|
72
77
|
}
|
|
73
|
-
function w() {
|
|
74
|
-
f();
|
|
75
|
-
}
|
|
76
78
|
function te() {
|
|
77
|
-
|
|
79
|
+
f();
|
|
78
80
|
}
|
|
79
81
|
function E() {
|
|
80
|
-
|
|
82
|
+
d(), r("submenuEnter");
|
|
81
83
|
}
|
|
82
|
-
|
|
84
|
+
function D() {
|
|
85
|
+
f(), r("submenuLeave");
|
|
86
|
+
}
|
|
87
|
+
return (n, r) => (O(!0), v(p, null, A(e.items, (o, c) => (O(), v(p, { key: g(o, c) }, [m(o) ? (O(), v("div", F)) : h(o) ? (O(), v("div", I, [y("div", L, M(o.label), 1), o.items?.length ? (O(), ee(W, {
|
|
83
88
|
key: 0,
|
|
84
89
|
items: o.items,
|
|
85
90
|
"highlighted-value": e.highlightedValue,
|
|
86
91
|
onSelect: r[0] ||= (e) => n.$emit("select", e),
|
|
87
|
-
onHighlight: r[1] ||= (e) => n.$emit("highlight", e)
|
|
88
|
-
|
|
92
|
+
onHighlight: r[1] ||= (e) => n.$emit("highlight", e),
|
|
93
|
+
onSubmenuEnter: E,
|
|
94
|
+
onSubmenuLeave: D
|
|
95
|
+
}, b({ _: 2 }, [n.$slots.item ? {
|
|
96
|
+
name: "item",
|
|
97
|
+
fn: P(({ item: e }) => [j(n.$slots, "item", { item: e })]),
|
|
98
|
+
key: "0"
|
|
99
|
+
} : void 0]), 1032, ["items", "highlighted-value"])) : _("", !0)])) : o.items?.length ? (O(), v("div", {
|
|
89
100
|
key: 2,
|
|
90
101
|
class: "m-dropdown__submenu-wrap",
|
|
91
|
-
onMouseenter: (e) =>
|
|
92
|
-
onMouseleave:
|
|
102
|
+
onMouseenter: (e) => w(o, c, e),
|
|
103
|
+
onMouseleave: te
|
|
93
104
|
}, [y("button", {
|
|
94
105
|
type: "button",
|
|
95
106
|
class: T(["m-dropdown__item m-dropdown__item--parent", { "m-dropdown__item--highlighted": e.highlightedValue === o.value }]),
|
|
@@ -97,38 +108,44 @@ var P = {
|
|
|
97
108
|
disabled: o.disabled,
|
|
98
109
|
"aria-haspopup": !0
|
|
99
110
|
}, [
|
|
100
|
-
|
|
101
|
-
name:
|
|
111
|
+
C(o) ? (O(), v("span", B, [S(t, {
|
|
112
|
+
name: C(o),
|
|
102
113
|
size: "sm"
|
|
103
114
|
}, null, 8, ["name"])])) : _("", !0),
|
|
104
|
-
|
|
105
|
-
y("span",
|
|
115
|
+
j(n.$slots, "item", { item: o }, () => [x(M(o.label), 1)]),
|
|
116
|
+
y("span", V, [S(t, {
|
|
106
117
|
name: "chevron-right",
|
|
107
118
|
size: "sm"
|
|
108
119
|
})])
|
|
109
|
-
], 10,
|
|
120
|
+
], 10, z), S(u, {
|
|
110
121
|
open: i.value === g(o, c),
|
|
111
122
|
anchor: i.value === g(o, c) ? a.value : null,
|
|
112
123
|
"panel-class": "m-dropdown__submenu",
|
|
113
|
-
onEnter:
|
|
114
|
-
onLeave:
|
|
124
|
+
onEnter: E,
|
|
125
|
+
onLeave: D
|
|
115
126
|
}, {
|
|
116
|
-
default:
|
|
127
|
+
default: P(() => [S(s, {
|
|
117
128
|
class: "m-dropdown__submenu-scroll",
|
|
118
129
|
"fit-content": "",
|
|
119
130
|
"wrap-class": "m-dropdown__submenu-wrap-inner",
|
|
120
131
|
"view-class": "m-dropdown__submenu-view"
|
|
121
132
|
}, {
|
|
122
|
-
default:
|
|
133
|
+
default: P(() => [S(W, {
|
|
123
134
|
items: o.items,
|
|
124
135
|
"highlighted-value": e.highlightedValue,
|
|
125
136
|
onSelect: r[2] ||= (e) => n.$emit("select", e),
|
|
126
|
-
onHighlight: r[3] ||= (e) => n.$emit("highlight", e)
|
|
127
|
-
|
|
137
|
+
onHighlight: r[3] ||= (e) => n.$emit("highlight", e),
|
|
138
|
+
onSubmenuEnter: E,
|
|
139
|
+
onSubmenuLeave: D
|
|
140
|
+
}, b({ _: 2 }, [n.$slots.item ? {
|
|
141
|
+
name: "item",
|
|
142
|
+
fn: P(({ item: e }) => [j(n.$slots, "item", { item: e })]),
|
|
143
|
+
key: "0"
|
|
144
|
+
} : void 0]), 1032, ["items", "highlighted-value"])]),
|
|
128
145
|
_: 2
|
|
129
146
|
}, 1024)]),
|
|
130
147
|
_: 2
|
|
131
|
-
}, 1032, ["open", "anchor"])], 40,
|
|
148
|
+
}, 1032, ["open", "anchor"])], 40, R)) : (O(), v("button", {
|
|
132
149
|
key: 3,
|
|
133
150
|
type: "button",
|
|
134
151
|
class: T(["m-dropdown__item", { "m-dropdown__item--highlighted": e.highlightedValue === o.value }]),
|
|
@@ -136,12 +153,12 @@ var P = {
|
|
|
136
153
|
disabled: o.disabled,
|
|
137
154
|
onMouseenter: (e) => !o.disabled && n.$emit("highlight", o.value),
|
|
138
155
|
onClick: (e) => n.$emit("select", o)
|
|
139
|
-
}, [
|
|
140
|
-
name:
|
|
156
|
+
}, [C(o) ? (O(), v("span", U, [S(t, {
|
|
157
|
+
name: C(o),
|
|
141
158
|
size: "sm"
|
|
142
|
-
}, null, 8, ["name"])])) : _("", !0),
|
|
159
|
+
}, null, 8, ["name"])])) : _("", !0), j(n.$slots, "item", { item: o }, () => [x(M(o.label), 1)])], 42, H))], 64))), 128));
|
|
143
160
|
}
|
|
144
|
-
}),
|
|
161
|
+
}), ie = ["aria-expanded"], G = /* @__PURE__ */ C({
|
|
145
162
|
inheritAttrs: !1,
|
|
146
163
|
__name: "Dropdown",
|
|
147
164
|
props: {
|
|
@@ -171,104 +188,104 @@ var P = {
|
|
|
171
188
|
},
|
|
172
189
|
emits: ["update:modelValue", "select"],
|
|
173
190
|
setup(t, { emit: c }) {
|
|
174
|
-
let l = t, u = c, p =
|
|
191
|
+
let l = t, u = c, p = ne(), { rootAttrs: C } = e(p, () => l.pt), A = d(), { transitionName: F, transitionCss: I } = n({
|
|
175
192
|
role: "popup",
|
|
176
193
|
local: () => l.transition,
|
|
177
194
|
componentName: "Dropdown",
|
|
178
195
|
fallback: "scale-fade"
|
|
179
|
-
}),
|
|
180
|
-
function
|
|
181
|
-
|
|
196
|
+
}), L = f(), R = k(null), z = k(null), B = k(null), V = k({}), H = k(-1), U = g(() => l.items.filter((e) => !e.disabled && !e.separator && e.type !== "divider" && e.type !== "group" && !e.items?.length && e.value != null)), G = g(() => U.value[H.value]?.value), K, q, J = g(() => r(l, A.value.appendTo)), Y = g(() => i(l, A.value.appendTo));
|
|
197
|
+
function ae() {
|
|
198
|
+
H.value = U.value.length ? 0 : -1;
|
|
182
199
|
}
|
|
183
|
-
function
|
|
184
|
-
if (!
|
|
185
|
-
let e =
|
|
186
|
-
|
|
200
|
+
function X() {
|
|
201
|
+
if (!Y.value || !z.value) return;
|
|
202
|
+
let e = z.value.getBoundingClientRect();
|
|
203
|
+
V.value = a(e, l.placement === "bottom-end" ? "bottom-end" : "bottom-start", { minWidth: `${e.width}px` });
|
|
187
204
|
}
|
|
188
|
-
function
|
|
189
|
-
u("update:modelValue", e), e && (
|
|
190
|
-
|
|
205
|
+
function Z(e) {
|
|
206
|
+
u("update:modelValue", e), e && (ae(), te(() => {
|
|
207
|
+
X(), B.value?.focus({ preventScroll: !0 });
|
|
191
208
|
}));
|
|
192
209
|
}
|
|
193
|
-
function
|
|
194
|
-
|
|
210
|
+
function oe() {
|
|
211
|
+
Z(!l.modelValue);
|
|
195
212
|
}
|
|
196
|
-
function
|
|
197
|
-
l.modelValue &&
|
|
213
|
+
function se() {
|
|
214
|
+
l.modelValue && X();
|
|
198
215
|
}
|
|
199
|
-
function
|
|
200
|
-
e.disabled || e.separator || e.type === "divider" || e.type === "group" || (e.command?.(), u("select", e), l.closeOnSelect &&
|
|
216
|
+
function ce(e) {
|
|
217
|
+
e.disabled || e.separator || e.type === "divider" || e.type === "group" || (e.command?.(), u("select", e), l.closeOnSelect && Z(!1));
|
|
201
218
|
}
|
|
202
219
|
function Q() {
|
|
203
|
-
|
|
220
|
+
K && clearTimeout(K), q && clearTimeout(q), K = void 0, q = void 0;
|
|
204
221
|
}
|
|
205
222
|
function le() {
|
|
206
|
-
l.trigger === "hover" && (Q(),
|
|
223
|
+
l.trigger === "hover" && (Q(), K = setTimeout(Z, l.showDelay, !0));
|
|
207
224
|
}
|
|
208
225
|
function ue() {
|
|
209
|
-
l.trigger === "hover" && (Q(),
|
|
226
|
+
l.trigger === "hover" && (Q(), q = setTimeout(Z, l.hideDelay, !1));
|
|
210
227
|
}
|
|
211
228
|
function de() {
|
|
212
229
|
l.trigger === "hover" && Q();
|
|
213
230
|
}
|
|
214
231
|
function fe() {
|
|
215
|
-
l.trigger === "hover" && (Q(),
|
|
232
|
+
l.trigger === "hover" && (Q(), q = setTimeout(Z, l.hideDelay, !1));
|
|
216
233
|
}
|
|
217
234
|
function pe(e) {
|
|
218
235
|
if (l.modelValue) {
|
|
219
236
|
if (e.key === "Escape") {
|
|
220
|
-
e.preventDefault(),
|
|
237
|
+
e.preventDefault(), Z(!1), z.value?.focus({ preventScroll: !0 });
|
|
221
238
|
return;
|
|
222
239
|
}
|
|
223
240
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
224
241
|
e.preventDefault();
|
|
225
|
-
let t = e.key === "ArrowDown" ? 1 : -1, n =
|
|
226
|
-
n && (
|
|
242
|
+
let t = e.key === "ArrowDown" ? 1 : -1, n = U.value.length;
|
|
243
|
+
n && (H.value = (H.value + t + n) % n);
|
|
227
244
|
}
|
|
228
|
-
if (e.key === "Home" && (e.preventDefault(),
|
|
229
|
-
let t =
|
|
230
|
-
|
|
245
|
+
if (e.key === "Home" && (e.preventDefault(), H.value = 0), e.key === "End" && (e.preventDefault(), H.value = U.value.length - 1), e.key === "Enter" || e.key === " ") {
|
|
246
|
+
let t = U.value[H.value];
|
|
247
|
+
H.value >= 0 && t && (e.preventDefault(), ce(t));
|
|
231
248
|
}
|
|
232
249
|
}
|
|
233
250
|
}
|
|
234
251
|
function me(e) {
|
|
235
|
-
(e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && (e.preventDefault(), l.modelValue ||
|
|
252
|
+
(e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && (e.preventDefault(), l.modelValue || Z(!0));
|
|
236
253
|
}
|
|
237
254
|
function $(e) {
|
|
238
|
-
l.modelValue &&
|
|
255
|
+
l.modelValue && R.value && !R.value.contains(e.target) && !B.value?.contains(e.target) && Z(!1);
|
|
239
256
|
}
|
|
240
|
-
return
|
|
257
|
+
return re(() => l.modelValue, (e) => {
|
|
241
258
|
e ? document.addEventListener("click", $) : document.removeEventListener("click", $);
|
|
242
|
-
}, { immediate: !0 }), o(() => l.modelValue &&
|
|
259
|
+
}, { immediate: !0 }), o(() => l.modelValue && Y.value, se), D(() => {
|
|
243
260
|
document.removeEventListener("click", $), Q();
|
|
244
|
-
}), (e, n) => (
|
|
261
|
+
}), (e, n) => (O(), v("div", w({
|
|
245
262
|
ref_key: "root",
|
|
246
|
-
ref:
|
|
247
|
-
},
|
|
263
|
+
ref: R
|
|
264
|
+
}, N(C), { class: "m-dropdown" }), [y("span", {
|
|
248
265
|
ref_key: "trigger",
|
|
249
|
-
ref:
|
|
266
|
+
ref: z,
|
|
250
267
|
class: "m-dropdown__trigger",
|
|
251
268
|
role: "button",
|
|
252
269
|
tabindex: "0",
|
|
253
270
|
"aria-expanded": t.modelValue,
|
|
254
271
|
"aria-haspopup": "menu",
|
|
255
|
-
onClick: n[0] ||= (e) => l.trigger === "click" &&
|
|
272
|
+
onClick: n[0] ||= (e) => l.trigger === "click" && oe(),
|
|
256
273
|
onMouseenter: le,
|
|
257
274
|
onMouseleave: ue,
|
|
258
275
|
onKeydown: me
|
|
259
|
-
}, [
|
|
260
|
-
to:
|
|
261
|
-
disabled:
|
|
276
|
+
}, [j(e.$slots, "trigger", {}, () => [x(M(N(L).openMenu), 1)])], 40, ie), (O(), ee(m, {
|
|
277
|
+
to: J.value.to,
|
|
278
|
+
disabled: J.value.disabled
|
|
262
279
|
}, [S(h, {
|
|
263
|
-
name:
|
|
264
|
-
css:
|
|
280
|
+
name: N(F),
|
|
281
|
+
css: N(I)
|
|
265
282
|
}, {
|
|
266
|
-
default:
|
|
283
|
+
default: P(() => [t.modelValue ? (O(), v("div", {
|
|
267
284
|
key: 0,
|
|
268
285
|
ref_key: "menu",
|
|
269
|
-
ref:
|
|
270
|
-
class: T(["m-dropdown__menu", [`m-dropdown__menu--${t.placement}`, { "m-dropdown__menu--teleported":
|
|
271
|
-
style: E(
|
|
286
|
+
ref: B,
|
|
287
|
+
class: T(["m-dropdown__menu", [`m-dropdown__menu--${t.placement}`, { "m-dropdown__menu--teleported": Y.value }]]),
|
|
288
|
+
style: E(Y.value ? V.value : void 0),
|
|
272
289
|
role: "menu",
|
|
273
290
|
tabindex: "-1",
|
|
274
291
|
onKeydown: pe,
|
|
@@ -280,14 +297,16 @@ var P = {
|
|
|
280
297
|
"wrap-class": "m-dropdown__scroll-wrap",
|
|
281
298
|
"view-class": "m-dropdown__scroll-view"
|
|
282
299
|
}, {
|
|
283
|
-
default:
|
|
300
|
+
default: P(() => [S(W, {
|
|
284
301
|
items: t.items,
|
|
285
|
-
"highlighted-value":
|
|
286
|
-
onSelect:
|
|
287
|
-
onHighlight: n[1] ||= (e) =>
|
|
302
|
+
"highlighted-value": G.value,
|
|
303
|
+
onSelect: ce,
|
|
304
|
+
onHighlight: n[1] ||= (e) => H.value = U.value.findIndex((t) => t.value === e),
|
|
305
|
+
onSubmenuEnter: de,
|
|
306
|
+
onSubmenuLeave: fe
|
|
288
307
|
}, b({ _: 2 }, [e.$slots.item ? {
|
|
289
308
|
name: "item",
|
|
290
|
-
fn:
|
|
309
|
+
fn: P(({ item: t }) => [j(e.$slots, "item", { item: t })]),
|
|
291
310
|
key: "0"
|
|
292
311
|
} : void 0]), 1032, ["items", "highlighted-value"])]),
|
|
293
312
|
_: 3
|
|
@@ -297,4 +316,4 @@ var P = {
|
|
|
297
316
|
}
|
|
298
317
|
});
|
|
299
318
|
//#endregion
|
|
300
|
-
export {
|
|
319
|
+
export { G as MDropdown };
|
package/dist/dropdown/style.css
CHANGED
|
@@ -529,9 +529,13 @@
|
|
|
529
529
|
border-radius: var(--m-radius-md);
|
|
530
530
|
box-shadow: var(--m-shadow-md);
|
|
531
531
|
max-height: var(--m-dropdown-submenu-max-height);
|
|
532
|
+
max-width: calc(100vw - 2 * var(--m-space-4));
|
|
532
533
|
min-width: 10rem;
|
|
533
534
|
overflow: hidden;
|
|
534
535
|
padding: var(--m-space-1);
|
|
536
|
+
/* Same as .m-dropdown__menu: size to content instead of being clamped
|
|
537
|
+
by the space left of the anchor in the viewport. */
|
|
538
|
+
width: max-content;
|
|
535
539
|
}
|
|
536
540
|
|
|
537
541
|
.m-dropdown__submenu--teleported {
|
|
@@ -1426,10 +1430,16 @@
|
|
|
1426
1430
|
box-shadow: var(--m-shadow-md);
|
|
1427
1431
|
display: grid;
|
|
1428
1432
|
gap: var(--m-space-1);
|
|
1433
|
+
max-width: calc(100vw - 2 * var(--m-space-4));
|
|
1429
1434
|
min-width: var(--m-dropdown-menu-min-width);
|
|
1435
|
+
overflow: hidden;
|
|
1430
1436
|
padding: var(--m-space-1);
|
|
1431
1437
|
position: absolute;
|
|
1432
1438
|
top: calc(100% + var(--m-space-2));
|
|
1439
|
+
/* Grow with the content: the default shrink-to-fit width of an abs/fixed
|
|
1440
|
+
box is clamped by its containing block (the trigger width when not
|
|
1441
|
+
teleported), so long items would be clipped instead of widening the menu. */
|
|
1442
|
+
width: max-content;
|
|
1433
1443
|
z-index: var(--m-z-popper);
|
|
1434
1444
|
}
|
|
1435
1445
|
|
|
@@ -1467,9 +1477,10 @@
|
|
|
1467
1477
|
cursor: pointer;
|
|
1468
1478
|
display: flex;
|
|
1469
1479
|
font-family: var(--m-font-sans);
|
|
1470
|
-
font-size: var(--m-font-
|
|
1471
|
-
|
|
1472
|
-
|
|
1480
|
+
font-size: var(--m-control-font-medium);
|
|
1481
|
+
gap: var(--m-space-2);
|
|
1482
|
+
min-height: var(--m-control-height-medium);
|
|
1483
|
+
padding: 0 var(--m-control-padding-x-medium);
|
|
1473
1484
|
text-align: left;
|
|
1474
1485
|
transition:
|
|
1475
1486
|
background-color var(--m-motion-fast) var(--m-motion-ease),
|
|
@@ -1477,6 +1488,10 @@
|
|
|
1477
1488
|
white-space: nowrap;
|
|
1478
1489
|
}
|
|
1479
1490
|
|
|
1491
|
+
.m-dropdown__caret {
|
|
1492
|
+
margin-left: auto;
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1480
1495
|
.m-dropdown__item:hover:not(:disabled),
|
|
1481
1496
|
.m-dropdown__item--highlighted:not(:disabled) {
|
|
1482
1497
|
background: color-mix(in srgb, var(--m-color-primary) 10%, transparent);
|
|
@@ -1484,7 +1499,8 @@
|
|
|
1484
1499
|
}
|
|
1485
1500
|
|
|
1486
1501
|
.m-dropdown__item:focus-visible {
|
|
1487
|
-
|
|
1502
|
+
background: color-mix(in srgb, var(--m-color-primary) 10%, transparent);
|
|
1503
|
+
box-shadow: none;
|
|
1488
1504
|
outline: none;
|
|
1489
1505
|
}
|
|
1490
1506
|
|
|
@@ -1500,8 +1516,15 @@
|
|
|
1500
1516
|
margin: var(--m-space-1) 0;
|
|
1501
1517
|
}
|
|
1502
1518
|
|
|
1519
|
+
/* Groups nest items in a wrapper div, outside the scroll-view grid: restate
|
|
1520
|
+
the grid so grouped items keep the same gap rhythm and stretch full width. */
|
|
1521
|
+
.m-dropdown__group {
|
|
1522
|
+
display: grid;
|
|
1523
|
+
gap: var(--m-space-1);
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1503
1526
|
.m-dropdown__group-label {
|
|
1504
1527
|
color: var(--m-color-text-muted);
|
|
1505
1528
|
font-size: var(--m-font-size-xs);
|
|
1506
|
-
padding: var(--m-space-2) var(--m-
|
|
1529
|
+
padding: var(--m-space-2) var(--m-control-padding-x-medium) var(--m-space-1);
|
|
1507
1530
|
}
|
package/dist/empty/index.js
CHANGED
package/dist/empty/style.css
CHANGED
|
@@ -529,9 +529,13 @@
|
|
|
529
529
|
border-radius: var(--m-radius-md);
|
|
530
530
|
box-shadow: var(--m-shadow-md);
|
|
531
531
|
max-height: var(--m-dropdown-submenu-max-height);
|
|
532
|
+
max-width: calc(100vw - 2 * var(--m-space-4));
|
|
532
533
|
min-width: 10rem;
|
|
533
534
|
overflow: hidden;
|
|
534
535
|
padding: var(--m-space-1);
|
|
536
|
+
/* Same as .m-dropdown__menu: size to content instead of being clamped
|
|
537
|
+
by the space left of the anchor in the viewport. */
|
|
538
|
+
width: max-content;
|
|
535
539
|
}
|
|
536
540
|
|
|
537
541
|
.m-dropdown__submenu--teleported {
|
package/dist/fieldset/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as e } from "../useComponentAttrs-e-5QAjdw.js";
|
|
2
2
|
import { t } from "../useControllable-elmWaz23.js";
|
|
3
|
-
import { t as n } from "../Icon-
|
|
3
|
+
import { t as n } from "../Icon-od9Ob-Ay.js";
|
|
4
4
|
import { t as r } from "../useMId-BXFYayPP.js";
|
|
5
5
|
import "./style.js";
|
|
6
6
|
import { Transition as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, mergeProps as d, openBlock as f, renderSlot as p, toDisplayString as m, unref as h, useAttrs as g, vShow as _, withCtx as v, withDirectives as y } from "vue";
|
package/dist/fieldset/style.css
CHANGED
|
@@ -529,9 +529,13 @@
|
|
|
529
529
|
border-radius: var(--m-radius-md);
|
|
530
530
|
box-shadow: var(--m-shadow-md);
|
|
531
531
|
max-height: var(--m-dropdown-submenu-max-height);
|
|
532
|
+
max-width: calc(100vw - 2 * var(--m-space-4));
|
|
532
533
|
min-width: 10rem;
|
|
533
534
|
overflow: hidden;
|
|
534
535
|
padding: var(--m-space-1);
|
|
536
|
+
/* Same as .m-dropdown__menu: size to content instead of being clamped
|
|
537
|
+
by the space left of the anchor in the viewport. */
|
|
538
|
+
width: max-content;
|
|
535
539
|
}
|
|
536
540
|
|
|
537
541
|
.m-dropdown__submenu--teleported {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as e } from "../useComponentAttrs-e-5QAjdw.js";
|
|
2
|
-
import { t } from "../Icon-
|
|
2
|
+
import { t } from "../Icon-od9Ob-Ay.js";
|
|
3
3
|
import { n } from "../locale-Bzm2nbEp.js";
|
|
4
4
|
import "./style.js";
|
|
5
5
|
import { Fragment as r, computed as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as ee, createVNode as c, defineComponent as l, mergeProps as u, normalizeClass as d, normalizeStyle as f, onBeforeUnmount as p, openBlock as m, ref as h, renderList as g, renderSlot as _, toDisplayString as v, unref as y, useAttrs as te, watch as ne } from "vue";
|
|
@@ -529,9 +529,13 @@
|
|
|
529
529
|
border-radius: var(--m-radius-md);
|
|
530
530
|
box-shadow: var(--m-shadow-md);
|
|
531
531
|
max-height: var(--m-dropdown-submenu-max-height);
|
|
532
|
+
max-width: calc(100vw - 2 * var(--m-space-4));
|
|
532
533
|
min-width: 10rem;
|
|
533
534
|
overflow: hidden;
|
|
534
535
|
padding: var(--m-space-1);
|
|
536
|
+
/* Same as .m-dropdown__menu: size to content instead of being clamped
|
|
537
|
+
by the space left of the anchor in the viewport. */
|
|
538
|
+
width: max-content;
|
|
535
539
|
}
|
|
536
540
|
|
|
537
541
|
.m-dropdown__submenu--teleported {
|
package/dist/flex/style.css
CHANGED
|
@@ -529,9 +529,13 @@
|
|
|
529
529
|
border-radius: var(--m-radius-md);
|
|
530
530
|
box-shadow: var(--m-shadow-md);
|
|
531
531
|
max-height: var(--m-dropdown-submenu-max-height);
|
|
532
|
+
max-width: calc(100vw - 2 * var(--m-space-4));
|
|
532
533
|
min-width: 10rem;
|
|
533
534
|
overflow: hidden;
|
|
534
535
|
padding: var(--m-space-1);
|
|
536
|
+
/* Same as .m-dropdown__menu: size to content instead of being clamped
|
|
537
|
+
by the space left of the anchor in the viewport. */
|
|
538
|
+
width: max-content;
|
|
535
539
|
}
|
|
536
540
|
|
|
537
541
|
.m-dropdown__submenu--teleported {
|
|
@@ -529,9 +529,13 @@
|
|
|
529
529
|
border-radius: var(--m-radius-md);
|
|
530
530
|
box-shadow: var(--m-shadow-md);
|
|
531
531
|
max-height: var(--m-dropdown-submenu-max-height);
|
|
532
|
+
max-width: calc(100vw - 2 * var(--m-space-4));
|
|
532
533
|
min-width: 10rem;
|
|
533
534
|
overflow: hidden;
|
|
534
535
|
padding: var(--m-space-1);
|
|
536
|
+
/* Same as .m-dropdown__menu: size to content instead of being clamped
|
|
537
|
+
by the space left of the anchor in the viewport. */
|
|
538
|
+
width: max-content;
|
|
535
539
|
}
|
|
536
540
|
|
|
537
541
|
.m-dropdown__submenu--teleported {
|
package/dist/fluid/style.css
CHANGED
|
@@ -529,9 +529,13 @@
|
|
|
529
529
|
border-radius: var(--m-radius-md);
|
|
530
530
|
box-shadow: var(--m-shadow-md);
|
|
531
531
|
max-height: var(--m-dropdown-submenu-max-height);
|
|
532
|
+
max-width: calc(100vw - 2 * var(--m-space-4));
|
|
532
533
|
min-width: 10rem;
|
|
533
534
|
overflow: hidden;
|
|
534
535
|
padding: var(--m-space-1);
|
|
536
|
+
/* Same as .m-dropdown__menu: size to content instead of being clamped
|
|
537
|
+
by the space left of the anchor in the viewport. */
|
|
538
|
+
width: max-content;
|
|
535
539
|
}
|
|
536
540
|
|
|
537
541
|
.m-dropdown__submenu--teleported {
|
package/dist/form/style.css
CHANGED
|
@@ -529,9 +529,13 @@
|
|
|
529
529
|
border-radius: var(--m-radius-md);
|
|
530
530
|
box-shadow: var(--m-shadow-md);
|
|
531
531
|
max-height: var(--m-dropdown-submenu-max-height);
|
|
532
|
+
max-width: calc(100vw - 2 * var(--m-space-4));
|
|
532
533
|
min-width: 10rem;
|
|
533
534
|
overflow: hidden;
|
|
534
535
|
padding: var(--m-space-1);
|
|
536
|
+
/* Same as .m-dropdown__menu: size to content instead of being clamped
|
|
537
|
+
by the space left of the anchor in the viewport. */
|
|
538
|
+
width: max-content;
|
|
535
539
|
}
|
|
536
540
|
|
|
537
541
|
.m-dropdown__submenu--teleported {
|
package/dist/gallery/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as e } from "../useComponentAttrs-e-5QAjdw.js";
|
|
2
|
-
import { t } from "../Icon-
|
|
2
|
+
import { t } from "../Icon-od9Ob-Ay.js";
|
|
3
3
|
import { t as n } from "../useMenuKeyboard-BedmYE4W.js";
|
|
4
4
|
import { t as r } from "../Scrollbar-DTeJ8P5b.js";
|
|
5
5
|
import { n as i } from "../locale-Bzm2nbEp.js";
|
package/dist/gallery/style.css
CHANGED
|
@@ -529,9 +529,13 @@
|
|
|
529
529
|
border-radius: var(--m-radius-md);
|
|
530
530
|
box-shadow: var(--m-shadow-md);
|
|
531
531
|
max-height: var(--m-dropdown-submenu-max-height);
|
|
532
|
+
max-width: calc(100vw - 2 * var(--m-space-4));
|
|
532
533
|
min-width: 10rem;
|
|
533
534
|
overflow: hidden;
|
|
534
535
|
padding: var(--m-space-1);
|
|
536
|
+
/* Same as .m-dropdown__menu: size to content instead of being clamped
|
|
537
|
+
by the space left of the anchor in the viewport. */
|
|
538
|
+
width: max-content;
|
|
535
539
|
}
|
|
536
540
|
|
|
537
541
|
.m-dropdown__submenu--teleported {
|
package/dist/grid/style.css
CHANGED
|
@@ -529,9 +529,13 @@
|
|
|
529
529
|
border-radius: var(--m-radius-md);
|
|
530
530
|
box-shadow: var(--m-shadow-md);
|
|
531
531
|
max-height: var(--m-dropdown-submenu-max-height);
|
|
532
|
+
max-width: calc(100vw - 2 * var(--m-space-4));
|
|
532
533
|
min-width: 10rem;
|
|
533
534
|
overflow: hidden;
|
|
534
535
|
padding: var(--m-space-1);
|
|
536
|
+
/* Same as .m-dropdown__menu: size to content instead of being clamped
|
|
537
|
+
by the space left of the anchor in the viewport. */
|
|
538
|
+
width: max-content;
|
|
535
539
|
}
|
|
536
540
|
|
|
537
541
|
.m-dropdown__submenu--teleported {
|