@ds-autonomie/web-components 1.8.0 → 1.9.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 (219) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/chunks/{chunk.KZIAHLAV.js → chunk.27JQOQHL.js} +31 -13
  3. package/dist/chunks/{chunk.K55HKFUM.js → chunk.2CCVOCSE.js} +11 -0
  4. package/dist/chunks/chunk.2TCYCYJQ.js +187 -0
  5. package/dist/chunks/chunk.3BOLT7UM.js +168 -0
  6. package/dist/chunks/{chunk.WMEXYRBL.js → chunk.3EDVQPST.js} +1 -1
  7. package/dist/chunks/chunk.47IWI2IO.js +51 -0
  8. package/dist/chunks/{chunk.BEGWFCAR.js → chunk.4Z3LVWYW.js} +23 -3
  9. package/dist/chunks/{chunk.5MXBL3PY.js → chunk.5QYMKLPJ.js} +1 -1
  10. package/dist/chunks/{chunk.TRMEXXU2.js → chunk.5X3ZLYWR.js} +4 -4
  11. package/dist/chunks/chunk.65HTBW2L.js +31 -0
  12. package/dist/chunks/{chunk.5KOTVDN5.js → chunk.66WACVGP.js} +13 -2
  13. package/dist/chunks/{chunk.TFXRULTL.js → chunk.74YBAWFQ.js} +1 -1
  14. package/dist/chunks/chunk.7NRLP2GK.js +172 -0
  15. package/dist/chunks/{chunk.F4KJFS2T.js → chunk.7PEABCEV.js} +1 -1
  16. package/dist/chunks/{chunk.SEH7BBNZ.js → chunk.7ZBFOFLF.js} +2 -2
  17. package/dist/chunks/chunk.BFG2T6XK.js +76 -0
  18. package/dist/chunks/{chunk.DMP5NRB3.js → chunk.BMSQX3ZA.js} +134 -118
  19. package/dist/chunks/{chunk.IFXLU6P3.js → chunk.BVRGK5ZO.js} +27 -4
  20. package/dist/chunks/{chunk.AXJZDS4O.js → chunk.BWQBVIRR.js} +1 -1
  21. package/dist/chunks/{chunk.VN7U4QIC.js → chunk.CFTA3QKA.js} +1 -1
  22. package/dist/chunks/{chunk.F6EDQPCA.js → chunk.CPEI3G7E.js} +1 -1
  23. package/dist/chunks/{chunk.WTGBJNXJ.js → chunk.CURRLKGD.js} +1 -1
  24. package/dist/chunks/{chunk.MIO6K4QD.js → chunk.DAQJDIFW.js} +1 -1
  25. package/dist/chunks/{chunk.ZC74GTBL.js → chunk.DX25IW4S.js} +0 -4
  26. package/dist/chunks/{chunk.ZCNXAXKX.js → chunk.EETYUDWR.js} +12 -1
  27. package/dist/chunks/{chunk.OIWFTO2A.js → chunk.EFCI6CBB.js} +17 -5
  28. package/dist/chunks/chunk.ESYJVRG3.js +129 -0
  29. package/dist/chunks/{chunk.ADG7SYDH.js → chunk.G2S6QEJM.js} +1 -1
  30. package/dist/chunks/{chunk.MUBB5GXY.js → chunk.GOSPYXFS.js} +5 -8
  31. package/dist/chunks/chunk.H4XXY6QB.js +73 -0
  32. package/dist/chunks/chunk.HAJSA7VP.js +53 -0
  33. package/dist/chunks/chunk.HW4HC4GP.js +61 -0
  34. package/dist/chunks/{chunk.B5DEC3ZW.js → chunk.IEBTPGUT.js} +2 -1
  35. package/dist/chunks/{chunk.CJIL3BLA.js → chunk.JJ67JVYV.js} +2 -0
  36. package/dist/chunks/{chunk.7XNMTM6N.js → chunk.KAXMDDPV.js} +1 -1
  37. package/dist/chunks/{chunk.NEIICCKM.js → chunk.KUC4IPNW.js} +24 -6
  38. package/dist/chunks/{chunk.MZMKGGW2.js → chunk.LG4WLLQM.js} +1 -1
  39. package/dist/chunks/{chunk.ZBTNUV7V.js → chunk.LJ7Y3MBX.js} +5 -5
  40. package/dist/chunks/{chunk.DFH66YHJ.js → chunk.MHEF6WDT.js} +1 -1
  41. package/dist/chunks/{chunk.XEZX466O.js → chunk.MMHCJ5DA.js} +1 -1
  42. package/dist/chunks/chunk.N5UMZAXE.js +264 -0
  43. package/dist/chunks/chunk.N7H2OIPT.js +82 -0
  44. package/dist/chunks/{chunk.6A2LWKQY.js → chunk.NZK7MHS3.js} +1 -1
  45. package/dist/chunks/{chunk.N6EX6BDJ.js → chunk.ONIFK4NH.js} +28 -0
  46. package/dist/chunks/{chunk.KY6SFO3D.js → chunk.OXPE4AH7.js} +1 -1
  47. package/dist/chunks/chunk.OZWZRPR2.js +56 -0
  48. package/dist/chunks/{chunk.VZIVZSLP.js → chunk.P6TKBTE3.js} +1 -1
  49. package/dist/chunks/chunk.PFGVYROJ.js +26 -0
  50. package/dist/chunks/{chunk.HWR5JOYI.js → chunk.POJ5NHBX.js} +1 -1
  51. package/dist/chunks/{chunk.6OP6GCU4.js → chunk.R4Y6XOHR.js} +12 -2
  52. package/dist/chunks/{chunk.L5YSEAAK.js → chunk.RFLSIZXC.js} +1 -1
  53. package/dist/chunks/{chunk.JGWZGEQY.js → chunk.RZ3LYIA4.js} +4 -4
  54. package/dist/chunks/{chunk.43PVVN7Q.js → chunk.S7OQV6LL.js} +1 -1
  55. package/dist/chunks/chunk.S7VHPQOI.js +239 -0
  56. package/dist/chunks/{chunk.PO3AZ63O.js → chunk.T7VLQ7RI.js} +2 -1
  57. package/dist/chunks/{chunk.7UXBTLEE.js → chunk.TUWCKMLU.js} +2 -2
  58. package/dist/chunks/chunk.TWRM2VNQ.js +131 -0
  59. package/dist/chunks/{chunk.C7BQI7NH.js → chunk.UVCXXEVO.js} +1 -1
  60. package/dist/chunks/{chunk.YF45VJOV.js → chunk.UXKJPQ6X.js} +1 -1
  61. package/dist/chunks/{chunk.DNSF5O4C.js → chunk.UXXDCLQD.js} +1 -1
  62. package/dist/chunks/{chunk.C33YMWL6.js → chunk.V5O2GRVM.js} +15 -3
  63. package/dist/chunks/{chunk.EKWYMXQO.js → chunk.VNAE4DJZ.js} +1 -0
  64. package/dist/chunks/{chunk.RXBDBWWT.js → chunk.VWZFYMC7.js} +6 -0
  65. package/dist/chunks/{chunk.22WSILHD.js → chunk.WNODOQAI.js} +1 -1
  66. package/dist/chunks/chunk.XM5ZLNIT.js +32 -0
  67. package/dist/chunks/chunk.YA5XTUZW.js +76 -0
  68. package/dist/chunks/{chunk.DIC5NUF5.js → chunk.YAF5P5CP.js} +4 -0
  69. package/dist/chunks/chunk.YDZQSSJE.js +77 -0
  70. package/dist/components/accordion/accordion.js +5 -5
  71. package/dist/components/alert/alert.js +7 -7
  72. package/dist/components/avatar/avatar.js +4 -4
  73. package/dist/components/badge/badge.d.ts +3 -0
  74. package/dist/components/badge/badge.js +3 -2
  75. package/dist/components/badge/badge.styles.js +1 -1
  76. package/dist/components/breadcrumb/breadcrumb.js +5 -5
  77. package/dist/components/breadcrumb-item/breadcrumb-item.js +2 -2
  78. package/dist/components/button/button.js +6 -6
  79. package/dist/components/checkbox/checkbox.d.ts +3 -0
  80. package/dist/components/checkbox/checkbox.js +6 -5
  81. package/dist/components/checkbox/checkbox.styles.js +1 -1
  82. package/dist/components/checkbox-button/checkbox-button.js +3 -3
  83. package/dist/components/combobox/combobox.d.ts +0 -1
  84. package/dist/components/combobox/combobox.js +9 -9
  85. package/dist/components/dialog/dialog.js +7 -7
  86. package/dist/components/download-card/download-card.js +3 -3
  87. package/dist/components/download-link/download-link.js +3 -3
  88. package/dist/components/drawer/drawer.js +7 -7
  89. package/dist/components/dropdown/dropdown.js +2 -2
  90. package/dist/components/error-message-panel/error-message-panel.js +2 -2
  91. package/dist/components/footer-sitemap-item/footer-sitemap-item.js +1 -1
  92. package/dist/components/format-bytes/format-bytes.js +2 -2
  93. package/dist/components/format-date/format-date.js +2 -2
  94. package/dist/components/format-number/format-number.js +2 -2
  95. package/dist/components/header/header.assets.d.ts +2 -0
  96. package/dist/components/header/header.assets.js +9 -0
  97. package/dist/components/header/header.d.ts +37 -0
  98. package/dist/components/header/header.js +17 -0
  99. package/dist/components/header/header.styles.d.ts +2 -0
  100. package/dist/components/header/header.styles.js +8 -0
  101. package/dist/components/header-external-link/header-external-link.d.ts +18 -0
  102. package/dist/components/header-external-link/header-external-link.js +9 -0
  103. package/dist/components/header-external-link/header-external-link.style.d.ts +2 -0
  104. package/dist/components/header-external-link/header-external-link.style.js +18 -0
  105. package/dist/components/header-search/header-search.d.ts +45 -0
  106. package/dist/components/header-search/header-search.js +12 -0
  107. package/dist/components/header-search/header-search.styles.d.ts +2 -0
  108. package/dist/components/header-search/header-search.styles.js +8 -0
  109. package/dist/components/icon/icon.js +3 -3
  110. package/dist/components/icon-button/icon-button.d.ts +2 -1
  111. package/dist/components/icon-button/icon-button.js +5 -5
  112. package/dist/components/icon-button/icon-button.styles.js +1 -1
  113. package/dist/components/input/input.js +6 -6
  114. package/dist/components/input-mask/input-mask.js +2 -2
  115. package/dist/components/input-phone/input-phone.configs.d.ts +4 -3
  116. package/dist/components/input-phone/input-phone.configs.js +3 -3
  117. package/dist/components/input-phone/input-phone.d.ts +8 -8
  118. package/dist/components/input-phone/input-phone.js +16 -16
  119. package/dist/components/input-phone/input-phone.styles.js +1 -1
  120. package/dist/components/input-phone/input-phone.utils.d.ts +3 -3
  121. package/dist/components/input-phone/input-phone.utils.js +5 -5
  122. package/dist/components/menu-item/menu-item.js +3 -3
  123. package/dist/components/option/option.js +5 -5
  124. package/dist/components/pagination/pagination.d.ts +2 -2
  125. package/dist/components/pagination/pagination.js +9 -8
  126. package/dist/components/pagination/pagination.styles.js +1 -1
  127. package/dist/components/progress-bar/progress-bar.js +2 -2
  128. package/dist/components/radio/radio.js +3 -3
  129. package/dist/components/relative-time/relative-time.js +2 -2
  130. package/dist/components/select/select.js +8 -8
  131. package/dist/components/skeleton/skeleton.d.ts +1 -0
  132. package/dist/components/skeleton/skeleton.js +5 -3
  133. package/dist/components/skip-link-item/skip-link-item.d.ts +1 -0
  134. package/dist/components/skip-link-item/skip-link-item.js +1 -1
  135. package/dist/components/skip-links/skip-links.d.ts +0 -6
  136. package/dist/components/skip-links/skip-links.js +2 -2
  137. package/dist/components/skip-links/skip-links.styles.js +1 -1
  138. package/dist/components/spinner/spinner.js +2 -2
  139. package/dist/components/step/step.js +6 -6
  140. package/dist/components/tab/tab.js +2 -2
  141. package/dist/components/tab-group/tab-group.js +2 -2
  142. package/dist/components/table/table-body/table-body.d.ts +8 -3
  143. package/dist/components/table/table-body/table-body.js +5 -1
  144. package/dist/components/table/table-caption/table-caption.d.ts +6 -2
  145. package/dist/components/table/table-caption/table-caption.js +7 -3
  146. package/dist/components/table/table-caption/table-caption.styles.js +1 -1
  147. package/dist/components/table/table-cell/table-cell.d.ts +6 -2
  148. package/dist/components/table/table-cell/table-cell.js +5 -1
  149. package/dist/components/table/table-expanded-row/table-expanded-row.d.ts +17 -0
  150. package/dist/components/table/table-expanded-row/table-expanded-row.js +47 -0
  151. package/dist/components/table/table-expanded-row/table-expanded-row.styles.d.ts +2 -0
  152. package/dist/components/table/table-expanded-row/table-expanded-row.styles.js +8 -0
  153. package/dist/components/table/table-head/table-head.d.ts +8 -3
  154. package/dist/components/table/table-head/table-head.js +5 -1
  155. package/dist/components/table/table-header-cell/table-header-cell.d.ts +8 -1
  156. package/dist/components/table/table-header-cell/table-header-cell.js +7 -4
  157. package/dist/components/table/table-header-cell/table-header-cell.styles.js +1 -1
  158. package/dist/components/table/table-header-row/table-header-row.d.ts +4 -2
  159. package/dist/components/table/table-header-row/table-header-row.js +7 -4
  160. package/dist/components/table/table-header-row/table-header-row.styles.js +1 -1
  161. package/dist/components/table/table-row/table-row.d.ts +48 -1
  162. package/dist/components/table/table-row/table-row.js +5 -2
  163. package/dist/components/table/table-row/table-row.styles.js +1 -1
  164. package/dist/components/table/table.d.ts +23 -1
  165. package/dist/components/table/table.js +2 -2
  166. package/dist/components/table/table.styles.js +1 -1
  167. package/dist/components/table-container/table-container.d.ts +4 -2
  168. package/dist/components/table-container/table-container.js +3 -1
  169. package/dist/components/tag/tag.js +7 -7
  170. package/dist/components/tooltip/tooltip.js +2 -2
  171. package/dist/components/tree/tree.js +11 -10
  172. package/dist/components/tree-item/tree-item.js +10 -9
  173. package/dist/components/tree-item/tree-item.styles.js +1 -1
  174. package/dist/custom-elements.json +2490 -991
  175. package/dist/design-system.d.ts +3 -0
  176. package/dist/design-system.js +119 -103
  177. package/dist/events/dsa-submit.d.ts +7 -0
  178. package/dist/events/dsa-submit.js +1 -0
  179. package/dist/events/dsa-table-row-all-change-selection.d.ts +7 -0
  180. package/dist/events/dsa-table-row-all-change-selection.js +1 -0
  181. package/dist/events/dsa-table-row-all-selected.d.ts +10 -0
  182. package/dist/events/dsa-table-row-all-selected.js +1 -0
  183. package/dist/events/dsa-table-row-change-selection.d.ts +7 -0
  184. package/dist/events/dsa-table-row-change-selection.js +1 -0
  185. package/dist/events/dsa-table-row-click.d.ts +7 -0
  186. package/dist/events/dsa-table-row-click.js +1 -0
  187. package/dist/events/dsa-table-row-expand-change.d.ts +7 -0
  188. package/dist/events/dsa-table-row-expand-change.js +1 -0
  189. package/dist/events/dsa-table-row-selected.d.ts +11 -0
  190. package/dist/events/dsa-table-row-selected.js +1 -0
  191. package/dist/events/events.d.ts +6 -0
  192. package/dist/internal/loading-state-element.d.ts +7 -0
  193. package/dist/internal/loading-state-element.js +23 -0
  194. package/dist/themes/dsa-wc-theme.css +53 -3
  195. package/dist/themes/dsa-wc-theme.min.css +1 -1
  196. package/dist/themes/dsa-wc-theme.styles.js +56 -3
  197. package/dist/translations/en-gb.js +1 -1
  198. package/dist/translations/en.js +1 -1
  199. package/dist/translations/fr.js +1 -1
  200. package/dist/utilities/localize.d.ts +10 -1
  201. package/dist/utilities/localize.js +1 -1
  202. package/dist/utilities/storybook.d.ts +1 -0
  203. package/dist/utilities/storybook.js +12 -0
  204. package/dist/vscode.html-custom-data.json +168 -14
  205. package/dist/web-types.json +913 -70
  206. package/package.json +1 -1
  207. package/dist/chunks/chunk.2AHY5V6G.js +0 -25
  208. package/dist/chunks/chunk.65JZEQ4F.js +0 -33
  209. package/dist/chunks/chunk.6ZQ4OQ2C.js +0 -51
  210. package/dist/chunks/chunk.CHM74JXS.js +0 -74
  211. package/dist/chunks/chunk.HL632DKM.js +0 -86
  212. package/dist/chunks/chunk.M2SPGS54.js +0 -31
  213. package/dist/chunks/chunk.MVKY65HC.js +0 -33
  214. package/dist/chunks/chunk.OBTE6PY7.js +0 -41
  215. package/dist/chunks/chunk.TB6DCJYX.js +0 -57
  216. package/dist/chunks/chunk.UCJGKOXX.js +0 -10
  217. package/dist/chunks/chunk.Z4V2DJQS.js +0 -44
  218. package/dist/chunks/{chunk.JOIYVWUG.js → chunk.5MB36CJO.js} +1 -1
  219. package/dist/chunks/{chunk.V7MYOBN4.js → chunk.QZTW3WMM.js} +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @ds-autonomie/web-components
