@livepeer/design-system 0.0.0-beta.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/components/Accordian.d.ts +4 -0
- package/dist/components/AlertDialog.d.ts +13 -0
- package/dist/components/Badge.d.ts +991 -0
- package/dist/components/Banner.d.ts +1 -0
- package/dist/components/Button.d.ts +1 -0
- package/dist/components/Card.d.ts +989 -0
- package/dist/components/Dialog.d.ts +12 -0
- package/dist/components/DropdownMenu.d.ts +3 -0
- package/dist/components/Label.d.ts +1 -0
- package/dist/components/Link.d.ts +989 -0
- package/dist/components/Promo.d.ts +1 -0
- package/dist/components/RadioCard.d.ts +998 -0
- package/dist/components/Select.d.ts +1 -0
- package/dist/components/Snackbar/SnackbarProvider.d.ts +15 -0
- package/dist/components/Snackbar/index.d.ts +2 -0
- package/dist/components/Snackbar/transitionStyles.d.ts +87 -0
- package/dist/components/Snackbar/useSnackbar.d.ts +5 -0
- package/dist/components/Switch.d.ts +1 -0
- package/dist/components/Table.d.ts +7904 -0
- package/dist/components/Tabs.d.ts +4 -0
- package/dist/components/Text.d.ts +1 -0
- package/dist/components/TextField.d.ts +1 -0
- package/dist/custom/AppBar.d.ts +993 -0
- package/dist/custom/Avatars.d.ts +1 -0
- package/dist/custom/DarkThemeButton.d.ts +1 -0
- package/dist/custom/Kbds.d.ts +1 -0
- package/dist/custom/Snackbar.d.ts +1 -0
- package/dist/custom/Toolbar.d.ts +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.es.js +2270 -0
- package/dist/index.js +2701 -0
- package/dist/stitches.config.d.ts +24 -0
- package/package.json +93 -0
package/dist/index.es.js
ADDED
@@ -0,0 +1,2270 @@
|
|
1
|
+
import { createTheme, styled, keyframes, TabsTrigger as TabsTrigger$1, TabsList as TabsList$1, TabsContent as TabsContent$1, Text as Text$1, Box, Select as Select$1, DropdownMenuItem as DropdownMenuItem$1, DropdownMenuRadioItem as DropdownMenuRadioItem$1, DropdownMenuCheckboxItem as DropdownMenuCheckboxItem$1, Switch as Switch$1 } from '@modulz/design-system';
|
2
|
+
export { Alert, AspectRatio, Avatar, AvatarGroup, AvatarNestedItem, Box, Checkbox, Code, Container, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuTrigger, ControlGroup, DesignSystemProvider, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuSeparator, DropdownMenuTrigger, Flex, Grid, Heading, IconButton, Image, Kbd, Menu, MenuCheckboxItem, MenuGroup, MenuItem, MenuLabel, MenuRadioGroup, MenuRadioItem, MenuSeparator, Overlay, Panel, Paragraph, Popover, PopoverClose, PopoverContent, PopoverTrigger, Portal, ProgressBar, Radio, RadioCardGroup, RadioGroup, Section, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetTitle, SheetTrigger, SimpleToggle, Skeleton, Slider, Status, Sub, Sup, TabLink, Tabs, TextArea, Tooltip, TreeItem, VerifiedBadge, css, getCssText, globalCss, keyframes, styled } from '@modulz/design-system';
|
3
|
+
import { __assign, __rest, __spreadArray } from 'tslib';
|
4
|
+
import React, { createContext, useState, useContext } from 'react';
|
5
|
+
import { gray, mauve, slate, sage, olive, sand, tomato, red, crimson, pink, plum, purple, violet, indigo, blue, sky, mint, cyan, teal, green, grass, lime, yellow, amber, orange, brown, bronze, gold, whiteA, blackA, grayDark, mauveDark, slateDark, sageDark, oliveDark, sandDark, tomatoDark, redDark, crimsonDark, pinkDark, plumDark, purpleDark, violetDark, indigoDark, blueDark, skyDark, mintDark, cyanDark, tealDark, greenDark, grassDark, limeDark, yellowDark, amberDark, orangeDark, brownDark, bronzeDark, goldDark } from '@radix-ui/colors';
|
6
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
7
|
+
import { ChevronRightIcon } from '@radix-ui/react-icons';
|
8
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
9
|
+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
10
|
+
import * as BaseLabel from '@radix-ui/react-label';
|
11
|
+
import { CSSTransition } from 'react-transition-group';
|
12
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
13
|
+
export { Arrow as HoverCardArrow, Content as HoverCardContent, Root as HoverCardRoot, Trigger as HoverCardTrigger } from '@radix-ui/react-hover-card';
|
14
|
+
export { AccessibleIcon } from '@radix-ui/react-accessible-icon';
|
15
|
+
export { Corner as ScrollAreaCorner, Root as ScrollAreaRoot, Scrollbar as ScrollAreaScrollbar, Thumb as ScrollAreaThumb, Viewport as ScrollAreaViewport } from '@radix-ui/react-scroll-area';
|
16
|
+
|
17
|
+
var fonts = {
|
18
|
+
body: "Inter, -apple-system, system-ui, sans-serif",
|
19
|
+
mono: "menlo, monospace",
|
20
|
+
};
|
21
|
+
var lightThemeColors = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, gray), mauve), slate), sage), olive), sand), tomato), red), crimson), pink), plum), purple), violet), indigo), blue), sky), mint), cyan), teal), green), grass), lime), yellow), amber), orange), brown), bronze), gold), whiteA), blackA);
|
22
|
+
var darkThemeColors = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, grayDark), mauveDark), slateDark), sageDark), oliveDark), sandDark), tomatoDark), redDark), crimsonDark), pinkDark), plumDark), purpleDark), violetDark), indigoDark), blueDark), skyDark), mintDark), cyanDark), tealDark), greenDark), grassDark), limeDark), yellowDark), amberDark), orangeDark), brownDark), bronzeDark), goldDark), whiteA), blackA);
|
23
|
+
var naturalPairings = {
|
24
|
+
tomato: "mauve",
|
25
|
+
red: "mauve",
|
26
|
+
crimson: "mauve",
|
27
|
+
pink: "mauve",
|
28
|
+
plum: "mauve",
|
29
|
+
purple: "mauve",
|
30
|
+
violet: "mauve",
|
31
|
+
indigo: "slate",
|
32
|
+
blue: "slate",
|
33
|
+
sky: "slate",
|
34
|
+
cyan: "slate",
|
35
|
+
teal: "sage",
|
36
|
+
mint: "sage",
|
37
|
+
green: "sage",
|
38
|
+
grass: "olive",
|
39
|
+
lime: "olive",
|
40
|
+
yellow: "sand",
|
41
|
+
amber: "sand",
|
42
|
+
orange: "sand",
|
43
|
+
brown: "sand",
|
44
|
+
};
|
45
|
+
function getThemes() {
|
46
|
+
var themes = {};
|
47
|
+
for (var _i = 0, _a = Object.entries(naturalPairings); _i < _a.length; _i++) {
|
48
|
+
var _b = _a[_i], primary = _b[0], neutral = _b[1];
|
49
|
+
themes["light-theme-".concat(primary)] = createTheme("light-theme-".concat(primary), {
|
50
|
+
colors: __assign(__assign({}, lightThemeColors), {
|
51
|
+
// Semantic colors
|
52
|
+
primary1: "$".concat(primary, "1"), primary2: "$".concat(primary, "2"), primary3: "$".concat(primary, "3"), primary4: "$".concat(primary, "4"), primary5: "$".concat(primary, "5"), primary6: "$".concat(primary, "6"), primary7: "$".concat(primary, "7"), primary8: "$".concat(primary, "8"), primary9: "$".concat(primary, "9"), primary10: "$".concat(primary, "10"), primary11: "$".concat(primary, "11"), primary12: "$".concat(primary, "12"), neutral1: "$".concat(neutral, "1"), neutral2: "$".concat(neutral, "2"), neutral3: "$".concat(neutral, "3"), neutral4: "$".concat(neutral, "4"), neutral5: "$".concat(neutral, "5"), neutral6: "$".concat(neutral, "6"), neutral7: "$".concat(neutral, "7"), neutral8: "$".concat(neutral, "8"), neutral9: "$".concat(neutral, "9"), neutral10: "$".concat(neutral, "10"), neutral11: "$".concat(neutral, "11"), neutral12: "$".concat(neutral, "12"), hiContrast: "$".concat(neutral, "12"), loContrast: "$whiteA12", canvas: "hsl(0 0% 93%)", panel: "$".concat(neutral, "2"), transparentPanel: "hsl(0 0% 0% / 97%)", shadowLight: "hsl(206 22% 7% / 35%)", shadowDark: "hsl(206 22% 7% / 20%)" }),
|
53
|
+
fonts: fonts,
|
54
|
+
});
|
55
|
+
themes["dark-theme-".concat(primary)] = createTheme("dark-theme-".concat(primary), {
|
56
|
+
colors: __assign(__assign({}, darkThemeColors), {
|
57
|
+
// Semantic colors
|
58
|
+
primary1: "$".concat(primary, "1"), primary2: "$".concat(primary, "2"), primary3: "$".concat(primary, "3"), primary4: "$".concat(primary, "4"), primary5: "$".concat(primary, "5"), primary6: "$".concat(primary, "6"), primary7: "$".concat(primary, "7"), primary8: "$".concat(primary, "8"), primary9: "$".concat(primary, "9"), primary10: "$".concat(primary, "10"), primary11: "$".concat(primary, "11"), primary12: "$".concat(primary, "12"), neutral1: "$".concat(neutral, "1"), neutral2: "$".concat(neutral, "2"), neutral3: "$".concat(neutral, "3"), neutral4: "$".concat(neutral, "4"), neutral5: "$".concat(neutral, "5"), neutral6: "$".concat(neutral, "6"), neutral7: "$".concat(neutral, "7"), neutral8: "$".concat(neutral, "8"), neutral9: "$".concat(neutral, "9"), neutral10: "$".concat(neutral, "10"), neutral11: "$".concat(neutral, "11"), neutral12: "$".concat(neutral, "12"), hiContrast: "$".concat(neutral, "12"), loContrast: "$".concat(neutral, "1"), canvas: "hsl(0 0% 15%)", panel: "$".concat(neutral, "2"), transparentPanel: "hsl(0 100% 100% / 97%)", shadowLight: "hsl(206 22% 7% / 35%)", shadowDark: "hsl(206 22% 7% / 20%)" }),
|
59
|
+
fonts: fonts,
|
60
|
+
});
|
61
|
+
}
|
62
|
+
return themes;
|
63
|
+
}
|
64
|
+
var themes = getThemes();
|
65
|
+
|
66
|
+
var _a$3;
|
67
|
+
var StyledAccordion = styled(AccordionPrimitive.Root, {
|
68
|
+
boxShadow: "0 0 0 1px $colors$neutral6",
|
69
|
+
borderRadius: "$1",
|
70
|
+
});
|
71
|
+
var StyledPanel = styled(AccordionPrimitive.Content, {
|
72
|
+
pt: "$0",
|
73
|
+
pb: "$5",
|
74
|
+
px: "$7",
|
75
|
+
backgroundColor: "$neutral2",
|
76
|
+
});
|
77
|
+
var StyledButton = styled(AccordionPrimitive.Trigger, {
|
78
|
+
all: "unset",
|
79
|
+
boxSizing: "border-box",
|
80
|
+
userSelect: "none",
|
81
|
+
"&::before": {
|
82
|
+
boxSizing: "border-box",
|
83
|
+
},
|
84
|
+
"&::after": {
|
85
|
+
boxSizing: "border-box",
|
86
|
+
},
|
87
|
+
display: "flex",
|
88
|
+
alignItems: "center",
|
89
|
+
px: "$3",
|
90
|
+
py: "$4",
|
91
|
+
color: "$hiContrast",
|
92
|
+
width: "100%",
|
93
|
+
"@hover": {
|
94
|
+
"&:hover": {
|
95
|
+
backgroundColor: "$neutral2",
|
96
|
+
},
|
97
|
+
},
|
98
|
+
"&:focus": {
|
99
|
+
outline: "none",
|
100
|
+
},
|
101
|
+
svg: {
|
102
|
+
mr: "$3",
|
103
|
+
transition: "transform 175ms cubic-bezier(0.65, 0, 0.35, 1)",
|
104
|
+
},
|
105
|
+
'&[data-state="open"]': {
|
106
|
+
backgroundColor: "$neutral2",
|
107
|
+
svg: {
|
108
|
+
transform: "rotate(90deg)",
|
109
|
+
},
|
110
|
+
},
|
111
|
+
});
|
112
|
+
var StyledItem = styled(AccordionPrimitive.Item, (_a$3 = {
|
113
|
+
// borderBottom: "1px solid $colors$neutral6",
|
114
|
+
"&:last-of-type": {
|
115
|
+
borderBottom: 0,
|
116
|
+
}
|
117
|
+
},
|
118
|
+
_a$3["&:first-of-type ".concat(StyledPanel)] = {
|
119
|
+
borderTopRightRadius: "$1",
|
120
|
+
borderTopLeftRadius: "$1",
|
121
|
+
},
|
122
|
+
_a$3["&:last-of-type ".concat(StyledPanel)] = {
|
123
|
+
borderBottomRightRadius: "$1",
|
124
|
+
borderBottomLeftRadius: "$1",
|
125
|
+
},
|
126
|
+
_a$3["&:first-of-type ".concat(StyledButton)] = {
|
127
|
+
borderTopRightRadius: "$1",
|
128
|
+
borderTopLeftRadius: "$1",
|
129
|
+
},
|
130
|
+
_a$3["&:last-of-type ".concat(StyledButton)] = {
|
131
|
+
borderBottomRightRadius: "$1",
|
132
|
+
borderBottomLeftRadius: "$1",
|
133
|
+
},
|
134
|
+
_a$3));
|
135
|
+
var StyledHeader = styled(AccordionPrimitive.Header, {
|
136
|
+
all: "unset",
|
137
|
+
});
|
138
|
+
var AccordionButton = React.forwardRef(function (_a, forwardedRef) {
|
139
|
+
var children = _a.children, props = __rest(_a, ["children"]);
|
140
|
+
return (React.createElement(StyledHeader, null,
|
141
|
+
React.createElement(StyledButton, __assign({}, props, { ref: forwardedRef }),
|
142
|
+
React.createElement(ChevronRightIcon, null),
|
143
|
+
children)));
|
144
|
+
});
|
145
|
+
var Accordion = StyledAccordion;
|
146
|
+
var AccordionItem = StyledItem;
|
147
|
+
var AccordionPanel = StyledPanel;
|
148
|
+
|
149
|
+
var fadeIn$1 = keyframes({
|
150
|
+
from: { opacity: 0 },
|
151
|
+
to: { opacity: 1 },
|
152
|
+
});
|
153
|
+
var scaleIn$1 = keyframes({
|
154
|
+
from: { transform: "translate(-50%, -50%) scale(0.9)" },
|
155
|
+
to: { transform: "translate(-50%, -50%) scale(1)" },
|
156
|
+
});
|
157
|
+
var fadeout$1 = keyframes({
|
158
|
+
from: { opacity: 1 },
|
159
|
+
to: { opacity: 0 },
|
160
|
+
});
|
161
|
+
var StyledOverlay$1 = styled(DialogPrimitive.Overlay, {
|
162
|
+
position: "fixed",
|
163
|
+
top: 0,
|
164
|
+
right: 0,
|
165
|
+
bottom: 0,
|
166
|
+
left: 0,
|
167
|
+
backgroundColor: "rgba(0,0,0,.35)",
|
168
|
+
inset: 0,
|
169
|
+
variants: {
|
170
|
+
animation: {
|
171
|
+
true: {
|
172
|
+
'&[data-state="open"]': {
|
173
|
+
animation: "".concat(fadeIn$1, " 300ms ease-out"),
|
174
|
+
},
|
175
|
+
'&[data-state="closed"]': {
|
176
|
+
animation: "".concat(fadeout$1, " 200ms ease-out"),
|
177
|
+
},
|
178
|
+
},
|
179
|
+
},
|
180
|
+
},
|
181
|
+
});
|
182
|
+
function Dialog(_a) {
|
183
|
+
var children = _a.children, props = __rest(_a, ["children"]);
|
184
|
+
return (React.createElement(DialogPrimitive.Root, __assign({}, props),
|
185
|
+
React.createElement(StyledOverlay$1, { animation: true }),
|
186
|
+
children));
|
187
|
+
}
|
188
|
+
var StyledDialogContent = styled(DialogPrimitive.Content, {
|
189
|
+
position: "fixed",
|
190
|
+
top: "50%",
|
191
|
+
left: "50%",
|
192
|
+
transform: "translate(-50%, -50%)",
|
193
|
+
maxHeight: "85vh",
|
194
|
+
padding: "$4",
|
195
|
+
marginTop: "-5vh",
|
196
|
+
backgroundColor: "$panel",
|
197
|
+
borderRadius: "$4",
|
198
|
+
boxShadow: "$colors$shadowLight 0px 10px 38px -10px, $colors$shadowDark 0px 10px 20px -15px",
|
199
|
+
color: "$black",
|
200
|
+
"&:focus": {
|
201
|
+
outline: "none",
|
202
|
+
},
|
203
|
+
variants: {
|
204
|
+
animation: {
|
205
|
+
fade: {
|
206
|
+
'&[data-state="open"]': {
|
207
|
+
animation: "".concat(fadeIn$1, " 300ms ease-out"),
|
208
|
+
},
|
209
|
+
'&[data-state="closed"]': {
|
210
|
+
animation: "".concat(fadeout$1, " 200ms ease-out"),
|
211
|
+
},
|
212
|
+
},
|
213
|
+
scale: {
|
214
|
+
animation: "".concat(fadeIn$1, " 300ms ease-out, ").concat(scaleIn$1, " 200ms ease-out"),
|
215
|
+
},
|
216
|
+
},
|
217
|
+
},
|
218
|
+
defaultVariants: {
|
219
|
+
animation: "scale",
|
220
|
+
},
|
221
|
+
});
|
222
|
+
var DialogContent = function (_a) {
|
223
|
+
var children = _a.children, _b = _a.animation, animation = _b === void 0 ? "scale" : _b, props = __rest(_a, ["children", "animation"]);
|
224
|
+
return (React.createElement(StyledDialogContent, __assign({ animation: animation }, props), children));
|
225
|
+
};
|
226
|
+
var DialogTrigger = DialogPrimitive.Trigger;
|
227
|
+
var DialogTitle = DialogPrimitive.Title;
|
228
|
+
var DialogDescription = DialogPrimitive.Description;
|
229
|
+
var DialogClose = DialogPrimitive.Close;
|
230
|
+
|
231
|
+
var TabsTrigger = styled(TabsTrigger$1, {
|
232
|
+
color: "$neutral11",
|
233
|
+
bc: "transparent",
|
234
|
+
'&[data-state="active"]': {
|
235
|
+
borderColor: "$neutral6",
|
236
|
+
},
|
237
|
+
'&[data-orientation="vertical"]': {
|
238
|
+
'&[data-state="active"]': {
|
239
|
+
color: "$hiContrast",
|
240
|
+
borderColor: "$neutral6",
|
241
|
+
borderBottomColor: "transparent",
|
242
|
+
},
|
243
|
+
},
|
244
|
+
'&[data-orientation="horizontal"]': {
|
245
|
+
'&[data-state="active"]': {
|
246
|
+
color: "$hiContrast",
|
247
|
+
borderColor: "$neutral6",
|
248
|
+
borderBottomColor: "transparent",
|
249
|
+
},
|
250
|
+
},
|
251
|
+
});
|
252
|
+
var TabsList = styled(TabsList$1, {
|
253
|
+
"&:focus": {
|
254
|
+
boxShadow: "inset 0 0 0 1px $neutral8, 0 0 0 1px $neutral8",
|
255
|
+
},
|
256
|
+
'&[data-orientation="vertical"]': {
|
257
|
+
boxShadow: "inset -1px 0 0 $neutral6",
|
258
|
+
},
|
259
|
+
});
|
260
|
+
var TabsContent = styled(TabsContent$1, {
|
261
|
+
"&:focus": {
|
262
|
+
boxShadow: "inset 0 0 0 1px $neutral8, 0 0 0 1px $neutral8",
|
263
|
+
},
|
264
|
+
});
|
265
|
+
|
266
|
+
var fadeIn = keyframes({
|
267
|
+
from: { opacity: 0 },
|
268
|
+
to: { opacity: 1 },
|
269
|
+
});
|
270
|
+
var scaleIn = keyframes({
|
271
|
+
from: { transform: "translate(-50%, -50%) scale(0.9)" },
|
272
|
+
to: { transform: "translate(-50%, -50%) scale(1)" },
|
273
|
+
});
|
274
|
+
var fadeout = keyframes({
|
275
|
+
from: { opacity: 1 },
|
276
|
+
to: { opacity: 0 },
|
277
|
+
});
|
278
|
+
var StyledOverlay = styled(AlertDialogPrimitive.Overlay, {
|
279
|
+
position: "fixed",
|
280
|
+
top: 0,
|
281
|
+
right: 0,
|
282
|
+
bottom: 0,
|
283
|
+
left: 0,
|
284
|
+
backgroundColor: "rgba(0,0,0,.35)",
|
285
|
+
inset: 0,
|
286
|
+
variants: {
|
287
|
+
animation: {
|
288
|
+
true: {
|
289
|
+
'&[data-state="open"]': {
|
290
|
+
animation: "".concat(fadeIn, " 300ms ease-out"),
|
291
|
+
},
|
292
|
+
'&[data-state="closed"]': {
|
293
|
+
animation: "".concat(fadeout, " 200ms ease-out"),
|
294
|
+
},
|
295
|
+
},
|
296
|
+
},
|
297
|
+
},
|
298
|
+
});
|
299
|
+
function AlertDialog(_a) {
|
300
|
+
var children = _a.children, props = __rest(_a, ["children"]);
|
301
|
+
return (React.createElement(AlertDialogPrimitive.Root, __assign({}, props),
|
302
|
+
React.createElement(StyledOverlay, { animation: true }),
|
303
|
+
children));
|
304
|
+
}
|
305
|
+
var StyledAlertDialogContent = styled(AlertDialogPrimitive.Content, {
|
306
|
+
position: "fixed",
|
307
|
+
top: "50%",
|
308
|
+
left: "50%",
|
309
|
+
transform: "translate(-50%, -50%)",
|
310
|
+
maxHeight: "85vh",
|
311
|
+
padding: "$4",
|
312
|
+
marginTop: "-5vh",
|
313
|
+
backgroundColor: "$panel",
|
314
|
+
borderRadius: "$4",
|
315
|
+
boxShadow: "$colors$shadowLight 0px 10px 38px -10px, $colors$shadowDark 0px 10px 20px -15px",
|
316
|
+
color: "$black",
|
317
|
+
"&:focus": {
|
318
|
+
outline: "none",
|
319
|
+
},
|
320
|
+
variants: {
|
321
|
+
animation: {
|
322
|
+
fade: {
|
323
|
+
'&[data-state="open"]': {
|
324
|
+
animation: "".concat(fadeIn, " 300ms ease-out"),
|
325
|
+
},
|
326
|
+
'&[data-state="closed"]': {
|
327
|
+
animation: "".concat(fadeout, " 200ms ease-out"),
|
328
|
+
},
|
329
|
+
},
|
330
|
+
scale: {
|
331
|
+
animation: "".concat(fadeIn, " 300ms ease-out, ").concat(scaleIn, " 200ms ease-out"),
|
332
|
+
},
|
333
|
+
},
|
334
|
+
},
|
335
|
+
defaultVariants: {
|
336
|
+
animation: "scale",
|
337
|
+
},
|
338
|
+
});
|
339
|
+
var AlertDialogContent = function (_a) {
|
340
|
+
var children = _a.children, _b = _a.animation, animation = _b === void 0 ? "scale" : _b, props = __rest(_a, ["children", "animation"]);
|
341
|
+
return (React.createElement(StyledAlertDialogContent, __assign({ animation: animation }, props), children));
|
342
|
+
};
|
343
|
+
var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
344
|
+
var AlertDialogTitle = AlertDialogPrimitive.Title;
|
345
|
+
var AlertDialogDescription = AlertDialogPrimitive.Description;
|
346
|
+
var AlertDialogCancel = AlertDialogPrimitive.Cancel;
|
347
|
+
var AlertDialogAction = AlertDialogPrimitive.Action;
|
348
|
+
|
349
|
+
var DEFAULT_TAG$5 = "button";
|
350
|
+
var colorVariants = {};
|
351
|
+
var compoundVariants = [];
|
352
|
+
for (var color$1 in naturalPairings) {
|
353
|
+
colorVariants[color$1] = {
|
354
|
+
bc: "$".concat(color$1, "4"),
|
355
|
+
color: "$".concat(color$1, "11"),
|
356
|
+
"&:hover": { bc: "$".concat(color$1, "5") },
|
357
|
+
"&:active": { bc: "$".concat(color$1, "6") },
|
358
|
+
'&[data-radix-popover-trigger][data-state="open"], &[data-radix-dropdown-menu-trigger][data-state="open"]': {
|
359
|
+
bc: "$".concat(color$1, "4"),
|
360
|
+
boxShadow: "inset 0 0 0 1px $colors$".concat(color$1, "8"),
|
361
|
+
},
|
362
|
+
};
|
363
|
+
compoundVariants.push({
|
364
|
+
variant: color$1,
|
365
|
+
ghost: "true",
|
366
|
+
css: {
|
367
|
+
bc: "transparent",
|
368
|
+
"&:hover": {
|
369
|
+
bc: "$".concat(color$1, "3"),
|
370
|
+
boxShadow: "none",
|
371
|
+
},
|
372
|
+
"&:active": {
|
373
|
+
bc: "$".concat(color$1, "4"),
|
374
|
+
},
|
375
|
+
'&[data-radix-popover-trigger][data-state="open"], &[data-radix-dropdown-menu-trigger][data-state="open"]': {
|
376
|
+
bc: "$".concat(color$1, "4"),
|
377
|
+
boxShadow: "none",
|
378
|
+
},
|
379
|
+
},
|
380
|
+
});
|
381
|
+
}
|
382
|
+
var Button = styled(DEFAULT_TAG$5, {
|
383
|
+
// Reset
|
384
|
+
all: "unset",
|
385
|
+
alignItems: "center",
|
386
|
+
boxSizing: "border-box",
|
387
|
+
userSelect: "none",
|
388
|
+
"&::before": {
|
389
|
+
boxSizing: "border-box",
|
390
|
+
},
|
391
|
+
"&::after": {
|
392
|
+
boxSizing: "border-box",
|
393
|
+
},
|
394
|
+
// Custom reset?
|
395
|
+
display: "inline-flex",
|
396
|
+
flexShrink: 0,
|
397
|
+
justifyContent: "center",
|
398
|
+
lineHeight: "1",
|
399
|
+
WebkitTapHighlightColor: "rgba(0,0,0,0)",
|
400
|
+
// Custom
|
401
|
+
height: "$5",
|
402
|
+
fontFamily: "$body",
|
403
|
+
fontSize: "$2",
|
404
|
+
fontWeight: 600,
|
405
|
+
fontVariantNumeric: "tabular-nums",
|
406
|
+
ai: "center",
|
407
|
+
cursor: "pointer",
|
408
|
+
px: "$3",
|
409
|
+
bc: "$neutral4",
|
410
|
+
borderRadius: "$2",
|
411
|
+
"&:hover": { bc: "$neutral5" },
|
412
|
+
"&:active": { bc: "$neutral6" },
|
413
|
+
"&:disabled": {
|
414
|
+
bc: "$neutral2",
|
415
|
+
color: "$neutral8",
|
416
|
+
cursor: "not-allowed",
|
417
|
+
},
|
418
|
+
variants: {
|
419
|
+
size: {
|
420
|
+
"1": {
|
421
|
+
borderRadius: "$2",
|
422
|
+
height: "$5",
|
423
|
+
px: "$2",
|
424
|
+
fontSize: "$1",
|
425
|
+
lineHeight: "$sizes$5",
|
426
|
+
},
|
427
|
+
"2": {
|
428
|
+
borderRadius: "$3",
|
429
|
+
height: "$5",
|
430
|
+
px: "$3",
|
431
|
+
py: "$3",
|
432
|
+
fontSize: "$2",
|
433
|
+
lineHeight: "$sizes$6",
|
434
|
+
},
|
435
|
+
"3": {
|
436
|
+
borderRadius: "$3",
|
437
|
+
height: "$6",
|
438
|
+
px: "$3",
|
439
|
+
fontSize: "$3",
|
440
|
+
lineHeight: "$sizes$6",
|
441
|
+
},
|
442
|
+
"4": {
|
443
|
+
borderRadius: "$4",
|
444
|
+
height: "$7",
|
445
|
+
px: "$4",
|
446
|
+
fontSize: "$4",
|
447
|
+
lineHeight: "$sizes$7",
|
448
|
+
},
|
449
|
+
},
|
450
|
+
variant: __assign(__assign({ primary: {
|
451
|
+
bc: "$primary4",
|
452
|
+
color: "$primary11",
|
453
|
+
"&:hover": { bc: "$primary5" },
|
454
|
+
"&:active": { bc: "$primary6" },
|
455
|
+
"&:disabled": {
|
456
|
+
bc: "$primary2",
|
457
|
+
color: "$primary8",
|
458
|
+
},
|
459
|
+
'&[data-radix-popover-trigger][data-state="open"], &[data-radix-dropdown-menu-trigger][data-state="open"]': {
|
460
|
+
bc: "$primary4",
|
461
|
+
boxShadow: "inset 0 0 0 1px $colors$primary8",
|
462
|
+
},
|
463
|
+
}, neutral: {
|
464
|
+
bc: "$neutral4",
|
465
|
+
color: "$neutral11",
|
466
|
+
"&:hover": { bc: "$neutral5" },
|
467
|
+
"&:active": { bc: "$neutral6" },
|
468
|
+
"&:disabled": {
|
469
|
+
bc: "$neutral4",
|
470
|
+
color: "$neutral8",
|
471
|
+
},
|
472
|
+
'&[data-radix-popover-trigger][data-state="open"], &[data-radix-dropdown-menu-trigger][data-state="open"]': {
|
473
|
+
bc: "$neutral4",
|
474
|
+
boxShadow: "inset 0 0 0 1px $colors$primary8",
|
475
|
+
},
|
476
|
+
} }, colorVariants), { transparentWhite: {
|
477
|
+
bc: "hsla(0,100%,100%,.2)",
|
478
|
+
color: "white",
|
479
|
+
"&:hover": {
|
480
|
+
bc: "hsla(0,100%,100%,.25)",
|
481
|
+
},
|
482
|
+
"&:active": {
|
483
|
+
bc: "hsla(0,100%,100%,.3)",
|
484
|
+
},
|
485
|
+
"&:disabled": {
|
486
|
+
bc: "hsla(0,100%,100%,.2)",
|
487
|
+
color: "white",
|
488
|
+
opacity: 0.4,
|
489
|
+
},
|
490
|
+
}, transparentBlack: {
|
491
|
+
bc: "hsla(0,0%,0%,.2)",
|
492
|
+
color: "black",
|
493
|
+
"&:hover": {
|
494
|
+
bc: "hsla(0,0%,0%,.25)",
|
495
|
+
},
|
496
|
+
"&:active": {
|
497
|
+
bc: "hsla(0,0%,0%,.3)",
|
498
|
+
},
|
499
|
+
} }),
|
500
|
+
ghost: {
|
501
|
+
true: {
|
502
|
+
bc: "transparent",
|
503
|
+
boxShadow: "none",
|
504
|
+
},
|
505
|
+
},
|
506
|
+
},
|
507
|
+
compoundVariants: __spreadArray([
|
508
|
+
{
|
509
|
+
variant: "primary",
|
510
|
+
ghost: "true",
|
511
|
+
css: {
|
512
|
+
bc: "transparent",
|
513
|
+
"&:hover": {
|
514
|
+
bc: "$primary3",
|
515
|
+
boxShadow: "none",
|
516
|
+
},
|
517
|
+
"&:active": {
|
518
|
+
bc: "$primary4",
|
519
|
+
},
|
520
|
+
'&[data-radix-popover-trigger][data-state="open"], &[data-radix-dropdown-menu-trigger][data-state="open"]': {
|
521
|
+
bc: "$primary4",
|
522
|
+
boxShadow: "none",
|
523
|
+
},
|
524
|
+
},
|
525
|
+
},
|
526
|
+
{
|
527
|
+
variant: "neutral",
|
528
|
+
ghost: "true",
|
529
|
+
css: {
|
530
|
+
bc: "transparent",
|
531
|
+
color: "$neutral11",
|
532
|
+
"&:hover": {
|
533
|
+
bc: "$neutral3",
|
534
|
+
boxShadow: "none",
|
535
|
+
},
|
536
|
+
"&:active": {
|
537
|
+
bc: "$neutral4",
|
538
|
+
},
|
539
|
+
'&[data-radix-popover-trigger][data-state="open"], &[data-radix-dropdown-menu-trigger][data-state="open"]': {
|
540
|
+
bc: "$neutral4",
|
541
|
+
boxShadow: "none",
|
542
|
+
},
|
543
|
+
},
|
544
|
+
}
|
545
|
+
], compoundVariants, true),
|
546
|
+
defaultVariants: {
|
547
|
+
size: "1",
|
548
|
+
variant: "neutral",
|
549
|
+
},
|
550
|
+
});
|
551
|
+
|
552
|
+
var _a$2;
|
553
|
+
var DEFAULT_TAG$4 = "a";
|
554
|
+
var Link = styled(DEFAULT_TAG$4, (_a$2 = {
|
555
|
+
alignItems: "center",
|
556
|
+
gap: "$1",
|
557
|
+
flexShrink: 0,
|
558
|
+
outline: "none",
|
559
|
+
textDecorationLine: "none",
|
560
|
+
textUnderlineOffset: "3px",
|
561
|
+
textDecorationColor: "$neutral4",
|
562
|
+
WebkitTapHighlightColor: "rgba(0,0,0,0)",
|
563
|
+
lineHeight: "inherit",
|
564
|
+
"@hover": {
|
565
|
+
"&:hover": {
|
566
|
+
textDecorationLine: "underline",
|
567
|
+
},
|
568
|
+
},
|
569
|
+
"&:focus": {
|
570
|
+
outline: "none",
|
571
|
+
textDecorationLine: "none",
|
572
|
+
}
|
573
|
+
},
|
574
|
+
_a$2["& ".concat(Text$1)] = {
|
575
|
+
color: "inherit",
|
576
|
+
},
|
577
|
+
_a$2.variants = {
|
578
|
+
variant: {
|
579
|
+
blue: {
|
580
|
+
color: "$blue11",
|
581
|
+
textDecorationColor: "$blue4",
|
582
|
+
"&:focus": {
|
583
|
+
outlineColor: "$blue8",
|
584
|
+
},
|
585
|
+
},
|
586
|
+
indigo: {
|
587
|
+
color: "$indigo11",
|
588
|
+
textDecorationColor: "$indigo4",
|
589
|
+
"&:focus": {
|
590
|
+
outlineColor: "$indigo8",
|
591
|
+
},
|
592
|
+
},
|
593
|
+
primary: {
|
594
|
+
color: "$primary11",
|
595
|
+
textDecorationColor: "$primary4",
|
596
|
+
"&:focus": {
|
597
|
+
outlineColor: "$primary8",
|
598
|
+
},
|
599
|
+
},
|
600
|
+
subtle: {
|
601
|
+
color: "$neutral11",
|
602
|
+
textDecorationColor: "$neutral4",
|
603
|
+
"&:focus": {
|
604
|
+
outlineColor: "$neutral8",
|
605
|
+
},
|
606
|
+
},
|
607
|
+
contrast: {
|
608
|
+
color: "$hiContrast",
|
609
|
+
textDecoration: "underline",
|
610
|
+
textDecorationColor: "$neutral4",
|
611
|
+
"@hover": {
|
612
|
+
"&:hover": {
|
613
|
+
textDecorationColor: "$neutral7",
|
614
|
+
},
|
615
|
+
},
|
616
|
+
"&:focus": {
|
617
|
+
outlineColor: "$neutral8",
|
618
|
+
},
|
619
|
+
},
|
620
|
+
},
|
621
|
+
},
|
622
|
+
_a$2.defaultVariants = {
|
623
|
+
variant: "contrast",
|
624
|
+
},
|
625
|
+
_a$2));
|
626
|
+
|
627
|
+
var DEFAULT_TAG$3 = Box;
|
628
|
+
var Banner = styled(DEFAULT_TAG$3, {
|
629
|
+
// Reset
|
630
|
+
boxSizing: "border-box",
|
631
|
+
"&::before": {
|
632
|
+
boxSizing: "border-box",
|
633
|
+
},
|
634
|
+
"&::after": {
|
635
|
+
boxSizing: "border-box",
|
636
|
+
},
|
637
|
+
display: "flex",
|
638
|
+
justifyContent: "center",
|
639
|
+
alignItems: "center",
|
640
|
+
gap: "$3",
|
641
|
+
variants: {
|
642
|
+
size: {
|
643
|
+
"1": {
|
644
|
+
py: "$1",
|
645
|
+
px: "$4",
|
646
|
+
},
|
647
|
+
},
|
648
|
+
variant: {
|
649
|
+
loContrast: {
|
650
|
+
backgroundColor: "$loContrast",
|
651
|
+
},
|
652
|
+
gray: {
|
653
|
+
backgroundColor: "$neutral3",
|
654
|
+
},
|
655
|
+
blue: {
|
656
|
+
backgroundColor: "$blue3",
|
657
|
+
},
|
658
|
+
green: {
|
659
|
+
backgroundColor: "$green3",
|
660
|
+
},
|
661
|
+
indigo: {
|
662
|
+
backgroundColor: "$indigo3",
|
663
|
+
},
|
664
|
+
violet: {
|
665
|
+
backgroundColor: "$violet3",
|
666
|
+
},
|
667
|
+
red: {
|
668
|
+
backgroundColor: "$red3",
|
669
|
+
},
|
670
|
+
},
|
671
|
+
rounded: {
|
672
|
+
true: {
|
673
|
+
borderRadius: "$pill",
|
674
|
+
},
|
675
|
+
},
|
676
|
+
border: {
|
677
|
+
true: {
|
678
|
+
borderRadius: "$pill",
|
679
|
+
},
|
680
|
+
},
|
681
|
+
},
|
682
|
+
compoundVariants: [
|
683
|
+
{
|
684
|
+
border: "true",
|
685
|
+
variant: "gray",
|
686
|
+
css: {
|
687
|
+
borderColor: "$neutral6",
|
688
|
+
},
|
689
|
+
},
|
690
|
+
{
|
691
|
+
border: "true",
|
692
|
+
variant: "blue",
|
693
|
+
css: {
|
694
|
+
borderColor: "$blue9",
|
695
|
+
},
|
696
|
+
},
|
697
|
+
{
|
698
|
+
border: "true",
|
699
|
+
variant: "indigo",
|
700
|
+
css: {
|
701
|
+
borderColor: "$indigo9",
|
702
|
+
},
|
703
|
+
},
|
704
|
+
{
|
705
|
+
border: "true",
|
706
|
+
variant: "violet",
|
707
|
+
css: {
|
708
|
+
borderColor: "$violet9",
|
709
|
+
},
|
710
|
+
},
|
711
|
+
{
|
712
|
+
border: "true",
|
713
|
+
variant: "loContrast",
|
714
|
+
css: {
|
715
|
+
borderColor: "$neutral6",
|
716
|
+
},
|
717
|
+
},
|
718
|
+
],
|
719
|
+
defaultVariants: {
|
720
|
+
size: "1",
|
721
|
+
variant: "gray",
|
722
|
+
},
|
723
|
+
});
|
724
|
+
|
725
|
+
var DEFAULT_TAG$2 = "div";
|
726
|
+
var Promo = styled(DEFAULT_TAG$2, {
|
727
|
+
// Reset
|
728
|
+
boxSizing: "border-box",
|
729
|
+
"&::before": {
|
730
|
+
boxSizing: "border-box",
|
731
|
+
},
|
732
|
+
"&::after": {
|
733
|
+
boxSizing: "border-box",
|
734
|
+
},
|
735
|
+
p: "$4",
|
736
|
+
display: "flex",
|
737
|
+
flexDirection: "column",
|
738
|
+
borderRadius: "$4",
|
739
|
+
variants: {
|
740
|
+
size: {
|
741
|
+
"1": {
|
742
|
+
py: "$2",
|
743
|
+
px: "$3",
|
744
|
+
},
|
745
|
+
"2": {
|
746
|
+
py: "$3",
|
747
|
+
px: "$4",
|
748
|
+
},
|
749
|
+
"3": {
|
750
|
+
py: "$4",
|
751
|
+
px: "$5",
|
752
|
+
},
|
753
|
+
},
|
754
|
+
variant: {
|
755
|
+
loContrast: {
|
756
|
+
backgroundColor: "$loContrast",
|
757
|
+
},
|
758
|
+
subtle: {
|
759
|
+
backgroundColor: "$neutral2",
|
760
|
+
boxShadow: "0 0 0 1px $colors$neutral6",
|
761
|
+
},
|
762
|
+
blue: {
|
763
|
+
backgroundColor: "$blue2",
|
764
|
+
boxShadow: "0 0 0 1px $colors$blue6",
|
765
|
+
},
|
766
|
+
green: {
|
767
|
+
backgroundColor: "$green2",
|
768
|
+
boxShadow: "0 0 0 1px $colors$green6",
|
769
|
+
},
|
770
|
+
indigo: {
|
771
|
+
backgroundColor: "$indigo2",
|
772
|
+
boxShadow: "0 0 0 1px $colors$indigo6",
|
773
|
+
},
|
774
|
+
violet: {
|
775
|
+
backgroundColor: "$violet2",
|
776
|
+
boxShadow: "0 0 0 1px $colors$violet6",
|
777
|
+
},
|
778
|
+
red: {
|
779
|
+
backgroundColor: "$red2",
|
780
|
+
boxShadow: "0 0 0 1px $colors$red6",
|
781
|
+
},
|
782
|
+
},
|
783
|
+
rounded: {
|
784
|
+
true: {
|
785
|
+
borderRadius: "$pill",
|
786
|
+
},
|
787
|
+
},
|
788
|
+
border: {
|
789
|
+
true: {
|
790
|
+
borderRadius: "$pill",
|
791
|
+
},
|
792
|
+
},
|
793
|
+
},
|
794
|
+
compoundVariants: [
|
795
|
+
{
|
796
|
+
border: "true",
|
797
|
+
variant: "subtle",
|
798
|
+
css: {
|
799
|
+
borderColor: "$neutral6",
|
800
|
+
},
|
801
|
+
},
|
802
|
+
{
|
803
|
+
border: "true",
|
804
|
+
variant: "blue",
|
805
|
+
css: {
|
806
|
+
borderColor: "$blue11",
|
807
|
+
},
|
808
|
+
},
|
809
|
+
{
|
810
|
+
border: "true",
|
811
|
+
variant: "indigo",
|
812
|
+
css: {
|
813
|
+
borderColor: "$indigo11",
|
814
|
+
},
|
815
|
+
},
|
816
|
+
{
|
817
|
+
border: "true",
|
818
|
+
variant: "violet",
|
819
|
+
css: {
|
820
|
+
borderColor: "$violet11",
|
821
|
+
},
|
822
|
+
},
|
823
|
+
{
|
824
|
+
border: "true",
|
825
|
+
variant: "loContrast",
|
826
|
+
css: {
|
827
|
+
borderColor: "$neutral6",
|
828
|
+
},
|
829
|
+
},
|
830
|
+
],
|
831
|
+
defaultVariants: {
|
832
|
+
size: "1",
|
833
|
+
variant: "subtle",
|
834
|
+
},
|
835
|
+
});
|
836
|
+
|
837
|
+
var Label = styled(BaseLabel.Root, {
|
838
|
+
fontSize: "$2",
|
839
|
+
});
|
840
|
+
|
841
|
+
var DEFAULT_TAG$1 = "span";
|
842
|
+
var Text = styled(DEFAULT_TAG$1, {
|
843
|
+
// Reset
|
844
|
+
lineHeight: 1.5,
|
845
|
+
margin: "0",
|
846
|
+
fontWeight: 400,
|
847
|
+
fontVariantNumeric: "tabular-nums",
|
848
|
+
display: "block",
|
849
|
+
variants: {
|
850
|
+
size: {
|
851
|
+
"1": {
|
852
|
+
fontSize: "$1",
|
853
|
+
},
|
854
|
+
"2": {
|
855
|
+
fontSize: "$2",
|
856
|
+
},
|
857
|
+
"3": {
|
858
|
+
fontSize: "$3",
|
859
|
+
},
|
860
|
+
"4": {
|
861
|
+
fontSize: "$4",
|
862
|
+
},
|
863
|
+
"5": {
|
864
|
+
fontSize: "$5",
|
865
|
+
letterSpacing: "-.015em",
|
866
|
+
},
|
867
|
+
"6": {
|
868
|
+
fontSize: "$6",
|
869
|
+
letterSpacing: "-.016em",
|
870
|
+
},
|
871
|
+
"7": {
|
872
|
+
fontSize: "$7",
|
873
|
+
letterSpacing: "-.031em",
|
874
|
+
textIndent: "-.005em",
|
875
|
+
},
|
876
|
+
"8": {
|
877
|
+
fontSize: "$8",
|
878
|
+
letterSpacing: "-.034em",
|
879
|
+
textIndent: "-.018em",
|
880
|
+
},
|
881
|
+
"9": {
|
882
|
+
fontSize: "$9",
|
883
|
+
letterSpacing: "-.055em",
|
884
|
+
textIndent: "-.025em",
|
885
|
+
},
|
886
|
+
},
|
887
|
+
variant: {
|
888
|
+
red: {
|
889
|
+
color: "$red11",
|
890
|
+
},
|
891
|
+
crimson: {
|
892
|
+
color: "$crimson11",
|
893
|
+
},
|
894
|
+
pink: {
|
895
|
+
color: "$pink11",
|
896
|
+
},
|
897
|
+
purple: {
|
898
|
+
color: "$purple11",
|
899
|
+
},
|
900
|
+
violet: {
|
901
|
+
color: "$violet11",
|
902
|
+
},
|
903
|
+
indigo: {
|
904
|
+
color: "$indigo11",
|
905
|
+
},
|
906
|
+
blue: {
|
907
|
+
color: "$blue11",
|
908
|
+
},
|
909
|
+
cyan: {
|
910
|
+
color: "$cyan11",
|
911
|
+
},
|
912
|
+
teal: {
|
913
|
+
color: "$teal11",
|
914
|
+
},
|
915
|
+
green: {
|
916
|
+
color: "$green11",
|
917
|
+
},
|
918
|
+
lime: {
|
919
|
+
color: "$lime11",
|
920
|
+
},
|
921
|
+
yellow: {
|
922
|
+
color: "$yellow11",
|
923
|
+
},
|
924
|
+
orange: {
|
925
|
+
color: "$orange11",
|
926
|
+
},
|
927
|
+
gold: {
|
928
|
+
color: "$gold11",
|
929
|
+
},
|
930
|
+
bronze: {
|
931
|
+
color: "$bronze11",
|
932
|
+
},
|
933
|
+
gray: {
|
934
|
+
color: "$slate11",
|
935
|
+
},
|
936
|
+
primary: {
|
937
|
+
color: "$primary11",
|
938
|
+
},
|
939
|
+
neutral: {
|
940
|
+
color: "$neutral11",
|
941
|
+
},
|
942
|
+
contrast: {
|
943
|
+
color: "$hiContrast",
|
944
|
+
},
|
945
|
+
},
|
946
|
+
gradient: {
|
947
|
+
true: {
|
948
|
+
WebkitBackgroundClip: "text",
|
949
|
+
WebkitTextFillColor: "transparent",
|
950
|
+
},
|
951
|
+
},
|
952
|
+
},
|
953
|
+
compoundVariants: [
|
954
|
+
{
|
955
|
+
variant: "red",
|
956
|
+
gradient: "true",
|
957
|
+
css: {
|
958
|
+
background: "linear-gradient(to right, $red11, $crimson11)",
|
959
|
+
},
|
960
|
+
},
|
961
|
+
{
|
962
|
+
variant: "crimson",
|
963
|
+
gradient: "true",
|
964
|
+
css: {
|
965
|
+
background: "linear-gradient(to right, $crimson11, $pink11)",
|
966
|
+
},
|
967
|
+
},
|
968
|
+
{
|
969
|
+
variant: "pink",
|
970
|
+
gradient: "true",
|
971
|
+
css: {
|
972
|
+
background: "linear-gradient(to right, $pink11, $purple11)",
|
973
|
+
},
|
974
|
+
},
|
975
|
+
{
|
976
|
+
variant: "purple",
|
977
|
+
gradient: "true",
|
978
|
+
css: {
|
979
|
+
background: "linear-gradient(to right, $purple11, $violet11)",
|
980
|
+
},
|
981
|
+
},
|
982
|
+
{
|
983
|
+
variant: "violet",
|
984
|
+
gradient: "true",
|
985
|
+
css: {
|
986
|
+
background: "linear-gradient(to right, $violet11, $indigo11)",
|
987
|
+
},
|
988
|
+
},
|
989
|
+
{
|
990
|
+
variant: "indigo",
|
991
|
+
gradient: "true",
|
992
|
+
css: {
|
993
|
+
background: "linear-gradient(to right, $indigo11, $blue11)",
|
994
|
+
},
|
995
|
+
},
|
996
|
+
{
|
997
|
+
variant: "blue",
|
998
|
+
gradient: "true",
|
999
|
+
css: {
|
1000
|
+
background: "linear-gradient(to right, $blue11, $cyan11)",
|
1001
|
+
},
|
1002
|
+
},
|
1003
|
+
{
|
1004
|
+
variant: "cyan",
|
1005
|
+
gradient: "true",
|
1006
|
+
css: {
|
1007
|
+
background: "linear-gradient(to right, $cyan11, $teal11)",
|
1008
|
+
},
|
1009
|
+
},
|
1010
|
+
{
|
1011
|
+
variant: "teal",
|
1012
|
+
gradient: "true",
|
1013
|
+
css: {
|
1014
|
+
background: "linear-gradient(to right, $teal11, $green11)",
|
1015
|
+
},
|
1016
|
+
},
|
1017
|
+
{
|
1018
|
+
variant: "green",
|
1019
|
+
gradient: "true",
|
1020
|
+
css: {
|
1021
|
+
background: "linear-gradient(to right, $green11, $lime11)",
|
1022
|
+
},
|
1023
|
+
},
|
1024
|
+
{
|
1025
|
+
variant: "lime",
|
1026
|
+
gradient: "true",
|
1027
|
+
css: {
|
1028
|
+
background: "linear-gradient(to right, $lime11, $yellow11)",
|
1029
|
+
},
|
1030
|
+
},
|
1031
|
+
{
|
1032
|
+
variant: "yellow",
|
1033
|
+
gradient: "true",
|
1034
|
+
css: {
|
1035
|
+
background: "linear-gradient(to right, $yellow11, $orange11)",
|
1036
|
+
},
|
1037
|
+
},
|
1038
|
+
{
|
1039
|
+
variant: "orange",
|
1040
|
+
gradient: "true",
|
1041
|
+
css: {
|
1042
|
+
background: "linear-gradient(to right, $orange11, $red11)",
|
1043
|
+
},
|
1044
|
+
},
|
1045
|
+
{
|
1046
|
+
variant: "gold",
|
1047
|
+
gradient: "true",
|
1048
|
+
css: {
|
1049
|
+
background: "linear-gradient(to right, $gold11, $gold9)",
|
1050
|
+
},
|
1051
|
+
},
|
1052
|
+
{
|
1053
|
+
variant: "bronze",
|
1054
|
+
gradient: "true",
|
1055
|
+
css: {
|
1056
|
+
background: "linear-gradient(to right, $bronze11, $bronze9)",
|
1057
|
+
},
|
1058
|
+
},
|
1059
|
+
{
|
1060
|
+
variant: "gray",
|
1061
|
+
gradient: "true",
|
1062
|
+
css: {
|
1063
|
+
background: "linear-gradient(to right, $gray11, $gray12)",
|
1064
|
+
},
|
1065
|
+
},
|
1066
|
+
{
|
1067
|
+
variant: "contrast",
|
1068
|
+
gradient: "true",
|
1069
|
+
css: {
|
1070
|
+
background: "linear-gradient(to right, $hiContrast, $gray12)",
|
1071
|
+
},
|
1072
|
+
},
|
1073
|
+
],
|
1074
|
+
defaultVariants: {
|
1075
|
+
size: "3",
|
1076
|
+
variant: "contrast",
|
1077
|
+
},
|
1078
|
+
});
|
1079
|
+
|
1080
|
+
var DEFAULT_TAG = "input";
|
1081
|
+
var StyledTextField = styled(DEFAULT_TAG, {
|
1082
|
+
// Reset
|
1083
|
+
appearance: "none",
|
1084
|
+
borderWidth: "0",
|
1085
|
+
boxSizing: "border-box",
|
1086
|
+
fontFamily: "inherit",
|
1087
|
+
margin: "0",
|
1088
|
+
outline: "none",
|
1089
|
+
padding: "0",
|
1090
|
+
width: "100%",
|
1091
|
+
WebkitTapHighlightColor: "rgba(0,0,0,0)",
|
1092
|
+
lineHeight: "1",
|
1093
|
+
"&::before": {
|
1094
|
+
boxSizing: "border-box",
|
1095
|
+
},
|
1096
|
+
"&::after": {
|
1097
|
+
boxSizing: "border-box",
|
1098
|
+
},
|
1099
|
+
// Custom
|
1100
|
+
backgroundColor: "$loContrast",
|
1101
|
+
boxShadow: "inset 0 0 0 1px $colors$neutral7",
|
1102
|
+
color: "$hiContrast",
|
1103
|
+
fontVariantNumeric: "tabular-nums",
|
1104
|
+
"&:-webkit-autofill": {
|
1105
|
+
boxShadow: "inset 0 0 0 1px $colors$primary6, inset 0 0 0 100px $colors$primary3",
|
1106
|
+
},
|
1107
|
+
"&:-webkit-autofill::first-line": {
|
1108
|
+
fontFamily: "$body",
|
1109
|
+
color: "$hiContrast",
|
1110
|
+
},
|
1111
|
+
"&:focus": {
|
1112
|
+
boxShadow: "inset 0px 0px 0px 1px $colors$primary8, 0px 0px 0px 1px $colors$primary8",
|
1113
|
+
"&:-webkit-autofill": {
|
1114
|
+
boxShadow: "inset 0px 0px 0px 1px $colors$primary8, 0px 0px 0px 1px $colors$primary8, inset 0 0 0 100px $colors$primary3",
|
1115
|
+
},
|
1116
|
+
},
|
1117
|
+
"&::placeholder": {
|
1118
|
+
color: "$neutral9",
|
1119
|
+
},
|
1120
|
+
"&:disabled": {
|
1121
|
+
pointerEvents: "none",
|
1122
|
+
backgroundColor: "$neutral2",
|
1123
|
+
color: "$neutral8",
|
1124
|
+
cursor: "not-allowed",
|
1125
|
+
"&::placeholder": {
|
1126
|
+
color: "$neutral7",
|
1127
|
+
},
|
1128
|
+
},
|
1129
|
+
"&:read-only": {
|
1130
|
+
backgroundColor: "$neutral2",
|
1131
|
+
"&:focus": {
|
1132
|
+
boxShadow: "inset 0px 0px 0px 1px $colors$neutral7",
|
1133
|
+
},
|
1134
|
+
},
|
1135
|
+
variants: {
|
1136
|
+
size: {
|
1137
|
+
"1": {
|
1138
|
+
borderRadius: "$1",
|
1139
|
+
height: "$5",
|
1140
|
+
fontSize: "$1",
|
1141
|
+
px: "$1",
|
1142
|
+
"&:-webkit-autofill::first-line": {
|
1143
|
+
fontSize: "$1",
|
1144
|
+
},
|
1145
|
+
},
|
1146
|
+
"2": {
|
1147
|
+
borderRadius: "$2",
|
1148
|
+
height: "$6",
|
1149
|
+
fontSize: "$3",
|
1150
|
+
px: "$2",
|
1151
|
+
"&:-webkit-autofill::first-line": {
|
1152
|
+
fontSize: "$3",
|
1153
|
+
},
|
1154
|
+
},
|
1155
|
+
"3": {
|
1156
|
+
borderRadius: "$2",
|
1157
|
+
height: "$7",
|
1158
|
+
fontSize: "$3",
|
1159
|
+
px: "$2",
|
1160
|
+
"&:-webkit-autofill::first-line": {
|
1161
|
+
fontSize: "$3",
|
1162
|
+
},
|
1163
|
+
},
|
1164
|
+
},
|
1165
|
+
variant: {
|
1166
|
+
ghost: {
|
1167
|
+
boxShadow: "none",
|
1168
|
+
backgroundColor: "transparent",
|
1169
|
+
"@hover": {
|
1170
|
+
"&:hover": {
|
1171
|
+
boxShadow: "inset 0 0 0 1px $colors$neutralA7",
|
1172
|
+
},
|
1173
|
+
},
|
1174
|
+
"&:focus": {
|
1175
|
+
backgroundColor: "$loContrast",
|
1176
|
+
boxShadow: "inset 0px 0px 0px 1px $colors$primary8, 0px 0px 0px 1px $colors$primary8",
|
1177
|
+
},
|
1178
|
+
"&:disabled": {
|
1179
|
+
backgroundColor: "transparent",
|
1180
|
+
},
|
1181
|
+
"&:read-only": {
|
1182
|
+
backgroundColor: "transparent",
|
1183
|
+
},
|
1184
|
+
},
|
1185
|
+
white: {
|
1186
|
+
boxShadow: "inset 0 0 0 1px $colors$neutral7",
|
1187
|
+
backgroundColor: "white",
|
1188
|
+
"@hover": {
|
1189
|
+
"&:hover": {
|
1190
|
+
boxShadow: "inset 0 0 0 1px $colors$neutralA7",
|
1191
|
+
},
|
1192
|
+
},
|
1193
|
+
"&:focus": {
|
1194
|
+
backgroundColor: "white",
|
1195
|
+
boxShadow: "inset 0px 0px 0px 1px $colors$primary8, 0px 0px 0px 1px $colors$primary8",
|
1196
|
+
},
|
1197
|
+
"&::placeholder": {
|
1198
|
+
color: "$neutral9",
|
1199
|
+
},
|
1200
|
+
"&:disabled": {
|
1201
|
+
pointerEvents: "none",
|
1202
|
+
backgroundColor: "$neutral2",
|
1203
|
+
color: "$neutral8",
|
1204
|
+
cursor: "not-allowed",
|
1205
|
+
"&::placeholder": {
|
1206
|
+
color: "$neutral7",
|
1207
|
+
},
|
1208
|
+
},
|
1209
|
+
"&:read-only": {
|
1210
|
+
backgroundColor: "$neutral2",
|
1211
|
+
"&:focus": {
|
1212
|
+
boxShadow: "inset 0px 0px 0px 1px $colors$neutral7",
|
1213
|
+
},
|
1214
|
+
},
|
1215
|
+
},
|
1216
|
+
},
|
1217
|
+
state: {
|
1218
|
+
invalid: {
|
1219
|
+
boxShadow: "inset 0 0 0 1px $colors$red7",
|
1220
|
+
"&:focus": {
|
1221
|
+
boxShadow: "inset 0px 0px 0px 1px $colors$red8, 0px 0px 0px 1px $colors$red8",
|
1222
|
+
},
|
1223
|
+
},
|
1224
|
+
valid: {
|
1225
|
+
boxShadow: "inset 0 0 0 1px $colors$green7",
|
1226
|
+
"&:focus": {
|
1227
|
+
boxShadow: "inset 0px 0px 0px 1px $colors$green8, 0px 0px 0px 1px $colors$green8",
|
1228
|
+
},
|
1229
|
+
},
|
1230
|
+
},
|
1231
|
+
cursor: {
|
1232
|
+
default: {
|
1233
|
+
cursor: "default",
|
1234
|
+
"&:focus": {
|
1235
|
+
cursor: "text",
|
1236
|
+
},
|
1237
|
+
},
|
1238
|
+
text: {
|
1239
|
+
cursor: "text",
|
1240
|
+
},
|
1241
|
+
},
|
1242
|
+
},
|
1243
|
+
defaultVariants: {
|
1244
|
+
size: "1",
|
1245
|
+
},
|
1246
|
+
});
|
1247
|
+
var TextField = StyledTextField;
|
1248
|
+
|
1249
|
+
var Select = styled(Select$1, {
|
1250
|
+
boxShadow: "inset 0 0 0 1px $colors$neutral7",
|
1251
|
+
});
|
1252
|
+
|
1253
|
+
var Card = styled("div", {
|
1254
|
+
appearance: "none",
|
1255
|
+
border: "none",
|
1256
|
+
boxSizing: "border-box",
|
1257
|
+
font: "inherit",
|
1258
|
+
lineHeight: "1",
|
1259
|
+
outline: "none",
|
1260
|
+
padding: 0,
|
1261
|
+
textAlign: "inherit",
|
1262
|
+
verticalAlign: "middle",
|
1263
|
+
WebkitTapHighlightColor: "rgba(0, 0, 0, 0)",
|
1264
|
+
backgroundColor: "$panel",
|
1265
|
+
display: "block",
|
1266
|
+
textDecoration: "none",
|
1267
|
+
color: "inherit",
|
1268
|
+
flexShrink: 0,
|
1269
|
+
borderRadius: "$3",
|
1270
|
+
position: "relative",
|
1271
|
+
"&::before": {
|
1272
|
+
boxSizing: "border-box",
|
1273
|
+
content: '""',
|
1274
|
+
position: "absolute",
|
1275
|
+
top: 0,
|
1276
|
+
right: 0,
|
1277
|
+
bottom: 0,
|
1278
|
+
left: 0,
|
1279
|
+
boxShadow: "inset 0 0 0 1px rgba(0,0,0,.1)",
|
1280
|
+
borderRadius: "$3",
|
1281
|
+
pointerEvents: "none",
|
1282
|
+
},
|
1283
|
+
variants: {
|
1284
|
+
variant: {
|
1285
|
+
interactive: {
|
1286
|
+
"@hover": {
|
1287
|
+
"&:hover": {
|
1288
|
+
"&::before": {
|
1289
|
+
boxShadow: "inset 0 0 0 1px rgba(0,0,0,.2)",
|
1290
|
+
},
|
1291
|
+
},
|
1292
|
+
},
|
1293
|
+
"&:focus": {
|
1294
|
+
"&::before": {
|
1295
|
+
boxShadow: "inset 0 0 0 1px $colors$primary8, 0 0 0 1px $colors$primary8",
|
1296
|
+
},
|
1297
|
+
},
|
1298
|
+
},
|
1299
|
+
ghost: {
|
1300
|
+
backgroundColor: "transparent",
|
1301
|
+
transition: "transform 200ms cubic-bezier(0.22, 1, 0.36, 1), background-color 25ms linear",
|
1302
|
+
willChange: "transform",
|
1303
|
+
"&::before": {
|
1304
|
+
boxShadow: "0px 10px 38px -10px rgba(22, 23, 24, 0.35), 0px 10px 20px -15px rgba(22, 23, 24, 0.2)",
|
1305
|
+
opacity: "0",
|
1306
|
+
transition: "all 200ms cubic-bezier(0.22, 1, 0.36, 1)",
|
1307
|
+
},
|
1308
|
+
"@hover": {
|
1309
|
+
"&:hover": {
|
1310
|
+
backgroundColor: "$panel",
|
1311
|
+
transform: "translateY(-2px)",
|
1312
|
+
"&::before": {
|
1313
|
+
opacity: "1",
|
1314
|
+
},
|
1315
|
+
},
|
1316
|
+
},
|
1317
|
+
"&:active": {
|
1318
|
+
transform: "translateY(0)",
|
1319
|
+
transition: "none",
|
1320
|
+
"&::before": {
|
1321
|
+
boxShadow: "0px 5px 16px -5px rgba(22, 23, 24, 0.35), 0px 5px 10px -7px rgba(22, 23, 24, 0.2)",
|
1322
|
+
opacity: "1",
|
1323
|
+
},
|
1324
|
+
},
|
1325
|
+
"&:focus": {
|
1326
|
+
boxShadow: "inset 0 0 0 1px $colors$primary8, 0 0 0 1px $colors$primary8",
|
1327
|
+
},
|
1328
|
+
},
|
1329
|
+
active: {
|
1330
|
+
transform: "translateY(0)",
|
1331
|
+
transition: "none",
|
1332
|
+
"&::before": {
|
1333
|
+
boxShadow: "0px 5px 16px -5px rgba(22, 23, 24, 0.35), 0px 5px 10px -7px rgba(22, 23, 24, 0.2)",
|
1334
|
+
opacity: "1",
|
1335
|
+
},
|
1336
|
+
"&:focus": {
|
1337
|
+
boxShadow: "inset 0 0 0 1px $colors$primary8, 0 0 0 1px $colors$primary8",
|
1338
|
+
},
|
1339
|
+
},
|
1340
|
+
},
|
1341
|
+
},
|
1342
|
+
});
|
1343
|
+
|
1344
|
+
var Badge = styled("span", {
|
1345
|
+
// Reset
|
1346
|
+
alignItems: "center",
|
1347
|
+
appearance: "none",
|
1348
|
+
borderWidth: "0",
|
1349
|
+
boxSizing: "border-box",
|
1350
|
+
display: "inline-flex",
|
1351
|
+
flexShrink: 0,
|
1352
|
+
fontFamily: "inherit",
|
1353
|
+
justifyContent: "center",
|
1354
|
+
lineHeight: "1",
|
1355
|
+
verticalAlign: "middle",
|
1356
|
+
outline: "none",
|
1357
|
+
padding: "0",
|
1358
|
+
textDecoration: "none",
|
1359
|
+
userSelect: "none",
|
1360
|
+
WebkitTapHighlightColor: "rgba(0,0,0,0)",
|
1361
|
+
"&:disabled": {
|
1362
|
+
backgroundColor: "$slate3",
|
1363
|
+
pointerEvents: "none",
|
1364
|
+
color: "$slate8",
|
1365
|
+
},
|
1366
|
+
"&::before": {
|
1367
|
+
boxSizing: "border-box",
|
1368
|
+
content: '""',
|
1369
|
+
},
|
1370
|
+
"&::after": {
|
1371
|
+
boxSizing: "border-box",
|
1372
|
+
content: '""',
|
1373
|
+
},
|
1374
|
+
// Custom
|
1375
|
+
backgroundColor: "$slate3",
|
1376
|
+
borderRadius: "$pill",
|
1377
|
+
color: "$slate11",
|
1378
|
+
whiteSpace: "nowrap",
|
1379
|
+
fontVariantNumeric: "tabular-nums",
|
1380
|
+
variants: {
|
1381
|
+
size: {
|
1382
|
+
"1": {
|
1383
|
+
height: "$4",
|
1384
|
+
px: "$1",
|
1385
|
+
fontSize: "$1",
|
1386
|
+
},
|
1387
|
+
"2": {
|
1388
|
+
height: "$5",
|
1389
|
+
px: "$2",
|
1390
|
+
fontSize: "$2",
|
1391
|
+
},
|
1392
|
+
},
|
1393
|
+
variant: {
|
1394
|
+
neutral: {
|
1395
|
+
backgroundColor: "$neutral3",
|
1396
|
+
color: "$neutral11",
|
1397
|
+
"&:focus": {
|
1398
|
+
boxShadow: "inset 0 0 0 1px $colors$neutral8, 0 0 0 1px $colors$neutral8",
|
1399
|
+
},
|
1400
|
+
},
|
1401
|
+
primary: {
|
1402
|
+
backgroundColor: "$primary3",
|
1403
|
+
color: "$primary11",
|
1404
|
+
"&:focus": {
|
1405
|
+
boxShadow: "inset 0 0 0 1px $colors$primary8, 0 0 0 1px $colors$primary8",
|
1406
|
+
},
|
1407
|
+
},
|
1408
|
+
gray: {
|
1409
|
+
backgroundColor: "$slate3",
|
1410
|
+
color: "$slate11",
|
1411
|
+
"&:focus": {
|
1412
|
+
boxShadow: "inset 0 0 0 1px $colors$slate8, 0 0 0 1px $colors$slate8",
|
1413
|
+
},
|
1414
|
+
},
|
1415
|
+
red: {
|
1416
|
+
backgroundColor: "$red3",
|
1417
|
+
color: "$red11",
|
1418
|
+
"&:focus": {
|
1419
|
+
boxShadow: "inset 0 0 0 1px $colors$red8, 0 0 0 1px $colors$red8",
|
1420
|
+
},
|
1421
|
+
},
|
1422
|
+
crimson: {
|
1423
|
+
backgroundColor: "$crimson3",
|
1424
|
+
color: "$crimson11",
|
1425
|
+
"&:focus": {
|
1426
|
+
boxShadow: "inset 0 0 0 1px $colors$crimson8, 0 0 0 1px $colors$crimson8",
|
1427
|
+
},
|
1428
|
+
},
|
1429
|
+
pink: {
|
1430
|
+
backgroundColor: "$pink3",
|
1431
|
+
color: "$pink11",
|
1432
|
+
"&:focus": {
|
1433
|
+
boxShadow: "inset 0 0 0 1px $colors$pink8, 0 0 0 1px $colors$pink8",
|
1434
|
+
},
|
1435
|
+
},
|
1436
|
+
purple: {
|
1437
|
+
backgroundColor: "$purple3",
|
1438
|
+
color: "$purple11",
|
1439
|
+
"&:focus": {
|
1440
|
+
boxShadow: "inset 0 0 0 1px $colors$purple8, 0 0 0 1px $colors$purple8",
|
1441
|
+
},
|
1442
|
+
},
|
1443
|
+
violet: {
|
1444
|
+
backgroundColor: "$violet3",
|
1445
|
+
color: "$violet11",
|
1446
|
+
"&:focus": {
|
1447
|
+
boxShadow: "inset 0 0 0 1px $colors$violet8, 0 0 0 1px $colors$violet8",
|
1448
|
+
},
|
1449
|
+
},
|
1450
|
+
indigo: {
|
1451
|
+
backgroundColor: "$indigo3",
|
1452
|
+
color: "$indigo11",
|
1453
|
+
"&:focus": {
|
1454
|
+
boxShadow: "inset 0 0 0 1px $colors$indigo8, 0 0 0 1px $colors$indigo8",
|
1455
|
+
},
|
1456
|
+
},
|
1457
|
+
blue: {
|
1458
|
+
backgroundColor: "$blue3",
|
1459
|
+
color: "$blue11",
|
1460
|
+
"&:focus": {
|
1461
|
+
boxShadow: "inset 0 0 0 1px $colors$blue8, 0 0 0 1px $colors$blue8",
|
1462
|
+
},
|
1463
|
+
},
|
1464
|
+
cyan: {
|
1465
|
+
backgroundColor: "$cyan3",
|
1466
|
+
color: "$cyan11",
|
1467
|
+
"&:focus": {
|
1468
|
+
boxShadow: "inset 0 0 0 1px $colors$cyan8, 0 0 0 1px $colors$cyan8",
|
1469
|
+
},
|
1470
|
+
},
|
1471
|
+
teal: {
|
1472
|
+
backgroundColor: "$teal3",
|
1473
|
+
color: "$teal11",
|
1474
|
+
"&:focus": {
|
1475
|
+
boxShadow: "inset 0 0 0 1px $colors$teal8, 0 0 0 1px $colors$teal8",
|
1476
|
+
},
|
1477
|
+
},
|
1478
|
+
green: {
|
1479
|
+
backgroundColor: "$green3",
|
1480
|
+
color: "$green11",
|
1481
|
+
"&:focus": {
|
1482
|
+
boxShadow: "inset 0 0 0 1px $colors$green8, 0 0 0 1px $colors$green8",
|
1483
|
+
},
|
1484
|
+
},
|
1485
|
+
lime: {
|
1486
|
+
backgroundColor: "$lime3",
|
1487
|
+
color: "$lime11",
|
1488
|
+
"&:focus": {
|
1489
|
+
boxShadow: "inset 0 0 0 1px $colors$lime8, 0 0 0 1px $colors$lime8",
|
1490
|
+
},
|
1491
|
+
},
|
1492
|
+
yellow: {
|
1493
|
+
backgroundColor: "$yellow3",
|
1494
|
+
color: "$yellow11",
|
1495
|
+
"&:focus": {
|
1496
|
+
boxShadow: "inset 0 0 0 1px $colors$yellow8, 0 0 0 1px $colors$yellow8",
|
1497
|
+
},
|
1498
|
+
},
|
1499
|
+
orange: {
|
1500
|
+
backgroundColor: "$orange3",
|
1501
|
+
color: "$orange11",
|
1502
|
+
"&:focus": {
|
1503
|
+
boxShadow: "inset 0 0 0 1px $colors$orange8, 0 0 0 1px $colors$orange8",
|
1504
|
+
},
|
1505
|
+
},
|
1506
|
+
gold: {
|
1507
|
+
backgroundColor: "$gold3",
|
1508
|
+
color: "$gold11",
|
1509
|
+
"&:focus": {
|
1510
|
+
boxShadow: "inset 0 0 0 1px $colors$gold8, 0 0 0 1px $colors$gold8",
|
1511
|
+
},
|
1512
|
+
},
|
1513
|
+
bronze: {
|
1514
|
+
backgroundColor: "$bronze3",
|
1515
|
+
color: "$bronze11",
|
1516
|
+
"&:focus": {
|
1517
|
+
boxShadow: "inset 0 0 0 1px $colors$bronze8, 0 0 0 1px $colors$bronze8",
|
1518
|
+
},
|
1519
|
+
},
|
1520
|
+
},
|
1521
|
+
interactive: {
|
1522
|
+
true: {},
|
1523
|
+
},
|
1524
|
+
},
|
1525
|
+
compoundVariants: [
|
1526
|
+
{
|
1527
|
+
interactive: true,
|
1528
|
+
variant: "red",
|
1529
|
+
css: {
|
1530
|
+
"@hover": {
|
1531
|
+
"&:hover": {
|
1532
|
+
backgroundColor: "$red4",
|
1533
|
+
},
|
1534
|
+
},
|
1535
|
+
"&:active": {
|
1536
|
+
backgroundColor: "$red5",
|
1537
|
+
},
|
1538
|
+
'&[data-radix-popover-trigger][data-state="open"], &[data-radix-dropdown-menu-trigger][data-state="open"]': {
|
1539
|
+
backgroundColor: "$red5",
|
1540
|
+
},
|
1541
|
+
},
|
1542
|
+
},
|
1543
|
+
{
|
1544
|
+
interactive: true,
|
1545
|
+
variant: "crimson",
|
1546
|
+
css: {
|
1547
|
+
"@hover": {
|
1548
|
+
"&:hover": {
|
1549
|
+
backgroundColor: "$crimson4",
|
1550
|
+
},
|
1551
|
+
},
|
1552
|
+
"&:active": {
|
1553
|
+
backgroundColor: "$crimson5",
|
1554
|
+
},
|
1555
|
+
'&[data-radix-popover-trigger][data-state="open"], &[data-radix-dropdown-menu-trigger][data-state="open"]': {
|
1556
|
+
backgroundColor: "$crimson5",
|
1557
|
+
},
|
1558
|
+
},
|
1559
|
+
},
|
1560
|
+
{
|
1561
|
+
interactive: true,
|
1562
|
+
variant: "pink",
|
1563
|
+
css: {
|
1564
|
+
"@hover": {
|
1565
|
+
"&:hover": {
|
1566
|
+
backgroundColor: "$pink4",
|
1567
|
+
},
|
1568
|
+
},
|
1569
|
+
"&:active": {
|
1570
|
+
backgroundColor: "$pink5",
|
1571
|
+
},
|
1572
|
+
'&[data-radix-popover-trigger][data-state="open"], &[data-radix-dropdown-menu-trigger][data-state="open"]': {
|
1573
|
+
backgroundColor: "$pink5",
|
1574
|
+
},
|
1575
|
+
},
|
1576
|
+
},
|
1577
|
+
{
|
1578
|
+
interactive: true,
|
1579
|
+
variant: "purple",
|
1580
|
+
css: {
|
1581
|
+
"@hover": {
|
1582
|
+
"&:hover": {
|
1583
|
+
backgroundColor: "$purple4",
|
1584
|
+
},
|
1585
|
+
},
|
1586
|
+
"&:active": {
|
1587
|
+
backgroundColor: "$purple5",
|
1588
|
+
},
|
1589
|
+
'&[data-radix-popover-trigger][data-state="open"], &[data-radix-dropdown-menu-trigger][data-state="open"]': {
|
1590
|
+
backgroundColor: "$purple5",
|
1591
|
+
},
|
1592
|
+
},
|
1593
|
+
},
|
1594
|
+
{
|
1595
|
+
interactive: true,
|
1596
|
+
variant: "violet",
|
1597
|
+
css: {
|
1598
|
+
"@hover": {
|
1599
|
+
"&:hover": {
|
1600
|
+
backgroundColor: "$violet4",
|
1601
|
+
},
|
1602
|
+
},
|
1603
|
+
"&:active": {
|
1604
|
+
backgroundColor: "$violet5",
|
1605
|
+
},
|
1606
|
+
'&[data-radix-popover-trigger][data-state="open"], &[data-radix-dropdown-menu-trigger][data-state="open"]': {
|
1607
|
+
backgroundColor: "$violet5",
|
1608
|
+
},
|
1609
|
+
},
|
1610
|
+
},
|
1611
|
+
{
|
1612
|
+
interactive: true,
|
1613
|
+
variant: "indigo",
|
1614
|
+
css: {
|
1615
|
+
"@hover": {
|
1616
|
+
"&:hover": {
|
1617
|
+
backgroundColor: "$indigo4",
|
1618
|
+
},
|
1619
|
+
},
|
1620
|
+
"&:active": {
|
1621
|
+
backgroundColor: "$indigo5",
|
1622
|
+
},
|
1623
|
+
'&[data-radix-popover-trigger][data-state="open"], &[data-radix-dropdown-menu-trigger][data-state="open"]': {
|
1624
|
+
backgroundColor: "$indigo5",
|
1625
|
+
},
|
1626
|
+
},
|
1627
|
+
},
|
1628
|
+
{
|
1629
|
+
interactive: true,
|
1630
|
+
variant: "blue",
|
1631
|
+
css: {
|
1632
|
+
"@hover": {
|
1633
|
+
"&:hover": {
|
1634
|
+
backgroundColor: "$blue4",
|
1635
|
+
},
|
1636
|
+
},
|
1637
|
+
"&:active": {
|
1638
|
+
backgroundColor: "$blue5",
|
1639
|
+
},
|
1640
|
+
'&[data-radix-popover-trigger][data-state="open"], &[data-radix-dropdown-menu-trigger][data-state="open"]': {
|
1641
|
+
backgroundColor: "$blue5",
|
1642
|
+
},
|
1643
|
+
},
|
1644
|
+
},
|
1645
|
+
{
|
1646
|
+
interactive: true,
|
1647
|
+
variant: "cyan",
|
1648
|
+
css: {
|
1649
|
+
"@hover": {
|
1650
|
+
"&:hover": {
|
1651
|
+
backgroundColor: "$cyan4",
|
1652
|
+
},
|
1653
|
+
},
|
1654
|
+
"&:active": {
|
1655
|
+
backgroundColor: "$cyan5",
|
1656
|
+
},
|
1657
|
+
'&[data-radix-popover-trigger][data-state="open"], &[data-radix-dropdown-menu-trigger][data-state="open"]': {
|
1658
|
+
backgroundColor: "$cyan5",
|
1659
|
+
},
|
1660
|
+
},
|
1661
|
+
},
|
1662
|
+
{
|
1663
|
+
interactive: true,
|
1664
|
+
variant: "teal",
|
1665
|
+
css: {
|
1666
|
+
"@hover": {
|
1667
|
+
"&:hover": {
|
1668
|
+
backgroundColor: "$teal4",
|
1669
|
+
},
|
1670
|
+
},
|
1671
|
+
"&:active": {
|
1672
|
+
backgroundColor: "$teal5",
|
1673
|
+
},
|
1674
|
+
'&[data-radix-popover-trigger][data-state="open"], &[data-radix-dropdown-menu-trigger][data-state="open"]': {
|
1675
|
+
backgroundColor: "$teal5",
|
1676
|
+
},
|
1677
|
+
},
|
1678
|
+
},
|
1679
|
+
{
|
1680
|
+
interactive: true,
|
1681
|
+
variant: "green",
|
1682
|
+
css: {
|
1683
|
+
"@hover": {
|
1684
|
+
"&:hover": {
|
1685
|
+
backgroundColor: "$green4",
|
1686
|
+
},
|
1687
|
+
},
|
1688
|
+
"&:active": {
|
1689
|
+
backgroundColor: "$green5",
|
1690
|
+
},
|
1691
|
+
'&[data-radix-popover-trigger][data-state="open"], &[data-radix-dropdown-menu-trigger][data-state="open"]': {
|
1692
|
+
backgroundColor: "$green5",
|
1693
|
+
},
|
1694
|
+
},
|
1695
|
+
},
|
1696
|
+
{
|
1697
|
+
interactive: true,
|
1698
|
+
variant: "lime",
|
1699
|
+
css: {
|
1700
|
+
"@hover": {
|
1701
|
+
"&:hover": {
|
1702
|
+
backgroundColor: "$lime4",
|
1703
|
+
},
|
1704
|
+
},
|
1705
|
+
"&:active": {
|
1706
|
+
backgroundColor: "$lime5",
|
1707
|
+
},
|
1708
|
+
'&[data-radix-popover-trigger][data-state="open"], &[data-radix-dropdown-menu-trigger][data-state="open"]': {
|
1709
|
+
backgroundColor: "$lime5",
|
1710
|
+
},
|
1711
|
+
},
|
1712
|
+
},
|
1713
|
+
{
|
1714
|
+
interactive: true,
|
1715
|
+
variant: "yellow",
|
1716
|
+
css: {
|
1717
|
+
"@hover": {
|
1718
|
+
"&:hover": {
|
1719
|
+
backgroundColor: "$yellow4",
|
1720
|
+
},
|
1721
|
+
},
|
1722
|
+
"&:active": {
|
1723
|
+
backgroundColor: "$yellow5",
|
1724
|
+
},
|
1725
|
+
'&[data-radix-popover-trigger][data-state="open"], &[data-radix-dropdown-menu-trigger][data-state="open"]': {
|
1726
|
+
backgroundColor: "$yellow5",
|
1727
|
+
},
|
1728
|
+
},
|
1729
|
+
},
|
1730
|
+
{
|
1731
|
+
interactive: true,
|
1732
|
+
variant: "orange",
|
1733
|
+
css: {
|
1734
|
+
"@hover": {
|
1735
|
+
"&:hover": {
|
1736
|
+
backgroundColor: "$orange4",
|
1737
|
+
},
|
1738
|
+
},
|
1739
|
+
"&:active": {
|
1740
|
+
backgroundColor: "$orange5",
|
1741
|
+
},
|
1742
|
+
'&[data-radix-popover-trigger][data-state="open"], &[data-radix-dropdown-menu-trigger][data-state="open"]': {
|
1743
|
+
backgroundColor: "$orange5",
|
1744
|
+
},
|
1745
|
+
},
|
1746
|
+
},
|
1747
|
+
{
|
1748
|
+
interactive: true,
|
1749
|
+
variant: "gold",
|
1750
|
+
css: {
|
1751
|
+
"@hover": {
|
1752
|
+
"&:hover": {
|
1753
|
+
backgroundColor: "$gold4",
|
1754
|
+
},
|
1755
|
+
},
|
1756
|
+
"&:active": {
|
1757
|
+
backgroundColor: "$gold5",
|
1758
|
+
},
|
1759
|
+
'&[data-radix-popover-trigger][data-state="open"], &[data-radix-dropdown-menu-trigger][data-state="open"]': {
|
1760
|
+
backgroundColor: "$gold5",
|
1761
|
+
},
|
1762
|
+
},
|
1763
|
+
},
|
1764
|
+
{
|
1765
|
+
interactive: true,
|
1766
|
+
variant: "bronze",
|
1767
|
+
css: {
|
1768
|
+
"@hover": {
|
1769
|
+
"&:hover": {
|
1770
|
+
backgroundColor: "$bronze4",
|
1771
|
+
},
|
1772
|
+
},
|
1773
|
+
"&:active": {
|
1774
|
+
backgroundColor: "$bronze5",
|
1775
|
+
},
|
1776
|
+
'&[data-radix-popover-trigger][data-state="open"], &[data-radix-dropdown-menu-trigger][data-state="open"]': {
|
1777
|
+
backgroundColor: "$bronze5",
|
1778
|
+
},
|
1779
|
+
},
|
1780
|
+
},
|
1781
|
+
],
|
1782
|
+
defaultVariants: {
|
1783
|
+
size: "1",
|
1784
|
+
variant: "neutral",
|
1785
|
+
},
|
1786
|
+
});
|
1787
|
+
|
1788
|
+
var colorVairants = {};
|
1789
|
+
for (var color in naturalPairings) {
|
1790
|
+
colorVairants[color] = {
|
1791
|
+
"&:focus": {
|
1792
|
+
outline: "none",
|
1793
|
+
backgroundColor: "$".concat(color, "4"),
|
1794
|
+
color: "$hiContrast",
|
1795
|
+
},
|
1796
|
+
};
|
1797
|
+
}
|
1798
|
+
var DropdownMenuItem = styled(DropdownMenuItem$1, {
|
1799
|
+
variants: {
|
1800
|
+
color: __assign({ primary: {
|
1801
|
+
"&:focus": {
|
1802
|
+
outline: "none",
|
1803
|
+
backgroundColor: "$primary4",
|
1804
|
+
color: "$hiContrast",
|
1805
|
+
},
|
1806
|
+
} }, colorVairants),
|
1807
|
+
},
|
1808
|
+
defaultVariants: {
|
1809
|
+
color: "primary",
|
1810
|
+
},
|
1811
|
+
});
|
1812
|
+
var DropdownMenuRadioItem = styled(DropdownMenuRadioItem$1, {
|
1813
|
+
variants: {
|
1814
|
+
color: __assign({ primary: {
|
1815
|
+
"&:focus": {
|
1816
|
+
outline: "none",
|
1817
|
+
backgroundColor: "$primary4",
|
1818
|
+
color: "$hiContrast",
|
1819
|
+
},
|
1820
|
+
} }, colorVairants),
|
1821
|
+
},
|
1822
|
+
defaultVariants: {
|
1823
|
+
color: "primary",
|
1824
|
+
},
|
1825
|
+
});
|
1826
|
+
var DropdownMenuCheckboxItem = styled(DropdownMenuCheckboxItem$1, {
|
1827
|
+
variants: {
|
1828
|
+
color: __assign({ primary: {
|
1829
|
+
"&:focus": {
|
1830
|
+
outline: "none",
|
1831
|
+
backgroundColor: "$primary4",
|
1832
|
+
color: "$hiContrast",
|
1833
|
+
},
|
1834
|
+
} }, colorVairants),
|
1835
|
+
},
|
1836
|
+
defaultVariants: {
|
1837
|
+
color: "primary",
|
1838
|
+
},
|
1839
|
+
});
|
1840
|
+
|
1841
|
+
var transitionStyles = {
|
1842
|
+
".snackbar-enter": {
|
1843
|
+
opacity: 0,
|
1844
|
+
},
|
1845
|
+
".snackbar-exit-active": {
|
1846
|
+
opacity: 0,
|
1847
|
+
},
|
1848
|
+
".snackbar-enter-active": {
|
1849
|
+
opacity: 1,
|
1850
|
+
},
|
1851
|
+
".snackbar-enter-top-center": {
|
1852
|
+
transform: "translateY(-16px)",
|
1853
|
+
},
|
1854
|
+
".snackbar-enter-top-right": {
|
1855
|
+
transform: "translateY(-16px)",
|
1856
|
+
},
|
1857
|
+
".snackbar-exit-active-top-left": {
|
1858
|
+
transform: "translateY(-16px)",
|
1859
|
+
},
|
1860
|
+
".snackbar-exit-active-top-center": {
|
1861
|
+
transform: "translateY(-16px)",
|
1862
|
+
},
|
1863
|
+
".snackbar-exit-active-top-right": {
|
1864
|
+
transform: "translateY(-16px)",
|
1865
|
+
},
|
1866
|
+
".snackbar-enter-bottom-left": {
|
1867
|
+
transform: "translateY(16px)",
|
1868
|
+
},
|
1869
|
+
".snackbar-enter-bottom-center": {
|
1870
|
+
transform: "translateY(16px)",
|
1871
|
+
},
|
1872
|
+
".snackbar-enter-bottom-right": {
|
1873
|
+
transform: "translateY(16px)",
|
1874
|
+
},
|
1875
|
+
".snackbar-exit-active-bottom-left": {
|
1876
|
+
transform: "translateY(16px)",
|
1877
|
+
},
|
1878
|
+
".snackbar-exit-active-bottom-center": {
|
1879
|
+
transform: "translateY(16px)",
|
1880
|
+
},
|
1881
|
+
".snackbar-exit-active-bottom-right": {
|
1882
|
+
transform: "translateY(16px)",
|
1883
|
+
},
|
1884
|
+
".snackbar-enter-active-top-left": {
|
1885
|
+
transform: "translateY(0px)",
|
1886
|
+
},
|
1887
|
+
".snackbar-enter-active-top-center": {
|
1888
|
+
transform: "translateY(0px)",
|
1889
|
+
},
|
1890
|
+
".snackbar-enter-active-top-right": {
|
1891
|
+
transform: "translateY(0px)",
|
1892
|
+
},
|
1893
|
+
".snackbar-enter-active-bottom-left": {
|
1894
|
+
transform: "translateY(0px)",
|
1895
|
+
},
|
1896
|
+
".snackbar-enter-active-bottom-center": {
|
1897
|
+
transform: "translateY(0px)",
|
1898
|
+
},
|
1899
|
+
".snackbar-enter-active-bottom-right": {
|
1900
|
+
transform: "translateY(0px)",
|
1901
|
+
},
|
1902
|
+
".snackbar-wrapper-top-left": {
|
1903
|
+
justifyContent: "flex-start",
|
1904
|
+
top: "8px",
|
1905
|
+
},
|
1906
|
+
".snackbar-wrapper-top-center": {
|
1907
|
+
top: "8px",
|
1908
|
+
justifyContent: "center",
|
1909
|
+
},
|
1910
|
+
".snackbar-wrapper-top-right": {
|
1911
|
+
top: "8px",
|
1912
|
+
justifyContent: "flex-end",
|
1913
|
+
},
|
1914
|
+
".snackbar-wrapper-bottom-left": {
|
1915
|
+
bottom: "8px",
|
1916
|
+
justifyContent: "flex-start",
|
1917
|
+
},
|
1918
|
+
".snackbar-wrapper-bottom-center": {
|
1919
|
+
bottom: "8px",
|
1920
|
+
justifyContent: "center",
|
1921
|
+
},
|
1922
|
+
".snackbar-wrapper-bottom-right": {
|
1923
|
+
bottom: "8px",
|
1924
|
+
justifyContent: "flex-end",
|
1925
|
+
},
|
1926
|
+
};
|
1927
|
+
|
1928
|
+
// Snackbar default values
|
1929
|
+
var defaultPosition = "bottom-center";
|
1930
|
+
var defaultDuration = 5000;
|
1931
|
+
var defaultInterval = 250;
|
1932
|
+
var positions = [
|
1933
|
+
"top-left",
|
1934
|
+
"top-center",
|
1935
|
+
"top-right",
|
1936
|
+
"bottom-left",
|
1937
|
+
"bottom-center",
|
1938
|
+
"bottom-right",
|
1939
|
+
];
|
1940
|
+
// Context used by the hook useSnackbar() and HoC withSnackbar()
|
1941
|
+
var SnackbarContext = createContext({});
|
1942
|
+
var SnackbarProvider = function (_a) {
|
1943
|
+
var children = _a.children;
|
1944
|
+
// Current open state
|
1945
|
+
var _b = useState(false), open = _b[0], setOpen = _b[1];
|
1946
|
+
// Current timeout ID
|
1947
|
+
var _c = useState(null), timeoutId = _c[0], setTimeoutId = _c[1];
|
1948
|
+
// Snackbar's text
|
1949
|
+
var _d = useState(""), text = _d[0], setText = _d[1];
|
1950
|
+
// Snackbar's duration
|
1951
|
+
var _e = useState(defaultDuration), duration = _e[0], setDuration = _e[1];
|
1952
|
+
// Snackbar's position
|
1953
|
+
var _f = useState(defaultPosition), position = _f[0], setPosition = _f[1];
|
1954
|
+
// Custom styles for the snackbar itself
|
1955
|
+
var _g = useState({}), customStyles = _g[0], setCustomStyles = _g[1];
|
1956
|
+
// Custom styles for the close button
|
1957
|
+
var _h = useState({}), closeCustomStyles = _h[0], setCloseCustomStyles = _h[1];
|
1958
|
+
var triggerSnackbar = function (text, duration, position, style, closeStyle) {
|
1959
|
+
setText(text);
|
1960
|
+
setDuration(duration);
|
1961
|
+
setPosition(position);
|
1962
|
+
setCustomStyles(style);
|
1963
|
+
setCloseCustomStyles(closeStyle);
|
1964
|
+
setOpen(true);
|
1965
|
+
};
|
1966
|
+
// Manages all the snackbar's opening process
|
1967
|
+
var openSnackbar = function (text, duration, position, style, closeStyle) {
|
1968
|
+
// Closes the snackbar if it is already open
|
1969
|
+
if (open === true) {
|
1970
|
+
setOpen(false);
|
1971
|
+
setTimeout(function () {
|
1972
|
+
triggerSnackbar(text, duration, position, style, closeStyle);
|
1973
|
+
}, defaultInterval);
|
1974
|
+
}
|
1975
|
+
else {
|
1976
|
+
triggerSnackbar(text, duration, position, style, closeStyle);
|
1977
|
+
}
|
1978
|
+
};
|
1979
|
+
// Closes the snackbar just by setting the "open" state to false
|
1980
|
+
var closeSnackbar = function () {
|
1981
|
+
setOpen(false);
|
1982
|
+
};
|
1983
|
+
// Returns the Provider that must wrap the application
|
1984
|
+
return (React.createElement(SnackbarContext.Provider, { value: { openSnackbar: openSnackbar, closeSnackbar: closeSnackbar } },
|
1985
|
+
children,
|
1986
|
+
React.createElement(Box, { css: transitionStyles },
|
1987
|
+
React.createElement(CSSTransition, { in: open, timeout: 150, mountOnEnter: true, unmountOnExit: true,
|
1988
|
+
// Sets timeout to close the snackbar
|
1989
|
+
onEnter: function () {
|
1990
|
+
// @ts-ignore
|
1991
|
+
clearTimeout(timeoutId);
|
1992
|
+
// @ts-ignore
|
1993
|
+
setTimeoutId(setTimeout(function () { return setOpen(false); }, duration));
|
1994
|
+
},
|
1995
|
+
// Sets custom classNames based on "position"
|
1996
|
+
className: "snackbar-wrapper-".concat(position), classNames: {
|
1997
|
+
enter: "snackbar-enter snackbar-enter-".concat(position),
|
1998
|
+
enterActive: "snackbar-enter-active snackbar-enter-active-".concat(position),
|
1999
|
+
exitActive: "snackbar-exit-active snackbar-exit-active-".concat(position),
|
2000
|
+
} },
|
2001
|
+
React.createElement(Box, { css: {
|
2002
|
+
display: "flex",
|
2003
|
+
alignItems: "center",
|
2004
|
+
margin: "8px",
|
2005
|
+
position: "fixed",
|
2006
|
+
right: "0",
|
2007
|
+
left: "0",
|
2008
|
+
zIndex: "1",
|
2009
|
+
transition: "opacity 150ms, transform 150ms",
|
2010
|
+
pointerEvents: "none",
|
2011
|
+
justifyContent: "center",
|
2012
|
+
bottom: "8px",
|
2013
|
+
} },
|
2014
|
+
React.createElement(Box, { css: {
|
2015
|
+
display: "flex",
|
2016
|
+
alignItems: "center",
|
2017
|
+
justifyContent: "flex-start",
|
2018
|
+
borderRadius: "4px",
|
2019
|
+
minWidth: "334px",
|
2020
|
+
maxWidth: "672px",
|
2021
|
+
zIndex: 1000000,
|
2022
|
+
backgroundColor: "$panel",
|
2023
|
+
boxShadow: "0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12)",
|
2024
|
+
WebkitFontSmoothing: "antialiased",
|
2025
|
+
MozOsxFontSmoothing: "grayscale",
|
2026
|
+
fontFamily: "sans-serif",
|
2027
|
+
fontSize: "14px",
|
2028
|
+
fontWeight: "400",
|
2029
|
+
color: "$hiContrast",
|
2030
|
+
letterSpacing: "0.25px",
|
2031
|
+
lineHeight: "20px",
|
2032
|
+
textAlign: "left",
|
2033
|
+
}, style: customStyles },
|
2034
|
+
React.createElement(Box, { css: {
|
2035
|
+
flexGrow: 1,
|
2036
|
+
padding: "14px 16px",
|
2037
|
+
margin: "0",
|
2038
|
+
pointerEvents: "auto",
|
2039
|
+
color: "$hiContrast",
|
2040
|
+
} }, text),
|
2041
|
+
React.createElement(Box, { as: "button", css: {
|
2042
|
+
lexShrink: "0",
|
2043
|
+
boxSizing: "border-box",
|
2044
|
+
display: "flex",
|
2045
|
+
alignItems: "center",
|
2046
|
+
justifyContent: "center",
|
2047
|
+
width: "36px",
|
2048
|
+
height: "36px",
|
2049
|
+
padding: "8px",
|
2050
|
+
margin: "0 8px 0 0",
|
2051
|
+
cursor: "pointer",
|
2052
|
+
position: "relative",
|
2053
|
+
pointerEvents: "auto",
|
2054
|
+
WebkitTapHighlightColor: "transparent",
|
2055
|
+
/* Reset button styles */
|
2056
|
+
outline: "none",
|
2057
|
+
backgroundColor: "transparent",
|
2058
|
+
border: "none",
|
2059
|
+
/* SVG icon properties */
|
2060
|
+
fontSize: "12px",
|
2061
|
+
color: "$hiContrast",
|
2062
|
+
"&:hover:before": {
|
2063
|
+
opacity: "0.08",
|
2064
|
+
},
|
2065
|
+
"&:before": {
|
2066
|
+
content: '""',
|
2067
|
+
backgroundColor: "$hiContrast",
|
2068
|
+
borderRadius: "50%",
|
2069
|
+
opacity: "0",
|
2070
|
+
position: "absolute",
|
2071
|
+
transition: "opacity 120ms linear",
|
2072
|
+
top: "0%",
|
2073
|
+
left: "0%",
|
2074
|
+
width: "100%",
|
2075
|
+
height: "100%",
|
2076
|
+
},
|
2077
|
+
}, onClick: closeSnackbar, style: closeCustomStyles },
|
2078
|
+
React.createElement(CloseIcon, null))))))));
|
2079
|
+
};
|
2080
|
+
// CloseIcon SVG is styled with font properties
|
2081
|
+
var CloseIcon = function () { return (React.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 12 12" },
|
2082
|
+
React.createElement("path", { fill: "currentColor", d: "M11.73 1.58L7.31 6l4.42 4.42-1.06 1.06-4.42-4.42-4.42 4.42-1.06-1.06L5.19 6 .77 1.58 1.83.52l4.42 4.42L10.67.52z", fillRule: "evenodd" }))); };
|
2083
|
+
|
2084
|
+
// Custom hook to trigger the snackbar on function components
|
2085
|
+
var useSnackbar = function (_a) {
|
2086
|
+
var _b = _a === void 0 ? {} : _a, _c = _b.position, position = _c === void 0 ? defaultPosition : _c, _d = _b.style, style = _d === void 0 ? {} : _d, _e = _b.closeStyle, closeStyle = _e === void 0 ? {} : _e;
|
2087
|
+
var _f = useContext(SnackbarContext), openSnackbar = _f.openSnackbar, closeSnackbar = _f.closeSnackbar;
|
2088
|
+
// If no correct position is passed, 'bottom-center' is set
|
2089
|
+
if (!positions.includes(position)) {
|
2090
|
+
position = defaultPosition;
|
2091
|
+
}
|
2092
|
+
function open(text, duration) {
|
2093
|
+
if (text === void 0) { text = ""; }
|
2094
|
+
if (duration === void 0) { duration = defaultDuration; }
|
2095
|
+
openSnackbar(text, duration, position, style, closeStyle);
|
2096
|
+
}
|
2097
|
+
// Returns methods in hooks array way
|
2098
|
+
return [open, closeSnackbar];
|
2099
|
+
};
|
2100
|
+
|
2101
|
+
var Switch = styled(Switch$1, {
|
2102
|
+
bc: "$neutral5",
|
2103
|
+
"&:focus": {
|
2104
|
+
boxShadow: "0 0 0 2px $colors$neutral8",
|
2105
|
+
},
|
2106
|
+
'&[data-state="checked"]': {
|
2107
|
+
bc: "$primary9",
|
2108
|
+
"&:focus": {
|
2109
|
+
boxShadow: "0 0 0 2px $colors$primary8",
|
2110
|
+
},
|
2111
|
+
},
|
2112
|
+
});
|
2113
|
+
|
2114
|
+
var _a$1;
|
2115
|
+
styled(RadioGroupPrimitive.Root, {
|
2116
|
+
display: "block",
|
2117
|
+
});
|
2118
|
+
var StyledRadioButton = styled("div", {
|
2119
|
+
display: "flex",
|
2120
|
+
alignItems: "center",
|
2121
|
+
justifyContent: "center",
|
2122
|
+
borderRadius: "$round",
|
2123
|
+
width: 25,
|
2124
|
+
height: 25,
|
2125
|
+
boxShadow: "inset 0 0 0 1px $colors$neutral7",
|
2126
|
+
flexShrink: 0,
|
2127
|
+
mr: "$3",
|
2128
|
+
});
|
2129
|
+
var StyledRadioIndicator = styled("div", {
|
2130
|
+
borderRadius: "$round",
|
2131
|
+
width: 15,
|
2132
|
+
height: 15,
|
2133
|
+
backgroundColor: "$primary9",
|
2134
|
+
transform: "scale(0)",
|
2135
|
+
});
|
2136
|
+
var StyledRadio = styled(RadioGroupPrimitive.Item, {
|
2137
|
+
all: "unset",
|
2138
|
+
boxSizing: "border-box",
|
2139
|
+
userSelect: "none",
|
2140
|
+
"&::before": {
|
2141
|
+
boxSizing: "border-box",
|
2142
|
+
},
|
2143
|
+
"&::after": {
|
2144
|
+
boxSizing: "border-box",
|
2145
|
+
},
|
2146
|
+
display: "flex",
|
2147
|
+
alignItems: "center",
|
2148
|
+
borderRadius: "$2",
|
2149
|
+
boxShadow: "inset 0 0 0 1px $colors$neutral7",
|
2150
|
+
p: "$3",
|
2151
|
+
"@hover": {
|
2152
|
+
"&:hover": {
|
2153
|
+
boxShadow: "inset 0 0 0 1px $colors$neutral8",
|
2154
|
+
},
|
2155
|
+
},
|
2156
|
+
'&[data-state="checked"]': (_a$1 = {
|
2157
|
+
boxShadow: "inset 0 0 0 1px $colors$primary8, 0 0 0 1px $colors$primary8 !important"
|
2158
|
+
},
|
2159
|
+
_a$1["& ".concat(StyledRadioIndicator)] = {
|
2160
|
+
transform: "scale(1)",
|
2161
|
+
},
|
2162
|
+
_a$1),
|
2163
|
+
});
|
2164
|
+
var RadioCard = React.forwardRef(function (props, forwardedRef) { return (React.createElement(StyledRadio, __assign({}, props, { ref: forwardedRef }),
|
2165
|
+
React.createElement(StyledRadioButton, null,
|
2166
|
+
React.createElement(StyledRadioIndicator, null)),
|
2167
|
+
props.children)); });
|
2168
|
+
|
2169
|
+
var _a, _b, _c;
|
2170
|
+
var Caption = styled("caption", {
|
2171
|
+
textAlign: "start",
|
2172
|
+
marginBottom: "$5",
|
2173
|
+
});
|
2174
|
+
var Tbody = styled("tbody", {
|
2175
|
+
width: "100%",
|
2176
|
+
});
|
2177
|
+
var Tfoot = styled("tfoot", {});
|
2178
|
+
var Tr = styled("tr", {});
|
2179
|
+
var Th = styled("th", {
|
2180
|
+
fontWeight: "unset",
|
2181
|
+
textAlign: "start",
|
2182
|
+
fontSize: "$2",
|
2183
|
+
py: "$2",
|
2184
|
+
borderBottom: "1px solid $neutral4",
|
2185
|
+
variants: {
|
2186
|
+
align: {
|
2187
|
+
start: {
|
2188
|
+
textAlign: "start",
|
2189
|
+
},
|
2190
|
+
center: {
|
2191
|
+
textAlign: "center",
|
2192
|
+
},
|
2193
|
+
end: {
|
2194
|
+
textAlign: "end",
|
2195
|
+
},
|
2196
|
+
},
|
2197
|
+
border: {
|
2198
|
+
solid: {
|
2199
|
+
borderBottom: "1px solid $neutral4",
|
2200
|
+
},
|
2201
|
+
dashed: {
|
2202
|
+
borderBottom: "1px dashed $neutral8",
|
2203
|
+
},
|
2204
|
+
},
|
2205
|
+
},
|
2206
|
+
defaultVariants: {
|
2207
|
+
align: "start",
|
2208
|
+
border: "solid",
|
2209
|
+
},
|
2210
|
+
});
|
2211
|
+
var Td = styled("td", {
|
2212
|
+
py: "$2",
|
2213
|
+
borderBottom: "1px solid $neutral4",
|
2214
|
+
fontSize: "$2",
|
2215
|
+
variants: {
|
2216
|
+
align: {
|
2217
|
+
start: {
|
2218
|
+
textAlign: "start",
|
2219
|
+
},
|
2220
|
+
center: {
|
2221
|
+
textAlign: "center",
|
2222
|
+
},
|
2223
|
+
end: {
|
2224
|
+
textAlign: "end",
|
2225
|
+
},
|
2226
|
+
},
|
2227
|
+
border: {
|
2228
|
+
solid: {
|
2229
|
+
borderBottom: "1px solid $neutral4",
|
2230
|
+
},
|
2231
|
+
dashed: {
|
2232
|
+
borderBottom: "1px dashed $neutral8",
|
2233
|
+
},
|
2234
|
+
},
|
2235
|
+
},
|
2236
|
+
defaultVariants: {
|
2237
|
+
align: "start",
|
2238
|
+
border: "solid",
|
2239
|
+
},
|
2240
|
+
});
|
2241
|
+
var Thead = styled("thead", (_a = {},
|
2242
|
+
_a["& ".concat(Th)] = {
|
2243
|
+
fontSize: "$1",
|
2244
|
+
color: "$gray11",
|
2245
|
+
},
|
2246
|
+
_a["& ".concat(Td)] = {
|
2247
|
+
fontSize: "$1",
|
2248
|
+
color: "$neutral11",
|
2249
|
+
},
|
2250
|
+
_a));
|
2251
|
+
var Table = styled("table", {
|
2252
|
+
width: "100%",
|
2253
|
+
tableLayout: "fixed",
|
2254
|
+
borderSpacing: 0,
|
2255
|
+
variants: {
|
2256
|
+
striped: {
|
2257
|
+
true: (_b = {},
|
2258
|
+
_b["& ".concat(Tbody)] = (_c = {},
|
2259
|
+
_c["& ".concat(Tr)] = {
|
2260
|
+
"&:nth-child(odd)": {
|
2261
|
+
bc: "$neutral2",
|
2262
|
+
},
|
2263
|
+
},
|
2264
|
+
_c),
|
2265
|
+
_b),
|
2266
|
+
},
|
2267
|
+
},
|
2268
|
+
});
|
2269
|
+
|
2270
|
+
export { Accordion, AccordionButton, AccordionItem, AccordionPanel, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogTitle, AlertDialogTrigger, Badge, Banner, Button, Caption, Card, Dialog, DialogClose, DialogContent, DialogDescription, DialogTitle, DialogTrigger, DropdownMenuCheckboxItem, DropdownMenuItem, DropdownMenuRadioItem, Label, Link, Promo, RadioCard, Select, SnackbarProvider, Switch, Table, TabsContent, TabsList, TabsTrigger, Tbody, Td, Text, TextField, Tfoot, Th, Thead, Tr, themes, useSnackbar };
|