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.
- 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 +5047 -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 +140 -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 +438 -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 +13006 -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 +164 -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 +173 -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 +114 -0
- package/src/scss/theme/_tables.scss +59 -0
- package/src/scss/theme/_variables.scss +189 -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,139 @@
|
|
|
1
|
+
//
|
|
2
|
+
// theme: the colors
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
@use 'sass:color';
|
|
6
|
+
@use 'sass:map';
|
|
7
|
+
|
|
8
|
+
//
|
|
9
|
+
// Colors in the way of Bootstrap 6, so the markup stays valid after the upgrade. A `.theme-*` class (and the classes of
|
|
10
|
+
// Bootstrap 5 for one color: .btn-primary, .btn-outline-primary, .alert-primary) sets the tokens of the color:
|
|
11
|
+
// --theme-bg (solid) and --theme-contrast (text on it), --theme-fg and --theme-fg-emphasis (text in the color),
|
|
12
|
+
// --theme-bg-subtle and --theme-bg-muted (light tints), --theme-border. The steps follow Bootstrap 6: mixed in oklch
|
|
13
|
+
// with white (100 = 80 %, 200 = 60 %, 300 = 40 %, 400 = 20 %) or black (600 = 16 %, 800 = 48 %); the light tints of the
|
|
14
|
+
// dark theme are mixed with its body background instead (16 % and 26 % of the color), quieter than Bootstrap 6.
|
|
15
|
+
//
|
|
16
|
+
|
|
17
|
+
// the steps are mixed from the original oklch colors of Bootstrap 6 (the hex values in theme/_variables.scss are
|
|
18
|
+
// clipped to sRGB, their tints would be paler); a color not listed here is mixed from its hex value
|
|
19
|
+
$theme-color-sources: (
|
|
20
|
+
'primary': oklch(60% .24 240),
|
|
21
|
+
'success': oklch(64% .22 160),
|
|
22
|
+
'info': oklch(69% .22 220),
|
|
23
|
+
'warning': oklch(88% .24 88),
|
|
24
|
+
'danger': oklch(60% .22 20),
|
|
25
|
+
) !default;
|
|
26
|
+
|
|
27
|
+
// secondary is a light gray in Bootstrap 6 (a light button with dark text), not a dark gray. One gray for the solid
|
|
28
|
+
// and the subtle button and the subtle badge (a step under $gray-100, which was too light on the page), one hover
|
|
29
|
+
// for all of them (half way to bg-muted) and bg-muted for a press; the same in the dark theme with a quiet dark gray
|
|
30
|
+
// (the lightest on which the gray text of a subtle badge still reads 4.5:1)
|
|
31
|
+
$theme-secondary-bg: #f0f0f0 !default;
|
|
32
|
+
$theme-secondary-bg-dark: #363636 !default;
|
|
33
|
+
$theme-secondary-light: (
|
|
34
|
+
bg: $theme-secondary-bg,
|
|
35
|
+
contrast: $gray-900,
|
|
36
|
+
fg: $gray-600,
|
|
37
|
+
fg-emphasis: $gray-800,
|
|
38
|
+
bg-subtle: $theme-secondary-bg,
|
|
39
|
+
bg-muted: $gray-200,
|
|
40
|
+
border: $gray-300,
|
|
41
|
+
) !default;
|
|
42
|
+
$theme-secondary-dark: (
|
|
43
|
+
bg: $theme-secondary-bg-dark,
|
|
44
|
+
contrast: $white,
|
|
45
|
+
fg: $gray-400,
|
|
46
|
+
fg-emphasis: $gray-200,
|
|
47
|
+
bg-subtle: $theme-secondary-bg-dark,
|
|
48
|
+
bg-muted: $gray-700,
|
|
49
|
+
border: $gray-600,
|
|
50
|
+
) !default;
|
|
51
|
+
|
|
52
|
+
// the text of a color (fg) is mixed with 16 % black; the light colors (green, cyan, yellow) need more to be read on
|
|
53
|
+
// their own tint with a contrast of 4.5:1 (alerts, subtle badges, outline buttons)
|
|
54
|
+
$theme-fg-weights: (
|
|
55
|
+
'success': 24%,
|
|
56
|
+
'info': 29%,
|
|
57
|
+
'warning': 40%,
|
|
58
|
+
) !default;
|
|
59
|
+
|
|
60
|
+
// a solid fill that takes white text although Bootstrap 6 writes dark text on it: cyan is darkened a little, so the
|
|
61
|
+
// info buttons and badges read like the blue and green ones
|
|
62
|
+
$theme-solid-shades: (
|
|
63
|
+
'info': 14%,
|
|
64
|
+
) !default;
|
|
65
|
+
|
|
66
|
+
// the text on a solid fill that takes dark text (yellow) is the color itself mixed with black, a dark brown like the
|
|
67
|
+
// text of the subtle button, not the near black of Bootstrap, which was too loud; 54 % reads about 6:1 on the yellow (48 %, the fg-emphasis of the color, was a hair too light for the user; 46 % is the least for 4.5:1)
|
|
68
|
+
$theme-contrast-weights: (
|
|
69
|
+
'warning': 54%,
|
|
70
|
+
) !default;
|
|
71
|
+
|
|
72
|
+
@function -cs-step($color, $with, $weight) {
|
|
73
|
+
@return color.to-space(color.to-gamut(color.mix($with, $color, $weight, $method: oklch), $space: rgb, $method: local-minde), rgb);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@mixin -cs-tokens($tokens) {
|
|
77
|
+
@each $key, $value in $tokens {
|
|
78
|
+
--theme-#{$key}: #{$value};
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@each $name, $value in $theme-colors {
|
|
83
|
+
$source: map.get($theme-color-sources, $name) or $value;
|
|
84
|
+
$selectors: '.theme-#{$name}, .btn-#{$name}, .btn-outline-#{$name}, .alert-#{$name}';
|
|
85
|
+
$light: (
|
|
86
|
+
bg: $value,
|
|
87
|
+
contrast: color-contrast($value),
|
|
88
|
+
fg: -cs-step($source, #000, map.get($theme-fg-weights, $name) or 16%),
|
|
89
|
+
fg-emphasis: -cs-step($source, #000, 48%),
|
|
90
|
+
bg-subtle: -cs-step($source, #fff, 80%),
|
|
91
|
+
bg-muted: -cs-step($source, #fff, 60%),
|
|
92
|
+
border: -cs-step($source, #fff, 40%),
|
|
93
|
+
);
|
|
94
|
+
$dark: (
|
|
95
|
+
fg: -cs-step($source, #fff, 20%),
|
|
96
|
+
fg-emphasis: -cs-step($source, #fff, 60%),
|
|
97
|
+
// a tint of the color on the dark page, not a saturated dark color
|
|
98
|
+
bg-subtle: -cs-step($source, $body-bg-dark, 84%),
|
|
99
|
+
bg-muted: -cs-step($source, $body-bg-dark, 74%),
|
|
100
|
+
border: -cs-step($source, #000, 16%),
|
|
101
|
+
);
|
|
102
|
+
|
|
103
|
+
@if map.has-key($theme-contrast-weights, $name) {
|
|
104
|
+
$light: map.merge($light, (
|
|
105
|
+
contrast: -cs-step($source, #000, map.get($theme-contrast-weights, $name)),
|
|
106
|
+
));
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@if map.has-key($theme-solid-shades, $name) {
|
|
110
|
+
$light: map.merge($light, (
|
|
111
|
+
bg: -cs-step($source, #000, map.get($theme-solid-shades, $name)),
|
|
112
|
+
contrast: $white,
|
|
113
|
+
));
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@if $name == 'secondary' {
|
|
117
|
+
$light: $theme-secondary-light;
|
|
118
|
+
$dark: $theme-secondary-dark;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
#{$selectors} {
|
|
122
|
+
@include -cs-tokens($light);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
[data-bs-theme='dark'] :is(#{$selectors}),
|
|
126
|
+
:is(#{$selectors})[data-bs-theme='dark'] {
|
|
127
|
+
@include -cs-tokens($dark);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// a green text on a light surface takes the darker green ($success-text); on the dark one the green itself reads well
|
|
132
|
+
.text-success {
|
|
133
|
+
--bs-success-rgb: #{to-rgb($success-text)};
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
[data-bs-theme='dark'] .text-success,
|
|
137
|
+
.text-success[data-bs-theme='dark'] {
|
|
138
|
+
--bs-success-rgb: #{to-rgb($success)};
|
|
139
|
+
}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
//
|
|
2
|
+
// theme: forms (checks, radios, switches and their small size, the form adorn of Bootstrap 6)
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// checks, radios and switches are as high as the line of their label (Bootstrap 5 moves them down for a 1em box)
|
|
6
|
+
.form-check-input {
|
|
7
|
+
margin-top: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// a switch of Bootstrap 6: the white knob on a gray track while off, a light shadow under the knob is not possible
|
|
11
|
+
// with the background image of Bootstrap 5
|
|
12
|
+
.form-switch .form-check-input:not(:checked) {
|
|
13
|
+
background-color: var(--bs-secondary-bg);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// a click on a check, radio or switch only changes its state, no ring and no colored border around it; the ring stays
|
|
17
|
+
// for the keyboard (focus-visible). A text field and a select keep theirs on focus: it shows where the typing goes.
|
|
18
|
+
.form-check-input:focus:not(:focus-visible) {
|
|
19
|
+
box-shadow: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.form-check-input:not(:checked, :indeterminate):focus:not(:focus-visible) {
|
|
23
|
+
border-color: var(--bs-border-color);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// small checks, radios and switches (a size modifier in the naming of Bootstrap): form-check-sm on the wrapper
|
|
27
|
+
// <div class="form-check form-check-sm">, or on a check without a wrapper <input class="form-check-input form-check-sm">;
|
|
28
|
+
// a 16px box (28 × 16px switch) in the middle of the line of its label, the text keeps its size
|
|
29
|
+
$form-check-input-width-sm: 1rem !default;
|
|
30
|
+
$form-check-padding-start-sm: 1.5rem !default;
|
|
31
|
+
$form-check-input-border-radius-sm: .25rem !default;
|
|
32
|
+
$form-switch-width-sm: 1.75rem !default;
|
|
33
|
+
$form-switch-padding-start-sm: 2.25rem !default;
|
|
34
|
+
|
|
35
|
+
.form-check.form-check-sm {
|
|
36
|
+
padding-left: $form-check-padding-start-sm;
|
|
37
|
+
|
|
38
|
+
.form-check-input {
|
|
39
|
+
margin-top: calc((#{$line-height-base} * 1em - #{$form-check-input-width-sm}) / 2);
|
|
40
|
+
margin-left: -$form-check-padding-start-sm;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&.form-switch {
|
|
44
|
+
padding-left: $form-switch-padding-start-sm;
|
|
45
|
+
|
|
46
|
+
.form-check-input {
|
|
47
|
+
width: $form-switch-width-sm;
|
|
48
|
+
margin-left: -$form-switch-padding-start-sm;
|
|
49
|
+
border-radius: $form-switch-width-sm;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.form-check-sm .form-check-input,
|
|
55
|
+
.form-check-input.form-check-sm {
|
|
56
|
+
width: $form-check-input-width-sm;
|
|
57
|
+
height: $form-check-input-width-sm;
|
|
58
|
+
|
|
59
|
+
&[type='checkbox'] {
|
|
60
|
+
border-radius: $form-check-input-border-radius-sm;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// the form adorn of Bootstrap 6: an icon or a short text inside a field instead of an input group. The wrapper is
|
|
65
|
+
// a label with the look of the field (.form-control .form-adorn; a click anywhere in it focuses the field), the
|
|
66
|
+
// field inside is a .form-ghost without a look of its own; .form-adorn-end moves the adornment to the end,
|
|
67
|
+
// .form-control-sm/-lg size it. No button inside (a label holds no interactive content): that stays an input group.
|
|
68
|
+
// <label class="form-control form-adorn">
|
|
69
|
+
// <span class="form-adorn-icon" aria-hidden="true"><i class="bi bi-search"></i></span>
|
|
70
|
+
// <input type="search" class="form-ghost" placeholder="Search">
|
|
71
|
+
// </label>
|
|
72
|
+
// <label class="form-control form-adorn form-adorn-end"><span class="form-adorn-text" aria-hidden="true">%</span>…
|
|
73
|
+
.form-adorn {
|
|
74
|
+
--form-adorn-gap: .375rem;
|
|
75
|
+
--form-adorn-icon-size: 1rem;
|
|
76
|
+
--form-adorn-icon-color: var(--bs-secondary-color);
|
|
77
|
+
|
|
78
|
+
display: flex;
|
|
79
|
+
gap: var(--form-adorn-gap);
|
|
80
|
+
align-items: center;
|
|
81
|
+
cursor: text;
|
|
82
|
+
|
|
83
|
+
// the focus of the field inside is the focus of the field
|
|
84
|
+
&:focus-within {
|
|
85
|
+
color: $input-focus-color;
|
|
86
|
+
background-color: $input-focus-bg;
|
|
87
|
+
border-color: $input-focus-border-color;
|
|
88
|
+
outline: 0;
|
|
89
|
+
box-shadow: $input-focus-box-shadow;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&:has(> .form-ghost:disabled) {
|
|
93
|
+
cursor: default;
|
|
94
|
+
background-color: $input-disabled-bg;
|
|
95
|
+
border-color: $input-disabled-border-color;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
> .form-ghost {
|
|
99
|
+
flex: 1;
|
|
100
|
+
min-width: 0;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&.form-adorn-end > .form-ghost {
|
|
104
|
+
order: -1;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.form-adorn-icon {
|
|
109
|
+
display: flex;
|
|
110
|
+
flex-shrink: 0;
|
|
111
|
+
align-items: center;
|
|
112
|
+
justify-content: center;
|
|
113
|
+
font-size: var(--form-adorn-icon-size);
|
|
114
|
+
line-height: 1;
|
|
115
|
+
color: var(--form-adorn-icon-color);
|
|
116
|
+
pointer-events: none;
|
|
117
|
+
|
|
118
|
+
> svg {
|
|
119
|
+
width: var(--form-adorn-icon-size);
|
|
120
|
+
height: var(--form-adorn-icon-size);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.form-adorn-text {
|
|
125
|
+
flex-shrink: 0;
|
|
126
|
+
color: var(--form-adorn-icon-color);
|
|
127
|
+
pointer-events: none;
|
|
128
|
+
user-select: none;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// a field without a look, inside a wrapper that has it
|
|
132
|
+
.form-ghost {
|
|
133
|
+
display: block;
|
|
134
|
+
width: 100%;
|
|
135
|
+
padding: 0;
|
|
136
|
+
font: inherit;
|
|
137
|
+
color: inherit;
|
|
138
|
+
appearance: none;
|
|
139
|
+
background: transparent;
|
|
140
|
+
border: 0;
|
|
141
|
+
|
|
142
|
+
&:focus {
|
|
143
|
+
outline: 0;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&::placeholder {
|
|
147
|
+
color: $input-placeholder-color;
|
|
148
|
+
opacity: 1;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
&:disabled {
|
|
152
|
+
color: var(--bs-secondary-color);
|
|
153
|
+
cursor: not-allowed;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// Safari of iOS zooms the page in when a field with a text under 16px gets the focus, and the user has to zoom out
|
|
158
|
+
// by hand. Only there (the test of -webkit-touch-callout matches no other browser) the text of a field is 16px;
|
|
159
|
+
// the line keeps its height, so a field is as high as elsewhere. Large fields are over 16px already.
|
|
160
|
+
@supports (-webkit-touch-callout: none) {
|
|
161
|
+
.form-control:where(:not(.form-control-lg)),
|
|
162
|
+
.form-select:where(:not(.form-select-lg)) {
|
|
163
|
+
font-size: 1rem;
|
|
164
|
+
line-height: $input-font-size * $input-line-height;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.form-control-sm,
|
|
168
|
+
.form-select-sm,
|
|
169
|
+
.input-group-sm > .form-control,
|
|
170
|
+
.input-group-sm > .form-select {
|
|
171
|
+
min-height: calc(#{$input-font-size-sm * $input-line-height + $input-padding-y-sm * 2} + #{$input-height-border});
|
|
172
|
+
font-size: 1rem;
|
|
173
|
+
line-height: $input-font-size-sm * $input-line-height;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//
|
|
2
|
+
// theme: what the theme changes and adds to Bootstrap after it is built, one part per component of Bootstrap; only
|
|
3
|
+
// classes of Bootstrap 5 and 6 (and their size modifiers) live here, own components are modules
|
|
4
|
+
//
|
|
5
|
+
|
|
6
|
+
@import 'base';
|
|
7
|
+
@import 'colors';
|
|
8
|
+
@import 'forms';
|
|
9
|
+
@import 'buttons';
|
|
10
|
+
@import 'badges';
|
|
11
|
+
@import 'alerts';
|
|
12
|
+
@import 'navs';
|
|
13
|
+
@import 'breadcrumb';
|
|
14
|
+
@import 'tables';
|
|
15
|
+
@import 'cards';
|
|
16
|
+
@import 'accordion';
|
|
17
|
+
@import 'overlays';
|
|
18
|
+
@import 'avatar';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//
|
|
2
|
+
// theme: navs and tabs
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// navs of Bootstrap 6: tabs and pills keep a 2px gap (the frame of the active tab never touches a hovered
|
|
6
|
+
// neighbor), a hovered link that is not the current one gets a light background
|
|
7
|
+
.nav-tabs,
|
|
8
|
+
.nav-pills {
|
|
9
|
+
gap: .125rem;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.nav-tabs .nav-link:not(.active, :disabled, .disabled):hover,
|
|
13
|
+
.nav-pills .nav-link:not(.active, :disabled, .disabled):hover {
|
|
14
|
+
background-color: var(--bs-tertiary-bg);
|
|
15
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
//
|
|
2
|
+
// theme: offcanvas, modals, dropdowns and toasts
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// offcanvas floats: a gap from the edges of the window, rounded corners and a shadow instead of a border
|
|
6
|
+
// (also the line under the header is left out); .offcanvas-flush keeps the panel stuck to the edge. The responsive
|
|
7
|
+
// ones (.offcanvas-lg, …) float below their breakpoint, where they are a panel
|
|
8
|
+
@mixin cs-offcanvas-float {
|
|
9
|
+
--cs-offcanvas-margin: .5rem;
|
|
10
|
+
--bs-offcanvas-border-width: 0;
|
|
11
|
+
--bs-offcanvas-transition: transform .3s ease-in-out, translate .3s ease-in-out;
|
|
12
|
+
|
|
13
|
+
max-width: calc(100% - 2 * var(--cs-offcanvas-margin));
|
|
14
|
+
max-height: calc(100% - 2 * var(--cs-offcanvas-margin));
|
|
15
|
+
margin: var(--cs-offcanvas-margin);
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
border-radius: var(--bs-border-radius-lg);
|
|
18
|
+
box-shadow: var(--bs-box-shadow-lg);
|
|
19
|
+
|
|
20
|
+
// a closed panel has to travel past its margin too, to leave the window
|
|
21
|
+
&.offcanvas-start {
|
|
22
|
+
translate: calc(-1 * var(--cs-offcanvas-margin));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&.offcanvas-end {
|
|
26
|
+
translate: var(--cs-offcanvas-margin);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.offcanvas-top {
|
|
30
|
+
translate: 0 calc(-1 * var(--cs-offcanvas-margin));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&.offcanvas-bottom {
|
|
34
|
+
translate: 0 var(--cs-offcanvas-margin);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&.showing,
|
|
38
|
+
&.show:not(.hiding) {
|
|
39
|
+
translate: none;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.offcanvas:is(.offcanvas-start, .offcanvas-end, .offcanvas-top, .offcanvas-bottom):not(.offcanvas-flush) {
|
|
44
|
+
@include cs-offcanvas-float;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@each $breakpoint in (sm, md, lg, xl, xxl) {
|
|
48
|
+
@include media-breakpoint-down($breakpoint) {
|
|
49
|
+
.offcanvas-#{$breakpoint}:is(.offcanvas-start, .offcanvas-end, .offcanvas-top, .offcanvas-bottom):not(.offcanvas-flush) {
|
|
50
|
+
@include cs-offcanvas-float;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.offcanvas-header {
|
|
56
|
+
border-bottom: 0;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// a modal lifts by a shadow (Bootstrap adds it only with $enable-shadows)
|
|
60
|
+
.modal-content {
|
|
61
|
+
box-shadow: var(--bs-box-shadow-lg);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// tabs in the header of an offcanvas (between its title and the close button) move to their own row on narrow screens,
|
|
65
|
+
// over the whole width, so neither the title nor the tabs wrap
|
|
66
|
+
.offcanvas-header > .btn-group[role='tablist'] > .btn {
|
|
67
|
+
white-space: nowrap;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@media (max-width: 767.98px) {
|
|
71
|
+
.offcanvas-header:has(> .btn-group[role='tablist']) {
|
|
72
|
+
flex-wrap: wrap;
|
|
73
|
+
row-gap: .75rem;
|
|
74
|
+
|
|
75
|
+
> .btn-close {
|
|
76
|
+
margin-left: auto !important;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
> .btn-group[role='tablist'] {
|
|
80
|
+
order: 3;
|
|
81
|
+
width: 100%;
|
|
82
|
+
margin: 0 !important;
|
|
83
|
+
|
|
84
|
+
> .btn {
|
|
85
|
+
flex: 1;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// a textarea in an offcanvas whose height follows the window (e.g. the description of a product) gets a fixed height
|
|
92
|
+
// of about 12 lines on narrow screens, so the fields below it stay close
|
|
93
|
+
@media (max-width: 767.98px) {
|
|
94
|
+
.offcanvas textarea.form-control[style*='height'] {
|
|
95
|
+
height: 16rem !important;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// dropdowns: no border, the soft shadow of the theme; in the dark theme, where a shadow is not seen, a lighter surface
|
|
100
|
+
.dropdown-menu {
|
|
101
|
+
box-shadow: var(--bs-box-shadow-lg);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
[data-bs-theme='dark'] .dropdown-menu,
|
|
105
|
+
.dropdown-menu[data-bs-theme='dark'] {
|
|
106
|
+
--bs-dropdown-bg: var(--bs-secondary-bg);
|
|
107
|
+
--bs-dropdown-link-hover-bg: rgba(var(--bs-body-color-rgb), .08);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// a toast is a floating surface like a dropdown: lighter in the dark theme, where a shadow is not seen
|
|
111
|
+
[data-bs-theme='dark'] .toast,
|
|
112
|
+
.toast[data-bs-theme='dark'] {
|
|
113
|
+
--bs-toast-bg: var(--bs-secondary-bg);
|
|
114
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
//
|
|
2
|
+
// theme: tables
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// table headers like the section titles of the menu: small, uppercase, muted
|
|
6
|
+
.table > thead th {
|
|
7
|
+
font-size: .75rem;
|
|
8
|
+
font-weight: 500;
|
|
9
|
+
letter-spacing: .04em;
|
|
10
|
+
text-transform: uppercase;
|
|
11
|
+
color: rgba(var(--bs-body-color-rgb), .6);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// sorting links in a table header keep the header look (not a button, e.g. the cross of a datagrid filter)
|
|
15
|
+
.table > thead th a:not(.btn) {
|
|
16
|
+
color: inherit;
|
|
17
|
+
text-decoration: none;
|
|
18
|
+
|
|
19
|
+
&:hover {
|
|
20
|
+
color: var(--bs-body-color);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// icon-only links in a table row (row actions of a datagrid without buttons) are muted until hovered; not the items
|
|
25
|
+
// of a menu of row actions, their text is not an element
|
|
26
|
+
.table td a:not(.btn, .dropdown-item):has(> i:only-child) {
|
|
27
|
+
display: inline-block;
|
|
28
|
+
padding: 0 .25rem;
|
|
29
|
+
color: var(--bs-secondary-color);
|
|
30
|
+
text-decoration: none;
|
|
31
|
+
|
|
32
|
+
&:hover {
|
|
33
|
+
color: var(--bs-body-color);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// a table cell with icon buttons (also the button of a menu of row actions) keeps the height of the other cells of its row
|
|
38
|
+
.table td:has(> .btn-icon, > .dropdown > .btn-icon) {
|
|
39
|
+
padding-top: .375rem;
|
|
40
|
+
padding-bottom: .375rem;
|
|
41
|
+
white-space: nowrap;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// a table straight in a card lines its first and last column up with the card padding and has no line at its bottom
|
|
45
|
+
.card > .table,
|
|
46
|
+
.card > .table-responsive > .table {
|
|
47
|
+
> :not(caption) > * > :first-child {
|
|
48
|
+
padding-left: var(--bs-card-spacer-x);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
> :not(caption) > * > :last-child {
|
|
52
|
+
padding-right: var(--bs-card-spacer-x);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// no line under the last row, the card ends there
|
|
56
|
+
> tbody > tr:last-child > * {
|
|
57
|
+
border-bottom-width: 0;
|
|
58
|
+
}
|
|
59
|
+
}
|