blue-web 1.8.0 → 1.10.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/style.scss CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Blue Web v1.8.0 (https://bruegmann.github.io/blue-web)
2
+ * Blue Web v1.10.0 (https://bruegmann.github.io/blue-web)
3
3
  * Licensed under GNU General Public License v3.0 (https://github.com/bruegmann/blue-web/blob/master/LICENSE).
4
4
  */
5
5
 
@@ -35,3 +35,4 @@
35
35
  @import "./styles/buttons";
36
36
  @import "./styles/container-grid";
37
37
  @import "./styles/tabs";
38
+ @import "./styles/modal";
@@ -159,6 +159,7 @@
159
159
  display: flex;
160
160
  align-items: center;
161
161
  border-color: transparent;
162
+ --bs-btn-padding-x: 0.437rem;
162
163
  @include slide-transition();
163
164
 
164
165
  &::before {
@@ -0,0 +1,111 @@
1
+ /**
2
+ * Allows to use Bootstrap Modals but with the native dialog element
3
+ * without the need of Bootstrap's JavaScript.
4
+ * Even works with Bootstrap's Offcanvas classes.
5
+ */
6
+
7
+ @keyframes blue-modal-open {
8
+ from {
9
+ opacity: 0;
10
+ scale: var(--ani-scale-from, 95%);
11
+ translate: var(--ani-translate-from, 0 0);
12
+ }
13
+ to {
14
+ opacity: 1;
15
+ scale: var(--ani-scale-to, 100%);
16
+ translate: var(--ani-translate-to, 0 0);
17
+ }
18
+ }
19
+
20
+ @keyframes blue-modal-close {
21
+ from {
22
+ opacity: 1;
23
+ scale: var(--ani-scale-to, 100%);
24
+ translate: var(--ani-translate-to, 0 0);
25
+ }
26
+ to {
27
+ opacity: 0;
28
+ scale: var(--ani-scale-from, 95%);
29
+ translate: var(--ani-translate-from, 0 0);
30
+ }
31
+ }
32
+
33
+ dialog.blue-modal {
34
+ border: none;
35
+ background: none;
36
+ padding: 0;
37
+ margin: 0;
38
+ max-width: none;
39
+ max-height: none;
40
+ transition: display 0.2s allow-discrete, overlay 0.2s allow-discrete;
41
+ animation: blue-modal-close 0.2s forwards;
42
+
43
+ .offcanvas-backdrop {
44
+ display: none;
45
+ }
46
+ }
47
+
48
+ dialog.blue-modal[open] {
49
+ display: block;
50
+ animation: blue-modal-open 0.2s forwards;
51
+ }
52
+
53
+ dialog.blue-modal::backdrop {
54
+ --bs-backdrop-bg: #000;
55
+ --bs-backdrop-opacity: 0.5;
56
+ background-color: var(--bs-backdrop-bg);
57
+ transition: opacity 0.2s;
58
+ opacity: 0;
59
+ }
60
+
61
+ dialog.blue-modal[open]::backdrop {
62
+ opacity: var(--bs-backdrop-opacity);
63
+ }
64
+
65
+ .blue-modal-backdrop {
66
+ color: #0000;
67
+ z-index: -1;
68
+ grid-row-start: 1;
69
+ grid-column-start: 1;
70
+ place-self: stretch stretch;
71
+ display: grid;
72
+ position: fixed;
73
+ top: 0;
74
+ left: 0;
75
+ right: 0;
76
+ bottom: 0;
77
+ }
78
+
79
+ .blue-modal-backdrop > button {
80
+ opacity: 0;
81
+ cursor: default;
82
+ }
83
+
84
+ @media (prefers-reduced-motion: reduce) {
85
+ dialog.blue-modal,
86
+ dialog.blue-modal[open],
87
+ dialog.blue-modal::backdrop {
88
+ transition: none;
89
+ animation: none;
90
+ }
91
+ }
92
+
93
+ dialog.blue-modal:has(.offcanvas) {
94
+ --ani-scale-from: 100%;
95
+ }
96
+
97
+ dialog.blue-modal:has(.offcanvas-top) {
98
+ --ani-translate-from: 0 -100%;
99
+ }
100
+
101
+ dialog.blue-modal:has(.offcanvas-end) {
102
+ --ani-translate-from: 100% 0;
103
+ }
104
+
105
+ dialog.blue-modal:has(.offcanvas-bottom) {
106
+ --ani-translate-from: 0 100%;
107
+ }
108
+
109
+ dialog.blue-modal:has(.offcanvas-start) {
110
+ --ani-translate-from: -100% 0;
111
+ }
@@ -26,7 +26,7 @@
26
26
  user-select: none;
27
27
  appearance: none;
28
28
 
29
- @include font-size(var(--#{$prefix}nav-link-font-size));
29
+ font-size: var(--#{$prefix}nav-link-font-size, 1rem);
30
30
  font-weight: var(--#{$prefix}nav-link-font-weight);
31
31
  color: var(--#{$prefix}nav-link-color);
32
32
  padding: var(--#{$prefix}nav-link-padding-y) var(--#{$prefix}nav-link-padding-x);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blue-web",
3
- "version": "1.8.0",
3
+ "version": "1.10.0",
4
4
  "description": "UI components built on top of Bootstrap 5",
5
5
  "license": "LGPL-3.0-or-later",
6
6
  "homepage": "https://bruegmann.github.io/blue-web/v1",
@@ -47,12 +47,12 @@
47
47
  "@types/bootstrap": "^5.0.17",
48
48
  "@types/jest": "^24.9.1",
49
49
  "@types/node": "^12.12.47",
50
- "@types/react": "^18.0.9",
51
- "@types/react-dom": "^18.0.5",
50
+ "@types/react": "^19.0.8",
51
+ "@types/react-dom": "^19.0.3",
52
52
  "@types/react-router-dom": "^5.3.3",
53
53
  "@types/react-syntax-highlighter": "^13.5.0",
54
54
  "autoprefixer": "^10.3.6",
55
- "blue-react": "file:../blue-react/blue-react-10.0.0-rc5.tgz",
55
+ "blue-react": "^10.0.0-rc3",
56
56
  "gh-pages": "^3.1.0",
57
57
  "license-report": "^6.2.0",
58
58
  "lint-staged": "^11.1.2",
@@ -60,9 +60,9 @@
60
60
  "postcss-cli": "^9.0.1",
61
61
  "postcss-minify": "^1.1.0",
62
62
  "prettier": "2.4.1",
63
- "react": "^18.1.0",
64
- "react-bootstrap-icons": "^1.9.1",
65
- "react-dom": "^18.1.0",
63
+ "react": "^19.0.0",
64
+ "react-bootstrap-icons": "^1.11.5",
65
+ "react-dom": "^19.0.0",
66
66
  "react-markdown": "^8.0.3",
67
67
  "react-router-dom": "^5.3.3",
68
68
  "react-scripts": "^5.0.1",