@rokkit/themes 1.0.0-next.120 → 1.0.0-next.122
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 +1 -1
- package/src/base/atoms.css +1 -1
- package/src/base/core.css +1 -1
- package/src/base/input.css +79 -0
- package/src/base/progress.css +1 -1
- package/src/index.js +2 -3
- package/src/palette.css +2 -20
- package/src/rokkit/atoms.css +1 -1
- package/src/rokkit/input.css +0 -52
- package/src/constants.js +0 -8
package/package.json
CHANGED
package/src/base/atoms.css
CHANGED
package/src/base/core.css
CHANGED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/* Layout Styles for InputField (base/input.css)
|
|
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
|
+
*/
|
|
6
|
+
|
|
7
|
+
/* Root container: vertical stack, spacing, border radius, border width */
|
|
8
|
+
[data-field-root] {
|
|
9
|
+
@apply box-border flex flex-col gap-1 rounded-md border p-2;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* Disabled state: layout only (theme handles color/cursor) */
|
|
13
|
+
[data-field-root][data-field-disabled] {
|
|
14
|
+
/* No layout changes needed for disabled in base */
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* Error state: layout only (theme handles color/bg) */
|
|
18
|
+
[data-field-root][data-field-state='fail'] {
|
|
19
|
+
/* No layout changes needed for error in base */
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Label: spacing and font size */
|
|
23
|
+
[data-field-root] > label,
|
|
24
|
+
[data-field] > label {
|
|
25
|
+
@apply mb-1 text-xs leading-tight;
|
|
26
|
+
display: block;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* Input wrapper: horizontal layout for input and icon */
|
|
30
|
+
[data-field] {
|
|
31
|
+
@apply flex min-h-8 items-center gap-2;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Icon inside input: size and alignment */
|
|
35
|
+
[data-field] [data-icon] {
|
|
36
|
+
@apply h-5 w-5 flex-shrink-0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Input element: fill available width, spacing */
|
|
40
|
+
[data-field] input,
|
|
41
|
+
[data-field] textarea,
|
|
42
|
+
[data-field] select {
|
|
43
|
+
@apply box-border min-w-0 flex-1;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Description below input */
|
|
47
|
+
[data-description] {
|
|
48
|
+
@apply mt-1 text-xs leading-snug;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* Message below input (validation, info, etc.) */
|
|
52
|
+
[data-message] {
|
|
53
|
+
@apply mt-1 text-xs leading-snug;
|
|
54
|
+
}
|
|
55
|
+
[data-field-root] > [data-field] {
|
|
56
|
+
@apply flex flex-col gap-2;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* Checkbox and switch inline with input */
|
|
60
|
+
[data-field-root][data-field-type='switch'] > [data-field] {
|
|
61
|
+
@applyf flex-row items-center;
|
|
62
|
+
}
|
|
63
|
+
[data-field-root][data-field-type='checkbox'] > [data-field] {
|
|
64
|
+
@applyf flex-row-reverse items-center;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* Responsive adjustments */
|
|
68
|
+
@media (max-width: 640px) {
|
|
69
|
+
[data-field-root] {
|
|
70
|
+
@apply p-1;
|
|
71
|
+
}
|
|
72
|
+
[data-field] {
|
|
73
|
+
@apply min-h-7 gap-1;
|
|
74
|
+
}
|
|
75
|
+
[data-description],
|
|
76
|
+
[data-message] {
|
|
77
|
+
@apply text-[11px];
|
|
78
|
+
}
|
|
79
|
+
}
|
package/src/base/progress.css
CHANGED
package/src/index.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export { iconShortcuts,
|
|
2
|
-
|
|
3
|
-
export * from './constants.js'
|
|
1
|
+
export { iconShortcuts, Theme } from '@rokkit/core'
|
|
2
|
+
export { defaultStateIcons, defaultIcons } from '@rokkit/core'
|
package/src/palette.css
CHANGED
|
@@ -1,25 +1,7 @@
|
|
|
1
1
|
@layer base {
|
|
2
2
|
:root {
|
|
3
3
|
--scroll-width: 0.5rem;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
[data-mode='light'] {
|
|
7
|
-
@apply rokkit-mode-light;
|
|
8
|
-
}
|
|
9
|
-
@media (prefers-color-scheme: dark) {
|
|
10
|
-
body:not([data-mode='light']) {
|
|
11
|
-
@apply rokkit-mode-dark;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/* dark theme colors */
|
|
16
|
-
[data-mode='dark'] {
|
|
17
|
-
@apply rokkit-mode-dark;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
@media (prefers-color-scheme: light) {
|
|
21
|
-
body:not([data-mode='dark']) {
|
|
22
|
-
@apply rokkit-mode-light;
|
|
23
|
-
}
|
|
4
|
+
--tab-size: 2;
|
|
5
|
+
@apply skin-default;
|
|
24
6
|
}
|
|
25
7
|
}
|
package/src/rokkit/atoms.css
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
[data-style='rokkit'] rk-progress-bar rk-value-bar {
|
|
17
|
-
@apply from-primary to-secondary
|
|
17
|
+
@apply from-primary-500 to-secondary-500 bg-gradient-to-r text-neutral-100 dark:text-neutral-800;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/* Styles for 'searchable' class */
|
package/src/rokkit/input.css
CHANGED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/* Styles for 'rk-input-field' class */
|
|
2
|
-
|
|
3
|
-
[data-style='rokkit'] rk-input-select select {
|
|
4
|
-
@apply border-none;
|
|
5
|
-
}
|
|
6
|
-
[data-style='rokkit'] rk-input-field rk-field,
|
|
7
|
-
[data-style='rokkit'] rk-input-select {
|
|
8
|
-
@apply p-2px border-neutral-muted box-border rounded border;
|
|
9
|
-
}
|
|
10
|
-
[data-style='rokkit'] rk-input-select {
|
|
11
|
-
@apply flex h-8 items-center px-2;
|
|
12
|
-
}
|
|
13
|
-
[data-style='rokkit'] rk-input-field input,
|
|
14
|
-
[data-style='rokkit'] rk-input-field textarea,
|
|
15
|
-
[data-style='rokkit'] rk-input-field select {
|
|
16
|
-
@apply rounded-sm border-0;
|
|
17
|
-
}
|
|
18
|
-
[data-style='rokkit'] rk-checkbox {
|
|
19
|
-
@apply outline-none;
|
|
20
|
-
}
|
|
21
|
-
[data-style='rokkit'] rk-input-field > label {
|
|
22
|
-
@apply text-secondary-600;
|
|
23
|
-
}
|
|
24
|
-
[data-style='rokkit'] rk-input-field rk-field > label {
|
|
25
|
-
@apply text-secondary-600 flex h-full w-full items-center text-xs uppercase;
|
|
26
|
-
}
|
|
27
|
-
[data-style='rokkit'] rk-input-field:not(.disabled) rk-field:focus-within {
|
|
28
|
-
@apply border-neutral-base from-primary to-secondary bg-gradient-to-r;
|
|
29
|
-
}
|
|
30
|
-
[data-style='rokkit'] rk-input-field.disabled label {
|
|
31
|
-
@apply text-neutral-500;
|
|
32
|
-
}
|
|
33
|
-
/* [data-style="rokkit"] rk-input-field.disabled rk-field:focus-within {
|
|
34
|
-
@apply bg-gradient-to-r from-neutral-subtle to-neutral-subtle;
|
|
35
|
-
} */
|
|
36
|
-
[data-style='rokkit'] rk-input-field > span {
|
|
37
|
-
@apply border-neutral-muted bg-neutral-base aspect-square h-full border-r px-1;
|
|
38
|
-
}
|
|
39
|
-
[data-style='rokkit'] rk-input-field message {
|
|
40
|
-
@apply bg-neutral-base rounded px-2 py-1;
|
|
41
|
-
}
|
|
42
|
-
[data-style='rokkit'] rk-input-field.fail {
|
|
43
|
-
@apply bg-error rounded px-2;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
[data-style='rokkit'] rk-select {
|
|
47
|
-
@apply border-neutral-subtle box-border h-9 rounded-md border;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
[data-style='rokkit'] rk-select > select {
|
|
51
|
-
@apply bg-neutral-subtle text-on-neutral-subtle h-full;
|
|
52
|
-
}
|
package/src/constants.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { themeColors, themeRules } from '@rokkit/core'
|
|
2
|
-
export { defaultStateIcons, defaultIcons } from '@rokkit/core'
|
|
3
|
-
export const defaultThemeColors = themeColors()
|
|
4
|
-
|
|
5
|
-
export const palettes = {
|
|
6
|
-
rokkit: themeRules(),
|
|
7
|
-
'sea-green': themeRules('sea-green', { primary: 'teal', secondary: 'sky', accent: 'lime' })
|
|
8
|
-
}
|