@limetech/lime-elements 36.3.1-next.1 → 36.3.1
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-ac867c17.js → checkbox.template-60ed3ee2.js} +1 -2
- package/dist/cjs/{dom-20826de0.js → dom-eb080f70.js} +0 -1
- package/dist/cjs/{format-c0047dfb.js → format-5b928cf3.js} +0 -1
- package/dist/cjs/lime-elements.cjs.js +1 -1
- package/dist/cjs/limel-badge.cjs.entry.js +1 -1
- package/dist/cjs/limel-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/limel-chip-set.cjs.entry.js +6 -22
- package/dist/cjs/limel-circular-progress_2.cjs.entry.js +1 -1
- package/dist/cjs/limel-form.cjs.entry.js +1 -20
- package/dist/cjs/limel-helper-line.cjs.entry.js +48 -0
- package/dist/cjs/limel-icon.cjs.entry.js +0 -2
- package/dist/cjs/limel-input-field.cjs.entry.js +4 -21
- package/dist/cjs/limel-list_2.cjs.entry.js +3 -7
- package/dist/cjs/limel-menu-list.cjs.entry.js +1 -5
- package/dist/cjs/limel-picker.cjs.entry.js +1 -10
- package/dist/cjs/limel-popover_4.cjs.entry.js +0 -1
- package/dist/cjs/limel-select.cjs.entry.js +4 -5
- package/dist/cjs/limel-slider.cjs.entry.js +2 -2
- package/dist/cjs/limel-snackbar.cjs.entry.js +1 -1
- package/dist/cjs/limel-tab-bar.cjs.entry.js +0 -1
- package/dist/cjs/limel-table.cjs.entry.js +0 -19
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{multiple-8fab83eb.js → multiple-2af83b6d.js} +0 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/badge/badge.js +0 -1
- package/dist/collection/components/badge/format.js +0 -1
- package/dist/collection/components/button-group/button-group.js +0 -1
- package/dist/collection/components/callout/callout.js +0 -1
- package/dist/collection/components/checkbox/checkbox.css +8 -92
- package/dist/collection/components/checkbox/checkbox.template.js +1 -1
- package/dist/collection/components/chip-set/chip-set-input-helpers.js +0 -1
- package/dist/collection/components/chip-set/chip-set.css +4 -18
- package/dist/collection/components/chip-set/chip-set.js +5 -20
- package/dist/collection/components/circular-progress/circular-progress.js +0 -1
- package/dist/collection/components/code-editor/code-editor.js +1 -2
- package/dist/collection/components/color-picker/color-picker.js +0 -1
- package/dist/collection/components/date-picker/flatpickr-adapter/flatpickr-adapter.js +0 -1
- package/dist/collection/components/dialog/dialog.js +0 -1
- package/dist/collection/components/file/file.js +2 -3
- package/dist/collection/components/flex-container/flex-container.js +0 -1
- package/dist/collection/components/form/adapters/base-adapter.js +0 -12
- package/dist/collection/components/form/fields/field-helpers.js +0 -3
- package/dist/collection/components/form/fields/schema-field.js +0 -3
- package/dist/collection/components/form/templates/common.js +0 -1
- package/dist/collection/components/grid/grid.js +0 -1
- package/dist/collection/components/header/header.js +0 -1
- package/dist/collection/components/helper-line/helper-line.css +30 -0
- package/dist/collection/components/helper-line/helper-line.js +166 -0
- package/dist/collection/components/icon/icon.js +0 -2
- package/dist/collection/components/info-tile/info-tile.js +0 -1
- package/dist/collection/components/input-field/input-field.css +3 -15
- package/dist/collection/components/input-field/input-field.js +3 -20
- package/dist/collection/components/list/list-renderer.js +0 -4
- package/dist/collection/components/list/list.css +16 -184
- package/dist/collection/components/menu-list/menu-list-renderer.js +0 -4
- package/dist/collection/components/menu-list/menu-list.css +16 -185
- package/dist/collection/components/picker/picker.js +0 -9
- package/dist/collection/components/popover/popover.js +0 -2
- package/dist/collection/components/portal/contains.js +0 -1
- package/dist/collection/components/portal/portal.js +10 -11
- package/dist/collection/components/select/select.css +10 -40
- package/dist/collection/components/select/select.template.js +2 -2
- package/dist/collection/components/shortcut/shortcut.js +0 -1
- package/dist/collection/components/slider/slider.css +6 -33
- package/dist/collection/components/slider/slider.js +1 -1
- package/dist/collection/components/snackbar/snackbar.js +26 -3
- package/dist/collection/components/split-button/split-button.js +0 -1
- package/dist/collection/components/tab-bar/tab-bar.js +1 -2
- package/dist/collection/components/tab-bar/tabs.js +0 -1
- package/dist/collection/components/tab-panel/tab-panel.js +0 -1
- package/dist/collection/components/table/columns.js +0 -9
- package/dist/collection/components/table/element-pool.js +0 -2
- package/dist/collection/components/table/selection.js +0 -4
- package/dist/collection/components/table/table-selection.js +0 -4
- package/dist/collection/components/tooltip/tooltip-content.js +0 -1
- package/dist/collection/components/tooltip/tooltip.js +0 -1
- package/dist/collection/global/icon-cache.js +0 -1
- package/dist/collection/util/dom.js +0 -1
- package/dist/collection/util/multiple.js +0 -1
- package/dist/esm/{checkbox.template-fc7fcd06.js → checkbox.template-4ce8d92f.js} +1 -2
- package/dist/esm/{dom-0f79cbe7.js → dom-2fe617e7.js} +0 -1
- package/dist/esm/{format-a0e2d949.js → format-c76733cb.js} +0 -1
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/limel-badge.entry.js +1 -1
- package/dist/esm/limel-checkbox.entry.js +2 -2
- package/dist/esm/limel-chip-set.entry.js +6 -22
- package/dist/esm/limel-circular-progress_2.entry.js +1 -1
- package/dist/esm/limel-form.entry.js +1 -20
- package/dist/esm/limel-helper-line.entry.js +44 -0
- package/dist/esm/limel-icon.entry.js +0 -2
- package/dist/esm/limel-input-field.entry.js +4 -21
- package/dist/esm/limel-list_2.entry.js +3 -7
- package/dist/esm/limel-menu-list.entry.js +1 -5
- package/dist/esm/limel-picker.entry.js +1 -10
- package/dist/esm/limel-popover_4.entry.js +0 -1
- package/dist/esm/limel-select.entry.js +4 -5
- package/dist/esm/limel-slider.entry.js +2 -2
- package/dist/esm/limel-snackbar.entry.js +1 -1
- package/dist/esm/limel-tab-bar.entry.js +0 -1
- package/dist/esm/limel-table.entry.js +0 -19
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{multiple-254f4b61.js → multiple-0bd62427.js} +0 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/p-094dd76a.entry.js +126 -0
- package/dist/lime-elements/p-20059fcf.entry.js +82 -0
- package/dist/lime-elements/{p-157e0417.entry.js → p-5ab179b4.entry.js} +3 -3
- package/dist/lime-elements/{p-eed2a202.entry.js → p-6b8142ba.entry.js} +5 -5
- package/dist/lime-elements/{p-05d88196.entry.js → p-727fd4ea.entry.js} +2 -2
- package/dist/lime-elements/p-803cc4b7.entry.js +1 -0
- package/dist/lime-elements/{p-8178b348.entry.js → p-8a2d1761.entry.js} +1 -1
- package/dist/lime-elements/{p-d955c169.entry.js → p-8acabe02.entry.js} +1 -1
- package/dist/lime-elements/{p-a88f2922.entry.js → p-8d3a9e2c.entry.js} +1 -1
- package/dist/lime-elements/p-ba7661f6.entry.js +1 -0
- package/dist/lime-elements/p-d034bbcf.entry.js +1 -0
- package/dist/lime-elements/{p-1af8258b.js → p-d2a3d50b.js} +1 -1
- package/dist/lime-elements/{p-2fd478df.entry.js → p-ef93fd3e.entry.js} +1 -1
- package/dist/lime-elements/{p-58e9df30.entry.js → p-f4cbcdcf.entry.js} +1 -1
- package/dist/types/components/badge/badge.d.ts +0 -1
- package/dist/types/components/badge/format.d.ts +0 -1
- package/dist/types/components/button-group/button-group.d.ts +0 -1
- package/dist/types/components/callout/callout.d.ts +0 -1
- package/dist/types/components/chip-set/chip-set-input-helpers.d.ts +0 -1
- package/dist/types/components/chip-set/chip-set.d.ts +1 -7
- package/dist/types/components/circular-progress/circular-progress.d.ts +0 -1
- package/dist/types/components/code-editor/code-editor.d.ts +1 -2
- package/dist/types/components/color-picker/color-picker.d.ts +0 -1
- package/dist/types/components/date-picker/flatpickr-adapter/flatpickr-adapter.d.ts +0 -1
- package/dist/types/components/dialog/dialog.d.ts +0 -1
- package/dist/types/components/file/file.d.ts +2 -3
- package/dist/types/components/flex-container/flex-container.d.ts +0 -1
- package/dist/types/components/form/adapters/base-adapter.d.ts +0 -11
- package/dist/types/components/form/fields/field-helpers.d.ts +0 -2
- package/dist/types/components/form/fields/schema-field.d.ts +0 -2
- package/dist/types/components/form/templates/common.d.ts +0 -1
- package/dist/types/components/grid/grid.d.ts +0 -1
- package/dist/types/components/header/header.d.ts +0 -1
- package/dist/types/components/helper-line/helper-line.d.ts +57 -0
- package/dist/types/components/icon/icon.d.ts +0 -2
- package/dist/types/components/info-tile/info-tile.d.ts +0 -1
- package/dist/types/components/input-field/input-field.d.ts +0 -3
- package/dist/types/components/list/list-renderer.d.ts +0 -4
- package/dist/types/components/menu-list/menu-list-renderer.d.ts +0 -4
- package/dist/types/components/picker/picker.d.ts +0 -9
- package/dist/types/components/picker/searcher.types.d.ts +0 -1
- package/dist/types/components/popover/popover.d.ts +0 -2
- package/dist/types/components/portal/contains.d.ts +0 -1
- package/dist/types/components/portal/portal.d.ts +10 -11
- package/dist/types/components/shortcut/shortcut.d.ts +0 -1
- package/dist/types/components/snackbar/snackbar.d.ts +23 -1
- package/dist/types/components/split-button/split-button.d.ts +0 -1
- package/dist/types/components/tab-bar/tab-bar.d.ts +1 -2
- package/dist/types/components/tab-bar/tabs.d.ts +0 -1
- package/dist/types/components/tab-panel/tab-panel.d.ts +0 -1
- package/dist/types/components/table/columns.d.ts +0 -7
- package/dist/types/components/table/element-pool.d.ts +0 -2
- package/dist/types/components/table/selection.d.ts +0 -4
- package/dist/types/components/table/table-selection.d.ts +0 -4
- package/dist/types/components/table/table.types.d.ts +0 -3
- package/dist/types/components/tooltip/tooltip-content.d.ts +0 -1
- package/dist/types/components/tooltip/tooltip.d.ts +0 -1
- package/dist/types/components.d.ts +54 -1
- package/dist/types/global/icon-cache.d.ts +0 -1
- package/dist/types/util/dom.d.ts +0 -1
- package/dist/types/util/multiple.d.ts +0 -1
- package/package.json +7 -7
- package/dist/lime-elements/p-142910d8.entry.js +0 -126
- package/dist/lime-elements/p-73613abb.entry.js +0 -82
- package/dist/lime-elements/p-d0084a70.entry.js +0 -1
- package/dist/lime-elements/p-ff0e407a.entry.js +0 -1
- /package/dist/lime-elements/{p-f08f504b.js → p-0eabb204.js} +0 -0
- /package/dist/lime-elements/{p-0534b23b.js → p-5f020b3c.js} +0 -0
- /package/dist/lime-elements/{p-af8d4fe7.js → p-acf307d9.js} +0 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { Host, h } from '@stencil/core';
|
|
2
|
+
/**
|
|
3
|
+
* This is an internal and private component that many input fields
|
|
4
|
+
* use to display a helper text, along with a character counter below the
|
|
5
|
+
* input field.
|
|
6
|
+
*
|
|
7
|
+
* We created this to keep the visual styles the same everywhere
|
|
8
|
+
* and to avoid importing styles separately.
|
|
9
|
+
*
|
|
10
|
+
* Also this enables us to open the helper line in limel-portal,
|
|
11
|
+
* more easily without having to send the styles to the portal.
|
|
12
|
+
*
|
|
13
|
+
* :::note
|
|
14
|
+
* When the component has no content, it will get a `display: none`
|
|
15
|
+
* as styles to avoid creating empty holes in the UI of the parent component.
|
|
16
|
+
* For example, in a `flex` or `grid` component that has a `gap`,
|
|
17
|
+
* we don't want the empty `limel-helper-line` to render and cause unnecessary
|
|
18
|
+
* gaps in the UI.
|
|
19
|
+
* However, to be more resourceful, the parent component can choose not
|
|
20
|
+
* to render the helper-line as well.
|
|
21
|
+
* :::
|
|
22
|
+
* @exampleComponent limel-example-helper-line
|
|
23
|
+
* @exampleComponent limel-example-helper-line-invalid
|
|
24
|
+
* @exampleComponent limel-example-helper-line-long-text
|
|
25
|
+
* @exampleComponent limel-example-helper-line-long-text-no-counter
|
|
26
|
+
* @exampleComponent limel-example-helper-line-character-counter
|
|
27
|
+
* @private
|
|
28
|
+
*/
|
|
29
|
+
export class HelperLine {
|
|
30
|
+
constructor() {
|
|
31
|
+
this.hasContent = () => {
|
|
32
|
+
if (this.maxLength ||
|
|
33
|
+
this.helperText.length > 0 ||
|
|
34
|
+
this.helperText !== null ||
|
|
35
|
+
this.helperText !== undefined) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
this.renderHelperText = () => {
|
|
40
|
+
if (!this.helperText) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
return (h("span", { class: "helper-text", id: this.helperTextId }, this.helperText));
|
|
44
|
+
};
|
|
45
|
+
this.renderCharacterCounter = () => {
|
|
46
|
+
const counter = `${this.length} / ${this.maxLength}`;
|
|
47
|
+
if (!this.maxLength) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
return h("span", { class: "counter" }, counter);
|
|
51
|
+
};
|
|
52
|
+
this.helperText = undefined;
|
|
53
|
+
this.length = undefined;
|
|
54
|
+
this.maxLength = undefined;
|
|
55
|
+
this.invalid = false;
|
|
56
|
+
this.helperTextId = undefined;
|
|
57
|
+
}
|
|
58
|
+
render() {
|
|
59
|
+
return (h(Host, { tabIndex: -1, class: {
|
|
60
|
+
invalid: this.invalid,
|
|
61
|
+
show: this.hasContent(),
|
|
62
|
+
}, "aria-hidden": !this.hasContent() }, this.renderHelperText(), this.renderCharacterCounter()));
|
|
63
|
+
}
|
|
64
|
+
static get is() { return "limel-helper-line"; }
|
|
65
|
+
static get encapsulation() { return "shadow"; }
|
|
66
|
+
static get originalStyleUrls() {
|
|
67
|
+
return {
|
|
68
|
+
"$": ["helper-line.scss"]
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
static get styleUrls() {
|
|
72
|
+
return {
|
|
73
|
+
"$": ["helper-line.css"]
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
static get properties() {
|
|
77
|
+
return {
|
|
78
|
+
"helperText": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"mutable": false,
|
|
81
|
+
"complexType": {
|
|
82
|
+
"original": "string",
|
|
83
|
+
"resolved": "string",
|
|
84
|
+
"references": {}
|
|
85
|
+
},
|
|
86
|
+
"required": false,
|
|
87
|
+
"optional": true,
|
|
88
|
+
"docs": {
|
|
89
|
+
"tags": [],
|
|
90
|
+
"text": "The helper text that is displayed on the left side."
|
|
91
|
+
},
|
|
92
|
+
"attribute": "helper-text",
|
|
93
|
+
"reflect": true
|
|
94
|
+
},
|
|
95
|
+
"length": {
|
|
96
|
+
"type": "number",
|
|
97
|
+
"mutable": false,
|
|
98
|
+
"complexType": {
|
|
99
|
+
"original": "number",
|
|
100
|
+
"resolved": "number",
|
|
101
|
+
"references": {}
|
|
102
|
+
},
|
|
103
|
+
"required": false,
|
|
104
|
+
"optional": true,
|
|
105
|
+
"docs": {
|
|
106
|
+
"tags": [],
|
|
107
|
+
"text": "Length of the current input value, coming from the parent component.\nUsed in the character counter section on the right side."
|
|
108
|
+
},
|
|
109
|
+
"attribute": "length",
|
|
110
|
+
"reflect": true
|
|
111
|
+
},
|
|
112
|
+
"maxLength": {
|
|
113
|
+
"type": "number",
|
|
114
|
+
"mutable": false,
|
|
115
|
+
"complexType": {
|
|
116
|
+
"original": "number",
|
|
117
|
+
"resolved": "number",
|
|
118
|
+
"references": {}
|
|
119
|
+
},
|
|
120
|
+
"required": false,
|
|
121
|
+
"optional": true,
|
|
122
|
+
"docs": {
|
|
123
|
+
"tags": [],
|
|
124
|
+
"text": "Maximum length of the characters, defined on the parent component.\nUsed in the character counter section on the right side."
|
|
125
|
+
},
|
|
126
|
+
"attribute": "max-length",
|
|
127
|
+
"reflect": true
|
|
128
|
+
},
|
|
129
|
+
"invalid": {
|
|
130
|
+
"type": "boolean",
|
|
131
|
+
"mutable": false,
|
|
132
|
+
"complexType": {
|
|
133
|
+
"original": "boolean",
|
|
134
|
+
"resolved": "boolean",
|
|
135
|
+
"references": {}
|
|
136
|
+
},
|
|
137
|
+
"required": false,
|
|
138
|
+
"optional": true,
|
|
139
|
+
"docs": {
|
|
140
|
+
"tags": [],
|
|
141
|
+
"text": "Turns `true`, when the parent component is invalid.\nFor example, when the parent component is `required` but is left empty.\nOr when the input format is invalid."
|
|
142
|
+
},
|
|
143
|
+
"attribute": "invalid",
|
|
144
|
+
"reflect": true,
|
|
145
|
+
"defaultValue": "false"
|
|
146
|
+
},
|
|
147
|
+
"helperTextId": {
|
|
148
|
+
"type": "string",
|
|
149
|
+
"mutable": false,
|
|
150
|
+
"complexType": {
|
|
151
|
+
"original": "string",
|
|
152
|
+
"resolved": "string",
|
|
153
|
+
"references": {}
|
|
154
|
+
},
|
|
155
|
+
"required": false,
|
|
156
|
+
"optional": true,
|
|
157
|
+
"docs": {
|
|
158
|
+
"tags": [],
|
|
159
|
+
"text": "Used by `aria-controls` and `aria-describedby` in the parent component."
|
|
160
|
+
},
|
|
161
|
+
"attribute": "helper-text-id",
|
|
162
|
+
"reflect": true
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
}
|
|
@@ -51,7 +51,6 @@ import iconCache from '../../global/icon-cache';
|
|
|
51
51
|
* Search for an icon and **click on it to copy its name to clipboard**.
|
|
52
52
|
*
|
|
53
53
|
* <limel-example-icon-finder />
|
|
54
|
-
*
|
|
55
54
|
* @exampleComponent limel-example-icon
|
|
56
55
|
* @exampleComponent limel-example-icon-background
|
|
57
56
|
*/
|
|
@@ -76,7 +75,6 @@ export class Icon {
|
|
|
76
75
|
}
|
|
77
76
|
/**
|
|
78
77
|
* Load the SVG data for the icon from the icon cache
|
|
79
|
-
*
|
|
80
78
|
* @param {string} name name of the icon
|
|
81
79
|
* @returns {string} the icon SVG data
|
|
82
80
|
*/
|
|
@@ -7,7 +7,6 @@ import { h } from '@stencil/core';
|
|
|
7
7
|
* If clicking on the component should navigate the user to
|
|
8
8
|
* a new screen or web page, you need to provide a URL,
|
|
9
9
|
* using the `link` property.
|
|
10
|
-
*
|
|
11
10
|
* @exampleComponent limel-example-info-tile
|
|
12
11
|
* @exampleComponent limel-example-info-tile-badge
|
|
13
12
|
* @exampleComponent limel-example-info-tile-progress
|
|
@@ -2016,6 +2016,9 @@
|
|
|
2016
2016
|
z-index: 2;
|
|
2017
2017
|
}
|
|
2018
2018
|
|
|
2019
|
+
:not(.mdc-text-field--focused):not(.mdc-text-field--invalid) + limel-helper-line {
|
|
2020
|
+
opacity: 0;
|
|
2021
|
+
}
|
|
2019
2022
|
:not(.mdc-text-field--focused):not(.mdc-text-field--invalid) .mdc-text-field__input[type=number] {
|
|
2020
2023
|
color: transparent;
|
|
2021
2024
|
-webkit-text-fill-color: transparent;
|
|
@@ -2078,21 +2081,6 @@ input.mdc-text-field__input::-webkit-search-cancel-button:active {
|
|
|
2078
2081
|
transform: none;
|
|
2079
2082
|
}
|
|
2080
2083
|
|
|
2081
|
-
.mdc-text-field-character-counter {
|
|
2082
|
-
transition: opacity 0.2s ease;
|
|
2083
|
-
opacity: 0;
|
|
2084
|
-
}
|
|
2085
|
-
.mdc-text-field--focused + .mdc-text-field-helper-line .mdc-text-field-character-counter {
|
|
2086
|
-
opacity: 1;
|
|
2087
|
-
}
|
|
2088
|
-
.mdc-text-field-character-counter:before {
|
|
2089
|
-
height: 0.75rem;
|
|
2090
|
-
}
|
|
2091
|
-
|
|
2092
|
-
.mdc-text-field-helper-text:before {
|
|
2093
|
-
height: 0.75rem;
|
|
2094
|
-
}
|
|
2095
|
-
|
|
2096
2084
|
/*
|
|
2097
2085
|
* This file is imported into every component!
|
|
2098
2086
|
*
|
|
@@ -111,26 +111,18 @@ export class InputField {
|
|
|
111
111
|
this.isModified = true;
|
|
112
112
|
};
|
|
113
113
|
this.renderHelperLine = () => {
|
|
114
|
+
const text = this.value || '';
|
|
115
|
+
const length = text.length;
|
|
114
116
|
if (!this.maxlength && !this.hasHelperText()) {
|
|
115
117
|
return;
|
|
116
118
|
}
|
|
117
|
-
return (h("
|
|
119
|
+
return (h("limel-helper-line", { helperTextId: helperTextId, helperText: this.helperText, length: length, maxLength: this.maxlength, invalid: this.isInvalid() }));
|
|
118
120
|
};
|
|
119
121
|
this.renderEmptyValueForReadonly = () => {
|
|
120
122
|
if (this.readonly && !this.value) {
|
|
121
123
|
return (h("span", { class: "lime-empty-value-for-readonly lime-looks-like-input-value" }, "\u2013"));
|
|
122
124
|
}
|
|
123
125
|
};
|
|
124
|
-
this.renderHelperText = () => {
|
|
125
|
-
if (!this.hasHelperText()) {
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
const classList = {
|
|
129
|
-
'mdc-text-field-helper-text': true,
|
|
130
|
-
'mdc-text-field-helper-text--validation-msg': this.isInvalid(),
|
|
131
|
-
};
|
|
132
|
-
return (h("p", { class: classList, id: helperTextId }, this.helperText));
|
|
133
|
-
};
|
|
134
126
|
this.hasHelperText = () => {
|
|
135
127
|
return this.helperText !== null && this.helperText !== undefined;
|
|
136
128
|
};
|
|
@@ -160,14 +152,6 @@ export class InputField {
|
|
|
160
152
|
this.hasPrefix = () => {
|
|
161
153
|
return this.prefix !== null && this.prefix !== undefined;
|
|
162
154
|
};
|
|
163
|
-
this.renderCharacterCounter = () => {
|
|
164
|
-
if (!this.maxlength || this.type === 'number') {
|
|
165
|
-
return;
|
|
166
|
-
}
|
|
167
|
-
const text = this.value || '';
|
|
168
|
-
const label = `${text.length} / ${this.maxlength}`;
|
|
169
|
-
return h("div", { class: "mdc-text-field-character-counter" }, label);
|
|
170
|
-
};
|
|
171
155
|
this.isInvalid = () => {
|
|
172
156
|
if (this.readonly) {
|
|
173
157
|
// A readonly field can never be invalid.
|
|
@@ -294,7 +278,6 @@ export class InputField {
|
|
|
294
278
|
/**
|
|
295
279
|
* Key handler for the input field
|
|
296
280
|
* Will change focus to the first/last item in the dropdown list to enable selection with the keyboard
|
|
297
|
-
*
|
|
298
281
|
* @param {KeyboardEvent} event event
|
|
299
282
|
* @returns {void}
|
|
300
283
|
*/
|
|
@@ -12,7 +12,6 @@ export class ListRenderer {
|
|
|
12
12
|
* and return the index at which that ListItem is located in `items`.
|
|
13
13
|
* Returns `undefined` if no item should have the attribute set.
|
|
14
14
|
* See https://github.com/material-components/material-components-web/tree/e66a43a75fef4f9179e24856649518e15e279a04/packages/mdc-list#accessibility
|
|
15
|
-
*
|
|
16
15
|
* @param {Array<ListItem | ListSeparator>} items the items of the list, including any `ListSeparator`:s
|
|
17
16
|
* @returns {number} the index as per the description
|
|
18
17
|
*/
|
|
@@ -39,7 +38,6 @@ export class ListRenderer {
|
|
|
39
38
|
};
|
|
40
39
|
/**
|
|
41
40
|
* Render a single list item
|
|
42
|
-
*
|
|
43
41
|
* @param {ListItem | ListSeparator} item the item to render
|
|
44
42
|
* @param {number} index the index the item had in the `items` array
|
|
45
43
|
* @returns {HTMLElement} the list item
|
|
@@ -69,7 +67,6 @@ export class ListRenderer {
|
|
|
69
67
|
};
|
|
70
68
|
/**
|
|
71
69
|
* Render the text of the list item
|
|
72
|
-
*
|
|
73
70
|
* @param {ListItem} item the list item
|
|
74
71
|
* @returns {HTMLElement | string} the text for the list item
|
|
75
72
|
*/
|
|
@@ -84,7 +81,6 @@ export class ListRenderer {
|
|
|
84
81
|
};
|
|
85
82
|
/**
|
|
86
83
|
* Render an icon for a list item
|
|
87
|
-
*
|
|
88
84
|
* @param {ListRendererConfig} config the config object, passed on from the `renderListItem` function
|
|
89
85
|
* @param {ListItem} item the list item
|
|
90
86
|
* @returns {HTMLElement} the icon element
|
|
@@ -823,105 +823,21 @@
|
|
|
823
823
|
color: var(--lime-error-text-color);
|
|
824
824
|
}
|
|
825
825
|
|
|
826
|
-
|
|
827
|
-
* This file is imported into every component!
|
|
828
|
-
*
|
|
829
|
-
* Nothing in this file may output any CSS
|
|
830
|
-
* without being explicitly called by outside code.
|
|
831
|
-
*/
|
|
832
|
-
/*
|
|
833
|
-
* This file is imported into every component that uses MDC!
|
|
834
|
-
*
|
|
835
|
-
* Anything in this file that generates CSS output on its own,
|
|
836
|
-
* without being explicitly used, will output that CSS in every
|
|
837
|
-
* single component, increasing the size of the production build.
|
|
838
|
-
* Avoid that unless there's very good reason for it!
|
|
839
|
-
*/
|
|
840
|
-
/*
|
|
841
|
-
* This file is imported into every component that uses MDC!
|
|
842
|
-
*
|
|
843
|
-
* Anything in this file that generates CSS output on its own,
|
|
844
|
-
* without being explicitly used, will output that CSS in every
|
|
845
|
-
* single component, increasing the size of the production build.
|
|
846
|
-
* Avoid that unless there's very good reason for it!
|
|
847
|
-
*/
|
|
848
|
-
:host {
|
|
849
|
-
--mdc-theme-primary: var(
|
|
850
|
-
--lime-primary-color,
|
|
851
|
-
rgb(var(--color-teal-default))
|
|
852
|
-
);
|
|
853
|
-
--mdc-theme-secondary: var(
|
|
854
|
-
--lime-secondary-color,
|
|
855
|
-
rgb(var(--contrast-1100))
|
|
856
|
-
);
|
|
857
|
-
--mdc-theme-on-primary: var(
|
|
858
|
-
--lime-on-primary-color,
|
|
859
|
-
rgb(var(--contrast-100))
|
|
860
|
-
);
|
|
861
|
-
--mdc-theme-on-secondary: var(
|
|
862
|
-
--lime-on-secondary-color,
|
|
863
|
-
rgb(var(--contrast-100))
|
|
864
|
-
);
|
|
865
|
-
--mdc-theme-text-disabled-on-background: var(
|
|
866
|
-
--lime-text-disabled-on-background-color,
|
|
867
|
-
rgba(var(--contrast-1700), 0.38)
|
|
868
|
-
);
|
|
869
|
-
--mdc-theme-text-primary-on-background: var(
|
|
870
|
-
--lime-text-primary-on-background-color,
|
|
871
|
-
rgba(var(--contrast-1700), 0.87)
|
|
872
|
-
);
|
|
873
|
-
--mdc-theme-text-secondary-on-background: var(
|
|
874
|
-
--lime-text-secondary-on-background-color,
|
|
875
|
-
rgba(var(--contrast-1700), 0.54)
|
|
876
|
-
);
|
|
877
|
-
--mdc-theme-error: var(
|
|
878
|
-
--lime-error-background-color,
|
|
879
|
-
rgb(var(--color-red-dark))
|
|
880
|
-
);
|
|
881
|
-
--lime-error-text-color: rgb(var(--color-red-darker));
|
|
882
|
-
--mdc-theme-surface: var(
|
|
883
|
-
--lime-surface-background-color,
|
|
884
|
-
rgb(var(--contrast-100))
|
|
885
|
-
);
|
|
886
|
-
--mdc-theme-on-surface: var(
|
|
887
|
-
--lime-on-surface-color,
|
|
888
|
-
rgb(var(--contrast-1500))
|
|
889
|
-
);
|
|
890
|
-
}
|
|
891
|
-
|
|
892
|
-
.limel-checkbox-helper-line {
|
|
893
|
-
padding-right: 1rem;
|
|
894
|
-
padding-left: 1rem;
|
|
895
|
-
flex-basis: 100%;
|
|
896
|
-
width: 100%;
|
|
897
|
-
}
|
|
898
|
-
|
|
899
|
-
.limel-checkbox-helper-text {
|
|
900
|
-
font-family: Roboto, sans-serif;
|
|
901
|
-
-moz-osx-font-smoothing: grayscale;
|
|
902
|
-
-webkit-font-smoothing: antialiased;
|
|
903
|
-
font-size: 0.6875rem;
|
|
904
|
-
font-weight: 400;
|
|
905
|
-
letter-spacing: 0.0333333333em;
|
|
906
|
-
text-decoration: inherit;
|
|
907
|
-
text-transform: inherit;
|
|
908
|
-
display: block;
|
|
909
|
-
margin-top: 0;
|
|
910
|
-
line-height: normal;
|
|
911
|
-
margin: 0;
|
|
912
|
-
transition: opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
826
|
+
limel-helper-line {
|
|
913
827
|
opacity: 0;
|
|
914
|
-
color: rgba(var(--contrast-1200), 1);
|
|
915
|
-
}
|
|
916
|
-
:host(:hover) .limel-checkbox-helper-text, :host(:focus) .limel-checkbox-helper-text, :host(:focus-within) .limel-checkbox-helper-text {
|
|
917
|
-
opacity: 1;
|
|
918
828
|
}
|
|
919
829
|
|
|
920
830
|
@media (pointer: coarse) {
|
|
921
|
-
|
|
831
|
+
limel-helper-line {
|
|
922
832
|
opacity: 1;
|
|
923
833
|
}
|
|
924
834
|
}
|
|
835
|
+
:host(:focus) limel-helper-line,
|
|
836
|
+
:host(:focus-visible) limel-helper-line,
|
|
837
|
+
:host(:focus-within) limel-helper-line {
|
|
838
|
+
opacity: 1;
|
|
839
|
+
}
|
|
840
|
+
|
|
925
841
|
.lime-checkbox--readonly.mdc-checkbox--disabled {
|
|
926
842
|
opacity: 1;
|
|
927
843
|
--mdc-ripple-press-opacity: 1;
|
|
@@ -5289,105 +5205,21 @@ a.mdc-list-item {
|
|
|
5289
5205
|
color: var(--lime-error-text-color);
|
|
5290
5206
|
}
|
|
5291
5207
|
|
|
5292
|
-
|
|
5293
|
-
* This file is imported into every component!
|
|
5294
|
-
*
|
|
5295
|
-
* Nothing in this file may output any CSS
|
|
5296
|
-
* without being explicitly called by outside code.
|
|
5297
|
-
*/
|
|
5298
|
-
/*
|
|
5299
|
-
* This file is imported into every component that uses MDC!
|
|
5300
|
-
*
|
|
5301
|
-
* Anything in this file that generates CSS output on its own,
|
|
5302
|
-
* without being explicitly used, will output that CSS in every
|
|
5303
|
-
* single component, increasing the size of the production build.
|
|
5304
|
-
* Avoid that unless there's very good reason for it!
|
|
5305
|
-
*/
|
|
5306
|
-
/*
|
|
5307
|
-
* This file is imported into every component that uses MDC!
|
|
5308
|
-
*
|
|
5309
|
-
* Anything in this file that generates CSS output on its own,
|
|
5310
|
-
* without being explicitly used, will output that CSS in every
|
|
5311
|
-
* single component, increasing the size of the production build.
|
|
5312
|
-
* Avoid that unless there's very good reason for it!
|
|
5313
|
-
*/
|
|
5314
|
-
:host {
|
|
5315
|
-
--mdc-theme-primary: var(
|
|
5316
|
-
--lime-primary-color,
|
|
5317
|
-
rgb(var(--color-teal-default))
|
|
5318
|
-
);
|
|
5319
|
-
--mdc-theme-secondary: var(
|
|
5320
|
-
--lime-secondary-color,
|
|
5321
|
-
rgb(var(--contrast-1100))
|
|
5322
|
-
);
|
|
5323
|
-
--mdc-theme-on-primary: var(
|
|
5324
|
-
--lime-on-primary-color,
|
|
5325
|
-
rgb(var(--contrast-100))
|
|
5326
|
-
);
|
|
5327
|
-
--mdc-theme-on-secondary: var(
|
|
5328
|
-
--lime-on-secondary-color,
|
|
5329
|
-
rgb(var(--contrast-100))
|
|
5330
|
-
);
|
|
5331
|
-
--mdc-theme-text-disabled-on-background: var(
|
|
5332
|
-
--lime-text-disabled-on-background-color,
|
|
5333
|
-
rgba(var(--contrast-1700), 0.38)
|
|
5334
|
-
);
|
|
5335
|
-
--mdc-theme-text-primary-on-background: var(
|
|
5336
|
-
--lime-text-primary-on-background-color,
|
|
5337
|
-
rgba(var(--contrast-1700), 0.87)
|
|
5338
|
-
);
|
|
5339
|
-
--mdc-theme-text-secondary-on-background: var(
|
|
5340
|
-
--lime-text-secondary-on-background-color,
|
|
5341
|
-
rgba(var(--contrast-1700), 0.54)
|
|
5342
|
-
);
|
|
5343
|
-
--mdc-theme-error: var(
|
|
5344
|
-
--lime-error-background-color,
|
|
5345
|
-
rgb(var(--color-red-dark))
|
|
5346
|
-
);
|
|
5347
|
-
--lime-error-text-color: rgb(var(--color-red-darker));
|
|
5348
|
-
--mdc-theme-surface: var(
|
|
5349
|
-
--lime-surface-background-color,
|
|
5350
|
-
rgb(var(--contrast-100))
|
|
5351
|
-
);
|
|
5352
|
-
--mdc-theme-on-surface: var(
|
|
5353
|
-
--lime-on-surface-color,
|
|
5354
|
-
rgb(var(--contrast-1500))
|
|
5355
|
-
);
|
|
5356
|
-
}
|
|
5357
|
-
|
|
5358
|
-
.limel-checkbox-helper-line {
|
|
5359
|
-
padding-right: 1rem;
|
|
5360
|
-
padding-left: 1rem;
|
|
5361
|
-
flex-basis: 100%;
|
|
5362
|
-
width: 100%;
|
|
5363
|
-
}
|
|
5364
|
-
|
|
5365
|
-
.limel-checkbox-helper-text {
|
|
5366
|
-
font-family: Roboto, sans-serif;
|
|
5367
|
-
-moz-osx-font-smoothing: grayscale;
|
|
5368
|
-
-webkit-font-smoothing: antialiased;
|
|
5369
|
-
font-size: 0.6875rem;
|
|
5370
|
-
font-weight: 400;
|
|
5371
|
-
letter-spacing: 0.0333333333em;
|
|
5372
|
-
text-decoration: inherit;
|
|
5373
|
-
text-transform: inherit;
|
|
5374
|
-
display: block;
|
|
5375
|
-
margin-top: 0;
|
|
5376
|
-
line-height: normal;
|
|
5377
|
-
margin: 0;
|
|
5378
|
-
transition: opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
5208
|
+
limel-helper-line {
|
|
5379
5209
|
opacity: 0;
|
|
5380
|
-
color: rgba(var(--contrast-1200), 1);
|
|
5381
|
-
}
|
|
5382
|
-
:host(:hover) .limel-checkbox-helper-text, :host(:focus) .limel-checkbox-helper-text, :host(:focus-within) .limel-checkbox-helper-text {
|
|
5383
|
-
opacity: 1;
|
|
5384
5210
|
}
|
|
5385
5211
|
|
|
5386
5212
|
@media (pointer: coarse) {
|
|
5387
|
-
|
|
5213
|
+
limel-helper-line {
|
|
5388
5214
|
opacity: 1;
|
|
5389
5215
|
}
|
|
5390
5216
|
}
|
|
5217
|
+
:host(:focus) limel-helper-line,
|
|
5218
|
+
:host(:focus-visible) limel-helper-line,
|
|
5219
|
+
:host(:focus-within) limel-helper-line {
|
|
5220
|
+
opacity: 1;
|
|
5221
|
+
}
|
|
5222
|
+
|
|
5391
5223
|
.lime-checkbox--readonly.mdc-checkbox--disabled {
|
|
5392
5224
|
opacity: 1;
|
|
5393
5225
|
--mdc-ripple-press-opacity: 1;
|
|
@@ -10,7 +10,6 @@ export class MenuListRenderer {
|
|
|
10
10
|
* and return the index at which that MenuItem is located in `items`.
|
|
11
11
|
* Returns `undefined` if no item should have the attribute set.
|
|
12
12
|
* See https://github.com/material-components/material-components-web/tree/e66a43a75fef4f9179e24856649518e15e279a04/packages/mdc-list#accessibility
|
|
13
|
-
*
|
|
14
13
|
* @param {Array<MenuItem | ListSeparator>} items the items of the list, including any `ListSeparator`:s
|
|
15
14
|
* @returns {number} the index as per the description
|
|
16
15
|
*/
|
|
@@ -37,7 +36,6 @@ export class MenuListRenderer {
|
|
|
37
36
|
};
|
|
38
37
|
/**
|
|
39
38
|
* Render a single list item
|
|
40
|
-
*
|
|
41
39
|
* @param {MenuItem | ListSeparator} item the item to render
|
|
42
40
|
* @param {number} index the index the item had in the `items` array
|
|
43
41
|
* @returns {HTMLElement} the list item
|
|
@@ -59,7 +57,6 @@ export class MenuListRenderer {
|
|
|
59
57
|
};
|
|
60
58
|
/**
|
|
61
59
|
* Render the text of the list item
|
|
62
|
-
*
|
|
63
60
|
* @param {MenuItem} item the list item
|
|
64
61
|
* @returns {HTMLElement | string} the text for the list item
|
|
65
62
|
*/
|
|
@@ -83,7 +80,6 @@ export class MenuListRenderer {
|
|
|
83
80
|
};
|
|
84
81
|
/**
|
|
85
82
|
* Render an icon for a list item
|
|
86
|
-
*
|
|
87
83
|
* @param {MenuListRendererConfig} config the config object, passed on from the `renderMenuItem` function
|
|
88
84
|
* @param {MenuItem} item the list item
|
|
89
85
|
* @returns {HTMLElement} the icon element
|