@rokkit/themes 1.0.0-next.100
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/LICENSE +21 -0
- package/README.md +13 -0
- package/package.json +54 -0
- package/src/base/alert.css +30 -0
- package/src/base/animation.css +22 -0
- package/src/base/atoms.css +58 -0
- package/src/base/carousel.css +18 -0
- package/src/base/core.css +92 -0
- package/src/base/layout.css +65 -0
- package/src/base/molecules.css +126 -0
- package/src/base/organisms.css +26 -0
- package/src/base/scrollbar.css +16 -0
- package/src/base/table.css +49 -0
- package/src/base/tree.css +18 -0
- package/src/base.css +11 -0
- package/src/constants.js +8 -0
- package/src/index.js +3 -0
- 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 +69 -0
- package/src/rokkit/carousel.css +19 -0
- package/src/rokkit/input.css +36 -0
- package/src/rokkit/layout.css +17 -0
- package/src/rokkit/molecules.css +119 -0
- package/src/rokkit/organisms.css +315 -0
- package/src/rokkit/table.css +57 -0
- package/src/rokkit/toggle.css +18 -0
- package/src/rokkit.css +11 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
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/README.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Themes
|
|
2
|
+
|
|
3
|
+
Contains the following themes for use with `Rokkit` components.
|
|
4
|
+
|
|
5
|
+
- Rokkit
|
|
6
|
+
- Modern
|
|
7
|
+
- Material
|
|
8
|
+
|
|
9
|
+
This package also includes some mixins which make it easy to implement `light` and `dark` modes.
|
|
10
|
+
|
|
11
|
+
- markdown.css: A customized variant of Github flavored markdown
|
|
12
|
+
- prism.css: A variation of the prism syntax highlighting colors using CSS variables to support light and dark modes.
|
|
13
|
+
- palette.css: Light and dark palettes using CSS variables.
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rokkit/themes",
|
|
3
|
+
"version": "1.0.0-next.100",
|
|
4
|
+
"description": "Themes for use with rokkit components.",
|
|
5
|
+
"author": "Jerry Thomas <me@jerrythomas.name>",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"module": "src/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"type": "module",
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"access": "public"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@sveltejs/vite-plugin-svelte": "^3.1.2",
|
|
15
|
+
"@vitest/coverage-v8": "^2.1.1",
|
|
16
|
+
"@vitest/ui": "~2.1.1",
|
|
17
|
+
"jsdom": "^25.0.0",
|
|
18
|
+
"svelte": "^4.2.19",
|
|
19
|
+
"typescript": "^5.6.2",
|
|
20
|
+
"vite": "^5.4.6",
|
|
21
|
+
"vitest": "~2.1.1",
|
|
22
|
+
"shared-config": "1.0.0-next.100"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"src"
|
|
26
|
+
],
|
|
27
|
+
"exports": {
|
|
28
|
+
"./modern.css": "./src/modern.css",
|
|
29
|
+
"./material.css": "./src/material.css",
|
|
30
|
+
"./minimal.css": "./src/minimal.css",
|
|
31
|
+
"./rokkit.css": "./src/rokkit.css",
|
|
32
|
+
"./prism.css": "./src/prism.css",
|
|
33
|
+
"./palette.css": "./src/palette.css",
|
|
34
|
+
"./markdown.css": "./src/markdown.css",
|
|
35
|
+
"./package.json": "./src/package.json",
|
|
36
|
+
".": {
|
|
37
|
+
"import": "./src/index.js"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@rokkit/core": "1.0.0-next.100"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"format": "prettier --write .",
|
|
45
|
+
"lint": "eslint --fix .",
|
|
46
|
+
"test:ct": "playwright test -c playwright.config.js",
|
|
47
|
+
"test:ui": "vitest --ui",
|
|
48
|
+
"test:ci": "vitest run",
|
|
49
|
+
"test": "vitest",
|
|
50
|
+
"coverage": "vitest run --coverage",
|
|
51
|
+
"latest": "pnpm upgrade --latest && pnpm test:ci",
|
|
52
|
+
"release": "pnpm publish --access public"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* Alert styles */
|
|
2
|
+
alert-list {
|
|
3
|
+
@apply top-12 right-8 w-80;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
alert,
|
|
7
|
+
error,
|
|
8
|
+
info,
|
|
9
|
+
warning,
|
|
10
|
+
success {
|
|
11
|
+
@apply px-4 py-2 border rounded select-none cursor-pointer;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
alert.error,
|
|
15
|
+
alert.danger,
|
|
16
|
+
error {
|
|
17
|
+
@apply bg-error text-error-contrast border-error-muted;
|
|
18
|
+
}
|
|
19
|
+
alert.info,
|
|
20
|
+
info {
|
|
21
|
+
@apply bg-info text-info-contrast border-info-muted;
|
|
22
|
+
}
|
|
23
|
+
alert.warning,
|
|
24
|
+
warning {
|
|
25
|
+
@apply bg-warn text-warn-contrast border-warn-muted;
|
|
26
|
+
}
|
|
27
|
+
alert.success,
|
|
28
|
+
success {
|
|
29
|
+
@apply bg-success text-success-contrast border-success-muted;
|
|
30
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* progress animation */
|
|
2
|
+
@keyframes pendulum {
|
|
3
|
+
from {
|
|
4
|
+
left: -50%;
|
|
5
|
+
}
|
|
6
|
+
to {
|
|
7
|
+
left: 100%;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* Button and focus animation */
|
|
12
|
+
@keyframes button-pop {
|
|
13
|
+
0% {
|
|
14
|
+
transform: scale(var(--btn-focus-scale, 0.95));
|
|
15
|
+
}
|
|
16
|
+
40% {
|
|
17
|
+
transform: scale(1.02);
|
|
18
|
+
}
|
|
19
|
+
100% {
|
|
20
|
+
transform: scale(1);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/* Icon styles */
|
|
2
|
+
icon {
|
|
3
|
+
@apply min-h-4 h-content;
|
|
4
|
+
}
|
|
5
|
+
icon[role='button'] {
|
|
6
|
+
@apply p-2 cursor-pointer aspect-square select-none focus:outline;
|
|
7
|
+
}
|
|
8
|
+
icon > i {
|
|
9
|
+
@apply text-2xl leading-6 aspect-square text-current mx-auto;
|
|
10
|
+
}
|
|
11
|
+
icon.large > i {
|
|
12
|
+
@apply text-3xl;
|
|
13
|
+
}
|
|
14
|
+
icon.medium > i {
|
|
15
|
+
@apply text-lg leading-5;
|
|
16
|
+
}
|
|
17
|
+
icon.small > i {
|
|
18
|
+
@apply leading-4;
|
|
19
|
+
font-size: 1rem;
|
|
20
|
+
}
|
|
21
|
+
icon.large[role='button'] {
|
|
22
|
+
@apply w-12 h-12;
|
|
23
|
+
}
|
|
24
|
+
icon.medium[role='button'] {
|
|
25
|
+
@apply w-8 h-8;
|
|
26
|
+
}
|
|
27
|
+
icon.small[role='button'] {
|
|
28
|
+
@apply w-6 h-6;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* Scroll styles */
|
|
32
|
+
scroll {
|
|
33
|
+
@apply flex flex-col overflow-y-scroll;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* Square styles */
|
|
37
|
+
square {
|
|
38
|
+
@apply flex flex-col items-center justify-center h-full min-h-full aspect-square;
|
|
39
|
+
}
|
|
40
|
+
/* Item styles */
|
|
41
|
+
item,
|
|
42
|
+
.item {
|
|
43
|
+
@apply flex flex-shrink-0 flex-grow-0 cursor-pointer select-none items-center gap-2;
|
|
44
|
+
}
|
|
45
|
+
item p,
|
|
46
|
+
summary p {
|
|
47
|
+
@apply flex flex-grow;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* Overlay styles */
|
|
51
|
+
overlay {
|
|
52
|
+
@apply bg-neutral-inset bg-opacity-50;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Checkbox styles */
|
|
56
|
+
checkbox {
|
|
57
|
+
@apply gap-2;
|
|
58
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
carousel slide {
|
|
2
|
+
@apply items-center min-h-100 gap-3 px-12;
|
|
3
|
+
}
|
|
4
|
+
carousel slide > img {
|
|
5
|
+
@apply w-80 h-80 object-cover;
|
|
6
|
+
}
|
|
7
|
+
carousel slide > p {
|
|
8
|
+
@apply text-xl text-center;
|
|
9
|
+
}
|
|
10
|
+
carousel dot-nav {
|
|
11
|
+
@apply flex h-4 w-full gap-2 justify-center;
|
|
12
|
+
}
|
|
13
|
+
carousel dot {
|
|
14
|
+
@apply block h-4 w-4 p-0 m-0 rounded-full cursor-pointer focus:outline-none;
|
|
15
|
+
}
|
|
16
|
+
carousel dot[aria-checked='true'] {
|
|
17
|
+
@apply bg-primary;
|
|
18
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/* Global styles */
|
|
2
|
+
*:focus {
|
|
3
|
+
@apply outline outline-2 outline-offset-2 outline-secondary;
|
|
4
|
+
}
|
|
5
|
+
*[tabindex='-1']:focus {
|
|
6
|
+
@apply outline-none;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/* Body styles */
|
|
10
|
+
body {
|
|
11
|
+
@apply flex flex-col w-screen overflow-hidden;
|
|
12
|
+
/* height: var(--viewport-height, 100dvh); */
|
|
13
|
+
height: 100vh;
|
|
14
|
+
height: --webkit-fill-available;
|
|
15
|
+
height: 100dvh;
|
|
16
|
+
max-height: 100dvh;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Link styles */
|
|
20
|
+
a {
|
|
21
|
+
@apply cursor-pointer text-primary-800 hover:text-secondary-800 visited:text-secondary-700;
|
|
22
|
+
}
|
|
23
|
+
a:focus {
|
|
24
|
+
@apply outline-none;
|
|
25
|
+
}
|
|
26
|
+
/* Code styles */
|
|
27
|
+
code,
|
|
28
|
+
kbd,
|
|
29
|
+
samp,
|
|
30
|
+
pre {
|
|
31
|
+
@apply font-mono font-medium;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Disabled styles */
|
|
35
|
+
.disabled {
|
|
36
|
+
@apply text-disabled;
|
|
37
|
+
}
|
|
38
|
+
.disabled input,
|
|
39
|
+
.disabled textarea,
|
|
40
|
+
.disabled select {
|
|
41
|
+
@apply outline-disabled;
|
|
42
|
+
}
|
|
43
|
+
.disabled {
|
|
44
|
+
@apply text-disabled;
|
|
45
|
+
}
|
|
46
|
+
.disabled input,
|
|
47
|
+
.disabled textarea,
|
|
48
|
+
.disabled select {
|
|
49
|
+
@apply outline-disabled;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* plots*/
|
|
53
|
+
plot {
|
|
54
|
+
@apply rounded-md bg-neutral-inset p-4;
|
|
55
|
+
}
|
|
56
|
+
g[aria-label='tip'] {
|
|
57
|
+
--plot-background: var(--neutral-200);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
input-field input,
|
|
61
|
+
input-field toggle-switch,
|
|
62
|
+
drop-down {
|
|
63
|
+
@apply focus:outline-none;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
alert,
|
|
67
|
+
error,
|
|
68
|
+
info,
|
|
69
|
+
warning,
|
|
70
|
+
success {
|
|
71
|
+
@apply px-4 py-2 border rounded select-none cursor-pointer;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
checkbox {
|
|
75
|
+
@apply gap-2;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
button:disabled {
|
|
79
|
+
@apply bg-neutral-muted text-neutral-500 cursor-not-allowed;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
cell.cell-type-string {
|
|
83
|
+
@apply text-left;
|
|
84
|
+
}
|
|
85
|
+
cell.cell-type-integer item p,
|
|
86
|
+
cell.cell-type-number item p {
|
|
87
|
+
@apply text-right;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
cell item {
|
|
91
|
+
@apply flex w-full;
|
|
92
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
container > segment {
|
|
2
|
+
@apply overflow-hidden h-full;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.three-col,
|
|
6
|
+
.two-col {
|
|
7
|
+
@apply grid w-full min-h-full overflow-hidden;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.three-col.md {
|
|
11
|
+
@apply grid-cols-2 grid-rows-2;
|
|
12
|
+
/* grid-template-columns: repeat(2, 1fr); */
|
|
13
|
+
/* grid-template-rows: repeat(2, 1fr); */
|
|
14
|
+
grid-template-areas:
|
|
15
|
+
'c-1 c-2'
|
|
16
|
+
'c-1 c-3';
|
|
17
|
+
}
|
|
18
|
+
.three-col.md > .col-1,
|
|
19
|
+
.three-col.lg > .col-1 {
|
|
20
|
+
grid-area: c-1;
|
|
21
|
+
}
|
|
22
|
+
.three-col.md > .col-2,
|
|
23
|
+
.three-col.lg > .col-2 {
|
|
24
|
+
grid-area: c-2;
|
|
25
|
+
}
|
|
26
|
+
.three-col.md > .col-3,
|
|
27
|
+
.three-col.lg > .col-3 {
|
|
28
|
+
grid-area: c-3;
|
|
29
|
+
}
|
|
30
|
+
.three-col.lg {
|
|
31
|
+
@apply grid-cols-5 grid-rows-2;
|
|
32
|
+
/* grid-template-columns: repeat(5, 1fr); */
|
|
33
|
+
/* grid-template-rows: repeat(2, 1fr); */
|
|
34
|
+
grid-template-areas:
|
|
35
|
+
'c-1 c-1 c-2 c-2 c-2'
|
|
36
|
+
'c-1 c-1 c-3 c-3 c-3';
|
|
37
|
+
}
|
|
38
|
+
.three-col.sm,
|
|
39
|
+
.two-col.sm {
|
|
40
|
+
@apply grid-cols-1 grid-rows-1;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.two-col.md {
|
|
44
|
+
@apply grid-rows-1 grid-cols-2;
|
|
45
|
+
/* grid-template-columns: repeat(2, 1fr); */
|
|
46
|
+
grid-template-areas: 'c-1 c-2';
|
|
47
|
+
}
|
|
48
|
+
.two-col.lg {
|
|
49
|
+
@apply grid-rows-1 grid-cols-5;
|
|
50
|
+
/* grid-template-columns: repeat(5, 1fr); */
|
|
51
|
+
grid-template-areas: 'c-1 c-1 c-2 c-2 c-2';
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.two-col.md > .col-1,
|
|
55
|
+
.two-col.lg > .col-1 {
|
|
56
|
+
grid-area: c-1;
|
|
57
|
+
}
|
|
58
|
+
.two-col.md > .col-2,
|
|
59
|
+
.two-col.lg > .col-2 {
|
|
60
|
+
grid-area: c-2;
|
|
61
|
+
}
|
|
62
|
+
.two-col.md > .col-3,
|
|
63
|
+
.two-col.lg > .col-3 {
|
|
64
|
+
display: none;
|
|
65
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/* Input range styles */
|
|
2
|
+
input-range range-track {
|
|
3
|
+
@apply h-1 mt-3 relative;
|
|
4
|
+
}
|
|
5
|
+
input-range range-track range-track-bar {
|
|
6
|
+
@apply bg-neutral-subtle border-neutral-muted rounded-full;
|
|
7
|
+
}
|
|
8
|
+
input-range range-track selected {
|
|
9
|
+
@apply top-0px bottom-0px;
|
|
10
|
+
}
|
|
11
|
+
input-range range-track thumb {
|
|
12
|
+
@apply rounded-full;
|
|
13
|
+
}
|
|
14
|
+
input-range thumb {
|
|
15
|
+
@apply -top-1.5 bg-secondary shadow-xl border border-secondary;
|
|
16
|
+
}
|
|
17
|
+
input-range thumb.sliding::before {
|
|
18
|
+
content: '';
|
|
19
|
+
@apply absolute left-0 top-0 right-0 bottom-0 bg-secondary-400 opacity-30 rounded-full;
|
|
20
|
+
transform: scale(2, 2);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* Bookend styles */
|
|
24
|
+
.bookend range-track range-track-bar::before,
|
|
25
|
+
.bookend range-track range-track-bar::after {
|
|
26
|
+
content: '';
|
|
27
|
+
@apply absolute w-1px rounded-full -top-2 -bottom-2 bg-gray-300;
|
|
28
|
+
}
|
|
29
|
+
.bookend range-track range-track-bar::before {
|
|
30
|
+
@apply -left-1px;
|
|
31
|
+
}
|
|
32
|
+
.bookend range-track range-track-bar::after {
|
|
33
|
+
@apply -right-2px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* Input range tick styles */
|
|
37
|
+
input-range tick {
|
|
38
|
+
grid-template-rows: 7px auto;
|
|
39
|
+
}
|
|
40
|
+
input-range tick tick-bar {
|
|
41
|
+
@apply border-neutral-600 h-full;
|
|
42
|
+
}
|
|
43
|
+
input-range tick p {
|
|
44
|
+
@apply items-top text-neutral-600 leading-tight;
|
|
45
|
+
font-size: 8px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* Calendar styles */
|
|
49
|
+
calendar {
|
|
50
|
+
@apply rounded-md overflow-hidden shadow-lg;
|
|
51
|
+
}
|
|
52
|
+
calendar month-year {
|
|
53
|
+
@apply bg-secondary-400 text-white;
|
|
54
|
+
}
|
|
55
|
+
calendar cal-body days-of-week p,
|
|
56
|
+
calendar cal-body days-of-month p {
|
|
57
|
+
@apply h-8 w-8 text-xs;
|
|
58
|
+
}
|
|
59
|
+
calendar cal-body days-of-week p.weekend,
|
|
60
|
+
calendar cal-body days-of-month p.weekend,
|
|
61
|
+
calendar cal-body days-of-month p.holiday {
|
|
62
|
+
@apply text-primary-700;
|
|
63
|
+
}
|
|
64
|
+
calendar cal-body days-of-month {
|
|
65
|
+
@apply gap-2px;
|
|
66
|
+
}
|
|
67
|
+
day-of-month {
|
|
68
|
+
@apply hover:bg-secondary-200 hover:rounded-full;
|
|
69
|
+
}
|
|
70
|
+
day-of-month[aria-selected='true'] {
|
|
71
|
+
@apply bg-secondary text-white rounded-full;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* Form styles */
|
|
75
|
+
form {
|
|
76
|
+
@apply flex flex-col gap-4;
|
|
77
|
+
}
|
|
78
|
+
field-layout.vertical {
|
|
79
|
+
@apply flex flex-col gap-2;
|
|
80
|
+
}
|
|
81
|
+
field-layout.horizontal {
|
|
82
|
+
@apply flex flex-col gap-2 md:flex-row md:gap-4;
|
|
83
|
+
}
|
|
84
|
+
selected-item item {
|
|
85
|
+
@apply flex-grow;
|
|
86
|
+
}
|
|
87
|
+
input-field {
|
|
88
|
+
@apply w-full m-0 py-1;
|
|
89
|
+
}
|
|
90
|
+
input-field input,
|
|
91
|
+
input-field textarea,
|
|
92
|
+
input-field select,
|
|
93
|
+
input-field > field > :not(icon) {
|
|
94
|
+
@apply px-3;
|
|
95
|
+
@apply flex-grow outline-none min-h-9 leading-loose;
|
|
96
|
+
@apply bg-neutral-subtle text-neutral-800;
|
|
97
|
+
}
|
|
98
|
+
input-field > label {
|
|
99
|
+
@apply uppercase text-xs;
|
|
100
|
+
@apply leading-loose;
|
|
101
|
+
}
|
|
102
|
+
input-field > label.required::after {
|
|
103
|
+
content: ' *';
|
|
104
|
+
@apply state-danger;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
radio-group label {
|
|
108
|
+
@apply uppercase cursor-pointer;
|
|
109
|
+
}
|
|
110
|
+
/* Progress bar styles */
|
|
111
|
+
progress-bar {
|
|
112
|
+
@apply bg-neutral-muted border border-neutral-subtle;
|
|
113
|
+
}
|
|
114
|
+
progress-bar value-bar {
|
|
115
|
+
@apply bg-primary;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.indeterminate value-bar {
|
|
119
|
+
position: absolute;
|
|
120
|
+
bottom: 0;
|
|
121
|
+
top: 0;
|
|
122
|
+
/* Move the bar infinitely */
|
|
123
|
+
animation-duration: 2s;
|
|
124
|
+
animation-iteration-count: infinite;
|
|
125
|
+
animation-name: pendulum;
|
|
126
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
input-select,
|
|
2
|
+
drop-down {
|
|
3
|
+
@apply overflow-visible cursor-pointer;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
input-field field {
|
|
7
|
+
@apply gap-1px;
|
|
8
|
+
}
|
|
9
|
+
input-field field icon {
|
|
10
|
+
@apply w-9 h-9 bg-neutral-subtle text-neutral-800;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
input-field > field > input-select {
|
|
14
|
+
@apply px-0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
input-select selected-item > icon,
|
|
18
|
+
drop-down > button > span > icon {
|
|
19
|
+
@apply w-9 h-full;
|
|
20
|
+
}
|
|
21
|
+
input-select > selected-item,
|
|
22
|
+
drop-down > button > span {
|
|
23
|
+
/* @apply bg-neutral-base pl-3; */
|
|
24
|
+
@apply pl-3 min-h-9 gap-2 items-center normal-case;
|
|
25
|
+
@apply rounded text-neutral-800;
|
|
26
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* Scrollbar styles */
|
|
2
|
+
/* Firefox */
|
|
3
|
+
* {
|
|
4
|
+
scrollbar-width: thin;
|
|
5
|
+
scrollbar-color: rgba(0, 0, 0, 0.5) transparent;
|
|
6
|
+
}
|
|
7
|
+
/* For Webkit browsers */
|
|
8
|
+
::-webkit-scrollbar:horizontal {
|
|
9
|
+
@apply max-h-2;
|
|
10
|
+
}
|
|
11
|
+
::-webkit-scrollbar:vertical {
|
|
12
|
+
@apply max-w-2;
|
|
13
|
+
}
|
|
14
|
+
::-webkit-scrollbar-thumb {
|
|
15
|
+
@apply rounded-full rgba(0,0,0,0.5);
|
|
16
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
table cell {
|
|
12
|
+
@apply flex items-center gap-2;
|
|
13
|
+
}
|
|
14
|
+
th[data-sortable='true'] {
|
|
15
|
+
@apply cursor-pointer;
|
|
16
|
+
}
|
|
17
|
+
th[data-sortable='true']:hover,
|
|
18
|
+
th[data-sortable='true']:hover icon {
|
|
19
|
+
@apply text-primary-700;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
table {
|
|
23
|
+
@apply w-full text-sm text-left rtl:text-right text-neutral-700;
|
|
24
|
+
@apply border-separate border-spacing-x-1px;
|
|
25
|
+
}
|
|
26
|
+
table > thead {
|
|
27
|
+
@apply table-header-group sticky top-0 z-10;
|
|
28
|
+
@apply text-xs uppercase bg-neutral-400;
|
|
29
|
+
}
|
|
30
|
+
table > caption {
|
|
31
|
+
@apply table-caption p-5 text-sm font-normal text-left rtl:text-right bg-neutral-subtle text-neutral-600;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
table > tbody > tr {
|
|
35
|
+
@apply table-row border-b border-neutral-base bg-neutral-subtle;
|
|
36
|
+
}
|
|
37
|
+
table.striped > tbody > tr:nth-child(even) {
|
|
38
|
+
@apply bg-neutral-inset;
|
|
39
|
+
}
|
|
40
|
+
table > tfoot {
|
|
41
|
+
@apply table-footer-group;
|
|
42
|
+
}
|
|
43
|
+
table > tfoot > tr {
|
|
44
|
+
@apply table-row font-semibold text-neutral-800;
|
|
45
|
+
}
|
|
46
|
+
tree-table,
|
|
47
|
+
table-wrapper {
|
|
48
|
+
@apply max-h-full overflow-y-auto;
|
|
49
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
tree,
|
|
2
|
+
nested-list {
|
|
3
|
+
@apply flex flex-col w-full text-sm;
|
|
4
|
+
}
|
|
5
|
+
nested-list node > div {
|
|
6
|
+
@apply px-2 h-8;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
nested-list node {
|
|
10
|
+
@apply flex flex-col;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
node > div > item {
|
|
14
|
+
@apply px-1;
|
|
15
|
+
}
|
|
16
|
+
node > div > span {
|
|
17
|
+
@apply flex-shrink-0;
|
|
18
|
+
}
|
package/src/base.css
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
@import './base/core.css';
|
|
2
|
+
@import './base/scrollbar.css';
|
|
3
|
+
@import './base/atoms.css';
|
|
4
|
+
@import './base/molecules.css';
|
|
5
|
+
@import './base/organisms.css';
|
|
6
|
+
@import './base/layout.css';
|
|
7
|
+
@import './base/table.css';
|
|
8
|
+
@import './base/tree.css';
|
|
9
|
+
@import './base/carousel.css';
|
|
10
|
+
@import './base/animation.css';
|
|
11
|
+
@import './base/alert.css';
|
package/src/constants.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
}
|
package/src/index.js
ADDED