@limetech/lime-elements 36.0.0-next.2 → 36.0.0-next.22

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.
Files changed (103) hide show
  1. package/dist/cjs/{dateFormatter-05d80b12.js → dateFormatter-d7a8d40d.js} +1 -1
  2. package/dist/cjs/lime-elements.cjs.js +1 -1
  3. package/dist/cjs/limel-button.cjs.entry.js +32 -16
  4. package/dist/cjs/limel-chip-set.cjs.entry.js +1 -3
  5. package/dist/cjs/limel-code-editor.cjs.entry.js +1588 -2
  6. package/dist/cjs/{limel-color-picker-palette_2.cjs.entry.js → limel-color-picker-palette.cjs.entry.js} +0 -112
  7. package/dist/cjs/limel-date-picker.cjs.entry.js +3 -3
  8. package/dist/cjs/limel-dock-button.cjs.entry.js +86 -0
  9. package/dist/cjs/limel-dock.cjs.entry.js +104 -0
  10. package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +5 -11
  11. package/dist/cjs/limel-form.cjs.entry.js +1 -1
  12. package/dist/cjs/limel-icon-button.cjs.entry.js +2 -35
  13. package/dist/cjs/limel-input-field.cjs.entry.js +13 -6
  14. package/dist/cjs/{limel-list_3.cjs.entry.js → limel-list_2.cjs.entry.js} +0 -2018
  15. package/dist/cjs/limel-popover_4.cjs.entry.js +239 -0
  16. package/dist/cjs/limel-portal.cjs.entry.js +2024 -0
  17. package/dist/cjs/limel-select.cjs.entry.js +4 -5
  18. package/dist/cjs/loader.cjs.js +1 -1
  19. package/dist/cjs/{moment-5cfac5cd.js → moment-d1e35cdc.js} +2 -2
  20. package/dist/collection/collection-manifest.json +2 -0
  21. package/dist/collection/components/button/button.css +40 -4
  22. package/dist/collection/components/button/button.js +56 -20
  23. package/dist/collection/components/chip-set/chip-set.js +1 -3
  24. package/dist/collection/components/code-editor/code-editor.css +153 -1
  25. package/dist/collection/components/code-editor/code-editor.js +82 -2
  26. package/dist/collection/components/date-picker/date-picker.js +18 -1
  27. package/dist/collection/components/date-picker/pickers/MonthPicker.js +1 -3
  28. package/dist/collection/components/date-picker/pickers/QuarterPicker.js +1 -3
  29. package/dist/collection/components/date-picker/pickers/YearPicker.js +1 -3
  30. package/dist/collection/components/dock/dock-button/dock-button.css +72 -0
  31. package/dist/collection/components/dock/dock-button/dock-button.js +204 -0
  32. package/dist/collection/components/dock/dock.css +107 -0
  33. package/dist/collection/components/dock/dock.js +300 -0
  34. package/dist/collection/components/dock/dock.types.js +1 -0
  35. package/dist/collection/components/icon-button/icon-button.css +21 -20
  36. package/dist/collection/components/icon-button/icon-button.js +2 -52
  37. package/dist/collection/components/input-field/input-field.js +32 -7
  38. package/dist/collection/components/select/select.css +8 -10
  39. package/dist/collection/components/select/select.template.js +3 -4
  40. package/dist/collection/style/internal/codemirror-tooltip.scss +19 -0
  41. package/dist/esm/{dateFormatter-2cad0292.js → dateFormatter-784c3334.js} +1 -1
  42. package/dist/esm/lime-elements.js +1 -1
  43. package/dist/esm/limel-button.entry.js +33 -17
  44. package/dist/esm/limel-chip-set.entry.js +1 -3
  45. package/dist/esm/limel-code-editor.entry.js +1588 -2
  46. package/dist/esm/{limel-color-picker-palette_2.entry.js → limel-color-picker-palette.entry.js} +2 -113
  47. package/dist/esm/limel-date-picker.entry.js +3 -3
  48. package/dist/esm/limel-dock-button.entry.js +82 -0
  49. package/dist/esm/limel-dock.entry.js +100 -0
  50. package/dist/esm/limel-flatpickr-adapter.entry.js +5 -11
  51. package/dist/esm/limel-form.entry.js +1 -1
  52. package/dist/esm/limel-icon-button.entry.js +2 -35
  53. package/dist/esm/limel-input-field.entry.js +13 -6
  54. package/dist/esm/{limel-list_3.entry.js → limel-list_2.entry.js} +1 -2018
  55. package/dist/esm/limel-popover_4.entry.js +232 -0
  56. package/dist/esm/limel-portal.entry.js +2020 -0
  57. package/dist/esm/limel-select.entry.js +4 -5
  58. package/dist/esm/loader.js +1 -1
  59. package/dist/esm/{moment-367e51c5.js → moment-faa8a4a8.js} +2 -2
  60. package/dist/lime-elements/lime-elements.css +1 -1
  61. package/dist/lime-elements/lime-elements.esm.js +1 -1
  62. package/dist/lime-elements/p-009de50e.entry.js +1 -0
  63. package/dist/lime-elements/p-0aedee4b.entry.js +1 -0
  64. package/dist/lime-elements/{p-7e571ec6.entry.js → p-0ba0c38a.entry.js} +1 -1
  65. package/dist/lime-elements/{p-08251941.entry.js → p-19f72dab.entry.js} +1 -1
  66. package/dist/lime-elements/p-1dfccbc5.entry.js +1 -0
  67. package/dist/lime-elements/p-212895da.entry.js +1 -0
  68. package/dist/lime-elements/p-457cf741.entry.js +37 -0
  69. package/dist/lime-elements/p-6b1bc80f.entry.js +1 -0
  70. package/dist/lime-elements/{p-d76f896d.js → p-73df4d83.js} +1 -1
  71. package/dist/lime-elements/p-93cd2268.entry.js +1 -0
  72. package/dist/lime-elements/p-93f42a32.entry.js +1 -0
  73. package/dist/lime-elements/p-945afca2.js +3 -0
  74. package/dist/lime-elements/p-aaa11eb2.entry.js +1 -0
  75. package/dist/lime-elements/p-bd098a11.entry.js +1 -0
  76. package/dist/lime-elements/{p-af0ec482.entry.js → p-c544c05b.entry.js} +1 -1
  77. package/dist/lime-elements/p-f41567a1.entry.js +1 -0
  78. package/dist/lime-elements/style/internal/codemirror-tooltip.scss +19 -0
  79. package/dist/types/components/button/button.d.ts +10 -3
  80. package/dist/types/components/code-editor/code-editor.d.ts +14 -0
  81. package/dist/types/components/date-picker/date-picker.d.ts +4 -0
  82. package/dist/types/components/dock/dock-button/dock-button.d.ts +48 -0
  83. package/dist/types/components/dock/dock.d.ts +83 -0
  84. package/dist/types/components/dock/dock.types.d.ts +53 -0
  85. package/dist/types/components/icon-button/icon-button.d.ts +0 -11
  86. package/dist/types/components/input-field/input-field.d.ts +6 -0
  87. package/dist/types/components.d.ts +167 -4
  88. package/dist/types/interface.d.ts +1 -0
  89. package/package.json +5 -5
  90. package/dist/cjs/limel-popover-surface.cjs.entry.js +0 -32
  91. package/dist/cjs/limel-tooltip_2.cjs.entry.js +0 -102
  92. package/dist/esm/limel-popover-surface.entry.js +0 -28
  93. package/dist/esm/limel-tooltip_2.entry.js +0 -97
  94. package/dist/lime-elements/p-22569fb6.entry.js +0 -1
  95. package/dist/lime-elements/p-3af5f9ad.js +0 -3
  96. package/dist/lime-elements/p-404e1465.entry.js +0 -1
  97. package/dist/lime-elements/p-6966b5df.entry.js +0 -1
  98. package/dist/lime-elements/p-705334c1.entry.js +0 -1
  99. package/dist/lime-elements/p-75152d89.entry.js +0 -1
  100. package/dist/lime-elements/p-7ee4b825.entry.js +0 -1
  101. package/dist/lime-elements/p-87453b45.entry.js +0 -1
  102. package/dist/lime-elements/p-bd8c9384.entry.js +0 -1
  103. package/dist/lime-elements/p-d1ee4501.entry.js +0 -37
