@ui5/webcomponents 2.22.0-rc.2 → 2.22.0-rc.4
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/CHANGELOG.md +41 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/AvatarBadge.d.ts +3 -3
- package/dist/AvatarBadge.js +10 -10
- package/dist/AvatarBadge.js.map +1 -1
- package/dist/AvatarBadgeTemplate.js +1 -1
- package/dist/AvatarBadgeTemplate.js.map +1 -1
- package/dist/Calendar.d.ts +7 -1
- package/dist/Calendar.js +40 -3
- package/dist/Calendar.js.map +1 -1
- package/dist/CalendarHeaderTemplate.js +2 -2
- package/dist/CalendarHeaderTemplate.js.map +1 -1
- package/dist/ColorPalette.d.ts +8 -8
- package/dist/ColorPalette.js +7 -5
- package/dist/ColorPalette.js.map +1 -1
- package/dist/ColorPaletteItem.d.ts +8 -0
- package/dist/ColorPaletteItem.js +31 -0
- package/dist/ColorPaletteItem.js.map +1 -1
- package/dist/ColorPaletteItemTemplate.js +1 -1
- package/dist/ColorPaletteItemTemplate.js.map +1 -1
- package/dist/ColorPalettePopover.js +1 -1
- package/dist/ColorPalettePopover.js.map +1 -1
- package/dist/ComboBox.js +1 -1
- package/dist/ComboBox.js.map +1 -1
- package/dist/ComboBoxPopoverTemplate.js +2 -1
- package/dist/ComboBoxPopoverTemplate.js.map +1 -1
- package/dist/DateRangePicker.d.ts +12 -1
- package/dist/DateRangePicker.js +31 -1
- package/dist/DateRangePicker.js.map +1 -1
- package/dist/Input.js +8 -6
- package/dist/Input.js.map +1 -1
- package/dist/MultiComboBox.js +1 -1
- package/dist/MultiComboBox.js.map +1 -1
- package/dist/MultiInputTemplate.js +1 -1
- package/dist/MultiInputTemplate.js.map +1 -1
- package/dist/RangeSlider.d.ts +19 -1
- package/dist/RangeSlider.js +112 -29
- package/dist/RangeSlider.js.map +1 -1
- package/dist/RangeSliderTemplate.d.ts +0 -3
- package/dist/RangeSliderTemplate.js +22 -17
- package/dist/RangeSliderTemplate.js.map +1 -1
- package/dist/SegmentedButton.js +6 -4
- package/dist/SegmentedButton.js.map +1 -1
- package/dist/SegmentedButtonItem.d.ts +7 -0
- package/dist/SegmentedButtonItem.js +24 -1
- package/dist/SegmentedButtonItem.js.map +1 -1
- package/dist/Slider.d.ts +1 -2
- package/dist/Slider.js +12 -7
- package/dist/Slider.js.map +1 -1
- package/dist/SliderBase.d.ts +0 -1
- package/dist/SliderBase.js +18 -15
- package/dist/SliderBase.js.map +1 -1
- package/dist/SliderHandle.d.ts +42 -9
- package/dist/SliderHandle.js +49 -9
- package/dist/SliderHandle.js.map +1 -1
- package/dist/SliderHandleTemplate.js +7 -1
- package/dist/SliderHandleTemplate.js.map +1 -1
- package/dist/SliderScale.d.ts +53 -0
- package/dist/SliderScale.js +67 -0
- package/dist/SliderScale.js.map +1 -1
- package/dist/SliderScaleTemplate.js +5 -1
- package/dist/SliderScaleTemplate.js.map +1 -1
- package/dist/SliderTemplate.js +1 -1
- package/dist/SliderTemplate.js.map +1 -1
- package/dist/Table.d.ts +1 -0
- package/dist/Table.js +16 -3
- package/dist/Table.js.map +1 -1
- package/dist/TableCell.d.ts +2 -2
- package/dist/TableCell.js +2 -2
- package/dist/TableCell.js.map +1 -1
- package/dist/TableHeaderRowTemplate.js +5 -2
- package/dist/TableHeaderRowTemplate.js.map +1 -1
- package/dist/TableNavigation.js +3 -0
- package/dist/TableNavigation.js.map +1 -1
- package/dist/TableRow.d.ts +0 -2
- package/dist/TableRow.js +0 -9
- package/dist/TableRow.js.map +1 -1
- package/dist/TableRowBase.d.ts +6 -1
- package/dist/TableRowBase.js +37 -2
- package/dist/TableRowBase.js.map +1 -1
- package/dist/TableRowTemplate.js +4 -2
- package/dist/TableRowTemplate.js.map +1 -1
- package/dist/TextArea.d.ts +10 -0
- package/dist/TextArea.js +37 -0
- package/dist/TextArea.js.map +1 -1
- package/dist/Tokenizer.d.ts +6 -0
- package/dist/Tokenizer.js +4 -1
- package/dist/Tokenizer.js.map +1 -1
- package/dist/Toolbar.d.ts +9 -0
- package/dist/Toolbar.js +4 -1
- package/dist/Toolbar.js.map +1 -1
- package/dist/css/themes/CardHeader.css +1 -1
- package/dist/css/themes/RangeSlider.css +1 -1
- package/dist/css/themes/Select.css +1 -1
- package/dist/css/themes/Slider.css +1 -1
- package/dist/css/themes/SliderBase.css +1 -1
- package/dist/css/themes/SliderHandle.css +1 -1
- package/dist/css/themes/SliderScale.css +1 -1
- package/dist/css/themes/SliderTooltip.css +1 -1
- package/dist/css/themes/TableRow.css +1 -1
- package/dist/css/themes/TableRowBase.css +1 -1
- package/dist/css/themes/sap_fiori_3/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_auto/parameters-bundle.css +36 -93
- package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hc_auto/parameters-bundle.css +37 -94
- package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -1
- package/dist/custom-elements-internal.json +109 -111
- package/dist/custom-elements.json +73 -102
- package/dist/features/InputComposition.d.ts +1 -1
- package/dist/features/InputComposition.js.map +1 -1
- package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_auto/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hc_auto/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/i18n/i18n-defaults.d.ts +3 -1
- package/dist/generated/i18n/i18n-defaults.js +3 -1
- package/dist/generated/i18n/i18n-defaults.js.map +1 -1
- package/dist/generated/themes/CardHeader.css.d.ts +1 -1
- package/dist/generated/themes/CardHeader.css.js +1 -1
- package/dist/generated/themes/CardHeader.css.js.map +1 -1
- package/dist/generated/themes/RangeSlider.css.d.ts +1 -1
- package/dist/generated/themes/RangeSlider.css.js +1 -1
- package/dist/generated/themes/RangeSlider.css.js.map +1 -1
- package/dist/generated/themes/Select.css.d.ts +1 -1
- package/dist/generated/themes/Select.css.js +1 -1
- package/dist/generated/themes/Select.css.js.map +1 -1
- package/dist/generated/themes/Slider.css.d.ts +1 -1
- package/dist/generated/themes/Slider.css.js +1 -1
- package/dist/generated/themes/Slider.css.js.map +1 -1
- package/dist/generated/themes/SliderBase.css.d.ts +1 -1
- package/dist/generated/themes/SliderBase.css.js +1 -1
- package/dist/generated/themes/SliderBase.css.js.map +1 -1
- package/dist/generated/themes/SliderHandle.css.d.ts +1 -1
- package/dist/generated/themes/SliderHandle.css.js +1 -1
- package/dist/generated/themes/SliderHandle.css.js.map +1 -1
- package/dist/generated/themes/SliderScale.css.d.ts +1 -1
- package/dist/generated/themes/SliderScale.css.js +1 -1
- package/dist/generated/themes/SliderScale.css.js.map +1 -1
- package/dist/generated/themes/SliderTooltip.css.d.ts +1 -1
- package/dist/generated/themes/SliderTooltip.css.js +1 -1
- package/dist/generated/themes/SliderTooltip.css.js.map +1 -1
- package/dist/generated/themes/TableRow.css.d.ts +1 -1
- package/dist/generated/themes/TableRow.css.js +1 -1
- package/dist/generated/themes/TableRow.css.js.map +1 -1
- package/dist/generated/themes/TableRowBase.css.d.ts +1 -1
- package/dist/generated/themes/TableRowBase.css.js +1 -1
- package/dist/generated/themes/TableRowBase.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js +36 -93
- package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.js +37 -94
- package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/vscode.html-custom-data.json +15 -31
- package/dist/web-types.json +52 -67
- package/package.json +9 -9
- package/src/AvatarBadgeTemplate.tsx +1 -2
- package/src/CalendarHeaderTemplate.tsx +4 -0
- package/src/ColorPaletteItemTemplate.tsx +1 -0
- package/src/ComboBoxPopoverTemplate.tsx +8 -1
- package/src/MultiInputTemplate.tsx +1 -0
- package/src/RangeSliderTemplate.tsx +146 -113
- package/src/SliderHandleTemplate.tsx +7 -1
- package/src/SliderScaleTemplate.tsx +26 -1
- package/src/SliderTemplate.tsx +0 -1
- package/src/TableHeaderRowTemplate.tsx +23 -1
- package/src/TableRowTemplate.tsx +13 -1
- package/src/i18n/messagebundle.properties +8 -2
- package/src/themes/CardHeader.css +0 -1
- package/src/themes/RangeSlider.css +20 -68
- package/src/themes/Select.css +25 -0
- package/src/themes/Slider.css +3 -6
- package/src/themes/SliderBase.css +1 -269
- package/src/themes/SliderHandle.css +4 -3
- package/src/themes/SliderScale.css +45 -6
- package/src/themes/SliderTooltip.css +2 -2
- package/src/themes/TableRow.css +28 -39
- package/src/themes/TableRowBase.css +79 -20
- package/src/themes/base/SliderBase-parameters.css +1 -101
- package/src/themes/base/SliderHandle-parameters.css +22 -1
- package/src/themes/base/SliderScale-parameters.css +23 -3
- package/src/themes/base/SliderTooltip-parameters.css +3 -0
- package/src/themes/sap_fiori_3/Slider-parameters.css +4 -4
- package/src/themes/sap_fiori_3/SliderBase-parameters.css +0 -30
- package/src/themes/sap_fiori_3/SliderHandle-parameters.css +18 -1
- package/src/themes/sap_fiori_3/SliderScale-parameters.css +2 -8
- package/src/themes/sap_fiori_3/SliderTooltip-parameters.css +5 -0
- package/src/themes/sap_fiori_3_dark/Slider-parameters.css +4 -4
- package/src/themes/sap_fiori_3_dark/SliderBase-parameters.css +1 -26
- package/src/themes/sap_fiori_3_dark/SliderHandle-parameters.css +1 -5
- package/src/themes/sap_fiori_3_dark/SliderScale-parameters.css +1 -13
- package/src/themes/sap_fiori_3_dark/SliderTooltip-parameters.css +5 -0
- package/src/themes/sap_fiori_3_hcb/Slider-parameters.css +4 -4
- package/src/themes/sap_fiori_3_hcb/SliderBase-parameters.css +1 -39
- package/src/themes/sap_fiori_3_hcb/SliderHandle-parameters.css +1 -5
- package/src/themes/sap_fiori_3_hcb/SliderScale-parameters.css +4 -6
- package/src/themes/sap_fiori_3_hcb/SliderTooltip-parameters.css +5 -0
- package/src/themes/sap_fiori_3_hcw/Slider-parameters.css +4 -4
- package/src/themes/sap_fiori_3_hcw/SliderBase-parameters.css +1 -37
- package/src/themes/sap_fiori_3_hcw/SliderHandle-parameters.css +1 -5
- package/src/themes/sap_fiori_3_hcw/SliderScale-parameters.css +1 -14
- package/src/themes/sap_fiori_3_hcw/SliderTooltip-parameters.css +5 -0
- package/src/themes/sap_horizon/Slider-parameters.css +4 -4
- package/src/themes/sap_horizon/SliderBase-parameters.css +0 -49
- package/src/themes/sap_horizon/SliderHandle-parameters.css +2 -1
- package/src/themes/sap_horizon/SliderScale-parameters.css +4 -5
- package/src/themes/sap_horizon_dark/Slider-parameters.css +4 -4
- package/src/themes/sap_horizon_dark/SliderBase-parameters.css +1 -50
- package/src/themes/sap_horizon_dark/SliderHandle-parameters.css +1 -5
- package/src/themes/sap_horizon_dark/SliderScale-parameters.css +1 -10
- package/src/themes/sap_horizon_dark/SliderTooltip-parameters.css +1 -0
- package/src/themes/sap_horizon_hcb/Slider-parameters.css +4 -4
- package/src/themes/sap_horizon_hcb/SliderBase-parameters.css +1 -71
- package/src/themes/sap_horizon_hcb/SliderHandle-parameters.css +4 -3
- package/src/themes/sap_horizon_hcb/SliderScale-parameters.css +3 -2
- package/src/themes/sap_horizon_hcb/SliderTooltip-parameters.css +1 -0
- package/src/themes/sap_horizon_hcw/Slider-parameters.css +4 -4
- package/src/themes/sap_horizon_hcw/SliderBase-parameters.css +1 -72
- package/src/themes/sap_horizon_hcw/SliderHandle-parameters.css +1 -5
- package/src/themes/sap_horizon_hcw/SliderScale-parameters.css +1 -10
- package/src/themes/sap_horizon_hcw/SliderTooltip-parameters.css +1 -0
- package/dist/SliderBaseTemplate.d.ts +0 -10
- package/dist/SliderBaseTemplate.js +0 -19
- package/dist/SliderBaseTemplate.js.map +0 -1
- package/src/SliderBaseTemplate.tsx +0 -65
package/dist/SliderHandle.d.ts
CHANGED
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
2
|
import type { SliderScaleOrientation } from "./SliderScale.js";
|
|
3
|
+
/**
|
|
4
|
+
* Handle types for the slider handle component.
|
|
5
|
+
* @private
|
|
6
|
+
*/
|
|
7
|
+
declare enum SliderHandleType {
|
|
8
|
+
/**
|
|
9
|
+
* Start handle (left handle in LTR mode).
|
|
10
|
+
*/
|
|
11
|
+
Start = "Start",
|
|
12
|
+
/**
|
|
13
|
+
* End handle (right handle in LTR mode).
|
|
14
|
+
*/
|
|
15
|
+
End = "End",
|
|
16
|
+
/**
|
|
17
|
+
* Single handle (used by regular Slider).
|
|
18
|
+
*/
|
|
19
|
+
Single = "Single"
|
|
20
|
+
}
|
|
3
21
|
/**
|
|
4
22
|
* @class
|
|
5
23
|
* The <code>ui5-slider-handle</code> component represents the handle of the <code>ui5-slider</code> component.
|
|
6
24
|
*
|
|
7
25
|
* @constructor
|
|
8
26
|
* @extends UI5Element
|
|
9
|
-
* @since 2.
|
|
27
|
+
* @since 2.22.0
|
|
10
28
|
* @private
|
|
11
29
|
*/
|
|
12
30
|
declare class SliderHandle extends UI5Element {
|
|
@@ -14,40 +32,55 @@ declare class SliderHandle extends UI5Element {
|
|
|
14
32
|
* Defines the value of the slider handle.
|
|
15
33
|
* <br><br>
|
|
16
34
|
* <b>Note:</b> The value should be between the <code>min</code> and <code>max</code> properties of the parent <code>ui5-slider</code>.
|
|
17
|
-
* @since 2.
|
|
18
|
-
* @public
|
|
35
|
+
* @since 2.22.0
|
|
19
36
|
*/
|
|
20
37
|
value: number;
|
|
21
38
|
/**
|
|
22
39
|
* Defines the minimum value of the slider handle.
|
|
23
40
|
* <br><br>
|
|
24
41
|
* <b>Note:</b> The value should be less than the <code>max</code> property of the parent <code>ui5-slider</code>.
|
|
25
|
-
* @since 2.
|
|
26
|
-
* @public
|
|
42
|
+
* @since 2.22.0
|
|
27
43
|
*/
|
|
28
44
|
min: number;
|
|
29
45
|
/**
|
|
30
46
|
* Defines the maximum value of the slider handle.
|
|
31
47
|
* <br><br>
|
|
32
48
|
* <b>Note:</b> The value should be greater than the <code>min</code> property of the parent <code>ui5-slider</code>.
|
|
33
|
-
* @since 2.
|
|
34
|
-
* @public
|
|
49
|
+
* @since 2.22.0
|
|
35
50
|
*/
|
|
36
51
|
max: number;
|
|
37
52
|
/**
|
|
38
53
|
* Defines whether the slider handle is active.
|
|
39
54
|
* <br><br>
|
|
40
55
|
* <b>Note:</b> An active slider handle is currently being interacted with.
|
|
41
|
-
* @since 2.
|
|
42
|
-
*
|
|
56
|
+
* @since 2.22.0
|
|
57
|
+
*
|
|
58
|
+
* @private
|
|
43
59
|
*/
|
|
44
60
|
active: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Defines whether the slider handle should appear hovered.
|
|
63
|
+
* <br><br>
|
|
64
|
+
* <b>Note:</b> Used when the progress bar is hovered to show both handles as hovered.
|
|
65
|
+
* @since 2.22.0
|
|
66
|
+
*
|
|
67
|
+
* @private
|
|
68
|
+
*/
|
|
69
|
+
hovered: boolean;
|
|
45
70
|
/**
|
|
46
71
|
* Defines the orientation of the slider handle.
|
|
47
72
|
*
|
|
48
73
|
* @private
|
|
49
74
|
*/
|
|
50
75
|
orientation: `${SliderScaleOrientation}`;
|
|
76
|
+
/**
|
|
77
|
+
* Defines the type of handle for styling purposes.
|
|
78
|
+
* Used by RangeSlider to differentiate between start and end handles.
|
|
79
|
+
*
|
|
80
|
+
* @private
|
|
81
|
+
*/
|
|
82
|
+
handleType: `${SliderHandleType}`;
|
|
51
83
|
getFocusDomRef(): HTMLElement | undefined;
|
|
52
84
|
}
|
|
53
85
|
export default SliderHandle;
|
|
86
|
+
export { SliderHandleType };
|
package/dist/SliderHandle.js
CHANGED
|
@@ -10,13 +10,32 @@ import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
|
10
10
|
import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
|
|
11
11
|
import SliderHandleTemplate from "./SliderHandleTemplate.js";
|
|
12
12
|
import styles from "./generated/themes/SliderHandle.css.js";
|
|
13
|
+
/**
|
|
14
|
+
* Handle types for the slider handle component.
|
|
15
|
+
* @private
|
|
16
|
+
*/
|
|
17
|
+
var SliderHandleType;
|
|
18
|
+
(function (SliderHandleType) {
|
|
19
|
+
/**
|
|
20
|
+
* Start handle (left handle in LTR mode).
|
|
21
|
+
*/
|
|
22
|
+
SliderHandleType["Start"] = "Start";
|
|
23
|
+
/**
|
|
24
|
+
* End handle (right handle in LTR mode).
|
|
25
|
+
*/
|
|
26
|
+
SliderHandleType["End"] = "End";
|
|
27
|
+
/**
|
|
28
|
+
* Single handle (used by regular Slider).
|
|
29
|
+
*/
|
|
30
|
+
SliderHandleType["Single"] = "Single";
|
|
31
|
+
})(SliderHandleType || (SliderHandleType = {}));
|
|
13
32
|
/**
|
|
14
33
|
* @class
|
|
15
34
|
* The <code>ui5-slider-handle</code> component represents the handle of the <code>ui5-slider</code> component.
|
|
16
35
|
*
|
|
17
36
|
* @constructor
|
|
18
37
|
* @extends UI5Element
|
|
19
|
-
* @since 2.
|
|
38
|
+
* @since 2.22.0
|
|
20
39
|
* @private
|
|
21
40
|
*/
|
|
22
41
|
let SliderHandle = class SliderHandle extends UI5Element {
|
|
@@ -26,40 +45,54 @@ let SliderHandle = class SliderHandle extends UI5Element {
|
|
|
26
45
|
* Defines the value of the slider handle.
|
|
27
46
|
* <br><br>
|
|
28
47
|
* <b>Note:</b> The value should be between the <code>min</code> and <code>max</code> properties of the parent <code>ui5-slider</code>.
|
|
29
|
-
* @since 2.
|
|
30
|
-
* @public
|
|
48
|
+
* @since 2.22.0
|
|
31
49
|
*/
|
|
32
50
|
this.value = 0;
|
|
33
51
|
/**
|
|
34
52
|
* Defines the minimum value of the slider handle.
|
|
35
53
|
* <br><br>
|
|
36
54
|
* <b>Note:</b> The value should be less than the <code>max</code> property of the parent <code>ui5-slider</code>.
|
|
37
|
-
* @since 2.
|
|
38
|
-
* @public
|
|
55
|
+
* @since 2.22.0
|
|
39
56
|
*/
|
|
40
57
|
this.min = 0;
|
|
41
58
|
/**
|
|
42
59
|
* Defines the maximum value of the slider handle.
|
|
43
60
|
* <br><br>
|
|
44
61
|
* <b>Note:</b> The value should be greater than the <code>min</code> property of the parent <code>ui5-slider</code>.
|
|
45
|
-
* @since 2.
|
|
46
|
-
* @public
|
|
62
|
+
* @since 2.22.0
|
|
47
63
|
*/
|
|
48
64
|
this.max = 100;
|
|
49
65
|
/**
|
|
50
66
|
* Defines whether the slider handle is active.
|
|
51
67
|
* <br><br>
|
|
52
68
|
* <b>Note:</b> An active slider handle is currently being interacted with.
|
|
53
|
-
* @since 2.
|
|
54
|
-
*
|
|
69
|
+
* @since 2.22.0
|
|
70
|
+
*
|
|
71
|
+
* @private
|
|
55
72
|
*/
|
|
56
73
|
this.active = false;
|
|
74
|
+
/**
|
|
75
|
+
* Defines whether the slider handle should appear hovered.
|
|
76
|
+
* <br><br>
|
|
77
|
+
* <b>Note:</b> Used when the progress bar is hovered to show both handles as hovered.
|
|
78
|
+
* @since 2.22.0
|
|
79
|
+
*
|
|
80
|
+
* @private
|
|
81
|
+
*/
|
|
82
|
+
this.hovered = false;
|
|
57
83
|
/**
|
|
58
84
|
* Defines the orientation of the slider handle.
|
|
59
85
|
*
|
|
60
86
|
* @private
|
|
61
87
|
*/
|
|
62
88
|
this.orientation = "Horizontal";
|
|
89
|
+
/**
|
|
90
|
+
* Defines the type of handle for styling purposes.
|
|
91
|
+
* Used by RangeSlider to differentiate between start and end handles.
|
|
92
|
+
*
|
|
93
|
+
* @private
|
|
94
|
+
*/
|
|
95
|
+
this.handleType = "Single";
|
|
63
96
|
}
|
|
64
97
|
getFocusDomRef() {
|
|
65
98
|
return this;
|
|
@@ -77,9 +110,15 @@ __decorate([
|
|
|
77
110
|
__decorate([
|
|
78
111
|
property({ type: Boolean })
|
|
79
112
|
], SliderHandle.prototype, "active", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
property({ type: Boolean })
|
|
115
|
+
], SliderHandle.prototype, "hovered", void 0);
|
|
80
116
|
__decorate([
|
|
81
117
|
property()
|
|
82
118
|
], SliderHandle.prototype, "orientation", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
property()
|
|
121
|
+
], SliderHandle.prototype, "handleType", void 0);
|
|
83
122
|
SliderHandle = __decorate([
|
|
84
123
|
customElement({
|
|
85
124
|
tag: "ui5-slider-handle",
|
|
@@ -90,4 +129,5 @@ SliderHandle = __decorate([
|
|
|
90
129
|
], SliderHandle);
|
|
91
130
|
SliderHandle.define();
|
|
92
131
|
export default SliderHandle;
|
|
132
|
+
export { SliderHandleType };
|
|
93
133
|
//# sourceMappingURL=SliderHandle.js.map
|
package/dist/SliderHandle.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SliderHandle.js","sourceRoot":"","sources":["../src/SliderHandle.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,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,CAAC;IAHA,cAAc;QACb,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAA;AA9DA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CACjB;AASV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCACnB;AASR;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCACjB;AAWV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;4CACb;AAWf;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;6CACZ;AAQhB;IADC,QAAQ,EAAE;iDAC6C;AASxD;IADC,QAAQ,EAAE;gDACkC;AAjExC,YAAY;IANjB,aAAa,CAAC;QACd,GAAG,EAAE,mBAAmB;QACxB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,oBAAoB;QAC9B,MAAM;KACN,CAAC;GACI,YAAY,CAsEjB;AAED,YAAY,CAAC,MAAM,EAAE,CAAC;AAEtB,eAAe,YAAY,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport SliderHandleTemplate from \"./SliderHandleTemplate.js\";\nimport styles from \"./generated/themes/SliderHandle.css.js\";\nimport type { SliderScaleOrientation } from \"./SliderScale.js\";\n\n/**\n * Handle types for the slider handle component.\n * @private\n */\nenum SliderHandleType {\n\t/**\n\t * Start handle (left handle in LTR mode).\n\t */\n\tStart = \"Start\",\n\n\t/**\n\t * End handle (right handle in LTR mode).\n\t */\n\tEnd = \"End\",\n\n\t/**\n\t * Single handle (used by regular Slider).\n\t */\n\tSingle = \"Single\",\n}\n\n/**\n * @class\n * The <code>ui5-slider-handle</code> component represents the handle of the <code>ui5-slider</code> component.\n *\n * @constructor\n * @extends UI5Element\n * @since 2.22.0\n * @private\n */\n@customElement({\n\ttag: \"ui5-slider-handle\",\n\trenderer: jsxRenderer,\n\ttemplate: SliderHandleTemplate,\n\tstyles,\n})\nclass SliderHandle extends UI5Element {\n\t/**\n\t * Defines the value of the slider handle.\n\t * <br><br>\n\t * <b>Note:</b> The value should be between the <code>min</code> and <code>max</code> properties of the parent <code>ui5-slider</code>.\n\t * @since 2.22.0\n\t */\n\t@property({ type: Number })\n\tvalue = 0;\n\n\t/**\n\t * Defines the minimum value of the slider handle.\n\t * <br><br>\n\t * <b>Note:</b> The value should be less than the <code>max</code> property of the parent <code>ui5-slider</code>.\n\t * @since 2.22.0\n\t */\n\t@property({ type: Number })\n\tmin = 0;\n\n\t/**\n\t * Defines the maximum value of the slider handle.\n\t * <br><br>\n\t * <b>Note:</b> The value should be greater than the <code>min</code> property of the parent <code>ui5-slider</code>.\n\t * @since 2.22.0\n\t */\n\t@property({ type: Number })\n\tmax = 100;\n\n\t/**\n\t * Defines whether the slider handle is active.\n\t * <br><br>\n\t * <b>Note:</b> An active slider handle is currently being interacted with.\n\t * @since 2.22.0\n\t *\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tactive = false;\n\n\t/**\n\t * Defines whether the slider handle should appear hovered.\n\t * <br><br>\n\t * <b>Note:</b> Used when the progress bar is hovered to show both handles as hovered.\n\t * @since 2.22.0\n\t *\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\thovered = false;\n\n\t/**\n\t * Defines the orientation of the slider handle.\n\t *\n\t * @private\n\t */\n\t@property()\n\torientation: `${SliderScaleOrientation}` = \"Horizontal\";\n\n\t/**\n\t * Defines the type of handle for styling purposes.\n\t * Used by RangeSlider to differentiate between start and end handles.\n\t *\n\t * @private\n\t */\n\t@property()\n\thandleType: `${SliderHandleType}` = \"Single\";\n\n\tgetFocusDomRef(): HTMLElement | undefined {\n\t\treturn this;\n\t}\n}\n\nSliderHandle.define();\n\nexport default SliderHandle;\nexport { SliderHandleType };\n"]}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@ui5/webcomponents-base/jsx-runtime";
|
|
2
2
|
import directionArrows from "@ui5/webcomponents-icons/dist/direction-arrows.js";
|
|
3
3
|
import Icon from "./Icon.js";
|
|
4
|
+
import { SliderHandleType } from "./SliderHandle.js";
|
|
4
5
|
export default function SliderHandleTemplate() {
|
|
5
|
-
return (_jsx("div", { class:
|
|
6
|
+
return (_jsx("div", { class: {
|
|
7
|
+
"ui5-slider-handle-container": true,
|
|
8
|
+
"ui5-slider-handle": true,
|
|
9
|
+
"ui5-slider-handle--start": this.handleType === SliderHandleType.Start,
|
|
10
|
+
"ui5-slider-handle--end": this.handleType === SliderHandleType.End,
|
|
11
|
+
}, children: _jsx(Icon, { name: directionArrows, mode: "Decorative", part: "icon", "slider-icon": true }) }));
|
|
6
12
|
}
|
|
7
13
|
//# sourceMappingURL=SliderHandleTemplate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SliderHandleTemplate.js","sourceRoot":"","sources":["../src/SliderHandleTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,eAAe,MAAM,mDAAmD,CAAC;AAChF,OAAO,IAAI,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"SliderHandleTemplate.js","sourceRoot":"","sources":["../src/SliderHandleTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,eAAe,MAAM,mDAAmD,CAAC;AAChF,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,CAAC,OAAO,UAAU,oBAAoB;IAC3C,OAAO,CACN,cAAK,KAAK,EAAE;YACX,6BAA6B,EAAE,IAAI;YACnC,mBAAmB,EAAE,IAAI;YACzB,0BAA0B,EAAE,IAAI,CAAC,UAAU,KAAK,gBAAgB,CAAC,KAAK;YACtE,wBAAwB,EAAE,IAAI,CAAC,UAAU,KAAK,gBAAgB,CAAC,GAAG;SAClE,YACA,KAAC,IAAI,IAAC,IAAI,EAAE,eAAe,EAC1B,IAAI,EAAC,YAAY,EACjB,IAAI,EAAC,MAAM,wBAEJ,GACH,CACN,CAAC;AACH,CAAC","sourcesContent":["import directionArrows from \"@ui5/webcomponents-icons/dist/direction-arrows.js\";\nimport Icon from \"./Icon.js\";\nimport type SliderHandle from \"./SliderHandle.js\";\nimport { SliderHandleType } from \"./SliderHandle.js\";\n\nexport default function SliderHandleTemplate(this: SliderHandle) {\n\treturn (\n\t\t<div class={{\n\t\t\t\"ui5-slider-handle-container\": true,\n\t\t\t\"ui5-slider-handle\": true,\n\t\t\t\"ui5-slider-handle--start\": this.handleType === SliderHandleType.Start,\n\t\t\t\"ui5-slider-handle--end\": this.handleType === SliderHandleType.End,\n\t\t}}>\n\t\t\t<Icon name={directionArrows}\n\t\t\t\tmode=\"Decorative\"\n\t\t\t\tpart=\"icon\"\n\t\t\t\tslider-icon\n\t\t\t></Icon>\n\t\t</div>\n\t);\n}\n"]}
|
package/dist/SliderScale.d.ts
CHANGED
|
@@ -72,6 +72,57 @@ declare class SliderScale extends UI5Element {
|
|
|
72
72
|
* @private
|
|
73
73
|
*/
|
|
74
74
|
labelInterval: number;
|
|
75
|
+
/**
|
|
76
|
+
* Tab index for the progress bar.
|
|
77
|
+
* @default -1
|
|
78
|
+
* @private
|
|
79
|
+
*/
|
|
80
|
+
progressTabIndex: number;
|
|
81
|
+
/**
|
|
82
|
+
* ARIA role for the progress bar.
|
|
83
|
+
* @private
|
|
84
|
+
*/
|
|
85
|
+
progressRole?: string;
|
|
86
|
+
/**
|
|
87
|
+
* ARIA aria-valuenow for the progress bar.
|
|
88
|
+
* @private
|
|
89
|
+
*/
|
|
90
|
+
progressAriaValueNow?: number;
|
|
91
|
+
/**
|
|
92
|
+
* ARIA aria-valuetext for the progress bar.
|
|
93
|
+
* @private
|
|
94
|
+
*/
|
|
95
|
+
progressAriaValueText?: string;
|
|
96
|
+
/**
|
|
97
|
+
* ARIA aria-label for the progress bar.
|
|
98
|
+
* @private
|
|
99
|
+
*/
|
|
100
|
+
progressAriaLabel?: string;
|
|
101
|
+
/**
|
|
102
|
+
* ARIA aria-disabled for the progress bar.
|
|
103
|
+
* @private
|
|
104
|
+
*/
|
|
105
|
+
progressAriaDisabled?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Indicates that the progress bar is being pressed/dragged.
|
|
108
|
+
* Used to show the focus outline during mouse interaction.
|
|
109
|
+
* @default false
|
|
110
|
+
* @private
|
|
111
|
+
*/
|
|
112
|
+
progressPressed: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Indicates that the progress bar should show as focused.
|
|
115
|
+
* Set by parent component (RangeSlider) when the progress bar has focus.
|
|
116
|
+
* @default false
|
|
117
|
+
* @private
|
|
118
|
+
*/
|
|
119
|
+
progressFocused: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Indicates that the progress bar is being hovered.
|
|
122
|
+
* @default false
|
|
123
|
+
* @private
|
|
124
|
+
*/
|
|
125
|
+
progressHovered: boolean;
|
|
75
126
|
/**
|
|
76
127
|
* @private
|
|
77
128
|
*/
|
|
@@ -101,6 +152,8 @@ declare class SliderScale extends UI5Element {
|
|
|
101
152
|
* @private
|
|
102
153
|
*/
|
|
103
154
|
_spaceBetweenTickmarks(): number;
|
|
155
|
+
_onProgressMouseEnter(): void;
|
|
156
|
+
_onProgressMouseLeave(): void;
|
|
104
157
|
get _tickmarksCount(): number;
|
|
105
158
|
get _visibleLabels(): {
|
|
106
159
|
value: number;
|
package/dist/SliderScale.js
CHANGED
|
@@ -90,6 +90,32 @@ let SliderScale = SliderScale_1 = class SliderScale extends UI5Element {
|
|
|
90
90
|
* @private
|
|
91
91
|
*/
|
|
92
92
|
this.labelInterval = 0;
|
|
93
|
+
/**
|
|
94
|
+
* Tab index for the progress bar.
|
|
95
|
+
* @default -1
|
|
96
|
+
* @private
|
|
97
|
+
*/
|
|
98
|
+
this.progressTabIndex = -1;
|
|
99
|
+
/**
|
|
100
|
+
* Indicates that the progress bar is being pressed/dragged.
|
|
101
|
+
* Used to show the focus outline during mouse interaction.
|
|
102
|
+
* @default false
|
|
103
|
+
* @private
|
|
104
|
+
*/
|
|
105
|
+
this.progressPressed = false;
|
|
106
|
+
/**
|
|
107
|
+
* Indicates that the progress bar should show as focused.
|
|
108
|
+
* Set by parent component (RangeSlider) when the progress bar has focus.
|
|
109
|
+
* @default false
|
|
110
|
+
* @private
|
|
111
|
+
*/
|
|
112
|
+
this.progressFocused = false;
|
|
113
|
+
/**
|
|
114
|
+
* Indicates that the progress bar is being hovered.
|
|
115
|
+
* @default false
|
|
116
|
+
* @private
|
|
117
|
+
*/
|
|
118
|
+
this.progressHovered = false;
|
|
93
119
|
/**
|
|
94
120
|
* @private
|
|
95
121
|
*/
|
|
@@ -160,6 +186,20 @@ let SliderScale = SliderScale_1 = class SliderScale extends UI5Element {
|
|
|
160
186
|
: this.getBoundingClientRect().height;
|
|
161
187
|
return containerSize / tickmarksCount;
|
|
162
188
|
}
|
|
189
|
+
_onProgressMouseEnter() {
|
|
190
|
+
this.progressHovered = true;
|
|
191
|
+
this.handles.forEach(handle => {
|
|
192
|
+
if (!handle.active) {
|
|
193
|
+
handle.hovered = true;
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
_onProgressMouseLeave() {
|
|
198
|
+
this.progressHovered = false;
|
|
199
|
+
this.handles.forEach(handle => {
|
|
200
|
+
handle.hovered = false;
|
|
201
|
+
});
|
|
202
|
+
}
|
|
163
203
|
get _tickmarksCount() {
|
|
164
204
|
if (this.step === 0) {
|
|
165
205
|
return 0;
|
|
@@ -271,6 +311,33 @@ __decorate([
|
|
|
271
311
|
__decorate([
|
|
272
312
|
property({ type: Number })
|
|
273
313
|
], SliderScale.prototype, "labelInterval", void 0);
|
|
314
|
+
__decorate([
|
|
315
|
+
property({ type: Number })
|
|
316
|
+
], SliderScale.prototype, "progressTabIndex", void 0);
|
|
317
|
+
__decorate([
|
|
318
|
+
property()
|
|
319
|
+
], SliderScale.prototype, "progressRole", void 0);
|
|
320
|
+
__decorate([
|
|
321
|
+
property({ type: Number })
|
|
322
|
+
], SliderScale.prototype, "progressAriaValueNow", void 0);
|
|
323
|
+
__decorate([
|
|
324
|
+
property()
|
|
325
|
+
], SliderScale.prototype, "progressAriaValueText", void 0);
|
|
326
|
+
__decorate([
|
|
327
|
+
property()
|
|
328
|
+
], SliderScale.prototype, "progressAriaLabel", void 0);
|
|
329
|
+
__decorate([
|
|
330
|
+
property({ type: Boolean })
|
|
331
|
+
], SliderScale.prototype, "progressAriaDisabled", void 0);
|
|
332
|
+
__decorate([
|
|
333
|
+
property({ type: Boolean })
|
|
334
|
+
], SliderScale.prototype, "progressPressed", void 0);
|
|
335
|
+
__decorate([
|
|
336
|
+
property({ type: Boolean })
|
|
337
|
+
], SliderScale.prototype, "progressFocused", void 0);
|
|
338
|
+
__decorate([
|
|
339
|
+
property({ type: Boolean })
|
|
340
|
+
], SliderScale.prototype, "progressHovered", void 0);
|
|
274
341
|
__decorate([
|
|
275
342
|
property({ type: Number })
|
|
276
343
|
], SliderScale.prototype, "_labelInterval", void 0);
|
package/dist/SliderScale.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SliderScale.js","sourceRoot":"","sources":["../src/SliderScale.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,aAAa,MAAM,wDAAwD,CAAC;AAEnF,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,mBAAmB,MA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H;AAazB;IAJC,IAAI,CAAC;QACL,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,IAAI;KACf,CAAC;4CAC4B;AAhGzB,WAAW;IANhB,aAAa,CAAC;QACd,GAAG,EAAE,kBAAkB;QACvB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,cAAc;QACtB,QAAQ,EAAE,mBAAmB;KAC7B,CAAC;GACI,WAAW,CAuRhB;AAED,WAAW,CAAC,MAAM,EAAE,CAAC;AAErB,eAAe,WAAW,CAAC;AAC3B,OAAO,EAAE,sBAAsB,EAAE,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport SliderBase from \"./SliderBase.js\";\nimport SliderScaleTemplate from \"./SliderScaleTemplate.js\";\n\nimport SliderScaleCss from \"./generated/themes/SliderScale.css.js\";\nimport type SliderHandle from \"./SliderHandle.js\";\n\ntype Tickmark = {\n\tvalue: number;\n\tlabel?: string;\n};\n\nenum SliderScaleOrientation {\n\t/**\n\t * Horizontal orientation\n\t * @public\n\t */\n\tHorizontal = \"Horizontal\",\n\n\t/**\n\t * Vertical orientation\n\t * @private\n\t */\n\tVertical = \"Vertical\",\n}\n\n@customElement({\n\ttag: \"ui5-slider-scale\",\n\trenderer: jsxRenderer,\n\tstyles: SliderScaleCss,\n\ttemplate: SliderScaleTemplate,\n})\nclass SliderScale extends UI5Element {\n\t/**\n\t * Defines the start value of the progress bar.\n\t * @default 0\n\t * @private\n\t */\n\t@property({ type: Number })\n\tstartValue = 0;\n\n\t/**\n\t * Defines the end value of the progress bar.\n\t * @default 100\n\t * @private\n\t */\n\t@property({ type: Number })\n\tendValue = 100;\n\n\t/**\n\t * Defines the minimum value of the scale.\n\t * @default 0\n\t * @private\n\t */\n\t@property({ type: Number })\n\tmin = 0;\n\n\t/**\n\t * Defines the maximum value of the scale.\n\t * @default 100\n\t * @private\n\t */\n\t@property({ type: Number })\n\tmax = 100;\n\n\t/**\n\t * Defines the step value for tickmarks.\n\t * @default 1\n\t * @private\n\t */\n\t@property({ type: Number })\n\tstep = 1;\n\n\t/**\n\t * Determines whether tickmarks should be displayed.\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tshowTickmarks = false;\n\n\t/**\n\t * Defines the orientation of the scale.\n\t * @default \"Horizontal\"\n\t * @private\n\t */\n\t@property()\n\torientation: `${SliderScaleOrientation}` = \"Horizontal\";\n\n\t/**\n\t * Defines custom tickmarks to be displayed on the scale.\n\t * @default []\n\t * @private\n\t */\n\t@property({ type: Array })\n\ttickmarks: Array<Tickmark> = [];\n\n\t/**\n\t * Defines the interval for displaying labels on tickmarks.\n\t * @default 0\n\t * @private\n\t */\n\t@property({ type: Number })\n\tlabelInterval = 0;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Number })\n\t_labelInterval = 1;\n\n\t@property({ type: Boolean })\n\t_labelsOverlapping = false;\n\n\t@property({ type: Boolean })\n\t_hiddenTickmarks = false;\n\n\t_resizeHandler: ResizeObserverCallback;\n\t_notResized = true;\n\n\t/**\n\t * Defines the component items.\n\t * @public\n\t */\n\t@slot({\n\t\ttype: HTMLElement,\n\t\t\"default\": true,\n\t})\n\thandles!: Array<SliderHandle>;\n\n\tstatic get MIN_LABEL_DISTANCE() {\n\t\treturn 16;\n\t}\n\n\tstatic get MIN_SPACE_BETWEEN_TICKMARKS() {\n\t\treturn 8;\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._resizeHandler = this._handleResize.bind(this);\n\t}\n\n\tonEnterDOM() {\n\t\tResizeHandler.register(this, this._resizeHandler);\n\t}\n\n\tonExitDOM() {\n\t\tResizeHandler.deregister(this, this._resizeHandler);\n\t}\n\n\tonAfterRendering() {\n\t\tif (this._notResized) {\n\t\t\tthis._handleResize();\n\t\t}\n\t}\n\n\t/**\n\t * Handle the responsiveness of the SliderScale's UI elements when resizing\n\t * @private\n\t */\n\t_handleResize() {\n\t\tif (!this.showTickmarks) {\n\t\t\tthis._hiddenTickmarks = false;\n\t\t\tthis._labelsOverlapping = false;\n\t\t\treturn;\n\t\t}\n\n\t\t// Mark resizing to avoid unnecessary calls to that function after rendering\n\t\tthis._notResized = false;\n\n\t\tconst containerSize = this.orientation === SliderScaleOrientation.Horizontal\n\t\t\t? this.getBoundingClientRect().width\n\t\t\t: this.getBoundingClientRect().height;\n\n\t\tconst tickmarksCount = this._tickmarksCount;\n\n\t\t// Check if tickmarks should be hidden due to insufficient space\n\t\tif (tickmarksCount > 1) {\n\t\t\tconst spaceBetweenTickmarks = containerSize / tickmarksCount;\n\t\t\tthis._hiddenTickmarks = spaceBetweenTickmarks < SliderScale.MIN_SPACE_BETWEEN_TICKMARKS;\n\t\t} else {\n\t\t\tthis._hiddenTickmarks = false;\n\t\t}\n\n\t\t// Check if labels should be hidden due to insufficient space or overlapping\n\t\tif (this.labelInterval <= 0 || this._hiddenTickmarks) {\n\t\t\tthis._labelsOverlapping = true;\n\t\t} else {\n\t\t\t// Calculate if labels would overlap based on their estimated width\n\t\t\tconst visibleLabelCount = Math.ceil((tickmarksCount - 1) / this.labelInterval) + 1;\n\t\t\tconst estimatedLabelWidth = 32; // Estimated width in pixels for a label (2rem = ~32px)\n\t\t\tconst requiredWidth = visibleLabelCount * estimatedLabelWidth;\n\t\t\tthis._labelsOverlapping = containerSize < requiredWidth;\n\t\t}\n\t}\n\n\t/**\n\t * Calculates space between tickmarks\n\t * @private\n\t */\n\t_spaceBetweenTickmarks() {\n\t\tconst tickmarksCount = this._tickmarksCount;\n\t\tif (tickmarksCount <= 1) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tconst containerSize = this.orientation === SliderScaleOrientation.Horizontal\n\t\t\t? this.getBoundingClientRect().width\n\t\t\t: this.getBoundingClientRect().height;\n\n\t\treturn containerSize / tickmarksCount;\n\t}\n\n\tget _tickmarksCount() {\n\t\tif (this.step === 0) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn (this.max - this.min) / this.step;\n\t}\n\n\tget _visibleLabels() {\n\t\treturn this._tickmarks.filter(tick => tick.showLabel);\n\t}\n\n\tget _progressStyle() {\n\t\tconst range = this.max - this.min;\n\t\t// Clamp startValue and endValue to be within min/max bounds\n\t\tconst clampedStartValue = Math.max(this.min, Math.min(this.startValue, this.max));\n\t\tconst clampedEndValue = Math.max(this.min, Math.min(this.endValue, this.max));\n\n\t\tconst start = ((clampedStartValue - this.min) / range) * 100;\n\t\tconst end = ((clampedEndValue - this.min) / range) * 100;\n\n\t\tif (this.orientation === SliderScaleOrientation.Vertical) {\n\t\t\treturn {\n\t\t\t\ttop: \"auto\",\n\t\t\t\tbottom: `${start}%`,\n\t\t\t\theight: `${end - start}%`,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tinsetInlineStart: `${start}%`,\n\t\t\twidth: `${end - start}%`,\n\t\t};\n\t}\n\n\tget _allTickmarks() {\n\t\t// If custom tickmarks are provided, use them\n\t\tif (this.tickmarks.length > 0) {\n\t\t\treturn this.tickmarks;\n\t\t}\n\n\t\t// Otherwise, generate tickmarks based on step\n\t\tif (!this.showTickmarks) {\n\t\t\treturn [];\n\t\t}\n\n\t\tif (this.step === 0) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst values = [];\n\t\tfor (let value = this.min; value <= this.max; value += this.step) {\n\t\t\tvalues.push({ value });\n\t\t}\n\t\treturn values;\n\t}\n\n\tget _tickmarks() {\n\t\tconst allTickmarks = this._allTickmarks;\n\t\tconst stepPrecision = SliderBase._getDecimalPrecisionOfNumber(this.step);\n\t\tconst formatLabelPrecision = stepPrecision > 0 ? stepPrecision : 0;\n\n\t\tif (allTickmarks.length === 0) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn allTickmarks.map((tm, index) => {\n\t\t\tconst value = tm.value;\n\t\t\tconst isFirstOrLast = index === 0 || index === allTickmarks.length - 1;\n\t\t\tconst position = ((value - this.min) / (this.max - this.min)) * 100;\n\n\t\t\t// Determine if this tickmark should be visible\n\t\t\tconst shouldShowTickmark = this._hiddenTickmarks ? isFirstOrLast : true;\n\n\t\t\t// Determine if the label should be visible\n\t\t\tlet showLabel = false;\n\t\t\tif (shouldShowTickmark && !this._labelsOverlapping) {\n\t\t\t\tif (this.labelInterval > 0) {\n\t\t\t\t\tshowLabel = index % this.labelInterval === 0;\n\t\t\t\t} else {\n\t\t\t\t\tshowLabel = true;\n\t\t\t\t}\n\t\t\t} else if (shouldShowTickmark && this._labelsOverlapping && this.labelInterval > 0) {\n\t\t\t\t// When labels overlap, only show first and last\n\t\t\t\tshowLabel = isFirstOrLast;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tvalue,\n\t\t\t\tlabel: tm.label || value.toFixed(formatLabelPrecision),\n\t\t\t\tisInRange: value >= this.startValue && value <= this.endValue,\n\t\t\t\tposition,\n\t\t\t\tshowLabel,\n\t\t\t\tvisible: shouldShowTickmark,\n\t\t\t};\n\t\t}).filter(tick => tick.visible);\n\t}\n}\n\nSliderScale.define();\n\nexport default SliderScale;\nexport { SliderScaleOrientation };\nexport type { Tickmark };\n"]}
|
|
1
|
+
{"version":3,"file":"SliderScale.js","sourceRoot":"","sources":["../src/SliderScale.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,aAAa,MAAM,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;AAazB;IAJC,IAAI,CAAC;QACL,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,IAAI;KACf,CAAC;4CAC4B;AApKzB,WAAW;IANhB,aAAa,CAAC;QACd,GAAG,EAAE,kBAAkB;QACvB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,cAAc;QACtB,QAAQ,EAAE,mBAAmB;KAC7B,CAAC;GACI,WAAW,CA2WhB;AAED,WAAW,CAAC,MAAM,EAAE,CAAC;AAErB,eAAe,WAAW,CAAC;AAC3B,OAAO,EAAE,sBAAsB,EAAE,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport SliderBase from \"./SliderBase.js\";\nimport SliderScaleTemplate from \"./SliderScaleTemplate.js\";\n\nimport SliderScaleCss from \"./generated/themes/SliderScale.css.js\";\nimport type SliderHandle from \"./SliderHandle.js\";\n\ntype Tickmark = {\n\tvalue: number;\n\tlabel?: string;\n};\n\nenum SliderScaleOrientation {\n\t/**\n\t * Horizontal orientation\n\t * @public\n\t */\n\tHorizontal = \"Horizontal\",\n\n\t/**\n\t * Vertical orientation\n\t * @private\n\t */\n\tVertical = \"Vertical\",\n}\n\n@customElement({\n\ttag: \"ui5-slider-scale\",\n\trenderer: jsxRenderer,\n\tstyles: SliderScaleCss,\n\ttemplate: SliderScaleTemplate,\n})\nclass SliderScale extends UI5Element {\n\t/**\n\t * Defines the start value of the progress bar.\n\t * @default 0\n\t * @private\n\t */\n\t@property({ type: Number })\n\tstartValue = 0;\n\n\t/**\n\t * Defines the end value of the progress bar.\n\t * @default 100\n\t * @private\n\t */\n\t@property({ type: Number })\n\tendValue = 100;\n\n\t/**\n\t * Defines the minimum value of the scale.\n\t * @default 0\n\t * @private\n\t */\n\t@property({ type: Number })\n\tmin = 0;\n\n\t/**\n\t * Defines the maximum value of the scale.\n\t * @default 100\n\t * @private\n\t */\n\t@property({ type: Number })\n\tmax = 100;\n\n\t/**\n\t * Defines the step value for tickmarks.\n\t * @default 1\n\t * @private\n\t */\n\t@property({ type: Number })\n\tstep = 1;\n\n\t/**\n\t * Determines whether tickmarks should be displayed.\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tshowTickmarks = false;\n\n\t/**\n\t * Defines the orientation of the scale.\n\t * @default \"Horizontal\"\n\t * @private\n\t */\n\t@property()\n\torientation: `${SliderScaleOrientation}` = \"Horizontal\";\n\n\t/**\n\t * Defines custom tickmarks to be displayed on the scale.\n\t * @default []\n\t * @private\n\t */\n\t@property({ type: Array })\n\ttickmarks: Array<Tickmark> = [];\n\n\t/**\n\t * Defines the interval for displaying labels on tickmarks.\n\t * @default 0\n\t * @private\n\t */\n\t@property({ type: Number })\n\tlabelInterval = 0;\n\n\t/**\n\t * Tab index for the progress bar.\n\t * @default -1\n\t * @private\n\t */\n\t@property({ type: Number })\n\tprogressTabIndex = -1;\n\n\t/**\n\t * ARIA role for the progress bar.\n\t * @private\n\t */\n\t@property()\n\tprogressRole?: string;\n\n\t/**\n\t * ARIA aria-valuenow for the progress bar.\n\t * @private\n\t */\n\t@property({ type: Number })\n\tprogressAriaValueNow?: number;\n\n\t/**\n\t * ARIA aria-valuetext for the progress bar.\n\t * @private\n\t */\n\t@property()\n\tprogressAriaValueText?: string;\n\n\t/**\n\t * ARIA aria-label for the progress bar.\n\t * @private\n\t */\n\t@property()\n\tprogressAriaLabel?: string;\n\n\t/**\n\t * ARIA aria-disabled for the progress bar.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tprogressAriaDisabled?: boolean;\n\n\t/**\n\t * Indicates that the progress bar is being pressed/dragged.\n\t * Used to show the focus outline during mouse interaction.\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tprogressPressed = false;\n\n\t/**\n\t * Indicates that the progress bar should show as focused.\n\t * Set by parent component (RangeSlider) when the progress bar has focus.\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tprogressFocused = false;\n\n\t/**\n\t * Indicates that the progress bar is being hovered.\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tprogressHovered = false;\n\t/**\n\t * @private\n\t */\n\t@property({ type: Number })\n\t_labelInterval = 1;\n\n\t@property({ type: Boolean })\n\t_labelsOverlapping = false;\n\n\t@property({ type: Boolean })\n\t_hiddenTickmarks = false;\n\n\t_resizeHandler: ResizeObserverCallback;\n\t_notResized = true;\n\n\t/**\n\t * Defines the component items.\n\t * @public\n\t */\n\t@slot({\n\t\ttype: HTMLElement,\n\t\t\"default\": true,\n\t})\n\thandles!: Array<SliderHandle>;\n\n\tstatic get MIN_LABEL_DISTANCE() {\n\t\treturn 16;\n\t}\n\n\tstatic get MIN_SPACE_BETWEEN_TICKMARKS() {\n\t\treturn 8;\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._resizeHandler = this._handleResize.bind(this);\n\t}\n\n\tonEnterDOM() {\n\t\tResizeHandler.register(this, this._resizeHandler);\n\t}\n\n\tonExitDOM() {\n\t\tResizeHandler.deregister(this, this._resizeHandler);\n\t}\n\n\tonAfterRendering() {\n\t\tif (this._notResized) {\n\t\t\tthis._handleResize();\n\t\t}\n\t}\n\n\t/**\n\t * Handle the responsiveness of the SliderScale's UI elements when resizing\n\t * @private\n\t */\n\t_handleResize() {\n\t\tif (!this.showTickmarks) {\n\t\t\tthis._hiddenTickmarks = false;\n\t\t\tthis._labelsOverlapping = false;\n\t\t\treturn;\n\t\t}\n\n\t\t// Mark resizing to avoid unnecessary calls to that function after rendering\n\t\tthis._notResized = false;\n\n\t\tconst containerSize = this.orientation === SliderScaleOrientation.Horizontal\n\t\t\t? this.getBoundingClientRect().width\n\t\t\t: this.getBoundingClientRect().height;\n\n\t\tconst tickmarksCount = this._tickmarksCount;\n\n\t\t// Check if tickmarks should be hidden due to insufficient space\n\t\tif (tickmarksCount > 1) {\n\t\t\tconst spaceBetweenTickmarks = containerSize / tickmarksCount;\n\t\t\tthis._hiddenTickmarks = spaceBetweenTickmarks < SliderScale.MIN_SPACE_BETWEEN_TICKMARKS;\n\t\t} else {\n\t\t\tthis._hiddenTickmarks = false;\n\t\t}\n\n\t\t// Check if labels should be hidden due to insufficient space or overlapping\n\t\tif (this.labelInterval <= 0 || this._hiddenTickmarks) {\n\t\t\tthis._labelsOverlapping = true;\n\t\t} else {\n\t\t\t// Calculate if labels would overlap based on their estimated width\n\t\t\tconst visibleLabelCount = Math.ceil((tickmarksCount - 1) / this.labelInterval) + 1;\n\t\t\tconst estimatedLabelWidth = 32; // Estimated width in pixels for a label (2rem = ~32px)\n\t\t\tconst requiredWidth = visibleLabelCount * estimatedLabelWidth;\n\t\t\tthis._labelsOverlapping = containerSize < requiredWidth;\n\t\t}\n\t}\n\n\t/**\n\t * Calculates space between tickmarks\n\t * @private\n\t */\n\t_spaceBetweenTickmarks() {\n\t\tconst tickmarksCount = this._tickmarksCount;\n\t\tif (tickmarksCount <= 1) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tconst containerSize = this.orientation === SliderScaleOrientation.Horizontal\n\t\t\t? this.getBoundingClientRect().width\n\t\t\t: this.getBoundingClientRect().height;\n\n\t\treturn containerSize / tickmarksCount;\n\t}\n\n\t_onProgressMouseEnter() {\n\t\tthis.progressHovered = true;\n\t\tthis.handles.forEach(handle => {\n\t\t\tif (!handle.active) {\n\t\t\t\thandle.hovered = true;\n\t\t\t}\n\t\t});\n\t}\n\n\t_onProgressMouseLeave() {\n\t\tthis.progressHovered = false;\n\t\tthis.handles.forEach(handle => {\n\t\t\thandle.hovered = false;\n\t\t});\n\t}\n\n\tget _tickmarksCount() {\n\t\tif (this.step === 0) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn (this.max - this.min) / this.step;\n\t}\n\n\tget _visibleLabels() {\n\t\treturn this._tickmarks.filter(tick => tick.showLabel);\n\t}\n\n\tget _progressStyle() {\n\t\tconst range = this.max - this.min;\n\t\t// Clamp startValue and endValue to be within min/max bounds\n\t\tconst clampedStartValue = Math.max(this.min, Math.min(this.startValue, this.max));\n\t\tconst clampedEndValue = Math.max(this.min, Math.min(this.endValue, this.max));\n\n\t\tconst start = ((clampedStartValue - this.min) / range) * 100;\n\t\tconst end = ((clampedEndValue - this.min) / range) * 100;\n\n\t\tif (this.orientation === SliderScaleOrientation.Vertical) {\n\t\t\treturn {\n\t\t\t\ttop: \"auto\",\n\t\t\t\tbottom: `${start}%`,\n\t\t\t\theight: `${end - start}%`,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tinsetInlineStart: `${start}%`,\n\t\t\twidth: `${end - start}%`,\n\t\t};\n\t}\n\n\tget _allTickmarks() {\n\t\t// If custom tickmarks are provided, use them\n\t\tif (this.tickmarks.length > 0) {\n\t\t\treturn this.tickmarks;\n\t\t}\n\n\t\t// Otherwise, generate tickmarks based on step\n\t\tif (!this.showTickmarks) {\n\t\t\treturn [];\n\t\t}\n\n\t\tif (this.step === 0) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst values = [];\n\t\tfor (let value = this.min; value <= this.max; value += this.step) {\n\t\t\tvalues.push({ value });\n\t\t}\n\t\treturn values;\n\t}\n\n\tget _tickmarks() {\n\t\tconst allTickmarks = this._allTickmarks;\n\t\tconst stepPrecision = SliderBase._getDecimalPrecisionOfNumber(this.step);\n\t\tconst formatLabelPrecision = stepPrecision > 0 ? stepPrecision : 0;\n\n\t\tif (allTickmarks.length === 0) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn allTickmarks.map((tm, index) => {\n\t\t\tconst value = tm.value;\n\t\t\tconst isFirstOrLast = index === 0 || index === allTickmarks.length - 1;\n\t\t\tconst position = ((value - this.min) / (this.max - this.min)) * 100;\n\n\t\t\t// Determine if this tickmark should be visible\n\t\t\tconst shouldShowTickmark = this._hiddenTickmarks ? isFirstOrLast : true;\n\n\t\t\t// Determine if the label should be visible\n\t\t\tlet showLabel = false;\n\t\t\tif (shouldShowTickmark && !this._labelsOverlapping) {\n\t\t\t\tif (this.labelInterval > 0) {\n\t\t\t\t\tshowLabel = index % this.labelInterval === 0;\n\t\t\t\t} else {\n\t\t\t\t\tshowLabel = true;\n\t\t\t\t}\n\t\t\t} else if (shouldShowTickmark && this._labelsOverlapping && this.labelInterval > 0) {\n\t\t\t\t// When labels overlap, only show first and last\n\t\t\t\tshowLabel = isFirstOrLast;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tvalue,\n\t\t\t\tlabel: tm.label || value.toFixed(formatLabelPrecision),\n\t\t\t\tisInRange: value >= this.startValue && value <= this.endValue,\n\t\t\t\tposition,\n\t\t\t\tshowLabel,\n\t\t\t\tvisible: shouldShowTickmark,\n\t\t\t};\n\t\t}).filter(tick => tick.visible);\n\t}\n}\n\nSliderScale.define();\n\nexport default SliderScale;\nexport { SliderScaleOrientation };\nexport type { Tickmark };\n"]}
|
|
@@ -6,6 +6,10 @@ export default function SliderScaleTemplate() {
|
|
|
6
6
|
}, style: {
|
|
7
7
|
insetInlineStart: `${this.orientation === "Horizontal" ? tick.position : "50"}%`,
|
|
8
8
|
bottom: `${this.orientation === "Vertical" ? tick.position : "auto"}%`
|
|
9
|
-
}, children: tick.label && tick.showLabel && (_jsx("span", { class: "ui5-slider-scale-tickmark-label", children: tick.label })) }))) })), _jsx("div", { class:
|
|
9
|
+
}, children: tick.label && tick.showLabel && (_jsx("span", { class: "ui5-slider-scale-tickmark-label", children: tick.label })) }))) })), _jsx("div", { class: {
|
|
10
|
+
"ui5-slider-scale-progress": true,
|
|
11
|
+
"ui5-slider-progress": true,
|
|
12
|
+
"ui5-slider-progress--focused": this.progressFocused || this.progressPressed,
|
|
13
|
+
}, part: "progress", style: this._progressStyle, tabIndex: this.progressTabIndex, role: "slider", "aria-orientation": "horizontal", "aria-valuemin": this.min, "aria-valuemax": this.max, "aria-valuenow": this.progressAriaValueNow, "aria-valuetext": this.progressAriaValueText, "aria-label": this.progressAriaLabel, "aria-disabled": this.progressAriaDisabled, onMouseEnter: this._onProgressMouseEnter, onMouseLeave: this._onProgressMouseLeave }), _jsx("div", { class: "ui5-slider-scale-progress-hover-area", style: this._progressStyle, onMouseEnter: this._onProgressMouseEnter, onMouseLeave: this._onProgressMouseLeave }), _jsx("slot", {})] }));
|
|
10
14
|
}
|
|
11
15
|
//# sourceMappingURL=SliderScaleTemplate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SliderScaleTemplate.js","sourceRoot":"","sources":["../src/SliderScaleTemplate.tsx"],"names":[],"mappings":";AAEA,MAAM,CAAC,OAAO,UAAU,mBAAmB;IAC1C,OAAO,CACN,eAAK,KAAK,EAAC,uBAAuB,EAAC,IAAI,EAAC,OAAO,aAC7C,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,IAAI,CAC9B,cAAK,KAAK,EAAC,sCAAsC,YAC/C,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAC5B,cACC,KAAK,EAAE;wBACN,2BAA2B,EAAE,IAAI;wBACjC,oCAAoC,EAAE,IAAI,CAAC,SAAS;qBACpD,EACD,KAAK,EAAE;wBACN,gBAAgB,EAAE,GAAG,IAAI,CAAC,WAAW,KAAK,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,GAAG;wBAChF,MAAM,EAAE,GAAG,IAAI,CAAC,WAAW,KAAK,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,GAAG;qBACtE,YAEA,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,SA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,IAAI,EAAC,QAAQ,sBACI,YAAY,mBACd,IAAI,CAAC,GAAG,mBACR,IAAI,CAAC,GAAG,mBACR,IAAI,CAAC,oBAAoB,oBACxB,IAAI,CAAC,qBAAqB,gBAC9B,IAAI,CAAC,iBAAiB,mBACnB,IAAI,CAAC,oBAAoB,EACxC,YAAY,EAAE,IAAI,CAAC,qBAAqB,EACxC,YAAY,EAAE,IAAI,CAAC,qBAAqB,GAClC,EACP,cACC,KAAK,EAAC,sCAAsC,EAC5C,KAAK,EAAE,IAAI,CAAC,cAAc,EAC1B,YAAY,EAAE,IAAI,CAAC,qBAAqB,EACxC,YAAY,EAAE,IAAI,CAAC,qBAAqB,GAClC,EACP,gBAAa,IACR,CACN,CAAC;AACH,CAAC","sourcesContent":["import type SliderScale from \"./SliderScale.js\";\n\nexport default function SliderScaleTemplate(this: SliderScale) {\n\treturn (\n\t\t<div class=\"ui5-slider-scale-root\" part=\"inner\">\n\t\t\t{this._tickmarks.length > 0 && (\n\t\t\t\t<div class=\"ui5-slider-scale-tickmarks-container\">\n\t\t\t\t\t{this._tickmarks.map(tick => (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\t\t\"ui5-slider-scale-tickmark\": true,\n\t\t\t\t\t\t\t\t\"ui5-slider-scale-tickmark-in-range\": tick.isInRange,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\tinsetInlineStart: `${this.orientation === \"Horizontal\" ? tick.position : \"50\"}%`,\n\t\t\t\t\t\t\t\tbottom: `${this.orientation === \"Vertical\" ? tick.position : \"auto\"}%`\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{tick.label && tick.showLabel && (\n\t\t\t\t\t\t\t\t<span class=\"ui5-slider-scale-tickmark-label\">\n\t\t\t\t\t\t\t\t\t{tick.label}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t<div\n\t\t\t\tclass={{\n\t\t\t\t\t\"ui5-slider-scale-progress\": true,\n\t\t\t\t\t\"ui5-slider-progress\": true,\n\t\t\t\t\t\"ui5-slider-progress--focused\": this.progressFocused || this.progressPressed,\n\t\t\t\t}}\n\t\t\t\tpart=\"progress\"\n\t\t\t\tstyle={this._progressStyle}\n\t\t\t\ttabIndex={this.progressTabIndex}\n\t\t\t\trole=\"slider\"\n\t\t\t\taria-orientation=\"horizontal\"\n\t\t\t\taria-valuemin={this.min}\n\t\t\t\taria-valuemax={this.max}\n\t\t\t\taria-valuenow={this.progressAriaValueNow}\n\t\t\t\taria-valuetext={this.progressAriaValueText}\n\t\t\t\taria-label={this.progressAriaLabel}\n\t\t\t\taria-disabled={this.progressAriaDisabled}\n\t\t\t\tonMouseEnter={this._onProgressMouseEnter}\n\t\t\t\tonMouseLeave={this._onProgressMouseLeave}\n\t\t\t></div>\n\t\t\t<div\n\t\t\t\tclass=\"ui5-slider-scale-progress-hover-area\"\n\t\t\t\tstyle={this._progressStyle}\n\t\t\t\tonMouseEnter={this._onProgressMouseEnter}\n\t\t\t\tonMouseLeave={this._onProgressMouseLeave}\n\t\t\t></div>\n\t\t\t<slot></slot>\n\t\t</div>\n\t);\n}\n"]}
|
package/dist/SliderTemplate.js
CHANGED
|
@@ -9,7 +9,7 @@ const _handlePosition = (min, max, value) => {
|
|
|
9
9
|
};
|
|
10
10
|
const handle = (slider) => {
|
|
11
11
|
const position = _handlePosition(slider.min, slider.max, slider.value);
|
|
12
|
-
return (_jsxs(_Fragment, { children: [_jsx(SliderHandle, { "data-sap-focus-ref": true, value: slider.value, min: slider.min, max: slider.max, tabIndex: slider.disabled ? -1 : 0, "aria-orientation": "horizontal", part: "handle", exportparts: "icon: handle-icon", role: "slider", "aria-valuemin": slider.min, "aria-valuemax": slider.max, "aria-valuenow": slider.value, "aria-label": slider._ariaLabel, "aria-disabled": slider._ariaDisabled, "aria-
|
|
12
|
+
return (_jsxs(_Fragment, { children: [_jsx(SliderHandle, { "data-sap-focus-ref": true, value: slider.value, min: slider.min, max: slider.max, tabIndex: slider.disabled ? -1 : 0, "aria-orientation": "horizontal", part: "handle", exportparts: "icon: handle-icon", role: "slider", "aria-valuemin": slider.min, "aria-valuemax": slider.max, "aria-valuenow": slider.value, "aria-label": slider._ariaLabel, "aria-disabled": slider._ariaDisabled, "aria-describedby": slider._ariaDescribedByHandleText, style: {
|
|
13
13
|
"inset-inline-start": `clamp(0%, ${position}%, 100%)`,
|
|
14
14
|
} }), tooltip(slider)] }));
|
|
15
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SliderTemplate.js","sourceRoot":"","sources":["../src/SliderTemplate.tsx"],"names":[],"mappings":";AACA,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAE3C,MAAM,eAAe,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,KAAa,EAAE,EAAE;IACnE,MAAM,KAAK,GAAG,GAAG,GAAG,GAAG,CAAC;IACxB,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC;IAC/C,OAAO,QAAQ,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,CAAC,MAAc,EAAE,EAAE;IACjC,MAAM,QAAQ,GAAG,eAAe,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAEvE,OAAO,CACN,8BACC,KAAC,YAAY,gCAEZ,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,GAAG,EAAE,MAAM,CAAC,GAAG,EACf,GAAG,EAAE,MAAM,CAAC,GAAG,EACf,QAAQ,EAAE,MAAM,CAAC,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AC,KAAK,EACpB,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,UAAU,EAAE,IAAI,CAAC,GAAG,EACpB,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,UAAU,EAAE,IAAI,CAAC,WAAW,EAC5B,SAAS,EAAE,IAAI,CAAC,UAAU,EAC1B,IAAI,EAAC,OAAO,EACZ,WAAW,EAAC,wCAAwC,aAEnD,MAAM,CAAC,IAAI,CAAC,EAEZ,IAAI,CAAC,eAAe,IAAI,4BACxB,eAAM,EAAE,EAAC,sBAAsB,EAAC,KAAK,EAAC,iBAAiB,YAAE,IAAI,CAAC,yBAAyB,GAAQ,GAC7F,IACU,GACT,GACJ,CACH,CAAC;AACH,CAAC","sourcesContent":["import type Slider from \"./Slider.js\";\nimport SliderTooltip from \"./SliderTooltip.js\";\nimport SliderHandle from \"./SliderHandle.js\";\nimport SliderScale from \"./SliderScale.js\";\n\nconst _handlePosition = (min: number, max: number, value: number) => {\n\tconst range = max - min;\n\tconst position = ((value - min) / range) * 100;\n\treturn position;\n};\n\nconst handle = (slider: Slider) => {\n\tconst position = _handlePosition(slider.min, slider.max, slider.value);\n\n\treturn (\n\t\t<>\n\t\t\t<SliderHandle\n\t\t\t\tdata-sap-focus-ref\n\t\t\t\tvalue={slider.value}\n\t\t\t\tmin={slider.min}\n\t\t\t\tmax={slider.max}\n\t\t\t\ttabIndex={slider.disabled ? -1 : 0}\n\t\t\t\taria-orientation=\"horizontal\"\n\t\t\t\tpart=\"handle\"\n\t\t\t\texportparts=\"icon: handle-icon\"\n\t\t\t\trole=\"slider\"\n\t\t\t\taria-valuemin={slider.min}\n\t\t\t\taria-valuemax={slider.max}\n\t\t\t\taria-valuenow={slider.value}\n\t\t\t\taria-label={slider._ariaLabel}\n\t\t\t\taria-disabled={slider._ariaDisabled}\n\t\t\t\taria-describedby={slider._ariaDescribedByHandleText}\n\t\t\t\tstyle={{\n\t\t\t\t\t\"inset-inline-start\": `clamp(0%, ${position}%, 100%)`,\n\t\t\t\t}}\n\t\t\t></SliderHandle>\n\n\t\t\t{tooltip(slider)}\n\t\t</>\n\t);\n};\n\nconst tooltip = (slider: Slider) => (\n\t<SliderTooltip\n\t\topen={slider._tooltipsOpen}\n\t\tvalue={slider.tooltipValue}\n\t\tmin={slider.min}\n\t\tmax={slider.max}\n\t\teditable={slider.editableTooltip}\n\t\tfollowRef={slider.shadowRoot?.querySelector(\"[ui5-slider-handle]\") as HTMLElement}\n\t\tvalueState={slider.tooltipValueState}\n\t\tonChange={slider._onTooltipChange}\n\t\tonKeyDown={slider._onTooltipKeydown}\n\t\tonFocusChange={slider._onTooltipFocusChange}\n\t\tonOpen={slider._onTooltipOpen}\n\t\tonInput={slider._onTooltipInput}\n\t>\n\t</SliderTooltip>\n);\n\nexport default function SliderTemplate(this: Slider) {\n\treturn (\n\t\t<>\n\t\t\t<div\n\t\t\t\tclass=\"ui5-slider-evo-root\"\n\t\t\t\tpart=\"root-container\"\n\t\t\t\tonMouseDown={this._onmousedown}\n\t\t\t\tonTouchStart={this._onmousedown}\n\t\t\t\tonMouseOver={this._onmouseover}\n\t\t\t\tonMouseOut={this._onmouseout}\n\t\t\t\tonKeyDown={this._onkeydown}\n\t\t\t\tonKeyUp={this._onkeyup}\n\t\t\t>\n\t\t\t\t<SliderScale\n\t\t\t\t\tendValue={this.value}\n\t\t\t\t\tmin={this.min}\n\t\t\t\t\tmax={this.max}\n\t\t\t\t\tstep={this.step}\n\t\t\t\t\tstartValue={this.min}\n\t\t\t\t\tshowTickmarks={this.showTickmarks}\n\t\t\t\t\tlabelInterval={this.labelInterval}\n\t\t\t\t\tonFocusOut={this._onfocusout}\n\t\t\t\t\tonFocusIn={this._onfocusin}\n\t\t\t\t\tpart=\"scale\"\n\t\t\t\t\texportparts=\"inner: scale-inner, progress: progress\"\n\t\t\t\t>\n\t\t\t\t\t{handle(this)}\n\n\t\t\t\t\t{this.editableTooltip && <>\n\t\t\t\t\t\t<span id=\"ui5-slider-InputDesc\" class=\"ui5-hidden-text\">{this._ariaDescribedByInputText}</span>\n\t\t\t\t\t</>}\n\t\t\t\t</SliderScale>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"]}
|
package/dist/Table.d.ts
CHANGED
|
@@ -326,6 +326,7 @@ declare class Table extends UI5Element {
|
|
|
326
326
|
};
|
|
327
327
|
};
|
|
328
328
|
get _gridTemplateColumns(): string | undefined;
|
|
329
|
+
get _hasFlexibleColumns(): boolean;
|
|
329
330
|
get _isRowSelectorRequired(): boolean | undefined;
|
|
330
331
|
get _scrollContainer(): HTMLElement;
|
|
331
332
|
get _stickyElements(): (TableHeaderRow | TableHeaderCell)[];
|
package/dist/Table.js
CHANGED
|
@@ -181,8 +181,9 @@ let Table = Table_1 = class Table extends UI5Element {
|
|
|
181
181
|
onBeforeRendering() {
|
|
182
182
|
this._renderNavigated = this.rows.some(row => row.navigated);
|
|
183
183
|
[...this.headerRow, ...this.rows].forEach((row, index) => {
|
|
184
|
+
row._rowActionCount = this.rows.length > 0 ? this.rowActionCount : 0;
|
|
184
185
|
row._renderNavigated = this._renderNavigated;
|
|
185
|
-
row.
|
|
186
|
+
row._renderDummyCell = !this._hasFlexibleColumns;
|
|
186
187
|
row._alternate = this.alternateRowColors && index % 2 === 0;
|
|
187
188
|
});
|
|
188
189
|
this.style.setProperty("--ui5_grid_sticky_top", this.stickyTop);
|
|
@@ -346,16 +347,28 @@ let Table = Table_1 = class Table extends UI5Element {
|
|
|
346
347
|
}
|
|
347
348
|
return width;
|
|
348
349
|
}));
|
|
350
|
+
// Dummy Cell Width (before actions when popin, after navigated otherwise)
|
|
351
|
+
const dummyColumnWidth = !this._hasFlexibleColumns ? "minmax(0, 1fr)" : "";
|
|
352
|
+
const hasPopinCells = this.headerRow[0]._popinCells.length > 0;
|
|
353
|
+
if (dummyColumnWidth && hasPopinCells) {
|
|
354
|
+
widths.push(dummyColumnWidth);
|
|
355
|
+
}
|
|
349
356
|
// Row Action Cell Width
|
|
350
|
-
if (this.rowActionCount > 0) {
|
|
357
|
+
if (this.rowActionCount > 0 && this.rows.length > 0) {
|
|
351
358
|
widths.push(`calc(var(--_ui5_button_base_min_width) * ${this.rowActionCount} + var(--_ui5_table_row_actions_gap) * ${this.rowActionCount - 1} + var(--_ui5_table_cell_horizontal_padding) * 2)`);
|
|
352
359
|
}
|
|
353
360
|
// Navigated Cell Width
|
|
354
361
|
if (this._renderNavigated) {
|
|
355
362
|
widths.push(`var(--_ui5_table_navigated_cell_width)`);
|
|
356
363
|
}
|
|
364
|
+
if (dummyColumnWidth && !hasPopinCells) {
|
|
365
|
+
widths.push(dummyColumnWidth);
|
|
366
|
+
}
|
|
357
367
|
return widths.join(" ");
|
|
358
368
|
}
|
|
369
|
+
get _hasFlexibleColumns() {
|
|
370
|
+
return this.headerRow?.[0]?._visibleCells.some(cell => !isValidColumnWidth(cell.width));
|
|
371
|
+
}
|
|
359
372
|
get _isRowSelectorRequired() {
|
|
360
373
|
return this.rows.length > 0 && this._getSelection()?.isRowSelectorRequired();
|
|
361
374
|
}
|
|
@@ -387,7 +400,7 @@ let Table = Table_1 = class Table extends UI5Element {
|
|
|
387
400
|
if (this._isRowSelectorRequired) {
|
|
388
401
|
ariaColCount++;
|
|
389
402
|
}
|
|
390
|
-
if (this.rowActionCount > 0) {
|
|
403
|
+
if (this.rowActionCount > 0 && this.rows.length > 0) {
|
|
391
404
|
ariaColCount++;
|
|
392
405
|
}
|
|
393
406
|
if (this.headerRow[0]._popinCells.length > 0) {
|