@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,31 @@
|
|
|
1
|
+
@layer rc-base, rc-theme-tailwind.defaults, rc-theme-tailwind.bridge, rc-theme-tailwind.native, rc-theme-tailwind.components, rc-theme-tailwind.css-components,
|
|
2
|
+
rc-theme-tailwind.overrides;
|
|
3
|
+
|
|
4
|
+
@import './css-components/button.css';
|
|
5
|
+
@import './css-components/chip.css';
|
|
6
|
+
@import './css-components/chip-group.css';
|
|
7
|
+
@import './css-components/select.css';
|
|
8
|
+
@import './css-components/textarea.css';
|
|
9
|
+
@import './css-components/card.css';
|
|
10
|
+
@import './css-components/list.css';
|
|
11
|
+
@import './css-components/disclosure.css';
|
|
12
|
+
|
|
13
|
+
@layer rc-theme-tailwind.css-components {
|
|
14
|
+
@media (forced-colors: active) {
|
|
15
|
+
:where(.rc-theme-tailwind, :host(.rc-theme-tailwind))
|
|
16
|
+
:where(
|
|
17
|
+
button.rc-button,
|
|
18
|
+
a.rc-button,
|
|
19
|
+
button.rc-chip,
|
|
20
|
+
a.rc-chip,
|
|
21
|
+
label.rc-chip,
|
|
22
|
+
select.rc-select,
|
|
23
|
+
textarea.rc-textarea,
|
|
24
|
+
.rc-card,
|
|
25
|
+
.rc-list,
|
|
26
|
+
details.rc-disclosure
|
|
27
|
+
) {
|
|
28
|
+
forced-color-adjust: auto;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
package/defaults.css
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
@layer rc-base, rc-theme-tailwind.defaults, rc-theme-tailwind.bridge, rc-theme-tailwind.native, rc-theme-tailwind.components, rc-theme-tailwind.css-components,
|
|
2
|
+
rc-theme-tailwind.overrides;
|
|
3
|
+
|
|
4
|
+
@layer rc-theme-tailwind.defaults {
|
|
5
|
+
/*
|
|
6
|
+
* Tailwind CSS v4 reference tokens.
|
|
7
|
+
*
|
|
8
|
+
* These defaults are scoped so applications can place the theme at any app
|
|
9
|
+
* boundary. Import bridge.css alone when providing your own Tailwind theme.
|
|
10
|
+
*/
|
|
11
|
+
.rc-theme-tailwind,
|
|
12
|
+
:host(.rc-theme-tailwind) {
|
|
13
|
+
color-scheme: light dark;
|
|
14
|
+
|
|
15
|
+
--color-cyan-600: light-dark(oklch(60.9% 0.126 221.723), oklch(71.5% 0.143 215.221));
|
|
16
|
+
--color-cyan-100: light-dark(oklch(95.6% 0.045 203.388), oklch(30.2% 0.056 229.695));
|
|
17
|
+
--color-cyan-950: light-dark(oklch(30.2% 0.056 229.695), oklch(95.6% 0.045 203.388));
|
|
18
|
+
--color-white: light-dark(oklch(100% 0 0), oklch(20.8% 0.042 265.755));
|
|
19
|
+
--color-slate-50: light-dark(oklch(98.4% 0.003 247.858), oklch(20.8% 0.042 265.755));
|
|
20
|
+
--color-slate-200: oklch(92.9% 0.013 255.508);
|
|
21
|
+
--color-slate-600: light-dark(oklch(44.6% 0.043 257.281), oklch(70.4% 0.04 256.788));
|
|
22
|
+
--color-slate-950: light-dark(oklch(12.9% 0.042 264.695), oklch(98.4% 0.003 247.858));
|
|
23
|
+
--color-slate-900: light-dark(oklch(20.8% 0.042 265.755), oklch(98.4% 0.003 247.858));
|
|
24
|
+
--color-red-600: light-dark(oklch(57.7% 0.245 27.325), oklch(70.4% 0.191 22.216));
|
|
25
|
+
--spacing: 0.25rem;
|
|
26
|
+
--font-sans: ui-sans-serif, system-ui, sans-serif;
|
|
27
|
+
--text-sm: 0.875rem;
|
|
28
|
+
--leading-normal: 1.5;
|
|
29
|
+
--font-weight-normal: 400;
|
|
30
|
+
--radius-sm: 0.25rem;
|
|
31
|
+
--radius-md: 0.375rem;
|
|
32
|
+
--radius-lg: 0.5rem;
|
|
33
|
+
--radius-xl: 0.75rem;
|
|
34
|
+
--radius-full: 999px;
|
|
35
|
+
--shadow-sm: 0 1px 2px 0 rgb(2 6 23 / 10%);
|
|
36
|
+
--shadow-md: 0 4px 6px -1px rgb(2 6 23 / 12%);
|
|
37
|
+
--shadow-lg: 0 10px 15px -3px rgb(2 6 23 / 14%);
|
|
38
|
+
--ease-out: cubic-bezier(0.2, 0, 0, 1);
|
|
39
|
+
|
|
40
|
+
--tailwind-primary: var(--color-cyan-600);
|
|
41
|
+
--tailwind-on-primary: var(--color-white);
|
|
42
|
+
--tailwind-primary-container: var(--color-cyan-100);
|
|
43
|
+
--tailwind-on-primary-container: var(--color-cyan-950);
|
|
44
|
+
--tailwind-surface: var(--color-slate-50);
|
|
45
|
+
--tailwind-surface-raised: var(--color-white);
|
|
46
|
+
--tailwind-field: var(--color-white);
|
|
47
|
+
--tailwind-on-surface: var(--color-slate-950);
|
|
48
|
+
--tailwind-on-surface-muted: var(--color-slate-600);
|
|
49
|
+
--tailwind-border-color: var(--color-slate-200);
|
|
50
|
+
--tailwind-shadow-color: color-mix(in oklch, var(--color-slate-950) 18%, transparent);
|
|
51
|
+
|
|
52
|
+
/* Flipped against the surface pair, for the snackbar and anything else
|
|
53
|
+
* that has to read as a layer above the page rather than part of it. */
|
|
54
|
+
--tailwind-inverse-surface: var(--color-slate-900);
|
|
55
|
+
--tailwind-inverse-on-surface: var(--color-white);
|
|
56
|
+
|
|
57
|
+
/*
|
|
58
|
+
* Held in the red range so it reads as an error rather than a darker shade
|
|
59
|
+
* of the cyan primary. Clears 7:1 against the field in both modes.
|
|
60
|
+
*/
|
|
61
|
+
--tailwind-error: var(--color-red-600);
|
|
62
|
+
|
|
63
|
+
--tailwind-font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif);
|
|
64
|
+
--tailwind-font-size: var(--text-sm, 0.875rem);
|
|
65
|
+
--tailwind-line-height: var(--leading-normal, 1.5);
|
|
66
|
+
--tailwind-font-weight: var(--font-weight-normal, 400);
|
|
67
|
+
|
|
68
|
+
--tailwind-radius-sm: var(--radius-sm, 0.25rem);
|
|
69
|
+
--tailwind-radius-md: var(--radius-md, 0.375rem);
|
|
70
|
+
--tailwind-radius-lg: var(--radius-lg, 0.5rem);
|
|
71
|
+
--tailwind-radius-xl: var(--radius-xl, 0.75rem);
|
|
72
|
+
--tailwind-radius-pill: var(--radius-full, 999px);
|
|
73
|
+
|
|
74
|
+
--tailwind-control-block-size: calc(var(--spacing, 0.25rem) * 10);
|
|
75
|
+
--tailwind-control-padding-block: calc(var(--spacing, 0.25rem) * 2);
|
|
76
|
+
--tailwind-control-padding-inline: calc(var(--spacing, 0.25rem) * 3);
|
|
77
|
+
--tailwind-control-gap: calc(var(--spacing, 0.25rem) * 2);
|
|
78
|
+
--tailwind-item-padding-block: calc(var(--spacing, 0.25rem) * 2.5);
|
|
79
|
+
--tailwind-item-padding-inline: calc(var(--spacing, 0.25rem) * 3);
|
|
80
|
+
--tailwind-item-gap: calc(var(--spacing, 0.25rem) * 2);
|
|
81
|
+
|
|
82
|
+
--tailwind-shadow-sm: var(--shadow-sm, 0 1px 2px 0 var(--tailwind-shadow-color));
|
|
83
|
+
--tailwind-shadow-md: var(--shadow-md, 0 4px 6px -1px var(--tailwind-shadow-color));
|
|
84
|
+
--tailwind-shadow-lg: var(--shadow-lg, 0 10px 15px -3px var(--tailwind-shadow-color));
|
|
85
|
+
|
|
86
|
+
--tailwind-focus-ring: 2px solid var(--color-cyan-600);
|
|
87
|
+
--tailwind-focus-ring-offset: 2px;
|
|
88
|
+
--tailwind-motion-duration: 160ms;
|
|
89
|
+
--tailwind-motion-duration-slow: 240ms;
|
|
90
|
+
--tailwind-motion-easing: var(--ease-out, cubic-bezier(0.2, 0, 0, 1));
|
|
91
|
+
/*
|
|
92
|
+
* The shared spatial/effects scale (see the styling guide), kept as its
|
|
93
|
+
* own small set of primitives rather than derived from the two above:
|
|
94
|
+
* Tailwind favors few named tokens over a layered primitive/semantic
|
|
95
|
+
* split, and the values only partly overlap (160/240ms already meant
|
|
96
|
+
* something as the flat scale; here they mean the spatial tier).
|
|
97
|
+
*/
|
|
98
|
+
--tailwind-motion-effects-duration-fast: 100ms;
|
|
99
|
+
--tailwind-motion-effects-duration-default: 160ms;
|
|
100
|
+
--tailwind-motion-effects-duration-slow: 240ms;
|
|
101
|
+
--tailwind-motion-spatial-duration-fast: 160ms;
|
|
102
|
+
--tailwind-motion-spatial-duration-default: 240ms;
|
|
103
|
+
--tailwind-motion-spatial-duration-slow: 320ms;
|
|
104
|
+
--tailwind-disabled-opacity: 0.52;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@media (forced-colors: active) {
|
|
108
|
+
.rc-theme-tailwind,
|
|
109
|
+
:host(.rc-theme-tailwind) {
|
|
110
|
+
--color-cyan-600: Highlight;
|
|
111
|
+
--color-cyan-100: Highlight;
|
|
112
|
+
--color-cyan-950: HighlightText;
|
|
113
|
+
--color-white: Canvas;
|
|
114
|
+
--color-slate-50: Canvas;
|
|
115
|
+
--color-slate-200: ButtonBorder;
|
|
116
|
+
--color-slate-600: GrayText;
|
|
117
|
+
--color-slate-950: CanvasText;
|
|
118
|
+
--color-slate-900: CanvasText;
|
|
119
|
+
--color-red-600: Mark;
|
|
120
|
+
--tailwind-primary: Highlight;
|
|
121
|
+
--tailwind-on-primary: HighlightText;
|
|
122
|
+
--tailwind-primary-container: Highlight;
|
|
123
|
+
--tailwind-on-primary-container: HighlightText;
|
|
124
|
+
--tailwind-surface: Canvas;
|
|
125
|
+
--tailwind-surface-raised: Canvas;
|
|
126
|
+
--tailwind-field: Field;
|
|
127
|
+
--tailwind-on-surface: CanvasText;
|
|
128
|
+
--tailwind-on-surface-muted: GrayText;
|
|
129
|
+
--tailwind-inverse-surface: CanvasText;
|
|
130
|
+
--tailwind-inverse-on-surface: Canvas;
|
|
131
|
+
--tailwind-error: Mark;
|
|
132
|
+
--tailwind-border-color: ButtonBorder;
|
|
133
|
+
--tailwind-shadow-color: transparent;
|
|
134
|
+
--tailwind-focus-ring: 2px solid Highlight;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
package/layers.css
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Cascade layer order for apps that also load Tailwind CSS v4. Import this
|
|
3
|
+
* before both Tailwind and this theme. It places the rc layers after
|
|
4
|
+
* Tailwind's `base` layer, so Preflight resets cannot override component
|
|
5
|
+
* structure or theme rules, and before `components` and `utilities`, so an
|
|
6
|
+
* app's own component classes and utilities still win over the theme.
|
|
7
|
+
*/
|
|
8
|
+
@layer theme, base, rc-base, rc-theme-tailwind.defaults, rc-theme-tailwind.bridge,
|
|
9
|
+
rc-theme-tailwind.native, rc-theme-tailwind.components, rc-theme-tailwind.css-components,
|
|
10
|
+
rc-theme-tailwind.overrides, components, utilities;
|
package/native.css
ADDED
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
@layer rc-base, rc-theme-tailwind.defaults, rc-theme-tailwind.bridge, rc-theme-tailwind.native, rc-theme-tailwind.components, rc-theme-tailwind.css-components,
|
|
2
|
+
rc-theme-tailwind.overrides;
|
|
3
|
+
|
|
4
|
+
/* Import defaults.css and bridge.css first when theme tokens are desired. */
|
|
5
|
+
@layer rc-theme-tailwind.native {
|
|
6
|
+
/*
|
|
7
|
+
* Native styles stop at native controls that are part of an RC-owned
|
|
8
|
+
* presentation, and at subtrees the consumer opts out with
|
|
9
|
+
* data-rc-native="off". These are element-level ownership contracts rather
|
|
10
|
+
* than host boundaries, so ordinary controls remain themed in layout
|
|
11
|
+
* components such as rc-toolbar, rc-card, rc-dialog, and rc-popover.
|
|
12
|
+
*/
|
|
13
|
+
:where(.rc-theme-tailwind:not([data-rc-native='off']))
|
|
14
|
+
:where(button, input, select, textarea, progress):not(
|
|
15
|
+
:where(
|
|
16
|
+
[data-rc-native='off'],
|
|
17
|
+
[data-rc-native='off'] *,
|
|
18
|
+
rc-button > :is(button, a[href]),
|
|
19
|
+
rc-chip > :is(button, a[href], label),
|
|
20
|
+
rc-chip > label > input:is([type='checkbox'], [type='radio']),
|
|
21
|
+
rc-combobox > select,
|
|
22
|
+
rc-fab > button,
|
|
23
|
+
rc-fab-menu > [slot='trigger'],
|
|
24
|
+
rc-field > :is(input, select, textarea),
|
|
25
|
+
rc-field > [data-rc-field-control] > :is(input, select, textarea),
|
|
26
|
+
rc-field > fieldset > :is(input, select, textarea),
|
|
27
|
+
rc-listbox > select,
|
|
28
|
+
rc-markdown-editor > textarea,
|
|
29
|
+
rc-navigation-rail > [slot='toggle'],
|
|
30
|
+
rc-menu-button > [slot='trigger'],
|
|
31
|
+
rc-progress > progress,
|
|
32
|
+
rc-range-slider > input[type='range'],
|
|
33
|
+
rc-search-bar > input[type='search'],
|
|
34
|
+
rc-segmented-button > fieldset input[type='radio'],
|
|
35
|
+
rc-select > select,
|
|
36
|
+
rc-slider > input[type='range'],
|
|
37
|
+
rc-switch > input[type='checkbox'],
|
|
38
|
+
rc-textarea > textarea,
|
|
39
|
+
rc-transfer-list > select
|
|
40
|
+
)
|
|
41
|
+
),
|
|
42
|
+
:host(:not([data-rc-native='off']).rc-theme-tailwind)
|
|
43
|
+
:where(button, input, select, textarea, progress):not(
|
|
44
|
+
:where(
|
|
45
|
+
[data-rc-native='off'],
|
|
46
|
+
[data-rc-native='off'] *,
|
|
47
|
+
rc-button > :is(button, a[href]),
|
|
48
|
+
rc-chip > :is(button, a[href], label),
|
|
49
|
+
rc-chip > label > input:is([type='checkbox'], [type='radio']),
|
|
50
|
+
rc-combobox > select,
|
|
51
|
+
rc-fab > button,
|
|
52
|
+
rc-fab-menu > [slot='trigger'],
|
|
53
|
+
rc-field > :is(input, select, textarea),
|
|
54
|
+
rc-field > [data-rc-field-control] > :is(input, select, textarea),
|
|
55
|
+
rc-field > fieldset > :is(input, select, textarea),
|
|
56
|
+
rc-listbox > select,
|
|
57
|
+
rc-markdown-editor > textarea,
|
|
58
|
+
rc-navigation-rail > [slot='toggle'],
|
|
59
|
+
rc-menu-button > [slot='trigger'],
|
|
60
|
+
rc-progress > progress,
|
|
61
|
+
rc-range-slider > input[type='range'],
|
|
62
|
+
rc-search-bar > input[type='search'],
|
|
63
|
+
rc-segmented-button > fieldset input[type='radio'],
|
|
64
|
+
rc-select > select,
|
|
65
|
+
rc-slider > input[type='range'],
|
|
66
|
+
rc-switch > input[type='checkbox'],
|
|
67
|
+
rc-textarea > textarea,
|
|
68
|
+
rc-transfer-list > select
|
|
69
|
+
)
|
|
70
|
+
) {
|
|
71
|
+
&:where(button):not(:where(.rc-button, .rc-chip)) {
|
|
72
|
+
box-sizing: border-box;
|
|
73
|
+
display: inline-flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
gap: var(--rc-button-gap, var(--rc-control-gap, 0.5rem));
|
|
77
|
+
min-block-size: var(--rc-button-block-size, var(--rc-control-block-size, 2.5rem));
|
|
78
|
+
padding-block: var(--rc-button-padding-block, var(--rc-control-padding-block, 0.5rem));
|
|
79
|
+
padding-inline: var(--rc-button-padding-inline, var(--rc-control-padding-inline, 1rem));
|
|
80
|
+
border: var(--rc-button-border, var(--rc-border, 1px solid ButtonBorder));
|
|
81
|
+
border-radius: var(--rc-button-radius, var(--rc-control-radius, 999px));
|
|
82
|
+
background: var(--rc-button-bg, ButtonFace);
|
|
83
|
+
color: var(--rc-button-color, var(--rc-button-text, ButtonText));
|
|
84
|
+
font-family: var(--rc-font-family, sans-serif);
|
|
85
|
+
font-size: var(--rc-font-size, 1rem);
|
|
86
|
+
font-weight: var(--rc-font-weight, 400);
|
|
87
|
+
line-height: var(--rc-line-height, normal);
|
|
88
|
+
cursor: pointer;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&:where(
|
|
92
|
+
input:is(
|
|
93
|
+
[type='text'],
|
|
94
|
+
[type='search'],
|
|
95
|
+
[type='email'],
|
|
96
|
+
[type='url'],
|
|
97
|
+
[type='tel'],
|
|
98
|
+
[type='number'],
|
|
99
|
+
[type='password'],
|
|
100
|
+
:where(:not([type]))
|
|
101
|
+
),
|
|
102
|
+
select,
|
|
103
|
+
textarea
|
|
104
|
+
) {
|
|
105
|
+
box-sizing: border-box;
|
|
106
|
+
min-block-size: var(--rc-control-block-size, 2.5rem);
|
|
107
|
+
padding-block: var(--rc-control-padding-block, 0.5rem);
|
|
108
|
+
padding-inline: var(--rc-control-padding-inline, 1rem);
|
|
109
|
+
border: var(--rc-border, 1px solid ButtonBorder);
|
|
110
|
+
border-radius: var(--rc-control-radius, 0.5rem);
|
|
111
|
+
background: var(--rc-field, Field);
|
|
112
|
+
color: var(--rc-field-text, FieldText);
|
|
113
|
+
font-family: var(--rc-font-family, sans-serif);
|
|
114
|
+
font-size: var(--rc-font-size, 1rem);
|
|
115
|
+
font-weight: var(--rc-font-weight, 400);
|
|
116
|
+
line-height: var(--rc-line-height, normal);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&:where(select):not(:where(.rc-select)) {
|
|
120
|
+
cursor: pointer;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&:not(:where(.rc-button, .rc-chip, .rc-select, .rc-textarea)):focus-visible {
|
|
124
|
+
outline: var(--rc-focus-ring, 2px solid Highlight);
|
|
125
|
+
outline-offset: var(--rc-focus-ring-offset, 2px);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&:where(input[type='checkbox'], input[type='radio'], input[type='range']) {
|
|
129
|
+
min-block-size: auto;
|
|
130
|
+
padding: 0;
|
|
131
|
+
accent-color: var(--rc-accent, AccentColor);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&:where(input[type='range'], progress) {
|
|
135
|
+
inline-size: 100%;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&:where(progress) {
|
|
139
|
+
accent-color: var(--rc-accent, AccentColor);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&:not(:where(.rc-button, .rc-chip)):where(:disabled) {
|
|
143
|
+
color: var(--rc-text-disabled, GrayText);
|
|
144
|
+
cursor: not-allowed;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* Reassert rc-base light-DOM row geometry after generic native presentation. */
|
|
150
|
+
@layer rc-theme-tailwind.components {
|
|
151
|
+
:where(.rc-theme-tailwind:not([data-rc-native='off']))
|
|
152
|
+
:where(rc-menu :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio'])):not(
|
|
153
|
+
:where([data-rc-native='off'], [data-rc-native='off'] *)
|
|
154
|
+
),
|
|
155
|
+
:host(:not([data-rc-native='off']).rc-theme-tailwind)
|
|
156
|
+
:where(rc-menu :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio'])):not(
|
|
157
|
+
:where([data-rc-native='off'], [data-rc-native='off'] *)
|
|
158
|
+
) {
|
|
159
|
+
display: flex;
|
|
160
|
+
gap: var(--rc-menu-item-gap, var(--rc-item-gap, 0.5em));
|
|
161
|
+
min-block-size: var(--rc-menu-item-min-block-size, 0px);
|
|
162
|
+
justify-content: normal;
|
|
163
|
+
padding: var(--rc-menu-item-padding-block, var(--rc-item-padding-block, 0.3em))
|
|
164
|
+
var(--rc-menu-item-padding-inline, var(--rc-item-padding-inline, 0.75em));
|
|
165
|
+
border: none;
|
|
166
|
+
border-radius: 0;
|
|
167
|
+
background: transparent;
|
|
168
|
+
color: inherit;
|
|
169
|
+
font: inherit;
|
|
170
|
+
cursor: default;
|
|
171
|
+
outline: none;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
:where(.rc-theme-tailwind:not([data-rc-native='off']))
|
|
175
|
+
rc-menu
|
|
176
|
+
:is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']):hover:not(
|
|
177
|
+
:where([data-rc-native='off'], [data-rc-native='off'] *)
|
|
178
|
+
),
|
|
179
|
+
:host(:not([data-rc-native='off']).rc-theme-tailwind)
|
|
180
|
+
rc-menu
|
|
181
|
+
:is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']):hover:not(
|
|
182
|
+
:where([data-rc-native='off'], [data-rc-native='off'] *)
|
|
183
|
+
) {
|
|
184
|
+
background: var(--rc-menu-hover-bg, color-mix(in srgb, Highlight 8%, transparent));
|
|
185
|
+
color: var(--rc-menu-hover-color, inherit);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
:where(.rc-theme-tailwind:not([data-rc-native='off']))
|
|
189
|
+
rc-menu
|
|
190
|
+
:is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio'])[data-active]:not(
|
|
191
|
+
:where([data-rc-native='off'], [data-rc-native='off'] *)
|
|
192
|
+
),
|
|
193
|
+
:host(:not([data-rc-native='off']).rc-theme-tailwind)
|
|
194
|
+
rc-menu
|
|
195
|
+
:is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio'])[data-active]:not(
|
|
196
|
+
:where([data-rc-native='off'], [data-rc-native='off'] *)
|
|
197
|
+
) {
|
|
198
|
+
background: var(--rc-menu-active-bg, color-mix(in srgb, Highlight 8%, transparent));
|
|
199
|
+
color: var(--rc-menu-active-color, inherit);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
:where(.rc-theme-tailwind:not([data-rc-native='off']))
|
|
203
|
+
rc-menu
|
|
204
|
+
:is(
|
|
205
|
+
button:disabled,
|
|
206
|
+
[role='menuitem'][aria-disabled='true'],
|
|
207
|
+
[role='menuitemcheckbox'][aria-disabled='true'],
|
|
208
|
+
[role='menuitemradio'][aria-disabled='true']
|
|
209
|
+
):not(:where([data-rc-native='off'], [data-rc-native='off'] *)),
|
|
210
|
+
:host(:not([data-rc-native='off']).rc-theme-tailwind)
|
|
211
|
+
rc-menu
|
|
212
|
+
:is(
|
|
213
|
+
button:disabled,
|
|
214
|
+
[role='menuitem'][aria-disabled='true'],
|
|
215
|
+
[role='menuitemcheckbox'][aria-disabled='true'],
|
|
216
|
+
[role='menuitemradio'][aria-disabled='true']
|
|
217
|
+
):not(:where([data-rc-native='off'], [data-rc-native='off'] *)) {
|
|
218
|
+
color: var(--rc-menu-disabled-color, var(--rc-text-disabled, GrayText));
|
|
219
|
+
opacity: var(--rc-menu-disabled-opacity, var(--rc-disabled-opacity, 0.55));
|
|
220
|
+
pointer-events: none;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
@layer rc-theme-tailwind.overrides {
|
|
225
|
+
:where(.rc-theme-tailwind:not([data-rc-native='off']))
|
|
226
|
+
:where(
|
|
227
|
+
rc-adaptive-menu > [data-rc-action-overflowed] > :is(button, a[href]),
|
|
228
|
+
rc-adaptive-menu > :is(button, a[href])[data-rc-action-overflowed]
|
|
229
|
+
):not(:where([data-rc-native='off'], [data-rc-native='off'] *)),
|
|
230
|
+
:host(:not([data-rc-native='off']).rc-theme-tailwind)
|
|
231
|
+
:where(
|
|
232
|
+
rc-adaptive-menu > [data-rc-action-overflowed] > :is(button, a[href]),
|
|
233
|
+
rc-adaptive-menu > :is(button, a[href])[data-rc-action-overflowed]
|
|
234
|
+
):not(:where([data-rc-native='off'], [data-rc-native='off'] *)) {
|
|
235
|
+
display: flex;
|
|
236
|
+
gap: var(--rc-adaptive-menu-item-gap, var(--rc-item-gap, 0.5em));
|
|
237
|
+
min-block-size: var(--rc-adaptive-menu-item-min-block-size, 2.5em);
|
|
238
|
+
padding: var(--rc-adaptive-menu-item-padding-block, var(--rc-item-padding-block, 0.3em))
|
|
239
|
+
var(--rc-adaptive-menu-item-padding-inline, var(--rc-item-padding-inline, 0.75em));
|
|
240
|
+
border: none;
|
|
241
|
+
border-radius: 0;
|
|
242
|
+
background: transparent;
|
|
243
|
+
color: inherit;
|
|
244
|
+
font: inherit;
|
|
245
|
+
text-align: start;
|
|
246
|
+
justify-content: normal;
|
|
247
|
+
text-decoration: none;
|
|
248
|
+
}
|
|
249
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rcarls/rc-theme-tailwind",
|
|
3
|
+
"publishConfig": {
|
|
4
|
+
"access": "public"
|
|
5
|
+
},
|
|
6
|
+
"version": "0.0.0-next-20261103014840",
|
|
7
|
+
"description": "CSS-only Tailwind CSS v4 token bridge and calm SaaS theme for rc-webcomponents.",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/richardcarls/rc-webcomponents.git",
|
|
11
|
+
"directory": "packages/rc-theme-tailwind"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://richardcarls.github.io/rc-webcomponents/guide/theme-previews",
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"type": "module",
|
|
16
|
+
"sideEffects": [
|
|
17
|
+
"*.css"
|
|
18
|
+
],
|
|
19
|
+
"exports": {
|
|
20
|
+
".": "./bridge.css",
|
|
21
|
+
"./bridge.css": "./bridge.css",
|
|
22
|
+
"./defaults.css": "./defaults.css",
|
|
23
|
+
"./components.css": "./components.css",
|
|
24
|
+
"./components/*.css": "./components/*.css",
|
|
25
|
+
"./css-components.css": "./css-components.css",
|
|
26
|
+
"./css-components/*.css": "./css-components/*.css",
|
|
27
|
+
"./native.css": "./native.css",
|
|
28
|
+
"./theme.css": "./theme.css",
|
|
29
|
+
"./layers.css": "./layers.css"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"*.css",
|
|
33
|
+
"components",
|
|
34
|
+
"css-components",
|
|
35
|
+
"README.md"
|
|
36
|
+
],
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "echo 'CSS-only package, no build step'",
|
|
39
|
+
"test:browser": "vitest --run",
|
|
40
|
+
"test:browser:chrome": "vitest --run --project=chromium",
|
|
41
|
+
"test:browser:firefox": "vitest --run --project=firefox"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@vitest/browser-playwright": "4.1.5",
|
|
45
|
+
"playwright": "^1.56.0",
|
|
46
|
+
"vite": "^7.1.7",
|
|
47
|
+
"vitest": "^4.0.6"
|
|
48
|
+
}
|
|
49
|
+
}
|
package/theme.css
ADDED