@livepeer/design-system 1.0.0 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  export declare const AppBar: import("@stitches/react/types/styled-component").StyledComponent<"div", {
2
- size?: "1" | "2" | "3" | 1 | 2 | 3 | undefined;
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" | "red" | "violet" | "indigo" | "blue" | "green" | "subtle" | undefined;
3
+ variant?: "loContrast" | "subtle" | "blue" | "green" | "indigo" | "violet" | "red" | undefined;
4
4
  rounded?: boolean | "true" | undefined;
5
5
  border?: boolean | "true" | undefined;
6
6
  }, {
@@ -1,5 +1,5 @@
1
1
  export declare const AppBar: import("@stitches/react/types/styled-component").StyledComponent<"div", {
2
- size?: "1" | "2" | "3" | 1 | 2 | 3 | undefined;
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, getThemes } from "./stitches.config";
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;
@@ -819,7 +824,8 @@ var Avatar = React.forwardRef(function (_a, forwardedRef) {
819
824
  mb: "-3px",
820
825
  } },
821
826
  React.createElement(Status, { size: size && size > 2 ? "2" : "1", variant: status })))));
822
- });
827
+ });
828
+ Avatar.displayName = "Avatar";
823
829
 
824
830
  var Badge = styled("span", {
825
831
  // Reset
@@ -1708,7 +1714,8 @@ var StyledIndicator$1 = styled(CheckboxPrimitive.Indicator, {
1708
1714
  });
1709
1715
  var Checkbox = React.forwardRef(function (props, forwardedRef) { return (React.createElement(StyledCheckbox, __assign({}, props, { ref: forwardedRef }),
1710
1716
  React.createElement(StyledIndicator$1, null,
1711
- React.createElement(CheckIcon, null)))); });
1717
+ React.createElement(CheckIcon, null)))); });
1718
+ Checkbox.displayName = "Checkbox";
1712
1719
 
1713
1720
  var Code = styled("code", {
1714
1721
  fontFamily: "$mono",
@@ -1951,6 +1958,7 @@ var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
1951
1958
  var StyledContent$4 = styled(ContextMenuPrimitive.Content, menuCss, panelStyles);
1952
1959
  var ContextMenuContent = React.forwardRef(function (props, forwardedRef) { return (React.createElement(ContextMenuPrimitive.Portal, null,
1953
1960
  React.createElement(StyledContent$4, __assign({}, props, { ref: forwardedRef })))); });
1961
+ ContextMenuContent.displayName = "ContextMenuContent";
1954
1962
  var ContextMenuItem = styled(ContextMenuPrimitive.Item, itemCss);
1955
1963
  var ContextMenuGroup = styled(ContextMenuPrimitive.Group, {});
1956
1964
  var ContextMenuLabel = styled(ContextMenuPrimitive.Label, labelCss);
@@ -1964,6 +1972,7 @@ var ContextMenuCheckboxItem = React.forwardRef(function (_a, forwardedRef) {
1964
1972
  React.createElement(CheckIcon, null))),
1965
1973
  children));
1966
1974
  });
1975
+ ContextMenuCheckboxItem.displayName = "ContextMenuCheckboxItem";
1967
1976
  var ContextMenuRadioGroup = styled(ContextMenuPrimitive.RadioGroup, {});
1968
1977
  var StyledContextMenuRadioItem = styled(ContextMenuPrimitive.RadioItem, itemCss);
1969
1978
  var ContextMenuRadioItem = React.forwardRef(function (_a, forwardedRef) {
@@ -1984,7 +1993,8 @@ var ContextMenuRadioItem = React.forwardRef(function (_a, forwardedRef) {
1984
1993
  borderRadius: "$round",
1985
1994
  } })))),
1986
1995
  children));
1987
- });
1996
+ });
1997
+ ContextMenuRadioItem.displayName = "ContextMenuRadioItem";
1988
1998
 
