@ttdk-design-system/library-react 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.
Files changed (184) hide show
  1. package/AI_GUIDE.md +6518 -0
  2. package/README.md +106 -2
  3. package/llms.txt +6518 -0
  4. package/package.json +1099 -4
  5. package/src/core/index.ts +2 -0
  6. package/src/core/tailwind-preset.cjs +62 -0
  7. package/src/core/tailwind-preset.ts +85 -0
  8. package/src/core/theme/tokens.css +663 -0
  9. package/src/core/types.ts +836 -0
  10. package/src/index.ts +17 -0
  11. package/src/tailwind-preset.cjs +62 -0
  12. package/src/tailwind-preset.ts +85 -0
  13. package/src/types.ts +1 -0
  14. package/src/web/accordion/AI_GUIDE.md +149 -0
  15. package/src/web/accordion/accordion.css +1 -0
  16. package/src/web/accordion/accordion.tsx +430 -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.tsx +318 -0
  22. package/src/web/alert/index.ts +3 -0
  23. package/src/web/alert/manifest.json +240 -0
  24. package/src/web/avatar/AI_GUIDE.md +118 -0
  25. package/src/web/avatar/avatar.css +1 -0
  26. package/src/web/avatar/avatar.tsx +233 -0
  27. package/src/web/avatar/index.ts +3 -0
  28. package/src/web/avatar/manifest.json +195 -0
  29. package/src/web/badge/AI_GUIDE.md +94 -0
  30. package/src/web/badge/badge.css +1 -0
  31. package/src/web/badge/badge.tsx +140 -0
  32. package/src/web/badge/index.ts +2 -0
  33. package/src/web/badge/manifest.json +141 -0
  34. package/src/web/banner/AI_GUIDE.md +130 -0
  35. package/src/web/banner/banner.css +1 -0
  36. package/src/web/banner/banner.tsx +334 -0
  37. package/src/web/banner/index.ts +3 -0
  38. package/src/web/banner/manifest.json +240 -0
  39. package/src/web/breadcrumb/AI_GUIDE.md +120 -0
  40. package/src/web/breadcrumb/breadcrumb.css +1 -0
  41. package/src/web/breadcrumb/breadcrumb.tsx +306 -0
  42. package/src/web/breadcrumb/index.ts +3 -0
  43. package/src/web/breadcrumb/manifest.json +225 -0
  44. package/src/web/button/AI_GUIDE.md +121 -0
  45. package/src/web/button/button.css +1 -0
  46. package/src/web/button/button.tsx +287 -0
  47. package/src/web/button/index.ts +2 -0
  48. package/src/web/button/manifest.json +177 -0
  49. package/src/web/calendar/AI_GUIDE.md +151 -0
  50. package/src/web/calendar/calendar.css +1 -0
  51. package/src/web/calendar/calendar.tsx +1611 -0
  52. package/src/web/calendar/index.ts +3 -0
  53. package/src/web/calendar/manifest.json +470 -0
  54. package/src/web/card/AI_GUIDE.md +133 -0
  55. package/src/web/card/card.css +1 -0
  56. package/src/web/card/card.tsx +408 -0
  57. package/src/web/card/index.ts +4 -0
  58. package/src/web/card/manifest.json +357 -0
  59. package/src/web/checkbox/AI_GUIDE.md +146 -0
  60. package/src/web/checkbox/checkbox.css +1 -0
  61. package/src/web/checkbox/checkbox.tsx +307 -0
  62. package/src/web/checkbox/index.ts +2 -0
  63. package/src/web/checkbox/manifest.json +294 -0
  64. package/src/web/chip/AI_GUIDE.md +186 -0
  65. package/src/web/chip/chip.css +1 -0
  66. package/src/web/chip/chip.tsx +230 -0
  67. package/src/web/chip/index.ts +2 -0
  68. package/src/web/chip/manifest.json +186 -0
  69. package/src/web/dropdown/AI_GUIDE.md +167 -0
  70. package/src/web/dropdown/dropdown.css +1 -0
  71. package/src/web/dropdown/dropdown.tsx +1274 -0
  72. package/src/web/dropdown/index.ts +3 -0
  73. package/src/web/dropdown/manifest.json +576 -0
  74. package/src/web/flex/AI_GUIDE.md +113 -0
  75. package/src/web/flex/flex-item.tsx +97 -0
  76. package/src/web/flex/flex.css +1 -0
  77. package/src/web/flex/flex.tsx +108 -0
  78. package/src/web/flex/index.ts +5 -0
  79. package/src/web/flex/manifest.json +162 -0
  80. package/src/web/form/index.ts +7 -0
  81. package/src/web/grid/AI_GUIDE.md +112 -0
  82. package/src/web/grid/grid-item.tsx +112 -0
  83. package/src/web/grid/grid.css +1 -0
  84. package/src/web/grid/grid.tsx +99 -0
  85. package/src/web/grid/index.ts +5 -0
  86. package/src/web/grid/manifest.json +153 -0
  87. package/src/web/index.ts +86 -0
  88. package/src/web/input/AI_GUIDE.md +159 -0
  89. package/src/web/input/index.ts +3 -0
  90. package/src/web/input/input.css +1 -0
  91. package/src/web/input/input.tsx +537 -0
  92. package/src/web/input/manifest.json +465 -0
  93. package/src/web/input-number/AI_GUIDE.md +164 -0
  94. package/src/web/input-number/index.ts +3 -0
  95. package/src/web/input-number/input-number.css +1 -0
  96. package/src/web/input-number/input-number.tsx +1193 -0
  97. package/src/web/input-number/manifest.json +575 -0
  98. package/src/web/modal/AI_GUIDE.md +171 -0
  99. package/src/web/modal/index.ts +3 -0
  100. package/src/web/modal/manifest.json +375 -0
  101. package/src/web/modal/modal.css +1 -0
  102. package/src/web/modal/modal.tsx +571 -0
  103. package/src/web/pagination/AI_GUIDE.md +148 -0
  104. package/src/web/pagination/index.ts +21 -0
  105. package/src/web/pagination/manifest.json +432 -0
  106. package/src/web/pagination/pagination-content.tsx +45 -0
  107. package/src/web/pagination/pagination-ellipsis.tsx +54 -0
  108. package/src/web/pagination/pagination-first.tsx +155 -0
  109. package/src/web/pagination/pagination-item.tsx +45 -0
  110. package/src/web/pagination/pagination-last.tsx +155 -0
  111. package/src/web/pagination/pagination-link.tsx +121 -0
  112. package/src/web/pagination/pagination-next.tsx +158 -0
  113. package/src/web/pagination/pagination-previous.tsx +158 -0
  114. package/src/web/pagination/pagination.css +1 -0
  115. package/src/web/pagination/pagination.tsx +687 -0
  116. package/src/web/popover/AI_GUIDE.md +163 -0
  117. package/src/web/popover/index.ts +3 -0
  118. package/src/web/popover/manifest.json +396 -0
  119. package/src/web/popover/popover.css +1 -0
  120. package/src/web/popover/popover.tsx +702 -0
  121. package/src/web/radio/AI_GUIDE.md +155 -0
  122. package/src/web/radio/index.ts +2 -0
  123. package/src/web/radio/manifest.json +294 -0
  124. package/src/web/radio/radio.css +1 -0
  125. package/src/web/radio/radio.tsx +290 -0
  126. package/src/web/selectbox/AI_GUIDE.md +216 -0
  127. package/src/web/selectbox/index.ts +3 -0
  128. package/src/web/selectbox/manifest.json +477 -0
  129. package/src/web/selectbox/selectbox.css +1 -0
  130. package/src/web/selectbox/selectbox.tsx +1048 -0
  131. package/src/web/sonner/AI_GUIDE.md +98 -0
  132. package/src/web/sonner/index.ts +114 -0
  133. package/src/web/sonner/manifest.json +132 -0
  134. package/src/web/sonner/sonner.css +1 -0
  135. package/src/web/sonner/sonner.tsx +177 -0
  136. package/src/web/table/AI_GUIDE.md +145 -0
  137. package/src/web/table/index.ts +35 -0
  138. package/src/web/table/manifest.json +168 -0
  139. package/src/web/table/table-body.tsx +45 -0
  140. package/src/web/table/table-caption.tsx +45 -0
  141. package/src/web/table/table-cell.tsx +74 -0
  142. package/src/web/table/table-empty.tsx +108 -0
  143. package/src/web/table/table-footer.tsx +45 -0
  144. package/src/web/table/table-head.tsx +80 -0
  145. package/src/web/table/table-header.tsx +45 -0
  146. package/src/web/table/table-row.tsx +69 -0
  147. package/src/web/table/table.css +1 -0
  148. package/src/web/table/table.tsx +305 -0
  149. package/src/web/tabs/AI_GUIDE.md +150 -0
  150. package/src/web/tabs/index.ts +3 -0
  151. package/src/web/tabs/manifest.json +315 -0
  152. package/src/web/tabs/tabs.css +1 -0
  153. package/src/web/tabs/tabs.tsx +332 -0
  154. package/src/web/text/AI_GUIDE.md +129 -0
  155. package/src/web/text/index.ts +3 -0
  156. package/src/web/text/manifest.json +195 -0
  157. package/src/web/text/text.css +1 -0
  158. package/src/web/text/text.tsx +689 -0
  159. package/src/web/textarea/AI_GUIDE.md +141 -0
  160. package/src/web/textarea/index.ts +3 -0
  161. package/src/web/textarea/manifest.json +438 -0
  162. package/src/web/textarea/textarea.css +1 -0
  163. package/src/web/textarea/textarea.tsx +467 -0
  164. package/src/web/tooltip/AI_GUIDE.md +110 -0
  165. package/src/web/tooltip/index.ts +3 -0
  166. package/src/web/tooltip/manifest.json +222 -0
  167. package/src/web/tooltip/tooltip.css +1 -0
  168. package/src/web/tooltip/tooltip.tsx +423 -0
  169. package/src/webview/bottomsheet/AI_GUIDE.md +141 -0
  170. package/src/webview/bottomsheet/bottomsheet.css +1 -0
  171. package/src/webview/bottomsheet/bottomsheet.tsx +603 -0
  172. package/src/webview/bottomsheet/index.ts +4 -0
  173. package/src/webview/bottomsheet/manifest.json +377 -0
  174. package/src/webview/button/AI_GUIDE.md +79 -0
  175. package/src/webview/button/button-ios.css +1 -0
  176. package/src/webview/button/button-ios.tsx +138 -0
  177. package/src/webview/button/button-material.css +1 -0
  178. package/src/webview/button/button-material.tsx +138 -0
  179. package/src/webview/button/index.ts +7 -0
  180. package/src/webview/button/manifest.json +148 -0
  181. package/src/webview/index.ts +7 -0
  182. package/tailwind-preset.cjs +62 -0
  183. package/tailwind-preset.js +62 -0
  184. package/ttdk-manifest.json +10188 -0
