@limetech/lime-elements 39.10.3 → 39.11.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 +16 -0
- package/dist/cjs/lime-elements.cjs.js +1 -1
- package/dist/cjs/limel-breadcrumbs_7.cjs.entry.js +51 -3
- package/dist/cjs/limel-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/limel-dialog.cjs.entry.js +86 -2
- package/dist/cjs/limel-list-item.cjs.entry.js +1 -1
- package/dist/cjs/limel-portal_3.cjs.entry.js +3 -3
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +1 -1
- package/dist/cjs/limel-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/limel-slider.cjs.entry.js +44 -1494
- package/dist/cjs/limel-snackbar.cjs.entry.js +2 -2
- package/dist/cjs/limel-split-button.cjs.entry.js +2 -2
- package/dist/cjs/limel-switch.cjs.entry.js +2 -2
- package/dist/cjs/limel-tab-bar.cjs.entry.js +2 -2
- package/dist/cjs/limel-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/limel-table.cjs.entry.js +3 -3
- package/dist/cjs/limel-text-editor-link-menu.cjs.entry.js +3 -3
- package/dist/cjs/limel-text-editor.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/checkbox/checkbox.css +6 -0
- package/dist/collection/components/list-item/list-item.css +6 -0
- package/dist/collection/components/radio-button-group/radio-button.css +1 -0
- package/dist/collection/components/slider/slider.css +215 -642
- package/dist/collection/components/slider/slider.js +45 -165
- package/dist/collection/components/snackbar/snackbar.js +2 -2
- package/dist/collection/components/spinner/spinner.js +1 -1
- package/dist/collection/components/split-button/split-button.js +2 -2
- package/dist/collection/components/switch/switch.css +6 -0
- package/dist/collection/components/switch/switch.js +1 -1
- package/dist/collection/components/tab-bar/tab-bar.js +2 -2
- package/dist/collection/components/tab-panel/tab-panel.js +1 -1
- package/dist/collection/components/table/table.js +3 -3
- package/dist/collection/components/text-editor/link-menu/editor-link-menu.js +3 -3
- package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js +1 -1
- package/dist/collection/components/text-editor/text-editor.js +1 -1
- package/dist/collection/components/tooltip/tooltip-content.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js +2 -2
- package/dist/collection/style/internal/boolean-input.scss +1 -0
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/limel-breadcrumbs_7.entry.js +50 -2
- package/dist/esm/limel-checkbox.entry.js +1 -1
- package/dist/esm/limel-dialog.entry.js +85 -1
- package/dist/esm/limel-list-item.entry.js +1 -1
- package/dist/esm/limel-portal_3.entry.js +3 -3
- package/dist/esm/limel-prosemirror-adapter.entry.js +1 -1
- package/dist/esm/limel-radio-button.entry.js +1 -1
- package/dist/esm/limel-slider.entry.js +45 -1495
- package/dist/esm/limel-snackbar.entry.js +2 -2
- package/dist/esm/limel-split-button.entry.js +2 -2
- package/dist/esm/limel-switch.entry.js +2 -2
- package/dist/esm/limel-tab-bar.entry.js +2 -2
- package/dist/esm/limel-tab-panel.entry.js +1 -1
- package/dist/esm/limel-table.entry.js +3 -3
- package/dist/esm/limel-text-editor-link-menu.entry.js +3 -3
- package/dist/esm/limel-text-editor.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/{p-17e1d911.entry.js → p-2906606d.entry.js} +1 -1
- package/dist/lime-elements/{p-30e54f05.entry.js → p-2b1eda20.entry.js} +3 -3
- package/dist/lime-elements/{p-889a05e4.entry.js → p-3d724fc2.entry.js} +1 -1
- package/dist/lime-elements/{p-b8e5bd98.entry.js → p-3f188493.entry.js} +1 -1
- package/dist/lime-elements/p-50f51eb9.entry.js +1 -0
- package/dist/lime-elements/{p-a243b8e2.entry.js → p-730a05e3.entry.js} +1 -1
- package/dist/lime-elements/{p-77f42eff.entry.js → p-8203eea8.entry.js} +1 -1
- package/dist/lime-elements/{p-a44dfaa1.entry.js → p-89b35965.entry.js} +1 -1
- package/dist/lime-elements/{p-9abfb8ba.entry.js → p-9aa07388.entry.js} +1 -1
- package/dist/lime-elements/{p-8e3cc9b0.entry.js → p-afd4be62.entry.js} +1 -1
- package/dist/lime-elements/{p-9d629f5f.entry.js → p-c308e2a5.entry.js} +55 -10
- package/dist/lime-elements/p-c7110762.entry.js +1 -0
- package/dist/lime-elements/{p-c9591213.entry.js → p-de203f64.entry.js} +1 -1
- package/dist/lime-elements/p-e7e2737b.entry.js +1 -0
- package/dist/lime-elements/p-faceccc0.entry.js +1 -0
- package/dist/lime-elements/{p-12646794.entry.js → p-fe993f80.entry.js} +1 -1
- package/dist/lime-elements/style/internal/boolean-input.scss +1 -0
- package/dist/types/components/slider/slider.d.ts +6 -24
- package/dist/types/components.d.ts +4 -0
- package/package.json +1 -1
- package/dist/cjs/animationframe-ChtL6ouH.js +0 -88
- package/dist/cjs/util-BOQp7lfZ.js +0 -52
- package/dist/esm/animationframe-BDw7dT4x.js +0 -86
- package/dist/esm/util-Dx8swykg.js +0 -50
- package/dist/lime-elements/p-23c1033d.entry.js +0 -45
- package/dist/lime-elements/p-607ad3b7.entry.js +0 -1
- package/dist/lime-elements/p-689770db.entry.js +0 -1
- package/dist/lime-elements/p-7bd71b2b.entry.js +0 -1
- package/dist/lime-elements/p-BDw7dT4x.js +0 -23
- package/dist/lime-elements/p-Dx8swykg.js +0 -23
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as i,H as o}from"./p-DBTJNfo7.js";import{g as t}from"./p-CgNJbSP4.js";import{c as l}from"./p-JbKhhoXs.js";import{C as r}from"./p--9pvUs5M.js";import{t as a}from"./p-DVRaJQvC.js";const s=class{constructor(o){e(this,o),this.language="en",this.disabled=!1,this.iconSize="small",this.badgeIcon=!1,this.selected=!1,this.type="listitem",this.renderLabel=()=>i("span",{class:"label",id:this.labelId},this.text),this.renderDescription=()=>{if(this.secondaryText)return i("span",{class:"description",id:this.descriptionId},this.secondaryText)},this.renderIcon=()=>{const e=t(this.icon);if(!e)return;let o,l,r;return"object"==typeof this.icon&&(o=this.icon.color,l=this.icon.backgroundColor,r=this.icon.title),i("limel-icon",Object.assign({},{"aria-label":r,"aria-hidden":r?null:"true",name:e,style:{color:o,"background-color":l},badge:this.badgeIcon,size:this.iconSize}))},this.renderPrimaryComponent=()=>{const e=this.primaryComponent;if(null==e?void 0:e.name)return i(e.name,Object.assign({},e.props||{}))},this.renderImage=()=>{if(this.image)return i("img",{src:this.image.src,alt:this.image.alt,loading:"lazy"})},this.renderActionMenu=e=>{if(!e||0===e.length)return;const o=this.getStableActions(e);return i("limel-menu",{class:"mdc-deprecated-list-item__meta",items:o,openDirection:"left-start"},i("limel-icon-button",{class:"action-menu-trigger",slot:"trigger",icon:"menu_2",label:this.actionMenuLabel()}))},this.renderRadioButton=()=>{if("radio"===this.type)return i("limel-radio-button",{id:`radio_${this.labelId}`,checked:this.selected,disabled:this.disabled})},this.renderCheckbox=()=>{if("checkbox"===this.type)return i(r,{id:`checkbox_${this.labelId}`,checked:this.selected,disabled:this.disabled})},this.actionMenuLabel=()=>a.get("file-viewer.more-actions",this.language),this.labelId=l(),this.descriptionId=l()}render(){var e;const t={"aria-labelledby":this.labelId,"aria-describedby":this.secondaryText?this.descriptionId:void 0,"aria-disabled":this.disabled?"true":"false"};return"radio"===this.type||"checkbox"===this.type?t["aria-checked"]=this.selected?"true":"false":"option"!==this.type&&"menuitem"!==this.type||(t["aria-selected"]=this.selected?"true":"false"),i(o,Object.assign({key:"4f769d4dc9bcf065f0891ae394efb8f2cb4e3cbe",role:this.getHostRole(),class:{"has-primary-component":!!(null===(e=this.primaryComponent)||void 0===e?void 0:e.name)}},t),this.renderRadioButton(),this.renderCheckbox(),this.renderIcon(),this.renderImage(),this.renderPrimaryComponent(),i("div",{key:"f3ae79f70d048a6541af55782a8a1956fd7338c5",class:"text"},this.renderLabel(),this.renderDescription()),this.renderActionMenu(this.actions))}getStableActions(e){return this.memoizedActions===e?this.memoizedActions:(this.memoizedActions=e,e)}getHostRole(){switch(this.type){case"option":return"option";case"radio":return"radio";case"checkbox":return"checkbox";case"menuitem":return"menuitem";default:return"listitem"}}};s.style='@charset "UTF-8";*,*:before,*:after{box-sizing:border-box}.boolean-input{--limel-boolean-input-box-size:1.25rem;--limel-boolean-input-gap-size:0.5rem;position:relative;isolation:isolate;display:flex;align-items:center;min-height:var(--limel-checkbox-min-height, 2.5rem);width:100%}.boolean-input input[type=checkbox],.boolean-input input[type=radio]{position:absolute;width:0;height:0;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0, 0, 0, 0);clip-path:inset(50%);white-space:nowrap;-webkit-appearance:none;-moz-appearance:none;appearance:none}label.boolean-input-label{min-width:var(--limel-boolean-input-box-size);min-height:var(--limel-boolean-input-box-size);padding-top:0.125rem;cursor:pointer;position:relative;width:100%;overflow-wrap:var(--limel-boolean-input-label-overflow-wrap, normal);font-size:var(--limel-theme-default-small-font-size);color:var(--limel-theme-text-primary-on-background-color);padding-left:calc(var(--limel-boolean-input-box-size) + var(--limel-boolean-input-gap-size))}.disabled:not([readonly]):not([readonly=true]) label.boolean-input-label{cursor:not-allowed;color:var(--limel-theme-text-disabled-color)}.required label.boolean-input-label:after{margin-left:0.0625rem;content:"*"}.invalid:not(.readonly) label.boolean-input-label{color:var(--limel-theme-error-text-color)}:host(limel-checkbox.hide-label) label.boolean-input-label,.hide-label label.boolean-input-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;opacity:0;width:var(--limel-boolean-input-box-size)}.box{position:absolute;pointer-events:none;transition:border-color 0.4s ease 0.2s, background-color 0.2s ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease;display:inline-block;vertical-align:middle;width:var(--limel-boolean-input-box-size);height:var(--limel-boolean-input-box-size);margin-right:var(--limel-boolean-input-gap-size);border-radius:var(--limel-boolean-input-box-border-radius);border:0.125rem solid;border-color:var(--checkbox-unchecked-border-color, rgb(var(--contrast-900)));background-color:var(--limel-checkbox-background-color, rgb(var(--contrast-300)));}.checked .box,.boolean-input>input[type=checkbox]:checked+.box,.boolean-input>input[type=radio]:checked+.box{background-color:var(--lime-primary-color, var(--limel-theme-primary-color));border-color:var(--lime-primary-color, var(--limel-theme-primary-color))}.disabled .box{opacity:0.4}.box{}.boolean-input:not(.disabled):hover .box{will-change:box-shadow;box-shadow:var(--button-shadow-hovered)}.boolean-input:not(.disabled):active .box{will-change:box-shadow;box-shadow:var(--button-shadow-pressed)}.box:before{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);content:"";position:absolute;inset:-0.1875rem;border-radius:inherit;}.boolean-input>input[type=checkbox]:focus-visible+.box:before,.boolean-input>input[type=radio]:focus-visible+.box:before{will-change:box-shadow;box-shadow:var(--shadow-depth-8-focused)}.box:after{transition:opacity 0.2s ease, width 0.4s ease, box-shadow 0.6s cubic-bezier(0.68, -0.55, 0, 1.87), transform 0.6s cubic-bezier(0.68, -0.55, 0, 1.87);content:"";position:absolute;inset:0;margin:auto;border-radius:1rem;opacity:0;background-color:rgb(var(--color-white));}.boolean-input:not(.disabled):hover .box:after{will-change:opacity, box-shadow, transform, width}:host(limel-checkbox){--limel-boolean-input-label-overflow-wrap:var( --checkbox-label-overflow-wrap, normal );min-height:var(--limel-checkbox-min-height, 2.5rem)}.box:after{height:0.125rem;width:0.25rem}.indeterminate .box:after{opacity:1;width:calc(var(--limel-boolean-input-box-size) - 0.5rem)}.checkbox{--limel-boolean-input-box-border-radius:0.25rem}.checkbox svg.check-mark{position:absolute;z-index:1;inset:0;transform:translate3d(-0.125rem, -0.125rem, 0);width:var(--limel-boolean-input-box-size);height:var(--limel-boolean-input-box-size);padding:0.25rem;color:rgb(var(--color-white));opacity:0;stroke-width:0.1875rem;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round}.checkbox svg.check-mark path{stroke-dashoffset:29.7833;stroke-dasharray:29.7833;transition:stroke-dashoffset 180ms cubic-bezier(0.4, 0, 0.6, 1)}.checkbox{}.checkbox:not(.indeterminate)>input[type=checkbox]:checked+.box svg.check-mark{opacity:1}.checkbox:not(.indeterminate)>input[type=checkbox]:checked+.box svg.check-mark path{stroke-dashoffset:0}limel-dynamic-label{margin-top:0.375rem;margin-left:-0.25rem}:host(limel-checkbox:focus),:host(limel-checkbox:focus-visible),:host(limel-checkbox:focus-within){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limel-checkbox){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limel-checkbox:focus) limel-helper-line,:host(limel-checkbox:focus-visible) limel-helper-line,:host(limel-checkbox:focus-within) limel-helper-line,:host(limel-checkbox:hover) limel-helper-line{will-change:grid-template-rows}*,*:before,*:after{box-sizing:border-box}limel-list-item{min-height:2.5rem}limel-list-item:focus{outline:none}limel-list-item:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}limel-list-item{transition:background-color 0.6s ease;position:relative;isolation:isolate;display:flex;align-items:center;gap:0.5rem;padding:0 1rem;background-color:rgb(var(--contrast-100))}limel-list-item:hover{z-index:1;transition:background-color 0.2s ease;border-radius:0.5rem}limel-list-item:focus,limel-list-item:focus-visible,limel-list-item:active{z-index:1;border-radius:0.5rem}limel-list-item:first-of-type{border-top-left-radius:0.5rem;border-top-right-radius:0.5rem}limel-list-item:last-of-type{border-bottom-left-radius:0.5rem;border-bottom-right-radius:0.5rem}limel-list-item:not([disabled]):not([disabled=true]){cursor:pointer}limel-list-item[disabled]:not([disabled=false]){cursor:not-allowed}limel-list-item[disabled]:not([disabled=false]){cursor:not-allowed}limel-list-item[disabled]:not([disabled=false]) .text,limel-list-item[disabled]:not([disabled=false]) limel-icon,limel-list-item[disabled]:not([disabled=false]) img,limel-list-item[disabled]:not([disabled=false]) .boolean-input{opacity:0.4}limel-list-item:not([disabled]):not([disabled=true]):hover,limel-list-item:not([disabled]):not([disabled=true]):focus-visible{background-color:rgb(var(--contrast-400))}limel-list-item[type=option]:before{transition:background-color 0.6s ease;content:"";position:absolute;inset:0;opacity:0.2;border-radius:0.5rem}limel-list-item[type=option][selected]:not([selected=false]):before{transition:background-color 0.2s ease;background-color:var(--limel-theme-primary-color)}limel-list-item .text{flex-grow:1;min-width:0;display:flex;flex-direction:column;padding:0.5rem 0;color:var(--limel-theme-text-primary-on-background-color)}limel-list-item .label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:var(--limel-theme-default-font-size);line-height:1rem}limel-list-item .description{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:var(--maxLinesSecondaryText);line-height:1rem;font-size:var(--limel-theme-default-small-font-size);opacity:0.6}limel-list-item limel-icon{color:var(--limel-theme-text-secondary-on-background-color);flex-shrink:0;margin-left:-0.5rem}limel-list-item limel-icon:has(+img){margin-left:0;position:absolute;top:0.125rem;left:0.125rem;padding:0.1875rem;width:1.25rem;background-color:rgb(var(--contrast-200), 0.8)}limel-list-item img{flex-shrink:0;object-fit:cover;border-radius:var(--list-item-image-border-radius, 50%);width:2rem;height:2rem;box-shadow:0 0 0 1px rgb(var(--contrast-800), 0.5)}limel-list-item limel-menu{margin-right:-0.5rem;order:var(--limel-list-item-menu-order, 3)}limel-list-item[role=menuitem] limel-list-item .label{font-size:var(--limel-theme-default-small-font-size)}.boolean-input,limel-radio-button{width:var(--limel-boolean-input-box-size) !important;margin-left:-0.25rem !important}.boolean-input.checkbox{margin-right:0.25rem}limel-list-item:has(limel-icon) .boolean-input,limel-list-item:has(img) .boolean-input{margin-right:-0.25rem;margin-left:0;order:2}.boolean-input .boolean-input-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;opacity:0;width:var(--limel-boolean-input-box-size)}';export{s as limel_list_item}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as
|
|
1
|
+
import{r as t,c as s,h as a,H as e,a as i}from"./p-DBTJNfo7.js";import{d as h}from"./p-z_E3sq3p.js";const o=class{constructor(a){t(this,a),this.changeTab=s(this,"changeTab"),this.tabs=[],this.slotElements=[],this.handleChangeTabs=this.handleChangeTabs.bind(this),this.setSlotElements=this.setSlotElements.bind(this),this.setTabStatus=this.setTabStatus.bind(this)}connectedCallback(){this.initialize()}componentDidLoad(){this.initialize()}initialize(){const t=this.getSlot();t&&(t.addEventListener("slotchange",this.setSlotElements),this.setSlotElements(),this.tabs.forEach(this.setTabStatus))}disconnectedCallback(){this.getSlot().removeEventListener("slotchange",this.setSlotElements)}tabsChanged(){this.hidePanels(),this.tabs.forEach(this.setTabStatus)}render(){return a(e,{key:"ebab881a0b0efc36b64c866b58b919890c526525",onChangeTab:this.handleChangeTabs},a("div",{key:"1417a34aea0af009e44cd91ac8fd425412a2b706",class:"tab-panel"},a("limel-tab-bar",{key:"5b420eeec41fdd353ba0ba36bb0e475c3fd26821",tabs:this.tabs}),a("div",{key:"aa3d6f711a824a07eed6f2b5120497dd4218ed7b",class:"tab-content"},a("slot",{key:"7ba511fa07bd96018e4d8d288d7b1dca572cead0"}))))}setSlotElements(){const t=this.getSlot();this.hidePanels(),this.slotElements=Array.prototype.slice.call(t.assignedElements()),this.tabs.forEach(this.setTabStatus)}setTabStatus(t){const s=this.slotElements.find((s=>s.id===t.id));s&&(s.style.display=t.active?"":"none",s.tab=t)}handleChangeTabs(t){this.tabs=this.tabs.map((s=>s.id===t.detail.id?t.detail:s)),this.setTabStatus(t.detail),setTimeout(h)}getSlot(){return this.host.shadowRoot.querySelector("slot")}hidePanels(){for(const t of this.slotElements)t.style.display="none"}get host(){return i(this)}static get watchers(){return{tabs:[{tabsChanged:0}]}}};o.style=":host(limel-tab-panel){--tab-panel-background-color:rgb(var(--contrast-100));display:block;height:100%}.tab-panel{height:100%;position:relative;display:flex;flex-direction:column}.tab-content{height:100%;flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;box-sizing:border-box;background-color:var(--tab-panel-background-color)}";export{o as limel_tab_panel}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as o,h as i,a as t}from"./p-DBTJNfo7.js";import{c as l}from"./p-JbKhhoXs.js";import{C as a}from"./p--9pvUs5M.js";const r=class{constructor(i){e(this,i),this.change=o(this,"change"),this.disabled=!1,this.readonly=!1,this.checked=!1,this.indeterminate=!1,this.required=!1,this.readonlyLabels=[],this.modified=!1,this.shouldReinitialize=!1,this.id=l(),this.helperTextId=l(),this.destroyMDCInstances=()=>{const e=this.getCheckboxElement();e&&(delete e.dataset.indeterminate,e.indeterminate=!1)},this.isInvalid=()=>!!this.invalid||!(!this.required||!this.modified||this.checked)||void 0,this.initialize=()=>{const e=this.getCheckboxElement();e&&(e.indeterminate=this.indeterminate,e.checked=this.checked||this.indeterminate)},this.getCheckboxElement=()=>{var e,o;return(null===(o=null===(e=this.limelCheckbox)||void 0===e?void 0:e.shadowRoot)||void 0===o?void 0:o.querySelector('input[type="checkbox"]'))||null},this.onChange=e=>{var o;e.stopPropagation();const i=e.currentTarget,t=null!==(o=null==i?void 0:i.checked)&&void 0!==o?o:this.checked;this.change.emit(t),this.modified=!0}}handleCheckedChange(e){const o=this.getCheckboxElement();o&&(o.checked=e||this.indeterminate)}handleIndeterminateChange(e){const o=this.getCheckboxElement();o&&(o.checked=this.checked||e,o.indeterminate=e)}handleReadonlyChange(){this.destroyMDCInstances(),this.shouldReinitialize=!0}componentDidRender(){this.shouldReinitialize&&(this.initialize(),this.shouldReinitialize=!1)}connectedCallback(){this.initialize()}componentDidLoad(){this.initialize()}disconnectedCallback(){this.destroyMDCInstances()}render(){return i(a,{key:"2a6a0bbfb8b740dccf629adda516b83fbfcfc23c",disabled:this.disabled||this.readonly,label:this.label,readonlyLabels:this.readonlyLabels,helperText:this.helperText,helperTextId:this.helperTextId,checked:this.checked||this.indeterminate,indeterminate:this.indeterminate,required:this.required,readonly:this.readonly,invalid:this.isInvalid(),onChange:this.onChange,id:this.id})}get limelCheckbox(){return t(this)}static get watchers(){return{checked:[{handleCheckedChange:0}],indeterminate:[{handleIndeterminateChange:0}],readonly:[{handleReadonlyChange:0}]}}};r.style='@charset "UTF-8";*,*:before,*:after{box-sizing:border-box}.boolean-input{--limel-boolean-input-box-size:1.25rem;--limel-boolean-input-gap-size:0.5rem;position:relative;isolation:isolate;display:flex;align-items:center;min-height:var(--limel-checkbox-min-height, 2.5rem);width:100%}.boolean-input input[type=checkbox],.boolean-input input[type=radio]{position:absolute;width:0;height:0;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0, 0, 0, 0);clip-path:inset(50%);white-space:nowrap;-webkit-appearance:none;-moz-appearance:none;appearance:none}label.boolean-input-label{min-width:var(--limel-boolean-input-box-size);min-height:var(--limel-boolean-input-box-size);padding-top:0.125rem;cursor:pointer;position:relative;width:100%;overflow-wrap:var(--limel-boolean-input-label-overflow-wrap, normal);font-size:var(--limel-theme-default-small-font-size);color:var(--limel-theme-text-primary-on-background-color);padding-left:calc(var(--limel-boolean-input-box-size) + var(--limel-boolean-input-gap-size))}.disabled:not([readonly]):not([readonly=true]) label.boolean-input-label{cursor:not-allowed;color:var(--limel-theme-text-disabled-color)}.required label.boolean-input-label:after{margin-left:0.0625rem;content:"*"}.invalid:not(.readonly) label.boolean-input-label{color:var(--limel-theme-error-text-color)}:host(limel-checkbox.hide-label) label.boolean-input-label,.hide-label label.boolean-input-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;opacity:0;width:var(--limel-boolean-input-box-size)}.box{position:absolute;pointer-events:none;transition:border-color 0.4s ease 0.2s, background-color 0.2s ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease;display:inline-block;vertical-align:middle;width:var(--limel-boolean-input-box-size);height:var(--limel-boolean-input-box-size);margin-right:var(--limel-boolean-input-gap-size);border-radius:var(--limel-boolean-input-box-border-radius);border:0.125rem solid;border-color:var(--checkbox-unchecked-border-color, rgb(var(--contrast-900)));background-color:var(--limel-checkbox-background-color, rgb(var(--contrast-300)));}.checked .box,.boolean-input>input[type=checkbox]:checked+.box,.boolean-input>input[type=radio]:checked+.box{background-color:var(--lime-primary-color, var(--limel-theme-primary-color));border-color:var(--lime-primary-color, var(--limel-theme-primary-color))}.disabled .box{opacity:0.4}.box{}.boolean-input:not(.disabled):hover .box{will-change:box-shadow;box-shadow:var(--button-shadow-hovered)}.boolean-input:not(.disabled):active .box{will-change:box-shadow;box-shadow:var(--button-shadow-pressed)}.box:before{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);content:"";position:absolute;inset:-0.1875rem;border-radius:inherit;}.boolean-input>input[type=checkbox]:focus-visible+.box:before,.boolean-input>input[type=radio]:focus-visible+.box:before{will-change:box-shadow;box-shadow:var(--shadow-depth-8-focused)}.box:after{transition:opacity 0.2s ease, width 0.4s ease, box-shadow 0.6s cubic-bezier(0.68, -0.55, 0, 1.87), transform 0.6s cubic-bezier(0.68, -0.55, 0, 1.87);content:"";position:absolute;inset:0;margin:auto;border-radius:1rem;opacity:0;background-color:rgb(var(--color-white));}.boolean-input:not(.disabled):hover .box:after{will-change:opacity, box-shadow, transform, width}:host(limel-checkbox){--limel-boolean-input-label-overflow-wrap:var( --checkbox-label-overflow-wrap, normal );min-height:var(--limel-checkbox-min-height, 2.5rem)}.box:after{height:0.125rem;width:0.25rem}.indeterminate .box:after{opacity:1;width:calc(var(--limel-boolean-input-box-size) - 0.5rem)}.checkbox{--limel-boolean-input-box-border-radius:0.25rem}.checkbox svg.check-mark{position:absolute;z-index:1;inset:0;transform:translate3d(-0.125rem, -0.125rem, 0);width:var(--limel-boolean-input-box-size);height:var(--limel-boolean-input-box-size);padding:0.25rem;color:rgb(var(--color-white));opacity:0;stroke-width:0.1875rem;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round}.checkbox svg.check-mark path{stroke-dashoffset:29.7833;stroke-dasharray:29.7833;transition:stroke-dashoffset 180ms cubic-bezier(0.4, 0, 0.6, 1)}.checkbox{}.checkbox:not(.indeterminate)>input[type=checkbox]:checked+.box svg.check-mark{opacity:1}.checkbox:not(.indeterminate)>input[type=checkbox]:checked+.box svg.check-mark path{stroke-dashoffset:0}limel-dynamic-label{margin-top:0.375rem;margin-left:-0.25rem}:host(limel-checkbox:focus),:host(limel-checkbox:focus-visible),:host(limel-checkbox:focus-within){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limel-checkbox){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limel-checkbox:focus) limel-helper-line,:host(limel-checkbox:focus-visible) limel-helper-line,:host(limel-checkbox:focus-within) limel-helper-line,:host(limel-checkbox:hover) limel-helper-line{will-change:grid-template-rows}';export{r as limel_checkbox}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as t,h as r,H as o}from"./p-DBTJNfo7.js";import{c as i}from"./p-JbKhhoXs.js";const s=class{constructor(o){e(this,o),this.change=t(this,"change"),this.disabled=!1,this.readonly=!1,this.factor=1,this.required=!1,this.invalid=!1,this.displaysPercentageColors=!1,this.unit="",this.valuemax=100,this.valuemin=0,this.renderStepDots=(e,t)=>{if(!this.step)return;const o=this.multiplyByFactor(this.step),i=Math.floor((t-e)/o)+1;return i>20?void 0:Array.from({length:i},(()=>r("span",{class:"step-dot"})))},this.renderHelperLine=()=>{if(this.helperText)return r("limel-helper-line",{helperText:this.helperText,helperTextId:this.helperTextId,invalid:this.invalid})},this.handleInput=e=>{e.stopPropagation();const t=Number(e.target.value);this.displayValue=t,this.setPercentageClass(t/this.factor)},this.handleChange=e=>{e.stopPropagation();let t=Number(e.target.value);const r=this.multiplyByFactor(this.step);this.isMultipleOfStep(t,r)||(t=this.roundToStep(t,r)),this.change.emit(t/this.factor)},this.getContainerClassList=()=>this.percentageClass?{[this.percentageClass]:!0}:{},this.multiplyByFactor=e=>Math.round(e*this.factor),this.getValue=()=>{let e=this.value;return Number.isFinite(e)||(e=this.valuemin),e},this.getFraction=()=>{const e=this.multiplyByFactor(this.valuemin),t=this.multiplyByFactor(this.valuemax);return t===e?0:Math.max(0,Math.min(1,(this.displayValue-e)/(t-e)))},this.setPercentageClass=e=>{this.percentageClass=function(e){return 0===e?"percent-0":e<.1?"percent-0-10":e<.2?"percent-10-20":e<.3?"percent-20-30":e<.4?"percent-30-40":e<.5?"percent-40-50":e<.6?"percent-50-60":e<.7?"percent-60-70":e<.8?"percent-70-80":e<.9?"percent-80-90":"percent-90-100"}((e-this.valuemin)/(this.valuemax-this.valuemin))},this.isMultipleOfStep=(e,t)=>!t||e%t==0,this.roundToStep=(e,t)=>Math.round(e/t)*t,this.labelId=i(),this.helperTextId=i()}componentWillLoad(){this.displayValue=this.multiplyByFactor(this.getValue()),this.setPercentageClass(this.getValue())}render(){const e=this.multiplyByFactor(this.valuemin),t=this.multiplyByFactor(this.valuemax),i=this.getFraction(),s={};return this.step&&(s.step=this.multiplyByFactor(this.step)),(this.disabled||this.readonly)&&(s.disabled=!0),r(o,{key:"fa9695563f078bdab1707422cad3aaef2610e592",class:this.getContainerClassList()},r("limel-notched-outline",{key:"8b71ef15e9544a6b346248217c2c2fa8acbba6e7",labelId:this.labelId,label:this.label,required:this.required,invalid:this.invalid,disabled:this.disabled,readonly:this.readonly,hasValue:!!this.value,hasFloatingLabel:!0},r("div",{key:"0327cf7d5295bb1d56e2e34b8dca15cfc3e15c0d",slot:"content"},r("div",{key:"83fade77119ba9fa1d24ae8fdcd54317648918b3",class:"slider",style:{"--slider-fraction":`${i}`}},r("input",Object.assign({key:"5181430787abe75b4556923e31ebe8520df977e9",type:"range",min:e,max:t,value:this.displayValue,"aria-labelledby":this.labelId,"aria-describedby":this.helperText?this.helperTextId:void 0,onInput:this.handleInput,onChange:this.handleChange},s)),r("div",{key:"6ee95d718f1d01e92adcf9592882ed1d32e4ba67",class:"track"},r("div",{key:"bba420e41501990bdeb1326e59e6eff57000848d",class:"active"}),this.renderStepDots(e,t)),r("div",{key:"46e5a45adbda4e1a650d01408c3d228f1c6be68d",class:"thumb"},r("div",{key:"eeba995f52ff3291e2e7818528b05c7c1dec1b32",class:"knob"}),r("div",{key:"d0321459ed22c6870d939da54df43fe2bfef6333",class:"indicator","aria-hidden":"true"},this.displayValue))),r("div",{key:"bcc4449d7605343fd64f4b89b50c8e5d665f6937",class:"range-labels"},r("span",{key:"301c78b1640551fe814ad3b2768bb40f9b682b39",class:"min"},this.multiplyByFactor(this.valuemin),this.unit),r("span",{key:"7f8d741f63030b6f8e88231e5215448b815bf3ca",class:"max"},this.multiplyByFactor(this.valuemax),this.unit)))),this.renderHelperLine())}watchValue(){this.displayValue=this.multiplyByFactor(this.getValue()),this.setPercentageClass(this.getValue())}static get watchers(){return{value:[{watchValue:0}]}}};s.style='@charset "UTF-8";:host([displays-percentage-colors].percent-0){--lime-primary-color:var(--color-percent--0)}:host([displays-percentage-colors].percent-0-10){--lime-primary-color:var(--color-percent--0to10)}:host([displays-percentage-colors].percent-10-20){--lime-primary-color:var(--color-percent--10to20)}:host([displays-percentage-colors].percent-20-30){--lime-primary-color:var(--color-percent--20to30)}:host([displays-percentage-colors].percent-30-40){--lime-primary-color:var(--color-percent--30to40)}:host([displays-percentage-colors].percent-40-50){--lime-primary-color:var(--color-percent--40to50)}:host([displays-percentage-colors].percent-50-60){--lime-primary-color:var(--color-percent--50to60)}:host([displays-percentage-colors].percent-60-70){--lime-primary-color:var(--color-percent--60to70)}:host([displays-percentage-colors].percent-70-80){--lime-primary-color:var(--color-percent--70to80)}:host([displays-percentage-colors].percent-80-90){--lime-primary-color:var(--color-percent--80to90)}:host([displays-percentage-colors].percent-90-100){--lime-primary-color:var(--color-percent--90to100)}:host([displays-percentage-colors].percent-30-40) .indicator,:host([displays-percentage-colors].percent-40-50) .indicator,:host([displays-percentage-colors].percent-70-80) .indicator{color:rgb(var(--color-gray-darker))}:host([displays-percentage-colors].percent-50-60) .indicator,:host([displays-percentage-colors].percent-60-70) .indicator{color:rgb(var(--color-gray-dark))}:host([readonly]:not([readonly=false])) input[type=range]{cursor:default}:host([readonly]:not([readonly=false])) .track,:host([readonly]:not([readonly=false])) .active,:host([readonly]:not([readonly=false])) .indicator{height:0.75rem}:host([readonly]:not([readonly=false])) .indicator{box-shadow:none}:host([readonly]:not([readonly=false])) .knob{opacity:0}:host([readonly]:not([readonly=false])) .active{background-color:var(--lime-primary-color, var(--limel-theme-primary-color))}.thumb{position:absolute;left:calc(var(--slider-fraction) * 100%);top:0;bottom:0;width:0;z-index:1}.knob{transition:border-color 0.5s ease;position:absolute;top:50%;left:0;transform:translate3d(-50%, -50%, 0);width:1.25rem;height:1.25rem;border-radius:50%;border:0.5rem solid;border-color:var(--lime-primary-color, var(--limel-theme-primary-color));background-color:rgb(var(--contrast-100))}.knob:before,.knob:after{transition:all 0.2s ease 0.2s;content:"";display:block;position:absolute;top:0;bottom:0;margin:auto;width:0;height:0;border:0.375rem solid transparent}:host([disabled]:not([disabled=false])) .knob:before,:host([disabled]:not([disabled=false])) .knob:after{content:none}.knob:before{opacity:calc(var(--slider-fraction) * 100);left:-1rem;transform:rotate(90deg)}.knob:after{opacity:calc((1 - var(--slider-fraction)) * 100);right:-1rem;transform:rotate(-90deg)}.slider:hover .knob,.slider:has(input[type=range]:active) .knob,.slider:has(input[type=range]:focus) .knob{box-shadow:var(--button-shadow-normal)}.slider:hover .knob:before,.slider:has(input[type=range]:active) .knob:before,.slider:has(input[type=range]:focus) .knob:before{left:-1.5rem;border-top-color:rgb(var(--contrast-1400), 0.5)}.slider:hover .knob:after,.slider:has(input[type=range]:active) .knob:after,.slider:has(input[type=range]:focus) .knob:after{right:-1.5rem;border-top-color:rgb(var(--contrast-1400), 0.5)}.indicator{user-select:none;position:absolute;left:0;top:50%;z-index:1;transform:translate3d(-50%, -50%, 0);transform-origin:bottom center;transition:transform 0.2s ease-out, box-shadow 0.2s ease-out, background-color 0.5s ease;border-radius:1.25rem;padding:0 0.375rem;height:1.25rem;display:flex;align-items:center;white-space:nowrap;color:rgb(var(--color-white));font-size:0.6875rem;background-color:var(--lime-primary-color, var(--limel-theme-primary-color));box-shadow:var(--button-shadow-normal)}:host(:not([disabled]):not([readonly])) input[type=range]:active~.thumb .indicator,:host(:not([disabled]):not([readonly])) input[type=range]:focus~.thumb .indicator{transform:translate3d(-50%, calc(-100% - 0.75rem), 0) scale(1.25);box-shadow:var(--shadow-depth-16)}*,*:before,*:after{box-sizing:border-box;min-width:0;min-height:0}:host(limel-slider){box-sizing:border-box;isolation:isolate;position:relative;display:flex;flex-direction:column}:host(limel-slider:not([invalid]):not([invalid=true])) .limel-notched-outline,:host(limel-slider[disabled]:not([disabled=false])) .limel-notched-outline{--limel-notched-outline-border-color:transparent;--limel-notched-outline-background-color:transparent}div[slot=content]{display:flex;flex-direction:column;width:100%;padding:0 0.25rem}.slider{position:relative;height:2.5rem;margin:0 0.75rem}input[type=range]{position:absolute;width:100%;height:100%;opacity:0;cursor:pointer;z-index:2;margin:0;appearance:none}:host([disabled]:not([disabled=false])) input[type=range]{cursor:not-allowed}:host([disabled]:not([disabled=false])) .track .active{opacity:0.5}:host([disabled]:not([disabled=false])) .indicator{border-radius:0.125rem;box-shadow:var(--button-shadow-pressed)}.track{transition:background-color 0.5s ease;display:flex;align-items:center;justify-content:space-between;position:absolute;left:0;right:0;top:50%;transform:translateY(-50%);height:0.5rem;border-radius:1rem;background-color:rgba(var(--contrast-700), 0.6)}.track:before,.track:after{content:"";display:inline-block;position:absolute;top:0;bottom:0;margin:auto;width:0.375rem;height:0.375rem;border-radius:50%;background-color:rgba(var(--contrast-700), 0.6)}.track:before{left:-0.75rem}.track:after{right:-0.75rem}.track .active{transition:background-color 0.5s ease;position:absolute;height:100%;width:calc(var(--slider-fraction) * 100%);border-radius:inherit;background-color:var(--lime-primary-color, var(--limel-theme-primary-color))}.step-dot{transform:translateX(-50%);border-radius:50%;height:0.25rem;width:0.25rem;background-color:rgb(var(--contrast-100), 0.6)}.step-dot:first-of-type,.step-dot:last-of-type{opacity:0}.range-labels{display:flex;justify-content:space-between;margin-top:-0.75rem;width:100%}.range-labels .min,.range-labels .max{line-height:1;font-size:0.75rem;color:var(--limel-notched-outline-label-color, rgb(var(--contrast-1200)))}:host(limel-slider:focus),:host(limel-slider:focus-visible),:host(limel-slider:focus-within){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limel-slider){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limel-slider:focus) limel-helper-line,:host(limel-slider:focus-visible) limel-helper-line,:host(limel-slider:focus-within) limel-helper-line,:host(limel-slider:hover) limel-helper-line{will-change:grid-template-rows}';export{s as limel_slider}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as e}from"./p-DBTJNfo7.js";import{t as s}from"./p-DVRaJQvC.js";import{a,E as n}from"./p-rI0IeKpx.js";const o=class{constructor(e){t(this,e),this.cancel=i(this,"cancel"),this.save=i(this,"save"),this.linkChange=i(this,"linkChange"),this.language="en",this.isOpen=!1,this.getTranslation=t=>s.get(t,this.language),this.isValid=t=>{try{new URL(t)}catch(t){return!1}return!0},this.handleKeyDown=t=>{var i;t.key===a&&(this.saveButton&&this.saveButton.focus(),t.preventDefault(),this.isValid(null===(i=this.link)||void 0===i?void 0:i.href)&&this.handleSave(t))},this.handleCancel=t=>{t instanceof KeyboardEvent&&t.key!==n||(t.stopPropagation(),t.preventDefault(),this.cancel.emit())},this.handleSave=t=>{t.stopPropagation(),this.save.emit()},this.handleLinkInputAction=t=>{window.open(this.link.href,"_blank"),t.stopPropagation()},this.handleLinkTitleChange=t=>{var i;this.emitLinkChange(t.detail,null===(i=this.link)||void 0===i?void 0:i.href)},this.handleLinkValueChange=t=>{var i;this.emitLinkChange(null===(i=this.link)||void 0===i?void 0:i.text,t.detail)},this.emitLinkChange=(t,i)=>{this.linkChange.emit({text:t,href:i})}}connectedCallback(){this.setupGlobalHandlers()}disconnectedCallback(){this.teardownGlobalHandlers()}setupGlobalHandlers(){this.isOpen&&document.addEventListener("keyup",this.handleCancel)}teardownGlobalHandlers(){document.removeEventListener("keyup",this.handleCancel)}componentDidLoad(){this.focusOnTextInput()}focusOnTextInput(){if(this.textInput){const t=this.textInput.shadowRoot.querySelector("input");t&&requestAnimationFrame((()=>{t.focus()}))}}render(){var t,i;const s=this.isValid(this.link.href);return[e("limel-input-field",{key:"
|
|
1
|
+
import{r as t,c as i,h as e}from"./p-DBTJNfo7.js";import{t as s}from"./p-DVRaJQvC.js";import{a,E as n}from"./p-rI0IeKpx.js";const o=class{constructor(e){t(this,e),this.cancel=i(this,"cancel"),this.save=i(this,"save"),this.linkChange=i(this,"linkChange"),this.language="en",this.isOpen=!1,this.getTranslation=t=>s.get(t,this.language),this.isValid=t=>{try{new URL(t)}catch(t){return!1}return!0},this.handleKeyDown=t=>{var i;t.key===a&&(this.saveButton&&this.saveButton.focus(),t.preventDefault(),this.isValid(null===(i=this.link)||void 0===i?void 0:i.href)&&this.handleSave(t))},this.handleCancel=t=>{t instanceof KeyboardEvent&&t.key!==n||(t.stopPropagation(),t.preventDefault(),this.cancel.emit())},this.handleSave=t=>{t.stopPropagation(),this.save.emit()},this.handleLinkInputAction=t=>{window.open(this.link.href,"_blank"),t.stopPropagation()},this.handleLinkTitleChange=t=>{var i;this.emitLinkChange(t.detail,null===(i=this.link)||void 0===i?void 0:i.href)},this.handleLinkValueChange=t=>{var i;this.emitLinkChange(null===(i=this.link)||void 0===i?void 0:i.text,t.detail)},this.emitLinkChange=(t,i)=>{this.linkChange.emit({text:t,href:i})}}connectedCallback(){this.setupGlobalHandlers()}disconnectedCallback(){this.teardownGlobalHandlers()}setupGlobalHandlers(){this.isOpen&&document.addEventListener("keyup",this.handleCancel)}teardownGlobalHandlers(){document.removeEventListener("keyup",this.handleCancel)}componentDidLoad(){this.focusOnTextInput()}focusOnTextInput(){if(this.textInput){const t=this.textInput.shadowRoot.querySelector("input");t&&requestAnimationFrame((()=>{t.focus()}))}}render(){var t,i;const s=this.isValid(this.link.href);return[e("limel-input-field",{key:"f91dd3a9c03bb52cb91ea0f3251288f5a612cd3a",label:this.getTranslation("editor-link-menu.text"),value:(null===(t=this.link)||void 0===t?void 0:t.text)||"",leadingIcon:"text_cursor",onChange:this.handleLinkTitleChange,onKeyDown:this.handleKeyDown,ref:t=>this.textInput=t}),e("limel-input-field",{key:"1034663268cae0a749397331b43ea44387431c78",label:this.getTranslation("editor-link-menu.link"),value:(null===(i=this.link)||void 0===i?void 0:i.href)||"",type:"text",leadingIcon:"-lime-text-link",trailingIcon:"external_link",invalid:!s,onChange:this.handleLinkValueChange,onAction:this.handleLinkInputAction,onKeyDown:this.handleKeyDown}),e("div",{key:"5c4b46deb47d9369a0a59e1e5908934093322755",class:"actions"},e("limel-button",{key:"62c2dcc49a7907d938a27e2887432caa3e1a75ff",label:this.getTranslation("cancel"),onClick:this.handleCancel}),e("limel-button",{key:"5252752da58d02fd81abef41fc9788a07e277738",primary:!0,label:this.getTranslation("save"),disabled:!s,onClick:this.handleSave,ref:t=>this.saveButton=t,slot:"button"}))]}};o.style=":host(limel-text-editor-link-menu){animation:fade 0.2s ease forwards;animation-delay:0.1s;opacity:0;display:flex;flex-direction:column;gap:0.5rem;padding:0.5rem;max-width:calc(100vw - 2rem);border-radius:0.5rem;background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--shadow-depth-16)}.actions{display:flex;justify-content:end;gap:0.5rem}@keyframes fade{0%{scale:0.86;opacity:0}100%{scale:1;opacity:1}}";export{o as limel_text_editor_link_menu}
|
|
@@ -41,6 +41,7 @@ label.boolean-input-label {
|
|
|
41
41
|
cursor: pointer;
|
|
42
42
|
position: relative;
|
|
43
43
|
width: 100%;
|
|
44
|
+
overflow-wrap: var(--limel-boolean-input-label-overflow-wrap, normal);
|
|
44
45
|
|
|
45
46
|
font-size: var(--limel-theme-default-small-font-size);
|
|
46
47
|
color: var(--limel-theme-text-primary-on-background-color);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @exampleComponent limel-example-slider-basic
|
|
3
3
|
* @exampleComponent limel-example-slider-multiplier
|
|
4
4
|
* @exampleComponent limel-example-slider-multiplier-percentage-colors
|
|
5
|
+
* @exampleComponent limel-example-slider-unit
|
|
5
6
|
* @exampleComponent limel-example-slider-composite
|
|
6
7
|
*/
|
|
7
8
|
export declare class Slider {
|
|
@@ -71,43 +72,24 @@ export declare class Slider {
|
|
|
71
72
|
* Emitted when the value has been changed
|
|
72
73
|
*/
|
|
73
74
|
private change;
|
|
74
|
-
private rootElement;
|
|
75
75
|
private percentageClass;
|
|
76
|
-
private
|
|
76
|
+
private displayValue;
|
|
77
77
|
private labelId;
|
|
78
78
|
private helperTextId;
|
|
79
|
-
private observer;
|
|
80
79
|
constructor();
|
|
81
|
-
connectedCallback(): void;
|
|
82
80
|
componentWillLoad(): void;
|
|
83
|
-
componentDidLoad(): void;
|
|
84
|
-
disconnectedCallback(): void;
|
|
85
81
|
render(): any;
|
|
86
|
-
protected watchDisabled(): void;
|
|
87
|
-
protected watchReadonly(): void;
|
|
88
82
|
protected watchValue(): void;
|
|
89
|
-
private
|
|
90
|
-
private renderSliderContainer;
|
|
91
|
-
private renderSliderInput;
|
|
92
|
-
private renderTrack;
|
|
93
|
-
private renderThumb;
|
|
83
|
+
private renderStepDots;
|
|
94
84
|
private renderHelperLine;
|
|
95
|
-
private
|
|
96
|
-
private
|
|
97
|
-
private createMDCSlider;
|
|
98
|
-
private destroyMDCSlider;
|
|
99
|
-
private changeHandler;
|
|
100
|
-
private inputHandler;
|
|
85
|
+
private handleInput;
|
|
86
|
+
private handleChange;
|
|
101
87
|
private getContainerClassList;
|
|
102
|
-
private resizeObserverCallback;
|
|
103
|
-
private updateDisabledState;
|
|
104
88
|
private multiplyByFactor;
|
|
105
89
|
private getValue;
|
|
90
|
+
private getFraction;
|
|
106
91
|
private setPercentageClass;
|
|
107
92
|
private isMultipleOfStep;
|
|
108
93
|
private roundToStep;
|
|
109
|
-
private getRootElement;
|
|
110
|
-
private getInputElement;
|
|
111
|
-
private isStepConfigured;
|
|
112
94
|
}
|
|
113
95
|
//# sourceMappingURL=slider.d.ts.map
|
|
@@ -3280,6 +3280,7 @@ export namespace Components {
|
|
|
3280
3280
|
* @exampleComponent limel-example-slider-basic
|
|
3281
3281
|
* @exampleComponent limel-example-slider-multiplier
|
|
3282
3282
|
* @exampleComponent limel-example-slider-multiplier-percentage-colors
|
|
3283
|
+
* @exampleComponent limel-example-slider-unit
|
|
3283
3284
|
* @exampleComponent limel-example-slider-composite
|
|
3284
3285
|
*/
|
|
3285
3286
|
interface LimelSlider {
|
|
@@ -5967,6 +5968,7 @@ declare global {
|
|
|
5967
5968
|
* @exampleComponent limel-example-slider-basic
|
|
5968
5969
|
* @exampleComponent limel-example-slider-multiplier
|
|
5969
5970
|
* @exampleComponent limel-example-slider-multiplier-percentage-colors
|
|
5971
|
+
* @exampleComponent limel-example-slider-unit
|
|
5970
5972
|
* @exampleComponent limel-example-slider-composite
|
|
5971
5973
|
*/
|
|
5972
5974
|
interface HTMLLimelSliderElement extends Components.LimelSlider, HTMLStencilElement {
|
|
@@ -9830,6 +9832,7 @@ declare namespace LocalJSX {
|
|
|
9830
9832
|
* @exampleComponent limel-example-slider-basic
|
|
9831
9833
|
* @exampleComponent limel-example-slider-multiplier
|
|
9832
9834
|
* @exampleComponent limel-example-slider-multiplier-percentage-colors
|
|
9835
|
+
* @exampleComponent limel-example-slider-unit
|
|
9833
9836
|
* @exampleComponent limel-example-slider-composite
|
|
9834
9837
|
*/
|
|
9835
9838
|
interface LimelSlider {
|
|
@@ -12312,6 +12315,7 @@ declare module "@stencil/core" {
|
|
|
12312
12315
|
* @exampleComponent limel-example-slider-basic
|
|
12313
12316
|
* @exampleComponent limel-example-slider-multiplier
|
|
12314
12317
|
* @exampleComponent limel-example-slider-multiplier-percentage-colors
|
|
12318
|
+
* @exampleComponent limel-example-slider-unit
|
|
12315
12319
|
* @exampleComponent limel-example-slider-composite
|
|
12316
12320
|
*/
|
|
12317
12321
|
"limel-slider": LocalJSX.IntrinsicElements["limel-slider"] & JSXBase.HTMLAttributes<HTMLLimelSliderElement>;
|
package/package.json
CHANGED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @license
|
|
5
|
-
* Copyright 2020 Google Inc.
|
|
6
|
-
*
|
|
7
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
-
* in the Software without restriction, including without limitation the rights
|
|
10
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
-
* furnished to do so, subject to the following conditions:
|
|
13
|
-
*
|
|
14
|
-
* The above copyright notice and this permission notice shall be included in
|
|
15
|
-
* all copies or substantial portions of the Software.
|
|
16
|
-
*
|
|
17
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
|
-
* THE SOFTWARE.
|
|
24
|
-
*/
|
|
25
|
-
/**
|
|
26
|
-
* AnimationFrame provides a user-friendly abstraction around requesting
|
|
27
|
-
* and canceling animation frames.
|
|
28
|
-
*/
|
|
29
|
-
var AnimationFrame = /** @class */ (function () {
|
|
30
|
-
function AnimationFrame() {
|
|
31
|
-
this.rafIDs = new Map();
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Requests an animation frame. Cancels any existing frame with the same key.
|
|
35
|
-
* @param {string} key The key for this callback.
|
|
36
|
-
* @param {FrameRequestCallback} callback The callback to be executed.
|
|
37
|
-
*/
|
|
38
|
-
AnimationFrame.prototype.request = function (key, callback) {
|
|
39
|
-
var _this = this;
|
|
40
|
-
this.cancel(key);
|
|
41
|
-
var frameID = requestAnimationFrame(function (frame) {
|
|
42
|
-
_this.rafIDs.delete(key);
|
|
43
|
-
// Callback must come *after* the key is deleted so that nested calls to
|
|
44
|
-
// request with the same key are not deleted.
|
|
45
|
-
callback(frame);
|
|
46
|
-
});
|
|
47
|
-
this.rafIDs.set(key, frameID);
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* Cancels a queued callback with the given key.
|
|
51
|
-
* @param {string} key The key for this callback.
|
|
52
|
-
*/
|
|
53
|
-
AnimationFrame.prototype.cancel = function (key) {
|
|
54
|
-
var rafID = this.rafIDs.get(key);
|
|
55
|
-
if (rafID) {
|
|
56
|
-
cancelAnimationFrame(rafID);
|
|
57
|
-
this.rafIDs.delete(key);
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* Cancels all queued callback.
|
|
62
|
-
*/
|
|
63
|
-
AnimationFrame.prototype.cancelAll = function () {
|
|
64
|
-
var _this = this;
|
|
65
|
-
// Need to use forEach because it's the only iteration method supported
|
|
66
|
-
// by IE11. Suppress the underscore because we don't need it.
|
|
67
|
-
// tslint:disable-next-line:enforce-name-casing
|
|
68
|
-
this.rafIDs.forEach(function (_, key) {
|
|
69
|
-
_this.cancel(key);
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
/**
|
|
73
|
-
* Returns the queue of unexecuted callback keys.
|
|
74
|
-
*/
|
|
75
|
-
AnimationFrame.prototype.getQueue = function () {
|
|
76
|
-
var queue = [];
|
|
77
|
-
// Need to use forEach because it's the only iteration method supported
|
|
78
|
-
// by IE11. Suppress the underscore because we don't need it.
|
|
79
|
-
// tslint:disable-next-line:enforce-name-casing
|
|
80
|
-
this.rafIDs.forEach(function (_, key) {
|
|
81
|
-
queue.push(key);
|
|
82
|
-
});
|
|
83
|
-
return queue;
|
|
84
|
-
};
|
|
85
|
-
return AnimationFrame;
|
|
86
|
-
}());
|
|
87
|
-
|
|
88
|
-
exports.AnimationFrame = AnimationFrame;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @license
|
|
5
|
-
* Copyright 2016 Google Inc.
|
|
6
|
-
*
|
|
7
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
-
* in the Software without restriction, including without limitation the rights
|
|
10
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
-
* furnished to do so, subject to the following conditions:
|
|
13
|
-
*
|
|
14
|
-
* The above copyright notice and this permission notice shall be included in
|
|
15
|
-
* all copies or substantial portions of the Software.
|
|
16
|
-
*
|
|
17
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
|
-
* THE SOFTWARE.
|
|
24
|
-
*/
|
|
25
|
-
var cssPropertyNameMap = {
|
|
26
|
-
animation: {
|
|
27
|
-
prefixed: '-webkit-animation',
|
|
28
|
-
standard: 'animation',
|
|
29
|
-
},
|
|
30
|
-
transform: {
|
|
31
|
-
prefixed: '-webkit-transform',
|
|
32
|
-
standard: 'transform',
|
|
33
|
-
},
|
|
34
|
-
transition: {
|
|
35
|
-
prefixed: '-webkit-transition',
|
|
36
|
-
standard: 'transition',
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
function isWindow(windowObj) {
|
|
40
|
-
return Boolean(windowObj.document) && typeof windowObj.document.createElement === 'function';
|
|
41
|
-
}
|
|
42
|
-
function getCorrectPropertyName(windowObj, cssProperty) {
|
|
43
|
-
if (isWindow(windowObj) && cssProperty in cssPropertyNameMap) {
|
|
44
|
-
var el = windowObj.document.createElement('div');
|
|
45
|
-
var _a = cssPropertyNameMap[cssProperty], standard = _a.standard, prefixed = _a.prefixed;
|
|
46
|
-
var isStandard = standard in el.style;
|
|
47
|
-
return isStandard ? standard : prefixed;
|
|
48
|
-
}
|
|
49
|
-
return cssProperty;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
exports.getCorrectPropertyName = getCorrectPropertyName;
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2020 Google Inc.
|
|
4
|
-
*
|
|
5
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
* in the Software without restriction, including without limitation the rights
|
|
8
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
* furnished to do so, subject to the following conditions:
|
|
11
|
-
*
|
|
12
|
-
* The above copyright notice and this permission notice shall be included in
|
|
13
|
-
* all copies or substantial portions of the Software.
|
|
14
|
-
*
|
|
15
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
* THE SOFTWARE.
|
|
22
|
-
*/
|
|
23
|
-
/**
|
|
24
|
-
* AnimationFrame provides a user-friendly abstraction around requesting
|
|
25
|
-
* and canceling animation frames.
|
|
26
|
-
*/
|
|
27
|
-
var AnimationFrame = /** @class */ (function () {
|
|
28
|
-
function AnimationFrame() {
|
|
29
|
-
this.rafIDs = new Map();
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Requests an animation frame. Cancels any existing frame with the same key.
|
|
33
|
-
* @param {string} key The key for this callback.
|
|
34
|
-
* @param {FrameRequestCallback} callback The callback to be executed.
|
|
35
|
-
*/
|
|
36
|
-
AnimationFrame.prototype.request = function (key, callback) {
|
|
37
|
-
var _this = this;
|
|
38
|
-
this.cancel(key);
|
|
39
|
-
var frameID = requestAnimationFrame(function (frame) {
|
|
40
|
-
_this.rafIDs.delete(key);
|
|
41
|
-
// Callback must come *after* the key is deleted so that nested calls to
|
|
42
|
-
// request with the same key are not deleted.
|
|
43
|
-
callback(frame);
|
|
44
|
-
});
|
|
45
|
-
this.rafIDs.set(key, frameID);
|
|
46
|
-
};
|
|
47
|
-
/**
|
|
48
|
-
* Cancels a queued callback with the given key.
|
|
49
|
-
* @param {string} key The key for this callback.
|
|
50
|
-
*/
|
|
51
|
-
AnimationFrame.prototype.cancel = function (key) {
|
|
52
|
-
var rafID = this.rafIDs.get(key);
|
|
53
|
-
if (rafID) {
|
|
54
|
-
cancelAnimationFrame(rafID);
|
|
55
|
-
this.rafIDs.delete(key);
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* Cancels all queued callback.
|
|
60
|
-
*/
|
|
61
|
-
AnimationFrame.prototype.cancelAll = function () {
|
|
62
|
-
var _this = this;
|
|
63
|
-
// Need to use forEach because it's the only iteration method supported
|
|
64
|
-
// by IE11. Suppress the underscore because we don't need it.
|
|
65
|
-
// tslint:disable-next-line:enforce-name-casing
|
|
66
|
-
this.rafIDs.forEach(function (_, key) {
|
|
67
|
-
_this.cancel(key);
|
|
68
|
-
});
|
|
69
|
-
};
|
|
70
|
-
/**
|
|
71
|
-
* Returns the queue of unexecuted callback keys.
|
|
72
|
-
*/
|
|
73
|
-
AnimationFrame.prototype.getQueue = function () {
|
|
74
|
-
var queue = [];
|
|
75
|
-
// Need to use forEach because it's the only iteration method supported
|
|
76
|
-
// by IE11. Suppress the underscore because we don't need it.
|
|
77
|
-
// tslint:disable-next-line:enforce-name-casing
|
|
78
|
-
this.rafIDs.forEach(function (_, key) {
|
|
79
|
-
queue.push(key);
|
|
80
|
-
});
|
|
81
|
-
return queue;
|
|
82
|
-
};
|
|
83
|
-
return AnimationFrame;
|
|
84
|
-
}());
|
|
85
|
-
|
|
86
|
-
export { AnimationFrame as A };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2016 Google Inc.
|
|
4
|
-
*
|
|
5
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
* in the Software without restriction, including without limitation the rights
|
|
8
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
* furnished to do so, subject to the following conditions:
|
|
11
|
-
*
|
|
12
|
-
* The above copyright notice and this permission notice shall be included in
|
|
13
|
-
* all copies or substantial portions of the Software.
|
|
14
|
-
*
|
|
15
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
* THE SOFTWARE.
|
|
22
|
-
*/
|
|
23
|
-
var cssPropertyNameMap = {
|
|
24
|
-
animation: {
|
|
25
|
-
prefixed: '-webkit-animation',
|
|
26
|
-
standard: 'animation',
|
|
27
|
-
},
|
|
28
|
-
transform: {
|
|
29
|
-
prefixed: '-webkit-transform',
|
|
30
|
-
standard: 'transform',
|
|
31
|
-
},
|
|
32
|
-
transition: {
|
|
33
|
-
prefixed: '-webkit-transition',
|
|
34
|
-
standard: 'transition',
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
function isWindow(windowObj) {
|
|
38
|
-
return Boolean(windowObj.document) && typeof windowObj.document.createElement === 'function';
|
|
39
|
-
}
|
|
40
|
-
function getCorrectPropertyName(windowObj, cssProperty) {
|
|
41
|
-
if (isWindow(windowObj) && cssProperty in cssPropertyNameMap) {
|
|
42
|
-
var el = windowObj.document.createElement('div');
|
|
43
|
-
var _a = cssPropertyNameMap[cssProperty], standard = _a.standard, prefixed = _a.prefixed;
|
|
44
|
-
var isStandard = standard in el.style;
|
|
45
|
-
return isStandard ? standard : prefixed;
|
|
46
|
-
}
|
|
47
|
-
return cssProperty;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export { getCorrectPropertyName as g };
|