1989
1999
  var StyledTextField = styled("input", {
1990
2000
  // Reset
@@ -3122,6 +3132,13 @@ var Kbd = styled("kbd", {
3122
3132
  },
3123
3133
  });
3124
3134
 
3135
+ var Label = styled(LabelPrimitive.Root, Text, {
3136
+ fontSize: "$2",
3137
+ display: "inline-block",
3138
+ verticalAlign: "middle",
3139
+ cursor: "default",
3140
+ });
3141
+
3125
3142
  var _a$5;
3126
3143
  var Link = styled("a", (_a$5 = {
3127
3144
  alignItems: "center",
@@ -3236,6 +3253,7 @@ var PopoverContent = React.forwardRef(function (_a, fowardedRef) {
3236
3253
  !hideArrow && (React.createElement(Box, { css: { color: "$panel" } },
3237
3254
  React.createElement(PopoverPrimitive.Arrow, { width: 11, height: 5, style: { fill: "currentColor" } }))))));
3238
3255
  });
3256
+ PopoverContent.displayName = "PopoverContent";
3239
3257
  var PopoverClose = PopoverPrimitive.Close;
3240
3258
 
3241
3259
  var indeterminateProgress = keyframes({
@@ -3309,6 +3327,118 @@ var ProgressBar = React.forwardRef(function (_a, forwardedRef) {
3309
3327
  var percentage = value != null ? Math.round((value / max) * 100) : null;
3310
3328
  return (React.createElement(StyledProgressBar, __assign({}, props, { ref: forwardedRef, value: value, max: max }),
3311
3329
  React.createElement(ProgressBarIndicator, { style: { transform: "translateX(".concat(percentage, "%)") } })));
3330
+ });
3331
+ ProgressBar.displayName = "ProgressBar";
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
+ },
3312
3442
  });
3313
3443
 
3314
3444
  var _a$4;
@@ -3389,7 +3519,8 @@ var StyledRadio$1 = styled(RadioGroupPrimitive.Item, {
3389
3519
  },
3390
3520
  });
3391
3521
  var Radio = React.forwardRef(function (props, forwardedRef) { return (React.createElement(StyledRadio$1, __assign({}, props, { ref: forwardedRef }),
3392
- React.createElement(StyledIndicator, null))); });
3522
+ React.createElement(StyledIndicator, null))); });
3523
+ Radio.displayName = "Radio";
3393
3524
 
3394
3525
  var _a$3;
3395
3526
  var RadioCardGroup = styled(RadioGroupPrimitive.Root, {
@@ -3606,6 +3737,7 @@ var SheetContent = React.forwardRef(function (_a, forwardedRef) {
3606
3737
  React.createElement(IconButton, { variant: "ghost" },
3607
3738
  React.createElement(Cross1Icon, null))))));
3608
3739
  });
3740
+ SheetContent.displayName = "SheetContent";
3609
3741
  var SheetClose = DialogPrimitive.Close;
3610
3742
  var SheetTitle = DialogPrimitive.Title;
3611
3743
  var SheetDescription = DialogPrimitive.Description;
@@ -3835,7 +3967,270 @@ var Slider = React.forwardRef(function (props, forwardedRef) {
3835
3967
  React.createElement(SliderTrack, null,
3836
3968
  React.createElement(SliderRange, null)),
3837
3969
  thumbsArray.map(function (_, i) { return (React.createElement(SliderThumb, { key: i })); })));
3838
- });
3970
+ });
3971
+ Slider.displayName = "Slider";
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
+ };
3839
4234
 
3840
4235
  var Sub = styled("sub", {
3841
4236
  fontFeatureSettings: '"subs"',
@@ -4508,6 +4903,7 @@ var StyledVerifiedBadge = styled("div", Flex, {
4508
4903
  height: "$3",
4509
4904
  });
4510
4905
  var VerifiedBadge = React.forwardRef(function (props, forwardedRef) { return (React.createElement(StyledVerifiedBadge, __assign({}, props, { ref: forwardedRef }),
4511
- React.createElement(CheckIcon, null))); });
4906
+ React.createElement(CheckIcon, null))); });
4907
+ VerifiedBadge.displayName = "VerifiedBadge";
4512
4908
 
4513
- 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;
@@ -862,7 +868,8 @@ var Avatar = React__default["default"].forwardRef(function (_a, forwardedRef) {
862
868
  mb: "-3px",
863
869
  } },
864
870
  React__default["default"].createElement(Status, { size: size && size > 2 ? "2" : "1", variant: status })))));
865
- });
871
+ });
872
+ Avatar.displayName = "Avatar";
866
873
 
867
874
  var Badge = styled("span", {
868
875
  // Reset
@@ -1751,7 +1758,8 @@ var StyledIndicator$1 = styled(CheckboxPrimitive__namespace.Indicator, {
1751
1758
  });
1752
1759
  var Checkbox = React__default["default"].forwardRef(function (props, forwardedRef) { return (React__default["default"].createElement(StyledCheckbox, tslib.__assign({}, props, { ref: forwardedRef }),
1753
1760
  React__default["default"].createElement(StyledIndicator$1, null,
1754
- React__default["default"].createElement(reactIcons.CheckIcon, null)))); });
1761
+ React__default["default"].createElement(reactIcons.CheckIcon, null)))); });
1762
+ Checkbox.displayName = "Checkbox";
1755
1763
 
