@limetech/lime-elements 39.10.3 → 39.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/cjs/lime-elements.cjs.js +1 -1
- package/dist/cjs/limel-breadcrumbs_7.cjs.entry.js +51 -3
- package/dist/cjs/limel-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/limel-dialog.cjs.entry.js +86 -2
- package/dist/cjs/limel-list-item.cjs.entry.js +1 -1
- package/dist/cjs/limel-portal_3.cjs.entry.js +3 -3
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +1 -1
- package/dist/cjs/limel-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/limel-slider.cjs.entry.js +44 -1494
- package/dist/cjs/limel-snackbar.cjs.entry.js +2 -2
- package/dist/cjs/limel-split-button.cjs.entry.js +2 -2
- package/dist/cjs/limel-switch.cjs.entry.js +2 -2
- package/dist/cjs/limel-tab-bar.cjs.entry.js +2 -2
- package/dist/cjs/limel-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/limel-table.cjs.entry.js +3 -3
- package/dist/cjs/limel-text-editor-link-menu.cjs.entry.js +3 -3
- package/dist/cjs/limel-text-editor.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/checkbox/checkbox.css +6 -0
- package/dist/collection/components/list-item/list-item.css +6 -0
- package/dist/collection/components/radio-button-group/radio-button.css +1 -0
- package/dist/collection/components/slider/slider.css +215 -642
- package/dist/collection/components/slider/slider.js +45 -165
- package/dist/collection/components/snackbar/snackbar.js +2 -2
- package/dist/collection/components/spinner/spinner.js +1 -1
- package/dist/collection/components/split-button/split-button.js +2 -2
- package/dist/collection/components/switch/switch.css +6 -0
- package/dist/collection/components/switch/switch.js +1 -1
- package/dist/collection/components/tab-bar/tab-bar.js +2 -2
- package/dist/collection/components/tab-panel/tab-panel.js +1 -1
- package/dist/collection/components/table/table.js +3 -3
- package/dist/collection/components/text-editor/link-menu/editor-link-menu.js +3 -3
- package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js +1 -1
- package/dist/collection/components/text-editor/text-editor.js +1 -1
- package/dist/collection/components/tooltip/tooltip-content.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js +2 -2
- package/dist/collection/style/internal/boolean-input.scss +1 -0
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/limel-breadcrumbs_7.entry.js +50 -2
- package/dist/esm/limel-checkbox.entry.js +1 -1
- package/dist/esm/limel-dialog.entry.js +85 -1
- package/dist/esm/limel-list-item.entry.js +1 -1
- package/dist/esm/limel-portal_3.entry.js +3 -3
- package/dist/esm/limel-prosemirror-adapter.entry.js +1 -1
- package/dist/esm/limel-radio-button.entry.js +1 -1
- package/dist/esm/limel-slider.entry.js +45 -1495
- package/dist/esm/limel-snackbar.entry.js +2 -2
- package/dist/esm/limel-split-button.entry.js +2 -2
- package/dist/esm/limel-switch.entry.js +2 -2
- package/dist/esm/limel-tab-bar.entry.js +2 -2
- package/dist/esm/limel-tab-panel.entry.js +1 -1
- package/dist/esm/limel-table.entry.js +3 -3
- package/dist/esm/limel-text-editor-link-menu.entry.js +3 -3
- package/dist/esm/limel-text-editor.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/{p-17e1d911.entry.js → p-2906606d.entry.js} +1 -1
- package/dist/lime-elements/{p-30e54f05.entry.js → p-2b1eda20.entry.js} +3 -3
- package/dist/lime-elements/{p-889a05e4.entry.js → p-3d724fc2.entry.js} +1 -1
- package/dist/lime-elements/{p-b8e5bd98.entry.js → p-3f188493.entry.js} +1 -1
- package/dist/lime-elements/p-50f51eb9.entry.js +1 -0
- package/dist/lime-elements/{p-a243b8e2.entry.js → p-730a05e3.entry.js} +1 -1
- package/dist/lime-elements/{p-77f42eff.entry.js → p-8203eea8.entry.js} +1 -1
- package/dist/lime-elements/{p-a44dfaa1.entry.js → p-89b35965.entry.js} +1 -1
- package/dist/lime-elements/{p-9abfb8ba.entry.js → p-9aa07388.entry.js} +1 -1
- package/dist/lime-elements/{p-8e3cc9b0.entry.js → p-afd4be62.entry.js} +1 -1
- package/dist/lime-elements/{p-9d629f5f.entry.js → p-c308e2a5.entry.js} +55 -10
- package/dist/lime-elements/p-c7110762.entry.js +1 -0
- package/dist/lime-elements/{p-c9591213.entry.js → p-de203f64.entry.js} +1 -1
- package/dist/lime-elements/p-e7e2737b.entry.js +1 -0
- package/dist/lime-elements/p-faceccc0.entry.js +1 -0
- package/dist/lime-elements/{p-12646794.entry.js → p-fe993f80.entry.js} +1 -1
- package/dist/lime-elements/style/internal/boolean-input.scss +1 -0
- package/dist/types/components/slider/slider.d.ts +6 -24
- package/dist/types/components.d.ts +4 -0
- package/package.json +1 -1
- package/dist/cjs/animationframe-ChtL6ouH.js +0 -88
- package/dist/cjs/util-BOQp7lfZ.js +0 -52
- package/dist/esm/animationframe-BDw7dT4x.js +0 -86
- package/dist/esm/util-Dx8swykg.js +0 -50
- package/dist/lime-elements/p-23c1033d.entry.js +0 -45
- package/dist/lime-elements/p-607ad3b7.entry.js +0 -1
- package/dist/lime-elements/p-689770db.entry.js +0 -1
- package/dist/lime-elements/p-7bd71b2b.entry.js +0 -1
- package/dist/lime-elements/p-BDw7dT4x.js +0 -23
- package/dist/lime-elements/p-Dx8swykg.js +0 -23
|
@@ -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.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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.
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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.
|
|
149
|
-
|
|
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.
|
|
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: '
|
|
247
|
-
|
|
248
|
-
|
|
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
|
-
|
|
256
|
-
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
58
|
+
return (h(Host, { key: '4ddbc6a1d81d69c50340512ed8a7112b2288fa3e', class: {
|
|
59
59
|
'has-menu': this.items.length > 0,
|
|
60
|
-
}, onClick: this.filterClickWhenDisabled }, h("limel-button", { key: '
|
|
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"; }
|
|
@@ -88,6 +88,9 @@
|
|
|
88
88
|
* Media query mixins for responsive design based on screen width.
|
|
89
89
|
* Note that these mixins do not detect the device type!
|
|
90
90
|
*/
|
|
91
|
+
/**
|
|
92
|
+
* @prop --switch-label-overflow-wrap: Controls how long unbreakable words (e.g. camelCase strings with no spaces) wrap within the label. Accepts any valid `overflow-wrap` value. Defaults to `normal`.
|
|
93
|
+
*/
|
|
91
94
|
:host(limel-switch) {
|
|
92
95
|
min-height: 1.75rem;
|
|
93
96
|
display: flex;
|
|
@@ -167,6 +170,9 @@ label {
|
|
|
167
170
|
font-size: var(--limel-theme-default-font-size);
|
|
168
171
|
cursor: pointer;
|
|
169
172
|
width: fit-content;
|
|
173
|
+
overflow-wrap: var(--switch-label-overflow-wrap, normal);
|
|
174
|
+
max-width: 100%;
|
|
175
|
+
min-width: 0;
|
|
170
176
|
}
|
|
171
177
|
:host([disabled]) label {
|
|
172
178
|
cursor: not-allowed;
|
|
@@ -78,7 +78,7 @@ export class Switch {
|
|
|
78
78
|
removeEnterClickable(this.host);
|
|
79
79
|
}
|
|
80
80
|
render() {
|
|
81
|
-
return (h(Host, { key: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
110
|
-
h("limel-input-field", { key: '
|
|
111
|
-
h("div", { key: '
|
|
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"; }
|
|
@@ -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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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;
|
|
@@ -41,6 +41,7 @@ label.boolean-input-label {
|
|
|
41
41
|
cursor: pointer;
|
|
42
42
|
position: relative;
|
|
43
43
|
width: 100%;
|
|
44
|
+
overflow-wrap: var(--limel-boolean-input-label-overflow-wrap, normal);
|
|
44
45
|
|
|
45
46
|
font-size: var(--limel-theme-default-small-font-size);
|
|
46
47
|
color: var(--limel-theme-text-primary-on-background-color);
|