@rcarls/rc-theme-tailwind 0.0.0-next-20261103014840
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.
- package/CHANGELOG.md +36 -0
- package/README.md +127 -0
- package/bridge.css +245 -0
- package/components/accordion.css +18 -0
- package/components/adaptive-menu.css +98 -0
- package/components/app-bar.css +21 -0
- package/components/bottom-sheet.css +90 -0
- package/components/breadcrumbs.css +38 -0
- package/components/button.css +44 -0
- package/components/card.css +51 -0
- package/components/carousel.css +31 -0
- package/components/chip-group.css +21 -0
- package/components/chip.css +20 -0
- package/components/combobox.css +55 -0
- package/components/data-table.css +55 -0
- package/components/dialog.css +39 -0
- package/components/disclosure.css +112 -0
- package/components/fab-menu.css +36 -0
- package/components/fab.css +44 -0
- package/components/field.css +154 -0
- package/components/icons.css +19 -0
- package/components/list-item.css +70 -0
- package/components/listbox.css +29 -0
- package/components/markdown-editor.css +53 -0
- package/components/menu-button.css +18 -0
- package/components/menu.css +28 -0
- package/components/menubar.css +17 -0
- package/components/modes.css +60 -0
- package/components/navigation-bar.css +43 -0
- package/components/navigation-rail.css +72 -0
- package/components/page-turner.css +19 -0
- package/components/pagination.css +50 -0
- package/components/popover.css +13 -0
- package/components/progress.css +11 -0
- package/components/range-slider.css +18 -0
- package/components/scroller.css +19 -0
- package/components/search-bar.css +30 -0
- package/components/segmented-button.css +19 -0
- package/components/select.css +74 -0
- package/components/slider.css +10 -0
- package/components/snackbar.css +23 -0
- package/components/splitter.css +39 -0
- package/components/switch.css +28 -0
- package/components/textarea.css +21 -0
- package/components/toolbar.css +36 -0
- package/components/tooltip.css +15 -0
- package/components/transfer-list.css +30 -0
- package/components/virtual-canvas.css +18 -0
- package/components/virtual-scroller.css +7 -0
- package/components.css +49 -0
- package/css-components/button.css +66 -0
- package/css-components/card.css +14 -0
- package/css-components/chip-group.css +9 -0
- package/css-components/chip.css +80 -0
- package/css-components/disclosure.css +25 -0
- package/css-components/list.css +34 -0
- package/css-components/select.css +20 -0
- package/css-components/textarea.css +22 -0
- package/css-components.css +31 -0
- package/defaults.css +137 -0
- package/layers.css +10 -0
- package/native.css +249 -0
- package/package.json +49 -0
- package/theme.css +3 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
@layer rc-theme-tailwind.components {
|
|
2
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-button {
|
|
3
|
+
--rc-button-bg: var(--tailwind-surface-raised, ButtonFace);
|
|
4
|
+
--rc-button-color: var(--rc-button-text, ButtonText);
|
|
5
|
+
--rc-button-border: var(--rc-border, 1px solid ButtonBorder);
|
|
6
|
+
--rc-button-radius: var(--rc-control-radius, 0.5rem);
|
|
7
|
+
--rc-button-block-size: var(--rc-control-block-size, 2.5rem);
|
|
8
|
+
--rc-button-padding-block: var(--rc-control-padding-block, 0.5rem);
|
|
9
|
+
--rc-button-padding-inline: var(--rc-control-padding-inline, 0.75rem);
|
|
10
|
+
--rc-button-gap: var(--rc-control-gap, 0.5rem);
|
|
11
|
+
--rc-button-font: var(--rc-font-weight, 400) var(--rc-font-size, 1em) /
|
|
12
|
+
var(--rc-line-height, normal) var(--rc-font-family, inherit);
|
|
13
|
+
--rc-button-state-layer-bg: currentColor;
|
|
14
|
+
--rc-button-hover-state-layer-opacity: 0.08;
|
|
15
|
+
--rc-button-focus-state-layer-opacity: 0.12;
|
|
16
|
+
--rc-button-pressed-state-layer-opacity: 0.12;
|
|
17
|
+
--rc-button-state-layer-easing: var(--tailwind-motion-easing, ease);
|
|
18
|
+
--rc-button-progress-color: var(--rc-button-text, ButtonText);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-button > button:focus-visible {
|
|
22
|
+
outline: var(--rc-focus-ring, 2px solid Highlight);
|
|
23
|
+
outline-offset: var(--rc-focus-ring-offset, 2px);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-button[disabled] > button:disabled {
|
|
27
|
+
opacity: var(--rc-disabled-opacity, 0.52);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind))
|
|
31
|
+
rc-button[progress][progress-value]::part(progress) {
|
|
32
|
+
inset: 0.25rem;
|
|
33
|
+
border: var(--rc-border, 1px solid ButtonBorder);
|
|
34
|
+
border-radius: calc(var(--rc-control-radius, 0.5rem) - 0.125rem);
|
|
35
|
+
background: color-mix(in srgb, var(--tailwind-surface-raised, Canvas) 88%, currentColor);
|
|
36
|
+
font: 600 0.75rem / 1 var(--rc-font-family, inherit);
|
|
37
|
+
letter-spacing: 0.025em;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-button[icon-only] {
|
|
41
|
+
--rc-button-icon-size: var(--rc-control-block-size, 2.5rem);
|
|
42
|
+
--rc-icon-font-line-height: var(--rc-button-icon-size, 2.5rem);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
@layer rc-theme-tailwind.components {
|
|
2
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-card {
|
|
3
|
+
--rc-card-bg: var(--tailwind-surface-raised, Canvas);
|
|
4
|
+
--rc-card-color: var(--tailwind-on-surface, CanvasText);
|
|
5
|
+
--rc-card-radius: var(--tailwind-radius-lg, 0.75rem);
|
|
6
|
+
--rc-card-border: var(--rc-border, 1px solid ButtonBorder);
|
|
7
|
+
--rc-card-shadow: var(--tailwind-shadow-sm, none);
|
|
8
|
+
--rc-card-padding-block: 0.75rem;
|
|
9
|
+
--rc-card-padding-inline: 0.75rem;
|
|
10
|
+
--rc-card-actions-gap: 0.5rem;
|
|
11
|
+
--rc-card-title-font: 600 1rem / 1.4 var(--rc-font-family, inherit);
|
|
12
|
+
--rc-card-subtitle-color: color-mix(in srgb, currentColor 72%, transparent);
|
|
13
|
+
--rc-card-state-layer-bg: currentColor;
|
|
14
|
+
--rc-card-hover-state-layer-opacity: 0.08;
|
|
15
|
+
--rc-card-pressed-state-layer-opacity: 0.12;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-card[selected] {
|
|
19
|
+
box-shadow:
|
|
20
|
+
0 0 0 2px var(--rc-accent, Highlight),
|
|
21
|
+
var(--rc-card-shadow);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-card[disabled] {
|
|
25
|
+
opacity: var(--rc-disabled-opacity, 0.52);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-card > :is(h2, h3)[slot='title'] {
|
|
29
|
+
margin: 0;
|
|
30
|
+
color: var(--rc-card-title-color, inherit);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-card > h2[slot='title'] {
|
|
34
|
+
font-family: var(--rc-font-family, inherit);
|
|
35
|
+
font-size: 1.25rem;
|
|
36
|
+
font-weight: 650;
|
|
37
|
+
line-height: 1.35;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-card > h3[slot='title'] {
|
|
41
|
+
font-family: var(--rc-font-family, inherit);
|
|
42
|
+
font-size: 1rem;
|
|
43
|
+
font-weight: 600;
|
|
44
|
+
line-height: 1.4;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-card > :is(h2, h3)[slot='title'] > a {
|
|
48
|
+
color: inherit;
|
|
49
|
+
text-decoration: none;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@layer rc-theme-tailwind.components {
|
|
2
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-carousel {
|
|
3
|
+
--rc-carousel-color: var(--tailwind-on-surface, CanvasText);
|
|
4
|
+
--rc-carousel-gap: var(--tailwind-control-gap, 0.5rem);
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
* A slide is a raised card on the page surface, which is what separates it
|
|
8
|
+
* from the track behind it without needing a border.
|
|
9
|
+
*/
|
|
10
|
+
--rc-carousel-item-background: var(--tailwind-surface-raised, Canvas);
|
|
11
|
+
--rc-carousel-item-color: var(--tailwind-on-surface, CanvasText);
|
|
12
|
+
--rc-carousel-item-border-radius: var(--tailwind-radius-lg, 0.75rem);
|
|
13
|
+
|
|
14
|
+
--rc-carousel-navigation-button-background: color-mix(
|
|
15
|
+
in srgb,
|
|
16
|
+
var(--tailwind-surface, Canvas) 88%,
|
|
17
|
+
transparent
|
|
18
|
+
);
|
|
19
|
+
--rc-carousel-navigation-button-color: var(--tailwind-on-surface, CanvasText);
|
|
20
|
+
--rc-carousel-navigation-button-size: 2.25rem;
|
|
21
|
+
--rc-carousel-navigation-inset: 0.5rem;
|
|
22
|
+
|
|
23
|
+
--rc-carousel-pagination-item-active-color: var(--rc-accent, Highlight);
|
|
24
|
+
--rc-carousel-pagination-item-color: color-mix(
|
|
25
|
+
in srgb,
|
|
26
|
+
var(--tailwind-on-surface-muted, GrayText) 40%,
|
|
27
|
+
transparent
|
|
28
|
+
);
|
|
29
|
+
--rc-carousel-pagination-item-size: 0.5rem;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@layer rc-theme-tailwind.components {
|
|
2
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-chip-group {
|
|
3
|
+
--rc-chip-group-column-gap: var(--tailwind-control-gap, 0.5rem);
|
|
4
|
+
--rc-chip-group-row-gap: var(--tailwind-control-gap, 0.5rem);
|
|
5
|
+
--rc-chip-group-padding-block: 0.25rem;
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* A scrolling group is padded on the inline axis so a chip snapped to the
|
|
9
|
+
* start does not sit flush against the edge it scrolled from.
|
|
10
|
+
*/
|
|
11
|
+
--rc-chip-group-scroll-padding-inline: var(--tailwind-item-padding-inline, 0.75rem);
|
|
12
|
+
--rc-chip-group-scrollbar-width: none;
|
|
13
|
+
|
|
14
|
+
--rc-chip-group-toggle-gap: var(--tailwind-control-gap, 0.5rem);
|
|
15
|
+
--rc-chip-group-toggle-icon-size: 1.125rem;
|
|
16
|
+
--rc-chip-group-toggle-separator-color: var(--tailwind-border-color, ButtonBorder);
|
|
17
|
+
--rc-chip-group-toggle-separator-block-size: 1.5rem;
|
|
18
|
+
--rc-chip-group-toggle-separator-inline-size: 1px;
|
|
19
|
+
--rc-chip-group-toggle-separator-gap: var(--tailwind-control-gap, 0.5rem);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@layer rc-theme-tailwind.components {
|
|
2
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-chip {
|
|
3
|
+
--rc-chip-block-size: 2rem;
|
|
4
|
+
--rc-chip-gap: 0px;
|
|
5
|
+
--rc-chip-padding-inline: 0.75rem;
|
|
6
|
+
--rc-chip-border: var(--rc-border);
|
|
7
|
+
--rc-chip-radius: var(--tailwind-radius-md, 0.5rem);
|
|
8
|
+
--rc-chip-bg: var(--tailwind-surface-raised, ButtonFace);
|
|
9
|
+
--rc-chip-color: var(--tailwind-on-surface, ButtonText);
|
|
10
|
+
--rc-chip-font: inherit;
|
|
11
|
+
--rc-chip-text-decoration: none;
|
|
12
|
+
--rc-chip-selected-border-color: var(--rc-accent);
|
|
13
|
+
--rc-chip-selected-bg: var(--rc-highlight, Highlight);
|
|
14
|
+
--rc-chip-selected-color: var(--rc-highlight-text, HighlightText);
|
|
15
|
+
--rc-chip-focus-ring: var(--rc-focus-ring);
|
|
16
|
+
--rc-chip-focus-ring-offset: var(--rc-focus-ring-offset);
|
|
17
|
+
--rc-chip-disabled-opacity: var(--rc-disabled-opacity);
|
|
18
|
+
--rc-chip-remove-target-size: 1.5rem;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
@layer rc-theme-tailwind.components {
|
|
2
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-combobox {
|
|
3
|
+
display: inline-block;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-combobox::part(anchor) {
|
|
7
|
+
min-block-size: var(--rc-control-block-size, 2.5rem);
|
|
8
|
+
border: var(--rc-border, 1px solid ButtonBorder);
|
|
9
|
+
border-radius: var(--rc-control-radius, 0.5rem);
|
|
10
|
+
background: var(--rc-field, Field);
|
|
11
|
+
color: var(--rc-field-text, FieldText);
|
|
12
|
+
transition:
|
|
13
|
+
border-color var(--rc-motion-duration, 160ms) var(--tailwind-motion-easing, ease),
|
|
14
|
+
box-shadow var(--rc-motion-duration, 160ms) var(--tailwind-motion-easing, ease);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-combobox::part(anchor):hover {
|
|
18
|
+
border-color: color-mix(in srgb, var(--rc-accent, Highlight) 55%, var(--rc-border-color));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-combobox::part(anchor):focus-within {
|
|
22
|
+
outline: var(--rc-focus-ring, 2px solid Highlight);
|
|
23
|
+
outline-offset: var(--rc-focus-ring-offset, 2px);
|
|
24
|
+
box-shadow: 0 0 0 4px color-mix(in srgb, var(--rc-accent, Highlight) 16%, transparent);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-combobox::part(listbox) {
|
|
28
|
+
--rc-listbox-option-gap: var(--rc-list-item-gap, var(--tailwind-item-gap, 0.5rem));
|
|
29
|
+
--rc-listbox-option-min-block-size: 2.25rem;
|
|
30
|
+
--rc-listbox-option-padding-block: var(--tailwind-item-padding-block, 0.55rem);
|
|
31
|
+
--rc-listbox-option-padding-inline: var(--tailwind-item-padding-inline, 0.75rem);
|
|
32
|
+
--rc-listbox-hover-bg: color-mix(in srgb, var(--rc-accent, Highlight) 10%, transparent);
|
|
33
|
+
--rc-listbox-hover-color: var(--rc-field-text, FieldText);
|
|
34
|
+
--rc-listbox-active-bg: color-mix(in srgb, var(--rc-accent, Highlight) 16%, transparent);
|
|
35
|
+
--rc-listbox-active-color: var(--rc-field-text, FieldText);
|
|
36
|
+
--rc-listbox-selected-bg: var(--rc-highlight, Highlight);
|
|
37
|
+
--rc-listbox-selected-color: var(--rc-highlight-text, HighlightText);
|
|
38
|
+
border: var(--rc-border, 1px solid ButtonBorder);
|
|
39
|
+
border-radius: var(--tailwind-radius-lg, 0.75rem);
|
|
40
|
+
background: var(--tailwind-surface-raised, Canvas);
|
|
41
|
+
box-shadow: var(--rc-shadow, none);
|
|
42
|
+
padding-block: 0.25rem;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-combobox::part(toggle) {
|
|
46
|
+
border-radius: var(--tailwind-radius-sm, 0.25rem);
|
|
47
|
+
transition: background-color var(--rc-motion-duration, 160ms)
|
|
48
|
+
var(--tailwind-motion-easing, ease);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-combobox::part(toggle):hover,
|
|
52
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-combobox[open]::part(toggle) {
|
|
53
|
+
background: color-mix(in srgb, var(--rc-accent, Highlight) 12%, transparent);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
@layer rc-theme-tailwind.components {
|
|
2
|
+
/* A calm grid: hairline row dividers, muted headers, and a subtle row hover. */
|
|
3
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-data-table {
|
|
4
|
+
--rc-data-table-cell-padding-block: 0.625rem;
|
|
5
|
+
--rc-data-table-cell-padding-inline: 0.75rem;
|
|
6
|
+
|
|
7
|
+
color: var(--tailwind-on-surface, CanvasText);
|
|
8
|
+
font-size: var(--tailwind-font-size, 0.95rem);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-data-table > table {
|
|
12
|
+
inline-size: 100%;
|
|
13
|
+
border-collapse: collapse;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-data-table > table > caption {
|
|
17
|
+
padding-block: 0.5rem;
|
|
18
|
+
font-weight: 650;
|
|
19
|
+
text-align: start;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-data-table > table :is(th, td) {
|
|
23
|
+
border-block-end: 1px solid var(--tailwind-border-color, ButtonBorder);
|
|
24
|
+
text-align: start;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-data-table > table > thead th {
|
|
28
|
+
color: var(--tailwind-on-surface-muted, CanvasText);
|
|
29
|
+
font-weight: 600;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-data-table > table > tbody > tr:hover {
|
|
33
|
+
background: color-mix(in srgb, var(--tailwind-primary, Highlight) 5%, transparent);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind))
|
|
37
|
+
rc-data-table
|
|
38
|
+
th[data-rc-sort-key]
|
|
39
|
+
> :is(button, a) {
|
|
40
|
+
border-radius: var(--tailwind-radius-sm, 0.25rem);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-data-table:focus-visible,
|
|
44
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind))
|
|
45
|
+
rc-data-table
|
|
46
|
+
th[data-rc-sort-key]
|
|
47
|
+
> :is(button, a):focus-visible {
|
|
48
|
+
outline: var(--tailwind-focus-ring, 2px solid Highlight);
|
|
49
|
+
outline-offset: var(--tailwind-focus-ring-offset, 2px);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-data-table th[aria-sort] {
|
|
53
|
+
color: var(--tailwind-on-surface, CanvasText);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
@layer rc-theme-tailwind.components {
|
|
2
|
+
/*
|
|
3
|
+
* Maps Tailwind tokens onto the public rc-dialog properties. The surface and
|
|
4
|
+
* the fullscreen geometry are drawn by the component's own light-DOM base
|
|
5
|
+
* layer; what is left here is the mapping plus the open and close motion,
|
|
6
|
+
* which depends on state selectors a bounded property cannot express.
|
|
7
|
+
*/
|
|
8
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-dialog {
|
|
9
|
+
--rc-dialog-border: var(--rc-border, 1px solid ButtonBorder);
|
|
10
|
+
--rc-dialog-radius: var(--tailwind-radius-xl, 1rem);
|
|
11
|
+
--rc-dialog-background: var(--tailwind-surface-raised, Canvas);
|
|
12
|
+
--rc-dialog-color: var(--rc-field-text, CanvasText);
|
|
13
|
+
--rc-dialog-shadow: var(--tailwind-shadow-lg, none);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-dialog > dialog {
|
|
17
|
+
opacity: 1;
|
|
18
|
+
transition:
|
|
19
|
+
display var(--tailwind-motion-duration-slow, 240ms) allow-discrete,
|
|
20
|
+
overlay var(--tailwind-motion-duration-slow, 240ms) allow-discrete,
|
|
21
|
+
opacity var(--tailwind-motion-duration-slow, 240ms) var(--tailwind-motion-easing, ease);
|
|
22
|
+
transition-behavior: allow-discrete;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-dialog > dialog::backdrop {
|
|
26
|
+
transition: opacity var(--tailwind-motion-duration-slow, 240ms)
|
|
27
|
+
var(--tailwind-motion-easing, ease);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@starting-style {
|
|
31
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-dialog > dialog[open] {
|
|
32
|
+
opacity: 0;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-dialog > dialog:not([open]) {
|
|
37
|
+
opacity: 0;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
@layer rc-theme-tailwind.components {
|
|
2
|
+
/*
|
|
3
|
+
* Maps Tailwind tokens onto the public rc-disclosure properties, for both
|
|
4
|
+
* `rc-disclosure` and `rc-accordion`, since a panel reads the same properties
|
|
5
|
+
* either way. The boxes themselves are drawn by the component's own light-DOM
|
|
6
|
+
* base layer.
|
|
7
|
+
*/
|
|
8
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-disclosure {
|
|
9
|
+
/*
|
|
10
|
+
* Layout stays in theme CSS so a disclosure is laid out before the element
|
|
11
|
+
* upgrades; only the property-driven drawing lives in the component's base
|
|
12
|
+
* layer, which needs JS to install.
|
|
13
|
+
*/
|
|
14
|
+
display: block;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) :is(rc-disclosure, rc-accordion) {
|
|
18
|
+
--rc-disclosure-border: var(--rc-border, 1px solid ButtonBorder);
|
|
19
|
+
--rc-disclosure-radius: var(--tailwind-radius-lg, 0.75rem);
|
|
20
|
+
--rc-disclosure-background: var(--tailwind-surface-raised, Canvas);
|
|
21
|
+
--rc-disclosure-color: var(--tailwind-on-surface, CanvasText);
|
|
22
|
+
--rc-disclosure-open-shadow: var(--tailwind-shadow-sm, none);
|
|
23
|
+
|
|
24
|
+
--rc-disclosure-summary-min-block-size: 2.75rem;
|
|
25
|
+
--rc-disclosure-summary-padding-block: 0.75rem;
|
|
26
|
+
--rc-disclosure-summary-padding-inline: 0.875rem;
|
|
27
|
+
--rc-disclosure-summary-gap: 0.75rem;
|
|
28
|
+
--rc-disclosure-summary-font: 650 var(--tailwind-font-size, 0.95rem) /
|
|
29
|
+
var(--tailwind-line-height, 1.45) var(--tailwind-font-family, sans-serif);
|
|
30
|
+
--rc-disclosure-summary-hover-background: color-mix(
|
|
31
|
+
in srgb,
|
|
32
|
+
var(--rc-accent, Highlight) 8%,
|
|
33
|
+
transparent
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
--rc-disclosure-content-padding-block: 0 0.875rem;
|
|
37
|
+
--rc-disclosure-content-padding-inline: 0.875rem;
|
|
38
|
+
--rc-disclosure-content-color: var(--tailwind-on-surface-muted, CanvasText);
|
|
39
|
+
|
|
40
|
+
--rc-disclosure-duration: var(--tailwind-motion-spatial-duration-default, 240ms);
|
|
41
|
+
--rc-disclosure-easing: var(--tailwind-motion-easing, ease);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) :is(rc-disclosure, rc-accordion) > details {
|
|
45
|
+
overflow: clip;
|
|
46
|
+
transition:
|
|
47
|
+
border-color var(--rc-motion-duration, 160ms) var(--tailwind-motion-easing, ease),
|
|
48
|
+
box-shadow var(--rc-motion-duration, 160ms) var(--tailwind-motion-easing, ease);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/*
|
|
52
|
+
* Tailwind replaces the native marker with its own chevron, so it owns both
|
|
53
|
+
* halves of that swap: hiding `::marker` and drawing the affordance. Changing
|
|
54
|
+
* `display` here is safe precisely because this rule also supplies the
|
|
55
|
+
* replacement the lost `list-item` box would have drawn.
|
|
56
|
+
*/
|
|
57
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind))
|
|
58
|
+
:is(rc-disclosure, rc-accordion)
|
|
59
|
+
> details
|
|
60
|
+
> summary {
|
|
61
|
+
display: grid;
|
|
62
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
63
|
+
align-items: center;
|
|
64
|
+
transition:
|
|
65
|
+
background-color var(--rc-motion-duration, 160ms) var(--tailwind-motion-easing, ease),
|
|
66
|
+
color var(--rc-motion-duration, 160ms) var(--tailwind-motion-easing, ease);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind))
|
|
70
|
+
:is(rc-disclosure, rc-accordion)
|
|
71
|
+
> details
|
|
72
|
+
> summary::marker {
|
|
73
|
+
content: '';
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind))
|
|
77
|
+
:is(rc-disclosure, rc-accordion)
|
|
78
|
+
> details
|
|
79
|
+
> summary::-webkit-details-marker {
|
|
80
|
+
display: none;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind))
|
|
84
|
+
:is(rc-disclosure, rc-accordion)
|
|
85
|
+
> details
|
|
86
|
+
> summary::after {
|
|
87
|
+
content: '';
|
|
88
|
+
inline-size: 0.5rem;
|
|
89
|
+
block-size: 0.5rem;
|
|
90
|
+
border-block-start: 2px solid currentColor;
|
|
91
|
+
border-inline-end: 2px solid currentColor;
|
|
92
|
+
rotate: 45deg;
|
|
93
|
+
transition:
|
|
94
|
+
rotate var(--rc-motion-duration, 160ms) var(--tailwind-motion-easing, ease),
|
|
95
|
+
translate var(--rc-motion-duration, 160ms) var(--tailwind-motion-easing, ease);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind))
|
|
99
|
+
:is(rc-disclosure, rc-accordion)
|
|
100
|
+
> details[open]
|
|
101
|
+
> summary::after {
|
|
102
|
+
rotate: 135deg;
|
|
103
|
+
translate: 0 -0.125rem;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind))
|
|
107
|
+
:is(rc-disclosure, rc-accordion)
|
|
108
|
+
> details
|
|
109
|
+
> :not(summary) {
|
|
110
|
+
display: flow-root;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@layer rc-theme-tailwind.components {
|
|
2
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-fab-menu {
|
|
3
|
+
--rc-fab-menu-size: 3.5rem;
|
|
4
|
+
--rc-fab-menu-trigger-gap: 0.5rem;
|
|
5
|
+
--rc-fab-menu-padding-block: 0;
|
|
6
|
+
--rc-fab-menu-padding-inline: 1rem;
|
|
7
|
+
--rc-fab-menu-appearance: none;
|
|
8
|
+
--rc-fab-menu-border: 0;
|
|
9
|
+
--rc-fab-menu-bg: var(--rc-accent, Highlight);
|
|
10
|
+
--rc-fab-menu-bg-hover: var(--rc-fab-menu-bg);
|
|
11
|
+
--rc-fab-menu-bg-open: var(--rc-fab-menu-bg-hover);
|
|
12
|
+
--rc-fab-menu-color: var(--rc-on-accent, HighlightText);
|
|
13
|
+
--rc-fab-menu-shadow: var(--tailwind-shadow-md, var(--rc-shadow-level2, none));
|
|
14
|
+
--rc-fab-menu-shadow-hover: var(--tailwind-shadow-lg, var(--rc-shadow-level3, none));
|
|
15
|
+
--rc-fab-menu-shadow-open: var(--rc-fab-menu-shadow-hover);
|
|
16
|
+
--rc-fab-menu-shadow-active: var(--tailwind-shadow-md, var(--rc-shadow-level2, none));
|
|
17
|
+
--rc-fab-menu-radius: var(--tailwind-radius-lg, 1rem);
|
|
18
|
+
--rc-fab-menu-font: inherit;
|
|
19
|
+
--rc-fab-menu-font-family: inherit;
|
|
20
|
+
--rc-fab-menu-font-size: 0.875rem;
|
|
21
|
+
--rc-fab-menu-font-weight: 500;
|
|
22
|
+
--rc-fab-menu-letter-spacing: 0.00625em;
|
|
23
|
+
--rc-fab-menu-text-decoration: none;
|
|
24
|
+
--rc-fab-menu-user-select: none;
|
|
25
|
+
--rc-fab-menu-transition:
|
|
26
|
+
background var(--rc-motion-duration, 200ms) ease,
|
|
27
|
+
box-shadow var(--rc-motion-duration, 200ms) ease,
|
|
28
|
+
transform var(--rc-motion-duration, 200ms) ease;
|
|
29
|
+
--rc-fab-menu-active-transform: scale(0.96);
|
|
30
|
+
--rc-fab-menu-disabled-opacity: var(--rc-disabled-opacity, 0.38);
|
|
31
|
+
--rc-fab-menu-disabled-shadow: none;
|
|
32
|
+
--rc-fab-menu-focus-ring: var(--rc-focus-ring);
|
|
33
|
+
--rc-fab-menu-focus-ring-offset: var(--rc-focus-ring-offset);
|
|
34
|
+
--rc-fab-menu-popup-duration: var(--rc-motion-duration, 160ms);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
@layer rc-theme-tailwind.components {
|
|
2
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-fab {
|
|
3
|
+
--rc-fab-size: 3.5rem;
|
|
4
|
+
--rc-fab-gap: 0.5rem;
|
|
5
|
+
--rc-fab-padding-block: 0;
|
|
6
|
+
--rc-fab-padding-inline: 1rem;
|
|
7
|
+
--rc-fab-border: 0;
|
|
8
|
+
--rc-fab-bg: var(--rc-accent, Highlight);
|
|
9
|
+
--rc-fab-bg-hover: var(--rc-fab-bg);
|
|
10
|
+
--rc-fab-color: var(--tailwind-on-primary, HighlightText);
|
|
11
|
+
--rc-fab-radius: var(--tailwind-radius-lg, 0.75rem);
|
|
12
|
+
--rc-fab-shadow: var(--tailwind-shadow-md, none);
|
|
13
|
+
--rc-fab-shadow-hover: var(--tailwind-shadow-lg, none);
|
|
14
|
+
--rc-fab-shadow-active: var(--rc-fab-shadow);
|
|
15
|
+
--rc-fab-font-family: var(--rc-font-family, inherit);
|
|
16
|
+
--rc-fab-font-size: var(--rc-font-size, 0.875rem);
|
|
17
|
+
--rc-fab-font-weight: 500;
|
|
18
|
+
--rc-fab-letter-spacing: 0.00625em;
|
|
19
|
+
--rc-fab-active-transform: scale(0.96);
|
|
20
|
+
--rc-fab-focus-ring: var(--rc-focus-ring);
|
|
21
|
+
--rc-fab-focus-ring-offset: var(--rc-focus-ring-offset);
|
|
22
|
+
--rc-fab-disabled-opacity: var(--rc-disabled-opacity, 0.38);
|
|
23
|
+
--rc-fab-disabled-shadow: none;
|
|
24
|
+
--rc-fab-transition:
|
|
25
|
+
background var(--rc-motion-duration, 200ms) ease,
|
|
26
|
+
box-shadow var(--rc-motion-duration, 200ms) ease,
|
|
27
|
+
transform var(--rc-motion-duration, 200ms) ease;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-fab > button {
|
|
31
|
+
transition:
|
|
32
|
+
box-shadow var(--rc-motion-duration, 160ms) var(--tailwind-motion-easing, ease),
|
|
33
|
+
transform var(--rc-motion-duration, 160ms) var(--tailwind-motion-easing, ease);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-fab > button:hover {
|
|
37
|
+
box-shadow: var(--tailwind-shadow-lg, none);
|
|
38
|
+
transform: translateY(-1px);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-fab > button:active {
|
|
42
|
+
transform: translateY(0);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
@layer rc-theme-tailwind.components {
|
|
2
|
+
/*
|
|
3
|
+
* rc-field already owns its own layout, invalid border, disabled opacity,
|
|
4
|
+
* focus outline, and forced-colors fallbacks, and it resets the slotted
|
|
5
|
+
* native control's chrome itself. Tailwind only supplies its palette and
|
|
6
|
+
* the hover/focus polish its other form controls share, so the field reads
|
|
7
|
+
* as one of them rather than as a separate idiom.
|
|
8
|
+
*/
|
|
9
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-field {
|
|
10
|
+
/*
|
|
11
|
+
* The component is inline-block, so an unsized field shrink-wraps to its
|
|
12
|
+
* content: a provider-backed field with no value collapses to its chevron.
|
|
13
|
+
* Fill the container instead, capped so a field in a wide layout stays a
|
|
14
|
+
* readable measure.
|
|
15
|
+
*/
|
|
16
|
+
display: inline-block;
|
|
17
|
+
inline-size: min(100%, 28rem);
|
|
18
|
+
--rc-field-background: var(--tailwind-field, Field);
|
|
19
|
+
--rc-field-color: var(--rc-field-text, FieldText);
|
|
20
|
+
--rc-field-border: var(--rc-border, 1px solid ButtonBorder);
|
|
21
|
+
--rc-field-radius: var(--rc-control-radius, 0.5rem);
|
|
22
|
+
--rc-field-min-block-size: var(--rc-control-block-size, 2.5rem);
|
|
23
|
+
--rc-field-padding: var(--rc-control-padding-block, 0.5rem)
|
|
24
|
+
var(--rc-control-padding-inline, 0.75rem);
|
|
25
|
+
--rc-field-control-gap: var(--tailwind-control-gap, 0.5rem);
|
|
26
|
+
--rc-field-label-color: var(--tailwind-on-surface-muted, GrayText);
|
|
27
|
+
--rc-field-error-color: var(--tailwind-error, red);
|
|
28
|
+
--rc-field-supporting-color: var(--tailwind-on-surface-muted, GrayText);
|
|
29
|
+
--rc-field-supporting-font-size: 0.8125rem;
|
|
30
|
+
--rc-field-supporting-padding-block-start: 0.25rem;
|
|
31
|
+
--rc-field-focus-outline: var(--rc-focus-ring, 2px solid Highlight);
|
|
32
|
+
--rc-field-focus-outline-offset: var(--rc-focus-ring-offset, 2px);
|
|
33
|
+
--rc-field-disabled-opacity: var(--rc-disabled-opacity, 0.52);
|
|
34
|
+
font-family: var(--rc-font-family, inherit);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-field::part(field) {
|
|
38
|
+
transition:
|
|
39
|
+
border-color var(--rc-motion-duration, 160ms) var(--tailwind-motion-easing, ease),
|
|
40
|
+
box-shadow var(--rc-motion-duration, 160ms) var(--tailwind-motion-easing, ease);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/*
|
|
44
|
+
* rc-field resets the slotted native control's outline, but a ::slotted()
|
|
45
|
+
* rule loses to any page rule, such as a reset's Firefox :-moz-focusring
|
|
46
|
+
* outline. The field already shows focus, so clear the control's own
|
|
47
|
+
* outline from the light DOM too.
|
|
48
|
+
*/
|
|
49
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind))
|
|
50
|
+
rc-field
|
|
51
|
+
> :is(input, select, textarea):focus-visible {
|
|
52
|
+
outline: none;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Same hover and focus treatment rc-select, rc-combobox, and rc-textarea use. */
|
|
56
|
+
/* Read-only fields keep focus treatment but skip the hover affordance. */
|
|
57
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind))
|
|
58
|
+
rc-field:not([data-readonly]):hover::part(field) {
|
|
59
|
+
border-color: color-mix(in srgb, var(--rc-accent, Highlight) 55%, var(--rc-border-color));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-field[data-focused]::part(field) {
|
|
63
|
+
box-shadow: 0 0 0 4px color-mix(in srgb, var(--rc-accent, Highlight) 16%, transparent);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-field[data-invalid]::part(label),
|
|
67
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind))
|
|
68
|
+
rc-field[data-group][data-invalid]
|
|
69
|
+
> fieldset
|
|
70
|
+
> legend {
|
|
71
|
+
color: var(--rc-field-error-color, red);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-field[data-invalid]:hover::part(field) {
|
|
75
|
+
border-color: var(--rc-field-error-color, red);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* A textarea grows downward, so its label and control belong at the top. */
|
|
79
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-field[data-multiline]::part(field) {
|
|
80
|
+
align-items: flex-start;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-field[data-multiline]::part(control) {
|
|
84
|
+
align-items: flex-start;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-field > input,
|
|
88
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind)) rc-field > textarea {
|
|
89
|
+
caret-color: var(--rc-accent, Highlight);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/*
|
|
93
|
+
* Control providers: rc-field's own surface draws the border, background,
|
|
94
|
+
* and focus ring, so the enhancing child has to stop drawing its own or the
|
|
95
|
+
* two sets of chrome nest visibly.
|
|
96
|
+
*/
|
|
97
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind))
|
|
98
|
+
rc-field
|
|
99
|
+
> rc-textarea[data-rc-field-control] {
|
|
100
|
+
--rc-textarea-border: 0;
|
|
101
|
+
--rc-textarea-border-radius: 0;
|
|
102
|
+
--rc-textarea-background: transparent;
|
|
103
|
+
--rc-textarea-padding-block: 0;
|
|
104
|
+
--rc-textarea-padding-inline: 0;
|
|
105
|
+
inline-size: 100%;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind))
|
|
109
|
+
rc-field
|
|
110
|
+
> rc-textarea[data-rc-field-control]::part(root):focus-within {
|
|
111
|
+
box-shadow: none;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind))
|
|
115
|
+
rc-field
|
|
116
|
+
> :is(rc-select, rc-combobox)[data-rc-field-control] {
|
|
117
|
+
--rc-field: transparent;
|
|
118
|
+
inline-size: 100%;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind))
|
|
122
|
+
rc-field
|
|
123
|
+
> rc-select[data-rc-field-control]::part(trigger),
|
|
124
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind))
|
|
125
|
+
rc-field
|
|
126
|
+
> rc-combobox[data-rc-field-control]::part(anchor) {
|
|
127
|
+
min-block-size: 0;
|
|
128
|
+
padding-inline: 0;
|
|
129
|
+
border: 0;
|
|
130
|
+
border-radius: 0;
|
|
131
|
+
background: transparent;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/*
|
|
135
|
+
* Tailwind sets the hover and focus chrome on the part directly rather than
|
|
136
|
+
* through a resettable property, so suppressing it needs the same
|
|
137
|
+
* specificity back.
|
|
138
|
+
*/
|
|
139
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind))
|
|
140
|
+
rc-field
|
|
141
|
+
> rc-select[data-rc-field-control]::part(trigger):is(
|
|
142
|
+
:hover,
|
|
143
|
+
:focus-visible,
|
|
144
|
+
[aria-expanded='true']
|
|
145
|
+
),
|
|
146
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind))
|
|
147
|
+
rc-field
|
|
148
|
+
> rc-combobox[data-rc-field-control]::part(anchor):is(:hover, :focus-within) {
|
|
149
|
+
border-color: transparent;
|
|
150
|
+
background: transparent;
|
|
151
|
+
outline: none;
|
|
152
|
+
box-shadow: none;
|
|
153
|
+
}
|
|
154
|
+
}
|