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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (232) hide show
  1. package/AI_GUIDE.md +6518 -0
  2. package/llms.txt +6518 -0
  3. package/package.json +1096 -4
  4. package/src/core/index.ts +2 -0
  5. package/src/core/tailwind-preset.cjs +62 -0
  6. package/src/core/tailwind-preset.ts +85 -0
  7. package/src/core/theme/tokens.css +663 -0
  8. package/src/core/types.ts +836 -0
  9. package/src/index.ts +17 -0
  10. package/src/tailwind-preset.cjs +62 -0
  11. package/src/tailwind-preset.ts +85 -0
  12. package/src/types.ts +1 -0
  13. package/src/web/accordion/AI_GUIDE.md +149 -0
  14. package/src/web/accordion/accordion.css +1 -0
  15. package/src/web/accordion/accordion.vue +432 -0
  16. package/src/web/accordion/accordion.vue.d.ts +227 -0
  17. package/src/web/accordion/index.ts +3 -0
  18. package/src/web/accordion/manifest.json +351 -0
  19. package/src/web/alert/AI_GUIDE.md +139 -0
  20. package/src/web/alert/alert.css +1 -0
  21. package/src/web/alert/alert.vue +290 -0
  22. package/src/web/alert/alert.vue.d.ts +154 -0
  23. package/src/web/alert/index.ts +3 -0
  24. package/src/web/alert/manifest.json +240 -0
  25. package/src/web/avatar/AI_GUIDE.md +118 -0
  26. package/src/web/avatar/avatar.css +1 -0
  27. package/src/web/avatar/avatar.vue +217 -0
  28. package/src/web/avatar/avatar.vue.d.ts +135 -0
  29. package/src/web/avatar/index.ts +3 -0
  30. package/src/web/avatar/manifest.json +195 -0
  31. package/src/web/badge/AI_GUIDE.md +94 -0
  32. package/src/web/badge/badge.css +1 -0
  33. package/src/web/badge/badge.vue +135 -0
  34. package/src/web/badge/badge.vue.d.ts +108 -0
  35. package/src/web/badge/index.ts +3 -0
  36. package/src/web/badge/manifest.json +141 -0
  37. package/src/web/banner/AI_GUIDE.md +130 -0
  38. package/src/web/banner/banner.css +1 -0
  39. package/src/web/banner/banner.vue +303 -0
  40. package/src/web/banner/banner.vue.d.ts +162 -0
  41. package/src/web/banner/index.ts +3 -0
  42. package/src/web/banner/manifest.json +240 -0
  43. package/src/web/breadcrumb/AI_GUIDE.md +120 -0
  44. package/src/web/breadcrumb/breadcrumb.css +1 -0
  45. package/src/web/breadcrumb/breadcrumb.vue +313 -0
  46. package/src/web/breadcrumb/breadcrumb.vue.d.ts +139 -0
  47. package/src/web/breadcrumb/index.ts +3 -0
  48. package/src/web/breadcrumb/manifest.json +225 -0
  49. package/src/web/button/AI_GUIDE.md +121 -0
  50. package/src/web/button/button.css +1 -0
  51. package/src/web/button/button.vue +283 -0
  52. package/src/web/button/button.vue.d.ts +147 -0
  53. package/src/web/button/index.ts +3 -0
  54. package/src/web/button/manifest.json +177 -0
  55. package/src/web/calendar/AI_GUIDE.md +151 -0
  56. package/src/web/calendar/calendar.css +1 -0
  57. package/src/web/calendar/calendar.vue +1536 -0
  58. package/src/web/calendar/calendar.vue.d.ts +261 -0
  59. package/src/web/calendar/index.ts +3 -0
  60. package/src/web/calendar/manifest.json +470 -0
  61. package/src/web/card/AI_GUIDE.md +133 -0
  62. package/src/web/card/card.css +1 -0
  63. package/src/web/card/card.vue +423 -0
  64. package/src/web/card/card.vue.d.ts +232 -0
  65. package/src/web/card/index.ts +3 -0
  66. package/src/web/card/manifest.json +357 -0
  67. package/src/web/checkbox/AI_GUIDE.md +146 -0
  68. package/src/web/checkbox/checkbox.css +1 -0
  69. package/src/web/checkbox/checkbox.vue +304 -0
  70. package/src/web/checkbox/checkbox.vue.d.ts +189 -0
  71. package/src/web/checkbox/index.ts +3 -0
  72. package/src/web/checkbox/manifest.json +294 -0
  73. package/src/web/chip/AI_GUIDE.md +186 -0
  74. package/src/web/chip/chip.css +1 -0
  75. package/src/web/chip/chip.vue +220 -0
  76. package/src/web/chip/chip.vue.d.ts +140 -0
  77. package/src/web/chip/index.ts +3 -0
  78. package/src/web/chip/manifest.json +186 -0
  79. package/src/web/dropdown/AI_GUIDE.md +167 -0
  80. package/src/web/dropdown/dropdown.css +1 -0
  81. package/src/web/dropdown/dropdown.vue +1257 -0
  82. package/src/web/dropdown/dropdown.vue.d.ts +381 -0
  83. package/src/web/dropdown/index.ts +3 -0
  84. package/src/web/dropdown/manifest.json +576 -0
  85. package/src/web/flex/AI_GUIDE.md +113 -0
  86. package/src/web/flex/flex-item.vue +94 -0
  87. package/src/web/flex/flex-item.vue.d.ts +84 -0
  88. package/src/web/flex/flex.css +1 -0
  89. package/src/web/flex/flex.vue +103 -0
  90. package/src/web/flex/flex.vue.d.ts +92 -0
  91. package/src/web/flex/index.ts +5 -0
  92. package/src/web/flex/manifest.json +162 -0
  93. package/src/web/form/index.ts +7 -0
  94. package/src/web/grid/AI_GUIDE.md +112 -0
  95. package/src/web/grid/grid-item.vue +109 -0
  96. package/src/web/grid/grid-item.vue.d.ts +99 -0
  97. package/src/web/grid/grid.css +1 -0
  98. package/src/web/grid/grid.vue +94 -0
  99. package/src/web/grid/grid.vue.d.ts +84 -0
  100. package/src/web/grid/index.ts +5 -0
  101. package/src/web/grid/manifest.json +153 -0
  102. package/src/web/index.ts +86 -0
  103. package/src/web/input/AI_GUIDE.md +159 -0
  104. package/src/web/input/index.ts +3 -0
  105. package/src/web/input/input.css +1 -0
  106. package/src/web/input/input.vue +521 -0
  107. package/src/web/input/input.vue.d.ts +274 -0
  108. package/src/web/input/manifest.json +465 -0
  109. package/src/web/input-number/AI_GUIDE.md +164 -0
  110. package/src/web/input-number/index.ts +3 -0
  111. package/src/web/input-number/input-number.css +1 -0
  112. package/src/web/input-number/input-number.vue +1153 -0
  113. package/src/web/input-number/input-number.vue.d.ts +343 -0
  114. package/src/web/input-number/manifest.json +575 -0
  115. package/src/web/modal/AI_GUIDE.md +171 -0
  116. package/src/web/modal/index.ts +3 -0
  117. package/src/web/modal/manifest.json +375 -0
  118. package/src/web/modal/modal.css +1 -0
  119. package/src/web/modal/modal.vue +344 -0
  120. package/src/web/modal/modal.vue.d.ts +64 -0
  121. package/src/web/pagination/AI_GUIDE.md +148 -0
  122. package/src/web/pagination/index.ts +21 -0
  123. package/src/web/pagination/manifest.json +432 -0
  124. package/src/web/pagination/pagination-content.vue +42 -0
  125. package/src/web/pagination/pagination-content.vue.d.ts +28 -0
  126. package/src/web/pagination/pagination-ellipsis.vue +55 -0
  127. package/src/web/pagination/pagination-ellipsis.vue.d.ts +28 -0
  128. package/src/web/pagination/pagination-first.vue +161 -0
  129. package/src/web/pagination/pagination-first.vue.d.ts +67 -0
  130. package/src/web/pagination/pagination-item.vue +42 -0
  131. package/src/web/pagination/pagination-item.vue.d.ts +28 -0
  132. package/src/web/pagination/pagination-last.vue +161 -0
  133. package/src/web/pagination/pagination-last.vue.d.ts +67 -0
  134. package/src/web/pagination/pagination-link.vue +118 -0
  135. package/src/web/pagination/pagination-link.vue.d.ts +61 -0
  136. package/src/web/pagination/pagination-next.vue +160 -0
  137. package/src/web/pagination/pagination-next.vue.d.ts +68 -0
  138. package/src/web/pagination/pagination-previous.vue +160 -0
  139. package/src/web/pagination/pagination-previous.vue.d.ts +68 -0
  140. package/src/web/pagination/pagination.css +1 -0
  141. package/src/web/pagination/pagination.vue +730 -0
  142. package/src/web/pagination/pagination.vue.d.ts +247 -0
  143. package/src/web/popover/AI_GUIDE.md +163 -0
  144. package/src/web/popover/index.ts +3 -0
  145. package/src/web/popover/manifest.json +396 -0
  146. package/src/web/popover/popover.css +1 -0
  147. package/src/web/popover/popover.vue +579 -0
  148. package/src/web/popover/popover.vue.d.ts +83 -0
  149. package/src/web/radio/AI_GUIDE.md +155 -0
  150. package/src/web/radio/index.ts +3 -0
  151. package/src/web/radio/manifest.json +294 -0
  152. package/src/web/radio/radio.css +1 -0
  153. package/src/web/radio/radio.vue +288 -0
  154. package/src/web/radio/radio.vue.d.ts +182 -0
  155. package/src/web/selectbox/AI_GUIDE.md +216 -0
  156. package/src/web/selectbox/index.ts +3 -0
  157. package/src/web/selectbox/manifest.json +477 -0
  158. package/src/web/selectbox/selectbox.css +1 -0
  159. package/src/web/selectbox/selectbox.vue +1024 -0
  160. package/src/web/selectbox/selectbox.vue.d.ts +300 -0
  161. package/src/web/sonner/AI_GUIDE.md +98 -0
  162. package/src/web/sonner/index.ts +114 -0
  163. package/src/web/sonner/manifest.json +132 -0
  164. package/src/web/sonner/sonner.css +1 -0
  165. package/src/web/sonner/sonner.vue +180 -0
  166. package/src/web/sonner/sonner.vue.d.ts +113 -0
  167. package/src/web/table/AI_GUIDE.md +145 -0
  168. package/src/web/table/index.ts +34 -0
  169. package/src/web/table/manifest.json +168 -0
  170. package/src/web/table/table-body.vue +42 -0
  171. package/src/web/table/table-body.vue.d.ts +28 -0
  172. package/src/web/table/table-caption.vue +42 -0
  173. package/src/web/table/table-caption.vue.d.ts +28 -0
  174. package/src/web/table/table-cell.vue +71 -0
  175. package/src/web/table/table-cell.vue.d.ts +49 -0
  176. package/src/web/table/table-empty.vue +105 -0
  177. package/src/web/table/table-empty.vue.d.ts +57 -0
  178. package/src/web/table/table-footer.vue +42 -0
  179. package/src/web/table/table-footer.vue.d.ts +28 -0
  180. package/src/web/table/table-head.vue +78 -0
  181. package/src/web/table/table-head.vue.d.ts +50 -0
  182. package/src/web/table/table-header.vue +42 -0
  183. package/src/web/table/table-header.vue.d.ts +28 -0
  184. package/src/web/table/table-row.vue +70 -0
  185. package/src/web/table/table-row.vue.d.ts +44 -0
  186. package/src/web/table/table.css +1 -0
  187. package/src/web/table/table.vue +298 -0
  188. package/src/web/table/table.vue.d.ts +119 -0
  189. package/src/web/tabs/AI_GUIDE.md +150 -0
  190. package/src/web/tabs/index.ts +2 -0
  191. package/src/web/tabs/manifest.json +315 -0
  192. package/src/web/tabs/tabs.css +1 -0
  193. package/src/web/tabs/tabs.vue +164 -0
  194. package/src/web/tabs/tabs.vue.d.ts +60 -0
  195. package/src/web/text/AI_GUIDE.md +129 -0
  196. package/src/web/text/index.ts +2 -0
  197. package/src/web/text/manifest.json +195 -0
  198. package/src/web/text/text.css +1 -0
  199. package/src/web/text/text.vue +195 -0
  200. package/src/web/text/text.vue.d.ts +161 -0
  201. package/src/web/textarea/AI_GUIDE.md +141 -0
  202. package/src/web/textarea/index.ts +3 -0
  203. package/src/web/textarea/manifest.json +438 -0
  204. package/src/web/textarea/textarea.css +1 -0
  205. package/src/web/textarea/textarea.vue +458 -0
  206. package/src/web/textarea/textarea.vue.d.ts +265 -0
  207. package/src/web/tooltip/AI_GUIDE.md +110 -0
  208. package/src/web/tooltip/index.ts +3 -0
  209. package/src/web/tooltip/manifest.json +222 -0
  210. package/src/web/tooltip/tooltip.css +1 -0
  211. package/src/web/tooltip/tooltip.vue +417 -0
  212. package/src/web/tooltip/tooltip.vue.d.ts +150 -0
  213. package/src/webview/bottomsheet/AI_GUIDE.md +141 -0
  214. package/src/webview/bottomsheet/bottomsheet.css +1 -0
  215. package/src/webview/bottomsheet/bottomsheet.vue +441 -0
  216. package/src/webview/bottomsheet/bottomsheet.vue.d.ts +178 -0
  217. package/src/webview/bottomsheet/index.ts +4 -0
  218. package/src/webview/bottomsheet/manifest.json +377 -0
  219. package/src/webview/button/AI_GUIDE.md +79 -0
  220. package/src/webview/button/button-ios.css +1 -0
  221. package/src/webview/button/button-ios.vue +138 -0
  222. package/src/webview/button/button-ios.vue.d.ts +102 -0
  223. package/src/webview/button/button-material.css +1 -0
  224. package/src/webview/button/button-material.vue +138 -0
  225. package/src/webview/button/button-material.vue.d.ts +102 -0
  226. package/src/webview/button/index.ts +7 -0
  227. package/src/webview/button/manifest.json +148 -0
  228. package/src/webview/index.ts +7 -0
  229. package/tailwind-preset.cjs +62 -0
  230. package/tailwind-preset.js +62 -0
  231. package/ttdk-manifest.json +10188 -0
  232. package/README.md +0 -3
