@limetech/lime-elements 38.23.0 → 38.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/cjs/{checkbox.template-f624966b.js → checkbox.template-92ae2e60.js} +3 -3
  3. package/dist/cjs/checkbox.template-92ae2e60.js.map +1 -0
  4. package/dist/cjs/limel-checkbox.cjs.entry.js +1 -1
  5. package/dist/cjs/limel-dynamic-label_4.cjs.entry.js +1 -1
  6. package/dist/cjs/limel-slider.cjs.entry.js +1 -1
  7. package/dist/cjs/limel-slider.cjs.entry.js.map +1 -1
  8. package/dist/cjs/limel-switch.cjs.entry.js +2 -2
  9. package/dist/cjs/limel-switch.cjs.entry.js.map +1 -1
  10. package/dist/cjs/limel-text-editor.cjs.entry.js +2 -2
  11. package/dist/cjs/limel-text-editor.cjs.entry.js.map +1 -1
  12. package/dist/collection/components/checkbox/checkbox.template.js +2 -2
  13. package/dist/collection/components/checkbox/checkbox.template.js.map +1 -1
  14. package/dist/collection/components/slider/slider.js +1 -1
  15. package/dist/collection/components/slider/slider.js.map +1 -1
  16. package/dist/collection/components/switch/switch.js +2 -2
  17. package/dist/collection/components/switch/switch.js.map +1 -1
  18. package/dist/collection/components/text-editor/text-editor.js +2 -2
  19. package/dist/collection/components/text-editor/text-editor.js.map +1 -1
  20. package/dist/esm/{checkbox.template-890a59d7.js → checkbox.template-9acc6347.js} +3 -3
  21. package/dist/esm/checkbox.template-9acc6347.js.map +1 -0
  22. package/dist/esm/limel-checkbox.entry.js +1 -1
  23. package/dist/esm/limel-dynamic-label_4.entry.js +1 -1
  24. package/dist/esm/limel-slider.entry.js +1 -1
  25. package/dist/esm/limel-slider.entry.js.map +1 -1
  26. package/dist/esm/limel-switch.entry.js +2 -2
  27. package/dist/esm/limel-switch.entry.js.map +1 -1
  28. package/dist/esm/limel-text-editor.entry.js +2 -2
  29. package/dist/esm/limel-text-editor.entry.js.map +1 -1
  30. package/dist/lime-elements/lime-elements.esm.js +1 -1
  31. package/dist/lime-elements/{p-bf647874.entry.js → p-026417fa.entry.js} +2 -2
  32. package/dist/lime-elements/{p-a0fa40ee.entry.js → p-2116b3ce.entry.js} +2 -2
  33. package/dist/lime-elements/{p-a0fa40ee.entry.js.map → p-2116b3ce.entry.js.map} +1 -1
  34. package/dist/lime-elements/{p-45b6d10e.entry.js → p-250acfe4.entry.js} +2 -2
  35. package/dist/lime-elements/p-250acfe4.entry.js.map +1 -0
  36. package/dist/lime-elements/{p-549629d5.entry.js → p-51d475d8.entry.js} +2 -2
  37. package/dist/lime-elements/{p-549629d5.entry.js.map → p-51d475d8.entry.js.map} +1 -1
  38. package/dist/lime-elements/p-8ded6465.js +2 -0
  39. package/dist/lime-elements/p-8ded6465.js.map +1 -0
  40. package/dist/lime-elements/{p-bd37337a.entry.js → p-a7aa383b.entry.js} +2 -2
  41. package/package.json +1 -1
  42. package/dist/cjs/checkbox.template-f624966b.js.map +0 -1
  43. package/dist/esm/checkbox.template-890a59d7.js.map +0 -1
  44. package/dist/lime-elements/p-2c69d13e.js +0 -2
  45. package/dist/lime-elements/p-2c69d13e.js.map +0 -1
  46. package/dist/lime-elements/p-45b6d10e.entry.js.map +0 -1
  47. /package/dist/lime-elements/{p-bf647874.entry.js.map → p-026417fa.entry.js.map} +0 -0
  48. /package/dist/lime-elements/{p-bd37337a.entry.js.map → p-a7aa383b.entry.js.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ ## [38.23.1](https://github.com/Lundalogik/lime-elements/compare/v38.23.0...v38.23.1) (2025-09-03)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+
7
+ * **checkbox:** ensure `aria-controls` references an existing element ([a50ba48](https://github.com/Lundalogik/lime-elements/commit/a50ba48f748f598a1c36055eff6e6c6454546cd3))
8
+ * **slider:** add accessible description context ([f526f12](https://github.com/Lundalogik/lime-elements/commit/f526f128aa4cb6cde28bc0cdf78b7ae6a90f0ef8))
9
+ * **switch:** ensure `aria-controls` references an existing element ([dfff196](https://github.com/Lundalogik/lime-elements/commit/dfff196541fc4515e064de26f946fcaf1042131d))
10
+ * **text-editor:** ensure `aria-controls` references an existing element ([229698f](https://github.com/Lundalogik/lime-elements/commit/229698f0fdee7a12cb58afa03ef365d81e3a2877))
11
+
1
12
  ## [38.23.0](https://github.com/Lundalogik/lime-elements/compare/v38.22.2...v38.23.0) (2025-09-02)
2
13
 
3
14
 
@@ -13,7 +13,7 @@ const CheckboxTemplate = (props) => {
13
13
  };
14
14
  }
15
15
  return [
16
- index.h("limel-dynamic-label", { value: props.checked, "aria-controls": props.helperTextId, defaultLabel: { text: props.label, icon: icon }, labels: props.readonlyLabels }),
16
+ index.h("limel-dynamic-label", { value: props.checked, "aria-controls": props.helperText ? props.helperTextId : undefined, defaultLabel: { text: props.label, icon: icon }, labels: props.readonlyLabels }),
17
17
  index.h(HelperText, { text: props.helperText, helperTextId: props.helperTextId, invalid: props.invalid }),
18
18
  ];
19
19
  }
@@ -38,7 +38,7 @@ const CheckboxTemplate = (props) => {
38
38
  indeterminate: props.indeterminate,
39
39
  readonly: props.readonly,
40
40
  } },
41
- index.h("input", Object.assign({ type: "checkbox", id: props.id, checked: props.checked, disabled: props.disabled || props.readonly, required: props.required, onChange: props.onChange, "aria-controls": props.helperTextId, "aria-describedby": props.helperTextId }, inputProps)),
41
+ index.h("input", Object.assign({ type: "checkbox", id: props.id, checked: props.checked, disabled: props.disabled || props.readonly, required: props.required, onChange: props.onChange, "aria-controls": props.helperText ? props.helperTextId : undefined, "aria-describedby": props.helperTextId }, inputProps)),
42
42
  index.h("div", { class: "box" },
43
43
  index.h("svg", { class: "check-mark", viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false" },
44
44
  index.h("path", { fill: "none", d: "M1.73,12.91 8.1,19.28 22.79,4.59" }))),
@@ -55,4 +55,4 @@ const HelperText = (props) => {
55
55
 
56
56
  exports.CheckboxTemplate = CheckboxTemplate;
57
57
 
58
- //# sourceMappingURL=checkbox.template-f624966b.js.map
58
+ //# sourceMappingURL=checkbox.template-92ae2e60.js.map
@@ -0,0 +1 @@
1
+ {"file":"checkbox.template-92ae2e60.js","mappings":";;;;MAmBa,gBAAgB,GAA+C,CACxE,KAAK;EAEL,MAAM,UAAU,GAAG,EAAE,CAAC;EACtB,IAAI,KAAK,CAAC,QAAQ,EAAE;IAChB,IAAI,IAAI,GAAkB,OAAO,CAAC;IAClC,IAAI,KAAK,CAAC,OAAO,EAAE;MACf,IAAI,GAAG;QACH,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,6DAA6D;OACvE,CAAC;KACL;IAED,OAAO;MACHA,iCACI,KAAK,EAAE,KAAK,CAAC,OAAO,mBAEhB,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,YAAY,GAAG,SAAS,EAErD,YAAY,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,EAC/C,MAAM,EAAE,KAAK,CAAC,cAAc,GAC9B;MACFA,QAAC,UAAU,IACP,IAAI,EAAE,KAAK,CAAC,UAAU,EACtB,YAAY,EAAE,KAAK,CAAC,YAAY,EAChC,OAAO,EAAE,KAAK,CAAC,OAAO,GACxB;KACL,CAAC;GACL;EAED,IAAI,KAAK,CAAC,aAAa,EAAE;IACrB,UAAU,CAAC,oBAAoB,CAAC,GAAG,MAAM,CAAC;IAC1C,UAAU,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC;GACxC;OAAM;IACH,UAAU,CAAC,oBAAoB,CAAC,GAAG,OAAO,CAAC;IAC3C,IAAI,OAAO,KAAK,CAAC,OAAO,KAAK,SAAS,EAAE;MACpC,UAAU,CAAC,cAAc,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;KACtD;GACJ;EAED,OAAO;IACHA,iBACI,KAAK,EAAE;QACH,eAAe,EAAE,IAAI;QACrB,QAAQ,EAAE,IAAI;QACd,O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AC,YAAY,EAChC,OAAO,EAAE,KAAK,CAAC,OAAO,GACxB,EACJ;AACN,CAAC;;;;","names":["h"],"sources":["./src/components/checkbox/checkbox.template.tsx"],"sourcesContent":["import { FunctionalComponent, h } from '@stencil/core';\nimport { Label } from '../dynamic-label/label.types';\nimport { Icon } from '../../interface';\n\ninterface CheckboxTemplateProps {\n disabled?: boolean;\n id: string;\n checked?: boolean;\n readonly?: boolean;\n indeterminate?: boolean;\n required?: boolean;\n invalid?: boolean;\n onChange?: (event: Event) => void;\n label?: string;\n helperText?: string;\n helperTextId?: string;\n readonlyLabels?: Array<Label<boolean>>;\n}\n\nexport const CheckboxTemplate: FunctionalComponent<CheckboxTemplateProps> = (\n props\n) => {\n const inputProps = {};\n if (props.readonly) {\n let icon: string | Icon = 'minus';\n if (props.checked) {\n icon = {\n name: 'ok',\n color: 'var(--lime-primary-color, var(--limel-theme-primary-color))',\n };\n }\n\n return [\n <limel-dynamic-label\n value={props.checked}\n aria-controls={\n props.helperText ? props.helperTextId : undefined\n }\n defaultLabel={{ text: props.label, icon: icon }}\n labels={props.readonlyLabels}\n />,\n <HelperText\n text={props.helperText}\n helperTextId={props.helperTextId}\n invalid={props.invalid}\n />,\n ];\n }\n\n if (props.indeterminate) {\n inputProps['data-indeterminate'] = 'true';\n inputProps['aria-checked'] = 'mixed';\n } else {\n inputProps['data-indeterminate'] = 'false';\n if (typeof props.checked === 'boolean') {\n inputProps['aria-checked'] = String(props.checked);\n }\n }\n\n return [\n <div\n class={{\n 'boolean-input': true,\n checkbox: true,\n checked: props.checked,\n invalid: props.invalid,\n disabled: props.disabled,\n required: props.required,\n indeterminate: props.indeterminate,\n readonly: props.readonly,\n }}\n >\n <input\n type=\"checkbox\"\n id={props.id}\n checked={props.checked}\n disabled={props.disabled || props.readonly}\n required={props.required}\n onChange={props.onChange}\n aria-controls={\n props.helperText ? props.helperTextId : undefined\n }\n aria-describedby={props.helperTextId}\n {...inputProps}\n />\n <div class=\"box\">\n <svg\n class=\"check-mark\"\n viewBox=\"0 0 24 24\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <path fill=\"none\" d=\"M1.73,12.91 8.1,19.28 22.79,4.59\" />\n </svg>\n </div>\n <label class=\"boolean-input-label\" htmlFor={props.id}>\n {props.label}\n </label>\n </div>,\n <HelperText\n text={props.helperText}\n helperTextId={props.helperTextId}\n invalid={props.invalid}\n />,\n ];\n};\n\nconst HelperText: FunctionalComponent<{\n helperTextId: string;\n text: string;\n invalid?: boolean;\n}> = (props) => {\n if (typeof props.text !== 'string') {\n return;\n }\n\n return (\n <limel-helper-line\n helperText={props.text.trim()}\n helperTextId={props.helperTextId}\n invalid={props.invalid}\n />\n );\n};\n"],"version":3}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-174a078a.js');
6
6
  const randomString = require('./random-string-27fb6c74.js');
7
- const checkbox_template = require('./checkbox.template-f624966b.js');
7
+ const checkbox_template = require('./checkbox.template-92ae2e60.js');
8
8
 
9
9
  const checkboxCss = "@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%;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:has(input[type=checkbox]:checked) .box,.boolean-input:has(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}.boolean-input:not(.disabled):has(label.boolean-input-label:hover) .box{will-change:box-shadow;box-shadow:var(--button-shadow-hovered)}.boolean-input:not(.disabled):has(label.boolean-input-label: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:has(input[type=checkbox]:focus-visible) .box:before,.boolean-input:has(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):has(label.boolean-input-label:hover) .box:after{will-change:opacity, box-shadow, transform, width}:host(limel-checkbox){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:not(.indeterminate):has(input[type=checkbox]:checked) svg.check-mark{opacity:1}.checkbox:not(.indeterminate):has(input[type=checkbox]:checked) 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}";
10
10
 
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-174a078a.js');
6
6
  const getIconProps = require('./get-icon-props-65f39e40.js');
7
7
  const component = require('./component-564ac2eb.js');
8
- const checkbox_template = require('./checkbox.template-f624966b.js');
8
+ const checkbox_template = require('./checkbox.template-92ae2e60.js');
9
9
  const isEmpty = require('./isEmpty-566a1e83.js');
10
10
  require('./ponyfill-63966294.js');
11
11
  require('./_getTag-8d76f8e1.js');
@@ -1401,7 +1401,7 @@ const Slider = class {
1401
1401
  } }, this.renderSliderInput(inputProps), this.renderTrack(), this.renderThumb()));
1402
1402
  };
1403
1403
  this.renderSliderInput = (inputProps) => {
1404
- return (index.h("input", Object.assign({ class: "mdc-slider__input", type: "range", min: this.multiplyByFactor(this.valuemin), max: this.multiplyByFactor(this.valuemax), value: this.multiplyByFactor(this.value), name: "volume", "aria-labelledby": this.labelId, "aria-controls": this.helperTextId }, inputProps)));
1404
+ return (index.h("input", Object.assign({ class: "mdc-slider__input", type: "range", min: this.multiplyByFactor(this.valuemin), max: this.multiplyByFactor(this.valuemax), value: this.multiplyByFactor(this.value), name: "volume", "aria-labelledby": this.labelId, "aria-describedby": this.helperText ? this.helperTextId : undefined, "aria-controls": this.helperText ? this.helperTextId : undefined }, inputProps)));
1405
1405
  };
1406
1406
  this.renderTrack = () => {
1407
1407
  return (index.h("div", { class: "mdc-slider__track" }, index.h("div", { class: "mdc-slider__track--inactive" }), index.h("div", { class: "mdc-slider__track--active" }, index.h("div", { class: "mdc-slider__track--active_fill" }))));