@apo100l/ace-ui-kit 0.1.0 → 0.2.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 +10 -1
- package/dist/ace-compat.css +1 -1
- package/dist/ace-ui-kit.css +1 -1
- package/dist/ace-ui-kit.js +311 -20
- package/dist/ace-ui-kit.js.map +1 -1
- package/dist/icons.svg +2 -0
- package/dist/index.d.ts +5 -0
- package/dist/js/dialog.d.ts +3 -0
- package/dist/js/file.d.ts +1 -0
- package/dist/js/init.d.ts +4 -2
- package/dist/js/menu.d.ts +1 -0
- package/dist/js/sidebar.d.ts +1 -0
- package/dist/js/stepper.d.ts +2 -0
- package/dist/js/tabs.d.ts +3 -0
- package/dist/js/toast.d.ts +16 -0
- package/dist/js/tooltip.d.ts +1 -0
- package/package.json +1 -1
- package/src/icons/icons.json +306 -53
- package/src/scss/compat/_base.scss +24 -45
- package/src/scss/compat/_feedback.scss +11 -34
- package/src/scss/compat/_forms.scss +14 -35
- package/src/scss/compat/_navigation.scss +6 -28
- package/src/scss/compat/_tables.scss +4 -16
- package/src/scss/compat/_widgets.scss +8 -18
- package/src/scss/components/_badge.scss +48 -0
- package/src/scss/components/_card.scss +66 -0
- package/src/scss/components/_feedback.scss +219 -0
- package/src/scss/components/_form.scss +336 -0
- package/src/scss/components/_overlay.scss +174 -0
- package/src/scss/components/_shell.scss +326 -0
- package/src/scss/components/_table.scss +301 -0
- package/src/scss/components/_tabs.scss +56 -0
- package/src/scss/index.scss +8 -0
- package/src/scss/mixins/_badge.scss +59 -0
- package/src/scss/mixins/_card.scss +40 -0
- package/src/scss/mixins/_form.scss +76 -0
- package/src/scss/mixins/_menu.scss +53 -0
- package/src/scss/mixins/_table.scss +23 -0
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
@use '../breakpoints' as bp;
|
|
2
|
+
|
|
3
|
+
// App shell (docs/PRINCIPLES.md §1–2): a neutral top bar, a sidebar in the page's own tone, the active
|
|
4
|
+
// item as a grey pill, the page title at 24px with its actions on the same row.
|
|
5
|
+
//
|
|
6
|
+
// <div class="ak-app">
|
|
7
|
+
// <header class="ak-topbar">
|
|
8
|
+
// <button class="ak-btn ak-btn--ghost ak-btn--icon ak-topbar__menu" data-ak-sidebar-toggle aria-label="Меню">…</button>
|
|
9
|
+
// <a class="ak-topbar__brand" href="/admin/"><span class="ak-topbar__mark">S</span> Smart-EK</a>
|
|
10
|
+
// <div class="ak-topbar__end">…</div>
|
|
11
|
+
// </header>
|
|
12
|
+
// <nav class="ak-sidebar" aria-label="Разделы">
|
|
13
|
+
// <ul class="ak-nav">
|
|
14
|
+
// <li><a class="ak-nav__item" href="…" aria-current="page"><svg class="ak-icon">…</svg> Главная</a></li>
|
|
15
|
+
// <li><details class="ak-nav__group" open><summary class="ak-nav__item">…Страницы</summary>
|
|
16
|
+
// <ul class="ak-nav"><li><a class="ak-nav__item" href="…">Новости</a></li></ul></details></li>
|
|
17
|
+
// </ul>
|
|
18
|
+
// <p class="ak-nav__label">Система</p> …
|
|
19
|
+
// </nav>
|
|
20
|
+
// <main class="ak-main">
|
|
21
|
+
// <nav class="ak-breadcrumbs" aria-label="Хлебные крошки"><ol><li><a href="…">Панель</a></li><li aria-current="page">Пользователи</li></ol></nav>
|
|
22
|
+
// <div class="ak-page-header"><h1 class="ak-page-header__title">Пользователи</h1><div class="ak-page-header__actions">…</div></div>
|
|
23
|
+
// …
|
|
24
|
+
// </main>
|
|
25
|
+
// </div>
|
|
26
|
+
|
|
27
|
+
.ak-app {
|
|
28
|
+
display: grid;
|
|
29
|
+
grid-template-areas:
|
|
30
|
+
'topbar topbar'
|
|
31
|
+
'sidebar main';
|
|
32
|
+
grid-template-rows: var(--ak-topbar-height) 1fr;
|
|
33
|
+
grid-template-columns: var(--ak-sidebar-width) minmax(0, 1fr);
|
|
34
|
+
min-height: 100vh;
|
|
35
|
+
background: var(--ak-color-ground);
|
|
36
|
+
color: var(--ak-color-text);
|
|
37
|
+
font-family: var(--ak-font-family);
|
|
38
|
+
font-size: var(--ak-font-size-md);
|
|
39
|
+
line-height: var(--ak-line-height);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// ---- top bar
|
|
43
|
+
.ak-topbar {
|
|
44
|
+
position: sticky;
|
|
45
|
+
top: 0;
|
|
46
|
+
z-index: var(--ak-z-fixed);
|
|
47
|
+
display: flex;
|
|
48
|
+
grid-area: topbar;
|
|
49
|
+
align-items: center;
|
|
50
|
+
gap: var(--ak-space-3);
|
|
51
|
+
height: var(--ak-topbar-height);
|
|
52
|
+
padding: 0 var(--ak-space-4);
|
|
53
|
+
border-bottom: 1px solid var(--ak-color-border);
|
|
54
|
+
background: var(--ak-color-surface);
|
|
55
|
+
}
|
|
56
|
+
.ak-topbar__menu {
|
|
57
|
+
display: none;
|
|
58
|
+
}
|
|
59
|
+
.ak-topbar__brand {
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
gap: var(--ak-space-2);
|
|
63
|
+
color: var(--ak-color-text);
|
|
64
|
+
font-weight: var(--ak-font-weight-semibold);
|
|
65
|
+
text-decoration: none;
|
|
66
|
+
|
|
67
|
+
&:hover {
|
|
68
|
+
text-decoration: none;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
.ak-topbar__mark {
|
|
72
|
+
display: inline-grid;
|
|
73
|
+
place-items: center;
|
|
74
|
+
width: 24px;
|
|
75
|
+
height: 24px;
|
|
76
|
+
border-radius: var(--ak-radius-control);
|
|
77
|
+
background: var(--ak-color-primary);
|
|
78
|
+
color: var(--ak-color-on-primary);
|
|
79
|
+
font-size: var(--ak-font-size-sm);
|
|
80
|
+
font-weight: var(--ak-font-weight-bold);
|
|
81
|
+
}
|
|
82
|
+
.ak-topbar__scope {
|
|
83
|
+
color: var(--ak-color-muted);
|
|
84
|
+
font-size: var(--ak-font-size-md);
|
|
85
|
+
|
|
86
|
+
&::before {
|
|
87
|
+
margin-right: var(--ak-space-3);
|
|
88
|
+
color: var(--ak-color-control);
|
|
89
|
+
content: '/';
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
.ak-topbar__end {
|
|
93
|
+
display: flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
gap: var(--ak-space-2);
|
|
96
|
+
margin-left: auto;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// ---- sidebar
|
|
100
|
+
.ak-sidebar {
|
|
101
|
+
position: sticky;
|
|
102
|
+
top: var(--ak-topbar-height);
|
|
103
|
+
grid-area: sidebar;
|
|
104
|
+
height: calc(100vh - var(--ak-topbar-height));
|
|
105
|
+
padding: var(--ak-space-3) var(--ak-space-2) var(--ak-space-6);
|
|
106
|
+
overflow-y: auto;
|
|
107
|
+
border-right: 1px solid var(--ak-color-border);
|
|
108
|
+
background: var(--ak-color-ground);
|
|
109
|
+
scrollbar-color: var(--ak-color-control) transparent;
|
|
110
|
+
scrollbar-width: thin;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.ak-nav {
|
|
114
|
+
display: grid;
|
|
115
|
+
gap: 1px;
|
|
116
|
+
margin: 0;
|
|
117
|
+
padding: 0;
|
|
118
|
+
list-style: none;
|
|
119
|
+
|
|
120
|
+
.ak-nav {
|
|
121
|
+
margin: 1px 0 var(--ak-space-1);
|
|
122
|
+
padding-left: var(--ak-space-6);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
.ak-nav__item {
|
|
126
|
+
display: flex;
|
|
127
|
+
align-items: center;
|
|
128
|
+
gap: var(--ak-space-2);
|
|
129
|
+
min-height: var(--ak-nav-row);
|
|
130
|
+
padding: var(--ak-space-1) var(--ak-space-3);
|
|
131
|
+
border-radius: var(--ak-radius-control);
|
|
132
|
+
color: var(--ak-color-text);
|
|
133
|
+
font-size: var(--ak-font-size-md);
|
|
134
|
+
line-height: var(--ak-line-height-tight);
|
|
135
|
+
text-decoration: none;
|
|
136
|
+
cursor: pointer;
|
|
137
|
+
list-style: none;
|
|
138
|
+
|
|
139
|
+
&::-webkit-details-marker {
|
|
140
|
+
display: none;
|
|
141
|
+
}
|
|
142
|
+
> .ak-icon {
|
|
143
|
+
color: var(--ak-color-muted);
|
|
144
|
+
}
|
|
145
|
+
> .ak-badge {
|
|
146
|
+
margin-left: auto;
|
|
147
|
+
}
|
|
148
|
+
&:hover {
|
|
149
|
+
background: var(--ak-color-raised);
|
|
150
|
+
text-decoration: none;
|
|
151
|
+
}
|
|
152
|
+
&:focus-visible {
|
|
153
|
+
outline: none;
|
|
154
|
+
box-shadow: var(--ak-focus-ring);
|
|
155
|
+
}
|
|
156
|
+
&[aria-current='page'] {
|
|
157
|
+
background: var(--ak-color-active);
|
|
158
|
+
font-weight: var(--ak-font-weight-medium);
|
|
159
|
+
}
|
|
160
|
+
.ak-nav .ak-nav & {
|
|
161
|
+
color: var(--ak-color-muted);
|
|
162
|
+
|
|
163
|
+
&[aria-current='page'] {
|
|
164
|
+
color: var(--ak-color-text);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
// a group is a <details>: native open/close, keyboard and state for free
|
|
169
|
+
.ak-nav__group {
|
|
170
|
+
> summary::after {
|
|
171
|
+
width: 6px;
|
|
172
|
+
height: 6px;
|
|
173
|
+
margin-left: auto;
|
|
174
|
+
border-right: 1.5px solid var(--ak-color-faint);
|
|
175
|
+
border-bottom: 1.5px solid var(--ak-color-faint);
|
|
176
|
+
transform: translateY(-2px) rotate(45deg);
|
|
177
|
+
transition: transform var(--ak-duration-fast) var(--ak-ease-out);
|
|
178
|
+
content: '';
|
|
179
|
+
}
|
|
180
|
+
&[open] > summary::after {
|
|
181
|
+
transform: translateY(1px) rotate(225deg);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
.ak-nav__label {
|
|
185
|
+
margin: var(--ak-space-5) 0 var(--ak-space-1);
|
|
186
|
+
padding: 0 var(--ak-space-3);
|
|
187
|
+
color: var(--ak-color-muted);
|
|
188
|
+
font-size: var(--ak-font-size-sm);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// ---- main
|
|
192
|
+
.ak-main {
|
|
193
|
+
grid-area: main;
|
|
194
|
+
min-width: 0;
|
|
195
|
+
padding: var(--ak-space-4) var(--ak-space-6) var(--ak-space-10);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.ak-breadcrumbs ol {
|
|
199
|
+
display: flex;
|
|
200
|
+
flex-wrap: wrap;
|
|
201
|
+
align-items: center;
|
|
202
|
+
margin: 0 0 var(--ak-space-2);
|
|
203
|
+
padding: 0;
|
|
204
|
+
list-style: none;
|
|
205
|
+
color: var(--ak-color-muted);
|
|
206
|
+
font-size: var(--ak-font-size-sm);
|
|
207
|
+
|
|
208
|
+
li + li::before {
|
|
209
|
+
padding: 0 var(--ak-space-2);
|
|
210
|
+
color: var(--ak-color-faint);
|
|
211
|
+
content: '/';
|
|
212
|
+
}
|
|
213
|
+
a {
|
|
214
|
+
color: var(--ak-color-muted);
|
|
215
|
+
text-decoration: none;
|
|
216
|
+
|
|
217
|
+
&:hover {
|
|
218
|
+
color: var(--ak-color-text);
|
|
219
|
+
text-decoration: underline;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
[aria-current='page'] {
|
|
223
|
+
color: var(--ak-color-text);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.ak-page-header {
|
|
228
|
+
display: flex;
|
|
229
|
+
flex-wrap: wrap;
|
|
230
|
+
align-items: center;
|
|
231
|
+
gap: var(--ak-space-3);
|
|
232
|
+
margin: 0 0 var(--ak-space-5);
|
|
233
|
+
}
|
|
234
|
+
.ak-page-header__title {
|
|
235
|
+
margin: 0;
|
|
236
|
+
color: var(--ak-color-text);
|
|
237
|
+
font-size: var(--ak-font-size-2xl);
|
|
238
|
+
font-weight: var(--ak-font-weight-semibold);
|
|
239
|
+
line-height: var(--ak-line-height-tight);
|
|
240
|
+
}
|
|
241
|
+
.ak-page-header__lead {
|
|
242
|
+
flex-basis: 100%;
|
|
243
|
+
margin: calc(-1 * var(--ak-space-2)) 0 0;
|
|
244
|
+
color: var(--ak-color-muted);
|
|
245
|
+
}
|
|
246
|
+
.ak-page-header__actions {
|
|
247
|
+
display: flex;
|
|
248
|
+
flex-wrap: wrap;
|
|
249
|
+
align-items: center;
|
|
250
|
+
gap: var(--ak-space-2);
|
|
251
|
+
margin-left: auto;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
// a stack of blocks with one gap
|
|
255
|
+
.ak-stack {
|
|
256
|
+
display: grid;
|
|
257
|
+
gap: var(--ak-space-4);
|
|
258
|
+
align-content: start;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// ---- narrow screens: the sidebar becomes a drawer opened by [data-ak-sidebar-toggle]
|
|
262
|
+
@include bp.down(md) {
|
|
263
|
+
.ak-app {
|
|
264
|
+
grid-template-areas:
|
|
265
|
+
'topbar'
|
|
266
|
+
'main';
|
|
267
|
+
grid-template-columns: minmax(0, 1fr);
|
|
268
|
+
}
|
|
269
|
+
.ak-topbar__menu {
|
|
270
|
+
display: inline-flex;
|
|
271
|
+
}
|
|
272
|
+
.ak-sidebar {
|
|
273
|
+
position: fixed;
|
|
274
|
+
top: var(--ak-topbar-height);
|
|
275
|
+
bottom: 0;
|
|
276
|
+
left: 0;
|
|
277
|
+
z-index: var(--ak-z-fixed);
|
|
278
|
+
width: min(var(--ak-sidebar-width), 85vw);
|
|
279
|
+
height: auto;
|
|
280
|
+
background: var(--ak-color-surface);
|
|
281
|
+
box-shadow: var(--ak-shadow-dialog);
|
|
282
|
+
transform: translateX(-100%);
|
|
283
|
+
visibility: hidden;
|
|
284
|
+
transition:
|
|
285
|
+
transform var(--ak-duration-slow) var(--ak-ease-out),
|
|
286
|
+
visibility var(--ak-duration-slow);
|
|
287
|
+
}
|
|
288
|
+
.ak-app[data-sidebar-open] .ak-sidebar {
|
|
289
|
+
transform: none;
|
|
290
|
+
visibility: visible;
|
|
291
|
+
}
|
|
292
|
+
.ak-main {
|
|
293
|
+
padding: var(--ak-space-3) var(--ak-space-4) var(--ak-space-8);
|
|
294
|
+
}
|
|
295
|
+
.ak-page-header__actions {
|
|
296
|
+
margin-left: 0;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// main column + 320px side column (edit screens); under 992px it stacks, main content first
|
|
301
|
+
.ak-split {
|
|
302
|
+
display: grid;
|
|
303
|
+
grid-template-columns: minmax(0, 1fr) var(--ak-split-aside, 320px);
|
|
304
|
+
gap: var(--ak-space-4);
|
|
305
|
+
align-items: start;
|
|
306
|
+
|
|
307
|
+
@include bp.down(md) {
|
|
308
|
+
grid-template-columns: minmax(0, 1fr);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
// a button label that gives way to the icon on narrow screens (top bar, toolbars)
|
|
313
|
+
@include bp.down(sm) {
|
|
314
|
+
.ak-topbar .ak-btn__label,
|
|
315
|
+
.ak-btn__label--collapse {
|
|
316
|
+
position: absolute;
|
|
317
|
+
width: 1px;
|
|
318
|
+
height: 1px;
|
|
319
|
+
overflow: hidden;
|
|
320
|
+
clip: rect(0, 0, 0, 0);
|
|
321
|
+
white-space: nowrap;
|
|
322
|
+
}
|
|
323
|
+
.ak-topbar__scope {
|
|
324
|
+
display: none;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
@use '../mixins/table';
|
|
2
|
+
|
|
3
|
+
// Tables (docs/PRINCIPLES.md §5): 12px grey sentence-case header with no band, rules between rows,
|
|
4
|
+
// no zebra, numbers right-aligned in tabular figures, one action column on the right.
|
|
5
|
+
//
|
|
6
|
+
// <div class="ak-table-wrap"> scrolls horizontally; --sticky keeps the header in view
|
|
7
|
+
// <table class="ak-table">
|
|
8
|
+
// <thead><tr><th>Название</th><th class="ak-num">Позиция</th><th class="ak-table__actions"><span class="ak-sr-only">Действия</span></th></tr></thead>
|
|
9
|
+
// <tbody><tr><td class="ak-table__primary"><a href="…">О компании</a></td><td class="ak-num">−1</td><td class="ak-table__actions">…</td></tr></tbody>
|
|
10
|
+
// </table>
|
|
11
|
+
// </div>
|
|
12
|
+
// th[aria-sort] shows the sort direction (active column only). tr[aria-selected="true"] = selected row.
|
|
13
|
+
// .ak-table--compact: 36px rows. .ak-muted / .ak-dash for secondary text and missing values.
|
|
14
|
+
|
|
15
|
+
.ak-table-wrap {
|
|
16
|
+
width: 100%;
|
|
17
|
+
overflow-x: auto;
|
|
18
|
+
|
|
19
|
+
&--sticky {
|
|
20
|
+
max-height: var(--ak-table-max-height, 70vh);
|
|
21
|
+
overflow-y: auto;
|
|
22
|
+
|
|
23
|
+
thead th {
|
|
24
|
+
position: sticky;
|
|
25
|
+
top: 0;
|
|
26
|
+
z-index: 1;
|
|
27
|
+
background: var(--ak-color-surface);
|
|
28
|
+
box-shadow: inset 0 -1px 0 var(--ak-color-border);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.ak-table {
|
|
34
|
+
width: 100%;
|
|
35
|
+
border-collapse: collapse;
|
|
36
|
+
border-spacing: 0;
|
|
37
|
+
color: var(--ak-color-text);
|
|
38
|
+
font-size: var(--ak-font-size-md);
|
|
39
|
+
|
|
40
|
+
th,
|
|
41
|
+
td {
|
|
42
|
+
padding: var(--ak-space-2) var(--ak-space-4);
|
|
43
|
+
text-align: left;
|
|
44
|
+
vertical-align: middle;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
thead th {
|
|
48
|
+
@include table.header-cell;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
tbody td,
|
|
52
|
+
tbody th {
|
|
53
|
+
@include table.body-cell;
|
|
54
|
+
}
|
|
55
|
+
tbody tr:first-child > * {
|
|
56
|
+
border-top: 0;
|
|
57
|
+
}
|
|
58
|
+
tbody th {
|
|
59
|
+
font-weight: var(--ak-font-weight-regular);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
tr[aria-selected='true'] > * {
|
|
63
|
+
background: var(--ak-color-active);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// sortable headers: a button inside the th, the glyph only on the active column
|
|
67
|
+
th > button {
|
|
68
|
+
display: inline-flex;
|
|
69
|
+
align-items: center;
|
|
70
|
+
gap: 4px;
|
|
71
|
+
margin: 0;
|
|
72
|
+
padding: 0;
|
|
73
|
+
border: 0;
|
|
74
|
+
background: none;
|
|
75
|
+
color: inherit;
|
|
76
|
+
font: inherit;
|
|
77
|
+
cursor: pointer;
|
|
78
|
+
|
|
79
|
+
&:hover {
|
|
80
|
+
color: var(--ak-color-text);
|
|
81
|
+
}
|
|
82
|
+
&:focus-visible {
|
|
83
|
+
outline: 2px solid var(--ak-color-accent);
|
|
84
|
+
outline-offset: 2px;
|
|
85
|
+
border-radius: 2px;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
th[aria-sort='ascending'] > button::after,
|
|
89
|
+
th[aria-sort='descending'] > button::after {
|
|
90
|
+
width: 0;
|
|
91
|
+
height: 0;
|
|
92
|
+
border-right: 4px solid transparent;
|
|
93
|
+
border-left: 4px solid transparent;
|
|
94
|
+
content: '';
|
|
95
|
+
}
|
|
96
|
+
th[aria-sort='ascending'] > button::after {
|
|
97
|
+
border-bottom: 5px solid currentColor;
|
|
98
|
+
}
|
|
99
|
+
th[aria-sort='descending'] > button::after {
|
|
100
|
+
border-top: 5px solid currentColor;
|
|
101
|
+
}
|
|
102
|
+
th[aria-sort] {
|
|
103
|
+
color: var(--ak-color-text);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&--compact tbody td,
|
|
107
|
+
&--compact tbody th {
|
|
108
|
+
height: 36px;
|
|
109
|
+
padding-top: var(--ak-space-1);
|
|
110
|
+
padding-bottom: var(--ak-space-1);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// columns
|
|
115
|
+
.ak-num {
|
|
116
|
+
text-align: right !important;
|
|
117
|
+
font-variant-numeric: tabular-nums;
|
|
118
|
+
white-space: nowrap;
|
|
119
|
+
}
|
|
120
|
+
.ak-table__primary {
|
|
121
|
+
font-weight: var(--ak-font-weight-medium);
|
|
122
|
+
|
|
123
|
+
a {
|
|
124
|
+
color: var(--ak-color-text);
|
|
125
|
+
text-decoration: none;
|
|
126
|
+
|
|
127
|
+
&:hover {
|
|
128
|
+
color: var(--ak-color-link);
|
|
129
|
+
text-decoration: underline;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
small {
|
|
133
|
+
display: block;
|
|
134
|
+
margin-top: 2px;
|
|
135
|
+
color: var(--ak-color-muted);
|
|
136
|
+
font-size: var(--ak-font-size-sm);
|
|
137
|
+
font-weight: var(--ak-font-weight-regular);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
.ak-table__check {
|
|
141
|
+
width: 40px;
|
|
142
|
+
padding-right: 0 !important;
|
|
143
|
+
|
|
144
|
+
input {
|
|
145
|
+
width: 16px;
|
|
146
|
+
height: 16px;
|
|
147
|
+
margin: 0;
|
|
148
|
+
vertical-align: middle;
|
|
149
|
+
accent-color: var(--ak-color-primary);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
.ak-table__actions {
|
|
153
|
+
width: 1%;
|
|
154
|
+
text-align: right !important;
|
|
155
|
+
white-space: nowrap;
|
|
156
|
+
|
|
157
|
+
> * + * {
|
|
158
|
+
margin-left: var(--ak-space-1);
|
|
159
|
+
}
|
|
160
|
+
> form {
|
|
161
|
+
display: inline;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.ak-muted {
|
|
166
|
+
color: var(--ak-color-muted);
|
|
167
|
+
}
|
|
168
|
+
.ak-dash::before {
|
|
169
|
+
color: var(--ak-color-faint);
|
|
170
|
+
content: '—';
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// toolbar above a table: total · search · filters … per-page
|
|
174
|
+
.ak-table-toolbar {
|
|
175
|
+
display: flex;
|
|
176
|
+
flex-wrap: wrap;
|
|
177
|
+
align-items: center;
|
|
178
|
+
gap: var(--ak-space-2) var(--ak-space-3);
|
|
179
|
+
padding: var(--ak-space-3) var(--ak-space-4);
|
|
180
|
+
border-bottom: 1px solid var(--ak-color-border);
|
|
181
|
+
|
|
182
|
+
> .ak-input,
|
|
183
|
+
> .ak-select {
|
|
184
|
+
width: auto;
|
|
185
|
+
min-width: 240px;
|
|
186
|
+
}
|
|
187
|
+
&__end {
|
|
188
|
+
display: flex;
|
|
189
|
+
align-items: center;
|
|
190
|
+
gap: var(--ak-space-2);
|
|
191
|
+
margin-left: auto;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
.ak-total {
|
|
195
|
+
color: var(--ak-color-muted);
|
|
196
|
+
font-size: var(--ak-font-size-sm);
|
|
197
|
+
font-variant-numeric: tabular-nums;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// footer under a table: range · pagination
|
|
201
|
+
.ak-table-footer {
|
|
202
|
+
display: flex;
|
|
203
|
+
flex-wrap: wrap;
|
|
204
|
+
align-items: center;
|
|
205
|
+
justify-content: space-between;
|
|
206
|
+
gap: var(--ak-space-2);
|
|
207
|
+
padding: var(--ak-space-3) var(--ak-space-4);
|
|
208
|
+
border-top: 1px solid var(--ak-color-border);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.ak-pagination {
|
|
212
|
+
display: inline-flex;
|
|
213
|
+
flex-wrap: wrap;
|
|
214
|
+
gap: var(--ak-space-1);
|
|
215
|
+
margin: 0;
|
|
216
|
+
padding: 0;
|
|
217
|
+
list-style: none;
|
|
218
|
+
|
|
219
|
+
a,
|
|
220
|
+
span {
|
|
221
|
+
display: inline-flex;
|
|
222
|
+
align-items: center;
|
|
223
|
+
justify-content: center;
|
|
224
|
+
min-width: var(--ak-control-height);
|
|
225
|
+
height: var(--ak-control-height);
|
|
226
|
+
padding: 0 var(--ak-space-2);
|
|
227
|
+
border-radius: var(--ak-radius-control);
|
|
228
|
+
color: var(--ak-color-text);
|
|
229
|
+
font-size: var(--ak-font-size-md);
|
|
230
|
+
font-variant-numeric: tabular-nums;
|
|
231
|
+
text-decoration: none;
|
|
232
|
+
}
|
|
233
|
+
a:hover {
|
|
234
|
+
background: var(--ak-color-raised);
|
|
235
|
+
}
|
|
236
|
+
a:focus-visible {
|
|
237
|
+
outline: none;
|
|
238
|
+
box-shadow: var(--ak-focus-ring);
|
|
239
|
+
}
|
|
240
|
+
[aria-current='page'] {
|
|
241
|
+
background: var(--ak-color-active);
|
|
242
|
+
font-weight: var(--ak-font-weight-semibold);
|
|
243
|
+
}
|
|
244
|
+
[aria-disabled='true'] {
|
|
245
|
+
color: var(--ak-color-faint);
|
|
246
|
+
pointer-events: none;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// empty state: keeps the block's frame, one sentence across, then the first action
|
|
251
|
+
.ak-empty {
|
|
252
|
+
display: grid;
|
|
253
|
+
justify-items: center;
|
|
254
|
+
gap: var(--ak-space-3);
|
|
255
|
+
padding: var(--ak-space-10) var(--ak-space-5);
|
|
256
|
+
color: var(--ak-color-muted);
|
|
257
|
+
font-size: var(--ak-font-size-md);
|
|
258
|
+
text-align: center;
|
|
259
|
+
|
|
260
|
+
> .ak-icon {
|
|
261
|
+
--ak-icon-size: 24px;
|
|
262
|
+
color: var(--ak-color-faint);
|
|
263
|
+
}
|
|
264
|
+
> p {
|
|
265
|
+
max-width: 420px;
|
|
266
|
+
margin: 0;
|
|
267
|
+
}
|
|
268
|
+
td > & {
|
|
269
|
+
padding-top: var(--ak-space-8);
|
|
270
|
+
padding-bottom: var(--ak-space-8);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
.ak-table td:has(> .ak-empty) {
|
|
274
|
+
height: auto;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.ak-sr-only {
|
|
278
|
+
position: absolute !important;
|
|
279
|
+
width: 1px;
|
|
280
|
+
height: 1px;
|
|
281
|
+
margin: -1px;
|
|
282
|
+
padding: 0;
|
|
283
|
+
overflow: hidden;
|
|
284
|
+
clip: rect(0, 0, 0, 0);
|
|
285
|
+
white-space: nowrap;
|
|
286
|
+
border: 0;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
// loading: the final layout with flat grey bars at the real size — no shimmer, no layout shift
|
|
290
|
+
.ak-skeleton {
|
|
291
|
+
display: inline-block;
|
|
292
|
+
width: var(--w, 8em);
|
|
293
|
+
max-width: 100%;
|
|
294
|
+
height: 0.9em;
|
|
295
|
+
border-radius: var(--ak-radius-chip);
|
|
296
|
+
background: var(--ak-color-raised);
|
|
297
|
+
vertical-align: middle;
|
|
298
|
+
}
|
|
299
|
+
[aria-busy='true'] .ak-skeleton {
|
|
300
|
+
cursor: progress;
|
|
301
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// Tabs (WAI-ARIA tabs pattern, wired by init()):
|
|
2
|
+
// <div class="ak-tabs">
|
|
3
|
+
// <div class="ak-tabs__list" role="tablist" aria-label="Страница">
|
|
4
|
+
// <button class="ak-tabs__tab" role="tab" id="tab-main" aria-controls="panel-main" aria-selected="true">Основное</button>
|
|
5
|
+
// <button class="ak-tabs__tab" role="tab" id="tab-seo" aria-controls="panel-seo" aria-selected="false">SEO <span class="ak-badge ak-badge--count">2</span></button>
|
|
6
|
+
// </div>
|
|
7
|
+
// <div class="ak-tabs__panel" role="tabpanel" id="panel-main" aria-labelledby="tab-main">…</div>
|
|
8
|
+
// <div class="ak-tabs__panel" role="tabpanel" id="panel-seo" aria-labelledby="tab-seo" hidden>…</div>
|
|
9
|
+
// </div>
|
|
10
|
+
// The selected tab is marked by an ink underline, not a coloured pill (colour stays on data).
|
|
11
|
+
|
|
12
|
+
.ak-tabs__list {
|
|
13
|
+
display: flex;
|
|
14
|
+
gap: var(--ak-space-1);
|
|
15
|
+
overflow-x: auto;
|
|
16
|
+
border-bottom: 1px solid var(--ak-color-border);
|
|
17
|
+
scrollbar-width: none;
|
|
18
|
+
}
|
|
19
|
+
.ak-tabs__tab {
|
|
20
|
+
display: inline-flex;
|
|
21
|
+
flex: none;
|
|
22
|
+
align-items: center;
|
|
23
|
+
gap: var(--ak-space-2);
|
|
24
|
+
height: 40px;
|
|
25
|
+
margin: 0 0 -1px;
|
|
26
|
+
padding: 0 var(--ak-space-3);
|
|
27
|
+
border: 0;
|
|
28
|
+
border-bottom: 2px solid transparent;
|
|
29
|
+
background: none;
|
|
30
|
+
color: var(--ak-color-muted);
|
|
31
|
+
font: inherit;
|
|
32
|
+
font-size: var(--ak-font-size-md);
|
|
33
|
+
font-weight: var(--ak-font-weight-medium);
|
|
34
|
+
white-space: nowrap;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
|
|
37
|
+
&:hover {
|
|
38
|
+
color: var(--ak-color-text);
|
|
39
|
+
}
|
|
40
|
+
&[aria-selected='true'] {
|
|
41
|
+
border-bottom-color: var(--ak-color-text);
|
|
42
|
+
color: var(--ak-color-text);
|
|
43
|
+
}
|
|
44
|
+
&:focus-visible {
|
|
45
|
+
outline: 2px solid var(--ak-color-accent);
|
|
46
|
+
outline-offset: -2px;
|
|
47
|
+
border-radius: var(--ak-radius-control) var(--ak-radius-control) 0 0;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
.ak-tabs__panel {
|
|
51
|
+
padding-top: var(--ak-space-5);
|
|
52
|
+
|
|
53
|
+
&:focus-visible {
|
|
54
|
+
outline: none;
|
|
55
|
+
}
|
|
56
|
+
}
|
package/src/scss/index.scss
CHANGED
|
@@ -4,4 +4,12 @@
|
|
|
4
4
|
@use 'tokens';
|
|
5
5
|
@use 'components/icon';
|
|
6
6
|
@use 'components/button';
|
|
7
|
+
@use 'components/badge';
|
|
7
8
|
@use 'components/alert';
|
|
9
|
+
@use 'components/card';
|
|
10
|
+
@use 'components/form';
|
|
11
|
+
@use 'components/table';
|
|
12
|
+
@use 'components/tabs';
|
|
13
|
+
@use 'components/overlay';
|
|
14
|
+
@use 'components/shell';
|
|
15
|
+
@use 'components/feedback';
|