@typlog/ui 0.12.1 → 0.12.3

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.1",
3
+ "version": "0.12.3",
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
- }
@@ -1,155 +0,0 @@
1
-
2
- .ui-DialogTitle {
3
- font-size: var(--font-size-4);
4
- font-weight: var(--font-weight-semibold);
5
- line-height: var(--line-height-4);
6
- }
7
-
8
- .ui-DialogDescription {
9
- font-size: var(--font-size-3);
10
- line-height: var(--line-height-2);
11
- color: var(--gray-11);
12
- }
13
- .ui-DialogTitle + .ui-DialogDescription {
14
- margin-top: var(--space-2);
15
- }
16
- .ui-DialogOverlay {
17
- position: fixed;
18
- inset: 0;
19
- }
20
- .ui-DialogOverlay::before {
21
- position: fixed;
22
- content: '';
23
- inset: 0;
24
- background-color: var(--color-overlay);
25
- }
26
- .ui-DialogWrapper {
27
- display: flex;
28
- overflow: hidden;
29
- position: absolute;
30
- inset: 0;
31
- }
32
- .ui-DialogContainer {
33
- display: flex;
34
- flex-direction: column;
35
- flex-grow: 1;
36
- align-items: center;
37
- justify-content: flex-end;
38
- width: 100%;
39
- box-sizing: border-box;
40
- padding-top: var(--space-6);
41
- }
42
- .ui-DialogPopup {
43
- width: 100%;
44
- max-height: calc(100vh - var(--space-6) * 2);
45
- position: relative;
46
- box-sizing: border-box;
47
- overflow: auto;
48
- text-align: left;
49
- box-sizing: border-box;
50
- background-color: var(--color-panel-solid);
51
- outline: none;
52
- border-top-left-radius: var(--dialog-popup-radius);
53
- border-top-right-radius: var(--dialog-popup-radius);
54
- max-width: var(--dialog-popup-max-width);
55
- max-height: var(--dialog-popup-max-height);
56
- padding: var(--dialog-popup-padding);
57
- }
58
- .ui-DialogPopup:where(.r-size-1) {
59
- --dialog-popup-padding: var(--space-3);
60
- --dialog-popup-radius: var(--radius-4);
61
- --dialog-popup-max-width: 450px;
62
- --dialog-popup-max-height: calc(100vh - 100px);
63
- }
64
- .ui-DialogPopup:where(.r-size-2) {
65
- --dialog-popup-padding: var(--space-4);
66
- --dialog-popup-radius: var(--radius-4);
67
- --dialog-popup-max-width: 600px;
68
- --dialog-popup-max-height: calc(100vh - 100px);
69
- }
70
- .ui-DialogPopup:where(.r-size-3) {
71
- --dialog-popup-padding: var(--space-5);
72
- --dialog-popup-radius: var(--radius-5);
73
- --dialog-popup-max-width: 860px;
74
- --dialog-popup-max-height: calc(100vh - 100px);
75
- }
76
- .ui-DialogPopup:where(.r-size-4) {
77
- --dialog-popup-padding: var(--space-6);
78
- --dialog-popup-radius: var(--radius-5);
79
- --dialog-popup-max-width: 1200px;
80
- --dialog-popup-max-height: calc(100vh - 100px);
81
- }
82
- .ui-DialogPopup:where(.r-size-5) {
83
- --dialog-popup-padding: var(--space-6);
84
- --dialog-popup-radius: var(--radius-5);
85
- --dialog-popup-max-width: none;
86
- --dialog-popup-max-height: calc(100vh - 64px);
87
- }
88
-
89
- /* special handle for tailwindcss p-0, when css priority doesn't work */
90
- .ui-DialogPopup:where(.p-0) {
91
- --dialog-popup-padding: 0;
92
- }
93
- @media (min-width: 450px) {
94
- .ui-DialogContainer {
95
- justify-content: center;
96
- padding-bottom: max(var(--space-6), 6vh);
97
- padding-left: var(--space-4);
98
- padding-right: var(--space-4);
99
- }
100
- .ui-DialogPopup {
101
- box-shadow: var(--shadow-6);
102
- border-bottom-left-radius: var(--dialog-popup-radius);
103
- border-bottom-right-radius: var(--dialog-popup-radius);
104
- }
105
- }
106
- @media (prefers-reduced-motion: no-preference) {
107
- @keyframes ui-dialog-overlay-no-op {
108
- from {
109
- opacity: 1;
110
- }
111
- to {
112
- opacity: 1;
113
- }
114
- }
115
- @keyframes ui-dialog-content-show {
116
- from {
117
- opacity: 0.1;
118
- transform: translate3d(0, var(--space-6), 0);
119
- }
120
- to {
121
- opacity: 1;
122
- transform: translate3d(0, 0, 0);
123
- }
124
- }
125
- @keyframes ui-dialog-content-hide {
126
- from {
127
- opacity: 1;
128
- transform: translate3d(0, 0, 0);
129
- }
130
- to {
131
- opacity: 1;
132
- transform: translate3d(0, var(--space-5), 0);
133
- }
134
- }
135
- .ui-DialogOverlay[data-state='closed'] {
136
- animation: ui-dialog-overlay-no-op 160ms cubic-bezier(0.16, 1, 0.3, 1);
137
- }
138
- .ui-DialogOverlay[data-state='open']::before {
139
- animation: ui-fade-in 200ms cubic-bezier(0.16, 1, 0.3, 1);
140
- }
141
- .ui-DialogOverlay[data-state='closed']::before {
142
- animation: ui-fade-out 160ms cubic-bezier(0.16, 1, 0.3, 1);
143
- }
144
- .ui-DialogPopup:where([data-state="open"]) {
145
- animation: ui-dialog-content-show 200ms cubic-bezier(0.16, 1, 0.3, 1);
146
- }
147
- .ui-DialogPopup:where([data-state="closed"]) {
148
- animation: ui-dialog-content-hide 100ms linear;
149
- }
150
- }
151
-
152
- .ui-AlertPopup {
153
- --dialog-popup-radius: var(--radius-4);
154
- --dialog-popup-max-width: 450px;
155
- }