@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.
- package/README.md +95 -0
- package/dist/_virtual/_/plugin-vue/export-helper.mjs +8 -0
- package/dist/components/auth/index.d.ts +2 -0
- package/dist/components/auth/index.mjs +2 -0
- package/dist/components/auth/taman-auth-form.mjs +67 -0
- package/dist/components/auth/taman-auth-form.vue.d.ts +31 -0
- package/dist/components/back-to-top/index.mjs +2 -0
- package/dist/components/back-to-top/taman-back-to-top.mjs +70 -0
- package/dist/components/back-to-top/taman-back-to-top.vue.d.ts +18 -0
- package/dist/components/button/check-group-selection.mjs +17 -0
- package/dist/components/button/index.d.ts +4 -0
- package/dist/components/button/index.mjs +3 -0
- package/dist/components/button/taman-button-check-group.mjs +132 -0
- package/dist/components/button/taman-button-check-group.types.d.ts +22 -0
- package/dist/components/button/taman-button-check-group.vue.d.ts +41 -0
- package/dist/components/button/taman-button-icon.mjs +105 -0
- package/dist/components/button/taman-button-icon.vue.d.ts +17 -0
- package/dist/components/descriptions/index.d.ts +4 -0
- package/dist/components/descriptions/index.mjs +3 -0
- package/dist/components/descriptions/taman-description-cell.mjs +116 -0
- package/dist/components/descriptions/taman-description-item.mjs +10 -0
- package/dist/components/descriptions/taman-description-item.vue.d.ts +5 -0
- package/dist/components/descriptions/taman-description-row.mjs +131 -0
- package/dist/components/descriptions/taman-description.mjs +78 -0
- package/dist/components/descriptions/taman-description.types.d.ts +51 -0
- package/dist/components/descriptions/taman-description.vue.d.ts +23 -0
- package/dist/components/descriptions/use-taman-description.mjs +161 -0
- package/dist/components/file-upload/index.d.ts +3 -0
- package/dist/components/file-upload/index.mjs +2 -0
- package/dist/components/file-upload/taman-file-upload.mjs +88 -0
- package/dist/components/file-upload/taman-file-upload.types.d.ts +10 -0
- package/dist/components/file-upload/taman-file-upload.vue.d.ts +21 -0
- package/dist/components/full-screen/full-screen.mjs +27 -0
- package/dist/components/full-screen/full-screen.vue.d.ts +8 -0
- package/dist/components/full-screen/index.mjs +2 -0
- package/dist/components/icon/icon.mjs +27 -0
- package/dist/components/icon/icon.vue.d.ts +9 -0
- package/dist/components/icon/index.d.ts +2 -0
- package/dist/components/icon/index.mjs +2 -0
- package/dist/components/index.d.ts +34 -0
- package/dist/components/index.mjs +31 -0
- package/dist/components/input/index.d.ts +5 -0
- package/dist/components/input/index.mjs +4 -0
- package/dist/components/input/password-strength.d.ts +7 -0
- package/dist/components/input/password-strength.mjs +21 -0
- package/dist/components/input/taman-input-currency.mjs +76 -0
- package/dist/components/input/taman-input-currency.types.d.ts +8 -0
- package/dist/components/input/taman-input-currency.vue.d.ts +15 -0
- package/dist/components/input/taman-input-password.mjs +99 -0
- package/dist/components/input/taman-input-password.vue.d.ts +17 -0
- package/dist/components/input-date/format-calendar-input-value.mjs +26 -0
- package/dist/components/input-date/index.d.ts +3 -0
- package/dist/components/input-date/index.mjs +2 -0
- package/dist/components/input-date/taman-input-date.mjs +116 -0
- package/dist/components/input-date/taman-input-date.types.d.ts +14 -0
- package/dist/components/input-date/taman-input-date.vue.d.ts +21 -0
- package/dist/components/loading/index.d.ts +3 -0
- package/dist/components/loading/index.mjs +2 -0
- package/dist/components/loading/taman-loading.mjs +64 -0
- package/dist/components/loading/taman-loading.vue.d.ts +25 -0
- package/dist/components/loading/types.d.ts +13 -0
- package/dist/components/logo/index.mjs +2 -0
- package/dist/components/logo/taman-logo.mjs +60 -0
- package/dist/components/logo/taman-logo.vue.d.ts +32 -0
- package/dist/components/render-content/index.d.ts +2 -0
- package/dist/components/render-content/index.mjs +2 -0
- package/dist/components/render-content/render-content.mjs +42 -0
- package/dist/components/render-content/render-content.vue.d.ts +31 -0
- package/dist/components/scrollbar/index.d.ts +2 -0
- package/dist/components/scrollbar/index.mjs +2 -0
- package/dist/components/scrollbar/scrollbar.mjs +136 -0
- package/dist/components/scrollbar/scrollbar.vue.d.ts +50 -0
- package/dist/form/components/form-actions.mjs +151 -0
- package/dist/form/components/form-field-array.mjs +154 -0
- package/dist/form/components/form-field-array.types.d.ts +18 -0
- package/dist/form/form-render/form-render-field-collapsible.mjs +32 -0
- package/dist/form/form-render/form-render-field-control.mjs +44 -0
- package/dist/form/form-render/form-render-form-field.mjs +408 -0
- package/dist/form/form-render/form-render-form-label.mjs +46 -0
- package/dist/form/form-render/form-render-form.mjs +163 -0
- package/dist/form/form-render/form-render-group.mjs +89 -0
- package/dist/form/form-render/form-render.context.mjs +10 -0
- package/dist/form/form-render/form-render.dependencies.mjs +101 -0
- package/dist/form/form-render/form-render.helper.mjs +31 -0
- package/dist/form/form-render/form-render.schema.mjs +209 -0
- package/dist/form/form-render/index.mjs +4 -0
- package/dist/form/form.api.d.ts +54 -0
- package/dist/form/form.api.mjs +324 -0
- package/dist/form/form.built-ins.d.ts +36 -0
- package/dist/form/form.built-ins.mjs +48 -0
- package/dist/form/form.codec.d.ts +17 -0
- package/dist/form/form.codec.mjs +45 -0
- package/dist/form/form.config.d.ts +6 -0
- package/dist/form/form.config.mjs +43 -0
- package/dist/form/form.empty-value.d.ts +4 -0
- package/dist/form/form.empty-value.mjs +20 -0
- package/dist/form/form.field-name.mjs +25 -0
- package/dist/form/form.rule-registry.mjs +10 -0
- package/dist/form/form.runtime-field.mjs +56 -0
- package/dist/form/form.runtime.mjs +235 -0
- package/dist/form/form.schema-defaults.mjs +36 -0
- package/dist/form/form.types.d.ts +315 -0
- package/dist/form/form.use-delayed-flag.mjs +35 -0
- package/dist/form/form.use-form-context.mjs +44 -0
- package/dist/form/form.use-taman-form.d.ts +7 -0
- package/dist/form/form.use-taman-form.mjs +36 -0
- package/dist/form/index.d.ts +8 -0
- package/dist/form/index.mjs +6 -0
- package/dist/form/taman-use-form.mjs +146 -0
- package/dist/index.d.ts +63 -0
- package/dist/index.mjs +56 -0
- package/dist/layout/components/index.mjs +6 -0
- package/dist/layout/components/taman-core-button-collapse.mjs +38 -0
- package/dist/layout/components/taman-core-button-fixed.mjs +29 -0
- package/dist/layout/components/taman-core-layout-content.mjs +50 -0
- package/dist/layout/components/taman-core-layout-footer.mjs +38 -0
- package/dist/layout/components/taman-core-layout-header.mjs +48 -0
- package/dist/layout/components/taman-core-layout-sidebar.mjs +319 -0
- package/dist/layout/components/taman-core-layout-tabbar.mjs +21 -0
- package/dist/layout/composables/use-layout.mjs +31 -0
- package/dist/layout/composables/use-sidebar-drag.mjs +103 -0
- package/dist/layout/header-scroll-state.mjs +9 -0
- package/dist/layout/index.d.ts +3 -0
- package/dist/layout/index.mjs +2 -0
- package/dist/layout/taman-core-layout.d.ts +41 -0
- package/dist/layout/taman-core-layout.mjs +603 -0
- package/dist/layout/taman-core-layout.vue.d.ts +99 -0
- package/dist/menu/components/collapse-transition.mjs +82 -0
- package/dist/menu/components/index.mjs +5 -0
- package/dist/menu/components/normal-menu/index.d.ts +3 -0
- package/dist/menu/components/normal-menu/index.mjs +2 -0
- package/dist/menu/components/normal-menu/normal-menu.d.ts +11 -0
- package/dist/menu/components/normal-menu/normal-menu.mjs +50 -0
- package/dist/menu/components/normal-menu/normal-menu.vue.d.ts +19 -0
- package/dist/menu/components/taman-menu-badge-dot.mjs +23 -0
- package/dist/menu/components/taman-menu-badge.mjs +49 -0
- package/dist/menu/components/taman-menu-badge.vue.d.ts +9 -0
- package/dist/menu/components/taman-menu-item.mjs +124 -0
- package/dist/menu/components/taman-menu-root.mjs +250 -0
- package/dist/menu/components/taman-menu-sub-menu-content.mjs +83 -0
- package/dist/menu/components/taman-menu-sub-menu.mjs +216 -0
- package/dist/menu/composables/index.mjs +3 -0
- package/dist/menu/composables/use-menu-context.mjs +36 -0
- package/dist/menu/composables/use-menu-scroll.mjs +23 -0
- package/dist/menu/composables/use-menu.mjs +33 -0
- package/dist/menu/index.d.ts +7 -0
- package/dist/menu/index.mjs +5 -0
- package/dist/menu/menu.constants.mjs +5 -0
- package/dist/menu/menu.types.d.ts +63 -0
- package/dist/menu/menu.utils.mjs +27 -0
- package/dist/menu/taman-menu.mjs +41 -0
- package/dist/menu/taman-menu.vue.d.ts +12 -0
- package/dist/menu/taman-sub-menu.mjs +75 -0
- package/dist/popup/alert/alert-builder.d.ts +8 -0
- package/dist/popup/alert/alert-builder.mjs +98 -0
- package/dist/popup/alert/alert-overlay.mjs +55 -0
- package/dist/popup/alert/alert.d.ts +43 -0
- package/dist/popup/alert/alert.mjs +10 -0
- package/dist/popup/alert/alert.vue.d.ts +26 -0
- package/dist/popup/alert/alert2.mjs +238 -0
- package/dist/popup/alert/index.d.ts +4 -0
- package/dist/popup/alert/index.mjs +4 -0
- package/dist/popup/dialog/dialog.api.d.ts +23 -0
- package/dist/popup/dialog/dialog.api.mjs +133 -0
- package/dist/popup/dialog/dialog.mjs +336 -0
- package/dist/popup/dialog/dialog.types.d.ts +60 -0
- package/dist/popup/dialog/dialog.vue.d.ts +46 -0
- package/dist/popup/dialog/index.d.ts +4 -0
- package/dist/popup/dialog/index.mjs +3 -0
- package/dist/popup/dialog/use-dialog-draggable.mjs +93 -0
- package/dist/popup/dialog/use-taman-dialog.d.ts +13 -0
- package/dist/popup/dialog/use-taman-dialog.mjs +106 -0
- package/dist/popup/drawer/drawer.api.d.ts +23 -0
- package/dist/popup/drawer/drawer.api.mjs +124 -0
- package/dist/popup/drawer/drawer.mjs +277 -0
- package/dist/popup/drawer/drawer.types.d.ts +56 -0
- package/dist/popup/drawer/drawer.vue.d.ts +47 -0
- package/dist/popup/drawer/index.d.ts +4 -0
- package/dist/popup/drawer/index.mjs +3 -0
- package/dist/popup/drawer/use-taman-drawer.d.ts +13 -0
- package/dist/popup/drawer/use-taman-drawer.mjs +109 -0
- package/dist/popup/index.d.ts +13 -0
- package/dist/popup/index.mjs +11 -0
- package/dist/tabs/components/index.mjs +2 -0
- package/dist/tabs/components/taman-tabs.mjs +158 -0
- package/dist/tabs/components/widgets/index.d.ts +4 -0
- package/dist/tabs/components/widgets/index.mjs +4 -0
- package/dist/tabs/components/widgets/tool-more.mjs +45 -0
- package/dist/tabs/components/widgets/tool-more.vue.d.ts +7 -0
- package/dist/tabs/components/widgets/tool-refresh.mjs +25 -0
- package/dist/tabs/components/widgets/tool-refresh.vue.d.ts +9 -0
- package/dist/tabs/components/widgets/tool-screen.mjs +29 -0
- package/dist/tabs/components/widgets/tool-screen.vue.d.ts +12 -0
- package/dist/tabs/index.d.ts +8 -0
- package/dist/tabs/index.mjs +6 -0
- package/dist/tabs/strict-context-menu.d.ts +10 -0
- package/dist/tabs/tabs.types.d.ts +30 -0
- package/dist/tabs/taman-tabs-view.mjs +101 -0
- package/dist/tabs/taman-tabs-view.vue.d.ts +18 -0
- package/dist/tabs/use-tabs-drag.mjs +69 -0
- package/dist/tabs/use-tabs-view-scroll.mjs +114 -0
- package/dist/ui/alert-dialog/alert-dialog-action.mjs +21 -0
- package/dist/ui/alert-dialog/alert-dialog-action.vue.d.ts +16 -0
- package/dist/ui/alert-dialog/alert-dialog-cancel.mjs +21 -0
- package/dist/ui/alert-dialog/alert-dialog-cancel.vue.d.ts +16 -0
- package/dist/ui/alert-dialog/alert-dialog-content.mjs +111 -0
- package/dist/ui/alert-dialog/alert-dialog-content.vue.d.ts +49 -0
- package/dist/ui/alert-dialog/alert-dialog-description.mjs +30 -0
- package/dist/ui/alert-dialog/alert-dialog-description.vue.d.ts +20 -0
- package/dist/ui/alert-dialog/alert-dialog-footer.mjs +14 -0
- package/dist/ui/alert-dialog/alert-dialog-footer.vue.d.ts +15 -0
- package/dist/ui/alert-dialog/alert-dialog-header.mjs +14 -0
- package/dist/ui/alert-dialog/alert-dialog-header.vue.d.ts +15 -0
- package/dist/ui/alert-dialog/alert-dialog-overlay.mjs +29 -0
- package/dist/ui/alert-dialog/alert-dialog-root.mjs +23 -0
- package/dist/ui/alert-dialog/alert-dialog-root.vue.d.ts +23 -0
- package/dist/ui/alert-dialog/alert-dialog-title.mjs +30 -0
- package/dist/ui/alert-dialog/alert-dialog-title.vue.d.ts +20 -0
- package/dist/ui/alert-dialog/alert-dialog-trigger.mjs +21 -0
- package/dist/ui/alert-dialog/alert-dialog-trigger.vue.d.ts +16 -0
- package/dist/ui/alert-dialog/index.d.ts +10 -0
- package/dist/ui/alert-dialog/index.mjs +10 -0
- package/dist/ui/dialog/dialog-close.mjs +21 -0
- package/dist/ui/dialog/dialog-close.vue.d.ts +16 -0
- package/dist/ui/dialog/dialog-content.mjs +111 -0
- package/dist/ui/dialog/dialog-content.vue.d.ts +51 -0
- package/dist/ui/dialog/dialog-description.mjs +31 -0
- package/dist/ui/dialog/dialog-description.vue.d.ts +20 -0
- package/dist/ui/dialog/dialog-footer.mjs +14 -0
- package/dist/ui/dialog/dialog-footer.vue.d.ts +15 -0
- package/dist/ui/dialog/dialog-header.mjs +14 -0
- package/dist/ui/dialog/dialog-header.vue.d.ts +15 -0
- package/dist/ui/dialog/dialog-overlay.mjs +34 -0
- package/dist/ui/dialog/dialog-overlay.vue.d.ts +14 -0
- package/dist/ui/dialog/dialog-root.mjs +24 -0
- package/dist/ui/dialog/dialog-root.vue.d.ts +23 -0
- package/dist/ui/dialog/dialog-title.mjs +31 -0
- package/dist/ui/dialog/dialog-title.vue.d.ts +20 -0
- package/dist/ui/dialog/dialog-trigger.mjs +21 -0
- package/dist/ui/dialog/dialog-trigger.vue.d.ts +16 -0
- package/dist/ui/dialog/index.d.ts +10 -0
- package/dist/ui/dialog/index.mjs +10 -0
- package/dist/ui/dialog/use-dialog-state-events.mjs +60 -0
- package/dist/ui/form/form-control.mjs +27 -0
- package/dist/ui/form/form-control.vue.d.ts +15 -0
- package/dist/ui/form/form-description.mjs +27 -0
- package/dist/ui/form/form-description.vue.d.ts +19 -0
- package/dist/ui/form/form-field.mjs +37 -0
- package/dist/ui/form/form-field.vue.d.ts +27 -0
- package/dist/ui/form/form-item.mjs +27 -0
- package/dist/ui/form/form-item.vue.d.ts +19 -0
- package/dist/ui/form/form-label.mjs +41 -0
- package/dist/ui/form/form-label.vue.d.ts +20 -0
- package/dist/ui/form/form-message.mjs +28 -0
- package/dist/ui/form/form-message.vue.d.ts +9 -0
- package/dist/ui/form/index.d.ts +8 -0
- package/dist/ui/form/index.mjs +8 -0
- package/dist/ui/form/injection-keys.d.ts +13 -0
- package/dist/ui/form/injection-keys.mjs +5 -0
- package/dist/ui/form/use-form-field.mjs +27 -0
- package/dist/ui/index.d.ts +42 -0
- package/dist/ui/index.mjs +42 -0
- package/dist/ui/label/index.d.ts +2 -0
- package/dist/ui/label/index.mjs +2 -0
- package/dist/ui/label/label.mjs +31 -0
- package/dist/ui/label/label.vue.d.ts +20 -0
- package/dist/ui/scroll-area/index.d.ts +3 -0
- package/dist/ui/scroll-area/index.mjs +3 -0
- package/dist/ui/scroll-area/scroll-area.mjs +47 -0
- package/dist/ui/scroll-area/scroll-area.vue.d.ts +21 -0
- package/dist/ui/scroll-area/scroll-bar.mjs +38 -0
- package/dist/ui/scroll-area/scroll-bar.vue.d.ts +12 -0
- package/dist/ui/sheet/index.d.ts +8 -0
- package/dist/ui/sheet/index.mjs +8 -0
- package/dist/ui/sheet/sheet-close.mjs +21 -0
- package/dist/ui/sheet/sheet-close.vue.d.ts +16 -0
- package/dist/ui/sheet/sheet-content.mjs +105 -0
- package/dist/ui/sheet/sheet-content.vue.d.ts +48 -0
- package/dist/ui/sheet/sheet-description.mjs +30 -0
- package/dist/ui/sheet/sheet-description.vue.d.ts +20 -0
- package/dist/ui/sheet/sheet-footer.mjs +14 -0
- package/dist/ui/sheet/sheet-footer.vue.d.ts +15 -0
- package/dist/ui/sheet/sheet-header.mjs +14 -0
- package/dist/ui/sheet/sheet-header.vue.d.ts +15 -0
- package/dist/ui/sheet/sheet-overlay.mjs +32 -0
- package/dist/ui/sheet/sheet-root.mjs +24 -0
- package/dist/ui/sheet/sheet-root.vue.d.ts +23 -0
- package/dist/ui/sheet/sheet-title.mjs +31 -0
- package/dist/ui/sheet/sheet-title.vue.d.ts +20 -0
- package/dist/ui/sheet/sheet.variants.d.ts +27 -0
- package/dist/ui/sheet/sheet.variants.mjs +12 -0
- package/dist/unocss/content.d.ts +4 -0
- package/dist/unocss/content.mjs +9 -0
- package/dist/unocss/index.d.ts +2 -0
- package/dist/unocss/index.mjs +2 -0
- package/package.json +78 -0
package/README.md
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# @vinicunca/taman-ui
|
|
2
|
+
|
|
3
|
+
Unstyled Vue components for Taman on [pohon-ui](https://vinicunca.dev/pohon):
|
|
4
|
+
base components, dialogs and drawers, layout, menu, tabs and forms. Styling is
|
|
5
|
+
the consumer's job, the way shadcn works: the package ships no CSS, theme or
|
|
6
|
+
preset. ESM only; built for Vite.
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
pnpm add @vinicunca/taman-ui @vinicunca/taman-core pohon-ui vue \
|
|
10
|
+
@internationalized/date @internationalized/number
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Peer dependencies: `vue` (^3.5), `pohon-ui` (^2.0.0-rc7.9),
|
|
14
|
+
`@internationalized/date` and `@internationalized/number` (^3).
|
|
15
|
+
|
|
16
|
+
## Setup
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
// vite.config.ts
|
|
20
|
+
import vue from '@vitejs/plugin-vue';
|
|
21
|
+
import vitePohon from 'pohon-ui/vite';
|
|
22
|
+
import UnoCSS from 'unocss/vite';
|
|
23
|
+
import { defineConfig } from 'vite';
|
|
24
|
+
|
|
25
|
+
export default defineConfig({
|
|
26
|
+
plugins: [vue(), UnoCSS(), vitePohon({ scanPackages: ['@vinicunca/taman-ui'] })],
|
|
27
|
+
optimizeDeps: { exclude: ['pohon-ui', '@vinicunca/taman-ui'] },
|
|
28
|
+
resolve: { dedupe: ['pohon-ui', 'vue'] },
|
|
29
|
+
});
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
// uno.config.ts
|
|
34
|
+
import { TAMAN_UI_CONTENT } from '@vinicunca/taman-ui/unocss';
|
|
35
|
+
import { defineConfig } from 'unocss';
|
|
36
|
+
|
|
37
|
+
export default defineConfig({
|
|
38
|
+
content: {
|
|
39
|
+
pipeline: {
|
|
40
|
+
include: [/\.(vue|svelte|[jt]sx|vine.ts|mdx?|astro|elm|php|phtml|marko|html)($|\?)/, TAMAN_UI_CONTENT],
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
presets: [/* your preset */],
|
|
44
|
+
});
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
`TAMAN_UI_CONTENT` lets UnoCSS see the classes inside the compiled
|
|
48
|
+
components; without it they render with none of their own utilities.
|
|
49
|
+
|
|
50
|
+
## Styling
|
|
51
|
+
|
|
52
|
+
Pick one:
|
|
53
|
+
|
|
54
|
+
- **pohon's default look** — leave pohon's `theme.unstyled` at its default
|
|
55
|
+
and follow pohon's [installation guide](https://vinicunca.dev/pohon/getting-started/installation/vue).
|
|
56
|
+
- **Your own design** — set `theme: { unstyled: true }` and pass your own
|
|
57
|
+
`ui` config to `vitePohon`. Taman's admin template (planned) ships its
|
|
58
|
+
design this way.
|
|
59
|
+
|
|
60
|
+
Components use plain utilities plus a small theme contract. Define these in
|
|
61
|
+
your UnoCSS theme; anything left undefined simply has no effect:
|
|
62
|
+
|
|
63
|
+
- **Colors:** `background` (`-elevated`, `-header`, `-muted`, `-sidebar`,
|
|
64
|
+
`-sidebar-deep`, `-accented`), `border`, `text` (`-highlighted`, `-muted`),
|
|
65
|
+
`primary` (`-foreground`), `error`, `info`, `success`, `warning`, `float`,
|
|
66
|
+
`ring`.
|
|
67
|
+
- **Animations:** `fade-in-0`, `fade-out-0`, `slide-in-from-*`,
|
|
68
|
+
`slide-out-to-*`.
|
|
69
|
+
- **Shortcuts:** `flex-center`, `flex-col-center`, `z-popup`.
|
|
70
|
+
- **Variant:** `pohon:` (used by the tab and dialog buttons).
|
|
71
|
+
- **Hook classes** for rules that need plain CSS: `tabs-chrome__item`,
|
|
72
|
+
`tabs-chrome__divider`, `tabs-chrome__background(-content)`,
|
|
73
|
+
`taman-scrollbar` with `left-shadow` / `right-shadow` / `both-shadow`,
|
|
74
|
+
`scrollbar-top-shadow`, `scrollbar-bottom-shadow`, and the
|
|
75
|
+
`mobile-sidebar-mask` transition.
|
|
76
|
+
|
|
77
|
+
## Entry points
|
|
78
|
+
|
|
79
|
+
| Import | Contents |
|
|
80
|
+
| --- | --- |
|
|
81
|
+
| `@vinicunca/taman-ui` | Base components (`TamanScrollbar`, `TamanInputDate`, `TamanFileUpload`, `TamanIcon`, …) and primitives |
|
|
82
|
+
| `@vinicunca/taman-ui/popup` | `useTamanDialog`, `useTamanDrawer`, alerts |
|
|
83
|
+
| `@vinicunca/taman-ui/form` | `useTamanForm`, `setupTamanForm`, codecs, `z` — see `src/form/README.md` in the repository |
|
|
84
|
+
| `@vinicunca/taman-ui/layout` | `TamanCoreLayout` |
|
|
85
|
+
| `@vinicunca/taman-ui/menu` | `TamanMenu`, normal menu |
|
|
86
|
+
| `@vinicunca/taman-ui/tabs` | `TamanTabsView`, tab widgets |
|
|
87
|
+
| `@vinicunca/taman-ui/unocss` | `TAMAN_UI_CONTENT` (build time) |
|
|
88
|
+
|
|
89
|
+
## Notes
|
|
90
|
+
|
|
91
|
+
- Icons such as `lucide:*` load the same way as your app's own. If you enable
|
|
92
|
+
pohon's `icon.clientBundle.scan`, list the icons the package uses in
|
|
93
|
+
`icon.clientBundle.icons`.
|
|
94
|
+
- `skipLibCheck: false` is not supported: pohon-ui's own type declarations
|
|
95
|
+
do not type-check in strict mode.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Fragment, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, mergeProps, normalizeProps, openBlock, renderList, renderSlot, toDisplayString, useSlots } from "vue";
|
|
2
|
+
import PButton from "pohon-ui/components/Button.vue";
|
|
3
|
+
import PSeparator from "pohon-ui/components/Separator.vue";
|
|
4
|
+
//#region src/components/auth/taman-auth-form.vue
|
|
5
|
+
const _hoisted_1 = { class: "w-full space-y-6" };
|
|
6
|
+
const _hoisted_2 = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "text-center flex flex-col"
|
|
9
|
+
};
|
|
10
|
+
const _hoisted_3 = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "mb-2"
|
|
13
|
+
};
|
|
14
|
+
const _hoisted_4 = {
|
|
15
|
+
key: 1,
|
|
16
|
+
class: "text-xl color-text-highlighted font-600 text-pretty"
|
|
17
|
+
};
|
|
18
|
+
const _hoisted_5 = {
|
|
19
|
+
key: 2,
|
|
20
|
+
class: "text-base color-text-muted mt-1 text-pretty"
|
|
21
|
+
};
|
|
22
|
+
const _hoisted_6 = { class: "flex flex-col gap-y-6" };
|
|
23
|
+
const _hoisted_7 = {
|
|
24
|
+
key: 0,
|
|
25
|
+
class: "space-y-3"
|
|
26
|
+
};
|
|
27
|
+
const _hoisted_8 = {
|
|
28
|
+
key: 1,
|
|
29
|
+
class: "text-sm color-text-muted mt-2 text-center"
|
|
30
|
+
};
|
|
31
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
32
|
+
__name: "taman-auth-form",
|
|
33
|
+
props: {
|
|
34
|
+
title: {},
|
|
35
|
+
description: {},
|
|
36
|
+
providers: {},
|
|
37
|
+
separator: { default: "or" }
|
|
38
|
+
},
|
|
39
|
+
setup(__props) {
|
|
40
|
+
const props = __props;
|
|
41
|
+
const slots = useSlots();
|
|
42
|
+
return (_ctx, _cache) => {
|
|
43
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
44
|
+
!!slots.leading || props.title || !!slots.title || props.description || !!slots.description || !!slots.header ? (openBlock(), createElementBlock("div", _hoisted_2, [renderSlot(_ctx.$slots, "header", {}, () => [
|
|
45
|
+
!!slots.leading ? (openBlock(), createElementBlock("div", _hoisted_3, [renderSlot(_ctx.$slots, "leading")])) : createCommentVNode("v-if", true),
|
|
46
|
+
props.title || !!slots.title ? (openBlock(), createElementBlock("div", _hoisted_4, [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(props.title), 1)])])) : createCommentVNode("v-if", true),
|
|
47
|
+
props.description || !!slots.description ? (openBlock(), createElementBlock("div", _hoisted_5, [renderSlot(_ctx.$slots, "description", {}, () => [createTextVNode(toDisplayString(props.description), 1)])])) : createCommentVNode("v-if", true)
|
|
48
|
+
])])) : createCommentVNode("v-if", true),
|
|
49
|
+
createElementVNode("div", _hoisted_6, [
|
|
50
|
+
props.providers?.length || !!slots.providers ? (openBlock(), createElementBlock("div", _hoisted_7, [renderSlot(_ctx.$slots, "providers", {}, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(props.providers, (provider, index) => {
|
|
51
|
+
return openBlock(), createBlock(PButton, mergeProps({
|
|
52
|
+
key: index,
|
|
53
|
+
block: "",
|
|
54
|
+
color: "neutral",
|
|
55
|
+
variant: "subtle"
|
|
56
|
+
}, { ref_for: true }, provider), null, 16);
|
|
57
|
+
}), 128))])])) : createCommentVNode("v-if", true),
|
|
58
|
+
renderSlot(_ctx.$slots, "separator", {}, () => [props.providers?.length ? (openBlock(), createBlock(PSeparator, normalizeProps(mergeProps({ key: 0 }, typeof props.separator === "object" ? props.separator : { label: props.separator })), null, 16)) : createCommentVNode("v-if", true)]),
|
|
59
|
+
renderSlot(_ctx.$slots, "default")
|
|
60
|
+
]),
|
|
61
|
+
!!slots.footer ? (openBlock(), createElementBlock("div", _hoisted_8, [renderSlot(_ctx.$slots, "footer")])) : createCommentVNode("v-if", true)
|
|
62
|
+
]);
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
//#endregion
|
|
67
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { VNode } from "vue";
|
|
2
|
+
import { ButtonProps, SeparatorProps } from "pohon-ui";
|
|
3
|
+
//#region src/components/auth/taman-auth-form.vue.d.ts
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
title?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
providers?: Array<ButtonProps>;
|
|
8
|
+
separator?: string | SeparatorProps;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_Slots = {
|
|
11
|
+
header?: () => Array<VNode>;
|
|
12
|
+
leading?: () => Array<VNode>;
|
|
13
|
+
title?: (props?: object) => Array<VNode>;
|
|
14
|
+
description?: (props?: object) => Array<VNode>;
|
|
15
|
+
providers?: (props?: object) => Array<VNode>;
|
|
16
|
+
separator?: (props?: object) => Array<VNode>;
|
|
17
|
+
default?: (props?: object) => Array<VNode>;
|
|
18
|
+
footer?: (props?: object) => Array<VNode>;
|
|
19
|
+
};
|
|
20
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
21
|
+
separator: string | SeparatorProps;
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
//#endregion
|
|
31
|
+
export { _default as default };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Transition, computed, createBlock, createCommentVNode, defineComponent, normalizeStyle, onMounted, openBlock, ref, shallowRef, withCtx } from "vue";
|
|
2
|
+
import PButton from "pohon-ui/components/Button.vue";
|
|
3
|
+
import { useEventListener, useThrottleFn } from "@vueuse/core";
|
|
4
|
+
//#region src/components/back-to-top/taman-back-to-top.vue
|
|
5
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
6
|
+
__name: "taman-back-to-top",
|
|
7
|
+
props: {
|
|
8
|
+
bottom: { default: 20 },
|
|
9
|
+
isGroup: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: false
|
|
12
|
+
},
|
|
13
|
+
right: { default: 24 },
|
|
14
|
+
target: { default: "" },
|
|
15
|
+
visibilityHeight: { default: 200 }
|
|
16
|
+
},
|
|
17
|
+
setup(__props) {
|
|
18
|
+
const props = __props;
|
|
19
|
+
const backTopStyle = computed(() => ({
|
|
20
|
+
bottom: `${props.bottom}px`,
|
|
21
|
+
right: `${props.right}px`
|
|
22
|
+
}));
|
|
23
|
+
const el = shallowRef();
|
|
24
|
+
const container = shallowRef();
|
|
25
|
+
const visible = ref(false);
|
|
26
|
+
function handleScroll() {
|
|
27
|
+
if (el.value) visible.value = el.value.scrollTop >= (props?.visibilityHeight ?? 0);
|
|
28
|
+
}
|
|
29
|
+
function handleClick() {
|
|
30
|
+
el.value?.scrollTo({
|
|
31
|
+
behavior: "smooth",
|
|
32
|
+
top: 0
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
const handleScrollThrottled = useThrottleFn(handleScroll, 300, true);
|
|
36
|
+
useEventListener(container, "scroll", handleScrollThrottled);
|
|
37
|
+
onMounted(() => {
|
|
38
|
+
container.value = document;
|
|
39
|
+
el.value = document.documentElement;
|
|
40
|
+
if (props.target) {
|
|
41
|
+
el.value = document.querySelector(props.target) ?? void 0;
|
|
42
|
+
if (!el.value) throw new Error(`target does not exist: ${props.target}`);
|
|
43
|
+
container.value = el.value;
|
|
44
|
+
}
|
|
45
|
+
handleScroll();
|
|
46
|
+
});
|
|
47
|
+
return (_ctx, _cache) => {
|
|
48
|
+
return openBlock(), createBlock(Transition, {
|
|
49
|
+
"enter-active-class": "transition-opacity,transform-280",
|
|
50
|
+
"leave-active-class": "transition-opacity,transform-280",
|
|
51
|
+
"enter-from-class": "opacity-0 translate-y-100%",
|
|
52
|
+
"leave-to-class": "opacity-0 translate-y-100%"
|
|
53
|
+
}, {
|
|
54
|
+
default: withCtx(() => [visible.value ? (openBlock(), createBlock(PButton, {
|
|
55
|
+
key: 0,
|
|
56
|
+
style: normalizeStyle(backTopStyle.value),
|
|
57
|
+
class: "shadow-float fixed z-popup pohon:rounded-full",
|
|
58
|
+
variant: "outline",
|
|
59
|
+
color: "neutral",
|
|
60
|
+
icon: "lucide:arrow-up-to-line",
|
|
61
|
+
size: "xl",
|
|
62
|
+
onClick: handleClick
|
|
63
|
+
}, null, 8, ["style"])) : createCommentVNode("v-if", true)]),
|
|
64
|
+
_: 1
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
//#endregion
|
|
70
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/components/back-to-top/taman-back-to-top.vue.d.ts
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
bottom?: number;
|
|
4
|
+
isGroup?: boolean;
|
|
5
|
+
right?: number;
|
|
6
|
+
target?: string;
|
|
7
|
+
visibilityHeight?: number;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
10
|
+
right: number;
|
|
11
|
+
bottom: number;
|
|
12
|
+
isGroup: boolean;
|
|
13
|
+
target: string;
|
|
14
|
+
visibilityHeight: number;
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { _default as default };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region src/components/button/check-group-selection.ts
|
|
2
|
+
function toCheckGroupSelection(value, multiple) {
|
|
3
|
+
if (!Array.isArray(value)) return value === void 0 ? [] : [value];
|
|
4
|
+
const selection = value.filter((item) => item !== void 0);
|
|
5
|
+
return multiple ? selection : selection.slice(0, 1);
|
|
6
|
+
}
|
|
7
|
+
function fromCheckGroupSelection(selection, multiple) {
|
|
8
|
+
return multiple ? [...selection] : selection[0];
|
|
9
|
+
}
|
|
10
|
+
function toggleCheckGroupSelection(selection, value, { allowClear, maxCount, multiple }) {
|
|
11
|
+
const isChecked = selection.includes(value);
|
|
12
|
+
if (!multiple) return isChecked && allowClear ? [] : [value];
|
|
13
|
+
if (isChecked) return selection.filter((item) => item !== value);
|
|
14
|
+
return [...maxCount > 0 && selection.length >= maxCount ? selection.slice(0, maxCount - 1) : selection, value];
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { fromCheckGroupSelection, toCheckGroupSelection, toggleCheckGroupSelection };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TamanButtonCheckGroupModel, TamanButtonCheckGroupOption, TamanButtonCheckGroupProps, TamanButtonCheckGroupValue } from "./taman-button-check-group.types.js";
|
|
2
|
+
import _default from "./taman-button-check-group.vue.js";
|
|
3
|
+
import _default$1 from "./taman-button-icon.vue.js";
|
|
4
|
+
export { _default as TamanButtonCheckGroup, type TamanButtonCheckGroupModel, type TamanButtonCheckGroupOption, type TamanButtonCheckGroupProps, type TamanButtonCheckGroupValue, _default$1 as TamanButtonIcon };
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import _sfc_main$1 from "../render-content/render-content.mjs";
|
|
2
|
+
import "../render-content/index.mjs";
|
|
3
|
+
import { fromCheckGroupSelection, toCheckGroupSelection, toggleCheckGroupSelection } from "./check-group-selection.mjs";
|
|
4
|
+
import { Fragment, computed, createBlock, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, mergeModels, normalizeClass, openBlock, ref, renderList, renderSlot, unref, useModel, useSlots, withCtx } from "vue";
|
|
5
|
+
import PButton from "pohon-ui/components/Button.vue";
|
|
6
|
+
import PFieldGroup from "pohon-ui/components/FieldGroup.vue";
|
|
7
|
+
//#region src/components/button/taman-button-check-group.vue
|
|
8
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
9
|
+
name: "TamanButtonCheckGroup",
|
|
10
|
+
__name: "taman-button-check-group",
|
|
11
|
+
props: /*@__PURE__*/ mergeModels({
|
|
12
|
+
allowClear: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: false
|
|
15
|
+
},
|
|
16
|
+
beforeChange: {},
|
|
17
|
+
disabled: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: false
|
|
20
|
+
},
|
|
21
|
+
maxCount: { default: 0 },
|
|
22
|
+
multiple: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: false
|
|
25
|
+
},
|
|
26
|
+
options: { default: () => [] },
|
|
27
|
+
showIcon: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: true
|
|
30
|
+
},
|
|
31
|
+
size: {}
|
|
32
|
+
}, {
|
|
33
|
+
"modelValue": { type: [
|
|
34
|
+
Array,
|
|
35
|
+
Boolean,
|
|
36
|
+
Number,
|
|
37
|
+
String
|
|
38
|
+
] },
|
|
39
|
+
"modelModifiers": {}
|
|
40
|
+
}),
|
|
41
|
+
emits: /*@__PURE__*/ mergeModels(["btnClick"], ["update:modelValue"]),
|
|
42
|
+
setup(__props, { emit: __emit }) {
|
|
43
|
+
const props = __props;
|
|
44
|
+
const emits = __emit;
|
|
45
|
+
const slots = useSlots();
|
|
46
|
+
const modelValue = useModel(__props, "modelValue");
|
|
47
|
+
const selection = computed(() => toCheckGroupSelection(modelValue.value, props.multiple));
|
|
48
|
+
const loadingValues = ref([]);
|
|
49
|
+
/**
|
|
50
|
+
* A custom `#icon` slot renders its own loading state, so PButton's
|
|
51
|
+
* built-in loading icon (and its spin class) is only used without it.
|
|
52
|
+
*/
|
|
53
|
+
const hasIconSlot = computed(() => props.showIcon && Boolean(slots.icon));
|
|
54
|
+
function isChecked(value) {
|
|
55
|
+
return selection.value.includes(value);
|
|
56
|
+
}
|
|
57
|
+
function isLoading(value) {
|
|
58
|
+
return loadingValues.value.includes(value);
|
|
59
|
+
}
|
|
60
|
+
function isDisabled(value) {
|
|
61
|
+
return props.disabled || isLoading(value) || !props.multiple && loadingValues.value.length > 0;
|
|
62
|
+
}
|
|
63
|
+
function getLeadingIcon(value) {
|
|
64
|
+
if (!props.showIcon || hasIconSlot.value) return;
|
|
65
|
+
return isChecked(value) ? "lucide:circle-check-big" : "lucide:circle";
|
|
66
|
+
}
|
|
67
|
+
async function onOptionClick(value) {
|
|
68
|
+
if (props.beforeChange) {
|
|
69
|
+
loadingValues.value.push(value);
|
|
70
|
+
try {
|
|
71
|
+
if (await props.beforeChange(value, !isChecked(value)) === false) return;
|
|
72
|
+
} finally {
|
|
73
|
+
loadingValues.value.splice(loadingValues.value.indexOf(value), 1);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
const next = toggleCheckGroupSelection(selection.value, value, {
|
|
77
|
+
allowClear: props.allowClear,
|
|
78
|
+
maxCount: props.maxCount,
|
|
79
|
+
multiple: props.multiple
|
|
80
|
+
});
|
|
81
|
+
modelValue.value = fromCheckGroupSelection(next, props.multiple);
|
|
82
|
+
emits("btnClick", !props.multiple && next.length === 0 ? void 0 : value);
|
|
83
|
+
}
|
|
84
|
+
return (_ctx, _cache) => {
|
|
85
|
+
return openBlock(), createBlock(PFieldGroup, { size: props.size }, {
|
|
86
|
+
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(props.options, (option) => {
|
|
87
|
+
return openBlock(), createBlock(PButton, {
|
|
88
|
+
key: String(option.value),
|
|
89
|
+
type: "button",
|
|
90
|
+
class: "data-[active=true]:(not-first:border-x-1 first:border-r-1)",
|
|
91
|
+
color: "neutral",
|
|
92
|
+
variant: "outline",
|
|
93
|
+
"active-color": "primary",
|
|
94
|
+
"active-variant": "solid",
|
|
95
|
+
"data-active": isChecked(option.value),
|
|
96
|
+
active: isChecked(option.value),
|
|
97
|
+
"aria-pressed": isChecked(option.value),
|
|
98
|
+
disabled: isDisabled(option.value),
|
|
99
|
+
loading: !hasIconSlot.value && isLoading(option.value),
|
|
100
|
+
"leading-icon": getLeadingIcon(option.value),
|
|
101
|
+
onClick: ($event) => onOptionClick(option.value)
|
|
102
|
+
}, createSlots({
|
|
103
|
+
default: withCtx(({ ui }) => [createElementVNode("span", { class: normalizeClass(ui.label?.()) }, [renderSlot(_ctx.$slots, "option", {
|
|
104
|
+
data: option,
|
|
105
|
+
label: option.label,
|
|
106
|
+
value: option.value
|
|
107
|
+
}, () => [createVNode(unref(_sfc_main$1), { content: option.label }, null, 8, ["content"])])], 2)]),
|
|
108
|
+
_: 2
|
|
109
|
+
}, [hasIconSlot.value ? {
|
|
110
|
+
name: "leading",
|
|
111
|
+
fn: withCtx(({ ui }) => [createElementVNode("span", { class: normalizeClass(ui.leadingIcon?.({ class: "inline-flex *:size-full" })) }, [renderSlot(_ctx.$slots, "icon", {
|
|
112
|
+
checked: isChecked(option.value),
|
|
113
|
+
loading: isLoading(option.value)
|
|
114
|
+
})], 2)]),
|
|
115
|
+
key: "0"
|
|
116
|
+
} : void 0]), 1032, [
|
|
117
|
+
"data-active",
|
|
118
|
+
"active",
|
|
119
|
+
"aria-pressed",
|
|
120
|
+
"disabled",
|
|
121
|
+
"loading",
|
|
122
|
+
"leading-icon",
|
|
123
|
+
"onClick"
|
|
124
|
+
]);
|
|
125
|
+
}), 128))]),
|
|
126
|
+
_: 3
|
|
127
|
+
}, 8, ["size"]);
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
//#endregion
|
|
132
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Component } from "vue";
|
|
2
|
+
import { FieldGroupProps } from "pohon-ui";
|
|
3
|
+
//#region src/components/button/taman-button-check-group.types.d.ts
|
|
4
|
+
type TamanButtonCheckGroupValue = boolean | number | string;
|
|
5
|
+
type TamanButtonCheckGroupModel = Array<TamanButtonCheckGroupValue> | TamanButtonCheckGroupValue | undefined;
|
|
6
|
+
interface TamanButtonCheckGroupOption {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
label: (() => Component | string) | string;
|
|
9
|
+
value: TamanButtonCheckGroupValue;
|
|
10
|
+
}
|
|
11
|
+
interface TamanButtonCheckGroupProps {
|
|
12
|
+
allowClear?: boolean;
|
|
13
|
+
beforeChange?: (value: TamanButtonCheckGroupValue, isChecked: boolean) => boolean | PromiseLike<boolean | undefined> | undefined;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
maxCount?: number;
|
|
16
|
+
multiple?: boolean;
|
|
17
|
+
options?: Array<TamanButtonCheckGroupOption>;
|
|
18
|
+
showIcon?: boolean;
|
|
19
|
+
size?: FieldGroupProps['size'];
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { TamanButtonCheckGroupModel, TamanButtonCheckGroupOption, TamanButtonCheckGroupProps, TamanButtonCheckGroupValue };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { TamanButtonCheckGroupModel, TamanButtonCheckGroupOption, TamanButtonCheckGroupProps, TamanButtonCheckGroupValue } from "./taman-button-check-group.types.js";
|
|
2
|
+
//#region src/components/button/taman-button-check-group.vue.d.ts
|
|
3
|
+
type __VLS_Props = TamanButtonCheckGroupProps;
|
|
4
|
+
type __VLS_Slots = {
|
|
5
|
+
icon?: (props: {
|
|
6
|
+
checked: boolean;
|
|
7
|
+
loading: boolean;
|
|
8
|
+
}) => any;
|
|
9
|
+
option?: (props: {
|
|
10
|
+
data: TamanButtonCheckGroupOption;
|
|
11
|
+
label: TamanButtonCheckGroupOption['label'];
|
|
12
|
+
value: TamanButtonCheckGroupValue;
|
|
13
|
+
}) => any;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_ModelProps = {
|
|
16
|
+
modelValue?: TamanButtonCheckGroupModel;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
19
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
|
+
"update:modelValue": (value: TamanButtonCheckGroupModel) => any;
|
|
21
|
+
btnClick: (value: TamanButtonCheckGroupValue | undefined) => any;
|
|
22
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
23
|
+
"onUpdate:modelValue"?: ((value: TamanButtonCheckGroupModel) => any) | undefined;
|
|
24
|
+
onBtnClick?: ((value: TamanButtonCheckGroupValue | undefined) => any) | undefined;
|
|
25
|
+
}>, {
|
|
26
|
+
showIcon: boolean;
|
|
27
|
+
disabled: boolean;
|
|
28
|
+
multiple: boolean;
|
|
29
|
+
allowClear: boolean;
|
|
30
|
+
maxCount: number;
|
|
31
|
+
options: Array<TamanButtonCheckGroupOption>;
|
|
32
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
34
|
+
declare const _default: typeof __VLS_export;
|
|
35
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
36
|
+
new (): {
|
|
37
|
+
$slots: S;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
//#endregion
|
|
41
|
+
export { _default as default };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { computed, createBlock, createVNode, defineComponent, openBlock, withCtx } from "vue";
|
|
2
|
+
import PButton from "pohon-ui/components/Button.vue";
|
|
3
|
+
import PTooltip from "pohon-ui/components/Tooltip.vue";
|
|
4
|
+
//#region src/components/button/taman-button-icon.vue
|
|
5
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
6
|
+
name: "TamanButtonIcon",
|
|
7
|
+
__name: "taman-button-icon",
|
|
8
|
+
props: {
|
|
9
|
+
label: {},
|
|
10
|
+
color: {},
|
|
11
|
+
activeColor: {},
|
|
12
|
+
variant: {},
|
|
13
|
+
activeVariant: {},
|
|
14
|
+
size: {},
|
|
15
|
+
square: { type: Boolean },
|
|
16
|
+
block: { type: Boolean },
|
|
17
|
+
loadingAuto: { type: Boolean },
|
|
18
|
+
onClick: {},
|
|
19
|
+
class: {},
|
|
20
|
+
ui: {},
|
|
21
|
+
icon: {},
|
|
22
|
+
avatar: {},
|
|
23
|
+
leading: { type: Boolean },
|
|
24
|
+
leadingIcon: {},
|
|
25
|
+
trailing: { type: Boolean },
|
|
26
|
+
trailingIcon: {},
|
|
27
|
+
loading: { type: Boolean },
|
|
28
|
+
loadingIcon: {},
|
|
29
|
+
as: {},
|
|
30
|
+
type: {},
|
|
31
|
+
disabled: { type: Boolean },
|
|
32
|
+
active: { type: Boolean },
|
|
33
|
+
exact: { type: Boolean },
|
|
34
|
+
exactQuery: { type: [Boolean, String] },
|
|
35
|
+
exactHash: { type: Boolean },
|
|
36
|
+
inactiveClass: {},
|
|
37
|
+
locale: { type: [Boolean, String] },
|
|
38
|
+
to: {},
|
|
39
|
+
href: {},
|
|
40
|
+
external: { type: Boolean },
|
|
41
|
+
target: {},
|
|
42
|
+
rel: {},
|
|
43
|
+
noRel: { type: Boolean },
|
|
44
|
+
prefetchedClass: {},
|
|
45
|
+
prefetch: { type: Boolean },
|
|
46
|
+
prefetchOn: {},
|
|
47
|
+
noPrefetch: { type: Boolean },
|
|
48
|
+
trailingSlash: {},
|
|
49
|
+
activeClass: {},
|
|
50
|
+
exactActiveClass: {},
|
|
51
|
+
ariaCurrentValue: {},
|
|
52
|
+
viewTransition: { type: Boolean },
|
|
53
|
+
replace: { type: Boolean },
|
|
54
|
+
showTooltip: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: true
|
|
57
|
+
},
|
|
58
|
+
tooltipText: { default: "" }
|
|
59
|
+
},
|
|
60
|
+
emits: ["click"],
|
|
61
|
+
setup(__props, { emit: __emit }) {
|
|
62
|
+
const props = __props;
|
|
63
|
+
const emits = __emit;
|
|
64
|
+
/**
|
|
65
|
+
* PTooltip injects TooltipProviderContext even when disabled — only mount it when needed.
|
|
66
|
+
*/
|
|
67
|
+
const withTooltip = computed(() => Boolean(props.showTooltip && props.tooltipText));
|
|
68
|
+
return (_ctx, _cache) => {
|
|
69
|
+
return withTooltip.value ? (openBlock(), createBlock(PTooltip, {
|
|
70
|
+
key: 0,
|
|
71
|
+
text: props.tooltipText
|
|
72
|
+
}, {
|
|
73
|
+
default: withCtx(() => [createVNode(PButton, {
|
|
74
|
+
class: "pohon:rounded-full",
|
|
75
|
+
variant: "ghost",
|
|
76
|
+
color: "neutral",
|
|
77
|
+
icon: props.icon,
|
|
78
|
+
disabled: props.disabled,
|
|
79
|
+
ui: props.ui,
|
|
80
|
+
onClick: _cache[0] || (_cache[0] = ($event) => emits("click", $event))
|
|
81
|
+
}, null, 8, [
|
|
82
|
+
"icon",
|
|
83
|
+
"disabled",
|
|
84
|
+
"ui"
|
|
85
|
+
])]),
|
|
86
|
+
_: 1
|
|
87
|
+
}, 8, ["text"])) : (openBlock(), createBlock(PButton, {
|
|
88
|
+
key: 1,
|
|
89
|
+
class: "pohon:rounded-full",
|
|
90
|
+
variant: "ghost",
|
|
91
|
+
color: "neutral",
|
|
92
|
+
icon: props.icon,
|
|
93
|
+
disabled: props.disabled,
|
|
94
|
+
ui: props.ui,
|
|
95
|
+
onClick: _cache[1] || (_cache[1] = ($event) => emits("click", $event))
|
|
96
|
+
}, null, 8, [
|
|
97
|
+
"icon",
|
|
98
|
+
"disabled",
|
|
99
|
+
"ui"
|
|
100
|
+
]));
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
//#endregion
|
|
105
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ButtonProps } from "pohon-ui";
|
|
2
|
+
//#region src/components/button/taman-button-icon.vue.d.ts
|
|
3
|
+
type __VLS_Props = ButtonProps & {
|
|
4
|
+
showTooltip?: boolean;
|
|
5
|
+
tooltipText?: string;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
click: (event: MouseEvent) => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
11
|
+
}>, {
|
|
12
|
+
tooltipText: string;
|
|
13
|
+
showTooltip: boolean;
|
|
14
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { _default as default };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import _default from "./taman-description-item.vue.js";
|
|
2
|
+
import { TamanDescriptionsBreakpoint, TamanDescriptionsColumn, TamanDescriptionsItemProps, TamanDescriptionsItemSpan, TamanDescriptionsItemType, TamanDescriptionsLayout, TamanDescriptionsProps, TamanDescriptionsRenderNode, TamanDescriptionsSize, TamanInternalDescriptionsItem, TamanScreenMap } from "./taman-description.types.js";
|
|
3
|
+
import _default$1 from "./taman-description.vue.js";
|
|
4
|
+
export { _default$1 as TamanDescription, _default as TamanDescriptionItem, TamanDescriptionsBreakpoint, TamanDescriptionsColumn, TamanDescriptionsItemProps, TamanDescriptionsItemSpan, TamanDescriptionsItemType, TamanDescriptionsLayout, TamanDescriptionsProps, TamanDescriptionsRenderNode, TamanDescriptionsSize, TamanInternalDescriptionsItem, TamanScreenMap };
|