UNPKG

@shopify/polaris

Version:

Shopify’s product component library

915 lines (796 loc) • 265 kB
import { Children, Component, PureComponent, createElement } from 'react'; import { classNames, variationName } from '@shopify/react-utilities/styles'; import { __decorate, __rest } from 'tslib'; import { classNames as classNames$1, variationName as variationName$1 } from '@shopify/react-utilities'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _createClass from 'babel-runtime/helpers/createClass'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _inherits from 'babel-runtime/helpers/inherits'; import { elementChildren, isElementOfType, layeredComponent, wrapWithComponent } from '@shopify/react-utilities/components'; import { autobind, debounce } from '@shopify/javascript-utilities/decorators'; import _toConsumableArray from 'babel-runtime/helpers/toConsumableArray'; import { createUniqueIDFactory, noop } from '@shopify/javascript-utilities/other'; import { bool, object } from 'prop-types'; import { addEventListener, removeEventListener } from '@shopify/javascript-utilities/events'; import { read, write } from '@shopify/javascript-utilities/fastdom'; import { clamp } from '@shopify/javascript-utilities/math'; import { Months, Weekdays, abbreviationForWeekday, dateIsInRange, dateIsSelected, getNewRange, getNextDisplayMonth, getNextDisplayYear, getPreviousDisplayMonth, getPreviousDisplayYear, getWeeksForMonth, isDateAfter, isDateBefore, isSameDay } from '@shopify/javascript-utilities/dates'; import isEqual from 'lodash/isEqual'; import pick from 'lodash/pick'; import { findFirstFocusableNode, focusFirstFocusableNode } from '@shopify/javascript-utilities/focus'; import { closest, nodeContainsDescendant } from '@shopify/javascript-utilities/dom'; import { Transition } from 'react-transition-group'; import { Rect, getRectForNode } from '@shopify/javascript-utilities/geometry'; import { findDOMNode } from 'react-dom'; var Keys; (function (Keys) { Keys[Keys["BACKSPACE"] = 8] = "BACKSPACE"; Keys[Keys["TAB"] = 9] = "TAB"; Keys[Keys["ENTER"] = 13] = "ENTER"; Keys[Keys["SHIFT"] = 16] = "SHIFT"; Keys[Keys["CTRL"] = 17] = "CTRL"; Keys[Keys["ALT"] = 18] = "ALT"; Keys[Keys["PAUSE"] = 19] = "PAUSE"; Keys[Keys["CAPS_LOCK"] = 20] = "CAPS_LOCK"; Keys[Keys["ESCAPE"] = 27] = "ESCAPE"; Keys[Keys["SPACE"] = 32] = "SPACE"; Keys[Keys["PAGE_UP"] = 33] = "PAGE_UP"; Keys[Keys["PAGE_DOWN"] = 34] = "PAGE_DOWN"; Keys[Keys["END"] = 35] = "END"; Keys[Keys["HOME"] = 36] = "HOME"; Keys[Keys["LEFT_ARROW"] = 37] = "LEFT_ARROW"; Keys[Keys["UP_ARROW"] = 38] = "UP_ARROW"; Keys[Keys["RIGHT_ARROW"] = 39] = "RIGHT_ARROW"; Keys[Keys["DOWN_ARROW"] = 40] = "DOWN_ARROW"; Keys[Keys["INSERT"] = 45] = "INSERT"; Keys[Keys["DELETE"] = 46] = "DELETE"; Keys[Keys["KEY_0"] = 48] = "KEY_0"; Keys[Keys["KEY_1"] = 49] = "KEY_1"; Keys[Keys["KEY_2"] = 50] = "KEY_2"; Keys[Keys["KEY_3"] = 51] = "KEY_3"; Keys[Keys["KEY_4"] = 52] = "KEY_4"; Keys[Keys["KEY_5"] = 53] = "KEY_5"; Keys[Keys["KEY_6"] = 54] = "KEY_6"; Keys[Keys["KEY_7"] = 55] = "KEY_7"; Keys[Keys["KEY_8"] = 56] = "KEY_8"; Keys[Keys["KEY_9"] = 57] = "KEY_9"; Keys[Keys["KEY_A"] = 65] = "KEY_A"; Keys[Keys["KEY_B"] = 66] = "KEY_B"; Keys[Keys["KEY_C"] = 67] = "KEY_C"; Keys[Keys["KEY_D"] = 68] = "KEY_D"; Keys[Keys["KEY_E"] = 69] = "KEY_E"; Keys[Keys["KEY_F"] = 70] = "KEY_F"; Keys[Keys["KEY_G"] = 71] = "KEY_G"; Keys[Keys["KEY_H"] = 72] = "KEY_H"; Keys[Keys["KEY_I"] = 73] = "KEY_I"; Keys[Keys["KEY_J"] = 74] = "KEY_J"; Keys[Keys["KEY_K"] = 75] = "KEY_K"; Keys[Keys["KEY_L"] = 76] = "KEY_L"; Keys[Keys["KEY_M"] = 77] = "KEY_M"; Keys[Keys["KEY_N"] = 78] = "KEY_N"; Keys[Keys["KEY_O"] = 79] = "KEY_O"; Keys[Keys["KEY_P"] = 80] = "KEY_P"; Keys[Keys["KEY_Q"] = 81] = "KEY_Q"; Keys[Keys["KEY_R"] = 82] = "KEY_R"; Keys[Keys["KEY_S"] = 83] = "KEY_S"; Keys[Keys["KEY_T"] = 84] = "KEY_T"; Keys[Keys["KEY_U"] = 85] = "KEY_U"; Keys[Keys["KEY_V"] = 86] = "KEY_V"; Keys[Keys["KEY_W"] = 87] = "KEY_W"; Keys[Keys["KEY_X"] = 88] = "KEY_X"; Keys[Keys["KEY_Y"] = 89] = "KEY_Y"; Keys[Keys["KEY_Z"] = 90] = "KEY_Z"; Keys[Keys["LEFT_META"] = 91] = "LEFT_META"; Keys[Keys["RIGHT_META"] = 92] = "RIGHT_META"; Keys[Keys["SELECT"] = 93] = "SELECT"; Keys[Keys["NUMPAD_0"] = 96] = "NUMPAD_0"; Keys[Keys["NUMPAD_1"] = 97] = "NUMPAD_1"; Keys[Keys["NUMPAD_2"] = 98] = "NUMPAD_2"; Keys[Keys["NUMPAD_3"] = 99] = "NUMPAD_3"; Keys[Keys["NUMPAD_4"] = 100] = "NUMPAD_4"; Keys[Keys["NUMPAD_5"] = 101] = "NUMPAD_5"; Keys[Keys["NUMPAD_6"] = 102] = "NUMPAD_6"; Keys[Keys["NUMPAD_7"] = 103] = "NUMPAD_7"; Keys[Keys["NUMPAD_8"] = 104] = "NUMPAD_8"; Keys[Keys["NUMPAD_9"] = 105] = "NUMPAD_9"; Keys[Keys["MULTIPLY"] = 106] = "MULTIPLY"; Keys[Keys["ADD"] = 107] = "ADD"; Keys[Keys["SUBTRACT"] = 109] = "SUBTRACT"; Keys[Keys["DECIMAL"] = 110] = "DECIMAL"; Keys[Keys["DIVIDE"] = 111] = "DIVIDE"; Keys[Keys["F1"] = 112] = "F1"; Keys[Keys["F2"] = 113] = "F2"; Keys[Keys["F3"] = 114] = "F3"; Keys[Keys["F4"] = 115] = "F4"; Keys[Keys["F5"] = 116] = "F5"; Keys[Keys["F6"] = 117] = "F6"; Keys[Keys["F7"] = 118] = "F7"; Keys[Keys["F8"] = 119] = "F8"; Keys[Keys["F9"] = 120] = "F9"; Keys[Keys["F10"] = 121] = "F10"; Keys[Keys["F11"] = 122] = "F11"; Keys[Keys["F12"] = 123] = "F12"; Keys[Keys["NUM_LOCK"] = 144] = "NUM_LOCK"; Keys[Keys["SCROLL_LOCK"] = 145] = "SCROLL_LOCK"; Keys[Keys["SEMICOLON"] = 186] = "SEMICOLON"; Keys[Keys["EQUALS"] = 187] = "EQUALS"; Keys[Keys["COMMA"] = 188] = "COMMA"; Keys[Keys["DASH"] = 189] = "DASH"; Keys[Keys["PERIOD"] = 190] = "PERIOD"; Keys[Keys["FORWARD_SLASH"] = 191] = "FORWARD_SLASH"; Keys[Keys["GRAVE_ACCENT"] = 192] = "GRAVE_ACCENT"; Keys[Keys["OPEN_BRACKET"] = 219] = "OPEN_BRACKET"; Keys[Keys["BACK_SLASH"] = 220] = "BACK_SLASH"; Keys[Keys["CLOSE_BRACKET"] = 221] = "CLOSE_BRACKET"; Keys[Keys["SINGLE_QUOTE"] = 222] = "SINGLE_QUOTE"; })(Keys || (Keys = {})); function Image$1(_a) { var sourceSet = _a.sourceSet, source = _a.source, rest = __rest(_a, ["sourceSet", "source"]); var finalSourceSet = sourceSet ? sourceSet.map(function (_ref) { var subSource = _ref.source, descriptor = _ref.descriptor; return subSource + " " + descriptor; }).join(',') : null; return finalSourceSet ? createElement("img", Object.assign({ src: source, srcSet: finalSourceSet }, rest)) : createElement("img", Object.assign({ src: source }, rest)); } var styles$1 = { "Avatar": "Polaris-Avatar", "sizeSmall": "Polaris-Avatar--sizeSmall", "sizeMedium": "Polaris-Avatar--sizeMedium", "sizeLarge": "Polaris-Avatar--sizeLarge", "styleOne": "Polaris-Avatar--styleOne", "styleTwo": "Polaris-Avatar--styleTwo", "styleThree": "Polaris-Avatar--styleThree", "styleFour": "Polaris-Avatar--styleFour", "styleFive": "Polaris-Avatar--styleFive", "styleSix": "Polaris-Avatar--styleSix", "Image": "Polaris-Avatar__Image", "Initials": "Polaris-Avatar__Initials", "Svg": "Polaris-Avatar__Svg", "skeletonShimmerAnimation": "Polaris-Avatar--skeletonShimmerAnimation", }; var avatar1 = 'data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6IzI0NWI0OH0uY2xzLTJ7ZmlsbDojMmRiMTY3fS5jbHMtM3tmaWxsOiNmZmZ9LmNscy00e2ZpbGw6IzhkYzk1OH0uY2xzLTV7ZmlsbDojZWJlZGYxO29wYWNpdHk6LjJ9PC9zdHlsZT48L2RlZnM+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJNMCAwaDEwMHYxMDBIMHoiLz48cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Ik02OSAwdjY1LjY1bC0yLS4wMXYxOS44NWwyIC4wMlYxMDBIMFYwaDY5eiIvPjxwYXRoIGNsYXNzPSJjbHMtMyIgZD0iTTY3IDY1LjY0djE5Ljg1bC0yNS41Ny0uMTlDMzIgODUuMjIgMjUuNiA4MS40NiAyNS42OCA3Mi4wNnMuMjUtNi43NC4yNS02Ljc0eiIvPjxwYXRoIGNsYXNzPSJjbHMtNCIgZD0iTTg2Ljk5IDU4SDY5VjBoMTAuOTNsNy4wNiA1OHoiLz48cGF0aCBjbGFzcz0iY2xzLTUiIGQ9Ik0yNC41MyA0MC4yOWExMi4yMyAxMi4yMyAwIDAgMSAyNC40NiAwIi8+PHBhdGggY2xhc3M9ImNscy00IiBkPSJNNTkuNjIgNThBMTAuNjkgMTAuNjkgMCAwIDEgODEgNTh6Ii8+PC9zdmc+'; var av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1YzNC40OHoiLz48cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Ik02MS42IDMzLjY3YTEwLjE3IDEwLjE3IDAgMCAxIDE1LjQuMDgiLz48L3N2Zz4='; var avatar9 = 'data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2ZmYzA0ZH0uY2xzLTJ7ZmlsbDojNWQ2Y2MxfS5jbHMtM3tmaWxsOiM0MTIzNmV9LmNscy00e2ZpbGw6I2ViZWRmMTtvcGFjaXR5Oi4yfTwvc3R5bGU+PC9kZWZzPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHBhdGggY2xhc3M9ImNscy0yIiBkPSJNMCAwaDY5LjQxdjEwMEgweiIvPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTcwLjIxIDgwLjg4aC0xNS4xYy00LjgxIDAtNS42OC01Ljg0LTUuNjgtNS44NGgyMC43OCIvPjxwYXRoIGNsYXNzPSJjbHMtMiIgZD0iTTgyIDYwLjQ4bC0xNCAuMjVWMGgxMC4xN0M4MC41OSAyMC4xNCA4MiA2MC40OCA4MiA2MC40OHoiLz48cGF0aCBjbGFzcz0iY2xzLTMiIGQ9Ik01Ny43MSA2MC40OGE1LjQ0IDUuNDQgMCAxIDEgMTAuODcgMCIvPjxjaXJjbGUgY2xhc3M9ImNscy00IiBjeD0iMjQuNzciIGN5PSI0MC4xOSIgcj0iMTEuMjIiLz48L3N2Zz4='; var avatars = Object.freeze({ avatarOne: avatar1, avatarTwo: avatar2, avatarThree: avatar3, avatarFour: avatar4, avatarFive: avatar5, avatarSix: avatar6, avatarSeven: avatar7, avatarEight: avatar8, avatarNine: avatar9 }); var STYLE_CLASSES = ['one', 'two', 'three', 'four', 'five', 'six']; var AVATAR_IMAGES = Object.keys(avatars).map(function (key) { return avatars[key]; }); function Avatar$1(_ref) { var name = _ref.name, source = _ref.source, initials = _ref.initials, customer = _ref.customer, _ref$size = _ref.size, size = _ref$size === undefined ? 'medium' : _ref$size, accessibilityLabel = _ref.accessibilityLabel; var nameString = name || initials; var finalSource = void 0; var label = void 0; if (accessibilityLabel) { label = accessibilityLabel; } else if (name) { label = name; } else if (initials) { label = 'Avatar with initials ' + initials.split('').join(' '); } else { label = 'Avatar'; } if (source) { finalSource = source; } else if (customer) { finalSource = customerPlaceholder(nameString); } var className = classNames(styles$1.Avatar, styles$1[variationName('style', styleClass(nameString))], size && styles$1[variationName('size', size)]); var imageMarkUp = finalSource ? createElement(Image$1, { className: styles$1.Image, source: finalSource, alt: '', role: 'presentation' }) : null; // Use `dominant-baseline: central` instead of `dy` when Edge supports it. var verticalOffset = '0.35em'; var initialsMarkup = initials ? createElement( 'span', { className: styles$1.Initials }, createElement( 'svg', { className: styles$1.Svg, viewBox: '0 0 48 48' }, createElement( 'text', { x: '50%', y: '50%', dy: verticalOffset, fill: 'currentColor', fontSize: '26', textAnchor: 'middle' }, initials ) ) ) : null; return createElement( 'span', { 'aria-label': label, role: 'img', className: className }, initialsMarkup, imageMarkUp ); } function styleClass(name) { return name ? STYLE_CLASSES[name.charCodeAt(0) % STYLE_CLASSES.length] : STYLE_CLASSES[0]; } function customerPlaceholder(name) { return name ? AVATAR_IMAGES[name.charCodeAt(0) % AVATAR_IMAGES.length] : AVATAR_IMAGES[0]; } function handleMouseUpByBlurring(_ref) { var currentTarget = _ref.currentTarget; currentTarget.blur(); } var scrollable = { props: { 'data-polaris-scrollable': true }, selector: '[data-polaris-scrollable]' }; var overlay = { props: { 'data-polaris-overlay': true }, selector: '[data-polaris-overlay]' }; var layer = { props: { 'data-polaris-layer': true }, selector: '[data-polaris-layer]' }; var unstyled = { props: { 'data-polaris-unstyled': true }, selector: '[data-polaris-unstyled]' }; var LinkComponent = void 0; var UnstyledLink$1 = function (_React$PureComponent) { _inherits(UnstyledLink, _React$PureComponent); function UnstyledLink() { _classCallCheck(this, UnstyledLink); return _possibleConstructorReturn(this, (UnstyledLink.__proto__ || Object.getPrototypeOf(UnstyledLink)).apply(this, arguments)); } _createClass(UnstyledLink, [{ key: 'render', value: function render() { if (LinkComponent) { return createElement(LinkComponent, Object.assign({}, unstyled.props, this.props)); } var _a = this.props, external = _a.external, url = _a.url, rest = __rest(_a, ["external", "url"]); var target = external ? '_blank' : undefined; var rel = external ? 'noopener noreferrer' : undefined; return createElement('a', Object.assign({ target: target }, rest, { href: url, rel: rel }, unstyled.props)); } }], [{ key: 'use', value: function use(NewLinkComponent) { LinkComponent = NewLinkComponent; } }]); return UnstyledLink; }(PureComponent); var add = {"viewBox":"0 0 20 20","body":"<path d=\"M17 9h-6V3a1 1 0 1 0-2 0v6H3a1 1 0 1 0 0 2h6v6a1 1 0 1 0 2 0v-6h6a1 1 0 1 0 0-2\" fill-rule=\"evenodd\"/>"}; var alert = {"viewBox":"0 0 20 20","body":"<path d=\"M10 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16zm-1-8h2V6H9v4zm0 4h2v-2H9v2z\" fill-rule=\"evenodd\"/>"}; var arrowDown = {"viewBox":"0 0 20 20","body":"<path d=\"M10.707 17.707l5-5a.999.999 0 1 0-1.414-1.414L11 14.586V3a1 1 0 1 0-2 0v11.586l-3.293-3.293a.999.999 0 1 0-1.414 1.414l5 5a.999.999 0 0 0 1.414 0\" fill-rule=\"evenodd\"/>"}; var arrowLeft = {"viewBox":"0 0 20 20","body":"<path d=\"M17 9H5.414l3.293-3.293a.999.999 0 1 0-1.414-1.414l-5 5a.999.999 0 0 0 0 1.414l5 5a.997.997 0 0 0 1.414 0 .999.999 0 0 0 0-1.414L5.414 11H17a1 1 0 1 0 0-2\" fill-rule=\"evenodd\"/>"}; var arrowRight = {"viewBox":"0 0 20 20","body":"<path d=\"M17.707 9.293l-5-5a.999.999 0 1 0-1.414 1.414L14.586 9H3a1 1 0 1 0 0 2h11.586l-3.293 3.293a.999.999 0 1 0 1.414 1.414l5-5a.999.999 0 0 0 0-1.414\" fill-rule=\"evenodd\"/>"}; var arrowUp = {"viewBox":"0 0 20 20","body":"<path d=\"M11 17V5.414l3.293 3.293a.999.999 0 1 0 1.414-1.414l-5-5a.999.999 0 0 0-1.414 0l-5 5a.997.997 0 0 0 0 1.414.999.999 0 0 0 1.414 0L9 5.414V17a1 1 0 1 0 2 0\" fill-rule=\"evenodd\"/>"}; var arrowUpDown = {"viewBox":"0 0 20 20","body":"<path d=\"M13 8l-3-3-3 3h6zm-.1 4L10 14.9 7.1 12h5.8z\" fill-rule=\"evenodd\"/>"}; var calendar = {"viewBox":"0 0 20 20","body":"<path d=\"M4 8h12V6H4v2zm9 4h2v-2h-2v2zm-4 0h2v-2H9v2zm0 4h2v-2H9v2zm-4-4h2v-2H5v2zm0 4h2v-2H5v2zM17 4h-2V3a1 1 0 1 0-2 0v1H7V3a1 1 0 1 0-2 0v1H3a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1z\" fill-rule=\"evenodd\"/>"}; var cancel = {"viewBox":"0 0 20 20","body":"<path d=\"M11.414 10l6.293-6.293a.999.999 0 1 0-1.414-1.414L10 8.586 3.707 2.293a.999.999 0 1 0-1.414 1.414L8.586 10l-6.293 6.293a.999.999 0 1 0 1.414 1.414L10 11.414l6.293 6.293a.997.997 0 0 0 1.414 0 .999.999 0 0 0 0-1.414L11.414 10z\" fill-rule=\"evenodd\"/>"}; var cancelSmall = {"viewBox":"0 0 20 20","body":"<path d=\"M11.414 10l4.293-4.293a.999.999 0 1 0-1.414-1.414L10 8.586 5.707 4.293a.999.999 0 1 0-1.414 1.414L8.586 10l-4.293 4.293a.999.999 0 1 0 1.414 1.414L10 11.414l4.293 4.293a.997.997 0 0 0 1.414 0 .999.999 0 0 0 0-1.414L11.414 10z\" fill-rule=\"evenodd\"/>"}; var caretDown = {"viewBox":"0 0 20 20","body":"<path d=\"M5 8l5 5 5-5z\" fill-rule=\"evenodd\"/>"}; var caretUp = {"viewBox":"0 0 20 20","body":"<path d=\"M15 12l-5-5-5 5z\" />"}; var checkmark = {"viewBox":"0 0 20 20","body":"<g fill-rule=\"evenodd\"><path d=\"M8.315 13.859l-3.182-3.417a.506.506 0 0 1 0-.684l.643-.683a.437.437 0 0 1 .642 0l2.22 2.393 4.942-5.327a.437.437 0 0 1 .643 0l.643.684a.504.504 0 0 1 0 .683l-5.91 6.35a.437.437 0 0 1-.642 0\"/><path d=\"M8.315 13.859l-3.182-3.417a.506.506 0 0 1 0-.684l.643-.683a.437.437 0 0 1 .642 0l2.22 2.393 4.942-5.327a.437.437 0 0 1 .643 0l.643.684a.504.504 0 0 1 0 .683l-5.91 6.35a.437.437 0 0 1-.642 0\"/></g>"}; var chevronDown = {"viewBox":"0 0 20 20","body":"<path d=\"M10 14a.997.997 0 0 1-.707-.293l-5-5a.999.999 0 1 1 1.414-1.414L10 11.586l4.293-4.293a.999.999 0 1 1 1.414 1.414l-5 5A.997.997 0 0 1 10 14\" fill-rule=\"evenodd\"/>"}; var chevronLeft = {"viewBox":"0 0 20 20","body":"<path d=\"M12 16a.997.997 0 0 1-.707-.293l-5-5a.999.999 0 0 1 0-1.414l5-5a.999.999 0 1 1 1.414 1.414L8.414 10l4.293 4.293A.999.999 0 0 1 12 16\" fill-rule=\"evenodd\"/>"}; var chevronRight = {"viewBox":"0 0 20 20","body":"<path d=\"M8 16a.999.999 0 0 1-.707-1.707L11.586 10 7.293 5.707a.999.999 0 1 1 1.414-1.414l5 5a.999.999 0 0 1 0 1.414l-5 5A.997.997 0 0 1 8 16\" fill-rule=\"evenodd\"/>"}; var chevronUp = {"viewBox":"0 0 20 20","body":"<path d=\"M15 13a.997.997 0 0 1-.707-.293L10 8.414l-4.293 4.293a.999.999 0 1 1-1.414-1.414l5-5a.999.999 0 0 1 1.414 0l5 5A.999.999 0 0 1 15 13\" fill-rule=\"evenodd\"/>"}; var circleCancel = {"viewBox":"0 0 20 20","body":"<path d=\"M14.242 12.829l-1.414 1.414L10 11.413l-2.828 2.83-1.414-1.414 2.828-2.83-2.828-2.827 1.414-1.414L10 8.586l2.828-2.828 1.414 1.414L11.414 10l2.828 2.829zM10 1.999A8 8 0 1 0 10 18a8 8 0 0 0 0-16z\" fill-rule=\"evenodd\"/>"}; var circleChevronDown = {"viewBox":"0 0 20 20","body":"<path d=\"M10 13.414L5.293 8.707l1.414-1.414L10 10.586l3.293-3.293 1.414 1.414L10 13.414zM10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16z\" fill-rule=\"evenodd\"/>"}; var circleChevronLeft = {"viewBox":"0 0 20 20","body":"<path d=\"M11.293 5.293l1.414 1.414L9.414 10l3.293 3.293-1.414 1.414L6.586 10l4.707-4.707zM10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16z\" fill-rule=\"evenodd\"/>"}; var circleChevronRight = {"viewBox":"0 0 20 20","body":"<path d=\"M8.707 14.707l-1.414-1.414L10.586 10 7.293 6.707l1.414-1.414L13.414 10l-4.707 4.707zM10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16z\" fill-rule=\"evenodd\"/>"}; var circleChevronUp = {"viewBox":"0 0 20 20","body":"<path d=\"M14.707 11.293l-1.414 1.414L10 9.414l-3.293 3.293-1.414-1.414L10 6.586l4.707 4.707zM18 10a8 8 0 1 0-16 0 8 8 0 0 0 16 0z\" fill-rule=\"evenodd\"/>"}; var circlePlus = {"viewBox":"0 0 20 20","body":"<path d=\"M15 11h-4v4H9v-4H5V9h4V5h2v4h4v2zm-5-9a8 8 0 1 0 0 16 8 8 0 0 0 0-16z\" fill-rule=\"evenodd\"/>"}; var conversation = {"viewBox":"0 0 20 20","body":"<path d=\"M13 11h2V9h-2v2zm-4 0h2V9H9v2zm-4 0h2V9H5v2zm5-9c-4.411 0-8 3.589-8 8 0 1.504.425 2.908 1.15 4.111l-1.069 2.495a1 1 0 0 0 1.314 1.313l2.494-1.069A7.939 7.939 0 0 0 10 18c4.411 0 8-3.589 8-8s-3.589-8-8-8z\" fill-rule=\"evenodd\"/>"}; var deleteIcon = {"viewBox":"0 0 20 20","body":"<path d=\"M16 6H4a1 1 0 1 0 0 2h1v9a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V8h1a1 1 0 1 0 0-2zM9 4a1 1 0 1 1 0-2h2a1 1 0 1 1 0 2H9zm2 12h2V8h-2v8zm-4 0h2V8H7v8z\" fill-rule=\"evenodd\"/>"}; var disable = {"viewBox":"0 0 20 20","body":"<path d=\"M10 16a5.961 5.961 0 0 1-3.471-1.115l8.356-8.356A5.961 5.961 0 0 1 16 10c0 3.309-2.691 6-6 6m0-12c1.294 0 2.49.416 3.471 1.115l-8.356 8.356A5.961 5.961 0 0 1 4 10c0-3.309 2.691-6 6-6m0-2c-4.411 0-8 3.589-8 8s3.589 8 8 8 8-3.589 8-8-3.589-8-8-8\" fill-rule=\"evenodd\"/>"}; var dispute = {"viewBox":"0 0 20 20","body":"<path d=\"M9 10h2V6H9v4zm0 4h2v-2H9v2zm-7-4c0 4.411 3.589 8 8 8a7.939 7.939 0 0 0 4.111-1.15l2.494 1.069a1 1 0 0 0 1.314-1.313l-1.069-2.495A7.939 7.939 0 0 0 18 10c0-4.411-3.589-8-8-8s-8 3.589-8 8z\" fill-rule=\"evenodd\"/>"}; var duplicate = {"viewBox":"0 0 20 20","body":"<path d=\"M8 12h8V4H8v8zm4 4H4V8h2v5a1 1 0 0 0 1 1h5v2zm5-14H7a1 1 0 0 0-1 1v3H3a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1v-3h3a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1z\" fill-rule=\"evenodd\"/>"}; var embed = {"viewBox":"0 0 20 20","body":"<path d=\"M17 13a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-3a1 1 0 1 1 2 0v2h12v-2a1 1 0 0 1 1-1zm0-11a1 1 0 0 1 1 1v3a1 1 0 1 1-2 0V4H4v2a1 1 0 1 1-2 0V3a1 1 0 0 1 1-1h14zm.555 7.168a1.001 1.001 0 0 1 0 1.664l-3 2a1 1 0 0 1-1.109-1.664L15.198 10l-1.752-1.168a1 1 0 1 1 1.109-1.664l3 2zM6.832 7.445a1 1 0 0 1-.277 1.387L4.803 10l1.752 1.168a1 1 0 1 1-1.11 1.664l-3-2a1.001 1.001 0 0 1 0-1.664l3-2a1 1 0 0 1 1.387.277zM9 14.001a1 1 0 0 1-.948-1.317l2-6a1 1 0 0 1 1.896.633l-2 6A.999.999 0 0 1 9 14z\" fill-rule=\"evenodd\"/>"}; var exportIcon = {"viewBox":"0 0 20 20","body":"<path d=\"M9.293 13.707l-3-3a.999.999 0 1 1 1.414-1.414L9 10.586V3a1 1 0 1 1 2 0v7.586l1.293-1.293a.999.999 0 1 1 1.414 1.414l-3 3a.999.999 0 0 1-1.414 0zM17 16a1 1 0 1 1 0 2H3a1 1 0 1 1 0-2h14z\"/>"}; var external = {"viewBox":"0 0 20 20","body":"<path d=\"M17 2a1 1 0 0 1 1 1v4a1 1 0 1 1-2 0V5.414l-7.293 7.293a.997.997 0 0 1-1.414 0 .999.999 0 0 1 0-1.414L14.586 4H13a1 1 0 1 1 0-2h4zm-4 9a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5a1 1 0 1 1 0 2H4v8h8v-4a1 1 0 0 1 1-1z\" fill-rule=\"evenodd\"/>"}; var help = {"viewBox":"0 0 20 20","body":"<circle cx=\"10\" cy=\"10\" r=\"9\" fill=\"currentColor\"/><path d=\"M10 0C4.486 0 0 4.486 0 10s4.486 10 10 10 10-4.486 10-10S15.514 0 10 0m0 18c-4.411 0-8-3.589-8-8s3.589-8 8-8 8 3.589 8 8-3.589 8-8 8m0-4a1 1 0 1 0 0 2 1 1 0 1 0 0-2m0-10C8.346 4 7 5.346 7 7a1 1 0 1 0 2 0 1.001 1.001 0 1 1 1.591.808C9.58 8.548 9 9.616 9 10.737V11a1 1 0 1 0 2 0v-.263c0-.653.484-1.105.773-1.317A3.013 3.013 0 0 0 13 7c0-1.654-1.346-3-3-3\" />"}; var horizontalDots = {"viewBox":"0 0 20 20","body":"<path d=\"M6 10a2 2 0 1 1-4.001-.001A2 2 0 0 1 6 10zm6 0a2 2 0 1 1-4.001-.001A2 2 0 0 1 12 10zm6 0a2 2 0 1 1-4.001-.001A2 2 0 0 1 18 10z\" fill-rule=\"evenodd\"/>"}; var importIcon = {"viewBox":"0 0 20 20","body":"<path d=\"M13.707 6.707a.997.997 0 0 1-1.414 0L11 5.414V13a1 1 0 1 1-2 0V5.414L7.707 6.707a.999.999 0 1 1-1.414-1.414l3-3a.999.999 0 0 1 1.414 0l3 3a.999.999 0 0 1 0 1.414zM17 18H3a1 1 0 1 1 0-2h14a1 1 0 1 1 0 2z\"/>"}; var notes = {"viewBox":"0 0 20 20","body":"<path d=\"M6 11h8V9H6v2zm0 4h8v-2H6v2zm0-8h4V5H6v2zm9.707-1.707l-3-3A.996.996 0 0 0 12 2H5a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V6a.997.997 0 0 0-.293-.707z\" fill-rule=\"evenodd\"/>"}; var notification = {"viewBox":"0 0 20 20","body":"<path d=\"M16 8c0-2.967-2.167-5.432-5-5.91V1a1 1 0 1 0-2 0v1.09C6.167 2.568 4 5.033 4 8c0 2.957 0 4.586-1.707 6.293A1 1 0 0 0 3 16h4.183A2.909 2.909 0 0 0 7 17c0 1.654 1.345 3 3 3s3-1.346 3-3c0-.353-.07-.687-.184-1H17a1 1 0 0 0 .707-1.707C16 12.586 16 10.957 16 8zM5.011 14C6 12.208 6 10.285 6 8c0-2.206 1.794-4 4-4s4 1.794 4 4c0 2.285 0 4.208.989 6H5.011zM11 17a1.001 1.001 0 0 1-2 0 1 1 0 0 1 2 0z\"/>"}; var print = {"viewBox":"0 0 20 20","body":"<path d=\"M14 11h2V9h-2v2zM7 7h6V4H7v3zm0 9h6v-2H7v2zm10-9h-2V3a1 1 0 0 0-1-1H6a1 1 0 0 0-1 1v4H3a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h2v1a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h2a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1z\" fill-rule=\"evenodd\"/>"}; var subtract = {"viewBox":"0 0 20 20","body":"<path d=\"M15 9H5a1 1 0 1 0 0 2h10a1 1 0 1 0 0-2\" fill-rule=\"evenodd\"/>"}; var refresh = {"viewBox":"0 0 20 20","body":"<path d=\"M17 11a1 1 0 0 1 1 1c0 1.654-1.346 3-3 3H5.414l1.293 1.293a.999.999 0 1 1-1.414 1.414l-3-3a.999.999 0 0 1 0-1.414l3-3a.999.999 0 1 1 1.414 1.414L5.414 13H15c.552 0 1-.449 1-1a1 1 0 0 1 1-1zM3 9a1 1 0 0 1-1-1c0-1.654 1.346-3 3-3h9.586l-1.293-1.293a.999.999 0 1 1 1.414-1.414l3 3a.999.999 0 0 1 0 1.414l-3 3a.997.997 0 0 1-1.414 0 .999.999 0 0 1 0-1.414L14.586 7H5c-.552 0-1 .449-1 1a1 1 0 0 1-1 1z\" fill-rule=\"evenodd\"/>"}; var risk = {"viewBox":"0 0 20 20","body":"<path d=\"M9 12h2V8H9v4zm0 4h2v-2H9v2zm8.895.509l-7-14c-.339-.678-1.451-.678-1.79 0l-7 14A.999.999 0 0 0 3 17.956h14a1.001 1.001 0 0 0 .895-1.447z\" fill-rule=\"evenodd\"/>"}; var save = {"viewBox":"0 0 20 20","body":"<path d=\"M17 4h-3a1 1 0 1 0 0 2h2v10H4V4h3.586L9 5.414v5.172L7.707 9.293a1 1 0 0 0-1.414 1.414l3 3a.996.996 0 0 0 1.414 0l3-3a1 1 0 0 0-1.414-1.414L11 10.586V5a.997.997 0 0 0-.293-.707l-2-2A.994.994 0 0 0 8 2H3a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1z\"/>"}; var search = {"viewBox":"0 0 20 20","body":"<path d=\"M8 12a4 4 0 1 1 0-8 4 4 0 0 1 0 8m9.707 4.293l-4.82-4.82A5.968 5.968 0 0 0 14 8 6 6 0 0 0 2 8a6 6 0 0 0 6 6 5.968 5.968 0 0 0 3.473-1.113l4.82 4.82a.997.997 0 0 0 1.414 0 .999.999 0 0 0 0-1.414\" fill-rule=\"evenodd\"/>"}; var view = {"viewBox":"0 0 20 20","body":"<path d=\"M17.928 9.628C17.836 9.399 15.611 4 9.999 4S2.162 9.399 2.07 9.628a1.017 1.017 0 0 0 0 .744C2.162 10.601 4.387 16 9.999 16s7.837-5.399 7.929-5.628a1.017 1.017 0 0 0 0-.744zM9.999 14a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm0-6A2 2 0 1 0 10 12.001 2 2 0 0 0 10 8z\"/>"}; var styles$2 = { "Icon": "Polaris-Icon", "hasBackdrop": "Polaris-Icon--hasBackdrop", "colorWhite": "Polaris-Icon--colorWhite", "colorBlack": "Polaris-Icon--colorBlack", "colorSkyLighter": "Polaris-Icon--colorSkyLighter", "colorSkyLight": "Polaris-Icon--colorSkyLight", "colorSky": "Polaris-Icon--colorSky", "colorSkyDark": "Polaris-Icon--colorSkyDark", "colorInkLightest": "Polaris-Icon--colorInkLightest", "colorInkLighter": "Polaris-Icon--colorInkLighter", "colorInkLight": "Polaris-Icon--colorInkLight", "colorInk": "Polaris-Icon--colorInk", "colorBlueLighter": "Polaris-Icon--colorBlueLighter", "colorBlueLight": "Polaris-Icon--colorBlueLight", "colorBlue": "Polaris-Icon--colorBlue", "colorBlueDark": "Polaris-Icon--colorBlueDark", "colorBlueDarker": "Polaris-Icon--colorBlueDarker", "colorIndigoLighter": "Polaris-Icon--colorIndigoLighter", "colorIndigoLight": "Polaris-Icon--colorIndigoLight", "colorIndigo": "Polaris-Icon--colorIndigo", "colorIndigoDark": "Polaris-Icon--colorIndigoDark", "colorIndigoDarker": "Polaris-Icon--colorIndigoDarker", "colorTealLighter": "Polaris-Icon--colorTealLighter", "colorTealLight": "Polaris-Icon--colorTealLight", "colorTeal": "Polaris-Icon--colorTeal", "colorTealDark": "Polaris-Icon--colorTealDark", "colorTealDarker": "Polaris-Icon--colorTealDarker", "colorGreenLighter": "Polaris-Icon--colorGreenLighter", "colorGreen": "Polaris-Icon--colorGreen", "colorGreenDark": "Polaris-Icon--colorGreenDark", "colorYellowLighter": "Polaris-Icon--colorYellowLighter", "colorYellow": "Polaris-Icon--colorYellow", "colorYellowDark": "Polaris-Icon--colorYellowDark", "colorOrange": "Polaris-Icon--colorOrange", "colorOrangeDark": "Polaris-Icon--colorOrangeDark", "colorRedLighter": "Polaris-Icon--colorRedLighter", "colorRed": "Polaris-Icon--colorRed", "colorRedDark": "Polaris-Icon--colorRedDark", "colorPurple": "Polaris-Icon--colorPurple", "Svg": "Polaris-Icon__Svg", "Placeholder": "Polaris-Icon__Placeholder", "skeletonShimmerAnimation": "Polaris-Icon--skeletonShimmerAnimation", }; var BUNDLED_ICONS = { add: add, alert: alert, arrowDown: arrowDown, arrowLeft: arrowLeft, arrowRight: arrowRight, arrowUp: arrowUp, arrowUpDown: arrowUpDown, calendar: calendar, cancel: cancel, cancelSmall: cancelSmall, caretDown: caretDown, caretUp: caretUp, checkmark: checkmark, chevronDown: chevronDown, chevronLeft: chevronLeft, chevronRight: chevronRight, chevronUp: chevronUp, circleCancel: circleCancel, circleChevronDown: circleChevronDown, circleChevronLeft: circleChevronLeft, circleChevronRight: circleChevronRight, circleChevronUp: circleChevronUp, circlePlus: circlePlus, conversation: conversation, delete: deleteIcon, disable: disable, dispute: dispute, duplicate: duplicate, embed: embed, export: exportIcon, external: external, help: help, horizontalDots: horizontalDots, import: importIcon, notes: notes, notification: notification, print: print, refresh: refresh, risk: risk, save: save, search: search, subtract: subtract, view: view }; var COLORS_WITH_BACKDROPS = ['teal', 'tealDark', 'greenDark', 'redDark', 'yellowDark', 'ink', 'inkLighter']; function Icon$1(_ref) { var source = _ref.source, color = _ref.color, backdrop = _ref.backdrop, accessibilityLabel = _ref.accessibilityLabel; if (color && backdrop && COLORS_WITH_BACKDROPS.indexOf(color) < 0) { // tslint:disable-next-line no-console console.warn('The ' + color + ' icon doesn\u2019t accept backdrops. The icon colors that have backdrops are: ' + COLORS_WITH_BACKDROPS.join(', ')); } var className = classNames(styles$2.Icon, color && styles$2[variationName('color', color)], backdrop && styles$2.hasBackdrop); var contentMarkup = void 0; if (source === 'placeholder') { contentMarkup = createElement('div', { className: styles$2.Placeholder }); } else { var iconSource = typeof source === 'string' ? BUNDLED_ICONS[source] : source; contentMarkup = createElement('svg', { className: styles$2.Svg, viewBox: iconSource.viewBox, dangerouslySetInnerHTML: { __html: iconSource.body } }); } return createElement( 'span', { className: className, 'aria-label': accessibilityLabel }, contentMarkup ); } var styles$3 = { "Spinner": "Polaris-Spinner", "loading": "Polaris-Spinner--loading", "sizeSmall": "Polaris-Spinner--sizeSmall", "sizeLarge": "Polaris-Spinner--sizeLarge", "colorWhite": "Polaris-Spinner--colorWhite", "colorTeal": "Polaris-Spinner--colorTeal", "colorInkLightest": "Polaris-Spinner--colorInkLightest", "skeletonShimmerAnimation": "Polaris-Spinner--skeletonShimmerAnimation", }; var spinnerSVGLarge = {"viewBox":"0 0 44 44","body":"<path d=\"M15.542 1.487A21.507 21.507 0 0 0 .5 22c0 11.874 9.626 21.5 21.5 21.5 9.847 0 18.364-6.675 20.809-16.072a1.5 1.5 0 0 0-2.904-.756C37.803 34.755 30.473 40.5 22 40.5 11.783 40.5 3.5 32.217 3.5 22c0-8.137 5.3-15.247 12.942-17.65a1.5 1.5 0 1 0-.9-2.863z\" />"}; var spinnerSVGSmall = {"viewBox":"0 0 20 20","body":"<path d=\"M7.229 1.173a9.25 9.25 0 1 0 11.655 11.412 1.25 1.25 0 1 0-2.4-.698 6.75 6.75 0 1 1-8.506-8.329 1.25 1.25 0 1 0-.75-2.385z\" />"}; var COLORS_FOR_LARGE_SPINNER = ['teal', 'inkLightest']; function Spinner$1(_ref) { var _ref$size = _ref.size, size = _ref$size === undefined ? 'large' : _ref$size, _ref$color = _ref.color, color = _ref$color === undefined ? 'teal' : _ref$color, accessibilityLabel = _ref.accessibilityLabel; if (size === 'large' && COLORS_FOR_LARGE_SPINNER.indexOf(color) < 0) { if (process.env.NODE_ENV === 'development') { // tslint:disable-next-line no-console console.warn('The color ' + color + ' is not meant to be used on ' + size + ' spinners. The colors available on large spinners are: ' + COLORS_FOR_LARGE_SPINNER.join(', ')); } size = 'small'; } var className = classNames(styles$3.Spinner, color && styles$3[variationName('color', color)], size && styles$3[variationName('size', size)]); var spinnerSVG = size === 'large' ? spinnerSVGLarge : spinnerSVGSmall; return createElement('svg', { viewBox: spinnerSVG.viewBox, dangerouslySetInnerHTML: { __html: spinnerSVG.body }, className: className, 'aria-label': accessibilityLabel, role: 'status' }); } var styles$4 = { "Button": "Polaris-Button", "disabled": "Polaris-Button--disabled", "Content": "Polaris-Button__Content", "Icon": "Polaris-Button__Icon", "Spinner": "Polaris-Button__Spinner", "primary": "Polaris-Button--primary", "destructive": "Polaris-Button--destructive", "outline": "Polaris-Button--outline", "loading": "Polaris-Button--loading", "plain": "Polaris-Button--plain", "fullWidth": "Polaris-Button--fullWidth", "sizeSlim": "Polaris-Button--sizeSlim", "sizeLarge": "Polaris-Button--sizeLarge", "iconOnly": "Polaris-Button--iconOnly", "skeletonShimmerAnimation": "Polaris-Button--skeletonShimmerAnimation", }; function Button$1(_ref) { var url = _ref.url, disabled = _ref.disabled, loading = _ref.loading, children = _ref.children, accessibilityLabel = _ref.accessibilityLabel, ariaControls = _ref.ariaControls, ariaExpanded = _ref.ariaExpanded, onClick = _ref.onClick, onFocus = _ref.onFocus, onBlur = _ref.onBlur, external = _ref.external, icon = _ref.icon, primary = _ref.primary, outline = _ref.outline, destructive = _ref.destructive, disclosure = _ref.disclosure, plain = _ref.plain, submit = _ref.submit, size = _ref.size, fullWidth = _ref.fullWidth; var isDisabled = disabled || loading; var className = classNames$1(styles$4.Button, primary && styles$4.primary, outline && styles$4.outline, destructive && styles$4.destructive, isDisabled && styles$4.disabled, loading && styles$4.loading, plain && styles$4.plain, size && styles$4[variationName$1('size', size)], fullWidth && styles$4.fullWidth, icon && children == null && styles$4.iconOnly); var disclosureIconMarkup = disclosure ? createElement( 'span', { className: styles$4.Icon }, createElement(Icon$1, { source: loading ? 'placeholder' : 'caretDown' }) ) : null; var iconMarkup = icon ? createElement( 'span', { className: styles$4.Icon }, createElement(Icon$1, { source: loading ? 'placeholder' : icon }) ) : null; var childMarkup = children ? createElement( 'span', null, children ) : null; var spinnerColor = primary || destructive ? 'white' : 'inkLightest'; var spinnerSVGMarkup = loading ? createElement( 'span', { className: styles$4.Spinner }, createElement(Spinner$1, { size: 'small', color: spinnerColor, accessibilityLabel: 'Loading' }) ) : null; var content = iconMarkup || disclosureIconMarkup ? createElement( 'span', { className: styles$4.Content }, spinnerSVGMarkup, iconMarkup, childMarkup, disclosureIconMarkup ) : createElement( 'span', { className: styles$4.Content }, spinnerSVGMarkup, childMarkup ); var type = submit ? 'submit' : 'button'; return url ? createElement( UnstyledLink$1, { url: url, external: external, onClick: onClick, onFocus: onFocus, onBlur: onBlur, onMouseUp: handleMouseUpByBlurring, className: className, disabled: isDisabled, 'aria-label': accessibilityLabel }, content ) : createElement( 'button', { type: type, onClick: onClick, onFocus: onFocus, onBlur: onBlur, onMouseUp: handleMouseUpByBlurring, className: className, disabled: isDisabled, 'aria-label': accessibilityLabel, 'aria-controls': ariaControls, 'aria-expanded': ariaExpanded, role: loading ? 'alert' : undefined, 'aria-busy': loading ? true : undefined }, content ); } function buttonsFrom(actions) { var overrides = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; if (Array.isArray(actions)) { return actions.map(function (action, index) { return buttonFrom(action, overrides, index); }); } else { var action = actions; return buttonFrom(action, overrides); } } function buttonFrom(_a, overrides, key) { var content = _a.content, onAction = _a.onAction, action = __rest(_a, ["content", "onAction"]); return createElement(Button$1, Object.assign({ key: key, children: content, onClick: onAction }, action, overrides)); } var styles$5 = { "ButtonGroup": "Polaris-ButtonGroup", "segmented": "Polaris-ButtonGroup--segmented", "Item": "Polaris-ButtonGroup__Item", "Item-focused": "Polaris-ButtonGroup__Item--focused", "Item-plain": "Polaris-ButtonGroup__Item--plain", "skeletonShimmerAnimation": "Polaris-ButtonGroup--skeletonShimmerAnimation", }; var Item = function (_React$PureComponent) { _inherits(Item, _React$PureComponent); function Item() { _classCallCheck(this, Item); var _this = _possibleConstructorReturn(this, (Item.__proto__ || Object.getPrototypeOf(Item)).apply(this, arguments)); _this.state = { focused: false }; return _this; } _createClass(Item, [{ key: 'render', value: function render() { var button = this.props.button; var focused = this.state.focused; var className = classNames(styles$5.Item, focused && styles$5['Item-focused'], button.props.plain && styles$5['Item-plain']); return createElement( 'div', { className: className, onFocus: this.handleFocus, onBlur: this.handleBlur }, button ); } }, { key: 'handleFocus', value: function handleFocus() { this.setState({ focused: true }); } }, { key: 'handleBlur', value: function handleBlur() { this.setState({ focused: false }); } }]); return Item; }(PureComponent); __decorate([autobind], Item.prototype, "handleFocus", null); __decorate([autobind], Item.prototype, "handleBlur", null); function ButtonGroup$1(_ref) { var children = _ref.children, segmented = _ref.segmented; var className = classNames(styles$5.ButtonGroup, segmented && styles$5.segmented); var contents = elementChildren(children).map(function (child, index) { return createElement(Item, { button: child, key: index }); }); return createElement( 'div', { className: className }, contents ); } var styles$6 = { "Stack": "Polaris-Stack", "Item": "Polaris-Stack__Item", "noWrap": "Polaris-Stack--noWrap", "vertical": "Polaris-Stack--vertical", "spacingNone": "Polaris-Stack--spacingNone", "spacingExtraTight": "Polaris-Stack--spacingExtraTight", "spacingTight": "Polaris-Stack--spacingTight", "spacingLoose": "Polaris-Stack--spacingLoose", "spacingExtraLoose": "Polaris-Stack--spacingExtraLoose", "distributionLeading": "Polaris-Stack--distributionLeading", "distributionTrailing": "Polaris-Stack--distributionTrailing", "distributionCenter": "Polaris-Stack--distributionCenter", "distributionEqualSpacing": "Polaris-Stack--distributionEqualSpacing", "distributionFill": "Polaris-Stack--distributionFill", "distributionFillEvenly": "Polaris-Stack--distributionFillEvenly", "alignmentLeading": "Polaris-Stack--alignmentLeading", "alignmentTrailing": "Polaris-Stack--alignmentTrailing", "alignmentCenter": "Polaris-Stack--alignmentCenter", "alignmentFill": "Polaris-Stack--alignmentFill", "alignmentBaseline": "Polaris-Stack--alignmentBaseline", "Item-fill": "Polaris-Stack__Item--fill", "skeletonShimmerAnimation": "Polaris-Stack--skeletonShimmerAnimation", }; function Item$2(_ref) { var children = _ref.children, fill = _ref.fill; var className = classNames(styles$6.Item, fill && styles$6['Item-fill']); return createElement( 'div', { className: className }, children ); } var Stack$1 = function (_React$PureComponent) { _inherits(Stack, _React$PureComponent); function Stack() { _classCallCheck(this, Stack); return _possibleConstructorReturn(this, (Stack.__proto__ || Object.getPrototypeOf(Stack)).apply(this, arguments)); } _createClass(Stack, [{ key: 'render', value: function render() { var _props = this.props, children = _props.children, vertical = _props.vertical, spacing = _props.spacing, distribution = _props.distribution, alignment = _props.alignment, wrap = _props.wrap; var className = classNames(styles$6.Stack, vertical && styles$6.vertical, spacing && styles$6[variationName('spacing', spacing)], distribution && styles$6[variationName('distribution', distribution)], alignment && styles$6[variationName('alignment', alignment)], wrap === false && styles$6.noWrap); var itemMarkup = elementChildren(children).map(function (child, index) { var props = { key: index }; return wrapWithComponent(child, Item$2, props); }); return createElement( 'div', { className: className }, itemMarkup ); } }]); return Stack; }(PureComponent); Stack$1.Item = Item$2; var styles$7 = { "Heading": "Polaris-Heading", "skeletonShimmerAnimation": "Polaris-Heading--skeletonShimmerAnimation", }; function Heading$1(_ref) { var _ref$element = _ref.element, Element = _ref$element === undefined ? 'h2' : _ref$element, children = _ref.children; return createElement( Element, { className: styles$7.Heading }, children ); } var styles$8 = { "Card": "Polaris-Card", "subdued": "Polaris-Card--subdued", "Header": "Polaris-Card__Header", "Section": "Polaris-Card__Section", "Section-subdued": "Polaris-Card__Section--subdued", "SectionHeader": "Polaris-Card__SectionHeader", "Footer": "Polaris-Card__Footer", "skeletonShimmerAnimation": "Polaris-Card--skeletonShimmerAnimation", }; function Header(_ref) { var children = _ref.children, actions = _ref.actions; var actionMarkup = actions ? createElement( ButtonGroup$1, null, buttonsFrom(actions, { plain: true }) ) : null; var headingMarkup = actionMarkup ? createElement( Stack$1, { alignment: 'baseline' }, createElement( Stack$1.Item, { fill: true }, createElement( Heading$1, null, children ) ), actionMarkup ) : createElement( Heading$1, null, children ); return createElement( 'div', { className: styles$8.Header }, headingMarkup ); } var styles$9 = { "Subheading": "Polaris-Subheading", "skeletonShimmerAnimation": "Polaris-Subheading--skeletonShimmerAnimation", }; function Subheading$1(_ref) { var _ref$element = _ref.element, Element = _ref$element === undefined ? 'h3' : _ref$element, children = _ref.children; var ariaLabel = typeof children === 'string' ? children : null; return createElement( Element, { 'aria-label': ariaLabel, className: styles$9.Subheading }, children ); } function Section(_ref) { var children = _ref.children, title = _ref.title, subdued = _ref.subdued; var headerContent = title ? createElement( 'div', { className: styles$8.SectionHeader }, createElement( Subheading$1, null, title ) ) : null; var className = classNames(styles$8.Section, subdued && styles$8['Section-subdued']); return createElement( 'div', { className: className }, headerContent, children ); } var Card$1 = function (_React$PureComponent) { _inherits(Card, _React$PureComponent); function Card() { _classCallCheck(this, Card); return _possibleConstructorReturn(this, (Card.__proto__ || Object.getPrototypeOf(Card)).apply(this, arguments)); } _createClass(Card, [{ key: 'render', value: function render() { var _props = this.props, children = _props.children, title = _props.title, subdued = _props.subdued, sectioned =