@limetech/lime-elements 39.24.1 → 39.25.0
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 +18 -0
- package/dist/cjs/{_assignValue-DpsLUlF4.js → _assignValue-DQh76m39.js} +2 -2
- package/dist/cjs/{_baseEach-C570gT5Y.js → _baseEach-Bygi-un6.js} +2 -2
- package/dist/cjs/{_baseIsEqual-aOPReRWl.js → _baseIsEqual-CQZKiKbe.js} +20 -365
- package/dist/cjs/{_baseIteratee-DggA4e7a.js → _baseIteratee-DDklwtn9.js} +6 -4
- package/dist/cjs/{_defineProperty-BDFOiqJL.js → _defineProperty-Csu6P9HT.js} +1 -1
- package/dist/cjs/{_getAllKeysIn-BQIV8aw7.js → _getAllKeysIn-BJsgUTAt.js} +5 -4
- package/dist/cjs/{_getNative-B4n5HX2B.js → _getNative-Cf52giNE.js} +2 -2
- package/dist/cjs/_getTag-BC28Za7d.js +355 -0
- package/dist/cjs/_isIndex-Bu45fvR7.js +27 -0
- package/dist/cjs/{_isIterateeCall-CPWXFS_s.js → _isIterateeCall-BUGt9SrH.js} +4 -3
- package/dist/cjs/{cloneDeep-CxFNKF1Y.js → cloneDeep-hE40Q8aw.js} +13 -12
- package/dist/cjs/{difference-Bfsq4sXB.js → difference-B543MGsY.js} +5 -4
- package/dist/cjs/eq-DFcUoVzv.js +39 -0
- package/dist/cjs/file-metadata-BrhOssGG.js +76 -0
- package/dist/cjs/{files-Cf615Ytp.js → files-Bt11HLi4.js} +1 -1
- package/dist/cjs/{focus-trigger-element-Brw8VubX.js → focus-trigger-element-BfnJmxKO.js} +1 -1
- package/dist/{esm/file-metadata-BwF9vTXN.js → cjs/icons-isR5V1X0.js} +4 -69
- package/dist/cjs/{isArrayLike-_dR1U5-Y.js → isArrayLike-C2RwZMG4.js} +2 -27
- package/dist/cjs/{isEmpty-EBCFxX1S.js → isEmpty-CCxl3bYc.js} +6 -6
- package/dist/cjs/{isEqual-bXyw7kXo.js → isEqual-Cd9J8a5-.js} +1 -1
- package/dist/cjs/{eq-B1KBAwmK.js → isFunction-RSHwsz1x.js} +0 -37
- package/dist/cjs/lime-elements.cjs.js +1 -1
- package/dist/cjs/{limel-breadcrumbs_7.cjs.entry.js → limel-breadcrumbs_8.cjs.entry.js} +74 -8
- package/dist/cjs/limel-chip-set.cjs.entry.js +588 -0
- package/dist/cjs/limel-chip_2.cjs.entry.js +33 -540
- package/dist/cjs/limel-dialog.cjs.entry.js +9 -6
- package/dist/cjs/limel-email-viewer.cjs.entry.js +15 -10
- package/dist/cjs/limel-file-dropzone_2.cjs.entry.js +12 -8
- package/dist/cjs/limel-file.cjs.entry.js +2 -1
- package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +5 -3
- package/dist/cjs/limel-form.cjs.entry.js +28 -25
- package/dist/cjs/limel-helper-line.cjs.entry.js +42 -0
- package/dist/cjs/limel-popover_2.cjs.entry.js +6 -5
- package/dist/cjs/limel-profile-picture.cjs.entry.js +3 -2
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +16 -12
- package/dist/cjs/limel-tab-bar.cjs.entry.js +11 -8
- package/dist/cjs/limel-table.cjs.entry.js +14 -11
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{pickBy-kLjYLoam.js → pickBy-D-X6S5kg.js} +5 -5
- package/dist/collection/components/chip-set/chip-set-input-helpers.js +8 -3
- package/dist/collection/components/chip-set/chip-set.js +9 -3
- package/dist/collection/components/email-viewer/email-viewer.css +7 -33
- package/dist/collection/components/email-viewer/email-viewer.js +16 -9
- package/dist/esm/{_assignValue-DOEO9byf.js → _assignValue-CEFvyZxO.js} +2 -2
- package/dist/esm/{_baseEach-C4UJIc96.js → _baseEach-lvj-g1Zj.js} +2 -2
- package/dist/esm/{_baseIsEqual-DCZXUzsZ.js → _baseIsEqual-B6bIeexY.js} +10 -346
- package/dist/esm/{_baseIteratee-CI-QZdpx.js → _baseIteratee-CEZRuq23.js} +4 -2
- package/dist/esm/{_defineProperty-yVdnnt__.js → _defineProperty-C69Btzid.js} +1 -1
- package/dist/esm/{_getAllKeysIn-v-KlW5r_.js → _getAllKeysIn-kT3KizYN.js} +3 -2
- package/dist/esm/{_getNative-aN4R8EiP.js → _getNative-COawFdVX.js} +1 -1
- package/dist/esm/_getTag-CMJL-6hk.js +344 -0
- package/dist/esm/_isIndex-B--C3qwe.js +25 -0
- package/dist/esm/{_isIterateeCall-CTcCv8Mb.js → _isIterateeCall-Bb4gUZLK.js} +3 -2
- package/dist/esm/{cloneDeep-V4fB8wfG.js → cloneDeep-CL7UD3mR.js} +4 -3
- package/dist/esm/{difference-CWrdq-hd.js → difference-DND5tWiA.js} +4 -3
- package/dist/esm/eq-CZ30nDJE.js +37 -0
- package/dist/esm/file-metadata-BHzkIH4g.js +71 -0
- package/dist/esm/{files-P324wLau.js → files-CZAZotms.js} +1 -1
- package/dist/esm/{focus-trigger-element-DubROLkE.js → focus-trigger-element-BOFcjLq3.js} +1 -1
- package/dist/{cjs/file-metadata-rQ0WzFlZ.js → esm/icons-Bu_YRgCL.js} +1 -75
- package/dist/esm/{isArrayLike-D1QkaJU2.js → isArrayLike-CyVGB489.js} +2 -26
- package/dist/esm/{isEmpty-BFxMjh_H.js → isEmpty-DHgukT5k.js} +2 -2
- package/dist/esm/{isEqual-CsrptmTU.js → isEqual-4tbMaaf_.js} +1 -1
- package/dist/esm/{eq-D7VMHFyO.js → isFunction-9zQTeQI8.js} +1 -37
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/{limel-breadcrumbs_7.entry.js → limel-breadcrumbs_8.entry.js} +71 -6
- package/dist/esm/limel-chip-set.entry.js +586 -0
- package/dist/esm/limel-chip_2.entry.js +35 -542
- package/dist/esm/limel-dialog.entry.js +9 -6
- package/dist/esm/limel-email-viewer.entry.js +15 -10
- package/dist/esm/limel-file-dropzone_2.entry.js +12 -8
- package/dist/esm/limel-file.entry.js +2 -1
- package/dist/esm/limel-flatpickr-adapter.entry.js +5 -3
- package/dist/esm/limel-form.entry.js +18 -15
- package/dist/esm/limel-helper-line.entry.js +40 -0
- package/dist/esm/limel-popover_2.entry.js +6 -5
- package/dist/esm/limel-profile-picture.entry.js +3 -2
- package/dist/esm/limel-prosemirror-adapter.entry.js +16 -12
- package/dist/esm/limel-tab-bar.entry.js +11 -8
- package/dist/esm/limel-table.entry.js +14 -11
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{pickBy-D8CUtxE4.js → pickBy-C4C3CM4m.js} +4 -4
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/p-01651634.entry.js +1 -0
- package/dist/lime-elements/p-4ecd565b.entry.js +1 -0
- package/dist/lime-elements/p-5442e09e.entry.js +13 -0
- package/dist/lime-elements/p-56bkn1D-.js +1 -0
- package/dist/lime-elements/p-60327283.entry.js +1 -0
- package/dist/lime-elements/{p-cfe85e59.entry.js → p-6eaa9776.entry.js} +10 -10
- package/dist/lime-elements/p-72b9d03e.entry.js +1 -0
- package/dist/lime-elements/p-80162ba0.entry.js +1 -0
- package/dist/lime-elements/p-9W8bTt2G.js +1 -0
- package/dist/lime-elements/p-B--C3qwe.js +1 -0
- package/dist/lime-elements/p-B8yl2MCT.js +1 -0
- package/dist/lime-elements/p-BAR6am-7.js +1 -0
- package/dist/lime-elements/p-BCq5M9TE.js +1 -0
- package/dist/lime-elements/p-BE1Efiuj.js +1 -0
- package/dist/lime-elements/p-BYfPV0O4.js +1 -0
- package/dist/lime-elements/p-BcJ-TDVt.js +1 -0
- package/dist/lime-elements/p-BsX7ma3n.js +1 -0
- package/dist/lime-elements/p-Bu_YRgCL.js +1 -0
- package/dist/lime-elements/p-ByzvFNMm.js +1 -0
- package/dist/lime-elements/{p-CWuGCKo1.js → p-C4caLnTg.js} +1 -1
- package/dist/lime-elements/p-CR7u-m0b.js +1 -0
- package/dist/lime-elements/p-CVzgpz9P.js +1 -0
- package/dist/lime-elements/p-CZ30nDJE.js +1 -0
- package/dist/lime-elements/{p-BvDmWgCs.js → p-D0F7gOYG.js} +1 -1
- package/dist/lime-elements/p-D4RdItCq.js +1 -0
- package/dist/lime-elements/p-D8H5afYg.js +1 -0
- package/dist/lime-elements/p-DbBZn7JO.js +1 -0
- package/dist/lime-elements/p-DtrvybFR.js +1 -0
- package/dist/lime-elements/{p-8139d26a.entry.js → p-a712087a.entry.js} +3 -3
- package/dist/lime-elements/p-b1645d2d.entry.js +1 -0
- package/dist/lime-elements/p-c8eabc9d.entry.js +1 -0
- package/dist/lime-elements/p-cba2dbb6.entry.js +1 -0
- package/dist/lime-elements/{p-e720f65c.entry.js → p-d00ec6c2.entry.js} +3 -3
- package/dist/lime-elements/{p-a416d439.entry.js → p-e5c7cac0.entry.js} +2 -2
- package/dist/lime-elements/p-f6e58e6c.entry.js +1 -0
- package/dist/lime-elements/p-f867b424.entry.js +1 -0
- package/dist/lime-elements/p-mmkVLOjW.js +1 -0
- package/dist/types/components/chip-set/chip-set.d.ts +1 -0
- package/dist/types/components/chip-set/chip.types.d.ts +9 -0
- package/dist/types/components/email-viewer/email-viewer.d.ts +0 -1
- package/dist/types/components.d.ts +4 -0
- package/package.json +1 -1
- package/dist/cjs/limel-helper-line_2.cjs.entry.js +0 -107
- package/dist/cjs/limel-linear-progress.cjs.entry.js +0 -59
- package/dist/esm/limel-helper-line_2.entry.js +0 -104
- package/dist/esm/limel-linear-progress.entry.js +0 -57
- package/dist/lime-elements/p-4118be32.entry.js +0 -13
- package/dist/lime-elements/p-48db87d3.entry.js +0 -1
- package/dist/lime-elements/p-4e9baf08.entry.js +0 -1
- package/dist/lime-elements/p-59f1460d.entry.js +0 -1
- package/dist/lime-elements/p-7uuv3HUP.js +0 -1
- package/dist/lime-elements/p-811c4820.entry.js +0 -1
- package/dist/lime-elements/p-83e084f9.entry.js +0 -1
- package/dist/lime-elements/p-9a378cf0.entry.js +0 -1
- package/dist/lime-elements/p-BTHqaZIi.js +0 -1
- package/dist/lime-elements/p-Bj622DVt.js +0 -1
- package/dist/lime-elements/p-Bp0tNo1s.js +0 -1
- package/dist/lime-elements/p-C3Myy3mA.js +0 -1
- package/dist/lime-elements/p-CXgJVvTe.js +0 -1
- package/dist/lime-elements/p-CxfAgSVd.js +0 -1
- package/dist/lime-elements/p-DNIqLXTL.js +0 -1
- package/dist/lime-elements/p-D_uMnX5g.js +0 -1
- package/dist/lime-elements/p-DbC-smVQ.js +0 -1
- package/dist/lime-elements/p-DlJXKdhK.js +0 -1
- package/dist/lime-elements/p-DtS35Df5.js +0 -1
- package/dist/lime-elements/p-SvuA3Boo.js +0 -1
- package/dist/lime-elements/p-b306735b.entry.js +0 -1
- package/dist/lime-elements/p-c1c635c1.entry.js +0 -1
- package/dist/lime-elements/p-cebdd797.entry.js +0 -1
- package/dist/lime-elements/p-efBXH4mj.js +0 -1
- package/dist/lime-elements/p-f_1nwOC8.js +0 -1
- package/dist/lime-elements/p-fd4a4f87.entry.js +0 -1
- package/dist/lime-elements/p-v6b303K5.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as s,H as e,a as r}from"./p-DBTJNfo7.js";import{c as o,i as a}from"./p-C4caLnTg.js";import{a as n}from"./p-DtrvybFR.js";import{c as h}from"./p-BE1Efiuj.js";import{i as c}from"./p-B8VKuhvH.js";import{c as l}from"./p-JbKhhoXs.js";import"./p-BCq5M9TE.js";import"./p-Bu_YRgCL.js";import"./p-CgNJbSP4.js";import"./p-mmkVLOjW.js";import"./p-CZ30nDJE.js";import"./p-D4RdItCq.js";import"./p-BJQylLSL.js";import"./p-oiMYqRQ0.js";import"./p-BYfPV0O4.js";import"./p-BcJ-TDVt.js";import"./p-DbBZn7JO.js";import"./p-B--C3qwe.js";import"./p-BOEi1C7r.js";import"./p-CK4jS9_E.js";function p(t,i,s,e){for(var r=-1,o=null==t?0:t.length;++r<o;){var a=t[r];i(e,a,s(a),t)}return e}function f(t,i,s,e){return n(t,(function(t,r,o){i(e,t,s(t),o)})),e}var m,d,b=(m=function(t,i,s){t[s?0:1].push(i)},d=function(){return[[],[]]},function(t,i){var s=c(t)?p:f,e=d?[[],[]]:{};return s(t,m,h(i),e)});const u=class{constructor(e){t(this,e),this.filesSelected=i(this,"filesSelected"),this.filesRejected=i(this,"filesRejected"),this.accept="*",this.disabled=!1,this.helperText="",this.hasFileToDrop=!1,this.renderOnDragLayout=()=>{if(!this.disabled&&this.hasFileToDrop)return s("div",{class:"has-file-to-drop"},s("limel-icon",{class:"icon",name:"upload_2"}),s("div",{class:"text-helpertext"},this.renderText(),this.renderHelperText()))},this.renderText=()=>{if(this.text)return s("span",{class:"text"},this.text)},this.renderHelperText=()=>{if(this.helperText)return s("span",{class:"helper-text"},this.helperText)},this.handleDrop=t=>{if(t.stopPropagation(),t.preventDefault(),this.hasFileToDrop=!1,this.disabled)return;const i=[...t.dataTransfer.files].map(o),[s,e]=b(i,(t=>a(t,this.accept)));s.length>0&&this.filesSelected.emit(s),e.length>0&&this.filesRejected.emit(e)},this.handleDragOver=t=>{this.hasFileToDrop=!0,t.preventDefault()},this.handleDragLeave=t=>{this.hasFileToDrop=!1,t.preventDefault()}}render(){return s(e,{key:"a66ef9c3d9a005567749b61967a63caa4496135a",onDrop:this.handleDrop,onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave},s("slot",{key:"7a770aa9f98365da4b83038662f04c0e9e5c20c6"}),this.renderOnDragLayout())}};u.style=":host(limel-file-dropzone){display:block;position:relative}.has-file-to-drop{animation:display-drop-zone 0.6s ease forwards;box-sizing:border-box;isolation:isolate;z-index:1;position:absolute;inset:0.25rem;overflow:hidden;display:flex;justify-content:center;align-items:center;gap:0.5rem;color:rgb(var(--contrast-700));border:0.125rem dashed rgb(var(--color-cyan-light));border-radius:0.75rem}.text-helpertext{display:flex;flex-direction:column;justify-content:center;align-items:flex-start}.icon{width:clamp(2rem, 5vh, 7rem)}.text{font-size:clamp(1rem, 2vh, 1.75rem)}.helper-text{font-size:clamp(0.75rem, 1.5vh, 1rem)}@keyframes display-drop-zone{0%{background-color:rgb(var(--contrast-1100), 0);backdrop-filter:blur(0);-webkit-backdrop-filter:blur(0);scale:0.9;opacity:0}50%{scale:1;opacity:1}100%{background-color:rgb(var(--contrast-1100), 0.8);backdrop-filter:blur(0.25rem);-webkit-backdrop-filter:blur(0.25rem)}}";const j=class{constructor(s){t(this,s),this.filesSelected=i(this,"filesSelected"),this.accept="*",this.disabled=!1,this.multiple=!1,this.fileInputId=l(),this.handleClick=t=>{if(this.disabled)return t.stopPropagation(),void t.preventDefault();this.triggerFileDialog(),t.stopPropagation()},this.handleKeyUp=t=>{t.stopPropagation(),t.preventDefault(),"Enter"===t.code&&this.triggerFileDialog()},this.handleFileChange=t=>{const i=[...this.fileInput.files];i.length>0&&(t.stopPropagation(),this.filesSelected.emit(i.map(o)),this.fileInput.value="")}}componentDidLoad(){this.fileInput=this.element.shadowRoot.getElementById(this.fileInputId)}render(){return s(e,{key:"62d72f49b1a71bef9c5b91c36f34f763a04d78e2",onClick:this.handleClick,onKeyUp:this.handleKeyUp,onKeyDown:this.handleKeyDown},s("input",{key:"72272f710f8ffb09eec2ace7409ab516ec4f80bd",hidden:!0,id:this.fileInputId,onChange:this.handleFileChange,type:"file",accept:this.accept,disabled:this.disabled,multiple:this.multiple}),s("slot",{key:"7ecff23ba41d76a23a2b8a542f56044615cb8b24"}))}handleKeyDown(t){"Tab"!==t.code&&"Backspace"!==t.code&&"Enter"!==t.code&&(t.preventDefault(),t.stopPropagation())}triggerFileDialog(){this.fileInput.click()}get element(){return r(this)}};export{u as limel_file_dropzone,j as limel_file_input}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as i,h as t,H as r,a as o}from"./p-DBTJNfo7.js";import{g as s}from"./p-5KsJICvh.js";import{g as a}from"./p-CgNJbSP4.js";import{m as l,r as n}from"./p-BgTwPGeH.js";import{t as h}from"./p-Dv3YcsA7.js";import{D as c,B as d}from"./p-rI0IeKpx.js";import{i as m}from"./p-D8H5afYg.js";import"./p-D4RdItCq.js";import"./p-BJQylLSL.js";import"./p-oiMYqRQ0.js";import"./p-BYfPV0O4.js";import"./p-BcJ-TDVt.js";import"./p-DbBZn7JO.js";import"./p-B8VKuhvH.js";const p=class{constructor(r){e(this,r),this.remove=i(this,"remove"),this.menuItemSelected=i(this,"menuItemSelected"),this.language="en",this.disabled=!1,this.readonly=!1,this.selected=!1,this.invalid=!1,this.removable=!1,this.type="default",this.loading=!1,this.identifier=crypto.randomUUID(),this.size="default",this.menuItems=[],this.renderAsButton=()=>[t("button",{id:"chip-"+this.identifier,class:"chip",role:"button",disabled:this.disabled||this.readonly,"aria-busy":this.loading?"true":"false","aria-live":"polite",onKeyDown:this.handleDeleteKeyDown},this.renderSpinner(),this.renderPicture(),this.renderLabel(),this.renderBadge(),this.renderProgressBar()),this.renderRemoveButton(),this.renderActionsMenu()],this.renderAsLink=()=>{var e,i;const r=s(null===(e=this.link)||void 0===e?void 0:e.target,null===(i=this.link)||void 0===i?void 0:i.rel);return[t("a",{id:"chip-"+this.identifier,class:"chip",href:this.link.href,title:this.link.title,target:this.link.target,rel:r,"aria-disabled":this.disabled||this.readonly,tabindex:this.disabled||this.readonly?-1:0,onKeyDown:this.handleDeleteKeyDown},this.renderSpinner(),this.renderPicture(),this.renderLabel(),this.renderBadge(),this.renderProgressBar()),this.renderRemoveButton(),this.renderActionsMenu()]},this.renderLabel=()=>t("span",{class:"text"},this.text),this.filterClickWhenDisabled=e=>{(this.disabled||this.readonly)&&e.preventDefault()},this.handleRemoveClick=e=>{e.stopPropagation(),this.remove.emit(this.identifier)},this.handleDeleteKeyDown=e=>{this.removable&&[c,d].includes(e.key)&&this.handleRemoveClick(e)},this.removeChipLabel=()=>`${this.getTranslation("remove")} ${this.text}`,this.actionMenuLabel=()=>this.getTranslation("file-viewer.more-actions"),this.getTranslation=e=>h.get(e,this.language),this.handleActionMenuSelect=e=>{const i=e.detail;i&&("_remove"!==i.value?this.menuItemSelected.emit(i):this.remove.emit(this.identifier))},this.handleActionMenuCancel=e=>{e.stopPropagation()}}componentWillLoad(){l(this.host)}disconnectedCallback(){n(this.host)}render(){return t(r,{key:"32f0df7f6665bd8b7ae90c423e1052b60a6f3823",onClick:this.filterClickWhenDisabled},this.link?this.renderAsLink():this.renderAsButton())}renderPicture(){var e,i;const r=a(this.icon);if(r||this.image)return m(this.image)?t("limel-icon",{badge:!0,name:r,style:{color:`${null===(e=this.icon)||void 0===e?void 0:e.color}`,"background-color":`${null===(i=this.icon)||void 0===i?void 0:i.backgroundColor}`}}):t("img",{src:this.image.src,alt:this.image.alt,loading:"lazy"})}renderBadge(){if(this.badge)return t("limel-badge",{label:this.badge})}renderRemoveButton(){var e;if(this.removable&&!this.readonly&&!this.disabled&&!(null===(e=this.menuItems)||void 0===e?void 0:e.length))return t("button",{class:"trailing-button remove-button",tabIndex:-1,"aria-label":this.removeChipLabel(),"aria-controls":"chip-"+this.identifier,innerHTML:'<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path fill="none" stroke="currentColor" stroke-width="2" d="m8 8 16 16M24 8 8 24"/></svg>',onClick:this.handleRemoveClick})}renderActionsMenu(){var e;if(!(null===(e=this.menuItems)||void 0===e?void 0:e.length))return;const i=this.getMenuItems();return t("limel-menu",{items:i,onSelect:this.handleActionMenuSelect,openDirection:"bottom-end",onCancel:this.handleActionMenuCancel},t("button",{slot:"trigger",disabled:this.disabled,class:"trailing-button","aria-label":this.actionMenuLabel(),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" xml:space="preserve"><circle fill="currentColor" cx="16" cy="16" r="2"/><circle fill="currentColor" cx="16" cy="24" r="2"/><circle fill="currentColor" cx="16" cy="8" r="2"/></svg>'}))}getMenuItems(){let e=[...this.menuItems];return this.removable&&(e=[...e,{separator:!0},{text:this.removeChipLabel(),icon:{name:"delete_sign",color:"rgb(var(--color-red-default))"},value:"_remove"}]),e}renderSpinner(){if(this.loading)return t("limel-linear-progress",{indeterminate:!0})}renderProgressBar(){if(this.progress)return t("div",{role:"progressbar","aria-label":"%","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":this.progress,style:{"--limel-chip-progress-percentage":this.progress+"%"}})}static get delegatesFocus(){return!0}get host(){return o(this)}};p.style='@charset "UTF-8";.text{transition:padding-left 0.4s ease}limel-linear-progress{position:absolute;z-index:1;margin:auto;left:0.25rem;width:1.25rem}:host(limel-chip[loading]) .chip:before{content:"";position:absolute;left:0;width:var(--limel-chip-height);height:var(--limel-chip-height);border-radius:50%;scale:0.9;background-color:rgba(var(--contrast-600), 0.8)}:host(limel-chip[loading]) .chip:not(:has(limel-icon)) .text{padding-left:calc(var(--limel-chip-height) + 0.25rem)}div[role=progressbar]{--limel-chip-progressbar-offset:0.1875rem;--limel-chip-progressbar-stripe-color:rgb(var(--contrast-100), 0.3);--limel-chip-progressbar-stripe-size:1.5rem;pointer-events:none;position:absolute;display:flex;align-items:center;justify-content:end;inset:var(--limel-chip-progressbar-offset);max-width:calc(100% - var(--limel-chip-progressbar-offset) * 2);border-radius:inherit;background-color:var(--chip-progress-color, rgb(var(--contrast-700)));width:var(--limel-chip-progress-percentage);opacity:0.8;mix-blend-mode:var(--limel-chip-progress-mix-blend-mode)}div[role=progressbar]:after{content:"";transform:translate3d(0, 0, 0);position:absolute;inset:1px;background-image:linear-gradient(-45deg, var(--limel-chip-progressbar-stripe-color) 25%, transparent 25%, transparent 50%, var(--limel-chip-progressbar-stripe-color) 50%, var(--limel-chip-progressbar-stripe-color) 75%, transparent 75%, transparent);z-index:1;background-size:var(--limel-chip-progressbar-stripe-size) var(--limel-chip-progressbar-stripe-size);animation:move 2.5s linear infinite;border-radius:inherit}@media (prefers-reduced-motion){div[role=progressbar]:after{animation:none}}@keyframes move{0%{background-position:0 0}100%{background-position:calc(var(--limel-chip-progressbar-stripe-size) * -1) calc(var(--limel-chip-progressbar-stripe-size) * -1)}}:host(limel-chip){--limel-chip-height:var(--limel-chip-size, 1.75rem);--limel-chip-gap:0.5rem;isolation:isolate;display:inline-flex;align-items:center;min-width:0;max-width:min(var(--chip-max-width, 100%), 25rem)}:host(limel-chip)::before{content:"";align-self:baseline;line-height:var(--limel-chip-height);font-size:var(--limel-theme-default-font-size, 0.875rem)}:host(limel-chip[size=small]){--limel-chip-height:1.5rem;--limel-chip-gap:0.25rem}:host(limel-chip[size=small]) .text{font-size:var(--limel-theme-default-small-font-size)}*{box-sizing:border-box}.chip{all:unset;position:relative;min-width:0;display:inline-flex;align-items:center;justify-content:center;gap:0.25rem;max-width:100%;height:var(--limel-chip-height);border-radius:var(--limel-chip-height);font-size:clamp(0.8125rem, var(--limel-chip-height) - 0.875rem, 1rem);padding:0 0.125rem}.chip:has(limel-icon) .text,.chip:has(img) .text{padding-left:0}.chip:not([disabled]):focus{outline:none}.chip:not([disabled]):focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.chip:not([disabled]){transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal)}.chip:not([disabled]):hover,.chip:not([disabled]):focus,.chip:not([disabled]):focus-visible{will-change:color, background-color, box-shadow, transform}.chip:not([disabled]):hover,.chip:not([disabled]):focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.chip:not([disabled]):hover{box-shadow:var(--button-shadow-hovered)}.chip:not([disabled]):active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);background-color:var(--limel-theme-surface-background-color);box-shadow:var(--button-shadow-inset-pressed)}.chip:not([disabled]):hover,.chip:not([disabled]):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.chip:has(limel-badge){padding-right:0.375rem}.chip:has(limel-badge) .text{padding-right:0}.chip:has(+.remove-button:hover){box-shadow:var(--shadow-depth-8-error)}.chip:has(+limel-menu),.chip:has(+.trailing-button){padding-right:calc(var(--limel-chip-height) + 0.125rem)}.chip:has(+limel-menu) .text,.chip:has(+.trailing-button) .text{padding-right:0}:host(limel-chip[disabled]:not([disabled=false])) .chip{color:rgba(var(--contrast-1600), 0.37);background-color:rgba(var(--contrast-1600), 0.1);box-shadow:none}:host(limel-chip[readonly]:not([readonly=false])) .chip{box-shadow:0 0 0 1px var(--chip-readonly-border-color, rgb(var(--contrast-800), 0.5))}:host(limel-chip[selected]:not([selected=false])) .chip{box-shadow:var(--button-shadow-inset)}:host(limel-chip[selected]:not([selected=false])) .chip:focus-visible{box-shadow:var(--button-shadow-inset), var(--shadow-depth-8-focused)}:host(limel-chip[selected]:not([selected=false])) .chip:active{box-shadow:var(--button-shadow-inset-pressed)}:host(limel-chip[selected]:not([selected=false])) .text{color:var(--lime-primary-color, var(--limel-theme-primary-color))}:host([aria-expanded=true]) .chip,:host([aria-expanded]:not([aria-expanded=false])) .chip{box-shadow:var(--button-shadow-inset-pressed) !important}:host(limel-chip[type=filter]) .chip{border-top-left-radius:0.5rem;border-bottom-left-radius:0.5rem}:host(limel-chip[type=filter]) .chip:after{content:"";transition:background-color 0.4s ease 0.2s, box-shadow 0.6s ease 0.2s;box-sizing:border-box;position:absolute;bottom:0.125rem;left:0.125rem;width:0.5rem;height:0.5rem;border-radius:50%;background-color:rgb(var(--contrast-800), 0.8);box-shadow:0 0 0 1px rgb(var(--color-white)) inset}:host(limel-chip[type=filter][selected]) .chip:after{background-color:rgb(var(--color-green-default));box-shadow:0 0 0.375rem 0 rgb(var(--color-green-light)), 0 0 0 1px rgb(var(--color-white)) inset}:host(limel-chip[invalid]) .chip{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns=\'http://www.w3.org/2000/svg\'%20viewBox=\'0%200%208%208\'%20style=\'fill-rule:evenodd;\'%3E%3Cpath%20fill=\'rgba(186,186,192,0.16)\'%20d=\'M0%200h4v4H0zM4%204h4v4H4z\'/%3E%3C/svg%3E");background-size:0.5rem;background-color:rgb(var(--color-red-default))}:host(limel-chip[invalid]) .text{color:rgb(var(--color-white))}img,limel-icon{flex-shrink:0;width:calc(var(--limel-chip-height) - 0.25rem);height:calc(var(--limel-chip-height) - 0.25rem)}img{object-fit:cover;border-radius:50%}limel-icon{padding:0.0625rem}limel-badge{pointer-events:none}.text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.2;padding:0 0.5rem;font-size:var(--limel-theme-default-font-size)}button.trailing-button{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:transparent}button.trailing-button:hover,button.trailing-button:focus,button.trailing-button:focus-visible{will-change:color, background-color, box-shadow, transform}button.trailing-button:hover,button.trailing-button:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}button.trailing-button:hover{box-shadow:var(--button-shadow-hovered)}button.trailing-button:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button.trailing-button:hover,button.trailing-button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.trailing-button{z-index:1;flex-shrink:0;display:flex;align-items:center;justify-content:center;margin-left:calc(var(--limel-chip-height) * -1 + 0.125rem);margin-right:0.125rem;width:calc(var(--limel-chip-height) - 0.25rem);height:calc(var(--limel-chip-height) - 0.25rem);border-radius:50%}button.trailing-button svg{transition:color 0.2s ease, transform 0.2s ease;width:1.25rem}button.trailing-button.remove-button:hover{color:rgb(var(--color-red-dark))}button.trailing-button.remove-button:hover svg{transform:scale(0.8)}limel-menu button[slot=trigger]:focus{outline:none}limel-menu button[slot=trigger]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}limel-menu[open] button[slot=trigger]{box-shadow:var(--button-shadow-inset)}';const b=class{constructor(i){e(this,i),this.language="en",this.value=0,this.indeterminate=!1}render(){if(!this.isFinite(this.value))return;const e=h.get("loading",this.language),i=h.get("progress-bar",this.language);return t(r,{role:"progressbar","aria-label":this.accessibleLabel||i,"aria-live":"polite","aria-valuemin":"0","aria-valuemax":"1","aria-valuenow":this.indeterminate?void 0:this.value,"aria-valuetext":this.indeterminate?e:void 0,style:{"--percentage":100*this.value+"%"}},t("div",{class:"progress"}))}watchValue(e){this.isFinite(e)&&this.updateProgress(e)}updateProgress(e){this.host&&this.host.style.setProperty("--percentage",100*e+"%")}isFinite(e){return Number.isFinite(e)}get host(){return o(this)}static get watchers(){return{value:[{watchValue:0}]}}};b.style=':host(limel-linear-progress){isolation:isolate;position:relative;overflow:hidden;display:flex;width:100%;height:0.25rem;border-radius:0.25rem;background-color:var(--background-color, rgb(var(--contrast-800), 0.5))}.progress{height:100%;width:var(--percentage, 0%);border-radius:0.25rem;background-color:var(--lime-primary-color, var(--limel-theme-primary-color))}:host(limel-linear-progress[indeterminate]) .progress{background-color:transparent;width:100%}:host(limel-linear-progress[indeterminate]) .progress:before,:host(limel-linear-progress[indeterminate]) .progress:after{will-change:left, right, opacity;content:"";position:absolute;inset:0;height:100%;border-radius:0.25rem;opacity:0;background-color:var(--lime-primary-color, var(--limel-theme-primary-color))}:host(limel-linear-progress[indeterminate]) .progress:before{animation:indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite}:host(limel-linear-progress[indeterminate]) .progress:after{animation:indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite 1.15s}@keyframes indeterminate{0%{left:-35%;right:100%;opacity:0}10%,80%{opacity:1}60%{left:100%;right:-90%}100%{left:100%;right:-90%;opacity:0}}@keyframes indeterminate-short{0%{left:-200%;right:100%;opacity:0}10%,80%{opacity:1}60%{left:107%;right:-8%}100%{left:107%;right:-8%;opacity:0}}';export{p as limel_chip,b as limel_linear_progress}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as r}from"./p-CZ30nDJE.js";import{b as t,i as n,a as i,c as e,M as u,g as o}from"./p-D4RdItCq.js";import{g as a}from"./p-DbBZn7JO.js";import{r as s,S as f}from"./p-BJQylLSL.js";import{i as c}from"./p-B8VKuhvH.js";import{i as h}from"./p-B--C3qwe.js";import{i as v}from"./p-BYfPV0O4.js";import{i as b}from"./p-oiMYqRQ0.js";function j(r,t){for(var n=-1,i=Array(r);++n<r;)i[n]=t(n);return i}var l=Object.prototype.hasOwnProperty;function p(r,e){var u=c(r),o=!u&&t(r),a=!u&&!o&&n(r),s=!u&&!o&&!a&&i(r),f=u||o||a||s,v=f?j(r.length,String):[],b=v.length;for(var p in r)!e&&!l.call(r,p)||f&&("length"==p||a&&("offset"==p||"parent"==p)||s&&("buffer"==p||"byteLength"==p||"byteOffset"==p)||h(p,b))||v.push(p);return v}function _(r){return v(r)?p(r):e(r)}var d=a(Object,"create"),m=Object.prototype.hasOwnProperty,w=Object.prototype.hasOwnProperty;function y(r){var t=-1,n=null==r?0:r.length;for(this.clear();++t<n;){var i=r[t];this.set(i[0],i[1])}}function O(t,n){for(var i=t.length;i--;)if(r(t[i][0],n))return i;return-1}y.prototype.clear=function(){this.__data__=d?d(null):{},this.size=0},y.prototype.delete=function(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t},y.prototype.get=function(r){var t=this.__data__;if(d){var n=t[r];return"__lodash_hash_undefined__"===n?void 0:n}return m.call(t,r)?t[r]:void 0},y.prototype.has=function(r){var t=this.__data__;return d?void 0!==t[r]:w.call(t,r)},y.prototype.set=function(r,t){var n=this.__data__;return this.size+=this.has(r)?0:1,n[r]=d&&void 0===t?"__lodash_hash_undefined__":t,this};var g=Array.prototype.splice;function A(r){var t=-1,n=null==r?0:r.length;for(this.clear();++t<n;){var i=r[t];this.set(i[0],i[1])}}function B(r,t){var n,i,e=r.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?e["string"==typeof t?"string":"hash"]:e.map}function S(r){var t=-1,n=null==r?0:r.length;for(this.clear();++t<n;){var i=r[t];this.set(i[0],i[1])}}function k(r,t){for(var n=-1,i=t.length,e=r.length;++n<i;)r[e+n]=t[n];return r}function D(r){var t=this.__data__=new A(r);this.size=t.size}function M(){return[]}A.prototype.clear=function(){this.__data__=[],this.size=0},A.prototype.delete=function(r){var t=this.__data__,n=O(t,r);return!(n<0||(n==t.length-1?t.pop():g.call(t,n,1),--this.size,0))},A.prototype.get=function(r){var t=this.__data__,n=O(t,r);return n<0?void 0:t[n][1]},A.prototype.has=function(r){return O(this.__data__,r)>-1},A.prototype.set=function(r,t){var n=this.__data__,i=O(n,r);return i<0?(++this.size,n.push([r,t])):n[i][1]=t,this},S.prototype.clear=function(){this.size=0,this.__data__={hash:new y,map:new(u||A),string:new y}},S.prototype.delete=function(r){var t=B(this,r).delete(r);return this.size-=t?1:0,t},S.prototype.get=function(r){return B(this,r).get(r)},S.prototype.has=function(r){return B(this,r).has(r)},S.prototype.set=function(r,t){var n=B(this,r),i=n.size;return n.set(r,t),this.size+=n.size==i?0:1,this},D.prototype.clear=function(){this.__data__=new A,this.size=0},D.prototype.delete=function(r){var t=this.__data__,n=t.delete(r);return this.size=t.size,n},D.prototype.get=function(r){return this.__data__.get(r)},D.prototype.has=function(r){return this.__data__.has(r)},D.prototype.set=function(r,t){var n=this.__data__;if(n instanceof A){var i=n.__data__;if(!u||i.length<199)return i.push([r,t]),this.size=++n.size,this;n=this.__data__=new S(i)}return n.set(r,t),this.size=n.size,this};var q=Object.prototype.propertyIsEnumerable,C=Object.getOwnPropertySymbols,E=C?function(r){return null==r?[]:(r=Object(r),function(t){for(var n=-1,i=null==t?0:t.length,e=0,u=[];++n<i;){var o=t[n];q.call(r,o)&&(u[e++]=o)}return u}(C(r)))}:M;function J(r,t,n){var i=t(r);return c(r)?i:k(i,n(r))}function L(r){return J(r,_,E)}var R=s.Uint8Array;function V(r){var t=-1,n=null==r?0:r.length;for(this.__data__=new S;++t<n;)this.add(r[t])}function x(r,t){for(var n=-1,i=null==r?0:r.length;++n<i;)if(t(r[n],n,r))return!0;return!1}function Q(r,t){return r.has(t)}function Y(r,t,n,i,e,u){var o=1&n,a=r.length,s=t.length;if(a!=s&&!(o&&s>a))return!1;var f=u.get(r),c=u.get(t);if(f&&c)return f==t&&c==r;var h=-1,v=!0,b=2&n?new V:void 0;for(u.set(r,t),u.set(t,r);++h<a;){var j=r[h],l=t[h];if(i)var p=o?i(l,j,h,t,r,u):i(j,l,h,r,t,u);if(void 0!==p){if(p)continue;v=!1;break}if(b){if(!x(t,(function(r,t){if(!Q(b,t)&&(j===r||e(j,r,n,i,u)))return b.push(t)}))){v=!1;break}}else if(j!==l&&!e(j,l,n,i,u)){v=!1;break}}return u.delete(r),u.delete(t),v}function Z(r){var t=-1,n=Array(r.size);return r.forEach((function(r,i){n[++t]=[i,r]})),n}function H(r){var t=-1,n=Array(r.size);return r.forEach((function(r){n[++t]=r})),n}V.prototype.add=V.prototype.push=function(r){return this.__data__.set(r,"__lodash_hash_undefined__"),this},V.prototype.has=function(r){return this.__data__.has(r)};var I=f?f.prototype:void 0,K=I?I.valueOf:void 0,N=Object.prototype.hasOwnProperty,P="[object Arguments]",U="[object Array]",z="[object Object]",F=Object.prototype.hasOwnProperty;function G(t,e,u,a,s){return t===e||(null==t||null==e||!b(t)&&!b(e)?t!=t&&e!=e:function(t,e,u,a,s,f){var h=c(t),v=c(e),b=h?U:o(t),j=v?U:o(e),l=(b=b==P?z:b)==z,p=(j=j==P?z:j)==z,_=b==j;if(_&&n(t)){if(!n(e))return!1;h=!0,l=!1}if(_&&!l)return f||(f=new D),h||i(t)?Y(t,e,u,a,s,f):function(t,n,i,e,u,o,a){switch(i){case"[object DataView]":if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=n.byteLength||!o(new R(t),new R(n)));case"[object Boolean]":case"[object Date]":case"[object Number]":return r(+t,+n);case"[object Error]":return t.name==n.name&&t.message==n.message;case"[object RegExp]":case"[object String]":return t==n+"";case"[object Map]":var s=Z;case"[object Set]":if(s||(s=H),t.size!=n.size&&!(1&e))return!1;var f=a.get(t);if(f)return f==n;e|=2,a.set(t,n);var c=Y(s(t),s(n),e,u,o,a);return a.delete(t),c;case"[object Symbol]":if(K)return K.call(t)==K.call(n)}return!1}(t,e,b,u,a,s,f);if(!(1&u)){var d=l&&F.call(t,"__wrapped__"),m=p&&F.call(e,"__wrapped__");if(d||m){var w=d?t.value():t,y=m?e.value():e;return f||(f=new D),s(w,y,u,a,f)}}return!!_&&(f||(f=new D),function(r,t,n,i,e,u){var o=1&n,a=L(r),s=a.length;if(s!=L(t).length&&!o)return!1;for(var f=s;f--;){var c=a[f];if(!(o?c in t:N.call(t,c)))return!1}var h=u.get(r),v=u.get(t);if(h&&v)return h==t&&v==r;var b=!0;u.set(r,t),u.set(t,r);for(var j=o;++f<s;){var l=r[c=a[f]],p=t[c];if(i)var _=o?i(p,l,c,t,r,u):i(l,p,c,r,t,u);if(!(void 0===_?l===p||e(l,p,n,i,u):_)){b=!1;break}j||(j="constructor"==c)}if(b&&!j){var d=r.constructor,m=t.constructor;d==m||!("constructor"in r)||!("constructor"in t)||"function"==typeof d&&d instanceof d&&"function"==typeof m&&m instanceof m||(b=!1)}return u.delete(r),u.delete(t),b}(t,e,u,a,s,f))}(t,e,u,a,G,s))}export{S as M,D as S,R as U,V as a,j as b,Q as c,G as d,L as e,k as f,E as g,p as h,M as i,J as j,_ as k,H as s}
|
|
@@ -41,6 +41,7 @@ import { IconName } from '../../global/shared-types/icon.types';
|
|
|
41
41
|
* @exampleComponent limel-example-chip-set-input-type-with-menu-items
|
|
42
42
|
* @exampleComponent limel-example-chip-set-input-type-text
|
|
43
43
|
* @exampleComponent limel-example-chip-set-input-type-search
|
|
44
|
+
* @exampleComponent limel-example-chip-set-input-non-removable
|
|
44
45
|
* @exampleComponent limel-example-chip-icon-color
|
|
45
46
|
* @exampleComponent limel-example-chip-set-image
|
|
46
47
|
* @exampleComponent limel-example-chip-set-composite
|
|
@@ -67,6 +67,15 @@ export interface Chip<T = any> {
|
|
|
67
67
|
iconBackgroundColor?: Color;
|
|
68
68
|
/**
|
|
69
69
|
* Whether the chip should be removable. Not valid for `choice`.
|
|
70
|
+
*
|
|
71
|
+
* For chip-sets of `type="input"`, chips are removable by default.
|
|
72
|
+
* Set this to `false` to "lock" an individual chip so that it cannot
|
|
73
|
+
* be removed by the user — neither via the remove button, nor with
|
|
74
|
+
* Backspace/Delete, nor by the "Clear all" button. Locked chips
|
|
75
|
+
* remain fully interactive (clicks still emit `interact` events).
|
|
76
|
+
*
|
|
77
|
+
* If the entire chip-set is `disabled` or `readonly`, the remove
|
|
78
|
+
* button is hidden on all chips regardless of this flag.
|
|
70
79
|
*/
|
|
71
80
|
removable?: boolean;
|
|
72
81
|
/**
|
|
@@ -809,6 +809,7 @@ export namespace Components {
|
|
|
809
809
|
* @exampleComponent limel-example-chip-set-input-type-with-menu-items
|
|
810
810
|
* @exampleComponent limel-example-chip-set-input-type-text
|
|
811
811
|
* @exampleComponent limel-example-chip-set-input-type-search
|
|
812
|
+
* @exampleComponent limel-example-chip-set-input-non-removable
|
|
812
813
|
* @exampleComponent limel-example-chip-icon-color
|
|
813
814
|
* @exampleComponent limel-example-chip-set-image
|
|
814
815
|
* @exampleComponent limel-example-chip-set-composite
|
|
@@ -4610,6 +4611,7 @@ declare global {
|
|
|
4610
4611
|
* @exampleComponent limel-example-chip-set-input-type-with-menu-items
|
|
4611
4612
|
* @exampleComponent limel-example-chip-set-input-type-text
|
|
4612
4613
|
* @exampleComponent limel-example-chip-set-input-type-search
|
|
4614
|
+
* @exampleComponent limel-example-chip-set-input-non-removable
|
|
4613
4615
|
* @exampleComponent limel-example-chip-icon-color
|
|
4614
4616
|
* @exampleComponent limel-example-chip-set-image
|
|
4615
4617
|
* @exampleComponent limel-example-chip-set-composite
|
|
@@ -7254,6 +7256,7 @@ declare namespace LocalJSX {
|
|
|
7254
7256
|
* @exampleComponent limel-example-chip-set-input-type-with-menu-items
|
|
7255
7257
|
* @exampleComponent limel-example-chip-set-input-type-text
|
|
7256
7258
|
* @exampleComponent limel-example-chip-set-input-type-search
|
|
7259
|
+
* @exampleComponent limel-example-chip-set-input-non-removable
|
|
7257
7260
|
* @exampleComponent limel-example-chip-icon-color
|
|
7258
7261
|
* @exampleComponent limel-example-chip-set-image
|
|
7259
7262
|
* @exampleComponent limel-example-chip-set-composite
|
|
@@ -11660,6 +11663,7 @@ declare module "@stencil/core" {
|
|
|
11660
11663
|
* @exampleComponent limel-example-chip-set-input-type-with-menu-items
|
|
11661
11664
|
* @exampleComponent limel-example-chip-set-input-type-text
|
|
11662
11665
|
* @exampleComponent limel-example-chip-set-input-type-search
|
|
11666
|
+
* @exampleComponent limel-example-chip-set-input-non-removable
|
|
11663
11667
|
* @exampleComponent limel-example-chip-icon-color
|
|
11664
11668
|
* @exampleComponent limel-example-chip-set-image
|
|
11665
11669
|
* @exampleComponent limel-example-chip-set-composite
|
package/package.json
CHANGED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-BjHIBY-I.js');
|
|
4
|
-
|
|
5
|
-
const helperLineCss = () => `:host(limel-helper-line){transition:opacity 0.2s ease;box-sizing:border-box;display:grid;min-width:0;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:0.6875rem;line-height:normal;color:rgb(var(--contrast-1200))}div{display:flex;justify-content:space-between;gap:0.75rem;overflow:hidden;padding:0 1rem}:host(limel-helper-line.invalid){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limel-helper-line.invalid) .helper-text{color:var(--limel-theme-error-color)}.counter{flex-shrink:0;margin-left:auto}.helper-text,.counter{padding-top:0.125rem}:host(limel-helper-line){transition:grid-template-rows var(--limel-h-l-grid-template-rows-transition-speed, 0.46s) cubic-bezier(1, 0.09, 0, 0.89);grid-template-rows:var(--limel-h-l-grid-template-rows, 1fr)}:host(limel-helper-line.hide){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}`;
|
|
6
|
-
|
|
7
|
-
const HelperLine = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
index.registerInstance(this, hostRef);
|
|
10
|
-
/**
|
|
11
|
-
* Turns `true`, when the parent component is invalid.
|
|
12
|
-
* For example, when the parent component is `required` but is left empty.
|
|
13
|
-
* Or when the input format is invalid.
|
|
14
|
-
*/
|
|
15
|
-
this.invalid = false;
|
|
16
|
-
this.hasContent = () => {
|
|
17
|
-
return !!(this.maxLength > 0 ||
|
|
18
|
-
(this.helperText && this.helperText.length > 0));
|
|
19
|
-
};
|
|
20
|
-
this.renderHelperText = () => {
|
|
21
|
-
if (!this.helperText) {
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
return (index.h("span", { class: "helper-text", id: this.helperTextId }, this.helperText));
|
|
25
|
-
};
|
|
26
|
-
this.renderCharacterCounter = () => {
|
|
27
|
-
const counter = `${this.length} / ${this.maxLength}`;
|
|
28
|
-
if (!this.maxLength) {
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
return index.h("span", { class: "counter" }, counter);
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
render() {
|
|
35
|
-
return (index.h(index.Host, { key: '8ef6eb3b3e372e5dc61af1424a88c1c342023d13', tabIndex: -1, class: {
|
|
36
|
-
invalid: this.invalid,
|
|
37
|
-
}, style: this.hasContent() ? {} : { display: 'none' }, "aria-hidden": !this.hasContent() }, index.h("div", { key: '3b4e31c23f5964aabb67556e68bd1785c871d934' }, this.renderHelperText(), this.renderCharacterCounter())));
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
HelperLine.style = helperLineCss();
|
|
41
|
-
|
|
42
|
-
const notchedOutlineCss = () => `@charset "UTF-8";*,*:before,*:after{box-sizing:border-box}limel-notched-outline{--limel-notched-outline-border-color:rgba(var(--contrast-700), 0.65);--limel-notched-outline-background-color:rgba(var(--contrast-200), 0.5);display:block;width:100%;height:fit-content}.limel-notched-outline{position:relative;width:100%;height:100%}.limel-notched-outline [slot=content]{background-color:var(--limel-notched-outline-background-color);border-radius:var(--limel-notched-outline-border-radius, 0.25rem)}.limel-notched-outline--outlines{pointer-events:none;position:absolute;inset:0;z-index:var(--limel-notched-outline-z-index, 0);display:flex}.limel-notched-outline--leading-outline,.limel-notched-outline--notch,.limel-notched-outline--trailing-outline{transition:border-color 0.2s ease;border-width:1px;border-style:solid;border-color:var(--limel-notched-outline-border-color)}.limel-notched-outline--leading-outline{flex-shrink:0;width:0.75rem;border-right-width:0;border-top-left-radius:var(--limel-notched-outline-border-radius, 0.25rem);border-bottom-left-radius:var(--limel-notched-outline-border-radius, 0.25rem)}.limel-notched-outline--notch{flex-shrink:0;position:relative;z-index:2;border-top-color:var(--limel-notched-outline-notch-border-top-color, var(--limel-notched-outline-border-color));border-right-width:0;border-left-width:0;max-width:calc(100% - 1.5rem)}.limel-notched-outline--notch label{all:unset;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;position:relative;transition:color 0.2s ease, font-size 0.2s ease, transform 0.12s cubic-bezier(0.4, 0, 0.2, 1);transform:translate3d(var(--limel-notched-outline-label-transform-x, 0), var(--limel-notched-outline-label-transform-y, 0.62rem), 0);display:block;padding:0 0.25rem;color:var(--limel-notched-outline-label-color, rgba(var(--contrast-1200), 1));font-size:var(--limel-notched-outline-label-font-size, var(--limel-theme-default-font-size));letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);line-height:normal}.limel-notched-outline--notch label:after{position:absolute;right:0;padding:0 0.25rem}.limel-notched-outline--trailing-outline{flex-grow:1;border-left-width:0;border-top-right-radius:var(--limel-notched-outline-border-radius, 0.25rem);border-bottom-right-radius:var(--limel-notched-outline-border-radius, 0.25rem)}.limel-notched-outline--empty-readonly-value .lime-looks-like-input-value{line-height:1.75rem;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:rgba(var(--contrast-1400), 1);font-size:var(--limel-theme-default-font-size);font-weight:400;font-family:inherit;letter-spacing:0.009375em}.mdc-text-field--disabled .limel-notched-outline--empty-readonly-value .lime-looks-like-input-value{cursor:not-allowed;opacity:0.4}.limel-notched-outline--empty-readonly-value{position:absolute;top:0.62rem;left:1rem}limel-notched-outline:not([disabled]:not([disabled=false])):hover{--limel-notched-outline-border-color:rgba(var(--contrast-700), 1);--limel-notched-outline-background-color:rgba(var(--contrast-200), 1)}limel-notched-outline:not([disabled]:not([disabled=false])):has([slot=content]:focus-visible),limel-notched-outline:not([disabled]:not([disabled=false])):has([slot=content]:focus-within){--limel-notched-outline-border-color:var(--lime-primary-color, var(--limel-theme-primary-color));--limel-notched-outline-background-color:rgba(var(--contrast-100), 0.8)}limel-notched-outline[disabled]:not([disabled=false]){--limel-notched-outline-label-color:rgba(var(--contrast-1200), 0.5)}limel-notched-outline[required]:not([required=false]) .limel-notched-outline--notch label{padding-right:0.75rem}limel-notched-outline[required]:not([required=false]) .limel-notched-outline--notch label:after{content:"*";scale:1.3}limel-notched-outline[invalid]:not([invalid=false]):not([disabled]:not([disabled=false])){--limel-notched-outline-border-color:var( --limel-theme-error-text-color )}limel-notched-outline[invalid]:not([invalid=false]):not([disabled]:not([disabled=false])):hover{--limel-notched-outline-border-color:var( --limel-theme-error-color )}limel-notched-outline[invalid]:not([invalid=false]) .limel-notched-outline--notch label:after{color:var(--limel-theme-error-text-color)}limel-notched-outline[readonly]:not([readonly=false]){--limel-notched-outline-border-color:transparent !important;--limel-notched-outline-background-color:transparent !important}limel-notched-outline[readonly]:not([readonly=false]) .limel-notched-outline--notch label{transition-duration:0s}limel-notched-outline[has-leading-icon]:not([has-leading-icon=false]):not([has-floating-label]):not([has-value]){--limel-notched-outline-label-transform-x:1.25rem}limel-notched-outline[has-leading-icon] .limel-notched-outline--empty-readonly-value{left:2.25rem}limel-notched-outline:not([disabled]:not([disabled=false])):hover label,limel-notched-outline:not([disabled]:not([disabled=false])):focus label,limel-notched-outline:not([disabled]:not([disabled=false])):focus-within label{will-change:color, transform, font-size}limel-notched-outline:not([disabled]:not([disabled=false])):has([slot=content]:focus-visible),limel-notched-outline:not([disabled]:not([disabled=false])):has([slot=content]:focus-within){--limel-notched-outline-label-font-size:0.65rem;--limel-notched-outline-label-transform-x:0;--limel-notched-outline-label-transform-y:calc(-50% - 0.09375rem);--limel-notched-outline-notch-border-top-color:transparent}limel-notched-outline[has-floating-label],limel-notched-outline[has-value]:not([has-value=false]),limel-notched-outline[readonly]:not([has-value]:not([has-value=true])){--limel-notched-outline-label-font-size:0.65rem;--limel-notched-outline-label-transform-x:0;--limel-notched-outline-label-transform-y:calc(-50% - 0.09375rem);--limel-notched-outline-notch-border-top-color:transparent}`;
|
|
43
|
-
|
|
44
|
-
const NotchedOutline = class {
|
|
45
|
-
constructor(hostRef) {
|
|
46
|
-
index.registerInstance(this, hostRef);
|
|
47
|
-
/**
|
|
48
|
-
* Set to `true` when the input element is required.
|
|
49
|
-
* This applies proper visual styles, such as inclusion of an asterisk
|
|
50
|
-
* beside the label.
|
|
51
|
-
*/
|
|
52
|
-
this.required = false;
|
|
53
|
-
/**
|
|
54
|
-
* Set to `true` when the input element is readonly.
|
|
55
|
-
* This applies proper visual styles, such as making the outline transparent.
|
|
56
|
-
*/
|
|
57
|
-
this.readonly = false;
|
|
58
|
-
/**
|
|
59
|
-
* Set to `true` to indicate that the current value of the input element is
|
|
60
|
-
* invalid. This applies proper visual styles, such as making the outlines red.
|
|
61
|
-
*/
|
|
62
|
-
this.invalid = false;
|
|
63
|
-
/**
|
|
64
|
-
* Set to `true` to indicate that the input element is
|
|
65
|
-
* disabled. This applies proper visual styles, such as making the outlines
|
|
66
|
-
* and the label transparent.
|
|
67
|
-
*/
|
|
68
|
-
this.disabled = false;
|
|
69
|
-
/**
|
|
70
|
-
* Set to `true` when the user has entered a value for the input element,
|
|
71
|
-
* shrinking the label in size, and visually rendering it above the entered value.
|
|
72
|
-
*/
|
|
73
|
-
this.hasValue = false;
|
|
74
|
-
/**
|
|
75
|
-
* Set to `true` when the consumer element displays a leading icon.
|
|
76
|
-
* This applies proper visual styles, such as rendering the label
|
|
77
|
-
* correctly placed beside the leading icon.
|
|
78
|
-
*/
|
|
79
|
-
this.hasLeadingIcon = false;
|
|
80
|
-
/**
|
|
81
|
-
* Set to `true` when the consumer element needs to render the
|
|
82
|
-
* label above the input element, despite existence of a `value`.
|
|
83
|
-
* For example in the `text-editor` or `limel-select`,
|
|
84
|
-
* where the default layout requires a floating label.
|
|
85
|
-
*/
|
|
86
|
-
this.hasFloatingLabel = false;
|
|
87
|
-
}
|
|
88
|
-
render() {
|
|
89
|
-
return (index.h("div", { key: '075d440c16ca092fd36dfc72b59937d09db55b50', class: "limel-notched-outline" }, index.h("slot", { key: '5efa4c54ce73c15d7d259d2f8d856be9e40ebc16', name: "content" }), index.h("span", { key: '2ad07b5b8b404d2ac59b05de0a22e52c77ced6a3', class: "limel-notched-outline--outlines", "aria-hidden": "true" }, index.h("span", { key: '1f70d37ebf40173162e71b3ca4bd31bf14bf3dec', class: "limel-notched-outline--leading-outline" }), this.renderLabel(), index.h("span", { key: '0097c9838a78c1972a014faa4f6439f40c6dee66', class: "limel-notched-outline--trailing-outline" }), this.renderEmptyReadonlyValue())));
|
|
90
|
-
}
|
|
91
|
-
renderLabel() {
|
|
92
|
-
if (!this.label) {
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
return (index.h("span", { class: "limel-notched-outline--notch" }, index.h("label", { htmlFor: this.labelId }, this.label)));
|
|
96
|
-
}
|
|
97
|
-
renderEmptyReadonlyValue() {
|
|
98
|
-
if (!this.readonly || this.hasValue) {
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
return (index.h("span", { class: "limel-notched-outline--empty-readonly-value", "aria-hidden": "true" }, "\u2013"));
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
NotchedOutline.style = notchedOutlineCss();
|
|
105
|
-
|
|
106
|
-
exports.limel_helper_line = HelperLine;
|
|
107
|
-
exports.limel_notched_outline = NotchedOutline;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-BjHIBY-I.js');
|
|
4
|
-
var translations = require('./translations-D4j_eojG.js');
|
|
5
|
-
|
|
6
|
-
const linearProgressCss = () => `:host(limel-linear-progress){isolation:isolate;position:relative;overflow:hidden;display:flex;width:100%;height:0.25rem;border-radius:0.25rem;background-color:var(--background-color, rgb(var(--contrast-800), 0.5))}.progress{height:100%;width:var(--percentage, 0%);border-radius:0.25rem;background-color:var(--lime-primary-color, var(--limel-theme-primary-color))}:host(limel-linear-progress[indeterminate]) .progress{background-color:transparent;width:100%}:host(limel-linear-progress[indeterminate]) .progress:before,:host(limel-linear-progress[indeterminate]) .progress:after{will-change:left, right, opacity;content:"";position:absolute;inset:0;height:100%;border-radius:0.25rem;opacity:0;background-color:var(--lime-primary-color, var(--limel-theme-primary-color))}:host(limel-linear-progress[indeterminate]) .progress:before{animation:indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite}:host(limel-linear-progress[indeterminate]) .progress:after{animation:indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite 1.15s}@keyframes indeterminate{0%{left:-35%;right:100%;opacity:0}10%,80%{opacity:1}60%{left:100%;right:-90%}100%{left:100%;right:-90%;opacity:0}}@keyframes indeterminate-short{0%{left:-200%;right:100%;opacity:0}10%,80%{opacity:1}60%{left:107%;right:-8%}100%{left:107%;right:-8%;opacity:0}}`;
|
|
7
|
-
|
|
8
|
-
const PERCENT = 100;
|
|
9
|
-
const LinearProgress = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
/**
|
|
13
|
-
* Defines the language for translations.
|
|
14
|
-
* Will translate the translatable strings on the components.
|
|
15
|
-
*/
|
|
16
|
-
this.language = 'en';
|
|
17
|
-
/**
|
|
18
|
-
* The value of the progress bar. Should be between `0` and `1`.
|
|
19
|
-
*/
|
|
20
|
-
this.value = 0;
|
|
21
|
-
/**
|
|
22
|
-
* Puts the progress bar in an indeterminate state
|
|
23
|
-
*/
|
|
24
|
-
this.indeterminate = false;
|
|
25
|
-
}
|
|
26
|
-
render() {
|
|
27
|
-
if (!this.isFinite(this.value)) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
const loadingText = translations.translate.get('loading', this.language);
|
|
31
|
-
const ariaLabel = translations.translate.get('progress-bar', this.language);
|
|
32
|
-
const ariaValueNow = this.indeterminate ? undefined : this.value;
|
|
33
|
-
const ariaValueText = this.indeterminate ? loadingText : undefined;
|
|
34
|
-
return (index.h(index.Host, { role: "progressbar", "aria-label": this.accessibleLabel || ariaLabel, "aria-live": "polite", "aria-valuemin": "0", "aria-valuemax": "1", "aria-valuenow": ariaValueNow, "aria-valuetext": ariaValueText, style: { '--percentage': `${this.value * PERCENT}%` } }, index.h("div", { class: "progress" })));
|
|
35
|
-
}
|
|
36
|
-
watchValue(newValue) {
|
|
37
|
-
if (!this.isFinite(newValue)) {
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
this.updateProgress(newValue);
|
|
41
|
-
}
|
|
42
|
-
updateProgress(value) {
|
|
43
|
-
if (this.host) {
|
|
44
|
-
this.host.style.setProperty('--percentage', `${value * PERCENT}%`);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
isFinite(value) {
|
|
48
|
-
return Number.isFinite(value);
|
|
49
|
-
}
|
|
50
|
-
get host() { return index.getElement(this); }
|
|
51
|
-
static get watchers() { return {
|
|
52
|
-
"value": [{
|
|
53
|
-
"watchValue": 0
|
|
54
|
-
}]
|
|
55
|
-
}; }
|
|
56
|
-
};
|
|
57
|
-
LinearProgress.style = linearProgressCss();
|
|
58
|
-
|
|
59
|
-
exports.limel_linear_progress = LinearProgress;
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-DBTJNfo7.js';
|
|
2
|
-
|
|
3
|
-
const helperLineCss = () => `:host(limel-helper-line){transition:opacity 0.2s ease;box-sizing:border-box;display:grid;min-width:0;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:0.6875rem;line-height:normal;color:rgb(var(--contrast-1200))}div{display:flex;justify-content:space-between;gap:0.75rem;overflow:hidden;padding:0 1rem}:host(limel-helper-line.invalid){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limel-helper-line.invalid) .helper-text{color:var(--limel-theme-error-color)}.counter{flex-shrink:0;margin-left:auto}.helper-text,.counter{padding-top:0.125rem}:host(limel-helper-line){transition:grid-template-rows var(--limel-h-l-grid-template-rows-transition-speed, 0.46s) cubic-bezier(1, 0.09, 0, 0.89);grid-template-rows:var(--limel-h-l-grid-template-rows, 1fr)}:host(limel-helper-line.hide){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}`;
|
|
4
|
-
|
|
5
|
-
const HelperLine = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
/**
|
|
9
|
-
* Turns `true`, when the parent component is invalid.
|
|
10
|
-
* For example, when the parent component is `required` but is left empty.
|
|
11
|
-
* Or when the input format is invalid.
|
|
12
|
-
*/
|
|
13
|
-
this.invalid = false;
|
|
14
|
-
this.hasContent = () => {
|
|
15
|
-
return !!(this.maxLength > 0 ||
|
|
16
|
-
(this.helperText && this.helperText.length > 0));
|
|
17
|
-
};
|
|
18
|
-
this.renderHelperText = () => {
|
|
19
|
-
if (!this.helperText) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
return (h("span", { class: "helper-text", id: this.helperTextId }, this.helperText));
|
|
23
|
-
};
|
|
24
|
-
this.renderCharacterCounter = () => {
|
|
25
|
-
const counter = `${this.length} / ${this.maxLength}`;
|
|
26
|
-
if (!this.maxLength) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
return h("span", { class: "counter" }, counter);
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
render() {
|
|
33
|
-
return (h(Host, { key: '8ef6eb3b3e372e5dc61af1424a88c1c342023d13', tabIndex: -1, class: {
|
|
34
|
-
invalid: this.invalid,
|
|
35
|
-
}, style: this.hasContent() ? {} : { display: 'none' }, "aria-hidden": !this.hasContent() }, h("div", { key: '3b4e31c23f5964aabb67556e68bd1785c871d934' }, this.renderHelperText(), this.renderCharacterCounter())));
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
HelperLine.style = helperLineCss();
|
|
39
|
-
|
|
40
|
-
const notchedOutlineCss = () => `@charset "UTF-8";*,*:before,*:after{box-sizing:border-box}limel-notched-outline{--limel-notched-outline-border-color:rgba(var(--contrast-700), 0.65);--limel-notched-outline-background-color:rgba(var(--contrast-200), 0.5);display:block;width:100%;height:fit-content}.limel-notched-outline{position:relative;width:100%;height:100%}.limel-notched-outline [slot=content]{background-color:var(--limel-notched-outline-background-color);border-radius:var(--limel-notched-outline-border-radius, 0.25rem)}.limel-notched-outline--outlines{pointer-events:none;position:absolute;inset:0;z-index:var(--limel-notched-outline-z-index, 0);display:flex}.limel-notched-outline--leading-outline,.limel-notched-outline--notch,.limel-notched-outline--trailing-outline{transition:border-color 0.2s ease;border-width:1px;border-style:solid;border-color:var(--limel-notched-outline-border-color)}.limel-notched-outline--leading-outline{flex-shrink:0;width:0.75rem;border-right-width:0;border-top-left-radius:var(--limel-notched-outline-border-radius, 0.25rem);border-bottom-left-radius:var(--limel-notched-outline-border-radius, 0.25rem)}.limel-notched-outline--notch{flex-shrink:0;position:relative;z-index:2;border-top-color:var(--limel-notched-outline-notch-border-top-color, var(--limel-notched-outline-border-color));border-right-width:0;border-left-width:0;max-width:calc(100% - 1.5rem)}.limel-notched-outline--notch label{all:unset;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;position:relative;transition:color 0.2s ease, font-size 0.2s ease, transform 0.12s cubic-bezier(0.4, 0, 0.2, 1);transform:translate3d(var(--limel-notched-outline-label-transform-x, 0), var(--limel-notched-outline-label-transform-y, 0.62rem), 0);display:block;padding:0 0.25rem;color:var(--limel-notched-outline-label-color, rgba(var(--contrast-1200), 1));font-size:var(--limel-notched-outline-label-font-size, var(--limel-theme-default-font-size));letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);line-height:normal}.limel-notched-outline--notch label:after{position:absolute;right:0;padding:0 0.25rem}.limel-notched-outline--trailing-outline{flex-grow:1;border-left-width:0;border-top-right-radius:var(--limel-notched-outline-border-radius, 0.25rem);border-bottom-right-radius:var(--limel-notched-outline-border-radius, 0.25rem)}.limel-notched-outline--empty-readonly-value .lime-looks-like-input-value{line-height:1.75rem;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:rgba(var(--contrast-1400), 1);font-size:var(--limel-theme-default-font-size);font-weight:400;font-family:inherit;letter-spacing:0.009375em}.mdc-text-field--disabled .limel-notched-outline--empty-readonly-value .lime-looks-like-input-value{cursor:not-allowed;opacity:0.4}.limel-notched-outline--empty-readonly-value{position:absolute;top:0.62rem;left:1rem}limel-notched-outline:not([disabled]:not([disabled=false])):hover{--limel-notched-outline-border-color:rgba(var(--contrast-700), 1);--limel-notched-outline-background-color:rgba(var(--contrast-200), 1)}limel-notched-outline:not([disabled]:not([disabled=false])):has([slot=content]:focus-visible),limel-notched-outline:not([disabled]:not([disabled=false])):has([slot=content]:focus-within){--limel-notched-outline-border-color:var(--lime-primary-color, var(--limel-theme-primary-color));--limel-notched-outline-background-color:rgba(var(--contrast-100), 0.8)}limel-notched-outline[disabled]:not([disabled=false]){--limel-notched-outline-label-color:rgba(var(--contrast-1200), 0.5)}limel-notched-outline[required]:not([required=false]) .limel-notched-outline--notch label{padding-right:0.75rem}limel-notched-outline[required]:not([required=false]) .limel-notched-outline--notch label:after{content:"*";scale:1.3}limel-notched-outline[invalid]:not([invalid=false]):not([disabled]:not([disabled=false])){--limel-notched-outline-border-color:var( --limel-theme-error-text-color )}limel-notched-outline[invalid]:not([invalid=false]):not([disabled]:not([disabled=false])):hover{--limel-notched-outline-border-color:var( --limel-theme-error-color )}limel-notched-outline[invalid]:not([invalid=false]) .limel-notched-outline--notch label:after{color:var(--limel-theme-error-text-color)}limel-notched-outline[readonly]:not([readonly=false]){--limel-notched-outline-border-color:transparent !important;--limel-notched-outline-background-color:transparent !important}limel-notched-outline[readonly]:not([readonly=false]) .limel-notched-outline--notch label{transition-duration:0s}limel-notched-outline[has-leading-icon]:not([has-leading-icon=false]):not([has-floating-label]):not([has-value]){--limel-notched-outline-label-transform-x:1.25rem}limel-notched-outline[has-leading-icon] .limel-notched-outline--empty-readonly-value{left:2.25rem}limel-notched-outline:not([disabled]:not([disabled=false])):hover label,limel-notched-outline:not([disabled]:not([disabled=false])):focus label,limel-notched-outline:not([disabled]:not([disabled=false])):focus-within label{will-change:color, transform, font-size}limel-notched-outline:not([disabled]:not([disabled=false])):has([slot=content]:focus-visible),limel-notched-outline:not([disabled]:not([disabled=false])):has([slot=content]:focus-within){--limel-notched-outline-label-font-size:0.65rem;--limel-notched-outline-label-transform-x:0;--limel-notched-outline-label-transform-y:calc(-50% - 0.09375rem);--limel-notched-outline-notch-border-top-color:transparent}limel-notched-outline[has-floating-label],limel-notched-outline[has-value]:not([has-value=false]),limel-notched-outline[readonly]:not([has-value]:not([has-value=true])){--limel-notched-outline-label-font-size:0.65rem;--limel-notched-outline-label-transform-x:0;--limel-notched-outline-label-transform-y:calc(-50% - 0.09375rem);--limel-notched-outline-notch-border-top-color:transparent}`;
|
|
41
|
-
|
|
42
|
-
const NotchedOutline = class {
|
|
43
|
-
constructor(hostRef) {
|
|
44
|
-
registerInstance(this, hostRef);
|
|
45
|
-
/**
|
|
46
|
-
* Set to `true` when the input element is required.
|
|
47
|
-
* This applies proper visual styles, such as inclusion of an asterisk
|
|
48
|
-
* beside the label.
|
|
49
|
-
*/
|
|
50
|
-
this.required = false;
|
|
51
|
-
/**
|
|
52
|
-
* Set to `true` when the input element is readonly.
|
|
53
|
-
* This applies proper visual styles, such as making the outline transparent.
|
|
54
|
-
*/
|
|
55
|
-
this.readonly = false;
|
|
56
|
-
/**
|
|
57
|
-
* Set to `true` to indicate that the current value of the input element is
|
|
58
|
-
* invalid. This applies proper visual styles, such as making the outlines red.
|
|
59
|
-
*/
|
|
60
|
-
this.invalid = false;
|
|
61
|
-
/**
|
|
62
|
-
* Set to `true` to indicate that the input element is
|
|
63
|
-
* disabled. This applies proper visual styles, such as making the outlines
|
|
64
|
-
* and the label transparent.
|
|
65
|
-
*/
|
|
66
|
-
this.disabled = false;
|
|
67
|
-
/**
|
|
68
|
-
* Set to `true` when the user has entered a value for the input element,
|
|
69
|
-
* shrinking the label in size, and visually rendering it above the entered value.
|
|
70
|
-
*/
|
|
71
|
-
this.hasValue = false;
|
|
72
|
-
/**
|
|
73
|
-
* Set to `true` when the consumer element displays a leading icon.
|
|
74
|
-
* This applies proper visual styles, such as rendering the label
|
|
75
|
-
* correctly placed beside the leading icon.
|
|
76
|
-
*/
|
|
77
|
-
this.hasLeadingIcon = false;
|
|
78
|
-
/**
|
|
79
|
-
* Set to `true` when the consumer element needs to render the
|
|
80
|
-
* label above the input element, despite existence of a `value`.
|
|
81
|
-
* For example in the `text-editor` or `limel-select`,
|
|
82
|
-
* where the default layout requires a floating label.
|
|
83
|
-
*/
|
|
84
|
-
this.hasFloatingLabel = false;
|
|
85
|
-
}
|
|
86
|
-
render() {
|
|
87
|
-
return (h("div", { key: '075d440c16ca092fd36dfc72b59937d09db55b50', class: "limel-notched-outline" }, h("slot", { key: '5efa4c54ce73c15d7d259d2f8d856be9e40ebc16', name: "content" }), h("span", { key: '2ad07b5b8b404d2ac59b05de0a22e52c77ced6a3', class: "limel-notched-outline--outlines", "aria-hidden": "true" }, h("span", { key: '1f70d37ebf40173162e71b3ca4bd31bf14bf3dec', class: "limel-notched-outline--leading-outline" }), this.renderLabel(), h("span", { key: '0097c9838a78c1972a014faa4f6439f40c6dee66', class: "limel-notched-outline--trailing-outline" }), this.renderEmptyReadonlyValue())));
|
|
88
|
-
}
|
|
89
|
-
renderLabel() {
|
|
90
|
-
if (!this.label) {
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
return (h("span", { class: "limel-notched-outline--notch" }, h("label", { htmlFor: this.labelId }, this.label)));
|
|
94
|
-
}
|
|
95
|
-
renderEmptyReadonlyValue() {
|
|
96
|
-
if (!this.readonly || this.hasValue) {
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
return (h("span", { class: "limel-notched-outline--empty-readonly-value", "aria-hidden": "true" }, "\u2013"));
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
NotchedOutline.style = notchedOutlineCss();
|
|
103
|
-
|
|
104
|
-
export { HelperLine as limel_helper_line, NotchedOutline as limel_notched_outline };
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-DBTJNfo7.js';
|
|
2
|
-
import { t as translate } from './translations-Dv3YcsA7.js';
|
|
3
|
-
|
|
4
|
-
const linearProgressCss = () => `:host(limel-linear-progress){isolation:isolate;position:relative;overflow:hidden;display:flex;width:100%;height:0.25rem;border-radius:0.25rem;background-color:var(--background-color, rgb(var(--contrast-800), 0.5))}.progress{height:100%;width:var(--percentage, 0%);border-radius:0.25rem;background-color:var(--lime-primary-color, var(--limel-theme-primary-color))}:host(limel-linear-progress[indeterminate]) .progress{background-color:transparent;width:100%}:host(limel-linear-progress[indeterminate]) .progress:before,:host(limel-linear-progress[indeterminate]) .progress:after{will-change:left, right, opacity;content:"";position:absolute;inset:0;height:100%;border-radius:0.25rem;opacity:0;background-color:var(--lime-primary-color, var(--limel-theme-primary-color))}:host(limel-linear-progress[indeterminate]) .progress:before{animation:indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite}:host(limel-linear-progress[indeterminate]) .progress:after{animation:indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite 1.15s}@keyframes indeterminate{0%{left:-35%;right:100%;opacity:0}10%,80%{opacity:1}60%{left:100%;right:-90%}100%{left:100%;right:-90%;opacity:0}}@keyframes indeterminate-short{0%{left:-200%;right:100%;opacity:0}10%,80%{opacity:1}60%{left:107%;right:-8%}100%{left:107%;right:-8%;opacity:0}}`;
|
|
5
|
-
|
|
6
|
-
const PERCENT = 100;
|
|
7
|
-
const LinearProgress = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
registerInstance(this, hostRef);
|
|
10
|
-
/**
|
|
11
|
-
* Defines the language for translations.
|
|
12
|
-
* Will translate the translatable strings on the components.
|
|
13
|
-
*/
|
|
14
|
-
this.language = 'en';
|
|
15
|
-
/**
|
|
16
|
-
* The value of the progress bar. Should be between `0` and `1`.
|
|
17
|
-
*/
|
|
18
|
-
this.value = 0;
|
|
19
|
-
/**
|
|
20
|
-
* Puts the progress bar in an indeterminate state
|
|
21
|
-
*/
|
|
22
|
-
this.indeterminate = false;
|
|
23
|
-
}
|
|
24
|
-
render() {
|
|
25
|
-
if (!this.isFinite(this.value)) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
const loadingText = translate.get('loading', this.language);
|
|
29
|
-
const ariaLabel = translate.get('progress-bar', this.language);
|
|
30
|
-
const ariaValueNow = this.indeterminate ? undefined : this.value;
|
|
31
|
-
const ariaValueText = this.indeterminate ? loadingText : undefined;
|
|
32
|
-
return (h(Host, { role: "progressbar", "aria-label": this.accessibleLabel || ariaLabel, "aria-live": "polite", "aria-valuemin": "0", "aria-valuemax": "1", "aria-valuenow": ariaValueNow, "aria-valuetext": ariaValueText, style: { '--percentage': `${this.value * PERCENT}%` } }, h("div", { class: "progress" })));
|
|
33
|
-
}
|
|
34
|
-
watchValue(newValue) {
|
|
35
|
-
if (!this.isFinite(newValue)) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
this.updateProgress(newValue);
|
|
39
|
-
}
|
|
40
|
-
updateProgress(value) {
|
|
41
|
-
if (this.host) {
|
|
42
|
-
this.host.style.setProperty('--percentage', `${value * PERCENT}%`);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
isFinite(value) {
|
|
46
|
-
return Number.isFinite(value);
|
|
47
|
-
}
|
|
48
|
-
get host() { return getElement(this); }
|
|
49
|
-
static get watchers() { return {
|
|
50
|
-
"value": [{
|
|
51
|
-
"watchValue": 0
|
|
52
|
-
}]
|
|
53
|
-
}; }
|
|
54
|
-
};
|
|
55
|
-
LinearProgress.style = linearProgressCss();
|
|
56
|
-
|
|
57
|
-
export { LinearProgress as limel_linear_progress };
|