@well-insight/ui 0.1.10 → 0.1.11

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 (320) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/{Button-B6-YxpOQ.js → Button-tnrMSwNg.js} +3 -7
  3. package/dist/{Checkbox-BvlOYFGs.js → Checkbox-CoovLjt_.js} +1 -1
  4. package/dist/{Icon-B6gOD07E.js → Icon-DHGs8l-M.js} +27 -1
  5. package/dist/Pagination-UvgyUKB1.js +155 -0
  6. package/dist/{ProgressSpinner-YThgaSzb.js → ProgressSpinner-BTijCc7l.js} +1 -1
  7. package/dist/accordion/style.css +4 -5
  8. package/dist/auto-complete/index.js +106 -99
  9. package/dist/auto-complete/style.css +4 -5
  10. package/dist/avatar/index.js +1 -1
  11. package/dist/avatar/style.css +4 -5
  12. package/dist/badge/style.css +4 -5
  13. package/dist/block-ui/style.css +4 -5
  14. package/dist/breadcrumb/index.js +1 -1
  15. package/dist/breadcrumb/style.css +4 -5
  16. package/dist/button/index.js +1 -1
  17. package/dist/button/style.css +4 -5
  18. package/dist/card/style.css +4 -5
  19. package/dist/carousel/index.js +61 -54
  20. package/dist/carousel/style.css +43 -5
  21. package/dist/carousel/style.js +1 -0
  22. package/dist/cascade-select/index.js +143 -76
  23. package/dist/cascade-select/style.css +76 -10
  24. package/dist/cascade-select/style.js +1 -0
  25. package/dist/checkbox/index.js +1 -1
  26. package/dist/checkbox/style.css +4 -5
  27. package/dist/chip/index.js +32 -29
  28. package/dist/chip/style.css +4 -5
  29. package/dist/command-menu/index.js +2 -2
  30. package/dist/command-menu/style.css +4 -5
  31. package/dist/components/AutoComplete/AutoComplete.vue.d.ts +2 -0
  32. package/dist/components/AutoComplete/AutoComplete.vue.d.ts.map +1 -1
  33. package/dist/components/AutoComplete/types.d.ts +1 -0
  34. package/dist/components/AutoComplete/types.d.ts.map +1 -1
  35. package/dist/components/Button/Button.vue.d.ts +0 -1
  36. package/dist/components/Button/Button.vue.d.ts.map +1 -1
  37. package/dist/components/Button/types.d.ts +0 -2
  38. package/dist/components/Button/types.d.ts.map +1 -1
  39. package/dist/components/Carousel/Carousel.vue.d.ts +2 -2
  40. package/dist/components/Carousel/Carousel.vue.d.ts.map +1 -1
  41. package/dist/components/CascadeSelect/CascadeSelect.vue.d.ts +6 -0
  42. package/dist/components/CascadeSelect/CascadeSelect.vue.d.ts.map +1 -1
  43. package/dist/components/CascadeSelect/styles.css +33 -5
  44. package/dist/components/CascadeSelect/types.d.ts +11 -0
  45. package/dist/components/CascadeSelect/types.d.ts.map +1 -1
  46. package/dist/components/Chip/Chip.vue.d.ts.map +1 -1
  47. package/dist/components/ConfirmPopup/ConfirmPopup.vue.d.ts.map +1 -1
  48. package/dist/components/ContextMenu/ContextMenuNodes.vue.d.ts.map +1 -1
  49. package/dist/components/DatePicker/DatePicker.vue.d.ts +2 -0
  50. package/dist/components/DatePicker/DatePicker.vue.d.ts.map +1 -1
  51. package/dist/components/DatePicker/styles.css +33 -8
  52. package/dist/components/DatePicker/types.d.ts +1 -0
  53. package/dist/components/DatePicker/types.d.ts.map +1 -1
  54. package/dist/components/Dialog/Dialog.vue.d.ts +3 -3
  55. package/dist/components/Dialog/Dialog.vue.d.ts.map +1 -1
  56. package/dist/components/Divider/types.d.ts +0 -5
  57. package/dist/components/Divider/types.d.ts.map +1 -1
  58. package/dist/components/Drawer/Drawer.vue.d.ts +2 -2
  59. package/dist/components/Drawer/Drawer.vue.d.ts.map +1 -1
  60. package/dist/components/Dropdown/DropdownNodes.vue.d.ts +2 -2
  61. package/dist/components/Dropdown/DropdownNodes.vue.d.ts.map +1 -1
  62. package/dist/components/Fieldset/Fieldset.vue.d.ts +4 -4
  63. package/dist/components/Fieldset/Fieldset.vue.d.ts.map +1 -1
  64. package/dist/components/FileUpload/styles.css +2 -2
  65. package/dist/components/FloatLabel/FloatLabel.vue.d.ts.map +1 -1
  66. package/dist/components/Gallery/Gallery.vue.d.ts.map +1 -1
  67. package/dist/components/Icon/icons.d.ts +32 -0
  68. package/dist/components/Icon/icons.d.ts.map +1 -1
  69. package/dist/components/Input/Input.vue.d.ts +0 -1
  70. package/dist/components/Input/Input.vue.d.ts.map +1 -1
  71. package/dist/components/Input/styles.css +3 -5
  72. package/dist/components/Input/types.d.ts +1 -3
  73. package/dist/components/Input/types.d.ts.map +1 -1
  74. package/dist/components/InputNumber/InputNumber.vue.d.ts.map +1 -1
  75. package/dist/components/InputOtp/InputOtp.vue.d.ts.map +1 -1
  76. package/dist/components/InputPassword/InputPassword.vue.d.ts +4 -4
  77. package/dist/components/InputPassword/InputPassword.vue.d.ts.map +1 -1
  78. package/dist/components/InputTags/InputTags.vue.d.ts.map +1 -1
  79. package/dist/components/Layout/Layout.vue.d.ts +1 -4
  80. package/dist/components/Layout/Layout.vue.d.ts.map +1 -1
  81. package/dist/components/Layout/LayoutContent.vue.d.ts +1 -4
  82. package/dist/components/Layout/LayoutContent.vue.d.ts.map +1 -1
  83. package/dist/components/Layout/LayoutFooter.vue.d.ts.map +1 -1
  84. package/dist/components/Layout/LayoutHeader.vue.d.ts.map +1 -1
  85. package/dist/components/Layout/LayoutSider.vue.d.ts +1 -4
  86. package/dist/components/Layout/LayoutSider.vue.d.ts.map +1 -1
  87. package/dist/components/Layout/composables/useLayoutRegionStyle.d.ts +9 -0
  88. package/dist/components/Layout/composables/useLayoutRegionStyle.d.ts.map +1 -0
  89. package/dist/components/Layout/composables/useLayoutScroll.d.ts +6 -0
  90. package/dist/components/Layout/composables/useLayoutScroll.d.ts.map +1 -0
  91. package/dist/components/Layout/composables/useLayoutSiderCollapse.d.ts +16 -0
  92. package/dist/components/Layout/composables/useLayoutSiderCollapse.d.ts.map +1 -0
  93. package/dist/components/Layout/styles.css +19 -49
  94. package/dist/components/Layout/types.d.ts +0 -22
  95. package/dist/components/Layout/types.d.ts.map +1 -1
  96. package/dist/components/Layout/utils.d.ts +3 -0
  97. package/dist/components/Layout/utils.d.ts.map +1 -0
  98. package/dist/components/MegaMenu/MegaMenu.vue.d.ts.map +1 -1
  99. package/dist/components/Menu/MenuNodes.vue.d.ts.map +1 -1
  100. package/dist/components/Menubar/Menubar.vue.d.ts.map +1 -1
  101. package/dist/components/Pagination/Pagination.vue.d.ts.map +1 -1
  102. package/dist/components/Panel/Panel.vue.d.ts +3 -3
  103. package/dist/components/Panel/Panel.vue.d.ts.map +1 -1
  104. package/dist/components/Popover/Popover.vue.d.ts.map +1 -1
  105. package/dist/components/Popover/styles.css +41 -0
  106. package/dist/components/Rating/Rating.vue.d.ts.map +1 -1
  107. package/dist/components/Rating/styles.css +28 -23
  108. package/dist/components/ScrollTop/ScrollTop.vue.d.ts.map +1 -1
  109. package/dist/components/Select/Select.vue.d.ts +1 -1
  110. package/dist/components/Select/Select.vue.d.ts.map +1 -1
  111. package/dist/components/Select/styles.css +8 -108
  112. package/dist/components/Select/types.d.ts +3 -3
  113. package/dist/components/Select/types.d.ts.map +1 -1
  114. package/dist/components/Slider/Slider.vue.d.ts.map +1 -1
  115. package/dist/components/Slider/types.d.ts +2 -0
  116. package/dist/components/Slider/types.d.ts.map +1 -1
  117. package/dist/components/SpeedDial/SpeedDial.vue.d.ts.map +1 -1
  118. package/dist/components/SplitButton/SplitButton.vue.d.ts.map +1 -1
  119. package/dist/components/Table/Table.vue.d.ts +9 -9
  120. package/dist/components/Table/Table.vue.d.ts.map +1 -1
  121. package/dist/components/Tabs/Tabs.vue.d.ts +3 -3
  122. package/dist/components/Tabs/Tabs.vue.d.ts.map +1 -1
  123. package/dist/components/Tag/Tag.vue.d.ts.map +1 -1
  124. package/dist/components/Terminal/styles.css +8 -8
  125. package/dist/components/Textarea/Textarea.vue.d.ts +0 -2
  126. package/dist/components/Textarea/Textarea.vue.d.ts.map +1 -1
  127. package/dist/components/Textarea/styles.css +1 -2
  128. package/dist/components/Textarea/types.d.ts +1 -5
  129. package/dist/components/Textarea/types.d.ts.map +1 -1
  130. package/dist/components/TieredMenu/TieredMenu.vue.d.ts.map +1 -1
  131. package/dist/components/Toast/Toast.vue.d.ts.map +1 -1
  132. package/dist/components/Tooltip/Tooltip.vue.d.ts.map +1 -1
  133. package/dist/components/TreeSelect/TreeSelect.vue.d.ts.map +1 -1
  134. package/dist/components/TreeSelect/TreeSelectNodeItem.vue.d.ts.map +1 -1
  135. package/dist/components/TreeSelect/styles.css +21 -12
  136. package/dist/components/TreeTable/TreeTableRow.vue.d.ts.map +1 -1
  137. package/dist/{config-DWwce9jA.js → config-CTLkobga.js} +1 -0
  138. package/dist/config-provider/index.js +1 -1
  139. package/dist/config-provider/style.css +7 -10
  140. package/dist/confirm-dialog/index.js +4 -4
  141. package/dist/confirm-dialog/style.css +4 -5
  142. package/dist/confirm-popup/index.js +62 -77
  143. package/dist/confirm-popup/style.css +4 -5
  144. package/dist/context-menu/index.js +69 -61
  145. package/dist/context-menu/style.css +4 -5
  146. package/dist/data-view/index.js +1 -1
  147. package/dist/data-view/style.css +4 -5
  148. package/dist/date-picker/index.js +144 -137
  149. package/dist/date-picker/style.css +76 -13
  150. package/dist/date-picker/style.js +1 -0
  151. package/dist/dialog/index.js +76 -70
  152. package/dist/dialog/style.css +4 -5
  153. package/dist/divider/index.js +1 -2
  154. package/dist/divider/style.css +4 -5
  155. package/dist/dock/style.css +4 -5
  156. package/dist/drawer/index.js +49 -45
  157. package/dist/drawer/style.css +43 -5
  158. package/dist/drawer/style.js +1 -0
  159. package/dist/dropdown/index.js +98 -97
  160. package/dist/dropdown/style.css +4 -5
  161. package/dist/fieldset/index.js +16 -12
  162. package/dist/fieldset/style.css +43 -5
  163. package/dist/fieldset/style.js +1 -0
  164. package/dist/file-upload/index.js +2 -2
  165. package/dist/file-upload/style.css +6 -7
  166. package/dist/flex/index.js +1 -1
  167. package/dist/flex/style.css +4 -5
  168. package/dist/float-label/index.js +15 -4
  169. package/dist/float-label/style.css +4 -5
  170. package/dist/fluid/style.css +4 -5
  171. package/dist/form/index.js +1 -1
  172. package/dist/form/style.css +4 -5
  173. package/dist/gallery/index.js +41 -34
  174. package/dist/gallery/style.css +43 -5
  175. package/dist/gallery/style.js +1 -0
  176. package/dist/grid/style.css +4 -5
  177. package/dist/icon/index.js +1 -1
  178. package/dist/icon/style.css +4 -5
  179. package/dist/icon-Cg5TeFqe.js +7 -0
  180. package/dist/icon-field/style.css +4 -5
  181. package/dist/index.js +2783 -2643
  182. package/dist/inplace/style.css +4 -5
  183. package/dist/input/index.js +65 -66
  184. package/dist/input/style.css +46 -10
  185. package/dist/input/style.js +1 -0
  186. package/dist/input-color/index.js +1 -1
  187. package/dist/input-color/style.css +4 -5
  188. package/dist/input-group/style.css +4 -5
  189. package/dist/input-number/index.js +82 -66
  190. package/dist/input-number/style.css +43 -5
  191. package/dist/input-number/style.js +1 -0
  192. package/dist/input-otp/index.js +3 -3
  193. package/dist/input-otp/style.css +4 -5
  194. package/dist/input-password/index.js +46 -43
  195. package/dist/input-password/style.css +4 -5
  196. package/dist/input-tags/index.js +50 -46
  197. package/dist/input-tags/style.css +43 -5
  198. package/dist/input-tags/style.js +1 -0
  199. package/dist/key-CaQYVkjh.js +6 -0
  200. package/dist/knob/style.css +4 -5
  201. package/dist/label/style.css +4 -5
  202. package/dist/layout/index.js +196 -271
  203. package/dist/layout/style.css +48 -140
  204. package/dist/layout/style.js +1 -1
  205. package/dist/listbox/index.js +1 -1
  206. package/dist/listbox/style.css +4 -5
  207. package/dist/locale/en-US.d.ts.map +1 -1
  208. package/dist/locale/types.d.ts +1 -0
  209. package/dist/locale/types.d.ts.map +1 -1
  210. package/dist/locale/zh-CN.d.ts.map +1 -1
  211. package/dist/{locale-CYkJyRd1.js → locale-DxAvgqgB.js} +1 -1
  212. package/dist/mega-menu/index.js +47 -49
  213. package/dist/mega-menu/style.css +4 -5
  214. package/dist/menu/index.js +81 -76
  215. package/dist/menu/style.css +4 -5
  216. package/dist/menubar/index.js +75 -73
  217. package/dist/menubar/style.css +4 -5
  218. package/dist/message/index.js +3 -3
  219. package/dist/message/style.css +4 -5
  220. package/dist/meter-group/style.css +4 -5
  221. package/dist/order-list/index.js +2 -2
  222. package/dist/order-list/style.css +4 -5
  223. package/dist/overlayPlacement-CN1tuC95.js +51 -0
  224. package/dist/pagination/index.js +1 -1
  225. package/dist/pagination/style.css +43 -5
  226. package/dist/pagination/style.js +1 -0
  227. package/dist/panel/index.js +27 -23
  228. package/dist/panel/style.css +43 -5
  229. package/dist/panel/style.js +1 -0
  230. package/dist/pick-list/index.js +2 -2
  231. package/dist/pick-list/style.css +4 -5
  232. package/dist/popover/index.js +79 -100
  233. package/dist/popover/style.css +45 -5
  234. package/dist/progress-bar/style.css +4 -5
  235. package/dist/progress-spinner/index.js +1 -1
  236. package/dist/progress-spinner/style.css +4 -5
  237. package/dist/radio/index.js +1 -1
  238. package/dist/radio/style.css +4 -5
  239. package/dist/rating/index.js +54 -44
  240. package/dist/rating/style.css +71 -28
  241. package/dist/rating/style.js +1 -0
  242. package/dist/scroll-top/index.js +45 -41
  243. package/dist/scroll-top/style.css +43 -5
  244. package/dist/scroll-top/style.js +1 -0
  245. package/dist/scrollbar/index.js +382 -2
  246. package/dist/scrollbar/style.css +4 -5
  247. package/dist/select/index.js +149 -141
  248. package/dist/select/style.css +51 -113
  249. package/dist/select/style.js +1 -0
  250. package/dist/select-button/index.js +1 -1
  251. package/dist/select-button/style.css +4 -5
  252. package/dist/shared/componentDefaults.d.ts +5 -1
  253. package/dist/shared/componentDefaults.d.ts.map +1 -1
  254. package/dist/shared/menu/icon.d.ts +4 -0
  255. package/dist/shared/menu/icon.d.ts.map +1 -0
  256. package/dist/shared/menu/index.d.ts +4 -0
  257. package/dist/shared/menu/index.d.ts.map +1 -0
  258. package/dist/shared/menu/key.d.ts +4 -0
  259. package/dist/shared/menu/key.d.ts.map +1 -0
  260. package/dist/shared/menu/types.d.ts +11 -0
  261. package/dist/shared/menu/types.d.ts.map +1 -0
  262. package/dist/shared/overlayPlacement.d.ts +12 -0
  263. package/dist/shared/overlayPlacement.d.ts.map +1 -0
  264. package/dist/sidebar/index.js +1 -1
  265. package/dist/sidebar/style.css +4 -5
  266. package/dist/skeleton/style.css +4 -5
  267. package/dist/slider/index.js +6 -3
  268. package/dist/slider/style.css +4 -5
  269. package/dist/space/index.js +1 -1
  270. package/dist/space/style.css +4 -5
  271. package/dist/speed-dial/index.js +55 -66
  272. package/dist/speed-dial/style.css +43 -5
  273. package/dist/speed-dial/style.js +1 -0
  274. package/dist/split-button/index.js +66 -63
  275. package/dist/split-button/style.css +43 -5
  276. package/dist/split-button/style.js +1 -0
  277. package/dist/splitter/index.js +1 -1
  278. package/dist/splitter/style.css +4 -5
  279. package/dist/stepper/style.css +4 -5
  280. package/dist/styles/base.css +4 -5
  281. package/dist/styles.css +1 -1
  282. package/dist/switch/index.js +1 -1
  283. package/dist/switch/style.css +4 -5
  284. package/dist/table/index.js +41 -35
  285. package/dist/table/style.css +4 -5
  286. package/dist/tabs/index.js +78 -65
  287. package/dist/tabs/style.css +43 -5
  288. package/dist/tabs/style.js +1 -0
  289. package/dist/tag/index.js +31 -28
  290. package/dist/tag/style.css +4 -5
  291. package/dist/terminal/index.js +1 -1
  292. package/dist/terminal/style.css +12 -13
  293. package/dist/textarea/index.js +69 -75
  294. package/dist/textarea/style.css +44 -7
  295. package/dist/textarea/style.js +1 -0
  296. package/dist/tiered-menu/index.js +66 -59
  297. package/dist/tiered-menu/style.css +43 -5
  298. package/dist/tiered-menu/style.js +1 -0
  299. package/dist/timeline/index.js +1 -1
  300. package/dist/timeline/style.css +4 -5
  301. package/dist/toast/index.js +93 -89
  302. package/dist/toast/style.css +43 -5
  303. package/dist/toast/style.js +1 -0
  304. package/dist/toggle-button/index.js +1 -1
  305. package/dist/toggle-button/style.css +4 -5
  306. package/dist/toolbar/style.css +4 -5
  307. package/dist/tooltip/index.js +47 -71
  308. package/dist/tooltip/style.css +4 -5
  309. package/dist/tree/index.js +3 -3
  310. package/dist/tree/style.css +4 -5
  311. package/dist/tree-select/index.js +164 -155
  312. package/dist/tree-select/style.css +64 -17
  313. package/dist/tree-select/style.js +1 -0
  314. package/dist/tree-table/index.js +34 -30
  315. package/dist/tree-table/style.css +43 -5
  316. package/dist/tree-table/style.js +1 -0
  317. package/dist/virtual-scroller/style.css +4 -5
  318. package/package.json +4 -1
  319. package/dist/Pagination-BU-1IY0E.js +0 -148
  320. package/dist/Scrollbar-D-bR2noX.js +0 -382
