@teambit/base-ui.theme.dark-theme 0.0.0-617e7a13ce4c751dee066d2cf82e1d839519b65b
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/dark-theme.compositions.module.scss +74 -0
- package/dark-theme.compositions.tsx +165 -0
- package/dark-theme.docs.mdx +8 -0
- package/dark-theme.module.scss +67 -0
- package/dist/dark-theme.compositions.d.ts +7 -0
- package/dist/dark-theme.compositions.js +150 -0
- package/dist/dark-theme.compositions.js.map +1 -0
- package/dist/dark-theme.compositions.module.scss +74 -0
- package/dist/dark-theme.docs.mdx +8 -0
- package/dist/dark-theme.module.scss +67 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/preview-1758203463934.js +7 -0
- package/index.ts +3 -0
- package/package.json +32 -0
- package/types/asset.d.ts +29 -0
- package/types/style.d.ts +42 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
background-color: var(--bit-bg-bedrock);
|
|
3
|
+
height: 100%;
|
|
4
|
+
padding: 16px;
|
|
5
|
+
border-radius: 4px;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
font-family: sans-serif;
|
|
8
|
+
|
|
9
|
+
* {
|
|
10
|
+
transition: all 80ms;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.regular {
|
|
15
|
+
padding: 8px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.bg {
|
|
19
|
+
background: var(--bit-bg-color);
|
|
20
|
+
border: 1px solid var(--bit-border-color);
|
|
21
|
+
padding: 8px;
|
|
22
|
+
border-radius: 4px;
|
|
23
|
+
|
|
24
|
+
&:hover {
|
|
25
|
+
background: var(--bit-bg-heavy);
|
|
26
|
+
border: 1px solid var(--bit-border-color-heavy);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.accentText {
|
|
31
|
+
color: var(--bit-accent-text);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.strongText {
|
|
35
|
+
// can also be achieves with bold
|
|
36
|
+
color: var(--bit-text-color-heavy);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.btn {
|
|
40
|
+
background: var(--bit-accent-color);
|
|
41
|
+
color: var(--bit-text-on-accent);
|
|
42
|
+
|
|
43
|
+
&:hover {
|
|
44
|
+
background: var(--bit-accent-heavy);
|
|
45
|
+
// color: var(--bit-text-color-heavy);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.accentBg {
|
|
50
|
+
background: var(--bit-accent-bg);
|
|
51
|
+
|
|
52
|
+
border: 1px solid var(--bit-border-color);
|
|
53
|
+
padding: 8px;
|
|
54
|
+
border-radius: 4px;
|
|
55
|
+
|
|
56
|
+
&:hover {
|
|
57
|
+
background: var(--bit-accent-bg-heavy);
|
|
58
|
+
border: 1px solid var(--bit-border-color-heavy);
|
|
59
|
+
// color: var(--bit-text-color-heavy);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.accentCard {
|
|
64
|
+
border: 1px solid var(--bit-accent-color);
|
|
65
|
+
background: var(--bit-bg-color);
|
|
66
|
+
padding: 8px;
|
|
67
|
+
border-radius: 4px;
|
|
68
|
+
|
|
69
|
+
&:hover {
|
|
70
|
+
border-color: var(--bit-accent-heavy);
|
|
71
|
+
background: var(--bit-bg-heavy);
|
|
72
|
+
box-shadow: 0 0 0 0.125em var(--bit-accent-bg);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { primaryPalette } from '@teambit/base-ui.theme.color-definition';
|
|
3
|
+
import { darkMode } from './index';
|
|
4
|
+
|
|
5
|
+
import styles from './dark-theme.compositions.module.scss';
|
|
6
|
+
|
|
7
|
+
const textColors = [
|
|
8
|
+
'--bit-text-color',
|
|
9
|
+
'--bit-text-color-heavy',
|
|
10
|
+
'--bit-text-color-light',
|
|
11
|
+
'--bit-text-inactive',
|
|
12
|
+
];
|
|
13
|
+
const borders = [
|
|
14
|
+
'--bit-border-color',
|
|
15
|
+
'--bit-border-color-heavy',
|
|
16
|
+
'--bit-border-color-light',
|
|
17
|
+
'--bit-border-color-lightest',
|
|
18
|
+
];
|
|
19
|
+
const accents = [
|
|
20
|
+
'--bit-accent-color',
|
|
21
|
+
'--bit-accent-heavy',
|
|
22
|
+
'--bit-accent-light',
|
|
23
|
+
'--bit-accent-text',
|
|
24
|
+
'--bit-accent-text-heavy',
|
|
25
|
+
'--bit-text-on-accent',
|
|
26
|
+
'--bit-accent-bg',
|
|
27
|
+
'--bit-accent-bg-heavy',
|
|
28
|
+
];
|
|
29
|
+
const backgrounds = [
|
|
30
|
+
|
|
31
|
+
'--bit-bg-color',
|
|
32
|
+
'--bit-bg-heavy',
|
|
33
|
+
'--bit-bg-heavy',
|
|
34
|
+
'--bit-bg-heaviest',
|
|
35
|
+
'--bit-bg-bedrock',
|
|
36
|
+
'--bit-bg-navigation',
|
|
37
|
+
'--bit-bg-overlay',
|
|
38
|
+
'--bit-bg-modal',
|
|
39
|
+
'--bit-bg-tooltip',
|
|
40
|
+
'--bit-bg-tooltip-heavy',
|
|
41
|
+
'--bit-bg-dent',
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
const errors = [
|
|
45
|
+
'--bit-error-color',
|
|
46
|
+
'--bit-error-heavy',
|
|
47
|
+
'--bit-error-light',
|
|
48
|
+
'--bit-error-bg',
|
|
49
|
+
'--bit-error-bg-heavy',
|
|
50
|
+
];
|
|
51
|
+
|
|
52
|
+
export function Texts() {
|
|
53
|
+
return (
|
|
54
|
+
<div className={darkMode} style={{ background: '#0c0c0c', height: '100%', boxSizing: 'border-box', padding: 8, borderRadius: 4 }}>
|
|
55
|
+
{textColors.map((x) => (
|
|
56
|
+
<ColorBox colorName={x} />
|
|
57
|
+
))}
|
|
58
|
+
</div>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function Accents() {
|
|
63
|
+
return (
|
|
64
|
+
<div className={darkMode} style={{ background: '#0c0c0c', height: '100%', boxSizing: 'border-box', padding: 8, borderRadius: 4 }}>
|
|
65
|
+
{accents.map((x) => (
|
|
66
|
+
<ColorBox colorName={x} />
|
|
67
|
+
))}
|
|
68
|
+
</div>
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function Borders() {
|
|
73
|
+
return (
|
|
74
|
+
<div className={darkMode} style={{ background: '#0c0c0c', height: '100%', boxSizing: 'border-box', padding: 8, borderRadius: 4 }}>
|
|
75
|
+
{borders.map((x) => (
|
|
76
|
+
<ColorBox colorName={x} />
|
|
77
|
+
))}
|
|
78
|
+
</div>
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function Backgrounds() {
|
|
83
|
+
return (
|
|
84
|
+
<div className={darkMode} style={{ background: '#0c0c0c', height: '100%', boxSizing: 'border-box', padding: 8, borderRadius: 4 }}>
|
|
85
|
+
{backgrounds.map((x) => (
|
|
86
|
+
<ColorBox colorName={x} />
|
|
87
|
+
))}
|
|
88
|
+
</div>
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function Errors() {
|
|
93
|
+
return (
|
|
94
|
+
<div className={darkMode} style={{ background: '#0c0c0c', height: '100%', boxSizing: 'border-box', padding: 8, borderRadius: 4 }}>
|
|
95
|
+
{errors.map((x) => (
|
|
96
|
+
<ColorBox colorName={x} />
|
|
97
|
+
))}
|
|
98
|
+
<div>
|
|
99
|
+
(may be deprecated in the future.
|
|
100
|
+
<br />
|
|
101
|
+
use accentColors.error instead)
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// (property) JSX.IntrinsicElements.div: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
export function ThemeExample({ className, ...rest }: React.HTMLAttributes<HTMLDivElement>) {
|
|
111
|
+
const [isDark, setDark] = useState(true);
|
|
112
|
+
|
|
113
|
+
return (
|
|
114
|
+
<div className={isDark ? darkMode : primaryPalette} style={{ height: '100%' }}>
|
|
115
|
+
<div className={className + ' ' + styles.container} {...rest}>
|
|
116
|
+
|
|
117
|
+
<div className={styles.regular}>
|
|
118
|
+
<div className={styles.accentText}>accent text</div>
|
|
119
|
+
<div>regular content</div>
|
|
120
|
+
<button className={styles.btn} onClick={() => setDark(x => !x)}>toggle dark mode {isDark ? '🌙' : '☀️'}</button>
|
|
121
|
+
</div>
|
|
122
|
+
|
|
123
|
+
<br />
|
|
124
|
+
|
|
125
|
+
<div className={styles.bg}>
|
|
126
|
+
<div className={styles.accentText}>accent text</div>
|
|
127
|
+
<div>interactive card</div>
|
|
128
|
+
<button className={styles.btn}>accent colored box</button>
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
<br />
|
|
132
|
+
|
|
133
|
+
<div className={styles.accentBg}>
|
|
134
|
+
<div className={styles.accentText}>accent text</div>
|
|
135
|
+
<div>accent card</div>
|
|
136
|
+
<button className={styles.btn}>accent colored box</button>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
<br />
|
|
140
|
+
|
|
141
|
+
<div className={styles.accentCard}>
|
|
142
|
+
<div>accent card variation 2</div>
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function ColorBox({ colorName }: { colorName: string }) {
|
|
150
|
+
return (
|
|
151
|
+
<div style={{ display: 'flex', borderRadius: 4, marginBottom: 4 }}>
|
|
152
|
+
<div
|
|
153
|
+
style={{
|
|
154
|
+
background: `var(${colorName})`,
|
|
155
|
+
width: 20,
|
|
156
|
+
height: 20,
|
|
157
|
+
borderRadius: 4,
|
|
158
|
+
marginRight: 8,
|
|
159
|
+
border: '1px solid lightgray',
|
|
160
|
+
}}
|
|
161
|
+
></div>
|
|
162
|
+
<div>{colorName}</div>
|
|
163
|
+
</div>
|
|
164
|
+
);
|
|
165
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ThemeExample } from './dark-theme.compositions';
|
|
2
|
+
|
|
3
|
+
Bit's own Dark Theme mode!
|
|
4
|
+
Overrides the default color palette with a custom, dark one.
|
|
5
|
+
|
|
6
|
+
(Because of css-module's class name isolation, it does not _yet_ work perfectly with the accents.)
|
|
7
|
+
|
|
8
|
+
<ThemeExample />
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
@import '~@teambit/base-ui.theme.colors/colors.module.scss';
|
|
2
|
+
|
|
3
|
+
.darkMod {
|
|
4
|
+
color: #{$d10};
|
|
5
|
+
--bit-text-color: #{$d10};
|
|
6
|
+
--bit-text-color-heavy: #{$w20};
|
|
7
|
+
--bit-text-color-light: #{$d30};
|
|
8
|
+
--bit-text-inactive: #{$d40};
|
|
9
|
+
--bit-text-inactive-heavy: #{$d30};
|
|
10
|
+
|
|
11
|
+
--bit-border-color: #{$d40};
|
|
12
|
+
--bit-border-color-heavy: #{$d30};
|
|
13
|
+
--bit-border-color-light: #{$d50}; // TBD
|
|
14
|
+
--bit-border-color-lightest: #{$d50};
|
|
15
|
+
|
|
16
|
+
// -- accent -- //
|
|
17
|
+
--bit-accent-color: #{$p60};
|
|
18
|
+
--bit-accent-heavy: #{$p50};
|
|
19
|
+
--bit-accent-light: #{$p70};
|
|
20
|
+
--bit-accent-text: #{$p30};
|
|
21
|
+
--bit-accent-text-heavy: #{$p20};
|
|
22
|
+
--bit-text-on-accent: var(--bit-text-color, #{$d10});
|
|
23
|
+
--bit-accent-bg: #1a1452; // #{$p110}; TBD!
|
|
24
|
+
--bit-accent-bg-heavy: #221967; // #{$p100}; TBD!
|
|
25
|
+
|
|
26
|
+
// -- background -- //
|
|
27
|
+
// // higher number = more important, and 'closer' to the user.
|
|
28
|
+
// --bit-bg-01: #{$d70};
|
|
29
|
+
// --bit-bg-03: #{$w20};
|
|
30
|
+
// --bit-bg-05: #{$d10};
|
|
31
|
+
// --bit-bg-07: #{$d15};
|
|
32
|
+
// --bit-bg-09: #{$d20};
|
|
33
|
+
// --bit-bg-11: #{$d30};
|
|
34
|
+
--bit-bg-color: #{$d60}; // default background for interactive elements
|
|
35
|
+
--bit-bg-heavy: #{$d50}; // e.g. when hovering
|
|
36
|
+
--bit-bg-heaviest: #{$d40}; // e.g. when active ('pressed')
|
|
37
|
+
--bit-bg-bedrock: #{$d70}; // i.e. <body/> background
|
|
38
|
+
--bit-navigation: #{$d60}; // i.e. <body/> background
|
|
39
|
+
--bit-bg-overlay: #{$d60}; // e.g. button, input, etc
|
|
40
|
+
--bit-bg-modal: #{$d60}; // e.g. button, input, etc
|
|
41
|
+
--bit-bg-tooltip: #{$d60}; // e.g. button, input, etc
|
|
42
|
+
--bit-bg-tooltip-heavy: #{$d50};
|
|
43
|
+
--bit-bg-dent: #{$d60};
|
|
44
|
+
|
|
45
|
+
// -- error -- //
|
|
46
|
+
// might replace with 'error' theme
|
|
47
|
+
--bit-error-color: #{$r30};
|
|
48
|
+
--bit-error-heavy: #{$r20};
|
|
49
|
+
--bit-error-light: #{$r40};
|
|
50
|
+
--bit-error-bg: #{$r70};
|
|
51
|
+
--bit-error-bg-heavy: #{$r60};
|
|
52
|
+
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
// extended primary palette (WIP)
|
|
57
|
+
// name color lightness
|
|
58
|
+
// $p110: #1a1452; // 19.6%
|
|
59
|
+
// $p100: #221967; // 25%
|
|
60
|
+
// $p90: #22158a; // 31%
|
|
61
|
+
// $p80: #2c1bb1; // 40%
|
|
62
|
+
// $p70: #3e29df; // 52%
|
|
63
|
+
// $p60: #5d4aec; // 61$
|
|
64
|
+
// $p50: #6c5ce7; // 63%
|
|
65
|
+
// $p40: #897dec;
|
|
66
|
+
// $p30: #c9c3f6;
|
|
67
|
+
// $p20: #eceaff;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare function Texts(): React.JSX.Element;
|
|
3
|
+
export declare function Accents(): React.JSX.Element;
|
|
4
|
+
export declare function Borders(): React.JSX.Element;
|
|
5
|
+
export declare function Backgrounds(): React.JSX.Element;
|
|
6
|
+
export declare function Errors(): React.JSX.Element;
|
|
7
|
+
export declare function ThemeExample({ className, ...rest }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
26
|
+
var t = {};
|
|
27
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
|
+
t[p] = s[p];
|
|
29
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
31
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
32
|
+
t[p[i]] = s[p[i]];
|
|
33
|
+
}
|
|
34
|
+
return t;
|
|
35
|
+
};
|
|
36
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
+
};
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
exports.Texts = Texts;
|
|
41
|
+
exports.Accents = Accents;
|
|
42
|
+
exports.Borders = Borders;
|
|
43
|
+
exports.Backgrounds = Backgrounds;
|
|
44
|
+
exports.Errors = Errors;
|
|
45
|
+
exports.ThemeExample = ThemeExample;
|
|
46
|
+
const react_1 = __importStar(require("react"));
|
|
47
|
+
const base_ui_theme_color_definition_1 = require("@teambit/base-ui.theme.color-definition");
|
|
48
|
+
const index_1 = require("./index");
|
|
49
|
+
const dark_theme_compositions_module_scss_1 = __importDefault(require("./dark-theme.compositions.module.scss"));
|
|
50
|
+
const textColors = [
|
|
51
|
+
'--bit-text-color',
|
|
52
|
+
'--bit-text-color-heavy',
|
|
53
|
+
'--bit-text-color-light',
|
|
54
|
+
'--bit-text-inactive',
|
|
55
|
+
];
|
|
56
|
+
const borders = [
|
|
57
|
+
'--bit-border-color',
|
|
58
|
+
'--bit-border-color-heavy',
|
|
59
|
+
'--bit-border-color-light',
|
|
60
|
+
'--bit-border-color-lightest',
|
|
61
|
+
];
|
|
62
|
+
const accents = [
|
|
63
|
+
'--bit-accent-color',
|
|
64
|
+
'--bit-accent-heavy',
|
|
65
|
+
'--bit-accent-light',
|
|
66
|
+
'--bit-accent-text',
|
|
67
|
+
'--bit-accent-text-heavy',
|
|
68
|
+
'--bit-text-on-accent',
|
|
69
|
+
'--bit-accent-bg',
|
|
70
|
+
'--bit-accent-bg-heavy',
|
|
71
|
+
];
|
|
72
|
+
const backgrounds = [
|
|
73
|
+
'--bit-bg-color',
|
|
74
|
+
'--bit-bg-heavy',
|
|
75
|
+
'--bit-bg-heavy',
|
|
76
|
+
'--bit-bg-heaviest',
|
|
77
|
+
'--bit-bg-bedrock',
|
|
78
|
+
'--bit-bg-navigation',
|
|
79
|
+
'--bit-bg-overlay',
|
|
80
|
+
'--bit-bg-modal',
|
|
81
|
+
'--bit-bg-tooltip',
|
|
82
|
+
'--bit-bg-tooltip-heavy',
|
|
83
|
+
'--bit-bg-dent',
|
|
84
|
+
];
|
|
85
|
+
const errors = [
|
|
86
|
+
'--bit-error-color',
|
|
87
|
+
'--bit-error-heavy',
|
|
88
|
+
'--bit-error-light',
|
|
89
|
+
'--bit-error-bg',
|
|
90
|
+
'--bit-error-bg-heavy',
|
|
91
|
+
];
|
|
92
|
+
function Texts() {
|
|
93
|
+
return (react_1.default.createElement("div", { className: index_1.darkMode, style: { background: '#0c0c0c', height: '100%', boxSizing: 'border-box', padding: 8, borderRadius: 4 } }, textColors.map((x) => (react_1.default.createElement(ColorBox, { colorName: x })))));
|
|
94
|
+
}
|
|
95
|
+
function Accents() {
|
|
96
|
+
return (react_1.default.createElement("div", { className: index_1.darkMode, style: { background: '#0c0c0c', height: '100%', boxSizing: 'border-box', padding: 8, borderRadius: 4 } }, accents.map((x) => (react_1.default.createElement(ColorBox, { colorName: x })))));
|
|
97
|
+
}
|
|
98
|
+
function Borders() {
|
|
99
|
+
return (react_1.default.createElement("div", { className: index_1.darkMode, style: { background: '#0c0c0c', height: '100%', boxSizing: 'border-box', padding: 8, borderRadius: 4 } }, borders.map((x) => (react_1.default.createElement(ColorBox, { colorName: x })))));
|
|
100
|
+
}
|
|
101
|
+
function Backgrounds() {
|
|
102
|
+
return (react_1.default.createElement("div", { className: index_1.darkMode, style: { background: '#0c0c0c', height: '100%', boxSizing: 'border-box', padding: 8, borderRadius: 4 } }, backgrounds.map((x) => (react_1.default.createElement(ColorBox, { colorName: x })))));
|
|
103
|
+
}
|
|
104
|
+
function Errors() {
|
|
105
|
+
return (react_1.default.createElement("div", { className: index_1.darkMode, style: { background: '#0c0c0c', height: '100%', boxSizing: 'border-box', padding: 8, borderRadius: 4 } },
|
|
106
|
+
errors.map((x) => (react_1.default.createElement(ColorBox, { colorName: x }))),
|
|
107
|
+
react_1.default.createElement("div", null,
|
|
108
|
+
"(may be deprecated in the future.",
|
|
109
|
+
react_1.default.createElement("br", null),
|
|
110
|
+
"use accentColors.error instead)")));
|
|
111
|
+
}
|
|
112
|
+
// (property) JSX.IntrinsicElements.div: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
|
|
113
|
+
function ThemeExample(_a) {
|
|
114
|
+
var { className } = _a, rest = __rest(_a, ["className"]);
|
|
115
|
+
const [isDark, setDark] = (0, react_1.useState)(true);
|
|
116
|
+
return (react_1.default.createElement("div", { className: isDark ? index_1.darkMode : base_ui_theme_color_definition_1.primaryPalette, style: { height: '100%' } },
|
|
117
|
+
react_1.default.createElement("div", Object.assign({ className: className + ' ' + dark_theme_compositions_module_scss_1.default.container }, rest),
|
|
118
|
+
react_1.default.createElement("div", { className: dark_theme_compositions_module_scss_1.default.regular },
|
|
119
|
+
react_1.default.createElement("div", { className: dark_theme_compositions_module_scss_1.default.accentText }, "accent text"),
|
|
120
|
+
react_1.default.createElement("div", null, "regular content"),
|
|
121
|
+
react_1.default.createElement("button", { className: dark_theme_compositions_module_scss_1.default.btn, onClick: () => setDark(x => !x) },
|
|
122
|
+
"toggle dark mode ",
|
|
123
|
+
isDark ? '🌙' : '☀️')),
|
|
124
|
+
react_1.default.createElement("br", null),
|
|
125
|
+
react_1.default.createElement("div", { className: dark_theme_compositions_module_scss_1.default.bg },
|
|
126
|
+
react_1.default.createElement("div", { className: dark_theme_compositions_module_scss_1.default.accentText }, "accent text"),
|
|
127
|
+
react_1.default.createElement("div", null, "interactive card"),
|
|
128
|
+
react_1.default.createElement("button", { className: dark_theme_compositions_module_scss_1.default.btn }, "accent colored box")),
|
|
129
|
+
react_1.default.createElement("br", null),
|
|
130
|
+
react_1.default.createElement("div", { className: dark_theme_compositions_module_scss_1.default.accentBg },
|
|
131
|
+
react_1.default.createElement("div", { className: dark_theme_compositions_module_scss_1.default.accentText }, "accent text"),
|
|
132
|
+
react_1.default.createElement("div", null, "accent card"),
|
|
133
|
+
react_1.default.createElement("button", { className: dark_theme_compositions_module_scss_1.default.btn }, "accent colored box")),
|
|
134
|
+
react_1.default.createElement("br", null),
|
|
135
|
+
react_1.default.createElement("div", { className: dark_theme_compositions_module_scss_1.default.accentCard },
|
|
136
|
+
react_1.default.createElement("div", null, "accent card variation 2")))));
|
|
137
|
+
}
|
|
138
|
+
function ColorBox({ colorName }) {
|
|
139
|
+
return (react_1.default.createElement("div", { style: { display: 'flex', borderRadius: 4, marginBottom: 4 } },
|
|
140
|
+
react_1.default.createElement("div", { style: {
|
|
141
|
+
background: `var(${colorName})`,
|
|
142
|
+
width: 20,
|
|
143
|
+
height: 20,
|
|
144
|
+
borderRadius: 4,
|
|
145
|
+
marginRight: 8,
|
|
146
|
+
border: '1px solid lightgray',
|
|
147
|
+
} }),
|
|
148
|
+
react_1.default.createElement("div", null, colorName)));
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=dark-theme.compositions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dark-theme.compositions.js","sourceRoot":"","sources":["../dark-theme.compositions.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDA,sBAQC;AAED,0BAQC;AAED,0BAQC;AAED,kCAQC;AAED,wBAaC;AAKD,oCAqCC;AAlJD,+CAAwC;AACxC,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AkC,CAC7B,CACD,CACD,CACN,CAAC;AACH,CAAC;AAED,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAyB;IACrD,OAAO,CACN,uCAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE;QAChE,uCACC,KAAK,EAAE;gBACN,UAAU,EAAE,OAAO,SAAS,GAAG;gBAC/B,KAAK,EAAE,EAAE;gBACT,MAAM,EAAE,EAAE;gBACV,YAAY,EAAE,CAAC;gBACf,WAAW,EAAE,CAAC;gBACd,MAAM,EAAE,qBAAqB;aAC7B,GACK;QACP,2CAAM,SAAS,CAAO,CACjB,CACN,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
background-color: var(--bit-bg-bedrock);
|
|
3
|
+
height: 100%;
|
|
4
|
+
padding: 16px;
|
|
5
|
+
border-radius: 4px;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
font-family: sans-serif;
|
|
8
|
+
|
|
9
|
+
* {
|
|
10
|
+
transition: all 80ms;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.regular {
|
|
15
|
+
padding: 8px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.bg {
|
|
19
|
+
background: var(--bit-bg-color);
|
|
20
|
+
border: 1px solid var(--bit-border-color);
|
|
21
|
+
padding: 8px;
|
|
22
|
+
border-radius: 4px;
|
|
23
|
+
|
|
24
|
+
&:hover {
|
|
25
|
+
background: var(--bit-bg-heavy);
|
|
26
|
+
border: 1px solid var(--bit-border-color-heavy);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.accentText {
|
|
31
|
+
color: var(--bit-accent-text);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.strongText {
|
|
35
|
+
// can also be achieves with bold
|
|
36
|
+
color: var(--bit-text-color-heavy);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.btn {
|
|
40
|
+
background: var(--bit-accent-color);
|
|
41
|
+
color: var(--bit-text-on-accent);
|
|
42
|
+
|
|
43
|
+
&:hover {
|
|
44
|
+
background: var(--bit-accent-heavy);
|
|
45
|
+
// color: var(--bit-text-color-heavy);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.accentBg {
|
|
50
|
+
background: var(--bit-accent-bg);
|
|
51
|
+
|
|
52
|
+
border: 1px solid var(--bit-border-color);
|
|
53
|
+
padding: 8px;
|
|
54
|
+
border-radius: 4px;
|
|
55
|
+
|
|
56
|
+
&:hover {
|
|
57
|
+
background: var(--bit-accent-bg-heavy);
|
|
58
|
+
border: 1px solid var(--bit-border-color-heavy);
|
|
59
|
+
// color: var(--bit-text-color-heavy);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.accentCard {
|
|
64
|
+
border: 1px solid var(--bit-accent-color);
|
|
65
|
+
background: var(--bit-bg-color);
|
|
66
|
+
padding: 8px;
|
|
67
|
+
border-radius: 4px;
|
|
68
|
+
|
|
69
|
+
&:hover {
|
|
70
|
+
border-color: var(--bit-accent-heavy);
|
|
71
|
+
background: var(--bit-bg-heavy);
|
|
72
|
+
box-shadow: 0 0 0 0.125em var(--bit-accent-bg);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ThemeExample } from './dark-theme.compositions';
|
|
2
|
+
|
|
3
|
+
Bit's own Dark Theme mode!
|
|
4
|
+
Overrides the default color palette with a custom, dark one.
|
|
5
|
+
|
|
6
|
+
(Because of css-module's class name isolation, it does not _yet_ work perfectly with the accents.)
|
|
7
|
+
|
|
8
|
+
<ThemeExample />
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
@import '~@teambit/base-ui.theme.colors/colors.module.scss';
|
|
2
|
+
|
|
3
|
+
.darkMod {
|
|
4
|
+
color: #{$d10};
|
|
5
|
+
--bit-text-color: #{$d10};
|
|
6
|
+
--bit-text-color-heavy: #{$w20};
|
|
7
|
+
--bit-text-color-light: #{$d30};
|
|
8
|
+
--bit-text-inactive: #{$d40};
|
|
9
|
+
--bit-text-inactive-heavy: #{$d30};
|
|
10
|
+
|
|
11
|
+
--bit-border-color: #{$d40};
|
|
12
|
+
--bit-border-color-heavy: #{$d30};
|
|
13
|
+
--bit-border-color-light: #{$d50}; // TBD
|
|
14
|
+
--bit-border-color-lightest: #{$d50};
|
|
15
|
+
|
|
16
|
+
// -- accent -- //
|
|
17
|
+
--bit-accent-color: #{$p60};
|
|
18
|
+
--bit-accent-heavy: #{$p50};
|
|
19
|
+
--bit-accent-light: #{$p70};
|
|
20
|
+
--bit-accent-text: #{$p30};
|
|
21
|
+
--bit-accent-text-heavy: #{$p20};
|
|
22
|
+
--bit-text-on-accent: var(--bit-text-color, #{$d10});
|
|
23
|
+
--bit-accent-bg: #1a1452; // #{$p110}; TBD!
|
|
24
|
+
--bit-accent-bg-heavy: #221967; // #{$p100}; TBD!
|
|
25
|
+
|
|
26
|
+
// -- background -- //
|
|
27
|
+
// // higher number = more important, and 'closer' to the user.
|
|
28
|
+
// --bit-bg-01: #{$d70};
|
|
29
|
+
// --bit-bg-03: #{$w20};
|
|
30
|
+
// --bit-bg-05: #{$d10};
|
|
31
|
+
// --bit-bg-07: #{$d15};
|
|
32
|
+
// --bit-bg-09: #{$d20};
|
|
33
|
+
// --bit-bg-11: #{$d30};
|
|
34
|
+
--bit-bg-color: #{$d60}; // default background for interactive elements
|
|
35
|
+
--bit-bg-heavy: #{$d50}; // e.g. when hovering
|
|
36
|
+
--bit-bg-heaviest: #{$d40}; // e.g. when active ('pressed')
|
|
37
|
+
--bit-bg-bedrock: #{$d70}; // i.e. <body/> background
|
|
38
|
+
--bit-navigation: #{$d60}; // i.e. <body/> background
|
|
39
|
+
--bit-bg-overlay: #{$d60}; // e.g. button, input, etc
|
|
40
|
+
--bit-bg-modal: #{$d60}; // e.g. button, input, etc
|
|
41
|
+
--bit-bg-tooltip: #{$d60}; // e.g. button, input, etc
|
|
42
|
+
--bit-bg-tooltip-heavy: #{$d50};
|
|
43
|
+
--bit-bg-dent: #{$d60};
|
|
44
|
+
|
|
45
|
+
// -- error -- //
|
|
46
|
+
// might replace with 'error' theme
|
|
47
|
+
--bit-error-color: #{$r30};
|
|
48
|
+
--bit-error-heavy: #{$r20};
|
|
49
|
+
--bit-error-light: #{$r40};
|
|
50
|
+
--bit-error-bg: #{$r70};
|
|
51
|
+
--bit-error-bg-heavy: #{$r60};
|
|
52
|
+
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
// extended primary palette (WIP)
|
|
57
|
+
// name color lightness
|
|
58
|
+
// $p110: #1a1452; // 19.6%
|
|
59
|
+
// $p100: #221967; // 25%
|
|
60
|
+
// $p90: #22158a; // 31%
|
|
61
|
+
// $p80: #2c1bb1; // 40%
|
|
62
|
+
// $p70: #3e29df; // 52%
|
|
63
|
+
// $p60: #5d4aec; // 61$
|
|
64
|
+
// $p50: #6c5ce7; // 63%
|
|
65
|
+
// $p40: #897dec;
|
|
66
|
+
// $p30: #c9c3f6;
|
|
67
|
+
// $p20: #eceaff;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const darkMode: string;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.darkMode = void 0;
|
|
7
|
+
const dark_theme_module_scss_1 = __importDefault(require("./dark-theme.module.scss"));
|
|
8
|
+
exports.darkMode = dark_theme_module_scss_1.default.darkMod;
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;AAAA,sFAA8C;AAEjC,QAAA,QAAQ,GAAG,gCAAM,CAAC,OAAO,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as compositions_0 from '/tmp/capsules-root/sign-capsules/2025-8-18/gqd6v4/teambit.base-ui_theme_dark-theme@617e7a13ce4c751dee066d2cf82e1d839519b65b/dist/dark-theme.compositions.js';
|
|
2
|
+
import * as overview_0 from '/tmp/capsules-root/sign-capsules/2025-8-18/gqd6v4/teambit.base-ui_theme_dark-theme@617e7a13ce4c751dee066d2cf82e1d839519b65b/dist/dark-theme.docs.mdx';
|
|
3
|
+
|
|
4
|
+
export const compositions = [compositions_0];
|
|
5
|
+
export const overview = [overview_0];
|
|
6
|
+
|
|
7
|
+
export const compositions_metadata = {"compositions":[{"displayName":"Texts","identifier":"Texts"},{"displayName":"Accents","identifier":"Accents"},{"displayName":"Borders","identifier":"Borders"},{"displayName":"Backgrounds","identifier":"Backgrounds"},{"displayName":"Errors","identifier":"Errors"},{"displayName":"Theme example","identifier":"ThemeExample"}]};
|
package/index.ts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@teambit/base-ui.theme.dark-theme",
|
|
3
|
+
"version": "0.0.0-617e7a13ce4c751dee066d2cf82e1d839519b65b",
|
|
4
|
+
"homepage": "https://bit.cloud/teambit/base-ui/theme/dark-theme",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"componentId": {
|
|
7
|
+
"scope": "teambit.base-ui",
|
|
8
|
+
"name": "theme/dark-theme",
|
|
9
|
+
"version": "617e7a13ce4c751dee066d2cf82e1d839519b65b"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"core-js": "^3.0.0",
|
|
13
|
+
"@teambit/base-ui.theme.colors": "1.0.0"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@types/react": "^17.0.8",
|
|
17
|
+
"@types/node": "12.20.4",
|
|
18
|
+
"@types/react-dom": "^17.0.5",
|
|
19
|
+
"@types/jest": "^26.0.0",
|
|
20
|
+
"@babel/runtime": "7.20.0",
|
|
21
|
+
"@types/testing-library__jest-dom": "5.9.5",
|
|
22
|
+
"@teambit/base-ui.theme.color-definition": "1.0.1"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"react": "^16.8.0 || ^17.0.0",
|
|
26
|
+
"react-dom": "^16.8.0 || ^17.0.0"
|
|
27
|
+
},
|
|
28
|
+
"license": "SEE LICENSE IN UNLICENSED",
|
|
29
|
+
"optionalDependencies": {},
|
|
30
|
+
"peerDependenciesMeta": {},
|
|
31
|
+
"private": false
|
|
32
|
+
}
|
package/types/asset.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare module '*.png' {
|
|
2
|
+
const value: any;
|
|
3
|
+
export = value;
|
|
4
|
+
}
|
|
5
|
+
declare module '*.svg' {
|
|
6
|
+
import type { FunctionComponent, SVGProps } from 'react';
|
|
7
|
+
|
|
8
|
+
export const ReactComponent: FunctionComponent<SVGProps<SVGSVGElement> & { title?: string }>;
|
|
9
|
+
const src: string;
|
|
10
|
+
export default src;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// @TODO Gilad
|
|
14
|
+
declare module '*.jpg' {
|
|
15
|
+
const value: any;
|
|
16
|
+
export = value;
|
|
17
|
+
}
|
|
18
|
+
declare module '*.jpeg' {
|
|
19
|
+
const value: any;
|
|
20
|
+
export = value;
|
|
21
|
+
}
|
|
22
|
+
declare module '*.gif' {
|
|
23
|
+
const value: any;
|
|
24
|
+
export = value;
|
|
25
|
+
}
|
|
26
|
+
declare module '*.bmp' {
|
|
27
|
+
const value: any;
|
|
28
|
+
export = value;
|
|
29
|
+
}
|
package/types/style.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
declare module '*.module.css' {
|
|
2
|
+
const classes: { readonly [key: string]: string };
|
|
3
|
+
export default classes;
|
|
4
|
+
}
|
|
5
|
+
declare module '*.module.scss' {
|
|
6
|
+
const classes: { readonly [key: string]: string };
|
|
7
|
+
export default classes;
|
|
8
|
+
}
|
|
9
|
+
declare module '*.module.sass' {
|
|
10
|
+
const classes: { readonly [key: string]: string };
|
|
11
|
+
export default classes;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare module '*.module.less' {
|
|
15
|
+
const classes: { readonly [key: string]: string };
|
|
16
|
+
export default classes;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare module '*.less' {
|
|
20
|
+
const classes: { readonly [key: string]: string };
|
|
21
|
+
export default classes;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare module '*.css' {
|
|
25
|
+
const classes: { readonly [key: string]: string };
|
|
26
|
+
export default classes;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare module '*.sass' {
|
|
30
|
+
const classes: { readonly [key: string]: string };
|
|
31
|
+
export default classes;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare module '*.scss' {
|
|
35
|
+
const classes: { readonly [key: string]: string };
|
|
36
|
+
export default classes;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
declare module '*.mdx' {
|
|
40
|
+
const component: any;
|
|
41
|
+
export default component;
|
|
42
|
+
}
|