@limetech/lime-elements 39.10.2 → 39.10.4

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 (75) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/lime-elements.cjs.js +1 -1
  3. package/dist/cjs/limel-breadcrumbs_7.cjs.entry.js +51 -3
  4. package/dist/cjs/limel-dialog.cjs.entry.js +86 -2
  5. package/dist/cjs/limel-markdown.cjs.entry.js +1 -1
  6. package/dist/cjs/limel-portal_3.cjs.entry.js +3 -3
  7. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +2 -2
  8. package/dist/cjs/limel-slider.cjs.entry.js +44 -1494
  9. package/dist/cjs/limel-snackbar.cjs.entry.js +2 -2
  10. package/dist/cjs/limel-split-button.cjs.entry.js +2 -2
  11. package/dist/cjs/limel-switch.cjs.entry.js +1 -1
  12. package/dist/cjs/limel-tab-bar.cjs.entry.js +2 -2
  13. package/dist/cjs/limel-tab-panel.cjs.entry.js +1 -1
  14. package/dist/cjs/limel-table.cjs.entry.js +3 -3
  15. package/dist/cjs/limel-text-editor-link-menu.cjs.entry.js +3 -3
  16. package/dist/cjs/limel-text-editor.cjs.entry.js +1 -1
  17. package/dist/cjs/loader.cjs.js +1 -1
  18. package/dist/collection/components/markdown/markdown.css +13 -9
  19. package/dist/collection/components/slider/slider.css +215 -642
  20. package/dist/collection/components/slider/slider.js +45 -165
  21. package/dist/collection/components/snackbar/snackbar.js +2 -2
  22. package/dist/collection/components/spinner/spinner.js +1 -1
  23. package/dist/collection/components/split-button/split-button.js +2 -2
  24. package/dist/collection/components/switch/switch.js +1 -1
  25. package/dist/collection/components/tab-bar/tab-bar.js +2 -2
  26. package/dist/collection/components/tab-panel/tab-panel.js +1 -1
  27. package/dist/collection/components/table/table.js +3 -3
  28. package/dist/collection/components/text-editor/link-menu/editor-link-menu.js +3 -3
  29. package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.css +13 -9
  30. package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js +1 -1
  31. package/dist/collection/components/text-editor/text-editor.js +1 -1
  32. package/dist/collection/components/tooltip/tooltip-content.js +1 -1
  33. package/dist/collection/components/tooltip/tooltip.js +2 -2
  34. package/dist/esm/lime-elements.js +1 -1
  35. package/dist/esm/limel-breadcrumbs_7.entry.js +50 -2
  36. package/dist/esm/limel-dialog.entry.js +85 -1
  37. package/dist/esm/limel-markdown.entry.js +1 -1
  38. package/dist/esm/limel-portal_3.entry.js +3 -3
  39. package/dist/esm/limel-prosemirror-adapter.entry.js +2 -2
  40. package/dist/esm/limel-slider.entry.js +45 -1495
  41. package/dist/esm/limel-snackbar.entry.js +2 -2
  42. package/dist/esm/limel-split-button.entry.js +2 -2
  43. package/dist/esm/limel-switch.entry.js +1 -1
  44. package/dist/esm/limel-tab-bar.entry.js +2 -2
  45. package/dist/esm/limel-tab-panel.entry.js +1 -1
  46. package/dist/esm/limel-table.entry.js +3 -3
  47. package/dist/esm/limel-text-editor-link-menu.entry.js +3 -3
  48. package/dist/esm/limel-text-editor.entry.js +1 -1
  49. package/dist/esm/loader.js +1 -1
  50. package/dist/lime-elements/lime-elements.esm.js +1 -1
  51. package/dist/lime-elements/{p-17e1d911.entry.js → p-2906606d.entry.js} +1 -1
  52. package/dist/lime-elements/{p-30e54f05.entry.js → p-2b1eda20.entry.js} +3 -3
  53. package/dist/lime-elements/{p-889a05e4.entry.js → p-3d724fc2.entry.js} +1 -1
  54. package/dist/lime-elements/{p-6ff3fac4.entry.js → p-3f188493.entry.js} +1 -1
  55. package/dist/lime-elements/{p-8e3cc9b0.entry.js → p-4e1b8c0a.entry.js} +1 -1
  56. package/dist/lime-elements/{p-a243b8e2.entry.js → p-730a05e3.entry.js} +1 -1
  57. package/dist/lime-elements/p-73623bb5.entry.js +1 -0
  58. package/dist/lime-elements/{p-77f42eff.entry.js → p-8203eea8.entry.js} +1 -1
  59. package/dist/lime-elements/{p-a44dfaa1.entry.js → p-89b35965.entry.js} +1 -1
  60. package/dist/lime-elements/{p-9abfb8ba.entry.js → p-9aa07388.entry.js} +1 -1
  61. package/dist/lime-elements/{p-9d629f5f.entry.js → p-c308e2a5.entry.js} +55 -10
  62. package/dist/lime-elements/{p-c9591213.entry.js → p-de203f64.entry.js} +1 -1
  63. package/dist/lime-elements/p-faceccc0.entry.js +1 -0
  64. package/dist/lime-elements/{p-12646794.entry.js → p-fe993f80.entry.js} +1 -1
  65. package/dist/types/components/slider/slider.d.ts +6 -24
  66. package/dist/types/components.d.ts +4 -0
  67. package/package.json +1 -1
  68. package/dist/cjs/animationframe-ChtL6ouH.js +0 -88
  69. package/dist/cjs/util-BOQp7lfZ.js +0 -52
  70. package/dist/esm/animationframe-BDw7dT4x.js +0 -86
  71. package/dist/esm/util-Dx8swykg.js +0 -50
  72. package/dist/lime-elements/p-23c1033d.entry.js +0 -45
  73. package/dist/lime-elements/p-BDw7dT4x.js +0 -23
  74. package/dist/lime-elements/p-Dx8swykg.js +0 -23
  75. package/dist/lime-elements/p-a861f56c.entry.js +0 -1
