@livepeer/design-system 1.0.1 → 1.0.2
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/AppBar.d.ts +1 -1
- package/dist/components/Button.d.ts +1 -1
- package/dist/components/DropdownMenu.d.ts +3 -3
- package/dist/components/Promo.d.ts +1 -1
- package/dist/custom/AppBar.d.ts +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.es.js +387 -2
- package/dist/index.js +390 -0
- package/dist/stitches.config.d.ts +1 -1
- package/package.json +1 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
export declare const AppBar: import("@stitches/react/types/styled-component").StyledComponent<"div", {
|
2
|
-
size?: "1" | "2" | "3" |
|
2
|
+
size?: 1 | "1" | "2" | "3" | 2 | 3 | undefined;
|
3
3
|
sticky?: boolean | "true" | undefined;
|
4
4
|
glass?: boolean | "true" | undefined;
|
5
5
|
border?: boolean | "true" | undefined;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
export declare const Button: import("@stitches/react/types/styled-component").StyledComponent<"button", {
|
2
2
|
size?: number | "1" | "2" | "3" | "4" | undefined;
|
3
|
-
variant?: "tomato" | "red" | "crimson" | "pink" | "plum" | "purple" | "violet" | "indigo" | "blue" | "sky" | "cyan" | "teal" | "mint" | "green" | "grass" | "lime" | "yellow" | "amber" | "orange" | "brown" | "primary" | "neutral" | "transparentWhite" | "transparentBlack" | undefined;
|
3
|
+
variant?: "gray" | "tomato" | "red" | "crimson" | "pink" | "plum" | "purple" | "violet" | "indigo" | "blue" | "sky" | "cyan" | "teal" | "mint" | "green" | "grass" | "lime" | "yellow" | "amber" | "orange" | "brown" | "primary" | "neutral" | "transparentWhite" | "transparentBlack" | undefined;
|
4
4
|
ghost?: boolean | "true" | undefined;
|
5
5
|
}, {
|
6
6
|
bp1: "(min-width: 520px)";
|
@@ -3761,7 +3761,7 @@ declare const DropdownMenuItem: import("@stitches/react/types/styled-component")
|
|
3761
3761
|
};
|
3762
3762
|
};
|
3763
3763
|
}>>, {
|
3764
|
-
color?: "tomato" | "red" | "crimson" | "pink" | "plum" | "purple" | "violet" | "indigo" | "blue" | "sky" | "cyan" | "teal" | "mint" | "green" | "grass" | "lime" | "yellow" | "amber" | "orange" | "brown" | "primary" | undefined;
|
3764
|
+
color?: "gray" | "tomato" | "red" | "crimson" | "pink" | "plum" | "purple" | "violet" | "indigo" | "blue" | "sky" | "cyan" | "teal" | "mint" | "green" | "grass" | "lime" | "yellow" | "amber" | "orange" | "brown" | "primary" | undefined;
|
3765
3765
|
}, {
|
3766
3766
|
bp1: "(min-width: 520px)";
|
3767
3767
|
bp2: "(min-width: 900px)";
|
@@ -4512,7 +4512,7 @@ declare const DropdownMenuItem: import("@stitches/react/types/styled-component")
|
|
4512
4512
|
};
|
4513
4513
|
}>>;
|
4514
4514
|
declare const DropdownMenuRadioItem: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<Pick<DialogMenuRadioItemProps, "color" | "translate" | "hidden" | "style" | "css" | "className" | "slot" | "title" | "onSelect" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "asChild" | "disabled" | "textValue" | "value"> & React.RefAttributes<HTMLDivElement>>, {
|
4515
|
-
color?: "tomato" | "red" | "crimson" | "pink" | "plum" | "purple" | "violet" | "indigo" | "blue" | "sky" | "cyan" | "teal" | "mint" | "green" | "grass" | "lime" | "yellow" | "amber" | "orange" | "brown" | "primary" | undefined;
|
4515
|
+
color?: "gray" | "tomato" | "red" | "crimson" | "pink" | "plum" | "purple" | "violet" | "indigo" | "blue" | "sky" | "cyan" | "teal" | "mint" | "green" | "grass" | "lime" | "yellow" | "amber" | "orange" | "brown" | "primary" | undefined;
|
4516
4516
|
}, {
|
4517
4517
|
bp1: "(min-width: 520px)";
|
4518
4518
|
bp2: "(min-width: 900px)";
|
@@ -5263,7 +5263,7 @@ declare const DropdownMenuRadioItem: import("@stitches/react/types/styled-compon
|
|
5263
5263
|
};
|
5264
5264
|
}>>;
|
5265
5265
|
declare const DropdownMenuCheckboxItem: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<Pick<DialogMenuCheckboxItemProps, "color" | "translate" | "hidden" | "style" | "css" | "className" | "slot" | "title" | "onSelect" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "asChild" | "disabled" | "textValue" | "checked" | "onCheckedChange"> & React.RefAttributes<HTMLDivElement>>, {
|
5266
|
-
color?: "tomato" | "red" | "crimson" | "pink" | "plum" | "purple" | "violet" | "indigo" | "blue" | "sky" | "cyan" | "teal" | "mint" | "green" | "grass" | "lime" | "yellow" | "amber" | "orange" | "brown" | "primary" | undefined;
|
5266
|
+
color?: "gray" | "tomato" | "red" | "crimson" | "pink" | "plum" | "purple" | "violet" | "indigo" | "blue" | "sky" | "cyan" | "teal" | "mint" | "green" | "grass" | "lime" | "yellow" | "amber" | "orange" | "brown" | "primary" | undefined;
|
5267
5267
|
}, {
|
5268
5268
|
bp1: "(min-width: 520px)";
|
5269
5269
|
bp2: "(min-width: 900px)";
|
@@ -1,6 +1,6 @@
|
|
1
1
|
export declare const Promo: import("@stitches/react/types/styled-component").StyledComponent<"div", {
|
2
2
|
size?: number | "1" | "2" | "3" | undefined;
|
3
|
-
variant?: "loContrast" | "
|
3
|
+
variant?: "loContrast" | "subtle" | "blue" | "green" | "indigo" | "violet" | "red" | undefined;
|
4
4
|
rounded?: boolean | "true" | undefined;
|
5
5
|
border?: boolean | "true" | undefined;
|
6
6
|
}, {
|
package/dist/custom/AppBar.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
export declare const AppBar: import("@stitches/react/types/styled-component").StyledComponent<"div", {
|
2
|
-
size?: "1" | "2" | "3" |
|
2
|
+
size?: 1 | "1" | "2" | "3" | 2 | 3 | undefined;
|
3
3
|
sticky?: boolean | "true" | undefined;
|
4
4
|
glass?: boolean | "true" | undefined;
|
5
5
|
border?: boolean | "true" | undefined;
|
package/dist/index.d.ts
CHANGED
@@ -26,6 +26,7 @@ export { Heading } from "./components/Heading";
|
|
26
26
|
export { IconButton } from "./components/IconButton";
|
27
27
|
export { Image } from "./components/Image";
|
28
28
|
export { Kbd } from "./components/Kbd";
|
29
|
+
export { Label } from "./components/Label";
|
29
30
|
export { Link } from "./components/Link";
|
30
31
|
export { Menu, MenuCheckboxItem, MenuGroup, MenuItem, MenuLabel, MenuRadioGroup, MenuRadioItem, MenuSeparator, } from "./components/Menu";
|
31
32
|
export { Overlay } from "./components/Overlay";
|
@@ -33,6 +34,7 @@ export { Panel } from "./components/Panel";
|
|
33
34
|
export { Paragraph } from "./components/Paragraph";
|
34
35
|
export { Popover, PopoverClose, PopoverContent, PopoverTrigger, } from "./components/Popover";
|
35
36
|
export { ProgressBar } from "./components/ProgressBar";
|
37
|
+
export { Promo } from "./components/Promo";
|
36
38
|
export { Radio, RadioGroup } from "./components/Radio";
|
37
39
|
export { RadioCard, RadioCardGroup } from "./components/RadioCard";
|
38
40
|
export { Section } from "./components/Section";
|
@@ -42,6 +44,7 @@ export { Sheet, SheetClose, SheetContent, SheetDescription, SheetTitle, SheetTri
|
|
42
44
|
export { SimpleToggle } from "./components/SimpleToggle";
|
43
45
|
export { Skeleton } from "./components/Skeleton";
|
44
46
|
export { Slider } from "./components/Slider";
|
47
|
+
export { SnackbarProvider, useSnackbar } from "./components/Snackbar";
|
45
48
|
export { Status } from "./components/Status";
|
46
49
|
export { Sub } from "./components/Sub";
|
47
50
|
export { Sup } from "./components/Sup";
|
@@ -55,4 +58,4 @@ export { TextField } from "./components/TextField";
|
|
55
58
|
export { Tooltip } from "./components/Tooltip";
|
56
59
|
export { TreeItem } from "./components/TreeItem";
|
57
60
|
export { VerifiedBadge } from "./components/VerifiedBadge";
|
58
|
-
export { config, css, getCssText, globalCss, keyframes, styled,
|
61
|
+
export { config, css, getCssText, getThemes, globalCss, keyframes, styled, } from "./stitches.config";
|
package/dist/index.es.js
CHANGED
@@ -4,7 +4,7 @@ export { Arrow as HoverCardArrow, Content as HoverCardContent, Root as HoverCard
|
|
4
4
|
export { Portal } from '@radix-ui/react-portal';
|
5
5
|
export { Corner as ScrollAreaCorner, Root as ScrollAreaRoot, Scrollbar as ScrollAreaScrollbar, Thumb as ScrollAreaThumb, Viewport as ScrollAreaViewport } from '@radix-ui/react-scroll-area';
|
6
6
|
import { __assign, __spreadArray, __rest } from 'tslib';
|
7
|
-
import React from 'react';
|
7
|
+
import React, { createContext, useState, useContext } from 'react';
|
8
8
|
import { createStitches } from '@stitches/react';
|
9
9
|
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';
|
10
10
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
@@ -19,12 +19,14 @@ import { TooltipProvider } from '@radix-ui/react-tooltip';
|
|
19
19
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
20
20
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
21
21
|
import merge from 'lodash.merge';
|
22
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
22
23
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
23
24
|
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
24
25
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
25
26
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
26
27
|
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
27
28
|
import * as SliderPrimitive from '@radix-ui/react-slider';
|
29
|
+
import { CSSTransition } from 'react-transition-group';
|
28
30
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
29
31
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
30
32
|
|
@@ -260,6 +262,7 @@ createTheme("dark-theme", {
|
|
260
262
|
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);
|
261
263
|
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);
|
262
264
|
var naturalPairingsKeys = [
|
265
|
+
"gray",
|
263
266
|
"tomato",
|
264
267
|
"red",
|
265
268
|
"crimson",
|
@@ -302,8 +305,10 @@ var naturalPairings = {
|
|
302
305
|
amber: "sand",
|
303
306
|
orange: "sand",
|
304
307
|
brown: "sand",
|
308
|
+
gray: "sand",
|
305
309
|
};
|
306
310
|
__spreadArray(__spreadArray([], naturalPairingsKeys.map(function (e) { return "light-theme-".concat(e); }), true), naturalPairingsKeys.map(function (e) { return "dark-theme-".concat(e); }), true);
|
311
|
+
// TODO fix this typing
|
307
312
|
var getThemes = function () {
|
308
313
|
var themes = naturalPairingsKeys.reduce(function (prev, primary) {
|
309
314
|
var _a;
|
@@ -3127,6 +3132,13 @@ var Kbd = styled("kbd", {
|
|
3127
3132
|
},
|
3128
3133
|
});
|
3129
3134
|
|
3135
|
+
var Label = styled(LabelPrimitive.Root, Text, {
|
3136
|
+
fontSize: "$2",
|
3137
|
+
display: "inline-block",
|
3138
|
+
verticalAlign: "middle",
|
3139
|
+
cursor: "default",
|
3140
|
+
});
|
3141
|
+
|
3130
3142
|
var _a$5;
|
3131
3143
|
var Link = styled("a", (_a$5 = {
|
3132
3144
|
alignItems: "center",
|
@@ -3318,6 +3330,117 @@ var ProgressBar = React.forwardRef(function (_a, forwardedRef) {
|
|
3318
3330
|
});
|
3319
3331
|
ProgressBar.displayName = "ProgressBar";
|
3320
3332
|
|
3333
|
+
var Promo = styled("div", {
|
3334
|
+
// Reset
|
3335
|
+
boxSizing: "border-box",
|
3336
|
+
"&::before": {
|
3337
|
+
boxSizing: "border-box",
|
3338
|
+
},
|
3339
|
+
"&::after": {
|
3340
|
+
boxSizing: "border-box",
|
3341
|
+
},
|
3342
|
+
p: "$4",
|
3343
|
+
display: "flex",
|
3344
|
+
flexDirection: "column",
|
3345
|
+
borderRadius: "$4",
|
3346
|
+
variants: {
|
3347
|
+
size: {
|
3348
|
+
"1": {
|
3349
|
+
py: "$2",
|
3350
|
+
px: "$3",
|
3351
|
+
},
|
3352
|
+
"2": {
|
3353
|
+
py: "$3",
|
3354
|
+
px: "$4",
|
3355
|
+
},
|
3356
|
+
"3": {
|
3357
|
+
py: "$4",
|
3358
|
+
px: "$5",
|
3359
|
+
},
|
3360
|
+
},
|
3361
|
+
variant: {
|
3362
|
+
loContrast: {
|
3363
|
+
backgroundColor: "$loContrast",
|
3364
|
+
},
|
3365
|
+
subtle: {
|
3366
|
+
backgroundColor: "$neutral2",
|
3367
|
+
boxShadow: "0 0 0 1px $colors$neutral6",
|
3368
|
+
},
|
3369
|
+
blue: {
|
3370
|
+
backgroundColor: "$blue2",
|
3371
|
+
boxShadow: "0 0 0 1px $colors$blue6",
|
3372
|
+
},
|
3373
|
+
green: {
|
3374
|
+
backgroundColor: "$green2",
|
3375
|
+
boxShadow: "0 0 0 1px $colors$green6",
|
3376
|
+
},
|
3377
|
+
indigo: {
|
3378
|
+
backgroundColor: "$indigo2",
|
3379
|
+
boxShadow: "0 0 0 1px $colors$indigo6",
|
3380
|
+
},
|
3381
|
+
violet: {
|
3382
|
+
backgroundColor: "$violet2",
|
3383
|
+
boxShadow: "0 0 0 1px $colors$violet6",
|
3384
|
+
},
|
3385
|
+
red: {
|
3386
|
+
backgroundColor: "$red2",
|
3387
|
+
boxShadow: "0 0 0 1px $colors$red6",
|
3388
|
+
},
|
3389
|
+
},
|
3390
|
+
rounded: {
|
3391
|
+
true: {
|
3392
|
+
borderRadius: "$pill",
|
3393
|
+
},
|
3394
|
+
},
|
3395
|
+
border: {
|
3396
|
+
true: {
|
3397
|
+
borderRadius: "$pill",
|
3398
|
+
},
|
3399
|
+
},
|
3400
|
+
},
|
3401
|
+
compoundVariants: [
|
3402
|
+
{
|
3403
|
+
border: "true",
|
3404
|
+
variant: "subtle",
|
3405
|
+
css: {
|
3406
|
+
borderColor: "$neutral6",
|
3407
|
+
},
|
3408
|
+
},
|
3409
|
+
{
|
3410
|
+
border: "true",
|
3411
|
+
variant: "blue",
|
3412
|
+
css: {
|
3413
|
+
borderColor: "$blue11",
|
3414
|
+
},
|
3415
|
+
},
|
3416
|
+
{
|
3417
|
+
border: "true",
|
3418
|
+
variant: "indigo",
|
3419
|
+
css: {
|
3420
|
+
borderColor: "$indigo11",
|
3421
|
+
},
|
3422
|
+
},
|
3423
|
+
{
|
3424
|
+
border: "true",
|
3425
|
+
variant: "violet",
|
3426
|
+
css: {
|
3427
|
+
borderColor: "$violet11",
|
3428
|
+
},
|
3429
|
+
},
|
3430
|
+
{
|
3431
|
+
border: "true",
|
3432
|
+
variant: "loContrast",
|
3433
|
+
css: {
|
3434
|
+
borderColor: "$neutral6",
|
3435
|
+
},
|
3436
|
+
},
|
3437
|
+
],
|
3438
|
+
defaultVariants: {
|
3439
|
+
size: "1",
|
3440
|
+
variant: "subtle",
|
3441
|
+
},
|
3442
|
+
});
|
3443
|
+
|
3321
3444
|
var _a$4;
|
3322
3445
|
var RadioGroup = styled(RadioGroupPrimitive.Root, {
|
3323
3446
|
display: "flex",
|
@@ -3847,6 +3970,268 @@ var Slider = React.forwardRef(function (props, forwardedRef) {
|
|
3847
3970
|
});
|
3848
3971
|
Slider.displayName = "Slider";
|
3849
3972
|
|
3973
|
+
var transitionStyles = {
|
3974
|
+
".snackbar-enter": {
|
3975
|
+
opacity: 0,
|
3976
|
+
},
|
3977
|
+
".snackbar-exit-active": {
|
3978
|
+
opacity: 0,
|
3979
|
+
},
|
3980
|
+
".snackbar-enter-active": {
|
3981
|
+
opacity: 1,
|
3982
|
+
},
|
3983
|
+
".snackbar-enter-top-center": {
|
3984
|
+
transform: "translateY(-16px)",
|
3985
|
+
},
|
3986
|
+
".snackbar-enter-top-right": {
|
3987
|
+
transform: "translateY(-16px)",
|
3988
|
+
},
|
3989
|
+
".snackbar-exit-active-top-left": {
|
3990
|
+
transform: "translateY(-16px)",
|
3991
|
+
},
|
3992
|
+
".snackbar-exit-active-top-center": {
|
3993
|
+
transform: "translateY(-16px)",
|
3994
|
+
},
|
3995
|
+
".snackbar-exit-active-top-right": {
|
3996
|
+
transform: "translateY(-16px)",
|
3997
|
+
},
|
3998
|
+
".snackbar-enter-bottom-left": {
|
3999
|
+
transform: "translateY(16px)",
|
4000
|
+
},
|
4001
|
+
".snackbar-enter-bottom-center": {
|
4002
|
+
transform: "translateY(16px)",
|
4003
|
+
},
|
4004
|
+
".snackbar-enter-bottom-right": {
|
4005
|
+
transform: "translateY(16px)",
|
4006
|
+
},
|
4007
|
+
".snackbar-exit-active-bottom-left": {
|
4008
|
+
transform: "translateY(16px)",
|
4009
|
+
},
|
4010
|
+
".snackbar-exit-active-bottom-center": {
|
4011
|
+
transform: "translateY(16px)",
|
4012
|
+
},
|
4013
|
+
".snackbar-exit-active-bottom-right": {
|
4014
|
+
transform: "translateY(16px)",
|
4015
|
+
},
|
4016
|
+
".snackbar-enter-active-top-left": {
|
4017
|
+
transform: "translateY(0px)",
|
4018
|
+
},
|
4019
|
+
".snackbar-enter-active-top-center": {
|
4020
|
+
transform: "translateY(0px)",
|
4021
|
+
},
|
4022
|
+
".snackbar-enter-active-top-right": {
|
4023
|
+
transform: "translateY(0px)",
|
4024
|
+
},
|
4025
|
+
".snackbar-enter-active-bottom-left": {
|
4026
|
+
transform: "translateY(0px)",
|
4027
|
+
},
|
4028
|
+
".snackbar-enter-active-bottom-center": {
|
4029
|
+
transform: "translateY(0px)",
|
4030
|
+
},
|
4031
|
+
".snackbar-enter-active-bottom-right": {
|
4032
|
+
transform: "translateY(0px)",
|
4033
|
+
},
|
4034
|
+
".snackbar-wrapper-top-left": {
|
4035
|
+
justifyContent: "flex-start",
|
4036
|
+
top: "8px",
|
4037
|
+
},
|
4038
|
+
".snackbar-wrapper-top-center": {
|
4039
|
+
top: "8px",
|
4040
|
+
justifyContent: "center",
|
4041
|
+
},
|
4042
|
+
".snackbar-wrapper-top-right": {
|
4043
|
+
top: "8px",
|
4044
|
+
justifyContent: "flex-end",
|
4045
|
+
},
|
4046
|
+
".snackbar-wrapper-bottom-left": {
|
4047
|
+
bottom: "8px",
|
4048
|
+
justifyContent: "flex-start",
|
4049
|
+
},
|
4050
|
+
".snackbar-wrapper-bottom-center": {
|
4051
|
+
bottom: "8px",
|
4052
|
+
justifyContent: "center",
|
4053
|
+
},
|
4054
|
+
".snackbar-wrapper-bottom-right": {
|
4055
|
+
bottom: "8px",
|
4056
|
+
justifyContent: "flex-end",
|
4057
|
+
},
|
4058
|
+
};
|
4059
|
+
|
4060
|
+
// type coercion for bad typing in lib
|
4061
|
+
var CSSTransitionTyped = CSSTransition;
|
4062
|
+
// Snackbar default values
|
4063
|
+
var defaultPosition = "bottom-center";
|
4064
|
+
var defaultDuration = 5000;
|
4065
|
+
var defaultInterval = 250;
|
4066
|
+
var positions = [
|
4067
|
+
"top-left",
|
4068
|
+
"top-center",
|
4069
|
+
"top-right",
|
4070
|
+
"bottom-left",
|
4071
|
+
"bottom-center",
|
4072
|
+
"bottom-right",
|
4073
|
+
];
|
4074
|
+
// Context used by the hook useSnackbar() and HoC withSnackbar()
|
4075
|
+
var SnackbarContext = createContext({});
|
4076
|
+
var SnackbarProvider = function (_a) {
|
4077
|
+
var children = _a.children;
|
4078
|
+
// Current open state
|
4079
|
+
var _b = useState(false), open = _b[0], setOpen = _b[1];
|
4080
|
+
// Current timeout ID
|
4081
|
+
var _c = useState(null), timeoutId = _c[0], setTimeoutId = _c[1];
|
4082
|
+
// Snackbar's text
|
4083
|
+
var _d = useState(""), text = _d[0], setText = _d[1];
|
4084
|
+
// Snackbar's duration
|
4085
|
+
var _e = useState(defaultDuration), duration = _e[0], setDuration = _e[1];
|
4086
|
+
// Snackbar's position
|
4087
|
+
var _f = useState(defaultPosition), position = _f[0], setPosition = _f[1];
|
4088
|
+
// Custom styles for the snackbar itself
|
4089
|
+
var _g = useState({}), customStyles = _g[0], setCustomStyles = _g[1];
|
4090
|
+
// Custom styles for the close button
|
4091
|
+
var _h = useState({}), closeCustomStyles = _h[0], setCloseCustomStyles = _h[1];
|
4092
|
+
var triggerSnackbar = function (text, duration, position, style, closeStyle) {
|
4093
|
+
setText(text);
|
4094
|
+
setDuration(duration);
|
4095
|
+
setPosition(position);
|
4096
|
+
setCustomStyles(style);
|
4097
|
+
setCloseCustomStyles(closeStyle);
|
4098
|
+
setOpen(true);
|
4099
|
+
};
|
4100
|
+
// Manages all the snackbar's opening process
|
4101
|
+
var openSnackbar = function (text, duration, position, style, closeStyle) {
|
4102
|
+
// Closes the snackbar if it is already open
|
4103
|
+
if (open === true) {
|
4104
|
+
setOpen(false);
|
4105
|
+
setTimeout(function () {
|
4106
|
+
triggerSnackbar(text, duration, position, style, closeStyle);
|
4107
|
+
}, defaultInterval);
|
4108
|
+
}
|
4109
|
+
else {
|
4110
|
+
triggerSnackbar(text, duration, position, style, closeStyle);
|
4111
|
+
}
|
4112
|
+
};
|
4113
|
+
// Closes the snackbar just by setting the "open" state to false
|
4114
|
+
var closeSnackbar = function () {
|
4115
|
+
setOpen(false);
|
4116
|
+
};
|
4117
|
+
// Returns the Provider that must wrap the application
|
4118
|
+
return (React.createElement(SnackbarContext.Provider, { value: { openSnackbar: openSnackbar, closeSnackbar: closeSnackbar } },
|
4119
|
+
children,
|
4120
|
+
React.createElement(Box, { css: transitionStyles },
|
4121
|
+
React.createElement(CSSTransitionTyped, { in: open, timeout: 150, mountOnEnter: true, unmountOnExit: true,
|
4122
|
+
// Sets timeout to close the snackbar
|
4123
|
+
onEnter: function () {
|
4124
|
+
// @ts-ignore
|
4125
|
+
clearTimeout(timeoutId);
|
4126
|
+
// @ts-ignore
|
4127
|
+
setTimeoutId(setTimeout(function () { return setOpen(false); }, duration));
|
4128
|
+
},
|
4129
|
+
// Sets custom classNames based on "position"
|
4130
|
+
className: "snackbar-wrapper-".concat(position), classNames: {
|
4131
|
+
enter: "snackbar-enter snackbar-enter-".concat(position),
|
4132
|
+
enterActive: "snackbar-enter-active snackbar-enter-active-".concat(position),
|
4133
|
+
exitActive: "snackbar-exit-active snackbar-exit-active-".concat(position),
|
4134
|
+
} },
|
4135
|
+
React.createElement(Box, { css: {
|
4136
|
+
display: "flex",
|
4137
|
+
alignItems: "center",
|
4138
|
+
margin: "8px",
|
4139
|
+
position: "fixed",
|
4140
|
+
right: "0",
|
4141
|
+
left: "0",
|
4142
|
+
zIndex: "1",
|
4143
|
+
transition: "opacity 150ms, transform 150ms",
|
4144
|
+
pointerEvents: "none",
|
4145
|
+
justifyContent: "center",
|
4146
|
+
bottom: "8px",
|
4147
|
+
} },
|
4148
|
+
React.createElement(Box, { css: {
|
4149
|
+
display: "flex",
|
4150
|
+
alignItems: "center",
|
4151
|
+
justifyContent: "flex-start",
|
4152
|
+
borderRadius: "4px",
|
4153
|
+
minWidth: "334px",
|
4154
|
+
maxWidth: "672px",
|
4155
|
+
zIndex: 1000000,
|
4156
|
+
backgroundColor: "$panel",
|
4157
|
+
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)",
|
4158
|
+
WebkitFontSmoothing: "antialiased",
|
4159
|
+
MozOsxFontSmoothing: "grayscale",
|
4160
|
+
fontFamily: "sans-serif",
|
4161
|
+
fontSize: "14px",
|
4162
|
+
fontWeight: "400",
|
4163
|
+
color: "$hiContrast",
|
4164
|
+
letterSpacing: "0.25px",
|
4165
|
+
lineHeight: "20px",
|
4166
|
+
textAlign: "left",
|
4167
|
+
}, style: customStyles },
|
4168
|
+
React.createElement(Box, { css: {
|
4169
|
+
flexGrow: 1,
|
4170
|
+
padding: "14px 16px",
|
4171
|
+
margin: "0",
|
4172
|
+
pointerEvents: "auto",
|
4173
|
+
color: "$hiContrast",
|
4174
|
+
} }, text),
|
4175
|
+
React.createElement(Box, { as: "button", css: {
|
4176
|
+
lexShrink: "0",
|
4177
|
+
boxSizing: "border-box",
|
4178
|
+
display: "flex",
|
4179
|
+
alignItems: "center",
|
4180
|
+
justifyContent: "center",
|
4181
|
+
width: "36px",
|
4182
|
+
height: "36px",
|
4183
|
+
padding: "8px",
|
4184
|
+
margin: "0 8px 0 0",
|
4185
|
+
cursor: "pointer",
|
4186
|
+
position: "relative",
|
4187
|
+
pointerEvents: "auto",
|
4188
|
+
WebkitTapHighlightColor: "transparent",
|
4189
|
+
/* Reset button styles */
|
4190
|
+
outline: "none",
|
4191
|
+
backgroundColor: "transparent",
|
4192
|
+
border: "none",
|
4193
|
+
/* SVG icon properties */
|
4194
|
+
fontSize: "12px",
|
4195
|
+
color: "$hiContrast",
|
4196
|
+
"&:hover:before": {
|
4197
|
+
opacity: "0.08",
|
4198
|
+
},
|
4199
|
+
"&:before": {
|
4200
|
+
content: '""',
|
4201
|
+
backgroundColor: "$hiContrast",
|
4202
|
+
borderRadius: "50%",
|
4203
|
+
opacity: "0",
|
4204
|
+
position: "absolute",
|
4205
|
+
transition: "opacity 120ms linear",
|
4206
|
+
top: "0%",
|
4207
|
+
left: "0%",
|
4208
|
+
width: "100%",
|
4209
|
+
height: "100%",
|
4210
|
+
},
|
4211
|
+
}, onClick: closeSnackbar, style: closeCustomStyles },
|
4212
|
+
React.createElement(CloseIcon, null))))))));
|
4213
|
+
};
|
4214
|
+
// CloseIcon SVG is styled with font properties
|
4215
|
+
var CloseIcon = function () { return (React.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 12 12" },
|
4216
|
+
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" }))); };
|
4217
|
+
|
4218
|
+
// Custom hook to trigger the snackbar on function components
|
4219
|
+
var useSnackbar = function (_a) {
|
4220
|
+
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;
|
4221
|
+
var _f = useContext(SnackbarContext), openSnackbar = _f.openSnackbar, closeSnackbar = _f.closeSnackbar;
|
4222
|
+
// If no correct position is passed, 'bottom-center' is set
|
4223
|
+
if (!positions.includes(position)) {
|
4224
|
+
position = defaultPosition;
|
4225
|
+
}
|
4226
|
+
function open(text, duration) {
|
4227
|
+
if (text === void 0) { text = ""; }
|
4228
|
+
if (duration === void 0) { duration = defaultDuration; }
|
4229
|
+
openSnackbar(text, duration, position, style, closeStyle);
|
4230
|
+
}
|
4231
|
+
// Returns methods in hooks array way
|
4232
|
+
return [open, closeSnackbar];
|
4233
|
+
};
|
4234
|
+
|
3850
4235
|
var Sub = styled("sub", {
|
3851
4236
|
fontFeatureSettings: '"subs"',
|
3852
4237
|
fontSize: "100%",
|
@@ -4521,4 +4906,4 @@ var VerifiedBadge = React.forwardRef(function (props, forwardedRef) { return (Re
|
|
4521
4906
|
React.createElement(CheckIcon, null))); });
|
4522
4907
|
VerifiedBadge.displayName = "VerifiedBadge";
|
4523
4908
|
|
4524
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarGroup, AvatarNestedItem, Badge, Banner, Box, Button, Caption, Card, Checkbox, Code, Container, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuTrigger, ControlGroup, DesignSystemProvider, Dialog, DialogClose, DialogContent, DialogDescription, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuTrigger, Flex, Grid, Heading, IconButton, Image, Kbd, Link, Menu, MenuCheckboxItem, MenuGroup, MenuItem, MenuLabel, MenuRadioGroup, MenuRadioItem, MenuSeparator, Overlay, Panel, Paragraph, Popover, PopoverClose, PopoverContent, PopoverTrigger, ProgressBar, Radio, RadioCard, RadioCardGroup, RadioGroup, Section, Select, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetTitle, SheetTrigger, SimpleToggle, Skeleton, Slider, Status, Sub, Sup, Switch, TabLink, Table, Tabs, TabsContent, TabsList, TabsTrigger, Tbody, Td, Text, TextArea, TextField, Tfoot, Th, Thead, Tooltip, Tr, TreeItem, VerifiedBadge, config, css, getCssText, getThemes, globalCss, keyframes, styled };
|
4909
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarGroup, AvatarNestedItem, Badge, Banner, Box, Button, Caption, Card, Checkbox, Code, Container, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuTrigger, ControlGroup, DesignSystemProvider, Dialog, DialogClose, DialogContent, DialogDescription, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuTrigger, Flex, Grid, Heading, IconButton, Image, Kbd, Label, Link, Menu, MenuCheckboxItem, MenuGroup, MenuItem, MenuLabel, MenuRadioGroup, MenuRadioItem, MenuSeparator, Overlay, Panel, Paragraph, Popover, PopoverClose, PopoverContent, PopoverTrigger, ProgressBar, Promo, Radio, RadioCard, RadioCardGroup, RadioGroup, Section, Select, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetTitle, SheetTrigger, SimpleToggle, Skeleton, Slider, SnackbarProvider, Status, Sub, Sup, Switch, TabLink, Table, Tabs, TabsContent, TabsList, TabsTrigger, Tbody, Td, Text, TextArea, TextField, Tfoot, Th, Thead, Tooltip, Tr, TreeItem, VerifiedBadge, config, css, getCssText, getThemes, globalCss, keyframes, styled, useSnackbar };
|
package/dist/index.js
CHANGED
@@ -22,12 +22,14 @@ var TooltipPrimitive = require('@radix-ui/react-tooltip');
|
|
22
22
|
var DialogPrimitive = require('@radix-ui/react-dialog');
|
23
23
|
var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
|
24
24
|
var merge = require('lodash.merge');
|
25
|
+
var LabelPrimitive = require('@radix-ui/react-label');
|
25
26
|
var PopoverPrimitive = require('@radix-ui/react-popover');
|
26
27
|
var ProgressPrimitive = require('@radix-ui/react-progress');
|
27
28
|
var RadioGroupPrimitive = require('@radix-ui/react-radio-group');
|
28
29
|
var SeparatorPrimitive = require('@radix-ui/react-separator');
|
29
30
|
var TogglePrimitive = require('@radix-ui/react-toggle');
|
30
31
|
var SliderPrimitive = require('@radix-ui/react-slider');
|
32
|
+
var reactTransitionGroup = require('react-transition-group');
|
31
33
|
var SwitchPrimitive = require('@radix-ui/react-switch');
|
32
34
|
var TabsPrimitive = require('@radix-ui/react-tabs');
|
33
35
|
|
@@ -62,6 +64,7 @@ var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitiv
|
|
62
64
|
var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
|
63
65
|
var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
|
64
66
|
var merge__default = /*#__PURE__*/_interopDefaultLegacy(merge);
|
67
|
+
var LabelPrimitive__namespace = /*#__PURE__*/_interopNamespace(LabelPrimitive);
|
65
68
|
var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
|
66
69
|
var ProgressPrimitive__namespace = /*#__PURE__*/_interopNamespace(ProgressPrimitive);
|
67
70
|
var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
|
@@ -303,6 +306,7 @@ createTheme("dark-theme", {
|
|
303
306
|
var lightThemeColors = tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign({}, colors.gray), colors.mauve), colors.slate), colors.sage), colors.olive), colors.sand), colors.tomato), colors.red), colors.crimson), colors.pink), colors.plum), colors.purple), colors.violet), colors.indigo), colors.blue), colors.sky), colors.mint), colors.cyan), colors.teal), colors.green), colors.grass), colors.lime), colors.yellow), colors.amber), colors.orange), colors.brown), colors.bronze), colors.gold), colors.whiteA), colors.blackA);
|
304
307
|
var darkThemeColors = tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign({}, colors.grayDark), colors.mauveDark), colors.slateDark), colors.sageDark), colors.oliveDark), colors.sandDark), colors.tomatoDark), colors.redDark), colors.crimsonDark), colors.pinkDark), colors.plumDark), colors.purpleDark), colors.violetDark), colors.indigoDark), colors.blueDark), colors.skyDark), colors.mintDark), colors.cyanDark), colors.tealDark), colors.greenDark), colors.grassDark), colors.limeDark), colors.yellowDark), colors.amberDark), colors.orangeDark), colors.brownDark), colors.bronzeDark), colors.goldDark), colors.whiteA), colors.blackA);
|
305
308
|
var naturalPairingsKeys = [
|
309
|
+
"gray",
|
306
310
|
"tomato",
|
307
311
|
"red",
|
308
312
|
"crimson",
|
@@ -345,8 +349,10 @@ var naturalPairings = {
|
|
345
349
|
amber: "sand",
|
346
350
|
orange: "sand",
|
347
351
|
brown: "sand",
|
352
|
+
gray: "sand",
|
348
353
|
};
|
349
354
|
tslib.__spreadArray(tslib.__spreadArray([], naturalPairingsKeys.map(function (e) { return "light-theme-".concat(e); }), true), naturalPairingsKeys.map(function (e) { return "dark-theme-".concat(e); }), true);
|
355
|
+
// TODO fix this typing
|
350
356
|
var getThemes = function () {
|
351
357
|
var themes = naturalPairingsKeys.reduce(function (prev, primary) {
|
352
358
|
var _a;
|
@@ -3170,6 +3176,13 @@ var Kbd = styled("kbd", {
|
|
3170
3176
|
},
|
3171
3177
|
});
|
3172
3178
|
|
3179
|
+
var Label = styled(LabelPrimitive__namespace.Root, Text, {
|
3180
|
+
fontSize: "$2",
|
3181
|
+
display: "inline-block",
|
3182
|
+
verticalAlign: "middle",
|
3183
|
+
cursor: "default",
|
3184
|
+
});
|
3185
|
+
|
3173
3186
|
var _a$5;
|
3174
3187
|
var Link = styled("a", (_a$5 = {
|
3175
3188
|
alignItems: "center",
|
@@ -3361,6 +3374,117 @@ var ProgressBar = React__default["default"].forwardRef(function (_a, forwardedRe
|
|
3361
3374
|
});
|
3362
3375
|
ProgressBar.displayName = "ProgressBar";
|
3363
3376
|
|
3377
|
+
var Promo = styled("div", {
|
3378
|
+
// Reset
|
3379
|
+
boxSizing: "border-box",
|
3380
|
+
"&::before": {
|
3381
|
+
boxSizing: "border-box",
|
3382
|
+
},
|
3383
|
+
"&::after": {
|
3384
|
+
boxSizing: "border-box",
|
3385
|
+
},
|
3386
|
+
p: "$4",
|
3387
|
+
display: "flex",
|
3388
|
+
flexDirection: "column",
|
3389
|
+
borderRadius: "$4",
|
3390
|
+
variants: {
|
3391
|
+
size: {
|
3392
|
+
"1": {
|
3393
|
+
py: "$2",
|
3394
|
+
px: "$3",
|
3395
|
+
},
|
3396
|
+
"2": {
|
3397
|
+
py: "$3",
|
3398
|
+
px: "$4",
|
3399
|
+
},
|
3400
|
+
"3": {
|
3401
|
+
py: "$4",
|
3402
|
+
px: "$5",
|
3403
|
+
},
|
3404
|
+
},
|
3405
|
+
variant: {
|
3406
|
+
loContrast: {
|
3407
|
+
backgroundColor: "$loContrast",
|
3408
|
+
},
|
3409
|
+
subtle: {
|
3410
|
+
backgroundColor: "$neutral2",
|
3411
|
+
boxShadow: "0 0 0 1px $colors$neutral6",
|
3412
|
+
},
|
3413
|
+
blue: {
|
3414
|
+
backgroundColor: "$blue2",
|
3415
|
+
boxShadow: "0 0 0 1px $colors$blue6",
|
3416
|
+
},
|
3417
|
+
green: {
|
3418
|
+
backgroundColor: "$green2",
|
3419
|
+
boxShadow: "0 0 0 1px $colors$green6",
|
3420
|
+
},
|
3421
|
+
indigo: {
|
3422
|
+
backgroundColor: "$indigo2",
|
3423
|
+
boxShadow: "0 0 0 1px $colors$indigo6",
|
3424
|
+
},
|
3425
|
+
violet: {
|
3426
|
+
backgroundColor: "$violet2",
|
3427
|
+
boxShadow: "0 0 0 1px $colors$violet6",
|
3428
|
+
},
|
3429
|
+
red: {
|
3430
|
+
backgroundColor: "$red2",
|
3431
|
+
boxShadow: "0 0 0 1px $colors$red6",
|
3432
|
+
},
|
3433
|
+
},
|
3434
|
+
rounded: {
|
3435
|
+
true: {
|
3436
|
+
borderRadius: "$pill",
|
3437
|
+
},
|
3438
|
+
},
|
3439
|
+
border: {
|
3440
|
+
true: {
|
3441
|
+
borderRadius: "$pill",
|
3442
|
+
},
|
3443
|
+
},
|
3444
|
+
},
|
3445
|
+
compoundVariants: [
|
3446
|
+
{
|
3447
|
+
border: "true",
|
3448
|
+
variant: "subtle",
|
3449
|
+
css: {
|
3450
|
+
borderColor: "$neutral6",
|
3451
|
+
},
|
3452
|
+
},
|
3453
|
+
{
|
3454
|
+
border: "true",
|
3455
|
+
variant: "blue",
|
3456
|
+
css: {
|
3457
|
+
borderColor: "$blue11",
|
3458
|
+
},
|
3459
|
+
},
|
3460
|
+
{
|
3461
|
+
border: "true",
|
3462
|
+
variant: "indigo",
|
3463
|
+
css: {
|
3464
|
+
borderColor: "$indigo11",
|
3465
|
+
},
|
3466
|
+
},
|
3467
|
+
{
|
3468
|
+
border: "true",
|
3469
|
+
variant: "violet",
|
3470
|
+
css: {
|
3471
|
+
borderColor: "$violet11",
|
3472
|
+
},
|
3473
|
+
},
|
3474
|
+
{
|
3475
|
+
border: "true",
|
3476
|
+
variant: "loContrast",
|
3477
|
+
css: {
|
3478
|
+
borderColor: "$neutral6",
|
3479
|
+
},
|
3480
|
+
},
|
3481
|
+
],
|
3482
|
+
defaultVariants: {
|
3483
|
+
size: "1",
|
3484
|
+
variant: "subtle",
|
3485
|
+
},
|
3486
|
+
});
|
3487
|
+
|
3364
3488
|
var _a$4;
|
3365
3489
|
var RadioGroup = styled(RadioGroupPrimitive__namespace.Root, {
|
3366
3490
|
display: "flex",
|
@@ -3890,6 +4014,268 @@ var Slider = React__default["default"].forwardRef(function (props, forwardedRef)
|
|
3890
4014
|
});
|
3891
4015
|
Slider.displayName = "Slider";
|
3892
4016
|
|
4017
|
+
var transitionStyles = {
|
4018
|
+
".snackbar-enter": {
|
4019
|
+
opacity: 0,
|
4020
|
+
},
|
4021
|
+
".snackbar-exit-active": {
|
4022
|
+
opacity: 0,
|
4023
|
+
},
|
4024
|
+
".snackbar-enter-active": {
|
4025
|
+
opacity: 1,
|
4026
|
+
},
|
4027
|
+
".snackbar-enter-top-center": {
|
4028
|
+
transform: "translateY(-16px)",
|
4029
|
+
},
|
4030
|
+
".snackbar-enter-top-right": {
|
4031
|
+
transform: "translateY(-16px)",
|
4032
|
+
},
|
4033
|
+
".snackbar-exit-active-top-left": {
|
4034
|
+
transform: "translateY(-16px)",
|
4035
|
+
},
|
4036
|
+
".snackbar-exit-active-top-center": {
|
4037
|
+
transform: "translateY(-16px)",
|
4038
|
+
},
|
4039
|
+
".snackbar-exit-active-top-right": {
|
4040
|
+
transform: "translateY(-16px)",
|
4041
|
+
},
|
4042
|
+
".snackbar-enter-bottom-left": {
|
4043
|
+
transform: "translateY(16px)",
|
4044
|
+
},
|
4045
|
+
".snackbar-enter-bottom-center": {
|
4046
|
+
transform: "translateY(16px)",
|
4047
|
+
},
|
4048
|
+
".snackbar-enter-bottom-right": {
|
4049
|
+
transform: "translateY(16px)",
|
4050
|
+
},
|
4051
|
+
".snackbar-exit-active-bottom-left": {
|
4052
|
+
transform: "translateY(16px)",
|
4053
|
+
},
|
4054
|
+
".snackbar-exit-active-bottom-center": {
|
4055
|
+
transform: "translateY(16px)",
|
4056
|
+
},
|
4057
|
+
".snackbar-exit-active-bottom-right": {
|
4058
|
+
transform: "translateY(16px)",
|
4059
|
+
},
|
4060
|
+
".snackbar-enter-active-top-left": {
|
4061
|
+
transform: "translateY(0px)",
|
4062
|
+
},
|
4063
|
+
".snackbar-enter-active-top-center": {
|
4064
|
+
transform: "translateY(0px)",
|
4065
|
+
},
|
4066
|
+
".snackbar-enter-active-top-right": {
|
4067
|
+
transform: "translateY(0px)",
|
4068
|
+
},
|
4069
|
+
".snackbar-enter-active-bottom-left": {
|
4070
|
+
transform: "translateY(0px)",
|
4071
|
+
},
|
4072
|
+
".snackbar-enter-active-bottom-center": {
|
4073
|
+
transform: "translateY(0px)",
|
4074
|
+
},
|
4075
|
+
".snackbar-enter-active-bottom-right": {
|
4076
|
+
transform: "translateY(0px)",
|
4077
|
+
},
|
4078
|
+
".snackbar-wrapper-top-left": {
|
4079
|
+
justifyContent: "flex-start",
|
4080
|
+
top: "8px",
|
4081
|
+
},
|
4082
|
+
".snackbar-wrapper-top-center": {
|
4083
|
+
top: "8px",
|
4084
|
+
justifyContent: "center",
|
4085
|
+
},
|
4086
|
+
".snackbar-wrapper-top-right": {
|
4087
|
+
top: "8px",
|
4088
|
+
justifyContent: "flex-end",
|
4089
|
+
},
|
4090
|
+
".snackbar-wrapper-bottom-left": {
|
4091
|
+
bottom: "8px",
|
4092
|
+
justifyContent: "flex-start",
|
4093
|
+
},
|
4094
|
+
".snackbar-wrapper-bottom-center": {
|
4095
|
+
bottom: "8px",
|
4096
|
+
justifyContent: "center",
|
4097
|
+
},
|
4098
|
+
".snackbar-wrapper-bottom-right": {
|
4099
|
+
bottom: "8px",
|
4100
|
+
justifyContent: "flex-end",
|
4101
|
+
},
|
4102
|
+
};
|
4103
|
+
|
4104
|
+
// type coercion for bad typing in lib
|
4105
|
+
var CSSTransitionTyped = reactTransitionGroup.CSSTransition;
|
4106
|
+
// Snackbar default values
|
4107
|
+
var defaultPosition = "bottom-center";
|
4108
|
+
var defaultDuration = 5000;
|
4109
|
+
var defaultInterval = 250;
|
4110
|
+
var positions = [
|
4111
|
+
"top-left",
|
4112
|
+
"top-center",
|
4113
|
+
"top-right",
|
4114
|
+
"bottom-left",
|
4115
|
+
"bottom-center",
|
4116
|
+
"bottom-right",
|
4117
|
+
];
|
4118
|
+
// Context used by the hook useSnackbar() and HoC withSnackbar()
|
4119
|
+
var SnackbarContext = React.createContext({});
|
4120
|
+
var SnackbarProvider = function (_a) {
|
4121
|
+
var children = _a.children;
|
4122
|
+
// Current open state
|
4123
|
+
var _b = React.useState(false), open = _b[0], setOpen = _b[1];
|
4124
|
+
// Current timeout ID
|
4125
|
+
var _c = React.useState(null), timeoutId = _c[0], setTimeoutId = _c[1];
|
4126
|
+
// Snackbar's text
|
4127
|
+
var _d = React.useState(""), text = _d[0], setText = _d[1];
|
4128
|
+
// Snackbar's duration
|
4129
|
+
var _e = React.useState(defaultDuration), duration = _e[0], setDuration = _e[1];
|
4130
|
+
// Snackbar's position
|
4131
|
+
var _f = React.useState(defaultPosition), position = _f[0], setPosition = _f[1];
|
4132
|
+
// Custom styles for the snackbar itself
|
4133
|
+
var _g = React.useState({}), customStyles = _g[0], setCustomStyles = _g[1];
|
4134
|
+
// Custom styles for the close button
|
4135
|
+
var _h = React.useState({}), closeCustomStyles = _h[0], setCloseCustomStyles = _h[1];
|
4136
|
+
var triggerSnackbar = function (text, duration, position, style, closeStyle) {
|
4137
|
+
setText(text);
|
4138
|
+
setDuration(duration);
|
4139
|
+
setPosition(position);
|
4140
|
+
setCustomStyles(style);
|
4141
|
+
setCloseCustomStyles(closeStyle);
|
4142
|
+
setOpen(true);
|
4143
|
+
};
|
4144
|
+
// Manages all the snackbar's opening process
|
4145
|
+
var openSnackbar = function (text, duration, position, style, closeStyle) {
|
4146
|
+
// Closes the snackbar if it is already open
|
4147
|
+
if (open === true) {
|
4148
|
+
setOpen(false);
|
4149
|
+
setTimeout(function () {
|
4150
|
+
triggerSnackbar(text, duration, position, style, closeStyle);
|
4151
|
+
}, defaultInterval);
|
4152
|
+
}
|
4153
|
+
else {
|
4154
|
+
triggerSnackbar(text, duration, position, style, closeStyle);
|
4155
|
+
}
|
4156
|
+
};
|
4157
|
+
// Closes the snackbar just by setting the "open" state to false
|
4158
|
+
var closeSnackbar = function () {
|
4159
|
+
setOpen(false);
|
4160
|
+
};
|
4161
|
+
// Returns the Provider that must wrap the application
|
4162
|
+
return (React__default["default"].createElement(SnackbarContext.Provider, { value: { openSnackbar: openSnackbar, closeSnackbar: closeSnackbar } },
|
4163
|
+
children,
|
4164
|
+
React__default["default"].createElement(Box, { css: transitionStyles },
|
4165
|
+
React__default["default"].createElement(CSSTransitionTyped, { in: open, timeout: 150, mountOnEnter: true, unmountOnExit: true,
|
4166
|
+
// Sets timeout to close the snackbar
|
4167
|
+
onEnter: function () {
|
4168
|
+
// @ts-ignore
|
4169
|
+
clearTimeout(timeoutId);
|
4170
|
+
// @ts-ignore
|
4171
|
+
setTimeoutId(setTimeout(function () { return setOpen(false); }, duration));
|
4172
|
+
},
|
4173
|
+
// Sets custom classNames based on "position"
|
4174
|
+
className: "snackbar-wrapper-".concat(position), classNames: {
|
4175
|
+
enter: "snackbar-enter snackbar-enter-".concat(position),
|
4176
|
+
enterActive: "snackbar-enter-active snackbar-enter-active-".concat(position),
|
4177
|
+
exitActive: "snackbar-exit-active snackbar-exit-active-".concat(position),
|
4178
|
+
} },
|
4179
|
+
React__default["default"].createElement(Box, { css: {
|
4180
|
+
display: "flex",
|
4181
|
+
alignItems: "center",
|
4182
|
+
margin: "8px",
|
4183
|
+
position: "fixed",
|
4184
|
+
right: "0",
|
4185
|
+
left: "0",
|
4186
|
+
zIndex: "1",
|
4187
|
+
transition: "opacity 150ms, transform 150ms",
|
4188
|
+
pointerEvents: "none",
|
4189
|
+
justifyContent: "center",
|
4190
|
+
bottom: "8px",
|
4191
|
+
} },
|
4192
|
+
React__default["default"].createElement(Box, { css: {
|
4193
|
+
display: "flex",
|
4194
|
+
alignItems: "center",
|
4195
|
+
justifyContent: "flex-start",
|
4196
|
+
borderRadius: "4px",
|
4197
|
+
minWidth: "334px",
|
4198
|
+
maxWidth: "672px",
|
4199
|
+
zIndex: 1000000,
|
4200
|
+
backgroundColor: "$panel",
|
4201
|
+
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)",
|
4202
|
+
WebkitFontSmoothing: "antialiased",
|
4203
|
+
MozOsxFontSmoothing: "grayscale",
|
4204
|
+
fontFamily: "sans-serif",
|
4205
|
+
fontSize: "14px",
|
4206
|
+
fontWeight: "400",
|
4207
|
+
color: "$hiContrast",
|
4208
|
+
letterSpacing: "0.25px",
|
4209
|
+
lineHeight: "20px",
|
4210
|
+
textAlign: "left",
|
4211
|
+
}, style: customStyles },
|
4212
|
+
React__default["default"].createElement(Box, { css: {
|
4213
|
+
flexGrow: 1,
|
4214
|
+
padding: "14px 16px",
|
4215
|
+
margin: "0",
|
4216
|
+
pointerEvents: "auto",
|
4217
|
+
color: "$hiContrast",
|
4218
|
+
} }, text),
|
4219
|
+
React__default["default"].createElement(Box, { as: "button", css: {
|
4220
|
+
lexShrink: "0",
|
4221
|
+
boxSizing: "border-box",
|
4222
|
+
display: "flex",
|
4223
|
+
alignItems: "center",
|
4224
|
+
justifyContent: "center",
|
4225
|
+
width: "36px",
|
4226
|
+
height: "36px",
|
4227
|
+
padding: "8px",
|
4228
|
+
margin: "0 8px 0 0",
|
4229
|
+
cursor: "pointer",
|
4230
|
+
position: "relative",
|
4231
|
+
pointerEvents: "auto",
|
4232
|
+
WebkitTapHighlightColor: "transparent",
|
4233
|
+
/* Reset button styles */
|
4234
|
+
outline: "none",
|
4235
|
+
backgroundColor: "transparent",
|
4236
|
+
border: "none",
|
4237
|
+
/* SVG icon properties */
|
4238
|
+
fontSize: "12px",
|
4239
|
+
color: "$hiContrast",
|
4240
|
+
"&:hover:before": {
|
4241
|
+
opacity: "0.08",
|
4242
|
+
},
|
4243
|
+
"&:before": {
|
4244
|
+
content: '""',
|
4245
|
+
backgroundColor: "$hiContrast",
|
4246
|
+
borderRadius: "50%",
|
4247
|
+
opacity: "0",
|
4248
|
+
position: "absolute",
|
4249
|
+
transition: "opacity 120ms linear",
|
4250
|
+
top: "0%",
|
4251
|
+
left: "0%",
|
4252
|
+
width: "100%",
|
4253
|
+
height: "100%",
|
4254
|
+
},
|
4255
|
+
}, onClick: closeSnackbar, style: closeCustomStyles },
|
4256
|
+
React__default["default"].createElement(CloseIcon, null))))))));
|
4257
|
+
};
|
4258
|
+
// CloseIcon SVG is styled with font properties
|
4259
|
+
var CloseIcon = function () { return (React__default["default"].createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 12 12" },
|
4260
|
+
React__default["default"].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" }))); };
|
4261
|
+
|
4262
|
+
// Custom hook to trigger the snackbar on function components
|
4263
|
+
var useSnackbar = function (_a) {
|
4264
|
+
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;
|
4265
|
+
var _f = React.useContext(SnackbarContext), openSnackbar = _f.openSnackbar, closeSnackbar = _f.closeSnackbar;
|
4266
|
+
// If no correct position is passed, 'bottom-center' is set
|
4267
|
+
if (!positions.includes(position)) {
|
4268
|
+
position = defaultPosition;
|
4269
|
+
}
|
4270
|
+
function open(text, duration) {
|
4271
|
+
if (text === void 0) { text = ""; }
|
4272
|
+
if (duration === void 0) { duration = defaultDuration; }
|
4273
|
+
openSnackbar(text, duration, position, style, closeStyle);
|
4274
|
+
}
|
4275
|
+
// Returns methods in hooks array way
|
4276
|
+
return [open, closeSnackbar];
|
4277
|
+
};
|
4278
|
+
|
3893
4279
|
var Sub = styled("sub", {
|
3894
4280
|
fontFeatureSettings: '"subs"',
|
3895
4281
|
fontSize: "100%",
|
@@ -4670,6 +5056,7 @@ exports.Heading = Heading;
|
|
4670
5056
|
exports.IconButton = IconButton;
|
4671
5057
|
exports.Image = Image;
|
4672
5058
|
exports.Kbd = Kbd;
|
5059
|
+
exports.Label = Label;
|
4673
5060
|
exports.Link = Link;
|
4674
5061
|
exports.Menu = Menu;
|
4675
5062
|
exports.MenuCheckboxItem = MenuCheckboxItem;
|
@@ -4687,6 +5074,7 @@ exports.PopoverClose = PopoverClose;
|
|
4687
5074
|
exports.PopoverContent = PopoverContent;
|
4688
5075
|
exports.PopoverTrigger = PopoverTrigger;
|
4689
5076
|
exports.ProgressBar = ProgressBar;
|
5077
|
+
exports.Promo = Promo;
|
4690
5078
|
exports.Radio = Radio;
|
4691
5079
|
exports.RadioCard = RadioCard;
|
4692
5080
|
exports.RadioCardGroup = RadioCardGroup;
|
@@ -4703,6 +5091,7 @@ exports.SheetTrigger = SheetTrigger;
|
|
4703
5091
|
exports.SimpleToggle = SimpleToggle;
|
4704
5092
|
exports.Skeleton = Skeleton;
|
4705
5093
|
exports.Slider = Slider;
|
5094
|
+
exports.SnackbarProvider = SnackbarProvider;
|
4706
5095
|
exports.Status = Status;
|
4707
5096
|
exports.Sub = Sub;
|
4708
5097
|
exports.Sup = Sup;
|
@@ -4732,3 +5121,4 @@ exports.getThemes = getThemes;
|
|
4732
5121
|
exports.globalCss = globalCss;
|
4733
5122
|
exports.keyframes = keyframes;
|
4734
5123
|
exports.styled = styled;
|
5124
|
+
exports.useSnackbar = useSnackbar;
|
@@ -6309,7 +6309,7 @@ export declare const darkTheme: string & {
|
|
6309
6309
|
gray12: string;
|
6310
6310
|
};
|
6311
6311
|
}, "">;
|
6312
|
-
export declare const naturalPairingsKeys: readonly ["tomato", "red", "crimson", "pink", "plum", "purple", "violet", "indigo", "blue", "sky", "cyan", "teal", "mint", "green", "grass", "lime", "yellow", "amber", "orange", "brown"];
|
6312
|
+
export declare const naturalPairingsKeys: readonly ["gray", "tomato", "red", "crimson", "pink", "plum", "purple", "violet", "indigo", "blue", "sky", "cyan", "teal", "mint", "green", "grass", "lime", "yellow", "amber", "orange", "brown"];
|
6313
6313
|
export declare type NaturalPairingsKeys = typeof naturalPairingsKeys[number];
|
6314
6314
|
export declare type NaturalPairings = {
|
6315
6315
|
[K in NaturalPairingsKeys]: string;
|