@limetech/lime-elements 36.0.0-next.3 → 36.0.0-next.30
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/{dateFormatter-05d80b12.js → dateFormatter-d7a8d40d.js} +1 -1
- package/dist/cjs/lime-elements.cjs.js +1 -1
- package/dist/cjs/limel-button.cjs.entry.js +32 -16
- package/dist/cjs/limel-chip-set.cjs.entry.js +19 -11
- package/dist/cjs/limel-code-editor.cjs.entry.js +1596 -2
- package/dist/cjs/limel-collapsible-section.cjs.entry.js +1 -1
- package/dist/cjs/{limel-color-picker-palette_2.cjs.entry.js → limel-color-picker-palette.cjs.entry.js} +0 -112
- package/dist/cjs/limel-date-picker.cjs.entry.js +3 -3
- package/dist/cjs/limel-dock-button.cjs.entry.js +105 -0
- package/dist/cjs/limel-dock.cjs.entry.js +104 -0
- package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +2 -2
- package/dist/cjs/limel-form.cjs.entry.js +1 -1
- package/dist/cjs/limel-input-field.cjs.entry.js +13 -6
- package/dist/cjs/{limel-list_3.cjs.entry.js → limel-list_2.cjs.entry.js} +0 -2018
- package/dist/cjs/limel-popover_4.cjs.entry.js +239 -0
- package/dist/cjs/limel-portal.cjs.entry.js +2024 -0
- package/dist/cjs/limel-progress-flow-item.cjs.entry.js +1 -1
- package/dist/cjs/limel-select.cjs.entry.js +4 -5
- package/dist/cjs/limel-table.cjs.entry.js +16 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{moment-5cfac5cd.js → moment-d1e35cdc.js} +2 -2
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/button/button.css +44 -4
- package/dist/collection/components/button/button.js +56 -20
- package/dist/collection/components/chip-set/chip-set.css +6 -2
- package/dist/collection/components/chip-set/chip-set.js +21 -13
- package/dist/collection/components/code-editor/code-editor.css +153 -1
- package/dist/collection/components/code-editor/code-editor.js +90 -2
- package/dist/collection/components/collapsible-section/collapsible-section.css +8 -7
- package/dist/collection/components/date-picker/date-picker.js +18 -1
- package/dist/collection/components/dock/dock-button/dock-button.css +77 -0
- package/dist/collection/components/dock/dock-button/dock-button.js +224 -0
- package/dist/collection/components/dock/dock.css +111 -0
- package/dist/collection/components/dock/dock.js +300 -0
- package/dist/collection/components/dock/dock.types.js +1 -0
- package/dist/collection/components/input-field/input-field.js +32 -7
- package/dist/collection/components/popover-surface/popover-surface.css +5 -4
- package/dist/collection/components/progress-flow/progress-flow-item/progress-flow-item.css +14 -5
- package/dist/collection/components/select/select.css +10 -11
- package/dist/collection/components/select/select.template.js +3 -4
- 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 +45 -14
- package/dist/collection/style/internal/codemirror-tooltip.scss +19 -0
- package/dist/collection/style/mixins.scss +11 -0
- package/dist/esm/{dateFormatter-2cad0292.js → dateFormatter-784c3334.js} +1 -1
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/limel-button.entry.js +33 -17
- package/dist/esm/limel-chip-set.entry.js +19 -11
- package/dist/esm/limel-code-editor.entry.js +1596 -2
- package/dist/esm/limel-collapsible-section.entry.js +1 -1
- package/dist/esm/{limel-color-picker-palette_2.entry.js → limel-color-picker-palette.entry.js} +2 -113
- package/dist/esm/limel-date-picker.entry.js +3 -3
- package/dist/esm/limel-dock-button.entry.js +101 -0
- package/dist/esm/limel-dock.entry.js +100 -0
- package/dist/esm/limel-flatpickr-adapter.entry.js +2 -2
- package/dist/esm/limel-form.entry.js +1 -1
- package/dist/esm/limel-input-field.entry.js +13 -6
- package/dist/esm/{limel-list_3.entry.js → limel-list_2.entry.js} +1 -2018
- package/dist/esm/limel-popover_4.entry.js +232 -0
- package/dist/esm/limel-portal.entry.js +2020 -0
- package/dist/esm/limel-progress-flow-item.entry.js +1 -1
- package/dist/esm/limel-select.entry.js +4 -5
- package/dist/esm/limel-table.entry.js +17 -5
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{moment-367e51c5.js → moment-faa8a4a8.js} +2 -2
- package/dist/lime-elements/lime-elements.css +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/p-009de50e.entry.js +1 -0
- package/dist/lime-elements/{p-7e571ec6.entry.js → p-0ba0c38a.entry.js} +1 -1
- package/dist/lime-elements/p-0e87d44d.entry.js +1 -0
- package/dist/lime-elements/p-1390fdcb.entry.js +126 -0
- package/dist/lime-elements/{p-08251941.entry.js → p-19f72dab.entry.js} +1 -1
- package/dist/lime-elements/p-3cf4aae0.entry.js +1 -0
- package/dist/lime-elements/p-5ef52589.entry.js +1 -0
- package/dist/lime-elements/p-63a57d32.entry.js +1 -0
- package/dist/lime-elements/p-653faf47.entry.js +1 -0
- package/dist/lime-elements/{p-d76f896d.js → p-73df4d83.js} +1 -1
- package/dist/lime-elements/p-93cd2268.entry.js +1 -0
- package/dist/lime-elements/p-93f42a32.entry.js +1 -0
- package/dist/lime-elements/p-945afca2.js +3 -0
- package/dist/lime-elements/p-b0e54dc2.entry.js +1 -0
- package/dist/lime-elements/{p-af0ec482.entry.js → p-c544c05b.entry.js} +1 -1
- package/dist/lime-elements/p-c89f2b52.entry.js +1 -0
- package/dist/lime-elements/p-cb8db8c2.entry.js +37 -0
- package/dist/lime-elements/p-f41567a1.entry.js +1 -0
- package/dist/lime-elements/p-f5df4d4f.entry.js +1 -0
- package/dist/lime-elements/style/internal/codemirror-tooltip.scss +19 -0
- package/dist/lime-elements/style/mixins.scss +11 -0
- package/dist/types/components/button/button.d.ts +10 -3
- package/dist/types/components/chip-set/chip-set.d.ts +3 -2
- 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 +52 -0
- package/dist/types/components/dock/dock.d.ts +83 -0
- package/dist/types/components/dock/dock.types.d.ts +53 -0
- package/dist/types/components/input-field/input-field.d.ts +6 -0
- 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 +176 -0
- package/dist/types/interface.d.ts +1 -0
- package/package.json +5 -4
- package/dist/cjs/limel-popover-surface.cjs.entry.js +0 -32
- package/dist/cjs/limel-tooltip_2.cjs.entry.js +0 -102
- package/dist/esm/limel-popover-surface.entry.js +0 -28
- package/dist/esm/limel-tooltip_2.entry.js +0 -97
- package/dist/lime-elements/p-1e59114e.entry.js +0 -1
- package/dist/lime-elements/p-22569fb6.entry.js +0 -1
- package/dist/lime-elements/p-3af5f9ad.js +0 -3
- package/dist/lime-elements/p-404e1465.entry.js +0 -1
- package/dist/lime-elements/p-5ad60e14.entry.js +0 -126
- package/dist/lime-elements/p-6966b5df.entry.js +0 -1
- package/dist/lime-elements/p-705334c1.entry.js +0 -1
- package/dist/lime-elements/p-75152d89.entry.js +0 -1
- package/dist/lime-elements/p-7ee4b825.entry.js +0 -1
- package/dist/lime-elements/p-87453b45.entry.js +0 -1
- package/dist/lime-elements/p-97d6c4a6.entry.js +0 -1
- package/dist/lime-elements/p-b95e80c9.entry.js +0 -1
- package/dist/lime-elements/p-d1ee4501.entry.js +0 -37
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
import { Component, Event, h, Host, Prop, State, } from '@stencil/core';
|
|
2
|
+
const DEFAULT_MOBILE_BREAKPOINT = 700;
|
|
3
|
+
/**
|
|
4
|
+
* @exampleComponent limel-example-dock-basic
|
|
5
|
+
* @exampleComponent limel-example-dock-custom-component
|
|
6
|
+
* @exampleComponent limel-example-dock-mobile
|
|
7
|
+
* @exampleComponent limel-example-dock-expanded
|
|
8
|
+
* @exampleComponent limel-example-dock-colors-css
|
|
9
|
+
* @private
|
|
10
|
+
*/
|
|
11
|
+
export class Dock {
|
|
12
|
+
constructor() {
|
|
13
|
+
/**
|
|
14
|
+
* Items that are placed in the dock.
|
|
15
|
+
*/
|
|
16
|
+
this.dockItems = [];
|
|
17
|
+
/**
|
|
18
|
+
* Items that are placed at the bottom of the dock. (Or at the end in mobile
|
|
19
|
+
* layout.)
|
|
20
|
+
*/
|
|
21
|
+
this.dockFooterItems = [];
|
|
22
|
+
/**
|
|
23
|
+
* Defines the width of the component, when it loads.
|
|
24
|
+
* - `true`: shows both icons and labels of the Dock items.
|
|
25
|
+
* - `false`: only shows icons of the doc items, and displays
|
|
26
|
+
* their labels as tooltip.
|
|
27
|
+
*
|
|
28
|
+
* Note: when `useMobileLayout` is `true`, labels will always
|
|
29
|
+
* be shown as tooltips. Read more below…
|
|
30
|
+
*/
|
|
31
|
+
this.expanded = false;
|
|
32
|
+
/**
|
|
33
|
+
* Set to `false` if you do not want to allow end-users
|
|
34
|
+
* to exapnd or shrink the Dock. This will hide the
|
|
35
|
+
* expand/shrink button, and the only things that defines
|
|
36
|
+
* the layout will be the `expanded` property, and
|
|
37
|
+
* the `mobileBreakPoint`.
|
|
38
|
+
*/
|
|
39
|
+
this.allowResize = true;
|
|
40
|
+
/**
|
|
41
|
+
* Defines the breakpoint in pixles, at which the component will be rendered
|
|
42
|
+
* in a hoizontal layout. Default breakpoint is `700` pixels, which means
|
|
43
|
+
* when the screen size is smaller than `700px`, the component will automatically
|
|
44
|
+
* switch to a horizontal layout.
|
|
45
|
+
*/
|
|
46
|
+
this.mobileBreakPoint = DEFAULT_MOBILE_BREAKPOINT;
|
|
47
|
+
/**
|
|
48
|
+
* Is used to render the component horizontally, and place
|
|
49
|
+
* the Dock items in a row.
|
|
50
|
+
*/
|
|
51
|
+
this.useMobileLayout = false;
|
|
52
|
+
this.renderSeparator = () => {
|
|
53
|
+
return this.useMobileLayout ? null : h("span", { class: "footer-separator" });
|
|
54
|
+
};
|
|
55
|
+
this.renderDockItem = (item) => {
|
|
56
|
+
return (h("limel-dock-button", { class: {
|
|
57
|
+
'dock-item': true,
|
|
58
|
+
selected: item.selected,
|
|
59
|
+
}, item: item, expanded: this.expanded && !this.useMobileLayout, useMobileLayout: this.useMobileLayout }));
|
|
60
|
+
};
|
|
61
|
+
this.handleResize = () => {
|
|
62
|
+
if (window.innerWidth <= this.mobileBreakPoint) {
|
|
63
|
+
this.useMobileLayout = true;
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
this.useMobileLayout = false;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
this.toggleDockWidth = () => {
|
|
70
|
+
this.expanded = !this.expanded;
|
|
71
|
+
this.dockExpanded.emit(this.expanded);
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
componentDidLoad() {
|
|
75
|
+
this.resizeObserver = new ResizeObserver(this.handleResize);
|
|
76
|
+
this.resizeObserver.observe(document.body);
|
|
77
|
+
}
|
|
78
|
+
disconnectedCallback() {
|
|
79
|
+
this.resizeObserver.disconnect();
|
|
80
|
+
}
|
|
81
|
+
render() {
|
|
82
|
+
return (h(Host, { class: {
|
|
83
|
+
dock: true,
|
|
84
|
+
expanded: this.expanded,
|
|
85
|
+
'has-mobile-layout': this.useMobileLayout,
|
|
86
|
+
} },
|
|
87
|
+
h("nav", { "aria-label": this.accessibleLabel },
|
|
88
|
+
this.dockItems.map(this.renderDockItem),
|
|
89
|
+
this.renderSeparator(),
|
|
90
|
+
this.dockFooterItems.map(this.renderDockItem)),
|
|
91
|
+
this.renderExpandShrinkToggle()));
|
|
92
|
+
}
|
|
93
|
+
renderExpandShrinkToggle() {
|
|
94
|
+
if (this.useMobileLayout || !this.allowResize) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
return (h("button", { class: {
|
|
98
|
+
'expand-shrink': true,
|
|
99
|
+
expanded: this.expanded,
|
|
100
|
+
}, onClick: this.toggleDockWidth },
|
|
101
|
+
h("limel-icon", { name: "angle_right" })));
|
|
102
|
+
}
|
|
103
|
+
static get is() { return "limel-dock"; }
|
|
104
|
+
static get encapsulation() { return "shadow"; }
|
|
105
|
+
static get originalStyleUrls() { return {
|
|
106
|
+
"$": ["dock.scss"]
|
|
107
|
+
}; }
|
|
108
|
+
static get styleUrls() { return {
|
|
109
|
+
"$": ["dock.css"]
|
|
110
|
+
}; }
|
|
111
|
+
static get properties() { return {
|
|
112
|
+
"dockItems": {
|
|
113
|
+
"type": "unknown",
|
|
114
|
+
"mutable": false,
|
|
115
|
+
"complexType": {
|
|
116
|
+
"original": "DockItem[]",
|
|
117
|
+
"resolved": "DockItem[]",
|
|
118
|
+
"references": {
|
|
119
|
+
"DockItem": {
|
|
120
|
+
"location": "import",
|
|
121
|
+
"path": "./dock.types"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"required": false,
|
|
126
|
+
"optional": false,
|
|
127
|
+
"docs": {
|
|
128
|
+
"tags": [],
|
|
129
|
+
"text": "Items that are placed in the dock."
|
|
130
|
+
},
|
|
131
|
+
"defaultValue": "[]"
|
|
132
|
+
},
|
|
133
|
+
"dockFooterItems": {
|
|
134
|
+
"type": "unknown",
|
|
135
|
+
"mutable": false,
|
|
136
|
+
"complexType": {
|
|
137
|
+
"original": "DockItem[]",
|
|
138
|
+
"resolved": "DockItem[]",
|
|
139
|
+
"references": {
|
|
140
|
+
"DockItem": {
|
|
141
|
+
"location": "import",
|
|
142
|
+
"path": "./dock.types"
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"required": false,
|
|
147
|
+
"optional": true,
|
|
148
|
+
"docs": {
|
|
149
|
+
"tags": [],
|
|
150
|
+
"text": "Items that are placed at the bottom of the dock. (Or at the end in mobile\nlayout.)"
|
|
151
|
+
},
|
|
152
|
+
"defaultValue": "[]"
|
|
153
|
+
},
|
|
154
|
+
"accessibleLabel": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"mutable": false,
|
|
157
|
+
"complexType": {
|
|
158
|
+
"original": "string",
|
|
159
|
+
"resolved": "string",
|
|
160
|
+
"references": {}
|
|
161
|
+
},
|
|
162
|
+
"required": false,
|
|
163
|
+
"optional": true,
|
|
164
|
+
"docs": {
|
|
165
|
+
"tags": [],
|
|
166
|
+
"text": "A label used to describe the purpose of the navigation element to users\nof assistive technologies, like screen readers. Especially useful when\nthere are multiple navigation elements in the user interface.\nExample value: \"Primary navigation\""
|
|
167
|
+
},
|
|
168
|
+
"attribute": "accessible-label",
|
|
169
|
+
"reflect": true
|
|
170
|
+
},
|
|
171
|
+
"expanded": {
|
|
172
|
+
"type": "boolean",
|
|
173
|
+
"mutable": false,
|
|
174
|
+
"complexType": {
|
|
175
|
+
"original": "boolean",
|
|
176
|
+
"resolved": "boolean",
|
|
177
|
+
"references": {}
|
|
178
|
+
},
|
|
179
|
+
"required": false,
|
|
180
|
+
"optional": true,
|
|
181
|
+
"docs": {
|
|
182
|
+
"tags": [],
|
|
183
|
+
"text": "Defines the width of the component, when it loads.\n- `true`: shows both icons and labels of the Dock items.\n- `false`: only shows icons of the doc items, and displays\ntheir labels as tooltip.\n\nNote: when `useMobileLayout` is `true`, labels will always\nbe shown as tooltips. Read more below\u2026"
|
|
184
|
+
},
|
|
185
|
+
"attribute": "expanded",
|
|
186
|
+
"reflect": true,
|
|
187
|
+
"defaultValue": "false"
|
|
188
|
+
},
|
|
189
|
+
"allowResize": {
|
|
190
|
+
"type": "boolean",
|
|
191
|
+
"mutable": false,
|
|
192
|
+
"complexType": {
|
|
193
|
+
"original": "boolean",
|
|
194
|
+
"resolved": "boolean",
|
|
195
|
+
"references": {}
|
|
196
|
+
},
|
|
197
|
+
"required": false,
|
|
198
|
+
"optional": true,
|
|
199
|
+
"docs": {
|
|
200
|
+
"tags": [],
|
|
201
|
+
"text": "Set to `false` if you do not want to allow end-users\nto exapnd or shrink the Dock. This will hide the\nexpand/shrink button, and the only things that defines\nthe layout will be the `expanded` property, and\nthe `mobileBreakPoint`."
|
|
202
|
+
},
|
|
203
|
+
"attribute": "allow-resize",
|
|
204
|
+
"reflect": true,
|
|
205
|
+
"defaultValue": "true"
|
|
206
|
+
},
|
|
207
|
+
"mobileBreakPoint": {
|
|
208
|
+
"type": "number",
|
|
209
|
+
"mutable": false,
|
|
210
|
+
"complexType": {
|
|
211
|
+
"original": "number",
|
|
212
|
+
"resolved": "number",
|
|
213
|
+
"references": {}
|
|
214
|
+
},
|
|
215
|
+
"required": false,
|
|
216
|
+
"optional": true,
|
|
217
|
+
"docs": {
|
|
218
|
+
"tags": [],
|
|
219
|
+
"text": "Defines the breakpoint in pixles, at which the component will be rendered\nin a hoizontal layout. Default breakpoint is `700` pixels, which means\nwhen the screen size is smaller than `700px`, the component will automatically\nswitch to a horizontal layout."
|
|
220
|
+
},
|
|
221
|
+
"attribute": "mobile-break-point",
|
|
222
|
+
"reflect": true,
|
|
223
|
+
"defaultValue": "DEFAULT_MOBILE_BREAKPOINT"
|
|
224
|
+
}
|
|
225
|
+
}; }
|
|
226
|
+
static get states() { return {
|
|
227
|
+
"useMobileLayout": {}
|
|
228
|
+
}; }
|
|
229
|
+
static get events() { return [{
|
|
230
|
+
"method": "itemSelected",
|
|
231
|
+
"name": "itemSelected",
|
|
232
|
+
"bubbles": true,
|
|
233
|
+
"cancelable": true,
|
|
234
|
+
"composed": true,
|
|
235
|
+
"docs": {
|
|
236
|
+
"tags": [],
|
|
237
|
+
"text": "Fired when a dock item has been selected from the dock."
|
|
238
|
+
},
|
|
239
|
+
"complexType": {
|
|
240
|
+
"original": "DockItem",
|
|
241
|
+
"resolved": "DockItem",
|
|
242
|
+
"references": {
|
|
243
|
+
"DockItem": {
|
|
244
|
+
"location": "import",
|
|
245
|
+
"path": "./dock.types"
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}, {
|
|
250
|
+
"method": "menuOpen",
|
|
251
|
+
"name": "menuOpen",
|
|
252
|
+
"bubbles": true,
|
|
253
|
+
"cancelable": true,
|
|
254
|
+
"composed": true,
|
|
255
|
+
"docs": {
|
|
256
|
+
"tags": [],
|
|
257
|
+
"text": "Fired when a dock menu is opened."
|
|
258
|
+
},
|
|
259
|
+
"complexType": {
|
|
260
|
+
"original": "DockItem",
|
|
261
|
+
"resolved": "DockItem",
|
|
262
|
+
"references": {
|
|
263
|
+
"DockItem": {
|
|
264
|
+
"location": "import",
|
|
265
|
+
"path": "./dock.types"
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}, {
|
|
270
|
+
"method": "close",
|
|
271
|
+
"name": "close",
|
|
272
|
+
"bubbles": true,
|
|
273
|
+
"cancelable": true,
|
|
274
|
+
"composed": true,
|
|
275
|
+
"docs": {
|
|
276
|
+
"tags": [],
|
|
277
|
+
"text": "Fired when the popover is closed."
|
|
278
|
+
},
|
|
279
|
+
"complexType": {
|
|
280
|
+
"original": "void",
|
|
281
|
+
"resolved": "void",
|
|
282
|
+
"references": {}
|
|
283
|
+
}
|
|
284
|
+
}, {
|
|
285
|
+
"method": "dockExpanded",
|
|
286
|
+
"name": "dockExpanded",
|
|
287
|
+
"bubbles": true,
|
|
288
|
+
"cancelable": true,
|
|
289
|
+
"composed": true,
|
|
290
|
+
"docs": {
|
|
291
|
+
"tags": [],
|
|
292
|
+
"text": "Fired when a Dock is expanded or collapsed."
|
|
293
|
+
},
|
|
294
|
+
"complexType": {
|
|
295
|
+
"original": "boolean",
|
|
296
|
+
"resolved": "boolean",
|
|
297
|
+
"references": {}
|
|
298
|
+
}
|
|
299
|
+
}]; }
|
|
300
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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
|
|
@@ -101,6 +102,7 @@ export class InputField {
|
|
|
101
102
|
this.getContainerClassList = () => {
|
|
102
103
|
const classList = {
|
|
103
104
|
'mdc-text-field': true,
|
|
105
|
+
'mdc-text-field--no-label': !this.label,
|
|
104
106
|
'mdc-text-field--outlined': true,
|
|
105
107
|
'mdc-text-field--invalid': this.isInvalid(),
|
|
106
108
|
'mdc-text-field--disabled': this.disabled || this.readonly,
|
|
@@ -127,7 +129,7 @@ export class InputField {
|
|
|
127
129
|
return;
|
|
128
130
|
}
|
|
129
131
|
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 })));
|
|
132
|
+
return (h("input", Object.assign({}, properties, { type: type, pattern: this.pattern, onWheel: this.handleWheel, onKeyDown: this.onKeyDown, value: this.value, placeholder: this.placeholder })));
|
|
131
133
|
};
|
|
132
134
|
this.renderTextarea = (properties) => {
|
|
133
135
|
if (this.type !== 'textarea') {
|
|
@@ -252,6 +254,17 @@ export class InputField {
|
|
|
252
254
|
}
|
|
253
255
|
return this.limelInputField.shadowRoot.querySelector(elementName);
|
|
254
256
|
};
|
|
257
|
+
this.renderLabel = (labelId) => {
|
|
258
|
+
const labelClassList = {
|
|
259
|
+
'mdc-floating-label': true,
|
|
260
|
+
'mdc-floating-label--float-above': !!this.value || this.isFocused || this.readonly,
|
|
261
|
+
};
|
|
262
|
+
if (!this.label) {
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
return (h("span", { class: "mdc-notched-outline__notch" },
|
|
266
|
+
h("span", { class: labelClassList, id: labelId }, this.label)));
|
|
267
|
+
};
|
|
255
268
|
this.renderLeadingIcon = () => {
|
|
256
269
|
if (this.type === 'textarea') {
|
|
257
270
|
return;
|
|
@@ -516,16 +529,11 @@ export class InputField {
|
|
|
516
529
|
properties['aria-controls'] = helperTextId;
|
|
517
530
|
properties['aria-describedby'] = helperTextId;
|
|
518
531
|
}
|
|
519
|
-
const labelClassList = {
|
|
520
|
-
'mdc-floating-label': true,
|
|
521
|
-
'mdc-floating-label--float-above': !!this.value || this.isFocused || this.readonly,
|
|
522
|
-
};
|
|
523
532
|
return [
|
|
524
533
|
h("label", { class: this.getContainerClassList() },
|
|
525
534
|
h("span", { class: "mdc-notched-outline", tabindex: "-1" },
|
|
526
535
|
h("span", { class: "mdc-notched-outline__leading" }),
|
|
527
|
-
|
|
528
|
-
h("span", { class: labelClassList, id: labelId }, this.label)),
|
|
536
|
+
this.renderLabel(labelId),
|
|
529
537
|
h("span", { class: "mdc-notched-outline__trailing" })),
|
|
530
538
|
this.renderLeadingIcon(),
|
|
531
539
|
this.renderEmptyValueForReadonly(),
|
|
@@ -627,6 +635,23 @@ export class InputField {
|
|
|
627
635
|
"attribute": "label",
|
|
628
636
|
"reflect": true
|
|
629
637
|
},
|
|
638
|
+
"placeholder": {
|
|
639
|
+
"type": "string",
|
|
640
|
+
"mutable": false,
|
|
641
|
+
"complexType": {
|
|
642
|
+
"original": "string",
|
|
643
|
+
"resolved": "string",
|
|
644
|
+
"references": {}
|
|
645
|
+
},
|
|
646
|
+
"required": false,
|
|
647
|
+
"optional": false,
|
|
648
|
+
"docs": {
|
|
649
|
+
"tags": [],
|
|
650
|
+
"text": "The placeholder text shown inside the input field, when the field is focused and empty."
|
|
651
|
+
},
|
|
652
|
+
"attribute": "placeholder",
|
|
653
|
+
"reflect": true
|
|
654
|
+
},
|
|
630
655
|
"helperText": {
|
|
631
656
|
"type": "string",
|
|
632
657
|
"mutable": false,
|
|
@@ -31,12 +31,13 @@
|
|
|
31
31
|
border-radius: var(--popover-border-radius, 0.75rem);
|
|
32
32
|
background-color: var(--popover-body-background-color, rgb(var(--contrast-100)));
|
|
33
33
|
}
|
|
34
|
-
.limel-popover-surface:focus
|
|
34
|
+
.limel-popover-surface:focus {
|
|
35
35
|
outline: none;
|
|
36
36
|
}
|
|
37
|
+
.limel-popover-surface:focus-visible {
|
|
38
|
+
outline: none;
|
|
39
|
+
box-shadow: var(--shadow-depth-8-focused);
|
|
40
|
+
}
|
|
37
41
|
.limel-popover-surface:focus:after, .limel-popover-surface:focus-within:after {
|
|
38
42
|
opacity: 1;
|
|
39
|
-
}
|
|
40
|
-
.limel-popover-surface:focus-visible {
|
|
41
|
-
box-shadow: var(--shadow-depth-16-focused);
|
|
42
43
|
}
|
|
@@ -67,7 +67,6 @@
|
|
|
67
67
|
font-size: 0.875rem;
|
|
68
68
|
}
|
|
69
69
|
.step.disabled {
|
|
70
|
-
opacity: 0.75;
|
|
71
70
|
cursor: not-allowed;
|
|
72
71
|
}
|
|
73
72
|
.step.disabled.readonly {
|
|
@@ -165,11 +164,7 @@
|
|
|
165
164
|
z-index: 2;
|
|
166
165
|
position: absolute;
|
|
167
166
|
right: var(--selected-indicator-right);
|
|
168
|
-
background-color: var(--step-divider-color);
|
|
169
|
-
width: 0.375rem;
|
|
170
|
-
height: 0.375rem;
|
|
171
167
|
border-radius: 50%;
|
|
172
|
-
opacity: 0.7;
|
|
173
168
|
}
|
|
174
169
|
.last .step:after {
|
|
175
170
|
right: 0.5rem;
|
|
@@ -177,6 +172,20 @@
|
|
|
177
172
|
|
|
178
173
|
.flow-item:not(.off-progress-item) .step.selected:after {
|
|
179
174
|
content: "";
|
|
175
|
+
width: 0.375rem;
|
|
176
|
+
height: 0.375rem;
|
|
177
|
+
background-color: var(--step-divider-color);
|
|
178
|
+
opacity: 0.7;
|
|
179
|
+
}
|
|
180
|
+
.flow-item:not(.off-progress-item) .step.disabled:after {
|
|
181
|
+
content: "";
|
|
182
|
+
width: 0.75rem;
|
|
183
|
+
height: 0.75rem;
|
|
184
|
+
background-image: url("data:image/svg+xml;charset=utf-8, <svg viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg' xml:space='preserve' fill-rule='evenodd' clip-rule='evenodd' stroke-linejoin='round' stroke-miterlimit='2'><path fill='rgba(127,127,127,0.7)' d='M32.18 13.711c0-2.207-1.793-4-4.002-4H11.821c-2.208 0-4 1.793-4 4V28.29a4 4 0 0 0 4 4h16.357a4.002 4.002 0 0 0 4.001-4V13.711Z'/><path fill='rgba(127,127,127,0.7)' d='M11.211 9.758V7.673A7.489 7.489 0 0 1 18.696.188h2.608a7.489 7.489 0 0 1 7.485 7.485v2.085h-3V7.673a4.488 4.488 0 0 0-4.485-4.485h-2.608a4.488 4.488 0 0 0-4.485 4.485v2.085h-3Z'/></svg>");
|
|
185
|
+
background-size: 90%;
|
|
186
|
+
background-repeat: no-repeat;
|
|
187
|
+
background-position: center;
|
|
188
|
+
mix-blend-mode: difference;
|
|
180
189
|
}
|
|
181
190
|
|
|
182
191
|
.step {
|
|
@@ -1726,6 +1726,10 @@
|
|
|
1726
1726
|
left: 1rem;
|
|
1727
1727
|
}
|
|
1728
1728
|
|
|
1729
|
+
.mdc-select__dropdown-icon-graphic {
|
|
1730
|
+
transition: transform 0.2s ease;
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1729
1733
|
.limel-select__selected-option {
|
|
1730
1734
|
display: flex;
|
|
1731
1735
|
align-items: center;
|
|
@@ -1774,7 +1778,8 @@
|
|
|
1774
1778
|
outline: none;
|
|
1775
1779
|
}
|
|
1776
1780
|
.limel-select .limel-select-trigger:focus-visible {
|
|
1777
|
-
|
|
1781
|
+
outline: none;
|
|
1782
|
+
box-shadow: var(--shadow-depth-8-focused);
|
|
1778
1783
|
}
|
|
1779
1784
|
.limel-select .limel-select-trigger .mdc-floating-label {
|
|
1780
1785
|
color: rgba(var(--contrast-1200), 1);
|
|
@@ -1786,15 +1791,6 @@
|
|
|
1786
1791
|
font-size: 0.875rem;
|
|
1787
1792
|
transform: translateY(-2.171875rem) scale(0.75);
|
|
1788
1793
|
}
|
|
1789
|
-
.limel-select .mdc-select__dropdown-icon {
|
|
1790
|
-
transition: box-shadow 0.2s ease;
|
|
1791
|
-
border-radius: 50%;
|
|
1792
|
-
background: url("data:image/svg+xml;charset=utf-8,%3Csvg width='10' height='5' viewBox='7 10 10 5' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' opacity='.54' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat 50%;
|
|
1793
|
-
position: relative;
|
|
1794
|
-
bottom: unset;
|
|
1795
|
-
margin-left: 0;
|
|
1796
|
-
margin-right: 0.25rem;
|
|
1797
|
-
}
|
|
1798
1794
|
.limel-select .limel-select-trigger,
|
|
1799
1795
|
.limel-select .limel-select__selected-option {
|
|
1800
1796
|
width: 100%;
|
|
@@ -1822,7 +1818,10 @@
|
|
|
1822
1818
|
color: var(--mdc-theme-primary);
|
|
1823
1819
|
}
|
|
1824
1820
|
.limel-select:not(.mdc-select--disabled) .limel-select-trigger.limel-select--focused .mdc-select__dropdown-icon {
|
|
1825
|
-
|
|
1821
|
+
fill: var(--mdc-theme-primary);
|
|
1822
|
+
}
|
|
1823
|
+
.limel-select:not(.mdc-select--disabled) .limel-select-trigger.limel-select--focused .mdc-select__dropdown-icon-graphic {
|
|
1824
|
+
transform: rotate(-180deg);
|
|
1826
1825
|
}
|
|
1827
1826
|
.limel-select.limel-select--required .mdc-floating-label::after {
|
|
1828
1827
|
content: "*";
|
|
@@ -39,7 +39,7 @@ const SelectValue = (props) => {
|
|
|
39
39
|
'mdc-floating-label--float-above': props.hasValue || props.isOpen || props.readonly,
|
|
40
40
|
'mdc-floating-label--active': props.isOpen,
|
|
41
41
|
};
|
|
42
|
-
return (h("div", { class: anchorClassList, tabindex: "0", onClick: props.open, onKeyPress: props.onTriggerPress, role: "button", "aria-haspopup": "listbox", "aria-expanded": "false", "aria-labelledby": "s-label s-selected-text" },
|
|
42
|
+
return (h("div", { class: anchorClassList, tabindex: "0", onClick: props.open, onKeyPress: props.onTriggerPress, role: "button", "aria-haspopup": "listbox", "aria-expanded": "false", "aria-labelledby": "s-label s-selected-text", "aria-required": props.required, "aria-disabled": props.disabled },
|
|
43
43
|
h("span", { id: "s-label", class: labelClassList }, props.label),
|
|
44
44
|
h("span", { class: "mdc-select__selected-text-container limel-select__selected-option" },
|
|
45
45
|
getSelectedIcon(props.value),
|
|
@@ -47,8 +47,7 @@ const SelectValue = (props) => {
|
|
|
47
47
|
h(ShowIcon, Object.assign({}, props, { isValid: props.isValid })),
|
|
48
48
|
h("span", { class: "mdc-select__dropdown-icon" },
|
|
49
49
|
h("svg", { class: "mdc-select__dropdown-icon-graphic", viewBox: "7 10 10 5", focusable: "false" },
|
|
50
|
-
h("polygon", {
|
|
51
|
-
h("polygon", { class: "mdc-select__dropdown-icon-active", stroke: "none", "fill-rule": "evenodd", points: "7 15 12 10 17 15" })))));
|
|
50
|
+
h("polygon", { stroke: "none", "fill-rule": "evenodd", points: "7 10 12 15 17 10" })))));
|
|
52
51
|
};
|
|
53
52
|
const ShowIcon = (props) => {
|
|
54
53
|
if (props.isValid) {
|
|
@@ -80,7 +79,7 @@ const MenuDropdown = (props) => {
|
|
|
80
79
|
h("limel-list", { items: items, type: props.multiple ? 'checkbox' : 'selectable', onChange: props.onMenuChange }))));
|
|
81
80
|
};
|
|
82
81
|
const NativeDropdown = (props) => {
|
|
83
|
-
return (h("select", { required: props.required, "aria-required": props.required, onChange: props.onNativeChange, onFocus: props.open, onBlur: props.close, class: "limel-select__native-control", disabled: props.disabled, multiple: props.multiple }, props.options.map((option) => {
|
|
82
|
+
return (h("select", { required: props.required, "aria-disabled": props.disabled, "aria-required": props.required, onChange: props.onNativeChange, onFocus: props.open, onBlur: props.close, class: "limel-select__native-control", disabled: props.disabled, multiple: props.multiple }, props.options.map((option) => {
|
|
84
83
|
return (h("option", { key: option.value, value: option.value, selected: isSelected(option, props.value), disabled: option.disabled }, option.text));
|
|
85
84
|
})));
|
|
86
85
|
};
|