@@ -1,14 +1,15 @@
1
- import { MDCSlider } from "@material/slider";
2
1
  import { h, Host, } from "@stencil/core";
3
2
  import { getPercentageClass } from "./get-percentage-class";
4
3
  import { createRandomString } from "../../util/random-string";
5
4
  const DEFAULT_FACTOR = 1;
6
5
  const DEFAULT_MAX_VALUE = 100;
7
6
  const DEFAULT_MIN_VALUE = 0;
7
+ const MAX_VISIBLE_STEP_DOTS = 20;
8
8
  /**
9
9
  * @exampleComponent limel-example-slider-basic
10
10
  * @exampleComponent limel-example-slider-multiplier
11
11
  * @exampleComponent limel-example-slider-multiplier-percentage-colors
12
+ * @exampleComponent limel-example-slider-unit
12
13
  * @exampleComponent limel-example-slider-composite
13
14
  */
14
15
  export class Slider {
@@ -59,24 +60,16 @@ export class Slider {
59
60
  * The minimum value allowed
60
61
  */
61
62
  this.valuemin = DEFAULT_MIN_VALUE;
62
- this.renderRangeContainer = () => {
63
- return (h("div", { class: "slider__content-range-container" }, h("span", { class: "slider__content-min-label" }, this.multiplyByFactor(this.valuemin), this.unit), h("span", { class: "slider__content-max-label" }, this.multiplyByFactor(this.valuemax), this.unit)));
64
- };
65
- this.renderSliderContainer = (inputProps) => {
66
- return (h("div", { class: {
67
- 'mdc-slider': true,
68
- 'mdc-slider--discrete': true,
69
- 'mdc-slider--disabled': this.disabled || this.readonly,
70
- } }, this.renderSliderInput(inputProps), this.renderTrack(), this.renderThumb()));
71
- };
72
- this.renderSliderInput = (inputProps) => {
73
- return (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)));
74
- };
75
- this.renderTrack = () => {
76
- return (h("div", { class: "mdc-slider__track" }, h("div", { class: "mdc-slider__track--inactive" }), h("div", { class: "mdc-slider__track--active" }, h("div", { class: "mdc-slider__track--active_fill" }))));
77
- };
78
- this.renderThumb = () => {
79
- return (h("div", { class: "mdc-slider__thumb" }, h("div", { class: "mdc-slider__value-indicator-container", "aria-hidden": "true" }, h("div", { class: "mdc-slider__value-indicator" }, h("span", { class: "mdc-slider__value-indicator-text" }, this.multiplyByFactor(this.value)))), h("div", { class: "mdc-slider__thumb-knob" })));
63
+ this.renderStepDots = (min, max) => {
64
+ if (!this.step) {
65
+ return;
66
+ }
67
+ const step = this.multiplyByFactor(this.step);
68
+ const count = Math.floor((max - min) / step) + 1;
69
+ if (count > MAX_VISIBLE_STEP_DOTS) {
70
+ return;
71
+ }
72
+ return Array.from({ length: count }, () => h("span", { class: "step-dot" }));
80
73
  };
81
74
  this.renderHelperLine = () => {
82
75
  if (!this.helperText) {
@@ -84,97 +77,31 @@ export class Slider {
84
77
  }
85
78
  return (h("limel-helper-line", { helperText: this.helperText, helperTextId: this.helperTextId, invalid: this.invalid }));
86
79
  };
87
- this.initialize = () => {
88
- const inputElement = this.getInputElement();
89
- if (!inputElement) {
90
- return;
91
- }
92
- const value = this.getValue();
93
- /*
94
- For some reason the input element's `value` attribute is removed
95
- (probably by Stencil) when the element is first rendered. But if the
96
- attribute is missing when MDCSlider is initialized (MDC v11.0.0),
97
- MDCSlider crashes.
98
- So we add the attribute right before initializing MDCSlider. /Ads
99
- */
100
- inputElement.setAttribute('value', `${this.multiplyByFactor(value)}`);
101
- /*
102
- When creating the `mdcSlider` component, its important that the value set in
103
- the input field obeys the range and the step size.
104
-
105
- The MDCSlider will throw an exception unless the value in the input element
106
- is dividible by the step value and is in the provided range.
107
- If an exception occurs, this component will crash and it will be impossible to change
108
- its value.
109
- The logic below ensures that the component will render even though the
110
- provided value is wrong.
111
- This could be considered wrong, but it at least fixes so that it's possible
112
- to change the value from the UI.
113
- */
114
- const greaterThanOrEqualMin = value >= this.valuemin;
115
- const lessThanOrEqualMax = value <= this.valuemax;
116
- if (!greaterThanOrEqualMin) {
117
- const newMin = this.multiplyByFactor(value);
118
- inputElement.setAttribute('min', `${newMin}`);
119
- }
120
- if (!lessThanOrEqualMax) {
121
- const newMax = this.multiplyByFactor(value);
122
- inputElement.setAttribute('max', `${newMax}`);
123
- }
124
- if (this.step) {
125
- const step = this.multiplyByFactor(this.step);
126
- const scaledValue = this.multiplyByFactor(value);
127
- if (!this.isMultipleOfStep(scaledValue, step)) {
128
- const roundedValue = this.roundToStep(scaledValue, step);
129
- inputElement.setAttribute('value', `${roundedValue}`);
130
- }
131
- inputElement.setAttribute('step', `${step}`);
132
- }
133
- this.createMDCSlider();
134
- };
135
- this.reCreateSliderWithStep = () => {
136
- const inputElement = this.getInputElement();
137
- const step = `${this.multiplyByFactor(this.step)}`;
138
- inputElement.setAttribute('step', step);
139
- this.destroyMDCSlider();
140
- this.createMDCSlider();
141
- };
142
- this.createMDCSlider = () => {
143
- const element = this.getRootElement();
144
- this.mdcSlider = new MDCSlider(element);
145
- this.mdcSlider.listen('MDCSlider:change', this.changeHandler);
146
- this.mdcSlider.listen('MDCSlider:input', this.inputHandler);
80
+ this.handleInput = (event) => {
81
+ event.stopPropagation();
82
+ const input = event.target;
83
+ const value = Number(input.value);
84
+ this.displayValue = value;
85
+ this.setPercentageClass(value / this.factor);
147
86
  };
148
- this.changeHandler = (event) => {
149
- let value = event.detail.value;
87
+ this.handleChange = (event) => {
88
+ event.stopPropagation();
89
+ const input = event.target;
90
+ let value = Number(input.value);
150
91
  const step = this.multiplyByFactor(this.step);
151
92
  if (!this.isMultipleOfStep(value, step)) {
152
93
  value = this.roundToStep(value, step);
153
94
  }
154
95
  this.change.emit(value / this.factor);
155
96
  };
156
- this.inputHandler = (event) => {
157
- this.setPercentageClass(event.detail.value / this.factor);
158
- };
159
97
  this.getContainerClassList = () => {
98
+ if (!this.percentageClass) {
99
+ return {};
100
+ }
160
101
  return {
161
102
  [this.percentageClass]: true,
162
- 'displays-percentage-colors': this.displaysPercentageColors,
163
- disabled: this.disabled || this.readonly,
164
- readonly: this.readonly,
165
103
  };
166
104
  };
167
- this.resizeObserverCallback = () => {
168
- var _a;
169
- (_a = this.mdcSlider) === null || _a === void 0 ? void 0 : _a.layout();
170
- };
171
- this.updateDisabledState = () => {
172
- var _a;
173
- if (!this.mdcSlider) {
174
- return;
175
- }
176
- (_a = this.mdcSlider) === null || _a === void 0 ? void 0 : _a.setDisabled(this.disabled || this.readonly);
177
- };
178
105
  this.multiplyByFactor = (value) => {
179
106
  return Math.round(value * this.factor);
180
107
  };
@@ -185,6 +112,14 @@ export class Slider {
185
112
  }
186
113
  return value;
187
114
  };
115
+ this.getFraction = () => {
116
+ const min = this.multiplyByFactor(this.valuemin);
117
+ const max = this.multiplyByFactor(this.valuemax);
118
+ if (max === min) {
119
+ return 0;
120
+ }
121
+ return Math.max(0, Math.min(1, (this.displayValue - min) / (max - min)));
122
+ };
188
123
  this.setPercentageClass = (value) => {
189
124
  this.percentageClass = getPercentageClass((value - this.valuemin) / (this.valuemax - this.valuemin));
190
125
  };
@@ -197,45 +132,17 @@ export class Slider {
197
132
  this.roundToStep = (value, step) => {
198
133
  return Math.round(value / step) * step;
199
134
  };
200
- this.getRootElement = () => {
201
- return this.rootElement.shadowRoot.querySelector('.mdc-slider');
202
- };
203
- this.getInputElement = () => {
204
- const element = this.getRootElement();
205
- if (!element) {
206
- return;
207
- }
208
- return element.querySelector('input');
209
- };
210
- this.isStepConfigured = () => {
211
- if (!this.step) {
212
- return true;
213
- }
214
- const input = this.getInputElement();
215
- if (!input) {
216
- return true;
217
- }
218
- return input.hasAttribute('step');
219
- };
220
135
  this.labelId = createRandomString();
221
136
  this.helperTextId = createRandomString();
222
137
  }
223
- connectedCallback() {
224
- this.initialize();
225
- this.observer = new ResizeObserver(this.resizeObserverCallback);
226
- this.observer.observe(this.rootElement);
227
- }
228
138
  componentWillLoad() {
229
- this.setPercentageClass(this.value);
230
- }
231
- componentDidLoad() {
232
- this.initialize();
233
- }
234
- disconnectedCallback() {
235
- this.destroyMDCSlider();
236
- this.observer.disconnect();
139
+ this.displayValue = this.multiplyByFactor(this.getValue());
140
+ this.setPercentageClass(this.getValue());
237
141
  }
238
142
  render() {
143
+ const min = this.multiplyByFactor(this.valuemin);
144
+ const max = this.multiplyByFactor(this.valuemax);
145
+ const fraction = this.getFraction();
239
146
  const inputProps = {};
240
147
  if (this.step) {
241
148
  inputProps.step = this.multiplyByFactor(this.step);
@@ -243,34 +150,13 @@ export class Slider {
243
150
  if (this.disabled || this.readonly) {
244
151
  inputProps.disabled = true;
245
152
  }
246
- return (h(Host, { key: '4d8742b0c40d836b9cab61988cafc42e90843e31', class: this.getContainerClassList() }, h("limel-notched-outline", { key: 'a775070fe819f15542ad3ba4a2a3839bcf392051', labelId: this.labelId, label: this.label, required: this.required, invalid: this.invalid, disabled: this.disabled, readonly: this.readonly, hasValue: !!this.value, hasFloatingLabel: true }, h("div", { key: 'f01ca4b8c2f71ef4ea7466aff58d821c484e20bc', slot: "content" }, this.renderRangeContainer(), this.renderSliderContainer(inputProps))), this.renderHelperLine()));
247
- }
248
- watchDisabled() {
249
- this.updateDisabledState();
250
- }
251
- watchReadonly() {
252
- this.updateDisabledState();
153
+ return (h(Host, { key: 'fa9695563f078bdab1707422cad3aaef2610e592', class: this.getContainerClassList() }, h("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: true }, h("div", { key: '0327cf7d5295bb1d56e2e34b8dca15cfc3e15c0d', slot: "content" }, h("div", { key: '83fade77119ba9fa1d24ae8fdcd54317648918b3', class: "slider", style: { '--slider-fraction': `${fraction}` } }, h("input", Object.assign({ key: '5181430787abe75b4556923e31ebe8520df977e9', type: "range", min: min, max: max, value: this.displayValue, "aria-labelledby": this.labelId, "aria-describedby": this.helperText
154
+ ? this.helperTextId
155
+ : undefined, onInput: this.handleInput, onChange: this.handleChange }, inputProps)), h("div", { key: '6ee95d718f1d01e92adcf9592882ed1d32e4ba67', class: "track" }, h("div", { key: 'bba420e41501990bdeb1326e59e6eff57000848d', class: "active" }), this.renderStepDots(min, max)), h("div", { key: '46e5a45adbda4e1a650d01408c3d228f1c6be68d', class: "thumb" }, h("div", { key: 'eeba995f52ff3291e2e7818528b05c7c1dec1b32', class: "knob" }), h("div", { key: 'd0321459ed22c6870d939da54df43fe2bfef6333', class: "indicator", "aria-hidden": "true" }, this.displayValue))), h("div", { key: 'bcc4449d7605343fd64f4b89b50c8e5d665f6937', class: "range-labels" }, h("span", { key: '301c78b1640551fe814ad3b2768bb40f9b682b39', class: "min" }, this.multiplyByFactor(this.valuemin), this.unit), h("span", { key: '7f8d741f63030b6f8e88231e5215448b815bf3ca', class: "max" }, this.multiplyByFactor(this.valuemax), this.unit)))), this.renderHelperLine()));
253
156
  }
