@limetech/lime-elements 40.14.3 → 40.14.5

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.
Files changed (56) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/lime-elements.cjs.js +1 -1
  3. package/dist/cjs/limel-breadcrumbs_6.cjs.entry.js +9 -7
  4. package/dist/cjs/limel-checkbox.cjs.entry.js +9 -6
  5. package/dist/cjs/limel-chip-set.cjs.entry.js +34 -3
  6. package/dist/cjs/limel-helper-line_3.cjs.entry.js +1 -1
  7. package/dist/cjs/limel-picker.cjs.entry.js +3 -3
  8. package/dist/cjs/limel-select.cjs.entry.js +13 -10
  9. package/dist/cjs/limel-slider.cjs.entry.js +7 -6
  10. package/dist/cjs/limel-switch.cjs.entry.js +5 -4
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/collection/components/checkbox/checkbox.js +11 -8
  13. package/dist/collection/components/chip-set/chip-set-input-helpers.js +3 -0
  14. package/dist/collection/components/chip-set/chip-set.css +2 -2
  15. package/dist/collection/components/chip-set/chip-set.js +30 -2
  16. package/dist/collection/components/input-field/input-field.css +28 -24
  17. package/dist/collection/components/input-field/input-field.js +8 -6
  18. package/dist/collection/components/notched-outline/notched-outline.css +3 -1
  19. package/dist/collection/components/picker/picker.js +3 -3
  20. package/dist/collection/components/select/select.css +4 -8
  21. package/dist/collection/components/select/select.js +9 -6
  22. package/dist/collection/components/select/select.template.js +4 -4
  23. package/dist/collection/components/slider/slider.js +8 -7
  24. package/dist/collection/components/switch/switch.js +6 -5
  25. package/dist/collection/style/internal/shared_input-select-picker.scss +2 -2
  26. package/dist/esm/lime-elements.js +1 -1
  27. package/dist/esm/limel-breadcrumbs_6.entry.js +9 -7
  28. package/dist/esm/limel-checkbox.entry.js +9 -6
  29. package/dist/esm/limel-chip-set.entry.js +34 -3
  30. package/dist/esm/limel-helper-line_3.entry.js +1 -1
  31. package/dist/esm/limel-picker.entry.js +3 -3
  32. package/dist/esm/limel-select.entry.js +13 -10
  33. package/dist/esm/limel-slider.entry.js +7 -6
  34. package/dist/esm/limel-switch.entry.js +5 -4
  35. package/dist/esm/loader.js +1 -1
  36. package/dist/lime-elements/lime-elements.esm.js +1 -1
  37. package/dist/lime-elements/{p-1663fa9d.entry.js → p-150010b5.entry.js} +1 -1
  38. package/dist/lime-elements/p-5633c069.entry.js +1 -0
  39. package/dist/lime-elements/p-88dcba1e.entry.js +1 -0
  40. package/dist/lime-elements/p-bb40b96c.entry.js +23 -0
  41. package/dist/lime-elements/{p-95ca7426.entry.js → p-d1eaba10.entry.js} +1 -1
  42. package/dist/lime-elements/{p-4a272ac2.entry.js → p-d94f1c0f.entry.js} +1 -1
  43. package/dist/lime-elements/p-f0e3a147.entry.js +159 -0
  44. package/dist/lime-elements/{p-9aa921a2.entry.js → p-f96a8e2c.entry.js} +1 -1
  45. package/dist/lime-elements/style/internal/shared_input-select-picker.scss +2 -2
  46. package/dist/types/components/checkbox/checkbox.d.ts +8 -5
  47. package/dist/types/components/chip-set/chip-set.d.ts +2 -0
  48. package/dist/types/components/select/select.d.ts +4 -4
  49. package/dist/types/components/slider/slider.d.ts +4 -3
  50. package/dist/types/components/switch/switch.d.ts +4 -3
  51. package/dist/types/components.d.ts +10 -10
  52. package/package.json +1 -1
  53. package/dist/lime-elements/p-3de45ea6.entry.js +0 -159
  54. package/dist/lime-elements/p-677836c9.entry.js +0 -1
  55. package/dist/lime-elements/p-ec531ecb.entry.js +0 -1
  56. package/dist/lime-elements/p-ed73fb0f.entry.js +0 -23
