@salesforce-ux/design-system
Version:
Salesforce Lightning Design System
1 lines • 31.1 kB
JavaScript
var SLDS;!function(){"use strict";var e,t={547:function(e,t,o){o.r(t),o.d(t,{Context:function(){return pe},default:function(){return ye},states:function(){return he}});var n=o(1594),r=o.n(n),i=o(942),a=o.n(i),s=o(4187),l=o.n(s),c=o(6955),u=o(2937),d=o(5006),f={item1:{username:"Val Handerly",avatar:"/assets/images/avatar2.jpg",title:"mentioned you",message:"@jrogers Could I please have a review on my presentation deck",timestamp:"10 hours ago",unread:!0},item2:{username:"Jon Rogers",avatar:"/assets/images/avatar3.jpg",title:"commented on your post",message:"I totally agree with your sentiment",timestamp:"13 hours ago",unread:!0},item3:{username:"Rebecca Stone",avatar:"/assets/images/avatar2.jpg",title:"mentioned you",message:"@jrogers Here's the conversation I mentioned to you",timestamp:"1 day ago",unread:!1}};function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function b(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,p(n.key),n)}}function p(e){var t=function(e){if("object"!=m(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=m(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==m(t)?t:t+""}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(y=function(){return!!e})()}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}var _=function(e){return r().createElement("li",{className:a()("slds-global-header__notification",e.unread&&"slds-global-header__notification_unread",e.className),key:e.index},r().createElement("div",{className:"slds-media slds-has-flexi-truncate slds-p-around_x-small"},r().createElement("div",{className:"slds-media__figure"},r().createElement(u.Avatar,{className:"slds-avatar_small"},r().createElement("img",{alt:e.username,src:e.avatar,title:"".concat(e.username," avatar")}))),r().createElement("div",{className:"slds-media__body"},r().createElement("div",{className:"slds-grid slds-grid_align-spread"},r().createElement("a",{href:"#",onClick:function(e){return e.preventDefault()},className:"slds-text-link_reset slds-has-flexi-truncate"},r().createElement("h3",{className:"slds-truncate",title:"".concat(e.username," ").concat(e.title)},r().createElement("strong",null,"".concat(e.username," ").concat(e.title))),r().createElement("p",{className:"slds-truncate",title:e.message},e.message),r().createElement("p",{className:"slds-m-top_x-small slds-text-color_weak"},e.timestamp,e.unread&&r().createElement("abbr",{className:"slds-text-link slds-m-horizontal_xxx-small",title:"unread"},"●")))))))},g=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,o){return t=h(t),function(e,t){if(t&&("object"==m(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,y()?Reflect.construct(t,o||[],h(e).constructor):t.apply(e,o))}(this,t)).renderNotificationItems=e.renderNotificationItems.bind(e),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(t,e),o=t,(n=[{key:"renderNotificationItems",value:function(e){var t=f[e];return r().createElement(_,{key:e,index:e,avatar:t.avatar,username:t.username,title:t.title,message:t.message,timestamp:t.timestamp,unread:t.unread})}},{key:"render",value:function(){return r().createElement(d.Popover,{className:"slds-popover_large slds-nubbin_top-right",bodyClassName:"slds-p-around_none",headerTitle:"Notifications",closeButton:!0,style:{position:"absolute",top:"calc(100% + 12px)",right:"-12px"}},r().createElement("ul",null,Object.keys(f).map(this.renderNotificationItems)))}}])&&b(o.prototype,n),Object.defineProperty(o,"prototype",{writable:!1}),o;var o,n}(n.Component),w=o(1187);function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function x(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,N(n.key),n)}}function N(e){var t=function(e){if("object"!=E(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=E(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==E(t)?t:t+""}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(S=function(){return!!e})()}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}var P=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,o){return t=O(t),function(e,t){if(t&&("object"==E(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,S()?Reflect.construct(t,o||[],O(e).constructor):t.apply(e,o))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}(t,e),o=t,(n=[{key:"render",value:function(){return r().createElement(d.Popover,{className:"slds-nubbin_top slds-dynamic-menu",bodyClassName:"slds-p-horizontal_none",title:"My Favorites",footer:r().createElement(w.Footer,null),style:{position:"absolute",left:"-8rem",top:"36px"}},r().createElement(w.ListboxList,{length:this.props.numberOfFavorites}))}}])&&x(o.prototype,n),Object.defineProperty(o,"prototype",{writable:!1}),o;var o,n}(n.Component),I=P,C=o(4760),T=o(8522);function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function A(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,F(n.key),n)}}function F(e){var t=function(e){if("object"!=k(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=k(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==k(t)?t:t+""}function D(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(D=function(){return!!e})()}function L(e){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},L(e)}function M(e,t){return M=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},M(e,t)}var R=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,o){return t=L(t),function(e,t){if(t&&("object"==k(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,D()?Reflect.construct(t,o||[],L(e).constructor):t.apply(e,o))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&M(e,t)}(t,e),o=t,(n=[{key:"render",value:function(){return r().createElement(C.Menu,{className:"slds-dropdown_right slds-nubbin_top-right",style:{right:"-1rem"}},r().createElement(C.MenuList,null,r().createElement(C.MenuItem,{iconLeft:r().createElement(T.StandardIcon,{containerClassName:"slds-m-right_x-small",className:"slds-icon_small",symbol:"event"}),tabIndex:"0"},"New Event"),r().createElement(C.MenuItem,{iconLeft:r().createElement(T.StandardIcon,{containerClassName:"slds-m-right_x-small",className:"slds-icon_small",symbol:"note"}),tabIndex:"0"},"New Note"),r().createElement(C.MenuItem,{iconLeft:r().createElement(T.StandardIcon,{containerClassName:"slds-m-right_x-small",className:"slds-icon_small",symbol:"email"}),tabIndex:"0"},"New Email")))}}])&&A(o.prototype,n),Object.defineProperty(o,"prototype",{writable:!1}),o;var o,n}(n.Component),q=R;function B(e){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B(e)}function U(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,H(n.key),n)}}function H(e){var t=function(e){if("object"!=B(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=B(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==B(t)?t:t+""}function V(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(V=function(){return!!e})()}function z(e){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},z(e)}function G(e,t){return G=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},G(e,t)}var J=function(e){return r().createElement("div",{className:"slds-global-actions__favorites slds-dropdown-trigger slds-dropdown-trigger_click"},r().createElement("div",{className:"slds-button-group"},r().createElement(c.A,{className:a()("slds-global-actions__favorites-action slds-button_icon slds-button_icon-border slds-button_icon-small",{"slds-is-disabled":e.favoritesDisabled,"slds-is-selected":e.favoritesClicked}),disabled:e.favoritesDisabled,"aria-pressed":e.favoritesClicked?"true":"false",symbol:"favorite",title:"Toggle Favorites",assistiveText:"Toggle Favorite",onClick:function(){return e.toggleFavorite()}}),r().createElement(c.A,{className:a()("slds-global-actions__favorites-more slds-button_icon slds-button_icon-border slds-button_icon-small"),iconClassName:"slds-button__icon_small",symbol:"down",title:"View Favorites",assistiveText:"View Favorites"})),e.showFavoritesPopup&&r().createElement(I,{numberOfFavorites:2}))};J.propTypes={favoritesDisabled:l().bool,favoritesClicked:l().bool,showFavoritesPopup:l().bool};var Y=function(e){return r().createElement("div",{className:a()("slds-dropdown-trigger slds-dropdown-trigger_click",e.showTaskMenu&&"slds-is-open")},r().createElement(c.A,{className:"slds-button_icon slds-button_icon-container slds-button_icon-small slds-global-actions__task slds-global-actions__item-action","aria-haspopup":"true",symbol:"add",title:"Global Actions",assistiveText:"Global Actions"}),e.showTaskMenu&&r().createElement(q,null))};Y.propTypes={showTaskMenu:l().bool};var K=function(){return r().createElement("div",{className:"slds-dropdown-trigger slds-dropdown-trigger_click"},r().createElement(c.A,{className:"slds-button_icon slds-button_icon-container slds-button_icon-small slds-global-actions__help slds-global-actions__item-action",iconClassName:"slds-global-header__icon","aria-haspopup":"true",symbol:"question",title:"Help and Training",assistiveText:"Help and Training"}))},Q=function(){return r().createElement("div",{className:"slds-dropdown-trigger slds-dropdown-trigger_click"},r().createElement(c.A,{className:"slds-button_icon slds-button_icon-container slds-button_icon-small slds-global-actions__setup slds-global-actions__item-action",iconClassName:"slds-global-header__icon","aria-haspopup":"true",symbol:"setup",title:"Setup",assistiveText:"Setup"}))},$=function(e){var t=e.notificationCount?"".concat(e.notificationCount," new notifications"):"no new notifications";return r().createElement("div",{className:a()("slds-dropdown-trigger slds-dropdown-trigger_click",e.showNotificationPopup&&"slds-is-open")},r().createElement(c.A,{className:a()("slds-button_icon slds-button_icon-container slds-button_icon-small slds-global-actions__notifications slds-global-actions__item-action",{"slds-incoming-notification":e.showNotification&&e.notificationCount}),iconClassName:"slds-global-header__icon",symbol:"notification",title:t,assistiveText:t,"aria-live":"assertive","aria-atomic":"true"}),r().createElement("span",{"aria-hidden":"true",className:a()("slds-notification-badge",e.notificationCount&&"slds-incoming-notification",e.showNotification&&"slds-show-notification")},e.notificationCount),e.showNotificationPopup&&r().createElement(g,null))};$.propTypes={notificationCount:l().oneOfType([l().string,l().number]),showNotificationPopup:l().bool};var W=function(){return r().createElement("div",{className:"slds-dropdown-trigger slds-dropdown-trigger_click"},r().createElement("button",{className:"slds-button slds-global-actions__avatar slds-global-actions__item-action",title:"person name","aria-haspopup":"true"},r().createElement("span",{className:"slds-avatar slds-avatar_circle slds-avatar_medium"},r().createElement("img",{alt:"Person name",src:"/assets/images/avatar2.jpg",title:"User avatar"}))))},X=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,o){return t=z(t),function(e,t){if(t&&("object"==B(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,V()?Reflect.construct(t,o||[],z(e).constructor):t.apply(e,o))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&G(e,t)}(t,e),o=t,(n=[{key:"render",value:function(){var e=this.props,t=e.toggleFavorite,o=e.favoritesClicked,n=e.favoritesDisabled,i=e.showFavoritesPopup,a=e.showNotification,s=e.notificationCount,l=e.showNotificationPopup,c=e.showTaskMenu;return r().createElement("ul",{className:"slds-global-actions"},r().createElement("li",{className:"slds-global-actions__item"},r().createElement(J,{toggleFavorite:t,favoritesClicked:o,favoritesDisabled:n,showFavoritesPopup:i})),r().createElement("li",{className:"slds-global-actions__item"},r().createElement(Y,{showTaskMenu:c})),r().createElement("li",{className:"slds-global-actions__item"},r().createElement(K,null)),r().createElement("li",{className:"slds-global-actions__item"},r().createElement(Q,null)),r().createElement("li",{className:"slds-global-actions__item"},r().createElement($,{showNotification:a,notificationCount:s,showNotificationPopup:l})),r().createElement("li",{className:"slds-global-actions__item"},r().createElement(W,null)))}}])&&U(o.prototype,n),Object.defineProperty(o,"prototype",{writable:!1}),o;var o,n}(r().Component);X.propTypes={favoritesClicked:l().bool,favoritesDisabled:l().bool,showFavoritesPopup:l().bool,showNotification:l().bool,notificationCount:l().oneOfType([l().string,l().number]),showNotificationPopup:l().bool,showTaskMenu:l().bool};var Z=X;function ee(e){return ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ee(e)}function te(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,oe(n.key),n)}}function oe(e){var t=function(e){if("object"!=ee(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=ee(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ee(t)?t:t+""}function ne(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ne=function(){return!!e})()}function re(e){return re=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},re(e)}function ie(e,t){return ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ie(e,t)}var ae=function(){return r().createElement(r().Fragment,null,r().createElement("a",{href:"#",className:"slds-assistive-text slds-assistive-text_focus",onClick:function(e){return e.preventDefault()}},"Skip to Navigation"),r().createElement("a",{href:"#",className:"slds-assistive-text slds-assistive-text_focus",onClick:function(e){return e.preventDefault()}},"Skip to Main Content"))},se=function(){return r().createElement("div",{className:"slds-global-header__logo"},r().createElement("span",{className:"slds-assistive-text"},"Salesforce"))},le=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,o){return t=re(t),function(e,t){if(t&&("object"==ee(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ne()?Reflect.construct(t,o||[],re(e).constructor):t.apply(e,o))}(this,t)).toggleFavorite=e.toggleFavorite.bind(e),e.showNotification=e.showNotification.bind(e),e.showIncomingNotification=e.showIncomingNotification.bind(e),e.state={favoritesClicked:!1,showNotification:!1,notificationCount:0},e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ie(e,t)}(t,e),o=t,(n=[{key:"toggleFavorite",value:function(){this.setState({favoritesClicked:!this.state.favoritesClicked})}},{key:"showNotification",value:function(){this.setState({showNotification:!this.state.showNotification,notificationCount:1})}},{key:"showIncomingNotification",value:function(){this.setState({notificationCount:++this.state.notificationCount})}},{key:"render",value:function(){var e=this;return r().createElement("header",{className:a()("slds-global-header_container",this.props.className)},r().createElement(ae,null),r().createElement("div",{className:"slds-global-header slds-grid slds-grid_align-spread"},r().createElement("div",{className:"slds-global-header__item"},r().createElement(se,null)),!this.props.playground&&r().createElement("div",{className:"slds-global-header__item slds-global-header__item_search"},this.props.globalSearch),r().createElement("div",{className:"slds-global-header__item"},r().createElement(Z,{toggleFavorite:this.toggleFavorite,favoritesClicked:this.state.favoritesClicked,favoritesDisabled:this.props.favoritesDisabled,showFavoritesPopup:this.props.showFavoritesPopup,showNotification:this.state.showNotification,notificationCount:this.state.notificationCount,showNotificationPopup:this.props.showNotificationPopup,showTaskMenu:this.props.showTaskMenu}))),this.props.playground&&r().createElement("div",{className:"slds-button-group slds-m-around_medium"},r().createElement("button",{className:"slds-button slds-button_neutral",onClick:function(){return e.showNotification()}},"Toggle Notification"),r().createElement("button",{className:"slds-button slds-button_neutral",onClick:function(){return e.showIncomingNotification()}},"Increase count")))}}])&&te(o.prototype,n),Object.defineProperty(o,"prototype",{writable:!1}),o;var o,n}(n.Component),ce=o(5159),ue=o(5786),de=o(6185),fe=o(538),me={option0:{name:"Recent Items",label:!0},option1:{name:"Salesforce - 1,000 Licenses",entityMeta:!0,entityType:"Opportunity",entityField:"Propecting"},option2:{name:"Art Vandelay",entityMeta:!0,entityType:"Contact",entityField:"avandelay@vandelay.com"},option3:{name:"Vandelay Industries",entityMeta:!0,entityType:"Account",entityField:"San Francisco"},option4:{name:"Salesforce UK 2016 Events",entityMeta:!0,entityType:"Event",entityField:"$20,000"},option5:{name:"H.E. Pennypacker",entityMeta:!0,entityType:"Lead",entityField:"Nursing"}},be=o(806),pe=function(e){return r().createElement("div",{className:"demo-only",style:{height:"340px"}},e.children)},ye=[{id:"default",label:"Default",element:r().createElement(le,{globalSearch:r().createElement(ce.D5,{id:be.Ay.uniqueId("combobox-id-"),"aria-controls":"search-listbox-id-1",comboboxID:"primary-search-combobox-id-1",autocomplete:!0,inputContainerClassName:"slds-global-search__form-element",label:"Search Salesforce",hideLabel:!0,placeholder:"Search Salesforce",results:r().createElement(de.Ay,{id:"search-listbox-id-1","aria-label":"Recent Items",snapshot:me,type:"entity",count:6}),resultsType:"listbox",addon:r().createElement(ue.A,{id:be.Ay.uniqueId("objectswitcher-combobox-id-"),value:"Filter by: Accounts",addonPosition:"start",hasInteractions:!0,comboboxAriaControls:"primary-search-combobox-id-1",listboxId:be.Ay.uniqueId("objectswitcher-listbox-id-")}),addonPosition:"start",comboboxPosition:"end",inputIconPosition:"left",leftInputIcon:r().createElement(fe.UtilityIcon,{symbol:"search",className:"slds-icon slds-icon_xx-small slds-icon-text-default",containerClassName:"slds-input__icon slds-input__icon_left",title:!1,assistiveText:!1}),hasInteractions:!0})})}],he=[{id:"search-focused-expanded",label:"Global Search - Focused and Exanded",element:r().createElement(le,{globalSearch:r().createElement(ce.D5,{id:be.Ay.uniqueId("combobox-id-"),"aria-controls":"search-listbox-id-2",comboboxID:"primary-search-combobox-id-2",autocomplete:!0,inputContainerClassName:"slds-global-search__form-element",label:"Search Salesforce",hideLabel:!0,placeholder:"Search Salesforce",results:r().createElement(de.Ay,{id:"search-listbox-id-2","aria-label":"Recent Items",snapshot:me,type:"entity",count:6}),resultsType:"listbox",addon:r().createElement(ue.A,{id:be.Ay.uniqueId("objectswitcher-combobox-id-"),value:"Filter by: Accounts",addonPosition:"start",comboboxAriaControls:"primary-search-combobox-id-2",listboxId:be.Ay.uniqueId("objectswitcher-listbox-id-")}),addonPosition:"start",comboboxPosition:"end",inputIconPosition:"left",leftInputIcon:r().createElement(fe.UtilityIcon,{symbol:"search",className:"slds-icon slds-icon_xx-small slds-icon-text-default",containerClassName:"slds-input__icon slds-input__icon_left",title:!1,assistiveText:!1})})})},{id:"search-active-typing",label:"Global Search - Active and typing",element:r().createElement(le,{globalSearch:r().createElement(ce.D5,{id:be.Ay.uniqueId("combobox-id-"),"aria-controls":"search-listbox-id-4",comboboxID:"primary-search-combobox-id-4",autocomplete:!0,inputContainerClassName:"slds-global-search__form-element",label:"Search Salesforce",hideLabel:!0,placeholder:"Search Salesforce",value:"salesforce",results:r().createElement(de.Ay,{id:"search-listbox-id-4",term:"salesforce",snapshot:{option1:{term:"Salesforce",beforeTerm:"",afterTerm:".com",entityMeta:!0,entityType:"Account",entityLocation:"San Francisco, CA"},option2:{term:"Salesforce",beforeTerm:"",afterTerm:".org",entityMeta:!0,entityType:"Account",entityLocation:"New York, NY"},option3:{term:"Salesforce",beforeTerm:"",afterTerm:"HQ",entityMeta:!0,entityType:"Account",entityLocation:"San Francisco, CA"}},type:"entity",count:6}),resultsType:"listbox","aria-activedescendant":"option0",addon:r().createElement(ue.A,{id:be.Ay.uniqueId("objectswitcher-combobox-id-"),value:"Filter by: Accounts",addonPosition:"start",comboboxAriaControls:"primary-search-combobox-id-4",listboxId:be.Ay.uniqueId("objectswitcher-listbox-id-")}),addonPosition:"start",comboboxPosition:"end",inputIconPosition:"left",leftInputIcon:r().createElement(fe.UtilityIcon,{symbol:"search",className:"slds-icon slds-icon_xx-small slds-icon-text-default",containerClassName:"slds-input__icon slds-input__icon_left",title:!1,assistiveText:!1}),hasFocus:!0,isOpen:!0})})},{id:"favorites-disabled",label:"Favorites - Disabled",element:r().createElement(le,{favoritesDisabled:!0,globalSearch:r().createElement(ce.D5,{id:be.Ay.uniqueId("combobox-id-"),"aria-controls":"search-listbox-id-1",comboboxID:"primary-search-combobox-id-1",autocomplete:!0,inputContainerClassName:"slds-global-search__form-element",label:"Search Salesforce",hideLabel:!0,placeholder:"Search Salesforce",results:r().createElement(de.Ay,{id:"search-listbox-id-1","aria-label":"Recent Items",snapshot:me,type:"entity",count:2}),resultsType:"listbox",addon:r().createElement(ue.A,{id:be.Ay.uniqueId("objectswitcher-combobox-id-"),value:"Filter by: Accounts",addonPosition:"start",hasInteractions:!0,comboboxAriaControls:"primary-search-combobox-id-1",listboxId:be.Ay.uniqueId("objectswitcher-listbox-id-")}),addonPosition:"start",comboboxPosition:"end",inputIconPosition:"left",leftInputIcon:r().createElement(fe.UtilityIcon,{symbol:"search",className:"slds-icon slds-icon_xx-small slds-icon-text-default",containerClassName:"slds-input__icon slds-input__icon_left",title:!1,assistiveText:!1}),hasInteractions:!0})})},{id:"notification-count-1",label:"Notification - Count +1",element:r().createElement(le,{playground:!0,globalSearch:r().createElement(ce.D5,{id:be.Ay.uniqueId("combobox-id-"),"aria-controls":"search-listbox-id-1",comboboxID:"primary-search-combobox-id-1",autocomplete:!0,inputContainerClassName:"slds-global-search__form-element",label:"Search Salesforce",hideLabel:!0,placeholder:"Search Salesforce",results:r().createElement(de.Ay,{id:"search-listbox-id-1","aria-label":"Recent Items",snapshot:me,type:"entity",count:2}),resultsType:"listbox",addon:r().createElement(ue.A,{id:be.Ay.uniqueId("objectswitcher-combobox-id-"),value:"Filter by: Accounts",addonPosition:"start",hasInteractions:!0,comboboxAriaControls:"primary-search-combobox-id-1",listboxId:be.Ay.uniqueId("objectswitcher-listbox-id-")}),addonPosition:"start",comboboxPosition:"end",inputIconPosition:"left",leftInputIcon:r().createElement(fe.UtilityIcon,{symbol:"search",className:"slds-icon slds-icon_xx-small slds-icon-text-default",containerClassName:"slds-input__icon slds-input__icon_left",title:!1,assistiveText:!1}),hasInteractions:!0})})}]},1187:function(e,t,o){o.d(t,{Footer:function(){return m},ListboxList:function(){return f}});var n=o(1594),r=o.n(n),i=o(4187),a=o.n(i),s=(o(5159),o(6185)),l=(o(538),o(6955)),c=(o(5006),o(8347)),u=o(806),d=o(3964),f=function(e){var t=e.ariaLabel,o=e.id,n=e.length,i=e.listboxData,a=void 0===i?d.o0:i,l=u.Ay.uniqueId("example-unique-id-");return r().createElement(s.Ay,{id:o||l,snapshot:a,type:"entity",count:n,hideIcons:!0,staticListbox:!0,"aria-label":t})};f.propTypes={ariaLabel:a().string,id:a().string,length:a().number,listboxData:a().object},f.defaultProps={ariaLabel:"My Favorites",length:8};a().object;var m=function(e){return r().createElement("ul",null,r().createElement("li",null,r().createElement("button",{className:"slds-button slds-button_reset slds-p-vertical_xx-small slds-size_1-of-1"},r().createElement(c.A,{className:"slds-button__icon slds-button__icon_left",sprite:"utility",symbol:"add"}),"Favorite this page")),r().createElement("li",null,r().createElement("button",{className:"slds-button slds-button_reset slds-p-vertical_xx-small slds-size_1-of-1"},r().createElement(c.A,{className:"slds-button__icon slds-button__icon_left",sprite:"utility",symbol:"edit"}),"Edit Favorites")))};l.A,l.A,l.A,d.o0,l.A,d.o0,l.A,d.o0},1594:function(e){e.exports=React}},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var i=o[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.m=t,n.amdO={},e=[],n.O=function(t,o,r,i){if(!o){var a=1/0;for(u=0;u<e.length;u++){o=e[u][0],r=e[u][1],i=e[u][2];for(var s=!0,l=0;l<o.length;l++)(!1&i||a>=i)&&Object.keys(n.O).every(function(e){return n.O[e](o[l])})?o.splice(l--,1):(s=!1,i<a&&(a=i));if(s){e.splice(u--,1);var c=r();void 0!==c&&(t=c)}}return t}i=i||0;for(var u=e.length;u>0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[o,r,i]},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.j=4451,function(){var e={518:0,1117:0,1252:0,1578:0,1974:0,2033:0,2274:0,2782:0,3140:0,4268:0,4451:0,4583:0,4723:0,4924:0,5393:0,6671:0,7217:0,7257:0,7385:0,7508:0,8167:0,8458:0};n.O.j=function(t){return 0===e[t]};var t=function(t,o){var r,i,a=o[0],s=o[1],l=o[2],c=0;if(a.some(function(t){return 0!==e[t]})){for(r in s)n.o(s,r)&&(n.m[r]=s[r]);if(l)var u=l(n)}for(t&&t(o);c<a.length;c++)i=a[c],n.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return n.O(u)},o=self.webpackJsonpSLDS___internal_chunked_showcase=self.webpackJsonpSLDS___internal_chunked_showcase||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))}(),n.nc=void 0;var r=n.O(void 0,[6790],function(){return n(547)});r=n.O(r),(SLDS=void 0===SLDS?{}:SLDS)["__internal/chunked/showcase/./ui/components/global-header/base/example.jsx.js"]=r}();