@ttdk-design-system/library-svelte 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 (270) hide show
  1. package/AI_GUIDE.md +6518 -0
  2. package/dist/core/index.d.ts +2 -0
  3. package/dist/core/index.js +2 -0
  4. package/dist/core/tailwind-preset.cjs +62 -0
  5. package/dist/core/tailwind-preset.d.cts +63 -0
  6. package/dist/core/tailwind-preset.d.ts +74 -0
  7. package/dist/core/tailwind-preset.js +79 -0
  8. package/dist/core/theme/tokens.css +663 -0
  9. package/dist/core/types.d.ts +152 -0
  10. package/dist/core/types.js +735 -0
  11. package/dist/index.d.ts +14 -0
  12. package/dist/index.js +15 -0
  13. package/dist/tailwind-preset.cjs +62 -0
  14. package/dist/tailwind-preset.d.cts +63 -0
  15. package/dist/tailwind-preset.d.ts +74 -0
  16. package/dist/tailwind-preset.js +79 -0
  17. package/dist/types.d.ts +1 -0
  18. package/dist/types.js +1 -0
  19. package/dist/web/accordion/AI_GUIDE.md +149 -0
  20. package/dist/web/accordion/accordion.css +1 -0
  21. package/dist/web/accordion/accordion.svelte +217 -0
  22. package/dist/web/accordion/accordion.svelte.d.ts +224 -0
  23. package/dist/web/accordion/index.d.ts +2 -0
  24. package/dist/web/accordion/index.js +2 -0
  25. package/dist/web/accordion/manifest.json +351 -0
  26. package/dist/web/alert/AI_GUIDE.md +139 -0
  27. package/dist/web/alert/alert.css +1 -0
  28. package/dist/web/alert/alert.svelte +175 -0
  29. package/dist/web/alert/alert.svelte.d.ts +165 -0
  30. package/dist/web/alert/index.d.ts +2 -0
  31. package/dist/web/alert/index.js +2 -0
  32. package/dist/web/alert/manifest.json +240 -0
  33. package/dist/web/avatar/AI_GUIDE.md +118 -0
  34. package/dist/web/avatar/avatar.css +1 -0
  35. package/dist/web/avatar/avatar.svelte +108 -0
  36. package/dist/web/avatar/avatar.svelte.d.ts +147 -0
  37. package/dist/web/avatar/index.d.ts +2 -0
  38. package/dist/web/avatar/index.js +2 -0
  39. package/dist/web/avatar/manifest.json +195 -0
  40. package/dist/web/badge/AI_GUIDE.md +94 -0
  41. package/dist/web/badge/badge.css +1 -0
  42. package/dist/web/badge/badge.svelte +50 -0
  43. package/dist/web/badge/badge.svelte.d.ts +111 -0
  44. package/dist/web/badge/index.d.ts +2 -0
  45. package/dist/web/badge/index.js +2 -0
  46. package/dist/web/badge/manifest.json +141 -0
  47. package/dist/web/banner/AI_GUIDE.md +130 -0
  48. package/dist/web/banner/banner.css +1 -0
  49. package/dist/web/banner/banner.svelte +180 -0
  50. package/dist/web/banner/banner.svelte.d.ts +172 -0
  51. package/dist/web/banner/index.d.ts +2 -0
  52. package/dist/web/banner/index.js +2 -0
  53. package/dist/web/banner/manifest.json +240 -0
  54. package/dist/web/breadcrumb/AI_GUIDE.md +120 -0
  55. package/dist/web/breadcrumb/breadcrumb.css +1 -0
  56. package/dist/web/breadcrumb/breadcrumb.svelte +168 -0
  57. package/dist/web/breadcrumb/breadcrumb.svelte.d.ts +141 -0
  58. package/dist/web/breadcrumb/index.d.ts +2 -0
  59. package/dist/web/breadcrumb/index.js +2 -0
  60. package/dist/web/breadcrumb/manifest.json +225 -0
  61. package/dist/web/button/AI_GUIDE.md +121 -0
  62. package/dist/web/button/button.css +1 -0
  63. package/dist/web/button/button.svelte +154 -0
  64. package/dist/web/button/button.svelte.d.ts +159 -0
  65. package/dist/web/button/index.d.ts +2 -0
  66. package/dist/web/button/index.js +2 -0
  67. package/dist/web/button/manifest.json +177 -0
  68. package/dist/web/calendar/AI_GUIDE.md +151 -0
  69. package/dist/web/calendar/calendar.css +1 -0
  70. package/dist/web/calendar/calendar.svelte +1091 -0
  71. package/dist/web/calendar/calendar.svelte.d.ts +268 -0
  72. package/dist/web/calendar/index.d.ts +2 -0
  73. package/dist/web/calendar/index.js +2 -0
  74. package/dist/web/calendar/manifest.json +470 -0
  75. package/dist/web/card/AI_GUIDE.md +133 -0
  76. package/dist/web/card/card.css +1 -0
  77. package/dist/web/card/card.svelte +217 -0
  78. package/dist/web/card/card.svelte.d.ts +242 -0
  79. package/dist/web/card/index.d.ts +2 -0
  80. package/dist/web/card/index.js +2 -0
  81. package/dist/web/card/manifest.json +357 -0
  82. package/dist/web/checkbox/AI_GUIDE.md +146 -0
  83. package/dist/web/checkbox/checkbox.css +1 -0
  84. package/dist/web/checkbox/checkbox.svelte +131 -0
  85. package/dist/web/checkbox/checkbox.svelte.d.ts +199 -0
  86. package/dist/web/checkbox/index.d.ts +2 -0
  87. package/dist/web/checkbox/index.js +2 -0
  88. package/dist/web/checkbox/manifest.json +294 -0
  89. package/dist/web/chip/AI_GUIDE.md +186 -0
  90. package/dist/web/chip/chip.css +1 -0
  91. package/dist/web/chip/chip.svelte +113 -0
  92. package/dist/web/chip/chip.svelte.d.ts +145 -0
  93. package/dist/web/chip/index.d.ts +2 -0
  94. package/dist/web/chip/index.js +2 -0
  95. package/dist/web/chip/manifest.json +186 -0
  96. package/dist/web/dropdown/AI_GUIDE.md +167 -0
  97. package/dist/web/dropdown/dropdown.css +1 -0
  98. package/dist/web/dropdown/dropdown.svelte +844 -0
  99. package/dist/web/dropdown/dropdown.svelte.d.ts +361 -0
  100. package/dist/web/dropdown/index.d.ts +2 -0
  101. package/dist/web/dropdown/index.js +2 -0
  102. package/dist/web/dropdown/manifest.json +576 -0
  103. package/dist/web/flex/AI_GUIDE.md +113 -0
  104. package/dist/web/flex/flex-item.svelte +37 -0
  105. package/dist/web/flex/flex-item.svelte.d.ts +96 -0
  106. package/dist/web/flex/flex.css +1 -0
  107. package/dist/web/flex/flex.svelte +39 -0
  108. package/dist/web/flex/flex.svelte.d.ts +104 -0
  109. package/dist/web/flex/index.d.ts +3 -0
  110. package/dist/web/flex/index.js +3 -0
  111. package/dist/web/flex/manifest.json +162 -0
  112. package/dist/web/form/index.d.ts +1 -0
  113. package/dist/web/form/index.js +2 -0
  114. package/dist/web/grid/AI_GUIDE.md +112 -0
  115. package/dist/web/grid/grid-item.svelte +41 -0
  116. package/dist/web/grid/grid-item.svelte.d.ts +112 -0
  117. package/dist/web/grid/grid.css +1 -0
  118. package/dist/web/grid/grid.svelte +37 -0
  119. package/dist/web/grid/grid.svelte.d.ts +96 -0
  120. package/dist/web/grid/index.d.ts +3 -0
  121. package/dist/web/grid/index.js +3 -0
  122. package/dist/web/grid/manifest.json +153 -0
  123. package/dist/web/index.d.ts +58 -0
  124. package/dist/web/index.js +57 -0
  125. package/dist/web/input/AI_GUIDE.md +159 -0
  126. package/dist/web/input/index.d.ts +2 -0
  127. package/dist/web/input/index.js +2 -0
  128. package/dist/web/input/input.css +1 -0
  129. package/dist/web/input/input.svelte +283 -0
  130. package/dist/web/input/input.svelte.d.ts +283 -0
  131. package/dist/web/input/manifest.json +465 -0
  132. package/dist/web/input-number/AI_GUIDE.md +164 -0
  133. package/dist/web/input-number/index.d.ts +2 -0
  134. package/dist/web/input-number/index.js +2 -0
  135. package/dist/web/input-number/input-number.css +1 -0
  136. package/dist/web/input-number/input-number.svelte +783 -0
  137. package/dist/web/input-number/input-number.svelte.d.ts +352 -0
  138. package/dist/web/input-number/manifest.json +575 -0
  139. package/dist/web/modal/AI_GUIDE.md +171 -0
  140. package/dist/web/modal/index.d.ts +2 -0
  141. package/dist/web/modal/index.js +2 -0
  142. package/dist/web/modal/manifest.json +375 -0
  143. package/dist/web/modal/modal.css +1 -0
  144. package/dist/web/modal/modal.svelte +333 -0
  145. package/dist/web/modal/modal.svelte.d.ts +231 -0
  146. package/dist/web/pagination/AI_GUIDE.md +148 -0
  147. package/dist/web/pagination/index.d.ts +19 -0
  148. package/dist/web/pagination/index.js +19 -0
  149. package/dist/web/pagination/manifest.json +432 -0
  150. package/dist/web/pagination/pagination-content.svelte +25 -0
  151. package/dist/web/pagination/pagination-content.svelte.d.ts +36 -0
  152. package/dist/web/pagination/pagination-ellipsis.svelte +38 -0
  153. package/dist/web/pagination/pagination-ellipsis.svelte.d.ts +35 -0
  154. package/dist/web/pagination/pagination-first.svelte +105 -0
  155. package/dist/web/pagination/pagination-first.svelte.d.ts +74 -0
  156. package/dist/web/pagination/pagination-item.svelte +25 -0
  157. package/dist/web/pagination/pagination-item.svelte.d.ts +36 -0
  158. package/dist/web/pagination/pagination-last.svelte +105 -0
  159. package/dist/web/pagination/pagination-last.svelte.d.ts +74 -0
  160. package/dist/web/pagination/pagination-link.svelte +67 -0
  161. package/dist/web/pagination/pagination-link.svelte.d.ts +69 -0
  162. package/dist/web/pagination/pagination-next.svelte +99 -0
  163. package/dist/web/pagination/pagination-next.svelte.d.ts +75 -0
  164. package/dist/web/pagination/pagination-previous.svelte +99 -0
  165. package/dist/web/pagination/pagination-previous.svelte.d.ts +75 -0
  166. package/dist/web/pagination/pagination.css +1 -0
  167. package/dist/web/pagination/pagination.svelte +471 -0
  168. package/dist/web/pagination/pagination.svelte.d.ts +256 -0
  169. package/dist/web/popover/AI_GUIDE.md +163 -0
  170. package/dist/web/popover/index.d.ts +3 -0
  171. package/dist/web/popover/index.js +3 -0
  172. package/dist/web/popover/manifest.json +396 -0
  173. package/dist/web/popover/popover.css +1 -0
  174. package/dist/web/popover/popover.svelte +497 -0
  175. package/dist/web/popover/popover.svelte.d.ts +116 -0
  176. package/dist/web/radio/AI_GUIDE.md +155 -0
  177. package/dist/web/radio/index.d.ts +2 -0
  178. package/dist/web/radio/index.js +2 -0
  179. package/dist/web/radio/manifest.json +294 -0
  180. package/dist/web/radio/radio.css +1 -0
  181. package/dist/web/radio/radio.svelte +123 -0
  182. package/dist/web/radio/radio.svelte.d.ts +192 -0
  183. package/dist/web/selectbox/AI_GUIDE.md +216 -0
  184. package/dist/web/selectbox/index.d.ts +2 -0
  185. package/dist/web/selectbox/index.js +2 -0
  186. package/dist/web/selectbox/manifest.json +477 -0
  187. package/dist/web/selectbox/selectbox.css +1 -0
  188. package/dist/web/selectbox/selectbox.svelte +704 -0
  189. package/dist/web/selectbox/selectbox.svelte.d.ts +296 -0
  190. package/dist/web/sonner/AI_GUIDE.md +98 -0
  191. package/dist/web/sonner/index.d.ts +46 -0
  192. package/dist/web/sonner/index.js +64 -0
  193. package/dist/web/sonner/manifest.json +132 -0
  194. package/dist/web/sonner/sonner.css +1 -0
  195. package/dist/web/sonner/sonner.svelte +85 -0
  196. package/dist/web/sonner/sonner.svelte.d.ts +105 -0
  197. package/dist/web/table/AI_GUIDE.md +145 -0
  198. package/dist/web/table/index.d.ts +21 -0
  199. package/dist/web/table/index.js +22 -0
  200. package/dist/web/table/manifest.json +168 -0
  201. package/dist/web/table/table-body.svelte +23 -0
  202. package/dist/web/table/table-body.svelte.d.ts +36 -0
  203. package/dist/web/table/table-caption.svelte +23 -0
  204. package/dist/web/table/table-caption.svelte.d.ts +36 -0
  205. package/dist/web/table/table-cell.svelte +35 -0
  206. package/dist/web/table/table-cell.svelte.d.ts +57 -0
  207. package/dist/web/table/table-empty.svelte +56 -0
  208. package/dist/web/table/table-empty.svelte.d.ts +65 -0
  209. package/dist/web/table/table-footer.svelte +23 -0
  210. package/dist/web/table/table-footer.svelte.d.ts +36 -0
  211. package/dist/web/table/table-head.svelte +39 -0
  212. package/dist/web/table/table-head.svelte.d.ts +58 -0
  213. package/dist/web/table/table-header.svelte +23 -0
  214. package/dist/web/table/table-header.svelte.d.ts +36 -0
  215. package/dist/web/table/table-row.svelte +33 -0
  216. package/dist/web/table/table-row.svelte.d.ts +52 -0
  217. package/dist/web/table/table.css +1 -0
  218. package/dist/web/table/table.svelte +178 -0
  219. package/dist/web/table/table.svelte.d.ts +120 -0
  220. package/dist/web/tabs/AI_GUIDE.md +150 -0
  221. package/dist/web/tabs/index.d.ts +2 -0
  222. package/dist/web/tabs/index.js +2 -0
  223. package/dist/web/tabs/manifest.json +315 -0
  224. package/dist/web/tabs/tabs.css +1 -0
  225. package/dist/web/tabs/tabs.svelte +138 -0
  226. package/dist/web/tabs/tabs.svelte.d.ts +204 -0
  227. package/dist/web/text/AI_GUIDE.md +129 -0
  228. package/dist/web/text/index.d.ts +2 -0
  229. package/dist/web/text/index.js +2 -0
  230. package/dist/web/text/manifest.json +195 -0
  231. package/dist/web/text/text.css +1 -0
  232. package/dist/web/text/text.svelte +515 -0
  233. package/dist/web/text/text.svelte.d.ts +168 -0
  234. package/dist/web/textarea/AI_GUIDE.md +141 -0
  235. package/dist/web/textarea/index.d.ts +2 -0
  236. package/dist/web/textarea/index.js +2 -0
  237. package/dist/web/textarea/manifest.json +438 -0
  238. package/dist/web/textarea/textarea.css +1 -0
  239. package/dist/web/textarea/textarea.svelte +224 -0
  240. package/dist/web/textarea/textarea.svelte.d.ts +274 -0
  241. package/dist/web/tooltip/AI_GUIDE.md +110 -0
  242. package/dist/web/tooltip/index.d.ts +2 -0
  243. package/dist/web/tooltip/index.js +2 -0
  244. package/dist/web/tooltip/manifest.json +222 -0
  245. package/dist/web/tooltip/tooltip.css +1 -0
  246. package/dist/web/tooltip/tooltip.svelte +292 -0
  247. package/dist/web/tooltip/tooltip.svelte.d.ts +140 -0
  248. package/dist/webview/bottomsheet/AI_GUIDE.md +141 -0
  249. package/dist/webview/bottomsheet/bottomsheet.css +1 -0
  250. package/dist/webview/bottomsheet/bottomsheet.svelte +462 -0
  251. package/dist/webview/bottomsheet/bottomsheet.svelte.d.ts +200 -0
  252. package/dist/webview/bottomsheet/index.d.ts +4 -0
  253. package/dist/webview/bottomsheet/index.js +3 -0
  254. package/dist/webview/bottomsheet/manifest.json +377 -0
  255. package/dist/webview/button/AI_GUIDE.md +79 -0
  256. package/dist/webview/button/button-ios.css +1 -0
  257. package/dist/webview/button/button-ios.svelte +58 -0
  258. package/dist/webview/button/button-ios.svelte.d.ts +114 -0
  259. package/dist/webview/button/button-material.css +1 -0
  260. package/dist/webview/button/button-material.svelte +58 -0
  261. package/dist/webview/button/button-material.svelte.d.ts +114 -0
  262. package/dist/webview/button/index.d.ts +6 -0
  263. package/dist/webview/button/index.js +4 -0
  264. package/dist/webview/button/manifest.json +148 -0
  265. package/dist/webview/index.d.ts +6 -0
  266. package/dist/webview/index.js +6 -0
  267. package/llms.txt +6518 -0
  268. package/package.json +709 -4
  269. package/ttdk-manifest.json +10188 -0
  270. package/README.md +0 -3