@@ -1 +1 @@
1
- import{r as t,c as e,h as r,H as o}from"./p-BU9IJqli.js";import{c as i}from"./p-BrjD-ITe.js";import{t as s}from"./p-B26k4gw8.js";import"./p-ChagAaNf.js";const a=class{constructor(o){t(this,o),this.change=e(this,"change",7),this.disabled=!1,this.readonly=!1,this.factor=1,this.required=!1,this.invalid=!1,this.displaysPercentageColors=!1,this.unit="",this.language="en",this.valuemax=100,this.valuemin=0,this.valueIsCommitted=!1,this.syncStateFromValue=()=>{const t=this.value;(t=>Number.isFinite(t))(t)?(this.isUnset=!1,this.valueIsCommitted=!0,this.displayValue=this.multiplyByFactor(t),this.setPercentageClass(t)):this.enterUnsetState()},this.enterUnsetState=()=>{this.isUnset=!0,this.valueIsCommitted=!1,this.displayValue=this.getRestingDisplayValue(),this.percentageClass=void 0},this.renderStepDots=(t,e)=>{if(!this.step)return;const o=this.multiplyByFactor(this.step),i=Math.floor((e-t)/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.hasClearButton=()=>!this.readonly&&!this.required,this.renderClearButton=()=>{if(!this.hasClearButton())return;const t=this.label?s.get("clear-value-of",this.language,{label:this.label}):s.get("clear-value",this.language);return r("button",{type:"button",id:this.clearButtonId,class:"clear-button","aria-label":t,onClick:this.handleClear,disabled:this.isUnset||this.disabled},r("svg",{viewBox:"0 0 32 32","aria-hidden":"true",focusable:"false"},r("path",{d:"M7.219 5.781L5.78 7.22 14.563 16 5.78 24.781 7.22 26.22 16 17.437l8.781 8.782 1.438-1.438L17.437 16l8.782-8.781L24.78 5.78 16 14.563z"})),r("limel-tooltip",{elementId:this.clearButtonId,label:t}))},this.handleInput=t=>{t.stopPropagation();const e=Number(t.target.value);this.isUnset=!1,this.displayValue=e,this.setPercentageClass(e/this.factor)},this.handleChange=t=>{t.stopPropagation(),this.commitValue(Number(t.target.value))},this.handleClick=t=>{this.valueIsCommitted||this.commitValue(Number(t.target.value))},this.commitValue=t=>{const e=this.multiplyByFactor(this.step),r=this.multiplyByFactor(this.valuemin);let o=t;this.isMultipleOfStep(o-r,e)||(o=r+this.roundToStep(o-r,e)),this.valueIsCommitted=!0,this.isUnset=!1,this.displayValue=o,this.setPercentageClass(o/this.factor),this.change.emit(o/this.factor)},this.handleClear=t=>{var e;t.stopPropagation(),this.enterUnsetState(),this.change.emit(null),null===(e=this.inputElement)||void 0===e||e.focus()},this.getContainerClassList=()=>Object.assign({"is-unset":this.isUnset,"has-clear-button":this.hasClearButton()},this.getPercentageClassList()),this.getPercentageClassList=()=>this.percentageClass?{[this.percentageClass]:!0}:{},this.multiplyByFactor=t=>Math.round(t*this.factor),this.getRestingDisplayValue=()=>{const t=this.multiplyByFactor(this.valuemin),e=(t+this.multiplyByFactor(this.valuemax))/2,r=this.step?this.multiplyByFactor(this.step):1;return t+Math.round((e-t)/r)*r},this.getFraction=()=>{const t=this.multiplyByFactor(this.valuemin),e=this.multiplyByFactor(this.valuemax);return e===t?0:Math.max(0,Math.min(1,(this.displayValue-t)/(e-t)))},this.setPercentageClass=t=>{this.percentageClass=function(t){return 0===t?"percent-0":t<.1?"percent-0-10":t<.2?"percent-10-20":t<.3?"percent-20-30":t<.4?"percent-30-40":t<.5?"percent-40-50":t<.6?"percent-50-60":t<.7?"percent-60-70":t<.8?"percent-70-80":t<.9?"percent-80-90":"percent-90-100"}((t-this.valuemin)/(this.valuemax-this.valuemin))},this.isMultipleOfStep=(t,e)=>!e||t%e==0,this.roundToStep=(t,e)=>Math.round(t/e)*e,this.inputId=i(),this.helperTextId=i(),this.clearButtonId=i()}componentWillLoad(){this.syncStateFromValue()}render(){const t=this.multiplyByFactor(this.valuemin),e=this.multiplyByFactor(this.valuemax),i=this.getFraction(),a={};return this.step&&(a.step=this.multiplyByFactor(this.step)),(this.disabled||this.readonly)&&(a.disabled=!0),r(o,{key:"3a782f6aa420997f4a088e922438245c7c34143b",class:this.getContainerClassList()},r("limel-notched-outline",{key:"997046fb961c325d2a4a1e5cc51b08d84bcc2274",labelId:this.inputId,label:this.label,required:this.required,invalid:this.invalid,disabled:this.disabled,readonly:this.readonly,hasValue:!this.isUnset,hasFloatingLabel:!0},r("div",{key:"985fceba0aa4385936c06b1e8cd083ead77823b2",slot:"content"},r("div",{key:"47238548b281254d3fe7e9fe7350890ffb5f573e",class:"slider",style:{"--slider-fraction":`${i}`}},r("input",Object.assign({key:"f3fc215a6b2c331342487f206c549e04d109a061",id:this.inputId,type:"range",min:t,max:e,value:this.displayValue,"aria-describedby":this.helperText?this.helperTextId:void 0,"aria-invalid":this.invalid?"true":void 0,"aria-valuetext":this.isUnset?s.get("value-not-set",this.language):void 0,ref:t=>{this.inputElement=t},onInput:this.handleInput,onChange:this.handleChange,onClick:this.handleClick},a)),r("div",{key:"407448db5cd86d489adb909e4c5ecc0e0d050c53",class:"track"},r("div",{key:"7f8c47aa449ee1a5ffe9c8fbc35e7b8ec9c818ad",class:"active"}),this.renderStepDots(t,e)),r("div",{key:"866541538223dddbd750c57836426941ef4e6139",class:"thumb"},r("div",{key:"b663cbb67b3656bec79b81a3d0b47fb08f234bfb",class:"knob"}),r("div",{key:"58bc88bc2c9ff6e1a2c4635708d2dd1c5744e7ac",class:"indicator","aria-hidden":"true"},this.isUnset?"↔︎":this.displayValue))),r("div",{key:"4bc12eebc0006e5e54ff2d6c44d04303e0370de0",class:"range-labels"},r("span",{key:"faa2e129c54b50f7503277fdfb8430270a154524",class:"min"},this.multiplyByFactor(this.valuemin),this.unit),r("span",{key:"ade8069607794cddfddec0d6b5d574b54fb7da0e",class:"max"},this.multiplyByFactor(this.valuemax),this.unit)))),this.renderClearButton(),this.renderHelperLine())}watchValue(){this.syncStateFromValue()}static get watchers(){return{value:[{watchValue:0}]}}};a.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;min-width:1.25rem;display:flex;align-items:center;justify-content: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(.has-clear-button) div[slot=content]{padding-right:calc(1rem + 0.25rem)}:host(.is-unset) .track .active{width:0}:host(.is-unset) .thumb{left:50%}button.clear-button{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit}button.clear-button:focus{outline:none}button.clear-button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button.clear-button: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:rgb(var(--contrast-1100));background-color:rgba(var(--contrast-700), 0.6)}button.clear-button:not([disabled]):hover,button.clear-button:not([disabled]):focus,button.clear-button:not([disabled]):focus-visible{will-change:color, background-color, box-shadow, transform}button.clear-button:not([disabled]):hover,button.clear-button:not([disabled]):focus-visible{transform:translate3d(0, 0.01rem, 0);color:rgb(var(--contrast-100));background-color:rgb(var(--contrast-1000))}button.clear-button:not([disabled]):hover{box-shadow:var(--button-shadow-hovered)}button.clear-button:not([disabled]):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.clear-button:not([disabled]):hover,button.clear-button:not([disabled]):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.clear-button:not([disabled]):focus-visible{background-color:rgb(var(--contrast-1000))}button.clear-button{position:absolute;inset:0.75rem 0 0 auto;display:flex;align-items:center;justify-content:center;height:1rem;width:1rem;border-radius:50%}button.clear-button svg{width:calc(1rem - 0.25rem);height:calc(1rem - 0.25rem);fill:currentColor}button.clear-button:before{content:"";position:absolute;inset:0 auto 0 0;margin:auto;height:0.125rem;width:0.25rem;background-color:rgba(var(--contrast-700), 0.6);transform:translate(-100%, 0)}button.clear-button[disabled]{color:rgb(var(--contrast-1000));background-color:rgb(var(--contrast-600));cursor:not-allowed}: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{a as limel_slider}
1
+ import{r as t,c as e,h as r,H as o}from"./p-BU9IJqli.js";import{c as i}from"./p-BrjD-ITe.js";import{t as s}from"./p-B26k4gw8.js";import"./p-ChagAaNf.js";const a=class{constructor(o){t(this,o),this.change=e(this,"change",7),this.disabled=!1,this.readonly=!1,this.factor=1,this.required=!1,this.invalid=!1,this.displaysPercentageColors=!1,this.unit="",this.language="en",this.valuemax=100,this.valuemin=0,this.valueIsCommitted=!1,this.syncStateFromValue=()=>{const t=this.value;(t=>Number.isFinite(t))(t)?(this.isUnset=!1,this.valueIsCommitted=!0,this.displayValue=this.multiplyByFactor(t),this.setPercentageClass(t)):this.enterUnsetState()},this.enterUnsetState=()=>{this.isUnset=!0,this.valueIsCommitted=!1,this.displayValue=this.getRestingDisplayValue(),this.percentageClass=void 0},this.renderStepDots=(t,e)=>{if(!this.step)return;const o=this.multiplyByFactor(this.step),i=Math.floor((e-t)/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.hasClearButton=()=>!this.readonly&&!this.required,this.renderClearButton=()=>{if(!this.hasClearButton())return;const t=this.label?s.get("clear-value-of",this.language,{label:this.label}):s.get("clear-value",this.language);return r("button",{type:"button",id:this.clearButtonId,class:"clear-button","aria-label":t,onClick:this.handleClear,disabled:this.isUnset||this.disabled},r("svg",{viewBox:"0 0 32 32","aria-hidden":"true",focusable:"false"},r("path",{d:"M7.219 5.781L5.78 7.22 14.563 16 5.78 24.781 7.22 26.22 16 17.437l8.781 8.782 1.438-1.438L17.437 16l8.782-8.781L24.78 5.78 16 14.563z"})),r("limel-tooltip",{elementId:this.clearButtonId,label:t}))},this.handleInput=t=>{t.stopPropagation();const e=Number(t.target.value);this.isUnset=!1,this.displayValue=e,this.setPercentageClass(e/this.factor)},this.handleChange=t=>{t.stopPropagation(),this.commitValue(Number(t.target.value))},this.handleClick=t=>{this.valueIsCommitted||this.commitValue(Number(t.target.value))},this.commitValue=t=>{const e=this.multiplyByFactor(this.step),r=this.multiplyByFactor(this.valuemin);let o=t;this.isMultipleOfStep(o-r,e)||(o=r+this.roundToStep(o-r,e)),this.valueIsCommitted=!0,this.isUnset=!1,this.displayValue=o,this.setPercentageClass(o/this.factor),this.change.emit(o/this.factor)},this.handleClear=t=>{var e;t.stopPropagation(),this.enterUnsetState(),this.change.emit(null),null===(e=this.inputElement)||void 0===e||e.focus()},this.getContainerClassList=()=>Object.assign({"is-unset":this.isUnset,"has-clear-button":this.hasClearButton()},this.getPercentageClassList()),this.getPercentageClassList=()=>this.percentageClass?{[this.percentageClass]:!0}:{},this.multiplyByFactor=t=>Math.round(t*this.factor),this.getRestingDisplayValue=()=>{const t=this.multiplyByFactor(this.valuemin),e=(t+this.multiplyByFactor(this.valuemax))/2,r=this.step?this.multiplyByFactor(this.step):1;return t+Math.round((e-t)/r)*r},this.getFraction=()=>{const t=this.multiplyByFactor(this.valuemin),e=this.multiplyByFactor(this.valuemax);return e===t?0:Math.max(0,Math.min(1,(this.displayValue-t)/(e-t)))},this.setPercentageClass=t=>{this.percentageClass=function(t){return 0===t?"percent-0":t<.1?"percent-0-10":t<.2?"percent-10-20":t<.3?"percent-20-30":t<.4?"percent-30-40":t<.5?"percent-40-50":t<.6?"percent-50-60":t<.7?"percent-60-70":t<.8?"percent-70-80":t<.9?"percent-80-90":"percent-90-100"}((t-this.valuemin)/(this.valuemax-this.valuemin))},this.isMultipleOfStep=(t,e)=>!e||t%e==0,this.roundToStep=(t,e)=>Math.round(t/e)*e,this.inputId=i(),this.helperTextId=i(),this.clearButtonId=i()}componentWillLoad(){this.syncStateFromValue()}render(){const t=this.multiplyByFactor(this.valuemin),e=this.multiplyByFactor(this.valuemax),i=this.getFraction(),a={};return this.step&&(a.step=this.multiplyByFactor(this.step)),(this.disabled||this.readonly)&&(a.disabled=!0),r(o,{key:"4fe4c4d105e9b5cbee5299d8eccb215a2da9e79e",class:this.getContainerClassList()},r("limel-notched-outline",{key:"e5a0b3e92e1a91c61e2da6489b0b02a684126c98",labelId:this.inputId,label:this.label,required:this.required,invalid:this.invalid,disabled:this.disabled,readonly:this.readonly,hasValue:!this.isUnset,hasFloatingLabel:!0},r("div",{key:"d4c854c56f632778ad84444de663883af90066f0",slot:"content"},r("div",{key:"8ee47dd4e40db9ba9645d3725e6153df874318c1",class:"slider",style:{"--slider-fraction":`${i}`}},r("input",Object.assign({key:"44943cd55fcd376686cf7912665834932fc0f244",id:this.inputId,type:"range",min:t,max:e,value:this.displayValue,"aria-describedby":this.helperText?this.helperTextId:void 0,"aria-invalid":this.invalid?"true":void 0,"aria-valuetext":this.isUnset?s.get("value-not-set",this.language):void 0,ref:t=>{this.inputElement=t},onInput:this.handleInput,onChange:this.handleChange,onClick:this.handleClick},a)),r("div",{key:"fd5746650df94db4fd49a80566ae984b491c449d",class:"track"},r("div",{key:"0096471f182419bcb738282520b3cd23bff091fd",class:"active"}),this.renderStepDots(t,e)),r("div",{key:"1babaa01bf6238f0728f19ad14b84355dc094498",class:"thumb"},r("div",{key:"b3d3cb4785a1aaed224961e3809fa1ea18ccbd94",class:"knob"}),r("div",{key:"2ca4e3cc659ecf02fd05a144a35e6bd9969ca7bf",class:"indicator","aria-hidden":"true"},this.isUnset?"↔︎":this.displayValue))),r("div",{key:"4309cea286f1f2a22ac2ae625cb7a9cd286df3c5",class:"range-labels"},r("span",{key:"d60949614cd7ce926f3c745ef731ee7a132ae342",class:"min"},this.multiplyByFactor(this.valuemin),this.unit),r("span",{key:"4aa7e0b42c83079738fd83b85e8d8e8b796df7c3",class:"max"},this.multiplyByFactor(this.valuemax),this.unit)))),this.renderClearButton(),this.renderHelperLine())}watchValue(){this.syncStateFromValue()}static get watchers(){return{value:[{watchValue:0}]}}};a.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;min-width:1.25rem;display:flex;align-items:center;justify-content: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(.has-clear-button) div[slot=content]{padding-right:calc(1rem + 0.25rem)}:host(.is-unset) .track .active{width:0}:host(.is-unset) .thumb{left:50%}button.clear-button{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit}button.clear-button:focus{outline:none}button.clear-button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button.clear-button: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:rgb(var(--contrast-1100));background-color:rgba(var(--contrast-700), 0.6)}button.clear-button:not([disabled]):hover,button.clear-button:not([disabled]):focus,button.clear-button:not([disabled]):focus-visible{will-change:color, background-color, box-shadow, transform}button.clear-button:not([disabled]):hover,button.clear-button:not([disabled]):focus-visible{transform:translate3d(0, 0.01rem, 0);color:rgb(var(--contrast-100));background-color:rgb(var(--contrast-1000))}button.clear-button:not([disabled]):hover{box-shadow:var(--button-shadow-hovered)}button.clear-button:not([disabled]):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.clear-button:not([disabled]):hover,button.clear-button:not([disabled]):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.clear-button:not([disabled]):focus-visible{background-color:rgb(var(--contrast-1000))}button.clear-button{position:absolute;inset:0.75rem 0 0 auto;display:flex;align-items:center;justify-content:center;height:1rem;width:1rem;border-radius:50%}button.clear-button svg{width:calc(1rem - 0.25rem);height:calc(1rem - 0.25rem);fill:currentColor}button.clear-button:before{content:"";position:absolute;inset:0 auto 0 0;margin:auto;height:0.125rem;width:0.25rem;background-color:rgba(var(--contrast-700), 0.6);transform:translate(-100%, 0)}button.clear-button[disabled]{color:rgb(var(--contrast-1000));background-color:rgb(var(--contrast-600));cursor:not-allowed}: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{a as limel_slider}
@@ -86,7 +86,7 @@ $height-of-mdc-text-field: 2.5rem; //This is written directly in `rem`, becurse
86
86
  var(--lime-primary-color, var(--limel-theme-primary-color)) !important; // has to be `!important` since we're using `box-shadow` insted of `outline` which is also used in `hover` mode
87
87
  }
88
88
  }
