|
26 | 26 | } |
27 | 27 |
|
28 | 28 | .root { |
| 29 | + --_combobox-trailing-width: calc( |
| 30 | + var(--openbitfun-control-select-trailing-inset) |
| 31 | + + var(--openbitfun-control-select-indicator-size) |
| 32 | + + var(--openbitfun-control-select-content-gap) |
| 33 | + ); |
29 | 34 | position: relative; |
30 | 35 | display: flex; |
31 | 36 | inline-size: 100%; |
|
35 | 40 | color: var(--openbitfun-color-content-primary); |
36 | 41 | } |
37 | 42 |
|
| 43 | + .root[data-show-indicator="false"] { |
| 44 | + --_combobox-trailing-width: var(--openbitfun-control-select-padding-inline); |
| 45 | + } |
| 46 | + |
| 47 | + .root[data-show-indicator="false"][data-variant="pill"] { |
| 48 | + --_combobox-trailing-width: var(--openbitfun-control-status-pill-padding-inline); |
| 49 | + } |
| 50 | + |
38 | 51 | .root[data-size="sm"], |
39 | 52 | .popover[data-size="sm"] { |
40 | 53 | --_combobox-height: var(--openbitfun-control-height-sm); |
|
83 | 96 | margin: 0; |
84 | 97 | padding-block: 0; |
85 | 98 | padding-inline-start: var(--openbitfun-control-select-padding-inline); |
86 | | - padding-inline-end: calc( |
87 | | - var(--openbitfun-control-select-trailing-inset) |
88 | | - + var(--openbitfun-control-select-indicator-size) |
89 | | - + var(--openbitfun-control-select-content-gap) |
90 | | - ); |
| 99 | + padding-inline-end: var(--_combobox-trailing-width); |
91 | 100 | border: var(--openbitfun-border-width-default) solid var(--openbitfun-color-field-border); |
92 | 101 | border-radius: var(--openbitfun-control-select-radius); |
93 | 102 | outline: 0; |
|
106 | 115 | box-shadow var(--openbitfun-motion-duration-fast) var(--openbitfun-motion-easing-standard); |
107 | 116 | } |
108 | 117 |
|
| 118 | + .root[data-variant="pill"] .trigger { |
| 119 | + padding-inline-start: var(--openbitfun-control-status-pill-padding-inline); |
| 120 | + border-radius: var(--openbitfun-control-status-pill-radius); |
| 121 | + background: var(--openbitfun-color-action-neutral-surface); |
| 122 | + font-family: var(--openbitfun-type-meta-font-family); |
| 123 | + font-size: var(--openbitfun-type-meta-font-size); |
| 124 | + font-weight: var(--openbitfun-type-meta-font-weight); |
| 125 | + line-height: var(--openbitfun-type-status-pill-line-height); |
| 126 | + letter-spacing: var(--openbitfun-type-meta-letter-spacing); |
| 127 | + } |
| 128 | + |
109 | 129 | .root:has(.clear) .trigger { |
110 | | - padding-inline-end: calc( |
111 | | - var(--openbitfun-control-select-trailing-inset) |
112 | | - + var(--openbitfun-control-select-indicator-size) |
113 | | - + var(--openbitfun-control-select-content-gap) |
114 | | - + var(--openbitfun-control-height-sm) |
115 | | - ); |
| 130 | + padding-inline-end: calc(var(--_combobox-trailing-width) + var(--openbitfun-control-height-sm)); |
| 131 | + } |
| 132 | + |
| 133 | + .root[data-bordered="false"] .trigger { |
| 134 | + border: 0; |
| 135 | + } |
| 136 | + |
| 137 | + .root[data-bordered="hover"] .trigger { |
| 138 | + border-color: transparent; |
| 139 | + } |
| 140 | + |
| 141 | + .root[data-hit-area="expanded"] .trigger { |
| 142 | + position: relative; |
| 143 | + } |
| 144 | + |
| 145 | + .root[data-hit-area="expanded"]:not([data-open="true"]) .trigger::after { |
| 146 | + content: ""; |
| 147 | + position: absolute; |
| 148 | + inset-block: calc(-1 * var(--openbitfun-space-1)); |
| 149 | + inset-inline: calc(-1 * var(--openbitfun-space-2)); |
| 150 | + border-radius: inherit; |
116 | 151 | } |
117 | 152 |
|
118 | 153 | .trigger:not(:disabled):hover { |
119 | 154 | border-color: var(--openbitfun-color-field-border-hover); |
120 | 155 | background: var(--openbitfun-color-field-background-hover); |
121 | 156 | } |
122 | 157 |
|
| 158 | + .root[data-variant="pill"] .trigger:not(:disabled):hover { |
| 159 | + background: var(--openbitfun-color-action-neutral-surface-hover); |
| 160 | + } |
| 161 | + |
123 | 162 | .root[data-field-surface="ambient"] .trigger, |
124 | 163 | .root[data-field-surface="ambient"] .trigger:not(:disabled):hover { |
125 | 164 | background: transparent; |
|
162 | 201 | gap: var(--openbitfun-control-select-content-gap); |
163 | 202 | } |
164 | 203 |
|
| 204 | + .root[data-has-value-prefix="true"] .value { |
| 205 | + gap: var(--openbitfun-control-select-content-gap); |
| 206 | + } |
| 207 | + |
| 208 | + .root[data-has-value-prefix="true"][data-variant="pill"] .value { |
| 209 | + gap: var(--openbitfun-control-status-pill-gap); |
| 210 | + } |
| 211 | + |
| 212 | + .root[data-has-value-prefix="true"] .singleValue { |
| 213 | + flex: 0 1 auto; |
| 214 | + } |
| 215 | + |
| 216 | + .valuePrefix { |
| 217 | + flex: 0 0 auto; |
| 218 | + white-space: nowrap; |
| 219 | + } |
| 220 | + |
165 | 221 | .valueLeading { |
166 | 222 | display: inline-flex; |
167 | 223 | flex: 0 0 var(--openbitfun-control-select-indicator-size); |
|
249 | 305 | } |
250 | 306 |
|
251 | 307 | .clear { |
252 | | - margin-inline-end: calc( |
253 | | - var(--openbitfun-control-select-trailing-inset) |
254 | | - + var(--openbitfun-control-select-indicator-size) |
255 | | - + var(--openbitfun-control-select-content-gap) |
256 | | - ); |
| 308 | + margin-inline-end: var(--_combobox-trailing-width); |
257 | 309 | } |
258 | 310 |
|
259 | 311 | .indicator { |
|
300 | 352 | flex-direction: column-reverse; |
301 | 353 | } |
302 | 354 |
|
| 355 | + .popover[data-popup-width="content"] { |
| 356 | + inline-size: max-content; |
| 357 | + } |
| 358 | + |
303 | 359 | .popover:focus-within { |
304 | 360 | border-color: var(--openbitfun-color-border-default); |
305 | 361 | } |
|
0 commit comments