@@ -0,0 +1,199 @@
1
+ import { SvelteComponent } from "svelte";
2
+ export type CheckboxUiProps = UiProps;
3
+ export interface CheckboxProps {
4
+ /**
5
+ * Status apakah checkbox sedang dalam kondisi terpilih (checked).
6
+ *
7
+ * @default false
8
+ */
9
+ checked?: boolean;
10
+ /**
11
+ * Status apakah checkbox dalam kondisi parsial / indeterminate (menampilkan tanda strip '-').
12
+ *
13
+ * @default false
14
+ */
15
+ indeterminate?: boolean;
16
+ /**
17
+ * Teks label utama yang ditampilkan di samping kotak checkbox.
18
+ */
19
+ label?: string;
20
+ /**
21
+ * Deskripsi atau teks bantuan yang ditampilkan di bawah label.
22
+ */
23
+ description?: string;
24
+ /**
25
+ * Teks bantuan atau keterangan di bawah label (dapat digunakan bergantian dengan description).
26
+ */
27
+ helperText?: string;
28
+ /**
29
+ * Status error visual atau string pesan error.
30
+ */
31
+ error?: boolean | string;
32
+ /**
33
+ * Pesan error yang ditampilkan jika validasi form gagal.
34
+ */
35
+ errorMessage?: string;
36
+ /**
37
+ * Skala ukuran checkbox:
38
+ * - `'sm'`: Kotak 16px, font 12px.
39
+ * - `'md'`: Kotak 18px, font 14px (standar).
40
+ * - `'lg'`: Kotak 22px, font 16px.
41
+ *
42
+ * @default 'md'
43
+ */
44
+ size?: "sm" | "md" | "lg";
45
+ /**
46
+ * Varian warna semantik saat checkbox dicentang:
47
+ * - `'primary'`: Aksen toska aksi (#16b3ac, standar).
48
+ * - `'info'`: Aksen biru informasi (#2196f3).
49
+ * - `'success'`: Warna hijau sukses (#047b5d).
50
+ * - `'warning'`: Warna peringatan kuning/oranye (#fb8c00).
51
+ * - `'danger'`: Warna bahaya merah (#c50a24).
52
+ * - `'neutral'`: Warna abu-abu netral (#4a4f53).
53
+ *
54
+ * @default 'primary'
55
+ */
56
+ variant?: "primary" | "info" | "success" | "warning" | "danger" | "neutral";
57
+ /**
58
+ * Sudut kelengkungan kotak checkbox:
59
+ * - `'none'`: Kotak tajam 0px.
60
+ * - `'sm'`: Radius halus 2px.
61
+ * - `'md'`: Radius sedang 4px (standar).
62
+ * - `'full'`: Lingkaran penuh 9999px.
63
+ *
64
+ * @default 'md'
65
+ */
66
+ rounded?: "none" | "sm" | "md" | "full";
67
+ /**
68
+ * Menonaktifkan interaksi pada checkbox.
69
+ *
70
+ * @default false
71
+ */
72
+ disabled?: boolean;
73
+ /**
74
+ * Menandakan bahwa field checkbox wajib diisi (required) pada formulir.
75
+ *
76
+ * @default false
77
+ */
78
+ required?: boolean;
79
+ /**
80
+ * Name atribut untuk elemen HTML `<input type="checkbox">`.
81
+ */
82
+ name?: string;
83
+ /**
84
+ * Value atribut untuk elemen HTML input.
85
+ */
86
+ value?: string;
87
+ /**
88
+ * Identifier unik elemen checkbox (untuk kaitan dengan label form).
89
+ */
90
+ id?: string;
91
+ /**
92
+ * Kustomisasi visual granular melalui style-like object (+ support pseudo-class: hover, active).
93
+ */
94
+ ui?: UiProps;
95
+ /**
96
+ * Inline CSS style object native.
97
+ */
98
+ style?: any;
99
+ /**
100
+ * Style kustom untuk kotak kontrol checkbox (UiProps).
101
+ */
102
+ controlStyle?: UiProps;
103
+ /**
104
+ * Class CSS kustom untuk kotak kontrol checkbox (Tailwind / class kustom).
105
+ */
106
+ controlClass?: string;
107
+ /**
108
+ * Style kustom untuk teks label checkbox (UiProps).
109
+ */
110
+ labelStyle?: UiProps;
111
+ /**
112
+ * Class CSS kustom untuk teks label checkbox (Tailwind / class kustom).
113
+ */
114
+ labelClass?: string;
115
+ /**
116
+ * Style kustom untuk teks deskripsi bantuan (UiProps).
117
+ */
118
+ descStyle?: UiProps;
119
+ /**
120
+ * Class CSS kustom untuk teks deskripsi bantuan (Tailwind / class kustom).
121
+ */
122
+ descClass?: string;
123
+ /**
124
+ * Style kustom untuk elemen helper text (UiProps).
125
+ */
126
+ helperTextStyle?: UiProps;
127
+ /**
128
+ * Class CSS kustom untuk elemen helper text.
129
+ */
130
+ helperTextClass?: string;
131
+ /**
132
+ * Style kustom untuk teks pesan error validasi (UiProps).
133
+ */
134
+ errorMessageStyle?: UiProps;
135
+ /**
136
+ * Class CSS kustom untuk teks pesan error validasi (Tailwind / class kustom).
137
+ */
138
+ errorMessageClass?: string;
139
+ /**
140
+ * Event handler yang dipanggil saat nilai checkbox berubah.
141
+ * Mengembalikan `(checked: boolean, event: Event)`.
142
+ */
143
+ onChange?: (checked: boolean, event?: any) => void;
144
+ /**
145
+ * Class CSS kustom.
146
+ */
147
+ className?: string;
148
+ /**
149
+ * Slot konten label kustom yang menggantikan prop `label`.
150
+ */
151
+ children?: any;
152
+ }
153
+ import { UiProps } from "../../core/types";
154
+ declare const __propDef: {
155
+ props: {
156
+ className?: CheckboxProps["className"];
157
+ size?: CheckboxProps["size"];
158
+ variant?: CheckboxProps["variant"];
159
+ rounded?: CheckboxProps["rounded"];
160
+ disabled?: CheckboxProps["disabled"];
161
+ checked?: CheckboxProps["checked"];
162
+ indeterminate?: CheckboxProps["indeterminate"];
163
+ errorMessage?: CheckboxProps["errorMessage"];
164
+ error?: CheckboxProps["error"];
165
+ description?: CheckboxProps["description"];
166
+ helperText?: CheckboxProps["helperText"];
167
+ ui?: CheckboxProps["ui"];
168
+ id?: CheckboxProps["id"];
169
+ name?: CheckboxProps["name"];
170
+ value?: CheckboxProps["value"];
171
+ required?: CheckboxProps["required"];
172
+ onChange?: CheckboxProps["onChange"];
173
+ controlClass?: CheckboxProps["controlClass"];
174
+ controlStyle?: CheckboxProps["controlStyle"];
175
+ label?: CheckboxProps["label"];
176
+ labelClass?: CheckboxProps["labelClass"];
177
+ labelStyle?: CheckboxProps["labelStyle"];
178
+ helperTextClass?: CheckboxProps["helperTextClass"];
179
+ descClass?: CheckboxProps["descClass"];
180
+ helperTextStyle?: CheckboxProps["helperTextStyle"];
181
+ descStyle?: CheckboxProps["descStyle"];
182
+ errorMessageClass?: CheckboxProps["errorMessageClass"];
183
+ errorMessageStyle?: CheckboxProps["errorMessageStyle"];
184
+ };
185
+ events: {
186
+ [evt: string]: CustomEvent<any>;
187
+ };
188
+ slots: {
189
+ default: {};
190
+ };
191
+ exports?: {} | undefined;
192
+ bindings?: string | undefined;
193
+ };
194
+ type CheckboxProps_ = typeof __propDef.props;
195
+ export type CheckboxEvents = typeof __propDef.events;
196
+ export type CheckboxSlots = typeof __propDef.slots;
197
+ export default class Checkbox extends SvelteComponent<CheckboxProps_, CheckboxEvents, CheckboxSlots> {
198
+ }
199
+ export {};
@@ -0,0 +1,2 @@
1
+ export { default } from './checkbox.svelte';
2
+ export { default as Checkbox } from './checkbox.svelte';
@@ -0,0 +1,2 @@
1
+ export { default } from './checkbox.svelte';
2
+ export { default as Checkbox } from './checkbox.svelte';
@@ -0,0 +1,294 @@
1
+ {
2
+ "name": "@ttdk-design-system/checkbox",
3
+ "component": "Checkbox",
4
+ "folder": "checkbox",
5
+ "description": "TTDK Checkbox component with multi-theme support.",
6
+ "stylesheets": [
7
+ {
8
+ "theme": "common",
9
+ "file": "checkbox.css",
10
+ "importPath": "web/checkbox/checkbox.css"
11
+ }
12
+ ],
13
+ "props": {
14
+ "checked": {
15
+ "name": "checked",
16
+ "type": "boolean",
17
+ "optional": true,
18
+ "default": "false",
19
+ "description": "Status apakah checkbox sedang dalam kondisi terpilih (checked).",
20
+ "example": null,
21
+ "param": null
22
+ },
23
+ "indeterminate": {
24
+ "name": "indeterminate",
25
+ "type": "boolean",
26
+ "optional": true,
27
+ "default": "false",
28
+ "description": "Status apakah checkbox dalam kondisi parsial / indeterminate (menampilkan tanda strip '-').",
29
+ "example": null,
30
+ "param": null
31
+ },
32
+ "label": {
33
+ "name": "label",
34
+ "type": "string",
35
+ "optional": true,
36
+ "default": null,
37
+ "description": "Teks label utama yang ditampilkan di samping kotak checkbox.",
38
+ "example": null,
39
+ "param": null
40
+ },
41
+ "description": {
42
+ "name": "description",
43
+ "type": "string",
44
+ "optional": true,
45
+ "default": null,
46
+ "description": "Deskripsi atau teks bantuan yang ditampilkan di bawah label.",
47
+ "example": null,
48
+ "param": null
49
+ },
50
+ "helperText": {
51
+ "name": "helperText",
52
+ "type": "string",
53
+ "optional": true,
54
+ "default": null,
55
+ "description": "Teks bantuan atau keterangan di bawah label (dapat digunakan bergantian dengan description).",
56
+ "example": null,
57
+ "param": null
58
+ },
59
+ "error": {
60
+ "name": "error",
61
+ "type": "boolean | string",
62
+ "optional": true,
63
+ "default": null,
64
+ "description": "Status error visual atau string pesan error.",
65
+ "example": null,
66
+ "param": null
67
+ },
68
+ "errorMessage": {
69
+ "name": "errorMessage",
70
+ "type": "string",
71
+ "optional": true,
72
+ "default": null,
73
+ "description": "Pesan error yang ditampilkan jika validasi form gagal.",
74
+ "example": null,
75
+ "param": null
76
+ },
77
+ "size": {
78
+ "name": "size",
79
+ "type": "'sm' | 'md' | 'lg'",
80
+ "optional": true,
81
+ "default": "md",
82
+ "description": "Skala ukuran checkbox: - `'sm'`: Kotak 16px, font 12px. - `'md'`: Kotak 18px, font 14px (standar). - `'lg'`: Kotak 22px, font 16px.",
83
+ "example": null,
84
+ "param": null
85
+ },
86
+ "variant": {
87
+ "name": "variant",
88
+ "type": "'primary' | 'info' | 'success' | 'warning' | 'danger' | 'neutral'",
89
+ "optional": true,
90
+ "default": "primary",
91
+ "description": "Varian warna semantik saat checkbox dicentang: - `'primary'`: Aksen toska aksi (#16b3ac, standar). - `'info'`: Aksen biru informasi (#2196f3). - `'success'`: Warna hijau sukses (#047b5d). - `'warning'`: Warna peringatan kuning/oranye (#fb8c00). - `'danger'`: Warna bahaya merah (#c50a24). - `'neutral'`: Warna abu-abu netral (#4a4f53).",
92
+ "example": null,
93
+ "param": null
94
+ },
95
+ "rounded": {
96
+ "name": "rounded",
97
+ "type": "'none' | 'sm' | 'md' | 'full'",
98
+ "optional": true,
99
+ "default": "md",
100
+ "description": "Sudut kelengkungan kotak checkbox: - `'none'`: Kotak tajam 0px. - `'sm'`: Radius halus 2px. - `'md'`: Radius sedang 4px (standar). - `'full'`: Lingkaran penuh 9999px.",
101
+ "example": null,
102
+ "param": null
103
+ },
104
+ "disabled": {
105
+ "name": "disabled",
106
+ "type": "boolean",
107
+ "optional": true,
108
+ "default": "false",
109
+ "description": "Menonaktifkan interaksi pada checkbox.",
110
+ "example": null,
111
+ "param": null
112
+ },
113
+ "required": {
114
+ "name": "required",
115
+ "type": "boolean",
116
+ "optional": true,
117
+ "default": "false",
118
+ "description": "Menandakan bahwa field checkbox wajib diisi (required) pada formulir.",
119
+ "example": null,
120
+ "param": null
121
+ },
122
+ "name": {
123
+ "name": "name",
124
+ "type": "string",
125
+ "optional": true,
126
+ "default": null,
127
+ "description": "Name atribut untuk elemen HTML `<input type=\"checkbox\">`.",
128
+ "example": null,
129
+ "param": null
130
+ },
131
+ "value": {
132
+ "name": "value",
133
+ "type": "string",
134
+ "optional": true,
135
+ "default": null,
136
+ "description": "Value atribut untuk elemen HTML input.",
137
+ "example": null,
138
+ "param": null
139
+ },
140
+ "id": {
141
+ "name": "id",
142
+ "type": "string",
143
+ "optional": true,
144
+ "default": null,
145
+ "description": "Identifier unik elemen checkbox (untuk kaitan dengan label form).",
146
+ "example": null,
147
+ "param": null
148
+ },
149
+ "ui": {
150
+ "name": "ui",
151
+ "type": "UiProps",
152
+ "optional": true,
153
+ "default": null,
154
+ "description": "Kustomisasi visual granular melalui style-like object (+ support pseudo-class: hover, active).",
155
+ "example": null,
156
+ "param": null
157
+ },
158
+ "style": {
159
+ "name": "style",
160
+ "type": "any",
161
+ "optional": true,
162
+ "default": null,
163
+ "description": "Inline CSS style object native.",
164
+ "example": null,
165
+ "param": null
166
+ },
167
+ "controlStyle": {
168
+ "name": "controlStyle",
169
+ "type": "UiProps",
170
+ "optional": true,
171
+ "default": null,
172
+ "description": "Style kustom untuk kotak kontrol checkbox (UiProps).",
173
+ "example": null,
174
+ "param": null
175
+ },
176
+ "controlClass": {
177
+ "name": "controlClass",
178
+ "type": "string",
179
+ "optional": true,
180
+ "default": null,
181
+ "description": "Class CSS kustom untuk kotak kontrol checkbox (Tailwind / class kustom).",
182
+ "example": null,
183
+ "param": null
184
+ },
185
+ "labelStyle": {
186
+ "name": "labelStyle",
187
+ "type": "UiProps",
188
+ "optional": true,
189
+ "default": null,
190
+ "description": "Style kustom untuk teks label checkbox (UiProps).",
191
+ "example": null,
192
+ "param": null
193
+ },
194
+ "labelClass": {
195
+ "name": "labelClass",
196
+ "type": "string",
197
+ "optional": true,
198
+ "default": null,
199
+ "description": "Class CSS kustom untuk teks label checkbox (Tailwind / class kustom).",
200
+ "example": null,
201
+ "param": null
202
+ },
203
+ "descStyle": {
204
+ "name": "descStyle",
205
+ "type": "UiProps",
206
+ "optional": true,
207
+ "default": null,
208
+ "description": "Style kustom untuk teks deskripsi bantuan (UiProps).",
209
+ "example": null,
210
+ "param": null
211
+ },
212
+ "descClass": {
213
+ "name": "descClass",
214
+ "type": "string",
215
+ "optional": true,
216
+ "default": null,
217
+ "description": "Class CSS kustom untuk teks deskripsi bantuan (Tailwind / class kustom).",
218
+ "example": null,
219
+ "param": null
220
+ },
221
+ "helperTextStyle": {
222
+ "name": "helperTextStyle",
223
+ "type": "UiProps",
224
+ "optional": true,
225
+ "default": null,
226
+ "description": "Style kustom untuk elemen helper text (UiProps).",
227
+ "example": null,
228
+ "param": null
229
+ },
230
+ "helperTextClass": {
231
+ "name": "helperTextClass",
232
+ "type": "string",
233
+ "optional": true,
234
+ "default": null,
235
+ "description": "Class CSS kustom untuk elemen helper text.",
236
+ "example": null,
237
+ "param": null
238
+ },
239
+ "errorMessageStyle": {
240
+ "name": "errorMessageStyle",
241
+ "type": "UiProps",
242
+ "optional": true,
243
+ "default": null,
244
+ "description": "Style kustom untuk teks pesan error validasi (UiProps).",
245
+ "example": null,
246
+ "param": null
247
+ },
248
+ "errorMessageClass": {
249
+ "name": "errorMessageClass",
250
+ "type": "string",
251
+ "optional": true,
252
+ "default": null,
253
+ "description": "Class CSS kustom untuk teks pesan error validasi (Tailwind / class kustom).",
254
+ "example": null,
255
+ "param": null
256
+ },
257
+ "onChange": {
258
+ "name": "onChange",
259
+ "type": "(checked: boolean, event?: any) => void",
260
+ "optional": true,
261
+ "default": null,
262
+ "description": "Event handler yang dipanggil saat nilai checkbox berubah. Mengembalikan `(checked: boolean, event: Event)`.",
263
+ "example": null,
264
+ "param": null
265
+ },
266
+ "className": {
267
+ "name": "className",
268
+ "type": "string",
269
+ "optional": true,
270
+ "default": null,
271
+ "description": "Class CSS kustom.",
272
+ "example": null,
273
+ "param": null
274
+ },
275
+ "children": {
276
+ "name": "children",
277
+ "type": "any",
278
+ "optional": true,
279
+ "default": null,
280
+ "description": "Slot konten label kustom yang menggantikan prop `label`.",
281
+ "example": null,
282
+ "param": null
283
+ }
284
+ },
285
+ "subInterfaces": {},
286
+ "supportedFrameworks": [
287
+ "react",
288
+ "vue",
289
+ "svelte"
290
+ ],
291
+ "themes": [
292
+ "tw"
293
+ ]
294
+ }
@@ -0,0 +1,186 @@
1
+ # <Chip /> — TTDK Component Reference
2
+
3
+ TTDK Chip 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/chip/chip.css";`
8
+
9
+ ## 2. Subpath Component Import
10
+ ```ts
11
+ // React
12
+ import Chip from "@ttdk-design-system/library-react/web/chip";
13
+
14
+ // Vue 3
15
+ import Chip from "@ttdk-design-system/library-vue/web/chip";
16
+
17
+ // Svelte
18
+ import Chip from "@ttdk-design-system/library-svelte/web/chip";
19
+ ```
20
+
21
+ ## 3. Props & API Reference
22
+
23
+ | Prop | Type | Default | Description |
24
+ | :--- | :--- | :--- | :--- |
25
+ | `label?` | `string` | `-` | Teks label yang ditampilkan pada chip. |
26
+ | `selected?` | `boolean` | `false` | Status apakah chip sedang dalam kondisi terpilih (selected). |
27
+ | `variant?` | `| 'primary'
28
+ | 'success'
29
+ | 'info'
30
+ | 'warning'
31
+ | 'danger'
32
+ | 'neutral'
33
+ | 'disabled'` | `primary` | Varian warna semantik tema chip: - `'primary'`: Brand Teal utama (#00B5AD). - `'success'`: Sukses hijau (#04B761). - `'info'`: Biru informasi (#2196F3). - `'warning'`: Peringatan kuning / amber (#F88000). - `'danger'`: Bahaya / merah (#D0021B). - `'neutral'`: Netral abu-abu. - `'disabled'`: Status nonaktif (disabled). |
34
+ | `appearance?` | `'soft' | 'solid' | 'outline'` | `soft` | Tipe tampilan visual chip: - `'soft'`: Background warna transparan lembut (default). - `'solid'`: Background warna solid pekat. - `'outline'`: Border tipis dengan background transparan. |
35
+ | `size?` | `'sm' | 'md' | 'lg'` | `md` | Skala ukuran chip: - `'sm'`: Tinggi 28px, font 12px. - `'md'`: Tinggi 32px, font 13px (standar). - `'lg'`: Tinggi 38px, font 15px. |
36
+ | `rounded?` | `'none' | 'sm' | 'md' | 'lg' | 'full'` | `full` | Bentuk sudut kelengkungan: - `'full'`: Bentuk kapsul / pill 9999px (default). - `'none'`: Persegi lancip 0px. - `'sm'`: Sudut melengkung halus 4px. - `'md'`: Sudut melengkung sedang 6px. - `'lg'`: Sudut melengkung besar 8px. |
37
+ | `closable?` | `boolean` | `false` | Menampilkan tombol silang (x) untuk menghapus / menutup chip. |
38
+ | `disabled?` | `boolean` | `false` | Menonaktifkan interaksi klik pada chip. |
39
+ | `ui?` | `UiProps` | `-` | Kustomisasi visual granular melalui style-like object (+ support pseudo-class: hover, active). |
40
+ | `style?` | `any` | `-` | Inline CSS style object native. |
41
+ | `labelStyle?` | `UiProps` | `-` | Style kustom untuk teks label chip (UiProps). |
42
+ | `labelClass?` | `string` | `-` | Class CSS kustom untuk teks label chip (Tailwind / class kustom). |
43
+ | `closableStyle?` | `UiProps` | `-` | Style kustom untuk tombol tutup chip (UiProps). |
44
+ | `closableClass?` | `string` | `-` | Class CSS kustom untuk tombol tutup chip (Tailwind / class kustom). |
45
+ | `onClick?` | `(event?: any) => void` | `-` | Event handler saat chip diklik (toggle select atau trigger aksi). |
46
+ | `onClose?` | `(event?: any) => void` | `-` | Event handler saat tombol close (x) diklik. |
47
+ | `className?` | `string` | `-` | Class CSS kustom. |
48
+ | `children?` | `any` | `-` | Konten kustom / icon kustom yang disisipkan di dalam chip. |
49
+
50
+ ## 4. Usage Examples
51
+
52
+ ### React Example
53
+ ```tsx
54
+ import { useState } from "react";
55
+ import Chip from "@ttdk-design-system/library-react/web/chip";
56
+ import "@ttdk-design-system/library-react/web/chip/chip.css";
57
+
58
+ export function Example() {
59
+ const [selected, setSelected] = useState<string[]>(['puskesmas']);
60
+
61
+ const toggle = (val: string) => {
62
+ setSelected((prev) =>
63
+ prev.includes(val) ? prev.filter((i) => i !== val) : [...prev, val]
64
+ );
65
+ };
66
+
67
+ return (
68
+ <div style={{ display: 'flex', gap: '8px', flexWrap: 'wrap' }}>
69
+ <Chip
70
+ label="Puskesmas"
71
+ variant="action"
72
+ selected={selected.includes('puskesmas')}
73
+ onClick={() => toggle('puskesmas')}
74
+ />
75
+ <Chip
76
+ label="Rumah Sakit"
77
+ variant="action"
78
+ selected={selected.includes('rs')}
79
+ onClick={() => toggle('rs')}
80
+ />
81
+ <Chip
82
+ label="Klinik"
83
+ variant="action"
84
+ selected={selected.includes('klinik')}
85
+ onClick={() => toggle('klinik')}
86
+ />
87
+ <Chip
88
+ label="Laboratorium"
89
+ closable
90
+ onClose={() => alert('Chip dihapus')}
91
+ />
92
+ </div>
93
+ );
94
+ }
95
+ ```
96
+
97
+ ### Vue 3 Example
98
+ ```vue
99
+ <script setup lang="ts">
100
+ import { ref } from "vue";
101
+ import Chip from "@ttdk-design-system/library-vue/web/chip";
102
+ import "@ttdk-design-system/library-vue/web/chip/chip.css";
103
+
104
+ const selected = ref(['puskesmas']);
105
+
106
+ const toggle = (val: string) => {
107
+ if (selected.value.includes(val)) {
108
+ selected.value = selected.value.filter((i) => i !== val);
109
+ } else {
110
+ selected.value.push(val);
111
+ }
112
+ };
113
+ </script>
114
+
115
+ <template>
116
+ <div style="display: flex; gap: 8px; flex-wrap: wrap;">
117
+ <Chip
118
+ label="Puskesmas"
119
+ variant="action"
120
+ :selected="selected.includes('puskesmas')"
121
+ @click="() => toggle('puskesmas')"
122
+ />
123
+ <Chip
124
+ label="Rumah Sakit"
125
+ variant="action"
126
+ :selected="selected.includes('rs')"
127
+ @click="() => toggle('rs')"
128
+ />
129
+ <Chip
130
+ label="Klinik"
131
+ variant="action"
132
+ :selected="selected.includes('klinik')"
133
+ @click="() => toggle('klinik')"
134
+ />
135
+ <Chip
136
+ label="Laboratorium"
137
+ :closable="true"
138
+ @close="() => alert('Chip dihapus')"
139
+ />
140
+ </div>
141
+ </template>
142
+ ```
143
+
144
+ ### Svelte Example
145
+ ```svelte
146
+ <script lang="ts">
147
+ import Chip from "@ttdk-design-system/library-svelte/web/chip";
148
+ import "@ttdk-design-system/library-svelte/web/chip/chip.css";
149
+
150
+ let selected = ['puskesmas'];
151
+
152
+ const toggle = (val: string) => {
153
+ if (selected.includes(val)) {
154
+ selected = selected.filter((i) => i !== val);
155
+ } else {
156
+ selected = [...selected, val];
157
+ }
158
+ };
159
+ </script>
160
+
161
+ <div style="display: flex; gap: 8px; flex-wrap: wrap;">
162
+ <Chip
163
+ label="Puskesmas"
164
+ variant="action"
165
+ selected={selected.includes('puskesmas')}
166
+ on:click={() => toggle('puskesmas')}
167
+ />
168
+ <Chip
169
+ label="Rumah Sakit"
170
+ variant="action"
171
+ selected={selected.includes('rs')}
172
+ on:click={() => toggle('rs')}
173
+ />
174
+ <Chip
175
+ label="Klinik"
176
+ variant="action"
177
+ selected={selected.includes('klinik')}
178
+ on:click={() => toggle('klinik')}
179
+ />
180
+ <Chip
181
+ label="Laboratorium"
182
+ closable={true}
183
+ on:close={() => alert('Chip dihapus')}
184
+ />
185
+ </div>
186
+ ```