@wwtdev/bsds-css 2.5.2 → 2.6.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.
@@ -1,23 +1,48 @@
1
- .bs-circle-button {
2
- --btn-main: var(--bs-blue-base);
3
- --btn-secondary: var(--bs-blue-medium);
4
- --btn-highlight: var(--bs-blue-lightest);
1
+ /*
2
+ Properties : Defaults // Description
3
+ ====================================
4
+ --btn-icon-bg-color: var(--btn-main); // icon bg color (base state)
5
+ --btn-icon-padding: .75rem; // padding around icon svg
6
+ --btn-icon-size: 1.5rem; // svg width and height
7
+ --btn-icon-stroke-color: var(--bs-white);
8
+ --btn-main: var(--bs-blue-base); // many things... should probably break this up
9
+ --btn-text-color: var(--bs-ink-base);
10
+ --btn-text-size: var(--bs-text-md);
11
+
12
+ --btn-border-color: transparent; // focus state outline color - transparent base state, --btn-main base focus state
13
+ --btn-border-color-focused: var(--btn-main); // focus state ring color set on variants
14
+ --btn-secondary: var(--bs-blue-medium); // hover state icon bg
15
+ --btn-shadow-color-active: var(--btn-main); // active state shadow color (icon bg)
16
+ --btn-text-color-hovered: var(--bs-ink-base); // hover state text color
17
+ */
18
+
19
+ :where(.bs-circle-button) {
20
+ --btn-border-color-focused: var(--btn-main);
5
21
  --btn-border-color: transparent;
6
- --btn-border-radius: 50%;
22
+ --btn-focus-inset: -0.25rem;
23
+ --btn-gap: .5rem;
7
24
  --btn-icon-bg-color: var(--btn-main);
8
25
  --btn-icon-padding: .75rem;
9
26
  --btn-icon-size: 1.5rem;
10
27
  --btn-icon-stroke-color: var(--bs-white);
28
+ --btn-main: var(--bs-blue-base);
29
+ --btn-secondary: var(--bs-blue-medium);
30
+ --btn-shadow-color-active: var(--btn-main);
31
+ --btn-text-color-hovered: var(--bs-ink-base);
11
32
  --btn-text-color: var(--bs-ink-base);
12
- --btn-text-size: var(--bs-text-md);
33
+ --btn-text-size: 1.125rem;
34
+ --btn-text-weight: 400;
35
+ }
36
+
37
+ .bs-circle-button {
13
38
  align-items: center;
14
39
  background-color: transparent;
15
- border-radius: var(--btn-border-radius);
16
40
  color: var(--btn-text-color);
17
41
  cursor: pointer;
18
42
  display: inline-flex;
19
43
  font-size: var(--btn-text-size);
20
- gap: .5rem;
44
+ font-weight: var(--btn-text-weight);
45
+ gap: var(--btn-gap);
21
46
  outline: none;
22
47
  position: relative;
23
48
  vertical-align: middle;
@@ -30,18 +55,6 @@ a.bs-circle-button {
30
55
  text-decoration: none;
31
56
  }
32
57
 
33
- .bs-circle-button :where(.bs-circle-button-icon)::before {
34
- border-color: var(--btn-border-color);
35
- border-radius: var(--btn-border-radius);
36
- border-style: solid;
37
- border-width: 0.125rem;
38
- height: calc(100% + 0.5rem);
39
- inset: -0.25rem;
40
- position: absolute;
41
- transition: border-color 125ms ease-in-out, transform 100ms ease-in-out;
42
- width: calc(100% + 0.5rem);
43
- }
44
-
45
58
  .bs-circle-button :where(.bs-circle-button-icon) {
46
59
  align-items: center;
47
60
  background-color: var(--btn-icon-bg-color);
@@ -56,6 +69,17 @@ a.bs-circle-button {
56
69
  transition: all 100ms ease-in-out;
57
70
  }
58
71
 
72
+ .bs-circle-button :where(.bs-circle-button-icon)::before {
73
+ border-color: var(--btn-border-color);
74
+ border-radius: 50%;
75
+ border-style: solid;
76
+ border-width: 0.125rem;
77
+ content: '';
78
+ inset: var(--btn-focus-inset);
79
+ position: absolute;
80
+ transition: border-color 125ms ease-in-out, transform 100ms ease-in-out;
81
+ }
82
+
59
83
  .bs-circle-button :where(.bs-circle-button-icon) :where(.bs-icon) {
60
84
  --icon-size: var(--btn-icon-size);
61
85
  }
@@ -75,27 +99,21 @@ a.bs-circle-button {
75
99
 
76
100
  /* Ghost Buttons */
77
101
  .bs-circle-button:where([data-ghost]:not([data-ghost="false"])) {
102
+ --btn-icon-bg-color: transparent;
78
103
  --btn-icon-stroke-color: var(--btn-main);
79
104
  --btn-light: var(--bs-blue-10);
80
105
  --btn-secondary: var(--bs-blue-10);
81
106
  }
82
- .bs-circle-button:where([data-ghost]:not([data-ghost="false"])) :where(.bs-circle-button-icon) {
83
- background-color: transparent;
84
- box-shadow: inset 0 0 0 1px transparent;
85
- color: var(--btn-icon-stroke-color);
86
- }
87
- .bs-circle-button:where([data-ghost]:not([data-ghost="false"])) :where(.bs-circle-button-icon)::before {
88
- border-radius: 50%;
89
- }
90
107
 
91
108
  /* Active, Hover, Focus states */
92
109
  .bs-circle-button:active, .bs-circle-button:hover {
93
110
  --btn-icon-bg-color: var(--btn-secondary);
111
+ --btn-text-color: var(--btn-text-color-hovered);
94
112
  }
95
113
  .bs-circle-button:active :where(.bs-circle-button-icon) {
96
- transform: scale(0.97);
114
+ box-shadow: inset 0px 0px 4px 1px var(--btn-shadow-color-active);
97
115
  transform-origin: center;
98
- box-shadow: inset 0px 0px 4px 1px var(--btn-main);
116
+ transform: scale(0.97);
99
117
  }
100
118
 
101
119
  .bs-circle-button:where([data-direction="right"]):hover :where(.bs-circle-button-icon),
@@ -107,22 +125,12 @@ a.bs-circle-button {
107
125
  transform: translateX(-.25rem);
108
126
  }
109
127
 
110
- .bs-circle-button:where([data-ghost]:not([data-ghost="false"])):hover :where(.bs-circle-button-icon) {
111
- background-color: var(--btn-light);
112
- }
113
-
114
- .bs-circle-button:where([data-ghost]:not([data-ghost="false"])):active {
115
- box-shadow:
116
- inset 0 0 0 1px var(--btn-main),
117
- inset 0px 0px 4px 1px var(--btn-highlight);
128
+ .bs-circle-button:where([data-ghost]:not([data-ghost="false"])):hover {
129
+ --btn-icon-bg-color: var(--btn-light);
118
130
  }
119
131
 
120
132
  .bs-circle-button:where(:focus-visible) {
121
- --btn-border-color: var(--btn-main);
122
- }
123
-
124
- .bs-circle-button:where(:focus-visible) :where(.bs-circle-button-icon)::before {
125
- content: '';
133
+ --btn-border-color: var(--btn-border-color-focused);
126
134
  }
127
135
 
128
136
  /* Disabled State */
@@ -131,26 +139,77 @@ a.bs-circle-button {
131
139
  --btn-text-color: var(--bs-ink-disabled);
132
140
  pointer-events: none;
133
141
  }
134
- .bs-circle-button:where(:disabled, [aria-disabled]:not([aria-disabled="false"])) :where(.bs-circle-button-icon) {
135
- background-color: var(--bs-bg-disabled);
142
+ .bs-circle-button:where(:disabled, [aria-disabled]:not([aria-disabled="false"])) {
143
+ --btn-icon-bg-color: var(--bs-bg-disabled);
136
144
  }
137
145
 
138
-
139
146
  /* Button Size */
140
147
  .bs-circle-button:where([data-size^='sm']) {
141
148
  --btn-icon-padding: .375rem;
142
149
  --btn-icon-size: .75rem;
143
- --btn-text-size: var(--bs-text-sm);
150
+ --btn-text-size: .875rem;
144
151
  }
145
152
 
146
153
  .bs-circle-button:where([data-size^='sm'][data-text]:not([data-text="false"])) {
147
154
  --btn-icon-padding: .3125rem;
148
155
  --btn-icon-size: .625rem;
149
- --btn-text-size: var(--bs-text-base);
156
+ --btn-text-size: 1rem;
150
157
  }
151
158
 
152
159
  .bs-circle-button:where([data-size='xs'][data-text]:not([data-text="false"])) {
153
160
  --btn-icon-padding: .25rem;
154
161
  --btn-icon-size: .5rem;
155
- --btn-text-size: var(--bs-text-sm);
162
+ --btn-text-size: .875rem;
163
+ }
164
+
165
+ /* Color Variants */
166
+ .bs-circle-button:where([data-variant^="color"]) {
167
+ --btn-focus-inset: .125rem;
168
+ --btn-gap: 0;
169
+ --btn-icon-bg-color: transparent;
170
+ --btn-icon-padding: .5rem;
171
+ --btn-icon-size: .75rem; /* stays the same for all sizes */
172
+ --btn-icon-stroke-color: var(--btn-text-color);
173
+ --btn-secondary: transparent;
174
+ --btn-shadow-color-active: transparent;
175
+ }
176
+ .bs-circle-button:where([data-variant="color-blue"]) {
177
+ --btn-border-color-focused: var(--bs-ink-blue);
178
+ --btn-text-color: var(--bs-ink-blue);
179
+ --btn-text-color-hovered: var(--bs-blue-base);
180
+ }
181
+
182
+ .bs-circle-button:where([data-variant="color-royal"]) {
183
+ --btn-border-color-focused: var(--bs-ink-royal);
184
+ --btn-text-color: var(--bs-ink-royal);
185
+ --btn-text-color-hovered: var(--bs-royal-medium);
186
+ }
187
+
188
+ .bs-circle-button:where([data-variant="color-purple"]) {
189
+ --btn-border-color-focused: var(--bs-purple-400);
190
+ --btn-text-color: var(--bs-ink-purple);
191
+ --btn-text-color-hovered: var(--bs-purple-medium);
192
+ }
193
+
194
+ .bs-circle-button:where([data-variant="color-pink"]) {
195
+ --btn-border-color-focused: var(--bs-pink-400);
196
+ --btn-text-color: var(--bs-ink-pink);
197
+ --btn-text-color-hovered: var(--bs-pink-base);
198
+ }
199
+
200
+ .bs-circle-button:where([data-variant="color-red"]) {
201
+ --btn-border-color-focused: var(--bs-ink-red);
202
+ --btn-text-color: var(--bs-ink-red);
203
+ --btn-text-color-hovered: var(--bs-red-base);
204
+ }
205
+
206
+ .bs-circle-button:where([data-variant^="color"]):where(:disabled, [aria-disabled]:not([aria-disabled="false"])) {
207
+ --btn-icon-bg-color: transparent;
208
+ --btn-text-color: var(--bs-ink-disabled);
209
+ }
210
+
211
+ /* size XXS only supported for color variants */
212
+ .bs-circle-button:where([data-variant^="color"]):where([data-size='xxs'][data-text]:not([data-text="false"])) {
213
+ --btn-text-size: .75rem;
214
+ --btn-text-weight: 600;
156
215
  }
@@ -10,25 +10,32 @@ custom properties:
10
10
  */
11
11
 
12
12
  button:where(.bs-filter-button) {
13
+ --filterbtn-caret-size: 1rem;
14
+ --filterbtn-caret-transform: rotate(0deg);
15
+ --filterbtn-color: var(--bs-ink-blue);
16
+ --filterbtn-focus-color: transparent;
17
+ --filterbtn-height: 1.5rem;
18
+ --filterbtn-text-size: var(--bs-text-base);
19
+ --filterbtn-weight: 400;
13
20
  flex-shrink: 0;
14
21
  position: relative;
15
22
  }
16
23
 
17
24
  .bs-filter-button {
18
25
  align-items: center;
19
- color: var(--filterbtn-color, var(--bs-ink-blue));
26
+ color: var(--filterbtn-color);
20
27
  column-gap: 0.5rem;
21
28
  cursor: pointer;
22
29
  display: inline-flex;
23
- font-size: var(--filterbtn-text-size, var(--bs-text-base));
24
- font-weight: var(--filterbtn-weight, 400);
25
- height: var(--filterbtn-height, 1.5rem);
30
+ font-size: var(--filterbtn-text-size);
31
+ font-weight: var(--filterbtn-weight);
32
+ height: var(--filterbtn-height);
26
33
  line-height: 1.5;
27
34
  transition: outline-color 100ms ease-in-out;
28
35
  width: max-content;
29
36
  }
30
37
  .bs-filter-button::after {
31
- border: solid var(--filterbtn-focus-color, transparent) 2px;
38
+ border: solid var(--filterbtn-focus-color) 2px;
32
39
  border-radius: 0.25rem;
33
40
  content: '';
34
41
  display: block;
@@ -41,12 +48,12 @@ button:where(.bs-filter-button) {
41
48
  .bs-filter-button :where(.bs-icon),
42
49
  .bs-filter-button :where(span:has(svg:only-child)) {
43
50
  display: block;
44
- height: var(--filterbtn-caret-size, 1rem);
51
+ height: var(--filterbtn-caret-size);
45
52
  line-height: 1;
46
- transform: var(--filterbtn-caret-transform, rotate(0deg));
53
+ transform: var(--filterbtn-caret-transform);
47
54
  transform-origin: center;
48
55
  transition: var(--bs-trans-rotate180);
49
- width: var(--filterbtn-caret-size, 1rem);
56
+ width: var(--filterbtn-caret-size);
50
57
  }
51
58
 
52
59
  .bs-filter-button:where([data-size="sm"],[data-size="xs"]) {
@@ -16,6 +16,7 @@ module.exports = {
16
16
  inherit: 'inherit',
17
17
  current: 'currentColor',
18
18
  white: "#FFFFFF",
19
+ "white-10": "rgba(255, 255, 255, 0.1)",
19
20
  black: "#0A0B19",
20
21
  blue: {
21
22
  10: "rgba(0, 134, 234, 0.1)",
@@ -41,6 +42,7 @@ module.exports = {
41
42
  400: "#1C0087"
42
43
  },
43
44
  royal: {
45
+ 10: "rgba(22, 47, 180, 0.1)",
44
46
  100: "#C5CCEB",
45
47
  200: "#7585D1",
46
48
  300: "#5365C4",
@@ -69,6 +71,7 @@ module.exports = {
69
71
  500: "#C33D04"
70
72
  },
71
73
  pink: {
74
+ 10: "rgba(227, 28, 121, 0.1)",
72
75
  100: "#F6CBE0",
73
76
  200: "#EB7EAF",
74
77
  300: "#E45E9B",
@@ -6,6 +6,7 @@
6
6
  --bs-inherit: inherit;
7
7
  --bs-current: currentColor;
8
8
  --bs-white: #ffffff;
9
+ --bs-white-10: rgba(255, 255, 255, 0.1);
9
10
  --bs-black: #0a0b19;
10
11
  --bs-blue-10: rgba(0, 134, 234, 0.1);
11
12
  --bs-blue-100: #99cff7;
@@ -24,6 +25,7 @@
24
25
  --bs-plum-200: #7766b7;
25
26
  --bs-plum-300: #49339f;
26
27
  --bs-plum-400: #1c0087;
28
+ --bs-royal-10: rgba(22, 47, 180, 0.1);
27
29
  --bs-royal-100: #c5cceb;
28
30
  --bs-royal-200: #7585d1;
29
31
  --bs-royal-300: #5365c4;
@@ -44,6 +46,7 @@
44
46
  --bs-orange-300: #f97c4c;
45
47
  --bs-orange-400: #fb550e;
46
48
  --bs-orange-500: #c33d04;
49
+ --bs-pink-10: rgba(227, 28, 121, 0.1);
47
50
  --bs-pink-100: #f6cbe0;
48
51
  --bs-pink-200: #eb7eaf;
49
52
  --bs-pink-300: #e45e9b;