@wwtdev/bsds-css 1.6.5 → 1.8.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 (51) hide show
  1. package/dist/components/_accordions.scss +3 -3
  2. package/dist/components/_badge.scss +13 -11
  3. package/dist/components/_banner.scss +2 -10
  4. package/dist/components/_buttons.scss +11 -5
  5. package/dist/components/_circle-buttons.scss +6 -6
  6. package/dist/components/_dropdown-options.scss +119 -0
  7. package/dist/components/_dropdown.scss +29 -154
  8. package/dist/components/_form-booleans.scss +8 -8
  9. package/dist/components/_form-character-count.scss +2 -2
  10. package/dist/components/_form-elements.scss +4 -4
  11. package/dist/components/_form-hints.scss +3 -2
  12. package/dist/components/_form-input-composite.scss +1 -1
  13. package/dist/components/_form-labels.scss +2 -2
  14. package/dist/components/_form-switches.scss +6 -6
  15. package/dist/components/_form-text-fields.scss +12 -10
  16. package/dist/components/_loader.scss +89 -0
  17. package/dist/components/_modal.scss +36 -0
  18. package/dist/components/_overlay.scss +22 -0
  19. package/dist/components/_pills.scss +9 -11
  20. package/dist/components/_profile-layout.scss +1 -5
  21. package/dist/components/_tables.scss +1 -1
  22. package/dist/components/_toast.scss +19 -25
  23. package/dist/components/_tooltip.scss +2 -2
  24. package/dist/components/accordions.css +3 -3
  25. package/dist/components/badge.css +12 -10
  26. package/dist/components/banner.css +2 -10
  27. package/dist/components/buttons.css +11 -5
  28. package/dist/components/circle-buttons.css +6 -6
  29. package/dist/components/dropdown-options.css +115 -0
  30. package/dist/components/dropdown.css +29 -154
  31. package/dist/components/form-booleans.css +8 -8
  32. package/dist/components/form-character-count.css +2 -2
  33. package/dist/components/form-elements.css +4 -4
  34. package/dist/components/form-hints.css +3 -2
  35. package/dist/components/form-input-composite.css +1 -1
  36. package/dist/components/form-labels.css +2 -2
  37. package/dist/components/form-switches.css +6 -6
  38. package/dist/components/form-text-fields.css +12 -10
  39. package/dist/components/loader.css +85 -0
  40. package/dist/components/modal.css +32 -0
  41. package/dist/components/overlay.css +18 -0
  42. package/dist/components/pills.css +9 -11
  43. package/dist/components/profile-layout.css +1 -5
  44. package/dist/components/tables.css +1 -1
  45. package/dist/components/toast.css +19 -25
  46. package/dist/components/tooltip.css +2 -2
  47. package/dist/wwt-bsds-preset.js +5 -2
  48. package/dist/wwt-bsds-wc-base.css +110 -15
  49. package/dist/wwt-bsds.css +408 -201
  50. package/dist/wwt-bsds.min.css +1 -1
  51. package/package.json +1 -1
