@rokkit/themes 1.0.0-next.14 → 1.0.0-next.140

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.
Files changed (125) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +106 -9
  3. package/build.mjs +235 -0
  4. package/dist/base.css +4934 -0
  5. package/dist/glass.css +1400 -0
  6. package/dist/index.css +10991 -0
  7. package/dist/material.css +1435 -0
  8. package/dist/minimal.css +1389 -0
  9. package/dist/rokkit.css +1829 -0
  10. package/package.json +53 -52
  11. package/src/base/breadcrumbs.css +47 -0
  12. package/src/base/button.css +254 -0
  13. package/src/base/card.css +36 -0
  14. package/src/base/carousel.css +128 -0
  15. package/src/base/connector.css +92 -0
  16. package/src/base/display.css +91 -0
  17. package/src/base/floating-action.css +388 -0
  18. package/src/base/floating-navigation.css +405 -0
  19. package/src/base/graph-paper.css +83 -0
  20. package/src/base/grid.css +93 -0
  21. package/src/base/index.css +40 -0
  22. package/src/base/input.css +238 -0
  23. package/src/base/item.css +78 -0
  24. package/src/base/list.css +179 -0
  25. package/src/base/menu.css +274 -0
  26. package/src/base/pill.css +57 -0
  27. package/src/base/progress.css +34 -0
  28. package/src/base/range.css +121 -0
  29. package/src/base/rating.css +42 -0
  30. package/src/base/reveal.css +37 -0
  31. package/src/base/search-filter.css +132 -0
  32. package/src/base/select.css +411 -0
  33. package/src/base/shine.css +14 -0
  34. package/src/base/stepper.css +140 -0
  35. package/src/base/switch.css +152 -0
  36. package/src/base/table.css +159 -0
  37. package/src/base/tabs.css +171 -0
  38. package/src/base/tilt.css +14 -0
  39. package/src/base/timeline.css +84 -0
  40. package/src/base/toggle.css +138 -0
  41. package/src/base/toolbar.css +337 -0
  42. package/src/base/tree.css +235 -0
  43. package/src/base/upload-progress.css +155 -0
  44. package/src/base/upload-target.css +67 -0
  45. package/src/glass/button.css +153 -0
  46. package/src/glass/card.css +66 -0
  47. package/src/glass/floating-action.css +61 -0
  48. package/src/glass/floating-navigation.css +74 -0
  49. package/src/glass/index.css +23 -0
  50. package/src/glass/input.css +126 -0
  51. package/src/glass/list.css +122 -0
  52. package/src/glass/menu.css +92 -0
  53. package/src/glass/range.css +61 -0
  54. package/src/glass/search-filter.css +49 -0
  55. package/src/glass/select.css +178 -0
  56. package/src/glass/switch.css +28 -0
  57. package/src/glass/table.css +87 -0
  58. package/src/glass/tabs.css +58 -0
  59. package/src/glass/timeline.css +46 -0
  60. package/src/glass/toggle.css +48 -0
  61. package/src/glass/toolbar.css +84 -0
  62. package/src/glass/tree.css +110 -0
  63. package/src/index.css +18 -0
  64. package/src/index.js +25 -2
  65. package/src/material/button.css +157 -0
  66. package/src/material/card.css +61 -0
  67. package/src/material/floating-action.css +60 -0
  68. package/src/material/floating-navigation.css +74 -0
  69. package/src/material/index.css +23 -0
  70. package/src/material/input.css +159 -0
  71. package/src/material/list.css +126 -0
  72. package/src/material/menu.css +92 -0
  73. package/src/material/range.css +62 -0
  74. package/src/material/search-filter.css +49 -0
  75. package/src/material/select.css +170 -0
  76. package/src/material/switch.css +28 -0
  77. package/src/material/table.css +91 -0
  78. package/src/material/tabs.css +62 -0
  79. package/src/material/timeline.css +46 -0
  80. package/src/material/toggle.css +48 -0
  81. package/src/material/toolbar.css +85 -0
  82. package/src/material/tree.css +103 -0
  83. package/src/minimal/button.css +155 -0
  84. package/src/minimal/card.css +61 -0
  85. package/src/minimal/floating-action.css +59 -0
  86. package/src/minimal/floating-navigation.css +70 -0
  87. package/src/minimal/index.css +23 -0
  88. package/src/minimal/input.css +119 -0
  89. package/src/minimal/list.css +126 -0
  90. package/src/minimal/menu.css +88 -0
  91. package/src/minimal/range.css +61 -0
  92. package/src/minimal/search-filter.css +49 -0
  93. package/src/minimal/select.css +170 -0
  94. package/src/minimal/switch.css +28 -0
  95. package/src/minimal/table.css +89 -0
  96. package/src/minimal/tabs.css +68 -0
  97. package/src/minimal/timeline.css +45 -0
  98. package/src/minimal/toggle.css +48 -0
  99. package/src/minimal/toolbar.css +85 -0
  100. package/src/minimal/tree.css +106 -0
  101. package/src/palette.css +7 -0
  102. package/src/rokkit/button.css +254 -0
  103. package/src/rokkit/card.css +64 -0
  104. package/src/rokkit/connector.css +11 -0
  105. package/src/rokkit/floating-action.css +65 -0
  106. package/src/rokkit/floating-navigation.css +83 -0
  107. package/src/rokkit/grid.css +46 -0
  108. package/src/rokkit/index.css +27 -0
  109. package/src/rokkit/input.css +134 -0
  110. package/src/rokkit/list.css +132 -0
  111. package/src/rokkit/menu.css +93 -0
  112. package/src/rokkit/range.css +62 -0
  113. package/src/rokkit/search-filter.css +49 -0
  114. package/src/rokkit/select.css +190 -0
  115. package/src/rokkit/switch.css +28 -0
  116. package/src/rokkit/table.css +89 -0
  117. package/src/rokkit/tabs.css +87 -0
  118. package/src/rokkit/timeline.css +46 -0
  119. package/src/rokkit/toggle.css +48 -0
  120. package/src/rokkit/toolbar.css +84 -0
  121. package/src/rokkit/tree.css +149 -0
  122. package/src/rokkit/upload-progress.css +102 -0
  123. package/src/rokkit/upload-target.css +50 -0
  124. package/src/constants.js +0 -4
  125. package/src/utils.js +0 -88
