@maggioli-design-system/mds-input-range 2.3.0 → 2.5.0

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 (69) hide show
  1. package/dist/cjs/{index-9509a00b.js → index-37d5e60f.js} +13 -2
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/mds-input-range.cjs.entry.js +25 -12
  4. package/dist/cjs/mds-input-range.cjs.js +2 -2
  5. package/dist/collection/common/browser.js +7 -0
  6. package/dist/collection/common/floating-controller.js +25 -4
  7. package/dist/collection/common/keyboard-manager.js +3 -2
  8. package/dist/collection/components/mds-input-range/mds-input-range.js +41 -11
  9. package/dist/collection/components/mds-input-range/test/mds-input-range.stories.js +11 -0
  10. package/dist/collection/dictionary/button.js +2 -0
  11. package/dist/collection/type/input-tip.js +1 -0
  12. package/dist/components/mds-input-range.js +25 -11
  13. package/dist/documentation.json +26 -1
  14. package/dist/esm/{index-476f378c.js → index-e9d1fa7e.js} +13 -2
  15. package/dist/esm/loader.js +3 -3
  16. package/dist/esm/mds-input-range.entry.js +25 -12
  17. package/dist/esm/mds-input-range.js +3 -3
  18. package/dist/esm-es5/index-e9d1fa7e.js +1 -0
  19. package/dist/esm-es5/loader.js +1 -1
  20. package/dist/esm-es5/mds-input-range.entry.js +1 -1
  21. package/dist/esm-es5/mds-input-range.js +1 -1
  22. package/dist/mds-input-range/mds-input-range.esm.js +1 -1
  23. package/dist/mds-input-range/mds-input-range.js +1 -1
  24. package/dist/mds-input-range/p-155deafe.js +2 -0
  25. package/dist/mds-input-range/p-55273f42.entry.js +1 -0
  26. package/dist/mds-input-range/p-7315ada7.system.js +2 -0
  27. package/dist/mds-input-range/{p-c22c5274.system.entry.js → p-b3abfa80.system.entry.js} +1 -1
  28. package/dist/mds-input-range/p-b6d99f83.system.js +1 -0
  29. package/dist/stats.json +78 -33
  30. package/dist/types/common/browser.d.ts +2 -0
  31. package/dist/types/common/floating-controller.d.ts +1 -0
  32. package/dist/types/common/locale.d.ts +1 -1
  33. package/dist/types/components/mds-input-range/mds-input-range.d.ts +7 -1
  34. package/dist/types/components/mds-input-range/test/mds-input-range.stories.d.ts +1 -0
  35. package/dist/types/components.d.ts +8 -0
  36. package/dist/types/type/button.d.ts +1 -1
  37. package/dist/types/type/input-tip.d.ts +1 -0
  38. package/documentation.json +53 -13
  39. package/package.json +3 -3
  40. package/readme.md +8 -7
  41. package/src/common/browser.ts +10 -0
  42. package/src/common/floating-controller.ts +26 -3
  43. package/src/common/keyboard-manager.ts +1 -0
  44. package/src/common/locale.ts +2 -2
  45. package/src/components/mds-input-range/mds-input-range.tsx +28 -11
  46. package/src/components/mds-input-range/readme.md +8 -7
  47. package/src/components/mds-input-range/test/mds-input-range.stories.tsx +17 -0
  48. package/src/components.d.ts +8 -0
  49. package/src/dictionary/button.ts +2 -0
  50. package/src/fixtures/icons.json +8 -0
  51. package/src/fixtures/iconsauce.json +1 -0
  52. package/src/type/button.ts +2 -0
  53. package/src/type/input-tip.ts +11 -0
  54. package/www/build/mds-input-range.esm.js +1 -1
  55. package/www/build/mds-input-range.js +1 -1
  56. package/www/build/p-155deafe.js +2 -0
  57. package/www/build/p-55273f42.entry.js +1 -0
  58. package/www/build/p-7315ada7.system.js +2 -0
  59. package/www/build/{p-c22c5274.system.entry.js → p-b3abfa80.system.entry.js} +1 -1
  60. package/www/build/p-b6d99f83.system.js +1 -0
  61. package/dist/esm-es5/index-476f378c.js +0 -1
  62. package/dist/mds-input-range/p-87f42ab7.js +0 -2
  63. package/dist/mds-input-range/p-d47766b6.system.js +0 -1
  64. package/dist/mds-input-range/p-e79d51c6.system.js +0 -2
  65. package/dist/mds-input-range/p-e838760a.entry.js +0 -1
  66. package/www/build/p-87f42ab7.js +0 -2
  67. package/www/build/p-d47766b6.system.js +0 -1
  68. package/www/build/p-e79d51c6.system.js +0 -2
  69. package/www/build/p-e838760a.entry.js +0 -1
