genesys-spark-components 3.13.1 → 3.14.2

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 (406) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/en-dc1f49b7.js +30 -0
  3. package/dist/cjs/genesys-webcomponents.cjs.js +2 -2
  4. package/dist/cjs/gux-accordion-legacy.cjs.entry.js +2 -2
  5. package/dist/cjs/gux-accordion-section.cjs.entry.js +14 -3
  6. package/dist/cjs/gux-accordion.cjs.entry.js +2 -2
  7. package/dist/cjs/gux-action-button-legacy.cjs.entry.js +4 -4
  8. package/dist/cjs/gux-action-button.cjs.entry.js +4 -4
  9. package/dist/cjs/gux-action-item.cjs.entry.js +1 -1
  10. package/dist/cjs/gux-action-list-divider.cjs.entry.js +1 -1
  11. package/dist/cjs/gux-action-list-legacy.cjs.entry.js +2 -2
  12. package/dist/cjs/gux-action-toast.cjs.entry.js +2 -2
  13. package/dist/cjs/gux-advanced-dropdown.cjs.entry.js +5 -14
  14. package/dist/cjs/gux-all-row-select.cjs.entry.js +3 -3
  15. package/dist/cjs/gux-badge-beta.cjs.entry.js +3 -3
  16. package/dist/cjs/gux-breadcrumb-item.cjs.entry.js +1 -1
  17. package/dist/cjs/gux-breadcrumbs.cjs.entry.js +3 -3
  18. package/dist/cjs/gux-button-multi-legacy.cjs.entry.js +3 -3
  19. package/dist/cjs/gux-button-multi.cjs.entry.js +3 -3
  20. package/dist/cjs/gux-button-slot-beta.cjs.entry.js +2 -2
  21. package/dist/cjs/gux-button.cjs.entry.js +2 -2
  22. package/dist/cjs/gux-calendar.cjs.entry.js +3 -3
  23. package/dist/cjs/gux-card-beta.cjs.entry.js +2 -2
  24. package/dist/cjs/gux-chart-column-beta.cjs.entry.js +2 -2
  25. package/dist/cjs/gux-chart-donut-beta.cjs.entry.js +2 -2
  26. package/dist/cjs/gux-chart-line-beta.cjs.entry.js +2 -2
  27. package/dist/cjs/gux-chart-pie-beta.cjs.entry.js +2 -2
  28. package/dist/cjs/gux-chart-scatter-plot-beta.cjs.entry.js +2 -2
  29. package/dist/cjs/gux-color-select_2.cjs.entry.js +1 -1
  30. package/dist/cjs/gux-command-action.cjs.entry.js +1 -1
  31. package/dist/cjs/gux-command-palette-legacy.cjs.entry.js +3 -3
  32. package/dist/cjs/gux-content-search.cjs.entry.js +3 -3
  33. package/dist/cjs/gux-copy-to-clipboard-beta.cjs.entry.js +3 -3
  34. package/dist/cjs/gux-datepicker.cjs.entry.js +4 -4
  35. package/dist/cjs/gux-disclosure-button.cjs.entry.js +3 -3
  36. package/dist/cjs/gux-dismiss-button.cjs.entry.js +3 -3
  37. package/dist/cjs/gux-dropdown-legacy.cjs.entry.js +4 -4
  38. package/dist/cjs/gux-dropdown-multi-beta.cjs.entry.js +4 -4
  39. package/dist/cjs/gux-dropdown-multi-tag.cjs.entry.js +2 -2
  40. package/dist/cjs/gux-dropdown-option.cjs.entry.js +1 -1
  41. package/dist/cjs/gux-dropdown_3.cjs.entry.js +4 -4
  42. package/dist/cjs/gux-error-message-beta.cjs.entry.js +2 -2
  43. package/dist/cjs/gux-flyout-menu-beta.cjs.entry.js +2 -2
  44. package/dist/cjs/gux-form-field-checkbox.cjs.entry.js +4 -4
  45. package/dist/cjs/gux-form-field-color.cjs.entry.js +5 -5
  46. package/dist/cjs/gux-form-field-dropdown.cjs.entry.js +5 -5
  47. package/dist/cjs/gux-form-field-input-clear-button.cjs.entry.js +3 -3
  48. package/dist/cjs/{gux-form-field-label-abbb7396.js → gux-form-field-label-d5088b51.js} +1 -1
  49. package/dist/cjs/gux-form-field-legacy.cjs.entry.js +3 -3
  50. package/dist/cjs/gux-form-field-number.cjs.entry.js +6 -6
  51. package/dist/cjs/gux-form-field-radio.cjs.entry.js +4 -4
  52. package/dist/cjs/gux-form-field-range.cjs.entry.js +5 -5
  53. package/dist/cjs/gux-form-field-search.cjs.entry.js +5 -5
  54. package/dist/cjs/gux-form-field-select.cjs.entry.js +5 -5
  55. package/dist/cjs/gux-form-field-text-like.cjs.entry.js +5 -5
  56. package/dist/cjs/gux-form-field-textarea.cjs.entry.js +5 -5
  57. package/dist/cjs/{gux-form-field.service-21126f1d.js → gux-form-field.service-e38b2c2f.js} +1 -1
  58. package/dist/cjs/gux-icon.cjs.entry.js +2 -2
  59. package/dist/cjs/gux-input-checkbox_7.cjs.entry.js +2 -2
  60. package/dist/cjs/gux-input-search.cjs.entry.js +2 -2
  61. package/dist/cjs/gux-input-text-like.cjs.entry.js +2 -2
  62. package/dist/cjs/gux-list-divider-legacy.cjs.entry.js +1 -1
  63. package/dist/cjs/gux-list-divider.cjs.entry.js +1 -1
  64. package/dist/cjs/gux-list-item-legacy_2.cjs.entry.js +2 -2
  65. package/dist/cjs/gux-list-item.cjs.entry.js +1 -1
  66. package/dist/cjs/gux-list.cjs.entry.js +2 -2
  67. package/dist/cjs/gux-listbox-multi.cjs.entry.js +3 -3
  68. package/dist/cjs/gux-loading-message-beta.cjs.entry.js +2 -2
  69. package/dist/cjs/gux-menu-option.cjs.entry.js +1 -1
  70. package/dist/cjs/gux-menu.cjs.entry.js +1 -1
  71. package/dist/cjs/gux-modal.cjs.entry.js +2 -2
  72. package/dist/cjs/gux-notification-toast.cjs.entry.js +2 -2
  73. package/dist/cjs/gux-option-legacy.cjs.entry.js +1 -1
  74. package/dist/cjs/gux-option-multi.cjs.entry.js +1 -1
  75. package/dist/cjs/gux-page-loading-spinner.cjs.entry.js +2 -2
  76. package/dist/cjs/gux-pagination-beta.cjs.entry.js +2 -2
  77. package/dist/cjs/gux-pagination-buttons-beta_3.cjs.entry.js +2 -2
  78. package/dist/cjs/gux-pagination-buttons_3.cjs.entry.js +2 -2
  79. package/dist/cjs/gux-pagination-cursor.cjs.entry.js +3 -3
  80. package/dist/cjs/gux-pagination.cjs.entry.js +2 -2
  81. package/dist/cjs/gux-panel-frame-legacy.cjs.entry.js +2 -2
  82. package/dist/cjs/gux-popover-list.cjs.entry.js +3 -3
  83. package/dist/cjs/gux-popover.cjs.entry.js +3 -3
  84. package/dist/cjs/gux-popup.cjs.entry.js +1 -1
  85. package/dist/cjs/gux-radial-loading.cjs.entry.js +3 -3
  86. package/dist/cjs/gux-radial-progress.cjs.entry.js +2 -2
  87. package/dist/cjs/gux-rating.cjs.entry.js +2 -2
  88. package/dist/cjs/gux-row-select.cjs.entry.js +3 -3
  89. package/dist/cjs/gux-side-panel-button.cjs.entry.js +1 -1
  90. package/dist/cjs/gux-side-panel-legacy.cjs.entry.js +2 -2
  91. package/dist/cjs/gux-simple-toast.cjs.entry.js +2 -2
  92. package/dist/cjs/gux-sort-control.cjs.entry.js +98 -22
  93. package/dist/cjs/gux-submenu.cjs.entry.js +1 -1
  94. package/dist/cjs/gux-switch-item.cjs.entry.js +1 -1
  95. package/dist/cjs/gux-switch.cjs.entry.js +2 -2
  96. package/dist/cjs/gux-tab-advanced-list.cjs.entry.js +3 -3
  97. package/dist/cjs/gux-tab-advanced-panel.cjs.entry.js +1 -1
  98. package/dist/cjs/gux-tab-advanced.cjs.entry.js +2 -2
  99. package/dist/cjs/gux-tab-dropdown-option-legacy.cjs.entry.js +1 -1
  100. package/dist/cjs/gux-tab-legacy.cjs.entry.js +1 -1
  101. package/dist/cjs/gux-tab-list.cjs.entry.js +3 -3
  102. package/dist/cjs/gux-tab-panel.cjs.entry.js +1 -1
  103. package/dist/cjs/gux-tab.cjs.entry.js +1 -1
  104. package/dist/cjs/gux-table-beta.cjs.entry.js +4 -71
  105. package/dist/cjs/gux-table-select-menu.cjs.entry.js +3 -3
  106. package/dist/cjs/gux-table-select-popover.cjs.entry.js +2 -2
  107. package/dist/cjs/gux-tabs-advanced.cjs.entry.js +2 -2
  108. package/dist/cjs/gux-tabs-legacy.cjs.entry.js +3 -3
  109. package/dist/cjs/gux-tabs.cjs.entry.js +2 -2
  110. package/dist/cjs/gux-tag-beta.cjs.entry.js +3 -3
  111. package/dist/cjs/gux-text-highlight.cjs.entry.js +2 -2
  112. package/dist/cjs/gux-text-label-legacy.cjs.entry.js +2 -2
  113. package/dist/cjs/gux-time-picker-beta.cjs.entry.js +4 -4
  114. package/dist/cjs/gux-toggle-slider.cjs.entry.js +1 -1
  115. package/dist/cjs/gux-toggle.cjs.entry.js +3 -3
  116. package/dist/cjs/gux-tooltip_2.cjs.entry.js +3 -3
  117. package/dist/cjs/gux-visualization-beta.cjs.entry.js +3 -3
  118. package/dist/cjs/{index-0d3a5385.js → index-0a991c77.js} +1 -1
  119. package/dist/cjs/{index-525cfec0.js → index-33b1b88e.js} +0 -2
  120. package/dist/cjs/loader.cjs.js +2 -2
  121. package/dist/cjs/{on-click-outside-e0d28eff.js → on-click-outside-246a1eb3.js} +1 -1
  122. package/dist/cjs/{on-mutation-347de78d.js → on-mutation-2e4dd956.js} +1 -1
  123. package/dist/cjs/on-mutation-8f8a4460.js +13 -0
  124. package/dist/cjs/{usage-tracking-0403833a.js → usage-tracking-485ec37b.js} +1 -1
  125. package/dist/collection/components/beta/gux-table/gux-sort-control/gux-sort-control.css +32 -18
  126. package/dist/collection/components/beta/gux-table/gux-sort-control/gux-sort-control.js +144 -29
  127. package/dist/collection/components/beta/gux-table/gux-sort-control/tests/gux-sort-control.markup.js +82 -0
  128. package/dist/collection/components/beta/gux-table/gux-table.js +1 -68
  129. package/dist/collection/components/stable/gux-accordion/gux-accordion-section/gux-accordion-section.css +4 -0
  130. package/dist/collection/components/stable/gux-accordion/gux-accordion-section/gux-accordion-section.js +15 -4
  131. package/dist/deploy-info.json +3 -3
  132. package/dist/esm/en-66f138f8.js +28 -0
  133. package/dist/esm/genesys-webcomponents.js +2 -2
  134. package/dist/esm/gux-accordion-legacy.entry.js +2 -2
  135. package/dist/esm/gux-accordion-section.entry.js +14 -3
  136. package/dist/esm/gux-accordion.entry.js +2 -2
  137. package/dist/esm/gux-action-button-legacy.entry.js +4 -4
  138. package/dist/esm/gux-action-button.entry.js +4 -4
  139. package/dist/esm/gux-action-item.entry.js +1 -1
  140. package/dist/esm/gux-action-list-divider.entry.js +1 -1
  141. package/dist/esm/gux-action-list-legacy.entry.js +2 -2
  142. package/dist/esm/gux-action-toast.entry.js +2 -2
  143. package/dist/esm/gux-advanced-dropdown.entry.js +4 -13
  144. package/dist/esm/gux-all-row-select.entry.js +3 -3
  145. package/dist/esm/gux-badge-beta.entry.js +3 -3
  146. package/dist/esm/gux-breadcrumb-item.entry.js +1 -1
  147. package/dist/esm/gux-breadcrumbs.entry.js +3 -3
  148. package/dist/esm/gux-button-multi-legacy.entry.js +3 -3
  149. package/dist/esm/gux-button-multi.entry.js +3 -3
  150. package/dist/esm/gux-button-slot-beta.entry.js +2 -2
  151. package/dist/esm/gux-button.entry.js +2 -2
  152. package/dist/esm/gux-calendar.entry.js +3 -3
  153. package/dist/esm/gux-card-beta.entry.js +2 -2
  154. package/dist/esm/gux-chart-column-beta.entry.js +2 -2
  155. package/dist/esm/gux-chart-donut-beta.entry.js +2 -2
  156. package/dist/esm/gux-chart-line-beta.entry.js +2 -2
  157. package/dist/esm/gux-chart-pie-beta.entry.js +2 -2
  158. package/dist/esm/gux-chart-scatter-plot-beta.entry.js +2 -2
  159. package/dist/esm/gux-color-select_2.entry.js +1 -1
  160. package/dist/esm/gux-command-action.entry.js +1 -1
  161. package/dist/esm/gux-command-palette-legacy.entry.js +3 -3
  162. package/dist/esm/gux-content-search.entry.js +3 -3
  163. package/dist/esm/gux-copy-to-clipboard-beta.entry.js +3 -3
  164. package/dist/esm/gux-datepicker.entry.js +4 -4
  165. package/dist/esm/gux-disclosure-button.entry.js +3 -3
  166. package/dist/esm/gux-dismiss-button.entry.js +3 -3
  167. package/dist/esm/gux-dropdown-legacy.entry.js +4 -4
  168. package/dist/esm/gux-dropdown-multi-beta.entry.js +4 -4
  169. package/dist/esm/gux-dropdown-multi-tag.entry.js +2 -2
  170. package/dist/esm/gux-dropdown-option.entry.js +1 -1
  171. package/dist/esm/gux-dropdown_3.entry.js +4 -4
  172. package/dist/esm/gux-error-message-beta.entry.js +2 -2
  173. package/dist/esm/gux-flyout-menu-beta.entry.js +2 -2
  174. package/dist/esm/gux-form-field-checkbox.entry.js +4 -4
  175. package/dist/esm/gux-form-field-color.entry.js +5 -5
  176. package/dist/esm/gux-form-field-dropdown.entry.js +5 -5
  177. package/dist/esm/gux-form-field-input-clear-button.entry.js +3 -3
  178. package/dist/esm/{gux-form-field-label-1d0c1a02.js → gux-form-field-label-ac49a8be.js} +1 -1
  179. package/dist/esm/gux-form-field-legacy.entry.js +3 -3
  180. package/dist/esm/gux-form-field-number.entry.js +6 -6
  181. package/dist/esm/gux-form-field-radio.entry.js +4 -4
  182. package/dist/esm/gux-form-field-range.entry.js +5 -5
  183. package/dist/esm/gux-form-field-search.entry.js +5 -5
  184. package/dist/esm/gux-form-field-select.entry.js +5 -5
  185. package/dist/esm/gux-form-field-text-like.entry.js +5 -5
  186. package/dist/esm/gux-form-field-textarea.entry.js +5 -5
  187. package/dist/esm/{gux-form-field.service-4bfd6534.js → gux-form-field.service-4ad30790.js} +1 -1
  188. package/dist/esm/gux-icon.entry.js +2 -2
  189. package/dist/esm/gux-input-checkbox_7.entry.js +2 -2
  190. package/dist/esm/gux-input-search.entry.js +2 -2
  191. package/dist/esm/gux-input-text-like.entry.js +2 -2
  192. package/dist/esm/gux-list-divider-legacy.entry.js +1 -1
  193. package/dist/esm/gux-list-divider.entry.js +1 -1
  194. package/dist/esm/gux-list-item-legacy_2.entry.js +2 -2
  195. package/dist/esm/gux-list-item.entry.js +1 -1
  196. package/dist/esm/gux-list.entry.js +2 -2
  197. package/dist/esm/gux-listbox-multi.entry.js +3 -3
  198. package/dist/esm/gux-loading-message-beta.entry.js +2 -2
  199. package/dist/esm/gux-menu-option.entry.js +1 -1
  200. package/dist/esm/gux-menu.entry.js +1 -1
  201. package/dist/esm/gux-modal.entry.js +2 -2
  202. package/dist/esm/gux-notification-toast.entry.js +2 -2
  203. package/dist/esm/gux-option-legacy.entry.js +1 -1
  204. package/dist/esm/gux-option-multi.entry.js +1 -1
  205. package/dist/esm/gux-page-loading-spinner.entry.js +2 -2
  206. package/dist/esm/gux-pagination-beta.entry.js +2 -2
  207. package/dist/esm/gux-pagination-buttons-beta_3.entry.js +2 -2
  208. package/dist/esm/gux-pagination-buttons_3.entry.js +2 -2
  209. package/dist/esm/gux-pagination-cursor.entry.js +3 -3
  210. package/dist/esm/gux-pagination.entry.js +2 -2
  211. package/dist/esm/gux-panel-frame-legacy.entry.js +2 -2
  212. package/dist/esm/gux-popover-list.entry.js +3 -3
  213. package/dist/esm/gux-popover.entry.js +3 -3
  214. package/dist/esm/gux-popup.entry.js +1 -1
  215. package/dist/esm/gux-radial-loading.entry.js +3 -3
  216. package/dist/esm/gux-radial-progress.entry.js +2 -2
  217. package/dist/esm/gux-rating.entry.js +2 -2
  218. package/dist/esm/gux-row-select.entry.js +3 -3
  219. package/dist/esm/gux-side-panel-button.entry.js +1 -1
  220. package/dist/esm/gux-side-panel-legacy.entry.js +2 -2
  221. package/dist/esm/gux-simple-toast.entry.js +2 -2
  222. package/dist/esm/gux-sort-control.entry.js +98 -22
  223. package/dist/esm/gux-submenu.entry.js +1 -1
  224. package/dist/esm/gux-switch-item.entry.js +1 -1
  225. package/dist/esm/gux-switch.entry.js +2 -2
  226. package/dist/esm/gux-tab-advanced-list.entry.js +3 -3
  227. package/dist/esm/gux-tab-advanced-panel.entry.js +1 -1
  228. package/dist/esm/gux-tab-advanced.entry.js +2 -2
  229. package/dist/esm/gux-tab-dropdown-option-legacy.entry.js +1 -1
  230. package/dist/esm/gux-tab-legacy.entry.js +1 -1
  231. package/dist/esm/gux-tab-list.entry.js +3 -3
  232. package/dist/esm/gux-tab-panel.entry.js +1 -1
  233. package/dist/esm/gux-tab.entry.js +1 -1
  234. package/dist/esm/gux-table-beta.entry.js +4 -71
  235. package/dist/esm/gux-table-select-menu.entry.js +3 -3
  236. package/dist/esm/gux-table-select-popover.entry.js +2 -2
  237. package/dist/esm/gux-tabs-advanced.entry.js +2 -2
  238. package/dist/esm/gux-tabs-legacy.entry.js +3 -3
  239. package/dist/esm/gux-tabs.entry.js +2 -2
  240. package/dist/esm/gux-tag-beta.entry.js +3 -3
  241. package/dist/esm/gux-text-highlight.entry.js +2 -2
  242. package/dist/esm/gux-text-label-legacy.entry.js +2 -2
  243. package/dist/esm/gux-time-picker-beta.entry.js +4 -4
  244. package/dist/esm/gux-toggle-slider.entry.js +1 -1
  245. package/dist/esm/gux-toggle.entry.js +3 -3
  246. package/dist/esm/gux-tooltip_2.entry.js +3 -3
  247. package/dist/esm/gux-visualization-beta.entry.js +3 -3
  248. package/dist/esm/{index-b644eb47.js → index-017bdea1.js} +1 -1
  249. package/dist/esm/{index-d8b1bc53.js → index-76794476.js} +0 -2
  250. package/dist/esm/loader.js +2 -2
  251. package/dist/esm/{on-click-outside-9635bd3e.js → on-click-outside-ce30de20.js} +1 -1
  252. package/dist/esm/{on-mutation-1c2ba0a6.js → on-mutation-2e96b1b9.js} +1 -1
  253. package/dist/esm/on-mutation-d500715c.js +11 -0
  254. package/dist/esm/{usage-tracking-7c042fca.js → usage-tracking-8e40702f.js} +1 -1
  255. package/dist/genesys-webcomponents/genesys-webcomponents.css +1 -1
  256. package/dist/genesys-webcomponents/genesys-webcomponents.esm.js +1 -1
  257. package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.en.json +1 -1
  258. package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.es-es.json +1 -1
  259. package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.es.json +1 -1
  260. package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.it.json +1 -1
  261. package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.ko.json +1 -1
  262. package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.pl.json +1 -1
  263. package/dist/genesys-webcomponents/{p-5c2a8035.entry.js → p-01f68efb.entry.js} +1 -1
  264. package/dist/genesys-webcomponents/{p-cbba6750.entry.js → p-04e52486.entry.js} +1 -1
  265. package/dist/genesys-webcomponents/{p-9d24a3b0.entry.js → p-0500fe36.entry.js} +1 -1
  266. package/dist/genesys-webcomponents/{p-eea8d8b0.entry.js → p-0cbbff8d.entry.js} +1 -1
  267. package/dist/genesys-webcomponents/p-0f2c83c3.entry.js +1 -0
  268. package/dist/genesys-webcomponents/{p-aeaadb5d.entry.js → p-0f83ee43.entry.js} +1 -1
  269. package/dist/genesys-webcomponents/{p-b551f4c2.entry.js → p-1228f27f.entry.js} +1 -1
  270. package/dist/genesys-webcomponents/{p-c68d6c4d.entry.js → p-13574ebb.entry.js} +1 -1
  271. package/dist/genesys-webcomponents/{p-cdf55e17.entry.js → p-1504045c.entry.js} +1 -1
  272. package/dist/genesys-webcomponents/{p-dcad77c4.entry.js → p-1c1461e1.entry.js} +1 -1
  273. package/dist/genesys-webcomponents/{p-15a61bf9.entry.js → p-1c98aa57.entry.js} +1 -1
  274. package/dist/genesys-webcomponents/{p-7e7dd17c.entry.js → p-203a010e.entry.js} +1 -1
  275. package/dist/genesys-webcomponents/{p-e0660777.entry.js → p-2212a472.entry.js} +1 -1
  276. package/dist/genesys-webcomponents/{p-1075084c.entry.js → p-27cf3a0b.entry.js} +1 -1
  277. package/dist/genesys-webcomponents/{p-a6509d00.entry.js → p-2acf2470.entry.js} +1 -1
  278. package/dist/genesys-webcomponents/{p-9c30f1ae.entry.js → p-2ba83c10.entry.js} +1 -1
  279. package/dist/genesys-webcomponents/{p-b94b67a6.entry.js → p-2c1bbe1c.entry.js} +1 -1
  280. package/dist/genesys-webcomponents/{p-073ee3ba.entry.js → p-3302a7a9.entry.js} +1 -1
  281. package/dist/genesys-webcomponents/{p-02f88e5c.entry.js → p-33e6ef54.entry.js} +1 -1
  282. package/dist/genesys-webcomponents/{p-9154b32a.entry.js → p-34e05274.entry.js} +1 -1
  283. package/dist/genesys-webcomponents/{p-374c49e7.entry.js → p-352d1cb9.entry.js} +1 -1
  284. package/dist/genesys-webcomponents/{p-215dfc8c.entry.js → p-35445fa3.entry.js} +1 -1
  285. package/dist/genesys-webcomponents/p-3c14e494.entry.js +1 -0
  286. package/dist/genesys-webcomponents/{p-332b356f.entry.js → p-423366c2.entry.js} +1 -1
  287. package/dist/genesys-webcomponents/{p-7623d68f.entry.js → p-45d49edc.entry.js} +1 -1
  288. package/dist/genesys-webcomponents/{p-e2eac1a4.entry.js → p-47591c7f.entry.js} +1 -1
  289. package/dist/genesys-webcomponents/{p-14551b38.js → p-479cf5a2.js} +1 -1
  290. package/dist/genesys-webcomponents/{p-35578249.js → p-4b7056b2.js} +1 -1
  291. package/dist/genesys-webcomponents/{p-6fe4eeb9.entry.js → p-4ddf13c8.entry.js} +1 -1
  292. package/dist/genesys-webcomponents/{p-fc0d6b37.entry.js → p-4e00c36d.entry.js} +1 -1
  293. package/dist/genesys-webcomponents/{p-23c66ee4.entry.js → p-51d78377.entry.js} +1 -1
  294. package/dist/genesys-webcomponents/{p-5b9ed635.entry.js → p-53df4573.entry.js} +1 -1
  295. package/dist/genesys-webcomponents/{p-e292a8c7.entry.js → p-54cf4fc1.entry.js} +1 -1
  296. package/dist/genesys-webcomponents/{p-1173c715.entry.js → p-5674b67a.entry.js} +1 -1
  297. package/dist/genesys-webcomponents/{p-49b1912a.js → p-5ca81424.js} +1 -1
  298. package/dist/genesys-webcomponents/{p-54b89c5b.entry.js → p-5ccd07f6.entry.js} +1 -1
  299. package/dist/genesys-webcomponents/{p-1f1554e3.entry.js → p-5f8b46b5.entry.js} +1 -1
  300. package/dist/genesys-webcomponents/{p-97fff936.entry.js → p-60d19812.entry.js} +1 -1
  301. package/dist/genesys-webcomponents/{p-01928b29.entry.js → p-61ba2520.entry.js} +1 -1
  302. package/dist/genesys-webcomponents/p-61fd6f64.entry.js +1 -0
  303. package/dist/genesys-webcomponents/{p-0001b337.entry.js → p-65e3c3b9.entry.js} +1 -1
  304. package/dist/genesys-webcomponents/{p-b27f0bef.entry.js → p-66ca3da0.entry.js} +1 -1
  305. package/dist/genesys-webcomponents/{p-296b0d1e.entry.js → p-6717247e.entry.js} +1 -1
  306. package/dist/genesys-webcomponents/{p-9ed80cd5.entry.js → p-677ce668.entry.js} +1 -1
  307. package/dist/genesys-webcomponents/{p-e22552a0.entry.js → p-6aa62989.entry.js} +1 -1
  308. package/dist/genesys-webcomponents/{p-6f3534c8.entry.js → p-6c8c3cb2.entry.js} +1 -1
  309. package/dist/genesys-webcomponents/{p-d1c9081c.entry.js → p-707313b4.entry.js} +1 -1
  310. package/dist/genesys-webcomponents/p-70f801fb.entry.js +1 -0
  311. package/dist/genesys-webcomponents/{p-e220c05f.entry.js → p-72660222.entry.js} +1 -1
  312. package/dist/genesys-webcomponents/{p-7341343a.entry.js → p-74ab4e9c.entry.js} +1 -1
  313. package/dist/genesys-webcomponents/{p-49e17485.entry.js → p-75b3e648.entry.js} +1 -1
  314. package/dist/genesys-webcomponents/{p-35a87ae5.entry.js → p-75fe6ee6.entry.js} +1 -1
  315. package/dist/genesys-webcomponents/{p-8d38b686.entry.js → p-768bc10f.entry.js} +1 -1
  316. package/dist/genesys-webcomponents/{p-fee0493f.entry.js → p-7abebb37.entry.js} +1 -1
  317. package/dist/genesys-webcomponents/{p-17e7772d.entry.js → p-7c57956f.entry.js} +1 -1
  318. package/dist/genesys-webcomponents/{p-7c089705.entry.js → p-82301db5.entry.js} +1 -1
  319. package/dist/genesys-webcomponents/{p-128a0ad7.entry.js → p-825ee629.entry.js} +1 -1
  320. package/dist/genesys-webcomponents/{p-0b1bf180.entry.js → p-8288a4c9.entry.js} +1 -1
  321. package/dist/genesys-webcomponents/{p-5b13da7d.entry.js → p-82b556cb.entry.js} +1 -1
  322. package/dist/genesys-webcomponents/{p-bdf00b03.entry.js → p-83b3b17a.entry.js} +1 -1
  323. package/dist/genesys-webcomponents/{p-2136acf6.entry.js → p-85145b9f.entry.js} +1 -1
  324. package/dist/genesys-webcomponents/{p-2b773609.entry.js → p-887b1623.entry.js} +1 -1
  325. package/dist/genesys-webcomponents/{p-da1ea7b9.entry.js → p-8aad25ac.entry.js} +1 -1
  326. package/dist/genesys-webcomponents/{p-e4d4c203.entry.js → p-8dc34d7f.entry.js} +1 -1
  327. package/dist/genesys-webcomponents/{p-2c44ea0b.js → p-914acf6c.js} +1 -1
  328. package/dist/genesys-webcomponents/p-91d67883.entry.js +1 -0
  329. package/dist/genesys-webcomponents/{p-db28e701.entry.js → p-92189326.entry.js} +1 -1
  330. package/dist/genesys-webcomponents/{p-2f870a86.entry.js → p-923a26f7.entry.js} +1 -1
  331. package/dist/genesys-webcomponents/{p-491b835c.entry.js → p-927052a1.entry.js} +1 -1
  332. package/dist/genesys-webcomponents/p-93904222.js +1 -0
  333. package/dist/genesys-webcomponents/{p-356c4b29.entry.js → p-9b476241.entry.js} +1 -1
  334. package/dist/genesys-webcomponents/{p-dc50e458.entry.js → p-9da7e5d6.entry.js} +1 -1
  335. package/dist/genesys-webcomponents/p-a085b143.js +2 -0
  336. package/dist/genesys-webcomponents/{p-536a4370.entry.js → p-a2d45029.entry.js} +1 -1
  337. package/dist/genesys-webcomponents/{p-7b2d7dc8.entry.js → p-a3db1240.entry.js} +1 -1
  338. package/dist/genesys-webcomponents/{p-361aa2c4.entry.js → p-a5211580.entry.js} +1 -1
  339. package/dist/genesys-webcomponents/{p-b225ce42.entry.js → p-a5c9fbed.entry.js} +1 -1
  340. package/dist/genesys-webcomponents/{p-5efd8056.entry.js → p-a6bbeb3c.entry.js} +1 -1
  341. package/dist/genesys-webcomponents/{p-da86164e.entry.js → p-a71cbccb.entry.js} +1 -1
  342. package/dist/genesys-webcomponents/{p-f0a3ed98.entry.js → p-a756448a.entry.js} +1 -1
  343. package/dist/genesys-webcomponents/{p-b1c99162.entry.js → p-a84bed57.entry.js} +1 -1
  344. package/dist/genesys-webcomponents/p-afb54d23.js +1 -0
  345. package/dist/genesys-webcomponents/{p-9cf81b2b.entry.js → p-b33840d8.entry.js} +1 -1
  346. package/dist/genesys-webcomponents/p-b33bebc7.entry.js +1 -0
  347. package/dist/genesys-webcomponents/{p-835d322d.entry.js → p-b70c5e79.entry.js} +1 -1
  348. package/dist/genesys-webcomponents/{p-167e904b.entry.js → p-b9cb20fd.entry.js} +1 -1
  349. package/dist/genesys-webcomponents/{p-56fb2e8f.entry.js → p-bd1bcf4c.entry.js} +1 -1
  350. package/dist/genesys-webcomponents/{p-d33adb9d.entry.js → p-bea0187a.entry.js} +1 -1
  351. package/dist/genesys-webcomponents/{p-34613978.entry.js → p-bf593863.entry.js} +1 -1
  352. package/dist/genesys-webcomponents/{p-d380d7f4.entry.js → p-c1fe9ec2.entry.js} +1 -1
  353. package/dist/genesys-webcomponents/{p-f708f798.entry.js → p-c4bcfd16.entry.js} +1 -1
  354. package/dist/genesys-webcomponents/{p-f3f4c59f.entry.js → p-c87736cc.entry.js} +1 -1
  355. package/dist/genesys-webcomponents/{p-32caa12b.entry.js → p-caa0be5a.entry.js} +1 -1
  356. package/dist/genesys-webcomponents/{p-fab6cf59.entry.js → p-cb00dc25.entry.js} +1 -1
  357. package/dist/genesys-webcomponents/{p-1a5093b2.entry.js → p-cbbfe6fa.entry.js} +1 -1
  358. package/dist/genesys-webcomponents/{p-a41b086e.entry.js → p-cfd5c06d.entry.js} +1 -1
  359. package/dist/genesys-webcomponents/{p-2467f0c9.entry.js → p-d05be99b.entry.js} +1 -1
  360. package/dist/genesys-webcomponents/p-d29d69f8.entry.js +1 -0
  361. package/dist/genesys-webcomponents/{p-c282fb30.entry.js → p-d4ef998e.entry.js} +1 -1
  362. package/dist/genesys-webcomponents/{p-66117fa0.entry.js → p-d7a2f8dc.entry.js} +1 -1
  363. package/dist/genesys-webcomponents/{p-05403963.entry.js → p-d94e316d.entry.js} +1 -1
  364. package/dist/genesys-webcomponents/{p-a7dc7b57.entry.js → p-ddaec86a.entry.js} +1 -1
  365. package/dist/genesys-webcomponents/{p-94b591a5.entry.js → p-df0e989b.entry.js} +1 -1
  366. package/dist/genesys-webcomponents/{p-e6abb97f.entry.js → p-e2bc6510.entry.js} +1 -1
  367. package/dist/genesys-webcomponents/p-e310debb.js +1 -0
  368. package/dist/genesys-webcomponents/{p-1ad06cfc.entry.js → p-e4e5aa67.entry.js} +1 -1
  369. package/dist/genesys-webcomponents/{p-35c9b84c.entry.js → p-e61558ed.entry.js} +1 -1
  370. package/dist/genesys-webcomponents/{p-1544d278.entry.js → p-e9b29165.entry.js} +1 -1
  371. package/dist/genesys-webcomponents/{p-392e1bd2.entry.js → p-ebf8f83f.entry.js} +1 -1
  372. package/dist/genesys-webcomponents/{p-be37f4ca.entry.js → p-ec95b4c2.entry.js} +1 -1
  373. package/dist/genesys-webcomponents/{p-1a95f804.entry.js → p-ede1de77.entry.js} +1 -1
  374. package/dist/genesys-webcomponents/{p-b30c5091.entry.js → p-ef4096e0.entry.js} +1 -1
  375. package/dist/genesys-webcomponents/{p-b2ccd287.entry.js → p-f0f7cf36.entry.js} +1 -1
  376. package/dist/genesys-webcomponents/{p-5647d38b.entry.js → p-f2a5fea9.entry.js} +1 -1
  377. package/dist/genesys-webcomponents/{p-d72ceff7.entry.js → p-f2b39a9e.entry.js} +1 -1
  378. package/dist/genesys-webcomponents/p-f3c3aad3.entry.js +1 -0
  379. package/dist/genesys-webcomponents/{p-5df04d6d.entry.js → p-f886e77a.entry.js} +1 -1
  380. package/dist/genesys-webcomponents/p-f8870d02.entry.js +1 -0
  381. package/dist/genesys-webcomponents/{p-1d29e85f.entry.js → p-fab71a07.entry.js} +1 -1
  382. package/dist/genesys-webcomponents/{p-2fb2e5b0.js → p-facb68c7.js} +1 -1
  383. package/dist/genesys-webcomponents/{p-71f30829.entry.js → p-fbd49114.entry.js} +1 -1
  384. package/dist/stencil-wrapper.js +1 -1
  385. package/dist/types/components/beta/gux-table/gux-sort-control/gux-sort-control.d.ts +17 -9
  386. package/dist/types/components/beta/gux-table/gux-sort-control/tests/gux-sort-control.markup.d.ts +23 -0
  387. package/dist/types/components/beta/gux-table/gux-table.d.ts +0 -9
  388. package/dist/types/components/beta/gux-table/gux-table.types.d.ts +2 -1
  389. package/dist/types/components/stable/gux-accordion/gux-accordion-section/gux-accordion-section.d.ts +7 -0
  390. package/dist/types/components/stable/gux-accordion/gux-accordion-section/gux-accordion-section.types.d.ts +1 -1
  391. package/dist/types/components.d.ts +20 -1
  392. package/package.json +1 -1
  393. package/dist/cjs/en-808055be.js +0 -26
  394. package/dist/esm/en-b5d2d35e.js +0 -24
  395. package/dist/genesys-webcomponents/p-051ca8d9.entry.js +0 -1
  396. package/dist/genesys-webcomponents/p-0d0ad98e.entry.js +0 -1
  397. package/dist/genesys-webcomponents/p-10fa6415.js +0 -1
  398. package/dist/genesys-webcomponents/p-2c133c22.entry.js +0 -1
  399. package/dist/genesys-webcomponents/p-50603b87.entry.js +0 -1
  400. package/dist/genesys-webcomponents/p-6fcc3130.entry.js +0 -1
  401. package/dist/genesys-webcomponents/p-803358d1.entry.js +0 -1
  402. package/dist/genesys-webcomponents/p-9135d771.entry.js +0 -1
  403. package/dist/genesys-webcomponents/p-b0c0bff1.entry.js +0 -1
  404. package/dist/genesys-webcomponents/p-cdf5cb56.js +0 -1
  405. package/dist/genesys-webcomponents/p-e571f861.js +0 -2
  406. package/dist/genesys-webcomponents/p-ec84cdc4.entry.js +0 -1