@@ -0,0 +1,102 @@
1
+ /* eslint-disable */
2
+ // Auto-generated by TTDK Design System Vue Type Generator
3
+ import type { DefineComponent } from "vue";
4
+ import { buildUiVars, UiProps } from "../../core/types";
5
+
6
+ export type ButtonIosUiProps = UiProps;
7
+
8
+ export interface ButtonIosProps {
9
+ /**
10
+ * Inline CSS style kustom.
11
+ */
12
+ style?: any;
13
+
14
+ /**
15
+ * Gaya varian tombol berdasarkan Apple Human Interface Guidelines:
16
+ * - `'filled'`: Tombol solid high-emphasis / prominent (default).
17
+ * - `'tinted'`: Tombol berlatar belakang transparan lembut dengan aksen warna.
18
+ * - `'gray'`: Tombol berlatar belakang abu-abu netral khas Apple (systemGray).
19
+ * - `'plain'`: Tombol teks tanpa latar dan border (link style).
20
+ *
21
+ * @default 'filled'
22
+ */
23
+ variant?: "filled" | "tinted" | "gray" | "plain";
24
+
25
+ /**
26
+ * Warna aksen semantik iOS:
27
+ * - `'primary'`: iOS System Blue (#007aff).
28
+ * - `'success'`: iOS System Green (#34c759).
29
+ * - `'warning'`: iOS System Orange (#ff9500).
30
+ * - `'danger'`: iOS System Red (#ff3b30).
31
+ * - `'neutral'`: iOS System Gray (#8e8e93).
32
+ *
33
+ * @default 'primary'
34
+ */
35
+ color?: "primary" | "success" | "warning" | "danger" | "neutral";
36
+
37
+ /**
38
+ * Skala ukuran tombol:
39
+ * - `'sm'`: 30px (compact)
40
+ * - `'md'`: 42px (standar iOS touch target)
41
+ * - `'lg'`: 50px (large CTA)
42
+ *
43
+ * @default 'md'
44
+ */
45
+ size?: "sm" | "md" | "lg";
46
+
47
+ /**
48
+ * Bentuk sudut tombol:
49
+ * - `'rounded'`: Continuous curve squircle khas iOS (~10-14px).
50
+ * - `'capsule'`: Full pill / capsule (border-radius: 9999px).
51
+ *
52
+ * @default 'rounded'
53
+ */
54
+ shape?: "rounded" | "capsule";
55
+
56
+ /**
57
+ * Tipe tombol HTML native.
58
+ * @default 'button'
59
+ */
60
+ type?: "button" | "submit" | "reset";
61
+
62
+ /**
63
+ * Kondisi non-aktif tombol.
64
+ * @default false
65
+ */
66
+ disabled?: boolean;
67
+
68
+ /**
69
+ * Menampilkan iOS activity indicator / spinner.
70
+ * @default false
71
+ */
72
+ loading?: boolean;
73
+
74
+ /**
75
+ * Lebar penuh 100% mengikuti kontainer induk.
76
+ * @default false
77
+ */
78
+ block?: boolean;
79
+
80
+ /**
81
+ * ID unik elemen HTML.
82
+ */
83
+ id?: string;
84
+
85
+ /**
86
+ * Konfigurasi styling kustom UI.
87
+ */
88
+ ui?: ButtonIosUiProps;
89
+
90
+ /**
91
+ * Callback saat tombol ditekan / diklik.
92
+ */
93
+ onClick?: (event: any) => void;
94
+
95
+ /**
96
+ * Konten label / elemen di dalam tombol.
97
+ */
98
+ children?: any;
99
+ }
100
+
101
+ declare const component: DefineComponent<ButtonIosProps>;
102
+ export default component;
@@ -0,0 +1 @@
1
+ .ttdk-btn-m3{box-sizing:border-box;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;letter-spacing:.1px;border:none;border-radius:9999px;outline:none;justify-content:center;align-items:center;min-height:40px;font-family:Roboto,Segoe UI,system-ui,-apple-system,sans-serif;font-weight:500;line-height:20px;text-decoration:none;transition:box-shadow .2s cubic-bezier(.2,0,0,1),background-color .2s cubic-bezier(.2,0,0,1),color .2s cubic-bezier(.2,0,0,1),border-color .2s cubic-bezier(.2,0,0,1);display:inline-flex;position:relative;overflow:hidden}.ttdk-btn-m3--block{width:100%;display:flex}.ttdk-btn-m3:before{content:"";border-radius:inherit;opacity:0;pointer-events:none;background-color:currentColor;transition:opacity .2s cubic-bezier(.2,0,0,1);position:absolute;inset:0}.ttdk-btn-m3:hover:not(:disabled):before{opacity:.08}.ttdk-btn-m3:focus-visible:not(:disabled):before{opacity:.12}.ttdk-btn-m3:active:not(:disabled):before{opacity:.16}.ttdk-btn-m3:after{content:"";opacity:0;pointer-events:none;background:radial-gradient(circle,currentColor 10%,#0000 10.01%) 50% no-repeat;width:100%;height:100%;transition:transform .4s cubic-bezier(.2,0,0,1),opacity .8s cubic-bezier(.2,0,0,1);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)scale(8)}.ttdk-btn-m3:active:not(:disabled):after{opacity:.24;transition:all;transform:translate(-50%,-50%)scale(0)}.ttdk-btn-m3--sm{gap:6px;height:32px;min-height:32px;padding:0 16px;font-size:12px}.ttdk-btn-m3--md{gap:8px;height:40px;min-height:40px;padding:0 24px;font-size:14px}.ttdk-btn-m3--lg{gap:10px;height:48px;min-height:48px;padding:0 28px;font-size:16px}.ttdk-btn-m3--rounded{border-radius:12px!important}.ttdk-btn-m3--filled.ttdk-btn-m3--primary{background-color:var(--md-sys-color-primary,#006a60);color:var(--md-sys-color-on-primary,#fff)}.ttdk-btn-m3--filled.ttdk-btn-m3--secondary{background-color:var(--md-sys-color-secondary,#4a635f);color:#fff}.ttdk-btn-m3--filled.ttdk-btn-m3--tertiary{background-color:var(--md-sys-color-tertiary,#456179);color:#fff}.ttdk-btn-m3--filled.ttdk-btn-m3--error{background-color:var(--md-sys-color-error,#ba1a1a);color:#fff}.ttdk-btn-m3--filled:hover:not(:disabled){box-shadow:0 1px 3px 1px #00000026,0 1px 2px #0003}.ttdk-btn-m3--elevated{background-color:var(--md-sys-color-surface-container-low,#f7fbf8);box-shadow:0 1px 3px 1px #00000026,0 1px 2px #0003}.ttdk-btn-m3--elevated.ttdk-btn-m3--primary{color:var(--md-sys-color-primary,#006a60)}.ttdk-btn-m3--elevated.ttdk-btn-m3--secondary{color:var(--md-sys-color-secondary,#4a635f)}.ttdk-btn-m3--elevated.ttdk-btn-m3--tertiary{color:var(--md-sys-color-tertiary,#456179)}.ttdk-btn-m3--elevated.ttdk-btn-m3--error{color:var(--md-sys-color-error,#ba1a1a)}.ttdk-btn-m3--elevated:hover:not(:disabled){box-shadow:0 2px 6px 2px #00000026,0 1px 2px #00000040}.ttdk-btn-m3--tonal.ttdk-btn-m3--primary{background-color:var(--md-sys-color-secondary-container,#cce8e3);color:var(--md-sys-color-on-secondary-container,#05201d)}.ttdk-btn-m3--tonal.ttdk-btn-m3--secondary{color:#1e2a2e;background-color:#dbe4e6}.ttdk-btn-m3--tonal.ttdk-btn-m3--tertiary{color:#0b1d28;background-color:#d1e5f4}.ttdk-btn-m3--tonal.ttdk-btn-m3--error{color:#410002;background-color:#ffdad6}.ttdk-btn-m3--tonal:hover:not(:disabled){box-shadow:0 1px 3px 1px #0000001f,0 1px 2px #0000002e}.ttdk-btn-m3--outlined{border:1px solid var(--md-sys-color-outline,#707977);background-color:#0000}.ttdk-btn-m3--outlined.ttdk-btn-m3--primary{color:var(--md-sys-color-primary,#006a60)}.ttdk-btn-m3--outlined.ttdk-btn-m3--secondary{color:var(--md-sys-color-secondary,#4a635f)}.ttdk-btn-m3--outlined.ttdk-btn-m3--tertiary{color:var(--md-sys-color-tertiary,#456179)}.ttdk-btn-m3--outlined.ttdk-btn-m3--error{color:var(--md-sys-color-error,#ba1a1a);border-color:#ba1a1a}.ttdk-btn-m3--text{background-color:#0000;padding-left:12px;padding-right:12px}.ttdk-btn-m3--text.ttdk-btn-m3--primary{color:var(--md-sys-color-primary,#006a60)}.ttdk-btn-m3--text.ttdk-btn-m3--secondary{color:var(--md-sys-color-secondary,#4a635f)}.ttdk-btn-m3--text.ttdk-btn-m3--tertiary{color:var(--md-sys-color-tertiary,#456179)}.ttdk-btn-m3--text.ttdk-btn-m3--error{color:var(--md-sys-color-error,#ba1a1a)}.ttdk-btn-m3:disabled,.ttdk-btn-m3--disabled{opacity:.38!important;cursor:not-allowed!important;pointer-events:none!important;box-shadow:none!important}.ttdk-btn-m3--loading{cursor:wait}.ttdk-btn-m3__spinner{border:2.5px solid;border-right-color:#0000;border-radius:50%;width:1.1em;height:1.1em;animation:.75s cubic-bezier(.4,0,.2,1) infinite ttdk-m3-spin;display:inline-block}@keyframes ttdk-m3-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
@@ -0,0 +1,138 @@
1
+ <template>
2
+ <button
3
+ :id="id"
4
+ :type="type || 'button'"
5
+ :disabled="disabled || loading"
6
+ :class="
7
+ 'ttdk-btn-m3' +
8
+ ' ttdk-btn-m3--' +
9
+ (variant || 'filled') +
10
+ ' ttdk-btn-m3--' +
11
+ (color || 'primary') +
12
+ ' ttdk-btn-m3--' +
13
+ (size || 'md') +
14
+ (shape === 'rounded' ? ' ttdk-btn-m3--rounded' : '') +
15
+ (block ? ' ttdk-btn-m3--block' : '') +
16
+ (loading ? ' ttdk-btn-m3--loading' : '') +
17
+ (disabled ? ' ttdk-btn-m3--disabled' : '') +
18
+ (ui?.class ? ' ' + ui.class : '')
19
+ "
20
+ :style="{
21
+ ...buildUiVars(ui?.style),
22
+ ...(typeof style === 'object' ? style : {}),
23
+ }"
24
+ @click="
25
+ async (e) => {
26
+ if (!disabled && !loading && onClick) {
27
+ onClick(e);
28
+ }
29
+ }
30
+ "
31
+ >
32
+ <template v-if="loading">
33
+ <span class="ttdk-btn-m3__spinner" aria-hidden="true"></span>
34
+ </template>
35
+
36
+ <slot />
37
+ </button>
38
+ </template>
39
+
40
+ <script setup lang="ts">
41
+ import { buildUiVars, UiProps } from "../../core/types";
42
+
43
+ export type ButtonMaterialUiProps = UiProps;
44
+ export interface ButtonMaterialProps {
45
+ /**
46
+ * Inline CSS style kustom.
47
+ */
48
+ style?: any;
49
+
50
+ /**
51
+ * 5 Tipe tombol resmi Material Design 3 (M3):
52
+ * - `'filled'`: Tombol kontainer warna primer pekat (high emphasis, default).
53
+ * - `'elevated'`: Tombol berlatar surface dengan bayangan elevasi level 1.
54
+ * - `'tonal'`: Tombol warna kontainer sekunder (medium-high emphasis).
55
+ * - `'outlined'`: Tombol bergaris tepi 1px dengan latar transparan.
56
+ * - `'text'`: Tombol teks tanpa latar dan border (low emphasis).
57
+ *
58
+ * @default 'filled'
59
+ */
60
+ variant?: "filled" | "elevated" | "tonal" | "outlined" | "text";
61
+
62
+ /**
63
+ * Skema peran warna Material 3:
64
+ * - `'primary'`: Warna tema primer (M3 Primary).
65
+ * - `'secondary'`: Warna tema sekunder (M3 Secondary).
66
+ * - `'tertiary'`: Warna tema tersier (M3 Tertiary).
67
+ * - `'error'`: Warna peringatan / bahaya (M3 Error).
68
+ *
69
+ * @default 'primary'
70
+ */
71
+ color?: "primary" | "secondary" | "tertiary" | "error";
72
+
73
+ /**
74
+ * Skala ukuran tombol M3:
75
+ * - `'sm'`: 32px (compact)
76
+ * - `'md'`: 40px (standar M3 spec)
77
+ * - `'lg'`: 48px (large touch target)
78
+ *
79
+ * @default 'md'
80
+ */
81
+ size?: "sm" | "md" | "lg";
82
+
83
+ /**
84
+ * Bentuk sudut kontainer:
85
+ * - `'pill'`: Full rounded pill khas Material 3 (border-radius: 9999px).
86
+ * - `'rounded'`: Sudut membulat medium (~12px).
87
+ *
88
+ * @default 'pill'
89
+ */
90
+ shape?: "pill" | "rounded";
91
+
92
+ /**
93
+ * Tipe tombol HTML native.
94
+ * @default 'button'
95
+ */
96
+ type?: "button" | "submit" | "reset";
97
+
98
+ /**
99
+ * Kondisi non-aktif tombol.
100
+ * @default false
101
+ */
102
+ disabled?: boolean;
103
+
104
+ /**
105
+ * Menampilkan spinner loading M3.
106
+ * @default false
107
+ */
108
+ loading?: boolean;
109
+
110
+ /**
111
+ * Lebar penuh 100% mengikuti kontainer induk.
112
+ * @default false
113
+ */
114
+ block?: boolean;
115
+
116
+ /**
117
+ * ID unik elemen HTML.
118
+ */
119
+ id?: string;
120
+
121
+ /**
122
+ * Konfigurasi styling kustom UI.
123
+ */
124
+ ui?: ButtonMaterialUiProps;
125
+
126
+ /**
127
+ * Callback saat tombol ditekan / diklik.
128
+ */
129
+ onClick?: (event: any) => void;
130
+
131
+ /**
132
+ * Konten label / elemen di dalam tombol.
133
+ */
134
+ children?: any;
135
+ }
136
+
137
+ const props = defineProps<ButtonMaterialProps>();
138
+ </script>
@@ -0,0 +1,102 @@
1
+ /* eslint-disable */
2
+ // Auto-generated by TTDK Design System Vue Type Generator
3
+ import type { DefineComponent } from "vue";
4
+ import { buildUiVars, UiProps } from "../../core/types";
5
+
6
+ export type ButtonMaterialUiProps = UiProps;
7
+
8
+ export interface ButtonMaterialProps {
9
+ /**
10
+ * Inline CSS style kustom.
11
+ */
12
+ style?: any;
13
+
14
+ /**
15
+ * 5 Tipe tombol resmi Material Design 3 (M3):
16
+ * - `'filled'`: Tombol kontainer warna primer pekat (high emphasis, default).
17
+ * - `'elevated'`: Tombol berlatar surface dengan bayangan elevasi level 1.
18
+ * - `'tonal'`: Tombol warna kontainer sekunder (medium-high emphasis).
19
+ * - `'outlined'`: Tombol bergaris tepi 1px dengan latar transparan.
20
+ * - `'text'`: Tombol teks tanpa latar dan border (low emphasis).
21
+ *
22
+ * @default 'filled'
23
+ */
24
+ variant?: "filled" | "elevated" | "tonal" | "outlined" | "text";
25
+
26
+ /**
27
+ * Skema peran warna Material 3:
28
+ * - `'primary'`: Warna tema primer (M3 Primary).
29
+ * - `'secondary'`: Warna tema sekunder (M3 Secondary).
30
+ * - `'tertiary'`: Warna tema tersier (M3 Tertiary).
31
+ * - `'error'`: Warna peringatan / bahaya (M3 Error).
32
+ *
33
+ * @default 'primary'
34
+ */
35
+ color?: "primary" | "secondary" | "tertiary" | "error";
36
+
37
+ /**
38
+ * Skala ukuran tombol M3:
39
+ * - `'sm'`: 32px (compact)
40
+ * - `'md'`: 40px (standar M3 spec)
41
+ * - `'lg'`: 48px (large touch target)
42
+ *
43
+ * @default 'md'
44
+ */
45
+ size?: "sm" | "md" | "lg";
46
+
47
+ /**
48
+ * Bentuk sudut kontainer:
49
+ * - `'pill'`: Full rounded pill khas Material 3 (border-radius: 9999px).
50
+ * - `'rounded'`: Sudut membulat medium (~12px).
51
+ *
52
+ * @default 'pill'
53
+ */
54
+ shape?: "pill" | "rounded";
55
+
56
+ /**
57
+ * Tipe tombol HTML native.
58
+ * @default 'button'
59
+ */
60
+ type?: "button" | "submit" | "reset";
61
+
62
+ /**
63
+ * Kondisi non-aktif tombol.
64
+ * @default false
65
+ */
66
+ disabled?: boolean;
67
+
68
+ /**
69
+ * Menampilkan spinner loading M3.
70
+ * @default false
71
+ */
72
+ loading?: boolean;
73
+
74
+ /**
75
+ * Lebar penuh 100% mengikuti kontainer induk.
76
+ * @default false
77
+ */
78
+ block?: boolean;
79
+
80
+ /**
81
+ * ID unik elemen HTML.
82
+ */
83
+ id?: string;
84
+
85
+ /**
86
+ * Konfigurasi styling kustom UI.
87
+ */
88
+ ui?: ButtonMaterialUiProps;
89
+
90
+ /**
91
+ * Callback saat tombol ditekan / diklik.
92
+ */
93
+ onClick?: (event: any) => void;
94
+
95
+ /**
96
+ * Konten label / elemen di dalam tombol.
97
+ */
98
+ children?: any;
99
+ }
100
+
101
+ declare const component: DefineComponent<ButtonMaterialProps>;
102
+ export default component;
@@ -0,0 +1,7 @@
1
+ export { default as ButtonIos } from './button-ios.vue';
2
+ export type { ButtonIosProps, ButtonIosUiProps } from './button-ios.vue';
3
+ export * from './button-ios.vue';
4
+
5
+ export { default as ButtonMaterial } from './button-material.vue';
6
+ export type { ButtonMaterialProps, ButtonMaterialUiProps } from './button-material.vue';
7
+ export * from './button-material.vue';
@@ -0,0 +1,148 @@
1
+ {
2
+ "name": "@ttdk-design-system/button",
3
+ "component": "ButtonMaterial",
4
+ "folder": "button",
5
+ "description": "TTDK ButtonMaterial component with multi-theme support.",
6
+ "stylesheets": [
7
+ {
8
+ "theme": "common",
9
+ "file": "button-ios.css",
10
+ "importPath": "webview/button/button-ios.css"
11
+ },
12
+ {
13
+ "theme": "common",
14
+ "file": "button-material.css",
15
+ "importPath": "webview/button/button-material.css"
16
+ }
17
+ ],
18
+ "props": {},
19
+ "subInterfaces": {
20
+ "ButtonMaterialProps": {
21
+ "style": {
22
+ "name": "style",
23
+ "type": "any",
24
+ "optional": true,
25
+ "default": null,
26
+ "description": "Inline CSS style kustom.",
27
+ "example": null,
28
+ "param": null
29
+ },
30
+ "variant": {
31
+ "name": "variant",
32
+ "type": "'filled' | 'elevated' | 'tonal' | 'outlined' | 'text'",
33
+ "optional": true,
34
+ "default": "filled",
35
+ "description": "5 Tipe tombol resmi Material Design 3 (M3): - `'filled'`: Tombol kontainer warna primer pekat (high emphasis, default). - `'elevated'`: Tombol berlatar surface dengan bayangan elevasi level 1. - `'tonal'`: Tombol warna kontainer sekunder (medium-high emphasis). - `'outlined'`: Tombol bergaris tepi 1px dengan latar transparan. - `'text'`: Tombol teks tanpa latar dan border (low emphasis).",
36
+ "example": null,
37
+ "param": null
38
+ },
39
+ "color": {
40
+ "name": "color",
41
+ "type": "'primary' | 'secondary' | 'tertiary' | 'error'",
42
+ "optional": true,
43
+ "default": "primary",
44
+ "description": "Skema peran warna Material 3: - `'primary'`: Warna tema primer (M3 Primary). - `'secondary'`: Warna tema sekunder (M3 Secondary). - `'tertiary'`: Warna tema tersier (M3 Tertiary). - `'error'`: Warna peringatan / bahaya (M3 Error).",
45
+ "example": null,
46
+ "param": null
47
+ },
48
+ "size": {
49
+ "name": "size",
50
+ "type": "'sm' | 'md' | 'lg'",
51
+ "optional": true,
52
+ "default": "md",
53
+ "description": "Skala ukuran tombol M3: - `'sm'`: 32px (compact) - `'md'`: 40px (standar M3 spec) - `'lg'`: 48px (large touch target)",
54
+ "example": null,
55
+ "param": null
56
+ },
57
+ "shape": {
58
+ "name": "shape",
59
+ "type": "'pill' | 'rounded'",
60
+ "optional": true,
61
+ "default": "pill",
62
+ "description": "Bentuk sudut kontainer: - `'pill'`: Full rounded pill khas Material 3 (border-radius: 9999px). - `'rounded'`: Sudut membulat medium (~12px).",
63
+ "example": null,
64
+ "param": null
65
+ },
66
+ "type": {
67
+ "name": "type",
68
+ "type": "'button' | 'submit' | 'reset'",
69
+ "optional": true,
70
+ "default": "button",
71
+ "description": "Tipe tombol HTML native.",
72
+ "example": null,
73
+ "param": null
74
+ },
75
+ "disabled": {
76
+ "name": "disabled",
77
+ "type": "boolean",
78
+ "optional": true,
79
+ "default": "false",
80
+ "description": "Kondisi non-aktif tombol.",
81
+ "example": null,
82
+ "param": null
83
+ },
84
+ "loading": {
85
+ "name": "loading",
86
+ "type": "boolean",
87
+ "optional": true,
88
+ "default": "false",
89
+ "description": "Menampilkan spinner loading M3.",
90
+ "example": null,
91
+ "param": null
92
+ },
93
+ "block": {
94
+ "name": "block",
95
+ "type": "boolean",
96
+ "optional": true,
97
+ "default": "false",
98
+ "description": "Lebar penuh 100% mengikuti kontainer induk.",
99
+ "example": null,
100
+ "param": null
101
+ },
102
+ "id": {
103
+ "name": "id",
104
+ "type": "string",
105
+ "optional": true,
106
+ "default": null,
107
+ "description": "ID unik elemen HTML.",
108
+ "example": null,
109
+ "param": null
110
+ },
111
+ "ui": {
112
+ "name": "ui",
113
+ "type": "ButtonMaterialUiProps",
114
+ "optional": true,
115
+ "default": null,
116
+ "description": "Konfigurasi styling kustom UI.",
117
+ "example": null,
118
+ "param": null
119
+ },
120
+ "onClick": {
121
+ "name": "onClick",
122
+ "type": "(event: any) => void",
123
+ "optional": true,
124
+ "default": null,
125
+ "description": "Callback saat tombol ditekan / diklik.",
126
+ "example": null,
127
+ "param": null
128
+ },
129
+ "children": {
130
+ "name": "children",
131
+ "type": "any",
132
+ "optional": true,
133
+ "default": null,
134
+ "description": "Konten label / elemen di dalam tombol.",
135
+ "example": null,
136
+ "param": null
137
+ }
138
+ }
139
+ },
140
+ "supportedFrameworks": [
141
+ "react",
142
+ "vue",
143
+ "svelte"
144
+ ],
145
+ "themes": [
146
+ "tw"
147
+ ]
148
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * TTDK Design System — Webview / Mobile-first Module (VUE)
3
+ */
4
+
5
+ export * from "../core";
6
+ export * from './bottomsheet';
7
+ export * from './button';
@@ -0,0 +1,62 @@
1
+ /**
2
+ * TTDK Design System — Official Tailwind CSS Preset (CommonJS)
3
+ */
4
+ module.exports = {
5
+ theme: {
6
+ extend: {
7
+ spacing: {
8
+ "0": "var(--ttdk-spacing-0, 0px)",
9
+ "2": "var(--ttdk-spacing-2, 2px)",
10
+ "4": "var(--ttdk-spacing-4, 4px)",
11
+ "6": "var(--ttdk-spacing-6, 6px)",
12
+ "8": "var(--ttdk-spacing-8, 8px)",
13
+ "12": "var(--ttdk-spacing-12, 12px)",
14
+ "16": "var(--ttdk-spacing-16, 16px)",
15
+ "20": "var(--ttdk-spacing-20, 20px)",
16
+ "24": "var(--ttdk-spacing-24, 24px)",
17
+ "32": "var(--ttdk-spacing-32, 32px)",
18
+ "48": "var(--ttdk-spacing-48, 48px)",
19
+ "64": "var(--ttdk-spacing-64, 64px)",
20
+ "96": "var(--ttdk-spacing-96, 96px)",
21
+ },
22
+ boxShadow: {
23
+ "ttdk-sm": "var(--ttdk-shadow-sm, 0px 1px 10px 0px rgba(0, 0, 0, 0.08))",
24
+ "ttdk-md": "var(--ttdk-shadow-md, 0px 1px 15px 0px rgba(0, 0, 0, 0.1))",
25
+ "ttdk-lg": "var(--ttdk-shadow-lg, 0px 4px 12px 0px rgba(48, 49, 53, 0.2))",
26
+ "ttdk-top": "var(--ttdk-shadow-top, 0px 4px 12px 0px rgba(48, 49, 53, 0.2))",
27
+ "ttdk-bottom": "var(--ttdk-shadow-bottom, 0px 4px 16px 0px rgba(0, 0, 0, 0.08))",
28
+ "ttdk-right": "var(--ttdk-shadow-right, 4px 0px 16px 0px rgba(0, 0, 0, 0.08))",
29
+ "ttdk-left": "var(--ttdk-shadow-left, -4px 0px 16px 0px rgba(0, 0, 0, 0.08))",
30
+ },
31
+ maxWidth: {
32
+ "ttdk-mobile": "var(--ttdk-grid-mobile-container, 328px)",
33
+ "ttdk-desktop": "var(--ttdk-grid-desktop-container, 1128px)",
34
+ },
35
+ colors: {
36
+ ttdk: {
37
+ primary: {
38
+ DEFAULT: "var(--ttdk-brand-default, #16b3ac)",
39
+ hover: "var(--ttdk-brand-strong, #128f8a)",
40
+ subtle: "var(--ttdk-brand-subtle, #b8edea)",
41
+ },
42
+ accent: {
43
+ DEFAULT: "var(--ttdk-color-brand-blue-500, #3899fe)",
44
+ hover: "var(--ttdk-color-brand-blue-600, #1e81e8)",
45
+ },
46
+ surface: {
47
+ DEFAULT: "var(--ttdk-bg-base-primary, #ffffff)",
48
+ subtle: "var(--ttdk-bg-secondary-disabled, #f1f2f3)",
49
+ dark: "var(--ttdk-color-neutral-black, #141313)",
50
+ },
51
+ border: {
52
+ DEFAULT: "var(--ttdk-stroke-subtle, #e4e5e7)",
53
+ dark: "var(--ttdk-stroke-subtle, #313336)",
54
+ },
55
+ },
56
+ },
57
+ fontFamily: {
58
+ sans: ["Manrope", "ui-sans-serif", "system-ui", "-apple-system", "sans-serif"],
59
+ },
60
+ },
61
+ },
62
+ };
@@ -0,0 +1,62 @@
1
+ /**
2
+ * TTDK Design System — Official Tailwind CSS Preset (CommonJS)
3
+ */
4
+ module.exports = {
5
+ theme: {
6
+ extend: {
7
+ spacing: {
8
+ "0": "var(--ttdk-spacing-0, 0px)",
9
+ "2": "var(--ttdk-spacing-2, 2px)",
10
+ "4": "var(--ttdk-spacing-4, 4px)",
11
+ "6": "var(--ttdk-spacing-6, 6px)",
12
+ "8": "var(--ttdk-spacing-8, 8px)",
13
+ "12": "var(--ttdk-spacing-12, 12px)",
14
+ "16": "var(--ttdk-spacing-16, 16px)",
15
+ "20": "var(--ttdk-spacing-20, 20px)",
16
+ "24": "var(--ttdk-spacing-24, 24px)",
17
+ "32": "var(--ttdk-spacing-32, 32px)",
18
+ "48": "var(--ttdk-spacing-48, 48px)",
19
+ "64": "var(--ttdk-spacing-64, 64px)",
20
+ "96": "var(--ttdk-spacing-96, 96px)",
21
+ },
22
+ boxShadow: {
23
+ "ttdk-sm": "var(--ttdk-shadow-sm, 0px 1px 10px 0px rgba(0, 0, 0, 0.08))",
24
+ "ttdk-md": "var(--ttdk-shadow-md, 0px 1px 15px 0px rgba(0, 0, 0, 0.1))",
25
+ "ttdk-lg": "var(--ttdk-shadow-lg, 0px 4px 12px 0px rgba(48, 49, 53, 0.2))",
26
+ "ttdk-top": "var(--ttdk-shadow-top, 0px 4px 12px 0px rgba(48, 49, 53, 0.2))",
27
+ "ttdk-bottom": "var(--ttdk-shadow-bottom, 0px 4px 16px 0px rgba(0, 0, 0, 0.08))",
28
+ "ttdk-right": "var(--ttdk-shadow-right, 4px 0px 16px 0px rgba(0, 0, 0, 0.08))",
29
+ "ttdk-left": "var(--ttdk-shadow-left, -4px 0px 16px 0px rgba(0, 0, 0, 0.08))",
30
+ },
31
+ maxWidth: {
32
+ "ttdk-mobile": "var(--ttdk-grid-mobile-container, 328px)",
33
+ "ttdk-desktop": "var(--ttdk-grid-desktop-container, 1128px)",
34
+ },
35
+ colors: {
36
+ ttdk: {
37
+ primary: {
38
+ DEFAULT: "var(--ttdk-brand-default, #16b3ac)",
39
+ hover: "var(--ttdk-brand-strong, #128f8a)",
40
+ subtle: "var(--ttdk-brand-subtle, #b8edea)",
41
+ },
42
+ accent: {
43
+ DEFAULT: "var(--ttdk-color-brand-blue-500, #3899fe)",
44
+ hover: "var(--ttdk-color-brand-blue-600, #1e81e8)",
45
+ },
46
+ surface: {
47
+ DEFAULT: "var(--ttdk-bg-base-primary, #ffffff)",
48
+ subtle: "var(--ttdk-bg-secondary-disabled, #f1f2f3)",
49
+ dark: "var(--ttdk-color-neutral-black, #141313)",
50
+ },
51
+ border: {
52
+ DEFAULT: "var(--ttdk-stroke-subtle, #e4e5e7)",
53
+ dark: "var(--ttdk-stroke-subtle, #313336)",
54
+ },
55
+ },
56
+ },
57
+ fontFamily: {
58
+ sans: ["Manrope", "ui-sans-serif", "system-ui", "-apple-system", "sans-serif"],
59
+ },
60
+ },
61
+ },
62
+ };