2
2
 
3
+ ## 1.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - e92bccf: `table-row`, `table-header-row`, `table`: ajout de la sélection d'une ligne d'un tableau.
8
+ `checkbox`: ajout de l'attribut aria-label
9
+ - 25b9f28: `table`, `table-row`, `table-header-row`, `table-expanded-row`: ajout des lignes extensibles au tableau avec l'implémentation du composant `table-expanded-row`.
10
+ - e8b7577: `input-phone` : possibilité d'ajouter un préfix, ajout de codes pays manquant
11
+ - e4a68f5: `badge`, `button`, `icon-button` : ajout d'un attribut `size` au composant badge, et possibilité d'ajouter un badge dans les composants `button` et `icon-button`
12
+ - 26b01fe: `header`, `header-search`, `header-external-link` : ajout du composant en-tête
13
+ - 1348674: `table-container`, `table-caption`, `table-head`, `table-body`, `pagination` : ajout d'un état de chargement pour les éléments du tableau
14
+ - 16a8418: `table-row`, `table-header-row`: ajout d'un évènement au clique sur une ligne du tableau.
15
+
16
+ ### Patch Changes
17
+
18
+ - fc4187a: `table-header-cell` : ajout du nom de la colonne à l'attribut aria-label du bouton de tri
19
+ - b35d5fb: `skip-links` : support des `href` dynamiques
20
+
3
21
  ## 1.8.0
