@salesforce-ux/design-system
Version:
Salesforce Lightning Design System
1 lines • 4.58 kB
JavaScript
var SLDS;!function(){"use strict";var e,t={827:function(e,t,n){n.r(t),n.d(t,{List:function(){return s},ListItem:function(){return o},examples:function(){return c}});var i=n(1594),l=n.n(i),a=n(942),r=n.n(a),o=function(e){return l().createElement("li",{className:r()("slds-list__item slds-m-right_large slds-grid",e.className)},l().createElement("span",null,"To:"),l().createElement("span",{className:"slds-m-left_xx-small slds-truncate",title:e.title},e.children),l().createElement("span",{className:"slds-m-left_xx-small slds-no-flex"}," + 44 more"))},s=function(e){return l().createElement("ul",null,l().createElement(o,{title:"Lei Chan",className:"slds-truncate_container_"+e.width},l().createElement("a",{href:"#",onClick:function(e){return e.preventDefault()}},"Lei Chan")),l().createElement(o,{title:"Lei Chan with Long Name",className:"slds-truncate_container_"+e.width},l().createElement("a",{href:"#",onClick:function(e){return e.preventDefault()}},"Lei Chan with Long Name")),l().createElement(o,{title:"Lei Chan with Long Name that might go on for quite some distance futher than you might expect",className:"slds-truncate_container_"+e.width},l().createElement("a",{href:"#",onClick:function(e){return e.preventDefault()}},"Lei Chan with Long Name that might go on for quite some distance futher than you might expect")))},c=[{id:"fluid",label:"Single line",element:l().createElement("div",{className:"slds-size_1-of-2"},l().createElement("p",{className:"slds-truncate",title:"Long text field with many lines and truncation will look like this. Even though the text might go on for ages and ages."},"Long text field with many lines and truncation will look like this. Even though the text might go on for ages and ages."))},{id:"nested-grids",label:"Single line within nested grid containers",element:l().createElement("div",{className:"slds-grid",style:{width:"200px"}},l().createElement("div",{className:"slds-grid slds-has-flexi-truncate"},l().createElement("p",{className:"slds-truncate",title:"Long text field with many lines and truncation will look like this. Even though the text might go on for ages and ages."},"Long text field with many lines and truncation will look like this. Even though the text might go on for ages and ages.")))},{id:"25%",label:"Max-width 25%",element:l().createElement(s,{width:"25"})},{id:"33%",label:"Max-width 33%",element:l().createElement(s,{width:"33"})},{id:"50%",label:"Max-width 50%",element:l().createElement(s,{width:"50"})},{id:"66%",label:"Max-width 66%",element:l().createElement(s,{width:"66"})},{id:"75%",label:"Max-width 75%",element:l().createElement(s,{width:"75"})}]},1594:function(e){e.exports=React}},n={};function i(e){var l=n[e];if(void 0!==l)return l.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,i),a.exports}i.m=t,i.amdO={},e=[],i.O=function(t,n,l,a){if(!n){var r=1/0;for(u=0;u<e.length;u++){n=e[u][0],l=e[u][1],a=e[u][2];for(var o=!0,s=0;s<n.length;s++)(!1&a||r>=a)&&Object.keys(i.O).every(function(e){return i.O[e](n[s])})?n.splice(s--,1):(o=!1,a<r&&(r=a));if(o){e.splice(u--,1);var c=l();void 0!==c&&(t=c)}}return t}a=a||0;for(var u=e.length;u>0&&e[u-1][2]>a;u--)e[u]=e[u-1];e[u]=[n,l,a]},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.j=425,function(){var e={425:0,518:0,1117:0,1252:0,1578:0,1974:0,2033:0,2274:0,2782:0,3140:0,4268:0,4583:0,4723:0,4924:0,6671:0,7217:0,7257:0,7385:0,7508:0,8167:0,8458:0};i.O.j=function(t){return 0===e[t]};var t=function(t,n){var l,a,r=n[0],o=n[1],s=n[2],c=0;if(r.some(function(t){return 0!==e[t]})){for(l in o)i.o(o,l)&&(i.m[l]=o[l]);if(s)var u=s(i)}for(t&&t(n);c<r.length;c++)a=r[c],i.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return i.O(u)},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))}(),i.nc=void 0;var l=i.O(void 0,[6790],function(){return i(827)});l=i.O(l),(SLDS=void 0===SLDS?{}:SLDS)["__internal/chunked/showcase/./ui/utilities/truncation/example.jsx.js"]=l}();