@ds-autonomie/web-components 1.16.2 → 1.18.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 (253) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/chunks/{chunk.VC3XT47N.js → chunk.26R2GJ3D.js} +24 -46
  3. package/dist/chunks/{chunk.RG342A22.js → chunk.2GIZK5OL.js} +5 -5
  4. package/dist/chunks/{chunk.MXDA7QXL.js → chunk.33YIN2OK.js} +12 -9
  5. package/dist/chunks/{chunk.GYJZ3E7K.js → chunk.3RD6XYCZ.js} +1 -1
  6. package/dist/chunks/{chunk.JHPIOVRD.js → chunk.3RQ3AMTB.js} +4 -4
  7. package/dist/chunks/{chunk.VJRDVQTS.js → chunk.4EOWX2QT.js} +1 -1
  8. package/dist/chunks/{chunk.CZFGLE3Y.js → chunk.4FP4K3F5.js} +20 -0
  9. package/dist/chunks/chunk.4IGA5VLC.js +308 -0
  10. package/dist/chunks/{chunk.3UNYRJRK.js → chunk.4IXJVHZ5.js} +1 -1
  11. package/dist/chunks/{chunk.V7MYOBN4.js → chunk.4L7EJLR4.js} +5 -5
  12. package/dist/chunks/{chunk.2UZSRWJ7.js → chunk.4QUJBAX3.js} +5 -0
  13. package/dist/chunks/{chunk.5MXBL3PY.js → chunk.4WWQYBFA.js} +1 -1
  14. package/dist/chunks/{chunk.E475BLMD.js → chunk.63LGJMTZ.js} +1 -1
  15. package/dist/chunks/{chunk.45B5UA3U.js → chunk.64JQY57B.js} +1 -1
  16. package/dist/chunks/{chunk.NXQ42SSB.js → chunk.67S77FO4.js} +145 -313
  17. package/dist/chunks/{chunk.IDAQJSVV.js → chunk.6GVM3YU4.js} +16 -2
  18. package/dist/chunks/chunk.6K3AQESH.js +31 -0
  19. package/dist/chunks/{chunk.Z5LJXDHJ.js → chunk.7PFNOFBI.js} +23 -12
  20. package/dist/chunks/{chunk.MZF7MK5G.js → chunk.7UPFI4HE.js} +1 -0
  21. package/dist/chunks/{chunk.7J3HDP6J.js → chunk.AC3HBDLB.js} +1 -1
  22. package/dist/chunks/{chunk.ORNTGXRO.js → chunk.ARYKCY32.js} +1 -0
  23. package/dist/chunks/{chunk.KKAOTWJY.js → chunk.ATFH7NZ3.js} +23 -1
  24. package/dist/chunks/{chunk.7KF6Z37I.js → chunk.ATHRVCEP.js} +1 -1
  25. package/dist/chunks/{chunk.A2AK34DU.js → chunk.B5XEZJD7.js} +1 -1
  26. package/dist/chunks/{chunk.KOW5OFDN.js → chunk.BAASBQN5.js} +85 -27
  27. package/dist/chunks/{chunk.BROIFXIH.js → chunk.BCJMEP6L.js} +1 -1
  28. package/dist/chunks/chunk.BFVPPAWG.js +277 -0
  29. package/dist/chunks/{chunk.4DRKFRDB.js → chunk.BNPEW3RO.js} +4 -10
  30. package/dist/chunks/{chunk.V5J2RAQ5.js → chunk.CFISAFUN.js} +90 -1
  31. package/dist/chunks/chunk.CFUNT7FK.js +96 -0
  32. package/dist/chunks/{chunk.OXM5EF3F.js → chunk.CZIWWDCG.js} +7 -18
  33. package/dist/chunks/{chunk.WHTNMZZS.js → chunk.DLMZ2MN2.js} +4 -4
  34. package/dist/chunks/{chunk.N2H4K44W.js → chunk.ENMMYFHE.js} +1 -1
  35. package/dist/chunks/chunk.EWT3XVAN.js +319 -0
  36. package/dist/chunks/{chunk.6L4HRCFK.js → chunk.EWVN3OFD.js} +1 -1
  37. package/dist/chunks/{chunk.PNTPO2DN.js → chunk.EY6DBOBY.js} +21 -11
  38. package/dist/chunks/chunk.FWFLQD5T.js +49 -0
  39. package/dist/chunks/chunk.FXAGFSAU.js +68 -0
  40. package/dist/chunks/{chunk.SIPW72IF.js → chunk.FZBZ5HAZ.js} +3 -3
  41. package/dist/chunks/{chunk.ZYY6O4PU.js → chunk.G2ETLWQZ.js} +5 -16
  42. package/dist/chunks/{chunk.BAU3732X.js → chunk.G2PBKGYI.js} +3 -2
  43. package/dist/chunks/{chunk.6L6CZSQX.js → chunk.G3MRVMJ4.js} +2 -16
  44. package/dist/chunks/chunk.GBE3NP7T.js +36 -0
  45. package/dist/chunks/{chunk.IQTKA4UT.js → chunk.GCPXZXYD.js} +1 -1
  46. package/dist/chunks/chunk.H3OIUOL7.js +55 -0
  47. package/dist/chunks/{chunk.CKBRIIGV.js → chunk.HF2BKQ7K.js} +7 -5
  48. package/dist/chunks/chunk.HF7GESMZ.js +15 -0
  49. package/dist/chunks/{chunk.43EIYNTL.js → chunk.HSLR5GY4.js} +9 -3
  50. package/dist/chunks/{chunk.5MB36CJO.js → chunk.IMRGO6QP.js} +1 -1
  51. package/dist/chunks/{chunk.JXWCUSV3.js → chunk.ISIFJ4EB.js} +1 -1
  52. package/dist/chunks/{chunk.O2OMAMMI.js → chunk.IWQVNYM3.js} +1 -1
  53. package/dist/chunks/{chunk.LFYUJOPU.js → chunk.JH5GMUO7.js} +7 -8
  54. package/dist/chunks/{chunk.A3RCXT25.js → chunk.JKSDPLU3.js} +1 -1
  55. package/dist/chunks/{chunk.2PA4QKLT.js → chunk.KKJF6BYU.js} +1 -0
  56. package/dist/chunks/{chunk.VDOVUA55.js → chunk.KOTPR264.js} +1 -0
  57. package/dist/chunks/{chunk.4EFJ2NV3.js → chunk.KSF45YRN.js} +7 -2
  58. package/dist/chunks/{chunk.BHQ3BNQA.js → chunk.L2L37MWZ.js} +10 -12
  59. package/dist/chunks/{chunk.2P44D5YL.js → chunk.L5DEEGJU.js} +10 -1
  60. package/dist/chunks/{chunk.Z74FEBJS.js → chunk.L6I3R7R4.js} +1 -1
  61. package/dist/chunks/{chunk.D433F3FV.js → chunk.LDRVRUQG.js} +1 -0
  62. package/dist/chunks/{chunk.ZLGBX4RI.js → chunk.LQ42ZLXI.js} +1 -1
  63. package/dist/chunks/{chunk.VXQMFXV5.js → chunk.M7QP6END.js} +20 -2
  64. package/dist/chunks/{chunk.WPYZYOD5.js → chunk.MFWGK7WB.js} +1 -1
  65. package/dist/chunks/{chunk.RBXTMFL6.js → chunk.MNWP6APB.js} +1 -1
  66. package/dist/chunks/{chunk.H2JSXKGD.js → chunk.MPZ56XQK.js} +4 -0
  67. package/dist/chunks/{chunk.MUGCPHYQ.js → chunk.MSCG6J3T.js} +4 -4
  68. package/dist/chunks/chunk.MVFQ3IXQ.js +179 -0
  69. package/dist/chunks/{chunk.ZWVWEQGL.js → chunk.NDQ5XCHJ.js} +5 -0
  70. package/dist/chunks/{chunk.GZMFP7UN.js → chunk.O5STCK5X.js} +8 -4
  71. package/dist/chunks/{chunk.3YSH35MM.js → chunk.O7DWCXXH.js} +1 -1
  72. package/dist/chunks/{chunk.7DHGAM7P.js → chunk.PC2VIFJW.js} +2 -2
  73. package/dist/chunks/{chunk.RYD4BVIA.js → chunk.PSAB4UIG.js} +1 -1
  74. package/dist/chunks/{chunk.GE2PTQVM.js → chunk.PT4W6K27.js} +8 -3
  75. package/dist/chunks/{chunk.CWHNW2T5.js → chunk.QGNUX2KV.js} +38 -28
  76. package/dist/chunks/{chunk.EAP74BQL.js → chunk.QVJYJURQ.js} +32 -35
  77. package/dist/chunks/{chunk.VO6MIHUM.js → chunk.RFQ2Y5SK.js} +2 -0
  78. package/dist/chunks/{chunk.QR4Z7SWH.js → chunk.RJCFCZY3.js} +1 -1
  79. package/dist/chunks/{chunk.BQ7R6MC6.js → chunk.RSX6EFCX.js} +23 -1
  80. package/dist/chunks/{chunk.JR77AUQ7.js → chunk.SH26MYV3.js} +1 -1
  81. package/dist/chunks/{chunk.TRKYAEYS.js → chunk.SRYBWTPD.js} +143 -240
  82. package/dist/chunks/{chunk.4V4L6Q7P.js → chunk.TEHCPESC.js} +1 -1
  83. package/dist/chunks/{chunk.AMIXGL74.js → chunk.TOZLN2DN.js} +20 -3
  84. package/dist/chunks/chunk.TSW2ZSHN.js +63 -0
  85. package/dist/chunks/{chunk.IJMNSKEV.js → chunk.TVVACMGN.js} +1 -6
  86. package/dist/chunks/{chunk.EMJZLQCL.js → chunk.UVGAHM33.js} +2 -1
  87. package/dist/chunks/{chunk.YG7TOAY3.js → chunk.V5E77HVI.js} +4 -4
  88. package/dist/chunks/{chunk.SUCVNPSQ.js → chunk.VNMJ2D4A.js} +31 -4
  89. package/dist/chunks/{chunk.R6572W75.js → chunk.WMZ6HMZN.js} +10 -7
  90. package/dist/chunks/{chunk.RTEOTFLP.js → chunk.WQVKSBYD.js} +11 -0
  91. package/dist/chunks/{chunk.QDXCYEAZ.js → chunk.WSP5BYQP.js} +7 -7
  92. package/dist/chunks/{chunk.XD5JM6WF.js → chunk.WYUQG5BJ.js} +20 -0
  93. package/dist/chunks/{chunk.N43R5DJN.js → chunk.YU57HFSC.js} +1 -1
  94. package/dist/chunks/chunk.YVJBJSTS.js +595 -0
  95. package/dist/chunks/{chunk.WAROYP2H.js → chunk.YXVKJQFH.js} +1 -1
  96. package/dist/chunks/{chunk.RCSAV4XJ.js → chunk.ZV7TVP6P.js} +1 -1
  97. package/dist/components/accordion/accordion.js +6 -6
  98. package/dist/components/accordion/accordion.styles.js +1 -1
  99. package/dist/components/alert/alert.d.ts +2 -0
  100. package/dist/components/alert/alert.js +5 -5
  101. package/dist/components/anchor-tag/anchor-tag.js +2 -2
  102. package/dist/components/anchor-tag/anchor-tag.styles.js +1 -1
  103. package/dist/components/avatar/avatar.js +4 -4
  104. package/dist/components/breadcrumb/breadcrumb.js +5 -5
  105. package/dist/components/breadcrumb-item/breadcrumb-item.js +2 -2
  106. package/dist/components/button/button.js +6 -6
  107. package/dist/components/calendar/calendar.d.ts +1 -1
  108. package/dist/components/calendar/calendar.js +3 -3
  109. package/dist/components/calendar/calendar.styles.js +1 -1
  110. package/dist/components/callout/callout.d.ts +23 -0
  111. package/dist/components/callout/callout.js +75 -0
  112. package/dist/components/callout/callout.styles.d.ts +2 -0
  113. package/dist/components/callout/callout.styles.js +8 -0
  114. package/dist/components/card/card.d.ts +1 -1
  115. package/dist/components/card/card.js +2 -2
  116. package/dist/components/card/card.styles.js +1 -1
  117. package/dist/components/checkbox/checkbox.js +4 -4
  118. package/dist/components/checkbox-button/checkbox-button.d.ts +2 -0
  119. package/dist/components/checkbox-button/checkbox-button.js +5 -5
  120. package/dist/components/checkbox-button/checkbox-button.styles.js +1 -1
  121. package/dist/components/checkbox-group/checkbox-group.d.ts +3 -1
  122. package/dist/components/checkbox-group/checkbox-group.js +2 -2
  123. package/dist/components/combobox/combobox.d.ts +1 -0
  124. package/dist/components/combobox/combobox.js +10 -10
  125. package/dist/components/combobox/combobox.styles.js +1 -1
  126. package/dist/components/dialog/dialog.d.ts +2 -1
  127. package/dist/components/dialog/dialog.js +6 -6
  128. package/dist/components/dialog/dialog.styles.js +1 -1
  129. package/dist/components/download-card/download-card.js +3 -3
  130. package/dist/components/download-link/download-link.js +5 -5
  131. package/dist/components/download-link/download-link.styles.js +1 -1
  132. package/dist/components/drawer/drawer.d.ts +4 -0
  133. package/dist/components/drawer/drawer.js +6 -6
  134. package/dist/components/drawer/drawer.styles.js +1 -1
  135. package/dist/components/dropdown/dropdown.js +2 -2
  136. package/dist/components/error-message-panel/error-message-panel.js +2 -2
  137. package/dist/components/filter/filter-base/filter-base.d.ts +49 -0
  138. package/dist/components/filter/filter-base/filter-base.js +13 -0
  139. package/dist/components/filter/filter-base/filter-base.styles.d.ts +2 -0
  140. package/dist/components/filter/filter-base/filter-base.styles.js +8 -0
  141. package/dist/components/filter/filter-button/filter-button.d.ts +1 -0
  142. package/dist/components/filter/filter-button/filter-button.js +6 -6
  143. package/dist/components/filter/filter-button/filter-button.styles.js +1 -1
  144. package/dist/components/filter/filter-counter/filter-counter.d.ts +5 -42
  145. package/dist/components/filter/filter-counter/filter-counter.js +7 -5
  146. package/dist/components/filter/filter-counter/filter-counter.styles.js +2 -1
  147. package/dist/components/filter/filter-date/filter-date.d.ts +7 -0
  148. package/dist/components/filter/filter-date/filter-date.js +15 -12
  149. package/dist/components/filter/filter-date/filter-date.styles.js +1 -1
  150. package/dist/components/filter/filter-range/filter-range.d.ts +7 -39
  151. package/dist/components/filter/filter-range/filter-range.js +19 -14
  152. package/dist/components/filter/filter-range/filter-range.styles.js +2 -1
  153. package/dist/components/filter/filter-select/filter-select.d.ts +7 -40
  154. package/dist/components/filter/filter-select/filter-select.js +26 -10
  155. package/dist/components/filter/filter-select/filter-select.styles.js +2 -2
  156. package/dist/components/footer/footer.js +3 -3
  157. package/dist/components/footer-sitemap-item/footer-sitemap-item.js +2 -2
  158. package/dist/components/footer-sitemap-item/footer-sitemap-item.styles.js +1 -1
  159. package/dist/components/format-bytes/format-bytes.js +2 -2
  160. package/dist/components/format-date/format-date.js +2 -2
  161. package/dist/components/format-number/format-number.js +2 -2
  162. package/dist/components/header/header.js +3 -3
  163. package/dist/components/header/header.styles.js +1 -1
  164. package/dist/components/header-search/header-search.d.ts +2 -0
  165. package/dist/components/header-search/header-search.js +2 -2
  166. package/dist/components/icon/icon.js +3 -3
  167. package/dist/components/icon/library.js +2 -2
  168. package/dist/components/icon-button/icon-button.js +3 -3
  169. package/dist/components/input/input.d.ts +8 -18
  170. package/dist/components/input/input.js +11 -8
  171. package/dist/components/input/input.styles.js +1 -1
  172. package/dist/components/input-date/input-date.d.ts +157 -0
  173. package/dist/components/input-date/input-date.js +35 -0
  174. package/dist/components/input-date/input-date.styles.d.ts +2 -0
  175. package/dist/components/input-date/input-date.styles.js +10 -0
  176. package/dist/components/input-mask/input-mask.d.ts +2 -0
  177. package/dist/components/input-mask/input-mask.js +3 -3
  178. package/dist/components/input-mask/input-mask.styles.js +1 -1
  179. package/dist/components/input-phone/input-phone.d.ts +4 -2
  180. package/dist/components/input-phone/input-phone.js +17 -17
  181. package/dist/components/input-phone/input-phone.styles.js +1 -1
  182. package/dist/components/menu-accordion/menu-accordion.d.ts +2 -0
  183. package/dist/components/menu-accordion/menu-accordion.js +5 -5
  184. package/dist/components/menu-item/menu-item.js +3 -3
  185. package/dist/components/navbar/navbar-link/navbar-link.js +3 -3
  186. package/dist/components/navbar/navbar-menu/navbar-menu.d.ts +2 -0
  187. package/dist/components/navbar/navbar-menu/navbar-menu.js +5 -5
  188. package/dist/components/option/option.js +6 -6
  189. package/dist/components/option/option.styles.js +1 -1
  190. package/dist/components/pagination/pagination.js +13 -10
  191. package/dist/components/popup/popup.d.ts +8 -0
  192. package/dist/components/popup/popup.js +2 -2
  193. package/dist/components/popup/popup.styles.js +1 -1
  194. package/dist/components/progress-bar/progress-bar.js +2 -2
  195. package/dist/components/radio/radio.js +3 -3
  196. package/dist/components/radio-button/radio-button.d.ts +2 -0
  197. package/dist/components/radio-button/radio-button.js +2 -2
  198. package/dist/components/radio-button/radio-button.styles.js +1 -1
  199. package/dist/components/range-slider/range-slider.js +2 -2
  200. package/dist/components/range-slider/range-slider.styles.js +1 -1
  201. package/dist/components/relative-time/relative-time.js +2 -2
  202. package/dist/components/select/select.d.ts +1 -0
  203. package/dist/components/select/select.js +9 -9
  204. package/dist/components/select/select.styles.js +1 -1
  205. package/dist/components/spinner/spinner.js +2 -2
  206. package/dist/components/split-panel/split-panel.d.ts +66 -0
  207. package/dist/components/split-panel/split-panel.js +21 -0
  208. package/dist/components/split-panel/split-panel.styles.d.ts +2 -0
  209. package/dist/components/split-panel/split-panel.styles.js +7 -0
  210. package/dist/components/step/step.js +6 -6
  211. package/dist/components/tab/tab.js +2 -2
  212. package/dist/components/tab-group/tab-group.js +2 -2
  213. package/dist/components/table/table-action/table-action.js +2 -2
  214. package/dist/components/table/table-caption/table-caption.js +2 -2
  215. package/dist/components/table/table-header-row/table-header-row.js +3 -3
  216. package/dist/components/table/table-row/table-row.js +2 -2
  217. package/dist/components/table-container/table-container.js +2 -2
  218. package/dist/components/table-container/table-container.styles.js +1 -1
  219. package/dist/components/table-of-contents/table-of-contents.d.ts +2 -0
  220. package/dist/components/table-of-contents/table-of-contents.js +2 -2
  221. package/dist/components/table-of-contents/table-of-contents.styles.js +1 -1
  222. package/dist/components/tag/tag.js +5 -5
  223. package/dist/components/tooltip/tooltip.d.ts +1 -1
  224. package/dist/components/tooltip/tooltip.js +5 -5
  225. package/dist/components/tooltip/tooltip.styles.js +1 -1
  226. package/dist/components/tree/tree.js +10 -9
  227. package/dist/components/tree-item/tree-item.js +7 -7
  228. package/dist/custom-elements.json +8830 -6464
  229. package/dist/design-system.d.ts +1 -0
  230. package/dist/design-system.js +170 -159
  231. package/dist/internal/test.d.ts +11 -0
  232. package/dist/internal/test.js +19 -0
  233. package/dist/themes/dsa-wc-theme.css +52 -13
  234. package/dist/themes/dsa-wc-theme.min.css +1 -1
  235. package/dist/themes/dsa-wc-theme.styles.js +52 -15
  236. package/dist/translations/en-gb.js +1 -1
  237. package/dist/translations/en.js +1 -1
  238. package/dist/translations/fr.js +1 -1
  239. package/dist/utilities/date.d.ts +2 -0
  240. package/dist/utilities/date.js +9 -0
  241. package/dist/utilities/icon-library.js +2 -2
  242. package/dist/utilities/localize.d.ts +1 -2
  243. package/dist/utilities/localize.js +1 -1
  244. package/dist/utilities/storybook.d.ts +3 -2
  245. package/dist/utilities/storybook.js +62 -21
  246. package/dist/vscode.html-custom-data.json +302 -67
  247. package/dist/web-types.json +1783 -574
  248. package/package.json +4 -3
  249. package/dist/chunks/chunk.5BCAEDG4.js +0 -382
  250. package/dist/chunks/chunk.FZODQJBF.js +0 -99
  251. package/dist/chunks/chunk.PAF4S7OV.js +0 -484
  252. package/dist/chunks/chunk.YOLAIUYX.js +0 -95
  253. package/dist/chunks/{chunk.O2PIWM25.js → chunk.D34QDO4H.js} +3 -3