@@ -0,0 +1,107 @@
1
+ /*
2
+ * This file is imported into every component!
3
+ *
4
+ * Nothing in this file may output any CSS
5
+ * without being explicitly called by outside code.
6
+ */
7
+ /*
8
+ * This file is imported into every component!
9
+ *
10
+ * Nothing in this file may output any CSS
11
+ * without being explicitly used by outside code.
12
+ */
13
+ /**
14
+ * @prop --dock-expanded-max-width: The maximum width of the Dock when it is expanded. Defaults to `max-content` which means the Dock will adjust its width to the widest dock item.
15
+ * @prop --dock-background-color: Background color of the whole component, defaults to `--contrast-100`.
16
+ * @prop --dock-item-background-color--selected: Background color of selected dock item, defaults to `--contrast-200`.
17
+ * @prop --dock-item-text-color: Text of dock items, defaults to `--contrast-1100`.
18
+ * @prop --dock-item-text-color--selected: Text color of selected dock item, defaults to `--contrast-1300`.
19
+ * @prop --dock-item-icon-color: Color of the optional icons used in each dock item. Only affects inactive dock items, defaults to text colors for default or selected states.
20
+ * @prop --popover-surface-width: Defines the width of the popover that is opened for dock items with custom components. Defaults to `auto`.
21
+ */
22
+ :host(limel-dock) {
23
+ --dock-item-height: 2.75rem;
24
+ --dock-padding: 0.25rem;
25
+ --dock-expand-shrink-button-height: 1rem;
26
+ --limel-dock-item-text-color: var(
27
+ --dock-item-text-color,
28
+ rgb(var(--contrast-1100))
29
+ );
30
+ --limel-dock-item-text-color--selected: var(
31
+ --dock-item-text-color--selected,
32
+ rgb(var(--contrast-1300))
33
+ );
34
+ isolation: isolate;
35
+ position: relative;
36
+ display: inline-flex;
37
+ flex-direction: column;
38
+ background-color: var(--dock-background-color, rgb(var(--contrast-100)));
39
+ box-shadow: 0.1875rem 0 0.375rem -0.125rem rgba(var(--color-black), 0.15), 0.1875rem 0 0.625rem -0.125rem rgba(var(--color-black), 0.05);
40
+ }
41
+
42
+ :host(limel-dock:not(.has-mobile-layout)) {
43
+ height: 100%;
44
+ width: calc(var(--dock-padding) * 2 + var(--dock-item-height));
45
+ }
46
+
47
+ :host(limel-dock.expanded) {
48
+ width: var(--dock-expanded-max-width, max-content);
49
+ }
50
+
51
+ .footer-separator {
52
+ margin-top: auto;
53
+ justify-self: flex-end;
54
+ }
55
+
56
+ nav {
57
+ box-sizing: border-box;
58
+ display: inline-flex;
59
+ flex-direction: column;
60
+ gap: 0.375rem;
61
+ flex-grow: 1;
62
+ padding: var(--dock-padding);
63
+ overflow-y: auto;
64
+ scrollbar-width: none;
65
+ -ms-overflow-style: none;
66
+ }
67
+ nav::-webkit-scrollbar {
68
+ display: none;
69
+ }
70
+ :host(limel-dock.has-mobile-layout) nav {
71
+ justify-content: space-between;
72
+ flex-direction: row;
73
+ }
74
+
75
+ .expand-shrink {
76
+ all: unset;
77
+ box-sizing: border-box;
78
+ transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;
79
+ cursor: pointer;
80
+ display: flex;
81
+ justify-content: center;
82
+ align-items: center;
83
+ height: var(--dock-expand-shrink-button-height);
84
+ padding: 0 0.5rem;
85
+ margin: var(--dock-padding);
86
+ border-radius: 0.375rem;
87
+ }
88
+ .expand-shrink:hover {
89
+ box-shadow: var(--button-shadow-hovered);
90
+ }
91
+ .expand-shrink:active {
92
+ box-shadow: var(--button-shadow-pressed);
93
+ transform: translate3d(0, 0.08rem, 0);
94
+ }
95
+ .expand-shrink.expanded {
96
+ justify-content: flex-end;
97
+ }
98
+ .expand-shrink.expanded limel-icon {
99
+ transform: rotateY(180deg);
100
+ }
101
+ .expand-shrink:focus-visible {
102
+ box-shadow: var(--shadow-depth-8-focused);
103
+ }
104
+ .expand-shrink limel-icon {
105
+ width: calc(var(--dock-expand-shrink-button-height) - 0.25rem);
106
+ color: var(--dock-item-icon-color, var(--limel-dock-item-text-color));
107
+ }
@@ -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 {};
@@ -231,20 +231,9 @@
231
231
  z-index: 1;