@@ -1,8 +1,23 @@
1
- import { n as e } from "../responsive-BLgfEhDG.js";
2
- import { t } from "../Scrollbar-D-bR2noX.js";
3
- import { n } from "../locale-CYkJyRd1.js";
1
+ import { t as e } from "../Icon-DHGs8l-M.js";
2
+ import { n as t } from "../responsive-BLgfEhDG.js";
3
+ import { n } from "../locale-DxAvgqgB.js";
4
4
  import "./style.js";
5
- import { computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, defineComponent as c, inject as l, mergeProps as u, normalizeClass as d, normalizeStyle as f, openBlock as p, provide as m, ref as h, renderSlot as g, unref as _, useTemplateRef as v, watch as y, withCtx as b } from "vue";
5
+ import { computed as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createVNode as s, defineComponent as c, inject as l, normalizeClass as u, normalizeStyle as d, openBlock as f, provide as p, ref as m, renderSlot as h, toValue as g, unref as _, useTemplateRef as v, watch as y } from "vue";
6
+ //#region src/components/Layout/composables/useLayoutScroll.ts
7
+ function b(e, t) {
8
+ function n(t, n) {
9
+ let r = e.value;
10
+ r && (typeof t == "number" ? r.scrollTo(t, n ?? 0) : r.scrollTo(t));
11
+ }
12
+ function r(e) {
13
+ t("scroll", e);
14
+ }
15
+ return {
16
+ scrollTo: n,
17
+ onScroll: r
18
+ };
19
+ }
20
+ //#endregion
6
21
  //#region src/components/Layout/context.ts
