@adamarant/designsystem 0.11.2
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 +101 -0
- package/dist/designsystem.css +13494 -0
- package/dist/designsystem.js +67 -0
- package/dist/designsystem.min.css +2 -0
- package/package.json +111 -0
- package/src/base/index.css +2 -0
- package/src/base/reset.css +119 -0
- package/src/base/typography.css +172 -0
- package/src/components/accordion.css +166 -0
- package/src/components/admin-layout.css +371 -0
- package/src/components/alert.css +159 -0
- package/src/components/avatar.css +109 -0
- package/src/components/badge.css +80 -0
- package/src/components/bottom-nav.css +125 -0
- package/src/components/bottom-sheet.css +146 -0
- package/src/components/breadcrumb.css +102 -0
- package/src/components/button.css +250 -0
- package/src/components/card.css +117 -0
- package/src/components/chip.css +79 -0
- package/src/components/collapsible.css +112 -0
- package/src/components/color-picker.css +82 -0
- package/src/components/combobox.css +420 -0
- package/src/components/command.css +210 -0
- package/src/components/context-menu.css +162 -0
- package/src/components/copy-button.css +106 -0
- package/src/components/custom-select.css +446 -0
- package/src/components/datepicker.css +301 -0
- package/src/components/description-list.css +100 -0
- package/src/components/divider.css +66 -0
- package/src/components/drawer.css +234 -0
- package/src/components/drop-zone.css +166 -0
- package/src/components/dropdown.css +169 -0
- package/src/components/empty-state.css +75 -0
- package/src/components/field.css +112 -0
- package/src/components/gallery.css +257 -0
- package/src/components/hero.css +111 -0
- package/src/components/icon-btn.css +103 -0
- package/src/components/index.css +74 -0
- package/src/components/input.css +311 -0
- package/src/components/kbd.css +54 -0
- package/src/components/media-library.css +230 -0
- package/src/components/modal.css +136 -0
- package/src/components/nav.css +198 -0
- package/src/components/number-input.css +163 -0
- package/src/components/pagination.css +175 -0
- package/src/components/pin-input.css +136 -0
- package/src/components/popover.css +111 -0
- package/src/components/progress.css +217 -0
- package/src/components/prose.css +337 -0
- package/src/components/result.css +80 -0
- package/src/components/scroll-area.css +73 -0
- package/src/components/search.css +311 -0
- package/src/components/segmented-control.css +94 -0
- package/src/components/skeleton.css +100 -0
- package/src/components/slider.css +133 -0
- package/src/components/sortable.css +70 -0
- package/src/components/spinner.css +60 -0
- package/src/components/star-rating.css +121 -0
- package/src/components/stat-card.css +44 -0
- package/src/components/table.css +359 -0
- package/src/components/tabs.css +215 -0
- package/src/components/tag.css +188 -0
- package/src/components/timeline.css +130 -0
- package/src/components/toast.css +90 -0
- package/src/components/toggle.css +173 -0
- package/src/components/toolbar.css +206 -0
- package/src/components/tooltip.css +167 -0
- package/src/components/truncated-text.css +75 -0
- package/src/index.css +21 -0
- package/src/js/theme.js +67 -0
- package/src/tokens/colors.css +256 -0
- package/src/tokens/index.css +11 -0
- package/src/tokens/shadows.css +55 -0
- package/src/tokens/spacing.css +82 -0
- package/src/tokens/tokens.json +413 -0
- package/src/tokens/typography.css +90 -0
- package/src/utilities/a11y.css +102 -0
- package/src/utilities/index.css +7 -0
- package/src/utilities/interactive.css +121 -0
- package/src/utilities/layout.css +273 -0
- package/src/utilities/sizing.css +85 -0
- package/src/utilities/spacing.css +204 -0
- package/src/utilities/states.css +182 -0
- package/src/utilities/text.css +381 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Component: Drop Zone
|
|
3
|
+
Dashed-border upload area with icon, label, hint, and progress states.
|
|
4
|
+
|
|
5
|
+
ARIA requirements (consumer responsibility):
|
|
6
|
+
- Container: role="button" if clickable, tabindex="0" for keyboard access
|
|
7
|
+
- Label: aria-label="Upload files" or visible label via aria-labelledby
|
|
8
|
+
- Drag state: announce via aria-live="polite" region
|
|
9
|
+
- Progress: use aria-busy="true" during upload, aria-valuenow for progress
|
|
10
|
+
==========================================================================
|
|
11
|
+
|
|
12
|
+
Usage:
|
|
13
|
+
<div class="ds-drop-zone">
|
|
14
|
+
<div class="ds-drop-zone__icon">☁</div>
|
|
15
|
+
<p class="ds-drop-zone__label">Drop files here or click to upload</p>
|
|
16
|
+
<p class="ds-drop-zone__hint">JPG, PNG, WebP · Max 10 MB</p>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
States:
|
|
20
|
+
ds-drop-zone--active Drag-over highlight
|
|
21
|
+
ds-drop-zone--uploading Progress state (reduced opacity on content)
|
|
22
|
+
|
|
23
|
+
Sizes:
|
|
24
|
+
ds-drop-zone--lg Taller area (empty-state hero usage)
|
|
25
|
+
|
|
26
|
+
========================================================================== */
|
|
27
|
+
|
|
28
|
+
/* ---------------------------------------------------------------------------
|
|
29
|
+
Base
|
|
30
|
+
--------------------------------------------------------------------------- */
|
|
31
|
+
|
|
32
|
+
.ds-drop-zone {
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
align-items: center;
|
|
36
|
+
justify-content: center;
|
|
37
|
+
gap: var(--ds-space-3);
|
|
38
|
+
padding: var(--ds-space-8) var(--ds-space-6);
|
|
39
|
+
border: none;
|
|
40
|
+
border-radius: var(--ds-radius-xl);
|
|
41
|
+
text-align: center;
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
background-color: transparent;
|
|
44
|
+
transition:
|
|
45
|
+
background-color var(--ds-duration-fast) var(--ds-ease-default);
|
|
46
|
+
|
|
47
|
+
/* The dashed border is rendered as an inline SVG background-image because
|
|
48
|
+
CSS dashed borders don't anti-alias well around border-radius. SVG in
|
|
49
|
+
data: URLs can't reference CSS custom properties, so the stroke colors
|
|
50
|
+
are inlined per theme below — they MUST stay in sync with
|
|
51
|
+
--ds-color-border / --ds-color-border-hover / --ds-color-border-active. */
|
|
52
|
+
|
|
53
|
+
&:focus-visible {
|
|
54
|
+
outline: none;
|
|
55
|
+
box-shadow: 0 0 0 var(--ds-ring-width) var(--ds-ring-color);
|
|
56
|
+
scroll-margin-block: var(--ds-space-16, 4rem);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* ---------------------------------------------------------------------------
|
|
60
|
+
Hover background only — stroke handled per theme below
|
|
61
|
+
--------------------------------------------------------------------------- */
|
|
62
|
+
|
|
63
|
+
&:hover {
|
|
64
|
+
background-color: var(--ds-color-surface-hover);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* ---------------------------------------------------------------------------
|
|
68
|
+
Icon container
|
|
69
|
+
--------------------------------------------------------------------------- */
|
|
70
|
+
|
|
71
|
+
&__icon {
|
|
72
|
+
display: flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
width: 3rem;
|
|
76
|
+
height: 3rem;
|
|
77
|
+
border-radius: var(--ds-radius-xl);
|
|
78
|
+
background-color: var(--ds-color-surface-muted);
|
|
79
|
+
color: var(--ds-color-text-secondary);
|
|
80
|
+
transition: color var(--ds-duration-fast) var(--ds-ease-default);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&:hover &__icon {
|
|
84
|
+
color: var(--ds-color-text);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* ---------------------------------------------------------------------------
|
|
88
|
+
Label + hint
|
|
89
|
+
--------------------------------------------------------------------------- */
|
|
90
|
+
|
|
91
|
+
&__label {
|
|
92
|
+
font-size: var(--ds-text-sm);
|
|
93
|
+
font-weight: var(--ds-weight-medium);
|
|
94
|
+
color: var(--ds-color-text);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&__hint {
|
|
98
|
+
font-size: var(--ds-text-xs);
|
|
99
|
+
color: var(--ds-color-text-tertiary);
|
|
100
|
+
margin-block-start: calc(-1 * var(--ds-space-1));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* ---------------------------------------------------------------------------
|
|
104
|
+
States
|
|
105
|
+
--------------------------------------------------------------------------- */
|
|
106
|
+
|
|
107
|
+
/* Active — drag-over: bg only, stroke handled per theme below */
|
|
108
|
+
&--active {
|
|
109
|
+
background-color: var(--ds-color-surface-active);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* Uploading */
|
|
113
|
+
&--uploading {
|
|
114
|
+
pointer-events: none;
|
|
115
|
+
opacity: 0.7;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* ---------------------------------------------------------------------------
|
|
119
|
+
Sizes
|
|
120
|
+
--------------------------------------------------------------------------- */
|
|
121
|
+
|
|
122
|
+
&--lg {
|
|
123
|
+
padding: var(--ds-space-16) var(--ds-space-4);
|
|
124
|
+
min-height: 16rem;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* ---------------------------------------------------------------------------
|
|
128
|
+
Error message
|
|
129
|
+
--------------------------------------------------------------------------- */
|
|
130
|
+
|
|
131
|
+
&__error {
|
|
132
|
+
font-size: var(--ds-text-xs);
|
|
133
|
+
color: var(--ds-color-error);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* ===========================================================================
|
|
138
|
+
Theme-scoped dashed border strokes — hex values mirror the border tokens
|
|
139
|
+
exactly so the drop zone reads as a tinted variant of the standard border.
|
|
140
|
+
=========================================================================== */
|
|
141
|
+
|
|
142
|
+
/* Light theme — mirrors --ds-color-border / -hover / -active in colors.css */
|
|
143
|
+
[data-theme="light"] .ds-drop-zone {
|
|
144
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3E%3Crect x='1' y='1' width='99%25' height='99%25' rx='16' ry='16' fill='none' stroke='%23e4e4e7' stroke-width='2' stroke-dasharray='10 8'/%3E%3C/svg%3E");
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
[data-theme="light"] .ds-drop-zone:hover {
|
|
148
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3E%3Crect x='1' y='1' width='99%25' height='99%25' rx='16' ry='16' fill='none' stroke='%23d4d4d8' stroke-width='2' stroke-dasharray='10 8'/%3E%3C/svg%3E");
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
[data-theme="light"] .ds-drop-zone--active {
|
|
152
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3E%3Crect x='1' y='1' width='99%25' height='99%25' rx='16' ry='16' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-dasharray='10 8'/%3E%3C/svg%3E");
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* Dark theme — mirrors --ds-color-border / -hover / -active in colors.css */
|
|
156
|
+
[data-theme="dark"] .ds-drop-zone {
|
|
157
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3E%3Crect x='1' y='1' width='99%25' height='99%25' rx='16' ry='16' fill='none' stroke='%2327272a' stroke-width='2' stroke-dasharray='10 8'/%3E%3C/svg%3E");
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
[data-theme="dark"] .ds-drop-zone:hover {
|
|
161
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3E%3Crect x='1' y='1' width='99%25' height='99%25' rx='16' ry='16' fill='none' stroke='%233f3f46' stroke-width='2' stroke-dasharray='10 8'/%3E%3C/svg%3E");
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
[data-theme="dark"] .ds-drop-zone--active {
|
|
165
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3E%3Crect x='1' y='1' width='99%25' height='99%25' rx='16' ry='16' fill='none' stroke='%2352525b' stroke-width='2' stroke-dasharray='10 8'/%3E%3C/svg%3E");
|
|
166
|
+
}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Component: Dropdown
|
|
3
|
+
Floating menu with surface bg, scale transition, keyboard-friendly items.
|
|
4
|
+
|
|
5
|
+
ARIA requirements (consumer responsibility):
|
|
6
|
+
- Trigger: aria-haspopup="true", aria-expanded="true|false"
|
|
7
|
+
- Menu: role="menu"
|
|
8
|
+
- Items: role="menuitem"
|
|
9
|
+
- Keyboard: ArrowUp/Down to navigate, Enter to select, Escape to close
|
|
10
|
+
- On open: move focus to first menu item
|
|
11
|
+
- On close: return focus to trigger
|
|
12
|
+
========================================================================== */
|
|
13
|
+
|
|
14
|
+
.ds-dropdown {
|
|
15
|
+
position: relative;
|
|
16
|
+
|
|
17
|
+
/* Open state — modifier on parent */
|
|
18
|
+
&--open .ds-dropdown__menu {
|
|
19
|
+
opacity: 1;
|
|
20
|
+
visibility: visible;
|
|
21
|
+
transform: scale(1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* --- Trigger --- */
|
|
25
|
+
|
|
26
|
+
&__trigger {
|
|
27
|
+
display: inline-flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* --- Menu panel --- */
|
|
33
|
+
|
|
34
|
+
&__menu {
|
|
35
|
+
position: absolute;
|
|
36
|
+
inset-block-start: calc(100% + var(--ds-space-1));
|
|
37
|
+
inset-inline-start: 0;
|
|
38
|
+
z-index: var(--ds-z-dropdown);
|
|
39
|
+
min-width: 12rem;
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
padding-block: var(--ds-space-1-5);
|
|
43
|
+
background-color: var(--ds-color-surface-muted);
|
|
44
|
+
border: 1px solid var(--ds-color-border);
|
|
45
|
+
border-radius: var(--ds-radius-xl);
|
|
46
|
+
box-shadow: var(--ds-shadow-lg);
|
|
47
|
+
opacity: 0;
|
|
48
|
+
visibility: hidden;
|
|
49
|
+
transform: scale(0.96);
|
|
50
|
+
transform-origin: top left;
|
|
51
|
+
transition:
|
|
52
|
+
opacity var(--ds-duration-normal) var(--ds-ease-default),
|
|
53
|
+
visibility var(--ds-duration-normal) var(--ds-ease-default),
|
|
54
|
+
transform var(--ds-duration-normal) var(--ds-ease-out-expo);
|
|
55
|
+
|
|
56
|
+
/* Open state — modifier on menu */
|
|
57
|
+
&--open {
|
|
58
|
+
opacity: 1;
|
|
59
|
+
visibility: visible;
|
|
60
|
+
transform: scale(1);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* --- Alignment variants --- */
|
|
64
|
+
|
|
65
|
+
&--right {
|
|
66
|
+
inset-inline-start: auto;
|
|
67
|
+
inset-inline-end: 0;
|
|
68
|
+
transform-origin: top right;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&--up {
|
|
72
|
+
inset-block-start: auto;
|
|
73
|
+
inset-block-end: calc(100% + var(--ds-space-1));
|
|
74
|
+
transform-origin: bottom left;
|
|
75
|
+
|
|
76
|
+
&.ds-dropdown__menu--right {
|
|
77
|
+
transform-origin: bottom right;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* --- Width variants --- */
|
|
82
|
+
&--sm { min-width: 8rem; }
|
|
83
|
+
&--lg { min-width: 20rem; }
|
|
84
|
+
&--full { width: 100%; }
|
|
85
|
+
&--auto { min-width: auto; }
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* --- Menu item --- */
|
|
89
|
+
|
|
90
|
+
&__item {
|
|
91
|
+
display: flex;
|
|
92
|
+
flex-direction: row;
|
|
93
|
+
align-items: center;
|
|
94
|
+
gap: var(--ds-space-2);
|
|
95
|
+
padding: var(--ds-space-2) var(--ds-space-3);
|
|
96
|
+
margin-inline: var(--ds-space-1);
|
|
97
|
+
font-size: var(--ds-text-sm);
|
|
98
|
+
color: var(--ds-color-text-secondary);
|
|
99
|
+
cursor: pointer;
|
|
100
|
+
border-radius: var(--ds-radius-md);
|
|
101
|
+
transition:
|
|
102
|
+
color var(--ds-duration-fast) var(--ds-ease-default),
|
|
103
|
+
background-color var(--ds-duration-fast) var(--ds-ease-default);
|
|
104
|
+
|
|
105
|
+
&:hover {
|
|
106
|
+
background-color: var(--ds-color-surface-muted-hover);
|
|
107
|
+
color: var(--ds-color-text);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&:focus-visible {
|
|
111
|
+
outline: none;
|
|
112
|
+
box-shadow: inset 0 0 0 var(--ds-ring-width) var(--ds-ring-color);
|
|
113
|
+
scroll-margin-block: var(--ds-space-16, 4rem);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&--active,
|
|
117
|
+
&--active:hover {
|
|
118
|
+
background-color: var(--ds-color-surface-elevated);
|
|
119
|
+
color: var(--ds-color-text);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&--danger:hover {
|
|
123
|
+
color: var(--ds-color-error);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&--disabled {
|
|
127
|
+
opacity: var(--ds-opacity-disabled);
|
|
128
|
+
pointer-events: none;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* --- Item slots --- */
|
|
133
|
+
|
|
134
|
+
&__item-icon {
|
|
135
|
+
width: 1rem;
|
|
136
|
+
height: 1rem;
|
|
137
|
+
flex-shrink: 0;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
&__item-label {
|
|
141
|
+
flex: 1;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
&__item-shortcut {
|
|
145
|
+
margin-inline-start: auto;
|
|
146
|
+
font-size: var(--ds-text-xs);
|
|
147
|
+
color: var(--ds-color-text-tertiary);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* --- Divider --- */
|
|
151
|
+
|
|
152
|
+
&__divider {
|
|
153
|
+
margin-block: var(--ds-space-1);
|
|
154
|
+
border: 0;
|
|
155
|
+
border-block-start: 1px solid var(--ds-color-border);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* --- Section header --- */
|
|
159
|
+
|
|
160
|
+
&__header {
|
|
161
|
+
padding: var(--ds-space-2) var(--ds-space-3);
|
|
162
|
+
margin-inline: var(--ds-space-1);
|
|
163
|
+
font-size: var(--ds-text-xs);
|
|
164
|
+
font-weight: var(--ds-weight-medium);
|
|
165
|
+
text-transform: uppercase;
|
|
166
|
+
letter-spacing: var(--ds-tracking-wide);
|
|
167
|
+
color: var(--ds-color-text-tertiary);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Component: Empty State
|
|
3
|
+
Centered message for when there's no data to display.
|
|
4
|
+
========================================================================== */
|
|
5
|
+
|
|
6
|
+
.ds-empty-state {
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
text-align: center;
|
|
12
|
+
padding: var(--ds-space-12);
|
|
13
|
+
gap: var(--ds-space-4);
|
|
14
|
+
|
|
15
|
+
&__icon {
|
|
16
|
+
width: 3rem;
|
|
17
|
+
height: 3rem;
|
|
18
|
+
color: var(--ds-color-text-tertiary);
|
|
19
|
+
margin-block-end: var(--ds-space-2);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&__title {
|
|
23
|
+
font-family: var(--ds-font-display);
|
|
24
|
+
font-weight: var(--ds-font-display-weight);
|
|
25
|
+
font-size: var(--ds-text-lg);
|
|
26
|
+
color: var(--ds-color-text);
|
|
27
|
+
letter-spacing: var(--ds-tracking-tight);
|
|
28
|
+
line-height: var(--ds-leading-tight);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&__description {
|
|
32
|
+
font-size: var(--ds-text-sm);
|
|
33
|
+
color: var(--ds-color-text-secondary);
|
|
34
|
+
max-width: 20rem;
|
|
35
|
+
line-height: var(--ds-leading-relaxed);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&__actions {
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: row;
|
|
41
|
+
align-items: center;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
gap: var(--ds-space-3);
|
|
44
|
+
margin-block-start: var(--ds-space-2);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* --- Compact variant --- */
|
|
48
|
+
|
|
49
|
+
&--compact {
|
|
50
|
+
padding: var(--ds-space-8);
|
|
51
|
+
|
|
52
|
+
& .ds-empty-state__icon {
|
|
53
|
+
width: 2rem;
|
|
54
|
+
height: 2rem;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
& .ds-empty-state__title {
|
|
58
|
+
font-size: var(--ds-text-base);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* --- Card variant --- */
|
|
63
|
+
|
|
64
|
+
&--card {
|
|
65
|
+
background-color: var(--ds-color-surface);
|
|
66
|
+
border: 1px solid var(--ds-color-border);
|
|
67
|
+
border-radius: var(--ds-radius-xl);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* --- Left-aligned variant --- */
|
|
71
|
+
&--left {
|
|
72
|
+
align-items: flex-start;
|
|
73
|
+
text-align: start;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Component: Field
|
|
3
|
+
Unified wrapper for form fields — label + input + hint + error.
|
|
4
|
+
========================================================================== */
|
|
5
|
+
|
|
6
|
+
/* ---------------------------------------------------------------------------
|
|
7
|
+
Container
|
|
8
|
+
--------------------------------------------------------------------------- */
|
|
9
|
+
|
|
10
|
+
.ds-field {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
gap: var(--ds-space-1-5);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* ---------------------------------------------------------------------------
|
|
17
|
+
Label
|
|
18
|
+
--------------------------------------------------------------------------- */
|
|
19
|
+
|
|
20
|
+
.ds-field__label {
|
|
21
|
+
font-family: var(--ds-font-sans);
|
|
22
|
+
font-size: var(--ds-text-sm);
|
|
23
|
+
font-weight: var(--ds-weight-medium);
|
|
24
|
+
color: var(--ds-color-text);
|
|
25
|
+
line-height: var(--ds-leading-normal);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* Required asterisk */
|
|
29
|
+
.ds-field--required .ds-field__label::after {
|
|
30
|
+
content: " *";
|
|
31
|
+
color: var(--ds-color-error);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* ---------------------------------------------------------------------------
|
|
35
|
+
Hint (help text below input)
|
|
36
|
+
--------------------------------------------------------------------------- */
|
|
37
|
+
|
|
38
|
+
.ds-field__hint {
|
|
39
|
+
font-size: var(--ds-text-xs);
|
|
40
|
+
color: var(--ds-color-text-tertiary);
|
|
41
|
+
line-height: var(--ds-leading-normal);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* ---------------------------------------------------------------------------
|
|
45
|
+
Error message
|
|
46
|
+
--------------------------------------------------------------------------- */
|
|
47
|
+
|
|
48
|
+
.ds-field__error {
|
|
49
|
+
font-size: var(--ds-text-xs);
|
|
50
|
+
color: var(--ds-color-error);
|
|
51
|
+
line-height: var(--ds-leading-normal);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* Animated error appearance */
|
|
55
|
+
.ds-field__error[data-animate] {
|
|
56
|
+
animation: ds-field-error-in var(--ds-duration-fast) var(--ds-ease-out);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@keyframes ds-field-error-in {
|
|
60
|
+
from {
|
|
61
|
+
opacity: 0;
|
|
62
|
+
transform: translateY(-2px);
|
|
63
|
+
}
|
|
64
|
+
to {
|
|
65
|
+
opacity: 1;
|
|
66
|
+
transform: translateY(0);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Success message */
|
|
71
|
+
.ds-field__success {
|
|
72
|
+
font-size: var(--ds-text-xs);
|
|
73
|
+
color: var(--ds-color-success);
|
|
74
|
+
line-height: var(--ds-leading-normal);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Character counter */
|
|
78
|
+
.ds-field__counter {
|
|
79
|
+
font-size: var(--ds-text-xs);
|
|
80
|
+
color: var(--ds-color-text-tertiary);
|
|
81
|
+
line-height: var(--ds-leading-normal);
|
|
82
|
+
text-align: end;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.ds-field__counter--limit {
|
|
86
|
+
color: var(--ds-color-error);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* ---------------------------------------------------------------------------
|
|
90
|
+
Modifier: Horizontal layout (label left, input right)
|
|
91
|
+
--------------------------------------------------------------------------- */
|
|
92
|
+
|
|
93
|
+
.ds-field--horizontal {
|
|
94
|
+
flex-direction: row;
|
|
95
|
+
align-items: flex-start;
|
|
96
|
+
gap: var(--ds-space-4);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.ds-field--horizontal .ds-field__label {
|
|
100
|
+
flex-shrink: 0;
|
|
101
|
+
min-width: 8rem;
|
|
102
|
+
padding-block-start: var(--ds-space-2);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* ---------------------------------------------------------------------------
|
|
106
|
+
Modifier: Disabled
|
|
107
|
+
--------------------------------------------------------------------------- */
|
|
108
|
+
|
|
109
|
+
.ds-field--disabled {
|
|
110
|
+
opacity: var(--ds-opacity-disabled);
|
|
111
|
+
pointer-events: none;
|
|
112
|
+
}
|