@apo100l/ace-ui-kit 0.0.2 → 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 +58 -5
- package/dist/ace-compat.css +1 -1
- package/dist/ace-compat.js +189 -0
- package/dist/ace-compat.js.map +1 -0
- package/dist/ace-ui-kit.css +1 -1
- package/dist/ace-ui-kit.js +312 -8
- package/dist/ace-ui-kit.js.map +1 -1
- package/dist/compat.d.ts +14 -0
- package/dist/icons.svg +58 -0
- package/dist/index.d.ts +7 -0
- package/dist/js/compat/ace.d.ts +2 -0
- package/dist/js/compat/bootstrap.d.ts +9 -0
- package/dist/js/dialog.d.ts +3 -0
- package/dist/js/file.d.ts +1 -0
- package/dist/js/icon.d.ts +13 -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 +20 -7
- package/src/icons/icons.json +311 -0
- package/src/scss/_breakpoints.scss +32 -0
- package/src/scss/_tokens.scss +175 -33
- package/src/scss/compat/_base.scss +144 -0
- package/src/scss/compat/_buttons.scss +100 -0
- package/src/scss/compat/_feedback.scss +187 -0
- package/src/scss/compat/_forms.scss +232 -0
- package/src/scss/compat/_grid.scss +107 -0
- package/src/scss/compat/_layout.scss +427 -0
- package/src/scss/compat/_navigation.scss +159 -0
- package/src/scss/compat/_plugins.scss +105 -0
- package/src/scss/compat/_tables.scss +105 -0
- package/src/scss/compat/_utilities.scss +160 -0
- package/src/scss/compat/_widgets.scss +126 -0
- package/src/scss/compat/index.scss +18 -10
- package/src/scss/components/_alert.scss +21 -22
- package/src/scss/components/_badge.scss +48 -0
- package/src/scss/components/_button.scss +34 -33
- 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/_icon.scss +29 -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 +10 -0
- package/src/scss/mixins/_alert.scss +65 -0
- package/src/scss/mixins/_badge.scss +59 -0
- package/src/scss/mixins/_button.scss +102 -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,174 @@
|
|
|
1
|
+
@use '../mixins/menu';
|
|
2
|
+
|
|
3
|
+
// Floating layers: dialog (native <dialog>), menu (Popover API). The only things with shadows.
|
|
4
|
+
|
|
5
|
+
// ---------------------------------------------------------------- dialog
|
|
6
|
+
// <button class="ak-btn" data-ak-dialog-open="del-1">Удалить</button>
|
|
7
|
+
// <dialog class="ak-dialog" id="del-1" aria-labelledby="del-1-title">
|
|
8
|
+
// <form method="dialog">
|
|
9
|
+
// <header class="ak-dialog__header"><h2 class="ak-dialog__title" id="del-1-title">…</h2>
|
|
10
|
+
// <button class="ak-btn ak-btn--ghost ak-btn--icon" value="cancel" aria-label="Закрыть">×</button></header>
|
|
11
|
+
// <div class="ak-dialog__body">…</div>
|
|
12
|
+
// <footer class="ak-dialog__footer"><button class="ak-btn" value="cancel">Отмена</button> …</footer>
|
|
13
|
+
// </form>
|
|
14
|
+
// </dialog>
|
|
15
|
+
// Sizes: --sm (400) · default (560) · --lg (800). data-ak-static: no close on backdrop click.
|
|
16
|
+
|
|
17
|
+
.ak-dialog {
|
|
18
|
+
width: min(560px, calc(100vw - 2 * var(--ak-space-4)));
|
|
19
|
+
max-height: calc(100dvh - 2 * var(--ak-space-8));
|
|
20
|
+
margin: auto;
|
|
21
|
+
padding: 0;
|
|
22
|
+
overflow: auto;
|
|
23
|
+
border: 1px solid var(--ak-color-border);
|
|
24
|
+
border-radius: var(--ak-radius-card);
|
|
25
|
+
background: var(--ak-color-surface);
|
|
26
|
+
color: var(--ak-color-text);
|
|
27
|
+
box-shadow: var(--ak-shadow-dialog);
|
|
28
|
+
|
|
29
|
+
&::backdrop {
|
|
30
|
+
background: var(--ak-color-overlay);
|
|
31
|
+
}
|
|
32
|
+
&[open] {
|
|
33
|
+
animation: ak-dialog-in var(--ak-duration-slow) var(--ak-ease-out);
|
|
34
|
+
}
|
|
35
|
+
&[open]::backdrop {
|
|
36
|
+
animation: ak-fade-in var(--ak-duration-slow) ease;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&--sm {
|
|
40
|
+
width: min(400px, calc(100vw - 2 * var(--ak-space-4)));
|
|
41
|
+
}
|
|
42
|
+
&--lg {
|
|
43
|
+
width: min(800px, calc(100vw - 2 * var(--ak-space-4)));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
> form {
|
|
47
|
+
display: contents;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
.ak-dialog__header {
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
gap: var(--ak-space-3);
|
|
54
|
+
padding: var(--ak-space-4) var(--ak-space-5);
|
|
55
|
+
border-bottom: 1px solid var(--ak-color-border);
|
|
56
|
+
|
|
57
|
+
> .ak-btn:last-child {
|
|
58
|
+
margin-right: calc(-1 * var(--ak-space-2));
|
|
59
|
+
margin-left: auto;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
.ak-dialog__title {
|
|
63
|
+
margin: 0;
|
|
64
|
+
font-size: var(--ak-font-size-lg);
|
|
65
|
+
font-weight: var(--ak-font-weight-semibold);
|
|
66
|
+
line-height: var(--ak-line-height-tight);
|
|
67
|
+
}
|
|
68
|
+
.ak-dialog__body {
|
|
69
|
+
padding: var(--ak-space-5);
|
|
70
|
+
|
|
71
|
+
> p:first-child {
|
|
72
|
+
margin-top: 0;
|
|
73
|
+
}
|
|
74
|
+
> :last-child {
|
|
75
|
+
margin-bottom: 0;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
.ak-dialog__footer {
|
|
79
|
+
display: flex;
|
|
80
|
+
flex-wrap: wrap;
|
|
81
|
+
justify-content: flex-end;
|
|
82
|
+
gap: var(--ak-space-2);
|
|
83
|
+
padding: var(--ak-space-3) var(--ak-space-5);
|
|
84
|
+
border-top: 1px solid var(--ak-color-border);
|
|
85
|
+
}
|
|
86
|
+
.ak-dialog-open {
|
|
87
|
+
overflow: hidden;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@keyframes ak-dialog-in {
|
|
91
|
+
from {
|
|
92
|
+
opacity: 0;
|
|
93
|
+
transform: scale(0.97);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
@keyframes ak-fade-in {
|
|
97
|
+
from {
|
|
98
|
+
opacity: 0;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// ---------------------------------------------------------------- menu
|
|
103
|
+
// <button class="ak-btn" popovertarget="row-menu" aria-haspopup="menu">Ещё</button>
|
|
104
|
+
// <div class="ak-menu" id="row-menu" popover role="menu">
|
|
105
|
+
// <a class="ak-menu__item" role="menuitem" href="…"><svg class="ak-icon">…</svg> Редактировать</a>
|
|
106
|
+
// <hr class="ak-menu__divider">
|
|
107
|
+
// <button class="ak-menu__item ak-menu__item--danger" role="menuitem">Удалить</button>
|
|
108
|
+
// </div>
|
|
109
|
+
// Positioned under its trigger by CSS anchor positioning, with a JS fallback (init()).
|
|
110
|
+
// .ak-menu--end aligns the menu's right edge with the trigger.
|
|
111
|
+
|
|
112
|
+
.ak-menu {
|
|
113
|
+
@include menu.panel;
|
|
114
|
+
max-width: 320px;
|
|
115
|
+
max-height: min(400px, 70vh);
|
|
116
|
+
overflow-y: auto;
|
|
117
|
+
|
|
118
|
+
// popover UA styles centre it in the viewport: undo, then anchor to the trigger
|
|
119
|
+
&[popover] {
|
|
120
|
+
inset: auto;
|
|
121
|
+
position-area: block-end span-inline-end;
|
|
122
|
+
position-try-fallbacks: flip-block, flip-inline;
|
|
123
|
+
margin-block: 4px;
|
|
124
|
+
}
|
|
125
|
+
&--end[popover] {
|
|
126
|
+
position-area: block-end span-inline-start;
|
|
127
|
+
}
|
|
128
|
+
&:popover-open {
|
|
129
|
+
animation: ak-menu-in var(--ak-duration-base) var(--ak-ease-out);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
.ak-menu__item {
|
|
133
|
+
@include menu.item;
|
|
134
|
+
|
|
135
|
+
> .ak-icon {
|
|
136
|
+
color: var(--ak-color-muted);
|
|
137
|
+
}
|
|
138
|
+
&[aria-current='true'],
|
|
139
|
+
&[aria-checked='true'] {
|
|
140
|
+
@include menu.item-current;
|
|
141
|
+
}
|
|
142
|
+
&--danger,
|
|
143
|
+
&--danger > .ak-icon {
|
|
144
|
+
color: var(--ak-color-negative);
|
|
145
|
+
}
|
|
146
|
+
&:disabled,
|
|
147
|
+
&[aria-disabled='true'] {
|
|
148
|
+
color: var(--ak-color-faint);
|
|
149
|
+
pointer-events: none;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
.ak-menu__divider {
|
|
153
|
+
@include menu.divider;
|
|
154
|
+
}
|
|
155
|
+
.ak-menu__label {
|
|
156
|
+
padding: var(--ak-space-2) var(--ak-space-3) var(--ak-space-1);
|
|
157
|
+
color: var(--ak-color-muted);
|
|
158
|
+
font-size: var(--ak-font-size-sm);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
@keyframes ak-menu-in {
|
|
162
|
+
from {
|
|
163
|
+
opacity: 0;
|
|
164
|
+
transform: scale(0.97) translateY(-2px);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
@media (prefers-reduced-motion: reduce) {
|
|
169
|
+
.ak-dialog[open],
|
|
170
|
+
.ak-dialog[open]::backdrop,
|
|
171
|
+
.ak-menu:popover-open {
|
|
172
|
+
animation: none;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
@@ -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
|
+
}
|