254
157
  watchValue() {
255
- if (!this.mdcSlider) {
256
- return;
257
- }
258
- const value = this.multiplyByFactor(this.getValue());
259
- this.mdcSlider.setValue(value);
260
- if (this.isStepConfigured()) {
261
- return;
262
- }
263
- const step = this.multiplyByFactor(this.step);
264
- if (!this.isMultipleOfStep(value, step)) {
265
- return;
266
- }
267
- this.reCreateSliderWithStep();
268
- }
269
- destroyMDCSlider() {
270
- this.mdcSlider.unlisten('MDCSlider:change', this.changeHandler);
271
- this.mdcSlider.unlisten('MDCSlider:input', this.inputHandler);
272
- this.mdcSlider.destroy();
273
- this.mdcSlider = undefined;
158
+ this.displayValue = this.multiplyByFactor(this.getValue());
159
+ this.setPercentageClass(this.getValue());
274
160
  }
275
161
  static get is() { return "limel-slider"; }
276
162
  static get encapsulation() { return "shadow"; }
@@ -546,7 +432,8 @@ export class Slider {
546
432
  }
547
433
  static get states() {
548
434
  return {
549
- "percentageClass": {}
435
+ "percentageClass": {},
436
+ "displayValue": {}
550
437
  };
551
438
  }
