morya-ui 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/FlyoutSubmenu-BC_cl17_.js +49 -0
  3. package/dist/ScrollBody-CXFNhBvq.js +68 -0
  4. package/dist/accordion/style.css +625 -583
  5. package/dist/auto-complete/style.css +625 -583
  6. package/dist/avatar/style.css +625 -583
  7. package/dist/badge/style.css +625 -583
  8. package/dist/block-ui/style.css +625 -583
  9. package/dist/breadcrumb/style.css +625 -583
  10. package/dist/button/style.css +625 -583
  11. package/dist/card/style.css +625 -583
  12. package/dist/carousel/style.css +625 -583
  13. package/dist/cascade-select/style.css +625 -583
  14. package/dist/checkbox/style.css +625 -583
  15. package/dist/chip/style.css +625 -583
  16. package/dist/command-menu/style.css +625 -583
  17. package/dist/components/ContextMenu/ContextMenu.vue.d.ts.map +1 -1
  18. package/dist/components/ContextMenu/ContextMenuNodes.vue.d.ts.map +1 -1
  19. package/dist/components/ContextMenu/styles.css +33 -4
  20. package/dist/components/Dropdown/Dropdown.vue.d.ts +2 -2
  21. package/dist/components/Dropdown/Dropdown.vue.d.ts.map +1 -1
  22. package/dist/components/Dropdown/DropdownNodes.vue.d.ts +2 -2
  23. package/dist/components/Dropdown/DropdownNodes.vue.d.ts.map +1 -1
  24. package/dist/components/Dropdown/styles.css +11 -0
  25. package/dist/components/Gallery/Gallery.vue.d.ts +2 -2
  26. package/dist/components/Gallery/Gallery.vue.d.ts.map +1 -1
  27. package/dist/components/Gallery/styles.css +5 -1
  28. package/dist/components/Layout/Layout.vue.d.ts +3 -3
  29. package/dist/components/Layout/Layout.vue.d.ts.map +1 -1
  30. package/dist/components/Layout/LayoutContent.vue.d.ts +2 -2
  31. package/dist/components/Layout/LayoutContent.vue.d.ts.map +1 -1
  32. package/dist/components/Layout/LayoutScrollContext.vue.d.ts +20 -0
  33. package/dist/components/Layout/LayoutScrollContext.vue.d.ts.map +1 -0
  34. package/dist/components/Layout/LayoutScrollRegion.vue.d.ts +34 -0
  35. package/dist/components/Layout/LayoutScrollRegion.vue.d.ts.map +1 -0
  36. package/dist/components/Layout/LayoutSider.vue.d.ts +2 -2
  37. package/dist/components/Layout/LayoutSider.vue.d.ts.map +1 -1
  38. package/dist/components/Layout/composables/useLayoutScroll.d.ts +4 -1
  39. package/dist/components/Layout/composables/useLayoutScroll.d.ts.map +1 -1
  40. package/dist/components/Layout/styles.css +31 -13
  41. package/dist/components/Menu/Menu.vue.d.ts.map +1 -1
  42. package/dist/components/Menu/styles.css +10 -0
  43. package/dist/components/Menubar/Menubar.vue.d.ts +2 -2
  44. package/dist/components/Menubar/Menubar.vue.d.ts.map +1 -1
  45. package/dist/components/Menubar/styles.css +14 -0
  46. package/dist/components/OrderList/OrderList.vue.d.ts +4 -4
  47. package/dist/components/OrderList/OrderList.vue.d.ts.map +1 -1
  48. package/dist/components/PickList/PickList.vue.d.ts +7 -7
  49. package/dist/components/PickList/PickList.vue.d.ts.map +1 -1
  50. package/dist/components/ScrollTop/ScrollTop.vue.d.ts.map +1 -1
  51. package/dist/components/Tabs/Tabs.vue.d.ts +3 -3
  52. package/dist/components/Tabs/Tabs.vue.d.ts.map +1 -1
  53. package/dist/components/Tabs/styles.css +72 -77
  54. package/dist/components/Terminal/Terminal.vue.d.ts.map +1 -1
  55. package/dist/components/Terminal/styles.css +6 -2
  56. package/dist/components/TieredMenu/TieredMenu.vue.d.ts.map +1 -1
  57. package/dist/components/TieredMenu/styles.css +33 -4
  58. package/dist/components/Timeline/Timeline.vue.d.ts +35 -10
  59. package/dist/components/Timeline/Timeline.vue.d.ts.map +1 -1
  60. package/dist/components/Timeline/styles.css +159 -156
  61. package/dist/components/TreeSelect/TreeSelect.vue.d.ts.map +1 -1
  62. package/dist/components/TreeSelect/styles.css +15 -0
  63. package/dist/components/TreeTable/TreeTable.vue.d.ts +2 -2
  64. package/dist/components/TreeTable/TreeTable.vue.d.ts.map +1 -1
  65. package/dist/components/TreeTable/styles.css +64 -61
  66. package/dist/components/VirtualScroller/VirtualScroller.vue.d.ts +2 -2
  67. package/dist/components/VirtualScroller/VirtualScroller.vue.d.ts.map +1 -1
  68. package/dist/components/VirtualScroller/styles.css +20 -17
  69. package/dist/config-provider/style.css +625 -583
  70. package/dist/confirm-dialog/style.css +625 -583
  71. package/dist/confirm-popup/style.css +625 -583
  72. package/dist/context-menu/index.js +131 -89
  73. package/dist/context-menu/style.css +781 -587
  74. package/dist/context-menu/style.js +1 -0
  75. package/dist/data-view/style.css +625 -583
  76. package/dist/date-picker/style.css +625 -583
  77. package/dist/dialog/style.css +625 -583
  78. package/dist/divider/style.css +625 -583
  79. package/dist/dock/style.css +625 -583
  80. package/dist/drawer/style.css +625 -583
  81. package/dist/dropdown/index.js +162 -122
  82. package/dist/dropdown/style.css +759 -583
  83. package/dist/dropdown/style.js +1 -0
  84. package/dist/fieldset/style.css +625 -583
  85. package/dist/file-upload/style.css +625 -583
  86. package/dist/flex/style.css +625 -583
  87. package/dist/float-label/style.css +625 -583
  88. package/dist/fluid/style.css +625 -583
  89. package/dist/form/style.css +625 -583
  90. package/dist/gallery/index.js +76 -67
  91. package/dist/gallery/style.css +753 -584
  92. package/dist/gallery/style.js +1 -0
  93. package/dist/grid/style.css +625 -583
  94. package/dist/icon/style.css +625 -583
  95. package/dist/icon-field/style.css +625 -583
  96. package/dist/index.js +1925 -1474
  97. package/dist/inplace/style.css +625 -583
  98. package/dist/input/style.css +625 -583
  99. package/dist/input-color/style.css +625 -583
  100. package/dist/input-group/style.css +625 -583
  101. package/dist/input-number/style.css +625 -583
  102. package/dist/input-otp/style.css +625 -583
  103. package/dist/input-password/style.css +625 -583
  104. package/dist/input-tags/style.css +625 -583
  105. package/dist/knob/style.css +625 -583
  106. package/dist/label/style.css +625 -583
  107. package/dist/layout/index.js +230 -136
  108. package/dist/layout/style.css +779 -596
  109. package/dist/layout/style.js +1 -0
  110. package/dist/listbox/style.css +625 -583
  111. package/dist/mega-menu/style.css +625 -583
  112. package/dist/menu/index.js +233 -216
  113. package/dist/menu/style.css +758 -583
  114. package/dist/menu/style.js +1 -0
  115. package/dist/menubar/index.js +77 -68
  116. package/dist/menubar/style.css +762 -583
  117. package/dist/menubar/style.js +1 -0
  118. package/dist/message/style.css +625 -583
  119. package/dist/meter-group/style.css +625 -583
  120. package/dist/order-list/index.js +66 -58
  121. package/dist/order-list/style.css +625 -583
  122. package/dist/page/style.css +625 -583
  123. package/dist/pagination/style.css +625 -583
  124. package/dist/panel/style.css +625 -583
  125. package/dist/pick-list/index.js +97 -84
  126. package/dist/pick-list/style.css +625 -583
  127. package/dist/popover/style.css +625 -583
  128. package/dist/progress-bar/style.css +625 -583
  129. package/dist/progress-spinner/style.css +625 -583
  130. package/dist/radio/style.css +625 -583
  131. package/dist/rating/style.css +625 -583
  132. package/dist/scroll-top/index.js +23 -13
  133. package/dist/scroll-top/style.css +748 -583
  134. package/dist/scroll-top/style.js +1 -0
  135. package/dist/scrollbar/style.css +625 -583
  136. package/dist/select/style.css +625 -583
  137. package/dist/select-button/style.css +625 -583
  138. package/dist/shared/FlyoutSubmenu.vue.d.ts +32 -0
  139. package/dist/shared/FlyoutSubmenu.vue.d.ts.map +1 -0
  140. package/dist/shared/ScrollBody.vue.d.ts +39 -0
  141. package/dist/shared/ScrollBody.vue.d.ts.map +1 -0
  142. package/dist/sidebar/style.css +625 -583
  143. package/dist/skeleton/style.css +625 -583
  144. package/dist/slider/style.css +625 -583
  145. package/dist/space/style.css +625 -583
  146. package/dist/speed-dial/style.css +625 -583
  147. package/dist/split-button/style.css +625 -583
  148. package/dist/splitter/style.css +625 -583
  149. package/dist/stepper/style.css +625 -583
  150. package/dist/styles/base.css +625 -583
  151. package/dist/styles.css +1 -1
  152. package/dist/switch/style.css +625 -583
  153. package/dist/table/style.css +625 -583
  154. package/dist/tabs/index.js +92 -81
  155. package/dist/tabs/style.css +818 -658
  156. package/dist/tabs/style.js +1 -0
  157. package/dist/tag/style.css +625 -583
  158. package/dist/terminal/index.js +47 -40
  159. package/dist/terminal/style.css +631 -585
  160. package/dist/textarea/style.css +625 -583
  161. package/dist/tiered-menu/index.js +130 -84
  162. package/dist/tiered-menu/style.css +781 -587
  163. package/dist/tiered-menu/style.js +1 -0
  164. package/dist/timeline/index.js +82 -37
  165. package/dist/timeline/style.css +907 -739
  166. package/dist/timeline/style.js +1 -0
  167. package/dist/toast/style.css +625 -583
  168. package/dist/toggle-button/style.css +625 -583
  169. package/dist/toolbar/style.css +625 -583
  170. package/dist/tooltip/style.css +625 -583
  171. package/dist/tree/style.css +625 -583
  172. package/dist/tree-select/index.js +202 -193
  173. package/dist/tree-select/style.css +763 -583
  174. package/dist/tree-select/style.js +1 -0
  175. package/dist/tree-table/index.js +57 -50
  176. package/dist/tree-table/style.css +689 -644
  177. package/dist/virtual-scroller/index.js +38 -34
  178. package/dist/virtual-scroller/style.css +775 -607
  179. package/dist/virtual-scroller/style.js +1 -0
  180. package/package.json +1 -1
