@limetech/lime-elements 36.0.0-next.9 → 36.1.0-dev.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-b6c6562c.js → checkbox.template-ac867c17.js} +1 -1
- package/dist/cjs/{dateFormatter-05d80b12.js → dateFormatter-d7a8d40d.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 +24 -3
- 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 +40 -63
- package/dist/cjs/limel-circular-progress.cjs.entry.js +10 -15
- package/dist/cjs/limel-code-editor.cjs.entry.js +1693 -86
- package/dist/cjs/limel-collapsible-section.cjs.entry.js +5 -6
- 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 +18 -36
- package/dist/cjs/limel-dialog.cjs.entry.js +3 -11
- package/dist/cjs/limel-dock-button.cjs.entry.js +30 -14
- package/dist/cjs/limel-dock.cjs.entry.js +12 -47
- package/dist/cjs/limel-file.cjs.entry.js +10 -24
- package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +151 -50
- package/dist/cjs/limel-flex-container.cjs.entry.js +1 -13
- package/dist/cjs/limel-form.cjs.entry.js +327 -328
- 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-input-field.cjs.entry.js +40 -66
- package/dist/cjs/limel-linear-progress.cjs.entry.js +1 -7
- package/dist/cjs/limel-list_2.cjs.entry.js +9 -18
- package/dist/cjs/limel-menu-list.cjs.entry.js +8 -16
- package/dist/cjs/limel-picker.cjs.entry.js +14 -39
- package/dist/cjs/limel-popover_4.cjs.entry.js +14 -13
- package/dist/cjs/limel-portal.cjs.entry.js +63 -73
- package/dist/cjs/limel-progress-flow-item.cjs.entry.js +5 -14
- package/dist/cjs/limel-progress-flow.cjs.entry.js +4 -20
- package/dist/cjs/limel-select.cjs.entry.js +12 -30
- 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 +27 -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 +33 -33
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{moment-5cfac5cd.js → moment-d1e35cdc.js} +2 -2
- package/dist/cjs/{translations-5a8d7f6c.js → translations-ca7279bc.js} +6 -0
- package/dist/collection/collection-manifest.json +4 -2
- package/dist/collection/components/badge/badge.css +13 -0
- package/dist/collection/components/badge/badge.js +60 -28
- package/dist/collection/components/banner/banner.js +88 -83
- package/dist/collection/components/button/button.css +15 -8
- 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.css +10 -2
- package/dist/collection/components/chip-set/chip-set.js +500 -534
- 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.css +153 -1
- package/dist/collection/components/code-editor/code-editor.js +219 -135
- package/dist/collection/components/collapsible-section/collapsible-section.css +8 -7
- 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 +255 -245
- package/dist/collection/components/date-picker/flatpickr-adapter/flatpickr-adapter.css +595 -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.js +134 -142
- package/dist/collection/components/dock/dock-button/dock-button.css +15 -9
- package/dist/collection/components/dock/dock-button/dock-button.js +158 -124
- package/dist/collection/components/dock/dock.css +7 -3
- package/dist/collection/components/dock/dock.js +207 -205
- 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/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/input-field/input-field.css +9 -8
- package/dist/collection/components/input-field/input-field.js +494 -510
- 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.js +167 -164
- package/dist/collection/components/list/radio-button/radio-button.template.js +2 -8
- package/dist/collection/components/menu/menu.js +185 -208
- package/dist/collection/components/menu-list/menu-list-renderer.js +2 -9
- package/dist/collection/components/menu-list/menu-list.js +150 -167
- 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.css +9 -4
- 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.css +21 -8
- 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 +10 -11
- package/dist/collection/components/select/select.js +206 -211
- package/dist/collection/components/select/select.template.js +10 -25
- package/dist/collection/components/shortcut/shortcut.css +91 -0
- package/dist/collection/components/shortcut/shortcut.js +194 -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 +75 -0
- package/dist/collection/components/split-button/split-button.js +168 -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/columns.js +1 -0
- package/dist/collection/components/table/layout.js +8 -0
- package/dist/collection/components/table/table.css +89 -61
- package/dist/collection/components/table/table.js +453 -432
- package/dist/collection/components/tooltip/tooltip-content.js +70 -61
- package/dist/collection/components/tooltip/tooltip.js +96 -91
- package/dist/collection/icons/angle_left.svg +593 -0
- package/dist/collection/icons/angle_right.svg +593 -0
- package/dist/collection/icons/external_link.svg +593 -0
- package/dist/collection/icons/high_importance.svg +593 -0
- package/dist/collection/icons/unit-test.svg +593 -0
- package/dist/collection/style/internal/codemirror-tooltip.scss +19 -0
- package/dist/collection/style/internal/z-index.scss +0 -7
- package/dist/collection/style/mixins.scss +11 -0
- 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/{dateFormatter-2cad0292.js → dateFormatter-784c3334.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 +24 -3
- 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 +40 -63
- package/dist/esm/limel-circular-progress.entry.js +10 -15
- package/dist/esm/limel-code-editor.entry.js +1693 -86
- package/dist/esm/limel-collapsible-section.entry.js +5 -6
- 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 +18 -36
- package/dist/esm/limel-dialog.entry.js +3 -11
- package/dist/esm/limel-dock-button.entry.js +30 -14
- package/dist/esm/limel-dock.entry.js +12 -47
- package/dist/esm/limel-file.entry.js +10 -24
- package/dist/esm/limel-flatpickr-adapter.entry.js +151 -50
- package/dist/esm/limel-flex-container.entry.js +1 -13
- package/dist/esm/limel-form.entry.js +327 -328
- 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-input-field.entry.js +40 -66
- package/dist/esm/limel-linear-progress.entry.js +1 -7
- package/dist/esm/limel-list_2.entry.js +9 -18
- package/dist/esm/limel-menu-list.entry.js +8 -16
- package/dist/esm/limel-picker.entry.js +14 -39
- package/dist/esm/limel-popover_4.entry.js +14 -13
- package/dist/esm/limel-portal.entry.js +63 -73
- package/dist/esm/limel-progress-flow-item.entry.js +5 -14
- package/dist/esm/limel-progress-flow.entry.js +4 -20
- package/dist/esm/limel-select.entry.js +12 -30
- 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 +23 -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 +33 -33
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{moment-367e51c5.js → moment-faa8a4a8.js} +2 -2
- 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.css +1 -1
- 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-71efe2ca.entry.js → p-0dbde06f.entry.js} +1 -1
- package/dist/lime-elements/p-12a7453b.entry.js +73 -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-246862ec.js +1 -0
- package/dist/lime-elements/p-28dffd9e.entry.js +1 -0
- package/dist/lime-elements/p-334b5f82.entry.js +37 -0
- package/dist/lime-elements/p-36a3b897.entry.js +1 -0
- package/dist/lime-elements/p-4b426b7e.entry.js +11 -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-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-42b67933.entry.js → p-600464a9.entry.js} +1 -1
- 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-d76f896d.js → p-73df4d83.js} +1 -1
- package/dist/lime-elements/p-744c21f8.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-8715eac0.entry.js +1 -0
- 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-945afca2.js +3 -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-9f19e0c1.entry.js +1 -0
- package/dist/lime-elements/p-ace4e596.entry.js +1 -0
- package/dist/lime-elements/p-cad7cda1.entry.js +16 -0
- package/dist/lime-elements/p-cfaa685f.entry.js +1 -0
- package/dist/lime-elements/{p-94899019.entry.js → p-d1187867.entry.js} +1 -1
- package/dist/lime-elements/{p-aa66620a.entry.js → p-d3ebc657.entry.js} +2 -2
- 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-dcd2a664.entry.js +16 -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-e7bb664f.entry.js +1 -0
- package/dist/lime-elements/p-ef04b849.entry.js +82 -0
- package/dist/lime-elements/style/internal/codemirror-tooltip.scss +19 -0
- package/dist/lime-elements/style/internal/z-index.scss +0 -7
- package/dist/lime-elements/style/mixins.scss +11 -0
- package/dist/loader/package.json +1 -0
- package/dist/types/components/badge/badge.d.ts +12 -4
- package/dist/types/components/chip-set/chip-set.d.ts +3 -2
- package/dist/types/components/circular-progress/circular-progress.d.ts +5 -0
- package/dist/types/components/code-editor/code-editor.d.ts +14 -0
- package/dist/types/components/date-picker/date-picker.d.ts +4 -0
- package/dist/types/components/dock/dock-button/dock-button.d.ts +21 -5
- package/dist/types/components/dock/dock.d.ts +11 -3
- package/dist/types/components/input-field/input-field.d.ts +6 -0
- package/dist/types/components/menu/menu.d.ts +1 -2
- package/dist/types/components/menu-list/menu-list.d.ts +2 -7
- package/dist/types/components/picker/picker.d.ts +2 -2
- package/dist/types/components/shortcut/shortcut.d.ts +57 -0
- package/dist/types/components/split-button/split-button.d.ts +45 -0
- package/dist/types/components/tab-bar/tab.types.d.ts +1 -1
- package/dist/types/components/table/layout.d.ts +2 -0
- package/dist/types/components/table/table.d.ts +16 -1
- package/dist/types/components/table/table.types.d.ts +4 -0
- package/dist/types/components.d.ts +390 -80
- 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 +27 -26
- package/dist/cjs/limel-menu.cjs.entry.js +0 -148
- package/dist/esm/limel-menu.entry.js +0 -144
- package/dist/lime-elements/p-009de50e.entry.js +0 -1
- package/dist/lime-elements/p-19f72dab.entry.js +0 -1
- package/dist/lime-elements/p-1a2ffe75.entry.js +0 -82
- package/dist/lime-elements/p-1dfccbc5.entry.js +0 -1
- package/dist/lime-elements/p-1e59114e.entry.js +0 -1
- package/dist/lime-elements/p-2639edf9.entry.js +0 -73
- package/dist/lime-elements/p-3af5f9ad.js +0 -3
- package/dist/lime-elements/p-3bf54a4c.js +0 -1
- package/dist/lime-elements/p-53e01330.entry.js +0 -1
- package/dist/lime-elements/p-5ad60e14.entry.js +0 -126
- package/dist/lime-elements/p-63e25a0a.entry.js +0 -1
- package/dist/lime-elements/p-64f068a8.entry.js +0 -1
- package/dist/lime-elements/p-6884b012.entry.js +0 -1
- package/dist/lime-elements/p-6966b5df.entry.js +0 -1
- package/dist/lime-elements/p-6b1bc80f.entry.js +0 -1
- package/dist/lime-elements/p-722d32e0.entry.js +0 -1
- package/dist/lime-elements/p-75152d89.entry.js +0 -1
- package/dist/lime-elements/p-7e571ec6.entry.js +0 -11
- package/dist/lime-elements/p-7ee4b825.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-97d6c4a6.entry.js +0 -1
- 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-af0ec482.entry.js +0 -16
- package/dist/lime-elements/p-b0046fcd.entry.js +0 -1
- package/dist/lime-elements/p-b95e80c9.entry.js +0 -1
- package/dist/lime-elements/p-bd098a11.entry.js +0 -1
- package/dist/lime-elements/p-d1ee4501.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-f0c9dadd.entry.js +0 -1
- package/dist/lime-elements/p-f0e872b6.entry.js +0 -16
|
@@ -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';
|
|
@@ -7,6 +7,7 @@ import { createRandomString } from '../../util/random-string';
|
|
|
7
7
|
const helperTextId = 'tf-helper-text';
|
|
8
8
|
/**
|
|
9
9
|
* @exampleComponent limel-example-input-field-text
|
|
10
|
+
* @exampleComponent limel-example-input-field-placeholder
|
|
10
11
|
* @exampleComponent limel-example-input-field-text-multiple
|
|
11
12
|
* @exampleComponent limel-example-input-field-number
|
|
12
13
|
* @exampleComponent limel-example-input-field-autocomplete
|
|
@@ -24,64 +25,6 @@ const helperTextId = 'tf-helper-text';
|
|
|
24
25
|
*/
|
|
25
26
|
export class InputField {
|
|
26
27
|
constructor() {
|
|
27
|
-
/**
|
|
28
|
-
* Set to `true` to disable the field.
|
|
29
|
-
* Use `disabled` to indicate that the field can normally be interacted
|
|
30
|
-
* with, but is currently disabled. This tells the user that if certain
|
|
31
|
-
* requirements are met, the field may become enabled again.
|
|
32
|
-
*/
|
|
33
|
-
this.disabled = false;
|
|
34
|
-
/**
|
|
35
|
-
* Set to `true` to make the field read-only.
|
|
36
|
-
* Use `readonly` when the field is only there to present the data it holds,
|
|
37
|
-
* and will not become possible for the current user to edit.
|
|
38
|
-
*/
|
|
39
|
-
this.readonly = false;
|
|
40
|
-
/**
|
|
41
|
-
* Set to `true` to indicate that the current value of the input field is
|
|
42
|
-
* invalid.
|
|
43
|
-
*/
|
|
44
|
-
this.invalid = false;
|
|
45
|
-
/**
|
|
46
|
-
* Set to `true` to indicate that the field is required.
|
|
47
|
-
*/
|
|
48
|
-
this.required = false;
|
|
49
|
-
/**
|
|
50
|
-
* Type of input.
|
|
51
|
-
*
|
|
52
|
-
* Note** regarding type `url`: `limel-input` uses the native validation
|
|
53
|
-
* built into the browser for many types of input fields. The native
|
|
54
|
-
* validation for `url` is very strict, and does not allow relative urls,
|
|
55
|
-
* nor any other formats that are not a "fully qualified" url. To allow
|
|
56
|
-
* such urls, use the type `urlAsText` instead. `urlAsText` works exactly
|
|
57
|
-
* like `text` in all regards, except that it enables use of the `showLink`
|
|
58
|
-
* property.
|
|
59
|
-
*/
|
|
60
|
-
this.type = 'text';
|
|
61
|
-
/**
|
|
62
|
-
* Set to `true` to format the current value of the input field only
|
|
63
|
-
* if the field is of type number.
|
|
64
|
-
* The number format is determined by the current language of the browser.
|
|
65
|
-
*/
|
|
66
|
-
this.formatNumber = true;
|
|
67
|
-
/**
|
|
68
|
-
* Incremental values that are valid if the field type is `number`.
|
|
69
|
-
*/
|
|
70
|
-
this.step = 'any';
|
|
71
|
-
/**
|
|
72
|
-
* list of suggestions `value` can autocomplete to.
|
|
73
|
-
*/
|
|
74
|
-
this.completions = [];
|
|
75
|
-
/**
|
|
76
|
-
* For inputs of type `email`, `tel`, `url`, and `urlAsText`, set this to
|
|
77
|
-
* `true` to show a trailing icon with a `mailto:`,`tel:`, or normal link,
|
|
78
|
-
* respectively. The default icon can be overridden using the `trailingIcon`
|
|
79
|
-
* property.
|
|
80
|
-
*/
|
|
81
|
-
this.showLink = false;
|
|
82
|
-
this.isFocused = false;
|
|
83
|
-
this.isModified = false;
|
|
84
|
-
this.showCompletions = false;
|
|
85
28
|
this.completionsList = [];
|
|
86
29
|
this.initialize = () => {
|
|
87
30
|
const element = this.limelInputField.shadowRoot.querySelector('.mdc-text-field');
|
|
@@ -101,6 +44,7 @@ export class InputField {
|
|
|
101
44
|
this.getContainerClassList = () => {
|
|
102
45
|
const classList = {
|
|
103
46
|
'mdc-text-field': true,
|
|
47
|
+
'mdc-text-field--no-label': !this.label,
|
|
104
48
|
'mdc-text-field--outlined': true,
|
|
105
49
|
'mdc-text-field--invalid': this.isInvalid(),
|
|
106
50
|
'mdc-text-field--disabled': this.disabled || this.readonly,
|
|
@@ -127,14 +71,13 @@ export class InputField {
|
|
|
127
71
|
return;
|
|
128
72
|
}
|
|
129
73
|
const type = this.type === 'urlAsText' ? 'text' : this.type;
|
|
130
|
-
return (h("input", Object.assign({}, properties, { type: type, pattern: this.pattern, onWheel: this.handleWheel, onKeyDown: this.onKeyDown, value: this.value })));
|
|
74
|
+
return (h("input", Object.assign({}, properties, { type: type, pattern: this.pattern, onWheel: this.handleWheel, onKeyDown: this.onKeyDown, value: this.value, placeholder: this.placeholder })));
|
|
131
75
|
};
|
|
132
76
|
this.renderTextarea = (properties) => {
|
|
133
77
|
if (this.type !== 'textarea') {
|
|
134
78
|
return;
|
|
135
79
|
}
|
|
136
|
-
return (h("span", { class: "mdc-text-field__resizer" },
|
|
137
|
-
h("textarea", Object.assign({}, properties), this.value)));
|
|
80
|
+
return (h("span", { class: "mdc-text-field__resizer" }, h("textarea", Object.assign({}, properties), this.value)));
|
|
138
81
|
};
|
|
139
82
|
this.layout = () => {
|
|
140
83
|
var _a;
|
|
@@ -171,9 +114,7 @@ export class InputField {
|
|
|
171
114
|
if (!this.maxlength && !this.hasHelperText()) {
|
|
172
115
|
return;
|
|
173
116
|
}
|
|
174
|
-
return (h("div", { tabIndex: -1, class: "mdc-text-field-helper-line" },
|
|
175
|
-
this.renderHelperText(),
|
|
176
|
-
this.renderCharacterCounter()));
|
|
117
|
+
return (h("div", { tabIndex: -1, class: "mdc-text-field-helper-line" }, this.renderHelperText(), this.renderCharacterCounter()));
|
|
177
118
|
};
|
|
178
119
|
this.renderEmptyValueForReadonly = () => {
|
|
179
120
|
if (this.readonly && !this.value) {
|
|
@@ -252,13 +193,22 @@ export class InputField {
|
|
|
252
193
|
}
|
|
253
194
|
return this.limelInputField.shadowRoot.querySelector(elementName);
|
|
254
195
|
};
|
|
196
|
+
this.renderLabel = (labelId) => {
|
|
197
|
+
const labelClassList = {
|
|
198
|
+
'mdc-floating-label': true,
|
|
199
|
+
'mdc-floating-label--float-above': !!this.value || this.isFocused || this.readonly,
|
|
200
|
+
};
|
|
201
|
+
if (!this.label) {
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
return (h("span", { class: "mdc-notched-outline__notch" }, h("span", { class: labelClassList, id: labelId }, this.label)));
|
|
205
|
+
};
|
|
255
206
|
this.renderLeadingIcon = () => {
|
|
256
207
|
if (this.type === 'textarea') {
|
|
257
208
|
return;
|
|
258
209
|
}
|
|
259
210
|
if (this.leadingIcon) {
|
|
260
|
-
return (h("i", { class: "material-icons mdc-text-field__icon mdc-text-field__icon--leading" },
|
|
261
|
-
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 })));
|
|
262
212
|
}
|
|
263
213
|
};
|
|
264
214
|
this.renderTrailingLinkOrButton = () => {
|
|
@@ -300,8 +250,7 @@ export class InputField {
|
|
|
300
250
|
// `preventDefault()` on the event. For links, we don't want that,
|
|
301
251
|
// so instead of `mdc-text-field__icon--trailing`, we use our own class
|
|
302
252
|
// `lime-trailing-icon-for-link`, which uses all the same styling. /Ads
|
|
303
|
-
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" }),
|
|
304
|
-
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 })));
|
|
305
254
|
};
|
|
306
255
|
this.renderTrailingIcon = (icon) => {
|
|
307
256
|
const props = {
|
|
@@ -312,8 +261,7 @@ export class InputField {
|
|
|
312
261
|
props.onClick = this.handleIconClick;
|
|
313
262
|
props.role = 'button';
|
|
314
263
|
}
|
|
315
|
-
return (h("i", Object.assign({ class: "material-icons mdc-text-field__icon mdc-text-field__icon--trailing" }, props),
|
|
316
|
-
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 })));
|
|
317
265
|
};
|
|
318
266
|
this.getTrailingIcon = () => {
|
|
319
267
|
if (this.isInvalid()) {
|
|
@@ -401,12 +349,11 @@ export class InputField {
|
|
|
401
349
|
};
|
|
402
350
|
this.renderPortal = (content = null) => {
|
|
403
351
|
const dropdownZIndex = getComputedStyle(this.limelInputField).getPropertyValue('--dropdown-z-index');
|
|
404
|
-
return (h("limel-portal", { visible: this.showCompletions, containerId: this.portalId, inheritParentWidth: true, containerStyle: { 'z-index': dropdownZIndex } },
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
}, 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)));
|
|
410
357
|
};
|
|
411
358
|
this.renderDropdown = () => {
|
|
412
359
|
const content = this.renderListResult();
|
|
@@ -479,6 +426,31 @@ export class InputField {
|
|
|
479
426
|
// circumstances when the value is changed by the scrolling.
|
|
480
427
|
// Please test THOROUGHLY if you remove this event handler 😄
|
|
481
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;
|
|
482
454
|
const debounceTimeout = 300;
|
|
483
455
|
this.changeEmitter = debounce(this.changeEmitter, debounceTimeout);
|
|
484
456
|
this.portalId = createRandomString();
|
|
@@ -516,25 +488,8 @@ export class InputField {
|
|
|
516
488
|
properties['aria-controls'] = helperTextId;
|
|
517
489
|
properties['aria-describedby'] = helperTextId;
|
|
518
490
|
}
|
|
519
|
-
const labelClassList = {
|
|
520
|
-
'mdc-floating-label': true,
|
|
521
|
-
'mdc-floating-label--float-above': !!this.value || this.isFocused || this.readonly,
|
|
522
|
-
};
|
|
523
491
|
return [
|
|
524
|
-
h("label", { class: this.getContainerClassList() },
|
|
525
|
-
h("span", { class: "mdc-notched-outline", tabindex: "-1" },
|
|
526
|
-
h("span", { class: "mdc-notched-outline__leading" }),
|
|
527
|
-
h("span", { class: "mdc-notched-outline__notch" },
|
|
528
|
-
h("span", { class: labelClassList, id: labelId }, this.label)),
|
|
529
|
-
h("span", { class: "mdc-notched-outline__trailing" })),
|
|
530
|
-
this.renderLeadingIcon(),
|
|
531
|
-
this.renderEmptyValueForReadonly(),
|
|
532
|
-
this.renderPrefix(),
|
|
533
|
-
this.renderInput(properties),
|
|
534
|
-
this.renderSuffix(),
|
|
535
|
-
this.renderTextarea(properties),
|
|
536
|
-
this.renderFormattedNumber(),
|
|
537
|
-
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()),
|
|
538
493
|
this.renderHelperLine(),
|
|
539
494
|
this.renderAutocompleteList(),
|
|
540
495
|
];
|
|
@@ -549,422 +504,451 @@ export class InputField {
|
|
|
549
504
|
}
|
|
550
505
|
static get is() { return "limel-input-field"; }
|
|
551
506
|
static get encapsulation() { return "shadow"; }
|
|
552
|
-
static get originalStyleUrls() {
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
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
|
-
|
|
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
|
+
}
|
|
777
755
|
}
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
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
|
-
"defaultValue": "false"
|
|
927
|
-
}
|
|
928
|
-
}; }
|
|
929
|
-
static get states() { return {
|
|
930
|
-
"isFocused": {},
|
|
931
|
-
"isModified": {},
|
|
932
|
-
"showCompletions": {}
|
|
933
|
-
}; }
|
|
934
|
-
static get events() { return [{
|
|
935
|
-
"method": "change",
|
|
936
|
-
"name": "change",
|
|
937
|
-
"bubbles": true,
|
|
938
|
-
"cancelable": true,
|
|
939
|
-
"composed": true,
|
|
940
|
-
"docs": {
|
|
941
|
-
"tags": [],
|
|
942
|
-
"text": "Emitted when the input value is changed."
|
|
943
|
-
},
|
|
944
|
-
"complexType": {
|
|
945
|
-
"original": "string",
|
|
946
|
-
"resolved": "string",
|
|
947
|
-
"references": {}
|
|
948
|
-
}
|
|
949
|
-
}, {
|
|
950
|
-
"method": "action",
|
|
951
|
-
"name": "action",
|
|
952
|
-
"bubbles": true,
|
|
953
|
-
"cancelable": true,
|
|
954
|
-
"composed": true,
|
|
955
|
-
"docs": {
|
|
956
|
-
"tags": [],
|
|
957
|
-
"text": "Emitted when `trailingIcon` or `leadingIcon` is set\nand the icon is interacted with."
|
|
958
|
-
},
|
|
959
|
-
"complexType": {
|
|
960
|
-
"original": "void",
|
|
961
|
-
"resolved": "void",
|
|
962
|
-
"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"
|
|
963
904
|
}
|
|
964
|
-
}
|
|
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
|
+
}
|
|
965
947
|
static get elementRef() { return "limelInputField"; }
|
|
966
|
-
static get watchers() {
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
948
|
+
static get watchers() {
|
|
949
|
+
return [{
|
|
950
|
+
"propName": "value",
|
|
951
|
+
"methodName": "valueWatcher"
|
|
952
|
+
}];
|
|
953
|
+
}
|
|
970
954
|
}
|