compostrap 0.0.0-stage → 1.0.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.
Files changed (198) hide show
  1. package/dist/css/auth.css +166 -0
  2. package/dist/css/blog.css +512 -0
  3. package/dist/css/chart.css +99 -0
  4. package/dist/css/compostrap.css +5047 -0
  5. package/dist/css/dashboard.css +360 -0
  6. package/dist/css/datagrid.css +64 -0
  7. package/dist/css/datepicker.css +514 -0
  8. package/dist/css/dialogs.css +185 -0
  9. package/dist/css/dropzone.css +86 -0
  10. package/dist/css/elements.css +181 -0
  11. package/dist/css/empty.css +94 -0
  12. package/dist/css/gallery.css +122 -0
  13. package/dist/css/lightbox.css +140 -0
  14. package/dist/css/number-input.css +100 -0
  15. package/dist/css/otp-input.css +177 -0
  16. package/dist/css/password-toggle.css +52 -0
  17. package/dist/css/rating.css +95 -0
  18. package/dist/css/selection.css +59 -0
  19. package/dist/css/settings.css +85 -0
  20. package/dist/css/shop.css +1026 -0
  21. package/dist/css/sidebar-menu.css +438 -0
  22. package/dist/css/sidebar.css +95 -0
  23. package/dist/css/spinner.css +102 -0
  24. package/dist/css/strength.css +118 -0
  25. package/dist/css/theme-switcher.css +5 -0
  26. package/dist/css/theme.css +13006 -0
  27. package/dist/css/tooltip.css +158 -0
  28. package/dist/js/chart.js +257 -0
  29. package/dist/js/datepicker.js +82 -0
  30. package/dist/js/dialogs.js +7 -0
  31. package/dist/js/dropzone.js +15 -0
  32. package/dist/js/index.js +24 -0
  33. package/dist/js/lightbox.js +77 -0
  34. package/dist/js/number-input.js +44 -0
  35. package/dist/js/otp-input.js +182 -0
  36. package/dist/js/password-toggle.js +16 -0
  37. package/dist/js/selection.js +32 -0
  38. package/dist/js/sidebar-menu.js +76 -0
  39. package/dist/js/sidebar.js +120 -0
  40. package/dist/js/spinner.js +27 -0
  41. package/dist/js/strength.js +87 -0
  42. package/dist/js/theme-switcher.js +98 -0
  43. package/dist/js/tooltip.js +17 -0
  44. package/docs/auth.md +25 -0
  45. package/docs/blog.md +85 -0
  46. package/docs/chart.md +39 -0
  47. package/docs/datagrid.md +64 -0
  48. package/docs/datepicker.md +35 -0
  49. package/docs/dialogs.md +81 -0
  50. package/docs/dropzone.md +23 -0
  51. package/docs/elements.md +38 -0
  52. package/docs/empty.md +25 -0
  53. package/docs/gallery.md +23 -0
  54. package/docs/layout.md +143 -0
  55. package/docs/lightbox.md +18 -0
  56. package/docs/number-input.md +19 -0
  57. package/docs/otp-input.md +52 -0
  58. package/docs/password-toggle.md +21 -0
  59. package/docs/rating.md +15 -0
  60. package/docs/selection.md +52 -0
  61. package/docs/settings.md +25 -0
  62. package/docs/shop.md +140 -0
  63. package/docs/spinner.md +51 -0
  64. package/docs/strength.md +26 -0
  65. package/docs/theme-switcher.md +60 -0
  66. package/docs/theme.md +100 -0
  67. package/docs/tooltip.md +30 -0
  68. package/license +21 -0
  69. package/package.json +106 -6
  70. package/readme.md +198 -0
  71. package/src/illustrations/empty.svg +15 -0
  72. package/src/illustrations/forbidden.svg +16 -0
  73. package/src/illustrations/maintenance.svg +14 -0
  74. package/src/illustrations/not-found.svg +22 -0
  75. package/src/illustrations/server-error.svg +21 -0
  76. package/src/js/chart.js +359 -0
  77. package/src/js/datepicker.js +154 -0
  78. package/src/js/dialogs.js +25 -0
  79. package/src/js/dropzone.js +35 -0
  80. package/src/js/index.js +29 -0
  81. package/src/js/lightbox.js +165 -0
  82. package/src/js/number-input.js +87 -0
  83. package/src/js/otp-input.js +401 -0
  84. package/src/js/password-toggle.js +45 -0
  85. package/src/js/selection.js +114 -0
  86. package/src/js/sidebar-menu.js +178 -0
  87. package/src/js/sidebar.js +326 -0
  88. package/src/js/spinner.js +76 -0
  89. package/src/js/strength.js +115 -0
  90. package/src/js/theme-switcher.js +197 -0
  91. package/src/js/tooltip.js +46 -0
  92. package/src/scss/_bootstrap.scss +9 -0
  93. package/src/scss/_variables.scss +58 -0
  94. package/src/scss/auth/_index.scss +210 -0
  95. package/src/scss/auth.scss +5 -0
  96. package/src/scss/blog/_article.scss +181 -0
  97. package/src/scss/blog/_comments.scss +108 -0
  98. package/src/scss/blog/_index.scss +18 -0
  99. package/src/scss/blog/_list.scss +246 -0
  100. package/src/scss/blog/_page.scss +138 -0
  101. package/src/scss/blog.scss +5 -0
  102. package/src/scss/chart/_index.scss +114 -0
  103. package/src/scss/chart.scss +5 -0
  104. package/src/scss/compostrap.scss +29 -0
  105. package/src/scss/dashboard/_content.scss +25 -0
  106. package/src/scss/dashboard/_dropdown.scss +71 -0
  107. package/src/scss/dashboard/_index.scss +9 -0
  108. package/src/scss/dashboard/_nanobar.scss +34 -0
  109. package/src/scss/dashboard/_navbar.scss +314 -0
  110. package/src/scss/dashboard/_theme.scss +27 -0
  111. package/src/scss/dashboard.scss +5 -0
  112. package/src/scss/datagrid/_index.scss +111 -0
  113. package/src/scss/datagrid.scss +5 -0
  114. package/src/scss/datepicker/_index.scss +557 -0
  115. package/src/scss/datepicker.scss +5 -0
  116. package/src/scss/dialogs/_index.scss +8 -0
  117. package/src/scss/dialogs/_modal.scss +82 -0
  118. package/src/scss/dialogs/_offcanvas.scss +13 -0
  119. package/src/scss/dialogs/_search.scss +79 -0
  120. package/src/scss/dialogs/_toast.scss +61 -0
  121. package/src/scss/dialogs.scss +5 -0
  122. package/src/scss/dropzone/_index.scss +111 -0
  123. package/src/scss/dropzone.scss +5 -0
  124. package/src/scss/elements/_datagrid-filter.scss +21 -0
  125. package/src/scss/elements/_index.scss +9 -0
  126. package/src/scss/elements/_list-row.scss +40 -0
  127. package/src/scss/elements/_loading.scss +47 -0
  128. package/src/scss/elements/_stat.scss +73 -0
  129. package/src/scss/elements/_status-dot.scss +38 -0
  130. package/src/scss/elements.scss +5 -0
  131. package/src/scss/empty/_index.scss +117 -0
  132. package/src/scss/empty.scss +5 -0
  133. package/src/scss/gallery/_index.scss +162 -0
  134. package/src/scss/gallery.scss +5 -0
  135. package/src/scss/lightbox/_index.scss +164 -0
  136. package/src/scss/lightbox.scss +5 -0
  137. package/src/scss/number-input/_index.scss +143 -0
  138. package/src/scss/number-input.scss +5 -0
  139. package/src/scss/otp-input/_index.scss +214 -0
  140. package/src/scss/otp-input.scss +5 -0
  141. package/src/scss/password-toggle/_index.scss +82 -0
  142. package/src/scss/password-toggle.scss +5 -0
  143. package/src/scss/rating/_index.scss +121 -0
  144. package/src/scss/rating.scss +5 -0
  145. package/src/scss/selection/_index.scss +84 -0
  146. package/src/scss/selection.scss +5 -0
  147. package/src/scss/settings/_index.scss +6 -0
  148. package/src/scss/settings/_nav-list.scss +52 -0
  149. package/src/scss/settings/_setting-row.scss +50 -0
  150. package/src/scss/settings.scss +5 -0
  151. package/src/scss/shop/_bar.scss +64 -0
  152. package/src/scss/shop/_catalog.scss +308 -0
  153. package/src/scss/shop/_checkout.scss +204 -0
  154. package/src/scss/shop/_filters.scss +116 -0
  155. package/src/scss/shop/_hero.scss +130 -0
  156. package/src/scss/shop/_index.scss +22 -0
  157. package/src/scss/shop/_page.scss +154 -0
  158. package/src/scss/shop/_reviews.scss +165 -0
  159. package/src/scss/shop/_stepper.scss +159 -0
  160. package/src/scss/shop.scss +5 -0
  161. package/src/scss/sidebar/_body.scss +8 -0
  162. package/src/scss/sidebar/_index.scss +8 -0
  163. package/src/scss/sidebar/_sidebar.scss +89 -0
  164. package/src/scss/sidebar/_theme.scss +7 -0
  165. package/src/scss/sidebar/_wrapper.scss +17 -0
  166. package/src/scss/sidebar-menu/_compact.scss +173 -0
  167. package/src/scss/sidebar-menu/_index.scss +9 -0
  168. package/src/scss/sidebar-menu/_list.scss +131 -0
  169. package/src/scss/sidebar-menu/_pills.scss +82 -0
  170. package/src/scss/sidebar-menu/_scrollbar.scss +53 -0
  171. package/src/scss/sidebar-menu/_theme.scss +109 -0
  172. package/src/scss/sidebar-menu.scss +5 -0
  173. package/src/scss/sidebar.scss +5 -0
  174. package/src/scss/spinner/_index.scss +130 -0
  175. package/src/scss/spinner.scss +5 -0
  176. package/src/scss/strength/_index.scss +118 -0
  177. package/src/scss/strength.scss +5 -0
  178. package/src/scss/theme/_accordion.scss +20 -0
  179. package/src/scss/theme/_alerts.scss +24 -0
  180. package/src/scss/theme/_avatar.scss +37 -0
  181. package/src/scss/theme/_badges.scss +53 -0
  182. package/src/scss/theme/_base.scss +9 -0
  183. package/src/scss/theme/_breadcrumb.scss +64 -0
  184. package/src/scss/theme/_buttons.scss +200 -0
  185. package/src/scss/theme/_cards.scss +17 -0
  186. package/src/scss/theme/_colors.scss +139 -0
  187. package/src/scss/theme/_forms.scss +175 -0
  188. package/src/scss/theme/_index.scss +18 -0
  189. package/src/scss/theme/_navs.scss +15 -0
  190. package/src/scss/theme/_overlays.scss +114 -0
  191. package/src/scss/theme/_tables.scss +59 -0
  192. package/src/scss/theme/_variables.scss +189 -0
  193. package/src/scss/theme-switcher/_index.scss +9 -0
  194. package/src/scss/theme-switcher.scss +5 -0
  195. package/src/scss/theme.scss +9 -0
  196. package/src/scss/tooltip/_index.scss +177 -0
  197. package/src/scss/tooltip.scss +5 -0
  198. 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,7 @@