@@ -1,484 +0,0 @@
1
- import {
2
- filter_range_styles_default
3
- } from "./chunk.FZODQJBF.js";
4
- import {
5
- waitForEvent
6
- } from "./chunk.B4BZKR24.js";
7
- import {
8
- animateTo,
9
- stopAnimations
10
- } from "./chunk.2FK6USFR.js";
11
- import {
12
- getAnimation,
13
- setDefaultAnimation
14
- } from "./chunk.V7RJROLH.js";
15
- import {
16
- LocalizeController
17
- } from "./chunk.6L6CZSQX.js";
18
- import {
19
- watch
20
- } from "./chunk.6IH66JBY.js";
21
- import {
22
- ifDefinedAndNotEmpty
23
- } from "./chunk.ZQJVCRB2.js";
24
- import {
25
- ShoelaceElement
26
- } from "./chunk.YCXTCVAZ.js";
27
- import {
28
- __decorateClass
29
- } from "./chunk.6M63UXML.js";
30
-
31
- // src/components/filter/filter-range/filter-range.ts
32
- import { html } from "lit";
33
- import { customElement, property, query, state } from "lit/decorators.js";
34
- import { ifDefined } from "lit/directives/if-defined.js";
35
-
36
- // src/internal/debounce.ts
37
- var TIMER_ID_KEY = Symbol();
38
- function debounce(delay) {
39
- return (_target, _propertyKey, descriptor) => {
40
- const fn = descriptor.value;
41
- descriptor.value = function valueFn(...args) {
42
- clearTimeout(this[TIMER_ID_KEY]);
43
- this[TIMER_ID_KEY] = window.setTimeout(() => {
44
- fn.apply(this, args);
45
- }, delay);
46
- };
47
- };
48
- }
49
-
50
- // src/components/filter/filter-range/filter-range.ts
51
- var RANGE_SLIDER_DEBOUNCE_DELAY = 100;
52
- var DSAFilterRange = class extends ShoelaceElement {
53
- constructor() {
54
- super(...arguments);
55
- this.localize = new LocalizeController(this);
56
- this.currentStartValue = "";
57
- this.currentEndValue = "";
58
- this.start = "";
59
- this.end = "";
60
- this.defaultStart = "";
61
- this.defaultEnd = "";
62
- this.open = false;
63
- this.label = "";
64
- this.slider = false;
65
- this.hoist = false;
66
- this.disabled = false;
67
- this.readonly = false;
68
- }
69
- connectedCallback() {
70
- super.connectedCallback();
71
- this.handleDocumentFocusIn = this.handleDocumentFocusIn.bind(this);
72
- this.handleDocumentMouseDown = this.handleDocumentMouseDown.bind(this);
73
- this.handleSliderFromValueChange = this.handleSliderFromValueChange.bind(this);
74
- this.handleSliderToValueChange = this.handleSliderToValueChange.bind(this);
75
- this.addEventListener(
76
- "dsa-slider-from-value-change",
77
- this.handleSliderFromValueChange
78
- );
79
- this.addEventListener(
80
- "dsa-slider-to-value-change",
81
- this.handleSliderToValueChange
82
- );
83
- this.start = this.start === "" ? this.defaultStart : this.start;
84
- this.currentStartValue = this.start;
85
- this.end = this.end === "" ? this.defaultEnd : this.end;
86
- this.currentEndValue = this.end;
87
- }
88
- disconnectedCallback() {
89
- super.disconnectedCallback();
90
- this.removeEventListener(
91
- "dsa-slider-from-value-change",
92
- this.handleSliderFromValueChange
93
- );
94
- this.removeEventListener(
95
- "dsa-slider-to-value-change",
96
- this.handleSliderToValueChange
97
- );
98
- }
99
- handleSliderFromValueChange(event) {
100
- const value = event.detail.value;
101
- this.currentStartValue = value;
102
- }
103
- handleSliderToValueChange(event) {
104
- const value = event.detail.value;
105
- this.currentEndValue = value;
106
- }
107
- addOpenListeners() {
108
- document.addEventListener("focusin", this.handleDocumentFocusIn);
109
- document.addEventListener("mousedown", this.handleDocumentMouseDown);
110
- }
111
- removeOpenListeners() {
112
- document.removeEventListener("focusin", this.handleDocumentFocusIn);
113
- document.removeEventListener("mousedown", this.handleDocumentMouseDown);
114
- }
115
- handleDocumentFocusIn(event) {
116
- const path = event.composedPath();
117
- if (this && !path.includes(this)) {
118
- this.hide();
119
- this.filterButton.focus({ preventScroll: true });
120
- }
121
- }
122
- handleKeyDown(event) {
123
- if (this.open && event.key === "Escape") {
124
- event.stopPropagation();
125
- event.preventDefault();
126
- this.hide();
127
- this.filterButton.focus({ preventScroll: true });
128
- }
129
- if (this.open && event.key === "Tab") {
130
- setTimeout(() => {
131
- var _a, _b;
132
- const activeElement = (this == null ? void 0 : this.getRootNode()) instanceof ShadowRoot ? (_b = (_a = document.activeElement) == null ? void 0 : _a.shadowRoot) == null ? void 0 : _b.activeElement : document.activeElement;
133
- if (!this || (activeElement == null ? void 0 : activeElement.closest(this.tagName.toLowerCase())) !== this) {
134
- this.hide();
135
- this.filterButton.focus({ preventScroll: true });
136
- }
137
- });
138
- }
139
- const path = event.composedPath();
140
- const isFilterButton = path.some((el) => el === this.filterButton);
141
- if (isFilterButton && (event.key === "Enter" || event.key === " ")) {
142
- event.preventDefault();
143
- if (!this.open) {
144
- this.show();
145
- return;
146
- }
147
- if (isFilterButton) {
148
- this.hide();
149
- }
150
- }
151
- }
152
- handleDocumentMouseDown(event) {
153
- const path = event.composedPath();
154
- if (this && !path.includes(this)) {
155
- this.hide();
156
- }
157
- }
158
- handleFilterButtonMouseDown(event) {
159
- event.preventDefault();
160
- this.filterButton.focus({ preventScroll: true });
161
- this.open = !this.open;
162
- }
163
- handleFocus() {
164
- this.emit("dsa-focus");
165
- }
166
- handleBlur() {
167
- this.emit("dsa-blur");
168
- }
169
- handleReset() {
170
- var _a;
171
- this.currentStartValue = this.defaultStart;
172
- this.currentEndValue = this.defaultEnd;
173
- (_a = this.startValueInput) == null ? void 0 : _a.focus({ preventScroll: true });
174
- }
175
- handleSubmit() {
176
- this.start = this.currentStartValue;
177
- this.end = this.currentEndValue;
178
- this.emit("dsa-submit");
179
- this.hide();
180
- this.filterButton.focus({ preventScroll: true });
181
- }
182
- handleStartInput(event) {
183
- const nextStartValue = event.target.value;
184
- this.currentStartValue = nextStartValue;
185
- this.emit("dsa-input");
186
- }
187
- handleEndInput(event) {
188
- const nextEndValue = event.target.value;
189
- this.currentEndValue = nextEndValue;
190
- this.emit("dsa-input");
191
- }
192
- handleStartChange(event) {
193
- const nextStartValue = event.target.value;
194
- const currentEndValue = parseFloat(this.currentEndValue);
195
- if (parseFloat(nextStartValue) <= this.min) {
196
- this.currentStartValue = `${this.min}`;
197
- } else if (parseFloat(nextStartValue) <= currentEndValue) {
198
- this.currentStartValue = nextStartValue;
199
- } else if (parseFloat(nextStartValue) > currentEndValue) {
200
- this.currentStartValue = this.currentEndValue;
201
- }
202
- this.emit("dsa-change");
203
- }
204
- handleEndChange(event) {
205
- const nextEndValue = event.target.value;
206
- const currentStartValue = parseFloat(this.currentStartValue);
207
- if (parseFloat(nextEndValue) >= this.max) {
208
- this.currentEndValue = `${this.max}`;
209
- } else if (parseFloat(nextEndValue) >= currentStartValue) {
210
- this.currentEndValue = nextEndValue;
211
- } else if (parseFloat(nextEndValue) < currentStartValue) {
212
- this.currentEndValue = this.currentStartValue;
213
- }
214
- this.emit("dsa-change");
215
- }
216
- getRangeValue() {
217
- if (this.start === "" && this.end === "") {
218
- return "";
219
- }
220
- if (this.start === "") {
221
- return `${this.localize.term("lessThan")} ${this.end}`;
222
- }
223
- if (this.end === "") {
224
- return `${this.localize.term("moreThan")} ${this.start}`;
225
- }
226
- return `${this.start} - ${this.end}`;
227
- }
228
- async show() {
229
- if (this.open) {
230
- return void 0;
231
- }
232
- this.open = true;
233
- return await waitForEvent(this, "dsa-after-show");
234
- }
235
- /** Hides the listbox. */
236
- async hide() {
237
- if (!this.open) {
238
- return void 0;
239
- }
240
- this.open = false;
241
- return await waitForEvent(this, "dsa-after-hide");
242
- }
243
- async handleDisabledChange() {
244
- if (this.disabled || this.readonly) {
245
- this.open = false;
246
- this.emit("dsa-hide");
247
- this.removeOpenListeners();
248
- await stopAnimations(this);
249
- this.popup.active = false;
250
- const { keyframes, options } = getAnimation(this, "filter.hide", {
251
- dir: this.localize.dir()
252
- });
253
- await animateTo(this.popup.popup, keyframes, options);
254
- this.emit("dsa-after-hide");
255
- }
256
- }
257
- async handleOpenChange() {
258
- if (this.open) {
259
- this.emit("dsa-show");
260
- this.addOpenListeners();
261
- await stopAnimations(this);
262
- this.popup.active = true;
263
- const { keyframes, options } = getAnimation(this, "filter.show", {
264
- dir: this.localize.dir()
265
- });
266
- await animateTo(this.popup.popup, keyframes, options);
267
- this.emit("dsa-after-show");
268
- } else {
269
- this.emit("dsa-hide");
270
- this.removeOpenListeners();
271
- this.currentStartValue = this.start === "" ? this.defaultStart : this.start;
272
- this.currentEndValue = this.end === "" ? this.defaultEnd : this.end;
273
- await stopAnimations(this);
274
- const { keyframes, options } = getAnimation(this, "filter.hide", {
275
- dir: this.localize.dir()
276
- });
277
- await animateTo(this.popup.popup, keyframes, options);
278
- this.popup.active = false;
279
- this.emit("dsa-after-hide");
280
- }
281
- }
282
- /** Sets focus on the control. */
283
- focus(options) {
284
- this.filterButton.focus(options);
285
- }
286
- /** Removes focus from the control. */
287
- blur() {
288
- this.filterButton.blur();
289
- }
290
- render() {
291
- const rangeValue = this.getRangeValue();
292
- return html`
293
- <dsa-popup
294
- class="filter"
295
- part="popup"
296
- placement="bottom-start"
297
- strategy=${this.hoist ? "fixed" : "absolute"}
298
- distance="4"
299
- flip
300
- shift
301
- auto-size="vertical"
302
- auto-size-padding="10"
303
- @keydown=${this.handleKeyDown}
304
- >
305
- <dsa-filter-button
306
- slot="anchor"
307
- class="filter__button"
308
- label=${this.label}
309
- selection-count=${rangeValue !== "" ? "1" : "0"}
310
- selected-option=${ifDefinedAndNotEmpty(rangeValue)}
311
- aria-expanded=${this.open ? "true" : "false"}
312
- aria-controls="filter__panel"
313
- ?disabled=${this.disabled}
314
- ?readonly=${this.readonly}
315
- @focus=${this.handleFocus}
316
- @blur=${this.handleBlur}
317
- @mousedown=${this.handleFilterButtonMouseDown}
318
- ></dsa-filter-button>
319
-
320
- <div id="filter__panel" class="filter__panel">
321
- <div class="filter__content">
322
- ${this.slider ? html`
323
- <div class="filter__slider">
324
- <dsa-range-slider
325
- from=${ifDefinedAndNotEmpty(
326
- this.currentStartValue !== "" ? this.currentStartValue : `${this.min}`
327
- )}
328
- to=${ifDefinedAndNotEmpty(
329
- this.currentEndValue !== "" ? this.currentEndValue : `${this.max}`
330
- )}
331
- min=${ifDefined(this.min)}
332
- max=${ifDefined(this.max)}
333
- label-from=${this.localize.term("min")}
334
- label-to=${this.localize.term("max")}
335
- ></dsa-range-slider>
336
- </div>
337
- ` : html``}
338
-
339
- <div class="filter__content--inputs">
340
- <dsa-input
341
- class="start-range__input"
342
- label=${this.localize.term("min")}
343
- .value=${this.currentStartValue}
344
- placeholder=${ifDefinedAndNotEmpty(`${this.min}`)}
345
- min=${ifDefined(this.min)}
346
- max=${ifDefined(this.max)}
347
- type="number"
348
- @dsa-input=${this.handleStartInput}
349
- @dsa-change=${this.handleStartChange}
350
- ></dsa-input>
351
- <dsa-divider></dsa-divider>
352
- <dsa-input
353
- class="end-range__input"
354
- label=${this.localize.term("max")}
355
- placeholder=${ifDefinedAndNotEmpty(`${this.max}`)}
356
- .value=${this.currentEndValue}
357
- min=${ifDefined(this.min)}
358
- max=${ifDefined(this.max)}
359
- type="number"
360
- @dsa-input=${this.handleEndInput}
361
- @dsa-change=${this.handleEndChange}
362
- ></dsa-input>
363
- </div>
364
- </div>
365
-
366
- <div class="filter__footer">
367
- <dsa-button
368
- variant="tertiary"
369
- size="small"
370
- class="reset__button"
371
- @click=${this.handleReset}
372
- ?disabled=${this.currentStartValue === this.defaultStart && this.currentEndValue === this.defaultEnd}
373
- >
374
- <dsa-icon name="restart_alt" slot="prefix"></dsa-icon>
375
- ${this.localize.term("filterReset")}
376
- </dsa-button>
377
- <dsa-button
378
- variant="primary"
379
- size="small"
380
- class="submit__button"
381
- @click=${this.handleSubmit}
382
- >
383
- ${this.localize.term("filterSubmit")}
384
- </dsa-button>
385
- </div>
386
- </div>
387
- </dsa-popup>
388
- `;
389
- }
390
- };
391
- DSAFilterRange.styles = filter_range_styles_default;
392
- __decorateClass([
393
- state()
394
- ], DSAFilterRange.prototype, "currentStartValue", 2);
395
- __decorateClass([
396
- state()
397
- ], DSAFilterRange.prototype, "currentEndValue", 2);
398
- __decorateClass([
399
- query(".filter")
400
- ], DSAFilterRange.prototype, "popup", 2);
401
- __decorateClass([
402
- query(".filter__button")
403
- ], DSAFilterRange.prototype, "filterButton", 2);
404
- __decorateClass([
405
- query(".start-range__input")
406
- ], DSAFilterRange.prototype, "startValueInput", 2);
407
- __decorateClass([
408
- query(".end-range__input")
409
- ], DSAFilterRange.prototype, "endValueInput", 2);
410
- __decorateClass([
411
- query(".reset__button")
412
- ], DSAFilterRange.prototype, "resetButton", 2);
413
- __decorateClass([
414
- query(".submit__button")
415
- ], DSAFilterRange.prototype, "submitButton", 2);
416
- __decorateClass([
417
- property({ attribute: "start" })
418
- ], DSAFilterRange.prototype, "start", 2);
419
- __decorateClass([
420
- property({ attribute: "end" })
421
- ], DSAFilterRange.prototype, "end", 2);
422
- __decorateClass([
423
- property({ attribute: "default-start" })
424
- ], DSAFilterRange.prototype, "defaultStart", 2);
425
- __decorateClass([
426
- property({ attribute: "default-end" })
427
- ], DSAFilterRange.prototype, "defaultEnd", 2);
428
- __decorateClass([
429
- property({ type: Boolean, reflect: true })
430
- ], DSAFilterRange.prototype, "open", 2);
431
- __decorateClass([
432
- property()
433
- ], DSAFilterRange.prototype, "label", 2);
434
- __decorateClass([
435
- property({ type: Boolean })
436
- ], DSAFilterRange.prototype, "slider", 2);
437
- __decorateClass([
438
- property({ type: Boolean })
439
- ], DSAFilterRange.prototype, "hoist", 2);
440
- __decorateClass([
441
- property({ type: Boolean, reflect: true })
442
- ], DSAFilterRange.prototype, "disabled", 2);
443
- __decorateClass([
444
- property({ type: Boolean, reflect: true })
445
- ], DSAFilterRange.prototype, "readonly", 2);
446
- __decorateClass([
447
- property()
448
- ], DSAFilterRange.prototype, "min", 2);
449
- __decorateClass([
450
- property()
451
- ], DSAFilterRange.prototype, "max", 2);
452
- __decorateClass([
453
- debounce(RANGE_SLIDER_DEBOUNCE_DELAY)
454
- ], DSAFilterRange.prototype, "handleSliderFromValueChange", 1);
455
- __decorateClass([
456
- debounce(RANGE_SLIDER_DEBOUNCE_DELAY)
457
- ], DSAFilterRange.prototype, "handleSliderToValueChange", 1);
458
- __decorateClass([
459
- watch(["disabled", "readonly"], { waitUntilFirstUpdate: true })
460
- ], DSAFilterRange.prototype, "handleDisabledChange", 1);
461
- __decorateClass([
462
- watch("open", { waitUntilFirstUpdate: true })
463
- ], DSAFilterRange.prototype, "handleOpenChange", 1);
464
- DSAFilterRange = __decorateClass([
465
- customElement("dsa-filter-range")
466
- ], DSAFilterRange);
467
- setDefaultAnimation("filter.show", {
468
- keyframes: [
469
- { opacity: 0, scale: 0.9 },
470
- { opacity: 1, scale: 1 }
471
- ],
472
- options: { duration: 100, easing: "ease" }
473
- });
474
- setDefaultAnimation("filter.hide", {
475
- keyframes: [
476
- { opacity: 1, scale: 1 },
477
- { opacity: 0, scale: 0.9 }
478
- ],
479
- options: { duration: 100, easing: "ease" }
480
- });
481
-
482
- export {
483
- DSAFilterRange
484
- };
@@ -1,95 +0,0 @@
1
- import {
2
- form_control_styles_default
3
- } from "./chunk.3EPXMS3X.js";
4
- import {
5
- component_styles_default
6
- } from "./chunk.TUVJKY7S.js";
7
-
8
- // src/components/filter/filter-select/filter-select.styles.ts
9
- import { css } from "lit";
10
- var filter_select_styles_default = css`
11
- ${component_styles_default}
12
- ${form_control_styles_default}
13
-
14
- :host {
15
- display: block;
16
- }
17
-
18
- /** The popup */
19
- .filter {
20
- flex: 1 1 auto;
21
- display: inline-flex;
22
- width: 100%;
23
- position: relative;
24
- vertical-align: middle;
25
- }
26
-
27
- .filter::part(popup) {
28
- z-index: var(--dsa-wc-z-index-dropdown);
29
- }
30
-
31
- /* Panel */
32
- .filter__panel {
33
- display: flex;
34
- flex-direction: column;
35
- position: relative;
36
- font: var(--dsa-wc-input-text-field-font);
37
- box-shadow: var(--dsa-wc-shadow-small);
38
- background: var(--dsa-wc-select-listbox-background-color);
39
- border: solid var(--dsa-wc-select-listbox-border-width)
40
- var(--dsa-wc-select-listbox-border-color);
41
- border-radius: var(--dsa-wc-select-listbox-border-radius);
42
- padding-inline: 0;
43
- overflow: hidden;
44
- overscroll-behavior: none;
45
- min-width: var(--dsa-filter-panel-min-width);
46
-
47
- /* Make sure it adheres to the popup's auto size */
48
- /* stylelint-disable-next-line */
49
- max-width: var(--auto-size-available-width);
50
- /* stylelint-disable-next-line */
51
- max-height: min(
52
- var(--auto-size-available-height),
53
- var(--dsa-filter-panel-max-height)
54
- );
55
- }
56
-
57
- .filter__multiselect-header {
58
- display: flex;
59
- padding: var(--dsa-spacing-12) var(--dsa-spacing-8);
60
- align-items: center;
61
- justify-content: space-between;
62
- border-bottom: solid var(--dsa-wc-select-listbox-border-width)
63
- var(--dsa-wc-select-listbox-border-color);
64
- }
65
-
66
- .filter__panel dsa-input {
67
- margin: var(--dsa-spacing-8);
68
- }
69
-
70
- .filter__listbox {
71
- overflow: auto;
72
- margin: 0;
73
- padding: 0;
74
- position: relative;
75
- }
76
-
77
- .filter__options {
78
- display: none;
79
- }
80
-
81
- .filter__see-all-button {
82
- align-self: flex-start;
83
- margin-inline-start: var(--dsa-spacing-4);
84
- }
85
-
86
- .filter__empty_text {
87
- font: var(--dsa-wc-combobox-empty-label-font);
88
- color: var(--dsa-wc-combobox-empty-label-color);
89
- padding-inline: var(--dsa-wc-combobox-listbox-padding-inline);
90
- }
91
- `;
92
-
93
- export {
94
- filter_select_styles_default
95
- };
@@ -1,9 +1,9 @@
1
- import {
2
- library_default_default
3
- } from "./chunk.RDGMZ5XB.js";
4
1
  import {
5
2
  library_system_default
6
3
  } from "./chunk.RB6TMBWW.js";
4
+ import {
5
+ library_default_default
6
+ } from "./chunk.RDGMZ5XB.js";
7
7
 
8
8
  // src/components/icon/library.ts
9
9
  var registry = [library_default_default, library_system_default];