@limetech/lime-elements 34.1.0-next.5 → 34.1.0-next.9

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 (115) hide show
  1. package/dist/cjs/{_arrayIncludesWith-d69e30af.js → _arrayIncludesWith-36a6fafb.js} +7 -6
  2. package/dist/cjs/{_assignValue-493aac17.js → _assignValue-c9fc3712.js} +2 -2
  3. package/dist/cjs/{_defineProperty-c081d04c.js → _defineProperty-8351e789.js} +4 -3
  4. package/dist/cjs/eq-9a943b00.js +75 -0
  5. package/dist/cjs/{isArrayLike-2bebb99c.js → isArrayLike-ac53bdac.js} +1 -30
  6. package/dist/cjs/{isEqual-1ce0c121.js → isEqual-e3b9c27c.js} +21 -19
  7. package/dist/cjs/{eq-3b43a5ca.js → isObject-e28b7997.js} +0 -71
  8. package/dist/cjs/isObjectLike-3e3f0cba.js +31 -0
  9. package/dist/cjs/{isSymbol-4666002c.js → isSymbol-d22b2798.js} +3 -3
  10. package/dist/cjs/lime-elements.cjs.js +1 -1
  11. package/dist/cjs/limel-color-picker-palette_2.cjs.entry.js +188 -0
  12. package/dist/cjs/limel-color-picker.cjs.entry.js +51 -0
  13. package/dist/cjs/{limel-flatpickr-adapter_2.cjs.entry.js → limel-flatpickr-adapter.cjs.entry.js} +8 -801
  14. package/dist/cjs/limel-form.cjs.entry.js +14 -12
  15. package/dist/cjs/limel-input-field.cjs.entry.js +713 -0
  16. package/dist/cjs/limel-list_3.cjs.entry.js +2414 -0
  17. package/dist/cjs/limel-menu.cjs.entry.js +5 -4
  18. package/dist/cjs/limel-progress-flow-item.cjs.entry.js +1 -1
  19. package/dist/cjs/limel-slider.cjs.entry.js +30 -3
  20. package/dist/cjs/limel-tab-bar.cjs.entry.js +7 -5
  21. package/dist/cjs/limel-table.cjs.entry.js +9 -7
  22. package/dist/cjs/{limel-tooltip.cjs.entry.js → limel-tooltip_2.cjs.entry.js} +16 -0
  23. package/dist/cjs/loader.cjs.js +1 -1
  24. package/dist/cjs/{pickBy-64252559.js → pickBy-88b0430a.js} +10 -10
  25. package/dist/cjs/toNumber-062ea29c.js +99 -0
  26. package/dist/cjs/{zipObject-2f430e94.js → zipObject-4050a45f.js} +1 -1
  27. package/dist/collection/collection-manifest.json +2 -0
  28. package/dist/collection/components/color-picker/color-picker-palette.css +1202 -0
  29. package/dist/collection/components/color-picker/color-picker-palette.js +135 -0
  30. package/dist/collection/components/color-picker/color-picker.css +71 -0
  31. package/dist/collection/components/color-picker/color-picker.js +189 -0
  32. package/dist/collection/components/color-picker/swatches.js +29 -0
  33. package/dist/collection/components/list/list.css +2 -1
  34. package/dist/collection/components/progress-flow/progress-flow-item/progress-flow-item.css +1 -2
  35. package/dist/collection/components/slider/slider.js +30 -3
  36. package/dist/esm/{_arrayIncludesWith-3f5ce249.js → _arrayIncludesWith-b5d3fd9e.js} +5 -4
  37. package/dist/esm/{_assignValue-94fb6adc.js → _assignValue-08fe10bc.js} +2 -2
  38. package/dist/esm/{_defineProperty-cbf98a2a.js → _defineProperty-8c869077.js} +2 -1
  39. package/dist/esm/eq-c1c7f528.js +72 -0
  40. package/dist/esm/{isArrayLike-14db8f02.js → isArrayLike-dd37ba9a.js} +2 -30
  41. package/dist/esm/{isEqual-4d982635.js → isEqual-4f22635f.js} +5 -3
  42. package/dist/esm/{eq-f40dd1d6.js → isObject-c74e273c.js} +1 -70
  43. package/dist/esm/isObjectLike-38996507.js +29 -0
  44. package/dist/esm/{isSymbol-84252d8e.js → isSymbol-5bf20921.js} +2 -2
  45. package/dist/esm/lime-elements.js +1 -1
  46. package/dist/esm/limel-color-picker-palette_2.entry.js +183 -0
  47. package/dist/esm/limel-color-picker.entry.js +47 -0
  48. package/dist/esm/{limel-flatpickr-adapter_2.entry.js → limel-flatpickr-adapter.entry.js} +8 -800
  49. package/dist/esm/limel-form.entry.js +10 -8
  50. package/dist/esm/limel-input-field.entry.js +709 -0
  51. package/dist/esm/limel-list_3.entry.js +2408 -0
  52. package/dist/esm/limel-menu.entry.js +5 -4
  53. package/dist/esm/limel-progress-flow-item.entry.js +1 -1
  54. package/dist/esm/limel-slider.entry.js +30 -3
  55. package/dist/esm/limel-tab-bar.entry.js +7 -5
  56. package/dist/esm/limel-table.entry.js +9 -7
  57. package/dist/esm/{limel-tooltip.entry.js → limel-tooltip_2.entry.js} +16 -1
  58. package/dist/esm/loader.js +1 -1
  59. package/dist/esm/{pickBy-c485c1b5.js → pickBy-8a849e46.js} +5 -5
  60. package/dist/esm/toNumber-a6ed64f0.js +97 -0
  61. package/dist/esm/{zipObject-53fcafb3.js → zipObject-22e88ce9.js} +1 -1
  62. package/dist/lime-elements/lime-elements.esm.js +1 -1
  63. package/dist/lime-elements/p-090bc949.js +1 -0
  64. package/dist/lime-elements/p-13f0e4f4.entry.js +1 -0
  65. package/dist/lime-elements/p-18fe2eb1.entry.js +1 -0
  66. package/dist/lime-elements/{p-425a0596.js → p-1a64b531.js} +1 -1
  67. package/dist/lime-elements/{p-03c28bee.entry.js → p-23d59a30.entry.js} +1 -1
  68. package/dist/lime-elements/p-365098fe.js +1 -0
  69. package/dist/lime-elements/p-379955f4.js +1 -0
  70. package/dist/lime-elements/p-426d11b4.js +1 -0
  71. package/dist/lime-elements/p-440084ea.js +1 -0
  72. package/dist/lime-elements/p-468e940e.entry.js +16 -0
  73. package/dist/lime-elements/p-4bc5d3fc.entry.js +1 -0
  74. package/dist/lime-elements/p-511d71e0.entry.js +1 -0
  75. package/dist/lime-elements/{p-ab049a50.entry.js → p-58cbe99d.entry.js} +1 -1
  76. package/dist/lime-elements/p-7f43b0c4.js +1 -0
  77. package/dist/lime-elements/p-81258617.entry.js +1 -0
  78. package/dist/lime-elements/p-858c6b82.js +1 -0
  79. package/dist/lime-elements/{p-fc691234.entry.js → p-bcafdb7a.entry.js} +2 -2
  80. package/dist/lime-elements/p-c93050d6.js +1 -0
  81. package/dist/lime-elements/p-cc154284.entry.js +1 -0
  82. package/dist/lime-elements/p-d529bb7d.js +1 -0
  83. package/dist/lime-elements/p-eda23c05.js +1 -0
  84. package/dist/lime-elements/{p-ff0217b3.entry.js → p-f2c706b8.entry.js} +1 -1
  85. package/dist/lime-elements/p-f5a3e526.entry.js +1 -0
  86. package/dist/lime-elements/p-f83213b8.js +1 -0
  87. package/dist/types/components/color-picker/color-picker-palette.d.ts +32 -0
  88. package/dist/types/components/color-picker/color-picker.d.ts +54 -0
  89. package/dist/types/components/color-picker/swatches.d.ts +4 -0
  90. package/dist/types/components.d.ts +114 -0
  91. package/package.json +1 -1
  92. package/dist/cjs/limel-list_2.cjs.entry.js +0 -485
  93. package/dist/cjs/limel-popover.cjs.entry.js +0 -116
  94. package/dist/cjs/limel-portal.cjs.entry.js +0 -1935
  95. package/dist/cjs/limel-tooltip-content.cjs.entry.js +0 -22
  96. package/dist/esm/limel-list_2.entry.js +0 -480
  97. package/dist/esm/limel-popover.entry.js +0 -112
  98. package/dist/esm/limel-portal.entry.js +0 -1931
  99. package/dist/esm/limel-tooltip-content.entry.js +0 -18
  100. package/dist/lime-elements/p-11d5a71a.entry.js +0 -1
  101. package/dist/lime-elements/p-227d2c5a.entry.js +0 -1
  102. package/dist/lime-elements/p-3ce2d46a.js +0 -1
  103. package/dist/lime-elements/p-77afe6dd.entry.js +0 -1
  104. package/dist/lime-elements/p-7c4d91f5.js +0 -1
  105. package/dist/lime-elements/p-845e645a.entry.js +0 -1
  106. package/dist/lime-elements/p-8bbe3720.js +0 -1
  107. package/dist/lime-elements/p-8e4ff107.js +0 -1
  108. package/dist/lime-elements/p-acfbf7ac.js +0 -1
  109. package/dist/lime-elements/p-bbc1bb01.entry.js +0 -1
  110. package/dist/lime-elements/p-c0765c9b.js +0 -1
  111. package/dist/lime-elements/p-e28a4246.entry.js +0 -1
  112. package/dist/lime-elements/p-ee7355e7.js +0 -1
  113. package/dist/lime-elements/p-f4495f59.entry.js +0 -1
  114. package/dist/lime-elements/p-fbe32287.entry.js +0 -16
  115. package/dist/lime-elements/p-fc610f15.js +0 -1