1756
1764
  var Code = styled("code", {
1757
1765
  fontFamily: "$mono",
@@ -1994,6 +2002,7 @@ var ContextMenuTrigger = ContextMenuPrimitive__namespace.Trigger;
1994
2002
  var StyledContent$4 = styled(ContextMenuPrimitive__namespace.Content, menuCss, panelStyles);
1995
2003
  var ContextMenuContent = React__default["default"].forwardRef(function (props, forwardedRef) { return (React__default["default"].createElement(ContextMenuPrimitive__namespace.Portal, null,
1996
2004
  React__default["default"].createElement(StyledContent$4, tslib.__assign({}, props, { ref: forwardedRef })))); });
2005
+ ContextMenuContent.displayName = "ContextMenuContent";
1997
2006
  var ContextMenuItem = styled(ContextMenuPrimitive__namespace.Item, itemCss);
1998
2007
  var ContextMenuGroup = styled(ContextMenuPrimitive__namespace.Group, {});
1999
2008
  var ContextMenuLabel = styled(ContextMenuPrimitive__namespace.Label, labelCss);
@@ -2007,6 +2016,7 @@ var ContextMenuCheckboxItem = React__default["default"].forwardRef(function (_a,
2007
2016
  React__default["default"].createElement(reactIcons.CheckIcon, null))),
2008
2017
  children));
2009
2018
  });
2019
+ ContextMenuCheckboxItem.displayName = "ContextMenuCheckboxItem";
2010
2020
  var ContextMenuRadioGroup = styled(ContextMenuPrimitive__namespace.RadioGroup, {});
2011
2021
  var StyledContextMenuRadioItem = styled(ContextMenuPrimitive__namespace.RadioItem, itemCss);
2012
2022
  var ContextMenuRadioItem = React__default["default"].forwardRef(function (_a, forwardedRef) {
@@ -2027,7 +2037,8 @@ var ContextMenuRadioItem = React__default["default"].forwardRef(function (_a, fo
2027
2037
  borderRadius: "$round",
2028
2038
  } })))),
2029
2039
  children));
2030
- });
2040
+ });
2041
+ ContextMenuRadioItem.displayName = "ContextMenuRadioItem";
2031
2042
 
2032
2043
  var StyledTextField = styled("input", {
2033
2044
  // Reset
@@ -3165,6 +3176,13 @@ var Kbd = styled("kbd", {
3165
3176
  },
3166
3177
  });
3167
3178
 
3179
+ var Label = styled(LabelPrimitive__namespace.Root, Text, {
3180
+ fontSize: "$2",
3181
+ display: "inline-block",
3182
+ verticalAlign: "middle",
3183
+ cursor: "default",
3184
+ });
3185
+
3168
3186
  var _a$5;
3169
3187
  var Link = styled("a", (_a$5 = {
3170
3188
  alignItems: "center",
@@ -3279,6 +3297,7 @@ var PopoverContent = React__default["default"].forwardRef(function (_a, fowarded
3279
3297
  !hideArrow && (React__default["default"].createElement(Box, { css: { color: "$panel" } },
3280
3298
  React__default["default"].createElement(PopoverPrimitive__namespace.Arrow, { width: 11, height: 5, style: { fill: "currentColor" } }))))));
3281
3299
  });
3300
+ PopoverContent.displayName = "PopoverContent";
3282
3301
  var PopoverClose = PopoverPrimitive__namespace.Close;
3283
3302
 
3284
3303
  var indeterminateProgress = keyframes({
@@ -3352,6 +3371,118 @@ var ProgressBar = React__default["default"].forwardRef(function (_a, forwardedRe
3352
3371
  var percentage = value != null ? Math.round((value / max) * 100) : null;
3353
3372
  return (React__default["default"].createElement(StyledProgressBar, tslib.__assign({}, props, { ref: forwardedRef, value: value, max: max }),
3354
3373
  React__default["default"].createElement(ProgressBarIndicator, { style: { transform: "translateX(".concat(percentage, "%)") } })));
3374
+ });
3375
+ ProgressBar.displayName = "ProgressBar";
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
+ },
3355
3486
  });
3356
3487
 
3357
3488
  var _a$4;
@@ -3432,7 +3563,8 @@ var StyledRadio$1 = styled(RadioGroupPrimitive__namespace.Item, {
3432
3563
  },
3433
3564
  });
3434
3565
  var Radio = React__default["default"].forwardRef(function (props, forwardedRef) { return (React__default["default"].createElement(StyledRadio$1, tslib.__assign({}, props, { ref: forwardedRef }),
3435
- React__default["default"].createElement(StyledIndicator, null))); });
3566
+ React__default["default"].createElement(StyledIndicator, null))); });
3567
+ Radio.displayName = "Radio";
3436
3568
 
3437
3569
  var _a$3;
