@limetech/lime-elements 36.3.1-next.2 → 36.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{dom-20826de0.js → dom-eb080f70.js} +0 -1
- package/dist/cjs/{format-c0047dfb.js → format-5b928cf3.js} +0 -1
- package/dist/cjs/limel-badge.cjs.entry.js +1 -1
- package/dist/cjs/limel-chip-set.cjs.entry.js +0 -6
- package/dist/cjs/limel-circular-progress_2.cjs.entry.js +1 -1
- package/dist/cjs/limel-form.cjs.entry.js +1 -20
- package/dist/cjs/limel-icon.cjs.entry.js +0 -2
- package/dist/cjs/limel-input-field.cjs.entry.js +0 -1
- package/dist/cjs/limel-list_2.cjs.entry.js +1 -5
- package/dist/cjs/limel-menu-list.cjs.entry.js +0 -4
- package/dist/cjs/limel-picker.cjs.entry.js +1 -10
- package/dist/cjs/limel-popover_4.cjs.entry.js +0 -1
- package/dist/cjs/limel-select.cjs.entry.js +1 -1
- package/dist/cjs/limel-snackbar.cjs.entry.js +1 -1
- package/dist/cjs/limel-tab-bar.cjs.entry.js +0 -1
- package/dist/cjs/limel-table.cjs.entry.js +0 -19
- package/dist/cjs/{multiple-8fab83eb.js → multiple-2af83b6d.js} +0 -1
- package/dist/collection/components/badge/badge.js +0 -1
- package/dist/collection/components/badge/format.js +0 -1
- package/dist/collection/components/button-group/button-group.js +0 -1
- package/dist/collection/components/callout/callout.js +0 -1
- package/dist/collection/components/chip-set/chip-set-input-helpers.js +0 -1
- package/dist/collection/components/chip-set/chip-set.js +0 -5
- package/dist/collection/components/circular-progress/circular-progress.js +0 -1
- package/dist/collection/components/code-editor/code-editor.js +1 -2
- package/dist/collection/components/color-picker/color-picker.js +0 -1
- package/dist/collection/components/date-picker/flatpickr-adapter/flatpickr-adapter.js +0 -1
- package/dist/collection/components/dialog/dialog.js +0 -1
- package/dist/collection/components/file/file.js +2 -3
- package/dist/collection/components/flex-container/flex-container.js +0 -1
- package/dist/collection/components/form/adapters/base-adapter.js +0 -12
- package/dist/collection/components/form/fields/field-helpers.js +0 -3
- package/dist/collection/components/form/fields/schema-field.js +0 -3
- package/dist/collection/components/form/templates/common.js +0 -1
- package/dist/collection/components/grid/grid.js +0 -1
- package/dist/collection/components/header/header.js +0 -1
- package/dist/collection/components/helper-line/helper-line.js +0 -1
- package/dist/collection/components/icon/icon.js +0 -2
- package/dist/collection/components/info-tile/info-tile.js +0 -1
- package/dist/collection/components/input-field/input-field.js +0 -1
- package/dist/collection/components/list/list-renderer.js +0 -4
- package/dist/collection/components/menu-list/menu-list-renderer.js +0 -4
- package/dist/collection/components/picker/picker.js +0 -9
- package/dist/collection/components/popover/popover.js +0 -2
- package/dist/collection/components/portal/contains.js +0 -1
- package/dist/collection/components/portal/portal.js +10 -11
- package/dist/collection/components/shortcut/shortcut.js +0 -1
- package/dist/collection/components/snackbar/snackbar.js +26 -3
- package/dist/collection/components/split-button/split-button.js +0 -1
- package/dist/collection/components/tab-bar/tab-bar.js +1 -2
- package/dist/collection/components/tab-bar/tabs.js +0 -1
- package/dist/collection/components/tab-panel/tab-panel.js +0 -1
- package/dist/collection/components/table/columns.js +0 -9
- package/dist/collection/components/table/element-pool.js +0 -2
- package/dist/collection/components/table/selection.js +0 -4
- package/dist/collection/components/table/table-selection.js +0 -4
- package/dist/collection/components/tooltip/tooltip-content.js +0 -1
- package/dist/collection/components/tooltip/tooltip.js +0 -1
- package/dist/collection/global/icon-cache.js +0 -1
- package/dist/collection/util/dom.js +0 -1
- package/dist/collection/util/multiple.js +0 -1
- package/dist/esm/{dom-0f79cbe7.js → dom-2fe617e7.js} +0 -1
- package/dist/esm/{format-a0e2d949.js → format-c76733cb.js} +0 -1
- package/dist/esm/limel-badge.entry.js +1 -1
- package/dist/esm/limel-chip-set.entry.js +0 -6
- package/dist/esm/limel-circular-progress_2.entry.js +1 -1
- package/dist/esm/limel-form.entry.js +1 -20
- package/dist/esm/limel-icon.entry.js +0 -2
- package/dist/esm/limel-input-field.entry.js +0 -1
- package/dist/esm/limel-list_2.entry.js +1 -5
- package/dist/esm/limel-menu-list.entry.js +0 -4
- package/dist/esm/limel-picker.entry.js +1 -10
- package/dist/esm/limel-popover_4.entry.js +0 -1
- package/dist/esm/limel-select.entry.js +1 -1
- package/dist/esm/limel-snackbar.entry.js +1 -1
- package/dist/esm/limel-tab-bar.entry.js +0 -1
- package/dist/esm/limel-table.entry.js +0 -19
- package/dist/esm/{multiple-254f4b61.js → multiple-0bd62427.js} +0 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/{p-4c9ce3d7.entry.js → p-5ab179b4.entry.js} +1 -1
- package/dist/lime-elements/{p-05d88196.entry.js → p-727fd4ea.entry.js} +2 -2
- package/dist/lime-elements/{p-8178b348.entry.js → p-8a2d1761.entry.js} +1 -1
- package/dist/lime-elements/{p-a88f2922.entry.js → p-8d3a9e2c.entry.js} +1 -1
- package/dist/lime-elements/{p-2600928f.entry.js → p-d034bbcf.entry.js} +1 -1
- package/dist/lime-elements/{p-2fd478df.entry.js → p-ef93fd3e.entry.js} +1 -1
- package/dist/lime-elements/{p-58e9df30.entry.js → p-f4cbcdcf.entry.js} +1 -1
- package/dist/types/components/badge/badge.d.ts +0 -1
- package/dist/types/components/badge/format.d.ts +0 -1
- package/dist/types/components/button-group/button-group.d.ts +0 -1
- package/dist/types/components/callout/callout.d.ts +0 -1
- package/dist/types/components/chip-set/chip-set-input-helpers.d.ts +0 -1
- package/dist/types/components/chip-set/chip-set.d.ts +0 -5
- package/dist/types/components/circular-progress/circular-progress.d.ts +0 -1
- package/dist/types/components/code-editor/code-editor.d.ts +1 -2
- package/dist/types/components/color-picker/color-picker.d.ts +0 -1
- package/dist/types/components/date-picker/flatpickr-adapter/flatpickr-adapter.d.ts +0 -1
- package/dist/types/components/dialog/dialog.d.ts +0 -1
- package/dist/types/components/file/file.d.ts +2 -3
- package/dist/types/components/flex-container/flex-container.d.ts +0 -1
- package/dist/types/components/form/adapters/base-adapter.d.ts +0 -11
- package/dist/types/components/form/fields/field-helpers.d.ts +0 -2
- package/dist/types/components/form/fields/schema-field.d.ts +0 -2
- package/dist/types/components/form/templates/common.d.ts +0 -1
- package/dist/types/components/grid/grid.d.ts +0 -1
- package/dist/types/components/header/header.d.ts +0 -1
- package/dist/types/components/helper-line/helper-line.d.ts +0 -1
- package/dist/types/components/icon/icon.d.ts +0 -2
- package/dist/types/components/info-tile/info-tile.d.ts +0 -1
- package/dist/types/components/input-field/input-field.d.ts +0 -1
- package/dist/types/components/list/list-renderer.d.ts +0 -4
- package/dist/types/components/menu-list/menu-list-renderer.d.ts +0 -4
- package/dist/types/components/picker/picker.d.ts +0 -9
- package/dist/types/components/picker/searcher.types.d.ts +0 -1
- package/dist/types/components/popover/popover.d.ts +0 -2
- package/dist/types/components/portal/contains.d.ts +0 -1
- package/dist/types/components/portal/portal.d.ts +10 -11
- package/dist/types/components/shortcut/shortcut.d.ts +0 -1
- package/dist/types/components/snackbar/snackbar.d.ts +23 -1
- package/dist/types/components/split-button/split-button.d.ts +0 -1
- package/dist/types/components/tab-bar/tab-bar.d.ts +1 -2
- package/dist/types/components/tab-bar/tabs.d.ts +0 -1
- package/dist/types/components/tab-panel/tab-panel.d.ts +0 -1
- package/dist/types/components/table/columns.d.ts +0 -7
- package/dist/types/components/table/element-pool.d.ts +0 -2
- package/dist/types/components/table/selection.d.ts +0 -4
- package/dist/types/components/table/table-selection.d.ts +0 -4
- package/dist/types/components/table/table.types.d.ts +0 -3
- package/dist/types/components/tooltip/tooltip-content.d.ts +0 -1
- package/dist/types/components/tooltip/tooltip.d.ts +0 -1
- package/dist/types/components.d.ts +1 -1
- package/dist/types/global/icon-cache.d.ts +0 -1
- package/dist/types/util/dom.d.ts +0 -1
- package/dist/types/util/multiple.d.ts +0 -1
- package/package.json +4 -4
- /package/dist/lime-elements/{p-f08f504b.js → p-0eabb204.js} +0 -0
- /package/dist/lime-elements/{p-0534b23b.js → p-5f020b3c.js} +0 -0
- /package/dist/lime-elements/{p-af8d4fe7.js → p-acf307d9.js} +0 -0
|
@@ -85,7 +85,6 @@ export class ChipSet {
|
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
87
87
|
* Used to find out whether the chip-set is in edit mode.
|
|
88
|
-
*
|
|
89
88
|
* @returns {Promise<boolean>} `true` if the chip-set is in edit mode, `false` otherwise.
|
|
90
89
|
*/
|
|
91
90
|
async getEditMode() {
|
|
@@ -93,7 +92,6 @@ export class ChipSet {
|
|
|
93
92
|
}
|
|
94
93
|
/**
|
|
95
94
|
* Used to set focus to the chip-set input field.
|
|
96
|
-
*
|
|
97
95
|
* @param {boolean} emptyInput if `true`, any text in the input is discarded
|
|
98
96
|
* @returns {Promise<void>} does not return anything, but methods have to be async
|
|
99
97
|
*/
|
|
@@ -111,7 +109,6 @@ export class ChipSet {
|
|
|
111
109
|
/**
|
|
112
110
|
* Used to empty the input field. Used in conjunction with `emptyInputOnBlur` to let the
|
|
113
111
|
* consumer control when the input is emptied.
|
|
114
|
-
*
|
|
115
112
|
* @returns {Promise<void>} does not return anything, but methods have to be async
|
|
116
113
|
*/
|
|
117
114
|
async emptyInput() {
|
|
@@ -240,7 +237,6 @@ export class ChipSet {
|
|
|
240
237
|
}
|
|
241
238
|
/**
|
|
242
239
|
* Enter edit mode when the text field receives focus. When editMode is true, the input element will be visible
|
|
243
|
-
*
|
|
244
240
|
* @returns {void}
|
|
245
241
|
*/
|
|
246
242
|
handleTextFieldFocus() {
|
|
@@ -256,7 +252,6 @@ export class ChipSet {
|
|
|
256
252
|
/**
|
|
257
253
|
* Exit edit mode when the input element loses focus. This makes sure the input element does not take up any
|
|
258
254
|
* additional space when the user it not typing anything
|
|
259
|
-
*
|
|
260
255
|
* @returns {void}
|
|
261
256
|
*/
|
|
262
257
|
handleInputBlur() {
|
|
@@ -18,7 +18,6 @@ const PERCENT = 100;
|
|
|
18
18
|
* Of course such numbers, if bigger than `maxValue` will be visualized as a
|
|
19
19
|
* full progress.
|
|
20
20
|
* :::
|
|
21
|
-
*
|
|
22
21
|
* @exampleComponent limel-example-circular-progress
|
|
23
22
|
* @exampleComponent limel-example-circular-progress-sizes
|
|
24
23
|
* @exampleComponent limel-example-circular-progress-props
|
|
@@ -10,8 +10,7 @@ import 'codemirror/addon/fold/brace-fold';
|
|
|
10
10
|
import jslint from 'jsonlint-mod';
|
|
11
11
|
/**
|
|
12
12
|
* Currently this component support syntax highlighting for `javascript`,
|
|
13
|
-
`json` and `typescript` formats.
|
|
14
|
-
*
|
|
13
|
+
* `json` and `typescript` formats.
|
|
15
14
|
* @exampleComponent limel-example-code-editor
|
|
16
15
|
* @exampleComponent limel-example-code-editor-readonly-with-line-numbers
|
|
17
16
|
* @exampleComponent limel-example-code-editor-fold-lint
|
|
@@ -10,7 +10,6 @@ import { h } from '@stencil/core';
|
|
|
10
10
|
* :::note
|
|
11
11
|
* Make sure to read our [guidelines about usage of colors](/#/DesignGuidelines/color-system.md/) from our palette.
|
|
12
12
|
* :::
|
|
13
|
-
*
|
|
14
13
|
* @exampleComponent limel-example-color-picker
|
|
15
14
|
* @exampleComponent limel-example-color-picker-readonly
|
|
16
15
|
*/
|
|
@@ -11,7 +11,6 @@ import { YearPicker } from '../pickers/YearPicker';
|
|
|
11
11
|
* This component is internal and only supposed to be used by
|
|
12
12
|
* the limel-date-picker. This component is needed in order for us
|
|
13
13
|
* to render the flatpickr calendar in a portal.
|
|
14
|
-
*
|
|
15
14
|
* @private
|
|
16
15
|
*/
|
|
17
16
|
export class DatePickerCalendar {
|
|
@@ -19,7 +19,6 @@ import { createRandomString } from '../../util/random-string';
|
|
|
19
19
|
* you should use the [DialogService](https://lundalogik.github.io/lime-web-components/versions/latest/#/api/dialog-service)
|
|
20
20
|
* from Lime Web Components to open dialogs in Lime CRM.
|
|
21
21
|
* :::
|
|
22
|
-
*
|
|
23
22
|
* @exampleComponent limel-example-dialog
|
|
24
23
|
* @exampleComponent limel-example-dialog-nested-close-events
|
|
25
24
|
* @exampleComponent limel-example-dialog-heading
|
|
@@ -20,7 +20,7 @@ const DEFAULT_FILE_CHIP = {
|
|
|
20
20
|
* visual design including the upload icon hints end-users that this is not a
|
|
21
21
|
* normal input field like other fields in the form for example.
|
|
22
22
|
*
|
|
23
|
-
|
|
23
|
+
* :::important
|
|
24
24
|
* you need to use a descriptive `label` that clarifies the
|
|
25
25
|
* functionality of the file picker, and/or provides users with clear
|
|
26
26
|
* instructions.
|
|
@@ -36,8 +36,7 @@ const DEFAULT_FILE_CHIP = {
|
|
|
36
36
|
* - Choose a file
|
|
37
37
|
*
|
|
38
38
|
* and similar phrases...
|
|
39
|
-
|
|
40
|
-
*
|
|
39
|
+
* :::
|
|
41
40
|
* @exampleComponent limel-example-file
|
|
42
41
|
* @exampleComponent limel-example-file-custom-icon
|
|
43
42
|
* @exampleComponent limel-example-file-accepted-types
|
|
@@ -3,7 +3,6 @@ import { h } from '@stencil/core';
|
|
|
3
3
|
* This component is deprecated and will be removed in a future version of
|
|
4
4
|
* Lime Elements. Please use CSS for your flexible container needs 🙂
|
|
5
5
|
* https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox
|
|
6
|
-
*
|
|
7
6
|
* @deprecated
|
|
8
7
|
* @private
|
|
9
8
|
* @slot - Container content
|
|
@@ -7,7 +7,6 @@ import { isNil, isNumber, isString, isBoolean, pickBy, negate, kebabCase, mapKey
|
|
|
7
7
|
* the real definition of a primitive in javascript. In this context, primitive
|
|
8
8
|
* really means "can be properly rendered to the dom by react". It just so
|
|
9
9
|
* happens that react can render most primitives to the dom correctly.
|
|
10
|
-
*
|
|
11
10
|
* @see https://developer.mozilla.org/en-US/docs/Glossary/Primitive
|
|
12
11
|
* @param {any} value the value to check
|
|
13
12
|
* @returns {boolean} Whether or not the value is primitive
|
|
@@ -43,7 +42,6 @@ export class LimeElementsAdapter extends React.Component {
|
|
|
43
42
|
/**
|
|
44
43
|
* Given a key a value set the value of property named `key` to
|
|
45
44
|
* the value of `value`
|
|
46
|
-
*
|
|
47
45
|
* @param {string} key The name of the property
|
|
48
46
|
* @param {any} value The value of the property
|
|
49
47
|
* @returns {void}
|
|
@@ -57,7 +55,6 @@ export class LimeElementsAdapter extends React.Component {
|
|
|
57
55
|
*
|
|
58
56
|
* Events must be bound using this function otherwise events will bubble up too far
|
|
59
57
|
* since react events are different that native dom events
|
|
60
|
-
*
|
|
61
58
|
* @param {string} eventName the name of the event to get the handler for
|
|
62
59
|
* @returns {any} the handler to bind to the component for the event name
|
|
63
60
|
*/
|
|
@@ -70,7 +67,6 @@ export class LimeElementsAdapter extends React.Component {
|
|
|
70
67
|
}
|
|
71
68
|
/**
|
|
72
69
|
* Set events on the web component
|
|
73
|
-
*
|
|
74
70
|
* @param {object} events Event names to handlers
|
|
75
71
|
* @returns {void}
|
|
76
72
|
*/
|
|
@@ -82,7 +78,6 @@ export class LimeElementsAdapter extends React.Component {
|
|
|
82
78
|
}
|
|
83
79
|
/**
|
|
84
80
|
* Remove events on the web component
|
|
85
|
-
*
|
|
86
81
|
* @param {object} events Event names to handlers
|
|
87
82
|
* @returns {void}
|
|
88
83
|
*/
|
|
@@ -94,7 +89,6 @@ export class LimeElementsAdapter extends React.Component {
|
|
|
94
89
|
}
|
|
95
90
|
/**
|
|
96
91
|
* Get the events to remove from the component
|
|
97
|
-
*
|
|
98
92
|
* @param {object} prevEvents previous events
|
|
99
93
|
* @param {object} nextEvents new events
|
|
100
94
|
* @returns {object} the events to remove
|
|
@@ -104,7 +98,6 @@ export class LimeElementsAdapter extends React.Component {
|
|
|
104
98
|
}
|
|
105
99
|
/**
|
|
106
100
|
* Get the events to add to the component
|
|
107
|
-
*
|
|
108
101
|
* @param {object} prevEvents previous events
|
|
109
102
|
* @param {object} nextEvents new events
|
|
110
103
|
* @returns {object} the events to add
|
|
@@ -116,7 +109,6 @@ export class LimeElementsAdapter extends React.Component {
|
|
|
116
109
|
* Detect if event handlers have changed. If they
|
|
117
110
|
* have changed, store them in the state, and remove and
|
|
118
111
|
* re-add the changed event handlers
|
|
119
|
-
*
|
|
120
112
|
* @returns {void}
|
|
121
113
|
*/
|
|
122
114
|
updateEvents() {
|
|
@@ -141,7 +133,6 @@ export class LimeElementsAdapter extends React.Component {
|
|
|
141
133
|
}
|
|
142
134
|
/**
|
|
143
135
|
* Get non primitive props. i.e. object, function, array, etc
|
|
144
|
-
*
|
|
145
136
|
* @param {object} elementProps the props to pass the webcomponet
|
|
146
137
|
* @returns {object} non primitive props
|
|
147
138
|
*/
|
|
@@ -150,7 +141,6 @@ export class LimeElementsAdapter extends React.Component {
|
|
|
150
141
|
}
|
|
151
142
|
/**
|
|
152
143
|
* Get primitive props. i.e. integer, boolean, etc
|
|
153
|
-
*
|
|
154
144
|
* @param {object} elementProps the props to pass the webcomponet
|
|
155
145
|
* @returns {object} primitive props
|
|
156
146
|
*/
|
|
@@ -161,7 +151,6 @@ export class LimeElementsAdapter extends React.Component {
|
|
|
161
151
|
* Given the previous renders props and the next renders props,
|
|
162
152
|
* check if any of the property values have changed and return an
|
|
163
153
|
* object with only those values
|
|
164
|
-
*
|
|
165
154
|
* @param {object} prevNonPrimitiveProps the previous renders non primitive props
|
|
166
155
|
* @param {object} nextNonPrimitiveProps the current renders non primitive props
|
|
167
156
|
* @returns {object} the changed primitive props
|
|
@@ -176,7 +165,6 @@ export class LimeElementsAdapter extends React.Component {
|
|
|
176
165
|
* instead of passing them as props the the React.createElement
|
|
177
166
|
* function because non primitive props are not passed properly to the web
|
|
178
167
|
* component via React.createElement
|
|
179
|
-
*
|
|
180
168
|
* @param {object} elementProps element props to set
|
|
181
169
|
* @returns {void}
|
|
182
170
|
*/
|
|
@@ -3,7 +3,6 @@ import { retrieveSchema, ADDITIONAL_PROPERTY_FLAG } from '@rjsf/core/lib/utils';
|
|
|
3
3
|
/**
|
|
4
4
|
* Given two objects, get a list of keys for each value that is different between
|
|
5
5
|
* the two objects. Compares using deep comparison
|
|
6
|
-
*
|
|
7
6
|
* @param {object} a first object
|
|
8
7
|
* @param {object} b second object
|
|
9
8
|
* @returns {any[]} the array of keys
|
|
@@ -19,7 +18,6 @@ const getDifferentKeys = (a = {}, b = {}) => {
|
|
|
19
18
|
* has any other fields that are dependent on it, and if so reset those dependent fields
|
|
20
19
|
* (by deleting them from the data so that their defaults are populated on the next rerender).
|
|
21
20
|
* Call onChange with the updated data
|
|
22
|
-
*
|
|
23
21
|
* @param {any} oldData The previous data before a data change event
|
|
24
22
|
* @param {any} newData The form data from a change event
|
|
25
23
|
* @param {object} schema The schema associated with the data
|
|
@@ -52,7 +50,6 @@ export const resetDependentFields = (oldData, newData, schema, rootSchema) => {
|
|
|
52
50
|
};
|
|
53
51
|
/**
|
|
54
52
|
* Check if the schema is of type object and have no declared properties
|
|
55
|
-
*
|
|
56
53
|
* @param {any} schema the schema
|
|
57
54
|
* @returns {boolean} true if the schema is for a custom object
|
|
58
55
|
*/
|
|
@@ -23,7 +23,6 @@ import { FieldTemplate } from '../templates';
|
|
|
23
23
|
* from the form data I would delete all the text from the name input field. Web components would emit this empty value
|
|
24
24
|
* as '' or null. If the web component tries to emit `undefined`, null would be emitted instead because CustomEvent has
|
|
25
25
|
* a default `detail` value of null
|
|
26
|
-
*
|
|
27
26
|
* @param {any} value the value associated with the schema
|
|
28
27
|
* @param {any} schema the schema for the value
|
|
29
28
|
* @returns {boolean} whether or not null should be changed to undefined
|
|
@@ -52,7 +51,6 @@ const getCustomComponent = (schema) => {
|
|
|
52
51
|
};
|
|
53
52
|
/**
|
|
54
53
|
* Create properties from the factory that is set on `limel-form`
|
|
55
|
-
*
|
|
56
54
|
* @param {*} formContext the form context
|
|
57
55
|
* @param {*} schema the schema for the current field
|
|
58
56
|
* @returns {object} the properties created by the factory
|
|
@@ -178,7 +176,6 @@ export class SchemaField extends React.Component {
|
|
|
178
176
|
}
|
|
179
177
|
/**
|
|
180
178
|
* Gets the path to the current property within the schema
|
|
181
|
-
*
|
|
182
179
|
* @param {string} schemaId the id of the schema
|
|
183
180
|
* @returns {string[]} an array with the schema path for the current property
|
|
184
181
|
* @example
|
|
@@ -19,7 +19,6 @@ export function renderDescription(description) {
|
|
|
19
19
|
* If an object has the key 'title' it will have priority, followed by the key 'name'.
|
|
20
20
|
* If 'title' nor 'name' is found, a required item will be considered.
|
|
21
21
|
* Otherwise the first occurrence of a nonempty string is chosen.
|
|
22
|
-
*
|
|
23
22
|
* @param {*} data the data to find the title for
|
|
24
23
|
* @param {*} fieldSchema schema for the item
|
|
25
24
|
* @param {*} formSchema schema for the form
|
|
@@ -3,7 +3,6 @@ import { h } from '@stencil/core';
|
|
|
3
3
|
* The `limel-grid` component creates a grid which can be used to control the
|
|
4
4
|
* layout of other components. It uses CSS [grid-template-areas](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-areas)
|
|
5
5
|
* to enable easy configuration of its child-elements.
|
|
6
|
-
*
|
|
7
6
|
* @exampleComponent limel-example-grid
|
|
8
7
|
* @slot - Grid content
|
|
9
8
|
*/
|
|
@@ -38,7 +38,6 @@ import { h } from '@stencil/core';
|
|
|
38
38
|
* Background colors behind icons make them look like "call to action" buttons
|
|
39
39
|
* and take a lot of attention from users.
|
|
40
40
|
* :::
|
|
41
|
-
*
|
|
42
41
|
* @exampleComponent limel-example-header
|
|
43
42
|
* @exampleComponent limel-example-header-colors
|
|
44
43
|
* @exampleComponent limel-example-header-responsive
|
|
@@ -19,7 +19,6 @@ import { Host, h } from '@stencil/core';
|
|
|
19
19
|
* However, to be more resourceful, the parent component can choose not
|
|
20
20
|
* to render the helper-line as well.
|
|
21
21
|
* :::
|
|
22
|
-
*
|
|
23
22
|
* @exampleComponent limel-example-helper-line
|
|
24
23
|
* @exampleComponent limel-example-helper-line-invalid
|
|
25
24
|
* @exampleComponent limel-example-helper-line-long-text
|
|
@@ -51,7 +51,6 @@ import iconCache from '../../global/icon-cache';
|
|
|
51
51
|
* Search for an icon and **click on it to copy its name to clipboard**.
|
|
52
52
|
*
|
|
53
53
|
* <limel-example-icon-finder />
|
|
54
|
-
*
|
|
55
54
|
* @exampleComponent limel-example-icon
|
|
56
55
|
* @exampleComponent limel-example-icon-background
|
|
57
56
|
*/
|
|
@@ -76,7 +75,6 @@ export class Icon {
|
|
|
76
75
|
}
|
|
77
76
|
/**
|
|
78
77
|
* Load the SVG data for the icon from the icon cache
|
|
79
|
-
*
|
|
80
78
|
* @param {string} name name of the icon
|
|
81
79
|
* @returns {string} the icon SVG data
|
|
82
80
|
*/
|
|
@@ -7,7 +7,6 @@ import { h } from '@stencil/core';
|
|
|
7
7
|
* If clicking on the component should navigate the user to
|
|
8
8
|
* a new screen or web page, you need to provide a URL,
|
|
9
9
|
* using the `link` property.
|
|
10
|
-
*
|
|
11
10
|
* @exampleComponent limel-example-info-tile
|
|
12
11
|
* @exampleComponent limel-example-info-tile-badge
|
|
13
12
|
* @exampleComponent limel-example-info-tile-progress
|
|
@@ -12,7 +12,6 @@ export class ListRenderer {
|
|
|
12
12
|
* and return the index at which that ListItem is located in `items`.
|
|
13
13
|
* Returns `undefined` if no item should have the attribute set.
|
|
14
14
|
* See https://github.com/material-components/material-components-web/tree/e66a43a75fef4f9179e24856649518e15e279a04/packages/mdc-list#accessibility
|
|
15
|
-
*
|
|
16
15
|
* @param {Array<ListItem | ListSeparator>} items the items of the list, including any `ListSeparator`:s
|
|
17
16
|
* @returns {number} the index as per the description
|
|
18
17
|
*/
|
|
@@ -39,7 +38,6 @@ export class ListRenderer {
|
|
|
39
38
|
};
|
|
40
39
|
/**
|
|
41
40
|
* Render a single list item
|
|
42
|
-
*
|
|
43
41
|
* @param {ListItem | ListSeparator} item the item to render
|
|
44
42
|
* @param {number} index the index the item had in the `items` array
|
|
45
43
|
* @returns {HTMLElement} the list item
|
|
@@ -69,7 +67,6 @@ export class ListRenderer {
|
|
|
69
67
|
};
|
|
70
68
|
/**
|
|
71
69
|
* Render the text of the list item
|
|
72
|
-
*
|
|
73
70
|
* @param {ListItem} item the list item
|
|
74
71
|
* @returns {HTMLElement | string} the text for the list item
|
|
75
72
|
*/
|
|
@@ -84,7 +81,6 @@ export class ListRenderer {
|
|
|
84
81
|
};
|
|
85
82
|
/**
|
|
86
83
|
* Render an icon for a list item
|
|
87
|
-
*
|
|
88
84
|
* @param {ListRendererConfig} config the config object, passed on from the `renderListItem` function
|
|
89
85
|
* @param {ListItem} item the list item
|
|
90
86
|
* @returns {HTMLElement} the icon element
|
|
@@ -10,7 +10,6 @@ export class MenuListRenderer {
|
|
|
10
10
|
* and return the index at which that MenuItem is located in `items`.
|
|
11
11
|
* Returns `undefined` if no item should have the attribute set.
|
|
12
12
|
* See https://github.com/material-components/material-components-web/tree/e66a43a75fef4f9179e24856649518e15e279a04/packages/mdc-list#accessibility
|
|
13
|
-
*
|
|
14
13
|
* @param {Array<MenuItem | ListSeparator>} items the items of the list, including any `ListSeparator`:s
|
|
15
14
|
* @returns {number} the index as per the description
|
|
16
15
|
*/
|
|
@@ -37,7 +36,6 @@ export class MenuListRenderer {
|
|
|
37
36
|
};
|
|
38
37
|
/**
|
|
39
38
|
* Render a single list item
|
|
40
|
-
*
|
|
41
39
|
* @param {MenuItem | ListSeparator} item the item to render
|
|
42
40
|
* @param {number} index the index the item had in the `items` array
|
|
43
41
|
* @returns {HTMLElement} the list item
|
|
@@ -59,7 +57,6 @@ export class MenuListRenderer {
|
|
|
59
57
|
};
|
|
60
58
|
/**
|
|
61
59
|
* Render the text of the list item
|
|
62
|
-
*
|
|
63
60
|
* @param {MenuItem} item the list item
|
|
64
61
|
* @returns {HTMLElement | string} the text for the list item
|
|
65
62
|
*/
|
|
@@ -83,7 +80,6 @@ export class MenuListRenderer {
|
|
|
83
80
|
};
|
|
84
81
|
/**
|
|
85
82
|
* Render an icon for a list item
|
|
86
|
-
*
|
|
87
83
|
* @param {MenuListRendererConfig} config the config object, passed on from the `renderMenuItem` function
|
|
88
84
|
* @param {MenuItem} item the list item
|
|
89
85
|
* @returns {HTMLElement} the icon element
|
|
@@ -120,7 +120,6 @@ export class Picker {
|
|
|
120
120
|
/**
|
|
121
121
|
* Renders the dropdown with the items to pick from, or a spinner if the picker
|
|
122
122
|
* is waiting for items to be received
|
|
123
|
-
*
|
|
124
123
|
* @returns {HTMLElement} picker dropdown
|
|
125
124
|
*/
|
|
126
125
|
renderDropdown() {
|
|
@@ -179,7 +178,6 @@ export class Picker {
|
|
|
179
178
|
/**
|
|
180
179
|
* Returns true if the picker is "full"
|
|
181
180
|
* The picker is considered to be full if it has a value and only one is allowed
|
|
182
|
-
*
|
|
183
181
|
* @returns {boolean} true if the picker is full
|
|
184
182
|
*/
|
|
185
183
|
isFull() {
|
|
@@ -232,7 +230,6 @@ export class Picker {
|
|
|
232
230
|
}
|
|
233
231
|
/**
|
|
234
232
|
* Check if a descendant still has focus. If not, reset text value and search result.
|
|
235
|
-
*
|
|
236
233
|
* @returns {void}
|
|
237
234
|
*/
|
|
238
235
|
handleStopEditAndBlur() {
|
|
@@ -248,7 +245,6 @@ export class Picker {
|
|
|
248
245
|
}
|
|
249
246
|
/**
|
|
250
247
|
* Input handler for the input field
|
|
251
|
-
*
|
|
252
248
|
* @param {InputEvent} event event
|
|
253
249
|
* @returns {void}
|
|
254
250
|
*/
|
|
@@ -264,7 +260,6 @@ export class Picker {
|
|
|
264
260
|
}
|
|
265
261
|
/**
|
|
266
262
|
* Change handler for the list
|
|
267
|
-
*
|
|
268
263
|
* @param {LimelListCustomEvent<ListItem>} event event
|
|
269
264
|
* @returns {void}
|
|
270
265
|
*/
|
|
@@ -285,7 +280,6 @@ export class Picker {
|
|
|
285
280
|
}
|
|
286
281
|
/**
|
|
287
282
|
* Change handler for the list
|
|
288
|
-
*
|
|
289
283
|
* @param {LimelChipSetCustomEvent} event event
|
|
290
284
|
* @returns {void}
|
|
291
285
|
*/
|
|
@@ -300,7 +294,6 @@ export class Picker {
|
|
|
300
294
|
/**
|
|
301
295
|
* Focus handler for the chip set
|
|
302
296
|
* Prevent focus if the picker has a value and does not support multiple values
|
|
303
|
-
*
|
|
304
297
|
* @returns {void}
|
|
305
298
|
*/
|
|
306
299
|
async handleInputFieldFocus() {
|
|
@@ -329,7 +322,6 @@ export class Picker {
|
|
|
329
322
|
/**
|
|
330
323
|
* Key handler for the input field
|
|
331
324
|
* Will change focus to the first/last item in the dropdown list to enable selection with the keyboard
|
|
332
|
-
*
|
|
333
325
|
* @param {KeyboardEvent} event event
|
|
334
326
|
* @returns {void}
|
|
335
327
|
*/
|
|
@@ -360,7 +352,6 @@ export class Picker {
|
|
|
360
352
|
}
|
|
361
353
|
/**
|
|
362
354
|
* Key handler for the dropdown
|
|
363
|
-
*
|
|
364
355
|
* @param {KeyboardEvent} event event
|
|
365
356
|
* @returns {void}
|
|
366
357
|
*/
|
|
@@ -49,8 +49,6 @@ import { ESCAPE } from '../../util/keycodes';
|
|
|
49
49
|
* Do not make a popover too big. They should never take over the entire screen.
|
|
50
50
|
* If your content is that big, you should probably be using a Modal instead.
|
|
51
51
|
* :::
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
52
|
* @slot - Content to put inside the surface
|
|
55
53
|
* @exampleComponent limel-example-popover
|
|
56
54
|
*/
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*
|
|
4
4
|
* If the child element is a descendant of a limel-portal, this function will
|
|
5
5
|
* go back through the portal and check the original tree recursively
|
|
6
|
-
*
|
|
7
6
|
* @param {HTMLElement} element the parent element
|
|
8
7
|
* @param {HTMLElement} child the child element to check
|
|
9
8
|
* @returns {boolean} `true` if child is a descendant of element, taking
|
|
@@ -8,20 +8,19 @@ import { createPopper, } from '@popperjs/core';
|
|
|
8
8
|
* There are some caveats when using this component
|
|
9
9
|
*
|
|
10
10
|
* Events might not bubble up as expected since the content is moved out to
|
|
11
|
-
*
|
|
11
|
+
* another DOM node.
|
|
12
12
|
* Any styling that is applied to content from the parent will be lost, if the
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
13
|
+
* content is just another web compoent it will work without any issues.
|
|
14
|
+
* Alternatively, use the
|
|
15
|
+
* `style=""` html attribute.
|
|
16
16
|
* Any component that is placed inside the container must have a style of
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
17
|
+
* `max-height: inherit`. This ensures that its placement is calculated
|
|
18
|
+
* correctly in relation to the trigger, and that it never covers its own
|
|
19
|
+
* trigger.
|
|
20
20
|
* When the node is moved in the DOM, `disconnectedCallback` and
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
21
|
+
* `connectedCallback` will be invoked, so if `disconnectedCallback` is used
|
|
22
|
+
* to do any tear-down, the appropriate setup will have to be done again on
|
|
23
|
+
* `connectedCallback`.
|
|
25
24
|
* @slot - Content to put inside the portal
|
|
26
25
|
* @private
|
|
27
26
|
* @exampleComponent limel-example-portal
|
|
@@ -7,7 +7,6 @@ import { h } from '@stencil/core';
|
|
|
7
7
|
* By default, this navigation will happen within the same browser tab.
|
|
8
8
|
* However, it is possible to override that behavior, by specifying a `target`
|
|
9
9
|
* for the `link` property
|
|
10
|
-
*
|
|
11
10
|
* @exampleComponent limel-example-shortcut
|
|
12
11
|
* @exampleComponent limel-example-shortcut-notification
|
|
13
12
|
* @exampleComponent limel-example-shortcut-styling
|
|
@@ -2,12 +2,34 @@ import { MDCSnackbar } from '@material/snackbar';
|
|
|
2
2
|
import { h, } from '@stencil/core';
|
|
3
3
|
import translate from '../../global/translations';
|
|
4
4
|
/**
|
|
5
|
+
* A Snackbar –also known as "Toast"– is used to inform the end user
|
|
6
|
+
* about an action or a process in the system.
|
|
7
|
+
* The information could vary from announcing that a process has just started,
|
|
8
|
+
* is taking place now, has ended, or has been interrupted or canceled.
|
|
9
|
+
*
|
|
10
|
+
* The information that you provide using a snackbar should be:
|
|
11
|
+
* - temporary
|
|
12
|
+
* - contextual
|
|
13
|
+
* - short
|
|
14
|
+
* - and most importantly, ignorable.
|
|
15
|
+
*
|
|
16
|
+
* It means if the user misses the information, it shouldn't be a big deal.
|
|
17
|
+
*
|
|
18
|
+
* :::note
|
|
19
|
+
* If the information you want to display has a higher importance or priority,
|
|
20
|
+
* and you need to make sure that the user takes an action to dismiss it,
|
|
21
|
+
* consider using the [Banner](/#/component/limel-banner/) component instead.
|
|
22
|
+
* For more complex interactions and for delivering more detailed information,
|
|
23
|
+
* [Dialog](/#/component/limel-dialog/) is a better choice.
|
|
24
|
+
* :::
|
|
5
25
|
* @exampleComponent limel-example-snackbar
|
|
26
|
+
* @exampleComponent limel-example-snackbar-with-action
|
|
27
|
+
* @exampleComponent limel-example-snackbar-with-changing-messages
|
|
6
28
|
*/
|
|
7
29
|
export class Snackbar {
|
|
8
30
|
constructor() {
|
|
9
31
|
this.message = undefined;
|
|
10
|
-
this.timeout =
|
|
32
|
+
this.timeout = 5000;
|
|
11
33
|
this.actionText = undefined;
|
|
12
34
|
this.dismissible = undefined;
|
|
13
35
|
this.multiline = undefined;
|
|
@@ -115,13 +137,14 @@ export class Snackbar {
|
|
|
115
137
|
"references": {}
|
|
116
138
|
},
|
|
117
139
|
"required": false,
|
|
118
|
-
"optional":
|
|
140
|
+
"optional": true,
|
|
119
141
|
"docs": {
|
|
120
142
|
"tags": [],
|
|
121
143
|
"text": "The amount of time in milliseconds to show the snackbar."
|
|
122
144
|
},
|
|
123
145
|
"attribute": "timeout",
|
|
124
|
-
"reflect": false
|
|
146
|
+
"reflect": false,
|
|
147
|
+
"defaultValue": "5000"
|
|
125
148
|
},
|
|
126
149
|
"actionText": {
|
|
127
150
|
"type": "string",
|
|
@@ -11,7 +11,6 @@ import { Host, h } from '@stencil/core';
|
|
|
11
11
|
* The button should only be used for performing commands!
|
|
12
12
|
* - Never use this component instead of a Select or Menu component!
|
|
13
13
|
* :::
|
|
14
|
-
*
|
|
15
14
|
* @exampleComponent limel-example-split-button-basic
|
|
16
15
|
* @exampleComponent limel-example-split-button-repeat-default-command
|
|
17
16
|
*/
|
|
@@ -14,14 +14,13 @@ const HIDE_SCROLL_BUTTONS_WHEN_SCROLLED_LESS_THAN_PX = 40;
|
|
|
14
14
|
* :::
|
|
15
15
|
* An exception for using tab bars in a high level of hierarchy is their usage in modals. This is because modals are perceived as a separate place and not a part of the current context. Therefore you can use tab bars in a modal to group and organize its content.
|
|
16
16
|
* A tab bar can contain an unlimited number of tabs. However, depending on the device width and width of the tabs, the number of tabs that are visible at the same time will vary. When there is limited horizontal space, the component shows a left-arrow and/or right-arrow button, which scrolls and reveals the additional tabs. The tab bar can also be swiped left and right on a touch-device.
|
|
17
|
-
|
|
17
|
+
* :::tip Other things to consider
|
|
18
18
|
* Never divide the content of a tab using a nested tab bar.
|
|
19
19
|
* Never place two tab bars within the same screen.
|
|
20
20
|
* Never use background color for icons in tabs.
|
|
21
21
|
* Avoid having long labels for tabs.
|
|
22
22
|
* A tab will never be removed or get disabled, even if there is no content under it.
|
|
23
23
|
* :::
|
|
24
|
-
*
|
|
25
24
|
* @exampleComponent limel-example-tab-bar
|
|
26
25
|
* @exampleComponent limel-example-tab-bar-with-dynamic-tab-width
|
|
27
26
|
* @exampleComponent limel-example-tab-bar-with-equal-tab-width
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Set a tabs `active` state to true in a list of tabs. The previous tab with
|
|
3
3
|
* `active` set to true will have it set to `false` instead.
|
|
4
|
-
*
|
|
5
4
|
* @param {Tab[]} tabs list of tabs
|
|
6
5
|
* @param {number} index the index of the tab to set to active
|
|
7
6
|
* @returns {Tab[]} a copy of the list of tabs with the changed tabs replaced
|
|
@@ -14,7 +14,6 @@ import { dispatchResizeEvent } from '../../util/dispatch-resize-event';
|
|
|
14
14
|
*
|
|
15
15
|
* The slotted components can also emit the `changeTab` event to update anything
|
|
16
16
|
* inside the actual tab, e.g. to change the icon, color or badge.
|
|
17
|
-
*
|
|
18
17
|
* @slot - Content to put inside the `limel-tab-panel`. Each slotted element
|
|
19
18
|
* must have the `id` attribute equal to the id of the tab it belongs to.
|
|
20
19
|
* @exampleComponent limel-example-tab-panel
|