@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,160 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<template v-if="Boolean(href) && !disabled">
|
|
3
|
+
<a
|
|
4
|
+
:href="href"
|
|
5
|
+
:class="
|
|
6
|
+
`ttdk-pagination-link ttdk-pagination-next ${className || ''}`.trim()
|
|
7
|
+
"
|
|
8
|
+
:aria-label="ariaLabel || 'Go to next 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">
|
|
28
|
+
<span class="ttdk-pagination-next-text">{{ text || "Next" }}</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="9 18 15 12 9 6"></polyline>
|
|
43
|
+
</svg>
|
|
44
|
+
</template>
|
|
45
|
+
</a>
|
|
46
|
+
</template>
|
|
47
|
+
|
|
48
|
+
<template v-if="!href || Boolean(disabled)">
|
|
49
|
+
<button
|
|
50
|
+
type="button"
|
|
51
|
+
:class="
|
|
52
|
+
`ttdk-pagination-link ttdk-pagination-next ${className || ''}`.trim()
|
|
53
|
+
"
|
|
54
|
+
:aria-label="ariaLabel || 'Go to next page'"
|
|
55
|
+
:data-size="size || 'md'"
|
|
56
|
+
:data-disabled="disabled ? 'true' : 'false'"
|
|
57
|
+
:disabled="disabled"
|
|
58
|
+
:style="{
|
|
59
|
+
...buildUiVars(ui),
|
|
60
|
+
}"
|
|
61
|
+
@click="
|
|
62
|
+
async (e) => {
|
|
63
|
+
if (!disabled && onClick) {
|
|
64
|
+
onClick(e);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
"
|
|
68
|
+
>
|
|
69
|
+
<template v-if="!iconOnly">
|
|
70
|
+
<span class="ttdk-pagination-next-text">{{ text || "Next" }}</span>
|
|
71
|
+
</template>
|
|
72
|
+
|
|
73
|
+
<template v-if="icon">
|
|
74
|
+
{{ icon }}
|
|
75
|
+
</template>
|
|
76
|
+
|
|
77
|
+
<template v-if="!icon">
|
|
78
|
+
<svg
|
|
79
|
+
class="ttdk-pagination-icon"
|
|
80
|
+
viewBox="0 0 24 24"
|
|
81
|
+
fill="none"
|
|
82
|
+
aria-hidden="true"
|
|
83
|
+
>
|
|
84
|
+
<polyline points="9 18 15 12 9 6"></polyline>
|
|
85
|
+
</svg>
|
|
86
|
+
</template>
|
|
87
|
+
</button>
|
|
88
|
+
</template>
|
|
89
|
+
</template>
|
|
90
|
+
|
|
91
|
+
<script setup lang="ts">
|
|
92
|
+
import { buildUiVars, UiProps } from "../../core/types";
|
|
93
|
+
|
|
94
|
+
export interface PaginationNextProps {
|
|
95
|
+
/**
|
|
96
|
+
* Inline CSS style kustom.
|
|
97
|
+
*/
|
|
98
|
+
style?: any;
|
|
99
|
+
/**
|
|
100
|
+
* URL tujuan navigasi (jika menggunakan tautan anchor <a>).
|
|
101
|
+
*/
|
|
102
|
+
href?: string;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Teks label tombol.
|
|
106
|
+
* @default 'Next'
|
|
107
|
+
*/
|
|
108
|
+
text?: string;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Mode hanya menampilkan ikon tanpa teks.
|
|
112
|
+
* @default false
|
|
113
|
+
*/
|
|
114
|
+
iconOnly?: boolean;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Menonaktifkan tombol.
|
|
118
|
+
* @default false
|
|
119
|
+
*/
|
|
120
|
+
disabled?: boolean;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Skala ukuran tombol.
|
|
124
|
+
* @default 'md'
|
|
125
|
+
*/
|
|
126
|
+
size?: "sm" | "md" | "lg" | "icon";
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Kustomisasi visual granular tombol navigasi (UiProps).
|
|
130
|
+
*/
|
|
131
|
+
ui?: UiProps;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Callback saat tombol diklik.
|
|
135
|
+
*/
|
|
136
|
+
onClick?: (event?: any) => void;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Class CSS kustom.
|
|
140
|
+
*/
|
|
141
|
+
className?: string;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Label aksesibilitas ARIA.
|
|
145
|
+
* @default 'Go to next page'
|
|
146
|
+
*/
|
|
147
|
+
ariaLabel?: string;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Ikon kustom untuk tombol next page (menggantikan >).
|
|
151
|
+
*/
|
|
152
|
+
icon?: any;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Tombol navigasi ke halaman selanjutnya (Compound PaginationNext ala Shadcn UI).
|
|
157
|
+
*/
|
|
158
|
+
|
|
159
|
+
const props = defineProps<PaginationNextProps>();
|
|
160
|
+
</script>
|
|
@@ -0,0 +1,68 @@
|
|
|
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 PaginationNextProps {
|
|
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.
|
|
18
|
+
* @default 'Next'
|
|
19
|
+
*/
|
|
20
|
+
text?: string;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Mode hanya menampilkan ikon tanpa teks.
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
iconOnly?: boolean;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Menonaktifkan tombol.
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Skala ukuran tombol.
|
|
36
|
+
* @default 'md'
|
|
37
|
+
*/
|
|
38
|
+
size?: "sm" | "md" | "lg" | "icon";
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Kustomisasi visual granular tombol navigasi (UiProps).
|
|
42
|
+
*/
|
|
43
|
+
ui?: UiProps;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Callback saat tombol diklik.
|
|
47
|
+
*/
|
|
48
|
+
onClick?: (event?: any) => void;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Class CSS kustom.
|
|
52
|
+
*/
|
|
53
|
+
className?: string;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Label aksesibilitas ARIA.
|
|
57
|
+
* @default 'Go to next page'
|
|
58
|
+
*/
|
|
59
|
+
ariaLabel?: string;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Ikon kustom untuk tombol next page (menggantikan >).
|
|
63
|
+
*/
|
|
64
|
+
icon?: any;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
declare const component: DefineComponent<PaginationNextProps>;
|
|
68
|
+
export default component;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<template v-if="Boolean(href) && !disabled">
|
|
3
|
+
<a
|
|
4
|
+
:href="href"
|
|
5
|
+
:class="
|
|
6
|
+
`ttdk-pagination-link ttdk-pagination-prev ${className || ''}`.trim()
|
|
7
|
+
"
|
|
8
|
+
:aria-label="ariaLabel || 'Go to previous 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="15 18 9 12 15 6"></polyline>
|
|
39
|
+
</svg>
|
|
40
|
+
</template>
|
|
41
|
+
|
|
42
|
+
<template v-if="!iconOnly">
|
|
43
|
+
<span class="ttdk-pagination-prev-text">{{ text || "Previous" }}</span>
|
|
44
|
+
</template>
|
|
45
|
+
</a>
|
|
46
|
+
</template>
|
|
47
|
+
|
|
48
|
+
<template v-if="!href || Boolean(disabled)">
|
|
49
|
+
<button
|
|
50
|
+
type="button"
|
|
51
|
+
:class="
|
|
52
|
+
`ttdk-pagination-link ttdk-pagination-prev ${className || ''}`.trim()
|
|
53
|
+
"
|
|
54
|
+
:aria-label="ariaLabel || 'Go to previous page'"
|
|
55
|
+
:data-size="size || 'md'"
|
|
56
|
+
:data-disabled="disabled ? 'true' : 'false'"
|
|
57
|
+
:disabled="disabled"
|
|
58
|
+
:style="{
|
|
59
|
+
...buildUiVars(ui),
|
|
60
|
+
}"
|
|
61
|
+
@click="
|
|
62
|
+
async (e) => {
|
|
63
|
+
if (!disabled && onClick) {
|
|
64
|
+
onClick(e);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
"
|
|
68
|
+
>
|
|
69
|
+
<template v-if="icon">
|
|
70
|
+
{{ icon }}
|
|
71
|
+
</template>
|
|
72
|
+
|
|
73
|
+
<template v-if="!icon">
|
|
74
|
+
<svg
|
|
75
|
+
class="ttdk-pagination-icon"
|
|
76
|
+
viewBox="0 0 24 24"
|
|
77
|
+
fill="none"
|
|
78
|
+
aria-hidden="true"
|
|
79
|
+
>
|
|
80
|
+
<polyline points="15 18 9 12 15 6"></polyline>
|
|
81
|
+
</svg>
|
|
82
|
+
</template>
|
|
83
|
+
|
|
84
|
+
<template v-if="!iconOnly">
|
|
85
|
+
<span class="ttdk-pagination-prev-text">{{ text || "Previous" }}</span>
|
|
86
|
+
</template>
|
|
87
|
+
</button>
|
|
88
|
+
</template>
|
|
89
|
+
</template>
|
|
90
|
+
|
|
91
|
+
<script setup lang="ts">
|
|
92
|
+
import { buildUiVars, UiProps } from "../../core/types";
|
|
93
|
+
|
|
94
|
+
export interface PaginationPreviousProps {
|
|
95
|
+
/**
|
|
96
|
+
* Inline CSS style kustom.
|
|
97
|
+
*/
|
|
98
|
+
style?: any;
|
|
99
|
+
/**
|
|
100
|
+
* URL tujuan navigasi (jika menggunakan tautan anchor <a>).
|
|
101
|
+
*/
|
|
102
|
+
href?: string;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Teks label tombol.
|
|
106
|
+
* @default 'Previous'
|
|
107
|
+
*/
|
|
108
|
+
text?: string;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Mode hanya menampilkan ikon tanpa teks.
|
|
112
|
+
* @default false
|
|
113
|
+
*/
|
|
114
|
+
iconOnly?: boolean;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Menonaktifkan tombol.
|
|
118
|
+
* @default false
|
|
119
|
+
*/
|
|
120
|
+
disabled?: boolean;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Skala ukuran tombol.
|
|
124
|
+
* @default 'md'
|
|
125
|
+
*/
|
|
126
|
+
size?: "sm" | "md" | "lg" | "icon";
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Kustomisasi visual granular tombol navigasi (UiProps).
|
|
130
|
+
*/
|
|
131
|
+
ui?: UiProps;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Callback saat tombol diklik.
|
|
135
|
+
*/
|
|
136
|
+
onClick?: (event?: any) => void;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Class CSS kustom.
|
|
140
|
+
*/
|
|
141
|
+
className?: string;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Label aksesibilitas ARIA.
|
|
145
|
+
* @default 'Go to previous page'
|
|
146
|
+
*/
|
|
147
|
+
ariaLabel?: string;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Ikon kustom untuk tombol previous page (menggantikan <).
|
|
151
|
+
*/
|
|
152
|
+
icon?: any;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Tombol navigasi ke halaman sebelumnya (Compound PaginationPrevious ala Shadcn UI).
|
|
157
|
+
*/
|
|
158
|
+
|
|
159
|
+
const props = defineProps<PaginationPreviousProps>();
|
|
160
|
+
</script>
|
|
@@ -0,0 +1,68 @@
|
|
|
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 PaginationPreviousProps {
|
|
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.
|
|
18
|
+
* @default 'Previous'
|
|
19
|
+
*/
|
|
20
|
+
text?: string;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Mode hanya menampilkan ikon tanpa teks.
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
iconOnly?: boolean;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Menonaktifkan tombol.
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Skala ukuran tombol.
|
|
36
|
+
* @default 'md'
|
|
37
|
+
*/
|
|
38
|
+
size?: "sm" | "md" | "lg" | "icon";
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Kustomisasi visual granular tombol navigasi (UiProps).
|
|
42
|
+
*/
|
|
43
|
+
ui?: UiProps;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Callback saat tombol diklik.
|
|
47
|
+
*/
|
|
48
|
+
onClick?: (event?: any) => void;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Class CSS kustom.
|
|
52
|
+
*/
|
|
53
|
+
className?: string;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Label aksesibilitas ARIA.
|
|
57
|
+
* @default 'Go to previous page'
|
|
58
|
+
*/
|
|
59
|
+
ariaLabel?: string;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Ikon kustom untuk tombol previous page (menggantikan <).
|
|
63
|
+
*/
|
|
64
|
+
icon?: any;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
declare const component: DefineComponent<PaginationPreviousProps>;
|
|
68
|
+
export default component;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ttdk-pagination{box-sizing:border-box;font-family:var(--ttdk-font-sans);line-height:var(--ttdk-line-height-tight);user-select:none;justify-content:center;align-items:center;width:100%;max-width:100%;display:flex}.ttdk-pagination-auto-wrapper{justify-content:center;align-items:center;gap:var(--ttdk-spacing-md);flex-wrap:wrap;width:100%;display:flex}.ttdk-pagination-limit{align-items:center;gap:var(--ttdk-spacing-xs);font-size:var(--ttdk-font-size-12);color:var(--ttdk-text-icon-secondary);display:inline-flex}.ttdk-pagination-limit-label{font-size:var(--ttdk-font-size-12);font-weight:var(--ttdk-font-weight-medium);color:var(--ttdk-text-icon-secondary);white-space:nowrap}.ttdk-pagination-limit-select{height:32px;padding:0 var(--ttdk-spacing-xs);border-radius:var(--ttdk-radius-input-md);border:var(--ttdk-stroke-width-thin) solid var(--ttdk-stroke-subtle);background-color:var(--ttdk-bg-base-primary);color:var(--ttdk-text-icon-primary);font-size:var(--ttdk-font-size-12);font-family:inherit;font-weight:var(--ttdk-font-weight-medium);cursor:pointer;outline:none;transition:border-color .15s,box-shadow .15s}.ttdk-pagination-limit-select:focus{border-color:var(--ttdk-stroke-border-focus);box-shadow:0 0 0 2px color-mix(in srgb, var(--ttdk-stroke-border-focus) 20%, transparent)}.ttdk-pagination-content{justify-content:center;align-items:center;gap:var(--ttdk-spacing-xxs);flex-flow:wrap;max-width:100%;margin:0;padding:0;list-style:none;display:inline-flex}.ttdk-pagination-item{align-items:center;margin:0;padding:0;display:inline-flex}.ttdk-pagination-link{box-sizing:border-box;font-family:inherit;font-weight:var(--ttdk-font-weight-medium);cursor:pointer;white-space:nowrap;vertical-align:middle;border:var(--ttdk-stroke-width-thin) solid transparent;color:var(--ttdk-ui-color,var(--ttdk-text-icon-primary));border-radius:var(--ttdk-radius-input-lg);background-color:#0000;outline:none;justify-content:center;align-items:center;text-decoration:none;transition:background-color .15s,color .15s,border-color .15s,box-shadow .15s;display:inline-flex}.ttdk-pagination-link:hover:not([data-disabled=true]):not(:disabled){background-color:var(--ttdk-brand-subtle);color:var(--ttdk-brand-default)}.ttdk-pagination-link:focus-visible{outline:2px solid var(--ttdk-stroke-border-focus);outline-offset:2px}.ttdk-pagination-link[data-active=true]{background-color:var(--ttdk-brand-default);color:var(--ttdk-text-icon-stay-white);border-color:var(--ttdk-brand-default);font-weight:var(--ttdk-font-weight-semibold)}.ttdk-pagination-link[data-active=true]:hover:not([data-disabled=true]):not(:disabled){background-color:var(--ttdk-brand-strong);border-color:var(--ttdk-brand-strong);color:var(--ttdk-text-icon-stay-white)}.ttdk-pagination-link[data-disabled=true],.ttdk-pagination-link:disabled{opacity:.4;cursor:not-allowed;pointer-events:none}.ttdk-pagination-icon{width:var(--ttdk-font-size-16);height:var(--ttdk-font-size-16);stroke:currentColor;stroke-width:var(--ttdk-stroke-width-med);stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.ttdk-pagination[data-size=sm] .ttdk-pagination-link,.ttdk-pagination-link[data-size=sm]{min-width:28px;height:28px;padding:0 var(--ttdk-spacing-xs);font-size:var(--ttdk-font-size-12);border-radius:var(--ttdk-radius-input-md);gap:var(--ttdk-spacing-xxs)}.ttdk-pagination[data-size=sm] .ttdk-pagination-icon,.ttdk-pagination-link[data-size=sm] .ttdk-pagination-icon{width:var(--ttdk-font-size-14);height:var(--ttdk-font-size-14)}.ttdk-pagination[data-size=sm] .ttdk-selectbox-control{height:28px;min-height:28px;font-size:var(--ttdk-font-size-12);padding:0 8px}.ttdk-pagination .ttdk-pagination-link,.ttdk-pagination[data-size=md] .ttdk-pagination-link,.ttdk-pagination-link[data-size=md]{min-width:36px;height:36px;padding:0 var(--ttdk-spacing-sm);font-size:var(--ttdk-font-size-14);border-radius:var(--ttdk-radius-input-lg);gap:6px}.ttdk-pagination .ttdk-pagination-icon,.ttdk-pagination[data-size=md] .ttdk-pagination-icon,.ttdk-pagination-link[data-size=md] .ttdk-pagination-icon{width:var(--ttdk-font-size-16);height:var(--ttdk-font-size-16)}.ttdk-pagination[data-size=lg] .ttdk-pagination-link,.ttdk-pagination-link[data-size=lg]{min-width:44px;height:44px;padding:0 var(--ttdk-spacing-md);font-size:var(--ttdk-font-size-16);border-radius:var(--ttdk-radius-input-lg);gap:var(--ttdk-spacing-xs)}.ttdk-pagination[data-size=lg] .ttdk-pagination-icon,.ttdk-pagination-link[data-size=lg] .ttdk-pagination-icon{width:var(--ttdk-font-size-18);height:var(--ttdk-font-size-18)}.ttdk-pagination-first,.ttdk-pagination-last{padding:0 var(--ttdk-spacing-xs)}.ttdk-pagination-prev{padding-left:var(--ttdk-spacing-xs)}.ttdk-pagination-next{padding-right:var(--ttdk-spacing-xs)}.ttdk-pagination-ellipsis{min-width:36px;height:36px;color:var(--ttdk-text-icon-disabled);justify-content:center;align-items:center;display:inline-flex}.ttdk-pagination[data-size=sm] .ttdk-pagination-ellipsis{min-width:28px;height:28px}.ttdk-pagination[data-size=lg] .ttdk-pagination-ellipsis{min-width:44px;height:44px}.ttdk-sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}html.dark .ttdk-pagination-link,body.dark .ttdk-pagination-link,.dark .ttdk-pagination-link{color:var(--ttdk-text-icon-primary)}html.dark .ttdk-pagination-link:hover:not([data-disabled=true]):not(:disabled),body.dark .ttdk-pagination-link:hover:not([data-disabled=true]):not(:disabled),.dark .ttdk-pagination-link:hover:not([data-disabled=true]):not(:disabled){background-color:color-mix(in srgb, var(--ttdk-brand-default) 15%, transparent);color:var(--ttdk-brand-default)}html.dark .ttdk-pagination-link[data-active=true],body.dark .ttdk-pagination-link[data-active=true],.dark .ttdk-pagination-link[data-active=true]{background-color:var(--ttdk-brand-default);color:var(--ttdk-text-icon-stay-white);border-color:var(--ttdk-brand-default)}html.dark .ttdk-pagination-limit,body.dark .ttdk-pagination-limit,html.dark .ttdk-pagination-limit-label,body.dark .ttdk-pagination-limit-label,.dark .ttdk-pagination-limit,.dark .ttdk-pagination-limit-label{color:var(--ttdk-text-icon-secondary)}html.dark .ttdk-pagination-limit-select,body.dark .ttdk-pagination-limit-select,.dark .ttdk-pagination-limit-select{background-color:var(--ttdk-bg-base-primary);border-color:var(--ttdk-stroke-subtle);color:var(--ttdk-text-icon-primary)}html.dark .ttdk-pagination-ellipsis,body.dark .ttdk-pagination-ellipsis,.dark .ttdk-pagination-ellipsis{color:var(--ttdk-text-icon-disabled)}@media (width<=640px){.ttdk-pagination-prev-text,.ttdk-pagination-next-text{display:none}.ttdk-pagination-prev,.ttdk-pagination-next{padding:0 var(--ttdk-spacing-xs)}}
|