aeico-components 0.1.6 → 0.1.8
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/README.md +0 -0
- package/dist/alert.cjs +637 -4
- package/dist/alert.cjs.map +7 -1
- package/dist/alert.js +575 -3
- package/dist/alert.js.map +7 -1
- package/dist/badge.cjs +573 -4
- package/dist/badge.cjs.map +7 -1
- package/dist/badge.js +510 -3
- package/dist/badge.js.map +7 -1
- package/dist/breadcrumb.cjs +709 -5
- package/dist/breadcrumb.cjs.map +7 -1
- package/dist/breadcrumb.js +644 -4
- package/dist/breadcrumb.js.map +7 -1
- package/dist/button-group.cjs +546 -4
- package/dist/button-group.cjs.map +7 -1
- package/dist/button-group.js +489 -3
- package/dist/button-group.js.map +7 -1
- package/dist/button.cjs +834 -4
- package/dist/button.cjs.map +7 -1
- package/dist/button.js +771 -3
- package/dist/button.js.map +7 -1
- package/dist/card.cjs +574 -4
- package/dist/card.cjs.map +7 -1
- package/dist/card.js +516 -3
- package/dist/card.js.map +7 -1
- package/dist/checkbox.cjs +867 -4
- package/dist/checkbox.cjs.map +7 -1
- package/dist/checkbox.js +794 -3
- package/dist/checkbox.js.map +7 -1
- package/dist/copy-button.cjs +1046 -4
- package/dist/copy-button.cjs.map +7 -1
- package/dist/copy-button.js +969 -3
- package/dist/copy-button.js.map +7 -1
- package/dist/detail-group.cjs +533 -0
- package/dist/detail-group.cjs.map +7 -0
- package/dist/detail-group.js +477 -0
- package/dist/detail-group.js.map +7 -0
- package/dist/detail.cjs +627 -4
- package/dist/detail.cjs.map +7 -1
- package/dist/detail.js +569 -3
- package/dist/detail.js.map +7 -1
- package/dist/dialog.cjs +738 -4
- package/dist/dialog.cjs.map +7 -1
- package/dist/dialog.js +665 -3
- package/dist/dialog.js.map +7 -1
- package/dist/divider.cjs +558 -4
- package/dist/divider.cjs.map +7 -1
- package/dist/divider.js +502 -3
- package/dist/divider.js.map +7 -1
- package/dist/drawer.cjs +818 -4
- package/dist/drawer.cjs.map +7 -1
- package/dist/drawer.js +749 -3
- package/dist/drawer.js.map +7 -1
- package/dist/dropdown.cjs +1396 -5
- package/dist/dropdown.cjs.map +7 -1
- package/dist/dropdown.js +1316 -4
- package/dist/dropdown.js.map +7 -1
- package/dist/icon-button.cjs +999 -4
- package/dist/icon-button.cjs.map +7 -1
- package/dist/icon-button.js +930 -3
- package/dist/icon-button.js.map +7 -1
- package/dist/icon.cjs +613 -4
- package/dist/icon.cjs.map +7 -1
- package/dist/icon.js +547 -3
- package/dist/icon.js.map +7 -1
- package/dist/index.cjs +6484 -188
- package/dist/index.cjs.map +7 -1
- package/dist/index.js +6095 -147
- package/dist/index.js.map +7 -1
- package/dist/menu.cjs +841 -4
- package/dist/menu.cjs.map +7 -1
- package/dist/menu.js +785 -3
- package/dist/menu.js.map +7 -1
- package/dist/navbar.cjs +622 -4
- package/dist/navbar.cjs.map +7 -1
- package/dist/navbar.js +564 -3
- package/dist/navbar.js.map +7 -1
- package/dist/number-input.cjs +887 -0
- package/dist/number-input.cjs.map +7 -0
- package/dist/number-input.js +820 -0
- package/dist/number-input.js.map +7 -0
- package/dist/pagination.cjs +1099 -4
- package/dist/pagination.cjs.map +7 -1
- package/dist/pagination.js +1029 -3
- package/dist/pagination.js.map +7 -1
- package/dist/progress-bar.cjs +581 -4
- package/dist/progress-bar.cjs.map +7 -1
- package/dist/progress-bar.js +525 -3
- package/dist/progress-bar.js.map +7 -1
- package/dist/radio-group.cjs +973 -5
- package/dist/radio-group.cjs.map +7 -1
- package/dist/radio-group.js +899 -4
- package/dist/radio-group.js.map +7 -1
- package/dist/select.cjs +1242 -45
- package/dist/select.cjs.map +7 -1
- package/dist/select.js +1159 -44
- package/dist/select.js.map +7 -1
- package/dist/slider.cjs +1420 -4
- package/dist/slider.cjs.map +7 -1
- package/dist/slider.js +1351 -3
- package/dist/slider.js.map +7 -1
- package/dist/spinner.cjs +587 -4
- package/dist/spinner.cjs.map +7 -1
- package/dist/spinner.js +528 -3
- package/dist/spinner.js.map +7 -1
- package/dist/styles/layout.cjs +1 -0
- package/dist/styles/layout.js +1 -0
- package/dist/styles/radius.cjs +1 -0
- package/dist/styles/radius.js +1 -0
- package/dist/styles/variables.cjs +1 -0
- package/dist/styles/variables.js +1 -0
- package/dist/switch.cjs +1092 -4
- package/dist/switch.cjs.map +7 -1
- package/dist/switch.js +1013 -3
- package/dist/switch.js.map +7 -1
- package/dist/tabs.cjs +660 -6
- package/dist/tabs.cjs.map +7 -1
- package/dist/tabs.js +591 -5
- package/dist/tabs.js.map +7 -1
- package/dist/tag.cjs +591 -3
- package/dist/tag.cjs.map +7 -1
- package/dist/tag.js +532 -2
- package/dist/tag.js.map +7 -1
- package/dist/text-input.cjs +829 -4
- package/dist/text-input.cjs.map +7 -1
- package/dist/text-input.js +761 -3
- package/dist/text-input.js.map +7 -1
- package/dist/textarea.cjs +914 -3
- package/dist/textarea.cjs.map +7 -1
- package/dist/textarea.js +854 -2
- package/dist/textarea.js.map +7 -1
- package/dist/tooltip.cjs +764 -4
- package/dist/tooltip.cjs.map +7 -1
- package/dist/tooltip.js +711 -3
- package/dist/tooltip.js.map +7 -1
- package/dist/tree.cjs +1059 -4
- package/dist/tree.cjs.map +7 -1
- package/dist/tree.js +985 -3
- package/dist/tree.js.map +7 -1
- package/dist/types/card/defines.d.ts +1 -1
- package/dist/types/detail/defines.d.ts +1 -1
- package/dist/types/dialog/dialog.d.ts +1 -0
- package/dist/types/drawer/drawer.d.ts +2 -0
- package/dist/types/icon/defines.d.ts +7 -1
- package/dist/types/icon/index.d.ts +1 -1
- package/dist/types/menu/defines.d.ts +1 -0
- package/dist/types/menu/menu-item.d.ts +1 -0
- package/dist/types/menu/menu.d.ts +1 -0
- package/dist/types/styles/layout.d.ts +2 -0
- package/dist/types/styles/radius.d.ts +2 -0
- package/dist/types/styles/variables.d.ts +2 -0
- package/dist/types/tabs/defines.d.ts +1 -0
- package/dist/types/tabs/tabs.d.ts +3 -0
- package/package.json +31 -7
- package/src/alert/alert.ts +3 -3
- package/src/badge/badge.ts +4 -4
- package/src/breadcrumb/breadcrumb-item.ts +2 -2
- package/src/breadcrumb/breadcrumb.ts +3 -3
- package/src/button/button.ts +4 -4
- package/src/button-group/button-group.ts +8 -9
- package/src/card/card.ts +3 -3
- package/src/card/defines.ts +1 -1
- package/src/checkbox/checkbox.ts +6 -6
- package/src/copy-button/copy-button.ts +13 -9
- package/src/detail/defines.ts +1 -1
- package/src/detail/detail.ts +3 -3
- package/src/detail-group/detail-group.ts +2 -2
- package/src/dialog/dialog.ts +15 -14
- package/src/divider/divider.ts +3 -3
- package/src/drawer/drawer.ts +28 -11
- package/src/dropdown/dropdown-item.ts +2 -2
- package/src/dropdown/dropdown.ts +2 -2
- package/src/icon/defines.ts +8 -1
- package/src/icon/icon.ts +32 -14
- package/src/icon/index.ts +1 -1
- package/src/icon/registry.ts +2 -2
- package/src/menu/defines.ts +1 -0
- package/src/menu/menu-item.ts +14 -4
- package/src/menu/menu.ts +5 -2
- package/src/navbar/navbar.ts +3 -3
- package/src/number-input/number-input.ts +5 -5
- package/src/pagination/pagination.ts +3 -3
- package/src/progress-bar/progress-bar.ts +3 -3
- package/src/radio-group/radio-group.ts +12 -8
- package/src/select/select-option.ts +2 -2
- package/src/select/select.ts +5 -5
- package/src/slider/slider.ts +6 -6
- package/src/spinner/spinner.ts +4 -4
- package/src/styles/color.css +91 -91
- package/src/styles/components/action-button.css +12 -12
- package/src/styles/components/alert.css +22 -28
- package/src/styles/components/badge.css +13 -20
- package/src/styles/components/breadcrumb-item.css +7 -7
- package/src/styles/components/button-group.css +2 -0
- package/src/styles/components/button.css +39 -50
- package/src/styles/components/card.css +69 -30
- package/src/styles/components/checkbox.css +22 -16
- package/src/styles/components/copy-button.css +22 -33
- package/src/styles/components/detail.css +51 -39
- package/src/styles/components/dialog.css +11 -11
- package/src/styles/components/divider.css +3 -3
- package/src/styles/components/drawer.css +59 -27
- package/src/styles/components/dropdown-item.css +7 -8
- package/src/styles/components/dropdown.css +3 -4
- package/src/styles/components/field-label.css +13 -13
- package/src/styles/components/icon-button.css +25 -36
- package/src/styles/components/icon.css +1 -1
- package/src/styles/components/menu-item.css +13 -8
- package/src/styles/components/navbar.css +23 -44
- package/src/styles/components/number-input.css +27 -36
- package/src/styles/components/pagination.css +31 -31
- package/src/styles/components/progress-bar.css +2 -3
- package/src/styles/components/radio-group.css +88 -83
- package/src/styles/components/select-option.css +5 -5
- package/src/styles/components/select.css +21 -33
- package/src/styles/components/slider.css +56 -34
- package/src/styles/components/spinner.css +7 -9
- package/src/styles/components/switch.css +21 -19
- package/src/styles/components/tab.css +4 -5
- package/src/styles/components/tabs.css +48 -1
- package/src/styles/components/tag.css +14 -21
- package/src/styles/components/text-input.css +13 -22
- package/src/styles/components/textarea.css +12 -21
- package/src/styles/components/tooltip.css +4 -5
- package/src/styles/components/tree-item.css +12 -12
- package/src/styles/layout.css +5 -2
- package/src/styles/radius.css +25 -0
- package/src/styles/size.css +7 -7
- package/src/styles/variables.css +271 -247
- package/src/switch/switch.ts +6 -6
- package/src/tabs/defines.ts +1 -0
- package/src/tabs/tab-panel.ts +1 -1
- package/src/tabs/tab.ts +1 -1
- package/src/tabs/tabs.ts +14 -2
- package/src/tag/tag.ts +4 -4
- package/src/text-input/text-input.ts +5 -5
- package/src/textarea/textarea.ts +5 -5
- package/src/tooltip/tooltip.ts +2 -2
- package/src/tree/tree-item.ts +2 -2
- package/src/tree/tree.ts +2 -2
- package/dist/chunks/action-button.cjs +0 -296
- package/dist/chunks/action-button.cjs.map +0 -1
- package/dist/chunks/action-button.js +0 -297
- package/dist/chunks/action-button.js.map +0 -1
- package/dist/chunks/aeico-component.cjs +0 -17
- package/dist/chunks/aeico-component.cjs.map +0 -1
- package/dist/chunks/aeico-component.js +0 -18
- package/dist/chunks/aeico-component.js.map +0 -1
- package/dist/chunks/alert.cjs +0 -170
- package/dist/chunks/alert.cjs.map +0 -1
- package/dist/chunks/alert.js +0 -171
- package/dist/chunks/alert.js.map +0 -1
- package/dist/chunks/badge.cjs +0 -85
- package/dist/chunks/badge.cjs.map +0 -1
- package/dist/chunks/badge.js +0 -86
- package/dist/chunks/badge.js.map +0 -1
- package/dist/chunks/breadcrumb-item.cjs +0 -261
- package/dist/chunks/breadcrumb-item.cjs.map +0 -1
- package/dist/chunks/breadcrumb-item.js +0 -262
- package/dist/chunks/breadcrumb-item.js.map +0 -1
- package/dist/chunks/button-group.cjs +0 -79
- package/dist/chunks/button-group.cjs.map +0 -1
- package/dist/chunks/button-group.js +0 -80
- package/dist/chunks/button-group.js.map +0 -1
- package/dist/chunks/button.cjs +0 -348
- package/dist/chunks/button.cjs.map +0 -1
- package/dist/chunks/button.js +0 -349
- package/dist/chunks/button.js.map +0 -1
- package/dist/chunks/card.cjs +0 -93
- package/dist/chunks/card.cjs.map +0 -1
- package/dist/chunks/card.js +0 -94
- package/dist/chunks/card.js.map +0 -1
- package/dist/chunks/checkbox.cjs +0 -86
- package/dist/chunks/checkbox.cjs.map +0 -1
- package/dist/chunks/checkbox.js +0 -87
- package/dist/chunks/checkbox.js.map +0 -1
- package/dist/chunks/color.cjs +0 -4
- package/dist/chunks/color.cjs.map +0 -1
- package/dist/chunks/color.js +0 -5
- package/dist/chunks/color.js.map +0 -1
- package/dist/chunks/copy-button.cjs +0 -168
- package/dist/chunks/copy-button.cjs.map +0 -1
- package/dist/chunks/copy-button.js +0 -169
- package/dist/chunks/copy-button.js.map +0 -1
- package/dist/chunks/detail.cjs +0 -146
- package/dist/chunks/detail.cjs.map +0 -1
- package/dist/chunks/detail.js +0 -147
- package/dist/chunks/detail.js.map +0 -1
- package/dist/chunks/dialog.cjs +0 -117
- package/dist/chunks/dialog.cjs.map +0 -1
- package/dist/chunks/dialog.js +0 -118
- package/dist/chunks/dialog.js.map +0 -1
- package/dist/chunks/divider.cjs +0 -80
- package/dist/chunks/divider.cjs.map +0 -1
- package/dist/chunks/divider.js +0 -81
- package/dist/chunks/divider.js.map +0 -1
- package/dist/chunks/drawer.cjs +0 -180
- package/dist/chunks/drawer.cjs.map +0 -1
- package/dist/chunks/drawer.js +0 -181
- package/dist/chunks/drawer.js.map +0 -1
- package/dist/chunks/dropdown-button.cjs +0 -534
- package/dist/chunks/dropdown-button.cjs.map +0 -1
- package/dist/chunks/dropdown-button.js +0 -535
- package/dist/chunks/dropdown-button.js.map +0 -1
- package/dist/chunks/icon-button.cjs +0 -35
- package/dist/chunks/icon-button.cjs.map +0 -1
- package/dist/chunks/icon-button.js +0 -36
- package/dist/chunks/icon-button.js.map +0 -1
- package/dist/chunks/icon.cjs +0 -108
- package/dist/chunks/icon.cjs.map +0 -1
- package/dist/chunks/icon.js +0 -109
- package/dist/chunks/icon.js.map +0 -1
- package/dist/chunks/menu.cjs +0 -396
- package/dist/chunks/menu.cjs.map +0 -1
- package/dist/chunks/menu.js +0 -397
- package/dist/chunks/menu.js.map +0 -1
- package/dist/chunks/navbar.cjs +0 -142
- package/dist/chunks/navbar.cjs.map +0 -1
- package/dist/chunks/navbar.js +0 -143
- package/dist/chunks/navbar.js.map +0 -1
- package/dist/chunks/pagination.cjs +0 -475
- package/dist/chunks/pagination.cjs.map +0 -1
- package/dist/chunks/pagination.js +0 -476
- package/dist/chunks/pagination.js.map +0 -1
- package/dist/chunks/progress-bar.cjs +0 -101
- package/dist/chunks/progress-bar.cjs.map +0 -1
- package/dist/chunks/progress-bar.js +0 -102
- package/dist/chunks/progress-bar.js.map +0 -1
- package/dist/chunks/radio.cjs +0 -185
- package/dist/chunks/radio.cjs.map +0 -1
- package/dist/chunks/radio.js +0 -186
- package/dist/chunks/radio.js.map +0 -1
- package/dist/chunks/select.cjs +0 -381
- package/dist/chunks/select.cjs.map +0 -1
- package/dist/chunks/select.js +0 -382
- package/dist/chunks/select.js.map +0 -1
- package/dist/chunks/size.cjs +0 -4
- package/dist/chunks/size.cjs.map +0 -1
- package/dist/chunks/size.js +0 -5
- package/dist/chunks/size.js.map +0 -1
- package/dist/chunks/slider.cjs +0 -611
- package/dist/chunks/slider.cjs.map +0 -1
- package/dist/chunks/slider.js +0 -612
- package/dist/chunks/slider.js.map +0 -1
- package/dist/chunks/spinner.cjs +0 -102
- package/dist/chunks/spinner.cjs.map +0 -1
- package/dist/chunks/spinner.js +0 -103
- package/dist/chunks/spinner.js.map +0 -1
- package/dist/chunks/switch.cjs +0 -167
- package/dist/chunks/switch.cjs.map +0 -1
- package/dist/chunks/switch.js +0 -168
- package/dist/chunks/switch.js.map +0 -1
- package/dist/chunks/tab-panel.cjs +0 -165
- package/dist/chunks/tab-panel.cjs.map +0 -1
- package/dist/chunks/tab-panel.js +0 -166
- package/dist/chunks/tab-panel.js.map +0 -1
- package/dist/chunks/tag.cjs +0 -108
- package/dist/chunks/tag.cjs.map +0 -1
- package/dist/chunks/tag.js +0 -109
- package/dist/chunks/tag.js.map +0 -1
- package/dist/chunks/text-input.cjs +0 -54
- package/dist/chunks/text-input.cjs.map +0 -1
- package/dist/chunks/text-input.js +0 -55
- package/dist/chunks/text-input.js.map +0 -1
- package/dist/chunks/textarea.cjs +0 -137
- package/dist/chunks/textarea.cjs.map +0 -1
- package/dist/chunks/textarea.js +0 -138
- package/dist/chunks/textarea.js.map +0 -1
- package/dist/chunks/tooltip.cjs +0 -293
- package/dist/chunks/tooltip.cjs.map +0 -1
- package/dist/chunks/tooltip.js +0 -294
- package/dist/chunks/tooltip.js.map +0 -1
- package/dist/chunks/tree.cjs +0 -468
- package/dist/chunks/tree.cjs.map +0 -1
- package/dist/chunks/tree.js +0 -469
- package/dist/chunks/tree.js.map +0 -1
- package/dist/chunks/variables.cjs +0 -372
- package/dist/chunks/variables.cjs.map +0 -1
- package/dist/chunks/variables.js +0 -373
- package/dist/chunks/variables.js.map +0 -1
package/dist/chunks/slider.cjs
DELETED
|
@@ -1,611 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const actionButton = require("./action-button.cjs");
|
|
3
|
-
const aeico = require("aeico");
|
|
4
|
-
const variables = require("./variables.cjs");
|
|
5
|
-
const size = require("./size.cjs");
|
|
6
|
-
const color = require("./color.cjs");
|
|
7
|
-
const style = `:host {
|
|
8
|
-
display: block;
|
|
9
|
-
flex: 1;
|
|
10
|
-
min-width: 0;
|
|
11
|
-
font-size: var(--size-base);
|
|
12
|
-
|
|
13
|
-
/* Default color when no [color] attribute — overridden by color.css :host([color=...]) */
|
|
14
|
-
--color-solid: var(--color-primary);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.range-container {
|
|
18
|
-
display: flex;
|
|
19
|
-
align-items: center;
|
|
20
|
-
gap: 6px;
|
|
21
|
-
width: 100%;
|
|
22
|
-
height: 26px;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
input[type="range"] {
|
|
26
|
-
flex: 1;
|
|
27
|
-
margin: 0;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.input-range,
|
|
31
|
-
.slider-input,
|
|
32
|
-
input[type="range"] {
|
|
33
|
-
-webkit-appearance: none;
|
|
34
|
-
appearance: none;
|
|
35
|
-
width: 100%;
|
|
36
|
-
height: 0.333em;
|
|
37
|
-
border-radius: 2px;
|
|
38
|
-
background: var(--border-subtle);
|
|
39
|
-
outline: none;
|
|
40
|
-
cursor: pointer;
|
|
41
|
-
margin: 0;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.input-range {
|
|
45
|
-
margin: 10px 0;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.input-range::-webkit-slider-thumb,
|
|
49
|
-
.slider-input::-webkit-slider-thumb,
|
|
50
|
-
input[type="range"]::-webkit-slider-thumb {
|
|
51
|
-
-webkit-appearance: none;
|
|
52
|
-
appearance: none;
|
|
53
|
-
width: 1.167em;
|
|
54
|
-
height: 1.167em;
|
|
55
|
-
border-radius: 50%;
|
|
56
|
-
background: var(--color-solid);
|
|
57
|
-
cursor: pointer;
|
|
58
|
-
transition: background 0.12s, transform 0.12s;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.input-range::-webkit-slider-thumb:hover,
|
|
62
|
-
.slider-input::-webkit-slider-thumb:hover,
|
|
63
|
-
input[type="range"]:hover::-webkit-slider-thumb {
|
|
64
|
-
background: var(--color-solid-hover);
|
|
65
|
-
transform: scale(1.1);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.input-range::-webkit-slider-thumb:active,
|
|
69
|
-
.slider-input::-webkit-slider-thumb:active,
|
|
70
|
-
input[type="range"]:active::-webkit-slider-thumb {
|
|
71
|
-
background: var(--color-solid-hover);
|
|
72
|
-
transform: scale(1.2);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.input-range:focus::-webkit-slider-thumb,
|
|
76
|
-
.slider-input:focus::-webkit-slider-thumb,
|
|
77
|
-
input[type="range"]:focus::-webkit-slider-thumb {
|
|
78
|
-
background: var(--color-solid);
|
|
79
|
-
outline: none;
|
|
80
|
-
box-shadow: none;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.input-range:focus:hover::-webkit-slider-thumb,
|
|
84
|
-
.slider-input:focus:hover::-webkit-slider-thumb,
|
|
85
|
-
input[type="range"]:focus:hover::-webkit-slider-thumb {
|
|
86
|
-
background: var(--color-solid-hover);
|
|
87
|
-
outline: none;
|
|
88
|
-
box-shadow: none;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.input-range:focus:active::-webkit-slider-thumb,
|
|
92
|
-
.slider-input:focus:active::-webkit-slider-thumb,
|
|
93
|
-
input[type="range"]:focus:active::-webkit-slider-thumb {
|
|
94
|
-
background: var(--color-solid-hover);
|
|
95
|
-
outline: none;
|
|
96
|
-
box-shadow: none;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.input-range::-moz-range-thumb,
|
|
100
|
-
.slider-input::-moz-range-thumb,
|
|
101
|
-
input[type="range"]::-moz-range-thumb {
|
|
102
|
-
width: 1.167em;
|
|
103
|
-
height: 1.167em;
|
|
104
|
-
border: none;
|
|
105
|
-
border-radius: 50%;
|
|
106
|
-
background: var(--color-solid);
|
|
107
|
-
cursor: pointer;
|
|
108
|
-
transition: background 0.12s, transform 0.12s;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.input-range::-moz-range-thumb:hover,
|
|
112
|
-
.slider-input::-moz-range-thumb:hover,
|
|
113
|
-
input[type="range"]:hover::-moz-range-thumb {
|
|
114
|
-
background: var(--color-solid-hover);
|
|
115
|
-
transform: scale(1.1);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.input-range::-moz-range-thumb:active,
|
|
119
|
-
.slider-input::-moz-range-thumb:active,
|
|
120
|
-
input[type="range"]:active::-moz-range-thumb {
|
|
121
|
-
background: var(--color-solid-hover);
|
|
122
|
-
transform: scale(1.2);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.input-range:focus::-moz-range-thumb,
|
|
126
|
-
.slider-input:focus::-moz-range-thumb,
|
|
127
|
-
input[type="range"]:focus::-moz-range-thumb {
|
|
128
|
-
background: var(--color-solid);
|
|
129
|
-
outline: none;
|
|
130
|
-
box-shadow: none;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.input-range:focus:hover::-moz-range-thumb,
|
|
134
|
-
.slider-input:focus:hover::-moz-range-thumb,
|
|
135
|
-
input[type="range"]:focus:hover::-moz-range-thumb {
|
|
136
|
-
background: var(--color-solid-hover);
|
|
137
|
-
outline: none;
|
|
138
|
-
box-shadow: none;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.input-range:focus:active::-moz-range-thumb,
|
|
142
|
-
.slider-input:focus:active::-moz-range-thumb,
|
|
143
|
-
input[type="range"]:focus:active::-moz-range-thumb {
|
|
144
|
-
background: var(--color-solid-hover);
|
|
145
|
-
outline: none;
|
|
146
|
-
box-shadow: none;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.input-range:disabled,
|
|
150
|
-
.slider-input:disabled,
|
|
151
|
-
input[type="range"]:disabled {
|
|
152
|
-
opacity: 0.5;
|
|
153
|
-
cursor: not-allowed;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.input-range:disabled::-webkit-slider-thumb,
|
|
157
|
-
.slider-input:disabled::-webkit-slider-thumb,
|
|
158
|
-
input[type="range"]:disabled::-webkit-slider-thumb {
|
|
159
|
-
cursor: not-allowed;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.input-range:disabled::-moz-range-thumb,
|
|
163
|
-
.slider-input:disabled::-moz-range-thumb,
|
|
164
|
-
input[type="range"]:disabled::-moz-range-thumb {
|
|
165
|
-
cursor: not-allowed;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.value-label {
|
|
169
|
-
min-width: 14px;
|
|
170
|
-
text-align: center;
|
|
171
|
-
font-size: 12px;
|
|
172
|
-
color: var(--color-text-muted);
|
|
173
|
-
font-weight: 500;
|
|
174
|
-
font-variant-numeric: tabular-nums;
|
|
175
|
-
pointer-events: none;
|
|
176
|
-
user-select: none;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.input-range,
|
|
180
|
-
.slider-input,
|
|
181
|
-
input[type="range"] {
|
|
182
|
-
height: 0.333em;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.input-range::-webkit-slider-thumb,
|
|
186
|
-
.slider-input::-webkit-slider-thumb,
|
|
187
|
-
input[type="range"]::-webkit-slider-thumb {
|
|
188
|
-
width: 1.167em;
|
|
189
|
-
height: 1.167em;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.input-range::-moz-range-thumb,
|
|
193
|
-
.slider-input::-moz-range-thumb,
|
|
194
|
-
input[type="range"]::-moz-range-thumb {
|
|
195
|
-
width: 1.167em;
|
|
196
|
-
height: 1.167em;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.value-label {
|
|
200
|
-
font-size: 1em;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.value-input {
|
|
204
|
-
width: 56px;
|
|
205
|
-
padding: 0 4px;
|
|
206
|
-
height: 22px;
|
|
207
|
-
border: 1px solid var(--border-subtle);
|
|
208
|
-
border-radius: 4px;
|
|
209
|
-
background: transparent;
|
|
210
|
-
color: var(--color-text);
|
|
211
|
-
font-size: 12px;
|
|
212
|
-
text-align: center;
|
|
213
|
-
outline: none;
|
|
214
|
-
flex-shrink: 0;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.value-input:focus {
|
|
218
|
-
border-color: var(--color-solid);
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
.value-input:disabled {
|
|
222
|
-
opacity: 0.4;
|
|
223
|
-
cursor: not-allowed;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
:host([tracked]) .input-range,
|
|
227
|
-
:host([tracked]) .slider-input,
|
|
228
|
-
:host([tracked]) input[type="range"] {
|
|
229
|
-
background: linear-gradient(
|
|
230
|
-
to right,
|
|
231
|
-
var(--color-solid) var(--fill-pct, 0%),
|
|
232
|
-
var(--border-subtle) var(--fill-pct, 0%)
|
|
233
|
-
);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.range-wrapper {
|
|
237
|
-
flex: 1;
|
|
238
|
-
min-width: 0;
|
|
239
|
-
display: flex;
|
|
240
|
-
flex-direction: column;
|
|
241
|
-
position: relative; /* marks-container positions against this */
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
.range-wrapper input[type="range"] {
|
|
245
|
-
width: 100%;
|
|
246
|
-
flex: none;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
/* Marks are absolutely positioned so they don't affect range-wrapper's layout height */
|
|
250
|
-
.marks-container {
|
|
251
|
-
position: absolute;
|
|
252
|
-
top: 100%;
|
|
253
|
-
left: 7px; /* inset by half thumb so 0%/100% align with track ends */
|
|
254
|
-
right: 7px;
|
|
255
|
-
height: 18px;
|
|
256
|
-
margin-top: 2px;
|
|
257
|
-
overflow: visible;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
.mark {
|
|
261
|
-
position: absolute;
|
|
262
|
-
transform: translateX(-50%);
|
|
263
|
-
display: flex;
|
|
264
|
-
flex-direction: column;
|
|
265
|
-
align-items: center;
|
|
266
|
-
gap: 2px;
|
|
267
|
-
pointer-events: none;
|
|
268
|
-
user-select: none;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
.mark::before {
|
|
272
|
-
content: '';
|
|
273
|
-
display: block;
|
|
274
|
-
width: 1px;
|
|
275
|
-
height: 4px;
|
|
276
|
-
background: var(--border-default, var(--border-subtle));
|
|
277
|
-
border-radius: 1px;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
.mark-label {
|
|
281
|
-
font-size: 10px;
|
|
282
|
-
color: var(--color-text-muted);
|
|
283
|
-
white-space: nowrap;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
/* When marks are active, add padding-bottom to make room for the absolute-positioned marks */
|
|
287
|
-
:host([marks]) .range-container {
|
|
288
|
-
padding-bottom: 24px; /* marks-container height (18px) + margin-top (2px) + extra (4px) */
|
|
289
|
-
height: auto;
|
|
290
|
-
}
|
|
291
|
-
`;
|
|
292
|
-
var __create = Object.create;
|
|
293
|
-
var __defProp = Object.defineProperty;
|
|
294
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
295
|
-
var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
|
|
296
|
-
var __typeError = (msg) => {
|
|
297
|
-
throw TypeError(msg);
|
|
298
|
-
};
|
|
299
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
300
|
-
var __decoratorStart = (base) => [, , , __create((base == null ? void 0 : base[__knownSymbol("metadata")]) ?? null)];
|
|
301
|
-
var __decoratorStrings = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"];
|
|
302
|
-
var __expectFn = (fn) => fn !== void 0 && typeof fn !== "function" ? __typeError("Function expected") : fn;
|
|
303
|
-
var __decoratorContext = (kind, name, done, metadata, fns) => ({ kind: __decoratorStrings[kind], name, metadata, addInitializer: (fn) => done._ ? __typeError("Already initialized") : fns.push(__expectFn(fn || null)) });
|
|
304
|
-
var __decoratorMetadata = (array, target) => __defNormalProp(target, __knownSymbol("metadata"), array[3]);
|
|
305
|
-
var __runInitializers = (array, flags, self, value) => {
|
|
306
|
-
for (var i = 0, fns = array[flags >> 1], n = fns && fns.length; i < n; i++) flags & 1 ? fns[i].call(self) : value = fns[i].call(self, value);
|
|
307
|
-
return value;
|
|
308
|
-
};
|
|
309
|
-
var __decorateElement = (array, flags, name, decorators, target, extra) => {
|
|
310
|
-
var fn, it, done, ctx, access, k = flags & 7, s = false, p = false;
|
|
311
|
-
var j = array.length + 1, key = __decoratorStrings[k + 5];
|
|
312
|
-
var initializers = array[j - 1] = [], extraInitializers = array[j] || (array[j] = []);
|
|
313
|
-
var desc = (target = target.prototype, __getOwnPropDesc({ get [name]() {
|
|
314
|
-
return __privateGet(this, extra);
|
|
315
|
-
}, set [name](x) {
|
|
316
|
-
return __privateSet(this, extra, x);
|
|
317
|
-
} }, name));
|
|
318
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
319
|
-
ctx = __decoratorContext(k, name, done = {}, array[3], extraInitializers);
|
|
320
|
-
{
|
|
321
|
-
ctx.static = s, ctx.private = p, access = ctx.access = { has: (x) => name in x };
|
|
322
|
-
access.get = (x) => x[name];
|
|
323
|
-
access.set = (x, y) => x[name] = y;
|
|
324
|
-
}
|
|
325
|
-
it = (0, decorators[i])({ get: desc.get, set: desc.set }, ctx), done._ = 1;
|
|
326
|
-
if (it === void 0) __expectFn(it) && (desc[key] = it);
|
|
327
|
-
else if (typeof it !== "object" || it === null) __typeError("Object expected");
|
|
328
|
-
else __expectFn(fn = it.get) && (desc.get = fn), __expectFn(fn = it.set) && (desc.set = fn), __expectFn(fn = it.init) && initializers.unshift(fn);
|
|
329
|
-
}
|
|
330
|
-
return desc && __defProp(target, name, desc), target;
|
|
331
|
-
};
|
|
332
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
333
|
-
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
334
|
-
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), member.get(obj));
|
|
335
|
-
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
336
|
-
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);
|
|
337
|
-
var _marks_dec, _tracked_dec, _editable_dec, _step_dec, _max_dec, _min_dec, _percentage_dec, _options_dec, _a, _init, _options, _percentage, _min, _max, _step, _editable, _tracked, _marks;
|
|
338
|
-
class Slider extends (_a = actionButton.AeicoField, _options_dec = [aeico.prop({ type: Array })], _percentage_dec = [aeico.prop({ type: Boolean })], _min_dec = [aeico.prop({ type: Number })], _max_dec = [aeico.prop({ type: Number })], _step_dec = [aeico.prop({ type: Number })], _editable_dec = [aeico.prop({ type: Boolean })], _tracked_dec = [aeico.prop({ type: Boolean })], _marks_dec = [aeico.prop({
|
|
339
|
-
type: Array,
|
|
340
|
-
// bare attribute (<ae-slider marks>) → true; JSON array → MarkItem[]
|
|
341
|
-
parser: (value) => {
|
|
342
|
-
if (value === null) return void 0;
|
|
343
|
-
if (value === "" || value === "true") return true;
|
|
344
|
-
if (value === "false") return false;
|
|
345
|
-
try {
|
|
346
|
-
return JSON.parse(value);
|
|
347
|
-
} catch {
|
|
348
|
-
return true;
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
})], _a) {
|
|
352
|
-
constructor() {
|
|
353
|
-
super();
|
|
354
|
-
__publicField(this, "fieldElement", null);
|
|
355
|
-
__publicField(this, "_valueLabel", null);
|
|
356
|
-
__publicField(this, "_numberInput", null);
|
|
357
|
-
__publicField(this, "_boundOnRangeInput");
|
|
358
|
-
__publicField(this, "_boundOnNumberInput");
|
|
359
|
-
__privateAdd(this, _options, __runInitializers(_init, 8, this, [])), __runInitializers(_init, 11, this);
|
|
360
|
-
__privateAdd(this, _percentage, __runInitializers(_init, 12, this, false)), __runInitializers(_init, 15, this);
|
|
361
|
-
__privateAdd(this, _min, __runInitializers(_init, 16, this, 0)), __runInitializers(_init, 19, this);
|
|
362
|
-
__privateAdd(this, _max, __runInitializers(_init, 20, this, 100)), __runInitializers(_init, 23, this);
|
|
363
|
-
__privateAdd(this, _step, __runInitializers(_init, 24, this, 1)), __runInitializers(_init, 27, this);
|
|
364
|
-
__privateAdd(this, _editable, __runInitializers(_init, 28, this, false)), __runInitializers(_init, 31, this);
|
|
365
|
-
__privateAdd(this, _tracked, __runInitializers(_init, 32, this, false)), __runInitializers(_init, 35, this);
|
|
366
|
-
__privateAdd(this, _marks, __runInitializers(_init, 36, this)), __runInitializers(_init, 39, this);
|
|
367
|
-
this._boundOnRangeInput = this._onRangeInput.bind(this);
|
|
368
|
-
this._boundOnNumberInput = this._onNumberInput.bind(this);
|
|
369
|
-
}
|
|
370
|
-
_normalizeOptions() {
|
|
371
|
-
if (!Array.isArray(this.options) || this.options.length === 0) return null;
|
|
372
|
-
const opts = this.options.map(
|
|
373
|
-
(opt) => this._isSliderOption(opt) ? { label: opt.label, value: String(opt.value) } : { label: String(opt), value: String(opt) }
|
|
374
|
-
);
|
|
375
|
-
const allNumeric = opts.every((o) => o.value !== "" && !isNaN(Number(o.value)));
|
|
376
|
-
if (allNumeric) {
|
|
377
|
-
return [...opts].sort((a, b) => Number(a.value) - Number(b.value)).map((o) => ({ ...o, rangeValue: Number(o.value) }));
|
|
378
|
-
} else {
|
|
379
|
-
return opts.map((o, i) => ({ ...o, rangeValue: i }));
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
_getRangeAttrs(normalized) {
|
|
383
|
-
if (normalized && normalized.length >= 1) {
|
|
384
|
-
const vals = normalized.map((o) => o.rangeValue);
|
|
385
|
-
const min = Math.min(...vals);
|
|
386
|
-
const max = Math.max(...vals);
|
|
387
|
-
const sorted = [...vals].sort((a, b) => a - b);
|
|
388
|
-
let minGap = Infinity;
|
|
389
|
-
for (let i = 1; i < sorted.length; i++) {
|
|
390
|
-
const d = sorted[i] - sorted[i - 1];
|
|
391
|
-
if (d > 0 && d < minGap) minGap = d;
|
|
392
|
-
}
|
|
393
|
-
return {
|
|
394
|
-
min: String(min),
|
|
395
|
-
max: String(max),
|
|
396
|
-
step: minGap === Infinity ? "1" : String(minGap),
|
|
397
|
-
inOptionsMode: true
|
|
398
|
-
};
|
|
399
|
-
}
|
|
400
|
-
return {
|
|
401
|
-
min: String(this.min),
|
|
402
|
-
max: String(this.max),
|
|
403
|
-
step: String(this.step),
|
|
404
|
-
inOptionsMode: false
|
|
405
|
-
};
|
|
406
|
-
}
|
|
407
|
-
_toRangeValue(value, normalized) {
|
|
408
|
-
if (value == null || value === "") return "";
|
|
409
|
-
if (normalized) {
|
|
410
|
-
const found = normalized.find((o) => o.value === value);
|
|
411
|
-
return found !== void 0 ? String(found.rangeValue) : "";
|
|
412
|
-
}
|
|
413
|
-
return value;
|
|
414
|
-
}
|
|
415
|
-
_fromRangeValue(rv, normalized) {
|
|
416
|
-
var _a2, _b;
|
|
417
|
-
if (normalized) {
|
|
418
|
-
const n = Number(rv);
|
|
419
|
-
return ((_a2 = normalized.find((o) => o.rangeValue === n)) == null ? void 0 : _a2.value) ?? ((_b = normalized[0]) == null ? void 0 : _b.value) ?? rv;
|
|
420
|
-
}
|
|
421
|
-
return rv;
|
|
422
|
-
}
|
|
423
|
-
_displayLabel(value, normalized) {
|
|
424
|
-
var _a2;
|
|
425
|
-
if (value == null || value === "") return "";
|
|
426
|
-
const label = normalized ? ((_a2 = normalized.find((o) => o.value === value)) == null ? void 0 : _a2.label) ?? value : value;
|
|
427
|
-
return this.percentage ? `${label}%` : label;
|
|
428
|
-
}
|
|
429
|
-
_maxValueLabelWidth(normalized, attrs) {
|
|
430
|
-
const candidates = normalized ? normalized.map((o) => this._displayLabel(o.value, normalized)) : [this._displayLabel(attrs.min, null), this._displayLabel(attrs.max, null)];
|
|
431
|
-
const maxLen = Math.max(...candidates.map((l) => l.length), 1);
|
|
432
|
-
return `${maxLen}ch`;
|
|
433
|
-
}
|
|
434
|
-
_updateTrackFill() {
|
|
435
|
-
if (!this.tracked || !this.fieldElement) return;
|
|
436
|
-
const min = Number(this.fieldElement.min);
|
|
437
|
-
const max = Number(this.fieldElement.max);
|
|
438
|
-
const val = Number(this.fieldElement.value);
|
|
439
|
-
const range = max - min || 1;
|
|
440
|
-
const pct = Math.max(0, Math.min(100, (val - min) / range * 100));
|
|
441
|
-
this.style.setProperty("--fill-pct", `${pct}%`);
|
|
442
|
-
}
|
|
443
|
-
_getMarksData(normalized, attrs) {
|
|
444
|
-
const minVal = Number(attrs.min);
|
|
445
|
-
const maxVal = Number(attrs.max);
|
|
446
|
-
const range = maxVal - minVal || 1;
|
|
447
|
-
const marks = this.marks;
|
|
448
|
-
if (Array.isArray(marks)) {
|
|
449
|
-
const result = [];
|
|
450
|
-
for (const m of marks) {
|
|
451
|
-
const isObj = m !== null && typeof m === "object";
|
|
452
|
-
const numVal = isObj ? m.value : m;
|
|
453
|
-
if (numVal < minVal || numVal > maxVal) continue;
|
|
454
|
-
const rawLabel = isObj ? m.label ?? String(numVal) : String(numVal);
|
|
455
|
-
result.push({
|
|
456
|
-
value: String(numVal),
|
|
457
|
-
label: this.percentage ? `${rawLabel}%` : rawLabel,
|
|
458
|
-
pct: (numVal - minVal) / range * 100
|
|
459
|
-
});
|
|
460
|
-
}
|
|
461
|
-
return result;
|
|
462
|
-
}
|
|
463
|
-
if (normalized) {
|
|
464
|
-
return normalized.map((o) => ({
|
|
465
|
-
value: o.value,
|
|
466
|
-
label: this.percentage ? `${o.label}%` : o.label,
|
|
467
|
-
pct: (o.rangeValue - minVal) / range * 100
|
|
468
|
-
}));
|
|
469
|
-
}
|
|
470
|
-
return [
|
|
471
|
-
{ value: attrs.min, label: this.percentage ? `${minVal}%` : String(minVal), pct: 0 },
|
|
472
|
-
{ value: attrs.max, label: this.percentage ? `${maxVal}%` : String(maxVal), pct: 100 }
|
|
473
|
-
];
|
|
474
|
-
}
|
|
475
|
-
writeValue(value) {
|
|
476
|
-
const normalized = this._normalizeOptions();
|
|
477
|
-
const rv = this._toRangeValue(value, normalized);
|
|
478
|
-
if (this.fieldElement && rv !== "" && this.fieldElement.value !== rv) {
|
|
479
|
-
this.fieldElement.value = rv;
|
|
480
|
-
}
|
|
481
|
-
if (this._valueLabel) {
|
|
482
|
-
this._valueLabel.textContent = this._displayLabel(value, normalized);
|
|
483
|
-
}
|
|
484
|
-
if (this._numberInput && !normalized && this._numberInput.value !== rv) {
|
|
485
|
-
this._numberInput.value = rv;
|
|
486
|
-
}
|
|
487
|
-
this._updateTrackFill();
|
|
488
|
-
}
|
|
489
|
-
getValue() {
|
|
490
|
-
if (!this.fieldElement) return "";
|
|
491
|
-
return this._fromRangeValue(this.fieldElement.value, this._normalizeOptions());
|
|
492
|
-
}
|
|
493
|
-
render() {
|
|
494
|
-
const normalized = this._normalizeOptions();
|
|
495
|
-
const attrs = this._getRangeAttrs(normalized);
|
|
496
|
-
return aeico.html(({ div, input, span }) => {
|
|
497
|
-
const id = this.getFieldId();
|
|
498
|
-
this.renderLabel(id);
|
|
499
|
-
div({ className: "range-container field-body" }, () => {
|
|
500
|
-
div({ key: "range-wrapper", className: "range-wrapper" }, () => {
|
|
501
|
-
this.fieldElement = input({
|
|
502
|
-
key: "range",
|
|
503
|
-
id,
|
|
504
|
-
type: "range",
|
|
505
|
-
min: attrs.min,
|
|
506
|
-
max: attrs.max,
|
|
507
|
-
step: attrs.step,
|
|
508
|
-
"@input": this._boundOnRangeInput,
|
|
509
|
-
"@change": this.boundOnChange
|
|
510
|
-
});
|
|
511
|
-
if (this.marks) {
|
|
512
|
-
const marksData = this._getMarksData(normalized, attrs);
|
|
513
|
-
div({ key: "marks", className: "marks-container" }, () => {
|
|
514
|
-
for (const m of marksData) {
|
|
515
|
-
aeico.tags.span(
|
|
516
|
-
{
|
|
517
|
-
key: `mark-${m.value}`,
|
|
518
|
-
className: "mark",
|
|
519
|
-
style: { left: `${m.pct}%` }
|
|
520
|
-
},
|
|
521
|
-
() => {
|
|
522
|
-
aeico.tags.span({ className: "mark-label", textContent: m.label });
|
|
523
|
-
}
|
|
524
|
-
);
|
|
525
|
-
}
|
|
526
|
-
});
|
|
527
|
-
}
|
|
528
|
-
});
|
|
529
|
-
this._valueLabel = span({
|
|
530
|
-
key: "label",
|
|
531
|
-
className: "value-label",
|
|
532
|
-
style: { minWidth: this._maxValueLabelWidth(normalized, attrs) },
|
|
533
|
-
textContent: this._displayLabel(this.value, normalized)
|
|
534
|
-
});
|
|
535
|
-
this.renderActionButtons();
|
|
536
|
-
if (this.editable) {
|
|
537
|
-
this._numberInput = input({
|
|
538
|
-
key: "number",
|
|
539
|
-
type: "number",
|
|
540
|
-
className: "value-input",
|
|
541
|
-
min: attrs.min,
|
|
542
|
-
max: attrs.max,
|
|
543
|
-
step: attrs.step,
|
|
544
|
-
// Disabled in options mode: valid values are discrete, free text makes no sense
|
|
545
|
-
disabled: attrs.inOptionsMode,
|
|
546
|
-
"@input": this._boundOnNumberInput
|
|
547
|
-
});
|
|
548
|
-
} else {
|
|
549
|
-
this._numberInput = null;
|
|
550
|
-
}
|
|
551
|
-
});
|
|
552
|
-
if (this.value != null) this.writeValue(this.value);
|
|
553
|
-
this.renderHelperText();
|
|
554
|
-
this.renderError();
|
|
555
|
-
});
|
|
556
|
-
}
|
|
557
|
-
_onRangeInput() {
|
|
558
|
-
if (!this.fieldElement) return;
|
|
559
|
-
const normalized = this._normalizeOptions();
|
|
560
|
-
const actualValue = this._fromRangeValue(this.fieldElement.value, normalized);
|
|
561
|
-
if (this._valueLabel) {
|
|
562
|
-
this._valueLabel.textContent = this._displayLabel(actualValue, normalized);
|
|
563
|
-
}
|
|
564
|
-
if (this._numberInput && !normalized) {
|
|
565
|
-
this._numberInput.value = this.fieldElement.value;
|
|
566
|
-
}
|
|
567
|
-
this._updateTrackFill();
|
|
568
|
-
}
|
|
569
|
-
_onNumberInput() {
|
|
570
|
-
if (!this._numberInput || !this.fieldElement) return;
|
|
571
|
-
const v = this._numberInput.value;
|
|
572
|
-
if (this.fieldElement.value === v) return;
|
|
573
|
-
this.fieldElement.value = v;
|
|
574
|
-
if (this._valueLabel) {
|
|
575
|
-
this._valueLabel.textContent = this._displayLabel(v, null);
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
clear(options) {
|
|
579
|
-
var _a2, _b;
|
|
580
|
-
const normalized = this._normalizeOptions();
|
|
581
|
-
const attrs = this._getRangeAttrs(normalized);
|
|
582
|
-
const clearTo = normalized ? ((_a2 = normalized.find((o) => String(o.rangeValue) === attrs.min)) == null ? void 0 : _a2.value) ?? ((_b = normalized[0]) == null ? void 0 : _b.value) ?? attrs.min : attrs.min;
|
|
583
|
-
this.setValue(clearTo, { ...options, action: "clear" });
|
|
584
|
-
}
|
|
585
|
-
_isSliderOption(opt) {
|
|
586
|
-
return opt !== null && typeof opt === "object" && "label" in opt && "value" in opt;
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
_init = __decoratorStart(_a);
|
|
590
|
-
_options = /* @__PURE__ */ new WeakMap();
|
|
591
|
-
_percentage = /* @__PURE__ */ new WeakMap();
|
|
592
|
-
_min = /* @__PURE__ */ new WeakMap();
|
|
593
|
-
_max = /* @__PURE__ */ new WeakMap();
|
|
594
|
-
_step = /* @__PURE__ */ new WeakMap();
|
|
595
|
-
_editable = /* @__PURE__ */ new WeakMap();
|
|
596
|
-
_tracked = /* @__PURE__ */ new WeakMap();
|
|
597
|
-
_marks = /* @__PURE__ */ new WeakMap();
|
|
598
|
-
__decorateElement(_init, 4, "options", _options_dec, Slider, _options);
|
|
599
|
-
__decorateElement(_init, 4, "percentage", _percentage_dec, Slider, _percentage);
|
|
600
|
-
__decorateElement(_init, 4, "min", _min_dec, Slider, _min);
|
|
601
|
-
__decorateElement(_init, 4, "max", _max_dec, Slider, _max);
|
|
602
|
-
__decorateElement(_init, 4, "step", _step_dec, Slider, _step);
|
|
603
|
-
__decorateElement(_init, 4, "editable", _editable_dec, Slider, _editable);
|
|
604
|
-
__decorateElement(_init, 4, "tracked", _tracked_dec, Slider, _tracked);
|
|
605
|
-
__decorateElement(_init, 4, "marks", _marks_dec, Slider, _marks);
|
|
606
|
-
__decoratorMetadata(_init, Slider);
|
|
607
|
-
__publicField(Slider, "tagName", "slider");
|
|
608
|
-
__publicField(Slider, "styles", [variables.variables, size.sizeCSS, color.colorCSS, actionButton.fieldLabelCSS, actionButton.actionButtonCSS, style]);
|
|
609
|
-
Slider.register();
|
|
610
|
-
exports.Slider = Slider;
|
|
611
|
-
//# sourceMappingURL=slider.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"slider.cjs","sources":["../../src/slider/slider.ts"],"sourcesContent":["import AeicoField from '../aeico-field';\nimport type { InferProps } from 'aeico';\nimport { html, tags } from 'aeico';\nimport type { NormalizedOption, SliderMarks, SliderOption, SliderOptions } from './defines';\nimport style from '../styles/components/slider.css?inline';\nimport variables from '../styles/variables.css?inline';\nimport sizeCSS from '../styles/size.css?inline';\nimport colorCSS from '../styles/color.css?inline';\nimport fieldLabelCSS from '../styles/components/field-label.css?inline';\nimport actionButtonCSS from '../styles/components/action-button.css?inline';\nimport { prop } from 'aeico';\n\nclass Slider extends AeicoField {\n protected fieldElement: HTMLInputElement | null = null;\n private _valueLabel: HTMLSpanElement | null = null;\n private _numberInput: HTMLInputElement | null = null;\n\n private _boundOnRangeInput: () => void;\n private _boundOnNumberInput: () => void;\n\n static tagName = 'slider';\n\n @prop({ type: Array })\n accessor options: SliderOptions = [];\n\n @prop({ type: Boolean })\n accessor percentage = false;\n\n @prop({ type: Number })\n accessor min = 0;\n\n @prop({ type: Number })\n accessor max = 100;\n\n @prop({ type: Number })\n accessor step = 1;\n\n @prop({ type: Boolean })\n accessor editable = false;\n\n @prop({ type: Boolean })\n accessor tracked = false;\n\n @prop({\n type: Array,\n // bare attribute (<ae-slider marks>) → true; JSON array → MarkItem[]\n parser: (value: string | null) => {\n if (value === null) return undefined;\n if (value === '' || value === 'true') return true;\n if (value === 'false') return false;\n try {\n return JSON.parse(value);\n } catch {\n return true;\n }\n },\n })\n accessor marks: SliderMarks | undefined;\n\n protected static styles = [variables, sizeCSS, colorCSS, fieldLabelCSS, actionButtonCSS, style];\n\n constructor() {\n super();\n this._boundOnRangeInput = this._onRangeInput.bind(this);\n this._boundOnNumberInput = this._onNumberInput.bind(this);\n }\n\n private _normalizeOptions(): NormalizedOption[] | null {\n if (!Array.isArray(this.options) || this.options.length === 0) return null;\n\n const opts = this.options.map((opt) =>\n this._isSliderOption(opt)\n ? { label: opt.label, value: String(opt.value) }\n : { label: String(opt), value: String(opt) },\n );\n\n // Sort by numeric value if all values are numeric; otherwise keep original order\n const allNumeric = opts.every((o) => o.value !== '' && !isNaN(Number(o.value)));\n\n if (allNumeric) {\n return [...opts]\n .sort((a, b) => Number(a.value) - Number(b.value))\n .map((o) => ({ ...o, rangeValue: Number(o.value) }));\n } else {\n return opts.map((o, i) => ({ ...o, rangeValue: i }));\n }\n }\n\n private _getRangeAttrs(normalized: NormalizedOption[] | null): {\n min: string;\n max: string;\n step: string;\n inOptionsMode: boolean;\n } {\n if (normalized && normalized.length >= 1) {\n const vals = normalized.map((o) => o.rangeValue);\n const min = Math.min(...vals);\n const max = Math.max(...vals);\n\n // Compute step from minimum gap between adjacent sorted values\n const sorted = [...vals].sort((a, b) => a - b);\n let minGap = Infinity;\n for (let i = 1; i < sorted.length; i++) {\n const d = sorted[i] - sorted[i - 1];\n if (d > 0 && d < minGap) minGap = d;\n }\n\n return {\n min: String(min),\n max: String(max),\n step: minGap === Infinity ? '1' : String(minGap),\n inOptionsMode: true,\n };\n }\n\n return {\n min: String(this.min),\n max: String(this.max),\n step: String(this.step),\n inOptionsMode: false,\n };\n }\n\n private _toRangeValue(value: string | undefined, normalized: NormalizedOption[] | null): string {\n if (value == null || value === '') return '';\n if (normalized) {\n const found = normalized.find((o) => o.value === value);\n\n return found !== undefined ? String(found.rangeValue) : '';\n }\n\n return value;\n }\n\n private _fromRangeValue(rv: string, normalized: NormalizedOption[] | null): string {\n if (normalized) {\n const n = Number(rv);\n\n return normalized.find((o) => o.rangeValue === n)?.value ?? normalized[0]?.value ?? rv;\n }\n return rv;\n }\n\n private _displayLabel(value: string | undefined, normalized: NormalizedOption[] | null): string {\n if (value == null || value === '') return '';\n const label = normalized ? (normalized.find((o) => o.value === value)?.label ?? value) : value;\n\n return this.percentage ? `${label}%` : label;\n }\n\n private _maxValueLabelWidth(\n normalized: NormalizedOption[] | null,\n attrs: { min: string; max: string },\n ): string {\n const candidates = normalized\n ? normalized.map((o) => this._displayLabel(o.value, normalized))\n : [this._displayLabel(attrs.min, null), this._displayLabel(attrs.max, null)];\n const maxLen = Math.max(...candidates.map((l) => l.length), 1);\n\n return `${maxLen}ch`;\n }\n\n private _updateTrackFill(): void {\n if (!this.tracked || !this.fieldElement) return;\n const min = Number(this.fieldElement.min);\n const max = Number(this.fieldElement.max);\n const val = Number(this.fieldElement.value);\n const range = max - min || 1;\n const pct = Math.max(0, Math.min(100, ((val - min) / range) * 100));\n this.style.setProperty('--fill-pct', `${pct}%`);\n }\n\n private _getMarksData(\n normalized: NormalizedOption[] | null,\n attrs: { min: string; max: string; inOptionsMode: boolean },\n ): Array<{ value: string; label: string; pct: number }> {\n const minVal = Number(attrs.min);\n const maxVal = Number(attrs.max);\n const range = maxVal - minVal || 1;\n\n const marks = this.marks;\n\n // Custom marks array — purely visual, no snapping effect\n if (Array.isArray(marks)) {\n const result: Array<{ value: string; label: string; pct: number }> = [];\n for (const m of marks) {\n const isObj = m !== null && typeof m === 'object';\n const numVal = isObj ? (m as { value: number }).value : m;\n if (numVal < minVal || numVal > maxVal) continue;\n const rawLabel = isObj ? (m.label ?? String(numVal)) : String(numVal);\n result.push({\n value: String(numVal),\n label: this.percentage ? `${rawLabel}%` : rawLabel,\n pct: ((numVal - minVal) / range) * 100,\n });\n }\n\n return result;\n }\n\n // marks === true — auto-generate from options or free-mode endpoints\n if (normalized) {\n return normalized.map((o) => ({\n value: o.value,\n label: this.percentage ? `${o.label}%` : o.label,\n pct: ((o.rangeValue - minVal) / range) * 100,\n }));\n }\n\n // Free mode — show min and max endpoints only\n return [\n { value: attrs.min, label: this.percentage ? `${minVal}%` : String(minVal), pct: 0 },\n { value: attrs.max, label: this.percentage ? `${maxVal}%` : String(maxVal), pct: 100 },\n ];\n }\n\n protected writeValue(value: string): void {\n const normalized = this._normalizeOptions();\n const rv = this._toRangeValue(value, normalized);\n\n if (this.fieldElement && rv !== '' && this.fieldElement.value !== rv) {\n this.fieldElement.value = rv;\n }\n\n if (this._valueLabel) {\n this._valueLabel.textContent = this._displayLabel(value, normalized);\n }\n\n // Sync number input only in free mode (options mode disables it)\n if (this._numberInput && !normalized && this._numberInput.value !== rv) {\n this._numberInput.value = rv;\n }\n\n this._updateTrackFill();\n }\n\n protected getValue(): string {\n if (!this.fieldElement) return '';\n\n return this._fromRangeValue(this.fieldElement.value, this._normalizeOptions());\n }\n\n render() {\n const normalized = this._normalizeOptions();\n const attrs = this._getRangeAttrs(normalized);\n\n return html(({ div, input, span }) => {\n const id = this.getFieldId();\n this.renderLabel(id);\n div({ className: 'range-container field-body' }, () => {\n // Wrap range + optional marks in a column so marks don't push siblings\n div({ key: 'range-wrapper', className: 'range-wrapper' }, () => {\n this.fieldElement = input({\n key: 'range',\n id,\n type: 'range',\n min: attrs.min,\n max: attrs.max,\n step: attrs.step,\n '@input': this._boundOnRangeInput,\n '@change': this.boundOnChange,\n });\n\n if (this.marks) {\n const marksData = this._getMarksData(normalized, attrs);\n div({ key: 'marks', className: 'marks-container' }, () => {\n for (const m of marksData) {\n tags.span(\n {\n key: `mark-${m.value}`,\n className: 'mark',\n style: { left: `${m.pct}%` },\n },\n () => {\n tags.span({ className: 'mark-label', textContent: m.label });\n },\n );\n }\n });\n }\n });\n\n this._valueLabel = span({\n key: 'label',\n className: 'value-label',\n style: { minWidth: this._maxValueLabelWidth(normalized, attrs) },\n textContent: this._displayLabel(this.value, normalized),\n });\n\n // Action buttons first so the number input can be toggled without disrupting button reuse\n this.renderActionButtons();\n\n if (this.editable) {\n this._numberInput = input({\n key: 'number',\n type: 'number',\n className: 'value-input',\n min: attrs.min,\n max: attrs.max,\n step: attrs.step,\n // Disabled in options mode: valid values are discrete, free text makes no sense\n disabled: attrs.inOptionsMode,\n '@input': this._boundOnNumberInput,\n });\n } else {\n this._numberInput = null;\n }\n });\n\n if (this.value != null) this.writeValue(this.value);\n this.renderHelperText();\n this.renderError();\n });\n }\n\n private _onRangeInput(): void {\n if (!this.fieldElement) return;\n\n const normalized = this._normalizeOptions();\n const actualValue = this._fromRangeValue(this.fieldElement.value, normalized);\n\n if (this._valueLabel) {\n this._valueLabel.textContent = this._displayLabel(actualValue, normalized);\n }\n // Keep number input in sync during drag\n if (this._numberInput && !normalized) {\n this._numberInput.value = this.fieldElement.value;\n }\n\n this._updateTrackFill();\n }\n\n private _onNumberInput(): void {\n if (!this._numberInput || !this.fieldElement) return;\n const v = this._numberInput.value;\n\n if (this.fieldElement.value === v) return;\n\n this.fieldElement.value = v;\n if (this._valueLabel) {\n this._valueLabel.textContent = this._displayLabel(v, null);\n }\n }\n\n public clear(options?: { silent?: boolean }): void {\n const normalized = this._normalizeOptions();\n const attrs = this._getRangeAttrs(normalized);\n // Reset to the option whose rangeValue === min, or to attrs.min in free mode\n const clearTo = normalized\n ? (normalized.find((o) => String(o.rangeValue) === attrs.min)?.value ??\n normalized[0]?.value ??\n attrs.min)\n : attrs.min;\n this.setValue(clearTo, { ...options, action: 'clear' });\n }\n\n private _isSliderOption(opt: unknown): opt is SliderOption {\n return opt !== null && typeof opt === 'object' && 'label' in opt && 'value' in opt;\n }\n}\n\nSlider.register();\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ae-slider': Slider;\n }\n}\n\nexport default Slider;\nexport type SliderProps = InferProps<typeof Slider>;\n"],"names":["AeicoField","prop","_a","html","tags","variables","sizeCSS","colorCSS","fieldLabelCSS","actionButtonCSS"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,YAAA,cAAA,eAAA,WAAA,UAAA,UAAA,iBAAA,cAAA,IAAA,OAAA,UAAA,aAAA,MAAA,MAAA,OAAA,WAAA,UAAA;AAYA,MAAM,gBAAe,KAAAA,yBAUnB,eAAA,CAACC,MAAAA,KAAK,EAAE,MAAM,MAAA,CAAO,CAAA,GAGrB,kBAAA,CAACA,MAAAA,KAAK,EAAE,MAAM,QAAA,CAAS,CAAA,GAGvB,WAAA,CAACA,MAAAA,KAAK,EAAE,MAAM,OAAA,CAAQ,CAAA,GAGtB,WAAA,CAACA,MAAAA,KAAK,EAAE,MAAM,OAAA,CAAQ,CAAA,GAGtB,YAAA,CAACA,MAAAA,KAAK,EAAE,MAAM,OAAA,CAAQ,CAAA,GAGtB,gBAAA,CAACA,MAAAA,KAAK,EAAE,MAAM,QAAA,CAAS,CAAA,GAGvB,eAAA,CAACA,MAAAA,KAAK,EAAE,MAAM,QAAA,CAAS,CAAA,GAGvB,aAAA,CAACA,MAAAA,KAAK;AAAA,EACJ,MAAM;AAAA;AAAA,EAEN,QAAQ,CAAC,UAAyB;AAChC,QAAI,UAAU,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