@rokkit/themes 1.0.0-next.12 → 1.0.0-next.120
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 +9 -31
- package/src/base/alert.css +30 -0
- package/src/base/animation.css +37 -0
- package/src/base/atoms.css +58 -0
- package/src/base/carousel.css +18 -0
- package/src/base/core.css +107 -0
- package/src/base/layout.css +65 -0
- package/src/base/molecules.css +109 -0
- package/src/base/organisms.css +66 -0
- package/src/base/progress.css +21 -0
- package/src/base/scrollbar.css +16 -0
- package/src/base/table.css +49 -0
- package/src/base/toggles.css +17 -0
- package/src/base/tree.css +18 -0
- package/src/base.css +13 -0
- package/src/constants.js +7 -3
- package/src/index.js +3 -2
- package/src/markdown.css +955 -0
- package/src/material/base.css +12 -0
- package/src/material/form.css +30 -0
- package/src/material/input.css +65 -0
- package/src/material/list.css +96 -0
- package/src/material.css +9 -0
- package/src/minimal/base.css +8 -0
- package/src/minimal/form.css +87 -0
- package/src/minimal/input.css +154 -0
- package/src/minimal/list.css +136 -0
- package/src/minimal/tabs.css +44 -0
- package/src/minimal.css +11 -0
- package/src/mixins/mixins.scss +66 -0
- package/src/mixins/palette.scss +48 -0
- package/src/palette.css +25 -0
- package/src/prism.css +102 -0
- package/src/rokkit/alert.css +4 -0
- package/src/rokkit/atoms.css +52 -0
- package/src/rokkit/carousel.css +19 -0
- package/src/rokkit/input.css +52 -0
- package/src/rokkit/layout.css +17 -0
- package/src/rokkit/molecules.css +124 -0
- package/src/rokkit/organisms.css +307 -0
- package/src/rokkit/table.css +57 -0
- package/src/rokkit/toggle.css +64 -0
- package/src/rokkit.css +11 -0
- package/LICENSE +0 -21
- package/src/utils.js +0 -88
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
[data-style='rokkit'] rk-list-item {
|
|
2
|
+
@apply gap-2;
|
|
3
|
+
}
|
|
4
|
+
/* rk-list styles */
|
|
5
|
+
|
|
6
|
+
[data-style='rokkit'] rk-list {
|
|
7
|
+
@apply gap-1px bg-neutral-subtle;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
[data-style='rokkit'] rk-list rk-list-item,
|
|
11
|
+
[data-style='rokkit'] rk-accordion div rk-summary {
|
|
12
|
+
@apply bg-neutral-base min-h-8 px-4 leading-10 text-neutral-800;
|
|
13
|
+
}
|
|
14
|
+
[data-style='rokkit'] rk-accordion > div > rk-summary {
|
|
15
|
+
@apply bg-gradient from-neutral-subtle to-neutral-muted rounded pr-2;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* Remove default details marker from summary */
|
|
19
|
+
/* [data-style="rokkit"] rk-accordion > div > rk-summary::-webkit-details-marker {
|
|
20
|
+
display: none;
|
|
21
|
+
} */
|
|
22
|
+
|
|
23
|
+
/* Nested rk-list and Tree styles */
|
|
24
|
+
[data-style='rokkit'] :not(accordion > div) > rk-list {
|
|
25
|
+
@apply overflow-y-scroll rounded border border-neutral-400 shadow;
|
|
26
|
+
}
|
|
27
|
+
[data-style='rokkit'] :not(accordion > div) > rk-list rk-list-item {
|
|
28
|
+
@apply first:rounded-t last:rounded-b;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
[data-style='rokkit'] rk-accordion rk-list rk-list-item {
|
|
32
|
+
@apply gap-2 last:rounded-b;
|
|
33
|
+
}
|
|
34
|
+
[data-style='rokkit'] rk-accordion rk-list rk-list-item > a {
|
|
35
|
+
@apply gap-2;
|
|
36
|
+
}
|
|
37
|
+
[data-style='rokkit'] rk-accordion rk-list {
|
|
38
|
+
@apply rounded-b;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
[data-style='rokkit'] rk-accordion .is-expanded rk-list {
|
|
42
|
+
@apply -mt-10 rounded-t pt-10;
|
|
43
|
+
}
|
|
44
|
+
/* Styles for 'tabs' class */
|
|
45
|
+
[data-style='rokkit'] tabs {
|
|
46
|
+
@apply border-neutral-muted gap-1 border-b-2 px-1;
|
|
47
|
+
}
|
|
48
|
+
[data-style='rokkit'] tabs.is-below {
|
|
49
|
+
@apply border-b-0 border-t-2;
|
|
50
|
+
}
|
|
51
|
+
[data-style='rokkit'] tabs:focus-within {
|
|
52
|
+
@apply border-secondary outline-none;
|
|
53
|
+
}
|
|
54
|
+
[data-style='rokkit'] tabs .tab {
|
|
55
|
+
@apply bg-neutral-base flex-shrink-0 cursor-pointer items-center gap-3 rounded-t px-3 leading-9;
|
|
56
|
+
}
|
|
57
|
+
[data-style='rokkit'] tabs.is-below .tab {
|
|
58
|
+
@apply rounded-b rounded-t-none;
|
|
59
|
+
}
|
|
60
|
+
[data-style='rokkit'] tabs.is-centered {
|
|
61
|
+
@apply justify-center;
|
|
62
|
+
}
|
|
63
|
+
[data-style='rokkit'] tabs .tab[aria-selected='true'] {
|
|
64
|
+
@apply bg-neutral-muted;
|
|
65
|
+
}
|
|
66
|
+
[data-style='rokkit'] tabs:focus-within .tab[aria-selected='true'] {
|
|
67
|
+
@apply from-primary to-secondary bg-gradient-to-b text-white;
|
|
68
|
+
}
|
|
69
|
+
[data-style='rokkit'] tabs.is-below:focus-within .tab[aria-selected='true'] {
|
|
70
|
+
@apply bg-gradient-to-t;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* Styles for 'button' and 'button-group' classes */
|
|
74
|
+
[data-style='rokkit'] button,
|
|
75
|
+
[data-style='rokkit'] .button {
|
|
76
|
+
@apply bg-neutral-subtle text-on-neutral-subtle flex min-h-9 cursor-pointer items-center gap-3 rounded-full px-6 uppercase;
|
|
77
|
+
animation: button-pop var(--animation-btn, 0.25s) ease-out;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
[data-style='rokkit'] button.is-primary,
|
|
81
|
+
[data-style='rokkit'] .button.is-primary {
|
|
82
|
+
@apply from-primary to-secondary bg-gradient-to-r px-4 text-white;
|
|
83
|
+
}
|
|
84
|
+
[data-style='rokkit'] a.square > rk-icon {
|
|
85
|
+
@apply text-on-neutral-subtle h-full w-full;
|
|
86
|
+
}
|
|
87
|
+
[data-style='rokkit'] a.square {
|
|
88
|
+
@apply border-neutral-subtle bg-neutral-subtle flex items-center justify-center rounded-md border leading-loose;
|
|
89
|
+
}
|
|
90
|
+
[data-style='rokkit'] button-group {
|
|
91
|
+
@apply gap-1px m-auto flex items-center justify-center py-1;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
[data-style='rokkit'] button-group button {
|
|
95
|
+
@apply flex rounded-none px-2 pt-0.5 uppercase focus:outline-none;
|
|
96
|
+
}
|
|
97
|
+
[data-style='rokkit'] button-group button:first-child {
|
|
98
|
+
@apply rounded-l-full pl-3;
|
|
99
|
+
}
|
|
100
|
+
[data-style='rokkit'] button-group button:last-child {
|
|
101
|
+
@apply rounded-r-full pr-3;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
[data-style='rokkit'] button-group button.active {
|
|
105
|
+
@apply from-primary to-secondary bg-gradient-to-r text-white;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* Input and Drop-down styles */
|
|
109
|
+
[data-style="rokkit"] input-select,
|
|
110
|
+
/* [data-style="rokkit"] select, */
|
|
111
|
+
[data-style="rokkit"] drop-down > button {
|
|
112
|
+
@apply rounded;
|
|
113
|
+
/* @apply border border-neutral-muted; */
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
[data-style='rokkit'] drop-down > button {
|
|
117
|
+
@apply bg-neutral-base p-0;
|
|
118
|
+
}
|
|
119
|
+
[data-style='rokkit'] drop-down > button > span {
|
|
120
|
+
@apply rounded py-0;
|
|
121
|
+
}
|
|
122
|
+
[data-style='rokkit'] drop-down > button > span > * {
|
|
123
|
+
@apply h-full items-center;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
[data-style='rokkit'] :not(field) > input-select {
|
|
127
|
+
@apply bg-neutral-base border-neutral-muted p-2px border;
|
|
128
|
+
}
|
|
129
|
+
[data-style='rokkit'] :not(field) > input-select > selected-item {
|
|
130
|
+
@apply bg-neutral-subtle;
|
|
131
|
+
}
|
|
132
|
+
[data-style='rokkit'] :not(field) > input-select:focus-within,
|
|
133
|
+
[data-style='rokkit'] :not(field) > input-select:focus-within,
|
|
134
|
+
[data-style='rokkit'] drop-down:focus-within > button {
|
|
135
|
+
/* @apply p-2px; */
|
|
136
|
+
@apply border-none outline-none;
|
|
137
|
+
@apply from-primary to-secondary bg-gradient-to-r text-white;
|
|
138
|
+
}
|
|
139
|
+
/* [data-style="rokkit"] :not(field) > input-select:focus-within > selected-item,
|
|
140
|
+
[data-style="rokkit"] drop-down:focus-within > button > span {
|
|
141
|
+
@apply bg-neutral-muted outline-none min-h-10;
|
|
142
|
+
} */
|
|
143
|
+
|
|
144
|
+
/* Hover and rk-icon styles */
|
|
145
|
+
/* [data-style="rokkit"] input-select:hover > rk-icon,
|
|
146
|
+
[data-style="rokkit"] drop-down:hover > rk-icon {
|
|
147
|
+
@apply border-neutral;
|
|
148
|
+
} */
|
|
149
|
+
|
|
150
|
+
/* Scroll styles */
|
|
151
|
+
[data-style='rokkit'] input-select scroll {
|
|
152
|
+
@apply my-1 rounded shadow-lg;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* [data-style="rokkit"] input-select > selected-item > items {
|
|
156
|
+
@apply flex-grow flex-wrap gap-2;
|
|
157
|
+
} */
|
|
158
|
+
|
|
159
|
+
/* rk-accordion styles */
|
|
160
|
+
[data-style='rokkit'] rk-accordion {
|
|
161
|
+
@apply flex-grow gap-1 overflow-y-scroll;
|
|
162
|
+
}
|
|
163
|
+
[data-style='rokkit'] rk-accordion > div {
|
|
164
|
+
@apply relative rounded shadow;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/* Nested rk-list and rk-node styles */
|
|
168
|
+
[data-style='rokkit'] rk-nested-list {
|
|
169
|
+
@apply text-neutral-800;
|
|
170
|
+
}
|
|
171
|
+
[data-style='rokkit'] rk-nested-list rk-node > div {
|
|
172
|
+
@apply h-8 px-2;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/* Tree styles */
|
|
176
|
+
[data-style='rokkit'] tree {
|
|
177
|
+
@apply rounded;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/* Focus styles for Nested rk-list, Tree, and rk-accordion */
|
|
181
|
+
[data-style='rokkit'] rk-nested-list,
|
|
182
|
+
[data-style='rokkit'] rk-nested-list:focus-within,
|
|
183
|
+
[data-style='rokkit'] rk-tree:focus-within {
|
|
184
|
+
@apply rounded outline-none;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
[data-style='rokkit'] rk-accordion,
|
|
188
|
+
[data-style='rokkit'] rk-list {
|
|
189
|
+
@apply rounded;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/* Remove outline from focused elements */
|
|
193
|
+
[data-style='rokkit'] rk-accordion:focus-within rk-list,
|
|
194
|
+
[data-style='rokkit'] drop-down:focus-within rk-list,
|
|
195
|
+
[data-style='rokkit'] input-select:focus-within rk-list {
|
|
196
|
+
@apply outline-none focus:outline-none;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/* Focus and Hover styles for rk-list and rk-node */
|
|
200
|
+
[data-style='rokkit'] rk-list:focus {
|
|
201
|
+
@apply outline-secondary outline;
|
|
202
|
+
}
|
|
203
|
+
[data-style='rokkit'] rk-list rk-list-item:hover,
|
|
204
|
+
[data-style='rokkit'] rk-node > div:hover {
|
|
205
|
+
@apply bg-neutral-subtle;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
[data-style='rokkit'] rk-list-item[aria-current='true'],
|
|
209
|
+
[data-style='rokkit'] rk-node[aria-current='true'] > div {
|
|
210
|
+
@apply bg-neutral-subtle text-on-neutral-subtle;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/* Selected and Hover styles for rk-list and rk-node */
|
|
214
|
+
[data-style='rokkit'] rk-list rk-list-item[aria-selected='true'] > a {
|
|
215
|
+
@apply text-white;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/* Expanded and Selected styles for rk-accordion */
|
|
219
|
+
[data-style='rokkit'] rk-accordion .is-expanded rk-summary {
|
|
220
|
+
@apply border-neutral-muted z-1 sticky top-0 rounded-b-none border-b;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
[data-style='rokkit'] rk-accordion [aria-selected='true'] rk-summary {
|
|
224
|
+
@apply bg-neutral-subtle;
|
|
225
|
+
}
|
|
226
|
+
[data-style='rokkit'] rk-accordion:focus-within [aria-selected='true'] rk-summary {
|
|
227
|
+
@apply from-primary to-secondary bg-gradient-to-r text-white outline-none;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/* Border styles for rk-accordion */
|
|
231
|
+
[data-style='rokkit'] rk-accordion > div {
|
|
232
|
+
@apply border-neutral-muted border;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/* Folder Tree styles */
|
|
236
|
+
[data-style='rokkit'] .folder-tree {
|
|
237
|
+
@apply bg-neutral-inset h-full;
|
|
238
|
+
}
|
|
239
|
+
[data-style='rokkit'] .folder-tree rk-nested-list {
|
|
240
|
+
@apply bg-neutral-inset h-full;
|
|
241
|
+
}
|
|
242
|
+
[data-style='rokkit'] rk-node > div > rk-item {
|
|
243
|
+
@apply px-1;
|
|
244
|
+
}
|
|
245
|
+
[data-style='rokkit'] rk-node > div > span {
|
|
246
|
+
@apply flex-shrink-0;
|
|
247
|
+
}
|
|
248
|
+
[data-style='rokkit'] rk-node > div > span > i {
|
|
249
|
+
@apply border-neutral-muted;
|
|
250
|
+
}
|
|
251
|
+
[data-style='rokkit'] rk-node > div > rk-icon > i {
|
|
252
|
+
@apply text-neutral-elevated;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/* Toggle Switch styles */
|
|
256
|
+
[data-style='rokkit'] rk-switch {
|
|
257
|
+
@apply mx-auto min-w-12 rounded-full;
|
|
258
|
+
@apply bg-neutral-subtle border-neutral-muted border;
|
|
259
|
+
@apply p-2px leading-loose;
|
|
260
|
+
}
|
|
261
|
+
[data-style='rokkit'] rk-switch:focus-within {
|
|
262
|
+
@apply outline-secondary outline;
|
|
263
|
+
}
|
|
264
|
+
[data-style='rokkit'] rk-switch rk-item {
|
|
265
|
+
@apply items-center justify-center gap-1 px-3 py-0 leading-loose;
|
|
266
|
+
@apply min-h-6 min-w-6 cursor-pointer rounded-full;
|
|
267
|
+
}
|
|
268
|
+
[data-style='rokkit'] rk-switch rk-item > rk-icon > i {
|
|
269
|
+
@apply text-lg;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
[data-style='rokkit'] rk-switch rk-item[aria-selected='true'] {
|
|
273
|
+
@apply from-neutral-muted to-neutral-muted bg-gradient-to-r;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
[data-style='rokkit'] rk-switch.compact > rk-item {
|
|
277
|
+
@apply gap-0 px-0;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
[data-style='rokkit'] rk-switch:focus-within rk-item[aria-selected='true'],
|
|
281
|
+
[data-style='rokkit'] rk-list:focus-within rk-list-item[aria-selected='true'],
|
|
282
|
+
[data-style='rokkit'] rk-tree:focus-within rk-node[aria-selected='true'] > div {
|
|
283
|
+
@apply from-primary to-secondary bg-gradient-to-r text-white;
|
|
284
|
+
@apply hover:from-secondary hover:to-primary;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
[data-style='rokkit'] rk-switch[aria-disabled='true'] {
|
|
288
|
+
@apply bg-neutral-muted cursor-not-allowed text-neutral-500;
|
|
289
|
+
}
|
|
290
|
+
[data-style='rokkit'] rk-input-select > rk-selected-item > rk-items {
|
|
291
|
+
@apply flex-grow flex-wrap gap-2;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
[data-style='rokkit'] rk-container:focus-within {
|
|
295
|
+
@apply outline-none;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
[data-style='rokkit'] rk-pill {
|
|
299
|
+
@apply bg-neutral-muted border-neutral-muted rounded-full border px-4 text-neutral-800;
|
|
300
|
+
}
|
|
301
|
+
[data-style='rokkit'] rk-pill rk-icon {
|
|
302
|
+
@apply text-neutral-700;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
[data-style='rokkit'] rk-pill rk-icon[role='button'] {
|
|
306
|
+
@apply hover:text-primary-elevated text-neutral-elevated text-sm;
|
|
307
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
th,
|
|
2
|
+
td {
|
|
3
|
+
@apply px-5 py-3;
|
|
4
|
+
}
|
|
5
|
+
tr {
|
|
6
|
+
@apply gap-1px;
|
|
7
|
+
}
|
|
8
|
+
th {
|
|
9
|
+
@apply whitespace-nowrap;
|
|
10
|
+
}
|
|
11
|
+
th cell,
|
|
12
|
+
td cell {
|
|
13
|
+
@apply flex w-full items-center gap-2;
|
|
14
|
+
}
|
|
15
|
+
th[data-sortable='true'] {
|
|
16
|
+
@apply cursor-pointer;
|
|
17
|
+
}
|
|
18
|
+
th[data-sortable='true']:hover,
|
|
19
|
+
th[data-sortable='true']:hover icon {
|
|
20
|
+
@apply text-primary-700;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
table {
|
|
24
|
+
@apply w-full text-left text-sm text-neutral-700 rtl:text-right;
|
|
25
|
+
}
|
|
26
|
+
table > thead {
|
|
27
|
+
@apply table-header-group bg-neutral-400 text-xs uppercase;
|
|
28
|
+
}
|
|
29
|
+
table > caption {
|
|
30
|
+
@apply bg-neutral-subtle table-caption p-5 text-left text-sm font-normal text-neutral-600 rtl:text-right;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
table > tbody > tr {
|
|
34
|
+
@apply border-neutral-base bg-neutral-subtle table-row border-b;
|
|
35
|
+
}
|
|
36
|
+
table.striped > tbody > tr:nth-child(even) {
|
|
37
|
+
@apply bg-neutral-inset;
|
|
38
|
+
}
|
|
39
|
+
table > tfoot {
|
|
40
|
+
@apply table-footer-group;
|
|
41
|
+
}
|
|
42
|
+
table > tfoot > tr {
|
|
43
|
+
@apply table-row font-semibold text-neutral-800;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
rk-table-wrapper {
|
|
47
|
+
@apply shadow-md sm:rounded-lg;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
td rk-cell.cell-type-integer p,
|
|
51
|
+
td rk-cell.cell-type-number p {
|
|
52
|
+
@apply w-full text-right;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
td rk-cell rk-item {
|
|
56
|
+
@apply flex w-full;
|
|
57
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
[data-style='rokkit'] rk-switch {
|
|
2
|
+
@apply flex cursor-pointer flex-row items-center gap-3;
|
|
3
|
+
@apply border-neutral-muted rounded-md border p-2;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
[data-style='rokkit'] rk-switch:hover > rk-icon {
|
|
7
|
+
@apply text-secondary;
|
|
8
|
+
}
|
|
9
|
+
[data-style='rokkit'] rk-switch:focus-within,
|
|
10
|
+
[data-style='rokkit'] rk-toggle:focus-within {
|
|
11
|
+
@apply ring-primary-500 px-2 outline-none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
[data-style='rokkit'] rk-switch.minimal {
|
|
15
|
+
@apply border-none py-0 focus-within:ring-0;
|
|
16
|
+
}
|
|
17
|
+
[data-style='rokkit'] rk-switch.minimal rk-icon > i {
|
|
18
|
+
@apply text-md h-4;
|
|
19
|
+
}
|
|
20
|
+
[data-style='rokkit'] rk-toggle {
|
|
21
|
+
@apply border-neutral-subtle bg-neutral-subtle box-border aspect-square h-9 border;
|
|
22
|
+
@apply flex items-center justify-center rounded-md leading-loose;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
[data-style='rokkit'] rk-toggle:focus-within,
|
|
26
|
+
[data-style='rokkit'] a.button.square:focus-within {
|
|
27
|
+
@apply ring-secondary border-neutral-base border ring-2;
|
|
28
|
+
}
|
|
29
|
+
[data-style='rokkit'] rk-toggle:focus-within button {
|
|
30
|
+
@apply p-0;
|
|
31
|
+
}
|
|
32
|
+
[data-style='rokkit'] rk-toggle > button {
|
|
33
|
+
@apply p-0 outline-none;
|
|
34
|
+
}
|
|
35
|
+
/* [data-style='rokkit'] rk-toggle rk-icon {
|
|
36
|
+
@apply bg-neutral-base flex rounded p-0 leading-loose;
|
|
37
|
+
} */
|
|
38
|
+
|
|
39
|
+
[data-style='rokkit'] a.square {
|
|
40
|
+
@apply aspect-square min-h-9 min-w-9;
|
|
41
|
+
}
|
|
42
|
+
[data-style='rokkit'] a.button {
|
|
43
|
+
@apply p-0;
|
|
44
|
+
}
|
|
45
|
+
[data-style='rokkit'] rk-toggle rk-icon {
|
|
46
|
+
@apply bg-neutral-subtle h-full w-full rounded-md;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* [data-style='rokkit'] rk-toggle > button {
|
|
50
|
+
@apply items-center justify-center rounded-md p-0;
|
|
51
|
+
}
|
|
52
|
+
[data-style='rokkit'] rk-toggle > button > rk-icon {
|
|
53
|
+
@apply aspect-square items-center justify-center;
|
|
54
|
+
} */
|
|
55
|
+
/* [data-style='rokkit'] rk-toggle button {
|
|
56
|
+
@apply m-0 h-full w-full p-0;
|
|
57
|
+
} */
|
|
58
|
+
|
|
59
|
+
/* [data-style='rokkit'] rk-toggle.small {
|
|
60
|
+
@apply p-2px flex aspect-square flex-col items-center justify-center;
|
|
61
|
+
} */
|
|
62
|
+
/* [data-style="rokkit"] rk-toggle:focus-within button {
|
|
63
|
+
@apply bg-neutral-base text-neutral hover:text-primary rounded-sm;
|
|
64
|
+
} */
|
package/src/rokkit.css
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
@import './base.css';
|
|
2
|
+
|
|
3
|
+
@import './rokkit/atoms.css';
|
|
4
|
+
@import './rokkit/alert.css';
|
|
5
|
+
@import './rokkit/input.css';
|
|
6
|
+
@import './rokkit/molecules.css';
|
|
7
|
+
@import './rokkit/organisms.css';
|
|
8
|
+
@import './rokkit/layout.css';
|
|
9
|
+
@import './rokkit/toggle.css';
|
|
10
|
+
@import './rokkit/table.css';
|
|
11
|
+
@import './rokkit/carousel.css';
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2022 Jerry Thomas
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
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
|
-
}
|