@limetech/lime-elements 38.33.8 → 38.34.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.
Files changed (42) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/cjs/lime-elements.cjs.js +1 -1
  3. package/dist/cjs/{limel-breadcrumbs_8.cjs.entry.js → limel-breadcrumbs_7.cjs.entry.js} +1 -35
  4. package/dist/cjs/limel-breadcrumbs_7.cjs.entry.js.map +1 -0
  5. package/dist/cjs/limel-code-editor.cjs.entry.js +97 -5
  6. package/dist/cjs/limel-code-editor.cjs.entry.js.map +1 -1
  7. package/dist/cjs/limel-helper-line_2.cjs.entry.js +79 -0
  8. package/dist/cjs/limel-helper-line_2.cjs.entry.js.map +1 -0
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/collection/components/code-editor/code-editor.css +29 -0
  11. package/dist/collection/components/code-editor/code-editor.js +202 -11
  12. package/dist/collection/components/code-editor/code-editor.js.map +1 -1
  13. package/dist/esm/lime-elements.js +1 -1
  14. package/dist/esm/{limel-breadcrumbs_8.entry.js → limel-breadcrumbs_7.entry.js} +2 -35
  15. package/dist/esm/limel-breadcrumbs_7.entry.js.map +1 -0
  16. package/dist/esm/limel-code-editor.entry.js +98 -6
  17. package/dist/esm/limel-code-editor.entry.js.map +1 -1
  18. package/dist/esm/limel-helper-line_2.entry.js +74 -0
  19. package/dist/esm/limel-helper-line_2.entry.js.map +1 -0
  20. package/dist/esm/loader.js +1 -1
  21. package/dist/lime-elements/lime-elements.esm.js +1 -1
  22. package/dist/lime-elements/lime-elements.esm.js.map +1 -1
  23. package/dist/lime-elements/{p-033a0aa9.entry.js → p-668e583c.entry.js} +11 -11
  24. package/dist/lime-elements/p-668e583c.entry.js.map +1 -0
  25. package/dist/lime-elements/p-93ea4214.entry.js +2 -0
  26. package/dist/lime-elements/p-93ea4214.entry.js.map +1 -0
  27. package/dist/lime-elements/p-f1ec1eeb.entry.js +2 -0
  28. package/dist/lime-elements/p-f1ec1eeb.entry.js.map +1 -0
  29. package/dist/types/components/code-editor/code-editor.d.ts +40 -1
  30. package/dist/types/components.d.ts +46 -2
  31. package/package.json +1 -1
  32. package/dist/cjs/limel-breadcrumbs_8.cjs.entry.js.map +0 -1
  33. package/dist/cjs/limel-helper-line.cjs.entry.js +0 -45
  34. package/dist/cjs/limel-helper-line.cjs.entry.js.map +0 -1
  35. package/dist/esm/limel-breadcrumbs_8.entry.js.map +0 -1
  36. package/dist/esm/limel-helper-line.entry.js +0 -41
  37. package/dist/esm/limel-helper-line.entry.js.map +0 -1
  38. package/dist/lime-elements/p-033a0aa9.entry.js.map +0 -1
  39. package/dist/lime-elements/p-2bf4fc20.entry.js +0 -2
  40. package/dist/lime-elements/p-2bf4fc20.entry.js.map +0 -1
  41. package/dist/lime-elements/p-e4bafb75.entry.js +0 -2
  42. package/dist/lime-elements/p-e4bafb75.entry.js.map +0 -1
