compostrap 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/dist/css/auth.css +166 -0
- package/dist/css/blog.css +512 -0
- package/dist/css/chart.css +99 -0
- package/dist/css/compostrap.css +5052 -0
- package/dist/css/dashboard.css +360 -0
- package/dist/css/datagrid.css +64 -0
- package/dist/css/datepicker.css +514 -0
- package/dist/css/dialogs.css +185 -0
- package/dist/css/dropzone.css +86 -0
- package/dist/css/elements.css +181 -0
- package/dist/css/empty.css +94 -0
- package/dist/css/gallery.css +122 -0
- package/dist/css/lightbox.css +144 -0
- package/dist/css/number-input.css +100 -0
- package/dist/css/otp-input.css +177 -0
- package/dist/css/password-toggle.css +52 -0
- package/dist/css/rating.css +95 -0
- package/dist/css/selection.css +59 -0
- package/dist/css/settings.css +85 -0
- package/dist/css/shop.css +1026 -0
- package/dist/css/sidebar-menu.css +439 -0
- package/dist/css/sidebar.css +95 -0
- package/dist/css/spinner.css +102 -0
- package/dist/css/strength.css +118 -0
- package/dist/css/theme-switcher.css +5 -0
- package/dist/css/theme.css +13034 -0
- package/dist/css/tooltip.css +158 -0
- package/dist/js/chart.js +257 -0
- package/dist/js/datepicker.js +82 -0
- package/dist/js/dialogs.js +7 -0
- package/dist/js/dropzone.js +15 -0
- package/dist/js/index.js +24 -0
- package/dist/js/lightbox.js +77 -0
- package/dist/js/number-input.js +44 -0
- package/dist/js/otp-input.js +182 -0
- package/dist/js/password-toggle.js +16 -0
- package/dist/js/selection.js +32 -0
- package/dist/js/sidebar-menu.js +76 -0
- package/dist/js/sidebar.js +120 -0
- package/dist/js/spinner.js +27 -0
- package/dist/js/strength.js +87 -0
- package/dist/js/theme-switcher.js +98 -0
- package/dist/js/tooltip.js +17 -0
- package/docs/auth.md +25 -0
- package/docs/blog.md +85 -0
- package/docs/chart.md +39 -0
- package/docs/datagrid.md +64 -0
- package/docs/datepicker.md +35 -0
- package/docs/dialogs.md +81 -0
- package/docs/dropzone.md +23 -0
- package/docs/elements.md +38 -0
- package/docs/empty.md +25 -0
- package/docs/gallery.md +23 -0
- package/docs/layout.md +143 -0
- package/docs/lightbox.md +18 -0
- package/docs/number-input.md +19 -0
- package/docs/otp-input.md +52 -0
- package/docs/password-toggle.md +21 -0
- package/docs/rating.md +15 -0
- package/docs/selection.md +52 -0
- package/docs/settings.md +25 -0
- package/docs/shop.md +140 -0
- package/docs/spinner.md +51 -0
- package/docs/strength.md +26 -0
- package/docs/theme-switcher.md +60 -0
- package/docs/theme.md +100 -0
- package/docs/tooltip.md +30 -0
- package/license +21 -0
- package/package.json +106 -6
- package/readme.md +198 -0
- package/src/illustrations/empty.svg +15 -0
- package/src/illustrations/forbidden.svg +16 -0
- package/src/illustrations/maintenance.svg +14 -0
- package/src/illustrations/not-found.svg +22 -0
- package/src/illustrations/server-error.svg +21 -0
- package/src/js/chart.js +359 -0
- package/src/js/datepicker.js +154 -0
- package/src/js/dialogs.js +25 -0
- package/src/js/dropzone.js +35 -0
- package/src/js/index.js +29 -0
- package/src/js/lightbox.js +165 -0
- package/src/js/number-input.js +87 -0
- package/src/js/otp-input.js +401 -0
- package/src/js/password-toggle.js +45 -0
- package/src/js/selection.js +114 -0
- package/src/js/sidebar-menu.js +178 -0
- package/src/js/sidebar.js +326 -0
- package/src/js/spinner.js +76 -0
- package/src/js/strength.js +115 -0
- package/src/js/theme-switcher.js +197 -0
- package/src/js/tooltip.js +46 -0
- package/src/scss/_bootstrap.scss +9 -0
- package/src/scss/_variables.scss +58 -0
- package/src/scss/auth/_index.scss +210 -0
- package/src/scss/auth.scss +5 -0
- package/src/scss/blog/_article.scss +181 -0
- package/src/scss/blog/_comments.scss +108 -0
- package/src/scss/blog/_index.scss +18 -0
- package/src/scss/blog/_list.scss +246 -0
- package/src/scss/blog/_page.scss +138 -0
- package/src/scss/blog.scss +5 -0
- package/src/scss/chart/_index.scss +114 -0
- package/src/scss/chart.scss +5 -0
- package/src/scss/compostrap.scss +29 -0
- package/src/scss/dashboard/_content.scss +25 -0
- package/src/scss/dashboard/_dropdown.scss +71 -0
- package/src/scss/dashboard/_index.scss +9 -0
- package/src/scss/dashboard/_nanobar.scss +34 -0
- package/src/scss/dashboard/_navbar.scss +314 -0
- package/src/scss/dashboard/_theme.scss +27 -0
- package/src/scss/dashboard.scss +5 -0
- package/src/scss/datagrid/_index.scss +111 -0
- package/src/scss/datagrid.scss +5 -0
- package/src/scss/datepicker/_index.scss +557 -0
- package/src/scss/datepicker.scss +5 -0
- package/src/scss/dialogs/_index.scss +8 -0
- package/src/scss/dialogs/_modal.scss +82 -0
- package/src/scss/dialogs/_offcanvas.scss +13 -0
- package/src/scss/dialogs/_search.scss +79 -0
- package/src/scss/dialogs/_toast.scss +61 -0
- package/src/scss/dialogs.scss +5 -0
- package/src/scss/dropzone/_index.scss +111 -0
- package/src/scss/dropzone.scss +5 -0
- package/src/scss/elements/_datagrid-filter.scss +21 -0
- package/src/scss/elements/_index.scss +9 -0
- package/src/scss/elements/_list-row.scss +40 -0
- package/src/scss/elements/_loading.scss +47 -0
- package/src/scss/elements/_stat.scss +73 -0
- package/src/scss/elements/_status-dot.scss +38 -0
- package/src/scss/elements.scss +5 -0
- package/src/scss/empty/_index.scss +117 -0
- package/src/scss/empty.scss +5 -0
- package/src/scss/gallery/_index.scss +162 -0
- package/src/scss/gallery.scss +5 -0
- package/src/scss/lightbox/_index.scss +171 -0
- package/src/scss/lightbox.scss +5 -0
- package/src/scss/number-input/_index.scss +143 -0
- package/src/scss/number-input.scss +5 -0
- package/src/scss/otp-input/_index.scss +214 -0
- package/src/scss/otp-input.scss +5 -0
- package/src/scss/password-toggle/_index.scss +82 -0
- package/src/scss/password-toggle.scss +5 -0
- package/src/scss/rating/_index.scss +121 -0
- package/src/scss/rating.scss +5 -0
- package/src/scss/selection/_index.scss +84 -0
- package/src/scss/selection.scss +5 -0
- package/src/scss/settings/_index.scss +6 -0
- package/src/scss/settings/_nav-list.scss +52 -0
- package/src/scss/settings/_setting-row.scss +50 -0
- package/src/scss/settings.scss +5 -0
- package/src/scss/shop/_bar.scss +64 -0
- package/src/scss/shop/_catalog.scss +308 -0
- package/src/scss/shop/_checkout.scss +204 -0
- package/src/scss/shop/_filters.scss +116 -0
- package/src/scss/shop/_hero.scss +130 -0
- package/src/scss/shop/_index.scss +22 -0
- package/src/scss/shop/_page.scss +154 -0
- package/src/scss/shop/_reviews.scss +165 -0
- package/src/scss/shop/_stepper.scss +159 -0
- package/src/scss/shop.scss +5 -0
- package/src/scss/sidebar/_body.scss +8 -0
- package/src/scss/sidebar/_index.scss +8 -0
- package/src/scss/sidebar/_sidebar.scss +89 -0
- package/src/scss/sidebar/_theme.scss +7 -0
- package/src/scss/sidebar/_wrapper.scss +17 -0
- package/src/scss/sidebar-menu/_compact.scss +174 -0
- package/src/scss/sidebar-menu/_index.scss +9 -0
- package/src/scss/sidebar-menu/_list.scss +131 -0
- package/src/scss/sidebar-menu/_pills.scss +82 -0
- package/src/scss/sidebar-menu/_scrollbar.scss +53 -0
- package/src/scss/sidebar-menu/_theme.scss +109 -0
- package/src/scss/sidebar-menu.scss +5 -0
- package/src/scss/sidebar.scss +5 -0
- package/src/scss/spinner/_index.scss +130 -0
- package/src/scss/spinner.scss +5 -0
- package/src/scss/strength/_index.scss +118 -0
- package/src/scss/strength.scss +5 -0
- package/src/scss/theme/_accordion.scss +20 -0
- package/src/scss/theme/_alerts.scss +24 -0
- package/src/scss/theme/_avatar.scss +37 -0
- package/src/scss/theme/_badges.scss +53 -0
- package/src/scss/theme/_base.scss +9 -0
- package/src/scss/theme/_breadcrumb.scss +64 -0
- package/src/scss/theme/_buttons.scss +200 -0
- package/src/scss/theme/_cards.scss +17 -0
- package/src/scss/theme/_colors.scss +139 -0
- package/src/scss/theme/_forms.scss +175 -0
- package/src/scss/theme/_index.scss +18 -0
- package/src/scss/theme/_navs.scss +15 -0
- package/src/scss/theme/_overlays.scss +128 -0
- package/src/scss/theme/_tables.scss +59 -0
- package/src/scss/theme/_variables.scss +194 -0
- package/src/scss/theme-switcher/_index.scss +9 -0
- package/src/scss/theme-switcher.scss +5 -0
- package/src/scss/theme.scss +9 -0
- package/src/scss/tooltip/_index.scss +177 -0
- package/src/scss/tooltip.scss +5 -0
- package/README.md +0 -3
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
//
|
|
2
|
+
// sidebar component
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
@use '../bootstrap' as bs;
|
|
6
|
+
@use '../variables' as var;
|
|
7
|
+
|
|
8
|
+
.sidebar {
|
|
9
|
+
position: fixed;
|
|
10
|
+
top: 0;
|
|
11
|
+
bottom: 0;
|
|
12
|
+
z-index: 1045;
|
|
13
|
+
margin-left: -(var.$sm-width);
|
|
14
|
+
transition: margin 0.15s ease-out;
|
|
15
|
+
|
|
16
|
+
@media (prefers-reduced-motion: reduce) {
|
|
17
|
+
transition: none;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.wrapper-navbar-fixed & {
|
|
21
|
+
top: var.$sm-top;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@include bs.media-breakpoint-up('md') {
|
|
25
|
+
position: static;
|
|
26
|
+
z-index: auto;
|
|
27
|
+
margin-left: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&-toggle {
|
|
31
|
+
margin-left: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&-toggle-visible {
|
|
35
|
+
margin-left: 0;
|
|
36
|
+
|
|
37
|
+
@include bs.media-breakpoint-up('md') {
|
|
38
|
+
margin-left: -(var.$sm-width);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&-rounded-top-right {
|
|
43
|
+
border-top-right-radius: var(--bs-border-radius);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&-backdrop {
|
|
47
|
+
position: fixed;
|
|
48
|
+
inset: 0;
|
|
49
|
+
z-index: 1040;
|
|
50
|
+
display: none;
|
|
51
|
+
background-color: rgba(bs.$black, .60);
|
|
52
|
+
backdrop-filter: blur(.063rem);
|
|
53
|
+
|
|
54
|
+
&.show {
|
|
55
|
+
display: block;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@include bs.media-breakpoint-up('md') {
|
|
59
|
+
display: none !important;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.sidebar-menu {
|
|
65
|
+
width: var.$sm-width;
|
|
66
|
+
|
|
67
|
+
&-fixed {
|
|
68
|
+
position: fixed;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// the brand at the top of a sidebar that runs over the whole height (the navbar then sits over the content only):
|
|
73
|
+
// <a class="sidebar-brand" href="..."><svg>…</svg><span>Compostrap</span></a> above the menu scrollbar
|
|
74
|
+
.sidebar-brand {
|
|
75
|
+
display: flex;
|
|
76
|
+
gap: .625rem;
|
|
77
|
+
align-items: center;
|
|
78
|
+
height: var.$sm-top;
|
|
79
|
+
padding: 0 1.25rem;
|
|
80
|
+
font-size: 1.0625rem;
|
|
81
|
+
font-weight: 600;
|
|
82
|
+
color: var(--bs-emphasis-color);
|
|
83
|
+
text-decoration: none;
|
|
84
|
+
|
|
85
|
+
&:hover {
|
|
86
|
+
color: var(--bs-emphasis-color);
|
|
87
|
+
text-decoration: none;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
//
|
|
2
|
+
// the compact sidebar: only the icons of the first level, from md up (a phone keeps its sliding menu)
|
|
3
|
+
//
|
|
4
|
+
// <html class="sidebar-compact"> set by a button <button class="navbar-icon" data-sidebar-compact aria-pressed="false">,
|
|
5
|
+
// remembered by the Sidebar script. The texts stay in the page (read by screen readers and shown in a label next to
|
|
6
|
+
// a hovered link), the section titles become short lines, submenus and badges are hidden; a link with a submenu
|
|
7
|
+
// opens its links in a menu next to the icon.
|
|
8
|
+
//
|
|
9
|
+
|
|
10
|
+
@use '../bootstrap' as bs;
|
|
11
|
+
@use '../variables' as var;
|
|
12
|
+
|
|
13
|
+
@include bs.media-breakpoint-up(md) {
|
|
14
|
+
.sidebar-compact {
|
|
15
|
+
.sidebar-menu,
|
|
16
|
+
.scrollbar,
|
|
17
|
+
.list {
|
|
18
|
+
width: var.$sm-compact-width;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// a sidebar hidden by its toggle (the older layout) moves out by its compact width
|
|
22
|
+
.sidebar-toggle-visible {
|
|
23
|
+
margin-left: -(var.$sm-compact-width);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// only the logo of the brand, in the middle
|
|
27
|
+
.sidebar-brand {
|
|
28
|
+
justify-content: center;
|
|
29
|
+
padding-inline: 0;
|
|
30
|
+
|
|
31
|
+
> :not(svg, img) {
|
|
32
|
+
display: none;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// a section title is a short line between the groups of icons (the first one is left out)
|
|
37
|
+
.list-title {
|
|
38
|
+
width: 1.5rem;
|
|
39
|
+
height: 1px;
|
|
40
|
+
padding: 0;
|
|
41
|
+
margin: .375rem auto .5rem;
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
font-size: 0;
|
|
44
|
+
background-color: rgba(var(--bs-body-color-rgb), .12);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// (every section may be a .list of its own, so the first list is meant, not the first item of each)
|
|
48
|
+
.list:first-of-type > .list-item:first-child > .list-title {
|
|
49
|
+
height: 0;
|
|
50
|
+
margin-block: 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// the icon in the middle of its pill, the text of the link hidden by a zero font size (the icon has its own)
|
|
54
|
+
.list .list-link {
|
|
55
|
+
padding-inline: 0;
|
|
56
|
+
text-align: center;
|
|
57
|
+
|
|
58
|
+
.float-start {
|
|
59
|
+
float: none !important;
|
|
60
|
+
font-size: 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.float-end {
|
|
64
|
+
display: none;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.list-icon {
|
|
69
|
+
margin-right: 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.link-arrow::before {
|
|
73
|
+
display: none;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// submenus are hidden, so a group holding the current page gets its pill
|
|
77
|
+
.list .list-hidden {
|
|
78
|
+
display: none !important;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.list .list-link.link-arrow.link-current {
|
|
82
|
+
background-color: var(--sm-pill-link-bg);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// a group whose menu is open keeps the pill of a hovered link
|
|
86
|
+
.list .list-link.sidebar-compact-open {
|
|
87
|
+
background-color: var(--sm-pill-hover-bg);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// the links of a group in the compact sidebar: a menu next to the icon (made by the Sidebar script) in the look of
|
|
93
|
+
// the dropdowns of the theme, from their variables. It has classes of its own, not .dropdown-menu: Bootstrap handles
|
|
94
|
+
// the keys of every .dropdown-menu and would open another dropdown of the page by the arrows
|
|
95
|
+
// <ul class="sidebar-compact-menu"><li><h6 class="sidebar-compact-menu-header">Commerce</h6></li>
|
|
96
|
+
// <li><a class="sidebar-compact-menu-item active" aria-current="page" href="...">Products</a></li></ul>
|
|
97
|
+
.sidebar-compact-menu {
|
|
98
|
+
--sm-menu-bg: #{bs.$dropdown-bg};
|
|
99
|
+
--sm-menu-item-hover-bg: #{bs.$dropdown-link-hover-bg};
|
|
100
|
+
|
|
101
|
+
position: fixed;
|
|
102
|
+
z-index: 1080;
|
|
103
|
+
min-width: 12rem;
|
|
104
|
+
// a group longer than the window scrolls inside the menu
|
|
105
|
+
max-height: calc(100vh - 1rem);
|
|
106
|
+
padding: bs.$dropdown-padding-y bs.$dropdown-padding-x;
|
|
107
|
+
overflow-y: auto;
|
|
108
|
+
margin: 0;
|
|
109
|
+
font-size: bs.$dropdown-font-size;
|
|
110
|
+
list-style: none;
|
|
111
|
+
background-color: var(--sm-menu-bg);
|
|
112
|
+
border-radius: bs.$dropdown-border-radius;
|
|
113
|
+
box-shadow: var(--bs-box-shadow-lg);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// in the dark theme, where a shadow is not seen, a lighter surface like the dropdowns
|
|
117
|
+
[data-bs-theme='dark'] .sidebar-compact-menu {
|
|
118
|
+
--sm-menu-bg: var(--bs-secondary-bg);
|
|
119
|
+
--sm-menu-item-hover-bg: rgba(var(--bs-body-color-rgb), .08);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.sidebar-compact-menu-header {
|
|
123
|
+
padding: bs.$dropdown-header-padding-y bs.$dropdown-header-padding-x;
|
|
124
|
+
margin: 0;
|
|
125
|
+
font-size: bs.$font-size-sm;
|
|
126
|
+
color: var(--bs-secondary-color);
|
|
127
|
+
white-space: nowrap;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.sidebar-compact-menu-item {
|
|
131
|
+
display: block;
|
|
132
|
+
padding: bs.$dropdown-item-padding-y bs.$dropdown-item-padding-x;
|
|
133
|
+
color: bs.$dropdown-link-color;
|
|
134
|
+
white-space: nowrap;
|
|
135
|
+
text-decoration: none;
|
|
136
|
+
border-radius: bs.$dropdown-item-border-radius;
|
|
137
|
+
|
|
138
|
+
&:hover,
|
|
139
|
+
&:focus {
|
|
140
|
+
color: bs.$dropdown-link-hover-color;
|
|
141
|
+
text-decoration: none;
|
|
142
|
+
background-color: var(--sm-menu-item-hover-bg);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// the ring only for the keyboard, like the other menus
|
|
146
|
+
&:focus:not(:focus-visible) {
|
|
147
|
+
outline: 0;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&.active {
|
|
151
|
+
color: bs.$dropdown-link-active-color;
|
|
152
|
+
background-color: bs.$dropdown-link-active-bg;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// the name of a hovered link next to the compact sidebar, in the colors of the default tooltip; it is a box of its own
|
|
157
|
+
// in the body (made by the Sidebar script), because the scrolling menu would cut off a label inside it
|
|
158
|
+
.sidebar-compact-label {
|
|
159
|
+
position: fixed;
|
|
160
|
+
z-index: 1080;
|
|
161
|
+
padding: .25rem .5rem;
|
|
162
|
+
font-size: .75rem;
|
|
163
|
+
line-height: 1.2;
|
|
164
|
+
color: var(--cs-tooltip-default-color, var(--bs-body-bg));
|
|
165
|
+
white-space: nowrap;
|
|
166
|
+
pointer-events: none;
|
|
167
|
+
background-color: var(--cs-tooltip-default-bg, var(--bs-emphasis-color));
|
|
168
|
+
border-radius: var(--bs-border-radius-sm);
|
|
169
|
+
transform: translateY(-50%);
|
|
170
|
+
|
|
171
|
+
&[hidden] {
|
|
172
|
+
display: none;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
//
|
|
2
|
+
// list component for sidebar skeleton
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
@use '../variables' as var;
|
|
6
|
+
|
|
7
|
+
.list {
|
|
8
|
+
width: var.$sm-width;
|
|
9
|
+
font-size: var.$sm-font-size;
|
|
10
|
+
line-height: var.$sm-line-height;
|
|
11
|
+
|
|
12
|
+
&-item {
|
|
13
|
+
padding: 0;
|
|
14
|
+
margin-top: var.$sm-section-gap;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// a section title sits close to its first link
|
|
18
|
+
&-title {
|
|
19
|
+
padding: .25rem var.$sm-link-padding-x .125rem;
|
|
20
|
+
margin-bottom: 0;
|
|
21
|
+
font-size: var.$sm-title-font-size;
|
|
22
|
+
font-weight: 500;
|
|
23
|
+
letter-spacing: .04em;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&-link {
|
|
27
|
+
display: block;
|
|
28
|
+
padding: var.$sm-link-padding-y var.$sm-link-padding-x;
|
|
29
|
+
margin: 0;
|
|
30
|
+
text-decoration: none;
|
|
31
|
+
|
|
32
|
+
// never underlined, also when the theme (or a project) underlines links on hover
|
|
33
|
+
&:hover {
|
|
34
|
+
text-decoration: none;
|
|
35
|
+
|
|
36
|
+
// the bell shakes only for a user who has not asked the system for less motion
|
|
37
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
38
|
+
.bell {
|
|
39
|
+
animation: bell-shake .5s cubic-bezier(.36, .07, .19, .97) both;
|
|
40
|
+
backface-visibility: hidden;
|
|
41
|
+
transform-origin: top right;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// a submenu spans the whole width (so a highlight of its link does too), the text of its links starts under
|
|
48
|
+
// the text of the parent link, each deeper level is indented a bit more
|
|
49
|
+
& &-hidden {
|
|
50
|
+
display: none;
|
|
51
|
+
overflow: hidden;
|
|
52
|
+
padding: 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&-hidden &-link {
|
|
56
|
+
padding-top: var.$sm-sublink-padding-y;
|
|
57
|
+
padding-bottom: var.$sm-sublink-padding-y;
|
|
58
|
+
padding-left: var.$sm-link-padding-x + var.$sm-icon-width + var.$sm-icon-gap;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&-hidden &-hidden &-link {
|
|
62
|
+
padding-left: var.$sm-link-padding-x + var.$sm-icon-width + var.$sm-icon-gap + var.$sm-sub-indent;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@keyframes bell-shake {
|
|
66
|
+
0% { transform: rotate(0); }
|
|
67
|
+
15% { transform: rotate(5deg); }
|
|
68
|
+
30% { transform: rotate(-5deg); }
|
|
69
|
+
45% { transform: rotate(4deg); }
|
|
70
|
+
60% { transform: rotate(-4deg); }
|
|
71
|
+
75% { transform: rotate(2deg); }
|
|
72
|
+
85% { transform: rotate(-2deg); }
|
|
73
|
+
92% { transform: rotate(1deg); }
|
|
74
|
+
100% { transform: rotate(0); }
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&-icon {
|
|
78
|
+
display: inline-block;
|
|
79
|
+
width: var.$sm-icon-width;
|
|
80
|
+
margin-right: var.$sm-icon-gap;
|
|
81
|
+
font-size: var.$sm-icon-size;
|
|
82
|
+
text-align: center;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// the current page and the group holding it are medium, so the section of the page is seen at once
|
|
86
|
+
.link-current {
|
|
87
|
+
font-weight: 500;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// arrow icon up and down in menu
|
|
92
|
+
.link-arrow:before {
|
|
93
|
+
font-family: var.$icon-font, sans-serif;
|
|
94
|
+
font-weight: var.$icon-font-weight;
|
|
95
|
+
font-size: var.$sm-arrow-size;
|
|
96
|
+
margin-right: -(var.$sm-arrow-shift);
|
|
97
|
+
-webkit-text-stroke: var.$sm-arrow-stroke currentColor;
|
|
98
|
+
float: right;
|
|
99
|
+
transition-property: transform;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// a badge of a link with a submenu keeps a gap before the arrow
|
|
103
|
+
.link-arrow .float-end {
|
|
104
|
+
margin-right: .5rem;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.link-arrow.up:before {
|
|
108
|
+
content: var.$icon-chevron-right;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.link-arrow.down:before {
|
|
112
|
+
content: var.$icon-chevron-down;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.link-arrow.transition:before {
|
|
116
|
+
transition: transform 0.07s;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.link-arrow.rotate:before {
|
|
120
|
+
transform: rotate(90deg);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.link-arrow.rotate-revert:before {
|
|
124
|
+
transform: rotate(-90deg);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// a link that only opens its submenu (no address) still shows the hand
|
|
128
|
+
.link-arrow {
|
|
129
|
+
cursor: pointer;
|
|
130
|
+
user-select: none;
|
|
131
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
//
|
|
2
|
+
// links as pills: inset from the sidebar edges, the current page on any level in a pill of the page background color
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
@use '../variables' as var;
|
|
6
|
+
|
|
7
|
+
// links are pills inset from the sidebar edges with a small gap between them (pills of 36px on the first level and
|
|
8
|
+
// 32px in submenus, rows of 42px and 38px); their text stays where the base menu has it
|
|
9
|
+
$inset: .5rem;
|
|
10
|
+
$gap: .375rem; // vertical margins of neighbouring links collapse into one gap of this size
|
|
11
|
+
$pill-padding-y: .5rem;
|
|
12
|
+
$subpill-padding-y: .375rem;
|
|
13
|
+
$text-start: var.$sm-link-padding-x + var.$sm-icon-width + var.$sm-icon-gap;
|
|
14
|
+
|
|
15
|
+
.list {
|
|
16
|
+
.list-link {
|
|
17
|
+
margin: $gap $inset;
|
|
18
|
+
padding: $pill-padding-y (var.$sm-link-padding-x - $inset);
|
|
19
|
+
border-radius: var(--sm-pill-border-radius);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.list-hidden .list-link {
|
|
23
|
+
padding-top: $subpill-padding-y;
|
|
24
|
+
padding-bottom: $subpill-padding-y;
|
|
25
|
+
padding-left: $text-start - $inset;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// a submenu hides its overflow, so the margins of its first and last link would add to the gap around it instead
|
|
29
|
+
// of collapsing with the neighbouring links; the gap stays the same as between any two links
|
|
30
|
+
.list-hidden > li:first-child > .list-link {
|
|
31
|
+
margin-top: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// the first link of a section keeps only a small gap under the section title
|
|
35
|
+
.list-title + .list-unstyled > li:first-child > .list-link {
|
|
36
|
+
margin-top: .25rem;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.list-hidden > li:last-child > .list-link {
|
|
40
|
+
margin-bottom: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.list-hidden .list-hidden .list-link {
|
|
44
|
+
padding-left: $text-start + var.$sm-sub-indent - $inset;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// the pill marks the current page on any level; a group holding it is not filled, so the menu never shows
|
|
48
|
+
// two selections; a hovered link gets a slightly weaker pill
|
|
49
|
+
.list-link:hover {
|
|
50
|
+
background-color: var(--sm-pill-hover-bg);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.list-link.link-current:not(.link-arrow) {
|
|
54
|
+
background-color: var(--sm-pill-link-bg);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.list-link .list-icon {
|
|
58
|
+
color: var(--sm-pill-icon-color);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.list-link:hover .list-icon {
|
|
62
|
+
color: var(--sm-icon-hover);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.list-link.link-current .list-icon {
|
|
66
|
+
color: var(--sm-icon-current);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// the pill has the color of the page background (of the dashboard when it is used, else the tertiary background
|
|
71
|
+
// of Bootstrap), the icons are muted like in the base menu
|
|
72
|
+
:root {
|
|
73
|
+
--sm-pill-border-radius: var(--bs-border-radius);
|
|
74
|
+
--sm-pill-icon-color: var(--sm-icon-color);
|
|
75
|
+
--sm-pill-link-bg: var(--ds-body-bg, var(--bs-tertiary-bg));
|
|
76
|
+
// the hovered pill: the same color drawn a bit towards the surface of the sidebar, in both themes
|
|
77
|
+
--sm-pill-hover-bg: color-mix(in srgb, var(--sm-pill-link-bg) 85%, var(--bs-body-bg));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
[data-bs-theme='dark'] {
|
|
81
|
+
--sm-pill-hover-bg: color-mix(in srgb, var(--sm-pill-link-bg) 70%, var(--bs-body-bg));
|
|
82
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
//
|
|
2
|
+
// scrollbar component for list
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
@use '../variables' as var;
|
|
6
|
+
|
|
7
|
+
.scrollbar {
|
|
8
|
+
width: var.$sm-width;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
position: relative;
|
|
11
|
+
|
|
12
|
+
&-not-navbar {
|
|
13
|
+
height: calc(100vh);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&-use-navbar {
|
|
17
|
+
height: calc(100vh - #{var.$sm-top});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// customize
|
|
22
|
+
.ps__rail-y {
|
|
23
|
+
margin-top: .125rem;
|
|
24
|
+
margin-bottom: .125rem;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.ps__rail-y.ps--clicking .ps__thumb-y,
|
|
28
|
+
.ps__rail-y:focus .ps__thumb-y,
|
|
29
|
+
.ps__rail-y:hover .ps__thumb-y,
|
|
30
|
+
.ps__thumb-y {
|
|
31
|
+
width: var.$sm-scrollbar;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// with a brand on top the fixed part of the sidebar is a column over the height of the window: the brand, and the menu
|
|
35
|
+
// fills the rest whatever the height of the brand is (a fixed calc() cut the last links off below the window); the
|
|
36
|
+
// menu ends with some room, so its last links can be scrolled up from the bottom edge and are easy to reach
|
|
37
|
+
.sidebar-menu-fixed:has(> .sidebar-brand) {
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
height: 100vh;
|
|
41
|
+
height: 100dvh;
|
|
42
|
+
|
|
43
|
+
> .sidebar-brand {
|
|
44
|
+
flex-shrink: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
> .scrollbar {
|
|
48
|
+
flex: 1 1 auto;
|
|
49
|
+
height: auto;
|
|
50
|
+
min-height: 0;
|
|
51
|
+
padding-bottom: 2rem;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
//
|
|
2
|
+
// theme default
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// The colors come from the body color of Bootstrap, so they follow the light and dark theme by themselves:
|
|
6
|
+
// links at 85 %, section titles at 60 %, icons at 60 % (75 % on hover and for the current page, so all icons
|
|
7
|
+
// keep one shade), arrows at 85 % like the link text; the current page differs by the medium weight only, not by its color.
|
|
8
|
+
:root {
|
|
9
|
+
--sm-list-color: rgba(var(--bs-body-color-rgb), .6);
|
|
10
|
+
--sm-link-color: rgba(var(--bs-body-color-rgb), .85);
|
|
11
|
+
--sm-link-hover: var(--bs-emphasis-color);
|
|
12
|
+
--sm-link-current: var(--bs-body-color);
|
|
13
|
+
--sm-hide-bg: transparent;
|
|
14
|
+
--sm-hide-color: rgba(var(--bs-body-color-rgb), .85);
|
|
15
|
+
--sm-hide-hover: var(--bs-emphasis-color);
|
|
16
|
+
--sm-hide-current: var(--bs-body-color);
|
|
17
|
+
--sm-icon-color: rgba(var(--bs-body-color-rgb), .6);
|
|
18
|
+
--sm-icon-hover: rgba(var(--bs-body-color-rgb), .75);
|
|
19
|
+
--sm-icon-current: rgba(var(--bs-body-color-rgb), .75);
|
|
20
|
+
--sm-arrow-color: rgba(var(--bs-body-color-rgb), .85);
|
|
21
|
+
--sm-arrow-hover: var(--bs-body-color);
|
|
22
|
+
--sm-arrow-current: rgba(var(--bs-body-color-rgb), .85);
|
|
23
|
+
--sm-scrollbar-bg: rgba(var(--bs-body-color-rgb), .2);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.list {
|
|
27
|
+
color: var(--sm-list-color);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.list .list-link {
|
|
31
|
+
color: var(--sm-link-color);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.list .list-link:hover {
|
|
35
|
+
color: var(--sm-link-hover);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.list .link-current,
|
|
39
|
+
.list .link-current:hover {
|
|
40
|
+
color: var(--sm-link-current);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.list .list-hidden {
|
|
44
|
+
background-color: var(--sm-hide-bg);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.list .list-hidden .list-link {
|
|
48
|
+
color: var(--sm-hide-color);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.list .list-hidden .list-link:hover {
|
|
52
|
+
color: var(--sm-hide-hover);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.list .list-hidden .link-current,
|
|
56
|
+
.list .list-hidden .link-current:hover {
|
|
57
|
+
color: var(--sm-hide-current);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.list .list-link .list-icon {
|
|
61
|
+
color: var(--sm-icon-color);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.list .list-link:hover .list-icon {
|
|
65
|
+
color: var(--sm-icon-hover);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.list .list-link.link-current .list-icon,
|
|
69
|
+
.list .list-link.link-current:hover .list-icon {
|
|
70
|
+
color: var(--sm-icon-current);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.list .link-arrow:before {
|
|
74
|
+
color: var(--sm-arrow-color);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.list .link-arrow:hover:before {
|
|
78
|
+
color: var(--sm-arrow-hover);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.list .link-arrow.link-current:before,
|
|
82
|
+
.list .link-arrow.link-current:hover:before {
|
|
83
|
+
color: var(--sm-arrow-current);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.sidebar-user {
|
|
87
|
+
background-color: var(--sm-hide-bg);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.sidebar-user .sidebar-user-link {
|
|
91
|
+
color: var(--sm-link-color);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.sidebar-user .sidebar-user-link:hover {
|
|
95
|
+
color: var(--sm-link-hover);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.ps .ps__rail-y.ps--clicking .ps__thumb-y,
|
|
99
|
+
.ps .ps__rail-y:focus .ps__thumb-y,
|
|
100
|
+
.ps .ps__rail-y:hover .ps__thumb-y,
|
|
101
|
+
.ps .ps__thumb-y {
|
|
102
|
+
background-color: var(--sm-scrollbar-bg);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.ps .ps__rail-y.ps--clicking,
|
|
106
|
+
.ps .ps__rail-y:focus,
|
|
107
|
+
.ps .ps__rail-y:hover {
|
|
108
|
+
background: none;
|
|
109
|
+
}
|