@vueless/storybook 0.0.43 → 0.0.45
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/.storybook/index.css +70 -11
- package/.storybook/main.js +2 -1
- package/.storybook/manager-head.html +73 -8
- package/package.json +1 -1
package/.storybook/index.css
CHANGED
|
@@ -14,6 +14,7 @@ body {
|
|
|
14
14
|
.light .sbdocs .sbdocs-content > h1,
|
|
15
15
|
.light .sbdocs .sbdocs-content > h2,
|
|
16
16
|
.light .sbdocs .sbdocs-content > h3,
|
|
17
|
+
.light .sbdocs .sbdocs-content > .sb-anchor > h3,
|
|
17
18
|
.light .sbdocs .sbdocs-content > p,
|
|
18
19
|
.light .sbdocs .sbdocs-content > table th,
|
|
19
20
|
.light .sbdocs .sbdocs-content > table td {
|
|
@@ -23,14 +24,33 @@ body {
|
|
|
23
24
|
.dark .sbdocs .sbdocs-content > h1,
|
|
24
25
|
.dark .sbdocs .sbdocs-content > h2,
|
|
25
26
|
.dark .sbdocs .sbdocs-content > h3,
|
|
27
|
+
.dark .sbdocs .sbdocs-content > .sb-anchor > h3,
|
|
26
28
|
.dark .sbdocs .sbdocs-content > p,
|
|
27
29
|
.dark .sbdocs .sbdocs-content > table th,
|
|
28
30
|
.dark .sbdocs .sbdocs-content > table td {
|
|
29
31
|
@apply !text-gray-200;
|
|
30
32
|
}
|
|
31
33
|
|
|
34
|
+
.sbdocs .sbdocs-content > table tr {
|
|
35
|
+
@apply border-none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.sbdocs .sbdocs-content > table th,
|
|
39
|
+
.sbdocs .sbdocs-content > table td {
|
|
40
|
+
@apply border-l-0 border-t-0 text-left;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.sbdocs .sbdocs-content > table th:last-child,
|
|
44
|
+
.sbdocs .sbdocs-content > table td:last-child {
|
|
45
|
+
@apply border-r-0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.sbdocs .sbdocs-content > table tbody tr:last-child td {
|
|
49
|
+
@apply border-b-0;
|
|
50
|
+
}
|
|
51
|
+
|
|
32
52
|
.light .sbdocs .sbdocs-content > table th {
|
|
33
|
-
@apply bg-gray-100 border-gray-200
|
|
53
|
+
@apply bg-gray-100 border-gray-200;
|
|
34
54
|
}
|
|
35
55
|
|
|
36
56
|
.light .sbdocs .sbdocs-content > table td {
|
|
@@ -42,7 +62,7 @@ body {
|
|
|
42
62
|
}
|
|
43
63
|
|
|
44
64
|
.dark .sbdocs .sbdocs-content > table th {
|
|
45
|
-
@apply bg-gray-800 border-gray-700
|
|
65
|
+
@apply bg-gray-800 border-gray-700;
|
|
46
66
|
}
|
|
47
67
|
|
|
48
68
|
.dark .sbdocs .sbdocs-content > table td {
|
|
@@ -109,6 +129,16 @@ body {
|
|
|
109
129
|
|
|
110
130
|
/* -------------------- Args table -------------------- */
|
|
111
131
|
|
|
132
|
+
@media screen and (max-width: 600px) {
|
|
133
|
+
div:has(> .docblock-argstable) {
|
|
134
|
+
@apply !mb-10 overflow-x-scroll;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.docblock-argstable {
|
|
138
|
+
@apply !mb-0;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
112
142
|
.dark .docblock-argstable,
|
|
113
143
|
.dark .docblock-argstable-head th {
|
|
114
144
|
@apply !text-gray-200;
|
|
@@ -157,48 +187,68 @@ body {
|
|
|
157
187
|
@apply bg-gray-100 border-gray-200 text-gray-800;
|
|
158
188
|
}
|
|
159
189
|
|
|
190
|
+
.dark .rejt-value-node:hover .rejt-value,
|
|
160
191
|
.dark .sbdocs .sbdocs-content code,
|
|
161
192
|
.dark .docblock-argstable-body tr > td > div + div > span[class],
|
|
162
193
|
.dark .docblock-argstable-body tr > td > div + div > div > span,
|
|
163
194
|
.dark .docblock-argstable-body tr > td:nth-child(2) > div > div > span[class],
|
|
164
195
|
.dark .docblock-argstable-body tr > td:nth-child(3) > div > span[class],
|
|
165
196
|
.dark .docblock-argstable-body tr > td:nth-child(3) > span[class] {
|
|
166
|
-
@apply bg-gray-800 border-gray-700/50 text-gray-400;
|
|
197
|
+
@apply !bg-gray-800 !border-gray-700/50 !text-gray-400;
|
|
167
198
|
}
|
|
168
199
|
|
|
169
200
|
.dark .docblock-argstable-body tr > td > div + div > span:not([class]) {
|
|
170
201
|
@apply text-gray-400;
|
|
171
202
|
}
|
|
172
203
|
|
|
173
|
-
.dark .docblock-argstable-body tr > td
|
|
204
|
+
.dark .docblock-argstable-body tr > td .rejt-edit-form,
|
|
205
|
+
.dark .docblock-argstable-body tr > td input:not([type="checkbox"]),
|
|
174
206
|
.dark .docblock-argstable-body tr > td textarea,
|
|
175
207
|
.dark .docblock-argstable-body tr > td select,
|
|
176
208
|
.dark .docblock-argstable-body tr > td:nth-child(4) button {
|
|
177
|
-
@apply text-gray-200 bg-gray-800 border border-solid border-gray-700/50 hover:border-gray-600 focus:border-gray-500;
|
|
209
|
+
@apply text-gray-200 bg-gray-800 border border-solid border-gray-700/50 hover:border-gray-600 focus:border-gray-500 text-[13px];
|
|
178
210
|
box-shadow: none !important;
|
|
211
|
+
color-scheme: dark;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.docblock-argstable-body tr > td .rejt-add-value-node button {
|
|
215
|
+
@apply px-1.5 py-0.5 leading-none;
|
|
179
216
|
}
|
|
180
217
|
|
|
181
|
-
.light .docblock-argstable-body tr > td
|
|
218
|
+
.light .docblock-argstable-body tr > td .rejt-add-value-node button[type="submit"] {
|
|
219
|
+
@apply bg-white;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.light .docblock-argstable-body tr > td .rejt-edit-form,
|
|
223
|
+
.light .docblock-argstable-body tr > td input:not([type="checkbox"]),
|
|
182
224
|
.light .docblock-argstable-body tr > td textarea,
|
|
183
225
|
.light .docblock-argstable-body tr > td select,
|
|
184
226
|
.light .docblock-argstable-body tr > td:nth-child(4) button {
|
|
185
|
-
@apply border border-solid border-gray-300 hover:border-gray-400 focus:border-gray-500;
|
|
227
|
+
@apply text-gray-900 border border-solid border-gray-300 hover:border-gray-400 focus:border-gray-500 text-[13px];
|
|
186
228
|
box-shadow: none !important;
|
|
187
229
|
}
|
|
188
230
|
|
|
231
|
+
.dark .docblock-argstable-body label[aria-disabled] {
|
|
232
|
+
@apply bg-gray-800;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.dark .docblock-argstable-body label[aria-disabled] span {
|
|
236
|
+
@apply text-gray-200;
|
|
237
|
+
}
|
|
238
|
+
|
|
189
239
|
.dark .docblock-argstable-body [type='checkbox'],
|
|
190
240
|
.dark .docblock-argstable-body [type='radio'] {
|
|
191
|
-
@apply
|
|
241
|
+
@apply border border-solid !border-gray-700;
|
|
192
242
|
box-shadow: none !important;
|
|
193
243
|
}
|
|
194
244
|
|
|
195
245
|
.dark .docblock-argstable-body [type='checkbox']:checked,
|
|
196
246
|
.dark .docblock-argstable-body [type='radio']:checked {
|
|
197
|
-
@apply bg-gray-
|
|
247
|
+
@apply bg-gray-900 invert grayscale !border-gray-300;
|
|
198
248
|
}
|
|
199
249
|
|
|
200
|
-
.docblock-argstable-body [type='checkbox']:checked,
|
|
201
|
-
.docblock-argstable-body [type='radio']:checked {
|
|
250
|
+
.light .docblock-argstable-body [type='checkbox']:checked,
|
|
251
|
+
.light .docblock-argstable-body [type='radio']:checked {
|
|
202
252
|
@apply !bg-gray-900;
|
|
203
253
|
}
|
|
204
254
|
|
|
@@ -207,6 +257,15 @@ body {
|
|
|
207
257
|
@apply !ring-gray-300;
|
|
208
258
|
}
|
|
209
259
|
|
|
260
|
+
.dark .rejt-name,
|
|
261
|
+
.dark .rejt-collapsed-text {
|
|
262
|
+
@apply !text-gray-400;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.dark .rejt-value {
|
|
266
|
+
@apply !text-gray-200;
|
|
267
|
+
}
|
|
268
|
+
|
|
210
269
|
/* -------------------- Code block and user markdown -------------------- */
|
|
211
270
|
|
|
212
271
|
#storybook-docs h2 {
|
package/.storybook/main.js
CHANGED
|
@@ -11,7 +11,8 @@ export default {
|
|
|
11
11
|
"@storybook/addon-essentials",
|
|
12
12
|
"@storybook/addon-interactions",
|
|
13
13
|
"storybook-dark-mode",
|
|
14
|
-
//
|
|
14
|
+
// TODO: remove the condition when the dark mode will be implemented to the components.
|
|
15
|
+
process.env.NODE_ENV === "development" && "@storybook/addon-themes",
|
|
15
16
|
],
|
|
16
17
|
framework: {
|
|
17
18
|
name: "@storybook/vue3-vite",
|
|
@@ -5,13 +5,78 @@ Overrides content of storybook layout HTML page <head> tag,
|
|
|
5
5
|
<link rel="shortcut icon" href="https://raw.githubusercontent.com/vuelessjs/vueless-storybook/main/public/favicons/favicon.ico">
|
|
6
6
|
<link rel="icon" type="image/svg+xml" href="https://raw.githubusercontent.com/vuelessjs/vueless-storybook/main/public/favicons/favicon.svg" />
|
|
7
7
|
|
|
8
|
+
<!--
|
|
9
|
+
Custom dark mode related vueless loader.
|
|
10
|
+
-->
|
|
11
|
+
<div id="sb-vueless-loader">
|
|
12
|
+
<img
|
|
13
|
+
class="sb-vueless-loader-img-dark"
|
|
14
|
+
src="https://raw.githubusercontent.com/vuelessjs/vueless-storybook/main/public/images/vueless-logo-dark.svg"
|
|
15
|
+
alt="Vueless UI"
|
|
16
|
+
width="250" />
|
|
17
|
+
|
|
18
|
+
<img
|
|
19
|
+
class="sb-vueless-loader-img-light"
|
|
20
|
+
src="https://raw.githubusercontent.com/vuelessjs/vueless-storybook/main/public/images/vueless-logo-light.svg"
|
|
21
|
+
alt="Vueless UI"
|
|
22
|
+
width="250" />
|
|
23
|
+
</div>
|
|
24
|
+
|
|
8
25
|
<style>
|
|
9
26
|
/* -------------------- Prevent showing users default storybook theme styles -------------------- */
|
|
10
27
|
|
|
11
|
-
body {
|
|
28
|
+
body.dark {
|
|
29
|
+
background: #111827;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
#root {
|
|
12
33
|
visibility: hidden;
|
|
13
34
|
}
|
|
14
35
|
|
|
36
|
+
#sb-vueless-loader {
|
|
37
|
+
top: 0;
|
|
38
|
+
left: 0;
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
position: fixed;
|
|
43
|
+
background: inherit;
|
|
44
|
+
width: 100%;
|
|
45
|
+
height: 100%;
|
|
46
|
+
z-index: 999;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.light #sb-vueless-loader {
|
|
50
|
+
background: #f1f5f9;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.dark #sb-vueless-loader {
|
|
54
|
+
background: #111827;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.sb-vueless-loader-img-dark,
|
|
58
|
+
.sb-vueless-loader-img-light {
|
|
59
|
+
display: none;
|
|
60
|
+
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.light .sb-vueless-loader-img-light {
|
|
64
|
+
display: block;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.dark .sb-vueless-loader-img-dark {
|
|
68
|
+
display: block;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@keyframes pulse {
|
|
72
|
+
0%, 100% {
|
|
73
|
+
opacity: 1;
|
|
74
|
+
}
|
|
75
|
+
50% {
|
|
76
|
+
opacity: .5;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
15
80
|
/* -------------------- Storybook config tooltip -------------------- */
|
|
16
81
|
|
|
17
82
|
div[data-testid="tooltip"] {
|
|
@@ -31,6 +96,10 @@ Overrides content of storybook layout HTML page <head> tag,
|
|
|
31
96
|
|
|
32
97
|
/* -------------------- Storybook sidebar -------------------- */
|
|
33
98
|
|
|
99
|
+
.dark .sidebar-container {
|
|
100
|
+
background: #111827;
|
|
101
|
+
}
|
|
102
|
+
|
|
34
103
|
.sidebar-header img {
|
|
35
104
|
width: 150px;
|
|
36
105
|
}
|
|
@@ -73,15 +142,11 @@ Overrides content of storybook layout HTML page <head> tag,
|
|
|
73
142
|
<script>
|
|
74
143
|
/* This trick prevents showing users default storybook theme */
|
|
75
144
|
(() => {
|
|
76
|
-
const prefersDarkScheme = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
77
|
-
const theme = prefersDarkScheme ? 'dark' : 'light';
|
|
78
|
-
|
|
79
|
-
document.documentElement.classList.add(theme);
|
|
80
|
-
|
|
81
145
|
window.onload = function() {
|
|
82
146
|
setTimeout(() => {
|
|
83
|
-
document.
|
|
84
|
-
|
|
147
|
+
document.getElementById("root").style.visibility = 'visible';
|
|
148
|
+
document.getElementById("sb-vueless-loader").style.display = 'none';
|
|
149
|
+
}, 1000);
|
|
85
150
|
};
|
|
86
151
|
})();
|
|
87
152
|
</script>
|