wcs-core 4.2.0 → 5.0.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 (541) hide show
  1. package/dist/cjs/{accessibility-e99b032d.js → accessibility-c0c4e648.js} +8 -2
  2. package/dist/cjs/accessibility-c0c4e648.js.map +1 -0
  3. package/dist/cjs/button-interface-044a8a8a.js +12 -0
  4. package/dist/cjs/button-interface-044a8a8a.js.map +1 -0
  5. package/dist/cjs/grid-pagination-3511fdfa.js +111 -0
  6. package/dist/cjs/grid-pagination-3511fdfa.js.map +1 -0
  7. package/dist/cjs/{helpers-4a14051a.js → helpers-6280db6e.js} +75 -2
  8. package/dist/cjs/helpers-6280db6e.js.map +1 -0
  9. package/dist/cjs/{index-ca67a6dc.js → index-749d999e.js} +4 -1
  10. package/dist/cjs/index-749d999e.js.map +1 -0
  11. package/dist/cjs/{isEqual-9ea7ee49.js → keyboard-event-1cad4036.js} +77 -1
  12. package/dist/cjs/keyboard-event-1cad4036.js.map +1 -0
  13. package/dist/cjs/loader.cjs.js +2 -2
  14. package/dist/cjs/{select-arrow-c9583ea9.js → select-arrow-8169c0cb.js} +2 -2
  15. package/dist/cjs/{select-arrow-c9583ea9.js.map → select-arrow-8169c0cb.js.map} +1 -1
  16. package/dist/cjs/wcs-accordion-content.cjs.entry.js +1 -1
  17. package/dist/cjs/wcs-accordion-header.cjs.entry.js +1 -1
  18. package/dist/cjs/wcs-accordion-panel.cjs.entry.js +2 -2
  19. package/dist/cjs/wcs-accordion.cjs.entry.js +1 -1
  20. package/dist/cjs/wcs-action-bar.cjs.entry.js +1 -1
  21. package/dist/cjs/wcs-app.cjs.entry.js +1 -1
  22. package/dist/cjs/wcs-badge.cjs.entry.js +3 -2
  23. package/dist/cjs/wcs-badge.cjs.entry.js.map +1 -1
  24. package/dist/cjs/{wcs-button.cjs.entry.js → wcs-button_2.cjs.entry.js} +21 -12
  25. package/dist/cjs/wcs-button_2.cjs.entry.js.map +1 -0
  26. package/dist/cjs/wcs-card-body.cjs.entry.js +1 -1
  27. package/dist/cjs/wcs-card.cjs.entry.js +1 -1
  28. package/dist/cjs/wcs-checkbox.cjs.entry.js +5 -2
  29. package/dist/cjs/wcs-checkbox.cjs.entry.js.map +1 -1
  30. package/dist/cjs/wcs-com-nav-category.cjs.entry.js +2 -2
  31. package/dist/cjs/wcs-com-nav-submenu.cjs.entry.js +2 -2
  32. package/dist/cjs/wcs-com-nav.cjs.entry.js +2 -2
  33. package/dist/cjs/wcs-counter.cjs.entry.js +16 -6
  34. package/dist/cjs/wcs-counter.cjs.entry.js.map +1 -1
  35. package/dist/cjs/wcs-divider.cjs.entry.js +1 -1
  36. package/dist/cjs/wcs-dropdown-divider.cjs.entry.js +1 -1
  37. package/dist/cjs/wcs-dropdown-divider.cjs.entry.js.map +1 -1
  38. package/dist/cjs/wcs-dropdown-header.cjs.entry.js +1 -1
  39. package/dist/cjs/wcs-dropdown-header.cjs.entry.js.map +1 -1
  40. package/dist/cjs/wcs-dropdown-item.cjs.entry.js +2 -2
  41. package/dist/cjs/wcs-dropdown-item.cjs.entry.js.map +1 -1
  42. package/dist/cjs/wcs-dropdown.cjs.entry.js +12 -6
  43. package/dist/cjs/wcs-dropdown.cjs.entry.js.map +1 -1
  44. package/dist/cjs/wcs-editable-field.cjs.entry.js +18 -3
  45. package/dist/cjs/wcs-editable-field.cjs.entry.js.map +1 -1
  46. package/dist/cjs/wcs-error_2.cjs.entry.js +36 -2
  47. package/dist/cjs/wcs-error_2.cjs.entry.js.map +1 -1
  48. package/dist/cjs/wcs-field-content.cjs.entry.js +1 -1
  49. package/dist/cjs/wcs-field-label.cjs.entry.js +1 -1
  50. package/dist/cjs/wcs-field.cjs.entry.js +1 -1
  51. package/dist/cjs/wcs-footer.cjs.entry.js +1 -1
  52. package/dist/cjs/wcs-galactic-menu.cjs.entry.js +2 -2
  53. package/dist/cjs/wcs-galactic.cjs.entry.js +1 -1
  54. package/dist/cjs/wcs-grid-column.cjs.entry.js +25 -4
  55. package/dist/cjs/wcs-grid-column.cjs.entry.js.map +1 -1
  56. package/dist/cjs/wcs-grid-custom-cell.cjs.entry.js +1 -1
  57. package/dist/cjs/wcs-grid-pagination.cjs.entry.js +2 -2
  58. package/dist/cjs/wcs-grid.cjs.entry.js +320 -65
  59. package/dist/cjs/wcs-grid.cjs.entry.js.map +1 -1
  60. package/dist/cjs/wcs-header.cjs.entry.js +1 -1
  61. package/dist/cjs/wcs-hint.cjs.entry.js +1 -1
  62. package/dist/cjs/wcs-horizontal-stepper.cjs.entry.js +1 -1
  63. package/dist/cjs/wcs-icon.cjs.entry.js +1 -1
  64. package/dist/cjs/wcs-input.cjs.entry.js +15 -15
  65. package/dist/cjs/wcs-input.cjs.entry.js.map +1 -1
  66. package/dist/cjs/wcs-label.cjs.entry.js +1 -1
  67. package/dist/cjs/wcs-label.cjs.entry.js.map +1 -1
  68. package/dist/cjs/wcs-list-item-properties.cjs.entry.js +1 -1
  69. package/dist/cjs/wcs-list-item-property.cjs.entry.js +1 -1
  70. package/dist/cjs/wcs-list-item.cjs.entry.js +1 -1
  71. package/dist/cjs/wcs-mat-icon.cjs.entry.js +2 -2
  72. package/dist/cjs/wcs-mat-icon.cjs.entry.js.map +1 -1
  73. package/dist/cjs/wcs-modal.cjs.entry.js +35 -5
  74. package/dist/cjs/wcs-modal.cjs.entry.js.map +1 -1
  75. package/dist/cjs/wcs-native-select.cjs.entry.js +6 -3
  76. package/dist/cjs/wcs-native-select.cjs.entry.js.map +1 -1
  77. package/dist/cjs/wcs-nav-item.cjs.entry.js +2 -2
  78. package/dist/cjs/wcs-nav.cjs.entry.js +1 -1
  79. package/dist/cjs/wcs-progress-bar.cjs.entry.js +4 -6
  80. package/dist/cjs/wcs-progress-bar.cjs.entry.js.map +1 -1
  81. package/dist/cjs/wcs-progress-radial.cjs.entry.js +14 -6
  82. package/dist/cjs/wcs-progress-radial.cjs.entry.js.map +1 -1
  83. package/dist/cjs/wcs-radio-group.cjs.entry.js +22 -15
  84. package/dist/cjs/wcs-radio-group.cjs.entry.js.map +1 -1
  85. package/dist/cjs/wcs-radio.cjs.entry.js +14 -7
  86. package/dist/cjs/wcs-radio.cjs.entry.js.map +1 -1
  87. package/dist/cjs/wcs-select_2.cjs.entry.js +603 -111
  88. package/dist/cjs/wcs-select_2.cjs.entry.js.map +1 -1
  89. package/dist/cjs/wcs-skeleton-circle.cjs.entry.js +1 -1
  90. package/dist/cjs/wcs-skeleton-rectangle.cjs.entry.js +1 -1
  91. package/dist/cjs/wcs-skeleton-text.cjs.entry.js +1 -1
  92. package/dist/cjs/wcs-switch.cjs.entry.js +5 -2
  93. package/dist/cjs/wcs-switch.cjs.entry.js.map +1 -1
  94. package/dist/cjs/wcs-tab.cjs.entry.js +4 -1
  95. package/dist/cjs/wcs-tab.cjs.entry.js.map +1 -1
  96. package/dist/cjs/wcs-tabs.cjs.entry.js +4 -4
  97. package/dist/cjs/wcs-tabs.cjs.entry.js.map +1 -1
  98. package/dist/cjs/wcs-textarea.cjs.entry.js +13 -11
  99. package/dist/cjs/wcs-textarea.cjs.entry.js.map +1 -1
  100. package/dist/cjs/wcs-tooltip.cjs.entry.js +1 -1
  101. package/dist/cjs/wcs.cjs.js +2 -2
  102. package/dist/collection/components/badge/badge-interface.js.map +1 -1
  103. package/dist/collection/components/badge/badge.css +19 -1
  104. package/dist/collection/components/badge/badge.js +24 -0
  105. package/dist/collection/components/badge/badge.js.map +1 -1
  106. package/dist/collection/components/button/button.css +1 -1
  107. package/dist/collection/components/checkbox/checkbox.js +34 -1
  108. package/dist/collection/components/checkbox/checkbox.js.map +1 -1
  109. package/dist/collection/components/counter/counter.css +6 -1
  110. package/dist/collection/components/counter/counter.js +61 -3
  111. package/dist/collection/components/counter/counter.js.map +1 -1
  112. package/dist/collection/components/dropdown/dropdown.css +15 -4
  113. package/dist/collection/components/dropdown/dropdown.js +37 -1
  114. package/dist/collection/components/dropdown/dropdown.js.map +1 -1
  115. package/dist/collection/components/dropdown-divider/dropdown-divider.js +3 -0
  116. package/dist/collection/components/dropdown-divider/dropdown-divider.js.map +1 -1
  117. package/dist/collection/components/dropdown-header/dropdown-header.js +4 -0
  118. package/dist/collection/components/dropdown-header/dropdown-header.js.map +1 -1
  119. package/dist/collection/components/dropdown-item/dropdown-item.js +5 -1
  120. package/dist/collection/components/dropdown-item/dropdown-item.js.map +1 -1
  121. package/dist/collection/components/editable-field/editable-field.js +17 -2
  122. package/dist/collection/components/editable-field/editable-field.js.map +1 -1
  123. package/dist/collection/components/error/error.js +1 -1
  124. package/dist/collection/components/error/error.js.map +1 -1
  125. package/dist/collection/components/form-field/form-field.js +31 -0
  126. package/dist/collection/components/form-field/form-field.js.map +1 -1
  127. package/dist/collection/components/grid/grid-interface.js.map +1 -1
  128. package/dist/collection/components/grid/grid-keyboard-event.js +52 -0
  129. package/dist/collection/components/grid/grid-keyboard-event.js.map +1 -0
  130. package/dist/collection/components/grid/grid.css +5 -0
  131. package/dist/collection/components/grid/grid.js +265 -29
  132. package/dist/collection/components/grid/grid.js.map +1 -1
  133. package/dist/collection/components/grid-column/grid-column.css +5 -0
  134. package/dist/collection/components/grid-column/grid-column.js +60 -1
  135. package/dist/collection/components/grid-column/grid-column.js.map +1 -1
  136. package/dist/collection/components/grid-column/grid-sort-arrow.js +1 -1
  137. package/dist/collection/components/grid-column/grid-sort-arrow.js.map +1 -1
  138. package/dist/collection/components/grid-pagination/grid-pagination-arrow.js +32 -23
  139. package/dist/collection/components/grid-pagination/grid-pagination-arrow.js.map +1 -1
  140. package/dist/collection/components/grid-pagination/grid-pagination.css +17 -0
  141. package/dist/collection/components/grid-pagination/grid-pagination.js +1 -1
  142. package/dist/collection/components/grid-pagination/grid-pagination.js.map +1 -1
  143. package/dist/collection/components/input/input.js +64 -28
  144. package/dist/collection/components/input/input.js.map +1 -1
  145. package/dist/collection/components/label/label.js.map +1 -1
  146. package/dist/collection/components/mat-icon/mat-icon.js +1 -1
  147. package/dist/collection/components/mat-icon/mat-icon.js.map +1 -1
  148. package/dist/collection/components/modal/modal.css +2 -2
  149. package/dist/collection/components/modal/modal.js +73 -2
  150. package/dist/collection/components/modal/modal.js.map +1 -1
  151. package/dist/collection/components/native-select/native-select.css +6 -5
  152. package/dist/collection/components/native-select/native-select.js +29 -0
  153. package/dist/collection/components/native-select/native-select.js.map +1 -1
  154. package/dist/collection/components/progress-bar/progress-bar.css +12 -11
  155. package/dist/collection/components/progress-bar/progress-bar.js +22 -13
  156. package/dist/collection/components/progress-bar/progress-bar.js.map +1 -1
  157. package/dist/collection/components/progress-radial/progress-radial.css +5 -0
  158. package/dist/collection/components/progress-radial/progress-radial.js +18 -7
  159. package/dist/collection/components/progress-radial/progress-radial.js.map +1 -1
  160. package/dist/collection/components/radio/radio.css +8 -16
  161. package/dist/collection/components/radio/radio.js +12 -5
  162. package/dist/collection/components/radio/radio.js.map +1 -1
  163. package/dist/collection/components/radio-group/radio-group.js +50 -13
  164. package/dist/collection/components/radio-group/radio-group.js.map +1 -1
  165. package/dist/collection/components/select/select-interface.js +10 -0
  166. package/dist/collection/components/select/select-interface.js.map +1 -1
  167. package/dist/collection/components/select/select-keyboard-event.js +306 -0
  168. package/dist/collection/components/select/select-keyboard-event.js.map +1 -0
  169. package/dist/collection/components/select/select.css +59 -6
  170. package/dist/collection/components/select/select.js +435 -111
  171. package/dist/collection/components/select/select.js.map +1 -1
  172. package/dist/collection/components/select-option/select-option.css +15 -0
  173. package/dist/collection/components/select-option/select-option.js +30 -5
  174. package/dist/collection/components/select-option/select-option.js.map +1 -1
  175. package/dist/collection/components/switch/switch.js +34 -1
  176. package/dist/collection/components/switch/switch.js.map +1 -1
  177. package/dist/collection/components/tab/tab.css +7 -0
  178. package/dist/collection/components/tab/tab.js +11 -1
  179. package/dist/collection/components/tab/tab.js.map +1 -1
  180. package/dist/collection/components/tabs/tabs.js +7 -3
  181. package/dist/collection/components/tabs/tabs.js.map +1 -1
  182. package/dist/collection/components/textarea/textarea.css +8 -3
  183. package/dist/collection/components/textarea/textarea.js +41 -12
  184. package/dist/collection/components/textarea/textarea.js.map +1 -1
  185. package/dist/collection/utils/accessibility.js +7 -1
  186. package/dist/collection/utils/accessibility.js.map +1 -1
  187. package/dist/collection/utils/helpers.js +76 -1
  188. package/dist/collection/utils/helpers.js.map +1 -1
  189. package/dist/collection/utils/keyboard-event.js +74 -0
  190. package/dist/collection/utils/keyboard-event.js.map +1 -0
  191. package/dist/collection/utils/mutable-aria-attribute.js +4 -0
  192. package/dist/collection/utils/mutable-aria-attribute.js.map +1 -0
  193. package/dist/esm/{accessibility-ffa12842.js → accessibility-64feea8a.js} +8 -2
  194. package/dist/esm/accessibility-64feea8a.js.map +1 -0
  195. package/dist/esm/button-interface-c21c265f.js +9 -0
  196. package/dist/esm/button-interface-c21c265f.js.map +1 -0
  197. package/dist/esm/grid-pagination-f7b01e2e.js +109 -0
  198. package/dist/esm/grid-pagination-f7b01e2e.js.map +1 -0
  199. package/dist/esm/{helpers-1d55b67f.js → helpers-a21ae7d0.js} +75 -3
  200. package/dist/esm/helpers-a21ae7d0.js.map +1 -0
  201. package/dist/esm/{index-dc4d96d4.js → index-4f282598.js} +4 -1
  202. package/dist/esm/index-4f282598.js.map +1 -0
  203. package/dist/esm/{isEqual-20881bca.js → keyboard-event-ba3d20e7.js} +77 -2
  204. package/dist/esm/keyboard-event-ba3d20e7.js.map +1 -0
  205. package/dist/esm/loader.js +3 -3
  206. package/dist/esm/{select-arrow-81d069f7.js → select-arrow-28e8687b.js} +2 -2
  207. package/dist/esm/{select-arrow-81d069f7.js.map → select-arrow-28e8687b.js.map} +1 -1
  208. package/dist/esm/wcs-accordion-content.entry.js +1 -1
  209. package/dist/esm/wcs-accordion-header.entry.js +1 -1
  210. package/dist/esm/wcs-accordion-panel.entry.js +2 -2
  211. package/dist/esm/wcs-accordion.entry.js +1 -1
  212. package/dist/esm/wcs-action-bar.entry.js +1 -1
  213. package/dist/esm/wcs-app.entry.js +1 -1
  214. package/dist/esm/wcs-badge.entry.js +3 -2
  215. package/dist/esm/wcs-badge.entry.js.map +1 -1
  216. package/dist/esm/{wcs-button.entry.js → wcs-button_2.entry.js} +19 -11
  217. package/dist/esm/wcs-button_2.entry.js.map +1 -0
  218. package/dist/esm/wcs-card-body.entry.js +1 -1
  219. package/dist/esm/wcs-card.entry.js +1 -1
  220. package/dist/esm/wcs-checkbox.entry.js +5 -2
  221. package/dist/esm/wcs-checkbox.entry.js.map +1 -1
  222. package/dist/esm/wcs-com-nav-category.entry.js +2 -2
  223. package/dist/esm/wcs-com-nav-submenu.entry.js +2 -2
  224. package/dist/esm/wcs-com-nav.entry.js +2 -2
  225. package/dist/esm/wcs-counter.entry.js +16 -6
  226. package/dist/esm/wcs-counter.entry.js.map +1 -1
  227. package/dist/esm/wcs-divider.entry.js +1 -1
  228. package/dist/esm/wcs-dropdown-divider.entry.js +1 -1
  229. package/dist/esm/wcs-dropdown-divider.entry.js.map +1 -1
  230. package/dist/esm/wcs-dropdown-header.entry.js +1 -1
  231. package/dist/esm/wcs-dropdown-header.entry.js.map +1 -1
  232. package/dist/esm/wcs-dropdown-item.entry.js +2 -2
  233. package/dist/esm/wcs-dropdown-item.entry.js.map +1 -1
  234. package/dist/esm/wcs-dropdown.entry.js +12 -6
  235. package/dist/esm/wcs-dropdown.entry.js.map +1 -1
  236. package/dist/esm/wcs-editable-field.entry.js +18 -3
  237. package/dist/esm/wcs-editable-field.entry.js.map +1 -1
  238. package/dist/esm/wcs-error_2.entry.js +36 -2
  239. package/dist/esm/wcs-error_2.entry.js.map +1 -1
  240. package/dist/esm/wcs-field-content.entry.js +1 -1
  241. package/dist/esm/wcs-field-label.entry.js +1 -1
  242. package/dist/esm/wcs-field.entry.js +1 -1
  243. package/dist/esm/wcs-footer.entry.js +1 -1
  244. package/dist/esm/wcs-galactic-menu.entry.js +2 -2
  245. package/dist/esm/wcs-galactic.entry.js +1 -1
  246. package/dist/esm/wcs-grid-column.entry.js +25 -4
  247. package/dist/esm/wcs-grid-column.entry.js.map +1 -1
  248. package/dist/esm/wcs-grid-custom-cell.entry.js +1 -1
  249. package/dist/esm/wcs-grid-pagination.entry.js +2 -2
  250. package/dist/esm/wcs-grid.entry.js +282 -27
  251. package/dist/esm/wcs-grid.entry.js.map +1 -1
  252. package/dist/esm/wcs-header.entry.js +1 -1
  253. package/dist/esm/wcs-hint.entry.js +1 -1
  254. package/dist/esm/wcs-horizontal-stepper.entry.js +1 -1
  255. package/dist/esm/wcs-icon.entry.js +1 -1
  256. package/dist/esm/wcs-input.entry.js +15 -15
  257. package/dist/esm/wcs-input.entry.js.map +1 -1
  258. package/dist/esm/wcs-label.entry.js +1 -1
  259. package/dist/esm/wcs-label.entry.js.map +1 -1
  260. package/dist/esm/wcs-list-item-properties.entry.js +1 -1
  261. package/dist/esm/wcs-list-item-property.entry.js +1 -1
  262. package/dist/esm/wcs-list-item.entry.js +1 -1
  263. package/dist/esm/wcs-mat-icon.entry.js +2 -2
  264. package/dist/esm/wcs-mat-icon.entry.js.map +1 -1
  265. package/dist/esm/wcs-modal.entry.js +35 -5
  266. package/dist/esm/wcs-modal.entry.js.map +1 -1
  267. package/dist/esm/wcs-native-select.entry.js +6 -3
  268. package/dist/esm/wcs-native-select.entry.js.map +1 -1
  269. package/dist/esm/wcs-nav-item.entry.js +2 -2
  270. package/dist/esm/wcs-nav.entry.js +1 -1
  271. package/dist/esm/wcs-progress-bar.entry.js +4 -6
  272. package/dist/esm/wcs-progress-bar.entry.js.map +1 -1
  273. package/dist/esm/wcs-progress-radial.entry.js +14 -6
  274. package/dist/esm/wcs-progress-radial.entry.js.map +1 -1
  275. package/dist/esm/wcs-radio-group.entry.js +22 -15
  276. package/dist/esm/wcs-radio-group.entry.js.map +1 -1
  277. package/dist/esm/wcs-radio.entry.js +14 -7
  278. package/dist/esm/wcs-radio.entry.js.map +1 -1
  279. package/dist/esm/wcs-select_2.entry.js +602 -110
  280. package/dist/esm/wcs-select_2.entry.js.map +1 -1
  281. package/dist/esm/wcs-skeleton-circle.entry.js +1 -1
  282. package/dist/esm/wcs-skeleton-rectangle.entry.js +1 -1
  283. package/dist/esm/wcs-skeleton-text.entry.js +1 -1
  284. package/dist/esm/wcs-switch.entry.js +5 -2
  285. package/dist/esm/wcs-switch.entry.js.map +1 -1
  286. package/dist/esm/wcs-tab.entry.js +4 -1
  287. package/dist/esm/wcs-tab.entry.js.map +1 -1
  288. package/dist/esm/wcs-tabs.entry.js +4 -4
  289. package/dist/esm/wcs-tabs.entry.js.map +1 -1
  290. package/dist/esm/wcs-textarea.entry.js +13 -11
  291. package/dist/esm/wcs-textarea.entry.js.map +1 -1
  292. package/dist/esm/wcs-tooltip.entry.js +1 -1
  293. package/dist/esm/wcs.js +3 -3
  294. package/dist/types/components/badge/badge-interface.d.ts +2 -0
  295. package/dist/types/components/badge/badge.d.ts +5 -1
  296. package/dist/types/components/checkbox/checkbox.d.ts +4 -1
  297. package/dist/types/components/counter/counter.d.ts +8 -1
  298. package/dist/types/components/dropdown/dropdown.d.ts +10 -1
  299. package/dist/types/components/dropdown-divider/dropdown-divider.d.ts +3 -0
  300. package/dist/types/components/dropdown-header/dropdown-header.d.ts +4 -0
  301. package/dist/types/components/dropdown-item/dropdown-item.d.ts +7 -0
  302. package/dist/types/components/editable-field/editable-field.d.ts +7 -0
  303. package/dist/types/components/form-field/form-field.d.ts +4 -0
  304. package/dist/types/components/grid/grid-interface.d.ts +14 -2
  305. package/dist/types/components/grid/grid-keyboard-event.d.ts +16 -0
  306. package/dist/types/components/grid/grid.d.ts +59 -4
  307. package/dist/types/components/grid-column/grid-column.d.ts +17 -0
  308. package/dist/types/components/input/input.d.ts +40 -17
  309. package/dist/types/components/modal/modal.d.ts +37 -1
  310. package/dist/types/components/native-select/native-select.d.ts +3 -1
  311. package/dist/types/components/progress-bar/progress-bar.d.ts +8 -3
  312. package/dist/types/components/progress-radial/progress-radial.d.ts +12 -0
  313. package/dist/types/components/radio/radio.d.ts +3 -0
  314. package/dist/types/components/radio-group/radio-group.d.ts +3 -1
  315. package/dist/types/components/select/select-interface.d.ts +12 -0
  316. package/dist/types/components/select/select-keyboard-event.d.ts +38 -0
  317. package/dist/types/components/select/select.d.ts +76 -15
  318. package/dist/types/components/select-option/select-option.d.ts +10 -4
  319. package/dist/types/components/switch/switch.d.ts +4 -1
  320. package/dist/types/components/tab/tab.d.ts +3 -0
  321. package/dist/types/components/tabs/tabs.d.ts +4 -0
  322. package/dist/types/components/textarea/textarea.d.ts +8 -4
  323. package/dist/types/components.d.ts +357 -55
  324. package/dist/types/utils/accessibility.d.ts +4 -0
  325. package/dist/types/utils/helpers.d.ts +12 -1
  326. package/dist/types/utils/keyboard-event.d.ts +13 -0
  327. package/dist/types/utils/mutable-aria-attribute.d.ts +5 -0
  328. package/dist/wcs/{p-7a3f70da.entry.js → p-00f6a79a.entry.js} +2 -2
  329. package/dist/wcs/{p-ee453b6e.entry.js → p-016e4dd9.entry.js} +2 -2
  330. package/dist/wcs/p-0ae177cf.js +2 -0
  331. package/dist/wcs/p-0ae177cf.js.map +1 -0
  332. package/dist/wcs/{p-f06f48f3.entry.js → p-0d02d9e4.entry.js} +2 -2
  333. package/dist/wcs/p-0d02d9e4.entry.js.map +1 -0
  334. package/dist/wcs/{p-30d8f9c3.entry.js → p-11ab4ffc.entry.js} +2 -2
  335. package/dist/wcs/p-13548191.entry.js +2 -0
  336. package/dist/wcs/p-13548191.entry.js.map +1 -0
  337. package/dist/wcs/p-13ffe5f3.entry.js +2 -0
  338. package/dist/wcs/p-13ffe5f3.entry.js.map +1 -0
  339. package/dist/wcs/{p-dfddec76.entry.js → p-17442a2f.entry.js} +2 -2
  340. package/dist/wcs/p-1d49a02e.entry.js +2 -0
  341. package/dist/wcs/p-1d49a02e.entry.js.map +1 -0
  342. package/dist/wcs/{p-d6c3e615.js → p-24611014.js} +2 -2
  343. package/dist/wcs/p-250b3794.entry.js +2 -0
  344. package/dist/wcs/{p-91b3e4b5.entry.js.map → p-250b3794.entry.js.map} +1 -1
  345. package/dist/wcs/{p-292ca644.entry.js → p-2d62b3dd.entry.js} +2 -2
  346. package/dist/wcs/{p-d6b3f742.entry.js → p-33a5594d.entry.js} +2 -2
  347. package/dist/wcs/p-33a570ee.js +2 -0
  348. package/dist/wcs/p-33a570ee.js.map +1 -0
  349. package/dist/wcs/{p-e86c6cbb.entry.js → p-34079054.entry.js} +2 -2
  350. package/dist/wcs/{p-e86c6cbb.entry.js.map → p-34079054.entry.js.map} +1 -1
  351. package/dist/wcs/{p-257b15b9.entry.js → p-36e83879.entry.js} +2 -2
  352. package/dist/wcs/p-44410e32.entry.js +2 -0
  353. package/dist/wcs/p-44410e32.entry.js.map +1 -0
  354. package/dist/wcs/{p-7269272f.entry.js → p-46184d47.entry.js} +2 -2
  355. package/dist/wcs/p-46975b1e.entry.js +2 -0
  356. package/dist/wcs/p-46975b1e.entry.js.map +1 -0
  357. package/dist/wcs/{p-4a9f8e94.entry.js → p-46d56c4e.entry.js} +3 -3
  358. package/dist/wcs/{p-fc3f5b53.entry.js → p-4820154c.entry.js} +2 -2
  359. package/dist/wcs/p-49b0de03.entry.js +2 -0
  360. package/dist/wcs/p-49b0de03.entry.js.map +1 -0
  361. package/dist/wcs/{p-ff9967eb.entry.js → p-4af68f13.entry.js} +2 -2
  362. package/dist/wcs/{p-1f8c73eb.entry.js → p-5f0ab1dc.entry.js} +2 -2
  363. package/dist/wcs/p-5f0ab1dc.entry.js.map +1 -0
  364. package/dist/wcs/p-5f3e6b0c.entry.js +2 -0
  365. package/dist/wcs/p-5f3e6b0c.entry.js.map +1 -0
  366. package/dist/wcs/{p-50dce764.entry.js → p-61b934a7.entry.js} +2 -2
  367. package/dist/wcs/p-64855188.js +2 -0
  368. package/dist/wcs/p-64855188.js.map +1 -0
  369. package/dist/wcs/p-680b107c.entry.js +2 -0
  370. package/dist/wcs/p-68d654da.js +2 -0
  371. package/dist/wcs/p-68d654da.js.map +1 -0
  372. package/dist/wcs/p-69d1223c.js +3 -0
  373. package/dist/wcs/p-69d1223c.js.map +1 -0
  374. package/dist/wcs/p-6f538b67.entry.js +2 -0
  375. package/dist/wcs/p-6f538b67.entry.js.map +1 -0
  376. package/dist/wcs/p-7c145ed0.entry.js +2 -0
  377. package/dist/wcs/p-7c145ed0.entry.js.map +1 -0
  378. package/dist/wcs/p-8724a296.entry.js +2 -0
  379. package/dist/wcs/p-8724a296.entry.js.map +1 -0
  380. package/dist/wcs/{p-d084dd61.entry.js → p-88b1cdfe.entry.js} +2 -2
  381. package/dist/wcs/{p-c7494651.entry.js → p-8ff7e463.entry.js} +2 -2
  382. package/dist/wcs/p-90a7fd68.entry.js +2 -0
  383. package/dist/wcs/p-90a7fd68.entry.js.map +1 -0
  384. package/dist/wcs/{p-cfcacc44.entry.js → p-914aa964.entry.js} +2 -2
  385. package/dist/wcs/p-93fcef08.entry.js +2 -0
  386. package/dist/wcs/p-93fcef08.entry.js.map +1 -0
  387. package/dist/wcs/{p-429bd9fb.entry.js → p-9b1c73b3.entry.js} +2 -2
  388. package/dist/wcs/p-9cc48d75.js +2 -0
  389. package/dist/wcs/p-9cc48d75.js.map +1 -0
  390. package/dist/wcs/p-a3518f66.entry.js +2 -0
  391. package/dist/wcs/p-a361d9f1.entry.js +2 -0
  392. package/dist/wcs/{p-31a8d23f.entry.js → p-a85208ca.entry.js} +2 -2
  393. package/dist/wcs/{p-d3f1cafe.entry.js → p-b91323fc.entry.js} +2 -2
  394. package/dist/wcs/{p-47d8ece5.entry.js → p-bd4029f8.entry.js} +2 -2
  395. package/dist/wcs/{p-e348058b.entry.js → p-bed4e3ce.entry.js} +2 -2
  396. package/dist/wcs/{p-f489793d.entry.js → p-c261353f.entry.js} +2 -2
  397. package/dist/wcs/p-c261353f.entry.js.map +1 -0
  398. package/dist/wcs/p-c3227f01.entry.js +2 -0
  399. package/dist/wcs/p-c3227f01.entry.js.map +1 -0
  400. package/dist/wcs/{p-810aff71.entry.js → p-c38adf4b.entry.js} +2 -2
  401. package/dist/wcs/{p-2185bf8b.entry.js → p-c6a8c6f9.entry.js} +2 -2
  402. package/dist/wcs/p-c9478849.entry.js +2 -0
  403. package/dist/wcs/p-c9478849.entry.js.map +1 -0
  404. package/dist/wcs/p-ce3ef5d0.entry.js +2 -0
  405. package/dist/wcs/p-ce3ef5d0.entry.js.map +1 -0
  406. package/dist/wcs/{p-54e29233.entry.js → p-ce40b012.entry.js} +2 -2
  407. package/dist/wcs/{p-54e29233.entry.js.map → p-ce40b012.entry.js.map} +1 -1
  408. package/dist/wcs/p-d6c482fc.entry.js +2 -0
  409. package/dist/wcs/p-d6c482fc.entry.js.map +1 -0
  410. package/dist/wcs/{p-1e43122f.entry.js → p-d84cee70.entry.js} +2 -2
  411. package/dist/wcs/p-d895b92c.entry.js +16 -0
  412. package/dist/wcs/p-d895b92c.entry.js.map +1 -0
  413. package/dist/wcs/p-dca2f42c.entry.js +2 -0
  414. package/dist/wcs/{p-7519a270.entry.js → p-e0d5908a.entry.js} +2 -2
  415. package/dist/wcs/{p-a5cd4c07.entry.js → p-e487ff2c.entry.js} +2 -2
  416. package/dist/wcs/p-e487ff2c.entry.js.map +1 -0
  417. package/dist/wcs/{p-3b1fc676.entry.js → p-e52c11e4.entry.js} +2 -2
  418. package/dist/wcs/{p-0ede0c37.entry.js → p-e7661047.entry.js} +2 -2
  419. package/dist/wcs/p-ea6e33ee.entry.js +2 -0
  420. package/dist/wcs/{p-cc03627c.entry.js → p-f7ce4e0d.entry.js} +2 -2
  421. package/dist/wcs/{p-b6160b7c.entry.js → p-faf04401.entry.js} +2 -2
  422. package/dist/wcs/p-fc1767ae.entry.js +2 -0
  423. package/dist/wcs/p-fc1767ae.entry.js.map +1 -0
  424. package/dist/wcs/p-feebc469.entry.js +2 -0
  425. package/dist/wcs/p-feebc469.entry.js.map +1 -0
  426. package/dist/wcs/wcs.css +1 -1
  427. package/dist/wcs/wcs.esm.js +1 -1
  428. package/dist/wcs/wcs.esm.js.map +1 -1
  429. package/package.json +1 -1
  430. package/dist/cjs/accessibility-e99b032d.js.map +0 -1
  431. package/dist/cjs/grid-pagination-4b55c908.js +0 -101
  432. package/dist/cjs/grid-pagination-4b55c908.js.map +0 -1
  433. package/dist/cjs/helpers-4a14051a.js.map +0 -1
  434. package/dist/cjs/index-ca67a6dc.js.map +0 -1
  435. package/dist/cjs/isEqual-9ea7ee49.js.map +0 -1
  436. package/dist/cjs/wcs-button.cjs.entry.js.map +0 -1
  437. package/dist/cjs/wcs-spinner.cjs.entry.js +0 -22
  438. package/dist/cjs/wcs-spinner.cjs.entry.js.map +0 -1
  439. package/dist/esm/accessibility-ffa12842.js.map +0 -1
  440. package/dist/esm/grid-pagination-41354861.js +0 -99
  441. package/dist/esm/grid-pagination-41354861.js.map +0 -1
  442. package/dist/esm/helpers-1d55b67f.js.map +0 -1
  443. package/dist/esm/index-dc4d96d4.js.map +0 -1
  444. package/dist/esm/isEqual-20881bca.js.map +0 -1
  445. package/dist/esm/wcs-button.entry.js.map +0 -1
  446. package/dist/esm/wcs-spinner.entry.js +0 -18
  447. package/dist/esm/wcs-spinner.entry.js.map +0 -1
  448. package/dist/wcs/p-02b95dbf.entry.js +0 -2
  449. package/dist/wcs/p-02b95dbf.entry.js.map +0 -1
  450. package/dist/wcs/p-0f8db386.js +0 -2
  451. package/dist/wcs/p-0f8db386.js.map +0 -1
  452. package/dist/wcs/p-17630eea.entry.js +0 -2
  453. package/dist/wcs/p-1f8c73eb.entry.js.map +0 -1
  454. package/dist/wcs/p-269d244c.entry.js +0 -2
  455. package/dist/wcs/p-269d244c.entry.js.map +0 -1
  456. package/dist/wcs/p-2f63d6c5.entry.js +0 -2
  457. package/dist/wcs/p-2f63d6c5.entry.js.map +0 -1
  458. package/dist/wcs/p-39821dd2.entry.js +0 -2
  459. package/dist/wcs/p-39821dd2.entry.js.map +0 -1
  460. package/dist/wcs/p-3dc6b507.js +0 -2
  461. package/dist/wcs/p-3dc6b507.js.map +0 -1
  462. package/dist/wcs/p-463667c9.entry.js +0 -2
  463. package/dist/wcs/p-475ac7c5.js +0 -2
  464. package/dist/wcs/p-475ac7c5.js.map +0 -1
  465. package/dist/wcs/p-4ffe4539.entry.js +0 -2
  466. package/dist/wcs/p-4ffe4539.entry.js.map +0 -1
  467. package/dist/wcs/p-57560d7d.entry.js +0 -2
  468. package/dist/wcs/p-57560d7d.entry.js.map +0 -1
  469. package/dist/wcs/p-61cab06f.entry.js +0 -2
  470. package/dist/wcs/p-61cab06f.entry.js.map +0 -1
  471. package/dist/wcs/p-627bbb6a.entry.js +0 -2
  472. package/dist/wcs/p-627bbb6a.entry.js.map +0 -1
  473. package/dist/wcs/p-6de70331.entry.js +0 -2
  474. package/dist/wcs/p-6de70331.entry.js.map +0 -1
  475. package/dist/wcs/p-747a5962.entry.js +0 -2
  476. package/dist/wcs/p-8181f8cd.js +0 -2
  477. package/dist/wcs/p-8181f8cd.js.map +0 -1
  478. package/dist/wcs/p-8c4ed883.entry.js +0 -2
  479. package/dist/wcs/p-8c4ed883.entry.js.map +0 -1
  480. package/dist/wcs/p-8d57835f.entry.js +0 -2
  481. package/dist/wcs/p-8fed8b1c.entry.js +0 -2
  482. package/dist/wcs/p-8fed8b1c.entry.js.map +0 -1
  483. package/dist/wcs/p-91b3e4b5.entry.js +0 -2
  484. package/dist/wcs/p-9910fedd.entry.js +0 -2
  485. package/dist/wcs/p-9910fedd.entry.js.map +0 -1
  486. package/dist/wcs/p-9d798de4.entry.js +0 -2
  487. package/dist/wcs/p-9d798de4.entry.js.map +0 -1
  488. package/dist/wcs/p-9ecdeaf9.entry.js +0 -2
  489. package/dist/wcs/p-9ecdeaf9.entry.js.map +0 -1
  490. package/dist/wcs/p-a2df3a49.js +0 -3
  491. package/dist/wcs/p-a2df3a49.js.map +0 -1
  492. package/dist/wcs/p-a5cd4c07.entry.js.map +0 -1
  493. package/dist/wcs/p-ac106663.entry.js +0 -2
  494. package/dist/wcs/p-ac106663.entry.js.map +0 -1
  495. package/dist/wcs/p-cb90bc3a.entry.js +0 -2
  496. package/dist/wcs/p-cb90bc3a.entry.js.map +0 -1
  497. package/dist/wcs/p-cdd172b4.entry.js +0 -2
  498. package/dist/wcs/p-d5a0e271.entry.js +0 -2
  499. package/dist/wcs/p-d5a0e271.entry.js.map +0 -1
  500. package/dist/wcs/p-ec84d6fd.entry.js +0 -16
  501. package/dist/wcs/p-ec84d6fd.entry.js.map +0 -1
  502. package/dist/wcs/p-ed3132be.entry.js +0 -2
  503. package/dist/wcs/p-ed3132be.entry.js.map +0 -1
  504. package/dist/wcs/p-f06f48f3.entry.js.map +0 -1
  505. package/dist/wcs/p-f20b9024.entry.js +0 -2
  506. package/dist/wcs/p-f20b9024.entry.js.map +0 -1
  507. package/dist/wcs/p-f489793d.entry.js.map +0 -1
  508. /package/dist/wcs/{p-7a3f70da.entry.js.map → p-00f6a79a.entry.js.map} +0 -0
  509. /package/dist/wcs/{p-ee453b6e.entry.js.map → p-016e4dd9.entry.js.map} +0 -0
  510. /package/dist/wcs/{p-30d8f9c3.entry.js.map → p-11ab4ffc.entry.js.map} +0 -0
  511. /package/dist/wcs/{p-dfddec76.entry.js.map → p-17442a2f.entry.js.map} +0 -0
  512. /package/dist/wcs/{p-d6c3e615.js.map → p-24611014.js.map} +0 -0
  513. /package/dist/wcs/{p-292ca644.entry.js.map → p-2d62b3dd.entry.js.map} +0 -0
  514. /package/dist/wcs/{p-d6b3f742.entry.js.map → p-33a5594d.entry.js.map} +0 -0
  515. /package/dist/wcs/{p-257b15b9.entry.js.map → p-36e83879.entry.js.map} +0 -0
  516. /package/dist/wcs/{p-7269272f.entry.js.map → p-46184d47.entry.js.map} +0 -0
  517. /package/dist/wcs/{p-4a9f8e94.entry.js.map → p-46d56c4e.entry.js.map} +0 -0
  518. /package/dist/wcs/{p-fc3f5b53.entry.js.map → p-4820154c.entry.js.map} +0 -0
  519. /package/dist/wcs/{p-ff9967eb.entry.js.map → p-4af68f13.entry.js.map} +0 -0
  520. /package/dist/wcs/{p-50dce764.entry.js.map → p-61b934a7.entry.js.map} +0 -0
  521. /package/dist/wcs/{p-17630eea.entry.js.map → p-680b107c.entry.js.map} +0 -0
  522. /package/dist/wcs/{p-d084dd61.entry.js.map → p-88b1cdfe.entry.js.map} +0 -0
  523. /package/dist/wcs/{p-c7494651.entry.js.map → p-8ff7e463.entry.js.map} +0 -0
  524. /package/dist/wcs/{p-cfcacc44.entry.js.map → p-914aa964.entry.js.map} +0 -0
  525. /package/dist/wcs/{p-429bd9fb.entry.js.map → p-9b1c73b3.entry.js.map} +0 -0
  526. /package/dist/wcs/{p-8d57835f.entry.js.map → p-a3518f66.entry.js.map} +0 -0
  527. /package/dist/wcs/{p-463667c9.entry.js.map → p-a361d9f1.entry.js.map} +0 -0
  528. /package/dist/wcs/{p-31a8d23f.entry.js.map → p-a85208ca.entry.js.map} +0 -0
  529. /package/dist/wcs/{p-d3f1cafe.entry.js.map → p-b91323fc.entry.js.map} +0 -0
  530. /package/dist/wcs/{p-47d8ece5.entry.js.map → p-bd4029f8.entry.js.map} +0 -0
  531. /package/dist/wcs/{p-e348058b.entry.js.map → p-bed4e3ce.entry.js.map} +0 -0
  532. /package/dist/wcs/{p-810aff71.entry.js.map → p-c38adf4b.entry.js.map} +0 -0
  533. /package/dist/wcs/{p-2185bf8b.entry.js.map → p-c6a8c6f9.entry.js.map} +0 -0
  534. /package/dist/wcs/{p-1e43122f.entry.js.map → p-d84cee70.entry.js.map} +0 -0
  535. /package/dist/wcs/{p-747a5962.entry.js.map → p-dca2f42c.entry.js.map} +0 -0
  536. /package/dist/wcs/{p-7519a270.entry.js.map → p-e0d5908a.entry.js.map} +0 -0
  537. /package/dist/wcs/{p-3b1fc676.entry.js.map → p-e52c11e4.entry.js.map} +0 -0
  538. /package/dist/wcs/{p-0ede0c37.entry.js.map → p-e7661047.entry.js.map} +0 -0
  539. /package/dist/wcs/{p-cdd172b4.entry.js.map → p-ea6e33ee.entry.js.map} +0 -0
  540. /package/dist/wcs/{p-cc03627c.entry.js.map → p-f7ce4e0d.entry.js.map} +0 -0
  541. /package/dist/wcs/{p-b6160b7c.entry.js.map → p-faf04401.entry.js.map} +0 -0
