morya-ui 0.2.2 → 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 (209) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/Card-BQfmv5Iw.js +62 -0
  3. package/dist/FlyoutSubmenu-BC_cl17_.js +49 -0
  4. package/dist/ScrollBody-CXFNhBvq.js +68 -0
  5. package/dist/accordion/style.css +625 -583
  6. package/dist/auto-complete/style.css +625 -583
  7. package/dist/avatar/style.css +625 -583
  8. package/dist/badge/style.css +625 -583
  9. package/dist/block-ui/style.css +625 -583
  10. package/dist/breadcrumb/style.css +625 -583
  11. package/dist/button/style.css +625 -583
  12. package/dist/card/index.js +2 -62
  13. package/dist/card/style.css +625 -583
  14. package/dist/carousel/style.css +625 -583
  15. package/dist/cascade-select/style.css +625 -583
  16. package/dist/checkbox/style.css +625 -583
  17. package/dist/chip/style.css +625 -583
  18. package/dist/command-menu/style.css +625 -583
  19. package/dist/components/ContextMenu/ContextMenu.vue.d.ts.map +1 -1
  20. package/dist/components/ContextMenu/ContextMenuNodes.vue.d.ts.map +1 -1
  21. package/dist/components/ContextMenu/styles.css +33 -4
  22. package/dist/components/Dropdown/Dropdown.vue.d.ts +2 -2
  23. package/dist/components/Dropdown/Dropdown.vue.d.ts.map +1 -1
  24. package/dist/components/Dropdown/DropdownNodes.vue.d.ts +2 -2
  25. package/dist/components/Dropdown/DropdownNodes.vue.d.ts.map +1 -1
  26. package/dist/components/Dropdown/styles.css +11 -0
  27. package/dist/components/Gallery/Gallery.vue.d.ts +2 -2
  28. package/dist/components/Gallery/Gallery.vue.d.ts.map +1 -1
  29. package/dist/components/Gallery/styles.css +5 -1
  30. package/dist/components/Layout/Layout.vue.d.ts +4 -3
  31. package/dist/components/Layout/Layout.vue.d.ts.map +1 -1
  32. package/dist/components/Layout/LayoutContent.vue.d.ts +2 -2
  33. package/dist/components/Layout/LayoutContent.vue.d.ts.map +1 -1
  34. package/dist/components/Layout/LayoutScrollContext.vue.d.ts +20 -0
  35. package/dist/components/Layout/LayoutScrollContext.vue.d.ts.map +1 -0
  36. package/dist/components/Layout/LayoutScrollRegion.vue.d.ts +34 -0
  37. package/dist/components/Layout/LayoutScrollRegion.vue.d.ts.map +1 -0
  38. package/dist/components/Layout/LayoutSider.vue.d.ts +2 -2
  39. package/dist/components/Layout/LayoutSider.vue.d.ts.map +1 -1
  40. package/dist/components/Layout/composables/useLayoutScroll.d.ts +4 -1
  41. package/dist/components/Layout/composables/useLayoutScroll.d.ts.map +1 -1
  42. package/dist/components/Layout/styles.css +35 -13
  43. package/dist/components/Layout/types.d.ts +2 -0
  44. package/dist/components/Layout/types.d.ts.map +1 -1
  45. package/dist/components/Menu/Menu.vue.d.ts.map +1 -1
  46. package/dist/components/Menu/styles.css +10 -0
  47. package/dist/components/Menubar/Menubar.vue.d.ts +2 -2
  48. package/dist/components/Menubar/Menubar.vue.d.ts.map +1 -1
  49. package/dist/components/Menubar/styles.css +14 -0
  50. package/dist/components/OrderList/OrderList.vue.d.ts +4 -4
  51. package/dist/components/OrderList/OrderList.vue.d.ts.map +1 -1
  52. package/dist/components/Page/PageContent.vue.d.ts +19 -0
  53. package/dist/components/Page/PageContent.vue.d.ts.map +1 -0
  54. package/dist/components/Page/PageFilters.vue.d.ts +16 -0
  55. package/dist/components/Page/PageFilters.vue.d.ts.map +1 -0
  56. package/dist/components/Page/PageHeader.vue.d.ts +22 -0
  57. package/dist/components/Page/PageHeader.vue.d.ts.map +1 -0
  58. package/dist/components/Page/PagePlaceholder.vue.d.ts +20 -0
  59. package/dist/components/Page/PagePlaceholder.vue.d.ts.map +1 -0
  60. package/dist/components/Page/PageSection.vue.d.ts +19 -0
  61. package/dist/components/Page/PageSection.vue.d.ts.map +1 -0
  62. package/dist/components/Page/PageStat.vue.d.ts +18 -0
  63. package/dist/components/Page/PageStat.vue.d.ts.map +1 -0
  64. package/dist/components/Page/PageToolbar.vue.d.ts +20 -0
  65. package/dist/components/Page/PageToolbar.vue.d.ts.map +1 -0
  66. package/dist/components/Page/index.d.ts +9 -0
  67. package/dist/components/Page/index.d.ts.map +1 -0
  68. package/dist/components/Page/styles.css +193 -0
  69. package/dist/components/Page/types.d.ts +54 -0
  70. package/dist/components/Page/types.d.ts.map +1 -0
  71. package/dist/components/PickList/PickList.vue.d.ts +7 -7
  72. package/dist/components/PickList/PickList.vue.d.ts.map +1 -1
  73. package/dist/components/ScrollTop/ScrollTop.vue.d.ts.map +1 -1
  74. package/dist/components/Tabs/Tabs.vue.d.ts +3 -3
  75. package/dist/components/Tabs/Tabs.vue.d.ts.map +1 -1
  76. package/dist/components/Tabs/styles.css +72 -77
  77. package/dist/components/Terminal/Terminal.vue.d.ts.map +1 -1
  78. package/dist/components/Terminal/styles.css +6 -2
  79. package/dist/components/TieredMenu/TieredMenu.vue.d.ts.map +1 -1
  80. package/dist/components/TieredMenu/styles.css +33 -4
  81. package/dist/components/Timeline/Timeline.vue.d.ts +35 -10
  82. package/dist/components/Timeline/Timeline.vue.d.ts.map +1 -1
  83. package/dist/components/Timeline/styles.css +159 -156
  84. package/dist/components/TreeSelect/TreeSelect.vue.d.ts.map +1 -1
  85. package/dist/components/TreeSelect/styles.css +15 -0
  86. package/dist/components/TreeTable/TreeTable.vue.d.ts +2 -2
  87. package/dist/components/TreeTable/TreeTable.vue.d.ts.map +1 -1
  88. package/dist/components/TreeTable/styles.css +64 -61
  89. package/dist/components/VirtualScroller/VirtualScroller.vue.d.ts +2 -2
  90. package/dist/components/VirtualScroller/VirtualScroller.vue.d.ts.map +1 -1
  91. package/dist/components/VirtualScroller/styles.css +20 -17
  92. package/dist/config-provider/style.css +625 -583
  93. package/dist/confirm-dialog/style.css +625 -583
  94. package/dist/confirm-popup/style.css +625 -583
  95. package/dist/context-menu/index.js +131 -89
  96. package/dist/context-menu/style.css +781 -587
  97. package/dist/context-menu/style.js +1 -0
  98. package/dist/data-view/style.css +625 -583
  99. package/dist/date-picker/style.css +625 -583
  100. package/dist/dialog/style.css +625 -583
  101. package/dist/divider/style.css +625 -583
  102. package/dist/dock/style.css +625 -583
  103. package/dist/drawer/style.css +625 -583
  104. package/dist/dropdown/index.js +162 -122
  105. package/dist/dropdown/style.css +759 -583
  106. package/dist/dropdown/style.js +1 -0
  107. package/dist/fieldset/style.css +625 -583
  108. package/dist/file-upload/style.css +625 -583
  109. package/dist/flex/style.css +625 -583
  110. package/dist/float-label/style.css +625 -583
  111. package/dist/fluid/style.css +625 -583
  112. package/dist/form/style.css +625 -583
  113. package/dist/gallery/index.js +76 -67
  114. package/dist/gallery/style.css +753 -584
  115. package/dist/gallery/style.js +1 -0
  116. package/dist/grid/style.css +625 -583
  117. package/dist/icon/style.css +625 -583
  118. package/dist/icon-field/style.css +625 -583
  119. package/dist/index.d.ts +8 -0
  120. package/dist/index.d.ts.map +1 -1
  121. package/dist/index.js +2366 -1745
  122. package/dist/inplace/style.css +625 -583
  123. package/dist/input/style.css +625 -583
  124. package/dist/input-color/style.css +625 -583
  125. package/dist/input-group/style.css +625 -583
  126. package/dist/input-number/style.css +625 -583
  127. package/dist/input-otp/style.css +625 -583
  128. package/dist/input-password/style.css +625 -583
  129. package/dist/input-tags/style.css +625 -583
  130. package/dist/knob/style.css +625 -583
  131. package/dist/label/style.css +625 -583
  132. package/dist/layout/index.js +235 -136
  133. package/dist/layout/style.css +783 -596
  134. package/dist/layout/style.js +1 -0
  135. package/dist/listbox/style.css +625 -583
  136. package/dist/mega-menu/style.css +625 -583
  137. package/dist/menu/index.js +233 -216
  138. package/dist/menu/style.css +758 -583
  139. package/dist/menu/style.js +1 -0
  140. package/dist/menubar/index.js +77 -68
  141. package/dist/menubar/style.css +762 -583
  142. package/dist/menubar/style.js +1 -0
  143. package/dist/message/style.css +625 -583
  144. package/dist/meter-group/style.css +625 -583
  145. package/dist/order-list/index.js +66 -58
  146. package/dist/order-list/style.css +625 -583
  147. package/dist/page/index.js +176 -0
  148. package/dist/page/style.css +1199 -0
  149. package/dist/page/style.js +5 -0
  150. package/dist/pagination/style.css +625 -583
  151. package/dist/panel/style.css +625 -583
  152. package/dist/pick-list/index.js +97 -84
  153. package/dist/pick-list/style.css +625 -583
  154. package/dist/popover/style.css +625 -583
  155. package/dist/progress-bar/style.css +625 -583
  156. package/dist/progress-spinner/style.css +625 -583
  157. package/dist/radio/style.css +625 -583
  158. package/dist/rating/style.css +625 -583
  159. package/dist/resolver-map.d.ts.map +1 -1
  160. package/dist/resolver.js +7 -0
  161. package/dist/scroll-top/index.js +23 -13
  162. package/dist/scroll-top/style.css +748 -583
  163. package/dist/scroll-top/style.js +1 -0
  164. package/dist/scrollbar/style.css +625 -583
  165. package/dist/select/style.css +625 -583
  166. package/dist/select-button/style.css +625 -583
  167. package/dist/shared/FlyoutSubmenu.vue.d.ts +32 -0
  168. package/dist/shared/FlyoutSubmenu.vue.d.ts.map +1 -0
  169. package/dist/shared/ScrollBody.vue.d.ts +39 -0
  170. package/dist/shared/ScrollBody.vue.d.ts.map +1 -0
  171. package/dist/sidebar/style.css +625 -583
  172. package/dist/skeleton/style.css +625 -583
  173. package/dist/slider/style.css +625 -583
  174. package/dist/space/style.css +625 -583
  175. package/dist/speed-dial/style.css +625 -583
  176. package/dist/split-button/style.css +625 -583
  177. package/dist/splitter/style.css +625 -583
  178. package/dist/stepper/style.css +625 -583
  179. package/dist/styles/base.css +625 -583
  180. package/dist/styles.css +1 -1
  181. package/dist/switch/style.css +625 -583
  182. package/dist/table/style.css +625 -583
  183. package/dist/tabs/index.js +92 -81
  184. package/dist/tabs/style.css +818 -658
  185. package/dist/tabs/style.js +1 -0
  186. package/dist/tag/style.css +625 -583
  187. package/dist/terminal/index.js +47 -40
  188. package/dist/terminal/style.css +631 -585
  189. package/dist/textarea/style.css +625 -583
  190. package/dist/tiered-menu/index.js +130 -84
  191. package/dist/tiered-menu/style.css +781 -587
  192. package/dist/tiered-menu/style.js +1 -0
  193. package/dist/timeline/index.js +82 -37
  194. package/dist/timeline/style.css +907 -739
  195. package/dist/timeline/style.js +1 -0
  196. package/dist/toast/style.css +625 -583
  197. package/dist/toggle-button/style.css +625 -583
  198. package/dist/toolbar/style.css +625 -583
  199. package/dist/tooltip/style.css +625 -583
  200. package/dist/tree/style.css +625 -583
  201. package/dist/tree-select/index.js +202 -193
  202. package/dist/tree-select/style.css +763 -583
  203. package/dist/tree-select/style.js +1 -0
  204. package/dist/tree-table/index.js +57 -50
  205. package/dist/tree-table/style.css +689 -644
  206. package/dist/virtual-scroller/index.js +38 -34
  207. package/dist/virtual-scroller/style.css +775 -607
  208. package/dist/virtual-scroller/style.js +1 -0
  209. package/package.json +8 -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",