89
- &:not(.mdc-text-field--disabled):hover {
89
+ &:not(.mdc-text-field--disabled):not(.lime-text-field--readonly):hover {
90
90
  .mdc-text-field__icon--trailing {
91
91
  box-shadow: var(--button-shadow-normal);
92
92
  background-color: rgba(var(--contrast-100), 0.4);
@@ -113,7 +113,7 @@ $height-of-mdc-text-field: 2.5rem; //This is written directly in `rem`, becurse
113
113
  }
114
114
 
115
115
  @mixin readonly-overrides {
116
- .mdc-text-field.mdc-text-field--disabled.lime-text-field--readonly {
116
+ .mdc-text-field.lime-text-field--readonly {
117
117
  .mdc-text-field__input {
118
118
  background-color: transparent;
119
119
  color: $input-text-color;
@@ -26,14 +26,17 @@ import { Label } from '../dynamic-label/label.types';
26
26
  */
27
27
  export declare class Checkbox {
28
28
  /**
29
- * Disables the checkbox when `true`. Works exactly the same as `readonly`.
30
- * If either property is `true`, the checkbox will be disabled.
29
+ * Disables the checkbox when `true`,
30
+ * and visually shows that the checkbox is editable but disabled.
31
+ * This tells the users that if certain requirements are met,
32
+ * the checkbox may become interactable.
31
33
  */
32
34
  disabled: boolean;
33
35
  /**
34
- * Disables the checkbox when `true`. This visualizes the checkbox slightly differently.
35
- * But shows no visual sign indicating that the checkbox is disabled
36
- * or can ever become interactable.
36
+ * Set to `true` to make the checkbox read-only.
37
+ * Use `readonly` when the checkbox is only there to present the data it holds,
38
+ * and will not become possible for the current user to edit.
39
+ * It is then drawn without any sign that it could be interacted with.
37
40
  */
38
41
  readonly: boolean;
39
42
  /**
@@ -214,6 +214,8 @@ export declare class ChipSet {
214
214
  private getDescribedBy;
215
215
  private renderContent;
216
216
  private readonly getValue;
217
+ protected handleReadonlyChange(isReadonly: boolean): void;
218
+ private endEditing;
217
219
  protected handleChangeChips(newValue: Chip[], oldValue: Chip[]): void;
218
220
  private renderInputChips;
219
221
  private readonly floatLabelAbove;
@@ -33,10 +33,10 @@ export declare class Select {
33
33
  */
34
34
  disabled: boolean;
35
35
  /**
36
- * Set to `true` to make the field read-only.
37
- * This visualizes the component slightly differently.
38
- * But shows no visual sign indicating that the component is disabled
39
- * or can ever become interactable.
36
+ * Set to `true` to make the select read-only.
37
+ * Use `readonly` when the select is only there to present the data it holds,
38
+ * and will not become possible for the current user to edit.
39
+ * It is then drawn without any sign that it could be interacted with.
40
40
  */
41
41
  readonly: boolean;
42
42
  /**
@@ -16,9 +16,10 @@ export declare class Slider {
16
16
  */
17
17
  disabled: boolean;
18
18
  /**
19
- * Disables the slider when `true`. This visualizes the slider slightly differently.
20
- * But shows no visual sign indicating that the slider field
21
- * is disabled or can ever become interactable.
19
+ * Set to `true` to make the slider read-only.
20
+ * Use `readonly` when the slider is only there to present the data it holds,
21
+ * and will not become possible for the current user to edit.
22
+ * It is then drawn without any sign that it could be interacted with.
22
23
  */
23
24
  readonly: boolean;
24
25
  /**
@@ -30,9 +30,10 @@ export declare class Switch {
30
30
  */
31
31
  disabled: boolean;
32
32
  /**
33
- * Disables the switch when `true`. This visualizes the switch slightly differently.
34
- * But shows no visual sign indicating that the switch is disabled
35
- * or can ever become interactable.
33
+ * Set to `true` to make the switch read-only.
34
+ * Use `readonly` when the switch is only there to present the data it holds,
35
+ * and will not become possible for the current user to edit.
36
+ * It is then drawn without any sign that it could be interacted with.
36
37
  */
37
38
  readonly: boolean;
38
39
  /**
@@ -648,7 +648,7 @@ export namespace Components {
648
648
  */
649
649
  "checked": boolean;
650
650
  /**
651
- * Disables the checkbox when `true`. Works exactly the same as `readonly`. If either property is `true`, the checkbox will be disabled.
651
+ * Disables the checkbox when `true`, and visually shows that the checkbox is editable but disabled. This tells the users that if certain requirements are met, the checkbox may become interactable.
652
652
  * @default false
653
653
  */
654
654
  "disabled": boolean;
@@ -670,7 +670,7 @@ export namespace Components {
670
670
  */
671
671
  "label": string;
672
672
  /**
673
- * Disables the checkbox when `true`. This visualizes the checkbox slightly differently. But shows no visual sign indicating that the checkbox is disabled or can ever become interactable.
673
+ * Set to `true` to make the checkbox read-only. Use `readonly` when the checkbox is only there to present the data it holds, and will not become possible for the current user to edit. It is then drawn without any sign that it could be interacted with.
674
674
  * @default false
675
675
  */
676
676
  "readonly": boolean;
@@ -3609,7 +3609,7 @@ export namespace Components {
3609
3609
  */
3610
3610
  "options": Array<Option | ListSeparator>;
3611
3611
  /**
3612
- * Set to `true` to make the field read-only. This visualizes the component slightly differently. But shows no visual sign indicating that the component is disabled or can ever become interactable.
3612
+ * Set to `true` to make the select read-only. Use `readonly` when the select is only there to present the data it holds, and will not become possible for the current user to edit. It is then drawn without any sign that it could be interacted with.
3613
3613
  * @default false
3614
3614
  */
3615
3615
  "readonly": boolean;
@@ -3761,7 +3761,7 @@ export namespace Components {
3761
3761
  */
3762
3762
  "language": Languages;
3763
3763
  /**
3764
- * Disables the slider when `true`. This visualizes the slider slightly differently. But shows no visual sign indicating that the slider field is disabled or can ever become interactable.
3764
+ * Set to `true` to make the slider read-only. Use `readonly` when the slider is only there to present the data it holds, and will not become possible for the current user to edit. It is then drawn without any sign that it could be interacted with.
3765
3765
  * @default false
3766
3766
  */
3767
3767
  "readonly": boolean;
@@ -3960,7 +3960,7 @@ export namespace Components {
3960
3960
  */
3961
3961
  "label": string;
3962
3962
  /**
3963
- * Disables the switch when `true`. This visualizes the switch slightly differently. But shows no visual sign indicating that the switch is disabled or can ever become interactable.
3963
+ * Set to `true` to make the switch read-only. Use `readonly` when the switch is only there to present the data it holds, and will not become possible for the current user to edit. It is then drawn without any sign that it could be interacted with.
3964
3964
  * @default false
3965
3965
  */
3966
3966
  "readonly": boolean;
@@ -7784,7 +7784,7 @@ declare namespace LocalJSX {
7784
7784
  */
7785
7785
  "checked"?: boolean;
7786
7786
  /**
7787
- * Disables the checkbox when `true`. Works exactly the same as `readonly`. If either property is `true`, the checkbox will be disabled.
7787
+ * Disables the checkbox when `true`, and visually shows that the checkbox is editable but disabled. This tells the users that if certain requirements are met, the checkbox may become interactable.
7788
7788
  * @default false
7789
7789
  */
7790
7790
  "disabled"?: boolean;
@@ -7810,7 +7810,7 @@ declare namespace LocalJSX {
7810
7810
  */
7811
7811
  "onChange"?: (event: LimelCheckboxCustomEvent<boolean>) => void;
7812
7812
  /**
7813
- * Disables the checkbox when `true`. This visualizes the checkbox slightly differently. But shows no visual sign indicating that the checkbox is disabled or can ever become interactable.
7813
+ * Set to `true` to make the checkbox read-only. Use `readonly` when the checkbox is only there to present the data it holds, and will not become possible for the current user to edit. It is then drawn without any sign that it could be interacted with.
7814
7814
  * @default false
7815
7815
  */
7816
7816
  "readonly"?: boolean;
@@ -10943,7 +10943,7 @@ declare namespace LocalJSX {
10943
10943
  */
10944
10944
  "options"?: Array<Option | ListSeparator>;
10945
10945
  /**
10946
- * Set to `true` to make the field read-only. This visualizes the component slightly differently. But shows no visual sign indicating that the component is disabled or can ever become interactable.
10946
+ * Set to `true` to make the select read-only. Use `readonly` when the select is only there to present the data it holds, and will not become possible for the current user to edit. It is then drawn without any sign that it could be interacted with.
10947
10947
  * @default false
10948
10948
  */
10949
10949
  "readonly"?: boolean;
@@ -11115,7 +11115,7 @@ declare namespace LocalJSX {
11115
11115
  */
11116
11116
  "onChange"?: (event: LimelSliderCustomEvent<number | null>) => void;
11117
11117
  /**
11118
- * Disables the slider when `true`. This visualizes the slider slightly differently. But shows no visual sign indicating that the slider field is disabled or can ever become interactable.
11118
+ * Set to `true` to make the slider read-only. Use `readonly` when the slider is only there to present the data it holds, and will not become possible for the current user to edit. It is then drawn without any sign that it could be interacted with.
11119
11119
  * @default false
11120
11120
  */
11121
11121
  "readonly"?: boolean;
@@ -11325,7 +11325,7 @@ declare namespace LocalJSX {
11325
11325
  */
11326
11326
  "onChange"?: (event: LimelSwitchCustomEvent<boolean>) => void;
11327
11327
  /**
11328
- * Disables the switch when `true`. This visualizes the switch slightly differently. But shows no visual sign indicating that the switch is disabled or can ever become interactable.
11328
+ * Set to `true` to make the switch read-only. Use `readonly` when the switch is only there to present the data it holds, and will not become possible for the current user to edit. It is then drawn without any sign that it could be interacted with.
11329
11329
  * @default false
11330
11330
  */
11331
11331
  "readonly"?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/lime-elements",
3
- "version": "40.14.3",
3
+ "version": "40.14.5",
4
4
  "description": "Lime Elements",
5
5
  "author": "Lime Technologies",
6
6
  "license": "Apache-2.0",