@vonage/vivid 3.52.0 → 3.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (289) hide show
  1. package/README.md +1 -1
  2. package/accordion/index.cjs +1 -1
  3. package/accordion/index.js +1 -1
  4. package/accordion-item/index.cjs +1 -1
  5. package/accordion-item/index.js +1 -1
  6. package/alert/index.cjs +3 -3
  7. package/alert/index.js +3 -3
  8. package/audio-player/index.cjs +3 -3
  9. package/audio-player/index.js +3 -3
  10. package/avatar/index.cjs +1 -1
  11. package/avatar/index.js +1 -1
  12. package/badge/index.cjs +1 -1
  13. package/badge/index.js +1 -1
  14. package/banner/index.cjs +2 -2
  15. package/banner/index.js +2 -2
  16. package/breadcrumb-item/index.cjs +1 -1
  17. package/breadcrumb-item/index.js +1 -1
  18. package/button/index.cjs +2 -2
  19. package/button/index.js +2 -2
  20. package/card/index.cjs +2 -2
  21. package/card/index.js +2 -2
  22. package/checkbox/index.cjs +3 -2
  23. package/checkbox/index.js +3 -2
  24. package/combobox/index.cjs +5 -5
  25. package/combobox/index.js +5 -5
  26. package/custom-elements.json +717 -4
  27. package/data-grid/index.cjs +1 -1
  28. package/data-grid/index.js +1 -1
  29. package/date-picker/index.cjs +7 -6
  30. package/date-picker/index.js +7 -6
  31. package/date-range-picker/index.cjs +7 -6
  32. package/date-range-picker/index.js +7 -6
  33. package/dial-pad/index.cjs +33 -0
  34. package/dial-pad/index.js +31 -0
  35. package/dialog/index.cjs +4 -4
  36. package/dialog/index.js +4 -4
  37. package/divider/index.cjs +1 -1
  38. package/divider/index.js +1 -1
  39. package/elevation/index.cjs +1 -1
  40. package/elevation/index.js +1 -1
  41. package/empty-state/index.cjs +2 -2
  42. package/empty-state/index.js +2 -2
  43. package/fab/index.cjs +2 -2
  44. package/fab/index.js +2 -2
  45. package/file-picker/index.cjs +4 -3
  46. package/file-picker/index.js +4 -3
  47. package/header/index.cjs +2 -2
  48. package/header/index.js +2 -2
  49. package/icon/index.cjs +1 -1
  50. package/icon/index.js +1 -1
  51. package/index.cjs +132 -122
  52. package/index.js +46 -43
  53. package/layout/index.cjs +1 -1
  54. package/layout/index.js +1 -1
  55. package/lib/components.d.ts +2 -0
  56. package/lib/dial-pad/definition.d.ts +3 -0
  57. package/lib/dial-pad/dial-pad.d.ts +14 -0
  58. package/lib/dial-pad/dial-pad.template.d.ts +4 -0
  59. package/lib/dial-pad/locale.d.ts +18 -0
  60. package/lib/enums.d.ts +6 -0
  61. package/lib/text-anchor/definition.d.ts +1 -0
  62. package/lib/text-anchor/text-anchor.d.ts +5 -0
  63. package/lib/video-player/definition.d.ts +3 -0
  64. package/lib/video-player/locale.d.ts +1 -0
  65. package/lib/video-player/video-player.d.ts +17 -0
  66. package/lib/video-player/video-player.template.d.ts +4 -0
  67. package/listbox/index.cjs +2 -2
  68. package/listbox/index.js +2 -2
  69. package/locales/en-GB.cjs +30 -0
  70. package/locales/en-GB.js +30 -0
  71. package/locales/en-US.cjs +198 -0
  72. package/locales/en-US.js +198 -0
  73. package/locales/ja-JP.cjs +197 -0
  74. package/locales/ja-JP.js +197 -0
  75. package/locales/zh-CN.cjs +199 -0
  76. package/locales/zh-CN.js +199 -0
  77. package/menu/index.cjs +6 -6
  78. package/menu/index.js +6 -6
  79. package/menu-item/index.cjs +2 -2
  80. package/menu-item/index.js +2 -2
  81. package/nav/index.cjs +1 -1
  82. package/nav/index.js +1 -1
  83. package/nav-disclosure/index.cjs +2 -2
  84. package/nav-disclosure/index.js +2 -2
  85. package/nav-item/index.cjs +2 -2
  86. package/nav-item/index.js +2 -2
  87. package/note/index.cjs +2 -2
  88. package/note/index.js +2 -2
  89. package/number-field/index.cjs +5 -4
  90. package/number-field/index.js +5 -4
  91. package/option/index.cjs +2 -2
  92. package/option/index.js +2 -2
  93. package/package.json +1 -1
  94. package/pagination/index.cjs +3 -3
  95. package/pagination/index.js +3 -3
  96. package/popup/index.cjs +4 -4
  97. package/popup/index.js +4 -4
  98. package/progress/index.cjs +1 -1
  99. package/progress/index.js +1 -1
  100. package/progress-ring/index.cjs +1 -1
  101. package/progress-ring/index.js +1 -1
  102. package/radio/index.cjs +1 -1
  103. package/radio/index.js +1 -1
  104. package/radio-group/index.cjs +1 -1
  105. package/radio-group/index.js +1 -1
  106. package/range-slider/index.cjs +2 -2
  107. package/range-slider/index.js +2 -2
  108. package/select/index.cjs +7 -6
  109. package/select/index.js +7 -6
  110. package/selectable-box/index.cjs +5 -4
  111. package/selectable-box/index.js +5 -4
  112. package/shared/applyMixinsWithObservables.cjs +15 -0
  113. package/shared/applyMixinsWithObservables.js +13 -0
  114. package/shared/definition.cjs +1 -1
  115. package/shared/definition.js +1 -1
  116. package/shared/definition11.cjs +3 -3
  117. package/shared/definition11.js +3 -3
  118. package/shared/definition14.cjs +2 -2
  119. package/shared/definition14.js +2 -2
  120. package/shared/definition15.cjs +8 -9
  121. package/shared/definition15.js +8 -9
  122. package/shared/definition16.cjs +3 -3
  123. package/shared/definition16.js +3 -3
  124. package/shared/definition17.cjs +2 -2
  125. package/shared/definition17.js +3 -3
  126. package/shared/definition18.cjs +3 -3
  127. package/shared/definition18.js +3 -3
  128. package/shared/definition19.cjs +3 -3
  129. package/shared/definition19.js +3 -3
  130. package/shared/definition20.cjs +186 -227
  131. package/shared/definition20.js +181 -222
  132. package/shared/definition21.cjs +264 -67
  133. package/shared/definition21.js +263 -65
  134. package/shared/definition22.cjs +66 -57
  135. package/shared/definition22.js +64 -56
  136. package/shared/definition23.cjs +42 -76
  137. package/shared/definition23.js +41 -75
  138. package/shared/definition24.cjs +70 -2402
  139. package/shared/definition24.js +69 -2401
  140. package/shared/definition25.cjs +2402 -46
  141. package/shared/definition25.js +2401 -45
  142. package/shared/definition26.cjs +63 -30
  143. package/shared/definition26.js +62 -29
  144. package/shared/definition27.cjs +28 -56
  145. package/shared/definition27.js +27 -55
  146. package/shared/definition28.cjs +35 -881
  147. package/shared/definition28.js +34 -879
  148. package/shared/definition29.cjs +893 -60
  149. package/shared/definition29.js +893 -61
  150. package/shared/definition30.cjs +68 -86
  151. package/shared/definition30.js +67 -85
  152. package/shared/definition31.cjs +86 -21
  153. package/shared/definition31.js +86 -21
  154. package/shared/definition32.cjs +24 -12
  155. package/shared/definition32.js +23 -11
  156. package/shared/definition33.cjs +11 -50
  157. package/shared/definition33.js +10 -49
  158. package/shared/definition34.cjs +26 -515
  159. package/shared/definition34.js +26 -515
  160. package/shared/definition35.cjs +448 -194
  161. package/shared/definition35.js +448 -192
  162. package/shared/definition36.cjs +256 -202
  163. package/shared/definition36.js +253 -201
  164. package/shared/definition37.cjs +204 -65
  165. package/shared/definition37.js +203 -63
  166. package/shared/definition38.cjs +63 -57
  167. package/shared/definition38.js +60 -55
  168. package/shared/definition39.cjs +65 -432
  169. package/shared/definition39.js +64 -431
  170. package/shared/definition4.cjs +2 -2
  171. package/shared/definition4.js +2 -2
  172. package/shared/definition40.cjs +441 -34
  173. package/shared/definition40.js +438 -31
  174. package/shared/definition41.cjs +34 -576
  175. package/shared/definition41.js +33 -575
  176. package/shared/definition42.cjs +531 -654
  177. package/shared/definition42.js +531 -654
  178. package/shared/definition43.cjs +690 -114
  179. package/shared/definition43.js +689 -113
  180. package/shared/definition44.cjs +124 -79
  181. package/shared/definition44.js +122 -77
  182. package/shared/definition45.cjs +78 -520
  183. package/shared/definition45.js +77 -518
  184. package/shared/definition46.cjs +520 -119
  185. package/shared/definition46.js +518 -118
  186. package/shared/definition47.cjs +118 -135
  187. package/shared/definition47.js +117 -134
  188. package/shared/definition48.cjs +151 -19
  189. package/shared/definition48.js +150 -18
  190. package/shared/definition49.cjs +21 -84
  191. package/shared/definition49.js +20 -83
  192. package/shared/definition5.cjs +1 -1
  193. package/shared/definition5.js +1 -1
  194. package/shared/definition50.cjs +52 -505
  195. package/shared/definition50.js +51 -504
  196. package/shared/definition51.cjs +526 -28
  197. package/shared/definition51.js +525 -27
  198. package/shared/definition52.cjs +28 -123
  199. package/shared/definition52.js +26 -122
  200. package/shared/definition53.cjs +110 -309
  201. package/shared/definition53.js +110 -308
  202. package/shared/definition54.cjs +255 -271
  203. package/shared/definition54.js +255 -271
  204. package/shared/definition55.cjs +262 -791
  205. package/shared/definition55.js +261 -790
  206. package/shared/definition56.cjs +818 -107
  207. package/shared/definition56.js +817 -106
  208. package/shared/definition57.cjs +85 -55
  209. package/shared/definition57.js +84 -54
  210. package/shared/definition58.cjs +125 -72
  211. package/shared/definition58.js +124 -71
  212. package/shared/definition59.cjs +72 -285
  213. package/shared/definition59.js +73 -286
  214. package/shared/definition6.cjs +1 -1
  215. package/shared/definition6.js +1 -1
  216. package/shared/definition60.cjs +298 -39
  217. package/shared/definition60.js +297 -38
  218. package/shared/definition61.cjs +65739 -1688
  219. package/shared/definition61.js +65738 -1687
  220. package/shared/definition62.cjs +50 -0
  221. package/shared/definition62.js +46 -0
  222. package/shared/definition63.cjs +1828 -0
  223. package/shared/definition63.js +1824 -0
  224. package/shared/definition7.cjs +2 -2
  225. package/shared/definition7.js +2 -2
  226. package/shared/definition8.cjs +2 -2
  227. package/shared/definition8.js +2 -2
  228. package/shared/definition9.cjs +1 -1
  229. package/shared/definition9.js +1 -1
  230. package/shared/enums.cjs +8 -0
  231. package/shared/enums.js +8 -1
  232. package/shared/index2.cjs +66 -37
  233. package/shared/index2.js +66 -37
  234. package/shared/key-codes2.js +1 -1
  235. package/shared/listbox.cjs +1 -1
  236. package/shared/listbox.js +1 -1
  237. package/shared/localization/Locale.d.ts +4 -0
  238. package/shared/patterns/form-elements/form-elements.d.ts +2 -3
  239. package/shared/presentationDate.cjs +16 -5
  240. package/shared/presentationDate.js +16 -5
  241. package/shared/text-anchor.cjs +6 -0
  242. package/shared/text-anchor.js +6 -0
  243. package/shared/text-anchor.template.cjs +6 -1
  244. package/shared/text-anchor.template.js +6 -1
  245. package/shared/text-field.cjs +1 -1
  246. package/shared/text-field.js +1 -1
  247. package/shared/utils/applyMixinsWithObservables.d.ts +1 -0
  248. package/side-drawer/index.cjs +1 -1
  249. package/side-drawer/index.js +1 -1
  250. package/slider/index.cjs +1 -1
  251. package/slider/index.js +1 -1
  252. package/split-button/index.cjs +2 -2
  253. package/split-button/index.js +2 -2
  254. package/style.css +1 -0
  255. package/styles/core/all.css +1 -1
  256. package/styles/core/theme.css +1 -1
  257. package/styles/core/typography.css +1 -1
  258. package/styles/tokens/theme-dark.css +4 -4
  259. package/styles/tokens/theme-light.css +4 -4
  260. package/styles/tokens/vivid-2-compat.css +1 -1
  261. package/switch/index.cjs +2 -2
  262. package/switch/index.js +2 -2
  263. package/tab/index.cjs +2 -2
  264. package/tab/index.js +2 -2
  265. package/tab-panel/index.cjs +1 -1
  266. package/tab-panel/index.js +1 -1
  267. package/tabs/index.cjs +4 -4
  268. package/tabs/index.js +4 -4
  269. package/tag/index.cjs +2 -2
  270. package/tag/index.js +2 -2
  271. package/tag-group/index.cjs +1 -1
  272. package/tag-group/index.js +1 -1
  273. package/text-area/index.cjs +4 -3
  274. package/text-area/index.js +4 -3
  275. package/text-field/index.cjs +4 -3
  276. package/text-field/index.js +4 -3
  277. package/time-picker/index.cjs +8 -7
  278. package/time-picker/index.js +8 -7
  279. package/toggletip/index.cjs +5 -5
  280. package/toggletip/index.js +5 -5
  281. package/tooltip/index.cjs +5 -5
  282. package/tooltip/index.js +5 -5
  283. package/tree-item/index.cjs +2 -2
  284. package/tree-item/index.js +2 -2
  285. package/tree-view/index.cjs +1 -1
  286. package/tree-view/index.js +1 -1
  287. package/video-player/index.cjs +17 -0
  288. package/video-player/index.js +15 -0
  289. package/vivid.api.json +311 -0