232
232
  }
233
233
 
234
- @media (pointer: coarse) {
235
- .mdc-icon-button:hover::before {
236
- opacity: 0;
237
- }
238
- }
239
234
  /**
240
- * @prop --icon-background-color: Background color when attribute `elevated` is set to `true`.
235
+ * @prop --icon-background-color: Background color of the button.
241
236
  */
242
- :host {
243
- display: inline-flex;
244
- align-items: center;
245
- justify-content: center;
246
- }
247
-
248
237
  :host([hidden]) {
249
238
  display: none;
250
239
  }
@@ -253,25 +242,37 @@
253
242
  pointer-events: none;
254
243
  }
255
244
 
256
- :host([elevated]) .mdc-icon-button {
257
- padding: 0.5625rem;
258
- }
259
- :host([elevated]) limel-icon {
245
+ .mdc-icon-button {
260
246
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;
261
- box-shadow: var(--button-shadow-normal);
247
+ display: inline-flex;
248
+ align-items: center;
249
+ justify-content: center;
250
+ box-sizing: border-box;
251
+ height: 2.25rem;
252
+ width: 2.25rem;
253
+ padding: 0.125rem;
254
+ border-radius: 50%;
255
+ background-color: var(--icon-background-color, transparent);
262
256
  }
263
- :host([elevated]) limel-icon:hover {
257
+ .mdc-icon-button:hover {
264
258
  box-shadow: var(--button-shadow-hovered);
265
259
  }
266
- :host([elevated]) limel-icon:active {
260
+ .mdc-icon-button:active {
267
261
  box-shadow: var(--button-shadow-pressed);
268
262
  transform: translate3d(0, 0.08rem, 0);
269
263
  }
270
-
264
+ :host([elevated]) .mdc-icon-button:not(:hover):not(:active):not(:focus-visible) {
265
+ box-shadow: var(--button-shadow-normal);
266
+ }
271
267
  .mdc-icon-button:disabled {
272
268
  color: var(--mdc-theme-text-disabled-on-background);
273
269
  }
274
270
  .mdc-icon-button:focus-visible {
275
271
  box-shadow: var(--shadow-depth-8-focused);
276
272
  border-radius: 50%;
273
+ }
274
+
275
+ limel-icon {
276
+ width: 1.25rem;
277
+ height: 1.25rem;
277
278
  }
@@ -1,5 +1,4 @@
1
- import { MDCRipple } from '@material/ripple';
2
- import { Component, Element, h, Method, Prop } from '@stencil/core';
1
+ import { Component, Element, h, Prop } from '@stencil/core';
3
2
  /**
4
3
  * @exampleComponent limel-example-icon-button-basic
5
4
  * @exampleComponent limel-example-icon-button-disabled
@@ -18,23 +17,6 @@ export class IconButton {
18
17
  * Set to `true` to disable the button.
19
18
  */
20
19
  this.disabled = false;
21
- this.removeFocusedStyleOnClick =
22
- this.removeFocusedStyleOnClick.bind(this);
23
- }
24
- /**
25
- * If the button is hidden or inside another element that is animating
26
- * while the button is instantiated, the hover-highlight may become
27
- * misaligned. If so, calling this method will make the button re-layout
28
- * the highlight.
29
- */
30
- async relayout() {
31
- if (this.mdcIconButtonRipple) {
32
- this.mdcIconButtonRipple.layout();
33
- }
34
- }
35
- removeFocusedStyleOnClick() {
36
- const mdcButton = this.host.shadowRoot.querySelector('.mdc-icon-button');
37
- mdcButton.classList.remove('mdc-ripple-upgraded--background-focused');
38
20
  }
39
21
  connectedCallback() {
40
22
  this.initialize();
@@ -47,28 +29,14 @@ export class IconButton {
47
29
  if (!element) {
48
30
  return;
49
31
  }
50
- this.mdcIconButtonRipple = new MDCRipple(element);
51
- this.mdcIconButtonRipple.unbounded = true;
52
- this.host.addEventListener('click', this.removeFocusedStyleOnClick);
53
- }
54
- disconnectedCallback() {
55
- var _a;
56
- (_a = this.mdcIconButtonRipple) === null || _a === void 0 ? void 0 : _a.destroy();
57
- this.host.removeEventListener('click', this.removeFocusedStyleOnClick);
58
32
  }
59
33
  render() {
60
34
  const buttonAttributes = {};
61
35
  if (this.host.hasAttribute('tabindex')) {
62
36
  buttonAttributes.tabindex = this.host.getAttribute('tabindex');
63
37
  }
64
- const iconAttributes = {};
65
- if (this.elevated) {
66
- iconAttributes.badge = true;
67
- iconAttributes.size = 'small';
68
- }
69
38
  return (h("button", Object.assign({ class: "mdc-icon-button", disabled: this.disabled, "aria-label": this.label, title: this.label }, buttonAttributes),
70
- h("div", { class: "mdc-icon-button__ripple" }),
71
- h("limel-icon", Object.assign({ name: this.icon }, iconAttributes))));
39
+ h("limel-icon", { name: this.icon, badge: true })));
72
40
  }
73
41
  static get is() { return "limel-icon-button"; }
74
42
  static get encapsulation() { return "shadow"; }
@@ -150,23 +118,5 @@ export class IconButton {
150
118
  "defaultValue": "false"
151
119
  }
152
120
  }; }
