@crfrsr/ui 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/dist/ThemeProvider.d.ts +22 -0
- package/dist/ThemeProvider.js +53 -0
- package/dist/components/Button.d.ts +14 -0
- package/dist/components/Button.js +12 -0
- package/dist/components/Combobox.d.ts +33 -0
- package/dist/components/Combobox.js +255 -0
- package/dist/components/Pill.d.ts +20 -0
- package/dist/components/Pill.js +19 -0
- package/dist/components/command.d.ts +74 -0
- package/dist/components/command.js +26 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +6 -0
- package/dist/components/popover.d.ts +7 -0
- package/dist/components/popover.js +10 -0
- package/dist/hooks/useIsMobile.d.ts +8 -0
- package/dist/hooks/useIsMobile.js +18 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +8 -0
- package/dist/lib/cn.d.ts +7 -0
- package/dist/lib/cn.js +9 -0
- package/dist/styles/button.css +89 -0
- package/dist/styles/combobox.css +200 -0
- package/dist/styles/pill.css +44 -0
- package/dist/styles/reset.css +273 -0
- package/dist/styles/styles.css +14 -0
- package/dist/styles/tokens.css +100 -0
- package/dist/typography/Heading.d.ts +12 -0
- package/dist/typography/Heading.js +31 -0
- package/dist/typography/Text.d.ts +13 -0
- package/dist/typography/Text.js +21 -0
- package/dist/typography/index.d.ts +2 -0
- package/dist/typography/index.js +2 -0
- package/package.json +72 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/* crfrsr Design System — Button */
|
|
2
|
+
|
|
3
|
+
.crfrsr-btn {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
gap: 0.5rem;
|
|
8
|
+
white-space: nowrap;
|
|
9
|
+
font-family: inherit;
|
|
10
|
+
font-weight: var(--crfrsr-font-weight-medium, 500);
|
|
11
|
+
line-height: 1.25;
|
|
12
|
+
border-radius: var(--crfrsr-radius-lg);
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease,
|
|
15
|
+
box-shadow 0.2s ease;
|
|
16
|
+
user-select: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.crfrsr-btn:focus-visible {
|
|
20
|
+
outline: none;
|
|
21
|
+
box-shadow: 0 0 0 2px var(--crfrsr-color-background),
|
|
22
|
+
0 0 0 4px var(--crfrsr-color-focus-ring);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.crfrsr-btn:disabled {
|
|
26
|
+
opacity: 0.5;
|
|
27
|
+
cursor: not-allowed;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* ----- Variants -------------------------------------------------------- */
|
|
31
|
+
|
|
32
|
+
/* primary */
|
|
33
|
+
.crfrsr-btn--primary {
|
|
34
|
+
background-color: var(--crfrsr-btn-primary-bg, var(--crfrsr-color-primary));
|
|
35
|
+
color: var(--crfrsr-btn-primary-color, var(--crfrsr-color-text-on-primary));
|
|
36
|
+
}
|
|
37
|
+
.crfrsr-btn--primary:hover:not(:disabled) {
|
|
38
|
+
background-color: var(--crfrsr-btn-primary-bg-hover, var(--crfrsr-color-primary-dark));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* secondary — neutral filled button (light in light mode). Exposed as its own
|
|
42
|
+
set of vars because the "secondary" palette color is a text tone, not a good
|
|
43
|
+
button fill. */
|
|
44
|
+
.crfrsr-btn--secondary {
|
|
45
|
+
background-color: var(--crfrsr-btn-secondary-bg, var(--crfrsr-color-surface-hover));
|
|
46
|
+
color: var(--crfrsr-btn-secondary-color, var(--crfrsr-color-text));
|
|
47
|
+
}
|
|
48
|
+
.crfrsr-btn--secondary:hover:not(:disabled) {
|
|
49
|
+
background-color: var(--crfrsr-btn-secondary-bg-hover, var(--crfrsr-color-divider));
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* outline */
|
|
53
|
+
.crfrsr-btn--outline {
|
|
54
|
+
background-color: transparent;
|
|
55
|
+
color: var(--crfrsr-color-text);
|
|
56
|
+
border: 1px solid var(--crfrsr-color-border);
|
|
57
|
+
}
|
|
58
|
+
.crfrsr-btn--outline:hover:not(:disabled) {
|
|
59
|
+
background-color: var(--crfrsr-color-surface-hover);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* ghost */
|
|
63
|
+
.crfrsr-btn--ghost {
|
|
64
|
+
background-color: transparent;
|
|
65
|
+
color: var(--crfrsr-color-text);
|
|
66
|
+
}
|
|
67
|
+
.crfrsr-btn--ghost:hover:not(:disabled) {
|
|
68
|
+
background-color: var(--crfrsr-color-surface-hover);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* ----- Sizes ----------------------------------------------------------- */
|
|
72
|
+
|
|
73
|
+
.crfrsr-btn--sm {
|
|
74
|
+
padding: 0.375rem 0.75rem;
|
|
75
|
+
font-size: var(--crfrsr-font-size-sm, 0.875rem);
|
|
76
|
+
}
|
|
77
|
+
.crfrsr-btn--md {
|
|
78
|
+
padding: 0.5rem 1rem;
|
|
79
|
+
font-size: var(--crfrsr-font-size-base, 1rem);
|
|
80
|
+
}
|
|
81
|
+
.crfrsr-btn--lg {
|
|
82
|
+
padding: 0.75rem 1.5rem;
|
|
83
|
+
font-size: var(--crfrsr-font-size-lg, 1.125rem);
|
|
84
|
+
}
|
|
85
|
+
.crfrsr-btn--icon {
|
|
86
|
+
width: 2.25rem;
|
|
87
|
+
height: 2.25rem;
|
|
88
|
+
padding: 0;
|
|
89
|
+
}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/* crfrsr Design System — Combobox (+ popover & command primitives) */
|
|
2
|
+
|
|
3
|
+
/* ----- Popover --------------------------------------------------------- */
|
|
4
|
+
|
|
5
|
+
@keyframes crfrsr-popover-in {
|
|
6
|
+
from {
|
|
7
|
+
opacity: 0;
|
|
8
|
+
transform: scale(0.95);
|
|
9
|
+
}
|
|
10
|
+
to {
|
|
11
|
+
opacity: 1;
|
|
12
|
+
transform: scale(1);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@keyframes crfrsr-popover-out {
|
|
17
|
+
from {
|
|
18
|
+
opacity: 1;
|
|
19
|
+
transform: scale(1);
|
|
20
|
+
}
|
|
21
|
+
to {
|
|
22
|
+
opacity: 0;
|
|
23
|
+
transform: scale(0.95);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.crfrsr-popover__content {
|
|
28
|
+
z-index: 50;
|
|
29
|
+
width: 18rem;
|
|
30
|
+
padding: 1rem;
|
|
31
|
+
border-radius: var(--crfrsr-radius-md);
|
|
32
|
+
border: 1px solid var(--crfrsr-color-border);
|
|
33
|
+
background-color: var(--crfrsr-color-surface);
|
|
34
|
+
color: var(--crfrsr-color-text);
|
|
35
|
+
box-shadow: var(--crfrsr-shadow-md);
|
|
36
|
+
outline: none;
|
|
37
|
+
transform-origin: var(--radix-popover-content-transform-origin);
|
|
38
|
+
}
|
|
39
|
+
/* Duration (0.2s) must match the 200ms search-reset timer in Combobox.tsx. */
|
|
40
|
+
.crfrsr-popover__content[data-state='open'] {
|
|
41
|
+
animation: crfrsr-popover-in 0.2s ease-out;
|
|
42
|
+
}
|
|
43
|
+
.crfrsr-popover__content[data-state='closed'] {
|
|
44
|
+
animation: crfrsr-popover-out 0.2s ease-in;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* ----- Command (cmdk) -------------------------------------------------- */
|
|
48
|
+
|
|
49
|
+
.crfrsr-command {
|
|
50
|
+
display: flex;
|
|
51
|
+
height: 100%;
|
|
52
|
+
width: 100%;
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
border-radius: var(--crfrsr-radius-md);
|
|
56
|
+
background-color: var(--crfrsr-color-surface);
|
|
57
|
+
color: var(--crfrsr-color-text);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.crfrsr-command__input-wrapper {
|
|
61
|
+
display: flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
border-bottom: 1px solid var(--crfrsr-color-border);
|
|
64
|
+
padding: 0 0.75rem;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.crfrsr-command__input-icon {
|
|
68
|
+
margin-right: 0.5rem;
|
|
69
|
+
height: 1rem;
|
|
70
|
+
width: 1rem;
|
|
71
|
+
flex-shrink: 0;
|
|
72
|
+
opacity: 0.5;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.crfrsr-command__input {
|
|
76
|
+
display: flex;
|
|
77
|
+
height: 2.5rem;
|
|
78
|
+
width: 100%;
|
|
79
|
+
border: 0;
|
|
80
|
+
border-radius: var(--crfrsr-radius-md);
|
|
81
|
+
background-color: transparent;
|
|
82
|
+
padding: 0.75rem 0;
|
|
83
|
+
font-size: var(--crfrsr-font-size-sm, 0.875rem);
|
|
84
|
+
color: inherit;
|
|
85
|
+
outline: none;
|
|
86
|
+
}
|
|
87
|
+
.crfrsr-command__input::placeholder {
|
|
88
|
+
color: var(--crfrsr-color-text-secondary);
|
|
89
|
+
}
|
|
90
|
+
.crfrsr-command__input:disabled {
|
|
91
|
+
cursor: not-allowed;
|
|
92
|
+
opacity: 0.5;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.crfrsr-command__list {
|
|
96
|
+
max-height: 300px;
|
|
97
|
+
overflow-y: auto;
|
|
98
|
+
overflow-x: hidden;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.crfrsr-command__empty {
|
|
102
|
+
padding: 1.5rem 0;
|
|
103
|
+
text-align: center;
|
|
104
|
+
font-size: var(--crfrsr-font-size-sm, 0.875rem);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.crfrsr-command__group {
|
|
108
|
+
overflow: hidden;
|
|
109
|
+
padding: 0.25rem;
|
|
110
|
+
color: var(--crfrsr-color-text);
|
|
111
|
+
}
|
|
112
|
+
.crfrsr-command__group [cmdk-group-heading] {
|
|
113
|
+
padding: 0.375rem 0.5rem;
|
|
114
|
+
font-size: var(--crfrsr-font-size-xs, 0.75rem);
|
|
115
|
+
font-weight: var(--crfrsr-font-weight-medium, 500);
|
|
116
|
+
color: var(--crfrsr-color-text-secondary);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.crfrsr-command__item {
|
|
120
|
+
position: relative;
|
|
121
|
+
display: flex;
|
|
122
|
+
align-items: center;
|
|
123
|
+
gap: 0.5rem;
|
|
124
|
+
cursor: default;
|
|
125
|
+
user-select: none;
|
|
126
|
+
border-radius: var(--crfrsr-radius-sm);
|
|
127
|
+
padding: 0.375rem 0.5rem;
|
|
128
|
+
font-size: var(--crfrsr-font-size-sm, 0.875rem);
|
|
129
|
+
color: var(--crfrsr-color-text);
|
|
130
|
+
outline: none;
|
|
131
|
+
}
|
|
132
|
+
.crfrsr-command__item[data-disabled='true'] {
|
|
133
|
+
pointer-events: none;
|
|
134
|
+
opacity: 0.5;
|
|
135
|
+
}
|
|
136
|
+
.crfrsr-command__item[data-selected='true'] {
|
|
137
|
+
background-color: var(--crfrsr-color-surface-hover);
|
|
138
|
+
color: var(--crfrsr-color-text);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.crfrsr-command__separator {
|
|
142
|
+
height: 1px;
|
|
143
|
+
background-color: var(--crfrsr-color-border);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/* ----- Combobox (overrides win over the command defaults above) -------- */
|
|
147
|
+
|
|
148
|
+
.crfrsr-combobox {
|
|
149
|
+
position: relative;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.crfrsr-combobox__popover {
|
|
153
|
+
padding: 0;
|
|
154
|
+
overflow: hidden;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.crfrsr-combobox__list {
|
|
158
|
+
max-height: 30vh;
|
|
159
|
+
overflow: auto;
|
|
160
|
+
}
|
|
161
|
+
@media (min-width: 640px) {
|
|
162
|
+
.crfrsr-combobox__list {
|
|
163
|
+
max-height: 300px;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.crfrsr-combobox__message {
|
|
168
|
+
padding: 0.5rem;
|
|
169
|
+
text-align: center;
|
|
170
|
+
font-size: var(--crfrsr-font-size-xs, 0.75rem);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.crfrsr-combobox__clear {
|
|
174
|
+
position: absolute;
|
|
175
|
+
right: -1rem;
|
|
176
|
+
top: 0;
|
|
177
|
+
display: flex;
|
|
178
|
+
align-items: center;
|
|
179
|
+
justify-content: center;
|
|
180
|
+
width: 1rem;
|
|
181
|
+
height: 1rem;
|
|
182
|
+
padding: 0;
|
|
183
|
+
color: var(--crfrsr-color-text-secondary);
|
|
184
|
+
background: transparent;
|
|
185
|
+
border: 0;
|
|
186
|
+
cursor: pointer;
|
|
187
|
+
opacity: 0;
|
|
188
|
+
transition: opacity 0.2s ease, color 0.2s ease;
|
|
189
|
+
z-index: 10;
|
|
190
|
+
}
|
|
191
|
+
.crfrsr-combobox:hover .crfrsr-combobox__clear {
|
|
192
|
+
opacity: 1;
|
|
193
|
+
}
|
|
194
|
+
.crfrsr-combobox__clear:hover {
|
|
195
|
+
color: var(--crfrsr-color-text);
|
|
196
|
+
}
|
|
197
|
+
.crfrsr-combobox__clear svg {
|
|
198
|
+
width: 1rem;
|
|
199
|
+
height: 1rem;
|
|
200
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/* crfrsr Design System — Pill */
|
|
2
|
+
|
|
3
|
+
.crfrsr-pill {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
white-space: nowrap;
|
|
7
|
+
color: var(--crfrsr-pill-color, #ffffff);
|
|
8
|
+
background-color: var(--crfrsr-pill-bg, var(--crfrsr-color-secondary));
|
|
9
|
+
font-weight: var(--crfrsr-font-weight-bold, 700);
|
|
10
|
+
border-radius: var(--crfrsr-radius-sm);
|
|
11
|
+
cursor: default;
|
|
12
|
+
/* Default font size; consumers override per-size via className if desired. */
|
|
13
|
+
font-size: var(--crfrsr-pill-font-size, var(--crfrsr-font-size-xs, 0.75rem));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.crfrsr-pill--uppercase .crfrsr-pill__label {
|
|
17
|
+
text-transform: uppercase;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.crfrsr-pill--hoverable {
|
|
21
|
+
transition: background-color 0.2s ease;
|
|
22
|
+
}
|
|
23
|
+
.crfrsr-pill--hoverable:hover {
|
|
24
|
+
background-color: var(--crfrsr-pill-bg-hover, var(--crfrsr-pill-bg));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Space between glyph and label only when both are present. */
|
|
28
|
+
.crfrsr-pill__glyph + .crfrsr-pill__label {
|
|
29
|
+
margin-left: 0.125rem;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* ----- Sizes ----------------------------------------------------------- */
|
|
33
|
+
|
|
34
|
+
.crfrsr-pill--default {
|
|
35
|
+
padding: 1px 0.375rem;
|
|
36
|
+
}
|
|
37
|
+
.crfrsr-pill--small {
|
|
38
|
+
padding: 1px 0.25rem;
|
|
39
|
+
line-height: 12px;
|
|
40
|
+
}
|
|
41
|
+
.crfrsr-pill--icon {
|
|
42
|
+
padding: 1px 0.25rem;
|
|
43
|
+
line-height: 12px;
|
|
44
|
+
}
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* crfrsr Design System — reset.css
|
|
3
|
+
*
|
|
4
|
+
* A faithful transcription of Tailwind v3 Preflight, with theme lookups routed
|
|
5
|
+
* through the --crfrsr-* custom properties. Consumers that disable their own CSS
|
|
6
|
+
* reset (e.g. Tailwind `corePlugins: { preflight: false }`) should import this so
|
|
7
|
+
* there is exactly one reset shared across every app.
|
|
8
|
+
*
|
|
9
|
+
* Kept unlayered on purpose: element-level, low-specificity rules that any
|
|
10
|
+
* component or app class easily overrides.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
*,
|
|
14
|
+
::before,
|
|
15
|
+
::after {
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
border-width: 0;
|
|
18
|
+
border-style: solid;
|
|
19
|
+
border-color: var(--crfrsr-color-border, currentColor);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
::before,
|
|
23
|
+
::after {
|
|
24
|
+
--tw-content: '';
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
html,
|
|
28
|
+
:host {
|
|
29
|
+
line-height: 1.5;
|
|
30
|
+
-webkit-text-size-adjust: 100%;
|
|
31
|
+
-moz-tab-size: 4;
|
|
32
|
+
tab-size: 4;
|
|
33
|
+
font-family: var(
|
|
34
|
+
--crfrsr-font-family-base,
|
|
35
|
+
ui-sans-serif,
|
|
36
|
+
system-ui,
|
|
37
|
+
-apple-system,
|
|
38
|
+
BlinkMacSystemFont,
|
|
39
|
+
'Segoe UI',
|
|
40
|
+
Roboto,
|
|
41
|
+
'Helvetica Neue',
|
|
42
|
+
Arial,
|
|
43
|
+
sans-serif
|
|
44
|
+
);
|
|
45
|
+
font-feature-settings: normal;
|
|
46
|
+
font-variation-settings: normal;
|
|
47
|
+
-webkit-tap-highlight-color: transparent;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
body {
|
|
51
|
+
margin: 0;
|
|
52
|
+
line-height: inherit;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
hr {
|
|
56
|
+
height: 0;
|
|
57
|
+
color: inherit;
|
|
58
|
+
border-top-width: 1px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
abbr:where([title]) {
|
|
62
|
+
text-decoration: underline dotted;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
h1,
|
|
66
|
+
h2,
|
|
67
|
+
h3,
|
|
68
|
+
h4,
|
|
69
|
+
h5,
|
|
70
|
+
h6 {
|
|
71
|
+
font-size: inherit;
|
|
72
|
+
font-weight: inherit;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
a {
|
|
76
|
+
color: inherit;
|
|
77
|
+
text-decoration: inherit;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
b,
|
|
81
|
+
strong {
|
|
82
|
+
font-weight: bolder;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
code,
|
|
86
|
+
kbd,
|
|
87
|
+
samp,
|
|
88
|
+
pre {
|
|
89
|
+
font-family: var(
|
|
90
|
+
--crfrsr-font-family-mono,
|
|
91
|
+
ui-monospace,
|
|
92
|
+
SFMono-Regular,
|
|
93
|
+
Menlo,
|
|
94
|
+
Monaco,
|
|
95
|
+
Consolas,
|
|
96
|
+
'Liberation Mono',
|
|
97
|
+
'Courier New',
|
|
98
|
+
monospace
|
|
99
|
+
);
|
|
100
|
+
font-feature-settings: normal;
|
|
101
|
+
font-variation-settings: normal;
|
|
102
|
+
font-size: 1em;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
small {
|
|
106
|
+
font-size: 80%;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
sub,
|
|
110
|
+
sup {
|
|
111
|
+
font-size: 75%;
|
|
112
|
+
line-height: 0;
|
|
113
|
+
position: relative;
|
|
114
|
+
vertical-align: baseline;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
sub {
|
|
118
|
+
bottom: -0.25em;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
sup {
|
|
122
|
+
top: -0.5em;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
table {
|
|
126
|
+
text-indent: 0;
|
|
127
|
+
border-color: inherit;
|
|
128
|
+
border-collapse: collapse;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
button,
|
|
132
|
+
input,
|
|
133
|
+
optgroup,
|
|
134
|
+
select,
|
|
135
|
+
textarea {
|
|
136
|
+
font-family: inherit;
|
|
137
|
+
font-feature-settings: inherit;
|
|
138
|
+
font-variation-settings: inherit;
|
|
139
|
+
font-size: 100%;
|
|
140
|
+
font-weight: inherit;
|
|
141
|
+
line-height: inherit;
|
|
142
|
+
letter-spacing: inherit;
|
|
143
|
+
color: inherit;
|
|
144
|
+
margin: 0;
|
|
145
|
+
padding: 0;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
button,
|
|
149
|
+
select {
|
|
150
|
+
text-transform: none;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
button,
|
|
154
|
+
input:where([type='button']),
|
|
155
|
+
input:where([type='reset']),
|
|
156
|
+
input:where([type='submit']) {
|
|
157
|
+
-webkit-appearance: button;
|
|
158
|
+
background-color: transparent;
|
|
159
|
+
background-image: none;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
:-moz-focusring {
|
|
163
|
+
outline: auto;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
:-moz-ui-invalid {
|
|
167
|
+
box-shadow: none;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
progress {
|
|
171
|
+
vertical-align: baseline;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
::-webkit-inner-spin-button,
|
|
175
|
+
::-webkit-outer-spin-button {
|
|
176
|
+
height: auto;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
[type='search'] {
|
|
180
|
+
-webkit-appearance: textfield;
|
|
181
|
+
outline-offset: -2px;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
::-webkit-search-decoration {
|
|
185
|
+
-webkit-appearance: none;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
::-webkit-file-upload-button {
|
|
189
|
+
-webkit-appearance: button;
|
|
190
|
+
font: inherit;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
summary {
|
|
194
|
+
display: list-item;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
blockquote,
|
|
198
|
+
dl,
|
|
199
|
+
dd,
|
|
200
|
+
h1,
|
|
201
|
+
h2,
|
|
202
|
+
h3,
|
|
203
|
+
h4,
|
|
204
|
+
h5,
|
|
205
|
+
h6,
|
|
206
|
+
hr,
|
|
207
|
+
figure,
|
|
208
|
+
p,
|
|
209
|
+
pre {
|
|
210
|
+
margin: 0;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
fieldset {
|
|
214
|
+
margin: 0;
|
|
215
|
+
padding: 0;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
legend {
|
|
219
|
+
padding: 0;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
ol,
|
|
223
|
+
ul,
|
|
224
|
+
menu {
|
|
225
|
+
list-style: none;
|
|
226
|
+
margin: 0;
|
|
227
|
+
padding: 0;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
dialog {
|
|
231
|
+
padding: 0;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
textarea {
|
|
235
|
+
resize: vertical;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
input::placeholder,
|
|
239
|
+
textarea::placeholder {
|
|
240
|
+
opacity: 1;
|
|
241
|
+
color: var(--crfrsr-color-text-disabled, #9ca3af);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
button,
|
|
245
|
+
[role='button'] {
|
|
246
|
+
cursor: pointer;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
:disabled {
|
|
250
|
+
cursor: default;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
img,
|
|
254
|
+
svg,
|
|
255
|
+
video,
|
|
256
|
+
canvas,
|
|
257
|
+
audio,
|
|
258
|
+
iframe,
|
|
259
|
+
embed,
|
|
260
|
+
object {
|
|
261
|
+
display: block;
|
|
262
|
+
vertical-align: middle;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
img,
|
|
266
|
+
video {
|
|
267
|
+
max-width: 100%;
|
|
268
|
+
height: auto;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
[hidden] {
|
|
272
|
+
display: none;
|
|
273
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* crfrsr Design System — component styles aggregator.
|
|
3
|
+
*
|
|
4
|
+
* Import this once in your app for all component CSS. It does NOT include the
|
|
5
|
+
* reset or token defaults — import those separately and first:
|
|
6
|
+
*
|
|
7
|
+
* import '@crfrsr/ui/reset.css';
|
|
8
|
+
* import '@crfrsr/ui/tokens.css';
|
|
9
|
+
* import '@crfrsr/ui/styles.css';
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
@import './button.css';
|
|
13
|
+
@import './pill.css';
|
|
14
|
+
@import './combobox.css';
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* crfrsr Design System — tokens.css
|
|
3
|
+
*
|
|
4
|
+
* Static default values for the --crfrsr-* contract. These mirror the light and
|
|
5
|
+
* dark output of `getCssVariables()` in @crfrsr/core and provide
|
|
6
|
+
* first-paint / no-JS / no-ThemeProvider defaults. ThemeProvider overrides these
|
|
7
|
+
* at runtime for the active mode.
|
|
8
|
+
*
|
|
9
|
+
* Keep in sync with packages/core/src/{colors,theme,cssVars}.ts.
|
|
10
|
+
*
|
|
11
|
+
* Apps re-theme by overriding any of these variables in their own stylesheet.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
:root {
|
|
15
|
+
/* Colors */
|
|
16
|
+
--crfrsr-color-primary: #0066ff;
|
|
17
|
+
--crfrsr-color-primary-light: #3385ff;
|
|
18
|
+
--crfrsr-color-primary-dark: #0052cc;
|
|
19
|
+
--crfrsr-color-text-on-primary: #ffffff;
|
|
20
|
+
--crfrsr-color-secondary: #6c757d;
|
|
21
|
+
--crfrsr-color-secondary-light: #8e959c;
|
|
22
|
+
--crfrsr-color-secondary-dark: #545b62;
|
|
23
|
+
--crfrsr-color-success: #28a745;
|
|
24
|
+
--crfrsr-color-warning: #ffc107;
|
|
25
|
+
--crfrsr-color-error: #dc3545;
|
|
26
|
+
--crfrsr-color-info: #17a2b8;
|
|
27
|
+
--crfrsr-color-background: #ffffff;
|
|
28
|
+
--crfrsr-color-surface: #f8f9fa;
|
|
29
|
+
--crfrsr-color-surface-hover: #f1f3f5;
|
|
30
|
+
--crfrsr-color-text: #212529;
|
|
31
|
+
--crfrsr-color-text-secondary: #6c757d;
|
|
32
|
+
--crfrsr-color-text-disabled: #adb5bd;
|
|
33
|
+
--crfrsr-color-border: #dee2e6;
|
|
34
|
+
--crfrsr-color-divider: #e9ecef;
|
|
35
|
+
--crfrsr-color-focus-ring: #0066ff;
|
|
36
|
+
--crfrsr-color-overlay: rgb(0 0 0 / 0.5);
|
|
37
|
+
|
|
38
|
+
/* Typography */
|
|
39
|
+
--crfrsr-font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
|
40
|
+
'Helvetica Neue', Arial, sans-serif;
|
|
41
|
+
--crfrsr-font-family-mono: Menlo, Monaco, 'Courier New', monospace;
|
|
42
|
+
--crfrsr-font-size-xs: 0.75rem;
|
|
43
|
+
--crfrsr-font-size-sm: 0.875rem;
|
|
44
|
+
--crfrsr-font-size-base: 1rem;
|
|
45
|
+
--crfrsr-font-size-lg: 1.125rem;
|
|
46
|
+
--crfrsr-font-size-xl: 1.25rem;
|
|
47
|
+
--crfrsr-font-size-2xl: 1.5rem;
|
|
48
|
+
--crfrsr-font-size-3xl: 1.875rem;
|
|
49
|
+
--crfrsr-font-size-4xl: 2.25rem;
|
|
50
|
+
--crfrsr-font-weight-normal: 400;
|
|
51
|
+
--crfrsr-font-weight-medium: 500;
|
|
52
|
+
--crfrsr-font-weight-semibold: 600;
|
|
53
|
+
--crfrsr-font-weight-bold: 700;
|
|
54
|
+
--crfrsr-line-height-tight: 1.25;
|
|
55
|
+
--crfrsr-line-height-normal: 1.5;
|
|
56
|
+
--crfrsr-line-height-relaxed: 1.75;
|
|
57
|
+
|
|
58
|
+
/* Radius */
|
|
59
|
+
--crfrsr-radius-sm: 0.25rem;
|
|
60
|
+
--crfrsr-radius-md: 0.375rem;
|
|
61
|
+
--crfrsr-radius-lg: 0.5rem;
|
|
62
|
+
--crfrsr-radius-full: 9999px;
|
|
63
|
+
|
|
64
|
+
/* Spacing */
|
|
65
|
+
--crfrsr-spacing-xs: 4px;
|
|
66
|
+
--crfrsr-spacing-sm: 8px;
|
|
67
|
+
--crfrsr-spacing-md: 16px;
|
|
68
|
+
--crfrsr-spacing-lg: 24px;
|
|
69
|
+
--crfrsr-spacing-xl: 32px;
|
|
70
|
+
--crfrsr-spacing-2xl: 48px;
|
|
71
|
+
|
|
72
|
+
/* Shadow */
|
|
73
|
+
--crfrsr-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
|
74
|
+
--crfrsr-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Dark mode: only the color tokens change. */
|
|
78
|
+
.crfrsr-dark {
|
|
79
|
+
--crfrsr-color-primary: #4d9aff;
|
|
80
|
+
--crfrsr-color-primary-light: #66adff;
|
|
81
|
+
--crfrsr-color-primary-dark: #3385ff;
|
|
82
|
+
--crfrsr-color-text-on-primary: #ffffff;
|
|
83
|
+
--crfrsr-color-secondary: #adb5bd;
|
|
84
|
+
--crfrsr-color-secondary-light: #ced4da;
|
|
85
|
+
--crfrsr-color-secondary-dark: #8e959c;
|
|
86
|
+
--crfrsr-color-success: #48d597;
|
|
87
|
+
--crfrsr-color-warning: #ffd54f;
|
|
88
|
+
--crfrsr-color-error: #ff6b6b;
|
|
89
|
+
--crfrsr-color-info: #4dd0e1;
|
|
90
|
+
--crfrsr-color-background: #121212;
|
|
91
|
+
--crfrsr-color-surface: #1e1e1e;
|
|
92
|
+
--crfrsr-color-surface-hover: #2a2a2a;
|
|
93
|
+
--crfrsr-color-text: #ffffff;
|
|
94
|
+
--crfrsr-color-text-secondary: #b0b0b0;
|
|
95
|
+
--crfrsr-color-text-disabled: #6c6c6c;
|
|
96
|
+
--crfrsr-color-border: #2e2e2e;
|
|
97
|
+
--crfrsr-color-divider: #3a3a3a;
|
|
98
|
+
--crfrsr-color-focus-ring: #4d9aff;
|
|
99
|
+
--crfrsr-color-overlay: rgb(0 0 0 / 0.7);
|
|
100
|
+
}
|