@vanilla-bean/components 1.0.0
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/Component/Component.js +598 -0
- package/Component/Component.scenarios.js +88 -0
- package/Component/Component.test.js +717 -0
- package/Component/README.md +455 -0
- package/Component/index.js +3 -0
- package/Component/observeElementConnection.js +52 -0
- package/Component/observeElementConnection.test.js +121 -0
- package/Elem/Elem.js +304 -0
- package/Elem/Elem.test.js +679 -0
- package/Elem/README.md +373 -0
- package/Elem/index.js +1 -0
- package/FontWithASyntaxHighlighter-Regular.woff2 +0 -0
- package/LICENSE +21 -0
- package/README.md +413 -0
- package/components/BottomSheet/BottomSheet.js +192 -0
- package/components/BottomSheet/BottomSheet.lld.md +25 -0
- package/components/BottomSheet/README.md +66 -0
- package/components/BottomSheet/index.js +1 -0
- package/components/Button/Button.js +53 -0
- package/components/Button/Button.lld.md +21 -0
- package/components/Button/index.js +1 -0
- package/components/Calendar/Calendar.js +720 -0
- package/components/Calendar/Calendar.lld.md +22 -0
- package/components/Calendar/CalendarEvent.js +102 -0
- package/components/Calendar/Toolbar.js +78 -0
- package/components/Calendar/index.js +2 -0
- package/components/Calendar/utils.js +56 -0
- package/components/Code/Code.js +84 -0
- package/components/Code/Code.lld.md +21 -0
- package/components/Code/index.js +1 -0
- package/components/ColorPicker/ColorPicker.js +445 -0
- package/components/ColorPicker/ColorPicker.lld.md +21 -0
- package/components/ColorPicker/index.js +1 -0
- package/components/ColorPicker/svg.js +5 -0
- package/components/Dialog/Dialog.js +278 -0
- package/components/Dialog/Dialog.lld.md +20 -0
- package/components/Dialog/README.md +96 -0
- package/components/Dialog/index.js +1 -0
- package/components/Form/Form.js +257 -0
- package/components/Form/Form.lld.md +21 -0
- package/components/Form/README.md +87 -0
- package/components/Form/index.js +1 -0
- package/components/Icon/Icon.js +54 -0
- package/components/Icon/Icon.lld.md +21 -0
- package/components/Icon/index.js +1 -0
- package/components/Input/Input.js +173 -0
- package/components/Input/Input.lld.md +28 -0
- package/components/Input/README.md +97 -0
- package/components/Input/index.js +2 -0
- package/components/Input/utils.js +122 -0
- package/components/Keyboard/Key.js +38 -0
- package/components/Keyboard/Keyboard.js +173 -0
- package/components/Keyboard/Keyboard.lld.md +21 -0
- package/components/Keyboard/index.js +1 -0
- package/components/Label/Label.js +214 -0
- package/components/Label/Label.lld.md +20 -0
- package/components/Label/index.js +1 -0
- package/components/Link/Link.js +43 -0
- package/components/Link/Link.lld.md +15 -0
- package/components/Link/index.js +1 -0
- package/components/List/List.js +82 -0
- package/components/List/List.lld.md +19 -0
- package/components/List/index.js +1 -0
- package/components/Menu/Menu.js +93 -0
- package/components/Menu/Menu.lld.md +15 -0
- package/components/Menu/index.js +1 -0
- package/components/Notify/Notify.js +96 -0
- package/components/Notify/Notify.lld.md +20 -0
- package/components/Notify/index.js +1 -0
- package/components/Page/Page.js +67 -0
- package/components/Page/Page.lld.md +20 -0
- package/components/Page/index.js +1 -0
- package/components/Popover/Popover.js +175 -0
- package/components/Popover/Popover.lld.md +19 -0
- package/components/Popover/index.js +1 -0
- package/components/RadioButton/RadioButton.js +108 -0
- package/components/RadioButton/RadioButton.lld.md +15 -0
- package/components/RadioButton/index.js +1 -0
- package/components/Router/README.md +160 -0
- package/components/Router/Router.js +150 -0
- package/components/Router/Router.lld.md +31 -0
- package/components/Router/View.js +15 -0
- package/components/Router/index.js +2 -0
- package/components/Router/utils.js +17 -0
- package/components/Select/README.md +88 -0
- package/components/Select/Select.js +74 -0
- package/components/Select/Select.lld.md +20 -0
- package/components/Select/index.js +1 -0
- package/components/Table/README.md +94 -0
- package/components/Table/Table.js +171 -0
- package/components/Table/Table.lld.md +21 -0
- package/components/Table/index.js +1 -0
- package/components/TagList/Tag.js +84 -0
- package/components/TagList/TagList.js +118 -0
- package/components/TagList/TagList.lld.md +30 -0
- package/components/TagList/design.excalidraw.png +0 -0
- package/components/TagList/index.js +2 -0
- package/components/Tooltip/Tooltip.js +139 -0
- package/components/Tooltip/Tooltip.lld.md +22 -0
- package/components/Tooltip/index.js +1 -0
- package/components/TooltipWrapper/TooltipWrapper.js +89 -0
- package/components/TooltipWrapper/TooltipWrapper.lld.md +21 -0
- package/components/TooltipWrapper/index.js +1 -0
- package/components/Whiteboard/Whiteboard.js +198 -0
- package/components/Whiteboard/Whiteboard.lld.md +35 -0
- package/components/Whiteboard/index.js +1 -0
- package/components/index.js +27 -0
- package/eslint.config.cjs +118 -0
- package/index.d.ts +635 -0
- package/index.js +19 -0
- package/package.json +123 -0
- package/plugins/asText.js +38 -0
- package/plugins/loadPlugins.js +5 -0
- package/plugins/markdownLoader.js +121 -0
- package/prettier.config.cjs +7 -0
- package/spellcheck.config.cjs +227 -0
- package/styled/README.md +329 -0
- package/styled/appendStyles.js +26 -0
- package/styled/appendStyles.test.js +45 -0
- package/styled/index.js +4 -0
- package/styled/shimCSS.js +31 -0
- package/styled/shimCSS.test.js +103 -0
- package/styled/styled.js +91 -0
- package/styled/styled.test.js +586 -0
- package/styled/themeStyles.js +36 -0
- package/styled/themeStyles.test.js +135 -0
- package/test-setup.js +123 -0
- package/theme/.test.js +69 -0
- package/theme/README.md +607 -0
- package/theme/button.js +100 -0
- package/theme/code.js +123 -0
- package/theme/colors.js +42 -0
- package/theme/fonts.js +42 -0
- package/theme/index.js +33 -0
- package/theme/input.js +64 -0
- package/theme/page.js +208 -0
- package/theme/scrollbar.js +24 -0
- package/theme/table.js +53 -0
- package/utils/README.md +176 -0
- package/utils/browser.js +92 -0
- package/utils/class.js +30 -0
- package/utils/color.js +81 -0
- package/utils/data.js +164 -0
- package/utils/element.js +55 -0
- package/utils/index.js +7 -0
- package/utils/rand.js +12 -0
- package/utils/string.js +72 -0
package/theme/code.js
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
export default ({ colors, fonts }) => `
|
|
2
|
+
@font-face {
|
|
3
|
+
font-family: 'FontWithASyntaxHighlighter';
|
|
4
|
+
src:
|
|
5
|
+
url('@vanilla-bean/components/FontWithASyntaxHighlighter-Regular.woff2')
|
|
6
|
+
format('woff2')
|
|
7
|
+
;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@font-palette-values --vbc-javascript-theme {
|
|
11
|
+
font-family: 'FontWithASyntaxHighlighter';
|
|
12
|
+
override-colors:
|
|
13
|
+
0 ${colors.lighter(colors.purple)}, /* keywords, {} */
|
|
14
|
+
1 ${colors.light(colors.gray)}, /* comments */
|
|
15
|
+
2 ${colors.light(colors.orange)}, /* literals */
|
|
16
|
+
3 ${colors.light(colors.orange)}, /* numbers */
|
|
17
|
+
4 ${colors.lighter(colors.blue)}, /* functions, [] */
|
|
18
|
+
5 ${colors.white}, /* js others */
|
|
19
|
+
6 ${colors.black}, /* not in use */
|
|
20
|
+
7 ${colors.light(colors.green)}, /* inside quotes, css properties, few chars */
|
|
21
|
+
8 ${colors.light(colors.green)} /* few chars */
|
|
22
|
+
;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@font-palette-values --vbc-json-theme {
|
|
26
|
+
font-family: 'FontWithASyntaxHighlighter';
|
|
27
|
+
override-colors:
|
|
28
|
+
0 ${colors.lighter(colors.purple)}, /* keywords, {} */
|
|
29
|
+
1 ${colors.light(colors.red)}, /* comments */
|
|
30
|
+
2 ${colors.light(colors.green)}, /* literals */
|
|
31
|
+
3 ${colors.light(colors.orange)}, /* numbers */
|
|
32
|
+
4 ${colors.lighter(colors.blue)}, /* functions, [] */
|
|
33
|
+
5 ${colors.white}, /* others */
|
|
34
|
+
6 ${colors.black}, /* not in use */
|
|
35
|
+
7 ${colors.light(colors.green)}, /* inside quotes, css properties, few chars */
|
|
36
|
+
8 ${colors.green} /* few chars */
|
|
37
|
+
;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@font-palette-values --vbc-html-theme {
|
|
41
|
+
font-family: 'FontWithASyntaxHighlighter';
|
|
42
|
+
override-colors:
|
|
43
|
+
0 ${colors.lighter(colors.red)}, /* keywords */
|
|
44
|
+
1 ${colors.light(colors.gray)}, /* comments */
|
|
45
|
+
2 ${colors.light(colors.red)}, /* literals */
|
|
46
|
+
3 ${colors.light(colors.orange)}, /* numbers */
|
|
47
|
+
4 ${colors.lighter(colors.blue)}, /* functions, [] */
|
|
48
|
+
5 ${colors.pink}, /* others */
|
|
49
|
+
6 ${colors.black}, /* not in use */
|
|
50
|
+
7 ${colors.light(colors.green)}, /* inside quotes, few chars */
|
|
51
|
+
8 ${colors.light(colors.red)} /* quotes, tags */
|
|
52
|
+
;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@font-palette-values --vbc-css-theme {
|
|
56
|
+
font-family: 'FontWithASyntaxHighlighter';
|
|
57
|
+
override-colors:
|
|
58
|
+
0 ${colors.lighter(colors.purple)}, /* keywords, {} */
|
|
59
|
+
1 ${colors.light(colors.gray)}, /* comments */
|
|
60
|
+
2 ${colors.light(colors.orange)}, /* literals */
|
|
61
|
+
3 ${colors.light(colors.green)}, /* numbers */
|
|
62
|
+
4 ${colors.lighter(colors.blue)}, /* functions, [] */
|
|
63
|
+
5 ${colors.white}, /* others */
|
|
64
|
+
6 ${colors.black}, /* not in use */
|
|
65
|
+
7 ${colors.light(colors.green)}, /* inside quotes, css properties, few chars */
|
|
66
|
+
8 ${colors.light(colors.green)} /* few chars */
|
|
67
|
+
;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
pre[class*="language-"] {
|
|
71
|
+
position: relative;
|
|
72
|
+
background-color: ${colors.black};
|
|
73
|
+
display: inline-block;
|
|
74
|
+
padding: 12px;
|
|
75
|
+
border-radius: 3px;
|
|
76
|
+
text-decoration: inherit;
|
|
77
|
+
max-width: 100%;
|
|
78
|
+
|
|
79
|
+
&:has(> button) {
|
|
80
|
+
padding-right: 34px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
button {
|
|
84
|
+
position: absolute !important;
|
|
85
|
+
top: 4px;
|
|
86
|
+
right: 4px;
|
|
87
|
+
width: 26px !important;
|
|
88
|
+
height: 26px !important;
|
|
89
|
+
font-size: 13px;
|
|
90
|
+
opacity: 0.5;
|
|
91
|
+
|
|
92
|
+
&:hover, &:focus {
|
|
93
|
+
opacity: 0.8;
|
|
94
|
+
top: 3px;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
code {
|
|
99
|
+
display: block;
|
|
100
|
+
overflow: auto;
|
|
101
|
+
width: 100%;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
code, textarea.syntax-highlighting, input.syntax-highlighting, pre[lang] {
|
|
106
|
+
${fonts.code}
|
|
107
|
+
|
|
108
|
+
&[class*="language-html"] {
|
|
109
|
+
font-palette: --vbc-html-theme;
|
|
110
|
+
color: ${colors.white};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&[class*="language-css"] {
|
|
114
|
+
font-palette: --vbc-css-theme;
|
|
115
|
+
color: ${colors.light(colors.green)};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&[class*="language-json"] {
|
|
119
|
+
font-palette: --vbc-json-theme;
|
|
120
|
+
color: ${colors.white};
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
`;
|
package/theme/colors.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { TinyColor, random, readability, isReadable, mostReadable } from '@ctrl/tinycolor';
|
|
2
|
+
|
|
3
|
+
const colors = {
|
|
4
|
+
random,
|
|
5
|
+
readability,
|
|
6
|
+
isReadable,
|
|
7
|
+
mostReadable,
|
|
8
|
+
|
|
9
|
+
// Base colors — plain writable properties so theme.colors.X = new TinyColor(...) works
|
|
10
|
+
orange: new TinyColor('hsl(29, 55%, 45%)'),
|
|
11
|
+
gray: new TinyColor('hsl(0, 0%, 45%)'),
|
|
12
|
+
yellow: new TinyColor('hsl(44, 55%, 45%)'),
|
|
13
|
+
green: new TinyColor('hsl(74, 55%, 45%)'),
|
|
14
|
+
teal: new TinyColor('hsl(164, 55%, 45%)'),
|
|
15
|
+
blue: new TinyColor('hsl(209, 55%, 45%)'),
|
|
16
|
+
purple: new TinyColor('hsl(254, 55%, 45%)'),
|
|
17
|
+
pink: new TinyColor('hsl(314, 55%, 45%)'),
|
|
18
|
+
red: new TinyColor('hsl(359, 55%, 45%)'),
|
|
19
|
+
transparent: new TinyColor('rgba(255, 255, 255, 0)'),
|
|
20
|
+
superWhite: new TinyColor('hsl(0, 100%, 100%)'),
|
|
21
|
+
vantablack: new TinyColor('hsl(0, 0%, 0%)'),
|
|
22
|
+
|
|
23
|
+
// Derived — getters so they recompute when gray is reassigned
|
|
24
|
+
get white() {
|
|
25
|
+
return colors.whiteish();
|
|
26
|
+
},
|
|
27
|
+
get black() {
|
|
28
|
+
return colors.blackish();
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
whiteish: (color = colors.gray) => color.lighten(45),
|
|
32
|
+
lightest: color => color.lighten(40),
|
|
33
|
+
lighter: color => color.lighten(27),
|
|
34
|
+
light: color => color.lighten(17),
|
|
35
|
+
dark: color => color.darken(15),
|
|
36
|
+
darker: color => color.darken(25),
|
|
37
|
+
darkest: color => color.darken(30),
|
|
38
|
+
blackish: (color = colors.gray) => color.darken(35),
|
|
39
|
+
alpha: (color, alpha) => new TinyColor(color.toHslString()).setAlpha(alpha),
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default colors;
|
package/theme/fonts.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import colors from './colors';
|
|
2
|
+
|
|
3
|
+
const fontAwesome = `
|
|
4
|
+
-moz-osx-font-smoothing: grayscale;
|
|
5
|
+
-webkit-font-smoothing: antialiased;
|
|
6
|
+
display: inline-block;
|
|
7
|
+
font-style: normal;
|
|
8
|
+
font-variant: normal;
|
|
9
|
+
text-rendering: auto;
|
|
10
|
+
line-height: 1;
|
|
11
|
+
font-family: 'Font Awesome 6 Free';
|
|
12
|
+
font-weight: 400;
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
get code() {
|
|
17
|
+
return `
|
|
18
|
+
font-family: "FontWithASyntaxHighlighter", monospace;
|
|
19
|
+
font-palette: --vbc-javascript-theme;
|
|
20
|
+
padding: 3px;
|
|
21
|
+
width: fit-content;
|
|
22
|
+
color: ${colors.light(colors.red)}; /* default color */
|
|
23
|
+
background-color: ${colors.black};
|
|
24
|
+
`;
|
|
25
|
+
},
|
|
26
|
+
fontAwesome,
|
|
27
|
+
fontAwesomeBrands: `
|
|
28
|
+
${fontAwesome}
|
|
29
|
+
|
|
30
|
+
font-family: 'Font Awesome 6 Brands';
|
|
31
|
+
font-weight: normal;
|
|
32
|
+
`,
|
|
33
|
+
fontAwesomeSolid: `
|
|
34
|
+
${fontAwesome}
|
|
35
|
+
|
|
36
|
+
font-weight: 600;
|
|
37
|
+
`,
|
|
38
|
+
kodeMono: `
|
|
39
|
+
font-family: 'Kode Mono Variable', monospace;
|
|
40
|
+
line-height: normal;
|
|
41
|
+
`,
|
|
42
|
+
};
|
package/theme/index.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import _button from './button';
|
|
2
|
+
import _code from './code';
|
|
3
|
+
import colors from './colors';
|
|
4
|
+
import fonts from './fonts';
|
|
5
|
+
import _input from './input';
|
|
6
|
+
import _page from './page';
|
|
7
|
+
import _scrollbar from './scrollbar';
|
|
8
|
+
import _table from './table';
|
|
9
|
+
|
|
10
|
+
const theme = {
|
|
11
|
+
colors,
|
|
12
|
+
fonts,
|
|
13
|
+
get button() {
|
|
14
|
+
return _button(this);
|
|
15
|
+
},
|
|
16
|
+
get code() {
|
|
17
|
+
return _code(this);
|
|
18
|
+
},
|
|
19
|
+
get input() {
|
|
20
|
+
return _input(this);
|
|
21
|
+
},
|
|
22
|
+
get scrollbar() {
|
|
23
|
+
return _scrollbar(this);
|
|
24
|
+
},
|
|
25
|
+
get table() {
|
|
26
|
+
return _table(this);
|
|
27
|
+
},
|
|
28
|
+
get page() {
|
|
29
|
+
return _page(this);
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export default theme;
|
package/theme/input.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export const number = ({ colors }) => `
|
|
2
|
+
input[type='number'] {
|
|
3
|
+
color: ${colors.light(colors.orange)};
|
|
4
|
+
background-color: ${colors.black};
|
|
5
|
+
}
|
|
6
|
+
`;
|
|
7
|
+
|
|
8
|
+
export const checkbox = ({ colors }) => `
|
|
9
|
+
input[type='checkbox'] {
|
|
10
|
+
/* Remove most all native input styles */
|
|
11
|
+
appearance: none;
|
|
12
|
+
|
|
13
|
+
margin: 0;
|
|
14
|
+
margin-right: 6px;
|
|
15
|
+
font: inherit;
|
|
16
|
+
color: currentColor;
|
|
17
|
+
width: 1.15em;
|
|
18
|
+
height: 1.15em;
|
|
19
|
+
border: 0.15em solid currentColor;
|
|
20
|
+
border-radius: 3px;
|
|
21
|
+
transform: translateY(-0.075em);
|
|
22
|
+
display: inline-grid;
|
|
23
|
+
place-content: center;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
|
|
26
|
+
&:before {
|
|
27
|
+
content: "";
|
|
28
|
+
width: 0.65em;
|
|
29
|
+
height: 0.65em;
|
|
30
|
+
border-radius: 2px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&:checked:before {
|
|
34
|
+
box-shadow: inset 1em 1em ${colors.blue};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&:focus {
|
|
38
|
+
border: 0.15em solid currentColor;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
`;
|
|
42
|
+
|
|
43
|
+
export default ({ colors }) => `
|
|
44
|
+
display: block;
|
|
45
|
+
border-radius: 3px;
|
|
46
|
+
border: inset 3px ${colors.lightest(colors.teal).setAlpha(0.8)};
|
|
47
|
+
box-sizing: border-box;
|
|
48
|
+
width: 100%;
|
|
49
|
+
color: ${colors.light(colors.red)};
|
|
50
|
+
accent-color: ${colors.blue};
|
|
51
|
+
background-color: ${colors.black};
|
|
52
|
+
outline-color: ${colors.lighter(colors.orange)};
|
|
53
|
+
padding: 2px 4px;
|
|
54
|
+
|
|
55
|
+
&:disabled {
|
|
56
|
+
color: ${colors.black};
|
|
57
|
+
background-color: ${colors.darker(colors.gray)};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&:not(.syntax-highlighting).validation-errors {
|
|
61
|
+
background-color: ${colors.dark(colors.red)};
|
|
62
|
+
color: ${colors.white};
|
|
63
|
+
}
|
|
64
|
+
`;
|
package/theme/page.js
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import _button from './button';
|
|
2
|
+
import _code from './code';
|
|
3
|
+
import colors from './colors';
|
|
4
|
+
import fonts from './fonts';
|
|
5
|
+
import _input, { number, checkbox } from './input';
|
|
6
|
+
import _scrollbar from './scrollbar';
|
|
7
|
+
import _table from './table';
|
|
8
|
+
|
|
9
|
+
export default theme => `
|
|
10
|
+
html {
|
|
11
|
+
height: 100%;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
body {
|
|
15
|
+
display: flex;
|
|
16
|
+
position: relative;
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: 100%;
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
line-height: normal;
|
|
22
|
+
tab-size: 2;
|
|
23
|
+
background: ${colors.black};
|
|
24
|
+
color: ${colors.white};
|
|
25
|
+
margin: 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
* {
|
|
29
|
+
touch-action: manipulation;
|
|
30
|
+
-webkit-text-size-adjust: none;
|
|
31
|
+
|
|
32
|
+
font-size: 16px;
|
|
33
|
+
${fonts.kodeMono}
|
|
34
|
+
|
|
35
|
+
sub, sup {
|
|
36
|
+
font-size: smaller;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
#app {
|
|
41
|
+
width: 100%;
|
|
42
|
+
height: 100%;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
h1, h2, h3, h4, h5, h6 {
|
|
46
|
+
color: ${colors.green};
|
|
47
|
+
|
|
48
|
+
&:before {
|
|
49
|
+
margin-right: 3px;
|
|
50
|
+
font-size: 0.7em;
|
|
51
|
+
opacity: 0.7;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
h1 {
|
|
56
|
+
font-size: 30px;
|
|
57
|
+
|
|
58
|
+
&:first-child {
|
|
59
|
+
margin-top: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&:before {
|
|
63
|
+
content: "#";
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
h2 {
|
|
68
|
+
font-size: 24px;
|
|
69
|
+
|
|
70
|
+
&:before {
|
|
71
|
+
content: "##";
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
h3 {
|
|
76
|
+
font-size: 18px;
|
|
77
|
+
|
|
78
|
+
&:before {
|
|
79
|
+
content: "###";
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
h4 {
|
|
84
|
+
font-size: 18px;
|
|
85
|
+
|
|
86
|
+
&:before {
|
|
87
|
+
content: "####";
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
h5 {
|
|
92
|
+
font-size: 18px;
|
|
93
|
+
|
|
94
|
+
&:before {
|
|
95
|
+
content: "#####";
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
h6 {
|
|
100
|
+
font-size: 18px;
|
|
101
|
+
|
|
102
|
+
&:before {
|
|
103
|
+
content: "######";
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
a {
|
|
108
|
+
color: ${colors.light(colors.blue)};
|
|
109
|
+
|
|
110
|
+
&:visited {
|
|
111
|
+
color: ${colors.light(colors.purple)};
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&.disabled {
|
|
115
|
+
pointer-events: none;
|
|
116
|
+
|
|
117
|
+
&:hover .tooltip {
|
|
118
|
+
display: none;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@viewport {
|
|
124
|
+
width: device-width;
|
|
125
|
+
zoom: 1;
|
|
126
|
+
min-zoom: 1;
|
|
127
|
+
max-zoom: 1;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
${_code(theme)}
|
|
131
|
+
|
|
132
|
+
${_scrollbar(theme)}
|
|
133
|
+
|
|
134
|
+
input, select, textarea { ${_input(theme)} }
|
|
135
|
+
${number(theme)}
|
|
136
|
+
${checkbox(theme)}
|
|
137
|
+
|
|
138
|
+
button, a.variant-button, kbd { ${_button(theme)} }
|
|
139
|
+
|
|
140
|
+
kbd {
|
|
141
|
+
background-color: ${colors.dark(colors.gray)};
|
|
142
|
+
padding: 4px 6px 6px 6px;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
table { ${_table(theme)} }
|
|
146
|
+
|
|
147
|
+
blockquote {
|
|
148
|
+
background-color: ${colors.white.setAlpha(0.06)};
|
|
149
|
+
border-left: 6px solid ${colors.white.setAlpha(0.06)};
|
|
150
|
+
margin: 0;
|
|
151
|
+
padding: 1px 12px;
|
|
152
|
+
|
|
153
|
+
&.NOTE {
|
|
154
|
+
background-color: ${colors.alpha(colors.blue, 0.09)};
|
|
155
|
+
border-color: ${colors.alpha(colors.blue, 0.3)};
|
|
156
|
+
|
|
157
|
+
p:first-child {
|
|
158
|
+
font-weight: bold;
|
|
159
|
+
color: ${colors.lighter(colors.blue)};
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&.TIP {
|
|
164
|
+
background-color: ${colors.alpha(colors.green, 0.09)};
|
|
165
|
+
border-color: ${colors.alpha(colors.green, 0.3)};
|
|
166
|
+
|
|
167
|
+
p:first-child {
|
|
168
|
+
font-weight: bold;
|
|
169
|
+
color: ${colors.lighter(colors.green)};
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
&.IMPORTANT {
|
|
174
|
+
background-color: ${colors.alpha(colors.purple, 0.09)};
|
|
175
|
+
border-color: ${colors.alpha(colors.purple, 0.3)};
|
|
176
|
+
|
|
177
|
+
p:first-child {
|
|
178
|
+
font-weight: bold;
|
|
179
|
+
color: ${colors.lighter(colors.purple)};
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
&.WARNING {
|
|
184
|
+
background-color: ${colors.alpha(colors.yellow, 0.09)};
|
|
185
|
+
border-color: ${colors.alpha(colors.yellow, 0.3)};
|
|
186
|
+
|
|
187
|
+
p:first-child {
|
|
188
|
+
font-weight: bold;
|
|
189
|
+
color: ${colors.lighter(colors.yellow)};
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
&.CAUTION {
|
|
194
|
+
background-color: ${colors.alpha(colors.red, 0.09)};
|
|
195
|
+
border-color: ${colors.alpha(colors.red, 0.3)};
|
|
196
|
+
|
|
197
|
+
p:first-child {
|
|
198
|
+
font-weight: bold;
|
|
199
|
+
color: ${colors.lighter(colors.red)};
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.fa-support:before {
|
|
205
|
+
${fonts.fontAwesomeSolid}
|
|
206
|
+
content: var(--fa);
|
|
207
|
+
}
|
|
208
|
+
`;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export default ({ colors }) => `
|
|
2
|
+
::-webkit-scrollbar {
|
|
3
|
+
width: 24px;
|
|
4
|
+
height: 24px;
|
|
5
|
+
background: ${colors.white.setAlpha(0.06)};
|
|
6
|
+
}
|
|
7
|
+
::-webkit-scrollbar-button {
|
|
8
|
+
width: 6px;
|
|
9
|
+
height: 6px;
|
|
10
|
+
}
|
|
11
|
+
::-webkit-scrollbar-thumb {
|
|
12
|
+
background: ${colors.white.setAlpha(0.06)};
|
|
13
|
+
-webkit-box-shadow: inset 0 0 2px 1px ${colors.blue};
|
|
14
|
+
border-radius: 12px;
|
|
15
|
+
}
|
|
16
|
+
::-webkit-scrollbar-thumb:hover {
|
|
17
|
+
background: ${colors.white.setAlpha(0.09)};
|
|
18
|
+
-webkit-box-shadow: inset 0 0 3px 1px ${colors.blue};
|
|
19
|
+
}
|
|
20
|
+
::-webkit-scrollbar-thumb:active {
|
|
21
|
+
background: ${colors.white.setAlpha(0.12)};
|
|
22
|
+
-webkit-box-shadow: inset 0 0 4px 2px ${colors.blue};
|
|
23
|
+
}
|
|
24
|
+
`;
|
package/theme/table.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export default ({ colors }) => `
|
|
2
|
+
position: relative;
|
|
3
|
+
border-collapse: collapse;
|
|
4
|
+
|
|
5
|
+
thead {
|
|
6
|
+
background-color: ${colors.gray.darken(38)};
|
|
7
|
+
text-align: left;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
tbody {
|
|
11
|
+
background-color: ${colors.black};
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
tfoot {
|
|
15
|
+
background-color: ${colors.gray.darken(36)};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
tr {
|
|
19
|
+
color: ${colors.light(colors.gray)};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
thead, tbody > tr:not(:last-of-type) {
|
|
23
|
+
border-bottom: 1px solid ${colors.darker(colors.gray)};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
tfoot {
|
|
27
|
+
border-top: 1px solid ${colors.darker(colors.gray)};
|
|
28
|
+
color: ${colors.lighter(colors.gray)};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
th, td {
|
|
32
|
+
padding: 9px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
th:not(:first-of-type), td:not(:first-of-type) {
|
|
36
|
+
border-left: 1px solid ${colors.darker(colors.gray)};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
th {
|
|
40
|
+
font-weight: 900;
|
|
41
|
+
color: ${colors.lightest(colors.gray)};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
tr:hover {
|
|
45
|
+
background-color: ${colors.blackish(colors.blue)};
|
|
46
|
+
color: ${colors.lighter(colors.gray)};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
td:hover, th:hover {
|
|
50
|
+
background-color: ${colors.blue.darken(32)};
|
|
51
|
+
color: ${colors.white};
|
|
52
|
+
}
|
|
53
|
+
`;
|