|
2 | 2 | * CSS Custom Properties
|
3 | 3 | *
|
4 | 4 | * These properties can be overridden using the component's tag as selector.
|
| 5 | + * @prop --calcite-sheet-background-color: Specifies the background color of the sheet. |
| 6 | + * @prop --calcite-sheet-corner-radius: Specifies the corner radius of the component. |
| 7 | + * @prop --calcite-sheet-shadow: Specifies the shadow of the component. |
| 8 | + * @prop --calcite-sheet-text-color: Specifies the text color of the component. |
| 9 | + * |
| 10 | + * @prop --calcite-sheet-resize-background-color: Specifies the background color of the resize handle. |
| 11 | + * @prop --calcite-sheet-resize-icon-color: Specifies the text color of the resize handle. |
5 | 12 | *
|
6 | 13 | * @prop --calcite-sheet-scrim-background: Specifies the background color of the sheet scrim.
|
7 | 14 | * @prop --calcite-sheet-width: When `position` is `"inline-start"` or `"inline-end"`, specifies the width of the component.
|
|
25 | 32 | }
|
26 | 33 |
|
27 | 34 | .calcite--rtl {
|
28 |
| - --calcite-scrim-shadow-inline-start-internal: -4px 0 8px -1px rgba(0, 0, 0, 0.08), -2px 0 4px -1px rgba(0, 0, 0, 0.04); |
| 35 | + --calcite-scrim-shadow-inline-start-internal: |
| 36 | + -4px 0 8px -1px rgba(0, 0, 0, 0.08), -2px 0 4px -1px rgba(0, 0, 0, 0.04); |
29 | 37 | --calcite-scrim-shadow-inline-end-internal: 4px 0 8px -1px rgba(0, 0, 0, 0.08), 2px 0 4px -1px rgba(0, 0, 0, 0.04);
|
30 | 38 | }
|
31 | 39 |
|
|
34 | 42 | }
|
35 | 43 |
|
36 | 44 | .container {
|
37 |
| - @apply text-color-2 |
38 |
| - box-border |
| 45 | + @apply box-border |
39 | 46 | fixed
|
40 | 47 | flex
|
41 | 48 | opacity-0
|
42 | 49 | z-overlay
|
43 | 50 | invisible;
|
| 51 | + color: var(--calcite-sheet-text-color, var(--calcite-color-text-2)); |
44 | 52 | transition:
|
45 | 53 | visibility 0ms linear var(--calcite-internal-animation-timing-medium),
|
46 | 54 | opacity var(--calcite-internal-animation-timing-medium) $easing-function;
|
|
75 | 83 | }
|
76 | 84 |
|
77 | 85 | :host([display-mode="float"]) .content {
|
78 |
| - @apply shadow-2-sm; |
| 86 | + --tw-shadow: 0 2px 12px -4px rgba(0, 0, 0, 0.2), 0 2px 4px -2px rgba(0, 0, 0, 0.16); |
| 87 | + --tw-shadow-colored: 0 2px 12px -4px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color); |
| 88 | + box-shadow: var( |
| 89 | + --calcite-sheet-shadow, |
| 90 | + var(--tw-ring-offset-shadow, 0 0 #0000), |
| 91 | + var(--tw-ring-shadow, 0 0 #0000), |
| 92 | + var(--tw-shadow) |
| 93 | + ); |
79 | 94 | }
|
80 | 95 |
|
81 | 96 | :host([display-mode="overlay"][position="inline-start"]) .container {
|
|
153 | 168 |
|
154 | 169 | .content {
|
155 | 170 | @apply flex relative box-border p-0 z-modal max-h-full max-w-full;
|
156 |
| - background-color: theme("colors.background.foreground.1"); |
| 171 | + background-color: var(--calcite-sheet-background-color, var(--calcite-color-foreground-1)); |
157 | 172 | max-block-size: 100%;
|
158 | 173 | visibility: hidden;
|
159 | 174 | transition:
|
|
174 | 189 | :host([display-mode="float"]) .content,
|
175 | 190 | :host([display-mode="float"]) .container,
|
176 | 191 | :host([display-mode="float"]) .content-container {
|
177 |
| - @apply rounded; |
| 192 | + border-radius: var(--calcite-sheet-corner-radius, var(--calcite-corner-radius-round)); |
178 | 193 | }
|
179 | 194 |
|
180 | 195 | :host([display-mode="float"]) .container {
|
181 |
| - @apply p-3; |
| 196 | + padding: var(--calcite-spacing-md); |
182 | 197 | }
|
183 | 198 |
|
184 | 199 | .container--open {
|
|
257 | 272 | .resize-handle:active,
|
258 | 273 | .resize-handle:hover {
|
259 | 274 | .resize-handle-bar {
|
260 |
| - @apply text-color-1 bg-foreground-3; |
| 275 | + color: var(--calcite-sheet-resize-icon-color, var(--calcite-color-text-1)); |
| 276 | + background-color: var(--calcite-sheet-resize-background-color, var(--calcite-color-foreground-3)); |
261 | 277 | }
|
262 | 278 | }
|
263 | 279 |
|
264 | 280 | .resize-handle-bar {
|
265 |
| - @apply flex bg-background justify-center items-center pointer-events-none; |
266 |
| - color: var(--calcite-color-border-input); |
| 281 | + @apply flex justify-center items-center pointer-events-none; |
| 282 | + color: var(--calcite-sheet-resize-icon-color, var(--calcite-color-border-input)); |
| 283 | + background-color: var(--calcite-sheet-resize-background-color, var(--calcite-color-background)); |
267 | 284 | }
|
268 | 285 |
|
269 | 286 | .resize-handle:focus .resize-handle-bar {
|
|
281 | 298 | .resize-handle-bar {
|
282 | 299 | block-size: 100%;
|
283 | 300 | inline-size: var(--calcite-size-fixed-sm-plus);
|
284 |
| - border-inline-start: 1px solid var(--calcite-color-border-3); |
| 301 | + border-inline-start: var(--calcite-border-width-sm) solid |
| 302 | + var(--calcite-sheet-border-color, var(--calcite-color-border-3)); |
285 | 303 | }
|
286 | 304 |
|
287 | 305 | &:host([display-mode="float"]) .resize-handle-bar {
|
288 |
| - @apply rounded-e; |
| 306 | + border-start-end-radius: var(--calcite-sheet-corner-radius, var(--calcite-corner-radius-round)); |
| 307 | + border-end-end-radius: var(--calcite-sheet-corner-radius, var(--calcite-corner-radius-round)); |
289 | 308 | }
|
290 | 309 | }
|
291 | 310 |
|
|
300 | 319 | .resize-handle-bar {
|
301 | 320 | block-size: 100%;
|
302 | 321 | inline-size: var(--calcite-size-fixed-sm-plus);
|
303 |
| - border-inline-end: 1px solid var(--calcite-color-border-3); |
| 322 | + border-inline-end: var(--calcite-border-width-sm) solid |
| 323 | + var(--calcite-sheet-border-color, var(--calcite-color-border-3)); |
304 | 324 | }
|
305 | 325 |
|
306 | 326 | &:host([display-mode="float"]) .resize-handle-bar {
|
|
318 | 338 | .resize-handle-bar {
|
319 | 339 | inline-size: 100%;
|
320 | 340 | block-size: var(--calcite-size-fixed-sm-plus);
|
321 |
| - border-block-start: 1px solid var(--calcite-color-border-3); |
| 341 | + border-block-start: var(--calcite-border-width-sm) solid |
| 342 | + var(--calcite-sheet-border-color, var(--calcite-color-border-3)); |
322 | 343 | }
|
323 | 344 |
|
324 | 345 | &:host([display-mode="float"]) .resize-handle-bar {
|
|
336 | 357 | .resize-handle-bar {
|
337 | 358 | inline-size: 100%;
|
338 | 359 | block-size: var(--calcite-size-fixed-sm-plus);
|
339 |
| - border-block-end: 1px solid var(--calcite-color-border-3); |
| 360 | + border-block-end: var(--calcite-border-width-sm) solid |
| 361 | + var(--calcite-sheet-border-color, var(--calcite-color-border-3)); |
340 | 362 | }
|
341 | 363 |
|
342 | 364 | &:host([display-mode="float"]) .resize-handle-bar {
|
343 |
| - @apply rounded-t; |
| 365 | + border-top-left-radius: var(--calcite-sheet-corner-radius, var(--calcite-corner-radius-round)); |
| 366 | + border-top-right-radius: var(--calcite-sheet-corner-radius, var(--calcite-corner-radius-round)); |
344 | 367 | }
|
345 | 368 | }
|
346 | 369 |
|
|
0 commit comments