7
22
  var x = Symbol("wiLayout"), S = /* @__PURE__ */ c({
8
23
  name: "WiLayout",
@@ -20,102 +35,79 @@ var x = Symbol("wiLayout"), S = /* @__PURE__ */ c({
20
35
  default: !1
21
36
  },
22
37
  siderPlacement: { default: "left" },
23
- nativeScrollbar: {
24
- type: Boolean,
25
- default: !0
26
- },
27
- scrollbarProps: {},
28
38
  contentClass: {},
29
39
  contentStyle: {}
30
40
  },
31
41
  emits: ["scroll"],
32
- setup(n, { expose: a, emit: s }) {
33
- let c = n, l = s;
34
- m(x, {
42
+ setup(e, { expose: n, emit: i }) {
43
+ let s = e, c = i;
44
+ p(x, {
35
45
  get hasSider() {
36
- return c.hasSider;
46
+ return s.hasSider;
37
47
  },
38
48
  get siderPlacement() {
39
- return c.siderPlacement;
49
+ return s.siderPlacement;
40
50
  }
41
51
  });
42
- let h = v("scrollEl"), _ = v("scrollbarRef"), y = r(() => ({
43
- height: c.height == null ? "var(--wi-layout-height, 100%)" : e(c.height),
44
- width: c.width == null ? "100%" : e(c.width)
52
+ let l = v("scrollEl"), { scrollTo: m, onScroll: g } = b(l, c), y = r(() => ({
53
+ height: s.height == null ? "var(--wi-layout-height, 100%)" : t(s.height),
54
+ width: s.width == null ? "100%" : t(s.width)
45
55
  })), S = r(() => [
46
56
  "wi-layout",
47
- `wi-layout--${c.position}-positioned`,
57
+ `wi-layout--${s.position}-positioned`,
48
58
  {
49
- "wi-layout--embedded": c.embedded,
50
- "wi-layout--has-sider": c.hasSider,
51
- "wi-layout--sider-right": c.hasSider && c.siderPlacement === "right",
52
- "wi-layout--custom-scrollbar": !c.nativeScrollbar
59
+ "wi-layout--embedded": s.embedded,
60
+ "wi-layout--has-sider": s.hasSider,
61
+ "wi-layout--sider-right": s.hasSider && s.siderPlacement === "right"
53
62
  }
54
63
  ]), C = r(() => {
55
- if (!c.hasSider) return c.contentStyle;
64
+ if (!s.hasSider) return s.contentStyle;
56
65
  let e = {
57
66
  display: "flex",
58
67
  flexWrap: "nowrap",
59
68
  width: "100%",
60
- flexDirection: c.siderPlacement === "right" ? "row-reverse" : "row"
69
+ flexDirection: s.siderPlacement === "right" ? "row-reverse" : "row"
61
70
  };
62
- return [c.contentStyle, e];
71
+ return [s.contentStyle, e];
63
72
  }), w = r(() => [
64
73
  "wi-layout__scroll",
65
- c.contentClass,
66
- { "wi-layout__scroll--has-sider": c.hasSider }
67
- ]), T = r(() => {
68
- let e = c.scrollbarProps?.viewClass, t = w.value.filter(Boolean);
69
- return e == null || e === "" ? t : Array.isArray(e) ? [...t, ...e] : [...t, e];
70
- }), E = r(() => {
71
- let e = c.scrollbarProps?.viewStyle;
72
- return e == null || e === "" ? C.value : [C.value, e];
73
- });
74
- function D(e, t) {
75
- if (c.nativeScrollbar) {
76
- let n = h.value;
77
- if (!n) return;
78
- typeof e == "number" ? n.scrollTo(e, t ?? 0) : n.scrollTo(e);
79
- return;
80
- }
81
- let n = _.value;
82
- n && (typeof e == "number" ? n.scrollTo(e, t ?? 0) : n.scrollTo(e));
83
- }
84
- function O(e) {
85
- l("scroll", e);
86
- }
87
- function k() {
88
- let e = _.value?.wrapRef;
89
- if (!e) return;
90
- let t = new Event("scroll");
91
- Object.defineProperty(t, "target", { value: e }), Object.defineProperty(t, "currentTarget", { value: e }), l("scroll", t);
92
- }
93
- return a({ scrollTo: D }), (e, r) => (p(), o("div", {
94
- class: d(S.value),
95
- style: f(y.value)
96
- }, [n.nativeScrollbar ? (p(), o("div", {
97
- key: 0,
74
+ s.contentClass,
75
+ { "wi-layout__scroll--has-sider": s.hasSider }
76
+ ]);
77
+ return n({ scrollTo: m }), (e, t) => (f(), a("div", {
78
+ class: u(S.value),
79
+ style: d(y.value)
80
+ }, [o("div", {
98
81
  ref_key: "scrollEl",
99
- ref: h,
100
- class: d(w.value),
101
- style: f(C.value),
102
- onScroll: O
103
- }, [g(e.$slots, "default")], 38)) : (p(), i(t, u({
104
- key: 1,
105
- ref_key: "scrollbarRef",
106
- ref: _,
107
- class: "wi-layout__scrollbar",
108
- height: "100%"
109
- }, n.scrollbarProps, {
110
- "view-class": T.value,
111
- "view-style": E.value,
112
- onScroll: k
113
- }), {
114
- default: b(() => [g(e.$slots, "default")]),
115
- _: 3
116
- }, 16, ["view-class", "view-style"]))], 6));
82
+ ref: l,
83
+ class: u(w.value),
84
+ style: d(C.value),
85
+ onScroll: t[0] ||= (...e) => _(g) && _(g)(...e)
86
+ }, [h(e.$slots, "default")], 38)], 6));
117
87
  }
118
- }), C = /* @__PURE__ */ c({
88
+ });
89
+ //#endregion
90
+ //#region src/components/Layout/composables/useLayoutRegionStyle.ts
91
+ function C(e, n) {
92
+ return e == null ? n : t(e) ?? n;
93
+ }
94
+ function w(e) {
95
+ return r(() => {
96
+ let n = g(e), r = {
97
+ padding: C(n.padding, "var(--wi-layout-padding, var(--wi-space-4))"),
98
+ borderRadius: C(n.radius, "var(--wi-layout-radius, 0)")
99
+ };
100
+ if (n.heightFallback != null) r.height = C(n.height, n.heightFallback);
101
+ else if (n.height != null) {
102
+ let e = t(n.height);
103
+ e && (r.height = e);
104
+ }
105
+ return r;
106
+ });
107
+ }
108
+ //#endregion
109
+ //#region src/components/Layout/LayoutContent.vue
110
+ var T = /* @__PURE__ */ c({
119
111
  name: "WiLayoutContent",
120
112
  __name: "LayoutContent",
121
113
  props: {
@@ -127,80 +119,33 @@ var x = Symbol("wiLayout"), S = /* @__PURE__ */ c({
127
119
  default: !1
128
120
  },
129
121
  position: { default: "static" },
130
- nativeScrollbar: {
131
- type: Boolean,
132
- default: !0
133
- },
134
- scrollbarProps: {},
135
122
  contentClass: {},
136
123
  contentStyle: {}
137
124
  },
138
125
  emits: ["scroll"],
139
- setup(n, { expose: a, emit: s }) {
140
- let c = n, l = s, m = v("scrollEl"), h = v("scrollbarRef"), _ = r(() => ({
141
- ...c.height == null ? {} : { height: e(c.height) },
142
- padding: c.padding == null ? "var(--wi-layout-padding, var(--wi-space-4))" : e(c.padding),
143
- borderRadius: c.radius == null ? "var(--wi-layout-radius, 0)" : e(c.radius)
144
- })), y = r(() => [
126
+ setup(e, { expose: t, emit: n }) {
127
+ let i = e, s = n, c = v("scrollEl"), { scrollTo: l, onScroll: p } = b(c, s), m = w(() => ({
128
+ height: i.height,
129
+ padding: i.padding,
130
+ radius: i.radius
131
+ })), g = r(() => [
145
132
  "wi-layout",
146
133
  "wi-layout-content",
147
- `wi-layout--${c.position}-positioned`,
148
- {
149
- "wi-layout--embedded": c.embedded,
150
- "wi-layout--custom-scrollbar": !c.nativeScrollbar
151
- }
152
- ]), x = r(() => ["wi-layout__scroll", c.contentClass]), S = r(() => c.contentStyle), C = r(() => {
153
- let e = c.scrollbarProps?.viewClass, t = x.value.filter(Boolean);
154
- return e == null || e === "" ? t : Array.isArray(e) ? [...t, ...e] : [...t, e];
155
- }), w = r(() => {
156
- let e = c.scrollbarProps?.viewStyle;
157
- return e == null || e === "" ? S.value : [S.value, e];
158
- });
159
- function T(e, t) {
160
- if (c.nativeScrollbar) {
161
- let n = m.value;
162
- if (!n) return;
163
- typeof e == "number" ? n.scrollTo(e, t ?? 0) : n.scrollTo(e);
164
- return;
165
- }
166
- let n = h.value;
167
- n && (typeof e == "number" ? n.scrollTo(e, t ?? 0) : n.scrollTo(e));
168
- }
169
- function E(e) {
170
- l("scroll", e);
171
- }
172
- function D() {
173
- let e = h.value?.wrapRef;
174
- if (!e) return;
175
- let t = new Event("scroll");
176
- Object.defineProperty(t, "target", { value: e }), Object.defineProperty(t, "currentTarget", { value: e }), l("scroll", t);
177
- }
178
- return a({ scrollTo: T }), (e, r) => (p(), o("main", {
179
- class: d(y.value),
180
- style: f(_.value)
181
- }, [n.nativeScrollbar ? (p(), o("div", {
182
- key: 0,
134
+ `wi-layout--${i.position}-positioned`,
135
+ { "wi-layout--embedded": i.embedded }
136
+ ]), y = r(() => ["wi-layout__scroll", i.contentClass]), x = r(() => i.contentStyle);
137
+ return t({ scrollTo: l }), (e, t) => (f(), a("main", {
138
+ class: u(g.value),
139
+ style: d(_(m))
140
+ }, [o("div", {
183
141
  ref_key: "scrollEl",
184
- ref: m,
185
- class: d(x.value),
186
- style: f(S.value),
187
- onScroll: E
188
- }, [g(e.$slots, "default")], 38)) : (p(), i(t, u({
189
- key: 1,
190
- ref_key: "scrollbarRef",
191
- ref: h,
192
- class: "wi-layout__scrollbar",
193
- height: "100%"
194
- }, n.scrollbarProps, {
195
- "view-class": C.value,
196
- "view-style": w.value,
197
- onScroll: D
198
- }), {
199
- default: b(() => [g(e.$slots, "default")]),
200
- _: 3
201
- }, 16, ["view-class", "view-style"]))], 6));
142
+ ref: c,
143
+ class: u(y.value),
144
+ style: d(x.value),
145
+ onScroll: t[0] ||= (...e) => _(p) && _(p)(...e)
146
+ }, [h(e.$slots, "default")], 38)], 6));
202
147
  }
203
- }), w = /* @__PURE__ */ c({
148
+ }), E = /* @__PURE__ */ c({
204
149
  name: "WiLayoutFooter",
205
150
  __name: "LayoutFooter",
206
151
  props: {
@@ -217,25 +162,26 @@ var x = Symbol("wiLayout"), S = /* @__PURE__ */ c({
217
162
  },
218
163
  position: { default: "static" }
219
164
  },
220
- setup(t) {
221
- let n = t, i = r(() => ({
222
- minHeight: n.height == null ? "var(--wi-layout-footer-height, 48px)" : e(n.height),
223
- padding: n.padding == null ? "var(--wi-layout-padding, var(--wi-space-4))" : e(n.padding),
224
- borderRadius: n.radius == null ? "var(--wi-layout-radius, 0)" : e(n.radius)
225
- })), a = r(() => [
165
+ setup(e) {
166
+ let t = e, n = w(() => ({
167
+ height: t.height,
168
+ heightFallback: "var(--wi-layout-footer-height, 48px)",
169
+ padding: t.padding,
170
+ radius: t.radius
171
+ })), i = r(() => [
226
172
  "wi-layout-footer",
227
- `wi-layout-footer--${n.position}-positioned`,
173
+ `wi-layout-footer--${t.position}-positioned`,
228
174
  {
229
- "wi-layout-footer--bordered": n.bordered,
230
- "wi-layout-footer--inverted": n.inverted
175
+ "wi-layout-footer--bordered": t.bordered,
176
+ "wi-layout-footer--inverted": t.inverted
231
177
  }
232
178
  ]);
233
- return (e, t) => (p(), o("footer", {
234
- class: d(a.value),
235
- style: f(i.value)
236
- }, [g(e.$slots, "default")], 6));
179
+ return (e, t) => (f(), a("footer", {
180
+ class: u(i.value),
181
+ style: d(_(n))
182
+ }, [h(e.$slots, "default")], 6));
237
183
  }
238
- }), T = /* @__PURE__ */ c({
184
+ }), D = /* @__PURE__ */ c({
239
185
  name: "WiLayoutHeader",
240
186
  __name: "LayoutHeader",
241
187
  props: {
@@ -252,37 +198,64 @@ var x = Symbol("wiLayout"), S = /* @__PURE__ */ c({
252
198
  },
253
199
  position: { default: "static" }
254
200
  },
255
- setup(t) {
256
- let n = t, i = r(() => ({
257
- minHeight: n.height == null ? "var(--wi-layout-header-height, 56px)" : e(n.height),
258
- padding: n.padding == null ? "var(--wi-layout-padding, var(--wi-space-4))" : e(n.padding),
259
- borderRadius: n.radius == null ? "var(--wi-layout-radius, 0)" : e(n.radius)
260
- })), a = r(() => [
201
+ setup(e) {
202
+ let t = e, n = w(() => ({
203
+ height: t.height,
204
+ heightFallback: "var(--wi-layout-header-height, 56px)",
205
+ padding: t.padding,
206
+ radius: t.radius
207
+ })), i = r(() => [
261
208
  "wi-layout-header",
262
- `wi-layout-header--${n.position}-positioned`,
209
+ `wi-layout-header--${t.position}-positioned`,
263
210
  {
264
- "wi-layout-header--bordered": n.bordered,
265
- "wi-layout-header--inverted": n.inverted
211
+ "wi-layout-header--bordered": t.bordered,
212
+ "wi-layout-header--inverted": t.inverted
266
213
  }
267
214
  ]);
268
- return (e, t) => (p(), o("header", {
269
- class: d(a.value),
270
- style: f(i.value)
271
- }, [g(e.$slots, "default")], 6));
215
+ return (e, t) => (f(), a("header", {
216
+ class: u(i.value),
217
+ style: d(_(n))
218
+ }, [h(e.$slots, "default")], 6));
272
219
  }
273
- }), E = ["aria-expanded", "aria-label"], D = {
220
+ });
221
+ //#endregion
222
+ //#region src/components/Layout/composables/useLayoutSiderCollapse.ts
223
+ function O(e, t) {
224
+ let n = m(e.defaultCollapsed);
225
+ y(() => e.collapsed, (e) => {
226
+ e !== void 0 && (n.value = e);
227
+ });
228
+ let i = r(() => e.collapsed === void 0 ? n.value : !!e.collapsed);
229
+ function a() {
230
+ let e = !i.value;
231
+ n.value = e, t("update:collapsed", e), t(e ? "collapse" : "expand");
232
+ }
233
+ return {
234
+ mergedCollapsed: i,
235
+ toggle: a,
236
+ uncontrolled: n
237
+ };
238
+ }
239
+ //#endregion
240
+ //#region src/components/Layout/utils.ts
241
+ function k(e) {
242
+ return e ? e === "bar" || e === !0 ? "bar" : "arrow-circle" : null;
243
+ }
244
+ //#endregion
245
+ //#region src/components/Layout/LayoutSider.vue?vue&type=script&setup=true&lang.ts
246
+ var A = ["aria-expanded", "aria-label"], j = {
274
247
  key: 0,
275
248
  class: "wi-layout-sider__arrow",
276
249
  "aria-hidden": "true"
277
- }, O = {
250
+ }, M = {
278
251
  key: 1,
279
252
  class: "wi-layout-sider__bar",
280
253
  "aria-hidden": "true"
281
- }, k = {
282
- key: 3,
254
+ }, N = {
255
+ key: 1,
283
256
  class: "wi-layout-sider__border",
284
257
  "aria-hidden": "true"
285
- }, A = /* @__PURE__ */ c({
258
+ }, P = /* @__PURE__ */ c({
286
259
  name: "WiLayoutSider",
287
260
  __name: "LayoutSider",
288
261
  props: {
@@ -317,11 +290,6 @@ var x = Symbol("wiLayout"), S = /* @__PURE__ */ c({
317
290
  triggerStyle: {},
318
291
  collapsedTriggerClass: {},
319
292
  collapsedTriggerStyle: {},
320
- nativeScrollbar: {
321
- type: Boolean,
322
- default: !0
323
- },
324
- scrollbarProps: {},
325
293
  contentClass: {},
326
294
  contentStyle: {}
327
295
  },
@@ -333,108 +301,65 @@ var x = Symbol("wiLayout"), S = /* @__PURE__ */ c({
333
301
  "after-leave",
334
302
  "scroll"
335
303
  ],
336
- setup(c, { expose: m, emit: S }) {
337
- let C = c, w = S, T = n(), A = l(x, null), j = h(C.defaultCollapsed), M = v("scrollEl"), N = v("scrollbarRef"), P = r(() => C.collapsed !== void 0), F = r(() => P.value ? !!C.collapsed : j.value);
338
- y(() => C.collapsed, (e) => {
339
- e !== void 0 && (j.value = e);
340
- });
341
- let I = r(() => A?.siderPlacement ?? "left"), L = r(() => e(C.width) ?? "var(--wi-layout-sider-width)"), R = r(() => e(F.value ? C.collapsedWidth : C.width)), z = r(() => {
342
- let e = C.showTrigger;
343
- return e ? e === "bar" || e === !0 ? "bar" : "arrow-circle" : null;
344
- }), B = r(() => !F.value || C.showCollapsedContent), V = r(() => [
304
+ setup(c, { expose: p, emit: m }) {
305
+ let g = c, y = m, S = n(), C = l(x, null), w = v("scrollEl"), { scrollTo: T, onScroll: E } = b(w, y), { mergedCollapsed: D, toggle: P } = O(g, y), F = r(() => C?.siderPlacement ?? "left"), I = r(() => t(g.width) ?? "var(--wi-layout-sider-width)"), L = r(() => t(g.collapsedWidth) ?? "var(--wi-layout-sider-collapsed-width)"), R = r(() => D.value ? L.value : I.value), z = r(() => k(g.showTrigger)), B = r(() => !D.value || g.showCollapsedContent), V = r(() => [
345
306
  "wi-layout-sider",
346
- `wi-layout-sider--${C.position}-positioned`,
347
- `wi-layout-sider--${I.value}-placement`,
348
- `wi-layout-sider--collapse-${C.collapseMode}`,
307
+ `wi-layout-sider--${g.position}-positioned`,
308
+ `wi-layout-sider--${F.value}-placement`,
309
+ `wi-layout-sider--collapse-${g.collapseMode}`,
349
310
  {
350
- "wi-layout-sider--bordered": C.bordered,
351
- "wi-layout-sider--inverted": C.inverted,
352
- "wi-layout-sider--collapsed": F.value,
353
- "wi-layout-sider--show-content": B.value,
354
- "wi-layout-sider--custom-scrollbar": !C.nativeScrollbar
311
+ "wi-layout-sider--bordered": g.bordered,
312
+ "wi-layout-sider--inverted": g.inverted,
313
+ "wi-layout-sider--collapsed": D.value,
314
+ "wi-layout-sider--show-content": B.value
355
315
  }
356
- ]), H = r(() => ({
357
- width: L.value,
358
- maxWidth: R.value,
359
- padding: C.padding == null ? "var(--wi-layout-padding, var(--wi-space-4))" : e(C.padding),
360
- borderRadius: C.radius == null ? "var(--wi-layout-radius, 0)" : e(C.radius)
361
- })), U = r(() => {
362
- let e = C.contentStyle;
363
- return C.collapseMode === "transform" ? [e, { minWidth: L.value }] : e;
364
- }), W = r(() => ["wi-layout-sider__scroll", C.contentClass]), G = r(() => {
365
- let e = C.scrollbarProps?.viewClass, t = W.value.filter(Boolean);
366
- return e == null || e === "" ? t : Array.isArray(e) ? [...t, ...e] : [...t, e];
367
- }), K = r(() => {
368
- let e = C.scrollbarProps?.viewStyle;
369
- return e == null || e === "" ? U.value : [U.value, e];
370
- }), q = r(() => F.value ? C.collapsedTriggerClass : C.triggerClass), J = r(() => F.value ? C.collapsedTriggerStyle : C.triggerStyle);
371
- function Y() {
372
- let e = !F.value;
373
- j.value = e, w("update:collapsed", e), w(e ? "collapse" : "expand");
374
- }
375
- function X(e) {
376
- e.propertyName === "max-width" && (F.value ? w("after-leave") : w("after-enter"));
377
- }
378
- function Z(e) {
379
- w("scroll", e);
380
- }
381
- function Q() {
382
- let e = N.value?.wrapRef;
383
- if (!e) return;
384
- let t = new Event("scroll");
385
- Object.defineProperty(t, "target", { value: e }), Object.defineProperty(t, "currentTarget", { value: e }), w("scroll", t);
386
- }
387
- function $(e, t) {
388
- if (C.nativeScrollbar) {
389
- let n = M.value;
390
- if (!n) return;
391
- typeof e == "number" ? n.scrollTo(e, t ?? 0) : n.scrollTo(e);
392
- return;
393
- }
394
- let n = N.value;
395
- n && (typeof e == "number" ? n.scrollTo(e, t ?? 0) : n.scrollTo(e));
316
+ ]), H = r(() => {
317
+ let e = g.collapseMode === "width";
318
+ return {
319
+ "--wi-layout-sider-width": I.value,
320
+ "--wi-layout-sider-collapsed-width": L.value,
321
+ width: e ? R.value : I.value,
322
+ maxWidth: R.value,
323
+ minWidth: "0",
324
+ borderRadius: g.radius == null ? "var(--wi-layout-radius, 0)" : t(g.radius)
325
+ };
326
+ }), U = r(() => g.padding == null ? "var(--wi-layout-padding, var(--wi-space-4))" : t(g.padding)), W = r(() => {
327
+ let e = { padding: U.value };
328
+ return g.contentStyle == null ? e : [e, g.contentStyle];
329
+ }), G = r(() => ["wi-layout-sider__scroll", g.contentClass]), K = r(() => D.value ? g.collapsedTriggerClass : g.triggerClass), q = r(() => D.value ? g.collapsedTriggerStyle : g.triggerStyle);
330
+ function J(e) {
331
+ e.propertyName === "max-width" && (D.value ? y("after-leave") : y("after-enter"));
396
332
  }
397
- return m({ scrollTo: $ }), (e, n) => (p(), o("aside", {
398
- class: d(V.value),
399
- style: f(H.value),
400
- onTransitionend: X
333
+ return p({ scrollTo: T }), (t, n) => (f(), a("aside", {
334
+ class: u(V.value),
335
+ style: d(H.value),
336
+ onTransitionend: J
401
337
  }, [
402
- c.nativeScrollbar ? (p(), o("div", {
403
- key: 0,
338
+ o("div", {
404
339
  ref_key: "scrollEl",
405
- ref: M,
406
- class: d(W.value),
407
- style: f(U.value),
408
- onScroll: Z
409
- }, [g(e.$slots, "default")], 38)) : (p(), i(t, u({
410
- key: 1,
411
- ref_key: "scrollbarRef",
412
- ref: N,
413
- class: "wi-layout-sider__scrollbar",
414
- height: "100%"
415
- }, c.scrollbarProps, {
416
- "view-class": G.value,
417
- "view-style": K.value,
418
- onScroll: Q
419
- }), {
420
- default: b(() => [g(e.$slots, "default")]),
421
- _: 3
422
- }, 16, ["view-class", "view-style"])),
423
- z.value ? (p(), o("button", {
424
- key: 2,
340
+ ref: w,
341
+ class: u(G.value),
342
+ style: d(W.value),
343
+ onScroll: n[0] ||= (...e) => _(E) && _(E)(...e)
344
+ }, [h(t.$slots, "default")], 38),
345
+ z.value ? (f(), a("button", {
346
+ key: 0,
425
347
  type: "button",
426
- class: d(["wi-layout-sider__trigger", [q.value, {
348
+ class: u(["wi-layout-sider__trigger", [K.value, {
427
349
  "wi-layout-sider__trigger--bar": z.value === "bar",
428
350
  "wi-layout-sider__trigger--arrow-circle": z.value === "arrow-circle"
429
351
  }]]),
430
- style: f(J.value),
431
- "aria-expanded": !F.value,
432
- "aria-label": F.value ? _(T).expand : _(T).collapse,
433
- onClick: Y
434
- }, [z.value === "arrow-circle" ? (p(), o("span", D, " › ")) : (p(), o("span", O, [...n[0] ||= [s("i", { class: "wi-layout-sider__bar-top" }, null, -1), s("i", { class: "wi-layout-sider__bar-bottom" }, null, -1)]]))], 14, E)) : a("", !0),
435
- c.bordered ? (p(), o("div", k)) : a("", !0)
352
+ style: d(q.value),
353
+ "aria-expanded": !_(D),
354
+ "aria-label": _(D) ? _(S).expand : _(S).collapse,
355
+ onClick: n[1] ||= (...e) => _(P) && _(P)(...e)
356
+ }, [z.value === "arrow-circle" ? (f(), a("span", j, [s(e, {
357
+ name: "chevron-right",
358
+ size: "sm"
359
+ })])) : (f(), a("span", M, [...n[2] ||= [o("i", { class: "wi-layout-sider__bar-top" }, null, -1), o("i", { class: "wi-layout-sider__bar-bottom" }, null, -1)]]))], 14, A)) : i("", !0),
360
+ c.bordered ? (f(), a("div", N)) : i("", !0)
436
361
  ], 38));
437
362
  }
438
363
  });
439
364
  //#endregion
440
- export { x as WI_LAYOUT_KEY, S as WiLayout, C as WiLayoutContent, w as WiLayoutFooter, T as WiLayoutHeader, A as WiLayoutSider };
365
+ export { x as WI_LAYOUT_KEY, S as WiLayout, T as WiLayoutContent, E as WiLayoutFooter, D as WiLayoutHeader, P as WiLayoutSider };