@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,315 @@
1
+ {
2
+ "name": "@ttdk-design-system/tabs",
3
+ "component": "Tabs",
4
+ "folder": "tabs",
5
+ "description": "Komponen Tabs untuk navigasi multi-panel dengan orientasi Horizontal & Vertikal, varian Line, Pills, dan Enclosed.",
6
+ "stylesheets": [
7
+ {
8
+ "theme": "common",
9
+ "file": "tabs.css",
10
+ "importPath": "web/tabs/tabs.css"
11
+ }
12
+ ],
13
+ "props": {
14
+ "items": {
15
+ "name": "items",
16
+ "type": "TabItem[]",
17
+ "optional": false,
18
+ "default": null,
19
+ "description": "Daftar tab items yang akan dirender.",
20
+ "example": null,
21
+ "param": null
22
+ },
23
+ "value": {
24
+ "name": "value",
25
+ "type": "string",
26
+ "optional": true,
27
+ "default": null,
28
+ "description": "Nilai tab yang sedang aktif (v-model / controlled value).",
29
+ "example": null,
30
+ "param": null
31
+ },
32
+ "defaultValue": {
33
+ "name": "defaultValue",
34
+ "type": "string",
35
+ "optional": true,
36
+ "default": null,
37
+ "description": "Nilai tab default saat pertama kali dirender (uncontrolled initial value).",
38
+ "example": null,
39
+ "param": null
40
+ },
41
+ "orientation": {
42
+ "name": "orientation",
43
+ "type": "'horizontal' | 'vertical'",
44
+ "optional": true,
45
+ "default": "horizontal",
46
+ "description": "Orientasi tata letak tab. - `'horizontal'`: Tab berjejer ke samping dengan garis indikator di bawah (standar). - `'vertical'`: Tab berjejer ke bawah dalam kolom dengan garis indikator di samping.",
47
+ "example": null,
48
+ "param": null
49
+ },
50
+ "variant": {
51
+ "name": "variant",
52
+ "type": "'line' | 'pills'",
53
+ "optional": true,
54
+ "default": "line",
55
+ "description": "Varian visual tampilan tab. - `'line'`: Garis indikator bawah/samping minimalis elegan (sesuai desain TTDK). - `'pills'`: Bentuk kapsul/tombol latar belakang penuh ala Shadcn / Nuxt UI.",
56
+ "example": null,
57
+ "param": null
58
+ },
59
+ "size": {
60
+ "name": "size",
61
+ "type": "'sm' | 'md' | 'lg'",
62
+ "optional": true,
63
+ "default": "md",
64
+ "description": "Ukuran proporsional tab (tinggi, padding, ukuran font). - `'sm'`: Kecil (12px font, compact padding). - `'md'`: Standar (14px font, regular padding). - `'lg'`: Besar (16px font, spacious padding).",
65
+ "example": null,
66
+ "param": null
67
+ },
68
+ "fitted": {
69
+ "name": "fitted",
70
+ "type": "boolean",
71
+ "optional": true,
72
+ "default": "false",
73
+ "description": "Membuat lebar setiap tab mengisi rata seluruh ruang container (full width / equal width).",
74
+ "example": null,
75
+ "param": null
76
+ },
77
+ "rounded": {
78
+ "name": "rounded",
79
+ "type": "'none' | 'sm' | 'md' | 'lg' | 'full'",
80
+ "optional": true,
81
+ "default": "md",
82
+ "description": "Sudut kelengkungan (khusus untuk varian 'pills'). - `'none'`: Sudut 0px. - `'sm'`: Sudut 4px. - `'md'`: Sudut 6px. - `'lg'`: Sudut 8px. - `'full'`: Sudut 9999px.",
83
+ "example": null,
84
+ "param": null
85
+ },
86
+ "lazy": {
87
+ "name": "lazy",
88
+ "type": "boolean",
89
+ "optional": true,
90
+ "default": "false",
91
+ "description": "Hanya me-render konten panel tab saat tab tersebut aktif (lazy rendering). Berguna untuk menghemat performa saat tab memiliki konten berat.",
92
+ "example": null,
93
+ "param": null
94
+ },
95
+ "style": {
96
+ "name": "style",
97
+ "type": "any",
98
+ "optional": true,
99
+ "default": null,
100
+ "description": "Inline CSS style object native.",
101
+ "example": null,
102
+ "param": null
103
+ },
104
+ "ui": {
105
+ "name": "ui",
106
+ "type": "UiProps",
107
+ "optional": true,
108
+ "default": null,
109
+ "description": "Kustomisasi visual granular root container (UiProps).",
110
+ "example": null,
111
+ "param": null
112
+ },
113
+ "listStyle": {
114
+ "name": "listStyle",
115
+ "type": "UiProps",
116
+ "optional": true,
117
+ "default": null,
118
+ "description": "Style kustom untuk container tab list (UiProps).",
119
+ "example": null,
120
+ "param": null
121
+ },
122
+ "listClass": {
123
+ "name": "listClass",
124
+ "type": "string",
125
+ "optional": true,
126
+ "default": null,
127
+ "description": "Class CSS kustom untuk container tab list.",
128
+ "example": null,
129
+ "param": null
130
+ },
131
+ "tabStyle": {
132
+ "name": "tabStyle",
133
+ "type": "UiProps",
134
+ "optional": true,
135
+ "default": null,
136
+ "description": "Style kustom untuk tombol tab item (UiProps).",
137
+ "example": null,
138
+ "param": null
139
+ },
140
+ "tabClass": {
141
+ "name": "tabClass",
142
+ "type": "string",
143
+ "optional": true,
144
+ "default": null,
145
+ "description": "Class CSS kustom untuk tombol tab item.",
146
+ "example": null,
147
+ "param": null
148
+ },
149
+ "activeTabStyle": {
150
+ "name": "activeTabStyle",
151
+ "type": "UiProps",
152
+ "optional": true,
153
+ "default": null,
154
+ "description": "Style kustom untuk tombol tab item saat aktif (UiProps).",
155
+ "example": null,
156
+ "param": null
157
+ },
158
+ "activeTabClass": {
159
+ "name": "activeTabClass",
160
+ "type": "string",
161
+ "optional": true,
162
+ "default": null,
163
+ "description": "Class CSS kustom untuk tombol tab item saat aktif.",
164
+ "example": null,
165
+ "param": null
166
+ },
167
+ "indicatorStyle": {
168
+ "name": "indicatorStyle",
169
+ "type": "UiProps",
170
+ "optional": true,
171
+ "default": null,
172
+ "description": "Style kustom untuk garis indikator tab (UiProps).",
173
+ "example": null,
174
+ "param": null
175
+ },
176
+ "indicatorClass": {
177
+ "name": "indicatorClass",
178
+ "type": "string",
179
+ "optional": true,
180
+ "default": null,
181
+ "description": "Class CSS kustom untuk garis indikator tab.",
182
+ "example": null,
183
+ "param": null
184
+ },
185
+ "badgeStyle": {
186
+ "name": "badgeStyle",
187
+ "type": "UiProps",
188
+ "optional": true,
189
+ "default": null,
190
+ "description": "Style kustom untuk badge tab (UiProps).",
191
+ "example": null,
192
+ "param": null
193
+ },
194
+ "badgeClass": {
195
+ "name": "badgeClass",
196
+ "type": "string",
197
+ "optional": true,
198
+ "default": null,
199
+ "description": "Class CSS kustom untuk badge tab.",
200
+ "example": null,
201
+ "param": null
202
+ },
203
+ "panelStyle": {
204
+ "name": "panelStyle",
205
+ "type": "UiProps",
206
+ "optional": true,
207
+ "default": null,
208
+ "description": "Style kustom untuk panel konten tab (UiProps).",
209
+ "example": null,
210
+ "param": null
211
+ },
212
+ "panelClass": {
213
+ "name": "panelClass",
214
+ "type": "string",
215
+ "optional": true,
216
+ "default": null,
217
+ "description": "Class CSS kustom untuk panel konten tab.",
218
+ "example": null,
219
+ "param": null
220
+ },
221
+ "onChange": {
222
+ "name": "onChange",
223
+ "type": "(value: string) => void",
224
+ "optional": true,
225
+ "default": null,
226
+ "description": "Callback event saat pengguna mengganti tab aktif.",
227
+ "example": null,
228
+ "param": "value Nilai/identifier tab yang dipilih."
229
+ },
230
+ "className": {
231
+ "name": "className",
232
+ "type": "string",
233
+ "optional": true,
234
+ "default": null,
235
+ "description": "Class CSS kustom.",
236
+ "example": null,
237
+ "param": null
238
+ },
239
+ "children": {
240
+ "name": "children",
241
+ "type": "any",
242
+ "optional": true,
243
+ "default": null,
244
+ "description": "Konten kustom atau slot anak.",
245
+ "example": null,
246
+ "param": null
247
+ }
248
+ },
249
+ "subInterfaces": {
250
+ "TabItem": {
251
+ "label": {
252
+ "name": "label",
253
+ "type": "string",
254
+ "optional": false,
255
+ "default": null,
256
+ "description": "Label teks yang ditampilkan pada tab item.",
257
+ "example": null,
258
+ "param": null
259
+ },
260
+ "value": {
261
+ "name": "value",
262
+ "type": "string",
263
+ "optional": false,
264
+ "default": null,
265
+ "description": "Identifier unik / nilai aktif untuk tab ini.",
266
+ "example": null,
267
+ "param": null
268
+ },
269
+ "icon": {
270
+ "name": "icon",
271
+ "type": "any",
272
+ "optional": true,
273
+ "default": null,
274
+ "description": "Ikon atau emoji opsional di samping label teks.",
275
+ "example": null,
276
+ "param": null
277
+ },
278
+ "badge": {
279
+ "name": "badge",
280
+ "type": "string | number",
281
+ "optional": true,
282
+ "default": null,
283
+ "description": "Badge teks atau counter angka opsional (misal: '12', 'Baru').",
284
+ "example": null,
285
+ "param": null
286
+ },
287
+ "disabled": {
288
+ "name": "disabled",
289
+ "type": "boolean",
290
+ "optional": true,
291
+ "default": "false",
292
+ "description": "Menonaktifkan tab item dari interaksi klik.",
293
+ "example": null,
294
+ "param": null
295
+ },
296
+ "content": {
297
+ "name": "content",
298
+ "type": "any",
299
+ "optional": true,
300
+ "default": null,
301
+ "description": "Konten tab opsional jika ingin menggunakan panel terintegrasi.",
302
+ "example": null,
303
+ "param": null
304
+ }
305
+ }
306
+ },
307
+ "supportedFrameworks": [
308
+ "react",
309
+ "vue",
310
+ "svelte"
311
+ ],
312
+ "themes": [
313
+ "tw"
314
+ ]
315
+ }
@@ -0,0 +1 @@
1
+ .ttdk-tabs{--tab-radius:var(--ttdk-radius-input-md);box-sizing:border-box;font-family:var(--ttdk-font-sans);color:var(--ttdk-ui-color,var(--ttdk-text-icon-primary));width:100%;min-width:0;max-width:100%;display:flex;&[data-orientation=horizontal]{flex-direction:column;width:100%;min-width:0;max-width:100%;& .ttdk-tabs-list{box-sizing:border-box;scrollbar-width:none;-webkit-overflow-scrolling:touch;flex-direction:row;align-items:center;width:100%;min-width:0;max-width:100%;display:flex;overflow:auto hidden;&::-webkit-scrollbar{display:none}}}&[data-orientation=vertical]{align-items:stretch;gap:var(--ttdk-spacing-md);flex-direction:row;width:100%;min-width:0;max-width:100%;& .ttdk-tabs-list{flex-direction:column;flex-shrink:0;min-width:180px;max-width:260px;display:flex;@media (width<=640px){min-width:120px;max-width:160px}}& .ttdk-tabs-panels{flex:1;min-width:0}}&[data-fitted=true][data-orientation=horizontal]{& .ttdk-tabs-list{width:100%}& .ttdk-tab-item{text-align:center;flex:1;justify-content:center}}&[data-size=sm]{font-size:var(--ttdk-font-size-12);& .ttdk-tab-item{font-size:var(--ttdk-font-size-12);gap:6px}&[data-variant=line][data-orientation=horizontal] .ttdk-tab-item{gap:6px;padding:8px 2px}&[data-variant=line][data-orientation=vertical] .ttdk-tab-item{padding:8px 12px}&[data-variant=pills] .ttdk-tab-item{font-size:var(--ttdk-font-size-12);padding:5px 10px}& .ttdk-tab-icon{font-size:var(--ttdk-font-size-14)}}&[data-size=md]{font-size:var(--ttdk-font-size-14);& .ttdk-tab-item{font-size:var(--ttdk-font-size-14);gap:var(--ttdk-spacing-xs)}&[data-variant=line][data-orientation=horizontal] .ttdk-tab-item{padding:12px 4px}&[data-variant=line][data-orientation=vertical] .ttdk-tab-item{padding:10px 14px}&[data-variant=pills] .ttdk-tab-item{padding:6px 14px;font-size:13px}& .ttdk-tab-icon{font-size:var(--ttdk-font-size-16)}}&[data-size=lg]{font-size:var(--ttdk-font-size-16);& .ttdk-tab-item{font-size:var(--ttdk-font-size-16);gap:10px}&[data-variant=line][data-orientation=horizontal] .ttdk-tab-item{padding:14px 6px}&[data-variant=line][data-orientation=vertical] .ttdk-tab-item{padding:12px 16px}&[data-variant=pills] .ttdk-tab-item{font-size:var(--ttdk-font-size-14);padding:8px 18px}& .ttdk-tab-icon{font-size:var(--ttdk-font-size-18)}}&[data-rounded=none]{--tab-radius:var(--ttdk-radius-none)}&[data-rounded=sm]{--tab-radius:var(--ttdk-radius-input-sm)}&[data-rounded=md]{--tab-radius:var(--ttdk-radius-input-md)}&[data-rounded=lg]{--tab-radius:var(--ttdk-radius-input-lg)}&[data-rounded=full]{--tab-radius:var(--ttdk-radius-full)}}.ttdk-tab-item{font-family:inherit;font-weight:var(--ttdk-font-weight-medium);color:var(--ttdk-ui-color,var(--ttdk-text-icon-secondary));cursor:pointer;white-space:nowrap;user-select:none;background:0 0;border:none;outline:none;flex-shrink:0;justify-content:flex-start;align-items:center;transition:color .15s,background-color .15s,border-color .15s;display:inline-flex;position:relative;&:hover:not(:disabled){color:var(--ttdk-text-icon-primary)}&:focus-visible{box-shadow:0 0 0 2px color-mix(in oklab, var(--ttdk-brand-default) 40%, transparent);border-radius:var(--ttdk-radius-input-sm)}&[data-state=active]{color:var(--ttdk-brand-default);font-weight:var(--ttdk-font-weight-semibold)}&:disabled,&[data-disabled=true]{opacity:.45;cursor:not-allowed;pointer-events:none}}.ttdk-tab-icon{flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.ttdk-tab-label{display:inline-block}.ttdk-tab-badge{font-size:11px;font-weight:var(--ttdk-font-weight-semibold);border-radius:var(--ttdk-radius-full);background:var(--ttdk-bg-secondary-disabled);color:var(--ttdk-text-icon-secondary);justify-content:center;align-items:center;padding:1px 6px;line-height:1.2;transition:all .15s;display:inline-flex}.ttdk-tab-item[data-state=active] .ttdk-tab-badge{background:color-mix(in oklab, var(--ttdk-brand-default) 15%, transparent);color:var(--ttdk-brand-default)}.ttdk-tabs[data-variant=line]{&[data-orientation=horizontal]{& .ttdk-tabs-list{border-bottom:var(--ttdk-stroke-width-thin) solid var(--ttdk-stroke-subtle);gap:var(--ttdk-spacing-lg)}& .ttdk-tab-indicator{background-color:var(--ttdk-brand-default);border-radius:var(--ttdk-radius-input-xs) var(--ttdk-radius-input-xs) 0 0;height:2px;animation:.2s ease-in-out ttdkTabFadeIn;position:absolute;bottom:-1px;left:0;right:0}}&[data-orientation=vertical]{& .ttdk-tabs-list{border-right:var(--ttdk-stroke-width-thin) solid var(--ttdk-stroke-subtle);gap:var(--ttdk-spacing-xxs);padding-right:var(--ttdk-spacing-xxs)}& .ttdk-tab-item{border-radius:var(--tab-radius);&[data-state=active]{background:color-mix(in oklab, var(--ttdk-brand-default) 8%, transparent)}}& .ttdk-tab-indicator{background-color:var(--ttdk-brand-default);border-radius:var(--ttdk-radius-input-xs);width:2px;animation:.2s ease-in-out ttdkTabFadeIn;position:absolute;top:4px;bottom:4px;right:-5px}}}.ttdk-tabs[data-variant=pills]{width:100%;min-width:0;max-width:100%;& .ttdk-tabs-list{box-sizing:border-box;background:var(--ttdk-bg-secondary-disabled);width:100%;min-width:0;max-width:100%;padding:var(--ttdk-spacing-xxs);border-radius:var(--tab-radius);gap:var(--ttdk-spacing-xxs)}& .ttdk-tab-item{border-radius:var(--tab-radius);color:var(--ttdk-text-icon-secondary);&:hover:not(:disabled){color:var(--ttdk-text-icon-primary)}&[data-state=active]{background:var(--ttdk-bg-card);color:var(--ttdk-text-icon-primary);box-shadow:var(--ttdk-shadow-sm)}}}.ttdk-tabs-panels{width:100%}.ttdk-tab-panel{padding:var(--ttdk-spacing-md) 0;color:var(--ttdk-text-icon-primary);animation:.2s ease-in-out ttdkTabFadeIn}@keyframes ttdkTabFadeIn{0%{opacity:0}to{opacity:1}}
@@ -0,0 +1,138 @@
1
+ <script context="module"></script>
2
+
3
+ <script>const dispatch = createEventDispatcher();
4
+ import { createEventDispatcher } from "svelte";
5
+ import { buildUiVars, UiProps } from "../../core/types";
6
+ export let value = void 0;
7
+ export let defaultValue = void 0;
8
+ export let items;
9
+ export let onChange = void 0;
10
+ export let className = void 0;
11
+ export let orientation = void 0;
12
+ export let variant = void 0;
13
+ export let size = void 0;
14
+ export let fitted = void 0;
15
+ export let rounded = void 0;
16
+ export let ui = void 0;
17
+ export let listClass = void 0;
18
+ export let listStyle = void 0;
19
+ export let tabClass = void 0;
20
+ export let activeTabClass = void 0;
21
+ export let tabStyle = void 0;
22
+ export let activeTabStyle = void 0;
23
+ export let badgeClass = void 0;
24
+ export let badgeStyle = void 0;
25
+ export let indicatorClass = void 0;
26
+ export let indicatorStyle = void 0;
27
+ export let lazy = void 0;
28
+ export let panelClass = void 0;
29
+ export let panelStyle = void 0;
30
+ function stringifyStyles(stylesObj) {
31
+ let styles = "";
32
+ for (let key in stylesObj) {
33
+ const dashedKey = key.replace(/[A-Z]/g, function(match) {
34
+ return "-" + match.toLowerCase();
35
+ });
36
+ styles += dashedKey + ":" + stylesObj[key] + ";";
37
+ }
38
+ return styles;
39
+ }
40
+ let activeVal = value || defaultValue || items && items[0]?.value || "";
41
+ $:
42
+ currentActive = value !== void 0 ? value : activeVal;
43
+ $:
44
+ activeItem = items ? items.find((item) => item.value === currentActive) : null;
45
+ function handleTabClick(itemValue, disabled) {
46
+ if (disabled)
47
+ return;
48
+ activeVal = itemValue;
49
+ value = itemValue;
50
+ dispatch("change", itemValue);
51
+ if (onChange) {
52
+ onChange(itemValue);
53
+ }
54
+ }
55
+ </script>
56
+
57
+ <div
58
+ style={stringifyStyles({
59
+ ...buildUiVars(ui),
60
+ })}
61
+ class={`ttdk-tabs ${className || ""}`.trim()}
62
+ data-orientation={orientation || "horizontal"}
63
+ data-variant={variant || "line"}
64
+ data-size={size || "md"}
65
+ data-fitted={fitted ? "true" : "false"}
66
+ data-rounded={rounded || "md"}
67
+ >
68
+ <div
69
+ style={stringifyStyles({
70
+ ...buildUiVars(listStyle),
71
+ })}
72
+ role="tablist"
73
+ class={`ttdk-tabs-list ${listClass || ""}`.trim()}
74
+ aria-orientation={orientation || "horizontal"}
75
+ >
76
+ {#each items as item (item.value)}
77
+ <button
78
+ style={stringifyStyles({
79
+ ...buildUiVars(tabStyle),
80
+ ...(currentActive === item.value
81
+ ? buildUiVars(activeTabStyle)
82
+ : {}),
83
+ })}
84
+ type="button"
85
+ role="tab"
86
+ class={`ttdk-tab-item ${tabClass || ""} ${
87
+ currentActive === item.value ? activeTabClass || "" : ""
88
+ }`.trim()}
89
+ data-state={currentActive === item.value ? "active" : "inactive"}
90
+ data-disabled={item.disabled ? "true" : "false"}
91
+ disabled={item.disabled}
92
+ aria-selected={currentActive === item.value}
93
+ on:click={(event) => {
94
+ handleTabClick(item.value, item.disabled);
95
+ }}
96
+ >
97
+ {#if item.icon}
98
+ <span class="ttdk-tab-icon">{item.icon}</span>
99
+ {/if}<span class="ttdk-tab-label">{item.label}</span>
100
+ {#if item.badge !== undefined && item.badge !== null}
101
+ <span
102
+ style={stringifyStyles({
103
+ ...buildUiVars(badgeStyle),
104
+ })}
105
+ class={`ttdk-tab-badge ${badgeClass || ""}`.trim()}
106
+ >{item.badge}</span
107
+ >
108
+ {/if}
109
+ {#if currentActive === item.value && (!variant || variant === "line")}
110
+ <span
111
+ style={stringifyStyles({
112
+ ...buildUiVars(indicatorStyle),
113
+ })}
114
+ class={`ttdk-tab-indicator ${indicatorClass || ""}`.trim()}
115
+ />
116
+ {/if}</button
117
+ >
118
+ {/each}
119
+ </div>
120
+ <div class="ttdk-tabs-panels">
121
+ {#if activeItem && activeItem?.content}
122
+ {#if !lazy || currentActive === activeItem?.value}
123
+ <div
124
+ style={stringifyStyles({
125
+ ...buildUiVars(panelStyle),
126
+ })}
127
+ role="tabpanel"
128
+ class={`ttdk-tab-panel ${panelClass || ""}`.trim()}
129
+ >
130
+ {activeItem?.content}
131
+ </div>
132
+ {/if}
133
+ {/if}
134
+ {#if $$slots.default}
135
+ <div class="ttdk-tab-children"><slot /></div>
136
+ {/if}
137
+ </div>
138
+ </div>
@@ -0,0 +1,204 @@
1
+ import { SvelteComponent } from "svelte";
2
+ export interface TabItem {
3
+ /**
4
+ * Label teks yang ditampilkan pada tab item.
5
+ */
6
+ label: string;
7
+ /**
8
+ * Identifier unik / nilai aktif untuk tab ini.
9
+ */
10
+ value: string;
11
+ /**
12
+ * Ikon atau emoji opsional di samping label teks.
13
+ */
14
+ icon?: any;
15
+ /**
16
+ * Badge teks atau counter angka opsional (misal: '12', 'Baru').
17
+ */
18
+ badge?: string | number;
19
+ /**
20
+ * Menonaktifkan tab item dari interaksi klik.
21
+ * @default false
22
+ */
23
+ disabled?: boolean;
24
+ /**
25
+ * Konten tab opsional jika ingin menggunakan panel terintegrasi.
26
+ */
27
+ content?: any;
28
+ }
29
+ export type TabsUiProps = UiProps;
30
+ export interface TabsProps {
31
+ /**
32
+ * Daftar tab items yang akan dirender.
33
+ */
34
+ items: TabItem[];
35
+ /**
36
+ * Nilai tab yang sedang aktif (v-model / controlled value).
37
+ */
38
+ value?: string;
39
+ /**
40
+ * Nilai tab default saat pertama kali dirender (uncontrolled initial value).
41
+ */
42
+ defaultValue?: string;
43
+ /**
44
+ * Orientasi tata letak tab.
45
+ * - `'horizontal'`: Tab berjejer ke samping dengan garis indikator di bawah (standar).
46
+ * - `'vertical'`: Tab berjejer ke bawah dalam kolom dengan garis indikator di samping.
47
+ *
48
+ * @default 'horizontal'
49
+ */
50
+ orientation?: "horizontal" | "vertical";
51
+ /**
52
+ * Varian visual tampilan tab.
53
+ * - `'line'`: Garis indikator bawah/samping minimalis elegan (sesuai desain TTDK).
54
+ * - `'pills'`: Bentuk kapsul/tombol latar belakang penuh ala Shadcn / Nuxt UI.
55
+ *
56
+ * @default 'line'
57
+ */
58
+ variant?: "line" | "pills";
59
+ /**
60
+ * Ukuran proporsional tab (tinggi, padding, ukuran font).
61
+ * - `'sm'`: Kecil (12px font, compact padding).
62
+ * - `'md'`: Standar (14px font, regular padding).
63
+ * - `'lg'`: Besar (16px font, spacious padding).
64
+ *
65
+ * @default 'md'
66
+ */
67
+ size?: "sm" | "md" | "lg";
68
+ /**
69
+ * Membuat lebar setiap tab mengisi rata seluruh ruang container (full width / equal width).
70
+ *
71
+ * @default false
72
+ */
73
+ fitted?: boolean;
74
+ /**
75
+ * Sudut kelengkungan (khusus untuk varian 'pills').
76
+ * - `'none'`: Sudut 0px.
77
+ * - `'sm'`: Sudut 4px.
78
+ * - `'md'`: Sudut 6px.
79
+ * - `'lg'`: Sudut 8px.
80
+ * - `'full'`: Sudut 9999px.
81
+ *
82
+ * @default 'md'
83
+ */
84
+ rounded?: "none" | "sm" | "md" | "lg" | "full";
85
+ /**
86
+ * Hanya me-render konten panel tab saat tab tersebut aktif (lazy rendering).
87
+ * Berguna untuk menghemat performa saat tab memiliki konten berat.
88
+ * @default false
89
+ */
90
+ lazy?: boolean;
91
+ /**
92
+ * Inline CSS style object native.
93
+ */
94
+ style?: any;
95
+ /**
96
+ * Kustomisasi visual granular root container (UiProps).
97
+ */
98
+ ui?: UiProps;
99
+ /**
100
+ * Style kustom untuk container tab list (UiProps).
101
+ */
102
+ listStyle?: UiProps;
103
+ /**
104
+ * Class CSS kustom untuk container tab list.
105
+ */
106
+ listClass?: string;
107
+ /**
108
+ * Style kustom untuk tombol tab item (UiProps).
109
+ */
110
+ tabStyle?: UiProps;
111
+ /**
112
+ * Class CSS kustom untuk tombol tab item.
113
+ */
114
+ tabClass?: string;
115
+ /**
116
+ * Style kustom untuk tombol tab item saat aktif (UiProps).
117
+ */
118
+ activeTabStyle?: UiProps;
119
+ /**
120
+ * Class CSS kustom untuk tombol tab item saat aktif.
121
+ */
122
+ activeTabClass?: string;
123
+ /**
124
+ * Style kustom untuk garis indikator tab (UiProps).
125
+ */
126
+ indicatorStyle?: UiProps;
127
+ /**
128
+ * Class CSS kustom untuk garis indikator tab.
129
+ */
130
+ indicatorClass?: string;
131
+ /**
132
+ * Style kustom untuk badge tab (UiProps).
133
+ */
134
+ badgeStyle?: UiProps;
135
+ /**
136
+ * Class CSS kustom untuk badge tab.
137
+ */
138
+ badgeClass?: string;
139
+ /**
140
+ * Style kustom untuk panel konten tab (UiProps).
141
+ */
142
+ panelStyle?: UiProps;
143
+ /**
144
+ * Class CSS kustom untuk panel konten tab.
145
+ */
146
+ panelClass?: string;
147
+ /**
148
+ * Callback event saat pengguna mengganti tab aktif.
149
+ *
150
+ * @param value Nilai/identifier tab yang dipilih.
151
+ */
152
+ onChange?: (value: string) => void;
153
+ /**
154
+ * Class CSS kustom.
155
+ */
156
+ className?: string;
157
+ /**
158
+ * Konten kustom atau slot anak.
159
+ */
160
+ children?: any;
161
+ }
162
+ import { UiProps } from "../../core/types";
163
+ declare const __propDef: {
164
+ props: {
165
+ value?: TabsProps["value"];
166
+ defaultValue?: TabsProps["defaultValue"];
167
+ items: TabsProps["items"];
168
+ onChange?: TabsProps["onChange"];
169
+ className?: TabsProps["className"];
170
+ orientation?: TabsProps["orientation"];
171
+ variant?: TabsProps["variant"];
172
+ size?: TabsProps["size"];
173
+ fitted?: TabsProps["fitted"];
174
+ rounded?: TabsProps["rounded"];
175
+ ui?: TabsProps["ui"];
176
+ listClass?: TabsProps["listClass"];
177
+ listStyle?: TabsProps["listStyle"];
178
+ tabClass?: TabsProps["tabClass"];
179
+ activeTabClass?: TabsProps["activeTabClass"];
180
+ tabStyle?: TabsProps["tabStyle"];
181
+ activeTabStyle?: TabsProps["activeTabStyle"];
182
+ badgeClass?: TabsProps["badgeClass"];
183
+ badgeStyle?: TabsProps["badgeStyle"];
184
+ indicatorClass?: TabsProps["indicatorClass"];
185
+ indicatorStyle?: TabsProps["indicatorStyle"];
186
+ lazy?: TabsProps["lazy"];
187
+ panelClass?: TabsProps["panelClass"];
188
+ panelStyle?: TabsProps["panelStyle"];
189
+ };
190
+ events: {
191
+ [evt: string]: CustomEvent<any>;
192
+ };
193
+ slots: {
194
+ default: {};
195
+ };
196
+ exports?: {} | undefined;
197
+ bindings?: string | undefined;
198
+ };
199
+ type TabsProps_ = typeof __propDef.props;
200
+ export type TabsEvents = typeof __propDef.events;
201
+ export type TabsSlots = typeof __propDef.slots;
202
+ export default class Tabs extends SvelteComponent<TabsProps_, TabsEvents, TabsSlots> {
203
+ }
204
+ export {};