@wintermuted/ui-theme 0.21.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/LICENSE +21 -0
- package/README.md +131 -0
- package/index.css +6 -0
- package/index.js +1 -0
- package/package.json +73 -0
- package/styles/base.css +145 -0
- package/styles/components/badge.css +17 -0
- package/styles/components/button.css +319 -0
- package/styles/components/card.css +92 -0
- package/styles/components/chart.css +54 -0
- package/styles/components/checkbox-filter.css +69 -0
- package/styles/components/code-block.css +89 -0
- package/styles/components/empty-state.css +29 -0
- package/styles/components/file-upload.css +29 -0
- package/styles/components/gallery.css +286 -0
- package/styles/components/inline-panel.css +53 -0
- package/styles/components/layout.css +525 -0
- package/styles/components/list.css +27 -0
- package/styles/components/modal.css +92 -0
- package/styles/components/separator.css +7 -0
- package/styles/components/side-nav.css +56 -0
- package/styles/components/slider.css +155 -0
- package/styles/components/stat-card.css +82 -0
- package/styles/components/tab-bar.css +175 -0
- package/styles/components/tag.css +29 -0
- package/styles/components/toast.css +120 -0
- package/styles/components/toggle-group.css +124 -0
- package/styles/components/toggle.css +116 -0
- package/styles/components/view-header.css +60 -0
- package/styles/components.css +25 -0
- package/styles/tokens.css +70 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/* ── Toggle Switch ────────────────────────────────────────────────────────────
|
|
2
|
+
* CSS-only pill toggle. Uses a visually-hidden checkbox + styled label track
|
|
3
|
+
* and thumb. Requires this markup structure:
|
|
4
|
+
*
|
|
5
|
+
* <label class="wm-toggle">
|
|
6
|
+
* <input type="checkbox" class="wm-toggle-input" />
|
|
7
|
+
* <span class="wm-toggle-track">
|
|
8
|
+
* <span class="wm-toggle-thumb"></span>
|
|
9
|
+
* </span>
|
|
10
|
+
* <span class="wm-toggle-label">Label text</span>
|
|
11
|
+
* </label>
|
|
12
|
+
*
|
|
13
|
+
* Add a sibling <p class="wm-toggle-description"> below the label for
|
|
14
|
+
* supplementary help text.
|
|
15
|
+
* ─────────────────────────────────────────────────────────────────────────── */
|
|
16
|
+
|
|
17
|
+
.wm-toggle {
|
|
18
|
+
display: inline-flex;
|
|
19
|
+
align-items: flex-start;
|
|
20
|
+
gap: 0.65rem;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
user-select: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.wm-toggle-input {
|
|
26
|
+
/* Visually hidden but still accessible */
|
|
27
|
+
position: absolute;
|
|
28
|
+
width: 1px;
|
|
29
|
+
height: 1px;
|
|
30
|
+
padding: 0;
|
|
31
|
+
margin: -1px;
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
clip-path: inset(50%);
|
|
34
|
+
white-space: nowrap;
|
|
35
|
+
border: 0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* ── Track ───────────────────────────────────────────────────────────────── */
|
|
39
|
+
|
|
40
|
+
.wm-toggle-track {
|
|
41
|
+
position: relative;
|
|
42
|
+
flex-shrink: 0;
|
|
43
|
+
width: 2.25rem;
|
|
44
|
+
height: 1.25rem;
|
|
45
|
+
margin-top: 0.15rem; /* optical alignment with label text */
|
|
46
|
+
background: var(--wm-control-off);
|
|
47
|
+
border-radius: var(--wm-radius-pill);
|
|
48
|
+
border: 1px solid var(--wm-control-off);
|
|
49
|
+
transition: background 0.18s ease, border-color 0.18s ease;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* ── Thumb ───────────────────────────────────────────────────────────────── */
|
|
53
|
+
|
|
54
|
+
.wm-toggle-thumb {
|
|
55
|
+
position: absolute;
|
|
56
|
+
top: 50%;
|
|
57
|
+
left: 0.125rem;
|
|
58
|
+
transform: translateY(-50%);
|
|
59
|
+
width: 0.875rem;
|
|
60
|
+
height: 0.875rem;
|
|
61
|
+
border-radius: 50%;
|
|
62
|
+
background: var(--wm-control-thumb);
|
|
63
|
+
box-shadow: 0 1px 3px rgb(0 0 0 / 25%);
|
|
64
|
+
transition: left 0.18s ease;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* ── Checked state ───────────────────────────────────────────────────────── */
|
|
68
|
+
|
|
69
|
+
.wm-toggle-input:checked ~ .wm-toggle-track {
|
|
70
|
+
background: var(--wm-control-on);
|
|
71
|
+
border-color: var(--wm-control-on);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.wm-toggle-input:checked ~ .wm-toggle-track .wm-toggle-thumb {
|
|
75
|
+
left: calc(100% - 0.125rem - 0.875rem);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* ── Focus ring ──────────────────────────────────────────────────────────── */
|
|
79
|
+
|
|
80
|
+
.wm-toggle-input:focus-visible ~ .wm-toggle-track {
|
|
81
|
+
outline: 2px solid var(--wm-control-on);
|
|
82
|
+
outline-offset: 2px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* ── Label text ──────────────────────────────────────────────────────────── */
|
|
86
|
+
|
|
87
|
+
.wm-toggle-label {
|
|
88
|
+
font-size: 0.9rem;
|
|
89
|
+
font-weight: 500;
|
|
90
|
+
color: var(--wm-color-text);
|
|
91
|
+
line-height: 1.4;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* ── Description text ────────────────────────────────────────────────────── */
|
|
95
|
+
|
|
96
|
+
.wm-toggle-description {
|
|
97
|
+
margin: 0.2rem 0 0 calc(2.25rem + 0.65rem);
|
|
98
|
+
font-size: 0.8rem;
|
|
99
|
+
color: var(--wm-color-text-muted);
|
|
100
|
+
line-height: 1.5;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* ── Disabled ────────────────────────────────────────────────────────────── */
|
|
104
|
+
|
|
105
|
+
.wm-toggle:has(.wm-toggle-input:disabled) {
|
|
106
|
+
cursor: not-allowed;
|
|
107
|
+
opacity: 0.5;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* ── Wrapper for stacked toggle rows ────────────────────────────────────── */
|
|
111
|
+
|
|
112
|
+
.wm-toggle-list {
|
|
113
|
+
display: flex;
|
|
114
|
+
flex-direction: column;
|
|
115
|
+
gap: 1rem;
|
|
116
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/* View header: flat page section header with title + subtitle. */
|
|
2
|
+
|
|
3
|
+
.view-header,
|
|
4
|
+
.wm-view-header {
|
|
5
|
+
margin-bottom: 1.5rem;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.view-header h2,
|
|
9
|
+
.wm-view-header h2 {
|
|
10
|
+
font-size: 1.3rem;
|
|
11
|
+
font-weight: 600;
|
|
12
|
+
letter-spacing: -0.01em;
|
|
13
|
+
margin: 0 0 0.3rem;
|
|
14
|
+
color: var(--wm-color-text);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.view-header p,
|
|
18
|
+
.wm-view-header p {
|
|
19
|
+
margin: 0;
|
|
20
|
+
font-size: 0.9rem;
|
|
21
|
+
color: var(--wm-color-text-muted);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* Filter bar: single-row row with bottom-border only and tight controls. */
|
|
25
|
+
|
|
26
|
+
.filter-bar,
|
|
27
|
+
.wm-filter-bar {
|
|
28
|
+
display: flex;
|
|
29
|
+
gap: 0.75rem;
|
|
30
|
+
flex-wrap: wrap;
|
|
31
|
+
align-items: flex-end;
|
|
32
|
+
padding: 0.6rem 0;
|
|
33
|
+
border-bottom: 1px solid var(--wm-color-border);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.filter-group,
|
|
37
|
+
.wm-filter-group {
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
gap: 0.25rem;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.filter-label,
|
|
44
|
+
.wm-filter-label {
|
|
45
|
+
font-size: 0.7rem;
|
|
46
|
+
font-weight: 600;
|
|
47
|
+
text-transform: uppercase;
|
|
48
|
+
letter-spacing: 0.04em;
|
|
49
|
+
color: var(--wm-color-text-muted);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.filter-select,
|
|
53
|
+
.wm-filter-select {
|
|
54
|
+
padding: 0.4rem 0.6rem;
|
|
55
|
+
border: 1px solid var(--wm-color-border-strong);
|
|
56
|
+
border-radius: var(--wm-radius-xs, 4px);
|
|
57
|
+
background: var(--wm-color-surface);
|
|
58
|
+
color: var(--wm-color-text);
|
|
59
|
+
font-size: 0.875rem;
|
|
60
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* Aggregate component styles. */
|
|
2
|
+
|
|
3
|
+
@import url("./components/card.css");
|
|
4
|
+
@import url("./components/button.css");
|
|
5
|
+
@import url("./components/badge.css");
|
|
6
|
+
@import url("./components/tag.css");
|
|
7
|
+
@import url("./components/list.css");
|
|
8
|
+
@import url("./components/separator.css");
|
|
9
|
+
@import url("./components/side-nav.css");
|
|
10
|
+
@import url("./components/stat-card.css");
|
|
11
|
+
@import url("./components/tab-bar.css");
|
|
12
|
+
@import url("./components/modal.css");
|
|
13
|
+
@import url("./components/empty-state.css");
|
|
14
|
+
@import url("./components/file-upload.css");
|
|
15
|
+
@import url("./components/view-header.css");
|
|
16
|
+
@import url("./components/layout.css");
|
|
17
|
+
@import url("./components/inline-panel.css");
|
|
18
|
+
@import url("./components/checkbox-filter.css");
|
|
19
|
+
@import url("./components/chart.css");
|
|
20
|
+
@import url("./components/gallery.css");
|
|
21
|
+
@import url("./components/toggle.css");
|
|
22
|
+
@import url("./components/slider.css");
|
|
23
|
+
@import url("./components/toggle-group.css");
|
|
24
|
+
@import url("./components/toast.css");
|
|
25
|
+
@import url("./components/code-block.css");
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/* Shared Wintermuted UI theme tokens. */
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--wm-font-sans: "Inter", "Sohne", "Söhne", system-ui, -apple-system, "Segoe UI",
|
|
5
|
+
helvetica, arial, sans-serif;
|
|
6
|
+
--wm-color-text: #0d0d0d;
|
|
7
|
+
--wm-color-bg: #fff;
|
|
8
|
+
--wm-color-surface: rgb(255 255 255 / 86%);
|
|
9
|
+
--wm-color-surface-solid: #fbfbfb;
|
|
10
|
+
--wm-color-surface-muted: #f7f7f7;
|
|
11
|
+
--wm-color-surface-strong: #efefef;
|
|
12
|
+
--wm-color-text-secondary: #353535;
|
|
13
|
+
--wm-color-text-muted: #6e6e6e;
|
|
14
|
+
--wm-color-text-faint: #8e8e8e;
|
|
15
|
+
--wm-color-border: #e5e5e5;
|
|
16
|
+
--wm-color-border-strong: #d8d8d8;
|
|
17
|
+
--wm-color-link-underline: #d1d1d1;
|
|
18
|
+
--wm-color-accent: #2a4a8a;
|
|
19
|
+
--wm-color-accent-soft: #f0f4ff;
|
|
20
|
+
--wm-color-accent-border: #d8e0f0;
|
|
21
|
+
--wm-color-success: #137333;
|
|
22
|
+
--wm-color-success-soft: #e6f4ea;
|
|
23
|
+
--wm-color-success-border: #cfe6d4;
|
|
24
|
+
--wm-color-warning: #ea8600;
|
|
25
|
+
--wm-color-warning-soft: #fff7e0;
|
|
26
|
+
--wm-color-warning-border: #f6d28b;
|
|
27
|
+
--wm-color-danger: #c5221f;
|
|
28
|
+
--wm-color-danger-soft: #fce8e6;
|
|
29
|
+
--wm-color-danger-border: #f4c3c1;
|
|
30
|
+
--wm-control-on: #0285ff;
|
|
31
|
+
--wm-control-off: #d2d2d2;
|
|
32
|
+
--wm-control-thumb: #fff;
|
|
33
|
+
--wm-shadow-soft: 0 18px 40px -30px rgb(13 13 13 / 28%);
|
|
34
|
+
--wm-radius-xs: 4px;
|
|
35
|
+
--wm-radius-base: 8px;
|
|
36
|
+
--wm-radius-sm: 10px;
|
|
37
|
+
--wm-radius-md: 16px;
|
|
38
|
+
--wm-radius-lg: 24px;
|
|
39
|
+
--wm-radius-pill: 999px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
[data-theme="dark"] {
|
|
43
|
+
--wm-color-text: #e0e0e0;
|
|
44
|
+
--wm-color-bg: #141414;
|
|
45
|
+
--wm-color-surface: rgb(28 28 28 / 88%);
|
|
46
|
+
--wm-color-surface-solid: #1c1c1c;
|
|
47
|
+
--wm-color-surface-muted: #181818;
|
|
48
|
+
--wm-color-surface-strong: #202020;
|
|
49
|
+
--wm-color-text-secondary: #b8b8b8;
|
|
50
|
+
--wm-color-text-muted: #888;
|
|
51
|
+
--wm-color-text-faint: #666;
|
|
52
|
+
--wm-color-border: #2e2e2e;
|
|
53
|
+
--wm-color-border-strong: #3a3a3a;
|
|
54
|
+
--wm-color-link-underline: #444;
|
|
55
|
+
--wm-color-accent: #7aa0e8;
|
|
56
|
+
--wm-color-accent-soft: #1a2240;
|
|
57
|
+
--wm-color-accent-border: #2a3560;
|
|
58
|
+
--wm-color-success: #78d49a;
|
|
59
|
+
--wm-color-success-soft: #132719;
|
|
60
|
+
--wm-color-success-border: #21452c;
|
|
61
|
+
--wm-color-warning: #ffb95a;
|
|
62
|
+
--wm-color-warning-soft: #35250f;
|
|
63
|
+
--wm-color-warning-border: #5e441d;
|
|
64
|
+
--wm-color-danger: #ff978f;
|
|
65
|
+
--wm-color-danger-soft: #351615;
|
|
66
|
+
--wm-color-danger-border: #5d2623;
|
|
67
|
+
--wm-control-on: #0285ff;
|
|
68
|
+
--wm-control-off: #414141;
|
|
69
|
+
--wm-control-thumb: #dcdcdc;
|
|
70
|
+
}
|