1
+ //
2
+ // sidebar theme
3
+ //
4
+
5
+ .sidebar {
6
+ background-color: var(--bs-body-bg);
7
+ }
@@ -0,0 +1,17 @@
1
+ //
2
+ // wrapper for content layout
3
+ //
4
+
5
+ @use '../variables' as var;
6
+
7
+ .wrapper {
8
+ min-height: 100vh;
9
+
10
+ &-navbar-used {
11
+ min-height: calc(100vh - #{var.$sm-top});
12
+ }
13
+
14
+ &-navbar-fixed {
15
+ margin-top: var.$sm-top;
16
+ }
17
+ }
@@ -0,0 +1,173 @@
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 0;
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
+
137
+ &:hover,
138
+ &:focus {
139
+ color: bs.$dropdown-link-hover-color;
140
+ text-decoration: none;
141
+ background-color: var(--sm-menu-item-hover-bg);
142
+ }
143
+
144
+ // the ring only for the keyboard, like the other menus
145
+ &:focus:not(:focus-visible) {
146
+ outline: 0;
147
+ }
148
+
149
+ &.active {
150
+ color: bs.$dropdown-link-active-color;
151
+ background-color: bs.$dropdown-link-active-bg;
152
+ }
153
+ }
154
+
155
+ // 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
156
+ // in the body (made by the Sidebar script), because the scrolling menu would cut off a label inside it
157
+ .sidebar-compact-label {
158
+ position: fixed;
159
+ z-index: 1080;
160
+ padding: .25rem .5rem;
161
+ font-size: .75rem;
162
+ line-height: 1.2;
163
+ color: var(--cs-tooltip-default-color, var(--bs-body-bg));
164
+ white-space: nowrap;
165
+ pointer-events: none;
166
+ background-color: var(--cs-tooltip-default-bg, var(--bs-emphasis-color));
167
+ border-radius: var(--bs-border-radius-sm);
168
+ transform: translateY(-50%);
169
+
170
+ &[hidden] {
171
+ display: none;
172
+ }
173
+ }
@@ -0,0 +1,9 @@
1
+ //
2
+ // sidebar menu
3
+ //
4
+
5
+ @use 'list';
6
+ @use 'scrollbar';
7
+ @use 'theme';
8
+ @use 'pills';
9
+ @use 'compact';
@@ -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
+ }
@@ -0,0 +1,5 @@
1
+ //
2
+ // sidebar-menu module of compostrap
3
+ //
4
+
5
+ @use 'sidebar-menu/index';
@@ -0,0 +1,5 @@
1
+ //
2
+ // sidebar module of compostrap
3
+ //
4
+
5
+ @use 'sidebar/index';