@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.
- package/AI_GUIDE.md +6518 -0
- package/llms.txt +6518 -0
- package/package.json +1096 -4
- package/src/core/index.ts +2 -0
- package/src/core/tailwind-preset.cjs +62 -0
- package/src/core/tailwind-preset.ts +85 -0
- package/src/core/theme/tokens.css +663 -0
- package/src/core/types.ts +836 -0
- package/src/index.ts +17 -0
- package/src/tailwind-preset.cjs +62 -0
- package/src/tailwind-preset.ts +85 -0
- package/src/types.ts +1 -0
- package/src/web/accordion/AI_GUIDE.md +149 -0
- package/src/web/accordion/accordion.css +1 -0
- package/src/web/accordion/accordion.vue +432 -0
- package/src/web/accordion/accordion.vue.d.ts +227 -0
- package/src/web/accordion/index.ts +3 -0
- package/src/web/accordion/manifest.json +351 -0
- package/src/web/alert/AI_GUIDE.md +139 -0
- package/src/web/alert/alert.css +1 -0
- package/src/web/alert/alert.vue +290 -0
- package/src/web/alert/alert.vue.d.ts +154 -0
- package/src/web/alert/index.ts +3 -0
- package/src/web/alert/manifest.json +240 -0
- package/src/web/avatar/AI_GUIDE.md +118 -0
- package/src/web/avatar/avatar.css +1 -0
- package/src/web/avatar/avatar.vue +217 -0
- package/src/web/avatar/avatar.vue.d.ts +135 -0
- package/src/web/avatar/index.ts +3 -0
- package/src/web/avatar/manifest.json +195 -0
- package/src/web/badge/AI_GUIDE.md +94 -0
- package/src/web/badge/badge.css +1 -0
- package/src/web/badge/badge.vue +135 -0
- package/src/web/badge/badge.vue.d.ts +108 -0
- package/src/web/badge/index.ts +3 -0
- package/src/web/badge/manifest.json +141 -0
- package/src/web/banner/AI_GUIDE.md +130 -0
- package/src/web/banner/banner.css +1 -0
- package/src/web/banner/banner.vue +303 -0
- package/src/web/banner/banner.vue.d.ts +162 -0
- package/src/web/banner/index.ts +3 -0
- package/src/web/banner/manifest.json +240 -0
- package/src/web/breadcrumb/AI_GUIDE.md +120 -0
- package/src/web/breadcrumb/breadcrumb.css +1 -0
- package/src/web/breadcrumb/breadcrumb.vue +313 -0
- package/src/web/breadcrumb/breadcrumb.vue.d.ts +139 -0
- package/src/web/breadcrumb/index.ts +3 -0
- package/src/web/breadcrumb/manifest.json +225 -0
- package/src/web/button/AI_GUIDE.md +121 -0
- package/src/web/button/button.css +1 -0
- package/src/web/button/button.vue +283 -0
- package/src/web/button/button.vue.d.ts +147 -0
- package/src/web/button/index.ts +3 -0
- package/src/web/button/manifest.json +177 -0
- package/src/web/calendar/AI_GUIDE.md +151 -0
- package/src/web/calendar/calendar.css +1 -0
- package/src/web/calendar/calendar.vue +1536 -0
- package/src/web/calendar/calendar.vue.d.ts +261 -0
- package/src/web/calendar/index.ts +3 -0
- package/src/web/calendar/manifest.json +470 -0
- package/src/web/card/AI_GUIDE.md +133 -0
- package/src/web/card/card.css +1 -0
- package/src/web/card/card.vue +423 -0
- package/src/web/card/card.vue.d.ts +232 -0
- package/src/web/card/index.ts +3 -0
- package/src/web/card/manifest.json +357 -0
- package/src/web/checkbox/AI_GUIDE.md +146 -0
- package/src/web/checkbox/checkbox.css +1 -0
- package/src/web/checkbox/checkbox.vue +304 -0
- package/src/web/checkbox/checkbox.vue.d.ts +189 -0
- package/src/web/checkbox/index.ts +3 -0
- package/src/web/checkbox/manifest.json +294 -0
- package/src/web/chip/AI_GUIDE.md +186 -0
- package/src/web/chip/chip.css +1 -0
- package/src/web/chip/chip.vue +220 -0
- package/src/web/chip/chip.vue.d.ts +140 -0
- package/src/web/chip/index.ts +3 -0
- package/src/web/chip/manifest.json +186 -0
- package/src/web/dropdown/AI_GUIDE.md +167 -0
- package/src/web/dropdown/dropdown.css +1 -0
- package/src/web/dropdown/dropdown.vue +1257 -0
- package/src/web/dropdown/dropdown.vue.d.ts +381 -0
- package/src/web/dropdown/index.ts +3 -0
- package/src/web/dropdown/manifest.json +576 -0
- package/src/web/flex/AI_GUIDE.md +113 -0
- package/src/web/flex/flex-item.vue +94 -0
- package/src/web/flex/flex-item.vue.d.ts +84 -0
- package/src/web/flex/flex.css +1 -0
- package/src/web/flex/flex.vue +103 -0
- package/src/web/flex/flex.vue.d.ts +92 -0
- package/src/web/flex/index.ts +5 -0
- package/src/web/flex/manifest.json +162 -0
- package/src/web/form/index.ts +7 -0
- package/src/web/grid/AI_GUIDE.md +112 -0
- package/src/web/grid/grid-item.vue +109 -0
- package/src/web/grid/grid-item.vue.d.ts +99 -0
- package/src/web/grid/grid.css +1 -0
- package/src/web/grid/grid.vue +94 -0
- package/src/web/grid/grid.vue.d.ts +84 -0
- package/src/web/grid/index.ts +5 -0
- package/src/web/grid/manifest.json +153 -0
- package/src/web/index.ts +86 -0
- package/src/web/input/AI_GUIDE.md +159 -0
- package/src/web/input/index.ts +3 -0
- package/src/web/input/input.css +1 -0
- package/src/web/input/input.vue +521 -0
- package/src/web/input/input.vue.d.ts +274 -0
- package/src/web/input/manifest.json +465 -0
- package/src/web/input-number/AI_GUIDE.md +164 -0
- package/src/web/input-number/index.ts +3 -0
- package/src/web/input-number/input-number.css +1 -0
- package/src/web/input-number/input-number.vue +1153 -0
- package/src/web/input-number/input-number.vue.d.ts +343 -0
- package/src/web/input-number/manifest.json +575 -0
- package/src/web/modal/AI_GUIDE.md +171 -0
- package/src/web/modal/index.ts +3 -0
- package/src/web/modal/manifest.json +375 -0
- package/src/web/modal/modal.css +1 -0
- package/src/web/modal/modal.vue +344 -0
- package/src/web/modal/modal.vue.d.ts +64 -0
- package/src/web/pagination/AI_GUIDE.md +148 -0
- package/src/web/pagination/index.ts +21 -0
- package/src/web/pagination/manifest.json +432 -0
- package/src/web/pagination/pagination-content.vue +42 -0
- package/src/web/pagination/pagination-content.vue.d.ts +28 -0
- package/src/web/pagination/pagination-ellipsis.vue +55 -0
- package/src/web/pagination/pagination-ellipsis.vue.d.ts +28 -0
- package/src/web/pagination/pagination-first.vue +161 -0
- package/src/web/pagination/pagination-first.vue.d.ts +67 -0
- package/src/web/pagination/pagination-item.vue +42 -0
- package/src/web/pagination/pagination-item.vue.d.ts +28 -0
- package/src/web/pagination/pagination-last.vue +161 -0
- package/src/web/pagination/pagination-last.vue.d.ts +67 -0
- package/src/web/pagination/pagination-link.vue +118 -0
- package/src/web/pagination/pagination-link.vue.d.ts +61 -0
- package/src/web/pagination/pagination-next.vue +160 -0
- package/src/web/pagination/pagination-next.vue.d.ts +68 -0
- package/src/web/pagination/pagination-previous.vue +160 -0
- package/src/web/pagination/pagination-previous.vue.d.ts +68 -0
- package/src/web/pagination/pagination.css +1 -0
- package/src/web/pagination/pagination.vue +730 -0
- package/src/web/pagination/pagination.vue.d.ts +247 -0
- package/src/web/popover/AI_GUIDE.md +163 -0
- package/src/web/popover/index.ts +3 -0
- package/src/web/popover/manifest.json +396 -0
- package/src/web/popover/popover.css +1 -0
- package/src/web/popover/popover.vue +579 -0
- package/src/web/popover/popover.vue.d.ts +83 -0
- package/src/web/radio/AI_GUIDE.md +155 -0
- package/src/web/radio/index.ts +3 -0
- package/src/web/radio/manifest.json +294 -0
- package/src/web/radio/radio.css +1 -0
- package/src/web/radio/radio.vue +288 -0
- package/src/web/radio/radio.vue.d.ts +182 -0
- package/src/web/selectbox/AI_GUIDE.md +216 -0
- package/src/web/selectbox/index.ts +3 -0
- package/src/web/selectbox/manifest.json +477 -0
- package/src/web/selectbox/selectbox.css +1 -0
- package/src/web/selectbox/selectbox.vue +1024 -0
- package/src/web/selectbox/selectbox.vue.d.ts +300 -0
- package/src/web/sonner/AI_GUIDE.md +98 -0
- package/src/web/sonner/index.ts +114 -0
- package/src/web/sonner/manifest.json +132 -0
- package/src/web/sonner/sonner.css +1 -0
- package/src/web/sonner/sonner.vue +180 -0
- package/src/web/sonner/sonner.vue.d.ts +113 -0
- package/src/web/table/AI_GUIDE.md +145 -0
- package/src/web/table/index.ts +34 -0
- package/src/web/table/manifest.json +168 -0
- package/src/web/table/table-body.vue +42 -0
- package/src/web/table/table-body.vue.d.ts +28 -0
- package/src/web/table/table-caption.vue +42 -0
- package/src/web/table/table-caption.vue.d.ts +28 -0
- package/src/web/table/table-cell.vue +71 -0
- package/src/web/table/table-cell.vue.d.ts +49 -0
- package/src/web/table/table-empty.vue +105 -0
- package/src/web/table/table-empty.vue.d.ts +57 -0
- package/src/web/table/table-footer.vue +42 -0
- package/src/web/table/table-footer.vue.d.ts +28 -0
- package/src/web/table/table-head.vue +78 -0
- package/src/web/table/table-head.vue.d.ts +50 -0
- package/src/web/table/table-header.vue +42 -0
- package/src/web/table/table-header.vue.d.ts +28 -0
- package/src/web/table/table-row.vue +70 -0
- package/src/web/table/table-row.vue.d.ts +44 -0
- package/src/web/table/table.css +1 -0
- package/src/web/table/table.vue +298 -0
- package/src/web/table/table.vue.d.ts +119 -0
- package/src/web/tabs/AI_GUIDE.md +150 -0
- package/src/web/tabs/index.ts +2 -0
- package/src/web/tabs/manifest.json +315 -0
- package/src/web/tabs/tabs.css +1 -0
- package/src/web/tabs/tabs.vue +164 -0
- package/src/web/tabs/tabs.vue.d.ts +60 -0
- package/src/web/text/AI_GUIDE.md +129 -0
- package/src/web/text/index.ts +2 -0
- package/src/web/text/manifest.json +195 -0
- package/src/web/text/text.css +1 -0
- package/src/web/text/text.vue +195 -0
- package/src/web/text/text.vue.d.ts +161 -0
- package/src/web/textarea/AI_GUIDE.md +141 -0
- package/src/web/textarea/index.ts +3 -0
- package/src/web/textarea/manifest.json +438 -0
- package/src/web/textarea/textarea.css +1 -0
- package/src/web/textarea/textarea.vue +458 -0
- package/src/web/textarea/textarea.vue.d.ts +265 -0
- package/src/web/tooltip/AI_GUIDE.md +110 -0
- package/src/web/tooltip/index.ts +3 -0
- package/src/web/tooltip/manifest.json +222 -0
- package/src/web/tooltip/tooltip.css +1 -0
- package/src/web/tooltip/tooltip.vue +417 -0
- package/src/web/tooltip/tooltip.vue.d.ts +150 -0
- package/src/webview/bottomsheet/AI_GUIDE.md +141 -0
- package/src/webview/bottomsheet/bottomsheet.css +1 -0
- package/src/webview/bottomsheet/bottomsheet.vue +441 -0
- package/src/webview/bottomsheet/bottomsheet.vue.d.ts +178 -0
- package/src/webview/bottomsheet/index.ts +4 -0
- package/src/webview/bottomsheet/manifest.json +377 -0
- package/src/webview/button/AI_GUIDE.md +79 -0
- package/src/webview/button/button-ios.css +1 -0
- package/src/webview/button/button-ios.vue +138 -0
- package/src/webview/button/button-ios.vue.d.ts +102 -0
- package/src/webview/button/button-material.css +1 -0
- package/src/webview/button/button-material.vue +138 -0
- package/src/webview/button/button-material.vue.d.ts +102 -0
- package/src/webview/button/index.ts +7 -0
- package/src/webview/button/manifest.json +148 -0
- package/src/webview/index.ts +7 -0
- package/tailwind-preset.cjs +62 -0
- package/tailwind-preset.js +62 -0
- package/ttdk-manifest.json +10188 -0
- package/README.md +0 -3
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<tr
|
|
3
|
+
:class="`ttdk-table-row ${className || ''}`.trim()"
|
|
4
|
+
:data-selected="selected ? 'true' : 'false'"
|
|
5
|
+
:data-hoverable="hoverable !== false ? 'true' : 'false'"
|
|
6
|
+
@click="
|
|
7
|
+
async (e) => {
|
|
8
|
+
if (onClick) {
|
|
9
|
+
onClick(e);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
"
|
|
13
|
+
:style="{
|
|
14
|
+
...buildUiVars(ui),
|
|
15
|
+
...(typeof style === 'object' ? style : {}),
|
|
16
|
+
}"
|
|
17
|
+
>
|
|
18
|
+
<slot />
|
|
19
|
+
</tr>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script setup lang="ts">
|
|
23
|
+
import { buildUiVars, UiProps } from "../../core/types";
|
|
24
|
+
|
|
25
|
+
export interface TableRowProps {
|
|
26
|
+
/**
|
|
27
|
+
* Inline CSS style kustom.
|
|
28
|
+
*/
|
|
29
|
+
style?: any;
|
|
30
|
+
/**
|
|
31
|
+
* Menandai baris sebagai aktif / terpilih (selected).
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
selected?: boolean;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Efek hover saat kursor melayang di atas baris.
|
|
38
|
+
*/
|
|
39
|
+
hoverable?: boolean;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Kustomisasi visual granular tr (UiProps).
|
|
43
|
+
*/
|
|
44
|
+
ui?: UiProps;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Class CSS kustom.
|
|
48
|
+
*/
|
|
49
|
+
className?: string;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Fungsi callback saat baris diklik.
|
|
53
|
+
*/
|
|
54
|
+
onClick?: (event: any) => void;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Konten sel (TableCell atau TableHead).
|
|
58
|
+
*/
|
|
59
|
+
children?: any;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Komponen baris tabel `<tr>` (Compound TableRow).
|
|
64
|
+
*/
|
|
65
|
+
|
|
66
|
+
const props = withDefaults(defineProps<TableRowProps>(), {
|
|
67
|
+
hoverable: true,
|
|
68
|
+
selected: false,
|
|
69
|
+
});
|
|
70
|
+
</script>
|
|
@@ -0,0 +1,44 @@
|
|
|
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 interface TableRowProps {
|
|
7
|
+
/**
|
|
8
|
+
* Inline CSS style kustom.
|
|
9
|
+
*/
|
|
10
|
+
style?: any;
|
|
11
|
+
/**
|
|
12
|
+
* Menandai baris sebagai aktif / terpilih (selected).
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
15
|
+
selected?: boolean;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Efek hover saat kursor melayang di atas baris.
|
|
19
|
+
*/
|
|
20
|
+
hoverable?: boolean;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Kustomisasi visual granular tr (UiProps).
|
|
24
|
+
*/
|
|
25
|
+
ui?: UiProps;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Class CSS kustom.
|
|
29
|
+
*/
|
|
30
|
+
className?: string;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Fungsi callback saat baris diklik.
|
|
34
|
+
*/
|
|
35
|
+
onClick?: (event: any) => void;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Konten sel (TableCell atau TableHead).
|
|
39
|
+
*/
|
|
40
|
+
children?: any;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
declare const component: DefineComponent<TableRowProps>;
|
|
44
|
+
export default component;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ttdk-table-wrapper{width:100%;font-family:var(--ttdk-font-sans);background:var(--ttdk-bg-card);border:var(--ttdk-stroke-width-thin) solid var(--ttdk-stroke-subtle);--table-corner-radius:var(--ttdk-ui-border-radius,var(--ttdk-radius-sm,8px));border-radius:var(--table-corner-radius);box-shadow:var(--ttdk-shadow-sm);box-sizing:border-box;transition:background-color .2s,border-color .2s;position:relative;overflow:auto}.ttdk-table-wrapper[data-rounded=none]{--table-corner-radius:var(--ttdk-radius-none,0px)}.ttdk-table-wrapper[data-rounded=xs]{--table-corner-radius:var(--ttdk-radius-xs,6px)}.ttdk-table-wrapper[data-rounded=sm]{--table-corner-radius:var(--ttdk-radius-sm,8px)}.ttdk-table-wrapper[data-rounded=md]{--table-corner-radius:var(--ttdk-radius-md,12px)}.ttdk-table-wrapper[data-rounded=lg]{--table-corner-radius:var(--ttdk-radius-lg,16px)}.ttdk-table-wrapper[data-rounded=xl],.ttdk-table-wrapper[data-rounded=full]{--table-corner-radius:var(--ttdk-radius-xl,24px)}.ttdk-table-wrapper.rounded-none{--table-corner-radius:0px!important}.ttdk-table-wrapper.rounded-xs,.ttdk-table-wrapper.rounded-sm{--table-corner-radius:var(--ttdk-radius-xs,6px)!important}.ttdk-table-wrapper.rounded,.ttdk-table-wrapper.rounded-md{--table-corner-radius:var(--ttdk-radius-sm,8px)!important}.ttdk-table-wrapper.rounded-lg{--table-corner-radius:var(--ttdk-radius-md,12px)!important}.ttdk-table-wrapper.rounded-xl{--table-corner-radius:var(--ttdk-radius-lg,16px)!important}.ttdk-table-wrapper.rounded-2xl{--table-corner-radius:var(--ttdk-radius-xl,24px)!important}.ttdk-table-wrapper[data-shadow=none]{box-shadow:none}.ttdk-table-wrapper[data-shadow=sm]{box-shadow:var(--ttdk-shadow-sm)}.ttdk-table-wrapper[data-shadow=md]{box-shadow:var(--ttdk-shadow-md)}.ttdk-table-wrapper[data-shadow=lg]{box-shadow:var(--ttdk-shadow-lg)}.dark .ttdk-table-wrapper[data-shadow=none]{box-shadow:none}.dark .ttdk-table-wrapper[data-shadow=sm]{box-shadow:var(--ttdk-shadow-sm)}.dark .ttdk-table-wrapper[data-shadow=md]{box-shadow:var(--ttdk-shadow-md)}.dark .ttdk-table-wrapper[data-shadow=lg]{box-shadow:var(--ttdk-shadow-lg)}.ttdk-table-wrapper.shadow-none{box-shadow:none!important}.ttdk-table-wrapper.shadow-sm,.ttdk-table-wrapper.shadow{box-shadow:var(--ttdk-shadow-sm)!important}.ttdk-table-wrapper.shadow-md{box-shadow:var(--ttdk-shadow-md)!important}.ttdk-table-wrapper.shadow-lg,.ttdk-table-wrapper.shadow-xl{box-shadow:var(--ttdk-shadow-lg)!important}.dark .ttdk-table-wrapper{background:var(--ttdk-bg-card);border-color:var(--ttdk-stroke-subtle);box-shadow:var(--ttdk-shadow-sm)}.ttdk-table-loading-overlay{background:color-mix(in srgb, var(--ttdk-bg-card) 75%, transparent);z-index:10;backdrop-filter:blur(2px);justify-content:center;align-items:center;display:flex;position:absolute;inset:0}.dark .ttdk-table-loading-overlay{background:color-mix(in srgb, var(--ttdk-bg-card) 75%, transparent)}.ttdk-table-spinner{fill:none;stroke:currentColor;stroke-width:2.2px;stroke-linecap:round;width:24px;height:24px;color:var(--ttdk-brand-default);animation:1.2s steps(12,end) infinite ttdk-table-spin}.ttdk-table-wrapper[data-size=sm] .ttdk-table-spinner,.ttdk-table-wrapper:has(.ttdk-table[data-size=sm]) .ttdk-table-spinner{width:18px;height:18px}.ttdk-table-wrapper[data-size=md] .ttdk-table-spinner,.ttdk-table-wrapper:has(.ttdk-table[data-size=md]) .ttdk-table-spinner{width:24px;height:24px}.ttdk-table-wrapper[data-size=lg] .ttdk-table-spinner,.ttdk-table-wrapper:has(.ttdk-table[data-size=lg]) .ttdk-table-spinner{width:32px;height:32px}@keyframes ttdk-table-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ttdk-table{caption-side:bottom;border-collapse:collapse;text-align:left;width:100%;font-size:13px;line-height:1.5}.ttdk-table-wrapper[data-variant=clean],.ttdk-table-wrapper:has(.ttdk-table[data-variant=clean]){box-shadow:none;background:0 0;border:none;border-radius:0}.dark .ttdk-table-wrapper[data-variant=clean],.dark .ttdk-table-wrapper:has(.ttdk-table[data-variant=clean]){box-shadow:none;background:0 0;border:none}.ttdk-table-wrapper[data-variant=clean] .ttdk-table-header,.ttdk-table-wrapper:has(.ttdk-table[data-variant=clean]) .ttdk-table-header,.dark .ttdk-table-wrapper[data-variant=clean] .ttdk-table-header,.dark .ttdk-table-wrapper:has(.ttdk-table[data-variant=clean]) .ttdk-table-header{background:0 0}.ttdk-table[data-variant=clean]{border:none}.ttdk-table[data-sticky-header=true] .ttdk-table-head,.ttdk-table-wrapper[data-sticky-header=true] .ttdk-table-head,.ttdk-table-wrapper:has(.ttdk-table[data-sticky-header=true]) .ttdk-table-head{z-index:10;background:var(--ttdk-bg-secondary-disabled);box-shadow:inset 0 -1px 0 var(--ttdk-stroke-subtle);position:sticky;top:0}.dark .ttdk-table[data-sticky-header=true] .ttdk-table-head,.dark .ttdk-table-wrapper[data-sticky-header=true] .ttdk-table-head,.dark .ttdk-table-wrapper:has(.ttdk-table[data-sticky-header=true]) .ttdk-table-head{background:var(--ttdk-bg-secondary-disabled);box-shadow:inset 0 -1px 0 var(--ttdk-stroke-subtle)}.ttdk-table-wrapper[data-variant=clean][data-sticky-header=true] .ttdk-table-head,.ttdk-table-wrapper[data-variant=clean]:has(.ttdk-table[data-sticky-header=true]) .ttdk-table-head,.ttdk-table[data-variant=clean][data-sticky-header=true] .ttdk-table-head,.dark .ttdk-table-wrapper[data-variant=clean][data-sticky-header=true] .ttdk-table-head,.dark .ttdk-table-wrapper[data-variant=clean]:has(.ttdk-table[data-sticky-header=true]) .ttdk-table-head,.dark .ttdk-table[data-variant=clean][data-sticky-header=true] .ttdk-table-head{background:var(--ttdk-bg-card);box-shadow:inset 0 -1px 0 var(--ttdk-stroke-subtle)}.ttdk-table[data-size=sm] th,.ttdk-table[data-size=sm] td{padding:8px 12px;font-size:12px}.ttdk-table[data-size=md] th,.ttdk-table[data-size=md] td{padding:14px 16px;font-size:13px}.ttdk-table[data-size=lg] th,.ttdk-table[data-size=lg] td{padding:18px 20px;font-size:14px}.ttdk-table-header{background:var(--ttdk-bg-secondary-disabled);border-bottom:var(--ttdk-stroke-width-thin) solid var(--ttdk-stroke-subtle)}.dark .ttdk-table-header{background:var(--ttdk-bg-secondary-disabled);border-bottom-color:var(--ttdk-stroke-subtle)}.ttdk-table-head{height:44px;color:var(--ttdk-text-icon-secondary);letter-spacing:.2px;vertical-align:middle;border-bottom:var(--ttdk-stroke-width-thin) solid var(--ttdk-stroke-subtle);white-space:nowrap;user-select:none;padding:12px 16px;font-size:12px;font-weight:600;transition:background-color .15s,color .15s}.dark .ttdk-table-head{color:var(--ttdk-text-icon-secondary);border-bottom-color:var(--ttdk-stroke-subtle)}.ttdk-table-head[data-sortable=true]{cursor:pointer}.ttdk-table-head[data-sortable=true]:hover,.dark .ttdk-table-head[data-sortable=true]:hover{background:var(--ttdk-bg-secondary-disabled);color:var(--ttdk-text-icon-primary)}.ttdk-th-inner{align-items:center;gap:6px;display:inline-flex}.ttdk-table-body{border-bottom:0}.ttdk-table-row{border-bottom:var(--ttdk-stroke-width-thin) solid var(--ttdk-stroke-subtle);transition:background-color .15s}.dark .ttdk-table-row{border-bottom-color:var(--ttdk-stroke-subtle)}.ttdk-table-row:last-child{border-bottom:none}.ttdk-table[data-hoverable=true] .ttdk-table-row:hover,.ttdk-table-row[data-hoverable=true]:hover,.dark .ttdk-table[data-hoverable=true] .ttdk-table-row:hover,.dark .ttdk-table-row[data-hoverable=true]:hover,.ttdk-table[data-variant=striped] .ttdk-table-body .ttdk-table-row:nth-child(2n),.dark .ttdk-table[data-variant=striped] .ttdk-table-body .ttdk-table-row:nth-child(2n){background:var(--ttdk-bg-secondary-disabled)}.ttdk-table-row[data-selected=true]{background:var(--ttdk-bg-status-info-subtle)!important}.dark .ttdk-table-row[data-selected=true]{background:var(--ttdk-color-blue-900)!important}.ttdk-table-cell{color:var(--ttdk-ui-color,var(--ttdk-text-icon-primary));vertical-align:middle;padding:14px 16px}.dark .ttdk-table-cell{color:var(--ttdk-ui-color,var(--ttdk-text-icon-primary))}.ttdk-table-footer{background:var(--ttdk-bg-secondary-disabled);border-top:var(--ttdk-stroke-width-thin) solid var(--ttdk-stroke-subtle);color:var(--ttdk-ui-color,var(--ttdk-text-icon-primary));font-weight:500}.dark .ttdk-table-footer{background:var(--ttdk-bg-secondary-disabled);border-top-color:var(--ttdk-stroke-subtle);color:var(--ttdk-ui-color,var(--ttdk-text-icon-primary))}.ttdk-table-caption{color:var(--ttdk-text-icon-secondary);text-align:center;margin-top:12px;padding:0 16px 12px;font-size:12px}.dark .ttdk-table-caption{color:var(--ttdk-text-icon-secondary)}.ttdk-table-empty-wrapper{text-align:center;flex-direction:column;justify-content:center;align-items:center;padding:56px 24px;display:flex}.ttdk-table-empty-title{color:var(--ttdk-text-icon-primary);margin:0;font-size:14px;font-weight:700}.dark .ttdk-table-empty-title{color:var(--ttdk-text-icon-primary)}.ttdk-table-empty-desc{color:var(--ttdk-text-icon-secondary);margin:4px 0 0;font-size:12px}.dark .ttdk-table-empty-desc{color:var(--ttdk-text-icon-secondary)}.ttdk-table-empty-action{color:var(--ttdk-brand-default);cursor:pointer;border-radius:var(--ttdk-radius-input-sm);background:0 0;border:none;margin-top:12px;padding:4px 8px;font-size:13px;font-weight:600;transition:color .15s}.ttdk-table-empty-action:hover{text-decoration:underline}.dark .ttdk-table-empty-action{color:var(--ttdk-brand-default)}.ttdk-cell-title-group{flex-direction:column;gap:2px;display:flex}.ttdk-cell-main-title{color:var(--ttdk-text-icon-primary);font-size:13px;font-weight:600}.dark .ttdk-cell-main-title{color:var(--ttdk-text-icon-primary)}.ttdk-cell-subtitle{color:var(--ttdk-text-icon-secondary);font-size:11px}.dark .ttdk-cell-subtitle{color:var(--ttdk-text-icon-secondary)}.ttdk-format-badges{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.ttdk-format-tag{border-radius:var(--ttdk-radius-input-sm);background:var(--ttdk-bg-secondary-disabled);color:var(--ttdk-text-icon-primary);border:var(--ttdk-stroke-width-thin) solid var(--ttdk-stroke-subtle);padding:2px 6px;font-size:11px;font-weight:600}.dark .ttdk-format-tag{background:var(--ttdk-bg-secondary-disabled);border-color:var(--ttdk-stroke-subtle);color:var(--ttdk-text-icon-primary)}.ttdk-view-count{color:var(--ttdk-text-icon-secondary);align-items:center;gap:6px;font-size:12px;display:flex}.dark .ttdk-view-count{color:var(--ttdk-text-icon-secondary)}.ttdk-btn-fav{border-radius:var(--ttdk-radius-xs);border:var(--ttdk-stroke-width-thin) solid var(--ttdk-stroke-subtle);width:32px;height:32px;color:var(--ttdk-text-icon-secondary);cursor:pointer;background:0 0;justify-content:center;align-items:center;padding:0;transition:all .15s;display:inline-flex}.ttdk-btn-fav:hover{background:var(--ttdk-bg-secondary-disabled);border-color:var(--ttdk-stroke-strong)}.dark .ttdk-btn-fav{border-color:var(--ttdk-stroke-subtle);color:var(--ttdk-text-icon-secondary)}.dark .ttdk-btn-fav:hover{background:var(--ttdk-bg-secondary-disabled);color:var(--ttdk-text-icon-primary)}.ttdk-btn-fav.active{background:var(--ttdk-brand-default);border-color:var(--ttdk-brand-default);color:var(--ttdk-color-neutral-white)}
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:class="`ttdk-table-wrapper ${className || ''}`.trim()"
|
|
4
|
+
:data-loading="loading ? 'true' : undefined"
|
|
5
|
+
:data-variant="variant || 'default'"
|
|
6
|
+
:data-size="size || 'md'"
|
|
7
|
+
:data-sticky-header="stickyHeader ? 'true' : undefined"
|
|
8
|
+
:data-rounded="
|
|
9
|
+
rounded &&
|
|
10
|
+
['none', 'xs', 'sm', 'md', 'lg', 'xl', 'full'].includes(rounded)
|
|
11
|
+
? rounded
|
|
12
|
+
: undefined
|
|
13
|
+
"
|
|
14
|
+
:data-shadow="
|
|
15
|
+
shadow && ['none', 'sm', 'md', 'lg'].includes(shadow) ? shadow : undefined
|
|
16
|
+
"
|
|
17
|
+
:style="{
|
|
18
|
+
...(maxHeight
|
|
19
|
+
? {
|
|
20
|
+
maxHeight:
|
|
21
|
+
typeof maxHeight === 'number' ? `${maxHeight}px` : maxHeight,
|
|
22
|
+
}
|
|
23
|
+
: {}),
|
|
24
|
+
...(typeof rounded === 'number'
|
|
25
|
+
? {
|
|
26
|
+
'--table-corner-radius': `${rounded}px`,
|
|
27
|
+
}
|
|
28
|
+
: rounded &&
|
|
29
|
+
!['none', 'xs', 'sm', 'md', 'lg', 'xl', 'full'].includes(rounded)
|
|
30
|
+
? {
|
|
31
|
+
'--table-corner-radius': rounded,
|
|
32
|
+
}
|
|
33
|
+
: {}),
|
|
34
|
+
...(shadow && !['none', 'sm', 'md', 'lg'].includes(shadow)
|
|
35
|
+
? {
|
|
36
|
+
boxShadow: shadow,
|
|
37
|
+
}
|
|
38
|
+
: {}),
|
|
39
|
+
...buildUiVars(ui),
|
|
40
|
+
...(typeof style === 'object' ? style : {}),
|
|
41
|
+
}"
|
|
42
|
+
>
|
|
43
|
+
<template v-if="loading">
|
|
44
|
+
<div class="ttdk-table-loading-overlay" aria-hidden="true">
|
|
45
|
+
<svg class="ttdk-table-spinner" viewBox="0 0 24 24">
|
|
46
|
+
<line
|
|
47
|
+
x1="12"
|
|
48
|
+
y1="2.5"
|
|
49
|
+
x2="12"
|
|
50
|
+
y2="6.5"
|
|
51
|
+
opacity="0.175"
|
|
52
|
+
transform="rotate(0 12 12)"
|
|
53
|
+
></line>
|
|
54
|
+
<line
|
|
55
|
+
x1="12"
|
|
56
|
+
y1="2.5"
|
|
57
|
+
x2="12"
|
|
58
|
+
y2="6.5"
|
|
59
|
+
opacity="0.25"
|
|
60
|
+
transform="rotate(30 12 12)"
|
|
61
|
+
></line>
|
|
62
|
+
<line
|
|
63
|
+
x1="12"
|
|
64
|
+
y1="2.5"
|
|
65
|
+
x2="12"
|
|
66
|
+
y2="6.5"
|
|
67
|
+
opacity="0.325"
|
|
68
|
+
transform="rotate(60 12 12)"
|
|
69
|
+
></line>
|
|
70
|
+
<line
|
|
71
|
+
x1="12"
|
|
72
|
+
y1="2.5"
|
|
73
|
+
x2="12"
|
|
74
|
+
y2="6.5"
|
|
75
|
+
opacity="0.4"
|
|
76
|
+
transform="rotate(90 12 12)"
|
|
77
|
+
></line>
|
|
78
|
+
<line
|
|
79
|
+
x1="12"
|
|
80
|
+
y1="2.5"
|
|
81
|
+
x2="12"
|
|
82
|
+
y2="6.5"
|
|
83
|
+
opacity="0.475"
|
|
84
|
+
transform="rotate(120 12 12)"
|
|
85
|
+
></line>
|
|
86
|
+
<line
|
|
87
|
+
x1="12"
|
|
88
|
+
y1="2.5"
|
|
89
|
+
x2="12"
|
|
90
|
+
y2="6.5"
|
|
91
|
+
opacity="0.55"
|
|
92
|
+
transform="rotate(150 12 12)"
|
|
93
|
+
></line>
|
|
94
|
+
<line
|
|
95
|
+
x1="12"
|
|
96
|
+
y1="2.5"
|
|
97
|
+
x2="12"
|
|
98
|
+
y2="6.5"
|
|
99
|
+
opacity="0.625"
|
|
100
|
+
transform="rotate(180 12 12)"
|
|
101
|
+
></line>
|
|
102
|
+
<line
|
|
103
|
+
x1="12"
|
|
104
|
+
y1="2.5"
|
|
105
|
+
x2="12"
|
|
106
|
+
y2="6.5"
|
|
107
|
+
opacity="0.7"
|
|
108
|
+
transform="rotate(210 12 12)"
|
|
109
|
+
></line>
|
|
110
|
+
<line
|
|
111
|
+
x1="12"
|
|
112
|
+
y1="2.5"
|
|
113
|
+
x2="12"
|
|
114
|
+
y2="6.5"
|
|
115
|
+
opacity="0.775"
|
|
116
|
+
transform="rotate(240 12 12)"
|
|
117
|
+
></line>
|
|
118
|
+
<line
|
|
119
|
+
x1="12"
|
|
120
|
+
y1="2.5"
|
|
121
|
+
x2="12"
|
|
122
|
+
y2="6.5"
|
|
123
|
+
opacity="0.85"
|
|
124
|
+
transform="rotate(270 12 12)"
|
|
125
|
+
></line>
|
|
126
|
+
<line
|
|
127
|
+
x1="12"
|
|
128
|
+
y1="2.5"
|
|
129
|
+
x2="12"
|
|
130
|
+
y2="6.5"
|
|
131
|
+
opacity="0.925"
|
|
132
|
+
transform="rotate(300 12 12)"
|
|
133
|
+
></line>
|
|
134
|
+
<line
|
|
135
|
+
x1="12"
|
|
136
|
+
y1="2.5"
|
|
137
|
+
x2="12"
|
|
138
|
+
y2="6.5"
|
|
139
|
+
opacity="1"
|
|
140
|
+
transform="rotate(330 12 12)"
|
|
141
|
+
></line>
|
|
142
|
+
</svg>
|
|
143
|
+
</div>
|
|
144
|
+
</template>
|
|
145
|
+
|
|
146
|
+
<table
|
|
147
|
+
:class="`ttdk-table ${tableClass || ''}`.trim()"
|
|
148
|
+
:data-variant="variant || 'default'"
|
|
149
|
+
:data-size="size || 'md'"
|
|
150
|
+
:data-hoverable="hoverable !== false ? 'true' : 'false'"
|
|
151
|
+
:data-sticky-header="stickyHeader ? 'true' : undefined"
|
|
152
|
+
:style="{
|
|
153
|
+
...(minWidth
|
|
154
|
+
? {
|
|
155
|
+
minWidth:
|
|
156
|
+
typeof minWidth === 'number' ? `${minWidth}px` : minWidth,
|
|
157
|
+
}
|
|
158
|
+
: {}),
|
|
159
|
+
...buildUiVars(tableStyle),
|
|
160
|
+
}"
|
|
161
|
+
>
|
|
162
|
+
<template v-if="caption">
|
|
163
|
+
<caption class="ttdk-table-caption">
|
|
164
|
+
{{
|
|
165
|
+
caption
|
|
166
|
+
}}
|
|
167
|
+
</caption>
|
|
168
|
+
</template>
|
|
169
|
+
|
|
170
|
+
<slot />
|
|
171
|
+
</table>
|
|
172
|
+
</div>
|
|
173
|
+
</template>
|
|
174
|
+
|
|
175
|
+
<script setup lang="ts">
|
|
176
|
+
import { buildUiVars, UiProps } from "../../core/types";
|
|
177
|
+
|
|
178
|
+
export type TableUiProps = UiProps;
|
|
179
|
+
export interface TableProps {
|
|
180
|
+
/**
|
|
181
|
+
* Varian tampilan visual tabel.
|
|
182
|
+
* - `'default'`: Tampilan standar dengan latar bersih dan bingkai kartu.
|
|
183
|
+
* - `'striped'`: Tampilan selang-seling (zebra).
|
|
184
|
+
* - `'clean'`: Tampilan minimalis tanpa border luar dan tanpa shadow.
|
|
185
|
+
* @default 'default'
|
|
186
|
+
*/
|
|
187
|
+
variant?: "default" | "striped" | "clean";
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Kerapatan / ukuran tinggi baris tabel.
|
|
191
|
+
* - `'sm'`: Kompak (padat).
|
|
192
|
+
* - `'md'`: Standar.
|
|
193
|
+
* - `'lg'`: Lega.
|
|
194
|
+
* @default 'md'
|
|
195
|
+
*/
|
|
196
|
+
size?: "sm" | "md" | "lg";
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Sudut kelengkungan radius tabel.
|
|
200
|
+
* - Preset: `'none'` | `'xs'` | `'sm'` | `'md'` | `'lg'` | `'xl'` | `'full'`
|
|
201
|
+
* - Nilai custom: `'12px'`, `'1rem'`, atau angka `12`
|
|
202
|
+
* @default 'sm'
|
|
203
|
+
*/
|
|
204
|
+
rounded?:
|
|
205
|
+
| "none"
|
|
206
|
+
| "xs"
|
|
207
|
+
| "sm"
|
|
208
|
+
| "md"
|
|
209
|
+
| "lg"
|
|
210
|
+
| "xl"
|
|
211
|
+
| "full"
|
|
212
|
+
| (string & {})
|
|
213
|
+
| number;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Bayangan elevasi kontainer tabel.
|
|
217
|
+
* - Preset: `'none'` | `'sm'` | `'md'` | `'lg'`
|
|
218
|
+
* - Nilai custom: CSS box-shadow string (contoh: `'0 4px 20px rgba(0,0,0,0.1)'`)
|
|
219
|
+
* @default 'sm'
|
|
220
|
+
*/
|
|
221
|
+
shadow?: "none" | "sm" | "md" | "lg" | (string & {});
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Lebar minimum elemen table di dalam wrapper untuk menjaga susunan kolom dan memicu horizontal scroll.
|
|
225
|
+
* Contoh: `700`, `'700px'`, `'max-content'`
|
|
226
|
+
*/
|
|
227
|
+
minWidth?: string | number;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Ketinggian maksimum kontainer tabel untuk memicu scroll vertikal internal (sangat direkomendasikan saat stickyHeader aktif).
|
|
231
|
+
* Contoh: `280`, `'280px'`, `'50vh'`
|
|
232
|
+
*/
|
|
233
|
+
maxHeight?: string | number;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Efek hover saat kursor melayang di atas baris tabel.
|
|
237
|
+
* @default true
|
|
238
|
+
*/
|
|
239
|
+
hoverable?: boolean;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Membuat header tabel menempel di atas (sticky) saat konten di-scroll.
|
|
243
|
+
* @default false
|
|
244
|
+
*/
|
|
245
|
+
stickyHeader?: boolean;
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Menampilkan spinner loading overlay di atas tabel.
|
|
249
|
+
* @default false
|
|
250
|
+
*/
|
|
251
|
+
loading?: boolean;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Teks caption aksesibilitas untuk tabel (dirender sebagai elemen `<caption>`).
|
|
255
|
+
*/
|
|
256
|
+
caption?: string;
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Inline CSS style object native.
|
|
260
|
+
*/
|
|
261
|
+
style?: any;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Kustomisasi visual granular root kontainer wrapper (.ttdk-table-wrapper) melalui UiProps.
|
|
265
|
+
*/
|
|
266
|
+
ui?: UiProps;
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Style kustom untuk elemen table (table.ttdk-table) melalui UiProps.
|
|
270
|
+
*/
|
|
271
|
+
tableStyle?: UiProps;
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Class CSS kustom untuk elemen table (table.ttdk-table).
|
|
275
|
+
*/
|
|
276
|
+
tableClass?: string;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Class CSS kustom untuk kontainer wrapper luar.
|
|
280
|
+
*/
|
|
281
|
+
className?: string;
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Konten anak (TableHeader, TableBody, TableFooter, TableCaption).
|
|
285
|
+
*/
|
|
286
|
+
children?: any;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Komponen kontainer utama tabel (Compound Table ala Shadcn UI).
|
|
291
|
+
*/
|
|
292
|
+
|
|
293
|
+
const props = withDefaults(defineProps<TableProps>(), {
|
|
294
|
+
variant: "default",
|
|
295
|
+
size: "md",
|
|
296
|
+
hoverable: true,
|
|
297
|
+
});
|
|
298
|
+
</script>
|
|
@@ -0,0 +1,119 @@
|
|
|
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 TableUiProps = UiProps;
|
|
7
|
+
|
|
8
|
+
export interface TableProps {
|
|
9
|
+
/**
|
|
10
|
+
* Varian tampilan visual tabel.
|
|
11
|
+
* - `'default'`: Tampilan standar dengan latar bersih dan bingkai kartu.
|
|
12
|
+
* - `'striped'`: Tampilan selang-seling (zebra).
|
|
13
|
+
* - `'clean'`: Tampilan minimalis tanpa border luar dan tanpa shadow.
|
|
14
|
+
* @default 'default'
|
|
15
|
+
*/
|
|
16
|
+
variant?: "default" | "striped" | "clean";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Kerapatan / ukuran tinggi baris tabel.
|
|
20
|
+
* - `'sm'`: Kompak (padat).
|
|
21
|
+
* - `'md'`: Standar.
|
|
22
|
+
* - `'lg'`: Lega.
|
|
23
|
+
* @default 'md'
|
|
24
|
+
*/
|
|
25
|
+
size?: "sm" | "md" | "lg";
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Sudut kelengkungan radius tabel.
|
|
29
|
+
* - Preset: `'none'` | `'xs'` | `'sm'` | `'md'` | `'lg'` | `'xl'` | `'full'`
|
|
30
|
+
* - Nilai custom: `'12px'`, `'1rem'`, atau angka `12`
|
|
31
|
+
* @default 'sm'
|
|
32
|
+
*/
|
|
33
|
+
rounded?:
|
|
34
|
+
| "none"
|
|
35
|
+
| "xs"
|
|
36
|
+
| "sm"
|
|
37
|
+
| "md"
|
|
38
|
+
| "lg"
|
|
39
|
+
| "xl"
|
|
40
|
+
| "full"
|
|
41
|
+
| (string & {})
|
|
42
|
+
| number;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Bayangan elevasi kontainer tabel.
|
|
46
|
+
* - Preset: `'none'` | `'sm'` | `'md'` | `'lg'`
|
|
47
|
+
* - Nilai custom: CSS box-shadow string (contoh: `'0 4px 20px rgba(0,0,0,0.1)'`)
|
|
48
|
+
* @default 'sm'
|
|
49
|
+
*/
|
|
50
|
+
shadow?: "none" | "sm" | "md" | "lg" | (string & {});
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Lebar minimum elemen table di dalam wrapper untuk menjaga susunan kolom dan memicu horizontal scroll.
|
|
54
|
+
* Contoh: `700`, `'700px'`, `'max-content'`
|
|
55
|
+
*/
|
|
56
|
+
minWidth?: string | number;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Ketinggian maksimum kontainer tabel untuk memicu scroll vertikal internal (sangat direkomendasikan saat stickyHeader aktif).
|
|
60
|
+
* Contoh: `280`, `'280px'`, `'50vh'`
|
|
61
|
+
*/
|
|
62
|
+
maxHeight?: string | number;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Efek hover saat kursor melayang di atas baris tabel.
|
|
66
|
+
* @default true
|
|
67
|
+
*/
|
|
68
|
+
hoverable?: boolean;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Membuat header tabel menempel di atas (sticky) saat konten di-scroll.
|
|
72
|
+
* @default false
|
|
73
|
+
*/
|
|
74
|
+
stickyHeader?: boolean;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Menampilkan spinner loading overlay di atas tabel.
|
|
78
|
+
* @default false
|
|
79
|
+
*/
|
|
80
|
+
loading?: boolean;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Teks caption aksesibilitas untuk tabel (dirender sebagai elemen `<caption>`).
|
|
84
|
+
*/
|
|
85
|
+
caption?: string;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Inline CSS style object native.
|
|
89
|
+
*/
|
|
90
|
+
style?: any;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Kustomisasi visual granular root kontainer wrapper (.ttdk-table-wrapper) melalui UiProps.
|
|
94
|
+
*/
|
|
95
|
+
ui?: UiProps;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Style kustom untuk elemen table (table.ttdk-table) melalui UiProps.
|
|
99
|
+
*/
|
|
100
|
+
tableStyle?: UiProps;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Class CSS kustom untuk elemen table (table.ttdk-table).
|
|
104
|
+
*/
|
|
105
|
+
tableClass?: string;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Class CSS kustom untuk kontainer wrapper luar.
|
|
109
|
+
*/
|
|
110
|
+
className?: string;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Konten anak (TableHeader, TableBody, TableFooter, TableCaption).
|
|
114
|
+
*/
|
|
115
|
+
children?: any;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
declare const component: DefineComponent<TableProps>;
|
|
119
|
+
export default component;
|