@typlog/ui 0.12.0 → 0.12.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typlog/ui",
3
- "version": "0.12.0",
3
+ "version": "0.12.2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "Themed components for Reka UI with Radix colors.",
@@ -1,259 +0,0 @@
1
- .ui-Button {
2
- display: inline-flex;
3
- align-items: center;
4
- justify-content: center;
5
- flex-shrink: 0;
6
- -webkit-user-select: none;
7
- -moz-user-select: none;
8
- user-select: none;
9
- vertical-align: top;
10
- font-style: normal;
11
- font-weight: var(--button-font-weight);
12
- text-align: center;
13
- white-space: nowrap;
14
- height: var(--button-height);
15
- padding-left: var(--button-padding-x);
16
- padding-right: var(--button-padding-x);
17
- }
18
- .ui-Button:where(.r-variant-ghost) {
19
- --button-font-weight: var(--font-weight-regular);
20
- }
21
- .ui-Button:where(:not(.r-variant-ghost)) {
22
- --button-font-weight: var(--font-weight-medium);
23
- }
24
- .ui-Button:where([data-disabled]) {
25
- cursor: not-allowed;
26
- }
27
- .ui-Button:where(.r-size-1) {
28
- gap: var(--space-1);
29
- font-size: var(--font-size-1);
30
- line-height: var(--line-height-1);
31
- letter-spacing: var(--letter-spacing-1);
32
- border-radius: max(var(--radius-1), var(--radius-full));
33
- --button-height: var(--space-5);
34
- --button-padding-x: var(--space-2);
35
- }
36
- .ui-Button:where(.r-size-1):where(.r-variant-ghost) {
37
- --button-ghost-padding-y: var(--space-1);
38
- }
39
- .ui-Button:where(.r-size-2) {
40
- gap: var(--space-2);
41
- font-size: var(--font-size-2);
42
- line-height: var(--line-height-2);
43
- letter-spacing: var(--letter-spacing-2);
44
- border-radius: max(var(--radius-2), var(--radius-full));
45
- --button-height: var(--space-6);
46
- --button-padding-x: var(--space-3);
47
- }
48
- .ui-Button:where(.r-size-2):where(.r-variant-ghost) {
49
- gap: var(--space-1);
50
- --button-padding-x: var(--space-2);
51
- --button-ghost-padding-y: var(--space-1);
52
- }
53
- .ui-Button:where(.r-size-3) {
54
- gap: var(--space-3);
55
- font-size: var(--font-size-3);
56
- line-height: var(--line-height-3);
57
- letter-spacing: var(--letter-spacing-3);
58
- border-radius: max(var(--radius-3), var(--radius-full));
59
- --button-height: var(--space-7);
60
- --button-padding-x: var(--space-4);
61
- }
62
- .ui-Button:where(.r-size-3):where(.r-variant-ghost) {
63
- gap: var(--space-2);
64
- --button-padding-x: var(--space-3);
65
- --button-ghost-padding-y: calc(var(--space-1) * 1.5);
66
- }
67
- .ui-Button:where(.r-size-4) {
68
- gap: var(--space-3);
69
- font-size: var(--font-size-4);
70
- line-height: var(--line-height-4);
71
- letter-spacing: var(--letter-spacing-4);
72
- border-radius: max(var(--radius-4), var(--radius-full));
73
- --button-height: var(--space-8);
74
- --button-padding-x: var(--space-5);
75
- }
76
- .ui-Button:where(.r-size-4):where(.r-variant-ghost) {
77
- gap: var(--space-2);
78
- --button-padding-x: var(--space-4);
79
- --button-ghost-padding-y: var(--space-2);
80
- }
81
-
82
- /* solid */
83
- .ui-root {
84
- --button-solid-active-filter: brightness(0.92) saturate(1.1);
85
- --button-solid-high-contrast-hover-filter: contrast(0.88) saturate(1.1) brightness(1.1);
86
- }
87
- :is(.dark, .dark-theme) .ui-root {
88
- --button-solid-active-filter: brightness(1.08);
89
- --button-solid-high-contrast-hover-filter: contrast(0.88) saturate(1.3) brightness(1.18);
90
- }
91
- .ui-Button:where(.r-variant-solid) {
92
- background-color: var(--accent-9);
93
- color: var(--accent-contrast);
94
- }
95
- @media (hover: hover) {
96
- .ui-Button:where(.r-variant-solid):where(:hover) {
97
- background-color: var(--accent-10);
98
- }
99
- }
100
- .ui-Button:where(.r-variant-solid):where(:focus-visible) {
101
- outline: 2px solid var(--focus-8);
102
- outline-offset: 2px;
103
- }
104
- .ui-Button:where(.r-variant-solid):where(:active) {
105
- background-color: var(--accent-10);
106
- filter: var(--button-solid-active-filter);
107
- }
108
- .ui-Button:where(.r-variant-solid):where(.r-high-contrast) {
109
- background-color: var(--accent-12);
110
- color: var(--gray-1);
111
- }
112
- @media (hover: hover) {
113
- .ui-Button:where(.r-variant-solid):where(.r-high-contrast:hover) {
114
- background-color: var(--accent-12);
115
- filter: var(--button-solid-high-contrast-hover-filter);
116
- }
117
- }
118
- .ui-Button:where(.r-variant-solid):where([data-disabled]) {
119
- color: var(--gray-a8);
120
- background-color: var(--gray-a3);
121
- outline: none;
122
- filter: none;
123
- }
124
-
125
- /* soft / ghost */
126
- .ui-Button:where(.r-variant-soft, .r-variant-ghost) {
127
- color: var(--accent-a11);
128
- }
129
- .ui-Button:where(.r-variant-soft, .r-variant-ghost):where(.r-high-contrast) {
130
- color: var(--accent-12);
131
- }
132
- .ui-Button:where(.r-variant-soft) {
133
- background-color: var(--accent-a3);
134
- }
135
- @media (hover: hover) {
136
- .ui-Button:where(.r-variant-soft):where(:hover) {
137
- background-color: var(--accent-a4);
138
- }
139
- }
140
- .ui-Button:where(.r-variant-soft):where(:focus-visible) {
141
- outline: 2px solid var(--accent-8);
142
- outline-offset: -1px;
143
- }
144
- .ui-Button:where(.r-variant-soft):where(:active) {
145
- background-color: var(--accent-a5);
146
- }
147
- .ui-Button:where(.r-variant-soft):where([data-disabled]) {
148
- color: var(--gray-a8);
149
- background-color: var(--gray-a3);
150
- }
151
- .ui-Button:where(.r-variant-ghost) {
152
- padding: var(--button-ghost-padding-y) var(--button-padding-x);
153
- }
154
- @media (hover: hover) {
155
- .ui-Button:where(.r-variant-ghost):where(:hover) {
156
- background-color: var(--accent-a3);
157
- }
158
- }
159
- .ui-Button:where(.r-variant-ghost):where(:focus-visible) {
160
- outline: 2px solid var(--focus-8);
161
- outline-offset: -1px;
162
- }
163
- .ui-Button:where(.r-variant-ghost):where(:active) {
164
- background-color: var(--accent-a4);
165
- }
166
- .ui-Button:where(.r-variant-ghost):where([data-disabled]) {
167
- color: var(--gray-a8);
168
- background-color: transparent;
169
- }
170
-
171
- /* classic */
172
- .ui-Button:where(.r-variant-classic) {
173
- box-shadow: var(--shadow-2);
174
- background-color: var(--color-background);
175
- }
176
- .ui-Button:where(.r-variant-classic):where(.r-high-contrast) {
177
- color: var(--gray-12);
178
- box-shadow: 0 0 0 1px var(--gray-a6), 0 1px 1px 0 var(--black-a4), 0 2px 1px -1px var(--black-a2), 0 1px 3px 0 var(--black-a1);
179
- }
180
- @media (hover: hover) {
181
- .ui-Button:where(.r-variant-classic):where(:hover) {
182
- color: var(--accent-a11);
183
- background-color: var(--gray-a2);
184
- }
185
- .ui-Button:where(.r-variant-classic):where(.r-high-contrast):where(:hover) {
186
- color: var(--accent-12);
187
- }
188
- }
189
- .ui-Button:where(.r-variant-classic):where(:focus-visible) {
190
- outline: 2px solid var(--focus-8);
191
- outline-offset: 2px;
192
- }
193
- .ui-Button:where(.r-variant-classic):where(:active:not([data-disabled])) {
194
- box-shadow: var(--shadow-1);
195
- }
196
- .ui-Button:where(.r-variant-classic):where([data-disabled]) {
197
- color: var(--gray-a10);
198
- background-color: var(--gray-a2);
199
- }
200
-
201
- /* outline */
202
- .ui-Button:where(.r-variant-outline) {
203
- box-shadow: inset 0 0 0 1px var(--accent-a8);
204
- color: var(--accent-a11);
205
- }
206
- @media (hover: hover) {
207
- .ui-Button:where(.r-variant-outline):where(:hover) {
208
- background-color: var(--accent-a2);
209
- }
210
- }
211
- .ui-Button:where(.r-variant-outline):where(:focus-visible) {
212
- outline: 2px solid var(--focus-8);
213
- outline-offset: -1px;
214
- }
215
- .ui-Button:where(.r-variant-outline):where(.r-high-contrast) {
216
- box-shadow: inset 0 0 0 1px var(--accent-a7), inset 0 0 0 1px var(--gray-a11);
217
- color: var(--accent-12);
218
- }
219
- .ui-Button:where(.r-variant-outline):where(:active) {
220
- background-color: var(--accent-a4);
221
- }
222
- .ui-Button:where(.r-variant-outline):where([data-disabled]) {
223
- color: var(--gray-a8);
224
- box-shadow: inset 0 0 0 1px var(--gray-a7);
225
- background-color: transparent;
226
- }
227
-
228
- /* surface */
229
- .ui-Button:where(.r-variant-surface) {
230
- background-color: var(--accent-surface);
231
- box-shadow: inset 0 0 0 1px var(--accent-a7);
232
- color: var(--accent-a11);
233
- }
234
- @media (hover: hover) {
235
- .ui-Button:where(.r-variant-surface):where(:hover) {
236
- box-shadow: inset 0 0 0 1px var(--accent-a8);
237
- }
238
- }
239
- .ui-Button:where(.r-variant-surface):where(:focus-visible) {
240
- outline: 2px solid var(--focus-8);
241
- outline-offset: -1px;
242
- }
243
- .ui-Button:where(.r-variant-surface):where(.r-high-contrast) {
244
- color: var(--accent-12);
245
- }
246
- .ui-Button:where(.r-variant-surface):where(:active) {
247
- background-color: var(--accent-a4);
248
- }
249
- .ui-Button:where(.r-variant-surface):where([data-disabled]) {
250
- color: var(--gray-a8);
251
- box-shadow: inset 0 0 0 1px var(--gray-a6);
252
- background-color: var(--gray-a2);
253
- }
254
-
255
- .ui-Button.ui-IconButton {
256
- height: var(--button-height);
257
- width: var(--button-height);
258
- padding: 0;
259
- }