@@ -0,0 +1,87 @@
1
+ /**
2
+ * Tabs - Rokkit Theme Styles
3
+ *
4
+ * Rich gradients and glowing borders.
5
+ */
6
+
7
+ /* =============================================================================
8
+ Tab List
9
+ ============================================================================= */
10
+
11
+ [data-style='rokkit'] [data-tabs-list] {
12
+ @apply border-surface-z3 gap-1 border-b-2 px-1;
13
+ }
14
+
15
+ [data-style='rokkit'] [data-tabs][data-position='after'] [data-tabs-list] {
16
+ @apply border-t-2 border-b-0;
17
+ }
18
+
19
+ [data-style='rokkit'] [data-tabs][data-orientation='vertical'] [data-tabs-list] {
20
+ @apply border-r-2 border-b-0 px-0 py-1;
21
+ }
22
+
23
+ [data-style='rokkit']
24
+ [data-tabs][data-orientation='vertical'][data-position='after']
25
+ [data-tabs-list] {
26
+ @apply border-r-0 border-l-2;
27
+ }
28
+
29
+ [data-style='rokkit'] [data-tabs-list]:focus-within {
30
+ @apply border-secondary outline-none;
31
+ }
32
+
33
+ /* =============================================================================
34
+ Tab Triggers
35
+ ============================================================================= */
36
+
37
+ [data-style='rokkit'] [data-tabs-trigger] {
38
+ @apply bg-surface-z1 flex-shrink-0 rounded-t;
39
+ }
40
+
41
+ [data-style='rokkit'] [data-tabs][data-position='after'] [data-tabs-trigger] {
42
+ @apply rounded-t-none rounded-b;
43
+ }
44
+
45
+ [data-style='rokkit'] [data-tabs-trigger]:hover:not(:disabled):not([data-disabled]) {
46
+ @apply bg-surface-z2 text-surface-z8;
47
+ }
48
+
49
+ /* Selected state */
50
+ [data-style='rokkit'] [data-tabs-trigger][data-selected] {
51
+ @apply bg-surface-z3;
52
+ }
53
+
54
+ [data-style='rokkit'] [data-tabs-list]:focus-within [data-tabs-trigger][data-selected] {
55
+ @apply from-primary-z5 to-secondary-z5 text-primary-z9 bg-gradient-to-b;
56
+ }
57
+
58
+ [data-style='rokkit']
59
+ [data-tabs][data-position='after']
60
+ [data-tabs-list]:focus-within
61
+ [data-tabs-trigger][data-selected] {
62
+ @apply bg-gradient-to-t;
63
+ }
64
+
65
+ /* =============================================================================
66
+ Tab Icon
67
+ ============================================================================= */
68
+
69
+ [data-style='rokkit'] [data-tabs-trigger] [data-tabs-icon] {
70
+ @apply text-surface-z5;
71
+ }
72
+
73
+ [data-style='rokkit'] [data-tabs-trigger]:hover:not(:disabled) [data-tabs-icon] {
74
+ @apply text-surface-z7;
75
+ }
76
+
77
+ [data-style='rokkit'] [data-tabs-trigger][data-selected] [data-tabs-icon] {
78
+ @apply text-primary-z7;
79
+ }
80
+
81
+ /* =============================================================================
82
+ Tab Panel
83
+ ============================================================================= */
84
+
85
+ [data-style='rokkit'] [data-tabs-content] {
86
+ @apply text-surface-z8;
87
+ }
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Timeline - Rokkit Theme Styles
3
+ *
4
+ * Rich gradients and glowing accents.
5
+ */
6
+
7
+ /* =============================================================================
8
+ Circle
9
+ ============================================================================= */
10
+
11
+ [data-style='rokkit'] [data-timeline-circle] {
12
+ @apply border-surface-z4 text-surface-z6;
13
+ }
14
+
15
+ [data-style='rokkit'] [data-timeline-item][data-completed] [data-timeline-circle] {
16
+ @apply bg-primary border-primary text-on-primary;
17
+ }
18
+
19
+ [data-style='rokkit'] [data-timeline-item][data-active] [data-timeline-circle] {
20
+ @apply border-primary text-primary;
21
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 20%, transparent);
22
+ }
23
+
24
+ /* =============================================================================
25
+ Connector
26
+ ============================================================================= */
27
+
28
+ [data-style='rokkit'] [data-timeline-connector] {
29
+ @apply bg-surface-z3;
30
+ }
31
+
32
+ [data-style='rokkit'] [data-timeline-item][data-completed] [data-timeline-connector] {
33
+ @apply bg-primary;
34
+ }
35
+
36
+ /* =============================================================================
37
+ Body
38
+ ============================================================================= */
39
+
40
+ [data-style='rokkit'] [data-timeline-title] {
41
+ @apply text-surface-z8;
42
+ }
43
+
44
+ [data-style='rokkit'] [data-timeline-description] {
45
+ @apply text-surface-z6;
46
+ }
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Toggle - Rokkit Theme Styles
3
+ *
4
+ * Rich gradients and glowing borders.
5
+ */
6
+
7
+ /* =============================================================================
8
+ Toggle Container
9
+ ============================================================================= */
10
+
11
+ [data-style='rokkit'] [data-toggle] {
12
+ @apply from-surface-z3 to-surface-z2 border-surface-z4 rounded-lg border bg-gradient-to-b;
13
+ }
14
+
15
+ /* =============================================================================
16
+ Toggle Options
17
+ ============================================================================= */
18
+
19
+ [data-style='rokkit'] [data-toggle-option] {
20
+ @apply text-surface-z6;
21
+ }
22
+
23
+ [data-style='rokkit'] [data-toggle-option]:hover:not(:disabled):not([data-disabled='true']),
24
+ [data-style='rokkit'] [data-toggle-option]:focus:not(:disabled):not([data-disabled='true']) {
25
+ @apply from-surface-z4 to-surface-z3 text-surface-z8 bg-gradient-to-b;
26
+ }
27
+
28
+ /* Selected state */
29
+ [data-style='rokkit'] [data-toggle-option][data-selected='true'] {
30
+ @apply from-primary-z5 to-secondary-z5 text-primary-z9 border-primary-z5 border bg-gradient-to-b shadow-sm;
31
+ }
32
+
33
+ /* =============================================================================
34
+ Toggle Icon
35
+ ============================================================================= */
36
+
37
+ [data-style='rokkit'] [data-toggle-option] [data-toggle-icon] {
38
+ @apply text-surface-z5;
39
+ }
40
+
41
+ [data-style='rokkit'] [data-toggle-option]:hover:not(:disabled) [data-toggle-icon],
42
+ [data-style='rokkit'] [data-toggle-option]:focus:not(:disabled) [data-toggle-icon] {
43
+ @apply text-surface-z7;
44
+ }
45
+
46
+ [data-style='rokkit'] [data-toggle-option][data-selected='true'] [data-toggle-icon] {
47
+ @apply text-primary-z7;
48
+ }
@@ -0,0 +1,84 @@
1
+ /**
2
+ * Toolbar - Rokkit Theme Styles
3
+ *
4
+ * Rich gradients and glowing borders.
5
+ */
6
+
7
+ /* =============================================================================
8
+ Toolbar Container
9
+ ============================================================================= */
10
+
11
+ [data-style='rokkit'] [data-toolbar] {
12
+ @apply from-surface-z2 to-surface-z1 bg-gradient-to-b;
13
+ }
14
+
15
+ /* Position-based borders */
16
+ [data-style='rokkit'] [data-toolbar][data-toolbar-position='top'],
17
+ [data-style='rokkit'] [data-toolbar]:not([data-toolbar-position]) {
18
+ @apply border-surface-z4 border-b shadow-sm;
19
+ }
20
+
21
+ [data-style='rokkit'] [data-toolbar][data-toolbar-position='bottom'] {
22
+ @apply border-surface-z4 border-t shadow-sm;
23
+ }
24
+
25
+ [data-style='rokkit'] [data-toolbar][data-toolbar-position='left'] {
26
+ @apply border-surface-z4 border-r shadow-sm;
27
+ }
28
+
29
+ [data-style='rokkit'] [data-toolbar][data-toolbar-position='right'] {
30
+ @apply border-surface-z4 border-l shadow-sm;
31
+ }
32
+
33
+ /* =============================================================================
34
+ Toolbar Items
35
+ ============================================================================= */
36
+
37
+ [data-style='rokkit'] [data-toolbar-item] {
38
+ @apply text-surface-z7;
39
+ }
40
+
41
+ [data-style='rokkit'] [data-toolbar-item]:hover:not(:disabled):not([data-disabled='true']) {
42
+ @apply from-surface-z3 to-surface-z2 text-surface-z10 bg-gradient-to-b;
43
+ }
44
+
45
+ [data-style='rokkit'] [data-toolbar-item]:focus-visible:not(:disabled):not([data-disabled='true']) {
46
+ @apply from-surface-z3 to-surface-z2 text-surface-z10 ring-primary-z4 bg-gradient-to-b ring-2 outline-none;
47
+ }
48
+
49
+ /* Active/pressed state */
50
+ [data-style='rokkit'] [data-toolbar-item][data-active='true'] {
51
+ @apply from-primary-z5 to-secondary-z5 text-primary-z9 border-primary-z5 border bg-gradient-to-b;
52
+ }
53
+
54
+ [data-style='rokkit'] [data-toolbar-item][data-active='true']:hover:not(:disabled) {
55
+ @apply from-primary-z5 to-primary-z4 text-primary-z10 bg-gradient-to-b;
56
+ }
57
+
58
+ /* =============================================================================
59
+ Toolbar Icon
60
+ ============================================================================= */
61
+
62
+ [data-style='rokkit'] [data-toolbar-item] [data-toolbar-icon] {
63
+ @apply text-surface-z6;
64
+ }
65
+
66
+ [data-style='rokkit'] [data-toolbar-item]:hover:not(:disabled) [data-toolbar-icon] {
67
+ @apply text-surface-z9;
68
+ }
69
+
70
+ [data-style='rokkit'] [data-toolbar-item][data-active='true'] [data-toolbar-icon] {
71
+ @apply text-primary-z7;
72
+ }
73
+
74
+ /* =============================================================================
75
+ Separator & Divider
76
+ ============================================================================= */
77
+
78
+ [data-style='rokkit'] [data-toolbar-separator] {
79
+ @apply from-surface-z5 to-surface-z3 bg-gradient-to-b;
80
+ }
81
+
82
+ [data-style='rokkit'] [data-toolbar-divider] {
83
+ @apply from-surface-z5 to-surface-z3 bg-gradient-to-r;
84
+ }
@@ -0,0 +1,149 @@
1
+ /**
2
+ * Tree - Rokkit Theme Styles
3
+ *
4
+ * Rich gradients and glowing borders.
5
+ */
6
+
7
+ /* =============================================================================
8
+ Tree Container
9
+ ============================================================================= */
10
+
11
+ [data-style='rokkit'] [data-tree]:focus-within {
12
+ @apply ring-primary-z4 rounded ring-1;
13
+ }
14
+
15
+ /* =============================================================================
16
+ Tree Toggle Button
17
+ ============================================================================= */
18
+
19
+ [data-style='rokkit'] [data-tree-toggle-btn] {
20
+ @apply text-surface-z5;
21
+ }
22
+
23
+ [data-style='rokkit'] [data-tree-toggle-btn]:hover {
24
+ @apply from-surface-z3 to-surface-z2 text-surface-z8 bg-gradient-to-b;
25
+ }
26
+
27
+ /* =============================================================================
28
+ Tree Item Content
29
+ ============================================================================= */
30
+
31
+ [data-style='rokkit'] [data-tree-item-content] {
32
+ @apply text-surface-z8;
33
+ }
34
+
35
+ [data-style='rokkit'] [data-tree-item-content]:hover:not(:disabled),
36
+ [data-style='rokkit'] [data-tree-item-content]:focus:not(:disabled) {
37
+ @apply from-surface-z3 to-surface-z2 text-surface-z10 bg-gradient-to-r outline-none;
38
+ }
39
+
40
+ /* Focus visible for keyboard navigation */
41
+ [data-style='rokkit'] [data-tree-item-content]:focus-visible {
42
+ @apply ring-primary-z5 ring-2 outline-none;
43
+ }
44
+
45
+ /* Active/selected state - when focus is within tree */
46
+ [data-style='rokkit'] [data-tree]:focus-within [data-tree-item-content][data-active='true'] {
47
+ @apply from-primary-z5 to-secondary-z5 text-primary-z9 border-l-primary-z5 border-l-2 bg-gradient-to-r;
48
+ }
49
+
50
+ [data-style='rokkit']
51
+ [data-tree]:focus-within
52
+ [data-tree-item-content][data-active='true']:hover:not(:disabled) {
53
+ @apply from-primary-z4 to-primary-z3 bg-gradient-to-r;
54
+ }
55
+
56
+ /* Active/selected state - when focus is outside tree (muted) */
57
+ [data-style='rokkit'] [data-tree]:not(:focus-within) [data-tree-item-content][data-active='true'] {
58
+ @apply from-surface-z3 to-surface-z2 text-surface-z9 border-l-surface-z5 border-l-2 bg-gradient-to-r;
59
+ }
60
+
61
+ /* =============================================================================
62
+ Item Elements
63
+ ============================================================================= */
64
+
65
+ [data-style='rokkit'] [data-tree-item-content] [data-item-icon] {
66
+ @apply text-surface-z5;
67
+ }
68
+
69
+ [data-style='rokkit'] [data-tree-item-content]:hover:not(:disabled) [data-item-icon] {
70
+ @apply text-surface-z7;
71
+ }
72
+
73
+ [data-style='rokkit']
74
+ [data-tree]:focus-within
75
+ [data-tree-item-content][data-active='true']
76
+ [data-item-icon] {
77
+ @apply text-primary-z6;
78
+ }
79
+
80
+ [data-style='rokkit']
81
+ [data-tree]:not(:focus-within)
82
+ [data-tree-item-content][data-active='true']
83
+ [data-item-icon] {
84
+ @apply text-surface-z6;
85
+ }
86
+
87
+ /* Item description */
88
+ [data-style='rokkit'] [data-tree-item-content] [data-item-description] {
89
+ @apply text-surface-z5;
90
+ }
91
+
92
+ [data-style='rokkit']
93
+ [data-tree]:focus-within
94
+ [data-tree-item-content][data-active='true']
95
+ [data-item-description] {
96
+ @apply text-primary-z7;
97
+ }
98
+
99
+ [data-style='rokkit']
100
+ [data-tree]:not(:focus-within)
101
+ [data-tree-item-content][data-active='true']
102
+ [data-item-description] {
103
+ @apply text-surface-z6;
104
+ }
105
+
106
+ /* Item badge */
107
+ [data-style='rokkit'] [data-tree-item-content] [data-item-badge] {
108
+ @apply text-surface-z6 from-surface-z3 to-surface-z2 border-surface-z4 border bg-gradient-to-b;
109
+ }
110
+
111
+ [data-style='rokkit']
112
+ [data-tree]:focus-within
113
+ [data-tree-item-content][data-active='true']
114
+ [data-item-badge] {
115
+ @apply text-primary-z8 from-primary-z3 to-primary-z2 border-primary-z4 border bg-gradient-to-b;
116
+ }
117
+
118
+ [data-style='rokkit']
119
+ [data-tree]:not(:focus-within)
120
+ [data-tree-item-content][data-active='true']
121
+ [data-item-badge] {
122
+ @apply text-surface-z7 from-surface-z4 to-surface-z3 bg-gradient-to-b;
123
+ }
124
+
125
+ /* =============================================================================
126
+ Multi-Selection
127
+ ============================================================================= */
128
+
129
+ [data-style='rokkit'] [data-tree-node][data-selected='true'] [data-tree-node-row] {
130
+ @apply bg-primary-z3;
131
+ }
132
+
133
+ [data-style='rokkit']
134
+ [data-tree]:focus-within
135
+ [data-tree-node][data-selected='true']
136
+ [data-tree-node-row] {
137
+ @apply bg-primary-z4;
138
+ }
139
+
140
+ [data-style='rokkit'] [data-tree-node][data-selected='true'] [data-tree-item-content] {
141
+ @apply text-primary-z9;
142
+ }
143
+
144
+ [data-style='rokkit']
145
+ [data-tree-node][data-selected='true']
146
+ [data-tree-item-content]
147
+ [data-item-icon] {
148
+ @apply text-primary-z6;
149
+ }
@@ -0,0 +1,102 @@
1
+ /**
2
+ * UploadProgress - Rokkit Theme Styles
3
+ *
4
+ * Status colors, progress fill, action buttons.
5
+ */
6
+
7
+ /* =============================================================================
8
+ Header
9
+ ============================================================================= */
10
+
11
+ [data-style='rokkit'] [data-upload-header] {
12
+ @apply text-surface-z7;
13
+ }
14
+
15
+ [data-style='rokkit'] [data-upload-clear] {
16
+ @apply border-surface-z4 text-surface-z6;
17
+ }
18
+
19
+ [data-style='rokkit'] [data-upload-clear]:hover {
20
+ @apply bg-surface-z3 text-surface-z9;
21
+ }
22
+
23
+ /* =============================================================================
24
+ File Rows
25
+ ============================================================================= */
26
+
27
+ [data-style='rokkit'] [data-upload-file-status] {
28
+ @apply text-surface-z7;
29
+ }
30
+
31
+ [data-style='rokkit'] [data-upload-file-status]:hover {
32
+ @apply bg-surface-z2;
33
+ }
34
+
35
+ /* =============================================================================
36
+ File Elements
37
+ ============================================================================= */
38
+
39
+ [data-style='rokkit'] [data-upload-file-icon] {
40
+ @apply text-surface-z5;
41
+ }
42
+
43
+ [data-style='rokkit'] [data-upload-file-size] {
44
+ @apply text-surface-z5;
45
+ }
46
+
47
+ /* =============================================================================
48
+ Progress Bar
49
+ ============================================================================= */
50
+
51
+ [data-style='rokkit'] [data-upload-bar] {
52
+ @apply bg-surface-z3;
53
+ }
54
+
55
+ [data-style='rokkit'] [data-upload-fill] {
56
+ @apply from-primary-z5 to-secondary-z5 bg-gradient-to-r;
57
+ }
58
+
59
+ /* =============================================================================
60
+ Status Colors
61
+ ============================================================================= */
62
+
63
+ [data-style='rokkit'] [data-upload-file-status][data-status='uploading'] [data-upload-status] {
64
+ @apply text-primary-z6;
65
+ }
66
+
67
+ [data-style='rokkit'] [data-upload-file-status][data-status='done'] [data-upload-status] {
68
+ @apply text-green-500;
69
+ }
70
+
71
+ [data-style='rokkit'] [data-upload-file-status][data-status='error'] [data-upload-status] {
72
+ @apply text-red-500;
73
+ }
74
+
75
+ [data-style='rokkit'] [data-upload-file-status][data-status='pending'] [data-upload-status] {
76
+ @apply text-surface-z5;
77
+ }
78
+
79
+ /* Status-based file icon tinting */
80
+ [data-style='rokkit'] [data-upload-file-status][data-status='done'] [data-upload-file-icon] {
81
+ @apply text-green-500;
82
+ }
83
+
84
+ [data-style='rokkit'] [data-upload-file-status][data-status='error'] [data-upload-file-icon] {
85
+ @apply text-red-500;
86
+ }
87
+
88
+ /* =============================================================================
89
+ Action Buttons
90
+ ============================================================================= */
91
+
92
+ [data-style='rokkit'] [data-upload-actions] button {
93
+ @apply text-surface-z5;
94
+ }
95
+
96
+ [data-style='rokkit'] [data-upload-actions] button:hover {
97
+ @apply bg-surface-z3 text-surface-z9;
98
+ }
99
+
100
+ [data-style='rokkit'] [data-upload-file-status][data-status='error'] [data-upload-retry]:hover {
101
+ @apply text-primary-z7;
102
+ }
@@ -0,0 +1,50 @@
1
+ /**
2
+ * UploadTarget - Rokkit Theme Styles
3
+ *
4
+ * Colors, drag-over highlight, hover/focus rings.
5
+ */
6
+
7
+ /* =============================================================================
8
+ Drop Zone
9
+ ============================================================================= */
10
+
11
+ [data-style='rokkit'] [data-upload-target] {
12
+ @apply border-surface-z4 text-surface-z6;
13
+ }
14
+
15
+ [data-style='rokkit'] [data-upload-target]:hover:not([data-disabled]) {
16
+ @apply border-surface-z5 text-surface-z7 bg-surface-z2;
17
+ }
18
+
19
+ [data-style='rokkit'] [data-upload-target]:focus-visible:not([data-disabled]) {
20
+ @apply border-primary-z5 ring-primary-z3 ring-2;
21
+ }
22
+
23
+ /* Drag-over highlight */
24
+ [data-style='rokkit'] [data-upload-target][data-dragging] {
25
+ @apply border-primary-z5 bg-primary-z2 text-primary-z7;
26
+ }
27
+
28
+ /* =============================================================================
29
+ Upload Icon
30
+ ============================================================================= */
31
+
32
+ [data-style='rokkit'] [data-upload-target] [data-upload-icon] {
33
+ @apply text-surface-z5;
34
+ }
35
+
36
+ [data-style='rokkit'] [data-upload-target][data-dragging] [data-upload-icon] {
37
+ @apply text-primary-z6;
38
+ }
39
+
40
+ /* =============================================================================
41
+ Browse Button
42
+ ============================================================================= */
43
+
44
+ [data-style='rokkit'] [data-upload-target] [data-upload-button] {
45
+ @apply border-surface-z4 text-surface-z7;
46
+ }
47
+
48
+ [data-style='rokkit'] [data-upload-target] [data-upload-button]:hover:not(:disabled) {
49
+ @apply bg-surface-z3 text-surface-z9;
50
+ }
package/src/constants.js DELETED
@@ -1,4 +0,0 @@
1
- import { themeColors } from './utils'
2
- export { defaultStateIcons, defaultIcons } from '@rokkit/core/constants'
3
-
4
- export const defaultThemeColors = themeColors()
package/src/utils.js DELETED
@@ -1,88 +0,0 @@
1
- const modifiers = {
2
- hsl: (value) => `hsl(${value})`,
3
- rgb: (value) => `rgb(${value})`,
4
- none: (value) => value
5
- }
6
- /**
7
- * Generate shades for a color using css varuable
8
- *
9
- * @param {string} name
10
- * @returns
11
- */
12
- export function shadesOf(name, modifier = 'none') {
13
- const shades = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900]
14
- const fn = modifier in modifiers ? modifiers[modifier] : modifier.none
15
-
16
- return shades.reduce(
17
- (result, shade) => ({
18
- ...result,
19
- [shade]: fn(`var(--${name}-${shade})`)
20
- }),
21
- { DEFAULT: fn(`var(--${name}-500)`) }
22
- )
23
- }
24
-
25
- export function stateColors(name, modifier = 'none') {
26
- const fn = modifier in modifiers ? modifiers[modifier] : modifier.none
27
- return {
28
- DEFAULT: fn(`var(--${name}-500)`),
29
- light: fn(`var(--${name}-100)`),
30
- dark: fn(`var(--${name}-800)`)
31
- }
32
- }
33
-
34
- export function themeColors(modifier = 'none') {
35
- const fn = modifier in modifiers ? modifiers[modifier] : modifier.none
36
-
37
- let states = ['info', 'error', 'warn', 'pass']
38
- let variants = ['skin', 'primary', 'secondary', 'accent']
39
- let colors = states.reduce(
40
- (acc, state) => ({ ...acc, [state]: stateColors(state, modifier) }),
41
- {}
42
- )
43
- colors = variants.reduce(
44
- (acc, variant) => ({ ...acc, [variant]: shadesOf(variant, modifier) }),
45
- colors
46
- )
47
-
48
- colors.skin = {
49
- ...colors.skin,
50
- contrast: fn(`var(--skin-800)`),
51
- base: fn(`var(--skin-100)`),
52
- zebra: fn(`var(--skin-zebra)`)
53
- }
54
-
55
- return colors
56
- }
57
-
58
- // export function stateIconsFromNames(names) {
59
- // return names
60
- // .map((k) => [...k.split('-'), k])
61
- // .reduce(
62
- // (acc, [element, state, icon]) => ({
63
- // ...acc,
64
- // [element]: { ...acc[element], [state]: icon }
65
- // }),
66
- // {}
67
- // )
68
- // }
69
-
70
- export function iconShortcuts(icons, collection, variant = '') {
71
- const prefix = collection ? collection + ':' : ''
72
- const suffix = variant ? '-' + variant : ''
73
-
74
- const shortcuts = icons.reduce(
75
- (acc, name) => ({
76
- ...acc,
77
- [name]:
78
- prefix +
79
- (name.startsWith('selector')
80
- ? 'chevron-sort'
81
- : name.replace('rating', 'star').replace('navigate', 'chevron')) +
82
- suffix
83
- }),
84
- {}
85
- )
86
-
87
- return shortcuts
88
- }