@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,224 @@
|
|
|
1
|
+
<script context="module"></script>
|
|
2
|
+
|
|
3
|
+
<script>import { buildUiVars, UiProps } from "../../core/types";
|
|
4
|
+
export let value = void 0;
|
|
5
|
+
export let defaultValue = void 0;
|
|
6
|
+
export let onInput = void 0;
|
|
7
|
+
export let onChange = void 0;
|
|
8
|
+
export let className = void 0;
|
|
9
|
+
export let disabled = void 0;
|
|
10
|
+
export let error = void 0;
|
|
11
|
+
export let errorMessage = void 0;
|
|
12
|
+
export let size = void 0;
|
|
13
|
+
export let block = void 0;
|
|
14
|
+
export let ui = void 0;
|
|
15
|
+
export let label = void 0;
|
|
16
|
+
export let labelClass = void 0;
|
|
17
|
+
export let id = void 0;
|
|
18
|
+
export let labelStyle = void 0;
|
|
19
|
+
export let required = void 0;
|
|
20
|
+
export let optional = void 0;
|
|
21
|
+
export let optionalText = void 0;
|
|
22
|
+
export let helperText = void 0;
|
|
23
|
+
export let helperTextPosition = void 0;
|
|
24
|
+
export let helperTextClass = void 0;
|
|
25
|
+
export let helperTextStyle = void 0;
|
|
26
|
+
export let wrapperClass = void 0;
|
|
27
|
+
export let rounded = void 0;
|
|
28
|
+
export let wrapperStyle = void 0;
|
|
29
|
+
export let inputRef = void 0;
|
|
30
|
+
export let textareaClass = void 0;
|
|
31
|
+
export let name = void 0;
|
|
32
|
+
export let placeholder = void 0;
|
|
33
|
+
export let rows = void 0;
|
|
34
|
+
export let readOnly = void 0;
|
|
35
|
+
export let autoComplete = void 0;
|
|
36
|
+
export let maxLength = void 0;
|
|
37
|
+
export let minLength = void 0;
|
|
38
|
+
export let resize = void 0;
|
|
39
|
+
export let textareaStyle = void 0;
|
|
40
|
+
export let onBlur = void 0;
|
|
41
|
+
export let onFocus = void 0;
|
|
42
|
+
export let onKeyDown = void 0;
|
|
43
|
+
export let onKeyUp = void 0;
|
|
44
|
+
export let showCount = void 0;
|
|
45
|
+
export let errorMessageClass = void 0;
|
|
46
|
+
export let errorMessageStyle = void 0;
|
|
47
|
+
export let charCountClass = void 0;
|
|
48
|
+
export let charCountStyle = void 0;
|
|
49
|
+
function stringifyStyles(stylesObj) {
|
|
50
|
+
let styles = "";
|
|
51
|
+
for (let key in stylesObj) {
|
|
52
|
+
const dashedKey = key.replace(/[A-Z]/g, function(match) {
|
|
53
|
+
return "-" + match.toLowerCase();
|
|
54
|
+
});
|
|
55
|
+
styles += dashedKey + ":" + stylesObj[key] + ";";
|
|
56
|
+
}
|
|
57
|
+
return styles;
|
|
58
|
+
}
|
|
59
|
+
function handleInput(e) {
|
|
60
|
+
if (value === void 0) {
|
|
61
|
+
innerValue = e.target.value;
|
|
62
|
+
}
|
|
63
|
+
if (onInput) {
|
|
64
|
+
onInput(e);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function handleChange(e) {
|
|
68
|
+
if (value === void 0) {
|
|
69
|
+
innerValue = e.target.value;
|
|
70
|
+
}
|
|
71
|
+
if (onChange) {
|
|
72
|
+
onChange(e);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
$:
|
|
76
|
+
currentLength = () => {
|
|
77
|
+
if (value !== void 0) {
|
|
78
|
+
return String(value).length;
|
|
79
|
+
}
|
|
80
|
+
return innerValue.length;
|
|
81
|
+
};
|
|
82
|
+
let innerValue = value !== void 0 ? String(value) : defaultValue !== void 0 ? String(defaultValue) : "";
|
|
83
|
+
function onUpdateFn_0(..._args) {
|
|
84
|
+
if (value !== void 0) {
|
|
85
|
+
innerValue = String(value);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
$:
|
|
89
|
+
onUpdateFn_0(...[value]);
|
|
90
|
+
</script>
|
|
91
|
+
|
|
92
|
+
<div
|
|
93
|
+
style={stringifyStyles({
|
|
94
|
+
...buildUiVars(ui),
|
|
95
|
+
...(ui || {}),
|
|
96
|
+
})}
|
|
97
|
+
class={`ttdk-form-item ${className || ""}`.trim()}
|
|
98
|
+
data-disabled={disabled}
|
|
99
|
+
data-error={Boolean(error || errorMessage)}
|
|
100
|
+
data-size={size || "md"}
|
|
101
|
+
data-block={block ? "true" : undefined}
|
|
102
|
+
>
|
|
103
|
+
{#if label}
|
|
104
|
+
<label
|
|
105
|
+
style={stringifyStyles({
|
|
106
|
+
...buildUiVars(labelStyle),
|
|
107
|
+
})}
|
|
108
|
+
class={`ttdk-form-label ${labelClass || ""}`.trim()}
|
|
109
|
+
for={id}
|
|
110
|
+
><span>{label}</span>
|
|
111
|
+
{#if required}
|
|
112
|
+
<span class="ttdk-form-required" aria-hidden="true"> * </span>
|
|
113
|
+
{/if}
|
|
114
|
+
{#if optional}
|
|
115
|
+
<span class="ttdk-form-optional">{optionalText || "(Opsional)"}</span>
|
|
116
|
+
{/if}</label
|
|
117
|
+
>
|
|
118
|
+
{/if}
|
|
119
|
+
{#if helperText && helperTextPosition === "top"}
|
|
120
|
+
<div
|
|
121
|
+
style={stringifyStyles({
|
|
122
|
+
...buildUiVars(helperTextStyle),
|
|
123
|
+
})}
|
|
124
|
+
class={`ttdk-form-helper-text ${helperTextClass || ""}`.trim()}
|
|
125
|
+
>
|
|
126
|
+
{helperText}
|
|
127
|
+
</div>
|
|
128
|
+
{/if}
|
|
129
|
+
<div
|
|
130
|
+
style={stringifyStyles({
|
|
131
|
+
...buildUiVars(wrapperStyle),
|
|
132
|
+
})}
|
|
133
|
+
class={`ttdk-textarea-wrapper ${wrapperClass || ""}`.trim()}
|
|
134
|
+
data-filled={Boolean(value !== undefined ? value : innerValue)}
|
|
135
|
+
data-error={Boolean(error || errorMessage)}
|
|
136
|
+
data-disabled={Boolean(disabled)}
|
|
137
|
+
data-size={size || "md"}
|
|
138
|
+
data-rounded={rounded || "md"}
|
|
139
|
+
>
|
|
140
|
+
<textarea
|
|
141
|
+
style={stringifyStyles({
|
|
142
|
+
resize: resize || "vertical",
|
|
143
|
+
...buildUiVars(textareaStyle),
|
|
144
|
+
})}
|
|
145
|
+
bind:this={inputRef}
|
|
146
|
+
class={`ttdk-textarea-control ${textareaClass || ""}`.trim()}
|
|
147
|
+
{name}
|
|
148
|
+
{id}
|
|
149
|
+
value={value !== undefined ? value : innerValue}
|
|
150
|
+
{placeholder}
|
|
151
|
+
rows={rows || 4}
|
|
152
|
+
{disabled}
|
|
153
|
+
{readOnly}
|
|
154
|
+
{required}
|
|
155
|
+
autocomplete={autoComplete}
|
|
156
|
+
{maxLength}
|
|
157
|
+
{minLength}
|
|
158
|
+
aria-invalid={Boolean(error || errorMessage)}
|
|
159
|
+
on:change={(e) => {
|
|
160
|
+
handleChange(e);
|
|
161
|
+
}}
|
|
162
|
+
on:input={(e) => {
|
|
163
|
+
handleInput(e);
|
|
164
|
+
}}
|
|
165
|
+
on:blur={(e) => {
|
|
166
|
+
onBlur && onBlur(e);
|
|
167
|
+
}}
|
|
168
|
+
on:focus={(e) => {
|
|
169
|
+
onFocus && onFocus(e);
|
|
170
|
+
}}
|
|
171
|
+
on:keydown={(e) => {
|
|
172
|
+
onKeyDown && onKeyDown(e);
|
|
173
|
+
}}
|
|
174
|
+
on:keyup={(e) => {
|
|
175
|
+
onKeyUp && onKeyUp(e);
|
|
176
|
+
}}
|
|
177
|
+
/>
|
|
178
|
+
</div>
|
|
179
|
+
{#if (helperText && helperTextPosition !== "top") || (errorMessage && (error || errorMessage)) || showCount}
|
|
180
|
+
<div class="ttdk-form-footer">
|
|
181
|
+
{#if (helperText && helperTextPosition !== "top") || (errorMessage && (error || errorMessage))}
|
|
182
|
+
<div class="ttdk-form-footer-message">
|
|
183
|
+
{#if helperText && helperTextPosition !== "top"}
|
|
184
|
+
<div
|
|
185
|
+
style={stringifyStyles({
|
|
186
|
+
...buildUiVars(helperTextStyle),
|
|
187
|
+
})}
|
|
188
|
+
class={`ttdk-form-helper-text ${helperTextClass || ""}`.trim()}
|
|
189
|
+
>
|
|
190
|
+
{helperText}
|
|
191
|
+
</div>
|
|
192
|
+
{/if}
|
|
193
|
+
{#if errorMessage && (error || errorMessage)}
|
|
194
|
+
<div
|
|
195
|
+
style={stringifyStyles({
|
|
196
|
+
...buildUiVars(errorMessageStyle),
|
|
197
|
+
})}
|
|
198
|
+
role="alert"
|
|
199
|
+
class={`ttdk-form-error-msg ${errorMessageClass || ""}`.trim()}
|
|
200
|
+
>
|
|
201
|
+
<span>{errorMessage}</span>
|
|
202
|
+
</div>
|
|
203
|
+
{/if}
|
|
204
|
+
</div>
|
|
205
|
+
{/if}
|
|
206
|
+
{#if showCount}
|
|
207
|
+
<div
|
|
208
|
+
style={stringifyStyles({
|
|
209
|
+
...buildUiVars(charCountStyle),
|
|
210
|
+
})}
|
|
211
|
+
aria-live="polite"
|
|
212
|
+
class={`ttdk-form-char-count ${charCountClass || ""}`.trim()}
|
|
213
|
+
>
|
|
214
|
+
{currentLength()}
|
|
215
|
+
{#if maxLength}
|
|
216
|
+
{` / ${maxLength}`}
|
|
217
|
+
{:else}
|
|
218
|
+
<div _text="" />
|
|
219
|
+
{/if}
|
|
220
|
+
</div>
|
|
221
|
+
{/if}
|
|
222
|
+
</div>
|
|
223
|
+
{/if}
|
|
224
|
+
</div>
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
export type TextareaUiProps = UiProps;
|
|
3
|
+
export interface TextareaProps {
|
|
4
|
+
/**
|
|
5
|
+
* Teks label judul field yang ditampilkan di atas textarea (14px Semibold, #141313).
|
|
6
|
+
*/
|
|
7
|
+
label?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Style kustom untuk elemen label judul field (UiProps).
|
|
10
|
+
*/
|
|
11
|
+
labelStyle?: UiProps;
|
|
12
|
+
/**
|
|
13
|
+
* Class CSS kustom untuk elemen label judul field.
|
|
14
|
+
*/
|
|
15
|
+
labelClass?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Style kustom untuk elemen kontainer textarea wrapper (UiProps).
|
|
18
|
+
*/
|
|
19
|
+
wrapperStyle?: UiProps;
|
|
20
|
+
/**
|
|
21
|
+
* Class CSS kustom untuk elemen kontainer textarea wrapper.
|
|
22
|
+
*/
|
|
23
|
+
wrapperClass?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Style kustom untuk elemen textarea control HTML (UiProps).
|
|
26
|
+
*/
|
|
27
|
+
textareaStyle?: UiProps;
|
|
28
|
+
/**
|
|
29
|
+
* Class CSS kustom untuk elemen textarea control HTML.
|
|
30
|
+
*/
|
|
31
|
+
textareaClass?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Style kustom untuk elemen pesan error validasi (UiProps).
|
|
34
|
+
*/
|
|
35
|
+
errorMessageStyle?: UiProps;
|
|
36
|
+
/**
|
|
37
|
+
* Class CSS kustom untuk elemen pesan error validasi.
|
|
38
|
+
*/
|
|
39
|
+
errorMessageClass?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Style kustom untuk elemen helper text (UiProps).
|
|
42
|
+
*/
|
|
43
|
+
helperTextStyle?: UiProps;
|
|
44
|
+
/**
|
|
45
|
+
* Class CSS kustom untuk elemen helper text.
|
|
46
|
+
*/
|
|
47
|
+
helperTextClass?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Style kustom untuk elemen penghitung karakter (UiProps).
|
|
50
|
+
*/
|
|
51
|
+
charCountStyle?: UiProps;
|
|
52
|
+
/**
|
|
53
|
+
* Class CSS kustom untuk elemen penghitung karakter.
|
|
54
|
+
*/
|
|
55
|
+
charCountClass?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Menandai field sebagai opsi opsional dengan menambahkan teks '(Opsional)' (12px Regular, #9698A2).
|
|
58
|
+
*/
|
|
59
|
+
optional?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Kustomisasi teks keterangan opsional.
|
|
62
|
+
* @default '(Opsional)'
|
|
63
|
+
*/
|
|
64
|
+
optionalText?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Nilai teks placeholder saat textarea kosong (#9698A2).
|
|
67
|
+
*/
|
|
68
|
+
placeholder?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Nilai terkontrol (controlled value) pada textarea.
|
|
71
|
+
*/
|
|
72
|
+
value?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Nilai awal tidak terkontrol (uncontrolled initial value).
|
|
75
|
+
*/
|
|
76
|
+
defaultValue?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Jumlah baris default yang ditampilkan.
|
|
79
|
+
* @default 4
|
|
80
|
+
*/
|
|
81
|
+
rows?: number;
|
|
82
|
+
/**
|
|
83
|
+
* Nama form field HTML untuk integrasi formulir.
|
|
84
|
+
*/
|
|
85
|
+
name?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Identifier unik elemen textarea.
|
|
88
|
+
*/
|
|
89
|
+
id?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Kontrol orientasi resize oleh pengguna.
|
|
92
|
+
* - `'none'`: Tidak dapat di-resize
|
|
93
|
+
* - `'vertical'`: Hanya dapat di-resize vertikal (standar)
|
|
94
|
+
* - `'horizontal'`: Hanya dapat di-resize horizontal
|
|
95
|
+
* - `'both'`: Bebas di-resize kedua arah
|
|
96
|
+
* @default 'vertical'
|
|
97
|
+
*/
|
|
98
|
+
resize?: "none" | "vertical" | "horizontal" | "both";
|
|
99
|
+
/**
|
|
100
|
+
* Status apakah textarea sedang dalam kondisi error / tidak valid.
|
|
101
|
+
* @default false
|
|
102
|
+
*/
|
|
103
|
+
error?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Pesan teks penjelasan kesalahan validasi di bawah field.
|
|
106
|
+
*/
|
|
107
|
+
errorMessage?: string;
|
|
108
|
+
/**
|
|
109
|
+
* Teks petunjuk atau keterangan bantuan di bawah field (12px Regular, #3C4245).
|
|
110
|
+
*/
|
|
111
|
+
helperText?: string;
|
|
112
|
+
/**
|
|
113
|
+
* Posisi teks helper
|
|
114
|
+
*/
|
|
115
|
+
helperTextPosition?: "top" | "bottom";
|
|
116
|
+
/**
|
|
117
|
+
* Skala ukuran textarea.
|
|
118
|
+
* - `'sm'`: Padding rapat
|
|
119
|
+
* - `'md'`: Standar
|
|
120
|
+
* - `'lg'`: Padding lapang
|
|
121
|
+
* @default 'md'
|
|
122
|
+
*/
|
|
123
|
+
size?: "sm" | "md" | "lg";
|
|
124
|
+
/**
|
|
125
|
+
* Bentuk sudut kelengkungan textarea.
|
|
126
|
+
* - `'none'`: 0px
|
|
127
|
+
* - `'sm'`: 4px
|
|
128
|
+
* - `'md'`: 8px (standar desain)
|
|
129
|
+
* - `'lg'`: 12px
|
|
130
|
+
* - `'full'`: 16px
|
|
131
|
+
* @default 'md'
|
|
132
|
+
*/
|
|
133
|
+
rounded?: "none" | "sm" | "md" | "lg" | "full";
|
|
134
|
+
/**
|
|
135
|
+
* Menjadikan lebar field textarea memenuhi kontainer penuh (full-width 100%).
|
|
136
|
+
* @default false
|
|
137
|
+
*/
|
|
138
|
+
block?: boolean;
|
|
139
|
+
/**
|
|
140
|
+
* Status apakah field dinonaktifkan (disabled).
|
|
141
|
+
* @default false
|
|
142
|
+
*/
|
|
143
|
+
disabled?: boolean;
|
|
144
|
+
/**
|
|
145
|
+
* Status apakah field bersifat hanya-baca (readonly).
|
|
146
|
+
* @default false
|
|
147
|
+
*/
|
|
148
|
+
readOnly?: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* Menandai field sebagai input wajib diisi (menampilkan tanda bintang merah *).
|
|
151
|
+
* @default false
|
|
152
|
+
*/
|
|
153
|
+
required?: boolean;
|
|
154
|
+
/**
|
|
155
|
+
* Konfigurasi atribut autocomplete HTML.
|
|
156
|
+
*/
|
|
157
|
+
autoComplete?: string;
|
|
158
|
+
/**
|
|
159
|
+
* Batas maksimum panjang karakter.
|
|
160
|
+
*/
|
|
161
|
+
maxLength?: number;
|
|
162
|
+
/**
|
|
163
|
+
* Batas minimum panjang karakter.
|
|
164
|
+
*/
|
|
165
|
+
minLength?: number;
|
|
166
|
+
/**
|
|
167
|
+
* Inline CSS style object native.
|
|
168
|
+
*/
|
|
169
|
+
style?: any;
|
|
170
|
+
/**
|
|
171
|
+
* Kustomisasi visual granular root / form-item (UiProps).
|
|
172
|
+
*/
|
|
173
|
+
ui?: UiProps;
|
|
174
|
+
/**
|
|
175
|
+
* Callback event saat nilai textarea berubah.
|
|
176
|
+
*/
|
|
177
|
+
onChange?: (event: any) => void;
|
|
178
|
+
/**
|
|
179
|
+
* Callback event saat pengguna mengetik (input event).
|
|
180
|
+
*/
|
|
181
|
+
onInput?: (event: any) => void;
|
|
182
|
+
/**
|
|
183
|
+
* Callback event saat textarea kehilangan fokus (blur).
|
|
184
|
+
*/
|
|
185
|
+
onBlur?: (event: any) => void;
|
|
186
|
+
/**
|
|
187
|
+
* Callback event saat textarea mendapatkan fokus.
|
|
188
|
+
*/
|
|
189
|
+
onFocus?: (event: any) => void;
|
|
190
|
+
/**
|
|
191
|
+
* Ref instance elemen textarea HTML untuk akses kontrol DOM langsung (focus, blur, select).
|
|
192
|
+
*/
|
|
193
|
+
inputRef?: any;
|
|
194
|
+
/**
|
|
195
|
+
* Class CSS kustom.
|
|
196
|
+
*/
|
|
197
|
+
className?: string;
|
|
198
|
+
/**
|
|
199
|
+
* Callback event tombol keyboard ditekan.
|
|
200
|
+
*/
|
|
201
|
+
onKeyDown?: (event: any) => void;
|
|
202
|
+
/**
|
|
203
|
+
* Callback event tombol keyboard dilepaskan.
|
|
204
|
+
*/
|
|
205
|
+
onKeyUp?: (event: any) => void;
|
|
206
|
+
/**
|
|
207
|
+
* Menampilkan penghitung karakter di bawah textarea (format: `x / maxLength`).
|
|
208
|
+
* Memerlukan prop `maxLength` untuk berfungsi.
|
|
209
|
+
* @default false
|
|
210
|
+
*/
|
|
211
|
+
showCount?: boolean;
|
|
212
|
+
}
|
|
213
|
+
import { UiProps } from "../../core/types";
|
|
214
|
+
declare const __propDef: {
|
|
215
|
+
props: {
|
|
216
|
+
value?: TextareaProps["value"];
|
|
217
|
+
defaultValue?: TextareaProps["defaultValue"];
|
|
218
|
+
onInput?: TextareaProps["onInput"];
|
|
219
|
+
onChange?: TextareaProps["onChange"];
|
|
220
|
+
className?: TextareaProps["className"];
|
|
221
|
+
disabled?: TextareaProps["disabled"];
|
|
222
|
+
error?: TextareaProps["error"];
|
|
223
|
+
errorMessage?: TextareaProps["errorMessage"];
|
|
224
|
+
size?: TextareaProps["size"];
|
|
225
|
+
block?: TextareaProps["block"];
|
|
226
|
+
ui?: TextareaProps["ui"];
|
|
227
|
+
label?: TextareaProps["label"];
|
|
228
|
+
labelClass?: TextareaProps["labelClass"];
|
|
229
|
+
id?: TextareaProps["id"];
|
|
230
|
+
labelStyle?: TextareaProps["labelStyle"];
|
|
231
|
+
required?: TextareaProps["required"];
|
|
232
|
+
optional?: TextareaProps["optional"];
|
|
233
|
+
optionalText?: TextareaProps["optionalText"];
|
|
234
|
+
helperText?: TextareaProps["helperText"];
|
|
235
|
+
helperTextPosition?: TextareaProps["helperTextPosition"];
|
|
236
|
+
helperTextClass?: TextareaProps["helperTextClass"];
|
|
237
|
+
helperTextStyle?: TextareaProps["helperTextStyle"];
|
|
238
|
+
wrapperClass?: TextareaProps["wrapperClass"];
|
|
239
|
+
rounded?: TextareaProps["rounded"];
|
|
240
|
+
wrapperStyle?: TextareaProps["wrapperStyle"];
|
|
241
|
+
inputRef?: TextareaProps["inputRef"];
|
|
242
|
+
textareaClass?: TextareaProps["textareaClass"];
|
|
243
|
+
name?: TextareaProps["name"];
|
|
244
|
+
placeholder?: TextareaProps["placeholder"];
|
|
245
|
+
rows?: TextareaProps["rows"];
|
|
246
|
+
readOnly?: TextareaProps["readOnly"];
|
|
247
|
+
autoComplete?: TextareaProps["autoComplete"];
|
|
248
|
+
maxLength?: TextareaProps["maxLength"];
|
|
249
|
+
minLength?: TextareaProps["minLength"];
|
|
250
|
+
resize?: TextareaProps["resize"];
|
|
251
|
+
textareaStyle?: TextareaProps["textareaStyle"];
|
|
252
|
+
onBlur?: TextareaProps["onBlur"];
|
|
253
|
+
onFocus?: TextareaProps["onFocus"];
|
|
254
|
+
onKeyDown?: TextareaProps["onKeyDown"];
|
|
255
|
+
onKeyUp?: TextareaProps["onKeyUp"];
|
|
256
|
+
showCount?: TextareaProps["showCount"];
|
|
257
|
+
errorMessageClass?: TextareaProps["errorMessageClass"];
|
|
258
|
+
errorMessageStyle?: TextareaProps["errorMessageStyle"];
|
|
259
|
+
charCountClass?: TextareaProps["charCountClass"];
|
|
260
|
+
charCountStyle?: TextareaProps["charCountStyle"];
|
|
261
|
+
};
|
|
262
|
+
events: {
|
|
263
|
+
[evt: string]: CustomEvent<any>;
|
|
264
|
+
};
|
|
265
|
+
slots: {};
|
|
266
|
+
exports?: {} | undefined;
|
|
267
|
+
bindings?: string | undefined;
|
|
268
|
+
};
|
|
269
|
+
type TextareaProps_ = typeof __propDef.props;
|
|
270
|
+
export type TextareaEvents = typeof __propDef.events;
|
|
271
|
+
export type TextareaSlots = typeof __propDef.slots;
|
|
272
|
+
export default class Textarea extends SvelteComponent<TextareaProps_, TextareaEvents, TextareaSlots> {
|
|
273
|
+
}
|
|
274
|
+
export {};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# <Tooltip /> — TTDK Component Reference
|
|
2
|
+
|
|
3
|
+
Komponen Tooltip untuk menampilkan informasi kontekstual singkat saat pengguna mengarahkan kursor atau memfokuskan elemen pemicu.
|
|
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/tooltip/tooltip.css";`
|
|
8
|
+
|
|
9
|
+
## 2. Subpath Component Import
|
|
10
|
+
```ts
|
|
11
|
+
// React
|
|
12
|
+
import Tooltip from "@ttdk-design-system/library-react/web/tooltip";
|
|
13
|
+
|
|
14
|
+
// Vue 3
|
|
15
|
+
import Tooltip from "@ttdk-design-system/library-vue/web/tooltip";
|
|
16
|
+
|
|
17
|
+
// Svelte
|
|
18
|
+
import Tooltip from "@ttdk-design-system/library-svelte/web/tooltip";
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## 3. Props & API Reference
|
|
22
|
+
|
|
23
|
+
| Prop | Type | Default | Description |
|
|
24
|
+
| :--- | :--- | :--- | :--- |
|
|
25
|
+
| `text?` | `string` | `-` | Teks konten tooltip yang ditampilkan. |
|
|
26
|
+
| `content?` | `any` | `-` | Konten kustom tooltip (JSX / VNode atau renderable content). |
|
|
27
|
+
| `kbd?` | `string | string[]` | `-` | Pintasan keyboard opsional yang ditampilkan di dalam tooltip (misal: '⌘K', ['Ctrl', 'S']). |
|
|
28
|
+
| `placement?` | `TooltipPlacement` | `top` | Posisi penempatan tooltip terhadap elemen pemicu. |
|
|
29
|
+
| `offsetDistance?` | `number` | `8` | Jarak offset dalam pixel dari elemen pemicu (trigger). |
|
|
30
|
+
| `arrow?` | `boolean` | `true` | Menampilkan elemen panah segitiga penunjuk arah ke elemen pemicu. |
|
|
31
|
+
| `openDelay?` | `number` | `150` | Penundaan kemunculan tooltip dalam milidetik (delay saat pointer enter). |
|
|
32
|
+
| `closeDelay?` | `number` | `100` | Penundaan hilangnya tooltip dalam milidetik (delay saat pointer leave). |
|
|
33
|
+
| `open?` | `boolean` | `-` | Status visibilitas tooltip terkontrol (controlled mode). |
|
|
34
|
+
| `defaultOpen?` | `boolean` | `false` | Status visibilitas awal (uncontrolled initial state). |
|
|
35
|
+
| `disabled?` | `boolean` | `false` | Menonaktifkan tooltip sehingga tidak muncul saat di-hover atau difokus. |
|
|
36
|
+
| `ui?` | `TooltipUiProps` | `-` | Kustomisasi visual granular container utama (UiProps). |
|
|
37
|
+
| `style?` | `any` | `-` | Style inline CSS native untuk wrapper luar. |
|
|
38
|
+
| `className?` | `string` | `-` | Class CSS kustom untuk wrapper luar. |
|
|
39
|
+
| `triggerClass?` | `string` | `-` | Class CSS kustom untuk pemicu (trigger container). |
|
|
40
|
+
| `triggerStyle?` | `UiProps` | `-` | Style kustom untuk pemicu (trigger container) (UiProps). |
|
|
41
|
+
| `contentClass?` | `string` | `-` | Class CSS kustom untuk panel tooltip konten. |
|
|
42
|
+
| `contentStyle?` | `UiProps` | `-` | Style kustom untuk panel tooltip konten (UiProps). |
|
|
43
|
+
| `arrowClass?` | `string` | `-` | Class CSS kustom untuk elemen panah (arrow). |
|
|
44
|
+
| `arrowStyle?` | `UiProps` | `-` | Style kustom untuk elemen panah (arrow) (UiProps). |
|
|
45
|
+
| `onOpenChange?` | `(open: boolean) => void` | `-` | Callback saat status open berubah. |
|
|
46
|
+
| `children?` | `any` | `-` | Elemen pemicu (trigger) yang dibungkus oleh tooltip. |
|
|
47
|
+
|
|
48
|
+
## 4. Usage Examples
|
|
49
|
+
|
|
50
|
+
### React Example
|
|
51
|
+
```tsx
|
|
52
|
+
import React from "react";
|
|
53
|
+
import Tooltip from "@ttdk-design-system/library-react/web/tooltip";
|
|
54
|
+
import Button from "@ttdk-design-system/library-react/button";
|
|
55
|
+
import "@ttdk-design-system/library-react/web/tooltip/tooltip.css";
|
|
56
|
+
import "@ttdk-design-system/library-react/button/button.css";
|
|
57
|
+
|
|
58
|
+
export function Example() {
|
|
59
|
+
return (
|
|
60
|
+
<div style={{ display: "flex", gap: "16px", alignItems: "center" }}>
|
|
61
|
+
<Tooltip text="Salin riwayat rekam medis" placement="top" kbd="⌘C">
|
|
62
|
+
<Button variant="outline">Salin</Button>
|
|
63
|
+
</Tooltip>
|
|
64
|
+
<Tooltip text="Kirim resep digital ke apotek" placement="bottom">
|
|
65
|
+
<Button variant="primary">Kirim Resep</Button>
|
|
66
|
+
</Tooltip>
|
|
67
|
+
</div>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Vue 3 Example
|
|
73
|
+
```vue
|
|
74
|
+
<script setup lang="ts">
|
|
75
|
+
import Tooltip from "@ttdk-design-system/library-vue/web/tooltip";
|
|
76
|
+
import Button from "@ttdk-design-system/library-vue/button";
|
|
77
|
+
import "@ttdk-design-system/library-vue/web/tooltip/tooltip.css";
|
|
78
|
+
import "@ttdk-design-system/library-vue/button/button.css";
|
|
79
|
+
</script>
|
|
80
|
+
|
|
81
|
+
<template>
|
|
82
|
+
<div style="display: flex; gap: 16px; align-items: center;">
|
|
83
|
+
<Tooltip text="Salin riwayat rekam medis" placement="top" kbd="⌘C">
|
|
84
|
+
<Button variant="outline">Salin</Button>
|
|
85
|
+
</Tooltip>
|
|
86
|
+
<Tooltip text="Kirim resep digital ke apotek" placement="bottom">
|
|
87
|
+
<Button variant="primary">Kirim Resep</Button>
|
|
88
|
+
</Tooltip>
|
|
89
|
+
</div>
|
|
90
|
+
</template>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Svelte Example
|
|
94
|
+
```svelte
|
|
95
|
+
<script lang="ts">
|
|
96
|
+
import Tooltip from "@ttdk-design-system/library-svelte/web/tooltip";
|
|
97
|
+
import Button from "@ttdk-design-system/library-svelte/button";
|
|
98
|
+
import "@ttdk-design-system/library-svelte/web/tooltip/tooltip.css";
|
|
99
|
+
import "@ttdk-design-system/library-svelte/button/button.css";
|
|
100
|
+
</script>
|
|
101
|
+
|
|
102
|
+
<div style="display: flex; gap: 16px; align-items: center;">
|
|
103
|
+
<Tooltip text="Salin riwayat rekam medis" placement="top" kbd="⌘C">
|
|
104
|
+
<Button variant="outline">Salin</Button>
|
|
105
|
+
</Tooltip>
|
|
106
|
+
<Tooltip text="Kirim resep digital ke apotek" placement="bottom">
|
|
107
|
+
<Button variant="primary">Kirim Resep</Button>
|
|
108
|
+
</Tooltip>
|
|
109
|
+
</div>
|
|
110
|
+
```
|