@@ -1,5 +1,6 @@
1
1
  import { h, Host } from '@stencil/core';
2
2
  import { GridSortArrow } from './grid-sort-arrow';
3
+ import { isEnterKey, isSpaceKey } from "../../utils/helpers";
3
4
  /**
4
5
  * The grid column is a subcomponent of `wcs-grid` that represents a column of the table.
5
6
  * @cssprop --wcs-grid-column-border-left - Border separator between column names
@@ -16,6 +17,8 @@ export class GridColumn {
16
17
  this.width = undefined;
17
18
  this.customCells = false;
18
19
  this.hidden = false;
20
+ this.cursorPosition = undefined;
21
+ this.columnPosition = undefined;
19
22
  }
20
23
  parseMyObjectProp(newValue) {
21
24
  this.wcsHiddenChange.emit(newValue);
@@ -32,13 +35,31 @@ export class GridColumn {
32
35
  sortFn: this.sortFn
33
36
  });
34
37
  }
38
+ getSortOrderForAriaSort(sortOrder) {
39
+ switch (sortOrder) {
40
+ case 'asc':
41
+ return 'ascending';
42
+ case 'desc':
43
+ return 'descending';
44
+ case 'none':
45
+ default:
46
+ return 'none';
47
+ }
48
+ }
35
49
  render() {
36
- return (h(Host, { onClick: this.onSortClick.bind(this), slot: "grid-column" }, h("th", { style: { width: this.width }, class: this.sort ? 'pointer' : '' }, h("div", { class: "grid-column-th-content" }, h("span", null, this.name), this.sort ? h(GridSortArrow, { state: this.sortOrder }) : ''))));
50
+ var _a, _b;
51
+ return (h(Host, { slot: "grid-column" }, h("th", { style: { width: this.width }, class: this.sort ? 'pointer' : '', role: this.sort ? 'button' : null, scope: "col", tabIndex: this.columnPosition === ((_a = this.cursorPosition) === null || _a === void 0 ? void 0 : _a.col) && ((_b = this.cursorPosition) === null || _b === void 0 ? void 0 : _b.row) === 0 ? 0 : -1, onClick: this.onSortClick.bind(this), onKeyDown: this.handleSortKeyDown.bind(this), "aria-sort": this.getSortOrderForAriaSort(this.sortOrder) }, h("div", { class: "grid-column-th-content" }, h("span", null, this.name), this.sort ? h(GridSortArrow, { state: this.sortOrder }) : ''))));
37
52
  }
38
53
  onSortClick() {
39
54
  // @Watch on sortOrder property will trigger wcsSortChange event
40
55
  this.sortOrder = this.sortOrder === 'none' || this.sortOrder === 'desc' ? 'asc' : 'desc';
41
56
  }
57
+ handleSortKeyDown(_event) {
58
+ if (isSpaceKey(_event) || isEnterKey(_event)) {
59
+ _event.preventDefault();
60
+ this.onSortClick();
61
+ }
62
+ }
42
63
  static get is() { return "wcs-grid-column"; }
43
64
  static get encapsulation() { return "shadow"; }
44
65
  static get originalStyleUrls() {
@@ -220,6 +241,44 @@ export class GridColumn {
220
241
  "attribute": "hidden",
221
242
  "reflect": false,
222
243
  "defaultValue": "false"
244
+ },
245
+ "cursorPosition": {
246
+ "type": "unknown",
247
+ "mutable": false,
248
+ "complexType": {
249
+ "original": "{col: number, row: number}",
250
+ "resolved": "{ col: number; row: number; }",
251
+ "references": {}
252
+ },
253
+ "required": false,
254
+ "optional": false,
255
+ "docs": {
256
+ "tags": [{
257
+ "name": "internal",
258
+ "text": undefined
259
+ }],
260
+ "text": "This property mustn't be set by hand, it is set by the wcs-grid component to move the focus between grid columns\nusing keyboard."
261
+ }
262
+ },
263
+ "columnPosition": {
264
+ "type": "number",
265
+ "mutable": false,
266
+ "complexType": {
267
+ "original": "number",
268
+ "resolved": "number",
269
+ "references": {}
270
+ },
271
+ "required": false,
272
+ "optional": false,
273
+ "docs": {
274
+ "tags": [{
275
+ "name": "internal",
276
+ "text": undefined
277
+ }],
278
+ "text": "This property mustn't be set by hand, it is set by the wcs-grid component to register the column index in a\ngrid in order to move the focus between the grid columns."
279
+ },
280
+ "attribute": "column-position",
281
+ "reflect": false
223
282
  }
224
283
  };
225
284
  }
@@ -1 +1 @@
1
- {"version":3,"file":"grid-column.js","sourceRoot":"","sources":["../../../src/components/grid-column/grid-column.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAElH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AAC,CAAC,MAAM,CAAC;EAC7F,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, ComponentInterface, Element, Event, EventEmitter, h, Host, Prop, Watch } from '@stencil/core';\nimport { WcsCellFormatter, WcsGridColumnSortChangeEventDetails, WcsSortFn, WcsSortOrder } from '../grid/grid-interface';\nimport { GridSortArrow } from './grid-sort-arrow';\n\n/**\n * The grid column is a subcomponent of `wcs-grid` that represents a column of the table.\n * @cssprop --wcs-grid-column-border-left - Border separator between column names\n * @csspart [path]-column - CSS part for each column for styling. e.g: first_name-column, email-column\n */\n@Component({\n tag: 'wcs-grid-column',\n styleUrl: 'grid-column.scss',\n shadow: true\n})\nexport class GridColumn implements ComponentInterface {\n @Element() private el: HTMLWcsGridColumnElement;\n /**\n * Represents the name of the field from the `data` object (e.g: first_name, last_name, email, ...)\n */\n @Prop() path: string;\n /**\n * The name of the column displayed on the table (e.g: First Name, Last Name, Email, ...)\n */\n @Prop() name: string;\n /**\n * Make the column sortable.\n */\n @Prop() sort: boolean = false;\n /**\n * Customizable sort function to change the comparison of values.\n */\n @Prop() sortFn: WcsSortFn;\n /**\n * Customizable formatter function to render the cell differently.\n */\n @Prop() formatter: WcsCellFormatter;\n /**\n * Defines if the column sort is ascending or descending. \n * `none` = the column is not sorted.\n */\n @Prop({mutable: true}) sortOrder: WcsSortOrder = 'none';\n /**\n * Set the column `<th>` element width.\n */\n @Prop() width: string;\n /**\n * Set to true if using a `wcs-custom-cell` linked to it.\n */\n @Prop() customCells: boolean = false;\n /**\n * Flag to hide the column.\n */\n @Prop() hidden: boolean = false;\n /**\n * Event emitted when the sort of the column is changed.\n */\n @Event() wcsSortChange!: EventEmitter<WcsGridColumnSortChangeEventDetails>;\n /**\n * Event emitted if the column is dynamically switching visibility.\n */\n @Event() wcsHiddenChange!: EventEmitter<boolean>;\n\n @Watch('hidden')\n parseMyObjectProp(newValue: boolean) {\n this.wcsHiddenChange.emit(newValue);\n }\n\n @Watch('sortOrder')\n sortOrderChange(_: WcsSortOrder) {\n this.emitSortConfig();\n }\n\n emitSortConfig() {\n if (!this.sort) return;\n this.wcsSortChange.emit({\n column: this.el,\n order: this.sortOrder,\n sortFn: this.sortFn\n });\n }\n\n render(): any {\n return (<Host onClick={this.onSortClick.bind(this)} slot=\"grid-column\">\n <th style={{width: this.width}} class={this.sort ? 'pointer' : ''}>\n <div class=\"grid-column-th-content\">\n <span>{this.name}</span>\n {\n this.sort ? <GridSortArrow state={this.sortOrder}/> : ''\n }\n </div>\n </th>\n </Host>)\n }\n\n private onSortClick() {\n // @Watch on sortOrder property will trigger wcsSortChange event\n this.sortOrder = this.sortOrder === 'none' || this.sortOrder === 'desc' ? 'asc' : 'desc';\n }\n}\n"]}
1
+ {"version":3,"file":"grid-column.js","sourceRoot":"","sources":["../../../src/components/grid-column/grid-column.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EAET,OAAO,EACP,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,IAAI,EACJ,KAAK,EACR,MAAM,eAAe,CAAC;AAOvB,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE7D;;;;GAIG;AAMH,MAAM,OAAO,UAAU;;;;gBAaK,KAAK;;;qBAaoB,MAAM;;uBAQxB,KAAK;kBAIV,KAAK;;;;EAyB/B,iBAAiB,CAAC,QAAiB;IAC/B,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;EACxC,CAAC;EAGD,eAA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AK,KAAK,EAAC,wBAAwB;UAC/B,gBAAO,IAAI,CAAC,IAAI,CAAQ;UAEpB,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAC,aAAa,IAAC,KAAK,EAAE,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,EAAE,CAE1D,CACL,CACF,CAAC,CAAA;EACZ,CAAC;EAEO,WAAW;IACf,gEAAgE;IAChE,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,KAAK,MAAM,IAAI,IAAI,CAAC,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;EAC7F,CAAC;EAEO,iBAAiB,CAAC,MAAqB;IAC3C,IAAI,UAAU,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,EAAE;MAC1C,MAAM,CAAC,cAAc,EAAE,CAAC;MACxB,IAAI,CAAC,WAAW,EAAE,CAAC;KACtB;EACL,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import {\n Component,\n ComponentInterface,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Prop,\n Watch\n} from '@stencil/core';\nimport {\n WcsCellFormatter,\n WcsGridColumnSortChangeEventDetails,\n WcsSortFn,\n WcsSortOrder\n} from '../grid/grid-interface';\nimport { GridSortArrow } from './grid-sort-arrow';\nimport { isEnterKey, isSpaceKey } from \"../../utils/helpers\";\n\n/**\n * The grid column is a subcomponent of `wcs-grid` that represents a column of the table.\n * @cssprop --wcs-grid-column-border-left - Border separator between column names\n * @csspart [path]-column - CSS part for each column for styling. e.g: first_name-column, email-column\n */\n@Component({\n tag: 'wcs-grid-column',\n styleUrl: 'grid-column.scss',\n shadow: true\n})\nexport class GridColumn implements ComponentInterface {\n @Element() private el: HTMLWcsGridColumnElement;\n /**\n * Represents the name of the field from the `data` object (e.g: first_name, last_name, email, ...)\n */\n @Prop() path: string;\n /**\n * The name of the column displayed on the table (e.g: First Name, Last Name, Email, ...)\n */\n @Prop() name: string;\n /**\n * Make the column sortable.\n */\n @Prop() sort: boolean = false;\n /**\n * Customizable sort function to change the comparison of values.\n */\n @Prop() sortFn: WcsSortFn;\n /**\n * Customizable formatter function to render the cell differently.\n */\n @Prop() formatter: WcsCellFormatter;\n /**\n * Defines if the column sort is ascending or descending. \n * `none` = the column is not sorted.\n */\n @Prop({mutable: true}) sortOrder: WcsSortOrder = 'none';\n /**\n * Set the column `<th>` element width.\n */\n @Prop() width: string;\n /**\n * Set to true if using a `wcs-custom-cell` linked to it.\n */\n @Prop() customCells: boolean = false;\n /**\n * Flag to hide the column.\n */\n @Prop() hidden: boolean = false;\n /**\n * Event emitted when the sort of the column is changed.\n */\n @Event() wcsSortChange!: EventEmitter<WcsGridColumnSortChangeEventDetails>;\n /**\n * Event emitted if the column is dynamically switching visibility.\n */\n @Event() wcsHiddenChange!: EventEmitter<boolean>;\n\n /**\n * This property mustn't be set by hand, it is set by the wcs-grid component to move the focus between grid columns\n * using keyboard.\n * @internal\n */\n @Prop() public cursorPosition: {col: number, row: number};\n\n /**\n * This property mustn't be set by hand, it is set by the wcs-grid component to register the column index in a\n * grid in order to move the focus between the grid columns.\n * @internal\n */\n @Prop() public columnPosition: number;\n\n @Watch('hidden')\n parseMyObjectProp(newValue: boolean) {\n this.wcsHiddenChange.emit(newValue);\n }\n\n @Watch('sortOrder')\n sortOrderChange(_: WcsSortOrder) {\n this.emitSortConfig();\n }\n\n emitSortConfig() {\n if (!this.sort) return;\n this.wcsSortChange.emit({\n column: this.el,\n order: this.sortOrder,\n sortFn: this.sortFn\n });\n }\n\n getSortOrderForAriaSort(sortOrder: WcsSortOrder) {\n switch (sortOrder) {\n case 'asc':\n return 'ascending';\n case 'desc':\n return 'descending';\n case 'none':\n default:\n return 'none';\n }\n }\n\n render(): any {\n return (<Host slot=\"grid-column\">\n <th style={{width: this.width}}\n class={this.sort ? 'pointer' : ''}\n role={this.sort ? 'button' : null}\n scope=\"col\"\n tabIndex={this.columnPosition === this.cursorPosition?.col && this.cursorPosition?.row === 0 ? 0 : -1}\n onClick={this.onSortClick.bind(this)}\n onKeyDown={this.handleSortKeyDown.bind(this)}\n aria-sort={this.getSortOrderForAriaSort(this.sortOrder)}>\n <div class=\"grid-column-th-content\">\n <span>{this.name}</span>\n {\n this.sort ? <GridSortArrow state={this.sortOrder}/> : ''\n }\n </div>\n </th>\n </Host>)\n }\n\n private onSortClick() {\n // @Watch on sortOrder property will trigger wcsSortChange event\n this.sortOrder = this.sortOrder === 'none' || this.sortOrder === 'desc' ? 'asc' : 'desc';\n }\n \n private handleSortKeyDown(_event: KeyboardEvent) {\n if (isSpaceKey(_event) || isEnterKey(_event)) {\n _event.preventDefault();\n this.onSortClick();\n }\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import { h } from '@stencil/core';
2
- export const GridSortArrow = ({ state }) => (h("svg", { style: { marginLeft: 'auto' }, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "20", viewBox: "0 0 24 20" }, h("style", { type: "text/css" }, `
2
+ export const GridSortArrow = ({ state }) => (h("svg", { "aria-hidden": "true", style: { marginLeft: 'auto' }, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "20", viewBox: "0 0 24 20" }, h("style", { type: "text/css" }, `
3
3
  .arrow-group {
4
4
  transform-origin: 50% 51%;
5
5
  transition: transform 175ms ease-in-out;
@@ -1 +1 @@
1
- {"version":3,"file":"grid-sort-arrow.js","sourceRoot":"","sources":["../../../src/components/grid-column/grid-sort-arrow.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,CAAC,EAAE,MAAM,eAAe,CAAC;AAOvD,MAAM,CAAC,MAAM,aAAa,GAA4C,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CACjF,WAAK,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW;EAC7G,aAAO,IAAI,EAAC,UAAU,IAAE;;;;;;;;;;;;;;;;;;;SAmBvB,CAAS;EACV,SAAG,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,iBAAiB;IAClC,YAAM,KAAK,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,QAAQ,EAAE,CAAC,EAAC,gDAAgD,GAAG;IAChH,YAAM,CAAC,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,GAAG,CACtC;EACJ,SAAG,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,kBAAkB;IACnC,YAAM,KAAK,EAAE,CAAC,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,QAAQ,EAAE,CAAC,EAAC,gDAAgD,GAAG;IACjH,YAAM,CAAC,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,GAAG,CACtC,CACF,CACT,CAAC","sourcesContent":["import { FunctionalComponent, h } from '@stencil/core';\nimport { WcsSortOrder } from '../grid/grid-interface';\n\ninterface GridSortArrowProps {\n state: WcsSortOrder;\n}\n\nexport const GridSortArrow: FunctionalComponent<GridSortArrowProps> = ({ state }) => (\n <svg style={{ marginLeft: 'auto' }} xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"20\" viewBox=\"0 0 24 20\">\n <style type=\"text/css\">{`\n .arrow-group {\n transform-origin: 50% 51%;\n transition: transform 175ms ease-in-out;\n }\n .arrow{\n transition: fill 175ms ease-in-out;\n fill: var(--wcs-text-light);\n }\n .asc {\n transform: scaleY(1) translateY(-6px);\n }\n .desc {\n transform: scaleY(-1) translateY(-6px);\n }\n .active {\n fill: var(--wcs-primary);\n }\n\n `}</style>\n <g fill=\"none\" class='asc arrow-group'>\n <path class={(state === 'asc' ? 'active' : '') + ' arrow'} d=\"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z\" />\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n </g>\n <g fill=\"none\" class='desc arrow-group'>\n <path class={(state === 'desc' ? 'active' : '') + ' arrow'} d=\"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z\" />\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n </g>\n </svg>\n);\n"]}
1
+ {"version":3,"file":"grid-sort-arrow.js","sourceRoot":"","sources":["../../../src/components/grid-column/grid-sort-arrow.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,CAAC,EAAE,MAAM,eAAe,CAAC;AAOvD,MAAM,CAAC,MAAM,aAAa,GAA4C,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CACjF,0BAAiB,MAAM,EAAC,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW;EAChI,aAAO,IAAI,EAAC,UAAU,IAAE;;;;;;;;;;;;;;;;;;;SAmBvB,CAAS;EACV,SAAG,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,iBAAiB;IAClC,YAAM,KAAK,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,QAAQ,EAAE,CAAC,EAAC,gDAAgD,GAAG;IAChH,YAAM,CAAC,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,GAAG,CACtC;EACJ,SAAG,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,kBAAkB;IACnC,YAAM,KAAK,EAAE,CAAC,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,QAAQ,EAAE,CAAC,EAAC,gDAAgD,GAAG;IACjH,YAAM,CAAC,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,GAAG,CACtC,CACF,CACT,CAAC","sourcesContent":["import { FunctionalComponent, h } from '@stencil/core';\nimport { WcsSortOrder } from '../grid/grid-interface';\n\ninterface GridSortArrowProps {\n state: WcsSortOrder;\n}\n\nexport const GridSortArrow: FunctionalComponent<GridSortArrowProps> = ({ state }) => (\n <svg aria-hidden=\"true\" style={{ marginLeft: 'auto' }} xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"20\" viewBox=\"0 0 24 20\">\n <style type=\"text/css\">{`\n .arrow-group {\n transform-origin: 50% 51%;\n transition: transform 175ms ease-in-out;\n }\n .arrow{\n transition: fill 175ms ease-in-out;\n fill: var(--wcs-text-light);\n }\n .asc {\n transform: scaleY(1) translateY(-6px);\n }\n .desc {\n transform: scaleY(-1) translateY(-6px);\n }\n .active {\n fill: var(--wcs-primary);\n }\n\n `}</style>\n <g fill=\"none\" class='asc arrow-group'>\n <path class={(state === 'asc' ? 'active' : '') + ' arrow'} d=\"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z\" />\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n </g>\n <g fill=\"none\" class='desc arrow-group'>\n <path class={(state === 'desc' ? 'active' : '') + ' arrow'} d=\"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z\" />\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n </g>\n </svg>\n);\n"]}
@@ -1,26 +1,35 @@
1
1
  import { h } from '@stencil/core';
2
- export const GridPaginationArrow = ({ active, order, double = false }) => (h("svg", { style: { marginLeft: 'auto', cursor: 'pointer' }, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "20", viewBox: "0 0 24 20" }, h("style", { type: "text/css" }, `
3
- .arrow-group {
4
- transform-origin: 50% 51%;
5
- transition: transform 175ms ease-in-out;
6
- }
7
- .arrow {
8
- transition: fill 175ms ease-in-out;
9
- fill: var(--wcs-text-light);
10
- }
11
- .second-arrow {
12
- transform: translateY(-8px);
13
- }
14
- .next {
15
- transform: rotate(90deg);
16
- }
17
- .previous {
18
- transform: rotate(-90deg);
19
- }
20
- .active {
21
- fill: var(--wcs-primary);
22
- }
23
- `), h("g", { fill: "none", class: order + ' arrow-group' }, h("path", { class: (active ? 'active' : '') + ' arrow', d: "M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z" }), h("path", { d: "M0 0h24v24H0z", fill: "none" })), double ?
2
+ const getAccessibleName = (order, double) => {
3
+ switch (order) {
4
+ case 'next':
5
+ return double ? 'Last page' : 'Next page';
6
+ case 'previous':
7
+ default:
8
+ return double ? 'First page' : 'Previous page';
9
+ }
10
+ };
11
+ export const GridPaginationArrow = ({ active, order, double = false }) => (h("wcs-button", { mode: "clear", shape: "square", size: "s", disabled: !active, title: getAccessibleName(order, double) }, h("svg", { style: { cursor: 'pointer' }, "aria-hidden": "true", xmlns: "http://www.w3.org/2000/svg", width: "24", height: "20", viewBox: "0 0 24 20" }, h("style", { type: "text/css" }, `
12
+ .arrow-group {
13
+ transform-origin: 50% 51%;
14
+ transition: transform 175ms ease-in-out;
15
+ }
16
+ .arrow {
17
+ transition: fill 175ms ease-in-out;
18
+ fill: var(--wcs-text-light);
19
+ }
20
+ .second-arrow {
21
+ transform: translateY(-8px);
22
+ }
23
+ .next {
24
+ transform: rotate(90deg);
25
+ }
26
+ .previous {
27
+ transform: rotate(-90deg);
28
+ }
29
+ .active {
30
+ fill: var(--wcs-primary);
31
+ }
32
+ `), h("g", { fill: "none", class: order + ' arrow-group' }, h("path", { class: (active ? 'active' : '') + ' arrow', d: "M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z" }), h("path", { d: "M0 0h24v24H0z", fill: "none" })), double ?
24
33
  h("g", { fill: "none", class: order + ' arrow-group' }, h("path", { class: (active ? 'active' : '') + ' arrow second-arrow', d: "M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z" }), h("path", { d: "M0 0h24v24H0z", fill: "none" }))
25
- : ''));
34
+ : '')));
26
35
  //# sourceMappingURL=grid-pagination-arrow.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"grid-pagination-arrow.js","sourceRoot":"","sources":["../../../src/components/grid-pagination/grid-pagination-arrow.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,CAAC,EAAE,MAAM,eAAe,CAAC;AAQvD,MAAM,CAAC,MAAM,mBAAmB,GAAkD,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,CACrH,WAAK,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW;EAChI,aAAO,IAAI,EAAC,UAAU,IAAE;;;;;;;;;;;;;;;;;;;;;SAqBvB,CAAS;EACV,SAAG,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,KAAK,GAAG,cAAc;IACxC,YAAM,KAAK,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,QAAQ,EAAE,CAAC,EAAC,gDAAgD,GAAG;IACvG,YAAM,CAAC,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,GAAG,CACtC;EAEA,MAAM,CAAC,CAAC;IACJ,SAAG,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,KAAK,GAAG,cAAc;MACxC,YAAM,KAAK,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,qBAAqB,EAAE,CAAC,EAAC,gDAAgD,GAAG;MACpH,YAAM,CAAC,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,GAAG,CACtC;IACJ,CAAC,CAAC,EAAE,CAEV,CACT,CAAC","sourcesContent":["import { FunctionalComponent, h } from '@stencil/core';\n\ninterface GridPaginationArrowProps {\n active: boolean;\n order: 'next' | 'previous';\n double?: boolean;\n}\n\nexport const GridPaginationArrow: FunctionalComponent<GridPaginationArrowProps> = ({ active, order, double = false }) => (\n <svg style={{ marginLeft: 'auto', cursor: 'pointer' }} xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"20\" viewBox=\"0 0 24 20\">\n <style type=\"text/css\">{`\n .arrow-group {\n transform-origin: 50% 51%;\n transition: transform 175ms ease-in-out;\n }\n .arrow {\n transition: fill 175ms ease-in-out;\n fill: var(--wcs-text-light);\n }\n .second-arrow {\n transform: translateY(-8px);\n }\n .next {\n transform: rotate(90deg);\n }\n .previous {\n transform: rotate(-90deg);\n }\n .active {\n fill: var(--wcs-primary);\n }\n `}</style>\n <g fill=\"none\" class={order + ' arrow-group'}>\n <path class={(active ? 'active' : '') + ' arrow'} d=\"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z\" />\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n </g>\n {\n double ?\n <g fill=\"none\" class={order + ' arrow-group'}>\n <path class={(active ? 'active' : '') + ' arrow second-arrow'} d=\"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z\" />\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n </g>\n : ''\n }\n </svg>\n);\n"]}
1
+ {"version":3,"file":"grid-pagination-arrow.js","sourceRoot":"","sources":["../../../src/components/grid-pagination/grid-pagination-arrow.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,CAAC,EAAE,MAAM,eAAe,CAAC;AAQvD,MAAM,iBAAiB,GAAG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,CAAC,EAAE,CAAC,GAAG,qBAAqB,EACvD,CAAC,EAAC,gDAAgD,GAAE;QAC1D,YAAM,CAAC,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,GAAE,CACnC;MACJ,CAAC,CAAC,EAAE,CAEJ,CACK,CACd,CAAC","sourcesContent":["import { FunctionalComponent, h } from '@stencil/core';\n\ninterface GridPaginationArrowProps {\n active: boolean;\n order: 'next' | 'previous';\n double?: boolean;\n}\n\nconst getAccessibleName = (order: GridPaginationArrowProps['order'], double: GridPaginationArrowProps['double']): string => {\n switch (order) {\n case 'next':\n return double ? 'Last page' : 'Next page';\n case 'previous':\n default:\n return double ? 'First page' : 'Previous page';\n }\n}\n\nexport const GridPaginationArrow: FunctionalComponent<GridPaginationArrowProps> = ({active, order, double = false}) => (\n <wcs-button mode=\"clear\"\n shape=\"square\"\n size=\"s\"\n disabled={!active}\n title={getAccessibleName(order, double)}>\n <svg style={{cursor: 'pointer'}}\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"20\" viewBox=\"0 0 24 20\">\n <style type=\"text/css\">{`\n .arrow-group {\n transform-origin: 50% 51%;\n transition: transform 175ms ease-in-out;\n }\n .arrow {\n transition: fill 175ms ease-in-out;\n fill: var(--wcs-text-light);\n }\n .second-arrow {\n transform: translateY(-8px);\n }\n .next {\n transform: rotate(90deg);\n }\n .previous {\n transform: rotate(-90deg);\n }\n .active {\n fill: var(--wcs-primary);\n }\n `}</style>\n <g fill=\"none\" class={order + ' arrow-group'}>\n <path class={(active ? 'active' : '') + ' arrow'} d=\"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z\"/>\n <path d=\"M0 0h24v24H0z\" fill=\"none\"/>\n </g>\n {\n double ?\n <g fill=\"none\" class={order + ' arrow-group'}>\n <path class={(active ? 'active' : '') + ' arrow second-arrow'}\n d=\"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z\"/>\n <path d=\"M0 0h24v24H0z\" fill=\"none\"/>\n </g>\n : ''\n }\n </svg>\n </wcs-button>\n);\n"]}
@@ -10,6 +10,7 @@
10
10
  grid-template-columns: auto auto auto;
11
11
  justify-content: space-between;
12
12
  color: var(--wcs-text-medium);
13
+ align-items: center;
13
14
  }
14
15
 
15
16
  .available-page-sizes {
@@ -21,6 +22,22 @@
21
22
  align-items: center;
22
23
  }
23
24
 
25
+ .page-management {
26
+ margin: 0;
27
+ padding: 0;
28
+ list-style-type: none;
29
+ }
30
+
24
31
  .pagination-arrow {
25
32
  display: flex;
33
+ }
34
+
35
+ .pagination-counter {
36
+ padding: 0 var(--wcs-padding-s);
37
+ }
38
+
39
+ .items-count span:focus {
40
+ outline: 2px dashed var(--wcs-primary);
41
+ outline-offset: 4px;
42
+ border-radius: 0.1rem;
26
43
  }
@@ -55,7 +55,7 @@ export class GridPagination {
55
55
  });
56
56
  }
57
57
  render() {
58
- return (h(Host, { slot: "grid-pagination" }, h("div", { class: "container" }, h("div", { class: "page-size" }, h("wcs-select", { placeholder: "El\u00E9ments par page", class: "available-page-sizes", value: this.pageSize, onWcsChange: this.onChangePagesize.bind(this) }, this.availablePageSizes.map((pageSize) => h("wcs-select-option", { value: pageSize }, pageSize))), h("span", null, "\u00A0\u00E9l\u00E9ments par page")), h("div", { class: "items-count" }, h("span", null, this.itemsCount, " \u00E9l\u00E9ments")), h("div", { class: "page-management" }, h("span", { class: "pagination-arrow", onClick: this.firstPage.bind(this) }, h(GridPaginationArrow, { active: this.canGoToPreviousPage(), order: "previous", double: true })), h("span", { class: "pagination-arrow", onClick: this.previousPage.bind(this) }, h(GridPaginationArrow, { active: this.canGoToPreviousPage(), order: "previous" })), h("span", null, this.currentPage + 1, " / ", this.pageCount), h("span", { class: "pagination-arrow", onClick: this.nextPage.bind(this) }, h(GridPaginationArrow, { active: this.canGoToNextPage(), order: "next" })), h("span", { class: "pagination-arrow", onClick: this.lastPage.bind(this) }, h(GridPaginationArrow, { active: this.canGoToNextPage(), order: "next", double: true }))))));
58
+ return (h(Host, { slot: "grid-pagination" }, h("div", { class: "container" }, h("div", { class: "page-size" }, h("wcs-select", { placeholder: "El\u00E9ments par page", class: "available-page-sizes", "aria-labelledby": "elements-per-page-number elements-per-page-text", value: this.pageSize, onWcsChange: this.onChangePagesize.bind(this) }, this.availablePageSizes.map((pageSize) => h("wcs-select-option", { value: pageSize }, pageSize))), h("span", { id: "elements-per-page-number", hidden: true }, this.pageSize), h("span", { id: "elements-per-page-text" }, "\u00A0\u00E9l\u00E9ments par page")), h("div", { class: "items-count" }, h("span", null, this.itemsCount, " \u00E9l\u00E9ments")), h("nav", { "aria-label": "pagination" }, h("ul", { class: "page-management" }, h("li", { class: "pagination-arrow", onClick: this.firstPage.bind(this) }, h(GridPaginationArrow, { active: this.canGoToPreviousPage(), order: "previous", double: true })), h("li", { class: "pagination-arrow", onClick: this.previousPage.bind(this) }, h(GridPaginationArrow, { active: this.canGoToPreviousPage(), order: "previous" })), h("li", { class: "pagination-counter" }, h("span", { "aria-label": `Page ${this.currentPage + 1} sur ${this.pageCount}`, "aria-current": "page" }, this.currentPage + 1, " / ", this.pageCount)), h("li", { class: "pagination-arrow", onClick: this.nextPage.bind(this) }, h(GridPaginationArrow, { active: this.canGoToNextPage(), order: "next" })), h("li", { class: "pagination-arrow", onClick: this.lastPage.bind(this) }, h(GridPaginationArrow, { active: this.canGoToNextPage(), order: "next", double: true })))))));
59
59
  }
60
60
  static get is() { return "wcs-grid-pagination"; }
61
61
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"grid-pagination.js","sourceRoot":"","sources":["../../../src/components/grid-pagination/grid-pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EAET,KAAK,EACL,CAAC,EACD,IAAI,EACJ,IAAI,EACP,MAAM,eAAe,CAAC;AAKvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D;;GAEG;AAMH,MAAM,OAAO,cAAc;;8BAKgB,CAAC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,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;YAC5D,EAAC,mBAAmB,IAAC,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,EAAE,KAAK,EAAC,MAAM,GAAuB,CACrF;UACP,YAAM,KAAK,EAAC,kBAAkB,EAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;YAC5D,EAAC,mBAAmB,IAAC,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,EAAE,KAAK,EAAC,MAAM,EAAC,MAAM,SAAuB,CAC5F,CACL,CACJ,CACH,CAAC,CAAA;EACZ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAvHe,+BAAgB,GAAW,CAAC,CAAC","sourcesContent":["import {\n Component,\n ComponentInterface,\n Event, EventEmitter,\n h,\n Host,\n Prop\n} from '@stencil/core';\nimport {\n WcsGridPaginationChangeEventDetails\n} from '../grid/grid-interface';\nimport { SelectChangeEventDetail } from '../select/select-interface';\nimport { GridPaginationArrow } from './grid-pagination-arrow';\n\n/**\n * The grid pagination is a subcomponent of `wcs-grid`, slotted in `grid-pagination` under the `<table>` element.\n */\n@Component({\n tag: 'wcs-grid-pagination',\n styleUrl: 'grid-pagination.scss',\n shadow: true\n})\nexport class GridPagination implements ComponentInterface {\n static readonly INDEX_FIRST_PAGE: number = 0;\n /**\n * Set the available page sizes in the pagination dropdown on the left.\n */\n @Prop() availablePageSizes: number[] = [10, 20, 50];\n /**\n * The current page of the pagination. First page starts at index 0.\n */\n @Prop() currentPage: number = GridPagination.INDEX_FIRST_PAGE;\n /**\n * Maximum number of elements shown per page. \n * Default is the first value of `availablePageSizes`.\n */\n @Prop() pageSize: number = this.availablePageSizes[0];\n /**\n * Total elements in the grid. \n * - **Grid in `Server mode`** : You have to set `itemsCount` = your total data length. \n * - **Grid not in Server mode** : Do not set it manually : itemsCount is set and updated every pagination refresh.\n */\n @Prop() itemsCount: number = 0;\n /**\n * Max number of pages. \n * - **Grid in `Server mode`** : You have to set `pageCount` = `itemsCount` divided by `pageSize`. \n * - **Grid not in Server mode** : Do not set it manually : pageCount is set and updated every pagination refresh.\n */\n @Prop() pageCount: number = 1;\n /**\n * Event emitted when the pagination changes.\n */\n @Event() wcsGridPaginationChange!: EventEmitter<WcsGridPaginationChangeEventDetails>;\n\n private lastPage(): void {\n this.currentPage = this.pageCount - 1;\n this.emitPaginationChange();\n }\n\n private nextPage(): void {\n if (this.canGoToNextPage()) {\n this.currentPage++;\n this.emitPaginationChange();\n }\n }\n\n private canGoToNextPage(): boolean {\n return this.currentPage + 1 < this.pageCount;\n }\n\n private previousPage(): void {\n if (this.canGoToPreviousPage()) {\n this.currentPage--;\n this.emitPaginationChange();\n }\n }\n\n private canGoToPreviousPage(): boolean {\n return this.currentPage > 0;\n }\n\n private firstPage(): void {\n this.currentPage = 0;\n this.emitPaginationChange();\n }\n\n private onChangePagesize(event: CustomEvent<SelectChangeEventDetail>): void {\n this.pageSize = event.detail.value;\n if (this.currentPage + 1 > this.pageSize) {\n this.currentPage = 0;\n }\n this.emitPaginationChange();\n }\n\n private emitPaginationChange(): void {\n this.wcsGridPaginationChange.emit({\n pagination: {\n currentPage: this.currentPage,\n pageSize: this.pageSize,\n itemsCount: this.itemsCount,\n pageCount: this.pageCount\n }\n });\n }\n\n render(): any {\n return (<Host slot=\"grid-pagination\">\n <div class=\"container\">\n <div class=\"page-size\">\n <wcs-select placeholder=\"Eléments par page\" class=\"available-page-sizes\" value={this.pageSize} onWcsChange={this.onChangePagesize.bind(this)}>\n {\n this.availablePageSizes.map((pageSize) =>\n <wcs-select-option value={pageSize}>{pageSize}</wcs-select-option>\n )\n }\n </wcs-select>\n <span>&nbsp;éléments par page</span>\n </div>\n\n <div class=\"items-count\">\n <span>{this.itemsCount} éléments</span>\n </div>\n\n <div class=\"page-management\">\n <span class=\"pagination-arrow\" onClick={this.firstPage.bind(this)}>\n <GridPaginationArrow active={this.canGoToPreviousPage()} order=\"previous\" double></GridPaginationArrow>\n </span>\n <span class=\"pagination-arrow\" onClick={this.previousPage.bind(this)}>\n <GridPaginationArrow active={this.canGoToPreviousPage()} order=\"previous\"></GridPaginationArrow>\n </span>\n\n <span>{this.currentPage + 1} / {this.pageCount}</span>\n\n <span class=\"pagination-arrow\" onClick={this.nextPage.bind(this)}>\n <GridPaginationArrow active={this.canGoToNextPage()} order=\"next\"></GridPaginationArrow>\n </span>\n <span class=\"pagination-arrow\" onClick={this.lastPage.bind(this)}>\n <GridPaginationArrow active={this.canGoToNextPage()} order=\"next\" double></GridPaginationArrow>\n </span>\n </div>\n </div>\n </Host>)\n }\n}\n"]}
1
+ {"version":3,"file":"grid-pagination.js","sourceRoot":"","sources":["../../../src/components/grid-pagination/grid-pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EAET,KAAK,EACL,CAAC,EACD,IAAI,EACJ,IAAI,EACP,MAAM,eAAe,CAAC;AAKvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D;;GAEG;AAMH,MAAM,OAAO,cAAc;;8BAKgB,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;uBAIrB,cAAc,CAAC,gBAAgB;oBAKlC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;sBAMxB,CAAC;qBAMF,CAAC;;EAMrB,QAAQ;IACZ,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;IACtC,IAAI,CAAC,oBAAoB,EAAE,CAAC;EAChC,CAAC;EAEO,QAAQ;IACZ,IAAI,IAAI,CAAC,eAAe,EAAE,EAAE;MACxB,IAAI,CAAC,WAAW,EAAE,CAAC;MACnB,IAAI,CAAC,oBAAoB,EAAE,CAAC;KAC/B;EACL,CAAC;EAEO,eAA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ACL,UAAI,KAAK,EAAC,kBAAkB,EAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;cAC1D,EAAC,mBAAmB,IAAC,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,EAAE,KAAK,EAAC,MAAM,EAAC,MAAM,SAAuB,CAC9F,CACJ,CACH,CACJ,CACH,CAAC,CAAA;EACZ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAlIe,+BAAgB,GAAW,CAAC,CAAC","sourcesContent":["import {\n Component,\n ComponentInterface,\n Event, EventEmitter,\n h,\n Host,\n Prop\n} from '@stencil/core';\nimport {\n WcsGridPaginationChangeEventDetails\n} from '../grid/grid-interface';\nimport { SelectChangeEventDetail } from '../select/select-interface';\nimport { GridPaginationArrow } from './grid-pagination-arrow';\n\n/**\n * The grid pagination is a subcomponent of `wcs-grid`, slotted in `grid-pagination` under the `<table>` element.\n */\n@Component({\n tag: 'wcs-grid-pagination',\n styleUrl: 'grid-pagination.scss',\n shadow: true\n})\nexport class GridPagination implements ComponentInterface {\n static readonly INDEX_FIRST_PAGE: number = 0;\n /**\n * Set the available page sizes in the pagination dropdown on the left.\n */\n @Prop() availablePageSizes: number[] = [10, 20, 50];\n /**\n * The current page of the pagination. First page starts at index 0.\n */\n @Prop() currentPage: number = GridPagination.INDEX_FIRST_PAGE;\n /**\n * Maximum number of elements shown per page. \n * Default is the first value of `availablePageSizes`.\n */\n @Prop() pageSize: number = this.availablePageSizes[0];\n /**\n * Total elements in the grid. \n * - **Grid in `Server mode`** : You have to set `itemsCount` = your total data length. \n * - **Grid not in Server mode** : Do not set it manually : itemsCount is set and updated every pagination refresh.\n */\n @Prop() itemsCount: number = 0;\n /**\n * Max number of pages. \n * - **Grid in `Server mode`** : You have to set `pageCount` = `itemsCount` divided by `pageSize`. \n * - **Grid not in Server mode** : Do not set it manually : pageCount is set and updated every pagination refresh.\n */\n @Prop() pageCount: number = 1;\n /**\n * Event emitted when the pagination changes.\n */\n @Event() wcsGridPaginationChange!: EventEmitter<WcsGridPaginationChangeEventDetails>;\n\n private lastPage(): void {\n this.currentPage = this.pageCount - 1;\n this.emitPaginationChange();\n }\n\n private nextPage(): void {\n if (this.canGoToNextPage()) {\n this.currentPage++;\n this.emitPaginationChange();\n }\n }\n\n private canGoToNextPage(): boolean {\n return this.currentPage + 1 < this.pageCount;\n }\n\n private previousPage(): void {\n if (this.canGoToPreviousPage()) {\n this.currentPage--;\n this.emitPaginationChange();\n }\n }\n\n private canGoToPreviousPage(): boolean {\n return this.currentPage > 0;\n }\n\n private firstPage(): void {\n this.currentPage = 0;\n this.emitPaginationChange();\n }\n\n private onChangePagesize(event: CustomEvent<SelectChangeEventDetail>): void {\n this.pageSize = event.detail.value;\n if (this.currentPage + 1 > this.pageSize) {\n this.currentPage = 0;\n }\n this.emitPaginationChange();\n }\n\n private emitPaginationChange(): void {\n this.wcsGridPaginationChange.emit({\n pagination: {\n currentPage: this.currentPage,\n pageSize: this.pageSize,\n itemsCount: this.itemsCount,\n pageCount: this.pageCount\n }\n });\n }\n\n render(): any {\n return (<Host slot=\"grid-pagination\">\n <div class=\"container\">\n <div class=\"page-size\">\n <wcs-select placeholder=\"Eléments par page\"\n class=\"available-page-sizes\"\n aria-labelledby=\"elements-per-page-number elements-per-page-text\"\n value={this.pageSize}\n onWcsChange={this.onChangePagesize.bind(this)}>\n {\n this.availablePageSizes.map((pageSize) =>\n <wcs-select-option value={pageSize}>{pageSize}</wcs-select-option>\n )\n }\n </wcs-select>\n <span id=\"elements-per-page-number\" hidden>{this.pageSize}</span>\n <span id=\"elements-per-page-text\">&nbsp;éléments par page</span>\n </div>\n\n <div class=\"items-count\">\n <span>{this.itemsCount} éléments</span>\n </div>\n\n <nav aria-label=\"pagination\">\n <ul class=\"page-management\">\n <li class=\"pagination-arrow\" onClick={this.firstPage.bind(this)}>\n <GridPaginationArrow active={this.canGoToPreviousPage()} order=\"previous\" double></GridPaginationArrow>\n </li>\n <li class=\"pagination-arrow\" onClick={this.previousPage.bind(this)}>\n <GridPaginationArrow active={this.canGoToPreviousPage()} order=\"previous\"></GridPaginationArrow>\n </li>\n \n <li class=\"pagination-counter\">\n <span aria-label={`Page ${this.currentPage + 1} sur ${this.pageCount}`} aria-current=\"page\">\n {this.currentPage + 1} / {this.pageCount}\n </span>\n </li>\n \n <li class=\"pagination-arrow\" onClick={this.nextPage.bind(this)}>\n <GridPaginationArrow active={this.canGoToNextPage()} order=\"next\"></GridPaginationArrow>\n </li>\n <li class=\"pagination-arrow\" onClick={this.lastPage.bind(this)}>\n <GridPaginationArrow active={this.canGoToNextPage()} order=\"next\" double></GridPaginationArrow>\n </li>\n </ul>\n </nav>\n </div>\n </Host>)\n }\n}\n"]}
@@ -1,8 +1,20 @@
1
1
  import { Build, h, Host } from '@stencil/core';
2
- import { debounceEvent, findItemLabel, inheritAttributes } from '../../utils/helpers';
2
+ import { debounceEvent, findItemLabel, inheritAriaAttributes, inheritAttributes } from '../../utils/helpers';
3
3
  import { isWcsInputSize, WcsInputSizeValues } from './input-interface';
4
4
  /**
5
- * Mainly inspired from Ionic Input Component
5
+ * The input component is a form control that accepts a single line of text.
6
+ * Implementation mainly inspired from Ionic Input Component.
7
+ *
8
+ *
9
+ * <details>
10
+ * <summary>Accessibility guidelines 💡</summary>
11
+ * > - Provide a `<wcs-label>` next to the input
12
+ * > - Use the `disabled` prop to add the HTML `disabled` attribute to the `input`
13
+ * > - Use the `readonly` prop to add the HTML `readonly` attribute to the `input`
14
+ * > - Use the `autofocus` prop to add the HTML `autofocus` attribute to the `input`. Use it if you want your input focus
15
+ * automatically when the page load
16
+ * > - Adapt the `type` to lets user enter information more easily (_ex: `type="number"` for an input which only accept numbers entry_)
17
+ * </details>
6
18
  */
7
19
  export class Input {
8
20
  constructor() {
@@ -17,6 +29,9 @@ export class Input {
17
29
  }
18
30
  this.wcsInput.emit(ev);
19
31
  };
32
+ this.onChange = (_) => {
33
+ this.wcsChange.emit({ value: this.nativeInput.value });
34
+ };
20
35
  this.onBlur = (ev) => {
21
36
  this.hasFocus = false;
22
37
  this.focusChanged();
@@ -97,15 +112,8 @@ export class Input {
97
112
  debounceChanged() {
98
113
  this.wcsChange = debounceEvent(this.wcsChange, this.debounce);
99
114
  }
100
- /**
101
- * Update the native input element when the value changes
102
- */
103
- valueChanged() {
104
- var _a;
105
- this.wcsChange.emit({ value: (_a = this.value) === null || _a === void 0 ? void 0 : _a.toString() });
106
- }
107
115
  componentWillLoad() {
108
- this.inheritedAttributes = inheritAttributes(this.el, ['aria-label', 'tabindex', 'title']);
116
+ this.inheritedAttributes = Object.assign(Object.assign({}, inheritAriaAttributes(this.el)), inheritAttributes(this.el, ['tabindex', 'title']));
109
117
  if (!isWcsInputSize(this.size)) {
110
118
  console.error(`Invalid size value for wcs-input : "${this.size}". Must be one of "${WcsInputSizeValues.join(', ')}"`);
111
119
  this.size = "m"; // Default fallback value
@@ -151,13 +159,18 @@ export class Input {
151
159
  getInputElement() {
152
160
  return Promise.resolve(this.nativeInput);
153
161
  }
162
+ async setAriaAttribute(attr, value) {
163
+ if (this.nativeInput) {
164
+ this.nativeInput.setAttribute(attr, value);
165
+ }
166
+ }
154
167
  shouldClearOnEdit() {
155
168
  const { type, clearOnEdit } = this;
156
169
  return (clearOnEdit === undefined)
157
170
  ? type === 'password'
158
171
  : clearOnEdit;
159
172
  }
160
- getValue() {
173
+ getValueAsString() {
161
174
  return typeof this.value === 'number' ? this.value.toString() :
162
175
  (this.value || '').toString();
163
176
  }
@@ -168,7 +181,7 @@ export class Input {
168
181
  }
169
182
  }
170
183
  hasValue() {
171
- return this.getValue().length > 0;
184
+ return this.getValueAsString().length > 0;
172
185
  }
173
186
  passwordRevealIconClick() {
174
187
  this.passwordReveal = !this.passwordReveal;
@@ -177,13 +190,13 @@ export class Input {
177
190
  this.iconPassword = this.passwordReveal ? 'visibility_off' : 'visibility';
178
191
  }
179
192
  render() {
180
- const value = this.getValue();
193
+ const value = this.getValueAsString();
181
194
  const labelId = this.inputId + '-lbl';
182
195
  const label = findItemLabel(this.el);
183
196
  if (label) {
184
197
  label.id = labelId;
185
198
  }
186
- return (h(Host, { "aria-disabled": this.disabled ? 'true' : null, "data-has-prefix": !!this.prefixLabel, "data-has-suffix": !!this.suffixLabel }, this.prefixLabel ? (h("span", { class: "prefix", part: "prefix" }, this.prefixLabel)) : null, this.icon ? (h("wcs-mat-icon", { icon: this.icon, size: "m" })) : null, h("input", Object.assign({ class: "native-input", ref: input => this.nativeInput = input, "aria-labelledby": label ? labelId : null, disabled: this.disabled, accept: this.accept, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder || '', readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, type: this.passwordReveal ? 'text' : this.type, value: value, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeydown }, this.inheritedAttributes)), this.type === "password" ? (h("wcs-mat-icon", { class: "toggle_password", icon: this.iconPassword, size: "m", onClick: () => this.passwordRevealIconClick() })) : null, this.suffixLabel ? (h("span", { class: "suffix", part: "suffix" }, this.suffixLabel)) : null));
199
+ return (h(Host, { "aria-disabled": this.disabled ? 'true' : null, "data-has-prefix": !!this.prefixLabel, "data-has-suffix": !!this.suffixLabel }, this.prefixLabel ? (h("span", { class: "prefix", part: "prefix" }, this.prefixLabel)) : null, this.icon ? (h("wcs-mat-icon", { icon: this.icon, size: "m" })) : null, h("input", Object.assign({ class: "native-input", ref: input => this.nativeInput = input, "aria-labelledby": label ? labelId : null, disabled: this.disabled, accept: this.accept, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder || '', readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, type: this.passwordReveal ? 'text' : this.type, value: value, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeydown }, this.inheritedAttributes)), this.type === "password" ? (h("wcs-mat-icon", { class: "toggle_password", icon: this.iconPassword, size: "m", onClick: () => this.passwordRevealIconClick() })) : null, this.suffixLabel ? (h("span", { class: "suffix", part: "suffix" }, this.suffixLabel)) : null));
187
200
  }
188
201
  static get is() { return "wcs-input"; }
189
202
  static get encapsulation() { return "shadow"; }
@@ -233,7 +246,7 @@ export class Input {
233
246
  "optional": true,
234
247
  "docs": {
235
248
  "tags": [],
236
- "text": "If the value of the type attribute is `\"file\"`, then this attribute will indicate the types of files that the server accepts, otherwise it will be ignored. The value must be a comma-separated list of unique content type specifiers."
249
+ "text": "If the value of the type attribute is `\"file\"`, then this attribute will indicate the types of files that the\nserver accepts, otherwise it will be ignored. The value must be a comma-separated list of unique content type specifiers."
237
250
  },
238
251
  "attribute": "accept",
239
252
  "reflect": false
@@ -345,7 +358,7 @@ export class Input {
345
358
  "optional": true,
346
359
  "docs": {
347
360
  "tags": [],
348
- "text": "If `true`, the value will be cleared after focus upon edit. Defaults to `true` when `type` is `\"password\"`, `false` for all other types."
361
+ "text": "If `true`, the value will be cleared after focus upon edit.\nDefaults to `true` when `type` is `\"password\"`, `false` for all other types."
349
362
  },
350
363
  "attribute": "clear-on-edit",
351
364
  "reflect": false
@@ -362,7 +375,7 @@ export class Input {
362
375
  "optional": false,
363
376
  "docs": {
364
377
  "tags": [],
365
- "text": "Set the amount of time, in milliseconds, to wait to trigger the `wcsChange` event after each keystroke. This also impacts form bindings such as `ngModel` or `v-model`."
378
+ "text": "Set the amount of time, in milliseconds, to wait to trigger the `wcsChange` event after each keystroke.\nThis also impacts form bindings such as `ngModel` or `v-model`."
366
379
  },
367
380
  "attribute": "debounce",
368
381
  "reflect": false,
@@ -523,7 +536,7 @@ export class Input {
523
536
  "optional": true,
524
537
  "docs": {
525
538
  "tags": [],
526
- "text": "If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the maximum number of characters that the user can enter."
539
+ "text": "If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute\nspecifies the maximum number of characters that the user can enter."
527
540
  },
528
541
  "attribute": "maxlength",
529
542
  "reflect": false
@@ -557,7 +570,7 @@ export class Input {
557
570
  "optional": true,
558
571
  "docs": {
559
572
  "tags": [],
560
- "text": "If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the minimum number of characters that the user can enter."
573
+ "text": "If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute\nspecifies the minimum number of characters that the user can enter."
561
574
  },
562
575
  "attribute": "minlength",
563
576
  "reflect": false
@@ -574,7 +587,7 @@ export class Input {
574
587
  "optional": true,
575
588
  "docs": {
576
589
  "tags": [],
577
- "text": "If `true`, the user can enter more than one value. This attribute applies when the type attribute is set to `\"email\"` or `\"file\"`, otherwise it is ignored."
590
+ "text": "If `true`, the user can enter more than one value. This attribute applies when the type attribute is set to\n`\"email\"` or `\"file\"`, otherwise it is ignored."
578
591
  },
579
592
  "attribute": "multiple",
580
593
  "reflect": false
@@ -609,7 +622,7 @@ export class Input {
609
622
  "optional": true,
610
623
  "docs": {
611
624
  "tags": [],
612
- "text": "A regular expression that the value is checked against. The pattern must match the entire value, not just some subset. Use the title attribute to describe the pattern to help the user. This attribute applies when the value of the type attribute is `\"text\"`, `\"search\"`, `\"tel\"`, `\"url\"`, `\"email\"`, `\"date\"`, or `\"password\"`, otherwise it is ignored. When the type attribute is `\"date\"`, `pattern` will only be used in browsers that do not support the `\"date\"` input type natively. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date for more information."
625
+ "text": "A regular expression that the value is checked against. The pattern must match the entire value, not just some\nsubset. Use the title attribute to describe the pattern to help the user. This attribute applies when the value\nof the type attribute is `\"text\"`, `\"search\"`, `\"tel\"`, `\"url\"`, `\"email\"`, `\"date\"`, or `\"password\"`, otherwise\nit is ignored. When the type attribute is `\"date\"`, `pattern` will only be used in browsers that do not support\nthe `\"date\"` input type natively. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date for\nmore information."
613
626
  },
614
627
  "attribute": "pattern",
615
628
  "reflect": false
@@ -697,7 +710,7 @@ export class Input {
697
710
  "optional": false,
698
711
  "docs": {
699
712
  "tags": [],
700
- "text": "Specifies the state of the input. By default the input is in an normal state but you can to set it to 'error' state if the data given by the user is not valid."
713
+ "text": "Specifies the state of the input. By default the input is in an normal state but you can to set it to 'error'\nstate if the data given by the user is not valid."
701
714
  },
702
715
  "attribute": "state",
703
716
  "reflect": true,
@@ -778,7 +791,7 @@ export class Input {
778
791
  "composed": true,
779
792
  "docs": {
780
793
  "tags": [],
781
- "text": "Emitted when a keyboard input occurred."
794
+ "text": "Emitted when a keyboard input occurred. See https://developer.mozilla.org/en-US/docs/Web/Events/input"
782
795
  },
783
796
  "complexType": {
784
797
  "original": "KeyboardEvent",
@@ -797,7 +810,7 @@ export class Input {
797
810
  "composed": true,
798
811
  "docs": {
799
812
  "tags": [],
800
- "text": "Emitted when the value has changed."
813
+ "text": "Emitted when the value has changed. See https://developer.mozilla.org/en-US/docs/Web/Events/change"
801
814
  },
802
815
  "complexType": {
803
816
  "original": "InputChangeEventDetail",
@@ -866,7 +879,7 @@ export class Input {
866
879
  "text": "",
867
880
  "tags": [{
868
881
  "name": "deprecated",
869
- "text": "use the native focus method instead \nSets focus on the native `input` in `wcs-input`."
882
+ "text": "use the native focus method instead\nSets focus on the native `input` in `wcs-input`."
870
883
  }]
871
884
  }
872
885
  },
@@ -907,6 +920,32 @@ export class Input {
907
920
  "text": "Returns the native `<input>` element used under the hood.",
908
921
  "tags": []
909
922
  }
923
+ },
924
+ "setAriaAttribute": {
925
+ "complexType": {
926
+ "signature": "(attr: AriaAttributeName, value: string) => Promise<void>",
927
+ "parameters": [{
928
+ "tags": [],
929
+ "text": ""
930
+ }, {
931
+ "tags": [],
932
+ "text": ""
933
+ }],
934
+ "references": {
935
+ "Promise": {
936
+ "location": "global"
937
+ },
938
+ "AriaAttributeName": {
939
+ "location": "import",
940
+ "path": "../../utils/mutable-aria-attribute"
941
+ }
942
+ },
943
+ "return": "Promise<void>"
944
+ },
945
+ "docs": {
946
+ "text": "",
947
+ "tags": []
948
+ }
910
949
  }
911
950
  };
912
951
  }
@@ -915,9 +954,6 @@ export class Input {
915
954
  return [{
916
955
  "propName": "debounce",
917
956
  "methodName": "debounceChanged"
918
- }, {
919
- "propName": "value",
920
- "methodName": "valueChanged"
921
957
  }, {
922
958
  "propName": "passwordReveal",
923
959
  "methodName": "onPasswordRevealChange"