@@ -0,0 +1,3 @@
1
+ export { default } from './calendar';
2
+ export { default as Calendar } from './calendar';
3
+ export * from './calendar'
@@ -0,0 +1,470 @@
1
+ {
2
+ "name": "@ttdk-design-system/calendar",
3
+ "component": "Calendar",
4
+ "folder": "calendar",
5
+ "description": "TTDK Calendar component with multi-theme support.",
6
+ "stylesheets": [
7
+ {
8
+ "theme": "common",
9
+ "file": "calendar.css",
10
+ "importPath": "web/calendar/calendar.css"
11
+ }
12
+ ],
13
+ "props": {
14
+ "value": {
15
+ "name": "value",
16
+ "type": "any",
17
+ "optional": true,
18
+ "default": null,
19
+ "description": "Nilai tanggal terpilih pada mode controlled. - Single: string ('YYYY-MM-DD') atau Date - Range: { start: string | Date | null, end: string | Date | null } - Multiple: string[] atau Date[]",
20
+ "example": null,
21
+ "param": null
22
+ },
23
+ "defaultValue": {
24
+ "name": "defaultValue",
25
+ "type": "any",
26
+ "optional": true,
27
+ "default": null,
28
+ "description": "Nilai awal tanggal terpilih pada mode uncontrolled.",
29
+ "example": null,
30
+ "param": null
31
+ },
32
+ "id": {
33
+ "name": "id",
34
+ "type": "string",
35
+ "optional": true,
36
+ "default": null,
37
+ "description": "Atribut ID unik untuk elemen root kalender.",
38
+ "example": null,
39
+ "param": null
40
+ },
41
+ "range": {
42
+ "name": "range",
43
+ "type": "boolean",
44
+ "optional": true,
45
+ "default": "false",
46
+ "description": "Mengaktifkan mode pemilihan rentang tanggal (start date - end date).",
47
+ "example": null,
48
+ "param": null
49
+ },
50
+ "multiple": {
51
+ "name": "multiple",
52
+ "type": "boolean",
53
+ "optional": true,
54
+ "default": "false",
55
+ "description": "Mengaktifkan mode pemilihan banyak tanggal sekaligus.",
56
+ "example": null,
57
+ "param": null
58
+ },
59
+ "min": {
60
+ "name": "min",
61
+ "type": "string | Date",
62
+ "optional": true,
63
+ "default": null,
64
+ "description": "Batas tanggal paling awal yang dapat dipilih.",
65
+ "example": null,
66
+ "param": null
67
+ },
68
+ "minValue": {
69
+ "name": "minValue",
70
+ "type": "string | Date",
71
+ "optional": true,
72
+ "default": null,
73
+ "description": "Alias untuk min (kompatibel Nuxt UI: min-value).",
74
+ "example": null,
75
+ "param": null
76
+ },
77
+ "max": {
78
+ "name": "max",
79
+ "type": "string | Date",
80
+ "optional": true,
81
+ "default": null,
82
+ "description": "Batas tanggal paling akhir yang dapat dipilih.",
83
+ "example": null,
84
+ "param": null
85
+ },
86
+ "maxValue": {
87
+ "name": "maxValue",
88
+ "type": "string | Date",
89
+ "optional": true,
90
+ "default": null,
91
+ "description": "Alias untuk max (kompatibel Nuxt UI: max-value).",
92
+ "example": null,
93
+ "param": null
94
+ },
95
+ "isDateDisabled": {
96
+ "name": "isDateDisabled",
97
+ "type": "(date: Date) => boolean",
98
+ "optional": true,
99
+ "default": null,
100
+ "description": "Fungsi untuk menonaktifkan tanggal tertentu secara spesifik (misal: hari libur / akhir pekan).",
101
+ "example": null,
102
+ "param": null
103
+ },
104
+ "isDateUnavailable": {
105
+ "name": "isDateUnavailable",
106
+ "type": "(date: Date) => boolean",
107
+ "optional": true,
108
+ "default": null,
109
+ "description": "Fungsi untuk menandai tanggal tidak tersedia (ditampilkan coret strikethrough).",
110
+ "example": null,
111
+ "param": null
112
+ },
113
+ "numberOfMonths": {
114
+ "name": "numberOfMonths",
115
+ "type": "number",
116
+ "optional": true,
117
+ "default": "1",
118
+ "description": "Jumlah bulan yang ditampilkan secara berdampingan.",
119
+ "example": null,
120
+ "param": null
121
+ },
122
+ "weekStartsOn": {
123
+ "name": "weekStartsOn",
124
+ "type": "0 | 1 | 2 | 3 | 4 | 5 | 6",
125
+ "optional": true,
126
+ "default": "1",
127
+ "description": "Hari awal dalam seminggu: - 0 = Minggu (Sunday) - 1 = Senin (Monday)",
128
+ "example": null,
129
+ "param": null
130
+ },
131
+ "locale": {
132
+ "name": "locale",
133
+ "type": "string",
134
+ "optional": true,
135
+ "default": "id-ID",
136
+ "description": "Kode lokal bahasa kalender (misal: 'id-ID', 'en-US').",
137
+ "example": null,
138
+ "param": null
139
+ },
140
+ "month": {
141
+ "name": "month",
142
+ "type": "number",
143
+ "optional": true,
144
+ "default": null,
145
+ "description": "Bulan yang sedang ditampilkan (1 - 12) pada mode navigasi controlled.",
146
+ "example": null,
147
+ "param": null
148
+ },
149
+ "year": {
150
+ "name": "year",
151
+ "type": "number",
152
+ "optional": true,
153
+ "default": null,
154
+ "description": "Tahun yang sedang ditampilkan (misal: 2026) pada mode navigasi controlled.",
155
+ "example": null,
156
+ "param": null
157
+ },
158
+ "defaultMonth": {
159
+ "name": "defaultMonth",
160
+ "type": "number",
161
+ "optional": true,
162
+ "default": null,
163
+ "description": "Bulan awal yang sedang ditampilkan (1 - 12).",
164
+ "example": null,
165
+ "param": null
166
+ },
167
+ "defaultYear": {
168
+ "name": "defaultYear",
169
+ "type": "number",
170
+ "optional": true,
171
+ "default": null,
172
+ "description": "Tahun awal yang sedang ditampilkan.",
173
+ "example": null,
174
+ "param": null
175
+ },
176
+ "yearControls": {
177
+ "name": "yearControls",
178
+ "type": "boolean",
179
+ "optional": true,
180
+ "default": "true",
181
+ "description": "Menampilkan tombol navigasi lompat tahun (<< dan >>).",
182
+ "example": null,
183
+ "param": null
184
+ },
185
+ "showOutsideDays": {
186
+ "name": "showOutsideDays",
187
+ "type": "boolean",
188
+ "optional": true,
189
+ "default": "true",
190
+ "description": "Menampilkan hari-hari redup di luar bulan yang aktif (leading & trailing days).",
191
+ "example": null,
192
+ "param": null
193
+ },
194
+ "fixedWeeks": {
195
+ "name": "fixedWeeks",
196
+ "type": "boolean",
197
+ "optional": true,
198
+ "default": "true",
199
+ "description": "Selalu merender 6 baris minggu agar tinggi kalender konsisten stabil antar bulan.",
200
+ "example": null,
201
+ "param": null
202
+ },
203
+ "dateMarkers": {
204
+ "name": "dateMarkers",
205
+ "type": "DateMarker[]",
206
+ "optional": true,
207
+ "default": null,
208
+ "description": "Daftar penanda agenda / jadwal faskes pada tanggal tertentu.",
209
+ "example": null,
210
+ "param": null
211
+ },
212
+ "size": {
213
+ "name": "size",
214
+ "type": "'sm' | 'md' | 'lg'",
215
+ "optional": true,
216
+ "default": "md",
217
+ "description": "Skala ukuran kalender (sm: kompak 32px, md: standar 38px, lg: besar 44px).",
218
+ "example": null,
219
+ "param": null
220
+ },
221
+ "rounded": {
222
+ "name": "rounded",
223
+ "type": "'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full'",
224
+ "optional": true,
225
+ "default": "md",
226
+ "description": "Radius sudut kelengkungan container kalender.",
227
+ "example": null,
228
+ "param": null
229
+ },
230
+ "variant": {
231
+ "name": "variant",
232
+ "type": "'default' | 'bordered' | 'card' | 'flat'",
233
+ "optional": true,
234
+ "default": "bordered",
235
+ "description": "Varian visual tampilan kalender: - 'default': Bersih dengan background putih/gelap. - 'bordered': Dengan bingkai border solid luar. - 'card': Dengan elevasi bayangan halus kartu. - 'flat': Minimalis tanpa border dan tanpa shadow.",
236
+ "example": null,
237
+ "param": null
238
+ },
239
+ "disabled": {
240
+ "name": "disabled",
241
+ "type": "boolean",
242
+ "optional": true,
243
+ "default": "false",
244
+ "description": "Menonaktifkan seluruh kalender dari interaksi.",
245
+ "example": null,
246
+ "param": null
247
+ },
248
+ "readOnly": {
249
+ "name": "readOnly",
250
+ "type": "boolean",
251
+ "optional": true,
252
+ "default": "false",
253
+ "description": "Mode hanya-baca (read-only).",
254
+ "example": null,
255
+ "param": null
256
+ },
257
+ "onValueChange": {
258
+ "name": "onValueChange",
259
+ "type": "(value: any) => void",
260
+ "optional": true,
261
+ "default": null,
262
+ "description": "Callback event saat nilai tanggal berubah.",
263
+ "example": null,
264
+ "param": null
265
+ },
266
+ "onChange": {
267
+ "name": "onChange",
268
+ "type": "(event: any) => void",
269
+ "optional": true,
270
+ "default": null,
271
+ "description": "Callback event native saat nilai berubah.",
272
+ "example": null,
273
+ "param": null
274
+ },
275
+ "onMonthChange": {
276
+ "name": "onMonthChange",
277
+ "type": "(month: number, year: number) => void",
278
+ "optional": true,
279
+ "default": null,
280
+ "description": "Callback saat navigasi bulan atau tahun berubah.",
281
+ "example": null,
282
+ "param": null
283
+ },
284
+ "onYearChange": {
285
+ "name": "onYearChange",
286
+ "type": "(month: number, year: number) => void",
287
+ "optional": true,
288
+ "default": null,
289
+ "description": "Callback saat tahun tampilan kalender berubah.",
290
+ "example": null,
291
+ "param": null
292
+ },
293
+ "defaultViewMode": {
294
+ "name": "defaultViewMode",
295
+ "type": "'day' | 'month' | 'year'",
296
+ "optional": true,
297
+ "default": "day",
298
+ "description": "Mode tampilan awal kalender ('day', 'month', 'year').",
299
+ "example": null,
300
+ "param": null
301
+ },
302
+ "viewMode": {
303
+ "name": "viewMode",
304
+ "type": "'day' | 'month' | 'year'",
305
+ "optional": true,
306
+ "default": null,
307
+ "description": "Mode tampilan kalender saat ini ('day', 'month', 'year') untuk mode controlled.",
308
+ "example": null,
309
+ "param": null
310
+ },
311
+ "onViewModeChange": {
312
+ "name": "onViewModeChange",
313
+ "type": "(mode: 'day' | 'month' | 'year') => void",
314
+ "optional": true,
315
+ "default": null,
316
+ "description": "Callback saat mode tampilan kalender berubah ('day', 'month', 'year').",
317
+ "example": null,
318
+ "param": null
319
+ },
320
+ "className": {
321
+ "name": "className",
322
+ "type": "string",
323
+ "optional": true,
324
+ "default": null,
325
+ "description": "Class CSS kustom untuk container utama.",
326
+ "example": null,
327
+ "param": null
328
+ },
329
+ "style": {
330
+ "name": "style",
331
+ "type": "any",
332
+ "optional": true,
333
+ "default": null,
334
+ "description": "Inline style CSS kustom untuk container utama.",
335
+ "example": null,
336
+ "param": null
337
+ },
338
+ "headerClass": {
339
+ "name": "headerClass",
340
+ "type": "string",
341
+ "optional": true,
342
+ "default": null,
343
+ "description": "Class CSS kustom untuk header kalender.",
344
+ "example": null,
345
+ "param": null
346
+ },
347
+ "headerStyle": {
348
+ "name": "headerStyle",
349
+ "type": "UiProps",
350
+ "optional": true,
351
+ "default": null,
352
+ "description": "Inline style kustom untuk header kalender.",
353
+ "example": null,
354
+ "param": null
355
+ },
356
+ "navBtnClass": {
357
+ "name": "navBtnClass",
358
+ "type": "string",
359
+ "optional": true,
360
+ "default": null,
361
+ "description": "Class CSS kustom untuk tombol navigasi.",
362
+ "example": null,
363
+ "param": null
364
+ },
365
+ "navBtnStyle": {
366
+ "name": "navBtnStyle",
367
+ "type": "UiProps",
368
+ "optional": true,
369
+ "default": null,
370
+ "description": "Inline style kustom untuk tombol navigasi.",
371
+ "example": null,
372
+ "param": null
373
+ },
374
+ "cellClass": {
375
+ "name": "cellClass",
376
+ "type": "string",
377
+ "optional": true,
378
+ "default": null,
379
+ "description": "Class CSS kustom untuk cell tanggal.",
380
+ "example": null,
381
+ "param": null
382
+ },
383
+ "cellStyle": {
384
+ "name": "cellStyle",
385
+ "type": "UiProps",
386
+ "optional": true,
387
+ "default": null,
388
+ "description": "Inline style kustom untuk cell tanggal.",
389
+ "example": null,
390
+ "param": null
391
+ },
392
+ "ui": {
393
+ "name": "ui",
394
+ "type": "UiProps",
395
+ "optional": true,
396
+ "default": null,
397
+ "description": "Kustomisasi visual granular UiProps.",
398
+ "example": null,
399
+ "param": null
400
+ }
401
+ },
402
+ "subInterfaces": {
403
+ "DateRange": {
404
+ "start": {
405
+ "name": "start",
406
+ "type": "string | Date | null",
407
+ "optional": false,
408
+ "default": null,
409
+ "description": "",
410
+ "example": null,
411
+ "param": null
412
+ },
413
+ "end": {
414
+ "name": "end",
415
+ "type": "string | Date | null",
416
+ "optional": false,
417
+ "default": null,
418
+ "description": "",
419
+ "example": null,
420
+ "param": null
421
+ }
422
+ },
423
+ "DateMarker": {
424
+ "date": {
425
+ "name": "date",
426
+ "type": "string",
427
+ "optional": false,
428
+ "default": null,
429
+ "description": "",
430
+ "example": null,
431
+ "param": null
432
+ },
433
+ "color": {
434
+ "name": "color",
435
+ "type": "string",
436
+ "optional": true,
437
+ "default": null,
438
+ "description": "",
439
+ "example": null,
440
+ "param": null
441
+ },
442
+ "tooltip": {
443
+ "name": "tooltip",
444
+ "type": "string",
445
+ "optional": true,
446
+ "default": null,
447
+ "description": "",
448
+ "example": null,
449
+ "param": null
450
+ },
451
+ "dot": {
452
+ "name": "dot",
453
+ "type": "boolean",
454
+ "optional": true,
455
+ "default": null,
456
+ "description": "",
457
+ "example": null,
458
+ "param": null
459
+ }
460
+ }
461
+ },
462
+ "supportedFrameworks": [
463
+ "react",
464
+ "vue",
465
+ "svelte"
466
+ ],
467
+ "themes": [
468
+ "tw"
469
+ ]
470
+ }
@@ -0,0 +1,133 @@
1
+ # <Card /> — TTDK Component Reference
2
+
3
+ TTDK Card component with multi-theme support.
4
+
5
+ ## 1. Stylesheets & Theming (Pure CSS)
6
+ Import the corresponding stylesheet for the theme you wish to use:
7
+ - **COMMON Theme**: `import "@ttdk-design-system/library-<react|vue|svelte>/web/card/card.css";`
8
+
9
+ ## 2. Subpath Component Import
10
+ ```ts
11
+ // React
12
+ import Card from "@ttdk-design-system/library-react/web/card";
13
+
14
+ // Vue 3
15
+ import Card from "@ttdk-design-system/library-vue/web/card";
16
+
17
+ // Svelte
18
+ import Card from "@ttdk-design-system/library-svelte/web/card";
19
+ ```
20
+
21
+ ## 3. Props & API Reference
22
+
23
+ | Prop | Type | Default | Description |
24
+ | :--- | :--- | :--- | :--- |
25
+ | `variant?` | `'bordered' | 'elevated' | 'flat' | 'ghost'` | `default` | Gaya varian visual kartu. - 'bordered': Kartu dengan border halus dan background card standar. - 'elevated': Kartu dengan bayangan elevasi bertingkat (shadow). - 'flat': Kartu dengan latar netral subtle tanpa bayangan. - 'ghost': Kartu transparan minimalis tanpa border atau bayangan. |
26
+ | `size?` | `'sm' | 'md' | 'lg'` | `md` | Kepadatan padding internal kartu. - 'sm': Padding kompak (12px / 16px). - 'md': Padding proporsional standar (20px / 24px). - 'lg': Padding lapang / hero (28px / 32px). |
27
+ | `cardWidth?` | `'auto' | 'full' | '1-1' | '1-2' | '1-3' | '1-4' | 'mobile'` | `auto` | Preset batas lebar kartu sesuai standar token TTDK. - 'auto': Fleksibel mengikuti lebar kontainer parent. - 'full': Lebar penuh 100%. - '1-1': 1128px (Grid Desktop Maksimal). - '1-2': 552px (Grid 1/2). - '1-3': 360px (Grid 1/3). - '1-4': 264px (Grid 1/4). - 'mobile': 328px (Optimal Layar Seluler). |
28
+ | `rounded?` | `'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full'` | `md` | Sudut kelengkungan radius kartu. |
29
+ | `hoverable?` | `boolean` | `false` | Menambahkan efek hover interaktif (elevasi bayangan naik + border highlight + pointer kursor). |
30
+ | `clickable?` | `boolean` | `false` | Menjadikan kartu sebagai elemen interaktif yang dapat diklik. |
31
+ | `loading?` | `boolean` | `false` | Menampilkan efek placeholder shimmer / skeleton loader saat kartu dalam proses memuat data. |
32
+ | `disabled?` | `boolean` | `false` | Menonaktifkan interaksi kartu dan meredupkan opacity. |
33
+ | `title?` | `any` | `-` | Judul kartu pada area header. |
34
+ | `subtitle?` | `any` | `-` | Subjudul atau teks deskripsi singkat di bawah judul. |
35
+ | `extra?` | `any` | `-` | Konten pelengkap di sudut kanan atas header kartu (badge, menu tombol, link aksi). |
36
+ | `cover?` | `any` | `-` | Media gambar cover atau banner visual kartu (berupa URL string gambar atau elemen/node kustom). |
37
+ | `coverAlt?` | `string` | `-` | Alt text untuk gambar cover jika `cover` berupa URL string. |
38
+ | `coverPosition?` | `'top' | 'bottom'` | `top` | Posisi media cover pada kartu ('top' atau 'bottom'). |
39
+ | `actions?` | `any` | `-` | Grup tombol aksi terstruktur di area footer kartu. |
40
+ | `footer?` | `any` | `-` | Konten kustom untuk area footer kartu. |
41
+ | `headerBorder?` | `boolean` | `true` | Menampilkan garis pembatas divider di bawah header kartu. |
42
+ | `footerBorder?` | `boolean` | `true` | Menampilkan garis pembatas divider di atas footer kartu. |
43
+ | `onClick?` | `(event: any) => void` | `-` | Callback event saat kartu diklik. |
44
+ | `ui?` | `UiProps` | `-` | Kustomisasi visual granular root kontainer kartu (UiProps). |
45
+ | `style?` | `any` | `-` | Inline CSS style object native. |
46
+ | `className?` | `string` | `-` | Class CSS kustom untuk root kontainer kartu. |
47
+ | `headerStyle?` | `UiProps` | `-` | Style kustom untuk area header kartu (UiProps). |
48
+ | `headerClass?` | `string` | `-` | Class CSS kustom untuk area header kartu. |
49
+ | `titleStyle?` | `UiProps` | `-` | Style kustom untuk teks judul kartu (UiProps). |
50
+ | `titleClass?` | `string` | `-` | Class CSS kustom untuk teks judul kartu. |
51
+ | `subtitleStyle?` | `UiProps` | `-` | Style kustom untuk teks subjudul / deskripsi header (UiProps). |
52
+ | `subtitleClass?` | `string` | `-` | Class CSS kustom untuk teks subjudul / deskripsi header. |
53
+ | `extraStyle?` | `UiProps` | `-` | Style kustom untuk elemen extra di sudut kanan header (UiProps). |
54
+ | `extraClass?` | `string` | `-` | Class CSS kustom untuk elemen extra di sudut kanan header. |
55
+ | `bodyStyle?` | `UiProps` | `-` | Style kustom untuk area body / konten utama kartu (UiProps). |
56
+ | `bodyClass?` | `string` | `-` | Class CSS kustom untuk area body / konten utama kartu. |
57
+ | `footerStyle?` | `UiProps` | `-` | Style kustom untuk area footer kartu (UiProps). |
58
+ | `footerClass?` | `string` | `-` | Class CSS kustom untuk area footer kartu. |
59
+ | `coverStyle?` | `UiProps` | `-` | Style kustom untuk area media cover kartu (UiProps). |
60
+ | `coverClass?` | `string` | `-` | Class CSS kustom untuk area media cover kartu. |
61
+ | `children?` | `any` | `-` | Konten anak atau slot kustom (children). |
62
+
63
+ ## 4. Usage Examples
64
+
65
+ ### React Example
66
+ ```tsx
67
+ import Card from "@ttdk-design-system/library-react/web/card";
68
+ import "@ttdk-design-system/library-react/web/card/card.css";
69
+ import Button from "@ttdk-design-system/library-react/button";
70
+ import "@ttdk-design-system/library-react/button/button.css";
71
+
72
+ export function Example() {
73
+ return (
74
+ <Card variant="bordered" hoverable size="md">
75
+ <h3 style={{ margin: '0 0 8px 0', fontSize: '18px', fontWeight: 600 }}>
76
+ Puskesmas Kecamatan Gambir
77
+ </h3>
78
+ <p style={{ margin: '0 0 16px 0', color: '#71717a', fontSize: '14px' }}>
79
+ Terdaftar di SATUSEHAT dengan status integrasi aktif dan 12 modul operasional.
80
+ </p>
81
+ <Button variant="outline" size="sm">
82
+ Lihat Rekam Medis
83
+ </Button>
84
+ </Card>
85
+ );
86
+ }
87
+ ```
88
+
89
+ ### Vue 3 Example
90
+ ```vue
91
+ <script setup lang="ts">
92
+ import Card from "@ttdk-design-system/library-vue/web/card";
93
+ import "@ttdk-design-system/library-vue/web/card/card.css";
94
+ import Button from "@ttdk-design-system/library-vue/button";
95
+ import "@ttdk-design-system/library-vue/button/button.css";
96
+ </script>
97
+
98
+ <template>
99
+ <Card variant="bordered" :hoverable="true" size="md">
100
+ <h3 style="margin: 0 0 8px 0; font-size: 18px; font-weight: 600;">
101
+ Puskesmas Kecamatan Gambir
102
+ </h3>
103
+ <p style="margin: 0 0 16px 0; color: #71717a; font-size: 14px;">
104
+ Terdaftar di SATUSEHAT dengan status integrasi aktif dan 12 modul operasional.
105
+ </p>
106
+ <Button variant="outline" size="sm">
107
+ Lihat Rekam Medis
108
+ </Button>
109
+ </Card>
110
+ </template>
111
+ ```
112
+
113
+ ### Svelte Example
114
+ ```svelte
115
+ <script lang="ts">
116
+ import Card from "@ttdk-design-system/library-svelte/web/card";
117
+ import "@ttdk-design-system/library-svelte/web/card/card.css";
118
+ import Button from "@ttdk-design-system/library-svelte/button";
119
+ import "@ttdk-design-system/library-svelte/button/button.css";
120
+ </script>
121
+
122
+ <Card variant="bordered" hoverable={true} size="md">
123
+ <h3 style="margin: 0 0 8px 0; font-size: 18px; font-weight: 600;">
124
+ Puskesmas Kecamatan Gambir
125
+ </h3>
126
+ <p style="margin: 0 0 16px 0; color: #71717a; font-size: 14px;">
127
+ Terdaftar di SATUSEHAT dengan status integrasi aktif dan 12 modul operasional.
128
+ </p>
129
+ <Button variant="outline" size="sm">
130
+ Lihat Rekam Medis
131
+ </Button>
132
+ </Card>
133
+ ```
@@ -0,0 +1 @@
1
+ .ttdk-card{box-sizing:border-box;background-color:var(--ttdk-bg-card,#fff);color:var(--ttdk-ui-color,var(--ttdk-text-icon-primary,#232323));border:1px solid var(--ttdk-stroke-subtle,#e4e5e7);flex-direction:column;font-family:inherit;transition:transform .2s cubic-bezier(.4,0,.2,1),box-shadow .2s cubic-bezier(.4,0,.2,1),border-color .2s cubic-bezier(.4,0,.2,1),background-color .2s;display:flex;position:relative;overflow:hidden}.ttdk-card *,.ttdk-card :before,.ttdk-card :after{box-sizing:border-box}.ttdk-card[data-variant=bordered]{background-color:var(--ttdk-bg-card,#fff);border:1px solid var(--ttdk-stroke-subtle,#e4e5e7);box-shadow:0 1px 3px #1413130a}.ttdk-card[data-variant=elevated]{background-color:var(--ttdk-bg-card,#fff);box-shadow:var(--ttdk-shadow-md,0px 4px 16px #00000014);border:1px solid #1413130f}.ttdk-card[data-variant=flat]{background-color:var(--ttdk-bg-secondary-disabled,#f1f2f3);box-shadow:none;border:1px solid #0000}.ttdk-card[data-variant=ghost]{border:1px dashed var(--ttdk-stroke-divider,#cacccf);box-shadow:none;background-color:#0000}.ttdk-card[data-width=auto]{width:auto}.ttdk-card[data-width=full]{width:100%}.ttdk-card[data-width="1-1"]{width:100%;max-width:var(--ttdk-card-size-1-1,1128px)}.ttdk-card[data-width="1-2"]{width:100%;max-width:var(--ttdk-card-size-1-2,552px)}.ttdk-card[data-width="1-3"]{width:100%;max-width:var(--ttdk-card-size-1-3,360px)}.ttdk-card[data-width="1-4"]{width:100%;max-width:var(--ttdk-card-size-1-4,264px)}.ttdk-card[data-width=mobile]{width:100%;max-width:var(--ttdk-card-size-mobile,328px)}.ttdk-card[data-rounded=none]{border-radius:var(--ttdk-radius-none,0px)}.ttdk-card[data-rounded=xs]{border-radius:var(--ttdk-radius-xs,6px)}.ttdk-card[data-rounded=sm]{border-radius:var(--ttdk-radius-sm,8px)}.ttdk-card[data-rounded=md]{border-radius:var(--ttdk-radius-md,12px)}.ttdk-card[data-rounded=lg]{border-radius:var(--ttdk-radius-lg,16px)}.ttdk-card[data-rounded=xl],.ttdk-card[data-rounded=full]{border-radius:var(--ttdk-radius-xl,24px)}.ttdk-card[data-clickable=true]{cursor:pointer;user-select:none}.ttdk-card[data-hoverable=true]:hover,.ttdk-card[data-clickable=true]:hover{border-color:var(--ttdk-stroke-border-focus,#128f8a);transform:translateY(-2px);box-shadow:0 8px 24px #128f8a1f,0 2px 8px #0000000f}.ttdk-card[data-clickable=true]:active{transform:translateY(0)scale(.995)}.ttdk-card[data-clickable=true]:focus-visible{outline:2px solid var(--ttdk-stroke-border-focus,#128f8a);outline-offset:2px}.ttdk-card[data-disabled=true]{opacity:.55;pointer-events:none;cursor:not-allowed}.ttdk-card-header{justify-content:space-between;align-items:center;gap:var(--ttdk-spacing-12,12px);box-sizing:border-box;width:100%;display:flex}.ttdk-card-header-bordered{border-bottom:1px solid var(--ttdk-stroke-subtle,#e4e5e7)}.ttdk-card-header-main{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.ttdk-card-title{color:var(--ttdk-ui-color,var(--ttdk-text-icon-primary,#141313));margin:0;font-weight:600;line-height:1.35}.ttdk-card-subtitle{color:var(--ttdk-ui-color,var(--ttdk-text-icon-secondary,#7b828a));margin:0;font-size:.8125rem;font-weight:400;line-height:1.4}.ttdk-card-extra{align-items:center;gap:var(--ttdk-spacing-8,8px);flex-shrink:0;display:flex}.ttdk-card-body{width:100%;color:inherit;box-sizing:border-box;flex:1;line-height:1.6}.ttdk-card-footer{justify-content:space-between;align-items:center;gap:var(--ttdk-spacing-12,12px);box-sizing:border-box;width:100%;display:flex}.ttdk-card-footer-bordered{border-top:1px solid var(--ttdk-stroke-subtle,#e4e5e7)}.ttdk-card-footer-content{flex:1;align-items:center;min-width:0;display:flex}.ttdk-card-actions{align-items:center;gap:var(--ttdk-spacing-8,8px);flex-shrink:0;margin-left:auto;display:flex}.ttdk-card-cover{aspect-ratio:16/9;background-color:var(--ttdk-bg-secondary-disabled,#f1f2f3);width:100%;display:block;position:relative;overflow:hidden}.ttdk-card-cover img,.ttdk-card-cover video,.ttdk-card-cover svg{object-fit:cover;width:100%;height:100%;transition:transform .3s;display:block}.ttdk-card[data-hoverable=true]:hover .ttdk-card-cover img,.ttdk-card[data-clickable=true]:hover .ttdk-card-cover img{transform:scale(1.03)}.ttdk-card[data-size=sm] .ttdk-card-header{padding:10px 14px}.ttdk-card[data-size=sm] .ttdk-card-title{font-size:.875rem}.ttdk-card[data-size=sm] .ttdk-card-subtitle{font-size:.75rem}.ttdk-card[data-size=sm] .ttdk-card-body{padding:14px;font-size:.8125rem}.ttdk-card[data-size=sm] .ttdk-card-footer{padding:10px 14px;font-size:.8125rem}.ttdk-card[data-size=md] .ttdk-card-header{padding:16px 20px}.ttdk-card[data-size=md] .ttdk-card-title{font-size:1rem}.ttdk-card[data-size=md] .ttdk-card-subtitle{font-size:.8125rem}.ttdk-card[data-size=md] .ttdk-card-body{padding:20px;font-size:.875rem}.ttdk-card[data-size=md] .ttdk-card-footer{padding:14px 20px;font-size:.875rem}.ttdk-card[data-size=lg] .ttdk-card-header{padding:20px 28px}.ttdk-card[data-size=lg] .ttdk-card-title{font-size:1.125rem}.ttdk-card[data-size=lg] .ttdk-card-subtitle{font-size:.875rem}.ttdk-card[data-size=lg] .ttdk-card-body{padding:28px;font-size:.9375rem}.ttdk-card[data-size=lg] .ttdk-card-footer{padding:18px 28px;font-size:.9375rem}@keyframes ttdk-card-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}.ttdk-card-skeleton{flex-direction:column;gap:16px;width:100%;padding:20px;display:flex}.ttdk-card-skeleton-header{align-items:center;gap:12px;display:flex}.ttdk-card-skeleton-avatar{background:linear-gradient(90deg,#f1f2f3 25%,#e4e5e7 50%,#f1f2f3 75%) 0 0/200% 100%;border-radius:50%;flex-shrink:0;width:40px;height:40px;animation:1.5s infinite ttdk-card-shimmer}.ttdk-card-skeleton-title-group{flex-direction:column;flex:1;gap:6px;display:flex}.ttdk-card-skeleton-line{background:linear-gradient(90deg,#f1f2f3 25%,#e4e5e7 50%,#f1f2f3 75%) 0 0/200% 100%;border-radius:4px;height:12px;animation:1.5s infinite ttdk-card-shimmer}.ttdk-card-skeleton-line-title{width:45%;height:16px}.ttdk-card-skeleton-line-subtitle{width:65%;height:10px}.ttdk-card-skeleton-body{flex-direction:column;gap:10px;margin-top:4px;display:flex}.dark .ttdk-card,:root.dark .ttdk-card,[data-theme=dark] .ttdk-card{background-color:var(--ttdk-bg-card,#232323);color:var(--ttdk-text-icon-primary,#cacccf);border-color:var(--ttdk-stroke-subtle,#313336)}.dark .ttdk-card[data-variant=bordered],:root.dark .ttdk-card[data-variant=bordered],[data-theme=dark] .ttdk-card[data-variant=bordered]{background-color:var(--ttdk-bg-card,#232323);border-color:var(--ttdk-stroke-subtle,#313336);box-shadow:0 1px 4px #00000059}.dark .ttdk-card[data-variant=elevated],:root.dark .ttdk-card[data-variant=elevated],[data-theme=dark] .ttdk-card[data-variant=elevated]{background-color:var(--ttdk-bg-card,#232323);border-color:var(--ttdk-stroke-subtle,#313336);box-shadow:0 4px 20px #00000080}.dark .ttdk-card[data-variant=flat],:root.dark .ttdk-card[data-variant=flat],[data-theme=dark] .ttdk-card[data-variant=flat]{background-color:var(--ttdk-bg-secondary-disabled,#1a1c1e);border-color:#0000}.dark .ttdk-card[data-variant=ghost],:root.dark .ttdk-card[data-variant=ghost],[data-theme=dark] .ttdk-card[data-variant=ghost]{border-color:var(--ttdk-stroke-divider,#4a4f53);background-color:#0000}.dark .ttdk-card-title,:root.dark .ttdk-card-title,[data-theme=dark] .ttdk-card-title{color:var(--ttdk-text-icon-primary,#fff)}.dark .ttdk-card-subtitle,:root.dark .ttdk-card-subtitle,[data-theme=dark] .ttdk-card-subtitle{color:var(--ttdk-text-icon-secondary,#969ba2)}.dark .ttdk-card-header-bordered,:root.dark .ttdk-card-header-bordered,[data-theme=dark] .ttdk-card-header-bordered{border-bottom-color:var(--ttdk-stroke-divider,#313336)}.dark .ttdk-card-footer-bordered,:root.dark .ttdk-card-footer-bordered,[data-theme=dark] .ttdk-card-footer-bordered{border-top-color:var(--ttdk-stroke-divider,#313336)}.dark .ttdk-card-cover,:root.dark .ttdk-card-cover,[data-theme=dark] .ttdk-card-cover{background-color:#1a1c1e}.dark .ttdk-card[data-hoverable=true]:hover,:root.dark .ttdk-card[data-hoverable=true]:hover,[data-theme=dark] .ttdk-card[data-hoverable=true]:hover,.dark .ttdk-card[data-clickable=true]:hover,:root.dark .ttdk-card[data-clickable=true]:hover,[data-theme=dark] .ttdk-card[data-clickable=true]:hover{border-color:var(--ttdk-brand-default,#16b3ac);box-shadow:0 8px 28px #128f8a38,0 2px 10px #0006}.dark .ttdk-card-skeleton-avatar,:root.dark .ttdk-card-skeleton-avatar,[data-theme=dark] .ttdk-card-skeleton-avatar,.dark .ttdk-card-skeleton-line,:root.dark .ttdk-card-skeleton-line,[data-theme=dark] .ttdk-card-skeleton-line{background:linear-gradient(90deg,#2d3034 25%,#393d43 50%,#2d3034 75%) 0 0/200% 100%}