@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,10 @@
1
+ import { FileUploadProps } from "pohon-ui";
2
+ //#region src/components/file-upload/taman-file-upload.types.d.ts
3
+ interface TamanFileUploadProps<Multiple extends boolean = false> extends FileUploadProps<Multiple> {
4
+ label?: string;
5
+ labelActions?: string;
6
+ labelPreview?: string;
7
+ labelAddMore?: string;
8
+ }
9
+ //#endregion
10
+ export { TamanFileUploadProps };
@@ -0,0 +1,21 @@
1
+ import { TamanFileUploadProps } from "./taman-file-upload.types.js";
2
+ //#region src/components/file-upload/taman-file-upload.vue.d.ts
3
+ declare const __VLS_export: <M extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<(TamanFileUploadProps<M> & {
5
+ modelValue?: (M extends true ? Array<File> : File) | null;
6
+ }) & {
7
+ "onUpdate:modelValue"?: ((value: (M extends true ? File[] : File) | null | undefined) => any) | undefined;
8
+ }> & (typeof globalThis extends {
9
+ __VLS_PROPS_FALLBACK: infer P;
10
+ } ? P : {});
11
+ expose: (exposed: {}) => void;
12
+ attrs: any;
13
+ slots: {};
14
+ emit: (event: "update:modelValue", value: (M extends true ? File[] : File) | null | undefined) => void;
15
+ }>) => import("vue").VNode & {
16
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
17
+ };
18
+ declare const _default: typeof __VLS_export;
19
+ type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
20
+ //#endregion
21
+ export { _default as default };
@@ -0,0 +1,27 @@
1
+ import _sfc_main$1 from "../button/taman-button-icon.mjs";
2
+ import "../button/index.mjs";
3
+ import { createBlock, defineComponent, openBlock, unref } from "vue";
4
+ import { useFullscreen } from "@vueuse/core";
5
+ //#region src/components/full-screen/full-screen.vue
6
+ const _sfc_main = /*@__PURE__*/ defineComponent({
7
+ name: "TamanFullScreen",
8
+ __name: "full-screen",
9
+ props: { tooltipText: {} },
10
+ setup(__props) {
11
+ const { isFullscreen, toggle } = useFullscreen();
12
+ isFullscreen.value = !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement);
13
+ return (_ctx, _cache) => {
14
+ return openBlock(), createBlock(unref(_sfc_main$1), {
15
+ "tooltip-text": __props.tooltipText,
16
+ icon: unref(isFullscreen) ? "lucide:minimize" : "lucide:maximize",
17
+ onClick: unref(toggle)
18
+ }, null, 8, [
19
+ "tooltip-text",
20
+ "icon",
21
+ "onClick"
22
+ ]);
23
+ };
24
+ }
25
+ });
26
+ //#endregion
27
+ export { _sfc_main as default };
@@ -0,0 +1,8 @@
1
+ //#region src/components/full-screen/full-screen.vue.d.ts
2
+ type __VLS_Props = {
3
+ tooltipText?: string;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ //#endregion
8
+ export { _default as default };
@@ -0,0 +1,2 @@
1
+ import _sfc_main from "./full-screen.mjs";
2
+ export { _sfc_main as TamanFullScreen };
@@ -0,0 +1,27 @@
1
+ import { computed, createBlock, createElementBlock, defineComponent, mergeProps, openBlock } from "vue";
2
+ import { isHttpUrl, isString } from "@vinicunca/taman-core/utils";
3
+ import PIcon from "pohon-ui/components/Icon.vue";
4
+ //#region src/components/icon/icon.vue
5
+ const _hoisted_1 = ["src"];
6
+ const _sfc_main = /*@__PURE__*/ defineComponent({
7
+ name: "TamanIcon",
8
+ __name: "icon",
9
+ props: { icon: {} },
10
+ setup(__props) {
11
+ const props = __props;
12
+ const isRemoteIcon = computed(() => {
13
+ return isString(props.icon) && isHttpUrl(props.icon);
14
+ });
15
+ return (_ctx, _cache) => {
16
+ return isRemoteIcon.value ? (openBlock(), createElementBlock("img", mergeProps({
17
+ key: 0,
18
+ src: props.icon
19
+ }, _ctx.$attrs), null, 16, _hoisted_1)) : (openBlock(), createBlock(PIcon, mergeProps({
20
+ key: 1,
21
+ name: props.icon
22
+ }, _ctx.$attrs), null, 16, ["name"]));
23
+ };
24
+ }
25
+ });
26
+ //#endregion
27
+ export { _sfc_main as default };
@@ -0,0 +1,9 @@
1
+ import { Component } from "vue";
2
+ //#region src/components/icon/icon.vue.d.ts
3
+ type __VLS_Props = {
4
+ icon?: Component | string;
5
+ };
6
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: typeof __VLS_export;
8
+ //#endregion
9
+ export { _default as default };
@@ -0,0 +1,2 @@
1
+ import _default from "./icon.vue.js";
2
+ export { _default as TamanIcon };
@@ -0,0 +1,2 @@
1
+ import _sfc_main from "./icon.mjs";
2
+ export { _sfc_main as TamanIcon };
@@ -0,0 +1,34 @@
1
+ import _default from "./auth/taman-auth-form.vue.js";
2
+ import "./auth/index.js";
3
+ import _default$1 from "./back-to-top/taman-back-to-top.vue.js";
4
+ import { TamanButtonCheckGroupModel, TamanButtonCheckGroupOption, TamanButtonCheckGroupProps, TamanButtonCheckGroupValue } from "./button/taman-button-check-group.types.js";
5
+ import _default$2 from "./button/taman-button-check-group.vue.js";
6
+ import _default$3 from "./button/taman-button-icon.vue.js";
7
+ import "./button/index.js";
8
+ import _default$4 from "./descriptions/taman-description-item.vue.js";
9
+ import { TamanDescriptionsBreakpoint, TamanDescriptionsColumn, TamanDescriptionsItemProps, TamanDescriptionsItemSpan, TamanDescriptionsItemType, TamanDescriptionsLayout, TamanDescriptionsProps, TamanDescriptionsRenderNode, TamanDescriptionsSize, TamanInternalDescriptionsItem, TamanScreenMap } from "./descriptions/taman-description.types.js";
10
+ import _default$5 from "./descriptions/taman-description.vue.js";
11
+ import "./descriptions/index.js";
12
+ import { TamanFileUploadProps } from "./file-upload/taman-file-upload.types.js";
13
+ import _default$6 from "./file-upload/taman-file-upload.vue.js";
14
+ import "./file-upload/index.js";
15
+ import _default$7 from "./full-screen/full-screen.vue.js";
16
+ import _default$8 from "./icon/icon.vue.js";
17
+ import "./icon/index.js";
18
+ import { PASSWORD_STRENGTH_CHECKS, PASSWORD_STRENGTH_MAX, isPasswordStrong, passwordStrengthScore } from "./input/password-strength.js";
19
+ import { TamanInputCurrencyProps } from "./input/taman-input-currency.types.js";
20
+ import _default$9 from "./input/taman-input-currency.vue.js";
21
+ import _default$10 from "./input/taman-input-password.vue.js";
22
+ import "./input/index.js";
23
+ import { TamanInputDateProps } from "./input-date/taman-input-date.types.js";
24
+ import _default$11 from "./input-date/taman-input-date.vue.js";
25
+ import "./input-date/index.js";
26
+ import { TamanLoadingIcon, TamanLoadingIconProps } from "./loading/types.js";
27
+ import _default$12 from "./loading/taman-loading.vue.js";
28
+ import "./loading/index.js";
29
+ import _default$13 from "./logo/taman-logo.vue.js";
30
+ import _default$14 from "./render-content/render-content.vue.js";
31
+ import "./render-content/index.js";
32
+ import _default$15 from "./scrollbar/scrollbar.vue.js";
33
+ import "./scrollbar/index.js";
34
+ export { PASSWORD_STRENGTH_CHECKS, PASSWORD_STRENGTH_MAX, _default as TamanAuthForm, _default$1 as TamanBackToTop, _default$2 as TamanButtonCheckGroup, type TamanButtonCheckGroupModel, type TamanButtonCheckGroupOption, type TamanButtonCheckGroupProps, type TamanButtonCheckGroupValue, _default$3 as TamanButtonIcon, _default$5 as TamanDescription, _default$4 as TamanDescriptionItem, TamanDescriptionsBreakpoint, TamanDescriptionsColumn, TamanDescriptionsItemProps, TamanDescriptionsItemSpan, TamanDescriptionsItemType, TamanDescriptionsLayout, TamanDescriptionsProps, TamanDescriptionsRenderNode, TamanDescriptionsSize, _default$6 as TamanFileUpload, type TamanFileUploadProps, _default$7 as TamanFullScreen, _default$8 as TamanIcon, _default$9 as TamanInputCurrency, type TamanInputCurrencyProps, _default$11 as TamanInputDate, type TamanInputDateProps, _default$10 as TamanInputPassword, TamanInternalDescriptionsItem, _default$12 as TamanLoading, type TamanLoadingIcon, type TamanLoadingIconProps, _default$13 as TamanLogo, _default$14 as TamanRenderContent, TamanScreenMap, _default$15 as TamanScrollbar, isPasswordStrong, passwordStrengthScore };
@@ -0,0 +1,31 @@
1
+ import _sfc_main from "./auth/taman-auth-form.mjs";
2
+ import "./auth/index.mjs";
3
+ import _sfc_main$1 from "./back-to-top/taman-back-to-top.mjs";
4
+ import "./back-to-top/index.mjs";
5
+ import _sfc_main$2 from "./render-content/render-content.mjs";
6
+ import "./render-content/index.mjs";
7
+ import _sfc_main$3 from "./button/taman-button-check-group.mjs";
8
+ import _sfc_main$4 from "./button/taman-button-icon.mjs";
9
+ import "./button/index.mjs";
10
+ import taman_description_item_default from "./descriptions/taman-description-item.mjs";
11
+ import _sfc_main$5 from "./descriptions/taman-description.mjs";
12
+ import "./descriptions/index.mjs";
13
+ import _sfc_main$6 from "./file-upload/taman-file-upload.mjs";
14
+ import "./file-upload/index.mjs";
15
+ import _sfc_main$7 from "./full-screen/full-screen.mjs";
16
+ import "./full-screen/index.mjs";
17
+ import _sfc_main$8 from "./icon/icon.mjs";
18
+ import "./icon/index.mjs";
19
+ import { PASSWORD_STRENGTH_CHECKS, PASSWORD_STRENGTH_MAX, isPasswordStrong, passwordStrengthScore } from "./input/password-strength.mjs";
20
+ import _sfc_main$9 from "./input/taman-input-currency.mjs";
21
+ import _sfc_main$10 from "./input/taman-input-password.mjs";
22
+ import "./input/index.mjs";
23
+ import _sfc_main$11 from "./input-date/taman-input-date.mjs";
24
+ import "./input-date/index.mjs";
25
+ import _sfc_main$12 from "./loading/taman-loading.mjs";
26
+ import "./loading/index.mjs";
27
+ import _sfc_main$13 from "./logo/taman-logo.mjs";
28
+ import "./logo/index.mjs";
29
+ import _sfc_main$14 from "./scrollbar/scrollbar.mjs";
30
+ import "./scrollbar/index.mjs";
31
+ export { PASSWORD_STRENGTH_CHECKS, PASSWORD_STRENGTH_MAX, _sfc_main as TamanAuthForm, _sfc_main$1 as TamanBackToTop, _sfc_main$3 as TamanButtonCheckGroup, _sfc_main$4 as TamanButtonIcon, _sfc_main$5 as TamanDescription, taman_description_item_default as TamanDescriptionItem, _sfc_main$6 as TamanFileUpload, _sfc_main$7 as TamanFullScreen, _sfc_main$8 as TamanIcon, _sfc_main$9 as TamanInputCurrency, _sfc_main$11 as TamanInputDate, _sfc_main$10 as TamanInputPassword, _sfc_main$12 as TamanLoading, _sfc_main$13 as TamanLogo, _sfc_main$2 as TamanRenderContent, _sfc_main$14 as TamanScrollbar, isPasswordStrong, passwordStrengthScore };
@@ -0,0 +1,5 @@
1
+ import { PASSWORD_STRENGTH_CHECKS, PASSWORD_STRENGTH_MAX, isPasswordStrong, passwordStrengthScore } from "./password-strength.js";
2
+ import { TamanInputCurrencyProps } from "./taman-input-currency.types.js";
3
+ import _default from "./taman-input-currency.vue.js";
4
+ import _default$1 from "./taman-input-password.vue.js";
5
+ export { PASSWORD_STRENGTH_CHECKS, PASSWORD_STRENGTH_MAX, _default as TamanInputCurrency, type TamanInputCurrencyProps, _default$1 as TamanInputPassword, isPasswordStrong, passwordStrengthScore };
@@ -0,0 +1,4 @@
1
+ import { PASSWORD_STRENGTH_CHECKS, PASSWORD_STRENGTH_MAX, isPasswordStrong, passwordStrengthScore } from "./password-strength.mjs";
2
+ import _sfc_main from "./taman-input-currency.mjs";
3
+ import _sfc_main$1 from "./taman-input-password.mjs";
4
+ export { PASSWORD_STRENGTH_CHECKS, PASSWORD_STRENGTH_MAX, _sfc_main as TamanInputCurrency, _sfc_main$1 as TamanInputPassword, isPasswordStrong, passwordStrengthScore };
@@ -0,0 +1,7 @@
1
+ //#region src/components/input/password-strength.d.ts
2
+ declare const PASSWORD_STRENGTH_CHECKS: readonly [RegExp, RegExp, RegExp, RegExp, RegExp];
3
+ declare const PASSWORD_STRENGTH_MAX: 5;
4
+ declare function passwordStrengthScore(value?: string): number;
5
+ declare function isPasswordStrong(value?: string): boolean;
6
+ //#endregion
7
+ export { PASSWORD_STRENGTH_CHECKS, PASSWORD_STRENGTH_MAX, isPasswordStrong, passwordStrengthScore };
@@ -0,0 +1,21 @@
1
+ //#region src/components/input/password-strength.ts
2
+ /**
3
+ * Shared password strength checks used by the strength meter and Zod schemas.
4
+ * Keep this list in sync across UI and form validation.
5
+ */
6
+ const PASSWORD_STRENGTH_CHECKS = [
7
+ /.{8,}/,
8
+ /\d/,
9
+ /[a-z]/,
10
+ /[A-Z]/,
11
+ /[^A-Z0-9]/i
12
+ ];
13
+ const PASSWORD_STRENGTH_MAX = PASSWORD_STRENGTH_CHECKS.length;
14
+ function passwordStrengthScore(value = "") {
15
+ return PASSWORD_STRENGTH_CHECKS.reduce((score, pattern) => score + (pattern.test(value) ? 1 : 0), 0);
16
+ }
17
+ function isPasswordStrong(value = "") {
18
+ return passwordStrengthScore(value) === PASSWORD_STRENGTH_MAX;
19
+ }
20
+ //#endregion
21
+ export { PASSWORD_STRENGTH_CHECKS, PASSWORD_STRENGTH_MAX, isPasswordStrong, passwordStrengthScore };
@@ -0,0 +1,76 @@
1
+ import { createBlock, defineComponent, mergeModels, mergeProps, nextTick, openBlock, ref, unref, useModel } from "vue";
2
+ import { reactiveOmit } from "@vueuse/core";
3
+ import { useForwardProps } from "@vinicunca/taman-core/composables";
4
+ import { NumberFormatter, NumberParser } from "@internationalized/number";
5
+ import PInput from "pohon-ui/components/Input.vue";
6
+ //#region src/components/input/taman-input-currency.vue
7
+ const _sfc_main = /*@__PURE__*/ defineComponent({
8
+ inheritAttrs: false,
9
+ __name: "taman-input-currency",
10
+ props: /*@__PURE__*/ mergeModels({
11
+ defaultValue: {},
12
+ formatOptions: {},
13
+ as: {},
14
+ id: {},
15
+ name: {},
16
+ type: {},
17
+ placeholder: {},
18
+ color: {},
19
+ variant: {},
20
+ size: {},
21
+ required: { type: Boolean },
22
+ autocomplete: {},
23
+ autofocus: { type: Boolean },
24
+ autofocusDelay: {},
25
+ disabled: { type: Boolean },
26
+ highlight: { type: Boolean },
27
+ fixed: { type: Boolean },
28
+ modelValue: {},
29
+ modelModifiers: {},
30
+ class: {},
31
+ ui: {},
32
+ icon: {},
33
+ avatar: {},
34
+ leading: { type: Boolean },
35
+ leadingIcon: {},
36
+ trailing: { type: Boolean },
37
+ trailingIcon: {},
38
+ loading: { type: Boolean },
39
+ loadingIcon: {}
40
+ }, {
41
+ "modelValue": { default: null },
42
+ "modelModifiers": {}
43
+ }),
44
+ emits: ["update:modelValue"],
45
+ setup(__props) {
46
+ const props = __props;
47
+ const formatOptions = {
48
+ style: "currency",
49
+ currency: "USD",
50
+ maximumFractionDigits: 0
51
+ };
52
+ const formatter = new NumberFormatter("en-US", formatOptions);
53
+ const parser = new NumberParser("en-US", formatOptions);
54
+ const inputProps = useForwardProps(reactiveOmit(props, "formatOptions", "modelValue"));
55
+ const modelValue = useModel(__props, "modelValue");
56
+ const displayValue = ref("");
57
+ function handleInput(event) {
58
+ const input = event.target;
59
+ const parsed = parser.parse(input.value);
60
+ if (Number.isNaN(parsed)) {
61
+ displayValue.value = input.value;
62
+ return;
63
+ }
64
+ modelValue.value = parsed;
65
+ displayValue.value = formatter.format(parsed);
66
+ nextTick(() => {
67
+ input.setSelectionRange(displayValue.value.length, displayValue.value.length);
68
+ });
69
+ }
70
+ return (_ctx, _cache) => {
71
+ return openBlock(), createBlock(PInput, mergeProps({ "model-value": displayValue.value }, unref(inputProps), { onInput: handleInput }), null, 16, ["model-value"]);
72
+ };
73
+ }
74
+ });
75
+ //#endregion
76
+ export { _sfc_main as default };
@@ -0,0 +1,8 @@
1
+ import { InputProps } from "pohon-ui";
2
+ //#region src/components/input/taman-input-currency.types.d.ts
3
+ interface TamanInputCurrencyProps extends Omit<InputProps, 'defaultValue'> {
4
+ defaultValue?: NonNullable<InputProps['defaultValue']>;
5
+ formatOptions?: Intl.NumberFormatOptions;
6
+ }
7
+ //#endregion
8
+ export { TamanInputCurrencyProps };
@@ -0,0 +1,15 @@
1
+ import { TamanInputCurrencyProps } from "./taman-input-currency.types.js";
2
+ //#region src/components/input/taman-input-currency.vue.d.ts
3
+ type __VLS_Props = TamanInputCurrencyProps;
4
+ type __VLS_ModelProps = {
5
+ 'modelValue'?: number | null;
6
+ };
7
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ "update:modelValue": (value: number | null) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
11
+ "onUpdate:modelValue"?: ((value: number | null) => any) | undefined;
12
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: typeof __VLS_export;
14
+ //#endregion
15
+ export { _default as default };
@@ -0,0 +1,99 @@
1
+ import { PASSWORD_STRENGTH_MAX, passwordStrengthScore } from "./password-strength.mjs";
2
+ import { computed, createBlock, createCommentVNode, createElementBlock, createVNode, defineComponent, mergeModels, mergeProps, openBlock, ref, unref, useModel, useTemplateRef, withCtx } from "vue";
3
+ import PButton from "pohon-ui/components/Button.vue";
4
+ import { reactiveOmit } from "@vueuse/core";
5
+ import { useForwardProps, useSimpleLocale } from "@vinicunca/taman-core/composables";
6
+ import PInput from "pohon-ui/components/Input.vue";
7
+ import PProgress from "pohon-ui/components/Progress.vue";
8
+ //#region src/components/input/taman-input-password.vue
9
+ const _hoisted_1 = { class: "flex flex-col gap-2 w-full" };
10
+ const _sfc_main = /*@__PURE__*/ defineComponent({
11
+ inheritAttrs: false,
12
+ __name: "taman-input-password",
13
+ props: /*@__PURE__*/ mergeModels({
14
+ as: {},
15
+ id: {},
16
+ name: {},
17
+ type: {},
18
+ placeholder: {},
19
+ color: {},
20
+ variant: {},
21
+ size: {},
22
+ required: { type: Boolean },
23
+ autocomplete: {},
24
+ autofocus: { type: Boolean },
25
+ autofocusDelay: {},
26
+ disabled: { type: Boolean },
27
+ highlight: { type: Boolean },
28
+ fixed: { type: Boolean },
29
+ modelValue: {},
30
+ defaultValue: {},
31
+ modelModifiers: {},
32
+ class: {},
33
+ ui: {},
34
+ icon: {},
35
+ avatar: {},
36
+ leading: { type: Boolean },
37
+ leadingIcon: {},
38
+ trailing: { type: Boolean },
39
+ trailingIcon: {},
40
+ loading: { type: Boolean },
41
+ loadingIcon: {},
42
+ passwordStrength: { type: Boolean }
43
+ }, {
44
+ "modelValue": {},
45
+ "modelModifiers": {}
46
+ }),
47
+ emits: ["update:modelValue"],
48
+ setup(__props) {
49
+ const inputProps = useForwardProps(reactiveOmit(__props, "passwordStrength", "defaultValue", "modelValue"));
50
+ const { $t } = useSimpleLocale();
51
+ const inputRef = useTemplateRef("inputRef");
52
+ const modelValue = useModel(__props, "modelValue");
53
+ const isPasswordVisible = ref(false);
54
+ const score = computed(() => passwordStrengthScore(modelValue.value));
55
+ const color = computed(() => {
56
+ if (score.value === 0) return "neutral";
57
+ if (score.value <= 2) return "error";
58
+ if (score.value < PASSWORD_STRENGTH_MAX) return "warning";
59
+ return "success";
60
+ });
61
+ return (_ctx, _cache) => {
62
+ return openBlock(), createElementBlock("div", _hoisted_1, [createVNode(PInput, mergeProps({
63
+ ref_key: "inputRef",
64
+ ref: inputRef,
65
+ modelValue: modelValue.value,
66
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => modelValue.value = $event)
67
+ }, unref(inputProps), { type: isPasswordVisible.value ? "text" : "password" }), {
68
+ trailing: withCtx(() => [createVNode(PButton, {
69
+ color: "neutral",
70
+ variant: "link",
71
+ size: "sm",
72
+ icon: isPasswordVisible.value ? "lucide:eye-off" : "lucide:eye",
73
+ "aria-label": isPasswordVisible.value ? unref($t)("hidePassword") : unref($t)("showPassword"),
74
+ "aria-pressed": isPasswordVisible.value,
75
+ "aria-controls": inputRef.value?.inputRef?.id,
76
+ onClick: _cache[0] || (_cache[0] = ($event) => isPasswordVisible.value = !isPasswordVisible.value)
77
+ }, null, 8, [
78
+ "icon",
79
+ "aria-label",
80
+ "aria-pressed",
81
+ "aria-controls"
82
+ ])]),
83
+ _: 1
84
+ }, 16, ["modelValue", "type"]), __props.passwordStrength ? (openBlock(), createBlock(PProgress, {
85
+ key: 0,
86
+ color: color.value,
87
+ "model-value": score.value,
88
+ max: unref(PASSWORD_STRENGTH_MAX),
89
+ size: "sm"
90
+ }, null, 8, [
91
+ "color",
92
+ "model-value",
93
+ "max"
94
+ ])) : createCommentVNode("v-if", true)]);
95
+ };
96
+ }
97
+ });
98
+ //#endregion
99
+ export { _sfc_main as default };
@@ -0,0 +1,17 @@
1
+ import { InputProps } from "pohon-ui";
2
+ //#region src/components/input/taman-input-password.vue.d.ts
3
+ type __VLS_Props = InputProps & {
4
+ passwordStrength?: boolean;
5
+ };
6
+ type __VLS_ModelProps = {
7
+ modelValue?: string;
8
+ };
9
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
10
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ "update:modelValue": (value: string | undefined) => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
13
+ "onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
14
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const _default: typeof __VLS_export;
16
+ //#endregion
17
+ export { _default as default };
@@ -0,0 +1,26 @@
1
+ import { isDateValue } from "@vinicunca/taman-core/utils";
2
+ import { getLocalTimeZone } from "@internationalized/date";
3
+ //#region src/components/input-date/format-calendar-input-value.ts
4
+ function toDate(value) {
5
+ if ("timeZone" in value) return value.toDate();
6
+ return value.toDate(getLocalTimeZone());
7
+ }
8
+ function isDateRange(value) {
9
+ if (value == null || typeof value !== "object" || isDateValue(value)) return false;
10
+ return "start" in value || "end" in value;
11
+ }
12
+ function formatCalendarInputValue(value, formatDate) {
13
+ if (isDateValue(value)) return formatDate(toDate(value));
14
+ if (!isDateRange(value)) return;
15
+ const start = isDateValue(value.start) ? formatDate(toDate(value.start)) : void 0;
16
+ const end = isDateValue(value.end) ? formatDate(toDate(value.end)) : void 0;
17
+ if (start && end) return `${start} – ${end}`;
18
+ return start ?? end;
19
+ }
20
+ function isCalendarInputComplete(value) {
21
+ if (isDateValue(value)) return true;
22
+ if (!isDateRange(value)) return false;
23
+ return isDateValue(value.start) && isDateValue(value.end);
24
+ }
25
+ //#endregion
26
+ export { formatCalendarInputValue, isCalendarInputComplete };
@@ -0,0 +1,3 @@
1
+ import { TamanInputDateProps } from "./taman-input-date.types.js";
2
+ import _default from "./taman-input-date.vue.js";
3
+ export { _default as TamanInputDate, type TamanInputDateProps };
@@ -0,0 +1,2 @@
1
+ import _sfc_main from "./taman-input-date.mjs";
2
+ export { _sfc_main as TamanInputDate };
@@ -0,0 +1,116 @@
1
+ import { formatCalendarInputValue, isCalendarInputComplete } from "./format-calendar-input-value.mjs";
2
+ import { Fragment, computed, createBlock, createElementBlock, createElementVNode, createVNode, defineComponent, mergeModels, mergeProps, openBlock, ref, unref, useModel, watch, withCtx } from "vue";
3
+ import { reactiveOmit } from "@vueuse/core";
4
+ import { useForwardProps, useSimpleLocale } from "@vinicunca/taman-core/composables";
5
+ import PInput from "pohon-ui/components/Input.vue";
6
+ import { useDateFormatter } from "akar";
7
+ import PCalendar from "pohon-ui/components/Calendar.vue";
8
+ import PInputDate from "pohon-ui/components/InputDate.vue";
9
+ import PPopover from "pohon-ui/components/Popover.vue";
10
+ //#region src/components/input-date/taman-input-date.vue
11
+ const _sfc_main = /*@__PURE__*/ defineComponent({
12
+ inheritAttrs: false,
13
+ __name: "taman-input-date",
14
+ props: /*@__PURE__*/ mergeModels({
15
+ type: { default: "date" },
16
+ as: {},
17
+ color: {},
18
+ variant: {},
19
+ size: {},
20
+ highlight: { type: Boolean },
21
+ fixed: { type: Boolean },
22
+ autofocus: { type: Boolean },
23
+ autofocusDelay: {},
24
+ separatorIcon: {},
25
+ range: { type: Boolean },
26
+ defaultValue: {},
27
+ modelValue: {},
28
+ class: {},
29
+ ui: {},
30
+ icon: {},
31
+ avatar: {},
32
+ leading: { type: Boolean },
33
+ leadingIcon: {},
34
+ trailing: { type: Boolean },
35
+ trailingIcon: {},
36
+ loading: { type: Boolean },
37
+ loadingIcon: {},
38
+ defaultPlaceholder: {},
39
+ placeholder: {},
40
+ hourCycle: {},
41
+ step: {},
42
+ stepSnapping: { type: Boolean },
43
+ granularity: {},
44
+ hideTimeZone: { type: Boolean },
45
+ maxValue: {},
46
+ minValue: {},
47
+ locale: {},
48
+ disabled: { type: Boolean },
49
+ readonly: { type: Boolean },
50
+ isDateUnavailable: {},
51
+ id: {},
52
+ name: {},
53
+ required: { type: Boolean }
54
+ }, {
55
+ "modelValue": {},
56
+ "modelModifiers": {}
57
+ }),
58
+ emits: ["update:modelValue"],
59
+ setup(__props) {
60
+ const props = __props;
61
+ const modelValue = useModel(__props, "modelValue");
62
+ const { currentLocale } = useSimpleLocale();
63
+ const locale = computed(() => props.locale ?? currentLocale.value);
64
+ const formatter = useDateFormatter(locale.value);
65
+ watch(locale, (next) => {
66
+ formatter.setLocale(next);
67
+ });
68
+ const inputProps = useForwardProps(reactiveOmit(props, "modelValue", "type"));
69
+ const inputRef = ref();
70
+ const isOpen = ref(false);
71
+ const inputValue = computed(() => {
72
+ return formatCalendarInputValue(modelValue.value, (date) => {
73
+ if (props.type === "year") return formatter.fullYear(date);
74
+ return formatter.fullMonthAndYear(date);
75
+ });
76
+ });
77
+ watch(modelValue, (value) => {
78
+ if (isCalendarInputComplete(value)) isOpen.value = false;
79
+ }, { deep: true });
80
+ return (_ctx, _cache) => {
81
+ return openBlock(), createElementBlock(Fragment, null, [createElementVNode("div", {
82
+ ref_key: "inputRef",
83
+ ref: inputRef,
84
+ class: "w-full",
85
+ onClick: _cache[1] || (_cache[1] = ($event) => isOpen.value = true)
86
+ }, [props.type === "date" ? (openBlock(), createBlock(PInputDate, mergeProps({
87
+ key: 0,
88
+ modelValue: modelValue.value,
89
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event)
90
+ }, unref(inputProps), { "trailing-icon": "lucide:calendar" }), null, 16, ["modelValue"])) : (openBlock(), createBlock(PInput, mergeProps({ key: 1 }, unref(inputProps), {
91
+ "model-value": inputValue.value,
92
+ readonly: "",
93
+ "trailing-icon": "lucide:calendar"
94
+ }), null, 16, ["model-value"]))], 512), createVNode(PPopover, {
95
+ open: isOpen.value,
96
+ "onUpdate:open": _cache[3] || (_cache[3] = ($event) => isOpen.value = $event),
97
+ reference: inputRef.value
98
+ }, {
99
+ content: withCtx(() => [createVNode(PCalendar, {
100
+ modelValue: modelValue.value,
101
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => modelValue.value = $event),
102
+ range: props.range,
103
+ class: "p-2",
104
+ type: props.type
105
+ }, null, 8, [
106
+ "modelValue",
107
+ "range",
108
+ "type"
109
+ ])]),
110
+ _: 1
111
+ }, 8, ["open", "reference"])], 64);
112
+ };
113
+ }
114
+ });
115
+ //#endregion
116
+ export { _sfc_main as default };
@@ -0,0 +1,14 @@
1
+ import { CalendarDate, CalendarDateTime, ZonedDateTime } from "@internationalized/date";
2
+ import { CalendarProps, InputDateProps } from "pohon-ui";
3
+ //#region src/components/input-date/taman-input-date.types.d.ts
4
+ type DateValue = CalendarDate | CalendarDateTime | ZonedDateTime;
5
+ interface DateRange {
6
+ start: DateValue | undefined;
7
+ end: DateValue | undefined;
8
+ }
9
+ type InputDateModelValue<R> = (R extends true ? DateRange : DateValue) | undefined;
10
+ interface TamanInputDateProps<R extends boolean = false> extends InputDateProps<R> {
11
+ type?: CalendarProps['type'];
12
+ }
13
+ //#endregion
14
+ export { DateRange, DateValue, InputDateModelValue, TamanInputDateProps };
@@ -0,0 +1,21 @@
1
+ import { InputDateModelValue, TamanInputDateProps } from "./taman-input-date.types.js";
2
+ //#region src/components/input-date/taman-input-date.vue.d.ts
3
+ declare const __VLS_export: <R extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<(TamanInputDateProps<R> & {
5
+ modelValue?: InputDateModelValue<R>;
6
+ }) & {
7
+ "onUpdate:modelValue"?: ((value: InputDateModelValue<R>) => any) | undefined;
8
+ }> & (typeof globalThis extends {
9
+ __VLS_PROPS_FALLBACK: infer P;
10
+ } ? P : {});
11
+ expose: (exposed: {}) => void;
12
+ attrs: any;
13
+ slots: {};
14
+ emit: (event: "update:modelValue", value: InputDateModelValue<R>) => void;
15
+ }>) => import("vue").VNode & {
16
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
17
+ };
18
+ declare const _default: typeof __VLS_export;
19
+ type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
20
+ //#endregion
21
+ export { _default as default };