@deque/cauldron-react 4.5.0-canary.9a1593ae → 4.5.0-canary.c21fc13b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cauldron.css +0 -1
- package/lib/components/Accordion/Accordion.d.ts +42 -0
- package/lib/components/Accordion/index.d.ts +3 -0
- package/lib/components/Breadcrumb/BreadcrumbLink.d.ts +1 -1
- package/lib/components/ExpandCollapsePanel/PanelTrigger.d.ts +9 -7
- package/lib/components/Icon/types.d.ts +1 -1
- package/lib/components/Select/index.d.ts +1 -1
- package/lib/filter-solid.js +24 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +215 -149
- package/lib/play.js +25 -0
- package/package.json +1 -1
package/lib/cauldron.css
CHANGED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ExpandCollapsePanelProps } from '../ExpandCollapsePanel';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
export interface AccordionTriggerProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
5
|
+
children: React.ReactElement;
|
|
6
|
+
heading?: React.ReactElement | {
|
|
7
|
+
level: string | undefined;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
declare const AccordionTrigger: {
|
|
11
|
+
({ children, ...triggerProps }: AccordionTriggerProps): JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
propTypes: {
|
|
14
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
15
|
+
heading: PropTypes.Requireable<string | undefined>;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
interface AccordionContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
19
|
+
children: React.ReactNode | React.ReactNode[];
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
declare const AccordionContent: {
|
|
23
|
+
({ children, className, ...otherProps }: AccordionContentProps): JSX.Element;
|
|
24
|
+
displayName: string;
|
|
25
|
+
propTypes: {
|
|
26
|
+
children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
|
|
27
|
+
className: PropTypes.Requireable<string>;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
interface AccordionProps extends ExpandCollapsePanelProps {
|
|
31
|
+
children: React.ReactNode;
|
|
32
|
+
}
|
|
33
|
+
declare const Accordion: {
|
|
34
|
+
({ children }: AccordionProps): JSX.Element | null;
|
|
35
|
+
displayName: string;
|
|
36
|
+
propTypes: {
|
|
37
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
38
|
+
className: PropTypes.Requireable<string>;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export default Accordion;
|
|
42
|
+
export { Accordion, AccordionTrigger, AccordionContent };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
interface BreadcrumbLinkProps extends React.
|
|
2
|
+
interface BreadcrumbLinkProps extends Omit<React.LinkHTMLAttributes<HTMLLinkElement>, 'as'> {
|
|
3
3
|
as?: React.ElementType;
|
|
4
4
|
}
|
|
5
5
|
declare const BreadcrumbLink: React.ForwardRefExoticComponent<BreadcrumbLinkProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -10,17 +10,19 @@ export interface PanelTriggerProps extends Omit<React.ButtonHTMLAttributes<HTMLB
|
|
|
10
10
|
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
11
11
|
iconExpanded?: IconType;
|
|
12
12
|
iconCollapsed?: IconType;
|
|
13
|
+
heading?: React.ReactElement | {
|
|
14
|
+
level: string | undefined;
|
|
15
|
+
};
|
|
13
16
|
}
|
|
14
|
-
declare
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
declare const _default: React.MemoExoticComponent<{
|
|
18
|
+
({ children, className, open, fullWidth, onClick, iconExpanded, iconCollapsed, heading, ...otherProps }: PanelTriggerProps): JSX.Element;
|
|
19
|
+
propTypes: {
|
|
17
20
|
children: PropTypes.Requireable<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
|
|
18
21
|
open: PropTypes.Requireable<boolean>;
|
|
19
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
20
|
-
className: PropTypes.Requireable<string>;
|
|
21
22
|
iconExpanded: PropTypes.Requireable<string>;
|
|
22
23
|
iconCollapsed: PropTypes.Requireable<string>;
|
|
24
|
+
heading: PropTypes.Requireable<number>;
|
|
23
25
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
displayName: string;
|
|
27
|
+
}>;
|
|
26
28
|
export default _default;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* GENERATED CODE. DO NOT EDIT DIRECTLY!
|
|
3
3
|
*/
|
|
4
4
|
/** IconType represents each valid icon type. */
|
|
5
|
-
export declare type IconType = 'add-user' | 'arrow-circle-up' | 'arrow-circle-down' | 'arrow-circle-left' | 'arrow-circle-right' | 'arrow-up' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrows-alt' | 'bolt' | 'caution' | 'check-circle' | 'check-shield' | 'check-solid' | 'check' | 'checkbox-checked' | 'checkbox-unchecked' | 'chevron-double-up' | 'chevron-double-down' | 'chevron-double-left' | 'chevron-double-right' | 'chevron-up' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'close' | 'code' | 'copy' | 'download' | 'dropper' | 'exchange' | 'external-link' | 'eye' | 'filter' | 'flag' | 'gears' | 'grid' | 'hamburger-menu' | 'highlight' | 'info-circle-alt' | 'info-circle' | 'info-square' | 'kabob' | 'list' | 'lock' | 'magnifying-glass' | 'menu' | 'minus' | 'new-releases' | 'new' | 'no' | 'pencil' | 'plus' | 'question-circle' | 'radio-checked' | 'radio-unchecked' | 'recycle-square' | 'recycle' | 'resend' | 'robot' | 'run-again' | 'save' | 'share' | 'sort-triangle' | 'sort' | 'star' | 'sun' | 'tag' | 'target' | 'trash' | 'triangle-up' | 'triangle-down' | 'triangle-left' | 'triangle-right' | 'upload';
|
|
5
|
+
export declare type IconType = 'add-user' | 'arrow-circle-up' | 'arrow-circle-down' | 'arrow-circle-left' | 'arrow-circle-right' | 'arrow-up' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrows-alt' | 'bolt' | 'caution' | 'check-circle' | 'check-shield' | 'check-solid' | 'check' | 'checkbox-checked' | 'checkbox-unchecked' | 'chevron-double-up' | 'chevron-double-down' | 'chevron-double-left' | 'chevron-double-right' | 'chevron-up' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'close' | 'code' | 'copy' | 'download' | 'dropper' | 'exchange' | 'external-link' | 'eye' | 'filter-solid' | 'filter' | 'flag' | 'gears' | 'grid' | 'hamburger-menu' | 'highlight' | 'info-circle-alt' | 'info-circle' | 'info-square' | 'kabob' | 'list' | 'lock' | 'magnifying-glass' | 'menu' | 'minus' | 'new-releases' | 'new' | 'no' | 'pencil' | 'play' | 'plus' | 'question-circle' | 'radio-checked' | 'radio-unchecked' | 'recycle-square' | 'recycle' | 'resend' | 'robot' | 'run-again' | 'save' | 'share' | 'sort-triangle' | 'sort' | 'star' | 'sun' | 'tag' | 'target' | 'trash' | 'triangle-up' | 'triangle-down' | 'triangle-left' | 'triangle-right' | 'upload';
|
|
6
6
|
/** iconTypes holds each valid icon type. */
|
|
7
7
|
export declare const iconTypes: string[];
|
|
@@ -15,5 +15,5 @@ export interface SelectProps extends Omit<React.HTMLProps<HTMLSelectElement>, 'c
|
|
|
15
15
|
defaultValue?: any;
|
|
16
16
|
onChange?: (e: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
17
17
|
}
|
|
18
|
-
declare const Select: React.ForwardRefExoticComponent<Pick<SelectProps, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "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" | "list" | "step" | "cite" | "data" | "label" | "span" | "summary" | "pattern" | "type" | "key" | "download" | "target" | "name" | "
|
|
18
|
+
declare const Select: React.ForwardRefExoticComponent<Pick<SelectProps, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "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" | "list" | "step" | "cite" | "data" | "label" | "span" | "summary" | "pattern" | "type" | "key" | "download" | "target" | "name" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "open" | "error" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "dateTime" | "default" | "defer" | "encType" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "useMap" | "width" | "wmode" | "wrap" | "options" | "requiredText"> & React.RefAttributes<HTMLSelectElement>>;
|
|
19
19
|
export default Select;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var React__default = _interopDefault(React);
|
|
7
|
+
|
|
8
|
+
var _path;
|
|
9
|
+
|
|
10
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
11
|
+
|
|
12
|
+
const SvgFilterSolid = props => /*#__PURE__*/React.createElement("svg", _extends({
|
|
13
|
+
overflow: "visible",
|
|
14
|
+
preserveAspectRatio: "none",
|
|
15
|
+
viewBox: "0 0 24 24",
|
|
16
|
+
height: 24,
|
|
17
|
+
width: 24
|
|
18
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
19
|
+
d: "M18.65 4.67H5.34a.616.616 0 0 0-.62.41c-.12.24-.06.55.16.73L10 10.94V16c0 .18.07.35.2.47l2.67 2.67c.12.13.29.2.47.2.09 0 .18-.02.26-.05.26-.1.42-.35.4-.63v-7.72l5.13-5.13c.21-.18.28-.48.15-.73a.628.628 0 0 0-.63-.41z",
|
|
20
|
+
vectorEffect: "non-scaling-stroke",
|
|
21
|
+
fill: "currentColor"
|
|
22
|
+
})));
|
|
23
|
+
|
|
24
|
+
exports.default = SvgFilterSolid;
|
package/lib/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export { default as Workspace } from './components/Workspace';
|
|
5
5
|
export { default as Main } from './components/Main';
|
|
6
|
+
export { default as Accordion, AccordionTrigger, AccordionContent } from './components/Accordion';
|
|
6
7
|
export { default as Layout } from './components/Layout';
|
|
7
8
|
export { default as Icon, IconType, iconTypes } from './components/Icon';
|
|
8
9
|
export { default as Offscreen } from './components/Offscreen';
|
package/lib/index.js
CHANGED
|
@@ -9,9 +9,9 @@ var React = require('react');
|
|
|
9
9
|
var React__default = _interopDefault(React);
|
|
10
10
|
var PropTypes = _interopDefault(require('prop-types'));
|
|
11
11
|
var classNames = _interopDefault(require('classnames'));
|
|
12
|
-
var keyname = _interopDefault(require('keyname'));
|
|
13
12
|
var nextId = require('react-id-generator');
|
|
14
13
|
var nextId__default = _interopDefault(nextId);
|
|
14
|
+
var keyname = _interopDefault(require('keyname'));
|
|
15
15
|
var reactDom = require('react-dom');
|
|
16
16
|
var FocusTrap = _interopDefault(require('focus-trap-react'));
|
|
17
17
|
var reactPopper = require('react-popper');
|
|
@@ -151,6 +151,7 @@ var iconTypes = [
|
|
|
151
151
|
'exchange',
|
|
152
152
|
'external-link',
|
|
153
153
|
'eye',
|
|
154
|
+
'filter-solid',
|
|
154
155
|
'filter',
|
|
155
156
|
'flag',
|
|
156
157
|
'gears',
|
|
@@ -170,6 +171,7 @@ var iconTypes = [
|
|
|
170
171
|
'new',
|
|
171
172
|
'no',
|
|
172
173
|
'pencil',
|
|
174
|
+
'play',
|
|
173
175
|
'plus',
|
|
174
176
|
'question-circle',
|
|
175
177
|
'radio-checked',
|
|
@@ -219,6 +221,7 @@ function __variableDynamicImportRuntime0__(path) {
|
|
|
219
221
|
case './icons/exchange.svg': return Promise.resolve().then(function () { return require('./exchange.js'); });
|
|
220
222
|
case './icons/external-link.svg': return Promise.resolve().then(function () { return require('./external-link.js'); });
|
|
221
223
|
case './icons/eye.svg': return Promise.resolve().then(function () { return require('./eye.js'); });
|
|
224
|
+
case './icons/filter-solid.svg': return Promise.resolve().then(function () { return require('./filter-solid.js'); });
|
|
222
225
|
case './icons/filter.svg': return Promise.resolve().then(function () { return require('./filter.js'); });
|
|
223
226
|
case './icons/flag.svg': return Promise.resolve().then(function () { return require('./flag.js'); });
|
|
224
227
|
case './icons/gears.svg': return Promise.resolve().then(function () { return require('./gears.js'); });
|
|
@@ -238,6 +241,7 @@ function __variableDynamicImportRuntime0__(path) {
|
|
|
238
241
|
case './icons/new.svg': return Promise.resolve().then(function () { return require('./new.js'); });
|
|
239
242
|
case './icons/no.svg': return Promise.resolve().then(function () { return require('./no.js'); });
|
|
240
243
|
case './icons/pencil.svg': return Promise.resolve().then(function () { return require('./pencil.js'); });
|
|
244
|
+
case './icons/play.svg': return Promise.resolve().then(function () { return require('./play.js'); });
|
|
241
245
|
case './icons/plus.svg': return Promise.resolve().then(function () { return require('./plus.js'); });
|
|
242
246
|
case './icons/question-circle.svg': return Promise.resolve().then(function () { return require('./question-circle.js'); });
|
|
243
247
|
case './icons/radio-checked.svg': return Promise.resolve().then(function () { return require('./radio-checked.js'); });
|
|
@@ -307,6 +311,207 @@ Icon.propTypes = {
|
|
|
307
311
|
};
|
|
308
312
|
Icon.displayName = 'Icon';
|
|
309
313
|
|
|
314
|
+
var PanelTrigger = function (_a) {
|
|
315
|
+
var children = _a.children, className = _a.className, open = _a.open, fullWidth = _a.fullWidth, onClick = _a.onClick, _b = _a.iconExpanded, iconExpanded = _b === void 0 ? 'chevron-down' : _b, _c = _a.iconCollapsed, iconCollapsed = _c === void 0 ? 'chevron-right' : _c, heading = _a.heading, otherProps = tslib.__rest(_a, ["children", "className", "open", "fullWidth", "onClick", "iconExpanded", "iconCollapsed", "heading"]);
|
|
316
|
+
var Header = typeof heading === 'object' && 'level' in heading && !!heading.level
|
|
317
|
+
? "h".concat(heading.level)
|
|
318
|
+
: React__default.Fragment;
|
|
319
|
+
return (React__default.createElement(Header, null,
|
|
320
|
+
React__default.createElement("button", tslib.__assign({ className: classNames(className, 'ExpandCollapse__trigger', {
|
|
321
|
+
fullWidth: fullWidth
|
|
322
|
+
}), type: "button", "aria-expanded": open, onClick: onClick }, otherProps),
|
|
323
|
+
React__default.createElement("div", { className: "ExpandCollapse__trigger-title" }, typeof children === 'function'
|
|
324
|
+
? children({ open: !!open })
|
|
325
|
+
: children),
|
|
326
|
+
React__default.createElement(Icon, { type: open ? iconExpanded : iconCollapsed }))));
|
|
327
|
+
};
|
|
328
|
+
PanelTrigger.propTypes = {
|
|
329
|
+
children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),
|
|
330
|
+
open: PropTypes.bool,
|
|
331
|
+
iconExpanded: PropTypes.string,
|
|
332
|
+
iconCollapsed: PropTypes.string,
|
|
333
|
+
heading: PropTypes.number
|
|
334
|
+
};
|
|
335
|
+
PanelTrigger.displayName = 'PanelTrigger';
|
|
336
|
+
var PanelTrigger$1 = React__default.memo(PanelTrigger);
|
|
337
|
+
|
|
338
|
+
var injectStyleTag = function () {
|
|
339
|
+
var style = document.createElement('style');
|
|
340
|
+
document.head.appendChild(style);
|
|
341
|
+
return style;
|
|
342
|
+
};
|
|
343
|
+
var setStyle = function (tag, cssString) {
|
|
344
|
+
tag.textContent = cssString;
|
|
345
|
+
};
|
|
346
|
+
var removeStyleTag = function (tag) {
|
|
347
|
+
document.head.removeChild(tag);
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
var ExpandCollapsePanel = /** @class */ (function (_super) {
|
|
351
|
+
tslib.__extends(ExpandCollapsePanel, _super);
|
|
352
|
+
function ExpandCollapsePanel() {
|
|
353
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
354
|
+
_this.state = {
|
|
355
|
+
controlled: typeof _this.props.open !== 'undefined',
|
|
356
|
+
isOpen: typeof _this.props.open !== 'undefined' ? _this.props.open : false
|
|
357
|
+
};
|
|
358
|
+
_this.panel = React__default.createRef();
|
|
359
|
+
_this.handleToggle = function (e) {
|
|
360
|
+
var onToggle = _this.props.onToggle;
|
|
361
|
+
var _a = _this.state, isOpen = _a.isOpen, controlled = _a.controlled;
|
|
362
|
+
onToggle(e);
|
|
363
|
+
if (!controlled) {
|
|
364
|
+
_this.setState({ isOpen: !isOpen, isAnimating: true });
|
|
365
|
+
}
|
|
366
|
+
};
|
|
367
|
+
_this.animateOpen = function () {
|
|
368
|
+
var panel = _this.panel.current;
|
|
369
|
+
var animationTiming = _this.props.animationTiming;
|
|
370
|
+
if (!animationTiming) {
|
|
371
|
+
_this.setState({ isAnimating: false });
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
var rect = panel === null || panel === void 0 ? void 0 : panel.getBoundingClientRect();
|
|
375
|
+
if (!rect) {
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
if (!_this.styleTag) {
|
|
379
|
+
_this.styleTag = injectStyleTag();
|
|
380
|
+
}
|
|
381
|
+
setStyle(_this.styleTag, "\n @keyframes expandOpenAnimation {\n 0% { opacity: 0; height: 0; }\n 100% { opacity: 1; height: ".concat(rect.height, "px; }\n }\n\n .cauldron-expand-open {\n will-change: opacity, height;\n overflow: hidden;\n animation: expandOpenAnimation ease-in-out ").concat(animationTiming, "ms forwards;\n }\n "));
|
|
382
|
+
_this.setState({ animationClass: 'cauldron-expand-open' }, function () {
|
|
383
|
+
setTimeout(function () {
|
|
384
|
+
_this.setState({ animationClass: '', isAnimating: false });
|
|
385
|
+
setStyle(_this.styleTag, '');
|
|
386
|
+
}, animationTiming);
|
|
387
|
+
});
|
|
388
|
+
};
|
|
389
|
+
_this.animateClose = function () {
|
|
390
|
+
var panel = _this.panel.current;
|
|
391
|
+
var animationTiming = _this.props.animationTiming;
|
|
392
|
+
if (!animationTiming) {
|
|
393
|
+
_this.setState({ isAnimating: false });
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
if (!_this.styleTag) {
|
|
397
|
+
_this.styleTag = injectStyleTag();
|
|
398
|
+
}
|
|
399
|
+
var rect = panel === null || panel === void 0 ? void 0 : panel.getBoundingClientRect();
|
|
400
|
+
if (!rect)
|
|
401
|
+
return;
|
|
402
|
+
setStyle(_this.styleTag, "\n @keyframes collapseCloseAnimation {\n 0% { opacity: 1; height: ".concat(rect.height, "px; }\n 100% { opacity: 0; height: 0; }\n }\n\n .cauldron-collapse-close {\n will-change: opacity, height;\n overflow: hidden;\n animation: collapseCloseAnimation ease-in-out ").concat(animationTiming, "ms forwards;\n }\n "));
|
|
403
|
+
_this.setState({ animationClass: 'cauldron-collapse-close' }, function () {
|
|
404
|
+
setTimeout(function () {
|
|
405
|
+
_this.setState({ animationClass: '', isAnimating: false });
|
|
406
|
+
setStyle(_this.styleTag, '');
|
|
407
|
+
}, animationTiming);
|
|
408
|
+
});
|
|
409
|
+
};
|
|
410
|
+
return _this;
|
|
411
|
+
}
|
|
412
|
+
ExpandCollapsePanel.prototype.componentWillUnmount = function () {
|
|
413
|
+
var styleTag = this.styleTag;
|
|
414
|
+
if (styleTag) {
|
|
415
|
+
removeStyleTag(styleTag);
|
|
416
|
+
}
|
|
417
|
+
};
|
|
418
|
+
ExpandCollapsePanel.prototype.componentDidUpdate = function (prevProps, prevState) {
|
|
419
|
+
var _a = this.state, openState = _a.isOpen, controlled = _a.controlled;
|
|
420
|
+
var openProp = this.props.open;
|
|
421
|
+
if (controlled && openState !== openProp) {
|
|
422
|
+
this.setState({ isOpen: !!openProp, isAnimating: true });
|
|
423
|
+
}
|
|
424
|
+
if (typeof openProp !== typeof prevProps.open) {
|
|
425
|
+
this.setState({ controlled: typeof openProp !== 'undefined' });
|
|
426
|
+
}
|
|
427
|
+
if (prevState.isOpen !== openState && openState) {
|
|
428
|
+
this.animateOpen();
|
|
429
|
+
}
|
|
430
|
+
else if (prevState.isOpen !== openState && !openState) {
|
|
431
|
+
this.animateClose();
|
|
432
|
+
}
|
|
433
|
+
};
|
|
434
|
+
ExpandCollapsePanel.prototype.render = function () {
|
|
435
|
+
var _a = this.props, children = _a.children, animationTiming = _a.animationTiming, className = _a.className, onToggle = _a.onToggle, open = _a.open, otherProps = tslib.__rest(_a, ["children", "animationTiming", "className", "onToggle", "open"]);
|
|
436
|
+
var _b = this.state, isOpen = _b.isOpen, isAnimating = _b.isAnimating, animationClass = _b.animationClass;
|
|
437
|
+
var trigger = React__default.Children.toArray(children).find(function (child) { return child.type === PanelTrigger$1; });
|
|
438
|
+
var panelElements = React__default.Children.toArray(children).filter(function (child) {
|
|
439
|
+
return typeof child === 'string' ||
|
|
440
|
+
child.type !== PanelTrigger$1;
|
|
441
|
+
});
|
|
442
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
443
|
+
trigger &&
|
|
444
|
+
React__default.cloneElement(trigger, {
|
|
445
|
+
open: isOpen,
|
|
446
|
+
onClick: this.handleToggle
|
|
447
|
+
}),
|
|
448
|
+
React__default.createElement("div", tslib.__assign({ className: classNames(className, 'ExpandCollapse__panel', animationClass, {
|
|
449
|
+
'is--hidden': !isOpen && !isAnimating
|
|
450
|
+
}), ref: this.panel }, otherProps), panelElements)));
|
|
451
|
+
};
|
|
452
|
+
ExpandCollapsePanel.defaultProps = {
|
|
453
|
+
animationTiming: 250,
|
|
454
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
455
|
+
onToggle: function () { }
|
|
456
|
+
};
|
|
457
|
+
ExpandCollapsePanel.propTypes = {
|
|
458
|
+
open: PropTypes.bool,
|
|
459
|
+
children: PropTypes.node.isRequired,
|
|
460
|
+
className: PropTypes.string,
|
|
461
|
+
animationTiming: PropTypes.oneOfType([PropTypes.number, PropTypes.bool]),
|
|
462
|
+
onToggle: PropTypes.func
|
|
463
|
+
};
|
|
464
|
+
return ExpandCollapsePanel;
|
|
465
|
+
}(React__default.Component));
|
|
466
|
+
|
|
467
|
+
var AccordionTrigger = function (_a) {
|
|
468
|
+
var children = _a.children, triggerProps = tslib.__rest(_a, ["children"]);
|
|
469
|
+
return React__default.createElement(React__default.Fragment, null, children);
|
|
470
|
+
};
|
|
471
|
+
var AccordionContent = function (_a) {
|
|
472
|
+
var children = _a.children, className = _a.className, otherProps = tslib.__rest(_a, ["children", "className"]);
|
|
473
|
+
return (React__default.createElement("div", tslib.__assign({ className: classNames('Accordion__panel', className) }, otherProps), children));
|
|
474
|
+
};
|
|
475
|
+
var Accordion = function (_a) {
|
|
476
|
+
var children = _a.children;
|
|
477
|
+
var childrenArray = React__default.Children.toArray(children);
|
|
478
|
+
var trigger = childrenArray.find(function (child) { return child.type === AccordionTrigger; });
|
|
479
|
+
var panelElement = childrenArray.find(function (child) {
|
|
480
|
+
return typeof child === 'string' ||
|
|
481
|
+
child.type === AccordionContent;
|
|
482
|
+
});
|
|
483
|
+
var isValid = !!(React__default.isValidElement(trigger) && React__default.isValidElement(panelElement));
|
|
484
|
+
if (!isValid) {
|
|
485
|
+
console.warn('Must provide <AccordionTrigger /> and <AccordionContent /> element(s). You provided:', {
|
|
486
|
+
trigger: trigger,
|
|
487
|
+
panelElement: panelElement,
|
|
488
|
+
isValid: isValid
|
|
489
|
+
});
|
|
490
|
+
return null;
|
|
491
|
+
}
|
|
492
|
+
var _b = trigger.props, triggerClassName = _b.className, triggerProps = tslib.__rest(_b, ["className"]);
|
|
493
|
+
var elementId = nextId.useId();
|
|
494
|
+
return (React__default.createElement("div", { className: "Accordion" },
|
|
495
|
+
React__default.createElement(ExpandCollapsePanel, tslib.__assign({ id: panelElement.props.id || "".concat(elementId, "-panel") }, panelElement.props),
|
|
496
|
+
React__default.createElement(PanelTrigger$1, tslib.__assign({ iconCollapsed: "triangle-right", iconExpanded: "triangle-down", className: classNames('Accordion__trigger', trigger.props.className), "aria-controls": panelElement.props.id || "".concat(elementId, "-panel"), heading: trigger.props.heading }, trigger.props), trigger),
|
|
497
|
+
panelElement)));
|
|
498
|
+
};
|
|
499
|
+
Accordion.displayName = 'Accordion';
|
|
500
|
+
AccordionContent.displayName = 'AccordionContent';
|
|
501
|
+
AccordionTrigger.displayName = 'AccordionTrigger';
|
|
502
|
+
Accordion.propTypes = {
|
|
503
|
+
children: PropTypes.node,
|
|
504
|
+
className: PropTypes.string
|
|
505
|
+
};
|
|
506
|
+
AccordionTrigger.propTypes = {
|
|
507
|
+
children: PropTypes.node,
|
|
508
|
+
heading: PropTypes.oneOf(['h1', 'h2', 'h3', 'h4', 'h5', 'h6', undefined])
|
|
509
|
+
};
|
|
510
|
+
AccordionContent.propTypes = {
|
|
511
|
+
children: PropTypes.node.isRequired,
|
|
512
|
+
className: PropTypes.string
|
|
513
|
+
};
|
|
514
|
+
|
|
310
515
|
var Scrim = /** @class */ (function (_super) {
|
|
311
516
|
tslib.__extends(Scrim, _super);
|
|
312
517
|
function Scrim(props) {
|
|
@@ -792,9 +997,13 @@ var OptionsMenuList = /** @class */ (function (_super) {
|
|
|
792
997
|
var _a = child.props, className = _a.className, other = tslib.__rest(_a, ["className"]);
|
|
793
998
|
return React__default.cloneElement(child, tslib.__assign({ key: "list-item-".concat(i), className: classNames('OptionsMenu__list-item', className), tabIndex: -1, role: 'menuitem', ref: function (el) { return (_this.itemRefs[i] = el); } }, other));
|
|
794
999
|
});
|
|
1000
|
+
// This allows the ClickOutsideListener to only be activated when the menu is
|
|
1001
|
+
// currently open. This prevents an obscure behavior where the activation of a
|
|
1002
|
+
// different menu would cause all menus to close
|
|
1003
|
+
var clickOutsideEventActive = !show ? false : undefined;
|
|
795
1004
|
// Key event is being handled in componentDidMount
|
|
796
1005
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
797
|
-
return (React__default.createElement(ClickOutsideListener, { onClickOutside: this.handleClickOutside },
|
|
1006
|
+
return (React__default.createElement(ClickOutsideListener, { onClickOutside: this.handleClickOutside, mouseEvent: clickOutsideEventActive, touchEvent: clickOutsideEventActive },
|
|
798
1007
|
React__default.createElement("ul", tslib.__assign({}, other, { className: classNames('OptionsMenu__list', className), "aria-expanded": show, role: "menu", onClick: handleClick, ref: function (el) {
|
|
799
1008
|
_this.menuRef = el;
|
|
800
1009
|
if (menuRef) {
|
|
@@ -833,7 +1042,6 @@ var OptionsMenu = /** @class */ (function (_super) {
|
|
|
833
1042
|
var show = _a.show;
|
|
834
1043
|
return ({ show: !show });
|
|
835
1044
|
});
|
|
836
|
-
event.preventDefault();
|
|
837
1045
|
};
|
|
838
1046
|
_this.handleClose = function () {
|
|
839
1047
|
var _a;
|
|
@@ -2678,152 +2886,6 @@ var TextField = /** @class */ (function (_super) {
|
|
|
2678
2886
|
return TextField;
|
|
2679
2887
|
}(React__default.Component));
|
|
2680
2888
|
|
|
2681
|
-
function PanelTrigger(_a) {
|
|
2682
|
-
var children = _a.children, className = _a.className, open = _a.open, fullWidth = _a.fullWidth, onClick = _a.onClick, _b = _a.iconExpanded, iconExpanded = _b === void 0 ? 'chevron-down' : _b, _c = _a.iconCollapsed, iconCollapsed = _c === void 0 ? 'chevron-right' : _c, other = tslib.__rest(_a, ["children", "className", "open", "fullWidth", "onClick", "iconExpanded", "iconCollapsed"]);
|
|
2683
|
-
return (React__default.createElement("button", tslib.__assign({}, other, { className: classNames('ExpandCollapse__trigger', fullWidth ? 'fullWidth' : '', className), type: "button", "aria-expanded": open, onClick: onClick }),
|
|
2684
|
-
React__default.createElement("div", { className: "ExpandCollapse__trigger-title" }, typeof children === 'function' ? children({ open: !!open }) : children),
|
|
2685
|
-
React__default.createElement(Icon, { type: open ? iconExpanded : iconCollapsed })));
|
|
2686
|
-
}
|
|
2687
|
-
PanelTrigger.propTypes = {
|
|
2688
|
-
children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),
|
|
2689
|
-
open: PropTypes.bool,
|
|
2690
|
-
onClick: PropTypes.func,
|
|
2691
|
-
className: PropTypes.string,
|
|
2692
|
-
iconExpanded: PropTypes.string,
|
|
2693
|
-
iconCollapsed: PropTypes.string
|
|
2694
|
-
};
|
|
2695
|
-
var PanelTrigger$1 = React__default.memo(PanelTrigger);
|
|
2696
|
-
|
|
2697
|
-
var injectStyleTag = function () {
|
|
2698
|
-
var style = document.createElement('style');
|
|
2699
|
-
document.head.appendChild(style);
|
|
2700
|
-
return style;
|
|
2701
|
-
};
|
|
2702
|
-
var setStyle = function (tag, cssString) {
|
|
2703
|
-
tag.textContent = cssString;
|
|
2704
|
-
};
|
|
2705
|
-
var removeStyleTag = function (tag) {
|
|
2706
|
-
document.head.removeChild(tag);
|
|
2707
|
-
};
|
|
2708
|
-
|
|
2709
|
-
var ExpandCollapsePanel = /** @class */ (function (_super) {
|
|
2710
|
-
tslib.__extends(ExpandCollapsePanel, _super);
|
|
2711
|
-
function ExpandCollapsePanel() {
|
|
2712
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
2713
|
-
_this.state = {
|
|
2714
|
-
controlled: typeof _this.props.open !== 'undefined',
|
|
2715
|
-
isOpen: typeof _this.props.open !== 'undefined' ? _this.props.open : false
|
|
2716
|
-
};
|
|
2717
|
-
_this.panel = React__default.createRef();
|
|
2718
|
-
_this.handleToggle = function (e) {
|
|
2719
|
-
var onToggle = _this.props.onToggle;
|
|
2720
|
-
var _a = _this.state, isOpen = _a.isOpen, controlled = _a.controlled;
|
|
2721
|
-
onToggle(e);
|
|
2722
|
-
if (!controlled) {
|
|
2723
|
-
_this.setState({ isOpen: !isOpen, isAnimating: true });
|
|
2724
|
-
}
|
|
2725
|
-
};
|
|
2726
|
-
_this.animateOpen = function () {
|
|
2727
|
-
var panel = _this.panel.current;
|
|
2728
|
-
var animationTiming = _this.props.animationTiming;
|
|
2729
|
-
if (!animationTiming) {
|
|
2730
|
-
_this.setState({ isAnimating: false });
|
|
2731
|
-
return;
|
|
2732
|
-
}
|
|
2733
|
-
var rect = panel === null || panel === void 0 ? void 0 : panel.getBoundingClientRect();
|
|
2734
|
-
if (!rect) {
|
|
2735
|
-
return;
|
|
2736
|
-
}
|
|
2737
|
-
if (!_this.styleTag) {
|
|
2738
|
-
_this.styleTag = injectStyleTag();
|
|
2739
|
-
}
|
|
2740
|
-
setStyle(_this.styleTag, "\n @keyframes expandOpenAnimation {\n 0% { opacity: 0; height: 0; }\n 100% { opacity: 1; height: ".concat(rect.height, "px; }\n }\n\n .cauldron-expand-open {\n will-change: opacity, height;\n overflow: hidden;\n animation: expandOpenAnimation ease-in-out ").concat(animationTiming, "ms forwards;\n }\n "));
|
|
2741
|
-
_this.setState({ animationClass: 'cauldron-expand-open' }, function () {
|
|
2742
|
-
setTimeout(function () {
|
|
2743
|
-
_this.setState({ animationClass: '', isAnimating: false });
|
|
2744
|
-
setStyle(_this.styleTag, '');
|
|
2745
|
-
}, animationTiming);
|
|
2746
|
-
});
|
|
2747
|
-
};
|
|
2748
|
-
_this.animateClose = function () {
|
|
2749
|
-
var panel = _this.panel.current;
|
|
2750
|
-
var animationTiming = _this.props.animationTiming;
|
|
2751
|
-
if (!animationTiming) {
|
|
2752
|
-
_this.setState({ isAnimating: false });
|
|
2753
|
-
return;
|
|
2754
|
-
}
|
|
2755
|
-
if (!_this.styleTag) {
|
|
2756
|
-
_this.styleTag = injectStyleTag();
|
|
2757
|
-
}
|
|
2758
|
-
var rect = panel === null || panel === void 0 ? void 0 : panel.getBoundingClientRect();
|
|
2759
|
-
if (!rect)
|
|
2760
|
-
return;
|
|
2761
|
-
setStyle(_this.styleTag, "\n @keyframes collapseCloseAnimation {\n 0% { opacity: 1; height: ".concat(rect.height, "px; }\n 100% { opacity: 0; height: 0; }\n }\n\n .cauldron-collapse-close {\n will-change: opacity, height;\n overflow: hidden;\n animation: collapseCloseAnimation ease-in-out ").concat(animationTiming, "ms forwards;\n }\n "));
|
|
2762
|
-
_this.setState({ animationClass: 'cauldron-collapse-close' }, function () {
|
|
2763
|
-
setTimeout(function () {
|
|
2764
|
-
_this.setState({ animationClass: '', isAnimating: false });
|
|
2765
|
-
setStyle(_this.styleTag, '');
|
|
2766
|
-
}, animationTiming);
|
|
2767
|
-
});
|
|
2768
|
-
};
|
|
2769
|
-
return _this;
|
|
2770
|
-
}
|
|
2771
|
-
ExpandCollapsePanel.prototype.componentWillUnmount = function () {
|
|
2772
|
-
var styleTag = this.styleTag;
|
|
2773
|
-
if (styleTag) {
|
|
2774
|
-
removeStyleTag(styleTag);
|
|
2775
|
-
}
|
|
2776
|
-
};
|
|
2777
|
-
ExpandCollapsePanel.prototype.componentDidUpdate = function (prevProps, prevState) {
|
|
2778
|
-
var _a = this.state, openState = _a.isOpen, controlled = _a.controlled;
|
|
2779
|
-
var openProp = this.props.open;
|
|
2780
|
-
if (controlled && openState !== openProp) {
|
|
2781
|
-
this.setState({ isOpen: !!openProp, isAnimating: true });
|
|
2782
|
-
}
|
|
2783
|
-
if (typeof openProp !== typeof prevProps.open) {
|
|
2784
|
-
this.setState({ controlled: typeof openProp !== 'undefined' });
|
|
2785
|
-
}
|
|
2786
|
-
if (prevState.isOpen !== openState && openState) {
|
|
2787
|
-
this.animateOpen();
|
|
2788
|
-
}
|
|
2789
|
-
else if (prevState.isOpen !== openState && !openState) {
|
|
2790
|
-
this.animateClose();
|
|
2791
|
-
}
|
|
2792
|
-
};
|
|
2793
|
-
ExpandCollapsePanel.prototype.render = function () {
|
|
2794
|
-
/* eslint-disable no-unused-vars */
|
|
2795
|
-
var _a = this.props, children = _a.children, animationTiming = _a.animationTiming, className = _a.className, onToggle = _a.onToggle, open = _a.open, other = tslib.__rest(_a, ["children", "animationTiming", "className", "onToggle", "open"]);
|
|
2796
|
-
/* eslint-enable no-unused-vars */
|
|
2797
|
-
var _b = this.state, isOpen = _b.isOpen, isAnimating = _b.isAnimating, animationClass = _b.animationClass;
|
|
2798
|
-
var trigger = React__default.Children.toArray(children).find(function (child) { return child.type === PanelTrigger$1; });
|
|
2799
|
-
var panelElements = React__default.Children.toArray(children).filter(function (child) {
|
|
2800
|
-
return typeof child === 'string' ||
|
|
2801
|
-
child.type !== PanelTrigger$1;
|
|
2802
|
-
});
|
|
2803
|
-
return (React__default.createElement(React__default.Fragment, null,
|
|
2804
|
-
trigger &&
|
|
2805
|
-
React__default.cloneElement(trigger, {
|
|
2806
|
-
open: isOpen,
|
|
2807
|
-
onClick: this.handleToggle
|
|
2808
|
-
}),
|
|
2809
|
-
React__default.createElement("div", tslib.__assign({}, other, { className: classNames('ExpandCollapse__panel', animationClass, className, {
|
|
2810
|
-
'is--hidden': !isOpen && !isAnimating
|
|
2811
|
-
}), ref: this.panel }), panelElements)));
|
|
2812
|
-
};
|
|
2813
|
-
ExpandCollapsePanel.defaultProps = {
|
|
2814
|
-
animationTiming: 250,
|
|
2815
|
-
onToggle: function () { }
|
|
2816
|
-
};
|
|
2817
|
-
ExpandCollapsePanel.propTypes = {
|
|
2818
|
-
open: PropTypes.bool,
|
|
2819
|
-
children: PropTypes.node.isRequired,
|
|
2820
|
-
className: PropTypes.string,
|
|
2821
|
-
animationTiming: PropTypes.oneOfType([PropTypes.number, PropTypes.bool]),
|
|
2822
|
-
onToggle: PropTypes.func
|
|
2823
|
-
};
|
|
2824
|
-
return ExpandCollapsePanel;
|
|
2825
|
-
}(React__default.Component));
|
|
2826
|
-
|
|
2827
2889
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
2828
2890
|
if (source == null) return {};
|
|
2829
2891
|
var target = {};
|
|
@@ -8685,6 +8747,7 @@ var BreadcrumbLink = React.forwardRef(function (_a, ref) {
|
|
|
8685
8747
|
var className = _a.className, _b = _a.as, ElementType = _b === void 0 ? 'a' : _b, children = _a.children, props = tslib.__rest(_a, ["className", "as", "children"]);
|
|
8686
8748
|
return (React__default.createElement(ElementType, tslib.__assign({ className: classNames('Link', 'Breadcrumb__Link', className), ref: ref }, props), children));
|
|
8687
8749
|
});
|
|
8750
|
+
BreadcrumbLink.displayName = 'BreadcrumbLink';
|
|
8688
8751
|
|
|
8689
8752
|
var ColumnLeft = React.forwardRef(function (_a, ref) {
|
|
8690
8753
|
var className = _a.className, children = _a.children, props = tslib.__rest(_a, ["className", "children"]);
|
|
@@ -8913,6 +8976,9 @@ ThemeProvider.propTypes = {
|
|
|
8913
8976
|
initialTheme: PropTypes.string
|
|
8914
8977
|
};
|
|
8915
8978
|
|
|
8979
|
+
exports.Accordion = Accordion;
|
|
8980
|
+
exports.AccordionContent = AccordionContent;
|
|
8981
|
+
exports.AccordionTrigger = AccordionTrigger;
|
|
8916
8982
|
exports.Address = Address;
|
|
8917
8983
|
exports.AddressCityStateZip = AddressCityStateZip;
|
|
8918
8984
|
exports.AddressLine = AddressLine;
|
package/lib/play.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var React__default = _interopDefault(React);
|
|
7
|
+
|
|
8
|
+
var _path;
|
|
9
|
+
|
|
10
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
11
|
+
|
|
12
|
+
const SvgPlay = props => /*#__PURE__*/React.createElement("svg", _extends({
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
overflow: "visible",
|
|
15
|
+
preserveAspectRatio: "none",
|
|
16
|
+
viewBox: "0 0 24 24",
|
|
17
|
+
height: 24,
|
|
18
|
+
width: 24
|
|
19
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
20
|
+
d: "M8 5v14l11-7z",
|
|
21
|
+
fill: "currentColor",
|
|
22
|
+
vectorEffect: "non-scaling-stroke"
|
|
23
|
+
})));
|
|
24
|
+
|
|
25
|
+
exports.default = SvgPlay;
|