@rokkit/themes 1.0.0-next.124 → 1.0.0-next.127
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/README.md +118 -9
- package/package.json +31 -27
- package/src/base/breadcrumbs.css +46 -0
- package/src/base/button.css +243 -0
- package/src/base/card.css +36 -0
- package/src/base/carousel.css +122 -12
- package/src/base/connector.css +106 -0
- package/src/base/display.css +91 -0
- package/src/base/floating-action.css +388 -0
- package/src/base/floating-navigation.css +381 -0
- package/src/base/index.css +36 -0
- package/src/base/input.css +194 -39
- package/src/base/item.css +52 -0
- package/src/base/list.css +258 -0
- package/src/base/menu.css +322 -0
- package/src/base/pill.css +57 -0
- package/src/base/progress.css +28 -15
- package/src/base/range.css +121 -0
- package/src/base/rating.css +40 -0
- package/src/base/reveal.css +37 -0
- package/src/base/search-filter.css +132 -0
- package/src/base/select.css +411 -0
- package/src/base/shine.css +14 -0
- package/src/base/stepper.css +140 -0
- package/src/base/switch.css +152 -0
- package/src/base/table.css +143 -33
- package/src/base/tabs.css +171 -0
- package/src/base/tilt.css +14 -0
- package/src/base/timeline.css +84 -0
- package/src/base/toggle.css +134 -0
- package/src/base/toolbar.css +337 -0
- package/src/base/tree.css +156 -11
- package/src/glass/button.css +152 -0
- package/src/glass/floating-action.css +61 -0
- package/src/glass/floating-navigation.css +74 -0
- package/src/glass/index.css +23 -0
- package/src/glass/input.css +124 -0
- package/src/glass/list.css +122 -0
- package/src/glass/menu.css +92 -0
- package/src/glass/range.css +61 -0
- package/src/glass/search-filter.css +49 -0
- package/src/glass/select.css +178 -0
- package/src/glass/switch.css +28 -0
- package/src/glass/table.css +87 -0
- package/src/glass/tabs.css +58 -0
- package/src/glass/timeline.css +46 -0
- package/src/glass/toggle.css +48 -0
- package/src/glass/toolbar.css +84 -0
- package/src/glass/tree.css +104 -0
- package/src/index.css +18 -0
- package/src/index.js +25 -2
- package/src/material/button.css +153 -0
- package/src/material/floating-action.css +60 -0
- package/src/material/floating-navigation.css +74 -0
- package/src/material/index.css +23 -0
- package/src/material/input.css +118 -40
- package/src/material/list.css +90 -64
- package/src/material/menu.css +92 -0
- package/src/material/range.css +62 -0
- package/src/material/search-filter.css +49 -0
- package/src/material/select.css +170 -0
- package/src/material/switch.css +28 -0
- package/src/material/table.css +87 -0
- package/src/material/tabs.css +62 -0
- package/src/material/timeline.css +46 -0
- package/src/material/toggle.css +48 -0
- package/src/material/toolbar.css +84 -0
- package/src/material/tree.css +100 -0
- package/src/minimal/button.css +152 -0
- package/src/minimal/floating-action.css +59 -0
- package/src/minimal/floating-navigation.css +70 -0
- package/src/minimal/index.css +23 -0
- package/src/minimal/input.css +81 -120
- package/src/minimal/list.css +90 -104
- package/src/minimal/menu.css +88 -0
- package/src/minimal/range.css +61 -0
- package/src/minimal/search-filter.css +49 -0
- package/src/minimal/select.css +168 -0
- package/src/minimal/switch.css +28 -0
- package/src/minimal/table.css +87 -0
- package/src/minimal/tabs.css +53 -31
- package/src/minimal/timeline.css +45 -0
- package/src/minimal/toggle.css +48 -0
- package/src/minimal/toolbar.css +84 -0
- package/src/minimal/tree.css +100 -0
- package/src/rokkit/button.css +225 -0
- package/src/rokkit/connector.css +11 -0
- package/src/rokkit/floating-action.css +65 -0
- package/src/rokkit/floating-navigation.css +83 -0
- package/src/rokkit/index.css +24 -0
- package/src/rokkit/input.css +130 -0
- package/src/rokkit/list.css +141 -0
- package/src/rokkit/menu.css +123 -0
- package/src/rokkit/range.css +62 -0
- package/src/rokkit/search-filter.css +49 -0
- package/src/rokkit/select.css +185 -0
- package/src/rokkit/switch.css +28 -0
- package/src/rokkit/table.css +68 -38
- package/src/rokkit/tabs.css +82 -0
- package/src/rokkit/timeline.css +46 -0
- package/src/rokkit/toggle.css +36 -52
- package/src/rokkit/toolbar.css +84 -0
- package/src/rokkit/tree.css +123 -0
- package/src/base/alert.css +0 -30
- package/src/base/animation.css +0 -37
- package/src/base/atoms.css +0 -58
- package/src/base/core.css +0 -107
- package/src/base/layout.css +0 -65
- package/src/base/molecules.css +0 -109
- package/src/base/organisms.css +0 -66
- package/src/base/scrollbar.css +0 -16
- package/src/base/toggles.css +0 -17
- package/src/base.css +0 -13
- package/src/markdown.css +0 -955
- package/src/material/base.css +0 -12
- package/src/material/form.css +0 -30
- package/src/material.css +0 -9
- package/src/minimal/base.css +0 -8
- package/src/minimal/form.css +0 -87
- package/src/minimal.css +0 -11
- package/src/mixins/mixins.scss +0 -66
- package/src/mixins/palette.scss +0 -48
- package/src/prism.css +0 -102
- package/src/rokkit/alert.css +0 -4
- package/src/rokkit/atoms.css +0 -52
- package/src/rokkit/carousel.css +0 -19
- package/src/rokkit/layout.css +0 -17
- package/src/rokkit/molecules.css +0 -124
- package/src/rokkit/organisms.css +0 -307
- package/src/rokkit.css +0 -11
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FloatingNavigation - Base Structural Styles
|
|
3
|
+
*
|
|
4
|
+
* Layout, positioning, transitions, and animations.
|
|
5
|
+
* No colors, shadows, or visual theming - those belong in theme styles.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/* =============================================================================
|
|
9
|
+
Container
|
|
10
|
+
============================================================================= */
|
|
11
|
+
|
|
12
|
+
[data-floating-nav] {
|
|
13
|
+
position: fixed;
|
|
14
|
+
z-index: 40;
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
width: fit-content;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
transition:
|
|
20
|
+
width var(--fn-expand-duration, 300ms) var(--fn-expand-easing, cubic-bezier(0.4, 0, 0.2, 1)),
|
|
21
|
+
height var(--fn-expand-duration, 300ms) var(--fn-expand-easing, cubic-bezier(0.4, 0, 0.2, 1));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* Reduced motion */
|
|
25
|
+
@media (prefers-reduced-motion: reduce) {
|
|
26
|
+
[data-floating-nav] {
|
|
27
|
+
animation: none !important;
|
|
28
|
+
transition-duration: 0ms !important;
|
|
29
|
+
}
|
|
30
|
+
[data-floating-nav] * {
|
|
31
|
+
animation: none !important;
|
|
32
|
+
transition-duration: 0ms !important;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* =============================================================================
|
|
37
|
+
Position Variants
|
|
38
|
+
============================================================================= */
|
|
39
|
+
|
|
40
|
+
/* Right edge — vertically centered */
|
|
41
|
+
[data-floating-nav][data-position='right'] {
|
|
42
|
+
right: 1rem;
|
|
43
|
+
top: 50%;
|
|
44
|
+
translate: 0 -50%;
|
|
45
|
+
border-radius: 0.75rem;
|
|
46
|
+
animation: fn-slide-in-right 0.5s ease-out 0.5s both;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* Left edge — vertically centered */
|
|
50
|
+
[data-floating-nav][data-position='left'] {
|
|
51
|
+
left: 1rem;
|
|
52
|
+
top: 50%;
|
|
53
|
+
translate: 0 -50%;
|
|
54
|
+
border-radius: 0.75rem;
|
|
55
|
+
animation: fn-slide-in-left 0.5s ease-out 0.5s both;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Top edge — horizontally centered */
|
|
59
|
+
[data-floating-nav][data-position='top'] {
|
|
60
|
+
top: 1rem;
|
|
61
|
+
left: 50%;
|
|
62
|
+
translate: -50% 0;
|
|
63
|
+
flex-direction: row;
|
|
64
|
+
border-radius: 0.75rem;
|
|
65
|
+
animation: fn-slide-in-top 0.5s ease-out 0.5s both;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* Bottom edge — horizontally centered */
|
|
69
|
+
[data-floating-nav][data-position='bottom'] {
|
|
70
|
+
bottom: 1rem;
|
|
71
|
+
left: 50%;
|
|
72
|
+
translate: -50% 0;
|
|
73
|
+
flex-direction: row;
|
|
74
|
+
border-radius: 0.75rem;
|
|
75
|
+
animation: fn-slide-in-bottom 0.5s ease-out 0.5s both;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* =============================================================================
|
|
79
|
+
Entrance Animations
|
|
80
|
+
============================================================================= */
|
|
81
|
+
|
|
82
|
+
@keyframes fn-slide-in-right {
|
|
83
|
+
from { opacity: 0; transform: translateX(4rem); }
|
|
84
|
+
to { opacity: 1; transform: translateX(0); }
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@keyframes fn-slide-in-left {
|
|
88
|
+
from { opacity: 0; transform: translateX(-4rem); }
|
|
89
|
+
to { opacity: 1; transform: translateX(0); }
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@keyframes fn-slide-in-top {
|
|
93
|
+
from { opacity: 0; transform: translateY(-4rem); }
|
|
94
|
+
to { opacity: 1; transform: translateY(0); }
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@keyframes fn-slide-in-bottom {
|
|
98
|
+
from { opacity: 0; transform: translateY(4rem); }
|
|
99
|
+
to { opacity: 1; transform: translateY(0); }
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* =============================================================================
|
|
103
|
+
Header (Title + Pin)
|
|
104
|
+
============================================================================= */
|
|
105
|
+
|
|
106
|
+
[data-floating-nav-header] {
|
|
107
|
+
display: flex;
|
|
108
|
+
align-items: center;
|
|
109
|
+
gap: 0.5rem;
|
|
110
|
+
padding: 0.5rem;
|
|
111
|
+
min-height: 2rem;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* Vertical positions: header above items */
|
|
115
|
+
[data-floating-nav][data-position='left'] [data-floating-nav-header],
|
|
116
|
+
[data-floating-nav][data-position='right'] [data-floating-nav-header] {
|
|
117
|
+
flex-direction: row;
|
|
118
|
+
justify-content: center;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* When expanded, push pin to end */
|
|
122
|
+
[data-floating-nav][data-expanded] [data-floating-nav-header] {
|
|
123
|
+
justify-content: space-between;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/* Horizontal positions: header before items */
|
|
127
|
+
[data-floating-nav][data-position='top'] [data-floating-nav-header],
|
|
128
|
+
[data-floating-nav][data-position='bottom'] [data-floating-nav-header] {
|
|
129
|
+
flex-direction: column;
|
|
130
|
+
justify-content: center;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
[data-floating-nav-title] {
|
|
134
|
+
font-size: 0.75rem;
|
|
135
|
+
font-weight: 600;
|
|
136
|
+
text-transform: uppercase;
|
|
137
|
+
letter-spacing: 0.05em;
|
|
138
|
+
white-space: nowrap;
|
|
139
|
+
opacity: 0;
|
|
140
|
+
transition: opacity var(--fn-label-duration, 200ms) ease;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
[data-floating-nav][data-expanded] [data-floating-nav-title] {
|
|
144
|
+
opacity: 1;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
[data-floating-nav-pin] {
|
|
148
|
+
display: flex;
|
|
149
|
+
align-items: center;
|
|
150
|
+
justify-content: center;
|
|
151
|
+
width: 1.5rem;
|
|
152
|
+
height: 1.5rem;
|
|
153
|
+
padding: 0;
|
|
154
|
+
border: none;
|
|
155
|
+
border-radius: 0.375rem;
|
|
156
|
+
cursor: pointer;
|
|
157
|
+
background: transparent;
|
|
158
|
+
font-size: 0.875rem;
|
|
159
|
+
flex-shrink: 0;
|
|
160
|
+
transition: transform 150ms ease;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
[data-floating-nav-pin]:hover {
|
|
164
|
+
transform: scale(1.1);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
[data-floating-nav-pin]:focus-visible {
|
|
168
|
+
outline: 2px solid currentColor;
|
|
169
|
+
outline-offset: 2px;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/* =============================================================================
|
|
173
|
+
Items Container
|
|
174
|
+
============================================================================= */
|
|
175
|
+
|
|
176
|
+
[data-floating-nav-items] {
|
|
177
|
+
position: relative;
|
|
178
|
+
display: flex;
|
|
179
|
+
padding: 0.25rem;
|
|
180
|
+
gap: 0.125rem;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/* Vertical layout (left/right positions) */
|
|
184
|
+
[data-floating-nav][data-position='left'] [data-floating-nav-items],
|
|
185
|
+
[data-floating-nav][data-position='right'] [data-floating-nav-items] {
|
|
186
|
+
flex-direction: column;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* Horizontal layout (top/bottom positions) */
|
|
190
|
+
[data-floating-nav][data-position='top'] [data-floating-nav-items],
|
|
191
|
+
[data-floating-nav][data-position='bottom'] [data-floating-nav-items] {
|
|
192
|
+
flex-direction: row;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/* =============================================================================
|
|
196
|
+
Navigation Items
|
|
197
|
+
============================================================================= */
|
|
198
|
+
|
|
199
|
+
[data-floating-nav-item] {
|
|
200
|
+
display: flex;
|
|
201
|
+
align-items: center;
|
|
202
|
+
gap: 0.75rem;
|
|
203
|
+
border: none;
|
|
204
|
+
border-radius: 0.5rem;
|
|
205
|
+
cursor: pointer;
|
|
206
|
+
white-space: nowrap;
|
|
207
|
+
text-decoration: none;
|
|
208
|
+
background: transparent;
|
|
209
|
+
transition:
|
|
210
|
+
transform 150ms ease,
|
|
211
|
+
background-color 150ms ease;
|
|
212
|
+
animation: fn-item-enter 0.3s ease both;
|
|
213
|
+
animation-delay: calc(var(--fn-index, 0) * 60ms + 0.6s);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
@keyframes fn-item-enter {
|
|
217
|
+
from {
|
|
218
|
+
opacity: 0;
|
|
219
|
+
transform: scale(0.8);
|
|
220
|
+
}
|
|
221
|
+
to {
|
|
222
|
+
opacity: 1;
|
|
223
|
+
transform: scale(1);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
[data-floating-nav-item]:hover {
|
|
228
|
+
transform: scale(1.02);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
[data-floating-nav-item]:active {
|
|
232
|
+
transform: scale(0.98);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
[data-floating-nav-item]:focus-visible {
|
|
236
|
+
outline: 2px solid currentColor;
|
|
237
|
+
outline-offset: -2px;
|
|
238
|
+
border-radius: 0.5rem;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/* =============================================================================
|
|
242
|
+
Size Variants — Items
|
|
243
|
+
============================================================================= */
|
|
244
|
+
|
|
245
|
+
/* Small */
|
|
246
|
+
[data-floating-nav][data-size='sm'] [data-floating-nav-item] {
|
|
247
|
+
min-width: 2rem;
|
|
248
|
+
min-height: 2rem;
|
|
249
|
+
padding: 0.25rem 0.5rem;
|
|
250
|
+
font-size: 0.8125rem;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
[data-floating-nav][data-size='sm'] [data-floating-nav-icon] {
|
|
254
|
+
font-size: 1rem;
|
|
255
|
+
width: 1.25rem;
|
|
256
|
+
height: 1.25rem;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/* Medium (default) */
|
|
260
|
+
[data-floating-nav][data-size='md'] [data-floating-nav-item],
|
|
261
|
+
[data-floating-nav]:not([data-size]) [data-floating-nav-item] {
|
|
262
|
+
min-width: 2.5rem;
|
|
263
|
+
min-height: 2.5rem;
|
|
264
|
+
padding: 0.375rem 0.625rem;
|
|
265
|
+
font-size: 0.875rem;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
[data-floating-nav][data-size='md'] [data-floating-nav-icon],
|
|
269
|
+
[data-floating-nav]:not([data-size]) [data-floating-nav-icon] {
|
|
270
|
+
font-size: 1.125rem;
|
|
271
|
+
width: 1.5rem;
|
|
272
|
+
height: 1.5rem;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/* Large */
|
|
276
|
+
[data-floating-nav][data-size='lg'] [data-floating-nav-item] {
|
|
277
|
+
min-width: 3rem;
|
|
278
|
+
min-height: 3rem;
|
|
279
|
+
padding: 0.5rem 0.75rem;
|
|
280
|
+
font-size: 1rem;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
[data-floating-nav][data-size='lg'] [data-floating-nav-icon] {
|
|
284
|
+
font-size: 1.25rem;
|
|
285
|
+
width: 1.75rem;
|
|
286
|
+
height: 1.75rem;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/* =============================================================================
|
|
290
|
+
Icon & Label
|
|
291
|
+
============================================================================= */
|
|
292
|
+
|
|
293
|
+
[data-floating-nav-icon] {
|
|
294
|
+
display: flex;
|
|
295
|
+
align-items: center;
|
|
296
|
+
justify-content: center;
|
|
297
|
+
flex-shrink: 0;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
[data-floating-nav-label] {
|
|
301
|
+
overflow: hidden;
|
|
302
|
+
max-width: 0;
|
|
303
|
+
opacity: 0;
|
|
304
|
+
transition:
|
|
305
|
+
max-width var(--fn-expand-duration, 300ms) var(--fn-expand-easing, cubic-bezier(0.4, 0, 0.2, 1)),
|
|
306
|
+
opacity var(--fn-label-duration, 200ms) ease;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/* Expanded: reveal labels */
|
|
310
|
+
[data-floating-nav][data-expanded] [data-floating-nav-label] {
|
|
311
|
+
max-width: 12rem;
|
|
312
|
+
opacity: 1;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/* =============================================================================
|
|
316
|
+
Active Indicator
|
|
317
|
+
============================================================================= */
|
|
318
|
+
|
|
319
|
+
[data-floating-nav-indicator] {
|
|
320
|
+
position: absolute;
|
|
321
|
+
border-radius: 0.25rem;
|
|
322
|
+
pointer-events: none;
|
|
323
|
+
transition:
|
|
324
|
+
top var(--fn-indicator-duration, 300ms) cubic-bezier(0.4, 0, 0.2, 1),
|
|
325
|
+
left var(--fn-indicator-duration, 300ms) cubic-bezier(0.4, 0, 0.2, 1);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/* Vertical indicator (left/right positions) — bar on the side */
|
|
329
|
+
[data-floating-nav][data-position='left'] [data-floating-nav-indicator] {
|
|
330
|
+
right: 0;
|
|
331
|
+
width: 3px;
|
|
332
|
+
height: 1.5rem;
|
|
333
|
+
top: calc(var(--fn-active-index, 0) * (2.5rem + 0.125rem) + 0.5rem + 0.25rem);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
[data-floating-nav][data-position='right'] [data-floating-nav-indicator] {
|
|
337
|
+
left: 0;
|
|
338
|
+
width: 3px;
|
|
339
|
+
height: 1.5rem;
|
|
340
|
+
top: calc(var(--fn-active-index, 0) * (2.5rem + 0.125rem) + 0.5rem + 0.25rem);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/* Horizontal indicator (top/bottom positions) — bar on the edge */
|
|
344
|
+
[data-floating-nav][data-position='top'] [data-floating-nav-indicator] {
|
|
345
|
+
bottom: 0;
|
|
346
|
+
height: 3px;
|
|
347
|
+
width: 1.5rem;
|
|
348
|
+
left: calc(var(--fn-active-index, 0) * (2.5rem + 0.125rem) + 0.5rem + 0.25rem);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
[data-floating-nav][data-position='bottom'] [data-floating-nav-indicator] {
|
|
352
|
+
top: 0;
|
|
353
|
+
height: 3px;
|
|
354
|
+
width: 1.5rem;
|
|
355
|
+
left: calc(var(--fn-active-index, 0) * (2.5rem + 0.125rem) + 0.5rem + 0.25rem);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/* Size adjustments for indicator position */
|
|
359
|
+
[data-floating-nav][data-size='sm'][data-position='left'] [data-floating-nav-indicator],
|
|
360
|
+
[data-floating-nav][data-size='sm'][data-position='right'] [data-floating-nav-indicator] {
|
|
361
|
+
height: 1.25rem;
|
|
362
|
+
top: calc(var(--fn-active-index, 0) * (2rem + 0.125rem) + 0.375rem + 0.25rem);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
[data-floating-nav][data-size='lg'][data-position='left'] [data-floating-nav-indicator],
|
|
366
|
+
[data-floating-nav][data-size='lg'][data-position='right'] [data-floating-nav-indicator] {
|
|
367
|
+
height: 1.75rem;
|
|
368
|
+
top: calc(var(--fn-active-index, 0) * (3rem + 0.125rem) + 0.625rem + 0.25rem);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
[data-floating-nav][data-size='sm'][data-position='top'] [data-floating-nav-indicator],
|
|
372
|
+
[data-floating-nav][data-size='sm'][data-position='bottom'] [data-floating-nav-indicator] {
|
|
373
|
+
width: 1.25rem;
|
|
374
|
+
left: calc(var(--fn-active-index, 0) * (2rem + 0.125rem) + 0.375rem + 0.25rem);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
[data-floating-nav][data-size='lg'][data-position='top'] [data-floating-nav-indicator],
|
|
378
|
+
[data-floating-nav][data-size='lg'][data-position='bottom'] [data-floating-nav-indicator] {
|
|
379
|
+
width: 1.75rem;
|
|
380
|
+
left: calc(var(--fn-active-index, 0) * (3rem + 0.125rem) + 0.625rem + 0.25rem);
|
|
381
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @rokkit/themes - Base Styles
|
|
3
|
+
*
|
|
4
|
+
* Structural styles for all components.
|
|
5
|
+
* Import individual files for tree-shaking, or this file for all base styles.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
@import './button.css';
|
|
9
|
+
@import './item.css';
|
|
10
|
+
@import './menu.css';
|
|
11
|
+
@import './select.css';
|
|
12
|
+
@import './toolbar.css';
|
|
13
|
+
@import './tabs.css';
|
|
14
|
+
@import './toggle.css';
|
|
15
|
+
@import './list.css';
|
|
16
|
+
@import './connector.css';
|
|
17
|
+
@import './tree.css';
|
|
18
|
+
@import './floating-action.css';
|
|
19
|
+
@import './input.css';
|
|
20
|
+
@import './display.css';
|
|
21
|
+
@import './tilt.css';
|
|
22
|
+
@import './shine.css';
|
|
23
|
+
@import './breadcrumbs.css';
|
|
24
|
+
@import './card.css';
|
|
25
|
+
@import './progress.css';
|
|
26
|
+
@import './carousel.css';
|
|
27
|
+
@import './pill.css';
|
|
28
|
+
@import './rating.css';
|
|
29
|
+
@import './stepper.css';
|
|
30
|
+
@import './switch.css';
|
|
31
|
+
@import './table.css';
|
|
32
|
+
@import './search-filter.css';
|
|
33
|
+
@import './range.css';
|
|
34
|
+
@import './timeline.css';
|
|
35
|
+
@import './reveal.css';
|
|
36
|
+
@import './floating-navigation.css';
|
package/src/base/input.css
CHANGED
|
@@ -1,67 +1,222 @@
|
|
|
1
|
-
/*
|
|
2
|
-
- Only structure, spacing, sizing, flex, and layout-related properties
|
|
3
|
-
- No colors, gradients, or theme tokens here
|
|
4
|
-
- Uses data-attribute selectors, not tag or class names
|
|
5
|
-
*/
|
|
1
|
+
/* Base structural styles for form fields and inputs */
|
|
6
2
|
|
|
7
|
-
/*
|
|
3
|
+
/* Form root: vertical stack */
|
|
4
|
+
[data-form-root] {
|
|
5
|
+
@apply flex flex-col gap-3;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/* Form field container */
|
|
9
|
+
[data-form-field] {
|
|
10
|
+
@apply flex flex-col;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* Separator between form fields */
|
|
14
|
+
[data-form-separator] {
|
|
15
|
+
@apply border-t border-surface-z2 my-1;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* Form group (fieldset for nested objects) */
|
|
19
|
+
[data-form-group] {
|
|
20
|
+
@apply flex flex-col gap-3 border-none m-0 p-0 pl-3 border-l border-surface-z2;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
[data-form-group-label] {
|
|
24
|
+
@apply text-xs font-semibold pb-1;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Validation report */
|
|
28
|
+
[data-validation-report] {
|
|
29
|
+
@apply flex flex-col gap-2;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
[data-validation-group] {
|
|
33
|
+
@apply flex flex-col gap-0.5;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
[data-validation-group-header] {
|
|
37
|
+
@apply flex items-center gap-1.5 text-xs font-semibold py-1;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
[data-validation-count] {
|
|
41
|
+
@apply inline-flex items-center justify-center rounded-full text-[10px] font-bold min-w-[18px] h-[18px] px-1;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
[data-severity='error'] > [data-validation-group-header] {
|
|
45
|
+
@apply text-error;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
[data-severity='error'] [data-validation-count] {
|
|
49
|
+
@apply bg-error-z1 text-error-z7;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
[data-severity='warning'] > [data-validation-group-header] {
|
|
53
|
+
@apply text-warning;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
[data-severity='warning'] [data-validation-count] {
|
|
57
|
+
@apply bg-warning-z1 text-warning-z7;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
[data-severity='info'] > [data-validation-group-header] {
|
|
61
|
+
@apply text-info;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
[data-severity='info'] [data-validation-count] {
|
|
65
|
+
@apply bg-info-z1 text-info-z7;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
[data-severity='success'] > [data-validation-group-header] {
|
|
69
|
+
@apply text-success;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
[data-severity='success'] [data-validation-count] {
|
|
73
|
+
@apply bg-success-z1 text-success-z7;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
[data-validation-item] {
|
|
77
|
+
@apply text-xs py-0.5 px-2 rounded text-left;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
button[data-validation-item] {
|
|
81
|
+
@apply cursor-pointer bg-transparent border-none hover:bg-surface-z1;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* Form actions (submit/reset buttons) */
|
|
85
|
+
[data-form-actions] {
|
|
86
|
+
@apply flex flex-row gap-2 justify-end pt-2;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
button[data-form-submit],
|
|
90
|
+
button[data-form-reset] {
|
|
91
|
+
@apply px-4 py-1.5 text-sm rounded cursor-pointer border border-surface-z3 bg-surface-z1 hover:bg-surface-z2 transition-colors;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
button[data-form-submit] {
|
|
95
|
+
@apply bg-primary text-on-primary border-primary hover:opacity-90;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
button[data-form-submit]:disabled,
|
|
99
|
+
button[data-form-reset]:disabled {
|
|
100
|
+
@apply opacity-50 cursor-not-allowed;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* Submitting state: reduce interactivity */
|
|
104
|
+
[data-form-submitting] > :not([data-form-actions]) {
|
|
105
|
+
@apply opacity-60 pointer-events-none;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* Field root container */
|
|
8
109
|
[data-field-root] {
|
|
9
|
-
@apply box-border flex flex-col
|
|
110
|
+
@apply box-border flex flex-col;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* Field wrapper: vertical by default */
|
|
114
|
+
[data-field-root] > [data-field] {
|
|
115
|
+
@apply flex flex-col gap-1;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* Checkbox and switch: inline layout */
|
|
119
|
+
[data-field-type='switch'] > [data-field],
|
|
120
|
+
[data-field-type='checkbox'] > [data-field] {
|
|
121
|
+
@apply flex-row items-center gap-2;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* Select: stretch to fill input wrapper — display:flex eliminates inline-block gap */
|
|
125
|
+
[data-input-root] [data-select] {
|
|
126
|
+
@apply flex-1 self-stretch;
|
|
127
|
+
display: flex;
|
|
10
128
|
}
|
|
11
129
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
130
|
+
[data-input-root] [data-select] [data-select-trigger] {
|
|
131
|
+
@apply flex-1 self-stretch;
|
|
132
|
+
min-width: 0;
|
|
15
133
|
}
|
|
16
134
|
|
|
17
|
-
/*
|
|
18
|
-
[data-
|
|
19
|
-
|
|
135
|
+
/* Checkbox icon */
|
|
136
|
+
[data-checkbox-root] {
|
|
137
|
+
@apply flex items-center;
|
|
20
138
|
}
|
|
21
139
|
|
|
22
|
-
/* Label:
|
|
23
|
-
[data-field-root] > label,
|
|
140
|
+
/* Label: fills available space */
|
|
24
141
|
[data-field] > label {
|
|
25
|
-
@apply
|
|
26
|
-
|
|
142
|
+
@apply flex-1 text-xs;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* Info field: horizontal layout */
|
|
146
|
+
[data-field-type='info'] > [data-field] {
|
|
147
|
+
@apply flex-row items-center justify-between;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
[data-field-info] {
|
|
151
|
+
@apply text-xs font-mono;
|
|
27
152
|
}
|
|
28
153
|
|
|
29
|
-
/*
|
|
30
|
-
[data-field]
|
|
31
|
-
|
|
154
|
+
/* Numeric/date input alignment */
|
|
155
|
+
[data-field-type='number'] input,
|
|
156
|
+
[data-field-type='integer'] input,
|
|
157
|
+
[data-field-type='date'] input,
|
|
158
|
+
[data-field-type='time'] input {
|
|
159
|
+
@apply text-right;
|
|
32
160
|
}
|
|
33
161
|
|
|
34
|
-
/*
|
|
35
|
-
[data-
|
|
36
|
-
@apply
|
|
162
|
+
/* Input wrapper: horizontal for input + icon */
|
|
163
|
+
[data-input-root] {
|
|
164
|
+
@apply flex flex-row items-center;
|
|
37
165
|
}
|
|
38
166
|
|
|
39
|
-
/* Input
|
|
40
|
-
[data-
|
|
41
|
-
[data-
|
|
42
|
-
[data-
|
|
43
|
-
@apply
|
|
167
|
+
/* Input elements fill available width */
|
|
168
|
+
[data-input-root] input,
|
|
169
|
+
[data-input-root] textarea,
|
|
170
|
+
[data-input-root] select {
|
|
171
|
+
@apply m-0 min-w-0 flex-1 leading-loose transition-all;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/* Icons inside inputs */
|
|
175
|
+
[data-input-root] [data-icon] {
|
|
176
|
+
@apply aspect-square min-h-full flex-shrink-0;
|
|
44
177
|
}
|
|
45
178
|
|
|
46
179
|
/* Description below input */
|
|
47
180
|
[data-description] {
|
|
48
|
-
@apply
|
|
181
|
+
@apply text-xs leading-snug;
|
|
49
182
|
}
|
|
50
183
|
|
|
51
|
-
/*
|
|
184
|
+
/* Validation message */
|
|
52
185
|
[data-message] {
|
|
53
|
-
@apply
|
|
186
|
+
@apply text-xs leading-snug;
|
|
54
187
|
}
|
|
55
|
-
|
|
56
|
-
|
|
188
|
+
|
|
189
|
+
/* Checkbox icon: focus handling */
|
|
190
|
+
[data-checkbox-icon] {
|
|
191
|
+
@apply focus:outline-none;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/* Range slider thumb */
|
|
195
|
+
input[type='range']::-webkit-slider-thumb {
|
|
196
|
+
appearance: none;
|
|
197
|
+
height: 16px;
|
|
198
|
+
width: 16px;
|
|
199
|
+
border-radius: 50%;
|
|
200
|
+
background: rgba(var(--color-primary-500));
|
|
201
|
+
cursor: pointer;
|
|
57
202
|
}
|
|
58
203
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
204
|
+
input[type='range']::-moz-range-thumb {
|
|
205
|
+
height: 16px;
|
|
206
|
+
width: 16px;
|
|
207
|
+
border-radius: 50%;
|
|
208
|
+
background: rgba(var(--color-primary-500));
|
|
209
|
+
cursor: pointer;
|
|
210
|
+
border: none;
|
|
62
211
|
}
|
|
63
|
-
|
|
64
|
-
|
|
212
|
+
|
|
213
|
+
/* Color input */
|
|
214
|
+
input[type='color'] {
|
|
215
|
+
appearance: none;
|
|
216
|
+
-webkit-appearance: none;
|
|
217
|
+
-moz-appearance: none;
|
|
218
|
+
background: none;
|
|
219
|
+
@apply p-0;
|
|
65
220
|
}
|
|
66
221
|
|
|
67
222
|
/* Responsive adjustments */
|
|
@@ -74,6 +229,6 @@
|
|
|
74
229
|
}
|
|
75
230
|
[data-description],
|
|
76
231
|
[data-message] {
|
|
77
|
-
@apply text-
|
|
232
|
+
@apply text-sm;
|
|
78
233
|
}
|
|
79
234
|
}
|