552
439
  static get events() {
@@ -567,15 +454,8 @@ export class Slider {
567
454
  }
568
455
  }];
569
456
  }
570
- static get elementRef() { return "rootElement"; }
571
457
  static get watchers() {
572
458
  return [{
573
- "propName": "disabled",
574
- "methodName": "watchDisabled"
575
- }, {
576
- "propName": "readonly",
577
- "methodName": "watchReadonly"
578
- }, {
579
459
  "propName": "value",
580
460
  "methodName": "watchValue"
581
461
  }];
@@ -121,14 +121,14 @@ export class Snackbar {
121
121
  }
122
122
  }
123
123
  render() {
124
- return (h("aside", { key: 'ea6276745563c7dd62d3061da0b1c6a41b3d1243', popover: "manual", style: {
124
+ return (h("aside", { key: '0c9605ecafcab256f9e1b2ac43b72c70695c1719', popover: "manual", style: {
125
125
  '--snackbar-timeout': `${Math.max(this.timeout || 0, 0)}ms`,
126
126
  '--snackbar-distance-to-top-edge': `${this.offset}px`,
127
127
  }, class: {
128
128
  open: this.open,
129
129
  'is-closing': this.closing,
130
130
  'limel-portal--parent': true,
131
- }, id: this.snackbarId, role: this.setAriaRoles(), "aria-atomic": this.open ? 'true' : undefined, "aria-relevant": this.open ? 'additions' : undefined }, h("div", { key: 'd5c42448d07093b5df96a44a9bdf2842b4bf9a9f', class: "surface" }, h("div", { key: '93a9ea81726b0e309ae54ab23270562702b59104', class: "label" }, this.message), this.renderActions(this.actionText), this.renderDismissButton(this.dismissible))));
131
+ }, id: this.snackbarId, role: this.setAriaRoles(), "aria-atomic": this.open ? 'true' : undefined, "aria-relevant": this.open ? 'additions' : undefined }, h("div", { key: '58b4d6d2f94be604273c46e0babccade357798ab', class: "surface" }, h("div", { key: '148001236225eb6980f3894151e04fd43037863e', class: "label" }, this.message), this.renderActions(this.actionText), this.renderDismissButton(this.dismissible))));
132
132
  }
