@ttdk-design-system/library-vue 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (232) hide show
  1. package/AI_GUIDE.md +6518 -0
  2. package/llms.txt +6518 -0
  3. package/package.json +1096 -4
  4. package/src/core/index.ts +2 -0
  5. package/src/core/tailwind-preset.cjs +62 -0
  6. package/src/core/tailwind-preset.ts +85 -0
  7. package/src/core/theme/tokens.css +663 -0
  8. package/src/core/types.ts +836 -0
  9. package/src/index.ts +17 -0
  10. package/src/tailwind-preset.cjs +62 -0
  11. package/src/tailwind-preset.ts +85 -0
  12. package/src/types.ts +1 -0
  13. package/src/web/accordion/AI_GUIDE.md +149 -0
  14. package/src/web/accordion/accordion.css +1 -0
  15. package/src/web/accordion/accordion.vue +432 -0
  16. package/src/web/accordion/accordion.vue.d.ts +227 -0
  17. package/src/web/accordion/index.ts +3 -0
  18. package/src/web/accordion/manifest.json +351 -0
  19. package/src/web/alert/AI_GUIDE.md +139 -0
  20. package/src/web/alert/alert.css +1 -0
  21. package/src/web/alert/alert.vue +290 -0
  22. package/src/web/alert/alert.vue.d.ts +154 -0
  23. package/src/web/alert/index.ts +3 -0
  24. package/src/web/alert/manifest.json +240 -0
  25. package/src/web/avatar/AI_GUIDE.md +118 -0
  26. package/src/web/avatar/avatar.css +1 -0
  27. package/src/web/avatar/avatar.vue +217 -0
  28. package/src/web/avatar/avatar.vue.d.ts +135 -0
  29. package/src/web/avatar/index.ts +3 -0
  30. package/src/web/avatar/manifest.json +195 -0
  31. package/src/web/badge/AI_GUIDE.md +94 -0
  32. package/src/web/badge/badge.css +1 -0
  33. package/src/web/badge/badge.vue +135 -0
  34. package/src/web/badge/badge.vue.d.ts +108 -0
  35. package/src/web/badge/index.ts +3 -0
  36. package/src/web/badge/manifest.json +141 -0
  37. package/src/web/banner/AI_GUIDE.md +130 -0
  38. package/src/web/banner/banner.css +1 -0
  39. package/src/web/banner/banner.vue +303 -0
  40. package/src/web/banner/banner.vue.d.ts +162 -0
  41. package/src/web/banner/index.ts +3 -0
  42. package/src/web/banner/manifest.json +240 -0
  43. package/src/web/breadcrumb/AI_GUIDE.md +120 -0
  44. package/src/web/breadcrumb/breadcrumb.css +1 -0
  45. package/src/web/breadcrumb/breadcrumb.vue +313 -0
  46. package/src/web/breadcrumb/breadcrumb.vue.d.ts +139 -0
  47. package/src/web/breadcrumb/index.ts +3 -0
  48. package/src/web/breadcrumb/manifest.json +225 -0
  49. package/src/web/button/AI_GUIDE.md +121 -0
  50. package/src/web/button/button.css +1 -0
  51. package/src/web/button/button.vue +283 -0
  52. package/src/web/button/button.vue.d.ts +147 -0
  53. package/src/web/button/index.ts +3 -0
  54. package/src/web/button/manifest.json +177 -0
  55. package/src/web/calendar/AI_GUIDE.md +151 -0
  56. package/src/web/calendar/calendar.css +1 -0
  57. package/src/web/calendar/calendar.vue +1536 -0
  58. package/src/web/calendar/calendar.vue.d.ts +261 -0
  59. package/src/web/calendar/index.ts +3 -0
  60. package/src/web/calendar/manifest.json +470 -0
  61. package/src/web/card/AI_GUIDE.md +133 -0
  62. package/src/web/card/card.css +1 -0
  63. package/src/web/card/card.vue +423 -0
  64. package/src/web/card/card.vue.d.ts +232 -0
  65. package/src/web/card/index.ts +3 -0
  66. package/src/web/card/manifest.json +357 -0
  67. package/src/web/checkbox/AI_GUIDE.md +146 -0
  68. package/src/web/checkbox/checkbox.css +1 -0
  69. package/src/web/checkbox/checkbox.vue +304 -0
  70. package/src/web/checkbox/checkbox.vue.d.ts +189 -0
  71. package/src/web/checkbox/index.ts +3 -0
  72. package/src/web/checkbox/manifest.json +294 -0
  73. package/src/web/chip/AI_GUIDE.md +186 -0
  74. package/src/web/chip/chip.css +1 -0
  75. package/src/web/chip/chip.vue +220 -0
  76. package/src/web/chip/chip.vue.d.ts +140 -0
  77. package/src/web/chip/index.ts +3 -0
  78. package/src/web/chip/manifest.json +186 -0
  79. package/src/web/dropdown/AI_GUIDE.md +167 -0
  80. package/src/web/dropdown/dropdown.css +1 -0
  81. package/src/web/dropdown/dropdown.vue +1257 -0
  82. package/src/web/dropdown/dropdown.vue.d.ts +381 -0
  83. package/src/web/dropdown/index.ts +3 -0
  84. package/src/web/dropdown/manifest.json +576 -0
  85. package/src/web/flex/AI_GUIDE.md +113 -0
  86. package/src/web/flex/flex-item.vue +94 -0
  87. package/src/web/flex/flex-item.vue.d.ts +84 -0
  88. package/src/web/flex/flex.css +1 -0
  89. package/src/web/flex/flex.vue +103 -0
  90. package/src/web/flex/flex.vue.d.ts +92 -0
  91. package/src/web/flex/index.ts +5 -0
  92. package/src/web/flex/manifest.json +162 -0
  93. package/src/web/form/index.ts +7 -0
  94. package/src/web/grid/AI_GUIDE.md +112 -0
  95. package/src/web/grid/grid-item.vue +109 -0
  96. package/src/web/grid/grid-item.vue.d.ts +99 -0
  97. package/src/web/grid/grid.css +1 -0
  98. package/src/web/grid/grid.vue +94 -0
  99. package/src/web/grid/grid.vue.d.ts +84 -0
  100. package/src/web/grid/index.ts +5 -0
  101. package/src/web/grid/manifest.json +153 -0
  102. package/src/web/index.ts +86 -0
  103. package/src/web/input/AI_GUIDE.md +159 -0
  104. package/src/web/input/index.ts +3 -0
  105. package/src/web/input/input.css +1 -0
  106. package/src/web/input/input.vue +521 -0
  107. package/src/web/input/input.vue.d.ts +274 -0
  108. package/src/web/input/manifest.json +465 -0
  109. package/src/web/input-number/AI_GUIDE.md +164 -0
  110. package/src/web/input-number/index.ts +3 -0
  111. package/src/web/input-number/input-number.css +1 -0
  112. package/src/web/input-number/input-number.vue +1153 -0
  113. package/src/web/input-number/input-number.vue.d.ts +343 -0
  114. package/src/web/input-number/manifest.json +575 -0
  115. package/src/web/modal/AI_GUIDE.md +171 -0
  116. package/src/web/modal/index.ts +3 -0
  117. package/src/web/modal/manifest.json +375 -0
  118. package/src/web/modal/modal.css +1 -0
  119. package/src/web/modal/modal.vue +344 -0
  120. package/src/web/modal/modal.vue.d.ts +64 -0
  121. package/src/web/pagination/AI_GUIDE.md +148 -0
  122. package/src/web/pagination/index.ts +21 -0
  123. package/src/web/pagination/manifest.json +432 -0
  124. package/src/web/pagination/pagination-content.vue +42 -0
  125. package/src/web/pagination/pagination-content.vue.d.ts +28 -0
  126. package/src/web/pagination/pagination-ellipsis.vue +55 -0
  127. package/src/web/pagination/pagination-ellipsis.vue.d.ts +28 -0
  128. package/src/web/pagination/pagination-first.vue +161 -0
  129. package/src/web/pagination/pagination-first.vue.d.ts +67 -0
  130. package/src/web/pagination/pagination-item.vue +42 -0
  131. package/src/web/pagination/pagination-item.vue.d.ts +28 -0
  132. package/src/web/pagination/pagination-last.vue +161 -0
  133. package/src/web/pagination/pagination-last.vue.d.ts +67 -0
  134. package/src/web/pagination/pagination-link.vue +118 -0
  135. package/src/web/pagination/pagination-link.vue.d.ts +61 -0
  136. package/src/web/pagination/pagination-next.vue +160 -0
  137. package/src/web/pagination/pagination-next.vue.d.ts +68 -0
  138. package/src/web/pagination/pagination-previous.vue +160 -0
  139. package/src/web/pagination/pagination-previous.vue.d.ts +68 -0
  140. package/src/web/pagination/pagination.css +1 -0
  141. package/src/web/pagination/pagination.vue +730 -0
  142. package/src/web/pagination/pagination.vue.d.ts +247 -0
  143. package/src/web/popover/AI_GUIDE.md +163 -0
  144. package/src/web/popover/index.ts +3 -0
  145. package/src/web/popover/manifest.json +396 -0
  146. package/src/web/popover/popover.css +1 -0
  147. package/src/web/popover/popover.vue +579 -0
  148. package/src/web/popover/popover.vue.d.ts +83 -0
  149. package/src/web/radio/AI_GUIDE.md +155 -0
  150. package/src/web/radio/index.ts +3 -0
  151. package/src/web/radio/manifest.json +294 -0
  152. package/src/web/radio/radio.css +1 -0
  153. package/src/web/radio/radio.vue +288 -0
  154. package/src/web/radio/radio.vue.d.ts +182 -0
  155. package/src/web/selectbox/AI_GUIDE.md +216 -0
  156. package/src/web/selectbox/index.ts +3 -0
  157. package/src/web/selectbox/manifest.json +477 -0
  158. package/src/web/selectbox/selectbox.css +1 -0
  159. package/src/web/selectbox/selectbox.vue +1024 -0
  160. package/src/web/selectbox/selectbox.vue.d.ts +300 -0
  161. package/src/web/sonner/AI_GUIDE.md +98 -0
  162. package/src/web/sonner/index.ts +114 -0
  163. package/src/web/sonner/manifest.json +132 -0
  164. package/src/web/sonner/sonner.css +1 -0
  165. package/src/web/sonner/sonner.vue +180 -0
  166. package/src/web/sonner/sonner.vue.d.ts +113 -0
  167. package/src/web/table/AI_GUIDE.md +145 -0
  168. package/src/web/table/index.ts +34 -0
  169. package/src/web/table/manifest.json +168 -0
  170. package/src/web/table/table-body.vue +42 -0
  171. package/src/web/table/table-body.vue.d.ts +28 -0
  172. package/src/web/table/table-caption.vue +42 -0
  173. package/src/web/table/table-caption.vue.d.ts +28 -0
  174. package/src/web/table/table-cell.vue +71 -0
  175. package/src/web/table/table-cell.vue.d.ts +49 -0
  176. package/src/web/table/table-empty.vue +105 -0
  177. package/src/web/table/table-empty.vue.d.ts +57 -0
  178. package/src/web/table/table-footer.vue +42 -0
  179. package/src/web/table/table-footer.vue.d.ts +28 -0
  180. package/src/web/table/table-head.vue +78 -0
  181. package/src/web/table/table-head.vue.d.ts +50 -0
  182. package/src/web/table/table-header.vue +42 -0
  183. package/src/web/table/table-header.vue.d.ts +28 -0
  184. package/src/web/table/table-row.vue +70 -0
  185. package/src/web/table/table-row.vue.d.ts +44 -0
  186. package/src/web/table/table.css +1 -0
  187. package/src/web/table/table.vue +298 -0
  188. package/src/web/table/table.vue.d.ts +119 -0
  189. package/src/web/tabs/AI_GUIDE.md +150 -0
  190. package/src/web/tabs/index.ts +2 -0
  191. package/src/web/tabs/manifest.json +315 -0
  192. package/src/web/tabs/tabs.css +1 -0
  193. package/src/web/tabs/tabs.vue +164 -0
  194. package/src/web/tabs/tabs.vue.d.ts +60 -0
  195. package/src/web/text/AI_GUIDE.md +129 -0
  196. package/src/web/text/index.ts +2 -0
  197. package/src/web/text/manifest.json +195 -0
  198. package/src/web/text/text.css +1 -0
  199. package/src/web/text/text.vue +195 -0
  200. package/src/web/text/text.vue.d.ts +161 -0
  201. package/src/web/textarea/AI_GUIDE.md +141 -0
  202. package/src/web/textarea/index.ts +3 -0
  203. package/src/web/textarea/manifest.json +438 -0
  204. package/src/web/textarea/textarea.css +1 -0
  205. package/src/web/textarea/textarea.vue +458 -0
  206. package/src/web/textarea/textarea.vue.d.ts +265 -0
  207. package/src/web/tooltip/AI_GUIDE.md +110 -0
  208. package/src/web/tooltip/index.ts +3 -0
  209. package/src/web/tooltip/manifest.json +222 -0
  210. package/src/web/tooltip/tooltip.css +1 -0
  211. package/src/web/tooltip/tooltip.vue +417 -0
  212. package/src/web/tooltip/tooltip.vue.d.ts +150 -0
  213. package/src/webview/bottomsheet/AI_GUIDE.md +141 -0
  214. package/src/webview/bottomsheet/bottomsheet.css +1 -0
  215. package/src/webview/bottomsheet/bottomsheet.vue +441 -0
  216. package/src/webview/bottomsheet/bottomsheet.vue.d.ts +178 -0
  217. package/src/webview/bottomsheet/index.ts +4 -0
  218. package/src/webview/bottomsheet/manifest.json +377 -0
  219. package/src/webview/button/AI_GUIDE.md +79 -0
  220. package/src/webview/button/button-ios.css +1 -0
  221. package/src/webview/button/button-ios.vue +138 -0
  222. package/src/webview/button/button-ios.vue.d.ts +102 -0
  223. package/src/webview/button/button-material.css +1 -0
  224. package/src/webview/button/button-material.vue +138 -0
  225. package/src/webview/button/button-material.vue.d.ts +102 -0
  226. package/src/webview/button/index.ts +7 -0
  227. package/src/webview/button/manifest.json +148 -0
  228. package/src/webview/index.ts +7 -0
  229. package/tailwind-preset.cjs +62 -0
  230. package/tailwind-preset.js +62 -0
  231. package/ttdk-manifest.json +10188 -0
  232. package/README.md +0 -3
