@ui5/webcomponents 2.24.0-rc.3 → 2.25.0-rc.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 +33 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/Calendar.d.ts +0 -1
- package/dist/Calendar.js +0 -4
- package/dist/Calendar.js.map +1 -1
- package/dist/CalendarHeaderTemplate.js +1 -2
- package/dist/CalendarHeaderTemplate.js.map +1 -1
- package/dist/CalendarTemplate.js +2 -2
- package/dist/CalendarTemplate.js.map +1 -1
- package/dist/Carousel.js +3 -1
- package/dist/Carousel.js.map +1 -1
- package/dist/ColorPalette.d.ts +1 -0
- package/dist/ColorPalette.js +23 -12
- package/dist/ColorPalette.js.map +1 -1
- package/dist/ColorPalettePopover.js +6 -5
- package/dist/ColorPalettePopover.js.map +1 -1
- package/dist/ComboBox.d.ts +9 -5
- package/dist/ComboBox.js +10 -11
- package/dist/ComboBox.js.map +1 -1
- package/dist/ComboBoxItemCustom.d.ts +14 -1
- package/dist/ComboBoxItemCustom.js +14 -0
- package/dist/ComboBoxItemCustom.js.map +1 -1
- package/dist/DayPicker.d.ts +1 -0
- package/dist/DayPicker.js +10 -2
- package/dist/DayPicker.js.map +1 -1
- package/dist/Dialog.d.ts +39 -0
- package/dist/Dialog.js +107 -3
- package/dist/Dialog.js.map +1 -1
- package/dist/DialogTemplate.js +4 -2
- package/dist/DialogTemplate.js.map +1 -1
- package/dist/FileUploader.d.ts +5 -2
- package/dist/FileUploader.js +22 -1
- package/dist/FileUploader.js.map +1 -1
- package/dist/FileUploaderTemplate.js +3 -2
- package/dist/FileUploaderTemplate.js.map +1 -1
- package/dist/ListItem.js +1 -0
- package/dist/ListItem.js.map +1 -1
- package/dist/MultiComboBoxItemCustom.d.ts +13 -1
- package/dist/MultiComboBoxItemCustom.js +13 -0
- package/dist/MultiComboBoxItemCustom.js.map +1 -1
- package/dist/Popup.d.ts +2 -0
- package/dist/Popup.js +7 -1
- package/dist/Popup.js.map +1 -1
- package/dist/RadioButton.d.ts +2 -1
- package/dist/RadioButton.js +7 -1
- package/dist/RadioButton.js.map +1 -1
- package/dist/RadioButtonTemplate.js +1 -1
- package/dist/RadioButtonTemplate.js.map +1 -1
- package/dist/css/themes/Calendar.css +1 -1
- package/dist/css/themes/Dialog.css +1 -1
- package/dist/css/themes/SelectPopover.css +1 -1
- package/dist/css/themes/TableHeaderCell.css +1 -1
- package/dist/css/themes/TextArea.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_auto/parameters-bundle.css +3 -3
- package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hc_auto/parameters-bundle.css +3 -3
- package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -1
- package/dist/custom-elements-internal.json +97 -99
- package/dist/custom-elements.json +79 -39
- package/dist/generated/assets/i18n/messagebundle_ar.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_bg.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ca.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cnr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cs.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cy.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_da.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_de.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_el.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_GB.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_sappsd.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_saprigi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_saptrc.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_es.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_es_MX.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_et.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hu.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_id.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_it.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_iw.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ja.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_kk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ko.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_mk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ms.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_nl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_no.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt_PT.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ro.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ru.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sh.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_th.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_tr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_uk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_vi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_CN.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_TW.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_auto/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_hc_auto/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/i18n/i18n-defaults.d.ts +3 -1
- package/dist/generated/i18n/i18n-defaults.js +10 -8
- package/dist/generated/i18n/i18n-defaults.js.map +1 -1
- package/dist/generated/themes/Calendar.css.d.ts +1 -1
- package/dist/generated/themes/Calendar.css.js +1 -1
- package/dist/generated/themes/Calendar.css.js.map +1 -1
- package/dist/generated/themes/Dialog.css.d.ts +1 -1
- package/dist/generated/themes/Dialog.css.js +1 -1
- package/dist/generated/themes/Dialog.css.js.map +1 -1
- package/dist/generated/themes/SelectPopover.css.d.ts +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/TableHeaderCell.css.d.ts +1 -1
- package/dist/generated/themes/TableHeaderCell.css.js +1 -1
- package/dist/generated/themes/TableHeaderCell.css.js.map +1 -1
- package/dist/generated/themes/TextArea.css.d.ts +1 -1
- package/dist/generated/themes/TextArea.css.js +1 -1
- package/dist/generated/themes/TextArea.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js +3 -3
- package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.js +3 -3
- package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/vscode.html-custom-data.json +6 -1
- package/dist/web-types.json +12 -2
- package/package-scripts.cjs +1 -0
- package/package.json +11 -9
- package/src/CalendarHeaderTemplate.tsx +1 -2
- package/src/CalendarTemplate.tsx +2 -2
- package/src/DialogTemplate.tsx +13 -0
- package/src/FileUploaderTemplate.tsx +4 -0
- package/src/RadioButtonTemplate.tsx +1 -0
- package/src/i18n/messagebundle.properties +7 -0
- package/src/i18n/messagebundle_ar.properties +18 -4
- package/src/i18n/messagebundle_bg.properties +18 -4
- package/src/i18n/messagebundle_ca.properties +18 -4
- package/src/i18n/messagebundle_cnr.properties +18 -4
- package/src/i18n/messagebundle_cs.properties +18 -4
- package/src/i18n/messagebundle_cy.properties +18 -4
- package/src/i18n/messagebundle_da.properties +18 -4
- package/src/i18n/messagebundle_de.properties +18 -4
- package/src/i18n/messagebundle_el.properties +18 -4
- package/src/i18n/messagebundle_en.properties +18 -4
- package/src/i18n/messagebundle_en_GB.properties +18 -4
- package/src/i18n/messagebundle_en_US_sappsd.properties +18 -4
- package/src/i18n/messagebundle_en_US_saprigi.properties +18 -4
- package/src/i18n/messagebundle_en_US_saptrc.properties +18 -4
- package/src/i18n/messagebundle_es.properties +18 -4
- package/src/i18n/messagebundle_es_MX.properties +18 -4
- package/src/i18n/messagebundle_et.properties +18 -4
- package/src/i18n/messagebundle_fi.properties +18 -4
- package/src/i18n/messagebundle_fr.properties +18 -4
- package/src/i18n/messagebundle_fr_CA.properties +18 -4
- package/src/i18n/messagebundle_hi.properties +18 -4
- package/src/i18n/messagebundle_hr.properties +19 -5
- package/src/i18n/messagebundle_hu.properties +18 -4
- package/src/i18n/messagebundle_id.properties +18 -4
- package/src/i18n/messagebundle_it.properties +18 -4
- package/src/i18n/messagebundle_iw.properties +18 -4
- package/src/i18n/messagebundle_ja.properties +18 -4
- package/src/i18n/messagebundle_kk.properties +18 -4
- package/src/i18n/messagebundle_ko.properties +18 -4
- package/src/i18n/messagebundle_lt.properties +18 -4
- package/src/i18n/messagebundle_lv.properties +18 -4
- package/src/i18n/messagebundle_mk.properties +18 -4
- package/src/i18n/messagebundle_ms.properties +18 -4
- package/src/i18n/messagebundle_nl.properties +18 -4
- package/src/i18n/messagebundle_no.properties +18 -4
- package/src/i18n/messagebundle_pl.properties +18 -4
- package/src/i18n/messagebundle_pt.properties +18 -4
- package/src/i18n/messagebundle_pt_PT.properties +18 -4
- package/src/i18n/messagebundle_ro.properties +18 -4
- package/src/i18n/messagebundle_ru.properties +18 -4
- package/src/i18n/messagebundle_sh.properties +18 -4
- package/src/i18n/messagebundle_sk.properties +18 -4
- package/src/i18n/messagebundle_sl.properties +18 -4
- package/src/i18n/messagebundle_sr.properties +18 -4
- package/src/i18n/messagebundle_sv.properties +18 -4
- package/src/i18n/messagebundle_th.properties +18 -4
- package/src/i18n/messagebundle_tr.properties +18 -4
- package/src/i18n/messagebundle_uk.properties +18 -4
- package/src/i18n/messagebundle_vi.properties +18 -4
- package/src/i18n/messagebundle_zh_CN.properties +18 -4
- package/src/i18n/messagebundle_zh_TW.properties +18 -4
- package/src/themes/Calendar.css +6 -0
- package/src/themes/Dialog.css +22 -1
- package/src/themes/SelectPopover.css +13 -2
- package/src/themes/TableHeaderCell.css +1 -0
- package/src/themes/TextArea.css +1 -1
- package/src/themes/base/sizes-parameters.css +2 -3
- package/dist/types/ComboBoxSelectionChangeTrigger.d.ts +0 -25
- package/dist/types/ComboBoxSelectionChangeTrigger.js +0 -27
- package/dist/types/ComboBoxSelectionChangeTrigger.js.map +0 -1
|
@@ -95,14 +95,15 @@ let ColorPalettePopover = ColorPalettePopover_1 = class ColorPalettePopover exte
|
|
|
95
95
|
}
|
|
96
96
|
onAfterOpen() {
|
|
97
97
|
const colorPalette = this._colorPalette;
|
|
98
|
+
// Focus the last selected color (or first recent color) on reopen. The default color button
|
|
99
|
+
// and the first swatch are intentionally left to the popover's built-in initial focus: it
|
|
100
|
+
// already lands on them, and re-focusing those here fires on the "open" event a frame later,
|
|
101
|
+
// stealing focus back after the user has already started navigating with the keyboard.
|
|
98
102
|
if (colorPalette._currentlySelected) {
|
|
99
|
-
colorPalette._currentlySelected?.focus();
|
|
103
|
+
colorPalette._currentlySelected.getFocusDomRef()?.focus();
|
|
100
104
|
}
|
|
101
105
|
else if (colorPalette.showRecentColors && colorPalette.recentColorsElements.length) {
|
|
102
|
-
colorPalette.recentColorsElements[0].focus();
|
|
103
|
-
}
|
|
104
|
-
else if (colorPalette.showDefaultColor) {
|
|
105
|
-
colorPalette._defaultColorButton?.focus();
|
|
106
|
+
colorPalette.recentColorsElements[0].getFocusDomRef()?.focus();
|
|
106
107
|
}
|
|
107
108
|
// since height is dynamically determined by padding-block-start
|
|
108
109
|
(colorPalette.allColorsInPalette).forEach((item) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPalettePopover.js","sourceRoot":"","sources":["../src/ColorPalettePopover.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MA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ponents-base/dist/UI5Element.js\";\nimport type { DefaultSlot } 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-strict.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport DOMReferenceConverter from \"@ui5/webcomponents-base/dist/converters/DOMReference.js\";\nimport ColorPalettePopoverTemplate from \"./ColorPalettePopoverTemplate.js\";\nimport type PopoverPlacement from \"./types/PopoverPlacement.js\";\n\n// Styles\nimport ColorPalettePopoverCss from \"./generated/themes/ColorPalettePopover.css.js\";\nimport ResponsivePopoverCommonCss from \"./generated/themes/ResponsivePopoverCommon.css.js\";\nimport {\n\tCOLORPALETTE_POPOVER_TITLE,\n\tCOLOR_PALETTE_DIALOG_CANCEL_BUTTON,\n} from \"./generated/i18n/i18n-defaults.js\";\n\nimport type ResponsivePopover from \"./ResponsivePopover.js\";\nimport type ColorPalette from \"./ColorPalette.js\";\nimport type { ColorPaletteItemClickEventDetail, IColorPaletteItem } from \"./ColorPalette.js\";\nimport type ColorPaletteItem from \"./ColorPaletteItem.js\";\n\ntype ColorPalettePopoverItemClickEventDetail = ColorPaletteItemClickEventDetail;\n\n/**\n * @class\n *\n * ### Overview\n * Represents a predefined range of colors for easier selection.\n *\n * Overview\n * The ColorPalettePopover provides the users with a slot to predefine colors.\n *\n * You can customize them with the use of the colors property. You can specify a defaultColor and display a \"Default color\" button for the user to choose directly.\n * You can display a \"More colors...\" button that opens an additional color picker for the user to choose specific colors that are not present in the predefined range.\n *\n * ### Usage\n *\n * The palette is intended for users, who don't want to check and remember the different values of the colors and spend large amount of time to configure the right color through the color picker.\n *\n * For the `ui5-color-palette-popover`\n * ### ES6 Module Import\n *\n * `import @ui5/webcomponents/dist/ColorPalettePopover.js\";`\n * @constructor\n * @extends UI5Element\n * @public\n * @since 1.0.0-rc.16\n */\n@customElement({\n\ttag: \"ui5-color-palette-popover\",\n\trenderer: jsxRenderer,\n\tstyles: [ResponsivePopoverCommonCss, ColorPalettePopoverCss],\n\ttemplate: ColorPalettePopoverTemplate,\n})\n\n/**\n * Fired when the user selects a color.\n * @public\n * @param {string} color the selected color\n */\n@event(\"item-click\", {\n\tbubbles: true,\n})\n/**\n * Fired when the `ui5-color-palette-popover` is closed due to user interaction.\n * @since 1.21.0\n * @public\n */\n@event(\"close\", {\n\tbubbles: true,\n})\nclass ColorPalettePopover extends UI5Element {\n\teventDetails!: {\n\t\t\"item-click\": ColorPalettePopoverItemClickEventDetail,\n\t\t\"close\": void,\n\t}\n\n\t/**\n\t * Defines whether the user can see the last used colors in the bottom of the component\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowRecentColors = false\n\n\t/**\n\t * Defines whether the user can choose a custom color from a component.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowMoreColors = false\n\n\t/**\n\t * Defines whether the user can choose the default color from a button.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowDefaultColor = false\n\n\t/**\n\t * Defines the default color of the component.\n\t *\n\t * **Note:** The default color should be a part of the ColorPalette colors`\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tdefaultColor?: string;\n\n\t/**\n\t * Defines the accessible name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.20.0\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that label the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.20.0\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t * Defines the open | closed state of the popover.\n\t * @public\n\t * @default false\n\t * @since 1.21.0\n\t */\n\t@property({ type: Boolean })\n\topen = false\n\n\t/**\n\t * Defines the ID or DOM Reference of the element that the popover is shown at.\n\t * When using this attribute in a declarative way, you must only use the `id` (as a string) of the element at which you want to show the popover.\n\t * You can only set the `opener` attribute to a DOM Reference when using JavaScript.\n\t * @public\n\t * @default undefined\n\t * @since 1.21.0\n\t */\n\t@property({ converter: DOMReferenceConverter })\n\topener?: HTMLElement | string | null;\n\n\t/**\n\t * Determines on which side the component is placed at.\n\t * @default \"Bottom\"\n\t * @public\n\t * @since 2.19.0\n\t */\n\t@property()\n\tplacement: `${PopoverPlacement}` = \"Bottom\";\n\n\t/**\n\t * Defines the content of the component.\n\t * @public\n\t */\n\t@slot({ \"default\": true, type: HTMLElement, individualSlots: true })\n\tcolors!: DefaultSlot<IColorPaletteItem>;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\tget responsivePopover() {\n\t\treturn this.shadowRoot!.querySelector<ResponsivePopover>(\"[ui5-responsive-popover]\")!;\n\t}\n\n\tget respPopover() {\n\t\treturn this.shadowRoot!.querySelector<ResponsivePopover>(\"[ui5-responsive-popover]\")!;\n\t}\n\n\tclosePopover() {\n\t\tthis.open = false;\n\t}\n\n\tonAfterClose() {\n\t\tthis.closePopover();\n\t\tthis.fireDecoratorEvent(\"close\");\n\t}\n\n\tonAfterOpen() {\n\t\tconst colorPalette = this._colorPalette;\n\t\tif (colorPalette._currentlySelected) {\n\t\t\tcolorPalette._currentlySelected?.focus();\n\t\t} else if (colorPalette.showRecentColors && colorPalette.recentColorsElements.length) {\n\t\t\tcolorPalette.recentColorsElements[0].focus();\n\t\t} else if (colorPalette.showDefaultColor) {\n\t\t\tcolorPalette._defaultColorButton?.focus();\n\t\t}\n\n\t\t// since height is dynamically determined by padding-block-start\n\t\t(colorPalette.allColorsInPalette).forEach((item: ColorPaletteItem) => {\n\t\t\tconst itemHeight = item.offsetHeight + 4; // adding 4px for the offsets on top and bottom\n\t\t\titem.style.setProperty(\"--_ui5_color_palette_item_height\", `${itemHeight}px`);\n\t\t});\n\t}\n\n\tonSelectedColor(e: CustomEvent<ColorPaletteItemClickEventDetail>) {\n\t\tthis.closePopover();\n\t\tthis.fireDecoratorEvent(\"item-click\", e.detail);\n\t}\n\n\tget _colorPalette() {\n\t\treturn this.responsivePopover.content[0].querySelector<ColorPalette>(\"[ui5-color-palette]\")!;\n\t}\n\n\t/**\n\t * Returns if the component is opened.\n\t * @protected\n\t * @since 1.0.0-rc.16\n\t */\n\tisOpen() {\n\t\treturn this.open;\n\t}\n\n\tget colorPaletteColors() {\n\t\treturn this.getSlottedNodes<ColorPaletteItem>(\"colors\");\n\t}\n\n\tget _colorPaletteTitle() {\n\t\treturn ColorPalettePopover.i18nBundle.getText(COLORPALETTE_POPOVER_TITLE);\n\t}\n\n\tget _cancelButtonLabel() {\n\t\treturn ColorPalettePopover.i18nBundle.getText(COLOR_PALETTE_DIALOG_CANCEL_BUTTON);\n\t}\n\n\tget _open() {\n\t\treturn this.open || undefined;\n\t}\n}\n\nColorPalettePopover.define();\n\nexport default ColorPalettePopover;\nexport type { ColorPalettePopoverItemClickEventDetail };\n"]}
|
|
1
|
+
{"version":3,"file":"ColorPalettePopover.js","sourceRoot":"","sources":["../src/ColorPalettePopover.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,wDAAwD,CAAC;AAC1E,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,qBAAqB,MAAM,yDAAyD,CAAC;AAC5F,OAAO,2BAA2B,MAAM,kCAAkC,CAAC;AAG3E,S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AE,IAAI,EAAE,OAAO,EAAE,CAAC;2DACN;AAQtB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;6DACJ;AAUxB;IADC,QAAQ,EAAE;yDACW;AAStB;IADC,QAAQ,EAAE;2DACa;AASxB;IADC,QAAQ,EAAE;8DACgB;AAS3B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;iDAChB;AAWZ;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,qBAAqB,EAAE,CAAC;mDACV;AASrC;IADC,QAAQ,EAAE;sDACiC;AAO5C;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC;mDAC5B;AAGjC;IADN,IAAI,CAAC,oBAAoB,CAAC;6CACG;AAhGzB,mBAAmB;IAvBxB,aAAa,CAAC;QACd,GAAG,EAAE,2BAA2B;QAChC,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,CAAC,0BAA0B,EAAE,sBAAsB,CAAC;QAC5D,QAAQ,EAAE,2BAA2B;KACrC,CAAC;IAEF;;;;OAIG;;IACF,KAAK,CAAC,YAAY,EAAE;QACpB,OAAO,EAAE,IAAI;KACb,CAAC;IACF;;;;OAIG;;IACF,KAAK,CAAC,OAAO,EAAE;QACf,OAAO,EAAE,IAAI;KACb,CAAC;GACI,mBAAmB,CA4KxB;AAED,mBAAmB,CAAC,MAAM,EAAE,CAAC;AAE7B,eAAe,mBAAmB,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { DefaultSlot } 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-strict.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport DOMReferenceConverter from \"@ui5/webcomponents-base/dist/converters/DOMReference.js\";\nimport ColorPalettePopoverTemplate from \"./ColorPalettePopoverTemplate.js\";\nimport type PopoverPlacement from \"./types/PopoverPlacement.js\";\n\n// Styles\nimport ColorPalettePopoverCss from \"./generated/themes/ColorPalettePopover.css.js\";\nimport ResponsivePopoverCommonCss from \"./generated/themes/ResponsivePopoverCommon.css.js\";\nimport {\n\tCOLORPALETTE_POPOVER_TITLE,\n\tCOLOR_PALETTE_DIALOG_CANCEL_BUTTON,\n} from \"./generated/i18n/i18n-defaults.js\";\n\nimport type ResponsivePopover from \"./ResponsivePopover.js\";\nimport type ColorPalette from \"./ColorPalette.js\";\nimport type { ColorPaletteItemClickEventDetail, IColorPaletteItem } from \"./ColorPalette.js\";\nimport type ColorPaletteItem from \"./ColorPaletteItem.js\";\n\ntype ColorPalettePopoverItemClickEventDetail = ColorPaletteItemClickEventDetail;\n\n/**\n * @class\n *\n * ### Overview\n * Represents a predefined range of colors for easier selection.\n *\n * Overview\n * The ColorPalettePopover provides the users with a slot to predefine colors.\n *\n * You can customize them with the use of the colors property. You can specify a defaultColor and display a \"Default color\" button for the user to choose directly.\n * You can display a \"More colors...\" button that opens an additional color picker for the user to choose specific colors that are not present in the predefined range.\n *\n * ### Usage\n *\n * The palette is intended for users, who don't want to check and remember the different values of the colors and spend large amount of time to configure the right color through the color picker.\n *\n * For the `ui5-color-palette-popover`\n * ### ES6 Module Import\n *\n * `import @ui5/webcomponents/dist/ColorPalettePopover.js\";`\n * @constructor\n * @extends UI5Element\n * @public\n * @since 1.0.0-rc.16\n */\n@customElement({\n\ttag: \"ui5-color-palette-popover\",\n\trenderer: jsxRenderer,\n\tstyles: [ResponsivePopoverCommonCss, ColorPalettePopoverCss],\n\ttemplate: ColorPalettePopoverTemplate,\n})\n\n/**\n * Fired when the user selects a color.\n * @public\n * @param {string} color the selected color\n */\n@event(\"item-click\", {\n\tbubbles: true,\n})\n/**\n * Fired when the `ui5-color-palette-popover` is closed due to user interaction.\n * @since 1.21.0\n * @public\n */\n@event(\"close\", {\n\tbubbles: true,\n})\nclass ColorPalettePopover extends UI5Element {\n\teventDetails!: {\n\t\t\"item-click\": ColorPalettePopoverItemClickEventDetail,\n\t\t\"close\": void,\n\t}\n\n\t/**\n\t * Defines whether the user can see the last used colors in the bottom of the component\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowRecentColors = false\n\n\t/**\n\t * Defines whether the user can choose a custom color from a component.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowMoreColors = false\n\n\t/**\n\t * Defines whether the user can choose the default color from a button.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowDefaultColor = false\n\n\t/**\n\t * Defines the default color of the component.\n\t *\n\t * **Note:** The default color should be a part of the ColorPalette colors`\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tdefaultColor?: string;\n\n\t/**\n\t * Defines the accessible name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.20.0\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that label the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.20.0\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t * Defines the open | closed state of the popover.\n\t * @public\n\t * @default false\n\t * @since 1.21.0\n\t */\n\t@property({ type: Boolean })\n\topen = false\n\n\t/**\n\t * Defines the ID or DOM Reference of the element that the popover is shown at.\n\t * When using this attribute in a declarative way, you must only use the `id` (as a string) of the element at which you want to show the popover.\n\t * You can only set the `opener` attribute to a DOM Reference when using JavaScript.\n\t * @public\n\t * @default undefined\n\t * @since 1.21.0\n\t */\n\t@property({ converter: DOMReferenceConverter })\n\topener?: HTMLElement | string | null;\n\n\t/**\n\t * Determines on which side the component is placed at.\n\t * @default \"Bottom\"\n\t * @public\n\t * @since 2.19.0\n\t */\n\t@property()\n\tplacement: `${PopoverPlacement}` = \"Bottom\";\n\n\t/**\n\t * Defines the content of the component.\n\t * @public\n\t */\n\t@slot({ \"default\": true, type: HTMLElement, individualSlots: true })\n\tcolors!: DefaultSlot<IColorPaletteItem>;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\tget responsivePopover() {\n\t\treturn this.shadowRoot!.querySelector<ResponsivePopover>(\"[ui5-responsive-popover]\")!;\n\t}\n\n\tget respPopover() {\n\t\treturn this.shadowRoot!.querySelector<ResponsivePopover>(\"[ui5-responsive-popover]\")!;\n\t}\n\n\tclosePopover() {\n\t\tthis.open = false;\n\t}\n\n\tonAfterClose() {\n\t\tthis.closePopover();\n\t\tthis.fireDecoratorEvent(\"close\");\n\t}\n\n\tonAfterOpen() {\n\t\tconst colorPalette = this._colorPalette;\n\n\t\t// Focus the last selected color (or first recent color) on reopen. The default color button\n\t\t// and the first swatch are intentionally left to the popover's built-in initial focus: it\n\t\t// already lands on them, and re-focusing those here fires on the \"open\" event a frame later,\n\t\t// stealing focus back after the user has already started navigating with the keyboard.\n\t\tif (colorPalette._currentlySelected) {\n\t\t\tcolorPalette._currentlySelected.getFocusDomRef()?.focus();\n\t\t} else if (colorPalette.showRecentColors && colorPalette.recentColorsElements.length) {\n\t\t\tcolorPalette.recentColorsElements[0].getFocusDomRef()?.focus();\n\t\t}\n\n\t\t// since height is dynamically determined by padding-block-start\n\t\t(colorPalette.allColorsInPalette).forEach((item: ColorPaletteItem) => {\n\t\t\tconst itemHeight = item.offsetHeight + 4; // adding 4px for the offsets on top and bottom\n\t\t\titem.style.setProperty(\"--_ui5_color_palette_item_height\", `${itemHeight}px`);\n\t\t});\n\t}\n\n\tonSelectedColor(e: CustomEvent<ColorPaletteItemClickEventDetail>) {\n\t\tthis.closePopover();\n\t\tthis.fireDecoratorEvent(\"item-click\", e.detail);\n\t}\n\n\tget _colorPalette() {\n\t\treturn this.responsivePopover.content[0].querySelector<ColorPalette>(\"[ui5-color-palette]\")!;\n\t}\n\n\t/**\n\t * Returns if the component is opened.\n\t * @protected\n\t * @since 1.0.0-rc.16\n\t */\n\tisOpen() {\n\t\treturn this.open;\n\t}\n\n\tget colorPaletteColors() {\n\t\treturn this.getSlottedNodes<ColorPaletteItem>(\"colors\");\n\t}\n\n\tget _colorPaletteTitle() {\n\t\treturn ColorPalettePopover.i18nBundle.getText(COLORPALETTE_POPOVER_TITLE);\n\t}\n\n\tget _cancelButtonLabel() {\n\t\treturn ColorPalettePopover.i18nBundle.getText(COLOR_PALETTE_DIALOG_CANCEL_BUTTON);\n\t}\n\n\tget _open() {\n\t\treturn this.open || undefined;\n\t}\n}\n\nColorPalettePopover.define();\n\nexport default ColorPalettePopover;\nexport type { ColorPalettePopoverItemClickEventDetail };\n"]}
|
package/dist/ComboBox.d.ts
CHANGED
|
@@ -19,7 +19,6 @@ import type List from "./List.js";
|
|
|
19
19
|
import type { ListItemClickEventDetail } from "./List.js";
|
|
20
20
|
import "./ComboBoxItemGroup.js";
|
|
21
21
|
import type ComboBoxFilter from "./types/ComboBoxFilter.js";
|
|
22
|
-
import ComboBoxSelectionChangeTrigger from "./types/ComboBoxSelectionChangeTrigger.js";
|
|
23
22
|
import type { InputEventDetail } from "./Input.js";
|
|
24
23
|
import type { ListItemBaseClickEventDetail } from "./ListItemBase.js";
|
|
25
24
|
import type InputComposition from "./features/InputComposition.js";
|
|
@@ -43,9 +42,15 @@ interface IComboBoxItem extends UI5Element {
|
|
|
43
42
|
}
|
|
44
43
|
type ValueStateAnnouncement = Record<Exclude<ValueState, ValueState.None>, string>;
|
|
45
44
|
type ValueStateTypeAnnouncement = Record<Exclude<ValueState, ValueState.None>, string>;
|
|
45
|
+
/**
|
|
46
|
+
* Describes the source of a `selection-change` event fired by the `ui5-combobox`.
|
|
47
|
+
* @public
|
|
48
|
+
* @since 2.24.0
|
|
49
|
+
*/
|
|
50
|
+
type ComboBoxSelectionChangeTrigger = "Typeahead" | "Click" | "Keyboard";
|
|
46
51
|
type ComboBoxSelectionChangeEventDetail = {
|
|
47
52
|
item: ComboBoxItem | null;
|
|
48
|
-
trigger:
|
|
53
|
+
trigger: ComboBoxSelectionChangeTrigger;
|
|
49
54
|
};
|
|
50
55
|
/**
|
|
51
56
|
* @class
|
|
@@ -309,7 +314,7 @@ declare class ComboBox extends UI5Element implements IFormInputElement {
|
|
|
309
314
|
_autocomplete: boolean;
|
|
310
315
|
_isKeyNavigation: boolean;
|
|
311
316
|
_selectionPerformed: boolean;
|
|
312
|
-
_selectionTrigger?:
|
|
317
|
+
_selectionTrigger?: ComboBoxSelectionChangeTrigger;
|
|
313
318
|
_lastValue: string;
|
|
314
319
|
_selectedItemText: string;
|
|
315
320
|
_userTypedValue: string;
|
|
@@ -455,5 +460,4 @@ declare class ComboBox extends UI5Element implements IFormInputElement {
|
|
|
455
460
|
};
|
|
456
461
|
}
|
|
457
462
|
export default ComboBox;
|
|
458
|
-
export { ComboBoxSelectionChangeTrigger };
|
|
459
|
-
export type { ComboBoxSelectionChangeEventDetail, IComboBoxItem, };
|
|
463
|
+
export type { ComboBoxSelectionChangeEventDetail, ComboBoxSelectionChangeTrigger, IComboBoxItem, };
|
package/dist/ComboBox.js
CHANGED
|
@@ -44,7 +44,6 @@ import "./ComboBoxItemCustom.js";
|
|
|
44
44
|
import "./ComboBoxItemGroup.js";
|
|
45
45
|
// eslint-disable-next-line
|
|
46
46
|
import { isInstanceOfComboBoxItemGroup } from "./ComboBoxItemGroup.js";
|
|
47
|
-
import ComboBoxSelectionChangeTrigger from "./types/ComboBoxSelectionChangeTrigger.js";
|
|
48
47
|
const SKIP_ITEMS_SIZE = 10;
|
|
49
48
|
var ValueStateIconMapping;
|
|
50
49
|
(function (ValueStateIconMapping) {
|
|
@@ -593,7 +592,7 @@ let ComboBox = ComboBox_1 = class ComboBox extends UI5Element {
|
|
|
593
592
|
this._applyAtomicValueAndSelection(item, filterValue);
|
|
594
593
|
}
|
|
595
594
|
_handleArrowDown(e, indexOfItem) {
|
|
596
|
-
this._selectionTrigger =
|
|
595
|
+
this._selectionTrigger = "Keyboard";
|
|
597
596
|
const isOpen = this.open;
|
|
598
597
|
if (this.focused && indexOfItem === -1 && isOpen) {
|
|
599
598
|
this.focused = false;
|
|
@@ -609,7 +608,7 @@ let ComboBox = ComboBox_1 = class ComboBox extends UI5Element {
|
|
|
609
608
|
this._handleItemNavigation(e, itemIndexToBeFocused, true /* isForward */);
|
|
610
609
|
}
|
|
611
610
|
_handleArrowUp(e, indexOfItem) {
|
|
612
|
-
this._selectionTrigger =
|
|
611
|
+
this._selectionTrigger = "Keyboard";
|
|
613
612
|
const isOpen = this.open;
|
|
614
613
|
if (indexOfItem === 0) {
|
|
615
614
|
this._clearFocus();
|
|
@@ -624,7 +623,7 @@ let ComboBox = ComboBox_1 = class ComboBox extends UI5Element {
|
|
|
624
623
|
this._handleItemNavigation(e, --indexOfItem, false /* isForward */);
|
|
625
624
|
}
|
|
626
625
|
_handlePageUp(e, indexOfItem) {
|
|
627
|
-
this._selectionTrigger =
|
|
626
|
+
this._selectionTrigger = "Keyboard";
|
|
628
627
|
const allItems = this._getItems();
|
|
629
628
|
const isProposedIndexValid = indexOfItem - SKIP_ITEMS_SIZE > -1;
|
|
630
629
|
indexOfItem = isProposedIndexValid ? indexOfItem - SKIP_ITEMS_SIZE : 0;
|
|
@@ -632,7 +631,7 @@ let ComboBox = ComboBox_1 = class ComboBox extends UI5Element {
|
|
|
632
631
|
this._handleItemNavigation(e, indexOfItem, shouldMoveForward);
|
|
633
632
|
}
|
|
634
633
|
_handlePageDown(e, indexOfItem) {
|
|
635
|
-
this._selectionTrigger =
|
|
634
|
+
this._selectionTrigger = "Keyboard";
|
|
636
635
|
const allItems = this._getItems();
|
|
637
636
|
const itemsLength = allItems.length;
|
|
638
637
|
const isProposedIndexValid = indexOfItem + SKIP_ITEMS_SIZE < itemsLength;
|
|
@@ -641,12 +640,12 @@ let ComboBox = ComboBox_1 = class ComboBox extends UI5Element {
|
|
|
641
640
|
this._handleItemNavigation(e, indexOfItem, shouldMoveForward);
|
|
642
641
|
}
|
|
643
642
|
_handleHome(e) {
|
|
644
|
-
this._selectionTrigger =
|
|
643
|
+
this._selectionTrigger = "Keyboard";
|
|
645
644
|
const shouldMoveForward = isInstanceOfComboBoxItemGroup(this._filteredItems[0]) && !this.open;
|
|
646
645
|
this._handleItemNavigation(e, 0, shouldMoveForward);
|
|
647
646
|
}
|
|
648
647
|
_handleEnd(e) {
|
|
649
|
-
this._selectionTrigger =
|
|
648
|
+
this._selectionTrigger = "Keyboard";
|
|
650
649
|
this._handleItemNavigation(e, this._getItems().length - 1, true /* isForward */);
|
|
651
650
|
}
|
|
652
651
|
_keyup() {
|
|
@@ -934,7 +933,7 @@ let ComboBox = ComboBox_1 = class ComboBox extends UI5Element {
|
|
|
934
933
|
return;
|
|
935
934
|
}
|
|
936
935
|
if (previouslySelectedItem !== itemToBeSelected) {
|
|
937
|
-
const trigger = this._selectionTrigger ||
|
|
936
|
+
const trigger = this._selectionTrigger || "Typeahead";
|
|
938
937
|
this._selectionTrigger = undefined;
|
|
939
938
|
if (itemToBeSelected) {
|
|
940
939
|
this.fireDecoratorEvent("selection-change", {
|
|
@@ -995,7 +994,7 @@ let ComboBox = ComboBox_1 = class ComboBox extends UI5Element {
|
|
|
995
994
|
if (!item.selected) {
|
|
996
995
|
this.fireDecoratorEvent("selection-change", {
|
|
997
996
|
item,
|
|
998
|
-
trigger:
|
|
997
|
+
trigger: "Click",
|
|
999
998
|
});
|
|
1000
999
|
}
|
|
1001
1000
|
this._fireChangeEvent();
|
|
@@ -1410,7 +1409,8 @@ ComboBox = ComboBox_1 = __decorate([
|
|
|
1410
1409
|
/**
|
|
1411
1410
|
* Fired when selection is changed by user interaction
|
|
1412
1411
|
* @param {IComboBoxItem} item item to be selected.
|
|
1413
|
-
* @param {
|
|
1412
|
+
* @param {string} trigger source of the selection change - typeahead, click or keyboard navigation.
|
|
1413
|
+
* @since 2.24.0
|
|
1414
1414
|
* @public
|
|
1415
1415
|
*/
|
|
1416
1416
|
,
|
|
@@ -1420,5 +1420,4 @@ ComboBox = ComboBox_1 = __decorate([
|
|
|
1420
1420
|
], ComboBox);
|
|
1421
1421
|
ComboBox.define();
|
|
1422
1422
|
export default ComboBox;
|
|
1423
|
-
export { ComboBoxSelectionChangeTrigger };
|
|
1424
1423
|
//# sourceMappingURL=ComboBox.js.map
|