@rokkit/themes 1.0.0-next.44 → 1.0.0-next.47

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rokkit/themes",
3
- "version": "1.0.0-next.44",
3
+ "version": "1.0.0-next.47",
4
4
  "description": "Themes for use with rokkit components.",
5
5
  "author": "Jerry Thomas <me@jerrythomas.name>",
6
6
  "license": "MIT",
@@ -12,19 +12,20 @@
12
12
  "access": "public"
13
13
  },
14
14
  "devDependencies": {
15
- "@sveltejs/vite-plugin-svelte": "^2.4.3",
16
- "@vitest/coverage-v8": "^0.33.0",
17
- "@vitest/ui": "~0.33.0",
15
+ "@sveltejs/vite-plugin-svelte": "^2.4.5",
16
+ "@vitest/coverage-v8": "^0.34.4",
17
+ "@vitest/ui": "~0.34.4",
18
18
  "jsdom": "^22.1.0",
19
- "svelte": "^4.1.1",
20
- "typescript": "^5.1.6",
21
- "vite": "^4.4.7",
22
- "vitest": "~0.33.0",
23
- "@rokkit/core": "1.0.0-next.44",
24
- "shared-config": "1.0.0-next.44"
19
+ "svelte": "^4.2.0",
20
+ "typescript": "^5.2.2",
21
+ "vite": "^4.4.9",
22
+ "vitest": "~0.34.4",
23
+ "@rokkit/core": "1.0.0-next.47",
24
+ "shared-config": "1.0.0-next.47"
25
25
  },
26
26
  "files": [
27
27
  "src/**/*.js",
28
+ "src/**/*.css",
28
29
  "src/**/*.svelte",
29
30
  "!src/fixtures",
30
31
  "!src/**/*.spec.js"
@@ -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 w-10 h-10 cursor-pointer aspect-square select-none focus:outline;
7
+ }
8
+ icon > i {
9
+ @apply text-2xl leading-6 aspect-square text-current;
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-skin-inset bg-opacity-50;
53
+ }
54
+
55
+ /* Checkbox styles */
56
+ checkbox {
57
+ @apply gap-2;
58
+ }
@@ -0,0 +1,62 @@
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, 100vh);
13
+ }
14
+
15
+ /* Link styles */
16
+ a {
17
+ @apply text-primary hover:text-secondary visited:text-secondary-600;
18
+ }
19
+
20
+ /* Code styles */
21
+ code,
22
+ kbd,
23
+ samp,
24
+ pre {
25
+ @apply font-mono font-medium;
26
+ }
27
+
28
+ /* Disabled styles */
29
+ .disabled {
30
+ @apply text-disabled;
31
+ }
32
+ .disabled input,
33
+ .disabled textarea,
34
+ .disabled select {
35
+ @apply outline-disabled;
36
+ }
37
+ .disabled {
38
+ @apply text-disabled;
39
+ }
40
+ .disabled input,
41
+ .disabled textarea,
42
+ .disabled select {
43
+ @apply outline-disabled;
44
+ }
45
+
46
+ input-field input,
47
+ input-field toggle-switch,
48
+ drop-down {
49
+ @apply focus:outline-none;
50
+ }
51
+
52
+ alert,
53
+ error,
54
+ info,
55
+ warning,
56
+ success {
57
+ @apply px-4 py-2 border rounded select-none cursor-pointer;
58
+ }
59
+
60
+ checkbox {
61
+ @apply gap-2;
62
+ }
@@ -0,0 +1,38 @@
1
+ container > segment {
2
+ @apply overflow-hidden;
3
+ }
4
+ .three-col {
5
+ @apply grid w-full h-full overflow-hidden;
6
+ }
7
+
8
+ .three-col.md {
9
+ grid-template-columns: repeat(2, 1fr);
10
+ grid-template-rows: repeat(2, 1fr);
11
+ /* @apply grid-cols-2 grid-rows-2; */
12
+ grid-template-areas:
13
+ 'c-1 c-2'
14
+ 'c-1 c-3';
15
+ }
16
+ .three-col.md > .col-1,
17
+ .three-col.lg > .col-1 {
18
+ grid-area: c-1;
19
+ }
20
+ .three-col.md > .col-2,
21
+ .three-col.lg > .col-2 {
22
+ grid-area: c-2;
23
+ }
24
+ .three-col.md > .col-3,
25
+ .three-col.lg > .col-3 {
26
+ grid-area: c-3;
27
+ }
28
+ .three-col.lg {
29
+ /* @apply grid-cols-5; */
30
+ grid-template-columns: repeat(5, 1fr);
31
+ grid-template-rows: repeat(2, 1fr);
32
+ grid-template-areas:
33
+ 'c-1 c-1 c-2 c-2 c-2'
34
+ 'c-1 c-1 c-3 c-3 c-3';
35
+ }
36
+ .three-col.sm {
37
+ @apply grid-cols-1 grid-rows-1;
38
+ }
@@ -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 span {
6
+ @apply bg-skin-subtle border-skin-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 span::before,
25
+ .bookend range-track span::after {
26
+ content: '';
27
+ @apply absolute w-1px rounded-full -top-2 -bottom-2 bg-gray-300;
28
+ }
29
+ .bookend range-track span::before {
30
+ @apply -left-1px;
31
+ }
32
+ .bookend range-track span::after {
33
+ @apply -right-2px;
34
+ }
35
+
36
+ /* Input range tick styles */
37
+ input-range tick {
38
+ @apply h-6;
39
+ }
40
+ input-range tick span {
41
+ @apply border-skin-500 h-full;
42
+ }
43
+ input-range tick p {
44
+ @apply items-top;
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-500 text-white rounded-full;
72
+ }
73
+
74
+ /* Form styles */
75
+ form button[type='submit'] {
76
+ @apply mt-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-10 leading-loose;
96
+ @apply bg-skin-subtle text-skin-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-skin-muted border border-skin-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,47 @@
1
+ /* Alert styles */
2
+ alert-list {
3
+ @apply top-4 right-4 w-80;
4
+ }
5
+ alert,
6
+ error,
7
+ info,
8
+ warning,
9
+ success {
10
+ @apply px-4 py-2 border rounded select-none cursor-pointer;
11
+ }
12
+ alert.error {
13
+ @apply bg-error text-error border-error;
14
+ }
15
+ alert.info,
16
+ info {
17
+ @apply bg-info text-info border-info;
18
+ }
19
+ alert.warning,
20
+ warning {
21
+ @apply bg-warn text-warn border-warn;
22
+ }
23
+ alert.success,
24
+ success {
25
+ @apply bg-pass text-pass border-pass;
26
+ }
27
+
28
+ input-select,
29
+ drop-down {
30
+ @apply overflow-visible cursor-pointer;
31
+ }
32
+
33
+ input-field > field > input-select {
34
+ @apply px-0;
35
+ }
36
+
37
+ input-select selected-item > icon,
38
+ drop-down > button > span > icon {
39
+ @apply w-10 h-full;
40
+ }
41
+
42
+ input-select > selected-item,
43
+ drop-down > button > span {
44
+ /* @apply bg-skin-base pl-3; */
45
+ @apply pl-3 min-h-10 gap-2 items-center normal-case;
46
+ @apply rounded text-skin-800;
47
+ }
@@ -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
+ }
package/src/base.css ADDED
@@ -0,0 +1,7 @@
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/animation.css';