@vinicunca/taman-ui 0.1.0

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 (296) hide show
  1. package/README.md +95 -0
  2. package/dist/_virtual/_/plugin-vue/export-helper.mjs +8 -0
  3. package/dist/components/auth/index.d.ts +2 -0
  4. package/dist/components/auth/index.mjs +2 -0
  5. package/dist/components/auth/taman-auth-form.mjs +67 -0
  6. package/dist/components/auth/taman-auth-form.vue.d.ts +31 -0
  7. package/dist/components/back-to-top/index.mjs +2 -0
  8. package/dist/components/back-to-top/taman-back-to-top.mjs +70 -0
  9. package/dist/components/back-to-top/taman-back-to-top.vue.d.ts +18 -0
  10. package/dist/components/button/check-group-selection.mjs +17 -0
  11. package/dist/components/button/index.d.ts +4 -0
  12. package/dist/components/button/index.mjs +3 -0
  13. package/dist/components/button/taman-button-check-group.mjs +132 -0
  14. package/dist/components/button/taman-button-check-group.types.d.ts +22 -0
  15. package/dist/components/button/taman-button-check-group.vue.d.ts +41 -0
  16. package/dist/components/button/taman-button-icon.mjs +105 -0
  17. package/dist/components/button/taman-button-icon.vue.d.ts +17 -0
  18. package/dist/components/descriptions/index.d.ts +4 -0
  19. package/dist/components/descriptions/index.mjs +3 -0
  20. package/dist/components/descriptions/taman-description-cell.mjs +116 -0
  21. package/dist/components/descriptions/taman-description-item.mjs +10 -0
  22. package/dist/components/descriptions/taman-description-item.vue.d.ts +5 -0
  23. package/dist/components/descriptions/taman-description-row.mjs +131 -0
  24. package/dist/components/descriptions/taman-description.mjs +78 -0
  25. package/dist/components/descriptions/taman-description.types.d.ts +51 -0
  26. package/dist/components/descriptions/taman-description.vue.d.ts +23 -0
  27. package/dist/components/descriptions/use-taman-description.mjs +161 -0
  28. package/dist/components/file-upload/index.d.ts +3 -0
  29. package/dist/components/file-upload/index.mjs +2 -0
  30. package/dist/components/file-upload/taman-file-upload.mjs +88 -0
  31. package/dist/components/file-upload/taman-file-upload.types.d.ts +10 -0
  32. package/dist/components/file-upload/taman-file-upload.vue.d.ts +21 -0
  33. package/dist/components/full-screen/full-screen.mjs +27 -0
  34. package/dist/components/full-screen/full-screen.vue.d.ts +8 -0
  35. package/dist/components/full-screen/index.mjs +2 -0
  36. package/dist/components/icon/icon.mjs +27 -0
  37. package/dist/components/icon/icon.vue.d.ts +9 -0
  38. package/dist/components/icon/index.d.ts +2 -0
  39. package/dist/components/icon/index.mjs +2 -0
  40. package/dist/components/index.d.ts +34 -0
  41. package/dist/components/index.mjs +31 -0
  42. package/dist/components/input/index.d.ts +5 -0
  43. package/dist/components/input/index.mjs +4 -0
  44. package/dist/components/input/password-strength.d.ts +7 -0
  45. package/dist/components/input/password-strength.mjs +21 -0
  46. package/dist/components/input/taman-input-currency.mjs +76 -0
  47. package/dist/components/input/taman-input-currency.types.d.ts +8 -0
  48. package/dist/components/input/taman-input-currency.vue.d.ts +15 -0
  49. package/dist/components/input/taman-input-password.mjs +99 -0
  50. package/dist/components/input/taman-input-password.vue.d.ts +17 -0
  51. package/dist/components/input-date/format-calendar-input-value.mjs +26 -0
  52. package/dist/components/input-date/index.d.ts +3 -0
  53. package/dist/components/input-date/index.mjs +2 -0
  54. package/dist/components/input-date/taman-input-date.mjs +116 -0
  55. package/dist/components/input-date/taman-input-date.types.d.ts +14 -0
  56. package/dist/components/input-date/taman-input-date.vue.d.ts +21 -0
  57. package/dist/components/loading/index.d.ts +3 -0
  58. package/dist/components/loading/index.mjs +2 -0
  59. package/dist/components/loading/taman-loading.mjs +64 -0
  60. package/dist/components/loading/taman-loading.vue.d.ts +25 -0
  61. package/dist/components/loading/types.d.ts +13 -0
  62. package/dist/components/logo/index.mjs +2 -0
  63. package/dist/components/logo/taman-logo.mjs +60 -0
  64. package/dist/components/logo/taman-logo.vue.d.ts +32 -0
  65. package/dist/components/render-content/index.d.ts +2 -0
  66. package/dist/components/render-content/index.mjs +2 -0
  67. package/dist/components/render-content/render-content.mjs +42 -0
  68. package/dist/components/render-content/render-content.vue.d.ts +31 -0
  69. package/dist/components/scrollbar/index.d.ts +2 -0
  70. package/dist/components/scrollbar/index.mjs +2 -0
  71. package/dist/components/scrollbar/scrollbar.mjs +136 -0
  72. package/dist/components/scrollbar/scrollbar.vue.d.ts +50 -0
  73. package/dist/form/components/form-actions.mjs +151 -0
  74. package/dist/form/components/form-field-array.mjs +154 -0
  75. package/dist/form/components/form-field-array.types.d.ts +18 -0
  76. package/dist/form/form-render/form-render-field-collapsible.mjs +32 -0
  77. package/dist/form/form-render/form-render-field-control.mjs +44 -0
  78. package/dist/form/form-render/form-render-form-field.mjs +408 -0
  79. package/dist/form/form-render/form-render-form-label.mjs +46 -0
  80. package/dist/form/form-render/form-render-form.mjs +163 -0
  81. package/dist/form/form-render/form-render-group.mjs +89 -0
  82. package/dist/form/form-render/form-render.context.mjs +10 -0
  83. package/dist/form/form-render/form-render.dependencies.mjs +101 -0
  84. package/dist/form/form-render/form-render.helper.mjs +31 -0
  85. package/dist/form/form-render/form-render.schema.mjs +209 -0
  86. package/dist/form/form-render/index.mjs +4 -0
  87. package/dist/form/form.api.d.ts +54 -0
  88. package/dist/form/form.api.mjs +324 -0
  89. package/dist/form/form.built-ins.d.ts +36 -0
  90. package/dist/form/form.built-ins.mjs +48 -0
  91. package/dist/form/form.codec.d.ts +17 -0
  92. package/dist/form/form.codec.mjs +45 -0
  93. package/dist/form/form.config.d.ts +6 -0
  94. package/dist/form/form.config.mjs +43 -0
  95. package/dist/form/form.empty-value.d.ts +4 -0
  96. package/dist/form/form.empty-value.mjs +20 -0
  97. package/dist/form/form.field-name.mjs +25 -0
  98. package/dist/form/form.rule-registry.mjs +10 -0
  99. package/dist/form/form.runtime-field.mjs +56 -0
  100. package/dist/form/form.runtime.mjs +235 -0
  101. package/dist/form/form.schema-defaults.mjs +36 -0
  102. package/dist/form/form.types.d.ts +315 -0
  103. package/dist/form/form.use-delayed-flag.mjs +35 -0
  104. package/dist/form/form.use-form-context.mjs +44 -0
  105. package/dist/form/form.use-taman-form.d.ts +7 -0
  106. package/dist/form/form.use-taman-form.mjs +36 -0
  107. package/dist/form/index.d.ts +8 -0
  108. package/dist/form/index.mjs +6 -0
  109. package/dist/form/taman-use-form.mjs +146 -0
  110. package/dist/index.d.ts +63 -0
  111. package/dist/index.mjs +56 -0
  112. package/dist/layout/components/index.mjs +6 -0
  113. package/dist/layout/components/taman-core-button-collapse.mjs +38 -0
  114. package/dist/layout/components/taman-core-button-fixed.mjs +29 -0
  115. package/dist/layout/components/taman-core-layout-content.mjs +50 -0
  116. package/dist/layout/components/taman-core-layout-footer.mjs +38 -0
  117. package/dist/layout/components/taman-core-layout-header.mjs +48 -0
  118. package/dist/layout/components/taman-core-layout-sidebar.mjs +319 -0
  119. package/dist/layout/components/taman-core-layout-tabbar.mjs +21 -0
  120. package/dist/layout/composables/use-layout.mjs +31 -0
  121. package/dist/layout/composables/use-sidebar-drag.mjs +103 -0
  122. package/dist/layout/header-scroll-state.mjs +9 -0
  123. package/dist/layout/index.d.ts +3 -0
  124. package/dist/layout/index.mjs +2 -0
  125. package/dist/layout/taman-core-layout.d.ts +41 -0
  126. package/dist/layout/taman-core-layout.mjs +603 -0
  127. package/dist/layout/taman-core-layout.vue.d.ts +99 -0
  128. package/dist/menu/components/collapse-transition.mjs +82 -0
  129. package/dist/menu/components/index.mjs +5 -0
  130. package/dist/menu/components/normal-menu/index.d.ts +3 -0
  131. package/dist/menu/components/normal-menu/index.mjs +2 -0
  132. package/dist/menu/components/normal-menu/normal-menu.d.ts +11 -0
  133. package/dist/menu/components/normal-menu/normal-menu.mjs +50 -0
  134. package/dist/menu/components/normal-menu/normal-menu.vue.d.ts +19 -0
  135. package/dist/menu/components/taman-menu-badge-dot.mjs +23 -0
  136. package/dist/menu/components/taman-menu-badge.mjs +49 -0
  137. package/dist/menu/components/taman-menu-badge.vue.d.ts +9 -0
  138. package/dist/menu/components/taman-menu-item.mjs +124 -0
  139. package/dist/menu/components/taman-menu-root.mjs +250 -0
  140. package/dist/menu/components/taman-menu-sub-menu-content.mjs +83 -0
  141. package/dist/menu/components/taman-menu-sub-menu.mjs +216 -0
  142. package/dist/menu/composables/index.mjs +3 -0
  143. package/dist/menu/composables/use-menu-context.mjs +36 -0
  144. package/dist/menu/composables/use-menu-scroll.mjs +23 -0
  145. package/dist/menu/composables/use-menu.mjs +33 -0
  146. package/dist/menu/index.d.ts +7 -0
  147. package/dist/menu/index.mjs +5 -0
  148. package/dist/menu/menu.constants.mjs +5 -0
  149. package/dist/menu/menu.types.d.ts +63 -0
  150. package/dist/menu/menu.utils.mjs +27 -0
  151. package/dist/menu/taman-menu.mjs +41 -0
  152. package/dist/menu/taman-menu.vue.d.ts +12 -0
  153. package/dist/menu/taman-sub-menu.mjs +75 -0
  154. package/dist/popup/alert/alert-builder.d.ts +8 -0
  155. package/dist/popup/alert/alert-builder.mjs +98 -0
  156. package/dist/popup/alert/alert-overlay.mjs +55 -0
  157. package/dist/popup/alert/alert.d.ts +43 -0
  158. package/dist/popup/alert/alert.mjs +10 -0
  159. package/dist/popup/alert/alert.vue.d.ts +26 -0
  160. package/dist/popup/alert/alert2.mjs +238 -0
  161. package/dist/popup/alert/index.d.ts +4 -0
  162. package/dist/popup/alert/index.mjs +4 -0
  163. package/dist/popup/dialog/dialog.api.d.ts +23 -0
  164. package/dist/popup/dialog/dialog.api.mjs +133 -0
  165. package/dist/popup/dialog/dialog.mjs +336 -0
  166. package/dist/popup/dialog/dialog.types.d.ts +60 -0
  167. package/dist/popup/dialog/dialog.vue.d.ts +46 -0
  168. package/dist/popup/dialog/index.d.ts +4 -0
  169. package/dist/popup/dialog/index.mjs +3 -0
  170. package/dist/popup/dialog/use-dialog-draggable.mjs +93 -0
  171. package/dist/popup/dialog/use-taman-dialog.d.ts +13 -0
  172. package/dist/popup/dialog/use-taman-dialog.mjs +106 -0
  173. package/dist/popup/drawer/drawer.api.d.ts +23 -0
  174. package/dist/popup/drawer/drawer.api.mjs +124 -0
  175. package/dist/popup/drawer/drawer.mjs +277 -0
  176. package/dist/popup/drawer/drawer.types.d.ts +56 -0
  177. package/dist/popup/drawer/drawer.vue.d.ts +47 -0
  178. package/dist/popup/drawer/index.d.ts +4 -0
  179. package/dist/popup/drawer/index.mjs +3 -0
  180. package/dist/popup/drawer/use-taman-drawer.d.ts +13 -0
  181. package/dist/popup/drawer/use-taman-drawer.mjs +109 -0
  182. package/dist/popup/index.d.ts +13 -0
  183. package/dist/popup/index.mjs +11 -0
  184. package/dist/tabs/components/index.mjs +2 -0
  185. package/dist/tabs/components/taman-tabs.mjs +158 -0
  186. package/dist/tabs/components/widgets/index.d.ts +4 -0
  187. package/dist/tabs/components/widgets/index.mjs +4 -0
  188. package/dist/tabs/components/widgets/tool-more.mjs +45 -0
  189. package/dist/tabs/components/widgets/tool-more.vue.d.ts +7 -0
  190. package/dist/tabs/components/widgets/tool-refresh.mjs +25 -0
  191. package/dist/tabs/components/widgets/tool-refresh.vue.d.ts +9 -0
  192. package/dist/tabs/components/widgets/tool-screen.mjs +29 -0
  193. package/dist/tabs/components/widgets/tool-screen.vue.d.ts +12 -0
  194. package/dist/tabs/index.d.ts +8 -0
  195. package/dist/tabs/index.mjs +6 -0
  196. package/dist/tabs/strict-context-menu.d.ts +10 -0
  197. package/dist/tabs/tabs.types.d.ts +30 -0
  198. package/dist/tabs/taman-tabs-view.mjs +101 -0
  199. package/dist/tabs/taman-tabs-view.vue.d.ts +18 -0
  200. package/dist/tabs/use-tabs-drag.mjs +69 -0
  201. package/dist/tabs/use-tabs-view-scroll.mjs +114 -0
  202. package/dist/ui/alert-dialog/alert-dialog-action.mjs +21 -0
  203. package/dist/ui/alert-dialog/alert-dialog-action.vue.d.ts +16 -0
  204. package/dist/ui/alert-dialog/alert-dialog-cancel.mjs +21 -0
  205. package/dist/ui/alert-dialog/alert-dialog-cancel.vue.d.ts +16 -0
  206. package/dist/ui/alert-dialog/alert-dialog-content.mjs +111 -0
  207. package/dist/ui/alert-dialog/alert-dialog-content.vue.d.ts +49 -0
  208. package/dist/ui/alert-dialog/alert-dialog-description.mjs +30 -0
  209. package/dist/ui/alert-dialog/alert-dialog-description.vue.d.ts +20 -0
  210. package/dist/ui/alert-dialog/alert-dialog-footer.mjs +14 -0
  211. package/dist/ui/alert-dialog/alert-dialog-footer.vue.d.ts +15 -0
  212. package/dist/ui/alert-dialog/alert-dialog-header.mjs +14 -0
  213. package/dist/ui/alert-dialog/alert-dialog-header.vue.d.ts +15 -0
  214. package/dist/ui/alert-dialog/alert-dialog-overlay.mjs +29 -0
  215. package/dist/ui/alert-dialog/alert-dialog-root.mjs +23 -0
  216. package/dist/ui/alert-dialog/alert-dialog-root.vue.d.ts +23 -0
  217. package/dist/ui/alert-dialog/alert-dialog-title.mjs +30 -0
  218. package/dist/ui/alert-dialog/alert-dialog-title.vue.d.ts +20 -0
  219. package/dist/ui/alert-dialog/alert-dialog-trigger.mjs +21 -0
  220. package/dist/ui/alert-dialog/alert-dialog-trigger.vue.d.ts +16 -0
  221. package/dist/ui/alert-dialog/index.d.ts +10 -0
  222. package/dist/ui/alert-dialog/index.mjs +10 -0
  223. package/dist/ui/dialog/dialog-close.mjs +21 -0
  224. package/dist/ui/dialog/dialog-close.vue.d.ts +16 -0
  225. package/dist/ui/dialog/dialog-content.mjs +111 -0
  226. package/dist/ui/dialog/dialog-content.vue.d.ts +51 -0
  227. package/dist/ui/dialog/dialog-description.mjs +31 -0
  228. package/dist/ui/dialog/dialog-description.vue.d.ts +20 -0
  229. package/dist/ui/dialog/dialog-footer.mjs +14 -0
  230. package/dist/ui/dialog/dialog-footer.vue.d.ts +15 -0
  231. package/dist/ui/dialog/dialog-header.mjs +14 -0
  232. package/dist/ui/dialog/dialog-header.vue.d.ts +15 -0
  233. package/dist/ui/dialog/dialog-overlay.mjs +34 -0
  234. package/dist/ui/dialog/dialog-overlay.vue.d.ts +14 -0
  235. package/dist/ui/dialog/dialog-root.mjs +24 -0
  236. package/dist/ui/dialog/dialog-root.vue.d.ts +23 -0
  237. package/dist/ui/dialog/dialog-title.mjs +31 -0
  238. package/dist/ui/dialog/dialog-title.vue.d.ts +20 -0
  239. package/dist/ui/dialog/dialog-trigger.mjs +21 -0
  240. package/dist/ui/dialog/dialog-trigger.vue.d.ts +16 -0
  241. package/dist/ui/dialog/index.d.ts +10 -0
  242. package/dist/ui/dialog/index.mjs +10 -0
  243. package/dist/ui/dialog/use-dialog-state-events.mjs +60 -0
  244. package/dist/ui/form/form-control.mjs +27 -0
  245. package/dist/ui/form/form-control.vue.d.ts +15 -0
  246. package/dist/ui/form/form-description.mjs +27 -0
  247. package/dist/ui/form/form-description.vue.d.ts +19 -0
  248. package/dist/ui/form/form-field.mjs +37 -0
  249. package/dist/ui/form/form-field.vue.d.ts +27 -0
  250. package/dist/ui/form/form-item.mjs +27 -0
  251. package/dist/ui/form/form-item.vue.d.ts +19 -0
  252. package/dist/ui/form/form-label.mjs +41 -0
  253. package/dist/ui/form/form-label.vue.d.ts +20 -0
  254. package/dist/ui/form/form-message.mjs +28 -0
  255. package/dist/ui/form/form-message.vue.d.ts +9 -0
  256. package/dist/ui/form/index.d.ts +8 -0
  257. package/dist/ui/form/index.mjs +8 -0
  258. package/dist/ui/form/injection-keys.d.ts +13 -0
  259. package/dist/ui/form/injection-keys.mjs +5 -0
  260. package/dist/ui/form/use-form-field.mjs +27 -0
  261. package/dist/ui/index.d.ts +42 -0
  262. package/dist/ui/index.mjs +42 -0
  263. package/dist/ui/label/index.d.ts +2 -0
  264. package/dist/ui/label/index.mjs +2 -0
  265. package/dist/ui/label/label.mjs +31 -0
  266. package/dist/ui/label/label.vue.d.ts +20 -0
  267. package/dist/ui/scroll-area/index.d.ts +3 -0
  268. package/dist/ui/scroll-area/index.mjs +3 -0
  269. package/dist/ui/scroll-area/scroll-area.mjs +47 -0
  270. package/dist/ui/scroll-area/scroll-area.vue.d.ts +21 -0
  271. package/dist/ui/scroll-area/scroll-bar.mjs +38 -0
  272. package/dist/ui/scroll-area/scroll-bar.vue.d.ts +12 -0
  273. package/dist/ui/sheet/index.d.ts +8 -0
  274. package/dist/ui/sheet/index.mjs +8 -0
  275. package/dist/ui/sheet/sheet-close.mjs +21 -0
  276. package/dist/ui/sheet/sheet-close.vue.d.ts +16 -0
  277. package/dist/ui/sheet/sheet-content.mjs +105 -0
  278. package/dist/ui/sheet/sheet-content.vue.d.ts +48 -0
  279. package/dist/ui/sheet/sheet-description.mjs +30 -0
  280. package/dist/ui/sheet/sheet-description.vue.d.ts +20 -0
  281. package/dist/ui/sheet/sheet-footer.mjs +14 -0
  282. package/dist/ui/sheet/sheet-footer.vue.d.ts +15 -0
  283. package/dist/ui/sheet/sheet-header.mjs +14 -0
  284. package/dist/ui/sheet/sheet-header.vue.d.ts +15 -0
  285. package/dist/ui/sheet/sheet-overlay.mjs +32 -0
  286. package/dist/ui/sheet/sheet-root.mjs +24 -0
  287. package/dist/ui/sheet/sheet-root.vue.d.ts +23 -0
  288. package/dist/ui/sheet/sheet-title.mjs +31 -0
  289. package/dist/ui/sheet/sheet-title.vue.d.ts +20 -0
  290. package/dist/ui/sheet/sheet.variants.d.ts +27 -0
  291. package/dist/ui/sheet/sheet.variants.mjs +12 -0
  292. package/dist/unocss/content.d.ts +4 -0
  293. package/dist/unocss/content.mjs +9 -0
  294. package/dist/unocss/index.d.ts +2 -0
  295. package/dist/unocss/index.mjs +2 -0
  296. package/package.json +78 -0