@@ -1,32 +1,46 @@
1
- button {
1
+ .gux-container {
2
2
  position: absolute;
3
3
  top: 0;
4
4
  right: 0;
5
5
  bottom: 0;
6
6
  left: 0;
7
- z-index: 1;
8
- display: inline;
9
- width: 100%;
10
- height: 100%;
11
- padding: 4px;
12
- margin: 1px;
13
- font-size: 100%;
14
- font-weight: bold;
15
- color: #2e394c;
16
- text-align: left;
7
+ display: flex;
8
+ flex-direction: row;
9
+ flex-wrap: nowrap;
10
+ align-content: flex-start;
11
+ align-items: center;
12
+ justify-content: flex-start;
13
+ border-top: 3px solid transparent;
14
+ border-bottom: 3px solid transparent;
15
+ }
16
+ .gux-container:focus-within {
17
+ border-bottom-color: #75a8ff;
18
+ }
19
+ .gux-container .gux-sort-button {
20
+ all: unset;
21
+ flex: 1 1 auto;
22
+ align-self: stretch;
23
+ order: 0;
17
24
  cursor: pointer;
18
- background: transparent;
19
- border: none;
20
- outline: none;
21
25
  }
22
- button gux-icon {
26
+ .gux-container .gux-sort-button .gux-sort-icon {
23
27
  float: right;
24
28
  width: 16px;
25
29
  height: 16px;
26
- padding-right: 8.5px;
30
+ margin: 8px;
31
+ color: #d7dce5;
32
+ }
33
+ .gux-container .gux-sort-button .gux-sort-icon.gux-left {
34
+ float: left;
35
+ }
36
+ .gux-container .gux-sort-button.gux-active .gux-sort-icon {
37
+ color: #2e394c;
27
38
  }
28
- button:focus {
29
- border-bottom: 3px solid #75a8ff;
39
+ .gux-container .gux-resize-spacer {
40
+ flex: 0 1 auto;
41
+ align-self: stretch;
42
+ order: 0;
43
+ width: 2px;
30
44
  }
31
45
  .gux-sr-only:not(:focus):not(:active) {
32
46
  position: absolute;
@@ -1,52 +1,167 @@
1
- import { Component, h, Host, State, Listen, Element } from '@stencil/core';
1
+ import { Component, Element, Event, Prop, State, h } from '@stencil/core';
2
2
  import { buildI18nForComponent } from '../../../../i18n';
3
+ import { trackComponent } from '../../../../usage-tracking';
4
+ import { getClosestElement } from '../../../../utils/dom/get-closest-element';
5
+ import { onMutation } from '../../../../utils/dom/on-mutation';
3
6
  import tableResources from '../i18n/en.json';
4
7
  export class GuxSortControl {
5
- sortDirectionEvent(event) {
6
- this.colSortDirection = event.detail.sortDirection;
7
- this.colLabel = event.detail.columnName;
8
+ constructor() {
9
+ this.includeUnsorted = false;
10
+ this.active = false;
11
+ this.sort = 'none';
12
+ this.isLeftAlignIcon = false;
8
13
  }
9
- renderSrText() {
10
- return (h("div", { class: "gux-sr-only" }, this.i18n(this.getSrTextLocalisationKey(), {
11
- colLabel: this.colLabel
12
- })));
14
+ async componentWillLoad() {
15
+ trackComponent(this.root);
16
+ this.i18n = await buildI18nForComponent(this.root, tableResources, 'gux-table');
17
+ this.tableHeader = getClosestElement('th', this.root);
18
+ this.thObserver = onMutation(this.tableHeader, () => {
19
+ this.setState();
20
+ }, {
21
+ attributes: true,
22
+ childList: false,
23
+ subtree: false
24
+ });
25
+ this.setState();
13
26
  }
14
- getSrTextLocalisationKey() {
15
- return `${this.colSortDirection}ColumnSort`;
27
+ disconnectedCallback() {
28
+ this.thObserver.disconnect();
16
29
  }
17
- async componentWillRender() {
18
- this.i18n = await buildI18nForComponent(this.root, tableResources);
30
+ onClick() {
31
+ this.guxsortchanged.emit({
32
+ columnName: this.tableHeader.dataset.columnName,
33
+ sortDirection: this.getNextSort(this.sort)
34
+ });
19
35
  }
20
- componentDidLoad() {
21
- this.colLabel = this.root.closest('th').getAttribute('data-column-name');
22
- this.colSortDirection = this.root.closest('th').getAttribute('aria-sort');
36
+ setState() {
37
+ this.headerContent = this.tableHeader.textContent;
38
+ this.isLeftAlignIcon =
39
+ this.tableHeader.hasAttribute('data-cell-numeric') ||
40
+ this.tableHeader.hasAttribute('data-cell-action');
41
+ const ariaSort = this.tableHeader.getAttribute('aria-sort');
42
+ switch (ariaSort) {
43
+ case 'ascending':
44
+ case 'descending':
45
+ this.active = true;
46
+ this.sort = ariaSort;
47
+ break;
48
+ default:
49
+ this.active = false;
50
+ this.sort = 'none';
51
+ }
52
+ }
53
+ getIconName(colSortDirection) {
54
+ switch (colSortDirection) {
55
+ case 'descending':
56
+ return 'arrow-solid-up';
57
+ case 'ascending':
58
+ default:
59
+ return 'arrow-solid-down';
60
+ }
61
+ }
62
+ getNextSort(colSortDirection) {
63
+ switch (colSortDirection) {
64
+ case 'none':
65
+ return 'ascending';
66
+ case 'ascending':
67
+ return 'descending';
68
+ case 'descending':
69
+ default: {
70
+ if (this.includeUnsorted) {
71
+ return 'none';
72
+ }
73
+ return 'ascending';
74
+ }
75
+ }
76
+ }
77
+ getSRText(colSortDirection) {
78
+ switch (colSortDirection) {
79
+ case 'ascending':
80
+ return this.i18n('ascendingColumnSort', {
81
+ headerContent: this.headerContent
82
+ });
83
+ case 'descending': {
84
+ if (this.includeUnsorted) {
85
+ return this.i18n('descendingColumnSortIncludeUnsorted', {
86
+ headerContent: this.headerContent
87
+ });
88
+ }
89
+ return this.i18n('descendingColumnSort', {
90
+ headerContent: this.headerContent
91
+ });
92
+ }
93
+ default:
94
+ return this.i18n('noColumnSort', { headerContent: this.headerContent });
95
+ }
23
96
  }
24
97
  render() {
25
- return (h(Host, null,
26
- h("button", { type: "button" },
27
- h("gux-icon", { "icon-name": this.colSortDirection === 'ascending'
28
- ? 'arrow-solid-down'
29
- : 'arrow-solid-up', decorative: true }),
30
- this.renderSrText())));
98
+ return (h("div", { class: "gux-container" },
99
+ h("button", { class: {
100
+ 'gux-sort-button': true,
101
+ 'gux-active': this.active
102
+ }, type: "button", onClick: () => this.onClick() },
103
+ h("span", { class: "gux-sr-only" }, this.getSRText(this.sort)),
104
+ h("gux-icon", { class: {
105
+ 'gux-sort-icon': true,
106
+ 'gux-left': this.isLeftAlignIcon
107
+ }, "icon-name": this.getIconName(this.sort), decorative: true })),
108
+ h("div", { class: "gux-resize-spacer" })));
31
109
  }
32
110
  static get is() { return "gux-sort-control"; }
33
111
  static get encapsulation() { return "shadow"; }
112
+ static get delegatesFocus() { return true; }
34
113
  static get originalStyleUrls() { return {
35
114
  "$": ["gux-sort-control.less"]
36
115
  }; }
37
116
  static get styleUrls() { return {
38
117
  "$": ["gux-sort-control.css"]
39
118
  }; }
119
+ static get properties() { return {
120
+ "includeUnsorted": {
121
+ "type": "boolean",
122
+ "mutable": false,
123
+ "complexType": {
124
+ "original": "boolean",
125
+ "resolved": "boolean",
126
+ "references": {}
127
+ },
128
+ "required": false,
129
+ "optional": false,
130
+ "docs": {
131
+ "tags": [],
132
+ "text": ""
133
+ },
134
+ "attribute": "include-unsorted",
135
+ "reflect": false,
136
+ "defaultValue": "false"
137
+ }
138
+ }; }
40
139
  static get states() { return {
41
- "colLabel": {},
42
- "colSortDirection": {}
140
+ "headerContent": {},
141
+ "active": {},
142
+ "sort": {},
143
+ "isLeftAlignIcon": {}
43
144
  }; }
44
- static get elementRef() { return "root"; }
45
- static get listeners() { return [{
145
+ static get events() { return [{
146
+ "method": "guxsortchanged",
46
147
  "name": "guxsortchanged",
47
- "method": "sortDirectionEvent",
48
- "target": "body",
49
- "capture": false,
50
- "passive": false
148
+ "bubbles": true,
149
+ "cancelable": true,
150
+ "composed": true,
151
+ "docs": {
152
+ "tags": [],
153
+ "text": ""
154
+ },
155
+ "complexType": {
156
+ "original": "GuxTableSortState",
157
+ "resolved": "GuxTableSortState",
158
+ "references": {
159
+ "GuxTableSortState": {
160
+ "location": "import",
161
+ "path": "../gux-table.types"
162
+ }
163
+ }
164
+ }
51
165
  }]; }
166
+ static get elementRef() { return "root"; }
52
167
  }
@@ -0,0 +1,82 @@
1
+ export default {
2
+ notSorted: {
3
+ description: 'Not sorted',
4
+ html: `
5
+ <table>
6
+ <thead>
7
+ <tr>
8
+ <th data-column-name="c1">Column Header 1 <gux-sort-control /></th>
9
+ <th data-column-name="c2">Column Header 2</th>
10
+ </tr>
11
+ </thead>
12
+ <tbody>
13
+ <tr>
14
+ <td>Column 1, Row 1</td>
15
+ <td>Column 2, Row 1</td>
16
+ </tr>
17
+ </tbody>
18
+ </table>
19
+ `,
20
+ onclickSortDirection: 'ascending'
21
+ },
22
+ sortedAscending: {
23
+ description: 'Sorted ascending',
24
+ html: `
25
+ <table>
26
+ <thead>
27
+ <tr>
28
+ <th data-column-name="c1" aria-sort="ascending">Column Header 1 <gux-sort-control /></th>
29
+ <th data-column-name="c2">Column Header 2</th>
30
+ </tr>
31
+ </thead>
32
+ <tbody>
33
+ <tr>
34
+ <td>Column 1, Row 1</td>
35
+ <td>Column 2, Row 1</td>
36
+ </tr>
37
+ </tbody>
38
+ </table>
39
+ `,
40
+ onclickSortDirection: 'descending'
41
+ },
42
+ sortedDescending: {
43
+ description: 'Sorted descending',
44
+ html: `
45
+ <table>
46
+ <thead>
47
+ <tr>
48
+ <th data-column-name="c1" aria-sort="descending">Column Header 1 <gux-sort-control /></th>
49
+ <th data-column-name="c2">Column Header 2</th>
50
+ </tr>
51
+ </thead>
52
+ <tbody>
53
+ <tr>
54
+ <td>Column 1, Row 1</td>
55
+ <td>Column 2, Row 1</td>
56
+ </tr>
57
+ </tbody>
58
+ </table>
59
+ `,
60
+ onclickSortDirection: 'ascending'
61
+ },
62
+ sortedDescendingUnsortedAllowed: {
63
+ description: 'Sorted descending, unsorted allowed',
64
+ html: `
65
+ <table>
66
+ <thead>
67
+ <tr>
68
+ <th data-column-name="c1" aria-sort="descending">Column Header 1 <gux-sort-control include-unsorted/></th>
69
+ <th data-column-name="c2">Column Header 2</th>
70
+ </tr>
71
+ </thead>
72
+ <tbody>
73
+ <tr>
74
+ <td>Column 1, Row 1</td>
75
+ <td>Column 2, Row 1</td>
76
+ </tr>
77
+ </tbody>
78
+ </table>
79
+ `,
80
+ onclickSortDirection: 'none'
81
+ }
82
+ };
@@ -1,4 +1,4 @@
1
- import { Component, Host, Element, Event, getAssetPath, h, Listen, Method, Prop, readTask, forceUpdate, State } from '@stencil/core';
1
+ import { Component, Host, Element, Event, h, Listen, Method, Prop, readTask, forceUpdate, State } from '@stencil/core';
2
2
  import { buildI18nForComponent } from '../../../i18n';
3
3
  import { whenEventIsFrom } from '../../../utils/dom/when-event-is-from';
4
4
  import { randomHTMLId } from '../../../utils/dom/random-html-id';
@@ -48,7 +48,6 @@ export class GuxTable {
48
48
  if (this.resizableColumns) {
49
49
  this.prepareResizableColumns();
50
50
  }
51
- this.prepareSortableColumns();
52
51
  this.prepareSelectableRows();
53
52
  this.checkHorizontalScroll();
54
53
  this.checkVerticalScroll();
@@ -120,12 +119,6 @@ export class GuxTable {
120
119
  get tableColumns() {
121
120
  return Array.from(this.slottedTable.querySelectorAll('thead th'));
122
121
  }
123
- get tableColumnsDataSortable() {
124
- return Array.from(this.slottedTable.querySelectorAll('thead th[data-sortable]'));
125
- }
126
- get sortControlCol() {
127
- return Array.from(this.slottedTable.querySelectorAll('thead th gux-sort-control'));
128
- }
129
122
  get rowCheckboxes() {
130
123
  return Array.from(this.slottedTable.querySelectorAll('tbody tr td gux-row-select'));
131
124
  }
@@ -317,66 +310,6 @@ export class GuxTable {
317
310
  getElementComputedWidth(element) {
318
311
  return parseInt(window.getComputedStyle(element).getPropertyValue('width').split('px')[0], 10);
319
312
  }
320
- /******************************* Sortable Columns *******************************/
321
- prepareSortableColumns() {
322
- let sortControlSelected = [];
323
- const sortControl = document.querySelector('gux-sort-control');
324
- sortControl
325
- ? (sortControlSelected = this.sortControlCol)
326
- : (sortControlSelected = this.tableColumnsDataSortable);
327
- /* Only apply sortable styles if the data-sortable way of sorting is being used(ie the old way) and not the <gux-sort-control /> */
328
- this.tableColumnsDataSortable.forEach((tableHeader) => {
329
- if (tableHeader.hasAttribute('data-sortable')) {
330
- this.prepareSortableColumnsStyles();
331
- }
332
- });
333
- sortControlSelected.forEach((column) => {
334
- column.onclick = (event) => {
335
- if (!this.columnResizeHover) {
336
- const button = event.target;
337
- const columnElement = column.hasAttribute('data-sortable')
338
- ? event.currentTarget
339
- : button.parentElement;
340
- const sortDirection = columnElement.getAttribute('aria-sort') || '';
341
- let newSortDirection = null;
342
- switch (sortDirection) {
343
- case '':
344
- case 'descending':
345
- newSortDirection = 'ascending';
346
- break;
347
- case 'ascending':
348
- newSortDirection = 'descending';
349
- break;
350
- }
351
- this.guxsortchanged.emit({
352
- columnName: columnElement.dataset.columnName,
353
- sortDirection: newSortDirection
354
- });
355
- }
356
- };
357
- });
358
- }
359
- /**
360
- * Create sort styles if they don't exist. We can't make these static because we need to look up
361
- * asset paths to generate the urls
362
- */
363
- prepareSortableColumnsStyles() {
364
- const styleId = 'gux-table-sortable-styles';
365
- if (document.getElementById(styleId) == null) {
366
- const styleElement = document.createElement('style');
367
- styleElement.id = styleId;
368
- const ascArrowIcon = getAssetPath(`./icons/arrow-solid-down.svg`);
369
- const descArrowIcon = getAssetPath(`./icons/arrow-solid-up.svg`);
370
- const sortAscContent = this.i18n('sortAsc');
371
- const sortDescContent = this.i18n('sortDesc');
372
- styleElement.innerHTML = `
373
- th[data-sortable]:focus-within:after{content: "${sortAscContent}";background-image: url("${ascArrowIcon}");}
374
- th[aria-sort="ascending"]:after{background-image:url("${ascArrowIcon}")!important;content:"${sortAscContent}"!important;}
375
- th[aria-sort="descending"]:after{background-image:url("${descArrowIcon}")!important;content:"${sortDescContent}"!important;}
376
- `;
377
- document.querySelector('head').appendChild(styleElement);
378
- }
379
- }
380
313
  setResizableColumnsStyles() {
381
314
  const styleElement = document.getElementById(`${this.tableId}-resizable-styles`);
382
315
  let columnsStyles = '';
@@ -83,6 +83,10 @@ section.gux-disabled > * {
83
83
  width: 16px;
84
84
  height: 16px;
85
85
  }
86
+ .gux-header .gux-header-icon.gux-arrow-position-before-text {
87
+ order: -1;
88
+ margin: 0 8px 0 0;
89
+ }
86
90
  .gux-header .gux-header-icon.gux-expanded {
87
91
  transform: rotate(-180deg);
88
92
  }
@@ -9,7 +9,13 @@ import { logError } from '@utils/error/log-error';
9
9
  export class GuxAccordionSection {
10
10
  constructor() {
11
11
  this.sectionId = randomHTMLId('gux-accordion-section');
12
+ /**
13
+ * Position of the arrow chevron icon. Position can be 'default' or 'before-text'. 'beside-text' is deprecated and will be removed in v4.
14
+ */
12
15
  this.arrowPosition = 'default';
16
+ /**
17
+ * The content layout used in the accordion section. 'text' layout provides default padding, 'custom' removes default padding.
18
+ */
13
19
  this.contentLayout = 'text';
14
20
  this.open = false;
15
21
  this.disabled = false;
@@ -23,6 +29,10 @@ export class GuxAccordionSection {
23
29
  toggle() {
24
30
  this.open = !this.open;
25
31
  }
32
+ isArrowPositionBeforeText() {
33
+ return this.arrowPosition === 'before-text';
34
+ }
35
+ // arrow position 'beside-text' will be removed in v4 (COMUI-1128)
26
36
  isArrowPositionedBesideText() {
27
37
  return this.arrowPosition === 'beside-text';
28
38
  }
@@ -50,7 +60,8 @@ export class GuxAccordionSection {
50
60
  h("slot", { onSlotchange: () => this.handleSlotChange('subheader'), name: "subheader" })),
51
61
  h("div", { class: {
52
62
  'gux-header-icon': true,
53
- 'gux-expanded': this.open
63
+ 'gux-expanded': this.open,
64
+ 'gux-arrow-position-before-text': this.isArrowPositionBeforeText()
54
65
  } },
55
66
  h("gux-icon", { decorative: true, "icon-name": "chevron-small-down" }))),
56
67
  h("div", { id: this.sectionId, class: {
@@ -74,7 +85,7 @@ export class GuxAccordionSection {
74
85
  "mutable": false,
75
86
  "complexType": {
76
87
  "original": "GuxAccordionSectionArrowPosition",
77
- "resolved": "\"beside-text\" | \"default\"",
88
+ "resolved": "\"before-text\" | \"beside-text\" | \"default\"",
78
89
  "references": {
79
90
  "GuxAccordionSectionArrowPosition": {
80
91
  "location": "import",
@@ -86,7 +97,7 @@ export class GuxAccordionSection {
86
97
  "optional": false,
87
98
  "docs": {
88
99
  "tags": [],
89
- "text": ""
100
+ "text": "Position of the arrow chevron icon. Position can be 'default' or 'before-text'. 'beside-text' is deprecated and will be removed in v4."
90
101
  },
91
102
  "attribute": "arrow-position",
92
103
  "reflect": false,
@@ -109,7 +120,7 @@ export class GuxAccordionSection {
109
120
  "optional": false,
110
121
  "docs": {
111
122
  "tags": [],
112
- "text": ""
123
+ "text": "The content layout used in the accordion section. 'text' layout provides default padding, 'custom' removes default padding."
113
124
  },
114
125
  "attribute": "content-layout",
115
126
  "reflect": false,
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "spark-components",
3
- "version": "3.13.0",
3
+ "version": "3.14.1",
4
4
  "ecosystem": "pc",
5
5
  "team": "Core UI",
6
6
  "indexFiles": [],
7
- "build": "99",
8
- "buildDate": "2022-07-27T09:35:14.951607Z"
7
+ "build": "105",
8
+ "buildDate": "2022-08-02T09:19:57.058384Z"
9
9
  }
@@ -0,0 +1,28 @@
1
+ const emptyMessage = "No data available";
2
+ const scrollLeft = "Scroll Left";
3
+ const scrollRight = "Scroll Right";
4
+ const selectAllTableRows = "Select All Table Rows";
5
+ const selectTableRow = "Select Table Row";
6
+ const sortAsc = "Sorted Ascending";
7
+ const sortDesc = "Sorted Descending";
8
+ const tableOptions = "Table Options";
9
+ const noColumnSort = "{headerContent}. The table is not currently sorted by this column. Click the column header to sort the table by this column in ascending order";
10
+ const ascendingColumnSort = "{headerContent}. The table is currently sorted by this column in ascending order. Click the column header to sort the table by this column in descending order";
11
+ const descendingColumnSort = "{headerContent}. The table is currently sorted by this column in descending order. Click the column header to sort the table by this column in ascending order";
12
+ const descendingColumnSortIncludeUnsorted = "{headerContent}. The table is currently sorted by this column in descending order. Click the column header to not sort the table by this column";
13
+ const tableResources = {
14
+ emptyMessage: emptyMessage,
15
+ scrollLeft: scrollLeft,
16
+ scrollRight: scrollRight,
17
+ selectAllTableRows: selectAllTableRows,
18
+ selectTableRow: selectTableRow,
19
+ sortAsc: sortAsc,
20
+ sortDesc: sortDesc,
21
+ tableOptions: tableOptions,
22
+ noColumnSort: noColumnSort,
23
+ ascendingColumnSort: ascendingColumnSort,
24
+ descendingColumnSort: descendingColumnSort,
25
+ descendingColumnSortIncludeUnsorted: descendingColumnSortIncludeUnsorted
26
+ };
27
+
28
+ export { tableResources as t };