@limetech/lime-elements 36.1.0-next.8 → 36.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-b6c6562c.js → checkbox.template-ac867c17.js} +1 -1
- package/dist/cjs/{index-2a28697b.js → index-287e25e0.js} +424 -246
- package/dist/cjs/lime-elements.cjs.js +3 -3
- package/dist/cjs/limel-badge.cjs.entry.js +2 -1
- package/dist/cjs/limel-banner.cjs.entry.js +3 -1
- package/dist/cjs/limel-button-group.cjs.entry.js +3 -8
- package/dist/cjs/{limel-button.cjs.entry.js → limel-button_2.cjs.entry.js} +117 -21
- package/dist/cjs/limel-checkbox.cjs.entry.js +10 -26
- package/dist/cjs/limel-chip-set.cjs.entry.js +21 -52
- package/dist/cjs/{limel-linear-progress.cjs.entry.js → limel-circular-progress_2.cjs.entry.js} +34 -7
- package/dist/cjs/limel-code-editor.cjs.entry.js +110 -97
- package/dist/cjs/limel-collapsible-section.cjs.entry.js +4 -5
- package/dist/cjs/limel-color-picker-palette.cjs.entry.js +5 -1
- package/dist/cjs/limel-color-picker.cjs.entry.js +8 -2
- package/dist/cjs/limel-config.cjs.entry.js +2 -1
- package/dist/cjs/limel-date-picker.cjs.entry.js +15 -33
- package/dist/cjs/limel-dialog.cjs.entry.js +4 -12
- package/dist/cjs/limel-dock-button.cjs.entry.js +5 -15
- package/dist/cjs/limel-dock.cjs.entry.js +8 -40
- package/dist/cjs/limel-file.cjs.entry.js +10 -24
- package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +149 -48
- package/dist/cjs/limel-flex-container.cjs.entry.js +1 -13
- package/dist/cjs/limel-form.cjs.entry.js +328 -327
- package/dist/cjs/limel-grid.cjs.entry.js +1 -1
- package/dist/cjs/limel-header.cjs.entry.js +5 -1
- package/dist/cjs/limel-icon-button.cjs.entry.js +3 -8
- package/dist/cjs/limel-icon.cjs.entry.js +4 -1
- package/dist/cjs/limel-info-tile.cjs.entry.js +95 -0
- package/dist/cjs/limel-input-field.cjs.entry.js +27 -60
- package/dist/cjs/limel-list_2.cjs.entry.js +10 -21
- package/dist/cjs/limel-menu-list.cjs.entry.js +7 -14
- package/dist/cjs/limel-picker.cjs.entry.js +14 -39
- package/dist/cjs/limel-popover_4.cjs.entry.js +13 -12
- package/dist/cjs/limel-portal.cjs.entry.js +63 -73
- package/dist/cjs/limel-progress-flow-item.cjs.entry.js +4 -13
- package/dist/cjs/limel-progress-flow.cjs.entry.js +4 -20
- package/dist/cjs/limel-select.cjs.entry.js +20 -32
- package/dist/cjs/limel-shortcut.cjs.entry.js +52 -0
- package/dist/cjs/limel-slider.cjs.entry.js +12 -33
- package/dist/cjs/limel-snackbar.cjs.entry.js +7 -5
- package/dist/cjs/limel-spinner.cjs.entry.js +1 -7
- package/dist/cjs/limel-split-button.cjs.entry.js +35 -0
- package/dist/cjs/limel-switch.cjs.entry.js +6 -19
- package/dist/cjs/limel-tab-bar.cjs.entry.js +2 -5
- package/dist/cjs/limel-tab-panel.cjs.entry.js +2 -5
- package/dist/cjs/limel-table.cjs.entry.js +16 -28
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{translations-5a8d7f6c.js → translations-ca7279bc.js} +6 -0
- package/dist/collection/collection-manifest.json +5 -2
- package/dist/collection/components/badge/badge.js +35 -26
- package/dist/collection/components/banner/banner.js +88 -83
- package/dist/collection/components/button/button.css +4 -1
- package/dist/collection/components/button/button.js +148 -160
- package/dist/collection/components/button-group/button-group.js +81 -79
- package/dist/collection/components/checkbox/checkbox.js +172 -176
- package/dist/collection/components/checkbox/checkbox.template.js +15 -23
- package/dist/collection/components/chip-set/chip-set.js +486 -528
- package/dist/collection/components/circular-progress/circular-progress.css +27 -5
- package/dist/collection/components/circular-progress/circular-progress.js +129 -113
- package/dist/collection/components/code-editor/code-editor.js +178 -182
- package/dist/collection/components/collapsible-section/collapsible-section.js +120 -124
- package/dist/collection/components/color-picker/color-picker-palette.js +102 -92
- package/dist/collection/components/color-picker/color-picker.js +143 -131
- package/dist/collection/components/config/config.js +21 -17
- package/dist/collection/components/date-picker/date-picker.js +254 -261
- package/dist/collection/components/date-picker/flatpickr-adapter/flatpickr-adapter.css +591 -166
- package/dist/collection/components/date-picker/flatpickr-adapter/flatpickr-adapter.js +150 -143
- package/dist/collection/components/date-picker/pickers/QuarterPicker.js +1 -3
- package/dist/collection/components/dialog/dialog.css +7 -1
- package/dist/collection/components/dialog/dialog.js +134 -142
- package/dist/collection/components/dock/dock-button/dock-button.js +138 -141
- package/dist/collection/components/dock/dock.js +204 -233
- package/dist/collection/components/file/file.js +187 -191
- package/dist/collection/components/flex-container/flex-container.js +96 -102
- package/dist/collection/components/form/form.js +158 -150
- package/dist/collection/components/form/widgets/code-editor.js +2 -0
- package/dist/collection/components/grid/grid.js +11 -7
- package/dist/collection/components/header/header.js +89 -87
- package/dist/collection/components/icon/icon.js +79 -66
- package/dist/collection/components/icon-button/icon-button.js +85 -85
- package/dist/collection/components/info-tile/info-tile.css +310 -0
- package/dist/collection/components/info-tile/info-tile.js +294 -0
- package/dist/collection/components/info-tile/info-tile.types.js +1 -0
- package/dist/collection/components/input-field/input-field.css +3 -0
- package/dist/collection/components/input-field/input-field.js +482 -523
- package/dist/collection/components/linear-progress/linear-progress.js +57 -61
- package/dist/collection/components/list/list-renderer.js +3 -12
- package/dist/collection/components/list/list.css +11 -116
- package/dist/collection/components/list/list.js +167 -166
- package/dist/collection/components/list/radio-button/radio-button.template.js +2 -8
- package/dist/collection/components/menu/menu.js +183 -195
- package/dist/collection/components/menu-list/menu-list-renderer.js +2 -9
- package/dist/collection/components/menu-list/menu-list.css +11 -116
- package/dist/collection/components/menu-list/menu-list.js +149 -146
- package/dist/collection/components/menu-surface/menu-surface.js +69 -64
- package/dist/collection/components/picker/picker.js +412 -427
- package/dist/collection/components/popover/popover.js +79 -74
- package/dist/collection/components/popover-surface/popover-surface.js +34 -25
- package/dist/collection/components/portal/portal.js +145 -158
- package/dist/collection/components/progress-flow/progress-flow-item/progress-flow-item.js +90 -94
- package/dist/collection/components/progress-flow/progress-flow.js +93 -101
- package/dist/collection/components/select/select.css +8 -7
- package/dist/collection/components/select/select.js +206 -211
- package/dist/collection/components/select/select.template.js +18 -27
- package/dist/collection/components/shortcut/shortcut.css +91 -0
- package/dist/collection/components/shortcut/shortcut.js +161 -0
- package/dist/collection/components/slider/slider.js +233 -264
- package/dist/collection/components/snackbar/snackbar.js +175 -169
- package/dist/collection/components/spinner/spinner.js +56 -85
- package/dist/collection/components/split-button/split-button.css +84 -0
- package/dist/collection/components/split-button/split-button.js +176 -0
- package/dist/collection/components/switch/switch.js +117 -129
- package/dist/collection/components/tab-bar/tab-bar.js +87 -92
- package/dist/collection/components/tab-panel/tab-panel.js +64 -61
- package/dist/collection/components/table/table.js +447 -457
- package/dist/collection/components/tooltip/tooltip-content.js +70 -61
- package/dist/collection/components/tooltip/tooltip.js +96 -91
- package/dist/collection/global/shared-types/link.types.js +1 -0
- package/dist/collection/style/internal/z-index.scss +0 -5
- package/dist/collection/translations/da.js +1 -0
- package/dist/collection/translations/en.js +1 -0
- package/dist/collection/translations/fi.js +1 -0
- package/dist/collection/translations/nl.js +1 -0
- package/dist/collection/translations/no.js +1 -0
- package/dist/collection/translations/sv.js +1 -0
- package/dist/esm/{checkbox.template-2f1bbc98.js → checkbox.template-fc7fcd06.js} +1 -1
- package/dist/esm/{index-11cd0b60.js → index-cdfd351d.js} +424 -246
- package/dist/esm/lime-elements.js +3 -3
- package/dist/esm/limel-badge.entry.js +2 -1
- package/dist/esm/limel-banner.entry.js +3 -1
- package/dist/esm/limel-button-group.entry.js +3 -8
- package/dist/esm/{limel-button.entry.js → limel-button_2.entry.js} +117 -22
- package/dist/esm/limel-checkbox.entry.js +10 -26
- package/dist/esm/limel-chip-set.entry.js +21 -52
- package/dist/esm/{limel-linear-progress.entry.js → limel-circular-progress_2.entry.js} +34 -8
- package/dist/esm/limel-code-editor.entry.js +110 -97
- package/dist/esm/limel-collapsible-section.entry.js +4 -5
- package/dist/esm/limel-color-picker-palette.entry.js +5 -1
- package/dist/esm/limel-color-picker.entry.js +8 -2
- package/dist/esm/limel-config.entry.js +2 -1
- package/dist/esm/limel-date-picker.entry.js +15 -33
- package/dist/esm/limel-dialog.entry.js +4 -12
- package/dist/esm/limel-dock-button.entry.js +5 -15
- package/dist/esm/limel-dock.entry.js +8 -40
- package/dist/esm/limel-file.entry.js +10 -24
- package/dist/esm/limel-flatpickr-adapter.entry.js +149 -48
- package/dist/esm/limel-flex-container.entry.js +1 -13
- package/dist/esm/limel-form.entry.js +328 -327
- package/dist/esm/limel-grid.entry.js +1 -1
- package/dist/esm/limel-header.entry.js +5 -1
- package/dist/esm/limel-icon-button.entry.js +3 -8
- package/dist/esm/limel-icon.entry.js +4 -1
- package/dist/esm/limel-info-tile.entry.js +91 -0
- package/dist/esm/limel-input-field.entry.js +27 -60
- package/dist/esm/limel-list_2.entry.js +10 -21
- package/dist/esm/limel-menu-list.entry.js +7 -14
- package/dist/esm/limel-picker.entry.js +14 -39
- package/dist/esm/limel-popover_4.entry.js +13 -12
- package/dist/esm/limel-portal.entry.js +63 -73
- package/dist/esm/limel-progress-flow-item.entry.js +4 -13
- package/dist/esm/limel-progress-flow.entry.js +4 -20
- package/dist/esm/limel-select.entry.js +20 -32
- package/dist/esm/limel-shortcut.entry.js +48 -0
- package/dist/esm/limel-slider.entry.js +12 -33
- package/dist/esm/limel-snackbar.entry.js +7 -5
- package/dist/esm/limel-spinner.entry.js +1 -7
- package/dist/esm/limel-split-button.entry.js +31 -0
- package/dist/esm/limel-switch.entry.js +6 -19
- package/dist/esm/limel-tab-bar.entry.js +2 -5
- package/dist/esm/limel-tab-panel.entry.js +2 -5
- package/dist/esm/limel-table.entry.js +16 -28
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/{translations-682e905e.js → translations-0d0ee941.js} +6 -0
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/p-059e0a64.entry.js +1 -0
- package/dist/lime-elements/{p-440454ed.entry.js → p-06f2f6b4.entry.js} +1 -1
- package/dist/lime-elements/p-12a7453b.entry.js +73 -0
- package/dist/lime-elements/p-1386d86d.entry.js +82 -0
- package/dist/lime-elements/p-15c2eb16.entry.js +1 -0
- package/dist/lime-elements/{p-c80acfb2.entry.js → p-15ca0d70.entry.js} +4 -4
- package/dist/lime-elements/{p-ed65468d.entry.js → p-16eb9071.entry.js} +1 -1
- package/dist/lime-elements/{p-1ede893b.js → p-1af8258b.js} +1 -1
- package/dist/lime-elements/{p-71efe2ca.entry.js → p-21058db5.entry.js} +4 -3
- package/dist/lime-elements/p-246862ec.js +1 -0
- package/dist/lime-elements/p-36a3b897.entry.js +1 -0
- package/dist/lime-elements/p-4eda8b67.entry.js +82 -0
- package/dist/lime-elements/{p-9af0704c.entry.js → p-4fb4e89b.entry.js} +1 -1
- package/dist/lime-elements/p-4fc38050.entry.js +1 -0
- package/dist/lime-elements/{p-a5af84a7.entry.js → p-5338663b.entry.js} +1 -1
- package/dist/lime-elements/p-5ce60a32.entry.js +126 -0
- package/dist/lime-elements/p-5f13035a.entry.js +1 -0
- package/dist/lime-elements/p-5f29f099.entry.js +16 -0
- package/dist/lime-elements/p-600464a9.entry.js +1 -0
- package/dist/lime-elements/p-6534e16a.entry.js +1 -0
- package/dist/lime-elements/p-6a4a5ddd.entry.js +1 -0
- package/dist/lime-elements/p-6c38b505.entry.js +1 -0
- package/dist/lime-elements/p-75d01713.entry.js +1 -0
- package/dist/lime-elements/p-768b7cbb.entry.js +1 -0
- package/dist/lime-elements/{p-6e7809a6.entry.js → p-82cd7bb6.entry.js} +1 -1
- package/dist/lime-elements/p-84a137a7.entry.js +1 -0
- package/dist/lime-elements/{p-aa66620a.entry.js → p-8ab597a8.entry.js} +2 -2
- package/dist/lime-elements/{p-8827628d.entry.js → p-8fb83e83.entry.js} +2 -2
- package/dist/lime-elements/p-90961075.entry.js +1 -0
- package/dist/lime-elements/p-9984b31c.entry.js +1 -0
- package/dist/lime-elements/p-9bd76629.entry.js +59 -0
- package/dist/lime-elements/p-9ea8dd5c.entry.js +1 -0
- package/dist/lime-elements/p-cad7cda1.entry.js +16 -0
- package/dist/lime-elements/{p-104c89e8.entry.js → p-cfaa685f.entry.js} +1 -1
- package/dist/lime-elements/{p-94899019.entry.js → p-d1187867.entry.js} +1 -1
- package/dist/lime-elements/p-d4e788e1.js +2 -0
- package/dist/lime-elements/p-d512656b.entry.js +1 -0
- package/dist/lime-elements/p-d8e5a9ee.entry.js +1 -0
- package/dist/lime-elements/p-de161bb5.entry.js +1 -0
- package/dist/lime-elements/p-e4bca82b.entry.js +1 -0
- package/dist/lime-elements/p-e6f84d68.entry.js +1 -0
- package/dist/lime-elements/{p-c15da26d.entry.js → p-e7bb664f.entry.js} +1 -1
- package/dist/lime-elements/p-e88f7922.entry.js +1 -0
- package/dist/lime-elements/p-ec4c075d.entry.js +1 -0
- package/dist/lime-elements/p-f1ed857b.entry.js +37 -0
- package/dist/lime-elements/p-f33cfcb8.entry.js +11 -0
- package/dist/lime-elements/style/internal/z-index.scss +0 -5
- package/dist/loader/package.json +1 -0
- package/dist/types/components/circular-progress/circular-progress.d.ts +5 -0
- package/dist/types/components/dock/dock.d.ts +0 -1
- package/dist/types/components/info-tile/info-tile.d.ts +87 -0
- package/dist/types/components/info-tile/info-tile.types.d.ts +23 -0
- package/dist/types/components/picker/picker.d.ts +2 -2
- package/dist/types/components/shortcut/shortcut.d.ts +42 -0
- package/dist/types/components/split-button/split-button.d.ts +46 -0
- package/dist/types/components.d.ts +403 -67
- package/dist/types/global/shared-types/link.types.d.ts +25 -0
- package/dist/types/interface.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +20 -4
- package/dist/types/translations/da.d.ts +1 -0
- package/dist/types/translations/en.d.ts +1 -0
- package/dist/types/translations/fi.d.ts +1 -0
- package/dist/types/translations/nl.d.ts +1 -0
- package/dist/types/translations/no.d.ts +1 -0
- package/dist/types/translations/sv.d.ts +1 -0
- package/package.json +25 -24
- package/dist/cjs/limel-circular-progress.cjs.entry.js +0 -44
- package/dist/cjs/limel-menu.cjs.entry.js +0 -137
- package/dist/esm/limel-circular-progress.entry.js +0 -40
- package/dist/esm/limel-menu.entry.js +0 -133
- package/dist/lime-elements/p-009de50e.entry.js +0 -1
- package/dist/lime-elements/p-0ba0c38a.entry.js +0 -11
- package/dist/lime-elements/p-19f72dab.entry.js +0 -1
- package/dist/lime-elements/p-2639edf9.entry.js +0 -73
- package/dist/lime-elements/p-2fc4f4ff.entry.js +0 -1
- package/dist/lime-elements/p-3bf54a4c.js +0 -1
- package/dist/lime-elements/p-3cf4aae0.entry.js +0 -1
- package/dist/lime-elements/p-41e902ac.entry.js +0 -126
- package/dist/lime-elements/p-4dc07252.entry.js +0 -82
- package/dist/lime-elements/p-53e01330.entry.js +0 -1
- package/dist/lime-elements/p-5ef52589.entry.js +0 -1
- package/dist/lime-elements/p-629862f4.entry.js +0 -1
- package/dist/lime-elements/p-63e25a0a.entry.js +0 -1
- package/dist/lime-elements/p-6b1bc80f.entry.js +0 -1
- package/dist/lime-elements/p-93cd2268.entry.js +0 -1
- package/dist/lime-elements/p-95f275ab.entry.js +0 -1
- package/dist/lime-elements/p-9917f042.entry.js +0 -16
- package/dist/lime-elements/p-995bbd2a.entry.js +0 -1
- package/dist/lime-elements/p-a465084b.entry.js +0 -82
- package/dist/lime-elements/p-b0046fcd.entry.js +0 -1
- package/dist/lime-elements/p-b0e54dc2.entry.js +0 -1
- package/dist/lime-elements/p-b4de3380.entry.js +0 -1
- package/dist/lime-elements/p-c59cbd68.entry.js +0 -1
- package/dist/lime-elements/p-cb8db8c2.entry.js +0 -37
- package/dist/lime-elements/p-d74fa89e.entry.js +0 -1
- package/dist/lime-elements/p-e98d76e8.entry.js +0 -59
- package/dist/lime-elements/p-e9a95b8f.js +0 -1
- package/dist/lime-elements/p-eec907ac.entry.js +0 -1
- package/dist/lime-elements/p-f0c9dadd.entry.js +0 -1
- package/dist/lime-elements/p-f0e872b6.entry.js +0 -16
- package/dist/lime-elements/p-f41567a1.entry.js +0 -1
- package/dist/lime-elements/p-f5df4d4f.entry.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MDCTextField } from '@material/textfield';
|
|
2
|
-
import {
|
|
2
|
+
import { h, } from '@stencil/core';
|
|
3
3
|
import { debounce } from 'lodash-es';
|
|
4
4
|
import { ARROW_DOWN, ARROW_DOWN_KEY_CODE, ARROW_UP, ARROW_UP_KEY_CODE, ENTER, ENTER_KEY_CODE, ESCAPE, ESCAPE_KEY_CODE, SPACE, SPACE_KEY_CODE, TAB, TAB_KEY_CODE, } from '../../util/keycodes';
|
|
5
5
|
import { getHref, getTarget } from '../../util/link-helper';
|
|
@@ -25,64 +25,6 @@ const helperTextId = 'tf-helper-text';
|
|
|
25
25
|
*/
|
|
26
26
|
export class InputField {
|
|
27
27
|
constructor() {
|
|
28
|
-
/**
|
|
29
|
-
* Set to `true` to disable the field.
|
|
30
|
-
* Use `disabled` to indicate that the field can normally be interacted
|
|
31
|
-
* with, but is currently disabled. This tells the user that if certain
|
|
32
|
-
* requirements are met, the field may become enabled again.
|
|
33
|
-
*/
|
|
34
|
-
this.disabled = false;
|
|
35
|
-
/**
|
|
36
|
-
* Set to `true` to make the field read-only.
|
|
37
|
-
* Use `readonly` when the field is only there to present the data it holds,
|
|
38
|
-
* and will not become possible for the current user to edit.
|
|
39
|
-
*/
|
|
40
|
-
this.readonly = false;
|
|
41
|
-
/**
|
|
42
|
-
* Set to `true` to indicate that the current value of the input field is
|
|
43
|
-
* invalid.
|
|
44
|
-
*/
|
|
45
|
-
this.invalid = false;
|
|
46
|
-
/**
|
|
47
|
-
* Set to `true` to indicate that the field is required.
|
|
48
|
-
*/
|
|
49
|
-
this.required = false;
|
|
50
|
-
/**
|
|
51
|
-
* Type of input.
|
|
52
|
-
*
|
|
53
|
-
* Note** regarding type `url`: `limel-input` uses the native validation
|
|
54
|
-
* built into the browser for many types of input fields. The native
|
|
55
|
-
* validation for `url` is very strict, and does not allow relative urls,
|
|
56
|
-
* nor any other formats that are not a "fully qualified" url. To allow
|
|
57
|
-
* such urls, use the type `urlAsText` instead. `urlAsText` works exactly
|
|
58
|
-
* like `text` in all regards, except that it enables use of the `showLink`
|
|
59
|
-
* property.
|
|
60
|
-
*/
|
|
61
|
-
this.type = 'text';
|
|
62
|
-
/**
|
|
63
|
-
* Set to `true` to format the current value of the input field only
|
|
64
|
-
* if the field is of type number.
|
|
65
|
-
* The number format is determined by the current language of the browser.
|
|
66
|
-
*/
|
|
67
|
-
this.formatNumber = true;
|
|
68
|
-
/**
|
|
69
|
-
* Incremental values that are valid if the field type is `number`.
|
|
70
|
-
*/
|
|
71
|
-
this.step = 'any';
|
|
72
|
-
/**
|
|
73
|
-
* list of suggestions `value` can autocomplete to.
|
|
74
|
-
*/
|
|
75
|
-
this.completions = [];
|
|
76
|
-
/**
|
|
77
|
-
* For inputs of type `email`, `tel`, `url`, and `urlAsText`, set this to
|
|
78
|
-
* `true` to show a trailing icon with a `mailto:`,`tel:`, or normal link,
|
|
79
|
-
* respectively. The default icon can be overridden using the `trailingIcon`
|
|
80
|
-
* property.
|
|
81
|
-
*/
|
|
82
|
-
this.showLink = false;
|
|
83
|
-
this.isFocused = false;
|
|
84
|
-
this.isModified = false;
|
|
85
|
-
this.showCompletions = false;
|
|
86
28
|
this.completionsList = [];
|
|
87
29
|
this.initialize = () => {
|
|
88
30
|
const element = this.limelInputField.shadowRoot.querySelector('.mdc-text-field');
|
|
@@ -135,8 +77,7 @@ export class InputField {
|
|
|
135
77
|
if (this.type !== 'textarea') {
|
|
136
78
|
return;
|
|
137
79
|
}
|
|
138
|
-
return (h("span", { class: "mdc-text-field__resizer" },
|
|
139
|
-
h("textarea", Object.assign({}, properties), this.value)));
|
|
80
|
+
return (h("span", { class: "mdc-text-field__resizer" }, h("textarea", Object.assign({}, properties), this.value)));
|
|
140
81
|
};
|
|
141
82
|
this.layout = () => {
|
|
142
83
|
var _a;
|
|
@@ -173,9 +114,7 @@ export class InputField {
|
|
|
173
114
|
if (!this.maxlength && !this.hasHelperText()) {
|
|
174
115
|
return;
|
|
175
116
|
}
|
|
176
|
-
return (h("div", { tabIndex: -1, class: "mdc-text-field-helper-line" },
|
|
177
|
-
this.renderHelperText(),
|
|
178
|
-
this.renderCharacterCounter()));
|
|
117
|
+
return (h("div", { tabIndex: -1, class: "mdc-text-field-helper-line" }, this.renderHelperText(), this.renderCharacterCounter()));
|
|
179
118
|
};
|
|
180
119
|
this.renderEmptyValueForReadonly = () => {
|
|
181
120
|
if (this.readonly && !this.value) {
|
|
@@ -262,16 +201,14 @@ export class InputField {
|
|
|
262
201
|
if (!this.label) {
|
|
263
202
|
return;
|
|
264
203
|
}
|
|
265
|
-
return (h("span", { class: "mdc-notched-outline__notch" },
|
|
266
|
-
h("span", { class: labelClassList, id: labelId }, this.label)));
|
|
204
|
+
return (h("span", { class: "mdc-notched-outline__notch" }, h("span", { class: labelClassList, id: labelId }, this.label)));
|
|
267
205
|
};
|
|
268
206
|
this.renderLeadingIcon = () => {
|
|
269
207
|
if (this.type === 'textarea') {
|
|
270
208
|
return;
|
|
271
209
|
}
|
|
272
210
|
if (this.leadingIcon) {
|
|
273
|
-
return (h("i", { class: "material-icons mdc-text-field__icon mdc-text-field__icon--leading" },
|
|
274
|
-
h("limel-icon", { name: this.leadingIcon })));
|
|
211
|
+
return (h("i", { class: "material-icons mdc-text-field__icon mdc-text-field__icon--leading" }, h("limel-icon", { name: this.leadingIcon })));
|
|
275
212
|
}
|
|
276
213
|
};
|
|
277
214
|
this.renderTrailingLinkOrButton = () => {
|
|
@@ -313,8 +250,7 @@ export class InputField {
|
|
|
313
250
|
// `preventDefault()` on the event. For links, we don't want that,
|
|
314
251
|
// so instead of `mdc-text-field__icon--trailing`, we use our own class
|
|
315
252
|
// `lime-trailing-icon-for-link`, which uses all the same styling. /Ads
|
|
316
|
-
return (h("a", Object.assign({}, linkProps, { class: "material-icons mdc-text-field__icon lime-trailing-icon-for-link", tabindex: this.disabled || !this.value ? '-1' : '0', role: "button" }),
|
|
317
|
-
h("limel-icon", { name: icon })));
|
|
253
|
+
return (h("a", Object.assign({}, linkProps, { class: "material-icons mdc-text-field__icon lime-trailing-icon-for-link", tabindex: this.disabled || !this.value ? '-1' : '0', role: "button" }), h("limel-icon", { name: icon })));
|
|
318
254
|
};
|
|
319
255
|
this.renderTrailingIcon = (icon) => {
|
|
320
256
|
const props = {
|
|
@@ -325,8 +261,7 @@ export class InputField {
|
|
|
325
261
|
props.onClick = this.handleIconClick;
|
|
326
262
|
props.role = 'button';
|
|
327
263
|
}
|
|
328
|
-
return (h("i", Object.assign({ class: "material-icons mdc-text-field__icon mdc-text-field__icon--trailing" }, props),
|
|
329
|
-
h("limel-icon", { name: icon })));
|
|
264
|
+
return (h("i", Object.assign({ class: "material-icons mdc-text-field__icon mdc-text-field__icon--trailing" }, props), h("limel-icon", { name: icon })));
|
|
330
265
|
};
|
|
331
266
|
this.getTrailingIcon = () => {
|
|
332
267
|
if (this.isInvalid()) {
|
|
@@ -414,12 +349,11 @@ export class InputField {
|
|
|
414
349
|
};
|
|
415
350
|
this.renderPortal = (content = null) => {
|
|
416
351
|
const dropdownZIndex = getComputedStyle(this.limelInputField).getPropertyValue('--dropdown-z-index');
|
|
417
|
-
return (h("limel-portal", { visible: this.showCompletions, containerId: this.portalId, inheritParentWidth: true, containerStyle: { 'z-index': dropdownZIndex } },
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
}, onDismiss: this.handleCloseMenu }, content)));
|
|
352
|
+
return (h("limel-portal", { visible: this.showCompletions, containerId: this.portalId, inheritParentWidth: true, containerStyle: { 'z-index': dropdownZIndex } }, h("limel-menu-surface", { open: this.showCompletions, allowClicksElement: this.limelInputField, style: {
|
|
353
|
+
'--mdc-menu-min-width': '100%',
|
|
354
|
+
'max-height': 'inherit',
|
|
355
|
+
display: 'flex',
|
|
356
|
+
}, onDismiss: this.handleCloseMenu }, content)));
|
|
423
357
|
};
|
|
424
358
|
this.renderDropdown = () => {
|
|
425
359
|
const content = this.renderListResult();
|
|
@@ -492,6 +426,31 @@ export class InputField {
|
|
|
492
426
|
// circumstances when the value is changed by the scrolling.
|
|
493
427
|
// Please test THOROUGHLY if you remove this event handler 😄
|
|
494
428
|
};
|
|
429
|
+
this.disabled = false;
|
|
430
|
+
this.readonly = false;
|
|
431
|
+
this.invalid = false;
|
|
432
|
+
this.label = undefined;
|
|
433
|
+
this.placeholder = undefined;
|
|
434
|
+
this.helperText = undefined;
|
|
435
|
+
this.prefix = undefined;
|
|
436
|
+
this.suffix = undefined;
|
|
437
|
+
this.required = false;
|
|
438
|
+
this.value = undefined;
|
|
439
|
+
this.trailingIcon = undefined;
|
|
440
|
+
this.leadingIcon = undefined;
|
|
441
|
+
this.pattern = undefined;
|
|
442
|
+
this.type = 'text';
|
|
443
|
+
this.formatNumber = true;
|
|
444
|
+
this.step = 'any';
|
|
445
|
+
this.max = undefined;
|
|
446
|
+
this.min = undefined;
|
|
447
|
+
this.maxlength = undefined;
|
|
448
|
+
this.minlength = undefined;
|
|
449
|
+
this.completions = [];
|
|
450
|
+
this.showLink = false;
|
|
451
|
+
this.isFocused = false;
|
|
452
|
+
this.isModified = false;
|
|
453
|
+
this.showCompletions = false;
|
|
495
454
|
const debounceTimeout = 300;
|
|
496
455
|
this.changeEmitter = debounce(this.changeEmitter, debounceTimeout);
|
|
497
456
|
this.portalId = createRandomString();
|
|
@@ -530,19 +489,7 @@ export class InputField {
|
|
|
530
489
|
properties['aria-describedby'] = helperTextId;
|
|
531
490
|
}
|
|
532
491
|
return [
|
|
533
|
-
h("label", { class: this.getContainerClassList() },
|
|
534
|
-
h("span", { class: "mdc-notched-outline", tabindex: "-1" },
|
|
535
|
-
h("span", { class: "mdc-notched-outline__leading" }),
|
|
536
|
-
this.renderLabel(labelId),
|
|
537
|
-
h("span", { class: "mdc-notched-outline__trailing" })),
|
|
538
|
-
this.renderLeadingIcon(),
|
|
539
|
-
this.renderEmptyValueForReadonly(),
|
|
540
|
-
this.renderPrefix(),
|
|
541
|
-
this.renderFormattedNumber(),
|
|
542
|
-
this.renderInput(properties),
|
|
543
|
-
this.renderSuffix(),
|
|
544
|
-
this.renderTextarea(properties),
|
|
545
|
-
this.renderTrailingLinkOrButton()),
|
|
492
|
+
h("label", { class: this.getContainerClassList() }, h("span", { class: "mdc-notched-outline", tabindex: "-1" }, h("span", { class: "mdc-notched-outline__leading" }), this.renderLabel(labelId), h("span", { class: "mdc-notched-outline__trailing" })), this.renderLeadingIcon(), this.renderEmptyValueForReadonly(), this.renderPrefix(), this.renderFormattedNumber(), this.renderInput(properties), this.renderSuffix(), this.renderTextarea(properties), this.renderTrailingLinkOrButton()),
|
|
546
493
|
this.renderHelperLine(),
|
|
547
494
|
this.renderAutocompleteList(),
|
|
548
495
|
];
|
|
@@ -557,439 +504,451 @@ export class InputField {
|
|
|
557
504
|
}
|
|
558
505
|
static get is() { return "limel-input-field"; }
|
|
559
506
|
static get encapsulation() { return "shadow"; }
|
|
560
|
-
static get originalStyleUrls() {
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
"
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
"
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
"
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
"
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
"
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
"
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
"
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
"
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
"
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
"
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
"
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
"
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
"
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
"
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
507
|
+
static get originalStyleUrls() {
|
|
508
|
+
return {
|
|
509
|
+
"$": ["input-field.scss"]
|
|
510
|
+
};
|
|
511
|
+
}
|
|
512
|
+
static get styleUrls() {
|
|
513
|
+
return {
|
|
514
|
+
"$": ["input-field.css"]
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
static get properties() {
|
|
518
|
+
return {
|
|
519
|
+
"disabled": {
|
|
520
|
+
"type": "boolean",
|
|
521
|
+
"mutable": false,
|
|
522
|
+
"complexType": {
|
|
523
|
+
"original": "boolean",
|
|
524
|
+
"resolved": "boolean",
|
|
525
|
+
"references": {}
|
|
526
|
+
},
|
|
527
|
+
"required": false,
|
|
528
|
+
"optional": false,
|
|
529
|
+
"docs": {
|
|
530
|
+
"tags": [],
|
|
531
|
+
"text": "Set to `true` to disable the field.\nUse `disabled` to indicate that the field can normally be interacted\nwith, but is currently disabled. This tells the user that if certain\nrequirements are met, the field may become enabled again."
|
|
532
|
+
},
|
|
533
|
+
"attribute": "disabled",
|
|
534
|
+
"reflect": true,
|
|
535
|
+
"defaultValue": "false"
|
|
536
|
+
},
|
|
537
|
+
"readonly": {
|
|
538
|
+
"type": "boolean",
|
|
539
|
+
"mutable": false,
|
|
540
|
+
"complexType": {
|
|
541
|
+
"original": "boolean",
|
|
542
|
+
"resolved": "boolean",
|
|
543
|
+
"references": {}
|
|
544
|
+
},
|
|
545
|
+
"required": false,
|
|
546
|
+
"optional": false,
|
|
547
|
+
"docs": {
|
|
548
|
+
"tags": [],
|
|
549
|
+
"text": "Set to `true` to make the field read-only.\nUse `readonly` when the field is only there to present the data it holds,\nand will not become possible for the current user to edit."
|
|
550
|
+
},
|
|
551
|
+
"attribute": "readonly",
|
|
552
|
+
"reflect": true,
|
|
553
|
+
"defaultValue": "false"
|
|
554
|
+
},
|
|
555
|
+
"invalid": {
|
|
556
|
+
"type": "boolean",
|
|
557
|
+
"mutable": false,
|
|
558
|
+
"complexType": {
|
|
559
|
+
"original": "boolean",
|
|
560
|
+
"resolved": "boolean",
|
|
561
|
+
"references": {}
|
|
562
|
+
},
|
|
563
|
+
"required": false,
|
|
564
|
+
"optional": false,
|
|
565
|
+
"docs": {
|
|
566
|
+
"tags": [],
|
|
567
|
+
"text": "Set to `true` to indicate that the current value of the input field is\ninvalid."
|
|
568
|
+
},
|
|
569
|
+
"attribute": "invalid",
|
|
570
|
+
"reflect": true,
|
|
571
|
+
"defaultValue": "false"
|
|
572
|
+
},
|
|
573
|
+
"label": {
|
|
574
|
+
"type": "string",
|
|
575
|
+
"mutable": false,
|
|
576
|
+
"complexType": {
|
|
577
|
+
"original": "string",
|
|
578
|
+
"resolved": "string",
|
|
579
|
+
"references": {}
|
|
580
|
+
},
|
|
581
|
+
"required": false,
|
|
582
|
+
"optional": false,
|
|
583
|
+
"docs": {
|
|
584
|
+
"tags": [],
|
|
585
|
+
"text": "The input label."
|
|
586
|
+
},
|
|
587
|
+
"attribute": "label",
|
|
588
|
+
"reflect": true
|
|
589
|
+
},
|
|
590
|
+
"placeholder": {
|
|
591
|
+
"type": "string",
|
|
592
|
+
"mutable": false,
|
|
593
|
+
"complexType": {
|
|
594
|
+
"original": "string",
|
|
595
|
+
"resolved": "string",
|
|
596
|
+
"references": {}
|
|
597
|
+
},
|
|
598
|
+
"required": false,
|
|
599
|
+
"optional": false,
|
|
600
|
+
"docs": {
|
|
601
|
+
"tags": [],
|
|
602
|
+
"text": "The placeholder text shown inside the input field, when the field is focused and empty."
|
|
603
|
+
},
|
|
604
|
+
"attribute": "placeholder",
|
|
605
|
+
"reflect": true
|
|
606
|
+
},
|
|
607
|
+
"helperText": {
|
|
608
|
+
"type": "string",
|
|
609
|
+
"mutable": false,
|
|
610
|
+
"complexType": {
|
|
611
|
+
"original": "string",
|
|
612
|
+
"resolved": "string",
|
|
613
|
+
"references": {}
|
|
614
|
+
},
|
|
615
|
+
"required": false,
|
|
616
|
+
"optional": false,
|
|
617
|
+
"docs": {
|
|
618
|
+
"tags": [],
|
|
619
|
+
"text": "Optional helper text to display below the input field when it has focus"
|
|
620
|
+
},
|
|
621
|
+
"attribute": "helper-text",
|
|
622
|
+
"reflect": true
|
|
623
|
+
},
|
|
624
|
+
"prefix": {
|
|
625
|
+
"type": "string",
|
|
626
|
+
"mutable": false,
|
|
627
|
+
"complexType": {
|
|
628
|
+
"original": "string",
|
|
629
|
+
"resolved": "string",
|
|
630
|
+
"references": {}
|
|
631
|
+
},
|
|
632
|
+
"required": false,
|
|
633
|
+
"optional": false,
|
|
634
|
+
"docs": {
|
|
635
|
+
"tags": [],
|
|
636
|
+
"text": "A short piece of text to display before the value inside the input field.\nDisplayed for all types except `textarea`."
|
|
637
|
+
},
|
|
638
|
+
"attribute": "prefix",
|
|
639
|
+
"reflect": true
|
|
640
|
+
},
|
|
641
|
+
"suffix": {
|
|
642
|
+
"type": "string",
|
|
643
|
+
"mutable": false,
|
|
644
|
+
"complexType": {
|
|
645
|
+
"original": "string",
|
|
646
|
+
"resolved": "string",
|
|
647
|
+
"references": {}
|
|
648
|
+
},
|
|
649
|
+
"required": false,
|
|
650
|
+
"optional": false,
|
|
651
|
+
"docs": {
|
|
652
|
+
"tags": [],
|
|
653
|
+
"text": "A short piece of text to display after the value inside the input field.\nDisplayed for all types except `textarea`."
|
|
654
|
+
},
|
|
655
|
+
"attribute": "suffix",
|
|
656
|
+
"reflect": true
|
|
657
|
+
},
|
|
658
|
+
"required": {
|
|
659
|
+
"type": "boolean",
|
|
660
|
+
"mutable": false,
|
|
661
|
+
"complexType": {
|
|
662
|
+
"original": "boolean",
|
|
663
|
+
"resolved": "boolean",
|
|
664
|
+
"references": {}
|
|
665
|
+
},
|
|
666
|
+
"required": false,
|
|
667
|
+
"optional": false,
|
|
668
|
+
"docs": {
|
|
669
|
+
"tags": [],
|
|
670
|
+
"text": "Set to `true` to indicate that the field is required."
|
|
671
|
+
},
|
|
672
|
+
"attribute": "required",
|
|
673
|
+
"reflect": true,
|
|
674
|
+
"defaultValue": "false"
|
|
675
|
+
},
|
|
676
|
+
"value": {
|
|
677
|
+
"type": "string",
|
|
678
|
+
"mutable": false,
|
|
679
|
+
"complexType": {
|
|
680
|
+
"original": "string",
|
|
681
|
+
"resolved": "string",
|
|
682
|
+
"references": {}
|
|
683
|
+
},
|
|
684
|
+
"required": false,
|
|
685
|
+
"optional": false,
|
|
686
|
+
"docs": {
|
|
687
|
+
"tags": [],
|
|
688
|
+
"text": "The value of the field."
|
|
689
|
+
},
|
|
690
|
+
"attribute": "value",
|
|
691
|
+
"reflect": true
|
|
692
|
+
},
|
|
693
|
+
"trailingIcon": {
|
|
694
|
+
"type": "string",
|
|
695
|
+
"mutable": false,
|
|
696
|
+
"complexType": {
|
|
697
|
+
"original": "string",
|
|
698
|
+
"resolved": "string",
|
|
699
|
+
"references": {}
|
|
700
|
+
},
|
|
701
|
+
"required": false,
|
|
702
|
+
"optional": false,
|
|
703
|
+
"docs": {
|
|
704
|
+
"tags": [],
|
|
705
|
+
"text": "Trailing icon to show to the far right in the field."
|
|
706
|
+
},
|
|
707
|
+
"attribute": "trailing-icon",
|
|
708
|
+
"reflect": true
|
|
709
|
+
},
|
|
710
|
+
"leadingIcon": {
|
|
711
|
+
"type": "string",
|
|
712
|
+
"mutable": false,
|
|
713
|
+
"complexType": {
|
|
714
|
+
"original": "string",
|
|
715
|
+
"resolved": "string",
|
|
716
|
+
"references": {}
|
|
717
|
+
},
|
|
718
|
+
"required": false,
|
|
719
|
+
"optional": false,
|
|
720
|
+
"docs": {
|
|
721
|
+
"tags": [],
|
|
722
|
+
"text": "Leading icon to show to the far left in the field."
|
|
723
|
+
},
|
|
724
|
+
"attribute": "leading-icon",
|
|
725
|
+
"reflect": true
|
|
726
|
+
},
|
|
727
|
+
"pattern": {
|
|
728
|
+
"type": "string",
|
|
729
|
+
"mutable": false,
|
|
730
|
+
"complexType": {
|
|
731
|
+
"original": "string",
|
|
732
|
+
"resolved": "string",
|
|
733
|
+
"references": {}
|
|
734
|
+
},
|
|
735
|
+
"required": false,
|
|
736
|
+
"optional": false,
|
|
737
|
+
"docs": {
|
|
738
|
+
"tags": [],
|
|
739
|
+
"text": "Regular expression that the current value of the input field must match.\nNo forward slashes should be specified around the pattern.\nOnly used if type is `text`, `tel`, `email`, `url`, `urlAsText`,\n`password`, or `search`."
|
|
740
|
+
},
|
|
741
|
+
"attribute": "pattern",
|
|
742
|
+
"reflect": true
|
|
743
|
+
},
|
|
744
|
+
"type": {
|
|
745
|
+
"type": "string",
|
|
746
|
+
"mutable": false,
|
|
747
|
+
"complexType": {
|
|
748
|
+
"original": "InputType",
|
|
749
|
+
"resolved": "\"date\" | \"datetime-local\" | \"email\" | \"month\" | \"number\" | \"password\" | \"search\" | \"tel\" | \"text\" | \"textarea\" | \"time\" | \"url\" | \"urlAsText\" | \"week\"",
|
|
750
|
+
"references": {
|
|
751
|
+
"InputType": {
|
|
752
|
+
"location": "import",
|
|
753
|
+
"path": "./input-field.types"
|
|
754
|
+
}
|
|
802
755
|
}
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
"defaultValue": "false"
|
|
952
|
-
}
|
|
953
|
-
}; }
|
|
954
|
-
static get states() { return {
|
|
955
|
-
"isFocused": {},
|
|
956
|
-
"isModified": {},
|
|
957
|
-
"showCompletions": {}
|
|
958
|
-
}; }
|
|
959
|
-
static get events() { return [{
|
|
960
|
-
"method": "change",
|
|
961
|
-
"name": "change",
|
|
962
|
-
"bubbles": true,
|
|
963
|
-
"cancelable": true,
|
|
964
|
-
"composed": true,
|
|
965
|
-
"docs": {
|
|
966
|
-
"tags": [],
|
|
967
|
-
"text": "Emitted when the input value is changed."
|
|
968
|
-
},
|
|
969
|
-
"complexType": {
|
|
970
|
-
"original": "string",
|
|
971
|
-
"resolved": "string",
|
|
972
|
-
"references": {}
|
|
973
|
-
}
|
|
974
|
-
}, {
|
|
975
|
-
"method": "action",
|
|
976
|
-
"name": "action",
|
|
977
|
-
"bubbles": true,
|
|
978
|
-
"cancelable": true,
|
|
979
|
-
"composed": true,
|
|
980
|
-
"docs": {
|
|
981
|
-
"tags": [],
|
|
982
|
-
"text": "Emitted when `trailingIcon` or `leadingIcon` is set\nand the icon is interacted with."
|
|
983
|
-
},
|
|
984
|
-
"complexType": {
|
|
985
|
-
"original": "void",
|
|
986
|
-
"resolved": "void",
|
|
987
|
-
"references": {}
|
|
756
|
+
},
|
|
757
|
+
"required": false,
|
|
758
|
+
"optional": false,
|
|
759
|
+
"docs": {
|
|
760
|
+
"tags": [],
|
|
761
|
+
"text": "Type of input.\n\nNote** regarding type `url`: `limel-input` uses the native validation\nbuilt into the browser for many types of input fields. The native\nvalidation for `url` is very strict, and does not allow relative urls,\nnor any other formats that are not a \"fully qualified\" url. To allow\nsuch urls, use the type `urlAsText` instead. `urlAsText` works exactly\nlike `text` in all regards, except that it enables use of the `showLink`\nproperty."
|
|
762
|
+
},
|
|
763
|
+
"attribute": "type",
|
|
764
|
+
"reflect": true,
|
|
765
|
+
"defaultValue": "'text'"
|
|
766
|
+
},
|
|
767
|
+
"formatNumber": {
|
|
768
|
+
"type": "boolean",
|
|
769
|
+
"mutable": false,
|
|
770
|
+
"complexType": {
|
|
771
|
+
"original": "boolean",
|
|
772
|
+
"resolved": "boolean",
|
|
773
|
+
"references": {}
|
|
774
|
+
},
|
|
775
|
+
"required": false,
|
|
776
|
+
"optional": false,
|
|
777
|
+
"docs": {
|
|
778
|
+
"tags": [],
|
|
779
|
+
"text": "Set to `true` to format the current value of the input field only\nif the field is of type number.\nThe number format is determined by the current language of the browser."
|
|
780
|
+
},
|
|
781
|
+
"attribute": "format-number",
|
|
782
|
+
"reflect": true,
|
|
783
|
+
"defaultValue": "true"
|
|
784
|
+
},
|
|
785
|
+
"step": {
|
|
786
|
+
"type": "any",
|
|
787
|
+
"mutable": false,
|
|
788
|
+
"complexType": {
|
|
789
|
+
"original": "number | 'any'",
|
|
790
|
+
"resolved": "\"any\" | number",
|
|
791
|
+
"references": {}
|
|
792
|
+
},
|
|
793
|
+
"required": false,
|
|
794
|
+
"optional": false,
|
|
795
|
+
"docs": {
|
|
796
|
+
"tags": [],
|
|
797
|
+
"text": "Incremental values that are valid if the field type is `number`."
|
|
798
|
+
},
|
|
799
|
+
"attribute": "step",
|
|
800
|
+
"reflect": true,
|
|
801
|
+
"defaultValue": "'any'"
|
|
802
|
+
},
|
|
803
|
+
"max": {
|
|
804
|
+
"type": "number",
|
|
805
|
+
"mutable": false,
|
|
806
|
+
"complexType": {
|
|
807
|
+
"original": "number",
|
|
808
|
+
"resolved": "number",
|
|
809
|
+
"references": {}
|
|
810
|
+
},
|
|
811
|
+
"required": false,
|
|
812
|
+
"optional": false,
|
|
813
|
+
"docs": {
|
|
814
|
+
"tags": [],
|
|
815
|
+
"text": "Maximum allowed value if input type is `number`."
|
|
816
|
+
},
|
|
817
|
+
"attribute": "max",
|
|
818
|
+
"reflect": true
|
|
819
|
+
},
|
|
820
|
+
"min": {
|
|
821
|
+
"type": "number",
|
|
822
|
+
"mutable": false,
|
|
823
|
+
"complexType": {
|
|
824
|
+
"original": "number",
|
|
825
|
+
"resolved": "number",
|
|
826
|
+
"references": {}
|
|
827
|
+
},
|
|
828
|
+
"required": false,
|
|
829
|
+
"optional": false,
|
|
830
|
+
"docs": {
|
|
831
|
+
"tags": [],
|
|
832
|
+
"text": "Minimum allowed value if input type is `number`."
|
|
833
|
+
},
|
|
834
|
+
"attribute": "min",
|
|
835
|
+
"reflect": true
|
|
836
|
+
},
|
|
837
|
+
"maxlength": {
|
|
838
|
+
"type": "number",
|
|
839
|
+
"mutable": false,
|
|
840
|
+
"complexType": {
|
|
841
|
+
"original": "number",
|
|
842
|
+
"resolved": "number",
|
|
843
|
+
"references": {}
|
|
844
|
+
},
|
|
845
|
+
"required": false,
|
|
846
|
+
"optional": false,
|
|
847
|
+
"docs": {
|
|
848
|
+
"tags": [],
|
|
849
|
+
"text": "Maximum length of the value if type is `password`, `search`, `tel`,\n`text`, `url`, or `urlAsText`."
|
|
850
|
+
},
|
|
851
|
+
"attribute": "maxlength",
|
|
852
|
+
"reflect": true
|
|
853
|
+
},
|
|
854
|
+
"minlength": {
|
|
855
|
+
"type": "number",
|
|
856
|
+
"mutable": false,
|
|
857
|
+
"complexType": {
|
|
858
|
+
"original": "number",
|
|
859
|
+
"resolved": "number",
|
|
860
|
+
"references": {}
|
|
861
|
+
},
|
|
862
|
+
"required": false,
|
|
863
|
+
"optional": false,
|
|
864
|
+
"docs": {
|
|
865
|
+
"tags": [],
|
|
866
|
+
"text": "Minimum length of the value if type is `password`, `search`, `tel`,\n`text`, `url`, or `urlAsText`."
|
|
867
|
+
},
|
|
868
|
+
"attribute": "minlength",
|
|
869
|
+
"reflect": true
|
|
870
|
+
},
|
|
871
|
+
"completions": {
|
|
872
|
+
"type": "unknown",
|
|
873
|
+
"mutable": false,
|
|
874
|
+
"complexType": {
|
|
875
|
+
"original": "string[]",
|
|
876
|
+
"resolved": "string[]",
|
|
877
|
+
"references": {}
|
|
878
|
+
},
|
|
879
|
+
"required": false,
|
|
880
|
+
"optional": false,
|
|
881
|
+
"docs": {
|
|
882
|
+
"tags": [],
|
|
883
|
+
"text": "list of suggestions `value` can autocomplete to."
|
|
884
|
+
},
|
|
885
|
+
"defaultValue": "[]"
|
|
886
|
+
},
|
|
887
|
+
"showLink": {
|
|
888
|
+
"type": "boolean",
|
|
889
|
+
"mutable": false,
|
|
890
|
+
"complexType": {
|
|
891
|
+
"original": "boolean",
|
|
892
|
+
"resolved": "boolean",
|
|
893
|
+
"references": {}
|
|
894
|
+
},
|
|
895
|
+
"required": false,
|
|
896
|
+
"optional": false,
|
|
897
|
+
"docs": {
|
|
898
|
+
"tags": [],
|
|
899
|
+
"text": "For inputs of type `email`, `tel`, `url`, and `urlAsText`, set this to\n`true` to show a trailing icon with a `mailto:`,`tel:`, or normal link,\nrespectively. The default icon can be overridden using the `trailingIcon`\nproperty."
|
|
900
|
+
},
|
|
901
|
+
"attribute": "show-link",
|
|
902
|
+
"reflect": true,
|
|
903
|
+
"defaultValue": "false"
|
|
988
904
|
}
|
|
989
|
-
}
|
|
905
|
+
};
|
|
906
|
+
}
|
|
907
|
+
static get states() {
|
|
908
|
+
return {
|
|
909
|
+
"isFocused": {},
|
|
910
|
+
"isModified": {},
|
|
911
|
+
"showCompletions": {}
|
|
912
|
+
};
|
|
913
|
+
}
|
|
914
|
+
static get events() {
|
|
915
|
+
return [{
|
|
916
|
+
"method": "change",
|
|
917
|
+
"name": "change",
|
|
918
|
+
"bubbles": true,
|
|
919
|
+
"cancelable": true,
|
|
920
|
+
"composed": true,
|
|
921
|
+
"docs": {
|
|
922
|
+
"tags": [],
|
|
923
|
+
"text": "Emitted when the input value is changed."
|
|
924
|
+
},
|
|
925
|
+
"complexType": {
|
|
926
|
+
"original": "string",
|
|
927
|
+
"resolved": "string",
|
|
928
|
+
"references": {}
|
|
929
|
+
}
|
|
930
|
+
}, {
|
|
931
|
+
"method": "action",
|
|
932
|
+
"name": "action",
|
|
933
|
+
"bubbles": true,
|
|
934
|
+
"cancelable": true,
|
|
935
|
+
"composed": true,
|
|
936
|
+
"docs": {
|
|
937
|
+
"tags": [],
|
|
938
|
+
"text": "Emitted when `trailingIcon` or `leadingIcon` is set\nand the icon is interacted with."
|
|
939
|
+
},
|
|
940
|
+
"complexType": {
|
|
941
|
+
"original": "void",
|
|
942
|
+
"resolved": "void",
|
|
943
|
+
"references": {}
|
|
944
|
+
}
|
|
945
|
+
}];
|
|
946
|
+
}
|
|
990
947
|
static get elementRef() { return "limelInputField"; }
|
|
991
|
-
static get watchers() {
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
948
|
+
static get watchers() {
|
|
949
|
+
return [{
|
|
950
|
+
"propName": "value",
|
|
951
|
+
"methodName": "valueWatcher"
|
|
952
|
+
}];
|
|
953
|
+
}
|
|
995
954
|
}
|