@@ -39,78 +114,94 @@ var w = Symbol("muLayout"), T = /* @__PURE__ */ u({
39
114
  },
40
115
  siderPlacement: { default: "left" },
41
116
  contentClass: {},
42
- contentStyle: {}
117
+ contentStyle: {},
118
+ fillViewport: {
119
+ type: Boolean,
120
+ default: !1
121
+ }
43
122
  },
44
123
  emits: ["scroll"],
45
- setup(t, { expose: r, emit: i }) {
46
- let o = t, l = x(), { rootAttrs: u } = e(l, () => o.pt), d = i;
47
- 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, {
48
127
  get hasSider() {
49
- return o.hasSider;
128
+ return a.hasSider;
50
129
  },
51
130
  get siderPlacement() {
52
- return o.siderPlacement;
131
+ return a.siderPlacement;
53
132
  }
54
133
  });
55
- let y = _(null), { scrollTo: S, onScroll: T } = C(y, d), E = a(() => ({
56
- ...o.height == null ? {} : { height: n(o.height) },
57
- width: o.width == null ? "100%" : n(o.width)
58
- })), 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(() => [
59
138
  "m-layout",
60
- `m-layout--${o.position}-positioned`,
139
+ `m-layout--${a.position}-positioned`,
61
140
  {
62
- "m-layout--embedded": o.embedded,
63
- "m-layout--has-sider": o.hasSider,
64
- "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"
65
145
  }
66
- ]), O = a(() => {
67
- if (!o.hasSider) return o.contentStyle;
68
- let e = {
69
- display: "flex",
70
- flexWrap: "nowrap",
71
- width: "100%",
72
- flexDirection: o.siderPlacement === "right" ? "row-reverse" : "row"
73
- };
74
- return [o.contentStyle, e];
75
- }), 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(() => [
76
152
  "m-layout__scroll",
77
- o.contentClass,
78
- { "m-layout__scroll--has-sider": o.hasSider }
79
- ]);
80
- return r({ scrollTo: S }), (e, t) => (h(), s("div", f(b(u), {
81
- class: D.value,
82
- style: E.value
83
- }), [c("div", {
84
- ref_key: "scrollEl",
85
- ref: y,
86
- class: p(k.value),
87
- style: m(O.value),
88
- onScroll: t[0] ||= (...e) => b(T) && b(T)(...e)
89
- }, [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));
90
181
  }
91
182
  });