package/dist/stats.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2025-03-05T17:19:41",
2
+ "timestamp": "2025-04-02T09:16:46",
3
3
  "compiler": {
4
4
  "name": "node",
5
5
  "version": "22.11.0"
@@ -9,13 +9,14 @@
9
9
  "fsNamespace": "mds-input-range",
10
10
  "components": 1,
11
11
  "entries": 1,
12
- "bundles": 101,
12
+ "bundles": 103,
13
13
  "outputs": [
14
14
  {
15
15
  "name": "dist-collection",
16
- "files": 53,
16
+ "files": 55,
17
17
  "generatedFiles": [
18
18
  "./dist/collection/common/aria.js",
19
+ "./dist/collection/common/browser.js",
19
20
  "./dist/collection/common/date.js",
20
21
  "./dist/collection/common/device.js",
21
22
  "./dist/collection/common/file.js",
@@ -59,6 +60,7 @@
59
60
  "./dist/collection/type/floating-ui.js",
60
61
  "./dist/collection/type/form-rel.js",
61
62
  "./dist/collection/type/header-bar.js",
63
+ "./dist/collection/type/input-tip.js",
62
64
  "./dist/collection/type/input.js",
63
65
  "./dist/collection/type/keyboard.js",
64
66
  "./dist/collection/type/loading.js",
@@ -85,19 +87,19 @@
85
87
  "files": 42,
86
88
  "generatedFiles": [
87
89
  "./dist/cjs/app-globals-3a1e7e63.js",
88
- "./dist/cjs/index-9509a00b.js",
90
+ "./dist/cjs/index-37d5e60f.js",
89
91
  "./dist/cjs/index.cjs.js",
90
92
  "./dist/cjs/loader.cjs.js",
91
93
  "./dist/cjs/mds-input-range.cjs.entry.js",
92
94
  "./dist/cjs/mds-input-range.cjs.js",
93
95
  "./dist/esm-es5/app-globals-0f993ce5.js",
94
- "./dist/esm-es5/index-476f378c.js",
96
+ "./dist/esm-es5/index-e9d1fa7e.js",
95
97
  "./dist/esm-es5/index.js",
96
98
  "./dist/esm-es5/loader.js",
97
99
  "./dist/esm-es5/mds-input-range.entry.js",
98
100
  "./dist/esm-es5/mds-input-range.js",
99
101
  "./dist/esm/app-globals-0f993ce5.js",
100
- "./dist/esm/index-476f378c.js",
102
+ "./dist/esm/index-e9d1fa7e.js",
101
103
  "./dist/esm/index.js",
102
104
  "./dist/esm/loader.js",
103
105
  "./dist/esm/mds-input-range.entry.js",
@@ -107,25 +109,25 @@
107
109
  "./dist/mds-input-range/index.esm.js",
108
110
  "./dist/mds-input-range/mds-input-range.esm.js",
109
111
  "./dist/mds-input-range/mds-input-range.js",
112
+ "./dist/mds-input-range/p-155deafe.js",
110
113
  "./dist/mds-input-range/p-50ea2036.system.js",
114
+ "./dist/mds-input-range/p-55273f42.entry.js",
111
115
  "./dist/mds-input-range/p-56ba5cbf.system.js",
112
- "./dist/mds-input-range/p-87f42ab7.js",
113
- "./dist/mds-input-range/p-c22c5274.system.entry.js",
114
- "./dist/mds-input-range/p-d47766b6.system.js",
116
+ "./dist/mds-input-range/p-7315ada7.system.js",
117
+ "./dist/mds-input-range/p-b3abfa80.system.entry.js",
118
+ "./dist/mds-input-range/p-b6d99f83.system.js",
115
119
  "./dist/mds-input-range/p-e1255160.js",
116
- "./dist/mds-input-range/p-e79d51c6.system.js",
117
- "./dist/mds-input-range/p-e838760a.entry.js",
118
120
  "./www/build/index.esm.js",
119
121
  "./www/build/mds-input-range.esm.js",
120
122
  "./www/build/mds-input-range.js",
123
+ "./www/build/p-155deafe.js",
121
124
  "./www/build/p-50ea2036.system.js",
125
+ "./www/build/p-55273f42.entry.js",
122
126
  "./www/build/p-56ba5cbf.system.js",
123
- "./www/build/p-87f42ab7.js",
124
- "./www/build/p-c22c5274.system.entry.js",
125
- "./www/build/p-d47766b6.system.js",
126
- "./www/build/p-e1255160.js",
127
- "./www/build/p-e79d51c6.system.js",
128
- "./www/build/p-e838760a.entry.js"
127
+ "./www/build/p-7315ada7.system.js",
128
+ "./www/build/p-b3abfa80.system.entry.js",
129
+ "./www/build/p-b6d99f83.system.js",
130
+ "./www/build/p-e1255160.js"
129
131
  ]
130
132
  },
131
133
  {
@@ -158,12 +160,12 @@
158
160
  "components": [
159
161
  "mds-input-range"
160
162
  ],
161
- "bundleId": "p-e838760a",
162
- "fileName": "p-e838760a.entry.js",
163
+ "bundleId": "p-55273f42",
164
+ "fileName": "p-55273f42.entry.js",
163
165
  "imports": [
164
- "p-87f42ab7.js"
166
+ "p-155deafe.js"
165
167
  ],
166
- "originalByteSize": 16757
168
+ "originalByteSize": 17502
167
169
  }
168
170
  ],
169
171
  "esm": [
@@ -175,9 +177,9 @@
175
177
  "bundleId": "mds-input-range",
176
178
  "fileName": "mds-input-range.entry.js",
177
179
  "imports": [
178
- "index-476f378c.js"
180
+ "index-e9d1fa7e.js"
179
181
  ],
180
- "originalByteSize": 16761
182
+ "originalByteSize": 17506
181
183
  }
182
184
  ],
183
185
  "es5": [
@@ -189,9 +191,9 @@
189
191
  "bundleId": "mds-input-range",
190
192
  "fileName": "mds-input-range.entry.js",
191
193
  "imports": [
192
- "index-476f378c.js"
194
+ "index-e9d1fa7e.js"
193
195
  ],
194
- "originalByteSize": 16761
196
+ "originalByteSize": 17506
195
197
  }
196
198
  ],