@@ -0,0 +1,423 @@
1
+ <template>
2
+ <div
3
+ :class="`ttdk-card ${className || ''}`.trim()"
4
+ :data-variant="variant || 'default'"
5
+ :data-size="size || 'md'"
6
+ :data-rounded="rounded || 'md'"
7
+ :data-width="cardWidth || 'auto'"
8
+ :data-hoverable="hoverable ? 'true' : 'false'"
9
+ :data-clickable="clickable || onClick ? 'true' : 'false'"
10
+ :data-disabled="disabled ? 'true' : 'false'"
11
+ :data-loading="loading ? 'true' : 'false'"
12
+ :tabIndex="clickable || onClick ? 0 : undefined"
13
+ :role="clickable || onClick ? 'button' : undefined"
14
+ @click="
15
+ async (event) => {
16
+ if (disabled || loading) return;
17
+ if (onClick) onClick(event);
18
+ }
19
+ "
20
+ @keydown="
21
+ async (event) => {
22
+ if (disabled || loading) return;
23
+ if (
24
+ (clickable || onClick) &&
25
+ (event.key === 'Enter' || event.key === ' ')
26
+ ) {
27
+ event.preventDefault();
28
+ if (onClick) onClick(event);
29
+ }
30
+ }
31
+ "
32
+ :style="{
33
+ ...buildUiVars(ui),
34
+ ...(typeof style === 'object' ? style : {}),
35
+ }"
36
+ >
37
+ <template v-if="cover && (!coverPosition || coverPosition === 'top')">
38
+ <div
39
+ :class="
40
+ `ttdk-card-cover ttdk-card-cover-top ${coverClass || ''}`.trim()
41
+ "
42
+ :style="{
43
+ ...buildUiVars(coverStyle),
44
+ }"
45
+ >
46
+ <template v-if="typeof cover === 'string'">
47
+ <img :src="cover" :alt="coverAlt || ''" />
48
+ </template>
49
+
50
+ <template v-if="typeof cover !== 'string'">
51
+ {{ cover }}
52
+ </template>
53
+ </div>
54
+ </template>
55
+
56
+ <template v-if="loading">
57
+ <div class="ttdk-card-skeleton">
58
+ <div class="ttdk-card-skeleton-header">
59
+ <div class="ttdk-card-skeleton-avatar"></div>
60
+ <div class="ttdk-card-skeleton-title-group">
61
+ <div
62
+ class="ttdk-card-skeleton-line ttdk-card-skeleton-line-title"
63
+ ></div>
64
+ <div
65
+ class="ttdk-card-skeleton-line ttdk-card-skeleton-line-subtitle"
66
+ ></div>
67
+ </div>
68
+ </div>
69
+ <div class="ttdk-card-skeleton-body">
70
+ <div
71
+ class="ttdk-card-skeleton-line"
72
+ :style="{
73
+ width: '100%',
74
+ }"
75
+ ></div>
76
+ <div
77
+ class="ttdk-card-skeleton-line"
78
+ :style="{
79
+ width: '85%',
80
+ }"
81
+ ></div>
82
+ <div
83
+ class="ttdk-card-skeleton-line"
84
+ :style="{
85
+ width: '60%',
86
+ }"
87
+ ></div>
88
+ </div>
89
+ </div>
90
+ </template>
91
+
92
+ <template v-if="!loading">
93
+ <template v-if="title || subtitle || extra">
94
+ <div
95
+ :class="
96
+ `ttdk-card-header ${
97
+ headerBorder !== false ? 'ttdk-card-header-bordered' : ''
98
+ } ${headerClass || ''}`.trim()
99
+ "
100
+ :style="{
101
+ ...buildUiVars(headerStyle),
102
+ }"
103
+ >
104
+ <div class="ttdk-card-header-main">
105
+ <template v-if="title">
106
+ <div
107
+ :class="`ttdk-card-title ${titleClass || ''}`.trim()"
108
+ :style="{
109
+ ...buildUiVars(titleStyle),
110
+ }"
111
+ >
112
+ {{ title }}
113
+ </div>
114
+ </template>
115
+
116
+ <template v-if="subtitle">
117
+ <div
118
+ :class="`ttdk-card-subtitle ${subtitleClass || ''}`.trim()"
119
+ :style="{
120
+ ...buildUiVars(subtitleStyle),
121
+ }"
122
+ >
123
+ {{ subtitle }}
124
+ </div>
125
+ </template>
126
+ </div>
127
+ <template v-if="extra">
128
+ <div
129
+ :class="`ttdk-card-extra ${extraClass || ''}`.trim()"
130
+ :style="{
131
+ ...buildUiVars(extraStyle),
132
+ }"
133
+ >
134
+ {{ extra }}
135
+ </div>
136
+ </template>
137
+ </div>
138
+ </template>
139
+
140
+ <div
141
+ :class="`ttdk-card-body ${bodyClass || ''}`.trim()"
142
+ :style="{
143
+ ...buildUiVars(bodyStyle),
144
+ }"
145
+ >
146
+ <slot />
147
+ </div>
148
+
149
+ <template v-if="footer || actions">
150
+ <div
151
+ :class="
152
+ `ttdk-card-footer ${
153
+ footerBorder !== false ? 'ttdk-card-footer-bordered' : ''
154
+ } ${footerClass || ''}`.trim()
155
+ "
156
+ :style="{
157
+ ...buildUiVars(footerStyle),
158
+ }"
159
+ >
160
+ <template v-if="footer">
161
+ <div class="ttdk-card-footer-content">{{ footer }}</div>
162
+ </template>
163
+
164
+ <template v-if="actions">
165
+ <div class="ttdk-card-actions">{{ actions }}</div>
166
+ </template>
167
+ </div>
168
+ </template>
169
+ </template>
170
+
171
+ <template v-if="cover && coverPosition === 'bottom'">
172
+ <div
173
+ :class="
174
+ `ttdk-card-cover ttdk-card-cover-bottom ${coverClass || ''}`.trim()
175
+ "
176
+ :style="{
177
+ ...buildUiVars(coverStyle),
178
+ }"
179
+ >
180
+ <template v-if="typeof cover === 'string'">
181
+ <img :src="cover" :alt="coverAlt || ''" />
182
+ </template>
183
+
184
+ <template v-if="typeof cover !== 'string'">
185
+ {{ cover }}
186
+ </template>
187
+ </div>
188
+ </template>
189
+ </div>
190
+ </template>
191
+
192
+ <script setup lang="ts">
193
+ import { buildUiVars, UiProps } from "../../core/types";
194
+
195
+ export type CardUiProps = UiProps;
196
+ export interface CardProps {
197
+ /**
198
+ * Gaya varian visual kartu.
199
+ * - 'bordered': Kartu dengan border halus dan background card standar.
200
+ * - 'elevated': Kartu dengan bayangan elevasi bertingkat (shadow).
201
+ * - 'flat': Kartu dengan latar netral subtle tanpa bayangan.
202
+ * - 'ghost': Kartu transparan minimalis tanpa border atau bayangan.
203
+ *
204
+ * @default 'default'
205
+ */
206
+ variant?: "bordered" | "elevated" | "flat" | "ghost";
207
+
208
+ /**
209
+ * Kepadatan padding internal kartu.
210
+ * - 'sm': Padding kompak (12px / 16px).
211
+ * - 'md': Padding proporsional standar (20px / 24px).
212
+ * - 'lg': Padding lapang / hero (28px / 32px).
213
+ *
214
+ * @default 'md'
215
+ */
216
+ size?: "sm" | "md" | "lg";
217
+
218
+ /**
219
+ * Preset batas lebar kartu sesuai standar token TTDK.
220
+ * - 'auto': Fleksibel mengikuti lebar kontainer parent.
221
+ * - 'full': Lebar penuh 100%.
222
+ * - '1-1': 1128px (Grid Desktop Maksimal).
223
+ * - '1-2': 552px (Grid 1/2).
224
+ * - '1-3': 360px (Grid 1/3).
225
+ * - '1-4': 264px (Grid 1/4).
226
+ * - 'mobile': 328px (Optimal Layar Seluler).
227
+ *
228
+ * @default 'auto'
229
+ */
230
+ cardWidth?: "auto" | "full" | "1-1" | "1-2" | "1-3" | "1-4" | "mobile";
231
+
232
+ /**
233
+ * Sudut kelengkungan radius kartu.
234
+ *
235
+ * @default 'md'
236
+ */
237
+ rounded?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full";
238
+
239
+ /**
240
+ * Menambahkan efek hover interaktif (elevasi bayangan naik + border highlight + pointer kursor).
241
+ *
242
+ * @default false
243
+ */
244
+ hoverable?: boolean;
245
+
246
+ /**
247
+ * Menjadikan kartu sebagai elemen interaktif yang dapat diklik.
248
+ *
249
+ * @default false
250
+ */
251
+ clickable?: boolean;
252
+
253
+ /**
254
+ * Menampilkan efek placeholder shimmer / skeleton loader saat kartu dalam proses memuat data.
255
+ *
256
+ * @default false
257
+ */
258
+ loading?: boolean;
259
+
260
+ /**
261
+ * Menonaktifkan interaksi kartu dan meredupkan opacity.
262
+ *
263
+ * @default false
264
+ */
265
+ disabled?: boolean;
266
+
267
+ /**
268
+ * Judul kartu pada area header.
269
+ */
270
+ title?: any;
271
+
272
+ /**
273
+ * Subjudul atau teks deskripsi singkat di bawah judul.
274
+ */
275
+ subtitle?: any;
276
+
277
+ /**
278
+ * Konten pelengkap di sudut kanan atas header kartu (badge, menu tombol, link aksi).
279
+ */
280
+ extra?: any;
281
+
282
+ /**
283
+ * Media gambar cover atau banner visual kartu (berupa URL string gambar atau elemen/node kustom).
284
+ */
285
+ cover?: any;
286
+
287
+ /**
288
+ * Alt text untuk gambar cover jika `cover` berupa URL string.
289
+ */
290
+ coverAlt?: string;
291
+
292
+ /**
293
+ * Posisi media cover pada kartu ('top' atau 'bottom').
294
+ *
295
+ * @default 'top'
296
+ */
297
+ coverPosition?: "top" | "bottom";
298
+
299
+ /**
300
+ * Grup tombol aksi terstruktur di area footer kartu.
301
+ */
302
+ actions?: any;
303
+
304
+ /**
305
+ * Konten kustom untuk area footer kartu.
306
+ */
307
+ footer?: any;
308
+
309
+ /**
310
+ * Menampilkan garis pembatas divider di bawah header kartu.
311
+ *
312
+ * @default true
313
+ */
314
+ headerBorder?: boolean;
315
+
316
+ /**
317
+ * Menampilkan garis pembatas divider di atas footer kartu.
318
+ *
319
+ * @default true
320
+ */
321
+ footerBorder?: boolean;
322
+
323
+ /**
324
+ * Callback event saat kartu diklik.
325
+ */
326
+ onClick?: (event: any) => void;
327
+
328
+ /**
329
+ * Kustomisasi visual granular root kontainer kartu (UiProps).
330
+ */
331
+ ui?: UiProps;
332
+
333
+ /**
334
+ * Inline CSS style object native.
335
+ */
336
+ style?: any;
337
+
338
+ /**
339
+ * Class CSS kustom untuk root kontainer kartu.
340
+ */
341
+ className?: string;
342
+
343
+ /**
344
+ * Style kustom untuk area header kartu (UiProps).
345
+ */
346
+ headerStyle?: UiProps;
347
+
348
+ /**
349
+ * Class CSS kustom untuk area header kartu.
350
+ */
351
+ headerClass?: string;
352
+
353
+ /**
354
+ * Style kustom untuk teks judul kartu (UiProps).
355
+ */
356
+ titleStyle?: UiProps;
357
+
358
+ /**
359
+ * Class CSS kustom untuk teks judul kartu.
360
+ */
361
+ titleClass?: string;
362
+
363
+ /**
364
+ * Style kustom untuk teks subjudul / deskripsi header (UiProps).
365
+ */
366
+ subtitleStyle?: UiProps;
367
+
368
+ /**
369
+ * Class CSS kustom untuk teks subjudul / deskripsi header.
370
+ */
371
+ subtitleClass?: string;
372
+
373
+ /**
374
+ * Style kustom untuk elemen extra di sudut kanan header (UiProps).
375
+ */
376
+ extraStyle?: UiProps;
377
+
378
+ /**
379
+ * Class CSS kustom untuk elemen extra di sudut kanan header.
380
+ */
381
+ extraClass?: string;
382
+
383
+ /**
384
+ * Style kustom untuk area body / konten utama kartu (UiProps).
385
+ */
386
+ bodyStyle?: UiProps;
387
+
388
+ /**
389
+ * Class CSS kustom untuk area body / konten utama kartu.
390
+ */
391
+ bodyClass?: string;
392
+
393
+ /**
394
+ * Style kustom untuk area footer kartu (UiProps).
395
+ */
396
+ footerStyle?: UiProps;
397
+
398
+ /**
399
+ * Class CSS kustom untuk area footer kartu.
400
+ */
401
+ footerClass?: string;
402
+
403
+ /**
404
+ * Style kustom untuk area media cover kartu (UiProps).
405
+ */
406
+ coverStyle?: UiProps;
407
+
408
+ /**
409
+ * Class CSS kustom untuk area media cover kartu.
410
+ */
411
+ coverClass?: string;
412
+
413
+ /**
414
+ * Konten anak atau slot kustom (children).
415
+ */
416
+ children?: any;
417
+ }
418
+
419
+ const props = withDefaults(defineProps<CardProps>(), {
420
+ headerBorder: true,
421
+ footerBorder: true,
422
+ });
423
+ </script>
@@ -0,0 +1,232 @@
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 type CardUiProps = UiProps;
7
+
8
+ export interface CardProps {
9
+ /**
10
+ * Gaya varian visual kartu.
11
+ * - 'bordered': Kartu dengan border halus dan background card standar.
12
+ * - 'elevated': Kartu dengan bayangan elevasi bertingkat (shadow).
13
+ * - 'flat': Kartu dengan latar netral subtle tanpa bayangan.
14
+ * - 'ghost': Kartu transparan minimalis tanpa border atau bayangan.
15
+ *
16
+ * @default 'default'
17
+ */
18
+ variant?: "bordered" | "elevated" | "flat" | "ghost";
19
+
20
+ /**
21
+ * Kepadatan padding internal kartu.
22
+ * - 'sm': Padding kompak (12px / 16px).
23
+ * - 'md': Padding proporsional standar (20px / 24px).
24
+ * - 'lg': Padding lapang / hero (28px / 32px).
25
+ *
26
+ * @default 'md'
27
+ */
28
+ size?: "sm" | "md" | "lg";
29
+
30
+ /**
31
+ * Preset batas lebar kartu sesuai standar token TTDK.
32
+ * - 'auto': Fleksibel mengikuti lebar kontainer parent.
33
+ * - 'full': Lebar penuh 100%.
34
+ * - '1-1': 1128px (Grid Desktop Maksimal).
35
+ * - '1-2': 552px (Grid 1/2).
36
+ * - '1-3': 360px (Grid 1/3).
37
+ * - '1-4': 264px (Grid 1/4).
38
+ * - 'mobile': 328px (Optimal Layar Seluler).
39
+ *
40
+ * @default 'auto'
41
+ */
42
+ cardWidth?: "auto" | "full" | "1-1" | "1-2" | "1-3" | "1-4" | "mobile";
43
+
44
+ /**
45
+ * Sudut kelengkungan radius kartu.
46
+ *
47
+ * @default 'md'
48
+ */
49
+ rounded?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full";
50
+
51
+ /**
52
+ * Menambahkan efek hover interaktif (elevasi bayangan naik + border highlight + pointer kursor).
53
+ *
54
+ * @default false
55
+ */
56
+ hoverable?: boolean;
57
+
58
+ /**
59
+ * Menjadikan kartu sebagai elemen interaktif yang dapat diklik.
60
+ *
61
+ * @default false
62
+ */
63
+ clickable?: boolean;
64
+
65
+ /**
66
+ * Menampilkan efek placeholder shimmer / skeleton loader saat kartu dalam proses memuat data.
67
+ *
68
+ * @default false
69
+ */
70
+ loading?: boolean;
71
+
72
+ /**
73
+ * Menonaktifkan interaksi kartu dan meredupkan opacity.
74
+ *
75
+ * @default false
76
+ */
77
+ disabled?: boolean;
78
+
79
+ /**
80
+ * Judul kartu pada area header.
81
+ */
82
+ title?: any;
83
+
84
+ /**
85
+ * Subjudul atau teks deskripsi singkat di bawah judul.
86
+ */
87
+ subtitle?: any;
88
+
89
+ /**
90
+ * Konten pelengkap di sudut kanan atas header kartu (badge, menu tombol, link aksi).
91
+ */
92
+ extra?: any;
93
+
94
+ /**
95
+ * Media gambar cover atau banner visual kartu (berupa URL string gambar atau elemen/node kustom).
96
+ */
97
+ cover?: any;
98
+
99
+ /**
100
+ * Alt text untuk gambar cover jika `cover` berupa URL string.
101
+ */
102
+ coverAlt?: string;
103
+
104
+ /**
105
+ * Posisi media cover pada kartu ('top' atau 'bottom').
106
+ *
107
+ * @default 'top'
108
+ */
109
+ coverPosition?: "top" | "bottom";
110
+
111
+ /**
112
+ * Grup tombol aksi terstruktur di area footer kartu.
113
+ */
114
+ actions?: any;
115
+
116
+ /**
117
+ * Konten kustom untuk area footer kartu.
118
+ */
119
+ footer?: any;
120
+
121
+ /**
122
+ * Menampilkan garis pembatas divider di bawah header kartu.
123
+ *
124
+ * @default true
125
+ */
126
+ headerBorder?: boolean;
127
+
128
+ /**
129
+ * Menampilkan garis pembatas divider di atas footer kartu.
130
+ *
131
+ * @default true
132
+ */
133
+ footerBorder?: boolean;
134
+
135
+ /**
136
+ * Callback event saat kartu diklik.
137
+ */
138
+ onClick?: (event: any) => void;
139
+
140
+ /**
141
+ * Kustomisasi visual granular root kontainer kartu (UiProps).
142
+ */
143
+ ui?: UiProps;
144
+
145
+ /**
146
+ * Inline CSS style object native.
147
+ */
148
+ style?: any;
149
+
150
+ /**
151
+ * Class CSS kustom untuk root kontainer kartu.
152
+ */
153
+ className?: string;
154
+
155
+ /**
156
+ * Style kustom untuk area header kartu (UiProps).
157
+ */
158
+ headerStyle?: UiProps;
159
+
160
+ /**
161
+ * Class CSS kustom untuk area header kartu.
162
+ */
163
+ headerClass?: string;
164
+
165
+ /**
166
+ * Style kustom untuk teks judul kartu (UiProps).
167
+ */
168
+ titleStyle?: UiProps;
169
+
170
+ /**
171
+ * Class CSS kustom untuk teks judul kartu.
172
+ */
173
+ titleClass?: string;
174
+
175
+ /**
176
+ * Style kustom untuk teks subjudul / deskripsi header (UiProps).
177
+ */
178
+ subtitleStyle?: UiProps;
179
+
180
+ /**
181
+ * Class CSS kustom untuk teks subjudul / deskripsi header.
182
+ */
183
+ subtitleClass?: string;
184
+
185
+ /**
186
+ * Style kustom untuk elemen extra di sudut kanan header (UiProps).
187
+ */
188
+ extraStyle?: UiProps;
189
+
190
+ /**
191
+ * Class CSS kustom untuk elemen extra di sudut kanan header.
192
+ */
193
+ extraClass?: string;
194
+
195
+ /**
196
+ * Style kustom untuk area body / konten utama kartu (UiProps).
197
+ */
198
+ bodyStyle?: UiProps;
199
+
200
+ /**
201
+ * Class CSS kustom untuk area body / konten utama kartu.
202
+ */
203
+ bodyClass?: string;
204
+
205
+ /**
206
+ * Style kustom untuk area footer kartu (UiProps).
207
+ */
208
+ footerStyle?: UiProps;
209
+
210
+ /**
211
+ * Class CSS kustom untuk area footer kartu.
212
+ */
213
+ footerClass?: string;
214
+
215
+ /**
216
+ * Style kustom untuk area media cover kartu (UiProps).
217
+ */
218
+ coverStyle?: UiProps;
219
+
220
+ /**
221
+ * Class CSS kustom untuk area media cover kartu.
222
+ */
223
+ coverClass?: string;
224
+
225
+ /**
226
+ * Konten anak atau slot kustom (children).
227
+ */
228
+ children?: any;
229
+ }
230
+
231
+ declare const component: DefineComponent<CardProps>;
232
+ export default component;
@@ -0,0 +1,3 @@
1
+ export { default } from './card.vue';
2
+ export { default as Card } from './card.vue';
3
+ export * from './card.vue';