@fluid-topics/ft-checkbox 0.3.21 → 0.3.22

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.
@@ -68,12 +68,12 @@ var at,lt;class ht extends S{constructor(){super(...arguments),this.renderOption
68
68
  * @license
69
69
  * Copyright 2021 Google LLC
70
70
  * SPDX-License-Identifier: BSD-3-Clause
71
- */var dt,ut,yt=function(t,e,i,o){for(var r,s=arguments.length,n=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(r=t[a])&&(n=(s<3?r(n):s>3?r(e,i,n):r(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};class bt extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:o}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const r=this.renderOptions.creationScope=this.attachShadow({...o,customElements:t.registry});return y(r,this.constructor.elementStyles),r}}}(ht)){getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),K`
71
+ */var dt,ut,yt=function(t,e,i,o){for(var r,s=arguments.length,n=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(r=t[a])&&(n=(s<3?r(n):s>3?r(e,i,n):r(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};class bt extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:o}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const r=this.renderOptions.creationScope=this.attachShadow({...o,customElements:t.registry});return y(r,this.constructor.elementStyles),r}}}(ht)){constructor(){super(...arguments),this.exportpartsDebouncer=new e(5)}getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),K`
72
72
  ${t.map((t=>K`
73
73
  <style>${t}</style>
74
74
  `))}
75
75
  ${this.getTemplate()}
76
- `}updated(t){super.updated(t),setTimeout((()=>{var e;this.contentAvailableCallback(t),(null===(e=this.exportpartsPrefix)||void 0===e?void 0:e.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}),0)}setExportpartsAttribute(t){var e,i,o,r,s,n;const a=t=>null!=t&&t.trim().length>0,l=t.filter(a).map((t=>t.trim()));if(0===l.length)return void this.removeAttribute("exportparts");const h=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(r=null===(o=t.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==r?r:[],i=null!==(n=null===(s=t.getAttribute("exportparts"))||void 0===s?void 0:s.split(",").map((t=>t.split(":")[1])))&&void 0!==n?n:[];new Array(...e,...i).filter(a).map((t=>t.trim())).forEach((t=>h.add(t)))}if(0===h.size)return void this.removeAttribute("exportparts");const c=[...h.values()].flatMap((t=>l.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...c].join(", "))}contentAvailableCallback(t){}}yt([o()],bt.prototype,"exportpartsPrefix",void 0),yt([function(t,e){const i=()=>JSON.parse(JSON.stringify(t));return o({type:Object,converter:{fromAttribute:t=>{if(null==t)return i();try{return JSON.parse(t)}catch{return i()}},toAttribute:t=>JSON.stringify(t)},...null!=e?e:{}})}([])],bt.prototype,"exportpartsPrefixes",void 0),u`
76
+ `}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){}scheduleExportpartsUpdate(){this.exportpartsDebouncer.run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var e,i,o,r,s,n;const a=t=>null!=t&&t.trim().length>0,l=t.filter(a).map((t=>t.trim()));if(0===l.length)return void this.removeAttribute("exportparts");const h=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(r=null===(o=t.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==r?r:[],i=null!==(n=null===(s=t.getAttribute("exportparts"))||void 0===s?void 0:s.split(",").map((t=>t.split(":")[1])))&&void 0!==n?n:[];new Array(...e,...i).filter(a).map((t=>t.trim())).forEach((t=>h.add(t)))}if(0===h.size)return void this.removeAttribute("exportparts");const c=[...h.values()].flatMap((t=>l.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...c].join(", "))}}yt([o()],bt.prototype,"exportpartsPrefix",void 0),yt([function(t,e){const i=()=>JSON.parse(JSON.stringify(t));return o({type:Object,converter:{fromAttribute:t=>{if(null==t)return i();try{return JSON.parse(t)}catch{return i()}},toAttribute:t=>JSON.stringify(t)},...null!=e?e:{}})}([])],bt.prototype,"exportpartsPrefixes",void 0),u`
77
77
  .ft-no-text-select {
78
78
  -webkit-touch-callout: none;
79
79
  -webkit-user-select: none;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-checkbox",
3
- "version": "0.3.21",
3
+ "version": "0.3.22",
4
4
  "description": "A checkbox component",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,10 +19,10 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-ripple": "0.3.21",
23
- "@fluid-topics/ft-typography": "0.3.21",
24
- "@fluid-topics/ft-wc-utils": "0.3.21",
22
+ "@fluid-topics/ft-ripple": "0.3.22",
23
+ "@fluid-topics/ft-typography": "0.3.22",
24
+ "@fluid-topics/ft-wc-utils": "0.3.22",
25
25
  "lit": "2.2.8"
26
26
  },
27
- "gitHead": "44d378afb4633e1b5a2be18fb6051968816e577a"
27
+ "gitHead": "5ca6dd4bc6ec9dca0bf645892ec3f07e4b62683d"
28
28
  }