@salesforce-ux/design-system
Version:
Salesforce Lightning Design System
1 lines • 11.2 kB
JavaScript
var SLDS;!function(){"use strict";var e,t={1594:function(e){e.exports=React},8012:function(e,t,n){n.r(t),n.d(t,{ActivityTimeline:function(){return C},DescriptionCard:function(){return S},FieldInfoList:function(){return k},FieldInfoListItem:function(){return T},NarrowContext:function(){return L},TimelineActions:function(){return _},TimelineError:function(){return N},TimelineIcon:function(){return x},TimelineItem:function(){return w},TimelineMediaBody:function(){return y},TimelineMediaFigure:function(){return h},TimelineSubtext:function(){return g},TimelineTrigger:function(){return v},examples:function(){return O},states:function(){return A}});var l=n(1594),a=n.n(l),s=n(6955),i=n(3589),r=n(8347),o=n(538),c=n(9825),d=n(942),m=n.n(d),u=n(6333),f=n.n(u),p=[a().createElement(o.UtilityIcon,{key:"groups",className:"slds-icon_xx-small slds-icon-text-default slds-m-left_x-small",symbol:"groups",title:"Group email",assistiveText:"Group email"}),a().createElement(o.UtilityIcon,{key:"attach",className:"slds-icon_xx-small slds-icon-text-default slds-m-left_x-small",symbol:"attach",title:"Has attachments",assistiveText:"Has attachments"})],b=[a().createElement(o.UtilityIcon,{key:"rotate",className:"slds-icon_xx-small slds-icon-text-default slds-m-left_x-small",symbol:"rotate",title:"Recurring Task",assistiveText:"Recurring Task"})],E=[a().createElement(o.UtilityIcon,{key:"world",className:"slds-icon_xx-small slds-icon-text-default slds-m-left_x-small",symbol:"world",title:"Public sharing",assistiveText:"Public sharing"})],x=function(e){return a().createElement("div",{className:m()("slds-icon_container","log_a_call"===e.symbol?"slds-icon-standard-log-a-call":"slds-icon-standard-"+e.symbol,e.className),title:"log_a_call"===e.symbol?"call":e.symbol},a().createElement(r.A,{className:"slds-icon slds-icon_small",sprite:"standard",symbol:e.symbol}))},_=function(e){return a().createElement("div",{className:m()("slds-timeline__actions",{"slds-timeline__actions_inline":e.inline})},a().createElement("p",{className:"slds-timeline__date"},e.date||"Feb 24"),a().createElement(s.A,{className:"slds-button_icon-border-filled slds-button_icon-x-small",symbol:"down",assistiveText:e.assistiveText||"More Options","aria-haspopup":"true",title:e.title||"More Options"}))},h=function(e){return a().createElement("div",{className:"slds-media__figure"},a().createElement(s.A,{iconClassName:"slds-timeline__details-action-icon",symbol:"switch",title:"Toggle details for ".concat(e.title),assistiveText:"Toggle details for ".concat(e.title),"aria-controls":e.id,"aria-expanded":e.isExpanded}),a().createElement(x,{symbol:e.type,className:"slds-timeline__icon"}))},y=function(e){return a().createElement("div",{className:"slds-media__body"},e.children)},v=function(e){return a().createElement("div",{className:"slds-grid slds-grid_align-spread slds-timeline__trigger"},a().createElement("div",{className:"slds-grid slds-grid_vertical-align-center slds-truncate_container_75 slds-no-space"},"task"===e.type&&a().createElement(i.Checkbox,{hideLabel:!0,label:"Mark ".concat(e.title," complete")}),a().createElement("h3",{className:"slds-truncate",title:e.title},a().createElement("a",{href:"#",onClick:function(e){return e.preventDefault()}},a().createElement("strong",null,e.title))),e.iconSet&&a().createElement("div",{className:"slds-no-flex"},e.iconSet)),a().createElement(_,{inline:!0,date:e.date,title:"More Options for this item",assistiveText:"More Options for this item"}))},g=function(e){return a().createElement("p",{className:"slds-m-horizontal_xx-small"},a().createElement("a",{href:"#",onClick:function(e){return e.preventDefault()}},e.subtext.you)," ",e.subtext.action," ",a().createElement("a",{href:"#",onClick:function(e){return e.preventDefault()}},e.subtext.to)," ",e.subtext.extra)},N=function(e){return a().createElement("div",{className:"slds-grid slds-text-color_error slds-m-top_x-small slds-m-horizontal_xx-small",id:e.id},a().createElement(o.UtilityIcon,{key:"attach",className:"slds-icon-text-error slds-icon_x-small slds-m-right_xx-small",symbol:"error",title:"Error Occurred",assistiveText:"Error Occurred"}),a().createElement("p",null,"There was an error loading the details"))},w=function(e){return a().createElement("div",{className:m()("slds-timeline__item_expandable","".concat("log_a_call"===e.type?"slds-timeline__item_call":"slds-timeline__item_"+e.type),{"slds-is-open":e.isExpanded},e.className)},a().createElement("span",{className:"slds-assistive-text"},e.type),a().createElement("div",{className:m()("slds-media")},a().createElement(h,e),a().createElement(y,null,a().createElement(v,e),a().createElement(g,e),e.hasError?a().createElement(N,e):a().createElement(S,{id:e.id,isExpanded:e.isExpanded,fields:e.fields,bodyLabel:e.bodyLabel,footerButtons:e.footerButtons},e.children))))},T=function(e){return a().createElement("li",{className:"slds-grid slds-grid_vertical slds-size_1-of-2 slds-p-bottom_small"},a().createElement("span",{className:"slds-text-title slds-p-bottom_x-small"},e.label),a().createElement("span",{className:"slds-text-body_medium slds-truncate",title:e.content},a().createElement("a",{href:"#",onClick:function(e){return e.preventDefault()}},e.content)))},k=function(e){return a().createElement("ul",{className:"slds-list_horizontal slds-wrap"},e.fields.map(function(e,t){return a().createElement(T,{key:t,label:e.label,content:e.content})}))},S=function(e){return a().createElement("article",{className:m()("slds-box","slds-timeline__item_details","slds-theme_shade","slds-m-top_x-small","slds-m-horizontal_xx-small",{"slds-p-around_medium":e.isExpanded},e.className),id:e.id,hidden:!e.isExpanded},e.fields&&a().createElement(k,e),e.children&&a().createElement("div",null,a().createElement("span",{className:"slds-text-title"},e.bodyLabel),a().createElement("p",{className:"slds-p-top_x-small"},e.children)),e.footerButtons&&a().createElement(c.Button,{isNeutral:!0,className:"slds-m-top_small"},a().createElement(r.A,{className:"slds-button__icon slds-button__icon_left",sprite:"utility",symbol:"world"}),"Public Sharing"))},L=function(e){return a().createElement("div",{className:"demo-only",style:{width:"400px"}},e.children)},C=function(e){var t=function(t){if(e.itemsExpanded)return e.itemsExpanded.includes(t)};return a().createElement("ul",{className:"slds-timeline"},a().createElement("li",null,a().createElement(w,{id:f()("task-item-".concat(e.id,"-")),type:"task",title:"Review proposals for EBC deck with larger team and have marketing review this",date:"9:00am | 3/20/17",subtext:{you:"You",action:"created a task with",to:"Charlie Gomez"},iconSet:b,fields:[{label:"Name",content:"Charlie Gomez"},{label:"Related To",content:"Tesla Cloudhub + Anypoint Connectors"}],bodyLabel:"Description",isExpanded:t(1),isNarrow:e.isNarrow,hasError:e.hasError},"Need to finalize proposals and brand details before the meeting")),a().createElement("li",null,a().createElement(w,{id:f()("call-item-".concat(e.id,"-")),type:"log_a_call",title:"Mobile conversation on Monday",date:"10:00am | 3/23/17",subtext:{you:"You",action:"logged a call with",to:"Adam Chan"},fields:[{label:"Name",content:"Adam Chan"},{label:"Related To",content:"Tesla Cloudhub + Anypoint Connectors"}],bodyLabel:"Description",isExpanded:t(2),isNarrow:e.isNarrow},"Adam seemed interested in closing this deal quickly! Let’s move.")),a().createElement("li",null,a().createElement(w,{id:f()("email-item-".concat(e.id,"-")),type:"email",title:"Re: Mobile conversation on Monday with the new global team",date:"10:00am | 3/24/17",subtext:{you:"You",action:"emailed",to:"Lea Chan"},iconSet:p,fields:[{label:"From Address",content:"Jackie Dewar"},{label:"To Address",content:"Lea Chan"}],bodyLabel:"Text Body",isExpanded:t(3),isNarrow:e.isNarrow,footerButtons:e.footerButtons},"Hi everyone, Thanks for meeting with the team today and going through the proposals we saw. This goes on and wraps if needed.")),a().createElement("li",null,a().createElement(w,{id:f()("event-item-".concat(e.id,"-")),type:"event",title:"EBC Follow up call",date:"10:30am | 3/24/17",subtext:{you:"You",action:"created an event with",to:"Aida Lee",extra:"and 5 others"},iconSet:E,fields:[{label:"Location",content:"Westen St. Francis, San Francisco, CA, 94622"},{label:"Attendees",content:"Jason Dewar (Organizer) + 5 others"},{label:"When",content:"March 26, 10:00 AM - 11:00 AM"}],bodyLabel:"Description",isExpanded:t(4),isNarrow:e.isNarrow,footerButtons:e.footerButtons},"Let's discuss the 2017 product roadmap and address any questions")))};t.default=a().createElement(C,{id:"base",isExpanded:"false"});var O=[{id:"narrow",label:"Narrow",element:a().createElement(L,null,a().createElement(C,{id:"narrow",itemsExpanded:[1,2,3,4],isNarrow:!0,footerButtons:!0}))}],A=[{id:"expanded",label:"Expanded",element:a().createElement(C,{id:"expanded",itemsExpanded:[1,2,3,4],footerButtons:!0})},{id:"expanded-single",label:"Expanded - Single Item",element:a().createElement(C,{id:"expanded",itemsExpanded:[1],footerButtons:!0})},{id:"error",label:"Error",element:a().createElement(C,{id:"error",itemsExpanded:[1,2,3,4],hasError:!0,footerButtons:!0})},{id:"error-single",label:"Error - Single Item",element:a().createElement(C,{id:"error",itemsExpanded:[1],hasError:!0,footerButtons:!0})}]}},n={};function l(e){var a=n[e];if(void 0!==a)return a.exports;var s=n[e]={exports:{}};return t[e](s,s.exports,l),s.exports}l.m=t,l.amdO={},e=[],l.O=function(t,n,a,s){if(!n){var i=1/0;for(d=0;d<e.length;d++){n=e[d][0],a=e[d][1],s=e[d][2];for(var r=!0,o=0;o<n.length;o++)(!1&s||i>=s)&&Object.keys(l.O).every(function(e){return l.O[e](n[o])})?n.splice(o--,1):(r=!1,s<i&&(i=s));if(r){e.splice(d--,1);var c=a();void 0!==c&&(t=c)}}return t}s=s||0;for(var d=e.length;d>0&&e[d-1][2]>s;d--)e[d]=e[d-1];e[d]=[n,a,s]},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,{a:t}),t},l.d=function(e,t){for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.j=3539,function(){var e={518:0,1117:0,1252:0,1578:0,1974:0,2033:0,2274:0,2782:0,3140:0,3539:0,4268:0,4583:0,4723:0,4924:0,6671:0,7217:0,7257:0,7385:0,7508:0,8167:0,8458:0};l.O.j=function(t){return 0===e[t]};var t=function(t,n){var a,s,i=n[0],r=n[1],o=n[2],c=0;if(i.some(function(t){return 0!==e[t]})){for(a in r)l.o(r,a)&&(l.m[a]=r[a]);if(o)var d=o(l)}for(t&&t(n);c<i.length;c++)s=i[c],l.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return l.O(d)},n=self.webpackJsonpSLDS___internal_chunked_showcase=self.webpackJsonpSLDS___internal_chunked_showcase||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}(),l.nc=void 0;var a=l.O(void 0,[6790],function(){return l(8012)});a=l.O(a),(SLDS=void 0===SLDS?{}:SLDS)["__internal/chunked/showcase/./ui/components/activity-timeline/base/example.jsx.js"]=a}();