@superdispatch/ui-lab 0.14.0 → 0.16.0-alpha.1

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.
@@ -3,7 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
3
3
  var _excluded = ["children", "endIcon", "startIcon", "tabIndex", "active", "pending", "disabled", "size", "fullWidth", "variant"],
4
4
  _excluded2 = ["type"],
5
5
  _excluded3 = ["href", "target"];
6
- import { CircularProgress } from '@material-ui/core';
6
+ import { CircularProgress } from '@mui/material';
7
7
  import { Color } from '@superdispatch/ui';
8
8
  import { forwardRef } from 'react';
9
9
  import styled, { css } from 'styled-components';
@@ -1,7 +1,7 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  var _excluded = ["icon", "children", "variant", "active", "disabled", "fullWidth"];
4
- import { ButtonBase, Typography } from '@material-ui/core';
4
+ import { ButtonBase, Typography } from '@mui/material';
5
5
  import { Color, Stack } from '@superdispatch/ui';
6
6
  import { forwardRef } from 'react';
7
7
  import styled from 'styled-components';
@@ -1,9 +1,9 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  var _excluded = ["disabled", "children", "hintText", "startIcon", "fallback", "accept", "maxSize", "maxFiles", "onDropRejected", "onDropAccepted"];
4
- import { CircularProgress, SvgIcon } from '@material-ui/core';
5
- import { Error } from '@material-ui/icons';
6
4
  import { mdiUpload } from '@mdi/js';
5
+ import { Error } from '@mui/icons-material';
6
+ import { CircularProgress, SvgIcon } from '@mui/material';
7
7
  import { CardButton, Color, Column, Columns } from '@superdispatch/ui';
8
8
  import { forwardRef, Suspense } from 'react';
9
9
  import Dropzone from 'react-dropzone';
@@ -1,7 +1,7 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
- import { CircularProgress, IconButton, Link, SvgIcon, Tooltip } from '@material-ui/core';
3
- import { CheckCircle, Delete, Error, Image, Refresh } from '@material-ui/icons';
4
2
  import { mdiFilePdfBox, mdiTextBox } from '@mdi/js';
3
+ import { CheckCircle, Delete, Error, Image, Refresh } from '@mui/icons-material';
4
+ import { CircularProgress, IconButton, Link, SvgIcon, Tooltip } from '@mui/material';
5
5
  import { Color, Column, Columns, useResponsiveValue, useUID } from '@superdispatch/ui';
6
6
  import { forwardRef, memo, useState } from 'react';
7
7
  import styled from 'styled-components';
package/dist-src/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from "./alert/Alert.js";
2
+ export * from "./banner/Banner.js";
2
3
  export * from "./box/Box.js";
3
4
  export * from "./button-area/ButtonArea.js";
4
5
  export * from "./button/Button.js";
@@ -1,4 +1,4 @@
1
- import { Divider } from '@material-ui/core';
1
+ import { Divider } from '@mui/material';
2
2
  import { forwardRef } from 'react';
3
3
  import styled from 'styled-components';
4
4
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
- import { ButtonBase } from '@material-ui/core';
2
- import { OpenInNew } from '@material-ui/icons';
1
+ import { OpenInNew } from '@mui/icons-material';
2
+ import { ButtonBase } from '@mui/material';
3
3
  import { Color, Column, Columns, Inline } from '@superdispatch/ui';
4
4
  import { forwardRef, useLayoutEffect, useRef, useState } from 'react';
5
5
  import styled, { css } from 'styled-components';
@@ -1,4 +1,4 @@
1
- import { IconButton, Tooltip } from '@material-ui/core';
1
+ import { IconButton, Tooltip } from '@mui/material';
2
2
  import { forwardRef } from 'react';
3
3
  import styled from 'styled-components';
4
4
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { Avatar, Checkbox } from '@material-ui/core';
1
+ import { Avatar, Checkbox } from '@mui/material';
2
2
  import { forwardRef, useMemo } from 'react';
3
3
  import styled from 'styled-components';
4
4
  import { useSidebarMenuItemContext } from "./SidebarMenuItemContext.js";
