@a-type/ui 0.3.2 → 0.3.3
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 +3 -2
- package/src/components/actions/ActionBar.tsx +38 -0
- package/src/components/actions/ActionButton.tsx +59 -0
- package/src/components/actions/index.ts +2 -0
- package/src/components/actions.ts +1 -0
- package/src/components/avatar/Avatar.tsx +62 -0
- package/src/components/avatar/AvatarList.tsx +71 -0
- package/src/components/avatar/index.ts +2 -0
- package/src/components/avatar.ts +1 -0
- package/src/components/button/Button.stories.tsx +20 -0
- package/src/components/button/Button.tsx +66 -0
- package/src/components/button/ConfirmedButton.tsx +66 -0
- package/src/components/button/classes.tsx +56 -0
- package/src/components/button/index.ts +3 -0
- package/src/components/button.ts +1 -0
- package/src/components/camera/Camera.stories.tsx +40 -0
- package/src/components/camera/Camera.tsx +215 -0
- package/src/components/camera/index.ts +1 -0
- package/src/components/camera.ts +1 -0
- package/src/components/card/Card.stories.tsx +41 -0
- package/src/components/card/Card.tsx +68 -0
- package/src/components/card/index.ts +1 -0
- package/src/components/card.ts +1 -0
- package/src/components/checkbox/Checkbox.tsx +46 -0
- package/src/components/checkbox/index.ts +1 -0
- package/src/components/checkbox.ts +1 -0
- package/src/components/chip/Chip.tsx +29 -0
- package/src/components/chip/index.ts +1 -0
- package/src/components/chip.ts +1 -0
- package/src/components/collapsible/Collapsible.tsx +48 -0
- package/src/components/collapsible/index.ts +1 -0
- package/src/components/collapsible.ts +1 -0
- package/src/components/colorPicker/ColorPicker.tsx +82 -0
- package/src/components/colorPicker/index.ts +1 -0
- package/src/components/colorPicker.ts +1 -0
- package/src/components/contextMenu/contextMenu.tsx +43 -0
- package/src/components/contextMenu.ts +1 -0
- package/src/components/dialog/Dialog.stories.tsx +38 -0
- package/src/components/dialog/Dialog.tsx +267 -0
- package/src/components/dialog/index.ts +1 -0
- package/src/components/dialog.ts +1 -0
- package/src/components/divider/Divider.tsx +26 -0
- package/src/components/divider/index.ts +1 -0
- package/src/components/divider.ts +1 -0
- package/src/components/dropdownMenu/DropdownMenu.stories.tsx +47 -0
- package/src/components/dropdownMenu/DropdownMenu.tsx +89 -0
- package/src/components/dropdownMenu/index.ts +1 -0
- package/src/components/dropdownMenu.ts +1 -0
- package/src/components/errorBoundary/ErrorBoundary.tsx +23 -0
- package/src/components/errorBoundary/index.ts +1 -0
- package/src/components/errorBoundary.ts +1 -0
- package/src/components/forms/Form.tsx +9 -0
- package/src/components/forms/FormikForm.tsx +41 -0
- package/src/components/forms/SubmitButton.tsx +15 -0
- package/src/components/forms/TextField.tsx +112 -0
- package/src/components/forms/index.tsx +4 -0
- package/src/components/forms.ts +1 -0
- package/src/components/icon/Icon.tsx +28 -0
- package/src/components/icon/generated/IconSpritesheet.tsx +442 -0
- package/src/components/icon/generated/iconNames.ts +44 -0
- package/src/components/icon/index.ts +3 -0
- package/src/components/icon.ts +1 -0
- package/src/components/imageUploader/ImageUploader.stories.tsx +39 -0
- package/src/components/imageUploader/ImageUploader.tsx +203 -0
- package/src/components/imageUploader/UploadIcon.tsx +23 -0
- package/src/components/imageUploader/index.ts +1 -0
- package/src/components/imageUploader.ts +1 -0
- package/src/components/infiniteLoadTrigger/InfiniteLoadTrigger.tsx +38 -0
- package/src/components/infiniteLoadTrigger.ts +1 -0
- package/src/components/input/Input.stories.tsx +17 -0
- package/src/components/input/Input.tsx +32 -0
- package/src/components/input/index.ts +1 -0
- package/src/components/input.ts +1 -0
- package/src/components/layouts/PageContent.tsx +51 -0
- package/src/components/layouts/PageFixedArea.tsx +17 -0
- package/src/components/layouts/PageNav.tsx +23 -0
- package/src/components/layouts/PageNowPlaying.tsx +24 -0
- package/src/components/layouts/PageRoot.tsx +29 -0
- package/src/components/layouts/PageSection.tsx +23 -0
- package/src/components/layouts/index.tsx +6 -0
- package/src/components/layouts.ts +1 -0
- package/src/components/liveUpdateTextField/LiveUpdateTextField.tsx +132 -0
- package/src/components/liveUpdateTextField/index.ts +1 -0
- package/src/components/liveUpdateTextField.ts +1 -0
- package/src/components/navBar/NavBar.tsx +59 -0
- package/src/components/navBar/index.ts +1 -0
- package/src/components/navBar.ts +1 -0
- package/src/components/note/Note.tsx +21 -0
- package/src/components/note/index.ts +1 -0
- package/src/components/note.ts +1 -0
- package/src/components/numberStepper/NumberStepper.stories.tsx +21 -0
- package/src/components/numberStepper/NumberStepper.tsx +74 -0
- package/src/components/numberStepper/index.ts +1 -0
- package/src/components/numberStepper.ts +1 -0
- package/src/components/particles/ParticleContext.tsx +11 -0
- package/src/components/particles/ParticleLayer.stories.tsx +46 -0
- package/src/components/particles/ParticleLayer.tsx +28 -0
- package/src/components/particles/index.ts +7 -0
- package/src/components/particles/particlesState.ts +502 -0
- package/src/components/particles.ts +1 -0
- package/src/components/peek/Peek.tsx +74 -0
- package/src/components/peek/index.ts +1 -0
- package/src/components/peek.ts +1 -0
- package/src/components/popover/Popover.tsx +84 -0
- package/src/components/popover/index.ts +1 -0
- package/src/components/popover.ts +1 -0
- package/src/components/relativeTime/RelativeTime.tsx +43 -0
- package/src/components/relativeTime/index.ts +1 -0
- package/src/components/relativeTime.ts +1 -0
- package/src/components/richEditor/EditorContent.tsx +4 -0
- package/src/components/richEditor/RichEditor.tsx +38 -0
- package/src/components/richEditor/index.ts +1 -0
- package/src/components/richEditor.ts +1 -0
- package/src/components/select/Select.tsx +247 -0
- package/src/components/select/index.ts +1 -0
- package/src/components/select.ts +1 -0
- package/src/components/skeletons/skeletons.tsx +27 -0
- package/src/components/skeletons.ts +1 -0
- package/src/components/spinner/Spinner.tsx +59 -0
- package/src/components/spinner/index.ts +1 -0
- package/src/components/spinner.ts +1 -0
- package/src/components/switch/Switch.tsx +23 -0
- package/src/components/switch/index.ts +1 -0
- package/src/components/switch.ts +1 -0
- package/src/components/tabs/tabs.tsx +18 -0
- package/src/components/tabs.ts +1 -0
- package/src/components/textArea/TextArea.stories.tsx +21 -0
- package/src/components/textArea/TextArea.tsx +58 -0
- package/src/components/textArea/index.ts +1 -0
- package/src/components/textArea.ts +1 -0
- package/src/components/toggleGroup/toggleGroup.tsx +11 -0
- package/src/components/toggleGroup.ts +1 -0
- package/src/components/tooltip/Tooltip.tsx +56 -0
- package/src/components/tooltip/index.ts +1 -0
- package/src/components/tooltip.ts +1 -0
- package/src/components/typography/index.ts +1 -0
- package/src/components/typography/typography.tsx +18 -0
- package/src/components/typography.ts +1 -0
- package/src/hooks/index.ts +7 -0
- package/src/hooks/useMergedRef.ts +14 -0
- package/src/hooks/useOnUnmount.ts +20 -0
- package/src/hooks/useSize.ts +164 -0
- package/src/hooks/useStableCallback.ts +11 -0
- package/src/hooks/useToggle.tsx +9 -0
- package/src/hooks/useVisualViewportOffset.ts +35 -0
- package/src/hooks/withClassName.tsx +21 -0
- package/src/hooks.ts +1 -0
- package/src/uno.preset.ts +767 -0
|
@@ -0,0 +1,767 @@
|
|
|
1
|
+
import { PreflightContext, Preset, presetUno } from 'unocss';
|
|
2
|
+
import { entriesToCss, toArray } from '@unocss/core';
|
|
3
|
+
|
|
4
|
+
export default function presetAglio({
|
|
5
|
+
spacingIncrement = 0.25,
|
|
6
|
+
}: {
|
|
7
|
+
spacingIncrement?: number;
|
|
8
|
+
} = {}): Preset {
|
|
9
|
+
return {
|
|
10
|
+
name: 'atype',
|
|
11
|
+
enforce: 'post',
|
|
12
|
+
theme: {
|
|
13
|
+
colors: {
|
|
14
|
+
none: '',
|
|
15
|
+
black: 'var(--color-black)',
|
|
16
|
+
white: 'var(--color-white)',
|
|
17
|
+
wash: 'var(--color-wash)',
|
|
18
|
+
attentionLight: 'var(--color-attention-light)',
|
|
19
|
+
'attention-light': 'var(--color-attention-light)',
|
|
20
|
+
attention: 'var(--color-attention)',
|
|
21
|
+
attentionDark: 'var(--color-attention-dark)',
|
|
22
|
+
'attention-dark': 'var(--color-attention-dark)',
|
|
23
|
+
accent: 'var(--color-accent)',
|
|
24
|
+
accentWash: 'var(--color-accent-wash)',
|
|
25
|
+
'accent-wash': 'var(--color-accent-wash)',
|
|
26
|
+
accentLight: 'var(--color-accent-light)',
|
|
27
|
+
'accent-light': 'var(--color-accent-light)',
|
|
28
|
+
accentDark: 'var(--color-accent-dark)',
|
|
29
|
+
'accent-dark': 'var(--color-accent-dark)',
|
|
30
|
+
primary: 'var(--color-primary)',
|
|
31
|
+
primaryLight: 'var(--color-primary-light)',
|
|
32
|
+
'primary-light': 'var(--color-primary-light)',
|
|
33
|
+
primaryDark: 'var(--color-primary-dark)',
|
|
34
|
+
'primary-dark': 'var(--color-primary-dark)',
|
|
35
|
+
primaryWash: 'var(--color-primary-wash)',
|
|
36
|
+
'primary-wash': 'var(--color-primary-wash)',
|
|
37
|
+
gray: {
|
|
38
|
+
1: 'var(--color-gray-1)',
|
|
39
|
+
2: 'var(--color-gray-2)',
|
|
40
|
+
3: 'var(--color-gray-3)',
|
|
41
|
+
4: 'var(--color-gray-4)',
|
|
42
|
+
5: 'var(--color-gray-5)',
|
|
43
|
+
6: 'var(--color-gray-6)',
|
|
44
|
+
7: 'var(--color-gray-7)',
|
|
45
|
+
8: 'var(--color-gray-8)',
|
|
46
|
+
9: 'var(--color-gray-9)',
|
|
47
|
+
0: 'var(--color-gray-0)',
|
|
48
|
+
},
|
|
49
|
+
grayBlend: 'var(--color-gray-blend)',
|
|
50
|
+
'gray-blend': 'var(--color-gray-blend)',
|
|
51
|
+
grayDarkBlend: 'var(--color-gray-dark-blend)',
|
|
52
|
+
'gray-dark-blend': 'var(--color-gray-dark-blend)',
|
|
53
|
+
darkBlend: 'var(--color-dark-blend)',
|
|
54
|
+
'dark-blend': 'var(--color-dark-blend)',
|
|
55
|
+
lightBlend: 'var(--color-light-blend)',
|
|
56
|
+
'light-blend': 'var(--color-light-blend)',
|
|
57
|
+
overlay: 'var(--color-overlay)',
|
|
58
|
+
},
|
|
59
|
+
fontFamily: {
|
|
60
|
+
sans: '"Inter", sans-serif',
|
|
61
|
+
serif: '"Domine", serif',
|
|
62
|
+
title: '"Inter", sans-serif',
|
|
63
|
+
},
|
|
64
|
+
fontSize: {
|
|
65
|
+
xxs: ['0.625rem', '0.75rem'],
|
|
66
|
+
xs: ['0.75rem', '1rem'],
|
|
67
|
+
sm: ['1rem', '1.25rem'],
|
|
68
|
+
md: ['1.125rem', '1.5rem'],
|
|
69
|
+
lg: ['1.25rem', '1.75rem'],
|
|
70
|
+
xl: ['1.5rem', '2rem'],
|
|
71
|
+
'2xl': ['1.75rem', '2.25rem'],
|
|
72
|
+
'3xl': ['2rem', '2.5rem'],
|
|
73
|
+
'4xl': ['2.5rem', '3rem'],
|
|
74
|
+
'5xl': ['3rem', '3.5rem'],
|
|
75
|
+
'6xl': ['4rem', '4.5rem'],
|
|
76
|
+
'7xl': ['5rem', '5.5rem'],
|
|
77
|
+
'8xl': ['6rem', '6.5rem'],
|
|
78
|
+
'9xl': ['7rem', '7.5rem'],
|
|
79
|
+
},
|
|
80
|
+
spacing: makeSpacing(spacingIncrement),
|
|
81
|
+
borderRadius: {
|
|
82
|
+
sm: '0.25rem',
|
|
83
|
+
md: '0.5rem',
|
|
84
|
+
lg: '0.75rem',
|
|
85
|
+
xl: '1rem',
|
|
86
|
+
},
|
|
87
|
+
width: {
|
|
88
|
+
content: '700px',
|
|
89
|
+
full: '100%',
|
|
90
|
+
'min-content': 'min-content',
|
|
91
|
+
'max-content': 'max-content',
|
|
92
|
+
},
|
|
93
|
+
height: {
|
|
94
|
+
'min-content': 'min-content',
|
|
95
|
+
'max-content': 'max-content',
|
|
96
|
+
},
|
|
97
|
+
boxShadow: {
|
|
98
|
+
sm: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',
|
|
99
|
+
md: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)',
|
|
100
|
+
lg: '0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)',
|
|
101
|
+
xl: '0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)',
|
|
102
|
+
|
|
103
|
+
// focus outlines
|
|
104
|
+
focus: `0 0 0 3px var(--color-primary-light)`,
|
|
105
|
+
},
|
|
106
|
+
easing: {
|
|
107
|
+
springy: 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
108
|
+
default: 'ease',
|
|
109
|
+
linear: 'linear',
|
|
110
|
+
},
|
|
111
|
+
animation: {
|
|
112
|
+
keyframes: {
|
|
113
|
+
'progress-bar': `{0% { width: 0% } 100% { width: 100% }}`,
|
|
114
|
+
'pop-up': `{from { opacity: 0; transform: translateY(30px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); }}`,
|
|
115
|
+
// TODO: move this out to app
|
|
116
|
+
'item-disappear': `{
|
|
117
|
+
0% {opacity:1;transform:translateY(0);height:var(--height);}
|
|
118
|
+
25% {opacity:1;transform:translateY(0);height:var(--height);}
|
|
119
|
+
100% {opacity:0;transform:translateY(30px);height:0;margin-top:0;}
|
|
120
|
+
}`,
|
|
121
|
+
'expand-scale-x': `{
|
|
122
|
+
from { transform: scaleX(0) }
|
|
123
|
+
to { transform: scaleX(1) }
|
|
124
|
+
}`,
|
|
125
|
+
pop: `{
|
|
126
|
+
0% {
|
|
127
|
+
transform: translate(-50%, -50%) scale(0);
|
|
128
|
+
opacity: 1;
|
|
129
|
+
}
|
|
130
|
+
25% {
|
|
131
|
+
transform: translate(-50%, -50%) scale(1);
|
|
132
|
+
opacity: 1;
|
|
133
|
+
}
|
|
134
|
+
100% {
|
|
135
|
+
transform: translate(-50%, -50%) scale(1);
|
|
136
|
+
opacity: 0;
|
|
137
|
+
}
|
|
138
|
+
}`,
|
|
139
|
+
'scan-line': `{
|
|
140
|
+
0% { top: 0% }
|
|
141
|
+
30% { top: 100% }
|
|
142
|
+
70% { top: 100% }
|
|
143
|
+
100% { top: 0% }
|
|
144
|
+
}`,
|
|
145
|
+
'pop-in-from-half': `{
|
|
146
|
+
0% { opacity: 0; transform: scale(0.5) }
|
|
147
|
+
100% { opacity: 1; transform: scale(1) }
|
|
148
|
+
}`,
|
|
149
|
+
'radix-collapsible-open-vertical': `{
|
|
150
|
+
from { height: 0 }
|
|
151
|
+
to { height: var(--radix-collapsible-content-height) }
|
|
152
|
+
}`,
|
|
153
|
+
'radix-collapsible-close-vertical': `{
|
|
154
|
+
from { height: var(--radix-collapsible-content-height) }
|
|
155
|
+
to { height: 0 }
|
|
156
|
+
}`,
|
|
157
|
+
'radix-collapsible-open-horizontal': `{
|
|
158
|
+
from { width: 0 }
|
|
159
|
+
to { width: var(--radix-collapsible-content-width) }
|
|
160
|
+
}`,
|
|
161
|
+
'radix-collapsible-close-horizontal': `{
|
|
162
|
+
from { width: var(--radix-collapsible-content-width) }
|
|
163
|
+
to { width: 0 }
|
|
164
|
+
}`,
|
|
165
|
+
'radix-collapsible-open-both': `{
|
|
166
|
+
from { width: 0; height: 0 }
|
|
167
|
+
to { width: var(--radix-collapsible-content-width); height: var(--radix-collapsible-content-height) }
|
|
168
|
+
}`,
|
|
169
|
+
'radix-collapsible-close-both': `{
|
|
170
|
+
from { width: var(--radix-collapsible-content-width); height: var(--radix-collapsible-content-height) }
|
|
171
|
+
to { width: 0; height: 0 }
|
|
172
|
+
}`,
|
|
173
|
+
'peek-close': `{
|
|
174
|
+
from { height: calc(var(--collapsible-height) + 80px); max-height: none; }
|
|
175
|
+
to { height: min(var(--peek-height, 120px), var(--collapsible-height)); max-height: var(--peek-height, 120px); }
|
|
176
|
+
}`,
|
|
177
|
+
'peek-open': `{
|
|
178
|
+
from { height: min(var(--peek-height, 120px), var(--collapsible-height)); }
|
|
179
|
+
to { height: calc(var(--collapsible-height) + 80px); }
|
|
180
|
+
}`,
|
|
181
|
+
skeleton: `{
|
|
182
|
+
from { background-position: 0% 50%; }
|
|
183
|
+
to { background-position: 100% 50%; }
|
|
184
|
+
}`,
|
|
185
|
+
'spinner-stroke': `{
|
|
186
|
+
0% { stroke-dasharray: 1, 200; stroke-dashoffset: 0; }
|
|
187
|
+
50% { stroke-dasharray: 100, 200; stroke-dashoffset: -15; }
|
|
188
|
+
100% { stroke-dasharray: 100, 200; stroke-dashoffset: -125; }
|
|
189
|
+
}`,
|
|
190
|
+
'fade-and-pop': `{
|
|
191
|
+
0% { opacity: 0.2; transform: scale(0.6); }
|
|
192
|
+
40% { opacity: 0.5; transform: scale(0.7); }
|
|
193
|
+
50% { opacity: 1; transform: scale(1.1) rotate(2deg); }
|
|
194
|
+
55% { opacity: 1; transform: scale(1); }
|
|
195
|
+
70% { opacity: 1; transform: scale(1); }
|
|
196
|
+
100% { opacity: 0.2; transform: scale(0.6); }
|
|
197
|
+
}`,
|
|
198
|
+
'fade-in-down': `{
|
|
199
|
+
0% { opacity: 0; transform: translate3d(0, -100px, 0); }
|
|
200
|
+
100% { opacity: 1; transform: translate3d(0, 0, 0); }
|
|
201
|
+
}`,
|
|
202
|
+
'fade-in-left': `{
|
|
203
|
+
0% { opacity: 0; transform: translate3d(-100px, 0, 0); }
|
|
204
|
+
100% { opacity: 1; transform: translate3d(0, 0, 0); }
|
|
205
|
+
}`,
|
|
206
|
+
'fade-in-bottom': `{
|
|
207
|
+
0% { opacity: 0; transform: translate3d(0, 100px, 0); }
|
|
208
|
+
100% { opacity: 1; transform: translate3d(0, 0, 0); }
|
|
209
|
+
}`,
|
|
210
|
+
'fade-in-right': `{
|
|
211
|
+
0% { opacity: 0; transform: translate3d(100px, 0, 0); }
|
|
212
|
+
100% { opacity: 1; transform: translate3d(0, 0, 0); }
|
|
213
|
+
}`,
|
|
214
|
+
'fade-out-down': `{
|
|
215
|
+
0% { opacity: 1; transform: translate3d(0, 0, 0); }
|
|
216
|
+
100% { opacity: 0; transform: translate3d(0, -100px, 0); }
|
|
217
|
+
}`,
|
|
218
|
+
'fade-out-left': `{
|
|
219
|
+
0% { opacity: 1; transform: translate3d(0, 0, 0); }
|
|
220
|
+
100% { opacity: 0; transform: translate3d(-100px, 0, 0); }
|
|
221
|
+
}`,
|
|
222
|
+
'fade-out-bottom': `{
|
|
223
|
+
0% { opacity: 1; transform: translate3d(0, 0, 0); }
|
|
224
|
+
100% { opacity: 0; transform: translate3d(0, 100px, 0); }
|
|
225
|
+
}`,
|
|
226
|
+
'fade-out-right': `{
|
|
227
|
+
0% { opacity: 1; transform: translate3d(0, 0, 0); }
|
|
228
|
+
100% { opacity: 0; transform: translate3d(100px, 0, 0); }
|
|
229
|
+
}`,
|
|
230
|
+
'popover-in': `{
|
|
231
|
+
0% { opacity: 0; transform: scale(0.95); }
|
|
232
|
+
100% { opacity: 1; transform: scale(1); }
|
|
233
|
+
}`,
|
|
234
|
+
'popover-out': `{
|
|
235
|
+
0% { opacity: 1; transform: scale(1); }
|
|
236
|
+
100% { opacity: 0; transform: scale(0.95); }
|
|
237
|
+
}`,
|
|
238
|
+
'dialog-in': `{
|
|
239
|
+
0% { opacity: 0; transform: translateY(20px) translate(-50%, -50%); }
|
|
240
|
+
100% { opacity: 1; transform: translateY(0) translate(-50%, -50%); }
|
|
241
|
+
}`,
|
|
242
|
+
'dialog-out': `{
|
|
243
|
+
0% { opacity: 1; transform: translateY(0) translate(-50%, -50%); }
|
|
244
|
+
100% { opacity: 0; transform: translateY(20px) translate(-50%, -50%); }
|
|
245
|
+
}`,
|
|
246
|
+
},
|
|
247
|
+
timingFns: {
|
|
248
|
+
linear: 'linear',
|
|
249
|
+
springy: 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
250
|
+
'ease-out': 'ease-out',
|
|
251
|
+
'fade-in-up': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
252
|
+
'fade-in-down': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
253
|
+
'fade-in-left': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
254
|
+
'fade-in-right': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
255
|
+
'fade-out-up': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
256
|
+
'fade-out-down': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
257
|
+
'fade-out-left': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
258
|
+
'fade-out-right': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
259
|
+
'fade-in-up-big': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
260
|
+
'fade-in-down-big': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
261
|
+
'fade-in-left-big': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
262
|
+
'fade-in-right-big': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
263
|
+
'fade-in': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
264
|
+
'fade-out': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
265
|
+
'scan-line': 'linear',
|
|
266
|
+
'radix-collapsible-open-vertical':
|
|
267
|
+
'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
268
|
+
'radix-collapsible-close-vertical':
|
|
269
|
+
'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
270
|
+
'radix-collapsible-open-horizontal':
|
|
271
|
+
'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
272
|
+
'radix-collapsible-close-horizontal':
|
|
273
|
+
'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
274
|
+
'radix-collapsible-open-both': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
275
|
+
'radix-collapsible-close-both': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
276
|
+
'item-disappear': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
277
|
+
'dialog-in': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
278
|
+
'dialog-out': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
279
|
+
},
|
|
280
|
+
durations: {
|
|
281
|
+
'fade-in-up': '200ms',
|
|
282
|
+
'fade-in-down': '200ms',
|
|
283
|
+
'fade-in-left': '200ms',
|
|
284
|
+
'fade-in-right': '200ms',
|
|
285
|
+
'fade-out-up': '200ms',
|
|
286
|
+
'fade-out-down': '200ms',
|
|
287
|
+
'fade-out-left': '200ms',
|
|
288
|
+
'fade-out-right': '200ms',
|
|
289
|
+
'fade-in-up-big': '300ms',
|
|
290
|
+
'fade-in-down-big': '300ms',
|
|
291
|
+
'fade-out-down-big': '300ms',
|
|
292
|
+
'fade-in-left-big': '300ms',
|
|
293
|
+
'fade-in-right-big': '300ms',
|
|
294
|
+
'fade-in': '200ms',
|
|
295
|
+
'fade-out': '200ms',
|
|
296
|
+
'scan-line': '1.5s',
|
|
297
|
+
'radix-collapsible-open-vertical': '200ms',
|
|
298
|
+
'radix-collapsible-close-vertical': '200ms',
|
|
299
|
+
'radix-collapsible-open-horizontal': '200ms',
|
|
300
|
+
'radix-collapsible-close-horizontal': '200ms',
|
|
301
|
+
'radix-collapsible-open-both': '200ms',
|
|
302
|
+
'radix-collapsible-close-both': '200ms',
|
|
303
|
+
'item-disappear': '300ms',
|
|
304
|
+
'popover-in': '100ms',
|
|
305
|
+
'popover-out': '100ms',
|
|
306
|
+
'dialog-in': '200ms',
|
|
307
|
+
'dialog-out': '200ms',
|
|
308
|
+
},
|
|
309
|
+
},
|
|
310
|
+
},
|
|
311
|
+
|
|
312
|
+
rules: [
|
|
313
|
+
[
|
|
314
|
+
/^gutter-bottom$/,
|
|
315
|
+
(_, { theme }) => ({ 'margin-bottom': (theme as any).spacing[2] }),
|
|
316
|
+
],
|
|
317
|
+
],
|
|
318
|
+
|
|
319
|
+
variants: [
|
|
320
|
+
/** Selects &+&, good for top borders */
|
|
321
|
+
(matcher) => {
|
|
322
|
+
if (!matcher.startsWith('repeated:')) return matcher;
|
|
323
|
+
return {
|
|
324
|
+
matcher: matcher.slice('repeated:'.length),
|
|
325
|
+
selector: (s) => `${s} + ${s}`,
|
|
326
|
+
};
|
|
327
|
+
},
|
|
328
|
+
],
|
|
329
|
+
|
|
330
|
+
shortcuts: {
|
|
331
|
+
'border-default': 'border border-solid border-black',
|
|
332
|
+
'border-light': 'border border-solid border-gray5',
|
|
333
|
+
'flex-1-0-0': 'flex-grow-1 flex-shrink-0 flex-basis-0',
|
|
334
|
+
'flex-0-0-auto': 'flex-grow-0 flex-shrink-0 flex-basis-auto',
|
|
335
|
+
'hidden-input':
|
|
336
|
+
'op-0 absolute z--1 pointer-events-none [&::webkit-file-upload-button]:display-none',
|
|
337
|
+
center: 'left-50% top-50%',
|
|
338
|
+
'z-nav': 'z-[var(--z-nav)]',
|
|
339
|
+
'z-menu': 'z-[var(--z-menu)]',
|
|
340
|
+
'z-dialog': 'z-[var(--z-dialog)]',
|
|
341
|
+
'z-dialog-backdrop': 'z-[var(--z-dialogBackdrop)]',
|
|
342
|
+
'z-tooltip': 'z-[var(--z-tooltip)]',
|
|
343
|
+
'z-overdraw': 'z-[var(--z-overdraw)]',
|
|
344
|
+
'z-now-playing': 'z-[var(--z-nowPlaying)]',
|
|
345
|
+
'outline-off': '[outline:none]',
|
|
346
|
+
'bg-wash': 'bg-[var(--color-wash)]',
|
|
347
|
+
unset: '[all:unset]',
|
|
348
|
+
},
|
|
349
|
+
|
|
350
|
+
preflights: [
|
|
351
|
+
{
|
|
352
|
+
layer: 'preflights',
|
|
353
|
+
getCSS: (ctx: PreflightContext<any>) => {
|
|
354
|
+
if (ctx.theme.preflightBase) {
|
|
355
|
+
const css = entriesToCss(Object.entries(ctx.theme.preflightBase));
|
|
356
|
+
const roots = toArray(
|
|
357
|
+
ctx.theme.preflightRoot ?? ['*,::before,::after', '::backdrop'],
|
|
358
|
+
);
|
|
359
|
+
return roots
|
|
360
|
+
.map((root) => `@layer preflightBase{${root}{${css}}}`)
|
|
361
|
+
.join('');
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
} as any,
|
|
365
|
+
{
|
|
366
|
+
getCSS: (ctx) => `
|
|
367
|
+
@layer preflightBase, components, variants, utilities;
|
|
368
|
+
|
|
369
|
+
:root {
|
|
370
|
+
--palette-red-90: #ffede7;
|
|
371
|
+
--palette-red-80: #ffdbcf;
|
|
372
|
+
--palette-red-70: #ffb59b;
|
|
373
|
+
--palette-red-60: #ff8c60;
|
|
374
|
+
--palette-red-50: #e66d3d;
|
|
375
|
+
--palette-red-40: #c55427;
|
|
376
|
+
--palette-red-30: #a43d0f;
|
|
377
|
+
--palette-red-20: #943102;
|
|
378
|
+
--palette-red-10: #812900;
|
|
379
|
+
--palette-red-00: #380d00;
|
|
380
|
+
--palette-green-90: #e9fff1;
|
|
381
|
+
--palette-green-80: #c2ffe1;
|
|
382
|
+
--palette-green-70: #8ff8c4;
|
|
383
|
+
--palette-green-60: #73dba0;
|
|
384
|
+
--palette-green-50: #56bf80;
|
|
385
|
+
--palette-green-40: #38a368;
|
|
386
|
+
--palette-green-30: #0f8850;
|
|
387
|
+
--palette-green-20: #006d3e;
|
|
388
|
+
--palette-green-10: #005f35;
|
|
389
|
+
--palette-green-00: #00391d;
|
|
390
|
+
--palette-yellow-90: #fff9ef;
|
|
391
|
+
--palette-yellow-80: #fff1c7;
|
|
392
|
+
--palette-yellow-70: #ffe17c;
|
|
393
|
+
--palette-yellow-60: #f7d352;
|
|
394
|
+
--palette-yellow-50: #c9a829;
|
|
395
|
+
--palette-yellow-40: #ac8e04;
|
|
396
|
+
--palette-yellow-30: #8e7500;
|
|
397
|
+
--palette-yellow-20: #715c00;
|
|
398
|
+
--palette-yellow-10: #635100;
|
|
399
|
+
--palette-yellow-00: #3b2f00;
|
|
400
|
+
--palette-blue-90: #e3f3ff;
|
|
401
|
+
--palette-blue-80: #c4e7ff;
|
|
402
|
+
--palette-blue-70: #7bd0ff;
|
|
403
|
+
--palette-blue-60: #2db7f2;
|
|
404
|
+
--palette-blue-50: #009bd1;
|
|
405
|
+
--palette-blue-40: #0080ad;
|
|
406
|
+
--palette-blue-30: #00668a;
|
|
407
|
+
--palette-blue-20: #005979;
|
|
408
|
+
--palette-blue-10: #004c69;
|
|
409
|
+
--palette-blue-00: #00354a;
|
|
410
|
+
--palette-purple-90: #f1efff;
|
|
411
|
+
--palette-purple-80: #e0e0ff;
|
|
412
|
+
--palette-purple-70: #bdc2ff;
|
|
413
|
+
--palette-purple-60: #9ba4ff;
|
|
414
|
+
--palette-purple-50: #7c87f3;
|
|
415
|
+
--palette-purple-40: #626dd7;
|
|
416
|
+
--palette-purple-30: #4953bc;
|
|
417
|
+
--palette-purple-20: #3c47af;
|
|
418
|
+
--palette-purple-10: #2f3aa3;
|
|
419
|
+
--palette-purple-00: #000767;
|
|
420
|
+
--palette-dark-blend-warm: rgba(10, 0, 0, 0.75);
|
|
421
|
+
--palette-dark-blend-cool: rgba(0, 10, 0, 0.75);
|
|
422
|
+
--palette-light-blend-warm: rgba(255, 250, 250, 0.5);
|
|
423
|
+
--palette-light-blend-cool: rgba(250, 255, 255, 0.5);
|
|
424
|
+
--palette-light-blend: rgba(255, 250, 250, 0.5);
|
|
425
|
+
--palette-overlay: rgba(0, 0, 0, 0.025);
|
|
426
|
+
--palette-black: #303030;
|
|
427
|
+
--palette-white: #fff;
|
|
428
|
+
--palette-light: #fdfdff;
|
|
429
|
+
--palette-dark: #080808;
|
|
430
|
+
--palette-gray-1: #fafafa;
|
|
431
|
+
--palette-gray-2: #f5f5f5;
|
|
432
|
+
--palette-gray-3: #eeeef0;
|
|
433
|
+
--palette-gray-4: #e0e0e3;
|
|
434
|
+
--palette-gray-5: #bdbdbf;
|
|
435
|
+
--palette-gray-6: #939ea0;
|
|
436
|
+
--palette-gray-7: #6f7a7c;
|
|
437
|
+
--palette-gray-8: #4d5658;
|
|
438
|
+
--palette-gray-9: #3c3c3c;
|
|
439
|
+
--palette-gray-0: #2b2b2b;
|
|
440
|
+
--palette-gray-ex-1: #232323;
|
|
441
|
+
--palette-gray-ex-2: #1b1b1b;
|
|
442
|
+
--palette-gray-blend: rgba(0, 0, 20, 0.025);
|
|
443
|
+
--palette-gray-dark-blend: rgba(0, 0, 20, 0.05);
|
|
444
|
+
--palette-light-gray-blend: rgba(255, 255, 255, 0.05);
|
|
445
|
+
--palette-light-gray-dark-blend: rgba(255, 255, 255, 0.1);
|
|
446
|
+
|
|
447
|
+
--z-nowPlaying: 40;
|
|
448
|
+
--z-nav: 50;
|
|
449
|
+
--z-menu: 100;
|
|
450
|
+
--z-menuTrigger: 101;
|
|
451
|
+
--z-dialog: 1000;
|
|
452
|
+
--z-dialogBackdrop: 900;
|
|
453
|
+
--z-tooltip: 10000;
|
|
454
|
+
--z-overdraw: 100000;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
/* LIGHT THEME */
|
|
458
|
+
html {
|
|
459
|
+
${lightColors}
|
|
460
|
+
--color-dark-blend-warm: var(--palette-dark-blend-warm);
|
|
461
|
+
--color-dark-blend-cool: var(--palette-dark-blend-cool);
|
|
462
|
+
--color-light-blend-warm: var(--palette-light-blend-warm);
|
|
463
|
+
--color-light-blend-cool: var(--palette-light-blend-cool);
|
|
464
|
+
--color-light-blend: var(--palette-light-blend);
|
|
465
|
+
--color-overlay: var(--palette-overlay);
|
|
466
|
+
--color-black: var(--palette-black);
|
|
467
|
+
--color-white: var(--palette-white);
|
|
468
|
+
--color-wash: var(--palette-light);
|
|
469
|
+
--color-gray-1: var(--palette-gray-1);
|
|
470
|
+
--color-gray-2: var(--palette-gray-2);
|
|
471
|
+
--color-gray-3: var(--palette-gray-3);
|
|
472
|
+
--color-gray-4: var(--palette-gray-4);
|
|
473
|
+
--color-gray-5: var(--palette-gray-5);
|
|
474
|
+
--color-gray-6: var(--palette-gray-6);
|
|
475
|
+
--color-gray-7: var(--palette-gray-7);
|
|
476
|
+
--color-gray-8: var(--palette-gray-8);
|
|
477
|
+
--color-gray-9: var(--palette-gray-9);
|
|
478
|
+
--color-gray-0: var(--palette-gray-0);
|
|
479
|
+
--color-gray-blend: var(--palette-gray-blend);
|
|
480
|
+
--color-gray-dark-blend: var(--palette-gray-dark-blend);
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
/* DEFAULT THEME (LEMON) */
|
|
484
|
+
--color-attention-light: var(--color-red-light);
|
|
485
|
+
--color-attention: var(--color-red);
|
|
486
|
+
--color-attention-dark: var(--color-red-dark);
|
|
487
|
+
--color-accent: var(--color-green);
|
|
488
|
+
--color-accent-wash: var(--color-green-wash);
|
|
489
|
+
--color-accent-light: var(--color-green-light);
|
|
490
|
+
--color-accent-dark: var(--color-green-dark);
|
|
491
|
+
--color-primary: var(--color-yellow);
|
|
492
|
+
--color-primary-light: var(--color-yellow-light);
|
|
493
|
+
--color-primary-dark: var(--color-yellow-dark);
|
|
494
|
+
--color-primary-wash: var(--color-yellow-wash);
|
|
495
|
+
--color-light-blend: var(--color-light-blend-warm);
|
|
496
|
+
--color-dark-blend: var(--color-dark-blend-warm);
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
/* INTRINSIC DARK THEME */
|
|
500
|
+
@media(prefers-color-scheme: dark) {
|
|
501
|
+
html {
|
|
502
|
+
${darkColors}
|
|
503
|
+
--color-dark-blend-warm: var(--palette-light-blend-warm);
|
|
504
|
+
--color-dark-blend-cool: var(--palette-light-blend-cool);
|
|
505
|
+
--color-light-blend-warm: var(--palette-dark-blend-warm);
|
|
506
|
+
--color-light-blend-cool: var(--palette-dark-blend-cool);
|
|
507
|
+
--color-light-blend: var(--palette-light-blend);
|
|
508
|
+
--color-overlay: var(--palette-overlay);
|
|
509
|
+
--color-black: var(--palette-white);
|
|
510
|
+
--color-white: var(--palette-black);
|
|
511
|
+
--color-wash: var(--palette-dark);
|
|
512
|
+
--color-gray-1: var(--palette-gray-ex-2);
|
|
513
|
+
--color-gray-2: var(--palette-gray-ex-1);
|
|
514
|
+
--color-gray-3: var(--palette-gray-0);
|
|
515
|
+
--color-gray-4: var(--palette-gray-9);
|
|
516
|
+
--color-gray-5: var(--palette-gray-8);
|
|
517
|
+
--color-gray-6: var(--palette-gray-7);
|
|
518
|
+
--color-gray-7: var(--palette-gray-6);
|
|
519
|
+
--color-gray-8: var(--palette-gray-5);
|
|
520
|
+
--color-gray-9: var(--palette-gray-4);
|
|
521
|
+
--color-gray-0: var(--palette-gray-3);
|
|
522
|
+
--color-gray-blend: var(--palette-light-gray-blend);
|
|
523
|
+
--color-gray-dark-blend: var(--palette-gray-dark-blend);
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
/** SYSTEM OVERRIDES **/
|
|
528
|
+
@media(prefers-color-scheme: dark) {
|
|
529
|
+
html.override-light {
|
|
530
|
+
${lightColors}
|
|
531
|
+
--color-dark-blend-warm: var(--palette-dark-blend-warm);
|
|
532
|
+
--color-dark-blend-cool: var(--palette-dark-blend-cool);
|
|
533
|
+
--color-light-blend-warm: var(--palette-light-blend-warm);
|
|
534
|
+
--color-light-blend-cool: var(--palette-light-blend-cool);
|
|
535
|
+
--color-light-blend: var(--palette-light-blend);
|
|
536
|
+
--color-overlay: var(--palette-overlay);
|
|
537
|
+
--color-black: var(--palette-black);
|
|
538
|
+
--color-white: var(--palette-white);
|
|
539
|
+
--color-wash: var(--palette-light);
|
|
540
|
+
--color-gray-1: var(--palette-gray-1);
|
|
541
|
+
--color-gray-2: var(--palette-gray-2);
|
|
542
|
+
--color-gray-3: var(--palette-gray-3);
|
|
543
|
+
--color-gray-4: var(--palette-gray-4);
|
|
544
|
+
--color-gray-5: var(--palette-gray-5);
|
|
545
|
+
--color-gray-6: var(--palette-gray-6);
|
|
546
|
+
--color-gray-7: var(--palette-gray-7);
|
|
547
|
+
--color-gray-8: var(--palette-gray-8);
|
|
548
|
+
--color-gray-9: var(--palette-gray-9);
|
|
549
|
+
--color-gray-0: var(--palette-gray-0);
|
|
550
|
+
--color-gray-blend: var(--palette-gray-blend);
|
|
551
|
+
--color-gray-dark-blend: var(--palette-gray-dark-blend);
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
@media(prefers-color-scheme: light) {
|
|
556
|
+
html.override-dark {
|
|
557
|
+
${darkColors}
|
|
558
|
+
--color-dark-blend-warm: var(--palette-light-blend-warm);
|
|
559
|
+
--color-dark-blend-cool: var(--palette-light-blend-cool);
|
|
560
|
+
--color-light-blend-warm: var(--palette-dark-blend-warm);
|
|
561
|
+
--color-light-blend-cool: var(--palette-dark-blend-cool);
|
|
562
|
+
--color-light-blend: var(--palette-light-blend);
|
|
563
|
+
--color-overlay: var(--palette-overlay);
|
|
564
|
+
--color-black: var(--palette-white);
|
|
565
|
+
--color-white: var(--palette-black);
|
|
566
|
+
--color-wash: var(--palette-dark);
|
|
567
|
+
--color-gray-1: var(--palette-gray-ex-2);
|
|
568
|
+
--color-gray-2: var(--palette-gray-ex-1);
|
|
569
|
+
--color-gray-3: var(--palette-gray-0);
|
|
570
|
+
--color-gray-4: var(--palette-gray-9);
|
|
571
|
+
--color-gray-5: var(--palette-gray-8);
|
|
572
|
+
--color-gray-6: var(--palette-gray-7);
|
|
573
|
+
--color-gray-7: var(--palette-gray-6);
|
|
574
|
+
--color-gray-8: var(--palette-gray-5);
|
|
575
|
+
--color-gray-9: var(--palette-gray-4);
|
|
576
|
+
--color-gray-0: var(--palette-gray-3);
|
|
577
|
+
--color-gray-blend: var(--palette-light-gray-blend);
|
|
578
|
+
--color-gray-dark-blend: var(--palette-gray-dark-blend);
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
.theme-lemon {
|
|
583
|
+
--color-attention-light: var(--color-red-light);
|
|
584
|
+
--color-attention: var(--color-red);
|
|
585
|
+
--color-attention-dark: var(--color-red-dark);
|
|
586
|
+
--color-accent: var(--color-green);
|
|
587
|
+
--color-accent-wash: var(--color-green-wash);
|
|
588
|
+
--color-accent-light: var(--color-green-light);
|
|
589
|
+
--color-accent-dark: var(--color-green-dark);
|
|
590
|
+
--color-primary: var(--color-yellow);
|
|
591
|
+
--color-primary-light: var(--color-yellow-light);
|
|
592
|
+
--color-primary-dark: var(--color-yellow-dark);
|
|
593
|
+
--color-primary-wash: var(--color-yellow-wash);
|
|
594
|
+
--color-light-blend: var(--color-light-blend-warm);
|
|
595
|
+
--color-dark-blend: var(--color-dark-blend-warm);
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
.theme-blueberry {
|
|
599
|
+
--color-attention-light: var(--color-red-light);
|
|
600
|
+
--color-attention: var(--color-red);
|
|
601
|
+
--color-attention-dark: var(--color-red-dark);
|
|
602
|
+
--color-accent: var(--color-green);
|
|
603
|
+
--color-accent-wash: var(--color-green-wash);
|
|
604
|
+
--color-accent-light: var(--color-green-light);
|
|
605
|
+
--color-accent-dark: var(--color-green-dark);
|
|
606
|
+
--color-primary: var(--color-blue);
|
|
607
|
+
--color-primary-light: var(--color-blue-light);
|
|
608
|
+
--color-primary-dark: var(--color-blue-dark);
|
|
609
|
+
--color-primary-wash: var(--color-blue-wash);
|
|
610
|
+
--color-light-blend: var(--color-light-blend-cool);
|
|
611
|
+
--color-dark-blend: var(--color-dark-blend-cool);
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
.theme-eggplant {
|
|
615
|
+
--color-attention-light: var(--color-red-light);
|
|
616
|
+
--color-attention: var(--color-red);
|
|
617
|
+
--color-attention-dark: var(--color-red-dark);
|
|
618
|
+
--color-accent: var(--color-green);
|
|
619
|
+
--color-accent-wash: var(--color-green-wash);
|
|
620
|
+
--color-accent-light: var(--color-green-light);
|
|
621
|
+
--color-accent-dark: var(--color-green-dark);
|
|
622
|
+
--color-primary: var(--color-purple);
|
|
623
|
+
--color-primary-light: var(--color-purple-light);
|
|
624
|
+
--color-primary-dark: var(--color-purple-dark);
|
|
625
|
+
--color-primary-wash: var(--color-purple-wash);
|
|
626
|
+
--color-light-blend: var(--color-light-blend-warm);
|
|
627
|
+
--color-dark-blend: var(--color-dark-blend-warm);
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
.theme-leek {
|
|
631
|
+
--color-attention-light: var(--color-red-light);
|
|
632
|
+
--color-attention: var(--color-red);
|
|
633
|
+
--color-attention-dark: var(--color-red-dark);
|
|
634
|
+
--color-accent: var(--color-yellow);
|
|
635
|
+
--color-accent-wash: var(--color-yellow-wash);
|
|
636
|
+
--color-accent-light: var(--color-yellow-light);
|
|
637
|
+
--color-accent-dark: var(--color-yellow-dark);
|
|
638
|
+
--color-primary: var(--color-green);
|
|
639
|
+
--color-primary-light: var(--color-green-light);
|
|
640
|
+
--color-primary-dark: var(--color-green-dark);
|
|
641
|
+
--color-primary-wash: var(--color-green-wash);
|
|
642
|
+
--color-light-blend: var(--color-light-blend-warm);
|
|
643
|
+
--color-dark-blend: var(--color-dark-blend-warm);
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
.theme-tomato {
|
|
647
|
+
--color-attention-light: var(--color-blue-light);
|
|
648
|
+
--color-attention: var(--color-blue);
|
|
649
|
+
--color-attention-dark: var(--color-blue-dark);
|
|
650
|
+
--color-accent: var(--color-green);
|
|
651
|
+
--color-accent-wash: var(--color-green-wash);
|
|
652
|
+
--color-accent-light: var(--color-green-light);
|
|
653
|
+
--color-accent-dark: var(--color-green-dark);
|
|
654
|
+
--color-primary: var(--color-red);
|
|
655
|
+
--color-primary-light: var(--color-red-light);
|
|
656
|
+
--color-primary-dark: var(--color-red-dark);
|
|
657
|
+
--color-primary-wash: var(--color-red-wash);
|
|
658
|
+
--color-light-blend: var(--color-light-blend-warm);
|
|
659
|
+
--color-dark-blend: var(--color-dark-blend-warm);
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
html, body {
|
|
663
|
+
margin: 0;
|
|
664
|
+
padding: 0;
|
|
665
|
+
font-family: "Inter", sans-serif;
|
|
666
|
+
font-size: 16px;
|
|
667
|
+
height: 100%;
|
|
668
|
+
--webkit-font-smoothing: antialiased;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
body {
|
|
672
|
+
height: 100%;
|
|
673
|
+
background-color: var(--color-wash);
|
|
674
|
+
color: var(--color-black);
|
|
675
|
+
overflow: overlay;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
a {
|
|
679
|
+
color: inherit;
|
|
680
|
+
text-decoration: none;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
* {
|
|
684
|
+
box-sizing: border-box;
|
|
685
|
+
-webkit-tap-highlight-color: transparent;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
@font-face {
|
|
689
|
+
font-family: "Inter";
|
|
690
|
+
src: url("/fonts/Inter-VariableFont_slnt,wght.ttf") format("truetype-variations");
|
|
691
|
+
font-weight: 1 999;
|
|
692
|
+
font-style: oblique 0deg 5deg;
|
|
693
|
+
font-display: block;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
@font-face {
|
|
697
|
+
font-family: "Londrina Outline";
|
|
698
|
+
src: url("/fonts/LondrinaOutline-Regular.ttf") format("truetype");
|
|
699
|
+
font-display: block;
|
|
700
|
+
font-style: normal;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
@media (display-mode: standalone) {
|
|
704
|
+
html, body {
|
|
705
|
+
overscroll-behavior: none;
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
`,
|
|
709
|
+
},
|
|
710
|
+
],
|
|
711
|
+
|
|
712
|
+
presets: [
|
|
713
|
+
presetUno({
|
|
714
|
+
preflight: false,
|
|
715
|
+
}),
|
|
716
|
+
],
|
|
717
|
+
};
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
const themeColors = ['red', 'green', 'yellow', 'blue', 'purple'];
|
|
721
|
+
function roundTens(num: number) {
|
|
722
|
+
return Math.round(num / 10) * 10;
|
|
723
|
+
}
|
|
724
|
+
function asPaletteValue(num: number) {
|
|
725
|
+
return roundTens(num).toString().padStart(2, '0');
|
|
726
|
+
}
|
|
727
|
+
function generateColors(from: number, to: number) {
|
|
728
|
+
const increment = (to - from) / 3;
|
|
729
|
+
const map = themeColors.reduce(
|
|
730
|
+
(acc, color) => {
|
|
731
|
+
acc[`--color-${color}-wash`] = `var(--palette-${color}-${asPaletteValue(
|
|
732
|
+
from,
|
|
733
|
+
)})`;
|
|
734
|
+
acc[`--color-${color}-light`] = `var(--palette-${color}-${asPaletteValue(
|
|
735
|
+
from + roundTens(increment),
|
|
736
|
+
)})`;
|
|
737
|
+
acc[`--color-${color}`] = `var(--palette-${color}-${asPaletteValue(
|
|
738
|
+
from + roundTens(increment * 2),
|
|
739
|
+
)})`;
|
|
740
|
+
acc[`--color-${color}-dark`] = `var(--palette-${color}-${asPaletteValue(
|
|
741
|
+
from + roundTens(increment * 3),
|
|
742
|
+
)})`;
|
|
743
|
+
return acc;
|
|
744
|
+
},
|
|
745
|
+
{} as Record<string, string>,
|
|
746
|
+
);
|
|
747
|
+
return Object.entries(map).reduce(
|
|
748
|
+
(str, [key, value]) => str + `${key}: ${value};\n`,
|
|
749
|
+
'',
|
|
750
|
+
);
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
const lightColors = generateColors(90, 40);
|
|
754
|
+
const darkColors = generateColors(0, 60);
|
|
755
|
+
|
|
756
|
+
function makeSpacing(increment: number) {
|
|
757
|
+
return new Array(20)
|
|
758
|
+
.fill(0)
|
|
759
|
+
.map((_, i) => `${(i * increment).toFixed(2)}rem`)
|
|
760
|
+
.reduce(
|
|
761
|
+
(acc, cur, i) => {
|
|
762
|
+
acc[i] = cur;
|
|
763
|
+
return acc;
|
|
764
|
+
},
|
|
765
|
+
{} as Record<string, string>,
|
|
766
|
+
);
|
|
767
|
+
}
|