@wwtdev/bsds-css 2.1.5 → 2.3.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.
@@ -37,8 +37,15 @@
37
37
  grid-template-columns: min-content 1fr;
38
38
  }
39
39
 
40
+ /* Variant: 3-col */
41
+ .bs-dropdown-options :where(li[data-variant~="3-col"]) {
42
+ grid-template-columns: min-content min-content 1fr;
43
+ }
44
+
40
45
  /* Variant: description */
41
- .bs-dropdown-options :where(li:not([data-variant~="2-col"])[data-variant~="description"] > :nth-child(2)) {
46
+ .bs-dropdown-options :where(li:not([data-variant*="-col"])[data-variant~="description"] > :nth-child(2)),
47
+ .bs-dropdown-options :where(li[data-variant~="2-col"][data-variant~="description"] > :nth-child(3)),
48
+ .bs-dropdown-options :where(li[data-variant~="3-col"][data-variant~="description"] > :nth-child(4)) {
42
49
  color: var(--bs-ink-light);
43
50
  font-size: var(--bs-text-xs);
44
51
  min-height: 1.125rem;
@@ -47,11 +54,12 @@
47
54
 
48
55
  /* Variant: 2-col description */
49
56
  .bs-dropdown-options :where(li[data-variant~="2-col"][data-variant~="description"] > :nth-child(3)) {
50
- color: var(--bs-ink-light);
51
- font-size: var(--bs-text-xs);
52
57
  grid-column-start: 2;
53
- min-height: 1.125rem;
54
- line-height: 1.125rem;
58
+ }
59
+
60
+ /* Variant: 3-col description */
61
+ .bs-dropdown-options :where(li[data-variant~="3-col"][data-variant~="description"] > :nth-child(4)) {
62
+ grid-column-start: 3;
55
63
  }
56
64
 
57
65
  /* Hover or data-selected */
@@ -73,19 +81,23 @@
73
81
  color: var(--bs-red-500);
74
82
  }
75
83
 
76
- /* Hover or data-selected for 2-col/description variants */
77
- .bs-dropdown-options :where(li:not([data-variant~="2-col"])[data-variant~="description"]:hover > :nth-child(2)),
84
+ /* Hover or data-selected for 2-col/3-col/description variants */
85
+ .bs-dropdown-options :where(li:not([data-variant*="-col"])[data-variant~="description"]:hover > :nth-child(2)),
78
86
  .bs-dropdown-options :where(li[data-variant~="2-col"][data-variant~="description"]:hover > :nth-child(3)),
79
- .bs-dropdown-options :where(li:not([data-variant~="2-col"])[data-variant~="description"][data-selected] > :nth-child(2)),
80
- .bs-dropdown-options :where(li[data-variant~="2-col"][data-variant~="description"][data-selected] > :nth-child(3)) {
87
+ .bs-dropdown-options :where(li[data-variant~="3-col"][data-variant~="description"]:hover > :nth-child(4)),
88
+ .bs-dropdown-options :where(li:not([data-variant*="-col"])[data-variant~="description"][data-selected] > :nth-child(2)),
89
+ .bs-dropdown-options :where(li[data-variant~="2-col"][data-variant~="description"][data-selected] > :nth-child(3)),
90
+ .bs-dropdown-options :where(li[data-variant~="3-col"][data-variant~="description"][data-selected] > :nth-child(4)) {
81
91
  color: var(--bs-blue-base);
82
92
  }
83
93
 
84
- /* Hover or data-selected for negative + 2-col/description variants */
85
- .bs-dropdown-options :where(li[data-variant~="negative"]:not([data-variant~="2-col"])[data-variant~="description"]:hover > :nth-child(2)),
94
+ /* Hover or data-selected for negative + 2-col/3-col/description variants */
95
+ .bs-dropdown-options :where(li[data-variant~="negative"]:not([data-variant*="-col"])[data-variant~="description"]:hover > :nth-child(2)),
86
96
  .bs-dropdown-options :where(li[data-variant~="negative"][data-variant~="2-col"][data-variant~="description"]:hover > :nth-child(3)),
87
- .bs-dropdown-options :where(li[data-variant~="negative"]:not([data-variant~="2-col"])[data-variant~="description"][data-selected] > :nth-child(2)),
88
- .bs-dropdown-options :where(li[data-variant~="negative"][data-variant~="2-col"][data-variant~="description"][data-selected] > :nth-child(3)) {
97
+ .bs-dropdown-options :where(li[data-variant~="negative"][data-variant~="3-col"][data-variant~="description"]:hover > :nth-child(4)),
98
+ .bs-dropdown-options :where(li[data-variant~="negative"]:not([data-variant*="-col"])[data-variant~="description"][data-selected] > :nth-child(2)),
99
+ .bs-dropdown-options :where(li[data-variant~="negative"][data-variant~="2-col"][data-variant~="description"][data-selected] > :nth-child(3)),
100
+ .bs-dropdown-options :where(li[data-variant~="negative"][data-variant~="3-col"][data-variant~="description"][data-selected] > :nth-child(4)) {
89
101
  color: var(--bs-red-500);
90
102
  }
91
103
 
@@ -125,6 +137,7 @@
125
137
  padding-right: 1.375rem;
126
138
  }
127
139
 
140
+ /* Multi-select divider line */
128
141
  .bs-dropdown-options :where(hr) {
129
142
  background-color: var(--bs-navy-light);
130
143
  height: .0625rem;
@@ -132,6 +145,53 @@
132
145
  margin-inline: 0;
133
146
  }
134
147
 
148
+ /* Disable hover styles */
149
+ .bs-dropdown-options :where(li[data-no-hover]:hover) {
150
+ background-color: transparent;
151
+ border-left-color: transparent;
152
+ color: var(--bs-ink-base);
153
+ cursor: default;
154
+ }
155
+
156
+ /* Style label to look like other options */
157
+ .bs-dropdown-options :where(li label) {
158
+ cursor: pointer;
159
+ font-size: 1rem;
160
+ font-weight: 400;
161
+ }
162
+
163
+ /* Don't change option color when checkbox is present */
164
+ .bs-dropdown-options :where(li[data-variant~="checkbox"]):hover,
165
+ .bs-dropdown-options :where(li[data-variant~="checkbox"][data-selected]) {
166
+ color: var(--bs-ink-base);
167
+ }
168
+
169
+ /* Don't change description color when checkbox is present */
170
+ .bs-dropdown-options :where(li[data-variant~="checkbox"][data-variant~="2-col"][data-variant~="description"]):hover > :nth-child(3),
171
+ .bs-dropdown-options :where(li[data-variant~="checkbox"][data-variant~="2-col"][data-variant~="description"][data-selected]) > :nth-child(3),
172
+ .bs-dropdown-options :where(li[data-variant~="checkbox"][data-variant~="3-col"][data-variant~="description"]):hover > :nth-child(4),
173
+ .bs-dropdown-options :where(li[data-variant~="checkbox"][data-variant~="3-col"][data-variant~="description"][data-selected]) > :nth-child(4) {
174
+ color: var(--bs-ink-light);
175
+ }
176
+
177
+ /* Overrides mobile style when not min-width 752 */
178
+ .bs-dropdown:where([data-no-mobile="true"]) :where(.bs-dropdown-options) :where(li) {
179
+ padding-left: 0.5rem;
180
+ padding-right: 0.75rem;
181
+ }
182
+
183
+ .bs-dropdown:where([data-no-mobile="true"]) :where(.bs-dropdown-options) :where(li[role="separator"]) {
184
+ padding-right: 0.625rem;
185
+ }
186
+
187
+ .bs-dropdown:where([data-no-mobile="true"]) :where(.bs-dropdown-options) :where(li:focus-visible) {
188
+ padding-left: 0.625rem;
189
+ }
190
+
191
+ .bs-dropdown:where([data-no-mobile="true"]) :where(.bs-dropdown-options) :where(li[data-selected]:focus-visible) {
192
+ padding-left: 0.5rem;
193
+ }
194
+
135
195
  @media (min-width: 752px) {
136
196
  .bs-dropdown-options :where(li) {
137
197
  padding-left: 0.5rem;
@@ -19,13 +19,15 @@
19
19
  z-index: 998;
20
20
  }
21
21
 
22
- /* Content (mobile version and general styles) */
22
+ /* Content */
23
23
  .bs-dropdown {
24
24
  --dropdown-bottom: 0;
25
25
  --dropdown-left: 0;
26
26
  --dropdown-right: auto;
27
27
  --dropdown-top: auto;
28
28
  --dropdown-width: 100%;
29
+ --dropdown-transform: translate(0, 100%);
30
+
29
31
  background-color: var(--bs-bg-base-elevated);
30
32
  border-radius: 4px;
31
33
  bottom: var(--dropdown-bottom);
@@ -39,16 +41,15 @@
39
41
  right: var(--dropdown-right);
40
42
  top: var(--dropdown-top);
41
43
  transform-origin: center bottom;
42
- transform: translateY(100%);
44
+ transform: var(--dropdown-transform);
43
45
  transition-duration: 75ms;
44
46
  transition-property: opacity, transform;
45
47
  transition-timing-function: ease-in-out;
46
48
  width: var(--dropdown-width);
47
- z-index: -1;
49
+ z-index: 999;
48
50
  }
49
51
 
50
- /* mobile header */
51
- /* TODO: h3 may not be the right tag to use here... label, possibly? */
52
+ /* Mobile Header */
52
53
  .bs-dropdown > :where(header) {
53
54
  border-bottom: 1px solid var(--bs-border-base);
54
55
  display: flex;
@@ -70,26 +71,61 @@
70
71
  width: 1rem;
71
72
  }
72
73
 
73
- /* mobile search input */
74
- .bs-dropdown :where(.bs-dropdown-search) {
75
- padding: 1.5rem 1.5rem 0 1.5rem;
74
+ /* data-shown */
75
+ .bs-dropdown:where([data-shown]:not([data-shown="false"])) {
76
+ --dropdown-transform: translate(0, 0);
77
+ opacity: 1;
76
78
  }
77
79
 
78
- .bs-dropdown :where(.bs-dropdown-search bs-input-search) {
79
- margin-bottom: 1rem;
80
- margin-left: -0.75rem;
81
- width: calc(100% + 1.5rem);
80
+ /* Sizing */
81
+ .bs-dropdown:where([data-width="sm"]) {
82
+ --dropdown-wscreen-width: 10rem;
82
83
  }
83
84
 
84
- .bs-dropdown:where([data-search]:not([data-search="false"])) :where(.bs-dropdown-options) {
85
- --options-height-max: 11.5rem;
85
+ .bs-dropdown:where([data-width="md"]),
86
+ .bs-dropdown:where(:not([data-width])) {
87
+ --dropdown-wscreen-width: 20rem;
86
88
  }
87
89
 
88
- /* data-shown */
89
- .bs-dropdown:where([data-shown]:not([data-shown="false"])) {
90
- opacity: 1;
91
- transform: translateY(0);
92
- z-index: 999;
90
+ .bs-dropdown:where([data-width="lg"]) {
91
+ --dropdown-wscreen-width: 40rem;
92
+ }
93
+
94
+ .bs-dropdown:where([data-width="content"]) {
95
+ --dropdown-wscreen-width: auto;
96
+ }
97
+
98
+ .bs-dropdown-parent:where([data-width="toggle"]) :where(.bs-dropdown),
99
+ .bs-dropdown-parent:where([data-width="anchor"]) :where(.bs-dropdown) {
100
+ --dropdown-wscreen-width: 100%;
101
+ }
102
+
103
+ /* data-top */
104
+ .bs-dropdown:where([data-top]:not([data-top="false"])) {
105
+ --dropdown-wscreen-bottom: calc(100% + 0.5rem);
106
+ --dropdown-wscreen-top: auto;
107
+ }
108
+
109
+ /* data-center */
110
+ .bs-dropdown-parent:where([data-center]:not([data-center="false"])) :where(.bs-dropdown) {
111
+ --dropdown-transform: translate(-50%, 0);
112
+ --dropdown-wscreen-left: 50%;
113
+ }
114
+
115
+ /* Overrides mobile style when not min-width 752 */
116
+ .bs-dropdown:where([data-no-mobile="true"]) {
117
+ --dropdown-bottom: var(--dropdown-wscreen-bottom, auto);
118
+ --dropdown-left: var(--dropdown-wscreen-left, initial);
119
+ --dropdown-right: var(--dropdown-wscreen-right, initial);
120
+ --dropdown-top: var(--dropdown-wscreen-top, calc(100% + 0.5rem));
121
+ --dropdown-width: var(--dropdown-wscreen-width, initial);
122
+ --dropdown-transform: initial;
123
+
124
+ position: absolute;
125
+ }
126
+
127
+ .bs-dropdown:where([data-no-mobile="true"]) > :where(header) {
128
+ display: none;
93
129
  }
94
130
 
95
131
  @media (min-width: 752px) {
@@ -103,64 +139,16 @@
103
139
  --dropdown-right: var(--dropdown-wscreen-right, initial);
104
140
  --dropdown-top: var(--dropdown-wscreen-top, calc(100% + 0.5rem));
105
141
  --dropdown-width: var(--dropdown-wscreen-width, initial);
142
+ --dropdown-transform: initial;
143
+
106
144
  position: absolute;
107
- transform: initial;
108
145
  }
109
146
 
110
147
  /* Hide the header */
111
148
  .bs-dropdown > :where(header) {
112
149
  display: none;
113
150
  }
114
-
115
- /* Sizing */
116
- .bs-dropdown:where([data-width="sm"]) {
117
- --dropdown-wscreen-width: 10rem;
118
- }
119
-
120
- .bs-dropdown:where([data-width="md"]),
121
- .bs-dropdown:where(:not([data-width])) {
122
- --dropdown-wscreen-width: 20rem;
123
- }
124
-
125
- .bs-dropdown:where([data-width="lg"]) {
126
- --dropdown-wscreen-width: 40rem;
127
- }
128
-
129
- .bs-dropdown:where([data-width="content"]) {
130
- --dropdown-wscreen-width: auto;
131
- }
132
-
133
- .bs-dropdown-parent:where([data-width="toggle"]) :where(.bs-dropdown) {
134
- --dropdown-wscreen-width: 100%;
135
- }
136
-
137
- /* data-shown */
138
- .bs-dropdown:where([data-shown]:not([data-shown="false"])) {
139
- opacity: 1;
140
- }
141
-
142
- /* data-top */
143
- .bs-dropdown:where([data-top]:not([data-top="false"])) {
144
- --dropdown-wscreen-bottom: calc(100% + 0.5rem);
145
- --dropdown-wscreen-top: auto;
146
- }
147
-
148
- /* data-justify="center" */
149
- .bs-dropdown-parent:where([data-center]:not([data-center="false"])) :where(.bs-dropdown) {
150
- --dropdown-wscreen-left: 50%;
151
- transform: translateX(-50%);
152
- }
153
-
154
- .bs-dropdown :where(.bs-dropdown-options) {
155
- --options-height-max: 20rem;
156
- }
157
- .bs-dropdown:where([data-search]:not([data-search="false"])) :where(.bs-dropdown-options) {
158
- --options-height-max: 17.25rem;
159
- }
160
151
  }
161
152
 
162
-
163
-
164
-
165
153
  }
166
154
 
@@ -100,8 +100,8 @@ and issues with box-sizing
100
100
 
101
101
  /* -------- Inner-bordered styles -------- */
102
102
  /** Inner borders should be straight; shown only if variant: "inner-bordered" */
103
- .bs-input-addon:where([data-variant="inner-bordered"]),
104
- .bs-input-addon:where([data-variant="inner-bordered"]) :where(.bs-input-addon) {
103
+
104
+ .bs-input-addon:where([data-variant="inner-bordered"]) {
105
105
  --input-addon-nested-border: var(--bs-violet-lightest);
106
106
  }
107
107
 
@@ -165,7 +165,7 @@ and issues with box-sizing
165
165
  z-index: 1;
166
166
  }
167
167
 
168
- .bs-input-addon:where([data-multifocus]:not([data-multifocus="false"])) > :where(:not(.bs-input-addon)) > :where(input:focus, select:focus, button:focus),
168
+ .bs-input-addon:where([data-multifocus]:not([data-multifocus="false"])) > :where(:not(.bs-input-addon)) > :is(input, select, button):where(:focus),
169
169
  .bs-input-addon:where([data-multifocus]:not([data-multifocus="false"])) > :is(input, select):where(.bs-input, .bs-select):where(:focus),
170
170
  .bs-input-addon:where([data-multifocus]:not([data-multifocus="false"])) > :is(bs-input, bs-select) :where(input:focus, select:focus),
171
171
  .bs-input-addon:where([data-multifocus]:not([data-multifocus="false"])) > :where(input:focus, select:focus, button:focus) {
@@ -199,6 +199,7 @@ and issues with box-sizing
199
199
  .bs-input-addon:where([data-disabled]:not([data-disabled="false"])) .bs-button {
200
200
  --input-bg: var(--bs-bg-disabled);
201
201
  --input-border: var(--bs-ink-disabled);
202
+ --input-addon-nested-border: var(--bs-ink-disabled);
202
203
  color: var(--bs-ink-disabled);
203
204
  }
204
205
  .bs-input-addon:where([data-disabled]:not([data-disabled="false"])) * {
@@ -0,0 +1,16 @@
1
+ @mixin form-input-phone() {
2
+ .bs-input-phone :where(.bs-input-addon) > button {
3
+ align-items: center;
4
+ column-gap: .5rem;
5
+ cursor: pointer;
6
+ display: grid;
7
+ grid-template-columns: 1.25rem auto .75rem;
8
+ min-width: 6rem;
9
+ padding: 0 1rem;
10
+ }
11
+ .bs-input-phone ul:where(.bs-dropdown-options) {
12
+ min-width: 7.5rem;
13
+ }
14
+
15
+ }
16
+
@@ -52,6 +52,5 @@
52
52
  width: 35rem;
53
53
  }
54
54
  }
55
-
56
55
  }
57
56
 
@@ -40,13 +40,14 @@
40
40
  }
41
41
  /* Initials */
42
42
  .bs-profile-img:where([data-no-img]:not([data-no-img="false"]))::after {
43
+ align-items: center;
43
44
  border: 1px solid currentColor;
44
45
  color: var(--bs-blue-500);
45
46
  content: attr(data-initials);
47
+ display: flex;
46
48
  font-size: var(--profile-text);
49
+ justify-content: center;
47
50
  text-transform: uppercase;
48
- display: grid;
49
- place-items: center;
50
51
  }
51
52
 
52
53
  /* Profile Sizes */
@@ -36,8 +36,15 @@
36
36
  grid-template-columns: min-content 1fr;
37
37
  }
38
38
 
39
+ /* Variant: 3-col */
40
+ .bs-dropdown-options :where(li[data-variant~="3-col"]) {
41
+ grid-template-columns: min-content min-content 1fr;
42
+ }
43
+
39
44
  /* Variant: description */
40
- .bs-dropdown-options :where(li:not([data-variant~="2-col"])[data-variant~="description"] > :nth-child(2)) {
45
+ .bs-dropdown-options :where(li:not([data-variant*="-col"])[data-variant~="description"] > :nth-child(2)),
46
+ .bs-dropdown-options :where(li[data-variant~="2-col"][data-variant~="description"] > :nth-child(3)),
47
+ .bs-dropdown-options :where(li[data-variant~="3-col"][data-variant~="description"] > :nth-child(4)) {
41
48
  color: var(--bs-ink-light);
42
49
  font-size: var(--bs-text-xs);
43
50
  min-height: 1.125rem;
@@ -46,11 +53,12 @@
46
53
 
47
54
  /* Variant: 2-col description */
48
55
  .bs-dropdown-options :where(li[data-variant~="2-col"][data-variant~="description"] > :nth-child(3)) {
49
- color: var(--bs-ink-light);
50
- font-size: var(--bs-text-xs);
51
56
  grid-column-start: 2;
52
- min-height: 1.125rem;
53
- line-height: 1.125rem;
57
+ }
58
+
59
+ /* Variant: 3-col description */
60
+ .bs-dropdown-options :where(li[data-variant~="3-col"][data-variant~="description"] > :nth-child(4)) {
61
+ grid-column-start: 3;
54
62
  }
55
63
 
56
64
  /* Hover or data-selected */
@@ -72,19 +80,23 @@
72
80
  color: var(--bs-red-500);
73
81
  }
74
82
 
75
- /* Hover or data-selected for 2-col/description variants */
76
- .bs-dropdown-options :where(li:not([data-variant~="2-col"])[data-variant~="description"]:hover > :nth-child(2)),
83
+ /* Hover or data-selected for 2-col/3-col/description variants */
84
+ .bs-dropdown-options :where(li:not([data-variant*="-col"])[data-variant~="description"]:hover > :nth-child(2)),
77
85
  .bs-dropdown-options :where(li[data-variant~="2-col"][data-variant~="description"]:hover > :nth-child(3)),
78
- .bs-dropdown-options :where(li:not([data-variant~="2-col"])[data-variant~="description"][data-selected] > :nth-child(2)),
79
- .bs-dropdown-options :where(li[data-variant~="2-col"][data-variant~="description"][data-selected] > :nth-child(3)) {
86
+ .bs-dropdown-options :where(li[data-variant~="3-col"][data-variant~="description"]:hover > :nth-child(4)),
87
+ .bs-dropdown-options :where(li:not([data-variant*="-col"])[data-variant~="description"][data-selected] > :nth-child(2)),
88
+ .bs-dropdown-options :where(li[data-variant~="2-col"][data-variant~="description"][data-selected] > :nth-child(3)),
89
+ .bs-dropdown-options :where(li[data-variant~="3-col"][data-variant~="description"][data-selected] > :nth-child(4)) {
80
90
  color: var(--bs-blue-base);
81
91
  }
82
92
 
83
- /* Hover or data-selected for negative + 2-col/description variants */
84
- .bs-dropdown-options :where(li[data-variant~="negative"]:not([data-variant~="2-col"])[data-variant~="description"]:hover > :nth-child(2)),
93
+ /* Hover or data-selected for negative + 2-col/3-col/description variants */
94
+ .bs-dropdown-options :where(li[data-variant~="negative"]:not([data-variant*="-col"])[data-variant~="description"]:hover > :nth-child(2)),
85
95
  .bs-dropdown-options :where(li[data-variant~="negative"][data-variant~="2-col"][data-variant~="description"]:hover > :nth-child(3)),
86
- .bs-dropdown-options :where(li[data-variant~="negative"]:not([data-variant~="2-col"])[data-variant~="description"][data-selected] > :nth-child(2)),
87
- .bs-dropdown-options :where(li[data-variant~="negative"][data-variant~="2-col"][data-variant~="description"][data-selected] > :nth-child(3)) {
96
+ .bs-dropdown-options :where(li[data-variant~="negative"][data-variant~="3-col"][data-variant~="description"]:hover > :nth-child(4)),
97
+ .bs-dropdown-options :where(li[data-variant~="negative"]:not([data-variant*="-col"])[data-variant~="description"][data-selected] > :nth-child(2)),
98
+ .bs-dropdown-options :where(li[data-variant~="negative"][data-variant~="2-col"][data-variant~="description"][data-selected] > :nth-child(3)),
99
+ .bs-dropdown-options :where(li[data-variant~="negative"][data-variant~="3-col"][data-variant~="description"][data-selected] > :nth-child(4)) {
88
100
  color: var(--bs-red-500);
89
101
  }
90
102
 
@@ -124,6 +136,7 @@
124
136
  padding-right: 1.375rem;
125
137
  }
126
138
 
139
+ /* Multi-select divider line */
127
140
  .bs-dropdown-options :where(hr) {
128
141
  background-color: var(--bs-navy-light);
129
142
  height: .0625rem;
@@ -131,6 +144,53 @@
131
144
  margin-inline: 0;
132
145
  }
133
146
 
147
+ /* Disable hover styles */
148
+ .bs-dropdown-options :where(li[data-no-hover]:hover) {
149
+ background-color: transparent;
150
+ border-left-color: transparent;
151
+ color: var(--bs-ink-base);
152
+ cursor: default;
153
+ }
154
+
155
+ /* Style label to look like other options */
156
+ .bs-dropdown-options :where(li label) {
157
+ cursor: pointer;
158
+ font-size: 1rem;
159
+ font-weight: 400;
160
+ }
161
+
162
+ /* Don't change option color when checkbox is present */
163
+ .bs-dropdown-options :where(li[data-variant~="checkbox"]):hover,
164
+ .bs-dropdown-options :where(li[data-variant~="checkbox"][data-selected]) {
165
+ color: var(--bs-ink-base);
166
+ }
167
+
168
+ /* Don't change description color when checkbox is present */
169
+ .bs-dropdown-options :where(li[data-variant~="checkbox"][data-variant~="2-col"][data-variant~="description"]):hover > :nth-child(3),
170
+ .bs-dropdown-options :where(li[data-variant~="checkbox"][data-variant~="2-col"][data-variant~="description"][data-selected]) > :nth-child(3),
171
+ .bs-dropdown-options :where(li[data-variant~="checkbox"][data-variant~="3-col"][data-variant~="description"]):hover > :nth-child(4),
172
+ .bs-dropdown-options :where(li[data-variant~="checkbox"][data-variant~="3-col"][data-variant~="description"][data-selected]) > :nth-child(4) {
173
+ color: var(--bs-ink-light);
174
+ }
175
+
176
+ /* Overrides mobile style when not min-width 752 */
177
+ .bs-dropdown:where([data-no-mobile="true"]) :where(.bs-dropdown-options) :where(li) {
178
+ padding-left: 0.5rem;
179
+ padding-right: 0.75rem;
180
+ }
181
+
182
+ .bs-dropdown:where([data-no-mobile="true"]) :where(.bs-dropdown-options) :where(li[role="separator"]) {
183
+ padding-right: 0.625rem;
184
+ }
185
+
186
+ .bs-dropdown:where([data-no-mobile="true"]) :where(.bs-dropdown-options) :where(li:focus-visible) {
187
+ padding-left: 0.625rem;
188
+ }
189
+
190
+ .bs-dropdown:where([data-no-mobile="true"]) :where(.bs-dropdown-options) :where(li[data-selected]:focus-visible) {
191
+ padding-left: 0.5rem;
192
+ }
193
+
134
194
  @media (min-width: 752px) {
135
195
  .bs-dropdown-options :where(li) {
136
196
  padding-left: 0.5rem;
@@ -18,13 +18,15 @@
18
18
  z-index: 998;
19
19
  }
20
20
 
21
- /* Content (mobile version and general styles) */
21
+ /* Content */
22
22
  .bs-dropdown {
23
23
  --dropdown-bottom: 0;
24
24
  --dropdown-left: 0;
25
25
  --dropdown-right: auto;
26
26
  --dropdown-top: auto;
27
27
  --dropdown-width: 100%;
28
+ --dropdown-transform: translate(0, 100%);
29
+
28
30
  background-color: var(--bs-bg-base-elevated);
29
31
  border-radius: 4px;
30
32
  bottom: var(--dropdown-bottom);
@@ -38,16 +40,15 @@
38
40
  right: var(--dropdown-right);
39
41
  top: var(--dropdown-top);
40
42
  transform-origin: center bottom;
41
- transform: translateY(100%);
43
+ transform: var(--dropdown-transform);
42
44
  transition-duration: 75ms;
43
45
  transition-property: opacity, transform;
44
46
  transition-timing-function: ease-in-out;
45
47
  width: var(--dropdown-width);
46
- z-index: -1;
48
+ z-index: 999;
47
49
  }
48
50
 
49
- /* mobile header */
50
- /* TODO: h3 may not be the right tag to use here... label, possibly? */
51
+ /* Mobile Header */
51
52
  .bs-dropdown > :where(header) {
52
53
  border-bottom: 1px solid var(--bs-border-base);
53
54
  display: flex;
@@ -69,26 +70,61 @@
69
70
  width: 1rem;
70
71
  }
71
72
 
72
- /* mobile search input */
73
- .bs-dropdown :where(.bs-dropdown-search) {
74
- padding: 1.5rem 1.5rem 0 1.5rem;
73
+ /* data-shown */
74
+ .bs-dropdown:where([data-shown]:not([data-shown="false"])) {
75
+ --dropdown-transform: translate(0, 0);
76
+ opacity: 1;
75
77
  }
76
78
 
77
- .bs-dropdown :where(.bs-dropdown-search bs-input-search) {
78
- margin-bottom: 1rem;
79
- margin-left: -0.75rem;
80
- width: calc(100% + 1.5rem);
79
+ /* Sizing */
80
+ .bs-dropdown:where([data-width="sm"]) {
81
+ --dropdown-wscreen-width: 10rem;
81
82
  }
82
83
 
83
- .bs-dropdown:where([data-search]:not([data-search="false"])) :where(.bs-dropdown-options) {
84
- --options-height-max: 11.5rem;
84
+ .bs-dropdown:where([data-width="md"]),
85
+ .bs-dropdown:where(:not([data-width])) {
86
+ --dropdown-wscreen-width: 20rem;
85
87
  }
86
88
 
87
- /* data-shown */
88
- .bs-dropdown:where([data-shown]:not([data-shown="false"])) {
89
- opacity: 1;
90
- transform: translateY(0);
91
- z-index: 999;
89
+ .bs-dropdown:where([data-width="lg"]) {
90
+ --dropdown-wscreen-width: 40rem;
91
+ }
92
+
93
+ .bs-dropdown:where([data-width="content"]) {
94
+ --dropdown-wscreen-width: auto;
95
+ }
96
+
97
+ .bs-dropdown-parent:where([data-width="toggle"]) :where(.bs-dropdown),
98
+ .bs-dropdown-parent:where([data-width="anchor"]) :where(.bs-dropdown) {
99
+ --dropdown-wscreen-width: 100%;
100
+ }
101
+
102
+ /* data-top */
103
+ .bs-dropdown:where([data-top]:not([data-top="false"])) {
104
+ --dropdown-wscreen-bottom: calc(100% + 0.5rem);
105
+ --dropdown-wscreen-top: auto;
106
+ }
107
+
108
+ /* data-center */
109
+ .bs-dropdown-parent:where([data-center]:not([data-center="false"])) :where(.bs-dropdown) {
110
+ --dropdown-transform: translate(-50%, 0);
111
+ --dropdown-wscreen-left: 50%;
112
+ }
113
+
114
+ /* Overrides mobile style when not min-width 752 */
115
+ .bs-dropdown:where([data-no-mobile="true"]) {
116
+ --dropdown-bottom: var(--dropdown-wscreen-bottom, auto);
117
+ --dropdown-left: var(--dropdown-wscreen-left, initial);
118
+ --dropdown-right: var(--dropdown-wscreen-right, initial);
119
+ --dropdown-top: var(--dropdown-wscreen-top, calc(100% + 0.5rem));
120
+ --dropdown-width: var(--dropdown-wscreen-width, initial);
121
+ --dropdown-transform: initial;
122
+
123
+ position: absolute;
124
+ }
125
+
126
+ .bs-dropdown:where([data-no-mobile="true"]) > :where(header) {
127
+ display: none;
92
128
  }
93
129
 
94
130
  @media (min-width: 752px) {
@@ -102,61 +138,13 @@
102
138
  --dropdown-right: var(--dropdown-wscreen-right, initial);
103
139
  --dropdown-top: var(--dropdown-wscreen-top, calc(100% + 0.5rem));
104
140
  --dropdown-width: var(--dropdown-wscreen-width, initial);
141
+ --dropdown-transform: initial;
142
+
105
143
  position: absolute;
106
- transform: initial;
107
144
  }
108
145
 
109
146
  /* Hide the header */
110
147
  .bs-dropdown > :where(header) {
111
148
  display: none;
112
149
  }
113
-
114
- /* Sizing */
115
- .bs-dropdown:where([data-width="sm"]) {
116
- --dropdown-wscreen-width: 10rem;
117
- }
118
-
119
- .bs-dropdown:where([data-width="md"]),
120
- .bs-dropdown:where(:not([data-width])) {
121
- --dropdown-wscreen-width: 20rem;
122
- }
123
-
124
- .bs-dropdown:where([data-width="lg"]) {
125
- --dropdown-wscreen-width: 40rem;
126
- }
127
-
128
- .bs-dropdown:where([data-width="content"]) {
129
- --dropdown-wscreen-width: auto;
130
- }
131
-
132
- .bs-dropdown-parent:where([data-width="toggle"]) :where(.bs-dropdown) {
133
- --dropdown-wscreen-width: 100%;
134
- }
135
-
136
- /* data-shown */
137
- .bs-dropdown:where([data-shown]:not([data-shown="false"])) {
138
- opacity: 1;
139
- }
140
-
141
- /* data-top */
142
- .bs-dropdown:where([data-top]:not([data-top="false"])) {
143
- --dropdown-wscreen-bottom: calc(100% + 0.5rem);
144
- --dropdown-wscreen-top: auto;
145
- }
146
-
147
- /* data-justify="center" */
148
- .bs-dropdown-parent:where([data-center]:not([data-center="false"])) :where(.bs-dropdown) {
149
- --dropdown-wscreen-left: 50%;
150
- transform: translateX(-50%);
151
- }
152
-
153
- .bs-dropdown :where(.bs-dropdown-options) {
154
- --options-height-max: 20rem;
155
- }
156
- .bs-dropdown:where([data-search]:not([data-search="false"])) :where(.bs-dropdown-options) {
157
- --options-height-max: 17.25rem;
158
- }
159
150
  }
160
-
161
-
162
-