@ui5/webcomponents 2.7.0-rc.1 → 2.7.0-rc.2
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 +29 -0
- package/README.md +21 -16
- package/cypress/specs/Button.cy.ts +22 -0
- package/cypress/specs/ColorPalette.cy.ts +0 -1
- package/cypress/specs/Dialog.cy.ts +42 -0
- package/cypress/specs/ExpandableText.cy.ts +2 -1
- package/cypress/specs/F6.cy.ts +74 -6
- package/cypress/specs/Input.cy.ts +0 -1
- package/cypress/specs/Menu.cy.ts +36 -0
- package/cypress/specs/MultiComboBox.cy.ts +38 -0
- package/cypress/specs/MultiInput.cy.ts +0 -1
- package/cypress/specs/RatingIndicator.cy.ts +25 -0
- package/cypress/specs/Select.cy.ts +19 -0
- package/cypress/specs/base/Events.cy.ts +0 -1
- package/cypress/support/commands/ColorPalette.commands.ts +2 -2
- package/dist/.tsbuildinfo +1 -1
- package/dist/AvatarGroup.d.ts +1 -1
- package/dist/Button.d.ts +11 -0
- package/dist/Button.js +19 -0
- package/dist/Button.js.map +1 -1
- package/dist/ButtonBadge.d.ts +32 -0
- package/dist/ButtonBadge.js +62 -0
- package/dist/ButtonBadge.js.map +1 -0
- package/dist/ButtonBadgeTemplate.d.ts +2 -0
- package/dist/ButtonBadgeTemplate.js +6 -0
- package/dist/ButtonBadgeTemplate.js.map +1 -0
- package/dist/ButtonTemplate.js +8 -2
- package/dist/ButtonTemplate.js.map +1 -1
- package/dist/ColorPalettePopover.d.ts +0 -1
- package/dist/ColorPalettePopover.js +0 -1
- package/dist/ColorPalettePopover.js.map +1 -1
- package/dist/Dialog.js +1 -0
- package/dist/Dialog.js.map +1 -1
- package/dist/Input.d.ts +0 -14
- package/dist/Input.js +0 -9
- package/dist/Input.js.map +1 -1
- package/dist/Menu.d.ts +5 -0
- package/dist/Menu.js +35 -14
- package/dist/Menu.js.map +1 -1
- package/dist/MenuItem.d.ts +5 -0
- package/dist/MenuItem.js +25 -1
- package/dist/MenuItem.js.map +1 -1
- package/dist/MultiComboBox.js +4 -4
- package/dist/MultiComboBox.js.map +1 -1
- package/dist/Popover.d.ts +4 -0
- package/dist/Popover.js +6 -0
- package/dist/Popover.js.map +1 -1
- package/dist/RatingIndicator.js +4 -1
- package/dist/RatingIndicator.js.map +1 -1
- package/dist/SelectPopoverTemplate.js +2 -2
- package/dist/SelectPopoverTemplate.js.map +1 -1
- package/dist/SplitButton.d.ts +3 -0
- package/dist/SplitButton.js +3 -0
- package/dist/SplitButton.js.map +1 -1
- package/dist/Tab.d.ts +1 -1
- package/dist/Table.js +1 -1
- package/dist/Table.js.map +1 -1
- package/dist/TableGrowing.d.ts +6 -1
- package/dist/TableGrowing.js +6 -1
- package/dist/TableGrowing.js.map +1 -1
- package/dist/Tag.d.ts +2 -1
- package/dist/Tag.js +1 -0
- package/dist/Tag.js.map +1 -1
- package/dist/TagTemplate.js +2 -2
- package/dist/TagTemplate.js.map +1 -1
- package/dist/TimePicker.d.ts +6 -3
- package/dist/TimePicker.js +17 -6
- package/dist/TimePicker.js.map +1 -1
- package/dist/TimePickerClock.d.ts +22 -52
- package/dist/TimePickerClock.js +71 -224
- package/dist/TimePickerClock.js.map +1 -1
- package/dist/TimePickerClockTemplate.js +9 -6
- package/dist/TimePickerClockTemplate.js.map +1 -1
- package/dist/TimePickerInternals.d.ts +2 -1
- package/dist/TimePickerInternals.js.map +1 -1
- package/dist/TimePickerPopoverTemplate.js +1 -1
- package/dist/TimePickerPopoverTemplate.js.map +1 -1
- package/dist/TimeSelectionClocks.d.ts +15 -3
- package/dist/TimeSelectionClocks.js +64 -28
- package/dist/TimeSelectionClocks.js.map +1 -1
- package/dist/TimeSelectionClocksTemplate.js +1 -1
- package/dist/TimeSelectionClocksTemplate.js.map +1 -1
- package/dist/bundle.esm.js +1 -2
- 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/ButtonBadge.css +1 -0
- 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/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/TableRowActionBase.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/TimePickerClock.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_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -1
- package/dist/custom-elements-internal.json +198 -43
- package/dist/custom-elements.json +144 -42
- package/dist/generated/assets/i18n/messagebundle_ar.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_bg.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ca.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cnr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cs.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cy.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_da.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_de.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_el.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_GB.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_sappsd.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_saprigi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_saptrc.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_es.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_es_MX.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_et.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hu.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_it.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_iw.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ja.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_kk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ko.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_mk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ms.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_nl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_no.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt_PT.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ro.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ru.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sh.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_th.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_tr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_uk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_vi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_CN.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_TW.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/i18n/i18n-defaults.d.ts +1 -2
- package/dist/generated/i18n/i18n-defaults.js +1 -2
- package/dist/generated/i18n/i18n-defaults.js.map +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/ButtonBadge.css.d.ts +2 -0
- package/dist/generated/themes/ButtonBadge.css.js +8 -0
- package/dist/generated/themes/ButtonBadge.css.js.map +1 -0
- 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/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/TableRowActionBase.css.d.ts +1 -1
- package/dist/generated/themes/TableRowActionBase.css.js +1 -1
- package/dist/generated/themes/TableRowActionBase.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/TimePickerClock.css.d.ts +1 -1
- package/dist/generated/themes/TimePickerClock.css.js +1 -1
- package/dist/generated/themes/TimePickerClock.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_hcb/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/types/ButtonBadgeDesign.d.ts +25 -0
- package/dist/types/ButtonBadgeDesign.js +27 -0
- package/dist/types/ButtonBadgeDesign.js.map +1 -0
- package/dist/types/TableGrowingMode.d.ts +2 -0
- package/dist/types/TableGrowingMode.js +2 -0
- package/dist/types/TableGrowingMode.js.map +1 -1
- package/dist/vscode.html-custom-data.json +31 -10
- package/dist/web-types.json +80 -17
- package/package.json +9 -9
- package/src/ButtonBadgeTemplate.tsx +6 -0
- package/src/ButtonTemplate.tsx +10 -1
- package/src/SelectPopoverTemplate.tsx +2 -2
- package/src/TagTemplate.tsx +2 -1
- package/src/TimePickerClockTemplate.tsx +35 -36
- package/src/TimePickerPopoverTemplate.tsx +1 -0
- package/src/TimeSelectionClocksTemplate.tsx +2 -1
- package/src/i18n/messagebundle.properties +0 -3
- package/src/i18n/messagebundle_ar.properties +11 -1
- package/src/i18n/messagebundle_bg.properties +11 -1
- package/src/i18n/messagebundle_ca.properties +11 -1
- package/src/i18n/messagebundle_cnr.properties +11 -1
- package/src/i18n/messagebundle_cs.properties +10 -0
- package/src/i18n/messagebundle_cy.properties +11 -1
- package/src/i18n/messagebundle_da.properties +10 -0
- package/src/i18n/messagebundle_de.properties +11 -1
- package/src/i18n/messagebundle_el.properties +11 -1
- package/src/i18n/messagebundle_en.properties +8 -0
- package/src/i18n/messagebundle_en_GB.properties +11 -1
- package/src/i18n/messagebundle_en_US_sappsd.properties +8 -0
- package/src/i18n/messagebundle_en_US_saprigi.properties +8 -0
- package/src/i18n/messagebundle_en_US_saptrc.properties +8 -0
- package/src/i18n/messagebundle_es.properties +11 -1
- package/src/i18n/messagebundle_es_MX.properties +11 -1
- package/src/i18n/messagebundle_et.properties +11 -1
- package/src/i18n/messagebundle_fi.properties +11 -1
- package/src/i18n/messagebundle_fr.properties +11 -1
- package/src/i18n/messagebundle_fr_CA.properties +11 -1
- package/src/i18n/messagebundle_hi.properties +11 -1
- package/src/i18n/messagebundle_hr.properties +11 -1
- package/src/i18n/messagebundle_hu.properties +11 -1
- package/src/i18n/messagebundle_id.properties +11 -1
- package/src/i18n/messagebundle_it.properties +11 -1
- package/src/i18n/messagebundle_iw.properties +11 -1
- package/src/i18n/messagebundle_ja.properties +11 -1
- package/src/i18n/messagebundle_kk.properties +11 -1
- package/src/i18n/messagebundle_ko.properties +11 -1
- package/src/i18n/messagebundle_lt.properties +11 -1
- package/src/i18n/messagebundle_lv.properties +11 -1
- package/src/i18n/messagebundle_mk.properties +11 -1
- package/src/i18n/messagebundle_ms.properties +11 -1
- package/src/i18n/messagebundle_nl.properties +11 -1
- package/src/i18n/messagebundle_no.properties +11 -1
- package/src/i18n/messagebundle_pl.properties +11 -1
- package/src/i18n/messagebundle_pt.properties +11 -1
- package/src/i18n/messagebundle_pt_PT.properties +11 -1
- package/src/i18n/messagebundle_ro.properties +11 -1
- package/src/i18n/messagebundle_ru.properties +10 -0
- package/src/i18n/messagebundle_sh.properties +11 -1
- package/src/i18n/messagebundle_sk.properties +11 -1
- package/src/i18n/messagebundle_sl.properties +12 -2
- package/src/i18n/messagebundle_sr.properties +11 -1
- package/src/i18n/messagebundle_sv.properties +10 -0
- package/src/i18n/messagebundle_th.properties +11 -1
- package/src/i18n/messagebundle_tr.properties +10 -0
- package/src/i18n/messagebundle_uk.properties +14 -4
- package/src/i18n/messagebundle_vi.properties +11 -1
- package/src/i18n/messagebundle_zh_CN.properties +11 -1
- package/src/i18n/messagebundle_zh_TW.properties +11 -1
- package/src/themes/Button.css +37 -0
- package/src/themes/ButtonBadge.css +17 -0
- package/src/themes/ColorPicker.css +32 -38
- package/src/themes/SegmentedButton.css +1 -1
- package/src/themes/SplitButton.css +8 -8
- package/src/themes/Switch.css +2 -0
- package/src/themes/TableRow.css +0 -1
- package/src/themes/TableRowBase.css +1 -0
- package/src/themes/TimePickerClock.css +180 -9
- package/src/themes/base/ButtonBadge-parameters.css +3 -0
- package/src/themes/base/ColorPicker-parameters.css +5 -5
- package/src/themes/base/SegmentedButtton-parameters.css +0 -1
- package/src/themes/base/SplitButton-parameters.css +0 -2
- package/src/themes/base/sizes-parameters.css +29 -3
- package/src/themes/sap_fiori_3/parameters-bundle.css +1 -0
- package/src/themes/sap_fiori_3/sizes-parameters.css +6 -0
- package/src/themes/sap_fiori_3_dark/parameters-bundle.css +1 -0
- package/src/themes/sap_fiori_3_dark/sizes-parameters.css +6 -0
- package/src/themes/sap_fiori_3_hcb/ColorPicker-parameters.css +5 -1
- package/src/themes/sap_fiori_3_hcb/SplitButton-parameters.css +0 -1
- package/src/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -0
- package/src/themes/sap_fiori_3_hcb/sizes-parameters.css +6 -0
- package/src/themes/sap_fiori_3_hcw/ColorPicker-parameters.css +5 -1
- package/src/themes/sap_fiori_3_hcw/SplitButton-parameters.css +0 -1
- package/src/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -0
- package/src/themes/sap_fiori_3_hcw/sizes-parameters.css +6 -0
- package/src/themes/sap_horizon/ColorPicker-parameters.css +0 -4
- package/src/themes/sap_horizon/SegmentedButtton-parameters.css +0 -1
- package/src/themes/sap_horizon/SplitButton-parameters.css +0 -1
- package/src/themes/sap_horizon/parameters-bundle.css +1 -0
- package/src/themes/sap_horizon/sizes-parameters.css +0 -1
- package/src/themes/sap_horizon_dark/ColorPicker-parameters.css +0 -4
- package/src/themes/sap_horizon_dark/SegmentedButtton-parameters.css +0 -1
- package/src/themes/sap_horizon_dark/SplitButton-parameters.css +0 -1
- package/src/themes/sap_horizon_dark/parameters-bundle.css +1 -0
- package/src/themes/sap_horizon_dark/sizes-parameters.css +0 -1
- package/src/themes/sap_horizon_hcb/ColorPicker-parameters.css +3 -4
- package/src/themes/sap_horizon_hcb/SegmentedButtton-parameters.css +0 -1
- package/src/themes/sap_horizon_hcb/SplitButton-parameters.css +0 -1
- package/src/themes/sap_horizon_hcb/parameters-bundle.css +1 -0
- package/src/themes/sap_horizon_hcb/sizes-parameters.css +3 -1
- package/src/themes/sap_horizon_hcw/ColorPicker-parameters.css +3 -4
- package/src/themes/sap_horizon_hcw/SegmentedButtton-parameters.css +0 -1
- package/src/themes/sap_horizon_hcw/SplitButton-parameters.css +0 -1
- package/src/themes/sap_horizon_hcw/parameters-bundle.css +1 -0
- package/src/themes/sap_horizon_hcw/sizes-parameters.css +3 -1
- package/dist/NavigationMenu.d.ts +0 -34
- package/dist/NavigationMenu.js +0 -64
- package/dist/NavigationMenu.js.map +0 -1
- package/dist/NavigationMenuItem.d.ts +0 -76
- package/dist/NavigationMenuItem.js +0 -76
- package/dist/NavigationMenuItem.js.map +0 -1
- package/dist/NavigationMenuItemTemplate.d.ts +0 -3
- package/dist/NavigationMenuItemTemplate.js +0 -44
- package/dist/NavigationMenuItemTemplate.js.map +0 -1
- package/dist/NavigationMenuTemplate.d.ts +0 -2
- package/dist/NavigationMenuTemplate.js +0 -15
- package/dist/NavigationMenuTemplate.js.map +0 -1
- package/dist/css/themes/NavigationMenu.css +0 -1
- package/dist/css/themes/NavigationMenuItem.css +0 -1
- package/dist/generated/themes/NavigationMenu.css.d.ts +0 -2
- package/dist/generated/themes/NavigationMenu.css.js +0 -8
- package/dist/generated/themes/NavigationMenu.css.js.map +0 -1
- package/dist/generated/themes/NavigationMenuItem.css.d.ts +0 -2
- package/dist/generated/themes/NavigationMenuItem.css.js +0 -8
- package/dist/generated/themes/NavigationMenuItem.css.js.map +0 -1
- package/src/NavigationMenuItemTemplate.tsx +0 -144
- package/src/NavigationMenuTemplate.tsx +0 -68
- package/src/themes/NavigationMenu.css +0 -17
- package/src/themes/NavigationMenuItem.css +0 -56
package/dist/AvatarGroup.d.ts
CHANGED
|
@@ -172,7 +172,7 @@ declare class AvatarGroup extends UI5Element {
|
|
|
172
172
|
* @private
|
|
173
173
|
*/
|
|
174
174
|
get _overflowButtonEffectiveWidth(): number;
|
|
175
|
-
get firstAvatarSize(): "S" | "
|
|
175
|
+
get firstAvatarSize(): "S" | "L" | "XS" | "M" | "XL";
|
|
176
176
|
onAfterRendering(): void;
|
|
177
177
|
onBeforeRendering(): void;
|
|
178
178
|
onEnterDOM(): void;
|
package/dist/Button.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import type { I18nText } from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
|
6
6
|
import ButtonDesign from "./types/ButtonDesign.js";
|
|
7
7
|
import ButtonType from "./types/ButtonType.js";
|
|
8
8
|
import type ButtonAccessibleRole from "./types/ButtonAccessibleRole.js";
|
|
9
|
+
import type ButtonBadge from "./ButtonBadge.js";
|
|
9
10
|
/**
|
|
10
11
|
* Interface for components that may be used as a button inside numerous higher-order components
|
|
11
12
|
* @public
|
|
@@ -40,6 +41,8 @@ type ButtonAccessibilityAttributes = Pick<AccessibilityAttributes, "expanded" |
|
|
|
40
41
|
*
|
|
41
42
|
* `import "@ui5/webcomponents/dist/Button.js";`
|
|
42
43
|
* @csspart button - Used to style the native button element
|
|
44
|
+
* @csspart icon - Used to style the icon in the native button element
|
|
45
|
+
* @csspart endIcon - Used to style the end icon in the native button element
|
|
43
46
|
* @constructor
|
|
44
47
|
* @extends UI5Element
|
|
45
48
|
* @implements { IButton }
|
|
@@ -216,12 +219,19 @@ declare class Button extends UI5Element implements IButton {
|
|
|
216
219
|
* @public
|
|
217
220
|
*/
|
|
218
221
|
text: Array<Node>;
|
|
222
|
+
/**
|
|
223
|
+
* Adds a badge to the button.
|
|
224
|
+
* @since 2.7.0
|
|
225
|
+
* @public
|
|
226
|
+
*/
|
|
227
|
+
badge: Array<ButtonBadge>;
|
|
219
228
|
_deactivate: () => void;
|
|
220
229
|
static i18nBundle: I18nBundle;
|
|
221
230
|
constructor();
|
|
222
231
|
_ontouchstart(): void;
|
|
223
232
|
onEnterDOM(): void;
|
|
224
233
|
onBeforeRendering(): Promise<void>;
|
|
234
|
+
_setBadgeOverlayStyle(): void;
|
|
225
235
|
_onclick(): void;
|
|
226
236
|
_onmousedown(): void;
|
|
227
237
|
_ontouchend(e: TouchEvent): void;
|
|
@@ -243,6 +253,7 @@ declare class Button extends UI5Element implements IButton {
|
|
|
243
253
|
get ariaDescriptionText(): string | undefined;
|
|
244
254
|
get _isSubmit(): boolean;
|
|
245
255
|
get _isReset(): boolean;
|
|
256
|
+
get shouldRenderBadge(): boolean;
|
|
246
257
|
}
|
|
247
258
|
export default Button;
|
|
248
259
|
export type { ButtonAccessibilityAttributes, IButton, };
|
package/dist/Button.js
CHANGED
|
@@ -22,6 +22,7 @@ import { getEnableDefaultTooltips } from "@ui5/webcomponents-base/dist/config/To
|
|
|
22
22
|
import toLowercaseEnumValue from "@ui5/webcomponents-base/dist/util/toLowercaseEnumValue.js";
|
|
23
23
|
import ButtonDesign from "./types/ButtonDesign.js";
|
|
24
24
|
import ButtonType from "./types/ButtonType.js";
|
|
25
|
+
import ButtonBadgeDesign from "./types/ButtonBadgeDesign.js";
|
|
25
26
|
import ButtonTemplate from "./ButtonTemplate.js";
|
|
26
27
|
import { BUTTON_ARIA_TYPE_ACCEPT, BUTTON_ARIA_TYPE_REJECT, BUTTON_ARIA_TYPE_EMPHASIZED } from "./generated/i18n/i18n-defaults.js";
|
|
27
28
|
// Styles
|
|
@@ -54,6 +55,8 @@ let activeButton = null;
|
|
|
54
55
|
*
|
|
55
56
|
* `import "@ui5/webcomponents/dist/Button.js";`
|
|
56
57
|
* @csspart button - Used to style the native button element
|
|
58
|
+
* @csspart icon - Used to style the icon in the native button element
|
|
59
|
+
* @csspart endIcon - Used to style the end icon in the native button element
|
|
57
60
|
* @constructor
|
|
58
61
|
* @extends UI5Element
|
|
59
62
|
* @implements { IButton }
|
|
@@ -185,11 +188,21 @@ let Button = Button_1 = class Button extends UI5Element {
|
|
|
185
188
|
}
|
|
186
189
|
}
|
|
187
190
|
async onBeforeRendering() {
|
|
191
|
+
this._setBadgeOverlayStyle();
|
|
188
192
|
this.hasIcon = !!this.icon;
|
|
189
193
|
this.hasEndIcon = !!this.endIcon;
|
|
190
194
|
this.iconOnly = this.isIconOnly;
|
|
191
195
|
this.buttonTitle = this.tooltip || await this.getDefaultTooltip();
|
|
192
196
|
}
|
|
197
|
+
_setBadgeOverlayStyle() {
|
|
198
|
+
const needsOverflowVisible = this.badge.length && (this.badge[0].design === ButtonBadgeDesign.AttentionDot || this.badge[0].design === ButtonBadgeDesign.OverlayText);
|
|
199
|
+
if (needsOverflowVisible) {
|
|
200
|
+
this._internals.states.add("has-overlay-badge");
|
|
201
|
+
}
|
|
202
|
+
else {
|
|
203
|
+
this._internals.states.delete("has-overlay-badge");
|
|
204
|
+
}
|
|
205
|
+
}
|
|
193
206
|
_onclick() {
|
|
194
207
|
if (this.nonInteractive) {
|
|
195
208
|
return;
|
|
@@ -313,6 +326,9 @@ let Button = Button_1 = class Button extends UI5Element {
|
|
|
313
326
|
get _isReset() {
|
|
314
327
|
return this.type === ButtonType.Reset;
|
|
315
328
|
}
|
|
329
|
+
get shouldRenderBadge() {
|
|
330
|
+
return !!this.badge.length && (!!this.badge[0].text.length || this.badge[0].design === ButtonBadgeDesign.AttentionDot);
|
|
331
|
+
}
|
|
316
332
|
};
|
|
317
333
|
__decorate([
|
|
318
334
|
property()
|
|
@@ -383,6 +399,9 @@ __decorate([
|
|
|
383
399
|
__decorate([
|
|
384
400
|
slot({ type: Node, "default": true })
|
|
385
401
|
], Button.prototype, "text", void 0);
|
|
402
|
+
__decorate([
|
|
403
|
+
slot({ type: HTMLElement, invalidateOnChildChange: true })
|
|
404
|
+
], Button.prototype, "badge", void 0);
|
|
386
405
|
__decorate([
|
|
387
406
|
i18n("@ui5/webcomponents")
|
|
388
407
|
], Button, "i18nBundle", void 0);
|
package/dist/Button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../src/Button.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,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,EACN,OAAO,EACP,OAAO,EACP,QAAQ,EACR,OAAO,GACP,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,+DAA+D,CAAC;AAK1G,OAAO,EAAE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,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;6CACzB;AAStB;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;oCACnB;AAKZ;IADN,IAAI,CAAC,oBAAoB,CAAC;gCACG;AA7NzB,MAAM;IAjBX,aAAa,CAAC;QACd,GAAG,EAAE,YAAY;QACjB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,cAAc;QACxB,MAAM,EAAE,SAAS;QACjB,iBAAiB,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE;KAC3C,CAAC;IACF;;;OAGG;;IACF,KAAK,CAAC,qBAAqB,EAAE;QAC7B,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,IAAI;KAChB,CAAC;GACI,MAAM,CAiaX;AAED,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,eAAe,MAAM,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 i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport {\n\tisSpace,\n\tisEnter,\n\tisEscape,\n\tisShift,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\nimport type { AccessibilityAttributes, AriaRole } from \"@ui5/webcomponents-base\";\nimport type { ITabbable } from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { I18nText } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { getIconAccessibleName } from \"@ui5/webcomponents-base/dist/asset-registries/Icons.js\";\n\nimport {\n\tisDesktop,\n\tisSafari,\n} from \"@ui5/webcomponents-base/dist/Device.js\";\nimport willShowContent from \"@ui5/webcomponents-base/dist/util/willShowContent.js\";\nimport { submitForm, resetForm } from \"@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js\";\nimport { getEnableDefaultTooltips } from \"@ui5/webcomponents-base/dist/config/Tooltips.js\";\nimport toLowercaseEnumValue from \"@ui5/webcomponents-base/dist/util/toLowercaseEnumValue.js\";\nimport ButtonDesign from \"./types/ButtonDesign.js\";\nimport ButtonType from \"./types/ButtonType.js\";\nimport type ButtonAccessibleRole from \"./types/ButtonAccessibleRole.js\";\nimport ButtonTemplate from \"./ButtonTemplate.js\";\n\nimport { BUTTON_ARIA_TYPE_ACCEPT, BUTTON_ARIA_TYPE_REJECT, BUTTON_ARIA_TYPE_EMPHASIZED } from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport buttonCss from \"./generated/themes/Button.css.js\";\n\n/**\n * Interface for components that may be used as a button inside numerous higher-order components\n * @public\n */\ninterface IButton extends HTMLElement, ITabbable {\n\tnonInteractive: boolean;\n}\n\nlet isGlobalHandlerAttached = false;\nlet activeButton: Button | null = null;\n\ntype ButtonAccessibilityAttributes = Pick<AccessibilityAttributes, \"expanded\" | \"hasPopup\" | \"controls\">;\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-button` component represents a simple push button.\n * It enables users to trigger actions by clicking or tapping the `ui5-button`, or by pressing\n * certain keyboard keys, such as Enter.\n *\n * ### Usage\n *\n * For the `ui5-button` UI, you can define text, icon, or both. You can also specify\n * whether the text or the icon is displayed first.\n *\n * You can choose from a set of predefined types that offer different\n * styling to correspond to the triggered action.\n *\n * You can set the `ui5-button` as enabled or disabled. An enabled\n * `ui5-button` can be pressed by clicking or tapping it. The button changes\n * its style to provide visual feedback to the user that it is pressed or hovered over with\n * the mouse cursor. A disabled `ui5-button` appears inactive and cannot be pressed.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/Button.js\";`\n * @csspart button - Used to style the native button element\n * @constructor\n * @extends UI5Element\n * @implements { IButton }\n * @public\n */\n@customElement({\n\ttag: \"ui5-button\",\n\tformAssociated: true,\n\tlanguageAware: true,\n\trenderer: jsxRenderer,\n\ttemplate: ButtonTemplate,\n\tstyles: buttonCss,\n\tshadowRootOptions: { delegatesFocus: true },\n})\n/**\n * Fired whenever the active state of the component changes.\n * @private\n */\n@event(\"active-state-change\", {\n\tbubbles: true,\n\tcancelable: true,\n})\nclass Button extends UI5Element implements IButton {\n\teventDetails!: {\n\t\t\"active-state-change\": void,\n\t};\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 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 the icon, displayed as graphical element within the component after the button text.\n\t *\n\t * **Note:** It is highly recommended to use `endIcon` property only together with `icon` and/or `text` properties.\n\t * Usage of `endIcon` only should be avoided.\n\t *\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\tendIcon?: string;\n\n\t/**\n\t * When set to `true`, the component will\n\t * automatically submit the nearest HTML form element on `press`.\n\t *\n\t * **Note:** This property is only applicable within the context of an HTML Form element.`\n\t * @default false\n\t * @public\n\t * @deprecated Set the \"type\" property to \"Submit\" to achieve the same result. The \"submits\" property is ignored if \"type\" is set to any value other than \"Button\".\n\t */\n\t@property({ type: Boolean })\n\tsubmits = 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 additional accessibility attributes that will be applied to the component.\n\t * The following fields are supported:\n\t *\n\t * - **expanded**: Indicates whether the button, or another grouping element it controls, is currently expanded or collapsed.\n\t * Accepts the following string values: `true` or `false`\n\t *\n\t * - **hasPopup**: Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by the button.\n\t * Accepts the following string values: `dialog`, `grid`, `listbox`, `menu` or `tree`.\n\t *\n\t * - **controls**: Identifies the element (or elements) whose contents or presence are controlled by the button element.\n\t * Accepts a lowercase string value.\n\t *\n\t * @public\n\t * @since 1.2.0\n\t * @default {}\n\t */\n\t@property({ type: Object })\n\taccessibilityAttributes: ButtonAccessibilityAttributes = {};\n\n\t/**\n\t * Defines the accessible description of the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.5.0\n\t */\n\t@property()\n\taccessibleDescription?: string;\n\n\t/**\n\t * Defines whether the button has special form-related functionality.\n\t *\n\t * **Note:** This property is only applicable within the context of an HTML Form element.\n\t * @default \"Button\"\n\t * @public\n\t * @since 1.15.0\n\t */\n\t@property()\n\ttype: `${ButtonType}` = \"Button\";\n\n\t/**\n\t * Describes the accessibility role of the button.\n\t *\n\t * **Note:** Use <code>ButtonAccessibleRole.Link</code> role only with a press handler, which performs a navigation. In all other scenarios the default button semantics are recommended.\n\t *\n\t * @default \"Button\"\n\t * @public\n\t * @since 1.23\n\t */\n\t@property()\n\taccessibleRole: `${ButtonAccessibleRole}` = \"Button\";\n\n\t/**\n\t * Used to switch the active state (pressed or not) of the component.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tactive = false;\n\n\t/**\n\t * Defines if a content has been added to the default slot\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\ticonOnly = false;\n\n\t/**\n\t * Indicates if the elements has a slotted icon\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\thasIcon = false;\n\n\t/**\n\t * Indicates if the elements has a slotted end icon\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\thasEndIcon = 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 * The current title of the button, either the tooltip property or the icons tooltip. The tooltip property with higher prio.\n\t * @private\n\t */\n\t@property({ noAttribute: true })\n\tbuttonTitle?: string;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Object })\n\t_iconSettings: object = {};\n\n\t/**\n\t * Defines the tabIndex of the component.\n\t * @private\n\t */\n\t@property({ noAttribute: true })\n\tforcedTabIndex = \"0\";\n\n\t/**\n\t * @since 1.0.0-rc.13\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_isTouch = false;\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_cancelAction = 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_deactivate: () => void;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._deactivate = () => {\n\t\t\tif (activeButton) {\n\t\t\t\tactiveButton._setActiveState(false);\n\t\t\t}\n\t\t};\n\n\t\tif (!isGlobalHandlerAttached) {\n\t\t\tdocument.addEventListener(\"mouseup\", this._deactivate);\n\n\t\t\tisGlobalHandlerAttached = true;\n\t\t}\n\t}\n\n\t_ontouchstart() {\n\t\tif (this.nonInteractive) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._setActiveState(true);\n\t}\n\n\tonEnterDOM() {\n\t\tif (isDesktop()) {\n\t\t\tthis.setAttribute(\"desktop\", \"\");\n\t\t}\n\t}\n\n\tasync onBeforeRendering() {\n\t\tthis.hasIcon = !!this.icon;\n\t\tthis.hasEndIcon = !!this.endIcon;\n\t\tthis.iconOnly = this.isIconOnly;\n\n\t\tthis.buttonTitle = this.tooltip || await this.getDefaultTooltip();\n\t}\n\n\t_onclick() {\n\t\tif (this.nonInteractive) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._isSubmit) {\n\t\t\tsubmitForm(this);\n\t\t}\n\n\t\tif (this._isReset) {\n\t\t\tresetForm(this);\n\t\t}\n\n\t\tif (isSafari()) {\n\t\t\tthis.getDomRef()?.focus();\n\t\t}\n\t}\n\n\t_onmousedown() {\n\t\tif (this.nonInteractive) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._setActiveState(true);\n\t\tactiveButton = this; // eslint-disable-line\n\t}\n\n\t_ontouchend(e: TouchEvent) {\n\t\tif (this.disabled) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t}\n\n\t\tif (this.active) {\n\t\t\tthis._setActiveState(false);\n\t\t}\n\n\t\tif (activeButton) {\n\t\t\tactiveButton._setActiveState(false);\n\t\t}\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tthis._cancelAction = isShift(e) || isEscape(e);\n\n\t\tif (isSpace(e) || isEnter(e)) {\n\t\t\tthis._setActiveState(true);\n\t\t} else if (this._cancelAction) {\n\t\t\tthis._setActiveState(false);\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (this._cancelAction) {\n\t\t\te.preventDefault();\n\t\t}\n\n\t\tif (isSpace(e) || isEnter(e)) {\n\t\t\tif (this.active) {\n\t\t\t\tthis._setActiveState(false);\n\t\t\t}\n\t\t}\n\t}\n\n\t_onfocusout() {\n\t\tif (this.nonInteractive) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.active) {\n\t\t\tthis._setActiveState(false);\n\t\t}\n\t}\n\n\t_setActiveState(active: boolean) {\n\t\tconst eventPrevented = !this.fireDecoratorEvent(\"active-state-change\");\n\n\t\tif (eventPrevented) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.active = active;\n\t}\n\n\tget _hasPopup() {\n\t\treturn this.accessibilityAttributes.hasPopup;\n\t}\n\n\tget hasButtonType() {\n\t\treturn this.design !== ButtonDesign.Default && this.design !== ButtonDesign.Transparent;\n\t}\n\n\tget isIconOnly() {\n\t\treturn !willShowContent(this.text);\n\t}\n\n\tstatic typeTextMappings(): Record<string, I18nText> {\n\t\treturn {\n\t\t\t\"Positive\": BUTTON_ARIA_TYPE_ACCEPT,\n\t\t\t\"Negative\": BUTTON_ARIA_TYPE_REJECT,\n\t\t\t\"Emphasized\": BUTTON_ARIA_TYPE_EMPHASIZED,\n\t\t};\n\t}\n\n\tgetDefaultTooltip() {\n\t\tif (!getEnableDefaultTooltips()) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn getIconAccessibleName(this.icon);\n\t}\n\n\tget buttonTypeText() {\n\t\treturn Button.i18nBundle.getText(Button.typeTextMappings()[this.design]);\n\t}\n\n\tget effectiveAccRole(): AriaRole {\n\t\treturn toLowercaseEnumValue(this.accessibleRole);\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 Number.parseInt(tabindex);\n\t\t}\n\n\t\treturn this.nonInteractive ? -1 : Number.parseInt(this.forcedTabIndex);\n\t}\n\n\tget showIconTooltip() {\n\t\treturn getEnableDefaultTooltips() && this.iconOnly && !this.tooltip;\n\t}\n\n\tget ariaLabelText() {\n\t\treturn getEffectiveAriaLabelText(this);\n\t}\n\n\tget ariaDescribedbyText() {\n\t\treturn this.hasButtonType ? \"ui5-button-hiddenText-type\" : undefined;\n\t}\n\n\tget ariaDescriptionText() {\n\t\treturn this.accessibleDescription === \"\" ? undefined : this.accessibleDescription;\n\t}\n\n\tget _isSubmit() {\n\t\treturn this.type === ButtonType.Submit || this.submits;\n\t}\n\n\tget _isReset() {\n\t\treturn this.type === ButtonType.Reset;\n\t}\n}\n\nButton.define();\n\nexport default Button;\nexport type {\n\tButtonAccessibilityAttributes,\n\tIButton,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../src/Button.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,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,EACN,OAAO,EACP,OAAO,EACP,QAAQ,EACR,OAAO,GACP,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,+DAA+D,CAAC;AAK1G,OAAO,EAAE,qBAAqB,EAAE,MAAM,wDAAwD,CAAC;AAE/F,OAAO,EACN,SAAS,EACT,QAAQ,GACR,MAAM,wCAAwC,CAAC;AAChD,OAAO,eAAe,MAAM,sDAAsD,CAAC;AACnF,OAAO,EAAE,UAAU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AC,qBAAqB,EAAE;QAC7B,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,IAAI;KAChB,CAAC;GACI,MAAM,CAybX;AAED,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,eAAe,MAAM,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 i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport {\n\tisSpace,\n\tisEnter,\n\tisEscape,\n\tisShift,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\nimport type { AccessibilityAttributes, AriaRole } from \"@ui5/webcomponents-base\";\nimport type { ITabbable } from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { I18nText } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { getIconAccessibleName } from \"@ui5/webcomponents-base/dist/asset-registries/Icons.js\";\n\nimport {\n\tisDesktop,\n\tisSafari,\n} from \"@ui5/webcomponents-base/dist/Device.js\";\nimport willShowContent from \"@ui5/webcomponents-base/dist/util/willShowContent.js\";\nimport { submitForm, resetForm } from \"@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js\";\nimport { getEnableDefaultTooltips } from \"@ui5/webcomponents-base/dist/config/Tooltips.js\";\nimport toLowercaseEnumValue from \"@ui5/webcomponents-base/dist/util/toLowercaseEnumValue.js\";\nimport ButtonDesign from \"./types/ButtonDesign.js\";\nimport ButtonType from \"./types/ButtonType.js\";\nimport ButtonBadgeDesign from \"./types/ButtonBadgeDesign.js\";\nimport type ButtonAccessibleRole from \"./types/ButtonAccessibleRole.js\";\nimport type ButtonBadge from \"./ButtonBadge.js\";\nimport ButtonTemplate from \"./ButtonTemplate.js\";\nimport { BUTTON_ARIA_TYPE_ACCEPT, BUTTON_ARIA_TYPE_REJECT, BUTTON_ARIA_TYPE_EMPHASIZED } from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport buttonCss from \"./generated/themes/Button.css.js\";\n\n/**\n * Interface for components that may be used as a button inside numerous higher-order components\n * @public\n */\ninterface IButton extends HTMLElement, ITabbable {\n\tnonInteractive: boolean;\n}\n\nlet isGlobalHandlerAttached = false;\nlet activeButton: Button | null = null;\n\ntype ButtonAccessibilityAttributes = Pick<AccessibilityAttributes, \"expanded\" | \"hasPopup\" | \"controls\">;\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-button` component represents a simple push button.\n * It enables users to trigger actions by clicking or tapping the `ui5-button`, or by pressing\n * certain keyboard keys, such as Enter.\n *\n * ### Usage\n *\n * For the `ui5-button` UI, you can define text, icon, or both. You can also specify\n * whether the text or the icon is displayed first.\n *\n * You can choose from a set of predefined types that offer different\n * styling to correspond to the triggered action.\n *\n * You can set the `ui5-button` as enabled or disabled. An enabled\n * `ui5-button` can be pressed by clicking or tapping it. The button changes\n * its style to provide visual feedback to the user that it is pressed or hovered over with\n * the mouse cursor. A disabled `ui5-button` appears inactive and cannot be pressed.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/Button.js\";`\n * @csspart button - Used to style the native button element\n * @csspart icon - Used to style the icon in the native button element\n * @csspart endIcon - Used to style the end icon in the native button element\n * @constructor\n * @extends UI5Element\n * @implements { IButton }\n * @public\n */\n@customElement({\n\ttag: \"ui5-button\",\n\tformAssociated: true,\n\tlanguageAware: true,\n\trenderer: jsxRenderer,\n\ttemplate: ButtonTemplate,\n\tstyles: buttonCss,\n\tshadowRootOptions: { delegatesFocus: true },\n})\n/**\n * Fired whenever the active state of the component changes.\n * @private\n */\n@event(\"active-state-change\", {\n\tbubbles: true,\n\tcancelable: true,\n})\nclass Button extends UI5Element implements IButton {\n\teventDetails!: {\n\t\t\"active-state-change\": void,\n\t};\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 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 the icon, displayed as graphical element within the component after the button text.\n\t *\n\t * **Note:** It is highly recommended to use `endIcon` property only together with `icon` and/or `text` properties.\n\t * Usage of `endIcon` only should be avoided.\n\t *\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\tendIcon?: string;\n\n\t/**\n\t * When set to `true`, the component will\n\t * automatically submit the nearest HTML form element on `press`.\n\t *\n\t * **Note:** This property is only applicable within the context of an HTML Form element.`\n\t * @default false\n\t * @public\n\t * @deprecated Set the \"type\" property to \"Submit\" to achieve the same result. The \"submits\" property is ignored if \"type\" is set to any value other than \"Button\".\n\t */\n\t@property({ type: Boolean })\n\tsubmits = 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 additional accessibility attributes that will be applied to the component.\n\t * The following fields are supported:\n\t *\n\t * - **expanded**: Indicates whether the button, or another grouping element it controls, is currently expanded or collapsed.\n\t * Accepts the following string values: `true` or `false`\n\t *\n\t * - **hasPopup**: Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by the button.\n\t * Accepts the following string values: `dialog`, `grid`, `listbox`, `menu` or `tree`.\n\t *\n\t * - **controls**: Identifies the element (or elements) whose contents or presence are controlled by the button element.\n\t * Accepts a lowercase string value.\n\t *\n\t * @public\n\t * @since 1.2.0\n\t * @default {}\n\t */\n\t@property({ type: Object })\n\taccessibilityAttributes: ButtonAccessibilityAttributes = {};\n\n\t/**\n\t * Defines the accessible description of the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.5.0\n\t */\n\t@property()\n\taccessibleDescription?: string;\n\n\t/**\n\t * Defines whether the button has special form-related functionality.\n\t *\n\t * **Note:** This property is only applicable within the context of an HTML Form element.\n\t * @default \"Button\"\n\t * @public\n\t * @since 1.15.0\n\t */\n\t@property()\n\ttype: `${ButtonType}` = \"Button\";\n\n\t/**\n\t * Describes the accessibility role of the button.\n\t *\n\t * **Note:** Use <code>ButtonAccessibleRole.Link</code> role only with a press handler, which performs a navigation. In all other scenarios the default button semantics are recommended.\n\t *\n\t * @default \"Button\"\n\t * @public\n\t * @since 1.23\n\t */\n\t@property()\n\taccessibleRole: `${ButtonAccessibleRole}` = \"Button\";\n\n\t/**\n\t * Used to switch the active state (pressed or not) of the component.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tactive = false;\n\n\t/**\n\t * Defines if a content has been added to the default slot\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\ticonOnly = false;\n\n\t/**\n\t * Indicates if the elements has a slotted icon\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\thasIcon = false;\n\n\t/**\n\t * Indicates if the elements has a slotted end icon\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\thasEndIcon = 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 * The current title of the button, either the tooltip property or the icons tooltip. The tooltip property with higher prio.\n\t * @private\n\t */\n\t@property({ noAttribute: true })\n\tbuttonTitle?: string;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Object })\n\t_iconSettings: object = {};\n\n\t/**\n\t * Defines the tabIndex of the component.\n\t * @private\n\t */\n\t@property({ noAttribute: true })\n\tforcedTabIndex = \"0\";\n\n\t/**\n\t * @since 1.0.0-rc.13\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_isTouch = false;\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_cancelAction = 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/**\n\t * Adds a badge to the button.\n\t * @since 2.7.0\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, invalidateOnChildChange: true })\n\tbadge!: Array<ButtonBadge>;\n\n\t_deactivate: () => void;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._deactivate = () => {\n\t\t\tif (activeButton) {\n\t\t\t\tactiveButton._setActiveState(false);\n\t\t\t}\n\t\t};\n\n\t\tif (!isGlobalHandlerAttached) {\n\t\t\tdocument.addEventListener(\"mouseup\", this._deactivate);\n\n\t\t\tisGlobalHandlerAttached = true;\n\t\t}\n\t}\n\n\t_ontouchstart() {\n\t\tif (this.nonInteractive) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._setActiveState(true);\n\t}\n\n\tonEnterDOM() {\n\t\tif (isDesktop()) {\n\t\t\tthis.setAttribute(\"desktop\", \"\");\n\t\t}\n\t}\n\n\tasync onBeforeRendering() {\n\t\tthis._setBadgeOverlayStyle();\n\n\t\tthis.hasIcon = !!this.icon;\n\t\tthis.hasEndIcon = !!this.endIcon;\n\t\tthis.iconOnly = this.isIconOnly;\n\n\t\tthis.buttonTitle = this.tooltip || await this.getDefaultTooltip();\n\t}\n\n\t_setBadgeOverlayStyle() {\n\t\tconst needsOverflowVisible = this.badge.length && (this.badge[0].design === ButtonBadgeDesign.AttentionDot || this.badge[0].design === ButtonBadgeDesign.OverlayText);\n\n\t\tif (needsOverflowVisible) {\n\t\t\tthis._internals.states.add(\"has-overlay-badge\");\n\t\t} else {\n\t\t\tthis._internals.states.delete(\"has-overlay-badge\");\n\t\t}\n\t}\n\n\t_onclick() {\n\t\tif (this.nonInteractive) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._isSubmit) {\n\t\t\tsubmitForm(this);\n\t\t}\n\n\t\tif (this._isReset) {\n\t\t\tresetForm(this);\n\t\t}\n\n\t\tif (isSafari()) {\n\t\t\tthis.getDomRef()?.focus();\n\t\t}\n\t}\n\n\t_onmousedown() {\n\t\tif (this.nonInteractive) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._setActiveState(true);\n\t\tactiveButton = this; // eslint-disable-line\n\t}\n\n\t_ontouchend(e: TouchEvent) {\n\t\tif (this.disabled) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t}\n\n\t\tif (this.active) {\n\t\t\tthis._setActiveState(false);\n\t\t}\n\n\t\tif (activeButton) {\n\t\t\tactiveButton._setActiveState(false);\n\t\t}\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tthis._cancelAction = isShift(e) || isEscape(e);\n\n\t\tif (isSpace(e) || isEnter(e)) {\n\t\t\tthis._setActiveState(true);\n\t\t} else if (this._cancelAction) {\n\t\t\tthis._setActiveState(false);\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (this._cancelAction) {\n\t\t\te.preventDefault();\n\t\t}\n\n\t\tif (isSpace(e) || isEnter(e)) {\n\t\t\tif (this.active) {\n\t\t\t\tthis._setActiveState(false);\n\t\t\t}\n\t\t}\n\t}\n\n\t_onfocusout() {\n\t\tif (this.nonInteractive) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.active) {\n\t\t\tthis._setActiveState(false);\n\t\t}\n\t}\n\n\t_setActiveState(active: boolean) {\n\t\tconst eventPrevented = !this.fireDecoratorEvent(\"active-state-change\");\n\n\t\tif (eventPrevented) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.active = active;\n\t}\n\n\tget _hasPopup() {\n\t\treturn this.accessibilityAttributes.hasPopup;\n\t}\n\n\tget hasButtonType() {\n\t\treturn this.design !== ButtonDesign.Default && this.design !== ButtonDesign.Transparent;\n\t}\n\n\tget isIconOnly() {\n\t\treturn !willShowContent(this.text);\n\t}\n\n\tstatic typeTextMappings(): Record<string, I18nText> {\n\t\treturn {\n\t\t\t\"Positive\": BUTTON_ARIA_TYPE_ACCEPT,\n\t\t\t\"Negative\": BUTTON_ARIA_TYPE_REJECT,\n\t\t\t\"Emphasized\": BUTTON_ARIA_TYPE_EMPHASIZED,\n\t\t};\n\t}\n\n\tgetDefaultTooltip() {\n\t\tif (!getEnableDefaultTooltips()) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn getIconAccessibleName(this.icon);\n\t}\n\n\tget buttonTypeText() {\n\t\treturn Button.i18nBundle.getText(Button.typeTextMappings()[this.design]);\n\t}\n\n\tget effectiveAccRole(): AriaRole {\n\t\treturn toLowercaseEnumValue(this.accessibleRole);\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 Number.parseInt(tabindex);\n\t\t}\n\n\t\treturn this.nonInteractive ? -1 : Number.parseInt(this.forcedTabIndex);\n\t}\n\n\tget showIconTooltip() {\n\t\treturn getEnableDefaultTooltips() && this.iconOnly && !this.tooltip;\n\t}\n\n\tget ariaLabelText() {\n\t\treturn getEffectiveAriaLabelText(this);\n\t}\n\n\tget ariaDescribedbyText() {\n\t\treturn this.hasButtonType ? \"ui5-button-hiddenText-type\" : undefined;\n\t}\n\n\tget ariaDescriptionText() {\n\t\treturn this.accessibleDescription === \"\" ? undefined : this.accessibleDescription;\n\t}\n\n\tget _isSubmit() {\n\t\treturn this.type === ButtonType.Submit || this.submits;\n\t}\n\n\tget _isReset() {\n\t\treturn this.type === ButtonType.Reset;\n\t}\n\n\tget shouldRenderBadge() {\n\t\treturn !!this.badge.length && (!!this.badge[0].text.length || this.badge[0].design === ButtonBadgeDesign.AttentionDot);\n\t}\n}\n\nButton.define();\n\nexport default Button;\nexport type {\n\tButtonAccessibilityAttributes,\n\tIButton,\n};\n"]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
|
+
import type BadgeDesign from "./types/ButtonBadgeDesign.js";
|
|
3
|
+
/**
|
|
4
|
+
* @class
|
|
5
|
+
*
|
|
6
|
+
* The `ui5-button-badge` component defines a badge that appears in the `ui5-button`.
|
|
7
|
+
*
|
|
8
|
+
* * ### ES6 Module Import
|
|
9
|
+
*
|
|
10
|
+
* `import "@ui5/webcomponents/dist/ButtonBadge.js";`
|
|
11
|
+
* @constructor
|
|
12
|
+
* @extends UI5Element
|
|
13
|
+
* @since 2.7.0
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
declare class ButtonBadge extends UI5Element {
|
|
17
|
+
/**
|
|
18
|
+
* Determines where the badge should be placed and how it should be styled.
|
|
19
|
+
* @since 2.7.0
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
design: `${BadgeDesign}`;
|
|
23
|
+
/**
|
|
24
|
+
* Defines the text of the component.
|
|
25
|
+
*
|
|
26
|
+
* **Note:** Text is not needed when the `design` property is set to `AttentionDot`.
|
|
27
|
+
* @since 2.7.0
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
text: string;
|
|
31
|
+
}
|
|
32
|
+
export default ButtonBadge;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
8
|
+
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
9
|
+
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
10
|
+
import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
|
|
11
|
+
import ButtonBadgeTemplate from "./ButtonBadgeTemplate.js";
|
|
12
|
+
// Styles
|
|
13
|
+
import buttonBadgeCss from "./generated/themes/ButtonBadge.css.js";
|
|
14
|
+
/**
|
|
15
|
+
* @class
|
|
16
|
+
*
|
|
17
|
+
* The `ui5-button-badge` component defines a badge that appears in the `ui5-button`.
|
|
18
|
+
*
|
|
19
|
+
* * ### ES6 Module Import
|
|
20
|
+
*
|
|
21
|
+
* `import "@ui5/webcomponents/dist/ButtonBadge.js";`
|
|
22
|
+
* @constructor
|
|
23
|
+
* @extends UI5Element
|
|
24
|
+
* @since 2.7.0
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
27
|
+
let ButtonBadge = class ButtonBadge extends UI5Element {
|
|
28
|
+
constructor() {
|
|
29
|
+
super(...arguments);
|
|
30
|
+
/**
|
|
31
|
+
* Determines where the badge should be placed and how it should be styled.
|
|
32
|
+
* @since 2.7.0
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
this.design = "AttentionDot";
|
|
36
|
+
/**
|
|
37
|
+
* Defines the text of the component.
|
|
38
|
+
*
|
|
39
|
+
* **Note:** Text is not needed when the `design` property is set to `AttentionDot`.
|
|
40
|
+
* @since 2.7.0
|
|
41
|
+
* @public
|
|
42
|
+
*/
|
|
43
|
+
this.text = "";
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
__decorate([
|
|
47
|
+
property()
|
|
48
|
+
], ButtonBadge.prototype, "design", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
property()
|
|
51
|
+
], ButtonBadge.prototype, "text", void 0);
|
|
52
|
+
ButtonBadge = __decorate([
|
|
53
|
+
customElement({
|
|
54
|
+
tag: "ui5-button-badge",
|
|
55
|
+
renderer: jsxRenderer,
|
|
56
|
+
template: ButtonBadgeTemplate,
|
|
57
|
+
styles: buttonBadgeCss,
|
|
58
|
+
})
|
|
59
|
+
], ButtonBadge);
|
|
60
|
+
ButtonBadge.define();
|
|
61
|
+
export default ButtonBadge;
|
|
62
|
+
//# sourceMappingURL=ButtonBadge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonBadge.js","sourceRoot":"","sources":["../src/ButtonBadge.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAE3E,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,mBAAmB,MAAM,0BAA0B,CAAC;AAE3D,SAAS;AACT,OAAO,cAAc,MAAM,uCAAuC,CAAC;AAEnE;;;;;;;;;;;;GAYG;AAOH,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,UAAU;IAApC;;QACC;;;;UAIE;QAEF,WAAM,GAAqB,cAAc,CAAC;QAE1C;;;;;;UAME;QAEF,SAAI,GAAW,EAAE,CAAC;IACnB,CAAC;CAAA,CAAA;AAXA;IADC,QAAQ,EAAE;2CAC+B;AAU1C;IADC,QAAQ,EAAE;yCACO;AAjBb,WAAW;IANhB,aAAa,CAAC;QACd,GAAG,EAAE,kBAAkB;QACvB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,mBAAmB;QAC7B,MAAM,EAAE,cAAc;KACtB,CAAC;GACI,WAAW,CAkBhB;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 property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport type BadgeDesign from \"./types/ButtonBadgeDesign.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport ButtonBadgeTemplate from \"./ButtonBadgeTemplate.js\";\n\n// Styles\nimport buttonBadgeCss from \"./generated/themes/ButtonBadge.css.js\";\n\n/**\n * @class\n *\n * The `ui5-button-badge` component defines a badge that appears in the `ui5-button`.\n *\n * * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/ButtonBadge.js\";`\n * @constructor\n * @extends UI5Element\n * @since 2.7.0\n * @public\n */\n@customElement({\n\ttag: \"ui5-button-badge\",\n\trenderer: jsxRenderer,\n\ttemplate: ButtonBadgeTemplate,\n\tstyles: buttonBadgeCss,\n})\nclass ButtonBadge extends UI5Element {\n\t/**\n * Determines where the badge should be placed and how it should be styled.\n * @since 2.7.0\n\t * @public\n\t*/\n\t@property()\n\tdesign: `${BadgeDesign}` = \"AttentionDot\";\n\n\t/**\n * Defines the text of the component.\n\t *\n\t * **Note:** Text is not needed when the `design` property is set to `AttentionDot`.\n * @since 2.7.0\n\t * @public\n\t*/\n\t@property()\n\ttext: string = \"\";\n}\n\nButtonBadge.define();\n\nexport default ButtonBadge;\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "@ui5/webcomponents-base/jsx-runtime";
|
|
2
|
+
import Tag from "./Tag.js";
|
|
3
|
+
export default function ButtonTemplate() {
|
|
4
|
+
return _jsx(Tag, { design: "Critical", "hide-state-icon": true, children: this.text });
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=ButtonBadgeTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonBadgeTemplate.js","sourceRoot":"","sources":["../src/ButtonBadgeTemplate.tsx"],"names":[],"mappings":";AACA,OAAO,GAAG,MAAM,UAAU,CAAC;AAE3B,MAAM,CAAC,OAAO,UAAU,cAAc;IACrC,OAAO,KAAC,GAAG,IAAC,MAAM,EAAC,UAAU,qCAAkB,IAAI,CAAC,IAAI,GAAO,CAAC;AACjE,CAAC","sourcesContent":["import type ButtonBadge from \"./ButtonBadge.js\";\nimport Tag from \"./Tag.js\";\n\nexport default function ButtonTemplate(this: ButtonBadge) {\n\treturn <Tag design=\"Critical\" hide-state-icon>{this.text}</Tag>;\n}\n"]}
|
package/dist/ButtonTemplate.js
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@ui5/webcomponents-base/jsx-runtime";
|
|
2
2
|
import Icon from "./Icon.js";
|
|
3
3
|
export default function ButtonTemplate(injectedProps) {
|
|
4
|
-
return (_jsx(_Fragment, { children: _jsxs("button", { type: "button", class:
|
|
4
|
+
return (_jsx(_Fragment, { children: _jsxs("button", { type: "button", class: {
|
|
5
|
+
"ui5-button-root": true,
|
|
6
|
+
"ui5-button-badge-placement-end": this.badge[0]?.design === "InlineText",
|
|
7
|
+
"ui5-button-badge-placement-end-top": this.badge[0]?.design === "OverlayText",
|
|
8
|
+
"ui5-button-badge-dot": this.badge[0]?.design === "AttentionDot",
|
|
9
|
+
}, disabled: this.disabled, "data-sap-focus-ref": true, "aria-pressed": injectedProps?.ariaPressed, "aria-valuemin": injectedProps?.ariaValueMin, "aria-valuemax": injectedProps?.ariaValueMax, "aria-valuenow": injectedProps?.ariaValueNow, "aria-valuetext": injectedProps?.ariaValueText, onFocusOut: this._onfocusout, onClick: this._onclick, onMouseDown: this._onmousedown, onKeyDown: this._onkeydown, onKeyUp: this._onkeyup, onTouchStart: this._ontouchstart, onTouchEnd: this._ontouchend, tabindex: this.tabIndexValue, "aria-expanded": this.accessibilityAttributes.expanded, "aria-controls": this.accessibilityAttributes.controls, "aria-haspopup": this._hasPopup, "aria-label": this.ariaLabelText, "aria-describedby": this.ariaDescribedbyText, "aria-description": this.ariaDescriptionText, title: this.buttonTitle, part: "button", role: this.effectiveAccRole, children: [this.icon &&
|
|
5
10
|
_jsx(Icon, { class: "ui5-button-icon", name: this.icon, mode: "Decorative", part: "icon", showTooltip: this.showIconTooltip }), _jsx("span", { id: `${this._id}-content`, class: "ui5-button-text", children: _jsx("bdi", { children: _jsx("slot", {}) }) }), this.endIcon &&
|
|
6
11
|
_jsx(Icon, { class: "ui5-button-end-icon", name: this.endIcon, mode: "Decorative", part: "endIcon" }), this.hasButtonType &&
|
|
7
|
-
_jsx("span", { id: "ui5-button-hiddenText-type", "aria-hidden": "true", class: "ui5-hidden-text", children: this.buttonTypeText })
|
|
12
|
+
_jsx("span", { id: "ui5-button-hiddenText-type", "aria-hidden": "true", class: "ui5-hidden-text", children: this.buttonTypeText }), this.shouldRenderBadge &&
|
|
13
|
+
_jsx("slot", { name: "badge" })] }) }));
|
|
8
14
|
}
|
|
9
15
|
//# sourceMappingURL=ButtonTemplate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonTemplate.js","sourceRoot":"","sources":["../src/ButtonTemplate.tsx"],"names":[],"mappings":";AACA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,CAAC,OAAO,UAAU,cAAc,CAAe,aAMpD;IACA,OAAO,CAAC,4BACP,kBACC,IAAI,EAAC,QAAQ,EACb,KAAK,
|
|
1
|
+
{"version":3,"file":"ButtonTemplate.js","sourceRoot":"","sources":["../src/ButtonTemplate.tsx"],"names":[],"mappings":";AACA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,CAAC,OAAO,UAAU,cAAc,CAAe,aAMpD;IACA,OAAO,CAAC,4BACP,kBACC,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE;gBACN,iBAAiB,EAAE,IAAI;gBACvB,gCAAgC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,KAAK,YAAY;gBACxE,oCAAoC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,KAAK,aAAa;gBAC7E,sBAAsB,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,KAAK,cAAc;aAChE,EACD,QAAQ,EAAE,IAAI,CAAC,QAAQ,8CAET,aAAa,EAAE,WAAW,mBACzB,aAAa,EAAE,YAAY,mBAC3B,aAAa,EAAE,YAAY,mBAC3B,aAAa,EAAE,YAAY,oBAC1B,aAAa,EAAE,aAAa,EAC5C,UAAU,EAAE,IAAI,CAAC,WAAW,EAC5B,OAAO,EAAE,IAAI,CAAC,QAAQ,EACtB,WAAW,EAAE,IAAI,CAAC,YAAY,EAC9B,SAAS,EAAE,IAAI,CAAC,UAAU,EAC1B,OAAO,EAAE,IAAI,CAAC,QAAQ,EACtB,YAAY,EAAE,IAAI,CAAC,aAAa,EAChC,UAAU,EAAE,IAAI,CAAC,WAAW,EAC5B,QAAQ,EAAE,IAAI,CAAC,aAAa,mBACb,IAAI,CAAC,uBAAuB,CAAC,QAAQ,mBACrC,IAAI,CAAC,uBAAuB,CAAC,QAAQ,mBACrC,IAAI,CAAC,SAAS,gBACjB,IAAI,CAAC,aAAa,sBACZ,IAAI,CAAC,mBAAmB,sBACxB,IAAI,CAAC,mBAAmB,EAC1C,KAAK,EAAE,IAAI,CAAC,WAAW,EACvB,IAAI,EAAC,QAAQ,EACb,IAAI,EAAE,IAAI,CAAC,gBAAgB,aAEzB,IAAI,CAAC,IAAI;oBACV,KAAC,IAAI,IACJ,KAAK,EAAC,iBAAiB,EACvB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAC,YAAY,EACjB,IAAI,EAAC,MAAM,EACX,WAAW,EAAE,IAAI,CAAC,eAAe,GAChC,EAGH,eAAM,EAAE,EAAE,GAAG,IAAI,CAAC,GAAG,UAAU,EAAE,KAAK,EAAC,iBAAiB,YACvD,wBACC,gBAAa,GACR,GACA,EAEN,IAAI,CAAC,OAAO;oBACZ,KAAC,IAAI,IACJ,KAAK,EAAC,qBAAqB,EAC3B,IAAI,EAAE,IAAI,CAAC,OAAO,EAClB,IAAI,EAAC,YAAY,EACjB,IAAI,EAAC,SAAS,GACb,EAGF,IAAI,CAAC,aAAa;oBAClB,eAAM,EAAE,EAAC,4BAA4B,iBAAa,MAAM,EAAC,KAAK,EAAC,iBAAiB,YAAE,IAAI,CAAC,cAAc,GAAQ,EAG7G,IAAI,CAAC,iBAAiB;oBACtB,eAAM,IAAI,EAAC,OAAO,GAAE,IAEb,GACP,CAAC,CAAC;AACN,CAAC","sourcesContent":["import type Button from \"./Button.js\";\nimport Icon from \"./Icon.js\";\n\nexport default function ButtonTemplate(this: Button, injectedProps?: {\n\t\tariaPressed?: boolean,\n\t\tariaValueMax?: number,\n\t\tariaValueMin?: number,\n\t\tariaValueNow?: number,\n\t\tariaValueText?: string,\n}) {\n\treturn (<>\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\tclass={{\n\t\t\t\t\"ui5-button-root\": true,\n\t\t\t\t\"ui5-button-badge-placement-end\": this.badge[0]?.design === \"InlineText\",\n\t\t\t\t\"ui5-button-badge-placement-end-top\": this.badge[0]?.design === \"OverlayText\",\n\t\t\t\t\"ui5-button-badge-dot\": this.badge[0]?.design === \"AttentionDot\",\n\t\t\t}}\n\t\t\tdisabled={this.disabled}\n\t\t\tdata-sap-focus-ref\n\t\t\taria-pressed={injectedProps?.ariaPressed}\n\t\t\taria-valuemin={injectedProps?.ariaValueMin}\n\t\t\taria-valuemax={injectedProps?.ariaValueMax}\n\t\t\taria-valuenow={injectedProps?.ariaValueNow}\n\t\t\taria-valuetext={injectedProps?.ariaValueText}\n\t\t\tonFocusOut={this._onfocusout}\n\t\t\tonClick={this._onclick}\n\t\t\tonMouseDown={this._onmousedown}\n\t\t\tonKeyDown={this._onkeydown}\n\t\t\tonKeyUp={this._onkeyup}\n\t\t\tonTouchStart={this._ontouchstart}\n\t\t\tonTouchEnd={this._ontouchend}\n\t\t\ttabindex={this.tabIndexValue}\n\t\t\taria-expanded={this.accessibilityAttributes.expanded}\n\t\t\taria-controls={this.accessibilityAttributes.controls}\n\t\t\taria-haspopup={this._hasPopup}\n\t\t\taria-label={this.ariaLabelText}\n\t\t\taria-describedby={this.ariaDescribedbyText}\n\t\t\taria-description={this.ariaDescriptionText}\n\t\t\ttitle={this.buttonTitle}\n\t\t\tpart=\"button\"\n\t\t\trole={this.effectiveAccRole}\n\t\t>\n\t\t\t{ this.icon &&\n\t\t\t\t<Icon\n\t\t\t\t\tclass=\"ui5-button-icon\"\n\t\t\t\t\tname={this.icon}\n\t\t\t\t\tmode=\"Decorative\"\n\t\t\t\t\tpart=\"icon\"\n\t\t\t\t\tshowTooltip={this.showIconTooltip}\n\t\t\t\t/>\n\t\t\t}\n\n\t\t\t<span id={`${this._id}-content`} class=\"ui5-button-text\">\n\t\t\t\t<bdi>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</bdi>\n\t\t\t</span>\n\n\t\t\t{this.endIcon &&\n\t\t\t\t<Icon\n\t\t\t\t\tclass=\"ui5-button-end-icon\"\n\t\t\t\t\tname={this.endIcon}\n\t\t\t\t\tmode=\"Decorative\"\n\t\t\t\t\tpart=\"endIcon\"\n\t\t\t\t/>\n\t\t\t}\n\n\t\t\t{this.hasButtonType &&\n\t\t\t\t<span id=\"ui5-button-hiddenText-type\" aria-hidden=\"true\" class=\"ui5-hidden-text\">{this.buttonTypeText}</span>\n\t\t\t}\n\n\t\t\t{this.shouldRenderBadge &&\n\t\t\t\t<slot name=\"badge\"/>\n\t\t\t}\n\t\t</button>\n\t</>);\n}\n"]}
|
|
@@ -44,7 +44,6 @@ declare class ColorPalettePopover extends UI5Element {
|
|
|
44
44
|
/**
|
|
45
45
|
* Defines whether the user can choose a custom color from a component.
|
|
46
46
|
*
|
|
47
|
-
* **Note:** In order to use this property you need to import the following module: `"@ui5/webcomponents/dist/features/ColorPaletteMoreColors.js"`
|
|
48
47
|
* @default false
|
|
49
48
|
* @public
|
|
50
49
|
*/
|
|
@@ -56,7 +56,6 @@ let ColorPalettePopover = ColorPalettePopover_1 = class ColorPalettePopover exte
|
|
|
56
56
|
/**
|
|
57
57
|
* Defines whether the user can choose a custom color from a component.
|
|
58
58
|
*
|
|
59
|
-
* **Note:** In order to use this property you need to import the following module: `"@ui5/webcomponents/dist/features/ColorPaletteMoreColors.js"`
|
|
60
59
|
* @default false
|
|
61
60
|
* @public
|
|
62
61
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPalettePopover.js","sourceRoot":"","sources":["../src/ColorPalettePopover.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,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AC,kCAAkC,CAAC,CAAC;IACnF,CAAC;IAED,IAAI,KAAK;QACR,OAAO,IAAI,CAAC,IAAI,IAAI,SAAS,CAAC;IAC/B,CAAC;CACD,CAAA;AAnIA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;6DACJ;AAUxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;2DACN;AAQtB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;6DACJ;AAUxB;IADC,QAAQ,EAAE;yDACW;AAStB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;iDAChB;AAWZ;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,qBAAqB,EAAE,CAAC;mDACjB;AAO9B;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC;mDAClC;AAG3B;IADN,IAAI,CAAC,oBAAoB,CAAC;6CACG;AAtEzB,mBAAmB;IAvBxB,aAAa,CAAC;QACd,GAAG,EAAE,2BAA2B;QAChC,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,CAAC,0BAA0B,EAAE,sBAAsB,CAAC;QAC5D,QAAQ,EAAE,2BAA2B;KACrC,CAAC;IAEF;;;;OAIG;;IACF,KAAK,CAAC,YAAY,EAAE;QACpB,OAAO,EAAE,IAAI;KACb,CAAC;IACF;;;;OAIG;;IACF,KAAK,CAAC,OAAO,EAAE;QACf,OAAO,EAAE,IAAI;KACb,CAAC;GACI,mBAAmB,CA+IxB;AAED,mBAAmB,CAAC,MAAM,EAAE,CAAC;AAE7B,eAAe,mBAAmB,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 i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport DOMReferenceConverter from \"@ui5/webcomponents-base/dist/converters/DOMReference.js\";\nimport { getScopedVarName } from \"@ui5/webcomponents-base/dist/CustomElementsScopeUtils.js\";\nimport ColorPalettePopoverTemplate from \"./ColorPalettePopoverTemplate.js\";\n\n// Styles\nimport ColorPalettePopoverCss from \"./generated/themes/ColorPalettePopover.css.js\";\nimport ResponsivePopoverCommonCss from \"./generated/themes/ResponsivePopoverCommon.css.js\";\nimport {\n\tCOLORPALETTE_POPOVER_TITLE,\n\tCOLOR_PALETTE_DIALOG_CANCEL_BUTTON,\n} from \"./generated/i18n/i18n-defaults.js\";\n\nimport type ResponsivePopover from \"./ResponsivePopover.js\";\nimport type ColorPalette from \"./ColorPalette.js\";\nimport type { ColorPaletteItemClickEventDetail, IColorPaletteItem } from \"./ColorPalette.js\";\nimport type ColorPaletteItem from \"./ColorPaletteItem.js\";\n\ntype ColorPalettePopoverItemClickEventDetail = ColorPaletteItemClickEventDetail;\n\n/**\n * @class\n *\n * ### Overview\n * Represents a predefined range of colors for easier selection.\n *\n * Overview\n * The ColorPalettePopover provides the users with a slot to predefine colors.\n *\n * You can customize them with the use of the colors property. You can specify a defaultColor and display a \"Default color\" button for the user to choose directly.\n * You can display a \"More colors...\" button that opens an additional color picker for the user to choose specific colors that are not present in the predefined range.\n *\n * ### Usage\n *\n * The palette is intended for users, who don't want to check and remember the different values of the colors and spend large amount of time to configure the right color through the color picker.\n *\n * For the `ui5-color-palette-popover`\n * ### ES6 Module Import\n *\n * `import @ui5/webcomponents/dist/ColorPalettePopover.js\";`\n * @constructor\n * @extends UI5Element\n * @public\n * @since 1.0.0-rc.16\n */\n@customElement({\n\ttag: \"ui5-color-palette-popover\",\n\trenderer: jsxRenderer,\n\tstyles: [ResponsivePopoverCommonCss, ColorPalettePopoverCss],\n\ttemplate: ColorPalettePopoverTemplate,\n})\n\n/**\n * Fired when the user selects a color.\n * @public\n * @param {string} color the selected color\n */\n@event(\"item-click\", {\n\tbubbles: true,\n})\n/**\n * Fired when the `ui5-color-palette-popover` is closed due to user interaction.\n * @since 1.21.0\n * @public\n */\n@event(\"close\", {\n\tbubbles: true,\n})\nclass ColorPalettePopover extends UI5Element {\n\teventDetails!: {\n\t\t\"item-click\": ColorPalettePopoverItemClickEventDetail,\n\t\t\"close\": void,\n\t}\n\n\t/**\n\t * Defines whether the user can see the last used colors in the bottom of the component\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowRecentColors = false\n\n\t/**\n\t * Defines whether the user can choose a custom color from a component.\n\t *\n\t * **Note:** In order to use this property you need to import the following module: `\"@ui5/webcomponents/dist/features/ColorPaletteMoreColors.js\"`\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowMoreColors = false\n\n\t/**\n\t * Defines whether the user can choose the default color from a button.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowDefaultColor = false\n\n\t/**\n\t * Defines the default color of the component.\n\t *\n\t * **Note:** The default color should be a part of the ColorPalette colors`\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tdefaultColor?: string;\n\n\t/**\n\t * Defines the open | closed state of the popover.\n\t * @public\n\t * @default false\n\t * @since 1.21.0\n\t */\n\t@property({ type: Boolean })\n\topen = false\n\n\t/**\n\t * Defines the ID or DOM Reference of the element that the popover is shown at.\n\t * When using this attribute in a declarative way, you must only use the `id` (as a string) of the element at which you want to show the popover.\n\t * You can only set the `opener` attribute to a DOM Reference when using JavaScript.\n\t * @public\n\t * @default undefined\n\t * @since 1.21.0\n\t */\n\t@property({ converter: DOMReferenceConverter })\n\topener?: HTMLElement | string;\n\n\t/**\n\t * Defines the content of the component.\n\t * @public\n\t */\n\t@slot({ \"default\": true, type: HTMLElement, individualSlots: true })\n\tcolors!: Array<IColorPaletteItem>;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\tget responsivePopover() {\n\t\treturn this.shadowRoot!.querySelector<ResponsivePopover>(\"[ui5-responsive-popover]\")!;\n\t}\n\n\tget respPopover() {\n\t\treturn this.shadowRoot!.querySelector<ResponsivePopover>(\"[ui5-responsive-popover]\")!;\n\t}\n\n\tclosePopover() {\n\t\tthis.open = false;\n\t}\n\n\tonAfterClose() {\n\t\tthis.closePopover();\n\t\tthis.fireDecoratorEvent(\"close\");\n\t}\n\n\tonAfterOpen() {\n\t\tconst colorPalette = this._colorPalette;\n\t\tif (colorPalette._currentlySelected) {\n\t\t\tcolorPalette._currentlySelected?.focus();\n\t\t} else if (colorPalette.showRecentColors && colorPalette.recentColorsElements.length) {\n\t\t\tcolorPalette.recentColorsElements[0].focus();\n\t\t} else if (colorPalette.showDefaultColor) {\n\t\t\tcolorPalette.colorPaletteNavigationElements[0].focus();\n\t\t}\n\n\t\t// since height is dynamically determined by padding-block-start\n\t\tcolorPalette.allColorsInPalette.forEach((item: IColorPaletteItem) => {\n\t\t\tconst itemHeight = item.offsetHeight + 4; // adding 4px for the offsets on top and bottom\n\t\t\titem.style.setProperty(getScopedVarName(\"--_ui5_color_palette_item_height\"), `${itemHeight}px`);\n\t\t});\n\t}\n\n\tonSelectedColor(e: CustomEvent<ColorPaletteItemClickEventDetail>) {\n\t\tthis.closePopover();\n\t\tthis.fireDecoratorEvent(\"item-click\", e.detail);\n\t}\n\n\tget _colorPalette() {\n\t\treturn this.responsivePopover.content[0].querySelector<ColorPalette>(\"[ui5-color-palette]\")!;\n\t}\n\n\t/**\n\t * Returns if the component is opened.\n\t * @protected\n\t * @since 1.0.0-rc.16\n\t */\n\tisOpen() {\n\t\treturn this.open;\n\t}\n\n\tget colorPaletteColors() {\n\t\treturn this.getSlottedNodes<ColorPaletteItem>(\"colors\");\n\t}\n\n\tget _colorPaletteTitle() {\n\t\treturn ColorPalettePopover.i18nBundle.getText(COLORPALETTE_POPOVER_TITLE);\n\t}\n\n\tget _cancelButtonLabel() {\n\t\treturn ColorPalettePopover.i18nBundle.getText(COLOR_PALETTE_DIALOG_CANCEL_BUTTON);\n\t}\n\n\tget _open() {\n\t\treturn this.open || undefined;\n\t}\n}\n\nColorPalettePopover.define();\n\nexport default ColorPalettePopover;\nexport type { ColorPalettePopoverItemClickEventDetail };\n"]}
|
|
1
|
+
{"version":3,"file":"ColorPalettePopover.js","sourceRoot":"","sources":["../src/ColorPalettePopover.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,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,qBAAqB,MAAM,yDAAyD,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,0DAA0D,CAAC;AAC5F,OAAO,2BAA2B,MAAM,kCAAkC,CAAC;AAE3E,SAAS;AACT,OAAO,sBAAsB,MAAM,+CAA+C,CAAC;AACnF,OAAO,0BAA0B,MAAM,mDAAmD,CAAC;AAC3F,OAAO,EACN,0BAA0B,EAC1B,kCAAkC,GAClC,MAAM,mCAAmC,CAAC;AAS3C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAwBH,IAAM,mBAAmB,2BAAzB,MAAM,mBAAoB,SAAQ,UAAU;IAuE3C;QACC,KAAK,EAAE,CAAC;QAlET;;;;WAIG;QAEH,qBAAgB,GAAG,KAAK,CAAA;QAExB;;;;;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Ae,EAAE,IAAI,EAAE,CAAC;mDAClC;AAG3B;IADN,IAAI,CAAC,oBAAoB,CAAC;6CACG;AArEzB,mBAAmB;IAvBxB,aAAa,CAAC;QACd,GAAG,EAAE,2BAA2B;QAChC,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,CAAC,0BAA0B,EAAE,sBAAsB,CAAC;QAC5D,QAAQ,EAAE,2BAA2B;KACrC,CAAC;IAEF;;;;OAIG;;IACF,KAAK,CAAC,YAAY,EAAE;QACpB,OAAO,EAAE,IAAI;KACb,CAAC;IACF;;;;OAIG;;IACF,KAAK,CAAC,OAAO,EAAE;QACf,OAAO,EAAE,IAAI;KACb,CAAC;GACI,mBAAmB,CA8IxB;AAED,mBAAmB,CAAC,MAAM,EAAE,CAAC;AAE7B,eAAe,mBAAmB,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 i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport DOMReferenceConverter from \"@ui5/webcomponents-base/dist/converters/DOMReference.js\";\nimport { getScopedVarName } from \"@ui5/webcomponents-base/dist/CustomElementsScopeUtils.js\";\nimport ColorPalettePopoverTemplate from \"./ColorPalettePopoverTemplate.js\";\n\n// Styles\nimport ColorPalettePopoverCss from \"./generated/themes/ColorPalettePopover.css.js\";\nimport ResponsivePopoverCommonCss from \"./generated/themes/ResponsivePopoverCommon.css.js\";\nimport {\n\tCOLORPALETTE_POPOVER_TITLE,\n\tCOLOR_PALETTE_DIALOG_CANCEL_BUTTON,\n} from \"./generated/i18n/i18n-defaults.js\";\n\nimport type ResponsivePopover from \"./ResponsivePopover.js\";\nimport type ColorPalette from \"./ColorPalette.js\";\nimport type { ColorPaletteItemClickEventDetail, IColorPaletteItem } from \"./ColorPalette.js\";\nimport type ColorPaletteItem from \"./ColorPaletteItem.js\";\n\ntype ColorPalettePopoverItemClickEventDetail = ColorPaletteItemClickEventDetail;\n\n/**\n * @class\n *\n * ### Overview\n * Represents a predefined range of colors for easier selection.\n *\n * Overview\n * The ColorPalettePopover provides the users with a slot to predefine colors.\n *\n * You can customize them with the use of the colors property. You can specify a defaultColor and display a \"Default color\" button for the user to choose directly.\n * You can display a \"More colors...\" button that opens an additional color picker for the user to choose specific colors that are not present in the predefined range.\n *\n * ### Usage\n *\n * The palette is intended for users, who don't want to check and remember the different values of the colors and spend large amount of time to configure the right color through the color picker.\n *\n * For the `ui5-color-palette-popover`\n * ### ES6 Module Import\n *\n * `import @ui5/webcomponents/dist/ColorPalettePopover.js\";`\n * @constructor\n * @extends UI5Element\n * @public\n * @since 1.0.0-rc.16\n */\n@customElement({\n\ttag: \"ui5-color-palette-popover\",\n\trenderer: jsxRenderer,\n\tstyles: [ResponsivePopoverCommonCss, ColorPalettePopoverCss],\n\ttemplate: ColorPalettePopoverTemplate,\n})\n\n/**\n * Fired when the user selects a color.\n * @public\n * @param {string} color the selected color\n */\n@event(\"item-click\", {\n\tbubbles: true,\n})\n/**\n * Fired when the `ui5-color-palette-popover` is closed due to user interaction.\n * @since 1.21.0\n * @public\n */\n@event(\"close\", {\n\tbubbles: true,\n})\nclass ColorPalettePopover extends UI5Element {\n\teventDetails!: {\n\t\t\"item-click\": ColorPalettePopoverItemClickEventDetail,\n\t\t\"close\": void,\n\t}\n\n\t/**\n\t * Defines whether the user can see the last used colors in the bottom of the component\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowRecentColors = false\n\n\t/**\n\t * Defines whether the user can choose a custom color from a component.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowMoreColors = false\n\n\t/**\n\t * Defines whether the user can choose the default color from a button.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowDefaultColor = false\n\n\t/**\n\t * Defines the default color of the component.\n\t *\n\t * **Note:** The default color should be a part of the ColorPalette colors`\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tdefaultColor?: string;\n\n\t/**\n\t * Defines the open | closed state of the popover.\n\t * @public\n\t * @default false\n\t * @since 1.21.0\n\t */\n\t@property({ type: Boolean })\n\topen = false\n\n\t/**\n\t * Defines the ID or DOM Reference of the element that the popover is shown at.\n\t * When using this attribute in a declarative way, you must only use the `id` (as a string) of the element at which you want to show the popover.\n\t * You can only set the `opener` attribute to a DOM Reference when using JavaScript.\n\t * @public\n\t * @default undefined\n\t * @since 1.21.0\n\t */\n\t@property({ converter: DOMReferenceConverter })\n\topener?: HTMLElement | string;\n\n\t/**\n\t * Defines the content of the component.\n\t * @public\n\t */\n\t@slot({ \"default\": true, type: HTMLElement, individualSlots: true })\n\tcolors!: Array<IColorPaletteItem>;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\tget responsivePopover() {\n\t\treturn this.shadowRoot!.querySelector<ResponsivePopover>(\"[ui5-responsive-popover]\")!;\n\t}\n\n\tget respPopover() {\n\t\treturn this.shadowRoot!.querySelector<ResponsivePopover>(\"[ui5-responsive-popover]\")!;\n\t}\n\n\tclosePopover() {\n\t\tthis.open = false;\n\t}\n\n\tonAfterClose() {\n\t\tthis.closePopover();\n\t\tthis.fireDecoratorEvent(\"close\");\n\t}\n\n\tonAfterOpen() {\n\t\tconst colorPalette = this._colorPalette;\n\t\tif (colorPalette._currentlySelected) {\n\t\t\tcolorPalette._currentlySelected?.focus();\n\t\t} else if (colorPalette.showRecentColors && colorPalette.recentColorsElements.length) {\n\t\t\tcolorPalette.recentColorsElements[0].focus();\n\t\t} else if (colorPalette.showDefaultColor) {\n\t\t\tcolorPalette.colorPaletteNavigationElements[0].focus();\n\t\t}\n\n\t\t// since height is dynamically determined by padding-block-start\n\t\tcolorPalette.allColorsInPalette.forEach((item: IColorPaletteItem) => {\n\t\t\tconst itemHeight = item.offsetHeight + 4; // adding 4px for the offsets on top and bottom\n\t\t\titem.style.setProperty(getScopedVarName(\"--_ui5_color_palette_item_height\"), `${itemHeight}px`);\n\t\t});\n\t}\n\n\tonSelectedColor(e: CustomEvent<ColorPaletteItemClickEventDetail>) {\n\t\tthis.closePopover();\n\t\tthis.fireDecoratorEvent(\"item-click\", e.detail);\n\t}\n\n\tget _colorPalette() {\n\t\treturn this.responsivePopover.content[0].querySelector<ColorPalette>(\"[ui5-color-palette]\")!;\n\t}\n\n\t/**\n\t * Returns if the component is opened.\n\t * @protected\n\t * @since 1.0.0-rc.16\n\t */\n\tisOpen() {\n\t\treturn this.open;\n\t}\n\n\tget colorPaletteColors() {\n\t\treturn this.getSlottedNodes<ColorPaletteItem>(\"colors\");\n\t}\n\n\tget _colorPaletteTitle() {\n\t\treturn ColorPalettePopover.i18nBundle.getText(COLORPALETTE_POPOVER_TITLE);\n\t}\n\n\tget _cancelButtonLabel() {\n\t\treturn ColorPalettePopover.i18nBundle.getText(COLOR_PALETTE_DIALOG_CANCEL_BUTTON);\n\t}\n\n\tget _open() {\n\t\treturn this.open || undefined;\n\t}\n}\n\nColorPalettePopover.define();\n\nexport default ColorPalettePopover;\nexport type { ColorPalettePopoverItemClickEventDetail };\n"]}
|
package/dist/Dialog.js
CHANGED
|
@@ -241,6 +241,7 @@ let Dialog = Dialog_1 = class Dialog extends Popup {
|
|
|
241
241
|
super.onEnterDOM();
|
|
242
242
|
this._attachScreenResizeHandler();
|
|
243
243
|
this.addEventListener("dragstart", this._dragStartHandler);
|
|
244
|
+
this.setAttribute("data-sap-ui-fastnavgroup-container", "true");
|
|
244
245
|
}
|
|
245
246
|
onExitDOM() {
|
|
246
247
|
super.onExitDOM();
|