@ds-autonomie/web-components 2.0.1 → 2.1.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 (261) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/cdn/chunks/{chunk.QTUCYPM5.js → chunk.3TUFAITJ.js} +18 -0
  3. package/cdn/chunks/{chunk.ZC2YWJX5.js → chunk.5BF76EO7.js} +1 -1
  4. package/cdn/chunks/{chunk.HRSNXHEG.js → chunk.5BL6KECM.js} +31 -5
  5. package/cdn/chunks/{chunk.GDKBZ2H6.js → chunk.6CF6SXDF.js} +1 -2
  6. package/cdn/chunks/{chunk.Z326Q4YW.js → chunk.6V2FRFCB.js} +1 -1
  7. package/cdn/chunks/{chunk.KQ5BQRHA.js → chunk.77CWRZEL.js} +6 -0
  8. package/cdn/chunks/{chunk.5UR3I4O7.js → chunk.BE7PKTJW.js} +1 -1
  9. package/cdn/chunks/chunk.BNPGOQZ2.js +223 -0
  10. package/cdn/chunks/{chunk.VR6U4JFG.js → chunk.CUCCBQJX.js} +11 -2
  11. package/cdn/chunks/{chunk.Q2IGBG6C.js → chunk.CVV4WLBC.js} +16 -8
  12. package/cdn/chunks/{chunk.2GCON4UO.js → chunk.DSKRAAOI.js} +3 -4
  13. package/cdn/chunks/{chunk.454LK2SB.js → chunk.E6VF2I6I.js} +9 -4
  14. package/cdn/chunks/{chunk.JYYFSSR2.js → chunk.EARU4CHS.js} +1 -1
  15. package/cdn/chunks/{chunk.DTZ62PPT.js → chunk.IGA57P5N.js} +13 -22
  16. package/cdn/chunks/{chunk.SRCH73UW.js → chunk.JSVJ7J76.js} +24 -1
  17. package/cdn/chunks/{chunk.QPY2AEFG.js → chunk.JTHUYIYP.js} +9 -5
  18. package/cdn/chunks/{chunk.PLPMNDIZ.js → chunk.KTAPO27T.js} +1 -1
  19. package/cdn/chunks/{chunk.3NTS3AEA.js → chunk.LFCUNNYV.js} +34 -30
  20. package/cdn/chunks/{chunk.GLQFV66F.js → chunk.LRMXGBIU.js} +24 -10
  21. package/cdn/chunks/{chunk.NW4AAKGG.js → chunk.NPJ5ZOJ4.js} +24 -10
  22. package/{dist/chunks/chunk.3E6XVTWL.js → cdn/chunks/chunk.P45DWAWT.js} +1 -1
  23. package/cdn/chunks/{chunk.VIT6ZMSL.js → chunk.PGT2WHXR.js} +2 -3
  24. package/cdn/chunks/chunk.RJXLIOW7.js +28 -0
  25. package/cdn/chunks/{chunk.YTHFESMA.js → chunk.S4BW7KNM.js} +5 -1
  26. package/cdn/chunks/{chunk.PAGENBUA.js → chunk.UR6UOSYK.js} +10 -12
  27. package/cdn/chunks/{chunk.JY6ROHQN.js → chunk.WOONNSQ2.js} +14 -20
  28. package/cdn/chunks/{chunk.F2LQ5OCB.js → chunk.XD7G7WIJ.js} +6 -2
  29. package/cdn/chunks/chunk.XIX7XP2G.js +91 -0
  30. package/cdn/chunks/{chunk.CSDIRQFE.js → chunk.XLX7QTXT.js} +9 -1
  31. package/cdn/chunks/{chunk.BTTFPDXL.js → chunk.XPL6N3OJ.js} +3 -2
  32. package/cdn/chunks/{chunk.2SEDRBTZ.js → chunk.Z2IR3WWE.js} +4 -1
  33. package/cdn/chunks/{chunk.PS3BQQBO.js → chunk.Z6DEWBVS.js} +7 -3
  34. package/cdn/chunks/{chunk.FGSGBIL3.js → chunk.ZKPOAPR2.js} +0 -4
  35. package/cdn/components/accordion/accordion.js +3 -3
  36. package/cdn/components/alert/alert.js +4 -4
  37. package/cdn/components/avatar/avatar.js +4 -4
  38. package/cdn/components/breadcrumb/breadcrumb.js +3 -3
  39. package/cdn/components/button/button.d.ts +4 -1
  40. package/cdn/components/button/button.js +4 -4
  41. package/cdn/components/callout/callout.d.ts +3 -1
  42. package/cdn/components/callout/callout.js +4 -4
  43. package/cdn/components/checkbox/checkbox.d.ts +4 -1
  44. package/cdn/components/checkbox/checkbox.js +4 -4
  45. package/cdn/components/checkbox-button/checkbox-button.js +3 -3
  46. package/cdn/components/checkbox-group/checkbox-group.d.ts +4 -0
  47. package/cdn/components/checkbox-group/checkbox-group.js +6 -4
  48. package/cdn/components/combobox/combobox.js +3 -3
  49. package/cdn/components/dialog/dialog.d.ts +5 -1
  50. package/cdn/components/dialog/dialog.js +5 -5
  51. package/cdn/components/dialog/dialog.styles.js +1 -1
  52. package/cdn/components/download-card/download-card.js +5 -5
  53. package/cdn/components/download-card/download-card.styles.js +1 -1
  54. package/cdn/components/download-link/download-link.js +5 -5
  55. package/cdn/components/download-link/download-link.styles.js +1 -1
  56. package/cdn/components/drawer/drawer.js +3 -3
  57. package/cdn/components/error-text/error-text.js +3 -3
  58. package/cdn/components/file-upload/file-upload.js +3 -3
  59. package/cdn/components/file-upload-item/file-upload-item.js +3 -3
  60. package/cdn/components/filter-base/filter-base-stories.js +1 -1
  61. package/cdn/components/filter-base/filter-base.js +3 -3
  62. package/cdn/components/filter-button/filter-button.js +3 -3
  63. package/cdn/components/filter-counter/filter-counter.js +4 -4
  64. package/cdn/components/filter-date/filter-date.js +3 -3
  65. package/cdn/components/filter-range/filter-range.js +5 -5
  66. package/cdn/components/filter-select/filter-select.d.ts +1 -0
  67. package/cdn/components/filter-select/filter-select.js +9 -9
  68. package/cdn/components/header/header.d.ts +5 -1
  69. package/cdn/components/header/header.js +2 -2
  70. package/cdn/components/header/header.styles.js +1 -1
  71. package/cdn/components/header-search/header-search.d.ts +6 -0
  72. package/cdn/components/header-search/header-search.js +11 -5
  73. package/cdn/components/header-search/header-search.styles.js +1 -1
  74. package/cdn/components/icon/icon.js +3 -3
  75. package/cdn/components/icon/library.js +2 -2
  76. package/cdn/components/icon/library.system.js +1 -1
  77. package/cdn/components/icon-button/icon-button.js +3 -3
  78. package/cdn/components/input/input.js +3 -3
  79. package/cdn/components/input-date/input-date.js +3 -3
  80. package/cdn/components/input-mask/input-mask.js +3 -3
  81. package/cdn/components/input-phone/input-phone.d.ts +3 -3
  82. package/cdn/components/input-phone/input-phone.js +8 -14
  83. package/cdn/components/input-phone/input-phone.styles.js +1 -1
  84. package/cdn/components/input-phone/input-phone.utils.d.ts +0 -2
  85. package/cdn/components/input-phone/input-phone.utils.js +1 -7
  86. package/cdn/components/menu-accordion/menu-accordion.js +3 -3
  87. package/cdn/components/menu-item/menu-item.js +3 -3
  88. package/cdn/components/menu-navigation/menu-navigation.js +1 -1
  89. package/cdn/components/navbar-link/navbar-link.js +4 -4
  90. package/cdn/components/navbar-menu/navbar-menu.js +4 -4
  91. package/cdn/components/option/option.js +5 -5
  92. package/cdn/components/option/option.styles.js +1 -1
  93. package/cdn/components/pagination/pagination.js +5 -5
  94. package/cdn/components/profile-button/profile-button.js +4 -4
  95. package/cdn/components/quote/quote.js +3 -3
  96. package/cdn/components/radio/radio.js +3 -3
  97. package/cdn/components/radio-button/radio-button.js +7 -5
  98. package/cdn/components/radio-group/radio-group.d.ts +4 -0
  99. package/cdn/components/radio-group/radio-group.js +6 -4
  100. package/cdn/components/range-slider/range-slider.d.ts +0 -2
  101. package/cdn/components/range-slider/range-slider.js +1 -1
  102. package/cdn/components/select/select.js +3 -3
  103. package/cdn/components/split-panel/split-panel.js +3 -3
  104. package/cdn/components/step/step.js +3 -3
  105. package/cdn/components/tab/tab.d.ts +2 -0
  106. package/cdn/components/tab/tab.js +4 -4
  107. package/cdn/components/tab-group/tab-group.js +3 -3
  108. package/cdn/components/table-header-cell/table-header-cell.js +3 -3
  109. package/cdn/components/table-header-row/table-header-row.js +6 -6
  110. package/cdn/components/table-row/table-row.js +5 -5
  111. package/cdn/components/tag/tag.js +3 -3
  112. package/cdn/components/textarea/textarea.js +3 -3
  113. package/cdn/components/tree/tree.js +4 -4
  114. package/cdn/components/tree-item/tree-item.js +4 -4
  115. package/cdn/custom-elements.json +223 -68
  116. package/cdn/design-system.js +40 -40
  117. package/cdn/events/events.d.ts +7 -7
  118. package/cdn/internal/components/form-toggle-button/form-toggle-button-stories.d.ts +2 -86
  119. package/cdn/internal/test/disable-a11y-warnings.d.ts +2 -0
  120. package/cdn/internal/test/disable-a11y-warnings.js +10 -0
  121. package/cdn/themes/dsa-wc-theme.css +5 -0
  122. package/cdn/themes/dsa-wc-theme.min.css +1 -1
  123. package/cdn/themes/dsa-wc-theme.styles.js +5 -0
  124. package/cdn/utilities/icon-library.js +2 -2
  125. package/cdn/utilities/storybook.d.ts +1 -0
  126. package/cdn/utilities/storybook.js +3 -1
  127. package/cdn/vscode.html-custom-data.json +64 -11
  128. package/cdn/web-types.json +159 -35
  129. package/dist/chunks/{chunk.N5DO55QO.js → chunk.2EDNCADP.js} +9 -1
  130. package/dist/chunks/{chunk.YDXAC3AX.js → chunk.2VH3OZ2T.js} +1 -1
  131. package/dist/chunks/{chunk.QTUCYPM5.js → chunk.3TUFAITJ.js} +18 -0
  132. package/dist/chunks/{chunk.VC2F6FEI.js → chunk.4WSA3PVB.js} +1 -1
  133. package/dist/chunks/{chunk.TB3WT3D4.js → chunk.6QAB5TYJ.js} +6 -0
  134. package/dist/chunks/{chunk.IAL72I44.js → chunk.AF5WMYR2.js} +5 -1
  135. package/dist/chunks/{chunk.6RJLT24F.js → chunk.EGH3AVD7.js} +4 -1
  136. package/dist/chunks/{chunk.JDG6WH3B.js → chunk.EQZ4YFRU.js} +94 -54
  137. package/dist/chunks/{chunk.CWVZX3HL.js → chunk.FKXOTDTY.js} +1 -1
  138. package/dist/chunks/{chunk.35M6DDPF.js → chunk.G422H4DZ.js} +7 -3
  139. package/dist/chunks/chunk.HRIAHWFV.js +89 -0
  140. package/dist/chunks/{chunk.4FP4K3F5.js → chunk.JDIBYGPL.js} +11 -2
  141. package/dist/chunks/{chunk.2DJFK3E6.js → chunk.JX7OISYA.js} +24 -10
  142. package/dist/chunks/{chunk.QEFQHCEK.js → chunk.KFRR2I2P.js} +3 -4
  143. package/dist/chunks/{chunk.5LBJAKDG.js → chunk.LB54GRRB.js} +31 -5
  144. package/dist/chunks/{chunk.CQG7MKTO.js → chunk.LDXGSIJP.js} +6 -2
  145. package/dist/chunks/{chunk.ARYKCY32.js → chunk.MBRRLF6D.js} +34 -30
  146. package/dist/chunks/{chunk.X6V74J4Y.js → chunk.MEPTPSE5.js} +2 -3
  147. package/dist/chunks/{chunk.R426GAXO.js → chunk.MJKJSMQX.js} +3 -2
  148. package/dist/chunks/{chunk.RPZWIHKX.js → chunk.NCECJWN7.js} +1 -1
  149. package/dist/chunks/{chunk.JUPNFWMF.js → chunk.OHPSPLZO.js} +9 -5
  150. package/{cdn/chunks/chunk.3E6XVTWL.js → dist/chunks/chunk.P45DWAWT.js} +1 -1
  151. package/dist/chunks/{chunk.7NPJ25LI.js → chunk.PZXD4VTO.js} +14 -20
  152. package/dist/chunks/chunk.RJXLIOW7.js +28 -0
  153. package/dist/chunks/{chunk.35URRZJ2.js → chunk.SYVX56PU.js} +1 -2
  154. package/dist/chunks/{chunk.K6FDIYMY.js → chunk.UVN7RIEO.js} +0 -4
  155. package/dist/chunks/{chunk.LWFWCZIX.js → chunk.WQYBYKZ2.js} +9 -4
  156. package/dist/chunks/{chunk.GOMVXZ72.js → chunk.XRZGSSHY.js} +1 -1
  157. package/dist/chunks/{chunk.XWFZLRHU.js → chunk.XXHMFUD7.js} +24 -1
  158. package/dist/chunks/{chunk.Z2SRVRIK.js → chunk.XXN6UBL4.js} +10 -12
  159. package/dist/chunks/{chunk.DY2W3WPP.js → chunk.Z7DBDDCZ.js} +16 -8
  160. package/dist/chunks/{chunk.WI3DWLXW.js → chunk.ZTGPYOYG.js} +13 -22
  161. package/dist/chunks/{chunk.GBRTFFMV.js → chunk.ZYTDWH4E.js} +24 -10
  162. package/dist/components/accordion/accordion.js +3 -3
  163. package/dist/components/alert/alert.js +4 -4
  164. package/dist/components/avatar/avatar.js +4 -4
  165. package/dist/components/breadcrumb/breadcrumb.js +3 -3
  166. package/dist/components/button/button.d.ts +4 -1
  167. package/dist/components/button/button.js +4 -4
  168. package/dist/components/callout/callout.d.ts +3 -1
  169. package/dist/components/callout/callout.js +4 -4
  170. package/dist/components/checkbox/checkbox.d.ts +4 -1
  171. package/dist/components/checkbox/checkbox.js +4 -4
  172. package/dist/components/checkbox-button/checkbox-button.js +3 -3
  173. package/dist/components/checkbox-group/checkbox-group.d.ts +4 -0
  174. package/dist/components/checkbox-group/checkbox-group.js +6 -4
  175. package/dist/components/combobox/combobox.js +3 -3
  176. package/dist/components/dialog/dialog.d.ts +5 -1
  177. package/dist/components/dialog/dialog.js +5 -5
  178. package/dist/components/dialog/dialog.styles.js +1 -1
  179. package/dist/components/download-card/download-card.js +5 -5
  180. package/dist/components/download-card/download-card.styles.js +1 -1
  181. package/dist/components/download-link/download-link.js +5 -5
  182. package/dist/components/download-link/download-link.styles.js +1 -1
  183. package/dist/components/drawer/drawer.js +3 -3
  184. package/dist/components/error-text/error-text.js +3 -3
  185. package/dist/components/file-upload/file-upload.js +3 -3
  186. package/dist/components/file-upload-item/file-upload-item.js +3 -3
  187. package/dist/components/filter-base/filter-base-stories.js +1 -1
  188. package/dist/components/filter-base/filter-base.js +3 -3
  189. package/dist/components/filter-button/filter-button.js +3 -3
  190. package/dist/components/filter-counter/filter-counter.js +4 -4
  191. package/dist/components/filter-date/filter-date.js +3 -3
  192. package/dist/components/filter-range/filter-range.js +5 -5
  193. package/dist/components/filter-select/filter-select.d.ts +1 -0
  194. package/dist/components/filter-select/filter-select.js +9 -9
  195. package/dist/components/header/header.d.ts +5 -1
  196. package/dist/components/header/header.js +2 -2
  197. package/dist/components/header/header.styles.js +1 -1
  198. package/dist/components/header-search/header-search.d.ts +6 -0
  199. package/dist/components/header-search/header-search.js +11 -5
  200. package/dist/components/header-search/header-search.styles.js +1 -1
  201. package/dist/components/icon/icon.js +3 -3
  202. package/dist/components/icon/library.js +2 -2
  203. package/dist/components/icon/library.system.js +1 -1
  204. package/dist/components/icon-button/icon-button.js +3 -3
  205. package/dist/components/input/input.js +3 -3
  206. package/dist/components/input-date/input-date.js +3 -3
  207. package/dist/components/input-mask/input-mask.js +3 -3
  208. package/dist/components/input-phone/input-phone.d.ts +3 -3
  209. package/dist/components/input-phone/input-phone.js +8 -14
  210. package/dist/components/input-phone/input-phone.styles.js +1 -1
  211. package/dist/components/input-phone/input-phone.utils.d.ts +0 -2
  212. package/dist/components/input-phone/input-phone.utils.js +1 -5
  213. package/dist/components/menu-accordion/menu-accordion.js +3 -3
  214. package/dist/components/menu-item/menu-item.js +3 -3
  215. package/dist/components/menu-navigation/menu-navigation.js +1 -1
  216. package/dist/components/navbar-link/navbar-link.js +4 -4
  217. package/dist/components/navbar-menu/navbar-menu.js +4 -4
  218. package/dist/components/option/option.js +5 -5
  219. package/dist/components/option/option.styles.js +1 -1
  220. package/dist/components/pagination/pagination.js +5 -5
  221. package/dist/components/profile-button/profile-button.js +4 -4
  222. package/dist/components/quote/quote.js +3 -3
  223. package/dist/components/radio/radio.js +3 -3
  224. package/dist/components/radio-button/radio-button.js +7 -5
  225. package/dist/components/radio-group/radio-group.d.ts +4 -0
  226. package/dist/components/radio-group/radio-group.js +6 -4
  227. package/dist/components/range-slider/range-slider.d.ts +0 -2
  228. package/dist/components/range-slider/range-slider.js +1 -1
  229. package/dist/components/select/select.js +3 -3
  230. package/dist/components/split-panel/split-panel.js +3 -3
  231. package/dist/components/step/step.js +3 -3
  232. package/dist/components/tab/tab.d.ts +2 -0
  233. package/dist/components/tab/tab.js +4 -4
  234. package/dist/components/tab-group/tab-group.js +3 -3
  235. package/dist/components/table-header-cell/table-header-cell.js +3 -3
  236. package/dist/components/table-header-row/table-header-row.js +6 -6
  237. package/dist/components/table-row/table-row.js +5 -5
  238. package/dist/components/tag/tag.js +3 -3
  239. package/dist/components/textarea/textarea.js +3 -3
  240. package/dist/components/tree/tree.js +4 -4
  241. package/dist/components/tree-item/tree-item.js +4 -4
  242. package/dist/custom-elements.json +223 -68
  243. package/dist/design-system.js +40 -40
  244. package/dist/events/events.d.ts +7 -7
  245. package/dist/internal/components/form-toggle-button/form-toggle-button-stories.d.ts +2 -86
  246. package/dist/internal/test/disable-a11y-warnings.d.ts +2 -0
  247. package/dist/internal/test/disable-a11y-warnings.js +10 -0
  248. package/dist/themes/dsa-wc-theme.css +5 -0
  249. package/dist/themes/dsa-wc-theme.min.css +1 -1
  250. package/dist/themes/dsa-wc-theme.styles.js +5 -0
  251. package/dist/utilities/icon-library.js +2 -2
  252. package/dist/utilities/storybook.d.ts +1 -0
  253. package/dist/utilities/storybook.js +3 -1
  254. package/dist/vscode.html-custom-data.json +64 -11
  255. package/dist/web-types.json +159 -35
  256. package/package.json +3 -1
  257. package/cdn/chunks/chunk.CCL2RZON.js +0 -132
  258. package/cdn/chunks/chunk.DIF52FDQ.js +0 -183
  259. package/cdn/chunks/chunk.GVVML3JJ.js +0 -272
  260. package/dist/chunks/chunk.2T66U3QC.js +0 -270
  261. package/dist/chunks/chunk.ESYJVRG3.js +0 -129
