@ttdk-design-system/library-svelte 0.0.0-stage → 1.0.1
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/README.md +102 -2
- 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 +710 -4
- package/ttdk-manifest.json +10188 -0
package/README.md
CHANGED
|
@@ -1,3 +1,103 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @ttdk-design-system/library-svelte
|
|
2
|
+
|
|
3
|
+
Official Svelte component library for **TTDK Design System**, developed for the Digital Transformation Office (DTO) Kementerian Kesehatan Republik Indonesia (SATUSEHAT ecosystem).
|
|
4
|
+
|
|
5
|
+
Built with Mitosis for seamless cross-framework consistency, strong TypeScript typings, and mobile webview readiness.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 📦 Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @ttdk-design-system/library-svelte
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 🚀 Quick Start
|
|
18
|
+
|
|
19
|
+
### 1. Import Design Tokens (CSS)
|
|
20
|
+
|
|
21
|
+
Import the base design tokens (colors, typography, radii, spacing) in your root layout or entry file (e.g., `+layout.svelte` or `App.svelte`):
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import "@ttdk-design-system/library-svelte/theme/tokens.css";
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### 2. Import Component Stylesheets & Components
|
|
28
|
+
|
|
29
|
+
Each component comes with modular styling for optimal bundle sizes:
|
|
30
|
+
|
|
31
|
+
```svelte
|
|
32
|
+
<script lang="ts">
|
|
33
|
+
import Button from "@ttdk-design-system/library-svelte/web/button";
|
|
34
|
+
import "@ttdk-design-system/library-svelte/web/button/button.css";
|
|
35
|
+
|
|
36
|
+
import Input from "@ttdk-design-system/library-svelte/web/input";
|
|
37
|
+
import "@ttdk-design-system/library-svelte/web/input/input.css";
|
|
38
|
+
|
|
39
|
+
import BottomSheet from "@ttdk-design-system/library-svelte/webview/bottomsheet";
|
|
40
|
+
import "@ttdk-design-system/library-svelte/webview/bottomsheet/bottomsheet.css";
|
|
41
|
+
|
|
42
|
+
let sheetOpen = false;
|
|
43
|
+
let name = "";
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<div style="padding: 24px; display: flex; flex-direction: column; gap: 16px;">
|
|
47
|
+
<Input
|
|
48
|
+
bind:value={name}
|
|
49
|
+
label="Nama Pasien"
|
|
50
|
+
placeholder="Masukkan nama lengkap"
|
|
51
|
+
/>
|
|
52
|
+
|
|
53
|
+
<Button variant="primary" on:click={() => (sheetOpen = true)}>
|
|
54
|
+
Buka Detail (BottomSheet)
|
|
55
|
+
</Button>
|
|
56
|
+
|
|
57
|
+
<BottomSheet
|
|
58
|
+
open={sheetOpen}
|
|
59
|
+
mode="auto"
|
|
60
|
+
height="md"
|
|
61
|
+
title="Detail Rekam Medis"
|
|
62
|
+
description="Hasil pemeriksaan laboratorium pasien"
|
|
63
|
+
close={true}
|
|
64
|
+
onClose={() => (sheetOpen = false)}
|
|
65
|
+
>
|
|
66
|
+
<p>Halo, {name || "Pasien"}! Data medis Anda telah terverifikasi di SATUSEHAT.</p>
|
|
67
|
+
</BottomSheet>
|
|
68
|
+
</div>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## 📱 Modules
|
|
74
|
+
|
|
75
|
+
TTDK Design System is split into two specialized modules:
|
|
76
|
+
|
|
77
|
+
1. **`web`**: Components designed for desktop & mobile responsive web applications (Accordion, Alert, Avatar, Badge, Button, Calendar, Card, Checkbox, Chip, Dropdown, Modal, Pagination, Popover, Selectbox, Sonner, Table, Tabs, Text, Textarea, Tooltip).
|
|
78
|
+
2. **`webview`**: Components optimized for mobile in-app webviews (e.g., SATUSEHAT Mobile), featuring native Apple HIG & Material 3 aesthetics, notch safe-area insets, swipe gestures, and pull-to-dismiss behavior (BottomSheet, ButtonIos, ButtonMaterial).
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## 🎨 Tailwind CSS Integration
|
|
83
|
+
|
|
84
|
+
Include the TTDK preset in your `tailwind.config.js`:
|
|
85
|
+
|
|
86
|
+
```javascript
|
|
87
|
+
module.exports = {
|
|
88
|
+
presets: [
|
|
89
|
+
require("@ttdk-design-system/library-svelte/tailwind-preset.cjs")
|
|
90
|
+
],
|
|
91
|
+
content: [
|
|
92
|
+
"./src/**/*.{svelte,js,ts,jsx,tsx}",
|
|
93
|
+
"./node_modules/@ttdk-design-system/library-svelte/**/*.{svelte,js,ts,jsx,tsx}"
|
|
94
|
+
]
|
|
95
|
+
};
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 📄 License
|
|
101
|
+
|
|
102
|
+
MIT © DTO Kementerian Kesehatan Republik Indonesia.
|
|
2
103
|
|
|
3
|
-
This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TTDK Design System — Official Tailwind CSS Preset (CommonJS)
|
|
3
|
+
*/
|
|
4
|
+
module.exports = {
|
|
5
|
+
theme: {
|
|
6
|
+
extend: {
|
|
7
|
+
spacing: {
|
|
8
|
+
"0": "var(--ttdk-spacing-0, 0px)",
|
|
9
|
+
"2": "var(--ttdk-spacing-2, 2px)",
|
|
10
|
+
"4": "var(--ttdk-spacing-4, 4px)",
|
|
11
|
+
"6": "var(--ttdk-spacing-6, 6px)",
|
|
12
|
+
"8": "var(--ttdk-spacing-8, 8px)",
|
|
13
|
+
"12": "var(--ttdk-spacing-12, 12px)",
|
|
14
|
+
"16": "var(--ttdk-spacing-16, 16px)",
|
|
15
|
+
"20": "var(--ttdk-spacing-20, 20px)",
|
|
16
|
+
"24": "var(--ttdk-spacing-24, 24px)",
|
|
17
|
+
"32": "var(--ttdk-spacing-32, 32px)",
|
|
18
|
+
"48": "var(--ttdk-spacing-48, 48px)",
|
|
19
|
+
"64": "var(--ttdk-spacing-64, 64px)",
|
|
20
|
+
"96": "var(--ttdk-spacing-96, 96px)",
|
|
21
|
+
},
|
|
22
|
+
boxShadow: {
|
|
23
|
+
"ttdk-sm": "var(--ttdk-shadow-sm, 0px 1px 10px 0px rgba(0, 0, 0, 0.08))",
|
|
24
|
+
"ttdk-md": "var(--ttdk-shadow-md, 0px 1px 15px 0px rgba(0, 0, 0, 0.1))",
|
|
25
|
+
"ttdk-lg": "var(--ttdk-shadow-lg, 0px 4px 12px 0px rgba(48, 49, 53, 0.2))",
|
|
26
|
+
"ttdk-top": "var(--ttdk-shadow-top, 0px 4px 12px 0px rgba(48, 49, 53, 0.2))",
|
|
27
|
+
"ttdk-bottom": "var(--ttdk-shadow-bottom, 0px 4px 16px 0px rgba(0, 0, 0, 0.08))",
|
|
28
|
+
"ttdk-right": "var(--ttdk-shadow-right, 4px 0px 16px 0px rgba(0, 0, 0, 0.08))",
|
|
29
|
+
"ttdk-left": "var(--ttdk-shadow-left, -4px 0px 16px 0px rgba(0, 0, 0, 0.08))",
|
|
30
|
+
},
|
|
31
|
+
maxWidth: {
|
|
32
|
+
"ttdk-mobile": "var(--ttdk-grid-mobile-container, 328px)",
|
|
33
|
+
"ttdk-desktop": "var(--ttdk-grid-desktop-container, 1128px)",
|
|
34
|
+
},
|
|
35
|
+
colors: {
|
|
36
|
+
ttdk: {
|
|
37
|
+
primary: {
|
|
38
|
+
DEFAULT: "var(--ttdk-brand-default, #16b3ac)",
|
|
39
|
+
hover: "var(--ttdk-brand-strong, #128f8a)",
|
|
40
|
+
subtle: "var(--ttdk-brand-subtle, #b8edea)",
|
|
41
|
+
},
|
|
42
|
+
accent: {
|
|
43
|
+
DEFAULT: "var(--ttdk-color-brand-blue-500, #3899fe)",
|
|
44
|
+
hover: "var(--ttdk-color-brand-blue-600, #1e81e8)",
|
|
45
|
+
},
|
|
46
|
+
surface: {
|
|
47
|
+
DEFAULT: "var(--ttdk-bg-base-primary, #ffffff)",
|
|
48
|
+
subtle: "var(--ttdk-bg-secondary-disabled, #f1f2f3)",
|
|
49
|
+
dark: "var(--ttdk-color-neutral-black, #141313)",
|
|
50
|
+
},
|
|
51
|
+
border: {
|
|
52
|
+
DEFAULT: "var(--ttdk-stroke-subtle, #e4e5e7)",
|
|
53
|
+
dark: "var(--ttdk-stroke-subtle, #313336)",
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
fontFamily: {
|
|
58
|
+
sans: ["Manrope", "ui-sans-serif", "system-ui", "-apple-system", "sans-serif"],
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export namespace theme {
|
|
2
|
+
namespace extend {
|
|
3
|
+
let spacing: {
|
|
4
|
+
"0": string;
|
|
5
|
+
"2": string;
|
|
6
|
+
"4": string;
|
|
7
|
+
"6": string;
|
|
8
|
+
"8": string;
|
|
9
|
+
"12": string;
|
|
10
|
+
"16": string;
|
|
11
|
+
"20": string;
|
|
12
|
+
"24": string;
|
|
13
|
+
"32": string;
|
|
14
|
+
"48": string;
|
|
15
|
+
"64": string;
|
|
16
|
+
"96": string;
|
|
17
|
+
};
|
|
18
|
+
let boxShadow: {
|
|
19
|
+
"ttdk-sm": string;
|
|
20
|
+
"ttdk-md": string;
|
|
21
|
+
"ttdk-lg": string;
|
|
22
|
+
"ttdk-top": string;
|
|
23
|
+
"ttdk-bottom": string;
|
|
24
|
+
"ttdk-right": string;
|
|
25
|
+
"ttdk-left": string;
|
|
26
|
+
};
|
|
27
|
+
let maxWidth: {
|
|
28
|
+
"ttdk-mobile": string;
|
|
29
|
+
"ttdk-desktop": string;
|
|
30
|
+
};
|
|
31
|
+
namespace colors {
|
|
32
|
+
namespace ttdk {
|
|
33
|
+
namespace primary {
|
|
34
|
+
let DEFAULT: string;
|
|
35
|
+
let hover: string;
|
|
36
|
+
let subtle: string;
|
|
37
|
+
}
|
|
38
|
+
namespace accent {
|
|
39
|
+
let DEFAULT_1: string;
|
|
40
|
+
export { DEFAULT_1 as DEFAULT };
|
|
41
|
+
let hover_1: string;
|
|
42
|
+
export { hover_1 as hover };
|
|
43
|
+
}
|
|
44
|
+
namespace surface {
|
|
45
|
+
let DEFAULT_2: string;
|
|
46
|
+
export { DEFAULT_2 as DEFAULT };
|
|
47
|
+
let subtle_1: string;
|
|
48
|
+
export { subtle_1 as subtle };
|
|
49
|
+
export let dark: string;
|
|
50
|
+
}
|
|
51
|
+
namespace border {
|
|
52
|
+
let DEFAULT_3: string;
|
|
53
|
+
export { DEFAULT_3 as DEFAULT };
|
|
54
|
+
let dark_1: string;
|
|
55
|
+
export { dark_1 as dark };
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
namespace fontFamily {
|
|
60
|
+
let sans: string[];
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TTDK Design System — Official Tailwind CSS Preset
|
|
3
|
+
*
|
|
4
|
+
* Maps all design tokens (colors, spacing scale, shadows, breakpoints)
|
|
5
|
+
* to standard Tailwind CSS theme configuration.
|
|
6
|
+
*
|
|
7
|
+
* Usage in tailwind.config.js / tailwind.config.ts:
|
|
8
|
+
* ```js
|
|
9
|
+
* module.exports = {
|
|
10
|
+
* presets: [require('@ttdk-design-system/library-vue/tailwind-preset')],
|
|
11
|
+
* content: ['./src/**\/*.{vue,js,ts,jsx,tsx}']
|
|
12
|
+
* }
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare const ttdkTailwindPreset: {
|
|
16
|
+
theme: {
|
|
17
|
+
extend: {
|
|
18
|
+
spacing: {
|
|
19
|
+
"0": string;
|
|
20
|
+
"2": string;
|
|
21
|
+
"4": string;
|
|
22
|
+
"6": string;
|
|
23
|
+
"8": string;
|
|
24
|
+
"12": string;
|
|
25
|
+
"16": string;
|
|
26
|
+
"20": string;
|
|
27
|
+
"24": string;
|
|
28
|
+
"32": string;
|
|
29
|
+
"48": string;
|
|
30
|
+
"64": string;
|
|
31
|
+
"96": string;
|
|
32
|
+
};
|
|
33
|
+
boxShadow: {
|
|
34
|
+
"ttdk-sm": string;
|
|
35
|
+
"ttdk-md": string;
|
|
36
|
+
"ttdk-lg": string;
|
|
37
|
+
"ttdk-top": string;
|
|
38
|
+
"ttdk-bottom": string;
|
|
39
|
+
"ttdk-right": string;
|
|
40
|
+
"ttdk-left": string;
|
|
41
|
+
};
|
|
42
|
+
maxWidth: {
|
|
43
|
+
"ttdk-mobile": string;
|
|
44
|
+
"ttdk-desktop": string;
|
|
45
|
+
};
|
|
46
|
+
colors: {
|
|
47
|
+
ttdk: {
|
|
48
|
+
primary: {
|
|
49
|
+
DEFAULT: string;
|
|
50
|
+
hover: string;
|
|
51
|
+
subtle: string;
|
|
52
|
+
};
|
|
53
|
+
accent: {
|
|
54
|
+
DEFAULT: string;
|
|
55
|
+
hover: string;
|
|
56
|
+
};
|
|
57
|
+
surface: {
|
|
58
|
+
DEFAULT: string;
|
|
59
|
+
subtle: string;
|
|
60
|
+
dark: string;
|
|
61
|
+
};
|
|
62
|
+
border: {
|
|
63
|
+
DEFAULT: string;
|
|
64
|
+
dark: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
fontFamily: {
|
|
69
|
+
sans: string[];
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
export default ttdkTailwindPreset;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TTDK Design System — Official Tailwind CSS Preset
|
|
3
|
+
*
|
|
4
|
+
* Maps all design tokens (colors, spacing scale, shadows, breakpoints)
|
|
5
|
+
* to standard Tailwind CSS theme configuration.
|
|
6
|
+
*
|
|
7
|
+
* Usage in tailwind.config.js / tailwind.config.ts:
|
|
8
|
+
* ```js
|
|
9
|
+
* module.exports = {
|
|
10
|
+
* presets: [require('@ttdk-design-system/library-vue/tailwind-preset')],
|
|
11
|
+
* content: ['./src/**\/*.{vue,js,ts,jsx,tsx}']
|
|
12
|
+
* }
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export const ttdkTailwindPreset = {
|
|
16
|
+
theme: {
|
|
17
|
+
extend: {
|
|
18
|
+
// 1. Spacing Scale TTDK (0, 2, 4, 6, 8, 12, 16, 20, 24, 32, 48, 64, 96)
|
|
19
|
+
spacing: {
|
|
20
|
+
"0": "var(--ttdk-spacing-0, 0px)",
|
|
21
|
+
"2": "var(--ttdk-spacing-2, 2px)",
|
|
22
|
+
"4": "var(--ttdk-spacing-4, 4px)",
|
|
23
|
+
"6": "var(--ttdk-spacing-6, 6px)",
|
|
24
|
+
"8": "var(--ttdk-spacing-8, 8px)",
|
|
25
|
+
"12": "var(--ttdk-spacing-12, 12px)",
|
|
26
|
+
"16": "var(--ttdk-spacing-16, 16px)",
|
|
27
|
+
"20": "var(--ttdk-spacing-20, 20px)",
|
|
28
|
+
"24": "var(--ttdk-spacing-24, 24px)",
|
|
29
|
+
"32": "var(--ttdk-spacing-32, 32px)",
|
|
30
|
+
"48": "var(--ttdk-spacing-48, 48px)",
|
|
31
|
+
"64": "var(--ttdk-spacing-64, 64px)",
|
|
32
|
+
"96": "var(--ttdk-spacing-96, 96px)",
|
|
33
|
+
},
|
|
34
|
+
// 2. Shadows & Elevation TTDK
|
|
35
|
+
boxShadow: {
|
|
36
|
+
"ttdk-sm": "var(--ttdk-shadow-sm, 0px 1px 10px 0px rgba(0, 0, 0, 0.08))",
|
|
37
|
+
"ttdk-md": "var(--ttdk-shadow-md, 0px 1px 15px 0px rgba(0, 0, 0, 0.1))",
|
|
38
|
+
"ttdk-lg": "var(--ttdk-shadow-lg, 0px 4px 12px 0px rgba(48, 49, 53, 0.2))",
|
|
39
|
+
"ttdk-top": "var(--ttdk-shadow-top, 0px 4px 12px 0px rgba(48, 49, 53, 0.2))",
|
|
40
|
+
"ttdk-bottom": "var(--ttdk-shadow-bottom, 0px 4px 16px 0px rgba(0, 0, 0, 0.08))",
|
|
41
|
+
"ttdk-right": "var(--ttdk-shadow-right, 4px 0px 16px 0px rgba(0, 0, 0, 0.08))",
|
|
42
|
+
"ttdk-left": "var(--ttdk-shadow-left, -4px 0px 16px 0px rgba(0, 0, 0, 0.08))",
|
|
43
|
+
},
|
|
44
|
+
// 3. Responsive Container Widths
|
|
45
|
+
maxWidth: {
|
|
46
|
+
"ttdk-mobile": "var(--ttdk-grid-mobile-container, 328px)",
|
|
47
|
+
"ttdk-desktop": "var(--ttdk-grid-desktop-container, 1128px)",
|
|
48
|
+
},
|
|
49
|
+
// 4. Semantic & Brand Colors
|
|
50
|
+
colors: {
|
|
51
|
+
ttdk: {
|
|
52
|
+
primary: {
|
|
53
|
+
DEFAULT: "var(--ttdk-brand-default, #16b3ac)",
|
|
54
|
+
hover: "var(--ttdk-brand-strong, #128f8a)",
|
|
55
|
+
subtle: "var(--ttdk-brand-subtle, #b8edea)",
|
|
56
|
+
},
|
|
57
|
+
accent: {
|
|
58
|
+
DEFAULT: "var(--ttdk-color-brand-blue-500, #3899fe)",
|
|
59
|
+
hover: "var(--ttdk-color-brand-blue-600, #1e81e8)",
|
|
60
|
+
},
|
|
61
|
+
surface: {
|
|
62
|
+
DEFAULT: "var(--ttdk-bg-base-primary, #ffffff)",
|
|
63
|
+
subtle: "var(--ttdk-bg-secondary-disabled, #f1f2f3)",
|
|
64
|
+
dark: "var(--ttdk-color-neutral-black, #141313)",
|
|
65
|
+
},
|
|
66
|
+
border: {
|
|
67
|
+
DEFAULT: "var(--ttdk-stroke-subtle, #e4e5e7)",
|
|
68
|
+
dark: "var(--ttdk-stroke-subtle, #313336)",
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
// 5. Typography
|
|
73
|
+
fontFamily: {
|
|
74
|
+
sans: ["Manrope", "ui-sans-serif", "system-ui", "-apple-system", "sans-serif"],
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
export default ttdkTailwindPreset;
|