@@ -1,711 +1,588 @@
1
- import { D as DOM, O as Observable, _ as __decorate, a as attr, v as volatile, o as observable, h as html, r as registerFactory } from './index.js';
2
- import { P as Popup, p as popupRegistries } from './definition61.js';
3
- import { a as iconRegistries } from './definition26.js';
4
- import { L as ListboxOption, a as listboxOptionRegistries } from './definition35.js';
5
- import { b as AffixIconWithTrailing, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
6
- import { e as errorText, f as formElements, F as FormElementSuccessText, a as FormElementHelperText, g as getFeedbackTemplate } from './index2.js';
7
- import { L as ListboxElement, b as Listbox, D as DelegatesARIAListbox, a as Listbox$1 } from './listbox.js';
8
- import { S as StartEnd } from './start-end.js';
9
- import { a as applyMixins } from './apply-mixins.js';
1
+ import { F as FoundationElement, a as attr, o as observable, n as nullableNumberConverter, h as html, r as registerFactory } from './index.js';
2
+ import { c as keyHome, d as keyEnd, e as keyArrowUp, k as keyArrowLeft, f as keyArrowDown, a as keyArrowRight } from './key-codes2.js';
3
+ import './affix.js';
4
+ import { f as formElements } from './index2.js';
5
+ import { L as Localized } from './localized.js';
10
6
  import { F as FormAssociated } from './form-associated.js';
11
- import { S as SelectPosition } from './select.options.js';
12
- import { u as uniqueId } from './strings.js';
13
- import { c as keyTab, b as keyEscape, k as keyEnter, d as keyEnd, g as keyHome, a as keySpace, f as keyArrowDown, e as keyArrowUp } from './key-codes.js';
14
- import { w as when } from './when.js';
7
+ import { l as limit, g as getMarkersTemplate } from './slider.template.js';
8
+ import { a as applyMixins } from './apply-mixins.js';
9
+ import { O as Orientation } from './aria2.js';
15
10
  import { r as ref } from './ref.js';
16
- import { s as slotted } from './slotted.js';
11
+ import { w as when } from './when.js';
17
12
  import { c as classNames } from './class-names.js';
18
13
 
19
- class _Select extends ListboxElement {
14
+ const styles = ":host{display:inline-block}:host(:not([orientation=vertical])){inline-size:100%}:host([orientation=vertical]){block-size:100%;min-block-size:calc(var(--_thumb-interaction-indicator-size) * 5)}:host([disabled]){cursor:not-allowed}.control{--_thumb-size: 12px;--_thumb-interaction-indicator-size: 36px;--_track-start-inset-inline-start: 0;--_track-start-inset-block-start: 0;cursor:pointer;outline:none;user-select:none}.control.connotation-cta{--_connotation-color-primary: var(--vvd-slider-cta-primary, var(--vvd-color-cta-500))}.control:not(.connotation-cta){--_connotation-color-primary: var(--vvd-slider-accent-primary, var(--vvd-color-canvas-text))}.control{--_appearance-color-text: var(--_connotation-color-primary-text);--_appearance-color-fill: var(--_connotation-color-primary);--_appearance-color-outline: transparent}.control .positioning-region{position:relative}.control .track{position:absolute;border-radius:4px;background:var(--_track-background-color)}.control .track-start{position:absolute;border-radius:inherit;background:var(--_track-start-background-color);block-size:100%;inset-inline-start:var(--_track-start-inset-inline-start)}.control.horizontal{block-size:var(--_thumb-interaction-indicator-size);inline-size:calc(100% - var(--_thumb-size));margin-inline-start:calc(var(--_thumb-size) / 2);min-inline-size:var(--_thumb-size)}.control.horizontal .track{top:calc((var(--_thumb-interaction-indicator-size) - 2px) / 2);right:0;left:0;block-size:2px}.control.horizontal .track .mark{block-size:4px;inline-size:100%}.control.vertical{margin-top:calc(var(--_thumb-interaction-indicator-size) / 2);block-size:calc(100% - var(--_thumb-interaction-indicator-size));inline-size:var(--_thumb-interaction-indicator-size);min-block-size:var(--_thumb-interaction-indicator-size)}.control.vertical .positioning-region{block-size:100%}.control.vertical .track{left:calc((var(--_thumb-interaction-indicator-size) - 2px) / 2);block-size:100%;inline-size:2px}.control.vertical .track .mark{block-size:100%;inline-size:4px}.control.vertical .track-start{block-size:auto;inline-size:100%;inset-block-start:var(--_track-start-inset-block-start)}.control.disabled{--_track-background-color: var(--vvd-color-neutral-100);--_track-start-background-color: var(--vvd-color-neutral-300);pointer-events:none}.control:not(.disabled){--_track-background-color: var(--vvd-color-neutral-300);--_track-start-background-color: var(--_appearance-color-fill)}.thumb-container{position:absolute;border-radius:50%;block-size:var(--_thumb-interaction-indicator-size);cursor:inherit;inline-size:var(--_thumb-interaction-indicator-size);outline-color:transparent;touch-action:none}:focus-visible .thumb-container,.thumb-container:focus-visible{box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px));--focus-stroke-gap-color: transparent;--_thumb-interaction-indicator-alpha: .05;border-radius:50%}.control.horizontal .thumb-container{transform:translate(calc(var(--_thumb-interaction-indicator-size) / 2))}.control.vertical .thumb-container{transform:translateY(calc(var(--_thumb-interaction-indicator-size) / 2))}.control:not(.disabled) .thumb-container:hover{--_thumb-interaction-indicator-alpha: .12}.control:not(.disabled) .thumb-container:active{--_thumb-interaction-indicator-alpha: .25}.thumb-container:before{position:absolute;display:block;border-radius:inherit;background-color:var(--_track-start-background-color);block-size:var(--_thumb-interaction-indicator-size);content:\"\";inline-size:var(--_thumb-interaction-indicator-size);opacity:var(--_thumb-interaction-indicator-alpha, 0);transition:opacity .2s ease-out 0s}.thumb-container:after{position:absolute;display:block;border-radius:inherit;background-color:var(--_track-start-background-color);block-size:var(--_thumb-size);content:\"\";inline-size:var(--_thumb-size);inset:calc((var(--_thumb-interaction-indicator-size) - var(--_thumb-size)) / 2)}.control{--_track-start-inset-inline-start: auto;--_track-start-inset-block-start: auto}\n";
15
+
16
+ class _RangeSlider extends FoundationElement {
20
17
  }
21
- /**
22
- * A form-associated base class for the {@link @microsoft/fast-foundation#(Select:class)} component.
23
- *
24
- * @internal
25
- */
26
- class FormAssociatedSelect extends FormAssociated(_Select) {
27
- constructor() {
28
- super(...arguments);
29
- this.proxy = document.createElement("select");
30
- }
18
+ class FormAssociatedRangeSlider extends FormAssociated(_RangeSlider) {
19
+ constructor() {
20
+ super(...arguments);
21
+ this.proxy = document.createElement("input");
22
+ }
31
23
  }
32
24
 
33
- /**
34
- * A Select Custom HTML Element.
35
- * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#select | ARIA select }.
36
- *
37
- * @slot start - Content which can be provided before the button content
38
- * @slot end - Content which can be provided after the button content
39
- * @slot button-container - The element representing the select button
40
- * @slot selected-value - The selected value
41
- * @slot indicator - The visual indicator for the expand/collapse state of the button
42
- * @slot - The default slot for slotted options
43
- * @csspart control - The element representing the select invoking element
44
- * @csspart selected-value - The element wrapping the selected value
45
- * @csspart indicator - The element wrapping the visual indicator
46
- * @csspart listbox - The listbox element
47
- * @fires input - Fires a custom 'input' event when the value updates
48
- * @fires change - Fires a custom 'change' event when the value updates
49
- *
50
- * @public
51
- */
52
- let Select$1 = class Select extends FormAssociatedSelect {
53
- constructor() {
54
- super(...arguments);
55
- /**
56
- * The open attribute.
57
- *
58
- * @public
59
- * @remarks
60
- * HTML Attribute: open
61
- */
62
- this.open = false;
63
- /**
64
- * Indicates the initial state of the position attribute.
65
- *
66
- * @internal
67
- */
68
- this.forcedPosition = false;
69
- /**
70
- * The unique id for the internal listbox element.
71
- *
72
- * @internal
73
- */
74
- this.listboxId = uniqueId("listbox-");
75
- /**
76
- * The max height for the listbox when opened.
77
- *
78
- * @internal
79
- */
80
- this.maxHeight = 0;
81
- }
82
- /**
83
- * Sets focus and synchronizes ARIA attributes when the open property changes.
84
- *
85
- * @param prev - the previous open value
86
- * @param next - the current open value
87
- *
88
- * @internal
89
- */
90
- openChanged(prev, next) {
91
- if (!this.collapsible) {
92
- return;
93
- }
94
- if (this.open) {
95
- this.ariaControls = this.listboxId;
96
- this.ariaExpanded = "true";
97
- this.setPositioning();
98
- this.focusAndScrollOptionIntoView();
99
- this.indexWhenOpened = this.selectedIndex;
100
- // focus is directed to the element when `open` is changed programmatically
101
- DOM.queueUpdate(() => this.focus());
102
- return;
103
- }
104
- this.ariaControls = "";
105
- this.ariaExpanded = "false";
106
- }
107
- /**
108
- * The component is collapsible when in single-selection mode with no size attribute.
109
- *
110
- * @internal
111
- */
112
- get collapsible() {
113
- return !(this.multiple || typeof this.size === "number");
114
- }
115
- /**
116
- * The value property.
117
- *
118
- * @public
119
- */
120
- get value() {
121
- Observable.track(this, "value");
122
- return this._value;
123
- }
124
- set value(next) {
125
- var _a, _b, _c, _d, _e, _f, _g;
126
- const prev = `${this._value}`;
127
- if ((_a = this._options) === null || _a === void 0 ? void 0 : _a.length) {
128
- const selectedIndex = this._options.findIndex(el => el.value === next);
129
- const prevSelectedValue = (_c = (_b = this._options[this.selectedIndex]) === null || _b === void 0 ? void 0 : _b.value) !== null && _c !== void 0 ? _c : null;
130
- const nextSelectedValue = (_e = (_d = this._options[selectedIndex]) === null || _d === void 0 ? void 0 : _d.value) !== null && _e !== void 0 ? _e : null;
131
- if (selectedIndex === -1 || prevSelectedValue !== nextSelectedValue) {
132
- next = "";
133
- this.selectedIndex = selectedIndex;
134
- }
135
- next = (_g = (_f = this.firstSelectedOption) === null || _f === void 0 ? void 0 : _f.value) !== null && _g !== void 0 ? _g : next;
136
- }
137
- if (prev !== next) {
138
- this._value = next;
139
- super.valueChanged(prev, next);
140
- Observable.notify(this, "value");
141
- this.updateDisplayValue();
142
- }
143
- }
144
- /**
145
- * Sets the value and display value to match the first selected option.
146
- *
147
- * @param shouldEmit - if true, the input and change events will be emitted
148
- *
149
- * @internal
150
- */
151
- updateValue(shouldEmit) {
152
- var _a, _b;
153
- if (this.$fastController.isConnected) {
154
- this.value = (_b = (_a = this.firstSelectedOption) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : "";
155
- }
156
- if (shouldEmit) {
157
- this.$emit("input");
158
- this.$emit("change", this, {
159
- bubbles: true,
160
- composed: undefined,
161
- });
162
- }
163
- }
164
- /**
165
- * Updates the proxy value when the selected index changes.
166
- *
167
- * @param prev - the previous selected index
168
- * @param next - the next selected index
169
- *
170
- * @internal
171
- */
172
- selectedIndexChanged(prev, next) {
173
- super.selectedIndexChanged(prev, next);
174
- this.updateValue();
175
- }
176
- positionChanged(prev, next) {
177
- this.positionAttribute = next;
178
- this.setPositioning();
179
- }
180
- /**
181
- * Calculate and apply listbox positioning based on available viewport space.
182
- *
183
- * @public
184
- */
185
- setPositioning() {
186
- const currentBox = this.getBoundingClientRect();
187
- const viewportHeight = window.innerHeight;
188
- const availableBottom = viewportHeight - currentBox.bottom;
189
- this.position = this.forcedPosition
190
- ? this.positionAttribute
191
- : currentBox.top > availableBottom
192
- ? SelectPosition.above
193
- : SelectPosition.below;
194
- this.positionAttribute = this.forcedPosition
195
- ? this.positionAttribute
196
- : this.position;
197
- this.maxHeight =
198
- this.position === SelectPosition.above ? ~~currentBox.top : ~~availableBottom;
199
- }
200
- /**
201
- * The value displayed on the button.
202
- *
203
- * @public
204
- */
205
- get displayValue() {
206
- var _a, _b;
207
- Observable.track(this, "displayValue");
208
- return (_b = (_a = this.firstSelectedOption) === null || _a === void 0 ? void 0 : _a.text) !== null && _b !== void 0 ? _b : "";
209
- }
210
- /**
211
- * Synchronize the `aria-disabled` property when the `disabled` property changes.
212
- *
213
- * @param prev - The previous disabled value
214
- * @param next - The next disabled value
215
- *
216
- * @internal
217
- */
218
- disabledChanged(prev, next) {
219
- if (super.disabledChanged) {
220
- super.disabledChanged(prev, next);
221
- }
222
- this.ariaDisabled = this.disabled ? "true" : "false";
223
- }
224
- /**
225
- * Reset the element to its first selectable option when its parent form is reset.
226
- *
227
- * @internal
228
- */
229
- formResetCallback() {
230
- this.setProxyOptions();
231
- // Call the base class's implementation setDefaultSelectedOption instead of the select's
232
- // override, in order to reset the selectedIndex without using the value property.
233
- super.setDefaultSelectedOption();
234
- if (this.selectedIndex === -1) {
235
- this.selectedIndex = 0;
236
- }
237
- }
238
- /**
239
- * Handle opening and closing the listbox when the select is clicked.
240
- *
241
- * @param e - the mouse event
242
- * @internal
243
- */
244
- clickHandler(e) {
245
- // do nothing if the select is disabled
246
- if (this.disabled) {
247
- return;
248
- }
249
- if (this.open) {
250
- const captured = e.target.closest(`option,[role=option]`);
251
- if (captured && captured.disabled) {
252
- return;
253
- }
254
- }
255
- super.clickHandler(e);
256
- this.open = this.collapsible && !this.open;
257
- if (!this.open && this.indexWhenOpened !== this.selectedIndex) {
258
- this.updateValue(true);
259
- }
260
- return true;
261
- }
262
- /**
263
- * Handles focus state when the element or its children lose focus.
264
- *
265
- * @param e - The focus event
266
- * @internal
267
- */
268
- focusoutHandler(e) {
269
- var _a;
270
- super.focusoutHandler(e);
271
- if (!this.open) {
272
- return true;
273
- }
274
- const focusTarget = e.relatedTarget;
275
- if (this.isSameNode(focusTarget)) {
276
- this.focus();
277
- return;
278
- }
279
- if (!((_a = this.options) === null || _a === void 0 ? void 0 : _a.includes(focusTarget))) {
280
- this.open = false;
281
- if (this.indexWhenOpened !== this.selectedIndex) {
282
- this.updateValue(true);
283
- }
284
- }
285
- }
25
+ const getDecimalPlaces = (num) => {
26
+ const match = num.toString().match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);
27
+ return Math.max(
28
+ 0,
29
+ // Number of digits right of decimal point.
30
+ (match[1] ? match[1].length : 0) - // Adjust for scientific notation.
31
+ (match[2] ? +match[2] : 0)
32
+ );
33
+ };
34
+ const roundToStepValue = (value, step) => {
35
+ const decimalPlaces = getDecimalPlaces(step);
36
+ const factor = Math.pow(10, decimalPlaces);
37
+ const roundedValue = Math.round(value / step) * step;
38
+ return Math.round(roundedValue * factor) / factor;
39
+ };
40
+
41
+ const lerp = (a, b, value) => a + (b - a) * value;
42
+ const inverseLerp = (a, b, value) => limit(0, 1, (value - a) / (b - a));
43
+
44
+ var __defProp = Object.defineProperty;
45
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
46
+ var __decorateClass = (decorators, target, key, kind) => {
47
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
48
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
49
+ if (decorator = decorators[i])
50
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
51
+ if (kind && result)
52
+ __defProp(target, key, result);
53
+ return result;
54
+ };
55
+ var __accessCheck = (obj, member, msg) => {
56
+ if (!member.has(obj))
57
+ throw TypeError("Cannot " + msg);
58
+ };
59
+ var __privateGet = (obj, member, getter) => {
60
+ __accessCheck(obj, member, "read from private field");
61
+ return getter ? getter.call(obj) : member.get(obj);
62
+ };
63
+ var __privateAdd = (obj, member, value) => {
64
+ if (member.has(obj))
65
+ throw TypeError("Cannot add the same private member more than once");
66
+ member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
67
+ };
68
+ var __privateSet = (obj, member, value, setter) => {
69
+ __accessCheck(obj, member, "write to private field");
70
+ setter ? setter.call(obj, value) : member.set(obj, value);
71
+ return value;
72
+ };
73
+ var __privateMethod = (obj, member, method) => {
74
+ __accessCheck(obj, member, "access private method");
75
+ return method;
76
+ };
77
+ var _isInternalValueUpdate, _updateValues, updateValues_fn, _applyStep, applyStep_fn, _updateFormValue, updateFormValue_fn, _thumbs, thumbs_get, _thumbConstraints, thumbConstraints_get, _draggingThumb, _updateThumbPositions, updateThumbPositions_fn, _thumbTrackEndOffset, thumbTrackEndOffset_fn, _calculateValueFromMouseEvent, calculateValueFromMouseEvent_fn, _roundToNearestStep, roundToNearestStep_fn, _registerThumbListeners, registerThumbListeners_fn, _unregisterThumbListeners, unregisterThumbListeners_fn, _onThumbMousedown, _onThumbKeydown, _registerDragHandlers, registerDragHandlers_fn, _unregisterDragListeners, unregisterDragListeners_fn, _onDragMove, _onDragEnd;
78
+ const Direction = {
79
+ Increment: 1,
80
+ Decrement: -1
81
+ };
82
+ let RangeSlider = class extends FormAssociatedRangeSlider {
83
+ constructor() {
84
+ super(...arguments);
85
+ __privateAdd(this, _updateValues);
86
+ __privateAdd(this, _applyStep);
87
+ __privateAdd(this, _updateFormValue);
88
+ __privateAdd(this, _thumbs);
89
+ __privateAdd(this, _thumbConstraints);
90
+ __privateAdd(this, _updateThumbPositions);
91
+ __privateAdd(this, _thumbTrackEndOffset);
92
+ __privateAdd(this, _calculateValueFromMouseEvent);
93
+ __privateAdd(this, _roundToNearestStep);
94
+ // --- Event handling ---
95
+ __privateAdd(this, _registerThumbListeners);
96
+ __privateAdd(this, _unregisterThumbListeners);
97
+ __privateAdd(this, _registerDragHandlers);
98
+ __privateAdd(this, _unregisterDragListeners);
99
+ // --- Start & end values ---
100
+ __privateAdd(this, _isInternalValueUpdate, false);
101
+ this.start = "";
102
+ this.end = "";
103
+ this.min = 0;
104
+ this.max = 10;
105
+ this.step = 1;
106
+ this.orientation = Orientation.horizontal;
107
+ this.ariaStartLabel = null;
108
+ this.ariaEndLabel = null;
109
+ this.markers = false;
110
+ this.valueTextFormatter = (value) => value;
111
+ // --- Thumbs ---
286
112
  /**
287
- * Updates the value when an option's value changes.
288
- *
289
- * @param source - the source object
290
- * @param propertyName - the property to evaluate
291
- *
292
113
  * @internal
293
- * @override
294
114
  */
295
- handleChange(source, propertyName) {
296
- super.handleChange(source, propertyName);
297
- if (propertyName === "value") {
298
- this.updateValue();
299
- }
300
- }
115
+ this._trackEl = null;
301
116
  /**
302
- * Synchronize the form-associated proxy and updates the value property of the element.
303
- *
304
- * @param prev - the previous collection of slotted option elements
305
- * @param next - the next collection of slotted option elements
306
- *
307
117
  * @internal
308
118
  */
309
- slottedOptionsChanged(prev, next) {
310
- this.options.forEach(o => {
311
- const notifier = Observable.getNotifier(o);
312
- notifier.unsubscribe(this, "value");
313
- });
314
- super.slottedOptionsChanged(prev, next);
315
- this.options.forEach(o => {
316
- const notifier = Observable.getNotifier(o);
317
- notifier.subscribe(this, "value");
318
- });
319
- this.setProxyOptions();
320
- this.updateValue();
321
- }
119
+ this._startThumbEl = null;
322
120
  /**
323
- * Prevents focus when size is set and a scrollbar is clicked.
324
- *
325
- * @param e - the mouse event object
326
- *
327
- * @override
328
121
  * @internal
329
122
  */
330
- mousedownHandler(e) {
331
- var _a;
332
- if (e.offsetX >= 0 && e.offsetX <= ((_a = this.listbox) === null || _a === void 0 ? void 0 : _a.scrollWidth)) {
333
- return super.mousedownHandler(e);
123
+ this._endThumbEl = null;
124
+ __privateAdd(this, _draggingThumb, false);
125
+ this._startThumbCss = "";
126
+ this._endThumbCss = "";
127
+ this._selectedRangeCss = "";
128
+ __privateAdd(this, _onThumbMousedown, (event) => {
129
+ if (this.disabled || event.defaultPrevented) {
130
+ return;
131
+ }
132
+ let target = event.target;
133
+ if (target === this._endThumbEl && this.startAsNumber === this.max && this.endAsNumber === this.max) {
134
+ target = this._startThumbEl;
135
+ }
136
+ target.focus();
137
+ __privateSet(this, _draggingThumb, target === this._startThumbEl ? "start" : "end");
138
+ __privateMethod(this, _registerDragHandlers, registerDragHandlers_fn).call(this);
139
+ });
140
+ __privateAdd(this, _onThumbKeydown, (e) => {
141
+ const thumb = e.target === this._startThumbEl ? "start" : "end";
142
+ if (e.key === keyHome) {
143
+ e.preventDefault();
144
+ __privateMethod(this, _updateValues, updateValues_fn).call(this, { [thumb]: `${__privateGet(this, _thumbConstraints, thumbConstraints_get)[thumb].min}` });
145
+ } else if (e.key === keyEnd) {
146
+ e.preventDefault();
147
+ __privateMethod(this, _updateValues, updateValues_fn).call(this, { [thumb]: `${__privateGet(this, _thumbConstraints, thumbConstraints_get)[thumb].max}` });
148
+ } else if (!e.shiftKey) {
149
+ switch (e.key) {
150
+ case keyArrowRight:
151
+ case keyArrowDown:
152
+ e.preventDefault();
153
+ __privateMethod(this, _applyStep, applyStep_fn).call(this, thumb, Direction.Increment);
154
+ break;
155
+ case keyArrowLeft:
156
+ case keyArrowUp:
157
+ e.preventDefault();
158
+ __privateMethod(this, _applyStep, applyStep_fn).call(this, thumb, Direction.Decrement);
159
+ break;
334
160
  }
335
- return this.collapsible;
161
+ }
162
+ });
163
+ __privateAdd(this, _onDragMove, (e) => {
164
+ if (this.disabled || e.defaultPrevented || !__privateGet(this, _draggingThumb)) {
165
+ return;
166
+ }
167
+ const sourceEvent = "TouchEvent" in window && e instanceof TouchEvent ? e.touches[0] : e;
168
+ const value = __privateMethod(this, _calculateValueFromMouseEvent, calculateValueFromMouseEvent_fn).call(this, sourceEvent);
169
+ __privateMethod(this, _updateValues, updateValues_fn).call(this, {
170
+ [__privateGet(this, _draggingThumb)]: `${__privateMethod(this, _roundToNearestStep, roundToNearestStep_fn).call(this, __privateGet(this, _draggingThumb), value)}`
171
+ });
172
+ });
173
+ __privateAdd(this, _onDragEnd, () => {
174
+ __privateSet(this, _draggingThumb, false);
175
+ __privateMethod(this, _unregisterDragListeners, unregisterDragListeners_fn).call(this);
176
+ });
177
+ }
178
+ /**
179
+ * @internal
180
+ */
181
+ startChanged() {
182
+ this.currentStart = this.start;
183
+ if (!__privateGet(this, _isInternalValueUpdate)) {
184
+ this.dirtyValue = true;
185
+ __privateMethod(this, _updateFormValue, updateFormValue_fn).call(this);
336
186
  }
337
- /**
338
- * Sets the multiple property on the proxy element.
339
- *
340
- * @param prev - the previous multiple value
341
- * @param next - the current multiple value
342
- */
343
- multipleChanged(prev, next) {
344
- super.multipleChanged(prev, next);
345
- if (this.proxy) {
346
- this.proxy.multiple = next;
347
- }
187
+ if (this.$fastController.isConnected) {
188
+ __privateMethod(this, _updateThumbPositions, updateThumbPositions_fn).call(this);
348
189
  }
349
- /**
350
- * Updates the selectedness of each option when the list of selected options changes.
351
- *
352
- * @param prev - the previous list of selected options
353
- * @param next - the current list of selected options
354
- *
355
- * @override
356
- * @internal
357
- */
358
- selectedOptionsChanged(prev, next) {
359
- var _a;
360
- super.selectedOptionsChanged(prev, next);
361
- (_a = this.options) === null || _a === void 0 ? void 0 : _a.forEach((o, i) => {
362
- var _a;
363
- const proxyOption = (_a = this.proxy) === null || _a === void 0 ? void 0 : _a.options.item(i);
364
- if (proxyOption) {
365
- proxyOption.selected = o.selected;
366
- }
367
- });
190
+ }
191
+ /**
192
+ * @internal
193
+ */
194
+ initialStartChanged(_, newValue) {
195
+ if (newValue && !this.dirtyValue) {
196
+ this.start = newValue;
197
+ this.dirtyValue = false;
368
198
  }
369
- /**
370
- * Sets the selected index to match the first option with the selected attribute, or
371
- * the first selectable option.
372
- *
373
- * @override
374
- * @internal
375
- */
376
- setDefaultSelectedOption() {
377
- var _a;
378
- const options = (_a = this.options) !== null && _a !== void 0 ? _a : Array.from(this.children).filter(Listbox.slottedOptionFilter);
379
- const selectedIndex = options === null || options === void 0 ? void 0 : options.findIndex(el => el.hasAttribute("selected") || el.selected || el.value === this.value);
380
- if (selectedIndex !== -1) {
381
- this.selectedIndex = selectedIndex;
382
- return;
383
- }
384
- this.selectedIndex = 0;
199
+ }
200
+ /**
201
+ * @internal
202
+ */
203
+ currentStartChanged() {
204
+ this.start = this.currentStart;
205
+ }
206
+ /**
207
+ * The start property, typed as a number.
208
+ *
209
+ * @public
210
+ */
211
+ get startAsNumber() {
212
+ return parseFloat(this.start);
213
+ }
214
+ set startAsNumber(next) {
215
+ this.start = next.toString();
216
+ }
217
+ /**
218
+ * @internal
219
+ */
220
+ endChanged() {
221
+ this.currentEnd = this.end;
222
+ if (!__privateGet(this, _isInternalValueUpdate)) {
223
+ this.dirtyValue = true;
224
+ __privateMethod(this, _updateFormValue, updateFormValue_fn).call(this);
385
225
  }
386
- /**
387
- * Resets and fills the proxy to match the component's options.
388
- *
389
- * @internal
390
- */
391
- setProxyOptions() {
392
- if (this.proxy instanceof HTMLSelectElement && this.options) {
393
- this.proxy.options.length = 0;
394
- this.options.forEach(option => {
395
- const proxyOption = option.proxy ||
396
- (option instanceof HTMLOptionElement ? option.cloneNode() : null);
397
- if (proxyOption) {
398
- this.proxy.options.add(proxyOption);
399
- }
400
- });
401
- }
226
+ if (this.$fastController.isConnected) {
227
+ __privateMethod(this, _updateThumbPositions, updateThumbPositions_fn).call(this);
402
228
  }
403
- /**
404
- * Handle keyboard interaction for the select.
405
- *
406
- * @param e - the keyboard event
407
- * @internal
408
- */
409
- keydownHandler(e) {
410
- super.keydownHandler(e);
411
- const key = e.key || e.key.charCodeAt(0);
412
- switch (key) {
413
- case keySpace: {
414
- e.preventDefault();
415
- if (this.collapsible && this.typeAheadExpired) {
416
- this.open = !this.open;
417
- }
418
- break;
419
- }
420
- case keyHome:
421
- case keyEnd: {
422
- e.preventDefault();
423
- break;
424
- }
425
- case keyEnter: {
426
- e.preventDefault();
427
- this.open = !this.open;
428
- break;
429
- }
430
- case keyEscape: {
431
- if (this.collapsible && this.open) {
432
- e.preventDefault();
433
- this.open = false;
434
- }
435
- break;
436
- }
437
- case keyTab: {
438
- if (this.collapsible && this.open) {
439
- e.preventDefault();
440
- this.open = false;
441
- }
442
- return true;
443
- }
444
- }
445
- if (!this.open && this.indexWhenOpened !== this.selectedIndex) {
446
- this.updateValue(true);
447
- this.indexWhenOpened = this.selectedIndex;
448
- }
449
- return !(key === keyArrowDown || key === keyArrowUp);
229
+ }
230
+ /**
231
+ * @internal
232
+ */
233
+ initialEndChanged(_, newValue) {
234
+ if (newValue && !this.dirtyValue) {
235
+ this.end = newValue;
236
+ this.dirtyValue = false;
450
237
  }
451
- connectedCallback() {
452
- super.connectedCallback();
453
- this.forcedPosition = !!this.positionAttribute;
454
- this.addEventListener("contentchange", this.updateDisplayValue);
238
+ }
239
+ /**
240
+ * @internal
241
+ */
242
+ currentEndChanged() {
243
+ this.end = this.currentEnd;
244
+ }
245
+ /**
246
+ * The end property, typed as a number.
247
+ *
248
+ * @public
249
+ */
250
+ get endAsNumber() {
251
+ return parseFloat(this.end);
252
+ }
253
+ set endAsNumber(next) {
254
+ this.end = next.toString();
255
+ }
256
+ /**
257
+ * @internal
258
+ */
259
+ orientationChanged() {
260
+ if (this.$fastController.isConnected) {
261
+ __privateMethod(this, _updateThumbPositions, updateThumbPositions_fn).call(this);
455
262
  }
456
- disconnectedCallback() {
457
- this.removeEventListener("contentchange", this.updateDisplayValue);
458
- super.disconnectedCallback();
263
+ }
264
+ // --- Form handling ---
265
+ /**
266
+ * @internal
267
+ */
268
+ nameChanged(previous, next) {
269
+ super.nameChanged(previous, next);
270
+ __privateMethod(this, _updateFormValue, updateFormValue_fn).call(this);
271
+ }
272
+ formResetCallback() {
273
+ __privateMethod(this, _updateValues, updateValues_fn).call(this, {
274
+ start: this.initialStart ?? this.min.toString(),
275
+ end: this.initialEnd ?? this.max.toString()
276
+ });
277
+ super.formResetCallback();
278
+ }
279
+ // --- Lifecycle ---
280
+ connectedCallback() {
281
+ super.connectedCallback();
282
+ __privateMethod(this, _updateValues, updateValues_fn).call(this, {
283
+ start: this.start || this.initialStart || this.min.toString(),
284
+ end: this.end || this.initialEnd || this.max.toString()
285
+ }, false);
286
+ __privateMethod(this, _registerThumbListeners, registerThumbListeners_fn).call(this);
287
+ __privateMethod(this, _updateThumbPositions, updateThumbPositions_fn).call(this);
288
+ }
289
+ disconnectedCallback() {
290
+ super.disconnectedCallback();
291
+ __privateMethod(this, _unregisterThumbListeners, unregisterThumbListeners_fn).call(this);
292
+ __privateMethod(this, _unregisterDragListeners, unregisterDragListeners_fn).call(this);
293
+ }
294
+ /**
295
+ * @internal
296
+ */
297
+ _onMouseDown(e) {
298
+ if (this.disabled || __privateGet(this, _draggingThumb)) {
299
+ return;
459
300
  }
460
- /**
461
- * Updates the proxy's size property when the size attribute changes.
462
- *
463
- * @param prev - the previous size
464
- * @param next - the current size
465
- *
466
- * @override
467
- * @internal
468
- */
469
- sizeChanged(prev, next) {
470
- super.sizeChanged(prev, next);
471
- if (this.proxy) {
472
- this.proxy.size = next;
473
- }
301
+ const value = __privateMethod(this, _calculateValueFromMouseEvent, calculateValueFromMouseEvent_fn).call(this, e);
302
+ const startDistance = Math.abs(value - Number(this.start));
303
+ const endDistance = Math.abs(value - Number(this.end));
304
+ const thumb = startDistance < endDistance || startDistance === endDistance && value < Number(this.start) ? "start" : "end";
305
+ __privateMethod(this, _updateValues, updateValues_fn).call(this, {
306
+ [thumb]: `${__privateMethod(this, _roundToNearestStep, roundToNearestStep_fn).call(this, thumb, value)}`
307
+ });
308
+ __privateSet(this, _draggingThumb, thumb);
309
+ __privateGet(this, _thumbs, thumbs_get)[thumb].focus();
310
+ __privateMethod(this, _registerDragHandlers, registerDragHandlers_fn).call(this);
311
+ }
312
+ };
313
+ _isInternalValueUpdate = new WeakMap();
314
+ _updateValues = new WeakSet();
315
+ updateValues_fn = function({ start, end }, emitEvents = true) {
316
+ if (start === this.start) {
317
+ start = void 0;
318
+ }
319
+ if (end === this.end) {
320
+ end = void 0;
321
+ }
322
+ if (start === void 0 && end === void 0) {
323
+ return;
324
+ }
325
+ __privateSet(this, _isInternalValueUpdate, true);
326
+ if (start !== void 0) {
327
+ this.start = start;
328
+ }
329
+ if (end !== void 0) {
330
+ this.end = end;
331
+ }
332
+ __privateSet(this, _isInternalValueUpdate, false);
333
+ if (emitEvents) {
334
+ if (start !== void 0) {
335
+ this.$emit("input:start");
474
336
  }
475
- /**
476
- *
477
- * @internal
478
- */
479
- updateDisplayValue() {
480
- if (this.collapsible) {
481
- Observable.notify(this, "displayValue");
482
- }
337
+ if (end !== void 0) {
338
+ this.$emit("input:end");
483
339
  }
340
+ this.$emit("input");
341
+ this.$emit("change");
342
+ this.dirtyValue = true;
343
+ }
344
+ __privateMethod(this, _updateFormValue, updateFormValue_fn).call(this);
484
345
  };
485
- __decorate([
486
- attr({ attribute: "open", mode: "boolean" })
487
- ], Select$1.prototype, "open", void 0);
488
- __decorate([
489
- volatile
490
- ], Select$1.prototype, "collapsible", null);
491
- __decorate([
492
- observable
493
- ], Select$1.prototype, "control", void 0);
494
- __decorate([
495
- attr({ attribute: "position" })
496
- ], Select$1.prototype, "positionAttribute", void 0);
497
- __decorate([
498
- observable
499
- ], Select$1.prototype, "position", void 0);
500
- __decorate([
501
- observable
502
- ], Select$1.prototype, "maxHeight", void 0);
503
- /**
504
- * Includes ARIA states and properties relating to the ARIA select role.
505
- *
506
- * @public
507
- */
508
- class DelegatesARIASelect {
509
- }
510
- __decorate([
511
- observable
512
- ], DelegatesARIASelect.prototype, "ariaControls", void 0);
513
- applyMixins(DelegatesARIASelect, DelegatesARIAListbox);
514
- applyMixins(Select$1, StartEnd, DelegatesARIASelect);
515
-
516
- const styles = "@supports selector(:focus-visible){:host(:focus-visible){outline:none}}:host{display:inline-flex;flex-direction:column;gap:4px;--_low-ink-color: var(--vvd-color-neutral-600);--focus-stroke-gap-color: transparent}:host([disabled]){--_low-ink-color: var(--vvd-color-neutral-400);cursor:not-allowed}.label{color:var(--vvd-color-canvas-text);contain:inline-size;font:var(--vvd-typography-base)}.control{display:flex;align-items:center;justify-content:space-between;border-radius:var(--_select-control-border-radius);background-color:var(--_appearance-color-fill);block-size:calc(1px*(40 + 4*clamp(-1,var(--vvd-size-density, 0),2)));box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);color:var(--_appearance-color-text);font:var(--vvd-typography-base);gap:8px;padding-inline:16px;transition:box-shadow .2s,background-color .2s}.control{--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--_connotation-color-intermediate)}.control.appearance-ghost{--_appearance-color-text: var(--_connotation-color-primary);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.control:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--_connotation-color-fierce)}.control:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)).appearance-ghost{--_appearance-color-text: var(--_connotation-color-primary);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.control:where(.disabled,:disabled){--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-100);--_appearance-color-outline: var(--vvd-color-neutral-300)}.control:where(.disabled,:disabled).appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.control:where(.readonly):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: var(--vvd-color-neutral-400)}.control:where(.readonly):where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-600);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.control:where(.error):where(:not(.disabled,:disabled)){--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-alert-50);--_appearance-color-outline: var(--vvd-color-alert-500)}.control:where(.error):where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-alert-50);--_appearance-color-outline: transparent}.control:where(.success):where(:not(.disabled,:disabled)){--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-success-50);--_appearance-color-outline: var(--vvd-color-success-500)}.control:where(.success):where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-success-50);--_appearance-color-outline: transparent}.control{--_connotation-color-primary: var(--vvd-select-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-select-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-select-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-intermediate: var(--vvd-select-accent-intermediate, var(--vvd-color-neutral-500));--_connotation-color-firm: var(--vvd-select-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-fierce: var(--vvd-select-accent-fierce, var(--vvd-color-neutral-700))}.control-wrapper{position:relative}.control:not(.disabled){cursor:pointer}.control.disabled{pointer-events:none}.control:not(.shape-pill){--_select-control-border-radius: 8px}.control.shape-pill{--_select-control-border-radius: 24px}:host(:focus-visible) .control{box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px))}.listbox{display:flex;max-height:var(--select-height, 408px);flex-direction:column;padding:4px;gap:2px;overflow-y:auto}:host([multiple]:focus-visible) .listbox{box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px));border-radius:8px}.icon{display:flex;flex-shrink:0}.selected-value{display:flex;overflow:hidden;flex-grow:1;align-items:center;column-gap:12px;white-space:nowrap}.selected-value .text{overflow:hidden;max-inline-size:100%;text-overflow:ellipsis}.selected-value slot[name=icon]{flex:0 0 20px;font-size:20px;line-height:1}.control.has-meta .selected-value{padding-inline-end:8px}::part(popup-base){inline-size:max-content;min-inline-size:var(--_select-fixed-width, 100%)}:host([multiple]) ::part(popup-base){position:static}\n";
517
-
518
- var __defProp = Object.defineProperty;
519
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
520
- var __decorateClass = (decorators, target, key, kind) => {
521
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
522
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
523
- if (decorator = decorators[i])
524
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
525
- if (kind && result)
526
- __defProp(target, key, result);
527
- return result;
346
+ _applyStep = new WeakSet();
347
+ applyStep_fn = function(thumb, direction) {
348
+ __privateMethod(this, _updateValues, updateValues_fn).call(this, {
349
+ [thumb]: __privateMethod(this, _roundToNearestStep, roundToNearestStep_fn).call(this, thumb, Number(this[thumb]) + direction * this.step).toString()
350
+ });
528
351
  };
529
- let Select = class extends Select$1 {
530
- constructor() {
531
- super(...arguments);
532
- this.fixedDropdown = false;
533
- this.placeholderOption = null;
534
- }
535
- connectedCallback() {
536
- super.connectedCallback();
352
+ _updateFormValue = new WeakSet();
353
+ updateFormValue_fn = function() {
354
+ if (!this.name) {
355
+ this.setFormValue(null);
356
+ } else {
357
+ const formData = new FormData();
358
+ formData.append(this.name, this.start);
359
+ formData.append(this.name, this.end);
360
+ this.setFormValue(formData);
537
361
  }
538
- get displayValue() {
539
- Observable.track(this, "displayValue");
540
- return this.firstSelectedOption?.getAttribute("label") ?? this.firstSelectedOption?.text ?? this.placeholder ?? "";
362
+ };
363
+ _thumbs = new WeakSet();
364
+ thumbs_get = function() {
365
+ return {
366
+ start: this._startThumbEl,
367
+ end: this._endThumbEl
368
+ };
369
+ };
370
+ _thumbConstraints = new WeakSet();
371
+ thumbConstraints_get = function() {
372
+ return {
373
+ start: { min: this.min, max: this.endAsNumber },
374
+ end: { min: this.startAsNumber, max: this.max }
375
+ };
376
+ };
377
+ _draggingThumb = new WeakMap();
378
+ _updateThumbPositions = new WeakSet();
379
+ updateThumbPositions_fn = function() {
380
+ const startOffsetPct = __privateMethod(this, _thumbTrackEndOffset, thumbTrackEndOffset_fn).call(this, this.startAsNumber);
381
+ const endOffsetPct = __privateMethod(this, _thumbTrackEndOffset, thumbTrackEndOffset_fn).call(this, this.endAsNumber);
382
+ const [dirProp, dimProp] = this.orientation === Orientation.horizontal ? ["right", "width"] : ["bottom", "height"];
383
+ const transition = `transition: ${__privateGet(this, _draggingThumb) ? "none" : "all 0.2s ease"};`;
384
+ this._startThumbCss = `${dirProp}: ${startOffsetPct}%; ${transition}`;
385
+ this._endThumbCss = `${dirProp}: ${endOffsetPct}%; ${transition}`;
386
+ this._selectedRangeCss = `${dirProp}: ${endOffsetPct}%; ${dimProp}: ${startOffsetPct - endOffsetPct}%; ${transition}`;
387
+ };
388
+ _thumbTrackEndOffset = new WeakSet();
389
+ thumbTrackEndOffset_fn = function(value) {
390
+ return (1 - inverseLerp(this.min, this.max, value)) * 100;
391
+ };
392
+ _calculateValueFromMouseEvent = new WeakSet();
393
+ calculateValueFromMouseEvent_fn = function(e) {
394
+ const trackClientRect = this._trackEl.getBoundingClientRect();
395
+ const [minPos, maxPos, valuePos] = this.orientation === Orientation.horizontal ? [
396
+ this._trackEl.clientLeft,
397
+ this._trackEl.clientWidth,
398
+ e.pageX - document.documentElement.scrollLeft - this.getBoundingClientRect().left
399
+ ] : [
400
+ trackClientRect.top,
401
+ trackClientRect.bottom,
402
+ e.pageY - document.documentElement.scrollTop
403
+ ];
404
+ return lerp(this.min, this.max, inverseLerp(minPos, maxPos, valuePos));
405
+ };
406
+ _roundToNearestStep = new WeakSet();
407
+ roundToNearestStep_fn = function(thumb, value) {
408
+ return limit(
409
+ __privateGet(this, _thumbConstraints, thumbConstraints_get)[thumb].min,
410
+ __privateGet(this, _thumbConstraints, thumbConstraints_get)[thumb].max,
411
+ roundToStepValue(value - this.min, this.step) + this.min
412
+ );
413
+ };
414
+ _registerThumbListeners = new WeakSet();
415
+ registerThumbListeners_fn = function() {
416
+ for (const thumb of ["start", "end"]) {
417
+ __privateGet(this, _thumbs, thumbs_get)[thumb].addEventListener("keydown", __privateGet(this, _onThumbKeydown));
418
+ __privateGet(this, _thumbs, thumbs_get)[thumb].addEventListener(
419
+ "mousedown",
420
+ __privateGet(this, _onThumbMousedown),
421
+ { passive: true }
422
+ );
423
+ __privateGet(this, _thumbs, thumbs_get)[thumb].addEventListener(
424
+ "touchstart",
425
+ __privateGet(this, _onThumbMousedown),
426
+ { passive: true }
427
+ );
541
428
  }
542
- setDefaultSelectedOption() {
543
- const options = Array.from(this.children).filter(
544
- Listbox$1.slottedOptionFilter
429
+ };
430
+ _unregisterThumbListeners = new WeakSet();
431
+ unregisterThumbListeners_fn = function() {
432
+ for (const thumb of ["start", "end"]) {
433
+ __privateGet(this, _thumbs, thumbs_get)[thumb].removeEventListener("keydown", __privateGet(this, _onThumbKeydown));
434
+ __privateGet(this, _thumbs, thumbs_get)[thumb].removeEventListener(
435
+ "mousedown",
436
+ __privateGet(this, _onThumbMousedown)
545
437
  );
546
- const selectedIndex = options.findIndex(
547
- (el) => el.hasAttribute("selected") || el.selected || el.value === this.value
438
+ __privateGet(this, _thumbs, thumbs_get)[thumb].removeEventListener(
439
+ "touchstart",
440
+ __privateGet(this, _onThumbMousedown)
548
441
  );
549
- if (selectedIndex === -1 && !this.placeholderOption) {
550
- this.selectedIndex = 0;
551
- return;
552
- }
553
- if (selectedIndex !== -1 || this.placeholder !== "") {
554
- this.selectedIndex = selectedIndex;
555
- return;
556
- }
557
442
  }
558
443
  };
444
+ _onThumbMousedown = new WeakMap();
445
+ _onThumbKeydown = new WeakMap();
446
+ _registerDragHandlers = new WeakSet();
447
+ registerDragHandlers_fn = function() {
448
+ window.addEventListener("mousemove", __privateGet(this, _onDragMove), { passive: true });
449
+ window.addEventListener("touchmove", __privateGet(this, _onDragMove), { passive: true });
450
+ window.addEventListener("mouseup", __privateGet(this, _onDragEnd));
451
+ window.addEventListener("touchend", __privateGet(this, _onDragEnd));
452
+ window.document.addEventListener("mouseleave", __privateGet(this, _onDragEnd));
453
+ };
454
+ _unregisterDragListeners = new WeakSet();
455
+ unregisterDragListeners_fn = function() {
456
+ window.removeEventListener("mouseup", __privateGet(this, _onDragEnd));
457
+ window.document.removeEventListener("mouseleave", __privateGet(this, _onDragEnd));
458
+ window.removeEventListener("mousemove", __privateGet(this, _onDragMove));
459
+ window.removeEventListener("touchmove", __privateGet(this, _onDragMove));
460
+ window.removeEventListener("touchend", __privateGet(this, _onDragEnd));
461
+ };
462
+ _onDragMove = new WeakMap();
463
+ _onDragEnd = new WeakMap();
559
464
  __decorateClass([
560
465
  observable
561
- ], Select.prototype, "_anchor", 2);
466
+ ], RangeSlider.prototype, "start", 2);
562
467
  __decorateClass([
563
- attr
564
- ], Select.prototype, "appearance", 2);
468
+ attr({ mode: "fromView", attribute: "start" })
469
+ ], RangeSlider.prototype, "initialStart", 2);
470
+ __decorateClass([
471
+ attr({ attribute: "current-start" })
472
+ ], RangeSlider.prototype, "currentStart", 2);
473
+ __decorateClass([
474
+ observable
475
+ ], RangeSlider.prototype, "end", 2);
476
+ __decorateClass([
477
+ attr({ mode: "fromView", attribute: "end" })
478
+ ], RangeSlider.prototype, "initialEnd", 2);
479
+ __decorateClass([
480
+ attr({ attribute: "current-end" })
481
+ ], RangeSlider.prototype, "currentEnd", 2);
482
+ __decorateClass([
483
+ attr({ converter: nullableNumberConverter })
484
+ ], RangeSlider.prototype, "min", 2);
485
+ __decorateClass([
486
+ attr({ converter: nullableNumberConverter })
487
+ ], RangeSlider.prototype, "max", 2);
488
+ __decorateClass([
489
+ attr({ converter: nullableNumberConverter })
490
+ ], RangeSlider.prototype, "step", 2);
565
491
  __decorateClass([
566
492
  attr
567
- ], Select.prototype, "shape", 2);
493
+ ], RangeSlider.prototype, "orientation", 2);
494
+ __decorateClass([
495
+ attr({ attribute: "aria-start-label" })
496
+ ], RangeSlider.prototype, "ariaStartLabel", 2);
568
497
  __decorateClass([
569
- attr({ mode: "boolean", attribute: "fixed-dropdown" })
570
- ], Select.prototype, "fixedDropdown", 2);
498
+ attr({ attribute: "aria-end-label" })
499
+ ], RangeSlider.prototype, "ariaEndLabel", 2);
500
+ __decorateClass([
501
+ attr({ mode: "boolean" })
502
+ ], RangeSlider.prototype, "markers", 2);
571
503
  __decorateClass([
572
504
  attr
573
- ], Select.prototype, "placeholder", 2);
505
+ ], RangeSlider.prototype, "connotation", 2);
506
+ __decorateClass([
507
+ observable
508
+ ], RangeSlider.prototype, "valueTextFormatter", 2);
574
509
  __decorateClass([
575
510
  observable
576
- ], Select.prototype, "placeholderOption", 2);
511
+ ], RangeSlider.prototype, "_startThumbCss", 2);
577
512
  __decorateClass([
578
513
  observable
579
- ], Select.prototype, "metaSlottedContent", 2);
580
- Select = __decorateClass([
581
- errorText,
514
+ ], RangeSlider.prototype, "_endThumbCss", 2);
515
+ __decorateClass([
516
+ observable
517
+ ], RangeSlider.prototype, "_selectedRangeCss", 2);
518
+ RangeSlider = __decorateClass([
582
519
  formElements
583
- ], Select);
584
- applyMixins(
585
- Select,
586
- AffixIconWithTrailing,
587
- FormElementHelperText,
588
- FormElementSuccessText
589
- );
520
+ ], RangeSlider);
521
+ applyMixins(RangeSlider, Localized);
590
522
 
591
- const getStateClasses = ({
592
- shape,
593
- disabled,
594
- appearance,
595
- metaSlottedContent,
596
- errorValidationMessage,
597
- successText
598
- }) => classNames(
599
- ["disabled", disabled],
600
- [`appearance-${appearance}`, Boolean(appearance)],
601
- [`shape-${shape}`, Boolean(shape)],
602
- ["has-meta", Boolean(metaSlottedContent?.length)],
603
- ["error", Boolean(errorValidationMessage)],
604
- ["success", !!successText],
605
- ["has-meta", Boolean(metaSlottedContent?.length)]
523
+ const getClasses = ({ disabled, connotation }) => classNames(
524
+ "control",
525
+ ["disabled", Boolean(disabled)],
526
+ [`connotation-${connotation}`, Boolean(connotation)]
606
527
  );
607
- function renderLabel() {
608
- return html` <label for="control" class="label" id="label">
609
- ${(x) => x.label}
610
- </label>`;
611
- }
612
- function renderPlaceholder(context) {
613
- const optionTag = context.tagFor(ListboxOption);
614
- return html`
615
- <${optionTag} ${ref("placeholderOption")}
616
- text="${(x) => x.placeholder}" hidden disabled>
617
- </${optionTag}>`;
618
- }
619
- function selectValue(context) {
620
- const affixIconTemplate = affixIconTemplateFactory(context);
621
- return html` <div
622
- class="control ${getStateClasses}"
623
- ${ref("_anchor")}
624
- id="control"
625
- ?disabled="${(x) => x.disabled}"
626
- >
627
- <div class="selected-value">
628
- ${(x) => affixIconTemplate(x.icon, IconWrapper.Slot)}
629
- <span class="text">${(x) => x.displayValue}</span>
630
- <slot name="meta" ${slotted("metaSlottedContent")}></slot>
631
- </div>
632
- ${() => affixIconTemplate("chevron-down-line")}
633
- </div>`;
634
- }
635
- function setFixedDropdownVarWidth(x) {
636
- return x.open && x.fixedDropdown ? `--_select-fixed-width: ${Math.round(x.getBoundingClientRect().width)}px` : null;
637
- }
638
- function renderControl(context) {
639
- const popupTag = context.tagFor(Popup);
640
- return html`
641
- ${when((x) => x.label, renderLabel())}
642
- <div class="control-wrapper">
643
- ${when((x) => !x.multiple, selectValue(context))}
644
- <${popupTag} class="popup"
645
- style="${setFixedDropdownVarWidth}"
646
- ?open="${(x) => x.collapsible ? x.open : true}"
647
- :anchor="${(x) => x._anchor}"
648
- placement="bottom-start"
649
- strategy="${(x) => x.fixedDropdown ? null : "absolute"}">
650
- <div class="listbox"
651
- id="${(x) => x.listboxId}"
652
- role="listbox"
653
- ?disabled="${(x) => x.disabled}"
654
- ?hidden="${(x) => x.collapsible ? !x.open : false}"
655
- ${ref("listbox")}>
656
- ${when((x) => x.placeholder, renderPlaceholder(context))}
657
- <slot
658
- ${slotted({
659
- filter: Listbox$1.slottedOptionFilter,
660
- flatten: true,
661
- property: "slottedOptions"
662
- })}>
663
- </slot>
664
- </div>
665
- </${popupTag}>
666
- </div>
667
- ${when((x) => x.helperText?.length, getFeedbackTemplate("helper", context))}
668
- ${when(
669
- (x) => !x.successText && x.errorValidationMessage,
670
- getFeedbackTemplate("error", context)
671
- )}
672
- ${when((x) => x.successText, getFeedbackTemplate("success", context))}
673
- `;
674
- }
675
- const SelectTemplate = (context) => {
528
+ const RangeSliderTemplate = () => {
676
529
  return html` <template
677
- class="base"
678
- aria-label="${(x) => x.ariaLabel}"
679
- aria-activedescendant="${(x) => x.ariaActiveDescendant}"
680
- aria-controls="${(x) => x.ariaControls}"
681
- aria-disabled="${(x) => x.ariaDisabled}"
682
- aria-expanded="${(x) => x.ariaExpanded}"
683
- aria-haspopup="${(x) => x.collapsible ? "listbox" : null}"
684
- aria-multiselectable="${(x) => x.ariaMultiSelectable}"
685
- ?open="${(x) => x.open}"
686
- role="combobox"
687
- tabindex="${(x) => !x.disabled ? "0" : null}"
688
- @click="${(x, c) => x.clickHandler(c.event)}"
689
- @focusin="${(x, c) => x.focusinHandler(c.event)}"
690
- @focusout="${(x, c) => x.focusoutHandler(c.event)}"
691
- @keydown="${(x, c) => x.keydownHandler(c.event)}"
692
- @mousedown="${(x, c) => x.mousedownHandler(c.event)}"
530
+ @mousedown="${(x, c) => x._onMouseDown(c.event)}"
693
531
  >
694
- ${renderControl(context)}
532
+ <div class="${getClasses} ${(x) => x.orientation}">
533
+ <div class="positioning-region">
534
+ <div ${ref("_trackEl")} class="track">
535
+ <div class="track-start" style="${(x) => x._selectedRangeCss}"></div>
536
+ ${when(
537
+ (x) => x.markers,
538
+ html`${(x) => getMarkersTemplate(
539
+ x.orientation === Orientation.horizontal,
540
+ Math.floor((x.max - x.min) / x.step)
541
+ )}`
542
+ )}
543
+ </div>
544
+ <div
545
+ ${ref("_startThumbEl")}
546
+ class="thumb-container"
547
+ style="${(x) => x._startThumbCss}"
548
+ role="slider"
549
+ tabindex="${(x) => x.disabled ? null : 0}"
550
+ aria-label="${(x) => x.ariaStartLabel || x.locale.rangeSlider.startThumbLabel}"
551
+ aria-valuetext="${(x) => x.valueTextFormatter(x.start)}"
552
+ aria-valuenow="${(x) => x.start}"
553
+ aria-valuemin="${(x) => x.min}"
554
+ aria-valuemax="${(x) => x.end}"
555
+ aria-disabled="${(x) => x.disabled}"
556
+ aria-orientation="${(x) => x.orientation}"
557
+ ></div>
558
+ <div
559
+ ${ref("_endThumbEl")}
560
+ class="thumb-container"
561
+ style="${(x) => x._endThumbCss}"
562
+ role="slider"
563
+ tabindex="${(x) => x.disabled ? null : 0}"
564
+ aria-label="${(x) => x.ariaEndLabel || x.locale.rangeSlider.endThumbLabel}"
565
+ aria-valuetext="${(x) => x.valueTextFormatter(x.end)}"
566
+ aria-valuenow="${(x) => x.end}"
567
+ aria-valuemin="${(x) => x.start}"
568
+ aria-valuemax="${(x) => x.max}"
569
+ aria-disabled="${(x) => x.disabled}"
570
+ aria-orientation="${(x) => x.orientation}"
571
+ ></div>
572
+ </div>
573
+ </div>
695
574
  </template>`;
696
575
  };
697
576
 
698
- const selectDefinition = Select.compose({
699
- baseName: "select",
700
- template: SelectTemplate,
701
- styles
577
+ const rangeSliderDefinition = RangeSlider.compose({
578
+ baseName: "range-slider",
579
+ template: RangeSliderTemplate,
580
+ styles,
581
+ shadowOptions: {
582
+ delegatesFocus: true
583
+ }
702
584
  });
703
- const selectRegistries = [
704
- selectDefinition(),
705
- ...popupRegistries,
706
- ...iconRegistries,
707
- ...listboxOptionRegistries
708
- ];
709
- const registerSelect = registerFactory(selectRegistries);
585
+ const rangeSliderRegistries = [rangeSliderDefinition()];
586
+ const registerRangeSlider = registerFactory(rangeSliderRegistries);
710
587
 
711
- export { selectRegistries as a, registerSelect as r, selectDefinition as s };
588
+ export { rangeSliderRegistries as a, registerRangeSlider as b, rangeSliderDefinition as r };