@@ -0,0 +1,319 @@
1
+ import _sfc_main$1 from "../../components/scrollbar/scrollbar.mjs";
2
+ import "../../index.mjs";
3
+ import { useSidebarDrag } from "../composables/use-sidebar-drag.mjs";
4
+ import _sfc_main$2 from "./taman-core-button-collapse.mjs";
5
+ import _sfc_main$3 from "./taman-core-button-fixed.mjs";
6
+ import { Fragment, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeModels, normalizeClass, normalizeStyle, onUnmounted, openBlock, renderSlot, shallowRef, unref, useModel, useSlots, watchEffect, withCtx } from "vue";
7
+ import { useScrollLock } from "@vueuse/core";
8
+ //#region src/layout/components/taman-core-layout-sidebar.vue
9
+ const _hoisted_1 = ["inert"];
10
+ const _sfc_main = /*@__PURE__*/ defineComponent({
11
+ __name: "taman-core-layout-sidebar",
12
+ props: /*@__PURE__*/ mergeModels({
13
+ collapseHeight: { default: 42 },
14
+ collapseWidth: { default: 48 },
15
+ domVisible: {
16
+ type: Boolean,
17
+ default: true
18
+ },
19
+ expandedWidth: { default: 180 },
20
+ extraTitleHeight: { default: void 0 },
21
+ extraWidth: {},
22
+ fixedExtra: {
23
+ type: Boolean,
24
+ default: false
25
+ },
26
+ headerHeight: {},
27
+ isMobile: {
28
+ type: Boolean,
29
+ default: false
30
+ },
31
+ isSidebarMixed: {
32
+ type: Boolean,
33
+ default: false
34
+ },
35
+ marginTop: { default: 0 },
36
+ mixedWidth: { default: 70 },
37
+ paddingTop: { default: 0 },
38
+ show: {
39
+ type: Boolean,
40
+ default: true
41
+ },
42
+ showCollapseButton: {
43
+ type: Boolean,
44
+ default: true
45
+ },
46
+ showFixedButton: {
47
+ type: Boolean,
48
+ default: true
49
+ },
50
+ theme: {},
51
+ themeSub: {},
52
+ width: {},
53
+ zIndex: { default: 0 }
54
+ }, {
55
+ "draggable": { type: Boolean },
56
+ "draggableModifiers": {},
57
+ "collapse": { type: Boolean },
58
+ "collapseModifiers": {},
59
+ "extraCollapse": { type: Boolean },
60
+ "extraCollapseModifiers": {},
61
+ "expandOnHovering": { type: Boolean },
62
+ "expandOnHoveringModifiers": {},
63
+ "expandOnHover": { type: Boolean },
64
+ "expandOnHoverModifiers": {},
65
+ "extraVisible": { type: Boolean },
66
+ "extraVisibleModifiers": {}
67
+ }),
68
+ emits: /*@__PURE__*/ mergeModels(["leave", "update:width"], [
69
+ "update:draggable",
70
+ "update:collapse",
71
+ "update:extraCollapse",
72
+ "update:expandOnHovering",
73
+ "update:expandOnHover",
74
+ "update:extraVisible"
75
+ ]),
76
+ setup(__props, { emit: __emit }) {
77
+ const props = __props;
78
+ const emits = __emit;
79
+ const draggable = useModel(__props, "draggable");
80
+ const collapse = useModel(__props, "collapse");
81
+ const extraCollapse = useModel(__props, "extraCollapse");
82
+ const expandOnHovering = useModel(__props, "expandOnHovering");
83
+ const expandOnHover = useModel(__props, "expandOnHover");
84
+ const extraVisible = useModel(__props, "extraVisible");
85
+ const isLocked = useScrollLock(document.body);
86
+ const slots = useSlots();
87
+ const asideRef = shallowRef(null);
88
+ const dragBarRef = shallowRef(null);
89
+ const hiddenSideStyle = computed(() => {
90
+ return {
91
+ flexBasis: props.show ? getMenuWidthValue(true) : "0px",
92
+ flexGrow: 0,
93
+ flexShrink: 0,
94
+ overflow: "hidden"
95
+ };
96
+ });
97
+ const sidebarVisualWidth = computed(() => {
98
+ const currentWidth = Number.parseFloat(getMenuWidthValue(false));
99
+ return !props.isMobile && !props.isSidebarMixed ? Math.max(currentWidth, props.expandedWidth) : currentWidth;
100
+ });
101
+ const dragBarStyle = computed(() => {
102
+ const currentWidth = Number.parseFloat(getMenuWidthValue(false));
103
+ return { right: `${Math.max(0, sidebarVisualWidth.value - currentWidth)}px` };
104
+ });
105
+ const style = computed(() => {
106
+ const { isSidebarMixed, marginTop, paddingTop, zIndex } = props;
107
+ return {
108
+ ...calcMenuWidthStyle(),
109
+ height: `calc(100% - ${marginTop}px)`,
110
+ marginTop: `${marginTop}px`,
111
+ paddingTop: `${paddingTop}px`,
112
+ zIndex,
113
+ ...isSidebarMixed && extraVisible.value ? { transition: "none" } : {}
114
+ };
115
+ });
116
+ const extraStyle = computed(() => {
117
+ const { extraWidth, show, width, zIndex } = props;
118
+ return {
119
+ left: `${width}px`,
120
+ width: extraVisible.value && show ? `${extraWidth}px` : 0,
121
+ zIndex
122
+ };
123
+ });
124
+ const extraTitleStyle = computed(() => {
125
+ const { extraTitleHeight, headerHeight } = props;
126
+ return { height: `${extraTitleHeight ?? headerHeight - 1}px` };
127
+ });
128
+ const contentWidthStyle = computed(() => {
129
+ const { fixedExtra, isSidebarMixed, mixedWidth } = props;
130
+ if (isSidebarMixed && fixedExtra) return { width: `${mixedWidth}px` };
131
+ return {};
132
+ });
133
+ const contentStyle = computed(() => {
134
+ const { collapseHeight, headerHeight } = props;
135
+ return {
136
+ height: `calc(100% - ${headerHeight + collapseHeight}px)`,
137
+ paddingTop: "8px",
138
+ ...contentWidthStyle.value
139
+ };
140
+ });
141
+ const headerStyle = computed(() => {
142
+ const { headerHeight, isSidebarMixed } = props;
143
+ return {
144
+ ...isSidebarMixed ? {
145
+ display: "flex",
146
+ justifyContent: "center"
147
+ } : {},
148
+ height: `${headerHeight - 1}px`,
149
+ ...contentWidthStyle.value
150
+ };
151
+ });
152
+ const extraContentStyle = computed(() => {
153
+ const { collapseHeight, extraTitleHeight, headerHeight } = props;
154
+ return { height: `calc(100% - ${(extraTitleHeight ?? headerHeight) + collapseHeight}px)` };
155
+ });
156
+ const collapseStyle = computed(() => {
157
+ return { height: `${props.collapseHeight}px` };
158
+ });
159
+ watchEffect(() => {
160
+ extraVisible.value = props.fixedExtra ? true : extraVisible.value;
161
+ });
162
+ function getMenuWidthValue(isHiddenDom) {
163
+ const { collapseWidth, extraWidth, mixedWidth, fixedExtra, isSidebarMixed, width } = props;
164
+ let widthValue = width === 0 ? "0px" : `${width + (isSidebarMixed && fixedExtra && extraVisible.value ? extraWidth : 0)}px`;
165
+ if (isHiddenDom && expandOnHovering.value && !expandOnHover.value) widthValue = isSidebarMixed ? `${mixedWidth}px` : `${collapseWidth}px`;
166
+ return widthValue;
167
+ }
168
+ function calcMenuWidthStyle() {
169
+ const widthValue = getMenuWidthValue(false);
170
+ const currentWidth = Number.parseFloat(widthValue);
171
+ const clippedWidth = Math.max(0, sidebarVisualWidth.value - currentWidth);
172
+ let transform;
173
+ if (props.isMobile) transform = void 0;
174
+ else if (props.show) transform = "translate3d(0, 0, 0)";
175
+ else transform = "translate3d(-100%, 0, 0)";
176
+ return {
177
+ ...widthValue === "0px" ? { overflow: "hidden" } : {},
178
+ clipPath: `inset(0 ${clippedWidth}px 0 0)`,
179
+ transform,
180
+ width: `${sidebarVisualWidth.value}px`
181
+ };
182
+ }
183
+ function handleMouseenter(event) {
184
+ if (props.isMobile) return;
185
+ if (event?.offsetX < 10) return;
186
+ if (expandOnHover.value) return;
187
+ if (!expandOnHovering.value) collapse.value = false;
188
+ if (props.isSidebarMixed) isLocked.value = true;
189
+ expandOnHovering.value = true;
190
+ }
191
+ function handleMouseleave() {
192
+ emits("leave");
193
+ if (props.isSidebarMixed) isLocked.value = false;
194
+ if (expandOnHover.value || props.isMobile) return;
195
+ expandOnHovering.value = false;
196
+ collapse.value = true;
197
+ extraVisible.value = false;
198
+ }
199
+ const { startDrag, endDrag } = useSidebarDrag();
200
+ function handleDragSidebar(event) {
201
+ const { isSidebarMixed, collapseWidth, width } = props;
202
+ const minLimit = isSidebarMixed ? width + collapseWidth : collapseWidth;
203
+ const maxLimit = isSidebarMixed ? width + 320 : 320;
204
+ startDrag(event, {
205
+ min: minLimit,
206
+ max: maxLimit
207
+ }, {
208
+ target: asideRef.value,
209
+ dragBar: dragBarRef.value
210
+ }, (newWidth) => {
211
+ if (isSidebarMixed) {
212
+ emits("update:width", newWidth - width);
213
+ extraCollapse.value = collapse.value = newWidth - width <= collapseWidth;
214
+ } else {
215
+ emits("update:width", newWidth);
216
+ collapse.value = extraCollapse.value = newWidth <= collapseWidth;
217
+ }
218
+ });
219
+ }
220
+ onUnmounted(() => {
221
+ endDrag();
222
+ });
223
+ return (_ctx, _cache) => {
224
+ return openBlock(), createElementBlock(Fragment, null, [__props.domVisible ? (openBlock(), createElementBlock("div", {
225
+ key: 0,
226
+ class: normalizeClass([__props.theme, "h-full"]),
227
+ style: normalizeStyle(hiddenSideStyle.value)
228
+ }, null, 6)) : createCommentVNode("v-if", true), createVNode(Transition, { name: "mobile-sidebar" }, {
229
+ default: withCtx(() => [!__props.isMobile || !collapse.value ? (openBlock(), createElementBlock("aside", {
230
+ key: 0,
231
+ ref_key: "asideRef",
232
+ ref: asideRef,
233
+ "data-layout-region": "sidebar",
234
+ inert: !__props.show || __props.width === 0,
235
+ style: normalizeStyle(style.value),
236
+ class: normalizeClass(["h-full left-0 top-0 fixed", [__props.theme, {
237
+ "border-r border-border bg-background-sidebar transition-[clip-path,transform]-300 ease-out": !__props.isMobile && !__props.isSidebarMixed,
238
+ "transition-transform-300 ease-out": !__props.isMobile && __props.isSidebarMixed
239
+ }]]),
240
+ onMouseenter: handleMouseenter,
241
+ onMouseleave: handleMouseleave
242
+ }, [
243
+ createElementVNode("div", {
244
+ class: normalizeClass(["h-full", [{
245
+ "bg-background-sidebar-deep": __props.isSidebarMixed,
246
+ "border-r border-border bg-background-sidebar": !__props.isSidebarMixed
247
+ }]]),
248
+ style: normalizeStyle({ width: `${__props.width}px` })
249
+ }, [
250
+ !collapse.value && !__props.isSidebarMixed && __props.showFixedButton ? (openBlock(), createBlock(_sfc_main$3, {
251
+ key: 0,
252
+ "expand-on-hover": expandOnHover.value,
253
+ "onUpdate:expandOnHover": _cache[0] || (_cache[0] = ($event) => expandOnHover.value = $event)
254
+ }, null, 8, ["expand-on-hover"])) : createCommentVNode("v-if", true),
255
+ unref(slots).logo ? (openBlock(), createElementBlock("div", {
256
+ key: 1,
257
+ style: normalizeStyle(headerStyle.value)
258
+ }, [renderSlot(_ctx.$slots, "logo")], 4)) : createCommentVNode("v-if", true),
259
+ createVNode(unref(_sfc_main$1), {
260
+ style: normalizeStyle(contentStyle.value),
261
+ shadow: "",
262
+ "shadow-border": ""
263
+ }, {
264
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
265
+ _: 3
266
+ }, 8, ["style"]),
267
+ createElementVNode("div", { style: normalizeStyle(collapseStyle.value) }, null, 4),
268
+ __props.showCollapseButton && !__props.isSidebarMixed ? (openBlock(), createBlock(_sfc_main$2, {
269
+ key: 2,
270
+ collapsed: collapse.value,
271
+ "onUpdate:collapsed": _cache[1] || (_cache[1] = ($event) => collapse.value = $event)
272
+ }, null, 8, ["collapsed"])) : createCommentVNode("v-if", true)
273
+ ], 6),
274
+ __props.isSidebarMixed ? (openBlock(), createElementBlock("div", {
275
+ key: 0,
276
+ class: normalizeClass([[__props.themeSub, { "border-l": extraVisible.value }], "border-r border-border bg-background-sidebar h-full transition-[left,width]-300 ease-out top-0 fixed overflow-hidden"]),
277
+ style: normalizeStyle(extraStyle.value)
278
+ }, [
279
+ __props.isSidebarMixed && expandOnHover.value ? (openBlock(), createBlock(_sfc_main$2, {
280
+ key: 0,
281
+ collapsed: extraCollapse.value,
282
+ "onUpdate:collapsed": _cache[2] || (_cache[2] = ($event) => extraCollapse.value = $event)
283
+ }, null, 8, ["collapsed"])) : createCommentVNode("v-if", true),
284
+ !extraCollapse.value ? (openBlock(), createBlock(_sfc_main$3, {
285
+ key: 1,
286
+ "expand-on-hover": expandOnHover.value,
287
+ "onUpdate:expandOnHover": _cache[3] || (_cache[3] = ($event) => expandOnHover.value = $event)
288
+ }, null, 8, ["expand-on-hover"])) : createCommentVNode("v-if", true),
289
+ !extraCollapse.value ? (openBlock(), createElementBlock("div", {
290
+ key: 2,
291
+ style: normalizeStyle(extraTitleStyle.value),
292
+ class: "pl-2"
293
+ }, [renderSlot(_ctx.$slots, "extra-title")], 4)) : createCommentVNode("v-if", true),
294
+ createVNode(unref(_sfc_main$1), {
295
+ style: normalizeStyle(extraContentStyle.value),
296
+ class: "py-2 border-border",
297
+ shadow: "",
298
+ "shadow-border": ""
299
+ }, {
300
+ default: withCtx(() => [renderSlot(_ctx.$slots, "extra")]),
301
+ _: 3
302
+ }, 8, ["style"])
303
+ ], 6)) : createCommentVNode("v-if", true),
304
+ draggable.value ? (openBlock(), createElementBlock("div", {
305
+ key: 1,
306
+ ref_key: "dragBarRef",
307
+ ref: dragBarRef,
308
+ style: normalizeStyle(dragBarStyle.value),
309
+ class: "w-0.5 cursor-col-resize inset-y-0 absolute z-1000 hover:bg-primary -right-px",
310
+ onMousedown: handleDragSidebar
311
+ }, null, 36)) : createCommentVNode("v-if", true)
312
+ ], 46, _hoisted_1)) : createCommentVNode("v-if", true)]),
313
+ _: 3
314
+ })], 64);
315
+ };
316
+ }
317
+ });
318
+ //#endregion
319
+ export { _sfc_main as default };
@@ -0,0 +1,21 @@
1
+ import { computed, createElementBlock, defineComponent, normalizeStyle, openBlock, renderSlot } from "vue";
2
+ //#region src/layout/components/taman-core-layout-tabbar.vue
3
+ const _sfc_main = /*@__PURE__*/ defineComponent({
4
+ __name: "taman-core-layout-tabbar",
5
+ props: { height: {} },
6
+ setup(__props) {
7
+ const props = __props;
8
+ const style = computed(() => {
9
+ const { height } = props;
10
+ return { height: `${height}px` };
11
+ });
12
+ return (_ctx, _cache) => {
13
+ return openBlock(), createElementBlock("section", {
14
+ style: normalizeStyle(style.value),
15
+ class: "border-b border-border bg-background flex w-full transition-colors-280"
16
+ }, [renderSlot(_ctx.$slots, "default")], 4);
17
+ };
18
+ }
19
+ });
20
+ //#endregion
21
+ export { _sfc_main as default };
@@ -0,0 +1,31 @@
1
+ import { computed } from "vue";
2
+ //#region src/layout/composables/use-layout.ts
3
+ function useLayout(props) {
4
+ const currentLayout = computed(() => props.isMobile ? "sidebar-nav" : props.layout);
5
+ /**
6
+ * Full-screen content without sidebar, footer, header, or tab bar
7
+ */
8
+ const isFullContent = computed(() => currentLayout.value === "full-content");
9
+ /**
10
+ * Whether mixed sidebar navigation is active
11
+ */
12
+ const isSidebarMixedNav = computed(() => currentLayout.value === "sidebar-mixed-nav");
13
+ /**
14
+ * Whether top header navigation is active
15
+ */
16
+ const isHeaderNav = computed(() => currentLayout.value === "header-nav");
17
+ /**
18
+ * Whether mixed navigation is active
19
+ */
20
+ const isMixedNav = computed(() => currentLayout.value === "mixed-nav" || currentLayout.value === "header-sidebar-nav");
21
+ return {
22
+ currentLayout,
23
+ isFullContent,
24
+ isHeaderMixedNav: computed(() => currentLayout.value === "header-mixed-nav"),
25
+ isHeaderNav,
26
+ isMixedNav,
27
+ isSidebarMixedNav
28
+ };
29
+ }
30
+ //#endregion
31
+ export { useLayout };
@@ -0,0 +1,103 @@
1
+ import { ref } from "vue";
2
+ //#region src/layout/composables/use-sidebar-drag.ts
3
+ function useSidebarDrag() {
4
+ const isDragging = ref(false);
5
+ let cleanup = null;
6
+ let dragOverlay = null;
7
+ function startDrag(event, options, elements, onDrag) {
8
+ const { min, max } = options;
9
+ const { dragBar, target } = elements;
10
+ if (isDragging.value || !dragBar || !target) return;
11
+ event.preventDefault();
12
+ event.stopPropagation();
13
+ isDragging.value = true;
14
+ const startX = event.clientX;
15
+ const startWidth = target.getBoundingClientRect().width;
16
+ const startLeft = dragBar.offsetLeft;
17
+ dragBar.classList.add("bg-primary");
18
+ dragBar.classList.remove("bg-primary/30");
19
+ const dragBarTransition = dragBar.style.transition;
20
+ const targetTransition = target.style.transition;
21
+ dragBar.style.transition = "none";
22
+ target.style.transition = "none";
23
+ dragOverlay = document.createElement("div");
24
+ dragOverlay.style.position = "fixed";
25
+ dragOverlay.style.inset = "0";
26
+ dragOverlay.style.zIndex = "9999";
27
+ dragOverlay.style.cursor = "col-resize";
28
+ dragOverlay.style.userSelect = "none";
29
+ dragOverlay.style.outline = "none";
30
+ dragOverlay.tabIndex = -1;
31
+ dragOverlay.style.background = "rgba(0,0,0,0)";
32
+ document.body.append(dragOverlay);
33
+ function onMouseMove(moveEvent) {
34
+ if (!isDragging.value || !dragBar || !target) {
35
+ endDrag();
36
+ return;
37
+ }
38
+ const deltaX = moveEvent.clientX - startX;
39
+ let currentWidth = startWidth + deltaX;
40
+ const isOutOfMin = currentWidth < min;
41
+ const isOutOfMax = currentWidth > max;
42
+ const isOutOfBounds = isOutOfMin || isOutOfMax;
43
+ if (isOutOfMin) currentWidth = min;
44
+ if (isOutOfMax) currentWidth = max;
45
+ const newLeft = startLeft + (currentWidth - startWidth);
46
+ if (dragOverlay) dragOverlay.style.cursor = isOutOfBounds ? "not-allowed" : "col-resize";
47
+ dragBar.style.left = `${newLeft}px`;
48
+ if (isOutOfBounds) {
49
+ dragBar.classList.add("bg-primary/30");
50
+ dragBar.classList.remove("bg-primary");
51
+ } else {
52
+ dragBar.classList.add("bg-primary");
53
+ dragBar.classList.remove("bg-primary/30");
54
+ }
55
+ }
56
+ function onMouseUp(upEvent) {
57
+ if (!isDragging.value || !dragBar || !target) {
58
+ endDrag();
59
+ return;
60
+ }
61
+ const deltaX = upEvent.clientX - startX;
62
+ let newWidth = startWidth + deltaX;
63
+ newWidth = Math.min(max, Math.max(min, newWidth));
64
+ dragBar.classList.remove("bg-primary", "bg-primary/30");
65
+ try {
66
+ onDrag?.(Math.round(newWidth));
67
+ } finally {
68
+ endDrag();
69
+ }
70
+ }
71
+ document.addEventListener("mousemove", onMouseMove);
72
+ document.addEventListener("mouseup", onMouseUp);
73
+ cleanup = () => {
74
+ if (!cleanup) return;
75
+ document.removeEventListener("mousemove", onMouseMove);
76
+ document.removeEventListener("mouseup", onMouseUp);
77
+ if (dragBar) {
78
+ dragBar.style.transition = dragBarTransition;
79
+ dragBar.style.left = "";
80
+ dragBar.classList.remove("bg-primary", "bg-primary/30");
81
+ }
82
+ if (target) target.style.transition = targetTransition;
83
+ if (dragOverlay) {
84
+ dragOverlay.remove();
85
+ dragOverlay = null;
86
+ }
87
+ isDragging.value = false;
88
+ cleanup = null;
89
+ };
90
+ }
91
+ function endDrag() {
92
+ cleanup?.();
93
+ }
94
+ return {
95
+ startDrag,
96
+ endDrag,
97
+ get isDragging() {
98
+ return isDragging.value;
99
+ }
100
+ };
101
+ }
102
+ //#endregion
103
+ export { useSidebarDrag };
@@ -0,0 +1,9 @@
1
+ //#region src/layout/header-scroll-state.ts
2
+ function resolveHeaderHiddenOnScroll({ arrivedTop, currentHidden, directionDown, directionUp, headerHeight, scrollTop }) {
3
+ if (arrivedTop || scrollTop < headerHeight) return false;
4
+ if (directionUp) return false;
5
+ if (directionDown) return true;
6
+ return currentHidden;
7
+ }
8
+ //#endregion
9
+ export { resolveHeaderHiddenOnScroll };
@@ -0,0 +1,3 @@
1
+ import { TamanLayoutProps } from "./taman-core-layout.js";
2
+ import _default from "./taman-core-layout.vue.js";
3
+ export { _default as TamanCoreLayout, type TamanLayoutProps };
@@ -0,0 +1,2 @@
1
+ import _sfc_main from "./taman-core-layout.mjs";
2
+ export { _sfc_main as TamanCoreLayout };
@@ -0,0 +1,41 @@
1
+ import { TamanContentCompactType, TamanLayoutHeaderModeType, TamanLayoutType, TamanThemeModeType } from "@vinicunca/taman-core/typings";
2
+ //#region src/layout/taman-core-layout.d.ts
3
+ interface TamanLayoutProps {
4
+ contentCompact?: TamanContentCompactType;
5
+ contentCompactWidth?: number;
6
+ contentPadding?: number;
7
+ contentPaddingBottom?: number;
8
+ contentPaddingLeft?: number;
9
+ contentPaddingRight?: number;
10
+ contentPaddingTop?: number;
11
+ footerEnable?: boolean;
12
+ footerFixed?: boolean;
13
+ footerHeight?: number;
14
+ headerHeight?: number;
15
+ headerHidden?: boolean;
16
+ headerMode?: TamanLayoutHeaderModeType;
17
+ headerTheme?: TamanThemeModeType;
18
+ headerToggleSidebarButton?: boolean;
19
+ headerVisible?: boolean;
20
+ isMobile?: boolean;
21
+ layout?: TamanLayoutType;
22
+ sidebarCollapse?: boolean;
23
+ sidebarCollapsedButton?: boolean;
24
+ sidebarCollapseShowTitle?: boolean;
25
+ sidebarEnable?: boolean;
26
+ sidebarExtraCollapsedWidth?: number;
27
+ sidebarExtraTitleHeight?: number;
28
+ sidebarFixedButton?: boolean;
29
+ sidebarHidden?: boolean;
30
+ sidebarLogoVisible: boolean;
31
+ sidebarMixedWidth?: number;
32
+ sidebarTheme?: TamanThemeModeType;
33
+ sidebarThemeSub?: TamanThemeModeType;
34
+ sidebarWidth?: number;
35
+ sideCollapseWidth?: number;
36
+ tabbarEnable?: boolean;
37
+ tabbarHeight?: number;
38
+ zIndex?: number;
39
+ }
40
+ //#endregion
41
+ export type { TamanLayoutProps };