paraqeet 2.1.0 → 3.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.
- checksums.yaml +4 -4
- data/_sass/_highlight.scss +9 -10
- data/_sass/_prose.scss +92 -74
- data/_sass/bootstrap/_functions.scss +1 -1
- data/_sass/bootstrap/_reboot.scss +6 -0
- data/_sass/bootstrap/_spinners.scss +1 -0
- data/_sass/bootstrap/mixins/_banner.scss +1 -1
- data/_sass/bootstrap/tests/mixins/_color-contrast.test.scss +139 -0
- data/assets/js/bootstrap.bundle.js +2 -5
- data/assets/js/bootstrap.bundle.js.map +1 -1
- data/assets/js/bootstrap.bundle.min.js +2 -2
- data/assets/js/bootstrap.bundle.min.js.map +1 -1
- data/assets/js/bootstrap.esm.js +2 -5
- data/assets/js/bootstrap.esm.js.map +1 -1
- data/assets/js/bootstrap.esm.min.js +2 -2
- data/assets/js/bootstrap.esm.min.js.map +1 -1
- data/assets/js/bootstrap.js +2 -5
- data/assets/js/bootstrap.js.map +1 -1
- data/assets/js/bootstrap.min.js +2 -2
- data/assets/js/bootstrap.min.js.map +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de35b356f71714168d46a57579b24d85e5fda6893780cf0c8be619bb1f8b9737
|
4
|
+
data.tar.gz: 4ac1707f91b69ad993ff274e79d3d242505689d774ddaf2022e1a13b6b0e2609
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b04c6ffee1ac3aa5d5a4bbdafa552c3d7d10f0430050105953a37a9f2c44439c720ee2485f2c35cfe576aea6588462d26102b7ddab86624b00f98c1b65ac27b
|
7
|
+
data.tar.gz: ee1734c0ec1ffff7f959aa498cd9500d043a3b8124aa7d407932ee58c255a808d9f36d4bcae2ef91b42537f77a1f18e930bee0c0b880a6df6841c2c6e6094f3a
|
data/_sass/_highlight.scss
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
.highlight {
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
}
|
3
|
+
@extend .w-100;
|
4
|
+
@extend .p-0;
|
6
5
|
|
7
6
|
* {
|
8
7
|
font-size: $font-size-sm;
|
@@ -10,15 +9,15 @@
|
|
10
9
|
|
11
10
|
td {
|
12
11
|
pre {
|
13
|
-
|
14
|
-
|
12
|
+
@extend .m-0;
|
13
|
+
@extend .p-0;
|
15
14
|
}
|
16
15
|
}
|
17
16
|
|
18
17
|
.lineno {
|
19
|
-
|
20
|
-
text-
|
21
|
-
|
18
|
+
@extend .pe-3;
|
19
|
+
@extend .text-end;
|
20
|
+
@extend .text-body-secondary;
|
22
21
|
}
|
23
22
|
|
24
23
|
.o,
|
@@ -130,7 +129,7 @@
|
|
130
129
|
.ow,
|
131
130
|
.se,
|
132
131
|
.si {
|
133
|
-
|
132
|
+
@extend .fw-bold;
|
134
133
|
}
|
135
134
|
|
136
135
|
.c,
|
@@ -141,7 +140,7 @@
|
|
141
140
|
.cs,
|
142
141
|
.ge,
|
143
142
|
.sd {
|
144
|
-
|
143
|
+
@extend .fst-italic;
|
145
144
|
}
|
146
145
|
|
147
146
|
.err {
|
data/_sass/_prose.scss
CHANGED
@@ -1,89 +1,112 @@
|
|
1
1
|
.prose {
|
2
2
|
|
3
|
-
//
|
3
|
+
// abbr
|
4
4
|
abbr {
|
5
|
-
@
|
6
|
-
text-transform: uppercase;
|
5
|
+
@extend .initialism;
|
7
6
|
}
|
8
7
|
|
9
|
-
//
|
8
|
+
// blockquote
|
10
9
|
blockquote {
|
11
|
-
|
12
|
-
|
13
|
-
font-style: italic;
|
14
|
-
|
15
|
-
margin-bottom: $blockquote-margin-y;
|
16
|
-
@include font-size($blockquote-font-size);
|
17
|
-
|
18
|
-
> :last-child {
|
19
|
-
margin-bottom: 0;
|
20
|
-
}
|
10
|
+
@extend .blockquote;
|
11
|
+
}
|
21
12
|
|
13
|
+
// figure
|
14
|
+
figure:not(.highlight figure) {
|
15
|
+
@extend .figure;
|
22
16
|
figcaption {
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
&::before {
|
29
|
-
content: "\2014\00A0";
|
17
|
+
@extend .figure-caption;
|
18
|
+
}
|
19
|
+
blockquote {
|
20
|
+
+ figcaption {
|
21
|
+
@extend .blockquote-footer;
|
30
22
|
}
|
31
23
|
}
|
24
|
+
img {
|
25
|
+
@extend .figure-img;
|
26
|
+
}
|
32
27
|
}
|
33
28
|
|
34
|
-
//
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
29
|
+
// h1 - h6
|
30
|
+
h1 {
|
31
|
+
@extend .mb-5;
|
32
|
+
}
|
33
|
+
h2 {
|
34
|
+
@extend .mb-4;
|
35
|
+
}
|
36
|
+
h3 {
|
37
|
+
@extend .mb-4;
|
38
|
+
}
|
39
|
+
h4 {
|
40
|
+
@extend .mb-3;
|
41
|
+
}
|
42
|
+
h5 {
|
43
|
+
@extend .mb-3;
|
44
|
+
}
|
45
|
+
h6 {
|
46
|
+
@extend .mb-2;
|
47
|
+
}
|
42
48
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
}
|
49
|
+
// hr
|
50
|
+
hr {
|
51
|
+
@extend .mt-5;
|
52
|
+
@extend .mb-5;
|
48
53
|
}
|
49
54
|
|
50
|
-
//
|
55
|
+
// img
|
51
56
|
img {
|
52
|
-
@
|
57
|
+
@extend .img-fluid;
|
58
|
+
}
|
59
|
+
|
60
|
+
// ol
|
61
|
+
ol {
|
62
|
+
list-style-type: decimal;
|
63
|
+
ol {
|
64
|
+
list-style-type: lower-alpha;
|
65
|
+
ol {
|
66
|
+
list-style-type: lower-roman;
|
67
|
+
ol {
|
68
|
+
list-style-type: decimal;
|
69
|
+
ol {
|
70
|
+
list-style-type: lower-alpha;
|
71
|
+
ol {
|
72
|
+
list-style-type: lower-roman;
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}
|
76
|
+
}
|
77
|
+
}
|
53
78
|
}
|
54
79
|
|
55
|
-
//
|
80
|
+
// pre
|
56
81
|
pre {
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
color: $pre-color;
|
62
|
-
border-radius: $border-radius;
|
63
|
-
font-size: $font-size-sm;
|
82
|
+
@extend .w-100;
|
83
|
+
@extend .bg-light;
|
84
|
+
@extend .p-3;
|
85
|
+
@extend .rounded;
|
64
86
|
}
|
65
87
|
|
66
|
-
//
|
88
|
+
// table
|
67
89
|
table:not(.highlight table) {
|
68
|
-
|
69
|
-
|
70
|
-
color: var(--#{$prefix}table-color);
|
71
|
-
vertical-align: $table-cell-vertical-align;
|
72
|
-
border-color: var(--#{$prefix}table-border-color);
|
73
|
-
|
74
|
-
> :not(caption) > * > * {
|
75
|
-
padding: $table-cell-padding-y $table-cell-padding-x;
|
76
|
-
background-color: var(--#{$prefix}table-bg);
|
77
|
-
border-bottom-width: $table-border-width;
|
78
|
-
box-shadow: inset 0 0 0 9999px var(--#{$prefix}table-accent-bg);
|
79
|
-
}
|
80
|
-
|
81
|
-
> tbody {
|
82
|
-
vertical-align: inherit;
|
83
|
-
}
|
90
|
+
@extend .table;
|
91
|
+
}
|
84
92
|
|
85
|
-
|
86
|
-
|
93
|
+
// ol
|
94
|
+
ul {
|
95
|
+
list-style-type: disc;
|
96
|
+
ul {
|
97
|
+
list-style-type: circle;
|
98
|
+
ul {
|
99
|
+
list-style-type: square;
|
100
|
+
ul {
|
101
|
+
list-style-type: disc;
|
102
|
+
ul {
|
103
|
+
list-style-type: circle;
|
104
|
+
ul {
|
105
|
+
list-style-type: square;
|
106
|
+
}
|
107
|
+
}
|
108
|
+
}
|
109
|
+
}
|
87
110
|
}
|
88
111
|
}
|
89
112
|
|
@@ -91,19 +114,14 @@
|
|
91
114
|
.highlight,
|
92
115
|
address,
|
93
116
|
dl,
|
117
|
+
figure:not(.highlight figure),
|
94
118
|
form,
|
95
|
-
h1,
|
96
|
-
h2,
|
97
|
-
h3,
|
98
|
-
h4,
|
99
|
-
h5,
|
100
119
|
ol:not(li ol),
|
120
|
+
p,
|
121
|
+
pre,
|
122
|
+
table:not(.highlight table),
|
101
123
|
ul:not(li ul) {
|
102
|
-
|
103
|
-
}
|
104
|
-
|
105
|
-
hr {
|
106
|
-
margin: map-get($spacers, 5) 0;
|
124
|
+
@extend .mb-4;
|
107
125
|
}
|
108
126
|
|
109
127
|
}
|
@@ -111,7 +129,7 @@
|
|
111
129
|
[data-bs-theme="dark"] {
|
112
130
|
.prose {
|
113
131
|
pre {
|
114
|
-
|
132
|
+
@extend .bg-black;
|
115
133
|
}
|
116
134
|
}
|
117
135
|
}
|
@@ -157,7 +157,7 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
|
|
157
157
|
|
158
158
|
@each $color in $foregrounds {
|
159
159
|
$contrast-ratio: contrast-ratio($background, $color);
|
160
|
-
@if $contrast-ratio
|
160
|
+
@if $contrast-ratio >= $min-contrast-ratio {
|
161
161
|
@return $color;
|
162
162
|
} @else if $contrast-ratio > $max-ratio {
|
163
163
|
$max-ratio: $contrast-ratio;
|
@@ -534,6 +534,12 @@ legend {
|
|
534
534
|
[type="search"] {
|
535
535
|
-webkit-appearance: textfield; // 1
|
536
536
|
outline-offset: -2px; // 2
|
537
|
+
|
538
|
+
// 3. Better affordance and consistent appearance for search cancel button
|
539
|
+
&::-webkit-search-cancel-button {
|
540
|
+
cursor: pointer;
|
541
|
+
filter: grayscale(1);
|
542
|
+
}
|
537
543
|
}
|
538
544
|
|
539
545
|
// 1. A few input types should stay LTR
|
@@ -1,6 +1,6 @@
|
|
1
1
|
@mixin bsBanner($file) {
|
2
2
|
/*!
|
3
|
-
* Bootstrap #{$file} v5.3.
|
3
|
+
* Bootstrap #{$file} v5.3.8 (https://getbootstrap.com/)
|
4
4
|
* Copyright 2011-2025 The Bootstrap Authors
|
5
5
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
6
6
|
*/
|
@@ -0,0 +1,139 @@
|
|
1
|
+
@import "../../functions";
|
2
|
+
@import "../../variables";
|
3
|
+
@import "../../variables-dark";
|
4
|
+
@import "../../maps";
|
5
|
+
@import "../../mixins";
|
6
|
+
|
7
|
+
@include describe("color-contrast function") {
|
8
|
+
@include it("should return a color when contrast ratio equals minimum requirement (WCAG 2.1 compliance)") {
|
9
|
+
// Test case: Background color that produces contrast ratio close to 4.5:1
|
10
|
+
// This tests the WCAG 2.1 requirement that contrast should be "at least 4.5:1" (>= 4.5)
|
11
|
+
// rather than "strictly greater than 4.5:1" (> 4.5)
|
12
|
+
|
13
|
+
// #777777 produces 4.4776:1 contrast ratio with white text
|
14
|
+
// Since this is below the 4.5:1 threshold, it should return the highest available contrast color
|
15
|
+
$test-background: #777;
|
16
|
+
$result: color-contrast($test-background);
|
17
|
+
|
18
|
+
@include assert-equal($result, $black, "Should return black (highest available contrast) for background with 4.4776:1 contrast ratio (below threshold)");
|
19
|
+
}
|
20
|
+
|
21
|
+
@include it("should return a color when contrast ratio is above minimum requirement") {
|
22
|
+
// Test case: Background color that produces contrast ratio above 4.5:1
|
23
|
+
// #767676 produces 4.5415:1 contrast ratio with white text
|
24
|
+
$test-background: #767676;
|
25
|
+
$result: color-contrast($test-background);
|
26
|
+
|
27
|
+
@include assert-equal($result, $white, "Should return white for background with 4.5415:1 contrast ratio (above threshold)");
|
28
|
+
}
|
29
|
+
|
30
|
+
@include it("should return a color when contrast ratio is below minimum requirement") {
|
31
|
+
// Test case: Background color that produces contrast ratio below 4.5:1
|
32
|
+
// #787878 produces 4.4155:1 contrast ratio with white text
|
33
|
+
$test-background: #787878;
|
34
|
+
$result: color-contrast($test-background);
|
35
|
+
|
36
|
+
// Should return the color with the highest available contrast ratio
|
37
|
+
@include assert-equal($result, $black, "Should return black (highest available contrast) for background with 4.4155:1 contrast ratio (below threshold)");
|
38
|
+
}
|
39
|
+
|
40
|
+
@include it("should handle edge case with very light background") {
|
41
|
+
// Test case: Very light background that should return dark text
|
42
|
+
$test-background: #f8f9fa; // Very light gray
|
43
|
+
$result: color-contrast($test-background);
|
44
|
+
|
45
|
+
@include assert-equal($result, $color-contrast-dark, "Should return dark text for very light background");
|
46
|
+
}
|
47
|
+
|
48
|
+
@include it("should handle edge case with very dark background") {
|
49
|
+
// Test case: Very dark background that should return light text
|
50
|
+
$test-background: #212529; // Very dark gray
|
51
|
+
$result: color-contrast($test-background);
|
52
|
+
|
53
|
+
@include assert-equal($result, $color-contrast-light, "Should return light text for very dark background");
|
54
|
+
}
|
55
|
+
|
56
|
+
@include it("should work with custom minimum contrast ratio") {
|
57
|
+
// Test case: Using a custom minimum contrast ratio
|
58
|
+
$test-background: #666;
|
59
|
+
$result: color-contrast($test-background, $color-contrast-dark, $color-contrast-light, 3);
|
60
|
+
|
61
|
+
@include assert-equal($result, $white, "Should return white when using custom minimum contrast ratio of 3.0");
|
62
|
+
}
|
63
|
+
|
64
|
+
@include it("should test contrast ratio calculation accuracy") {
|
65
|
+
// Test case: Verify that contrast-ratio function works correctly
|
66
|
+
$background: #767676;
|
67
|
+
$foreground: $white;
|
68
|
+
$ratio: contrast-ratio($background, $foreground);
|
69
|
+
// Bootstrap's implementation calculates this as ~4.5415, not exactly 4.5, due to its luminance math.
|
70
|
+
// We use 4.54 as the threshold for this test to match the actual implementation.
|
71
|
+
@include assert-true($ratio >= 4.54 and $ratio <= 4.55, "Contrast ratio should be approximately 4.54:1 (Bootstrap's math)");
|
72
|
+
}
|
73
|
+
|
74
|
+
@include it("should test luminance calculation") {
|
75
|
+
// Test case: Verify luminance function works correctly
|
76
|
+
$white-luminance: luminance($white);
|
77
|
+
$black-luminance: luminance($black);
|
78
|
+
|
79
|
+
@include assert-equal($white-luminance, 1, "White should have luminance of 1");
|
80
|
+
@include assert-equal($black-luminance, 0, "Black should have luminance of 0");
|
81
|
+
}
|
82
|
+
|
83
|
+
@include it("should handle rgba colors correctly") {
|
84
|
+
// Test case: Test with rgba colors
|
85
|
+
$test-background: rgba(118, 118, 118, 1); // Same as #767676
|
86
|
+
$result: color-contrast($test-background);
|
87
|
+
|
88
|
+
@include assert-equal($result, $white, "Should handle rgba colors correctly");
|
89
|
+
}
|
90
|
+
|
91
|
+
@include it("should test the WCAG 2.1 boundary condition with color below threshold") {
|
92
|
+
// Test case: Background color that produces contrast ratio below 4.5:1
|
93
|
+
// #787878 produces 4.4155:1 contrast ratio with white
|
94
|
+
$test-background: #787878; // Produces 4.4155:1 contrast ratio
|
95
|
+
$contrast-ratio: contrast-ratio($test-background, $white);
|
96
|
+
|
97
|
+
// Verify the contrast ratio is below 4.5:1
|
98
|
+
@include assert-true($contrast-ratio < 4.5, "Contrast ratio should be below 4.5:1 threshold");
|
99
|
+
|
100
|
+
// The color-contrast function should return the color with highest available contrast
|
101
|
+
$result: color-contrast($test-background);
|
102
|
+
@include assert-equal($result, $black, "color-contrast should return black (highest available contrast) for below-threshold ratio");
|
103
|
+
}
|
104
|
+
|
105
|
+
@include it("should test the WCAG 2.1 boundary condition with color at threshold") {
|
106
|
+
// Test case: Background color that produces contrast ratio close to 4.5:1
|
107
|
+
// #777777 produces 4.4776:1 contrast ratio with white
|
108
|
+
$test-background: #777; // Produces 4.4776:1 contrast ratio
|
109
|
+
$contrast-ratio: contrast-ratio($test-background, $white);
|
110
|
+
|
111
|
+
// Verify the contrast ratio is below 4.5:1 threshold
|
112
|
+
@include assert-true($contrast-ratio < 4.5, "Contrast ratio is below threshold, function should handle gracefully");
|
113
|
+
}
|
114
|
+
|
115
|
+
@include it("should demonstrate the difference between > and >= operators") {
|
116
|
+
// Test case: Demonstrates the difference between > and >= operators
|
117
|
+
// Uses #767676 with a custom minimum contrast ratio that matches its actual ratio (4.5415)
|
118
|
+
// With > 4.5415: should return black (fallback to highest available)
|
119
|
+
// With >= 4.5415: should return white (meets threshold)
|
120
|
+
|
121
|
+
$test-background: #767676; // Produces 4.5415:1 contrast ratio
|
122
|
+
$actual-ratio: contrast-ratio($test-background, $white);
|
123
|
+
|
124
|
+
// Test with a custom minimum that matches the actual ratio
|
125
|
+
$result: color-contrast($test-background, $color-contrast-dark, $color-contrast-light, $actual-ratio);
|
126
|
+
|
127
|
+
// Should return white when using >= implementation
|
128
|
+
@include assert-equal($result, $white, "color-contrast should return white when using exact ratio as threshold (>= implementation)");
|
129
|
+
}
|
130
|
+
|
131
|
+
@include it("should test additional working colors above threshold") {
|
132
|
+
// Test case: Background color that produces contrast ratio well above 4.5:1
|
133
|
+
// #757575 produces 4.6047:1 contrast ratio with white text
|
134
|
+
$test-background: #757575; // Produces 4.6047:1 contrast ratio
|
135
|
+
$result: color-contrast($test-background);
|
136
|
+
|
137
|
+
@include assert-equal($result, $white, "Should return white for background with 4.6047:1 contrast ratio (well above threshold)");
|
138
|
+
}
|
139
|
+
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap v5.3.
|
2
|
+
* Bootstrap v5.3.8 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2025 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -647,7 +647,7 @@
|
|
647
647
|
* Constants
|
648
648
|
*/
|
649
649
|
|
650
|
-
const VERSION = '5.3.
|
650
|
+
const VERSION = '5.3.8';
|
651
651
|
|
652
652
|
/**
|
653
653
|
* Class definition
|
@@ -3690,9 +3690,6 @@
|
|
3690
3690
|
this._element.setAttribute('aria-expanded', 'false');
|
3691
3691
|
Manipulator.removeDataAttribute(this._menu, 'popper');
|
3692
3692
|
EventHandler.trigger(this._element, EVENT_HIDDEN$5, relatedTarget);
|
3693
|
-
|
3694
|
-
// Explicitly return focus to the trigger element
|
3695
|
-
this._element.focus();
|
3696
3693
|
}
|
3697
3694
|
_getConfig(config) {
|
3698
3695
|
config = super._getConfig(config);
|