@@ -1,13 +1,37 @@
1
1
  import { r as e } from "../useComponentAttrs-BTYEe61P.js";
2
2
  import { t } from "../Icon-DfpIfo2L.js";
3
- import { r as n, t as r } from "../responsive-DA5bxylA.js";
4
- import { n as i } from "../locale-DYGhxekd.js";
3
+ import { t as n } from "../Scrollbar-DoNZvgX2.js";
4
+ import { r, t as i } from "../responsive-DA5bxylA.js";
5
+ import { n as a } from "../locale-DYGhxekd.js";
5
6
  import "./style.js";
6
- import { computed as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createVNode as l, defineComponent as u, inject as d, mergeProps as f, normalizeClass as p, normalizeStyle as m, openBlock as h, provide as g, ref as _, renderSlot as v, toValue as y, unref as b, useAttrs as x, watch as S } from "vue";
7
+ import { computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createVNode as d, defineComponent as f, inject as p, mergeProps as m, normalizeClass as h, normalizeStyle as g, openBlock as _, provide as v, ref as y, renderSlot as b, toValue as x, unref as S, useAttrs as C, watch as w, withCtx as T } from "vue";
8
+ //#region src/components/Layout/context.ts
9
+ var E = Symbol("muLayout"), D = /* @__PURE__ */ f({
10
+ __name: "LayoutScrollContext",
11
+ props: {
12
+ hasSider: { type: Boolean },
13
+ siderPlacement: {}
14
+ },
15
+ setup(e) {
16
+ let t = e;
17
+ return v(E, {
18
+ get hasSider() {
19
+ return t.hasSider;
20
+ },
21
+ get siderPlacement() {
22
+ return t.siderPlacement;
23
+ }
24
+ }), (e, t) => b(e.$slots, "default");
25
+ }
26
+ });
27
+ //#endregion
7
28
  //#region src/components/Layout/composables/useLayoutScroll.ts