@@ -1,45 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-174a078a.js');
6
-
7
- const helperLineCss = ":host(limel-helper-line){transition:opacity 0.2s ease;box-sizing:border-box;display:grid;min-width:0;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:0.6875rem;line-height:normal;color:rgb(var(--contrast-1200))}div{display:flex;justify-content:space-between;gap:0.75rem;overflow:hidden;padding:0 1rem}:host(limel-helper-line.invalid){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limel-helper-line.invalid) .helper-text{color:var(--limel-theme-error-color)}.counter{flex-shrink:0;margin-left:auto}.helper-text,.counter{padding-top:0.125rem}:host(limel-helper-line){transition:grid-template-rows var(--limel-h-l-grid-template-rows-transition-speed, 0.46s) cubic-bezier(1, 0.09, 0, 0.89);grid-template-rows:var(--limel-h-l-grid-template-rows, 1fr)}:host(limel-helper-line.hide){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}";
8
-
9
- const HelperLine = class {
10
- constructor(hostRef) {
11
- index.registerInstance(this, hostRef);
12
- this.hasContent = () => {
13
- return !!(this.maxLength > 0 ||
14
- (this.helperText && this.helperText.length > 0));
15
- };
16
- this.renderHelperText = () => {
17
- if (!this.helperText) {
18
- return;
19
- }
20
- return (index.h("span", { class: "helper-text", id: this.helperTextId }, this.helperText));
21
- };
22
- this.renderCharacterCounter = () => {
23
- const counter = `${this.length} / ${this.maxLength}`;
24
- if (!this.maxLength) {
25
- return;
26
- }
27
- return index.h("span", { class: "counter" }, counter);
28
- };
29
- this.helperText = undefined;
30
- this.length = undefined;
31
- this.maxLength = undefined;
32
- this.invalid = false;
33
- this.helperTextId = undefined;
34
- }
35
- render() {
36
- return (index.h(index.Host, { tabIndex: -1, class: {
37
- invalid: this.invalid,
38
- }, style: this.hasContent() ? {} : { display: 'none' }, "aria-hidden": !this.hasContent() }, index.h("div", null, this.renderHelperText(), this.renderCharacterCounter())));
39
- }
40
- };
41
- HelperLine.style = helperLineCss;
42
-
43
- exports.limel_helper_line = HelperLine;
44
-
45
- //# sourceMappingURL=limel-helper-line.cjs.entry.js.map
@@ -1 +0,0 @@
1
- {"file":"limel-helper-line.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,aAAa,GAAG,i7BAAi7B;;MC2B17B,UAAU;;;IAqDX,eAAU,GAAG;MACjB,OAAO,CAAC,EACJ,IAAI,CAAC,SAAS,GAAG,CAAC;SACjB,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAClD,CAAC;KACL,CAAC;IAEM,qBAAgB,GAAG;MACvB,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;QAClB,OAAO;OACV;MAED,QACIA,kBAAM,KAAK,EAAC,aAAa,EAAC,EAAE,EAAE,IAAI,CAAC,YAAY,IAC1C,IAAI,CAAC,UAAU,CACb,EACT;KACL,CAAC;IAEM,2BAAsB,GAAG;MAC7B,MAAM,OAAO,GAAG,GAAG,IAAI,CAAC,MAAM,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC;MAErD,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;QACjB,OAAO;OACV;MAED,OAAOA,kBAAM,KAAK,EAAC,SAAS,IAAE,OAAO,CAAQ,CAAC;KACjD,CAAC;;;;mBArDyB,KAAK;;;EAQzB,MAAM;IACT,QACIA,QAACC,UAAI,IACD,QAAQ,EAAE,CAAC,CAAC,EACZ,KAAK,EAAE;QACH,OAAO,EAAE,IAAI,CAAC,OAAO;OACxB,EACD,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,iBACtC,CAAC,IAAI,CAAC,UAAU,EAAE,IAE/BD,qBACK,IAAI,CAAC,gBAAgB,EAAE,EACvB,IAAI,CAAC,sBAAsB,EAAE,CAC5B,CACH,EACT;GACL;;;;;;","names":["h","Host"],"sources":["./src/components/helper-line/helper-line.scss?tag=limel-helper-line&encapsulation=shadow","./src/components/helper-line/helper-line.tsx"],"sourcesContent":[":host(limel-helper-line) {\n transition: opacity 0.2s ease;\n\n box-sizing: border-box;\n display: grid;\n\n min-width: 0; // prevents overflowing, if component is placed in flex containers\n\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n font-size: 0.6875rem;\n line-height: normal;\n\n color: rgb(var(--contrast-1200));\n}\n\ndiv {\n display: flex;\n justify-content: space-between;\n gap: 0.75rem;\n overflow: hidden;\n padding: 0 1rem;\n}\n\n:host(limel-helper-line.invalid) {\n --limel-h-l-grid-template-rows-transition-speed: 0.46s;\n --limel-h-l-grid-template-rows: 1fr;\n\n .helper-text {\n color: var(--limel-theme-error-color);\n }\n}\n\n.counter {\n flex-shrink: 0;\n margin-left: auto;\n}\n\n.helper-text,\n.counter {\n padding-top: 0.125rem;\n}\n\n// This animates height of the helper line, from `0` to `auto`.\n// To get this animation effect, the consumer component should\n// add `hide` classed accordingly.\n:host(limel-helper-line) {\n transition: grid-template-rows\n var(--limel-h-l-grid-template-rows-transition-speed, 0.46s)\n cubic-bezier(1, 0.09, 0, 0.89);\n grid-template-rows: var(--limel-h-l-grid-template-rows, 1fr);\n}\n\n:host(limel-helper-line.hide) {\n --limel-h-l-grid-template-rows-transition-speed: 0.3s;\n --limel-h-l-grid-template-rows: 0fr;\n}\n// End: animating height\n","import { Component, Host, Prop, h } from '@stencil/core';\n\n/**\n * This is an internal and private component that many input fields\n * use to display a helper text, along with a character counter below the\n * input field.\n *\n * We created this to keep the visual styles the same everywhere\n * and to avoid importing styles separately.\n *\n * Also this enables us to open the helper line in limel-portal,\n * more easily without having to send the styles to the portal.\n *\n * @exampleComponent limel-example-helper-line\n * @exampleComponent limel-example-helper-line-invalid\n * @exampleComponent limel-example-helper-line-long-text\n * @exampleComponent limel-example-helper-line-long-text-no-counter\n * @exampleComponent limel-example-helper-line-character-counter\n * @exampleComponent limel-example-helper-line-empty\n * @exampleComponent limel-example-helper-line-animation\n * @private\n */\n@Component({\n tag: 'limel-helper-line',\n shadow: true,\n styleUrl: 'helper-line.scss',\n})\nexport class HelperLine {\n /**\n * The helper text that is displayed on the left side.\n */\n @Prop({ reflect: true })\n public helperText?: string;\n\n /**\n * Length of the current input value, coming from the parent component.\n * Used in the character counter section on the right side.\n */\n @Prop({ reflect: true })\n public length?: number;\n\n /**\n * Maximum length of the characters, defined on the parent component.\n * Used in the character counter section on the right side.\n */\n @Prop({ reflect: true })\n public maxLength?: number;\n\n /**\n * Turns `true`, when the parent component is invalid.\n * For example, when the parent component is `required` but is left empty.\n * Or when the input format is invalid.\n */\n @Prop({ reflect: true })\n public invalid?: boolean = false;\n\n /**\n * Used by `aria-controls` and `aria-describedby` in the parent component.\n */\n @Prop({ reflect: true })\n public helperTextId?: string;\n\n public render() {\n return (\n <Host\n tabIndex={-1}\n class={{\n invalid: this.invalid,\n }}\n style={this.hasContent() ? {} : { display: 'none' }}\n aria-hidden={!this.hasContent()}\n >\n <div>\n {this.renderHelperText()}\n {this.renderCharacterCounter()}\n </div>\n </Host>\n );\n }\n\n private hasContent = () => {\n return !!(\n this.maxLength > 0 ||\n (this.helperText && this.helperText.length > 0)\n );\n };\n\n private renderHelperText = () => {\n if (!this.helperText) {\n return;\n }\n\n return (\n <span class=\"helper-text\" id={this.helperTextId}>\n {this.helperText}\n </span>\n );\n };\n\n private renderCharacterCounter = () => {\n const counter = `${this.length} / ${this.maxLength}`;\n\n if (!this.maxLength) {\n return;\n }\n\n return <span class=\"counter\">{counter}</span>;\n };\n}\n"],"version":3}