@digiko-npm/designsystem 0.1.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/README.md +89 -0
- package/dist/designsystem.css +4642 -0
- package/dist/designsystem.js +67 -0
- package/package.json +32 -0
- package/src/base/index.css +2 -0
- package/src/base/reset.css +120 -0
- package/src/base/typography.css +163 -0
- package/src/components/accordion.css +150 -0
- package/src/components/alert.css +150 -0
- package/src/components/avatar.css +109 -0
- package/src/components/badge.css +80 -0
- package/src/components/breadcrumb.css +95 -0
- package/src/components/button.css +168 -0
- package/src/components/card.css +121 -0
- package/src/components/command.css +185 -0
- package/src/components/divider.css +66 -0
- package/src/components/drawer.css +209 -0
- package/src/components/dropdown.css +139 -0
- package/src/components/empty-state.css +69 -0
- package/src/components/index.css +35 -0
- package/src/components/input.css +116 -0
- package/src/components/kbd.css +55 -0
- package/src/components/modal.css +103 -0
- package/src/components/nav.css +153 -0
- package/src/components/pagination.css +166 -0
- package/src/components/popover.css +112 -0
- package/src/components/progress.css +214 -0
- package/src/components/skeleton.css +96 -0
- package/src/components/slider.css +125 -0
- package/src/components/table.css +48 -0
- package/src/components/tabs.css +163 -0
- package/src/components/tag.css +159 -0
- package/src/components/timeline.css +131 -0
- package/src/components/toast.css +70 -0
- package/src/components/toggle.css +135 -0
- package/src/components/tooltip.css +161 -0
- package/src/index.css +19 -0
- package/src/js/theme.js +67 -0
- package/src/tokens/colors.css +180 -0
- package/src/tokens/index.css +11 -0
- package/src/tokens/shadows.css +26 -0
- package/src/tokens/spacing.css +53 -0
- package/src/tokens/typography.css +51 -0
- package/src/utilities/index.css +3 -0
- package/src/utilities/layout.css +134 -0
- package/src/utilities/spacing.css +75 -0
- package/src/utilities/text.css +221 -0
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Utilities: Text, Visual & style helpers
|
|
3
|
+
========================================================================== */
|
|
4
|
+
|
|
5
|
+
/* --- Text Size --- */
|
|
6
|
+
.ds-text-xs { font-size: var(--ds-text-xs); }
|
|
7
|
+
.ds-text-sm { font-size: var(--ds-text-sm); }
|
|
8
|
+
.ds-text-base { font-size: var(--ds-text-base); }
|
|
9
|
+
.ds-text-lg { font-size: var(--ds-text-lg); }
|
|
10
|
+
.ds-text-xl { font-size: var(--ds-text-xl); }
|
|
11
|
+
.ds-text-2xl { font-size: var(--ds-text-2xl); }
|
|
12
|
+
.ds-text-3xl { font-size: var(--ds-text-3xl); }
|
|
13
|
+
.ds-text-4xl { font-size: var(--ds-text-4xl); }
|
|
14
|
+
.ds-text-5xl { font-size: var(--ds-text-5xl); }
|
|
15
|
+
|
|
16
|
+
/* --- Text Weight --- */
|
|
17
|
+
.ds-font-light { font-weight: var(--ds-weight-light); }
|
|
18
|
+
.ds-font-normal { font-weight: var(--ds-weight-normal); }
|
|
19
|
+
.ds-font-medium { font-weight: var(--ds-weight-medium); }
|
|
20
|
+
.ds-font-semibold { font-weight: var(--ds-weight-semibold); }
|
|
21
|
+
.ds-font-bold { font-weight: var(--ds-weight-bold); }
|
|
22
|
+
|
|
23
|
+
/* --- Text Alignment --- */
|
|
24
|
+
.ds-text-left { text-align: left; }
|
|
25
|
+
.ds-text-center { text-align: center; }
|
|
26
|
+
.ds-text-right { text-align: right; }
|
|
27
|
+
.ds-text-balance { text-wrap: balance; }
|
|
28
|
+
|
|
29
|
+
/* --- Text Color --- */
|
|
30
|
+
.ds-text-primary { color: var(--ds-color-text); }
|
|
31
|
+
.ds-text-secondary { color: var(--ds-color-text-secondary); }
|
|
32
|
+
.ds-text-tertiary { color: var(--ds-color-text-tertiary); }
|
|
33
|
+
.ds-text-success { color: var(--ds-color-success); }
|
|
34
|
+
.ds-text-warning { color: var(--ds-color-warning); }
|
|
35
|
+
.ds-text-error { color: var(--ds-color-error); }
|
|
36
|
+
.ds-text-info { color: var(--ds-color-info); }
|
|
37
|
+
|
|
38
|
+
/* --- Background Color --- */
|
|
39
|
+
.ds-bg-base { background-color: var(--ds-color-bg); }
|
|
40
|
+
.ds-bg-surface { background-color: var(--ds-color-surface); }
|
|
41
|
+
.ds-bg-subtle { background-color: var(--ds-color-bg-subtle); }
|
|
42
|
+
.ds-bg-elevated { background-color: var(--ds-color-bg-elevated); }
|
|
43
|
+
.ds-bg-inverted { background-color: var(--ds-color-inverted); color: var(--ds-color-on-inverted); }
|
|
44
|
+
|
|
45
|
+
/* --- Surface Card --- */
|
|
46
|
+
.ds-surface {
|
|
47
|
+
background-color: var(--ds-color-surface);
|
|
48
|
+
border: 1px solid var(--ds-color-border);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.ds-surface--hover {
|
|
52
|
+
transition:
|
|
53
|
+
background-color var(--ds-duration-normal) var(--ds-ease-default),
|
|
54
|
+
border-color var(--ds-duration-normal) var(--ds-ease-default);
|
|
55
|
+
}
|
|
56
|
+
.ds-surface--hover:hover {
|
|
57
|
+
border-color: var(--ds-color-border-hover);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* --- Text Decoration --- */
|
|
61
|
+
.ds-underline { text-decoration: underline; text-underline-offset: 2px; }
|
|
62
|
+
.ds-no-underline { text-decoration: none; }
|
|
63
|
+
|
|
64
|
+
/* --- Text Transform --- */
|
|
65
|
+
.ds-uppercase { text-transform: uppercase; letter-spacing: var(--ds-tracking-wide); }
|
|
66
|
+
.ds-lowercase { text-transform: lowercase; }
|
|
67
|
+
.ds-capitalize { text-transform: capitalize; }
|
|
68
|
+
|
|
69
|
+
/* --- Line Height --- */
|
|
70
|
+
.ds-leading-tight { line-height: var(--ds-leading-tight); }
|
|
71
|
+
.ds-leading-snug { line-height: var(--ds-leading-snug); }
|
|
72
|
+
.ds-leading-normal { line-height: var(--ds-leading-normal); }
|
|
73
|
+
.ds-leading-relaxed { line-height: var(--ds-leading-relaxed); }
|
|
74
|
+
|
|
75
|
+
/* --- Tracking --- */
|
|
76
|
+
.ds-tracking-tighter { letter-spacing: var(--ds-tracking-tighter); }
|
|
77
|
+
.ds-tracking-tight { letter-spacing: var(--ds-tracking-tight); }
|
|
78
|
+
.ds-tracking-normal { letter-spacing: var(--ds-tracking-normal); }
|
|
79
|
+
.ds-tracking-wide { letter-spacing: var(--ds-tracking-wide); }
|
|
80
|
+
|
|
81
|
+
/* --- Truncation --- */
|
|
82
|
+
.ds-truncate {
|
|
83
|
+
overflow: hidden;
|
|
84
|
+
text-overflow: ellipsis;
|
|
85
|
+
white-space: nowrap;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.ds-line-clamp-2 {
|
|
89
|
+
display: -webkit-box;
|
|
90
|
+
-webkit-line-clamp: 2;
|
|
91
|
+
-webkit-box-orient: vertical;
|
|
92
|
+
overflow: hidden;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.ds-line-clamp-3 {
|
|
96
|
+
display: -webkit-box;
|
|
97
|
+
-webkit-line-clamp: 3;
|
|
98
|
+
-webkit-box-orient: vertical;
|
|
99
|
+
overflow: hidden;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* --- Border --- */
|
|
103
|
+
.ds-border { border: 1px solid var(--ds-color-border); }
|
|
104
|
+
.ds-border-t { border-top: 1px solid var(--ds-color-border); }
|
|
105
|
+
.ds-border-b { border-bottom: 1px solid var(--ds-color-border); }
|
|
106
|
+
.ds-border-none { border: none; }
|
|
107
|
+
|
|
108
|
+
/* --- Border Radius --- */
|
|
109
|
+
.ds-rounded-none { border-radius: var(--ds-radius-none); }
|
|
110
|
+
.ds-rounded-sm { border-radius: var(--ds-radius-sm); }
|
|
111
|
+
.ds-rounded { border-radius: var(--ds-radius-md); }
|
|
112
|
+
.ds-rounded-lg { border-radius: var(--ds-radius-lg); }
|
|
113
|
+
.ds-rounded-xl { border-radius: var(--ds-radius-xl); }
|
|
114
|
+
.ds-rounded-2xl { border-radius: var(--ds-radius-2xl); }
|
|
115
|
+
.ds-rounded-full { border-radius: var(--ds-radius-full); }
|
|
116
|
+
|
|
117
|
+
/* --- Shadow --- */
|
|
118
|
+
.ds-shadow-sm { box-shadow: var(--ds-shadow-sm); }
|
|
119
|
+
.ds-shadow { box-shadow: var(--ds-shadow-md); }
|
|
120
|
+
.ds-shadow-lg { box-shadow: var(--ds-shadow-lg); }
|
|
121
|
+
.ds-shadow-none { box-shadow: none; }
|
|
122
|
+
|
|
123
|
+
/* --- Opacity --- */
|
|
124
|
+
.ds-opacity-0 { opacity: 0; }
|
|
125
|
+
.ds-opacity-50 { opacity: 0.5; }
|
|
126
|
+
.ds-opacity-100 { opacity: 1; }
|
|
127
|
+
|
|
128
|
+
/* --- Cursor --- */
|
|
129
|
+
.ds-cursor-pointer { cursor: pointer; }
|
|
130
|
+
.ds-cursor-default { cursor: default; }
|
|
131
|
+
.ds-cursor-not-allowed { cursor: not-allowed; }
|
|
132
|
+
|
|
133
|
+
/* --- Transitions --- */
|
|
134
|
+
.ds-tr-colors {
|
|
135
|
+
transition:
|
|
136
|
+
color var(--ds-duration-normal) var(--ds-ease-default),
|
|
137
|
+
background-color var(--ds-duration-normal) var(--ds-ease-default),
|
|
138
|
+
border-color var(--ds-duration-normal) var(--ds-ease-default);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.ds-tr-all {
|
|
142
|
+
transition: all var(--ds-duration-normal) var(--ds-ease-default);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.ds-tr-opacity {
|
|
146
|
+
transition: opacity var(--ds-duration-normal) var(--ds-ease-default);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* --- Animations --- */
|
|
150
|
+
@keyframes ds-fade-in {
|
|
151
|
+
from { opacity: 0; }
|
|
152
|
+
to { opacity: 1; }
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
@keyframes ds-slide-up {
|
|
156
|
+
from { opacity: 0; transform: translateY(8px); }
|
|
157
|
+
to { opacity: 1; transform: translateY(0); }
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
@keyframes ds-scale-in {
|
|
161
|
+
from { opacity: 0; transform: scale(0.96); }
|
|
162
|
+
to { opacity: 1; transform: scale(1); }
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
@keyframes ds-spin {
|
|
166
|
+
to { transform: rotate(360deg); }
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@keyframes ds-pulse {
|
|
170
|
+
0%, 100% { opacity: 1; }
|
|
171
|
+
50% { opacity: 0.5; }
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.ds-animate-fade-in { animation: ds-fade-in var(--ds-duration-fast) ease; }
|
|
175
|
+
.ds-animate-slide-up { animation: ds-slide-up var(--ds-duration-normal) var(--ds-ease-out-expo); }
|
|
176
|
+
.ds-animate-scale-in { animation: ds-scale-in var(--ds-duration-normal) var(--ds-ease-out-expo); }
|
|
177
|
+
.ds-animate-spin { animation: ds-spin 1s linear infinite; }
|
|
178
|
+
.ds-animate-pulse { animation: ds-pulse 2s ease-in-out infinite; }
|
|
179
|
+
|
|
180
|
+
/* --- Scroll Reveal --- */
|
|
181
|
+
.ds-reveal {
|
|
182
|
+
opacity: 0;
|
|
183
|
+
transform: translateY(32px);
|
|
184
|
+
transition:
|
|
185
|
+
opacity var(--ds-duration-slower) var(--ds-ease-out-expo),
|
|
186
|
+
transform var(--ds-duration-slower) var(--ds-ease-out-expo);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.ds-reveal.ds-visible {
|
|
190
|
+
opacity: 1;
|
|
191
|
+
transform: translateY(0);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.ds-reveal-delay-1 { transition-delay: 100ms; }
|
|
195
|
+
.ds-reveal-delay-2 { transition-delay: 200ms; }
|
|
196
|
+
.ds-reveal-delay-3 { transition-delay: 300ms; }
|
|
197
|
+
.ds-reveal-delay-4 { transition-delay: 400ms; }
|
|
198
|
+
|
|
199
|
+
/* --- Grain Overlay (optional) --- */
|
|
200
|
+
.ds-grain::before {
|
|
201
|
+
content: "";
|
|
202
|
+
position: fixed;
|
|
203
|
+
inset: 0;
|
|
204
|
+
z-index: 9999;
|
|
205
|
+
pointer-events: none;
|
|
206
|
+
opacity: 0.03;
|
|
207
|
+
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/* --- Accessibility --- */
|
|
211
|
+
.ds-sr-only {
|
|
212
|
+
position: absolute;
|
|
213
|
+
width: 1px;
|
|
214
|
+
height: 1px;
|
|
215
|
+
padding: 0;
|
|
216
|
+
margin: -1px;
|
|
217
|
+
overflow: hidden;
|
|
218
|
+
clip: rect(0, 0, 0, 0);
|
|
219
|
+
white-space: nowrap;
|
|
220
|
+
border-width: 0;
|
|
221
|
+
}
|