@@ -1,8 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  import { ReactNode, ForwardRefExoticComponent, RefAttributes, Ref, AriaAttributes, MouseEventHandler, FocusEventHandler, ReactChild, MouseEvent, ReactElement } from 'react';
3
+ import { CSSTransition } from 'react-transition-group';
4
+ import { CSSTransitionProps } from 'react-transition-group/CSSTransition';
3
5
  import { SpaceProp, NegativeSpaceProp, ResponsiveProp, ColorProp } from '@superdispatch/ui';
4
6
  import { Property } from 'csstype';
5
- import { ButtonBaseProps, TooltipProps } from '@material-ui/core';
7
+ import { ButtonBaseProps, TooltipProps } from '@mui/material';
6
8
  import { FileRejection } from 'react-dropzone';
7
9
 
8
10
  declare type AlertSeverityProp = 'positive' | 'info' | 'caution' | 'critical';
@@ -13,6 +15,14 @@ interface AlertProps {
13
15
  }
14
16
  declare const Alert: ForwardRefExoticComponent<AlertProps & RefAttributes<HTMLDivElement>>;
15
17
 
18
+ declare type BorderPlacement = 'top' | 'bottom';
19
+ declare type CustomerTransitionProps = CSSTransitionProps<HTMLDivElement> & {
20
+ className?: string;
21
+ border?: BorderPlacement;
22
+ };
23
+ declare type BannerProps = Omit<CustomerTransitionProps, 'timeout' | 'className' | 'classNames'>;
24
+ declare const Banner: ForwardRefExoticComponent<Pick<BannerProps, string | number> & RefAttributes<CSSTransition<HTMLDivElement>>>;
25
+
16
26
  declare type MarginProp = 'auto' | SpaceProp | NegativeSpaceProp;
17
27
  declare type BorderRadiusProp = 'none' | 'small';
18
28
  declare type BorderWidthProp = 'none' | 'small' | 'medium' | 'large';
@@ -76,7 +86,7 @@ interface ButtonAreaProps extends ButtonBaseProps {
76
86
  fullWidth?: boolean;
77
87
  variant?: ButtonAreaVariant;
78
88
  }
79
- declare const ButtonArea: ForwardRefExoticComponent<Pick<ButtonAreaProps, "className" | "style" | "classes" | "innerRef" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "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" | "onSelect" | "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" | "form" | "key" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "value" | "fullWidth" | "variant" | "action" | "buttonRef" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "onFocusVisible" | "TouchRippleProps" | "icon" | "active"> & RefAttributes<HTMLButtonElement>>;
89
+ declare const ButtonArea: ForwardRefExoticComponent<Pick<ButtonAreaProps, "className" | "style" | "classes" | "form" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "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" | "onSelect" | "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" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "fullWidth" | "variant" | "key" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "value" | "icon" | "active"> & RefAttributes<HTMLButtonElement>>;
80
90
 
81
91
  declare type ButtonSizeProp = 'small' | 'medium' | 'large';
82
92
  declare type ButtonVariantProp = 'critical' | 'default' | 'inverted' | 'neutral' | 'primary' | 'text';
@@ -216,4 +226,4 @@ interface TextBoxProps {
216
226
  }
217
227
  declare const TextBox: ForwardRefExoticComponent<TextBoxProps & RefAttributes<HTMLElement>>;
218
228
 
