@ui5/webcomponents 2.20.0-rc.1 → 2.20.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/AvatarGroup.js +2 -0
  4. package/dist/AvatarGroup.js.map +1 -1
  5. package/dist/AvatarGroupTemplate.js +8 -1
  6. package/dist/AvatarGroupTemplate.js.map +1 -1
  7. package/dist/ComboBox.d.ts +19 -0
  8. package/dist/ComboBox.js +58 -2
  9. package/dist/ComboBox.js.map +1 -1
  10. package/dist/ComboBoxItem.d.ts +23 -0
  11. package/dist/ComboBoxItem.js +4 -0
  12. package/dist/ComboBoxItem.js.map +1 -1
  13. package/dist/ListItem.js +1 -1
  14. package/dist/ListItem.js.map +1 -1
  15. package/dist/Slider.d.ts +13 -20
  16. package/dist/Slider.js +48 -74
  17. package/dist/Slider.js.map +1 -1
  18. package/dist/SliderHandle.d.ts +61 -0
  19. package/dist/SliderHandle.js +104 -0
  20. package/dist/SliderHandle.js.map +1 -0
  21. package/dist/SliderHandleTemplate.d.ts +2 -0
  22. package/dist/SliderHandleTemplate.js +7 -0
  23. package/dist/SliderHandleTemplate.js.map +1 -0
  24. package/dist/SliderScale.d.ts +138 -0
  25. package/dist/SliderScale.js +300 -0
  26. package/dist/SliderScale.js.map +1 -0
  27. package/dist/SliderScaleTemplate.d.ts +2 -0
  28. package/dist/SliderScaleTemplate.js +11 -0
  29. package/dist/SliderScaleTemplate.js.map +1 -0
  30. package/dist/SliderTemplate.d.ts +0 -2
  31. package/dist/SliderTemplate.js +16 -14
  32. package/dist/SliderTemplate.js.map +1 -1
  33. package/dist/SliderTooltip.js +0 -4
  34. package/dist/SliderTooltip.js.map +1 -1
  35. package/dist/Tab.js +1 -1
  36. package/dist/Tab.js.map +1 -1
  37. package/dist/TabContainer.js +1 -1
  38. package/dist/TabContainer.js.map +1 -1
  39. package/dist/TableDragAndDrop.js +1 -1
  40. package/dist/TableDragAndDrop.js.map +1 -1
  41. package/dist/Tokenizer.js +16 -4
  42. package/dist/Tokenizer.js.map +1 -1
  43. package/dist/bundle.esm.js +2 -0
  44. package/dist/bundle.esm.js.map +1 -1
  45. package/dist/css/themes/AvatarGroup.css +1 -1
  46. package/dist/css/themes/ColorPicker.css +1 -1
  47. package/dist/css/themes/Form.css +1 -1
  48. package/dist/css/themes/FormItemSpan.css +1 -1
  49. package/dist/css/themes/ProgressIndicator.css +1 -1
  50. package/dist/css/themes/Slider.css +1 -0
  51. package/dist/css/themes/SliderHandle.css +1 -0
  52. package/dist/css/themes/SliderScale.css +1 -0
  53. package/dist/css/themes/sap_fiori_3/parameters-bundle.css +1 -1
  54. package/dist/css/themes/sap_fiori_3_dark/parameters-bundle.css +1 -1
  55. package/dist/css/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -1
  56. package/dist/css/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -1
  57. package/dist/css/themes/sap_horizon/parameters-bundle.css +1 -1
  58. package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -1
  59. package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -2
  60. package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -2
  61. package/dist/custom-elements-internal.json +127 -28
  62. package/dist/custom-elements.json +124 -28
  63. package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
  64. package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
  65. package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
  66. package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
  67. package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
  68. package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
  69. package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
  70. package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
  71. package/dist/generated/themes/AvatarGroup.css.d.ts +1 -1
  72. package/dist/generated/themes/AvatarGroup.css.js +1 -1
  73. package/dist/generated/themes/AvatarGroup.css.js.map +1 -1
  74. package/dist/generated/themes/ColorPicker.css.d.ts +1 -1
  75. package/dist/generated/themes/ColorPicker.css.js +1 -1
  76. package/dist/generated/themes/ColorPicker.css.js.map +1 -1
  77. package/dist/generated/themes/Form.css.d.ts +1 -1
  78. package/dist/generated/themes/Form.css.js +1 -1
  79. package/dist/generated/themes/Form.css.js.map +1 -1
  80. package/dist/generated/themes/FormItemSpan.css.d.ts +1 -1
  81. package/dist/generated/themes/FormItemSpan.css.js +1 -1
  82. package/dist/generated/themes/FormItemSpan.css.js.map +1 -1
  83. package/dist/generated/themes/ProgressIndicator.css.d.ts +1 -1
  84. package/dist/generated/themes/ProgressIndicator.css.js +1 -1
  85. package/dist/generated/themes/ProgressIndicator.css.js.map +1 -1
  86. package/dist/generated/themes/Slider.css.d.ts +2 -0
  87. package/dist/generated/themes/Slider.css.js +8 -0
  88. package/dist/generated/themes/Slider.css.js.map +1 -0
  89. package/dist/generated/themes/SliderHandle.css.d.ts +2 -0
  90. package/dist/generated/themes/SliderHandle.css.js +8 -0
  91. package/dist/generated/themes/SliderHandle.css.js.map +1 -0
  92. package/dist/generated/themes/SliderScale.css.d.ts +2 -0
  93. package/dist/generated/themes/SliderScale.css.js +8 -0
  94. package/dist/generated/themes/SliderScale.css.js.map +1 -0
  95. package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.d.ts +1 -1
  96. package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
  97. package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js.map +1 -1
  98. package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.d.ts +1 -1
  99. package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
  100. package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js.map +1 -1
  101. package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.d.ts +1 -1
  102. package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
  103. package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js.map +1 -1
  104. package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.d.ts +1 -1
  105. package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
  106. package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js.map +1 -1
  107. package/dist/generated/themes/sap_horizon/parameters-bundle.css.d.ts +1 -1
  108. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
  109. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
  110. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.d.ts +1 -1
  111. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -1
  112. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
  113. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.d.ts +1 -1
  114. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -2
  115. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
  116. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.d.ts +1 -1
  117. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -2
  118. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
  119. package/dist/vscode.html-custom-data.json +20 -5
  120. package/dist/web-types.json +42 -12
  121. package/package.json +9 -9
  122. package/src/AvatarGroupTemplate.tsx +8 -1
  123. package/src/SliderHandleTemplate.tsx +15 -0
  124. package/src/SliderScaleTemplate.tsx +32 -0
  125. package/src/SliderTemplate.tsx +85 -64
  126. package/src/themes/AvatarGroup.css +24 -0
  127. package/src/themes/ColorPicker.css +23 -27
  128. package/src/themes/FormItemSpan.css +1 -1
  129. package/src/themes/ProgressIndicator.css +1 -0
  130. package/src/themes/Slider.css +32 -0
  131. package/src/themes/SliderHandle.css +61 -0
  132. package/src/themes/SliderScale.css +149 -0
  133. package/src/themes/base/SliderHandle-parameters.css +3 -0
  134. package/src/themes/base/SliderScale-parameters.css +13 -0
  135. package/src/themes/sap_fiori_3/Slider-parameters.css +11 -0
  136. package/src/themes/sap_fiori_3/SliderHandle-parameters.css +5 -0
  137. package/src/themes/sap_fiori_3/SliderScale-parameters.css +13 -0
  138. package/src/themes/sap_fiori_3/parameters-bundle.css +2 -0
  139. package/src/themes/sap_fiori_3_dark/Slider-parameters.css +11 -0
  140. package/src/themes/sap_fiori_3_dark/SliderHandle-parameters.css +5 -0
  141. package/src/themes/sap_fiori_3_dark/SliderScale-parameters.css +13 -0
  142. package/src/themes/sap_fiori_3_dark/parameters-bundle.css +2 -0
  143. package/src/themes/sap_fiori_3_hcb/Slider-parameters.css +11 -0
  144. package/src/themes/sap_fiori_3_hcb/SliderHandle-parameters.css +5 -0
  145. package/src/themes/sap_fiori_3_hcb/SliderScale-parameters.css +14 -0
  146. package/src/themes/sap_fiori_3_hcb/parameters-bundle.css +2 -0
  147. package/src/themes/sap_fiori_3_hcw/Slider-parameters.css +11 -0
  148. package/src/themes/sap_fiori_3_hcw/SliderHandle-parameters.css +5 -0
  149. package/src/themes/sap_fiori_3_hcw/SliderScale-parameters.css +14 -0
  150. package/src/themes/sap_fiori_3_hcw/parameters-bundle.css +2 -0
  151. package/src/themes/sap_horizon/AvatarGroup-parameters.css +20 -3
  152. package/src/themes/sap_horizon/Slider-parameters.css +11 -0
  153. package/src/themes/sap_horizon/SliderHandle-parameters.css +5 -0
  154. package/src/themes/sap_horizon/SliderScale-parameters.css +10 -0
  155. package/src/themes/sap_horizon/parameters-bundle.css +3 -0
  156. package/src/themes/sap_horizon/rtl-parameters.css +4 -0
  157. package/src/themes/sap_horizon_dark/Slider-parameters.css +11 -0
  158. package/src/themes/sap_horizon_dark/SliderHandle-parameters.css +5 -0
  159. package/src/themes/sap_horizon_dark/SliderScale-parameters.css +10 -0
  160. package/src/themes/sap_horizon_dark/parameters-bundle.css +3 -0
  161. package/src/themes/sap_horizon_dark/rtl-parameters.css +6 -0
  162. package/src/themes/sap_horizon_hcb/Slider-parameters.css +11 -0
  163. package/src/themes/sap_horizon_hcb/SliderHandle-parameters.css +5 -0
  164. package/src/themes/sap_horizon_hcb/SliderScale-parameters.css +10 -0
  165. package/src/themes/sap_horizon_hcb/parameters-bundle.css +3 -1
  166. package/src/themes/sap_horizon_hcb/rtl-parameters.css +1 -0
  167. package/src/themes/sap_horizon_hcw/Slider-parameters.css +11 -0
  168. package/src/themes/sap_horizon_hcw/SliderHandle-parameters.css +5 -0
  169. package/src/themes/sap_horizon_hcw/SliderScale-parameters.css +10 -0
  170. package/src/themes/sap_horizon_hcw/parameters-bundle.css +3 -1
  171. package/src/themes/sap_horizon_hcw/rtl-parameters.css +1 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.js","sourceRoot":"","sources":["../src/ListItem.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,EACN,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,GAChC,MAAM,sCAAsC,CAAC;AAE9C,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,gBAAgB,MAAM,uDAAuD,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,wDAAwD,CAAC;AAClG,OAAO,EAAE,mBAAmB,EAAE,MAAM,uDAAuD,CAAC;AAE5F,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,IAAI,MAAM,wDAAwD,CAAC;AAC1E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,0CAA0C,CAAC;AAClD,OAAO,uCAAuC,CAAC;A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;QACrB,MAAM,EAAE;YACP,YAAY,CAAC,MAAM;YACnB,yBAAyB;YACzB,MAAM;SACN;KACD,CAAC;IACF;;;OAGG;;IACF,KAAK,CAAC,cAAc,EAAE;QACtB,OAAO,EAAE,IAAI;KACb,CAAC;IACD,KAAK,CAAC,qBAAqB,EAAE;QAC7B,OAAO,EAAE,IAAI;KACb,CAAC;GACa,QAAQ,CA2ctB;AAED,eAAe,QAAQ,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport {\n\tisSpace, isEnter, isDelete, isF2,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport getActiveElement from \"@ui5/webcomponents-base/dist/util/getActiveElement.js\";\nimport { getFirstFocusableElement } from \"@ui5/webcomponents-base/dist/util/FocusableElements.js\";\nimport { getTabbableElements } from \"@ui5/webcomponents-base/dist/util/TabbableElements.js\";\nimport type { AccessibilityAttributes, AriaRole, AriaHasPopup } from \"@ui5/webcomponents-base\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport \"@ui5/webcomponents-icons/dist/decline.js\";\nimport \"@ui5/webcomponents-icons/dist/edit.js\";\nimport DragRegistry from \"@ui5/webcomponents-base/dist/util/dragAndDrop/DragRegistry.js\";\nimport Highlight from \"./types/Highlight.js\";\nimport ListItemType from \"./types/ListItemType.js\";\nimport ListSelectionMode from \"./types/ListSelectionMode.js\";\nimport ListItemBase from \"./ListItemBase.js\";\nimport type RadioButton from \"./RadioButton.js\";\nimport type CheckBox from \"./CheckBox.js\";\nimport type { IButton } from \"./Button.js\";\nimport {\n\tDELETE,\n\tARIA_LABEL_LIST_ITEM_CHECKBOX,\n\tARIA_LABEL_LIST_ITEM_RADIO_BUTTON,\n\tLIST_ITEM_ACTIVE,\n\tLIST_ITEM_SELECTED,\n\tLIST_ITEM_NOT_SELECTED,\n} from \"./generated/i18n/i18n-defaults.js\";\nimport type ListItemAccessibleRole from \"./types/ListItemAccessibleRole.js\";\n\n// Styles\nimport styles from \"./generated/themes/ListItem.css.js\";\nimport listItemAdditionalTextCss from \"./generated/themes/ListItemAdditionalText.css.js\";\n\n// Icons\nimport \"@ui5/webcomponents-icons/dist/slim-arrow-right.js\";\nimport type { Slot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\n\ninterface IAccessibleListItem {\n\taccessibleName?: string;\n\taccessibleNameRef?: string;\n}\n\ntype SelectionRequestEventDetail = {\n\titem: ListItemBase,\n\tselectionComponentPressed: boolean,\n\tselected?: boolean,\n\tkey?: string,\n}\n\ntype AccInfo = {\n\trole?: AriaRole | undefined;\n\tariaExpanded?: boolean;\n\tariaLevel?: number;\n\tariaLabel: string;\n\tariaLabelRadioButton: string;\n\tariaSelectedText?: string;\n\tariaHaspopup?: `${AriaHasPopup}`;\n\tposinset?: number;\n\tsetsize?: number;\n\tariaSelected?: boolean;\n\tariaChecked?: boolean;\n\tlistItemAriaLabel?: string;\n\tariaOwns?: string;\n\ttooltip?: string;\n\tariaKeyShortcuts?: string;\n}\n\ntype ListItemAccessibilityAttributes = Pick<AccessibilityAttributes, \"hasPopup\" | \"ariaSetsize\" | \"ariaPosinset\">;\n\n/**\n * @class\n * A class to serve as a base\n * for the `ListItemStandard` and `ListItemCustom` classes.\n * @constructor\n * @abstract\n * @extends ListItemBase\n * @public\n */\n@customElement({\n\tlanguageAware: true,\n\trenderer: jsxRenderer,\n\tstyles: [\n\t\tListItemBase.styles,\n\t\tlistItemAdditionalTextCss,\n\t\tstyles,\n\t],\n})\n/**\n * Fired when the user clicks on the detail button when type is `Detail`.\n * @public\n */\n@event(\"detail-click\", {\n\tbubbles: true,\n})\n@event(\"selection-requested\", {\n\tbubbles: true,\n})\nabstract class ListItem extends ListItemBase {\n\teventDetails!: ListItemBase[\"eventDetails\"] & {\n\t\t\"detail-click\": { item: ListItem, selected: boolean };\n\t\t\"selection-requested\": SelectionRequestEventDetail,\n\t}\n\t/**\n\t * Defines the visual indication and behavior of the list items.\n\t * Available options are `Active` (by default), `Inactive`, `Detail` and `Navigation`.\n\t *\n\t * **Note:** When set to `Active` or `Navigation`, the item will provide visual response upon press and hover,\n\t * while with type `Inactive` and `Detail` - will not.\n\t * @default \"Active\"\n\t * @public\n\t*/\n\t@property()\n\ttype: `${ListItemType}` = \"Active\";\n\n\t/**\n\t * Defines the additional accessibility attributes that will be applied to the component.\n\t * The following fields are supported:\n\t *\n\t * - **ariaSetsize**: Defines the number of items in the current set when not all items in the set are present in the DOM.\n\t * **Note:** The value is an integer reflecting the number of items in the complete set. If the size of the entire set is unknown, set `-1`.\n\t *\n\t * \t- **ariaPosinset**: Defines an element's number or position in the current set when not all items are present in the DOM.\n\t * \t**Note:** The value is an integer greater than or equal to 1, and less than or equal to the size of the set when that size is known.\n\t *\n\t * @default {}\n\t * @public\n\t * @since 1.15.0\n\t */\n\t@property({ type: Object })\n\taccessibilityAttributes: ListItemAccessibilityAttributes = {};\n\n\t/**\n\t * The navigated state of the list item.\n\t * If set to `true`, a navigation indicator is displayed at the end of the list item.\n\t * @default false\n\t * @public\n\t * @since 1.10.0\n\t */\n\t@property({ type: Boolean })\n\tnavigated = false;\n\n\t/**\n\t * Defines the text of the tooltip that would be displayed for the list item.\n\t * @default undefined\n\t * @public\n\t * @since 1.23.0\n\t */\n\t@property()\n\ttooltip?: string;\n\n\t/**\n\t * Indicates if the list item is active, e.g pressed down with the mouse or the keyboard keys.\n\t * @private\n\t*/\n\t@property({ type: Boolean })\n\tactive = false;\n\n\t/**\n\t * Defines the highlight state of the list items.\n\t * Available options are: `\"None\"` (by default), `\"Positive\"`, `\"Critical\"`, `\"Information\"` and `\"Negative\"`.\n\t * @default \"None\"\n\t * @public\n\t * @since 1.24\n\t */\n\t@property()\n\thighlight: `${Highlight}` = \"None\";\n\n\t/**\n\t * Defines the selected state of the component.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdeclare selected: boolean;\n\n\t/**\n\t * Used to define the role of the list item.\n\t * @private\n\t * @default \"ListItem\"\n\t * @since 1.3.0\n\t *\n\t */\n\t@property()\n\taccessibleRole: `${ListItemAccessibleRole}` = \"ListItem\";\n\n\t@property()\n\t_forcedAccessibleRole?: string;\n\n\t@property()\n\t_selectionMode: `${ListSelectionMode}` = \"None\";\n\n\t/**\n\t * Defines the current media query size.\n\t * @default \"S\"\n\t * @private\n\t */\n\t@property()\n\tmediaRange = \"S\";\n\n\t/**\n\t * Defines the delete button, displayed in \"Delete\" mode.\n\t * **Note:** While the slot allows custom buttons, to match\n\t * design guidelines, please use the `ui5-button` component.\n\t * **Note:** When the slot is not present, a built-in delete button will be displayed.\n\t * @since 1.9.0\n\t * @public\n\t*/\n\t@slot()\n\tdeleteButton!: Slot<IButton>;\n\n\tdeactivateByKey: (e: KeyboardEvent) => void;\n\tdeactivate: () => void;\n\t// used in template, implemented in TreeItemBase, ListItemStandard\n\taccessibleName?: string;\n\t// used in ListItem template but implemented in TreeItemBase\n\tindeterminate?: boolean;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis.deactivateByKey = (e: KeyboardEvent) => {\n\t\t\tif (isEnter(e)) {\n\t\t\t\tthis.deactivate();\n\t\t\t}\n\t\t};\n\n\t\tthis.deactivate = () => {\n\t\t\tif (this.active) {\n\t\t\t\tthis.active = false;\n\t\t\t}\n\t\t};\n\t}\n\n\tonBeforeRendering() {\n\t\tsuper.onBeforeRendering();\n\t\tthis.actionable = (this.type === ListItemType.Active || this.type === ListItemType.Navigation) && (this._selectionMode !== ListSelectionMode.Delete);\n\t}\n\n\tonEnterDOM() {\n\t\tsuper.onEnterDOM();\n\t\tdocument.addEventListener(\"mouseup\", this.deactivate);\n\t\tdocument.addEventListener(\"touchend\", this.deactivate);\n\t\tdocument.addEventListener(\"keyup\", this.deactivateByKey);\n\t}\n\n\tonExitDOM() {\n\t\tdocument.removeEventListener(\"mouseup\", this.deactivate);\n\t\tdocument.removeEventListener(\"keyup\", this.deactivateByKey);\n\t\tdocument.removeEventListener(\"touchend\", this.deactivate);\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tconst isInternalElementFocused = e.target !== this.getFocusDomRef();\n\n\t\tif ((isSpace(e) || isEnter(e)) && isInternalElementFocused) {\n\t\t\treturn;\n\t\t}\n\n\t\tsuper._onkeydown(e);\n\n\t\tconst itemActive = this.type === ListItemType.Active,\n\t\t\titemNavigated = this.typeNavigation;\n\n\t\tif ((isSpace(e) || isEnter(e)) && (itemActive || itemNavigated)) {\n\t\t\tthis.activate();\n\t\t}\n\n\t\tif (isF2(e)) {\n\t\t\tthis._handleF2();\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tsuper._onkeyup(e);\n\n\t\tif (isSpace(e) || isEnter(e)) {\n\t\t\tthis.deactivate();\n\t\t}\n\n\t\tif (this.modeDelete && isDelete(e)) {\n\t\t\tthis.onDelete();\n\t\t}\n\t}\n\n\t_onmousedown() {\n\t\tthis.activate();\n\t}\n\n\t_onmouseup() {\n\t\tif (this.getFocusDomRef()!.matches(\":has(:focus-within)\")) {\n\t\t\treturn;\n\t\t}\n\t\tthis.deactivate();\n\t}\n\n\t_ontouchend() {\n\t\tthis._onmouseup();\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\tsuper._onfocusin(e);\n\n\t\tif (e.target !== this.getFocusDomRef()) {\n\t\t\tthis.deactivate();\n\t\t}\n\t}\n\n\t_onfocusout(e: FocusEvent) {\n\t\tif (e.target !== this.getFocusDomRef()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.deactivate();\n\t}\n\n\t_ondragstart(e: DragEvent) {\n\t\tif (!e.dataTransfer) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (e.target === this._listItem) {\n\t\t\tDragRegistry.setDraggedElement(this);\n\t\t\tthis.setAttribute(\"data-moving\", \"\");\n\t\t\te.dataTransfer.dropEffect = \"move\";\n\t\t\te.dataTransfer.effectAllowed = \"move\";\n\t\t}\n\t}\n\n\t_ondragend(e: DragEvent) {\n\t\tif (e.target === this._listItem) {\n\t\t\tDragRegistry.clearDraggedElement();\n\t\t\tthis.removeAttribute(\"data-moving\");\n\t\t}\n\t}\n\n\t/**\n\t * Called when selection components in Single (ui5-radio-button)\n\t * and Multi (ui5-checkbox) selection modes are used.\n\t */\n\tonMultiSelectionComponentPress(e: CustomEvent) {\n\t\tif (this.isInactive) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.fireDecoratorEvent(\"selection-requested\", { item: this, selected: (e.target as CheckBox).checked, selectionComponentPressed: true });\n\t}\n\n\tonSingleSelectionComponentPress(e: CustomEvent) {\n\t\tif (this.isInactive) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.fireDecoratorEvent(\"selection-requested\", { item: this, selected: !(e.target as RadioButton).checked, selectionComponentPressed: true });\n\t}\n\n\tactivate() {\n\t\tif (this.type === ListItemType.Active || this.type === ListItemType.Navigation) {\n\t\t\tthis.active = true;\n\t\t}\n\t}\n\n\tonDelete() {\n\t\tthis.fireDecoratorEvent(\"selection-requested\", { item: this, selectionComponentPressed: false });\n\t}\n\n\tonDetailClick() {\n\t\tthis.fireDecoratorEvent(\"detail-click\", { item: this, selected: this.selected });\n\t}\n\n\tfireItemPress(e: Event) {\n\t\tif (this.isInactive) {\n\t\t\treturn;\n\t\t}\n\t\tsuper.fireItemPress(e);\n\t\tif (document.activeElement !== this) {\n\t\t\tthis.focus();\n\t\t}\n\t}\n\n\tget isInactive() {\n\t\treturn this.type === ListItemType.Inactive || this.type === ListItemType.Detail;\n\t}\n\n\tget placeSelectionElementBefore() {\n\t\treturn this._selectionMode === ListSelectionMode.Multiple\n\t\t\t|| this._selectionMode === ListSelectionMode.SingleStart;\n\t}\n\n\tget placeSelectionElementAfter() {\n\t\treturn !this.placeSelectionElementBefore\n\t\t\t&& (this._selectionMode === ListSelectionMode.SingleEnd || this._selectionMode === ListSelectionMode.Delete);\n\t}\n\n\tget modeSingleSelect() {\n\t\treturn [\n\t\t\tListSelectionMode.SingleStart,\n\t\t\tListSelectionMode.SingleEnd,\n\t\t\tListSelectionMode.Single,\n\t\t].includes(this._selectionMode as ListSelectionMode);\n\t}\n\n\tget modeMultiple() {\n\t\treturn this._selectionMode === ListSelectionMode.Multiple;\n\t}\n\n\tget modeDelete() {\n\t\treturn this._selectionMode === ListSelectionMode.Delete;\n\t}\n\n\tget typeDetail() {\n\t\treturn this.type === ListItemType.Detail;\n\t}\n\n\tget typeNavigation() {\n\t\treturn this.type === ListItemType.Navigation;\n\t}\n\n\tget typeActive() {\n\t\treturn this.type === ListItemType.Active;\n\t}\n\n\tget _ariaSelected() {\n\t\tif (this.modeMultiple || this.modeSingleSelect) {\n\t\t\treturn this.selected;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tget listItemAccessibleRole() {\n\t\treturn (this._forcedAccessibleRole || this.accessibleRole.toLowerCase()) as AriaRole | undefined;\n\t}\n\n\tget ariaSelectedText() {\n\t\tlet ariaSelectedText;\n\n\t\t// Selected state needs to be supported separately since now the role mapping is list -> listitem[]\n\t\t// to avoid the issue of nesting interactive elements, ex. (option -> radio/checkbox);\n\t\t// The text is added to aria-describedby because as part of the aria-labelledby\n\t\t// the whole content of the item is readout when the aria-labelledby value is changed.\n\t\tif (this._ariaSelected !== undefined) {\n\t\t\tariaSelectedText = this._ariaSelected ? ListItem.i18nBundle.getText(LIST_ITEM_SELECTED) : ListItem.i18nBundle.getText(LIST_ITEM_NOT_SELECTED);\n\t\t}\n\n\t\treturn ariaSelectedText;\n\t}\n\n\tget deleteText() {\n\t\treturn ListItem.i18nBundle.getText(DELETE);\n\t}\n\n\tget hasDeleteButtonSlot() {\n\t\treturn !!this.deleteButton.length;\n\t}\n\n\tget _accessibleNameRef(): string {\n\t\tif ((this as IAccessibleListItem).accessibleName) {\n\t\t\t// accessibleName is set - return labels excluding content\n\t\t\treturn `${this._id}-invisibleText`;\n\t\t}\n\n\t\t// accessibleName is not set - return _accInfo.listItemAriaLabel including content\n\t\treturn `${this._id}-content ${this._id}-invisibleText`;\n\t}\n\n\tget ariaLabelledByText() {\n\t\tconst texts = [\n\t\t\tthis._accInfo.listItemAriaLabel,\n\t\t\tthis.accessibleName,\n\t\t\tthis.typeActive ? ListItem.i18nBundle.getText(LIST_ITEM_ACTIVE) : undefined,\n\t\t].filter(Boolean);\n\n\t\treturn texts.join(\" \");\n\t}\n\n\tget _accInfo(): AccInfo {\n\t\treturn {\n\t\t\trole: this.listItemAccessibleRole,\n\t\t\tariaExpanded: undefined,\n\t\t\tariaLevel: undefined,\n\t\t\tariaLabel: ListItem.i18nBundle.getText(ARIA_LABEL_LIST_ITEM_CHECKBOX),\n\t\t\tariaLabelRadioButton: ListItem.i18nBundle.getText(ARIA_LABEL_LIST_ITEM_RADIO_BUTTON),\n\t\t\tariaSelectedText: this.ariaSelectedText,\n\t\t\tariaHaspopup: this.accessibilityAttributes.hasPopup,\n\t\t\tsetsize: this.accessibilityAttributes.ariaSetsize,\n\t\t\tposinset: this.accessibilityAttributes.ariaPosinset,\n\t\t\ttooltip: this.tooltip,\n\t\t};\n\t}\n\n\tget _hasHighlightColor() {\n\t\treturn this.highlight !== Highlight.None;\n\t}\n\n\tget hasConfigurableMode() {\n\t\treturn true;\n\t}\n\n\tget _listItem() {\n\t\treturn this.shadowRoot!.querySelector(\"li\");\n\t}\n\n\tasync _handleF2() {\n\t\tconst focusDomRef = this.getFocusDomRef()!;\n\t\tconst activeElement = getActiveElement();\n\n\t\tconst focusables = this._getFocusableElements().length > 0;\n\t\tif (!focusables) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (activeElement === focusDomRef) {\n\t\t\tconst firstFocusable = await getFirstFocusableElement(focusDomRef);\n\t\t\tfirstFocusable?.focus();\n\t\t} else {\n\t\t\tfocusDomRef.focus();\n\t\t}\n\t}\n\n\t_getFocusableElements(): HTMLElement[] {\n\t\tconst focusDomRef = this.getFocusDomRef()!;\n\t\treturn getTabbableElements(focusDomRef);\n\t}\n\n\t_getFocusedElementIndex(): number {\n\t\tconst focusables = this._getFocusableElements();\n\t\tconst activeElement = getActiveElement() as HTMLElement;\n\t\treturn focusables.indexOf(activeElement);\n\t}\n\n\t_hasFocusableElements(): boolean {\n\t\treturn this._getFocusableElements().length > 0;\n\t}\n\n\t_isFocusOnInternalElement(): boolean {\n\t\tconst focusables = this._getFocusableElements();\n\t\tconst currentElementIndex = focusables.indexOf(getActiveElement() as HTMLElement);\n\t\treturn currentElementIndex !== -1;\n\t}\n\n\t_focusInternalElement(targetIndex: number) {\n\t\tconst focusables = this._getFocusableElements();\n\t\tif (!focusables.length) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst safeIndex = Math.min(targetIndex, focusables.length - 1);\n\t\tconst elementToFocus = focusables[safeIndex];\n\n\t\telementToFocus.focus();\n\n\t\treturn safeIndex;\n\t}\n}\n\nexport default ListItem;\nexport type {\n\tIAccessibleListItem,\n\tSelectionRequestEventDetail,\n\tListItemAccessibilityAttributes,\n};\n"]}
