@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.
- package/AI_GUIDE.md +6518 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.js +2 -0
- package/dist/core/tailwind-preset.cjs +62 -0
- package/dist/core/tailwind-preset.d.cts +63 -0
- package/dist/core/tailwind-preset.d.ts +74 -0
- package/dist/core/tailwind-preset.js +79 -0
- package/dist/core/theme/tokens.css +663 -0
- package/dist/core/types.d.ts +152 -0
- package/dist/core/types.js +735 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +15 -0
- package/dist/tailwind-preset.cjs +62 -0
- package/dist/tailwind-preset.d.cts +63 -0
- package/dist/tailwind-preset.d.ts +74 -0
- package/dist/tailwind-preset.js +79 -0
- package/dist/types.d.ts +1 -0
- package/dist/types.js +1 -0
- package/dist/web/accordion/AI_GUIDE.md +149 -0
- package/dist/web/accordion/accordion.css +1 -0
- package/dist/web/accordion/accordion.svelte +217 -0
- package/dist/web/accordion/accordion.svelte.d.ts +224 -0
- package/dist/web/accordion/index.d.ts +2 -0
- package/dist/web/accordion/index.js +2 -0
- package/dist/web/accordion/manifest.json +351 -0
- package/dist/web/alert/AI_GUIDE.md +139 -0
- package/dist/web/alert/alert.css +1 -0
- package/dist/web/alert/alert.svelte +175 -0
- package/dist/web/alert/alert.svelte.d.ts +165 -0
- package/dist/web/alert/index.d.ts +2 -0
- package/dist/web/alert/index.js +2 -0
- package/dist/web/alert/manifest.json +240 -0
- package/dist/web/avatar/AI_GUIDE.md +118 -0
- package/dist/web/avatar/avatar.css +1 -0
- package/dist/web/avatar/avatar.svelte +108 -0
- package/dist/web/avatar/avatar.svelte.d.ts +147 -0
- package/dist/web/avatar/index.d.ts +2 -0
- package/dist/web/avatar/index.js +2 -0
- package/dist/web/avatar/manifest.json +195 -0
- package/dist/web/badge/AI_GUIDE.md +94 -0
- package/dist/web/badge/badge.css +1 -0
- package/dist/web/badge/badge.svelte +50 -0
- package/dist/web/badge/badge.svelte.d.ts +111 -0
- package/dist/web/badge/index.d.ts +2 -0
- package/dist/web/badge/index.js +2 -0
- package/dist/web/badge/manifest.json +141 -0
- package/dist/web/banner/AI_GUIDE.md +130 -0
- package/dist/web/banner/banner.css +1 -0
- package/dist/web/banner/banner.svelte +180 -0
- package/dist/web/banner/banner.svelte.d.ts +172 -0
- package/dist/web/banner/index.d.ts +2 -0
- package/dist/web/banner/index.js +2 -0
- package/dist/web/banner/manifest.json +240 -0
- package/dist/web/breadcrumb/AI_GUIDE.md +120 -0
- package/dist/web/breadcrumb/breadcrumb.css +1 -0
- package/dist/web/breadcrumb/breadcrumb.svelte +168 -0
- package/dist/web/breadcrumb/breadcrumb.svelte.d.ts +141 -0
- package/dist/web/breadcrumb/index.d.ts +2 -0
- package/dist/web/breadcrumb/index.js +2 -0
- package/dist/web/breadcrumb/manifest.json +225 -0
- package/dist/web/button/AI_GUIDE.md +121 -0
- package/dist/web/button/button.css +1 -0
- package/dist/web/button/button.svelte +154 -0
- package/dist/web/button/button.svelte.d.ts +159 -0
- package/dist/web/button/index.d.ts +2 -0
- package/dist/web/button/index.js +2 -0
- package/dist/web/button/manifest.json +177 -0
- package/dist/web/calendar/AI_GUIDE.md +151 -0
- package/dist/web/calendar/calendar.css +1 -0
- package/dist/web/calendar/calendar.svelte +1091 -0
- package/dist/web/calendar/calendar.svelte.d.ts +268 -0
- package/dist/web/calendar/index.d.ts +2 -0
- package/dist/web/calendar/index.js +2 -0
- package/dist/web/calendar/manifest.json +470 -0
- package/dist/web/card/AI_GUIDE.md +133 -0
- package/dist/web/card/card.css +1 -0
- package/dist/web/card/card.svelte +217 -0
- package/dist/web/card/card.svelte.d.ts +242 -0
- package/dist/web/card/index.d.ts +2 -0
- package/dist/web/card/index.js +2 -0
- package/dist/web/card/manifest.json +357 -0
- package/dist/web/checkbox/AI_GUIDE.md +146 -0
- package/dist/web/checkbox/checkbox.css +1 -0
- package/dist/web/checkbox/checkbox.svelte +131 -0
- package/dist/web/checkbox/checkbox.svelte.d.ts +199 -0
- package/dist/web/checkbox/index.d.ts +2 -0
- package/dist/web/checkbox/index.js +2 -0
- package/dist/web/checkbox/manifest.json +294 -0
- package/dist/web/chip/AI_GUIDE.md +186 -0
- package/dist/web/chip/chip.css +1 -0
- package/dist/web/chip/chip.svelte +113 -0
- package/dist/web/chip/chip.svelte.d.ts +145 -0
- package/dist/web/chip/index.d.ts +2 -0
- package/dist/web/chip/index.js +2 -0
- package/dist/web/chip/manifest.json +186 -0
- package/dist/web/dropdown/AI_GUIDE.md +167 -0
- package/dist/web/dropdown/dropdown.css +1 -0
- package/dist/web/dropdown/dropdown.svelte +844 -0
- package/dist/web/dropdown/dropdown.svelte.d.ts +361 -0
- package/dist/web/dropdown/index.d.ts +2 -0
- package/dist/web/dropdown/index.js +2 -0
- package/dist/web/dropdown/manifest.json +576 -0
- package/dist/web/flex/AI_GUIDE.md +113 -0
- package/dist/web/flex/flex-item.svelte +37 -0
- package/dist/web/flex/flex-item.svelte.d.ts +96 -0
- package/dist/web/flex/flex.css +1 -0
- package/dist/web/flex/flex.svelte +39 -0
- package/dist/web/flex/flex.svelte.d.ts +104 -0
- package/dist/web/flex/index.d.ts +3 -0
- package/dist/web/flex/index.js +3 -0
- package/dist/web/flex/manifest.json +162 -0
- package/dist/web/form/index.d.ts +1 -0
- package/dist/web/form/index.js +2 -0
- package/dist/web/grid/AI_GUIDE.md +112 -0
- package/dist/web/grid/grid-item.svelte +41 -0
- package/dist/web/grid/grid-item.svelte.d.ts +112 -0
- package/dist/web/grid/grid.css +1 -0
- package/dist/web/grid/grid.svelte +37 -0
- package/dist/web/grid/grid.svelte.d.ts +96 -0
- package/dist/web/grid/index.d.ts +3 -0
- package/dist/web/grid/index.js +3 -0
- package/dist/web/grid/manifest.json +153 -0
- package/dist/web/index.d.ts +58 -0
- package/dist/web/index.js +57 -0
- package/dist/web/input/AI_GUIDE.md +159 -0
- package/dist/web/input/index.d.ts +2 -0
- package/dist/web/input/index.js +2 -0
- package/dist/web/input/input.css +1 -0
- package/dist/web/input/input.svelte +283 -0
- package/dist/web/input/input.svelte.d.ts +283 -0
- package/dist/web/input/manifest.json +465 -0
- package/dist/web/input-number/AI_GUIDE.md +164 -0
- package/dist/web/input-number/index.d.ts +2 -0
- package/dist/web/input-number/index.js +2 -0
- package/dist/web/input-number/input-number.css +1 -0
- package/dist/web/input-number/input-number.svelte +783 -0
- package/dist/web/input-number/input-number.svelte.d.ts +352 -0
- package/dist/web/input-number/manifest.json +575 -0
- package/dist/web/modal/AI_GUIDE.md +171 -0
- package/dist/web/modal/index.d.ts +2 -0
- package/dist/web/modal/index.js +2 -0
- package/dist/web/modal/manifest.json +375 -0
- package/dist/web/modal/modal.css +1 -0
- package/dist/web/modal/modal.svelte +333 -0
- package/dist/web/modal/modal.svelte.d.ts +231 -0
- package/dist/web/pagination/AI_GUIDE.md +148 -0
- package/dist/web/pagination/index.d.ts +19 -0
- package/dist/web/pagination/index.js +19 -0
- package/dist/web/pagination/manifest.json +432 -0
- package/dist/web/pagination/pagination-content.svelte +25 -0
- package/dist/web/pagination/pagination-content.svelte.d.ts +36 -0
- package/dist/web/pagination/pagination-ellipsis.svelte +38 -0
- package/dist/web/pagination/pagination-ellipsis.svelte.d.ts +35 -0
- package/dist/web/pagination/pagination-first.svelte +105 -0
- package/dist/web/pagination/pagination-first.svelte.d.ts +74 -0
- package/dist/web/pagination/pagination-item.svelte +25 -0
- package/dist/web/pagination/pagination-item.svelte.d.ts +36 -0
- package/dist/web/pagination/pagination-last.svelte +105 -0
- package/dist/web/pagination/pagination-last.svelte.d.ts +74 -0
- package/dist/web/pagination/pagination-link.svelte +67 -0
- package/dist/web/pagination/pagination-link.svelte.d.ts +69 -0
- package/dist/web/pagination/pagination-next.svelte +99 -0
- package/dist/web/pagination/pagination-next.svelte.d.ts +75 -0
- package/dist/web/pagination/pagination-previous.svelte +99 -0
- package/dist/web/pagination/pagination-previous.svelte.d.ts +75 -0
- package/dist/web/pagination/pagination.css +1 -0
- package/dist/web/pagination/pagination.svelte +471 -0
- package/dist/web/pagination/pagination.svelte.d.ts +256 -0
- package/dist/web/popover/AI_GUIDE.md +163 -0
- package/dist/web/popover/index.d.ts +3 -0
- package/dist/web/popover/index.js +3 -0
- package/dist/web/popover/manifest.json +396 -0
- package/dist/web/popover/popover.css +1 -0
- package/dist/web/popover/popover.svelte +497 -0
- package/dist/web/popover/popover.svelte.d.ts +116 -0
- package/dist/web/radio/AI_GUIDE.md +155 -0
- package/dist/web/radio/index.d.ts +2 -0
- package/dist/web/radio/index.js +2 -0
- package/dist/web/radio/manifest.json +294 -0
- package/dist/web/radio/radio.css +1 -0
- package/dist/web/radio/radio.svelte +123 -0
- package/dist/web/radio/radio.svelte.d.ts +192 -0
- package/dist/web/selectbox/AI_GUIDE.md +216 -0
- package/dist/web/selectbox/index.d.ts +2 -0
- package/dist/web/selectbox/index.js +2 -0
- package/dist/web/selectbox/manifest.json +477 -0
- package/dist/web/selectbox/selectbox.css +1 -0
- package/dist/web/selectbox/selectbox.svelte +704 -0
- package/dist/web/selectbox/selectbox.svelte.d.ts +296 -0
- package/dist/web/sonner/AI_GUIDE.md +98 -0
- package/dist/web/sonner/index.d.ts +46 -0
- package/dist/web/sonner/index.js +64 -0
- package/dist/web/sonner/manifest.json +132 -0
- package/dist/web/sonner/sonner.css +1 -0
- package/dist/web/sonner/sonner.svelte +85 -0
- package/dist/web/sonner/sonner.svelte.d.ts +105 -0
- package/dist/web/table/AI_GUIDE.md +145 -0
- package/dist/web/table/index.d.ts +21 -0
- package/dist/web/table/index.js +22 -0
- package/dist/web/table/manifest.json +168 -0
- package/dist/web/table/table-body.svelte +23 -0
- package/dist/web/table/table-body.svelte.d.ts +36 -0
- package/dist/web/table/table-caption.svelte +23 -0
- package/dist/web/table/table-caption.svelte.d.ts +36 -0
- package/dist/web/table/table-cell.svelte +35 -0
- package/dist/web/table/table-cell.svelte.d.ts +57 -0
- package/dist/web/table/table-empty.svelte +56 -0
- package/dist/web/table/table-empty.svelte.d.ts +65 -0
- package/dist/web/table/table-footer.svelte +23 -0
- package/dist/web/table/table-footer.svelte.d.ts +36 -0
- package/dist/web/table/table-head.svelte +39 -0
- package/dist/web/table/table-head.svelte.d.ts +58 -0
- package/dist/web/table/table-header.svelte +23 -0
- package/dist/web/table/table-header.svelte.d.ts +36 -0
- package/dist/web/table/table-row.svelte +33 -0
- package/dist/web/table/table-row.svelte.d.ts +52 -0
- package/dist/web/table/table.css +1 -0
- package/dist/web/table/table.svelte +178 -0
- package/dist/web/table/table.svelte.d.ts +120 -0
- package/dist/web/tabs/AI_GUIDE.md +150 -0
- package/dist/web/tabs/index.d.ts +2 -0
- package/dist/web/tabs/index.js +2 -0
- package/dist/web/tabs/manifest.json +315 -0
- package/dist/web/tabs/tabs.css +1 -0
- package/dist/web/tabs/tabs.svelte +138 -0
- package/dist/web/tabs/tabs.svelte.d.ts +204 -0
- package/dist/web/text/AI_GUIDE.md +129 -0
- package/dist/web/text/index.d.ts +2 -0
- package/dist/web/text/index.js +2 -0
- package/dist/web/text/manifest.json +195 -0
- package/dist/web/text/text.css +1 -0
- package/dist/web/text/text.svelte +515 -0
- package/dist/web/text/text.svelte.d.ts +168 -0
- package/dist/web/textarea/AI_GUIDE.md +141 -0
- package/dist/web/textarea/index.d.ts +2 -0
- package/dist/web/textarea/index.js +2 -0
- package/dist/web/textarea/manifest.json +438 -0
- package/dist/web/textarea/textarea.css +1 -0
- package/dist/web/textarea/textarea.svelte +224 -0
- package/dist/web/textarea/textarea.svelte.d.ts +274 -0
- package/dist/web/tooltip/AI_GUIDE.md +110 -0
- package/dist/web/tooltip/index.d.ts +2 -0
- package/dist/web/tooltip/index.js +2 -0
- package/dist/web/tooltip/manifest.json +222 -0
- package/dist/web/tooltip/tooltip.css +1 -0
- package/dist/web/tooltip/tooltip.svelte +292 -0
- package/dist/web/tooltip/tooltip.svelte.d.ts +140 -0
- package/dist/webview/bottomsheet/AI_GUIDE.md +141 -0
- package/dist/webview/bottomsheet/bottomsheet.css +1 -0
- package/dist/webview/bottomsheet/bottomsheet.svelte +462 -0
- package/dist/webview/bottomsheet/bottomsheet.svelte.d.ts +200 -0
- package/dist/webview/bottomsheet/index.d.ts +4 -0
- package/dist/webview/bottomsheet/index.js +3 -0
- package/dist/webview/bottomsheet/manifest.json +377 -0
- package/dist/webview/button/AI_GUIDE.md +79 -0
- package/dist/webview/button/button-ios.css +1 -0
- package/dist/webview/button/button-ios.svelte +58 -0
- package/dist/webview/button/button-ios.svelte.d.ts +114 -0
- package/dist/webview/button/button-material.css +1 -0
- package/dist/webview/button/button-material.svelte +58 -0
- package/dist/webview/button/button-material.svelte.d.ts +114 -0
- package/dist/webview/button/index.d.ts +6 -0
- package/dist/webview/button/index.js +4 -0
- package/dist/webview/button/manifest.json +148 -0
- package/dist/webview/index.d.ts +6 -0
- package/dist/webview/index.js +6 -0
- package/llms.txt +6518 -0
- package/package.json +709 -4
- package/ttdk-manifest.json +10188 -0
- package/README.md +0 -3
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<script context="module"></script>
|
|
2
|
+
|
|
3
|
+
<script>import { onMount } from "svelte";
|
|
4
|
+
import toast from "sonner-js";
|
|
5
|
+
export let theme = void 0;
|
|
6
|
+
export let expand = void 0;
|
|
7
|
+
export let visibleToasts = void 0;
|
|
8
|
+
export let gap = void 0;
|
|
9
|
+
export let offset = void 0;
|
|
10
|
+
export let mobileOffset = void 0;
|
|
11
|
+
export let dir = void 0;
|
|
12
|
+
export let position = void 0;
|
|
13
|
+
export let closeButton = void 0;
|
|
14
|
+
export let richColors = void 0;
|
|
15
|
+
export let duration = void 0;
|
|
16
|
+
export let className = void 0;
|
|
17
|
+
function stringifyStyles(stylesObj) {
|
|
18
|
+
let styles = "";
|
|
19
|
+
for (let key in stylesObj) {
|
|
20
|
+
const dashedKey = key.replace(/[A-Z]/g, function(match) {
|
|
21
|
+
return "-" + match.toLowerCase();
|
|
22
|
+
});
|
|
23
|
+
styles += dashedKey + ":" + stylesObj[key] + ";";
|
|
24
|
+
}
|
|
25
|
+
return styles;
|
|
26
|
+
}
|
|
27
|
+
onMount(() => {
|
|
28
|
+
toast.config({
|
|
29
|
+
theme: theme === "dark" ? "dark" : "light",
|
|
30
|
+
expand: expand ?? false,
|
|
31
|
+
visibleToasts: visibleToasts ?? 3,
|
|
32
|
+
gap: gap ?? 14,
|
|
33
|
+
offset: offset ?? 24,
|
|
34
|
+
mobileOffset: mobileOffset ?? 16,
|
|
35
|
+
dir: dir ?? "ltr",
|
|
36
|
+
toastOptions: {
|
|
37
|
+
position: position ?? "bottom-right",
|
|
38
|
+
closeButton: closeButton ?? true,
|
|
39
|
+
richColors: richColors ?? true,
|
|
40
|
+
duration: duration ?? 4e3
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
function onUpdateFn_0(..._args) {
|
|
45
|
+
toast.config({
|
|
46
|
+
theme: theme === "dark" ? "dark" : "light",
|
|
47
|
+
expand: expand ?? false,
|
|
48
|
+
visibleToasts: visibleToasts ?? 3,
|
|
49
|
+
gap: gap ?? 14,
|
|
50
|
+
offset: offset ?? 24,
|
|
51
|
+
mobileOffset: mobileOffset ?? 16,
|
|
52
|
+
dir: dir ?? "ltr",
|
|
53
|
+
toastOptions: {
|
|
54
|
+
position: position ?? "bottom-right",
|
|
55
|
+
closeButton: closeButton ?? true,
|
|
56
|
+
richColors: richColors ?? true,
|
|
57
|
+
duration: duration ?? 4e3
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
$:
|
|
62
|
+
onUpdateFn_0(
|
|
63
|
+
...[
|
|
64
|
+
position,
|
|
65
|
+
richColors,
|
|
66
|
+
closeButton,
|
|
67
|
+
theme,
|
|
68
|
+
expand,
|
|
69
|
+
duration,
|
|
70
|
+
visibleToasts,
|
|
71
|
+
gap,
|
|
72
|
+
offset,
|
|
73
|
+
mobileOffset,
|
|
74
|
+
dir
|
|
75
|
+
]
|
|
76
|
+
);
|
|
77
|
+
</script>
|
|
78
|
+
|
|
79
|
+
<div
|
|
80
|
+
style={stringifyStyles({
|
|
81
|
+
display: "none",
|
|
82
|
+
})}
|
|
83
|
+
aria-hidden="true"
|
|
84
|
+
class={`ttdk-sonner-wrapper ${className || ""}`}
|
|
85
|
+
/>
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
export type SonnerPosition = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
|
|
3
|
+
export type SonnerTheme = "light" | "dark" | "system";
|
|
4
|
+
export interface SonnerProps {
|
|
5
|
+
/**
|
|
6
|
+
* Posisi penempatan toast pada layar.
|
|
7
|
+
* - `'top-left'`, `'top-center'`, `'top-right'`
|
|
8
|
+
* - `'bottom-left'`, `'bottom-center'`, `'bottom-right'`
|
|
9
|
+
*
|
|
10
|
+
* @default 'bottom-right'
|
|
11
|
+
*/
|
|
12
|
+
position?: "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
|
|
13
|
+
/**
|
|
14
|
+
* Menampilkan warna semantik kaya (*rich colors*) untuk jenis status (sukses hijau, error merah, info biru, warning kuning).
|
|
15
|
+
*
|
|
16
|
+
* @default true
|
|
17
|
+
*/
|
|
18
|
+
richColors?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Menampilkan tombol silang penutup (*close button*) pada setiap kartu toast.
|
|
21
|
+
*
|
|
22
|
+
* @default true
|
|
23
|
+
*/
|
|
24
|
+
closeButton?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Menentukan tema visual kontainer toast (`'light'`, `'dark'`, atau `'system'`).
|
|
27
|
+
*
|
|
28
|
+
* @default 'light'
|
|
29
|
+
*/
|
|
30
|
+
theme?: "light" | "dark" | "system";
|
|
31
|
+
/**
|
|
32
|
+
* Membuka semua tumpukan toast secara melebar (*expanded*) secara default saat muncul.
|
|
33
|
+
*
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
expand?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Durasi tampilan toast dalam milidetik sebelum otomatis menghilang.
|
|
39
|
+
*
|
|
40
|
+
* @default 4000
|
|
41
|
+
*/
|
|
42
|
+
duration?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Jumlah maksimum kartu toast yang terlihat bertumpuk secara bersamaan di layar.
|
|
45
|
+
*
|
|
46
|
+
* @default 3
|
|
47
|
+
*/
|
|
48
|
+
visibleToasts?: number;
|
|
49
|
+
/**
|
|
50
|
+
* Jarak vertikal antar kartu toast dalam piksel.
|
|
51
|
+
*
|
|
52
|
+
* @default 14
|
|
53
|
+
*/
|
|
54
|
+
gap?: number;
|
|
55
|
+
/**
|
|
56
|
+
* Jarak offset tepi layar dalam piksel.
|
|
57
|
+
*
|
|
58
|
+
* @default 24
|
|
59
|
+
*/
|
|
60
|
+
offset?: number;
|
|
61
|
+
/**
|
|
62
|
+
* Jarak offset pada perangkat seluler / mobile dalam piksel.
|
|
63
|
+
*
|
|
64
|
+
* @default 16
|
|
65
|
+
*/
|
|
66
|
+
mobileOffset?: number;
|
|
67
|
+
/**
|
|
68
|
+
* Arah teks layout tata letak (`'ltr'` atau `'rtl'`).
|
|
69
|
+
*
|
|
70
|
+
* @default 'ltr'
|
|
71
|
+
*/
|
|
72
|
+
dir?: "ltr" | "rtl";
|
|
73
|
+
/**
|
|
74
|
+
* Kelas CSS kustom tambahan untuk wadah toaster.
|
|
75
|
+
*/
|
|
76
|
+
className?: string;
|
|
77
|
+
}
|
|
78
|
+
declare const __propDef: {
|
|
79
|
+
props: {
|
|
80
|
+
theme?: SonnerProps["theme"];
|
|
81
|
+
expand?: SonnerProps["expand"];
|
|
82
|
+
visibleToasts?: SonnerProps["visibleToasts"];
|
|
83
|
+
gap?: SonnerProps["gap"];
|
|
84
|
+
offset?: SonnerProps["offset"];
|
|
85
|
+
mobileOffset?: SonnerProps["mobileOffset"];
|
|
86
|
+
dir?: SonnerProps["dir"];
|
|
87
|
+
position?: SonnerProps["position"];
|
|
88
|
+
closeButton?: SonnerProps["closeButton"];
|
|
89
|
+
richColors?: SonnerProps["richColors"];
|
|
90
|
+
duration?: SonnerProps["duration"];
|
|
91
|
+
className?: SonnerProps["className"];
|
|
92
|
+
};
|
|
93
|
+
events: {
|
|
94
|
+
[evt: string]: CustomEvent<any>;
|
|
95
|
+
};
|
|
96
|
+
slots: {};
|
|
97
|
+
exports?: {} | undefined;
|
|
98
|
+
bindings?: string | undefined;
|
|
99
|
+
};
|
|
100
|
+
type SonnerProps_ = typeof __propDef.props;
|
|
101
|
+
export type SonnerEvents = typeof __propDef.events;
|
|
102
|
+
export type SonnerSlots = typeof __propDef.slots;
|
|
103
|
+
export default class Sonner extends SvelteComponent<SonnerProps_, SonnerEvents, SonnerSlots> {
|
|
104
|
+
}
|
|
105
|
+
export {};
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# <Table /> — TTDK Component Reference
|
|
2
|
+
|
|
3
|
+
Komponen kontainer utama tabel (Compound Table ala Shadcn UI).
|
|
4
|
+
|
|
5
|
+
## 1. Stylesheets & Theming (Pure CSS)
|
|
6
|
+
Import the corresponding stylesheet for the theme you wish to use:
|
|
7
|
+
- **COMMON Theme**: `import "@ttdk-design-system/library-<react|vue|svelte>/web/table/table.css";`
|
|
8
|
+
|
|
9
|
+
## 2. Subpath Component Import
|
|
10
|
+
```ts
|
|
11
|
+
// React
|
|
12
|
+
import Table from "@ttdk-design-system/library-react/web/table";
|
|
13
|
+
|
|
14
|
+
// Vue 3
|
|
15
|
+
import Table from "@ttdk-design-system/library-vue/web/table";
|
|
16
|
+
|
|
17
|
+
// Svelte
|
|
18
|
+
import Table from "@ttdk-design-system/library-svelte/web/table";
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## 3. Props & API Reference
|
|
22
|
+
|
|
23
|
+
| Prop | Type | Default | Description |
|
|
24
|
+
| :--- | :--- | :--- | :--- |
|
|
25
|
+
| `variant?` | `'default' | 'striped' | 'clean'` | `default` | Varian tampilan visual tabel. - `'default'`: Tampilan standar dengan latar bersih dan bingkai kartu. - `'striped'`: Tampilan selang-seling (zebra). - `'clean'`: Tampilan minimalis tanpa border luar dan tanpa shadow. |
|
|
26
|
+
| `size?` | `'sm' | 'md' | 'lg'` | `md` | Kerapatan / ukuran tinggi baris tabel. - `'sm'`: Kompak (padat). - `'md'`: Standar. - `'lg'`: Lega. |
|
|
27
|
+
| `rounded?` | `'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full' | (string & {}) | number` | `sm` | Sudut kelengkungan radius tabel. - Preset: `'none'` | `'xs'` | `'sm'` | `'md'` | `'lg'` | `'xl'` | `'full'` - Nilai custom: `'12px'`, `'1rem'`, atau angka `12` |
|
|
28
|
+
| `shadow?` | `'none' | 'sm' | 'md' | 'lg' | (string & {})` | `sm` | Bayangan elevasi kontainer tabel. - Preset: `'none'` | `'sm'` | `'md'` | `'lg'` - Nilai custom: CSS box-shadow string (contoh: `'0 4px 20px rgba(0,0,0,0.1)'`) |
|
|
29
|
+
| `minWidth?` | `string | number` | `-` | Lebar minimum elemen table di dalam wrapper untuk menjaga susunan kolom dan memicu horizontal scroll. Contoh: `700`, `'700px'`, `'max-content'` |
|
|
30
|
+
| `maxHeight?` | `string | number` | `-` | Ketinggian maksimum kontainer tabel untuk memicu scroll vertikal internal (sangat direkomendasikan saat stickyHeader aktif). Contoh: `280`, `'280px'`, `'50vh'` |
|
|
31
|
+
| `hoverable?` | `boolean` | `true` | Efek hover saat kursor melayang di atas baris tabel. |
|
|
32
|
+
| `stickyHeader?` | `boolean` | `false` | Membuat header tabel menempel di atas (sticky) saat konten di-scroll. |
|
|
33
|
+
| `loading?` | `boolean` | `false` | Menampilkan spinner loading overlay di atas tabel. |
|
|
34
|
+
| `caption?` | `string` | `-` | Teks caption aksesibilitas untuk tabel (dirender sebagai elemen `<caption>`). |
|
|
35
|
+
| `style?` | `any` | `-` | Inline CSS style object native. |
|
|
36
|
+
| `ui?` | `UiProps` | `-` | Kustomisasi visual granular root kontainer wrapper (.ttdk-table-wrapper) melalui UiProps. |
|
|
37
|
+
| `tableStyle?` | `UiProps` | `-` | Style kustom untuk elemen table (table.ttdk-table) melalui UiProps. |
|
|
38
|
+
| `tableClass?` | `string` | `-` | Class CSS kustom untuk elemen table (table.ttdk-table). |
|
|
39
|
+
| `className?` | `string` | `-` | Class CSS kustom untuk kontainer wrapper luar. |
|
|
40
|
+
| `children?` | `any` | `-` | Konten anak (TableHeader, TableBody, TableFooter, TableCaption). |
|
|
41
|
+
|
|
42
|
+
## 4. Usage Examples
|
|
43
|
+
|
|
44
|
+
### React Example
|
|
45
|
+
```tsx
|
|
46
|
+
import Table from "@ttdk-design-system/library-react/table";
|
|
47
|
+
import "@ttdk-design-system/library-react/table/table.css";
|
|
48
|
+
|
|
49
|
+
export function Example() {
|
|
50
|
+
return (
|
|
51
|
+
<Table variant="striped" size="md">
|
|
52
|
+
<thead>
|
|
53
|
+
<tr>
|
|
54
|
+
<th>Kode Faskes</th>
|
|
55
|
+
<th>Nama Fasilitas</th>
|
|
56
|
+
<th>Jenis</th>
|
|
57
|
+
<th>Status</th>
|
|
58
|
+
</tr>
|
|
59
|
+
</thead>
|
|
60
|
+
<tbody>
|
|
61
|
+
<tr>
|
|
62
|
+
<td>P320101</td>
|
|
63
|
+
<td>Puskesmas Cibinong</td>
|
|
64
|
+
<td>Puskesmas</td>
|
|
65
|
+
<td>Aktif</td>
|
|
66
|
+
</tr>
|
|
67
|
+
<tr>
|
|
68
|
+
<td>RS320102</td>
|
|
69
|
+
<td>RSUD Ciawi</td>
|
|
70
|
+
<td>Rumah Sakit</td>
|
|
71
|
+
<td>Aktif</td>
|
|
72
|
+
</tr>
|
|
73
|
+
</tbody>
|
|
74
|
+
</Table>
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Vue 3 Example
|
|
80
|
+
```vue
|
|
81
|
+
<script setup lang="ts">
|
|
82
|
+
import Table from "@ttdk-design-system/library-vue/table";
|
|
83
|
+
import "@ttdk-design-system/library-vue/table/table.css";
|
|
84
|
+
</script>
|
|
85
|
+
|
|
86
|
+
<template>
|
|
87
|
+
<Table variant="striped" size="md">
|
|
88
|
+
<thead>
|
|
89
|
+
<tr>
|
|
90
|
+
<th>Kode Faskes</th>
|
|
91
|
+
<th>Nama Fasilitas</th>
|
|
92
|
+
<th>Jenis</th>
|
|
93
|
+
<th>Status</th>
|
|
94
|
+
</tr>
|
|
95
|
+
</thead>
|
|
96
|
+
<tbody>
|
|
97
|
+
<tr>
|
|
98
|
+
<td>P320101</td>
|
|
99
|
+
<td>Puskesmas Cibinong</td>
|
|
100
|
+
<td>Puskesmas</td>
|
|
101
|
+
<td>Aktif</td>
|
|
102
|
+
</tr>
|
|
103
|
+
<tr>
|
|
104
|
+
<td>RS320102</td>
|
|
105
|
+
<td>RSUD Ciawi</td>
|
|
106
|
+
<td>Rumah Sakit</td>
|
|
107
|
+
<td>Aktif</td>
|
|
108
|
+
</tr>
|
|
109
|
+
</tbody>
|
|
110
|
+
</Table>
|
|
111
|
+
</template>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Svelte Example
|
|
115
|
+
```svelte
|
|
116
|
+
<script lang="ts">
|
|
117
|
+
import Table from "@ttdk-design-system/library-svelte/table";
|
|
118
|
+
import "@ttdk-design-system/library-svelte/table/table.css";
|
|
119
|
+
</script>
|
|
120
|
+
|
|
121
|
+
<Table variant="striped" size="md">
|
|
122
|
+
<thead>
|
|
123
|
+
<tr>
|
|
124
|
+
<th>Kode Faskes</th>
|
|
125
|
+
<th>Nama Fasilitas</th>
|
|
126
|
+
<th>Jenis</th>
|
|
127
|
+
<th>Status</th>
|
|
128
|
+
</tr>
|
|
129
|
+
</thead>
|
|
130
|
+
<tbody>
|
|
131
|
+
<tr>
|
|
132
|
+
<td>P320101</td>
|
|
133
|
+
<td>Puskesmas Cibinong</td>
|
|
134
|
+
<td>Puskesmas</td>
|
|
135
|
+
<td>Aktif</td>
|
|
136
|
+
</tr>
|
|
137
|
+
<tr>
|
|
138
|
+
<td>RS320102</td>
|
|
139
|
+
<td>RSUD Ciawi</td>
|
|
140
|
+
<td>Rumah Sakit</td>
|
|
141
|
+
<td>Aktif</td>
|
|
142
|
+
</tr>
|
|
143
|
+
</tbody>
|
|
144
|
+
</Table>
|
|
145
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export { default as Table } from './table.svelte';
|
|
2
|
+
export { default as TableHeader } from './table-header.svelte';
|
|
3
|
+
export { default as TableBody } from './table-body.svelte';
|
|
4
|
+
export { default as TableFooter } from './table-footer.svelte';
|
|
5
|
+
export { default as TableRow } from './table-row.svelte';
|
|
6
|
+
export { default as TableHead } from './table-head.svelte';
|
|
7
|
+
export { default as TableCell } from './table-cell.svelte';
|
|
8
|
+
export { default as TableCaption } from './table-caption.svelte';
|
|
9
|
+
export { default as TableEmpty } from './table-empty.svelte';
|
|
10
|
+
export * from './table.svelte';
|
|
11
|
+
export * from './table-header.svelte';
|
|
12
|
+
export * from './table-body.svelte';
|
|
13
|
+
export * from './table-footer.svelte';
|
|
14
|
+
export * from './table-row.svelte';
|
|
15
|
+
export * from './table-head.svelte';
|
|
16
|
+
export * from './table-cell.svelte';
|
|
17
|
+
export * from './table-caption.svelte';
|
|
18
|
+
export * from './table-empty.svelte';
|
|
19
|
+
export { createTable, createColumnHelper, getCoreRowModel, getSortedRowModel, getPaginationRowModel, getFilteredRowModel, getExpandedRowModel, getGroupedRowModel, getFacetedRowModel, getFacetedUniqueValues, getFacetedMinMaxValues, } from '@tanstack/table-core';
|
|
20
|
+
export * from '@tanstack/table-core';
|
|
21
|
+
export { default } from './table.svelte';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { default as Table } from './table.svelte';
|
|
2
|
+
export { default as TableHeader } from './table-header.svelte';
|
|
3
|
+
export { default as TableBody } from './table-body.svelte';
|
|
4
|
+
export { default as TableFooter } from './table-footer.svelte';
|
|
5
|
+
export { default as TableRow } from './table-row.svelte';
|
|
6
|
+
export { default as TableHead } from './table-head.svelte';
|
|
7
|
+
export { default as TableCell } from './table-cell.svelte';
|
|
8
|
+
export { default as TableCaption } from './table-caption.svelte';
|
|
9
|
+
export { default as TableEmpty } from './table-empty.svelte';
|
|
10
|
+
export * from './table.svelte';
|
|
11
|
+
export * from './table-header.svelte';
|
|
12
|
+
export * from './table-body.svelte';
|
|
13
|
+
export * from './table-footer.svelte';
|
|
14
|
+
export * from './table-row.svelte';
|
|
15
|
+
export * from './table-head.svelte';
|
|
16
|
+
export * from './table-cell.svelte';
|
|
17
|
+
export * from './table-caption.svelte';
|
|
18
|
+
export * from './table-empty.svelte';
|
|
19
|
+
// Re-export TanStack SVELTE Table (All core + framework adapter hooks & renderers)
|
|
20
|
+
export { createTable, createColumnHelper, getCoreRowModel, getSortedRowModel, getPaginationRowModel, getFilteredRowModel, getExpandedRowModel, getGroupedRowModel, getFacetedRowModel, getFacetedUniqueValues, getFacetedMinMaxValues, } from '@tanstack/table-core';
|
|
21
|
+
export * from '@tanstack/table-core';
|
|
22
|
+
export { default } from './table.svelte';
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ttdk-design-system/table",
|
|
3
|
+
"component": "Table",
|
|
4
|
+
"folder": "table",
|
|
5
|
+
"description": "Komponen kontainer utama tabel (Compound Table ala Shadcn UI).",
|
|
6
|
+
"stylesheets": [
|
|
7
|
+
{
|
|
8
|
+
"theme": "common",
|
|
9
|
+
"file": "table.css",
|
|
10
|
+
"importPath": "web/table/table.css"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"props": {
|
|
14
|
+
"variant": {
|
|
15
|
+
"name": "variant",
|
|
16
|
+
"type": "'default' | 'striped' | 'clean'",
|
|
17
|
+
"optional": true,
|
|
18
|
+
"default": "default",
|
|
19
|
+
"description": "Varian tampilan visual tabel. - `'default'`: Tampilan standar dengan latar bersih dan bingkai kartu. - `'striped'`: Tampilan selang-seling (zebra). - `'clean'`: Tampilan minimalis tanpa border luar dan tanpa shadow.",
|
|
20
|
+
"example": null,
|
|
21
|
+
"param": null
|
|
22
|
+
},
|
|
23
|
+
"size": {
|
|
24
|
+
"name": "size",
|
|
25
|
+
"type": "'sm' | 'md' | 'lg'",
|
|
26
|
+
"optional": true,
|
|
27
|
+
"default": "md",
|
|
28
|
+
"description": "Kerapatan / ukuran tinggi baris tabel. - `'sm'`: Kompak (padat). - `'md'`: Standar. - `'lg'`: Lega.",
|
|
29
|
+
"example": null,
|
|
30
|
+
"param": null
|
|
31
|
+
},
|
|
32
|
+
"rounded": {
|
|
33
|
+
"name": "rounded",
|
|
34
|
+
"type": "'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full' | (string & {}) | number",
|
|
35
|
+
"optional": true,
|
|
36
|
+
"default": "sm",
|
|
37
|
+
"description": "Sudut kelengkungan radius tabel. - Preset: `'none'` | `'xs'` | `'sm'` | `'md'` | `'lg'` | `'xl'` | `'full'` - Nilai custom: `'12px'`, `'1rem'`, atau angka `12`",
|
|
38
|
+
"example": null,
|
|
39
|
+
"param": null
|
|
40
|
+
},
|
|
41
|
+
"shadow": {
|
|
42
|
+
"name": "shadow",
|
|
43
|
+
"type": "'none' | 'sm' | 'md' | 'lg' | (string & {})",
|
|
44
|
+
"optional": true,
|
|
45
|
+
"default": "sm",
|
|
46
|
+
"description": "Bayangan elevasi kontainer tabel. - Preset: `'none'` | `'sm'` | `'md'` | `'lg'` - Nilai custom: CSS box-shadow string (contoh: `'0 4px 20px rgba(0,0,0,0.1)'`)",
|
|
47
|
+
"example": null,
|
|
48
|
+
"param": null
|
|
49
|
+
},
|
|
50
|
+
"minWidth": {
|
|
51
|
+
"name": "minWidth",
|
|
52
|
+
"type": "string | number",
|
|
53
|
+
"optional": true,
|
|
54
|
+
"default": null,
|
|
55
|
+
"description": "Lebar minimum elemen table di dalam wrapper untuk menjaga susunan kolom dan memicu horizontal scroll. Contoh: `700`, `'700px'`, `'max-content'`",
|
|
56
|
+
"example": null,
|
|
57
|
+
"param": null
|
|
58
|
+
},
|
|
59
|
+
"maxHeight": {
|
|
60
|
+
"name": "maxHeight",
|
|
61
|
+
"type": "string | number",
|
|
62
|
+
"optional": true,
|
|
63
|
+
"default": null,
|
|
64
|
+
"description": "Ketinggian maksimum kontainer tabel untuk memicu scroll vertikal internal (sangat direkomendasikan saat stickyHeader aktif). Contoh: `280`, `'280px'`, `'50vh'`",
|
|
65
|
+
"example": null,
|
|
66
|
+
"param": null
|
|
67
|
+
},
|
|
68
|
+
"hoverable": {
|
|
69
|
+
"name": "hoverable",
|
|
70
|
+
"type": "boolean",
|
|
71
|
+
"optional": true,
|
|
72
|
+
"default": "true",
|
|
73
|
+
"description": "Efek hover saat kursor melayang di atas baris tabel.",
|
|
74
|
+
"example": null,
|
|
75
|
+
"param": null
|
|
76
|
+
},
|
|
77
|
+
"stickyHeader": {
|
|
78
|
+
"name": "stickyHeader",
|
|
79
|
+
"type": "boolean",
|
|
80
|
+
"optional": true,
|
|
81
|
+
"default": "false",
|
|
82
|
+
"description": "Membuat header tabel menempel di atas (sticky) saat konten di-scroll.",
|
|
83
|
+
"example": null,
|
|
84
|
+
"param": null
|
|
85
|
+
},
|
|
86
|
+
"loading": {
|
|
87
|
+
"name": "loading",
|
|
88
|
+
"type": "boolean",
|
|
89
|
+
"optional": true,
|
|
90
|
+
"default": "false",
|
|
91
|
+
"description": "Menampilkan spinner loading overlay di atas tabel.",
|
|
92
|
+
"example": null,
|
|
93
|
+
"param": null
|
|
94
|
+
},
|
|
95
|
+
"caption": {
|
|
96
|
+
"name": "caption",
|
|
97
|
+
"type": "string",
|
|
98
|
+
"optional": true,
|
|
99
|
+
"default": null,
|
|
100
|
+
"description": "Teks caption aksesibilitas untuk tabel (dirender sebagai elemen `<caption>`).",
|
|
101
|
+
"example": null,
|
|
102
|
+
"param": null
|
|
103
|
+
},
|
|
104
|
+
"style": {
|
|
105
|
+
"name": "style",
|
|
106
|
+
"type": "any",
|
|
107
|
+
"optional": true,
|
|
108
|
+
"default": null,
|
|
109
|
+
"description": "Inline CSS style object native.",
|
|
110
|
+
"example": null,
|
|
111
|
+
"param": null
|
|
112
|
+
},
|
|
113
|
+
"ui": {
|
|
114
|
+
"name": "ui",
|
|
115
|
+
"type": "UiProps",
|
|
116
|
+
"optional": true,
|
|
117
|
+
"default": null,
|
|
118
|
+
"description": "Kustomisasi visual granular root kontainer wrapper (.ttdk-table-wrapper) melalui UiProps.",
|
|
119
|
+
"example": null,
|
|
120
|
+
"param": null
|
|
121
|
+
},
|
|
122
|
+
"tableStyle": {
|
|
123
|
+
"name": "tableStyle",
|
|
124
|
+
"type": "UiProps",
|
|
125
|
+
"optional": true,
|
|
126
|
+
"default": null,
|
|
127
|
+
"description": "Style kustom untuk elemen table (table.ttdk-table) melalui UiProps.",
|
|
128
|
+
"example": null,
|
|
129
|
+
"param": null
|
|
130
|
+
},
|
|
131
|
+
"tableClass": {
|
|
132
|
+
"name": "tableClass",
|
|
133
|
+
"type": "string",
|
|
134
|
+
"optional": true,
|
|
135
|
+
"default": null,
|
|
136
|
+
"description": "Class CSS kustom untuk elemen table (table.ttdk-table).",
|
|
137
|
+
"example": null,
|
|
138
|
+
"param": null
|
|
139
|
+
},
|
|
140
|
+
"className": {
|
|
141
|
+
"name": "className",
|
|
142
|
+
"type": "string",
|
|
143
|
+
"optional": true,
|
|
144
|
+
"default": null,
|
|
145
|
+
"description": "Class CSS kustom untuk kontainer wrapper luar.",
|
|
146
|
+
"example": null,
|
|
147
|
+
"param": null
|
|
148
|
+
},
|
|
149
|
+
"children": {
|
|
150
|
+
"name": "children",
|
|
151
|
+
"type": "any",
|
|
152
|
+
"optional": true,
|
|
153
|
+
"default": null,
|
|
154
|
+
"description": "Konten anak (TableHeader, TableBody, TableFooter, TableCaption).",
|
|
155
|
+
"example": null,
|
|
156
|
+
"param": null
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"subInterfaces": {},
|
|
160
|
+
"supportedFrameworks": [
|
|
161
|
+
"react",
|
|
162
|
+
"vue",
|
|
163
|
+
"svelte"
|
|
164
|
+
],
|
|
165
|
+
"themes": [
|
|
166
|
+
"tw"
|
|
167
|
+
]
|
|
168
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
<tbody
|
|
19
|
+
style={stringifyStyles({
|
|
20
|
+
...buildUiVars(ui),
|
|
21
|
+
})}
|
|
22
|
+
class={`ttdk-table-body ${className || ""}`.trim()}><slot /></tbody
|
|
23
|
+
>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
export interface TableBodyProps {
|
|
3
|
+
/**
|
|
4
|
+
* Kustomisasi visual granular tbody (UiProps).
|
|
5
|
+
*/
|
|
6
|
+
ui?: UiProps;
|
|
7
|
+
/**
|
|
8
|
+
* Class CSS kustom.
|
|
9
|
+
*/
|
|
10
|
+
className?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Konten baris data (TableRow).
|
|
13
|
+
*/
|
|
14
|
+
children?: any;
|
|
15
|
+
}
|
|
16
|
+
import { UiProps } from "../../core/types";
|
|
17
|
+
declare const __propDef: {
|
|
18
|
+
props: {
|
|
19
|
+
className?: TableBodyProps["className"];
|
|
20
|
+
ui?: TableBodyProps["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 TableBodyProps_ = typeof __propDef.props;
|
|
32
|
+
export type TableBodyEvents = typeof __propDef.events;
|
|
33
|
+
export type TableBodySlots = typeof __propDef.slots;
|
|
34
|
+
export default class TableBody extends SvelteComponent<TableBodyProps_, TableBodyEvents, TableBodySlots> {
|
|
35
|
+
}
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
<caption
|
|
19
|
+
style={stringifyStyles({
|
|
20
|
+
...buildUiVars(ui),
|
|
21
|
+
})}
|
|
22
|
+
class={`ttdk-table-caption ${className || ""}`.trim()}><slot /></caption
|
|
23
|
+
>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
export interface TableCaptionProps {
|
|
3
|
+
/**
|
|
4
|
+
* Kustomisasi visual granular caption (UiProps).
|
|
5
|
+
*/
|
|
6
|
+
ui?: UiProps;
|
|
7
|
+
/**
|
|
8
|
+
* Class CSS kustom.
|
|
9
|
+
*/
|
|
10
|
+
className?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Konten caption tabel.
|
|
13
|
+
*/
|
|
14
|
+
children?: any;
|
|
15
|
+
}
|
|
16
|
+
import { UiProps } from "../../core/types";
|
|
17
|
+
declare const __propDef: {
|
|
18
|
+
props: {
|
|
19
|
+
className?: TableCaptionProps["className"];
|
|
20
|
+
ui?: TableCaptionProps["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 TableCaptionProps_ = typeof __propDef.props;
|
|
32
|
+
export type TableCaptionEvents = typeof __propDef.events;
|
|
33
|
+
export type TableCaptionSlots = typeof __propDef.slots;
|
|
34
|
+
export default class TableCaption extends SvelteComponent<TableCaptionProps_, TableCaptionEvents, TableCaptionSlots> {
|
|
35
|
+
}
|
|
36
|
+
export {};
|