@@ -0,0 +1,135 @@
1
+ import { Component, h, Prop, Event } from '@stencil/core';
2
+ import { brightnesses, colors, getColorName, getCssColor } from './swatches';
3
+ /**
4
+ * @private
5
+ */
6
+ export class Palette {
7
+ constructor() {
8
+ this.renderSwatches = () => {
9
+ return colors.map((color) => {
10
+ return brightnesses.map(this.renderSwatch(color));
11
+ });
12
+ };
13
+ this.renderSwatch = (color) => (brightness) => {
14
+ const colorName = getColorName(color, brightness);
15
+ const classList = {
16
+ swatch: true,
17
+ [colorName]: true,
18
+ 'swatch--selected': this.value === getCssColor(color, brightness),
19
+ };
20
+ return (h("div", { class: classList, onClick: this.handleClick(color, brightness), tabindex: "0" }));
21
+ };
22
+ this.handleChange = (event) => {
23
+ event.stopPropagation();
24
+ this.change.emit(event.detail);
25
+ };
26
+ this.handleClick = (color, brightness) => (event) => {
27
+ const value = getCssColor(color, brightness);
28
+ event.stopPropagation();
29
+ this.change.emit(value);
30
+ };
31
+ }
32
+ render() {
33
+ const background = this.value ? { '--background': this.value } : {};
34
+ return [
35
+ h("div", { class: "color-picker-palette" }, this.renderSwatches()),
36
+ h("div", { class: "chosen-color-name" },
37
+ h("limel-input-field", { label: this.label, helperText: this.helperText, value: this.value, onChange: this.handleChange, required: this.required }),
38
+ h("div", { class: "chosen-color-preview", style: background })),
39
+ ];
40
+ }
41
+ static get is() { return "limel-color-picker-palette"; }
42
+ static get encapsulation() { return "shadow"; }
43
+ static get originalStyleUrls() { return {
44
+ "$": ["color-picker-palette.scss"]
45
+ }; }
46
+ static get styleUrls() { return {
47
+ "$": ["color-picker-palette.css"]
48
+ }; }
49
+ static get properties() { return {
50
+ "value": {
51
+ "type": "string",
52
+ "mutable": false,
53
+ "complexType": {
54
+ "original": "string",
55
+ "resolved": "string",
56
+ "references": {}
57
+ },
58
+ "required": false,
59
+ "optional": false,
60
+ "docs": {
61
+ "tags": [],
62
+ "text": "Color value that is manually typed by the user"
63
+ },
64
+ "attribute": "value",
65
+ "reflect": true
66
+ },
67
+ "label": {
68
+ "type": "string",
69
+ "mutable": false,
70
+ "complexType": {
71
+ "original": "string",
72
+ "resolved": "string",
73
+ "references": {}
74
+ },
75
+ "required": false,
76
+ "optional": false,
77
+ "docs": {
78
+ "tags": [],
79
+ "text": "Label of the input field"
80
+ },
81
+ "attribute": "label",
82
+ "reflect": true
83
+ },
84
+ "helperText": {
85
+ "type": "string",
86
+ "mutable": false,
87
+ "complexType": {
88
+ "original": "string",
89
+ "resolved": "string",
90
+ "references": {}
91
+ },
92
+ "required": false,
93
+ "optional": false,
94
+ "docs": {
95
+ "tags": [],
96
+ "text": "Helper text of the input field"
97
+ },
98
+ "attribute": "helper-text",
99
+ "reflect": true
100
+ },
101
+ "required": {
102
+ "type": "boolean",
103
+ "mutable": false,
104
+ "complexType": {
105
+ "original": "boolean",
106
+ "resolved": "boolean",
107
+ "references": {}
108
+ },
109
+ "required": false,
110
+ "optional": false,
111
+ "docs": {
112
+ "tags": [],
113
+ "text": "Set to `true` if a value is required"
114
+ },
115
+ "attribute": "required",
116
+ "reflect": true
117
+ }
118
+ }; }
119
+ static get events() { return [{
120
+ "method": "change",
121
+ "name": "change",
122
+ "bubbles": true,
123
+ "cancelable": true,
124
+ "composed": true,
125
+ "docs": {
126
+ "tags": [],
127
+ "text": "Emits chosen value to the parent component"
128
+ },
129
+ "complexType": {
130
+ "original": "string",
131
+ "resolved": "string",
132
+ "references": {}
133
+ }
134
+ }]; }
135
+ }
@@ -0,0 +1,71 @@
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
+ :host {
8
+ --popover-surface-width: 50rem;
9
+ --color-picker-default-background: url("data:image/svg+xml;charset=utf-8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' style='fill-rule:evenodd;'><path fill-opacity='0.1' d='M0 0h4v4H0zM4 4h4v4H4z'/></svg>");
10
+ }
11
+
12
+ .color-picker {
13
+ display: grid;
14
+ gap: 0.5rem;
15
+ grid-template-columns: auto 1fr;
16
+ }
17
+
18
+ .chosen-color-preview,
19
+ .picker-trigger {
20
+ box-sizing: border-box;
21
+ position: relative;
22
+ isolation: isolate;
23
+ width: 3.5rem;
24
+ height: 3.5rem;
25
+ }
26
+ .chosen-color-preview:before, .chosen-color-preview:after,
27
+ .picker-trigger:before,
28
+ .picker-trigger:after {
29
+ content: "";
30
+ position: absolute;
31
+ inset: 0;
32
+ border-radius: inherit;
33
+ }
34
+ .chosen-color-preview:before,
35
+ .picker-trigger:before {
36
+ background: var(--color-picker-default-background);
37
+ background-size: 0.5rem;
38
+ z-index: 0;
39
+ }
40
+ .chosen-color-preview:after,
41
+ .picker-trigger:after {
42
+ background: var(--background);
43
+ z-index: 1;
44
+ }
45
+
46
+ .picker-trigger {
47
+ border-radius: 0.5rem;
48
+ cursor: pointer;
49
+ transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;
50
+ box-shadow: var(--button-shadow-normal);
51
+ }
52
+ .picker-trigger:hover {
53
+ box-shadow: var(--button-shadow-hovered);
54
+ }
55
+ .picker-trigger:active {
56
+ box-shadow: var(--button-shadow-pressed);
57
+ transform: translate3d(0, 0.08rem, 0);
58
+ }
59
+ .picker-trigger:after {
60
+ box-shadow: 0 0 0 0.25rem rgb(var(--contrast-100)) inset;
61
+ }
62
+
63
+ :host([readonly]) .picker-trigger:hover, :host([readonly]) .picker-trigger:active {
64
+ cursor: default;
65
+ box-shadow: var(--button-shadow-normal);
66
+ transform: none;
67
+ }
68
+
69
+ .chosen-color-input[readonly] {
70
+ transform: translateY(1rem);
71
+ }
@@ -0,0 +1,189 @@
1
+ /* eslint-disable multiline-ternary */
2
+ import { Component, h, Prop, State, Event } from '@stencil/core';
3
+ /**
4
+ * This component enables you to select a swatch from out color palette, simply
5
+ * by clicking on it. You can then copy the css variable name of the chosen color
6
+ * and use it where desired.
7
+ *
8
+ * The color picker can also show you a preview of any valid color name or color value.
9
+ *
10
+ * :::note
11
+ * Make sure to read our [guidelines about usage of colors](/#/DesignGuidelines/color-system.md/) from our palette.
12
+ * :::
13
+ *
14
+ * @exampleComponent limel-example-color-picker
15
+ * @exampleComponent limel-example-color-picker-readonly
16
+ */
17
+ export class ColorPicker {
18
+ constructor() {
19
+ this.isOpen = false;
20
+ this.renderTooltip = () => {
21
+ if (!this.readonly) {
22
+ return (h("limel-tooltip", { label: this.tooltipLabel, elementId: "tooltip-button" }));
23
+ }
24
+ };
25
+ this.renderPickerPalette = () => {
26
+ if (this.readonly) {
27
+ return this.renderPickerTrigger();
28
+ }
29
+ return (h("limel-popover", { open: this.isOpen, onClose: this.onPopoverClose },
30
+ this.renderPickerTrigger(),
31
+ h("limel-color-picker-palette", { value: this.value, label: this.label, helperText: this.helperText, onChange: this.handleChange, required: this.required })));
32
+ };
33
+ this.renderPickerTrigger = () => {
34
+ const background = this.value ? { '--background': this.value } : {};
35
+ return (h("div", { class: "picker-trigger", slot: "trigger", style: background, role: "button", tabindex: "0", onClick: this.openPopover, id: "tooltip-button" }));
36
+ };
37
+ this.openPopover = (event) => {
38
+ event.stopPropagation();
39
+ this.isOpen = true;
40
+ };
41
+ this.onPopoverClose = (event) => {
42
+ event.stopPropagation();
43
+ this.isOpen = false;
44
+ };
45
+ this.handleChange = (event) => {
46
+ event.stopPropagation();
47
+ this.change.emit(event.detail);
48
+ };
49
+ }
50
+ render() {
51
+ return [
52
+ this.renderTooltip(),
53
+ h("div", { class: "color-picker" },
54
+ this.renderPickerPalette(),
55
+ h("limel-input-field", { label: this.label, helperText: this.helperText, value: this.value, onChange: this.handleChange, required: this.required, readonly: this.readonly, class: "chosen-color-input" })),
56
+ ];
57
+ }
58
+ static get is() { return "limel-color-picker"; }
59
+ static get encapsulation() { return "shadow"; }
60
+ static get originalStyleUrls() { return {
61
+ "$": ["color-picker.scss"]
62
+ }; }
63
+ static get styleUrls() { return {
64
+ "$": ["color-picker.css"]
65
+ }; }
66
+ static get properties() { return {
67
+ "value": {
68
+ "type": "string",
69
+ "mutable": false,
70
+ "complexType": {
71
+ "original": "string",
72
+ "resolved": "string",
73
+ "references": {}
74
+ },
75
+ "required": false,
76
+ "optional": false,
77
+ "docs": {
78
+ "tags": [],
79
+ "text": "Name or code of the chosen color"
80
+ },
81
+ "attribute": "value",
82
+ "reflect": true
83
+ },
84
+ "label": {
85
+ "type": "string",
86
+ "mutable": false,
87
+ "complexType": {
88
+ "original": "string",
89
+ "resolved": "string",
90
+ "references": {}
91
+ },
92
+ "required": false,
93
+ "optional": false,
94
+ "docs": {
95
+ "tags": [],
96
+ "text": "The label of the input field"
97
+ },
98
+ "attribute": "label",
99
+ "reflect": true
100
+ },
101
+ "helperText": {
102
+ "type": "string",
103
+ "mutable": false,
104
+ "complexType": {
105
+ "original": "string",
106
+ "resolved": "string",
107
+ "references": {}
108
+ },
109
+ "required": false,
110
+ "optional": false,
111
+ "docs": {
112
+ "tags": [],
113
+ "text": "Helper text of the input field"
114
+ },
115
+ "attribute": "helper-text",
116
+ "reflect": true
117
+ },
118
+ "tooltipLabel": {
119
+ "type": "string",
120
+ "mutable": false,
121
+ "complexType": {
122
+ "original": "string",
123
+ "resolved": "string",
124
+ "references": {}
125
+ },
126
+ "required": false,
127
+ "optional": false,
128
+ "docs": {
129
+ "tags": [],
130
+ "text": "Displayed as tooltips when picker is hovered."
131
+ },
132
+ "attribute": "tooltip-label",
133
+ "reflect": true
134
+ },
135
+ "required": {
136
+ "type": "boolean",
137
+ "mutable": false,
138
+ "complexType": {
139
+ "original": "boolean",
140
+ "resolved": "boolean",
141
+ "references": {}
142
+ },
143
+ "required": false,
144
+ "optional": false,
145
+ "docs": {
146
+ "tags": [],
147
+ "text": "Set to `true` if a value is required"
148
+ },
149
+ "attribute": "required",
150
+ "reflect": true
151
+ },
152
+ "readonly": {
153
+ "type": "boolean",
154
+ "mutable": false,
155
+ "complexType": {
156
+ "original": "boolean",
157
+ "resolved": "boolean",
158
+ "references": {}
159
+ },
160
+ "required": false,
161
+ "optional": false,
162
+ "docs": {
163
+ "tags": [],
164
+ "text": "Set to `true` if a value is readonly. This makes the component un-interactive."
165
+ },
166
+ "attribute": "readonly",
167
+ "reflect": true
168
+ }
169
+ }; }
170
+ static get states() { return {
171
+ "isOpen": {}
172
+ }; }
173
+ static get events() { return [{
174
+ "method": "change",
175
+ "name": "change",
176
+ "bubbles": true,
177
+ "cancelable": true,
178
+ "composed": true,
179
+ "docs": {
180
+ "tags": [],
181
+ "text": "Emits chosen value to the parent component"
182
+ },
183
+ "complexType": {
184
+ "original": "string",
185
+ "resolved": "string",
186
+ "references": {}
187
+ }
188
+ }]; }
189
+ }
@@ -0,0 +1,29 @@
1
+ export const colors = [
2
+ 'red',
3
+ 'pink',
4
+ 'magenta',
5
+ 'purple',
6
+ 'violet',
7
+ 'indigo',
8
+ 'blue',
9
+ 'sky',
10
+ 'cyan',
11
+ 'teal',
12
+ 'green',
13
+ 'lime',
14
+ 'grass',
15
+ 'yellow',
16
+ 'amber',
17
+ 'orange',
18
+ 'coral',
19
+ 'brown',
20
+ 'gray',
21
+ 'glaucous',
22
+ ];
23
+ export const brightnesses = ['lighter', 'light', 'default', 'dark', 'darker'];
24
+ export function getColorName(color, brightness) {
25
+ return `--color-${color}-${brightness}`;
26
+ }
27
+ export function getCssColor(color, brightness) {
28
+ return `rgb(var(${getColorName(color, brightness)}))`;
29
+ }
@@ -68,7 +68,7 @@
68
68
  * @prop --list-grid-item-min-width: Minimum width of items in a list that has `has-grid-layout` class. Defaults to `7.5rem`.