1
+ {"version":3,"file":"ListItem.js","sourceRoot":"","sources":["../src/ListItem.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,EACN,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,GAChC,MAAM,sCAAsC,CAAC;AAE9C,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,gBAAgB,MAAM,uDAAuD,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,wDAAwD,CAAC;AAClG,OAAO,EAAE,mBAAmB,EAAE,MAAM,uDAAuD,CAAC;AAE5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AG/B;IADC,QAAQ,EAAE;gDACqC;AAQhD;IADC,QAAQ,EAAE;4CACM;AAWjB;IADC,IAAI,EAAE;8CACsB;AAUtB;IADN,IAAI,CAAC,oBAAoB,CAAC;kCACG;AAzHhB,QAAQ;IAnBtB,aAAa,CAAC;QACd,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE;YACP,YAAY,CAAC,MAAM;YACnB,yBAAyB;YACzB,MAAM;SACN;KACD,CAAC;IACF;;;OAGG;;IACF,KAAK,CAAC,cAAc,EAAE;QACtB,OAAO,EAAE,IAAI;KACb,CAAC;IACD,KAAK,CAAC,qBAAqB,EAAE;QAC7B,OAAO,EAAE,IAAI;KACb,CAAC;GACa,QAAQ,CA2ctB;AAED,eAAe,QAAQ,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport {\n\tisSpace, isEnter, isDelete, isF2,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport getActiveElement from \"@ui5/webcomponents-base/dist/util/getActiveElement.js\";\nimport { getFirstFocusableElement } from \"@ui5/webcomponents-base/dist/util/FocusableElements.js\";\nimport { getTabbableElements } from \"@ui5/webcomponents-base/dist/util/TabbableElements.js\";\nimport type { AccessibilityAttributes, AriaRole, AriaHasPopup } from \"@ui5/webcomponents-base\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport \"@ui5/webcomponents-icons/dist/decline.js\";\nimport \"@ui5/webcomponents-icons/dist/edit.js\";\nimport DragRegistry from \"@ui5/webcomponents-base/dist/util/dragAndDrop/DragRegistry.js\";\nimport Highlight from \"./types/Highlight.js\";\nimport ListItemType from \"./types/ListItemType.js\";\nimport ListSelectionMode from \"./types/ListSelectionMode.js\";\nimport ListItemBase from \"./ListItemBase.js\";\nimport type RadioButton from \"./RadioButton.js\";\nimport type CheckBox from \"./CheckBox.js\";\nimport type { IButton } from \"./Button.js\";\nimport {\n\tDELETE,\n\tARIA_LABEL_LIST_ITEM_CHECKBOX,\n\tARIA_LABEL_LIST_ITEM_RADIO_BUTTON,\n\tLIST_ITEM_ACTIVE,\n\tLIST_ITEM_SELECTED,\n\tLIST_ITEM_NOT_SELECTED,\n} from \"./generated/i18n/i18n-defaults.js\";\nimport type ListItemAccessibleRole from \"./types/ListItemAccessibleRole.js\";\n\n// Styles\nimport styles from \"./generated/themes/ListItem.css.js\";\nimport listItemAdditionalTextCss from \"./generated/themes/ListItemAdditionalText.css.js\";\n\n// Icons\nimport \"@ui5/webcomponents-icons/dist/slim-arrow-right.js\";\nimport type { Slot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\n\ninterface IAccessibleListItem {\n\taccessibleName?: string;\n\taccessibleNameRef?: string;\n}\n\ntype SelectionRequestEventDetail = {\n\titem: ListItemBase,\n\tselectionComponentPressed: boolean,\n\tselected?: boolean,\n\tkey?: string,\n}\n\ntype AccInfo = {\n\trole?: AriaRole | undefined;\n\tariaExpanded?: boolean;\n\tariaLevel?: number;\n\tariaLabel: string;\n\tariaLabelRadioButton: string;\n\tariaSelectedText?: string;\n\tariaHaspopup?: `${AriaHasPopup}`;\n\tposinset?: number;\n\tsetsize?: number;\n\tariaSelected?: boolean;\n\tariaChecked?: boolean;\n\tlistItemAriaLabel?: string;\n\tariaOwns?: string;\n\ttooltip?: string;\n\tariaKeyShortcuts?: string;\n}\n\ntype ListItemAccessibilityAttributes = Pick<AccessibilityAttributes, \"hasPopup\" | \"ariaSetsize\" | \"ariaPosinset\">;\n\n/**\n * @class\n * A class to serve as a base\n * for the `ListItemStandard` and `ListItemCustom` classes.\n * @constructor\n * @abstract\n * @extends ListItemBase\n * @public\n */\n@customElement({\n\tlanguageAware: true,\n\trenderer: jsxRenderer,\n\tstyles: [\n\t\tListItemBase.styles,\n\t\tlistItemAdditionalTextCss,\n\t\tstyles,\n\t],\n})\n/**\n * Fired when the user clicks on the detail button when type is `Detail`.\n * @public\n */\n@event(\"detail-click\", {\n\tbubbles: true,\n})\n@event(\"selection-requested\", {\n\tbubbles: true,\n})\nabstract class ListItem extends ListItemBase {\n\teventDetails!: ListItemBase[\"eventDetails\"] & {\n\t\t\"detail-click\": { item: ListItem, selected: boolean };\n\t\t\"selection-requested\": SelectionRequestEventDetail,\n\t}\n\t/**\n\t * Defines the visual indication and behavior of the list items.\n\t * Available options are `Active` (by default), `Inactive`, `Detail` and `Navigation`.\n\t *\n\t * **Note:** When set to `Active` or `Navigation`, the item will provide visual response upon press and hover,\n\t * while with type `Inactive` and `Detail` - will not.\n\t * @default \"Active\"\n\t * @public\n\t*/\n\t@property()\n\ttype: `${ListItemType}` = \"Active\";\n\n\t/**\n\t * Defines the additional accessibility attributes that will be applied to the component.\n\t * The following fields are supported:\n\t *\n\t * - **ariaSetsize**: Defines the number of items in the current set when not all items in the set are present in the DOM.\n\t * **Note:** The value is an integer reflecting the number of items in the complete set. If the size of the entire set is unknown, set `-1`.\n\t *\n\t * \t- **ariaPosinset**: Defines an element's number or position in the current set when not all items are present in the DOM.\n\t * \t**Note:** The value is an integer greater than or equal to 1, and less than or equal to the size of the set when that size is known.\n\t *\n\t * @default {}\n\t * @public\n\t * @since 1.15.0\n\t */\n\t@property({ type: Object })\n\taccessibilityAttributes: ListItemAccessibilityAttributes = {};\n\n\t/**\n\t * The navigated state of the list item.\n\t * If set to `true`, a navigation indicator is displayed at the end of the list item.\n\t * @default false\n\t * @public\n\t * @since 1.10.0\n\t */\n\t@property({ type: Boolean })\n\tnavigated = false;\n\n\t/**\n\t * Defines the text of the tooltip that would be displayed for the list item.\n\t * @default undefined\n\t * @public\n\t * @since 1.23.0\n\t */\n\t@property()\n\ttooltip?: string;\n\n\t/**\n\t * Indicates if the list item is active, e.g pressed down with the mouse or the keyboard keys.\n\t * @private\n\t*/\n\t@property({ type: Boolean })\n\tactive = false;\n\n\t/**\n\t * Defines the highlight state of the list items.\n\t * Available options are: `\"None\"` (by default), `\"Positive\"`, `\"Critical\"`, `\"Information\"` and `\"Negative\"`.\n\t * @default \"None\"\n\t * @public\n\t * @since 1.24\n\t */\n\t@property()\n\thighlight: `${Highlight}` = \"None\";\n\n\t/**\n\t * Defines the selected state of the component.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdeclare selected: boolean;\n\n\t/**\n\t * Used to define the role of the list item.\n\t * @private\n\t * @default \"ListItem\"\n\t * @since 1.3.0\n\t *\n\t */\n\t@property()\n\taccessibleRole: `${ListItemAccessibleRole}` = \"ListItem\";\n\n\t@property()\n\t_forcedAccessibleRole?: string;\n\n\t@property()\n\t_selectionMode: `${ListSelectionMode}` = \"None\";\n\n\t/**\n\t * Defines the current media query size.\n\t * @default \"S\"\n\t * @private\n\t */\n\t@property()\n\tmediaRange = \"S\";\n\n\t/**\n\t * Defines the delete button, displayed in \"Delete\" mode.\n\t * **Note:** While the slot allows custom buttons, to match\n\t * design guidelines, please use the `ui5-button` component.\n\t * **Note:** When the slot is not present, a built-in delete button will be displayed.\n\t * @since 1.9.0\n\t * @public\n\t*/\n\t@slot()\n\tdeleteButton!: Slot<IButton>;\n\n\tdeactivateByKey: (e: KeyboardEvent) => void;\n\tdeactivate: () => void;\n\t// used in template, implemented in TreeItemBase, ListItemStandard\n\taccessibleName?: string;\n\t// used in ListItem template but implemented in TreeItemBase\n\tindeterminate?: boolean;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis.deactivateByKey = (e: KeyboardEvent) => {\n\t\t\tif (isEnter(e)) {\n\t\t\t\tthis.deactivate();\n\t\t\t}\n\t\t};\n\n\t\tthis.deactivate = () => {\n\t\t\tif (this.active) {\n\t\t\t\tthis.active = false;\n\t\t\t}\n\t\t};\n\t}\n\n\tonBeforeRendering() {\n\t\tsuper.onBeforeRendering();\n\t\tthis.actionable = (this.type === ListItemType.Active || this.type === ListItemType.Navigation) && (this._selectionMode !== ListSelectionMode.Delete);\n\t}\n\n\tonEnterDOM() {\n\t\tsuper.onEnterDOM();\n\t\tdocument.addEventListener(\"mouseup\", this.deactivate);\n\t\tdocument.addEventListener(\"touchend\", this.deactivate);\n\t\tdocument.addEventListener(\"keyup\", this.deactivateByKey);\n\t}\n\n\tonExitDOM() {\n\t\tdocument.removeEventListener(\"mouseup\", this.deactivate);\n\t\tdocument.removeEventListener(\"keyup\", this.deactivateByKey);\n\t\tdocument.removeEventListener(\"touchend\", this.deactivate);\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tconst isInternalElementFocused = e.target !== this.getFocusDomRef();\n\n\t\tif ((isSpace(e) || isEnter(e)) && isInternalElementFocused) {\n\t\t\treturn;\n\t\t}\n\n\t\tsuper._onkeydown(e);\n\n\t\tconst itemActive = this.type === ListItemType.Active,\n\t\t\titemNavigated = this.typeNavigation;\n\n\t\tif ((isSpace(e) || isEnter(e)) && (itemActive || itemNavigated)) {\n\t\t\tthis.activate();\n\t\t}\n\n\t\tif (isF2(e)) {\n\t\t\tthis._handleF2();\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tsuper._onkeyup(e);\n\n\t\tif (isSpace(e) || isEnter(e)) {\n\t\t\tthis.deactivate();\n\t\t}\n\n\t\tif (this.modeDelete && isDelete(e)) {\n\t\t\tthis.onDelete();\n\t\t}\n\t}\n\n\t_onmousedown() {\n\t\tthis.activate();\n\t}\n\n\t_onmouseup() {\n\t\tif (this.getFocusDomRef()!.matches(\":has(:focus-within)\")) {\n\t\t\treturn;\n\t\t}\n\t\tthis.deactivate();\n\t}\n\n\t_ontouchend() {\n\t\tthis._onmouseup();\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\tsuper._onfocusin(e);\n\n\t\tif (e.target !== this.getFocusDomRef()) {\n\t\t\tthis.deactivate();\n\t\t}\n\t}\n\n\t_onfocusout(e: FocusEvent) {\n\t\tif (e.target !== this.getFocusDomRef()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.deactivate();\n\t}\n\n\t_ondragstart(e: DragEvent) {\n\t\tif (!e.dataTransfer) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (e.target === this._listItem) {\n\t\t\tDragRegistry.setDraggedElement(this, e);\n\t\t\tthis.setAttribute(\"data-moving\", \"\");\n\t\t\te.dataTransfer.dropEffect = \"move\";\n\t\t\te.dataTransfer.effectAllowed = \"move\";\n\t\t}\n\t}\n\n\t_ondragend(e: DragEvent) {\n\t\tif (e.target === this._listItem) {\n\t\t\tDragRegistry.clearDraggedElement();\n\t\t\tthis.removeAttribute(\"data-moving\");\n\t\t}\n\t}\n\n\t/**\n\t * Called when selection components in Single (ui5-radio-button)\n\t * and Multi (ui5-checkbox) selection modes are used.\n\t */\n\tonMultiSelectionComponentPress(e: CustomEvent) {\n\t\tif (this.isInactive) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.fireDecoratorEvent(\"selection-requested\", { item: this, selected: (e.target as CheckBox).checked, selectionComponentPressed: true });\n\t}\n\n\tonSingleSelectionComponentPress(e: CustomEvent) {\n\t\tif (this.isInactive) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.fireDecoratorEvent(\"selection-requested\", { item: this, selected: !(e.target as RadioButton).checked, selectionComponentPressed: true });\n\t}\n\n\tactivate() {\n\t\tif (this.type === ListItemType.Active || this.type === ListItemType.Navigation) {\n\t\t\tthis.active = true;\n\t\t}\n\t}\n\n\tonDelete() {\n\t\tthis.fireDecoratorEvent(\"selection-requested\", { item: this, selectionComponentPressed: false });\n\t}\n\n\tonDetailClick() {\n\t\tthis.fireDecoratorEvent(\"detail-click\", { item: this, selected: this.selected });\n\t}\n\n\tfireItemPress(e: Event) {\n\t\tif (this.isInactive) {\n\t\t\treturn;\n\t\t}\n\t\tsuper.fireItemPress(e);\n\t\tif (document.activeElement !== this) {\n\t\t\tthis.focus();\n\t\t}\n\t}\n\n\tget isInactive() {\n\t\treturn this.type === ListItemType.Inactive || this.type === ListItemType.Detail;\n\t}\n\n\tget placeSelectionElementBefore() {\n\t\treturn this._selectionMode === ListSelectionMode.Multiple\n\t\t\t|| this._selectionMode === ListSelectionMode.SingleStart;\n\t}\n\n\tget placeSelectionElementAfter() {\n\t\treturn !this.placeSelectionElementBefore\n\t\t\t&& (this._selectionMode === ListSelectionMode.SingleEnd || this._selectionMode === ListSelectionMode.Delete);\n\t}\n\n\tget modeSingleSelect() {\n\t\treturn [\n\t\t\tListSelectionMode.SingleStart,\n\t\t\tListSelectionMode.SingleEnd,\n\t\t\tListSelectionMode.Single,\n\t\t].includes(this._selectionMode as ListSelectionMode);\n\t}\n\n\tget modeMultiple() {\n\t\treturn this._selectionMode === ListSelectionMode.Multiple;\n\t}\n\n\tget modeDelete() {\n\t\treturn this._selectionMode === ListSelectionMode.Delete;\n\t}\n\n\tget typeDetail() {\n\t\treturn this.type === ListItemType.Detail;\n\t}\n\n\tget typeNavigation() {\n\t\treturn this.type === ListItemType.Navigation;\n\t}\n\n\tget typeActive() {\n\t\treturn this.type === ListItemType.Active;\n\t}\n\n\tget _ariaSelected() {\n\t\tif (this.modeMultiple || this.modeSingleSelect) {\n\t\t\treturn this.selected;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tget listItemAccessibleRole() {\n\t\treturn (this._forcedAccessibleRole || this.accessibleRole.toLowerCase()) as AriaRole | undefined;\n\t}\n\n\tget ariaSelectedText() {\n\t\tlet ariaSelectedText;\n\n\t\t// Selected state needs to be supported separately since now the role mapping is list -> listitem[]\n\t\t// to avoid the issue of nesting interactive elements, ex. (option -> radio/checkbox);\n\t\t// The text is added to aria-describedby because as part of the aria-labelledby\n\t\t// the whole content of the item is readout when the aria-labelledby value is changed.\n\t\tif (this._ariaSelected !== undefined) {\n\t\t\tariaSelectedText = this._ariaSelected ? ListItem.i18nBundle.getText(LIST_ITEM_SELECTED) : ListItem.i18nBundle.getText(LIST_ITEM_NOT_SELECTED);\n\t\t}\n\n\t\treturn ariaSelectedText;\n\t}\n\n\tget deleteText() {\n\t\treturn ListItem.i18nBundle.getText(DELETE);\n\t}\n\n\tget hasDeleteButtonSlot() {\n\t\treturn !!this.deleteButton.length;\n\t}\n\n\tget _accessibleNameRef(): string {\n\t\tif ((this as IAccessibleListItem).accessibleName) {\n\t\t\t// accessibleName is set - return labels excluding content\n\t\t\treturn `${this._id}-invisibleText`;\n\t\t}\n\n\t\t// accessibleName is not set - return _accInfo.listItemAriaLabel including content\n\t\treturn `${this._id}-content ${this._id}-invisibleText`;\n\t}\n\n\tget ariaLabelledByText() {\n\t\tconst texts = [\n\t\t\tthis._accInfo.listItemAriaLabel,\n\t\t\tthis.accessibleName,\n\t\t\tthis.typeActive ? ListItem.i18nBundle.getText(LIST_ITEM_ACTIVE) : undefined,\n\t\t].filter(Boolean);\n\n\t\treturn texts.join(\" \");\n\t}\n\n\tget _accInfo(): AccInfo {\n\t\treturn {\n\t\t\trole: this.listItemAccessibleRole,\n\t\t\tariaExpanded: undefined,\n\t\t\tariaLevel: undefined,\n\t\t\tariaLabel: ListItem.i18nBundle.getText(ARIA_LABEL_LIST_ITEM_CHECKBOX),\n\t\t\tariaLabelRadioButton: ListItem.i18nBundle.getText(ARIA_LABEL_LIST_ITEM_RADIO_BUTTON),\n\t\t\tariaSelectedText: this.ariaSelectedText,\n\t\t\tariaHaspopup: this.accessibilityAttributes.hasPopup,\n\t\t\tsetsize: this.accessibilityAttributes.ariaSetsize,\n\t\t\tposinset: this.accessibilityAttributes.ariaPosinset,\n\t\t\ttooltip: this.tooltip,\n\t\t};\n\t}\n\n\tget _hasHighlightColor() {\n\t\treturn this.highlight !== Highlight.None;\n\t}\n\n\tget hasConfigurableMode() {\n\t\treturn true;\n\t}\n\n\tget _listItem() {\n\t\treturn this.shadowRoot!.querySelector(\"li\");\n\t}\n\n\tasync _handleF2() {\n\t\tconst focusDomRef = this.getFocusDomRef()!;\n\t\tconst activeElement = getActiveElement();\n\n\t\tconst focusables = this._getFocusableElements().length > 0;\n\t\tif (!focusables) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (activeElement === focusDomRef) {\n\t\t\tconst firstFocusable = await getFirstFocusableElement(focusDomRef);\n\t\t\tfirstFocusable?.focus();\n\t\t} else {\n\t\t\tfocusDomRef.focus();\n\t\t}\n\t}\n\n\t_getFocusableElements(): HTMLElement[] {\n\t\tconst focusDomRef = this.getFocusDomRef()!;\n\t\treturn getTabbableElements(focusDomRef);\n\t}\n\n\t_getFocusedElementIndex(): number {\n\t\tconst focusables = this._getFocusableElements();\n\t\tconst activeElement = getActiveElement() as HTMLElement;\n\t\treturn focusables.indexOf(activeElement);\n\t}\n\n\t_hasFocusableElements(): boolean {\n\t\treturn this._getFocusableElements().length > 0;\n\t}\n\n\t_isFocusOnInternalElement(): boolean {\n\t\tconst focusables = this._getFocusableElements();\n\t\tconst currentElementIndex = focusables.indexOf(getActiveElement() as HTMLElement);\n\t\treturn currentElementIndex !== -1;\n\t}\n\n\t_focusInternalElement(targetIndex: number) {\n\t\tconst focusables = this._getFocusableElements();\n\t\tif (!focusables.length) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst safeIndex = Math.min(targetIndex, focusables.length - 1);\n\t\tconst elementToFocus = focusables[safeIndex];\n\n\t\telementToFocus.focus();\n\n\t\treturn safeIndex;\n\t}\n}\n\nexport default ListItem;\nexport type {\n\tIAccessibleListItem,\n\tSelectionRequestEventDetail,\n\tListItemAccessibilityAttributes,\n};\n"]}
package/dist/Slider.d.ts CHANGED
@@ -67,6 +67,14 @@ declare class Slider extends SliderBase implements IFormInputElement {
67
67
  * @public
68
68
  */
69
69
  value: number;
70
+ /**
71
+ * Defines the size of the slider's selection intervals (e.g. min = 0, max = 10, step = 5 would result in possible selection of the values 0, 5, 10).
72
+ *
73
+ * **Note:** If set to 0 the slider handle movement is disabled.
74
+ * @default 1
75
+ * @public
76
+ */
77
+ step: number;
70
78
  tooltipValueState: `${ValueState}`;
71
79
  tooltipValue: string;
72
80
  _valueInitial?: number;
@@ -78,19 +86,12 @@ declare class Slider extends SliderBase implements IFormInputElement {
78
86
  static i18nBundle: I18nBundle;
79
87
  constructor();
80
88
  /**
81
- *
82
- * Check if the previously saved state is outdated. That would mean
83
- * either it is the initial rendering or that a property has been changed
84
- * programmatically - because the previous state is always updated in
85
- * the interaction handlers.
86
- *
87
- * Normalize current properties, update the previously stored state.
88
- * Update the visual UI representation of the Slider.
89
- *
89
+ * The value is visually clamped to min/max but the property is not modified.
90
+ * @private
90
91
  */
91
92
  onBeforeRendering(): void;
92
93
  onAfterRendering(): void;
93
- syncUIAndState(): void;
94
+ _handleResize(): void;
94
95
  /**
95
96
  * Called when the user starts interacting with the slider
96
97
  * @private
@@ -125,20 +126,12 @@ declare class Slider extends SliderBase implements IFormInputElement {
125
126
  _onTooltopForwardFocus(e: CustomEvent): void;
126
127
  get inputValue(): string;
127
128
  get tooltip(): SliderTooltip | null | undefined;
128
- get styles(): {
129
- progress: {
130
- width: string;
131
- border: string;
132
- };
133
- handle: {
134
- [x: string]: string;
135
- };
136
- };
137
129
  get _sliderHandle(): HTMLElement;
138
130
  get _ariaDisabled(): true | undefined;
139
131
  get _ariaLabelledByText(): string;
140
132
  get _ariaDescribedByInputText(): string;
141
133
  get _ariaLabelledByInputText(): string;
142
- get tickmarksObject(): boolean[];
134
+ get tickmarksObject(): never[];
135
+ _onkeydown(e: KeyboardEvent): void;
143
136
  }
144
137
  export default Slider;
package/dist/Slider.js CHANGED
@@ -12,6 +12,7 @@ import { isEscape, isF2 } from "@ui5/webcomponents-base/dist/Keys.js";
12
12
  import SliderBase from "./SliderBase.js";
13
13
  // Template
14
14
  import SliderTemplate from "./SliderTemplate.js";
15
+ import styles from "./generated/themes/Slider.css.js";
15
16
  // Texts
16
17
  import { SLIDER_ARIA_DESCRIPTION, SLIDER_TOOLTIP_INPUT_DESCRIPTION, SLIDER_TOOLTIP_INPUT_LABEL, } from "./generated/i18n/i18n-defaults.js";
17
18
  /**
@@ -82,60 +83,36 @@ let Slider = Slider_1 = class Slider extends SliderBase {
82
83
  * @public
83
84
  */
84
85
  this.value = 0;
86
+ /**
87
+ * Defines the size of the slider's selection intervals (e.g. min = 0, max = 10, step = 5 would result in possible selection of the values 0, 5, 10).
88
+ *
89
+ * **Note:** If set to 0 the slider handle movement is disabled.
90
+ * @default 1
91
+ * @public
92
+ */
93
+ this.step = 1;
85
94
  this.tooltipValueState = "None";
86
95
  this.tooltipValue = "";
87
96
  this._progressPercentage = 0;
88
97
  this._handlePositionFromStart = 0;
89
- this._stateStorage.value = undefined;
90
98
  this._lastValidInputValue = this.min.toString();
91
99
  }
92
100
  /**
93
- *
94
- * Check if the previously saved state is outdated. That would mean
95
- * either it is the initial rendering or that a property has been changed
96
- * programmatically - because the previous state is always updated in
97
- * the interaction handlers.
98
- *
99
- * Normalize current properties, update the previously stored state.
100
- * Update the visual UI representation of the Slider.
101
- *
101
+ * The value is visually clamped to min/max but the property is not modified.
102
+ * @private
102
103
  */
103
104
  onBeforeRendering() {
104
- if (!this.isCurrentStateOutdated()) {
105
- return;
106
- }
107
- this.notResized = true;
108
- this.syncUIAndState();
109
- this._updateHandleAndProgress(this.value);
105
+ // Clamp value visually without modifying the actual value property
106
+ const ctor = this.constructor;
107
+ const clampedValue = ctor.clipValue(this.value, this.min, this.max);
108
+ this._updateHandleAndProgress(clampedValue);
110
109
  }
111
110
  onAfterRendering() {
112
111
  super.onAfterRendering();
113
112
  this.tooltip?.repositionTooltip();
114
113
  }
115
- syncUIAndState() {
116
- // Validate step and update the stored state for the step property.
117
- if (this.isPropertyUpdated("step")) {
118
- this._validateStep(this.step);
119
- this.storePropertyState("step");
120
- }
121
- // Recalculate the tickmarks and labels and update the stored state.
122
- if (this.isPropertyUpdated("min", "max", "value")) {
123
- this.storePropertyState("min", "max");
124
- // Here the value props are changed programmatically (not by user interaction)
125
- // and it won't be "stepified" (rounded to the nearest step). 'Clip' them within
126
- // min and max bounderies and update the previous state reference.
127
- this.value = SliderBase.clipValue(this.value, this._effectiveMin, this._effectiveMax);
128
- this.updateStateStorageAndFireInputEvent("value");
129
- this.storePropertyState("value");
130
- }
131
- // Labels must be updated if any of the min/max/step/labelInterval props are changed
132
- if (this.labelInterval && this.showTickmarks) {
133
- this._createLabels();
134
- }
135
- // Update the stored state for the labelInterval, if changed
136
- if (this.isPropertyUpdated("labelInterval")) {
137
- this.storePropertyState("labelInterval");
138
- }
114
+ _handleResize() {
115
+ // TODO: Remove after refactoring Base and RangeSlider
139
116
  }
140
117
  /**
141
118
  * Called when the user starts interacting with the slider
@@ -157,8 +134,10 @@ let Slider = Slider_1 = class Slider extends SliderBase {
157
134
  // Do not yet update the Slider if press is over a handle. It will be updated if the user drags the mouse.
158
135
  const ctor = this.constructor;
159
136
  if (!this._isHandlePressed(ctor.getPageXValueFromEvent(e))) {
137
+ const stepPrecision = ctor._getDecimalPrecisionOfNumber(this.step);
160
138
  this._updateHandleAndProgress(newValue);
161
139
  this.value = newValue;
140
+ this.tooltipValue = newValue.toFixed(stepPrecision);
162
141
  this.updateStateStorageAndFireInputEvent("value");
163
142
  }
164
143
  }
@@ -188,18 +167,19 @@ let Slider = Slider_1 = class Slider extends SliderBase {
188
167
  }
189
168
  _onTooltipChange(e) {
190
169
  const value = parseFloat(e.detail.value);
191
- const isInvalid = value < this._effectiveMin || value > this._effectiveMax;
170
+ const isInvalid = (value < this.min || value > this.max) || Number.isNaN(value);
192
171
  if (isInvalid) {
193
172
  this.tooltipValueState = "Negative";
194
173
  this.tooltipValue = `${value}`;
195
174
  return;
196
175
  }
176
+ this.tooltipValueState = "None";
197
177
  this.value = value;
198
178
  this.fireDecoratorEvent("change");
199
179
  }
200
180
  _onTooltipFocusChange() {
201
181
  const value = parseFloat(this.tooltipValue);
202
- const isInvalid = value < this._effectiveMin || value > this._effectiveMax;
182
+ const isInvalid = (value < this.min || value > this.max) || Number.isNaN(value);
203
183
  if (isInvalid) {
204
184
  this.tooltipValueState = "None";
205
185
  this.tooltipValue = this.value.toString();
@@ -213,7 +193,7 @@ let Slider = Slider_1 = class Slider extends SliderBase {
213
193
  }
214
194
  _onTooltipOpen() {
215
195
  const ctor = this.constructor;
216
- const stepPrecision = ctor._getDecimalPrecisionOfNumber(this._effectiveStep);
196
+ const stepPrecision = ctor._getDecimalPrecisionOfNumber(this.step);
217
197
  this.tooltipValue = this.value.toFixed(stepPrecision);
218
198
  }
219
199
  _onTooltipInput(e) {
@@ -225,16 +205,12 @@ let Slider = Slider_1 = class Slider extends SliderBase {
225
205
  */
226
206
  _handleMove(e) {
227
207
  e.preventDefault();
228
- // If step is 0 no interaction is available because there is no constant
229
- // (equal for all user environments) quantitative representation of the value
230
- if (this.disabled || this._effectiveStep === 0) {
231
- return;
232
- }
233
208
  const ctor = this.constructor;
234
- const newValue = ctor.getValueFromInteraction(e, this._effectiveStep, this._effectiveMin, this._effectiveMax, this.getBoundingClientRect(), this.directionStart);
209
+ const newValue = ctor.getValueFromInteraction(e, this.step, this.min, this.max, this.getBoundingClientRect(), this.directionStart);
210
+ const stepPrecision = ctor._getDecimalPrecisionOfNumber(this.step);
235
211
  this._updateHandleAndProgress(newValue);
236
212
  this.value = newValue;
237
- this.tooltipValue = newValue.toString();
213
+ this.tooltipValue = newValue.toFixed(stepPrecision);
238
214
  this.updateStateStorageAndFireInputEvent("value");
239
215
  }
240
216
  /** Called when the user finish interacting with the slider
@@ -266,23 +242,24 @@ let Slider = Slider_1 = class Slider extends SliderBase {
266
242
  * @private
267
243
  */
268
244
  _updateHandleAndProgress(newValue) {
269
- const max = this._effectiveMax;
270
- const min = this._effectiveMin;
245
+ const max = this.max;
246
+ const min = this.min;
271
247
  // The progress (completed) percentage of the slider.
272
248
  this._progressPercentage = (newValue - min) / (max - min);
273
249
  // How many pixels from the left end of the slider will be the placed the affected by the user action handle
274
250
  this._handlePositionFromStart = this._progressPercentage * 100;
275
251
  }
276
252
  _handleActionKeyPress(e) {
277
- const min = this._effectiveMin;
278
- const max = this._effectiveMax;
253
+ const min = this.min;
254
+ const max = this.max;
279
255
  const currentValue = this.value;
280
256
  const ctor = this.constructor;
281
257
  const newValue = isEscape(e) ? this._valueInitial : ctor.clipValue(this._handleActionKeyPressBase(e, "value") + currentValue, min, max);
282
258
  if (newValue !== currentValue) {
259
+ const stepPrecision = ctor._getDecimalPrecisionOfNumber(this.step);
283
260
  this._updateHandleAndProgress(newValue);
284
261
  this.value = newValue;
285
- this.tooltipValue = this.value.toString();
262
+ this.tooltipValue = this.value.toFixed(stepPrecision);
286
263
  this.updateStateStorageAndFireInputEvent("value");
287
264
  }
288
265
  }
@@ -296,19 +273,8 @@ let Slider = Slider_1 = class Slider extends SliderBase {
296
273
  get tooltip() {
297
274
  return this.getDomRef()?.querySelector("[ui5-slider-tooltip]");
298
275
  }
299
- get styles() {
300
- return {
301
- progress: {
302
- "width": `${this._handlePositionFromStart}%`,
303
- "border": this._handlePositionFromStart === 0 ? "none" : "",
304
- },
305
- handle: {
306
- [this.directionStart]: `${this._handlePositionFromStart}%`,
307
- },
308
- };
309
- }
310
276
  get _sliderHandle() {
311
- return this.shadowRoot.querySelector(".ui5-slider-handle");
277
+ return this.shadowRoot.querySelector("[ui5-slider-handle]");
312
278
  }
313
279
  get _ariaDisabled() {
314
280
  return this.disabled || undefined;
@@ -322,21 +288,28 @@ let Slider = Slider_1 = class Slider extends SliderBase {
322
288
  get _ariaLabelledByInputText() {
323
289
  return Slider_1.i18nBundle.getText(SLIDER_TOOLTIP_INPUT_LABEL);
324
290
  }
291
+ // TODO: Refactor these methods after RangeSlider is refactored
325
292
  get tickmarksObject() {
326
- const count = this._tickmarksCount;
327
- const arr = [];
328
- if (this._hiddenTickmarks) {
329
- return [true, false];
293
+ return [];
294
+ }
295
+ _onkeydown(e) {
296
+ const target = e.target;
297
+ if (isF2(e) && target.hasAttribute("ui5-slider-handle")) {
298
+ target.parentNode.querySelector("[ui5-slider-tooltip]").focus();
330
299
  }
331
- for (let i = 0; i <= count; i++) {
332
- arr.push(this._effectiveMin + (i * this.step) <= this.value);
300
+ if (SliderBase._isActionKey(e) && target && !target.hasAttribute("ui5-slider-tooltip")) {
301
+ e.preventDefault();
302
+ this._isUserInteraction = true;
303
+ this._handleActionKeyPress(e);
333
304
  }
334
- return arr;
335
305
  }
336
306
  };
337
307
  __decorate([
338
308
  property({ type: Number })
339
309
  ], Slider.prototype, "value", void 0);
310
+ __decorate([
311
+ property({ type: Number })
312
+ ], Slider.prototype, "step", void 0);
340
313
  __decorate([
341
314
  property()
342
315
  ], Slider.prototype, "tooltipValueState", void 0);
@@ -351,6 +324,7 @@ Slider = Slider_1 = __decorate([
351
324
  tag: "ui5-slider",
352
325
  languageAware: true,
353
326
  formAssociated: true,
327
+ styles: [styles],
354
328
  template: SliderTemplate,
355
329
  })
356
330
  ], Slider);
@@ -1 +1 @@
1
- {"version":3,"file":"Slider.js","sourceRoot":"","sources":["../src/Slider.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAC;AAGtE,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAGzC,WAAW;AACX,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAGjD,QAAQ;AACR,OAAO,EACN,uBAAuB,EACvB,gCAAgC,EAChC,0BAA0B,GAC1B,MAAM,mCAAmC,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAOH,IAAM,MAAM,cAAZ,MAAM,MAAO,SAAQ,UAAU;IAuB9B,IAAI,kBAAkB;QACr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,CAAC,aAAa,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;QAC9D,CAAC;QAED,OAAO,GAAG,CAAC;IACZ,CAAC;CACD,CAAA;AArUA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qCACjB;AAGV;IADC,QAAQ,EAAE;iDACiC;AAG5C;IADC,QAAQ,EAAE;4CACO;AAaX;IADN,IAAI,CAAC,oBAAoB,CAAC;gCACG;AA5BzB,MAAM;IANX,aAAa,CAAC;QACd,GAAG,EAAE,YAAY;QACjB,aAAa,EAAE,IAAI;QACnB,cAAc,EAAE,IAAI;QACpB,QAAQ,EAAE,cAAc;KACxB,CAAC;GACI,MAAM,CA8UX;AAED,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,eAAe,MAAM,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { isEscape, isF2 } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport type { IFormInputElement } from \"@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js\";\nimport type ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport SliderBase from \"./SliderBase.js\";\nimport type SliderTooltip from \"./SliderTooltip.js\";\n\n// Template\nimport SliderTemplate from \"./SliderTemplate.js\";\nimport type { SliderTooltipChangeEventDetails } from \"./SliderTooltip.js\";\n\n// Texts\nimport {\n\tSLIDER_ARIA_DESCRIPTION,\n\tSLIDER_TOOLTIP_INPUT_DESCRIPTION,\n\tSLIDER_TOOLTIP_INPUT_LABEL,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n/**\n * @class\n *\n * ### Overview\n * The Slider component represents a numerical range and a handle (grip).\n * The purpose of the component is to enable visual selection of a value in\n * a continuous numerical range by moving an adjustable handle.\n *\n * ### Structure\n * The most important properties of the Slider are:\n *\n * - min - The minimum value of the slider range.\n * - max - The maximum value of the slider range.\n * - value - The current value of the slider range.\n * - step - Determines the increments in which the slider will move.\n * - showTooltip - Determines if a tooltip should be displayed above the handle.\n * - showTickmarks - Displays a visual divider between the step values.\n * - labelInterval - Labels some or all of the tickmarks with their values.\n *\n * ### Usage\n * The most common use case is to select values on a continuous numerical scale (e.g. temperature, volume, etc. ).\n *\n * ### Responsive Behavior\n * The `ui5-slider` component adjusts to the size of its parent container by recalculating and\n * resizing the width of the control. You can move the slider handle in several different ways:\n *\n * - Drag and drop the handle to the desired value.\n * - Click/tap on the range bar to move the handle to that location.\n *\n * ### Keyboard Handling\n *\n * - `Left or Down Arrow` - Moves the handle one step to the left, effectively decreasing the component's value by `step` amount;\n * - `Right or Up Arrow` - Moves the handle one step to the right, effectively increasing the component's value by `step` amount;\n * - `Left or Down Arrow + Ctrl/Cmd` - Moves the handle to the left with step equal to 1/10th of the entire range, effectively decreasing the component's value by 1/10th of the range;\n * - `Right or Up Arrow + Ctrl/Cmd` - Moves the handle to the right with step equal to 1/10th of the entire range, effectively increasing the component's value by 1/10th of the range;\n * - `Plus` - Same as `Right or Up Arrow`;\n * - `Minus` - Same as `Left or Down Arrow`;\n * - `Home` - Moves the handle to the beginning of the range;\n * - `End` - Moves the handle to the end of the range;\n * - `Page Up` - Same as `Right or Up + Ctrl/Cmd`;\n * - `Page Down` - Same as `Left or Down + Ctrl/Cmd`;\n * - `Escape` - Resets the value property after interaction, to the position prior the component's focusing;\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/Slider.js\";`\n * @constructor\n * @extends SliderBase\n * @since 1.0.0-rc.11\n * @public\n * @csspart progress-container - Used to style the progress container, the horizontal bar that visually represents the range between the minimum and maximum values, of the `ui5-slider`.\n * @csspart progress-bar - Used to style the progress bar, which shows the progress of the `ui5-slider`.\n * @csspart handle - Used to style the handle of the `ui5-slider`.\n */\n@customElement({\n\ttag: \"ui5-slider\",\n\tlanguageAware: true,\n\tformAssociated: true,\n\ttemplate: SliderTemplate,\n})\nclass Slider extends SliderBase implements IFormInputElement {\n\t/**\n\t * Current value of the slider\n\t * @default 0\n\t * @formEvents change input\n\t * @formProperty\n\t * @public\n\t */\n\t@property({ type: Number })\n\tvalue = 0;\n\n\t@property()\n\ttooltipValueState: `${ValueState}` = \"None\";\n\n\t@property()\n\ttooltipValue = \"\";\n\n\t_valueInitial?: number;\n\t_valueOnInteractionStart?: number;\n\t_progressPercentage = 0;\n\t_handlePositionFromStart = 0;\n\t_lastValidInputValue: string;\n\n\tget formFormattedValue() {\n\t\treturn this.value.toString();\n\t}\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._stateStorage.value = undefined;\n\t\tthis._lastValidInputValue = this.min.toString();\n\t}\n\n\t/**\n\t *\n\t * Check if the previously saved state is outdated. That would mean\n\t * either it is the initial rendering or that a property has been changed\n\t * programmatically - because the previous state is always updated in\n\t * the interaction handlers.\n\t *\n\t * Normalize current properties, update the previously stored state.\n\t * Update the visual UI representation of the Slider.\n\t *\n\t */\n\tonBeforeRendering() {\n\t\tif (!this.isCurrentStateOutdated()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.notResized = true;\n\t\tthis.syncUIAndState();\n\t\tthis._updateHandleAndProgress(this.value);\n\t}\n\n\tonAfterRendering(): void {\n\t\tsuper.onAfterRendering();\n\n\t\tthis.tooltip?.repositionTooltip();\n\t}\n\n\tsyncUIAndState() {\n\t\t// Validate step and update the stored state for the step property.\n\t\tif (this.isPropertyUpdated(\"step\")) {\n\t\t\tthis._validateStep(this.step);\n\t\t\tthis.storePropertyState(\"step\");\n\t\t}\n\n\t\t// Recalculate the tickmarks and labels and update the stored state.\n\t\tif (this.isPropertyUpdated(\"min\", \"max\", \"value\")) {\n\t\t\tthis.storePropertyState(\"min\", \"max\");\n\n\t\t\t// Here the value props are changed programmatically (not by user interaction)\n\t\t\t// and it won't be \"stepified\" (rounded to the nearest step). 'Clip' them within\n\t\t\t// min and max bounderies and update the previous state reference.\n\t\t\tthis.value = SliderBase.clipValue(this.value, this._effectiveMin, this._effectiveMax);\n\t\t\tthis.updateStateStorageAndFireInputEvent(\"value\");\n\t\t\tthis.storePropertyState(\"value\");\n\t\t}\n\n\t\t// Labels must be updated if any of the min/max/step/labelInterval props are changed\n\t\tif (this.labelInterval && this.showTickmarks) {\n\t\t\tthis._createLabels();\n\t\t}\n\n\t\t// Update the stored state for the labelInterval, if changed\n\t\tif (this.isPropertyUpdated(\"labelInterval\")) {\n\t\t\tthis.storePropertyState(\"labelInterval\");\n\t\t}\n\t}\n\n\t/**\n\t * Called when the user starts interacting with the slider\n\t * @private\n\t */\n\t_onmousedown(e: TouchEvent | MouseEvent) {\n\t\t// If step is 0 no interaction is available because there is no constant\n\t\t// (equal for all user environments) quantitative representation of the value\n\t\tif (this.disabled || this.step === 0 || (e.target as HTMLElement).hasAttribute(\"ui5-slider-tooltip\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst newValue = this.handleDownBase(e);\n\t\tthis._valueOnInteractionStart = this.value;\n\n\t\t// Set initial value if one is not set previously on focus in.\n\t\t// It will be restored if ESC key is pressed.\n\t\tif (this._valueInitial === undefined) {\n\t\t\tthis._valueInitial = this.value;\n\t\t}\n\n\t\t// Do not yet update the Slider if press is over a handle. It will be updated if the user drags the mouse.\n\t\tconst ctor = this.constructor as typeof Slider;\n\t\tif (!this._isHandlePressed(ctor.getPageXValueFromEvent(e))) {\n\t\t\tthis._updateHandleAndProgress(newValue);\n\t\t\tthis.value = newValue;\n\t\t\tthis.updateStateStorageAndFireInputEvent(\"value\");\n\t\t}\n\t}\n\n\t_onfocusin() {\n\t\t// Set initial value if one is not set previously on focus in.\n\t\t// It will be restored if ESC key is pressed.\n\t\tif (this._valueInitial === undefined) {\n\t\t\tthis._valueInitial = this.value;\n\t\t}\n\n\t\tif (this.showTooltip) {\n\t\t\tthis._tooltipsOpen = true;\n\t\t}\n\t}\n\n\t_onfocusout(e: FocusEvent) {\n\t\t// Prevent focusout when the focus is getting set within the slider internal\n\t\t// element (on the handle), before the Slider' customElement itself is finished focusing\n\t\tif (this._isFocusing()) {\n\t\t\tthis._preventFocusOut();\n\t\t\treturn;\n\t\t}\n\n\t\t// Reset focus state and the stored Slider's initial\n\t\t// value that was saved when it was first focused in\n\t\tthis._valueInitial = undefined;\n\n\t\tif (this.showTooltip && !(e.relatedTarget as HTMLElement)?.hasAttribute(\"ui5-slider-tooltip\")) {\n\t\t\tthis._tooltipsOpen = false;\n\t\t}\n\t}\n\n\t_onTooltipChange(e: CustomEvent<SliderTooltipChangeEventDetails>) {\n\t\tconst value = parseFloat(e.detail.value);\n\t\tconst isInvalid = value < this._effectiveMin || value > this._effectiveMax;\n\n\t\tif (isInvalid) {\n\t\t\tthis.tooltipValueState = \"Negative\";\n\t\t\tthis.tooltipValue = `${value}`;\n\t\t\treturn;\n\t\t}\n\n\t\tthis.value = value;\n\t\tthis.fireDecoratorEvent(\"change\");\n\t}\n\n\t_onTooltipFocusChange() {\n\t\tconst value = parseFloat(this.tooltipValue);\n\t\tconst isInvalid = value < this._effectiveMin || value > this._effectiveMax;\n\n\t\tif (isInvalid) {\n\t\t\tthis.tooltipValueState = \"None\";\n\t\t\tthis.tooltipValue = this.value.toString();\n\t\t}\n\t}\n\n\t_onTooltipKeydown(e: KeyboardEvent) {\n\t\tif (isF2(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._sliderHandle.focus();\n\t\t}\n\t}\n\n\t_onTooltipOpen() {\n\t\tconst ctor = this.constructor as typeof Slider;\n\t\tconst stepPrecision = ctor._getDecimalPrecisionOfNumber(this._effectiveStep);\n\t\tthis.tooltipValue = this.value.toFixed(stepPrecision);\n\t}\n\n\t_onTooltipInput(e: CustomEvent) {\n\t\tthis.tooltipValue = e.detail.value;\n\t}\n\n\t/**\n\t * Called when the user moves the slider\n\t * @private\n\t */\n\t_handleMove(e: TouchEvent | MouseEvent) {\n\t\te.preventDefault();\n\n\t\t// If step is 0 no interaction is available because there is no constant\n\t\t// (equal for all user environments) quantitative representation of the value\n\t\tif (this.disabled || this._effectiveStep === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst ctor = this.constructor as typeof Slider;\n\t\tconst newValue = ctor.getValueFromInteraction(e, this._effectiveStep, this._effectiveMin, this._effectiveMax, this.getBoundingClientRect(), this.directionStart);\n\n\t\tthis._updateHandleAndProgress(newValue);\n\t\tthis.value = newValue;\n\t\tthis.tooltipValue = newValue.toString();\n\t\tthis.updateStateStorageAndFireInputEvent(\"value\");\n\t}\n\n\t/** Called when the user finish interacting with the slider\n\t * @private\n\t */\n\t_handleUp() {\n\t\tif (this._valueOnInteractionStart !== this.value) {\n\t\t\tthis.fireDecoratorEvent(\"change\");\n\t\t}\n\n\t\tthis.handleUpBase();\n\t\tthis._valueOnInteractionStart = undefined;\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tconst isActionKey = SliderBase._isActionKey(e);\n\n\t\tthis._onKeyupBase();\n\n\t\tif (isActionKey && this._valueOnInteractionStart !== this.value) {\n\t\t\tthis.fireDecoratorEvent(\"change\");\n\t\t}\n\n\t\tthis._valueOnInteractionStart = this.value;\n\t}\n\n\t/** Determines if the press is over the handle\n\t * @private\n\t */\n\t_isHandlePressed(clientX: number) {\n\t\tconst sliderHandleDomRect = this._sliderHandle.getBoundingClientRect();\n\t\treturn clientX >= sliderHandleDomRect.left && clientX <= sliderHandleDomRect.right;\n\t}\n\n\t/** Updates the UI representation of the progress bar and handle position\n\t * @private\n\t */\n\t_updateHandleAndProgress(newValue: number) {\n\t\tconst max = this._effectiveMax;\n\t\tconst min = this._effectiveMin;\n\n\t\t// The progress (completed) percentage of the slider.\n\t\tthis._progressPercentage = (newValue - min) / (max - min);\n\t\t// How many pixels from the left end of the slider will be the placed the affected by the user action handle\n\t\tthis._handlePositionFromStart = this._progressPercentage * 100;\n\t}\n\n\t_handleActionKeyPress(e: KeyboardEvent) {\n\t\tconst min = this._effectiveMin;\n\t\tconst max = this._effectiveMax;\n\t\tconst currentValue = this.value;\n\t\tconst ctor = this.constructor as typeof Slider;\n\t\tconst newValue = isEscape(e) ? this._valueInitial : ctor.clipValue(this._handleActionKeyPressBase(e, \"value\") + currentValue, min, max);\n\n\t\tif (newValue !== currentValue) {\n\t\t\tthis._updateHandleAndProgress(newValue!);\n\t\t\tthis.value = newValue!;\n\t\t\tthis.tooltipValue = this.value.toString();\n\t\t\tthis.updateStateStorageAndFireInputEvent(\"value\");\n\t\t}\n\t}\n\n\t_onTooltopForwardFocus(e: CustomEvent) {\n\t\tconst tooltip = e.target as SliderTooltip;\n\n\t\ttooltip.followRef?.focus();\n\t}\n\n\tget inputValue() {\n\t\treturn this.value.toString();\n\t}\n\n\tget tooltip() {\n\t\treturn this.getDomRef()?.querySelector<SliderTooltip>(\"[ui5-slider-tooltip]\");\n\t}\n\n\tget styles() {\n\t\treturn {\n\t\t\tprogress: {\n\t\t\t\t\"width\": `${this._handlePositionFromStart}%`,\n\t\t\t\t\"border\": this._handlePositionFromStart === 0 ? \"none\" : \"\",\n\t\t\t},\n\t\t\thandle: {\n\t\t\t\t[this.directionStart]: `${this._handlePositionFromStart}%`,\n\t\t\t},\n\t\t};\n\t}\n\n\tget _sliderHandle() : HTMLElement {\n\t\treturn this.shadowRoot!.querySelector(\".ui5-slider-handle\")!;\n\t}\n\n\tget _ariaDisabled() {\n\t\treturn this.disabled || undefined;\n\t}\n\n\tget _ariaLabelledByText() {\n\t\treturn Slider.i18nBundle.getText(SLIDER_ARIA_DESCRIPTION);\n\t}\n\n\tget _ariaDescribedByInputText() {\n\t\treturn Slider.i18nBundle.getText(SLIDER_TOOLTIP_INPUT_DESCRIPTION);\n\t}\n\n\tget _ariaLabelledByInputText() {\n\t\treturn Slider.i18nBundle.getText(SLIDER_TOOLTIP_INPUT_LABEL);\n\t}\n\n\tget tickmarksObject() {\n\t\tconst count = this._tickmarksCount;\n\t\tconst arr = [];\n\n\t\tif (this._hiddenTickmarks) {\n\t\t\treturn [true, false];\n\t\t}\n\n\t\tfor (let i = 0; i <= count; i++) {\n\t\t\tarr.push(this._effectiveMin + (i * this.step) <= this.value);\n\t\t}\n\n\t\treturn arr;\n\t}\n}\n\nSlider.define();\n\nexport default Slider;\n"]}
1
+ {"version":3,"file":"Slider.js","sourceRoot":"","sources":["../src/Slider.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAC;AAGtE,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAGzC,WAAW;AACX,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAEjD,OAAO,MAAM,MAAM,kCAAkC,CAAC;AAEtD,QAAQ;AACR,OAAO,EACN,uBAAuB,EACvB,gCAAgC,EAChC,0BAA0B,GAC1B,MAAM,mCAAmC,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAQH,IAAM,MAAM,cAAZ,MAAM,MAAO,SAAQ,UAAU;IAiC9B,IAAI,kBAAkB;QACrB,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;IAC9B,CAAC;IAKD;QACC,KAAK,EAAE,CAAC;QAxCT;;;;;;WAMG;QAEH,UAAK,GAAG,CAAC,CAAC;QAEV;;;;;;WAMG;QAEH,SAAI,GAAG,CAAC,CAAC;QAGT,sBAAiB,GAAoB,MAAM,CAAC;QAG5C,iBAAY,GAAG,EAAE,CAAC;QAIlB,wBAAmB,GAAG,CAAC,CAAC;QACxB,6BAAwB,GAAG,CAAC,CAAC;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C,KAAK,EAAE,CAAC;QACnF,CAAC;QAED,IAAI,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,MAAM,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,oBAAoB,CAAC,EAAE,CAAC;YACxF,CAAC,CAAC,cAAc,EAAE,CAAC;YAEnB,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;YAC/B,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;QAC/B,CAAC;IACF,CAAC;CACD,CAAA;AAlSA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qCACjB;AAUV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oCAClB;AAGT;IADC,QAAQ,EAAE;iDACiC;AAG5C;IADC,QAAQ,EAAE;4CACO;AAaX;IADN,IAAI,CAAC,oBAAoB,CAAC;gCACG;AAtCzB,MAAM;IAPX,aAAa,CAAC;QACd,GAAG,EAAE,YAAY;QACjB,aAAa,EAAE,IAAI;QACnB,cAAc,EAAE,IAAI;QACpB,MAAM,EAAE,CAAC,MAAM,CAAC;QAChB,QAAQ,EAAE,cAAc;KACxB,CAAC;GACI,MAAM,CA2SX;AAED,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,eAAe,MAAM,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { isEscape, isF2 } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport type { IFormInputElement } from \"@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js\";\nimport type ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport SliderBase from \"./SliderBase.js\";\nimport type SliderTooltip from \"./SliderTooltip.js\";\n\n// Template\nimport SliderTemplate from \"./SliderTemplate.js\";\nimport type { SliderTooltipChangeEventDetails } from \"./SliderTooltip.js\";\nimport styles from \"./generated/themes/Slider.css.js\";\n\n// Texts\nimport {\n\tSLIDER_ARIA_DESCRIPTION,\n\tSLIDER_TOOLTIP_INPUT_DESCRIPTION,\n\tSLIDER_TOOLTIP_INPUT_LABEL,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n/**\n * @class\n *\n * ### Overview\n * The Slider component represents a numerical range and a handle (grip).\n * The purpose of the component is to enable visual selection of a value in\n * a continuous numerical range by moving an adjustable handle.\n *\n * ### Structure\n * The most important properties of the Slider are:\n *\n * - min - The minimum value of the slider range.\n * - max - The maximum value of the slider range.\n * - value - The current value of the slider range.\n * - step - Determines the increments in which the slider will move.\n * - showTooltip - Determines if a tooltip should be displayed above the handle.\n * - showTickmarks - Displays a visual divider between the step values.\n * - labelInterval - Labels some or all of the tickmarks with their values.\n *\n * ### Usage\n * The most common use case is to select values on a continuous numerical scale (e.g. temperature, volume, etc. ).\n *\n * ### Responsive Behavior\n * The `ui5-slider` component adjusts to the size of its parent container by recalculating and\n * resizing the width of the control. You can move the slider handle in several different ways:\n *\n * - Drag and drop the handle to the desired value.\n * - Click/tap on the range bar to move the handle to that location.\n *\n * ### Keyboard Handling\n *\n * - `Left or Down Arrow` - Moves the handle one step to the left, effectively decreasing the component's value by `step` amount;\n * - `Right or Up Arrow` - Moves the handle one step to the right, effectively increasing the component's value by `step` amount;\n * - `Left or Down Arrow + Ctrl/Cmd` - Moves the handle to the left with step equal to 1/10th of the entire range, effectively decreasing the component's value by 1/10th of the range;\n * - `Right or Up Arrow + Ctrl/Cmd` - Moves the handle to the right with step equal to 1/10th of the entire range, effectively increasing the component's value by 1/10th of the range;\n * - `Plus` - Same as `Right or Up Arrow`;\n * - `Minus` - Same as `Left or Down Arrow`;\n * - `Home` - Moves the handle to the beginning of the range;\n * - `End` - Moves the handle to the end of the range;\n * - `Page Up` - Same as `Right or Up + Ctrl/Cmd`;\n * - `Page Down` - Same as `Left or Down + Ctrl/Cmd`;\n * - `Escape` - Resets the value property after interaction, to the position prior the component's focusing;\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/Slider.js\";`\n * @constructor\n * @extends SliderBase\n * @since 1.0.0-rc.11\n * @public\n * @csspart progress-container - Used to style the progress container, the horizontal bar that visually represents the range between the minimum and maximum values, of the `ui5-slider`.\n * @csspart progress-bar - Used to style the progress bar, which shows the progress of the `ui5-slider`.\n * @csspart handle - Used to style the handle of the `ui5-slider`.\n */\n@customElement({\n\ttag: \"ui5-slider\",\n\tlanguageAware: true,\n\tformAssociated: true,\n\tstyles: [styles],\n\ttemplate: SliderTemplate,\n})\nclass Slider extends SliderBase implements IFormInputElement {\n\t/**\n\t * Current value of the slider\n\t * @default 0\n\t * @formEvents change input\n\t * @formProperty\n\t * @public\n\t */\n\t@property({ type: Number })\n\tvalue = 0;\n\n\t/**\n\t * Defines the size of the slider's selection intervals (e.g. min = 0, max = 10, step = 5 would result in possible selection of the values 0, 5, 10).\n\t *\n\t * **Note:** If set to 0 the slider handle movement is disabled.\n\t * @default 1\n\t * @public\n\t */\n\t@property({ type: Number })\n\tstep = 1;\n\n\t@property()\n\ttooltipValueState: `${ValueState}` = \"None\";\n\n\t@property()\n\ttooltipValue = \"\";\n\n\t_valueInitial?: number;\n\t_valueOnInteractionStart?: number;\n\t_progressPercentage = 0;\n\t_handlePositionFromStart = 0;\n\t_lastValidInputValue: string;\n\n\tget formFormattedValue() {\n\t\treturn this.value.toString();\n\t}\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._lastValidInputValue = this.min.toString();\n\t}\n\n\t/**\n\t * The value is visually clamped to min/max but the property is not modified.\n\t * @private\n\t */\n\tonBeforeRendering() {\n\t\t// Clamp value visually without modifying the actual value property\n\t\tconst ctor = this.constructor as typeof Slider;\n\t\tconst clampedValue = ctor.clipValue(this.value, this.min, this.max);\n\t\tthis._updateHandleAndProgress(clampedValue);\n\t}\n\n\tonAfterRendering(): void {\n\t\tsuper.onAfterRendering();\n\n\t\tthis.tooltip?.repositionTooltip();\n\t}\n\n\t_handleResize() {\n\t\t// TODO: Remove after refactoring Base and RangeSlider\n\t}\n\n\t/**\n\t * Called when the user starts interacting with the slider\n\t * @private\n\t */\n\t_onmousedown(e: TouchEvent | MouseEvent) {\n\t\t// If step is 0 no interaction is available because there is no constant\n\t\t// (equal for all user environments) quantitative representation of the value\n\t\tif (this.disabled || this.step === 0 || (e.target as HTMLElement).hasAttribute(\"ui5-slider-tooltip\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst newValue = this.handleDownBase(e);\n\t\tthis._valueOnInteractionStart = this.value;\n\n\t\t// Set initial value if one is not set previously on focus in.\n\t\t// It will be restored if ESC key is pressed.\n\t\tif (this._valueInitial === undefined) {\n\t\t\tthis._valueInitial = this.value;\n\t\t}\n\n\t\t// Do not yet update the Slider if press is over a handle. It will be updated if the user drags the mouse.\n\t\tconst ctor = this.constructor as typeof Slider;\n\t\tif (!this._isHandlePressed(ctor.getPageXValueFromEvent(e))) {\n\t\t\tconst stepPrecision = ctor._getDecimalPrecisionOfNumber(this.step);\n\t\t\tthis._updateHandleAndProgress(newValue);\n\t\t\tthis.value = newValue;\n\t\t\tthis.tooltipValue = newValue.toFixed(stepPrecision);\n\t\t\tthis.updateStateStorageAndFireInputEvent(\"value\");\n\t\t}\n\t}\n\n\t_onfocusin() {\n\t\t// Set initial value if one is not set previously on focus in.\n\t\t// It will be restored if ESC key is pressed.\n\t\tif (this._valueInitial === undefined) {\n\t\t\tthis._valueInitial = this.value;\n\t\t}\n\n\t\tif (this.showTooltip) {\n\t\t\tthis._tooltipsOpen = true;\n\t\t}\n\t}\n\n\t_onfocusout(e: FocusEvent) {\n\t\t// Prevent focusout when the focus is getting set within the slider internal\n\t\t// element (on the handle), before the Slider' customElement itself is finished focusing\n\t\tif (this._isFocusing()) {\n\t\t\tthis._preventFocusOut();\n\t\t\treturn;\n\t\t}\n\n\t\t// Reset focus state and the stored Slider's initial\n\t\t// value that was saved when it was first focused in\n\t\tthis._valueInitial = undefined;\n\n\t\tif (this.showTooltip && !(e.relatedTarget as HTMLElement)?.hasAttribute(\"ui5-slider-tooltip\")) {\n\t\t\tthis._tooltipsOpen = false;\n\t\t}\n\t}\n\n\t_onTooltipChange(e: CustomEvent<SliderTooltipChangeEventDetails>) {\n\t\tconst value = parseFloat(e.detail.value);\n\t\tconst isInvalid = (value < this.min || value > this.max) || Number.isNaN(value);\n\n\t\tif (isInvalid) {\n\t\t\tthis.tooltipValueState = \"Negative\";\n\t\t\tthis.tooltipValue = `${value}`;\n\t\t\treturn;\n\t\t}\n\n\t\tthis.tooltipValueState = \"None\";\n\t\tthis.value = value;\n\t\tthis.fireDecoratorEvent(\"change\");\n\t}\n\n\t_onTooltipFocusChange() {\n\t\tconst value = parseFloat(this.tooltipValue);\n\t\tconst isInvalid = (value < this.min || value > this.max) || Number.isNaN(value);\n\n\t\tif (isInvalid) {\n\t\t\tthis.tooltipValueState = \"None\";\n\t\t\tthis.tooltipValue = this.value.toString();\n\t\t}\n\t}\n\n\t_onTooltipKeydown(e: KeyboardEvent) {\n\t\tif (isF2(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._sliderHandle.focus();\n\t\t}\n\t}\n\n\t_onTooltipOpen() {\n\t\tconst ctor = this.constructor as typeof Slider;\n\t\tconst stepPrecision = ctor._getDecimalPrecisionOfNumber(this.step);\n\t\tthis.tooltipValue = this.value.toFixed(stepPrecision);\n\t}\n\n\t_onTooltipInput(e: CustomEvent) {\n\t\tthis.tooltipValue = e.detail.value;\n\t}\n\n\t/**\n\t * Called when the user moves the slider\n\t * @private\n\t */\n\t_handleMove(e: TouchEvent | MouseEvent) {\n\t\te.preventDefault();\n\n\t\tconst ctor = this.constructor as typeof Slider;\n\t\tconst newValue = ctor.getValueFromInteraction(e, this.step, this.min, this.max, this.getBoundingClientRect(), this.directionStart);\n\t\tconst stepPrecision = ctor._getDecimalPrecisionOfNumber(this.step);\n\n\t\tthis._updateHandleAndProgress(newValue);\n\t\tthis.value = newValue;\n\t\tthis.tooltipValue = newValue.toFixed(stepPrecision);\n\t\tthis.updateStateStorageAndFireInputEvent(\"value\");\n\t}\n\n\t/** Called when the user finish interacting with the slider\n\t * @private\n\t */\n\t_handleUp() {\n\t\tif (this._valueOnInteractionStart !== this.value) {\n\t\t\tthis.fireDecoratorEvent(\"change\");\n\t\t}\n\n\t\tthis.handleUpBase();\n\t\tthis._valueOnInteractionStart = undefined;\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tconst isActionKey = SliderBase._isActionKey(e);\n\n\t\tthis._onKeyupBase();\n\n\t\tif (isActionKey && this._valueOnInteractionStart !== this.value) {\n\t\t\tthis.fireDecoratorEvent(\"change\");\n\t\t}\n\n\t\tthis._valueOnInteractionStart = this.value;\n\t}\n\n\t/** Determines if the press is over the handle\n\t * @private\n\t */\n\t_isHandlePressed(clientX: number) {\n\t\tconst sliderHandleDomRect = this._sliderHandle.getBoundingClientRect();\n\t\treturn clientX >= sliderHandleDomRect.left && clientX <= sliderHandleDomRect.right;\n\t}\n\n\t/** Updates the UI representation of the progress bar and handle position\n\t * @private\n\t */\n\t_updateHandleAndProgress(newValue: number) {\n\t\tconst max = this.max;\n\t\tconst min = this.min;\n\n\t\t// The progress (completed) percentage of the slider.\n\t\tthis._progressPercentage = (newValue - min) / (max - min);\n\t\t// How many pixels from the left end of the slider will be the placed the affected by the user action handle\n\t\tthis._handlePositionFromStart = this._progressPercentage * 100;\n\t}\n\n\t_handleActionKeyPress(e: KeyboardEvent) {\n\t\tconst min = this.min;\n\t\tconst max = this.max;\n\t\tconst currentValue = this.value;\n\t\tconst ctor = this.constructor as typeof Slider;\n\t\tconst newValue = isEscape(e) ? this._valueInitial : ctor.clipValue(this._handleActionKeyPressBase(e, \"value\") + currentValue, min, max);\n\n\t\tif (newValue !== currentValue) {\n\t\t\tconst stepPrecision = ctor._getDecimalPrecisionOfNumber(this.step);\n\t\t\tthis._updateHandleAndProgress(newValue!);\n\t\t\tthis.value = newValue!;\n\t\t\tthis.tooltipValue = this.value.toFixed(stepPrecision);\n\t\t\tthis.updateStateStorageAndFireInputEvent(\"value\");\n\t\t}\n\t}\n\n\t_onTooltopForwardFocus(e: CustomEvent) {\n\t\tconst tooltip = e.target as SliderTooltip;\n\n\t\ttooltip.followRef?.focus();\n\t}\n\n\tget inputValue() {\n\t\treturn this.value.toString();\n\t}\n\n\tget tooltip() {\n\t\treturn this.getDomRef()?.querySelector<SliderTooltip>(\"[ui5-slider-tooltip]\");\n\t}\n\n\tget _sliderHandle() : HTMLElement {\n\t\treturn this.shadowRoot!.querySelector(\"[ui5-slider-handle]\")!;\n\t}\n\n\tget _ariaDisabled() {\n\t\treturn this.disabled || undefined;\n\t}\n\n\tget _ariaLabelledByText() {\n\t\treturn Slider.i18nBundle.getText(SLIDER_ARIA_DESCRIPTION);\n\t}\n\n\tget _ariaDescribedByInputText() {\n\t\treturn Slider.i18nBundle.getText(SLIDER_TOOLTIP_INPUT_DESCRIPTION);\n\t}\n\n\tget _ariaLabelledByInputText() {\n\t\treturn Slider.i18nBundle.getText(SLIDER_TOOLTIP_INPUT_LABEL);\n\t}\n\n\t// TODO: Refactor these methods after RangeSlider is refactored\n\tget tickmarksObject() {\n\t\treturn [];\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tconst target = e.target as HTMLElement;\n\n\t\tif (isF2(e) && target.hasAttribute(\"ui5-slider-handle\")) {\n\t\t\t(target.parentNode!.querySelector(\"[ui5-slider-tooltip]\") as HTMLElement).focus();\n\t\t}\n\n\t\tif (SliderBase._isActionKey(e) && target && !target.hasAttribute(\"ui5-slider-tooltip\")) {\n\t\t\te.preventDefault();\n\n\t\t\tthis._isUserInteraction = true;\n\t\t\tthis._handleActionKeyPress(e);\n\t\t}\n\t}\n}\n\nSlider.define();\n\nexport default Slider;\n"]}
@@ -0,0 +1,61 @@
1
+ import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
2
+ import type { SliderScaleOrientation } from "./SliderScale.js";
3
+ /**
4
+ * @class
5
+ * The <code>ui5-slider-handle</code> component represents the handle of the <code>ui5-slider</code> component.
6
+ *
7
+ * @constructor
8
+ * @extends UI5Element
9
+ * @since 2.19.0
10
+ * @private
11
+ */
12
+ declare class SliderHandle extends UI5Element {
13
+ /**
14
+ * Defines the value of the slider handle.
15
+ * <br><br>
16
+ * <b>Note:</b> The value should be between the <code>min</code> and <code>max</code> properties of the parent <code>ui5-slider</code>.
17
+ * @since 2.19.0
18
+ * @public
19
+ */
20
+ value: number;
21
+ /**
22
+ * Defines the minimum value of the slider handle.
23
+ * <br><br>
24
+ * <b>Note:</b> The value should be less than the <code>max</code> property of the parent <code>ui5-slider</code>.
25
+ * @since 2.19.0
26
+ * @public
27
+ */
28
+ min: number;
29
+ /**
30
+ * Defines the maximum value of the slider handle.
31
+ * <br><br>
32
+ * <b>Note:</b> The value should be greater than the <code>min</code> property of the parent <code>ui5-slider</code>.
33
+ * @since 2.19.0
34
+ * @public
35
+ */
36
+ max: number;
37
+ /**
38
+ * Defines whether the slider handle is disabled.
39
+ * <br><br>
40
+ * <b>Note:</b> A disabled slider handle cannot be interacted with.
41
+ * @since 2.19.0
42
+ * @public
43
+ */
44
+ disabled: boolean;
45
+ /**
46
+ * Defines whether the slider handle is active.
47
+ * <br><br>
48
+ * <b>Note:</b> An active slider handle is currently being interacted with.
49
+ * @since 2.19.0
50
+ * @public
51
+ */
52
+ active: boolean;
53
+ /**
54
+ * Defines the orientation of the slider handle.
55
+ *
56
+ * @private
57
+ */
58
+ orientation: `${SliderScaleOrientation}`;
59
+ getFocusDomRef(): HTMLElement | undefined;
60
+ }
61
+ export default SliderHandle;