8
- function C(e, t) {
29
+ function O(e) {
30
+ if (e) return "wrapRef" in e ? e.wrapRef : e;
31
+ }
32
+ function k(e, t) {
9
33
  function n(t, n) {
10
- let r = e.value;
34
+ let r = O(e.value);
11
35
  r && (typeof t == "number" ? r.scrollTo(t, n ?? 0) : r.scrollTo(t));
12
36
  }
13
37
  function r(e) {
@@ -19,8 +43,59 @@ function C(e, t) {
19
43
  };
20
44
  }
21
45
  //#endregion
22
- //#region src/components/Layout/context.ts
23
- var w = Symbol("muLayout"), T = /* @__PURE__ */ u({
46
+ //#region src/components/Layout/LayoutScrollRegion.vue
47
+ var A = /* @__PURE__ */ f({
48
+ name: "MLayoutScrollRegion",
49
+ inheritAttrs: !1,
50
+ __name: "LayoutScrollRegion",
51
+ props: {
52
+ scrollbarRootClass: { default: "m-layout__scrollbar" },
53
+ scrollClass: {},
54
+ scrollStyle: {},
55
+ viewClass: {},
56
+ viewStyle: {},
57
+ hasSider: {
58
+ type: Boolean,
59
+ default: !1
60
+ },
61
+ siderPlacement: { default: "left" }
62
+ },
63
+ emits: ["scroll"],
64
+ setup(e, { expose: t, emit: r }) {
65
+ let i = e, a = r, c = p(E, null), l = o(() => i.hasSider || (c?.hasSider ?? !1)), u = o(() => i.siderPlacement ?? c?.siderPlacement ?? "left"), f = y(), { scrollTo: m, onScroll: g } = k(o(() => f.value), a), v = o(() => C(i.scrollClass)), x = o(() => C(["m-layout__scroll-view", i.viewClass]));
66
+ function S() {
67
+ g(new Event("scroll"));
68
+ }
69
+ function C(e) {
70
+ return e == null ? [] : typeof e == "string" ? e.split(/\s+/).filter(Boolean) : Array.isArray(e) ? e.flatMap((e) => typeof e == "string" ? e.split(/\s+/).filter(Boolean) : e && typeof e == "object" ? Object.entries(e).filter(([, e]) => e).map(([e]) => e) : []) : Object.entries(e).filter(([, e]) => e).map(([e]) => e);
71
+ }
72
+ return t({ scrollTo: m }), (t, r) => (_(), s(n, {
73
+ ref_key: "scrollbarRef",
74
+ ref: f,
75
+ class: h([e.scrollbarRootClass, "m-scrollbar--fill"]),
76
+ "wrap-class": v.value,
77
+ "wrap-style": e.scrollStyle,
78
+ "view-class": x.value,
79
+ "view-style": e.viewStyle,
80
+ onScroll: S
81
+ }, {
82
+ default: T(() => [d(D, {
83
+ "has-sider": l.value,
84
+ "sider-placement": u.value
85
+ }, {
86
+ default: T(() => [b(t.$slots, "default")]),
87
+ _: 3
88
+ }, 8, ["has-sider", "sider-placement"])]),
89
+ _: 3
90
+ }, 8, [
91
+ "class",
92
+ "wrap-class",
93
+ "wrap-style",
94
+ "view-class",
95
+ "view-style"
96
+ ]));
97
+ }
98
+ }), j = /* @__PURE__ */ f({
24
99
  name: "MLayout",
25
100
  inheritAttrs: !1,
26
101
  __name: "Layout",
@@ -46,76 +121,87 @@ var w = Symbol("muLayout"), T = /* @__PURE__ */ u({
46
121
  }
47
122
  },
48
123
  emits: ["scroll"],
49
- setup(t, { expose: r, emit: i }) {
50
- let o = t, l = x(), { rootAttrs: u } = e(l, () => o.pt), d = i;
51
- g(w, {
124
+ setup(t, { expose: n, emit: i }) {
125
+ let a = t, s = C(), { rootAttrs: c } = e(s, () => a.pt), u = i;
126
+ v(E, {
52
127
  get hasSider() {
53
- return o.hasSider;
128
+ return a.hasSider;
54
129
  },
55
130
  get siderPlacement() {
56
- return o.siderPlacement;
131
+ return a.siderPlacement;
57
132
  }
58
133
  });
59
- let y = _(null), { scrollTo: S, onScroll: T } = C(y, d), E = a(() => ({
60
- ...o.height == null ? {} : { height: n(o.height) },
61
- width: o.width == null ? "100%" : n(o.width)
62
- })), D = a(() => [
134
+ let f = y(), p = o(() => ({
135
+ ...a.height == null ? {} : { height: r(a.height) },
136
+ width: a.width == null ? "100%" : r(a.width)
137
+ })), h = o(() => [
63
138
  "m-layout",
64
- `m-layout--${o.position}-positioned`,
139
+ `m-layout--${a.position}-positioned`,
65
140
  {
66
- "m-layout--embedded": o.embedded,
67
- "m-layout--fill-viewport": o.fillViewport,
68
- "m-layout--has-sider": o.hasSider,
69
- "m-layout--sider-right": o.hasSider && o.siderPlacement === "right"
141
+ "m-layout--embedded": a.embedded,
142
+ "m-layout--fill-viewport": a.fillViewport,
143
+ "m-layout--has-sider": a.hasSider,
144
+ "m-layout--sider-right": a.hasSider && a.siderPlacement === "right"
70
145
  }
71
- ]), O = a(() => {
72
- if (!o.hasSider) return o.contentStyle;
73
- let e = {
74
- display: "flex",
75
- flexWrap: "nowrap",
76
- width: "100%",
77
- flexDirection: o.siderPlacement === "right" ? "row-reverse" : "row"
78
- };
79
- return [o.contentStyle, e];
80
- }), k = a(() => [
146
+ ]), g = o(() => ({
147
+ display: "flex",
148
+ flexWrap: "nowrap",
149
+ width: "100%",
150
+ flexDirection: a.siderPlacement === "right" ? "row-reverse" : "row"
151
+ })), x = o(() => a.contentStyle), w = o(() => a.hasSider ? g.value : void 0), D = o(() => [
81
152
  "m-layout__scroll",
82
- o.contentClass,
83
- { "m-layout__scroll--has-sider": o.hasSider }
84
- ]);
85
- return r({ scrollTo: S }), (e, t) => (h(), s("div", f(b(u), {
86
- class: D.value,
87
- style: E.value
88
- }), [c("div", {
89
- ref_key: "scrollEl",
90
- ref: y,
91
- class: p(k.value),
92
- style: m(O.value),
93
- onScroll: t[0] ||= (...e) => b(T) && b(T)(...e)
94
- }, [v(e.$slots, "default")], 38)], 16));
153
+ a.contentClass,
154
+ { "m-layout__scroll--has-sider": a.hasSider }
155
+ ]), O = o(() => ({ "m-layout__scroll-view--has-sider": a.hasSider }));
156
+ return n({ scrollTo: ((...e) => f.value?.scrollTo(...e)) }), (e, n) => (_(), l("div", m(S(c), {
157
+ class: h.value,
158
+ style: p.value
159
+ }), [d(A, {
160
+ ref_key: "scrollRegionRef",
161
+ ref: f,
162
+ "has-sider": t.hasSider,
163
+ "sider-placement": t.siderPlacement,
164
+ "scrollbar-root-class": "m-layout__scrollbar",
165
+ "scroll-class": D.value,
166
+ "scroll-style": x.value,
167
+ "view-class": O.value,
168
+ "view-style": w.value,
169
+ onScroll: n[0] ||= (e) => u("scroll", e)
170
+ }, {
171
+ default: T(() => [b(e.$slots, "default")]),
172
+ _: 3
173
+ }, 8, [
174
+ "has-sider",
175
+ "sider-placement",
176
+ "scroll-class",
177
+ "scroll-style",
178
+ "view-class",
179
+ "view-style"
180
+ ])], 16));
95
181
  }
96
182
  });
97
183
  //#endregion
98
184
  //#region src/components/Layout/composables/useLayoutRegionStyle.ts
99
- function E(e, t) {
100
- return e == null ? t : n(e) ?? t;
185
+ function M(e, t) {
186
+ return e == null ? t : r(e) ?? t;
101
187
  }
102
- function D(e) {
103
- return a(() => {
104
- let t = y(e), r = {
105
- padding: E(t.padding, "var(--m-layout-padding, var(--m-space-4))"),
106
- borderRadius: E(t.radius, "var(--m-layout-radius, 0)")
188
+ function N(e) {
189
+ return o(() => {
190
+ let t = x(e), n = {
191
+ padding: M(t.padding, "var(--m-layout-padding, var(--m-space-4))"),
192
+ borderRadius: M(t.radius, "var(--m-layout-radius, 0)")
107
193
  };
108
- if (t.heightFallback != null) r.height = E(t.height, t.heightFallback);
194
+ if (t.heightFallback != null) n.height = M(t.height, t.heightFallback);
109
195
  else if (t.height != null) {
110
- let e = n(t.height);
111
- e && (r.height = e);
196
+ let e = r(t.height);
197
+ e && (n.height = e);
112
198
  }
113
- return r;
199
+ return n;
114
200
  });
115
201
  }
116
202
  //#endregion
117
203
  //#region src/components/Layout/LayoutContent.vue
118
- var O = /* @__PURE__ */ u({
204
+ var P = /* @__PURE__ */ f({
119
205
  name: "MLayoutContent",
120
206
  inheritAttrs: !1,
121
207
  __name: "LayoutContent",
@@ -134,28 +220,32 @@ var O = /* @__PURE__ */ u({
134
220
  },
135
221
  emits: ["scroll"],
136
222
  setup(t, { expose: n, emit: r }) {
137
- let i = t, o = x(), { rootAttrs: l } = e(o, () => i.pt), u = r, d = _(null), { scrollTo: g, onScroll: y } = C(d, u), S = D(() => ({
223
+ let i = t, a = C(), { rootAttrs: s } = e(a, () => i.pt), c = r, u = y(), f = N(() => ({
138
224
  height: i.height,
139
225
  padding: i.padding,
140
226
  radius: i.radius
141
- })), w = a(() => [
227
+ })), p = o(() => [
142
228
  "m-layout",
143
229
  "m-layout-content",
144
230
  `m-layout--${i.position}-positioned`,
145
231
  { "m-layout--embedded": i.embedded }
146
- ]), T = a(() => ["m-layout__scroll", i.contentClass]), E = a(() => i.contentStyle);
147
- return n({ scrollTo: g }), (e, t) => (h(), s("main", f(b(l), {
148
- class: w.value,
149
- style: b(S)
150
- }), [c("div", {
151
- ref_key: "scrollEl",
152
- ref: d,
153
- class: p(T.value),
154
- style: m(E.value),
155
- onScroll: t[0] ||= (...e) => b(y) && b(y)(...e)
156
- }, [v(e.$slots, "default")], 38)], 16));
232
+ ]), h = o(() => ["m-layout__scroll", i.contentClass]), g = o(() => i.contentStyle);
233
+ return n({ scrollTo: ((...e) => u.value?.scrollTo(...e)) }), (e, t) => (_(), l("main", m(S(s), {
234
+ class: p.value,
235
+ style: S(f)
236
+ }), [d(A, {
237
+ ref_key: "scrollRegionRef",
238
+ ref: u,
239
+ "scrollbar-root-class": "m-layout__scrollbar",
240
+ "scroll-class": h.value,
241
+ "scroll-style": g.value,
242
+ onScroll: t[0] ||= (e) => c("scroll", e)
243
+ }, {
244
+ default: T(() => [b(e.$slots, "default")]),
245
+ _: 3
246
+ }, 8, ["scroll-class", "scroll-style"])], 16));
157
247
  }
158
- }), k = /* @__PURE__ */ u({
248
+ }), F = /* @__PURE__ */ f({
159
249
  name: "MLayoutFooter",
160
250
  inheritAttrs: !1,
161
251
  __name: "LayoutFooter",
@@ -175,12 +265,12 @@ var O = /* @__PURE__ */ u({
175
265
  position: { default: "static" }
176
266
  },
177
267
  setup(t) {
178
- let n = t, r = x(), { rootAttrs: i } = e(r, () => n.pt), o = D(() => ({
268
+ let n = t, r = C(), { rootAttrs: i } = e(r, () => n.pt), a = N(() => ({
179
269
  height: n.height,
180
270
  heightFallback: "var(--m-layout-footer-height, 48px)",
181
271
  padding: n.padding,
182
272
  radius: n.radius
183
- })), c = a(() => [
273
+ })), s = o(() => [
184
274
  "m-layout-footer",
185
275
  `m-layout-footer--${n.position}-positioned`,
186
276
  {
@@ -188,12 +278,12 @@ var O = /* @__PURE__ */ u({
188
278
  "m-layout-footer--inverted": n.inverted
189
279
  }
190
280
  ]);
191
- return (e, t) => (h(), s("footer", f(b(i), {
192
- class: c.value,
193
- style: b(o)
194
- }), [v(e.$slots, "default")], 16));
281
+ return (e, t) => (_(), l("footer", m(S(i), {
282
+ class: s.value,
283
+ style: S(a)
284
+ }), [b(e.$slots, "default")], 16));
195
285
  }
196
- }), A = /* @__PURE__ */ u({
286
+ }), I = /* @__PURE__ */ f({
197
287
  name: "MLayoutHeader",
198
288
  inheritAttrs: !1,
199
289
  __name: "LayoutHeader",
@@ -213,12 +303,12 @@ var O = /* @__PURE__ */ u({
213
303
  position: { default: "static" }
214
304
  },
215
305
  setup(t) {
216
- let n = t, r = x(), { rootAttrs: i } = e(r, () => n.pt), o = D(() => ({
306
+ let n = t, r = C(), { rootAttrs: i } = e(r, () => n.pt), a = N(() => ({
217
307
  height: n.height,
218
308
  heightFallback: "var(--m-layout-header-height, 56px)",
219
309
  padding: n.padding,
220
310
  radius: n.radius
221
- })), c = a(() => [
311
+ })), s = o(() => [
222
312
  "m-layout-header",
223
313
  `m-layout-header--${n.position}-positioned`,
224
314
  {
@@ -226,20 +316,20 @@ var O = /* @__PURE__ */ u({
226
316
  "m-layout-header--inverted": n.inverted
227
317
  }
228
318
  ]);
229
- return (e, t) => (h(), s("header", f(b(i), {
230
- class: c.value,
231
- style: b(o)
232
- }), [v(e.$slots, "default")], 16));
319
+ return (e, t) => (_(), l("header", m(S(i), {
320
+ class: s.value,
321
+ style: S(a)
322
+ }), [b(e.$slots, "default")], 16));
233
323
  }
234
324
  });
235
325
  //#endregion
236
326
  //#region src/components/Layout/composables/useLayoutSiderCollapse.ts
237
- function j(e, t) {
238
- let n = _(e.defaultCollapsed);
239
- S(() => e.collapsed, (e) => {
327
+ function L(e, t) {
328
+ let n = y(e.defaultCollapsed);
329
+ w(() => e.collapsed, (e) => {
240
330
  e !== void 0 && (n.value = e);
241
331
  });
242
- let r = a(() => e.collapsed === void 0 ? n.value : !!e.collapsed);
332
+ let r = o(() => e.collapsed === void 0 ? n.value : !!e.collapsed);
243
333
  function i() {
244
334
  let e = !r.value;
245
335
  n.value = e, t("update:collapsed", e), t(e ? "collapse" : "expand");
@@ -252,24 +342,24 @@ function j(e, t) {
252
342
  }
253
343
  //#endregion
254
344
  //#region src/components/Layout/utils.ts
255
- function M(e) {
345
+ function R(e) {
256
346
  return e ? e === "bar" || e === !0 ? "bar" : "arrow-circle" : null;
257
347
  }
258
348
  //#endregion
259
349
  //#region src/components/Layout/LayoutSider.vue?vue&type=script&setup=true&lang.ts
260
- var N = ["aria-expanded", "aria-label"], P = {
350
+ var z = ["aria-expanded", "aria-label"], B = {
261
351
  key: 0,
262
352
  class: "m-layout-sider__arrow",
263
353
  "aria-hidden": "true"
264
- }, F = {
354
+ }, V = {
265
355
  key: 1,
266
356
  class: "m-layout-sider__bar",
267
357
  "aria-hidden": "true"
268
- }, I = {
358
+ }, H = {
269
359
  key: 1,
270
360
  class: "m-layout-sider__border",
271
361
  "aria-hidden": "true"
272
- }, L = /* @__PURE__ */ u({
362
+ }, U = /* @__PURE__ */ f({
273
363
  name: "MLayoutSider",
274
364
  inheritAttrs: !1,
275
365
  __name: "LayoutSider",
@@ -317,63 +407,67 @@ var N = ["aria-expanded", "aria-label"], P = {
317
407
  "after-leave",
318
408
  "scroll"
319
409
  ],
320
- setup(u, { expose: g, emit: y }) {
321
- let S = u, T = x(), { rootAttrs: E } = e(T, () => S.pt), D = y, O = i(), k = d(w, null), A = _(null), { scrollTo: L, onScroll: R } = C(A, D), { mergedCollapsed: z, toggle: B } = j(S, D), V = a(() => k?.siderPlacement ?? "left"), H = a(() => n(S.width)), U = a(() => n(S.collapsedWidth)), W = a(() => H.value ?? "var(--m-layout-sider-width)"), G = a(() => U.value ?? "var(--m-layout-sider-collapsed-width)"), K = a(() => z.value ? G.value : W.value), q = a(() => M(S.showTrigger)), J = a(() => !z.value || S.showCollapsedContent), Y = a(() => [
410
+ setup(n, { expose: s, emit: f }) {
411
+ let v = n, x = C(), { rootAttrs: w } = e(x, () => v.pt), D = f, O = a(), k = p(E, null), j = y(), { mergedCollapsed: M, toggle: N } = L(v, D), P = o(() => k?.siderPlacement ?? "left"), F = o(() => r(v.width)), I = o(() => r(v.collapsedWidth)), U = o(() => F.value ?? "var(--m-layout-sider-width)"), W = o(() => I.value ?? "var(--m-layout-sider-collapsed-width)"), G = o(() => M.value ? W.value : U.value), K = o(() => R(v.showTrigger)), q = o(() => !M.value || v.showCollapsedContent), J = o(() => [
322
412
  "m-layout-sider",
323
- `m-layout-sider--${S.position}-positioned`,
324
- `m-layout-sider--${V.value}-placement`,
325
- `m-layout-sider--collapse-${S.collapseMode}`,
413
+ `m-layout-sider--${v.position}-positioned`,
414
+ `m-layout-sider--${P.value}-placement`,
415
+ `m-layout-sider--collapse-${v.collapseMode}`,
326
416
  {
327
- "m-layout-sider--bordered": S.bordered,
328
- "m-layout-sider--inverted": S.inverted,
329
- "m-layout-sider--collapsed": z.value,
330
- "m-layout-sider--show-content": J.value
417
+ "m-layout-sider--bordered": v.bordered,
418
+ "m-layout-sider--inverted": v.inverted,
419
+ "m-layout-sider--collapsed": M.value,
420
+ "m-layout-sider--show-content": q.value
331
421
  }
332
- ]), X = a(() => {
333
- let e = S.collapseMode === "width", t = {
422
+ ]), Y = o(() => {
423
+ let e = v.collapseMode === "width", t = {
334
424
  minWidth: "0",
335
- borderRadius: S.radius == null ? "var(--m-layout-radius, 0)" : n(S.radius),
336
- width: e ? K.value : W.value,
337
- maxWidth: K.value
425
+ borderRadius: v.radius == null ? "var(--m-layout-radius, 0)" : r(v.radius),
426
+ width: e ? G.value : U.value,
427
+ maxWidth: G.value
338
428
  };
339
- return H.value && !r(H.value, "--m-layout-sider-width") && (t["--m-layout-sider-width"] = H.value), U.value && !r(U.value, "--m-layout-sider-collapsed-width") && (t["--m-layout-sider-collapsed-width"] = U.value), t;
340
- }), Z = a(() => S.padding == null ? "var(--m-layout-padding, var(--m-space-4))" : n(S.padding)), Q = a(() => {
341
- let e = { padding: Z.value };
342
- return S.contentStyle == null ? e : [e, S.contentStyle];
343
- }), $ = a(() => ["m-layout-sider__scroll", S.contentClass]), ee = a(() => z.value ? S.collapsedTriggerClass : S.triggerClass), te = a(() => z.value ? S.collapsedTriggerStyle : S.triggerStyle);
344
- function ne(e) {
345
- e.propertyName === "max-width" && (z.value ? D("after-leave") : D("after-enter"));
429
+ return F.value && !i(F.value, "--m-layout-sider-width") && (t["--m-layout-sider-width"] = F.value), I.value && !i(I.value, "--m-layout-sider-collapsed-width") && (t["--m-layout-sider-collapsed-width"] = I.value), t;
430
+ }), X = o(() => v.padding == null ? "var(--m-layout-padding, var(--m-space-4))" : r(v.padding)), Z = o(() => {
431
+ let e = { padding: X.value };
432
+ return v.contentStyle == null ? e : [e, v.contentStyle];
433
+ }), Q = o(() => ["m-layout-sider__scroll", v.contentClass]), $ = o(() => M.value ? v.collapsedTriggerClass : v.triggerClass), ee = o(() => M.value ? v.collapsedTriggerStyle : v.triggerStyle);
434
+ function te(e) {
435
+ e.propertyName === "max-width" && (M.value ? D("after-leave") : D("after-enter"));
346
436
  }
347
- return g({ scrollTo: L }), (e, n) => (h(), s("aside", f(b(E), {
348
- class: Y.value,
349
- style: X.value,
350
- onTransitionend: ne
437
+ return s({ scrollTo: ((...e) => j.value?.scrollTo(...e)) }), (e, r) => (_(), l("aside", m(S(w), {
438
+ class: J.value,
439
+ style: Y.value,
440
+ onTransitionend: te
351
441
  }), [
352
- c("div", {
353
- ref_key: "scrollEl",
354
- ref: A,
355
- class: p($.value),
356
- style: m(Q.value),
357
- onScroll: n[0] ||= (...e) => b(R) && b(R)(...e)
358
- }, [v(e.$slots, "default")], 38),
359
- q.value ? (h(), s("button", {
442
+ d(A, {
443
+ ref_key: "scrollRegionRef",
444
+ ref: j,
445
+ "scrollbar-root-class": "m-layout-sider__scrollbar",
446
+ "scroll-class": Q.value,
447
+ "scroll-style": Z.value,
448
+ onScroll: r[0] ||= (e) => D("scroll", e)
449
+ }, {
450
+ default: T(() => [b(e.$slots, "default")]),
451
+ _: 3
452
+ }, 8, ["scroll-class", "scroll-style"]),
453
+ K.value ? (_(), l("button", {
360
454
  key: 0,
361
455
  type: "button",
362
- class: p(["m-layout-sider__trigger", [ee.value, {
363
- "m-layout-sider__trigger--bar": q.value === "bar",
364
- "m-layout-sider__trigger--arrow-circle": q.value === "arrow-circle"
456
+ class: h(["m-layout-sider__trigger", [$.value, {
457
+ "m-layout-sider__trigger--bar": K.value === "bar",
458
+ "m-layout-sider__trigger--arrow-circle": K.value === "arrow-circle"
365
459
  }]]),
366
- style: m(te.value),
367
- "aria-expanded": !b(z),
368
- "aria-label": b(z) ? b(O).expand : b(O).collapse,
369
- onClick: n[1] ||= (...e) => b(B) && b(B)(...e)
370
- }, [q.value === "arrow-circle" ? (h(), s("span", P, [l(t, {
460
+ style: g(ee.value),
461
+ "aria-expanded": !S(M),
462
+ "aria-label": S(M) ? S(O).expand : S(O).collapse,
463
+ onClick: r[1] ||= (...e) => S(N) && S(N)(...e)
464
+ }, [K.value === "arrow-circle" ? (_(), l("span", B, [d(t, {
371
465
  name: "chevron-right",
372
466
  size: "sm"
373
- })])) : (h(), s("span", F, [...n[2] ||= [c("i", { class: "m-layout-sider__bar-top" }, null, -1), c("i", { class: "m-layout-sider__bar-bottom" }, null, -1)]]))], 14, N)) : o("", !0),
374
- u.bordered ? (h(), s("div", I)) : o("", !0)
467
+ })])) : (_(), l("span", V, [...r[2] ||= [u("i", { class: "m-layout-sider__bar-top" }, null, -1), u("i", { class: "m-layout-sider__bar-bottom" }, null, -1)]]))], 14, z)) : c("", !0),
468
+ n.bordered ? (_(), l("div", H)) : c("", !0)
375
469
  ], 16));
376
470
  }
377
471
  });
378
472
  //#endregion
379
- export { T as MLayout, O as MLayoutContent, k as MLayoutFooter, A as MLayoutHeader, L as MLayoutSider, w as M_LAYOUT_KEY };
473
+ export { j as MLayout, P as MLayoutContent, F as MLayoutFooter, I as MLayoutHeader, U as MLayoutSider, E as M_LAYOUT_KEY };