@ui5/webcomponents 1.22.0-rc.2 → 1.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/Avatar.d.ts +6 -6
- package/dist/Avatar.js +5 -5
- package/dist/Avatar.js.map +1 -1
- package/dist/AvatarGroup.d.ts +17 -5
- package/dist/AvatarGroup.js +7 -8
- package/dist/AvatarGroup.js.map +1 -1
- package/dist/Badge.d.ts +2 -2
- package/dist/Badge.js.map +1 -1
- package/dist/Breadcrumbs.d.ts +1 -15
- package/dist/Breadcrumbs.js +12 -81
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/BreadcrumbsItem.d.ts +4 -0
- package/dist/BreadcrumbsItem.js +5 -0
- package/dist/BreadcrumbsItem.js.map +1 -1
- package/dist/Button.d.ts +20 -9
- package/dist/Button.js +3 -2
- package/dist/Button.js.map +1 -1
- package/dist/Card.d.ts +12 -1
- package/dist/Card.js.map +1 -1
- package/dist/CardHeader.d.ts +1 -1
- package/dist/CardHeader.js.map +1 -1
- package/dist/CheckBox.js +4 -2
- package/dist/CheckBox.js.map +1 -1
- package/dist/ColorPalette.d.ts +11 -2
- package/dist/ColorPalette.js.map +1 -1
- package/dist/ColorPaletteItem.d.ts +2 -3
- package/dist/ColorPaletteItem.js +1 -2
- package/dist/ColorPaletteItem.js.map +1 -1
- package/dist/ColorPalettePopover.d.ts +1 -2
- package/dist/ColorPalettePopover.js +0 -1
- package/dist/ColorPalettePopover.js.map +1 -1
- package/dist/ComboBox.d.ts +13 -1
- package/dist/ComboBox.js.map +1 -1
- package/dist/DatePicker.d.ts +5 -1
- package/dist/DatePicker.js +33 -6
- package/dist/DatePicker.js.map +1 -1
- package/dist/DateTimePicker.d.ts +1 -7
- package/dist/DateTimePicker.js +6 -17
- package/dist/DateTimePicker.js.map +1 -1
- package/dist/Icon.d.ts +8 -1
- package/dist/Icon.js.map +1 -1
- package/dist/Input.d.ts +18 -3
- package/dist/Input.js +0 -1
- package/dist/Input.js.map +1 -1
- package/dist/Link.d.ts +9 -7
- package/dist/Link.js +4 -3
- package/dist/Link.js.map +1 -1
- package/dist/ListItem.d.ts +4 -3
- package/dist/ListItem.js +1 -1
- package/dist/ListItem.js.map +1 -1
- package/dist/ListItemBase.d.ts +2 -1
- package/dist/ListItemBase.js +3 -2
- package/dist/ListItemBase.js.map +1 -1
- package/dist/MessageStrip.d.ts +1 -1
- package/dist/MessageStrip.js.map +1 -1
- package/dist/MultiComboBox.d.ts +12 -1
- package/dist/MultiComboBox.js.map +1 -1
- package/dist/MultiInput.d.ts +8 -2
- package/dist/MultiInput.js.map +1 -1
- package/dist/Option.d.ts +3 -2
- package/dist/Option.js +2 -1
- package/dist/Option.js.map +1 -1
- package/dist/Popover.js +6 -6
- package/dist/Popover.js.map +1 -1
- package/dist/SegmentedButton.d.ts +11 -3
- package/dist/SegmentedButton.js.map +1 -1
- package/dist/SegmentedButtonItem.d.ts +1 -2
- package/dist/SegmentedButtonItem.js +0 -1
- package/dist/SegmentedButtonItem.js.map +1 -1
- package/dist/Select.d.ts +17 -1
- package/dist/Select.js +6 -9
- package/dist/Select.js.map +1 -1
- package/dist/SelectMenu.d.ts +1 -1
- package/dist/SelectMenu.js +0 -1
- package/dist/SelectMenu.js.map +1 -1
- package/dist/SelectMenuOption.d.ts +2 -1
- package/dist/SelectMenuOption.js +0 -1
- package/dist/SelectMenuOption.js.map +1 -1
- package/dist/SuggestionGroupItem.d.ts +1 -1
- package/dist/SuggestionGroupItem.js.map +1 -1
- package/dist/SuggestionItem.d.ts +1 -1
- package/dist/SuggestionItem.js.map +1 -1
- package/dist/Tab.d.ts +12 -12
- package/dist/Tab.js +22 -23
- package/dist/Tab.js.map +1 -1
- package/dist/TabContainer.d.ts +33 -2
- package/dist/TabContainer.js +30 -30
- package/dist/TabContainer.js.map +1 -1
- package/dist/TabSeparator.d.ts +2 -2
- package/dist/TabSeparator.js +2 -2
- package/dist/TabSeparator.js.map +1 -1
- package/dist/Table.d.ts +14 -1
- package/dist/Table.js +8 -8
- package/dist/Table.js.map +1 -1
- package/dist/TableGroupRow.d.ts +4 -4
- package/dist/TableGroupRow.js +5 -5
- package/dist/TableGroupRow.js.map +1 -1
- package/dist/TableRow.d.ts +4 -4
- package/dist/TableRow.js +6 -6
- package/dist/TableRow.js.map +1 -1
- package/dist/TimePickerInternals.d.ts +1 -0
- package/dist/TimePickerInternals.js.map +1 -1
- package/dist/TimeSelectionClocks.d.ts +18 -17
- package/dist/TimeSelectionClocks.js +48 -18
- package/dist/TimeSelectionClocks.js.map +1 -1
- package/dist/Toast.d.ts +1 -8
- package/dist/Toast.js +21 -19
- package/dist/Toast.js.map +1 -1
- package/dist/ToggleSpinButton.d.ts +0 -1
- package/dist/ToggleSpinButton.js +0 -1
- package/dist/ToggleSpinButton.js.map +1 -1
- package/dist/Token.d.ts +3 -2
- package/dist/Token.js +1 -1
- package/dist/Token.js.map +1 -1
- package/dist/Tokenizer.d.ts +1 -1
- package/dist/Tokenizer.js.map +1 -1
- package/dist/Toolbar.d.ts +1 -1
- package/dist/Toolbar.js +3 -3
- package/dist/Toolbar.js.map +1 -1
- package/dist/ToolbarButton.d.ts +5 -6
- package/dist/ToolbarButton.js.map +1 -1
- package/dist/ToolbarSelect.js +4 -4
- package/dist/ToolbarSelect.js.map +1 -1
- package/dist/Tree.js +2 -2
- package/dist/Tree.js.map +1 -1
- package/dist/TreeItemBase.d.ts +2 -2
- package/dist/TreeItemBase.js +4 -4
- package/dist/TreeItemBase.js.map +1 -1
- package/dist/bundle.esm.js.map +1 -1
- package/dist/css/themes/Avatar.css +1 -1
- package/dist/css/themes/AvatarGroup.css +1 -1
- package/dist/css/themes/Badge.css +1 -1
- package/dist/css/themes/Breadcrumbs.css +1 -1
- package/dist/css/themes/BusyIndicator.css +1 -1
- package/dist/css/themes/Button.css +1 -1
- package/dist/css/themes/Calendar.css +1 -1
- package/dist/css/themes/CalendarHeader.css +1 -1
- package/dist/css/themes/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/CustomListItem.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/GroupHeaderListItem.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/Menu.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/MultiComboBoxPopover.css +1 -1
- package/dist/css/themes/MultiInput.css +1 -1
- package/dist/css/themes/NavigationMenu.css +1 -1
- package/dist/css/themes/Panel.css +1 -1
- package/dist/css/themes/Popover.css +1 -1
- package/dist/css/themes/PopupStaticAreaStyles.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/Select.css +1 -1
- package/dist/css/themes/SelectMenu.css +1 -1
- package/dist/css/themes/SelectPopover.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/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/TableCell.css +1 -1
- package/dist/css/themes/TableColumn.css +1 -1
- package/dist/css/themes/TableGroupRow.css +1 -1
- package/dist/css/themes/TableRow.css +1 -1
- package/dist/css/themes/TextArea.css +1 -1
- package/dist/css/themes/TimePicker.css +1 -1
- package/dist/css/themes/TimePickerPopover.css +1 -1
- package/dist/css/themes/TimeSelectionClocks.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/WheelSlider.css +1 -1
- package/dist/css/themes/YearPicker.css +1 -1
- package/dist/css/themes/sap_belize/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_belize_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_belize_hcw/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_dark_exp/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_exp/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcb_exp/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcw_exp/parameters-bundle.css +1 -1
- package/dist/custom-elements-internal.json +306 -79
- package/dist/custom-elements.json +119 -26
- package/dist/features/InputSuggestions.d.ts +2 -2
- package/dist/features/InputSuggestions.js.map +1 -1
- package/dist/generated/assets/i18n/messagebundle_en.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_saprigi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_uk.json +1 -1
- package/dist/generated/assets/themes/sap_belize/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_belize_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_belize_hcw/parameters-bundle.css.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_dark_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcb_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/templates/BreadcrumbsTemplate.lit.js +3 -3
- package/dist/generated/templates/BreadcrumbsTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ColorPaletteItemTemplate.lit.js +1 -1
- package/dist/generated/templates/ColorPaletteItemTemplate.lit.js.map +1 -1
- package/dist/generated/templates/DateTimePickerPopoverTemplate.lit.js +1 -1
- package/dist/generated/templates/DateTimePickerPopoverTemplate.lit.js.map +1 -1
- package/dist/generated/templates/GroupHeaderListItemTemplate.lit.js +1 -1
- package/dist/generated/templates/GroupHeaderListItemTemplate.lit.js.map +1 -1
- package/dist/generated/templates/TabInOverflowTemplate.lit.js +1 -1
- package/dist/generated/templates/TabInOverflowTemplate.lit.js.map +1 -1
- package/dist/generated/templates/TabInStripTemplate.lit.js +1 -1
- package/dist/generated/templates/TabInStripTemplate.lit.js.map +1 -1
- package/dist/generated/templates/TableGroupRowTemplate.lit.js +1 -1
- package/dist/generated/templates/TableGroupRowTemplate.lit.js.map +1 -1
- package/dist/generated/templates/TableRowTemplate.lit.js +1 -1
- package/dist/generated/templates/TableRowTemplate.lit.js.map +1 -1
- package/dist/generated/templates/TableTemplate.lit.js +1 -1
- package/dist/generated/templates/TableTemplate.lit.js.map +1 -1
- package/dist/generated/templates/TimeSelectionClocksTemplate.lit.js +3 -3
- package/dist/generated/templates/TimeSelectionClocksTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ToastTemplate.lit.js +2 -2
- package/dist/generated/templates/ToastTemplate.lit.js.map +1 -1
- package/dist/generated/templates/TokenTemplate.lit.js +1 -1
- package/dist/generated/templates/TokenTemplate.lit.js.map +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.js +1 -1
- package/dist/generated/themes/AvatarGroup.css.js.map +1 -1
- package/dist/generated/themes/Badge.css.js +1 -1
- package/dist/generated/themes/Badge.css.js.map +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.js +1 -1
- package/dist/generated/themes/BusyIndicator.css.js.map +1 -1
- package/dist/generated/themes/Button.css.js +1 -1
- package/dist/generated/themes/Button.css.js.map +1 -1
- package/dist/generated/themes/Calendar.css.js +1 -1
- package/dist/generated/themes/Calendar.css.js.map +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/Card.css.js +1 -1
- package/dist/generated/themes/Card.css.js.map +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.js +1 -1
- package/dist/generated/themes/Carousel.css.js.map +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.js +1 -1
- package/dist/generated/themes/ColorPalette.css.js.map +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.js +1 -1
- package/dist/generated/themes/ColorPalettePopover.css.js.map +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.js +1 -1
- package/dist/generated/themes/ComboBox.css.js.map +1 -1
- package/dist/generated/themes/CustomListItem.css.js +1 -1
- package/dist/generated/themes/CustomListItem.css.js.map +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.js +1 -1
- package/dist/generated/themes/DateTimePickerPopover.css.js.map +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.js +1 -1
- package/dist/generated/themes/Dialog.css.js.map +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/GroupHeaderListItem.css.js +1 -1
- package/dist/generated/themes/GroupHeaderListItem.css.js.map +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.js +1 -1
- package/dist/generated/themes/Icon.css.js.map +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.js +1 -1
- package/dist/generated/themes/InputIcon.css.js.map +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.js +1 -1
- package/dist/generated/themes/Link.css.js.map +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.js +1 -1
- package/dist/generated/themes/ListItem.css.js.map +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/Menu.css.js +1 -1
- package/dist/generated/themes/Menu.css.js.map +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.js +1 -1
- package/dist/generated/themes/MonthPicker.css.js.map +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/MultiComboBoxPopover.css.js +1 -1
- package/dist/generated/themes/MultiComboBoxPopover.css.js.map +1 -1
- package/dist/generated/themes/MultiInput.css.js +1 -1
- package/dist/generated/themes/MultiInput.css.js.map +1 -1
- package/dist/generated/themes/NavigationMenu.css.js +1 -1
- package/dist/generated/themes/NavigationMenu.css.js.map +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.js +1 -1
- package/dist/generated/themes/Popover.css.js.map +1 -1
- package/dist/generated/themes/PopupStaticAreaStyles.css.js +1 -1
- package/dist/generated/themes/PopupStaticAreaStyles.css.js.map +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.js +1 -1
- package/dist/generated/themes/ProgressIndicator.css.js.map +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.js +1 -1
- package/dist/generated/themes/RangeSlider.css.js.map +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.js +1 -1
- package/dist/generated/themes/ResponsivePopover.css.js.map +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.js +1 -1
- package/dist/generated/themes/SegmentedButton.css.js.map +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/SelectMenu.css.js +1 -1
- package/dist/generated/themes/SelectMenu.css.js.map +1 -1
- package/dist/generated/themes/SelectPopover.css.js +1 -1
- package/dist/generated/themes/SelectPopover.css.js.map +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.js +1 -1
- package/dist/generated/themes/SplitButton.css.js.map +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/Switch.css.js +1 -1
- package/dist/generated/themes/Switch.css.js.map +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.js +1 -1
- package/dist/generated/themes/TabInOverflow.css.js.map +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.js +1 -1
- package/dist/generated/themes/TabSemanticIcon.css.js.map +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.js +1 -1
- package/dist/generated/themes/Table.css.js.map +1 -1
- package/dist/generated/themes/TableCell.css.js +1 -1
- package/dist/generated/themes/TableCell.css.js.map +1 -1
- package/dist/generated/themes/TableColumn.css.js +1 -1
- package/dist/generated/themes/TableColumn.css.js.map +1 -1
- package/dist/generated/themes/TableGroupRow.css.js +1 -1
- package/dist/generated/themes/TableGroupRow.css.js.map +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/TextArea.css.js +1 -1
- package/dist/generated/themes/TextArea.css.js.map +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/TimePickerPopover.css.js +1 -1
- package/dist/generated/themes/TimePickerPopover.css.js.map +1 -1
- package/dist/generated/themes/TimeSelectionClocks.css.js +1 -1
- package/dist/generated/themes/TimeSelectionClocks.css.js.map +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.js +1 -1
- package/dist/generated/themes/ToggleButton.css.js.map +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.js +1 -1
- package/dist/generated/themes/Tokenizer.css.js.map +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.js +1 -1
- package/dist/generated/themes/Toolbar.css.js.map +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.js +1 -1
- package/dist/generated/themes/TreeItem.css.js.map +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/WheelSlider.css.js +1 -1
- package/dist/generated/themes/WheelSlider.css.js.map +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_belize/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_belize/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_belize_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_belize_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_belize_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_belize_hcw/parameters-bundle.css.js.map +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.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.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.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.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.js +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_dark_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_dark_exp/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcb_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcb_exp/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcw_exp/parameters-bundle.css.js.map +1 -1
- package/package.json +12 -11
- package/src/Breadcrumbs.hbs +4 -16
- package/src/ColorPaletteItem.hbs +1 -1
- package/src/DateTimePickerPopover.hbs +8 -11
- package/src/GroupHeaderListItem.hbs +1 -1
- package/src/TabInOverflow.hbs +1 -1
- package/src/TabInStrip.hbs +3 -3
- package/src/Table.hbs +1 -1
- package/src/TableGroupRow.hbs +1 -1
- package/src/TableRow.hbs +1 -1
- package/src/TimeSelectionClocks.hbs +5 -1
- package/src/Toast.hbs +2 -10
- package/src/Token.hbs +1 -1
- package/src/i18n/messagebundle_en.properties +4 -0
- package/src/i18n/messagebundle_en_US_saprigi.properties +4 -0
- package/src/i18n/messagebundle_sv.properties +2 -2
- package/src/i18n/messagebundle_uk.properties +3 -3
- package/src/themes/Breadcrumbs.css +1 -16
- package/src/themes/DateTimePickerPopover.css +10 -1
- package/src/themes/List.css +1 -1
- package/src/themes/PopupStaticAreaStyles.css +1 -2
- package/src/themes/PopupsCommon.css +2 -0
- package/src/themes/SplitButton.css +3 -3
- package/src/themes/TabInStrip.css +1 -1
- package/src/themes/TimePickerPopover.css +4 -0
- package/src/themes/TimeSelectionClocks.css +3 -5
- package/src/themes/Toast.css +24 -23
- package/src/themes/base/PopupStaticAreaStyles-parameters.css +3 -0
- package/src/themes/base/sizes-parameters.css +6 -2
- package/src/themes/sap_belize/parameters-bundle.css +1 -0
- package/src/themes/sap_belize_hcb/parameters-bundle.css +1 -0
- package/src/themes/sap_belize_hcw/parameters-bundle.css +1 -0
- package/src/themes/sap_fiori_3/parameters-bundle.css +1 -0
- package/src/themes/sap_fiori_3_dark/parameters-bundle.css +1 -0
- package/src/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -0
- package/src/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -0
- package/src/themes/sap_horizon/Breadcrumbs-parameters.css +1 -1
- package/src/themes/sap_horizon/parameters-bundle.css +1 -0
- package/src/themes/sap_horizon_dark/Breadcrumbs-parameters.css +1 -1
- package/src/themes/sap_horizon_dark/parameters-bundle.css +1 -0
- package/src/themes/sap_horizon_dark_exp/Breadcrumbs-parameters.css +1 -1
- package/src/themes/sap_horizon_exp/Breadcrumbs-parameters.css +1 -1
- package/src/themes/sap_horizon_hcb/parameters-bundle.css +1 -0
- package/src/themes/sap_horizon_hcw/parameters-bundle.css +1 -0
- package/dist/Interfaces.d.ts +0 -180
- package/dist/Interfaces.js +0 -2
- package/dist/Interfaces.js.map +0 -1
package/dist/Card.d.ts
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
2
|
import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Interface for components that may be slotted inside <code>ui5-card</code> as header
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
interface ICardHeader extends HTMLElement {
|
|
9
|
+
subtitleText: string;
|
|
10
|
+
titleText: string;
|
|
11
|
+
status: string;
|
|
12
|
+
interactive: boolean;
|
|
13
|
+
}
|
|
4
14
|
/**
|
|
5
15
|
* @class
|
|
6
16
|
* <h3 class="comment-api-title">Overview</h3>
|
|
@@ -70,3 +80,4 @@ declare class Card extends UI5Element {
|
|
|
70
80
|
static onDefine(): Promise<void>;
|
|
71
81
|
}
|
|
72
82
|
export default Card;
|
|
83
|
+
export type { ICardHeader, };
|
package/dist/Card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","sourceRoot":"","sources":["../src/Card.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,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAE3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,sDAAsD,CAAC;AACjG,OAAO,YAAY,MAAM,2CAA2C,CAAC;AACrE,OAAO,IAAI,MAA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,yBAAyB,CAAC,GAAG,kBAAkB,CAAC;IAChF,CAAC;IAED,IAAI,qBAAqB;QACxB,OAAO,MAAI,CAAC,UAAU,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACzD,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,QAAQ;QACpB,MAAI,CAAC,UAAU,GAAG,MAAM,aAAa,CAAC,oBAAoB,CAAC,CAAC;IAC7D,CAAC;CACD,CAAA;AA1DA;IADC,QAAQ,EAAE;4CACa;AAUxB;IADC,QAAQ,EAAE;+CACgB;AAO3B;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;qCAChB;AAU7B;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,uBAAuB,EAAE,IAAI,EAAE,CAAC;oCAC/B;AAtCvB,IAAI;IART,aAAa,CAAC;QACd,GAAG,EAAE,UAAU;QACf,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,YAAY;QACtB,MAAM,EAAE,OAAO;QACf,YAAY,EAAE,CAAC,IAAI,CAAC;KACpB,CAAC;GACI,IAAI,CAqET;AAED,IAAI,CAAC,MAAM,EAAE,CAAC;AAEd,eAAe,IAAI,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 litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AriaLabelHelper.js\";\nimport CardTemplate from \"./generated/templates/CardTemplate.lit.js\";\nimport Icon from \"./Icon.js\";\nimport {\n\tARIA_ROLEDESCRIPTION_CARD,\n\tARIA_LABEL_CARD_CONTENT,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport cardCss from \"./generated/themes/Card.css.js\";\n\n/**\n * Interface for components that may be slotted inside <code>ui5-card</code> as header\n *\n * @public\n */\ninterface ICardHeader extends HTMLElement {\n\tsubtitleText: string,\n\ttitleText: string,\n\tstatus: string,\n\tinteractive: boolean,\n}\n\n/**\n * @class\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * The <code>ui5-card</code> is a component that represents information in the form of a\n * tile with separate header and content areas.\n * The content area of a <code>ui5-card</code> can be arbitrary HTML content.\n * The header can be used through slot <code>header</code>. For which there is a <code>ui5-card-header</code> component to achieve the card look and feel.\n *\n * Note: We recommend the usage of <code>ui5-card-header</code> for the header slot, so advantage can be taken for keyboard handling, styling and accessibility.\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/Card\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents/dist/CardHeader.js\";</code> (for <code>ui5-card-header</code>)\n *\n * @constructor\n * @extends UI5Element\n * @public\n * @csspart root - Used to style the root DOM element of the card component\n * @csspart content - Used to style the content of the card\n */\n@customElement({\n\ttag: \"ui5-card\",\n\tlanguageAware: true,\n\trenderer: litRender,\n\ttemplate: CardTemplate,\n\tstyles: cardCss,\n\tdependencies: [Icon],\n})\nclass Card extends UI5Element {\n\t/**\n\t * Defines the accessible name of the component, which is used as the name of the card region and should be unique per card.\n\t * <b>Note:</b> <code>accessibleName</code> should be always set, unless <code>accessibleNameRef</code> is set.\n\t *\n\t *\n\t * @default \"\"\n\t * @public\n\t * @since 1.0.0-rc.16\n\t*/\n\t@property()\n\taccessibleName!: string;\n\n\t/**\n\t * Defines the IDs of the elements that label the component.\n\t *\n\t * @default \"\"\n\t * @public\n\t * @since 1.0.0-rc.16\n\t*/\n\t@property()\n\taccessibleNameRef!: string;\n\n\t/**\n\t * Defines the content of the component.\n\t * @public\n\t*/\n\t@slot({ type: HTMLElement, \"default\": true })\n\tcontent!: Array<HTMLElement>;\n\n\t/**\n\t * Defines the header of the component.\n\t * <br><br>\n\t * <b>Note:</b> Use <code>ui5-card-header</code> for the intended design.\n\t * @since 1.0.0-rc.15\n\t * @public\n\t*/\n\t@slot({ type: HTMLElement, invalidateOnChildChange: true })\n\theader!: Array<ICardHeader>;\n\n\tstatic i18nBundle: I18nBundle;\n\n\tget classes() {\n\t\treturn {\n\t\t\troot: {\n\t\t\t\t\"ui5-card-root\": true,\n\t\t\t\t\"ui5-card--interactive\": this._hasHeader && this.header[0].interactive,\n\t\t\t\t\"ui5-card--nocontent\": !this.content.length,\n\t\t\t},\n\t\t};\n\t}\n\n\tget _hasHeader() {\n\t\treturn !!this.header.length;\n\t}\n\n\tget _getAriaLabel() {\n\t\tconst effectiveAriaLabelText = getEffectiveAriaLabelText(this),\n\t\t\teffectiveAriaLabel = effectiveAriaLabelText ? ` ${effectiveAriaLabelText}` : \"\";\n\t\treturn Card.i18nBundle.getText(ARIA_ROLEDESCRIPTION_CARD) + effectiveAriaLabel;\n\t}\n\n\tget _ariaCardContentLabel() {\n\t\treturn Card.i18nBundle.getText(ARIA_LABEL_CARD_CONTENT);\n\t}\n\n\tstatic async onDefine() {\n\t\tCard.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n}\n\nCard.define();\n\nexport default Card;\n\nexport type {\n\tICardHeader,\n};\n"]}
|
package/dist/CardHeader.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
2
|
import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
3
|
-
import type { ICardHeader } from "./
|
|
3
|
+
import type { ICardHeader } from "./Card.js";
|
|
4
4
|
/**
|
|
5
5
|
* @class
|
|
6
6
|
* <h3 class="comment-api-title">Overview</h3>
|
package/dist/CardHeader.js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AAC;QAE3B,IAAI,KAAK,EAAE;YACV,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;SACxB;IACF,CAAC;CACD,CAAA;AAtKA;IADC,QAAQ,EAAE;6CACQ;AAQnB;IADC,QAAQ,EAAE;gDACW;AAQtB;IADC,QAAQ,EAAE;0CACK;AAShB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;+CACN;AAStB;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;8CAC9B;AAGpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;iDACvB;AAOxB;IADC,IAAI,EAAE;0CACqB;AAO5B;IADC,IAAI,EAAE;0CACqB;AA1DvB,UAAU;IAdf,aAAa,CAAC;QACd,GAAG,EAAE,iBAAiB;QACtB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,kBAAkB;QAC5B,MAAM,EAAE,aAAa;KACrB,CAAC;IACF;;;;;OAKG;;IACF,KAAK,CAAC,OAAO,CAAC;GACT,UAAU,CA6Kf;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.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { isSpace, isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { isFirefox } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport Integer from \"@ui5/webcomponents-base/dist/types/Integer.js\";\nimport type { ICardHeader } from \"./Interfaces.js\";\nimport CardHeaderTemplate from \"./generated/templates/CardHeaderTemplate.lit.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 * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * The <code>ui5-card-header</code> is a component, meant to be used as a header of the <code>ui5-card</code> component.\n * It displays valuable information, that can be defined with several properties, such as: <code>titleText</code>, <code>subtitleText</code>, <code>status</code>\n * and two slots: <code>avatar</code> and <code>action</code>.\n *\n * <h3>Keyboard handling</h3>\n * In case you enable <code>interactive</code> property, you can press the <code>ui5-card-header</code> by Space and Enter keys.\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/CardHeader\";</code>\n *\n * @constructor\n * @implements {ICardHeader}\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 status - Used to style the status of the CardHeader\n */\n@customElement({\n\ttag: \"ui5-card-header\",\n\tlanguageAware: true,\n\trenderer: litRender,\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 * <br><br>\n * <b>Note:</b> The event would be fired only if the <code>interactive</code> property is set to true.\n * @public\n */\n@event(\"click\")\nclass CardHeader extends UI5Element implements ICardHeader {\n\t/**\n\t * Defines the title text.\n\t * @default \"\"\n\t * @public\n\t*/\n\t@property()\n\ttitleText!: string;\n\n\t/**\n\t * Defines the subtitle text.\n\t * @default \"\"\n\t * @public\n\t*/\n\t@property()\n\tsubtitleText!: string;\n\n\t/**\n\t * Defines the status text.\n\t * @default \"\"\n\t * @public\n\t*/\n\t@property()\n\tstatus!: string;\n\n\t/**\n\t * Defines if the component would be interactive,\n\t * e.g gets hover effect, gets focus outline and <code>click</code> event is fired, when pressed.\n\t * @default false\n\t * @public\n\t*/\n\t@property({ type: Boolean })\n\tinteractive!: boolean;\n\n\t/**\n\t * Define the <code>aria-level</code> attribute of the component\n\t * <b>Note: </b> If the interactive property is set, <code>aria-level</code> attribute is not rendered at all.\n\t * @private\n\t * @default 3\n\t*/\n\t@property({ validator: Integer, defaultValue: 3 })\n\t_ariaLevel!: number;\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_headerActive!: boolean;\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\tstatic i18nBundle: I18nBundle;\n\n\tget classes() {\n\t\treturn {\n\t\t\troot: {\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};\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\" : null;\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.status) {\n\t\t\tlabels.push(`${this._id}-status`);\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\tstatic async onDefine() {\n\t\tCardHeader.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\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.fireEvent(\"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.fireEvent(\"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.fireEvent(\"click\");\n\t\t}\n\t}\n}\n\nCardHeader.define();\n\nexport default CardHeader;\nexport type {\n\tICardHeader,\n};\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,kDAAkD,CAAC;AACrE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAE7E,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACnE,OAAO,OAAO,MAAM,+CAA+C,CAAC;AAEpE,OAAO,kBAAkB,MAAM,iDAAiD,CAAC;AAEjF,OAAO,EACN,cAAc,EACd,gCAAgC,EAChC,4CAA4C,GAC5C,MAAM,mCAAmC,CAAC;AAE3C,SAAS;AACT,OAAO,aAAa,MAAM,sCAAsC,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAeH,IAAM,UAAU,kBAAhB,MAAM,UAAW,SAAQ,UAAU;IA8DlC,IAAI,OAAO;QACV,OAAO;YACN,IAAI,EAAE;gBACL,iBAAiB,EAAE,IAAI;gBACvB,8BAA8B,EAAE,IAAI,CAAC,WAAW;gBAChD,yBAAyB,EAAE,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,aAAa;gBACjE,oBAAoB,EAAE,SAAS,EAAE;aACjC;SACD,CAAC;IACH,CAAC;IAED,IAAI,KAAK;QACR,OAAO,IAAI,CAAC,UAAW,CAAC,aAAa,CAAc,kBAAkB,CAAE,CAAC;IACzE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AM,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;QAEzB,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;QAE3B,IAAI,KAAK,EAAE;YACV,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;SACxB;IACF,CAAC;CACD,CAAA;AAtKA;IADC,QAAQ,EAAE;6CACQ;AAQnB;IADC,QAAQ,EAAE;gDACW;AAQtB;IADC,QAAQ,EAAE;0CACK;AAShB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;+CACN;AAStB;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;8CAC9B;AAGpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;iDACvB;AAOxB;IADC,IAAI,EAAE;0CACqB;AAO5B;IADC,IAAI,EAAE;0CACqB;AA1DvB,UAAU;IAdf,aAAa,CAAC;QACd,GAAG,EAAE,iBAAiB;QACtB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,kBAAkB;QAC5B,MAAM,EAAE,aAAa;KACrB,CAAC;IACF;;;;;OAKG;;IACF,KAAK,CAAC,OAAO,CAAC;GACT,UAAU,CA6Kf;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.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { isSpace, isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { isFirefox } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport Integer from \"@ui5/webcomponents-base/dist/types/Integer.js\";\nimport type { ICardHeader } from \"./Card.js\";\nimport CardHeaderTemplate from \"./generated/templates/CardHeaderTemplate.lit.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 * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * The <code>ui5-card-header</code> is a component, meant to be used as a header of the <code>ui5-card</code> component.\n * It displays valuable information, that can be defined with several properties, such as: <code>titleText</code>, <code>subtitleText</code>, <code>status</code>\n * and two slots: <code>avatar</code> and <code>action</code>.\n *\n * <h3>Keyboard handling</h3>\n * In case you enable <code>interactive</code> property, you can press the <code>ui5-card-header</code> by Space and Enter keys.\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/CardHeader\";</code>\n *\n * @constructor\n * @implements {ICardHeader}\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 status - Used to style the status of the CardHeader\n */\n@customElement({\n\ttag: \"ui5-card-header\",\n\tlanguageAware: true,\n\trenderer: litRender,\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 * <br><br>\n * <b>Note:</b> The event would be fired only if the <code>interactive</code> property is set to true.\n * @public\n */\n@event(\"click\")\nclass CardHeader extends UI5Element implements ICardHeader {\n\t/**\n\t * Defines the title text.\n\t * @default \"\"\n\t * @public\n\t*/\n\t@property()\n\ttitleText!: string;\n\n\t/**\n\t * Defines the subtitle text.\n\t * @default \"\"\n\t * @public\n\t*/\n\t@property()\n\tsubtitleText!: string;\n\n\t/**\n\t * Defines the status text.\n\t * @default \"\"\n\t * @public\n\t*/\n\t@property()\n\tstatus!: string;\n\n\t/**\n\t * Defines if the component would be interactive,\n\t * e.g gets hover effect, gets focus outline and <code>click</code> event is fired, when pressed.\n\t * @default false\n\t * @public\n\t*/\n\t@property({ type: Boolean })\n\tinteractive!: boolean;\n\n\t/**\n\t * Define the <code>aria-level</code> attribute of the component\n\t * <b>Note: </b> If the interactive property is set, <code>aria-level</code> attribute is not rendered at all.\n\t * @private\n\t * @default 3\n\t*/\n\t@property({ validator: Integer, defaultValue: 3 })\n\t_ariaLevel!: number;\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_headerActive!: boolean;\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\tstatic i18nBundle: I18nBundle;\n\n\tget classes() {\n\t\treturn {\n\t\t\troot: {\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};\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\" : null;\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.status) {\n\t\t\tlabels.push(`${this._id}-status`);\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\tstatic async onDefine() {\n\t\tCardHeader.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\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.fireEvent(\"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.fireEvent(\"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.fireEvent(\"click\");\n\t\t}\n\t}\n}\n\nCardHeader.define();\n\nexport default CardHeader;\nexport type {\n\tICardHeader,\n};\n"]}
|
package/dist/CheckBox.js
CHANGED
|
@@ -125,12 +125,14 @@ let CheckBox = CheckBox_1 = class CheckBox extends UI5Element {
|
|
|
125
125
|
_onkeydown(e) {
|
|
126
126
|
if (isSpace(e)) {
|
|
127
127
|
e.preventDefault();
|
|
128
|
-
|
|
128
|
+
}
|
|
129
|
+
if (this.readonly || this.disabled) {
|
|
130
|
+
return;
|
|
129
131
|
}
|
|
130
132
|
if (isEnter(e)) {
|
|
131
133
|
this.toggle();
|
|
132
|
-
this.active = true;
|
|
133
134
|
}
|
|
135
|
+
this.active = true;
|
|
134
136
|
}
|
|
135
137
|
_onkeyup(e) {
|
|
136
138
|
if (isSpace(e)) {
|
package/dist/CheckBox.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckBox.js","sourceRoot":"","sources":["../src/CheckBox.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACnE,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,kDAAkD,CAAC;AACrE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAE3E,OAAO,UAAU,MAAM,kDAAkD,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,kDAAkD,CAAC;AAC9E,OAAO,EAAE,yBAAyB,EAAE,MAAM,sDAAsD,CAAC;AACjG,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AC,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,IAAI,EAAE,CAAC;4CACjC;AAU7B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,CAAC,IAAI,EAAE,CAAC;8CACjC;AAkBjC;IADC,QAAQ,EAAE;sCACG;AAOd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCACX;AAQjB;IADC,IAAI,EAAE;6CAC0B;AAhK5B,QAAQ;IAnBb,aAAa,CAAC;QACd,GAAG,EAAE,cAAc;QACnB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,gBAAgB;QAC1B,MAAM,EAAE,WAAW;QACnB,YAAY,EAAE;YACb,KAAK;YACL,IAAI;SACJ;KACD,CAAC;IACF;;;;;OAKG;;IACF,KAAK,CAAC,QAAQ,CAAC;GAEV,QAAQ,CA2Vb;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,CAAC","sourcesContent":["import { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport 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.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport { getFeature } from \"@ui5/webcomponents-base/dist/FeaturesRegistry.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AriaLabelHelper.js\";\nimport { isSpace, isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport \"@ui5/webcomponents-icons/dist/accept.js\";\nimport \"@ui5/webcomponents-icons/dist/complete.js\";\nimport \"@ui5/webcomponents-icons/dist/border.js\";\nimport \"@ui5/webcomponents-icons/dist/tri-state.js\";\nimport Icon from \"./Icon.js\";\nimport Label from \"./Label.js\";\nimport WrappingType from \"./types/WrappingType.js\";\nimport {\n\tVALUE_STATE_ERROR,\n\tVALUE_STATE_WARNING,\n\tVALUE_STATE_SUCCESS,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport checkboxCss from \"./generated/themes/CheckBox.css.js\";\nimport type FormSupport from \"./features/InputElementsFormSupport.js\";\nimport type { IFormElement, NativeFormElement } from \"./features/InputElementsFormSupport.js\";\n\n// Template\nimport CheckBoxTemplate from \"./generated/templates/CheckBoxTemplate.lit.js\";\n\nlet isGlobalHandlerAttached = false;\nlet activeCb: CheckBox;\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * Allows the user to set a binary value, such as true/false or yes/no for an item.\n * <br><br>\n * The <code>ui5-checkbox</code> component consists of a box and a label that describes its purpose.\n * If it's checked, an indicator is displayed inside the box.\n * To check/uncheck the <code>ui5-checkbox</code>, the user has to click or tap the square\n * box or its label.\n * <br><br>\n * The <code>ui5-checkbox</code> component only has 2 states - checked and unchecked.\n * Clicking or tapping toggles the <code>ui5-checkbox</code> between checked and unchecked state.\n *\n * <h3>Usage</h3>\n *\n * You can define the checkbox text with via the <code>text</code> property. If the text exceeds the available width, it is truncated by default.\n * In case you prefer text to wrap, set the <code>wrappingType</code> property to \"Normal\".\n * The touchable area for toggling the <code>ui5-checkbox</code> ends where the text ends.\n * <br><br>\n * You can disable the <code>ui5-checkbox</code> by setting the <code>disabled</code> property to\n * <code>true</code>,\n * or use the <code>ui5-checkbox</code> in read-only mode by setting the <code>readonly</code>\n * property to <code>true</code>.\n *\n * <br><br>\n *\n * <h3>Keyboard Handling</h3>\n *\n * The user can use the following keyboard shortcuts to toggle the checked state of the <code>ui5-checkbox</code>.\n * <ul>\n * <li>[SPACE, ENTER] - Toggles between different states: checked, not checked.</li>\n * </ul>\n * <br><br>\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/CheckBox\";</code>\n *\n * @constructor\n * @extends UI5Element\n * @public\n * @csspart root - Used to style the outermost wrapper of the <code>ui5-checkbox</code>\n * @csspart label - Used to style the label of the <code>ui5-checkbox</code>\n */\n@customElement({\n\ttag: \"ui5-checkbox\",\n\tlanguageAware: true,\n\trenderer: litRender,\n\ttemplate: CheckBoxTemplate,\n\tstyles: checkboxCss,\n\tdependencies: [\n\t\tLabel,\n\t\tIcon,\n\t],\n})\n/**\n * Fired when the component checked state changes.\n *\n * @public\n * @allowPreventDefault\n */\n@event(\"change\")\n\nclass CheckBox extends UI5Element implements IFormElement {\n\t/**\n\t * Receives id(or many ids) of the elements that label the component\n\t * @default \"\"\n\t * @public\n\t * @since 1.1.0\n\t */\n\t@property()\n\taccessibleNameRef!: string;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t *\n\t * @public\n\t * @default \"\"\n\t * @since 1.1.0\n\t */\n\t@property()\n\taccessibleName!: string;\n\n\t/**\n\t * Defines whether the component is disabled.\n\t * <br><br>\n\t * <b>Note:</b> A disabled component is completely noninteractive.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled!: boolean;\n\n\t/**\n\t * Defines whether the component is read-only.\n\t * <br><br>\n\t * <b>Note:</b> A read-only component is not editable,\n\t * but still provides visual feedback upon user interaction.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\treadonly!: boolean;\n\n\t/**\n\t * Determines whether the <code>ui5-checkbox</code> is in display only state.\n\t *\n\t * When set to <code>true</code>, the <code>ui5-checkbox</code> is not interactive, not editable, not focusable\n\t * and not in the tab chain. This setting is used for forms in review mode.\n\t *\n\t * <Note:> When the property <code>disabled</code> is set to <code>true</code> this property has no effect.\n\t * @since 1.22.0\n\t * @public\n\t * @default false\n\t */\n\t@property({ type: Boolean })\n\tdisplayOnly!: boolean;\n\n\t/**\n\t * Defines whether the component is required.\n\t *\n\t * @default false\n\t * @public\n\t * @since 1.3.0\n\t */\n\t@property({ type: Boolean })\n\trequired!: boolean;\n\n\t/**\n\t* Defines whether the component is displayed as partially checked.\n\t* <br><br>\n\t* <b>Note:</b> The indeterminate state can be set only programmatically and can’t be achieved by user\n\t* interaction and the resulting visual state depends on the values of the <code>indeterminate</code>\n\t* and <code>checked</code> properties:\n\t* <ul>\n\t* <li> If the component is checked and indeterminate, it will be displayed as partially checked\n\t* <li> If the component is checked and it is not indeterminate, it will be displayed as checked\n\t* <li> If the component is not checked, it will be displayed as not checked regardless value of the indeterminate attribute\n\t* </ul>\n\t*\n\t* @default false\n\t* @public\n\t* @since 1.0.0-rc.15\n\t*/\n\t@property({ type: Boolean })\n\tindeterminate!: boolean;\n\n\t/**\n\t * Defines if the component is checked.\n\t * <br><br>\n\t * <b>Note:</b> The property can be changed with user interaction,\n\t * either by cliking/tapping on the component, or by\n\t * pressing the Enter or Space key.\n\t *\n\t * @default false\n\t * @formEvents change\n\t * @formProperty\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tchecked!: boolean;\n\n\t/**\n\t * Defines the text of the component.\n\t *\n\t * @default \"\"\n\t * @public\n\t */\n\t@property()\n\ttext!: string;\n\n\t/**\n\t * Defines the value state of the component.\n\t *\n\t * @default \"None\"\n\t * @public\n\t */\n\t@property({ type: ValueState, defaultValue: ValueState.None })\n\tvalueState!: `${ValueState}`;\n\n\t/**\n\t * Defines whether the component text wraps when there is not enough space.\n\t * <br><b>Note:</b> for option \"Normal\" the text will wrap and the words will not be broken based on hyphenation.\n\t *\n\t * @default \"None\"\n\t * @public\n\t */\n\t@property({ type: WrappingType, defaultValue: WrappingType.None })\n\twrappingType!: `${WrappingType}`;\n\n\t/**\n\t * Determines the name with which the component will be submitted in an HTML form.\n\t *\n\t * <br><br>\n\t * <b>Important:</b> For the <code>name</code> property to have effect, you must add the following import to your project:\n\t * <code>import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";</code>\n\t *\n\t * <br><br>\n\t * <b>Note:</b> When set, a native <code>input</code> HTML element\n\t * will be created inside the component so that it can be submitted as\n\t * part of an HTML form. Do not use this property unless you need to submit a form.\n\t *\n\t * @default \"\"\n\t * @public\n\t */\n\t@property()\n\tname!: string;\n\n\t/**\n\t * Defines the active state (pressed or not) of the component.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tactive!: boolean;\n\n\t/**\n\t * The slot is used to render native <code>input</code> HTML element within Light DOM to enable form submit,\n\t * when <code>name</code> property is set.\n\t * @private\n\t */\n\t@slot()\n\tformSupport!: Array<HTMLElement>;\n\n\tstatic i18nBundle: I18nBundle;\n\t_deactivate: () => void;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._deactivate = () => {\n\t\t\tif (activeCb) {\n\t\t\t\tactiveCb.active = false;\n\t\t\t}\n\t\t};\n\n\t\tif (!isGlobalHandlerAttached) {\n\t\t\tdocument.addEventListener(\"mouseup\", this._deactivate);\n\t\t\tisGlobalHandlerAttached = true;\n\t\t}\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._enableFormSupport();\n\t}\n\n\t_enableFormSupport() {\n\t\tconst formSupport = getFeature<typeof FormSupport>(\"FormSupport\");\n\t\tif (formSupport) {\n\t\t\tformSupport.syncNativeHiddenInput(this, (element: IFormElement, nativeInput: NativeFormElement) => {\n\t\t\t\tnativeInput.disabled = !!element.disabled;\n\t\t\t\t(nativeInput as HTMLInputElement).checked = !!element.checked;\n\t\t\t\tnativeInput.value = element.checked ? \"on\" : \"\";\n\t\t\t});\n\t\t} else if (this.name) {\n\t\t\tconsole.warn(`In order for the \"name\" property to have effect, you should also: import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";`); // eslint-disable-line\n\t\t}\n\t}\n\n\t_onclick() {\n\t\tthis.toggle();\n\t}\n\n\t_onmousedown() {\n\t\tif (this.readonly || this.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.active = true;\n\t\tactiveCb = this; // eslint-disable-line\n\t}\n\n\t_onmouseup() {\n\t\tthis.active = false;\n\t}\n\n\t_onfocusout() {\n\t\tthis.active = false;\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis.active = true;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis.toggle();\n\t\t\tthis.active = true;\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\tthis.toggle();\n\t\t}\n\n\t\tthis.active = false;\n\t}\n\n\ttoggle() {\n\t\tif (this.canToggle()) {\n\t\t\tconst lastState = {\n\t\t\t\tchecked: this.checked,\n\t\t\t\tindeterminate: this.indeterminate,\n\t\t\t};\n\t\t\tif (this.indeterminate) {\n\t\t\t\tthis.indeterminate = false;\n\t\t\t\tthis.checked = true;\n\t\t\t} else {\n\t\t\t\tthis.checked = !this.checked;\n\t\t\t}\n\n\t\t\tconst changePrevented = !this.fireEvent(\"change\", null, true);\n\t\t\t// Angular two way data binding\n\t\t\tconst valueChagnePrevented = !this.fireEvent(\"value-changed\", null, true);\n\n\t\t\tif (changePrevented || valueChagnePrevented) {\n\t\t\t\tthis.checked = lastState.checked;\n\t\t\t\tthis.indeterminate = lastState.indeterminate;\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\tcanToggle() {\n\t\treturn !(this.disabled || this.readonly || this.displayOnly);\n\t}\n\n\tvalueStateTextMappings() {\n\t\treturn {\n\t\t\t\"Error\": CheckBox.i18nBundle.getText(VALUE_STATE_ERROR),\n\t\t\t\"Warning\": CheckBox.i18nBundle.getText(VALUE_STATE_WARNING),\n\t\t\t\"Success\": CheckBox.i18nBundle.getText(VALUE_STATE_SUCCESS),\n\t\t};\n\t}\n\n\tget ariaLabelText() {\n\t\treturn getEffectiveAriaLabelText(this);\n\t}\n\n\tget classes() {\n\t\treturn {\n\t\t\tmain: {\n\t\t\t\t\"ui5-checkbox--hoverable\": !this.disabled && !this.readonly && isDesktop(),\n\t\t\t},\n\t\t};\n\t}\n\n\tget ariaReadonly() {\n\t\treturn this.readonly || this.displayOnly ? \"true\" : undefined;\n\t}\n\n\tget effectiveAriaDisabled() {\n\t\treturn this.disabled ? \"true\" : undefined;\n\t}\n\n\tget effectiveAriaChecked() {\n\t\treturn this.indeterminate && this.checked ? \"mixed\" : this.checked;\n\t}\n\n\tget ariaLabelledBy() {\n\t\tif (!this.ariaLabelText) {\n\t\t\treturn this.text ? `${this._id}-label` : undefined;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tget ariaDescribedBy() {\n\t\treturn this.hasValueState ? `${this._id}-descr` : undefined;\n\t}\n\n\tget hasValueState() {\n\t\treturn this.valueState !== ValueState.None;\n\t}\n\n\tget valueStateText() {\n\t\tif (this.valueState !== ValueState.None && this.valueState !== ValueState.Information) {\n\t\t\treturn this.valueStateTextMappings()[this.valueState];\n\t\t}\n\t}\n\n\tget effectiveTabIndex() {\n\t\tconst tabindex = this.getAttribute(\"tabindex\");\n\t\treturn this.disabled || this.displayOnly ? undefined : tabindex || \"0\";\n\t}\n\n\tget isCompletelyChecked() {\n\t\treturn this.checked && !this.indeterminate;\n\t}\n\n\tget isDisplayOnly() {\n\t\treturn this.displayOnly && !this.disabled;\n\t}\n\n\tget displayOnlyIcon() {\n\t\tif (this.isCompletelyChecked) {\n\t\t\treturn \"complete\";\n\t\t}\n\t\tif (this.checked && this.indeterminate) {\n\t\t\treturn \"tri-state\";\n\t\t}\n\t\treturn \"border\";\n\t}\n\n\tstatic async onDefine() {\n\t\tCheckBox.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n}\n\nCheckBox.define();\n\nexport default CheckBox;\n"]}
|
|
1
|
+
{"version":3,"file":"C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Ae,QAAQ,CAAC","sourcesContent":["import { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport 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.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport { getFeature } from \"@ui5/webcomponents-base/dist/FeaturesRegistry.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AriaLabelHelper.js\";\nimport { isSpace, isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport \"@ui5/webcomponents-icons/dist/accept.js\";\nimport \"@ui5/webcomponents-icons/dist/complete.js\";\nimport \"@ui5/webcomponents-icons/dist/border.js\";\nimport \"@ui5/webcomponents-icons/dist/tri-state.js\";\nimport Icon from \"./Icon.js\";\nimport Label from \"./Label.js\";\nimport WrappingType from \"./types/WrappingType.js\";\nimport {\n\tVALUE_STATE_ERROR,\n\tVALUE_STATE_WARNING,\n\tVALUE_STATE_SUCCESS,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport checkboxCss from \"./generated/themes/CheckBox.css.js\";\nimport type FormSupport from \"./features/InputElementsFormSupport.js\";\nimport type { IFormElement, NativeFormElement } from \"./features/InputElementsFormSupport.js\";\n\n// Template\nimport CheckBoxTemplate from \"./generated/templates/CheckBoxTemplate.lit.js\";\n\nlet isGlobalHandlerAttached = false;\nlet activeCb: CheckBox;\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * Allows the user to set a binary value, such as true/false or yes/no for an item.\n * <br><br>\n * The <code>ui5-checkbox</code> component consists of a box and a label that describes its purpose.\n * If it's checked, an indicator is displayed inside the box.\n * To check/uncheck the <code>ui5-checkbox</code>, the user has to click or tap the square\n * box or its label.\n * <br><br>\n * The <code>ui5-checkbox</code> component only has 2 states - checked and unchecked.\n * Clicking or tapping toggles the <code>ui5-checkbox</code> between checked and unchecked state.\n *\n * <h3>Usage</h3>\n *\n * You can define the checkbox text with via the <code>text</code> property. If the text exceeds the available width, it is truncated by default.\n * In case you prefer text to wrap, set the <code>wrappingType</code> property to \"Normal\".\n * The touchable area for toggling the <code>ui5-checkbox</code> ends where the text ends.\n * <br><br>\n * You can disable the <code>ui5-checkbox</code> by setting the <code>disabled</code> property to\n * <code>true</code>,\n * or use the <code>ui5-checkbox</code> in read-only mode by setting the <code>readonly</code>\n * property to <code>true</code>.\n *\n * <br><br>\n *\n * <h3>Keyboard Handling</h3>\n *\n * The user can use the following keyboard shortcuts to toggle the checked state of the <code>ui5-checkbox</code>.\n * <ul>\n * <li>[SPACE, ENTER] - Toggles between different states: checked, not checked.</li>\n * </ul>\n * <br><br>\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/CheckBox\";</code>\n *\n * @constructor\n * @extends UI5Element\n * @public\n * @csspart root - Used to style the outermost wrapper of the <code>ui5-checkbox</code>\n * @csspart label - Used to style the label of the <code>ui5-checkbox</code>\n */\n@customElement({\n\ttag: \"ui5-checkbox\",\n\tlanguageAware: true,\n\trenderer: litRender,\n\ttemplate: CheckBoxTemplate,\n\tstyles: checkboxCss,\n\tdependencies: [\n\t\tLabel,\n\t\tIcon,\n\t],\n})\n/**\n * Fired when the component checked state changes.\n *\n * @public\n * @allowPreventDefault\n */\n@event(\"change\")\n\nclass CheckBox extends UI5Element implements IFormElement {\n\t/**\n\t * Receives id(or many ids) of the elements that label the component\n\t * @default \"\"\n\t * @public\n\t * @since 1.1.0\n\t */\n\t@property()\n\taccessibleNameRef!: string;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t *\n\t * @public\n\t * @default \"\"\n\t * @since 1.1.0\n\t */\n\t@property()\n\taccessibleName!: string;\n\n\t/**\n\t * Defines whether the component is disabled.\n\t * <br><br>\n\t * <b>Note:</b> A disabled component is completely noninteractive.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled!: boolean;\n\n\t/**\n\t * Defines whether the component is read-only.\n\t * <br><br>\n\t * <b>Note:</b> A read-only component is not editable,\n\t * but still provides visual feedback upon user interaction.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\treadonly!: boolean;\n\n\t/**\n\t * Determines whether the <code>ui5-checkbox</code> is in display only state.\n\t *\n\t * When set to <code>true</code>, the <code>ui5-checkbox</code> is not interactive, not editable, not focusable\n\t * and not in the tab chain. This setting is used for forms in review mode.\n\t *\n\t * <Note:> When the property <code>disabled</code> is set to <code>true</code> this property has no effect.\n\t * @since 1.22.0\n\t * @public\n\t * @default false\n\t */\n\t@property({ type: Boolean })\n\tdisplayOnly!: boolean;\n\n\t/**\n\t * Defines whether the component is required.\n\t *\n\t * @default false\n\t * @public\n\t * @since 1.3.0\n\t */\n\t@property({ type: Boolean })\n\trequired!: boolean;\n\n\t/**\n\t* Defines whether the component is displayed as partially checked.\n\t* <br><br>\n\t* <b>Note:</b> The indeterminate state can be set only programmatically and can’t be achieved by user\n\t* interaction and the resulting visual state depends on the values of the <code>indeterminate</code>\n\t* and <code>checked</code> properties:\n\t* <ul>\n\t* <li> If the component is checked and indeterminate, it will be displayed as partially checked\n\t* <li> If the component is checked and it is not indeterminate, it will be displayed as checked\n\t* <li> If the component is not checked, it will be displayed as not checked regardless value of the indeterminate attribute\n\t* </ul>\n\t*\n\t* @default false\n\t* @public\n\t* @since 1.0.0-rc.15\n\t*/\n\t@property({ type: Boolean })\n\tindeterminate!: boolean;\n\n\t/**\n\t * Defines if the component is checked.\n\t * <br><br>\n\t * <b>Note:</b> The property can be changed with user interaction,\n\t * either by cliking/tapping on the component, or by\n\t * pressing the Enter or Space key.\n\t *\n\t * @default false\n\t * @formEvents change\n\t * @formProperty\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tchecked!: boolean;\n\n\t/**\n\t * Defines the text of the component.\n\t *\n\t * @default \"\"\n\t * @public\n\t */\n\t@property()\n\ttext!: string;\n\n\t/**\n\t * Defines the value state of the component.\n\t *\n\t * @default \"None\"\n\t * @public\n\t */\n\t@property({ type: ValueState, defaultValue: ValueState.None })\n\tvalueState!: `${ValueState}`;\n\n\t/**\n\t * Defines whether the component text wraps when there is not enough space.\n\t * <br><b>Note:</b> for option \"Normal\" the text will wrap and the words will not be broken based on hyphenation.\n\t *\n\t * @default \"None\"\n\t * @public\n\t */\n\t@property({ type: WrappingType, defaultValue: WrappingType.None })\n\twrappingType!: `${WrappingType}`;\n\n\t/**\n\t * Determines the name with which the component will be submitted in an HTML form.\n\t *\n\t * <br><br>\n\t * <b>Important:</b> For the <code>name</code> property to have effect, you must add the following import to your project:\n\t * <code>import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";</code>\n\t *\n\t * <br><br>\n\t * <b>Note:</b> When set, a native <code>input</code> HTML element\n\t * will be created inside the component so that it can be submitted as\n\t * part of an HTML form. Do not use this property unless you need to submit a form.\n\t *\n\t * @default \"\"\n\t * @public\n\t */\n\t@property()\n\tname!: string;\n\n\t/**\n\t * Defines the active state (pressed or not) of the component.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tactive!: boolean;\n\n\t/**\n\t * The slot is used to render native <code>input</code> HTML element within Light DOM to enable form submit,\n\t * when <code>name</code> property is set.\n\t * @private\n\t */\n\t@slot()\n\tformSupport!: Array<HTMLElement>;\n\n\tstatic i18nBundle: I18nBundle;\n\t_deactivate: () => void;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._deactivate = () => {\n\t\t\tif (activeCb) {\n\t\t\t\tactiveCb.active = false;\n\t\t\t}\n\t\t};\n\n\t\tif (!isGlobalHandlerAttached) {\n\t\t\tdocument.addEventListener(\"mouseup\", this._deactivate);\n\t\t\tisGlobalHandlerAttached = true;\n\t\t}\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._enableFormSupport();\n\t}\n\n\t_enableFormSupport() {\n\t\tconst formSupport = getFeature<typeof FormSupport>(\"FormSupport\");\n\t\tif (formSupport) {\n\t\t\tformSupport.syncNativeHiddenInput(this, (element: IFormElement, nativeInput: NativeFormElement) => {\n\t\t\t\tnativeInput.disabled = !!element.disabled;\n\t\t\t\t(nativeInput as HTMLInputElement).checked = !!element.checked;\n\t\t\t\tnativeInput.value = element.checked ? \"on\" : \"\";\n\t\t\t});\n\t\t} else if (this.name) {\n\t\t\tconsole.warn(`In order for the \"name\" property to have effect, you should also: import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";`); // eslint-disable-line\n\t\t}\n\t}\n\n\t_onclick() {\n\t\tthis.toggle();\n\t}\n\n\t_onmousedown() {\n\t\tif (this.readonly || this.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.active = true;\n\t\tactiveCb = this; // eslint-disable-line\n\t}\n\n\t_onmouseup() {\n\t\tthis.active = false;\n\t}\n\n\t_onfocusout() {\n\t\tthis.active = false;\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t}\n\n\t\tif (this.readonly || this.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis.toggle();\n\t\t}\n\n\t\tthis.active = true;\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\tthis.toggle();\n\t\t}\n\n\t\tthis.active = false;\n\t}\n\n\ttoggle() {\n\t\tif (this.canToggle()) {\n\t\t\tconst lastState = {\n\t\t\t\tchecked: this.checked,\n\t\t\t\tindeterminate: this.indeterminate,\n\t\t\t};\n\t\t\tif (this.indeterminate) {\n\t\t\t\tthis.indeterminate = false;\n\t\t\t\tthis.checked = true;\n\t\t\t} else {\n\t\t\t\tthis.checked = !this.checked;\n\t\t\t}\n\n\t\t\tconst changePrevented = !this.fireEvent(\"change\", null, true);\n\t\t\t// Angular two way data binding\n\t\t\tconst valueChagnePrevented = !this.fireEvent(\"value-changed\", null, true);\n\n\t\t\tif (changePrevented || valueChagnePrevented) {\n\t\t\t\tthis.checked = lastState.checked;\n\t\t\t\tthis.indeterminate = lastState.indeterminate;\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\tcanToggle() {\n\t\treturn !(this.disabled || this.readonly || this.displayOnly);\n\t}\n\n\tvalueStateTextMappings() {\n\t\treturn {\n\t\t\t\"Error\": CheckBox.i18nBundle.getText(VALUE_STATE_ERROR),\n\t\t\t\"Warning\": CheckBox.i18nBundle.getText(VALUE_STATE_WARNING),\n\t\t\t\"Success\": CheckBox.i18nBundle.getText(VALUE_STATE_SUCCESS),\n\t\t};\n\t}\n\n\tget ariaLabelText() {\n\t\treturn getEffectiveAriaLabelText(this);\n\t}\n\n\tget classes() {\n\t\treturn {\n\t\t\tmain: {\n\t\t\t\t\"ui5-checkbox--hoverable\": !this.disabled && !this.readonly && isDesktop(),\n\t\t\t},\n\t\t};\n\t}\n\n\tget ariaReadonly() {\n\t\treturn this.readonly || this.displayOnly ? \"true\" : undefined;\n\t}\n\n\tget effectiveAriaDisabled() {\n\t\treturn this.disabled ? \"true\" : undefined;\n\t}\n\n\tget effectiveAriaChecked() {\n\t\treturn this.indeterminate && this.checked ? \"mixed\" : this.checked;\n\t}\n\n\tget ariaLabelledBy() {\n\t\tif (!this.ariaLabelText) {\n\t\t\treturn this.text ? `${this._id}-label` : undefined;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tget ariaDescribedBy() {\n\t\treturn this.hasValueState ? `${this._id}-descr` : undefined;\n\t}\n\n\tget hasValueState() {\n\t\treturn this.valueState !== ValueState.None;\n\t}\n\n\tget valueStateText() {\n\t\tif (this.valueState !== ValueState.None && this.valueState !== ValueState.Information) {\n\t\t\treturn this.valueStateTextMappings()[this.valueState];\n\t\t}\n\t}\n\n\tget effectiveTabIndex() {\n\t\tconst tabindex = this.getAttribute(\"tabindex\");\n\t\treturn this.disabled || this.displayOnly ? undefined : tabindex || \"0\";\n\t}\n\n\tget isCompletelyChecked() {\n\t\treturn this.checked && !this.indeterminate;\n\t}\n\n\tget isDisplayOnly() {\n\t\treturn this.displayOnly && !this.disabled;\n\t}\n\n\tget displayOnlyIcon() {\n\t\tif (this.isCompletelyChecked) {\n\t\t\treturn \"complete\";\n\t\t}\n\t\tif (this.checked && this.indeterminate) {\n\t\t\treturn \"tri-state\";\n\t\t}\n\t\treturn \"border\";\n\t}\n\n\tstatic async onDefine() {\n\t\tCheckBox.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n}\n\nCheckBox.define();\n\nexport default CheckBox;\n"]}
|
package/dist/ColorPalette.d.ts
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
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
|
+
import type { ITabbable } from "@ui5/webcomponents-base/dist/delegate/ItemNavigation.js";
|
|
4
5
|
import ColorPaletteItem from "./ColorPaletteItem.js";
|
|
5
6
|
import Button from "./Button.js";
|
|
6
7
|
import type Dialog from "./Dialog.js";
|
|
7
8
|
import type ColorPaletteMoreColors from "./features/ColorPaletteMoreColors.js";
|
|
8
9
|
import type ColorPicker from "./ColorPicker.js";
|
|
9
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Interface for components that may be used inside a <code>ui5-color-palette</code> or <code>ui5-color-palette-popover</code>
|
|
12
|
+
*
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
interface IColorPaletteItem extends HTMLElement, ITabbable {
|
|
16
|
+
value?: string;
|
|
17
|
+
index?: number;
|
|
18
|
+
}
|
|
10
19
|
type ColorPaletteNavigationItem = IColorPaletteItem | Button;
|
|
11
20
|
type ColorPaletteItemClickEventDetail = {
|
|
12
21
|
color: string;
|
|
@@ -124,4 +133,4 @@ declare class ColorPalette extends UI5Element {
|
|
|
124
133
|
getColorPicker(): Promise<ColorPicker>;
|
|
125
134
|
}
|
|
126
135
|
export default ColorPalette;
|
|
127
|
-
export type { ColorPaletteItemClickEventDetail };
|
|
136
|
+
export type { ColorPaletteItemClickEventDetail, IColorPaletteItem, };
|
package/dist/ColorPalette.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPalette.js","sourceRoot":"","sources":["../src/ColorPalette.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,kDAAkD,CAAC;AACrE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAE3E,OAAO,cAAc,MAAM,yDAAyD,CAAC;AACrF,OAAO,QAAQ,MAAM,gDAAgD,CAAC;AACtE,OAAO,sBAAsB,MAAM,8DAA8D,CAAC;AAClG,OAAO,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AACjE,OAAO,EACN,OAAO,EACP,OAAO,EACP,MAAM,EACN,IAAI,EACJ,SAAS,GACT,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,kDAAkD,CAAC;AAC9E,OAAO,oBAAoB,MAAM,mDAAmD,CAAC;AACrF,OAAO,0BAA0B,MAAM,yDAAyD,CAAC;AACjG,OAAO,gBAAgB,MAA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3B;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;kDACZ;AAOtB;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;oDACV;AAOxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;+CACR;AAapB;IAPC,IAAI,CAAC;QACL,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,WAAW;QACjB,uBAAuB,EAAE,IAAI;QAC7B,eAAe,EAAE,IAAI;KACrB,CAAC;4CAEgC;AA7D7B,YAAY;IA9BjB,aAAa,CAAC;QACd,GAAG,EAAE,mBAAmB;QACxB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,oBAAoB;QAC9B,kBAAkB,EAAE,0BAA0B;QAC9C,MAAM,EAAE,eAAe;QACvB,gBAAgB,EAAE,yBAAyB;QAC3C,IAAI,YAAY;YACf,MAAM,sBAAsB,GAAG,UAAU,CAAgC,wBAAwB,CAAC,CAAC;YACnG,OAAQ,CAAC,gBAAgB,EAAE,MAAM,CAA8B,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC,CAAC,sBAAsB,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAC3I,CAAC;KACD,CAAC;IAEF;;;;;;OAMG;;IACF,KAAK,CAAmC,YAAY,EAAE;QACtD,MAAM,EAAE;YACP;;eAEG;YACH,KAAK,EAAE;gBACN,IAAI,EAAE,MAAM;aACZ;SACD;KACD,CAAC;GACI,YAAY,CA0ZjB;AAED,YAAY,CAAC,MAAM,EAAE,CAAC;AAEtB,eAAe,YAAY,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport ItemNavigation from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport CSSColor from \"@ui5/webcomponents-base/dist/types/CSSColor.js\";\nimport ItemNavigationBehavior from \"@ui5/webcomponents-base/dist/types/ItemNavigationBehavior.js\";\nimport { isPhone } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport {\n\tisSpace,\n\tisEnter,\n\tisDown,\n\tisUp,\n\tisTabNext,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { getFeature } from \"@ui5/webcomponents-base/dist/FeaturesRegistry.js\";\nimport ColorPaletteTemplate from \"./generated/templates/ColorPaletteTemplate.lit.js\";\nimport ColorPaletteDialogTemplate from \"./generated/templates/ColorPaletteDialogTemplate.lit.js\";\nimport ColorPaletteItem from \"./ColorPaletteItem.js\";\nimport Button from \"./Button.js\";\nimport type Dialog from \"./Dialog.js\";\nimport type ColorPaletteMoreColors from \"./features/ColorPaletteMoreColors.js\";\nimport type ColorPicker from \"./ColorPicker.js\";\nimport type { IColorPaletteItem } from \"./Interfaces.js\";\n\nimport {\n\tCOLORPALETTE_CONTAINER_LABEL,\n\tCOLOR_PALETTE_MORE_COLORS_TEXT,\n\tCOLOR_PALETTE_DEFAULT_COLOR_TEXT,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport ColorPaletteCss from \"./generated/themes/ColorPalette.css.js\";\nimport ColorPaletteStaticAreaCss from \"./generated/themes/ColorPaletteStaticArea.css.js\";\n\ntype ColorPaletteNavigationItem = IColorPaletteItem | Button;\n\ntype ColorPaletteItemClickEventDetail = {\n\tcolor: string,\n}\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n * The <code>ui5-color-palette</code> provides the users with a range of predefined colors. The colors are fixed and do not change with the theme.\n *\n * <h3>Usage</h3>\n *\n * The <code>ui5-color-palette</code> is meant for users that need to select a color from a predefined set.\n * To define the colors, use the <code>ui5-color-palette-item</code> component inside the default slot of the <code>ui5-color-palette</code>.\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/ColorPalette.js\";</code>\n *\n * @constructor\n * @extends UI5Element\n * @since 1.0.0-rc.12\n * @public\n */\n@customElement({\n\ttag: \"ui5-color-palette\",\n\trenderer: litRender,\n\ttemplate: ColorPaletteTemplate,\n\tstaticAreaTemplate: ColorPaletteDialogTemplate,\n\tstyles: ColorPaletteCss,\n\tstaticAreaStyles: ColorPaletteStaticAreaCss,\n\tget dependencies() {\n\t\tconst colorPaletteMoreColors = getFeature<typeof ColorPaletteMoreColors>(\"ColorPaletteMoreColors\");\n\t\treturn ([ColorPaletteItem, Button] as Array<typeof UI5Element>).concat(colorPaletteMoreColors ? colorPaletteMoreColors.dependencies : []);\n\t},\n})\n\n/**\n * Fired when the user selects a color.\n *\n * @public\n * @since 1.0.0-rc.15\n * @param {string} color the selected color\n */\n@event<ColorPaletteItemClickEventDetail>(\"item-click\", {\n\tdetail: {\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tcolor: {\n\t\t\ttype: String,\n\t\t},\n\t},\n})\nclass ColorPalette extends UI5Element {\n\t/**\n\t * Defines whether the user can see the last used colors in the bottom of the component\n\t * @private\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ type: Boolean })\n\tshowRecentColors!: boolean;\n\n\t/**\n\t * Defines whether the user can choose a custom color from a color picker\n\t * <b>Note:</b> In order to use this property you need to import the following module: <code>\"@ui5/webcomponents/dist/features/ColorPaletteMoreColors.js\"</code>\n\t * @private\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ type: Boolean })\n\tshowMoreColors!: boolean;\n\n\t/**\n\t * Defines whether the user can choose the default color from a button.\n\t * @default false\n\t * @private\n\t * @since 1.0.0-rc.16\n\t */\n\t@property({ type: Boolean })\n\tshowDefaultColor!: boolean;\n\n\t/**\n\t * Defines the default color of the color palette\n\t * <b>Note:</b> The default color should be a part of the ColorPalette colors</code>\n\t * @private\n\t * @since 1.0.0-rc.16\n\t */\n\t@property({ validator: CSSColor })\n\tdefaultColor?: string;\n\n\t/**\n\t * Defines the selected color.\n\t * @private\n\t */\n\t@property({ validator: CSSColor })\n\t_selectedColor?: string;\n\n\t/**\n\t * Defines if the palette is in Popup or Embeded mode.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tpopupMode!: boolean;\n\n\t/**\n\t * Defines the <code>ui5-color-palette-item</code> elements.\n\t * @public\n\t */\n\t@slot({\n\t\t\"default\": true,\n\t\ttype: HTMLElement,\n\t\tinvalidateOnChildChange: true,\n\t\tindividualSlots: true,\n\t})\n\n\tcolors!: Array<IColorPaletteItem>;\n\n\t_itemNavigation: ItemNavigation;\n\t_itemNavigationRecentColors: ItemNavigation;\n\t_recentColors: Array<string>;\n\tmoreColorsFeature?: ColorPaletteMoreColors;\n\n\tstatic i18nBundle: I18nBundle;\n\n\tstatic async onDefine() {\n\t\tconst colorPaletteMoreColors = getFeature<typeof ColorPaletteMoreColors>(\"ColorPaletteMoreColors\");\n\n\t\t[ColorPalette.i18nBundle] = await Promise.all([\n\t\t\tgetI18nBundle(\"@ui5/webcomponents\"),\n\t\t\tcolorPaletteMoreColors ? colorPaletteMoreColors.init() : Promise.resolve(),\n\t\t]);\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._itemNavigation = new ItemNavigation(this, {\n\t\t\tgetItemsCallback: () => this.displayedColors,\n\t\t\trowSize: this.rowSize,\n\t\t\tbehavior: ItemNavigationBehavior.Cyclic,\n\t\t});\n\n\t\tthis._itemNavigationRecentColors = new ItemNavigation(this, {\n\t\t\tgetItemsCallback: () => this.recentColorsElements,\n\t\t\trowSize: this.rowSize,\n\t\t\tbehavior: ItemNavigationBehavior.Static,\n\t\t});\n\n\t\tthis._recentColors = [];\n\t}\n\n\tonBeforeRendering() {\n\t\tthis.displayedColors.forEach((item, index) => {\n\t\t\titem.index = index + 1;\n\t\t});\n\n\t\tif (this.showMoreColors) {\n\t\t\tconst ColorPaletteMoreColorsClass = getFeature<typeof ColorPaletteMoreColors>(\"ColorPaletteMoreColors\");\n\t\t\tif (ColorPaletteMoreColorsClass) {\n\t\t\t\tthis.moreColorsFeature = new ColorPaletteMoreColorsClass();\n\t\t\t} else {\n\t\t\t\tthrow new Error(`You have to import \"@ui5/webcomponents/dist/features/ColorPaletteMoreColors.js\" module to use the more-colors functionality.`);\n\t\t\t}\n\t\t}\n\t}\n\n\tonAfterRendering() {\n\t\tif (this.popupMode) {\n\t\t\tif (this.showDefaultColor) {\n\t\t\t\tthis.focusFirstFocusableElement();\n\t\t\t} else {\n\t\t\t\tthis.focusFirstDisplayColorElement();\n\t\t\t}\n\t\t}\n\t}\n\n\tselectColor(item: ColorPaletteItem) {\n\t\tif (!item.value) {\n\t\t\treturn;\n\t\t}\n\n\t\titem.focus();\n\n\t\tif (this.displayedColors.includes(item)) {\n\t\t\tthis._itemNavigation.setCurrentItem(item);\n\t\t}\n\n\t\tthis._setColor(item.value);\n\t}\n\n\t_setColor(color: string) {\n\t\tthis._selectedColor = color;\n\n\t\tif (this._recentColors[0] !== this._selectedColor) {\n\t\t\tif (this._recentColors.includes(this._selectedColor)) {\n\t\t\t\tthis._recentColors.unshift(this._recentColors.splice(this._recentColors.indexOf(this._selectedColor), 1)[0]);\n\t\t\t} else {\n\t\t\t\tthis._recentColors.unshift(this._selectedColor);\n\t\t\t}\n\t\t}\n\n\t\tthis.fireEvent<ColorPaletteItemClickEventDetail>(\"item-click\", {\n\t\t\tcolor: this._selectedColor,\n\t\t});\n\t}\n\n\t_onclick(e: MouseEvent) {\n\t\tconst target = e.target as ColorPaletteItem;\n\t\tif (target.hasAttribute(\"ui5-color-palette-item\")) {\n\t\t\tthis.selectColor(target);\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tconst target = e.target as ColorPaletteItem;\n\t\tif (isSpace(e) && target.hasAttribute(\"ui5-color-palette-item\")) {\n\t\t\te.preventDefault();\n\t\t\tthis.selectColor(target);\n\t\t}\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tconst target = e.target as ColorPaletteItem;\n\t\tif (isEnter(e) && target.hasAttribute(\"ui5-color-palette-item\")) {\n\t\t\tthis.selectColor(target);\n\t\t}\n\t}\n\n\t_onDefaultColorKeyDown(e: KeyboardEvent) {\n\t\tif (isTabNext(e) && this.popupMode) {\n\t\t\te.preventDefault();\n\t\t\tthis._onDefaultColorClick();\n\t\t}\n\n\t\tif (isDown(e)) {\n\t\t\te.stopPropagation();\n\n\t\t\tthis.focusColorElement(this.colorPaletteNavigationElements[1], this._itemNavigation);\n\t\t} else if (isUp(e)) {\n\t\t\te.stopPropagation();\n\t\t\tconst lastElementInNavigation = this.colorPaletteNavigationElements[this.colorPaletteNavigationElements.length - 1];\n\n\t\t\tif (this.hasRecentColors) {\n\t\t\t\tthis.focusColorElement(lastElementInNavigation, this._itemNavigationRecentColors);\n\t\t\t} else if (this.showMoreColors) {\n\t\t\t\tlastElementInNavigation.focus();\n\t\t\t} else {\n\t\t\t\tconst colorPaletteFocusIndex = (this.displayedColors.length % this.rowSize) * this.rowSize;\n\n\t\t\t\tthis.focusColorElement(this.displayedColors[colorPaletteFocusIndex], this._itemNavigation);\n\t\t\t}\n\t\t}\n\t}\n\n\t_onMoreColorsKeyDown(e: KeyboardEvent) {\n\t\tconst target = e.target as ColorPaletteItem;\n\t\tconst index = this.colorPaletteNavigationElements.indexOf(target);\n\t\tconst colorPaletteFocusIndex = (this.displayedColors.length % this.rowSize) * this.rowSize;\n\n\t\tif (isUp(e)) {\n\t\t\te.stopPropagation();\n\n\t\t\tthis.focusColorElement(this.displayedColors[colorPaletteFocusIndex], this._itemNavigation);\n\t\t} else if (isDown(e)) {\n\t\t\te.stopPropagation();\n\n\t\t\tif (this.hasRecentColors) {\n\t\t\t\tthis.focusColorElement(this.colorPaletteNavigationElements[index + 1], this._itemNavigationRecentColors);\n\t\t\t} else if (this.showDefaultColor) {\n\t\t\t\tthis.firstFocusableElement.focus();\n\t\t\t} else {\n\t\t\t\tthis.focusColorElement(this.displayedColors[0], this._itemNavigation);\n\t\t\t}\n\t\t}\n\t}\n\n\t_onColorContainerKeyDown(e: KeyboardEvent) {\n\t\tconst target = e.target as ColorPaletteItem;\n\t\tconst lastElementInNavigation = this.colorPaletteNavigationElements[this.colorPaletteNavigationElements.length - 1];\n\t\tif (isTabNext(e) && this.popupMode) {\n\t\t\te.preventDefault();\n\t\t\tthis.selectColor(target);\n\t\t}\n\n\t\tif (isUp(e) && target === this.displayedColors[0] && this.colorPaletteNavigationElements.length > 1) {\n\t\t\te.stopPropagation();\n\t\t\tif (this.showDefaultColor) {\n\t\t\t\tthis.firstFocusableElement.focus();\n\t\t\t} else if (!this.showDefaultColor && this.hasRecentColors) {\n\t\t\t\tthis.focusColorElement(lastElementInNavigation, this._itemNavigationRecentColors);\n\t\t\t} else if (!this.showDefaultColor && this.showMoreColors) {\n\t\t\t\tlastElementInNavigation.focus();\n\t\t\t}\n\t\t} else if (isDown(e) && target === this.displayedColors[this.displayedColors.length - 1] && this.colorPaletteNavigationElements.length > 1) {\n\t\t\te.stopPropagation();\n\t\t\tconst isRecentColorsNextElement = (this.showDefaultColor && !this.showMoreColors && this.hasRecentColors) || (!this.showDefaultColor && !this.showMoreColors && this.hasRecentColors);\n\n\t\t\tif (this.showDefaultColor && this.showMoreColors) {\n\t\t\t\tthis.colorPaletteNavigationElements[2].focus();\n\t\t\t} else if (this.showDefaultColor && !this.showMoreColors && (!this.showRecentColors || !this.recentColors[0])) {\n\t\t\t\tthis.firstFocusableElement.focus();\n\t\t\t} else if (isRecentColorsNextElement) {\n\t\t\t\tthis.focusColorElement(lastElementInNavigation, this._itemNavigationRecentColors);\n\t\t\t} else if (!this.showDefaultColor && this.showMoreColors) {\n\t\t\t\tthis.colorPaletteNavigationElements[1].focus();\n\t\t\t}\n\t\t}\n\t}\n\n\t_onRecentColorsContainerKeyDown(e: KeyboardEvent) {\n\t\tif (isUp(e)) {\n\t\t\tif (this.showMoreColors) {\n\t\t\t\tconst navigationElementsIndex = this.showDefaultColor ? 2 : 1;\n\t\t\t\tthis.colorPaletteNavigationElements[navigationElementsIndex].focus();\n\t\t\t} else if (!this.showMoreColors && this.colorPaletteNavigationElements.length > 1) {\n\t\t\t\tconst colorPaletteFocusIndex = (this.displayedColors.length % this.rowSize) * this.rowSize;\n\t\t\t\te.stopPropagation();\n\n\t\t\t\tthis.focusColorElement(this.displayedColors[colorPaletteFocusIndex], this._itemNavigation);\n\t\t\t}\n\t\t} else if (isDown(e)) {\n\t\t\tif (this.showDefaultColor) {\n\t\t\t\tthis.firstFocusableElement.focus();\n\t\t\t} else {\n\t\t\t\te.stopPropagation();\n\t\t\t\tthis.focusColorElement(this.displayedColors[0], this._itemNavigation);\n\t\t\t}\n\t\t}\n\t}\n\n\tfocusColorElement(element: ColorPaletteNavigationItem, itemNavigation: ItemNavigation) {\n\t\titemNavigation.setCurrentItem(element);\n\t\titemNavigation._focusCurrentItem();\n\t}\n\n\tfocusFirstDisplayColorElement() {\n\t\tthis.focusColorElement(this.displayedColors[0], this._itemNavigation);\n\t}\n\n\tfocusFirstFocusableElement() {\n\t\tthis.firstFocusableElement.focus();\n\t}\n\n\tget firstFocusableElement() {\n\t\treturn this.colorPaletteNavigationElements[0];\n\t}\n\n\tasync _chooseCustomColor() {\n\t\tconst colorPicker = await this.getColorPicker();\n\t\tthis._setColor(colorPicker.color);\n\t\tthis._closeDialog();\n\t}\n\n\tasync _closeDialog() {\n\t\tconst dialog = await this._getDialog();\n\t\tdialog.close();\n\t}\n\n\tasync _openMoreColorsDialog() {\n\t\tconst dialog = await this._getDialog();\n\t\tdialog.show();\n\t}\n\n\t_onDefaultColorClick() {\n\t\tif (this.defaultColor) {\n\t\t\tthis._setColor(this.defaultColor);\n\t\t}\n\t}\n\n\t/**\n\t * Returns the selected color.\n\t */\n\tget selectedColor() {\n\t\treturn this._selectedColor;\n\t}\n\n\tget displayedColors() {\n\t\tconst colors = this.getSlottedNodes<IColorPaletteItem>(\"colors\");\n\t\treturn colors.filter(item => item.value).slice(0, 15);\n\t}\n\n\tget colorContainerLabel() {\n\t\treturn ColorPalette.i18nBundle.getText(COLORPALETTE_CONTAINER_LABEL);\n\t}\n\n\tget colorPaletteMoreColorsText() {\n\t\treturn ColorPalette.i18nBundle.getText(COLOR_PALETTE_MORE_COLORS_TEXT);\n\t}\n\n\tget colorPaletteDefaultColorText() {\n\t\treturn ColorPalette.i18nBundle.getText(COLOR_PALETTE_DEFAULT_COLOR_TEXT);\n\t}\n\n\tget _showMoreColors() {\n\t\treturn this.showMoreColors && this.moreColorsFeature;\n\t}\n\n\tget rowSize() {\n\t\treturn 5;\n\t}\n\n\tget hasRecentColors() {\n\t\treturn this.showRecentColors && this.recentColors[0];\n\t}\n\n\tget recentColors() {\n\t\tif (this._recentColors.length > this.rowSize) {\n\t\t\tthis._recentColors = this._recentColors.slice(0, this.rowSize);\n\t\t}\n\n\t\twhile (this._recentColors.length < this.rowSize) {\n\t\t\tthis._recentColors.push(\"\");\n\t\t}\n\n\t\treturn this._recentColors;\n\t}\n\n\tget recentColorsElements(): Array<ColorPaletteItem> {\n\t\tconst domRef = this.getDomRef();\n\t\tif (domRef) {\n\t\t\treturn Array.from(domRef.querySelectorAll<ColorPaletteItem>(\".ui5-cp-recent-colors-wrapper [ui5-color-palette-item]\")).filter(x => x.value !== \"\");\n\t\t}\n\n\t\treturn [];\n\t}\n\n\tget colorPaletteNavigationElements() {\n\t\tconst navigationElements: Array<ColorPaletteNavigationItem> = [];\n\t\tconst rootElement = this.shadowRoot!.querySelector(\".ui5-cp-root\")!;\n\n\t\tif (this.showDefaultColor) {\n\t\t\tnavigationElements.push(rootElement.querySelector<Button>(\".ui5-cp-default-color-button\")!);\n\t\t}\n\n\t\tnavigationElements.push(this.displayedColors[0]);\n\n\t\tif (this.showMoreColors) {\n\t\t\tnavigationElements.push(rootElement.querySelector<Button>(\".ui5-cp-more-colors\")!);\n\t\t}\n\n\t\tif (this.showRecentColors && !!this.recentColorsElements.length) {\n\t\t\tnavigationElements.push(this.recentColorsElements[0]);\n\t\t}\n\n\t\treturn navigationElements;\n\t}\n\n\tget classes() {\n\t\treturn {\n\t\t\tcolorPaletteRoot: {\n\t\t\t\t\"ui5-cp-root\": true,\n\t\t\t\t\"ui5-cp-root-phone\": isPhone(),\n\t\t\t},\n\t\t};\n\t}\n\n\tasync _getDialog() {\n\t\tconst staticAreaItem = await this.getStaticAreaItemDomRef();\n\t\treturn staticAreaItem!.querySelector<Dialog>(\"[ui5-dialog]\")!;\n\t}\n\n\tasync getColorPicker() {\n\t\tconst dialog = await this._getDialog();\n\t\treturn dialog.content[0].querySelector<ColorPicker>(\"[ui5-color-picker]\")!;\n\t}\n}\n\nColorPalette.define();\n\nexport default ColorPalette;\nexport type { ColorPaletteItemClickEventDetail };\n"]}
|
|
1
|
+
{"version":3,"file":"ColorPalette.js","sourceRoot":"","sources":["../src/ColorPalette.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,kDAAkD,CAAC;AACrE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAE3E,OAAO,cAAc,MAAM,yDAAyD,CAAC;AAErF,OAAO,QAAQ,MAAM,gDAAgD,CAAC;AACtE,OAAO,sBAAsB,MAAM,8DAA8D,CAAC;AAClG,OAAO,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AACjE,OAAO,EACN,OAAO,EACP,OAAO,EACP,MAAM,EACN,IAAI,EACJ,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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.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport ItemNavigation from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport type { ITabbable } from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport CSSColor from \"@ui5/webcomponents-base/dist/types/CSSColor.js\";\nimport ItemNavigationBehavior from \"@ui5/webcomponents-base/dist/types/ItemNavigationBehavior.js\";\nimport { isPhone } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport {\n\tisSpace,\n\tisEnter,\n\tisDown,\n\tisUp,\n\tisTabNext,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { getFeature } from \"@ui5/webcomponents-base/dist/FeaturesRegistry.js\";\nimport ColorPaletteTemplate from \"./generated/templates/ColorPaletteTemplate.lit.js\";\nimport ColorPaletteDialogTemplate from \"./generated/templates/ColorPaletteDialogTemplate.lit.js\";\nimport ColorPaletteItem from \"./ColorPaletteItem.js\";\nimport Button from \"./Button.js\";\nimport type Dialog from \"./Dialog.js\";\nimport type ColorPaletteMoreColors from \"./features/ColorPaletteMoreColors.js\";\nimport type ColorPicker from \"./ColorPicker.js\";\n\nimport {\n\tCOLORPALETTE_CONTAINER_LABEL,\n\tCOLOR_PALETTE_MORE_COLORS_TEXT,\n\tCOLOR_PALETTE_DEFAULT_COLOR_TEXT,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport ColorPaletteCss from \"./generated/themes/ColorPalette.css.js\";\nimport ColorPaletteStaticAreaCss from \"./generated/themes/ColorPaletteStaticArea.css.js\";\n\n/**\n * Interface for components that may be used inside a <code>ui5-color-palette</code> or <code>ui5-color-palette-popover</code>\n *\n * @public\n */\ninterface IColorPaletteItem extends HTMLElement, ITabbable {\n\tvalue?: string,\n\tindex?: number,\n}\n\ntype ColorPaletteNavigationItem = IColorPaletteItem | Button;\n\ntype ColorPaletteItemClickEventDetail = {\n\tcolor: string,\n}\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n * The <code>ui5-color-palette</code> provides the users with a range of predefined colors. The colors are fixed and do not change with the theme.\n *\n * <h3>Usage</h3>\n *\n * The <code>ui5-color-palette</code> is meant for users that need to select a color from a predefined set.\n * To define the colors, use the <code>ui5-color-palette-item</code> component inside the default slot of the <code>ui5-color-palette</code>.\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/ColorPalette.js\";</code>\n *\n * @constructor\n * @extends UI5Element\n * @since 1.0.0-rc.12\n * @public\n */\n@customElement({\n\ttag: \"ui5-color-palette\",\n\trenderer: litRender,\n\ttemplate: ColorPaletteTemplate,\n\tstaticAreaTemplate: ColorPaletteDialogTemplate,\n\tstyles: ColorPaletteCss,\n\tstaticAreaStyles: ColorPaletteStaticAreaCss,\n\tget dependencies() {\n\t\tconst colorPaletteMoreColors = getFeature<typeof ColorPaletteMoreColors>(\"ColorPaletteMoreColors\");\n\t\treturn ([ColorPaletteItem, Button] as Array<typeof UI5Element>).concat(colorPaletteMoreColors ? colorPaletteMoreColors.dependencies : []);\n\t},\n})\n\n/**\n * Fired when the user selects a color.\n *\n * @public\n * @since 1.0.0-rc.15\n * @param {string} color the selected color\n */\n@event<ColorPaletteItemClickEventDetail>(\"item-click\", {\n\tdetail: {\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tcolor: {\n\t\t\ttype: String,\n\t\t},\n\t},\n})\nclass ColorPalette extends UI5Element {\n\t/**\n\t * Defines whether the user can see the last used colors in the bottom of the component\n\t * @private\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ type: Boolean })\n\tshowRecentColors!: boolean;\n\n\t/**\n\t * Defines whether the user can choose a custom color from a color picker\n\t * <b>Note:</b> In order to use this property you need to import the following module: <code>\"@ui5/webcomponents/dist/features/ColorPaletteMoreColors.js\"</code>\n\t * @private\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ type: Boolean })\n\tshowMoreColors!: boolean;\n\n\t/**\n\t * Defines whether the user can choose the default color from a button.\n\t * @default false\n\t * @private\n\t * @since 1.0.0-rc.16\n\t */\n\t@property({ type: Boolean })\n\tshowDefaultColor!: boolean;\n\n\t/**\n\t * Defines the default color of the color palette\n\t * <b>Note:</b> The default color should be a part of the ColorPalette colors</code>\n\t * @private\n\t * @since 1.0.0-rc.16\n\t */\n\t@property({ validator: CSSColor })\n\tdefaultColor?: string;\n\n\t/**\n\t * Defines the selected color.\n\t * @private\n\t */\n\t@property({ validator: CSSColor })\n\t_selectedColor?: string;\n\n\t/**\n\t * Defines if the palette is in Popup or Embeded mode.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tpopupMode!: boolean;\n\n\t/**\n\t * Defines the <code>ui5-color-palette-item</code> elements.\n\t * @public\n\t */\n\t@slot({\n\t\t\"default\": true,\n\t\ttype: HTMLElement,\n\t\tinvalidateOnChildChange: true,\n\t\tindividualSlots: true,\n\t})\n\n\tcolors!: Array<IColorPaletteItem>;\n\n\t_itemNavigation: ItemNavigation;\n\t_itemNavigationRecentColors: ItemNavigation;\n\t_recentColors: Array<string>;\n\tmoreColorsFeature?: ColorPaletteMoreColors;\n\n\tstatic i18nBundle: I18nBundle;\n\n\tstatic async onDefine() {\n\t\tconst colorPaletteMoreColors = getFeature<typeof ColorPaletteMoreColors>(\"ColorPaletteMoreColors\");\n\n\t\t[ColorPalette.i18nBundle] = await Promise.all([\n\t\t\tgetI18nBundle(\"@ui5/webcomponents\"),\n\t\t\tcolorPaletteMoreColors ? colorPaletteMoreColors.init() : Promise.resolve(),\n\t\t]);\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._itemNavigation = new ItemNavigation(this, {\n\t\t\tgetItemsCallback: () => this.displayedColors,\n\t\t\trowSize: this.rowSize,\n\t\t\tbehavior: ItemNavigationBehavior.Cyclic,\n\t\t});\n\n\t\tthis._itemNavigationRecentColors = new ItemNavigation(this, {\n\t\t\tgetItemsCallback: () => this.recentColorsElements,\n\t\t\trowSize: this.rowSize,\n\t\t\tbehavior: ItemNavigationBehavior.Static,\n\t\t});\n\n\t\tthis._recentColors = [];\n\t}\n\n\tonBeforeRendering() {\n\t\tthis.displayedColors.forEach((item, index) => {\n\t\t\titem.index = index + 1;\n\t\t});\n\n\t\tif (this.showMoreColors) {\n\t\t\tconst ColorPaletteMoreColorsClass = getFeature<typeof ColorPaletteMoreColors>(\"ColorPaletteMoreColors\");\n\t\t\tif (ColorPaletteMoreColorsClass) {\n\t\t\t\tthis.moreColorsFeature = new ColorPaletteMoreColorsClass();\n\t\t\t} else {\n\t\t\t\tthrow new Error(`You have to import \"@ui5/webcomponents/dist/features/ColorPaletteMoreColors.js\" module to use the more-colors functionality.`);\n\t\t\t}\n\t\t}\n\t}\n\n\tonAfterRendering() {\n\t\tif (this.popupMode) {\n\t\t\tif (this.showDefaultColor) {\n\t\t\t\tthis.focusFirstFocusableElement();\n\t\t\t} else {\n\t\t\t\tthis.focusFirstDisplayColorElement();\n\t\t\t}\n\t\t}\n\t}\n\n\tselectColor(item: ColorPaletteItem) {\n\t\tif (!item.value) {\n\t\t\treturn;\n\t\t}\n\n\t\titem.focus();\n\n\t\tif (this.displayedColors.includes(item)) {\n\t\t\tthis._itemNavigation.setCurrentItem(item);\n\t\t}\n\n\t\tthis._setColor(item.value);\n\t}\n\n\t_setColor(color: string) {\n\t\tthis._selectedColor = color;\n\n\t\tif (this._recentColors[0] !== this._selectedColor) {\n\t\t\tif (this._recentColors.includes(this._selectedColor)) {\n\t\t\t\tthis._recentColors.unshift(this._recentColors.splice(this._recentColors.indexOf(this._selectedColor), 1)[0]);\n\t\t\t} else {\n\t\t\t\tthis._recentColors.unshift(this._selectedColor);\n\t\t\t}\n\t\t}\n\n\t\tthis.fireEvent<ColorPaletteItemClickEventDetail>(\"item-click\", {\n\t\t\tcolor: this._selectedColor,\n\t\t});\n\t}\n\n\t_onclick(e: MouseEvent) {\n\t\tconst target = e.target as ColorPaletteItem;\n\t\tif (target.hasAttribute(\"ui5-color-palette-item\")) {\n\t\t\tthis.selectColor(target);\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tconst target = e.target as ColorPaletteItem;\n\t\tif (isSpace(e) && target.hasAttribute(\"ui5-color-palette-item\")) {\n\t\t\te.preventDefault();\n\t\t\tthis.selectColor(target);\n\t\t}\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tconst target = e.target as ColorPaletteItem;\n\t\tif (isEnter(e) && target.hasAttribute(\"ui5-color-palette-item\")) {\n\t\t\tthis.selectColor(target);\n\t\t}\n\t}\n\n\t_onDefaultColorKeyDown(e: KeyboardEvent) {\n\t\tif (isTabNext(e) && this.popupMode) {\n\t\t\te.preventDefault();\n\t\t\tthis._onDefaultColorClick();\n\t\t}\n\n\t\tif (isDown(e)) {\n\t\t\te.stopPropagation();\n\n\t\t\tthis.focusColorElement(this.colorPaletteNavigationElements[1], this._itemNavigation);\n\t\t} else if (isUp(e)) {\n\t\t\te.stopPropagation();\n\t\t\tconst lastElementInNavigation = this.colorPaletteNavigationElements[this.colorPaletteNavigationElements.length - 1];\n\n\t\t\tif (this.hasRecentColors) {\n\t\t\t\tthis.focusColorElement(lastElementInNavigation, this._itemNavigationRecentColors);\n\t\t\t} else if (this.showMoreColors) {\n\t\t\t\tlastElementInNavigation.focus();\n\t\t\t} else {\n\t\t\t\tconst colorPaletteFocusIndex = (this.displayedColors.length % this.rowSize) * this.rowSize;\n\n\t\t\t\tthis.focusColorElement(this.displayedColors[colorPaletteFocusIndex], this._itemNavigation);\n\t\t\t}\n\t\t}\n\t}\n\n\t_onMoreColorsKeyDown(e: KeyboardEvent) {\n\t\tconst target = e.target as ColorPaletteItem;\n\t\tconst index = this.colorPaletteNavigationElements.indexOf(target);\n\t\tconst colorPaletteFocusIndex = (this.displayedColors.length % this.rowSize) * this.rowSize;\n\n\t\tif (isUp(e)) {\n\t\t\te.stopPropagation();\n\n\t\t\tthis.focusColorElement(this.displayedColors[colorPaletteFocusIndex], this._itemNavigation);\n\t\t} else if (isDown(e)) {\n\t\t\te.stopPropagation();\n\n\t\t\tif (this.hasRecentColors) {\n\t\t\t\tthis.focusColorElement(this.colorPaletteNavigationElements[index + 1], this._itemNavigationRecentColors);\n\t\t\t} else if (this.showDefaultColor) {\n\t\t\t\tthis.firstFocusableElement.focus();\n\t\t\t} else {\n\t\t\t\tthis.focusColorElement(this.displayedColors[0], this._itemNavigation);\n\t\t\t}\n\t\t}\n\t}\n\n\t_onColorContainerKeyDown(e: KeyboardEvent) {\n\t\tconst target = e.target as ColorPaletteItem;\n\t\tconst lastElementInNavigation = this.colorPaletteNavigationElements[this.colorPaletteNavigationElements.length - 1];\n\t\tif (isTabNext(e) && this.popupMode) {\n\t\t\te.preventDefault();\n\t\t\tthis.selectColor(target);\n\t\t}\n\n\t\tif (isUp(e) && target === this.displayedColors[0] && this.colorPaletteNavigationElements.length > 1) {\n\t\t\te.stopPropagation();\n\t\t\tif (this.showDefaultColor) {\n\t\t\t\tthis.firstFocusableElement.focus();\n\t\t\t} else if (!this.showDefaultColor && this.hasRecentColors) {\n\t\t\t\tthis.focusColorElement(lastElementInNavigation, this._itemNavigationRecentColors);\n\t\t\t} else if (!this.showDefaultColor && this.showMoreColors) {\n\t\t\t\tlastElementInNavigation.focus();\n\t\t\t}\n\t\t} else if (isDown(e) && target === this.displayedColors[this.displayedColors.length - 1] && this.colorPaletteNavigationElements.length > 1) {\n\t\t\te.stopPropagation();\n\t\t\tconst isRecentColorsNextElement = (this.showDefaultColor && !this.showMoreColors && this.hasRecentColors) || (!this.showDefaultColor && !this.showMoreColors && this.hasRecentColors);\n\n\t\t\tif (this.showDefaultColor && this.showMoreColors) {\n\t\t\t\tthis.colorPaletteNavigationElements[2].focus();\n\t\t\t} else if (this.showDefaultColor && !this.showMoreColors && (!this.showRecentColors || !this.recentColors[0])) {\n\t\t\t\tthis.firstFocusableElement.focus();\n\t\t\t} else if (isRecentColorsNextElement) {\n\t\t\t\tthis.focusColorElement(lastElementInNavigation, this._itemNavigationRecentColors);\n\t\t\t} else if (!this.showDefaultColor && this.showMoreColors) {\n\t\t\t\tthis.colorPaletteNavigationElements[1].focus();\n\t\t\t}\n\t\t}\n\t}\n\n\t_onRecentColorsContainerKeyDown(e: KeyboardEvent) {\n\t\tif (isUp(e)) {\n\t\t\tif (this.showMoreColors) {\n\t\t\t\tconst navigationElementsIndex = this.showDefaultColor ? 2 : 1;\n\t\t\t\tthis.colorPaletteNavigationElements[navigationElementsIndex].focus();\n\t\t\t} else if (!this.showMoreColors && this.colorPaletteNavigationElements.length > 1) {\n\t\t\t\tconst colorPaletteFocusIndex = (this.displayedColors.length % this.rowSize) * this.rowSize;\n\t\t\t\te.stopPropagation();\n\n\t\t\t\tthis.focusColorElement(this.displayedColors[colorPaletteFocusIndex], this._itemNavigation);\n\t\t\t}\n\t\t} else if (isDown(e)) {\n\t\t\tif (this.showDefaultColor) {\n\t\t\t\tthis.firstFocusableElement.focus();\n\t\t\t} else {\n\t\t\t\te.stopPropagation();\n\t\t\t\tthis.focusColorElement(this.displayedColors[0], this._itemNavigation);\n\t\t\t}\n\t\t}\n\t}\n\n\tfocusColorElement(element: ColorPaletteNavigationItem, itemNavigation: ItemNavigation) {\n\t\titemNavigation.setCurrentItem(element);\n\t\titemNavigation._focusCurrentItem();\n\t}\n\n\tfocusFirstDisplayColorElement() {\n\t\tthis.focusColorElement(this.displayedColors[0], this._itemNavigation);\n\t}\n\n\tfocusFirstFocusableElement() {\n\t\tthis.firstFocusableElement.focus();\n\t}\n\n\tget firstFocusableElement() {\n\t\treturn this.colorPaletteNavigationElements[0];\n\t}\n\n\tasync _chooseCustomColor() {\n\t\tconst colorPicker = await this.getColorPicker();\n\t\tthis._setColor(colorPicker.color);\n\t\tthis._closeDialog();\n\t}\n\n\tasync _closeDialog() {\n\t\tconst dialog = await this._getDialog();\n\t\tdialog.close();\n\t}\n\n\tasync _openMoreColorsDialog() {\n\t\tconst dialog = await this._getDialog();\n\t\tdialog.show();\n\t}\n\n\t_onDefaultColorClick() {\n\t\tif (this.defaultColor) {\n\t\t\tthis._setColor(this.defaultColor);\n\t\t}\n\t}\n\n\t/**\n\t * Returns the selected color.\n\t */\n\tget selectedColor() {\n\t\treturn this._selectedColor;\n\t}\n\n\tget displayedColors() {\n\t\tconst colors = this.getSlottedNodes<IColorPaletteItem>(\"colors\");\n\t\treturn colors.filter(item => item.value).slice(0, 15);\n\t}\n\n\tget colorContainerLabel() {\n\t\treturn ColorPalette.i18nBundle.getText(COLORPALETTE_CONTAINER_LABEL);\n\t}\n\n\tget colorPaletteMoreColorsText() {\n\t\treturn ColorPalette.i18nBundle.getText(COLOR_PALETTE_MORE_COLORS_TEXT);\n\t}\n\n\tget colorPaletteDefaultColorText() {\n\t\treturn ColorPalette.i18nBundle.getText(COLOR_PALETTE_DEFAULT_COLOR_TEXT);\n\t}\n\n\tget _showMoreColors() {\n\t\treturn this.showMoreColors && this.moreColorsFeature;\n\t}\n\n\tget rowSize() {\n\t\treturn 5;\n\t}\n\n\tget hasRecentColors() {\n\t\treturn this.showRecentColors && this.recentColors[0];\n\t}\n\n\tget recentColors() {\n\t\tif (this._recentColors.length > this.rowSize) {\n\t\t\tthis._recentColors = this._recentColors.slice(0, this.rowSize);\n\t\t}\n\n\t\twhile (this._recentColors.length < this.rowSize) {\n\t\t\tthis._recentColors.push(\"\");\n\t\t}\n\n\t\treturn this._recentColors;\n\t}\n\n\tget recentColorsElements(): Array<ColorPaletteItem> {\n\t\tconst domRef = this.getDomRef();\n\t\tif (domRef) {\n\t\t\treturn Array.from(domRef.querySelectorAll<ColorPaletteItem>(\".ui5-cp-recent-colors-wrapper [ui5-color-palette-item]\")).filter(x => x.value !== \"\");\n\t\t}\n\n\t\treturn [];\n\t}\n\n\tget colorPaletteNavigationElements() {\n\t\tconst navigationElements: Array<ColorPaletteNavigationItem> = [];\n\t\tconst rootElement = this.shadowRoot!.querySelector(\".ui5-cp-root\")!;\n\n\t\tif (this.showDefaultColor) {\n\t\t\tnavigationElements.push(rootElement.querySelector<Button>(\".ui5-cp-default-color-button\")!);\n\t\t}\n\n\t\tnavigationElements.push(this.displayedColors[0]);\n\n\t\tif (this.showMoreColors) {\n\t\t\tnavigationElements.push(rootElement.querySelector<Button>(\".ui5-cp-more-colors\")!);\n\t\t}\n\n\t\tif (this.showRecentColors && !!this.recentColorsElements.length) {\n\t\t\tnavigationElements.push(this.recentColorsElements[0]);\n\t\t}\n\n\t\treturn navigationElements;\n\t}\n\n\tget classes() {\n\t\treturn {\n\t\t\tcolorPaletteRoot: {\n\t\t\t\t\"ui5-cp-root\": true,\n\t\t\t\t\"ui5-cp-root-phone\": isPhone(),\n\t\t\t},\n\t\t};\n\t}\n\n\tasync _getDialog() {\n\t\tconst staticAreaItem = await this.getStaticAreaItemDomRef();\n\t\treturn staticAreaItem!.querySelector<Dialog>(\"[ui5-dialog]\")!;\n\t}\n\n\tasync getColorPicker() {\n\t\tconst dialog = await this._getDialog();\n\t\treturn dialog.content[0].querySelector<ColorPicker>(\"[ui5-color-picker]\")!;\n\t}\n}\n\nColorPalette.define();\n\nexport default ColorPalette;\nexport type {\n\tColorPaletteItemClickEventDetail,\n\tIColorPaletteItem,\n};\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
2
|
import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
3
|
-
import type { IColorPaletteItem } from "./
|
|
3
|
+
import type { IColorPaletteItem } from "./ColorPalette.js";
|
|
4
4
|
/**
|
|
5
5
|
* @class
|
|
6
6
|
*
|
|
@@ -10,7 +10,6 @@ import type { IColorPaletteItem } from "./Interfaces.js";
|
|
|
10
10
|
*
|
|
11
11
|
* @constructor
|
|
12
12
|
* @extends UI5Element
|
|
13
|
-
* @abstract
|
|
14
13
|
* @since 1.0.0-rc.12
|
|
15
14
|
* @implements { IColorPaletteItem }
|
|
16
15
|
* @public
|
|
@@ -30,7 +29,7 @@ declare class ColorPaletteItem extends UI5Element implements IColorPaletteItem {
|
|
|
30
29
|
*
|
|
31
30
|
* @private
|
|
32
31
|
*/
|
|
33
|
-
|
|
32
|
+
forcedTabIndex: string;
|
|
34
33
|
/**
|
|
35
34
|
* Defines the index of the item inside of the ColorPalette.
|
|
36
35
|
*
|
package/dist/ColorPaletteItem.js
CHANGED
|
@@ -26,7 +26,6 @@ import ColorPaletteItemCss from "./generated/themes/ColorPaletteItem.css.js";
|
|
|
26
26
|
*
|
|
27
27
|
* @constructor
|
|
28
28
|
* @extends UI5Element
|
|
29
|
-
* @abstract
|
|
30
29
|
* @since 1.0.0-rc.12
|
|
31
30
|
* @implements { IColorPaletteItem }
|
|
32
31
|
* @public
|
|
@@ -58,7 +57,7 @@ __decorate([
|
|
|
58
57
|
], ColorPaletteItem.prototype, "value", void 0);
|
|
59
58
|
__decorate([
|
|
60
59
|
property({ defaultValue: "-1", noAttribute: true })
|
|
61
|
-
], ColorPaletteItem.prototype, "
|
|
60
|
+
], ColorPaletteItem.prototype, "forcedTabIndex", void 0);
|
|
62
61
|
__decorate([
|
|
63
62
|
property({ validator: Integer })
|
|
64
63
|
], ColorPaletteItem.prototype, "index", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPaletteItem.js","sourceRoot":"","sources":["../src/ColorPaletteItem.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD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I,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,OAAO,EAAE,CAAC;IACxB,CAAC;IAED,IAAI,UAAU;QACb,OAAO,kBAAgB,CAAC,UAAU,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC;IACtE,CAAC;IAED,IAAI,MAAM;QACT,OAAO;YACN,IAAI,EAAE;gBACL,kBAAkB,EAAE,IAAI,CAAC,KAAK;aAC9B;SACD,CAAC;IACH,CAAC;CACD,CAAA;AA3DA;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;+CACnB;AAQf;IADC,QAAQ,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;wDAC5B;AAQxB;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;+CAClB;AAQf;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;+CACZ;AAOhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;mDACR;AAzCf,gBAAgB;IANrB,aAAa,CAAC;QACd,GAAG,EAAE,wBAAwB;QAC7B,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,mBAAmB;QAC3B,QAAQ,EAAE,wBAAwB;KAClC,CAAC;GACI,gBAAgB,CAqErB;AAED,gBAAgB,CAAC,MAAM,EAAE,CAAC;AAE1B,eAAe,gBAAgB,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 litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport CSSColor from \"@ui5/webcomponents-base/dist/types/CSSColor.js\";\nimport { isPhone } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport Integer from \"@ui5/webcomponents-base/dist/types/Integer.js\";\nimport type { IColorPaletteItem } from \"./ColorPalette.js\";\nimport ColorPaletteItemTemplate from \"./generated/templates/ColorPaletteItemTemplate.lit.js\";\nimport {\n\tCOLORPALETTE_COLOR_LABEL,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport ColorPaletteItemCss from \"./generated/themes/ColorPaletteItem.css.js\";\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * The <code>ui5-color-palette-item</code> component represents a color in the the <code>ui5-color-palette</code>.\n *\n * @constructor\n * @extends UI5Element\n * @since 1.0.0-rc.12\n * @implements { IColorPaletteItem }\n * @public\n */\n@customElement({\n\ttag: \"ui5-color-palette-item\",\n\trenderer: litRender,\n\tstyles: ColorPaletteItemCss,\n\ttemplate: ColorPaletteItemTemplate,\n})\nclass ColorPaletteItem extends UI5Element implements IColorPaletteItem {\n\t/**\n\t * Defines the colour of the component.\n\t * <br><br>\n\t * <b>Note:</b> The value should be a valid CSS color.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property({ validator: CSSColor })\n\tvalue?: string;\n\n\t/**\n\t * Defines the tab-index of the element, helper information for the ItemNavigation.\n\t *\n\t * @private\n\t */\n\t@property({ defaultValue: \"-1\", noAttribute: true })\n\tforcedTabIndex!: string;\n\n\t/**\n\t * Defines the index of the item inside of the ColorPalette.\n\t *\n\t * @private\n\t */\n\t@property({ validator: Integer })\n\tindex?: number;\n\n\t/**\n\t * Defines if the ColorPalette is on phone mode.\n\t *\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tphone!: boolean;\n\n\t/**\n\t * @private\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ type: Boolean })\n\t_disabled!: boolean;\n\n\tstatic i18nBundle: I18nBundle;\n\n\tstatic async onDefine() {\n\t\tColorPaletteItem.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._disabled = !this.value;\n\t\tthis.phone = isPhone();\n\t}\n\n\tget colorLabel() {\n\t\treturn ColorPaletteItem.i18nBundle.getText(COLORPALETTE_COLOR_LABEL);\n\t}\n\n\tget styles() {\n\t\treturn {\n\t\t\troot: {\n\t\t\t\t\"background-color\": this.value,\n\t\t\t},\n\t\t};\n\t}\n}\n\nColorPaletteItem.define();\n\nexport default ColorPaletteItem;\n"]}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
2
|
import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
3
3
|
import ResponsivePopover from "./ResponsivePopover.js";
|
|
4
|
-
import type { ColorPaletteItemClickEventDetail } from "./ColorPalette.js";
|
|
4
|
+
import type { ColorPaletteItemClickEventDetail, IColorPaletteItem } from "./ColorPalette.js";
|
|
5
5
|
import type ColorPaletteItem from "./ColorPaletteItem.js";
|
|
6
|
-
import { IColorPaletteItem } from "./Interfaces.js";
|
|
7
6
|
type ColorPalettePopoverItemClickEventDetail = ColorPaletteItemClickEventDetail;
|
|
8
7
|
/**
|
|
9
8
|
* @class
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPalettePopover.js","sourceRoot":"","sources":["../src/ColorPalettePopover.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,YAAY,MAAM,oDAAoD,CAAC;AAC9E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,EAA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;mDACR;AAQ9B;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC;mDAClC;AA/D7B,mBAAmB;IAnCxB,aAAa,CAAC;QACd,GAAG,EAAE,2BAA2B;QAChC,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,CAAC,0BAA0B,EAAE,sBAAsB,CAAC;QAC5D,QAAQ,EAAE,2BAA2B;QACrC,YAAY,EAAE;YACb,iBAAiB;YACjB,MAAM;YACN,KAAK;YACL,YAAY;SACZ;KACD,CAAC;IAEF;;;;;OAKG;;IACF,KAAK,CAA0C,YAAY,EAAE;QAC7D,MAAM,EAAE;YACP;;eAEG;YACH,KAAK,EAAE;gBACN,IAAI,EAAE,MAAM;aACZ;SACD;KACD,CAAC;IACF;;;;OAIG;;IACF,KAAK,CAAC,OAAO,CAAC;GACT,mBAAmB,CAqJxB;AAED,mBAAmB,CAAC,MAAM,EAAE,CAAC;AAE7B,eAAe,mBAAmB,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport DOMReference from \"@ui5/webcomponents-base/dist/types/DOMReference.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.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport CSSColor from \"@ui5/webcomponents-base/dist/types/CSSColor.js\";\nimport ColorPalettePopoverTemplate from \"./generated/templates/ColorPalettePopoverTemplate.lit.js\";\n\n// Styles\nimport ColorPalettePopoverCss from \"./generated/themes/ColorPalettePopover.css.js\";\nimport ResponsivePopoverCommonCss from \"./generated/themes/ResponsivePopoverCommon.css.js\";\nimport {\n\tCOLORPALETTE_POPOVER_TITLE,\n\tCOLOR_PALETTE_DIALOG_CANCEL_BUTTON,\n} from \"./generated/i18n/i18n-defaults.js\";\n\nimport Button from \"./Button.js\";\nimport Title from \"./Title.js\";\nimport ResponsivePopover from \"./ResponsivePopover.js\";\nimport ColorPalette from \"./ColorPalette.js\";\nimport type { ColorPaletteItemClickEventDetail } from \"./ColorPalette.js\";\nimport type ColorPaletteItem from \"./ColorPaletteItem.js\";\nimport { IColorPaletteItem } from \"./Interfaces.js\";\n\ntype ColorPalettePopoverItemClickEventDetail = ColorPaletteItemClickEventDetail;\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n * Represents a predefined range of colors for easier selection.\n *\n * Overview\n * The ColorPalettePopover provides the users with a slot to predefine colors.\n *\n * You can customize them with the use of the colors property. You can specify a defaultColor and display a \"Default color\" button for the user to choose directly.\n * You can display a \"More colors...\" button that opens an additional color picker for the user to choose specific colors that are not present in the predefined range.\n *\n * <h3>Usage</h3>\n *\n * The palette is intended for users, who don't want to check and remember the different values of the colors and spend large amount of time to configure the right color through the color picker.\n *\n * For the <code>ui5-color-palette-popover</code>\n * <h3>ES6 Module Import</h3>\n *\n * <code>import @ui5/webcomponents/dist/ColorPalettePopover.js\";</code>\n *\n * @constructor\n * @extends UI5Element\n * @public\n * @since 1.0.0-rc.16\n */\n@customElement({\n\ttag: \"ui5-color-palette-popover\",\n\trenderer: litRender,\n\tstyles: [ResponsivePopoverCommonCss, ColorPalettePopoverCss],\n\ttemplate: ColorPalettePopoverTemplate,\n\tdependencies: [\n\t\tResponsivePopover,\n\t\tButton,\n\t\tTitle,\n\t\tColorPalette,\n\t],\n})\n\n/**\n * Fired when the user selects a color.\n *\n * @public\n * @param {string} color the selected color\n */\n@event<ColorPalettePopoverItemClickEventDetail>(\"item-click\", {\n\tdetail: {\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tcolor: {\n\t\t\ttype: String,\n\t\t},\n\t},\n})\n/**\n * Fired when the <code>ui5-color-palette-popover</code> is closed due to user interaction.\n * @since 1.21.0\n * @public\n */\n@event(\"close\")\nclass ColorPalettePopover extends UI5Element {\n\t/**\n\t * Defines whether the user can see the last used colors in the bottom of the component\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowRecentColors!: boolean;\n\n\t/**\n\t * Defines whether the user can choose a custom color from a component.\n\t * <b>Note:</b> In order to use this property you need to import the following module: <code>\"@ui5/webcomponents/dist/features/ColorPaletteMoreColors.js\"</code>\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowMoreColors!: boolean;\n\n\t/**\n\t * Defines whether the user can choose the default color from a button.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowDefaultColor!: boolean;\n\n\t/**\n\t * Defines the default color of the component.\n\t * <b>Note:</b> The default color should be a part of the ColorPalette colors</code>\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property({ validator: CSSColor })\n\tdefaultColor?: string;\n\n\t/**\n\t * Defines the open | closed state of the popover.\n\t * @public\n\t * @default false\n\t * @since 1.21.0\n\t */\n\t@property({ type: Boolean })\n\topen!: boolean;\n\n\t/**\n\t * Defines the ID or DOM Reference of the element that the popover is shown at.\n\t * @public\n\t * @default undefined\n\t * @since 1.21.0\n\t */\n\t@property({ validator: DOMReference })\n\topener?: HTMLElement | string;\n\n\t/**\n\t * Defines the content of the component.\n\t *\n\t * @public\n\t */\n\t@slot({ \"default\": true, type: HTMLElement, individualSlots: true })\n\tcolors!: Array<IColorPaletteItem>;\n\n\tstatic i18nBundle: I18nBundle;\n\n\tstatic async onDefine() {\n\t\tColorPalettePopover.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\tget responsivePopover() {\n\t\treturn this.shadowRoot!.querySelector<ResponsivePopover>(\"[ui5-responsive-popover]\")!;\n\t}\n\n\tget respPopover() {\n\t\treturn this.shadowRoot!.querySelector<ResponsivePopover>(\"[ui5-responsive-popover]\")!;\n\t}\n\n\t/**\n\t * Shows the ColorPalettePopover.\n\t *\n\t * @param opener the element that the popover is shown at\n\t * @public\n\t * @deprecated The method is deprecated in favour of <code>open</code> and <code>opener</code> properties.\n\t * @since 1.1.1\n\t */\n\tshowAt(opener: HTMLElement): void {\n\t\tconsole.warn(\"The method 'showAt' is deprecated and will be removed in future, use 'open' and 'opener' props instead.\"); // eslint-disable-line\n\t\tthis.open = true;\n\t\tthis.opener = opener;\n\t}\n\n\t/**\n\t * Shows the ColorPalettePopover.\n\t *\n\t * @param opener the element that the popover is shown at\n\t * @public\n\t * @since 1.0.0-rc.16\n\t * @deprecated The method is deprecated in favour of <code>open</code> and <code>opener</code> properties.\n\t */\n\topenPopover(opener: HTMLElement): void {\n\t\tconsole.warn(\"The method 'openPopover' is deprecated and will be removed in future, use 'open' and 'opener' props instead.\"); // eslint-disable-line\n\t\tthis.showAt(opener);\n\t}\n\n\tclosePopover() {\n\t\tthis.open = false;\n\t}\n\n\tonAfterClose() {\n\t\tthis.closePopover();\n\t\tthis.fireEvent(\"close\");\n\t}\n\n\tonSelectedColor(e: CustomEvent<ColorPaletteItemClickEventDetail>) {\n\t\tthis.closePopover();\n\t\tthis.fireEvent<ColorPalettePopoverItemClickEventDetail>(\"item-click\", e.detail);\n\t}\n\n\t/**\n\t * Returns if the component is opened.\n\t *\n\t * @protected\n\t * @since 1.0.0-rc.16\n\t */\n\tisOpen() {\n\t\treturn this.open;\n\t}\n\n\tget colorPaletteColors() {\n\t\treturn this.getSlottedNodes<ColorPaletteItem>(\"colors\");\n\t}\n\n\tget _colorPaletteTitle() {\n\t\treturn ColorPalettePopover.i18nBundle.getText(COLORPALETTE_POPOVER_TITLE);\n\t}\n\n\tget _cancelButtonLabel() {\n\t\treturn ColorPalettePopover.i18nBundle.getText(COLOR_PALETTE_DIALOG_CANCEL_BUTTON);\n\t}\n\n\tget _open() {\n\t\treturn this.open || undefined;\n\t}\n}\n\nColorPalettePopover.define();\n\nexport default ColorPalettePopover;\nexport type { ColorPalettePopoverItemClickEventDetail };\n"]}
|
|
1
|
+
{"version":3,"file":"ColorPalettePopover.js","sourceRoot":"","sources":["../src/ColorPalettePopover.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,YAAY,MAAM,oDAAoD,CAAC;AAC9E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAE3E,OAAO,QAAQ,MAAM,gDAAgD,CAAC;AACtE,OAAO,2BAA2B,MAAM,0DAA0D,CAAC;AAEnG,SAAS;AACT,OAAO,sBAAsB,MAAM,+CAA+C,CAAC;AACnF,OAAO,0BAA0B,MAAM,mDAAmD,CAAC;AAC3F,OAAO,EACN,0BAA0B,EAC1B,kCAAkC,GAClC,MAAM,mCAAmC,CAAC;AAE3C,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AACvD,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAM7C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAoCH,IAAM,mBAAmB,2BAAzB,MAAM,mBAAoB,SAAQ,UAAU;IAmE3C,MAAM,CAAC,KAAK,CAAC,QAAQ;QACpB,qBAAmB,CAAC,UAAU,GAAG,MAAM,aAAa,CAAC,oBAAoB,CAAC,CAAC;IAC5E,CAAC;IAED;QACC,KAAK,EAAE,CAAC;IACT,CAAC;IAED,IAAI,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;IACnF,CAAC;IAED,IAAI,KAAK;QACR,OAAO,IAAI,CAAC,IAAI,IAAI,SAAS,CAAC;IAC/B,CAAC;CACD,CAAA;AA7IA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;6DACD;AAU3B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;2DACH;AASzB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;6DACD;AAU3B;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;yDACZ;AAStB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;iDACb;AASf;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;mDACR;AAQ9B;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC;mDAClC;AA/D7B,mBAAmB;IAnCxB,aAAa,CAAC;QACd,GAAG,EAAE,2BAA2B;QAChC,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,CAAC,0BAA0B,EAAE,sBAAsB,CAAC;QAC5D,QAAQ,EAAE,2BAA2B;QACrC,YAAY,EAAE;YACb,iBAAiB;YACjB,MAAM;YACN,KAAK;YACL,YAAY;SACZ;KACD,CAAC;IAEF;;;;;OAKG;;IACF,KAAK,CAA0C,YAAY,EAAE;QAC7D,MAAM,EAAE;YACP;;eAEG;YACH,KAAK,EAAE;gBACN,IAAI,EAAE,MAAM;aACZ;SACD;KACD,CAAC;IACF;;;;OAIG;;IACF,KAAK,CAAC,OAAO,CAAC;GACT,mBAAmB,CAqJxB;AAED,mBAAmB,CAAC,MAAM,EAAE,CAAC;AAE7B,eAAe,mBAAmB,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport DOMReference from \"@ui5/webcomponents-base/dist/types/DOMReference.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.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport CSSColor from \"@ui5/webcomponents-base/dist/types/CSSColor.js\";\nimport ColorPalettePopoverTemplate from \"./generated/templates/ColorPalettePopoverTemplate.lit.js\";\n\n// Styles\nimport ColorPalettePopoverCss from \"./generated/themes/ColorPalettePopover.css.js\";\nimport ResponsivePopoverCommonCss from \"./generated/themes/ResponsivePopoverCommon.css.js\";\nimport {\n\tCOLORPALETTE_POPOVER_TITLE,\n\tCOLOR_PALETTE_DIALOG_CANCEL_BUTTON,\n} from \"./generated/i18n/i18n-defaults.js\";\n\nimport Button from \"./Button.js\";\nimport Title from \"./Title.js\";\nimport ResponsivePopover from \"./ResponsivePopover.js\";\nimport ColorPalette from \"./ColorPalette.js\";\nimport type { ColorPaletteItemClickEventDetail, IColorPaletteItem } from \"./ColorPalette.js\";\nimport type ColorPaletteItem from \"./ColorPaletteItem.js\";\n\ntype ColorPalettePopoverItemClickEventDetail = ColorPaletteItemClickEventDetail;\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n * Represents a predefined range of colors for easier selection.\n *\n * Overview\n * The ColorPalettePopover provides the users with a slot to predefine colors.\n *\n * You can customize them with the use of the colors property. You can specify a defaultColor and display a \"Default color\" button for the user to choose directly.\n * You can display a \"More colors...\" button that opens an additional color picker for the user to choose specific colors that are not present in the predefined range.\n *\n * <h3>Usage</h3>\n *\n * The palette is intended for users, who don't want to check and remember the different values of the colors and spend large amount of time to configure the right color through the color picker.\n *\n * For the <code>ui5-color-palette-popover</code>\n * <h3>ES6 Module Import</h3>\n *\n * <code>import @ui5/webcomponents/dist/ColorPalettePopover.js\";</code>\n *\n * @constructor\n * @extends UI5Element\n * @public\n * @since 1.0.0-rc.16\n */\n@customElement({\n\ttag: \"ui5-color-palette-popover\",\n\trenderer: litRender,\n\tstyles: [ResponsivePopoverCommonCss, ColorPalettePopoverCss],\n\ttemplate: ColorPalettePopoverTemplate,\n\tdependencies: [\n\t\tResponsivePopover,\n\t\tButton,\n\t\tTitle,\n\t\tColorPalette,\n\t],\n})\n\n/**\n * Fired when the user selects a color.\n *\n * @public\n * @param {string} color the selected color\n */\n@event<ColorPalettePopoverItemClickEventDetail>(\"item-click\", {\n\tdetail: {\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tcolor: {\n\t\t\ttype: String,\n\t\t},\n\t},\n})\n/**\n * Fired when the <code>ui5-color-palette-popover</code> is closed due to user interaction.\n * @since 1.21.0\n * @public\n */\n@event(\"close\")\nclass ColorPalettePopover extends UI5Element {\n\t/**\n\t * Defines whether the user can see the last used colors in the bottom of the component\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowRecentColors!: boolean;\n\n\t/**\n\t * Defines whether the user can choose a custom color from a component.\n\t * <b>Note:</b> In order to use this property you need to import the following module: <code>\"@ui5/webcomponents/dist/features/ColorPaletteMoreColors.js\"</code>\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowMoreColors!: boolean;\n\n\t/**\n\t * Defines whether the user can choose the default color from a button.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowDefaultColor!: boolean;\n\n\t/**\n\t * Defines the default color of the component.\n\t * <b>Note:</b> The default color should be a part of the ColorPalette colors</code>\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property({ validator: CSSColor })\n\tdefaultColor?: string;\n\n\t/**\n\t * Defines the open | closed state of the popover.\n\t * @public\n\t * @default false\n\t * @since 1.21.0\n\t */\n\t@property({ type: Boolean })\n\topen!: boolean;\n\n\t/**\n\t * Defines the ID or DOM Reference of the element that the popover is shown at.\n\t * @public\n\t * @default undefined\n\t * @since 1.21.0\n\t */\n\t@property({ validator: DOMReference })\n\topener?: HTMLElement | string;\n\n\t/**\n\t * Defines the content of the component.\n\t *\n\t * @public\n\t */\n\t@slot({ \"default\": true, type: HTMLElement, individualSlots: true })\n\tcolors!: Array<IColorPaletteItem>;\n\n\tstatic i18nBundle: I18nBundle;\n\n\tstatic async onDefine() {\n\t\tColorPalettePopover.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\tget responsivePopover() {\n\t\treturn this.shadowRoot!.querySelector<ResponsivePopover>(\"[ui5-responsive-popover]\")!;\n\t}\n\n\tget respPopover() {\n\t\treturn this.shadowRoot!.querySelector<ResponsivePopover>(\"[ui5-responsive-popover]\")!;\n\t}\n\n\t/**\n\t * Shows the ColorPalettePopover.\n\t *\n\t * @param opener the element that the popover is shown at\n\t * @public\n\t * @deprecated The method is deprecated in favour of <code>open</code> and <code>opener</code> properties.\n\t * @since 1.1.1\n\t */\n\tshowAt(opener: HTMLElement): void {\n\t\tconsole.warn(\"The method 'showAt' is deprecated and will be removed in future, use 'open' and 'opener' props instead.\"); // eslint-disable-line\n\t\tthis.open = true;\n\t\tthis.opener = opener;\n\t}\n\n\t/**\n\t * Shows the ColorPalettePopover.\n\t *\n\t * @param opener the element that the popover is shown at\n\t * @public\n\t * @since 1.0.0-rc.16\n\t * @deprecated The method is deprecated in favour of <code>open</code> and <code>opener</code> properties.\n\t */\n\topenPopover(opener: HTMLElement): void {\n\t\tconsole.warn(\"The method 'openPopover' is deprecated and will be removed in future, use 'open' and 'opener' props instead.\"); // eslint-disable-line\n\t\tthis.showAt(opener);\n\t}\n\n\tclosePopover() {\n\t\tthis.open = false;\n\t}\n\n\tonAfterClose() {\n\t\tthis.closePopover();\n\t\tthis.fireEvent(\"close\");\n\t}\n\n\tonSelectedColor(e: CustomEvent<ColorPaletteItemClickEventDetail>) {\n\t\tthis.closePopover();\n\t\tthis.fireEvent<ColorPalettePopoverItemClickEventDetail>(\"item-click\", e.detail);\n\t}\n\n\t/**\n\t * Returns if the component is opened.\n\t *\n\t * @protected\n\t * @since 1.0.0-rc.16\n\t */\n\tisOpen() {\n\t\treturn this.open;\n\t}\n\n\tget colorPaletteColors() {\n\t\treturn this.getSlottedNodes<ColorPaletteItem>(\"colors\");\n\t}\n\n\tget _colorPaletteTitle() {\n\t\treturn ColorPalettePopover.i18nBundle.getText(COLORPALETTE_POPOVER_TITLE);\n\t}\n\n\tget _cancelButtonLabel() {\n\t\treturn ColorPalettePopover.i18nBundle.getText(COLOR_PALETTE_DIALOG_CANCEL_BUTTON);\n\t}\n\n\tget _open() {\n\t\treturn this.open || undefined;\n\t}\n}\n\nColorPalettePopover.define();\n\nexport default ColorPalettePopover;\nexport type { ColorPalettePopoverItemClickEventDetail };\n"]}
|
package/dist/ComboBox.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import "@ui5/webcomponents-icons/dist/alert.js";
|
|
|
8
8
|
import "@ui5/webcomponents-icons/dist/sys-enter-2.js";
|
|
9
9
|
import "@ui5/webcomponents-icons/dist/information.js";
|
|
10
10
|
import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
11
|
-
import type { IIcon
|
|
11
|
+
import type { IIcon } from "./Icon.js";
|
|
12
12
|
import ComboBoxItem from "./ComboBoxItem.js";
|
|
13
13
|
import Popover from "./Popover.js";
|
|
14
14
|
import ResponsivePopover from "./ResponsivePopover.js";
|
|
@@ -17,6 +17,18 @@ import ComboBoxFilter from "./types/ComboBoxFilter.js";
|
|
|
17
17
|
import type FormSupportT from "./features/InputElementsFormSupport.js";
|
|
18
18
|
import PopoverHorizontalAlign from "./types/PopoverHorizontalAlign.js";
|
|
19
19
|
import { InputEventDetail } from "./Input.js";
|
|
20
|
+
/**
|
|
21
|
+
* Interface for components that may be slotted inside a <code>ui5-combobox</code>
|
|
22
|
+
*
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
interface IComboBoxItem {
|
|
26
|
+
text: string;
|
|
27
|
+
focused: boolean;
|
|
28
|
+
isGroupItem: boolean;
|
|
29
|
+
selected?: boolean;
|
|
30
|
+
additionalText?: string;
|
|
31
|
+
}
|
|
20
32
|
type ValueStateAnnouncement = Record<Exclude<ValueState, ValueState.None>, string>;
|
|
21
33
|
type ValueStateTypeAnnouncement = Record<Exclude<ValueState, ValueState.None>, string>;
|
|
22
34
|
type ComboBoxSelectionChangeEventDetail = {
|