69
69
  * @prop --list-grid-gap: Distance between items in a list that has `has-grid-layout` class. Defaults to `0.75rem`.
70
70
  */
71
- :host {
71
+ :host(limel-list) {
72
72
  display: block;
73
73
  }
74
74
 
@@ -3061,6 +3061,7 @@ a.mdc-list-item {
3061
3061
  border-radius: 0.375rem;
3062
3062
  }
3063
3063
  .mdc-deprecated-list .mdc-deprecated-list-item {
3064
+ box-sizing: border-box;
3064
3065
  z-index: 0;
3065
3066
  }
3066
3067
  .mdc-deprecated-list .mdc-deprecated-list-item.mdc-deprecated-list-item--disabled {
@@ -118,8 +118,7 @@
118
118
  height: var(--step-height);
119
119
  position: absolute;
120
120
  z-index: 1;
121
- right: 0;
122
- transform: translateX(50%);
121
+ right: calc(var(--step-height) / 2 * -1);
123
122
  overflow: hidden;
124
123
  }
125
124
  .divider:after {
@@ -58,6 +58,8 @@ export class Slider {
58
58
  if (!element) {
59
59
  return;
60
60
  }
61
+ const inputElement = element.querySelector('input');
62
+ const value = this.getValue();
61
63
  /*
62
64
  For some reason the input element's `value` attribute is removed
63
65
  (probably by Stencil) when the element is first rendered. But if the
@@ -65,9 +67,34 @@ export class Slider {
65
67
  MDCSlider crashes.
66
68
  So we add the attribute right before initializing MDCSlider. /Ads
67
69
  */
68
- element
69
- .querySelector('input')
70
- .setAttribute('value', `${this.multiplyByFactor(this.getValue())}`);
70
+ inputElement.setAttribute('value', `${this.multiplyByFactor(value)}`);
71
+ /*
72
+ When creating the `mdcSlider` component, its important that the value set in
73
+ the input field obeys the range and the step size.
74
+
75
+ The MDCSlider will throw an exception unless the value in the input element
76
+ is dividible by the step value and is in the provided range.
77
+ If an exception occurs, this component will crash and it will be impossible to change
78
+ its value.
79
+ The logic below ensures that the component will render even though the
80
+ provided value is wrong.
81
+ This could be considered wrong, but it at least fixes so that it's possible
82
+ to change the value from the UI.
83
+ */
84
+ const greaterThanOrEqualMin = value >= this.valuemin;
85
+ const lessThanOrEqualMax = value <= this.valuemax;
86
+ const dividableByStep = value % this.step === 0;
87
+ if (!greaterThanOrEqualMin) {
88
+ const newMin = this.multiplyByFactor(value);
89
+ inputElement.setAttribute('min', `${newMin}`);
90
+ }
91
+ if (!lessThanOrEqualMax) {
92
+ const newMax = this.multiplyByFactor(value);
93
+ inputElement.setAttribute('max', `${newMax}`);
94
+ }
95
+ if (!dividableByStep) {
96
+ inputElement.removeAttribute('step');
97
+ }
71
98
  this.mdcSlider = new MDCSlider(element);
72
99
  this.mdcSlider.listen('MDCSlider:change', this.changeHandler);
73
100
  this.mdcSlider.listen('MDCSlider:input', this.inputHandler);
@@ -1,8 +1,9 @@
1
- import { v as identity, c as isArguments, p as arrayPush } from './isEqual-4d982635.js';
2
- import { d as defineProperty } from './_defineProperty-cbf98a2a.js';
3
- import { S as Symbol } from './eq-f40dd1d6.js';
1
+ import { v as identity, c as isArguments, p as arrayPush } from './isEqual-4f22635f.js';
2
+ import { d as defineProperty } from './_defineProperty-8c869077.js';
3
+ import { S as Symbol } from './isObject-c74e273c.js';
4
4
  import { i as isArray } from './isArray-80298bc7.js';
5
- import { i as isObjectLike, a as isArrayLike } from './isArrayLike-14db8f02.js';
5
+ import { i as isArrayLike } from './isArrayLike-dd37ba9a.js';
6
+ import { i as isObjectLike } from './isObjectLike-38996507.js';
6
7
 
7
8
  /**
8
9
  * A faster alternative to `Function#apply`, this function invokes `func`
@@ -1,5 +1,5 @@
1
- import { d as defineProperty } from './_defineProperty-cbf98a2a.js';
2
- import { e as eq } from './eq-f40dd1d6.js';
1
+ import { d as defineProperty } from './_defineProperty-8c869077.js';
2
+ import { e as eq } from './eq-c1c7f528.js';
3
3
 
4
4
  /**
5
5
  * The base implementation of `assignValue` and `assignMergeValue` without
@@ -1,4 +1,5 @@
1
- import { r as root, i as isObject, a as isFunction } from './eq-f40dd1d6.js';
1
+ import { i as isFunction } from './eq-c1c7f528.js';
2
+ import { r as root, i as isObject } from './isObject-c74e273c.js';
2
3
 
3
4
  /** Used to detect overreaching core-js shims. */
4
5
  var coreJsData = root['__core-js_shared__'];
@@ -0,0 +1,72 @@
1
+ import { i as isObject, b as baseGetTag } from './isObject-c74e273c.js';
2
+
3
+ /** `Object#toString` result references. */
4
+ var asyncTag = '[object AsyncFunction]',
5
+ funcTag = '[object Function]',
6
+ genTag = '[object GeneratorFunction]',
7
+ proxyTag = '[object Proxy]';
8
+
9
+ /**
10
+ * Checks if `value` is classified as a `Function` object.
11
+ *
12
+ * @static
13
+ * @memberOf _
14
+ * @since 0.1.0
15
+ * @category Lang
16
+ * @param {*} value The value to check.
17
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
18
+ * @example
19
+ *
20
+ * _.isFunction(_);
21
+ * // => true
22
+ *
23
+ * _.isFunction(/abc/);
24
+ * // => false
25
+ */
26
+ function isFunction(value) {
27
+ if (!isObject(value)) {
28
+ return false;
29
+ }
30
+ // The use of `Object#toString` avoids issues with the `typeof` operator
31
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
32
+ var tag = baseGetTag(value);
33
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
34
+ }
35
+
36
+ /**
37
+ * Performs a
38
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
39
+ * comparison between two values to determine if they are equivalent.
40
+ *
41
+ * @static
42
+ * @memberOf _
43
+ * @since 4.0.0
44
+ * @category Lang
45
+ * @param {*} value The value to compare.
46
+ * @param {*} other The other value to compare.
47
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
48
+ * @example
49
+ *
50
+ * var object = { 'a': 1 };
51
+ * var other = { 'a': 1 };
52
+ *
53
+ * _.eq(object, object);
54
+ * // => true
55
+ *
56
+ * _.eq(object, other);
57
+ * // => false
58
+ *
59
+ * _.eq('a', 'a');
60
+ * // => true
61
+ *
62
+ * _.eq('a', Object('a'));
63
+ * // => false
64
+ *
65
+ * _.eq(NaN, NaN);
66
+ * // => true
67
+ */
68
+ function eq(value, other) {
69
+ return value === other || (value !== value && other !== other);
70
+ }
71
+
72
+ export { eq as e, isFunction as i };
@@ -1,32 +1,4 @@
1
- import { a as isFunction } from './eq-f40dd1d6.js';
2
-
3
- /**
4
- * Checks if `value` is object-like. A value is object-like if it's not `null`
5
- * and has a `typeof` result of "object".
6
- *
7
- * @static
8
- * @memberOf _
9
- * @since 4.0.0
10
- * @category Lang
11
- * @param {*} value The value to check.
12
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
13
- * @example
14
- *
15
- * _.isObjectLike({});
16
- * // => true
17
- *
18
- * _.isObjectLike([1, 2, 3]);
19
- * // => true
20
- *
21
- * _.isObjectLike(_.noop);
22
- * // => false
23
- *
24
- * _.isObjectLike(null);
25
- * // => false
26
- */
27
- function isObjectLike(value) {
28
- return value != null && typeof value == 'object';
29
- }
1
+ import { i as isFunction } from './eq-c1c7f528.js';
30
2
 
31
3
  /** Used as references for various `Number` constants. */
32
4
  var MAX_SAFE_INTEGER$1 = 9007199254740991;
@@ -115,4 +87,4 @@ function isArrayLike(value) {
115
87
  return value != null && isLength(value.length) && !isFunction(value);
116
88
  }
117
89
 
118
- export { isArrayLike as a, isLength as b, isIndex as c, isObjectLike as i };
90
+ export { isLength as a, isIndex as b, isArrayLike as i };
@@ -1,7 +1,9 @@
1
- import { r as root, b as baseGetTag, f as freeGlobal, e as eq, S as Symbol } from './eq-f40dd1d6.js';
2
- import { g as getNative, t as toSource } from './_defineProperty-cbf98a2a.js';
1
+ import { e as eq } from './eq-c1c7f528.js';
2
+ import { g as getNative, t as toSource } from './_defineProperty-8c869077.js';
3
+ import { r as root, b as baseGetTag, f as freeGlobal, S as Symbol } from './isObject-c74e273c.js';
3
4
  import { i as isArray } from './isArray-80298bc7.js';
4
- import { i as isObjectLike, b as isLength, c as isIndex, a as isArrayLike } from './isArrayLike-14db8f02.js';
5
+ import { i as isObjectLike } from './isObjectLike-38996507.js';
6
+ import { a as isLength, b as isIndex, i as isArrayLike } from './isArrayLike-dd37ba9a.js';
5
7
 
6
8
  /**
7
9
  * A specialized version of `_.map` for arrays without support for iteratee