@ttdk-design-system/library-vue 0.0.0-stage → 1.0.1
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/AI_GUIDE.md +6518 -0
- package/README.md +104 -2
- package/llms.txt +6518 -0
- package/package.json +1097 -4
- package/src/core/index.ts +2 -0
- package/src/core/tailwind-preset.cjs +62 -0
- package/src/core/tailwind-preset.ts +85 -0
- package/src/core/theme/tokens.css +663 -0
- package/src/core/types.ts +836 -0
- package/src/index.ts +17 -0
- package/src/tailwind-preset.cjs +62 -0
- package/src/tailwind-preset.ts +85 -0
- package/src/types.ts +1 -0
- package/src/web/accordion/AI_GUIDE.md +149 -0
- package/src/web/accordion/accordion.css +1 -0
- package/src/web/accordion/accordion.vue +432 -0
- package/src/web/accordion/accordion.vue.d.ts +227 -0
- package/src/web/accordion/index.ts +3 -0
- package/src/web/accordion/manifest.json +351 -0
- package/src/web/alert/AI_GUIDE.md +139 -0
- package/src/web/alert/alert.css +1 -0
- package/src/web/alert/alert.vue +290 -0
- package/src/web/alert/alert.vue.d.ts +154 -0
- package/src/web/alert/index.ts +3 -0
- package/src/web/alert/manifest.json +240 -0
- package/src/web/avatar/AI_GUIDE.md +118 -0
- package/src/web/avatar/avatar.css +1 -0
- package/src/web/avatar/avatar.vue +217 -0
- package/src/web/avatar/avatar.vue.d.ts +135 -0
- package/src/web/avatar/index.ts +3 -0
- package/src/web/avatar/manifest.json +195 -0
- package/src/web/badge/AI_GUIDE.md +94 -0
- package/src/web/badge/badge.css +1 -0
- package/src/web/badge/badge.vue +135 -0
- package/src/web/badge/badge.vue.d.ts +108 -0
- package/src/web/badge/index.ts +3 -0
- package/src/web/badge/manifest.json +141 -0
- package/src/web/banner/AI_GUIDE.md +130 -0
- package/src/web/banner/banner.css +1 -0
- package/src/web/banner/banner.vue +303 -0
- package/src/web/banner/banner.vue.d.ts +162 -0
- package/src/web/banner/index.ts +3 -0
- package/src/web/banner/manifest.json +240 -0
- package/src/web/breadcrumb/AI_GUIDE.md +120 -0
- package/src/web/breadcrumb/breadcrumb.css +1 -0
- package/src/web/breadcrumb/breadcrumb.vue +313 -0
- package/src/web/breadcrumb/breadcrumb.vue.d.ts +139 -0
- package/src/web/breadcrumb/index.ts +3 -0
- package/src/web/breadcrumb/manifest.json +225 -0
- package/src/web/button/AI_GUIDE.md +121 -0
- package/src/web/button/button.css +1 -0
- package/src/web/button/button.vue +283 -0
- package/src/web/button/button.vue.d.ts +147 -0
- package/src/web/button/index.ts +3 -0
- package/src/web/button/manifest.json +177 -0
- package/src/web/calendar/AI_GUIDE.md +151 -0
- package/src/web/calendar/calendar.css +1 -0
- package/src/web/calendar/calendar.vue +1536 -0
- package/src/web/calendar/calendar.vue.d.ts +261 -0
- package/src/web/calendar/index.ts +3 -0
- package/src/web/calendar/manifest.json +470 -0
- package/src/web/card/AI_GUIDE.md +133 -0
- package/src/web/card/card.css +1 -0
- package/src/web/card/card.vue +423 -0
- package/src/web/card/card.vue.d.ts +232 -0
- package/src/web/card/index.ts +3 -0
- package/src/web/card/manifest.json +357 -0
- package/src/web/checkbox/AI_GUIDE.md +146 -0
- package/src/web/checkbox/checkbox.css +1 -0
- package/src/web/checkbox/checkbox.vue +304 -0
- package/src/web/checkbox/checkbox.vue.d.ts +189 -0
- package/src/web/checkbox/index.ts +3 -0
- package/src/web/checkbox/manifest.json +294 -0
- package/src/web/chip/AI_GUIDE.md +186 -0
- package/src/web/chip/chip.css +1 -0
- package/src/web/chip/chip.vue +220 -0
- package/src/web/chip/chip.vue.d.ts +140 -0
- package/src/web/chip/index.ts +3 -0
- package/src/web/chip/manifest.json +186 -0
- package/src/web/dropdown/AI_GUIDE.md +167 -0
- package/src/web/dropdown/dropdown.css +1 -0
- package/src/web/dropdown/dropdown.vue +1257 -0
- package/src/web/dropdown/dropdown.vue.d.ts +381 -0
- package/src/web/dropdown/index.ts +3 -0
- package/src/web/dropdown/manifest.json +576 -0
- package/src/web/flex/AI_GUIDE.md +113 -0
- package/src/web/flex/flex-item.vue +94 -0
- package/src/web/flex/flex-item.vue.d.ts +84 -0
- package/src/web/flex/flex.css +1 -0
- package/src/web/flex/flex.vue +103 -0
- package/src/web/flex/flex.vue.d.ts +92 -0
- package/src/web/flex/index.ts +5 -0
- package/src/web/flex/manifest.json +162 -0
- package/src/web/form/index.ts +7 -0
- package/src/web/grid/AI_GUIDE.md +112 -0
- package/src/web/grid/grid-item.vue +109 -0
- package/src/web/grid/grid-item.vue.d.ts +99 -0
- package/src/web/grid/grid.css +1 -0
- package/src/web/grid/grid.vue +94 -0
- package/src/web/grid/grid.vue.d.ts +84 -0
- package/src/web/grid/index.ts +5 -0
- package/src/web/grid/manifest.json +153 -0
- package/src/web/index.ts +86 -0
- package/src/web/input/AI_GUIDE.md +159 -0
- package/src/web/input/index.ts +3 -0
- package/src/web/input/input.css +1 -0
- package/src/web/input/input.vue +521 -0
- package/src/web/input/input.vue.d.ts +274 -0
- package/src/web/input/manifest.json +465 -0
- package/src/web/input-number/AI_GUIDE.md +164 -0
- package/src/web/input-number/index.ts +3 -0
- package/src/web/input-number/input-number.css +1 -0
- package/src/web/input-number/input-number.vue +1153 -0
- package/src/web/input-number/input-number.vue.d.ts +343 -0
- package/src/web/input-number/manifest.json +575 -0
- package/src/web/modal/AI_GUIDE.md +171 -0
- package/src/web/modal/index.ts +3 -0
- package/src/web/modal/manifest.json +375 -0
- package/src/web/modal/modal.css +1 -0
- package/src/web/modal/modal.vue +344 -0
- package/src/web/modal/modal.vue.d.ts +64 -0
- package/src/web/pagination/AI_GUIDE.md +148 -0
- package/src/web/pagination/index.ts +21 -0
- package/src/web/pagination/manifest.json +432 -0
- package/src/web/pagination/pagination-content.vue +42 -0
- package/src/web/pagination/pagination-content.vue.d.ts +28 -0
- package/src/web/pagination/pagination-ellipsis.vue +55 -0
- package/src/web/pagination/pagination-ellipsis.vue.d.ts +28 -0
- package/src/web/pagination/pagination-first.vue +161 -0
- package/src/web/pagination/pagination-first.vue.d.ts +67 -0
- package/src/web/pagination/pagination-item.vue +42 -0
- package/src/web/pagination/pagination-item.vue.d.ts +28 -0
- package/src/web/pagination/pagination-last.vue +161 -0
- package/src/web/pagination/pagination-last.vue.d.ts +67 -0
- package/src/web/pagination/pagination-link.vue +118 -0
- package/src/web/pagination/pagination-link.vue.d.ts +61 -0
- package/src/web/pagination/pagination-next.vue +160 -0
- package/src/web/pagination/pagination-next.vue.d.ts +68 -0
- package/src/web/pagination/pagination-previous.vue +160 -0
- package/src/web/pagination/pagination-previous.vue.d.ts +68 -0
- package/src/web/pagination/pagination.css +1 -0
- package/src/web/pagination/pagination.vue +730 -0
- package/src/web/pagination/pagination.vue.d.ts +247 -0
- package/src/web/popover/AI_GUIDE.md +163 -0
- package/src/web/popover/index.ts +3 -0
- package/src/web/popover/manifest.json +396 -0
- package/src/web/popover/popover.css +1 -0
- package/src/web/popover/popover.vue +579 -0
- package/src/web/popover/popover.vue.d.ts +83 -0
- package/src/web/radio/AI_GUIDE.md +155 -0
- package/src/web/radio/index.ts +3 -0
- package/src/web/radio/manifest.json +294 -0
- package/src/web/radio/radio.css +1 -0
- package/src/web/radio/radio.vue +288 -0
- package/src/web/radio/radio.vue.d.ts +182 -0
- package/src/web/selectbox/AI_GUIDE.md +216 -0
- package/src/web/selectbox/index.ts +3 -0
- package/src/web/selectbox/manifest.json +477 -0
- package/src/web/selectbox/selectbox.css +1 -0
- package/src/web/selectbox/selectbox.vue +1024 -0
- package/src/web/selectbox/selectbox.vue.d.ts +300 -0
- package/src/web/sonner/AI_GUIDE.md +98 -0
- package/src/web/sonner/index.ts +114 -0
- package/src/web/sonner/manifest.json +132 -0
- package/src/web/sonner/sonner.css +1 -0
- package/src/web/sonner/sonner.vue +180 -0
- package/src/web/sonner/sonner.vue.d.ts +113 -0
- package/src/web/table/AI_GUIDE.md +145 -0
- package/src/web/table/index.ts +34 -0
- package/src/web/table/manifest.json +168 -0
- package/src/web/table/table-body.vue +42 -0
- package/src/web/table/table-body.vue.d.ts +28 -0
- package/src/web/table/table-caption.vue +42 -0
- package/src/web/table/table-caption.vue.d.ts +28 -0
- package/src/web/table/table-cell.vue +71 -0
- package/src/web/table/table-cell.vue.d.ts +49 -0
- package/src/web/table/table-empty.vue +105 -0
- package/src/web/table/table-empty.vue.d.ts +57 -0
- package/src/web/table/table-footer.vue +42 -0
- package/src/web/table/table-footer.vue.d.ts +28 -0
- package/src/web/table/table-head.vue +78 -0
- package/src/web/table/table-head.vue.d.ts +50 -0
- package/src/web/table/table-header.vue +42 -0
- package/src/web/table/table-header.vue.d.ts +28 -0
- package/src/web/table/table-row.vue +70 -0
- package/src/web/table/table-row.vue.d.ts +44 -0
- package/src/web/table/table.css +1 -0
- package/src/web/table/table.vue +298 -0
- package/src/web/table/table.vue.d.ts +119 -0
- package/src/web/tabs/AI_GUIDE.md +150 -0
- package/src/web/tabs/index.ts +2 -0
- package/src/web/tabs/manifest.json +315 -0
- package/src/web/tabs/tabs.css +1 -0
- package/src/web/tabs/tabs.vue +164 -0
- package/src/web/tabs/tabs.vue.d.ts +60 -0
- package/src/web/text/AI_GUIDE.md +129 -0
- package/src/web/text/index.ts +2 -0
- package/src/web/text/manifest.json +195 -0
- package/src/web/text/text.css +1 -0
- package/src/web/text/text.vue +195 -0
- package/src/web/text/text.vue.d.ts +161 -0
- package/src/web/textarea/AI_GUIDE.md +141 -0
- package/src/web/textarea/index.ts +3 -0
- package/src/web/textarea/manifest.json +438 -0
- package/src/web/textarea/textarea.css +1 -0
- package/src/web/textarea/textarea.vue +458 -0
- package/src/web/textarea/textarea.vue.d.ts +265 -0
- package/src/web/tooltip/AI_GUIDE.md +110 -0
- package/src/web/tooltip/index.ts +3 -0
- package/src/web/tooltip/manifest.json +222 -0
- package/src/web/tooltip/tooltip.css +1 -0
- package/src/web/tooltip/tooltip.vue +417 -0
- package/src/web/tooltip/tooltip.vue.d.ts +150 -0
- package/src/webview/bottomsheet/AI_GUIDE.md +141 -0
- package/src/webview/bottomsheet/bottomsheet.css +1 -0
- package/src/webview/bottomsheet/bottomsheet.vue +441 -0
- package/src/webview/bottomsheet/bottomsheet.vue.d.ts +178 -0
- package/src/webview/bottomsheet/index.ts +4 -0
- package/src/webview/bottomsheet/manifest.json +377 -0
- package/src/webview/button/AI_GUIDE.md +79 -0
- package/src/webview/button/button-ios.css +1 -0
- package/src/webview/button/button-ios.vue +138 -0
- package/src/webview/button/button-ios.vue.d.ts +102 -0
- package/src/webview/button/button-material.css +1 -0
- package/src/webview/button/button-material.vue +138 -0
- package/src/webview/button/button-material.vue.d.ts +102 -0
- package/src/webview/button/index.ts +7 -0
- package/src/webview/button/manifest.json +148 -0
- package/src/webview/index.ts +7 -0
- package/tailwind-preset.cjs +62 -0
- package/tailwind-preset.js +62 -0
- package/ttdk-manifest.json +10188 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<template v-if="Boolean(href) && !disabled">
|
|
3
|
+
<a
|
|
4
|
+
:href="href"
|
|
5
|
+
:class="
|
|
6
|
+
`ttdk-pagination-link ttdk-pagination-first ${className || ''}`.trim()
|
|
7
|
+
"
|
|
8
|
+
:aria-label="ariaLabel || 'Go to first page'"
|
|
9
|
+
:data-size="size || 'md'"
|
|
10
|
+
:data-disabled="disabled ? 'true' : 'false'"
|
|
11
|
+
:style="{
|
|
12
|
+
...buildUiVars(ui),
|
|
13
|
+
...(typeof style === 'object' ? style : {}),
|
|
14
|
+
}"
|
|
15
|
+
@click="
|
|
16
|
+
async (e) => {
|
|
17
|
+
if (disabled) {
|
|
18
|
+
e.preventDefault();
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
if (onClick) {
|
|
22
|
+
onClick(e);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
"
|
|
26
|
+
>
|
|
27
|
+
<template v-if="icon">
|
|
28
|
+
{{ icon }}
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<template v-if="!icon">
|
|
32
|
+
<svg
|
|
33
|
+
class="ttdk-pagination-icon"
|
|
34
|
+
viewBox="0 0 24 24"
|
|
35
|
+
fill="none"
|
|
36
|
+
aria-hidden="true"
|
|
37
|
+
>
|
|
38
|
+
<polyline points="11 17 6 12 11 7"></polyline>
|
|
39
|
+
<polyline points="18 17 13 12 18 7"></polyline>
|
|
40
|
+
</svg>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<template v-if="!iconOnly && Boolean(text)">
|
|
44
|
+
<span class="ttdk-pagination-first-text">{{ text }}</span>
|
|
45
|
+
</template>
|
|
46
|
+
</a>
|
|
47
|
+
</template>
|
|
48
|
+
|
|
49
|
+
<template v-if="!href || Boolean(disabled)">
|
|
50
|
+
<button
|
|
51
|
+
type="button"
|
|
52
|
+
:class="
|
|
53
|
+
`ttdk-pagination-link ttdk-pagination-first ${className || ''}`.trim()
|
|
54
|
+
"
|
|
55
|
+
:aria-label="ariaLabel || 'Go to first page'"
|
|
56
|
+
:data-size="size || 'md'"
|
|
57
|
+
:data-disabled="disabled ? 'true' : 'false'"
|
|
58
|
+
:disabled="disabled"
|
|
59
|
+
:style="{
|
|
60
|
+
...buildUiVars(ui),
|
|
61
|
+
}"
|
|
62
|
+
@click="
|
|
63
|
+
async (e) => {
|
|
64
|
+
if (!disabled && onClick) {
|
|
65
|
+
onClick(e);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
"
|
|
69
|
+
>
|
|
70
|
+
<template v-if="icon">
|
|
71
|
+
{{ icon }}
|
|
72
|
+
</template>
|
|
73
|
+
|
|
74
|
+
<template v-if="!icon">
|
|
75
|
+
<svg
|
|
76
|
+
class="ttdk-pagination-icon"
|
|
77
|
+
viewBox="0 0 24 24"
|
|
78
|
+
fill="none"
|
|
79
|
+
aria-hidden="true"
|
|
80
|
+
>
|
|
81
|
+
<polyline points="11 17 6 12 11 7"></polyline>
|
|
82
|
+
<polyline points="18 17 13 12 18 7"></polyline>
|
|
83
|
+
</svg>
|
|
84
|
+
</template>
|
|
85
|
+
|
|
86
|
+
<template v-if="!iconOnly && Boolean(text)">
|
|
87
|
+
<span class="ttdk-pagination-first-text">{{ text }}</span>
|
|
88
|
+
</template>
|
|
89
|
+
</button>
|
|
90
|
+
</template>
|
|
91
|
+
</template>
|
|
92
|
+
|
|
93
|
+
<script setup lang="ts">
|
|
94
|
+
import { buildUiVars, UiProps } from "../../core/types";
|
|
95
|
+
|
|
96
|
+
export interface PaginationFirstProps {
|
|
97
|
+
/**
|
|
98
|
+
* Inline CSS style kustom.
|
|
99
|
+
*/
|
|
100
|
+
style?: any;
|
|
101
|
+
/**
|
|
102
|
+
* URL tujuan navigasi (jika menggunakan tautan anchor <a>).
|
|
103
|
+
*/
|
|
104
|
+
href?: string;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Teks label tombol opsional.
|
|
108
|
+
*/
|
|
109
|
+
text?: string;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Mode hanya menampilkan ikon tanpa teks.
|
|
113
|
+
* @default true
|
|
114
|
+
*/
|
|
115
|
+
iconOnly?: boolean;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Menonaktifkan tombol.
|
|
119
|
+
* @default false
|
|
120
|
+
*/
|
|
121
|
+
disabled?: boolean;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Skala ukuran tombol.
|
|
125
|
+
* @default 'md'
|
|
126
|
+
*/
|
|
127
|
+
size?: "sm" | "md" | "lg" | "icon";
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Kustomisasi visual granular tombol navigasi (UiProps).
|
|
131
|
+
*/
|
|
132
|
+
ui?: UiProps;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Callback saat tombol diklik.
|
|
136
|
+
*/
|
|
137
|
+
onClick?: (event?: any) => void;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Class CSS kustom.
|
|
141
|
+
*/
|
|
142
|
+
className?: string;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Label aksesibilitas ARIA.
|
|
146
|
+
* @default 'Go to first page'
|
|
147
|
+
*/
|
|
148
|
+
ariaLabel?: string;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Ikon kustom untuk tombol first page (menggantikan <<).
|
|
152
|
+
*/
|
|
153
|
+
icon?: any;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Tombol navigasi langsung ke halaman pertama (Compound PaginationFirst).
|
|
158
|
+
*/
|
|
159
|
+
|
|
160
|
+
const props = defineProps<PaginationFirstProps>();
|
|
161
|
+
</script>
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// Auto-generated by TTDK Design System Vue Type Generator
|
|
3
|
+
import type { DefineComponent } from "vue";
|
|
4
|
+
import { buildUiVars, UiProps } from "../../core/types";
|
|
5
|
+
|
|
6
|
+
export interface PaginationFirstProps {
|
|
7
|
+
/**
|
|
8
|
+
* Inline CSS style kustom.
|
|
9
|
+
*/
|
|
10
|
+
style?: any;
|
|
11
|
+
/**
|
|
12
|
+
* URL tujuan navigasi (jika menggunakan tautan anchor <a>).
|
|
13
|
+
*/
|
|
14
|
+
href?: string;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Teks label tombol opsional.
|
|
18
|
+
*/
|
|
19
|
+
text?: string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Mode hanya menampilkan ikon tanpa teks.
|
|
23
|
+
* @default true
|
|
24
|
+
*/
|
|
25
|
+
iconOnly?: boolean;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Menonaktifkan tombol.
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Skala ukuran tombol.
|
|
35
|
+
* @default 'md'
|
|
36
|
+
*/
|
|
37
|
+
size?: "sm" | "md" | "lg" | "icon";
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Kustomisasi visual granular tombol navigasi (UiProps).
|
|
41
|
+
*/
|
|
42
|
+
ui?: UiProps;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Callback saat tombol diklik.
|
|
46
|
+
*/
|
|
47
|
+
onClick?: (event?: any) => void;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Class CSS kustom.
|
|
51
|
+
*/
|
|
52
|
+
className?: string;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Label aksesibilitas ARIA.
|
|
56
|
+
* @default 'Go to first page'
|
|
57
|
+
*/
|
|
58
|
+
ariaLabel?: string;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Ikon kustom untuk tombol first page (menggantikan <<).
|
|
62
|
+
*/
|
|
63
|
+
icon?: any;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
declare const component: DefineComponent<PaginationFirstProps>;
|
|
67
|
+
export default component;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<li
|
|
3
|
+
:class="`ttdk-pagination-item ${className || ''}`.trim()"
|
|
4
|
+
:style="{
|
|
5
|
+
...buildUiVars(ui),
|
|
6
|
+
...(typeof style === 'object' ? style : {}),
|
|
7
|
+
}"
|
|
8
|
+
>
|
|
9
|
+
<slot />
|
|
10
|
+
</li>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script setup lang="ts">
|
|
14
|
+
import { buildUiVars, UiProps } from "../../core/types";
|
|
15
|
+
|
|
16
|
+
export interface PaginationItemProps {
|
|
17
|
+
/**
|
|
18
|
+
* Inline CSS style kustom.
|
|
19
|
+
*/
|
|
20
|
+
style?: any;
|
|
21
|
+
/**
|
|
22
|
+
* Kustomisasi visual granular li.ttdk-pagination-item (UiProps).
|
|
23
|
+
*/
|
|
24
|
+
ui?: UiProps;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Class CSS kustom.
|
|
28
|
+
*/
|
|
29
|
+
className?: string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Konten pagination item.
|
|
33
|
+
*/
|
|
34
|
+
children?: any;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Komponen pembungkus item halaman `<li>` (Compound PaginationItem ala Shadcn UI).
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
const props = defineProps<PaginationItemProps>();
|
|
42
|
+
</script>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// Auto-generated by TTDK Design System Vue Type Generator
|
|
3
|
+
import type { DefineComponent } from "vue";
|
|
4
|
+
import { buildUiVars, UiProps } from "../../core/types";
|
|
5
|
+
|
|
6
|
+
export interface PaginationItemProps {
|
|
7
|
+
/**
|
|
8
|
+
* Inline CSS style kustom.
|
|
9
|
+
*/
|
|
10
|
+
style?: any;
|
|
11
|
+
/**
|
|
12
|
+
* Kustomisasi visual granular li.ttdk-pagination-item (UiProps).
|
|
13
|
+
*/
|
|
14
|
+
ui?: UiProps;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Class CSS kustom.
|
|
18
|
+
*/
|
|
19
|
+
className?: string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Konten pagination item.
|
|
23
|
+
*/
|
|
24
|
+
children?: any;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
declare const component: DefineComponent<PaginationItemProps>;
|
|
28
|
+
export default component;
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<template v-if="Boolean(href) && !disabled">
|
|
3
|
+
<a
|
|
4
|
+
:href="href"
|
|
5
|
+
:class="
|
|
6
|
+
`ttdk-pagination-link ttdk-pagination-last ${className || ''}`.trim()
|
|
7
|
+
"
|
|
8
|
+
:aria-label="ariaLabel || 'Go to last page'"
|
|
9
|
+
:data-size="size || 'md'"
|
|
10
|
+
:data-disabled="disabled ? 'true' : 'false'"
|
|
11
|
+
:style="{
|
|
12
|
+
...buildUiVars(ui),
|
|
13
|
+
...(typeof style === 'object' ? style : {}),
|
|
14
|
+
}"
|
|
15
|
+
@click="
|
|
16
|
+
async (e) => {
|
|
17
|
+
if (disabled) {
|
|
18
|
+
e.preventDefault();
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
if (onClick) {
|
|
22
|
+
onClick(e);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
"
|
|
26
|
+
>
|
|
27
|
+
<template v-if="!iconOnly && Boolean(text)">
|
|
28
|
+
<span class="ttdk-pagination-last-text">{{ text }}</span>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<template v-if="icon">
|
|
32
|
+
{{ icon }}
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<template v-if="!icon">
|
|
36
|
+
<svg
|
|
37
|
+
class="ttdk-pagination-icon"
|
|
38
|
+
viewBox="0 0 24 24"
|
|
39
|
+
fill="none"
|
|
40
|
+
aria-hidden="true"
|
|
41
|
+
>
|
|
42
|
+
<polyline points="13 17 18 12 13 7"></polyline>
|
|
43
|
+
<polyline points="6 17 11 12 6 7"></polyline>
|
|
44
|
+
</svg>
|
|
45
|
+
</template>
|
|
46
|
+
</a>
|
|
47
|
+
</template>
|
|
48
|
+
|
|
49
|
+
<template v-if="!href || Boolean(disabled)">
|
|
50
|
+
<button
|
|
51
|
+
type="button"
|
|
52
|
+
:class="
|
|
53
|
+
`ttdk-pagination-link ttdk-pagination-last ${className || ''}`.trim()
|
|
54
|
+
"
|
|
55
|
+
:aria-label="ariaLabel || 'Go to last page'"
|
|
56
|
+
:data-size="size || 'md'"
|
|
57
|
+
:data-disabled="disabled ? 'true' : 'false'"
|
|
58
|
+
:disabled="disabled"
|
|
59
|
+
:style="{
|
|
60
|
+
...buildUiVars(ui),
|
|
61
|
+
}"
|
|
62
|
+
@click="
|
|
63
|
+
async (e) => {
|
|
64
|
+
if (!disabled && onClick) {
|
|
65
|
+
onClick(e);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
"
|
|
69
|
+
>
|
|
70
|
+
<template v-if="!iconOnly && Boolean(text)">
|
|
71
|
+
<span class="ttdk-pagination-last-text">{{ text }}</span>
|
|
72
|
+
</template>
|
|
73
|
+
|
|
74
|
+
<template v-if="icon">
|
|
75
|
+
{{ icon }}
|
|
76
|
+
</template>
|
|
77
|
+
|
|
78
|
+
<template v-if="!icon">
|
|
79
|
+
<svg
|
|
80
|
+
class="ttdk-pagination-icon"
|
|
81
|
+
viewBox="0 0 24 24"
|
|
82
|
+
fill="none"
|
|
83
|
+
aria-hidden="true"
|
|
84
|
+
>
|
|
85
|
+
<polyline points="13 17 18 12 13 7"></polyline>
|
|
86
|
+
<polyline points="6 17 11 12 6 7"></polyline>
|
|
87
|
+
</svg>
|
|
88
|
+
</template>
|
|
89
|
+
</button>
|
|
90
|
+
</template>
|
|
91
|
+
</template>
|
|
92
|
+
|
|
93
|
+
<script setup lang="ts">
|
|
94
|
+
import { buildUiVars, UiProps } from "../../core/types";
|
|
95
|
+
|
|
96
|
+
export interface PaginationLastProps {
|
|
97
|
+
/**
|
|
98
|
+
* Inline CSS style kustom.
|
|
99
|
+
*/
|
|
100
|
+
style?: any;
|
|
101
|
+
/**
|
|
102
|
+
* URL tujuan navigasi (jika menggunakan tautan anchor <a>).
|
|
103
|
+
*/
|
|
104
|
+
href?: string;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Teks label tombol opsional.
|
|
108
|
+
*/
|
|
109
|
+
text?: string;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Mode hanya menampilkan ikon tanpa teks.
|
|
113
|
+
* @default true
|
|
114
|
+
*/
|
|
115
|
+
iconOnly?: boolean;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Menonaktifkan tombol.
|
|
119
|
+
* @default false
|
|
120
|
+
*/
|
|
121
|
+
disabled?: boolean;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Skala ukuran tombol.
|
|
125
|
+
* @default 'md'
|
|
126
|
+
*/
|
|
127
|
+
size?: "sm" | "md" | "lg" | "icon";
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Kustomisasi visual granular tombol navigasi (UiProps).
|
|
131
|
+
*/
|
|
132
|
+
ui?: UiProps;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Callback saat tombol diklik.
|
|
136
|
+
*/
|
|
137
|
+
onClick?: (event?: any) => void;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Class CSS kustom.
|
|
141
|
+
*/
|
|
142
|
+
className?: string;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Label aksesibilitas ARIA.
|
|
146
|
+
* @default 'Go to last page'
|
|
147
|
+
*/
|
|
148
|
+
ariaLabel?: string;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Ikon kustom untuk tombol last page (menggantikan >>).
|
|
152
|
+
*/
|
|
153
|
+
icon?: any;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Tombol navigasi langsung ke halaman terakhir (Compound PaginationLast).
|
|
158
|
+
*/
|
|
159
|
+
|
|
160
|
+
const props = defineProps<PaginationLastProps>();
|
|
161
|
+
</script>
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// Auto-generated by TTDK Design System Vue Type Generator
|
|
3
|
+
import type { DefineComponent } from "vue";
|
|
4
|
+
import { buildUiVars, UiProps } from "../../core/types";
|
|
5
|
+
|
|
6
|
+
export interface PaginationLastProps {
|
|
7
|
+
/**
|
|
8
|
+
* Inline CSS style kustom.
|
|
9
|
+
*/
|
|
10
|
+
style?: any;
|
|
11
|
+
/**
|
|
12
|
+
* URL tujuan navigasi (jika menggunakan tautan anchor <a>).
|
|
13
|
+
*/
|
|
14
|
+
href?: string;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Teks label tombol opsional.
|
|
18
|
+
*/
|
|
19
|
+
text?: string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Mode hanya menampilkan ikon tanpa teks.
|
|
23
|
+
* @default true
|
|
24
|
+
*/
|
|
25
|
+
iconOnly?: boolean;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Menonaktifkan tombol.
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Skala ukuran tombol.
|
|
35
|
+
* @default 'md'
|
|
36
|
+
*/
|
|
37
|
+
size?: "sm" | "md" | "lg" | "icon";
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Kustomisasi visual granular tombol navigasi (UiProps).
|
|
41
|
+
*/
|
|
42
|
+
ui?: UiProps;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Callback saat tombol diklik.
|
|
46
|
+
*/
|
|
47
|
+
onClick?: (event?: any) => void;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Class CSS kustom.
|
|
51
|
+
*/
|
|
52
|
+
className?: string;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Label aksesibilitas ARIA.
|
|
56
|
+
* @default 'Go to last page'
|
|
57
|
+
*/
|
|
58
|
+
ariaLabel?: string;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Ikon kustom untuk tombol last page (menggantikan >>).
|
|
62
|
+
*/
|
|
63
|
+
icon?: any;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
declare const component: DefineComponent<PaginationLastProps>;
|
|
67
|
+
export default component;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<template v-if="Boolean(href) && !disabled">
|
|
3
|
+
<a
|
|
4
|
+
:href="href"
|
|
5
|
+
:class="`ttdk-pagination-link ${className || ''}`.trim()"
|
|
6
|
+
:aria-current="isActive ? 'page' : undefined"
|
|
7
|
+
:aria-label="ariaLabel"
|
|
8
|
+
:data-active="isActive ? 'true' : 'false'"
|
|
9
|
+
:data-size="size || 'md'"
|
|
10
|
+
:data-disabled="disabled ? 'true' : 'false'"
|
|
11
|
+
:style="{
|
|
12
|
+
...buildUiVars(ui),
|
|
13
|
+
...(typeof style === 'object' ? style : {}),
|
|
14
|
+
}"
|
|
15
|
+
@click="
|
|
16
|
+
async (e) => {
|
|
17
|
+
if (disabled) {
|
|
18
|
+
e.preventDefault();
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
if (onClick) {
|
|
22
|
+
onClick(e);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
"
|
|
26
|
+
><slot
|
|
27
|
+
/></a>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<template v-if="!href || Boolean(disabled)">
|
|
31
|
+
<button
|
|
32
|
+
type="button"
|
|
33
|
+
:class="`ttdk-pagination-link ${className || ''}`.trim()"
|
|
34
|
+
:aria-current="isActive ? 'page' : undefined"
|
|
35
|
+
:aria-label="ariaLabel"
|
|
36
|
+
:data-active="isActive ? 'true' : 'false'"
|
|
37
|
+
:data-size="size || 'md'"
|
|
38
|
+
:data-disabled="disabled ? 'true' : 'false'"
|
|
39
|
+
:disabled="disabled"
|
|
40
|
+
:style="{
|
|
41
|
+
...buildUiVars(ui),
|
|
42
|
+
}"
|
|
43
|
+
@click="
|
|
44
|
+
async (e) => {
|
|
45
|
+
if (!disabled && onClick) {
|
|
46
|
+
onClick(e);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
"
|
|
50
|
+
>
|
|
51
|
+
<slot />
|
|
52
|
+
</button>
|
|
53
|
+
</template>
|
|
54
|
+
</template>
|
|
55
|
+
|
|
56
|
+
<script setup lang="ts">
|
|
57
|
+
import { buildUiVars, UiProps } from "../../core/types";
|
|
58
|
+
|
|
59
|
+
export interface PaginationLinkProps {
|
|
60
|
+
/**
|
|
61
|
+
* Inline CSS style kustom.
|
|
62
|
+
*/
|
|
63
|
+
style?: any;
|
|
64
|
+
/**
|
|
65
|
+
* Menandai item sebagai halaman yang sedang aktif saat ini.
|
|
66
|
+
* @default false
|
|
67
|
+
*/
|
|
68
|
+
isActive?: boolean;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Menonaktifkan link atau tombol halaman.
|
|
72
|
+
* @default false
|
|
73
|
+
*/
|
|
74
|
+
disabled?: boolean;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Ukuran link pagination.
|
|
78
|
+
* @default 'md'
|
|
79
|
+
*/
|
|
80
|
+
size?: "sm" | "md" | "lg" | "icon";
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* URL tujuan navigasi (jika menggunakan tautan anchor <a>).
|
|
84
|
+
*/
|
|
85
|
+
href?: string;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Kustomisasi visual granular tombol link pagination (UiProps).
|
|
89
|
+
*/
|
|
90
|
+
ui?: UiProps;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Callback saat link atau tombol diklik.
|
|
94
|
+
*/
|
|
95
|
+
onClick?: (event?: any) => void;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Class CSS kustom.
|
|
99
|
+
*/
|
|
100
|
+
className?: string;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Label aksesibilitas ARIA.
|
|
104
|
+
*/
|
|
105
|
+
ariaLabel?: string;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Konten teks atau elemen anak di dalam link pagination.
|
|
109
|
+
*/
|
|
110
|
+
children?: any;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Komponen tombol atau link nomor halaman (Compound PaginationLink ala Shadcn UI).
|
|
115
|
+
*/
|
|
116
|
+
|
|
117
|
+
const props = defineProps<PaginationLinkProps>();
|
|
118
|
+
</script>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// Auto-generated by TTDK Design System Vue Type Generator
|
|
3
|
+
import type { DefineComponent } from "vue";
|
|
4
|
+
import { buildUiVars, UiProps } from "../../core/types";
|
|
5
|
+
|
|
6
|
+
export interface PaginationLinkProps {
|
|
7
|
+
/**
|
|
8
|
+
* Inline CSS style kustom.
|
|
9
|
+
*/
|
|
10
|
+
style?: any;
|
|
11
|
+
/**
|
|
12
|
+
* Menandai item sebagai halaman yang sedang aktif saat ini.
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
15
|
+
isActive?: boolean;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Menonaktifkan link atau tombol halaman.
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Ukuran link pagination.
|
|
25
|
+
* @default 'md'
|
|
26
|
+
*/
|
|
27
|
+
size?: "sm" | "md" | "lg" | "icon";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* URL tujuan navigasi (jika menggunakan tautan anchor <a>).
|
|
31
|
+
*/
|
|
32
|
+
href?: string;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Kustomisasi visual granular tombol link pagination (UiProps).
|
|
36
|
+
*/
|
|
37
|
+
ui?: UiProps;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Callback saat link atau tombol diklik.
|
|
41
|
+
*/
|
|
42
|
+
onClick?: (event?: any) => void;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Class CSS kustom.
|
|
46
|
+
*/
|
|
47
|
+
className?: string;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Label aksesibilitas ARIA.
|
|
51
|
+
*/
|
|
52
|
+
ariaLabel?: string;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Konten teks atau elemen anak di dalam link pagination.
|
|
56
|
+
*/
|
|
57
|
+
children?: any;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
declare const component: DefineComponent<PaginationLinkProps>;
|
|
61
|
+
export default component;
|