@unlk/keymaster 1.0.2 → 1.0.4
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/CHANGELOG.md +48 -0
- package/README.md +157 -0
- package/dist/css/keymaster.css +642 -588
- package/dist/css/keymaster.css.map +1 -1
- package/dist/css/keymaster.min.css +5 -5
- package/dist/css/keymaster.min.css.map +1 -1
- package/dist/js/keymaster.js +180 -80
- package/dist/js/keymaster.js.map +1 -1
- package/dist/js/keymaster.min.js +65 -65
- package/dist/js/keymaster.min.js.map +1 -1
- package/js/bootstrap.js +1 -0
- package/js/video-modal.js +123 -0
- package/package.json +3 -2
- package/scss/assets/bootstrap5/_accordion.scss +4 -9
- package/scss/assets/bootstrap5/_button-group.scss +8 -3
- package/scss/assets/bootstrap5/_card.scss +1 -2
- package/scss/assets/bootstrap5/_carousel.scss +15 -25
- package/scss/assets/bootstrap5/_close.scss +9 -6
- package/scss/assets/bootstrap5/_functions.scss +1 -1
- package/scss/assets/bootstrap5/_list-group.scss +27 -25
- package/scss/assets/bootstrap5/_modal.scss +6 -2
- package/scss/assets/bootstrap5/_nav.scss +1 -1
- package/scss/assets/bootstrap5/_navbar.scss +1 -1
- package/scss/assets/bootstrap5/_offcanvas.scss +5 -1
- package/scss/assets/bootstrap5/_pagination.scss +1 -1
- package/scss/assets/bootstrap5/_progress.scss +1 -1
- package/scss/assets/bootstrap5/_reboot.scss +1 -1
- package/scss/assets/bootstrap5/_type.scss +1 -1
- package/scss/assets/bootstrap5/_variables-dark.scss +17 -2
- package/scss/assets/bootstrap5/_variables.scss +16 -16
- package/scss/assets/bootstrap5/forms/_floating-labels.scss +18 -16
- package/scss/assets/bootstrap5/forms/_input-group.scss +1 -1
- package/scss/assets/bootstrap5/mixins/_banner.scss +2 -2
- package/scss/assets/bootstrap5/mixins/_grid.scss +1 -1
- package/scss/assets/bootstrap5/mixins/_visually-hidden.scss +1 -1
- package/scss/keymaster.scss +3 -0
- package/scss/theme/_accordion.scss +13 -3
- package/scss/theme/_alert.scss +2 -0
- package/scss/theme/_badge.scss +1 -1
- package/scss/theme/_buttons.scss +5 -5
- package/scss/theme/_carousel.scss +3 -6
- package/scss/theme/_close.scss +3 -0
- package/scss/theme/_modal.scss +35 -0
- package/scss/theme/_spinners.scss +9 -0
- package/scss/theme/_typography.scss +8 -13
- package/scss/theme/_utilities-overrides.scss +33 -33
- package/scss/theme/_variables-overrides.scss +15 -8
- package/scss/theme/_variables.scss +12 -0
package/js/bootstrap.js
CHANGED
@@ -12,3 +12,4 @@ export { default as Tab } from 'bootstrap/js/dist/tab';
|
|
12
12
|
export { default as Tooltip } from 'bootstrap/js/dist/tooltip';
|
13
13
|
export { default as Datepicker } from './datepicker';
|
14
14
|
export { default as CarouselCaption } from './carousel-caption';
|
15
|
+
export { default as VideoModal } from './video-modal';
|
@@ -0,0 +1,123 @@
|
|
1
|
+
// Load YouTube API
|
2
|
+
// eslint-disable-next-line no-unused-vars
|
3
|
+
let youTubeAPIReady = false;
|
4
|
+
const youTubeAPIInitPromise = new Promise((resolve) => {
|
5
|
+
if (window.YT?.Player) {
|
6
|
+
youTubeAPIReady = true;
|
7
|
+
resolve();
|
8
|
+
} else {
|
9
|
+
window.onYouTubeIframeAPIReady = () => {
|
10
|
+
youTubeAPIReady = true;
|
11
|
+
resolve();
|
12
|
+
};
|
13
|
+
|
14
|
+
const ytScript = document.createElement('script');
|
15
|
+
ytScript.src = 'https://www.youtube.com/iframe_api';
|
16
|
+
document.head.append(ytScript);
|
17
|
+
}
|
18
|
+
});
|
19
|
+
|
20
|
+
// Load Vimeo API
|
21
|
+
// eslint-disable-next-line no-unused-vars
|
22
|
+
let vimeoAPIReady = false;
|
23
|
+
const vimeoAPIInitPromise = new Promise((resolve) => {
|
24
|
+
if (window.Vimeo?.Player) {
|
25
|
+
vimeoAPIReady = true;
|
26
|
+
resolve();
|
27
|
+
} else {
|
28
|
+
const vimeoScript = document.createElement('script');
|
29
|
+
vimeoScript.src = 'https://player.vimeo.com/api/player.js';
|
30
|
+
vimeoScript.addEventListener('load', () => {
|
31
|
+
vimeoAPIReady = true;
|
32
|
+
resolve();
|
33
|
+
});
|
34
|
+
|
35
|
+
document.head.append(vimeoScript);
|
36
|
+
}
|
37
|
+
});
|
38
|
+
|
39
|
+
class VideoModal {
|
40
|
+
constructor(modal) {
|
41
|
+
this.modal = modal;
|
42
|
+
this.dialog = modal.querySelector('.modal-dialog-media');
|
43
|
+
this.container = modal.querySelector('.ratio');
|
44
|
+
if (!this.dialog || !this.container) {
|
45
|
+
return;
|
46
|
+
}
|
47
|
+
|
48
|
+
this.modalId = modal.id;
|
49
|
+
this.youtubeSrc = this.container.getAttribute('data-src');
|
50
|
+
this.vimeoUrl = this.container.getAttribute('data-vimeo-url');
|
51
|
+
this.vimeoPlayer = null;
|
52
|
+
this.youtubePlayer = null;
|
53
|
+
|
54
|
+
modal.addEventListener('show.bs.modal', () => this.onShow());
|
55
|
+
modal.addEventListener('hidden.bs.modal', () => this.onHide());
|
56
|
+
}
|
57
|
+
|
58
|
+
async onShow() {
|
59
|
+
const playerClass = `${this.modalId}-youtube-player`;
|
60
|
+
|
61
|
+
if (this.vimeoUrl) {
|
62
|
+
const vimeoId = this.getVimeoId(this.vimeoUrl);
|
63
|
+
await vimeoAPIInitPromise;
|
64
|
+
|
65
|
+
this.vimeoPlayer = new window.Vimeo.Player(this.container, {
|
66
|
+
id: vimeoId,
|
67
|
+
autoplay: true
|
68
|
+
});
|
69
|
+
}
|
70
|
+
|
71
|
+
if (this.youtubeSrc) {
|
72
|
+
const youtubeId = this.getYouTubeId(this.youtubeSrc);
|
73
|
+
await youTubeAPIInitPromise;
|
74
|
+
|
75
|
+
// Dynamically insert YouTube div
|
76
|
+
this.container.innerHTML = `<div class="${playerClass} w-100 h-100"></div>`;
|
77
|
+
const playerDiv = this.container.querySelector(`.${playerClass}`);
|
78
|
+
|
79
|
+
// eslint-disable-next-line no-undef
|
80
|
+
this.youtubePlayer = new YT.Player(playerDiv, {
|
81
|
+
videoId: youtubeId,
|
82
|
+
playerVars: { autoplay: 1, rel: 0 }
|
83
|
+
});
|
84
|
+
}
|
85
|
+
}
|
86
|
+
|
87
|
+
onHide() {
|
88
|
+
if (this.vimeoPlayer) {
|
89
|
+
this.vimeoPlayer.unload().catch(() => {});
|
90
|
+
this.vimeoPlayer = null;
|
91
|
+
}
|
92
|
+
|
93
|
+
if (this.youtubePlayer) {
|
94
|
+
this.youtubePlayer.destroy();
|
95
|
+
this.youtubePlayer = null;
|
96
|
+
}
|
97
|
+
}
|
98
|
+
|
99
|
+
getYouTubeId(url) {
|
100
|
+
const match = url.match(/(?:v=|youtu\.be\/)([\w-]{11})/);
|
101
|
+
return match ? match[1] : '';
|
102
|
+
}
|
103
|
+
|
104
|
+
getVimeoId(url) {
|
105
|
+
const match = url.match(/vimeo\.com\/(\d+)/);
|
106
|
+
return match ? match[1] : '';
|
107
|
+
}
|
108
|
+
}
|
109
|
+
|
110
|
+
// Auto-init for all triggered modals with dialog-media
|
111
|
+
document.addEventListener('DOMContentLoaded', () => {
|
112
|
+
for (const button of document.querySelectorAll('[data-bs-toggle="modal"][data-bs-target]')) {
|
113
|
+
const targetSelector = button.getAttribute('data-bs-target');
|
114
|
+
const modal = document.querySelector(targetSelector);
|
115
|
+
|
116
|
+
if (modal?.querySelector('.modal-dialog-media')) {
|
117
|
+
// eslint-disable-next-line no-new
|
118
|
+
new VideoModal(modal);
|
119
|
+
}
|
120
|
+
}
|
121
|
+
});
|
122
|
+
|
123
|
+
export default VideoModal;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@unlk/keymaster",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.4",
|
4
4
|
"publishConfig": {
|
5
5
|
"access": "public"
|
6
6
|
},
|
@@ -32,6 +32,7 @@
|
|
32
32
|
"scss",
|
33
33
|
"js",
|
34
34
|
"fonts",
|
35
|
+
"README.md",
|
35
36
|
"CHANGELOG.md"
|
36
37
|
],
|
37
38
|
"engines": {
|
@@ -73,7 +74,7 @@
|
|
73
74
|
"postcss": "^8.4.4",
|
74
75
|
"postcss-cli": "^9.0.2",
|
75
76
|
"rollup": "^2.60.2",
|
76
|
-
"sass": "1.
|
77
|
+
"sass": "^1.87.0",
|
77
78
|
"terser": "^5.10.0"
|
78
79
|
},
|
79
80
|
"config": {
|
@@ -134,17 +134,12 @@
|
|
134
134
|
&:last-child { border-bottom: 0; }
|
135
135
|
|
136
136
|
// stylelint-disable selector-max-class
|
137
|
-
> .accordion-
|
138
|
-
|
139
|
-
|
140
|
-
@include border-radius(0);
|
141
|
-
}
|
142
|
-
}
|
143
|
-
// stylelint-enable selector-max-class
|
144
|
-
|
145
|
-
> .accordion-collapse {
|
137
|
+
> .accordion-collapse,
|
138
|
+
> .accordion-header .accordion-button,
|
139
|
+
> .accordion-header .accordion-button.collapsed {
|
146
140
|
@include border-radius(0);
|
147
141
|
}
|
142
|
+
// stylelint-enable selector-max-class
|
148
143
|
}
|
149
144
|
}
|
150
145
|
|
@@ -39,7 +39,7 @@
|
|
39
39
|
// Prevent double borders when buttons are next to each other
|
40
40
|
> :not(.btn-check:first-child) + .btn,
|
41
41
|
> .btn-group:not(:first-child) {
|
42
|
-
margin-left: calc(#{$btn-border-width}
|
42
|
+
margin-left: calc(-1 * #{$btn-border-width}); // stylelint-disable-line function-disallowed-list
|
43
43
|
}
|
44
44
|
|
45
45
|
// Reset rounded corners
|
@@ -126,7 +126,7 @@
|
|
126
126
|
|
127
127
|
> .btn:not(:first-child),
|
128
128
|
> .btn-group:not(:first-child) {
|
129
|
-
margin-top: calc(#{$btn-border-width}
|
129
|
+
margin-top: calc(-1 * #{$btn-border-width}); // stylelint-disable-line function-disallowed-list
|
130
130
|
}
|
131
131
|
|
132
132
|
// Reset rounded corners
|
@@ -135,7 +135,12 @@
|
|
135
135
|
@include border-bottom-radius(0);
|
136
136
|
}
|
137
137
|
|
138
|
-
|
138
|
+
// The top radius should be 0 if the button is:
|
139
|
+
// - the "third or more" child
|
140
|
+
// - the second child and the previous element isn't `.btn-check` (making it the first child visually)
|
141
|
+
// - part of a btn-group which isn't the first child
|
142
|
+
> .btn:nth-child(n + 3),
|
143
|
+
> :not(.btn-check) + .btn,
|
139
144
|
> .btn-group:not(:first-child) > .btn {
|
140
145
|
@include border-top-radius(0);
|
141
146
|
}
|
@@ -193,8 +193,7 @@
|
|
193
193
|
// The child selector allows nested `.card` within `.card-group`
|
194
194
|
// to display properly.
|
195
195
|
> .card {
|
196
|
-
|
197
|
-
flex: 1 0 0%;
|
196
|
+
flex: 1 0 0;
|
198
197
|
margin-bottom: 0;
|
199
198
|
|
200
199
|
+ .card {
|
@@ -99,6 +99,7 @@
|
|
99
99
|
color: $carousel-control-color;
|
100
100
|
text-align: center;
|
101
101
|
background: none;
|
102
|
+
filter: var(--#{$prefix}carousel-control-icon-filter);
|
102
103
|
border: 0;
|
103
104
|
opacity: $carousel-control-opacity;
|
104
105
|
@include transition($carousel-control-transition);
|
@@ -168,7 +169,7 @@
|
|
168
169
|
margin-left: $carousel-indicator-spacer;
|
169
170
|
text-indent: -999px;
|
170
171
|
cursor: pointer;
|
171
|
-
background-color: $carousel-indicator-active-bg;
|
172
|
+
background-color: var(--#{$prefix}carousel-indicator-active-bg);
|
172
173
|
background-clip: padding-box;
|
173
174
|
border: 0;
|
174
175
|
// Use transparent borders to increase the hit area by 10px on top and bottom.
|
@@ -195,42 +196,31 @@
|
|
195
196
|
left: (100% - $carousel-caption-width) * .5;
|
196
197
|
padding-top: $carousel-caption-padding-y;
|
197
198
|
padding-bottom: $carousel-caption-padding-y;
|
198
|
-
color: $carousel-caption-color;
|
199
|
+
color: var(--#{$prefix}carousel-caption-color);
|
199
200
|
text-align: center;
|
200
201
|
}
|
201
202
|
|
202
203
|
// Dark mode carousel
|
203
204
|
|
204
205
|
@mixin carousel-dark() {
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
}
|
209
|
-
|
210
|
-
.carousel-indicators [data-bs-target] {
|
211
|
-
background-color: $carousel-dark-indicator-active-bg;
|
212
|
-
}
|
213
|
-
|
214
|
-
.carousel-caption {
|
215
|
-
color: $carousel-dark-caption-color;
|
216
|
-
}
|
206
|
+
--#{$prefix}carousel-indicator-active-bg: #{$carousel-indicator-active-bg-dark};
|
207
|
+
--#{$prefix}carousel-caption-color: #{$carousel-caption-color-dark};
|
208
|
+
--#{$prefix}carousel-control-icon-filter: #{$carousel-control-icon-filter-dark};
|
217
209
|
}
|
218
210
|
|
219
211
|
.carousel-dark {
|
220
212
|
@include carousel-dark();
|
221
213
|
}
|
222
214
|
|
215
|
+
:root,
|
216
|
+
[data-bs-theme="light"] {
|
217
|
+
--#{$prefix}carousel-indicator-active-bg: #{$carousel-indicator-active-bg};
|
218
|
+
--#{$prefix}carousel-caption-color: #{$carousel-caption-color};
|
219
|
+
--#{$prefix}carousel-control-icon-filter: #{$carousel-control-icon-filter};
|
220
|
+
}
|
221
|
+
|
223
222
|
@if $enable-dark-mode {
|
224
|
-
@include color-mode(dark) {
|
225
|
-
@
|
226
|
-
.carousel {
|
227
|
-
@include carousel-dark();
|
228
|
-
}
|
229
|
-
} @else {
|
230
|
-
.carousel,
|
231
|
-
&.carousel {
|
232
|
-
@include carousel-dark();
|
233
|
-
}
|
234
|
-
}
|
223
|
+
@include color-mode(dark, true) {
|
224
|
+
@include carousel-dark();
|
235
225
|
}
|
236
226
|
}
|
@@ -12,7 +12,6 @@
|
|
12
12
|
--#{$prefix}btn-close-focus-shadow: #{$btn-close-focus-shadow};
|
13
13
|
--#{$prefix}btn-close-focus-opacity: #{$btn-close-focus-opacity};
|
14
14
|
--#{$prefix}btn-close-disabled-opacity: #{$btn-close-disabled-opacity};
|
15
|
-
--#{$prefix}btn-close-white-filter: #{$btn-close-white-filter};
|
16
15
|
// scss-docs-end close-css-vars
|
17
16
|
|
18
17
|
box-sizing: content-box;
|
@@ -21,6 +20,7 @@
|
|
21
20
|
padding: $btn-close-padding-y $btn-close-padding-x;
|
22
21
|
color: var(--#{$prefix}btn-close-color);
|
23
22
|
background: transparent var(--#{$prefix}btn-close-bg) center / $btn-close-width auto no-repeat; // include transparent for button elements
|
23
|
+
filter: var(--#{$prefix}btn-close-filter);
|
24
24
|
border: 0; // for button elements
|
25
25
|
@include border-radius();
|
26
26
|
opacity: var(--#{$prefix}btn-close-opacity);
|
@@ -47,17 +47,20 @@
|
|
47
47
|
}
|
48
48
|
|
49
49
|
@mixin btn-close-white() {
|
50
|
-
|
50
|
+
--#{$prefix}btn-close-filter: #{$btn-close-filter-dark};
|
51
51
|
}
|
52
52
|
|
53
53
|
.btn-close-white {
|
54
54
|
@include btn-close-white();
|
55
55
|
}
|
56
56
|
|
57
|
+
:root,
|
58
|
+
[data-bs-theme="light"] {
|
59
|
+
--#{$prefix}btn-close-filter: #{$btn-close-filter};
|
60
|
+
}
|
61
|
+
|
57
62
|
@if $enable-dark-mode {
|
58
|
-
@include color-mode(dark) {
|
59
|
-
|
60
|
-
@include btn-close-white();
|
61
|
-
}
|
63
|
+
@include color-mode(dark, true) {
|
64
|
+
@include btn-close-white();
|
62
65
|
}
|
63
66
|
}
|
@@ -177,7 +177,7 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
|
|
177
177
|
@return if($l1 > $l2, divide($l1 + .05, $l2 + .05), divide($l2 + .05, $l1 + .05));
|
178
178
|
}
|
179
179
|
|
180
|
-
// Return WCAG2.
|
180
|
+
// Return WCAG2.2 relative luminance
|
181
181
|
// See https://www.w3.org/TR/WCAG/#dfn-relative-luminance
|
182
182
|
// See https://www.w3.org/TR/WCAG/#dfn-contrast-ratio
|
183
183
|
@function luminance($color) {
|
@@ -43,31 +43,6 @@
|
|
43
43
|
}
|
44
44
|
}
|
45
45
|
|
46
|
-
// Interactive list items
|
47
|
-
//
|
48
|
-
// Use anchor or button elements instead of `li`s or `div`s to create interactive
|
49
|
-
// list items. Includes an extra `.active` modifier class for selected items.
|
50
|
-
|
51
|
-
.list-group-item-action {
|
52
|
-
width: 100%; // For `<button>`s (anchors become 100% by default though)
|
53
|
-
color: var(--#{$prefix}list-group-action-color);
|
54
|
-
text-align: inherit; // For `<button>`s (anchors inherit)
|
55
|
-
|
56
|
-
// Hover state
|
57
|
-
&:hover,
|
58
|
-
&:focus {
|
59
|
-
z-index: 1; // Place hover/focus items above their siblings for proper border styling
|
60
|
-
color: var(--#{$prefix}list-group-action-hover-color);
|
61
|
-
text-decoration: none;
|
62
|
-
background-color: var(--#{$prefix}list-group-action-hover-bg);
|
63
|
-
}
|
64
|
-
|
65
|
-
&:active {
|
66
|
-
color: var(--#{$prefix}list-group-action-active-color);
|
67
|
-
background-color: var(--#{$prefix}list-group-action-active-bg);
|
68
|
-
}
|
69
|
-
}
|
70
|
-
|
71
46
|
// Individual list items
|
72
47
|
//
|
73
48
|
// Use on `li`s or `div`s within the `.list-group` parent.
|
@@ -115,6 +90,33 @@
|
|
115
90
|
}
|
116
91
|
}
|
117
92
|
|
93
|
+
// Interactive list items
|
94
|
+
//
|
95
|
+
// Use anchor or button elements instead of `li`s or `div`s to create interactive
|
96
|
+
// list items. Includes an extra `.active` modifier class for selected items.
|
97
|
+
|
98
|
+
.list-group-item-action {
|
99
|
+
width: 100%; // For `<button>`s (anchors become 100% by default though)
|
100
|
+
color: var(--#{$prefix}list-group-action-color);
|
101
|
+
text-align: inherit; // For `<button>`s (anchors inherit)
|
102
|
+
|
103
|
+
&:not(.active) {
|
104
|
+
// Hover state
|
105
|
+
&:hover,
|
106
|
+
&:focus {
|
107
|
+
z-index: 1; // Place hover/focus items above their siblings for proper border styling
|
108
|
+
color: var(--#{$prefix}list-group-action-hover-color);
|
109
|
+
text-decoration: none;
|
110
|
+
background-color: var(--#{$prefix}list-group-action-hover-bg);
|
111
|
+
}
|
112
|
+
|
113
|
+
&:active {
|
114
|
+
color: var(--#{$prefix}list-group-action-active-color);
|
115
|
+
background-color: var(--#{$prefix}list-group-action-active-bg);
|
116
|
+
}
|
117
|
+
}
|
118
|
+
}
|
119
|
+
|
118
120
|
// Horizontal
|
119
121
|
//
|
120
122
|
// Change the layout of list group items from vertical (default) to horizontal.
|
@@ -59,8 +59,8 @@
|
|
59
59
|
|
60
60
|
// When fading in the modal, animate it to slide down
|
61
61
|
.modal.fade & {
|
62
|
-
@include transition($modal-transition);
|
63
62
|
transform: $modal-fade-transform;
|
63
|
+
@include transition($modal-transition);
|
64
64
|
}
|
65
65
|
.modal.show & {
|
66
66
|
transform: $modal-show-transform;
|
@@ -132,7 +132,11 @@
|
|
132
132
|
|
133
133
|
.btn-close {
|
134
134
|
padding: calc(var(--#{$prefix}modal-header-padding-y) * .5) calc(var(--#{$prefix}modal-header-padding-x) * .5);
|
135
|
-
|
135
|
+
// Split properties to avoid invalid calc() function if value is 0
|
136
|
+
margin-top: calc(-.5 * var(--#{$prefix}modal-header-padding-y));
|
137
|
+
margin-right: calc(-.5 * var(--#{$prefix}modal-header-padding-x));
|
138
|
+
margin-bottom: calc(-.5 * var(--#{$prefix}modal-header-padding-y));
|
139
|
+
margin-left: auto;
|
136
140
|
}
|
137
141
|
}
|
138
142
|
|
@@ -139,8 +139,8 @@
|
|
139
139
|
// the default flexbox row orientation. Requires the use of `flex-wrap: wrap`
|
140
140
|
// on the `.navbar` parent.
|
141
141
|
.navbar-collapse {
|
142
|
-
flex-basis: 100%;
|
143
142
|
flex-grow: 1;
|
143
|
+
flex-basis: 100%;
|
144
144
|
// For always expanded or extra full navbars, ensure content aligns itself
|
145
145
|
// properly vertically. Can be easily overridden with flex utilities.
|
146
146
|
align-items: center;
|
@@ -127,7 +127,11 @@
|
|
127
127
|
|
128
128
|
.btn-close {
|
129
129
|
padding: calc(var(--#{$prefix}offcanvas-padding-y) * .5) calc(var(--#{$prefix}offcanvas-padding-x) * .5);
|
130
|
-
|
130
|
+
// Split properties to avoid invalid calc() function if value is 0
|
131
|
+
margin-top: calc(-.5 * var(--#{$prefix}offcanvas-padding-y));
|
132
|
+
margin-right: calc(-.5 * var(--#{$prefix}offcanvas-padding-x));
|
133
|
+
margin-bottom: calc(-.5 * var(--#{$prefix}offcanvas-padding-y));
|
134
|
+
margin-left: auto;
|
131
135
|
}
|
132
136
|
}
|
133
137
|
|
@@ -75,7 +75,7 @@
|
|
75
75
|
margin-left: $pagination-margin-start;
|
76
76
|
}
|
77
77
|
|
78
|
-
@if $pagination-margin-start == calc(#{$pagination-border-width}
|
78
|
+
@if $pagination-margin-start == calc(-1 * #{$pagination-border-width}) {
|
79
79
|
&:first-child {
|
80
80
|
.page-link {
|
81
81
|
@include border-start-radius(var(--#{$prefix}pagination-border-radius));
|
@@ -499,9 +499,9 @@ legend {
|
|
499
499
|
width: 100%;
|
500
500
|
padding: 0;
|
501
501
|
margin-bottom: $legend-margin-bottom;
|
502
|
-
@include font-size($legend-font-size);
|
503
502
|
font-weight: $legend-font-weight;
|
504
503
|
line-height: inherit;
|
504
|
+
@include font-size($legend-font-size);
|
505
505
|
|
506
506
|
+ * {
|
507
507
|
clear: left; // 2
|
@@ -34,11 +34,11 @@
|
|
34
34
|
// Type display classes
|
35
35
|
@each $display, $font-size in $display-font-sizes {
|
36
36
|
.display-#{$display} {
|
37
|
-
@include font-size($font-size);
|
38
37
|
font-family: $display-font-family;
|
39
38
|
font-style: $display-font-style;
|
40
39
|
font-weight: $display-font-weight;
|
41
40
|
line-height: $display-line-height;
|
41
|
+
@include font-size($font-size);
|
42
42
|
}
|
43
43
|
}
|
44
44
|
|
@@ -82,6 +82,21 @@ $form-invalid-border-color-dark: $red-300 !default;
|
|
82
82
|
$accordion-icon-color-dark: $primary-text-emphasis-dark !default;
|
83
83
|
$accordion-icon-active-color-dark: $primary-text-emphasis-dark !default;
|
84
84
|
|
85
|
-
$accordion-button-icon-dark: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$accordion-icon-color-dark}'><path fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.
|
86
|
-
$accordion-button-active-icon-dark: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$accordion-icon-active-color-dark}'><path fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.
|
85
|
+
$accordion-button-icon-dark: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$accordion-icon-color-dark}'><path fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708'/></svg>") !default;
|
86
|
+
$accordion-button-active-icon-dark: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$accordion-icon-active-color-dark}'><path fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708'/></svg>") !default;
|
87
87
|
// scss-docs-end sass-dark-mode-vars
|
88
|
+
|
89
|
+
|
90
|
+
//
|
91
|
+
// Carousel
|
92
|
+
//
|
93
|
+
|
94
|
+
$carousel-indicator-active-bg-dark: $carousel-dark-indicator-active-bg !default;
|
95
|
+
$carousel-caption-color-dark: $carousel-dark-caption-color !default;
|
96
|
+
$carousel-control-icon-filter-dark: $carousel-dark-control-icon-filter !default;
|
97
|
+
|
98
|
+
//
|
99
|
+
// Close button
|
100
|
+
//
|
101
|
+
|
102
|
+
$btn-close-filter-dark: $btn-close-white-filter !default;
|
@@ -67,8 +67,8 @@ $colors: (
|
|
67
67
|
) !default;
|
68
68
|
// scss-docs-end colors-map
|
69
69
|
|
70
|
-
// The contrast ratio to reach against white, to determine if color changes from "light" to "dark". Acceptable values for WCAG 2.
|
71
|
-
// See https://www.w3.org/TR/
|
70
|
+
// The contrast ratio to reach against white, to determine if color changes from "light" to "dark". Acceptable values for WCAG 2.2 are 3, 4.5 and 7.
|
71
|
+
// See https://www.w3.org/TR/WCAG/#contrast-minimum
|
72
72
|
$min-contrast-ratio: 4.5 !default;
|
73
73
|
|
74
74
|
// Customize the light and dark text colors for use in our color contrast function.
|
@@ -1091,7 +1091,7 @@ $form-feedback-valid-color: $success !default;
|
|
1091
1091
|
$form-feedback-invalid-color: $danger !default;
|
1092
1092
|
|
1093
1093
|
$form-feedback-icon-valid-color: $form-feedback-valid-color !default;
|
1094
|
-
$form-feedback-icon-valid: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><path fill='#{$form-feedback-icon-valid-color}' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.
|
1094
|
+
$form-feedback-icon-valid: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><path fill='#{$form-feedback-icon-valid-color}' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1'/></svg>") !default;
|
1095
1095
|
$form-feedback-icon-invalid-color: $form-feedback-invalid-color !default;
|
1096
1096
|
$form-feedback-icon-invalid: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='#{$form-feedback-icon-invalid-color}'><circle cx='6' cy='6' r='4.5'/><path stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/><circle cx='6' cy='8.2' r='.6' fill='#{$form-feedback-icon-invalid-color}' stroke='none'/></svg>") !default;
|
1097
1097
|
// scss-docs-end form-feedback-variables
|
@@ -1302,7 +1302,7 @@ $pagination-color: var(--#{$prefix}link-color) !default;
|
|
1302
1302
|
$pagination-bg: var(--#{$prefix}body-bg) !default;
|
1303
1303
|
$pagination-border-radius: var(--#{$prefix}border-radius) !default;
|
1304
1304
|
$pagination-border-width: var(--#{$prefix}border-width) !default;
|
1305
|
-
$pagination-margin-start: calc(#{$pagination-border-width}
|
1305
|
+
$pagination-margin-start: calc(-1 * #{$pagination-border-width}) !default; // stylelint-disable-line function-disallowed-list
|
1306
1306
|
$pagination-border-color: var(--#{$prefix}border-color) !default;
|
1307
1307
|
|
1308
1308
|
$pagination-focus-color: var(--#{$prefix}link-hover-color) !default;
|
@@ -1394,8 +1394,8 @@ $accordion-icon-active-color: $primary-text-emphasis !default;
|
|
1394
1394
|
$accordion-icon-transition: transform .2s ease-in-out !default;
|
1395
1395
|
$accordion-icon-transform: rotate(-180deg) !default;
|
1396
1396
|
|
1397
|
-
$accordion-button-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='#{$accordion-icon-color}' stroke-linecap='round' stroke-linejoin='round'><path d='
|
1398
|
-
$accordion-button-active-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='#{$accordion-icon-active-color}' stroke-linecap='round' stroke-linejoin='round'><path d='
|
1397
|
+
$accordion-button-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='#{$accordion-icon-color}' stroke-linecap='round' stroke-linejoin='round'><path d='m2 5 6 6 6-6'/></svg>") !default;
|
1398
|
+
$accordion-button-active-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='#{$accordion-icon-active-color}' stroke-linecap='round' stroke-linejoin='round'><path d='m2 5 6 6 6-6'/></svg>") !default;
|
1399
1399
|
// scss-docs-end accordion-variables
|
1400
1400
|
|
1401
1401
|
// Tooltips
|
@@ -1507,7 +1507,7 @@ $modal-dialog-margin-y-sm-up: 1.75rem !default;
|
|
1507
1507
|
|
1508
1508
|
$modal-title-line-height: $line-height-base !default;
|
1509
1509
|
|
1510
|
-
$modal-content-color:
|
1510
|
+
$modal-content-color: var(--#{$prefix}body-color) !default;
|
1511
1511
|
$modal-content-bg: var(--#{$prefix}body-bg) !default;
|
1512
1512
|
$modal-content-border-color: var(--#{$prefix}border-color-translucent) !default;
|
1513
1513
|
$modal-content-border-width: var(--#{$prefix}border-width) !default;
|
@@ -1652,6 +1652,7 @@ $carousel-control-width: 15% !default;
|
|
1652
1652
|
$carousel-control-opacity: .5 !default;
|
1653
1653
|
$carousel-control-hover-opacity: .9 !default;
|
1654
1654
|
$carousel-control-transition: opacity .15s ease !default;
|
1655
|
+
$carousel-control-icon-filter: null !default;
|
1655
1656
|
|
1656
1657
|
$carousel-indicator-width: 30px !default;
|
1657
1658
|
$carousel-indicator-height: 3px !default;
|
@@ -1669,17 +1670,17 @@ $carousel-caption-spacer: 1.25rem !default;
|
|
1669
1670
|
|
1670
1671
|
$carousel-control-icon-width: 2rem !default;
|
1671
1672
|
|
1672
|
-
$carousel-control-prev-icon-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$carousel-control-color}'><path d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708
|
1673
|
-
$carousel-control-next-icon-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$carousel-control-color}'><path d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.
|
1673
|
+
$carousel-control-prev-icon-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$carousel-control-color}'><path d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0'/></svg>") !default;
|
1674
|
+
$carousel-control-next-icon-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$carousel-control-color}'><path d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708'/></svg>") !default;
|
1674
1675
|
|
1675
1676
|
$carousel-transition-duration: .6s !default;
|
1676
1677
|
$carousel-transition: transform $carousel-transition-duration ease-in-out !default; // Define transform transition first if using multiple transitions (e.g., `transform 2s ease, opacity .5s ease-out`)
|
1677
1678
|
// scss-docs-end carousel-variables
|
1678
1679
|
|
1679
1680
|
// scss-docs-start carousel-dark-variables
|
1680
|
-
$carousel-dark-indicator-active-bg: $black !default;
|
1681
|
-
$carousel-dark-caption-color: $black !default;
|
1682
|
-
$carousel-dark-control-icon-filter: invert(1) grayscale(100) !default;
|
1681
|
+
$carousel-dark-indicator-active-bg: $black !default; // Deprecated in v5.3.4
|
1682
|
+
$carousel-dark-caption-color: $black !default; // Deprecated in v5.3.4
|
1683
|
+
$carousel-dark-control-icon-filter: invert(1) grayscale(100) !default; // Deprecated in v5.3.4
|
1683
1684
|
// scss-docs-end carousel-dark-variables
|
1684
1685
|
|
1685
1686
|
|
@@ -1706,13 +1707,14 @@ $btn-close-height: $btn-close-width !default;
|
|
1706
1707
|
$btn-close-padding-x: .25em !default;
|
1707
1708
|
$btn-close-padding-y: $btn-close-padding-x !default;
|
1708
1709
|
$btn-close-color: $black !default;
|
1709
|
-
$btn-close-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$btn-close-color}'><path d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.
|
1710
|
+
$btn-close-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$btn-close-color}'><path d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414'/></svg>") !default;
|
1710
1711
|
$btn-close-focus-shadow: $focus-ring-box-shadow !default;
|
1711
1712
|
$btn-close-opacity: .5 !default;
|
1712
1713
|
$btn-close-hover-opacity: .75 !default;
|
1713
1714
|
$btn-close-focus-opacity: 1 !default;
|
1714
1715
|
$btn-close-disabled-opacity: .25 !default;
|
1715
|
-
$btn-close-
|
1716
|
+
$btn-close-filter: null !default;
|
1717
|
+
$btn-close-white-filter: invert(1) grayscale(100%) brightness(200%) !default; // Deprecated in v5.3.4
|
1716
1718
|
// scss-docs-end close-variables
|
1717
1719
|
|
1718
1720
|
|
@@ -1749,5 +1751,3 @@ $nested-kbd-font-weight: null !default; // Deprecated in v5.2.0, remo
|
|
1749
1751
|
$pre-color: null !default;
|
1750
1752
|
|
1751
1753
|
@import "variables-dark"; // TODO: can be removed safely in v6, only here to avoid breaking changes in v5.3
|
1752
|
-
|
1753
|
-
|