@limetech/lime-elements 34.2.0-next.6 → 35.0.0-next.12
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-b7b0460f.js +41 -0
- package/dist/cjs/lime-elements.cjs.js +2 -2
- package/dist/cjs/limel-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/limel-form.cjs.entry.js +330 -352
- package/dist/cjs/limel-input-field.cjs.entry.js +1 -1
- package/dist/cjs/limel-list_3.cjs.entry.js +129 -74
- package/dist/cjs/limel-menu-list.cjs.entry.js +1 -1
- package/dist/cjs/limel-menu.cjs.entry.js +3 -1
- package/dist/cjs/limel-select.cjs.entry.js +1 -1
- package/dist/cjs/limel-slider.cjs.entry.js +1 -1
- package/dist/cjs/limel-tab-bar.cjs.entry.js +1 -1
- package/dist/cjs/limel-table.cjs.entry.js +362 -10
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/checkbox/checkbox.css +1 -3
- package/dist/collection/components/checkbox/checkbox.template.js +22 -20
- package/dist/collection/components/form/templates/common.js +4 -1
- package/dist/collection/components/input-field/input-field.css +14 -0
- package/dist/collection/components/list/list.css +2 -3
- package/dist/collection/components/menu/menu.css +1 -1
- package/dist/collection/components/menu/menu.js +3 -1
- package/dist/collection/components/menu-list/menu-list.css +2 -3
- package/dist/collection/components/menu-surface/menu-surface.css +9 -1
- package/dist/collection/components/select/select.css +6 -3
- package/dist/collection/components/slider/slider.css +5 -0
- package/dist/collection/components/tab-bar/tab-bar.css +5 -4
- package/dist/collection/components/table/columns.js +1 -1
- package/dist/collection/components/table/selection.js +111 -0
- package/dist/collection/components/table/table-selection.js +125 -0
- package/dist/collection/components/table/table.css +115 -32
- package/dist/collection/components/table/table.js +212 -7
- package/dist/collection/style/internal/lime-theme.scss +30 -31
- package/dist/collection/style/internal/lime-typography.scss +55 -56
- package/dist/collection/style/internal/shared_input-select-picker.scss +1 -0
- package/dist/collection/style/internal/z-index.scss +2 -1
- package/dist/esm/checkbox.template-b4bacc2e.js +39 -0
- package/dist/esm/{component-2eb4e07b.js → component-834d85a1.js} +1 -1
- package/dist/esm/lime-elements.js +2 -2
- package/dist/esm/limel-checkbox.entry.js +3 -3
- package/dist/esm/limel-form.entry.js +330 -352
- package/dist/esm/limel-input-field.entry.js +1 -1
- package/dist/esm/limel-linear-progress.entry.js +1 -1
- package/dist/esm/limel-list_3.entry.js +131 -76
- package/dist/esm/limel-menu-list.entry.js +3 -3
- package/dist/esm/limel-menu.entry.js +3 -1
- package/dist/esm/limel-select.entry.js +1 -1
- package/dist/esm/limel-slider.entry.js +2 -2
- package/dist/esm/limel-tab-bar.entry.js +1 -1
- package/dist/esm/limel-table.entry.js +362 -10
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{util-71a23335.js → util-f1bde91c.js} +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/p-22c60ff3.js +1 -0
- package/dist/lime-elements/{p-1652d3ca.entry.js → p-24d97176.entry.js} +1 -1
- package/dist/lime-elements/{p-13f0e4f4.entry.js → p-268cf1fa.entry.js} +1 -1
- package/dist/lime-elements/{p-6215e45e.entry.js → p-29f054cc.entry.js} +1 -1
- package/dist/lime-elements/{p-511d71e0.entry.js → p-714fde78.entry.js} +1 -1
- package/dist/lime-elements/{p-bc0dcf01.entry.js → p-84689828.entry.js} +4 -4
- package/dist/lime-elements/{p-31299106.js → p-90c6fa15.js} +1 -1
- package/dist/lime-elements/{p-152a6d5f.js → p-9faad6eb.js} +1 -1
- package/dist/lime-elements/p-ad04a4d4.entry.js +16 -0
- package/dist/lime-elements/{p-a77cbb08.entry.js → p-ca664c9f.entry.js} +1 -1
- package/dist/lime-elements/{p-050e8972.entry.js → p-d8167c28.entry.js} +2 -2
- package/dist/lime-elements/{p-f2c706b8.entry.js → p-dcc52d92.entry.js} +1 -1
- package/dist/lime-elements/{p-b5faa40d.entry.js → p-df8faeb4.entry.js} +2 -2
- package/dist/lime-elements/{p-64549ba6.entry.js → p-e275f502.entry.js} +2 -2
- package/dist/lime-elements/style/internal/lime-theme.scss +30 -31
- package/dist/lime-elements/style/internal/lime-typography.scss +55 -56
- package/dist/lime-elements/style/internal/shared_input-select-picker.scss +1 -0
- package/dist/lime-elements/style/internal/z-index.scss +2 -1
- package/dist/types/components/table/columns.d.ts +7 -0
- package/dist/types/components/table/selection.d.ts +79 -0
- package/dist/types/components/table/table-selection.d.ts +57 -0
- package/dist/types/components/table/table.d.ts +39 -7
- package/dist/types/components/table/table.types.d.ts +13 -0
- package/dist/types/components.d.ts +33 -1
- package/dist/types/stencil-public-runtime.d.ts +6 -4
- package/package.json +14 -14
- package/dist/cjs/checkbox.template-50eb8b76.js +0 -39
- package/dist/esm/checkbox.template-50f7c07b.js +0 -37
- package/dist/lime-elements/p-250f55be.js +0 -1
- package/dist/lime-elements/p-d93a3b07.entry.js +0 -16
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-e63a89d7.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Esm v2.
|
|
8
|
+
Stencil Client Patch Esm v2.13.0 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
const patchEsm = () => {
|
|
11
11
|
return index.promiseResolve();
|
|
@@ -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"],"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-
|
|
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-checkbox.cjs",[[1,"limel-checkbox",{"disabled":[516],"readonly":[516],"label":[513],"helperText":[513,"helper-text"],"checked":[516],"indeterminate":[516],"required":[516],"modified":[32]}]]],["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"],"aggregates":[16],"selectable":[4],"selection":[16]}]]],["limel-banner.cjs",[[1,"limel-banner",{"message":[513],"icon":[513],"isOpen":[32],"open":[64],"close":[64]}]]],["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",{"elementId":[513,"element-id"],"label":[513],"helperLabel":[513,"helper-label"],"maxlength":[514],"open":[32]}],[1,"limel-tooltip-content",{"label":[513],"helperLabel":[513,"helper-label"],"maxlength":[514]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -762,7 +762,6 @@
|
|
|
762
762
|
|
|
763
763
|
.mdc-form-field {
|
|
764
764
|
display: flex;
|
|
765
|
-
flex-wrap: wrap;
|
|
766
765
|
}
|
|
767
766
|
.mdc-form-field .mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate) ~ .mdc-checkbox__background, .mdc-form-field .mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate) ~ .mdc-checkbox__background {
|
|
768
767
|
background-color: rgb(var(--contrast-300));
|
|
@@ -880,8 +879,7 @@
|
|
|
880
879
|
opacity: 0;
|
|
881
880
|
color: rgba(var(--contrast-1200), 1);
|
|
882
881
|
}
|
|
883
|
-
|
|
884
|
-
.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 {
|
|
882
|
+
:host(:hover) .limel-checkbox-helper-text, :host(:focus) .limel-checkbox-helper-text, :host(:focus-within) .limel-checkbox-helper-text {
|
|
885
883
|
opacity: 1;
|
|
886
884
|
}
|
|
887
885
|
|
|
@@ -4,26 +4,28 @@ export const CheckboxTemplate = (props) => {
|
|
|
4
4
|
if (props.indeterminate) {
|
|
5
5
|
inputProps['data-indeterminate'] = 'true';
|
|
6
6
|
}
|
|
7
|
-
return
|
|
8
|
-
h("div", { class:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
h("
|
|
18
|
-
h("
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
7
|
+
return [
|
|
8
|
+
h("div", { class: "mdc-form-field " },
|
|
9
|
+
h("div", { class: {
|
|
10
|
+
'mdc-checkbox': true,
|
|
11
|
+
'mdc-checkbox--invalid': props.invalid,
|
|
12
|
+
'mdc-checkbox--disabled': props.disabled,
|
|
13
|
+
'mdc-checkbox--required': props.required,
|
|
14
|
+
'mdc-checkbox--indeterminate': props.indeterminate,
|
|
15
|
+
} },
|
|
16
|
+
h("input", Object.assign({ type: "checkbox", class: "mdc-checkbox__native-control", id: props.id, checked: props.checked, disabled: props.disabled, required: props.required, onChange: props.onChange }, inputProps)),
|
|
17
|
+
h("div", { class: "mdc-checkbox__background" },
|
|
18
|
+
h("svg", { class: "mdc-checkbox__checkmark", viewBox: "0 0 24 24" },
|
|
19
|
+
h("path", { class: "mdc-checkbox__checkmark-path", fill: "none", d: "M1.73,12.91 8.1,19.28 22.79,4.59" })),
|
|
20
|
+
h("div", { class: "mdc-checkbox__mixedmark" }))),
|
|
21
|
+
h("label", { class: {
|
|
22
|
+
'mdc-checkbox--invalid': props.invalid,
|
|
23
|
+
'mdc-checkbox--disabled': props.disabled,
|
|
24
|
+
'mdc-checkbox--required': props.required,
|
|
25
|
+
'mdc-checkbox--indeterminate': props.indeterminate,
|
|
26
|
+
}, htmlFor: props.id }, props.label)),
|
|
27
|
+
h(HelperText, { text: props.helperText }),
|
|
28
|
+
];
|
|
27
29
|
};
|
|
28
30
|
const HelperText = (props) => {
|
|
29
31
|
if (typeof props.text !== 'string') {
|
|
@@ -59,7 +59,10 @@ function findFirstEntry(data, subSchema) {
|
|
|
59
59
|
getRequiredEntry(data, subSchema),
|
|
60
60
|
...Object.entries(data),
|
|
61
61
|
];
|
|
62
|
-
return entries.filter((
|
|
62
|
+
return entries.filter((entry) => {
|
|
63
|
+
const value = entry[1];
|
|
64
|
+
return !!value && typeof value !== 'boolean';
|
|
65
|
+
})[0];
|
|
63
66
|
}
|
|
64
67
|
function getRequiredEntry(data, subSchema) {
|
|
65
68
|
if (!('required' in subSchema)) {
|
|
@@ -1791,6 +1791,19 @@
|
|
|
1791
1791
|
color: var(--lime-error-text-color);
|
|
1792
1792
|
}
|
|
1793
1793
|
|
|
1794
|
+
.mdc-text-field:not(.mdc-text-field--disabled) .mdc-floating-label {
|
|
1795
|
+
color: rgba(var(--contrast-1200), 1);
|
|
1796
|
+
}
|
|
1797
|
+
.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input {
|
|
1798
|
+
color: rgba(var(--contrast-1400), 1);
|
|
1799
|
+
}
|
|
1800
|
+
.mdc-text-field.mdc-text-field--disabled .mdc-floating-label {
|
|
1801
|
+
color: rgba(var(--contrast-1200), 0.5);
|
|
1802
|
+
}
|
|
1803
|
+
.mdc-text-field.mdc-text-field--disabled .mdc-text-field__input {
|
|
1804
|
+
color: rgba(var(--contrast-1400), 0.5);
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1794
1807
|
.mdc-text-field--with-trailing-icon .mdc-text-field__icon--trailing, .mdc-text-field--with-trailing-icon a.lime-trailing-icon-for-link {
|
|
1795
1808
|
margin-right: 0.5rem;
|
|
1796
1809
|
}
|
|
@@ -1809,6 +1822,7 @@
|
|
|
1809
1822
|
line-height: 1.75rem;
|
|
1810
1823
|
-moz-osx-font-smoothing: grayscale;
|
|
1811
1824
|
-webkit-font-smoothing: antialiased;
|
|
1825
|
+
color: rgba(var(--contrast-1400), 1);
|
|
1812
1826
|
font-size: 0.875rem;
|
|
1813
1827
|
font-weight: 400;
|
|
1814
1828
|
letter-spacing: 0.009375em;
|
|
@@ -3057,6 +3057,7 @@ a.mdc-list-item {
|
|
|
3057
3057
|
--icon-color,
|
|
3058
3058
|
rgb(var(--contrast-900))
|
|
3059
3059
|
);
|
|
3060
|
+
margin: 0.25rem;
|
|
3060
3061
|
padding: 0;
|
|
3061
3062
|
border-radius: 0.375rem;
|
|
3062
3063
|
}
|
|
@@ -4028,7 +4029,6 @@ a.mdc-list-item {
|
|
|
4028
4029
|
|
|
4029
4030
|
.mdc-form-field {
|
|
4030
4031
|
display: flex;
|
|
4031
|
-
flex-wrap: wrap;
|
|
4032
4032
|
}
|
|
4033
4033
|
.mdc-form-field .mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate) ~ .mdc-checkbox__background, .mdc-form-field .mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate) ~ .mdc-checkbox__background {
|
|
4034
4034
|
background-color: rgb(var(--contrast-300));
|
|
@@ -4146,8 +4146,7 @@ a.mdc-list-item {
|
|
|
4146
4146
|
opacity: 0;
|
|
4147
4147
|
color: rgba(var(--contrast-1200), 1);
|
|
4148
4148
|
}
|
|
4149
|
-
|
|
4150
|
-
.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 {
|
|
4149
|
+
:host(:hover) .limel-checkbox-helper-text, :host(:focus) .limel-checkbox-helper-text, :host(:focus-within) .limel-checkbox-helper-text {
|
|
4151
4150
|
opacity: 1;
|
|
4152
4151
|
}
|
|
4153
4152
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
/**
|
|
8
8
|
* @prop --dropdown-z-index: `z-index` of the dropdown menu.
|
|
9
|
-
* @prop --menu-surface-width: Width of the menu surface.
|
|
9
|
+
* @prop --menu-surface-width: Width of the menu surface.
|
|
10
10
|
* @prop --list-grid-item-max-width: Maximum width of items in the menu list when `gridLayout={true}`. Defaults to `10rem`.
|
|
11
11
|
* @prop --list-grid-item-min-width: Minimum width of items in the menu list when `gridLayout={true}`. Defaults to `7.5rem`.
|
|
12
12
|
* @prop --list-grid-gap: Distance between the items in the menu list when `gridLayout={true}`. Defaults to `0.75rem`.
|
|
@@ -112,7 +112,9 @@ export class Menu {
|
|
|
112
112
|
return (h("div", { class: "mdc-menu-surface--anchor", onClick: this.onTriggerClick },
|
|
113
113
|
h("slot", { name: "trigger" }),
|
|
114
114
|
h("limel-portal", { visible: this.open, containerId: this.portalId, openDirection: this.openDirection, position: "absolute", containerStyle: { 'z-index': dropdownZIndex } },
|
|
115
|
-
h("limel-menu-surface", { open: this.open, onDismiss: this.onClose, style: cssProperties
|
|
115
|
+
h("limel-menu-surface", { open: this.open, onDismiss: this.onClose, style: cssProperties, class: {
|
|
116
|
+
'has-grid-layout': this.gridLayout,
|
|
117
|
+
} },
|
|
116
118
|
h("limel-menu-list", { class: {
|
|
117
119
|
'has-grid-layout has-interactive-items': this.gridLayout,
|
|
118
120
|
}, items: this.items, type: "menu", badgeIcons: this.badgeIcons, onChange: this.onListChange, ref: this.setListElement })))));
|
|
@@ -3063,6 +3063,7 @@ a.mdc-list-item {
|
|
|
3063
3063
|
--icon-color,
|
|
3064
3064
|
rgb(var(--contrast-900))
|
|
3065
3065
|
);
|
|
3066
|
+
margin: 0.25rem;
|
|
3066
3067
|
padding: 0;
|
|
3067
3068
|
border-radius: 0.375rem;
|
|
3068
3069
|
}
|
|
@@ -4034,7 +4035,6 @@ a.mdc-list-item {
|
|
|
4034
4035
|
|
|
4035
4036
|
.mdc-form-field {
|
|
4036
4037
|
display: flex;
|
|
4037
|
-
flex-wrap: wrap;
|
|
4038
4038
|
}
|
|
4039
4039
|
.mdc-form-field .mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate) ~ .mdc-checkbox__background, .mdc-form-field .mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate) ~ .mdc-checkbox__background {
|
|
4040
4040
|
background-color: rgb(var(--contrast-300));
|
|
@@ -4152,8 +4152,7 @@ a.mdc-list-item {
|
|
|
4152
4152
|
opacity: 0;
|
|
4153
4153
|
color: rgba(var(--contrast-1200), 1);
|
|
4154
4154
|
}
|
|
4155
|
-
|
|
4156
|
-
.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 {
|
|
4155
|
+
:host(:hover) .limel-checkbox-helper-text, :host(:focus) .limel-checkbox-helper-text, :host(:focus-within) .limel-checkbox-helper-text {
|
|
4157
4156
|
opacity: 1;
|
|
4158
4157
|
}
|
|
4159
4158
|
|
|
@@ -190,7 +190,15 @@
|
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
.mdc-menu-surface {
|
|
193
|
-
width: var(--menu-surface-width, auto);
|
|
194
193
|
max-height: 100%;
|
|
195
194
|
position: relative;
|
|
195
|
+
--mdc-menu-max-width: var(
|
|
196
|
+
--menu-surface-width,
|
|
197
|
+
min(calc(100vw - 2rem), 20rem)
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
:host(limel-menu-surface.has-grid-layout) .mdc-menu-surface {
|
|
202
|
+
width: var(--menu-surface-width, min(calc(100vw - 2rem), 40rem));
|
|
203
|
+
max-width: unset;
|
|
196
204
|
}
|
|
@@ -1338,6 +1338,11 @@
|
|
|
1338
1338
|
}
|
|
1339
1339
|
|
|
1340
1340
|
.limel-select__selected-option__text {
|
|
1341
|
+
overflow: hidden;
|
|
1342
|
+
white-space: nowrap;
|
|
1343
|
+
text-overflow: ellipsis;
|
|
1344
|
+
}
|
|
1345
|
+
.mdc-select:not(.mdc-select--disabled) .limel-select__selected-option__text {
|
|
1341
1346
|
font-family: Roboto, sans-serif;
|
|
1342
1347
|
line-height: 1.75rem;
|
|
1343
1348
|
-moz-osx-font-smoothing: grayscale;
|
|
@@ -1346,9 +1351,6 @@
|
|
|
1346
1351
|
font-weight: 400;
|
|
1347
1352
|
letter-spacing: 0.009375em;
|
|
1348
1353
|
color: rgba(var(--contrast-1200), 1);
|
|
1349
|
-
overflow: hidden;
|
|
1350
|
-
white-space: nowrap;
|
|
1351
|
-
text-overflow: ellipsis;
|
|
1352
1354
|
}
|
|
1353
1355
|
|
|
1354
1356
|
.limel-select {
|
|
@@ -1372,6 +1374,7 @@
|
|
|
1372
1374
|
box-shadow: var(--shadow-depth-8-focused) !important;
|
|
1373
1375
|
}
|
|
1374
1376
|
.limel-select .limel-select-trigger .mdc-floating-label {
|
|
1377
|
+
color: rgba(var(--contrast-1200), 1);
|
|
1375
1378
|
width: calc( 100% - 1rem );
|
|
1376
1379
|
}
|
|
1377
1380
|
.limel-select .limel-select-trigger .mdc-floating-label.mdc-floating-label--float-above {
|
|
@@ -600,11 +600,16 @@
|
|
|
600
600
|
transform: translateX(calc(0 - 0%)) translateY(-106%) scale(0.75);
|
|
601
601
|
}
|
|
602
602
|
}
|
|
603
|
+
:host([disabled]:not([readonly])) .slider__label {
|
|
604
|
+
color: rgba(var(--contrast-1200), 0.5);
|
|
605
|
+
}
|
|
606
|
+
|
|
603
607
|
.slider {
|
|
604
608
|
position: relative;
|
|
605
609
|
}
|
|
606
610
|
|
|
607
611
|
.slider__label {
|
|
612
|
+
color: rgba(var(--contrast-1200), 1);
|
|
608
613
|
padding-left: 1.25rem;
|
|
609
614
|
top: 0.5625rem;
|
|
610
615
|
}
|
|
@@ -583,12 +583,13 @@
|
|
|
583
583
|
position: relative;
|
|
584
584
|
}
|
|
585
585
|
|
|
586
|
-
|
|
587
|
-
|
|
586
|
+
.mdc-tab {
|
|
587
|
+
padding-right: 1.25rem;
|
|
588
|
+
padding-left: 1.25rem;
|
|
588
589
|
}
|
|
589
590
|
|
|
590
|
-
.mdc-
|
|
591
|
-
|
|
591
|
+
:host(.has-tabs-with-equal-width) .mdc-tab {
|
|
592
|
+
flex: 1 0 auto;
|
|
592
593
|
}
|
|
593
594
|
|
|
594
595
|
.mdc-tab-indicator .mdc-tab-indicator__content {
|
|
@@ -134,7 +134,7 @@ export function createCustomComponent(cell, column, value, pool) {
|
|
|
134
134
|
* @param {HTMLElement} element the custom element
|
|
135
135
|
* @param {object} props object of properties and event listeners
|
|
136
136
|
*/
|
|
137
|
-
function setElementProperties(element, props) {
|
|
137
|
+
export function setElementProperties(element, props) {
|
|
138
138
|
const properties = pickBy(props, negate(isEventListener));
|
|
139
139
|
Object.assign(element, properties);
|
|
140
140
|
const listeners = pickBy(props, isEventListener);
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contains a set of selected data objects with methods for adding and removing
|
|
3
|
+
* items to the selection by referring to them by their index/position.
|
|
4
|
+
* Maintains a memory of the last toggled item which can be used to select or
|
|
5
|
+
* deselect a range of items between the last toggled item and a given item.
|
|
6
|
+
*/
|
|
7
|
+
export class Selection {
|
|
8
|
+
/**
|
|
9
|
+
* Creates an instance of the Selection class.
|
|
10
|
+
* The provided function `getDataByIndex` is used to provide data for the
|
|
11
|
+
* selected items when selection is toggled by using the item index,
|
|
12
|
+
* which can be the row position in a table.
|
|
13
|
+
*
|
|
14
|
+
* @param {Function} getDataByIndex A function that returns the data at the given index
|
|
15
|
+
*/
|
|
16
|
+
constructor(getDataByIndex) {
|
|
17
|
+
this.getDataByIndex = getDataByIndex;
|
|
18
|
+
this.toggleRange = (fromIndex, toIndex) => {
|
|
19
|
+
const select = !this.selectedItems.has(this.getDataByIndex(toIndex));
|
|
20
|
+
const lowerBound = Math.min(fromIndex, toIndex);
|
|
21
|
+
const upperBound = Math.max(fromIndex, toIndex);
|
|
22
|
+
const updatedIndexes = [];
|
|
23
|
+
const updatedItems = [];
|
|
24
|
+
for (let index = lowerBound; index <= upperBound; index++) {
|
|
25
|
+
const data = this.getDataByIndex(index);
|
|
26
|
+
if (!data) {
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
const isSelected = this.selectedItems.has(data);
|
|
30
|
+
if (isSelected === select) {
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
if (select) {
|
|
34
|
+
this.selectedItems.add(data);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
this.selectedItems.delete(data);
|
|
38
|
+
}
|
|
39
|
+
updatedIndexes.push(index);
|
|
40
|
+
updatedItems.push(data);
|
|
41
|
+
}
|
|
42
|
+
this.lastToggledIndex = toIndex;
|
|
43
|
+
return {
|
|
44
|
+
selected: select,
|
|
45
|
+
items: updatedItems,
|
|
46
|
+
indexes: updatedIndexes,
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
this.clear();
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* @returns {number} The size of the selection
|
|
53
|
+
*/
|
|
54
|
+
get size() {
|
|
55
|
+
return this.selectedItems.size;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @returns {any[]} The selected items
|
|
59
|
+
*/
|
|
60
|
+
get items() {
|
|
61
|
+
return Array.from(this.selectedItems);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* @param {any[]} items The selected items
|
|
65
|
+
*/
|
|
66
|
+
set items(items) {
|
|
67
|
+
this.selectedItems = new Set(items);
|
|
68
|
+
this.lastToggledIndex = -1;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Checks whether the given item exist in the selection
|
|
72
|
+
*
|
|
73
|
+
* @param {any} data The data to look up
|
|
74
|
+
* @returns {boolean} `true` if the given data exist in the selection, otherwise `false`
|
|
75
|
+
*/
|
|
76
|
+
has(data) {
|
|
77
|
+
return this.selectedItems.has(data);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Toggles the item at the given index in the selection
|
|
81
|
+
*
|
|
82
|
+
* @param {number} index The index of the item to toggle
|
|
83
|
+
* @returns {SelectionChangeSet} The changes made to the selection
|
|
84
|
+
*/
|
|
85
|
+
toggleSelection(index) {
|
|
86
|
+
return this.toggleRange(index, index);
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Toggles the items from the last toggled index to the given index in the selection.
|
|
90
|
+
* The toggled items will be toggled as the item at the given index no matter
|
|
91
|
+
* their current state in the selection.
|
|
92
|
+
* Initially, when no last toggled index exist, this function behaves like
|
|
93
|
+
* `toggleSelection`.
|
|
94
|
+
*
|
|
95
|
+
* @param {number} index The index of the item to toggle
|
|
96
|
+
* @returns {SelectionChangeSet} The changes made to the selection
|
|
97
|
+
*/
|
|
98
|
+
toggleSelectionFromLastIndex(index) {
|
|
99
|
+
if (this.lastToggledIndex < 0) {
|
|
100
|
+
return this.toggleSelection(index);
|
|
101
|
+
}
|
|
102
|
+
return this.toggleRange(this.lastToggledIndex, index);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Clears the current selection and resets last toggled index
|
|
106
|
+
*/
|
|
107
|
+
clear() {
|
|
108
|
+
this.selectedItems = new Set();
|
|
109
|
+
this.lastToggledIndex = -1;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { setElementProperties } from './columns';
|
|
2
|
+
import { Selection } from './selection';
|
|
3
|
+
import { isEqual } from 'lodash-es';
|
|
4
|
+
const LIMEL_CHECKBOX = 'limel-checkbox';
|
|
5
|
+
/**
|
|
6
|
+
* Provides row selection to Tabulator with shift-click support for range selections
|
|
7
|
+
*/
|
|
8
|
+
export class TableSelection {
|
|
9
|
+
/**
|
|
10
|
+
* Creates an instance of the TableSelection class
|
|
11
|
+
*
|
|
12
|
+
* @param {Function} getTable Function that returns the Tabulator instance
|
|
13
|
+
* @param {ElementPool} pool The element pool used to cache the checkbox components
|
|
14
|
+
* @param {EventEmitter<object[]>} selectEvent The event emitter to use when checkboxes are toggled
|
|
15
|
+
*/
|
|
16
|
+
constructor(getTable, pool, selectEvent) {
|
|
17
|
+
this.getTable = getTable;
|
|
18
|
+
this.pool = pool;
|
|
19
|
+
this.selectEvent = selectEvent;
|
|
20
|
+
/**
|
|
21
|
+
* Tabulator cell click handler that updates the selection for the clicked
|
|
22
|
+
* row and toggles the selection from the last clicked row if the shift key
|
|
23
|
+
* is pressed down.
|
|
24
|
+
*
|
|
25
|
+
* @param {PointerEvent} ev The pointer event
|
|
26
|
+
* @param {Tabulator.CellComponent} cell The clicked cell component
|
|
27
|
+
*/
|
|
28
|
+
this.rowSelectorCellClick = (ev, cell) => {
|
|
29
|
+
ev.stopPropagation();
|
|
30
|
+
ev.preventDefault();
|
|
31
|
+
const clickedRow = cell.getRow();
|
|
32
|
+
const rowPosition = clickedRow.getPosition(true);
|
|
33
|
+
if (ev.shiftKey) {
|
|
34
|
+
this.updateRowSelectors(this.selection.toggleSelectionFromLastIndex(rowPosition));
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
this.updateRowSelectors(this.selection.toggleSelection(rowPosition));
|
|
38
|
+
}
|
|
39
|
+
this.selectEvent.emit(this.selection.items);
|
|
40
|
+
};
|
|
41
|
+
this.updateRowSelectors = (changeSet) => {
|
|
42
|
+
changeSet.indexes
|
|
43
|
+
.map(this.getRowByIndex)
|
|
44
|
+
.forEach((row) => this.updateRowSelector(row, changeSet.selected));
|
|
45
|
+
};
|
|
46
|
+
this.updateRowSelector = (row, checked) => {
|
|
47
|
+
const cell = row.getCells()[0];
|
|
48
|
+
if (cell) {
|
|
49
|
+
const checkBox = cell.getElement().querySelector(LIMEL_CHECKBOX);
|
|
50
|
+
checkBox.checked = checked;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
this.getActiveRows = () => {
|
|
54
|
+
const table = this.getTable();
|
|
55
|
+
if (!table) {
|
|
56
|
+
return [];
|
|
57
|
+
}
|
|
58
|
+
return table.getRows('active');
|
|
59
|
+
};
|
|
60
|
+
this.getRowByIndex = (index) => {
|
|
61
|
+
return this.getTable().getRowFromPosition(index, true);
|
|
62
|
+
};
|
|
63
|
+
this.selection = new Selection((index) => this.getRowByIndex(index).getData());
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* @returns {boolean} Returns `true` when the selection is non-empty, otherwise `false`
|
|
67
|
+
*/
|
|
68
|
+
get hasSelection() {
|
|
69
|
+
return this.selection.size > 0;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Clears the selection
|
|
73
|
+
*/
|
|
74
|
+
clear() {
|
|
75
|
+
this.selection.clear();
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Sets the selected items
|
|
79
|
+
*
|
|
80
|
+
* @param {any[]} data The selected items
|
|
81
|
+
*/
|
|
82
|
+
setSelection(data) {
|
|
83
|
+
if (isEqual(this.selection.items, data)) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
this.selection.items = data;
|
|
87
|
+
const rows = this.getActiveRows();
|
|
88
|
+
rows.forEach((row) => this.updateRowSelector(row, this.selection.has(row.getData())));
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Prepends a checkbox column used for row selection to the given column definitions
|
|
92
|
+
*
|
|
93
|
+
* @param {Tabulator.ColumnDefinition[]} columnDefinitions The column definition for the table
|
|
94
|
+
* @returns {Tabulator.ColumnDefinition[]} The column definitions with the checkbox column prepended to it
|
|
95
|
+
*/
|
|
96
|
+
getColumnDefinitions(columnDefinitions) {
|
|
97
|
+
return [this.getRowSelectorColumnDefinition(), ...columnDefinitions];
|
|
98
|
+
}
|
|
99
|
+
getRowSelectorColumnDefinition() {
|
|
100
|
+
return {
|
|
101
|
+
title: '',
|
|
102
|
+
formatter: this.getRowSelectorFormatter(),
|
|
103
|
+
cellClick: this.rowSelectorCellClick,
|
|
104
|
+
headerClick: this.headerClick,
|
|
105
|
+
headerSort: false,
|
|
106
|
+
cssClass: 'limel-table--row-selector',
|
|
107
|
+
resizable: false,
|
|
108
|
+
htmlOutput: false,
|
|
109
|
+
clipboard: false,
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
headerClick(ev) {
|
|
113
|
+
ev.stopPropagation();
|
|
114
|
+
}
|
|
115
|
+
getRowSelectorFormatter() {
|
|
116
|
+
return (cell) => {
|
|
117
|
+
const element = this.pool.get(LIMEL_CHECKBOX);
|
|
118
|
+
setElementProperties(element, {
|
|
119
|
+
checked: this.selection.has(cell.getData()),
|
|
120
|
+
});
|
|
121
|
+
element.style.display = 'inline-block';
|
|
122
|
+
return element;
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
}
|