133
133
  setAriaRoles() {
134
134
  if (!this.open) {
@@ -16,7 +16,7 @@ export class Spinner {
16
16
  this.limeBranded = false;
17
17
  }
18
18
  render() {
19
- return (h(Host, { key: '5d7275ec64f2e3b07c7e25065d8d115de772324e' }, h("svg", { key: '41e5110dc29d6112261bea4afbd8cffde213cde0', viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, this.renderSpinner())));
19
+ return (h(Host, { key: 'bb72728921dd48ab02cad031e3b35641c92b4dce' }, h("svg", { key: 'fccd59e394e3e4a0101d2e7f903b1b4f9dffc630', viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, this.renderSpinner())));
20
20
  }
21
21
  renderSpinner() {
22
22
  if (!this.limeBranded) {
@@ -55,9 +55,9 @@ export class SplitButton {
55
55
  };
56
56
  }
57
57
  render() {
58
- return (h(Host, { key: 'c36360c226a10f303158e13033451541d4e232fd', class: {
58
+ return (h(Host, { key: '4ddbc6a1d81d69c50340512ed8a7112b2288fa3e', class: {
59
59
  'has-menu': this.items.length > 0,
60
- }, onClick: this.filterClickWhenDisabled }, h("limel-button", { key: 'bc63b91941bfb71d090a04ff7dc46cf97d0c18e7', label: this.label, primary: this.primary, icon: this.icon, disabled: this.disabled, loading: this.loading, loadingFailed: this.loadingFailed }), this.renderMenu()));
60
+ }, onClick: this.filterClickWhenDisabled }, h("limel-button", { key: '050586c28af81bc598021a602d4f274afd7a777b', label: this.label, primary: this.primary, icon: this.icon, disabled: this.disabled, loading: this.loading, loadingFailed: this.loadingFailed }), this.renderMenu()));
61
61
  }
62
62
  static get is() { return "limel-split-button"; }
63
63
  static get encapsulation() { return "shadow"; }
@@ -78,7 +78,7 @@ export class Switch {
78
78
  removeEnterClickable(this.host);
79
79
  }
80
80
  render() {
81
- return (h(Host, { key: '4b90d19763474c8a9f54364091797a3eb537fbc9' }, this.readonly
81
+ return (h(Host, { key: '4adc29ba50c4e06948efef7b922c0fb70bb58ecb' }, this.readonly
82
82
  ? this.renderReadonly()
83
83
  : this.renderInteractive(), this.renderHelperLine()));
84
84
  }
@@ -62,11 +62,11 @@ export class TabBar {
62
62
  this.tearDown();
63
63
  }
64
64
  render() {
65
- return (h("div", { key: '764d28d7417c3c2801491c54d6c5db36b022adda', class: "mdc-tab-bar", role: "tablist" }, h("div", { key: 'ee7a869e13069c2baac39b6abb8ac9f7353f8655', class: {
65
+ return (h("div", { key: '011bbe3e75ebeb4fefe4942704ef003ad64e92fc', class: "mdc-tab-bar", role: "tablist" }, h("div", { key: '6119888fd94f5ea3d474c1a14016e456ff98923e', class: {
66
66
  'mdc-tab-scroller': true,
67
67
  'can-scroll-left': this.canScrollLeft,
68
68
  'can-scroll-right': this.canScrollRight,
69
- } }, h("div", { key: '55a955d4686181d2ded9ae24b525e863a9c9514c', class: "mdc-tab-scroller__scroll-area lime-hide-scrollbars" }, h("div", { key: '005a0150e3f03b9f8ca4facd767e7e05b17b5689', class: "mdc-tab-scroller__scroll-content" }, this.tabs.map(this.renderTab))), h("div", { key: '68956d9c7c9d17e9b572014e4e865e20680fbc98', class: "scroll-fade left" }), h("div", { key: '268c2616ff24edf6959931a324f9b242eec28a87', class: "scroll-button left" }, h("button", { key: '4a7f75826b7344ba6f88de784a2c9928c0779cd0', type: "button", tabindex: "-1", "aria-hidden": "true", disabled: !this.canScrollLeft, onClick: this.handleLeftScrollClick }, h("limel-icon", { key: '7d2e61ed0001a17a51aa71064f58f5c40692c4b7', name: "angle_left" }))), h("div", { key: 'dce1d143623bcdf84607428e205dc88d7b9a16d7', class: "scroll-fade right" }), h("div", { key: 'bc6f06e98950256a67748095999d676173871b2f', class: "scroll-button right" }, h("button", { key: '1b5aac1ebd4dea1d2eff4d88b154c62d87a353c1', type: "button", tabindex: "-1", "aria-hidden": "true", disabled: !this.canScrollRight, onClick: this.handleRightScrollClick }, h("limel-icon", { key: '022f900f20506369ffa79a045e144fcb213f4006', name: "angle_right" }))))));
69
+ } }, h("div", { key: 'ac46f8471cbdbaec95bed2d5541d6f927eee0fb7', class: "mdc-tab-scroller__scroll-area lime-hide-scrollbars" }, h("div", { key: 'a12f6a5112ff94c5c70a6800972e81998fd51517', class: "mdc-tab-scroller__scroll-content" }, this.tabs.map(this.renderTab))), h("div", { key: '2891ceddace39d210b314c203bdaaf1cf50257da', class: "scroll-fade left" }), h("div", { key: '52d16debe5cba91b876d2c1ebc3fa0b65554193c', class: "scroll-button left" }, h("button", { key: 'a9c6c3bc7027e7dfcfdc999f542911533d2ad97d', type: "button", tabindex: "-1", "aria-hidden": "true", disabled: !this.canScrollLeft, onClick: this.handleLeftScrollClick }, h("limel-icon", { key: '6d910230e3e7182c0431508603f97a8da195454f', name: "angle_left" }))), h("div", { key: '47ab1002864f2603fcaee518c5cf8604512a5294', class: "scroll-fade right" }), h("div", { key: 'cebdcc16ed78ecbeafcf4bfbc9e1c59277f3c959', class: "scroll-button right" }, h("button", { key: 'd35caa827d3f4218537f91522cfe1b4b85d0de29', type: "button", tabindex: "-1", "aria-hidden": "true", disabled: !this.canScrollRight, onClick: this.handleRightScrollClick }, h("limel-icon", { key: '875ee1bfc8a28a6fbed1d6323974f732f5d3274e', name: "angle_right" }))))));
70
70
  }
71
71
  tabsChanged(newTabs = [], oldTabs = []) {
72
72
  const newIds = newTabs.map((tab) => tab.id);
@@ -56,7 +56,7 @@ export class TabPanel {
56
56
  this.tabs.forEach(this.setTabStatus);
57
57
  }
58
58
  render() {
59
- return (h(Host, { key: '831b5534fb89f2892ede144fdbdd9747e4e8ef83', onChangeTab: this.handleChangeTabs }, h("div", { key: '7215d031f6558985ce6d7b3b5ee0d0d57b546e4b', class: "tab-panel" }, h("limel-tab-bar", { key: '4891c70a6aa19357a19c8a08c207ffae1ee1ce73', tabs: this.tabs }), h("div", { key: 'e682144fba03c72a220e57de4668f83690b54572', class: "tab-content" }, h("slot", { key: '192b28283d6aa49d27fbe31395728441e34cb252' })))));
59
+ return (h(Host, { key: 'ebab881a0b0efc36b64c866b58b919890c526525', onChangeTab: this.handleChangeTabs }, h("div", { key: '1417a34aea0af009e44cd91ac8fd425412a2b706', class: "tab-panel" }, h("limel-tab-bar", { key: '5b420eeec41fdd353ba0ba36bb0e475c3fd26821', tabs: this.tabs }), h("div", { key: 'aa3d6f711a824a07eed6f2b5120497dd4218ed7b', class: "tab-content" }, h("slot", { key: '7ba511fa07bd96018e4d8d288d7b1dca572cead0' })))));
60
60
  }
61
61
  setSlotElements() {
62
62
  const slot = this.getSlot();
@@ -578,16 +578,16 @@ export class Table {
578
578
  render() {
579
579
  var _a, _b;
580
580
  const totalRows = (_a = this.totalRows) !== null && _a !== void 0 ? _a : this.data.length;
581
- return (h(Host, { key: '06e9aec7ea04c3acc5de284f0c2a0c6dce22f859', class: {
581
+ return (h(Host, { key: '83aff83d2e82d2b6bb71cca08a0f9532f084edf7', class: {
582
582
  'has-low-density': this.layout === 'lowDensity',
583
583
  'has-pagination-on-top': this.paginationLocation === 'top',
584
- } }, h("div", { key: 'b03936f9ac33f82c6fe9c92da82eb73b4ecb552b', id: "tabulator-container", class: {
584
+ } }, h("div", { key: '159ef3258158b9987c2023612bc9975163253d91', id: "tabulator-container", class: {
585
585
  'has-pagination': totalRows > this.pageSize,
586
586
  'has-aggregation': this.hasAggregation(this.columns),
587
587
  'has-movable-columns': this.movableColumns,
588
588
  'has-rowselector': this.selectable,
589
589
  'has-selection': (_b = this.tableSelection) === null || _b === void 0 ? void 0 : _b.hasSelection,
590
- } }, h("div", { key: '645d50bd392a0486351b6643dd6a2183dd36f417', id: "tabulator-loader", style: { display: this.loading ? 'flex' : 'none' } }, h("limel-spinner", { key: '19114065dfa74f82af84f3ed78c9830e621baaf4', size: "large" })), this.renderEmptyMessage(), this.renderSelectAll(), h("div", { key: '68cb8e0809f9dfc69ec25dc6e8a93182d881cd18', id: "tabulator-table" }))));
590
+ } }, h("div", { key: '74fbcc4af5ee32f05f19987127f1c26c71794cd3', id: "tabulator-loader", style: { display: this.loading ? 'flex' : 'none' } }, h("limel-spinner", { key: 'b9da01750a35d99e2ea2f6ba024c5a3b25ac1aef', size: "large" })), this.renderEmptyMessage(), this.renderSelectAll(), h("div", { key: 'dc3936c5ea3999ded14c4929ad7a03eef11418b1', id: "tabulator-table" }))));
591
591
  }
592
592
  renderSelectAll() {
593
593
  var _a, _b, _c;
@@ -106,9 +106,9 @@ export class TextEditorLinkMenu {
106
106
  var _a, _b;
107
107
  const isValid = this.isValid(this.link.href);
108
108
  return [
109
- h("limel-input-field", { key: '76061c2cec6ffe2b1c37b19bed1c5db5c2792e88', label: this.getTranslation('editor-link-menu.text'), value: ((_a = this.link) === null || _a === void 0 ? void 0 : _a.text) || '', leadingIcon: "text_cursor", onChange: this.handleLinkTitleChange, onKeyDown: this.handleKeyDown, ref: (el) => (this.textInput = el) }),
110
- h("limel-input-field", { key: '3583c4a38a5cb78d75747ff846f1ca09166d4d72', label: this.getTranslation('editor-link-menu.link'), value: ((_b = this.link) === null || _b === void 0 ? void 0 : _b.href) || '', type: "text", leadingIcon: "-lime-text-link", trailingIcon: "external_link", invalid: !isValid, onChange: this.handleLinkValueChange, onAction: this.handleLinkInputAction, onKeyDown: this.handleKeyDown }),
111
- h("div", { key: 'c352df81c4e8e561242e981f9df0e8bb0a5acd9e', class: "actions" }, h("limel-button", { key: '8c2742b66c594c1713a82e2290aa51af04b25df8', label: this.getTranslation('cancel'), onClick: this.handleCancel }), h("limel-button", { key: '99f1e41709ea974fbe3a841bbe3637050a94a24f', primary: true, label: this.getTranslation('save'), disabled: !isValid, onClick: this.handleSave, ref: (el) => (this.saveButton = el), slot: "button" })),
109
+ h("limel-input-field", { key: 'f91dd3a9c03bb52cb91ea0f3251288f5a612cd3a', label: this.getTranslation('editor-link-menu.text'), value: ((_a = this.link) === null || _a === void 0 ? void 0 : _a.text) || '', leadingIcon: "text_cursor", onChange: this.handleLinkTitleChange, onKeyDown: this.handleKeyDown, ref: (el) => (this.textInput = el) }),
110
+ h("limel-input-field", { key: '1034663268cae0a749397331b43ea44387431c78', label: this.getTranslation('editor-link-menu.link'), value: ((_b = this.link) === null || _b === void 0 ? void 0 : _b.href) || '', type: "text", leadingIcon: "-lime-text-link", trailingIcon: "external_link", invalid: !isValid, onChange: this.handleLinkValueChange, onAction: this.handleLinkInputAction, onKeyDown: this.handleKeyDown }),
111
+ h("div", { key: '5c4b46deb47d9369a0a59e1e5908934093322755', class: "actions" }, h("limel-button", { key: '62c2dcc49a7907d938a27e2887432caa3e1a75ff', label: this.getTranslation('cancel'), onClick: this.handleCancel }), h("limel-button", { key: '5252752da58d02fd81abef41fc9788a07e277738', primary: true, label: this.getTranslation('save'), disabled: !isValid, onClick: this.handleSave, ref: (el) => (this.saveButton = el), slot: "button" })),
112
112
  ];
113
113
  }
114
114
  static get is() { return "limel-text-editor-link-menu"; }
@@ -318,19 +318,25 @@ li {
318
318
  * Media query mixins for responsive design based on screen width.
319
319
  * Note that these mixins do not detect the device type!
320
320
  */
321
+ pre,
322
+ pre p,
321
323
  code {
322
324
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
323
- font-size: var(--limel-theme-default-small-font-size);
325
+ font-size: 0.75rem;
326
+ }
327
+
328
+ pre {
329
+ max-width: 100%;
330
+ white-space: pre-wrap;
331
+ word-wrap: break-word;
332
+ }
333
+
334
+ code {
324
335
  letter-spacing: -0.0125rem;
325
336
  color: rgb(var(--contrast-1300));
326
- -moz-tab-size: 4;
327
- -o-tab-size: 4;
328
337
  tab-size: 4;
329
- -webkit-hyphens: none;
330
- -moz-hyphens: none;
331
- -ms-hyphens: none;
332
338
  hyphens: none;
333
- display: inline-block;
339
+ display: inline;
334
340
  border-radius: 0.25rem;
335
341
  padding: 0.03125rem 0.25rem;
336
342
  background-color: rgb(var(--contrast-600));
@@ -340,8 +346,6 @@ pre > code {
340
346
  display: block;
341
347
  margin: 0.5rem 0;
342
348
  padding: 0.5rem 0.75rem;
343
- overflow: auto;
344
- white-space: pre-wrap;
345
349
  }
346
350
 
347
351
  :host(limel-markdown:not(.no-table-styles)) table {
@@ -246,7 +246,7 @@ export class ProsemirrorAdapter {
246
246
  (_e = this.view) === null || _e === void 0 ? void 0 : _e.destroy();
247
247
  }
248
248
  render() {
249
- return (h(Host, { key: '2f17d3935ed3c9d7a7191b3b4cd85bb1c2a4ac32', onFocus: this.handleFocus }, h("div", { key: '328602696f29dbbe89cee0c535f2efddf92c2a20', id: "editor" }), this.renderToolbar(), this.renderLinkMenu()));
249
+ return (h(Host, { key: '125d6d80cfc94a3121cde5d121d3cb2a26cf1635', onFocus: this.handleFocus }, h("div", { key: 'eb076afa683c0dfcb57b6688bc94ce1b81ce5710', id: "editor" }), this.renderToolbar(), this.renderLinkMenu()));
250
250
  }
251
251
  renderToolbar() {
252
252
  if (this.actionBarItems.length === 0 || this.ui === 'no-toolbar') {
@@ -142,7 +142,7 @@ export class TextEditor {
142
142
  this.editorId = createRandomString();
143
143
  }
144
144
  render() {
145
- return (h(Host, { key: '5c901a284efe050bd17b56bb56ce053022b8c6f4' }, h("limel-notched-outline", { key: 'e6d0dbf1ca9af78cff86c0a227d4da030619ab33', labelId: this.editorId, label: this.label, required: this.required, invalid: this.invalid, disabled: this.disabled, readonly: this.readonly, hasValue: !!this.value, hasFloatingLabel: true }, this.renderEditor(), this.renderPlaceholder()), this.renderHelperLine()));
145
+ return (h(Host, { key: '31661aea27e0dea61827560c031587bd208f8bed' }, h("limel-notched-outline", { key: '81571a171ba0b629117d8b153e091e6d34c98c70', labelId: this.editorId, label: this.label, required: this.required, invalid: this.invalid, disabled: this.disabled, readonly: this.readonly, hasValue: !!this.value, hasFloatingLabel: true }, this.renderEditor(), this.renderPlaceholder()), this.renderHelperLine()));
146
146
  }
147
147
  renderEditor() {
148
148
  if (this.readonly) {
@@ -18,7 +18,7 @@ export class TooltipContent {
18
18
  };
19
19
  }
20
20
  return [
21
- h("text", Object.assign({ key: '5f6cde48d57c7c5b680055314f3b6d082ff37b5a', class: { 'has-column-layout': isLabelsTextLong } }, props), h("div", { key: 'ebfc96849d68c4db09e7be7b3d86e12d3937a5d9', class: "label" }, this.label), h("div", { key: 'a2730d9d13111bd949fc1a2795b785c217f800f8', class: "helper-label" }, this.helperLabel)),
21
+ h("text", Object.assign({ key: '14fbfda34a833644fd73cbfabb4e481ab5979c69', class: { 'has-column-layout': isLabelsTextLong } }, props), h("div", { key: '672c23e4d0f992395a422f684436ffb18720bd12', class: "label" }, this.label), h("div", { key: '132cffce86c4cd1a274ffbfd3d0ec1bfb9c3c073', class: "helper-label" }, this.helperLabel)),
22
22
  ];
23
23
  }
24
24
  static get is() { return "limel-tooltip-content"; }
@@ -78,10 +78,10 @@ export class Tooltip {
78
78
  }
79
79
  render() {
80
80
  const tooltipZIndex = getComputedStyle(this.host).getPropertyValue('--tooltip-z-index');
81
- return (h("div", { key: '93e90be597ba45e4063a9a7a689783f31a3b5871', class: "trigger-anchor" }, h("limel-portal", { key: '94cdcde46fc3f172e194894d0546cf96bce35623', openDirection: this.openDirection, visible: this.open, containerId: this.portalId, containerStyle: {
81
+ return (h("div", { key: 'ffc3b079a0fcb1a4065c176228d720c64ca57d2e', class: "trigger-anchor" }, h("limel-portal", { key: 'e18fa14f5c328485f6755bc62c402c16d6dd0fd1', openDirection: this.openDirection, visible: this.open, containerId: this.portalId, containerStyle: {
82
82
  'z-index': tooltipZIndex,
83
83
  'pointer-events': 'none',
84
- }, anchor: this.ownerElement }, h("limel-tooltip-content", { key: 'd24de90d827c87b1e8fd2c10142fc34bcd498774', label: this.label, helperLabel: this.helperLabel, maxlength: this.maxlength, role: "tooltip", "aria-hidden": !this.open, id: this.tooltipId }))));
84
+ }, anchor: this.ownerElement }, h("limel-tooltip-content", { key: 'cc3a5f98a22082b4e8c2d0ec6bd71d5cf5770c0a', label: this.label, helperLabel: this.helperLabel, maxlength: this.maxlength, role: "tooltip", "aria-hidden": !this.open, id: this.tooltipId }))));
85
85
  }
86
86
  setOwnerAriaLabel() {
87
87
  var _a;