@nyaruka/temba-components 0.58.0 → 0.58.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,8 +4,14 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ #### [v0.58.1](https://github.com/nyaruka/temba-components/compare/v0.58.0...v0.58.1)
8
+
9
+ - Truncate labels to max-width [`#355`](https://github.com/nyaruka/temba-components/pull/355)
10
+
7
11
  #### [v0.58.0](https://github.com/nyaruka/temba-components/compare/v0.57.1...v0.58.0)
8
12
 
13
+ > 3 August 2023
14
+
9
15
  - Fix issue with contact search returning without blockers [`#354`](https://github.com/nyaruka/temba-components/pull/354)
10
16
  - Add test for temba-contact-search [`b3c3816`](https://github.com/nyaruka/temba-components/commit/b3c381666f128b49f95de193f499cef9969af2cd)
11
17
  - Add temporary delay [`8dbd96a`](https://github.com/nyaruka/temba-components/commit/8dbd96aafe5ca5e34f7957e51d2d379e9b436f35)
@@ -4099,6 +4099,9 @@ function t(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPro
4099
4099
 
4100
4100
  slot {
4101
4101
  white-space: nowrap;
4102
+ overflow-x: hidden;
4103
+ text-overflow: ellipsis;
4104
+ display: block;
4102
4105
  }
4103
4106
 
4104
4107
  .mask {
package/dist/index.js CHANGED
@@ -4099,6 +4099,9 @@ function t(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPro
4099
4099
 
4100
4100
  slot {
4101
4101
  white-space: nowrap;
4102
+ overflow-x: hidden;
4103
+ text-overflow: ellipsis;
4104
+ display: block;
4102
4105
  }
4103
4106
 
4104
4107
  .mask {
package/dist/sw.js CHANGED
@@ -1,2 +1,2 @@
1
- if(!self.define){let e,t={};const o=(o,n)=>(o=new URL(o+".js",n).href,t[o]||new Promise((t=>{if("document"in self){const e=document.createElement("script");e.src=o,e.onload=t,document.head.appendChild(e)}else e=o,importScripts(o),t()})).then((()=>{let e=t[o];if(!e)throw new Error(`Module ${o} didn’t register its module`);return e})));self.define=(n,s)=>{const i=e||("document"in self?document.currentScript.src:"")||location.href;if(t[i])return;let r={};const l=e=>o(e,i),d={module:{uri:i},exports:r,require:l};t[i]=Promise.all(n.map((e=>d[e]||l(e)))).then((e=>(s(...e),r)))}}define(["./workbox-919adfb7"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"3a61fd21.js",revision:"7fb5aa84f6c063503193eb4ad693b54c"},{url:"templates/components-body.html",revision:"7d425e55bd06b14a1f33ee90d66f1603"},{url:"templates/components-head.html",revision:"3cd36ec386184d03a8e187651737e0e6"}],{}),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/index.html"))),e.registerRoute("polyfills/*.js",new e.CacheFirst,"GET")}));
1
+ if(!self.define){let e,t={};const o=(o,n)=>(o=new URL(o+".js",n).href,t[o]||new Promise((t=>{if("document"in self){const e=document.createElement("script");e.src=o,e.onload=t,document.head.appendChild(e)}else e=o,importScripts(o),t()})).then((()=>{let e=t[o];if(!e)throw new Error(`Module ${o} didn’t register its module`);return e})));self.define=(n,s)=>{const i=e||("document"in self?document.currentScript.src:"")||location.href;if(t[i])return;let r={};const d=e=>o(e,i),l={module:{uri:i},exports:r,require:d};t[i]=Promise.all(n.map((e=>l[e]||d(e)))).then((e=>(s(...e),r)))}}define(["./workbox-919adfb7"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"5f784089.js",revision:"1dd575670656f731010a5b0d97d855a5"},{url:"templates/components-body.html",revision:"dbcd0a8bad42af62216ac0ff8361c695"},{url:"templates/components-head.html",revision:"4e8bbd10cbd3534e5d3f1fcac04e700a"}],{}),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/index.html"))),e.registerRoute("polyfills/*.js",new e.CacheFirst,"GET")}));
2
2
  //# sourceMappingURL=sw.js.map
package/dist/sw.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"sw.js","sources":["../../../../../tmp/6f3ac5e837ac1de9fcfc96be37a4a1e2/sw.js"],"sourcesContent":["import {registerRoute as workbox_routing_registerRoute} from '/home/runner/work/temba-components/temba-components/node_modules/workbox-routing/registerRoute.mjs';\nimport {CacheFirst as workbox_strategies_CacheFirst} from '/home/runner/work/temba-components/temba-components/node_modules/workbox-strategies/CacheFirst.mjs';\nimport {clientsClaim as workbox_core_clientsClaim} from '/home/runner/work/temba-components/temba-components/node_modules/workbox-core/clientsClaim.mjs';\nimport {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/home/runner/work/temba-components/temba-components/node_modules/workbox-precaching/precacheAndRoute.mjs';\nimport {NavigationRoute as workbox_routing_NavigationRoute} from '/home/runner/work/temba-components/temba-components/node_modules/workbox-routing/NavigationRoute.mjs';\nimport {createHandlerBoundToURL as workbox_precaching_createHandlerBoundToURL} from '/home/runner/work/temba-components/temba-components/node_modules/workbox-precaching/createHandlerBoundToURL.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\nworkbox_core_clientsClaim();\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"3a61fd21.js\",\n \"revision\": \"7fb5aa84f6c063503193eb4ad693b54c\"\n },\n {\n \"url\": \"templates/components-body.html\",\n \"revision\": \"7d425e55bd06b14a1f33ee90d66f1603\"\n },\n {\n \"url\": \"templates/components-head.html\",\n \"revision\": \"3cd36ec386184d03a8e187651737e0e6\"\n }\n], {});\n\nworkbox_routing_registerRoute(new workbox_routing_NavigationRoute(workbox_precaching_createHandlerBoundToURL(\"/index.html\")));\n\n\nworkbox_routing_registerRoute(\"polyfills/*.js\", new workbox_strategies_CacheFirst(), 'GET');\n\n\n\n\n"],"names":["self","skipWaiting","workbox_core_clientsClaim","workbox_precaching_precacheAndRoute","url","revision","workbox","registerRoute","workbox_routing_NavigationRoute","workbox_precaching_createHandlerBoundToURL","workbox_strategies_CacheFirst"],"mappings":"0nBAwBAA,KAAKC,cAELC,EAAAA,eAQAC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,qCAEb,CAAE,GAEwBC,EAAAC,cAAC,IAAIC,EAAAA,gBAAgCC,EAAAA,wBAA2C,iBAGhFH,EAAAC,cAAC,iBAAkB,IAAIG,aAAiC"}
1
+ {"version":3,"file":"sw.js","sources":["../../../../../tmp/6702fdef0da704a36d8cabd25270717b/sw.js"],"sourcesContent":["import {registerRoute as workbox_routing_registerRoute} from '/home/runner/work/temba-components/temba-components/node_modules/workbox-routing/registerRoute.mjs';\nimport {CacheFirst as workbox_strategies_CacheFirst} from '/home/runner/work/temba-components/temba-components/node_modules/workbox-strategies/CacheFirst.mjs';\nimport {clientsClaim as workbox_core_clientsClaim} from '/home/runner/work/temba-components/temba-components/node_modules/workbox-core/clientsClaim.mjs';\nimport {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/home/runner/work/temba-components/temba-components/node_modules/workbox-precaching/precacheAndRoute.mjs';\nimport {NavigationRoute as workbox_routing_NavigationRoute} from '/home/runner/work/temba-components/temba-components/node_modules/workbox-routing/NavigationRoute.mjs';\nimport {createHandlerBoundToURL as workbox_precaching_createHandlerBoundToURL} from '/home/runner/work/temba-components/temba-components/node_modules/workbox-precaching/createHandlerBoundToURL.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\nworkbox_core_clientsClaim();\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"5f784089.js\",\n \"revision\": \"1dd575670656f731010a5b0d97d855a5\"\n },\n {\n \"url\": \"templates/components-body.html\",\n \"revision\": \"dbcd0a8bad42af62216ac0ff8361c695\"\n },\n {\n \"url\": \"templates/components-head.html\",\n \"revision\": \"4e8bbd10cbd3534e5d3f1fcac04e700a\"\n }\n], {});\n\nworkbox_routing_registerRoute(new workbox_routing_NavigationRoute(workbox_precaching_createHandlerBoundToURL(\"/index.html\")));\n\n\nworkbox_routing_registerRoute(\"polyfills/*.js\", new workbox_strategies_CacheFirst(), 'GET');\n\n\n\n\n"],"names":["self","skipWaiting","workbox_core_clientsClaim","workbox_precaching_precacheAndRoute","url","revision","workbox","registerRoute","workbox_routing_NavigationRoute","workbox_precaching_createHandlerBoundToURL","workbox_strategies_CacheFirst"],"mappings":"0nBAwBAA,KAAKC,cAELC,EAAAA,eAQAC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,qCAEb,CAAE,GAEwBC,EAAAC,cAAC,IAAIC,EAAAA,gBAAgCC,EAAAA,wBAA2C,iBAGhFH,EAAAC,cAAC,iBAAkB,IAAIG,aAAiC"}
@@ -1 +1 @@
1
- <script type="module" src="{{STATIC_URL}}@nyaruka/temba-components/dist/3a61fd21.js"></script><script>window.TEMBA_COMPONENTS_VERSION="0.58.0"</script>
1
+ <script type="module" src="{{STATIC_URL}}@nyaruka/temba-components/dist/5f784089.js"></script><script>window.TEMBA_COMPONENTS_VERSION="0.58.1"</script>
@@ -1 +1 @@
1
- <link rel="modulepreload" href="{{STATIC_URL}}@nyaruka/temba-components/dist/3a61fd21.js" crossorigin="anonymous">
1
+ <link rel="modulepreload" href="{{STATIC_URL}}@nyaruka/temba-components/dist/5f784089.js" crossorigin="anonymous">
@@ -12,6 +12,9 @@ export default class Label extends LitElement {
12
12
 
13
13
  slot {
14
14
  white-space: nowrap;
15
+ overflow-x: hidden;
16
+ text-overflow: ellipsis;
17
+ display: block;
15
18
  }
16
19
 
17
20
  .mask {
@@ -1 +1 @@
1
- {"version":3,"file":"Label.js","sourceRoot":"","sources":["../../../src/label/Label.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAkB,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAE5D,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,UAAU;IAC3C,MAAM,KAAK,MAAM;QACf,OAAO,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAuET,CAAC;IACJ,CAAC;IAgCM,MAAM;QACX,MAAM,UAAU,GAAG,EAAE,CAAC;QAEtB,IAAI,IAAI,CAAC,eAAe,EAAE;YACxB,UAAU,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC;SACjD;QAED,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,UAAU,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;YACrC,UAAU,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;SAC7C;QAED,OAAO,IAAI,CAAA;;uBAEQ,UAAU,CAAC;YACxB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;gBACM,QAAQ,CAAC,UAAU,CAAC;;;YAGxB,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA,oBAAoB,IAAI,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI;;;;KAIhE,CAAC;IACJ,CAAC;CACF;AA7DC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCACT;AAGnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;sCACX;AAGjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCACT;AAGnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;uCACV;AAGlB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;qCACZ;AAGhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;mCACd;AAGd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;qCACZ;AAGhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mCACd;AAGb;IADC,QAAQ,EAAE;8CACa;AAGxB;IADC,QAAQ,EAAE;wCACO","sourcesContent":["import { LitElement, TemplateResult, html, css } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { getClasses } from '../utils';\nimport { styleMap } from 'lit-html/directives/style-map.js';\n\nexport default class Label extends LitElement {\n static get styles() {\n return css`\n :host {\n display: inline-block;\n }\n\n slot {\n white-space: nowrap;\n }\n\n .mask {\n padding: 3px 8px;\n border-radius: 12px;\n display: flex;\n }\n\n temba-icon {\n margin-right: 0.3em;\n padding-bottom: 0.1em;\n }\n\n .label.clickable .mask:hover {\n background: var(--color-background-hover, rgb(0, 0, 0, 0.05));\n }\n\n .label {\n font-size: 0.8em;\n font-weight: 400;\n border-radius: 12px;\n box-shadow: var(--widget-shadow, 0 0.04em 0.08em rgba(0, 0, 0, 0.15));\n background: var(--color-overlay-light);\n color: var(--color-overlay-light-text);\n --icon-color: var(--color-overlay-light-text);\n text-shadow: none;\n }\n\n .danger {\n background: tomato;\n color: #fff;\n --icon-color: #fff;\n }\n\n .primary {\n background: var(--color-primary-dark);\n color: var(--color-text-light);\n --icon-color: var(--color-text-light);\n }\n\n .secondary {\n background: var(--color-secondary-dark);\n color: var(--color-text-light);\n --icon-color: var(--color-text-light);\n }\n\n .tertiary {\n background: var(--color-tertiary);\n color: var(--color-text-light);\n --icon-color: var(--color-text-light);\n }\n\n .dark {\n background: var(--color-overlay-dark);\n text-shadow: none;\n }\n\n .clickable {\n cursor: pointer;\n }\n\n .shadow {\n box-shadow: 1px 1px 2px 1px rgba(0, 0, 0, 0.1);\n }\n `;\n }\n\n @property({ type: Boolean })\n clickable: boolean;\n\n @property({ type: Boolean })\n primary: boolean;\n\n @property({ type: Boolean })\n secondary: boolean;\n\n @property({ type: Boolean })\n tertiary: boolean;\n\n @property({ type: Boolean })\n danger: boolean;\n\n @property({ type: Boolean })\n dark: boolean;\n\n @property({ type: Boolean })\n shadow: boolean;\n\n @property({ type: String })\n icon: string;\n\n @property()\n backgroundColor: string;\n\n @property()\n textColor: string;\n\n public render(): TemplateResult {\n const labelStyle = {};\n\n if (this.backgroundColor) {\n labelStyle['background'] = this.backgroundColor;\n }\n\n if (this.textColor) {\n labelStyle['color'] = this.textColor;\n labelStyle['--icon-color'] = this.textColor;\n }\n\n return html`\n <div\n class=\"label ${getClasses({\n clickable: this.clickable,\n primary: this.primary,\n secondary: this.secondary,\n tertiary: this.tertiary,\n shadow: this.shadow,\n danger: this.danger,\n dark: this.dark,\n })}\"\n style=${styleMap(labelStyle)}\n >\n <div class=\"mask\">\n ${this.icon ? html`<temba-icon name=${this.icon} />` : null}\n <slot></slot>\n </div>\n </div>\n `;\n }\n}\n"]}
1
+ {"version":3,"file":"Label.js","sourceRoot":"","sources":["../../../src/label/Label.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAkB,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAE5D,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,UAAU;IAC3C,MAAM,KAAK,MAAM;QACf,OAAO,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA0ET,CAAC;IACJ,CAAC;IAgCM,MAAM;QACX,MAAM,UAAU,GAAG,EAAE,CAAC;QAEtB,IAAI,IAAI,CAAC,eAAe,EAAE;YACxB,UAAU,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC;SACjD;QAED,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,UAAU,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;YACrC,UAAU,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;SAC7C;QAED,OAAO,IAAI,CAAA;;uBAEQ,UAAU,CAAC;YACxB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;gBACM,QAAQ,CAAC,UAAU,CAAC;;;YAGxB,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA,oBAAoB,IAAI,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI;;;;KAIhE,CAAC;IACJ,CAAC;CACF;AA7DC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCACT;AAGnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;sCACX;AAGjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCACT;AAGnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;uCACV;AAGlB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;qCACZ;AAGhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;mCACd;AAGd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;qCACZ;AAGhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mCACd;AAGb;IADC,QAAQ,EAAE;8CACa;AAGxB;IADC,QAAQ,EAAE;wCACO","sourcesContent":["import { LitElement, TemplateResult, html, css } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { getClasses } from '../utils';\nimport { styleMap } from 'lit-html/directives/style-map.js';\n\nexport default class Label extends LitElement {\n static get styles() {\n return css`\n :host {\n display: inline-block;\n }\n\n slot {\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n display: block;\n }\n\n .mask {\n padding: 3px 8px;\n border-radius: 12px;\n display: flex;\n }\n\n temba-icon {\n margin-right: 0.3em;\n padding-bottom: 0.1em;\n }\n\n .label.clickable .mask:hover {\n background: var(--color-background-hover, rgb(0, 0, 0, 0.05));\n }\n\n .label {\n font-size: 0.8em;\n font-weight: 400;\n border-radius: 12px;\n box-shadow: var(--widget-shadow, 0 0.04em 0.08em rgba(0, 0, 0, 0.15));\n background: var(--color-overlay-light);\n color: var(--color-overlay-light-text);\n --icon-color: var(--color-overlay-light-text);\n text-shadow: none;\n }\n\n .danger {\n background: tomato;\n color: #fff;\n --icon-color: #fff;\n }\n\n .primary {\n background: var(--color-primary-dark);\n color: var(--color-text-light);\n --icon-color: var(--color-text-light);\n }\n\n .secondary {\n background: var(--color-secondary-dark);\n color: var(--color-text-light);\n --icon-color: var(--color-text-light);\n }\n\n .tertiary {\n background: var(--color-tertiary);\n color: var(--color-text-light);\n --icon-color: var(--color-text-light);\n }\n\n .dark {\n background: var(--color-overlay-dark);\n text-shadow: none;\n }\n\n .clickable {\n cursor: pointer;\n }\n\n .shadow {\n box-shadow: 1px 1px 2px 1px rgba(0, 0, 0, 0.1);\n }\n `;\n }\n\n @property({ type: Boolean })\n clickable: boolean;\n\n @property({ type: Boolean })\n primary: boolean;\n\n @property({ type: Boolean })\n secondary: boolean;\n\n @property({ type: Boolean })\n tertiary: boolean;\n\n @property({ type: Boolean })\n danger: boolean;\n\n @property({ type: Boolean })\n dark: boolean;\n\n @property({ type: Boolean })\n shadow: boolean;\n\n @property({ type: String })\n icon: string;\n\n @property()\n backgroundColor: string;\n\n @property()\n textColor: string;\n\n public render(): TemplateResult {\n const labelStyle = {};\n\n if (this.backgroundColor) {\n labelStyle['background'] = this.backgroundColor;\n }\n\n if (this.textColor) {\n labelStyle['color'] = this.textColor;\n labelStyle['--icon-color'] = this.textColor;\n }\n\n return html`\n <div\n class=\"label ${getClasses({\n clickable: this.clickable,\n primary: this.primary,\n secondary: this.secondary,\n tertiary: this.tertiary,\n shadow: this.shadow,\n danger: this.danger,\n dark: this.dark,\n })}\"\n style=${styleMap(labelStyle)}\n >\n <div class=\"mask\">\n ${this.icon ? html`<temba-icon name=${this.icon} />` : null}\n <slot></slot>\n </div>\n </div>\n `;\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nyaruka/temba-components",
3
- "version": "0.58.0",
3
+ "version": "0.58.1",
4
4
  "description": "Web components to support rapidpro and related projects",
5
5
  "author": "Nyaruka <code@nyaruka.coim>",
6
6
  "main": "dist/index.js",
@@ -12,6 +12,9 @@ export default class Label extends LitElement {
12
12
 
13
13
  slot {
14
14
  white-space: nowrap;
15
+ overflow-x: hidden;
16
+ text-overflow: ellipsis;
17
+ display: block;
15
18
  }
16
19
 
17
20
  .mask {