3438
3570
  var RadioCardGroup = styled(RadioGroupPrimitive__namespace.Root, {
@@ -3649,6 +3781,7 @@ var SheetContent = React__default["default"].forwardRef(function (_a, forwardedR
3649
3781
  React__default["default"].createElement(IconButton, { variant: "ghost" },
3650
3782
  React__default["default"].createElement(reactIcons.Cross1Icon, null))))));
3651
3783
  });
3784
+ SheetContent.displayName = "SheetContent";
3652
3785
  var SheetClose = DialogPrimitive__namespace.Close;
3653
3786
  var SheetTitle = DialogPrimitive__namespace.Title;
3654
3787
  var SheetDescription = DialogPrimitive__namespace.Description;
@@ -3878,7 +4011,270 @@ var Slider = React__default["default"].forwardRef(function (props, forwardedRef)
3878
4011
  React__default["default"].createElement(SliderTrack, null,
3879
4012
  React__default["default"].createElement(SliderRange, null)),
3880
4013
  thumbsArray.map(function (_, i) { return (React__default["default"].createElement(SliderThumb, { key: i })); })));
3881
- });
4014
+ });
4015
+ Slider.displayName = "Slider";
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
+ };
3882
4278
 
3883
4279
  var Sub = styled("sub", {
3884
4280
  fontFeatureSettings: '"subs"',
@@ -4551,7 +4947,8 @@ var StyledVerifiedBadge = styled("div", Flex, {
4551
4947
  height: "$3",
4552
4948
  });
4553
4949
  var VerifiedBadge = React__default["default"].forwardRef(function (props, forwardedRef) { return (React__default["default"].createElement(StyledVerifiedBadge, tslib.__assign({}, props, { ref: forwardedRef }),
4554
- React__default["default"].createElement(reactIcons.CheckIcon, null))); });
4950
+ React__default["default"].createElement(reactIcons.CheckIcon, null))); });
4951
+ VerifiedBadge.displayName = "VerifiedBadge";
4555
4952
 
4556
4953
  Object.defineProperty(exports, 'AccessibleIcon', {
4557
4954
  enumerable: true,
@@ -4659,6 +5056,7 @@ exports.Heading = Heading;
4659
5056
  exports.IconButton = IconButton;
4660
5057
  exports.Image = Image;
4661
5058
  exports.Kbd = Kbd;
5059
+ exports.Label = Label;
4662
5060
  exports.Link = Link;
4663
5061
  exports.Menu = Menu;
4664
5062
  exports.MenuCheckboxItem = MenuCheckboxItem;
@@ -4676,6 +5074,7 @@ exports.PopoverClose = PopoverClose;
4676
5074
  exports.PopoverContent = PopoverContent;
4677
5075
  exports.PopoverTrigger = PopoverTrigger;
4678
5076
  exports.ProgressBar = ProgressBar;
5077
+ exports.Promo = Promo;
4679
5078
  exports.Radio = Radio;
4680
5079
  exports.RadioCard = RadioCard;
4681
5080
  exports.RadioCardGroup = RadioCardGroup;
@@ -4692,6 +5091,7 @@ exports.SheetTrigger = SheetTrigger;
4692
5091
  exports.SimpleToggle = SimpleToggle;
4693
5092
  exports.Skeleton = Skeleton;
4694
5093
  exports.Slider = Slider;
5094
+ exports.SnackbarProvider = SnackbarProvider;
4695
5095
  exports.Status = Status;
4696
5096
  exports.Sub = Sub;
4697
5097
  exports.Sup = Sup;
@@ -4721,3 +5121,4 @@ exports.getThemes = getThemes;
4721
5121
  exports.globalCss = globalCss;
4722
5122
  exports.keyframes = keyframes;
4723
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livepeer/design-system",
3
- "version": "1.0.0",
3
+ "version": "1.0.3",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
@@ -53,6 +53,7 @@
53
53
  "@radix-ui/react-tooltip": "1.0.0",
54
54
  "@radix-ui/react-use-layout-effect": "1.0.0",
55
55
  "@stitches/react": "^1.2.8",
56
+ "lodash.merge": "^4.6.2",
56
57
  "lodash.omit": "^4.5.0",
57
58
  "next-themes": "^0.2.0",
58
59
  "react-transition-group": "4.4.5",
@@ -66,7 +67,7 @@
66
67
  "@types/chroma-js": "^2.1.4",
67
68
  "@types/lodash.merge": "^4.6.7",
68
69
  "@types/lodash.omit": "^4.5.7",
69
- "@types/node": "18.6.3",
70
+ "@types/node": "18.6.4",
70
71
  "@types/react": "^18.0.15",
71
72
  "@types/react-transition-group": "^4.4.5",
72
73
  "bezier-easing": "^2.1.0",