@umbraco-ui/uui 2.0.0-rc.2 → 2.0.1

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 (635) hide show
  1. package/custom-elements.json +103 -1
  2. package/dist/_virtual/_@oxc-project_runtime@0.138.0/helpers/esm/decorate.js +9 -0
  3. package/dist/components/action-bar/action-bar.d.ts +0 -1
  4. package/dist/components/action-bar/action-bar.element.js +15 -12
  5. package/dist/components/action-bar/action-bar.element.js.map +1 -1
  6. package/dist/components/action-bar/action-bar.js +5 -5
  7. package/dist/components/action-bar/action-bar.js.map +1 -1
  8. package/dist/components/avatar/avatar.d.ts +0 -1
  9. package/dist/components/avatar/avatar.element.js +72 -86
  10. package/dist/components/avatar/avatar.element.js.map +1 -1
  11. package/dist/components/avatar/avatar.js +5 -5
  12. package/dist/components/avatar/avatar.js.map +1 -1
  13. package/dist/components/avatar-group/avatar-group.d.ts +0 -1
  14. package/dist/components/avatar-group/avatar-group.element.js +58 -68
  15. package/dist/components/avatar-group/avatar-group.element.js.map +1 -1
  16. package/dist/components/avatar-group/avatar-group.js +5 -5
  17. package/dist/components/avatar-group/avatar-group.js.map +1 -1
  18. package/dist/components/badge/badge.d.ts +0 -1
  19. package/dist/components/badge/badge.element.js +32 -38
  20. package/dist/components/badge/badge.element.js.map +1 -1
  21. package/dist/components/badge/badge.js +5 -5
  22. package/dist/components/badge/badge.js.map +1 -1
  23. package/dist/components/boolean-input/UUIBooleanInputEvent.js +15 -13
  24. package/dist/components/boolean-input/UUIBooleanInputEvent.js.map +1 -1
  25. package/dist/components/boolean-input/boolean-input.d.ts +0 -1
  26. package/dist/components/boolean-input/boolean-input.element.js +114 -134
  27. package/dist/components/boolean-input/boolean-input.element.js.map +1 -1
  28. package/dist/components/boolean-input/boolean-input.js +3 -0
  29. package/dist/components/box/box.d.ts +0 -1
  30. package/dist/components/box/box.element.js +74 -77
  31. package/dist/components/box/box.element.js.map +1 -1
  32. package/dist/components/box/box.js +5 -5
  33. package/dist/components/box/box.js.map +1 -1
  34. package/dist/components/breadcrumbs/breadcrumb-item.element.js +45 -50
  35. package/dist/components/breadcrumbs/breadcrumb-item.element.js.map +1 -1
  36. package/dist/components/breadcrumbs/breadcrumbs.d.ts +0 -1
  37. package/dist/components/breadcrumbs/breadcrumbs.element.js +40 -47
  38. package/dist/components/breadcrumbs/breadcrumbs.element.js.map +1 -1
  39. package/dist/components/breadcrumbs/breadcrumbs.js +5 -6
  40. package/dist/components/breadcrumbs/breadcrumbs.js.map +1 -1
  41. package/dist/components/button/button.d.ts +0 -1
  42. package/dist/components/button/button.element.js +147 -199
  43. package/dist/components/button/button.element.js.map +1 -1
  44. package/dist/components/button/button.js +5 -5
  45. package/dist/components/button/button.js.map +1 -1
  46. package/dist/components/button-copy-text/UUICopyTextEvent.js +16 -12
  47. package/dist/components/button-copy-text/UUICopyTextEvent.js.map +1 -1
  48. package/dist/components/button-copy-text/button-copy-text.d.ts +0 -1
  49. package/dist/components/button-copy-text/button-copy-text.element.js +78 -93
  50. package/dist/components/button-copy-text/button-copy-text.element.js.map +1 -1
  51. package/dist/components/button-copy-text/button-copy-text.js +6 -7
  52. package/dist/components/button-copy-text/button-copy-text.js.map +1 -1
  53. package/dist/components/button-group/button-group.d.ts +0 -1
  54. package/dist/components/button-group/button-group.element.js +19 -14
  55. package/dist/components/button-group/button-group.element.js.map +1 -1
  56. package/dist/components/button-group/button-group.js +5 -5
  57. package/dist/components/button-group/button-group.js.map +1 -1
  58. package/dist/components/button-inline-create/UUIButtonInlineCreateEvent.js +16 -14
  59. package/dist/components/button-inline-create/UUIButtonInlineCreateEvent.js.map +1 -1
  60. package/dist/components/button-inline-create/button-inline-create.d.ts +0 -1
  61. package/dist/components/button-inline-create/button-inline-create.element.js +63 -88
  62. package/dist/components/button-inline-create/button-inline-create.element.js.map +1 -1
  63. package/dist/components/button-inline-create/button-inline-create.js +6 -7
  64. package/dist/components/button-inline-create/button-inline-create.js.map +1 -1
  65. package/dist/components/card/UUICardEvent.js +9 -7
  66. package/dist/components/card/UUICardEvent.js.map +1 -1
  67. package/dist/components/card/card.d.ts +0 -1
  68. package/dist/components/card/card.element.d.ts +7 -0
  69. package/dist/components/card/card.element.js +72 -69
  70. package/dist/components/card/card.element.js.map +1 -1
  71. package/dist/components/card/card.js +6 -7
  72. package/dist/components/card/card.js.map +1 -1
  73. package/dist/components/card-block-type/card-block-type.d.ts +0 -1
  74. package/dist/components/card-block-type/card-block-type.element.js +55 -74
  75. package/dist/components/card-block-type/card-block-type.element.js.map +1 -1
  76. package/dist/components/card-block-type/card-block-type.js +5 -5
  77. package/dist/components/card-block-type/card-block-type.js.map +1 -1
  78. package/dist/components/card-content-node/card-content-node.d.ts +0 -1
  79. package/dist/components/card-content-node/card-content-node.element.d.ts +1 -0
  80. package/dist/components/card-content-node/card-content-node.element.js +82 -83
  81. package/dist/components/card-content-node/card-content-node.element.js.map +1 -1
  82. package/dist/components/card-content-node/card-content-node.js +5 -5
  83. package/dist/components/card-content-node/card-content-node.js.map +1 -1
  84. package/dist/components/card-media/card-media.d.ts +0 -1
  85. package/dist/components/card-media/card-media.element.d.ts +4 -0
  86. package/dist/components/card-media/card-media.element.js +103 -89
  87. package/dist/components/card-media/card-media.element.js.map +1 -1
  88. package/dist/components/card-media/card-media.js +5 -5
  89. package/dist/components/card-media/card-media.js.map +1 -1
  90. package/dist/components/card-user/card-user.d.ts +0 -1
  91. package/dist/components/card-user/card-user.element.js +57 -72
  92. package/dist/components/card-user/card-user.element.js.map +1 -1
  93. package/dist/components/card-user/card-user.js +5 -5
  94. package/dist/components/card-user/card-user.js.map +1 -1
  95. package/dist/components/checkbox/checkbox.d.ts +0 -1
  96. package/dist/components/checkbox/checkbox.element.js +41 -22
  97. package/dist/components/checkbox/checkbox.element.js.map +1 -1
  98. package/dist/components/checkbox/checkbox.js +5 -5
  99. package/dist/components/checkbox/checkbox.js.map +1 -1
  100. package/dist/components/color-area/UUIColorAreaEvent.js +15 -13
  101. package/dist/components/color-area/UUIColorAreaEvent.js.map +1 -1
  102. package/dist/components/color-area/color-area.d.ts +0 -1
  103. package/dist/components/color-area/color-area.element.js +137 -174
  104. package/dist/components/color-area/color-area.element.js.map +1 -1
  105. package/dist/components/color-area/color-area.js +6 -7
  106. package/dist/components/color-area/color-area.js.map +1 -1
  107. package/dist/components/color-picker/UUIColorPickerEvent.js +15 -13
  108. package/dist/components/color-picker/UUIColorPickerEvent.js.map +1 -1
  109. package/dist/components/color-picker/color-picker.d.ts +0 -1
  110. package/dist/components/color-picker/color-picker.element.js +293 -334
  111. package/dist/components/color-picker/color-picker.element.js.map +1 -1
  112. package/dist/components/color-picker/color-picker.js +6 -7
  113. package/dist/components/color-picker/color-picker.js.map +1 -1
  114. package/dist/components/color-slider/UUIColorSliderEvent.js +15 -13
  115. package/dist/components/color-slider/UUIColorSliderEvent.js.map +1 -1
  116. package/dist/components/color-slider/color-slider.d.ts +0 -1
  117. package/dist/components/color-slider/color-slider.element.js +169 -219
  118. package/dist/components/color-slider/color-slider.element.js.map +1 -1
  119. package/dist/components/color-slider/color-slider.js +6 -7
  120. package/dist/components/color-slider/color-slider.js.map +1 -1
  121. package/dist/components/color-swatch/color-swatch.d.ts +0 -1
  122. package/dist/components/color-swatch/color-swatch.element.d.ts +1 -1
  123. package/dist/components/color-swatch/color-swatch.element.js +215 -201
  124. package/dist/components/color-swatch/color-swatch.element.js.map +1 -1
  125. package/dist/components/color-swatch/color-swatch.js +5 -5
  126. package/dist/components/color-swatch/color-swatch.js.map +1 -1
  127. package/dist/components/color-swatches/UUIColorSwatchesEvent.js +15 -13
  128. package/dist/components/color-swatches/UUIColorSwatchesEvent.js.map +1 -1
  129. package/dist/components/color-swatches/color-swatches.d.ts +0 -1
  130. package/dist/components/color-swatches/color-swatches.element.js +115 -132
  131. package/dist/components/color-swatches/color-swatches.element.js.map +1 -1
  132. package/dist/components/color-swatches/color-swatches.js +6 -7
  133. package/dist/components/color-swatches/color-swatches.js.map +1 -1
  134. package/dist/components/combobox/UUIComboboxEvent.js +18 -14
  135. package/dist/components/combobox/UUIComboboxEvent.js.map +1 -1
  136. package/dist/components/combobox/combobox.d.ts +0 -1
  137. package/dist/components/combobox/combobox.element.js +321 -425
  138. package/dist/components/combobox/combobox.element.js.map +1 -1
  139. package/dist/components/combobox/combobox.js +6 -7
  140. package/dist/components/combobox/combobox.js.map +1 -1
  141. package/dist/components/combobox-list/UUIComboboxListEvent.js +18 -14
  142. package/dist/components/combobox-list/UUIComboboxListEvent.js.map +1 -1
  143. package/dist/components/combobox-list/combobox-list-option.element.js +88 -80
  144. package/dist/components/combobox-list/combobox-list-option.element.js.map +1 -1
  145. package/dist/components/combobox-list/combobox-list.d.ts +0 -1
  146. package/dist/components/combobox-list/combobox-list.element.js +218 -275
  147. package/dist/components/combobox-list/combobox-list.element.js.map +1 -1
  148. package/dist/components/combobox-list/combobox-list.js +6 -8
  149. package/dist/components/combobox-list/combobox-list.js.map +1 -1
  150. package/dist/components/dialog/dialog.d.ts +0 -1
  151. package/dist/components/dialog/dialog.element.js +19 -14
  152. package/dist/components/dialog/dialog.element.js.map +1 -1
  153. package/dist/components/dialog/dialog.js +5 -5
  154. package/dist/components/dialog/dialog.js.map +1 -1
  155. package/dist/components/dialog-layout/dialog-layout.d.ts +0 -1
  156. package/dist/components/dialog-layout/dialog-layout.element.js +59 -64
  157. package/dist/components/dialog-layout/dialog-layout.element.js.map +1 -1
  158. package/dist/components/dialog-layout/dialog-layout.js +5 -5
  159. package/dist/components/dialog-layout/dialog-layout.js.map +1 -1
  160. package/dist/components/file-dropzone/UUIFileDropzoneEvent.js +18 -14
  161. package/dist/components/file-dropzone/UUIFileDropzoneEvent.js.map +1 -1
  162. package/dist/components/file-dropzone/file-dropzone.d.ts +0 -1
  163. package/dist/components/file-dropzone/file-dropzone.element.js +214 -257
  164. package/dist/components/file-dropzone/file-dropzone.element.js.map +1 -1
  165. package/dist/components/file-dropzone/file-dropzone.js +6 -7
  166. package/dist/components/file-dropzone/file-dropzone.js.map +1 -1
  167. package/dist/components/file-preview/UUIFileSize.js +46 -19
  168. package/dist/components/file-preview/UUIFileSize.js.map +1 -1
  169. package/dist/components/file-preview/file-preview.d.ts +0 -1
  170. package/dist/components/file-preview/file-preview.element.js +78 -103
  171. package/dist/components/file-preview/file-preview.element.js.map +1 -1
  172. package/dist/components/file-preview/file-preview.js +6 -5
  173. package/dist/components/file-preview/file-preview.js.map +1 -1
  174. package/dist/components/form/form.d.ts +0 -1
  175. package/dist/components/form/form.element.js +46 -46
  176. package/dist/components/form/form.element.js.map +1 -1
  177. package/dist/components/form/form.js +5 -5
  178. package/dist/components/form/form.js.map +1 -1
  179. package/dist/components/form-layout-item/form-layout-item.d.ts +0 -1
  180. package/dist/components/form-layout-item/form-layout-item.element.js +39 -45
  181. package/dist/components/form-layout-item/form-layout-item.element.js.map +1 -1
  182. package/dist/components/form-layout-item/form-layout-item.js +5 -5
  183. package/dist/components/form-layout-item/form-layout-item.js.map +1 -1
  184. package/dist/components/form-validation-message/form-validation-message.d.ts +0 -1
  185. package/dist/components/form-validation-message/form-validation-message.element.js +71 -89
  186. package/dist/components/form-validation-message/form-validation-message.element.js.map +1 -1
  187. package/dist/components/form-validation-message/form-validation-message.js +5 -5
  188. package/dist/components/form-validation-message/form-validation-message.js.map +1 -1
  189. package/dist/components/icon/UUIIconRequestEvent.js +21 -19
  190. package/dist/components/icon/UUIIconRequestEvent.js.map +1 -1
  191. package/dist/components/icon/icon.d.ts +0 -1
  192. package/dist/components/icon/icon.element.js +93 -117
  193. package/dist/components/icon/icon.element.js.map +1 -1
  194. package/dist/components/icon/icon.js +6 -7
  195. package/dist/components/icon/icon.js.map +1 -1
  196. package/dist/components/icon-registry/UUIIconHost.js +16 -17
  197. package/dist/components/icon-registry/UUIIconHost.js.map +1 -1
  198. package/dist/components/icon-registry/UUIIconRegistry.js +67 -77
  199. package/dist/components/icon-registry/UUIIconRegistry.js.map +1 -1
  200. package/dist/components/icon-registry/icon-registry.d.ts +0 -1
  201. package/dist/components/icon-registry/icon-registry.element.js +39 -48
  202. package/dist/components/icon-registry/icon-registry.element.js.map +1 -1
  203. package/dist/components/icon-registry/icon-registry.js +7 -6
  204. package/dist/components/icon-registry/icon-registry.js.map +1 -1
  205. package/dist/components/icon-registry-essential/UUIIconRegistryEssential.js +44 -42
  206. package/dist/components/icon-registry-essential/UUIIconRegistryEssential.js.map +1 -1
  207. package/dist/components/icon-registry-essential/icon-registry-essential.d.ts +0 -1
  208. package/dist/components/icon-registry-essential/icon-registry-essential.element.js +15 -9
  209. package/dist/components/icon-registry-essential/icon-registry-essential.element.js.map +1 -1
  210. package/dist/components/icon-registry-essential/icon-registry-essential.js +6 -39
  211. package/dist/components/icon-registry-essential/icon-registry-essential.js.map +1 -1
  212. package/dist/components/icon-registry-essential/svgs/iconAdd.js +6 -5
  213. package/dist/components/icon-registry-essential/svgs/iconAdd.js.map +1 -1
  214. package/dist/components/icon-registry-essential/svgs/iconAlert.js +6 -5
  215. package/dist/components/icon-registry-essential/svgs/iconAlert.js.map +1 -1
  216. package/dist/components/icon-registry-essential/svgs/iconAttachment.js +6 -5
  217. package/dist/components/icon-registry-essential/svgs/iconAttachment.js.map +1 -1
  218. package/dist/components/icon-registry-essential/svgs/iconCalendar.js +6 -5
  219. package/dist/components/icon-registry-essential/svgs/iconCalendar.js.map +1 -1
  220. package/dist/components/icon-registry-essential/svgs/iconCheck.js +6 -5
  221. package/dist/components/icon-registry-essential/svgs/iconCheck.js.map +1 -1
  222. package/dist/components/icon-registry-essential/svgs/iconClipboard.js +6 -5
  223. package/dist/components/icon-registry-essential/svgs/iconClipboard.js.map +1 -1
  224. package/dist/components/icon-registry-essential/svgs/iconCode.js +6 -5
  225. package/dist/components/icon-registry-essential/svgs/iconCode.js.map +1 -1
  226. package/dist/components/icon-registry-essential/svgs/iconColorPicker.js +6 -5
  227. package/dist/components/icon-registry-essential/svgs/iconColorPicker.js.map +1 -1
  228. package/dist/components/icon-registry-essential/svgs/iconCopy.js +6 -5
  229. package/dist/components/icon-registry-essential/svgs/iconCopy.js.map +1 -1
  230. package/dist/components/icon-registry-essential/svgs/iconDelete.js +6 -5
  231. package/dist/components/icon-registry-essential/svgs/iconDelete.js.map +1 -1
  232. package/dist/components/icon-registry-essential/svgs/iconDocument.js +6 -5
  233. package/dist/components/icon-registry-essential/svgs/iconDocument.js.map +1 -1
  234. package/dist/components/icon-registry-essential/svgs/iconDownload.js +6 -5
  235. package/dist/components/icon-registry-essential/svgs/iconDownload.js.map +1 -1
  236. package/dist/components/icon-registry-essential/svgs/iconDrag.js +6 -5
  237. package/dist/components/icon-registry-essential/svgs/iconDrag.js.map +1 -1
  238. package/dist/components/icon-registry-essential/svgs/iconEdit.js +6 -5
  239. package/dist/components/icon-registry-essential/svgs/iconEdit.js.map +1 -1
  240. package/dist/components/icon-registry-essential/svgs/iconFavorite.js +6 -5
  241. package/dist/components/icon-registry-essential/svgs/iconFavorite.js.map +1 -1
  242. package/dist/components/icon-registry-essential/svgs/iconFolder.js +6 -5
  243. package/dist/components/icon-registry-essential/svgs/iconFolder.js.map +1 -1
  244. package/dist/components/icon-registry-essential/svgs/iconForbidden.js +6 -5
  245. package/dist/components/icon-registry-essential/svgs/iconForbidden.js.map +1 -1
  246. package/dist/components/icon-registry-essential/svgs/iconInfo.js +6 -5
  247. package/dist/components/icon-registry-essential/svgs/iconInfo.js.map +1 -1
  248. package/dist/components/icon-registry-essential/svgs/iconLink.js +6 -5
  249. package/dist/components/icon-registry-essential/svgs/iconLink.js.map +1 -1
  250. package/dist/components/icon-registry-essential/svgs/iconLock.js +6 -5
  251. package/dist/components/icon-registry-essential/svgs/iconLock.js.map +1 -1
  252. package/dist/components/icon-registry-essential/svgs/iconPause.js +6 -5
  253. package/dist/components/icon-registry-essential/svgs/iconPause.js.map +1 -1
  254. package/dist/components/icon-registry-essential/svgs/iconPicture.js +6 -5
  255. package/dist/components/icon-registry-essential/svgs/iconPicture.js.map +1 -1
  256. package/dist/components/icon-registry-essential/svgs/iconPlay.js +6 -5
  257. package/dist/components/icon-registry-essential/svgs/iconPlay.js.map +1 -1
  258. package/dist/components/icon-registry-essential/svgs/iconRemove.js +6 -5
  259. package/dist/components/icon-registry-essential/svgs/iconRemove.js.map +1 -1
  260. package/dist/components/icon-registry-essential/svgs/iconSearch.js +6 -5
  261. package/dist/components/icon-registry-essential/svgs/iconSearch.js.map +1 -1
  262. package/dist/components/icon-registry-essential/svgs/iconSee.js +6 -5
  263. package/dist/components/icon-registry-essential/svgs/iconSee.js.map +1 -1
  264. package/dist/components/icon-registry-essential/svgs/iconSettings.js +6 -5
  265. package/dist/components/icon-registry-essential/svgs/iconSettings.js.map +1 -1
  266. package/dist/components/icon-registry-essential/svgs/iconSubtract.js +6 -5
  267. package/dist/components/icon-registry-essential/svgs/iconSubtract.js.map +1 -1
  268. package/dist/components/icon-registry-essential/svgs/iconSync.js +6 -5
  269. package/dist/components/icon-registry-essential/svgs/iconSync.js.map +1 -1
  270. package/dist/components/icon-registry-essential/svgs/iconUnlock.js +6 -5
  271. package/dist/components/icon-registry-essential/svgs/iconUnlock.js.map +1 -1
  272. package/dist/components/icon-registry-essential/svgs/iconUnsee.js +6 -5
  273. package/dist/components/icon-registry-essential/svgs/iconUnsee.js.map +1 -1
  274. package/dist/components/icon-registry-essential/svgs/iconWand.js +6 -5
  275. package/dist/components/icon-registry-essential/svgs/iconWand.js.map +1 -1
  276. package/dist/components/icon-registry-essential/svgs/iconWrong.js +6 -5
  277. package/dist/components/icon-registry-essential/svgs/iconWrong.js.map +1 -1
  278. package/dist/components/icon-registry-essential/svgs/index.js +34 -0
  279. package/dist/components/index.js +206 -0
  280. package/dist/components/input/UUIInputEvent.js +18 -14
  281. package/dist/components/input/UUIInputEvent.js.map +1 -1
  282. package/dist/components/input/input.d.ts +0 -1
  283. package/dist/components/input/input.element.js +176 -201
  284. package/dist/components/input/input.element.js.map +1 -1
  285. package/dist/components/input/input.js +6 -7
  286. package/dist/components/input/input.js.map +1 -1
  287. package/dist/components/input-file/input-file.d.ts +0 -1
  288. package/dist/components/input-file/input-file.element.js +137 -211
  289. package/dist/components/input-file/input-file.element.js.map +1 -1
  290. package/dist/components/input-file/input-file.js +5 -5
  291. package/dist/components/input-file/input-file.js.map +1 -1
  292. package/dist/components/input-lock/UUIInputLockEvent.js +15 -13
  293. package/dist/components/input-lock/UUIInputLockEvent.js.map +1 -1
  294. package/dist/components/input-lock/input-lock.d.ts +0 -1
  295. package/dist/components/input-lock/input-lock.element.js +69 -105
  296. package/dist/components/input-lock/input-lock.element.js.map +1 -1
  297. package/dist/components/input-lock/input-lock.js +6 -7
  298. package/dist/components/input-lock/input-lock.js.map +1 -1
  299. package/dist/components/input-password/input-password.d.ts +0 -1
  300. package/dist/components/input-password/input-password.element.js +45 -90
  301. package/dist/components/input-password/input-password.element.js.map +1 -1
  302. package/dist/components/input-password/input-password.js +5 -5
  303. package/dist/components/input-password/input-password.js.map +1 -1
  304. package/dist/components/keyboard-shortcut/key.element.js +19 -14
  305. package/dist/components/keyboard-shortcut/key.element.js.map +1 -1
  306. package/dist/components/keyboard-shortcut/keyboard-shortcut.d.ts +0 -1
  307. package/dist/components/keyboard-shortcut/keyboard-shortcut.element.js +19 -14
  308. package/dist/components/keyboard-shortcut/keyboard-shortcut.element.js.map +1 -1
  309. package/dist/components/keyboard-shortcut/keyboard-shortcut.js +5 -6
  310. package/dist/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
  311. package/dist/components/label/label.d.ts +0 -1
  312. package/dist/components/label/label.element.js +52 -54
  313. package/dist/components/label/label.element.js.map +1 -1
  314. package/dist/components/label/label.js +5 -5
  315. package/dist/components/label/label.js.map +1 -1
  316. package/dist/components/loader/loader.d.ts +0 -1
  317. package/dist/components/loader/loader.element.js +18 -14
  318. package/dist/components/loader/loader.element.js.map +1 -1
  319. package/dist/components/loader/loader.js +5 -5
  320. package/dist/components/loader/loader.js.map +1 -1
  321. package/dist/components/loader-bar/loader-bar.d.ts +0 -1
  322. package/dist/components/loader-bar/loader-bar.element.js +55 -52
  323. package/dist/components/loader-bar/loader-bar.element.js.map +1 -1
  324. package/dist/components/loader-bar/loader-bar.js +5 -5
  325. package/dist/components/loader-bar/loader-bar.js.map +1 -1
  326. package/dist/components/loader-circle/loader-circle.d.ts +0 -1
  327. package/dist/components/loader-circle/loader-circle.element.js +52 -59
  328. package/dist/components/loader-circle/loader-circle.element.js.map +1 -1
  329. package/dist/components/loader-circle/loader-circle.js +5 -5
  330. package/dist/components/loader-circle/loader-circle.js.map +1 -1
  331. package/dist/components/menu-item/UUIMenuItemEvent.js +15 -9
  332. package/dist/components/menu-item/UUIMenuItemEvent.js.map +1 -1
  333. package/dist/components/menu-item/menu-item.d.ts +0 -1
  334. package/dist/components/menu-item/menu-item.element.js +136 -139
  335. package/dist/components/menu-item/menu-item.element.js.map +1 -1
  336. package/dist/components/menu-item/menu-item.js +6 -7
  337. package/dist/components/menu-item/menu-item.js.map +1 -1
  338. package/dist/components/modal/modal-container.js +86 -141
  339. package/dist/components/modal/modal-container.js.map +1 -1
  340. package/dist/components/modal/modal-dialog.element.js +14 -15
  341. package/dist/components/modal/modal-dialog.element.js.map +1 -1
  342. package/dist/components/modal/modal-sidebar.element.js +41 -64
  343. package/dist/components/modal/modal-sidebar.element.js.map +1 -1
  344. package/dist/components/modal/modal.d.ts +0 -1
  345. package/dist/components/modal/modal.element.js +89 -106
  346. package/dist/components/modal/modal.element.js.map +1 -1
  347. package/dist/components/modal/modal.js +6 -12
  348. package/dist/components/modal/modal.js.map +1 -1
  349. package/dist/components/pagination/UUIPaginationEvent.js +15 -13
  350. package/dist/components/pagination/UUIPaginationEvent.js.map +1 -1
  351. package/dist/components/pagination/pagination.d.ts +0 -1
  352. package/dist/components/pagination/pagination.element.js +188 -228
  353. package/dist/components/pagination/pagination.element.js.map +1 -1
  354. package/dist/components/pagination/pagination.js +6 -7
  355. package/dist/components/pagination/pagination.js.map +1 -1
  356. package/dist/components/popover-container/popover-container.d.ts +0 -1
  357. package/dist/components/popover-container/popover-container.element.d.ts +1 -0
  358. package/dist/components/popover-container/popover-container.element.js +290 -335
  359. package/dist/components/popover-container/popover-container.element.js.map +1 -1
  360. package/dist/components/popover-container/popover-container.js +5 -5
  361. package/dist/components/popover-container/popover-container.js.map +1 -1
  362. package/dist/components/progress-bar/progress-bar.d.ts +0 -1
  363. package/dist/components/progress-bar/progress-bar.element.js +41 -43
  364. package/dist/components/progress-bar/progress-bar.element.js.map +1 -1
  365. package/dist/components/progress-bar/progress-bar.js +5 -5
  366. package/dist/components/progress-bar/progress-bar.js.map +1 -1
  367. package/dist/components/radio/UUIRadioEvent.js +15 -13
  368. package/dist/components/radio/UUIRadioEvent.js.map +1 -1
  369. package/dist/components/radio/UUIRadioGroupEvent.js +15 -13
  370. package/dist/components/radio/UUIRadioGroupEvent.js.map +1 -1
  371. package/dist/components/radio/radio-group.element.js +224 -279
  372. package/dist/components/radio/radio-group.element.js.map +1 -1
  373. package/dist/components/radio/radio.d.ts +0 -1
  374. package/dist/components/radio/radio.element.js +100 -123
  375. package/dist/components/radio/radio.element.js.map +1 -1
  376. package/dist/components/radio/radio.js +7 -10
  377. package/dist/components/radio/radio.js.map +1 -1
  378. package/dist/components/range-slider/UUIRangeSliderEvent.js +18 -14
  379. package/dist/components/range-slider/UUIRangeSliderEvent.js.map +1 -1
  380. package/dist/components/range-slider/range-slider.d.ts +0 -1
  381. package/dist/components/range-slider/range-slider.element.js +439 -504
  382. package/dist/components/range-slider/range-slider.element.js.map +1 -1
  383. package/dist/components/range-slider/range-slider.js +6 -7
  384. package/dist/components/range-slider/range-slider.js.map +1 -1
  385. package/dist/components/ref/UUIRefEvent.js +9 -7
  386. package/dist/components/ref/UUIRefEvent.js.map +1 -1
  387. package/dist/components/ref/ref.d.ts +0 -1
  388. package/dist/components/ref/ref.element.js +55 -50
  389. package/dist/components/ref/ref.element.js.map +1 -1
  390. package/dist/components/ref/ref.js +6 -7
  391. package/dist/components/ref/ref.js.map +1 -1
  392. package/dist/components/ref-list/ref-list.d.ts +0 -1
  393. package/dist/components/ref-list/ref-list.element.js +17 -14
  394. package/dist/components/ref-list/ref-list.element.js.map +1 -1
  395. package/dist/components/ref-list/ref-list.js +5 -5
  396. package/dist/components/ref-list/ref-list.js.map +1 -1
  397. package/dist/components/ref-node/ref-node.d.ts +0 -1
  398. package/dist/components/ref-node/ref-node.element.js +91 -109
  399. package/dist/components/ref-node/ref-node.element.js.map +1 -1
  400. package/dist/components/ref-node/ref-node.js +5 -5
  401. package/dist/components/ref-node/ref-node.js.map +1 -1
  402. package/dist/components/ref-node-data-type/ref-node-data-type.d.ts +0 -1
  403. package/dist/components/ref-node-data-type/ref-node-data-type.element.js +30 -35
  404. package/dist/components/ref-node-data-type/ref-node-data-type.element.js.map +1 -1
  405. package/dist/components/ref-node-data-type/ref-node-data-type.js +5 -5
  406. package/dist/components/ref-node-data-type/ref-node-data-type.js.map +1 -1
  407. package/dist/components/ref-node-document-type/ref-node-document-type.d.ts +0 -1
  408. package/dist/components/ref-node-document-type/ref-node-document-type.element.js +30 -35
  409. package/dist/components/ref-node-document-type/ref-node-document-type.element.js.map +1 -1
  410. package/dist/components/ref-node-document-type/ref-node-document-type.js +5 -5
  411. package/dist/components/ref-node-document-type/ref-node-document-type.js.map +1 -1
  412. package/dist/components/ref-node-form/ref-node-form.d.ts +0 -1
  413. package/dist/components/ref-node-form/ref-node-form.element.js +21 -12
  414. package/dist/components/ref-node-form/ref-node-form.element.js.map +1 -1
  415. package/dist/components/ref-node-form/ref-node-form.js +5 -5
  416. package/dist/components/ref-node-form/ref-node-form.js.map +1 -1
  417. package/dist/components/ref-node-member/ref-node-member.d.ts +0 -1
  418. package/dist/components/ref-node-member/ref-node-member.element.js +33 -35
  419. package/dist/components/ref-node-member/ref-node-member.element.js.map +1 -1
  420. package/dist/components/ref-node-member/ref-node-member.js +5 -5
  421. package/dist/components/ref-node-member/ref-node-member.js.map +1 -1
  422. package/dist/components/ref-node-package/ref-node-package.d.ts +0 -1
  423. package/dist/components/ref-node-package/ref-node-package.element.js +33 -42
  424. package/dist/components/ref-node-package/ref-node-package.element.js.map +1 -1
  425. package/dist/components/ref-node-package/ref-node-package.js +5 -5
  426. package/dist/components/ref-node-package/ref-node-package.js.map +1 -1
  427. package/dist/components/ref-node-user/ref-node-user.d.ts +0 -1
  428. package/dist/components/ref-node-user/ref-node-user.element.js +33 -35
  429. package/dist/components/ref-node-user/ref-node-user.element.js.map +1 -1
  430. package/dist/components/ref-node-user/ref-node-user.js +5 -5
  431. package/dist/components/ref-node-user/ref-node-user.js.map +1 -1
  432. package/dist/components/responsive-container/responsive-container.d.ts +0 -1
  433. package/dist/components/responsive-container/responsive-container.element.js +186 -244
  434. package/dist/components/responsive-container/responsive-container.element.js.map +1 -1
  435. package/dist/components/responsive-container/responsive-container.js +5 -5
  436. package/dist/components/responsive-container/responsive-container.js.map +1 -1
  437. package/dist/components/scroll-container/scroll-container.d.ts +0 -1
  438. package/dist/components/scroll-container/scroll-container.element.js +35 -36
  439. package/dist/components/scroll-container/scroll-container.element.js.map +1 -1
  440. package/dist/components/scroll-container/scroll-container.js +5 -5
  441. package/dist/components/scroll-container/scroll-container.js.map +1 -1
  442. package/dist/components/select/UUISelectEvent.js +15 -13
  443. package/dist/components/select/UUISelectEvent.js.map +1 -1
  444. package/dist/components/select/select.d.ts +0 -1
  445. package/dist/components/select/select.element.js +134 -163
  446. package/dist/components/select/select.element.js.map +1 -1
  447. package/dist/components/select/select.js +6 -7
  448. package/dist/components/select/select.js.map +1 -1
  449. package/dist/components/slider/UUISliderEvent.js +18 -14
  450. package/dist/components/slider/UUISliderEvent.js.map +1 -1
  451. package/dist/components/slider/native-input.styles.js +6 -5
  452. package/dist/components/slider/native-input.styles.js.map +1 -1
  453. package/dist/components/slider/slider.d.ts +0 -1
  454. package/dist/components/slider/slider.element.d.ts +7 -0
  455. package/dist/components/slider/slider.element.js +197 -227
  456. package/dist/components/slider/slider.element.js.map +1 -1
  457. package/dist/components/slider/slider.js +6 -7
  458. package/dist/components/slider/slider.js.map +1 -1
  459. package/dist/components/symbol-drag-handle/symbol-drag-handle.d.ts +0 -1
  460. package/dist/components/symbol-drag-handle/symbol-drag-handle.element.js +19 -16
  461. package/dist/components/symbol-drag-handle/symbol-drag-handle.element.js.map +1 -1
  462. package/dist/components/symbol-drag-handle/symbol-drag-handle.js +5 -5
  463. package/dist/components/symbol-drag-handle/symbol-drag-handle.js.map +1 -1
  464. package/dist/components/symbol-expand/symbol-expand.d.ts +0 -1
  465. package/dist/components/symbol-expand/symbol-expand.element.js +27 -30
  466. package/dist/components/symbol-expand/symbol-expand.element.js.map +1 -1
  467. package/dist/components/symbol-expand/symbol-expand.js +5 -5
  468. package/dist/components/symbol-expand/symbol-expand.js.map +1 -1
  469. package/dist/components/symbol-file/symbol-file.d.ts +0 -1
  470. package/dist/components/symbol-file/symbol-file.element.js +24 -32
  471. package/dist/components/symbol-file/symbol-file.element.js.map +1 -1
  472. package/dist/components/symbol-file/symbol-file.js +5 -5
  473. package/dist/components/symbol-file/symbol-file.js.map +1 -1
  474. package/dist/components/symbol-file-dropzone/symbol-file-dropzone.d.ts +0 -1
  475. package/dist/components/symbol-file-dropzone/symbol-file-dropzone.element.js +26 -30
  476. package/dist/components/symbol-file-dropzone/symbol-file-dropzone.element.js.map +1 -1
  477. package/dist/components/symbol-file-dropzone/symbol-file-dropzone.js +5 -5
  478. package/dist/components/symbol-file-dropzone/symbol-file-dropzone.js.map +1 -1
  479. package/dist/components/symbol-file-thumbnail/symbol-file-thumbnail.d.ts +0 -1
  480. package/dist/components/symbol-file-thumbnail/symbol-file-thumbnail.element.js +39 -95
  481. package/dist/components/symbol-file-thumbnail/symbol-file-thumbnail.element.js.map +1 -1
  482. package/dist/components/symbol-file-thumbnail/symbol-file-thumbnail.js +5 -5
  483. package/dist/components/symbol-file-thumbnail/symbol-file-thumbnail.js.map +1 -1
  484. package/dist/components/symbol-folder/symbol-folder.d.ts +0 -1
  485. package/dist/components/symbol-folder/symbol-folder.element.js +17 -14
  486. package/dist/components/symbol-folder/symbol-folder.element.js.map +1 -1
  487. package/dist/components/symbol-folder/symbol-folder.js +5 -5
  488. package/dist/components/symbol-folder/symbol-folder.js.map +1 -1
  489. package/dist/components/symbol-lock/symbol-lock.d.ts +0 -1
  490. package/dist/components/symbol-lock/symbol-lock.element.js +26 -30
  491. package/dist/components/symbol-lock/symbol-lock.element.js.map +1 -1
  492. package/dist/components/symbol-lock/symbol-lock.js +5 -5
  493. package/dist/components/symbol-lock/symbol-lock.js.map +1 -1
  494. package/dist/components/symbol-more/symbol-more.d.ts +0 -1
  495. package/dist/components/symbol-more/symbol-more.element.js +17 -14
  496. package/dist/components/symbol-more/symbol-more.element.js.map +1 -1
  497. package/dist/components/symbol-more/symbol-more.js +5 -5
  498. package/dist/components/symbol-more/symbol-more.js.map +1 -1
  499. package/dist/components/symbol-sort/symbol-sort.d.ts +0 -1
  500. package/dist/components/symbol-sort/symbol-sort.element.js +29 -31
  501. package/dist/components/symbol-sort/symbol-sort.element.js.map +1 -1
  502. package/dist/components/symbol-sort/symbol-sort.js +5 -5
  503. package/dist/components/symbol-sort/symbol-sort.js.map +1 -1
  504. package/dist/components/table/table-cell.element.js +65 -71
  505. package/dist/components/table/table-cell.element.js.map +1 -1
  506. package/dist/components/table/table-column.element.js +14 -10
  507. package/dist/components/table/table-column.element.js.map +1 -1
  508. package/dist/components/table/table-head-cell.element.js +19 -16
  509. package/dist/components/table/table-head-cell.element.js.map +1 -1
  510. package/dist/components/table/table-head.element.js +23 -18
  511. package/dist/components/table/table-head.element.js.map +1 -1
  512. package/dist/components/table/table-row.element.js +41 -52
  513. package/dist/components/table/table-row.element.js.map +1 -1
  514. package/dist/components/table/table.d.ts +0 -1
  515. package/dist/components/table/table.element.js +31 -20
  516. package/dist/components/table/table.element.js.map +1 -1
  517. package/dist/components/table/table.js +5 -10
  518. package/dist/components/table/table.js.map +1 -1
  519. package/dist/components/tabs/UUITabEvent.js +6 -6
  520. package/dist/components/tabs/UUITabEvent.js.map +1 -1
  521. package/dist/components/tabs/UUITabGroupEvent.js +6 -6
  522. package/dist/components/tabs/UUITabGroupEvent.js.map +1 -1
  523. package/dist/components/tabs/tab-group.element.js +188 -251
  524. package/dist/components/tabs/tab-group.element.js.map +1 -1
  525. package/dist/components/tabs/tab.element.js +66 -56
  526. package/dist/components/tabs/tab.element.js.map +1 -1
  527. package/dist/components/tabs/tabs.d.ts +0 -1
  528. package/dist/components/tabs/tabs.js +7 -6
  529. package/dist/components/tabs/tabs.js.map +1 -1
  530. package/dist/components/tag/tag.d.ts +0 -1
  531. package/dist/components/tag/tag.element.js +32 -34
  532. package/dist/components/tag/tag.element.js.map +1 -1
  533. package/dist/components/tag/tag.js +5 -5
  534. package/dist/components/tag/tag.js.map +1 -1
  535. package/dist/components/textarea/UUITextareaEvent.js +18 -14
  536. package/dist/components/textarea/UUITextareaEvent.js.map +1 -1
  537. package/dist/components/textarea/textarea.d.ts +0 -1
  538. package/dist/components/textarea/textarea.element.d.ts +2 -0
  539. package/dist/components/textarea/textarea.element.js +153 -180
  540. package/dist/components/textarea/textarea.element.js.map +1 -1
  541. package/dist/components/textarea/textarea.js +6 -7
  542. package/dist/components/textarea/textarea.js.map +1 -1
  543. package/dist/components/toast-notification/UUIToastNotificationEvent.js +18 -10
  544. package/dist/components/toast-notification/UUIToastNotificationEvent.js.map +1 -1
  545. package/dist/components/toast-notification/toast-notification.d.ts +0 -1
  546. package/dist/components/toast-notification/toast-notification.element.js +155 -224
  547. package/dist/components/toast-notification/toast-notification.element.js.map +1 -1
  548. package/dist/components/toast-notification/toast-notification.js +6 -7
  549. package/dist/components/toast-notification/toast-notification.js.map +1 -1
  550. package/dist/components/toast-notification-container/toast-notification-container.d.ts +0 -1
  551. package/dist/components/toast-notification-container/toast-notification-container.element.js +98 -122
  552. package/dist/components/toast-notification-container/toast-notification-container.element.js.map +1 -1
  553. package/dist/components/toast-notification-container/toast-notification-container.js +6 -9
  554. package/dist/components/toast-notification-container/toast-notification-container.js.map +1 -1
  555. package/dist/components/toast-notification-layout/toast-notification-layout.d.ts +0 -1
  556. package/dist/components/toast-notification-layout/toast-notification-layout.element.js +33 -39
  557. package/dist/components/toast-notification-layout/toast-notification-layout.element.js.map +1 -1
  558. package/dist/components/toast-notification-layout/toast-notification-layout.js +6 -9
  559. package/dist/components/toast-notification-layout/toast-notification-layout.js.map +1 -1
  560. package/dist/components/toggle/toggle.d.ts +0 -1
  561. package/dist/components/toggle/toggle.element.js +43 -54
  562. package/dist/components/toggle/toggle.element.js.map +1 -1
  563. package/dist/components/toggle/toggle.js +5 -5
  564. package/dist/components/toggle/toggle.js.map +1 -1
  565. package/dist/components/visually-hidden/visually-hidden.d.ts +0 -1
  566. package/dist/components/visually-hidden/visually-hidden.element.js +17 -14
  567. package/dist/components/visually-hidden/visually-hidden.element.js.map +1 -1
  568. package/dist/components/visually-hidden/visually-hidden.js +5 -5
  569. package/dist/components/visually-hidden/visually-hidden.js.map +1 -1
  570. package/dist/index.js +115 -359
  571. package/dist/internal/animations/uui-blink.js +7 -7
  572. package/dist/internal/animations/uui-blink.js.map +1 -1
  573. package/dist/internal/animations/uui-pulse.js +7 -9
  574. package/dist/internal/animations/uui-pulse.js.map +1 -1
  575. package/dist/internal/animations/uui-shake.js +7 -9
  576. package/dist/internal/animations/uui-shake.js.map +1 -1
  577. package/dist/internal/events/UUIEvent.js +13 -9
  578. package/dist/internal/events/UUIEvent.js.map +1 -1
  579. package/dist/internal/events/UUIFormControlEvent.d.ts +2 -2
  580. package/dist/internal/events/UUIFormControlEvent.js +18 -14
  581. package/dist/internal/events/UUIFormControlEvent.js.map +1 -1
  582. package/dist/internal/events/UUISelectableEvent.js +19 -15
  583. package/dist/internal/events/UUISelectableEvent.js.map +1 -1
  584. package/dist/internal/mixins/ActiveMixin.js +24 -24
  585. package/dist/internal/mixins/ActiveMixin.js.map +1 -1
  586. package/dist/internal/mixins/FormControlMixin.d.ts +3 -3
  587. package/dist/internal/mixins/FormControlMixin.js +276 -339
  588. package/dist/internal/mixins/FormControlMixin.js.map +1 -1
  589. package/dist/internal/mixins/FormControlWithBasicsMixin.d.ts +19 -3
  590. package/dist/internal/mixins/FormControlWithBasicsMixin.js +54 -60
  591. package/dist/internal/mixins/FormControlWithBasicsMixin.js.map +1 -1
  592. package/dist/internal/mixins/LabelMixin.js +54 -57
  593. package/dist/internal/mixins/LabelMixin.js.map +1 -1
  594. package/dist/internal/mixins/PopoverTargetMixin.js +43 -47
  595. package/dist/internal/mixins/PopoverTargetMixin.js.map +1 -1
  596. package/dist/internal/mixins/SelectOnlyMixin.js +39 -33
  597. package/dist/internal/mixins/SelectOnlyMixin.js.map +1 -1
  598. package/dist/internal/mixins/SelectableMixin.js +109 -121
  599. package/dist/internal/mixins/SelectableMixin.js.map +1 -1
  600. package/dist/internal/registration/index.js +17 -20
  601. package/dist/internal/registration/index.js.map +1 -1
  602. package/dist/internal/types/InterfaceColor.js +11 -10
  603. package/dist/internal/types/InterfaceColor.js.map +1 -1
  604. package/dist/internal/types/InterfaceHeading.js +12 -11
  605. package/dist/internal/types/InterfaceHeading.js.map +1 -1
  606. package/dist/internal/types/InterfaceLook.js +11 -10
  607. package/dist/internal/types/InterfaceLook.js.map +1 -1
  608. package/dist/internal/utils/Timer.js +56 -61
  609. package/dist/internal/utils/Timer.js.map +1 -1
  610. package/dist/internal/utils/color.js +105 -74
  611. package/dist/internal/utils/color.js.map +1 -1
  612. package/dist/internal/utils/drag.js +27 -36
  613. package/dist/internal/utils/drag.js.map +1 -1
  614. package/dist/internal/utils/findAncestorByAttributeValue.js +22 -19
  615. package/dist/internal/utils/findAncestorByAttributeValue.js.map +1 -1
  616. package/dist/internal/utils/math.js +23 -13
  617. package/dist/internal/utils/math.js.map +1 -1
  618. package/dist/internal/utils/slotHasContent.js +6 -5
  619. package/dist/internal/utils/slotHasContent.js.map +1 -1
  620. package/dist/internal/version.js +10 -16
  621. package/dist/internal/version.js.map +1 -1
  622. package/dist/package.json.js +6 -5
  623. package/dist/package.json.js.map +1 -1
  624. package/dist/styles/uui-font.css +1 -1
  625. package/dist/styles/uui-text.css +1 -1
  626. package/dist/styles/uui-text.css.js +6 -5
  627. package/dist/styles/uui-text.css.js.map +1 -1
  628. package/dist/styles/uui-text.styles.js +7 -6
  629. package/dist/styles/uui-text.styles.js.map +1 -1
  630. package/dist/themes/dark.css +1 -1
  631. package/dist/themes/high-contrast.css +1 -1
  632. package/dist/themes/light.css +1 -1
  633. package/package.json +26 -25
  634. package/vscode.html-custom-data.json +36 -7
  635. package/dist/index.js.map +0 -1