@@ -1,132 +0,0 @@
1
- import {
2
- x
3
- } from "./chunk.7HUC6BF3.js";
4
-
5
- // src/components/input-phone/input-phone.utils.ts
6
- var frenchNumberPrefix = [
7
- "+33",
8
- "+262",
9
- "+508",
10
- "+590",
11
- "+594",
12
- "+596",
13
- "+681",
14
- "+687",
15
- "+689"
16
- ];
17
- var phonePrefixOptions = [
18
- { value: "+33", label: "fr_FR" },
19
- { value: "+590", label: "fr_GP" },
20
- { value: "+594", label: "fr_GF" },
21
- { value: "+596", label: "fr_MQ" },
22
- { value: "+687", label: "fr_NC" },
23
- { value: "+689", label: "fr_PF" },
24
- { value: "+508", label: "fr_PM" },
25
- { value: "+262", label: "fr_RE" },
26
- { value: "+681", label: "fr_WF" }
27
- ];
28
- var frenchFlagSelect = x`<svg
29
- slot="prefix"
30
- xmlns="http://www.w3.org/2000/svg"
31
- width="28"
32
- height="20"
33
- fill="none"
34
- aria-hidden="true"
35
- >
36
- <rect
37
- width="27.5"
38
- height="19.5"
39
- x=".25"
40
- y=".25"
41
- fill="#fff"
42
- stroke="#F5F5F5"
43
- stroke-width=".5"
44
- rx="1.75"
45
- />
46
- <mask
47
- id="mask0_16382_21057"
48
- width="28"
49
- height="20"
50
- x="0"
51
- y="0"
52
- maskUnits="userSpaceOnUse"
53
- style="mask-type:luminance"
54
- >
55
- <rect
56
- width="27.5"
57
- height="19.5"
58
- x=".25"
59
- y=".25"
60
- fill="#fff"
61
- stroke="#fff"
62
- stroke-width=".5"
63
- rx="1.75"
64
- />
65
- </mask>
66
- <g mask="url(#mask0_16382_21057)">
67
- <path fill="#F44653" d="M18.666 0h9.333v20h-9.333z" />
68
- <path
69
- fill="#1035BB"
70
- fill-rule="evenodd"
71
- d="M0 20h9.333V0H0v20Z"
72
- clip-rule="evenodd"
73
- />
74
- </g>
75
- </svg>`;
76
- var frenchFlagOption = (id) => x`<svg
77
- slot="prefix"
78
- xmlns="http://www.w3.org/2000/svg"
79
- width="14"
80
- height="15"
81
- fill="none"
82
- aria-hidden="true"
83
- >
84
- <g clip-path=${`url(#clip${id})`}>
85
- <rect
86
- width="13.5"
87
- height="13.5"
88
- x=".25"
89
- y=".75"
90
- fill="#fff"
91
- stroke="#F5F5F5"
92
- stroke-width=".5"
93
- rx="1.75"
94
- />
95
- <mask
96
- id=${`mask${id}`}
97
- width="14"
98
- height="15"
99
- x="0"
100
- y="0"
101
- maskUnits="userSpaceOnUse"
102
- style="mask-type:luminance"
103
- >
104
- <rect
105
- width="13.5"
106
- height="13.5"
107
- x=".25"
108
- y=".75"
109
- fill="#fff"
110
- stroke="#fff"
111
- stroke-width=".5"
112
- rx="1.75"
113
- />
114
- </mask>
115
- <g mask=${`url(#mask${id})`}>
116
- <path fill="#F44653" d="M9.334.5h4.667v14H9.334z" />
117
- <path
118
- fill="#1035BB"
119
- fill-rule="evenodd"
120
- d="M0 14.5h4.667V.5H0v14Z"
121
- clip-rule="evenodd"
122
- />
123
- </g>
124
- </g>
125
- </svg>`;
126
-
127
- export {
128
- frenchNumberPrefix,
129
- phonePrefixOptions,
130
- frenchFlagSelect,
131
- frenchFlagOption
132
- };
@@ -1,183 +0,0 @@
1
- import {
2
- header_search_styles_default
3
- } from "./chunk.GVVML3JJ.js";
4
- import {
5
- l
6
- } from "./chunk.7PPSHHT2.js";
7
- import {
8
- LocalizeController
9
- } from "./chunk.ZLWLHLBC.js";
10
- import {
11
- e as e2
12
- } from "./chunk.IKHG7XGO.js";
13
- import {
14
- ShoelaceElement,
15
- e,
16
- n,
17
- r,
18
- t
19
- } from "./chunk.DZB6XUZ7.js";
20
- import {
21
- x
22
- } from "./chunk.7HUC6BF3.js";
23
- import {
24
- __decorateClass
25
- } from "./chunk.4ZGVANML.js";
26
-
27
- // src/components/header-search/header-search.ts
28
- var DSAHeaderSearch = class extends ShoelaceElement {
29
- constructor() {
30
- super(...arguments);
31
- this.localize = new LocalizeController(this);
32
- this.hasFocus = false;
33
- this.value = "";
34
- this.expanded = false;
35
- }
36
- connectedCallback() {
37
- super.connectedCallback();
38
- this.setAttribute("role", "search");
39
- }
40
- async handleExpandClick() {
41
- this.emit("dsa-expand");
42
- this.expanded = true;
43
- await this.updateComplete;
44
- this.input.focus();
45
- }
46
- handleChange() {
47
- this.value = this.input.value;
48
- this.emit("dsa-change");
49
- }
50
- handleInput() {
51
- this.value = this.input.value;
52
- this.emit("dsa-input");
53
- }
54
- handleInputFocus() {
55
- this.hasFocus = true;
56
- this.emit("dsa-focus");
57
- }
58
- handleInputBlur() {
59
- this.hasFocus = false;
60
- this.emit("dsa-blur");
61
- }
62
- handleClearClick(event) {
63
- this.value = "";
64
- this.emit("dsa-clear");
65
- this.emit("dsa-input");
66
- this.emit("dsa-change");
67
- this.input.focus();
68
- event.stopPropagation();
69
- }
70
- handleKeyDown(event) {
71
- event.stopPropagation();
72
- const hasModifier = event.metaKey || event.ctrlKey || event.shiftKey || event.altKey;
73
- if (event.key === "Enter" && !hasModifier) {
74
- setTimeout(() => {
75
- if (!event.defaultPrevented && !event.isComposing) {
76
- this.handleSubmitClick();
77
- }
78
- });
79
- }
80
- }
81
- handleSubmitClick() {
82
- this.emit("dsa-submit");
83
- }
84
- async handleCancelClick() {
85
- this.emit("dsa-collapse");
86
- this.expanded = false;
87
- await this.updateComplete;
88
- this.expandButton.focus();
89
- }
90
- render() {
91
- if (!this.expanded) {
92
- return x`
93
- <button
94
- aria-label=${this.localize.term("search")}
95
- id="expand-button"
96
- class="button button--navigation"
97
- @click=${this.handleExpandClick}
98
- >
99
- <dsa-icon name="search" library="system"></dsa-icon>
100
- <span class="expand-button__label"
101
- >${this.localize.term("search")}</span
102
- >
103
- </button>
104
- `;
105
- }
106
- return x`
107
- <div class=${e2({ input: true, "input--focused": this.hasFocus })}>
108
- <input
109
- class="input__control"
110
- type="search"
111
- placeholder=${this.localize.term("search")}
112
- aria-label=${this.localize.term("search")}
113
- title=${this.localize.term("search")}
114
- .value=${l(this.value)}
115
- @change=${this.handleChange}
116
- @input=${this.handleInput}
117
- @focus=${this.handleInputFocus}
118
- @blur=${this.handleInputBlur}
119
- @keydown=${this.handleKeyDown}
120
- />
121
- ${this.value.length > 0 ? x`
122
- <dsa-icon-button
123
- id="clear-button"
124
- part="clear-button"
125
- name="cancel"
126
- label=${this.localize.term("clearEntry")}
127
- @click=${this.handleClearClick}
128
- library="system"
129
- ></dsa-icon-button>
130
- ` : ""}
131
- </div>
132
-
133
- <button
134
- class="icon-button icon-button--primary"
135
- id="submit-button"
136
- @click=${this.handleSubmitClick}
137
- aria-label=${this.localize.term("search")}
138
- >
139
- <dsa-icon name="search" library="system"></dsa-icon>
140
- </button>
141
-
142
- <button
143
- class="button button--tertiary"
144
- id="cancel-button"
145
- @click=${this.handleCancelClick}
146
- >
147
- ${this.localize.term("cancel")}
148
- </button>
149
- `;
150
- }
151
- };
152
- DSAHeaderSearch.styles = header_search_styles_default;
153
- __decorateClass([
154
- e(".input__control")
155
- ], DSAHeaderSearch.prototype, "input", 2);
156
- __decorateClass([
157
- e("#expand-button")
158
- ], DSAHeaderSearch.prototype, "expandButton", 2);
159
- __decorateClass([
160
- e("#submit-button")
161
- ], DSAHeaderSearch.prototype, "submitButton", 2);
162
- __decorateClass([
163
- e("#cancel-button")
164
- ], DSAHeaderSearch.prototype, "cancelButton", 2);
165
- __decorateClass([
166
- e("#clear-button")
167
- ], DSAHeaderSearch.prototype, "clearButton", 2);
168
- __decorateClass([
169
- r()
170
- ], DSAHeaderSearch.prototype, "hasFocus", 2);
171
- __decorateClass([
172
- n()
173
- ], DSAHeaderSearch.prototype, "value", 2);
174
- __decorateClass([
175
- n({ reflect: true, type: Boolean })
176
- ], DSAHeaderSearch.prototype, "expanded", 2);
177
- DSAHeaderSearch = __decorateClass([
178
- t("dsa-header-search")
179
- ], DSAHeaderSearch);
180
-
181
- export {
182
- DSAHeaderSearch
183
- };
@@ -1,272 +0,0 @@
1
- import {
2
- component_styles_default
3
- } from "./chunk.PSQJDSB2.js";
4
- import {
5
- i
6
- } from "./chunk.4KHZQZ3M.js";
7
-
8
- // src/components/header-search/header-search.styles.ts
9
- var header_search_styles_default = i`
10
- ${component_styles_default}
11
-
12
- :host {
13
- display: flex;
14
- align-items: center;
15
- justify-content: flex-end;
16
- gap: var(--dsa-spacing-8);
17
- flex: 1;
18
- width: 100%;
19
- }
20
-
21
- .mobile {
22
- display: block;
23
- }
24
- .desktop {
25
- display: none;
26
- }
27
-
28
- /* Input */
29
- .input {
30
- position: relative;
31
- display: inline-flex;
32
- flex-direction: row;
33
- align-items: center;
34
- vertical-align: middle;
35
- width: 100%;
36
- min-width: 0;
37
- font: var(--dsa-wc-input-text-field-font);
38
- border-bottom: 1px solid var(--dsa-wc-header-search-input-color);
39
- }
40
-
41
- .input--focused {
42
- outline: var(--dsa-wc-focus-ring);
43
- outline-offset: var(--dsa-wc-focus-ring-offset);
44
- }
45
-
46
- .input__control {
47
- display: inline-flex;
48
- flex-direction: row;
49
- flex: 1 1 auto;
50
- font-family: inherit;
51
- font-weight: inherit;
52
- min-width: 0;
53
- height: 100%;
54
- border: none;
55
- background: none;
56
- box-shadow: none;
57
- margin: 0;
58
- cursor: inherit;
59
- -webkit-appearance: none;
60
- color: var(--dsa-wc-header-search-input-color);
61
-
62
- font-size: 14px;
63
- padding: 8px 0 8px 8px;
64
- height: 34px;
65
- }
66
-
67
- .input__control::placeholder {
68
- color: var(--dsa-wc-input-on-layer-text-field-placeholder-color);
69
- opacity: 1;
70
- }
71
-
72
- .input__control::-webkit-search-decoration,
73
- .input__control::-webkit-search-cancel-button,
74
- .input__control::-webkit-search-results-button,
75
- .input__control::-webkit-search-results-decoration {
76
- -webkit-appearance: none;
77
- }
78
- .input__control:focus {
79
- outline: none;
80
- }
81
-
82
- /* Buttons */
83
- .button {
84
- display: inline-flex;
85
- align-items: center;
86
- justify-content: center;
87
- border-style: solid;
88
- border-width: var(--dsa-wc-button-border-width);
89
- border-radius: var(--dsa-wc-button-border-radius);
90
- text-decoration: none;
91
- user-select: none;
92
- white-space: nowrap;
93
- vertical-align: middle;
94
- padding: 0 var(--dsa-wc-button-padding-horizontal);
95
- transition: var(--dsa-wc-transition-x-fast) background-color,
96
- var(--dsa-wc-transition-x-fast) color,
97
- var(--dsa-wc-transition-x-fast) border,
98
- var(--dsa-wc-transition-x-fast) box-shadow;
99
- cursor: pointer;
100
- }
101
- .button::-moz-focus-inner {
102
- border: 0;
103
- }
104
- .button:focus {
105
- outline: none;
106
- }
107
- .button:focus-visible {
108
- outline: var(--dsa-wc-focus-ring);
109
- outline-offset: var(--dsa-wc-focus-ring-offset);
110
- }
111
-
112
- .button--tertiary {
113
- padding: 0;
114
- }
115
- .button--tertiary {
116
- background-color: var(--dsa-wc-button-tertiary-on-base-color);
117
- border: none;
118
- color: var(--dsa-wc-button-tertiary-on-base-font-color);
119
- }
120
- .button--tertiary:hover {
121
- background-color: var(--dsa-wc-button-tertiary-on-base-hover-color);
122
- color: var(--dsa-wc-button-tertiary-on-base-hover-font-color);
123
- }
124
- .button--tertiary:active {
125
- background-color: var(--dsa-wc-button-tertiary-on-base-active-color);
126
- color: var(--dsa-wc-button-tertiary-on-base-active-font-color);
127
- }
128
- .button--navigation {
129
- padding: 0;
130
- }
131
- .button--navigation {
132
- background-color: var(--dsa-wc-button-navigation-on-base-color);
133
- border-color: transparent;
134
- color: var(--dsa-wc-button-navigation-on-base-font-color);
135
- }
136
- .button--navigation:hover {
137
- background-color: var(--dsa-wc-button-navigation-on-base-hover-color);
138
- border-color: transparent;
139
- color: var(--dsa-wc-button-navigation-on-base-hover-font-color);
140
- }
141
- .button--navigation:active {
142
- background-color: var(--dsa-wc-button-navigation-on-base-active-color);
143
- border-color: transparent;
144
- color: var(--dsa-wc-button-navigation-on-base-active-font-color);
145
- }
146
-
147
- .icon-button {
148
- flex: 0 0 auto;
149
- display: flex;
150
- align-items: center;
151
- border: none;
152
- border-radius: var(--dsa-wc-icon-button-border-radius);
153
- font-size: inherit;
154
- padding: var(
155
- --dsa-wc-internal-icon-button-padding,
156
- var(--dsa-wc-icon-button-padding)
157
- );
158
- cursor: pointer;
159
- transition: var(--dsa-wc-transition-x-fast) color;
160
- -webkit-appearance: none;
161
- }
162
- .icon-button:focus {
163
- outline: none;
164
- }
165
- .icon-button:focus-visible {
166
- outline: var(--dsa-wc-focus-ring);
167
- outline-offset: var(--dsa-wc-focus-ring-offset);
168
- border-radius: var(--dsa-wc-focus-ring-radius);
169
- }
170
-
171
- .icon-button--primary {
172
- background-color: var(--dsa-wc-button-primary-on-base-color);
173
- border-color: var(--dsa-wc-button-primary-on-base-color);
174
- color: var(--dsa-wc-button-primary-on-base-font-color);
175
- }
176
- .icon-button--primary:hover:not(.icon-button--disabled) {
177
- background-color: var(--dsa-wc-button-primary-on-base-hover-color);
178
- border-color: var(--dsa-wc-button-primary-on-base-hover-color);
179
- color: var(--dsa-wc-button-primary-on-base-hover-font-color);
180
- }
181
- .icon-button--primary:active:not(.icon-button--disabled) {
182
- background-color: var(--dsa-wc-button-primary-on-base-active-color);
183
- border-color: var(--dsa-wc-button-primary-on-base-active-color);
184
- color: var(--dsa-wc-button-primary-on-base-active-font-color);
185
- }
186
-
187
- #expand-button {
188
- font: var(--dsa-wc-button-font);
189
- height: var(--dsa-wc-form-input-height);
190
- line-height: calc(
191
- var(--dsa-wc-form-input-height) - var(--dsa-wc-button-border-width) * 2
192
- );
193
- padding: var(
194
- --dsa-wc-internal-icon-button-padding,
195
- var(--dsa-wc-icon-button-padding)
196
- );
197
- }
198
- #expand-button dsa-icon {
199
- width: 20px;
200
- height: 20px;
201
- pointer-events: none;
202
- }
203
- .expand-button__label {
204
- display: none;
205
- }
206
-
207
- #submit-button dsa-icon {
208
- width: 20px;
209
- height: 20px;
210
- pointer-events: none;
211
- }
212
-
213
- #cancel-button {
214
- font: var(--dsa-wc-button-font-small);
215
- height: var(--dsa-wc-form-input-height-small);
216
- line-height: calc(
217
- var(--dsa-wc-form-input-height-small) - var(--dsa-wc-button-border-width) *
218
- 2
219
- );
220
- border-radius: var(--dsa-wc-button-border-radius);
221
- margin-inline-start: var(--dsa-spacing-8);
222
- }
223
-
224
- @media screen and (min-width: 720px) {
225
- :host {
226
- gap: var(--dsa-spacing-16);
227
- }
228
-
229
- .mobile {
230
- display: none;
231
- }
232
- .desktop {
233
- display: block;
234
- }
235
-
236
- .input__control {
237
- font: var(--dsa-wc-header-search-input-font);
238
- height: 40px;
239
- }
240
-
241
- #expand-button {
242
- padding: unset;
243
- }
244
- #expand-button dsa-icon {
245
- width: 1em;
246
- height: 1em;
247
- margin-inline-end: var(--dsa-wc-button-icon-spacing);
248
- }
249
- .expand-button__label {
250
- display: unset;
251
- }
252
-
253
- #submit-button dsa-icon {
254
- width: 24px;
255
- height: 24px;
256
- }
257
-
258
- #cancel-button {
259
- font: var(--dsa-wc-button-font);
260
- height: var(--dsa-wc-form-input-height);
261
- line-height: calc(
262
- var(--dsa-wc-form-input-height) - var(--dsa-wc-button-border-width) * 2
263
- );
264
- border-radius: var(--dsa-wc-button-border-radius);
265
- margin-inline-start: 0;
266
- }
267
- }
268
- `;
269
-
270
- export {
271
- header_search_styles_default
272
- };