153
- static get methods() { return {
154
- "relayout": {
155
- "complexType": {
156
- "signature": "() => Promise<void>",
157
- "parameters": [],
158
- "references": {
159
- "Promise": {
160
- "location": "global"
161
- }
162
- },
163
- "return": "Promise<void>"
164
- },
165
- "docs": {
166
- "text": "If the button is hidden or inside another element that is animating\nwhile the button is instantiated, the hover-highlight may become\nmisaligned. If so, calling this method will make the button re-layout\nthe highlight.",
167
- "tags": []
168
- }
169
- }
170
- }; }
171
121
  static get elementRef() { return "host"; }
172
122
  }
@@ -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
- h("span", { class: "mdc-notched-outline__notch" },
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,
@@ -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;
@@ -1786,15 +1790,6 @@
1786
1790
  font-size: 0.875rem;
1787
1791
  transform: translateY(-2.171875rem) scale(0.75);
1788
1792
  }
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
1793
  .limel-select .limel-select-trigger,
1799
1794
  .limel-select .limel-select__selected-option {
1800
1795
  width: 100%;
@@ -1822,7 +1817,10 @@
1822
1817
  color: var(--mdc-theme-primary);
1823
1818
  }
1824
1819
  .limel-select:not(.mdc-select--disabled) .limel-select-trigger.limel-select--focused .mdc-select__dropdown-icon {
1825
- color: var(--mdc-theme-primary);
1820
+ fill: var(--mdc-theme-primary);
1821
+ }
1822
+ .limel-select:not(.mdc-select--disabled) .limel-select-trigger.limel-select--focused .mdc-select__dropdown-icon-graphic {
1823
+ transform: rotate(-180deg);
1826
1824
  }
1827
1825
  .limel-select.limel-select--required .mdc-floating-label::after {
1828
1826
  content: "*";