197
199
  "system": [
@@ -200,12 +202,12 @@
200
202
  "components": [
201
203
  "mds-input-range"
202
204
  ],
203
- "bundleId": "p-c22c5274.system",
204
- "fileName": "p-c22c5274.system.entry.js",
205
+ "bundleId": "p-b3abfa80.system",
206
+ "fileName": "p-b3abfa80.system.entry.js",
205
207
  "imports": [
206
- "p-e79d51c6.system.js"
208
+ "p-7315ada7.system.js"
207
209
  ],
208
- "originalByteSize": 17581
210
+ "originalByteSize": 18404
209
211
  }
210
212
  ],
211
213
  "commonjs": [
@@ -217,9 +219,9 @@
217
219
  "bundleId": "mds-input-range.cjs",
218
220
  "fileName": "mds-input-range.cjs.entry.js",
219
221
  "imports": [
220
- "index-9509a00b.js"
222
+ "index-37d5e60f.js"
221
223
  ],
222
- "originalByteSize": 16862
224
+ "originalByteSize": 17607
223
225
  }
224
226
  ]
225
227
  },
@@ -272,6 +274,26 @@
272
274
  "mds-text"
273
275
  ],
274
276
  "properties": [
277
+ {
278
+ "name": "formatValue",
279
+ "type": "unknown",
280
+ "reflect": false,
281
+ "mutable": false,
282
+ "required": false,
283
+ "optional": true,
284
+ "complexType": {
285
+ "original": "(value: number) => string",
286
+ "resolved": "((value: number) => string) | undefined",
287
+ "references": {}
288
+ },
289
+ "docs": {
290
+ "tags": [],
291
+ "text": "A function to custom how value is represented"
292
+ },
293
+ "internal": false,
294
+ "getter": false,
295
+ "setter": false
296
+ },
275
297
  {
276
298
  "name": "max",
277
299
  "type": "number",
@@ -403,6 +425,26 @@
403
425
  "encapsulation": "shadow",
404
426
  "shadowDelegatesFocus": false,
405
427
  "properties": [
428
+ {
429
+ "name": "formatValue",
430
+ "type": "unknown",
431
+ "reflect": false,
432
+ "mutable": false,
433
+ "required": false,
434
+ "optional": true,
435
+ "complexType": {
436
+ "original": "(value: number) => string",
437
+ "resolved": "((value: number) => string) | undefined",
438
+ "references": {}
439
+ },
440
+ "docs": {
441
+ "tags": [],
442
+ "text": "A function to custom how value is represented"
443
+ },
444
+ "internal": false,
445
+ "getter": false,
446
+ "setter": false
447
+ },
406
448
  {
407
449
  "name": "max",
408
450
  "type": "number",
@@ -662,7 +704,7 @@
662
704
  "hasVdomKey": true,
663
705
  "hasVdomListener": true,
664
706
  "hasVdomPropOrAttr": true,
665
- "hasVdomRef": false,
707
+ "hasVdomRef": true,
666
708
  "hasVdomRender": true,
667
709
  "hasVdomStyle": true,
668
710
  "hasVdomText": true,
@@ -674,6 +716,7 @@
674
716
  "part",
675
717
  "typography",
676
718
  "style",
719
+ "ref",
677
720
  "aria-label",
678
721
  "disabled",
679
722
  "max",
@@ -708,11 +751,12 @@
708
751
  ],
709
752
  "componentGraph": {
710
753
  "sc-mds-input-range": [
711
- "p-87f42ab7.js"
754
+ "p-155deafe.js"
712
755
  ]
713
756
  },
714
757
  "sourceGraph": {
715
758
  "./src/common/aria.ts": [],
759
+ "./src/common/browser.ts": [],
716
760
  "./src/common/date.ts": [],
717
761
  "./src/common/device.ts": [],
718
762
  "./src/common/file.ts": [],
@@ -771,6 +815,7 @@
771
815
  "./src/type/floating-ui.ts": [],
772
816
  "./src/type/form-rel.ts": [],
773
817
  "./src/type/header-bar.ts": [],
818
+ "./src/type/input-tip.ts": [],
774
819
  "./src/type/input.ts": [],
775
820
  "./src/type/keyboard.ts": [],
776
821
  "./src/type/loading.ts": [],
@@ -0,0 +1,2 @@
1
+ declare const isSafari: () => boolean;
2
+ export { isSafari, };
@@ -27,6 +27,7 @@ export declare class FloatingController {
27
27
  private readonly arrowInset;
28
28
  private readonly arrowTransform;
29
29
  private readonly arrowTransformOrigin;
30
+ private convertToTransformOrigin;
30
31
  private readonly calculatePosition;
31
32
  updatePosition(): void;
32
33
  dismiss(): void;
@@ -15,6 +15,6 @@ export declare class Locale {
15
15
  lang: (el: HTMLElement) => string;
16
16
  update: (doc?: Document | ShadowRoot) => void;
17
17
  private pluralize;
18
- get: (tag: string | string[], context?: Record<string, string | number>) => string;
18
+ get: (tag: string | string[], context?: Record<string, string | number | boolean>) => string;
19
19
  }
20
20
  export {};
@@ -6,8 +6,13 @@ export declare class MdsInputRange {
6
6
  private progress;
7
7
  private label;
8
8
  private inputElement;
9
+ private decimalPlaces;
9
10
  private element;
10
11
  internals: ElementInternals;
12
+ /**
13
+ * A function to custom how value is represented
14
+ */
15
+ readonly formatValue?: (value: number) => string;
11
16
  /**
12
17
  * The greatest value in the range of permitted values
13
18
  */
@@ -35,8 +40,9 @@ export declare class MdsInputRange {
35
40
  changeEvent: EventEmitter<number>;
36
41
  calculateProgress(): void;
37
42
  private onInput;
43
+ private countDecimals;
38
44
  protected disabledChanged(newValue: boolean): void;
39
- valueChanged(): void;
45
+ valueChanged(newValue: string, oldValue: string): void;
40
46
  minChanged(): void;
41
47
  maxChanged(): void;
42
48
  stepChanged(): void;
@@ -40,4 +40,5 @@ export declare const Min: any;
40
40
  export declare const Max: any;
41
41
  export declare const Step: any;
42
42
  export declare const Value: any;
43
+ export declare const FormatLabel: any;
43
44
  export declare const HideHeader: any;
@@ -11,6 +11,10 @@ export namespace Components {
11
11
  * Sets if the component is disabled
12
12
  */
13
13
  "disabled"?: boolean;
14
+ /**
15
+ * A function to custom how value is represented
16
+ */
17
+ "formatValue"?: (value: number) => string;
14
18
  /**
15
19
  * The greatest value in the range of permitted values
16
20
  */
@@ -61,6 +65,10 @@ declare namespace LocalJSX {
61
65
  * Sets if the component is disabled
62
66
  */
63
67
  "disabled"?: boolean;
68
+ /**
69
+ * A function to custom how value is represented
70
+ */
71
+ "formatValue"?: (value: number) => string;
64
72
  /**
65
73
  * The greatest value in the range of permitted values
66
74
  */
@@ -2,4 +2,4 @@ export type ButtonType = 'a' | 'button' | 'reset' | 'submit';
2
2
  export type ButtonTargetType = 'self' | 'blank';
3
3
  export type ButtonSizeType = 'sm' | 'md' | 'lg' | 'xl';
4
4
  export type ButtonIconPositionType = 'left' | 'right';
5
- export type ButtonVariantType = 'primary' | 'secondary' | 'dark' | 'light' | 'error' | 'info' | 'success' | 'warning';
5
+ export type ButtonVariantType = 'primary' | 'secondary' | 'dark' | 'light' | 'error' | 'info' | 'success' | 'warning' | 'google' | 'apple';
@@ -0,0 +1 @@
1
+ export type InputTipItemVariantType = 'count-almost' | 'count-almost-full' | 'count-empty' | 'count-full' | 'count-incomplete' | 'disabled' | 'readonly' | 'required' | 'required-success' | 'text';
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2025-03-05T16:16:01",
2
+ "timestamp": "2025-04-02T08:30:40",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.27.2",
@@ -46,6 +46,31 @@
46
46
  "getter": false,
47
47
  "setter": false
48
48
  },
49
+ {
50
+ "name": "formatValue",
51
+ "type": "((value: number) => string) | undefined",
52
+ "complexType": {
53
+ "original": "(value: number) => string",
54
+ "resolved": "((value: number) => string) | undefined",
55
+ "references": {}
56
+ },
57
+ "mutable": false,
58
+ "reflectToAttr": false,
59
+ "docs": "A function to custom how value is represented",
60
+ "docsTags": [],
61
+ "values": [
62
+ {
63
+ "type": "((value: number) => string)"
64
+ },
65
+ {
66
+ "type": "undefined"
67
+ }
68
+ ],
69
+ "optional": true,
70
+ "required": false,
71
+ "getter": false,
72
+ "setter": false
73
+ },
49
74
  {
50
75
  "name": "max",
51
76
  "type": "number",
@@ -312,7 +337,7 @@
312
337
  "path": "src/type/button.ts"
313
338
  },
314
339
  "src/type/button.ts::ButtonVariantType": {
315
- "declaration": "export type ButtonVariantType =\n | 'primary'\n | 'secondary'\n | 'dark'\n | 'light'\n | 'error'\n | 'info'\n | 'success'\n | 'warning'",
340
+ "declaration": "export type ButtonVariantType =\n | 'primary'\n | 'secondary'\n | 'dark'\n | 'light'\n | 'error'\n | 'info'\n | 'success'\n | 'warning'\n | 'google'\n | 'apple'",
316
341
  "docstring": "",
317
342
  "path": "src/type/button.ts"
318
343
  },
@@ -411,6 +436,11 @@
411
436
  "docstring": "",
412
437
  "path": "src/components/mds-horizontal-scroll/meta/types.ts"
413
438
  },
439
+ "src/components/mds-horizontal-scroll/meta/types.ts::NavigationType": {
440
+ "declaration": "export type NavigationType =\n | 'none'\n | 'scrollbar'\n | 'position'",
441
+ "docstring": "",
442
+ "path": "src/components/mds-horizontal-scroll/meta/types.ts"
443
+ },
414
444
  "src/components/mds-horizontal-scroll/meta/types.ts::SnapType": {
415
445
  "declaration": "export type SnapType =\n | 'center'\n | 'end'\n | 'none'\n | 'start'",
416
446
  "docstring": "",
@@ -506,10 +536,10 @@
506
536
  "docstring": "",
507
537
  "path": "src/components/mds-input-tip/meta/types.ts"
508
538
  },
509
- "src/components/mds-input-tip-item/meta/types.ts::InputTipItemVariantType": {
510
- "declaration": "export type InputTipItemVariantType =\n | 'required'\n | 'required-success'\n | 'disabled'\n | 'readonly'\n | 'text'",
539
+ "src/type/input-tip.ts::InputTipItemVariantType": {
540
+ "declaration": "export type InputTipItemVariantType =\n | 'count-almost'\n | 'count-almost-full'\n | 'count-empty'\n | 'count-full'\n | 'count-incomplete'\n | 'disabled'\n | 'readonly'\n | 'required'\n | 'required-success'\n | 'text'",
511
541
  "docstring": "",
512
- "path": "src/components/mds-input-tip-item/meta/types.ts"
542
+ "path": "src/type/input-tip.ts"
513
543
  },
514
544
  "src/components/mds-input-upload/meta/types.ts::AttachmentSort": {
515
545
  "declaration": "type AttachmentSort =\n 'status' |\n 'date'",
@@ -551,6 +581,11 @@
551
581
  "docstring": "",
552
582
  "path": "src/components/mds-modal/meta/types.ts"
553
583
  },
584
+ "src/components/mds-modal/meta/types.ts::ModalAnimationStyleType": {
585
+ "declaration": "export type ModalAnimationStyleType =\n | 'slide'\n | 'custom'\n | '3d'",
586
+ "docstring": "",
587
+ "path": "src/components/mds-modal/meta/types.ts"
588
+ },
554
589
  "src/components/mds-modal/meta/types.ts::ModalOverflowType": {
555
590
  "declaration": "export type ModalOverflowType =\n | 'auto'\n | 'manual'",
556
591
  "docstring": "",
@@ -616,20 +651,25 @@
616
651
  "docstring": "",
617
652
  "path": "src/components/mds-progress/meta/types.ts"
618
653
  },
619
- "src/components/mds-push-notification/meta/types.ts::NotificationDateFormatType": {
654
+ "src/components/mds-push-notification/meta/event-detail.ts::MdsPushNotificationEventDetail": {
655
+ "declaration": "export interface MdsPushNotificationEventDetail {\n visible: boolean\n}",
656
+ "docstring": "",
657
+ "path": "src/components/mds-push-notification/meta/event-detail.ts"
658
+ },
659
+ "src/components/mds-push-notification-item/meta/types.ts::NotificationItemDateFormatType": {
620
660
  "declaration": "string",
621
661
  "docstring": "",
622
- "path": "src/components/mds-push-notification/meta/types.ts"
662
+ "path": "src/components/mds-push-notification-item/meta/types.ts"
623
663
  },
624
- "src/components/mds-push-notification/meta/types.ts::NotificationPreviewType": {
625
- "declaration": "export type NotificationPreviewType =\n | 'avatar'\n | 'image'",
664
+ "src/components/mds-push-notification-item/meta/types.ts::NotificationItemPreviewType": {
665
+ "declaration": "export type NotificationItemPreviewType =\n | 'avatar'\n | 'image'",
626
666
  "docstring": "",
627
- "path": "src/components/mds-push-notification/meta/types.ts"
667
+ "path": "src/components/mds-push-notification-item/meta/types.ts"
628
668
  },
629
- "src/components/mds-push-notification/meta/event-detail.ts::MdsPushNotificationEventDetail": {
630
- "declaration": "export interface MdsPushNotificationEventDetail {\n id: string;\n}",
669
+ "src/components/mds-push-notification-item/meta/event-detail.ts::MdsPushNotificationItemEventDetail": {
670
+ "declaration": "export interface MdsPushNotificationItemEventDetail {\n id: string;\n}",
631
671
  "docstring": "",
632
- "path": "src/components/mds-push-notification/meta/event-detail.ts"
672
+ "path": "src/components/mds-push-notification-item/meta/event-detail.ts"
633
673
  },
634
674
  "src/type/text.ts::TypographyHeadingTagType": {
635
675
  "declaration": "export type TypographyHeadingTagType =\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maggioli-design-system/mds-input-range",
3
- "version": "2.3.0",
3
+ "version": "2.5.0",
4
4
  "description": "mds-input-range is a web-component from Magma Design System, built with StencilJS, TypeScript, Storybook. It's based on the web-component standard and it's designed to be agnostic from the JavaScript framework you are using.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -24,8 +24,8 @@
24
24
  "test": "stencil test --spec --e2e"
25
25
  },
26
26
  "dependencies": {
27
- "@maggioli-design-system/styles": "15.9.0",
28
- "@maggioli-design-system/mds-text": "4.7.0",
27
+ "@maggioli-design-system/styles": "15.9.1",
28
+ "@maggioli-design-system/mds-text": "4.7.2",
29
29
  "@stencil/core": "4.27.2"
30
30
  },
31
31
  "license": "MIT",
package/readme.md CHANGED
@@ -9,13 +9,14 @@ This is a web-component from Maggioli Design System [Magma](https://magma.maggio
9
9
 
10
10
  ## Properties
11
11
 
12
- | Property | Attribute | Description | Type | Default |
13
- | ---------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------- | ----------- |
14
- | `disabled` | `disabled` | Sets if the component is disabled | `boolean \| undefined` | `undefined` |
15
- | `max` | `max` | The greatest value in the range of permitted values | `number` | `100` |
16
- | `min` | `min` | The lowest value in the range of permitted values | `number` | `0` |
17
- | `step` | `step` | The step attribute is a number that specifies the granularity that the value must adhere to, or the special value any, which is described below. | `number` | `1` |
18
- | `value` | `value` | The value attribute contains a number which contains a representation of the selected number. | `number` | `undefined` |
12
+ | Property | Attribute | Description | Type | Default |
13
+ | ------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------ | ----------- |
14
+ | `disabled` | `disabled` | Sets if the component is disabled | `boolean \| undefined` | `undefined` |
15
+ | `formatValue` | -- | A function to custom how value is represented | `((value: number) => string) \| undefined` | `undefined` |
16
+ | `max` | `max` | The greatest value in the range of permitted values | `number` | `100` |
17
+ | `min` | `min` | The lowest value in the range of permitted values | `number` | `0` |
18
+ | `step` | `step` | The step attribute is a number that specifies the granularity that the value must adhere to, or the special value any, which is described below. | `number` | `1` |
19
+ | `value` | `value` | The value attribute contains a number which contains a representation of the selected number. | `number` | `undefined` |
19
20
 
20
21
 
21
22
  ## Events
@@ -0,0 +1,10 @@
1
+ const isSafari = (): boolean => {
2
+ if (navigator) {
3
+ return /^((?!chrome|android).)*safari/i.test(navigator.userAgent)
4
+ }
5
+ return false
6
+ }
7
+
8
+ export {
9
+ isSafari,
10
+ }
@@ -7,6 +7,7 @@ import {
7
7
  Middleware,
8
8
  MiddlewareData,
9
9
  offset,
10
+ Placement,
10
11
  shift,
11
12
  } from '@floating-ui/dom'
12
13
  import { FloatingUIPlacement, FloatingUIStrategy } from '@type/floating-ui'
@@ -138,6 +139,24 @@ export class FloatingController {
138
139
  }
139
140
  }
140
141
 
142
+ private convertToTransformOrigin = (position: Placement): string => {
143
+ const positions = {
144
+ top: 'center bottom',
145
+ right: 'left center',
146
+ bottom: 'center top',
147
+ left: 'right center',
148
+ 'bottom-end': 'top right',
149
+ 'bottom-start': 'top left',
150
+ 'left-end': 'right bottom',
151
+ 'left-start': 'right top',
152
+ 'right-end': 'left bottom',
153
+ 'right-start': 'left top',
154
+ 'top-end': 'bottom right',
155
+ 'top-start': 'bottom left',
156
+ }
157
+ return positions[position]
158
+ }
159
+
141
160
  private readonly calculatePosition = (): void => {
142
161
  if (!this._caller) return
143
162
 
@@ -181,6 +200,8 @@ export class FloatingController {
181
200
  Object.assign(this._host.style, {
182
201
  left: `${x}px`,
183
202
  top: `${y}px`,
203
+ transformOrigin: this.convertToTransformOrigin(placement),
204
+ position: this._host.strategy,
184
205
  })
185
206
 
186
207
  const arrowStyle = {}
@@ -204,12 +225,14 @@ export class FloatingController {
204
225
  }
205
226
 
206
227
  updatePosition (): void {
207
- if (this.cleanupAutoUpdate) this.cleanupAutoUpdate()
208
- this.cleanupAutoUpdate = autoUpdate(this._caller, this._host, this.calculatePosition)
228
+ if (this._host.visible) {
229
+ this.dismiss() // to clean the old update function before update function
230
+ this.cleanupAutoUpdate = autoUpdate(this._caller, this._host, this.calculatePosition)
231
+ }
209
232
  }
210
233
 
211
234
  dismiss (): void {
212
- this.cleanupAutoUpdate()
235
+ if (this.cleanupAutoUpdate) this.cleanupAutoUpdate()
213
236
  }
214
237
  }
215
238
 
@@ -27,6 +27,7 @@ export class KeyboardManager {
27
27
  }
28
28
 
29
29
  attachClickBehavior = (name = 'element'): void => {
30
+ this.elements.get(name)?.removeEventListener('keydown', this.handleClickBehaviorDispatchEvent)
30
31
  this.elements.get(name)?.addEventListener('keydown', this.handleClickBehaviorDispatchEvent)
31
32
  }
32
33
 
@@ -52,7 +52,7 @@ export class Locale {
52
52
  })
53
53
  }
54
54
 
55
- private pluralize = (tag: string | string[], context: Record<string, string | number>): string => {
55
+ private pluralize = (tag: string | string[], context: Record<string, string | number | boolean>): string => {
56
56
 
57
57
  const languagePhrase: string | string[] = this.config[this.language] ? this.config[this.language][tag] : this.config[this.rollbackLanguage][tag]
58
58
  const phrases: string[] = []
@@ -81,7 +81,7 @@ export class Locale {
81
81
  return render(translatePhrase, context)
82
82
  }
83
83
 
84
- get = (tag: string | string[], context?: Record<string, string | number>): string => {
84
+ get = (tag: string | string[], context?: Record<string, string | number | boolean>): string => {
85
85
  if (context) {
86
86
  return this.pluralize(tag, context)
87
87
  }