@salesforce-ux/design-system
Version:
Salesforce Lightning Design System
1 lines • 8.23 kB
JavaScript
var SLDS="object"==typeof SLDS?SLDS:{};SLDS["__internal/chunked/docs/./ui/components/notifications/docs.mdx.js"]=function(e){function t(t){for(var n,s,l=t[0],c=t[1],r=t[2],m=0,f=[];m<l.length;m++)s=l[m],Object.prototype.hasOwnProperty.call(i,s)&&i[s]&&f.push(i[s][0]),i[s]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(d&&d(t);f.length;)f.shift()();return o.push.apply(o,r||[]),a()}function a(){for(var e,t=0;t<o.length;t++){for(var a=o[t],n=!0,l=1;l<a.length;l++){var c=a[l];0!==i[c]&&(n=!1)}n&&(o.splice(t--,1),e=s(s.s=a[0]))}return e}var n={},i={50:0},o=[];function s(t){if(n[t])return n[t].exports;var a=n[t]={i:t,l:!1,exports:{}};return e[t].call(a.exports,a,a.exports,s),a.l=!0,a.exports}s.m=e,s.c=n,s.d=function(e,t,a){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(s.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)s.d(a,n,function(t){return e[t]}.bind(null,n));return a},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="/assets/scripts/bundle/";var l=this.webpackJsonpSLDS___internal_chunked_docs=this.webpackJsonpSLDS___internal_chunked_docs||[],c=l.push.bind(l);l.push=t,l=l.slice();for(var r=0;r<l.length;r++)t(l[r]);var d=c;return o.push([760,0]),a()}({0:function(e,t){e.exports=React},20:function(e,t){e.exports=ReactDOM},22:function(e,t){e.exports=JSBeautify},760:function(e,t,a){"use strict";a.r(t),a.d(t,"getElement",(function(){return _})),a.d(t,"getContents",(function(){return S}));var n=a(0),i=a.n(n),o=a(4),s=a(2),l=(a(29),a(45),a(14),a(1)),c=a(25),r=a.n(c),d=a(7),m=a(35),f=a(5),u=a.n(f),p=function(e){return i.a.createElement("div",{className:"slds-notification-container"},e.children)},h=function(e){var t=r()("dialog-body-id-"),a=r()("noti-");return i.a.createElement("section",{className:"slds-notification",role:"dialog","aria-labelledby":a,"aria-describedby":t},i.a.createElement("div",{className:"slds-notification__body",id:t},i.a.createElement("a",{className:"slds-notification__target slds-media",href:"#",onClick:function(e){return e.preventDefault()}},i.a.createElement(m.a,{containerClassName:"slds-media__figure",className:"slds-icon_small",symbol:e.type,title:e.type}),i.a.createElement("div",{className:"slds-media__body"},i.a.createElement("h2",{className:"slds-text-heading_small slds-m-bottom_xx-small",id:a},i.a.createElement("span",{className:"slds-assistive-text"},"".concat(e.type," notification:")),e.title),i.a.createElement("p",null,e.description))),i.a.createElement(d.b,{className:"slds-button_icon-container slds-notification__close",symbol:"close",assistiveText:"Dismiss ".concat(e.title," notification"),title:"Dismiss ".concat(e.title," notification")})),e.footer&&i.a.createElement("footer",{className:u()("slds-notification__footer",e.footerClassName)},e.footer))},v=[{id:"default",label:"Default",element:i.a.createElement("div",{className:"demo-only demo-only_viewport",style:{height:"4.5rem"}},i.a.createElement(p,null,i.a.createElement("div",{"aria-live":"assertive","aria-atomic":"true",className:"slds-assistive-text"},"event notification: Tesla - Renewal meeting"),i.a.createElement(h,{type:"event",title:"Tesla - Renewal meeting",description:"Event at 11:00am on Jan 8"})))}],b=[{id:"task-notification",label:"Task Notification",element:i.a.createElement("div",{className:"demo-only demo-only_viewport",style:{height:"4.5rem"}},i.a.createElement(p,null,i.a.createElement("div",{"aria-live":"assertive","aria-atomic":"true",className:"slds-assistive-text"},"task notification: Call: Jane Johnson"),i.a.createElement(h,{type:"task",title:"Call: Jane Johnson",description:"Task due on Jan 8"})))},{id:"stacked-2",label:"Stacked Notifications",element:i.a.createElement("div",{className:"demo-only demo-only_viewport",style:{height:"15rem"}},i.a.createElement(p,null,i.a.createElement("div",{"aria-live":"assertive","aria-atomic":"true",className:"slds-assistive-text"},"task notification: Call One: Jane Johnson"),i.a.createElement(h,{type:"task",title:"Call One: Jane Johnson",description:"Task due on Jan 8"}),i.a.createElement(h,{type:"event",title:"Call Two: Tesla - Renewal meeting",description:"Event at 11:00am on Jan 8"})))},{id:"stacked-3",label:"Three Stacked Notifications",element:i.a.createElement("div",{className:"demo-only demo-only_viewport",style:{height:"15rem"}},i.a.createElement(p,null,i.a.createElement("div",{"aria-live":"assertive","aria-atomic":"true",className:"slds-assistive-text"},"task notification: Call Two: Jane Johnson"),i.a.createElement(h,{type:"task",title:"Call Two: Jane Johnson",description:"Task due on Jan 8"}),i.a.createElement(h,{type:"event",title:"Call Three: Tesla - Renewal meeting",description:"Event at 11:00am on Jan 8"}),i.a.createElement(h,{type:"task",title:"Call Four: Jim Jameson",description:"Task due on Jan 8"})))},{id:"overflow-six",label:"Six Stacked Notifications",element:i.a.createElement("div",{className:"demo-only demo-only_viewport",style:{height:"17rem"}},i.a.createElement(p,null,i.a.createElement("div",{"aria-live":"assertive","aria-atomic":"true",className:"slds-assistive-text"},"task notification: Call Five: Jane Johnson"),i.a.createElement(h,{type:"task",title:"Call Five: Jane Johnson",description:"Task due on Jan 8"}),i.a.createElement(h,{type:"event",title:"Call Six: Tesla - Renewal meeting",description:"Event at 11:00am on Jan 8"}),i.a.createElement(h,{type:"task",title:"Call Seven: Jim Jameson",description:"Task due on Jan 8"}),i.a.createElement(h,{type:"task",title:"Call Eight: Jane Johnson",description:"Task due on Jan 8"}),i.a.createElement(h,{type:"event",title:"Call Nine: Tesla - Renewal meeting",description:"Event at 11:00am on Jan 8"}),i.a.createElement(h,{type:"task",title:"Call Ten: Jim Jameson",description:"Task due on Jan 8"})))}],y=o.c.code,E=o.c.h2,k=o.c.h3,N=o.c.li,g=o.c.p,J=o.c.ul,_=function(){return Object(n.createElement)(o.b,{},Object(n.createElement)("div",{className:"doc lead"},"Notifications serve as a feedback & confirmation mechanism that comes in at the top right."),Object(n.createElement)(s.a,{exampleOnly:!0},Object(l.f)(b,"stacked-2")),E({id:"About-Notifications"},"About Notifications"),g({},"The body of the notification is a clickable region that will prompt an additional browser tab with that record loaded and dismiss the notification. It is also dismissable by clicking the X icon."),k({id:"Implementation-Notes"},"Implementation Notes"),g({},"The first three notifications that appear on the page should stack on one another. The fourth notification will show slightly beneath the third notification. Any subsequent notifications won't show until earlier notifications are dismissed."),k({id:"Accessibility"},"Accessibility"),g({},"Notifications should contain ",y({},'role="dialog"')," to signal to\nassistive technology that they require the user’s immediate attention."),k({id:"Requirements"},"Requirements"),g({},"This notification will consist of the following:"),J({},N({},"Entity icon with background color"),N({},"Subject field for the reminder"),N({},"The time/date of when the event/task is occurring"),N({},"An ‘X’ icon to dismiss the reminder")),E({id:"Base"},"Base"),Object(n.createElement)(s.a,null,Object(l.f)(v)),E({id:"Examples"},"Examples"),k({id:"Task-Notification"},"Task Notification"),Object(n.createElement)(s.a,null,Object(l.f)(b,"task-notification")),k({id:"Stacked-Notifications"},"Stacked Notifications"),Object(n.createElement)(s.a,null,Object(l.f)(b,"stacked-2")),k({id:"Three-Stacked-Notifications"},"Three Stacked Notifications"),Object(n.createElement)(s.a,null,Object(l.f)(b,"stacked-3")),k({id:"Six-Stacked-Notifications"},"Six Stacked Notifications"),Object(n.createElement)(s.a,null,Object(l.f)(b,"overflow-six")))},S=function(){return Object(o.a)(_())}}});