4
22
 
5
23
  ### Minor Changes
@@ -59,23 +59,32 @@ var translation = {
59
59
  ofTotal: (total) => `sur ${total}`,
60
60
  previousPage: "Page pr\xE9c\xE9dente",
61
61
  nextPage: "Page suivante",
62
- nextSortDirection: (direction) => {
62
+ nextSortDirection: (direction, label) => {
63
63
  switch (direction) {
64
64
  case "ascending" /* ASCENDING */:
65
- return "Au prochain clic, trier vers le haut";
65
+ return `${label}, activer pour trier vers le haut`;
66
66
  case "descending" /* DESCENDING */:
67
- return "Au prochain clic, trier vers le bas";
67
+ return `${label}, activer pour trier vers le bas`;
68
68
  default:
69
- return "";
69
+ return `${label}`;
70
70
  }
71
71
  },
72
72
  results: "r\xE9sultats",
73
- // countries
73
+ goToHomepage: "Aller \xE0 la page d'accueil",
74
+ search: "Rechercher",
75
+ cancel: "Annuler",
76
+ showExpandedTableRow: "Afficher d\xE9tails",
77
+ hideExpandedTableRow: "Masquer d\xE9tails",
78
+ // countries and regions
74
79
  fr_FR: "France",
75
- fr_GP: "Guadeloupe",
80
+ fr_GP: "Guadeloupe, Saint-Barth\xE9lemy et Saint-Martin",
76
81
  fr_GF: "Guyane",
77
82
  fr_MQ: "Martinique",
78
- fr_RE: "R\xE9union"
83
+ fr_NC: "Nouvelle-Cal\xE9donie",
84
+ fr_PF: "Polyn\xE9sie fran\xE7aise",
85
+ fr_PM: "Saint-Pierre-et-Miquelon",
86
+ fr_RE: "R\xE9union et Mayotte",
87
+ fr_WF: "Wallis-et-Futuna"
79
88
  };
80
89
  registerTranslation(translation);
81
90
  var fr_default = translation;
@@ -143,23 +152,32 @@ var translation2 = {
143
152
  ofTotal: (total) => `of ${total}`,
144
153
  previousPage: "Previous page",
145
154
  nextPage: "Next page",
146
- nextSortDirection: (direction) => {
155
+ nextSortDirection: (direction, label) => {
147
156
  switch (direction) {
148
157
  case "ascending" /* ASCENDING */:
149
- return "Next click, sort upwards";
158
+ return `${label}, activate to sort upwards`;
150
159
  case "descending" /* DESCENDING */:
151
- return "Next click, sort downwards";
160
+ return `${label}, activate to sort downwards`;
152
161
  default:
153
- return "";
162
+ return `${label}`;
154
163
  }
155
164
  },
156
165
  results: "results",
157
- // countries
166
+ goToHomepage: "Go to Homepage",
167
+ search: "Search",
168
+ cancel: "Cancel",
169
+ showExpandedTableRow: "Show details",
170
+ hideExpandedTableRow: "Hide details",
171
+ // countries and regions
158
172
  fr_FR: "France",
159
173
  fr_GP: "Guadeloupe",
160
174
  fr_GF: "Guiana",
161
175
  fr_MQ: "Martinique",
162
- fr_RE: "R\xE9union"
176
+ fr_NC: "New Caledonia",
177
+ fr_PF: "French Polynesia",
178
+ fr_PM: "Saint-Pierre-et-Miquelon",
179
+ fr_RE: "R\xE9union and Mayotte",
180
+ fr_WF: "Wallis and Futuna"
163
181
  };
164
182
  registerTranslation(translation2);
165
183
  var en_default = translation2;
@@ -48,6 +48,17 @@ var table_caption_styles_default = css`
48
48
  font: var(--dsa-font-x-small-normal);
49
49
  color: var(--dsa-color-text-on-base-secondary);
50
50
  }
51
+
52
+ /* Skeletons */
53
+ dsa-skeleton {
54
+ margin-top: var(--dsa-spacing-8);
55
+ }
56
+ .subtitle-skeleton {
57
+ max-width: 140px;
58
+ }
59
+ .total-items-skeleton {
60
+ max-width: 76px;
61
+ }
51
62
  `;
52
63
 
53
64
  export {
@@ -0,0 +1,187 @@
1
+ import {
2
+ table_row_styles_default
3
+ } from "./chunk.N7H2OIPT.js";
4
+ import {
5
+ LocalizeController
6
+ } from "./chunk.27JQOQHL.js";
7
+ import {
8
+ watch
9
+ } from "./chunk.6IH66JBY.js";
10
+ import {
11
+ ShoelaceElement
12
+ } from "./chunk.YCXTCVAZ.js";
13
+ import {
14
+ __decorateClass
15
+ } from "./chunk.6M63UXML.js";
16
+
17
+ // src/components/table/table-row/table-row.ts
18
+ import { html } from "lit";
19
+ import { customElement, property, query, state } from "lit/decorators.js";
20
+ import { classMap } from "lit/directives/class-map.js";
21
+ var DSATableRow = class extends ShoelaceElement {
22
+ constructor() {
23
+ super(...arguments);
24
+ this.localize = new LocalizeController(this);
25
+ this.showExpandButton = false;
26
+ this.role = "row";
27
+ this.size = "medium";
28
+ this.selected = false;
29
+ this.expandable = false;
30
+ this.expanded = false;
31
+ this.showExpandedLabel = "";
32
+ this.hideExpandedLabel = "";
33
+ this.selectionLabel = "";
34
+ this.selectionName = "";
35
+ this.selectionValue = "";
36
+ this.loading = false;
37
+ }
38
+ connectedCallback() {
39
+ super.connectedCallback();
40
+ this.handleRowClick = this.handleRowClick.bind(this);
41
+ this.handleCheckboxChange = this.handleCheckboxChange.bind(this);
42
+ this.addEventListener("click", this.handleRowClick);
43
+ }
44
+ disconnectedCallback() {
45
+ super.disconnectedCallback();
46
+ this.removeEventListener("click", this.handleRowClick);
47
+ }
48
+ handleRowClick() {
49
+ this.emit("dsa-table-row-click");
50
+ }
51
+ handleCheckboxChange(e) {
52
+ e.stopPropagation();
53
+ this.selected = this.checkbox.checked;
54
+ this.emit("dsa-table-row-change-selection");
55
+ }
56
+ renderFirstCell() {
57
+ return this.selectionName ? html`
58
+ <div role="cell" part="column-checkbox" aria-hidden=${this.loading}>
59
+ <div class="column-checkbox--content">
60
+ <dsa-checkbox
61
+ class="checkbox"
62
+ size="small"
63
+ name=${this.selectionName}
64
+ aria-label=${this.selectionLabel}
65
+ value=${this.selectionValue}
66
+ ?checked=${this.selected}
67
+ @click=${(e) => e.stopPropagation()}
68
+ @dsa-change=${this.handleCheckboxChange}
69
+ ?disabled=${this.loading}
70
+ ></dsa-checkbox>
71
+ </div>
72
+ </div>
73
+ ` : html``;
74
+ }
75
+ handleExpandClick(e) {
76
+ e.stopPropagation();
77
+ this.expanded = !this.expanded;
78
+ this.emit("dsa-table-row-expand-change");
79
+ }
80
+ renderExpandButton() {
81
+ const showExpandedLabel = this.showExpandedLabel !== "" ? this.showExpandedLabel : this.localize.term("showExpandedTableRow");
82
+ const hideExpandedLabel = this.hideExpandedLabel !== "" ? this.hideExpandedLabel : this.localize.term("hideExpandedTableRow");
83
+ return html`
84
+ <div
85
+ role="cell"
86
+ class=${classMap({
87
+ "column-expand-button": true,
88
+ "column-expand-button--has-icon": this.showExpandButton
89
+ })}
90
+ aria-hidden=${this.loading}
91
+ >
92
+ <dsa-icon-button
93
+ variant="default"
94
+ name="expand_more"
95
+ size="xlarge"
96
+ class=${classMap({
97
+ "expand-button": true,
98
+ "expand-button--expand-less": this.expanded
99
+ })}
100
+ label=${this.expanded ? hideExpandedLabel : showExpandedLabel}
101
+ @click=${this.handleExpandClick}
102
+ ?disabled=${this.loading}
103
+ ></dsa-icon-button>
104
+ </div>
105
+ `;
106
+ }
107
+ handleExpandableChange() {
108
+ var _a;
109
+ if (this.expandable && ((_a = this.nextElementSibling) == null ? void 0 : _a.matches(this.selectorExpandedRow))) {
110
+ this.showExpandButton = true;
111
+ } else {
112
+ this.showExpandButton = false;
113
+ }
114
+ }
115
+ handleExpandedChange() {
116
+ var _a;
117
+ if ((_a = this.nextElementSibling) == null ? void 0 : _a.matches(this.selectorExpandedRow)) {
118
+ this.nextElementSibling.expanded = this.expanded;
119
+ }
120
+ }
121
+ render() {
122
+ return html`
123
+ ${this.renderFirstCell()}
124
+ <slot></slot>
125
+ ${this.expandable ? this.renderExpandButton() : html``}
126
+ `;
127
+ }
128
+ get selectorExpandedRow() {
129
+ return "dsa-table-expanded-row";
130
+ }
131
+ };
132
+ DSATableRow.styles = table_row_styles_default;
133
+ __decorateClass([
134
+ query(".checkbox")
135
+ ], DSATableRow.prototype, "checkbox", 2);
136
+ __decorateClass([
137
+ query(".expand-button")
138
+ ], DSATableRow.prototype, "expandedButton", 2);
139
+ __decorateClass([
140
+ state()
141
+ ], DSATableRow.prototype, "showExpandButton", 2);
142
+ __decorateClass([
143
+ property({ reflect: true })
144
+ ], DSATableRow.prototype, "role", 2);
145
+ __decorateClass([
146
+ property({ reflect: true })
147
+ ], DSATableRow.prototype, "size", 2);
148
+ __decorateClass([
149
+ property({ type: Boolean, reflect: true })
150
+ ], DSATableRow.prototype, "selected", 2);
151
+ __decorateClass([
152
+ property({ type: Boolean, reflect: true })
153
+ ], DSATableRow.prototype, "expandable", 2);
154
+ __decorateClass([
155
+ property({ type: Boolean, reflect: true })
156
+ ], DSATableRow.prototype, "expanded", 2);
157
+ __decorateClass([
158
+ property({ attribute: "show-expanded-label" })
159
+ ], DSATableRow.prototype, "showExpandedLabel", 2);
160
+ __decorateClass([
161
+ property({ attribute: "hide-expanded-label" })
162
+ ], DSATableRow.prototype, "hideExpandedLabel", 2);
163
+ __decorateClass([
164
+ property({ attribute: "selection-label" })
165
+ ], DSATableRow.prototype, "selectionLabel", 2);
166
+ __decorateClass([
167
+ property({ attribute: "selection-name", reflect: true })
168
+ ], DSATableRow.prototype, "selectionName", 2);
169
+ __decorateClass([
170
+ property({ attribute: "selection-value" })
171
+ ], DSATableRow.prototype, "selectionValue", 2);
172
+ __decorateClass([
173
+ property({ type: Boolean, reflect: true })
174
+ ], DSATableRow.prototype, "loading", 2);
175
+ __decorateClass([
176
+ watch("expandable")
177
+ ], DSATableRow.prototype, "handleExpandableChange", 1);
178
+ __decorateClass([
179
+ watch("expanded")
180
+ ], DSATableRow.prototype, "handleExpandedChange", 1);
181
+ DSATableRow = __decorateClass([
182
+ customElement("dsa-table-row")
183
+ ], DSATableRow);
184
+
185
+ export {
186
+ DSATableRow
187
+ };
@@ -0,0 +1,168 @@
1
+ import {
2
+ header_search_styles_default
3
+ } from "./chunk.N5UMZAXE.js";
4
+ import {
5
+ LocalizeController
6
+ } from "./chunk.27JQOQHL.js";
7
+ import {
8
+ ShoelaceElement
9
+ } from "./chunk.YCXTCVAZ.js";
10
+ import {
11
+ __decorateClass
12
+ } from "./chunk.6M63UXML.js";
13
+
14
+ // src/components/header-search/header-search.ts
15
+ import { html } from "lit";
16
+ import { customElement, property, query, state } from "lit/decorators.js";
17
+ import { classMap } from "lit/directives/class-map.js";
18
+ import { live } from "lit/directives/live.js";
19
+ var DSAHeaderSearch = class extends ShoelaceElement {
20
+ constructor() {
21
+ super(...arguments);
22
+ this.localize = new LocalizeController(this);
23
+ this.hasFocus = false;
24
+ this.value = "";
25
+ this.expanded = false;
26
+ }
27
+ async handleExpandClick() {
28
+ this.emit("dsa-expand");
29
+ this.expanded = true;
30
+ await this.updateComplete;
31
+ this.input.focus();
32
+ }
33
+ handleChange() {
34
+ this.value = this.input.value;
35
+ this.emit("dsa-change");
36
+ }
37
+ handleInput() {
38
+ this.value = this.input.value;
39
+ this.emit("dsa-input");
40
+ }
41
+ handleInputFocus() {
42
+ this.hasFocus = true;
43
+ this.emit("dsa-focus");
44
+ }
45
+ handleInputBlur() {
46
+ this.hasFocus = false;
47
+ this.emit("dsa-blur");
48
+ }
49
+ handleClearClick(event) {
50
+ this.value = "";
51
+ this.emit("dsa-clear");
52
+ this.emit("dsa-input");
53
+ this.emit("dsa-change");
54
+ this.input.focus();
55
+ event.stopPropagation();
56
+ }
57
+ handleKeyDown(event) {
58
+ event.stopPropagation();
59
+ const hasModifier = event.metaKey || event.ctrlKey || event.shiftKey || event.altKey;
60
+ if (event.key === "Enter" && !hasModifier) {
61
+ setTimeout(() => {
62
+ if (!event.defaultPrevented && !event.isComposing) {
63
+ this.handleSubmitClick();
64
+ }
65
+ });
66
+ }
67
+ }
68
+ handleSubmitClick() {
69
+ this.emit("dsa-submit");
70
+ }
71
+ async handleCancelClick() {
72
+ this.emit("dsa-collapse");
73
+ this.expanded = false;
74
+ await this.updateComplete;
75
+ this.expandButton.focus();
76
+ }
77
+ render() {
78
+ if (!this.expanded) {
79
+ return html`
80
+ <button
81
+ aria-label=${this.localize.term("search")}
82
+ id="expand-button"
83
+ class="button button--navigation"
84
+ @click=${this.handleExpandClick}
85
+ >
86
+ <dsa-icon name="search"></dsa-icon>
87
+ <span class="expand-button__label"
88
+ >${this.localize.term("search")}</span
89
+ >
90
+ </button>
91
+ `;
92
+ }
93
+ return html`
94
+ <div class=${classMap({ input: true, "input--focused": this.hasFocus })}>
95
+ <input
96
+ class="input__control"
97
+ type="search"
98
+ placeholder=${this.localize.term("search")}
99
+ aria-label=${this.localize.term("search")}
100
+ .value=${live(this.value)}
101
+ @change=${this.handleChange}
102
+ @input=${this.handleInput}
103
+ @focus=${this.handleInputFocus}
104
+ @blur=${this.handleInputBlur}
105
+ @keydown=${this.handleKeyDown}
106
+ />
107
+ ${this.value.length > 0 ? html`
108
+ <dsa-icon-button
109
+ id="clear-button"
110
+ part="clear-button"
111
+ name="cancel"
112
+ label=${this.localize.term("clearEntry")}
113
+ @click=${this.handleClearClick}
114
+ ></dsa-icon-button>
115
+ ` : ""}
116
+ </div>
117
+
118
+ <button
119
+ class="icon-button icon-button--primary"
120
+ id="submit-button"
121
+ @click=${this.handleSubmitClick}
122
+ aria-label=${this.localize.term("search")}
123
+ >
124
+ <dsa-icon name="search"></dsa-icon>
125
+ </button>
126
+
127
+ <button
128
+ class="button button--tertiary"
129
+ id="cancel-button"
130
+ @click=${this.handleCancelClick}
131
+ >
132
+ ${this.localize.term("cancel")}
133
+ </button>
134
+ `;
135
+ }
136
+ };
137
+ DSAHeaderSearch.styles = header_search_styles_default;
138
+ __decorateClass([
139
+ query(".input__control")
140
+ ], DSAHeaderSearch.prototype, "input", 2);
141
+ __decorateClass([
142
+ query("#expand-button")
143
+ ], DSAHeaderSearch.prototype, "expandButton", 2);
144
+ __decorateClass([
145
+ query("#submit-button")
146
+ ], DSAHeaderSearch.prototype, "submitButton", 2);
147
+ __decorateClass([
148
+ query("#cancel-button")
149
+ ], DSAHeaderSearch.prototype, "cancelButton", 2);
150
+ __decorateClass([
151
+ query("#clear-button")
152
+ ], DSAHeaderSearch.prototype, "clearButton", 2);
153
+ __decorateClass([
154
+ state()
155
+ ], DSAHeaderSearch.prototype, "hasFocus", 2);
156
+ __decorateClass([
157
+ property()
158
+ ], DSAHeaderSearch.prototype, "value", 2);
159
+ __decorateClass([
160
+ property({ reflect: true, type: Boolean })
161
+ ], DSAHeaderSearch.prototype, "expanded", 2);
162
+ DSAHeaderSearch = __decorateClass([
163
+ customElement("dsa-header-search")
164
+ ], DSAHeaderSearch);
165
+
166
+ export {
167
+ DSAHeaderSearch
168
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  LocalizeController
3
- } from "./chunk.KZIAHLAV.js";
3
+ } from "./chunk.27JQOQHL.js";
4
4
  import {
5
5
  ShoelaceElement
6
6
  } from "./chunk.YCXTCVAZ.js";
@@ -0,0 +1,51 @@
1
+ import {
2
+ component_styles_default
3
+ } from "./chunk.TUVJKY7S.js";
4
+
5
+ // src/components/table/table-expanded-row/table-expanded-row.styles.ts
6
+ import { css } from "lit";
7
+ var table_expanded_row_styles_default = css`
8
+ ${component_styles_default}
9
+
10
+ :host {
11
+ display: table-row;
12
+ background: var(--dsa-wc-table-expanded-row-background);
13
+ block-size: 0px;
14
+ transition: var(--dsa-wc-table-expanded-row-transition);
15
+ }
16
+
17
+ :host([expanded]) {
18
+ block-size: var(--dsa-wc-table-expanded-row-height);
19
+ }
20
+
21
+ .expanded-row {
22
+ font: var(--dsa-wc-table-row-font);
23
+ color: var(--dsa-wc-table-row-color);
24
+ padding: 0px var(--dsa-wc-table-expanded-row-padding-x);
25
+
26
+ box-shadow: var(--dsa-wc-table-expanded-row-top-shadow),
27
+ var(--dsa-wc-table-expanded-row-bottom-shadow);
28
+ transition: var(--dsa-wc-table-expanded-row-transition);
29
+ inline-size: 100%;
30
+ }
31
+
32
+ :host([expanded]) .expanded-row {
33
+ padding: var(--dsa-wc-table-expanded-row-padding-y)
34
+ var(--dsa-wc-table-expanded-row-padding-x);
35
+ }
36
+
37
+ .expanded-row div {
38
+ display: none;
39
+ overflow: hidden;
40
+ block-size: 0px;
41
+ }
42
+
43
+ :host([expanded]) .expanded-row div {
44
+ display: block;
45
+ block-size: auto;
46
+ }
47
+ `;
48
+
49
+ export {
50
+ table_expanded_row_styles_default
51
+ };
@@ -13,6 +13,7 @@ var icon_button_styles_default = css`
13
13
  var(--dsa-wc-icon-button-padding)
14
14
  );
15
15
  display: inline-block;
16
+ position: relative;
16
17
  }
17
18
 
18
19
  .icon-button {
@@ -167,21 +168,40 @@ var icon_button_styles_default = css`
167
168
  border-color: transparent;
168
169
  color: var(--dsa-wc-button-navigation-on-base-font-color);
169
170
  }
170
- .icon-button--default:hover:not(.button--disabled) {
171
+ .icon-button--default:hover:not(.icon-button--disabled) {
171
172
  background-color: var(--dsa-wc-button-navigation-on-base-hover-color);
172
173
  border-color: transparent;
173
174
  color: var(--dsa-wc-button-navigation-on-base-hover-font-color);
174
175
  }
175
- .icon-button--default:active:not(.button--disabled) {
176
+ .icon-button--default:active:not(.icon-button--disabled) {
176
177
  background-color: var(--dsa-wc-button-navigation-on-base-active-color);
177
178
  border-color: transparent;
178
179
  color: var(--dsa-wc-button-navigation-on-base-active-font-color);
179
180
  }
180
- .icon-button--default.button--disabled {
181
+ .icon-button--default.icon-button--disabled {
181
182
  background-color: var(--dsa-wc-button-navigation-on-base-disabled-color);
182
183
  border-color: transparent;
183
184
  color: var(--dsa-wc-button-navigation-on-base-disabled-font-color);
184
185
  }
186
+
187
+ /*
188
+ * Badges
189
+ */
190
+
191
+ .icon-button ::slotted(dsa-badge) {
192
+ position: absolute;
193
+ translate: 50% -50%;
194
+ pointer-events: none;
195
+ }
196
+ :not(.icon-button--tertiary):not(.icon-button--default) ::slotted(dsa-badge) {
197
+ top: 0;
198
+ right: 0;
199
+ }
200
+ .icon-button--tertiary ::slotted(dsa-badge),
201
+ .icon-button--default ::slotted(dsa-badge) {
202
+ top: var(--padding);
203
+ right: var(--padding);
204
+ }
185
205
  `;
186
206
 
187
207
  export {
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk.NHRDZGLI.js";
4
4
  import {
5
5
  DSAIcon
6
- } from "./chunk.V7MYOBN4.js";
6
+ } from "./chunk.QZTW3WMM.js";
7
7
  import {
8
8
  watch
9
9
  } from "./chunk.6IH66JBY.js";
@@ -1,10 +1,10 @@
1
+ import {
2
+ input_styles_default
3
+ } from "./chunk.2AEUQXKH.js";
1
4
  import {
2
5
  getOverridenIconDetails,
3
6
  isPrefixIconOverriden
4
7
  } from "./chunk.KBT2EKLF.js";
5
- import {
6
- input_styles_default
7
- } from "./chunk.2AEUQXKH.js";
8
8
  import {
9
9
  defaultValue
10
10
  } from "./chunk.CMJ2SRTL.js";
@@ -16,7 +16,7 @@ import {
16
16
  } from "./chunk.YIY5RM53.js";
17
17
  import {
18
18
  LocalizeController
19
- } from "./chunk.KZIAHLAV.js";
19
+ } from "./chunk.27JQOQHL.js";
20
20
  import {
21
21
  watch
22
22
  } from "./chunk.6IH66JBY.js";
@@ -0,0 +1,31 @@
1
+ // src/components/input-phone/input-phone.configs.ts
2
+ var NationalFrenchPhoneConfig = {
3
+ placeholder: "_ __ __ __ __",
4
+ mask: "# ## ## ## ##",
5
+ pattern: "^((\\+)33|(\\+)262|(\\+)590|(\\+)594|(\\+)596)[1-9](\\d{2}){4}$"
6
+ };
7
+ var SixNumbersPhoneConfig = {
8
+ placeholder: "__ __ __",
9
+ mask: "## ## ##",
10
+ pattern: "^((\\+)508|(\\+)681|(\\+)687|(\\+)689)(\\d{2}){3}$"
11
+ };
12
+ function getPhoneConfig(phonePrefix) {
13
+ switch (phonePrefix) {
14
+ case "+508":
15
+ case "+681":
16
+ case "+687":
17
+ case "+689":
18
+ return SixNumbersPhoneConfig;
19
+ case "+33":
20
+ case "+262":
21
+ case "+590":
22
+ case "+594":
23
+ case "+596":
24
+ default:
25
+ return NationalFrenchPhoneConfig;
26
+ }
27
+ }
28
+
29
+ export {
30
+ getPhoneConfig
31
+ };