@ui5/webcomponents 2.6.0-rc.4 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/README.md +10 -4
- package/cypress/specs/F6.cy.ts +134 -0
- package/cypress/specs/List.cy.ts +1 -0
- package/cypress/specs/Table.cy.ts +606 -0
- package/cypress/specs/Toast.cy.ts +1 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/Avatar.d.ts +1 -1
- package/dist/Avatar.js +0 -2
- package/dist/Avatar.js.map +1 -1
- package/dist/AvatarGroup.d.ts +1 -1
- package/dist/AvatarGroup.js +0 -2
- package/dist/AvatarGroup.js.map +1 -1
- package/dist/Breadcrumbs.d.ts +5 -4
- package/dist/Breadcrumbs.js +1 -18
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/BusyIndicator.js +0 -2
- package/dist/BusyIndicator.js.map +1 -1
- package/dist/Button.js +0 -2
- package/dist/Button.js.map +1 -1
- package/dist/Calendar.d.ts +3 -2
- package/dist/Calendar.js +1 -16
- package/dist/Calendar.js.map +1 -1
- package/dist/CalendarLegend.d.ts +2 -1
- package/dist/CalendarLegend.js +1 -2
- package/dist/CalendarLegend.js.map +1 -1
- package/dist/Card.js +0 -3
- package/dist/Card.js.map +1 -1
- package/dist/Carousel.js +0 -6
- package/dist/Carousel.js.map +1 -1
- package/dist/CheckBox.js +0 -6
- package/dist/CheckBox.js.map +1 -1
- package/dist/ColorPalette.d.ts +2 -2
- package/dist/ColorPalette.js +1 -7
- package/dist/ColorPalette.js.map +1 -1
- package/dist/ColorPalettePopover.d.ts +2 -2
- package/dist/ColorPalettePopover.js +0 -10
- package/dist/ColorPalettePopover.js.map +1 -1
- package/dist/ColorPaletteTemplate.js +1 -2
- package/dist/ColorPaletteTemplate.js.map +1 -1
- package/dist/ColorPicker.js +0 -8
- package/dist/ColorPicker.js.map +1 -1
- package/dist/ComboBox.d.ts +6 -4
- package/dist/ComboBox.js +5 -28
- package/dist/ComboBox.js.map +1 -1
- package/dist/DatePicker.d.ts +3 -3
- package/dist/DatePicker.js +0 -14
- package/dist/DatePicker.js.map +1 -1
- package/dist/DateRangePicker.js +0 -2
- package/dist/DateRangePicker.js.map +1 -1
- package/dist/DateTimePicker.js +0 -15
- package/dist/DateTimePicker.js.map +1 -1
- package/dist/Dialog.js +0 -5
- package/dist/Dialog.js.map +1 -1
- package/dist/DropIndicator.js +0 -1
- package/dist/DropIndicator.js.map +1 -1
- package/dist/ExpandableText.d.ts +2 -2
- package/dist/ExpandableText.js +2 -12
- package/dist/ExpandableText.js.map +1 -1
- package/dist/FileUploader.d.ts +2 -2
- package/dist/FileUploader.js +0 -8
- package/dist/FileUploader.js.map +1 -1
- package/dist/Form.js +0 -2
- package/dist/Form.js.map +1 -1
- package/dist/Input.d.ts +2 -2
- package/dist/Input.js +1 -8
- package/dist/Input.js.map +1 -1
- package/dist/InputPopoverTemplate.d.ts +1 -1
- package/dist/InputPopoverTemplate.js +1 -18
- package/dist/InputPopoverTemplate.js.map +1 -1
- package/dist/Link.js +0 -2
- package/dist/Link.js.map +1 -1
- package/dist/List.d.ts +2 -2
- package/dist/List.js +1 -4
- package/dist/List.js.map +1 -1
- package/dist/ListItem.js +0 -8
- package/dist/ListItem.js.map +1 -1
- package/dist/ListItemGroup.d.ts +2 -2
- package/dist/ListItemGroup.js +0 -4
- package/dist/ListItemGroup.js.map +1 -1
- package/dist/ListItemStandard.js +0 -7
- package/dist/ListItemStandard.js.map +1 -1
- package/dist/Menu.d.ts +4 -2
- package/dist/Menu.js +2 -14
- package/dist/Menu.js.map +1 -1
- package/dist/MenuItem.d.ts +1 -1
- package/dist/MenuItem.js +0 -5
- package/dist/MenuItem.js.map +1 -1
- package/dist/MenuSeparator.js +0 -4
- package/dist/MenuSeparator.js.map +1 -1
- package/dist/MessageStrip.js +0 -3
- package/dist/MessageStrip.js.map +1 -1
- package/dist/MultiInput.d.ts +2 -2
- package/dist/MultiInput.js +1 -12
- package/dist/MultiInput.js.map +1 -1
- package/dist/Option.js +0 -4
- package/dist/Option.js.map +1 -1
- package/dist/Panel.js +0 -3
- package/dist/Panel.js.map +1 -1
- package/dist/Popup.js +0 -4
- package/dist/Popup.js.map +1 -1
- package/dist/ProgressIndicator.js +0 -2
- package/dist/ProgressIndicator.js.map +1 -1
- package/dist/RadioButton.js +0 -2
- package/dist/RadioButton.js.map +1 -1
- package/dist/RangeSlider.js +0 -3
- package/dist/RangeSlider.js.map +1 -1
- package/dist/RatingIndicator.js +0 -2
- package/dist/RatingIndicator.js.map +1 -1
- package/dist/ResponsivePopover.d.ts +1 -1
- package/dist/ResponsivePopover.js +0 -7
- package/dist/ResponsivePopover.js.map +1 -1
- package/dist/SegmentedButton.d.ts +2 -1
- package/dist/SegmentedButton.js +1 -2
- package/dist/SegmentedButton.js.map +1 -1
- package/dist/SegmentedButtonItem.js +0 -2
- package/dist/SegmentedButtonItem.js.map +1 -1
- package/dist/Slider.js +0 -3
- package/dist/Slider.js.map +1 -1
- package/dist/SplitButton.d.ts +1 -1
- package/dist/SplitButton.js +0 -2
- package/dist/SplitButton.js.map +1 -1
- package/dist/StepInput.d.ts +1 -1
- package/dist/StepInput.js +0 -6
- package/dist/StepInput.js.map +1 -1
- package/dist/Switch.js +0 -2
- package/dist/Switch.js.map +1 -1
- package/dist/Tab.d.ts +1 -1
- package/dist/Tab.js +0 -8
- package/dist/Tab.js.map +1 -1
- package/dist/TabContainer.d.ts +3 -3
- package/dist/TabContainer.js +0 -14
- package/dist/TabContainer.js.map +1 -1
- package/dist/TableRow.d.ts +2 -0
- package/dist/TableRow.js +2 -0
- package/dist/TableRow.js.map +1 -1
- package/dist/TableVirtualizer.d.ts +1 -0
- package/dist/TableVirtualizer.js +1 -0
- package/dist/TableVirtualizer.js.map +1 -1
- package/dist/Tag.js +0 -4
- package/dist/Tag.js.map +1 -1
- package/dist/TextArea.d.ts +1 -1
- package/dist/TextArea.js +0 -3
- package/dist/TextArea.js.map +1 -1
- package/dist/TimePicker.d.ts +3 -3
- package/dist/TimePicker.js +0 -16
- package/dist/TimePicker.js.map +1 -1
- package/dist/TimeSelectionClocks.d.ts +2 -2
- package/dist/TimeSelectionClocks.js +0 -10
- package/dist/TimeSelectionClocks.js.map +1 -1
- package/dist/TimeSelectionInputs.d.ts +1 -1
- package/dist/TimeSelectionInputs.js +0 -8
- package/dist/TimeSelectionInputs.js.map +1 -1
- package/dist/Token.js +0 -2
- package/dist/Token.js.map +1 -1
- package/dist/Tokenizer.d.ts +4 -2
- package/dist/Tokenizer.js +2 -14
- package/dist/Tokenizer.js.map +1 -1
- package/dist/Toolbar.d.ts +2 -3
- package/dist/Toolbar.js +1 -11
- package/dist/Toolbar.js.map +1 -1
- package/dist/ToolbarButton.js +0 -2
- package/dist/ToolbarButton.js.map +1 -1
- package/dist/ToolbarRegistry.d.ts +1 -2
- package/dist/ToolbarRegistry.js +1 -4
- package/dist/ToolbarRegistry.js.map +1 -1
- package/dist/ToolbarSelect.js +0 -3
- package/dist/ToolbarSelect.js.map +1 -1
- package/dist/Tree.d.ts +4 -2
- package/dist/Tree.js +2 -10
- package/dist/Tree.js.map +1 -1
- package/dist/TreeItemBase.js +0 -5
- package/dist/TreeItemBase.js.map +1 -1
- package/dist/bundle.esm.js +1 -0
- package/dist/bundle.esm.js.map +1 -1
- package/dist/css/themes/Avatar.css +1 -1
- package/dist/css/themes/AvatarGroup.css +1 -1
- package/dist/css/themes/Bar.css +1 -1
- package/dist/css/themes/Breadcrumbs.css +1 -1
- package/dist/css/themes/BusyIndicator.css +1 -1
- package/dist/css/themes/Button.css +1 -1
- package/dist/css/themes/Calendar.css +1 -1
- package/dist/css/themes/CalendarHeader.css +1 -1
- package/dist/css/themes/CalendarLegend.css +1 -1
- package/dist/css/themes/CalendarLegendItem.css +1 -1
- package/dist/css/themes/Card.css +1 -1
- package/dist/css/themes/CardHeader.css +1 -1
- package/dist/css/themes/Carousel.css +1 -1
- package/dist/css/themes/CheckBox.css +1 -1
- package/dist/css/themes/ColorPalette.css +1 -1
- package/dist/css/themes/ColorPaletteItem.css +1 -1
- package/dist/css/themes/ColorPalettePopover.css +1 -1
- package/dist/css/themes/ColorPicker.css +1 -1
- package/dist/css/themes/ComboBox.css +1 -1
- package/dist/css/themes/ComboBoxItem.css +1 -1
- package/dist/css/themes/DatePicker.css +1 -1
- package/dist/css/themes/DateTimePickerPopover.css +1 -1
- package/dist/css/themes/DayPicker.css +1 -1
- package/dist/css/themes/Dialog.css +1 -1
- package/dist/css/themes/FileUploader.css +1 -1
- package/dist/css/themes/Form.css +1 -1
- package/dist/css/themes/FormItem.css +1 -1
- package/dist/css/themes/FormItemSpan.css +1 -1
- package/dist/css/themes/GrowingButton.css +1 -1
- package/dist/css/themes/Icon.css +1 -1
- package/dist/css/themes/Input.css +1 -1
- package/dist/css/themes/InputIcon.css +1 -1
- package/dist/css/themes/InputSharedStyles.css +1 -1
- package/dist/css/themes/Link.css +1 -1
- package/dist/css/themes/List.css +1 -1
- package/dist/css/themes/ListItem.css +1 -1
- package/dist/css/themes/ListItemBase.css +1 -1
- package/dist/css/themes/ListItemCustom.css +1 -1
- package/dist/css/themes/ListItemGroup.css +1 -1
- package/dist/css/themes/ListItemGroupHeader.css +1 -1
- package/dist/css/themes/ListItemIcon.css +1 -1
- package/dist/css/themes/Menu.css +1 -1
- package/dist/css/themes/MenuItem.css +1 -1
- package/dist/css/themes/MessageStrip.css +1 -1
- package/dist/css/themes/MonthPicker.css +1 -1
- package/dist/css/themes/MultiComboBox.css +1 -1
- package/dist/css/themes/MultiComboBoxItem.css +1 -1
- package/dist/css/themes/MultiComboBoxPopover.css +1 -1
- package/dist/css/themes/MultiInput.css +1 -1
- package/dist/css/themes/NavigationMenu.css +1 -1
- package/dist/css/themes/NavigationMenuItem.css +1 -1
- package/dist/css/themes/OptionBase.css +1 -1
- package/dist/css/themes/Panel.css +1 -1
- package/dist/css/themes/Popover.css +1 -1
- package/dist/css/themes/PopupsCommon.css +1 -1
- package/dist/css/themes/ProgressIndicator.css +1 -1
- package/dist/css/themes/RadioButton.css +1 -1
- package/dist/css/themes/RangeSlider.css +1 -1
- package/dist/css/themes/RatingIndicator.css +1 -1
- package/dist/css/themes/ResponsivePopover.css +1 -1
- package/dist/css/themes/ResponsivePopoverCommon.css +1 -1
- package/dist/css/themes/SegmentedButton.css +1 -1
- package/dist/css/themes/SegmentedButtonItem.css +1 -1
- package/dist/css/themes/Select.css +1 -1
- package/dist/css/themes/SliderBase.css +1 -1
- package/dist/css/themes/SplitButton.css +1 -1
- package/dist/css/themes/StepInput.css +1 -1
- package/dist/css/themes/SuggestionItem.css +1 -1
- package/dist/css/themes/SuggestionItemCustom.css +1 -1
- package/dist/css/themes/Switch.css +1 -1
- package/dist/css/themes/TabContainer.css +1 -1
- package/dist/css/themes/TabInOverflow.css +1 -1
- package/dist/css/themes/TabInStrip.css +1 -1
- package/dist/css/themes/TabSemanticIcon.css +1 -1
- package/dist/css/themes/TabSeparatorInOverflow.css +1 -1
- package/dist/css/themes/Table.css +1 -1
- package/dist/css/themes/TableCellBase.css +1 -1
- package/dist/css/themes/TableHeaderRow.css +1 -1
- package/dist/css/themes/TableRow.css +1 -1
- package/dist/css/themes/TableRowBase.css +1 -1
- package/dist/css/themes/Tag.css +1 -1
- package/dist/css/themes/Text.css +1 -1
- package/dist/css/themes/TextArea.css +1 -1
- package/dist/css/themes/TimePicker.css +1 -1
- package/dist/css/themes/Toast.css +1 -1
- package/dist/css/themes/ToggleButton.css +1 -1
- package/dist/css/themes/Token.css +1 -1
- package/dist/css/themes/Tokenizer.css +1 -1
- package/dist/css/themes/TokenizerPopover.css +1 -1
- package/dist/css/themes/Toolbar.css +1 -1
- package/dist/css/themes/ToolbarPopover.css +1 -1
- package/dist/css/themes/TreeItem.css +1 -1
- package/dist/css/themes/ValueStateMessage.css +1 -1
- package/dist/css/themes/YearPicker.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_dark_exp/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_exp/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcb_exp/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcw_exp/parameters-bundle.css +1 -1
- package/dist/custom-elements-internal.json +13 -8
- package/dist/custom-elements.json +3 -3
- package/dist/features/ColorPaletteMoreColors.d.ts +2 -4
- package/dist/features/ColorPaletteMoreColors.js +3 -9
- package/dist/features/ColorPaletteMoreColors.js.map +1 -1
- package/dist/features/ColorPaletteMoreColorsTemplate.d.ts +2 -0
- package/dist/features/ColorPaletteMoreColorsTemplate.js +8 -0
- package/dist/features/ColorPaletteMoreColorsTemplate.js.map +1 -0
- package/dist/features/InputSuggestions.d.ts +6 -6
- package/dist/features/InputSuggestions.js +6 -14
- package/dist/features/InputSuggestions.js.map +1 -1
- package/dist/features/InputSuggestionsTemplate.d.ts +3 -0
- package/dist/features/InputSuggestionsTemplate.js +22 -0
- package/dist/features/InputSuggestionsTemplate.js.map +1 -0
- 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_dark_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_exp/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_hcb_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/themes/Avatar.css.d.ts +1 -1
- package/dist/generated/themes/Avatar.css.js +1 -1
- package/dist/generated/themes/Avatar.css.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/Bar.css.d.ts +1 -1
- package/dist/generated/themes/Bar.css.js +1 -1
- package/dist/generated/themes/Bar.css.js.map +1 -1
- package/dist/generated/themes/Breadcrumbs.css.d.ts +1 -1
- package/dist/generated/themes/Breadcrumbs.css.js +1 -1
- package/dist/generated/themes/Breadcrumbs.css.js.map +1 -1
- package/dist/generated/themes/BusyIndicator.css.d.ts +1 -1
- package/dist/generated/themes/BusyIndicator.css.js +1 -1
- package/dist/generated/themes/BusyIndicator.css.js.map +1 -1
- package/dist/generated/themes/Button.css.d.ts +1 -1
- package/dist/generated/themes/Button.css.js +1 -1
- package/dist/generated/themes/Button.css.js.map +1 -1
- package/dist/generated/themes/Calendar.css.d.ts +1 -1
- package/dist/generated/themes/Calendar.css.js +1 -1
- package/dist/generated/themes/Calendar.css.js.map +1 -1
- package/dist/generated/themes/CalendarHeader.css.d.ts +1 -1
- package/dist/generated/themes/CalendarHeader.css.js +1 -1
- package/dist/generated/themes/CalendarHeader.css.js.map +1 -1
- package/dist/generated/themes/CalendarLegend.css.d.ts +1 -1
- package/dist/generated/themes/CalendarLegend.css.js +1 -1
- package/dist/generated/themes/CalendarLegend.css.js.map +1 -1
- package/dist/generated/themes/CalendarLegendItem.css.d.ts +1 -1
- package/dist/generated/themes/CalendarLegendItem.css.js +1 -1
- package/dist/generated/themes/CalendarLegendItem.css.js.map +1 -1
- package/dist/generated/themes/Card.css.d.ts +1 -1
- package/dist/generated/themes/Card.css.js +1 -1
- package/dist/generated/themes/Card.css.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/Carousel.css.d.ts +1 -1
- package/dist/generated/themes/Carousel.css.js +1 -1
- package/dist/generated/themes/Carousel.css.js.map +1 -1
- package/dist/generated/themes/CheckBox.css.d.ts +1 -1
- package/dist/generated/themes/CheckBox.css.js +1 -1
- package/dist/generated/themes/CheckBox.css.js.map +1 -1
- package/dist/generated/themes/ColorPalette.css.d.ts +1 -1
- package/dist/generated/themes/ColorPalette.css.js +1 -1
- package/dist/generated/themes/ColorPalette.css.js.map +1 -1
- package/dist/generated/themes/ColorPaletteItem.css.d.ts +1 -1
- package/dist/generated/themes/ColorPaletteItem.css.js +1 -1
- package/dist/generated/themes/ColorPaletteItem.css.js.map +1 -1
- package/dist/generated/themes/ColorPalettePopover.css.d.ts +1 -1
- package/dist/generated/themes/ColorPalettePopover.css.js +1 -1
- package/dist/generated/themes/ColorPalettePopover.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/ComboBox.css.d.ts +1 -1
- package/dist/generated/themes/ComboBox.css.js +1 -1
- package/dist/generated/themes/ComboBox.css.js.map +1 -1
- package/dist/generated/themes/ComboBoxItem.css.d.ts +1 -1
- package/dist/generated/themes/ComboBoxItem.css.js +1 -1
- package/dist/generated/themes/ComboBoxItem.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/DateTimePickerPopover.css.d.ts +1 -1
- package/dist/generated/themes/DateTimePickerPopover.css.js +1 -1
- package/dist/generated/themes/DateTimePickerPopover.css.js.map +1 -1
- package/dist/generated/themes/DayPicker.css.d.ts +1 -1
- package/dist/generated/themes/DayPicker.css.js +1 -1
- package/dist/generated/themes/DayPicker.css.js.map +1 -1
- package/dist/generated/themes/Dialog.css.d.ts +1 -1
- package/dist/generated/themes/Dialog.css.js +1 -1
- package/dist/generated/themes/Dialog.css.js.map +1 -1
- package/dist/generated/themes/FileUploader.css.d.ts +1 -1
- package/dist/generated/themes/FileUploader.css.js +1 -1
- package/dist/generated/themes/FileUploader.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/FormItem.css.d.ts +1 -1
- package/dist/generated/themes/FormItem.css.js +1 -1
- package/dist/generated/themes/FormItem.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/GrowingButton.css.d.ts +1 -1
- package/dist/generated/themes/GrowingButton.css.js +1 -1
- package/dist/generated/themes/GrowingButton.css.js.map +1 -1
- package/dist/generated/themes/Icon.css.d.ts +1 -1
- package/dist/generated/themes/Icon.css.js +1 -1
- package/dist/generated/themes/Icon.css.js.map +1 -1
- package/dist/generated/themes/Input.css.d.ts +1 -1
- package/dist/generated/themes/Input.css.js +1 -1
- package/dist/generated/themes/Input.css.js.map +1 -1
- package/dist/generated/themes/InputIcon.css.d.ts +1 -1
- package/dist/generated/themes/InputIcon.css.js +1 -1
- package/dist/generated/themes/InputIcon.css.js.map +1 -1
- package/dist/generated/themes/InputSharedStyles.css.d.ts +1 -1
- package/dist/generated/themes/InputSharedStyles.css.js +1 -1
- package/dist/generated/themes/InputSharedStyles.css.js.map +1 -1
- package/dist/generated/themes/Link.css.d.ts +1 -1
- package/dist/generated/themes/Link.css.js +1 -1
- package/dist/generated/themes/Link.css.js.map +1 -1
- package/dist/generated/themes/List.css.d.ts +1 -1
- package/dist/generated/themes/List.css.js +1 -1
- package/dist/generated/themes/List.css.js.map +1 -1
- package/dist/generated/themes/ListItem.css.d.ts +1 -1
- package/dist/generated/themes/ListItem.css.js +1 -1
- package/dist/generated/themes/ListItem.css.js.map +1 -1
- package/dist/generated/themes/ListItemBase.css.d.ts +1 -1
- package/dist/generated/themes/ListItemBase.css.js +1 -1
- package/dist/generated/themes/ListItemBase.css.js.map +1 -1
- package/dist/generated/themes/ListItemCustom.css.d.ts +1 -1
- package/dist/generated/themes/ListItemCustom.css.js +1 -1
- package/dist/generated/themes/ListItemCustom.css.js.map +1 -1
- package/dist/generated/themes/ListItemGroup.css.d.ts +1 -1
- package/dist/generated/themes/ListItemGroup.css.js +1 -1
- package/dist/generated/themes/ListItemGroup.css.js.map +1 -1
- package/dist/generated/themes/ListItemGroupHeader.css.d.ts +1 -1
- package/dist/generated/themes/ListItemGroupHeader.css.js +1 -1
- package/dist/generated/themes/ListItemGroupHeader.css.js.map +1 -1
- package/dist/generated/themes/ListItemIcon.css.d.ts +1 -1
- package/dist/generated/themes/ListItemIcon.css.js +1 -1
- package/dist/generated/themes/ListItemIcon.css.js.map +1 -1
- package/dist/generated/themes/Menu.css.d.ts +1 -1
- package/dist/generated/themes/Menu.css.js +1 -1
- package/dist/generated/themes/Menu.css.js.map +1 -1
- package/dist/generated/themes/MenuItem.css.d.ts +1 -1
- package/dist/generated/themes/MenuItem.css.js +1 -1
- package/dist/generated/themes/MenuItem.css.js.map +1 -1
- package/dist/generated/themes/MessageStrip.css.d.ts +1 -1
- package/dist/generated/themes/MessageStrip.css.js +1 -1
- package/dist/generated/themes/MessageStrip.css.js.map +1 -1
- package/dist/generated/themes/MonthPicker.css.d.ts +1 -1
- package/dist/generated/themes/MonthPicker.css.js +1 -1
- package/dist/generated/themes/MonthPicker.css.js.map +1 -1
- package/dist/generated/themes/MultiComboBox.css.d.ts +1 -1
- package/dist/generated/themes/MultiComboBox.css.js +1 -1
- package/dist/generated/themes/MultiComboBox.css.js.map +1 -1
- package/dist/generated/themes/MultiComboBoxItem.css.d.ts +1 -1
- package/dist/generated/themes/MultiComboBoxItem.css.js +1 -1
- package/dist/generated/themes/MultiComboBoxItem.css.js.map +1 -1
- package/dist/generated/themes/MultiComboBoxPopover.css.d.ts +1 -1
- package/dist/generated/themes/MultiComboBoxPopover.css.js +1 -1
- package/dist/generated/themes/MultiComboBoxPopover.css.js.map +1 -1
- package/dist/generated/themes/MultiInput.css.d.ts +1 -1
- package/dist/generated/themes/MultiInput.css.js +1 -1
- package/dist/generated/themes/MultiInput.css.js.map +1 -1
- package/dist/generated/themes/NavigationMenu.css.d.ts +1 -1
- package/dist/generated/themes/NavigationMenu.css.js +1 -1
- package/dist/generated/themes/NavigationMenu.css.js.map +1 -1
- package/dist/generated/themes/NavigationMenuItem.css.d.ts +1 -1
- package/dist/generated/themes/NavigationMenuItem.css.js +1 -1
- package/dist/generated/themes/NavigationMenuItem.css.js.map +1 -1
- package/dist/generated/themes/OptionBase.css.d.ts +1 -1
- package/dist/generated/themes/OptionBase.css.js +1 -1
- package/dist/generated/themes/OptionBase.css.js.map +1 -1
- package/dist/generated/themes/Panel.css.d.ts +1 -1
- package/dist/generated/themes/Panel.css.js +1 -1
- package/dist/generated/themes/Panel.css.js.map +1 -1
- package/dist/generated/themes/Popover.css.d.ts +1 -1
- package/dist/generated/themes/Popover.css.js +1 -1
- package/dist/generated/themes/Popover.css.js.map +1 -1
- package/dist/generated/themes/PopupsCommon.css.d.ts +1 -1
- package/dist/generated/themes/PopupsCommon.css.js +1 -1
- package/dist/generated/themes/PopupsCommon.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/RadioButton.css.d.ts +1 -1
- package/dist/generated/themes/RadioButton.css.js +1 -1
- package/dist/generated/themes/RadioButton.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/RatingIndicator.css.d.ts +1 -1
- package/dist/generated/themes/RatingIndicator.css.js +1 -1
- package/dist/generated/themes/RatingIndicator.css.js.map +1 -1
- package/dist/generated/themes/ResponsivePopover.css.d.ts +1 -1
- package/dist/generated/themes/ResponsivePopover.css.js +1 -1
- package/dist/generated/themes/ResponsivePopover.css.js.map +1 -1
- package/dist/generated/themes/ResponsivePopoverCommon.css.d.ts +1 -1
- package/dist/generated/themes/ResponsivePopoverCommon.css.js +1 -1
- package/dist/generated/themes/ResponsivePopoverCommon.css.js.map +1 -1
- package/dist/generated/themes/SegmentedButton.css.d.ts +1 -1
- package/dist/generated/themes/SegmentedButton.css.js +1 -1
- package/dist/generated/themes/SegmentedButton.css.js.map +1 -1
- package/dist/generated/themes/SegmentedButtonItem.css.d.ts +1 -1
- package/dist/generated/themes/SegmentedButtonItem.css.js +1 -1
- package/dist/generated/themes/SegmentedButtonItem.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/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/SplitButton.css.d.ts +1 -1
- package/dist/generated/themes/SplitButton.css.js +1 -1
- package/dist/generated/themes/SplitButton.css.js.map +1 -1
- package/dist/generated/themes/StepInput.css.d.ts +1 -1
- package/dist/generated/themes/StepInput.css.js +1 -1
- package/dist/generated/themes/StepInput.css.js.map +1 -1
- package/dist/generated/themes/SuggestionItem.css.d.ts +1 -1
- package/dist/generated/themes/SuggestionItem.css.js +1 -1
- package/dist/generated/themes/SuggestionItem.css.js.map +1 -1
- package/dist/generated/themes/SuggestionItemCustom.css.d.ts +1 -1
- package/dist/generated/themes/SuggestionItemCustom.css.js +1 -1
- package/dist/generated/themes/SuggestionItemCustom.css.js.map +1 -1
- package/dist/generated/themes/Switch.css.d.ts +1 -1
- package/dist/generated/themes/Switch.css.js +1 -1
- package/dist/generated/themes/Switch.css.js.map +1 -1
- package/dist/generated/themes/TabContainer.css.d.ts +1 -1
- package/dist/generated/themes/TabContainer.css.js +1 -1
- package/dist/generated/themes/TabContainer.css.js.map +1 -1
- package/dist/generated/themes/TabInOverflow.css.d.ts +1 -1
- package/dist/generated/themes/TabInOverflow.css.js +1 -1
- package/dist/generated/themes/TabInOverflow.css.js.map +1 -1
- package/dist/generated/themes/TabInStrip.css.d.ts +1 -1
- package/dist/generated/themes/TabInStrip.css.js +1 -1
- package/dist/generated/themes/TabInStrip.css.js.map +1 -1
- package/dist/generated/themes/TabSemanticIcon.css.d.ts +1 -1
- package/dist/generated/themes/TabSemanticIcon.css.js +1 -1
- package/dist/generated/themes/TabSemanticIcon.css.js.map +1 -1
- package/dist/generated/themes/TabSeparatorInOverflow.css.d.ts +1 -1
- package/dist/generated/themes/TabSeparatorInOverflow.css.js +1 -1
- package/dist/generated/themes/TabSeparatorInOverflow.css.js.map +1 -1
- package/dist/generated/themes/Table.css.d.ts +1 -1
- package/dist/generated/themes/Table.css.js +1 -1
- package/dist/generated/themes/Table.css.js.map +1 -1
- 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/TableHeaderRow.css.d.ts +1 -1
- package/dist/generated/themes/TableHeaderRow.css.js +1 -1
- package/dist/generated/themes/TableHeaderRow.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/Tag.css.d.ts +1 -1
- package/dist/generated/themes/Tag.css.js +1 -1
- package/dist/generated/themes/Tag.css.js.map +1 -1
- package/dist/generated/themes/Text.css.d.ts +1 -1
- package/dist/generated/themes/Text.css.js +1 -1
- package/dist/generated/themes/Text.css.js.map +1 -1
- package/dist/generated/themes/TextArea.css.d.ts +1 -1
- package/dist/generated/themes/TextArea.css.js +1 -1
- package/dist/generated/themes/TextArea.css.js.map +1 -1
- package/dist/generated/themes/TimePicker.css.d.ts +1 -1
- package/dist/generated/themes/TimePicker.css.js +1 -1
- package/dist/generated/themes/TimePicker.css.js.map +1 -1
- package/dist/generated/themes/Toast.css.d.ts +1 -1
- package/dist/generated/themes/Toast.css.js +1 -1
- package/dist/generated/themes/Toast.css.js.map +1 -1
- package/dist/generated/themes/ToggleButton.css.d.ts +1 -1
- package/dist/generated/themes/ToggleButton.css.js +1 -1
- package/dist/generated/themes/ToggleButton.css.js.map +1 -1
- package/dist/generated/themes/Token.css.d.ts +1 -1
- package/dist/generated/themes/Token.css.js +1 -1
- package/dist/generated/themes/Token.css.js.map +1 -1
- package/dist/generated/themes/Tokenizer.css.d.ts +1 -1
- package/dist/generated/themes/Tokenizer.css.js +1 -1
- package/dist/generated/themes/Tokenizer.css.js.map +1 -1
- package/dist/generated/themes/TokenizerPopover.css.d.ts +1 -1
- package/dist/generated/themes/TokenizerPopover.css.js +1 -1
- package/dist/generated/themes/TokenizerPopover.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/ToolbarPopover.css.d.ts +1 -1
- package/dist/generated/themes/ToolbarPopover.css.js +1 -1
- package/dist/generated/themes/ToolbarPopover.css.js.map +1 -1
- package/dist/generated/themes/TreeItem.css.d.ts +1 -1
- package/dist/generated/themes/TreeItem.css.js +1 -1
- package/dist/generated/themes/TreeItem.css.js.map +1 -1
- package/dist/generated/themes/ValueStateMessage.css.d.ts +1 -1
- package/dist/generated/themes/ValueStateMessage.css.js +1 -1
- package/dist/generated/themes/ValueStateMessage.css.js.map +1 -1
- package/dist/generated/themes/YearPicker.css.d.ts +1 -1
- package/dist/generated/themes/YearPicker.css.js +1 -1
- package/dist/generated/themes/YearPicker.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_dark_exp/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_dark_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_dark_exp/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_exp/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_hcb_exp/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hcb_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcb_exp/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/generated/themes/sap_horizon_hcw_exp/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hcw_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcw_exp/parameters-bundle.css.js.map +1 -1
- package/dist/web-types.json +2 -2
- package/package.json +9 -9
- package/src/ColorPaletteTemplate.tsx +1 -2
- package/src/InputPopoverTemplate.tsx +2 -102
- package/src/features/ColorPaletteMoreColorsTemplate.tsx +30 -0
- package/src/features/InputSuggestionsTemplate.tsx +108 -0
- package/src/themes/TabInStrip.css +1 -5
- package/dist/ColorPaletteDialogTemplate.d.ts +0 -2
- package/dist/ColorPaletteDialogTemplate.js +0 -9
- package/dist/ColorPaletteDialogTemplate.js.map +0 -1
- package/src/ColorPaletteDialogTemplate.tsx +0 -35
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedButton.js","sourceRoot":"","sources":["../src/SegmentedButton.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,cAAc,MAAM,yDAAyD,CAAC;AAGrF,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AACvF,OAAO,EACN,OAAO,EACP,OAAO,GACP,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,gCAAgC,EAAE,gCAAgC,EAAE,MAAM,mCAAmC,CAAC;AACvH,OAAO,mBAAmB,MAAM,0BAA0B,CAAC;AAC3D,OAAO,4BAA4B,MAAM,yCAAyC,CAAC;AAEnF,WAAW;AACX,OAAO,uBAAuB,MAAM,8BAA8B,CAAC;AAEnE,SAAS;AACT,OAAO,kBAAkB,MAAM,2CAA2C,CAAC;AAe3E;;;;;;;;;;;;;;;;;GAiBG;AAkBH,IAAM,eAAe,uBAArB,MAAM,eAAgB,SAAQ,UAAU;IA0CvC;QACC,KAAK,EAAE,CAAC;QA9BT;;;;;WAKG;QAEH,kBAAa,GAAsC,QAAQ,CAAC;QAyB3D,IAAI,CAAC,eAAe,GAAG,IAAI,cAAc,CAAC,IAAI,EAAE;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K,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACjD,CAAC;IAED,IAAI,gBAAgB;QACnB,OAAO,IAAI,CAAC,eAAe,CAAsB,OAAO,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;YACvE,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC;QACvB,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,IAAI,eAAe;QAClB,OAAO,iBAAe,CAAC,UAAU,CAAC,OAAO,CAAC,gCAAgC,CAAC,CAAC;IAC7E,CAAC;IAED,IAAI,eAAe;QAClB,OAAO,iBAAe,CAAC,UAAU,CAAC,OAAO,CAAC,gCAAgC,CAAC,CAAC;IAC7E,CAAC;CACD,CAAA;AAhLA;IADC,QAAQ,EAAE;uDACa;AASxB;IADC,QAAQ,EAAE;sDACiD;AAW5D;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,uBAAuB,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;8CACxC;AAG7B;IADN,IAAI,CAAC,oBAAoB,CAAC;yCACG;AAlCzB,eAAe;IAjBpB,aAAa,CAAC;QACd,GAAG,EAAE,sBAAsB;QAC3B,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,uBAAuB;QACjC,MAAM,EAAE,kBAAkB;QAC1B,YAAY,EAAE,CAAC,mBAAmB,CAAC;KACnC,CAAC;IACF;;;;OAIG;;IACF,KAAK,CAAC,kBAAkB,EAAE;QAC1B,OAAO,EAAE,IAAI;KACb,CAAC;GAEI,eAAe,CA2LpB;AAED,eAAe,CAAC,MAAM,EAAE,CAAC;AAEzB,eAAe,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 event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport ItemNavigation from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport type { ITabbable } from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport { getScopedVarName } from \"@ui5/webcomponents-base/dist/CustomElementsScope.js\";\nimport {\n\tisSpace,\n\tisEnter,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { SEGMENTEDBUTTON_ARIA_DESCRIPTION, SEGMENTEDBUTTON_ARIA_DESCRIBEDBY } from \"./generated/i18n/i18n-defaults.js\";\nimport SegmentedButtonItem from \"./SegmentedButtonItem.js\";\nimport SegmentedButtonSelectionMode from \"./types/SegmentedButtonSelectionMode.js\";\n\n// Template\nimport SegmentedButtonTemplate from \"./SegmentedButtonTemplate.js\";\n\n// Styles\nimport SegmentedButtonCss from \"./generated/themes/SegmentedButton.css.js\";\n\n/**\n * Interface for components that may be slotted inside `ui5-segmented-button` as items\n * @public\n */\ninterface ISegmentedButtonItem extends UI5Element, ITabbable {\n\tdisabled: boolean,\n\tselected: boolean,\n}\n\ntype SegmentedButtonSelectionChangeEventDetail = {\n\tselectedItems: Array<ISegmentedButtonItem>,\n}\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-segmented-button` shows a group of items. When the user clicks or taps\n * one of the items, it stays in a pressed state. It automatically resizes the items\n * to fit proportionally within the component. When no width is set, the component uses the available width.\n *\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/SegmentedButton.js\";`\n * @constructor\n * @extends UI5Element\n * @since 1.0.0-rc.6\n * @public\n */\n@customElement({\n\ttag: \"ui5-segmented-button\",\n\tlanguageAware: true,\n\trenderer: jsxRenderer,\n\ttemplate: SegmentedButtonTemplate,\n\tstyles: SegmentedButtonCss,\n\tdependencies: [SegmentedButtonItem],\n})\n/**\n * Fired when the selected item changes.\n * @param {Array<ISegmentedButtonItem>} selectedItems an array of selected items. Since: 1.14.0\n * @public\n */\n@event(\"selection-change\", {\n\tbubbles: true,\n})\n\nclass SegmentedButton extends UI5Element {\n\teventDetails!: {\n\t\t\"selection-change\": SegmentedButtonSelectionChangeEventDetail,\n\t}\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.0.3\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Defines the component selection mode.\n\t * @default \"Single\"\n\t * @public\n\t * @since 1.14.0\n\t */\n\t@property()\n\tselectionMode: `${SegmentedButtonSelectionMode}` = \"Single\";\n\n\t/**\n\t * Defines the items of `ui5-segmented-button`.\n\t *\n\t * **Note:** Multiple items are allowed.\n\t *\n\t * **Note:** Use the `ui5-segmented-button-item` for the intended design.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, invalidateOnChildChange: true, \"default\": true })\n\titems!: Array<ISegmentedButtonItem>;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\t_itemNavigation: ItemNavigation;\n\n\thasPreviouslyFocusedItem: boolean;\n\n\t_selectedItem?: ISegmentedButtonItem;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._itemNavigation = new ItemNavigation(this, {\n\t\t\tgetItemsCallback: () => this.navigatableItems,\n\t\t});\n\t\tthis.hasPreviouslyFocusedItem = false;\n\t}\n\n\tonBeforeRendering() {\n\t\tconst items = this.getSlottedNodes<SegmentedButtonItem>(\"items\");\n\n\t\titems.forEach((item, index, arr) => {\n\t\t\titem.posInSet = index + 1;\n\t\t\titem.sizeOfSet = arr.length;\n\t\t});\n\n\t\tthis.normalizeSelection();\n\n\t\tthis.style.setProperty(getScopedVarName(\"--_ui5_segmented_btn_items_count\"), `${items.length}`);\n\t}\n\n\tnormalizeSelection() {\n\t\tif (!this.items.length) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch (this.selectionMode) {\n\t\tcase SegmentedButtonSelectionMode.Single: {\n\t\t\tconst selectedItems = this.selectedItems;\n\t\t\tconst selectedItemIndex = this._selectedItem ? selectedItems.indexOf(this._selectedItem) : -1;\n\t\t\tif (this._selectedItem && selectedItems.length > 1) {\n\t\t\t\tselectedItems.splice(selectedItemIndex, 1);\n\t\t\t}\n\t\t\tconst selectedItem = selectedItems.pop() || this.items[0];\n\t\t\tthis._applySingleSelection(selectedItem);\n\t\t\tbreak;\n\t\t}\n\t\tdefault:\n\t\t}\n\t}\n\n\t_selectItem(e: MouseEvent | KeyboardEvent) {\n\t\tconst target = e.target as SegmentedButtonItem;\n\t\tconst isTargetSegmentedButtonItem = target.hasAttribute(\"ui5-segmented-button-item\");\n\n\t\tif (target.disabled || target === this.getDomRef() || !isTargetSegmentedButtonItem) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch (this.selectionMode) {\n\t\tcase SegmentedButtonSelectionMode.Multiple:\n\t\t\tif (e instanceof KeyboardEvent) {\n\t\t\t\ttarget.selected = !target.selected;\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthis._applySingleSelection(target);\n\t\t}\n\n\t\tthis.fireDecoratorEvent(\"selection-change\", {\n\t\t\tselectedItems: this.selectedItems,\n\t\t});\n\n\t\tthis._itemNavigation.setCurrentItem(target);\n\n\t\treturn this;\n\t}\n\n\t_applySingleSelection(item: ISegmentedButtonItem) {\n\t\tthis.items.forEach(currentItem => {\n\t\t\tcurrentItem.selected = false;\n\t\t});\n\t\titem.selected = true;\n\t\tthis._selectedItem = item;\n\t}\n\n\t_onclick(e: MouseEvent) {\n\t\tthis._selectItem(e);\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isEnter(e)) {\n\t\t\tthis._selectItem(e);\n\t\t} else if (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\tthis._selectItem(e);\n\t\t}\n\t}\n\n\t_onmousedown(e: MouseEvent) {\n\t\tconst eventTarget = e.target as SegmentedButtonItem;\n\t\tconst isTargetSegmentedButtonItem = eventTarget.hasAttribute(\"ui5-segmented-button-item\");\n\n\t\tif (isTargetSegmentedButtonItem) {\n\t\t\tthis._itemNavigation.setCurrentItem(eventTarget);\n\t\t\tthis.hasPreviouslyFocusedItem = true;\n\t\t}\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\t// If the component was previously focused,\n\t\t// update the ItemNavigation to sync the button's tabindex values\n\t\tif (this.hasPreviouslyFocusedItem) {\n\t\t\tthis._itemNavigation.setCurrentItem(e.target as SegmentedButtonItem);\n\t\t\treturn;\n\t\t}\n\n\t\t// If the component is focused for the first time\n\t\t// focus the selected item if such is present\n\t\tif (this.selectedItems.length) {\n\t\t\tthis._itemNavigation.setCurrentItem(this.selectedItems[0]);\n\t\t\tthis.selectedItems[0].focus();\n\t\t\tthis.hasPreviouslyFocusedItem = true;\n\t\t}\n\t}\n\n\t/**\n\t * Returns an array of the currently selected items.\n\t * @since 1.14.0\n\t * @public\n\t * @default []\n\t */\n\tget selectedItems(): Array<ISegmentedButtonItem> {\n\t\treturn this.items.filter(item => item.selected);\n\t}\n\n\tget navigatableItems() {\n\t\treturn this.getSlottedNodes<SegmentedButtonItem>(\"items\").filter(item => {\n\t\t\treturn !item.disabled;\n\t\t});\n\t}\n\n\tget ariaDescribedBy() {\n\t\treturn SegmentedButton.i18nBundle.getText(SEGMENTEDBUTTON_ARIA_DESCRIBEDBY);\n\t}\n\n\tget ariaDescription() {\n\t\treturn SegmentedButton.i18nBundle.getText(SEGMENTEDBUTTON_ARIA_DESCRIPTION);\n\t}\n}\n\nSegmentedButton.define();\n\nexport default SegmentedButton;\nexport type {\n\tSegmentedButtonSelectionChangeEventDetail,\n\tISegm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,QAAQ,CAAC;QACvB,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,IAAI,eAAe;QAClB,OAAO,iBAAe,CAAC,UAAU,CAAC,OAAO,CAAC,gCAAgC,CAAC,CAAC;IAC7E,CAAC;IAED,IAAI,eAAe;QAClB,OAAO,iBAAe,CAAC,UAAU,CAAC,OAAO,CAAC,gCAAgC,CAAC,CAAC;IAC7E,CAAC;CACD,CAAA;AAhLA;IADC,QAAQ,EAAE;uDACa;AASxB;IADC,QAAQ,EAAE;sDACiD;AAW5D;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,uBAAuB,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;8CACxC;AAG7B;IADN,IAAI,CAAC,oBAAoB,CAAC;yCACG;AAlCzB,eAAe;IAhBpB,aAAa,CAAC;QACd,GAAG,EAAE,sBAAsB;QAC3B,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,uBAAuB;QACjC,MAAM,EAAE,kBAAkB;KAC1B,CAAC;IACF;;;;OAIG;;IACF,KAAK,CAAC,kBAAkB,EAAE;QAC1B,OAAO,EAAE,IAAI;KACb,CAAC;GAEI,eAAe,CA2LpB;AAED,eAAe,CAAC,MAAM,EAAE,CAAC;AAEzB,eAAe,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 event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport ItemNavigation from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport type { ITabbable } from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport { getScopedVarName } from \"@ui5/webcomponents-base/dist/CustomElementsScope.js\";\nimport {\n\tisSpace,\n\tisEnter,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { SEGMENTEDBUTTON_ARIA_DESCRIPTION, SEGMENTEDBUTTON_ARIA_DESCRIBEDBY } from \"./generated/i18n/i18n-defaults.js\";\nimport \"./SegmentedButtonItem.js\";\nimport type SegmentedButtonItem from \"./SegmentedButtonItem.js\";\nimport SegmentedButtonSelectionMode from \"./types/SegmentedButtonSelectionMode.js\";\n\n// Template\nimport SegmentedButtonTemplate from \"./SegmentedButtonTemplate.js\";\n\n// Styles\nimport SegmentedButtonCss from \"./generated/themes/SegmentedButton.css.js\";\n\n/**\n * Interface for components that may be slotted inside `ui5-segmented-button` as items\n * @public\n */\ninterface ISegmentedButtonItem extends UI5Element, ITabbable {\n\tdisabled: boolean,\n\tselected: boolean,\n}\n\ntype SegmentedButtonSelectionChangeEventDetail = {\n\tselectedItems: Array<ISegmentedButtonItem>,\n}\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-segmented-button` shows a group of items. When the user clicks or taps\n * one of the items, it stays in a pressed state. It automatically resizes the items\n * to fit proportionally within the component. When no width is set, the component uses the available width.\n *\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/SegmentedButton.js\";`\n * @constructor\n * @extends UI5Element\n * @since 1.0.0-rc.6\n * @public\n */\n@customElement({\n\ttag: \"ui5-segmented-button\",\n\tlanguageAware: true,\n\trenderer: jsxRenderer,\n\ttemplate: SegmentedButtonTemplate,\n\tstyles: SegmentedButtonCss,\n})\n/**\n * Fired when the selected item changes.\n * @param {Array<ISegmentedButtonItem>} selectedItems an array of selected items. Since: 1.14.0\n * @public\n */\n@event(\"selection-change\", {\n\tbubbles: true,\n})\n\nclass SegmentedButton extends UI5Element {\n\teventDetails!: {\n\t\t\"selection-change\": SegmentedButtonSelectionChangeEventDetail,\n\t}\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.0.3\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Defines the component selection mode.\n\t * @default \"Single\"\n\t * @public\n\t * @since 1.14.0\n\t */\n\t@property()\n\tselectionMode: `${SegmentedButtonSelectionMode}` = \"Single\";\n\n\t/**\n\t * Defines the items of `ui5-segmented-button`.\n\t *\n\t * **Note:** Multiple items are allowed.\n\t *\n\t * **Note:** Use the `ui5-segmented-button-item` for the intended design.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, invalidateOnChildChange: true, \"default\": true })\n\titems!: Array<ISegmentedButtonItem>;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\t_itemNavigation: ItemNavigation;\n\n\thasPreviouslyFocusedItem: boolean;\n\n\t_selectedItem?: ISegmentedButtonItem;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._itemNavigation = new ItemNavigation(this, {\n\t\t\tgetItemsCallback: () => this.navigatableItems,\n\t\t});\n\t\tthis.hasPreviouslyFocusedItem = false;\n\t}\n\n\tonBeforeRendering() {\n\t\tconst items = this.getSlottedNodes<SegmentedButtonItem>(\"items\");\n\n\t\titems.forEach((item, index, arr) => {\n\t\t\titem.posInSet = index + 1;\n\t\t\titem.sizeOfSet = arr.length;\n\t\t});\n\n\t\tthis.normalizeSelection();\n\n\t\tthis.style.setProperty(getScopedVarName(\"--_ui5_segmented_btn_items_count\"), `${items.length}`);\n\t}\n\n\tnormalizeSelection() {\n\t\tif (!this.items.length) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch (this.selectionMode) {\n\t\tcase SegmentedButtonSelectionMode.Single: {\n\t\t\tconst selectedItems = this.selectedItems;\n\t\t\tconst selectedItemIndex = this._selectedItem ? selectedItems.indexOf(this._selectedItem) : -1;\n\t\t\tif (this._selectedItem && selectedItems.length > 1) {\n\t\t\t\tselectedItems.splice(selectedItemIndex, 1);\n\t\t\t}\n\t\t\tconst selectedItem = selectedItems.pop() || this.items[0];\n\t\t\tthis._applySingleSelection(selectedItem);\n\t\t\tbreak;\n\t\t}\n\t\tdefault:\n\t\t}\n\t}\n\n\t_selectItem(e: MouseEvent | KeyboardEvent) {\n\t\tconst target = e.target as SegmentedButtonItem;\n\t\tconst isTargetSegmentedButtonItem = target.hasAttribute(\"ui5-segmented-button-item\");\n\n\t\tif (target.disabled || target === this.getDomRef() || !isTargetSegmentedButtonItem) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch (this.selectionMode) {\n\t\tcase SegmentedButtonSelectionMode.Multiple:\n\t\t\tif (e instanceof KeyboardEvent) {\n\t\t\t\ttarget.selected = !target.selected;\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthis._applySingleSelection(target);\n\t\t}\n\n\t\tthis.fireDecoratorEvent(\"selection-change\", {\n\t\t\tselectedItems: this.selectedItems,\n\t\t});\n\n\t\tthis._itemNavigation.setCurrentItem(target);\n\n\t\treturn this;\n\t}\n\n\t_applySingleSelection(item: ISegmentedButtonItem) {\n\t\tthis.items.forEach(currentItem => {\n\t\t\tcurrentItem.selected = false;\n\t\t});\n\t\titem.selected = true;\n\t\tthis._selectedItem = item;\n\t}\n\n\t_onclick(e: MouseEvent) {\n\t\tthis._selectItem(e);\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isEnter(e)) {\n\t\t\tthis._selectItem(e);\n\t\t} else if (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\tthis._selectItem(e);\n\t\t}\n\t}\n\n\t_onmousedown(e: MouseEvent) {\n\t\tconst eventTarget = e.target as SegmentedButtonItem;\n\t\tconst isTargetSegmentedButtonItem = eventTarget.hasAttribute(\"ui5-segmented-button-item\");\n\n\t\tif (isTargetSegmentedButtonItem) {\n\t\t\tthis._itemNavigation.setCurrentItem(eventTarget);\n\t\t\tthis.hasPreviouslyFocusedItem = true;\n\t\t}\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\t// If the component was previously focused,\n\t\t// update the ItemNavigation to sync the button's tabindex values\n\t\tif (this.hasPreviouslyFocusedItem) {\n\t\t\tthis._itemNavigation.setCurrentItem(e.target as SegmentedButtonItem);\n\t\t\treturn;\n\t\t}\n\n\t\t// If the component is focused for the first time\n\t\t// focus the selected item if such is present\n\t\tif (this.selectedItems.length) {\n\t\t\tthis._itemNavigation.setCurrentItem(this.selectedItems[0]);\n\t\t\tthis.selectedItems[0].focus();\n\t\t\tthis.hasPreviouslyFocusedItem = true;\n\t\t}\n\t}\n\n\t/**\n\t * Returns an array of the currently selected items.\n\t * @since 1.14.0\n\t * @public\n\t * @default []\n\t */\n\tget selectedItems(): Array<ISegmentedButtonItem> {\n\t\treturn this.items.filter(item => item.selected);\n\t}\n\n\tget navigatableItems() {\n\t\treturn this.getSlottedNodes<SegmentedButtonItem>(\"items\").filter(item => {\n\t\t\treturn !item.disabled;\n\t\t});\n\t}\n\n\tget ariaDescribedBy() {\n\t\treturn SegmentedButton.i18nBundle.getText(SEGMENTEDBUTTON_ARIA_DESCRIBEDBY);\n\t}\n\n\tget ariaDescription() {\n\t\treturn SegmentedButton.i18nBundle.getText(SEGMENTEDBUTTON_ARIA_DESCRIPTION);\n\t}\n}\n\nSegmentedButton.define();\n\nexport default SegmentedButton;\nexport type {\n\tSegmentedButtonSelectionChangeEventDetail,\n\tISegmentedButtonItem,\n};\n"]}
|
|
@@ -18,7 +18,6 @@ import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
|
|
|
18
18
|
import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
|
|
19
19
|
import { SEGMENTEDBUTTONITEM_ARIA_DESCRIPTION } from "./generated/i18n/i18n-defaults.js";
|
|
20
20
|
import SegmentedButtonItemTemplate from "./SegmentedButtonItemTemplate.js";
|
|
21
|
-
import Icon from "./Icon.js";
|
|
22
21
|
import segmentedButtonItemCss from "./generated/themes/SegmentedButtonItem.css.js";
|
|
23
22
|
/**
|
|
24
23
|
* @class
|
|
@@ -166,7 +165,6 @@ SegmentedButtonItem = SegmentedButtonItem_1 = __decorate([
|
|
|
166
165
|
renderer: jsxRenderer,
|
|
167
166
|
template: SegmentedButtonItemTemplate,
|
|
168
167
|
styles: segmentedButtonItemCss,
|
|
169
|
-
dependencies: [Icon],
|
|
170
168
|
})
|
|
171
169
|
], SegmentedButtonItem);
|
|
172
170
|
SegmentedButtonItem.define();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedButtonItem.js","sourceRoot":"","sources":["../src/SegmentedButtonItem.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,+DAA+D,CAAC;AAC1G,OAAO,eAAe,MAAM,sDAAsD,CAAC;AACnF,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,EAAE,oCAAoC,EAAE,MAAM,mCAAmC,CAAC;AAEzF,OAAO,2BAA2B,MAAM,kCAAkC,CAAC;AAG3E,OAAO,
|
|
1
|
+
{"version":3,"file":"SegmentedButtonItem.js","sourceRoot":"","sources":["../src/SegmentedButtonItem.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,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,EAAE,OAAO,EAAE,CAAC;qDACX;AAOjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;2DACL;AAOvB;IADC,QAAQ,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;2DACR;AAQxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDACd;AAQb;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sDACb;AASd;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;iDACnB;AAGZ;IADN,IAAI,CAAC,oBAAoB,CAAC;6CACG;AA3GzB,mBAAmB;IANxB,aAAa,CAAC;QACd,GAAG,EAAE,2BAA2B;QAChC,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,2BAA2B;QACrC,MAAM,EAAE,sBAAsB;KAC9B,CAAC;GACI,mBAAmB,CAmKxB;AAED,mBAAmB,CAAC,MAAM,EAAE,CAAC;AAE7B,eAAe,mBAAmB,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport { getEnableDefaultTooltips } from \"@ui5/webcomponents-base/dist/config/Tooltips.js\";\nimport { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport { isSpaceShift } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\nimport willShowContent from \"@ui5/webcomponents-base/dist/util/willShowContent.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport { SEGMENTEDBUTTONITEM_ARIA_DESCRIPTION } from \"./generated/i18n/i18n-defaults.js\";\nimport type { ISegmentedButtonItem } from \"./SegmentedButton.js\";\nimport SegmentedButtonItemTemplate from \"./SegmentedButtonItemTemplate.js\";\n\nimport type { IButton } from \"./Button.js\";\nimport segmentedButtonItemCss from \"./generated/themes/SegmentedButtonItem.css.js\";\n/**\n * @class\n *\n * ### Overview\n *\n * Users can use the `ui5-segmented-button-item` as part of a `ui5-segmented-button`.\n *\n * Clicking or tapping on a `ui5-segmented-button-item` changes its state to `selected`.\n * The item returns to its initial state when the user clicks or taps on it again.\n * By applying additional custom CSS-styling classes, apps can give a different style to any\n * `ui5-segmented-button-item`.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/SegmentedButtonItem.js\";`\n * @constructor\n * @extends UI5Element\n * @implements { ISegmentedButtonItem }\n * @implements { IButton }\n * @public\n */\n@customElement({\n\ttag: \"ui5-segmented-button-item\",\n\trenderer: jsxRenderer,\n\ttemplate: SegmentedButtonItemTemplate,\n\tstyles: segmentedButtonItemCss,\n})\nclass SegmentedButtonItem extends UI5Element implements IButton, ISegmentedButtonItem {\n\t/**\n\t * Defines whether the component is disabled.\n\t * A disabled component can't be selected or\n\t * focused, and it is not in the tab chain.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Determines whether the component is displayed as selected.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tselected = false;\n\n\t/**\n\t * Defines the tooltip of the component.\n\t *\n\t * **Note:** A tooltip attribute should be provided for icon-only buttons, in order to represent their exact meaning/function.\n\t * @default undefined\n\t * @public\n\t * @since 1.2.0\n\t */\n\t@property()\n\ttooltip?: string;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that label the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.1.0\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t * Defines the icon, displayed as graphical element within the component.\n\t * The SAP-icons font provides numerous options.\n\t *\n\t * Example:\n\t * See all the available icons within the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\ticon?: string;\n\n\t/**\n\t * Defines if the button has icon and no text.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\ticonOnly = false;\n\n\t/**\n\t * Indicates if the element is focusable\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tnonInteractive = false;\n\n\t/**\n\t * Defines the tabIndex of the component.\n\t * @private\n\t */\n\t@property({ noAttribute: true })\n\tforcedTabIndex?: string;\n\n\t/**\n\t * Defines the index of the item inside of the SegmentedButton.\n\t * @default 0\n\t * @private\n\t */\n\t@property({ type: Number })\n\tposInSet = 0;\n\n\t/**\n\t * Defines how many items are inside of the SegmentedButton.\n\t * @default 0\n\t * @private\n\t */\n\t@property({ type: Number })\n\tsizeOfSet = 0;\n\n\t/**\n\t * Defines the text of the component.\n\t *\n\t * **Note:** Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.\n\t * @public\n\t */\n\t@slot({ type: Node, \"default\": true })\n\ttext!: Array<Node>;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tget ariaDescription() {\n\t\treturn SegmentedButtonItem.i18nBundle.getText(SEGMENTEDBUTTONITEM_ARIA_DESCRIPTION);\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\t_onclick(e: MouseEvent) {\n\t\tif (this.disabled) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t}\n\n\t\tthis.selected = !this.selected;\n\t}\n\n\tonEnterDOM() {\n\t\tif (isDesktop()) {\n\t\t\tthis.setAttribute(\"desktop\", \"\");\n\t\t}\n\t}\n\n\tonBeforeRendering(): void {\n\t\tthis.iconOnly = !willShowContent(this.text);\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (isSpaceShift(e)) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\tget tabIndexValue() {\n\t\tif (this.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst tabindex = this.getAttribute(\"tabindex\");\n\n\t\tif (tabindex) {\n\t\t\treturn tabindex;\n\t\t}\n\n\t\treturn this.forcedTabIndex;\n\t}\n\n\tget ariaLabelText() {\n\t\treturn getEffectiveAriaLabelText(this);\n\t}\n\n\tget showIconTooltip() {\n\t\treturn getEnableDefaultTooltips() && this.iconOnly && !this.tooltip;\n\t}\n}\n\nSegmentedButtonItem.define();\n\nexport default SegmentedButtonItem;\n"]}
|
package/dist/Slider.js
CHANGED
|
@@ -10,8 +10,6 @@ import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
|
10
10
|
import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
|
|
11
11
|
import { isEscape } from "@ui5/webcomponents-base/dist/Keys.js";
|
|
12
12
|
import SliderBase from "./SliderBase.js";
|
|
13
|
-
import Icon from "./Icon.js";
|
|
14
|
-
import Input from "./Input.js";
|
|
15
13
|
// Template
|
|
16
14
|
import SliderTemplate from "./SliderTemplate.js";
|
|
17
15
|
// Texts
|
|
@@ -344,7 +342,6 @@ Slider = Slider_1 = __decorate([
|
|
|
344
342
|
languageAware: true,
|
|
345
343
|
formAssociated: true,
|
|
346
344
|
template: SliderTemplate,
|
|
347
|
-
dependencies: [Icon, Input],
|
|
348
345
|
})
|
|
349
346
|
], Slider);
|
|
350
347
|
Slider.define();
|
package/dist/Slider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.js","sourceRoot":"","sources":["../src/Slider.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,aAAa,MA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;QAC3B,OAAO,QAAM,CAAC,UAAU,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAC;IAC9D,CAAC;IAED,IAAI,eAAe;QAClB,MAAM,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC;QACnC,MAAM,GAAG,GAAG,EAAE,CAAC;QAEf,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC3B,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACtB,CAAC;QAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;YACjC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;QAC9D,CAAC;QAED,OAAO,GAAG,CAAC;IACZ,CAAC;CACD,CAAA;AAzTA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qCACjB;AAeH;IADN,IAAI,CAAC,oBAAoB,CAAC;gCACG;AAxBzB,MAAM;IAPX,aAAa,CAAC;QACd,GAAG,EAAE,YAAY;QACjB,aAAa,EAAE,IAAI;QACnB,cAAc,EAAE,IAAI;QACpB,QAAQ,EAAE,cAAc;QACxB,YAAY,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC;KAC3B,CAAC;GACI,MAAM,CAkUX;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 } 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 Icon from \"./Icon.js\";\nimport Input from \"./Input.js\";\n\n// Template\nimport SliderTemplate from \"./SliderTemplate.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\tdependencies: [Icon, Input],\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_valueInitial?: number;\n\t_valueOnInteractionStart?: number;\n\t_progressPercentage = 0;\n\t_handlePositionFromStart = 0;\n\t_lastValidInputValue: string;\n\t_tooltipInputValue: string = this.value.toString();\n\t_tooltipInputValueState: `${ValueState}` = \"None\";\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.editableTooltip) {\n\t\t\tthis._updateInputValue();\n\t\t}\n\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\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-input\")) {\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._tooltipVisibility = SliderBase.TOOLTIP_VISIBILITY.VISIBLE;\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 HTMLInputElement)?.hasAttribute(\"ui5-input\")) {\n\t\t\tthis._tooltipVisibility = SliderBase.TOOLTIP_VISIBILITY.HIDDEN;\n\t\t}\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\tif ((e.target as HTMLElement).hasAttribute(\"ui5-input\")) {\n\t\t\treturn;\n\t\t}\n\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.updateStateStorageAndFireInputEvent(\"value\");\n\t}\n\n\t/** Called when the user finish interacting with the slider\n\t * @private\n\t */\n\t_handleUp(e: TouchEvent | MouseEvent) {\n\t\tif ((e.target as HTMLElement).hasAttribute(\"ui5-input\")) {\n\t\t\treturn;\n\t\t}\n\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_onInputFocusOut(e: FocusEvent) {\n\t\tconst tooltipInput = this.shadowRoot!.querySelector(\"[ui5-input]\") as Input;\n\n\t\tthis._tooltipVisibility = SliderBase.TOOLTIP_VISIBILITY.HIDDEN;\n\t\tthis._updateValueFromInput(e);\n\n\t\tif (!this._isInputValueValid) {\n\t\t\ttooltipInput.value = this._lastValidInputValue;\n\t\t\tthis._isInputValueValid = true;\n\t\t\tthis._tooltipInputValueState = \"None\";\n\t\t}\n\t}\n\n\t_updateInputValue() {\n\t\tconst tooltipInput = this.shadowRoot!.querySelector(\"[ui5-input]\") as Input;\n\n\t\tif (!tooltipInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._isInputValueValid = parseFloat(tooltipInput.value) >= this.min && parseFloat(tooltipInput.value) <= this.max;\n\n\t\tif (!this._isInputValueValid) {\n\t\t\tthis._tooltipInputValue = this._lastValidInputValue;\n\t\t\tthis._isInputValueValid = true;\n\t\t\tthis._tooltipInputValueState = \"Negative\";\n\n\t\t\treturn;\n\t\t}\n\n\t\tthis._tooltipInputValue = this.value.toString();\n\t\tthis._lastValidInputValue = this._tooltipInputValue;\n\t\tthis._tooltipInputValueState = \"None\";\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.updateStateStorageAndFireInputEvent(\"value\");\n\t\t}\n\t}\n\n\tget inputValue() {\n\t\treturn this.value.toString();\n\t}\n\n\tget styles() {\n\t\treturn {\n\t\t\tprogress: {\n\t\t\t\t\"transform\": `scaleX(${this._progressPercentage})`,\n\t\t\t\t\"transform-origin\": `${this.directionStart} top`,\n\t\t\t},\n\t\t\thandle: {\n\t\t\t\t[this.directionStart]: `${this._handlePositionFromStart}%`,\n\t\t\t},\n\t\t\tlabel: {\n\t\t\t\t\"width\": `${this._labelWidth}%`,\n\t\t\t},\n\t\t\tlabelContainer: {\n\t\t\t\t\"width\": `100%`,\n\t\t\t\t[this.directionStart]: `-${this._labelWidth / 2}%`,\n\t\t\t},\n\t\t\ttooltip: {\n\t\t\t\t\"visibility\": `${this._tooltipVisibility}`,\n\t\t\t},\n\t\t};\n\t}\n\n\tget _sliderHandle() {\n\t\treturn this.shadowRoot!.querySelector(\".ui5-slider-handle\")!;\n\t}\n\n\tget tooltipValue() {\n\t\tconst ctor = this.constructor as typeof Slider;\n\t\tconst stepPrecision = ctor._getDecimalPrecisionOfNumber(this._effectiveStep);\n\t\treturn this.value.toFixed(stepPrecision);\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,MAAM,sCAAsC,CAAC;AAGhE,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAGzC,WAAW;AACX,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAEjD,QAAQ;AACR,OAAO,EACN,uBAAuB,EACvB,gCAAgC,EAChC,0BAA0B,GAC1B,MAAM,mCAAmC,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAOH,IAAM,MAAM,cAAZ,MAAM,MAAO,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C;QAED,OAAO,GAAG,CAAC;IACZ,CAAC;CACD,CAAA;AAzTA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qCACjB;AAeH;IADN,IAAI,CAAC,oBAAoB,CAAC;gCACG;AAxBzB,MAAM;IANX,aAAa,CAAC;QACd,GAAG,EAAE,YAAY;QACjB,aAAa,EAAE,IAAI;QACnB,cAAc,EAAE,IAAI;QACpB,QAAQ,EAAE,cAAc;KACxB,CAAC;GACI,MAAM,CAkUX;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 } 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 Input from \"./Input.js\";\n\n// Template\nimport SliderTemplate from \"./SliderTemplate.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_valueInitial?: number;\n\t_valueOnInteractionStart?: number;\n\t_progressPercentage = 0;\n\t_handlePositionFromStart = 0;\n\t_lastValidInputValue: string;\n\t_tooltipInputValue: string = this.value.toString();\n\t_tooltipInputValueState: `${ValueState}` = \"None\";\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.editableTooltip) {\n\t\t\tthis._updateInputValue();\n\t\t}\n\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\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-input\")) {\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._tooltipVisibility = SliderBase.TOOLTIP_VISIBILITY.VISIBLE;\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 HTMLInputElement)?.hasAttribute(\"ui5-input\")) {\n\t\t\tthis._tooltipVisibility = SliderBase.TOOLTIP_VISIBILITY.HIDDEN;\n\t\t}\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\tif ((e.target as HTMLElement).hasAttribute(\"ui5-input\")) {\n\t\t\treturn;\n\t\t}\n\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.updateStateStorageAndFireInputEvent(\"value\");\n\t}\n\n\t/** Called when the user finish interacting with the slider\n\t * @private\n\t */\n\t_handleUp(e: TouchEvent | MouseEvent) {\n\t\tif ((e.target as HTMLElement).hasAttribute(\"ui5-input\")) {\n\t\t\treturn;\n\t\t}\n\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_onInputFocusOut(e: FocusEvent) {\n\t\tconst tooltipInput = this.shadowRoot!.querySelector(\"[ui5-input]\") as Input;\n\n\t\tthis._tooltipVisibility = SliderBase.TOOLTIP_VISIBILITY.HIDDEN;\n\t\tthis._updateValueFromInput(e);\n\n\t\tif (!this._isInputValueValid) {\n\t\t\ttooltipInput.value = this._lastValidInputValue;\n\t\t\tthis._isInputValueValid = true;\n\t\t\tthis._tooltipInputValueState = \"None\";\n\t\t}\n\t}\n\n\t_updateInputValue() {\n\t\tconst tooltipInput = this.shadowRoot!.querySelector(\"[ui5-input]\") as Input;\n\n\t\tif (!tooltipInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._isInputValueValid = parseFloat(tooltipInput.value) >= this.min && parseFloat(tooltipInput.value) <= this.max;\n\n\t\tif (!this._isInputValueValid) {\n\t\t\tthis._tooltipInputValue = this._lastValidInputValue;\n\t\t\tthis._isInputValueValid = true;\n\t\t\tthis._tooltipInputValueState = \"Negative\";\n\n\t\t\treturn;\n\t\t}\n\n\t\tthis._tooltipInputValue = this.value.toString();\n\t\tthis._lastValidInputValue = this._tooltipInputValue;\n\t\tthis._tooltipInputValueState = \"None\";\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.updateStateStorageAndFireInputEvent(\"value\");\n\t\t}\n\t}\n\n\tget inputValue() {\n\t\treturn this.value.toString();\n\t}\n\n\tget styles() {\n\t\treturn {\n\t\t\tprogress: {\n\t\t\t\t\"transform\": `scaleX(${this._progressPercentage})`,\n\t\t\t\t\"transform-origin\": `${this.directionStart} top`,\n\t\t\t},\n\t\t\thandle: {\n\t\t\t\t[this.directionStart]: `${this._handlePositionFromStart}%`,\n\t\t\t},\n\t\t\tlabel: {\n\t\t\t\t\"width\": `${this._labelWidth}%`,\n\t\t\t},\n\t\t\tlabelContainer: {\n\t\t\t\t\"width\": `100%`,\n\t\t\t\t[this.directionStart]: `-${this._labelWidth / 2}%`,\n\t\t\t},\n\t\t\ttooltip: {\n\t\t\t\t\"visibility\": `${this._tooltipVisibility}`,\n\t\t\t},\n\t\t};\n\t}\n\n\tget _sliderHandle() {\n\t\treturn this.shadowRoot!.querySelector(\".ui5-slider-handle\")!;\n\t}\n\n\tget tooltipValue() {\n\t\tconst ctor = this.constructor as typeof Slider;\n\t\tconst stepPrecision = ctor._getDecimalPrecisionOfNumber(this._effectiveStep);\n\t\treturn this.value.toFixed(stepPrecision);\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"]}
|
package/dist/SplitButton.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
|
2
2
|
import type { AriaHasPopup } from "@ui5/webcomponents-base";
|
|
3
3
|
import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
4
4
|
import type ButtonDesign from "./types/ButtonDesign.js";
|
|
5
|
-
import Button from "./Button.js";
|
|
5
|
+
import type Button from "./Button.js";
|
|
6
6
|
/**
|
|
7
7
|
* @class
|
|
8
8
|
*
|
package/dist/SplitButton.js
CHANGED
|
@@ -13,7 +13,6 @@ import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
|
|
|
13
13
|
import { isEscape, isSpace, isEnter, isDown, isUp, isDownAlt, isUpAlt, isF4, isShift, isTabNext, isTabPrevious, } from "@ui5/webcomponents-base/dist/Keys.js";
|
|
14
14
|
import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
|
|
15
15
|
import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
|
|
16
|
-
import Button from "./Button.js";
|
|
17
16
|
import { SPLIT_BUTTON_DESCRIPTION, SPLIT_BUTTON_KEYBOARD_HINT, SPLIT_BUTTON_ARROW_BUTTON_TOOLTIP, } from "./generated/i18n/i18n-defaults.js";
|
|
18
17
|
// Template
|
|
19
18
|
import SplitButtonTemplate from "./SplitButtonTemplate.js";
|
|
@@ -388,7 +387,6 @@ SplitButton = SplitButton_1 = __decorate([
|
|
|
388
387
|
renderer: jsxRenderer,
|
|
389
388
|
styles: SplitButtonCss,
|
|
390
389
|
template: SplitButtonTemplate,
|
|
391
|
-
dependencies: [Button],
|
|
392
390
|
})
|
|
393
391
|
/**
|
|
394
392
|
* Fired when the user clicks on the default action.
|
package/dist/SplitButton.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":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C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CACT;AASlB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;qDACH;AASzB;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;yCACnB;AAMZ;IADN,IAAI,CAAC,oBAAoB,CAAC;qCACG;AAhIzB,WAAW;IAtBhB,aAAa,CAAC;QACd,GAAG,EAAE,kBAAkB;QACvB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,cAAc;QACtB,QAAQ,EAAE,mBAAmB;QAC7B,YAAY,EAAE,CAAC,MAAM,CAAC;KACtB,CAAC;IACF;;;OAGG;;IACF,KAAK,CAAC,OAAO,EAAE;QACf,OAAO,EAAE,IAAI;KACb,CAAC;IAEF;;;OAGG;;IACF,KAAK,CAAC,aAAa,EAAE;QACrB,OAAO,EAAE,IAAI;KACb,CAAC;GACI,WAAW,CA4XhB;AAED,WAAW,CAAC,MAAM,EAAE,CAAC;AAErB,eAAe,WAAW,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport {\n\tisEscape,\n\tisSpace,\n\tisEnter,\n\tisDown,\n\tisUp,\n\tisDownAlt,\n\tisUpAlt,\n\tisF4,\n\tisShift,\n\tisTabNext,\n\tisTabPrevious,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport type { AriaHasPopup } from \"@ui5/webcomponents-base\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type ButtonDesign from \"./types/ButtonDesign.js\";\nimport Button from \"./Button.js\";\n\nimport {\n\tSPLIT_BUTTON_DESCRIPTION,\n\tSPLIT_BUTTON_KEYBOARD_HINT,\n\tSPLIT_BUTTON_ARROW_BUTTON_TOOLTIP,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Template\nimport SplitButtonTemplate from \"./SplitButtonTemplate.js\";\n\n// Styles\nimport SplitButtonCss from \"./generated/themes/SplitButton.css.js\";\n\n/**\n * @class\n *\n * ### Overview\n *\n * `ui5-split-button` enables users to trigger actions. It is constructed of two separate actions -\n * default action and arrow action that can be activated by clicking or tapping, or by\n * pressing certain keyboard keys - `Space` or `Enter` for default action,\n * and `Arrow Down` or `Arrow Up` for arrow action.\n *\n * ### Usage\n *\n * `ui5-split-button` consists two separate buttons:\n *\n * - for the first one (default action) you can define some `text` or an `icon`, or both.\n * - the second one (arrow action) contains only `slim-arrow-down` icon.\n *\n * You can choose a `design` from a set of predefined types (the same as for ui5-button) that offer\n * different styling to correspond to the triggered action. Both text and arrow actions have the same design.\n *\n * You can set the `ui5-split-button` as enabled or disabled. Both parts of an enabled\n * `ui5-split-button` can be pressed by clicking or tapping it, or by certain keys, which changes\n * the style to provide visual feedback to the user that it is pressed or hovered over with\n * the mouse cursor. A disabled `ui5-split-button` appears inactive and any of the two buttons\n * cannot be pressed.\n *\n * ### Keyboard Handling\n *\n * - `Space` or `Enter` - triggers the default action\n * - `Shift` or `Escape` - if `Space` is pressed, releases the default action button without triggering the click event.\n * - `Arrow Down`, `Arrow Up`, `Alt`+`Arrow Down`, `Alt`+`Arrow Up`, or `F4` - triggers the arrow action\n * There are separate events that are fired on activating of `ui5-split-button` parts:\n *\n * - `click` for the first button (default action)\n * - `arrow-click` for the second button (arrow action)\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/SplitButton.js\";`\n * @constructor\n * @extends UI5Element\n * @public\n * @since 1.1.0\n */\n@customElement({\n\ttag: \"ui5-split-button\",\n\trenderer: jsxRenderer,\n\tstyles: SplitButtonCss,\n\ttemplate: SplitButtonTemplate,\n\tdependencies: [Button],\n})\n/**\n * Fired when the user clicks on the default action.\n * @public\n */\n@event(\"click\", {\n\tbubbles: true,\n})\n\n/**\n * Fired when the user clicks on the arrow action.\n * @public\n */\n@event(\"arrow-click\", {\n\tbubbles: true,\n})\nclass SplitButton extends UI5Element {\n\teventDetails!: {\n\t\tclick: void;\n\t\t\"arrow-click\": void;\n\t}\n\t/**\n\t * Defines the icon to be displayed as graphical element within the component.\n\t * The SAP-icons font provides numerous options.\n\t *\n\t * Example:\n\t *\n\t * See all available icons in the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\ticon?: string;\n\n\t/**\n\t * Defines whether the arrow button should have the active state styles or not.\n\t * @default false\n\t * @public\n\t * @since 1.21.0\n\t */\n\t@property({ type: Boolean })\n\tactiveArrowButton = false;\n\n\t/**\n\t * Defines the component design.\n\t * @default \"Default\"\n\t * @public\n\t */\n\t@property()\n\tdesign: `${ButtonDesign}` = \"Default\";\n\n\t/**\n\t * Defines whether the component is disabled.\n\t * A disabled component can't be pressed or\n\t * focused, and it is not in the tab chain.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Defines the tabIndex of the component.\n\t * @default \"0\"\n\t * @private\n\t */\n\t@property({ type: Number, noAttribute: true })\n\t_tabIndex = 0\n\n\t/**\n\t * Indicates if there is Space key pressed\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\t_spacePressed = false;\n\n\t/**\n\t * Indicates if there is SHIFT or ESCAPE key pressed\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\t_shiftOrEscapePressed = false;\n\n\t/**\n\t * Defines the active state of the text button\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\t_textButtonActive = false;\n\n\t/**\n\t * Defines the state of the internal Button used for the Arrow button of the SplitButton.\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\t_activeArrowButton = false;\n\n\t/**\n\t * Defines the display of the end icon as a graphical element within the default action of the component after the button text.\n\t * The SAP-icons font provides different options.\n\t *\n\t * Example:\n\t *\n\t * See all available icons in the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).\n\t * @default undefined\n\t * @private\n\t */\n\t@property({ type: String })\n\t_endIcon?: string;\n\n\t/**\n\t * Defines the visibility of the arrow button of the component.\n\t *\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_hideArrowButton = false;\n\n\t/**\n\t * Defines the text of the component.\n\t *\n\t * **Note:** Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.\n\t * @public\n\t */\n\t@slot({ type: Node, \"default\": true })\n\ttext!: Array<Node>;\n\n\t_isDefaultActionPressed = false;\n\t_isKeyDownOperation = false;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tonBeforeRendering() {\n\t\tif (this.disabled) {\n\t\t\tthis._tabIndex = -1;\n\t\t}\n\t}\n\n\t_handleMouseClick(e: MouseEvent) {\n\t\tthis._fireClick(e);\n\t}\n\n\t_onFocusOut() {\n\t\tif (this.disabled || this.getFocusDomRef()!.matches(\":has(:focus-within)\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._shiftOrEscapePressed = false;\n\t\tthis._setTabIndexValue();\n\t}\n\n\t_onFocusIn() {\n\t\tif (this.disabled || this.getFocusDomRef()!.matches(\":has(:focus-within)\")) {\n\t\t\treturn;\n\t\t}\n\t\tthis._shiftOrEscapePressed = false;\n\t}\n\n\thandleTouchStart(e: TouchEvent | MouseEvent) {\n\t\te.stopPropagation();\n\t\tthis._textButtonActive = true;\n\t\tthis._tabIndex = -1;\n\t}\n\n\t_onInnerButtonFocusIn(e: FocusEvent) {\n\t\te.stopPropagation();\n\t\tthis._setTabIndexValue(true);\n\t\tconst target = e.target as Button;\n\t\ttarget.focus();\n\t}\n\n\t_onKeyDown(e: KeyboardEvent) {\n\t\tthis._isKeyDownOperation = true;\n\t\tif (this._isArrowKeyAction(e)) {\n\t\t\tthis._handleArrowButtonAction(e);\n\t\t\tthis._activeArrowButton = true;\n\t\t} else if (this._isDefaultAction(e)) {\n\t\t\tthis._handleDefaultAction(e);\n\t\t\tthis._isDefaultActionPressed = true;\n\t\t}\n\n\t\tif (this._spacePressed && this._isShiftOrEscape(e)) {\n\t\t\tthis._handleShiftOrEscapePressed();\n\t\t}\n\n\t\t// Handles button freeze issue when pressing Enter/Space and navigating with Tab/Shift+Tab simultaneously.\n\t\tif (this._isDefaultActionPressed && (isTabNext(e) || isTabPrevious(e))) {\n\t\t\tthis._activeArrowButton = false;\n\t\t\tthis._textButtonActive = false;\n\t\t}\n\n\t\tthis._tabIndex = -1;\n\t}\n\n\t_onKeyUp(e: KeyboardEvent) {\n\t\tthis._isKeyDownOperation = false;\n\t\tif (this._isArrowKeyAction(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._activeArrowButton = false;\n\t\t\tthis._textButtonActive = false;\n\t\t} else if (this._isDefaultAction(e)) {\n\t\t\tthis._isDefaultActionPressed = false;\n\t\t\tthis._textButtonActive = false;\n\t\t\tif (isSpace(e)) {\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopPropagation();\n\t\t\t\tthis._fireClick();\n\t\t\t\tthis._spacePressed = false;\n\t\t\t\tthis._textButtonActive = false;\n\t\t\t}\n\t\t}\n\n\t\tif (this._isShiftOrEscape(e)) {\n\t\t\tthis._handleShiftOrEscapePressed();\n\t\t}\n\n\t\tthis._tabIndex = -1;\n\t}\n\n\t_fireClick(e?: Event) {\n\t\te?.stopPropagation();\n\t\tif (!this._shiftOrEscapePressed) {\n\t\t\tthis.fireDecoratorEvent(\"click\");\n\t\t}\n\t\tthis._shiftOrEscapePressed = false;\n\t}\n\n\t_fireArrowClick(e?: Event) {\n\t\te?.stopPropagation();\n\n\t\tthis.fireDecoratorEvent(\"arrow-click\");\n\t}\n\n\t_textButtonRelease() {\n\t\tthis._textButtonActive = false;\n\t\tthis._tabIndex = -1;\n\t}\n\n\t_arrowButtonPress(e: MouseEvent) {\n\t\te.stopPropagation();\n\n\t\tthis._tabIndex = -1;\n\t}\n\n\t_arrowButtonRelease(e: MouseEvent) {\n\t\te.preventDefault();\n\n\t\tthis._tabIndex = -1;\n\t}\n\n\t_setTabIndexValue(innerButtonPressed?: boolean) {\n\t\tthis._tabIndex = this.disabled ? -1 : 0;\n\n\t\tif (this._tabIndex === -1 && innerButtonPressed) {\n\t\t\tthis._tabIndex = 0;\n\t\t}\n\t}\n\n\t_onArrowButtonActiveStateChange(e: CustomEvent) {\n\t\tif (this.activeArrowButton) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the pressed key is an arrow key.\n\t * @param e - keyboard event\n\t * @private\n\t */\n\t_isArrowKeyAction(e: KeyboardEvent): boolean {\n\t\treturn isDown(e) || isUp(e) || isDownAlt(e) || isUpAlt(e) || isF4(e);\n\t}\n\n\t/**\n\t * Checks if the pressed key is a default action key (Space or Enter).\n\t * @param e - keyboard event\n\t * @private\n\t */\n\t_isDefaultAction(e: KeyboardEvent): boolean {\n\t\treturn isSpace(e) || isEnter(e);\n\t}\n\n\t/**\n\t * Checks if the pressed key is an escape key or shift key.\n\t * @param e - keyboard event\n\t * @private\n\t */\n\t_isShiftOrEscape(e: KeyboardEvent): boolean {\n\t\treturn isEscape(e) || isShift(e);\n\t}\n\n\t/**\n\t * Handles the click event and the focus on the arrow button.\n\t * @param e - keyboard event\n\t * @private\n\t */\n\t_handleArrowButtonAction(e: KeyboardEvent | MouseEvent) {\n\t\te.preventDefault();\n\n\t\tthis._fireArrowClick(e);\n\n\t\tif (isSpace((e as KeyboardEvent))) {\n\t\t\tthis._spacePressed = true;\n\t\t}\n\t}\n\n\t/**\n\t * Handles the default action and the active state of the respective button.\n\t * @param e - keyboard event\n\t * @private\n\t */\n\t_handleDefaultAction(e: KeyboardEvent) {\n\t\te.preventDefault();\n\t\tconst wasSpacePressed = isSpace(e);\n\t\tconst target = e.target as Button;\n\n\t\tif (this.arrowButton && target === this.arrowButton) {\n\t\t\tthis._activeArrowButton = true;\n\t\t\tthis._fireArrowClick();\n\t\t\tif (wasSpacePressed) {\n\t\t\t\tthis._spacePressed = true;\n\t\t\t\tthis._textButtonActive = false;\n\t\t\t}\n\t\t} else {\n\t\t\tthis._textButtonActive = true;\n\t\t\tif (wasSpacePressed) {\n\t\t\t\tthis._spacePressed = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._fireClick();\n\t\t}\n\t}\n\n\t_handleShiftOrEscapePressed() {\n\t\tthis._shiftOrEscapePressed = true;\n\t\tthis._textButtonActive = false;\n\t\tthis._isKeyDownOperation = false;\n\t}\n\n\tget effectiveActiveArrowButton() {\n\t\treturn this.activeArrowButton || this._activeArrowButton;\n\t}\n\n\tget textButtonAccText() {\n\t\treturn this.textContent;\n\t}\n\n\tget isTextButton() {\n\t\treturn !!this.textContent;\n\t}\n\n\tget textButton() {\n\t\treturn this.getDomRef()?.querySelector<Button>(\".ui5-split-text-button\");\n\t}\n\n\tget arrowButton() {\n\t\treturn this.getDomRef()?.querySelector<Button>(\".ui5-split-arrow-button\");\n\t}\n\n\tget accInfo() {\n\t\treturn {\n\t\t\troot: {\n\t\t\t\t\"description\": SplitButton.i18nBundle.getText(SPLIT_BUTTON_DESCRIPTION),\n\t\t\t\t\"keyboardHint\": SplitButton.i18nBundle.getText(SPLIT_BUTTON_KEYBOARD_HINT),\n\t\t\t},\n\t\t\tarrowButton: {\n\t\t\t\t\"title\": this.arrowButtonTooltip,\n\t\t\t\t\"accessibilityAttributes\": {\n\t\t\t\t\t\"hasPopup\": \"menu\" as AriaHasPopup,\n\t\t\t\t\t\"expanded\": this.effectiveActiveArrowButton,\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t}\n\n\tget arrowButtonTooltip() {\n\t\treturn SplitButton.i18nBundle.getText(SPLIT_BUTTON_ARROW_BUTTON_TOOLTIP);\n\t}\n\n\tget ariaLabelText() {\n\t\treturn [SplitButton.i18nBundle.getText(SPLIT_BUTTON_DESCRIPTION), SplitButton.i18nBundle.getText(SPLIT_BUTTON_KEYBOARD_HINT)].join(\" \");\n\t}\n}\n\nSplitButton.define();\n\nexport default SplitButton;\n"]}
|
|
1
|
+
{"version":3,"file":"SplitButton.js","sourceRoot":"","sources":["../src/SplitButton.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,EACN,QAAQ,EACR,OAAO,EACP,OAAO,EACP,MAAM,EACN,IAAI,EACJ,SAAS,EACT,OAAO,EACP,IAAI,EACJ,OAAO,EACP,SAAS,EACT,aAAa,GACb,MAAM,sCAAsC,CAAC;AAE9C,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAK/E,OAAO,EACN,wBAAwB,EACxB,0BAA0B,EAC1B,iCAAiC,GACjC,MAAM,mCAAmC,CAAC;AAE3C,WAAW;AACX,OAAO,mBAAmB,MAAM,0BAA0B,CAAC;AAE3D,SAAS;AACT,OAAO,cAAc,MAAM,uCAAuC,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAsBH,IAAM,WAAW,mBAAjB,MAAM,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EAAE,IAAI,EAAE,CAAC;8CACjC;AAQb;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;kDACzB;AAQtB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;0DACjB;AAQ9B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;sDACrB;AAQ1B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;uDACpB;AAa3B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CACT;AASlB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;qDACH;AASzB;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;yCACnB;AAMZ;IADN,IAAI,CAAC,oBAAoB,CAAC;qCACG;AAhIzB,WAAW;IArBhB,aAAa,CAAC;QACd,GAAG,EAAE,kBAAkB;QACvB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,cAAc;QACtB,QAAQ,EAAE,mBAAmB;KAC7B,CAAC;IACF;;;OAGG;;IACF,KAAK,CAAC,OAAO,EAAE;QACf,OAAO,EAAE,IAAI;KACb,CAAC;IAEF;;;OAGG;;IACF,KAAK,CAAC,aAAa,EAAE;QACrB,OAAO,EAAE,IAAI;KACb,CAAC;GACI,WAAW,CA4XhB;AAED,WAAW,CAAC,MAAM,EAAE,CAAC;AAErB,eAAe,WAAW,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport {\n\tisEscape,\n\tisSpace,\n\tisEnter,\n\tisDown,\n\tisUp,\n\tisDownAlt,\n\tisUpAlt,\n\tisF4,\n\tisShift,\n\tisTabNext,\n\tisTabPrevious,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport type { AriaHasPopup } from \"@ui5/webcomponents-base\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type ButtonDesign from \"./types/ButtonDesign.js\";\nimport type Button from \"./Button.js\";\n\nimport {\n\tSPLIT_BUTTON_DESCRIPTION,\n\tSPLIT_BUTTON_KEYBOARD_HINT,\n\tSPLIT_BUTTON_ARROW_BUTTON_TOOLTIP,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Template\nimport SplitButtonTemplate from \"./SplitButtonTemplate.js\";\n\n// Styles\nimport SplitButtonCss from \"./generated/themes/SplitButton.css.js\";\n\n/**\n * @class\n *\n * ### Overview\n *\n * `ui5-split-button` enables users to trigger actions. It is constructed of two separate actions -\n * default action and arrow action that can be activated by clicking or tapping, or by\n * pressing certain keyboard keys - `Space` or `Enter` for default action,\n * and `Arrow Down` or `Arrow Up` for arrow action.\n *\n * ### Usage\n *\n * `ui5-split-button` consists two separate buttons:\n *\n * - for the first one (default action) you can define some `text` or an `icon`, or both.\n * - the second one (arrow action) contains only `slim-arrow-down` icon.\n *\n * You can choose a `design` from a set of predefined types (the same as for ui5-button) that offer\n * different styling to correspond to the triggered action. Both text and arrow actions have the same design.\n *\n * You can set the `ui5-split-button` as enabled or disabled. Both parts of an enabled\n * `ui5-split-button` can be pressed by clicking or tapping it, or by certain keys, which changes\n * the style to provide visual feedback to the user that it is pressed or hovered over with\n * the mouse cursor. A disabled `ui5-split-button` appears inactive and any of the two buttons\n * cannot be pressed.\n *\n * ### Keyboard Handling\n *\n * - `Space` or `Enter` - triggers the default action\n * - `Shift` or `Escape` - if `Space` is pressed, releases the default action button without triggering the click event.\n * - `Arrow Down`, `Arrow Up`, `Alt`+`Arrow Down`, `Alt`+`Arrow Up`, or `F4` - triggers the arrow action\n * There are separate events that are fired on activating of `ui5-split-button` parts:\n *\n * - `click` for the first button (default action)\n * - `arrow-click` for the second button (arrow action)\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/SplitButton.js\";`\n * @constructor\n * @extends UI5Element\n * @public\n * @since 1.1.0\n */\n@customElement({\n\ttag: \"ui5-split-button\",\n\trenderer: jsxRenderer,\n\tstyles: SplitButtonCss,\n\ttemplate: SplitButtonTemplate,\n})\n/**\n * Fired when the user clicks on the default action.\n * @public\n */\n@event(\"click\", {\n\tbubbles: true,\n})\n\n/**\n * Fired when the user clicks on the arrow action.\n * @public\n */\n@event(\"arrow-click\", {\n\tbubbles: true,\n})\nclass SplitButton extends UI5Element {\n\teventDetails!: {\n\t\tclick: void;\n\t\t\"arrow-click\": void;\n\t}\n\t/**\n\t * Defines the icon to be displayed as graphical element within the component.\n\t * The SAP-icons font provides numerous options.\n\t *\n\t * Example:\n\t *\n\t * See all available icons in the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\ticon?: string;\n\n\t/**\n\t * Defines whether the arrow button should have the active state styles or not.\n\t * @default false\n\t * @public\n\t * @since 1.21.0\n\t */\n\t@property({ type: Boolean })\n\tactiveArrowButton = false;\n\n\t/**\n\t * Defines the component design.\n\t * @default \"Default\"\n\t * @public\n\t */\n\t@property()\n\tdesign: `${ButtonDesign}` = \"Default\";\n\n\t/**\n\t * Defines whether the component is disabled.\n\t * A disabled component can't be pressed or\n\t * focused, and it is not in the tab chain.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Defines the tabIndex of the component.\n\t * @default \"0\"\n\t * @private\n\t */\n\t@property({ type: Number, noAttribute: true })\n\t_tabIndex = 0\n\n\t/**\n\t * Indicates if there is Space key pressed\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\t_spacePressed = false;\n\n\t/**\n\t * Indicates if there is SHIFT or ESCAPE key pressed\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\t_shiftOrEscapePressed = false;\n\n\t/**\n\t * Defines the active state of the text button\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\t_textButtonActive = false;\n\n\t/**\n\t * Defines the state of the internal Button used for the Arrow button of the SplitButton.\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\t_activeArrowButton = false;\n\n\t/**\n\t * Defines the display of the end icon as a graphical element within the default action of the component after the button text.\n\t * The SAP-icons font provides different options.\n\t *\n\t * Example:\n\t *\n\t * See all available icons in the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).\n\t * @default undefined\n\t * @private\n\t */\n\t@property({ type: String })\n\t_endIcon?: string;\n\n\t/**\n\t * Defines the visibility of the arrow button of the component.\n\t *\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_hideArrowButton = false;\n\n\t/**\n\t * Defines the text of the component.\n\t *\n\t * **Note:** Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.\n\t * @public\n\t */\n\t@slot({ type: Node, \"default\": true })\n\ttext!: Array<Node>;\n\n\t_isDefaultActionPressed = false;\n\t_isKeyDownOperation = false;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tonBeforeRendering() {\n\t\tif (this.disabled) {\n\t\t\tthis._tabIndex = -1;\n\t\t}\n\t}\n\n\t_handleMouseClick(e: MouseEvent) {\n\t\tthis._fireClick(e);\n\t}\n\n\t_onFocusOut() {\n\t\tif (this.disabled || this.getFocusDomRef()!.matches(\":has(:focus-within)\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._shiftOrEscapePressed = false;\n\t\tthis._setTabIndexValue();\n\t}\n\n\t_onFocusIn() {\n\t\tif (this.disabled || this.getFocusDomRef()!.matches(\":has(:focus-within)\")) {\n\t\t\treturn;\n\t\t}\n\t\tthis._shiftOrEscapePressed = false;\n\t}\n\n\thandleTouchStart(e: TouchEvent | MouseEvent) {\n\t\te.stopPropagation();\n\t\tthis._textButtonActive = true;\n\t\tthis._tabIndex = -1;\n\t}\n\n\t_onInnerButtonFocusIn(e: FocusEvent) {\n\t\te.stopPropagation();\n\t\tthis._setTabIndexValue(true);\n\t\tconst target = e.target as Button;\n\t\ttarget.focus();\n\t}\n\n\t_onKeyDown(e: KeyboardEvent) {\n\t\tthis._isKeyDownOperation = true;\n\t\tif (this._isArrowKeyAction(e)) {\n\t\t\tthis._handleArrowButtonAction(e);\n\t\t\tthis._activeArrowButton = true;\n\t\t} else if (this._isDefaultAction(e)) {\n\t\t\tthis._handleDefaultAction(e);\n\t\t\tthis._isDefaultActionPressed = true;\n\t\t}\n\n\t\tif (this._spacePressed && this._isShiftOrEscape(e)) {\n\t\t\tthis._handleShiftOrEscapePressed();\n\t\t}\n\n\t\t// Handles button freeze issue when pressing Enter/Space and navigating with Tab/Shift+Tab simultaneously.\n\t\tif (this._isDefaultActionPressed && (isTabNext(e) || isTabPrevious(e))) {\n\t\t\tthis._activeArrowButton = false;\n\t\t\tthis._textButtonActive = false;\n\t\t}\n\n\t\tthis._tabIndex = -1;\n\t}\n\n\t_onKeyUp(e: KeyboardEvent) {\n\t\tthis._isKeyDownOperation = false;\n\t\tif (this._isArrowKeyAction(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._activeArrowButton = false;\n\t\t\tthis._textButtonActive = false;\n\t\t} else if (this._isDefaultAction(e)) {\n\t\t\tthis._isDefaultActionPressed = false;\n\t\t\tthis._textButtonActive = false;\n\t\t\tif (isSpace(e)) {\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopPropagation();\n\t\t\t\tthis._fireClick();\n\t\t\t\tthis._spacePressed = false;\n\t\t\t\tthis._textButtonActive = false;\n\t\t\t}\n\t\t}\n\n\t\tif (this._isShiftOrEscape(e)) {\n\t\t\tthis._handleShiftOrEscapePressed();\n\t\t}\n\n\t\tthis._tabIndex = -1;\n\t}\n\n\t_fireClick(e?: Event) {\n\t\te?.stopPropagation();\n\t\tif (!this._shiftOrEscapePressed) {\n\t\t\tthis.fireDecoratorEvent(\"click\");\n\t\t}\n\t\tthis._shiftOrEscapePressed = false;\n\t}\n\n\t_fireArrowClick(e?: Event) {\n\t\te?.stopPropagation();\n\n\t\tthis.fireDecoratorEvent(\"arrow-click\");\n\t}\n\n\t_textButtonRelease() {\n\t\tthis._textButtonActive = false;\n\t\tthis._tabIndex = -1;\n\t}\n\n\t_arrowButtonPress(e: MouseEvent) {\n\t\te.stopPropagation();\n\n\t\tthis._tabIndex = -1;\n\t}\n\n\t_arrowButtonRelease(e: MouseEvent) {\n\t\te.preventDefault();\n\n\t\tthis._tabIndex = -1;\n\t}\n\n\t_setTabIndexValue(innerButtonPressed?: boolean) {\n\t\tthis._tabIndex = this.disabled ? -1 : 0;\n\n\t\tif (this._tabIndex === -1 && innerButtonPressed) {\n\t\t\tthis._tabIndex = 0;\n\t\t}\n\t}\n\n\t_onArrowButtonActiveStateChange(e: CustomEvent) {\n\t\tif (this.activeArrowButton) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the pressed key is an arrow key.\n\t * @param e - keyboard event\n\t * @private\n\t */\n\t_isArrowKeyAction(e: KeyboardEvent): boolean {\n\t\treturn isDown(e) || isUp(e) || isDownAlt(e) || isUpAlt(e) || isF4(e);\n\t}\n\n\t/**\n\t * Checks if the pressed key is a default action key (Space or Enter).\n\t * @param e - keyboard event\n\t * @private\n\t */\n\t_isDefaultAction(e: KeyboardEvent): boolean {\n\t\treturn isSpace(e) || isEnter(e);\n\t}\n\n\t/**\n\t * Checks if the pressed key is an escape key or shift key.\n\t * @param e - keyboard event\n\t * @private\n\t */\n\t_isShiftOrEscape(e: KeyboardEvent): boolean {\n\t\treturn isEscape(e) || isShift(e);\n\t}\n\n\t/**\n\t * Handles the click event and the focus on the arrow button.\n\t * @param e - keyboard event\n\t * @private\n\t */\n\t_handleArrowButtonAction(e: KeyboardEvent | MouseEvent) {\n\t\te.preventDefault();\n\n\t\tthis._fireArrowClick(e);\n\n\t\tif (isSpace((e as KeyboardEvent))) {\n\t\t\tthis._spacePressed = true;\n\t\t}\n\t}\n\n\t/**\n\t * Handles the default action and the active state of the respective button.\n\t * @param e - keyboard event\n\t * @private\n\t */\n\t_handleDefaultAction(e: KeyboardEvent) {\n\t\te.preventDefault();\n\t\tconst wasSpacePressed = isSpace(e);\n\t\tconst target = e.target as Button;\n\n\t\tif (this.arrowButton && target === this.arrowButton) {\n\t\t\tthis._activeArrowButton = true;\n\t\t\tthis._fireArrowClick();\n\t\t\tif (wasSpacePressed) {\n\t\t\t\tthis._spacePressed = true;\n\t\t\t\tthis._textButtonActive = false;\n\t\t\t}\n\t\t} else {\n\t\t\tthis._textButtonActive = true;\n\t\t\tif (wasSpacePressed) {\n\t\t\t\tthis._spacePressed = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._fireClick();\n\t\t}\n\t}\n\n\t_handleShiftOrEscapePressed() {\n\t\tthis._shiftOrEscapePressed = true;\n\t\tthis._textButtonActive = false;\n\t\tthis._isKeyDownOperation = false;\n\t}\n\n\tget effectiveActiveArrowButton() {\n\t\treturn this.activeArrowButton || this._activeArrowButton;\n\t}\n\n\tget textButtonAccText() {\n\t\treturn this.textContent;\n\t}\n\n\tget isTextButton() {\n\t\treturn !!this.textContent;\n\t}\n\n\tget textButton() {\n\t\treturn this.getDomRef()?.querySelector<Button>(\".ui5-split-text-button\");\n\t}\n\n\tget arrowButton() {\n\t\treturn this.getDomRef()?.querySelector<Button>(\".ui5-split-arrow-button\");\n\t}\n\n\tget accInfo() {\n\t\treturn {\n\t\t\troot: {\n\t\t\t\t\"description\": SplitButton.i18nBundle.getText(SPLIT_BUTTON_DESCRIPTION),\n\t\t\t\t\"keyboardHint\": SplitButton.i18nBundle.getText(SPLIT_BUTTON_KEYBOARD_HINT),\n\t\t\t},\n\t\t\tarrowButton: {\n\t\t\t\t\"title\": this.arrowButtonTooltip,\n\t\t\t\t\"accessibilityAttributes\": {\n\t\t\t\t\t\"hasPopup\": \"menu\" as AriaHasPopup,\n\t\t\t\t\t\"expanded\": this.effectiveActiveArrowButton,\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t}\n\n\tget arrowButtonTooltip() {\n\t\treturn SplitButton.i18nBundle.getText(SPLIT_BUTTON_ARROW_BUTTON_TOOLTIP);\n\t}\n\n\tget ariaLabelText() {\n\t\treturn [SplitButton.i18nBundle.getText(SPLIT_BUTTON_DESCRIPTION), SplitButton.i18nBundle.getText(SPLIT_BUTTON_KEYBOARD_HINT)].join(\" \");\n\t}\n}\n\nSplitButton.define();\n\nexport default SplitButton;\n"]}
|
package/dist/StepInput.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { Timeout } from "@ui5/webcomponents-base/dist/types.js";
|
|
|
5
5
|
import type { IFormInputElement } from "@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js";
|
|
6
6
|
import "@ui5/webcomponents-icons/dist/less.js";
|
|
7
7
|
import "@ui5/webcomponents-icons/dist/add.js";
|
|
8
|
-
import Input from "./Input.js";
|
|
8
|
+
import type Input from "./Input.js";
|
|
9
9
|
import type { InputAccInfo, InputEventDetail } from "./Input.js";
|
|
10
10
|
import InputType from "./types/InputType.js";
|
|
11
11
|
type StepInputValueStateChangeEventDetail = {
|
package/dist/StepInput.js
CHANGED
|
@@ -19,8 +19,6 @@ import StepInputTemplate from "./StepInputTemplate.js";
|
|
|
19
19
|
import { STEPINPUT_DEC_ICON_TITLE, STEPINPUT_INC_ICON_TITLE } from "./generated/i18n/i18n-defaults.js";
|
|
20
20
|
import "@ui5/webcomponents-icons/dist/less.js";
|
|
21
21
|
import "@ui5/webcomponents-icons/dist/add.js";
|
|
22
|
-
import Icon from "./Icon.js";
|
|
23
|
-
import Input from "./Input.js";
|
|
24
22
|
import InputType from "./types/InputType.js";
|
|
25
23
|
// Styles
|
|
26
24
|
import StepInputCss from "./generated/themes/StepInput.css.js";
|
|
@@ -514,10 +512,6 @@ StepInput = StepInput_1 = __decorate([
|
|
|
514
512
|
renderer: jsxRenderer,
|
|
515
513
|
styles: StepInputCss,
|
|
516
514
|
template: StepInputTemplate,
|
|
517
|
-
dependencies: [
|
|
518
|
-
Icon,
|
|
519
|
-
Input,
|
|
520
|
-
],
|
|
521
515
|
})
|
|
522
516
|
/**
|
|
523
517
|
* Fired when the input operation has finished by pressing Enter or on focusout.
|
package/dist/StepInput.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepInput.js","sourceRoot":"","sources":["../src/StepInput.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,EACN,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,UAAU,EACV,SAAS,EACT,WAAW,EACX,aAAa,EACb,eAAe,EACf,aAAa,EACb,eAAe,EACf,QAAQ,EACR,OAAO,GACP,MAAM,sCAAsC,CAAC;AAC9C,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,UAAU,MAAM,kDA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AAC","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 slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport {\n\tisUp,\n\tisDown,\n\tisUpCtrl,\n\tisDownCtrl,\n\tisUpShift,\n\tisDownShift,\n\tisUpShiftCtrl,\n\tisDownShiftCtrl,\n\tisPageUpShift,\n\tisPageDownShift,\n\tisEscape,\n\tisEnter,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\nimport type { Timeout } from \"@ui5/webcomponents-base/dist/types.js\";\nimport type { IFormInputElement } from \"@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js\";\nimport StepInputTemplate from \"./StepInputTemplate.js\";\nimport { STEPINPUT_DEC_ICON_TITLE, STEPINPUT_INC_ICON_TITLE } from \"./generated/i18n/i18n-defaults.js\";\nimport \"@ui5/webcomponents-icons/dist/less.js\";\nimport \"@ui5/webcomponents-icons/dist/add.js\";\n\nimport Icon from \"./Icon.js\";\nimport Input from \"./Input.js\";\nimport type { InputAccInfo, InputEventDetail } from \"./Input.js\";\nimport InputType from \"./types/InputType.js\";\n\n// Styles\nimport StepInputCss from \"./generated/themes/StepInput.css.js\";\n\n// Spin variables\nconst INITIAL_WAIT_TIMEOUT = 500; // milliseconds\nconst ACCELERATION = 0.8;\nconst MIN_WAIT_TIMEOUT = 50; // milliseconds\nconst INITIAL_SPEED = 120; // milliseconds\n\ntype StepInputValueStateChangeEventDetail = {\n\tvalueState: `${ValueState}`,\n\tvalid: boolean,\n}\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-step-input` consists of an input field and buttons with icons to increase/decrease the value\n * with the predefined step.\n *\n * The user can change the value of the component by pressing the increase/decrease buttons,\n * by typing a number directly, by using the keyboard up/down and page up/down,\n * or by using the mouse scroll wheel. Decimal values are supported.\n *\n * ### Usage\n *\n * The default step is 1 but the app developer can set a different one.\n *\n * App developers can set a maximum and minimum value for the `StepInput`.\n * The increase/decrease button and the up/down keyboard navigation become disabled when\n * the value reaches the max/min or a new value is entered from the input which is greater/less than the max/min.\n *\n * #### When to use:\n *\n * - To adjust amounts, quantities, or other values quickly.\n * - To adjust values for a specific step.\n *\n * #### When not to use:\n *\n * - To enter a static number (for example, postal code, phone number, or ID). In this case,\n * use the regular `ui5-input` instead.\n * - To display a value that rarely needs to be adjusted and does not pertain to a particular step.\n * In this case, use the regular `ui5-input` instead.\n * - To enter dates and times. In this case, use date/time related components instead.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/StepInput.js\";`\n * @constructor\n * @extends UI5Element\n * @since 1.0.0-rc.13\n * @public\n */\n@customElement({\n\ttag: \"ui5-step-input\",\n\tformAssociated: true,\n\trenderer: jsxRenderer,\n\tstyles: StepInputCss,\n\ttemplate: StepInputTemplate,\n\tdependencies: [\n\t\tIcon,\n\t\tInput,\n\t],\n})\n/**\n * Fired when the input operation has finished by pressing Enter or on focusout.\n * @public\n */\n@event(\"change\", {\n\tbubbles: true,\n})\n/**\n * Fired when the value of the component changes at each keystroke.\n * @public\n * @since 2.6.0\n */\n@event(\"input\", {\n\tcancelable: true,\n\tbubbles: true,\n})\n/**\n * Fired before the value state of the component is updated internally.\n * The event is preventable, meaning that if it's default action is\n * prevented, the component will not update the value state.\n * @since 1.23.0\n * @public\n * @param {string} valueState The new `valueState` that will be set.\n * @param {boolean} valid Indicator if the value is in between the min and max value.\n */\n@event(\"value-state-change\", {\n\tbubbles: true,\n\tcancelable: true,\n})\nclass StepInput extends UI5Element implements IFormInputElement {\n\teventDetails!: {\n\t\tchange: void\n\t\tinput: InputEventDetail\n\t\t\"value-state-change\": StepInputValueStateChangeEventDetail\n\t}\n\n\t/**\n\t * Defines a value of the component.\n\t * @default 0\n\t * @public\n\t */\n\t@property({ type: Number })\n\tvalue = 0;\n\n\t/**\n\t * Defines a minimum value of the component.\n\t * @default undefined\n\t * @public\n\t */\n\t@property({ type: Number })\n\tmin?: number;\n\n\t/**\n\t * Defines a maximum value of the component.\n\t * @default undefined\n\t * @public\n\t */\n\t@property({ type: Number })\n\tmax?: number;\n\n\t/**\n\t * Defines a step of increasing/decreasing the value of the component.\n\t * @default 1\n\t * @public\n\t */\n\t@property({ type: Number })\n\tstep: number = 1;\n\n\t/**\n\t * Defines the value state of the component.\n\t * @default \"None\"\n\t * @public\n\t */\n\t@property()\n\tvalueState: `${ValueState}` = \"None\";\n\n\t/**\n\t * Defines whether the component is required.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\trequired = false;\n\n\t/**\n\t * Determines whether the component is displayed as disabled.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Determines whether the component is displayed as read-only.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\treadonly = false;\n\n\t/**\n\t * Defines a short hint, intended to aid the user with data entry when the\n\t * component has no value.\n\t *\n\t * **Note:** When no placeholder is set, the format pattern is displayed as a placeholder.\n\t * Passing an empty string as the value of this property will make the component appear empty - without placeholder or format pattern.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tplaceholder?: string;\n\n\t/**\n\t * Determines the name by which the component will be identified upon submission in an HTML form.\n\t *\n\t * **Note:** This property is only applicable within the context of an HTML Form element.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tname?: string;\n\n\t/**\n\t * Determines the number of digits after the decimal point of the component.\n\t * @default 0\n\t * @public\n\t */\n\t@property({ type: Number })\n\tvaluePrecision = 0;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that label the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t@property({ noAttribute: true })\n\t_decIconDisabled = false;\n\n\t@property({ noAttribute: true })\n\t_incIconDisabled = false;\n\n\t@property({ type: Boolean })\n\tfocused = false;\n\n\t@property({ noAttribute: true })\n\t_inputFocused = false;\n\n\t@property({ noAttribute: true })\n\t_previousValue: number = this.value;\n\n\t@property({ noAttribute: true })\n\t_waitTimeout: number = INITIAL_WAIT_TIMEOUT;\n\n\t@property({ noAttribute: true })\n\t_speed: number = INITIAL_SPEED;\n\n\t@property({ noAttribute: true })\n\t_btnDown?: boolean;\n\n\t@property({ noAttribute: true })\n\t_spinTimeoutId?: Timeout;\n\n\t@property({ noAttribute: true })\n\t_spinStarted = false;\n\n\t/**\n\t * Defines the value state message that will be displayed as pop up under the component.\n\t *\n\t * **Note:** If not specified, a default text (in the respective language) will be displayed.\n\t *\n\t * **Note:** The `valueStateMessage` would be displayed,\n\t * when the component is in `Information`, `Critical` or `Negative` value state.\n\t * @public\n\t */\n\t@slot()\n\tvalueStateMessage!: Array<HTMLElement>;\n\n\t_initialValueState?: `${ValueState}`;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tasync formElementAnchor() {\n\t\treturn (await this.getFocusDomRefAsync() as UI5Element)?.getFocusDomRefAsync();\n\t}\n\n\tget formFormattedValue(): FormData | string | null {\n\t\treturn this.value.toString();\n\t}\n\n\tget type() {\n\t\treturn InputType.Number;\n\t}\n\n\t// icons-related\n\n\tget decIconTitle() {\n\t\treturn StepInput.i18nBundle.getText(STEPINPUT_DEC_ICON_TITLE);\n\t}\n\n\tget incIconTitle() {\n\t\treturn StepInput.i18nBundle.getText(STEPINPUT_INC_ICON_TITLE);\n\t}\n\n\tget _decIconClickable() {\n\t\treturn !this._decIconDisabled && !this.readonly && !this.disabled;\n\t}\n\n\tget _incIconClickable() {\n\t\treturn !this._incIconDisabled && !this.readonly && !this.disabled;\n\t}\n\n\tget _isFocused() {\n\t\treturn this.focused;\n\t}\n\n\tget _displayValue() {\n\t\tif ((this.value === 0) || (Number.isInteger(this.value))) {\n\t\t\treturn this.value.toFixed(this.valuePrecision);\n\t\t}\n\n\t\tif (this.input && this.value === Number(this.input.value)) { // For the cases where the number is fractional and is ending with 0s.\n\t\t\treturn this.input.value;\n\t\t}\n\n\t\treturn this.value.toString();\n\t}\n\n\tget accInfo(): InputAccInfo {\n\t\treturn {\n\t\t\t\"ariaRequired\": this.required,\n\t\t\t\"ariaLabel\": getEffectiveAriaLabelText(this),\n\t\t};\n\t}\n\n\tget inputAttributes() {\n\t\treturn {\n\t\t\tmin: this.min === undefined ? undefined : this.min,\n\t\t\tmax: this.max === undefined ? undefined : this.max,\n\t\t\tstep: this.step,\n\t\t};\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._setButtonState();\n\t\tif (this._previousValue === undefined) {\n\t\t\tthis._previousValue = this.value;\n\t\t}\n\t}\n\n\tget input(): Input {\n\t\treturn this.shadowRoot!.querySelector<Input>(\"[ui5-input]\")!;\n\t}\n\n\tget innerInput(): HTMLInputElement {\n\t\treturn this.input.shadowRoot!.querySelector<HTMLInputElement>(\"input\")!;\n\t}\n\n\tget inputOuter() {\n\t\treturn this.shadowRoot!.querySelector(\".ui5-step-input-input\")!;\n\t}\n\n\t_onButtonFocusOut() {\n\t\tsetTimeout(() => {\n\t\t\tif (!this._inputFocused) {\n\t\t\t\tthis.inputOuter.removeAttribute(\"focused\");\n\t\t\t}\n\t\t}, 0);\n\t}\n\n\t_onInput(e: CustomEvent<InputEventDetail>) {\n\t\tconst prevented = !this.fireDecoratorEvent(\"input\", { inputType: e.detail.inputType });\n\n\t\tif (prevented) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_onInputFocusIn() {\n\t\tthis._inputFocused = true;\n\t\tif (this.value !== this._previousValue) {\n\t\t\tthis._previousValue = this.value;\n\t\t}\n\t}\n\n\t_onInputFocusOut() {\n\t\tthis._inputFocused = false;\n\t\tthis._onInputChange();\n\t}\n\n\t_setButtonState() {\n\t\tthis._decIconDisabled = this.min !== undefined && this.value <= this.min;\n\t\tthis._incIconDisabled = this.max !== undefined && this.value >= this.max;\n\t}\n\n\t_validate() {\n\t\tif (this._initialValueState === undefined) {\n\t\t\tthis._initialValueState = this.valueState;\n\t\t}\n\n\t\tthis._updateValueState();\n\t}\n\n\t_updateValueState() {\n\t\tconst isWithinRange = (this.min === undefined || Number(this.input.value) >= this.min)\n\t\t\t\t\t\t\t && (this.max === undefined || Number(this.input.value) <= this.max);\n\t\tconst isValueWithCorrectPrecision = this._isValueWithCorrectPrecision;\n\t\tconst previousValueState = this.valueState;\n\t\tconst isValid = isWithinRange && isValueWithCorrectPrecision;\n\n\t\tthis.valueState = isValid ? ValueState.None : ValueState.Negative;\n\n\t\tconst eventPrevented = !this.fireDecoratorEvent(\"value-state-change\", {\n\t\t\tvalueState: this.valueState,\n\t\t\tvalid: isValid,\n\t\t});\n\n\t\tif (eventPrevented) {\n\t\t\tthis.valueState = previousValueState;\n\t\t}\n\t}\n\n\t_preciseValue(value: number) {\n\t\tconst pow = 10 ** this.valuePrecision;\n\t\treturn Math.round(value * pow) / pow;\n\t}\n\n\t_fireChangeEvent() {\n\t\tif (this._previousValue !== this.value) {\n\t\t\tthis._previousValue = this.value;\n\t\t\tthis.fireDecoratorEvent(\"change\");\n\t\t}\n\t}\n\n\t/**\n\t * Value modifier - modifies the value of the component, validates the new value and enables/disables increment and\n\t * decrement buttons according to the value and min/max values (if set). Fires `change` event when requested\n\t * @private\n\t * @param modifier modifies the value of the component with the given modifier (positive or negative)\n\t * @param fireChangeEvent if `true`, fires `change` event when the value is changed\n\t */\n\t_modifyValue(modifier: number, fireChangeEvent = false) {\n\t\tlet value;\n\t\tvalue = this.value + modifier;\n\t\tif (this.min !== undefined && value < this.min) {\n\t\t\tvalue = this.min;\n\t\t}\n\t\tif (this.max !== undefined && value > this.max) {\n\t\t\tvalue = this.max;\n\t\t}\n\t\tvalue = this._preciseValue(value);\n\t\tif (value !== this.value) {\n\t\t\tthis.value = value;\n\t\t\tthis.input.value = value.toFixed(this.valuePrecision);\n\t\t\tthis._validate();\n\t\t\tthis._setButtonState();\n\t\t\tthis.focused = true;\n\t\t\tthis.inputOuter.setAttribute(\"focused\", \"\");\n\t\t\tif (fireChangeEvent) {\n\t\t\t\tthis._fireChangeEvent();\n\t\t\t} else {\n\t\t\t\tthis.input.focus();\n\t\t\t}\n\t\t}\n\t}\n\n\t_incValue() {\n\t\tif (this._incIconClickable && !this.disabled && !this.readonly) {\n\t\t\tthis._modifyValue(this.step, true);\n\t\t\tthis._previousValue = this.value;\n\t\t}\n\t}\n\n\t_decValue() {\n\t\tif (this._decIconClickable && !this.disabled && !this.readonly) {\n\t\t\tthis._modifyValue(-this.step, true);\n\t\t\tthis._previousValue = this.value;\n\t\t}\n\t}\n\n\tget _isValueWithCorrectPrecision() {\n\t\t// gets either \".\" or \",\" as delimiter which is based on locale, and splits the number by it\n\t\tconst delimiter = this.input.value.includes(\".\") ? \".\" : \",\";\n\t\tconst numberParts = this.input.value.split(delimiter);\n\t\tconst decimalPartLength = numberParts.length > 1 ? numberParts[1].length : 0;\n\n\t\treturn decimalPartLength === this.valuePrecision;\n\t}\n\n\t_onInputChange() {\n\t\tthis._setDefaultInputValueIfNeeded();\n\n\t\tconst inputValue = Number(this.input.value);\n\t\tif (this._isValueChanged(inputValue)) {\n\t\t\tthis._updateValueAndValidate(inputValue);\n\t\t}\n\t}\n\n\t_setDefaultInputValueIfNeeded() {\n\t\tif (this.input.value === \"\") {\n\t\t\tconst defaultValue = (this.min || 0).toFixed(this.valuePrecision);\n\t\t\tthis.input.value = defaultValue;\n\t\t\tthis.innerInput.value = defaultValue; // we need to update inner input value as well, to avoid empty input scenario\n\t\t}\n\t}\n\n\t_isValueChanged(inputValue: number) {\n\t\tconst isValueWithCorrectPrecision = this._isValueWithCorrectPrecision;\n\t\t// Treat values as distinct when modified to match a specific precision (e.g., from 3.4000 to 3.40),\n\t\t// even if JavaScript sees them as equal, to correctly update valueState based on expected valuePrecision.\n\t\tconst isPrecisionCorrectButValueStateError = isValueWithCorrectPrecision && this.valueState === ValueState.Negative;\n\n\t\treturn this.value !== this._previousValue\n\t\t\t|| this.value !== inputValue\n\t\t\t|| inputValue === 0\n\t\t\t|| !isValueWithCorrectPrecision\n\t\t\t|| isPrecisionCorrectButValueStateError;\n\t}\n\n\t_updateValueAndValidate(inputValue: number) {\n\t\tthis.value = inputValue;\n\t\tthis._validate();\n\t\tthis._setButtonState();\n\t\tthis._fireChangeEvent();\n\t}\n\n\t_onfocusin() {\n\t\tthis.focused = true;\n\t}\n\n\t_onfocusout() {\n\t\tthis.focused = false;\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tlet preventDefault = true;\n\t\tif (this.disabled || this.readonly) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis._onInputChange();\n\t\t\treturn;\n\t\t}\n\n\t\tif (isUp(e)) {\n\t\t\t// step up\n\t\t\tthis._modifyValue(this.step);\n\t\t} else if (isDown(e)) {\n\t\t\t// step down\n\t\t\tthis._modifyValue(-this.step);\n\t\t} else if (isEscape(e)) {\n\t\t\t// return previous value\n\t\t\tthis.value = this._previousValue;\n\t\t\tthis.input.value = this.value.toFixed(this.valuePrecision);\n\t\t} else if (this.max !== undefined && (isPageUpShift(e) || isUpShiftCtrl(e))) {\n\t\t\t// step to max\n\t\t\tthis._modifyValue(this.max - this.value);\n\t\t} else if (this.min !== undefined && (isPageDownShift(e) || isDownShiftCtrl(e))) {\n\t\t\t// step to min\n\t\t\tthis._modifyValue(this.min - this.value);\n\t\t} else if (!isUpCtrl(e) && !isDownCtrl(e) && !isUpShift(e) && !isDownShift(e)) {\n\t\t\tpreventDefault = false;\n\t\t}\n\t\tif (preventDefault) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_decSpin() {\n\t\tif (!this._decIconDisabled) {\n\t\t\tthis._spinValue(false, true);\n\t\t}\n\t}\n\n\t_incSpin() {\n\t\tif (!this._incIconDisabled) {\n\t\t\tthis._spinValue(true, true);\n\t\t}\n\t}\n\n\t/**\n\t * Calculates the time which should be waited until _spinValue function is called.\n\t */\n\t_calcWaitTimeout() {\n\t\tthis._speed *= ACCELERATION;\n\t\tthis._waitTimeout = ((this._waitTimeout - this._speed) < MIN_WAIT_TIMEOUT ? MIN_WAIT_TIMEOUT : (this._waitTimeout - this._speed));\n\t\treturn this._waitTimeout;\n\t}\n\n\t/**\n\t * Called when the increment or decrement button is pressed and held to set new value.\n\t * @private\n\t * @param increment - is this the increment button or not so the values should be spin accordingly up or down\n\t * @param resetVariables - whether to reset the spin-related variables or not\n\t */\n\t_spinValue(increment: boolean, resetVariables = false) {\n\t\tif (resetVariables) {\n\t\t\tthis._waitTimeout = INITIAL_WAIT_TIMEOUT;\n\t\t\tthis._speed = INITIAL_SPEED;\n\t\t\tthis._btnDown = true;\n\t\t}\n\t\tthis._spinTimeoutId = setTimeout(() => {\n\t\t\tif (this._btnDown) {\n\t\t\t\tthis._spinStarted = true;\n\t\t\t\tthis._modifyValue(increment ? this.step : -this.step);\n\t\t\t\tthis._setButtonState();\n\t\t\t\tif ((!this._incIconDisabled && increment) || (!this._decIconDisabled && !increment)) {\n\t\t\t\t\tthis._spinValue(increment);\n\t\t\t\t} else {\n\t\t\t\t\tthis._resetSpin();\n\t\t\t\t\tthis._fireChangeEvent();\n\t\t\t\t}\n\t\t\t}\n\t\t}, this._calcWaitTimeout());\n\t}\n\n\t/**\n\t* Resets spin process\n\t*/\n\t_resetSpin() {\n\t\tclearTimeout(this._spinTimeoutId);\n\t\tthis._btnDown = false;\n\t\tthis._spinStarted = false;\n\t}\n\n\t/**\n\t* Resets spin process when mouse outs + or - buttons\n\t*/\n\t_resetSpinOut() {\n\t\tif (this._btnDown) {\n\t\t\tthis._resetSpin();\n\t\t\tthis._fireChangeEvent();\n\t\t}\n\t}\n}\nStepInput.define();\n\nexport default StepInput;\nexport type {\n\tStepInputValueStateChangeEventDetail,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"StepInput.js","sourceRoot":"","sources":["../src/StepInput.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,EACN,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,UAAU,EACV,SAAS,EACT,WAAW,EACX,aAAa,EACb,eAAe,EACf,aAAa,EACb,eAAe,EACf,QAAQ,EACR,OAAO,GACP,MAAM,sCAAsC,CAAC;AAC9C,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,UAAU,MAAM,kDAAkD,CAAC;AAC1E,OAAO,EAAE,yBAAyB,EAAE,MAAM,+DAA+D,CAAC;AAG1G,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AACvG,OAAO,uCAAuC,CAAC;AAC/C,OAAO,sCAAsC,CAAC;AAI9C,OAAO,SAAS,MAAM,sBAAsB,CAAC;AAE7C,SAAS;AACT,OAAO,YAAY,MAAM,qCAAqC,CAAC;AAE/D,iBAAiB;AACjB,MAAM,oBAAoB,GAAG,GAAG,CAAC,CAAC,eAA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CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;iDACP;AAGzB;IADC,QAAQ,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;+CACX;AAYrB;IADC,IAAI,EAAE;oDACgC;AAKhC;IADN,IAAI,CAAC,oBAAoB,CAAC;mCACG;AApKzB,SAAS;IApCd,aAAa,CAAC;QACd,GAAG,EAAE,gBAAgB;QACrB,cAAc,EAAE,IAAI;QACpB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,YAAY;QACpB,QAAQ,EAAE,iBAAiB;KAC3B,CAAC;IACF;;;OAGG;;IACF,KAAK,CAAC,QAAQ,EAAE;QAChB,OAAO,EAAE,IAAI;KACb,CAAC;IACF;;;;OAIG;;IACF,KAAK,CAAC,OAAO,EAAE;QACf,UAAU,EAAE,IAAI;QAChB,OAAO,EAAE,IAAI;KACb,CAAC;IACF;;;;;;;;OAQG;;IACF,KAAK,CAAC,oBAAoB,EAAE;QAC5B,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,IAAI;KAChB,CAAC;GACI,SAAS,CAugBd;AACD,SAAS,CAAC,MAAM,EAAE,CAAC;AAEnB,eAAe,SAAS,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 slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport {\n\tisUp,\n\tisDown,\n\tisUpCtrl,\n\tisDownCtrl,\n\tisUpShift,\n\tisDownShift,\n\tisUpShiftCtrl,\n\tisDownShiftCtrl,\n\tisPageUpShift,\n\tisPageDownShift,\n\tisEscape,\n\tisEnter,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\nimport type { Timeout } from \"@ui5/webcomponents-base/dist/types.js\";\nimport type { IFormInputElement } from \"@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js\";\nimport StepInputTemplate from \"./StepInputTemplate.js\";\nimport { STEPINPUT_DEC_ICON_TITLE, STEPINPUT_INC_ICON_TITLE } from \"./generated/i18n/i18n-defaults.js\";\nimport \"@ui5/webcomponents-icons/dist/less.js\";\nimport \"@ui5/webcomponents-icons/dist/add.js\";\n\nimport type Input from \"./Input.js\";\nimport type { InputAccInfo, InputEventDetail } from \"./Input.js\";\nimport InputType from \"./types/InputType.js\";\n\n// Styles\nimport StepInputCss from \"./generated/themes/StepInput.css.js\";\n\n// Spin variables\nconst INITIAL_WAIT_TIMEOUT = 500; // milliseconds\nconst ACCELERATION = 0.8;\nconst MIN_WAIT_TIMEOUT = 50; // milliseconds\nconst INITIAL_SPEED = 120; // milliseconds\n\ntype StepInputValueStateChangeEventDetail = {\n\tvalueState: `${ValueState}`,\n\tvalid: boolean,\n}\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-step-input` consists of an input field and buttons with icons to increase/decrease the value\n * with the predefined step.\n *\n * The user can change the value of the component by pressing the increase/decrease buttons,\n * by typing a number directly, by using the keyboard up/down and page up/down,\n * or by using the mouse scroll wheel. Decimal values are supported.\n *\n * ### Usage\n *\n * The default step is 1 but the app developer can set a different one.\n *\n * App developers can set a maximum and minimum value for the `StepInput`.\n * The increase/decrease button and the up/down keyboard navigation become disabled when\n * the value reaches the max/min or a new value is entered from the input which is greater/less than the max/min.\n *\n * #### When to use:\n *\n * - To adjust amounts, quantities, or other values quickly.\n * - To adjust values for a specific step.\n *\n * #### When not to use:\n *\n * - To enter a static number (for example, postal code, phone number, or ID). In this case,\n * use the regular `ui5-input` instead.\n * - To display a value that rarely needs to be adjusted and does not pertain to a particular step.\n * In this case, use the regular `ui5-input` instead.\n * - To enter dates and times. In this case, use date/time related components instead.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/StepInput.js\";`\n * @constructor\n * @extends UI5Element\n * @since 1.0.0-rc.13\n * @public\n */\n@customElement({\n\ttag: \"ui5-step-input\",\n\tformAssociated: true,\n\trenderer: jsxRenderer,\n\tstyles: StepInputCss,\n\ttemplate: StepInputTemplate,\n})\n/**\n * Fired when the input operation has finished by pressing Enter or on focusout.\n * @public\n */\n@event(\"change\", {\n\tbubbles: true,\n})\n/**\n * Fired when the value of the component changes at each keystroke.\n * @public\n * @since 2.6.0\n */\n@event(\"input\", {\n\tcancelable: true,\n\tbubbles: true,\n})\n/**\n * Fired before the value state of the component is updated internally.\n * The event is preventable, meaning that if it's default action is\n * prevented, the component will not update the value state.\n * @since 1.23.0\n * @public\n * @param {string} valueState The new `valueState` that will be set.\n * @param {boolean} valid Indicator if the value is in between the min and max value.\n */\n@event(\"value-state-change\", {\n\tbubbles: true,\n\tcancelable: true,\n})\nclass StepInput extends UI5Element implements IFormInputElement {\n\teventDetails!: {\n\t\tchange: void\n\t\tinput: InputEventDetail\n\t\t\"value-state-change\": StepInputValueStateChangeEventDetail\n\t}\n\n\t/**\n\t * Defines a value of the component.\n\t * @default 0\n\t * @public\n\t */\n\t@property({ type: Number })\n\tvalue = 0;\n\n\t/**\n\t * Defines a minimum value of the component.\n\t * @default undefined\n\t * @public\n\t */\n\t@property({ type: Number })\n\tmin?: number;\n\n\t/**\n\t * Defines a maximum value of the component.\n\t * @default undefined\n\t * @public\n\t */\n\t@property({ type: Number })\n\tmax?: number;\n\n\t/**\n\t * Defines a step of increasing/decreasing the value of the component.\n\t * @default 1\n\t * @public\n\t */\n\t@property({ type: Number })\n\tstep: number = 1;\n\n\t/**\n\t * Defines the value state of the component.\n\t * @default \"None\"\n\t * @public\n\t */\n\t@property()\n\tvalueState: `${ValueState}` = \"None\";\n\n\t/**\n\t * Defines whether the component is required.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\trequired = false;\n\n\t/**\n\t * Determines whether the component is displayed as disabled.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Determines whether the component is displayed as read-only.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\treadonly = false;\n\n\t/**\n\t * Defines a short hint, intended to aid the user with data entry when the\n\t * component has no value.\n\t *\n\t * **Note:** When no placeholder is set, the format pattern is displayed as a placeholder.\n\t * Passing an empty string as the value of this property will make the component appear empty - without placeholder or format pattern.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tplaceholder?: string;\n\n\t/**\n\t * Determines the name by which the component will be identified upon submission in an HTML form.\n\t *\n\t * **Note:** This property is only applicable within the context of an HTML Form element.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tname?: string;\n\n\t/**\n\t * Determines the number of digits after the decimal point of the component.\n\t * @default 0\n\t * @public\n\t */\n\t@property({ type: Number })\n\tvaluePrecision = 0;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that label the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t@property({ noAttribute: true })\n\t_decIconDisabled = false;\n\n\t@property({ noAttribute: true })\n\t_incIconDisabled = false;\n\n\t@property({ type: Boolean })\n\tfocused = false;\n\n\t@property({ noAttribute: true })\n\t_inputFocused = false;\n\n\t@property({ noAttribute: true })\n\t_previousValue: number = this.value;\n\n\t@property({ noAttribute: true })\n\t_waitTimeout: number = INITIAL_WAIT_TIMEOUT;\n\n\t@property({ noAttribute: true })\n\t_speed: number = INITIAL_SPEED;\n\n\t@property({ noAttribute: true })\n\t_btnDown?: boolean;\n\n\t@property({ noAttribute: true })\n\t_spinTimeoutId?: Timeout;\n\n\t@property({ noAttribute: true })\n\t_spinStarted = false;\n\n\t/**\n\t * Defines the value state message that will be displayed as pop up under the component.\n\t *\n\t * **Note:** If not specified, a default text (in the respective language) will be displayed.\n\t *\n\t * **Note:** The `valueStateMessage` would be displayed,\n\t * when the component is in `Information`, `Critical` or `Negative` value state.\n\t * @public\n\t */\n\t@slot()\n\tvalueStateMessage!: Array<HTMLElement>;\n\n\t_initialValueState?: `${ValueState}`;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tasync formElementAnchor() {\n\t\treturn (await this.getFocusDomRefAsync() as UI5Element)?.getFocusDomRefAsync();\n\t}\n\n\tget formFormattedValue(): FormData | string | null {\n\t\treturn this.value.toString();\n\t}\n\n\tget type() {\n\t\treturn InputType.Number;\n\t}\n\n\t// icons-related\n\n\tget decIconTitle() {\n\t\treturn StepInput.i18nBundle.getText(STEPINPUT_DEC_ICON_TITLE);\n\t}\n\n\tget incIconTitle() {\n\t\treturn StepInput.i18nBundle.getText(STEPINPUT_INC_ICON_TITLE);\n\t}\n\n\tget _decIconClickable() {\n\t\treturn !this._decIconDisabled && !this.readonly && !this.disabled;\n\t}\n\n\tget _incIconClickable() {\n\t\treturn !this._incIconDisabled && !this.readonly && !this.disabled;\n\t}\n\n\tget _isFocused() {\n\t\treturn this.focused;\n\t}\n\n\tget _displayValue() {\n\t\tif ((this.value === 0) || (Number.isInteger(this.value))) {\n\t\t\treturn this.value.toFixed(this.valuePrecision);\n\t\t}\n\n\t\tif (this.input && this.value === Number(this.input.value)) { // For the cases where the number is fractional and is ending with 0s.\n\t\t\treturn this.input.value;\n\t\t}\n\n\t\treturn this.value.toString();\n\t}\n\n\tget accInfo(): InputAccInfo {\n\t\treturn {\n\t\t\t\"ariaRequired\": this.required,\n\t\t\t\"ariaLabel\": getEffectiveAriaLabelText(this),\n\t\t};\n\t}\n\n\tget inputAttributes() {\n\t\treturn {\n\t\t\tmin: this.min === undefined ? undefined : this.min,\n\t\t\tmax: this.max === undefined ? undefined : this.max,\n\t\t\tstep: this.step,\n\t\t};\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._setButtonState();\n\t\tif (this._previousValue === undefined) {\n\t\t\tthis._previousValue = this.value;\n\t\t}\n\t}\n\n\tget input(): Input {\n\t\treturn this.shadowRoot!.querySelector<Input>(\"[ui5-input]\")!;\n\t}\n\n\tget innerInput(): HTMLInputElement {\n\t\treturn this.input.shadowRoot!.querySelector<HTMLInputElement>(\"input\")!;\n\t}\n\n\tget inputOuter() {\n\t\treturn this.shadowRoot!.querySelector(\".ui5-step-input-input\")!;\n\t}\n\n\t_onButtonFocusOut() {\n\t\tsetTimeout(() => {\n\t\t\tif (!this._inputFocused) {\n\t\t\t\tthis.inputOuter.removeAttribute(\"focused\");\n\t\t\t}\n\t\t}, 0);\n\t}\n\n\t_onInput(e: CustomEvent<InputEventDetail>) {\n\t\tconst prevented = !this.fireDecoratorEvent(\"input\", { inputType: e.detail.inputType });\n\n\t\tif (prevented) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_onInputFocusIn() {\n\t\tthis._inputFocused = true;\n\t\tif (this.value !== this._previousValue) {\n\t\t\tthis._previousValue = this.value;\n\t\t}\n\t}\n\n\t_onInputFocusOut() {\n\t\tthis._inputFocused = false;\n\t\tthis._onInputChange();\n\t}\n\n\t_setButtonState() {\n\t\tthis._decIconDisabled = this.min !== undefined && this.value <= this.min;\n\t\tthis._incIconDisabled = this.max !== undefined && this.value >= this.max;\n\t}\n\n\t_validate() {\n\t\tif (this._initialValueState === undefined) {\n\t\t\tthis._initialValueState = this.valueState;\n\t\t}\n\n\t\tthis._updateValueState();\n\t}\n\n\t_updateValueState() {\n\t\tconst isWithinRange = (this.min === undefined || Number(this.input.value) >= this.min)\n\t\t\t\t\t\t\t && (this.max === undefined || Number(this.input.value) <= this.max);\n\t\tconst isValueWithCorrectPrecision = this._isValueWithCorrectPrecision;\n\t\tconst previousValueState = this.valueState;\n\t\tconst isValid = isWithinRange && isValueWithCorrectPrecision;\n\n\t\tthis.valueState = isValid ? ValueState.None : ValueState.Negative;\n\n\t\tconst eventPrevented = !this.fireDecoratorEvent(\"value-state-change\", {\n\t\t\tvalueState: this.valueState,\n\t\t\tvalid: isValid,\n\t\t});\n\n\t\tif (eventPrevented) {\n\t\t\tthis.valueState = previousValueState;\n\t\t}\n\t}\n\n\t_preciseValue(value: number) {\n\t\tconst pow = 10 ** this.valuePrecision;\n\t\treturn Math.round(value * pow) / pow;\n\t}\n\n\t_fireChangeEvent() {\n\t\tif (this._previousValue !== this.value) {\n\t\t\tthis._previousValue = this.value;\n\t\t\tthis.fireDecoratorEvent(\"change\");\n\t\t}\n\t}\n\n\t/**\n\t * Value modifier - modifies the value of the component, validates the new value and enables/disables increment and\n\t * decrement buttons according to the value and min/max values (if set). Fires `change` event when requested\n\t * @private\n\t * @param modifier modifies the value of the component with the given modifier (positive or negative)\n\t * @param fireChangeEvent if `true`, fires `change` event when the value is changed\n\t */\n\t_modifyValue(modifier: number, fireChangeEvent = false) {\n\t\tlet value;\n\t\tvalue = this.value + modifier;\n\t\tif (this.min !== undefined && value < this.min) {\n\t\t\tvalue = this.min;\n\t\t}\n\t\tif (this.max !== undefined && value > this.max) {\n\t\t\tvalue = this.max;\n\t\t}\n\t\tvalue = this._preciseValue(value);\n\t\tif (value !== this.value) {\n\t\t\tthis.value = value;\n\t\t\tthis.input.value = value.toFixed(this.valuePrecision);\n\t\t\tthis._validate();\n\t\t\tthis._setButtonState();\n\t\t\tthis.focused = true;\n\t\t\tthis.inputOuter.setAttribute(\"focused\", \"\");\n\t\t\tif (fireChangeEvent) {\n\t\t\t\tthis._fireChangeEvent();\n\t\t\t} else {\n\t\t\t\tthis.input.focus();\n\t\t\t}\n\t\t}\n\t}\n\n\t_incValue() {\n\t\tif (this._incIconClickable && !this.disabled && !this.readonly) {\n\t\t\tthis._modifyValue(this.step, true);\n\t\t\tthis._previousValue = this.value;\n\t\t}\n\t}\n\n\t_decValue() {\n\t\tif (this._decIconClickable && !this.disabled && !this.readonly) {\n\t\t\tthis._modifyValue(-this.step, true);\n\t\t\tthis._previousValue = this.value;\n\t\t}\n\t}\n\n\tget _isValueWithCorrectPrecision() {\n\t\t// gets either \".\" or \",\" as delimiter which is based on locale, and splits the number by it\n\t\tconst delimiter = this.input.value.includes(\".\") ? \".\" : \",\";\n\t\tconst numberParts = this.input.value.split(delimiter);\n\t\tconst decimalPartLength = numberParts.length > 1 ? numberParts[1].length : 0;\n\n\t\treturn decimalPartLength === this.valuePrecision;\n\t}\n\n\t_onInputChange() {\n\t\tthis._setDefaultInputValueIfNeeded();\n\n\t\tconst inputValue = Number(this.input.value);\n\t\tif (this._isValueChanged(inputValue)) {\n\t\t\tthis._updateValueAndValidate(inputValue);\n\t\t}\n\t}\n\n\t_setDefaultInputValueIfNeeded() {\n\t\tif (this.input.value === \"\") {\n\t\t\tconst defaultValue = (this.min || 0).toFixed(this.valuePrecision);\n\t\t\tthis.input.value = defaultValue;\n\t\t\tthis.innerInput.value = defaultValue; // we need to update inner input value as well, to avoid empty input scenario\n\t\t}\n\t}\n\n\t_isValueChanged(inputValue: number) {\n\t\tconst isValueWithCorrectPrecision = this._isValueWithCorrectPrecision;\n\t\t// Treat values as distinct when modified to match a specific precision (e.g., from 3.4000 to 3.40),\n\t\t// even if JavaScript sees them as equal, to correctly update valueState based on expected valuePrecision.\n\t\tconst isPrecisionCorrectButValueStateError = isValueWithCorrectPrecision && this.valueState === ValueState.Negative;\n\n\t\treturn this.value !== this._previousValue\n\t\t\t|| this.value !== inputValue\n\t\t\t|| inputValue === 0\n\t\t\t|| !isValueWithCorrectPrecision\n\t\t\t|| isPrecisionCorrectButValueStateError;\n\t}\n\n\t_updateValueAndValidate(inputValue: number) {\n\t\tthis.value = inputValue;\n\t\tthis._validate();\n\t\tthis._setButtonState();\n\t\tthis._fireChangeEvent();\n\t}\n\n\t_onfocusin() {\n\t\tthis.focused = true;\n\t}\n\n\t_onfocusout() {\n\t\tthis.focused = false;\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tlet preventDefault = true;\n\t\tif (this.disabled || this.readonly) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis._onInputChange();\n\t\t\treturn;\n\t\t}\n\n\t\tif (isUp(e)) {\n\t\t\t// step up\n\t\t\tthis._modifyValue(this.step);\n\t\t} else if (isDown(e)) {\n\t\t\t// step down\n\t\t\tthis._modifyValue(-this.step);\n\t\t} else if (isEscape(e)) {\n\t\t\t// return previous value\n\t\t\tthis.value = this._previousValue;\n\t\t\tthis.input.value = this.value.toFixed(this.valuePrecision);\n\t\t} else if (this.max !== undefined && (isPageUpShift(e) || isUpShiftCtrl(e))) {\n\t\t\t// step to max\n\t\t\tthis._modifyValue(this.max - this.value);\n\t\t} else if (this.min !== undefined && (isPageDownShift(e) || isDownShiftCtrl(e))) {\n\t\t\t// step to min\n\t\t\tthis._modifyValue(this.min - this.value);\n\t\t} else if (!isUpCtrl(e) && !isDownCtrl(e) && !isUpShift(e) && !isDownShift(e)) {\n\t\t\tpreventDefault = false;\n\t\t}\n\t\tif (preventDefault) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_decSpin() {\n\t\tif (!this._decIconDisabled) {\n\t\t\tthis._spinValue(false, true);\n\t\t}\n\t}\n\n\t_incSpin() {\n\t\tif (!this._incIconDisabled) {\n\t\t\tthis._spinValue(true, true);\n\t\t}\n\t}\n\n\t/**\n\t * Calculates the time which should be waited until _spinValue function is called.\n\t */\n\t_calcWaitTimeout() {\n\t\tthis._speed *= ACCELERATION;\n\t\tthis._waitTimeout = ((this._waitTimeout - this._speed) < MIN_WAIT_TIMEOUT ? MIN_WAIT_TIMEOUT : (this._waitTimeout - this._speed));\n\t\treturn this._waitTimeout;\n\t}\n\n\t/**\n\t * Called when the increment or decrement button is pressed and held to set new value.\n\t * @private\n\t * @param increment - is this the increment button or not so the values should be spin accordingly up or down\n\t * @param resetVariables - whether to reset the spin-related variables or not\n\t */\n\t_spinValue(increment: boolean, resetVariables = false) {\n\t\tif (resetVariables) {\n\t\t\tthis._waitTimeout = INITIAL_WAIT_TIMEOUT;\n\t\t\tthis._speed = INITIAL_SPEED;\n\t\t\tthis._btnDown = true;\n\t\t}\n\t\tthis._spinTimeoutId = setTimeout(() => {\n\t\t\tif (this._btnDown) {\n\t\t\t\tthis._spinStarted = true;\n\t\t\t\tthis._modifyValue(increment ? this.step : -this.step);\n\t\t\t\tthis._setButtonState();\n\t\t\t\tif ((!this._incIconDisabled && increment) || (!this._decIconDisabled && !increment)) {\n\t\t\t\t\tthis._spinValue(increment);\n\t\t\t\t} else {\n\t\t\t\t\tthis._resetSpin();\n\t\t\t\t\tthis._fireChangeEvent();\n\t\t\t\t}\n\t\t\t}\n\t\t}, this._calcWaitTimeout());\n\t}\n\n\t/**\n\t* Resets spin process\n\t*/\n\t_resetSpin() {\n\t\tclearTimeout(this._spinTimeoutId);\n\t\tthis._btnDown = false;\n\t\tthis._spinStarted = false;\n\t}\n\n\t/**\n\t* Resets spin process when mouse outs + or - buttons\n\t*/\n\t_resetSpinOut() {\n\t\tif (this._btnDown) {\n\t\t\tthis._resetSpin();\n\t\t\tthis._fireChangeEvent();\n\t\t}\n\t}\n}\nStepInput.define();\n\nexport default StepInput;\nexport type {\n\tStepInputValueStateChangeEventDetail,\n};\n"]}
|
package/dist/Switch.js
CHANGED
|
@@ -16,7 +16,6 @@ import { getEffectiveAriaLabelText } from "@ui5/webcomponents-base/dist/util/Acc
|
|
|
16
16
|
import "@ui5/webcomponents-icons/dist/accept.js";
|
|
17
17
|
import "@ui5/webcomponents-icons/dist/decline.js";
|
|
18
18
|
import "@ui5/webcomponents-icons/dist/less.js";
|
|
19
|
-
import Icon from "./Icon.js";
|
|
20
19
|
import SwitchDesign from "./types/SwitchDesign.js";
|
|
21
20
|
import { FORM_CHECKABLE_REQUIRED } from "./generated/i18n/i18n-defaults.js";
|
|
22
21
|
// Template
|
|
@@ -204,7 +203,6 @@ Switch = Switch_1 = __decorate([
|
|
|
204
203
|
styles: switchCss,
|
|
205
204
|
renderer: jsxRenderer,
|
|
206
205
|
template: SwitchTemplate,
|
|
207
|
-
dependencies: [Icon],
|
|
208
206
|
shadowRootOptions: { delegatesFocus: true },
|
|
209
207
|
})
|
|
210
208
|
/**
|