92
183
  //#endregion
93
184
  //#region src/components/Layout/composables/useLayoutRegionStyle.ts
94
- function E(e, t) {
95
- return e == null ? t : n(e) ?? t;
185
+ function M(e, t) {
186
+ return e == null ? t : r(e) ?? t;
96
187
  }
97
- function D(e) {
98
- return a(() => {
99
- let t = y(e), r = {
100
- padding: E(t.padding, "var(--m-layout-padding, var(--m-space-4))"),
101
- 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)")
102
193
  };
103
- if (t.heightFallback != null) r.height = E(t.height, t.heightFallback);
194
+ if (t.heightFallback != null) n.height = M(t.height, t.heightFallback);
104
195
  else if (t.height != null) {
105
- let e = n(t.height);
106
- e && (r.height = e);
196
+ let e = r(t.height);
197
+ e && (n.height = e);
107
198
  }
108
- return r;
199
+ return n;
109
200
  });
110
201
  }
111
202
  //#endregion
112
203
  //#region src/components/Layout/LayoutContent.vue
113
- var O = /* @__PURE__ */ u({
204
+ var P = /* @__PURE__ */ f({
114
205
  name: "MLayoutContent",
115
206
  inheritAttrs: !1,
116
207
  __name: "LayoutContent",
@@ -129,28 +220,32 @@ var O = /* @__PURE__ */ u({
129
220
  },
130
221
  emits: ["scroll"],
131
222
  setup(t, { expose: n, emit: r }) {
132
- 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(() => ({
133
224
  height: i.height,
134
225
  padding: i.padding,
135
226
  radius: i.radius
136
- })), w = a(() => [
227
+ })), p = o(() => [
137
228
  "m-layout",
138
229
  "m-layout-content",
139
230
  `m-layout--${i.position}-positioned`,
140
231
  { "m-layout--embedded": i.embedded }
141
- ]), T = a(() => ["m-layout__scroll", i.contentClass]), E = a(() => i.contentStyle);
142
- return n({ scrollTo: g }), (e, t) => (h(), s("main", f(b(l), {
143
- class: w.value,
144
- style: b(S)
145
- }), [c("div", {
146
- ref_key: "scrollEl",
147
- ref: d,
148
- class: p(T.value),
149
- style: m(E.value),
150
- onScroll: t[0] ||= (...e) => b(y) && b(y)(...e)
151
- }, [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));
152
247
  }
153
- }), k = /* @__PURE__ */ u({
248
+ }), F = /* @__PURE__ */ f({
154
249
  name: "MLayoutFooter",
155
250
  inheritAttrs: !1,
156
251
  __name: "LayoutFooter",
@@ -170,12 +265,12 @@ var O = /* @__PURE__ */ u({
170
265
  position: { default: "static" }
171
266
  },
172
267
  setup(t) {
173
- 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(() => ({
174
269
  height: n.height,
175
270
  heightFallback: "var(--m-layout-footer-height, 48px)",
176
271
  padding: n.padding,
177
272
  radius: n.radius
178
- })), c = a(() => [
273
+ })), s = o(() => [
179
274
  "m-layout-footer",
180
275
  `m-layout-footer--${n.position}-positioned`,
181
276
  {
@@ -183,12 +278,12 @@ var O = /* @__PURE__ */ u({
183
278
  "m-layout-footer--inverted": n.inverted
184
279
  }
185
280
  ]);
186
- return (e, t) => (h(), s("footer", f(b(i), {
187
- class: c.value,
188
- style: b(o)
189
- }), [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));
190
285
  }
191
- }), A = /* @__PURE__ */ u({
286
+ }), I = /* @__PURE__ */ f({
192
287
  name: "MLayoutHeader",
193
288
  inheritAttrs: !1,
194
289
  __name: "LayoutHeader",
@@ -208,12 +303,12 @@ var O = /* @__PURE__ */ u({
208
303
  position: { default: "static" }
209
304
  },
210
305
  setup(t) {
211
- 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(() => ({
212
307
  height: n.height,
213
308
  heightFallback: "var(--m-layout-header-height, 56px)",
214
309
  padding: n.padding,
215
310
  radius: n.radius
216
- })), c = a(() => [
311
+ })), s = o(() => [
217
312
  "m-layout-header",
218
313
  `m-layout-header--${n.position}-positioned`,
219
314
  {
@@ -221,20 +316,20 @@ var O = /* @__PURE__ */ u({
221
316
  "m-layout-header--inverted": n.inverted
222
317
  }
223
318
  ]);
224
- return (e, t) => (h(), s("header", f(b(i), {
225
- class: c.value,
226
- style: b(o)
227
- }), [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));
228
323
  }
229
324
  });
230
325
  //#endregion
231
326
  //#region src/components/Layout/composables/useLayoutSiderCollapse.ts
232
- function j(e, t) {
233
- let n = _(e.defaultCollapsed);
234
- S(() => e.collapsed, (e) => {
327
+ function L(e, t) {
328
+ let n = y(e.defaultCollapsed);
329
+ w(() => e.collapsed, (e) => {
235
330
  e !== void 0 && (n.value = e);
236
331
  });
237
- let r = a(() => e.collapsed === void 0 ? n.value : !!e.collapsed);
332
+ let r = o(() => e.collapsed === void 0 ? n.value : !!e.collapsed);
238
333
  function i() {
239
334
  let e = !r.value;
240
335
  n.value = e, t("update:collapsed", e), t(e ? "collapse" : "expand");
@@ -247,24 +342,24 @@ function j(e, t) {
247
342
  }
248
343
  //#endregion
249
344
  //#region src/components/Layout/utils.ts
250
- function M(e) {
345
+ function R(e) {
251
346
  return e ? e === "bar" || e === !0 ? "bar" : "arrow-circle" : null;
252
347
  }
253
348
  //#endregion
254
349
  //#region src/components/Layout/LayoutSider.vue?vue&type=script&setup=true&lang.ts
255
- var N = ["aria-expanded", "aria-label"], P = {
350
+ var z = ["aria-expanded", "aria-label"], B = {
256
351
  key: 0,
257
352
  class: "m-layout-sider__arrow",
258
353
  "aria-hidden": "true"
259
- }, F = {
354
+ }, V = {
260
355
  key: 1,
261
356
  class: "m-layout-sider__bar",
262
357
  "aria-hidden": "true"
263
- }, I = {
358
+ }, H = {
264
359
  key: 1,
265
360
  class: "m-layout-sider__border",
266
361
  "aria-hidden": "true"
267
- }, L = /* @__PURE__ */ u({
362
+ }, U = /* @__PURE__ */ f({
268
363
  name: "MLayoutSider",
269
364
  inheritAttrs: !1,
270
365
  __name: "LayoutSider",
@@ -312,63 +407,67 @@ var N = ["aria-expanded", "aria-label"], P = {
312
407
  "after-leave",
313
408
  "scroll"
314
409
  ],
315
- setup(u, { expose: g, emit: y }) {
316
- 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(() => [
317
412
  "m-layout-sider",
318
- `m-layout-sider--${S.position}-positioned`,
319
- `m-layout-sider--${V.value}-placement`,
320
- `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}`,
321
416
  {
322
- "m-layout-sider--bordered": S.bordered,
323
- "m-layout-sider--inverted": S.inverted,
324
- "m-layout-sider--collapsed": z.value,
325
- "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
326
421
  }
327
- ]), X = a(() => {
328
- let e = S.collapseMode === "width", t = {
422
+ ]), Y = o(() => {
423
+ let e = v.collapseMode === "width", t = {
329
424
  minWidth: "0",
330
- borderRadius: S.radius == null ? "var(--m-layout-radius, 0)" : n(S.radius),
331
- width: e ? K.value : W.value,
332
- 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
333
428
  };
334
- 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;
335
- }), Z = a(() => S.padding == null ? "var(--m-layout-padding, var(--m-space-4))" : n(S.padding)), Q = a(() => {
336
- let e = { padding: Z.value };
337
- return S.contentStyle == null ? e : [e, S.contentStyle];
338
- }), $ = a(() => ["m-layout-sider__scroll", S.contentClass]), ee = a(() => z.value ? S.collapsedTriggerClass : S.triggerClass), te = a(() => z.value ? S.collapsedTriggerStyle : S.triggerStyle);
339
- function ne(e) {
340
- 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"));
341
436
  }
342
- return g({ scrollTo: L }), (e, n) => (h(), s("aside", f(b(E), {
343
- class: Y.value,
344
- style: X.value,
345
- 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
346
441
  }), [
347
- c("div", {
348
- ref_key: "scrollEl",
349
- ref: A,
350
- class: p($.value),
351
- style: m(Q.value),
352
- onScroll: n[0] ||= (...e) => b(R) && b(R)(...e)
353
- }, [v(e.$slots, "default")], 38),
354
- 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", {
355
454
  key: 0,
356
455
  type: "button",
357
- class: p(["m-layout-sider__trigger", [ee.value, {
358
- "m-layout-sider__trigger--bar": q.value === "bar",
359
- "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"
360
459
  }]]),
361
- style: m(te.value),
362
- "aria-expanded": !b(z),
363
- "aria-label": b(z) ? b(O).expand : b(O).collapse,
364
- onClick: n[1] ||= (...e) => b(B) && b(B)(...e)
365
- }, [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, {
366
465
  name: "chevron-right",
367
466
  size: "sm"
368
- })])) : (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),
369
- 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)
370
469
  ], 16));
371
470
  }
372
471
  });
373
472
  //#endregion
374
- 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 };