@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,105 @@
1
+ <script context="module"></script>
2
+
3
+ <script>import { buildUiVars, UiProps } from "../../core/types";
4
+ export let href = void 0;
5
+ export let disabled = void 0;
6
+ export let className = void 0;
7
+ export let ariaLabel = void 0;
8
+ export let size = void 0;
9
+ export let ui = void 0;
10
+ export let onClick = void 0;
11
+ export let icon = void 0;
12
+ export let iconOnly = void 0;
13
+ export let text = void 0;
14
+ function stringifyStyles(stylesObj) {
15
+ let styles = "";
16
+ for (let key in stylesObj) {
17
+ const dashedKey = key.replace(/[A-Z]/g, function(match) {
18
+ return "-" + match.toLowerCase();
19
+ });
20
+ styles += dashedKey + ":" + stylesObj[key] + ";";
21
+ }
22
+ return styles;
23
+ }
24
+ </script>
25
+
26
+ {#if Boolean(href) && !disabled}
27
+ <a
28
+ style={stringifyStyles({
29
+ ...buildUiVars(ui),
30
+ })}
31
+ {href}
32
+ class={`ttdk-pagination-link ttdk-pagination-first ${
33
+ className || ""
34
+ }`.trim()}
35
+ aria-label={ariaLabel || "Go to first page"}
36
+ data-size={size || "md"}
37
+ data-disabled={disabled ? "true" : "false"}
38
+ on:click={(e) => {
39
+ if (disabled) {
40
+ e.preventDefault();
41
+ return;
42
+ }
43
+ if (onClick) {
44
+ onClick(e);
45
+ }
46
+ }}
47
+ >
48
+ {#if icon}
49
+ {icon}
50
+ {/if}
51
+ {#if !icon}
52
+ <svg
53
+ class="ttdk-pagination-icon"
54
+ viewBox="0 0 24 24"
55
+ fill="none"
56
+ aria-hidden="true"
57
+ ><polyline points="11 17 6 12 11 7" /><polyline
58
+ points="18 17 13 12 18 7"
59
+ /></svg
60
+ >
61
+ {/if}
62
+ {#if !iconOnly && Boolean(text)}
63
+ <span class="ttdk-pagination-first-text">{text}</span>
64
+ {/if}</a
65
+ >
66
+ {/if}
67
+
68
+ {#if !href || Boolean(disabled)}
69
+ <button
70
+ style={stringifyStyles({
71
+ ...buildUiVars(ui),
72
+ })}
73
+ type="button"
74
+ class={`ttdk-pagination-link ttdk-pagination-first ${
75
+ className || ""
76
+ }`.trim()}
77
+ aria-label={ariaLabel || "Go to first page"}
78
+ data-size={size || "md"}
79
+ data-disabled={disabled ? "true" : "false"}
80
+ {disabled}
81
+ on:click={(e) => {
82
+ if (!disabled && onClick) {
83
+ onClick(e);
84
+ }
85
+ }}
86
+ >
87
+ {#if icon}
88
+ {icon}
89
+ {/if}
90
+ {#if !icon}
91
+ <svg
92
+ class="ttdk-pagination-icon"
93
+ viewBox="0 0 24 24"
94
+ fill="none"
95
+ aria-hidden="true"
96
+ ><polyline points="11 17 6 12 11 7" /><polyline
97
+ points="18 17 13 12 18 7"
98
+ /></svg
99
+ >
100
+ {/if}
101
+ {#if !iconOnly && Boolean(text)}
102
+ <span class="ttdk-pagination-first-text">{text}</span>
103
+ {/if}</button
104
+ >
105
+ {/if}
@@ -0,0 +1,74 @@
1
+ import { SvelteComponent } from "svelte";
2
+ export interface PaginationFirstProps {
3
+ /**
4
+ * URL tujuan navigasi (jika menggunakan tautan anchor <a>).
5
+ */
6
+ href?: string;
7
+ /**
8
+ * Teks label tombol opsional.
9
+ */
10
+ text?: string;
11
+ /**
12
+ * Mode hanya menampilkan ikon tanpa teks.
13
+ * @default true
14
+ */
15
+ iconOnly?: boolean;
16
+ /**
17
+ * Menonaktifkan tombol.
18
+ * @default false
19
+ */
20
+ disabled?: boolean;
21
+ /**
22
+ * Skala ukuran tombol.
23
+ * @default 'md'
24
+ */
25
+ size?: "sm" | "md" | "lg" | "icon";
26
+ /**
27
+ * Kustomisasi visual granular tombol navigasi (UiProps).
28
+ */
29
+ ui?: UiProps;
30
+ /**
31
+ * Callback saat tombol diklik.
32
+ */
33
+ onClick?: (event?: any) => void;
34
+ /**
35
+ * Class CSS kustom.
36
+ */
37
+ className?: string;
38
+ /**
39
+ * Label aksesibilitas ARIA.
40
+ * @default 'Go to first page'
41
+ */
42
+ ariaLabel?: string;
43
+ /**
44
+ * Ikon kustom untuk tombol first page (menggantikan <<).
45
+ */
46
+ icon?: any;
47
+ }
48
+ import { UiProps } from "../../core/types";
49
+ declare const __propDef: {
50
+ props: {
51
+ href?: PaginationFirstProps["href"];
52
+ disabled?: PaginationFirstProps["disabled"];
53
+ className?: PaginationFirstProps["className"];
54
+ ariaLabel?: PaginationFirstProps["ariaLabel"];
55
+ size?: PaginationFirstProps["size"];
56
+ ui?: PaginationFirstProps["ui"];
57
+ onClick?: PaginationFirstProps["onClick"];
58
+ icon?: PaginationFirstProps["icon"];
59
+ iconOnly?: PaginationFirstProps["iconOnly"];
60
+ text?: PaginationFirstProps["text"];
61
+ };
62
+ events: {
63
+ [evt: string]: CustomEvent<any>;
64
+ };
65
+ slots: {};
66
+ exports?: {} | undefined;
67
+ bindings?: string | undefined;
68
+ };
69
+ type PaginationFirstProps_ = typeof __propDef.props;
70
+ export type PaginationFirstEvents = typeof __propDef.events;
71
+ export type PaginationFirstSlots = typeof __propDef.slots;
72
+ export default class PaginationFirst extends SvelteComponent<PaginationFirstProps_, PaginationFirstEvents, PaginationFirstSlots> {
73
+ }
74
+ export {};
@@ -0,0 +1,25 @@
1
+ <script context="module"></script>
2
+
3
+ <script>import { buildUiVars, UiProps } from "../../core/types";
4
+ export let className = void 0;
5
+ export let ui = void 0;
6
+ function stringifyStyles(stylesObj) {
7
+ let styles = "";
8
+ for (let key in stylesObj) {
9
+ const dashedKey = key.replace(/[A-Z]/g, function(match) {
10
+ return "-" + match.toLowerCase();
11
+ });
12
+ styles += dashedKey + ":" + stylesObj[key] + ";";
13
+ }
14
+ return styles;
15
+ }
16
+ </script>
17
+
18
+ <li
19
+ style={stringifyStyles({
20
+ ...buildUiVars(ui),
21
+ })}
22
+ class={`ttdk-pagination-item ${className || ""}`.trim()}
23
+ >
24
+ <slot />
25
+ </li>
@@ -0,0 +1,36 @@
1
+ import { SvelteComponent } from "svelte";
2
+ export interface PaginationItemProps {
3
+ /**
4
+ * Kustomisasi visual granular li.ttdk-pagination-item (UiProps).
5
+ */
6
+ ui?: UiProps;
7
+ /**
8
+ * Class CSS kustom.
9
+ */
10
+ className?: string;
11
+ /**
12
+ * Konten pagination item.
13
+ */
14
+ children?: any;
15
+ }
16
+ import { UiProps } from "../../core/types";
17
+ declare const __propDef: {
18
+ props: {
19
+ className?: PaginationItemProps["className"];
20
+ ui?: PaginationItemProps["ui"];
21
+ };
22
+ events: {
23
+ [evt: string]: CustomEvent<any>;
24
+ };
25
+ slots: {
26
+ default: {};
27
+ };
28
+ exports?: {} | undefined;
29
+ bindings?: string | undefined;
30
+ };
31
+ type PaginationItemProps_ = typeof __propDef.props;
32
+ export type PaginationItemEvents = typeof __propDef.events;
33
+ export type PaginationItemSlots = typeof __propDef.slots;
34
+ export default class PaginationItem extends SvelteComponent<PaginationItemProps_, PaginationItemEvents, PaginationItemSlots> {
35
+ }
36
+ export {};
@@ -0,0 +1,105 @@
1
+ <script context="module"></script>
2
+
3
+ <script>import { buildUiVars, UiProps } from "../../core/types";
4
+ export let href = void 0;
5
+ export let disabled = void 0;
6
+ export let className = void 0;
7
+ export let ariaLabel = void 0;
8
+ export let size = void 0;
9
+ export let ui = void 0;
10
+ export let onClick = void 0;
11
+ export let iconOnly = void 0;
12
+ export let text = void 0;
13
+ export let icon = void 0;
14
+ function stringifyStyles(stylesObj) {
15
+ let styles = "";
16
+ for (let key in stylesObj) {
17
+ const dashedKey = key.replace(/[A-Z]/g, function(match) {
18
+ return "-" + match.toLowerCase();
19
+ });
20
+ styles += dashedKey + ":" + stylesObj[key] + ";";
21
+ }
22
+ return styles;
23
+ }
24
+ </script>
25
+
26
+ {#if Boolean(href) && !disabled}
27
+ <a
28
+ style={stringifyStyles({
29
+ ...buildUiVars(ui),
30
+ })}
31
+ {href}
32
+ class={`ttdk-pagination-link ttdk-pagination-last ${
33
+ className || ""
34
+ }`.trim()}
35
+ aria-label={ariaLabel || "Go to last page"}
36
+ data-size={size || "md"}
37
+ data-disabled={disabled ? "true" : "false"}
38
+ on:click={(e) => {
39
+ if (disabled) {
40
+ e.preventDefault();
41
+ return;
42
+ }
43
+ if (onClick) {
44
+ onClick(e);
45
+ }
46
+ }}
47
+ >
48
+ {#if !iconOnly && Boolean(text)}
49
+ <span class="ttdk-pagination-last-text">{text}</span>
50
+ {/if}
51
+ {#if icon}
52
+ {icon}
53
+ {/if}
54
+ {#if !icon}
55
+ <svg
56
+ class="ttdk-pagination-icon"
57
+ viewBox="0 0 24 24"
58
+ fill="none"
59
+ aria-hidden="true"
60
+ ><polyline points="13 17 18 12 13 7" /><polyline
61
+ points="6 17 11 12 6 7"
62
+ /></svg
63
+ >
64
+ {/if}</a
65
+ >
66
+ {/if}
67
+
68
+ {#if !href || Boolean(disabled)}
69
+ <button
70
+ style={stringifyStyles({
71
+ ...buildUiVars(ui),
72
+ })}
73
+ type="button"
74
+ class={`ttdk-pagination-link ttdk-pagination-last ${
75
+ className || ""
76
+ }`.trim()}
77
+ aria-label={ariaLabel || "Go to last page"}
78
+ data-size={size || "md"}
79
+ data-disabled={disabled ? "true" : "false"}
80
+ {disabled}
81
+ on:click={(e) => {
82
+ if (!disabled && onClick) {
83
+ onClick(e);
84
+ }
85
+ }}
86
+ >
87
+ {#if !iconOnly && Boolean(text)}
88
+ <span class="ttdk-pagination-last-text">{text}</span>
89
+ {/if}
90
+ {#if icon}
91
+ {icon}
92
+ {/if}
93
+ {#if !icon}
94
+ <svg
95
+ class="ttdk-pagination-icon"
96
+ viewBox="0 0 24 24"
97
+ fill="none"
98
+ aria-hidden="true"
99
+ ><polyline points="13 17 18 12 13 7" /><polyline
100
+ points="6 17 11 12 6 7"
101
+ /></svg
102
+ >
103
+ {/if}</button
104
+ >
105
+ {/if}
@@ -0,0 +1,74 @@
1
+ import { SvelteComponent } from "svelte";
2
+ export interface PaginationLastProps {
3
+ /**
4
+ * URL tujuan navigasi (jika menggunakan tautan anchor <a>).
5
+ */
6
+ href?: string;
7
+ /**
8
+ * Teks label tombol opsional.
9
+ */
10
+ text?: string;
11
+ /**
12
+ * Mode hanya menampilkan ikon tanpa teks.
13
+ * @default true
14
+ */
15
+ iconOnly?: boolean;
16
+ /**
17
+ * Menonaktifkan tombol.
18
+ * @default false
19
+ */
20
+ disabled?: boolean;
21
+ /**
22
+ * Skala ukuran tombol.
23
+ * @default 'md'
24
+ */
25
+ size?: "sm" | "md" | "lg" | "icon";
26
+ /**
27
+ * Kustomisasi visual granular tombol navigasi (UiProps).
28
+ */
29
+ ui?: UiProps;
30
+ /**
31
+ * Callback saat tombol diklik.
32
+ */
33
+ onClick?: (event?: any) => void;
34
+ /**
35
+ * Class CSS kustom.
36
+ */
37
+ className?: string;
38
+ /**
39
+ * Label aksesibilitas ARIA.
40
+ * @default 'Go to last page'
41
+ */
42
+ ariaLabel?: string;
43
+ /**
44
+ * Ikon kustom untuk tombol last page (menggantikan >>).
45
+ */
46
+ icon?: any;
47
+ }
48
+ import { UiProps } from "../../core/types";
49
+ declare const __propDef: {
50
+ props: {
51
+ href?: PaginationLastProps["href"];
52
+ disabled?: PaginationLastProps["disabled"];
53
+ className?: PaginationLastProps["className"];
54
+ ariaLabel?: PaginationLastProps["ariaLabel"];
55
+ size?: PaginationLastProps["size"];
56
+ ui?: PaginationLastProps["ui"];
57
+ onClick?: PaginationLastProps["onClick"];
58
+ iconOnly?: PaginationLastProps["iconOnly"];
59
+ text?: PaginationLastProps["text"];
60
+ icon?: PaginationLastProps["icon"];
61
+ };
62
+ events: {
63
+ [evt: string]: CustomEvent<any>;
64
+ };
65
+ slots: {};
66
+ exports?: {} | undefined;
67
+ bindings?: string | undefined;
68
+ };
69
+ type PaginationLastProps_ = typeof __propDef.props;
70
+ export type PaginationLastEvents = typeof __propDef.events;
71
+ export type PaginationLastSlots = typeof __propDef.slots;
72
+ export default class PaginationLast extends SvelteComponent<PaginationLastProps_, PaginationLastEvents, PaginationLastSlots> {
73
+ }
74
+ export {};
@@ -0,0 +1,67 @@
1
+ <script context="module"></script>
2
+
3
+ <script>import { buildUiVars, UiProps } from "../../core/types";
4
+ export let href = void 0;
5
+ export let disabled = void 0;
6
+ export let className = void 0;
7
+ export let isActive = void 0;
8
+ export let ariaLabel = void 0;
9
+ export let size = void 0;
10
+ export let ui = void 0;
11
+ export let onClick = void 0;
12
+ function stringifyStyles(stylesObj) {
13
+ let styles = "";
14
+ for (let key in stylesObj) {
15
+ const dashedKey = key.replace(/[A-Z]/g, function(match) {
16
+ return "-" + match.toLowerCase();
17
+ });
18
+ styles += dashedKey + ":" + stylesObj[key] + ";";
19
+ }
20
+ return styles;
21
+ }
22
+ </script>
23
+
24
+ {#if Boolean(href) && !disabled}
25
+ <a
26
+ style={stringifyStyles({
27
+ ...buildUiVars(ui),
28
+ })}
29
+ {href}
30
+ class={`ttdk-pagination-link ${className || ""}`.trim()}
31
+ aria-current={isActive ? "page" : undefined}
32
+ aria-label={ariaLabel}
33
+ data-active={isActive ? "true" : "false"}
34
+ data-size={size || "md"}
35
+ data-disabled={disabled ? "true" : "false"}
36
+ on:click={(e) => {
37
+ if (disabled) {
38
+ e.preventDefault();
39
+ return;
40
+ }
41
+ if (onClick) {
42
+ onClick(e);
43
+ }
44
+ }}><slot /></a
45
+ >
46
+ {/if}
47
+
48
+ {#if !href || Boolean(disabled)}
49
+ <button
50
+ style={stringifyStyles({
51
+ ...buildUiVars(ui),
52
+ })}
53
+ type="button"
54
+ class={`ttdk-pagination-link ${className || ""}`.trim()}
55
+ aria-current={isActive ? "page" : undefined}
56
+ aria-label={ariaLabel}
57
+ data-active={isActive ? "true" : "false"}
58
+ data-size={size || "md"}
59
+ data-disabled={disabled ? "true" : "false"}
60
+ {disabled}
61
+ on:click={(e) => {
62
+ if (!disabled && onClick) {
63
+ onClick(e);
64
+ }
65
+ }}><slot /></button
66
+ >
67
+ {/if}
@@ -0,0 +1,69 @@
1
+ import { SvelteComponent } from "svelte";
2
+ export interface PaginationLinkProps {
3
+ /**
4
+ * Menandai item sebagai halaman yang sedang aktif saat ini.
5
+ * @default false
6
+ */
7
+ isActive?: boolean;
8
+ /**
9
+ * Menonaktifkan link atau tombol halaman.
10
+ * @default false
11
+ */
12
+ disabled?: boolean;
13
+ /**
14
+ * Ukuran link pagination.
15
+ * @default 'md'
16
+ */
17
+ size?: "sm" | "md" | "lg" | "icon";
18
+ /**
19
+ * URL tujuan navigasi (jika menggunakan tautan anchor <a>).
20
+ */
21
+ href?: string;
22
+ /**
23
+ * Kustomisasi visual granular tombol link pagination (UiProps).
24
+ */
25
+ ui?: UiProps;
26
+ /**
27
+ * Callback saat link atau tombol diklik.
28
+ */
29
+ onClick?: (event?: any) => void;
30
+ /**
31
+ * Class CSS kustom.
32
+ */
33
+ className?: string;
34
+ /**
35
+ * Label aksesibilitas ARIA.
36
+ */
37
+ ariaLabel?: string;
38
+ /**
39
+ * Konten teks atau elemen anak di dalam link pagination.
40
+ */
41
+ children?: any;
42
+ }
43
+ import { UiProps } from "../../core/types";
44
+ declare const __propDef: {
45
+ props: {
46
+ href?: PaginationLinkProps["href"];
47
+ disabled?: PaginationLinkProps["disabled"];
48
+ className?: PaginationLinkProps["className"];
49
+ isActive?: PaginationLinkProps["isActive"];
50
+ ariaLabel?: PaginationLinkProps["ariaLabel"];
51
+ size?: PaginationLinkProps["size"];
52
+ ui?: PaginationLinkProps["ui"];
53
+ onClick?: PaginationLinkProps["onClick"];
54
+ };
55
+ events: {
56
+ [evt: string]: CustomEvent<any>;
57
+ };
58
+ slots: {
59
+ default: {};
60
+ };
61
+ exports?: {} | undefined;
62
+ bindings?: string | undefined;
63
+ };
64
+ type PaginationLinkProps_ = typeof __propDef.props;
65
+ export type PaginationLinkEvents = typeof __propDef.events;
66
+ export type PaginationLinkSlots = typeof __propDef.slots;
67
+ export default class PaginationLink extends SvelteComponent<PaginationLinkProps_, PaginationLinkEvents, PaginationLinkSlots> {
68
+ }
69
+ export {};
@@ -0,0 +1,99 @@
1
+ <script context="module"></script>
2
+
3
+ <script>import { buildUiVars, UiProps } from "../../core/types";
4
+ export let href = void 0;
5
+ export let disabled = void 0;
6
+ export let className = void 0;
7
+ export let ariaLabel = void 0;
8
+ export let size = void 0;
9
+ export let ui = void 0;
10
+ export let onClick = void 0;
11
+ export let iconOnly = void 0;
12
+ export let text = void 0;
13
+ export let icon = void 0;
14
+ function stringifyStyles(stylesObj) {
15
+ let styles = "";
16
+ for (let key in stylesObj) {
17
+ const dashedKey = key.replace(/[A-Z]/g, function(match) {
18
+ return "-" + match.toLowerCase();
19
+ });
20
+ styles += dashedKey + ":" + stylesObj[key] + ";";
21
+ }
22
+ return styles;
23
+ }
24
+ </script>
25
+
26
+ {#if Boolean(href) && !disabled}
27
+ <a
28
+ style={stringifyStyles({
29
+ ...buildUiVars(ui),
30
+ })}
31
+ {href}
32
+ class={`ttdk-pagination-link ttdk-pagination-next ${
33
+ className || ""
34
+ }`.trim()}
35
+ aria-label={ariaLabel || "Go to next page"}
36
+ data-size={size || "md"}
37
+ data-disabled={disabled ? "true" : "false"}
38
+ on:click={(e) => {
39
+ if (disabled) {
40
+ e.preventDefault();
41
+ return;
42
+ }
43
+ if (onClick) {
44
+ onClick(e);
45
+ }
46
+ }}
47
+ >
48
+ {#if !iconOnly}
49
+ <span class="ttdk-pagination-next-text">{text || "Next"}</span>
50
+ {/if}
51
+ {#if icon}
52
+ {icon}
53
+ {/if}
54
+ {#if !icon}
55
+ <svg
56
+ class="ttdk-pagination-icon"
57
+ viewBox="0 0 24 24"
58
+ fill="none"
59
+ aria-hidden="true"><polyline points="9 18 15 12 9 6" /></svg
60
+ >
61
+ {/if}</a
62
+ >
63
+ {/if}
64
+
65
+ {#if !href || Boolean(disabled)}
66
+ <button
67
+ style={stringifyStyles({
68
+ ...buildUiVars(ui),
69
+ })}
70
+ type="button"
71
+ class={`ttdk-pagination-link ttdk-pagination-next ${
72
+ className || ""
73
+ }`.trim()}
74
+ aria-label={ariaLabel || "Go to next page"}
75
+ data-size={size || "md"}
76
+ data-disabled={disabled ? "true" : "false"}
77
+ {disabled}
78
+ on:click={(e) => {
79
+ if (!disabled && onClick) {
80
+ onClick(e);
81
+ }
82
+ }}
83
+ >
84
+ {#if !iconOnly}
85
+ <span class="ttdk-pagination-next-text">{text || "Next"}</span>
86
+ {/if}
87
+ {#if icon}
88
+ {icon}
89
+ {/if}
90
+ {#if !icon}
91
+ <svg
92
+ class="ttdk-pagination-icon"
93
+ viewBox="0 0 24 24"
94
+ fill="none"
95
+ aria-hidden="true"><polyline points="9 18 15 12 9 6" /></svg
96
+ >
97
+ {/if}</button
98
+ >
99
+ {/if}