@limetech/lime-elements 34.1.0-next.9 → 34.1.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/dist/cjs/{checkbox.template-d4423721.js → checkbox.template-312308d8.js} +9 -1
- package/dist/cjs/lime-elements.cjs.js +1 -1
- package/dist/cjs/limel-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/limel-chip-set.cjs.entry.js +50 -28
- package/dist/cjs/limel-code-editor.cjs.entry.js +1 -1
- package/dist/cjs/limel-color-picker-palette_2.cjs.entry.js +1 -1
- package/dist/cjs/limel-color-picker.cjs.entry.js +2 -2
- package/dist/cjs/limel-file.cjs.entry.js +1 -1
- package/dist/cjs/limel-form.cjs.entry.js +45 -14
- package/dist/cjs/limel-grid.cjs.entry.js +1 -1
- package/dist/cjs/limel-input-field.cjs.entry.js +1 -1
- package/dist/cjs/limel-list_3.cjs.entry.js +19 -2
- package/dist/cjs/limel-menu-list.cjs.entry.js +1 -1
- package/dist/cjs/limel-picker.cjs.entry.js +1 -1
- package/dist/cjs/limel-slider.cjs.entry.js +69 -13
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/checkbox/checkbox.css +96 -0
- package/dist/collection/components/checkbox/checkbox.js +19 -1
- package/dist/collection/components/checkbox/checkbox.template.js +9 -1
- package/dist/collection/components/chip-set/chip-set.css +14 -0
- package/dist/collection/components/chip-set/chip-set.js +75 -35
- package/dist/collection/components/code-editor/code-editor.css +7 -0
- package/dist/collection/components/color-picker/color-picker-palette.css +38 -1
- package/dist/collection/components/color-picker/color-picker.css +37 -0
- package/dist/collection/components/color-picker/color-picker.js +1 -1
- package/dist/collection/components/file/file.js +1 -1
- package/dist/collection/components/form/adapters/widget-adapter.js +4 -1
- package/dist/collection/components/form/form.js +50 -0
- package/dist/collection/components/form/templates/array-field-collapsible-item.js +8 -8
- package/dist/collection/components/form/templates/common.js +1 -1
- package/dist/collection/components/form/widgets/select.js +3 -4
- package/dist/collection/components/grid/grid.css +1 -1
- package/dist/collection/components/input-field/input-field.css +13 -0
- package/dist/collection/components/list/list-renderer.js +17 -0
- package/dist/collection/components/list/list.css +421 -2
- package/dist/collection/components/list/list.js +1 -0
- package/dist/collection/components/menu-list/menu-list.css +1408 -60
- package/dist/collection/components/picker/picker.js +18 -1
- package/dist/collection/components/slider/slider.js +69 -13
- package/dist/esm/{checkbox.template-dbdd27c8.js → checkbox.template-4be69ce6.js} +9 -1
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/limel-checkbox.entry.js +3 -3
- package/dist/esm/limel-chip-set.entry.js +50 -28
- package/dist/esm/limel-code-editor.entry.js +1 -1
- package/dist/esm/limel-color-picker-palette_2.entry.js +1 -1
- package/dist/esm/limel-color-picker.entry.js +2 -2
- package/dist/esm/limel-file.entry.js +1 -1
- package/dist/esm/limel-form.entry.js +45 -14
- package/dist/esm/limel-grid.entry.js +1 -1
- package/dist/esm/limel-input-field.entry.js +1 -1
- package/dist/esm/limel-list_3.entry.js +19 -2
- package/dist/esm/limel-menu-list.entry.js +1 -1
- package/dist/esm/limel-picker.entry.js +1 -1
- package/dist/esm/limel-slider.entry.js +69 -13
- package/dist/esm/loader.js +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/{p-bcafdb7a.entry.js → p-03aa01b5.entry.js} +1 -1
- package/dist/lime-elements/p-0c121e2f.js +1 -0
- package/dist/lime-elements/{p-c6b97214.entry.js → p-0ce9165f.entry.js} +1 -1
- package/dist/lime-elements/p-1876a96a.entry.js +1 -0
- package/dist/lime-elements/p-46af5a60.entry.js +82 -0
- package/dist/lime-elements/p-5170a62c.entry.js +1 -0
- package/dist/lime-elements/p-5a9ecd77.entry.js +73 -0
- package/dist/lime-elements/p-6003f817.entry.js +1 -0
- package/dist/lime-elements/p-622be09b.entry.js +126 -0
- package/dist/lime-elements/p-8a2c1038.entry.js +16 -0
- package/dist/lime-elements/{p-a1153d2a.entry.js → p-8ad5e143.entry.js} +1 -1
- package/dist/lime-elements/{p-b386bfeb.entry.js → p-a2cf74c1.entry.js} +1 -1
- package/dist/lime-elements/{p-81258617.entry.js → p-a77cbb08.entry.js} +1 -1
- package/dist/lime-elements/{p-23d59a30.entry.js → p-fbe6100e.entry.js} +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +5 -0
- package/dist/types/components/checkbox/checkbox.template.d.ts +1 -0
- package/dist/types/components/chip-set/chip-set.d.ts +12 -0
- package/dist/types/components/form/form.d.ts +7 -1
- package/dist/types/components/list/list-item.types.d.ts +14 -0
- package/dist/types/components/list/list-renderer.d.ts +2 -0
- package/dist/types/components/list/list.d.ts +1 -0
- package/dist/types/components/picker/picker.d.ts +4 -0
- package/dist/types/components/slider/slider.d.ts +8 -0
- package/dist/types/components.d.ts +33 -1
- package/package.json +1 -1
- package/dist/lime-elements/p-18fe2eb1.entry.js +0 -1
- package/dist/lime-elements/p-1cf833c8.entry.js +0 -16
- package/dist/lime-elements/p-89b5a983.js +0 -1
- package/dist/lime-elements/p-8d8bd2ab.entry.js +0 -73
- package/dist/lime-elements/p-b5d6abc3.entry.js +0 -126
- package/dist/lime-elements/p-cc154284.entry.js +0 -1
- package/dist/lime-elements/p-df55ee67.entry.js +0 -82
- package/dist/lime-elements/p-f5a3e526.entry.js +0 -1
|
@@ -1431,7 +1431,12 @@ let Slider = class {
|
|
|
1431
1431
|
*/
|
|
1432
1432
|
this.valuemin = 0;
|
|
1433
1433
|
this.changeHandler = (event) => {
|
|
1434
|
-
|
|
1434
|
+
let value = event.detail.value;
|
|
1435
|
+
const step = this.multiplyByFactor(this.step);
|
|
1436
|
+
if (!this.isMultipleOfStep(value, step)) {
|
|
1437
|
+
value = this.roundToStep(value, step);
|
|
1438
|
+
}
|
|
1439
|
+
this.change.emit(value / this.factor);
|
|
1435
1440
|
};
|
|
1436
1441
|
this.inputHandler = this.inputHandler.bind(this);
|
|
1437
1442
|
this.getContainerClassList = this.getContainerClassList.bind(this);
|
|
@@ -1443,11 +1448,10 @@ let Slider = class {
|
|
|
1443
1448
|
this.initialize();
|
|
1444
1449
|
}
|
|
1445
1450
|
initialize() {
|
|
1446
|
-
const
|
|
1447
|
-
if (!
|
|
1451
|
+
const inputElement = this.getInputElement();
|
|
1452
|
+
if (!inputElement) {
|
|
1448
1453
|
return;
|
|
1449
1454
|
}
|
|
1450
|
-
const inputElement = element.querySelector('input');
|
|
1451
1455
|
const value = this.getValue();
|
|
1452
1456
|
/*
|
|
1453
1457
|
For some reason the input element's `value` attribute is removed
|
|
@@ -1472,7 +1476,6 @@ let Slider = class {
|
|
|
1472
1476
|
*/
|
|
1473
1477
|
const greaterThanOrEqualMin = value >= this.valuemin;
|
|
1474
1478
|
const lessThanOrEqualMax = value <= this.valuemax;
|
|
1475
|
-
const dividableByStep = value % this.step === 0;
|
|
1476
1479
|
if (!greaterThanOrEqualMin) {
|
|
1477
1480
|
const newMin = this.multiplyByFactor(value);
|
|
1478
1481
|
inputElement.setAttribute('min', `${newMin}`);
|
|
@@ -1481,20 +1484,16 @@ let Slider = class {
|
|
|
1481
1484
|
const newMax = this.multiplyByFactor(value);
|
|
1482
1485
|
inputElement.setAttribute('max', `${newMax}`);
|
|
1483
1486
|
}
|
|
1484
|
-
if (!
|
|
1487
|
+
if (!this.isMultipleOfStep(value, this.step)) {
|
|
1485
1488
|
inputElement.removeAttribute('step');
|
|
1486
1489
|
}
|
|
1487
|
-
this.
|
|
1488
|
-
this.mdcSlider.listen('MDCSlider:change', this.changeHandler);
|
|
1489
|
-
this.mdcSlider.listen('MDCSlider:input', this.inputHandler);
|
|
1490
|
+
this.createMDCSlider();
|
|
1490
1491
|
}
|
|
1491
1492
|
componentWillLoad() {
|
|
1492
1493
|
this.setPercentageClass(this.value);
|
|
1493
1494
|
}
|
|
1494
1495
|
disconnectedCallback() {
|
|
1495
|
-
this.
|
|
1496
|
-
this.mdcSlider.unlisten('MDCSlider:input', this.inputHandler);
|
|
1497
|
-
this.mdcSlider.destroy();
|
|
1496
|
+
this.destroyMDCSlider();
|
|
1498
1497
|
}
|
|
1499
1498
|
getContainerClassList() {
|
|
1500
1499
|
return {
|
|
@@ -1533,7 +1532,16 @@ let Slider = class {
|
|
|
1533
1532
|
if (!this.mdcSlider) {
|
|
1534
1533
|
return;
|
|
1535
1534
|
}
|
|
1536
|
-
this.
|
|
1535
|
+
const value = this.multiplyByFactor(this.getValue());
|
|
1536
|
+
this.mdcSlider.setValue(value);
|
|
1537
|
+
if (this.isStepConfigured()) {
|
|
1538
|
+
return;
|
|
1539
|
+
}
|
|
1540
|
+
const step = this.multiplyByFactor(this.step);
|
|
1541
|
+
if (!this.isMultipleOfStep(value, step)) {
|
|
1542
|
+
return;
|
|
1543
|
+
}
|
|
1544
|
+
this.reCreateSliderWithStep();
|
|
1537
1545
|
}
|
|
1538
1546
|
updateDisabledState() {
|
|
1539
1547
|
if (!this.mdcSlider) {
|
|
@@ -1557,6 +1565,54 @@ let Slider = class {
|
|
|
1557
1565
|
setPercentageClass(value) {
|
|
1558
1566
|
this.percentageClass = getPercentageClass((value - this.valuemin) / (this.valuemax - this.valuemin));
|
|
1559
1567
|
}
|
|
1568
|
+
isMultipleOfStep(value, step) {
|
|
1569
|
+
if (!step) {
|
|
1570
|
+
return true;
|
|
1571
|
+
}
|
|
1572
|
+
return value % step === 0;
|
|
1573
|
+
}
|
|
1574
|
+
roundToStep(value, step) {
|
|
1575
|
+
return Math.round(value / step) * step;
|
|
1576
|
+
}
|
|
1577
|
+
getRootElement() {
|
|
1578
|
+
return this.rootElement.shadowRoot.querySelector('.mdc-slider');
|
|
1579
|
+
}
|
|
1580
|
+
getInputElement() {
|
|
1581
|
+
const element = this.getRootElement();
|
|
1582
|
+
if (!element) {
|
|
1583
|
+
return;
|
|
1584
|
+
}
|
|
1585
|
+
return element.querySelector('input');
|
|
1586
|
+
}
|
|
1587
|
+
isStepConfigured() {
|
|
1588
|
+
if (!this.step) {
|
|
1589
|
+
return true;
|
|
1590
|
+
}
|
|
1591
|
+
const input = this.getInputElement();
|
|
1592
|
+
if (!input) {
|
|
1593
|
+
return true;
|
|
1594
|
+
}
|
|
1595
|
+
return input.hasAttribute('step');
|
|
1596
|
+
}
|
|
1597
|
+
reCreateSliderWithStep() {
|
|
1598
|
+
const inputElement = this.getInputElement();
|
|
1599
|
+
const step = `${this.multiplyByFactor(this.step)}`;
|
|
1600
|
+
inputElement.setAttribute('step', step);
|
|
1601
|
+
this.destroyMDCSlider();
|
|
1602
|
+
this.createMDCSlider();
|
|
1603
|
+
}
|
|
1604
|
+
createMDCSlider() {
|
|
1605
|
+
const element = this.getRootElement();
|
|
1606
|
+
this.mdcSlider = new MDCSlider(element);
|
|
1607
|
+
this.mdcSlider.listen('MDCSlider:change', this.changeHandler);
|
|
1608
|
+
this.mdcSlider.listen('MDCSlider:input', this.inputHandler);
|
|
1609
|
+
}
|
|
1610
|
+
destroyMDCSlider() {
|
|
1611
|
+
this.mdcSlider.unlisten('MDCSlider:change', this.changeHandler);
|
|
1612
|
+
this.mdcSlider.unlisten('MDCSlider:input', this.inputHandler);
|
|
1613
|
+
this.mdcSlider.destroy();
|
|
1614
|
+
this.mdcSlider = undefined;
|
|
1615
|
+
}
|
|
1560
1616
|
get rootElement() { return index.getElement(this); }
|
|
1561
1617
|
static get watchers() { return {
|
|
1562
1618
|
"disabled": ["watchDisabled"],
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["limel-color-picker.cjs",[[1,"limel-color-picker",{"value":[513],"label":[513],"helperText":[513,"helper-text"],"tooltipLabel":[513,"tooltip-label"],"required":[516],"readonly":[516],"isOpen":[32]}]]],["limel-picker.cjs",[[1,"limel-picker",{"disabled":[4],"readonly":[516],"label":[1],"searchLabel":[1,"search-label"],"leadingIcon":[1,"leading-icon"],"emptyResultMessage":[1,"empty-result-message"],"required":[4],"value":[16],"searcher":[16],"multiple":[4],"delimiter":[513],"actions":[16],"actionPosition":[1,"action-position"],"actionScrollBehavior":[1,"action-scroll-behavior"],"badgeIcons":[516,"badge-icons"],"items":[32],"textValue":[32],"loading":[32],"chips":[32]}]]],["limel-date-picker.cjs",[[1,"limel-date-picker",{"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"helperText":[513,"helper-text"],"required":[516],"value":[16],"type":[513],"format":[513],"language":[513],"formattedValue":[32],"internalFormat":[32],"showPortal":[32]}]]],["limel-button-group.cjs",[[1,"limel-button-group",{"value":[16],"disabled":[516],"selectedButtonId":[32]}]]],["limel-select.cjs",[[1,"limel-select",{"disabled":[516],"readonly":[516],"invalid":[516],"required":[516],"label":[513],"helperText":[513,"helper-text"],"value":[16],"options":[16],"multiple":[4],"menuOpen":[32]}]]],["limel-tab-panel.cjs",[[1,"limel-tab-panel",{"tabs":[1040]}]]],["limel-file.cjs",[[1,"limel-file",{"value":[16],"label":[513],"required":[516],"disabled":[516],"readonly":[516],"accept":[513],"language":[1],"isDraggingOverDropZone":[32]}]]],["limel-menu.cjs",[[1,"limel-menu",{"items":[16],"disabled":[516],"openDirection":[513,"open-direction"],"open":[1540],"badgeIcons":[516,"badge-icons"],"gridLayout":[516,"grid-layout"]}]]],["limel-button.cjs",[[1,"limel-button",{"label":[513],"primary":[516],"outlined":[516],"icon":[513],"disabled":[516],"loading":[516]}]]],["limel-collapsible-section.cjs",[[1,"limel-collapsible-section",{"isOpen":[1540,"is-open"],"header":[513],"actions":[16]}]]],["limel-dialog.cjs",[[1,"limel-dialog",{"heading":[1],"fullscreen":[516],"open":[1540],"closingActions":[16]}]]],["limel-progress-flow.cjs",[[1,"limel-progress-flow",{"flowItems":[16],"disabled":[4],"readonly":[4]}]]],["limel-banner.cjs",[[1,"limel-banner",{"message":[513],"icon":[513],"isOpen":[32],"open":[64],"close":[64]}]]],["limel-table.cjs",[[1,"limel-table",{"data":[16],"columns":[16],"mode":[1],"pageSize":[2,"page-size"],"totalRows":[2,"total-rows"],"sorting":[16],"activeRow":[1040],"movableColumns":[4,"movable-columns"],"loading":[4],"page":[2],"emptyMessage":[1,"empty-message"]}]]],["limel-checkbox.cjs",[[1,"limel-checkbox",{"disabled":[516],"readonly":[516],"label":[513],"checked":[516],"required":[516],"modified":[32]}]]],["limel-circular-progress.cjs",[[1,"limel-circular-progress",{"value":[2],"maxValue":[2,"max-value"],"suffix":[1],"displayPercentageColors":[4,"display-percentage-colors"],"size":[513]}]]],["limel-code-editor.cjs",[[1,"limel-code-editor",{"value":[1],"language":[1],"readonly":[4],"lineNumbers":[4,"line-numbers"],"colorScheme":[1,"color-scheme"],"random":[32]}]]],["limel-config.cjs",[[1,"limel-config",{"config":[16]}]]],["limel-flex-container.cjs",[[1,"limel-flex-container",{"direction":[513],"justify":[513],"align":[513],"reverse":[516]}]]],["limel-form.cjs",[[1,"limel-form",{"schema":[16],"value":[16],"disabled":[4],"propsFactory":[16]}]]],["limel-grid.cjs",[[1,"limel-grid"]]],["limel-linear-progress.cjs",[[1,"limel-linear-progress",{"value":[2],"indeterminate":[4]}]]],["limel-slider.cjs",[[1,"limel-slider",{"disabled":[516],"readonly":[516],"factor":[514],"label":[513],"helperText":[513,"helper-text"],"unit":[513],"value":[514],"valuemax":[514],"valuemin":[514],"step":[514],"percentageClass":[32]}]]],["limel-snackbar.cjs",[[1,"limel-snackbar",{"message":[1],"timeout":[2],"actionText":[1,"action-text"],"dismissible":[4],"multiline":[4],"language":[1],"show":[64]}]]],["limel-switch.cjs",[[1,"limel-switch",{"label":[513],"disabled":[516],"readonly":[516],"value":[516],"fieldId":[32]}]]],["limel-tab-bar.cjs",[[1,"limel-tab-bar",{"tabs":[1040],"canScrollLeft":[32],"canScrollRight":[32]},[[9,"resize","handleWindowResize"]]]]],["limel-header.cjs",[[1,"limel-header",{"icon":[1],"heading":[1],"subheading":[1],"supportingText":[1,"supporting-text"]}]]],["limel-progress-flow-item.cjs",[[0,"limel-progress-flow-item",{"item":[16],"disabled":[4],"readonly":[4]}]]],["limel-flatpickr-adapter.cjs",[[1,"limel-flatpickr-adapter",{"value":[16],"type":[1],"format":[1],"isOpen":[4,"is-open"],"inputElement":[16],"language":[1]}]]],["limel-menu-list.cjs",[[1,"limel-menu-list",{"items":[16],"badgeIcons":[4,"badge-icons"],"iconSize":[1,"icon-size"],"type":[1],"maxLinesSecondaryText":[2,"max-lines-secondary-text"]}]]],["limel-popover-surface.cjs",[[1,"limel-popover-surface",{"contentCollection":[16]}]]],["limel-icon.cjs",[[1,"limel-icon",{"size":[513],"name":[513],"badge":[516]}]]],["limel-input-field.cjs",[[1,"limel-input-field",{"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"helperText":[513,"helper-text"],"required":[516],"value":[513],"trailingIcon":[513,"trailing-icon"],"leadingIcon":[513,"leading-icon"],"pattern":[513],"type":[513],"formatNumber":[516,"format-number"],"step":[520],"max":[514],"min":[514],"maxlength":[514],"minlength":[514],"completions":[16],"showLink":[516,"show-link"],"isFocused":[32],"isModified":[32],"showCompletions":[32]}]]],["limel-color-picker-palette_2.cjs",[[1,"limel-color-picker-palette",{"value":[513],"label":[513],"helperText":[513,"helper-text"],"required":[516]}],[1,"limel-popover",{"open":[4]}]]],["limel-badge.cjs",[[1,"limel-badge",{"label":[514]}]]],["limel-chip-set.cjs",[[1,"limel-chip-set",{"value":[16],"type":[513],"label":[513],"disabled":[516],"readonly":[516],"maxItems":[514,"max-items"],"required":[516],"searchLabel":[513,"search-label"],"emptyInputOnBlur":[516,"empty-input-on-blur"],"clearAllButton":[4,"clear-all-button"],"leadingIcon":[513,"leading-icon"],"delimiter":[513],"language":[1],"editMode":[32],"textValue":[32],"blurred":[32],"inputChipIndexSelected":[32],"getEditMode":[64],"setFocus":[64],"emptyInput":[64]}]]],["limel-icon-button.cjs",[[1,"limel-icon-button",{"icon":[513],"elevated":[516],"label":[513],"disabled":[516],"relayout":[64]}]]],["limel-spinner.cjs",[[1,"limel-spinner",{"size":[513],"limeBranded":[4,"lime-branded"]}]]],["limel-list_3.cjs",[[1,"limel-list",{"items":[16],"badgeIcons":[4,"badge-icons"],"iconSize":[1,"icon-size"],"type":[1],"maxLinesSecondaryText":[2,"max-lines-secondary-text"]}],[1,"limel-menu-surface",{"open":[4],"allowClicksElement":[16]}],[1,"limel-portal",{"openDirection":[1,"open-direction"],"position":[1],"containerId":[1,"container-id"],"containerStyle":[16],"parent":[16],"inheritParentWidth":[4,"inherit-parent-width"],"visible":[4]}]]],["limel-tooltip_2.cjs",[[1,"limel-tooltip",{"label":[513],"helperLabel":[513,"helper-label"],"elementId":[513,"element-id"],"open":[32]}],[1,"limel-tooltip-content",{"label":[513],"helperLabel":[513,"helper-label"]}]]]], options);
|
|
17
|
+
return index.bootstrapLazy([["limel-color-picker.cjs",[[1,"limel-color-picker",{"value":[513],"label":[513],"helperText":[513,"helper-text"],"tooltipLabel":[513,"tooltip-label"],"required":[516],"readonly":[516],"isOpen":[32]}]]],["limel-picker.cjs",[[1,"limel-picker",{"disabled":[4],"readonly":[516],"label":[1],"searchLabel":[1,"search-label"],"helperText":[513,"helper-text"],"leadingIcon":[1,"leading-icon"],"emptyResultMessage":[1,"empty-result-message"],"required":[4],"value":[16],"searcher":[16],"multiple":[4],"delimiter":[513],"actions":[16],"actionPosition":[1,"action-position"],"actionScrollBehavior":[1,"action-scroll-behavior"],"badgeIcons":[516,"badge-icons"],"items":[32],"textValue":[32],"loading":[32],"chips":[32]}]]],["limel-date-picker.cjs",[[1,"limel-date-picker",{"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"helperText":[513,"helper-text"],"required":[516],"value":[16],"type":[513],"format":[513],"language":[513],"formattedValue":[32],"internalFormat":[32],"showPortal":[32]}]]],["limel-button-group.cjs",[[1,"limel-button-group",{"value":[16],"disabled":[516],"selectedButtonId":[32]}]]],["limel-select.cjs",[[1,"limel-select",{"disabled":[516],"readonly":[516],"invalid":[516],"required":[516],"label":[513],"helperText":[513,"helper-text"],"value":[16],"options":[16],"multiple":[4],"menuOpen":[32]}]]],["limel-tab-panel.cjs",[[1,"limel-tab-panel",{"tabs":[1040]}]]],["limel-file.cjs",[[1,"limel-file",{"value":[16],"label":[513],"required":[516],"disabled":[516],"readonly":[516],"accept":[513],"language":[1],"isDraggingOverDropZone":[32]}]]],["limel-menu.cjs",[[1,"limel-menu",{"items":[16],"disabled":[516],"openDirection":[513,"open-direction"],"open":[1540],"badgeIcons":[516,"badge-icons"],"gridLayout":[516,"grid-layout"]}]]],["limel-button.cjs",[[1,"limel-button",{"label":[513],"primary":[516],"outlined":[516],"icon":[513],"disabled":[516],"loading":[516]}]]],["limel-collapsible-section.cjs",[[1,"limel-collapsible-section",{"isOpen":[1540,"is-open"],"header":[513],"actions":[16]}]]],["limel-dialog.cjs",[[1,"limel-dialog",{"heading":[1],"fullscreen":[516],"open":[1540],"closingActions":[16]}]]],["limel-progress-flow.cjs",[[1,"limel-progress-flow",{"flowItems":[16],"disabled":[4],"readonly":[4]}]]],["limel-banner.cjs",[[1,"limel-banner",{"message":[513],"icon":[513],"isOpen":[32],"open":[64],"close":[64]}]]],["limel-table.cjs",[[1,"limel-table",{"data":[16],"columns":[16],"mode":[1],"pageSize":[2,"page-size"],"totalRows":[2,"total-rows"],"sorting":[16],"activeRow":[1040],"movableColumns":[4,"movable-columns"],"loading":[4],"page":[2],"emptyMessage":[1,"empty-message"]}]]],["limel-checkbox.cjs",[[1,"limel-checkbox",{"disabled":[516],"readonly":[516],"label":[513],"helperText":[513,"helper-text"],"checked":[516],"required":[516],"modified":[32]}]]],["limel-circular-progress.cjs",[[1,"limel-circular-progress",{"value":[2],"maxValue":[2,"max-value"],"suffix":[1],"displayPercentageColors":[4,"display-percentage-colors"],"size":[513]}]]],["limel-code-editor.cjs",[[1,"limel-code-editor",{"value":[1],"language":[1],"readonly":[4],"lineNumbers":[4,"line-numbers"],"colorScheme":[1,"color-scheme"],"random":[32]}]]],["limel-config.cjs",[[1,"limel-config",{"config":[16]}]]],["limel-flex-container.cjs",[[1,"limel-flex-container",{"direction":[513],"justify":[513],"align":[513],"reverse":[516]}]]],["limel-form.cjs",[[1,"limel-form",{"schema":[16],"value":[16],"disabled":[4],"propsFactory":[16],"transformErrors":[16]}]]],["limel-grid.cjs",[[1,"limel-grid"]]],["limel-linear-progress.cjs",[[1,"limel-linear-progress",{"value":[2],"indeterminate":[4]}]]],["limel-slider.cjs",[[1,"limel-slider",{"disabled":[516],"readonly":[516],"factor":[514],"label":[513],"helperText":[513,"helper-text"],"unit":[513],"value":[514],"valuemax":[514],"valuemin":[514],"step":[514],"percentageClass":[32]}]]],["limel-snackbar.cjs",[[1,"limel-snackbar",{"message":[1],"timeout":[2],"actionText":[1,"action-text"],"dismissible":[4],"multiline":[4],"language":[1],"show":[64]}]]],["limel-switch.cjs",[[1,"limel-switch",{"label":[513],"disabled":[516],"readonly":[516],"value":[516],"fieldId":[32]}]]],["limel-tab-bar.cjs",[[1,"limel-tab-bar",{"tabs":[1040],"canScrollLeft":[32],"canScrollRight":[32]},[[9,"resize","handleWindowResize"]]]]],["limel-header.cjs",[[1,"limel-header",{"icon":[1],"heading":[1],"subheading":[1],"supportingText":[1,"supporting-text"]}]]],["limel-progress-flow-item.cjs",[[0,"limel-progress-flow-item",{"item":[16],"disabled":[4],"readonly":[4]}]]],["limel-flatpickr-adapter.cjs",[[1,"limel-flatpickr-adapter",{"value":[16],"type":[1],"format":[1],"isOpen":[4,"is-open"],"inputElement":[16],"language":[1]}]]],["limel-menu-list.cjs",[[1,"limel-menu-list",{"items":[16],"badgeIcons":[4,"badge-icons"],"iconSize":[1,"icon-size"],"type":[1],"maxLinesSecondaryText":[2,"max-lines-secondary-text"]}]]],["limel-popover-surface.cjs",[[1,"limel-popover-surface",{"contentCollection":[16]}]]],["limel-icon.cjs",[[1,"limel-icon",{"size":[513],"name":[513],"badge":[516]}]]],["limel-input-field.cjs",[[1,"limel-input-field",{"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"helperText":[513,"helper-text"],"required":[516],"value":[513],"trailingIcon":[513,"trailing-icon"],"leadingIcon":[513,"leading-icon"],"pattern":[513],"type":[513],"formatNumber":[516,"format-number"],"step":[520],"max":[514],"min":[514],"maxlength":[514],"minlength":[514],"completions":[16],"showLink":[516,"show-link"],"isFocused":[32],"isModified":[32],"showCompletions":[32]}]]],["limel-color-picker-palette_2.cjs",[[1,"limel-color-picker-palette",{"value":[513],"label":[513],"helperText":[513,"helper-text"],"required":[516]}],[1,"limel-popover",{"open":[4]}]]],["limel-badge.cjs",[[1,"limel-badge",{"label":[514]}]]],["limel-chip-set.cjs",[[1,"limel-chip-set",{"value":[16],"type":[513],"label":[513],"helperText":[513,"helper-text"],"disabled":[516],"readonly":[516],"maxItems":[514,"max-items"],"required":[516],"searchLabel":[513,"search-label"],"emptyInputOnBlur":[516,"empty-input-on-blur"],"clearAllButton":[4,"clear-all-button"],"leadingIcon":[513,"leading-icon"],"delimiter":[513],"language":[1],"editMode":[32],"textValue":[32],"blurred":[32],"inputChipIndexSelected":[32],"getEditMode":[64],"setFocus":[64],"emptyInput":[64]}]]],["limel-icon-button.cjs",[[1,"limel-icon-button",{"icon":[513],"elevated":[516],"label":[513],"disabled":[516],"relayout":[64]}]]],["limel-spinner.cjs",[[1,"limel-spinner",{"size":[513],"limeBranded":[4,"lime-branded"]}]]],["limel-list_3.cjs",[[1,"limel-list",{"items":[16],"badgeIcons":[4,"badge-icons"],"iconSize":[1,"icon-size"],"type":[1],"maxLinesSecondaryText":[2,"max-lines-secondary-text"]}],[1,"limel-menu-surface",{"open":[4],"allowClicksElement":[16]}],[1,"limel-portal",{"openDirection":[1,"open-direction"],"position":[1],"containerId":[1,"container-id"],"containerStyle":[16],"parent":[16],"inheritParentWidth":[4,"inherit-parent-width"],"visible":[4]}]]],["limel-tooltip_2.cjs",[[1,"limel-tooltip",{"label":[513],"helperLabel":[513,"helper-label"],"elementId":[513,"element-id"],"open":[32]}],[1,"limel-tooltip-content",{"label":[513],"helperLabel":[513,"helper-label"]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -762,6 +762,7 @@
|
|
|
762
762
|
|
|
763
763
|
.mdc-form-field {
|
|
764
764
|
display: flex;
|
|
765
|
+
flex-wrap: wrap;
|
|
765
766
|
}
|
|
766
767
|
.mdc-form-field .mdc-checkbox.mdc-checkbox--invalid .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate) ~ .mdc-checkbox__background {
|
|
767
768
|
border-color: var(--lime-error-text-color);
|
|
@@ -804,4 +805,99 @@
|
|
|
804
805
|
100% {
|
|
805
806
|
opacity: 0;
|
|
806
807
|
}
|
|
808
|
+
}
|
|
809
|
+
/*
|
|
810
|
+
* This file is imported into every component!
|
|
811
|
+
*
|
|
812
|
+
* Nothing in this file may output any CSS
|
|
813
|
+
* without being explicitly called by outside code.
|
|
814
|
+
*/
|
|
815
|
+
/*
|
|
816
|
+
* This file is imported into every component that uses MDC!
|
|
817
|
+
*
|
|
818
|
+
* Anything in this file that generates CSS output on its own,
|
|
819
|
+
* without being explicitly used, will output that CSS in every
|
|
820
|
+
* single component, increasing the size of the production build.
|
|
821
|
+
* Avoid that unless there's very good reason for it!
|
|
822
|
+
*/
|
|
823
|
+
/*
|
|
824
|
+
* This file is imported into every component that uses MDC!
|
|
825
|
+
*
|
|
826
|
+
* Anything in this file that generates CSS output on its own,
|
|
827
|
+
* without being explicitly used, will output that CSS in every
|
|
828
|
+
* single component, increasing the size of the production build.
|
|
829
|
+
* Avoid that unless there's very good reason for it!
|
|
830
|
+
*/
|
|
831
|
+
:host {
|
|
832
|
+
--mdc-theme-primary: var(
|
|
833
|
+
--lime-primary-color,
|
|
834
|
+
rgb(var(--color-teal-default))
|
|
835
|
+
);
|
|
836
|
+
--mdc-theme-secondary: var(
|
|
837
|
+
--lime-secondary-color,
|
|
838
|
+
rgb(var(--contrast-1100))
|
|
839
|
+
);
|
|
840
|
+
--mdc-theme-on-primary: var(
|
|
841
|
+
--lime-on-primary-color,
|
|
842
|
+
rgb(var(--contrast-100))
|
|
843
|
+
);
|
|
844
|
+
--mdc-theme-on-secondary: var(
|
|
845
|
+
--lime-on-secondary-color,
|
|
846
|
+
rgb(var(--contrast-100))
|
|
847
|
+
);
|
|
848
|
+
--mdc-theme-text-disabled-on-background: var(
|
|
849
|
+
--lime-text-disabled-on-background-color,
|
|
850
|
+
rgba(var(--contrast-1700), 0.38)
|
|
851
|
+
);
|
|
852
|
+
--mdc-theme-text-primary-on-background: var(
|
|
853
|
+
--lime-text-primary-on-background-color,
|
|
854
|
+
rgba(var(--contrast-1700), 0.87)
|
|
855
|
+
);
|
|
856
|
+
--mdc-theme-text-secondary-on-background: var(
|
|
857
|
+
--lime-text-secondary-on-background-color,
|
|
858
|
+
rgba(var(--contrast-1700), 0.54)
|
|
859
|
+
);
|
|
860
|
+
--lime-error-text-color: rgb(var(--color-red-darker));
|
|
861
|
+
--mdc-theme-surface: var(
|
|
862
|
+
--lime-surface-background-color,
|
|
863
|
+
rgb(var(--contrast-100))
|
|
864
|
+
);
|
|
865
|
+
--mdc-theme-on-surface: var(
|
|
866
|
+
--lime-on-surface-color,
|
|
867
|
+
var(--lime-text-primary-on-background-color)
|
|
868
|
+
);
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
.limel-checkbox-helper-line {
|
|
872
|
+
flex-basis: 100%;
|
|
873
|
+
padding-right: 1rem;
|
|
874
|
+
padding-left: 1rem;
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
.limel-checkbox-helper-text {
|
|
878
|
+
font-family: Roboto, sans-serif;
|
|
879
|
+
-moz-osx-font-smoothing: grayscale;
|
|
880
|
+
-webkit-font-smoothing: antialiased;
|
|
881
|
+
font-size: 0.6875rem;
|
|
882
|
+
font-weight: 400;
|
|
883
|
+
letter-spacing: 0.0333333333em;
|
|
884
|
+
text-decoration: inherit;
|
|
885
|
+
text-transform: inherit;
|
|
886
|
+
display: block;
|
|
887
|
+
margin-top: 0;
|
|
888
|
+
line-height: normal;
|
|
889
|
+
margin: 0;
|
|
890
|
+
transition: opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
891
|
+
opacity: 0;
|
|
892
|
+
color: rgba(var(--contrast-1200), 1);
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
.mdc-form-field:hover .limel-checkbox-helper-text, .mdc-form-field:focus .limel-checkbox-helper-text, .mdc-form-field:focus-visible .limel-checkbox-helper-text, .mdc-form-field:focus-within .limel-checkbox-helper-text {
|
|
896
|
+
opacity: 1;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
@media (pointer: coarse) {
|
|
900
|
+
.limel-checkbox-helper-text {
|
|
901
|
+
opacity: 1;
|
|
902
|
+
}
|
|
807
903
|
}
|
|
@@ -5,6 +5,7 @@ import { createRandomString } from '../../util/random-string';
|
|
|
5
5
|
import { CheckboxTemplate } from './checkbox.template';
|
|
6
6
|
/**
|
|
7
7
|
* @exampleComponent limel-example-checkbox
|
|
8
|
+
* @exampleComponent limel-example-checkbox-helper-text
|
|
8
9
|
*/
|
|
9
10
|
export class Checkbox {
|
|
10
11
|
constructor() {
|
|
@@ -51,7 +52,7 @@ export class Checkbox {
|
|
|
51
52
|
(_b = this.formField) === null || _b === void 0 ? void 0 : _b.destroy();
|
|
52
53
|
}
|
|
53
54
|
render() {
|
|
54
|
-
return (h(CheckboxTemplate, { disabled: this.disabled || this.readonly, label: this.label, checked: this.checked, required: this.required, invalid: this.required && this.modified && !this.checked, onChange: this.onChange, id: this.id }));
|
|
55
|
+
return (h(CheckboxTemplate, { disabled: this.disabled || this.readonly, label: this.label, helperText: this.helperText, checked: this.checked, required: this.required, invalid: this.required && this.modified && !this.checked, onChange: this.onChange, id: this.id }));
|
|
55
56
|
}
|
|
56
57
|
onChange(event) {
|
|
57
58
|
event.stopPropagation();
|
|
@@ -120,6 +121,23 @@ export class Checkbox {
|
|
|
120
121
|
"attribute": "label",
|
|
121
122
|
"reflect": true
|
|
122
123
|
},
|
|
124
|
+
"helperText": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"mutable": false,
|
|
127
|
+
"complexType": {
|
|
128
|
+
"original": "string",
|
|
129
|
+
"resolved": "string",
|
|
130
|
+
"references": {}
|
|
131
|
+
},
|
|
132
|
+
"required": false,
|
|
133
|
+
"optional": false,
|
|
134
|
+
"docs": {
|
|
135
|
+
"tags": [],
|
|
136
|
+
"text": "Optional helper text to display below the checkbox"
|
|
137
|
+
},
|
|
138
|
+
"attribute": "helper-text",
|
|
139
|
+
"reflect": true
|
|
140
|
+
},
|
|
123
141
|
"checked": {
|
|
124
142
|
"type": "boolean",
|
|
125
143
|
"mutable": false,
|
|
@@ -17,5 +17,13 @@ export const CheckboxTemplate = (props) => {
|
|
|
17
17
|
'mdc-checkbox--invalid': props.invalid,
|
|
18
18
|
'mdc-checkbox--disabled': props.disabled,
|
|
19
19
|
'mdc-checkbox--required': props.required,
|
|
20
|
-
}, htmlFor: props.id }, props.label)
|
|
20
|
+
}, htmlFor: props.id }, props.label),
|
|
21
|
+
h(HelperText, { text: props.helperText })));
|
|
22
|
+
};
|
|
23
|
+
const HelperText = (props) => {
|
|
24
|
+
if (typeof props.text !== 'string') {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
return (h("div", { class: "limel-checkbox-helper-line" },
|
|
28
|
+
h("p", { class: "limel-checkbox-helper-text", "aria-hidden": "true" }, props.text.trim())));
|
|
21
29
|
};
|
|
@@ -2622,4 +2622,18 @@ limel-icon.mdc-chip__icon.mdc-chip__icon--leading {
|
|
|
2622
2622
|
}
|
|
2623
2623
|
:host(.is-file-picker.shows-dropzone) .mdc-text-field:not(.has-chips):not(.lime-text-field--readonly) .mdc-notched-outline .mdc-notched-outline__notch {
|
|
2624
2624
|
max-width: 40%;
|
|
2625
|
+
}
|
|
2626
|
+
|
|
2627
|
+
.mdc-text-field-helper-line {
|
|
2628
|
+
flex-basis: 100%;
|
|
2629
|
+
}
|
|
2630
|
+
|
|
2631
|
+
:host(:not([type=input])) .mdc-chip-set:hover .mdc-text-field-helper-text, :host(:not([type=input])) .mdc-chip-set:focus .mdc-text-field-helper-text, :host(:not([type=input])) .mdc-chip-set:focus-visible .mdc-text-field-helper-text, :host(:not([type=input])) .mdc-chip-set:focus-within .mdc-text-field-helper-text {
|
|
2632
|
+
opacity: 1;
|
|
2633
|
+
}
|
|
2634
|
+
|
|
2635
|
+
@media (pointer: coarse) {
|
|
2636
|
+
:host(:not([type=input])) .mdc-chip-set .mdc-text-field-helper-text {
|
|
2637
|
+
opacity: 1;
|
|
2638
|
+
}
|
|
2625
2639
|
}
|
|
@@ -66,6 +66,25 @@ export class ChipSet {
|
|
|
66
66
|
this.dropZoneTip = () => {
|
|
67
67
|
return translate.get('file.drag-and-drop-tips', this.language);
|
|
68
68
|
};
|
|
69
|
+
this.renderHelperLine = () => {
|
|
70
|
+
if (!this.hasHelperText()) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
return (h("div", { tabIndex: -1, class: "mdc-text-field-helper-line" }, this.renderHelperText()));
|
|
74
|
+
};
|
|
75
|
+
this.renderHelperText = () => {
|
|
76
|
+
if (!this.hasHelperText()) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
const classList = {
|
|
80
|
+
'mdc-text-field-helper-text': true,
|
|
81
|
+
'mdc-text-field-helper-text--validation-msg': this.isInvalid(),
|
|
82
|
+
};
|
|
83
|
+
return h("p", { class: classList }, this.helperText);
|
|
84
|
+
};
|
|
85
|
+
this.hasHelperText = () => {
|
|
86
|
+
return this.helperText !== null && this.helperText !== undefined;
|
|
87
|
+
};
|
|
69
88
|
this.clearAllChipsLabel = () => {
|
|
70
89
|
return translate.get('chip-set.clear-all', this.language);
|
|
71
90
|
};
|
|
@@ -161,7 +180,8 @@ export class ChipSet {
|
|
|
161
180
|
}
|
|
162
181
|
return (h("div", { class: classes, role: "grid" },
|
|
163
182
|
chipSetLabel,
|
|
164
|
-
this.value.map(this.renderChip)
|
|
183
|
+
this.value.map(this.renderChip),
|
|
184
|
+
this.renderHelperLine()));
|
|
165
185
|
}
|
|
166
186
|
handleChangeChips() {
|
|
167
187
|
this.syncEmptyInput();
|
|
@@ -189,41 +209,44 @@ export class ChipSet {
|
|
|
189
209
|
return (h("label", { class: "chip-set__label mdc-floating-label mdc-floating-label--float-above" }, this.label));
|
|
190
210
|
}
|
|
191
211
|
renderInputChips() {
|
|
192
|
-
return
|
|
193
|
-
'mdc-text-field mdc-text-field--outlined': true,
|
|
194
|
-
'mdc-chip-set mdc-chip-set--input': true,
|
|
195
|
-
'force-invalid': this.isInvalid(),
|
|
196
|
-
'mdc-text-field--disabled': this.readonly || this.disabled,
|
|
197
|
-
'lime-text-field--readonly': this.readonly,
|
|
198
|
-
'has-chips mdc-text-field--label-floating': this.value.length !== 0,
|
|
199
|
-
'has-leading-icon': this.leadingIcon !== null,
|
|
200
|
-
'has-clear-all-button': this.clearAllButton,
|
|
201
|
-
}, onClick: this.handleTextFieldFocus },
|
|
202
|
-
this.value.map(this.renderInputChip),
|
|
203
|
-
h("input", { tabIndex: INPUT_FIELD_TABINDEX, type: "text", id: "input-element", disabled: this.readonly || this.disabled, class: {
|
|
204
|
-
'mdc-text-field__input': true,
|
|
205
|
-
hidden: this.inputHidden(),
|
|
206
|
-
}, value: this.textValue, onBlur: this.handleInputBlur, onFocus: this.handleTextFieldFocus, onKeyDown: this.handleKeyDown, onInput: this.handleTextInput,
|
|
207
|
-
// Some browsers emit a change event on input elements, we need to stop
|
|
208
|
-
// that event from propagating since we are emitting our own change event
|
|
209
|
-
onChange: this.inputFieldOnChange, placeholder: this.isFull() ? '' : this.searchLabel, readonly: this.isFull() }),
|
|
212
|
+
return [
|
|
210
213
|
h("div", { class: {
|
|
211
|
-
'mdc-
|
|
212
|
-
'mdc-
|
|
213
|
-
'
|
|
214
|
-
'
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
214
|
+
'mdc-text-field mdc-text-field--outlined': true,
|
|
215
|
+
'mdc-chip-set mdc-chip-set--input': true,
|
|
216
|
+
'force-invalid': this.isInvalid(),
|
|
217
|
+
'mdc-text-field--disabled': this.readonly || this.disabled,
|
|
218
|
+
'lime-text-field--readonly': this.readonly,
|
|
219
|
+
'has-chips mdc-text-field--label-floating': this.value.length !== 0,
|
|
220
|
+
'has-leading-icon': this.leadingIcon !== null,
|
|
221
|
+
'has-clear-all-button': this.clearAllButton,
|
|
222
|
+
}, onClick: this.handleTextFieldFocus },
|
|
223
|
+
this.value.map(this.renderInputChip),
|
|
224
|
+
h("input", { tabIndex: INPUT_FIELD_TABINDEX, type: "text", id: "input-element", disabled: this.readonly || this.disabled, class: {
|
|
225
|
+
'mdc-text-field__input': true,
|
|
226
|
+
hidden: this.inputHidden(),
|
|
227
|
+
}, value: this.textValue, onBlur: this.handleInputBlur, onFocus: this.handleTextFieldFocus, onKeyDown: this.handleKeyDown, onInput: this.handleTextInput,
|
|
228
|
+
// Some browsers emit a change event on input elements, we need to stop
|
|
229
|
+
// that event from propagating since we are emitting our own change event
|
|
230
|
+
onChange: this.inputFieldOnChange, placeholder: this.isFull() ? '' : this.searchLabel, readonly: this.isFull() }),
|
|
231
|
+
h("div", { class: {
|
|
232
|
+
'mdc-notched-outline': true,
|
|
233
|
+
'mdc-notched-outline--upgraded': true,
|
|
234
|
+
'mdc-text-field--required': this.required,
|
|
235
|
+
'lime-notched-outline--notched': !!(this.value.length || this.editMode),
|
|
236
|
+
}, "dropzone-tip": this.dropZoneTip() },
|
|
237
|
+
h("div", { class: "mdc-notched-outline__leading" }),
|
|
238
|
+
h("div", { class: "mdc-notched-outline__notch" },
|
|
239
|
+
h("label", { class: {
|
|
240
|
+
'mdc-floating-label': true,
|
|
241
|
+
'mdc-text-field--disabled': this.readonly || this.disabled,
|
|
242
|
+
'mdc-floating-label--required': this.required,
|
|
243
|
+
'lime-floating-label--float-above': !!(this.value.length || this.editMode),
|
|
244
|
+
}, htmlFor: "input-element" }, this.label)),
|
|
245
|
+
h("div", { class: "mdc-notched-outline__trailing" })),
|
|
246
|
+
this.renderLeadingIcon(),
|
|
247
|
+
this.renderClearAllChipsButton()),
|
|
248
|
+
this.renderHelperLine(),
|
|
249
|
+
];
|
|
227
250
|
}
|
|
228
251
|
isFull() {
|
|
229
252
|
return !!this.maxItems && this.value.length >= this.maxItems;
|
|
@@ -477,6 +500,23 @@ export class ChipSet {
|
|
|
477
500
|
"attribute": "label",
|
|
478
501
|
"reflect": true
|
|
479
502
|
},
|
|
503
|
+
"helperText": {
|
|
504
|
+
"type": "string",
|
|
505
|
+
"mutable": false,
|
|
506
|
+
"complexType": {
|
|
507
|
+
"original": "string",
|
|
508
|
+
"resolved": "string",
|
|
509
|
+
"references": {}
|
|
510
|
+
},
|
|
511
|
+
"required": false,
|
|
512
|
+
"optional": false,
|
|
513
|
+
"docs": {
|
|
514
|
+
"tags": [],
|
|
515
|
+
"text": "Optional helper text to display below the chipset.\nWhen type is `input`, the helper text is displayed below the\ninput field when it has focus.\nWhen type is not `input`, the helper text is always displayed\nif the device is touch screen; otherwise it is shown when chip-set\nis hovered or focused using keyboard navigation."
|
|
516
|
+
},
|
|
517
|
+
"attribute": "helper-text",
|
|
518
|
+
"reflect": true
|
|
519
|
+
},
|
|
480
520
|
"disabled": {
|
|
481
521
|
"type": "boolean",
|
|
482
522
|
"mutable": false,
|
|
@@ -348,6 +348,9 @@ div.CodeMirror-dragcursors {
|
|
|
348
348
|
/* Help users use markselection to safely style text background */
|
|
349
349
|
span.CodeMirror-selectedtext { background: none; }
|
|
350
350
|
|
|
351
|
+
/**
|
|
352
|
+
* @prop --code-editor-max-height: Defines how tall the code editor can get before content becomes scrollable, defaults to `10rem`.
|
|
353
|
+
*/
|
|
351
354
|
:host {
|
|
352
355
|
display: flex;
|
|
353
356
|
font-size: 1rem;
|
|
@@ -478,6 +481,10 @@ span.CodeMirror-selectedtext { background: none; }
|
|
|
478
481
|
color: rgb(var(--code-editor-neutral-text-color));
|
|
479
482
|
background-color: rgb(var(--code-editor-background-color));
|
|
480
483
|
border-radius: 0.25rem;
|
|
484
|
+
height: auto;
|
|
485
|
+
}
|
|
486
|
+
.cm-s-lime .CodeMirror-scroll {
|
|
487
|
+
max-height: var(--code-editor-max-height, 10rem);
|
|
481
488
|
}
|
|
482
489
|
.cm-s-lime.CodeMirror-focused div.CodeMirror-selected {
|
|
483
490
|
background: rgba(var(--code-editor-selection-highlight-color), 0.15);
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
.color-palette {
|
|
8
8
|
display: grid;
|
|
9
|
-
|
|
9
|
+
gap: 0.25rem;
|
|
10
10
|
grid-auto-flow: column;
|
|
11
11
|
margin: 0.75rem auto 1.25rem auto;
|
|
12
12
|
padding: 1.25rem 0.75rem;
|
|
@@ -1089,6 +1089,43 @@
|
|
|
1089
1089
|
* Nothing in this file may output any CSS
|
|
1090
1090
|
* without being explicitly called by outside code.
|
|
1091
1091
|
*/
|
|
1092
|
+
.picker-trigger[style="--background:lime-magenta;"]:after,
|
|
1093
|
+
.chosen-color-preview[style="--background:lime-magenta;"]:after {
|
|
1094
|
+
background-color: var(--lime-magenta);
|
|
1095
|
+
}
|
|
1096
|
+
.picker-trigger[style="--background:lime-blue;"]:after,
|
|
1097
|
+
.chosen-color-preview[style="--background:lime-blue;"]:after {
|
|
1098
|
+
background-color: var(--lime-blue);
|
|
1099
|
+
}
|
|
1100
|
+
.picker-trigger[style="--background:lime-orange;"]:after,
|
|
1101
|
+
.chosen-color-preview[style="--background:lime-orange;"]:after {
|
|
1102
|
+
background-color: var(--lime-orange);
|
|
1103
|
+
}
|
|
1104
|
+
.picker-trigger[style="--background:lime-green;"]:after,
|
|
1105
|
+
.chosen-color-preview[style="--background:lime-green;"]:after {
|
|
1106
|
+
background-color: var(--lime-green);
|
|
1107
|
+
}
|
|
1108
|
+
.picker-trigger[style="--background:lime-red;"]:after,
|
|
1109
|
+
.chosen-color-preview[style="--background:lime-red;"]:after {
|
|
1110
|
+
background-color: var(--lime-red);
|
|
1111
|
+
}
|
|
1112
|
+
.picker-trigger[style="--background:lime-dark-blue;"]:after,
|
|
1113
|
+
.chosen-color-preview[style="--background:lime-dark-blue;"]:after {
|
|
1114
|
+
background-color: var(--lime-dark-blue);
|
|
1115
|
+
}
|
|
1116
|
+
.picker-trigger[style="--background:lime-turquoise;"]:after,
|
|
1117
|
+
.chosen-color-preview[style="--background:lime-turquoise;"]:after {
|
|
1118
|
+
background-color: var(--lime-turquoise);
|
|
1119
|
+
}
|
|
1120
|
+
.picker-trigger[style="--background:lime-yellow;"]:after,
|
|
1121
|
+
.chosen-color-preview[style="--background:lime-yellow;"]:after {
|
|
1122
|
+
background-color: var(--lime-yellow);
|
|
1123
|
+
}
|
|
1124
|
+
.picker-trigger[style="--background:lime-light-grey;"]:after,
|
|
1125
|
+
.chosen-color-preview[style="--background:lime-light-grey;"]:after {
|
|
1126
|
+
background-color: var(--lime-light-grey);
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1092
1129
|
:host {
|
|
1093
1130
|
--popover-surface-width: 50rem;
|
|
1094
1131
|
--color-picker-default-background: url("data:image/svg+xml;charset=utf-8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' style='fill-rule:evenodd;'><path fill-opacity='0.1' d='M0 0h4v4H0zM4 4h4v4H4z'/></svg>");
|
|
@@ -4,6 +4,43 @@
|
|
|
4
4
|
* Nothing in this file may output any CSS
|
|
5
5
|
* without being explicitly called by outside code.
|
|
6
6
|
*/
|
|
7
|
+
.picker-trigger[style="--background:lime-magenta;"]:after,
|
|
8
|
+
.chosen-color-preview[style="--background:lime-magenta;"]:after {
|
|
9
|
+
background-color: var(--lime-magenta);
|
|
10
|
+
}
|
|
11
|
+
.picker-trigger[style="--background:lime-blue;"]:after,
|
|
12
|
+
.chosen-color-preview[style="--background:lime-blue;"]:after {
|
|
13
|
+
background-color: var(--lime-blue);
|
|
14
|
+
}
|
|
15
|
+
.picker-trigger[style="--background:lime-orange;"]:after,
|
|
16
|
+
.chosen-color-preview[style="--background:lime-orange;"]:after {
|
|
17
|
+
background-color: var(--lime-orange);
|
|
18
|
+
}
|
|
19
|
+
.picker-trigger[style="--background:lime-green;"]:after,
|
|
20
|
+
.chosen-color-preview[style="--background:lime-green;"]:after {
|
|
21
|
+
background-color: var(--lime-green);
|
|
22
|
+
}
|
|
23
|
+
.picker-trigger[style="--background:lime-red;"]:after,
|
|
24
|
+
.chosen-color-preview[style="--background:lime-red;"]:after {
|
|
25
|
+
background-color: var(--lime-red);
|
|
26
|
+
}
|
|
27
|
+
.picker-trigger[style="--background:lime-dark-blue;"]:after,
|
|
28
|
+
.chosen-color-preview[style="--background:lime-dark-blue;"]:after {
|
|
29
|
+
background-color: var(--lime-dark-blue);
|
|
30
|
+
}
|
|
31
|
+
.picker-trigger[style="--background:lime-turquoise;"]:after,
|
|
32
|
+
.chosen-color-preview[style="--background:lime-turquoise;"]:after {
|
|
33
|
+
background-color: var(--lime-turquoise);
|
|
34
|
+
}
|
|
35
|
+
.picker-trigger[style="--background:lime-yellow;"]:after,
|
|
36
|
+
.chosen-color-preview[style="--background:lime-yellow;"]:after {
|
|
37
|
+
background-color: var(--lime-yellow);
|
|
38
|
+
}
|
|
39
|
+
.picker-trigger[style="--background:lime-light-grey;"]:after,
|
|
40
|
+
.chosen-color-preview[style="--background:lime-light-grey;"]:after {
|
|
41
|
+
background-color: var(--lime-light-grey);
|
|
42
|
+
}
|
|
43
|
+
|
|
7
44
|
:host {
|
|
8
45
|
--popover-surface-width: 50rem;
|
|
9
46
|
--color-picker-default-background: url("data:image/svg+xml;charset=utf-8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' style='fill-rule:evenodd;'><path fill-opacity='0.1' d='M0 0h4v4H0zM4 4h4v4H4z'/></svg>");
|
|
@@ -18,7 +18,7 @@ export class ColorPicker {
|
|
|
18
18
|
constructor() {
|
|
19
19
|
this.isOpen = false;
|
|
20
20
|
this.renderTooltip = () => {
|
|
21
|
-
if (!this.readonly) {
|
|
21
|
+
if (!this.readonly && this.tooltipLabel) {
|
|
22
22
|
return (h("limel-tooltip", { label: this.tooltipLabel, elementId: "tooltip-button" }));
|
|
23
23
|
}
|
|
24
24
|
};
|
|
@@ -115,7 +115,7 @@ export class File {
|
|
|
115
115
|
'is-file-picker': true,
|
|
116
116
|
'shows-dropzone': true,
|
|
117
117
|
'highlight-dropzone': this.isDraggingOverDropZone,
|
|
118
|
-
}, disabled: this.disabled, readonly: this.readonly, label: this.label, leadingIcon: "upload_to_cloud", onChange: this.handleChipSetChange, onClick: this.handleFileSelection, onInteract: this.handleChipInteract, onKeyDown: this.handleKeyDown, onKeyUp: this.handleKeyUp, required: this.required, type: "input", value: this.chipArray, title: this.getTranslation('drag-and-drop-tips'), onDragEnter: this.handleDragEnter, onDragOver: this.preventAndStop, onDragLeave: this.handleDragLeave, onDrop: this.handleFileDrop }),
|
|
118
|
+
}, disabled: this.disabled, readonly: this.readonly, label: this.label, leadingIcon: "upload_to_cloud", language: this.language, onChange: this.handleChipSetChange, onClick: this.handleFileSelection, onInteract: this.handleChipInteract, onKeyDown: this.handleKeyDown, onKeyUp: this.handleKeyUp, required: this.required, type: "input", value: this.chipArray, title: this.getTranslation('drag-and-drop-tips'), onDragEnter: this.handleDragEnter, onDragOver: this.preventAndStop, onDragLeave: this.handleDragLeave, onDrop: this.handleFileDrop }),
|
|
119
119
|
];
|
|
120
120
|
}
|
|
121
121
|
get chipArray() {
|