@@ -0,0 +1,115 @@
1
+ /* Option list */
2
+ .bs-dropdown-options {
3
+ list-style: none;
4
+ padding: 0;
5
+ }
6
+
7
+ .bs-dropdown-options :where(li:first-child) {
8
+ margin-top: 0.5rem;
9
+ }
10
+
11
+ /* Option list item */
12
+ .bs-dropdown-options :where(li) {
13
+ align-items: center;
14
+ border-bottom: 2px solid transparent;
15
+ border-left: 4px solid transparent;
16
+ border-radius: 3px;
17
+ border-right: 2px solid transparent;
18
+ border-top: 2px solid transparent;
19
+ color: var(--bs-ink-base);
20
+ column-gap: 0.5rem;
21
+ cursor: pointer;
22
+ display: grid;
23
+ margin-bottom: 0.5rem;
24
+ padding-bottom: 0.25rem;
25
+ padding-left: 0.5rem;
26
+ padding-right: 0.75rem;
27
+ padding-top: 0.25rem;
28
+ row-gap: 0.125rem;
29
+ }
30
+
31
+ /* Variant: 2-col */
32
+ .bs-dropdown-options :where(li[data-variant~="2-col"]) {
33
+ grid-template-columns: min-content 1fr;
34
+ }
35
+
36
+ /* Variant: description */
37
+ .bs-dropdown-options :where(li:not([data-variant~="2-col"])[data-variant~="description"] :nth-child(2)) {
38
+ color: var(--bs-ink-light);
39
+ font-size: var(--bs-text-xs);
40
+ height: 1.125rem;
41
+ line-height: 1.125rem;
42
+ }
43
+
44
+ /* Variant: 2-col description */
45
+ .bs-dropdown-options :where(li[data-variant~="2-col"][data-variant~="description"] :nth-child(3)) {
46
+ color: var(--bs-ink-light);
47
+ font-size: var(--bs-text-xs);
48
+ grid-column-start: 2;
49
+ height: 1.125rem;
50
+ line-height: 1.125rem;
51
+ }
52
+
53
+ /* Hover or data-selected */
54
+ .bs-dropdown-options :where(li:hover),
55
+ .bs-dropdown-options :where(li[data-selected]) {
56
+ background-color: var(--bs-bg-medium);
57
+ border-left: 4px solid var(--bs-blue-base);
58
+ color: var(--bs-blue-base);
59
+ outline: none;
60
+ }
61
+
62
+ /* Variant: negative */
63
+ .bs-dropdown-options :where(li[data-variant~="negative"]:hover),
64
+ .bs-dropdown-options :where(li[data-variant~="negative"][data-selected]),
65
+ .bs-dropdown-options :where(li[data-variant~="negative"][data-selected]:hover) {
66
+ /* 25% alpha version of --bs-red-400 */
67
+ background-color: rgba(248, 169, 170, 0.25);
68
+ border-left: 4px solid var(--bs-red-500);
69
+ color: var(--bs-red-500);
70
+ }
71
+
72
+ /* Hover or data-selected for 2-col/description variants */
73
+ .bs-dropdown-options :where(li:not([data-variant~="2-col"])[data-variant~="description"]:hover :nth-child(2)),
74
+ .bs-dropdown-options :where(li[data-variant~="2-col"][data-variant~="description"]:hover :nth-child(3)),
75
+ .bs-dropdown-options :where(li:not([data-variant~="2-col"])[data-variant~="description"][data-selected] :nth-child(2)),
76
+ .bs-dropdown-options :where(li[data-variant~="2-col"][data-variant~="description"][data-selected] :nth-child(3)) {
77
+ color: var(--bs-blue-base);
78
+ }
79
+
80
+ /* Hover or data-selected for negative + 2-col/description variants */
81
+ .bs-dropdown-options :where(li[data-variant~="negative"]:not([data-variant~="2-col"])[data-variant~="description"]:hover :nth-child(2)),
82
+ .bs-dropdown-options :where(li[data-variant~="negative"][data-variant~="2-col"][data-variant~="description"]:hover :nth-child(3)),
83
+ .bs-dropdown-options :where(li[data-variant~="negative"]:not([data-variant~="2-col"])[data-variant~="description"][data-selected] :nth-child(2)),
84
+ .bs-dropdown-options :where(li[data-variant~="negative"][data-variant~="2-col"][data-variant~="description"][data-selected] :nth-child(3)) {
85
+ color: var(--bs-red-500);
86
+ }
87
+
88
+ /* List option mouse click focus (do not show) */
89
+ .bs-dropdown-options :where(li:focus:not(:focus-visible)){
90
+ outline: none;
91
+ }
92
+
93
+ /* data-variant="negative" list option mouse click focus (do not show) */
94
+ .bs-dropdown-options :where(li[data-variant~="negative"]:focus:not(:focus-visible)) {
95
+ outline: none;
96
+ }
97
+
98
+ /* List option keyboard navigation focus */
99
+ .bs-dropdown-options :where(li:focus-visible) {
100
+ --focus-border-color: var(--bs-blue-base);
101
+ border: 2px solid var(--focus-border-color);
102
+ outline: none;
103
+ padding-left: 0.625rem;
104
+ }
105
+
106
+ /* Navigation focus on a selected element should preserve 4px left border */
107
+ .bs-dropdown-options :where(li[data-selected]:focus-visible) {
108
+ border-left: 4px solid var(--focus-border-color);
109
+ padding-left: 0.5rem;
110
+ }
111
+
112
+ /* data-variant="negative" list option keyboard navigation focus */
113
+ .bs-dropdown-options :where(li[data-variant~="negative"]:focus-visible) {
114
+ --focus-border-color: var(--bs-red-200);
115
+ }
@@ -1,23 +1,20 @@
1
- /* Positioning the parent */
2
- .bs-dropdown {
1
+ /* Parent */
2
+ .bs-dropdown-parent {
3
3
  display: inline-block;
4
4
  position: relative;
5
5
  }
6
6
 
7
- /* Option list */
8
- .bs-dropdown :where(ul) {
9
- background-color: var(--bs-white);
7
+ /* Content */
8
+ .bs-dropdown {
9
+ background-color: var(--bs-bg-base-elevated);
10
10
  border-radius: 4px;
11
11
  bottom: auto;
12
12
  box-shadow: var(--bs-shadow-contentMedium);
13
13
  line-height: 1.5rem;
14
- list-style: none;
15
14
  margin: 0;
16
15
  max-height: 0;
17
- max-width: 16.875rem;
18
16
  opacity: 0;
19
17
  overflow-y: auto;
20
- padding: 0;
21
18
  position: absolute;
22
19
  top: calc(100% + 0.5rem);
23
20
  transition-duration: 75ms;
@@ -26,164 +23,42 @@
26
23
  z-index: 999;
27
24
  }
28
25
 
29
- /* (not) data-variant="fit" */
30
- .bs-dropdown:not([data-variant="fit"]) :where(ul) {
31
- width: 16.875rem;
32
- }
33
-
34
- /* data-shown */
35
- .bs-dropdown:where([data-shown]) :where(ul) {
36
- max-height: 20rem;
37
- opacity: 1;
38
- padding-top: 0.75rem;
39
- }
40
-
41
- /* data-position="top" */
42
- .bs-dropdown:where([data-position="top"]) :where(ul) {
43
- bottom: calc(100% + 0.5rem);
44
- top: auto;
45
- }
46
-
47
- /* data-justify="center" */
48
- .bs-dropdown:where([data-justify="center"]) :where(ul) {
49
- left: 50%;
50
- transform: translateX(-50%);
51
- }
52
-
53
- /* Option list item */
54
- .bs-dropdown :where(ul li) {
55
- align-items: center;
56
- border-bottom: 2px solid transparent;
57
- border-left: 4px solid transparent;
58
- border-radius: 3px;
59
- border-right: 2px solid transparent;
60
- border-top: 2px solid transparent;
61
- color: var(--bs-ink-base);
62
- column-gap: 0.5rem;
63
- cursor: pointer;
64
- display: grid;
65
- margin-bottom: 0.5rem;
66
- padding-bottom: 0.25rem;
67
- padding-left: 0.5rem;
68
- padding-right: 0.75rem;
69
- padding-top: 0.25rem;
70
- row-gap: 0.125rem;
71
- }
72
-
73
- /* data-variant="search" (search input) */
74
- .bs-dropdown :where(ul li[data-variant~="search"]) {
75
- border-left: none;
76
- cursor: default;
77
- display: block;
78
- }
79
-
80
- /* data-variant="break" (list item) */
81
- .bs-dropdown :where(ul li[data-variant~="break"]) {
82
- border-left: none;
83
- cursor: default;
84
- display: block;
85
- padding: 0;
86
- }
87
-
88
- /* data-variant="break" (actual line break) */
89
- .bs-dropdown :where(ul li[data-variant~="break"] hr) {
90
- background: var(--bs-navy-200);
91
- }
92
-
93
- /* data-variant="2-col" */
94
- .bs-dropdown :where(ul li[data-variant~="2-col"]) {
95
- grid-template-columns: min-content 1fr;
96
- }
97
-
98
- /* data-variant="description" */
99
- /* Description will be the 2nd child in a 1-column item */
100
- .bs-dropdown :where(ul li:not([data-variant~="2-col"])[data-variant~="description"] :nth-child(2)) {
101
- color: var(--bs-ink-light);
102
- font-size: var(--bs-text-xs);
103
- height: 1.125rem;
104
- line-height: 1.125rem;
105
- }
106
-
107
- /* data-variant="2-col description" */
108
- /* Description will be the 3rd child in a 2-column item */
109
- .bs-dropdown :where(ul li[data-variant~="2-col"][data-variant~="description"] :nth-child(3)) {
110
- color: var(--bs-ink-light);
111
- font-size: var(--bs-text-xs);
112
- grid-column-start: 2;
113
- height: 1.125rem;
114
- line-height: 1.125rem;
115
- }
116
-
117
- /* List item hover or data-selected */
118
- .bs-dropdown :where(ul li:hover),
119
- .bs-dropdown :where(ul li[data-selected]) {
120
- background-color: var(--bs-bg-subtle);
121
- border-left: 4px solid var(--bs-blue-400);
122
- color: var(--bs-blue-400);
123
- outline: none;
26
+ /* Sizing */
27
+ .bs-dropdown:where([data-width="sm"]) {
28
+ width: 10rem;
124
29
  }
125
30
 
126
- /* data-variant="search" or data-variant="break" hover */
127
- .bs-dropdown :where(ul li[data-variant~="search"]:hover),
128
- .bs-dropdown :where(ul li[data-variant~="break"]:hover) {
129
- background-color: transparent;
130
- border-left: none;
131
- color: var(--bs-ink-base);
31
+ .bs-dropdown:where([data-width="md"]),
32
+ .bs-dropdown:where(:not([data-width])) {
33
+ width: 20rem;
132
34
  }
133
35
 
134
- /* data-variant="negative" hover, data-selected, and both */
135
- .bs-dropdown :where(ul li[data-variant~="negative"]:hover),
136
- .bs-dropdown :where(ul li[data-variant~="negative"][data-selected]),
137
- .bs-dropdown :where(ul li[data-variant~="negative"][data-selected]:hover) {
138
- /* 25% alpha version of --bs-red-400 */
139
- background-color: rgba(248, 169, 170, 0.25);
140
- border-left: 4px solid var(--bs-red-500);
141
- color: var(--bs-red-500);
36
+ .bs-dropdown:where([data-width="lg"]) {
37
+ width: 40rem;
142
38
  }
143
39
 
144
- /* data-variant="description" or data-variant="2-col description" hover or data-selected */
145
- .bs-dropdown :where(ul li:not([data-variant~="2-col"])[data-variant~="description"]:hover :nth-child(2)),
146
- .bs-dropdown :where(ul li[data-variant~="2-col"][data-variant~="description"]:hover :nth-child(3)),
147
- .bs-dropdown :where(ul li:not([data-variant~="2-col"])[data-variant~="description"][data-selected] :nth-child(2)),
148
- .bs-dropdown :where(ul li[data-variant~="2-col"][data-variant~="description"][data-selected] :nth-child(3)) {
149
- color: var(--bs-blue-400);
40
+ .bs-dropdown:where([data-width="content"]) {
41
+ width: auto;
150
42
  }
151
43
 
152
- /* data-variant="negative description" or data-variant="2-col negative description" hover or data-selected */
153
- .bs-dropdown :where(ul li[data-variant~="negative"]:not([data-variant~="2-col"])[data-variant~="description"]:hover :nth-child(2)),
154
- .bs-dropdown :where(ul li[data-variant~="negative"][data-variant~="2-col"][data-variant~="description"]:hover :nth-child(3)),
155
- .bs-dropdown :where(ul li[data-variant~="negative"]:not([data-variant~="2-col"])[data-variant~="description"][data-selected] :nth-child(2)),
156
- .bs-dropdown :where(ul li[data-variant~="negative"][data-variant~="2-col"][data-variant~="description"][data-selected] :nth-child(3)) {
157
- color: var(--bs-red-500);
44
+ .bs-dropdown-parent:where([data-width="toggle"]) :where(.bs-dropdown) {
45
+ width: 100%;
158
46
  }
159
47
 
160
- /* List option mouse click focus (do not show) */
161
- .bs-dropdown :where(ul li:focus:not(:focus-visible)){
162
- outline: none;
163
- }
164
-
165
- /* data-variant="negative" list option mouse click focus (do not show) */
166
- li[data-variant~="negative"]:focus:not(:focus-visible) {
167
- outline: none;
168
- }
169
-
170
- /* List option keyboard navigation focus */
171
- .bs-dropdown :where(ul li:focus-visible) {
172
- --focus-border-color: var(--bs-blue-400);
173
- border: 2px solid var(--focus-border-color);
174
- outline: none;
175
- padding-left: 0.625rem;
48
+ /* data-shown */
49
+ .bs-dropdown:where([data-shown]) {
50
+ max-height: 20rem;
51
+ opacity: 1;
176
52
  }
177
53
 
178
- /* Navigation focus on a selected element should preserve 4px left border */
179
- .bs-dropdown :where(ul li[data-selected]:focus-visible) {
180
- border-left: 4px solid var(--focus-border-color);
181
- padding-left: 0.5rem;
54
+ /* data-top */
55
+ .bs-dropdown:where([data-top]) {
56
+ bottom: calc(100% + 0.5rem);
57
+ top: auto;
182
58
  }
183
59
 
184
- /* data-variant="negative" list option keyboard navigation focus */
185
- .bs-dropdown :where(ul li[data-variant~="negative"]:focus-visible) {
186
- --focus-border-color: var(--bs-red-200);
60
+ /* data-justify="center" */
61
+ .bs-dropdown-parent:where([data-center]) :where(.bs-dropdown) {
62
+ left: 50%;
63
+ transform: translateX(-50%);
187
64
  }
188
-
189
-
@@ -54,7 +54,7 @@
54
54
  :where(input[type='checkbox'], input[type='radio']):focus-visible {
55
55
  box-shadow: inset 0 0 0 0.125rem var(--box-shadow),
56
56
  0 0 0 2px var(--offset-color, var(--bs-bg-base)),
57
- 0 0 0 4px var(--outline-color, var(--bs-blue-400));
57
+ 0 0 0 4px var(--outline-color, var(--bs-blue-base));
58
58
  outline: 2px solid transparent;
59
59
  }
60
60
 
@@ -69,7 +69,7 @@
69
69
  /* Checkbox's checkmark */
70
70
  input:where([type='checkbox'])::before {
71
71
  --filled-size: 1rem;
72
- --check-fill-color: var(--bs-blue-400);
72
+ --check-fill-color: var(--bs-blue-base);
73
73
 
74
74
  content: '';
75
75
  border-radius: 0.125rem;
@@ -104,7 +104,7 @@ input:where([type='checkbox']):where(:indeterminate)::after {
104
104
  /* Radio's dot */
105
105
  input:where([type='radio'])::before {
106
106
  --filled-size: 1rem;
107
- --radio-fill-color: var(--bs-blue-400);
107
+ --radio-fill-color: var(--bs-blue-base);
108
108
 
109
109
  background-color: var(--radio-fill-color);
110
110
  border-radius: 50%;
@@ -159,24 +159,24 @@ input:where([type='checkbox']:checked, [type='checkbox']:indeterminate, [type='r
159
159
  /* Disabled State */
160
160
 
161
161
  input:where([type='checkbox'], [type='radio']):disabled {
162
- --box-shadow: var(--bs-gray-400);
162
+ --box-shadow: var(--bs-bg-disabled);
163
163
  background-color: transparent;
164
164
  cursor: default;
165
165
  }
166
166
 
167
167
  input:where([type='checkbox']):checked:disabled::before,
168
168
  input:where([type='checkbox']):indeterminate:disabled::before {
169
- --check-fill-color: var(--bs-gray-400);
169
+ --check-fill-color: var(--bs-bg-disabled);
170
170
  }
171
171
 
172
172
  input:where([type='radio']):checked:disabled::before {
173
- --radio-fill-color: var(--bs-gray-400);
173
+ --radio-fill-color: var(--bs-bg-disabled);
174
174
  }
175
175
 
176
176
 
177
177
  /* Error state */
178
178
 
179
179
  input:where([type='checkbox'], [type='radio'])[data-error] {
180
- --box-shadow: var(--bs-red-500);
181
- --outline-color: var(--bs-red-200);
180
+ --box-shadow: var(--bs-red-base);
181
+ --outline-color: var(--bs-red-base);
182
182
  }
@@ -9,9 +9,9 @@
9
9
  :where([disabled], [data-disabled]) + .bs-character-count,
10
10
  :where([disabled], [data-disabled]) .bs-character-count,
11
11
  .bs-character-count:where([data-disabled]) {
12
- color: var(--bs-gray-400);
12
+ color: var(--bs-ink-disabled);
13
13
  }
14
14
 
15
15
  .bs-character-count:where([data-error]) {
16
- color: var(--bs-red-400);
16
+ color: var(--bs-ink-red);
17
17
  }
@@ -1,6 +1,6 @@
1
1
  /* Generally applicable (all input types) */
2
2
  :where([data-required]) {
3
- color: var(--bs-red-500);
3
+ color: var(--bs-ink-red);
4
4
  font-weight: var(--bs-font-bold, 600);
5
5
  }
6
6
 
@@ -9,15 +9,15 @@
9
9
  }
10
10
 
11
11
  :where(.box) :is(input, textarea, select):where(:focus-visible) {
12
- --offset-color: var(--bs-bg-subtle);
12
+ --offset-color: var(--bs-bg-medium);
13
13
  }
14
14
  :where(.box[data-invert]) :is(input, textarea, select):where(:focus-visible) {
15
- --offset-color: var(--bs-bg-invert);
15
+ --offset-color: var(--bs-bg-invert-base);
16
16
  }
17
17
 
18
18
  /* Errors and Messages */
19
19
  :is(input, select, textarea):where([data-error]) {
20
- --input-border: var(--bs-red-500);
20
+ --input-border: var(--bs-ink-red);
21
21
  }
22
22
 
23
23
  /* Fieldset */
@@ -1,6 +1,7 @@
1
1
  .bs-hint {
2
+ --hint-color: var(--bs-ink-light);
2
3
  min-width: 0;
3
- color: var(--bs-ink-light);
4
+ color: var(--hint-color);
4
5
  font-size: var(--bs-text-xs);
5
6
  padding: 0;
6
7
  margin: 0;
@@ -9,5 +10,5 @@
9
10
  }
10
11
 
11
12
  .bs-hint:where([data-error]) {
12
- color: var(--bs-red-400);
13
+ --hint-color: var(--bs-ink-red);
13
14
  }
@@ -127,7 +127,7 @@ and issues with box-sizing
127
127
 
128
128
  /* -------- Focus styles -------- */
129
129
  .bs-input-addon {
130
- --focus-border: var(--bs-blue-400);
130
+ --focus-border: var(--bs-blue-base);
131
131
  }
132
132
 
133
133
  .bs-input-addon:where(:not([data-multifocus]):focus-within),
@@ -10,9 +10,9 @@
10
10
  }
11
11
 
12
12
  :where([data-required]) {
13
- color: var(--bs-red-500);
13
+ color: var(--bs-ink-red);
14
14
  }
15
15
 
16
16
  :where(label[data-disabled], [data-disabled] [data-required], [data-disabled] label) {
17
- --label-color: var(--bs-ink-light);
17
+ --label-color: var(--bs-ink-disabled);
18
18
  }
@@ -45,7 +45,7 @@
45
45
 
46
46
  .bs-switch input:where(:checked) ~ span,
47
47
  .bs-switch:where([aria-pressed]):where(:not([aria-pressed="false"])) span {
48
- --switch-background: var(--bs-blue-400);
48
+ --switch-background: var(--bs-blue-base);
49
49
  }
50
50
 
51
51
  /* Toggle "ball" */
@@ -111,21 +111,21 @@
111
111
 
112
112
  .bs-switch :where(input:focus-visible) + span {
113
113
  box-shadow: 0 0 0 2px var(--offset-color, var(--bs-bg-base)),
114
- 0 0 0 4px var(--outline-color, var(--bs-blue-400));
114
+ 0 0 0 4px var(--outline-color, var(--bs-blue-base));
115
115
  outline: 2px solid transparent;
116
116
  }
117
117
  :where(.box) .bs-switch :where(input:focus-visible) + span {
118
- --offset-color: var(--bs-bg-subtle);
118
+ --offset-color: var(--bs-bg-medium);
119
119
  }
120
120
  :where(.box[data-invert]) .bs-switch :where(input:focus-visible) + span {
121
- --offset-color: var(--bs-bg-invert);
121
+ --offset-color: var(--bs-bg-invert-base);
122
122
  }
123
123
 
124
124
  /* Disabled state */
125
125
 
126
126
  .bs-switch:where([data-disabled]) {
127
- --ball-background: var(--bs-gray-400);
128
- --switch-background: var(--bs-gray-200);
127
+ --ball-background: var(--bs-ink-disabled);
128
+ --switch-background: var(--bs-bg-disabled);
129
129
  }
130
130
 
131
131
  .bs-switch input:where(:disabled) {
@@ -6,13 +6,15 @@
6
6
 
7
7
  input:where(:not([type='checkbox'], [type='radio'], [type='file'], [type='range'])),
8
8
  textarea, select {
9
+ --input-bg: var(--bs-bg-base);
10
+ --input-border: var(--bs-violet-medium);
9
11
  appearance: none;
10
- background-color: var(--input-bg, var(--bs-bg-base));
11
- border-color: var(--input-border, var(--bs-violet-300));
12
+ background-color: var(--input-bg);
13
+ border-color: var(--input-border);
12
14
  border-radius: 0.25rem;
13
15
  border-style: solid;
14
16
  border-width: var(--input-border-width, 1px);
15
- caret-color: var(--bs-blue-400);
17
+ caret-color: var(--bs-blue-base);
16
18
  color: var(--bs-ink-base);
17
19
  font-size: var(--bs-text-base);
18
20
  font-weight: 400;
@@ -35,26 +37,26 @@ textarea {
35
37
  }
36
38
 
37
39
  :is(input, textarea, select)::placeholder {
38
- color: var(--bs-violet-200);
40
+ color: var(--bs-violet-lightest);
39
41
  }
40
42
  :is(input, textarea, select):where(:focus-visible)::placeholder {
41
43
  opacity: 0;
42
44
  }
43
45
 
44
46
  :is(input:where(:not([type='checkbox'], [type='radio'])), textarea, select):where(:focus-visible) {
45
- --input-border: var(--bs-blue-400);
47
+ --input-border: var(--bs-blue-base);
46
48
  outline-width: 0px;
47
49
  }
48
50
 
49
51
  :is(input:where(:not([type='checkbox'],[type='radio'])), textarea, select):where(:disabled) {
50
- --input-border: var(--bs-gray-400);
51
- background-color: var(--bs-gray-200);
52
- color: var(--bs-gray-400);
52
+ --input-border: var(--bs-ink-disabled);
53
+ --input-bg: var(--bs-bg-disabled);
54
+ color: var(--bs-ink-disabled);
53
55
  }
54
56
 
55
57
  /* Errors and Messages */
56
58
  :is(input, select, textarea):where([data-error]) {
57
- --input-border: var(--bs-red-500);
59
+ --input-border: var(--bs-ink-red);
58
60
  }
59
61
 
60
62
  /*
@@ -74,7 +76,7 @@ see https://bugs.chromium.org/p/chromium/issues/detail?id=89530
74
76
 
75
77
  :is(input, textarea, select):disabled::placeholder,
76
78
  :is(input, textarea, select)[disabled]::placeholder {
77
- color: var(--bs-gray-400);
79
+ color: var(--bs-ink-disabled);
78
80
  opacity: 1;
79
81
  }
80
82
 
@@ -0,0 +1,85 @@
1
+ .bs-loader {
2
+ --loader-dot-bg: var(--bs-blue-500); /* possibly add variants if requested */
3
+ --loader-dot-size: .75rem;
4
+ --loader-dot-top: 18px;
5
+ --loader-dot-top: calc(50% - var(--loader-dot-size)/2);
6
+ --loader-dot-translate: 1.75rem; /* i.e., calc(var(--loader-width)/2 - var(--loader-dot-size)/2); */
7
+ --loader-height: 3rem;
8
+ --loader-width: 4rem;
9
+ display: block;
10
+ height: var(--loader-height);
11
+ margin-inline-start: auto;
12
+ margin-inline-end: auto;
13
+ position: relative;
14
+ width: var(--loader-width);
15
+ }
16
+ .bs-loader:where([data-size="sm"]) {
17
+ --loader-dot-size: .5rem;
18
+ --loader-dot-top: 0;
19
+ --loader-dot-translate: 1.125rem;
20
+ --loader-height: .5rem;
21
+ --loader-width: 3rem;
22
+ }
23
+ .bs-loader:where([data-size="lg"]) {
24
+ --loader-dot-size: 1rem;
25
+ --loader-dot-translate: 2.375rem;
26
+ --loader-height: 4rem;
27
+ --loader-width: 6rem;
28
+ }
29
+
30
+ /* ----- loader dots ----- */
31
+ .bs-loader > :where(div) {
32
+ background-color: var(--loader-dot-bg);
33
+ border-radius: 50%;
34
+ height: var(--loader-dot-size);
35
+ position: absolute;
36
+ top: var(--loader-dot-top);
37
+ width: var(--loader-dot-size);
38
+ }
39
+
40
+ .bs-loader > :where(div) {
41
+ animation-timing-function: cubic-bezier(0, 1, 1, 0);
42
+ }
43
+ .bs-loader > :where(div:nth-child(1)) {
44
+ animation: loading-1 0.6s infinite;
45
+ left: 0%;
46
+ }
47
+ .bs-loader > :where(div:nth-child(2)) {
48
+ animation: loading-2 0.6s infinite;
49
+ left: 0%;
50
+ }
51
+ .bs-loader > :where(div:nth-child(3)) {
52
+ animation: loading-2 0.6s infinite;
53
+ left: 40%;
54
+ }
55
+ .bs-loader > :where(div:nth-child(4)) {
56
+ animation: loading-3 0.6s infinite;
57
+ left: 80%;
58
+ }
59
+
60
+ @keyframes loading-1 {
61
+ 0% {
62
+ transform: scale(0);
63
+ }
64
+ 100% {
65
+ transform: scale(1);
66
+ }
67
+ }
68
+
69
+ @keyframes loading-2 {
70
+ 0% {
71
+ transform: translate(0, 0);
72
+ }
73
+ 100% {
74
+ transform: translate(var(--loader-dot-translate), 0);
75
+ }
76
+ }
77
+
78
+ @keyframes loading-3 {
79
+ 0% {
80
+ transform: scale(1);
81
+ }
82
+ 100% {
83
+ transform: scale(0);
84
+ }
85
+ }
@@ -0,0 +1,32 @@
1
+ .bs-modal {
2
+ background-color: var(--bs-bg-base-elevated);
3
+ border-radius: 4px;
4
+ box-shadow: var(--bs-shadow-contentHigh);
5
+ left: 1.5rem;
6
+ max-height: calc(100% - 3rem);
7
+ opacity: 0;
8
+ overflow: auto;
9
+ padding: 1.5rem;
10
+ position: fixed;
11
+ right: 1.5rem;
12
+ top: 50%;
13
+ transform: translateY(-50%);
14
+ transition-duration: 75ms;
15
+ transition-property: opacity;
16
+ transition-timing-function: ease-in-out;
17
+ z-index: 9999;
18
+ }
19
+
20
+ .bs-modal:where([data-shown]) {
21
+ opacity: 1;
22
+ }
23
+
24
+ @media (min-width: 752px) {
25
+ .bs-modal {
26
+ left: 50%;
27
+ margin: 0;
28
+ max-height: 40.625rem;
29
+ transform: translate(-50%, -50%);
30
+ width: 35rem;
31
+ }
32
+ }