UNPKG

@salesforce-ux/design-system

Version:
1 lines 7.33 kB
var SLDS;!function(){"use strict";var e,t,n,i={1594:function(e){e.exports=React},1981:function(e){e.exports=JSBeautify},5206:function(e){e.exports=ReactDOM},5312:function(e,t,n){n.r(t),n.d(t,{getContents:function(){return S},getElement:function(){return k}});var i=n(1594),r=n.n(i),o=n(5671),a=n(6547),l=(n(3212),n(5619),n(806)),s=n(4187),c=n.n(s),u=n(538),f=n(942),d=n.n(f),m=function(e){var t=e.children;return r().createElement("div",{className:d()("slds-scoped-notification slds-media slds-media_center",e.type&&"slds-theme_"+e.type),role:"status"},r().createElement("div",{className:"slds-media__figure"},r().createElement(u.eX,{title:e.type,className:"slds-icon_small",assistiveText:e.type,symbol:e.type})),r().createElement("div",{className:"slds-media__body"},t))};m.propTypes={type:c().oneOf(["info","success","warning","error"]),children:c().node};var p=function(e){var t=e.children,n=e.theme;return r().createElement("div",{className:d()("slds-scoped-notification slds-media slds-media_center",e.theme&&"slds-scoped-notification_"+e.theme),role:"status"},r().createElement("div",{className:"slds-media__figure"},r().createElement(u.eX,{title:"information",className:d()("slds-icon_small",n&&"light"===n&&"slds-icon-text-default"),assistiveText:"information",symbol:"info"})),r().createElement("div",{className:"slds-media__body"},t))};p.propTypes={children:c().node,theme:c().oneOf(["light","dark"])};var h=[{id:"default",label:"Default",element:r().createElement(p,{theme:"light"},r().createElement("p",null,"It looks as if duplicates exist for this lead."," ",r().createElement("a",{href:"#",onClick:function(e){return e.preventDefault()}},"View Duplicates")))}],v=[{id:"light-theme",label:"Informational with Light Theme",element:r().createElement(p,{theme:"light"},r().createElement("p",null,"It looks as if duplicates exist for this lead."," ",r().createElement("a",{href:"#",onClick:function(e){return e.preventDefault()}},"View Duplicates")))},{id:"dark-theme",label:"Informational with Dark theme",element:r().createElement(p,{theme:"dark"},r().createElement("p",null,"It looks as if duplicates exist for this lead."," ",r().createElement("a",{href:"#",onClick:function(e){return e.preventDefault()}},"View Duplicates")))}],y=[{id:"info",label:"Informational",element:r().createElement(m,{type:"info"},r().createElement("p",null,"It looks as if duplicates exist for this lead."," ",r().createElement("a",{href:"#",onClick:function(e){return e.preventDefault()}},"View Duplicates")))},{id:"success",label:"Success",element:r().createElement(m,{type:"success"},r().createElement("p",null,"Success! Your entry has been duplicated."," ",r().createElement("a",{href:"#",onClick:function(e){return e.preventDefault()}},"View Duplicates")))},{id:"warning",label:"Warning",element:r().createElement(m,{type:"warning"},r().createElement("p",null,"It looks as if duplicates exist for this lead."," ",r().createElement("a",{href:"#",onClick:function(e){return e.preventDefault()}},"View Duplicates")))},{id:"error",label:"Error",element:r().createElement(m,{type:"error"},r().createElement("p",null,"It looks as if duplicates exist for this lead."," ",r().createElement("a",{href:"#",onClick:function(e){return e.preventDefault()}},"View Duplicates")))}],E=o.XB.code,b=o.XB.h2,g=o.XB.h3,_=o.XB.h4,O=o.XB.p,k=function(){return(0,i.createElement)(o.Ay,{},(0,i.createElement)("div",{className:"lead doc"},"Scoped notifications serve advisory information for the user that is not important enough to justify an alert. It is often presented as a status bar scoped to the container. They are not dismissible."),(0,i.createElement)(a.A,{exampleOnly:!0},(0,l.NO)(v,"dark-theme")),b({id:"About-Scoped-Notifications"},"About Scoped Notifications"),g({id:"Accessibility"},"Accessibility"),O({},"Scoped notifications contain ",E({},'role="status"')," on the container to signal to the browser to send an accessible status event to assistive technology. The assistive technology then notifies the user."),b({id:"Base"},"Base"),(0,i.createElement)(a.A,null,(0,l.NO)(h)),g({id:"States"},"States"),_({id:"Informational"},"Informational"),(0,i.createElement)(a.A,null,(0,l.NO)(y,"info")),_({id:"Success"},"Success"),(0,i.createElement)(a.A,null,(0,l.NO)(y,"success")),_({id:"Warning"},"Warning"),(0,i.createElement)(a.A,null,(0,l.NO)(y,"warning")),_({id:"Error"},"Error"),(0,i.createElement)(a.A,null,(0,l.NO)(y,"error")),g({id:"Examples"},"Examples"),O({},"Informational Notifications default to the dark theme. For light, use the class ",E({},"slds-scoped-notification_light")," instead of ",E({},"slds-theme_info"),". An additional class, ",E({},"slds-scoped-notification_dark")," is also available for the dark theme to more easily toggle between them."),_({id:"Light-Theme"},"Light Theme"),(0,i.createElement)(a.A,null,(0,l.NO)(v,"light-theme")),_({id:"Dark-Theme"},"Dark Theme"),(0,i.createElement)(a.A,null,(0,l.NO)(v,"dark-theme")))},S=function(){return(0,o.Qr)(k())}}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var n=r[e]={id:e,exports:{}};return i[e](n,n.exports,o),n.exports}o.m=i,o.amdO={},e=[],o.O=function(t,n,i,r){if(!n){var a=1/0;for(u=0;u<e.length;u++){n=e[u][0],i=e[u][1],r=e[u][2];for(var l=!0,s=0;s<n.length;s++)(!1&r||a>=r)&&Object.keys(o.O).every(function(e){return o.O[e](n[s])})?n.splice(s--,1):(l=!1,r<a&&(a=r));if(l){e.splice(u--,1);var c=i();void 0!==c&&(t=c)}}return t}r=r||0;for(var u=e.length;u>0&&e[u-1][2]>r;u--)e[u]=e[u-1];e[u]=[n,i,r]},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},o.t=function(e,i){if(1&i&&(e=this(e)),8&i)return e;if("object"==typeof e&&e){if(4&i&&e.__esModule)return e;if(16&i&&"function"==typeof e.then)return e}var r=Object.create(null);o.r(r);var a={};t=t||[null,n({}),n([]),n(n)];for(var l=2&i&&e;("object"==typeof l||"function"==typeof l)&&!~t.indexOf(l);l=n(l))Object.getOwnPropertyNames(l).forEach(function(t){a[t]=function(){return e[t]}});return a.default=function(){return e},o.d(r,a),r},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.e=function(){return Promise.resolve()},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.j=9824,function(){var e={9824:0};o.O.j=function(t){return 0===e[t]};var t=function(t,n){var i,r,a=n[0],l=n[1],s=n[2],c=0;if(a.some(function(t){return 0!==e[t]})){for(i in l)o.o(l,i)&&(o.m[i]=l[i]);if(s)var u=s(o)}for(t&&t(n);c<a.length;c++)r=a[c],o.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return o.O(u)},n=self.webpackJsonpSLDS___internal_chunked_docs=self.webpackJsonpSLDS___internal_chunked_docs||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}(),o.nc=void 0;var a=o.O(void 0,[3540],function(){return o(5312)});a=o.O(a),(SLDS=void 0===SLDS?{}:SLDS)["__internal/chunked/docs/./ui/components/scoped-notifications/docs.mdx.js"]=a}();