219
- export { Alert, AlertProps, AlertSeverityProp, AnchorButton, AnchorButtonProps, BorderRadiusProp, BorderWidthProp, Box, BoxProps, Button, ButtonArea, ButtonAreaProps, ButtonProps, ButtonSizeProp, ButtonVariantProp, DescriptionItem, DescriptionItemProps, FileDropZone, FileDropZoneProps, FileListItem, FileListItemProps, MarginProp, Sidebar, SidebarContainer, SidebarContainerProps, SidebarDivider, SidebarMenuItem, SidebarMenuItemAction, SidebarMenuItemActionProps, SidebarMenuItemAvatar, SidebarMenuItemAvatarProps, SidebarMenuItemProps, SidebarProps, SidebarSubheader, SidebarSubheaderProps, TextAlignProp, TextBox, TextBoxProps, TextColorProp, TextDisplayProp, TextVariantProp, formatBytes, toBytes };
229
+ export { Alert, AlertProps, AlertSeverityProp, AnchorButton, AnchorButtonProps, Banner, BorderRadiusProp, BorderWidthProp, Box, BoxProps, Button, ButtonArea, ButtonAreaProps, ButtonProps, ButtonSizeProp, ButtonVariantProp, DescriptionItem, DescriptionItemProps, FileDropZone, FileDropZoneProps, FileListItem, FileListItemProps, MarginProp, Sidebar, SidebarContainer, SidebarContainerProps, SidebarDivider, SidebarMenuItem, SidebarMenuItemAction, SidebarMenuItemActionProps, SidebarMenuItemAvatar, SidebarMenuItemAvatarProps, SidebarMenuItemProps, SidebarProps, SidebarSubheader, SidebarSubheaderProps, TextAlignProp, TextBox, TextBoxProps, TextColorProp, TextDisplayProp, TextVariantProp, formatBytes, toBytes };
package/dist-web/index.js CHANGED
@@ -1,12 +1,13 @@
1
- import { CheckCircle, Info, Error, Image, Refresh, Delete, OpenInNew } from '@material-ui/icons';
2
- import { Alert as Alert$1 } from '@material-ui/lab';
1
+ import { CheckCircle, Info, Error, Image, Refresh, Delete, OpenInNew } from '@mui/icons-material';
2
+ import { Alert as Alert$1 } from '@mui/lab';
3
3
  import { Color, parseResponsiveProp, isColorProp, parseSpaceProp, Stack, useUID, isEmptyReactNode, Columns, Column, Inline, CardButton, useResponsiveValue } from '@superdispatch/ui';
4
- import { forwardRef, Suspense, useState, memo, useContext, createContext, useMemo, useRef, useLayoutEffect } from 'react';
5
- import styled, { css } from 'styled-components';
4
+ import { forwardRef, useState, useEffect, Suspense, memo, useContext, createContext, useMemo, useRef, useLayoutEffect } from 'react';
5
+ import styled, { css, keyframes } from 'styled-components';
6
6
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
7
7
  import _objectSpread from '@babel/runtime/helpers/objectSpread2';
8
8
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
9
- import { ButtonBase, Typography, CircularProgress, SvgIcon, Link, Tooltip, IconButton, Divider, Checkbox, Avatar } from '@material-ui/core';
9
+ import { CSSTransition } from 'react-transition-group';
10
+ import { ButtonBase, Typography, CircularProgress, SvgIcon, Link, Tooltip, IconButton, Divider, Checkbox, Avatar } from '@mui/material';
10
11
  import { mdiUpload, mdiFilePdfBox, mdiTextBox } from '@mdi/js';
11
12
  import Dropzone from 'react-dropzone';
12
13
 
@@ -47,6 +48,60 @@ var Alert = /*#__PURE__*/forwardRef((_ref, ref) => {
47
48
  });
48
49
  if (process.env.NODE_ENV !== "production") Alert.displayName = "Alert";
49
50
 