@@ -1,373 +1,363 @@
1
- var __typeError = (msg) => {
2
- throw TypeError(msg);
3
- };
4
- var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
5
- var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
6
- var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
7
- var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
8
- var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
9
- var _UUIRangeSliderElement_instances, transferValueToInternalValues_fn, _onKeyDown;
10
- import { LitElement, html, svg, css } from "lit";
11
- import { property, state, query } from "lit/decorators.js";
12
- import { UUIRangeSliderEvent } from "./UUIRangeSliderEvent.js";
13
- import { UUIFormControlWithBasicsMixin } from "../../internal/mixins/FormControlWithBasicsMixin.js";
1
+ import __decorate from "../../_virtual/_@oxc-project_runtime@0.138.0/helpers/esm/decorate.js";
2
+ import { UUIFormControlMixin as UUIFormControlWithBasicsMixin } from "../../internal/mixins/FormControlWithBasicsMixin.js";
14
3
  import { clamp } from "../../internal/utils/math.js";
15
- var __defProp = Object.defineProperty;
16
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
17
- var __decorateClass = (decorators, target, key, kind) => {
18
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
19
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
20
- if (decorator = decorators[i])
21
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
22
- if (kind && result) __defProp(target, key, result);
23
- return result;
24
- };
25
- const Z_INDEX = {
26
- TOP: 3,
27
- CENTER: 2
4
+ import { UUIRangeSliderEvent } from "./UUIRangeSliderEvent.js";
5
+ import { LitElement, css, html, svg } from "lit";
6
+ import { property, query, state } from "lit/decorators.js";
7
+ //#region src/components/range-slider/range-slider.element.ts
8
+ var Z_INDEX = {
9
+ TOP: 3,
10
+ CENTER: 2,
11
+ BACK: 1
28
12
  };
29
- const THUMB_SIZE = 18;
30
- const TRACK_HEIGHT = 3;
31
- const TRACK_PADDING = 12;
32
- const STEP_MIN_WIDTH = 24;
33
- const CountDecimalPlaces = (num) => {
34
- const decimalIndex = num.toString().indexOf(".");
35
- return decimalIndex >= 0 ? num.toString().length - decimalIndex - 1 : 0;
13
+ var THUMB_SIZE = 18;
14
+ var TRACK_HEIGHT = 3;
15
+ var TRACK_PADDING = 12;
16
+ var STEP_MIN_WIDTH = 24;
17
+ var CountDecimalPlaces = (num) => {
18
+ const decimalIndex = num.toString().indexOf(".");
19
+ return decimalIndex >= 0 ? num.toString().length - decimalIndex - 1 : 0;
36
20
  };
37
- const _UUIRangeSliderElement = class _UUIRangeSliderElement extends UUIFormControlWithBasicsMixin(
38
- LitElement,
39
- ""
40
- ) {
41
- /** Constructor and Validator */
42
- constructor() {
43
- super();
44
- __privateAdd(this, _UUIRangeSliderElement_instances);
45
- __privateAdd(this, _onKeyDown);
46
- this.disabled = false;
47
- this.readonly = false;
48
- this._min = 0;
49
- this._max = 0;
50
- this.hideStepValues = false;
51
- this._step = 1;
52
- this._movement = false;
53
- this.startPoint = {
54
- mouse: 0,
55
- low: 0,
56
- high: 0
57
- };
58
- this._lowInputValue = 0;
59
- this._highInputValue = 0;
60
- this._trackWidth = 0;
61
- this._lowValuePercentStart = 0;
62
- this._highValuePercentEnd = 100;
63
- __privateSet(this, _onKeyDown, (e) => {
64
- if (e.key == "Enter") {
65
- this.submit();
66
- }
67
- });
68
- this._onTouchStart = (e) => {
69
- if (this.disabled) return;
70
- const target = e.composedPath()[0];
71
- if (target === this._outerTrack) return;
72
- if (target === this._innerColor || target === this._innerColorThumb) {
73
- window.addEventListener("touchend", this._onTouchEnd);
74
- window.addEventListener("touchcancel", this._onTouchEnd);
75
- window.addEventListener("touchmove", this._onTouchMove);
76
- this._movement = true;
77
- this._saveStartPoints(e.touches[0].pageX);
78
- } else {
79
- const value = this._getClickedValue(e.touches[0].pageX);
80
- const diffLow = Math.abs(this._lowInputValue - value);
81
- const diffHigh = Math.abs(this._highInputValue - value);
82
- if (diffLow < diffHigh) {
83
- this.setValueLow(value);
84
- } else {
85
- this.setValueHigh(value);
86
- }
87
- }
88
- };
89
- this._onTouchMove = (e) => {
90
- this._dragBothValuesByMousePos(e.touches[0].pageX);
91
- };
92
- this._onTouchEnd = () => {
93
- this._movement = false;
94
- this.onChanged();
95
- window.removeEventListener("touchend", this._onTouchEnd);
96
- window.removeEventListener("touchcancel", this._onTouchEnd);
97
- window.removeEventListener("touchmove", this._onTouchMove);
98
- };
99
- this._onMouseDown = (e) => {
100
- if (this.disabled) return;
101
- if (this.readonly) return;
102
- const target = e.composedPath()[0];
103
- if (target === this._outerTrack) return;
104
- if (target === this._innerColor || target === this._innerColorThumb) {
105
- window.addEventListener("mouseup", this._onMouseUp);
106
- window.addEventListener("mousemove", this._onMouseMove);
107
- this._movement = true;
108
- this._saveStartPoints(e.pageX);
109
- } else {
110
- const value = this._getClickedValue(e.pageX);
111
- const diffLow = Math.abs(this._lowInputValue - value);
112
- const diffHigh = Math.abs(this._highInputValue - value);
113
- if (diffLow < diffHigh) {
114
- this.setValueLow(value);
115
- } else {
116
- this.setValueHigh(value);
117
- }
118
- }
119
- };
120
- this._onMouseMove = (e) => {
121
- e.preventDefault();
122
- this._dragBothValuesByMousePos(e.pageX);
123
- };
124
- this._onMouseUp = () => {
125
- this._movement = false;
126
- this.onChanged();
127
- window.removeEventListener("mouseup", this._onMouseUp);
128
- window.removeEventListener("mousemove", this._onMouseMove);
129
- };
130
- this.addEventListener("keydown", __privateGet(this, _onKeyDown));
131
- this.addEventListener("mousedown", this._onMouseDown);
132
- this.addEventListener("touchstart", this._onTouchStart);
133
- window.addEventListener("resize", () => {
134
- this._trackWidth = this._outerTrack?.offsetWidth;
135
- });
136
- }
137
- get min() {
138
- return this._min;
139
- }
140
- set min(newVal) {
141
- this._min = newVal;
142
- __privateMethod(this, _UUIRangeSliderElement_instances, transferValueToInternalValues_fn).call(this);
143
- }
144
- get max() {
145
- return this._max;
146
- }
147
- set max(newVal) {
148
- this._max = newVal;
149
- __privateMethod(this, _UUIRangeSliderElement_instances, transferValueToInternalValues_fn).call(this);
150
- }
151
- get step() {
152
- return this._step;
153
- }
154
- set step(newVal) {
155
- this._step = newVal;
156
- __privateMethod(this, _UUIRangeSliderElement_instances, transferValueToInternalValues_fn).call(this);
157
- }
158
- get minGap() {
159
- return this._minGap;
160
- }
161
- set minGap(newVal) {
162
- this._minGap = newVal;
163
- __privateMethod(this, _UUIRangeSliderElement_instances, transferValueToInternalValues_fn).call(this);
164
- }
165
- get maxGap() {
166
- return this._maxGap;
167
- }
168
- set maxGap(newVal) {
169
- this._maxGap = newVal;
170
- __privateMethod(this, _UUIRangeSliderElement_instances, transferValueToInternalValues_fn).call(this);
171
- }
172
- get value() {
173
- return super.value;
174
- }
175
- set value(newVal) {
176
- super.value = newVal;
177
- __privateMethod(this, _UUIRangeSliderElement_instances, transferValueToInternalValues_fn).call(this);
178
- }
179
- setValueLow(low) {
180
- const clampMin = this.maxGap ? Math.max(this._highInputValue - this.maxGap, this.min) : this.min;
181
- const clampMax = this.minGap ? this._highInputValue - this.minGap : this._highInputValue - this.step;
182
- low = clamp(low, clampMin, clampMax);
183
- this.setValue(low, this._highInputValue);
184
- }
185
- setValueHigh(high) {
186
- const clampMin = this.minGap ? this._lowInputValue + this.minGap : this._lowInputValue + this.step;
187
- const clampMax = this.maxGap ? Math.min(this.maxGap + this._lowInputValue, this.max) : this.max;
188
- high = clamp(high, clampMin, clampMax);
189
- this.setValue(this._lowInputValue, high);
190
- }
191
- setValue(low, high, lockValueRange) {
192
- if (lockValueRange) {
193
- const length = this.startPoint.high - this.startPoint.low;
194
- low = clamp(low, this.min, this.max - length);
195
- high = clamp(high, this.min + length, this.max);
196
- }
197
- this._inputLow.value = low.toString();
198
- this._inputHigh.value = high.toString();
199
- this.value = `${low},${high}`;
200
- }
201
- getFormElement() {
202
- return this._currentFocus ?? this._inputLow;
203
- }
204
- async focus() {
205
- await this.updateComplete;
206
- this.getFormElement().focus();
207
- }
208
- async blur() {
209
- await this.updateComplete;
210
- this.getFormElement().blur();
211
- }
212
- connectedCallback() {
213
- super.connectedCallback();
214
- if (!this.value) {
215
- this.value = `${this._min},${this._max}`;
216
- }
217
- }
218
- firstUpdated(changedProperties) {
219
- super.updated(changedProperties);
220
- this._trackWidth = this._outerTrack.offsetWidth;
221
- this._runPropertiesChecks();
222
- }
223
- _runPropertiesChecks() {
224
- const regex = new RegExp(/^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/);
225
- if (!regex.test(this.value))
226
- console.error(`Range slider (Value error occurred): Bad input`);
227
- if (this._highInputValue === this._lowInputValue) {
228
- console.error(
229
- `Range slider (Value error occurred): Low-end and high-end value should never be equal. Use <uui-slider></uui-slider> instead.`
230
- );
231
- }
232
- if (this._lowInputValue > this._highInputValue) {
233
- console.error(
234
- `Range slider (Value error occurred): Low-end value should never be higher than high-end value.`
235
- );
236
- }
237
- if (this._highInputValue > this._max || this._highInputValue < this._min) {
238
- this.setValueHigh(this._max);
239
- console.warn(
240
- `Conflict with the high-end value and max value. High-end value has been converted to the max value (${this._max})`
241
- );
242
- }
243
- if (this._lowInputValue < this._min || this._lowInputValue > this._max) {
244
- this.setValueLow(this._min);
245
- console.warn(
246
- `Conflict with the low-end value and min value. Low-end value has been converted to the min value (${this._min})`
247
- );
248
- }
249
- if (this._step <= 0) {
250
- this._step = 1;
251
- console.warn(
252
- `Property step needs a value higher than 0. Converted the step value to 1 (default)`
253
- );
254
- }
255
- if ((this._max - this._min) / this._step % 1 !== 0) {
256
- console.error(
257
- `Conflict with step value and the min and max values. May experience bad side effects`
258
- );
259
- }
260
- this._runGapChecks();
261
- }
262
- _runGapChecks() {
263
- if (this._minGap && this._minGap < this._step) {
264
- this._minGap = void 0;
265
- console.warn(
266
- `Conflict with min-gap and step value. The min-gap needs to be higher than the step value. Removed the min-gap property.`
267
- );
268
- }
269
- if (this._minGap && this._maxGap && this._minGap > this._maxGap) {
270
- this._minGap = void 0;
271
- this._maxGap = void 0;
272
- console.warn(
273
- `Conflict with min-gap and max-gap. Removed the min-gap and max-gap properties.`
274
- );
275
- }
276
- if (this._minGap && this._max - this._min < this._minGap) {
277
- this._minGap = void 0;
278
- console.warn(
279
- `Conflict with the min-gap and the total range. Removed the min-gap.`
280
- );
281
- }
282
- if (this._maxGap && this._highInputValue - this._lowInputValue > this._maxGap) {
283
- this.setValueHigh(this._lowInputValue + this._maxGap);
284
- console.warn(
285
- `Conflict with value and max-gap. High-end value has been converted to the highest possible value based on the low-end value and the max gap value (${this._highInputValue})`
286
- );
287
- }
288
- if (this._minGap && this._highInputValue - this._lowInputValue < this._minGap) {
289
- const minGap = this._minGap;
290
- if (this._highInputValue - minGap < this._min) {
291
- this.setValueHigh(this._lowInputValue + minGap);
292
- console.warn(
293
- `Conflict with value and min gap. High-end value has been converted to the lowest possible value based on the low-end value and the min gap value (${this._highInputValue}).`
294
- );
295
- } else {
296
- this.setValueLow(this._highInputValue - minGap);
297
- console.warn(
298
- `Conflict with value and min gap. Low-end value has been converted to the highest possible value based on the high-end value and the min gap value (${this._lowInputValue}).`
299
- );
300
- }
301
- }
302
- }
303
- _updateInnerColor() {
304
- const scopeLength = this._max - this._min;
305
- const scopedLow = this._lowInputValue - this._min;
306
- const scopedHigh = this._highInputValue - this._min;
307
- const leftPercent = scopedLow / scopeLength * 100;
308
- const rightPercent = 100 - scopedHigh / scopeLength * 100;
309
- this._lowValuePercentStart = clamp(leftPercent, 0, 100);
310
- this._highValuePercentEnd = clamp(rightPercent, 0, 100);
311
- }
312
- _getClickedValue(pageX) {
313
- const outerTrackMargin = this._outerTrack.getBoundingClientRect().left;
314
- const mouseXPosition = pageX - outerTrackMargin - TRACK_PADDING;
315
- const clickPercent = mouseXPosition / (this._trackWidth - TRACK_PADDING * 2);
316
- const clickedValue = clickPercent * (this._max - this._min) + this._min;
317
- return Math.round(clickedValue / this._step) * this._step;
318
- }
319
- /** Drag both thumbs logics */
320
- _saveStartPoints(pageX) {
321
- this.startPoint = {
322
- mouse: pageX,
323
- low: this._lowInputValue,
324
- high: this._highInputValue
325
- };
326
- }
327
- _dragBothValuesByMousePos(pageX) {
328
- const trackWidth = this._outerTrack.offsetWidth;
329
- const drag = pageX - this.startPoint.mouse;
330
- const trackDiff = this._max - this._min;
331
- const dragPercent = drag / (trackWidth + TRACK_PADDING * 2);
332
- const dragValue = Math.round(dragPercent * trackDiff / this._step) * this._step;
333
- const newValueLow = this.startPoint.low + dragValue;
334
- const newValueHigh = this.startPoint.high + dragValue;
335
- this.setValue(newValueLow, newValueHigh, true);
336
- this.dispatchEvent(new UUIRangeSliderEvent(UUIRangeSliderEvent.INPUT));
337
- }
338
- /** Input Events */
339
- _onLowInput(e) {
340
- if (this.disabled) e.preventDefault();
341
- if (this.readonly) e.preventDefault();
342
- this._currentFocus = this._inputLow;
343
- const newValue = Number(e.target.value);
344
- this.setValueLow(newValue);
345
- this.dispatchEvent(new UUIRangeSliderEvent(UUIRangeSliderEvent.INPUT));
346
- }
347
- _onHighInput(e) {
348
- if (this.disabled) e.preventDefault();
349
- if (this.readonly) e.preventDefault();
350
- this._currentFocus = this._inputHigh;
351
- const newValue = Number(e.target.value);
352
- this.setValueHigh(newValue);
353
- this.dispatchEvent(new UUIRangeSliderEvent(UUIRangeSliderEvent.INPUT));
354
- }
355
- /** Change Events */
356
- _onLowChange() {
357
- this.setValueLow(Number(this._inputLow.value));
358
- this.onChanged();
359
- }
360
- _onHighChange() {
361
- this.setValueHigh(Number(this._inputHigh.value));
362
- this.onChanged();
363
- }
364
- onChanged() {
365
- this.pristine = false;
366
- this.dispatchEvent(new UUIRangeSliderEvent(UUIRangeSliderEvent.CHANGE));
367
- }
368
- /** Render */
369
- render() {
370
- return html`
21
+ /**
22
+ * @element uui-range-slider
23
+ * @description - Range slider with two handles. Use uui-slider for a single handle.
24
+ * @fires UUIRangeSliderEvent#input on input
25
+ * @fires UUIRangeSliderEvent#change on change
26
+ * @extends UUIFormControlMixin
27
+ */
28
+ var UUIRangeSliderElement = class extends UUIFormControlWithBasicsMixin(LitElement, "") {
29
+ static {
30
+ this.formAssociated = true;
31
+ }
32
+ /**
33
+ * Sets the minimum allowed value.
34
+ * @type {number}
35
+ * @attr min
36
+ * @default 0
37
+ */
38
+ get min() {
39
+ return this._min;
40
+ }
41
+ set min(newVal) {
42
+ this._min = newVal;
43
+ this.#transferValueToInternalValues();
44
+ }
45
+ /**
46
+ * Sets the maximum allowed value.
47
+ * @type {number}
48
+ * @attr max
49
+ * @default 100
50
+ */
51
+ get max() {
52
+ return this._max;
53
+ }
54
+ set max(newVal) {
55
+ this._max = newVal;
56
+ this.#transferValueToInternalValues();
57
+ }
58
+ /**
59
+ * This reflects the behavior of a native input step attribute.
60
+ * @type {number}
61
+ * @attr
62
+ * @default 1
63
+ */
64
+ get step() {
65
+ return this._step;
66
+ }
67
+ set step(newVal) {
68
+ this._step = newVal;
69
+ this.#transferValueToInternalValues();
70
+ }
71
+ /**
72
+ * Minimum value gap between the the two picked values. Cannot be lower than the step value and cannot be higher than the maximum gap
73
+ * @type {number}
74
+ * @attr min-gap
75
+ * @default undefined
76
+ */
77
+ get minGap() {
78
+ return this._minGap;
79
+ }
80
+ set minGap(newVal) {
81
+ this._minGap = newVal;
82
+ this.#transferValueToInternalValues();
83
+ }
84
+ /**
85
+ * Maximum value gap between the the two picked values. Cannot be lower than the minimum gap.
86
+ * @type {number}
87
+ * @attr max-gap
88
+ * @default undefined
89
+ */
90
+ get maxGap() {
91
+ return this._maxGap;
92
+ }
93
+ set maxGap(newVal) {
94
+ this._maxGap = newVal;
95
+ this.#transferValueToInternalValues();
96
+ }
97
+ /**
98
+ * This is a value property of the uui-range-slider. Split the two values with comma, for example 10,50 sets the values to 10 and 50.
99
+ * @type {string}
100
+ * @attr
101
+ * @default 0,0
102
+ */
103
+ get value() {
104
+ return super.value;
105
+ }
106
+ set value(newVal) {
107
+ super.value = newVal;
108
+ this.#transferValueToInternalValues();
109
+ }
110
+ setValueLow(low) {
111
+ const clampMin = this.maxGap ? Math.max(this._highInputValue - this.maxGap, this.min) : this.min;
112
+ const clampMax = this.minGap ? this._highInputValue - this.minGap : this._highInputValue - this.step;
113
+ low = clamp(low, clampMin, clampMax);
114
+ this.setValue(low, this._highInputValue);
115
+ }
116
+ setValueHigh(high) {
117
+ const clampMin = this.minGap ? this._lowInputValue + this.minGap : this._lowInputValue + this.step;
118
+ const clampMax = this.maxGap ? Math.min(this.maxGap + this._lowInputValue, this.max) : this.max;
119
+ high = clamp(high, clampMin, clampMax);
120
+ this.setValue(this._lowInputValue, high);
121
+ }
122
+ setValue(low, high, lockValueRange) {
123
+ if (lockValueRange) {
124
+ const length = this.startPoint.high - this.startPoint.low;
125
+ low = clamp(low, this.min, this.max - length);
126
+ high = clamp(high, this.min + length, this.max);
127
+ }
128
+ this._inputLow.value = low.toString();
129
+ this._inputHigh.value = high.toString();
130
+ this.value = `${low},${high}`;
131
+ }
132
+ #transferValueToInternalValues() {
133
+ const valueSplit = this.value.split(",");
134
+ let low = Number(valueSplit[0]) || 0;
135
+ let high = Number(valueSplit[1]) || 0;
136
+ high = clamp(high, this._min, this._max);
137
+ low = this._min + Math.round((low - this._min) / this._step) * this._step;
138
+ high = this._min + Math.round((high - this._min) / this._step) * this._step;
139
+ this._lowInputValue = clamp(low, this._min, this._minGap ? high - this._minGap : high - this._step);
140
+ this._highInputValue = clamp(high, this._minGap ? this._lowInputValue + this._minGap : this._lowInputValue + this._step, Math.min(this._maxGap ? low + this._maxGap : this._max, this._max));
141
+ this._updateInnerColor();
142
+ this.requestUpdate();
143
+ }
144
+ getFormElement() {
145
+ return this._currentFocus ?? this._inputLow;
146
+ }
147
+ async focus() {
148
+ await this.updateComplete;
149
+ this.getFormElement().focus();
150
+ }
151
+ async blur() {
152
+ await this.updateComplete;
153
+ this.getFormElement().blur();
154
+ }
155
+ /** Constructor and Validator */
156
+ constructor() {
157
+ super();
158
+ this.disabled = false;
159
+ this.readonly = false;
160
+ this._min = 0;
161
+ this._max = 0;
162
+ this.hideStepValues = false;
163
+ this._step = 1;
164
+ this._movement = false;
165
+ this.startPoint = {
166
+ mouse: 0,
167
+ low: 0,
168
+ high: 0
169
+ };
170
+ this._lowInputValue = 0;
171
+ this._highInputValue = 0;
172
+ this._trackWidth = 0;
173
+ this._lowValuePercentStart = 0;
174
+ this._highValuePercentEnd = 100;
175
+ this.#onKeyDown = (e) => {
176
+ if (e.key == "Enter") this.submit();
177
+ };
178
+ this._onTouchStart = (e) => {
179
+ if (this.disabled) return;
180
+ const target = e.composedPath()[0];
181
+ if (target === this._outerTrack) return;
182
+ if (target === this._innerColor || target === this._innerColorThumb) {
183
+ window.addEventListener("touchend", this._onTouchEnd);
184
+ window.addEventListener("touchcancel", this._onTouchEnd);
185
+ window.addEventListener("touchmove", this._onTouchMove);
186
+ this._movement = true;
187
+ this._saveStartPoints(e.touches[0].pageX);
188
+ } else {
189
+ const value = this._getClickedValue(e.touches[0].pageX);
190
+ if (Math.abs(this._lowInputValue - value) < Math.abs(this._highInputValue - value)) this.setValueLow(value);
191
+ else this.setValueHigh(value);
192
+ }
193
+ };
194
+ this._onTouchMove = (e) => {
195
+ this._dragBothValuesByMousePos(e.touches[0].pageX);
196
+ };
197
+ this._onTouchEnd = () => {
198
+ this._movement = false;
199
+ this.onChanged();
200
+ window.removeEventListener("touchend", this._onTouchEnd);
201
+ window.removeEventListener("touchcancel", this._onTouchEnd);
202
+ window.removeEventListener("touchmove", this._onTouchMove);
203
+ };
204
+ this._onMouseDown = (e) => {
205
+ if (this.disabled) return;
206
+ if (this.readonly) return;
207
+ const target = e.composedPath()[0];
208
+ if (target === this._outerTrack) return;
209
+ if (target === this._innerColor || target === this._innerColorThumb) {
210
+ window.addEventListener("mouseup", this._onMouseUp);
211
+ window.addEventListener("mousemove", this._onMouseMove);
212
+ this._movement = true;
213
+ this._saveStartPoints(e.pageX);
214
+ } else {
215
+ const value = this._getClickedValue(e.pageX);
216
+ if (Math.abs(this._lowInputValue - value) < Math.abs(this._highInputValue - value)) this.setValueLow(value);
217
+ else this.setValueHigh(value);
218
+ }
219
+ };
220
+ this._onMouseMove = (e) => {
221
+ e.preventDefault();
222
+ this._dragBothValuesByMousePos(e.pageX);
223
+ };
224
+ this._onMouseUp = () => {
225
+ this._movement = false;
226
+ this.onChanged();
227
+ window.removeEventListener("mouseup", this._onMouseUp);
228
+ window.removeEventListener("mousemove", this._onMouseMove);
229
+ };
230
+ this.addEventListener("keydown", this.#onKeyDown);
231
+ this.addEventListener("mousedown", this._onMouseDown);
232
+ this.addEventListener("touchstart", this._onTouchStart);
233
+ window.addEventListener("resize", () => {
234
+ this._trackWidth = this._outerTrack?.offsetWidth;
235
+ });
236
+ }
237
+ connectedCallback() {
238
+ super.connectedCallback();
239
+ if (!this.value) this.value = `${this._min},${this._max}`;
240
+ }
241
+ firstUpdated(changedProperties) {
242
+ super.updated(changedProperties);
243
+ this._trackWidth = this._outerTrack.offsetWidth;
244
+ this._runPropertiesChecks();
245
+ }
246
+ _runPropertiesChecks() {
247
+ if (!(/* @__PURE__ */ new RegExp(/^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/)).test(this.value)) console.error(`Range slider (Value error occurred): Bad input`);
248
+ if (this._highInputValue === this._lowInputValue) console.error(`Range slider (Value error occurred): Low-end and high-end value should never be equal. Use <uui-slider></uui-slider> instead.`);
249
+ if (this._lowInputValue > this._highInputValue) console.error(`Range slider (Value error occurred): Low-end value should never be higher than high-end value.`);
250
+ if (this._highInputValue > this._max || this._highInputValue < this._min) {
251
+ this.setValueHigh(this._max);
252
+ console.warn(`Conflict with the high-end value and max value. High-end value has been converted to the max value (${this._max})`);
253
+ }
254
+ if (this._lowInputValue < this._min || this._lowInputValue > this._max) {
255
+ this.setValueLow(this._min);
256
+ console.warn(`Conflict with the low-end value and min value. Low-end value has been converted to the min value (${this._min})`);
257
+ }
258
+ if (this._step <= 0) {
259
+ this._step = 1;
260
+ console.warn(`Property step needs a value higher than 0. Converted the step value to 1 (default)`);
261
+ }
262
+ if ((this._max - this._min) / this._step % 1 !== 0) console.error(`Conflict with step value and the min and max values. May experience bad side effects`);
263
+ this._runGapChecks();
264
+ }
265
+ _runGapChecks() {
266
+ if (this._minGap && this._minGap < this._step) {
267
+ this._minGap = void 0;
268
+ console.warn(`Conflict with min-gap and step value. The min-gap needs to be higher than the step value. Removed the min-gap property.`);
269
+ }
270
+ if (this._minGap && this._maxGap && this._minGap > this._maxGap) {
271
+ this._minGap = void 0;
272
+ this._maxGap = void 0;
273
+ console.warn(`Conflict with min-gap and max-gap. Removed the min-gap and max-gap properties.`);
274
+ }
275
+ if (this._minGap && this._max - this._min < this._minGap) {
276
+ this._minGap = void 0;
277
+ console.warn(`Conflict with the min-gap and the total range. Removed the min-gap.`);
278
+ }
279
+ if (this._maxGap && this._highInputValue - this._lowInputValue > this._maxGap) {
280
+ this.setValueHigh(this._lowInputValue + this._maxGap);
281
+ console.warn(`Conflict with value and max-gap. High-end value has been converted to the highest possible value based on the low-end value and the max gap value (${this._highInputValue})`);
282
+ }
283
+ if (this._minGap && this._highInputValue - this._lowInputValue < this._minGap) {
284
+ const minGap = this._minGap;
285
+ if (this._highInputValue - minGap < this._min) {
286
+ this.setValueHigh(this._lowInputValue + minGap);
287
+ console.warn(`Conflict with value and min gap. High-end value has been converted to the lowest possible value based on the low-end value and the min gap value (${this._highInputValue}).`);
288
+ } else {
289
+ this.setValueLow(this._highInputValue - minGap);
290
+ console.warn(`Conflict with value and min gap. Low-end value has been converted to the highest possible value based on the high-end value and the min gap value (${this._lowInputValue}).`);
291
+ }
292
+ }
293
+ }
294
+ _updateInnerColor() {
295
+ const scopeLength = this._max - this._min;
296
+ const scopedLow = this._lowInputValue - this._min;
297
+ const scopedHigh = this._highInputValue - this._min;
298
+ const leftPercent = scopedLow / scopeLength * 100;
299
+ const rightPercent = 100 - scopedHigh / scopeLength * 100;
300
+ this._lowValuePercentStart = clamp(leftPercent, 0, 100);
301
+ this._highValuePercentEnd = clamp(rightPercent, 0, 100);
302
+ }
303
+ _getClickedValue(pageX) {
304
+ const clickedValue = (pageX - this._outerTrack.getBoundingClientRect().left - TRACK_PADDING) / (this._trackWidth - TRACK_PADDING * 2) * (this._max - this._min) + this._min;
305
+ return Math.round(clickedValue / this._step) * this._step;
306
+ }
307
+ /** Events */
308
+ #onKeyDown;
309
+ /** Drag both thumbs logics */
310
+ _saveStartPoints(pageX) {
311
+ this.startPoint = {
312
+ mouse: pageX,
313
+ low: this._lowInputValue,
314
+ high: this._highInputValue
315
+ };
316
+ }
317
+ _dragBothValuesByMousePos(pageX) {
318
+ const trackWidth = this._outerTrack.offsetWidth;
319
+ const drag = pageX - this.startPoint.mouse;
320
+ const trackDiff = this._max - this._min;
321
+ const dragPercent = drag / (trackWidth + TRACK_PADDING * 2);
322
+ const dragValue = Math.round(dragPercent * trackDiff / this._step) * this._step;
323
+ const newValueLow = this.startPoint.low + dragValue;
324
+ const newValueHigh = this.startPoint.high + dragValue;
325
+ this.setValue(newValueLow, newValueHigh, true);
326
+ this.dispatchEvent(new UUIRangeSliderEvent(UUIRangeSliderEvent.INPUT));
327
+ }
328
+ /** Input Events */
329
+ _onLowInput(e) {
330
+ if (this.disabled) e.preventDefault();
331
+ if (this.readonly) e.preventDefault();
332
+ this._currentFocus = this._inputLow;
333
+ const newValue = Number(e.target.value);
334
+ this.setValueLow(newValue);
335
+ this.dispatchEvent(new UUIRangeSliderEvent(UUIRangeSliderEvent.INPUT));
336
+ }
337
+ _onHighInput(e) {
338
+ if (this.disabled) e.preventDefault();
339
+ if (this.readonly) e.preventDefault();
340
+ this._currentFocus = this._inputHigh;
341
+ const newValue = Number(e.target.value);
342
+ this.setValueHigh(newValue);
343
+ this.dispatchEvent(new UUIRangeSliderEvent(UUIRangeSliderEvent.INPUT));
344
+ }
345
+ /** Change Events */
346
+ _onLowChange() {
347
+ this.setValueLow(Number(this._inputLow.value));
348
+ this.onChanged();
349
+ }
350
+ _onHighChange() {
351
+ this.setValueHigh(Number(this._inputHigh.value));
352
+ this.onChanged();
353
+ }
354
+ onChanged() {
355
+ this.pristine = false;
356
+ this.dispatchEvent(new UUIRangeSliderEvent(UUIRangeSliderEvent.CHANGE));
357
+ }
358
+ /** Render */
359
+ render() {
360
+ return html`
371
361
  <div id="range-slider">
372
362
  ${this._renderNativeInputs()}
373
363
  <div id="inner-track">
@@ -382,9 +372,9 @@ const _UUIRangeSliderElement = class _UUIRangeSliderElement extends UUIFormContr
382
372
  </div>
383
373
  </div>
384
374
  `;
385
- }
386
- _renderThumbValues() {
387
- return html`<div class="thumb-values">
375
+ }
376
+ _renderThumbValues() {
377
+ return html`<div class="thumb-values">
388
378
  <span
389
379
  ><span
390
380
  >${this._lowInputValue.toFixed(CountDecimalPlaces(this._step))}</span
@@ -396,47 +386,41 @@ const _UUIRangeSliderElement = class _UUIRangeSliderElement extends UUIFormContr
396
386
  ></span
397
387
  >
398
388
  </div>`;
399
- }
400
- _renderSteps() {
401
- const stepAmount = (this._max - this._min) / this._step;
402
- const stepWidth = (this._trackWidth - TRACK_PADDING * 2) / stepAmount;
403
- if (stepWidth < STEP_MIN_WIDTH) return;
404
- if (stepAmount % 1 !== 0) return;
405
- let index = 0;
406
- const stepPositions = new Array(stepAmount + 1).fill(stepWidth).map((stepWidth2) => stepWidth2 * index++);
407
- return html`<div class="step-wrapper">
389
+ }
390
+ _renderSteps() {
391
+ const stepAmount = (this._max - this._min) / this._step;
392
+ const stepWidth = (this._trackWidth - TRACK_PADDING * 2) / stepAmount;
393
+ if (stepWidth < STEP_MIN_WIDTH) return;
394
+ if (stepAmount % 1 !== 0) return;
395
+ let index = 0;
396
+ const stepPositions = new Array(stepAmount + 1).fill(stepWidth).map((stepWidth) => stepWidth * index++);
397
+ return html`<div class="step-wrapper">
408
398
  <svg height="100%" width="100%">
409
399
  <rect x="9" y="9" height="${TRACK_HEIGHT}" rx="2" />
410
400
  ${this._renderStepCircles(stepPositions)}
411
401
  </svg>
412
402
  ${this._renderStepValues(stepAmount)}
413
403
  </div>`;
414
- }
415
- _renderStepValues(stepAmount) {
416
- if (this.hideStepValues || stepAmount > 20) return;
417
- let index = 0;
418
- const stepValues = new Array(stepAmount + 1).fill(this._step).map(
419
- (step) => (this._min + step * index++).toFixed(CountDecimalPlaces(this._step))
420
- );
421
- return html`<div class="step-values">
422
- ${stepValues.map((value) => html`<span><span>${value}</span></span>`)}
404
+ }
405
+ _renderStepValues(stepAmount) {
406
+ if (this.hideStepValues || stepAmount > 20) return;
407
+ let index = 0;
408
+ return html`<div class="step-values">
409
+ ${new Array(stepAmount + 1).fill(this._step).map((step) => (this._min + step * index++).toFixed(CountDecimalPlaces(this._step))).map((value) => html`<span><span>${value}</span></span>`)}
423
410
  </div>`;
424
- }
425
- _renderStepCircles(stepPositionArray) {
426
- const trackValue = this._trackWidth / (this._max - this._min);
427
- return svg`${stepPositionArray.map((position) => {
428
- const cx = position + TRACK_PADDING;
429
- const colorStart = this._lowInputValue - this._min;
430
- const colorEnd = this._highInputValue - this._min;
431
- if (cx / trackValue >= colorStart && cx / trackValue <= colorEnd) {
432
- return svg`<circle class="track-step filled" cx="${cx}" cy="${TRACK_HEIGHT * 2}" r="4.5" />`;
433
- } else {
434
- return svg`<circle class="track-step regular" cx="${cx}" cy="${TRACK_HEIGHT * 2}" r="4.5" />`;
435
- }
436
- })}`;
437
- }
438
- _renderNativeInputs() {
439
- return html` <div class="native-wrapper">
411
+ }
412
+ _renderStepCircles(stepPositionArray) {
413
+ const trackValue = this._trackWidth / (this._max - this._min);
414
+ return svg`${stepPositionArray.map((position) => {
415
+ const cx = position + TRACK_PADDING;
416
+ const colorStart = this._lowInputValue - this._min;
417
+ const colorEnd = this._highInputValue - this._min;
418
+ if (cx / trackValue >= colorStart && cx / trackValue <= colorEnd) return svg`<circle class="track-step filled" cx="${cx}" cy="${TRACK_HEIGHT * 2}" r="4.5" />`;
419
+ else return svg`<circle class="track-step regular" cx="${cx}" cy="${TRACK_HEIGHT * 2}" r="4.5" />`;
420
+ })}`;
421
+ }
422
+ _renderNativeInputs() {
423
+ return html` <div class="native-wrapper">
440
424
  <input
441
425
  id="inputLow"
442
426
  class="${this._movement ? "focus" : ""}"
@@ -462,33 +446,9 @@ const _UUIRangeSliderElement = class _UUIRangeSliderElement extends UUIFormContr
462
446
  @input=${this._onHighInput}
463
447
  @change=${this._onHighChange} />
464
448
  </div>`;
465
- }
466
- };
467
- _UUIRangeSliderElement_instances = new WeakSet();
468
- transferValueToInternalValues_fn = function() {
469
- const valueSplit = this.value.split(",");
470
- let low = Number(valueSplit[0]) || 0;
471
- let high = Number(valueSplit[1]) || 0;
472
- high = clamp(high, this._min, this._max);
473
- low = this._min + Math.round((low - this._min) / this._step) * this._step;
474
- high = this._min + Math.round((high - this._min) / this._step) * this._step;
475
- this._lowInputValue = clamp(
476
- low,
477
- this._min,
478
- this._minGap ? high - this._minGap : high - this._step
479
- );
480
- this._highInputValue = clamp(
481
- high,
482
- this._minGap ? this._lowInputValue + this._minGap : this._lowInputValue + this._step,
483
- Math.min(this._maxGap ? low + this._maxGap : this._max, this._max)
484
- );
485
- this._updateInnerColor();
486
- this.requestUpdate();
487
- };
488
- _onKeyDown = new WeakMap();
489
- _UUIRangeSliderElement.formAssociated = true;
490
- _UUIRangeSliderElement.styles = [
491
- css`
449
+ }
450
+ static {
451
+ this.styles = [css`
492
452
  :host {
493
453
  --color-interactive: var(--uui-color-selected);
494
454
  --color-hover: var(--uui-color-selected-emphasis);
@@ -558,7 +518,7 @@ _UUIRangeSliderElement.styles = [
558
518
  }
559
519
 
560
520
  :host(:not([readonly])) #inner-color-thumb:hover .color {
561
- height: ${TRACK_HEIGHT + 2}px;
521
+ height: ${5}px;
562
522
  background-color: var(--color-hover);
563
523
  transform: translateY(-1px);
564
524
  }
@@ -596,7 +556,7 @@ _UUIRangeSliderElement.styles = [
596
556
  position: absolute;
597
557
  left: 0;
598
558
  right: 0;
599
- top: -10px;
559
+ top: -9px;
600
560
  }
601
561
 
602
562
  /** Step circles */
@@ -757,7 +717,8 @@ _UUIRangeSliderElement.styles = [
757
717
  input:focus-within::-webkit-slider-thumb,
758
718
  input.focus::-webkit-slider-thumb {
759
719
  border-color: var(--color-focus);
760
- outline: 2px solid var(--color-focus);
720
+ outline: calc(2px * var(--uui-show-focus-outline, 1)) solid
721
+ var(--uui-color-focus);
761
722
  outline-offset: 1px;
762
723
  }
763
724
  :host(:not([disabled]):not([readonly]))
@@ -796,7 +757,8 @@ _UUIRangeSliderElement.styles = [
796
757
  input:focus-within::-moz-range-thumb,
797
758
  input.focus::-moz-range-thumb {
798
759
  border-color: var(--color-focus);
799
- outline: 2px solid var(--color-focus);
760
+ outline: calc(2px * var(--uui-show-focus-outline, 1)) solid
761
+ var(--uui-color-focus);
800
762
  outline-offset: 1px;
801
763
  }
802
764
  :host(:not([disabled]):not([readonly])) input::-moz-range-thumb:hover {
@@ -807,73 +769,46 @@ _UUIRangeSliderElement.styles = [
807
769
  :host([disabled]) #range-slider input::-moz-range-thumb {
808
770
  border-color: var(--uui-palette-mine-grey);
809
771
  }
810
- `
811
- ];
812
- let UUIRangeSliderElement = _UUIRangeSliderElement;
813
- __decorateClass([
814
- property({ type: String })
815
- ], UUIRangeSliderElement.prototype, "label", 2);
816
- __decorateClass([
817
- property({ type: Boolean, reflect: true })
818
- ], UUIRangeSliderElement.prototype, "disabled", 2);
819
- __decorateClass([
820
- property({ type: Boolean, reflect: true })
821
- ], UUIRangeSliderElement.prototype, "readonly", 2);
822
- __decorateClass([
823
- property({ type: Number })
824
- ], UUIRangeSliderElement.prototype, "min", 1);
825
- __decorateClass([
826
- property({ type: Number })
827
- ], UUIRangeSliderElement.prototype, "max", 1);
828
- __decorateClass([
829
- property({ type: Boolean, attribute: "hide-step-values" })
830
- ], UUIRangeSliderElement.prototype, "hideStepValues", 2);
831
- __decorateClass([
832
- property({ type: Number })
833
- ], UUIRangeSliderElement.prototype, "step", 1);
834
- __decorateClass([
835
- property({ type: Number, attribute: "min-gap" })
836
- ], UUIRangeSliderElement.prototype, "minGap", 1);
837
- __decorateClass([
838
- property({ type: Number, attribute: "max-gap" })
839
- ], UUIRangeSliderElement.prototype, "maxGap", 1);
840
- __decorateClass([
841
- property({ type: String })
842
- ], UUIRangeSliderElement.prototype, "value", 1);
843
- __decorateClass([
844
- state()
845
- ], UUIRangeSliderElement.prototype, "_movement", 2);
846
- __decorateClass([
847
- state()
848
- ], UUIRangeSliderElement.prototype, "_lowInputValue", 2);
849
- __decorateClass([
850
- state()
851
- ], UUIRangeSliderElement.prototype, "_highInputValue", 2);
852
- __decorateClass([
853
- state()
854
- ], UUIRangeSliderElement.prototype, "_trackWidth", 2);
855
- __decorateClass([
856
- state()
857
- ], UUIRangeSliderElement.prototype, "_lowValuePercentStart", 2);
858
- __decorateClass([
859
- state()
860
- ], UUIRangeSliderElement.prototype, "_highValuePercentEnd", 2);
861
- __decorateClass([
862
- query("#range-slider")
863
- ], UUIRangeSliderElement.prototype, "_outerTrack", 2);
864
- __decorateClass([
865
- query("#inputLow")
866
- ], UUIRangeSliderElement.prototype, "_inputLow", 2);
867
- __decorateClass([
868
- query("#inputHigh")
869
- ], UUIRangeSliderElement.prototype, "_inputHigh", 2);
870
- __decorateClass([
871
- query(".color")
872
- ], UUIRangeSliderElement.prototype, "_innerColor", 2);
873
- __decorateClass([
874
- query("#inner-color-thumb")
875
- ], UUIRangeSliderElement.prototype, "_innerColorThumb", 2);
876
- export {
877
- UUIRangeSliderElement
772
+ `];
773
+ }
878
774
  };
879
- //# sourceMappingURL=range-slider.element.js.map
775
+ __decorate([property({ type: String })], UUIRangeSliderElement.prototype, "label", void 0);
776
+ __decorate([property({
777
+ type: Boolean,
778
+ reflect: true
779
+ })], UUIRangeSliderElement.prototype, "disabled", void 0);
780
+ __decorate([property({
781
+ type: Boolean,
782
+ reflect: true
783
+ })], UUIRangeSliderElement.prototype, "readonly", void 0);
784
+ __decorate([property({ type: Number })], UUIRangeSliderElement.prototype, "min", null);
785
+ __decorate([property({ type: Number })], UUIRangeSliderElement.prototype, "max", null);
786
+ __decorate([property({
787
+ type: Boolean,
788
+ attribute: "hide-step-values"
789
+ })], UUIRangeSliderElement.prototype, "hideStepValues", void 0);
790
+ __decorate([property({ type: Number })], UUIRangeSliderElement.prototype, "step", null);
791
+ __decorate([property({
792
+ type: Number,
793
+ attribute: "min-gap"
794
+ })], UUIRangeSliderElement.prototype, "minGap", null);
795
+ __decorate([property({
796
+ type: Number,
797
+ attribute: "max-gap"
798
+ })], UUIRangeSliderElement.prototype, "maxGap", null);
799
+ __decorate([property({ type: String })], UUIRangeSliderElement.prototype, "value", null);
800
+ __decorate([state()], UUIRangeSliderElement.prototype, "_movement", void 0);
801
+ __decorate([state()], UUIRangeSliderElement.prototype, "_lowInputValue", void 0);
802
+ __decorate([state()], UUIRangeSliderElement.prototype, "_highInputValue", void 0);
803
+ __decorate([state()], UUIRangeSliderElement.prototype, "_trackWidth", void 0);
804
+ __decorate([state()], UUIRangeSliderElement.prototype, "_lowValuePercentStart", void 0);
805
+ __decorate([state()], UUIRangeSliderElement.prototype, "_highValuePercentEnd", void 0);
806
+ __decorate([query("#range-slider")], UUIRangeSliderElement.prototype, "_outerTrack", void 0);
807
+ __decorate([query("#inputLow")], UUIRangeSliderElement.prototype, "_inputLow", void 0);
808
+ __decorate([query("#inputHigh")], UUIRangeSliderElement.prototype, "_inputHigh", void 0);
809
+ __decorate([query(".color")], UUIRangeSliderElement.prototype, "_innerColor", void 0);
810
+ __decorate([query("#inner-color-thumb")], UUIRangeSliderElement.prototype, "_innerColorThumb", void 0);
811
+ //#endregion
812
+ export { UUIRangeSliderElement };
813
+
814
+ //# sourceMappingURL=range-slider.element.js.map