@ui5/webcomponents 2.7.0-rc.0 → 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 +52 -0
- package/README.md +21 -16
- package/cypress/specs/Button.cy.ts +22 -0
- package/cypress/specs/Card.cy.ts +51 -0
- package/cypress/specs/ColorPalette.cy.ts +0 -1
- package/cypress/specs/ColorPicker.cy.ts +98 -0
- 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/Label.cy.ts +128 -0
- 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/Tag.cy.ts +76 -0
- package/cypress/specs/Text.cy.ts +31 -0
- package/cypress/specs/Title.cy.ts +37 -0
- package/cypress/specs/Toolbar.cy.ts +49 -0
- package/cypress/specs/base/Events.cy.ts +0 -1
- package/cypress/support/commands/ColorPalette.commands.ts +7 -1
- package/cypress/support/commands/ColorPicker.commands.ts +24 -0
- package/cypress/support/commands.ts +3 -0
- 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/CardHeader.d.ts +1 -1
- package/dist/CardHeader.js +1 -1
- package/dist/CardHeader.js.map +1 -1
- package/dist/CardHeaderTemplate.js +1 -1
- package/dist/CardHeaderTemplate.js.map +1 -1
- package/dist/ColorPalette.d.ts +20 -12
- package/dist/ColorPalette.js +37 -32
- package/dist/ColorPalette.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/ColorPaletteTemplate.js +2 -2
- package/dist/ColorPaletteTemplate.js.map +1 -1
- package/dist/ColorPicker.d.ts +30 -28
- package/dist/ColorPicker.js +145 -99
- package/dist/ColorPicker.js.map +1 -1
- package/dist/ColorPickerTemplate.js +5 -3
- package/dist/ColorPickerTemplate.js.map +1 -1
- package/dist/DateTimeInput.d.ts +20 -0
- package/dist/DateTimeInput.js +44 -0
- package/dist/DateTimeInput.js.map +1 -0
- package/dist/Dialog.js +1 -0
- package/dist/Dialog.js.map +1 -1
- package/dist/Input.d.ts +5 -15
- package/dist/Input.js +14 -21
- 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/Popup.js +0 -2
- package/dist/Popup.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/TabContainer.js +3 -3
- package/dist/TabContainer.js.map +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 +27 -4
- package/dist/TimePicker.js +61 -8
- 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 +29 -2
- package/dist/TimePickerPopoverTemplate.js.map +1 -1
- package/dist/TimePickerTemplate.js +4 -3
- package/dist/TimePickerTemplate.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/Toolbar.d.ts +1 -3
- package/dist/Toolbar.js +3 -42
- package/dist/Toolbar.js.map +1 -1
- package/dist/ToolbarButton.d.ts +1 -5
- package/dist/ToolbarButton.js +6 -4
- package/dist/ToolbarButton.js.map +1 -1
- package/dist/ToolbarButtonTemplate.js +1 -1
- package/dist/ToolbarButtonTemplate.js.map +1 -1
- package/dist/ToolbarItem.d.ts +6 -17
- package/dist/ToolbarItem.js +18 -8
- package/dist/ToolbarItem.js.map +1 -1
- package/dist/ToolbarPopoverButtonTemplate.js +1 -1
- package/dist/ToolbarPopoverButtonTemplate.js.map +1 -1
- package/dist/ToolbarPopoverSelectTemplate.js +1 -1
- package/dist/ToolbarPopoverSelectTemplate.js.map +1 -1
- package/dist/ToolbarSelect.d.ts +9 -11
- package/dist/ToolbarSelect.js +41 -41
- package/dist/ToolbarSelect.js.map +1 -1
- package/dist/ToolbarSelectTemplate.js +1 -1
- package/dist/ToolbarSelectTemplate.js.map +1 -1
- package/dist/ToolbarTemplate.js +1 -1
- package/dist/ToolbarTemplate.js.map +1 -1
- package/dist/TreeItemCustom.js +5 -1
- package/dist/TreeItemCustom.js.map +1 -1
- package/dist/bundle.esm.d.ts +0 -2
- package/dist/bundle.esm.js +1 -7
- package/dist/bundle.esm.js.map +1 -1
- package/dist/colorpicker-utils/ColorValue.d.ts +53 -0
- package/dist/colorpicker-utils/ColorValue.js +143 -0
- package/dist/colorpicker-utils/ColorValue.js.map +1 -0
- 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/TimePickerPopover.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 +222 -46
- package/dist/custom-elements.json +168 -45
- package/dist/features/ColorPaletteMoreColors.d.ts +1 -11
- package/dist/features/ColorPaletteMoreColors.js +3 -18
- package/dist/features/ColorPaletteMoreColors.js.map +1 -1
- package/dist/features/ColorPaletteMoreColorsTemplate.js +1 -1
- package/dist/features/ColorPaletteMoreColorsTemplate.js.map +1 -1
- package/dist/features/InputSuggestions.d.ts +1 -2
- package/dist/features/InputSuggestions.js +3 -5
- package/dist/features/InputSuggestions.js.map +1 -1
- package/dist/generated/assets/i18n/messagebundle_ar.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_bg.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ca.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cnr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cs.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cy.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_da.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_de.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_el.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_GB.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_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 +5 -2
- package/dist/generated/i18n/i18n-defaults.js +6 -3
- 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/TimePickerPopover.css.d.ts +1 -1
- package/dist/generated/themes/TimePickerPopover.css.js +1 -1
- package/dist/generated/themes/TimePickerPopover.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 +13 -10
- package/src/ButtonBadgeTemplate.tsx +6 -0
- package/src/ButtonTemplate.tsx +10 -1
- package/src/CardHeaderTemplate.tsx +1 -2
- package/src/ColorPaletteTemplate.tsx +2 -2
- package/src/ColorPickerTemplate.tsx +37 -37
- package/src/SelectPopoverTemplate.tsx +2 -2
- package/src/TagTemplate.tsx +2 -1
- package/src/TimePickerClockTemplate.tsx +35 -36
- package/src/TimePickerPopoverTemplate.tsx +49 -1
- package/src/TimePickerTemplate.tsx +7 -5
- package/src/TimeSelectionClocksTemplate.tsx +2 -1
- package/src/ToolbarButtonTemplate.tsx +1 -0
- package/src/ToolbarPopoverButtonTemplate.tsx +1 -0
- package/src/ToolbarPopoverSelectTemplate.tsx +4 -0
- package/src/ToolbarSelectTemplate.tsx +4 -0
- package/src/ToolbarTemplate.tsx +1 -0
- package/src/features/ColorPaletteMoreColorsTemplate.tsx +2 -2
- package/src/i18n/messagebundle.properties +17 -8
- 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 +12 -2
- package/src/i18n/messagebundle_el.properties +11 -1
- package/src/i18n/messagebundle_en.properties +11 -1
- package/src/i18n/messagebundle_en_GB.properties +11 -1
- package/src/i18n/messagebundle_en_US_sappsd.properties +11 -1
- package/src/i18n/messagebundle_en_US_saprigi.properties +11 -1
- package/src/i18n/messagebundle_en_US_saptrc.properties +11 -1
- 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 +51 -41
- package/src/themes/SegmentedButton.css +1 -1
- package/src/themes/SplitButton.css +8 -8
- package/src/themes/Switch.css +2 -0
- package/src/themes/TabInOverflow.css +6 -6
- package/src/themes/TableRow.css +0 -1
- package/src/themes/TableRowBase.css +1 -0
- package/src/themes/TimePicker.css +4 -0
- package/src/themes/TimePickerClock.css +180 -9
- package/src/themes/TimePickerPopover.css +5 -0
- 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/TabContainer-parameters.css +2 -1
- package/src/themes/base/sizes-parameters.css +33 -1
- 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/TabContainer-parameters.css +2 -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/TabContainer-parameters.css +2 -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/TabContainer-parameters.css +2 -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/TabContainer-parameters.css +2 -1
- package/src/themes/sap_horizon_hcw/parameters-bundle.css +1 -0
- package/src/themes/sap_horizon_hcw/sizes-parameters.css +3 -1
- package/vitest.config.js +9 -0
- 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,MA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C;0CACT;AAOnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;8CACL;AAOvB;IADC,QAAQ,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;2CACX;AAMrB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CACA;AAO3B;IADC,QAAQ,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;8CACX;AAOrB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCACX;AAGjB;IADC,QAAQ,CAAC,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,MAA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AE,WAAW,EAAE,uBAAuB,EAAE,IAAI,EAAE,CAAC;qCAChC;AAKpB;IADN,IAAI,CAAC,oBAAoB,CAAC;gCACG;AArOzB,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,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,a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,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"]}
|
package/dist/CardHeader.d.ts
CHANGED
|
@@ -75,7 +75,7 @@ declare class CardHeader extends UI5Element {
|
|
|
75
75
|
onEnterDOM(): void;
|
|
76
76
|
get _root(): HTMLElement;
|
|
77
77
|
get ariaRoleDescription(): string;
|
|
78
|
-
get ariaRoleFocusableElement(): "button" |
|
|
78
|
+
get ariaRoleFocusableElement(): "button" | "group";
|
|
79
79
|
get ariaCardAvatarLabel(): string;
|
|
80
80
|
get ariaLabelledBy(): string | undefined;
|
|
81
81
|
get hasAvatar(): boolean;
|
package/dist/CardHeader.js
CHANGED
|
@@ -73,7 +73,7 @@ let CardHeader = CardHeader_1 = class CardHeader extends UI5Element {
|
|
|
73
73
|
return this.interactive ? CardHeader_1.i18nBundle.getText(ARIA_ROLEDESCRIPTION_INTERACTIVE_CARD_HEADER) : CardHeader_1.i18nBundle.getText(ARIA_ROLEDESCRIPTION_CARD_HEADER);
|
|
74
74
|
}
|
|
75
75
|
get ariaRoleFocusableElement() {
|
|
76
|
-
return this.interactive ? "button" :
|
|
76
|
+
return this.interactive ? "button" : "group";
|
|
77
77
|
}
|
|
78
78
|
get ariaCardAvatarLabel() {
|
|
79
79
|
return CardHeader_1.i18nBundle.getText(AVATAR_TOOLTIP);
|
package/dist/CardHeader.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardHeader.js","sourceRoot":"","sources":["../src/CardHeader.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,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAE/E,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACnE,OAAO,kBAAkB,MAAM,yBAAyB,CAAC;AAEzD,OAAO,EACN,cAAc,EACd,gCAAgC,EAChC,4CAA4C,GAC5C,MAAM,mCAAmC,CAAC;AAE3C,SAAS;AACT,OAAO,aAAa,MAAM,sCAAsC,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAiBH,IAAM,UAAU,kBAAhB,MAAM,UAAW,SAAQ,UAAU;IAAnC;;QA4BC;;;;;UAKE;QAEF,gBAAW,GAAG,KAAK,CAAC;QAEpB;;;;;;UAME;QAEF,eAAU,GAAG,CAAC,CAAC;QAGf,kBAAa,GAAG,KAAK,CA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-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 i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { isSpace, isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport CardHeaderTemplate from \"./CardHeaderTemplate.js\";\n\nimport {\n\tAVATAR_TOOLTIP,\n\tARIA_ROLEDESCRIPTION_CARD_HEADER,\n\tARIA_ROLEDESCRIPTION_INTERACTIVE_CARD_HEADER,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport cardHeaderCss from \"./generated/themes/CardHeader.css.js\";\n\n/**\n * @class\n * ### Overview\n *\n * The `ui5-card-header` is a component, meant to be used as a header of the `ui5-card` component.\n * It displays valuable information, that can be defined with several properties, such as: `titleText`, `subtitleText`, `additionalText`\n * and two slots: `avatar` and `action`.\n *\n * ### Keyboard handling\n * In case you enable `interactive` property, you can press the `ui5-card-header` by Space and Enter keys.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/CardHeader\";`\n * @constructor\n * @extends UI5Element\n * @public\n * @since 1.0.0-rc.15\n * @csspart root - Used to style the root DOM element of the CardHeader\n * @csspart title - Used to style the title of the CardHeader\n * @csspart subtitle - Used to style the subtitle of the CardHeader\n * @csspart additional-text - Used to style the additional text of the CardHeader\n */\n@customElement({\n\ttag: \"ui5-card-header\",\n\tlanguageAware: true,\n\trenderer: jsxRenderer,\n\ttemplate: CardHeaderTemplate,\n\tstyles: cardHeaderCss,\n})\n/**\n * Fired when the component is activated by mouse/tap or by using the Enter or Space key.\n *\n * **Note:** The event would be fired only if the `interactive` property is set to true.\n * @public\n */\n@event(\"click\", {\n\tbubbles: true,\n})\nclass CardHeader extends UI5Element {\n\teventDetails!: {\n\t\tclick: void\n\t}\n\t/**\n\t * Defines the title text.\n\t * @default undefined\n\t * @public\n\t*/\n\t@property()\n\ttitleText?: string;\n\n\t/**\n\t * Defines the subtitle text.\n\t * @default undefined\n\t * @public\n\t*/\n\t@property()\n\tsubtitleText?: string;\n\n\t/**\n\t * Defines the additional text.\n\t * @default undefined\n\t * @public\n\t*/\n\t@property()\n\tadditionalText?: string;\n\n\t/**\n\t * Defines if the component would be interactive,\n\t * e.g gets hover effect and `click` event is fired, when pressed.\n\t * @default false\n\t * @public\n\t*/\n\t@property({ type: Boolean })\n\tinteractive = false;\n\n\t/**\n\t * Define the `aria-level` attribute of the component\n\t *\n\t * **Note: ** If the interactive property is set, `aria-level` attribute is not rendered at all.\n\t * @private\n\t * @default 3\n\t*/\n\t@property({ type: Number })\n\t_ariaLevel = 3;\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_headerActive = false;\n\n\t/**\n\t * Defines an avatar image, displayed in the left most part of the header.\n\t * @public\n\t*/\n\t@slot()\n\tavatar!: Array<HTMLElement>;\n\n\t/**\n\t * Defines an action, displayed in the right most part of the header.\n\t * @public\n\t*/\n\t@slot()\n\taction!: Array<HTMLElement>;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tonEnterDOM() {\n\t\tif (isDesktop()) {\n\t\t\tthis.setAttribute(\"desktop\", \"\");\n\t\t}\n\t}\n\n\tget _root() {\n\t\treturn this.shadowRoot!.querySelector<HTMLElement>(\".ui5-card-header\")!;\n\t}\n\n\tget ariaRoleDescription() {\n\t\treturn this.interactive ? CardHeader.i18nBundle.getText(ARIA_ROLEDESCRIPTION_INTERACTIVE_CARD_HEADER) : CardHeader.i18nBundle.getText(ARIA_ROLEDESCRIPTION_CARD_HEADER);\n\t}\n\n\tget ariaRoleFocusableElement() {\n\t\treturn this.interactive ? \"button\" : undefined;\n\t}\n\n\tget ariaCardAvatarLabel() {\n\t\treturn CardHeader.i18nBundle.getText(AVATAR_TOOLTIP);\n\t}\n\n\tget ariaLabelledBy() {\n\t\tconst labels = [];\n\n\t\tif (this.titleText) {\n\t\t\tlabels.push(`${this._id}-title`);\n\t\t}\n\n\t\tif (this.subtitleText) {\n\t\t\tlabels.push(`${this._id}-subtitle`);\n\t\t}\n\n\t\tif (this.additionalText) {\n\t\t\tlabels.push(`${this._id}-additionalText`);\n\t\t}\n\n\t\tif (this.hasAvatar) {\n\t\t\tlabels.push(`${this._id}-avatar`);\n\t\t}\n\n\t\treturn labels.length !== 0 ? labels.join(\" \") : undefined;\n\t}\n\n\tget hasAvatar() {\n\t\treturn !!this.avatar.length;\n\t}\n\n\tget hasAction() {\n\t\treturn !!this.action.length;\n\t}\n\n\t_actionsFocusin() {\n\t\tthis._root.classList.add(\"ui5-card-header-hide-focus\");\n\t}\n\n\t_actionsFocusout() {\n\t\tthis._root.classList.remove(\"ui5-card-header-hide-focus\");\n\t}\n\n\t_click(e: MouseEvent) {\n\t\t// prevents the native browser \"click\" event from firing\n\t\te.stopImmediatePropagation();\n\n\t\tif (this.interactive && this._root.contains(e.target as HTMLElement)) {\n\t\t\tthis.fireDecoratorEvent(\"click\");\n\t\t}\n\t}\n\n\t_keydown(e: KeyboardEvent) {\n\t\tif (!this.interactive || !this._root.contains(e.target as HTMLElement)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst enter = isEnter(e);\n\t\tconst space = isSpace(e);\n\n\t\tthis._headerActive = enter || space;\n\n\t\tif (enter) {\n\t\t\tthis.fireDecoratorEvent(\"click\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (space) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_keyup(e: KeyboardEvent) {\n\t\tif (!this.interactive || !this._root.contains(e.target as HTMLElement)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst space = isSpace(e);\n\n\t\tthis._headerActive = false;\n\n\t\tif (space) {\n\t\t\tthis.fireDecoratorEvent(\"click\");\n\t\t}\n\t}\n}\n\nCardHeader.define();\n\nexport default CardHeader;\n"]}
|
|
1
|
+
{"version":3,"file":"CardHeader.js","sourceRoot":"","sources":["../src/CardHeader.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,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAE/E,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACnE,OAAO,kBAAkB,MAAM,yBAAyB,CAAC;AAEzD,OAAO,EACN,cAAc,EACd,gCAAgC,EAChC,4CAA4C,GAC5C,MAAM,mCAAmC,CAAC;AAE3C,SAAS;AACT,OAAO,aAAa,MAAM,sCAAsC,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAiBH,IAAM,UAAU,kBAAhB,MAAM,UAAW,SAAQ,UAAU;IAAnC;;QA4BC;;;;;UAKE;QAEF,gBAAW,GAAG,KAAK,CAAC;QAEpB;;;;;;UAME;QAEF,eAAU,GAAG,CAAC,CAAC;QAGf,kBAAa,GAAG,KAAK,CAAC;IAyHvB,CAAC;IAtGA,UAAU;QACT,IAAI,SAAS,EAAE,EAAE,CAAC;YACjB,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;QAClC,CAAC;IACF,CAAC;IAED,IAAI,KAAK;QACR,OAAO,IAAI,CAAC,UAAW,CAAC,aAAa,CAAc,k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OAAO;QACR,CAAC;QAED,MAAM,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;QAEzB,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;QAE3B,IAAI,KAAK,EAAE,CAAC;YACX,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;QAClC,CAAC;IACF,CAAC;CACD,CAAA;AA/JA;IADC,QAAQ,EAAE;6CACQ;AAQnB;IADC,QAAQ,EAAE;gDACW;AAQtB;IADC,QAAQ,EAAE;kDACa;AASxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;+CACR;AAUpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CACZ;AAGf;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;iDACzB;AAOtB;IADC,IAAI,EAAE;0CACqB;AAO5B;IADC,IAAI,EAAE;0CACqB;AAGrB;IADN,IAAI,CAAC,oBAAoB,CAAC;oCACG;AAjEzB,UAAU;IAhBf,aAAa,CAAC;QACd,GAAG,EAAE,iBAAiB;QACtB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,kBAAkB;QAC5B,MAAM,EAAE,aAAa;KACrB,CAAC;IACF;;;;;OAKG;;IACF,KAAK,CAAC,OAAO,EAAE;QACf,OAAO,EAAE,IAAI;KACb,CAAC;GACI,UAAU,CAyKf;AAED,UAAU,CAAC,MAAM,EAAE,CAAC;AAEpB,eAAe,UAAU,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 i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { isSpace, isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport CardHeaderTemplate from \"./CardHeaderTemplate.js\";\n\nimport {\n\tAVATAR_TOOLTIP,\n\tARIA_ROLEDESCRIPTION_CARD_HEADER,\n\tARIA_ROLEDESCRIPTION_INTERACTIVE_CARD_HEADER,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport cardHeaderCss from \"./generated/themes/CardHeader.css.js\";\n\n/**\n * @class\n * ### Overview\n *\n * The `ui5-card-header` is a component, meant to be used as a header of the `ui5-card` component.\n * It displays valuable information, that can be defined with several properties, such as: `titleText`, `subtitleText`, `additionalText`\n * and two slots: `avatar` and `action`.\n *\n * ### Keyboard handling\n * In case you enable `interactive` property, you can press the `ui5-card-header` by Space and Enter keys.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/CardHeader\";`\n * @constructor\n * @extends UI5Element\n * @public\n * @since 1.0.0-rc.15\n * @csspart root - Used to style the root DOM element of the CardHeader\n * @csspart title - Used to style the title of the CardHeader\n * @csspart subtitle - Used to style the subtitle of the CardHeader\n * @csspart additional-text - Used to style the additional text of the CardHeader\n */\n@customElement({\n\ttag: \"ui5-card-header\",\n\tlanguageAware: true,\n\trenderer: jsxRenderer,\n\ttemplate: CardHeaderTemplate,\n\tstyles: cardHeaderCss,\n})\n/**\n * Fired when the component is activated by mouse/tap or by using the Enter or Space key.\n *\n * **Note:** The event would be fired only if the `interactive` property is set to true.\n * @public\n */\n@event(\"click\", {\n\tbubbles: true,\n})\nclass CardHeader extends UI5Element {\n\teventDetails!: {\n\t\tclick: void\n\t}\n\t/**\n\t * Defines the title text.\n\t * @default undefined\n\t * @public\n\t*/\n\t@property()\n\ttitleText?: string;\n\n\t/**\n\t * Defines the subtitle text.\n\t * @default undefined\n\t * @public\n\t*/\n\t@property()\n\tsubtitleText?: string;\n\n\t/**\n\t * Defines the additional text.\n\t * @default undefined\n\t * @public\n\t*/\n\t@property()\n\tadditionalText?: string;\n\n\t/**\n\t * Defines if the component would be interactive,\n\t * e.g gets hover effect and `click` event is fired, when pressed.\n\t * @default false\n\t * @public\n\t*/\n\t@property({ type: Boolean })\n\tinteractive = false;\n\n\t/**\n\t * Define the `aria-level` attribute of the component\n\t *\n\t * **Note: ** If the interactive property is set, `aria-level` attribute is not rendered at all.\n\t * @private\n\t * @default 3\n\t*/\n\t@property({ type: Number })\n\t_ariaLevel = 3;\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_headerActive = false;\n\n\t/**\n\t * Defines an avatar image, displayed in the left most part of the header.\n\t * @public\n\t*/\n\t@slot()\n\tavatar!: Array<HTMLElement>;\n\n\t/**\n\t * Defines an action, displayed in the right most part of the header.\n\t * @public\n\t*/\n\t@slot()\n\taction!: Array<HTMLElement>;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tonEnterDOM() {\n\t\tif (isDesktop()) {\n\t\t\tthis.setAttribute(\"desktop\", \"\");\n\t\t}\n\t}\n\n\tget _root() {\n\t\treturn this.shadowRoot!.querySelector<HTMLElement>(\".ui5-card-header\")!;\n\t}\n\n\tget ariaRoleDescription() {\n\t\treturn this.interactive ? CardHeader.i18nBundle.getText(ARIA_ROLEDESCRIPTION_INTERACTIVE_CARD_HEADER) : CardHeader.i18nBundle.getText(ARIA_ROLEDESCRIPTION_CARD_HEADER);\n\t}\n\n\tget ariaRoleFocusableElement() {\n\t\treturn this.interactive ? \"button\" : \"group\";\n\t}\n\n\tget ariaCardAvatarLabel() {\n\t\treturn CardHeader.i18nBundle.getText(AVATAR_TOOLTIP);\n\t}\n\n\tget ariaLabelledBy() {\n\t\tconst labels = [];\n\n\t\tif (this.titleText) {\n\t\t\tlabels.push(`${this._id}-title`);\n\t\t}\n\n\t\tif (this.subtitleText) {\n\t\t\tlabels.push(`${this._id}-subtitle`);\n\t\t}\n\n\t\tif (this.additionalText) {\n\t\t\tlabels.push(`${this._id}-additionalText`);\n\t\t}\n\n\t\tif (this.hasAvatar) {\n\t\t\tlabels.push(`${this._id}-avatar`);\n\t\t}\n\n\t\treturn labels.length !== 0 ? labels.join(\" \") : undefined;\n\t}\n\n\tget hasAvatar() {\n\t\treturn !!this.avatar.length;\n\t}\n\n\tget hasAction() {\n\t\treturn !!this.action.length;\n\t}\n\n\t_actionsFocusin() {\n\t\tthis._root.classList.add(\"ui5-card-header-hide-focus\");\n\t}\n\n\t_actionsFocusout() {\n\t\tthis._root.classList.remove(\"ui5-card-header-hide-focus\");\n\t}\n\n\t_click(e: MouseEvent) {\n\t\t// prevents the native browser \"click\" event from firing\n\t\te.stopImmediatePropagation();\n\n\t\tif (this.interactive && this._root.contains(e.target as HTMLElement)) {\n\t\t\tthis.fireDecoratorEvent(\"click\");\n\t\t}\n\t}\n\n\t_keydown(e: KeyboardEvent) {\n\t\tif (!this.interactive || !this._root.contains(e.target as HTMLElement)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst enter = isEnter(e);\n\t\tconst space = isSpace(e);\n\n\t\tthis._headerActive = enter || space;\n\n\t\tif (enter) {\n\t\t\tthis.fireDecoratorEvent(\"click\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (space) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_keyup(e: KeyboardEvent) {\n\t\tif (!this.interactive || !this._root.contains(e.target as HTMLElement)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst space = isSpace(e);\n\n\t\tthis._headerActive = false;\n\n\t\tif (space) {\n\t\t\tthis.fireDecoratorEvent(\"click\");\n\t\t}\n\t}\n}\n\nCardHeader.define();\n\nexport default CardHeader;\n"]}
|
|
@@ -6,7 +6,7 @@ export default function CardHeaderTemplate() {
|
|
|
6
6
|
"ui5-card-header--interactive": this.interactive,
|
|
7
7
|
"ui5-card-header--active": this.interactive && this._headerActive,
|
|
8
8
|
"ui5-card-header-ff": isFirefox(),
|
|
9
|
-
}, part: "root",
|
|
9
|
+
}, part: "root", onClick: this._click, onKeyDown: this._keydown, onKeyUp: this._keyup, children: [_jsxs("div", { class: "ui5-card-header-focusable-element", "aria-labelledby": this.ariaLabelledBy, "aria-roledescription": this.ariaRoleDescription, role: this.ariaRoleFocusableElement, "data-sap-focus-ref": true, tabindex: 0, children: [this.hasAvatar &&
|
|
10
10
|
_jsx("div", { id: `${this._id}-avatar`, class: "ui5-card-header-avatar", "aria-label": this.ariaCardAvatarLabel, children: _jsx("slot", { name: "avatar" }) }), _jsxs("div", { class: "ui5-card-header-text", children: [_jsxs("div", { class: "ui5-card-header-first-line", children: [this.titleText &&
|
|
11
11
|
_jsx("div", { id: `${this._id}-title`, class: "ui5-card-header-title", part: "title", role: "heading", "aria-level": 3, children: this.titleText }), this.additionalText &&
|
|
12
12
|
_jsx("div", { class: "ui5-card-header-additionalText", children: _jsx("span", { id: `${this._id}-additionalText`, part: "additional-text", dir: "auto", children: this.additionalText }) })] }), this.subtitleText &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardHeaderTemplate.js","sourceRoot":"","sources":["../src/CardHeaderTemplate.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAEnE,MAAM,CAAC,OAAO,UAAU,kBAAkB;IACzC,OAAO,CACN,eACC,EAAE,EAAE,GAAG,IAAI,CAAC,GAAG,UAAU,EACzB,KAAK,EAAE;YACN,iBAAiB,EAAE,IAAI;YACvB,8BAA8B,EAAE,IAAI,CAAC,WAAW;YAChD,yBAAyB,EAAE,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,aAAa;YACjE,oBAAoB,EAAE,SAAS,EAAE;SACjC,EACD,IAAI,EAAC,MAAM,EACX,
|
|
1
|
+
{"version":3,"file":"CardHea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B,EAAE,IAAI,EAAC,iBAAiB,EAAC,GAAG,EAAC,MAAM,YAAE,IAAI,CAAC,cAAc,GAAQ,GACjG,IAEF,EAEL,IAAI,CAAC,YAAY;gCACjB,cAAK,EAAE,EAAE,GAAG,IAAI,CAAC,GAAG,WAAW,EAAE,KAAK,EAAC,0BAA0B,EAAC,IAAI,EAAC,UAAU,YAAE,IAAI,CAAC,YAAY,GAAO,IAEvG,IACD,EAEL,IAAI,CAAC,SAAS;gBACd,cACC,KAAK,EAAC,wBAAwB,EAC9B,SAAS,EAAE,IAAI,CAAC,eAAe,EAC/B,UAAU,EAAE,IAAI,CAAC,gBAAgB,YAEjC,eAAM,IAAI,EAAC,QAAQ,GAAQ,GACtB,IAEF,CACN,CAAC;AACH,CAAC","sourcesContent":["import type CardHeader from \"./CardHeader.js\";\nimport { isFirefox } from \"@ui5/webcomponents-base/dist/Device.js\";\n\nexport default function CardHeaderTemplate(this: CardHeader) {\n\treturn (\n\t\t<div\n\t\t\tid={`${this._id}--header`}\n\t\t\tclass={{\n\t\t\t\t\"ui5-card-header\": true,\n\t\t\t\t\"ui5-card-header--interactive\": this.interactive,\n\t\t\t\t\"ui5-card-header--active\": this.interactive && this._headerActive,\n\t\t\t\t\"ui5-card-header-ff\": isFirefox(),\n\t\t\t}}\n\t\t\tpart=\"root\"\n\t\t\tonClick={this._click}\n\t\t\tonKeyDown={this._keydown}\n\t\t\tonKeyUp={this._keyup}\n\t\t>\n\t\t\t<div\n\t\t\t\tclass=\"ui5-card-header-focusable-element\"\n\t\t\t\taria-labelledby={this.ariaLabelledBy}\n\t\t\t\taria-roledescription={this.ariaRoleDescription}\n\t\t\t\trole={this.ariaRoleFocusableElement}\n\t\t\t\tdata-sap-focus-ref\n\t\t\t\ttabindex={0}\n\t\t\t>\n\t\t\t\t{this.hasAvatar &&\n\t\t\t\t\t<div id={`${this._id}-avatar`} class=\"ui5-card-header-avatar\" aria-label={this.ariaCardAvatarLabel}>\n\t\t\t\t\t\t<slot name=\"avatar\"></slot>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\n\t\t\t\t<div class=\"ui5-card-header-text\">\n\t\t\t\t\t<div class=\"ui5-card-header-first-line\">\n\t\t\t\t\t\t{this.titleText &&\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tid={`${this._id}-title`}\n\t\t\t\t\t\t\t\tclass=\"ui5-card-header-title\"\n\t\t\t\t\t\t\t\tpart=\"title\"\n\t\t\t\t\t\t\t\trole=\"heading\"\n\t\t\t\t\t\t\t\taria-level={3}\n\t\t\t\t\t\t\t>{this.titleText}</div>\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t{this.additionalText &&\n\t\t\t\t\t\t\t<div class=\"ui5-card-header-additionalText\">\n\t\t\t\t\t\t\t\t<span id={`${this._id}-additionalText`} part=\"additional-text\" dir=\"auto\">{this.additionalText}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{this.subtitleText &&\n\t\t\t\t\t\t<div id={`${this._id}-subtitle`} class=\"ui5-card-header-subtitle\" part=\"subtitle\">{this.subtitleText}</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t{this.hasAction &&\n\t\t\t\t<div\n\t\t\t\t\tclass=\"ui5-card-header-action\"\n\t\t\t\t\tonFocusIn={this._actionsFocusin}\n\t\t\t\t\tonFocusOut={this._actionsFocusout}\n\t\t\t\t>\n\t\t\t\t\t<slot name=\"action\"></slot>\n\t\t\t\t</div>\n\t\t\t}\n\t\t</div>\n\t);\n}\n"]}
|
package/dist/ColorPalette.d.ts
CHANGED
|
@@ -2,11 +2,9 @@ import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
|
2
2
|
import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
3
3
|
import ItemNavigation from "@ui5/webcomponents-base/dist/delegate/ItemNavigation.js";
|
|
4
4
|
import type { ITabbable } from "@ui5/webcomponents-base/dist/delegate/ItemNavigation.js";
|
|
5
|
+
import type { JsxTemplate } from "@ui5/webcomponents-base/dist/index.js";
|
|
5
6
|
import type ColorPaletteItem from "./ColorPaletteItem.js";
|
|
6
7
|
import type Button from "./Button.js";
|
|
7
|
-
import type Dialog from "./Dialog.js";
|
|
8
|
-
import type ColorPaletteMoreColors from "./features/ColorPaletteMoreColors.js";
|
|
9
|
-
import type ColorPicker from "./ColorPicker.js";
|
|
10
8
|
import "./ColorPaletteItem.js";
|
|
11
9
|
/**
|
|
12
10
|
* Interface for components that may be used inside a `ui5-color-palette` or `ui5-color-palette-popover`
|
|
@@ -53,7 +51,6 @@ declare class ColorPalette extends UI5Element {
|
|
|
53
51
|
/**
|
|
54
52
|
* Defines whether the user can choose a custom color from a color picker
|
|
55
53
|
*
|
|
56
|
-
* **Note:** In order to use this property you need to import the following module: `"@ui5/webcomponents/dist/features/ColorPaletteMoreColors.js"`
|
|
57
54
|
* @private
|
|
58
55
|
* @since 1.0.0-rc.15
|
|
59
56
|
*/
|
|
@@ -88,6 +85,20 @@ declare class ColorPalette extends UI5Element {
|
|
|
88
85
|
* @private
|
|
89
86
|
*/
|
|
90
87
|
onPhone: boolean;
|
|
88
|
+
/**
|
|
89
|
+
|
|
90
|
+
* The showMoreColors template.
|
|
91
|
+
* @private
|
|
92
|
+
*/
|
|
93
|
+
showMoreColorsTemplate?: JsxTemplate;
|
|
94
|
+
/**
|
|
95
|
+
* @private
|
|
96
|
+
*/
|
|
97
|
+
dialogOpen: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* @private
|
|
100
|
+
*/
|
|
101
|
+
colorPickerValue: string;
|
|
91
102
|
/**
|
|
92
103
|
* Defines the `ui5-color-palette-item` elements.
|
|
93
104
|
* @public
|
|
@@ -96,13 +107,11 @@ declare class ColorPalette extends UI5Element {
|
|
|
96
107
|
_itemNavigation: ItemNavigation;
|
|
97
108
|
_itemNavigationRecentColors: ItemNavigation;
|
|
98
109
|
_recentColors: Array<string>;
|
|
99
|
-
moreColorsFeature?: ColorPaletteMoreColors;
|
|
100
110
|
_currentlySelected?: ColorPaletteItem;
|
|
101
111
|
_shouldFocusRecentColors: boolean;
|
|
102
112
|
static i18nBundle: I18nBundle;
|
|
103
113
|
constructor();
|
|
104
114
|
onBeforeRendering(): void;
|
|
105
|
-
get _effectiveShowMoreColors(): boolean;
|
|
106
115
|
onAfterRendering(): void;
|
|
107
116
|
selectColor(item: ColorPaletteItem): void;
|
|
108
117
|
_setColor(color: string): void;
|
|
@@ -125,6 +134,7 @@ declare class ColorPalette extends UI5Element {
|
|
|
125
134
|
_onRecentColorsContainerKeyDown(e: KeyboardEvent): void;
|
|
126
135
|
focusColorElement(element: ColorPaletteNavigationItem, itemNavigation: ItemNavigation): void;
|
|
127
136
|
get firstFocusableElement(): ColorPaletteNavigationItem;
|
|
137
|
+
onColorPickerChange(e: Event): void;
|
|
128
138
|
_chooseCustomColor(): void;
|
|
129
139
|
_addRecentColor(color: string): void;
|
|
130
140
|
_closeDialog(): void;
|
|
@@ -135,9 +145,9 @@ declare class ColorPalette extends UI5Element {
|
|
|
135
145
|
*/
|
|
136
146
|
get selectedItem(): ColorPaletteItem | IColorPaletteItem | undefined;
|
|
137
147
|
get allColorsInPalette(): (ColorPaletteItem | IColorPaletteItem)[];
|
|
138
|
-
get colorPaletteDialogTitle(): string
|
|
139
|
-
get colorPaletteDialogOKButton(): string
|
|
140
|
-
get colorPaletteCancelButton(): string
|
|
148
|
+
get colorPaletteDialogTitle(): string;
|
|
149
|
+
get colorPaletteDialogOKButton(): string;
|
|
150
|
+
get colorPaletteCancelButton(): string;
|
|
141
151
|
/**
|
|
142
152
|
* Returns the selected color.
|
|
143
153
|
*/
|
|
@@ -146,7 +156,6 @@ declare class ColorPalette extends UI5Element {
|
|
|
146
156
|
get colorContainerLabel(): string;
|
|
147
157
|
get colorPaletteMoreColorsText(): string;
|
|
148
158
|
get colorPaletteDefaultColorText(): string;
|
|
149
|
-
get _showMoreColors(): false | ColorPaletteMoreColors | undefined;
|
|
150
159
|
get rowSize(): number;
|
|
151
160
|
get hasRecentColors(): string | false;
|
|
152
161
|
get recentColors(): string[];
|
|
@@ -158,8 +167,7 @@ declare class ColorPalette extends UI5Element {
|
|
|
158
167
|
"ui5-cp-root-phone": boolean;
|
|
159
168
|
};
|
|
160
169
|
};
|
|
161
|
-
|
|
162
|
-
getColorPicker(): ColorPicker;
|
|
170
|
+
static ColorPaletteMoreColorsTemplate?: JsxTemplate;
|
|
163
171
|
}
|
|
164
172
|
export default ColorPalette;
|
|
165
173
|
export type { ColorPaletteItemClickEventDetail, IColorPaletteItem, };
|