51
+ var _excluded = ["children"],
52
+ _excluded2 = ["in"];
53
+
54
+ function enterMixin(border) {
55
+ return css(["min-height:56px;color:", ";background-color:", ";border-", ":1px #dfe3e8 solid;"], Color.Dark500, Color.White, border);
56
+ }
57
+
58
+ function enterAnimation(border) {
59
+ return keyframes(["0%{min-height:0;color:", ";background-color:", ";}50%{min-height:56px;color:", ";background-color:", ";}70%{min-height:56px;color:", ";background-color:", ";}100%{", "}"], Color.White, Color.Dark500, Color.White, Color.Dark500, Color.White, Color.Dark500, enterMixin(border));
60
+ }
61
+
62
+ var CustomTransition = /*#__PURE__*/forwardRef((_ref, ref) => {
63
+ var {
64
+ children
65
+ } = _ref,
66
+ props = _objectWithoutProperties(_ref, _excluded);
67
+
68
+ return /*#__PURE__*/jsx(CSSTransition, _objectSpread(_objectSpread({}, props), {}, {
69
+ ref: ref,
70
+ timeout: 3000,
71
+ classNames: props.className,
72
+ children: /*#__PURE__*/jsx("div", {
73
+ children: children
74
+ })
75
+ }));
76
+ });
77
+ if (process.env.NODE_ENV !== "production") CustomTransition.displayName = "CustomTransition";
78
+ var BannerContent = /*#__PURE__*/styled(CustomTransition).withConfig({
79
+ displayName: "Banner__BannerContent",
80
+ componentId: "SD__sc-9kw31n-0"
81
+ })(_ref2 => {
82
+ var {
83
+ border = 'bottom'
84
+ } = _ref2;
85
+ return css(["height:0;width:100%;overflow:hidden;display:flex;align-items:center;justify-content:center;color:", ";background-color:", ";&-enter-active{animation:", " 2s 1s forwards;}&-enter-done{", ";}&-exit{", ";}&-exit-active{min-height:0;transition:min-height 2s 1s;}"], Color.White, Color.White, enterAnimation(border), enterMixin(border), enterMixin(border));
86
+ });
87
+ var Banner = /*#__PURE__*/forwardRef((_ref3, ref) => {
88
+ var {
89
+ in: inProp
90
+ } = _ref3,
91
+ props = _objectWithoutProperties(_ref3, _excluded2);
92
+
93
+ var [isIn, setIn] = useState(false); // transition is not triggered on initial render with `in: true`
94
+
95
+ useEffect(() => {
96
+ setIn(!!inProp);
97
+ }, [inProp]);
98
+ return /*#__PURE__*/jsx(BannerContent, _objectSpread({
99
+ ref: ref,
100
+ in: isIn
101
+ }, props));
102
+ });
103
+ if (process.env.NODE_ENV !== "production") Banner.displayName = "Banner";
104
+
50
105
  function createRuleNormalizer(rules) {
51
106
  return input => {
52
107
  if (typeof input == 'string') {
@@ -209,7 +264,7 @@ var Box = /*#__PURE__*/styled.div.withConfig({
209
264
  return styles;
210
265
  });
211
266
 
212
- var _excluded = ["icon", "children", "variant", "active", "disabled", "fullWidth"];
267
+ var _excluded$1 = ["icon", "children", "variant", "active", "disabled", "fullWidth"];
213
268
  var ButtonRoot = /*#__PURE__*/styled(ButtonBase).withConfig({
214
269
  displayName: "ButtonArea__ButtonRoot",
215
270
  componentId: "SD__sc-1czum63-0"
@@ -223,7 +278,7 @@ var ButtonArea = /*#__PURE__*/forwardRef((_ref, ref) => {
223
278
  disabled,
224
279
  fullWidth
225
280
  } = _ref,
226
- props = _objectWithoutProperties(_ref, _excluded);
281
+ props = _objectWithoutProperties(_ref, _excluded$1);
227
282
 
228
283
  return /*#__PURE__*/jsx(ButtonRoot, _objectSpread(_objectSpread({
229
284
  ref: ref,
@@ -246,8 +301,8 @@ var ButtonArea = /*#__PURE__*/forwardRef((_ref, ref) => {
246
301
  });
247
302
  if (process.env.NODE_ENV !== "production") ButtonArea.displayName = "ButtonArea";
248
303
 
249
- var _excluded$1 = ["children", "endIcon", "startIcon", "tabIndex", "active", "pending", "disabled", "size", "fullWidth", "variant"],
250
- _excluded2 = ["type"],
304
+ var _excluded$2 = ["children", "endIcon", "startIcon", "tabIndex", "active", "pending", "disabled", "size", "fullWidth", "variant"],
305
+ _excluded2$1 = ["type"],
251
306
  _excluded3 = ["href", "target"];
252
307
 
253
308
  function createButtonVariables(size, _ref) {
@@ -406,7 +461,7 @@ function useButtonProps(_ref3) {
406
461
  fullWidth = false,
407
462
  variant = 'default'
408
463
  } = _ref3,
409
- props = _objectWithoutProperties(_ref3, _excluded$1);
464
+ props = _objectWithoutProperties(_ref3, _excluded$2);
410
465
 
411
466
  var disabled = pending || disabledProp;
412
467
  var tabIndex = disabled ? -1 : tabIndexProp;
@@ -438,7 +493,7 @@ var Button = /*#__PURE__*/forwardRef((_ref4, ref) => {
438
493
  var {
439
494
  type = 'button'
440
495
  } = _ref4,
441
- props = _objectWithoutProperties(_ref4, _excluded2);
496
+ props = _objectWithoutProperties(_ref4, _excluded2$1);
442
497
 
443
498
  var buttonProps = useButtonProps(props);
444
499
  return /*#__PURE__*/jsx(ButtonRoot$1, _objectSpread(_objectSpread({}, buttonProps), {}, {
@@ -491,7 +546,7 @@ function mergeStyles(styles) {
491
546
  return styles;
492
547
  }
493
548
 
494
- var _excluded$2 = ["variant", "as", "align", "color", "display", "noWrap", "wrapOverflow"];
549
+ var _excluded$3 = ["variant", "as", "align", "color", "display", "noWrap", "wrapOverflow"];
495
550
  var normalizeTextColor = /*#__PURE__*/createRuleNormalizer({
496
551
  inherit: 'inherit',
497
552
  primary: Color.Dark500,
@@ -593,7 +648,7 @@ var TextBox = /*#__PURE__*/forwardRef((_ref3, ref) => {
593
648
  noWrap = false,
594
649
  wrapOverflow = false
595
650
  } = _ref3,
596
- props = _objectWithoutProperties(_ref3, _excluded$2);
651
+ props = _objectWithoutProperties(_ref3, _excluded$3);
597
652
 
598
653
  var $align = parseResponsiveProp(align);
599
654
  var $color = parseResponsiveProp(color);
@@ -674,7 +729,7 @@ var DescriptionItem = /*#__PURE__*/forwardRef((_ref2, ref) => {
674
729
  });
675
730
  if (process.env.NODE_ENV !== "production") DescriptionItem.displayName = "DescriptionItem";
676
731
 
677
- var _excluded$3 = ["disabled", "children", "hintText", "startIcon", "fallback", "accept", "maxSize", "maxFiles", "onDropRejected", "onDropAccepted"];
732
+ var _excluded$4 = ["disabled", "children", "hintText", "startIcon", "fallback", "accept", "maxSize", "maxFiles", "onDropRejected", "onDropAccepted"];
678
733
  function toBytes(input, unit) {
679
734
  if (unit === 'gb') return input * (1 << 30);
680
735
  if (unit === 'mb') return input * (1 << 20);
@@ -745,7 +800,7 @@ var FileDropZone = /*#__PURE__*/forwardRef((props, ref) => {
745
800
  onDropRejected: _onDropRejected,
746
801
  onDropAccepted: _onDropAccepted
747
802
  } = props,
748
- dropzoneProps = _objectWithoutProperties(props, _excluded$3);
803
+ dropzoneProps = _objectWithoutProperties(props, _excluded$4);
749
804
 
750
805
  return /*#__PURE__*/jsx(Suspense, {
751
806
  fallback: fallback,
@@ -1232,5 +1287,5 @@ var SidebarSubheader = /*#__PURE__*/forwardRef((_ref, ref) => {
1232
1287
  });
1233
1288
  if (process.env.NODE_ENV !== "production") SidebarSubheader.displayName = "SidebarSubheader";
1234
1289
 
1235
- export { Alert, AnchorButton, Box, Button, ButtonArea, DescriptionItem, FileDropZone, FileListItem, Sidebar, SidebarContainer, SidebarDivider, SidebarMenuItem, SidebarMenuItemAction, SidebarMenuItemAvatar, SidebarSubheader, TextBox, formatBytes, toBytes };
1290
+ export { Alert, AnchorButton, Banner, Box, Button, ButtonArea, DescriptionItem, FileDropZone, FileListItem, Sidebar, SidebarContainer, SidebarDivider, SidebarMenuItem, SidebarMenuItemAction, SidebarMenuItemAvatar, SidebarSubheader, TextBox, formatBytes, toBytes };
1236
1291
  //# sourceMappingURL=index.js.map