@voidable/theme 0.0.0 → 0.2.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/package.json +4 -2
- package/src/components/dropdown-menu.css +76 -0
- package/src/components/indicator.css +62 -0
- package/src/components/segmented-control.css +64 -0
- package/src/components/sidebar.css +22 -0
- package/src/components/stat.css +88 -0
- package/src/components/tabs.css +1 -0
- package/src/components/toast.css +1 -0
- package/src/components/toggle.css +84 -0
- package/src/index.css +7 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voidable/theme",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"exports": {
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
"./tokens": "./src/tokens.css",
|
|
10
10
|
"./reset": "./src/reset.css"
|
|
11
11
|
},
|
|
12
|
-
"files": [
|
|
12
|
+
"files": [
|
|
13
|
+
"src"
|
|
14
|
+
],
|
|
13
15
|
"repository": {
|
|
14
16
|
"type": "git",
|
|
15
17
|
"url": "https://github.com/VoidableUI/Voidable",
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
void-dropdown-menu {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.void-dropdown-menu-panel {
|
|
7
|
+
display: none;
|
|
8
|
+
position: absolute;
|
|
9
|
+
z-index: var(--void-z-dropdown, 100);
|
|
10
|
+
min-width: 180px;
|
|
11
|
+
padding: var(--void-space-1) 0;
|
|
12
|
+
background: var(--void-color-bg-elevated);
|
|
13
|
+
border: 1px solid var(--void-color-border);
|
|
14
|
+
border-radius: var(--void-radius-md);
|
|
15
|
+
box-shadow: 0 4px 16px var(--void-color-bg-overlay);
|
|
16
|
+
transition: opacity var(--void-duration-fast) var(--void-ease-in-out);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
void-dropdown-menu[open] .void-dropdown-menu-panel {
|
|
20
|
+
display: block;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
void-dropdown-menu[position='bottom-start'] .void-dropdown-menu-panel {
|
|
24
|
+
top: calc(100% + var(--void-space-1));
|
|
25
|
+
left: 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
void-dropdown-menu[position='bottom-end'] .void-dropdown-menu-panel {
|
|
29
|
+
top: calc(100% + var(--void-space-1));
|
|
30
|
+
right: 0;
|
|
31
|
+
left: auto;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
void-dropdown-menu[position='top-start'] .void-dropdown-menu-panel {
|
|
35
|
+
bottom: calc(100% + var(--void-space-1));
|
|
36
|
+
top: auto;
|
|
37
|
+
left: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
void-dropdown-menu[position='top-end'] .void-dropdown-menu-panel {
|
|
41
|
+
bottom: calc(100% + var(--void-space-1));
|
|
42
|
+
top: auto;
|
|
43
|
+
right: 0;
|
|
44
|
+
left: auto;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
void-dropdown-menu-item {
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
gap: var(--void-space-2);
|
|
51
|
+
padding: var(--void-space-2) var(--void-space-3);
|
|
52
|
+
font-family: var(--void-font-sans);
|
|
53
|
+
font-size: var(--void-text-sm);
|
|
54
|
+
color: var(--void-color-text);
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
user-select: none;
|
|
57
|
+
outline: none;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
void-dropdown-menu-item:hover {
|
|
61
|
+
background: var(--void-color-bg-hover);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
void-dropdown-menu-item:focus-visible {
|
|
65
|
+
background: var(--void-color-bg-hover);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
void-dropdown-menu-item[destructive] {
|
|
69
|
+
color: var(--void-color-error);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
void-dropdown-menu-item[disabled] {
|
|
73
|
+
opacity: 0.5;
|
|
74
|
+
pointer-events: none;
|
|
75
|
+
cursor: default;
|
|
76
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
void-indicator {
|
|
2
|
+
--tone: var(--void-color-accent);
|
|
3
|
+
position: relative;
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.void-indicator-dot {
|
|
8
|
+
position: absolute;
|
|
9
|
+
display: inline-grid;
|
|
10
|
+
place-content: center;
|
|
11
|
+
min-width: 8px;
|
|
12
|
+
min-height: 8px;
|
|
13
|
+
border-radius: var(--void-radius-full);
|
|
14
|
+
background: var(--tone);
|
|
15
|
+
font-family: var(--void-font-sans);
|
|
16
|
+
font-size: var(--void-text-2xs);
|
|
17
|
+
font-weight: var(--void-weight-semibold);
|
|
18
|
+
color: var(--void-color-text-on-accent);
|
|
19
|
+
pointer-events: none;
|
|
20
|
+
line-height: 1;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.void-indicator-dot:not(:empty) {
|
|
24
|
+
min-width: 16px;
|
|
25
|
+
min-height: 16px;
|
|
26
|
+
padding: 0 4px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
void-indicator[position="top-right"] .void-indicator-dot { top: -4px; right: -4px; }
|
|
30
|
+
void-indicator[position="top-left"] .void-indicator-dot { top: -4px; left: -4px; }
|
|
31
|
+
void-indicator[position="bottom-right"] .void-indicator-dot { bottom: -4px; right: -4px; }
|
|
32
|
+
void-indicator[position="bottom-left"] .void-indicator-dot { bottom: -4px; left: -4px; }
|
|
33
|
+
|
|
34
|
+
void-indicator[color="error"] { --tone: var(--void-color-error); }
|
|
35
|
+
void-indicator[color="warning"] { --tone: var(--void-color-warning); }
|
|
36
|
+
void-indicator[color="success"] { --tone: var(--void-color-success); }
|
|
37
|
+
void-indicator[color="info"] { --tone: var(--void-color-info); }
|
|
38
|
+
void-indicator[color="notice"] { --tone: var(--void-color-notice); }
|
|
39
|
+
|
|
40
|
+
void-indicator[ping] .void-indicator-dot::before {
|
|
41
|
+
content: '';
|
|
42
|
+
position: absolute;
|
|
43
|
+
inset: 0;
|
|
44
|
+
border-radius: var(--void-radius-full);
|
|
45
|
+
background: var(--tone);
|
|
46
|
+
animation: void-indicator-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@keyframes void-indicator-ping {
|
|
50
|
+
75%, 100% { transform: scale(2); opacity: 0; }
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
void-indicator[size="sm"] .void-indicator-dot { min-width: 6px; min-height: 6px; }
|
|
54
|
+
void-indicator[size="sm"] .void-indicator-dot:not(:empty) { min-width: 14px; min-height: 14px; }
|
|
55
|
+
void-indicator[size="lg"] .void-indicator-dot { min-width: 10px; min-height: 10px; }
|
|
56
|
+
void-indicator[size="lg"] .void-indicator-dot:not(:empty) { min-width: 20px; min-height: 20px; font-size: var(--void-text-xs); }
|
|
57
|
+
void-indicator[size="xl"] .void-indicator-dot { min-width: 12px; min-height: 12px; }
|
|
58
|
+
void-indicator[size="xl"] .void-indicator-dot:not(:empty) { min-width: 24px; min-height: 24px; font-size: var(--void-text-sm); }
|
|
59
|
+
void-indicator[size="xxl"] .void-indicator-dot { min-width: 14px; min-height: 14px; }
|
|
60
|
+
void-indicator[size="xxl"] .void-indicator-dot:not(:empty) { min-width: 28px; min-height: 28px; font-size: var(--void-text-base); }
|
|
61
|
+
|
|
62
|
+
void-indicator[color="success"] .void-indicator-dot { box-shadow: 0 0 6px var(--void-color-success); }
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
void-segmented-control {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
padding: 2px;
|
|
5
|
+
background: var(--void-color-bg-secondary);
|
|
6
|
+
border: 1px solid var(--void-color-border);
|
|
7
|
+
border-radius: var(--void-radius-md);
|
|
8
|
+
gap: 2px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
void-segmented-control-item {
|
|
12
|
+
display: inline-grid;
|
|
13
|
+
place-content: center;
|
|
14
|
+
padding: var(--void-space-1) var(--void-space-3);
|
|
15
|
+
border-radius: calc(var(--void-radius-md) - 2px);
|
|
16
|
+
font-family: var(--void-font-sans);
|
|
17
|
+
font-size: var(--void-text-sm);
|
|
18
|
+
color: var(--void-color-text-secondary);
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
user-select: none;
|
|
21
|
+
transition: background var(--void-duration-fast) var(--void-ease-in-out),
|
|
22
|
+
color var(--void-duration-fast) var(--void-ease-in-out);
|
|
23
|
+
outline: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
void-segmented-control-item:hover {
|
|
27
|
+
color: var(--void-color-text);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
void-segmented-control-item:focus-visible {
|
|
31
|
+
outline: 2px solid var(--void-color-border-focus);
|
|
32
|
+
outline-offset: -2px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
void-segmented-control-item[aria-checked="true"] {
|
|
36
|
+
background: var(--void-color-bg-elevated);
|
|
37
|
+
color: var(--void-color-text);
|
|
38
|
+
box-shadow: var(--void-shadow-sm);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
void-segmented-control-item[disabled] {
|
|
42
|
+
opacity: 0.5;
|
|
43
|
+
pointer-events: none;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
void-segmented-control[size="sm"] void-segmented-control-item {
|
|
47
|
+
padding: 2px var(--void-space-2);
|
|
48
|
+
font-size: var(--void-text-xs);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
void-segmented-control[size="lg"] void-segmented-control-item {
|
|
52
|
+
padding: var(--void-space-2) var(--void-space-4);
|
|
53
|
+
font-size: var(--void-text-base);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
void-segmented-control[size="xl"] void-segmented-control-item {
|
|
57
|
+
padding: var(--void-space-3) var(--void-space-5);
|
|
58
|
+
font-size: var(--void-text-lg);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
void-segmented-control[size="xxl"] void-segmented-control-item {
|
|
62
|
+
padding: var(--void-space-4) var(--void-space-6);
|
|
63
|
+
font-size: var(--void-text-xl);
|
|
64
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
void-sidebar {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
width: var(--void-sidebar-width, 240px);
|
|
5
|
+
height: 100%;
|
|
6
|
+
background: var(--void-color-bg);
|
|
7
|
+
border-right: 1px solid var(--void-color-border);
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
font-family: var(--void-font-sans);
|
|
10
|
+
color: var(--void-color-text);
|
|
11
|
+
transition: width var(--void-duration-normal) var(--void-ease-in-out);
|
|
12
|
+
flex-shrink: 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
void-sidebar[position="right"] {
|
|
16
|
+
border-right: none;
|
|
17
|
+
border-left: 1px solid var(--void-color-border);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
void-sidebar[collapsed] {
|
|
21
|
+
white-space: nowrap;
|
|
22
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
void-stat {
|
|
2
|
+
--tone: var(--void-color-accent);
|
|
3
|
+
--tone-subtle: color-mix(in srgb, var(--tone) 14%, transparent);
|
|
4
|
+
--tone-border: color-mix(in srgb, var(--tone) 36%, transparent);
|
|
5
|
+
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
gap: var(--void-space-1);
|
|
9
|
+
padding: var(--void-space-4);
|
|
10
|
+
border: 1px solid var(--tone-border);
|
|
11
|
+
border-radius: var(--void-radius-lg);
|
|
12
|
+
background: var(--tone-subtle);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.void-stat-label {
|
|
16
|
+
font-family: var(--void-font-sans);
|
|
17
|
+
font-size: var(--void-text-xs);
|
|
18
|
+
color: var(--void-color-text-muted);
|
|
19
|
+
text-transform: uppercase;
|
|
20
|
+
letter-spacing: 0.06em;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.void-stat-value {
|
|
24
|
+
font-family: var(--void-font-mono);
|
|
25
|
+
font-size: var(--void-text-3xl);
|
|
26
|
+
font-weight: var(--void-weight-bold);
|
|
27
|
+
color: var(--void-color-text);
|
|
28
|
+
letter-spacing: -0.02em;
|
|
29
|
+
line-height: var(--void-leading-tight);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.void-stat-delta {
|
|
33
|
+
display: inline-flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
gap: var(--void-space-1);
|
|
36
|
+
font-family: var(--void-font-mono);
|
|
37
|
+
font-size: var(--void-text-xs);
|
|
38
|
+
color: var(--void-color-text-secondary);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
void-stat[trend="up"] .void-stat-delta { color: var(--void-color-success); }
|
|
42
|
+
void-stat[trend="down"] .void-stat-delta { color: var(--void-color-error); }
|
|
43
|
+
void-stat[trend="error"] .void-stat-delta { color: var(--void-color-error); }
|
|
44
|
+
void-stat[trend="warning"] .void-stat-delta { color: var(--void-color-warning); }
|
|
45
|
+
void-stat[trend="success"] .void-stat-delta { color: var(--void-color-success); }
|
|
46
|
+
void-stat[trend="info"] .void-stat-delta { color: var(--void-color-info); }
|
|
47
|
+
void-stat[trend="notice"] .void-stat-delta { color: var(--void-color-notice); }
|
|
48
|
+
void-stat[trend="highlight"] .void-stat-delta { color: var(--void-color-highlight); }
|
|
49
|
+
|
|
50
|
+
/* Sizes */
|
|
51
|
+
void-stat[size="sm"] {
|
|
52
|
+
padding: var(--void-space-3);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
void-stat[size="sm"] .void-stat-value {
|
|
56
|
+
font-size: var(--void-text-2xl);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
void-stat[size="lg"] {
|
|
60
|
+
padding: var(--void-space-6);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
void-stat[size="lg"] .void-stat-value {
|
|
64
|
+
font-size: var(--void-text-4xl);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
void-stat[size="xl"] {
|
|
68
|
+
padding: var(--void-space-8);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
void-stat[size="xl"] .void-stat-value {
|
|
72
|
+
font-size: var(--void-text-5xl);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
void-stat[size="xxl"] {
|
|
76
|
+
padding: var(--void-space-10);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
void-stat[size="xxl"] .void-stat-value {
|
|
80
|
+
font-size: 4rem;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
void-stat[color="error"] { --tone: var(--void-color-error); }
|
|
84
|
+
void-stat[color="warning"] { --tone: var(--void-color-warning); }
|
|
85
|
+
void-stat[color="success"] { --tone: var(--void-color-success); }
|
|
86
|
+
void-stat[color="info"] { --tone: var(--void-color-info); }
|
|
87
|
+
void-stat[color="notice"] { --tone: var(--void-color-notice); }
|
|
88
|
+
void-stat[color="highlight"] { --tone: var(--void-color-highlight); }
|
package/src/components/tabs.css
CHANGED
package/src/components/toast.css
CHANGED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
void-toggle {
|
|
2
|
+
--tone: var(--void-color-accent);
|
|
3
|
+
--tone-subtle: color-mix(in srgb, var(--tone) 14%, transparent);
|
|
4
|
+
--tone-border: color-mix(in srgb, var(--tone) 36%, transparent);
|
|
5
|
+
--tone-hover: color-mix(in srgb, var(--tone) 22%, transparent);
|
|
6
|
+
|
|
7
|
+
display: inline-grid;
|
|
8
|
+
place-content: center;
|
|
9
|
+
padding: var(--void-space-2);
|
|
10
|
+
border: 1px solid var(--void-color-border);
|
|
11
|
+
border-radius: var(--void-radius-md);
|
|
12
|
+
background: transparent;
|
|
13
|
+
color: var(--void-color-text-secondary);
|
|
14
|
+
font-family: var(--void-font-sans);
|
|
15
|
+
font-size: var(--void-text-sm);
|
|
16
|
+
font-weight: var(--void-weight-medium);
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
user-select: none;
|
|
19
|
+
transition: background var(--void-duration-fast) var(--void-ease-in-out),
|
|
20
|
+
border-color var(--void-duration-fast) var(--void-ease-in-out),
|
|
21
|
+
color var(--void-duration-fast) var(--void-ease-in-out);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
void-toggle:hover {
|
|
25
|
+
background: var(--tone-hover);
|
|
26
|
+
border-color: var(--void-color-border-strong);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
void-toggle:focus-visible {
|
|
30
|
+
outline: 2px solid var(--void-color-border-focus);
|
|
31
|
+
outline-offset: 2px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
void-toggle[pressed] {
|
|
35
|
+
background: var(--tone-subtle);
|
|
36
|
+
border-color: var(--tone-border);
|
|
37
|
+
color: var(--void-color-text);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
void-toggle[pressed]:hover {
|
|
41
|
+
background: var(--tone-hover);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
void-toggle[variant="filled"][pressed] {
|
|
45
|
+
background: var(--tone);
|
|
46
|
+
border-color: var(--tone);
|
|
47
|
+
color: var(--void-color-text-on-accent);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
void-toggle[variant="filled"][pressed]:hover {
|
|
51
|
+
opacity: 0.9;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
void-toggle[color="error"] { --tone: var(--void-color-error); }
|
|
55
|
+
void-toggle[color="warning"] { --tone: var(--void-color-warning); }
|
|
56
|
+
void-toggle[color="success"] { --tone: var(--void-color-success); }
|
|
57
|
+
void-toggle[color="info"] { --tone: var(--void-color-info); }
|
|
58
|
+
void-toggle[color="notice"] { --tone: var(--void-color-notice); }
|
|
59
|
+
|
|
60
|
+
void-toggle[size="sm"] {
|
|
61
|
+
padding: var(--void-space-1);
|
|
62
|
+
font-size: var(--void-text-xs);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
void-toggle[size="lg"] {
|
|
66
|
+
padding: var(--void-space-3);
|
|
67
|
+
font-size: var(--void-text-base);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
void-toggle[size="xl"] {
|
|
71
|
+
padding: var(--void-space-4);
|
|
72
|
+
font-size: var(--void-text-lg);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
void-toggle[size="xxl"] {
|
|
76
|
+
padding: var(--void-space-5);
|
|
77
|
+
font-size: var(--void-text-xl);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
void-toggle[disabled] {
|
|
81
|
+
opacity: 0.5;
|
|
82
|
+
pointer-events: none;
|
|
83
|
+
cursor: not-allowed;
|
|
84
|
+
}
|
package/src/index.css
CHANGED
|
@@ -44,3 +44,10 @@
|
|
|
44
44
|
@import './components/nav-bar.css';
|
|
45
45
|
@import './components/hamburger.css';
|
|
46
46
|
@import './components/compose-input.css';
|
|
47
|
+
@import './components/sidebar.css';
|
|
48
|
+
@import './components/segmented-control.css';
|
|
49
|
+
@import './components/toggle.css';
|
|
50
|
+
@import './components/stat.css';
|
|
51
|
+
|
|
52
|
+
@import './components/dropdown-menu.css';
|
|
53
|
+
@import './components/indicator.css';
|