@reactberry/system 2.0.0-beta
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/README.md +48 -0
- package/package.json +74 -0
- package/src/blocks/Accordion/index.tsx +158 -0
- package/src/blocks/AnimatedCarousel/index.tsx +188 -0
- package/src/blocks/AppleGlow/index.tsx +144 -0
- package/src/blocks/Avatar/index.tsx +167 -0
- package/src/blocks/Await/index.tsx +45 -0
- package/src/blocks/Cards/AnimatedCard/index.tsx +175 -0
- package/src/blocks/Cards/FluorescentCard/index.tsx +180 -0
- package/src/blocks/Cards/InfoCard/index.tsx +206 -0
- package/src/blocks/Cards/TickerCard/index.tsx +125 -0
- package/src/blocks/Carousel/index.tsx +216 -0
- package/src/blocks/Checkbox/index.tsx +101 -0
- package/src/blocks/Collection/index.tsx +59 -0
- package/src/blocks/Container/index.tsx +55 -0
- package/src/blocks/Controls/Control.tsx +67 -0
- package/src/blocks/Controls/index.tsx +11 -0
- package/src/blocks/CyclingNumber/index.tsx +78 -0
- package/src/blocks/DisplaySet/index.tsx +42 -0
- package/src/blocks/Divider/index.tsx +14 -0
- package/src/blocks/Draggable/index.tsx +266 -0
- package/src/blocks/Drawer/index.tsx +136 -0
- package/src/blocks/DynamicIsland/DynamicIsland.tsx +89 -0
- package/src/blocks/DynamicIsland/index.tsx +2 -0
- package/src/blocks/Fader/index.tsx +145 -0
- package/src/blocks/FamilyDrawer/README.md +116 -0
- package/src/blocks/FamilyDrawer/example.tsx +108 -0
- package/src/blocks/FamilyDrawer/index.tsx +119 -0
- package/src/blocks/FamilyDrawer/views/DefaultView.tsx +93 -0
- package/src/blocks/FamilyDrawer/views/KeyView.tsx +129 -0
- package/src/blocks/FamilyDrawer/views/PhraseView.tsx +129 -0
- package/src/blocks/FamilyDrawer/views/RemoveView.tsx +81 -0
- package/src/blocks/FieldSet/index.tsx +173 -0
- package/src/blocks/Filesystem/index.tsx +198 -0
- package/src/blocks/Gallery/Carousel/index.tsx +257 -0
- package/src/blocks/Gallery/Modal/index.tsx +83 -0
- package/src/blocks/Gallery/index.tsx +57 -0
- package/src/blocks/Gallery/utils/animationVariants.ts +18 -0
- package/src/blocks/Gallery/utils/aspectRatio.ts +14 -0
- package/src/blocks/Gallery/utils/downloadPhoto.ts +24 -0
- package/src/blocks/Gallery/utils/range.ts +11 -0
- package/src/blocks/GradientMesh/index.tsx +106 -0
- package/src/blocks/Group/index.tsx +152 -0
- package/src/blocks/Heading/index.tsx +111 -0
- package/src/blocks/HorizontalScroller/index.tsx +135 -0
- package/src/blocks/Icon/index.tsx +45 -0
- package/src/blocks/Indicator/index.tsx +27 -0
- package/src/blocks/InlineEditor/index.tsx +216 -0
- package/src/blocks/List/index.tsx +657 -0
- package/src/blocks/Main/index.tsx +17 -0
- package/src/blocks/Marquee/index.tsx +116 -0
- package/src/blocks/MaskedField/index.tsx +199 -0
- package/src/blocks/Menu/MenuContent.tsx +246 -0
- package/src/blocks/Menu/MenuContext.tsx +34 -0
- package/src/blocks/Menu/MenuItem.tsx +104 -0
- package/src/blocks/Menu/index.tsx +60 -0
- package/src/blocks/Modal/index.tsx +268 -0
- package/src/blocks/MorphingPopover/index.tsx +294 -0
- package/src/blocks/Overlay/Backdrop.tsx +48 -0
- package/src/blocks/Overlay/OverscrollGuard.tsx +36 -0
- package/src/blocks/Overlay/index.ts +2 -0
- package/src/blocks/Parallax/index.tsx +117 -0
- package/src/blocks/ParallaxSection/index.tsx +61 -0
- package/src/blocks/Placeholder/index.tsx +48 -0
- package/src/blocks/Popover/index.tsx +402 -0
- package/src/blocks/Progress/getProgressColor.ts +61 -0
- package/src/blocks/Progress/index.tsx +179 -0
- package/src/blocks/ProgressiveBlur/index.tsx +75 -0
- package/src/blocks/README.md +15 -0
- package/src/blocks/RenderAsset/index.tsx +18 -0
- package/src/blocks/ScrollContainer/index.tsx +93 -0
- package/src/blocks/ShinyText/index.tsx +72 -0
- package/src/blocks/Skeleton/index.tsx +71 -0
- package/src/blocks/Slider/SliderControls.tsx +119 -0
- package/src/blocks/Slider/index.tsx +140 -0
- package/src/blocks/Slider/useSlider.ts +126 -0
- package/src/blocks/Slideshow/index.tsx +177 -0
- package/src/blocks/Spotlight/index.tsx +144 -0
- package/src/blocks/Steps/StepIndicator.tsx +149 -0
- package/src/blocks/Steps/StepProgress.tsx +164 -0
- package/src/blocks/Steps/Steps.tsx +197 -0
- package/src/blocks/Steps/StepsNav.tsx +30 -0
- package/src/blocks/Steps/StepsTracker.tsx +80 -0
- package/src/blocks/Steps/hooks.ts +71 -0
- package/src/blocks/Steps/index.tsx +16 -0
- package/src/blocks/Steps/types.ts +71 -0
- package/src/blocks/StickySectionStack/index.tsx +136 -0
- package/src/blocks/Switch/index.tsx +85 -0
- package/src/blocks/SystemNotice/index.tsx +81 -0
- package/src/blocks/Table/README.md +251 -0
- package/src/blocks/Table/Table.tsx +207 -0
- package/src/blocks/Table/TablePagination.tsx +189 -0
- package/src/blocks/Table/index.ts +33 -0
- package/src/blocks/Table/useTableControls.ts +331 -0
- package/src/blocks/Tag/index.tsx +27 -0
- package/src/blocks/TextBreak/index.tsx +96 -0
- package/src/blocks/TextReveal/index.tsx +104 -0
- package/src/blocks/Thumbnail/index.tsx +26 -0
- package/src/blocks/Ticker/index.tsx +112 -0
- package/src/blocks/Toast/index.tsx +77 -0
- package/src/blocks/Tooltip/index.tsx +174 -0
- package/src/blocks/Underlay/index.tsx +104 -0
- package/src/blocks/Upload/Dropzone.tsx +92 -0
- package/src/blocks/Upload/UploadBtn.tsx +38 -0
- package/src/blocks/Upload/index.tsx +61 -0
- package/src/blocks/Upload/types.ts +37 -0
- package/src/blocks/VideoMarquee/index.tsx +511 -0
- package/src/blocks/index.ts +119 -0
- package/src/blocks/pagination/Pagination.tsx +148 -0
- package/src/blocks/pagination/PaginationList.tsx +41 -0
- package/src/blocks/pagination/index.ts +2 -0
- package/src/charts/BarChart.tsx +63 -0
- package/src/charts/PieChart.tsx +39 -0
- package/src/charts/index.ts +3 -0
- package/src/charts/utils.ts +103 -0
- package/src/docs/README.md +373 -0
- package/src/docs/reference/README.md +299 -0
- package/src/elements/box.ts +163 -0
- package/src/elements/button.ts +49 -0
- package/src/elements/field.ts +129 -0
- package/src/elements/index.ts +8 -0
- package/src/elements/text.ts +47 -0
- package/src/elements/utils.js +97 -0
- package/src/hooks/use-copy-to-clipboard.tsx +33 -0
- package/src/hooks/use-enter-submit.tsx +23 -0
- package/src/hooks/use-local-storage.ts +42 -0
- package/src/hooks/use-sidebar.tsx +109 -0
- package/src/hooks/useAnimatedText.ts +32 -0
- package/src/hooks/useAutosizeTextArea.ts +45 -0
- package/src/hooks/useBreakpoint.tsx +123 -0
- package/src/hooks/useClickOutside.tsx +38 -0
- package/src/hooks/useHover.tsx +33 -0
- package/src/hooks/useHoverList.tsx +17 -0
- package/src/hooks/useKeyboardShortcuts.ts +91 -0
- package/src/hooks/useKeypress.ts +27 -0
- package/src/hooks/useOverlay.ts +32 -0
- package/src/hooks/useReducedMotion.ts +25 -0
- package/src/hooks/useStandaloneMode.ts +35 -0
- package/src/hooks/useTouchDevice.ts +34 -0
- package/src/icons/index.tsx +129 -0
- package/src/index.ts +12 -0
- package/src/providers/DesignSystemProvider.tsx +35 -0
- package/src/providers/StyledComponentsRegistry.tsx +30 -0
- package/src/providers/index.ts +2 -0
- package/src/themes/README.md +30 -0
- package/src/themes/default/assets/badge-avatar.tsx +45 -0
- package/src/themes/default/assets/logo.tsx +42 -0
- package/src/themes/default/global.ts +138 -0
- package/src/themes/default/modes/dark/config.js +49 -0
- package/src/themes/default/modes/dark/skins.js +631 -0
- package/src/themes/default/modes/dark/theme.js +87 -0
- package/src/themes/default/modes/light/config.js +48 -0
- package/src/themes/default/modes/light/skins.js +1026 -0
- package/src/themes/default/modes/light/theme.js +74 -0
- package/src/themes/default/tokens/controls.js +53 -0
- package/src/themes/default/tokens/shadows.js +63 -0
- package/src/themes/default/tokens/shapes.js +37 -0
- package/src/themes/default/tokens/space.js +143 -0
- package/src/themes/default/tokens/spectre.js +16 -0
- package/src/themes/default/utils.js +523 -0
- package/src/themes/index.ts +11 -0
- package/src/types.ts +394 -0
- package/src/utils/overlayTheme.ts +61 -0
- package/src/utils/pickColor.ts +15 -0
- package/tsconfig.json +24 -0
|
@@ -0,0 +1,631 @@
|
|
|
1
|
+
import { breakpoints, fontSizes, sizes, space } from "../../tokens/space";
|
|
2
|
+
import { shapes } from "../../tokens/shapes";
|
|
3
|
+
import { shadows } from "../../tokens/shadows";
|
|
4
|
+
import { getShade, getTint, getTransparent } from "../../utils";
|
|
5
|
+
import { controlSizes } from "../../tokens/controls";
|
|
6
|
+
import colors from "./config";
|
|
7
|
+
import { borderWidth } from "styled-system";
|
|
8
|
+
|
|
9
|
+
// TODO: Decide if we want to include borderColor.
|
|
10
|
+
const staticPairs = {
|
|
11
|
+
red: {
|
|
12
|
+
color: colors.palette.reds[11],
|
|
13
|
+
backgroundColor: colors.palette.reds[2],
|
|
14
|
+
},
|
|
15
|
+
orange: {
|
|
16
|
+
color: colors.palette.oranges[0],
|
|
17
|
+
backgroundColor: colors.palette.oranges[6],
|
|
18
|
+
},
|
|
19
|
+
yellow: {
|
|
20
|
+
color: colors.palette.yellows[1],
|
|
21
|
+
backgroundColor: colors.palette.yellows[9],
|
|
22
|
+
},
|
|
23
|
+
green: {
|
|
24
|
+
color: colors.palette.greens[0],
|
|
25
|
+
backgroundColor: colors.palette.greens[7],
|
|
26
|
+
},
|
|
27
|
+
teal: {
|
|
28
|
+
color: colors.palette.teals[0],
|
|
29
|
+
backgroundColor: colors.palette.teals[7],
|
|
30
|
+
},
|
|
31
|
+
blue: {
|
|
32
|
+
color: colors.palette.blues[0],
|
|
33
|
+
backgroundColor: colors.palette.blues[7],
|
|
34
|
+
},
|
|
35
|
+
purple: {
|
|
36
|
+
color: colors.palette.purples[0],
|
|
37
|
+
backgroundColor: colors.palette.purples[7],
|
|
38
|
+
},
|
|
39
|
+
pink: {
|
|
40
|
+
color: colors.palette.pinks[0],
|
|
41
|
+
backgroundColor: colors.palette.pinks[7],
|
|
42
|
+
},
|
|
43
|
+
gray: {
|
|
44
|
+
color: colors.palette.grays[0],
|
|
45
|
+
backgroundColor: colors.palette.grays[7],
|
|
46
|
+
},
|
|
47
|
+
primary: {
|
|
48
|
+
backgroundColor: colors.palette.brands[5],
|
|
49
|
+
color: colors.dark,
|
|
50
|
+
borderColor: colors.palette.brands[4],
|
|
51
|
+
},
|
|
52
|
+
accent: {
|
|
53
|
+
color: colors.palette.accents[0],
|
|
54
|
+
backgroundColor: colors.palette.accents[7],
|
|
55
|
+
},
|
|
56
|
+
neutral: {
|
|
57
|
+
color: colors.palette.neutrals[0],
|
|
58
|
+
backgroundColor: colors.palette.neutrals[8],
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const signalPairs = {
|
|
63
|
+
error: {
|
|
64
|
+
color: colors.palette.reds[8],
|
|
65
|
+
backgroundColor: colors.palette.reds[0],
|
|
66
|
+
static: {
|
|
67
|
+
color: colors.palette.reds[0],
|
|
68
|
+
backgroundColor: colors.palette.reds[7],
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
const stateSkins = {
|
|
74
|
+
highlight: {
|
|
75
|
+
color: colors.light,
|
|
76
|
+
backgroundColor: colors.transparent.dark[2],
|
|
77
|
+
borderColor: colors.palette.brands[6],
|
|
78
|
+
boxShadow: "0 0 0 3px " + getTransparent(colors.palette.brands[3], 0.2),
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const surfaceSkins = {
|
|
83
|
+
base: {
|
|
84
|
+
color: colors.light,
|
|
85
|
+
backgroundColor: colors.base,
|
|
86
|
+
borderColor: colors.transparent.light[1],
|
|
87
|
+
shade: {
|
|
88
|
+
backgroundColor: getShade(colors.base, 0.25),
|
|
89
|
+
borderColor: colors.transparent.light[1],
|
|
90
|
+
},
|
|
91
|
+
tint: {
|
|
92
|
+
backgroundColor: getTint(colors.base, 0.025),
|
|
93
|
+
borderColor: colors.transparent.light[1],
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
surface: {
|
|
97
|
+
color: colors.light,
|
|
98
|
+
backgroundColor: colors.surface,
|
|
99
|
+
borderColor: colors.transparent.light[1],
|
|
100
|
+
shade: {
|
|
101
|
+
backgroundColor: getShade(colors.surface, 0.25),
|
|
102
|
+
borderColor: colors.transparent.light[1],
|
|
103
|
+
},
|
|
104
|
+
tint: {
|
|
105
|
+
backgroundColor: getTint(colors.surface, 0.025),
|
|
106
|
+
borderColor: colors.transparent.light[1],
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
panel: {
|
|
110
|
+
color: colors.light,
|
|
111
|
+
backgroundColor: colors.panel,
|
|
112
|
+
borderColor: colors.transparent.light[1],
|
|
113
|
+
shade: {
|
|
114
|
+
backgroundColor: getShade(colors.panel, 0.25),
|
|
115
|
+
borderColor: colors.transparent.light[1],
|
|
116
|
+
},
|
|
117
|
+
tint: {
|
|
118
|
+
backgroundColor: getTint(colors.panel, 0.025),
|
|
119
|
+
borderColor: colors.transparent.light[1],
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
card: {
|
|
123
|
+
color: colors.light,
|
|
124
|
+
backgroundColor: colors.card,
|
|
125
|
+
border: "0.5px solid",
|
|
126
|
+
borderColor: colors.transparent.light[1],
|
|
127
|
+
shade: {
|
|
128
|
+
backgroundColor: getShade(colors.card, 0.25),
|
|
129
|
+
borderColor: colors.transparent.light[1],
|
|
130
|
+
},
|
|
131
|
+
tint: {
|
|
132
|
+
backgroundColor: getTint(colors.card, 0.025),
|
|
133
|
+
borderColor: colors.transparent.light[1],
|
|
134
|
+
},
|
|
135
|
+
brand: {
|
|
136
|
+
backgroundColor: colors.transparent.brand[2],
|
|
137
|
+
borderColor: colors.transparent.brand[10],
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
overlay: {
|
|
141
|
+
color: colors.light,
|
|
142
|
+
backgroundColor: colors.overlay,
|
|
143
|
+
borderColor: colors.transparent.light[1],
|
|
144
|
+
shade: {
|
|
145
|
+
backgroundColor: getShade(colors.overlay, 0.25),
|
|
146
|
+
borderColor: colors.transparent.light[1],
|
|
147
|
+
},
|
|
148
|
+
tint: {
|
|
149
|
+
backgroundColor: getTint(colors.overlay, 0.025),
|
|
150
|
+
borderColor: colors.transparent.light[1],
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
const specialSkins = {
|
|
156
|
+
transparent: {
|
|
157
|
+
color: colors.secondary,
|
|
158
|
+
backgroundColor: "rgba(0,0,0,0.0)",
|
|
159
|
+
},
|
|
160
|
+
translucent: {
|
|
161
|
+
borderColor: colors.transparent.light[2],
|
|
162
|
+
backdropFilter: "blur(8px)",
|
|
163
|
+
"-webkit-backdrop-filter": "blur(8px)",
|
|
164
|
+
backgroundColor: getTransparent(colors.overlay, 0.8),
|
|
165
|
+
color: colors.primary,
|
|
166
|
+
light: {
|
|
167
|
+
borderColor: colors.transparent.light[8],
|
|
168
|
+
backdropFilter: "blur(8px)",
|
|
169
|
+
"-webkit-backdrop-filter": "blur(8px)",
|
|
170
|
+
backgroundColor: colors.transparent.light[3],
|
|
171
|
+
color: colors.primary,
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
const hoverSkins = {
|
|
177
|
+
default: {
|
|
178
|
+
color: colors.light,
|
|
179
|
+
backgroundColor: colors.transparent.dark[1],
|
|
180
|
+
},
|
|
181
|
+
subtle: {
|
|
182
|
+
backgroundColor: getTransparent(colors.palette.brands[11], 0.15),
|
|
183
|
+
color: colors.light,
|
|
184
|
+
},
|
|
185
|
+
brand: {
|
|
186
|
+
color: colors.dark,
|
|
187
|
+
backgroundColor: colors.palette.brands[7],
|
|
188
|
+
},
|
|
189
|
+
error: {
|
|
190
|
+
color: colors.palette.reds[0],
|
|
191
|
+
backgroundColor: colors.palette.reds[8],
|
|
192
|
+
},
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
const colorPairs = {
|
|
196
|
+
...staticPairs,
|
|
197
|
+
...specialSkins,
|
|
198
|
+
...signalPairs,
|
|
199
|
+
...surfaceSkins,
|
|
200
|
+
...stateSkins,
|
|
201
|
+
dark: surfaceSkins.base,
|
|
202
|
+
hover: hoverSkins,
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
const skins = {
|
|
206
|
+
...colorPairs,
|
|
207
|
+
button: {
|
|
208
|
+
default: {
|
|
209
|
+
color: colors.light,
|
|
210
|
+
backgroundColor: colors.transparent.light[1],
|
|
211
|
+
border: "1px solid",
|
|
212
|
+
borderColor: colors.transparent.light[1],
|
|
213
|
+
boxShadow: "0 1px 0 0 rgba(0,0,0,0.12)",
|
|
214
|
+
"&:hover": {
|
|
215
|
+
...hoverSkins.brand,
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
primary: {
|
|
219
|
+
border: "1px solid",
|
|
220
|
+
...colorPairs.primary,
|
|
221
|
+
borderColor: colors.transparent.light[1],
|
|
222
|
+
"&:hover": {
|
|
223
|
+
...hoverSkins.brand,
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
outline: {
|
|
227
|
+
color: colors.light,
|
|
228
|
+
border: "1px solid",
|
|
229
|
+
backgroundColor: "transparent",
|
|
230
|
+
borderColor: colors.transparent.light[3],
|
|
231
|
+
"&:hover": {
|
|
232
|
+
...hoverSkins.brand,
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
subtle: {
|
|
236
|
+
backgroundColor: colors.transparent.light[0],
|
|
237
|
+
border: "1px solid",
|
|
238
|
+
borderColor: "transparent",
|
|
239
|
+
color: colors.tertiary,
|
|
240
|
+
"&:hover": {
|
|
241
|
+
...hoverSkins.subtle,
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
solid: {
|
|
245
|
+
backgroundColor: colors.white,
|
|
246
|
+
border: "none",
|
|
247
|
+
borderColor: "transparent",
|
|
248
|
+
color: colors.primary,
|
|
249
|
+
boxShadow: shadows.large,
|
|
250
|
+
"&:hover": {
|
|
251
|
+
transform: "scale(1.15)",
|
|
252
|
+
boxShadow: shadows.xlarge,
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
ghost: {
|
|
256
|
+
backgroundColor: "transparent",
|
|
257
|
+
border: "1px solid",
|
|
258
|
+
borderColor: "transparent",
|
|
259
|
+
color: colors.secondary,
|
|
260
|
+
"&:hover": {
|
|
261
|
+
...hoverSkins.subtle,
|
|
262
|
+
},
|
|
263
|
+
danger: {
|
|
264
|
+
color: colors.primary,
|
|
265
|
+
backgroundColor: getTransparent(colors.red, 0.25),
|
|
266
|
+
borderColor: getTransparent(colors.red, 0.5),
|
|
267
|
+
"&:hover": {
|
|
268
|
+
...hoverSkins.error,
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
subtle: {
|
|
272
|
+
backgroundColor: "transparent",
|
|
273
|
+
border: "1px solid",
|
|
274
|
+
borderColor: "transparent",
|
|
275
|
+
color: colors.tertiary,
|
|
276
|
+
"&:hover": {
|
|
277
|
+
...hoverSkins.subtle,
|
|
278
|
+
},
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
clean: {
|
|
282
|
+
border: "0px solid",
|
|
283
|
+
backgroundColor: "transparent",
|
|
284
|
+
color: colors.light,
|
|
285
|
+
borderColor: "transparent",
|
|
286
|
+
borderRadius: 0,
|
|
287
|
+
},
|
|
288
|
+
cta: {
|
|
289
|
+
color: colors.dark,
|
|
290
|
+
backgroundColor: colors.palette.brands[5],
|
|
291
|
+
border: "1px solid",
|
|
292
|
+
borderColor: colors.palette.brands[0],
|
|
293
|
+
boxShadow:
|
|
294
|
+
"0 2px 2px 0 rgba(0,0,0,0.072), 0 0px 10px 2px rgba(0,0,0,0.082)",
|
|
295
|
+
"&:hover": {
|
|
296
|
+
...hoverSkins.brand,
|
|
297
|
+
},
|
|
298
|
+
},
|
|
299
|
+
danger: {
|
|
300
|
+
...colorPairs.error.static,
|
|
301
|
+
"&:hover": {
|
|
302
|
+
...colorPairs.error.interactive,
|
|
303
|
+
},
|
|
304
|
+
},
|
|
305
|
+
bubble: {
|
|
306
|
+
color: colors.white,
|
|
307
|
+
backgroundColor: getTransparent(colors.dark, 0.9),
|
|
308
|
+
border: "1px solid",
|
|
309
|
+
borderColor: getTransparent(colors.light, 0.1),
|
|
310
|
+
boxShadow: "0 1px 0 0 rgba(0,0,0,0.12)",
|
|
311
|
+
"&:hover": {
|
|
312
|
+
...hoverSkins.brand,
|
|
313
|
+
},
|
|
314
|
+
},
|
|
315
|
+
sizes: {
|
|
316
|
+
xxsmall: {
|
|
317
|
+
...controlSizes.xxsmall,
|
|
318
|
+
fontSize: fontSizes[2],
|
|
319
|
+
fontWeight: 700,
|
|
320
|
+
},
|
|
321
|
+
xsmall: {
|
|
322
|
+
...controlSizes.xsmall,
|
|
323
|
+
fontSize: fontSizes[3],
|
|
324
|
+
fontWeight: 600,
|
|
325
|
+
},
|
|
326
|
+
small: {
|
|
327
|
+
...controlSizes.small,
|
|
328
|
+
fontSize: fontSizes[4],
|
|
329
|
+
fontWeight: 500,
|
|
330
|
+
},
|
|
331
|
+
medium: {
|
|
332
|
+
...controlSizes.medium,
|
|
333
|
+
fontSize: fontSizes[4],
|
|
334
|
+
fontWeight: 600,
|
|
335
|
+
condensed: {
|
|
336
|
+
...controlSizes.medium,
|
|
337
|
+
fontSize: fontSizes[4],
|
|
338
|
+
fontWeight: 600,
|
|
339
|
+
paddingLeft: space.xs,
|
|
340
|
+
paddingRight: space.xs,
|
|
341
|
+
},
|
|
342
|
+
},
|
|
343
|
+
large: {
|
|
344
|
+
...controlSizes.large,
|
|
345
|
+
fontSize: fontSizes[5],
|
|
346
|
+
fontWeight: 600,
|
|
347
|
+
},
|
|
348
|
+
xlarge: {
|
|
349
|
+
...controlSizes.xlarge,
|
|
350
|
+
fontSize: fontSizes[5],
|
|
351
|
+
fontWeight: 600,
|
|
352
|
+
},
|
|
353
|
+
icon: {
|
|
354
|
+
width: space[14],
|
|
355
|
+
height: space[14],
|
|
356
|
+
large: {
|
|
357
|
+
width: space[15],
|
|
358
|
+
height: space[15],
|
|
359
|
+
},
|
|
360
|
+
small: {
|
|
361
|
+
width: space[13],
|
|
362
|
+
height: space[13],
|
|
363
|
+
},
|
|
364
|
+
xsmall: {
|
|
365
|
+
width: space[12],
|
|
366
|
+
height: space[12],
|
|
367
|
+
},
|
|
368
|
+
xxsmall: {
|
|
369
|
+
width: space[11],
|
|
370
|
+
height: space[11],
|
|
371
|
+
},
|
|
372
|
+
},
|
|
373
|
+
},
|
|
374
|
+
},
|
|
375
|
+
field: {
|
|
376
|
+
default: {
|
|
377
|
+
border: "1px solid",
|
|
378
|
+
backgroundColor: colors.palette.darks[4],
|
|
379
|
+
color: colors.light,
|
|
380
|
+
borderColor: colors.palette.darks[5],
|
|
381
|
+
"&:hover": {
|
|
382
|
+
borderColor: getTransparent(colors.palette.neutrals[5], 0.7),
|
|
383
|
+
color: colors.light,
|
|
384
|
+
},
|
|
385
|
+
"&:focus": {
|
|
386
|
+
borderColor: getTransparent(colors.palette.brands[5], 0.7),
|
|
387
|
+
color: colors.light,
|
|
388
|
+
outline: "none",
|
|
389
|
+
},
|
|
390
|
+
"&::placeholder": {
|
|
391
|
+
opacity: 0.6,
|
|
392
|
+
},
|
|
393
|
+
// "&:focus": {
|
|
394
|
+
// outline: "none",
|
|
395
|
+
// },
|
|
396
|
+
},
|
|
397
|
+
primary: {
|
|
398
|
+
border: "1px solid",
|
|
399
|
+
backgroundColor: colors.palette.neutrals[7],
|
|
400
|
+
color: colors.light,
|
|
401
|
+
borderColor: colors.palette.neutrals[4],
|
|
402
|
+
"&:hover, &:focus": {
|
|
403
|
+
backgroundColor: colors.palette.neutrals[2],
|
|
404
|
+
color: colors.light,
|
|
405
|
+
},
|
|
406
|
+
"&:user-invalid, &:invalid:not(:placeholder-shown)": {
|
|
407
|
+
borderColor: colors.palette.reds[4],
|
|
408
|
+
color: colors.light,
|
|
409
|
+
},
|
|
410
|
+
},
|
|
411
|
+
subtle: {
|
|
412
|
+
border: "0px solid",
|
|
413
|
+
backgroundColor: colors.surface,
|
|
414
|
+
color: colors.light,
|
|
415
|
+
borderColor: "transparent",
|
|
416
|
+
"&:hover, &:focus": {
|
|
417
|
+
borderColor: "transparent",
|
|
418
|
+
color: colors.light,
|
|
419
|
+
outline: "none",
|
|
420
|
+
},
|
|
421
|
+
"&:user-invalid, &:invalid:not(:placeholder-shown)": {
|
|
422
|
+
borderColor: colors.palette.reds[4],
|
|
423
|
+
color: colors.light,
|
|
424
|
+
},
|
|
425
|
+
},
|
|
426
|
+
ghost: {
|
|
427
|
+
border: "0px solid",
|
|
428
|
+
backgroundColor: "transparent",
|
|
429
|
+
color: colors.light,
|
|
430
|
+
borderColor: "transparent",
|
|
431
|
+
borderRadius: 0,
|
|
432
|
+
"&:hover, &:focus": {
|
|
433
|
+
borderColor: "transparent",
|
|
434
|
+
color: colors.light,
|
|
435
|
+
outline: "none",
|
|
436
|
+
},
|
|
437
|
+
"&:user-invalid, &:invalid:not(:placeholder-shown)": {
|
|
438
|
+
borderColor: colors.palette.reds[4],
|
|
439
|
+
color: colors.light,
|
|
440
|
+
},
|
|
441
|
+
},
|
|
442
|
+
outline: {
|
|
443
|
+
border: "1px solid",
|
|
444
|
+
backgroundColor: colors.light,
|
|
445
|
+
color: colors.light,
|
|
446
|
+
borderColor: colors.palette.reds[4],
|
|
447
|
+
borderRadius: 0,
|
|
448
|
+
"&:hover, &:focus": {
|
|
449
|
+
borderColor: "transparent",
|
|
450
|
+
color: colors.light,
|
|
451
|
+
outline: "none",
|
|
452
|
+
},
|
|
453
|
+
"&:user-invalid, &:invalid:not(:placeholder-shown)": {
|
|
454
|
+
borderColor: colors.palette.reds[4],
|
|
455
|
+
color: colors.light,
|
|
456
|
+
},
|
|
457
|
+
},
|
|
458
|
+
underline: {
|
|
459
|
+
border: "2px solid",
|
|
460
|
+
// borderWidth: "0px 0px 1px 0px",
|
|
461
|
+
backgroundColor: colors.palette.reds[4],
|
|
462
|
+
color: colors.light,
|
|
463
|
+
borderColor: colors.palette.reds[4],
|
|
464
|
+
borderRadius: 0,
|
|
465
|
+
"&:hover, &:focus": {
|
|
466
|
+
borderColor: "transparent",
|
|
467
|
+
color: colors.light,
|
|
468
|
+
outline: "none",
|
|
469
|
+
},
|
|
470
|
+
"&:user-invalid, &:invalid:not(:placeholder-shown)": {
|
|
471
|
+
borderColor: colors.palette.reds[4],
|
|
472
|
+
color: colors.light,
|
|
473
|
+
},
|
|
474
|
+
},
|
|
475
|
+
checked: {
|
|
476
|
+
border: "1px solid",
|
|
477
|
+
backgroundColor: colors.palette.brands[6],
|
|
478
|
+
color: colors.dark,
|
|
479
|
+
borderColor: colors.palette.brands[1],
|
|
480
|
+
"&:hover, &:focus": {
|
|
481
|
+
backgroundColor: colors.palette.brands[7],
|
|
482
|
+
borderColor: colors.palette.brands[0],
|
|
483
|
+
color: colors.dark,
|
|
484
|
+
},
|
|
485
|
+
"&::placeholder": {
|
|
486
|
+
opacity: 0.6,
|
|
487
|
+
},
|
|
488
|
+
"&:focus": {
|
|
489
|
+
outline: "none",
|
|
490
|
+
},
|
|
491
|
+
},
|
|
492
|
+
sizes: {
|
|
493
|
+
xsmall: {
|
|
494
|
+
...controlSizes.xsmall,
|
|
495
|
+
fontSize: fontSizes[3],
|
|
496
|
+
fontWeight: 400,
|
|
497
|
+
select: {
|
|
498
|
+
fontSize: fontSizes[3],
|
|
499
|
+
fontWeight: 400,
|
|
500
|
+
height: space[11],
|
|
501
|
+
paddingLeft: space.xs,
|
|
502
|
+
paddingRight: space.m,
|
|
503
|
+
paddingTop: space.mini,
|
|
504
|
+
paddingBottom: space.mini,
|
|
505
|
+
},
|
|
506
|
+
},
|
|
507
|
+
small: {
|
|
508
|
+
...controlSizes.small,
|
|
509
|
+
fontSize: fontSizes[4],
|
|
510
|
+
fontWeight: 400,
|
|
511
|
+
},
|
|
512
|
+
medium: {
|
|
513
|
+
//...controlSizes.medium,
|
|
514
|
+
paddingLeft: space.s,
|
|
515
|
+
paddingRight: space.s,
|
|
516
|
+
paddingTop: space.xsmall,
|
|
517
|
+
paddingBottom: space.xsmall,
|
|
518
|
+
fontSize: fontSizes[4],
|
|
519
|
+
fontWeight: 400,
|
|
520
|
+
},
|
|
521
|
+
large: {
|
|
522
|
+
// height: space[15],
|
|
523
|
+
paddingLeft: space.s,
|
|
524
|
+
paddingRight: space.s,
|
|
525
|
+
paddingTop: space.xsmall,
|
|
526
|
+
paddingBottom: space.xsmall,
|
|
527
|
+
fontSize: fontSizes[5],
|
|
528
|
+
fontWeight: 400,
|
|
529
|
+
},
|
|
530
|
+
},
|
|
531
|
+
},
|
|
532
|
+
link: {
|
|
533
|
+
default: {
|
|
534
|
+
color: colors.palette.brands[8],
|
|
535
|
+
textDecoration: "underline",
|
|
536
|
+
textDecorationColor: colors.transparent.light[3],
|
|
537
|
+
textDecorationThickness: "1px",
|
|
538
|
+
},
|
|
539
|
+
highlight: {
|
|
540
|
+
color: colors.palette.brands[5],
|
|
541
|
+
textDecoration: "underline",
|
|
542
|
+
textDecorationColor: colors.palette.brands[2],
|
|
543
|
+
textDecorationThickness: "1px",
|
|
544
|
+
},
|
|
545
|
+
ghost: {
|
|
546
|
+
// color: "currentColor",
|
|
547
|
+
},
|
|
548
|
+
underline: {
|
|
549
|
+
color: colors.palette.brands[7],
|
|
550
|
+
textDecoration: "underline",
|
|
551
|
+
textDecorationColor: colors.palette.brands[5],
|
|
552
|
+
textDecorationThickness: "1px",
|
|
553
|
+
//textUnderlinePosition: "under",
|
|
554
|
+
},
|
|
555
|
+
button: {
|
|
556
|
+
paddingLeft: space.s,
|
|
557
|
+
paddingRight: space.s,
|
|
558
|
+
paddingTop: space.mini,
|
|
559
|
+
paddingBottom: space.mini,
|
|
560
|
+
...shapes.rounded,
|
|
561
|
+
color: colors.primary,
|
|
562
|
+
backgroundColor: getTransparent(colors.primary, 0.05),
|
|
563
|
+
"&:hover": {
|
|
564
|
+
...colorPairs.primary.hover,
|
|
565
|
+
},
|
|
566
|
+
},
|
|
567
|
+
},
|
|
568
|
+
textarea: {
|
|
569
|
+
//border: "1px solid",
|
|
570
|
+
backgroundColor: getShade(colors.surface, 0.2),
|
|
571
|
+
color: colors.light,
|
|
572
|
+
//borderColor: colors.palette.neutrals[4],
|
|
573
|
+
"&:hover, &:focus, &:focus-within": {
|
|
574
|
+
backgroundColor: colors.base,
|
|
575
|
+
borderColor: colors.palette.brands[5],
|
|
576
|
+
color: colors.white,
|
|
577
|
+
boxShadow: "0 0 0 1px " + getTransparent(colors.palette.brands[3], 0.85),
|
|
578
|
+
},
|
|
579
|
+
"& *::placeholder": {
|
|
580
|
+
opacity: 0.6,
|
|
581
|
+
},
|
|
582
|
+
"&:focus": {
|
|
583
|
+
outline: "none",
|
|
584
|
+
},
|
|
585
|
+
},
|
|
586
|
+
codeblock: {
|
|
587
|
+
backgroundColor: colors.base,
|
|
588
|
+
color: colors.light,
|
|
589
|
+
highlight: {
|
|
590
|
+
color: colors.palette.brands[10],
|
|
591
|
+
backgroundColor: colors.transparent.brand[4],
|
|
592
|
+
"& > code": {
|
|
593
|
+
backgroundColor: "transparent",
|
|
594
|
+
},
|
|
595
|
+
},
|
|
596
|
+
},
|
|
597
|
+
row: {
|
|
598
|
+
backgroundColor: "transparent",
|
|
599
|
+
color: colors.primary,
|
|
600
|
+
"&:hover, &:focus": {
|
|
601
|
+
...hoverSkins.default,
|
|
602
|
+
},
|
|
603
|
+
header: {
|
|
604
|
+
backgroundColor: colors.transparent.brand[5],
|
|
605
|
+
color: colors.primary,
|
|
606
|
+
},
|
|
607
|
+
selected: {
|
|
608
|
+
backgroundColor: colors.transparent.brand[1],
|
|
609
|
+
color: colors.primary,
|
|
610
|
+
"&:hover, &:focus": {
|
|
611
|
+
backgroundColor: colors.transparent.brand[0],
|
|
612
|
+
color: colors.primary,
|
|
613
|
+
},
|
|
614
|
+
},
|
|
615
|
+
},
|
|
616
|
+
};
|
|
617
|
+
|
|
618
|
+
const skinconfig = {
|
|
619
|
+
colors,
|
|
620
|
+
colorPairs,
|
|
621
|
+
controlSizes,
|
|
622
|
+
breakpoints,
|
|
623
|
+
fontSizes,
|
|
624
|
+
space,
|
|
625
|
+
sizes,
|
|
626
|
+
shapes,
|
|
627
|
+
skins,
|
|
628
|
+
shadows,
|
|
629
|
+
};
|
|
630
|
+
|
|
631
|
+
export default skinconfig;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import skinconfig from "./skins";
|
|
2
|
+
import Logo from "../../assets/logo";
|
|
3
|
+
import { getTransparent } from "../../utils";
|
|
4
|
+
|
|
5
|
+
const theme = {
|
|
6
|
+
...skinconfig,
|
|
7
|
+
main: {
|
|
8
|
+
bg: "palette.neutrals.1",
|
|
9
|
+
color: "light",
|
|
10
|
+
minHeight: "100dvh",
|
|
11
|
+
display: "grid",
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
container: {
|
|
15
|
+
//gridTemplateColumns: "4rem 1fr 25rem",
|
|
16
|
+
|
|
17
|
+
bg: "neutral",
|
|
18
|
+
borderRadius: "1rem 0 0 0",
|
|
19
|
+
mt: "xsmall",
|
|
20
|
+
border: "1px solid",
|
|
21
|
+
borderColor: "rgba(255, 255, 255, 0.12)",
|
|
22
|
+
boxShadow: "0 0 8px rgba(0,0,0,0.16)",
|
|
23
|
+
borderWidth: "1px 0 0 1px",
|
|
24
|
+
overflow: "auto",
|
|
25
|
+
p: "large",
|
|
26
|
+
},
|
|
27
|
+
header: {
|
|
28
|
+
public: {
|
|
29
|
+
wrapper: {
|
|
30
|
+
height: "3.25rem",
|
|
31
|
+
borderBottom: "1px solid",
|
|
32
|
+
borderColor: "surface",
|
|
33
|
+
bg: getTransparent(skinconfig.colors.base, 0.9),
|
|
34
|
+
position: "fixed",
|
|
35
|
+
top: "0px",
|
|
36
|
+
zIndex: 9999,
|
|
37
|
+
},
|
|
38
|
+
container: {
|
|
39
|
+
width: "100%",
|
|
40
|
+
maxWidth: "17",
|
|
41
|
+
mx: "auto",
|
|
42
|
+
p: "small",
|
|
43
|
+
},
|
|
44
|
+
underlay: {
|
|
45
|
+
color: "transparent.dark.8",
|
|
46
|
+
bg: "transparent",
|
|
47
|
+
},
|
|
48
|
+
menu: {
|
|
49
|
+
item: {
|
|
50
|
+
highlight: {
|
|
51
|
+
bg: "brand",
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
heading: {
|
|
58
|
+
container: {
|
|
59
|
+
display: "flex",
|
|
60
|
+
flexDirection: "column",
|
|
61
|
+
py: { _: "medium", md: "large" },
|
|
62
|
+
},
|
|
63
|
+
title: { fontWeight: 900 },
|
|
64
|
+
subtitle: { color: "secondary" },
|
|
65
|
+
strap: { color: "tertiary" },
|
|
66
|
+
},
|
|
67
|
+
logo: {
|
|
68
|
+
asset: Logo,
|
|
69
|
+
color: "tertiary",
|
|
70
|
+
assetProps: {
|
|
71
|
+
width: "2.5rem",
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
footer: {
|
|
75
|
+
logo: {
|
|
76
|
+
asset: Logo,
|
|
77
|
+
color: "tertiary",
|
|
78
|
+
assetProps: {
|
|
79
|
+
mark: false,
|
|
80
|
+
width: "12rem",
|
|
81
|
+
height: "auto",
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
container: {},
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
export default theme;
|