@ui5/webcomponents 2.20.0-rc.1 → 2.20.0-rc.3
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 +42 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/Avatar.d.ts +4 -0
- package/dist/Avatar.js.map +1 -1
- package/dist/AvatarGroup.js +2 -0
- package/dist/AvatarGroup.js.map +1 -1
- package/dist/AvatarGroupTemplate.js +8 -1
- package/dist/AvatarGroupTemplate.js.map +1 -1
- package/dist/Carousel.d.ts +2 -2
- package/dist/Carousel.js +1 -1
- package/dist/Carousel.js.map +1 -1
- package/dist/ComboBox.d.ts +48 -0
- package/dist/ComboBox.js +91 -6
- package/dist/ComboBox.js.map +1 -1
- package/dist/ComboBoxItem.d.ts +27 -0
- package/dist/ComboBoxItem.js +4 -0
- package/dist/ComboBoxItem.js.map +1 -1
- package/dist/DatePicker.d.ts +7 -0
- package/dist/DatePicker.js +10 -0
- package/dist/DatePicker.js.map +1 -1
- package/dist/DatePickerInputTemplate.js +1 -1
- package/dist/DatePickerInputTemplate.js.map +1 -1
- package/dist/DateTimeInput.d.ts +1 -0
- package/dist/DateTimeInput.js +1 -0
- package/dist/DateTimeInput.js.map +1 -1
- package/dist/DayPicker.js +6 -6
- package/dist/DayPicker.js.map +1 -1
- package/dist/Icon.js +1 -1
- package/dist/Icon.js.map +1 -1
- package/dist/Input.js +1 -1
- package/dist/Input.js.map +1 -1
- package/dist/Link.js +1 -1
- package/dist/Link.js.map +1 -1
- package/dist/List.d.ts +1 -0
- package/dist/List.js +17 -2
- package/dist/List.js.map +1 -1
- package/dist/ListItem.js +1 -1
- package/dist/ListItem.js.map +1 -1
- package/dist/ListItemCustom.d.ts +2 -2
- package/dist/ListItemCustom.js +2 -2
- package/dist/ListItemCustom.js.map +1 -1
- package/dist/MonthPicker.js +2 -2
- package/dist/MonthPicker.js.map +1 -1
- package/dist/MultiComboBox.d.ts +19 -1
- package/dist/MultiComboBox.js +52 -7
- package/dist/MultiComboBox.js.map +1 -1
- package/dist/MultiComboBoxItem.d.ts +12 -0
- package/dist/MultiComboBoxItem.js +3 -0
- package/dist/MultiComboBoxItem.js.map +1 -1
- package/dist/Option.d.ts +2 -0
- package/dist/Option.js.map +1 -1
- package/dist/RatingIndicator.d.ts +2 -4
- package/dist/RatingIndicator.js +18 -9
- package/dist/RatingIndicator.js.map +1 -1
- package/dist/RatingIndicatorTemplate.js +6 -6
- package/dist/RatingIndicatorTemplate.js.map +1 -1
- package/dist/Slider.d.ts +13 -20
- package/dist/Slider.js +48 -74
- package/dist/Slider.js.map +1 -1
- package/dist/SliderHandle.d.ts +61 -0
- package/dist/SliderHandle.js +104 -0
- package/dist/SliderHandle.js.map +1 -0
- package/dist/SliderHandleTemplate.d.ts +2 -0
- package/dist/SliderHandleTemplate.js +7 -0
- package/dist/SliderHandleTemplate.js.map +1 -0
- package/dist/SliderScale.d.ts +138 -0
- package/dist/SliderScale.js +300 -0
- package/dist/SliderScale.js.map +1 -0
- package/dist/SliderScaleTemplate.d.ts +2 -0
- package/dist/SliderScaleTemplate.js +11 -0
- package/dist/SliderScaleTemplate.js.map +1 -0
- package/dist/SliderTemplate.d.ts +0 -2
- package/dist/SliderTemplate.js +16 -14
- package/dist/SliderTemplate.js.map +1 -1
- package/dist/SliderTooltip.js +0 -4
- package/dist/SliderTooltip.js.map +1 -1
- package/dist/Tab.js +1 -1
- package/dist/Tab.js.map +1 -1
- package/dist/TabContainer.js +2 -2
- package/dist/TabContainer.js.map +1 -1
- package/dist/Table.js +2 -2
- package/dist/Table.js.map +1 -1
- package/dist/TableCell.js +2 -0
- package/dist/TableCell.js.map +1 -1
- package/dist/TableDragAndDrop.js +1 -1
- package/dist/TableDragAndDrop.js.map +1 -1
- package/dist/TableHeaderCell.js +1 -0
- package/dist/TableHeaderCell.js.map +1 -1
- package/dist/TableRow.d.ts +2 -2
- package/dist/TableRow.js +19 -7
- package/dist/TableRow.js.map +1 -1
- package/dist/TableRowActionBase.d.ts +2 -2
- package/dist/TableRowActionBase.js.map +1 -1
- package/dist/TableRowActionNavigation.d.ts +4 -0
- package/dist/TableRowActionNavigation.js +4 -0
- package/dist/TableRowActionNavigation.js.map +1 -1
- package/dist/TableRowTemplate.js +1 -1
- package/dist/TableRowTemplate.js.map +1 -1
- package/dist/TextArea.js +1 -1
- package/dist/TextArea.js.map +1 -1
- package/dist/TimePickerClock.js +1 -1
- package/dist/TimePickerClock.js.map +1 -1
- package/dist/TimePickerInternals.js +2 -2
- package/dist/TimePickerInternals.js.map +1 -1
- package/dist/Tokenizer.js +16 -4
- package/dist/Tokenizer.js.map +1 -1
- package/dist/ToolbarItem.d.ts +26 -3
- package/dist/ToolbarItem.js +46 -28
- package/dist/ToolbarItem.js.map +1 -1
- package/dist/ToolbarSpacer.js +0 -2
- package/dist/ToolbarSpacer.js.map +1 -1
- package/dist/ToolbarTemplate.js +2 -1
- package/dist/ToolbarTemplate.js.map +1 -1
- package/dist/YearPicker.js +2 -2
- package/dist/YearPicker.js.map +1 -1
- package/dist/YearRangePicker.js +2 -2
- package/dist/YearRangePicker.js.map +1 -1
- package/dist/bundle.esm.js +2 -0
- package/dist/bundle.esm.js.map +1 -1
- package/dist/css/themes/AvatarGroup.css +1 -1
- package/dist/css/themes/ColorPicker.css +1 -1
- package/dist/css/themes/DatePicker.css +1 -1
- package/dist/css/themes/DateTimePicker.css +1 -1
- package/dist/css/themes/Form.css +1 -1
- package/dist/css/themes/FormItemSpan.css +1 -1
- package/dist/css/themes/ProgressIndicator.css +1 -1
- package/dist/css/themes/Slider.css +1 -0
- package/dist/css/themes/SliderHandle.css +1 -0
- package/dist/css/themes/SliderScale.css +1 -0
- package/dist/css/themes/TableCellBase.css +1 -1
- package/dist/css/themes/TableRow.css +1 -1
- package/dist/css/themes/Toolbar.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_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -2
- package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -2
- package/dist/custom-elements-internal.json +18567 -17870
- package/dist/custom-elements.json +16024 -15650
- package/dist/dynamic-date-range-options/DateRange.d.ts +1 -0
- package/dist/dynamic-date-range-options/DateRange.js +1 -0
- package/dist/dynamic-date-range-options/DateRange.js.map +1 -1
- package/dist/dynamic-date-range-options/DateTimeRange.d.ts +1 -0
- package/dist/dynamic-date-range-options/DateTimeRange.js +1 -0
- package/dist/dynamic-date-range-options/DateTimeRange.js.map +1 -1
- package/dist/dynamic-date-range-options/FromDateTime.d.ts +1 -0
- package/dist/dynamic-date-range-options/FromDateTime.js +1 -0
- package/dist/dynamic-date-range-options/FromDateTime.js.map +1 -1
- package/dist/dynamic-date-range-options/LastOptions.d.ts +1 -0
- package/dist/dynamic-date-range-options/LastOptions.js +1 -0
- package/dist/dynamic-date-range-options/LastOptions.js.map +1 -1
- package/dist/dynamic-date-range-options/NextOptions.d.ts +1 -0
- package/dist/dynamic-date-range-options/NextOptions.js +1 -0
- package/dist/dynamic-date-range-options/NextOptions.js.map +1 -1
- package/dist/dynamic-date-range-options/SingleDate.d.ts +1 -0
- package/dist/dynamic-date-range-options/SingleDate.js +1 -0
- package/dist/dynamic-date-range-options/SingleDate.js.map +1 -1
- package/dist/dynamic-date-range-options/ToDateTime.d.ts +1 -0
- package/dist/dynamic-date-range-options/ToDateTime.js +1 -0
- package/dist/dynamic-date-range-options/ToDateTime.js.map +1 -1
- package/dist/dynamic-date-range-options/Today.d.ts +1 -0
- package/dist/dynamic-date-range-options/Today.js +1 -0
- package/dist/dynamic-date-range-options/Today.js.map +1 -1
- package/dist/dynamic-date-range-options/Tomorrow.d.ts +1 -0
- package/dist/dynamic-date-range-options/Tomorrow.js +1 -0
- package/dist/dynamic-date-range-options/Tomorrow.js.map +1 -1
- package/dist/dynamic-date-range-options/Yesterday.d.ts +1 -0
- package/dist/dynamic-date-range-options/Yesterday.js +1 -0
- package/dist/dynamic-date-range-options/Yesterday.js.map +1 -1
- package/dist/generated/assets/i18n/messagebundle_ar.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_bg.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ca.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cnr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cs.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cy.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_da.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_de.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_el.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_GB.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_es.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_es_MX.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_et.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hu.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_id.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_it.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_iw.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ja.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_kk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ko.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_mk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ms.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_nl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_no.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt_PT.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ro.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ru.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sh.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_th.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_tr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_uk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_vi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_CN.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_TW.json +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_dark/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 +2 -1
- package/dist/generated/i18n/i18n-defaults.js +3 -2
- package/dist/generated/i18n/i18n-defaults.js.map +1 -1
- package/dist/generated/themes/AvatarGroup.css.d.ts +1 -1
- package/dist/generated/themes/AvatarGroup.css.js +1 -1
- package/dist/generated/themes/AvatarGroup.css.js.map +1 -1
- package/dist/generated/themes/ColorPicker.css.d.ts +1 -1
- package/dist/generated/themes/ColorPicker.css.js +1 -1
- package/dist/generated/themes/ColorPicker.css.js.map +1 -1
- package/dist/generated/themes/DatePicker.css.d.ts +1 -1
- package/dist/generated/themes/DatePicker.css.js +1 -1
- package/dist/generated/themes/DatePicker.css.js.map +1 -1
- package/dist/generated/themes/DateTimePicker.css.d.ts +1 -1
- package/dist/generated/themes/DateTimePicker.css.js +1 -1
- package/dist/generated/themes/DateTimePicker.css.js.map +1 -1
- package/dist/generated/themes/Form.css.d.ts +1 -1
- package/dist/generated/themes/Form.css.js +1 -1
- package/dist/generated/themes/Form.css.js.map +1 -1
- package/dist/generated/themes/FormItemSpan.css.d.ts +1 -1
- package/dist/generated/themes/FormItemSpan.css.js +1 -1
- package/dist/generated/themes/FormItemSpan.css.js.map +1 -1
- package/dist/generated/themes/ProgressIndicator.css.d.ts +1 -1
- package/dist/generated/themes/ProgressIndicator.css.js +1 -1
- package/dist/generated/themes/ProgressIndicator.css.js.map +1 -1
- package/dist/generated/themes/Slider.css.d.ts +2 -0
- package/dist/generated/themes/Slider.css.js +8 -0
- package/dist/generated/themes/Slider.css.js.map +1 -0
- package/dist/generated/themes/SliderHandle.css.d.ts +2 -0
- package/dist/generated/themes/SliderHandle.css.js +8 -0
- package/dist/generated/themes/SliderHandle.css.js.map +1 -0
- package/dist/generated/themes/SliderScale.css.d.ts +2 -0
- package/dist/generated/themes/SliderScale.css.js +8 -0
- package/dist/generated/themes/SliderScale.css.js.map +1 -0
- package/dist/generated/themes/TableCellBase.css.d.ts +1 -1
- package/dist/generated/themes/TableCellBase.css.js +1 -1
- package/dist/generated/themes/TableCellBase.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/Toolbar.css.d.ts +1 -1
- package/dist/generated/themes/Toolbar.css.js +1 -1
- package/dist/generated/themes/Toolbar.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_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_hcb/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -2
- 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 -2
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/types/AvatarMode.d.ts +1 -3
- package/dist/types/AvatarMode.js +1 -3
- package/dist/types/AvatarMode.js.map +1 -1
- package/dist/types/TableOverflowMode.d.ts +1 -2
- package/dist/types/TableOverflowMode.js +1 -2
- package/dist/types/TableOverflowMode.js.map +1 -1
- package/dist/vscode.html-custom-data.json +2715 -1973
- package/dist/web-types.json +5842 -4360
- package/package.json +12 -10
- package/src/AvatarGroupTemplate.tsx +8 -1
- package/src/DatePickerInputTemplate.tsx +1 -0
- package/src/RatingIndicatorTemplate.tsx +6 -6
- package/src/SliderHandleTemplate.tsx +15 -0
- package/src/SliderScaleTemplate.tsx +32 -0
- package/src/SliderTemplate.tsx +85 -64
- package/src/TableRowTemplate.tsx +0 -1
- package/src/ToolbarTemplate.tsx +2 -1
- package/src/i18n/messagebundle.properties +3 -0
- package/src/i18n/messagebundle_ar.properties +3 -3
- package/src/i18n/messagebundle_bg.properties +3 -3
- package/src/i18n/messagebundle_ca.properties +3 -3
- package/src/i18n/messagebundle_cnr.properties +3 -3
- package/src/i18n/messagebundle_cs.properties +3 -3
- package/src/i18n/messagebundle_cy.properties +3 -3
- package/src/i18n/messagebundle_da.properties +3 -3
- package/src/i18n/messagebundle_de.properties +3 -3
- package/src/i18n/messagebundle_el.properties +3 -3
- package/src/i18n/messagebundle_en.properties +3 -3
- package/src/i18n/messagebundle_en_GB.properties +3 -3
- package/src/i18n/messagebundle_es.properties +3 -3
- package/src/i18n/messagebundle_es_MX.properties +3 -3
- package/src/i18n/messagebundle_et.properties +3 -3
- package/src/i18n/messagebundle_fi.properties +3 -3
- package/src/i18n/messagebundle_fr.properties +3 -3
- package/src/i18n/messagebundle_fr_CA.properties +3 -3
- package/src/i18n/messagebundle_hi.properties +3 -3
- package/src/i18n/messagebundle_hr.properties +3 -3
- package/src/i18n/messagebundle_hu.properties +3 -3
- package/src/i18n/messagebundle_id.properties +3 -3
- package/src/i18n/messagebundle_it.properties +3 -3
- package/src/i18n/messagebundle_iw.properties +3 -3
- package/src/i18n/messagebundle_ja.properties +3 -3
- package/src/i18n/messagebundle_kk.properties +4 -4
- package/src/i18n/messagebundle_ko.properties +3 -3
- package/src/i18n/messagebundle_lt.properties +3 -3
- package/src/i18n/messagebundle_lv.properties +3 -3
- package/src/i18n/messagebundle_mk.properties +3 -3
- package/src/i18n/messagebundle_ms.properties +3 -3
- package/src/i18n/messagebundle_nl.properties +3 -3
- package/src/i18n/messagebundle_no.properties +3 -3
- package/src/i18n/messagebundle_pl.properties +3 -3
- package/src/i18n/messagebundle_pt.properties +3 -3
- package/src/i18n/messagebundle_pt_PT.properties +3 -3
- package/src/i18n/messagebundle_ro.properties +3 -3
- package/src/i18n/messagebundle_ru.properties +3 -3
- package/src/i18n/messagebundle_sh.properties +3 -3
- package/src/i18n/messagebundle_sk.properties +3 -3
- package/src/i18n/messagebundle_sl.properties +3 -3
- package/src/i18n/messagebundle_sr.properties +3 -3
- package/src/i18n/messagebundle_sv.properties +8 -8
- package/src/i18n/messagebundle_th.properties +3 -3
- package/src/i18n/messagebundle_tr.properties +3 -3
- package/src/i18n/messagebundle_uk.properties +3 -3
- package/src/i18n/messagebundle_vi.properties +3 -3
- package/src/i18n/messagebundle_zh_CN.properties +3 -3
- package/src/i18n/messagebundle_zh_TW.properties +3 -3
- package/src/themes/AvatarGroup.css +24 -0
- package/src/themes/ColorPicker.css +23 -27
- package/src/themes/DatePicker.css +2 -2
- package/src/themes/DateTimePicker.css +2 -0
- package/src/themes/FormItemSpan.css +1 -1
- package/src/themes/ProgressIndicator.css +1 -0
- package/src/themes/Slider.css +32 -0
- package/src/themes/SliderHandle.css +61 -0
- package/src/themes/SliderScale.css +149 -0
- package/src/themes/TableCellBase.css +2 -1
- package/src/themes/TableRow.css +4 -6
- package/src/themes/Toolbar.css +6 -0
- package/src/themes/base/SliderHandle-parameters.css +3 -0
- package/src/themes/base/SliderScale-parameters.css +13 -0
- package/src/themes/sap_fiori_3/Slider-parameters.css +11 -0
- package/src/themes/sap_fiori_3/SliderHandle-parameters.css +5 -0
- package/src/themes/sap_fiori_3/SliderScale-parameters.css +13 -0
- package/src/themes/sap_fiori_3/parameters-bundle.css +2 -0
- package/src/themes/sap_fiori_3_dark/Slider-parameters.css +11 -0
- package/src/themes/sap_fiori_3_dark/SliderHandle-parameters.css +5 -0
- package/src/themes/sap_fiori_3_dark/SliderScale-parameters.css +13 -0
- package/src/themes/sap_fiori_3_dark/parameters-bundle.css +2 -0
- package/src/themes/sap_fiori_3_hcb/Slider-parameters.css +11 -0
- package/src/themes/sap_fiori_3_hcb/SliderHandle-parameters.css +5 -0
- package/src/themes/sap_fiori_3_hcb/SliderScale-parameters.css +14 -0
- package/src/themes/sap_fiori_3_hcb/parameters-bundle.css +2 -0
- package/src/themes/sap_fiori_3_hcw/Slider-parameters.css +11 -0
- package/src/themes/sap_fiori_3_hcw/SliderHandle-parameters.css +5 -0
- package/src/themes/sap_fiori_3_hcw/SliderScale-parameters.css +14 -0
- package/src/themes/sap_fiori_3_hcw/parameters-bundle.css +2 -0
- package/src/themes/sap_horizon/AvatarGroup-parameters.css +20 -3
- package/src/themes/sap_horizon/Slider-parameters.css +11 -0
- package/src/themes/sap_horizon/SliderHandle-parameters.css +5 -0
- package/src/themes/sap_horizon/SliderScale-parameters.css +10 -0
- package/src/themes/sap_horizon/parameters-bundle.css +3 -0
- package/src/themes/sap_horizon/rtl-parameters.css +4 -0
- package/src/themes/sap_horizon_dark/Slider-parameters.css +11 -0
- package/src/themes/sap_horizon_dark/SliderHandle-parameters.css +5 -0
- package/src/themes/sap_horizon_dark/SliderScale-parameters.css +10 -0
- package/src/themes/sap_horizon_dark/parameters-bundle.css +3 -0
- package/src/themes/sap_horizon_dark/rtl-parameters.css +6 -0
- package/src/themes/sap_horizon_hcb/Slider-parameters.css +11 -0
- package/src/themes/sap_horizon_hcb/SliderHandle-parameters.css +5 -0
- package/src/themes/sap_horizon_hcb/SliderScale-parameters.css +10 -0
- package/src/themes/sap_horizon_hcb/parameters-bundle.css +3 -1
- package/src/themes/sap_horizon_hcb/rtl-parameters.css +1 -0
- package/src/themes/sap_horizon_hcw/Slider-parameters.css +11 -0
- package/src/themes/sap_horizon_hcw/SliderHandle-parameters.css +5 -0
- package/src/themes/sap_horizon_hcw/SliderScale-parameters.css +10 -0
- package/src/themes/sap_horizon_hcw/parameters-bundle.css +3 -1
- package/src/themes/sap_horizon_hcw/rtl-parameters.css +1 -0
package/dist/Slider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.js","sourceRoot":"","sources":["../src/Slider.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAC;AAGtE,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAGzC,WAAW;AACX,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAGjD,QAAQ;AACR,OAAO,EACN,uBAAuB,EACvB,gCAAgC,EAChC,0BAA0B,GAC1B,MAAM,mCAAmC,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAOH,IAAM,MAAM,cAAZ,MAAM,MAAO,SAAQ,UAAU;IAuB9B,IAAI,kBAAkB;QACrB,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;IAC9B,CAAC;IAKD;QACC,KAAK,EAAE,C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C,CAAC;QAC9D,CAAC;QAED,OAAO,GAAG,CAAC;IACZ,CAAC;CACD,CAAA;AArUA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qCACjB;AAGV;IADC,QAAQ,EAAE;iDACiC;AAG5C;IADC,QAAQ,EAAE;4CACO;AAaX;IADN,IAAI,CAAC,oBAAoB,CAAC;gCACG;AA5BzB,MAAM;IANX,aAAa,CAAC;QACd,GAAG,EAAE,YAAY;QACjB,aAAa,EAAE,IAAI;QACnB,cAAc,EAAE,IAAI;QACpB,QAAQ,EAAE,cAAc;KACxB,CAAC;GACI,MAAM,CA8UX;AAED,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,eAAe,MAAM,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { isEscape, isF2 } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport type { IFormInputElement } from \"@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js\";\nimport type ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport SliderBase from \"./SliderBase.js\";\nimport type SliderTooltip from \"./SliderTooltip.js\";\n\n// Template\nimport SliderTemplate from \"./SliderTemplate.js\";\nimport type { SliderTooltipChangeEventDetails } from \"./SliderTooltip.js\";\n\n// Texts\nimport {\n\tSLIDER_ARIA_DESCRIPTION,\n\tSLIDER_TOOLTIP_INPUT_DESCRIPTION,\n\tSLIDER_TOOLTIP_INPUT_LABEL,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n/**\n * @class\n *\n * ### Overview\n * The Slider component represents a numerical range and a handle (grip).\n * The purpose of the component is to enable visual selection of a value in\n * a continuous numerical range by moving an adjustable handle.\n *\n * ### Structure\n * The most important properties of the Slider are:\n *\n * - min - The minimum value of the slider range.\n * - max - The maximum value of the slider range.\n * - value - The current value of the slider range.\n * - step - Determines the increments in which the slider will move.\n * - showTooltip - Determines if a tooltip should be displayed above the handle.\n * - showTickmarks - Displays a visual divider between the step values.\n * - labelInterval - Labels some or all of the tickmarks with their values.\n *\n * ### Usage\n * The most common use case is to select values on a continuous numerical scale (e.g. temperature, volume, etc. ).\n *\n * ### Responsive Behavior\n * The `ui5-slider` component adjusts to the size of its parent container by recalculating and\n * resizing the width of the control. You can move the slider handle in several different ways:\n *\n * - Drag and drop the handle to the desired value.\n * - Click/tap on the range bar to move the handle to that location.\n *\n * ### Keyboard Handling\n *\n * - `Left or Down Arrow` - Moves the handle one step to the left, effectively decreasing the component's value by `step` amount;\n * - `Right or Up Arrow` - Moves the handle one step to the right, effectively increasing the component's value by `step` amount;\n * - `Left or Down Arrow + Ctrl/Cmd` - Moves the handle to the left with step equal to 1/10th of the entire range, effectively decreasing the component's value by 1/10th of the range;\n * - `Right or Up Arrow + Ctrl/Cmd` - Moves the handle to the right with step equal to 1/10th of the entire range, effectively increasing the component's value by 1/10th of the range;\n * - `Plus` - Same as `Right or Up Arrow`;\n * - `Minus` - Same as `Left or Down Arrow`;\n * - `Home` - Moves the handle to the beginning of the range;\n * - `End` - Moves the handle to the end of the range;\n * - `Page Up` - Same as `Right or Up + Ctrl/Cmd`;\n * - `Page Down` - Same as `Left or Down + Ctrl/Cmd`;\n * - `Escape` - Resets the value property after interaction, to the position prior the component's focusing;\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/Slider.js\";`\n * @constructor\n * @extends SliderBase\n * @since 1.0.0-rc.11\n * @public\n * @csspart progress-container - Used to style the progress container, the horizontal bar that visually represents the range between the minimum and maximum values, of the `ui5-slider`.\n * @csspart progress-bar - Used to style the progress bar, which shows the progress of the `ui5-slider`.\n * @csspart handle - Used to style the handle of the `ui5-slider`.\n */\n@customElement({\n\ttag: \"ui5-slider\",\n\tlanguageAware: true,\n\tformAssociated: true,\n\ttemplate: SliderTemplate,\n})\nclass Slider extends SliderBase implements IFormInputElement {\n\t/**\n\t * Current value of the slider\n\t * @default 0\n\t * @formEvents change input\n\t * @formProperty\n\t * @public\n\t */\n\t@property({ type: Number })\n\tvalue = 0;\n\n\t@property()\n\ttooltipValueState: `${ValueState}` = \"None\";\n\n\t@property()\n\ttooltipValue = \"\";\n\n\t_valueInitial?: number;\n\t_valueOnInteractionStart?: number;\n\t_progressPercentage = 0;\n\t_handlePositionFromStart = 0;\n\t_lastValidInputValue: string;\n\n\tget formFormattedValue() {\n\t\treturn this.value.toString();\n\t}\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._stateStorage.value = undefined;\n\t\tthis._lastValidInputValue = this.min.toString();\n\t}\n\n\t/**\n\t *\n\t * Check if the previously saved state is outdated. That would mean\n\t * either it is the initial rendering or that a property has been changed\n\t * programmatically - because the previous state is always updated in\n\t * the interaction handlers.\n\t *\n\t * Normalize current properties, update the previously stored state.\n\t * Update the visual UI representation of the Slider.\n\t *\n\t */\n\tonBeforeRendering() {\n\t\tif (!this.isCurrentStateOutdated()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.notResized = true;\n\t\tthis.syncUIAndState();\n\t\tthis._updateHandleAndProgress(this.value);\n\t}\n\n\tonAfterRendering(): void {\n\t\tsuper.onAfterRendering();\n\n\t\tthis.tooltip?.repositionTooltip();\n\t}\n\n\tsyncUIAndState() {\n\t\t// Validate step and update the stored state for the step property.\n\t\tif (this.isPropertyUpdated(\"step\")) {\n\t\t\tthis._validateStep(this.step);\n\t\t\tthis.storePropertyState(\"step\");\n\t\t}\n\n\t\t// Recalculate the tickmarks and labels and update the stored state.\n\t\tif (this.isPropertyUpdated(\"min\", \"max\", \"value\")) {\n\t\t\tthis.storePropertyState(\"min\", \"max\");\n\n\t\t\t// Here the value props are changed programmatically (not by user interaction)\n\t\t\t// and it won't be \"stepified\" (rounded to the nearest step). 'Clip' them within\n\t\t\t// min and max bounderies and update the previous state reference.\n\t\t\tthis.value = SliderBase.clipValue(this.value, this._effectiveMin, this._effectiveMax);\n\t\t\tthis.updateStateStorageAndFireInputEvent(\"value\");\n\t\t\tthis.storePropertyState(\"value\");\n\t\t}\n\n\t\t// Labels must be updated if any of the min/max/step/labelInterval props are changed\n\t\tif (this.labelInterval && this.showTickmarks) {\n\t\t\tthis._createLabels();\n\t\t}\n\n\t\t// Update the stored state for the labelInterval, if changed\n\t\tif (this.isPropertyUpdated(\"labelInterval\")) {\n\t\t\tthis.storePropertyState(\"labelInterval\");\n\t\t}\n\t}\n\n\t/**\n\t * Called when the user starts interacting with the slider\n\t * @private\n\t */\n\t_onmousedown(e: TouchEvent | MouseEvent) {\n\t\t// If step is 0 no interaction is available because there is no constant\n\t\t// (equal for all user environments) quantitative representation of the value\n\t\tif (this.disabled || this.step === 0 || (e.target as HTMLElement).hasAttribute(\"ui5-slider-tooltip\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst newValue = this.handleDownBase(e);\n\t\tthis._valueOnInteractionStart = this.value;\n\n\t\t// Set initial value if one is not set previously on focus in.\n\t\t// It will be restored if ESC key is pressed.\n\t\tif (this._valueInitial === undefined) {\n\t\t\tthis._valueInitial = this.value;\n\t\t}\n\n\t\t// Do not yet update the Slider if press is over a handle. It will be updated if the user drags the mouse.\n\t\tconst ctor = this.constructor as typeof Slider;\n\t\tif (!this._isHandlePressed(ctor.getPageXValueFromEvent(e))) {\n\t\t\tthis._updateHandleAndProgress(newValue);\n\t\t\tthis.value = newValue;\n\t\t\tthis.updateStateStorageAndFireInputEvent(\"value\");\n\t\t}\n\t}\n\n\t_onfocusin() {\n\t\t// Set initial value if one is not set previously on focus in.\n\t\t// It will be restored if ESC key is pressed.\n\t\tif (this._valueInitial === undefined) {\n\t\t\tthis._valueInitial = this.value;\n\t\t}\n\n\t\tif (this.showTooltip) {\n\t\t\tthis._tooltipsOpen = true;\n\t\t}\n\t}\n\n\t_onfocusout(e: FocusEvent) {\n\t\t// Prevent focusout when the focus is getting set within the slider internal\n\t\t// element (on the handle), before the Slider' customElement itself is finished focusing\n\t\tif (this._isFocusing()) {\n\t\t\tthis._preventFocusOut();\n\t\t\treturn;\n\t\t}\n\n\t\t// Reset focus state and the stored Slider's initial\n\t\t// value that was saved when it was first focused in\n\t\tthis._valueInitial = undefined;\n\n\t\tif (this.showTooltip && !(e.relatedTarget as HTMLElement)?.hasAttribute(\"ui5-slider-tooltip\")) {\n\t\t\tthis._tooltipsOpen = false;\n\t\t}\n\t}\n\n\t_onTooltipChange(e: CustomEvent<SliderTooltipChangeEventDetails>) {\n\t\tconst value = parseFloat(e.detail.value);\n\t\tconst isInvalid = value < this._effectiveMin || value > this._effectiveMax;\n\n\t\tif (isInvalid) {\n\t\t\tthis.tooltipValueState = \"Negative\";\n\t\t\tthis.tooltipValue = `${value}`;\n\t\t\treturn;\n\t\t}\n\n\t\tthis.value = value;\n\t\tthis.fireDecoratorEvent(\"change\");\n\t}\n\n\t_onTooltipFocusChange() {\n\t\tconst value = parseFloat(this.tooltipValue);\n\t\tconst isInvalid = value < this._effectiveMin || value > this._effectiveMax;\n\n\t\tif (isInvalid) {\n\t\t\tthis.tooltipValueState = \"None\";\n\t\t\tthis.tooltipValue = this.value.toString();\n\t\t}\n\t}\n\n\t_onTooltipKeydown(e: KeyboardEvent) {\n\t\tif (isF2(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._sliderHandle.focus();\n\t\t}\n\t}\n\n\t_onTooltipOpen() {\n\t\tconst ctor = this.constructor as typeof Slider;\n\t\tconst stepPrecision = ctor._getDecimalPrecisionOfNumber(this._effectiveStep);\n\t\tthis.tooltipValue = this.value.toFixed(stepPrecision);\n\t}\n\n\t_onTooltipInput(e: CustomEvent) {\n\t\tthis.tooltipValue = e.detail.value;\n\t}\n\n\t/**\n\t * Called when the user moves the slider\n\t * @private\n\t */\n\t_handleMove(e: TouchEvent | MouseEvent) {\n\t\te.preventDefault();\n\n\t\t// If step is 0 no interaction is available because there is no constant\n\t\t// (equal for all user environments) quantitative representation of the value\n\t\tif (this.disabled || this._effectiveStep === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst ctor = this.constructor as typeof Slider;\n\t\tconst newValue = ctor.getValueFromInteraction(e, this._effectiveStep, this._effectiveMin, this._effectiveMax, this.getBoundingClientRect(), this.directionStart);\n\n\t\tthis._updateHandleAndProgress(newValue);\n\t\tthis.value = newValue;\n\t\tthis.tooltipValue = newValue.toString();\n\t\tthis.updateStateStorageAndFireInputEvent(\"value\");\n\t}\n\n\t/** Called when the user finish interacting with the slider\n\t * @private\n\t */\n\t_handleUp() {\n\t\tif (this._valueOnInteractionStart !== this.value) {\n\t\t\tthis.fireDecoratorEvent(\"change\");\n\t\t}\n\n\t\tthis.handleUpBase();\n\t\tthis._valueOnInteractionStart = undefined;\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tconst isActionKey = SliderBase._isActionKey(e);\n\n\t\tthis._onKeyupBase();\n\n\t\tif (isActionKey && this._valueOnInteractionStart !== this.value) {\n\t\t\tthis.fireDecoratorEvent(\"change\");\n\t\t}\n\n\t\tthis._valueOnInteractionStart = this.value;\n\t}\n\n\t/** Determines if the press is over the handle\n\t * @private\n\t */\n\t_isHandlePressed(clientX: number) {\n\t\tconst sliderHandleDomRect = this._sliderHandle.getBoundingClientRect();\n\t\treturn clientX >= sliderHandleDomRect.left && clientX <= sliderHandleDomRect.right;\n\t}\n\n\t/** Updates the UI representation of the progress bar and handle position\n\t * @private\n\t */\n\t_updateHandleAndProgress(newValue: number) {\n\t\tconst max = this._effectiveMax;\n\t\tconst min = this._effectiveMin;\n\n\t\t// The progress (completed) percentage of the slider.\n\t\tthis._progressPercentage = (newValue - min) / (max - min);\n\t\t// How many pixels from the left end of the slider will be the placed the affected by the user action handle\n\t\tthis._handlePositionFromStart = this._progressPercentage * 100;\n\t}\n\n\t_handleActionKeyPress(e: KeyboardEvent) {\n\t\tconst min = this._effectiveMin;\n\t\tconst max = this._effectiveMax;\n\t\tconst currentValue = this.value;\n\t\tconst ctor = this.constructor as typeof Slider;\n\t\tconst newValue = isEscape(e) ? this._valueInitial : ctor.clipValue(this._handleActionKeyPressBase(e, \"value\") + currentValue, min, max);\n\n\t\tif (newValue !== currentValue) {\n\t\t\tthis._updateHandleAndProgress(newValue!);\n\t\t\tthis.value = newValue!;\n\t\t\tthis.tooltipValue = this.value.toString();\n\t\t\tthis.updateStateStorageAndFireInputEvent(\"value\");\n\t\t}\n\t}\n\n\t_onTooltopForwardFocus(e: CustomEvent) {\n\t\tconst tooltip = e.target as SliderTooltip;\n\n\t\ttooltip.followRef?.focus();\n\t}\n\n\tget inputValue() {\n\t\treturn this.value.toString();\n\t}\n\n\tget tooltip() {\n\t\treturn this.getDomRef()?.querySelector<SliderTooltip>(\"[ui5-slider-tooltip]\");\n\t}\n\n\tget styles() {\n\t\treturn {\n\t\t\tprogress: {\n\t\t\t\t\"width\": `${this._handlePositionFromStart}%`,\n\t\t\t\t\"border\": this._handlePositionFromStart === 0 ? \"none\" : \"\",\n\t\t\t},\n\t\t\thandle: {\n\t\t\t\t[this.directionStart]: `${this._handlePositionFromStart}%`,\n\t\t\t},\n\t\t};\n\t}\n\n\tget _sliderHandle() : HTMLElement {\n\t\treturn this.shadowRoot!.querySelector(\".ui5-slider-handle\")!;\n\t}\n\n\tget _ariaDisabled() {\n\t\treturn this.disabled || undefined;\n\t}\n\n\tget _ariaLabelledByText() {\n\t\treturn Slider.i18nBundle.getText(SLIDER_ARIA_DESCRIPTION);\n\t}\n\n\tget _ariaDescribedByInputText() {\n\t\treturn Slider.i18nBundle.getText(SLIDER_TOOLTIP_INPUT_DESCRIPTION);\n\t}\n\n\tget _ariaLabelledByInputText() {\n\t\treturn Slider.i18nBundle.getText(SLIDER_TOOLTIP_INPUT_LABEL);\n\t}\n\n\tget tickmarksObject() {\n\t\tconst count = this._tickmarksCount;\n\t\tconst arr = [];\n\n\t\tif (this._hiddenTickmarks) {\n\t\t\treturn [true, false];\n\t\t}\n\n\t\tfor (let i = 0; i <= count; i++) {\n\t\t\tarr.push(this._effectiveMin + (i * this.step) <= this.value);\n\t\t}\n\n\t\treturn arr;\n\t}\n}\n\nSlider.define();\n\nexport default Slider;\n"]}
|
|
1
|
+
{"version":3,"file":"Slider.js","sourceRoot":"","sources":["../src/Slider.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAC;AAGtE,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAGzC,WAAW;AACX,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAEjD,OAAO,MAAM,MAAM,kCAAkC,CAAC;AAEtD,QAAQ;AACR,OAAO,EACN,uBAAuB,EACvB,gCAAgC,EAChC,0BAA0B,GAC1B,MAAM,mCAAmC,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAQH,IAAM,MAAM,cAAZ,MAAM,MAAO,SAAQ,UAAU;IAiC9B,IAAI,kBAAkB;QACrB,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;IAC9B,CAAC;IAKD;QACC,KAAK,EAAE,CAAC;QAxCT;;;;;;WAMG;QAEH,UAAK,GAAG,CAAC,CAAC;QAEV;;;;;;WAMG;QAEH,SAAI,GAAG,CAAC,CAAC;QAGT,sBAAiB,GAAoB,MAAM,CAAC;QAG5C,iBAAY,GAAG,EAAE,CAAC;QAIlB,wBAAmB,GAAG,CAAC,CAAC;QACxB,6BAAwB,GAAG,CAAC,CAAC;QAY5B,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACjD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AI,MAAM,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,oBAAoB,CAAC,EAAE,CAAC;YACxF,CAAC,CAAC,cAAc,EAAE,CAAC;YAEnB,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;YAC/B,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;QAC/B,CAAC;IACF,CAAC;CACD,CAAA;AAlSA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qCACjB;AAUV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oCAClB;AAGT;IADC,QAAQ,EAAE;iDACiC;AAG5C;IADC,QAAQ,EAAE;4CACO;AAaX;IADN,IAAI,CAAC,oBAAoB,CAAC;gCACG;AAtCzB,MAAM;IAPX,aAAa,CAAC;QACd,GAAG,EAAE,YAAY;QACjB,aAAa,EAAE,IAAI;QACnB,cAAc,EAAE,IAAI;QACpB,MAAM,EAAE,CAAC,MAAM,CAAC;QAChB,QAAQ,EAAE,cAAc;KACxB,CAAC;GACI,MAAM,CA2SX;AAED,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,eAAe,MAAM,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { isEscape, isF2 } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport type { IFormInputElement } from \"@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js\";\nimport type ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport SliderBase from \"./SliderBase.js\";\nimport type SliderTooltip from \"./SliderTooltip.js\";\n\n// Template\nimport SliderTemplate from \"./SliderTemplate.js\";\nimport type { SliderTooltipChangeEventDetails } from \"./SliderTooltip.js\";\nimport styles from \"./generated/themes/Slider.css.js\";\n\n// Texts\nimport {\n\tSLIDER_ARIA_DESCRIPTION,\n\tSLIDER_TOOLTIP_INPUT_DESCRIPTION,\n\tSLIDER_TOOLTIP_INPUT_LABEL,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n/**\n * @class\n *\n * ### Overview\n * The Slider component represents a numerical range and a handle (grip).\n * The purpose of the component is to enable visual selection of a value in\n * a continuous numerical range by moving an adjustable handle.\n *\n * ### Structure\n * The most important properties of the Slider are:\n *\n * - min - The minimum value of the slider range.\n * - max - The maximum value of the slider range.\n * - value - The current value of the slider range.\n * - step - Determines the increments in which the slider will move.\n * - showTooltip - Determines if a tooltip should be displayed above the handle.\n * - showTickmarks - Displays a visual divider between the step values.\n * - labelInterval - Labels some or all of the tickmarks with their values.\n *\n * ### Usage\n * The most common use case is to select values on a continuous numerical scale (e.g. temperature, volume, etc. ).\n *\n * ### Responsive Behavior\n * The `ui5-slider` component adjusts to the size of its parent container by recalculating and\n * resizing the width of the control. You can move the slider handle in several different ways:\n *\n * - Drag and drop the handle to the desired value.\n * - Click/tap on the range bar to move the handle to that location.\n *\n * ### Keyboard Handling\n *\n * - `Left or Down Arrow` - Moves the handle one step to the left, effectively decreasing the component's value by `step` amount;\n * - `Right or Up Arrow` - Moves the handle one step to the right, effectively increasing the component's value by `step` amount;\n * - `Left or Down Arrow + Ctrl/Cmd` - Moves the handle to the left with step equal to 1/10th of the entire range, effectively decreasing the component's value by 1/10th of the range;\n * - `Right or Up Arrow + Ctrl/Cmd` - Moves the handle to the right with step equal to 1/10th of the entire range, effectively increasing the component's value by 1/10th of the range;\n * - `Plus` - Same as `Right or Up Arrow`;\n * - `Minus` - Same as `Left or Down Arrow`;\n * - `Home` - Moves the handle to the beginning of the range;\n * - `End` - Moves the handle to the end of the range;\n * - `Page Up` - Same as `Right or Up + Ctrl/Cmd`;\n * - `Page Down` - Same as `Left or Down + Ctrl/Cmd`;\n * - `Escape` - Resets the value property after interaction, to the position prior the component's focusing;\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/Slider.js\";`\n * @constructor\n * @extends SliderBase\n * @since 1.0.0-rc.11\n * @public\n * @csspart progress-container - Used to style the progress container, the horizontal bar that visually represents the range between the minimum and maximum values, of the `ui5-slider`.\n * @csspart progress-bar - Used to style the progress bar, which shows the progress of the `ui5-slider`.\n * @csspart handle - Used to style the handle of the `ui5-slider`.\n */\n@customElement({\n\ttag: \"ui5-slider\",\n\tlanguageAware: true,\n\tformAssociated: true,\n\tstyles: [styles],\n\ttemplate: SliderTemplate,\n})\nclass Slider extends SliderBase implements IFormInputElement {\n\t/**\n\t * Current value of the slider\n\t * @default 0\n\t * @formEvents change input\n\t * @formProperty\n\t * @public\n\t */\n\t@property({ type: Number })\n\tvalue = 0;\n\n\t/**\n\t * Defines the size of the slider's selection intervals (e.g. min = 0, max = 10, step = 5 would result in possible selection of the values 0, 5, 10).\n\t *\n\t * **Note:** If set to 0 the slider handle movement is disabled.\n\t * @default 1\n\t * @public\n\t */\n\t@property({ type: Number })\n\tstep = 1;\n\n\t@property()\n\ttooltipValueState: `${ValueState}` = \"None\";\n\n\t@property()\n\ttooltipValue = \"\";\n\n\t_valueInitial?: number;\n\t_valueOnInteractionStart?: number;\n\t_progressPercentage = 0;\n\t_handlePositionFromStart = 0;\n\t_lastValidInputValue: string;\n\n\tget formFormattedValue() {\n\t\treturn this.value.toString();\n\t}\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._lastValidInputValue = this.min.toString();\n\t}\n\n\t/**\n\t * The value is visually clamped to min/max but the property is not modified.\n\t * @private\n\t */\n\tonBeforeRendering() {\n\t\t// Clamp value visually without modifying the actual value property\n\t\tconst ctor = this.constructor as typeof Slider;\n\t\tconst clampedValue = ctor.clipValue(this.value, this.min, this.max);\n\t\tthis._updateHandleAndProgress(clampedValue);\n\t}\n\n\tonAfterRendering(): void {\n\t\tsuper.onAfterRendering();\n\n\t\tthis.tooltip?.repositionTooltip();\n\t}\n\n\t_handleResize() {\n\t\t// TODO: Remove after refactoring Base and RangeSlider\n\t}\n\n\t/**\n\t * Called when the user starts interacting with the slider\n\t * @private\n\t */\n\t_onmousedown(e: TouchEvent | MouseEvent) {\n\t\t// If step is 0 no interaction is available because there is no constant\n\t\t// (equal for all user environments) quantitative representation of the value\n\t\tif (this.disabled || this.step === 0 || (e.target as HTMLElement).hasAttribute(\"ui5-slider-tooltip\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst newValue = this.handleDownBase(e);\n\t\tthis._valueOnInteractionStart = this.value;\n\n\t\t// Set initial value if one is not set previously on focus in.\n\t\t// It will be restored if ESC key is pressed.\n\t\tif (this._valueInitial === undefined) {\n\t\t\tthis._valueInitial = this.value;\n\t\t}\n\n\t\t// Do not yet update the Slider if press is over a handle. It will be updated if the user drags the mouse.\n\t\tconst ctor = this.constructor as typeof Slider;\n\t\tif (!this._isHandlePressed(ctor.getPageXValueFromEvent(e))) {\n\t\t\tconst stepPrecision = ctor._getDecimalPrecisionOfNumber(this.step);\n\t\t\tthis._updateHandleAndProgress(newValue);\n\t\t\tthis.value = newValue;\n\t\t\tthis.tooltipValue = newValue.toFixed(stepPrecision);\n\t\t\tthis.updateStateStorageAndFireInputEvent(\"value\");\n\t\t}\n\t}\n\n\t_onfocusin() {\n\t\t// Set initial value if one is not set previously on focus in.\n\t\t// It will be restored if ESC key is pressed.\n\t\tif (this._valueInitial === undefined) {\n\t\t\tthis._valueInitial = this.value;\n\t\t}\n\n\t\tif (this.showTooltip) {\n\t\t\tthis._tooltipsOpen = true;\n\t\t}\n\t}\n\n\t_onfocusout(e: FocusEvent) {\n\t\t// Prevent focusout when the focus is getting set within the slider internal\n\t\t// element (on the handle), before the Slider' customElement itself is finished focusing\n\t\tif (this._isFocusing()) {\n\t\t\tthis._preventFocusOut();\n\t\t\treturn;\n\t\t}\n\n\t\t// Reset focus state and the stored Slider's initial\n\t\t// value that was saved when it was first focused in\n\t\tthis._valueInitial = undefined;\n\n\t\tif (this.showTooltip && !(e.relatedTarget as HTMLElement)?.hasAttribute(\"ui5-slider-tooltip\")) {\n\t\t\tthis._tooltipsOpen = false;\n\t\t}\n\t}\n\n\t_onTooltipChange(e: CustomEvent<SliderTooltipChangeEventDetails>) {\n\t\tconst value = parseFloat(e.detail.value);\n\t\tconst isInvalid = (value < this.min || value > this.max) || Number.isNaN(value);\n\n\t\tif (isInvalid) {\n\t\t\tthis.tooltipValueState = \"Negative\";\n\t\t\tthis.tooltipValue = `${value}`;\n\t\t\treturn;\n\t\t}\n\n\t\tthis.tooltipValueState = \"None\";\n\t\tthis.value = value;\n\t\tthis.fireDecoratorEvent(\"change\");\n\t}\n\n\t_onTooltipFocusChange() {\n\t\tconst value = parseFloat(this.tooltipValue);\n\t\tconst isInvalid = (value < this.min || value > this.max) || Number.isNaN(value);\n\n\t\tif (isInvalid) {\n\t\t\tthis.tooltipValueState = \"None\";\n\t\t\tthis.tooltipValue = this.value.toString();\n\t\t}\n\t}\n\n\t_onTooltipKeydown(e: KeyboardEvent) {\n\t\tif (isF2(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._sliderHandle.focus();\n\t\t}\n\t}\n\n\t_onTooltipOpen() {\n\t\tconst ctor = this.constructor as typeof Slider;\n\t\tconst stepPrecision = ctor._getDecimalPrecisionOfNumber(this.step);\n\t\tthis.tooltipValue = this.value.toFixed(stepPrecision);\n\t}\n\n\t_onTooltipInput(e: CustomEvent) {\n\t\tthis.tooltipValue = e.detail.value;\n\t}\n\n\t/**\n\t * Called when the user moves the slider\n\t * @private\n\t */\n\t_handleMove(e: TouchEvent | MouseEvent) {\n\t\te.preventDefault();\n\n\t\tconst ctor = this.constructor as typeof Slider;\n\t\tconst newValue = ctor.getValueFromInteraction(e, this.step, this.min, this.max, this.getBoundingClientRect(), this.directionStart);\n\t\tconst stepPrecision = ctor._getDecimalPrecisionOfNumber(this.step);\n\n\t\tthis._updateHandleAndProgress(newValue);\n\t\tthis.value = newValue;\n\t\tthis.tooltipValue = newValue.toFixed(stepPrecision);\n\t\tthis.updateStateStorageAndFireInputEvent(\"value\");\n\t}\n\n\t/** Called when the user finish interacting with the slider\n\t * @private\n\t */\n\t_handleUp() {\n\t\tif (this._valueOnInteractionStart !== this.value) {\n\t\t\tthis.fireDecoratorEvent(\"change\");\n\t\t}\n\n\t\tthis.handleUpBase();\n\t\tthis._valueOnInteractionStart = undefined;\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tconst isActionKey = SliderBase._isActionKey(e);\n\n\t\tthis._onKeyupBase();\n\n\t\tif (isActionKey && this._valueOnInteractionStart !== this.value) {\n\t\t\tthis.fireDecoratorEvent(\"change\");\n\t\t}\n\n\t\tthis._valueOnInteractionStart = this.value;\n\t}\n\n\t/** Determines if the press is over the handle\n\t * @private\n\t */\n\t_isHandlePressed(clientX: number) {\n\t\tconst sliderHandleDomRect = this._sliderHandle.getBoundingClientRect();\n\t\treturn clientX >= sliderHandleDomRect.left && clientX <= sliderHandleDomRect.right;\n\t}\n\n\t/** Updates the UI representation of the progress bar and handle position\n\t * @private\n\t */\n\t_updateHandleAndProgress(newValue: number) {\n\t\tconst max = this.max;\n\t\tconst min = this.min;\n\n\t\t// The progress (completed) percentage of the slider.\n\t\tthis._progressPercentage = (newValue - min) / (max - min);\n\t\t// How many pixels from the left end of the slider will be the placed the affected by the user action handle\n\t\tthis._handlePositionFromStart = this._progressPercentage * 100;\n\t}\n\n\t_handleActionKeyPress(e: KeyboardEvent) {\n\t\tconst min = this.min;\n\t\tconst max = this.max;\n\t\tconst currentValue = this.value;\n\t\tconst ctor = this.constructor as typeof Slider;\n\t\tconst newValue = isEscape(e) ? this._valueInitial : ctor.clipValue(this._handleActionKeyPressBase(e, \"value\") + currentValue, min, max);\n\n\t\tif (newValue !== currentValue) {\n\t\t\tconst stepPrecision = ctor._getDecimalPrecisionOfNumber(this.step);\n\t\t\tthis._updateHandleAndProgress(newValue!);\n\t\t\tthis.value = newValue!;\n\t\t\tthis.tooltipValue = this.value.toFixed(stepPrecision);\n\t\t\tthis.updateStateStorageAndFireInputEvent(\"value\");\n\t\t}\n\t}\n\n\t_onTooltopForwardFocus(e: CustomEvent) {\n\t\tconst tooltip = e.target as SliderTooltip;\n\n\t\ttooltip.followRef?.focus();\n\t}\n\n\tget inputValue() {\n\t\treturn this.value.toString();\n\t}\n\n\tget tooltip() {\n\t\treturn this.getDomRef()?.querySelector<SliderTooltip>(\"[ui5-slider-tooltip]\");\n\t}\n\n\tget _sliderHandle() : HTMLElement {\n\t\treturn this.shadowRoot!.querySelector(\"[ui5-slider-handle]\")!;\n\t}\n\n\tget _ariaDisabled() {\n\t\treturn this.disabled || undefined;\n\t}\n\n\tget _ariaLabelledByText() {\n\t\treturn Slider.i18nBundle.getText(SLIDER_ARIA_DESCRIPTION);\n\t}\n\n\tget _ariaDescribedByInputText() {\n\t\treturn Slider.i18nBundle.getText(SLIDER_TOOLTIP_INPUT_DESCRIPTION);\n\t}\n\n\tget _ariaLabelledByInputText() {\n\t\treturn Slider.i18nBundle.getText(SLIDER_TOOLTIP_INPUT_LABEL);\n\t}\n\n\t// TODO: Refactor these methods after RangeSlider is refactored\n\tget tickmarksObject() {\n\t\treturn [];\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tconst target = e.target as HTMLElement;\n\n\t\tif (isF2(e) && target.hasAttribute(\"ui5-slider-handle\")) {\n\t\t\t(target.parentNode!.querySelector(\"[ui5-slider-tooltip]\") as HTMLElement).focus();\n\t\t}\n\n\t\tif (SliderBase._isActionKey(e) && target && !target.hasAttribute(\"ui5-slider-tooltip\")) {\n\t\t\te.preventDefault();\n\n\t\t\tthis._isUserInteraction = true;\n\t\t\tthis._handleActionKeyPress(e);\n\t\t}\n\t}\n}\n\nSlider.define();\n\nexport default Slider;\n"]}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
|
+
import type { SliderScaleOrientation } from "./SliderScale.js";
|
|
3
|
+
/**
|
|
4
|
+
* @class
|
|
5
|
+
* The <code>ui5-slider-handle</code> component represents the handle of the <code>ui5-slider</code> component.
|
|
6
|
+
*
|
|
7
|
+
* @constructor
|
|
8
|
+
* @extends UI5Element
|
|
9
|
+
* @since 2.19.0
|
|
10
|
+
* @private
|
|
11
|
+
*/
|
|
12
|
+
declare class SliderHandle extends UI5Element {
|
|
13
|
+
/**
|
|
14
|
+
* Defines the value of the slider handle.
|
|
15
|
+
* <br><br>
|
|
16
|
+
* <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.19.0
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
value: number;
|
|
21
|
+
/**
|
|
22
|
+
* Defines the minimum value of the slider handle.
|
|
23
|
+
* <br><br>
|
|
24
|
+
* <b>Note:</b> The value should be less than the <code>max</code> property of the parent <code>ui5-slider</code>.
|
|
25
|
+
* @since 2.19.0
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
28
|
+
min: number;
|
|
29
|
+
/**
|
|
30
|
+
* Defines the maximum value of the slider handle.
|
|
31
|
+
* <br><br>
|
|
32
|
+
* <b>Note:</b> The value should be greater than the <code>min</code> property of the parent <code>ui5-slider</code>.
|
|
33
|
+
* @since 2.19.0
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
max: number;
|
|
37
|
+
/**
|
|
38
|
+
* Defines whether the slider handle is disabled.
|
|
39
|
+
* <br><br>
|
|
40
|
+
* <b>Note:</b> A disabled slider handle cannot be interacted with.
|
|
41
|
+
* @since 2.19.0
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
44
|
+
disabled: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Defines whether the slider handle is active.
|
|
47
|
+
* <br><br>
|
|
48
|
+
* <b>Note:</b> An active slider handle is currently being interacted with.
|
|
49
|
+
* @since 2.19.0
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
active: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Defines the orientation of the slider handle.
|
|
55
|
+
*
|
|
56
|
+
* @private
|
|
57
|
+
*/
|
|
58
|
+
orientation: `${SliderScaleOrientation}`;
|
|
59
|
+
getFocusDomRef(): HTMLElement | undefined;
|
|
60
|
+
}
|
|
61
|
+
export default SliderHandle;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
8
|
+
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
9
|
+
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
10
|
+
import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
|
|
11
|
+
import SliderHandleTemplate from "./SliderHandleTemplate.js";
|
|
12
|
+
import styles from "./generated/themes/SliderHandle.css.js";
|
|
13
|
+
/**
|
|
14
|
+
* @class
|
|
15
|
+
* The <code>ui5-slider-handle</code> component represents the handle of the <code>ui5-slider</code> component.
|
|
16
|
+
*
|
|
17
|
+
* @constructor
|
|
18
|
+
* @extends UI5Element
|
|
19
|
+
* @since 2.19.0
|
|
20
|
+
* @private
|
|
21
|
+
*/
|
|
22
|
+
let SliderHandle = class SliderHandle extends UI5Element {
|
|
23
|
+
constructor() {
|
|
24
|
+
super(...arguments);
|
|
25
|
+
/**
|
|
26
|
+
* Defines the value of the slider handle.
|
|
27
|
+
* <br><br>
|
|
28
|
+
* <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.19.0
|
|
30
|
+
* @public
|
|
31
|
+
*/
|
|
32
|
+
this.value = 0;
|
|
33
|
+
/**
|
|
34
|
+
* Defines the minimum value of the slider handle.
|
|
35
|
+
* <br><br>
|
|
36
|
+
* <b>Note:</b> The value should be less than the <code>max</code> property of the parent <code>ui5-slider</code>.
|
|
37
|
+
* @since 2.19.0
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
this.min = 0;
|
|
41
|
+
/**
|
|
42
|
+
* Defines the maximum value of the slider handle.
|
|
43
|
+
* <br><br>
|
|
44
|
+
* <b>Note:</b> The value should be greater than the <code>min</code> property of the parent <code>ui5-slider</code>.
|
|
45
|
+
* @since 2.19.0
|
|
46
|
+
* @public
|
|
47
|
+
*/
|
|
48
|
+
this.max = 100;
|
|
49
|
+
/**
|
|
50
|
+
* Defines whether the slider handle is disabled.
|
|
51
|
+
* <br><br>
|
|
52
|
+
* <b>Note:</b> A disabled slider handle cannot be interacted with.
|
|
53
|
+
* @since 2.19.0
|
|
54
|
+
* @public
|
|
55
|
+
*/
|
|
56
|
+
this.disabled = false;
|
|
57
|
+
/**
|
|
58
|
+
* Defines whether the slider handle is active.
|
|
59
|
+
* <br><br>
|
|
60
|
+
* <b>Note:</b> An active slider handle is currently being interacted with.
|
|
61
|
+
* @since 2.19.0
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
this.active = false;
|
|
65
|
+
/**
|
|
66
|
+
* Defines the orientation of the slider handle.
|
|
67
|
+
*
|
|
68
|
+
* @private
|
|
69
|
+
*/
|
|
70
|
+
this.orientation = "Horizontal";
|
|
71
|
+
}
|
|
72
|
+
getFocusDomRef() {
|
|
73
|
+
return this;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
__decorate([
|
|
77
|
+
property({ type: Number })
|
|
78
|
+
], SliderHandle.prototype, "value", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
property({ type: Number })
|
|
81
|
+
], SliderHandle.prototype, "min", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
property({ type: Number })
|
|
84
|
+
], SliderHandle.prototype, "max", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
property({ type: Boolean })
|
|
87
|
+
], SliderHandle.prototype, "disabled", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
property({ type: Boolean })
|
|
90
|
+
], SliderHandle.prototype, "active", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
property()
|
|
93
|
+
], SliderHandle.prototype, "orientation", void 0);
|
|
94
|
+
SliderHandle = __decorate([
|
|
95
|
+
customElement({
|
|
96
|
+
tag: "ui5-slider-handle",
|
|
97
|
+
renderer: jsxRenderer,
|
|
98
|
+
template: SliderHandleTemplate,
|
|
99
|
+
styles,
|
|
100
|
+
})
|
|
101
|
+
], SliderHandle);
|
|
102
|
+
SliderHandle.define();
|
|
103
|
+
export default SliderHandle;
|
|
104
|
+
//# sourceMappingURL=SliderHandle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SliderHandle.js","sourceRoot":"","sources":["../src/SliderHandle.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,oBAAoB,MAAM,2BAA2B,CAAC;AAC7D,OAAO,MAAM,MAAM,wCAAwC,CAAC;AAG5D;;;;;;;;GAQG;AAOH,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,UAAU;IAArC;;QACC;;;;;;WAMG;QAEH,UAAK,GAAG,CAAC,CAAC;QAEV;;;;;;WAMG;QAEH,QAAG,GAAG,CAAC,CAAC;QAER;;;;;;WAMG;QAEH,QAAG,GAAG,GAAG,CAAC;QAEV;;;;;;WAMG;QAEH,aAAQ,GAAG,KAAK,CAAC;QAEjB;;;;;;WAMG;QAEH,WAAM,GAAG,KAAK,CAAC;QAEf;;;;WAIG;QAEH,gBAAW,GAAgC,YAAY,CAAC;IAKzD,CAAC;IAHA,cAAc;QACb,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAA;AArDA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CACjB;AAUV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCACnB;AAUR;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCACjB;AAUV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;8CACX;AAUjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;4CACb;AAQf;IADC,QAAQ,EAAE;iDAC6C;AAzDnD,YAAY;IANjB,aAAa,CAAC;QACd,GAAG,EAAE,mBAAmB;QACxB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,oBAAoB;QAC9B,MAAM;KACN,CAAC;GACI,YAAY,CA8DjB;AAED,YAAY,CAAC,MAAM,EAAE,CAAC;AAEtB,eAAe,YAAY,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 * @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.19.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.19.0\n\t * @public\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.19.0\n\t * @public\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.19.0\n\t * @public\n\t */\n\t@property({ type: Number })\n\tmax = 100;\n\n\t/**\n\t * Defines whether the slider handle is disabled.\n\t * <br><br>\n\t * <b>Note:</b> A disabled slider handle cannot be interacted with.\n\t * @since 2.19.0\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\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.19.0\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tactive = 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\tgetFocusDomRef(): HTMLElement | undefined {\n\t\treturn this;\n\t}\n}\n\nSliderHandle.define();\n\nexport default SliderHandle;\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "@ui5/webcomponents-base/jsx-runtime";
|
|
2
|
+
import directionArrows from "@ui5/webcomponents-icons/dist/direction-arrows.js";
|
|
3
|
+
import Icon from "./Icon.js";
|
|
4
|
+
export default function SliderHandleTemplate() {
|
|
5
|
+
return (_jsx("div", { class: "ui5-slider-handle-container", children: _jsx(Icon, { name: directionArrows, mode: "Decorative", part: "icon", "slider-icon": true }) }));
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=SliderHandleTemplate.js.map
|
|
@@ -0,0 +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;AAG7B,MAAM,CAAC,OAAO,UAAU,oBAAoB;IAC3C,OAAO,CACN,cAAK,KAAK,EAAC,6BAA6B,YACvC,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\";\n\nexport default function SliderHandleTemplate(this: SliderHandle) {\n\treturn (\n\t\t<div class=\"ui5-slider-handle-container\">\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"]}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
|
+
import type { ResizeObserverCallback } from "@ui5/webcomponents-base/dist/delegate/ResizeHandler.js";
|
|
3
|
+
import type SliderHandle from "./SliderHandle.js";
|
|
4
|
+
type Tickmark = {
|
|
5
|
+
value: number;
|
|
6
|
+
label?: string;
|
|
7
|
+
};
|
|
8
|
+
declare enum SliderScaleOrientation {
|
|
9
|
+
/**
|
|
10
|
+
* Horizontal orientation
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
Horizontal = "Horizontal",
|
|
14
|
+
/**
|
|
15
|
+
* Vertical orientation
|
|
16
|
+
* @private
|
|
17
|
+
*/
|
|
18
|
+
Vertical = "Vertical"
|
|
19
|
+
}
|
|
20
|
+
declare class SliderScale extends UI5Element {
|
|
21
|
+
/**
|
|
22
|
+
* Defines the start value of the progress bar.
|
|
23
|
+
* @default 0
|
|
24
|
+
* @private
|
|
25
|
+
*/
|
|
26
|
+
startValue: number;
|
|
27
|
+
/**
|
|
28
|
+
* Defines the end value of the progress bar.
|
|
29
|
+
* @default 100
|
|
30
|
+
* @private
|
|
31
|
+
*/
|
|
32
|
+
endValue: number;
|
|
33
|
+
/**
|
|
34
|
+
* Defines the minimum value of the scale.
|
|
35
|
+
* @default 0
|
|
36
|
+
* @private
|
|
37
|
+
*/
|
|
38
|
+
min: number;
|
|
39
|
+
/**
|
|
40
|
+
* Defines the maximum value of the scale.
|
|
41
|
+
* @default 100
|
|
42
|
+
* @private
|
|
43
|
+
*/
|
|
44
|
+
max: number;
|
|
45
|
+
/**
|
|
46
|
+
* Defines the step value for tickmarks.
|
|
47
|
+
* @default 1
|
|
48
|
+
* @private
|
|
49
|
+
*/
|
|
50
|
+
step: number;
|
|
51
|
+
/**
|
|
52
|
+
* Determines whether tickmarks should be displayed.
|
|
53
|
+
* @default false
|
|
54
|
+
* @private
|
|
55
|
+
*/
|
|
56
|
+
showTickmarks: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Defines the orientation of the scale.
|
|
59
|
+
* @default "Horizontal"
|
|
60
|
+
* @private
|
|
61
|
+
*/
|
|
62
|
+
orientation: `${SliderScaleOrientation}`;
|
|
63
|
+
/**
|
|
64
|
+
* Defines custom tickmarks to be displayed on the scale.
|
|
65
|
+
* @default []
|
|
66
|
+
* @private
|
|
67
|
+
*/
|
|
68
|
+
tickmarks: Array<Tickmark>;
|
|
69
|
+
/**
|
|
70
|
+
* Defines the interval for displaying labels on tickmarks.
|
|
71
|
+
* @default 0
|
|
72
|
+
* @private
|
|
73
|
+
*/
|
|
74
|
+
labelInterval: number;
|
|
75
|
+
/**
|
|
76
|
+
* @private
|
|
77
|
+
*/
|
|
78
|
+
_labelInterval: number;
|
|
79
|
+
_labelsOverlapping: boolean;
|
|
80
|
+
_hiddenTickmarks: boolean;
|
|
81
|
+
_resizeHandler: ResizeObserverCallback;
|
|
82
|
+
_notResized: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Defines the component items.
|
|
85
|
+
* @public
|
|
86
|
+
*/
|
|
87
|
+
handles: Array<SliderHandle>;
|
|
88
|
+
static get MIN_LABEL_DISTANCE(): number;
|
|
89
|
+
static get MIN_SPACE_BETWEEN_TICKMARKS(): number;
|
|
90
|
+
constructor();
|
|
91
|
+
onEnterDOM(): void;
|
|
92
|
+
onExitDOM(): void;
|
|
93
|
+
onAfterRendering(): void;
|
|
94
|
+
/**
|
|
95
|
+
* Handle the responsiveness of the SliderScale's UI elements when resizing
|
|
96
|
+
* @private
|
|
97
|
+
*/
|
|
98
|
+
_handleResize(): void;
|
|
99
|
+
/**
|
|
100
|
+
* Calculates space between tickmarks
|
|
101
|
+
* @private
|
|
102
|
+
*/
|
|
103
|
+
_spaceBetweenTickmarks(): number;
|
|
104
|
+
get _tickmarksCount(): number;
|
|
105
|
+
get _visibleLabels(): {
|
|
106
|
+
value: number;
|
|
107
|
+
label: string;
|
|
108
|
+
isInRange: boolean;
|
|
109
|
+
position: number;
|
|
110
|
+
showLabel: boolean;
|
|
111
|
+
visible: boolean;
|
|
112
|
+
}[];
|
|
113
|
+
get _progressStyle(): {
|
|
114
|
+
top: string;
|
|
115
|
+
bottom: string;
|
|
116
|
+
height: string;
|
|
117
|
+
insetInlineStart?: undefined;
|
|
118
|
+
width?: undefined;
|
|
119
|
+
} | {
|
|
120
|
+
insetInlineStart: string;
|
|
121
|
+
width: string;
|
|
122
|
+
top?: undefined;
|
|
123
|
+
bottom?: undefined;
|
|
124
|
+
height?: undefined;
|
|
125
|
+
};
|
|
126
|
+
get _allTickmarks(): Tickmark[];
|
|
127
|
+
get _tickmarks(): {
|
|
128
|
+
value: number;
|
|
129
|
+
label: string;
|
|
130
|
+
isInRange: boolean;
|
|
131
|
+
position: number;
|
|
132
|
+
showLabel: boolean;
|
|
133
|
+
visible: boolean;
|
|
134
|
+
}[];
|
|
135
|
+
}
|
|
136
|
+
export default SliderScale;
|
|
137
|
+
export { SliderScaleOrientation };
|
|
138
|
+
export type { Tickmark };
|