genesys-spark-components 4.0.0-beta.2 → 4.0.0-beta.3

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 (247) hide show
  1. package/dist/cjs/gux-accordion.cjs.entry.js +1 -1
  2. package/dist/cjs/gux-action-button.cjs.entry.js +1 -1
  3. package/dist/cjs/gux-action-toast-legacy.cjs.entry.js +1 -1
  4. package/dist/cjs/gux-advanced-dropdown.cjs.entry.js +1 -1
  5. package/dist/cjs/gux-announce-beta.cjs.entry.js +1 -1
  6. package/dist/cjs/gux-badge-beta.cjs.entry.js +1 -1
  7. package/dist/cjs/gux-blank-state-beta.cjs.entry.js +1 -1
  8. package/dist/cjs/gux-breadcrumbs.cjs.entry.js +1 -1
  9. package/dist/cjs/gux-button-multi.cjs.entry.js +1 -1
  10. package/dist/cjs/gux-button-slot-beta.cjs.entry.js +1 -1
  11. package/dist/cjs/gux-button.cjs.entry.js +1 -1
  12. package/dist/cjs/gux-calendar.cjs.entry.js +1 -1
  13. package/dist/cjs/gux-card.cjs.entry.js +1 -1
  14. package/dist/cjs/gux-column-manager-beta.cjs.entry.js +1 -1
  15. package/dist/cjs/gux-content-search.cjs.entry.js +1 -1
  16. package/dist/cjs/gux-context-menu-beta.cjs.entry.js +1 -1
  17. package/dist/cjs/gux-copy-to-clipboard.cjs.entry.js +1 -1
  18. package/dist/cjs/gux-date-beta.cjs.entry.js +1 -1
  19. package/dist/cjs/gux-date-time-beta.cjs.entry.js +1 -1
  20. package/dist/cjs/gux-datepicker.cjs.entry.js +1 -1
  21. package/dist/cjs/gux-disclosure-button.cjs.entry.js +1 -1
  22. package/dist/cjs/gux-dismiss-button.cjs.entry.js +1 -1
  23. package/dist/cjs/gux-dropdown-multi-beta.cjs.entry.js +1 -1
  24. package/dist/cjs/gux-dropdown_3.cjs.entry.js +1 -1
  25. package/dist/cjs/gux-error-message-beta.cjs.entry.js +1 -1
  26. package/dist/cjs/gux-flyout-menu-beta.cjs.entry.js +1 -1
  27. package/dist/cjs/gux-form-field-checkbox.cjs.entry.js +1 -1
  28. package/dist/cjs/gux-form-field-color.cjs.entry.js +1 -1
  29. package/dist/cjs/gux-form-field-dropdown.cjs.entry.js +1 -1
  30. package/dist/cjs/gux-form-field-input-clear-button.cjs.entry.js +1 -1
  31. package/dist/cjs/gux-form-field-number_3.cjs.entry.js +1 -1
  32. package/dist/cjs/gux-form-field-phone.cjs.entry.js +1 -1
  33. package/dist/cjs/gux-form-field-radio.cjs.entry.js +1 -1
  34. package/dist/cjs/gux-form-field-range.cjs.entry.js +1 -1
  35. package/dist/cjs/gux-form-field-search.cjs.entry.js +1 -1
  36. package/dist/cjs/gux-form-field-select.cjs.entry.js +1 -1
  37. package/dist/cjs/gux-form-field-text-like.cjs.entry.js +1 -1
  38. package/dist/cjs/gux-form-field-textarea.cjs.entry.js +1 -1
  39. package/dist/cjs/gux-form-field-time-picker.cjs.entry.js +1 -1
  40. package/dist/cjs/gux-icon.cjs.entry.js +1 -1
  41. package/dist/cjs/gux-inline-alert.cjs.entry.js +1 -1
  42. package/dist/cjs/gux-list.cjs.entry.js +1 -1
  43. package/dist/cjs/gux-listbox-multi.cjs.entry.js +1 -1
  44. package/dist/cjs/gux-loading-message-beta.cjs.entry.js +1 -1
  45. package/dist/cjs/gux-modal.cjs.entry.js +1 -1
  46. package/dist/cjs/gux-month-picker-beta.cjs.entry.js +1 -1
  47. package/dist/cjs/gux-notification-toast-legacy.cjs.entry.js +1 -1
  48. package/dist/cjs/gux-page-loading-spinner.cjs.entry.js +1 -1
  49. package/dist/cjs/gux-pagination-beta.cjs.entry.js +1 -1
  50. package/dist/cjs/gux-pagination-cursor.cjs.entry.js +1 -1
  51. package/dist/cjs/gux-pagination.cjs.entry.js +1 -1
  52. package/dist/cjs/gux-phone-input-beta.cjs.entry.js +1 -1
  53. package/dist/cjs/gux-popover-list-beta.cjs.entry.js +1 -1
  54. package/dist/cjs/gux-popover-list.cjs.entry.js +1 -1
  55. package/dist/cjs/gux-popover.cjs.entry.js +1 -1
  56. package/dist/cjs/gux-radial-loading.cjs.entry.js +1 -1
  57. package/dist/cjs/gux-radial-progress.cjs.entry.js +1 -1
  58. package/dist/cjs/gux-rating.cjs.entry.js +1 -1
  59. package/dist/cjs/gux-region-icon.cjs.entry.js +1 -1
  60. package/dist/cjs/gux-screen-reader-beta.cjs.entry.js +1 -1
  61. package/dist/cjs/gux-simple-toast-legacy.cjs.entry.js +1 -1
  62. package/dist/cjs/gux-skip-navigation-list-beta.cjs.entry.js +1 -1
  63. package/dist/cjs/gux-sort-control.cjs.entry.js +1 -1
  64. package/dist/cjs/gux-switch.cjs.entry.js +1 -1
  65. package/dist/cjs/gux-table-beta.cjs.entry.js +1 -1
  66. package/dist/cjs/gux-table-toolbar-action.cjs.entry.js +1 -1
  67. package/dist/cjs/gux-table-toolbar-beta.cjs.entry.js +1 -1
  68. package/dist/cjs/gux-table-toolbar-custom-action.cjs.entry.js +1 -1
  69. package/dist/cjs/gux-table-toolbar-menu-button.cjs.entry.js +1 -1
  70. package/dist/cjs/gux-tabs-advanced.cjs.entry.js +1 -1
  71. package/dist/cjs/gux-tabs.cjs.entry.js +1 -1
  72. package/dist/cjs/gux-tag-beta.cjs.entry.js +1 -1
  73. package/dist/cjs/gux-text-highlight.cjs.entry.js +1 -1
  74. package/dist/cjs/gux-time-beta.cjs.entry.js +1 -1
  75. package/dist/cjs/gux-time-picker-beta.cjs.entry.js +1 -1
  76. package/dist/cjs/gux-toast.cjs.entry.js +1 -1
  77. package/dist/cjs/gux-toggle.cjs.entry.js +1 -1
  78. package/dist/cjs/gux-tooltip.cjs.entry.js +1 -1
  79. package/dist/cjs/{usage-1570e763.js → usage-1066593d.js} +1 -1
  80. package/dist/deploy-info.json +3 -3
  81. package/dist/esm/gux-accordion.entry.js +1 -1
  82. package/dist/esm/gux-action-button.entry.js +1 -1
  83. package/dist/esm/gux-action-toast-legacy.entry.js +1 -1
  84. package/dist/esm/gux-advanced-dropdown.entry.js +1 -1
  85. package/dist/esm/gux-announce-beta.entry.js +1 -1
  86. package/dist/esm/gux-badge-beta.entry.js +1 -1
  87. package/dist/esm/gux-blank-state-beta.entry.js +1 -1
  88. package/dist/esm/gux-breadcrumbs.entry.js +1 -1
  89. package/dist/esm/gux-button-multi.entry.js +1 -1
  90. package/dist/esm/gux-button-slot-beta.entry.js +1 -1
  91. package/dist/esm/gux-button.entry.js +1 -1
  92. package/dist/esm/gux-calendar.entry.js +1 -1
  93. package/dist/esm/gux-card.entry.js +1 -1
  94. package/dist/esm/gux-column-manager-beta.entry.js +1 -1
  95. package/dist/esm/gux-content-search.entry.js +1 -1
  96. package/dist/esm/gux-context-menu-beta.entry.js +1 -1
  97. package/dist/esm/gux-copy-to-clipboard.entry.js +1 -1
  98. package/dist/esm/gux-date-beta.entry.js +1 -1
  99. package/dist/esm/gux-date-time-beta.entry.js +1 -1
  100. package/dist/esm/gux-datepicker.entry.js +1 -1
  101. package/dist/esm/gux-disclosure-button.entry.js +1 -1
  102. package/dist/esm/gux-dismiss-button.entry.js +1 -1
  103. package/dist/esm/gux-dropdown-multi-beta.entry.js +1 -1
  104. package/dist/esm/gux-dropdown_3.entry.js +1 -1
  105. package/dist/esm/gux-error-message-beta.entry.js +1 -1
  106. package/dist/esm/gux-flyout-menu-beta.entry.js +1 -1
  107. package/dist/esm/gux-form-field-checkbox.entry.js +1 -1
  108. package/dist/esm/gux-form-field-color.entry.js +1 -1
  109. package/dist/esm/gux-form-field-dropdown.entry.js +1 -1
  110. package/dist/esm/gux-form-field-input-clear-button.entry.js +1 -1
  111. package/dist/esm/gux-form-field-number_3.entry.js +1 -1
  112. package/dist/esm/gux-form-field-phone.entry.js +1 -1
  113. package/dist/esm/gux-form-field-radio.entry.js +1 -1
  114. package/dist/esm/gux-form-field-range.entry.js +1 -1
  115. package/dist/esm/gux-form-field-search.entry.js +1 -1
  116. package/dist/esm/gux-form-field-select.entry.js +1 -1
  117. package/dist/esm/gux-form-field-text-like.entry.js +1 -1
  118. package/dist/esm/gux-form-field-textarea.entry.js +1 -1
  119. package/dist/esm/gux-form-field-time-picker.entry.js +1 -1
  120. package/dist/esm/gux-icon.entry.js +1 -1
  121. package/dist/esm/gux-inline-alert.entry.js +1 -1
  122. package/dist/esm/gux-list.entry.js +1 -1
  123. package/dist/esm/gux-listbox-multi.entry.js +1 -1
  124. package/dist/esm/gux-loading-message-beta.entry.js +1 -1
  125. package/dist/esm/gux-modal.entry.js +1 -1
  126. package/dist/esm/gux-month-picker-beta.entry.js +1 -1
  127. package/dist/esm/gux-notification-toast-legacy.entry.js +1 -1
  128. package/dist/esm/gux-page-loading-spinner.entry.js +1 -1
  129. package/dist/esm/gux-pagination-beta.entry.js +1 -1
  130. package/dist/esm/gux-pagination-cursor.entry.js +1 -1
  131. package/dist/esm/gux-pagination.entry.js +1 -1
  132. package/dist/esm/gux-phone-input-beta.entry.js +1 -1
  133. package/dist/esm/gux-popover-list-beta.entry.js +1 -1
  134. package/dist/esm/gux-popover-list.entry.js +1 -1
  135. package/dist/esm/gux-popover.entry.js +1 -1
  136. package/dist/esm/gux-radial-loading.entry.js +1 -1
  137. package/dist/esm/gux-radial-progress.entry.js +1 -1
  138. package/dist/esm/gux-rating.entry.js +1 -1
  139. package/dist/esm/gux-region-icon.entry.js +1 -1
  140. package/dist/esm/gux-screen-reader-beta.entry.js +1 -1
  141. package/dist/esm/gux-simple-toast-legacy.entry.js +1 -1
  142. package/dist/esm/gux-skip-navigation-list-beta.entry.js +1 -1
  143. package/dist/esm/gux-sort-control.entry.js +1 -1
  144. package/dist/esm/gux-switch.entry.js +1 -1
  145. package/dist/esm/gux-table-beta.entry.js +1 -1
  146. package/dist/esm/gux-table-toolbar-action.entry.js +1 -1
  147. package/dist/esm/gux-table-toolbar-beta.entry.js +1 -1
  148. package/dist/esm/gux-table-toolbar-custom-action.entry.js +1 -1
  149. package/dist/esm/gux-table-toolbar-menu-button.entry.js +1 -1
  150. package/dist/esm/gux-tabs-advanced.entry.js +1 -1
  151. package/dist/esm/gux-tabs.entry.js +1 -1
  152. package/dist/esm/gux-tag-beta.entry.js +1 -1
  153. package/dist/esm/gux-text-highlight.entry.js +1 -1
  154. package/dist/esm/gux-time-beta.entry.js +1 -1
  155. package/dist/esm/gux-time-picker-beta.entry.js +1 -1
  156. package/dist/esm/gux-toast.entry.js +1 -1
  157. package/dist/esm/gux-toggle.entry.js +1 -1
  158. package/dist/esm/gux-tooltip.entry.js +1 -1
  159. package/dist/esm/{usage-6453d04f.js → usage-4f6d345a.js} +1 -1
  160. package/dist/genesys-webcomponents/genesys-webcomponents.css +2 -1
  161. package/dist/genesys-webcomponents/genesys-webcomponents.esm.js +1 -1
  162. package/dist/genesys-webcomponents/p-007a89c8.entry.js +1 -0
  163. package/dist/genesys-webcomponents/{p-b852cde4.entry.js → p-00dba256.entry.js} +1 -1
  164. package/dist/genesys-webcomponents/{p-2ee07833.entry.js → p-014145e0.entry.js} +1 -1
  165. package/dist/genesys-webcomponents/{p-96447082.entry.js → p-0187cfca.entry.js} +1 -1
  166. package/dist/genesys-webcomponents/{p-0894e452.entry.js → p-04215fd3.entry.js} +1 -1
  167. package/dist/genesys-webcomponents/{p-02668d94.entry.js → p-06b92ca2.entry.js} +1 -1
  168. package/dist/genesys-webcomponents/{p-7b332a66.entry.js → p-06f30929.entry.js} +1 -1
  169. package/dist/genesys-webcomponents/{p-606575ce.entry.js → p-0a111975.entry.js} +1 -1
  170. package/dist/genesys-webcomponents/{p-c6ba5161.entry.js → p-0a686dd4.entry.js} +1 -1
  171. package/dist/genesys-webcomponents/{p-bbc82d63.entry.js → p-0b9e9b2b.entry.js} +1 -1
  172. package/dist/genesys-webcomponents/{p-7ec9a1e2.js → p-0db3479d.js} +1 -1
  173. package/dist/genesys-webcomponents/{p-140e80ee.entry.js → p-0e7dc170.entry.js} +1 -1
  174. package/dist/genesys-webcomponents/{p-0cd818da.entry.js → p-0eaec165.entry.js} +1 -1
  175. package/dist/genesys-webcomponents/{p-fb602fce.entry.js → p-1322db24.entry.js} +1 -1
  176. package/dist/genesys-webcomponents/{p-0aafbc82.entry.js → p-143fe634.entry.js} +1 -1
  177. package/dist/genesys-webcomponents/{p-395f175a.entry.js → p-1ac2967a.entry.js} +1 -1
  178. package/dist/genesys-webcomponents/{p-6f14ca4d.entry.js → p-227ba754.entry.js} +1 -1
  179. package/dist/genesys-webcomponents/{p-209e1915.entry.js → p-28b46426.entry.js} +1 -1
  180. package/dist/genesys-webcomponents/{p-761f2341.entry.js → p-2ca3f5bd.entry.js} +1 -1
  181. package/dist/genesys-webcomponents/{p-283063d6.entry.js → p-34890311.entry.js} +1 -1
  182. package/dist/genesys-webcomponents/{p-4d7a0457.entry.js → p-370563b8.entry.js} +1 -1
  183. package/dist/genesys-webcomponents/{p-3197b8ea.entry.js → p-40037e9a.entry.js} +1 -1
  184. package/dist/genesys-webcomponents/{p-cf589829.entry.js → p-42b85103.entry.js} +1 -1
  185. package/dist/genesys-webcomponents/{p-a4d8976c.entry.js → p-42d93c14.entry.js} +1 -1
  186. package/dist/genesys-webcomponents/{p-160d985e.entry.js → p-4534b0f0.entry.js} +1 -1
  187. package/dist/genesys-webcomponents/{p-b2a525ef.entry.js → p-4973d037.entry.js} +1 -1
  188. package/dist/genesys-webcomponents/{p-655e313e.entry.js → p-4ba3a4d7.entry.js} +1 -1
  189. package/dist/genesys-webcomponents/{p-539eb204.entry.js → p-4bd9fcee.entry.js} +1 -1
  190. package/dist/genesys-webcomponents/{p-9b94e81f.entry.js → p-4d7cbbbf.entry.js} +1 -1
  191. package/dist/genesys-webcomponents/{p-b1155753.entry.js → p-50fae429.entry.js} +1 -1
  192. package/dist/genesys-webcomponents/{p-4f268ebe.entry.js → p-55c943ad.entry.js} +1 -1
  193. package/dist/genesys-webcomponents/{p-f345cb29.entry.js → p-5a3e613a.entry.js} +1 -1
  194. package/dist/genesys-webcomponents/p-5dc689bf.entry.js +1 -0
  195. package/dist/genesys-webcomponents/{p-f56710cd.entry.js → p-5e666e72.entry.js} +1 -1
  196. package/dist/genesys-webcomponents/{p-38b40c06.entry.js → p-5e8b1690.entry.js} +1 -1
  197. package/dist/genesys-webcomponents/{p-beef0db8.entry.js → p-60ddf4af.entry.js} +1 -1
  198. package/dist/genesys-webcomponents/{p-faa3179a.entry.js → p-616c083d.entry.js} +1 -1
  199. package/dist/genesys-webcomponents/p-6319cc9d.entry.js +1 -0
  200. package/dist/genesys-webcomponents/{p-d77d2a28.entry.js → p-6357fd4f.entry.js} +1 -1
  201. package/dist/genesys-webcomponents/{p-81b8c762.entry.js → p-70c68f78.entry.js} +1 -1
  202. package/dist/genesys-webcomponents/{p-28fbb46f.entry.js → p-7410f336.entry.js} +1 -1
  203. package/dist/genesys-webcomponents/{p-2dc2ed4a.entry.js → p-7e49d86d.entry.js} +1 -1
  204. package/dist/genesys-webcomponents/{p-83e0aa3b.entry.js → p-7f17b7c6.entry.js} +1 -1
  205. package/dist/genesys-webcomponents/{p-f2ea1fc8.entry.js → p-80953a09.entry.js} +1 -1
  206. package/dist/genesys-webcomponents/{p-c3058d22.entry.js → p-821fa621.entry.js} +1 -1
  207. package/dist/genesys-webcomponents/{p-536ccc8e.entry.js → p-8983bfc9.entry.js} +1 -1
  208. package/dist/genesys-webcomponents/{p-07253631.entry.js → p-8b068f71.entry.js} +1 -1
  209. package/dist/genesys-webcomponents/{p-f6545877.entry.js → p-8c3381ee.entry.js} +1 -1
  210. package/dist/genesys-webcomponents/{p-1adda806.entry.js → p-8c3b568d.entry.js} +1 -1
  211. package/dist/genesys-webcomponents/{p-7ab9fa9d.entry.js → p-94c730d5.entry.js} +1 -1
  212. package/dist/genesys-webcomponents/{p-f7f46bb2.entry.js → p-9784842e.entry.js} +1 -1
  213. package/dist/genesys-webcomponents/{p-4d3cc2d7.entry.js → p-98ae6571.entry.js} +1 -1
  214. package/dist/genesys-webcomponents/{p-b1a53ee7.entry.js → p-9a5e67c6.entry.js} +1 -1
  215. package/dist/genesys-webcomponents/{p-1d8d50d1.entry.js → p-9cd12de7.entry.js} +1 -1
  216. package/dist/genesys-webcomponents/{p-631b7db1.entry.js → p-9dacadda.entry.js} +1 -1
  217. package/dist/genesys-webcomponents/{p-e4c69cea.entry.js → p-a06e7e87.entry.js} +1 -1
  218. package/dist/genesys-webcomponents/{p-d5ad30d7.entry.js → p-a4b4144f.entry.js} +1 -1
  219. package/dist/genesys-webcomponents/{p-ce0b7ecf.entry.js → p-a4db12b6.entry.js} +1 -1
  220. package/dist/genesys-webcomponents/{p-32aa0041.entry.js → p-aa3734af.entry.js} +1 -1
  221. package/dist/genesys-webcomponents/{p-2a8efc50.entry.js → p-b3148424.entry.js} +1 -1
  222. package/dist/genesys-webcomponents/{p-73c9052d.entry.js → p-b9c87f54.entry.js} +1 -1
  223. package/dist/genesys-webcomponents/{p-7206846c.entry.js → p-bef1d03d.entry.js} +1 -1
  224. package/dist/genesys-webcomponents/{p-61ce99d1.entry.js → p-c0bd9ed3.entry.js} +1 -1
  225. package/dist/genesys-webcomponents/{p-810f3994.entry.js → p-c4211421.entry.js} +1 -1
  226. package/dist/genesys-webcomponents/{p-692691dd.entry.js → p-c4820c41.entry.js} +1 -1
  227. package/dist/genesys-webcomponents/{p-2e1793b1.entry.js → p-c8e08089.entry.js} +1 -1
  228. package/dist/genesys-webcomponents/{p-53e2db6e.entry.js → p-cb2e0d0e.entry.js} +1 -1
  229. package/dist/genesys-webcomponents/{p-e2e46746.entry.js → p-d3e3fc7e.entry.js} +1 -1
  230. package/dist/genesys-webcomponents/{p-b85c9a75.entry.js → p-d5d77807.entry.js} +1 -1
  231. package/dist/genesys-webcomponents/{p-2c91ad7b.entry.js → p-d7246c95.entry.js} +1 -1
  232. package/dist/genesys-webcomponents/p-dd312964.entry.js +1 -0
  233. package/dist/genesys-webcomponents/{p-af08188f.entry.js → p-e1ea5be7.entry.js} +1 -1
  234. package/dist/genesys-webcomponents/{p-d729057c.entry.js → p-e5bd69c3.entry.js} +1 -1
  235. package/dist/genesys-webcomponents/{p-e2415433.entry.js → p-f0d98b64.entry.js} +1 -1
  236. package/dist/genesys-webcomponents/{p-5f050b7c.entry.js → p-f45cc72b.entry.js} +1 -1
  237. package/dist/genesys-webcomponents/{p-6780438a.entry.js → p-f8394b8b.entry.js} +1 -1
  238. package/dist/genesys-webcomponents/{p-688be066.entry.js → p-fa04b5af.entry.js} +1 -1
  239. package/dist/genesys-webcomponents/{p-f0130c37.entry.js → p-fc5ef376.entry.js} +1 -1
  240. package/dist/genesys-webcomponents/{p-77168890.entry.js → p-fc64f71e.entry.js} +1 -1
  241. package/dist/stencil-wrapper.js +1 -1
  242. package/dist/types/stencil-wrapper.d.ts +1 -1
  243. package/package.json +1 -1
  244. package/dist/genesys-webcomponents/p-25fede4d.entry.js +0 -1
  245. package/dist/genesys-webcomponents/p-7e8c92b8.entry.js +0 -1
  246. package/dist/genesys-webcomponents/p-858e95b5.entry.js +0 -1
  247. package/dist/genesys-webcomponents/p-ddbd8139.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as t,c as s,f as e,d as i,h,H as o,g as l}from"./p-7d26b2e1.js";import{b as a}from"./p-deee079e.js";import{w as r}from"./p-76ff3e75.js";import{r as n}from"./p-cbcbd1bb.js";import{t as c}from"./p-7ec9a1e2.js";import{t as b}from"./p-e310debb.js";import"./p-8a133b9b.js";const u=class{constructor(i){t(this,i),this.guxselectionchanged=s(this,"guxselectionchanged",7),this.guxsortchanged=s(this,"guxsortchanged",7),this.slotObserver=new MutationObserver((()=>e(this))),this.tableId=n("gux-table"),this.columnsWidths={},this.tableWidth=this.getElementComputedWidth(this.slottedTable),this.isVerticalScroll=!1,this.isHorizontalScroll=!1,this.isScrolledToFirstCell=!0,this.isScrolledToLastCell=!1,this.columnResizeHover=!1,this.compact=!1,this.objectTable=!1,this.emptyMessage=void 0,this.resizableColumns=void 0}async componentWillLoad(){c(this.root),this.i18n=await a(this.root,b)}componentDidLoad(){this.resizableColumns&&this.prepareResizableColumns(),this.prepareSelectableRows(),this.checkHorizontalScroll(),this.checkVerticalScroll(),!this.resizeObserver&&window.ResizeObserver&&(this.resizeObserver=new ResizeObserver((()=>{i((()=>{this.checkHorizontalScroll(),this.checkVerticalScroll(),this.updateScrollState(),this.scaleColumnWidths()}))}))),this.resizeObserver&&(this.resizeObserver.observe(this.tableContainer),this.resizeObserver.observe(this.slottedTable)),this.slotObserver.observe(this.slottedTable,{subtree:!0,childList:!0})}disconnectedCallback(){this.resizeObserver&&(this.resizeObserver.unobserve(this.tableContainer),this.resizeObserver.unobserve(this.slottedTable)),this.resizableColumns&&document.getElementById(`${this.tableId}-resizable-styles`).remove()}onScroll(){this.updateScrollState()}onInternalAllRowSelectChange(t){t.stopPropagation(),this.handleSelectAllRows()}onInternalRowSelectChange(t){t.stopPropagation(),this.handleRowSelection(t.target)}onMouseMove(t){this.resizableColumns&&this.updateResizeState(t)}onMouseDown(t){this.resizableColumns&&this.maybeStartResizing(t)}onMouseUp(){this.resizableColumns&&this.stopResizing()}get tableContainer(){return this.root.shadowRoot.querySelector(".gux-table-container")}get slottedTable(){return this.root.querySelector('table[slot="data"]')}get tableRows(){return Array.from(this.slottedTable.querySelectorAll("tbody tr"))}get tableColumns(){return Array.from(this.slottedTable.querySelectorAll("thead th"))}get rowCheckboxes(){return Array.from(this.slottedTable.querySelectorAll("tbody tr td gux-row-select"))}get selectAllCheckbox(){return this.slottedTable.querySelector("thead tr th gux-all-row-select")}async getSelected(){return this.getSelectedInternal()}getSelectedInternal(){return{selectedRowIds:Array.from(this.rowCheckboxes).filter((t=>t.selected)).map((t=>t.closest("tr").getAttribute("data-row-id")))}}prepareSelectableRows(){this.rowCheckboxes.forEach((t=>{this.updateRowSelection(t)})),this.updateSelectAllBoxState()}updateSelectAllBoxState(){const t=this.selectAllCheckbox;if(t){const s=this.rowCheckboxes,e=s.filter((t=>0==t.hasAttribute("disabled"))),i=e.filter((t=>t.selected)),h=Boolean(s.length),o=i.length===e.length,l=0===i.length;t.selected=h&&o,t.setIndeterminate(h&&!o&&!l)}}handleSelectAllRows(){const t=this.selectAllCheckbox;this.rowCheckboxes.forEach((s=>{s.hasAttribute("disabled")||(s.selected=t.selected,this.updateRowSelection(s))})),this.emitSelectionEvent()}handleRowSelection(t){this.updateRowSelection(t),this.updateSelectAllBoxState(),this.emitSelectionEvent()}emitSelectionEvent(){this.guxselectionchanged.emit(this.getSelectedInternal())}updateRowSelection(t){const s=t.closest("tr");t.selected?s.setAttribute("data-selected-row",""):s.removeAttribute("data-selected-row")}nextColumn(){const t=this.tableColumns,s=this.tableContainer.getBoundingClientRect();let e=(t.find((t=>t.getBoundingClientRect().right>s.right))||t[t.length-1]).getBoundingClientRect().right-s.right;e>s.width&&(e=.9*s.width),this.tableContainer.scrollLeft+=Math.ceil(e),this.updateScrollState()}previousColumn(){const t=this.tableColumns,s=this.tableContainer.getBoundingClientRect(),e=(t.reverse().find((t=>t.getBoundingClientRect().left<s.left))||t[0]).getBoundingClientRect();let i=s.left-e.left;i>s.width&&(i=.9*s.width),this.tableContainer.scrollLeft+=-Math.ceil(i),this.updateScrollState()}updateScrollState(){const t=this.tableContainer.scrollLeft,s=this.tableContainer.scrollWidth-this.tableContainer.clientWidth;this.isScrolledToFirstCell=0===t,this.isScrolledToLastCell=s-t-this.tableScrollbarConstant<=0}checkHorizontalScroll(){const t=this.slottedTable.getBoundingClientRect().width,s=this.root.getBoundingClientRect().width;this.isHorizontalScroll=t>s}checkVerticalScroll(){const t=this.tableContainer;this.isVerticalScroll=t.scrollHeight>t.clientHeight}get tableScrollbarConstant(){const t=this.tableContainer;return t?t.offsetWidth-t.clientWidth:0}prepareResizableColumns(){const t=document.createElement("style");t.id=`${this.tableId}-resizable-styles`,document.querySelector("head").appendChild(t);const s=this.calculateColumnWidths(this.tableColumns);this.tableWidth=this.getElementComputedWidth(this.slottedTable),s.slice(0,-1).forEach((t=>this.columnsWidths[t.name]=t.width)),this.setResizableColumnsStyles()}scaleColumnWidths(){if(!this.columnResizeState&&this.resizableColumns&&!this.isHorizontalScroll){const t=this.calculateColumnWidths(this.tableColumns),s=this.tableWidth,e=this.getElementComputedWidth(this.slottedTable);t.map((t=>Object.assign(Object.assign({},t),{width:this.calcScaledColWidth(t.width,s,e)}))).slice(0,-1).forEach((t=>this.columnsWidths[t.name]=t.width)),this.tableWidth=e,this.setResizableColumnsStyles()}}calcScaledColWidth(t,s,e){const i=Math.round(t/s*e);return Math.max(i,1)}updateResizeState(t){if(this.columnResizeState){const s=this.columnResizeState.resizableColumn.dataset.columnName,e=Math.max(this.columnResizeState.resizableColumnInitialWidth+(t.pageX-this.columnResizeState.columnResizeMouseStartX),1),i=this.calculateColumnWidths(this.tableColumns).map((t=>t.name===s?Object.assign(Object.assign({},t),{width:e}):t));this.columnsWidths[s]=i.find((t=>t.name===s)).width,this.setResizableColumnsStyles(),this.tableWidth=this.getElementComputedWidth(this.slottedTable)}else this.columnResizeHover=!1,r("th",t,(s=>{this.tableColumns.length-1!==s.cellIndex&&this.isInResizeZone(t,s)&&(this.columnResizeHover=!0)}))}maybeStartResizing(t){r("th",t,(s=>{this.isInResizeZone(t,s)&&(this.columnResizeState={resizableColumn:s,columnResizeMouseStartX:t.pageX,resizableColumnInitialWidth:this.getElementComputedWidth(s)})}))}stopResizing(){this.columnResizeState&&(this.columnResizeState=null)}isInResizeZone(t,s){return s.getBoundingClientRect().right-t.clientX<3}getElementComputedWidth(t){return t.clientWidth-parseInt(window.getComputedStyle(t).paddingLeft)-parseInt(window.getComputedStyle(t).paddingRight)}calculateColumnWidths(t){return t.map((t=>({name:t.dataset.columnName,width:this.getElementComputedWidth(t)})))}setResizableColumnsStyles(){const t=document.getElementById(`${this.tableId}-resizable-styles`);let s="";Object.keys(this.columnsWidths).forEach((t=>{s+=`[gs-table-id=${this.tableId}] th[data-column-name="${t}"]{\n width:${String(this.columnsWidths[t])}px;\n min-width:${String(this.columnsWidths[t])}px;\n }`})),t.innerHTML=s}get isTableEmpty(){return!this.root.children[0]||this.tableRows.length<1}get tableContainerClasses(){return{"gux-table-container":!0,"gux-column-resizing":Boolean(this.columnResizeState),"gux-column-resizing-hover":this.columnResizeHover}}render(){return h(o,{"gs-table-id":this.tableId,"gs-v-scroll":this.isVerticalScroll,"gs-h-scroll":this.isHorizontalScroll,"gs-obj-table":this.objectTable,"gs-compact":this.compact},h("div",{class:"gux-table"},h("div",{tabindex:this.isVerticalScroll?"0":"-1",id:this.tableId,class:this.tableContainerClasses},h("slot",{name:"data"})),this.isHorizontalScroll&&h("gux-button-slot-beta",{accent:"secondary"},h("button",{class:"gux-table-scroll-left",disabled:this.isScrolledToFirstCell,onClick:!this.isScrolledToFirstCell&&this.previousColumn.bind(this)},h("gux-icon",{"icon-name":"chevron-left","screenreader-text":this.i18n("scrollLeft")}))),this.isHorizontalScroll&&h("gux-button-slot-beta",{accent:"secondary",style:{marginRight:`${this.tableScrollbarConstant}px`}},h("button",{class:"gux-table-scroll-right",disabled:this.isScrolledToLastCell,style:{marginRight:`${this.tableScrollbarConstant}px`},onClick:!this.isScrolledToLastCell&&this.nextColumn.bind(this)},h("gux-icon",{"icon-name":"chevron-right","screenreader-text":this.i18n("scrollRight")}))),this.isTableEmpty&&h("div",{class:"gux-empty-table"},this.emptyMessage||this.i18n("emptyMessage"))))}get root(){return l(this)}};u.style=":host{display:block;isolation:isolate}:host .gux-table{position:relative;height:inherit}:host .gux-table .gux-table-scroll-left,:host .gux-table .gux-table-scroll-right{position:absolute;top:0;z-index:1;display:flex;align-items:center;justify-content:center;width:24px;min-width:0;height:40px;padding:0;color:#2e394c;cursor:pointer;border-radius:4px}:host .gux-table .gux-table-scroll-left gux-icon,:host .gux-table .gux-table-scroll-right gux-icon{width:8px;height:8px}:host .gux-table .gux-table-scroll-left{border-top-left-radius:0;border-bottom-left-radius:0}:host .gux-table .gux-table-scroll-right{right:0;border-top-right-radius:0;border-bottom-right-radius:0}:host .gux-table .gux-table-container{width:100%;max-height:100%;overflow-x:hidden;scrollbar-color:rgba(32, 41, 55, 0.24) #fdfdfd;scrollbar-width:thin}:host .gux-table .gux-table-container::-webkit-scrollbar{width:4px}:host .gux-table .gux-table-container::-webkit-scrollbar-track{background:#fdfdfd}:host .gux-table .gux-table-container::-webkit-scrollbar-thumb{background:rgba(32, 41, 55, 0.24)}:host .gux-table .gux-table-container::-webkit-scrollbar-thumb:hover{background:rgba(32, 41, 55, 0.48)}:host .gux-table .gux-table-container.gux-column-resizing-hover,:host .gux-table .gux-table-container.gux-column-resizing{cursor:col-resize}:host .gux-empty-table{display:flex;align-items:center;justify-content:center;height:150px;color:#596373;background:#fdfdfd;font-family:Roboto, sans-serif;font-weight:400;font-weight:300;font-size:18px;line-height:24px}";export{u as gux_table_beta}
1
+ import{r as t,c as s,f as e,d as i,h,H as o,g as l}from"./p-7d26b2e1.js";import{b as a}from"./p-deee079e.js";import{w as r}from"./p-76ff3e75.js";import{r as n}from"./p-cbcbd1bb.js";import{t as c}from"./p-0db3479d.js";import{t as b}from"./p-e310debb.js";import"./p-8a133b9b.js";const u=class{constructor(i){t(this,i),this.guxselectionchanged=s(this,"guxselectionchanged",7),this.guxsortchanged=s(this,"guxsortchanged",7),this.slotObserver=new MutationObserver((()=>e(this))),this.tableId=n("gux-table"),this.columnsWidths={},this.tableWidth=this.getElementComputedWidth(this.slottedTable),this.isVerticalScroll=!1,this.isHorizontalScroll=!1,this.isScrolledToFirstCell=!0,this.isScrolledToLastCell=!1,this.columnResizeHover=!1,this.compact=!1,this.objectTable=!1,this.emptyMessage=void 0,this.resizableColumns=void 0}async componentWillLoad(){c(this.root),this.i18n=await a(this.root,b)}componentDidLoad(){this.resizableColumns&&this.prepareResizableColumns(),this.prepareSelectableRows(),this.checkHorizontalScroll(),this.checkVerticalScroll(),!this.resizeObserver&&window.ResizeObserver&&(this.resizeObserver=new ResizeObserver((()=>{i((()=>{this.checkHorizontalScroll(),this.checkVerticalScroll(),this.updateScrollState(),this.scaleColumnWidths()}))}))),this.resizeObserver&&(this.resizeObserver.observe(this.tableContainer),this.resizeObserver.observe(this.slottedTable)),this.slotObserver.observe(this.slottedTable,{subtree:!0,childList:!0})}disconnectedCallback(){this.resizeObserver&&(this.resizeObserver.unobserve(this.tableContainer),this.resizeObserver.unobserve(this.slottedTable)),this.resizableColumns&&document.getElementById(`${this.tableId}-resizable-styles`).remove()}onScroll(){this.updateScrollState()}onInternalAllRowSelectChange(t){t.stopPropagation(),this.handleSelectAllRows()}onInternalRowSelectChange(t){t.stopPropagation(),this.handleRowSelection(t.target)}onMouseMove(t){this.resizableColumns&&this.updateResizeState(t)}onMouseDown(t){this.resizableColumns&&this.maybeStartResizing(t)}onMouseUp(){this.resizableColumns&&this.stopResizing()}get tableContainer(){return this.root.shadowRoot.querySelector(".gux-table-container")}get slottedTable(){return this.root.querySelector('table[slot="data"]')}get tableRows(){return Array.from(this.slottedTable.querySelectorAll("tbody tr"))}get tableColumns(){return Array.from(this.slottedTable.querySelectorAll("thead th"))}get rowCheckboxes(){return Array.from(this.slottedTable.querySelectorAll("tbody tr td gux-row-select"))}get selectAllCheckbox(){return this.slottedTable.querySelector("thead tr th gux-all-row-select")}async getSelected(){return this.getSelectedInternal()}getSelectedInternal(){return{selectedRowIds:Array.from(this.rowCheckboxes).filter((t=>t.selected)).map((t=>t.closest("tr").getAttribute("data-row-id")))}}prepareSelectableRows(){this.rowCheckboxes.forEach((t=>{this.updateRowSelection(t)})),this.updateSelectAllBoxState()}updateSelectAllBoxState(){const t=this.selectAllCheckbox;if(t){const s=this.rowCheckboxes,e=s.filter((t=>0==t.hasAttribute("disabled"))),i=e.filter((t=>t.selected)),h=Boolean(s.length),o=i.length===e.length,l=0===i.length;t.selected=h&&o,t.setIndeterminate(h&&!o&&!l)}}handleSelectAllRows(){const t=this.selectAllCheckbox;this.rowCheckboxes.forEach((s=>{s.hasAttribute("disabled")||(s.selected=t.selected,this.updateRowSelection(s))})),this.emitSelectionEvent()}handleRowSelection(t){this.updateRowSelection(t),this.updateSelectAllBoxState(),this.emitSelectionEvent()}emitSelectionEvent(){this.guxselectionchanged.emit(this.getSelectedInternal())}updateRowSelection(t){const s=t.closest("tr");t.selected?s.setAttribute("data-selected-row",""):s.removeAttribute("data-selected-row")}nextColumn(){const t=this.tableColumns,s=this.tableContainer.getBoundingClientRect();let e=(t.find((t=>t.getBoundingClientRect().right>s.right))||t[t.length-1]).getBoundingClientRect().right-s.right;e>s.width&&(e=.9*s.width),this.tableContainer.scrollLeft+=Math.ceil(e),this.updateScrollState()}previousColumn(){const t=this.tableColumns,s=this.tableContainer.getBoundingClientRect(),e=(t.reverse().find((t=>t.getBoundingClientRect().left<s.left))||t[0]).getBoundingClientRect();let i=s.left-e.left;i>s.width&&(i=.9*s.width),this.tableContainer.scrollLeft+=-Math.ceil(i),this.updateScrollState()}updateScrollState(){const t=this.tableContainer.scrollLeft,s=this.tableContainer.scrollWidth-this.tableContainer.clientWidth;this.isScrolledToFirstCell=0===t,this.isScrolledToLastCell=s-t-this.tableScrollbarConstant<=0}checkHorizontalScroll(){const t=this.slottedTable.getBoundingClientRect().width,s=this.root.getBoundingClientRect().width;this.isHorizontalScroll=t>s}checkVerticalScroll(){const t=this.tableContainer;this.isVerticalScroll=t.scrollHeight>t.clientHeight}get tableScrollbarConstant(){const t=this.tableContainer;return t?t.offsetWidth-t.clientWidth:0}prepareResizableColumns(){const t=document.createElement("style");t.id=`${this.tableId}-resizable-styles`,document.querySelector("head").appendChild(t);const s=this.calculateColumnWidths(this.tableColumns);this.tableWidth=this.getElementComputedWidth(this.slottedTable),s.slice(0,-1).forEach((t=>this.columnsWidths[t.name]=t.width)),this.setResizableColumnsStyles()}scaleColumnWidths(){if(!this.columnResizeState&&this.resizableColumns&&!this.isHorizontalScroll){const t=this.calculateColumnWidths(this.tableColumns),s=this.tableWidth,e=this.getElementComputedWidth(this.slottedTable);t.map((t=>Object.assign(Object.assign({},t),{width:this.calcScaledColWidth(t.width,s,e)}))).slice(0,-1).forEach((t=>this.columnsWidths[t.name]=t.width)),this.tableWidth=e,this.setResizableColumnsStyles()}}calcScaledColWidth(t,s,e){const i=Math.round(t/s*e);return Math.max(i,1)}updateResizeState(t){if(this.columnResizeState){const s=this.columnResizeState.resizableColumn.dataset.columnName,e=Math.max(this.columnResizeState.resizableColumnInitialWidth+(t.pageX-this.columnResizeState.columnResizeMouseStartX),1),i=this.calculateColumnWidths(this.tableColumns).map((t=>t.name===s?Object.assign(Object.assign({},t),{width:e}):t));this.columnsWidths[s]=i.find((t=>t.name===s)).width,this.setResizableColumnsStyles(),this.tableWidth=this.getElementComputedWidth(this.slottedTable)}else this.columnResizeHover=!1,r("th",t,(s=>{this.tableColumns.length-1!==s.cellIndex&&this.isInResizeZone(t,s)&&(this.columnResizeHover=!0)}))}maybeStartResizing(t){r("th",t,(s=>{this.isInResizeZone(t,s)&&(this.columnResizeState={resizableColumn:s,columnResizeMouseStartX:t.pageX,resizableColumnInitialWidth:this.getElementComputedWidth(s)})}))}stopResizing(){this.columnResizeState&&(this.columnResizeState=null)}isInResizeZone(t,s){return s.getBoundingClientRect().right-t.clientX<3}getElementComputedWidth(t){return t.clientWidth-parseInt(window.getComputedStyle(t).paddingLeft)-parseInt(window.getComputedStyle(t).paddingRight)}calculateColumnWidths(t){return t.map((t=>({name:t.dataset.columnName,width:this.getElementComputedWidth(t)})))}setResizableColumnsStyles(){const t=document.getElementById(`${this.tableId}-resizable-styles`);let s="";Object.keys(this.columnsWidths).forEach((t=>{s+=`[gs-table-id=${this.tableId}] th[data-column-name="${t}"]{\n width:${String(this.columnsWidths[t])}px;\n min-width:${String(this.columnsWidths[t])}px;\n }`})),t.innerHTML=s}get isTableEmpty(){return!this.root.children[0]||this.tableRows.length<1}get tableContainerClasses(){return{"gux-table-container":!0,"gux-column-resizing":Boolean(this.columnResizeState),"gux-column-resizing-hover":this.columnResizeHover}}render(){return h(o,{"gs-table-id":this.tableId,"gs-v-scroll":this.isVerticalScroll,"gs-h-scroll":this.isHorizontalScroll,"gs-obj-table":this.objectTable,"gs-compact":this.compact},h("div",{class:"gux-table"},h("div",{tabindex:this.isVerticalScroll?"0":"-1",id:this.tableId,class:this.tableContainerClasses},h("slot",{name:"data"})),this.isHorizontalScroll&&h("gux-button-slot-beta",{accent:"secondary"},h("button",{class:"gux-table-scroll-left",disabled:this.isScrolledToFirstCell,onClick:!this.isScrolledToFirstCell&&this.previousColumn.bind(this)},h("gux-icon",{"icon-name":"chevron-left","screenreader-text":this.i18n("scrollLeft")}))),this.isHorizontalScroll&&h("gux-button-slot-beta",{accent:"secondary",style:{marginRight:`${this.tableScrollbarConstant}px`}},h("button",{class:"gux-table-scroll-right",disabled:this.isScrolledToLastCell,style:{marginRight:`${this.tableScrollbarConstant}px`},onClick:!this.isScrolledToLastCell&&this.nextColumn.bind(this)},h("gux-icon",{"icon-name":"chevron-right","screenreader-text":this.i18n("scrollRight")}))),this.isTableEmpty&&h("div",{class:"gux-empty-table"},this.emptyMessage||this.i18n("emptyMessage"))))}get root(){return l(this)}};u.style=":host{display:block;isolation:isolate}:host .gux-table{position:relative;height:inherit}:host .gux-table .gux-table-scroll-left,:host .gux-table .gux-table-scroll-right{position:absolute;top:0;z-index:1;display:flex;align-items:center;justify-content:center;width:24px;min-width:0;height:40px;padding:0;color:#2e394c;cursor:pointer;border-radius:4px}:host .gux-table .gux-table-scroll-left gux-icon,:host .gux-table .gux-table-scroll-right gux-icon{width:8px;height:8px}:host .gux-table .gux-table-scroll-left{border-top-left-radius:0;border-bottom-left-radius:0}:host .gux-table .gux-table-scroll-right{right:0;border-top-right-radius:0;border-bottom-right-radius:0}:host .gux-table .gux-table-container{width:100%;max-height:100%;overflow-x:hidden;scrollbar-color:rgba(32, 41, 55, 0.24) #fdfdfd;scrollbar-width:thin}:host .gux-table .gux-table-container::-webkit-scrollbar{width:4px}:host .gux-table .gux-table-container::-webkit-scrollbar-track{background:#fdfdfd}:host .gux-table .gux-table-container::-webkit-scrollbar-thumb{background:rgba(32, 41, 55, 0.24)}:host .gux-table .gux-table-container::-webkit-scrollbar-thumb:hover{background:rgba(32, 41, 55, 0.48)}:host .gux-table .gux-table-container.gux-column-resizing-hover,:host .gux-table .gux-table-container.gux-column-resizing{cursor:col-resize}:host .gux-empty-table{display:flex;align-items:center;justify-content:center;height:150px;color:#596373;background:#fdfdfd;font-family:Roboto, sans-serif;font-weight:400;font-weight:300;font-size:18px;line-height:24px}";export{u as gux_table_beta}
@@ -1 +1 @@
1
- import{r as t,h as e,g as i}from"./p-7d26b2e1.js";import{t as s}from"./p-7ec9a1e2.js";import{O as n}from"./p-9d18d475.js";import{b as r,g as o}from"./p-deee079e.js";import{s as a}from"./p-d176c2ae.js";import{b as h}from"./p-091f51f6.js";import{g as u,a as p,b as g}from"./p-955a1e6a.js";import"./p-8a133b9b.js";const l={toggleCalendar:"Toggle month calendar view",month:"Month",year:"Year",unset:"Unset"};const d={year:"numeric",month:"long"},x=["ar","he","ja","ko","zh-cn","zh-tw"],c=class{constructor(e){t(this,e),this.value=void 0,this.min=void 0,this.max=void 0,this.disabled=!1,this.expanded=!1,this.locale=void 0}onKeyDown(t){"Escape"===t.key&&(this.expanded=!1,this.calendarToggleButtonElement.focus())}onValueUpdate(t){this.value=this.isOutOfBounds(t)?this.isBeforeMin(t)?this.min:this.max:t,a(this.root,"input"),a(this.root,"change")}onClickOutside(){this.expanded=!1}async componentWillLoad(){s(this.root),this.i18n=await r(this.root,l),this.locale=o(this.root)}isOutOfBounds(t){return this.isBeforeMin(t)||this.isAfterMax(t)}isBeforeMin(t){return this.min&&this.min>t}isAfterMax(t){return this.max&&this.max<t}toggleCalendar(){this.expanded=!this.expanded,this.expanded&&h((()=>{this.monthCalendarElement.guxFocus(this.value)}))}onMonthCalendarInput(){this.value=this.monthCalendarElement.value,this.expanded=!1,this.calendarToggleButtonElement.focus()}incrementMonth(t){if(this.value){const{year:e,month:i}=u(this.value),s=((parseInt(i)+11+t)%12+1).toString().padStart(2,"0");this.value=p(e,s)}else this.value=g()}incrementYear(t){if(this.value){const{year:e,month:i}=u(this.value),s=Math.max(Number(e)+t,0).toString();this.value=p(s,i)}else this.value=g()}onSpinnerKeyDown(t,e,i){switch(t.key){case"ArrowDown":t.preventDefault(),e(-1);break;case"ArrowUp":t.preventDefault(),e(1);break;case"ArrowLeft":case"ArrowRight":t.preventDefault(),i.focus();break;case"Enter":t.preventDefault(),this.expanded=!0,h((()=>{this.monthCalendarElement.guxFocus(this.value)}));break;case" ":t.preventDefault()}}onSpinnerKeyUp(t){t.stopPropagation()," "===t.key&&(t.preventDefault(),this.expanded=!0,h((()=>{this.monthCalendarElement.guxFocus(this.value)})))}onSpinnerClick(){this.expanded=!0}getSpinnerLabel(t){if(this.value){const{year:e,month:i}=u(this.value);return new Date(Number(e),Number(i)-1).toLocaleDateString(this.locale,{[t]:d[t]})}return this.i18n(t)}getSpinnerValueNow(t){return this.value?u(this.value)[t]:"0"}getSpinnerValueText(){if(this.value){const{year:t,month:e}=u(this.value);return new Date(Number(t),Number(e)-1).toLocaleDateString(this.locale,{year:"numeric",month:"long"})}return this.i18n("unset")}renderMonthSpinnerButton(){return e("div",{role:"spinbutton",class:{"gux-spinner":!0,"gux-empty":Boolean(!this.value)},tabIndex:this.disabled?-1:0,onKeyDown:t=>this.onSpinnerKeyDown(t,(t=>this.incrementMonth(t)),this.yearSpinnerElement),onKeyUp:t=>this.onSpinnerKeyUp(t),onClick:()=>this.onSpinnerClick(),ref:t=>this.monthSpinnerElement=t,"aria-valuenow":this.getSpinnerValueNow("month"),"aria-valuetext":this.getSpinnerValueText(),"aria-valuemin":"1","aria-valuemax":"12","aria-label":this.i18n("month")},this.getSpinnerLabel("month"))}renderYearSpinnerButton(){return e("div",{role:"spinbutton",class:{"gux-spinner":!0,"gux-empty":Boolean(!this.value)},tabIndex:this.disabled?-1:0,onKeyDown:t=>this.onSpinnerKeyDown(t,(t=>this.incrementYear(t)),this.monthSpinnerElement),onKeyUp:t=>this.onSpinnerKeyUp(t),onClick:()=>this.onSpinnerClick(),ref:t=>this.yearSpinnerElement=t,"aria-valuenow":this.getSpinnerValueNow("year"),"aria-valuetext":this.getSpinnerValueText(),"aria-valuemin":"0","aria-label":this.i18n("year")},this.getSpinnerLabel("year"))}renderSpinnerButtons(){return x.includes(this.locale)?e("span",{class:"gux-display"},this.renderYearSpinnerButton(),this.renderMonthSpinnerButton()):e("span",{class:"gux-display"},this.renderMonthSpinnerButton(),this.renderYearSpinnerButton())}renderCalendarToggleButton(){return e("button",{class:{"gux-popup-toggle":!0,"gux-expanded":this.expanded},ref:t=>this.calendarToggleButtonElement=t,type:"button",onClick:()=>this.toggleCalendar(),disabled:this.disabled},e("gux-icon",{"icon-name":"calendar","screenreader-text":this.i18n("toggleCalendar")}))}renderTarget(){return e("div",{class:"gux-target",slot:"target"},this.renderSpinnerButtons(),this.renderCalendarToggleButton())}renderPopup(){return e("gux-month-calendar",{slot:"popup",ref:t=>this.monthCalendarElement=t,onInput:()=>this.onMonthCalendarInput(),value:this.value,min:this.min,max:this.max})}render(){return e("gux-popup",{expanded:this.expanded,disabled:this.disabled},this.renderTarget(),this.renderPopup())}get root(){return i(this)}static get watchers(){return{value:["onValueUpdate"]}}};(function(t,e,i,s){var n,r=arguments.length,o=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(o=(r<3?n(o):r>3?n(e,i,o):n(e,i))||o);r>3&&o&&Object.defineProperty(e,i,o)})([n({triggerEvents:"mousedown"})],c.prototype,"onClickOutside",null),c.style=":host{display:inline-block}.gux-target{display:inline-flex;padding:4px 8px 4px 12px;cursor:pointer;background-color:#f6f7f9;border:1px solid #6b7585;border-radius:4px;box-shadow:inset 0 0 4px rgba(32, 41, 55, 0.16)}.gux-target:focus-within{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-target .gux-display{display:inline-flex;min-width:100px;padding-right:8px;color:#2e394c}.gux-target .gux-display .gux-spinner{outline:none}.gux-target .gux-display .gux-spinner:not(:first-child){margin-left:4px}.gux-target .gux-display .gux-spinner:focus-visible{background:#deeaff}.gux-target .gux-display .gux-spinner.gux-empty{color:#596373}.gux-target .gux-popup-toggle{justify-content:right;padding:2px;color:#596373;background:transparent;border:none;border-radius:4px}.gux-target .gux-popup-toggle:focus-visible{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-target .gux-popup-toggle:not(:disabled):focus,.gux-target .gux-popup-toggle:not(:disabled):hover{color:#2e394c;cursor:pointer}.gux-target .gux-popup-toggle gux-icon{width:16px;height:16px}.gux-target .gux-popup-toggle.gux-expanded{color:#2a60c8}.gux-target .gux-popup-toggle.gux-expanded:not(:disabled):focus-visible,.gux-target .gux-popup-toggle.gux-expanded:not(:disabled):hover{color:#2a60c8}";export{c as gux_month_picker_beta}
1
+ import{r as t,h as e,g as i}from"./p-7d26b2e1.js";import{t as s}from"./p-0db3479d.js";import{O as n}from"./p-9d18d475.js";import{b as r,g as o}from"./p-deee079e.js";import{s as a}from"./p-d176c2ae.js";import{b as h}from"./p-091f51f6.js";import{g as u,a as p,b as g}from"./p-955a1e6a.js";import"./p-8a133b9b.js";const l={toggleCalendar:"Toggle month calendar view",month:"Month",year:"Year",unset:"Unset"};const d={year:"numeric",month:"long"},x=["ar","he","ja","ko","zh-cn","zh-tw"],c=class{constructor(e){t(this,e),this.value=void 0,this.min=void 0,this.max=void 0,this.disabled=!1,this.expanded=!1,this.locale=void 0}onKeyDown(t){"Escape"===t.key&&(this.expanded=!1,this.calendarToggleButtonElement.focus())}onValueUpdate(t){this.value=this.isOutOfBounds(t)?this.isBeforeMin(t)?this.min:this.max:t,a(this.root,"input"),a(this.root,"change")}onClickOutside(){this.expanded=!1}async componentWillLoad(){s(this.root),this.i18n=await r(this.root,l),this.locale=o(this.root)}isOutOfBounds(t){return this.isBeforeMin(t)||this.isAfterMax(t)}isBeforeMin(t){return this.min&&this.min>t}isAfterMax(t){return this.max&&this.max<t}toggleCalendar(){this.expanded=!this.expanded,this.expanded&&h((()=>{this.monthCalendarElement.guxFocus(this.value)}))}onMonthCalendarInput(){this.value=this.monthCalendarElement.value,this.expanded=!1,this.calendarToggleButtonElement.focus()}incrementMonth(t){if(this.value){const{year:e,month:i}=u(this.value),s=((parseInt(i)+11+t)%12+1).toString().padStart(2,"0");this.value=p(e,s)}else this.value=g()}incrementYear(t){if(this.value){const{year:e,month:i}=u(this.value),s=Math.max(Number(e)+t,0).toString();this.value=p(s,i)}else this.value=g()}onSpinnerKeyDown(t,e,i){switch(t.key){case"ArrowDown":t.preventDefault(),e(-1);break;case"ArrowUp":t.preventDefault(),e(1);break;case"ArrowLeft":case"ArrowRight":t.preventDefault(),i.focus();break;case"Enter":t.preventDefault(),this.expanded=!0,h((()=>{this.monthCalendarElement.guxFocus(this.value)}));break;case" ":t.preventDefault()}}onSpinnerKeyUp(t){t.stopPropagation()," "===t.key&&(t.preventDefault(),this.expanded=!0,h((()=>{this.monthCalendarElement.guxFocus(this.value)})))}onSpinnerClick(){this.expanded=!0}getSpinnerLabel(t){if(this.value){const{year:e,month:i}=u(this.value);return new Date(Number(e),Number(i)-1).toLocaleDateString(this.locale,{[t]:d[t]})}return this.i18n(t)}getSpinnerValueNow(t){return this.value?u(this.value)[t]:"0"}getSpinnerValueText(){if(this.value){const{year:t,month:e}=u(this.value);return new Date(Number(t),Number(e)-1).toLocaleDateString(this.locale,{year:"numeric",month:"long"})}return this.i18n("unset")}renderMonthSpinnerButton(){return e("div",{role:"spinbutton",class:{"gux-spinner":!0,"gux-empty":Boolean(!this.value)},tabIndex:this.disabled?-1:0,onKeyDown:t=>this.onSpinnerKeyDown(t,(t=>this.incrementMonth(t)),this.yearSpinnerElement),onKeyUp:t=>this.onSpinnerKeyUp(t),onClick:()=>this.onSpinnerClick(),ref:t=>this.monthSpinnerElement=t,"aria-valuenow":this.getSpinnerValueNow("month"),"aria-valuetext":this.getSpinnerValueText(),"aria-valuemin":"1","aria-valuemax":"12","aria-label":this.i18n("month")},this.getSpinnerLabel("month"))}renderYearSpinnerButton(){return e("div",{role:"spinbutton",class:{"gux-spinner":!0,"gux-empty":Boolean(!this.value)},tabIndex:this.disabled?-1:0,onKeyDown:t=>this.onSpinnerKeyDown(t,(t=>this.incrementYear(t)),this.monthSpinnerElement),onKeyUp:t=>this.onSpinnerKeyUp(t),onClick:()=>this.onSpinnerClick(),ref:t=>this.yearSpinnerElement=t,"aria-valuenow":this.getSpinnerValueNow("year"),"aria-valuetext":this.getSpinnerValueText(),"aria-valuemin":"0","aria-label":this.i18n("year")},this.getSpinnerLabel("year"))}renderSpinnerButtons(){return x.includes(this.locale)?e("span",{class:"gux-display"},this.renderYearSpinnerButton(),this.renderMonthSpinnerButton()):e("span",{class:"gux-display"},this.renderMonthSpinnerButton(),this.renderYearSpinnerButton())}renderCalendarToggleButton(){return e("button",{class:{"gux-popup-toggle":!0,"gux-expanded":this.expanded},ref:t=>this.calendarToggleButtonElement=t,type:"button",onClick:()=>this.toggleCalendar(),disabled:this.disabled},e("gux-icon",{"icon-name":"calendar","screenreader-text":this.i18n("toggleCalendar")}))}renderTarget(){return e("div",{class:"gux-target",slot:"target"},this.renderSpinnerButtons(),this.renderCalendarToggleButton())}renderPopup(){return e("gux-month-calendar",{slot:"popup",ref:t=>this.monthCalendarElement=t,onInput:()=>this.onMonthCalendarInput(),value:this.value,min:this.min,max:this.max})}render(){return e("gux-popup",{expanded:this.expanded,disabled:this.disabled},this.renderTarget(),this.renderPopup())}get root(){return i(this)}static get watchers(){return{value:["onValueUpdate"]}}};(function(t,e,i,s){var n,r=arguments.length,o=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(o=(r<3?n(o):r>3?n(e,i,o):n(e,i))||o);r>3&&o&&Object.defineProperty(e,i,o)})([n({triggerEvents:"mousedown"})],c.prototype,"onClickOutside",null),c.style=":host{display:inline-block}.gux-target{display:inline-flex;padding:4px 8px 4px 12px;cursor:pointer;background-color:#f6f7f9;border:1px solid #6b7585;border-radius:4px;box-shadow:inset 0 0 4px rgba(32, 41, 55, 0.16)}.gux-target:focus-within{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-target .gux-display{display:inline-flex;min-width:100px;padding-right:8px;color:#2e394c}.gux-target .gux-display .gux-spinner{outline:none}.gux-target .gux-display .gux-spinner:not(:first-child){margin-left:4px}.gux-target .gux-display .gux-spinner:focus-visible{background:#deeaff}.gux-target .gux-display .gux-spinner.gux-empty{color:#596373}.gux-target .gux-popup-toggle{justify-content:right;padding:2px;color:#596373;background:transparent;border:none;border-radius:4px}.gux-target .gux-popup-toggle:focus-visible{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-target .gux-popup-toggle:not(:disabled):focus,.gux-target .gux-popup-toggle:not(:disabled):hover{color:#2e394c;cursor:pointer}.gux-target .gux-popup-toggle gux-icon{width:16px;height:16px}.gux-target .gux-popup-toggle.gux-expanded{color:#2a60c8}.gux-target .gux-popup-toggle.gux-expanded:not(:disabled):focus-visible,.gux-target .gux-popup-toggle.gux-expanded:not(:disabled):hover{color:#2a60c8}";export{c as gux_month_picker_beta}
@@ -1 +1 @@
1
- import{r,h as s,g as t}from"./p-7d26b2e1.js";import{t as e}from"./p-7ec9a1e2.js";const o=class{constructor(s){r(this,s),this.screenreaderText=void 0}componentWillLoad(){e(this.root)}render(){return s("gux-radial-loading",{class:"gux-spinner","screenreader-text":this.screenreaderText,context:"full-page"})}get root(){return t(this)}};o.style=":host{display:flex}.gux-spinner{margin:auto}";export{o as gux_page_loading_spinner}
1
+ import{r,h as s,g as t}from"./p-7d26b2e1.js";import{t as e}from"./p-0db3479d.js";const o=class{constructor(s){r(this,s),this.screenreaderText=void 0}componentWillLoad(){e(this.root)}render(){return s("gux-radial-loading",{class:"gux-spinner","screenreader-text":this.screenreaderText,context:"full-page"})}get root(){return t(this)}};o.style=":host{display:flex}.gux-spinner{margin:auto}";export{o as gux_page_loading_spinner}
@@ -1 +1 @@
1
- import{r as t,h as i,g as e}from"./p-7d26b2e1.js";import{c as o,o as r}from"./p-3f5341ea.js";import{O as n}from"./p-f34ce7dc.js";import{o as s}from"./p-3701eff0.js";import{p as a}from"./p-c10e41a9.js";import{h as l}from"./p-08bc2e6b.js";import{G as f,a as p,g as u,v as x,b as h}from"./p-b3c9fd06.js";import{G as c,a as g}from"./p-a733f4ca.js";import{t as d}from"./p-7ec9a1e2.js";import"./p-cbcbd1bb.js";import"./p-d0805f56.js";import"./p-d176c2ae.js";const m=class{constructor(i){t(this,i),this.labelPosition=void 0,this.computedLabelPosition=void 0,this.disabled=void 0,this.required=void 0,this.hasError=!1,this.hasHelp=!1}onMutation(){this.hasError=l(this.root,"error"),this.hasHelp=l(this.root,"help")}componentWillLoad(){this.setInput(),this.setLabel(),this.hasError=l(this.root,"error"),this.hasHelp=l(this.root,"help"),d(this.root,{variant:this.variant})}disconnectedCallback(){this.disabledObserver&&this.disabledObserver.disconnect(),this.requiredObserver&&this.requiredObserver.disconnect()}render(){return i(g,{labelPosition:this.computedLabelPosition},i(c,{position:this.computedLabelPosition,required:this.required},i("slot",{name:"label",onSlotchange:()=>this.setLabel()})),i("div",{class:"gux-input-and-error-container"},i("div",{class:{"gux-input":!0,"gux-input-error":this.hasError}},i("div",{class:{"gux-input-container":!0,"gux-disabled":this.disabled}},i("slot",{name:"input",onSlotchange:()=>this.setInput()}))),i(f,{show:this.hasError},i("slot",{name:"error"})),i(p,{show:!this.hasError&&this.hasHelp},i("slot",{name:"help"}))))}get variant(){return this.labelPosition?this.labelPosition.toLowerCase():"none"}setInput(){this.input=u(this.root,'input[type="color"][slot="input"]'),a(this.input),this.disabled=o(this.input),this.required=this.input.required,this.disabledObserver=r(this.input,(t=>{this.disabled=t})),this.requiredObserver=s(this.input,(t=>{this.required=t})),x(this.root,this.input)}setLabel(){this.label=this.root.querySelector('label[slot="label"]'),this.computedLabelPosition=h(this.label,this.labelPosition)}get root(){return e(this)}};(function(t,i,e,o){var r,n=arguments.length,s=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,i,e,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(i,e,s):r(i,e))||s);n>3&&s&&Object.defineProperty(i,e,s)})([n({childList:!0,subtree:!0})],m.prototype,"onMutation",null),m.style=".gux-form-field-container{margin:var(--gux-form-field-container-margin-top, 16px) 0 var(--gux-form-field-container-margin-bottom, 16px) 0}.gux-form-field-container.gux-beside{display:flex;flex-direction:row}.gux-form-field-error{display:none;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:flex-start;justify-content:flex-start;margin:4px 0;font-size:12px;line-height:20px;color:#2e394c}.gux-form-field-error.gux-show{display:flex}.gux-form-field-error gux-icon{flex:0 1 auto;align-self:auto;order:0;min-width:16px;min-height:16px;margin:2px 4px 0 0;color:#ea0b0b}.gux-form-field-error .gux-message{flex:0 1 auto;align-self:auto;order:0}.gux-form-field-label.gux-required::after{font-size:12px;color:#ea0b0b;content:' *'}.gux-form-field-label.gux-beside{position:relative;top:8px;width:fit-content;min-width:45px;margin-right:8px}.gux-form-field-label.gux-above{margin-bottom:8px}.gux-form-field-label.gux-screenreader{position:absolute;top:auto;left:-10000px;width:1px;height:1px;overflow:hidden}.gux-form-field-help{display:none;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:flex-start;justify-content:flex-start;margin:4px 0;font-size:12px;font-weight:400;line-height:20px;color:#6b7585}.gux-form-field-help.gux-show{display:flex}.gux-form-field-help .gux-message{flex:0 1 auto;align-self:none;order:0}:host{display:block;color:#2e394c}::slotted(label){font-family:Roboto, sans-serif;font-weight:400;font-weight:700;font-size:12px;line-height:16px}::slotted(input){flex:1 1 auto;align-self:auto;order:0;width:32px;height:32px;overflow:hidden;font-size:12px;color:#2e394c;text-align:right;text-overflow:ellipsis;background-color:#f6f7f9;border:none;border-radius:4px;outline:none}::slotted(input)::placeholder{color:#596373;opacity:1}.gux-input-and-error-container{flex-grow:1}.gux-input-and-error-container .gux-input{display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:center}.gux-input-and-error-container .gux-input .gux-input-container{box-sizing:border-box;display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:center;align-self:auto;justify-content:center;order:0;height:32px;font-family:inherit;font-size:12px;line-height:1.6667;color:#2e394c;background-color:#f6f7f9;background-image:none;border-radius:4px}.gux-input-and-error-container .gux-input .gux-input-container.gux-disabled{opacity:0.5}.gux-input-and-error-container .gux-input .gux-input-container:focus-within{border-color:#2a60c8;outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-input-and-error-container .gux-input .gux-input-container.gux-input-error .gux-input-container{border-color:#ea0b0b}";export{m as gux_form_field_color}
1
+ import{r as t,h as i,g as e}from"./p-7d26b2e1.js";import{c as o,o as r}from"./p-3f5341ea.js";import{O as n}from"./p-f34ce7dc.js";import{o as s}from"./p-3701eff0.js";import{p as a}from"./p-c10e41a9.js";import{h as l}from"./p-08bc2e6b.js";import{G as f,a as p,g as u,v as x,b as h}from"./p-b3c9fd06.js";import{G as c,a as d}from"./p-a733f4ca.js";import{t as g}from"./p-0db3479d.js";import"./p-cbcbd1bb.js";import"./p-d0805f56.js";import"./p-d176c2ae.js";const m=class{constructor(i){t(this,i),this.labelPosition=void 0,this.computedLabelPosition=void 0,this.disabled=void 0,this.required=void 0,this.hasError=!1,this.hasHelp=!1}onMutation(){this.hasError=l(this.root,"error"),this.hasHelp=l(this.root,"help")}componentWillLoad(){this.setInput(),this.setLabel(),this.hasError=l(this.root,"error"),this.hasHelp=l(this.root,"help"),g(this.root,{variant:this.variant})}disconnectedCallback(){this.disabledObserver&&this.disabledObserver.disconnect(),this.requiredObserver&&this.requiredObserver.disconnect()}render(){return i(d,{labelPosition:this.computedLabelPosition},i(c,{position:this.computedLabelPosition,required:this.required},i("slot",{name:"label",onSlotchange:()=>this.setLabel()})),i("div",{class:"gux-input-and-error-container"},i("div",{class:{"gux-input":!0,"gux-input-error":this.hasError}},i("div",{class:{"gux-input-container":!0,"gux-disabled":this.disabled}},i("slot",{name:"input",onSlotchange:()=>this.setInput()}))),i(f,{show:this.hasError},i("slot",{name:"error"})),i(p,{show:!this.hasError&&this.hasHelp},i("slot",{name:"help"}))))}get variant(){return this.labelPosition?this.labelPosition.toLowerCase():"none"}setInput(){this.input=u(this.root,'input[type="color"][slot="input"]'),a(this.input),this.disabled=o(this.input),this.required=this.input.required,this.disabledObserver=r(this.input,(t=>{this.disabled=t})),this.requiredObserver=s(this.input,(t=>{this.required=t})),x(this.root,this.input)}setLabel(){this.label=this.root.querySelector('label[slot="label"]'),this.computedLabelPosition=h(this.label,this.labelPosition)}get root(){return e(this)}};(function(t,i,e,o){var r,n=arguments.length,s=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,i,e,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(i,e,s):r(i,e))||s);n>3&&s&&Object.defineProperty(i,e,s)})([n({childList:!0,subtree:!0})],m.prototype,"onMutation",null),m.style=".gux-form-field-container{margin:var(--gux-form-field-container-margin-top, 16px) 0 var(--gux-form-field-container-margin-bottom, 16px) 0}.gux-form-field-container.gux-beside{display:flex;flex-direction:row}.gux-form-field-error{display:none;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:flex-start;justify-content:flex-start;margin:4px 0;font-size:12px;line-height:20px;color:#2e394c}.gux-form-field-error.gux-show{display:flex}.gux-form-field-error gux-icon{flex:0 1 auto;align-self:auto;order:0;min-width:16px;min-height:16px;margin:2px 4px 0 0;color:#ea0b0b}.gux-form-field-error .gux-message{flex:0 1 auto;align-self:auto;order:0}.gux-form-field-label.gux-required::after{font-size:12px;color:#ea0b0b;content:' *'}.gux-form-field-label.gux-beside{position:relative;top:8px;width:fit-content;min-width:45px;margin-right:8px}.gux-form-field-label.gux-above{margin-bottom:8px}.gux-form-field-label.gux-screenreader{position:absolute;top:auto;left:-10000px;width:1px;height:1px;overflow:hidden}.gux-form-field-help{display:none;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:flex-start;justify-content:flex-start;margin:4px 0;font-size:12px;font-weight:400;line-height:20px;color:#6b7585}.gux-form-field-help.gux-show{display:flex}.gux-form-field-help .gux-message{flex:0 1 auto;align-self:none;order:0}:host{display:block;color:#2e394c}::slotted(label){font-family:Roboto, sans-serif;font-weight:400;font-weight:700;font-size:12px;line-height:16px}::slotted(input){flex:1 1 auto;align-self:auto;order:0;width:32px;height:32px;overflow:hidden;font-size:12px;color:#2e394c;text-align:right;text-overflow:ellipsis;background-color:#f6f7f9;border:none;border-radius:4px;outline:none}::slotted(input)::placeholder{color:#596373;opacity:1}.gux-input-and-error-container{flex-grow:1}.gux-input-and-error-container .gux-input{display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:center}.gux-input-and-error-container .gux-input .gux-input-container{box-sizing:border-box;display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:center;align-self:auto;justify-content:center;order:0;height:32px;font-family:inherit;font-size:12px;line-height:1.6667;color:#2e394c;background-color:#f6f7f9;background-image:none;border-radius:4px}.gux-input-and-error-container .gux-input .gux-input-container.gux-disabled{opacity:0.5}.gux-input-and-error-container .gux-input .gux-input-container:focus-within{border-color:#2a60c8;outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-input-and-error-container .gux-input .gux-input-container.gux-input-error .gux-input-container{border-color:#ea0b0b}";export{m as gux_form_field_color}
@@ -1 +1 @@
1
- import{r as g,a as i,h as p,g as a}from"./p-7d26b2e1.js";import{t as o}from"./p-7ec9a1e2.js";const x=class{constructor(i){g(this,i),this.region=void 0,this.screenreaderText=void 0}componentWillLoad(){o(this.root)}render(){var g;const a=i("assets/sprites/region-flags.png");return p("span",{role:this.screenreaderText?"img":"",class:"flag flag-"+(null===(g=this.region)||void 0===g?void 0:g.toLowerCase()),style:{backgroundImage:`url(${a})`},"aria-label":this.screenreaderText})}static get assetsDirs(){return["assets"]}get root(){return a(this)}};x.style=".flag-ad{background-image:url();background-position:0px 0px;width:24px;height:24px}.flag-ae{background-image:url();background-position:-24px 0px;width:24px;height:24px}.flag-af{background-image:url();background-position:0px -24px;width:24px;height:24px}.flag-ag{background-image:url();background-position:-24px -24px;width:24px;height:24px}.flag-ai{background-image:url();background-position:-48px 0px;width:24px;height:24px}.flag-al{background-image:url();background-position:-48px -24px;width:24px;height:24px}.flag-am{background-image:url();background-position:0px -48px;width:24px;height:24px}.flag-ao{background-image:url();background-position:-24px -48px;width:24px;height:24px}.flag-ar{background-image:url();background-position:-48px -48px;width:24px;height:24px}.flag-as{background-image:url();background-position:-72px 0px;width:24px;height:24px}.flag-at{background-image:url();background-position:-72px -24px;width:24px;height:24px}.flag-au{background-image:url();background-position:-72px -48px;width:24px;height:24px}.flag-aw{background-image:url();background-position:0px -72px;width:24px;height:24px}.flag-ax{background-image:url();background-position:-24px -72px;width:24px;height:24px}.flag-az{background-image:url();background-position:-48px -72px;width:24px;height:24px}.flag-ba{background-image:url();background-position:-72px -72px;width:24px;height:24px}.flag-bb{background-image:url();background-position:-96px 0px;width:24px;height:24px}.flag-bd{background-image:url();background-position:-96px -24px;width:24px;height:24px}.flag-be{background-image:url();background-position:-96px -48px;width:24px;height:24px}.flag-bf{background-image:url();background-position:-96px -72px;width:24px;height:24px}.flag-bg{background-image:url();background-position:0px -96px;width:24px;height:24px}.flag-bh{background-image:url();background-position:-24px -96px;width:24px;height:24px}.flag-bi{background-image:url();background-position:-48px -96px;width:24px;height:24px}.flag-bj{background-image:url();background-position:-72px -96px;width:24px;height:24px}.flag-bl{background-image:url();background-position:-96px -96px;width:24px;height:24px}.flag-bm{background-image:url();background-position:-120px 0px;width:24px;height:24px}.flag-bn{background-image:url();background-position:-120px -24px;width:24px;height:24px}.flag-bo{background-image:url();background-position:-120px -48px;width:24px;height:24px}.flag-bq{background-image:url();background-position:-120px -72px;width:24px;height:24px}.flag-br{background-image:url();background-position:-120px -96px;width:24px;height:24px}.flag-bs{background-image:url();background-position:0px -120px;width:24px;height:24px}.flag-bt{background-image:url();background-position:-24px -120px;width:24px;height:24px}.flag-bv{background-image:url();background-position:-48px -120px;width:24px;height:24px}.flag-bw{background-image:url();background-position:-72px -120px;width:24px;height:24px}.flag-by{background-image:url();background-position:-96px -120px;width:24px;height:24px}.flag-bz{background-image:url();background-position:-120px -120px;width:24px;height:24px}.flag-ca{background-image:url();background-position:-144px 0px;width:24px;height:24px}.flag-cc{background-image:url();background-position:-144px -24px;width:24px;height:24px}.flag-cd{background-image:url();background-position:-144px -48px;width:24px;height:24px}.flag-cf{background-image:url();background-position:-144px -72px;width:24px;height:24px}.flag-cg{background-image:url();background-position:-144px -96px;width:24px;height:24px}.flag-ch{background-image:url();background-position:-144px -120px;width:24px;height:24px}.flag-ci{background-image:url();background-position:0px -144px;width:24px;height:24px}.flag-ck{background-image:url();background-position:-24px -144px;width:24px;height:24px}.flag-cl{background-image:url();background-position:-48px -144px;width:24px;height:24px}.flag-cm{background-image:url();background-position:-72px -144px;width:24px;height:24px}.flag-cn{background-image:url();background-position:-96px -144px;width:24px;height:24px}.flag-co{background-image:url();background-position:-120px -144px;width:24px;height:24px}.flag-cr{background-image:url();background-position:-144px -144px;width:24px;height:24px}.flag-cu{background-image:url();background-position:-168px 0px;width:24px;height:24px}.flag-cv{background-image:url();background-position:-168px -24px;width:24px;height:24px}.flag-cw{background-image:url();background-position:-168px -48px;width:24px;height:24px}.flag-cx{background-image:url();background-position:-168px -72px;width:24px;height:24px}.flag-cy{background-image:url();background-position:-168px -96px;width:24px;height:24px}.flag-cz{background-image:url();background-position:-168px -120px;width:24px;height:24px}.flag-de{background-image:url();background-position:-168px -144px;width:24px;height:24px}.flag-dj{background-image:url();background-position:0px -168px;width:24px;height:24px}.flag-dk{background-image:url();background-position:-24px -168px;width:24px;height:24px}.flag-dm{background-image:url();background-position:-48px -168px;width:24px;height:24px}.flag-do{background-image:url();background-position:-72px -168px;width:24px;height:24px}.flag-dz{background-image:url();background-position:-96px -168px;width:24px;height:24px}.flag-ec{background-image:url();background-position:-120px -168px;width:24px;height:24px}.flag-ee{background-image:url();background-position:-144px -168px;width:24px;height:24px}.flag-eg{background-image:url();background-position:-168px -168px;width:24px;height:24px}.flag-eh{background-image:url();background-position:-192px 0px;width:24px;height:24px}.flag-er{background-image:url();background-position:-192px -24px;width:24px;height:24px}.flag-es{background-image:url();background-position:-192px -48px;width:24px;height:24px}.flag-et{background-image:url();background-position:-192px -72px;width:24px;height:24px}.flag-fi{background-image:url();background-position:-192px -96px;width:24px;height:24px}.flag-fj{background-image:url();background-position:-192px -120px;width:24px;height:24px}.flag-fk{background-image:url();background-position:-192px -144px;width:24px;height:24px}.flag-fm{background-image:url();background-position:-192px -168px;width:24px;height:24px}.flag-fo{background-image:url();background-position:0px -192px;width:24px;height:24px}.flag-fr{background-image:url();background-position:-24px -192px;width:24px;height:24px}.flag-ga{background-image:url();background-position:-48px -192px;width:24px;height:24px}.flag-gb{background-image:url();background-position:-72px -192px;width:24px;height:24px}.flag-gd{background-image:url();background-position:-96px -192px;width:24px;height:24px}.flag-ge{background-image:url();background-position:-120px -192px;width:24px;height:24px}.flag-gf{background-image:url();background-position:-144px -192px;width:24px;height:24px}.flag-gg{background-image:url();background-position:-168px -192px;width:24px;height:24px}.flag-gh{background-image:url();background-position:-192px -192px;width:24px;height:24px}.flag-gi{background-image:url();background-position:-216px 0px;width:24px;height:24px}.flag-gl{background-image:url();background-position:-216px -24px;width:24px;height:24px}.flag-gm{background-image:url();background-position:-216px -48px;width:24px;height:24px}.flag-gn{background-image:url();background-position:-216px -72px;width:24px;height:24px}.flag-gp{background-image:url();background-position:-216px -96px;width:24px;height:24px}.flag-gq{background-image:url();background-position:-216px -120px;width:24px;height:24px}.flag-gr{background-image:url();background-position:-216px -144px;width:24px;height:24px}.flag-gs{background-image:url();background-position:-216px -168px;width:24px;height:24px}.flag-gt{background-image:url();background-position:-216px -192px;width:24px;height:24px}.flag-gu{background-image:url();background-position:0px -216px;width:24px;height:24px}.flag-gw{background-image:url();background-position:-24px -216px;width:24px;height:24px}.flag-gy{background-image:url();background-position:-48px -216px;width:24px;height:24px}.flag-hk{background-image:url();background-position:-72px -216px;width:24px;height:24px}.flag-hn{background-image:url();background-position:-96px -216px;width:24px;height:24px}.flag-hr{background-image:url();background-position:-120px -216px;width:24px;height:24px}.flag-ht{background-image:url();background-position:-144px -216px;width:24px;height:24px}.flag-hu{background-image:url();background-position:-168px -216px;width:24px;height:24px}.flag-id{background-image:url();background-position:-192px -216px;width:24px;height:24px}.flag-ie{background-image:url();background-position:-216px -216px;width:24px;height:24px}.flag-il{background-image:url();background-position:-240px 0px;width:24px;height:24px}.flag-im{background-image:url();background-position:-240px -24px;width:24px;height:24px}.flag-in{background-image:url();background-position:-240px -48px;width:24px;height:24px}.flag-io{background-image:url();background-position:-240px -72px;width:24px;height:24px}.flag-iq{background-image:url();background-position:-240px -96px;width:24px;height:24px}.flag-ir{background-image:url();background-position:-240px -120px;width:24px;height:24px}.flag-is{background-image:url();background-position:-240px -144px;width:24px;height:24px}.flag-it{background-image:url();background-position:-240px -168px;width:24px;height:24px}.flag-je{background-image:url();background-position:-240px -192px;width:24px;height:24px}.flag-jm{background-image:url();background-position:-240px -216px;width:24px;height:24px}.flag-jo{background-image:url();background-position:0px -240px;width:24px;height:24px}.flag-jp{background-image:url();background-position:-24px -240px;width:24px;height:24px}.flag-ke{background-image:url();background-position:-48px -240px;width:24px;height:24px}.flag-kg{background-image:url();background-position:-72px -240px;width:24px;height:24px}.flag-kh{background-image:url();background-position:-96px -240px;width:24px;height:24px}.flag-ki{background-image:url();background-position:-120px -240px;width:24px;height:24px}.flag-km{background-image:url();background-position:-144px -240px;width:24px;height:24px}.flag-kn{background-image:url();background-position:-168px -240px;width:24px;height:24px}.flag-kp{background-image:url();background-position:-192px -240px;width:24px;height:24px}.flag-kr{background-image:url();background-position:-216px -240px;width:24px;height:24px}.flag-kw{background-image:url();background-position:-240px -240px;width:24px;height:24px}.flag-ky{background-image:url();background-position:-264px 0px;width:24px;height:24px}.flag-kz{background-image:url();background-position:-264px -24px;width:24px;height:24px}.flag-la{background-image:url();background-position:-264px -48px;width:24px;height:24px}.flag-lb{background-image:url();background-position:-264px -72px;width:24px;height:24px}.flag-lc{background-image:url();background-position:-264px -96px;width:24px;height:24px}.flag-li{background-image:url();background-position:-264px -120px;width:24px;height:24px}.flag-lk{background-image:url();background-position:-264px -144px;width:24px;height:24px}.flag-lr{background-image:url();background-position:-264px -168px;width:24px;height:24px}.flag-ls{background-image:url();background-position:-264px -192px;width:24px;height:24px}.flag-lt{background-image:url();background-position:-264px -216px;width:24px;height:24px}.flag-lu{background-image:url();background-position:-264px -240px;width:24px;height:24px}.flag-lv{background-image:url();background-position:0px -264px;width:24px;height:24px}.flag-ly{background-image:url();background-position:-24px -264px;width:24px;height:24px}.flag-ma{background-image:url();background-position:-48px -264px;width:24px;height:24px}.flag-mc{background-image:url();background-position:-72px -264px;width:24px;height:24px}.flag-md{background-image:url();background-position:-96px -264px;width:24px;height:24px}.flag-me{background-image:url();background-position:-120px -264px;width:24px;height:24px}.flag-mf{background-image:url();background-position:-144px -264px;width:24px;height:24px}.flag-mg{background-image:url();background-position:-168px -264px;width:24px;height:24px}.flag-mh{background-image:url();background-position:-192px -264px;width:24px;height:24px}.flag-mk{background-image:url();background-position:-216px -264px;width:24px;height:24px}.flag-ml{background-image:url();background-position:-240px -264px;width:24px;height:24px}.flag-mm{background-image:url();background-position:-264px -264px;width:24px;height:24px}.flag-mn{background-image:url();background-position:-288px 0px;width:24px;height:24px}.flag-mo{background-image:url();background-position:-288px -24px;width:24px;height:24px}.flag-mp{background-image:url();background-position:-288px -48px;width:24px;height:24px}.flag-mq{background-image:url();background-position:-288px -72px;width:24px;height:24px}.flag-mr{background-image:url();background-position:-288px -96px;width:24px;height:24px}.flag-ms{background-image:url();background-position:-288px -120px;width:24px;height:24px}.flag-mt{background-image:url();background-position:-288px -144px;width:24px;height:24px}.flag-mu{background-image:url();background-position:-288px -168px;width:24px;height:24px}.flag-mv{background-image:url();background-position:-288px -192px;width:24px;height:24px}.flag-mw{background-image:url();background-position:-288px -216px;width:24px;height:24px}.flag-mx{background-image:url();background-position:-288px -240px;width:24px;height:24px}.flag-my{background-image:url();background-position:-288px -264px;width:24px;height:24px}.flag-mz{background-image:url();background-position:0px -288px;width:24px;height:24px}.flag-na{background-image:url();background-position:-24px -288px;width:24px;height:24px}.flag-nc{background-image:url();background-position:-48px -288px;width:24px;height:24px}.flag-ne{background-image:url();background-position:-72px -288px;width:24px;height:24px}.flag-nf{background-image:url();background-position:-96px -288px;width:24px;height:24px}.flag-ng{background-image:url();background-position:-120px -288px;width:24px;height:24px}.flag-ni{background-image:url();background-position:-144px -288px;width:24px;height:24px}.flag-nl{background-image:url();background-position:-168px -288px;width:24px;height:24px}.flag-no{background-image:url();background-position:-192px -288px;width:24px;height:24px}.flag-np{background-image:url();background-position:-216px -288px;width:24px;height:24px}.flag-nr{background-image:url();background-position:-240px -288px;width:24px;height:24px}.flag-nu{background-image:url();background-position:-264px -288px;width:24px;height:24px}.flag-nz{background-image:url();background-position:-288px -288px;width:24px;height:24px}.flag-om{background-image:url();background-position:-312px 0px;width:24px;height:24px}.flag-pa{background-image:url();background-position:-312px -24px;width:24px;height:24px}.flag-pe{background-image:url();background-position:-312px -48px;width:24px;height:24px}.flag-pf{background-image:url();background-position:-312px -72px;width:24px;height:24px}.flag-pg{background-image:url();background-position:-312px -96px;width:24px;height:24px}.flag-ph{background-image:url();background-position:-312px -120px;width:24px;height:24px}.flag-pk{background-image:url();background-position:-312px -144px;width:24px;height:24px}.flag-pl{background-image:url();background-position:-312px -168px;width:24px;height:24px}.flag-pm{background-image:url();background-position:-312px -192px;width:24px;height:24px}.flag-pn{background-image:url();background-position:-312px -216px;width:24px;height:24px}.flag-pr{background-image:url();background-position:-312px -240px;width:24px;height:24px}.flag-ps{background-image:url();background-position:-312px -264px;width:24px;height:24px}.flag-pt{background-image:url();background-position:-312px -288px;width:24px;height:24px}.flag-pw{background-image:url();background-position:0px -312px;width:24px;height:24px}.flag-py{background-image:url();background-position:-24px -312px;width:24px;height:24px}.flag-qa{background-image:url();background-position:-48px -312px;width:24px;height:24px}.flag-re{background-image:url();background-position:-72px -312px;width:24px;height:24px}.flag-ro{background-image:url();background-position:-96px -312px;width:24px;height:24px}.flag-rs{background-image:url();background-position:-120px -312px;width:24px;height:24px}.flag-ru{background-image:url();background-position:-144px -312px;width:24px;height:24px}.flag-rw{background-image:url();background-position:-168px -312px;width:24px;height:24px}.flag-sa{background-image:url();background-position:-192px -312px;width:24px;height:24px}.flag-sb{background-image:url();background-position:-216px -312px;width:24px;height:24px}.flag-sc{background-image:url();background-position:-240px -312px;width:24px;height:24px}.flag-sd{background-image:url();background-position:-264px -312px;width:24px;height:24px}.flag-se{background-image:url();background-position:-288px -312px;width:24px;height:24px}.flag-sg{background-image:url();background-position:-312px -312px;width:24px;height:24px}.flag-sh{background-image:url();background-position:-336px 0px;width:24px;height:24px}.flag-si{background-image:url();background-position:-336px -24px;width:24px;height:24px}.flag-sj{background-image:url();background-position:-336px -48px;width:24px;height:24px}.flag-sk{background-image:url();background-position:-336px -72px;width:24px;height:24px}.flag-sl{background-image:url();background-position:-336px -96px;width:24px;height:24px}.flag-sm{background-image:url();background-position:-336px -120px;width:24px;height:24px}.flag-sn{background-image:url();background-position:-336px -144px;width:24px;height:24px}.flag-so{background-image:url();background-position:-336px -168px;width:24px;height:24px}.flag-sr{background-image:url();background-position:-336px -192px;width:24px;height:24px}.flag-ss{background-image:url();background-position:-336px -216px;width:24px;height:24px}.flag-st{background-image:url();background-position:-336px -240px;width:24px;height:24px}.flag-sv{background-image:url();background-position:-336px -264px;width:24px;height:24px}.flag-sx{background-image:url();background-position:-336px -288px;width:24px;height:24px}.flag-sy{background-image:url();background-position:-336px -312px;width:24px;height:24px}.flag-sz{background-image:url();background-position:0px -336px;width:24px;height:24px}.flag-tc{background-image:url();background-position:-24px -336px;width:24px;height:24px}.flag-td{background-image:url();background-position:-48px -336px;width:24px;height:24px}.flag-tg{background-image:url();background-position:-72px -336px;width:24px;height:24px}.flag-th{background-image:url();background-position:-96px -336px;width:24px;height:24px}.flag-tj{background-image:url();background-position:-120px -336px;width:24px;height:24px}.flag-tk{background-image:url();background-position:-144px -336px;width:24px;height:24px}.flag-tl{background-image:url();background-position:-168px -336px;width:24px;height:24px}.flag-tm{background-image:url();background-position:-192px -336px;width:24px;height:24px}.flag-tn{background-image:url();background-position:-216px -336px;width:24px;height:24px}.flag-to{background-image:url();background-position:-240px -336px;width:24px;height:24px}.flag-tr{background-image:url();background-position:-264px -336px;width:24px;height:24px}.flag-tt{background-image:url();background-position:-288px -336px;width:24px;height:24px}.flag-tv{background-image:url();background-position:-312px -336px;width:24px;height:24px}.flag-tw{background-image:url();background-position:-336px -336px;width:24px;height:24px}.flag-tz{background-image:url();background-position:-360px 0px;width:24px;height:24px}.flag-ua{background-image:url();background-position:-360px -24px;width:24px;height:24px}.flag-ug{background-image:url();background-position:-360px -48px;width:24px;height:24px}.flag-us{background-image:url();background-position:-360px -72px;width:24px;height:24px}.flag-uy{background-image:url();background-position:-360px -96px;width:24px;height:24px}.flag-uz{background-image:url();background-position:-360px -120px;width:24px;height:24px}.flag-va{background-image:url();background-position:-360px -144px;width:24px;height:24px}.flag-vc{background-image:url();background-position:-360px -168px;width:24px;height:24px}.flag-ve{background-image:url();background-position:-360px -192px;width:24px;height:24px}.flag-vg{background-image:url();background-position:-360px -216px;width:24px;height:24px}.flag-vi{background-image:url();background-position:-360px -240px;width:24px;height:24px}.flag-vn{background-image:url();background-position:-360px -264px;width:24px;height:24px}.flag-vu{background-image:url();background-position:-360px -288px;width:24px;height:24px}.flag-wf{background-image:url();background-position:-360px -312px;width:24px;height:24px}.flag-ws{background-image:url();background-position:-360px -336px;width:24px;height:24px}.flag-xk{background-image:url();background-position:0px -360px;width:24px;height:24px}.flag-ye{background-image:url();background-position:-24px -360px;width:24px;height:24px}.flag-yt{background-image:url();background-position:-48px -360px;width:24px;height:24px}.flag-za{background-image:url();background-position:-72px -360px;width:24px;height:24px}.flag-zm{background-image:url();background-position:-96px -360px;width:24px;height:24px}.flag-zw{background-image:url();background-position:-120px -360px;width:24px;height:24px}.flag{display:inline-block}";export{x as gux_region_icon}
1
+ import{r as g,a as i,h as p,g as a}from"./p-7d26b2e1.js";import{t as o}from"./p-0db3479d.js";const x=class{constructor(i){g(this,i),this.region=void 0,this.screenreaderText=void 0}componentWillLoad(){o(this.root)}render(){var g;const a=i("assets/sprites/region-flags.png");return p("span",{role:this.screenreaderText?"img":"",class:"flag flag-"+(null===(g=this.region)||void 0===g?void 0:g.toLowerCase()),style:{backgroundImage:`url(${a})`},"aria-label":this.screenreaderText})}static get assetsDirs(){return["assets"]}get root(){return a(this)}};x.style=".flag-ad{background-image:url();background-position:0px 0px;width:24px;height:24px}.flag-ae{background-image:url();background-position:-24px 0px;width:24px;height:24px}.flag-af{background-image:url();background-position:0px -24px;width:24px;height:24px}.flag-ag{background-image:url();background-position:-24px -24px;width:24px;height:24px}.flag-ai{background-image:url();background-position:-48px 0px;width:24px;height:24px}.flag-al{background-image:url();background-position:-48px -24px;width:24px;height:24px}.flag-am{background-image:url();background-position:0px -48px;width:24px;height:24px}.flag-ao{background-image:url();background-position:-24px -48px;width:24px;height:24px}.flag-ar{background-image:url();background-position:-48px -48px;width:24px;height:24px}.flag-as{background-image:url();background-position:-72px 0px;width:24px;height:24px}.flag-at{background-image:url();background-position:-72px -24px;width:24px;height:24px}.flag-au{background-image:url();background-position:-72px -48px;width:24px;height:24px}.flag-aw{background-image:url();background-position:0px -72px;width:24px;height:24px}.flag-ax{background-image:url();background-position:-24px -72px;width:24px;height:24px}.flag-az{background-image:url();background-position:-48px -72px;width:24px;height:24px}.flag-ba{background-image:url();background-position:-72px -72px;width:24px;height:24px}.flag-bb{background-image:url();background-position:-96px 0px;width:24px;height:24px}.flag-bd{background-image:url();background-position:-96px -24px;width:24px;height:24px}.flag-be{background-image:url();background-position:-96px -48px;width:24px;height:24px}.flag-bf{background-image:url();background-position:-96px -72px;width:24px;height:24px}.flag-bg{background-image:url();background-position:0px -96px;width:24px;height:24px}.flag-bh{background-image:url();background-position:-24px -96px;width:24px;height:24px}.flag-bi{background-image:url();background-position:-48px -96px;width:24px;height:24px}.flag-bj{background-image:url();background-position:-72px -96px;width:24px;height:24px}.flag-bl{background-image:url();background-position:-96px -96px;width:24px;height:24px}.flag-bm{background-image:url();background-position:-120px 0px;width:24px;height:24px}.flag-bn{background-image:url();background-position:-120px -24px;width:24px;height:24px}.flag-bo{background-image:url();background-position:-120px -48px;width:24px;height:24px}.flag-bq{background-image:url();background-position:-120px -72px;width:24px;height:24px}.flag-br{background-image:url();background-position:-120px -96px;width:24px;height:24px}.flag-bs{background-image:url();background-position:0px -120px;width:24px;height:24px}.flag-bt{background-image:url();background-position:-24px -120px;width:24px;height:24px}.flag-bv{background-image:url();background-position:-48px -120px;width:24px;height:24px}.flag-bw{background-image:url();background-position:-72px -120px;width:24px;height:24px}.flag-by{background-image:url();background-position:-96px -120px;width:24px;height:24px}.flag-bz{background-image:url();background-position:-120px -120px;width:24px;height:24px}.flag-ca{background-image:url();background-position:-144px 0px;width:24px;height:24px}.flag-cc{background-image:url();background-position:-144px -24px;width:24px;height:24px}.flag-cd{background-image:url();background-position:-144px -48px;width:24px;height:24px}.flag-cf{background-image:url();background-position:-144px -72px;width:24px;height:24px}.flag-cg{background-image:url();background-position:-144px -96px;width:24px;height:24px}.flag-ch{background-image:url();background-position:-144px -120px;width:24px;height:24px}.flag-ci{background-image:url();background-position:0px -144px;width:24px;height:24px}.flag-ck{background-image:url();background-position:-24px -144px;width:24px;height:24px}.flag-cl{background-image:url();background-position:-48px -144px;width:24px;height:24px}.flag-cm{background-image:url();background-position:-72px -144px;width:24px;height:24px}.flag-cn{background-image:url();background-position:-96px -144px;width:24px;height:24px}.flag-co{background-image:url();background-position:-120px -144px;width:24px;height:24px}.flag-cr{background-image:url();background-position:-144px -144px;width:24px;height:24px}.flag-cu{background-image:url();background-position:-168px 0px;width:24px;height:24px}.flag-cv{background-image:url();background-position:-168px -24px;width:24px;height:24px}.flag-cw{background-image:url();background-position:-168px -48px;width:24px;height:24px}.flag-cx{background-image:url();background-position:-168px -72px;width:24px;height:24px}.flag-cy{background-image:url();background-position:-168px -96px;width:24px;height:24px}.flag-cz{background-image:url();background-position:-168px -120px;width:24px;height:24px}.flag-de{background-image:url();background-position:-168px -144px;width:24px;height:24px}.flag-dj{background-image:url();background-position:0px -168px;width:24px;height:24px}.flag-dk{background-image:url();background-position:-24px -168px;width:24px;height:24px}.flag-dm{background-image:url();background-position:-48px -168px;width:24px;height:24px}.flag-do{background-image:url();background-position:-72px -168px;width:24px;height:24px}.flag-dz{background-image:url();background-position:-96px -168px;width:24px;height:24px}.flag-ec{background-image:url();background-position:-120px -168px;width:24px;height:24px}.flag-ee{background-image:url();background-position:-144px -168px;width:24px;height:24px}.flag-eg{background-image:url();background-position:-168px -168px;width:24px;height:24px}.flag-eh{background-image:url();background-position:-192px 0px;width:24px;height:24px}.flag-er{background-image:url();background-position:-192px -24px;width:24px;height:24px}.flag-es{background-image:url();background-position:-192px -48px;width:24px;height:24px}.flag-et{background-image:url();background-position:-192px -72px;width:24px;height:24px}.flag-fi{background-image:url();background-position:-192px -96px;width:24px;height:24px}.flag-fj{background-image:url();background-position:-192px -120px;width:24px;height:24px}.flag-fk{background-image:url();background-position:-192px -144px;width:24px;height:24px}.flag-fm{background-image:url();background-position:-192px -168px;width:24px;height:24px}.flag-fo{background-image:url();background-position:0px -192px;width:24px;height:24px}.flag-fr{background-image:url();background-position:-24px -192px;width:24px;height:24px}.flag-ga{background-image:url();background-position:-48px -192px;width:24px;height:24px}.flag-gb{background-image:url();background-position:-72px -192px;width:24px;height:24px}.flag-gd{background-image:url();background-position:-96px -192px;width:24px;height:24px}.flag-ge{background-image:url();background-position:-120px -192px;width:24px;height:24px}.flag-gf{background-image:url();background-position:-144px -192px;width:24px;height:24px}.flag-gg{background-image:url();background-position:-168px -192px;width:24px;height:24px}.flag-gh{background-image:url();background-position:-192px -192px;width:24px;height:24px}.flag-gi{background-image:url();background-position:-216px 0px;width:24px;height:24px}.flag-gl{background-image:url();background-position:-216px -24px;width:24px;height:24px}.flag-gm{background-image:url();background-position:-216px -48px;width:24px;height:24px}.flag-gn{background-image:url();background-position:-216px -72px;width:24px;height:24px}.flag-gp{background-image:url();background-position:-216px -96px;width:24px;height:24px}.flag-gq{background-image:url();background-position:-216px -120px;width:24px;height:24px}.flag-gr{background-image:url();background-position:-216px -144px;width:24px;height:24px}.flag-gs{background-image:url();background-position:-216px -168px;width:24px;height:24px}.flag-gt{background-image:url();background-position:-216px -192px;width:24px;height:24px}.flag-gu{background-image:url();background-position:0px -216px;width:24px;height:24px}.flag-gw{background-image:url();background-position:-24px -216px;width:24px;height:24px}.flag-gy{background-image:url();background-position:-48px -216px;width:24px;height:24px}.flag-hk{background-image:url();background-position:-72px -216px;width:24px;height:24px}.flag-hn{background-image:url();background-position:-96px -216px;width:24px;height:24px}.flag-hr{background-image:url();background-position:-120px -216px;width:24px;height:24px}.flag-ht{background-image:url();background-position:-144px -216px;width:24px;height:24px}.flag-hu{background-image:url();background-position:-168px -216px;width:24px;height:24px}.flag-id{background-image:url();background-position:-192px -216px;width:24px;height:24px}.flag-ie{background-image:url();background-position:-216px -216px;width:24px;height:24px}.flag-il{background-image:url();background-position:-240px 0px;width:24px;height:24px}.flag-im{background-image:url();background-position:-240px -24px;width:24px;height:24px}.flag-in{background-image:url();background-position:-240px -48px;width:24px;height:24px}.flag-io{background-image:url();background-position:-240px -72px;width:24px;height:24px}.flag-iq{background-image:url();background-position:-240px -96px;width:24px;height:24px}.flag-ir{background-image:url();background-position:-240px -120px;width:24px;height:24px}.flag-is{background-image:url();background-position:-240px -144px;width:24px;height:24px}.flag-it{background-image:url();background-position:-240px -168px;width:24px;height:24px}.flag-je{background-image:url();background-position:-240px -192px;width:24px;height:24px}.flag-jm{background-image:url();background-position:-240px -216px;width:24px;height:24px}.flag-jo{background-image:url();background-position:0px -240px;width:24px;height:24px}.flag-jp{background-image:url();background-position:-24px -240px;width:24px;height:24px}.flag-ke{background-image:url();background-position:-48px -240px;width:24px;height:24px}.flag-kg{background-image:url();background-position:-72px -240px;width:24px;height:24px}.flag-kh{background-image:url();background-position:-96px -240px;width:24px;height:24px}.flag-ki{background-image:url();background-position:-120px -240px;width:24px;height:24px}.flag-km{background-image:url();background-position:-144px -240px;width:24px;height:24px}.flag-kn{background-image:url();background-position:-168px -240px;width:24px;height:24px}.flag-kp{background-image:url();background-position:-192px -240px;width:24px;height:24px}.flag-kr{background-image:url();background-position:-216px -240px;width:24px;height:24px}.flag-kw{background-image:url();background-position:-240px -240px;width:24px;height:24px}.flag-ky{background-image:url();background-position:-264px 0px;width:24px;height:24px}.flag-kz{background-image:url();background-position:-264px -24px;width:24px;height:24px}.flag-la{background-image:url();background-position:-264px -48px;width:24px;height:24px}.flag-lb{background-image:url();background-position:-264px -72px;width:24px;height:24px}.flag-lc{background-image:url();background-position:-264px -96px;width:24px;height:24px}.flag-li{background-image:url();background-position:-264px -120px;width:24px;height:24px}.flag-lk{background-image:url();background-position:-264px -144px;width:24px;height:24px}.flag-lr{background-image:url();background-position:-264px -168px;width:24px;height:24px}.flag-ls{background-image:url();background-position:-264px -192px;width:24px;height:24px}.flag-lt{background-image:url();background-position:-264px -216px;width:24px;height:24px}.flag-lu{background-image:url();background-position:-264px -240px;width:24px;height:24px}.flag-lv{background-image:url();background-position:0px -264px;width:24px;height:24px}.flag-ly{background-image:url();background-position:-24px -264px;width:24px;height:24px}.flag-ma{background-image:url();background-position:-48px -264px;width:24px;height:24px}.flag-mc{background-image:url();background-position:-72px -264px;width:24px;height:24px}.flag-md{background-image:url();background-position:-96px -264px;width:24px;height:24px}.flag-me{background-image:url();background-position:-120px -264px;width:24px;height:24px}.flag-mf{background-image:url();background-position:-144px -264px;width:24px;height:24px}.flag-mg{background-image:url();background-position:-168px -264px;width:24px;height:24px}.flag-mh{background-image:url();background-position:-192px -264px;width:24px;height:24px}.flag-mk{background-image:url();background-position:-216px -264px;width:24px;height:24px}.flag-ml{background-image:url();background-position:-240px -264px;width:24px;height:24px}.flag-mm{background-image:url();background-position:-264px -264px;width:24px;height:24px}.flag-mn{background-image:url();background-position:-288px 0px;width:24px;height:24px}.flag-mo{background-image:url();background-position:-288px -24px;width:24px;height:24px}.flag-mp{background-image:url();background-position:-288px -48px;width:24px;height:24px}.flag-mq{background-image:url();background-position:-288px -72px;width:24px;height:24px}.flag-mr{background-image:url();background-position:-288px -96px;width:24px;height:24px}.flag-ms{background-image:url();background-position:-288px -120px;width:24px;height:24px}.flag-mt{background-image:url();background-position:-288px -144px;width:24px;height:24px}.flag-mu{background-image:url();background-position:-288px -168px;width:24px;height:24px}.flag-mv{background-image:url();background-position:-288px -192px;width:24px;height:24px}.flag-mw{background-image:url();background-position:-288px -216px;width:24px;height:24px}.flag-mx{background-image:url();background-position:-288px -240px;width:24px;height:24px}.flag-my{background-image:url();background-position:-288px -264px;width:24px;height:24px}.flag-mz{background-image:url();background-position:0px -288px;width:24px;height:24px}.flag-na{background-image:url();background-position:-24px -288px;width:24px;height:24px}.flag-nc{background-image:url();background-position:-48px -288px;width:24px;height:24px}.flag-ne{background-image:url();background-position:-72px -288px;width:24px;height:24px}.flag-nf{background-image:url();background-position:-96px -288px;width:24px;height:24px}.flag-ng{background-image:url();background-position:-120px -288px;width:24px;height:24px}.flag-ni{background-image:url();background-position:-144px -288px;width:24px;height:24px}.flag-nl{background-image:url();background-position:-168px -288px;width:24px;height:24px}.flag-no{background-image:url();background-position:-192px -288px;width:24px;height:24px}.flag-np{background-image:url();background-position:-216px -288px;width:24px;height:24px}.flag-nr{background-image:url();background-position:-240px -288px;width:24px;height:24px}.flag-nu{background-image:url();background-position:-264px -288px;width:24px;height:24px}.flag-nz{background-image:url();background-position:-288px -288px;width:24px;height:24px}.flag-om{background-image:url();background-position:-312px 0px;width:24px;height:24px}.flag-pa{background-image:url();background-position:-312px -24px;width:24px;height:24px}.flag-pe{background-image:url();background-position:-312px -48px;width:24px;height:24px}.flag-pf{background-image:url();background-position:-312px -72px;width:24px;height:24px}.flag-pg{background-image:url();background-position:-312px -96px;width:24px;height:24px}.flag-ph{background-image:url();background-position:-312px -120px;width:24px;height:24px}.flag-pk{background-image:url();background-position:-312px -144px;width:24px;height:24px}.flag-pl{background-image:url();background-position:-312px -168px;width:24px;height:24px}.flag-pm{background-image:url();background-position:-312px -192px;width:24px;height:24px}.flag-pn{background-image:url();background-position:-312px -216px;width:24px;height:24px}.flag-pr{background-image:url();background-position:-312px -240px;width:24px;height:24px}.flag-ps{background-image:url();background-position:-312px -264px;width:24px;height:24px}.flag-pt{background-image:url();background-position:-312px -288px;width:24px;height:24px}.flag-pw{background-image:url();background-position:0px -312px;width:24px;height:24px}.flag-py{background-image:url();background-position:-24px -312px;width:24px;height:24px}.flag-qa{background-image:url();background-position:-48px -312px;width:24px;height:24px}.flag-re{background-image:url();background-position:-72px -312px;width:24px;height:24px}.flag-ro{background-image:url();background-position:-96px -312px;width:24px;height:24px}.flag-rs{background-image:url();background-position:-120px -312px;width:24px;height:24px}.flag-ru{background-image:url();background-position:-144px -312px;width:24px;height:24px}.flag-rw{background-image:url();background-position:-168px -312px;width:24px;height:24px}.flag-sa{background-image:url();background-position:-192px -312px;width:24px;height:24px}.flag-sb{background-image:url();background-position:-216px -312px;width:24px;height:24px}.flag-sc{background-image:url();background-position:-240px -312px;width:24px;height:24px}.flag-sd{background-image:url();background-position:-264px -312px;width:24px;height:24px}.flag-se{background-image:url();background-position:-288px -312px;width:24px;height:24px}.flag-sg{background-image:url();background-position:-312px -312px;width:24px;height:24px}.flag-sh{background-image:url();background-position:-336px 0px;width:24px;height:24px}.flag-si{background-image:url();background-position:-336px -24px;width:24px;height:24px}.flag-sj{background-image:url();background-position:-336px -48px;width:24px;height:24px}.flag-sk{background-image:url();background-position:-336px -72px;width:24px;height:24px}.flag-sl{background-image:url();background-position:-336px -96px;width:24px;height:24px}.flag-sm{background-image:url();background-position:-336px -120px;width:24px;height:24px}.flag-sn{background-image:url();background-position:-336px -144px;width:24px;height:24px}.flag-so{background-image:url();background-position:-336px -168px;width:24px;height:24px}.flag-sr{background-image:url();background-position:-336px -192px;width:24px;height:24px}.flag-ss{background-image:url();background-position:-336px -216px;width:24px;height:24px}.flag-st{background-image:url();background-position:-336px -240px;width:24px;height:24px}.flag-sv{background-image:url();background-position:-336px -264px;width:24px;height:24px}.flag-sx{background-image:url();background-position:-336px -288px;width:24px;height:24px}.flag-sy{background-image:url();background-position:-336px -312px;width:24px;height:24px}.flag-sz{background-image:url();background-position:0px -336px;width:24px;height:24px}.flag-tc{background-image:url();background-position:-24px -336px;width:24px;height:24px}.flag-td{background-image:url();background-position:-48px -336px;width:24px;height:24px}.flag-tg{background-image:url();background-position:-72px -336px;width:24px;height:24px}.flag-th{background-image:url();background-position:-96px -336px;width:24px;height:24px}.flag-tj{background-image:url();background-position:-120px -336px;width:24px;height:24px}.flag-tk{background-image:url();background-position:-144px -336px;width:24px;height:24px}.flag-tl{background-image:url();background-position:-168px -336px;width:24px;height:24px}.flag-tm{background-image:url();background-position:-192px -336px;width:24px;height:24px}.flag-tn{background-image:url();background-position:-216px -336px;width:24px;height:24px}.flag-to{background-image:url();background-position:-240px -336px;width:24px;height:24px}.flag-tr{background-image:url();background-position:-264px -336px;width:24px;height:24px}.flag-tt{background-image:url();background-position:-288px -336px;width:24px;height:24px}.flag-tv{background-image:url();background-position:-312px -336px;width:24px;height:24px}.flag-tw{background-image:url();background-position:-336px -336px;width:24px;height:24px}.flag-tz{background-image:url();background-position:-360px 0px;width:24px;height:24px}.flag-ua{background-image:url();background-position:-360px -24px;width:24px;height:24px}.flag-ug{background-image:url();background-position:-360px -48px;width:24px;height:24px}.flag-us{background-image:url();background-position:-360px -72px;width:24px;height:24px}.flag-uy{background-image:url();background-position:-360px -96px;width:24px;height:24px}.flag-uz{background-image:url();background-position:-360px -120px;width:24px;height:24px}.flag-va{background-image:url();background-position:-360px -144px;width:24px;height:24px}.flag-vc{background-image:url();background-position:-360px -168px;width:24px;height:24px}.flag-ve{background-image:url();background-position:-360px -192px;width:24px;height:24px}.flag-vg{background-image:url();background-position:-360px -216px;width:24px;height:24px}.flag-vi{background-image:url();background-position:-360px -240px;width:24px;height:24px}.flag-vn{background-image:url();background-position:-360px -264px;width:24px;height:24px}.flag-vu{background-image:url();background-position:-360px -288px;width:24px;height:24px}.flag-wf{background-image:url();background-position:-360px -312px;width:24px;height:24px}.flag-ws{background-image:url();background-position:-360px -336px;width:24px;height:24px}.flag-xk{background-image:url();background-position:0px -360px;width:24px;height:24px}.flag-ye{background-image:url();background-position:-24px -360px;width:24px;height:24px}.flag-yt{background-image:url();background-position:-48px -360px;width:24px;height:24px}.flag-za{background-image:url();background-position:-72px -360px;width:24px;height:24px}.flag-zm{background-image:url();background-position:-96px -360px;width:24px;height:24px}.flag-zw{background-image:url();background-position:-120px -360px;width:24px;height:24px}.flag{display:inline-block}";export{x as gux_region_icon}
@@ -1 +1 @@
1
- import{r as e,c as t,f as o,h as n,g as s}from"./p-7d26b2e1.js";import{b as r}from"./p-deee079e.js";import{t as a}from"./p-7ec9a1e2.js";import{g as i,s as c,a as h,b as l,c as d,d as u,e as m,f as p,h as g}from"./p-62913396.js";import"./p-8a133b9b.js";import"./p-9dd4b14a.js";import"./p-d176c2ae.js";const x={search:"Search column",selectedColumnCount:"{count}/{total} Columns Selected",selectAllColumnsScreenReader:"{count} of {total} columns selected: check checkbox to select all {total} columns",unselectAllColumnsScreenReader:"{count} of {total} columns selected: uncheck checkbox to unselect all {total} columns",movePositionPrompt:"Press space or enter to move the {columnName} column to position {newPositionNumber} from position {oldPositionNumber}.",reorderingModeActive:"Reordering mode active. Reposition the {columnName} column using the up arrow key, the down arrow key, the home key and the end key. Press Escape to deactivate reordering mode."},b=class{constructor(o){e(this,o),this.guxorderchange=t(this,"guxorderchange",7),this.highlightResults={matchCount:0,currentMatch:0},this.keyboardOrderChange=i()}watchKeyboardOrderChange(){c(this.root,this.keyboardOrderChange)}async componentWillLoad(){a(this.root),this.i18n=await r(this.root,x)}componentDidLoad(){h(this.root,this.mainCheckboxElement)}handleInternalorderchange(e){e.stopPropagation(),this.emitOrderChange(e.detail)}emitOrderChange(e){const{oldIndex:t,newIndex:o}=e;if(t!==o){const t=l(this.root,e);this.guxorderchange.emit(t)}}handleInternalkeyboardorderstart(e){e.stopPropagation();const t=e.detail,o=d(e.target);this.keyboardOrderChange={oldIndex:o,newIndex:o},this.announceElement.guxAnnounce(this.i18n("reorderingModeActive",{columnName:t}))}handleInternalkeyboardreordermove(e){e.stopPropagation();const{delta:t,column:o}=e.detail;this.keyboardOrderChange=u(this.root,this.keyboardOrderChange,t),this.announceElement.guxAnnounce(this.i18n("movePositionPrompt",{columnName:o,newPositionNumber:this.keyboardOrderChange.newIndex+1,oldPositionNumber:this.keyboardOrderChange.oldIndex+1}))}handleInternalkeyboarddoreorder(e){e.stopPropagation(),this.emitOrderChange(this.keyboardOrderChange),e.target.guxFocus()}handleInternalkeyboardorderfinish(e){e.stopPropagation(),this.keyboardOrderChange=i()}onSearchInput(){this.highlightResults=m(this.root,this.searchElement)}onGuxCurrentMatchChanged(e){this.highlightResults=m(this.root,this.searchElement,e.detail)}onMainCheckboxChange(){p(this.root,this.mainCheckboxElement.checked),o(this.root)}onListChange(){h(this.root,this.mainCheckboxElement),o(this.root)}onSlotChange(){this.onListChange()}renderSelectedColumnCount(){const{count:e,total:t}=g(this.root);return n("div",null,n("span",{"aria-hidden":"true"},this.i18n("selectedColumnCount",{count:e,total:t})),n("span",{class:"gux-sr-only"},n("span",null,": ",this.i18n(e===t?"unselectAllColumnsScreenReader":"selectAllColumnsScreenReader",{count:e,total:t}))))}render(){return n("div",{class:"gux-container"},n("div",{class:"gux-search"},n("gux-content-search",{"match-count":this.highlightResults.matchCount,"current-match":this.highlightResults.currentMatch,onGuxcurrentmatchchanged:e=>this.onGuxCurrentMatchChanged(e)},n("input",{type:"text",placeholder:this.i18n("search"),onInput:()=>this.onSearchInput(),ref:e=>this.searchElement=e}))),n("div",{class:"gux-select"},n("gux-form-field-checkbox",null,n("input",{slot:"input",type:"checkbox",ref:e=>this.mainCheckboxElement=e,onChange:()=>this.onMainCheckboxChange()}),n("label",{slot:"label"},this.renderSelectedColumnCount()))),n("div",{class:"gux-list",onChange:()=>this.onListChange()},n("slot",{onSlotchange:()=>this.onSlotChange()})),n("gux-announce-beta",{ref:e=>this.announceElement=e}))}get root(){return s(this)}static get watchers(){return{keyboardOrderChange:["watchKeyboardOrderChange"]}}};b.style=".gux-container{width:320px;min-width:320px}.gux-container .gux-search gux-content-search{width:100%}.gux-container .gux-select{padding:8px 0 8px 16px;margin:4px 0;color:#596373;background-color:#f6f7f9;border-radius:4px}.gux-sr-only:not(:focus):not(:active){position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}";export{b as gux_column_manager_beta}
1
+ import{r as e,c as t,f as o,h as n,g as s}from"./p-7d26b2e1.js";import{b as r}from"./p-deee079e.js";import{t as a}from"./p-0db3479d.js";import{g as i,s as h,a as c,b as l,c as d,d as u,e as m,f as p,h as g}from"./p-62913396.js";import"./p-8a133b9b.js";import"./p-9dd4b14a.js";import"./p-d176c2ae.js";const x={search:"Search column",selectedColumnCount:"{count}/{total} Columns Selected",selectAllColumnsScreenReader:"{count} of {total} columns selected: check checkbox to select all {total} columns",unselectAllColumnsScreenReader:"{count} of {total} columns selected: uncheck checkbox to unselect all {total} columns",movePositionPrompt:"Press space or enter to move the {columnName} column to position {newPositionNumber} from position {oldPositionNumber}.",reorderingModeActive:"Reordering mode active. Reposition the {columnName} column using the up arrow key, the down arrow key, the home key and the end key. Press Escape to deactivate reordering mode."},b=class{constructor(o){e(this,o),this.guxorderchange=t(this,"guxorderchange",7),this.highlightResults={matchCount:0,currentMatch:0},this.keyboardOrderChange=i()}watchKeyboardOrderChange(){h(this.root,this.keyboardOrderChange)}async componentWillLoad(){a(this.root),this.i18n=await r(this.root,x)}componentDidLoad(){c(this.root,this.mainCheckboxElement)}handleInternalorderchange(e){e.stopPropagation(),this.emitOrderChange(e.detail)}emitOrderChange(e){const{oldIndex:t,newIndex:o}=e;if(t!==o){const t=l(this.root,e);this.guxorderchange.emit(t)}}handleInternalkeyboardorderstart(e){e.stopPropagation();const t=e.detail,o=d(e.target);this.keyboardOrderChange={oldIndex:o,newIndex:o},this.announceElement.guxAnnounce(this.i18n("reorderingModeActive",{columnName:t}))}handleInternalkeyboardreordermove(e){e.stopPropagation();const{delta:t,column:o}=e.detail;this.keyboardOrderChange=u(this.root,this.keyboardOrderChange,t),this.announceElement.guxAnnounce(this.i18n("movePositionPrompt",{columnName:o,newPositionNumber:this.keyboardOrderChange.newIndex+1,oldPositionNumber:this.keyboardOrderChange.oldIndex+1}))}handleInternalkeyboarddoreorder(e){e.stopPropagation(),this.emitOrderChange(this.keyboardOrderChange),e.target.guxFocus()}handleInternalkeyboardorderfinish(e){e.stopPropagation(),this.keyboardOrderChange=i()}onSearchInput(){this.highlightResults=m(this.root,this.searchElement)}onGuxCurrentMatchChanged(e){this.highlightResults=m(this.root,this.searchElement,e.detail)}onMainCheckboxChange(){p(this.root,this.mainCheckboxElement.checked),o(this.root)}onListChange(){c(this.root,this.mainCheckboxElement),o(this.root)}onSlotChange(){this.onListChange()}renderSelectedColumnCount(){const{count:e,total:t}=g(this.root);return n("div",null,n("span",{"aria-hidden":"true"},this.i18n("selectedColumnCount",{count:e,total:t})),n("span",{class:"gux-sr-only"},n("span",null,": ",this.i18n(e===t?"unselectAllColumnsScreenReader":"selectAllColumnsScreenReader",{count:e,total:t}))))}render(){return n("div",{class:"gux-container"},n("div",{class:"gux-search"},n("gux-content-search",{"match-count":this.highlightResults.matchCount,"current-match":this.highlightResults.currentMatch,onGuxcurrentmatchchanged:e=>this.onGuxCurrentMatchChanged(e)},n("input",{type:"text",placeholder:this.i18n("search"),onInput:()=>this.onSearchInput(),ref:e=>this.searchElement=e}))),n("div",{class:"gux-select"},n("gux-form-field-checkbox",null,n("input",{slot:"input",type:"checkbox",ref:e=>this.mainCheckboxElement=e,onChange:()=>this.onMainCheckboxChange()}),n("label",{slot:"label"},this.renderSelectedColumnCount()))),n("div",{class:"gux-list",onChange:()=>this.onListChange()},n("slot",{onSlotchange:()=>this.onSlotChange()})),n("gux-announce-beta",{ref:e=>this.announceElement=e}))}get root(){return s(this)}static get watchers(){return{keyboardOrderChange:["watchKeyboardOrderChange"]}}};b.style=".gux-container{width:320px;min-width:320px}.gux-container .gux-search gux-content-search{width:100%}.gux-container .gux-select{padding:8px 0 8px 16px;margin:4px 0;color:#596373;background-color:#f6f7f9;border-radius:4px}.gux-sr-only:not(:focus):not(:active){position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}";export{b as gux_column_manager_beta}
@@ -1 +1 @@
1
- import{r as t,c as e,f as i,h as s,g as n}from"./p-7d26b2e1.js";import{O as o}from"./p-9d18d475.js";import{b as r}from"./p-deee079e.js";import{s as l}from"./p-d176c2ae.js";import{b as u}from"./p-091f51f6.js";import{o as a}from"./p-3f5341ea.js";import{t as d}from"./p-7ec9a1e2.js";import{g as h}from"./p-55cf6d81.js";import{O as c}from"./p-f34ce7dc.js";import"./p-8a133b9b.js";const x={textInputResults:"Type to filter dropdown results",noSelection:"Select...",dropdown:"Dropdown",numberSelected:"{numberSelected} selected",pressEnterToCreate:"Press Enter to create new option, {textInputValue}"};var g=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};const p=class{constructor(i){t(this,i),this.guxcreateoption=e(this,"guxcreateoption",7),this.guxexpanded=e(this,"guxexpanded",7),this.guxcollapsed=e(this,"guxcollapsed",7),this.guxfilter=e(this,"guxfilter",7),this.value=void 0,this.disabled=!1,this.required=!1,this.loading=!1,this.placeholder=void 0,this.filterable=!1,this.filterType="none",this.hasError=!1,this.hasCreate=!1,this.expanded=!1,this.textInput=""}onMutation(){var t;this.listboxElement||(this.listboxElement=null===(t=this.root)||void 0===t?void 0:t.querySelector("gux-listbox-multi"),this.applyListboxEventListeners())}onInternalExpanded(t){t.stopPropagation(),this.guxexpanded.emit()}onInternalCollapsed(t){t.stopPropagation(),this.guxcollapsed.emit()}focusSelectedItemAfterRender(t){t&&this.listboxElement&&u((()=>{this.hasTextInput()?this.textInputElement.focus():this.listboxElement.focus()})),t||(this.textInput="")}watchValue(t){this.validateValue(t,this.listboxElement)}handleFilter(t){this.guxfilter.emit(t)}getSelectedValues(){var t;return Promise.resolve((null===(t=this.value)||void 0===t?void 0:t.split(","))||[])}onKeydown(t){switch(t.key){case"Escape":return this.hasTextInput()&&document.activeElement===this.listboxElement?this.textInputElement.focus():void this.collapseListbox("focusFieldButton");case"Tab":return this.shiftTabFromFilterListbox(t)?(t.preventDefault(),this.textInputElement.focus()):this.shiftTabFromExpandedFilterInput(t)?(t.preventDefault(),this.collapseListbox("focusFieldButton")):void this.collapseListbox("noFocusChange");case"ArrowDown":return void(this.activeElementNotListbox()&&(t.preventDefault(),this.expanded=!0));case"Enter":this.canCreateNewOption()&&this.isActiveElement()&&this.emitCreateOption()}}onInternallistboxoptionsupdated(t){t.stopPropagation(),i(this.root)}onClearselected(t){t.stopPropagation(),this.updateValue(""),this.listboxElement&&(this.listboxElement.value=void 0),this.validateValue(this.value,this.listboxElement),this.fieldButtonElement.focus()}onCreatenewoption(t){t.stopPropagation(),this.emitCreateOption()}onBlur(t){this.stopPropagationOfInternalFocusEvents(t)}onFocus(t){this.stopPropagationOfInternalFocusEvents(t)}onFocusout(t){this.stopPropagationOfInternalFocusEvents(t)}onFocusin(t){this.stopPropagationOfInternalFocusEvents(t)}onClickOutside(){this.collapseListbox("noFocusChange")}connectedCallback(){var t;this.listboxElement=null===(t=this.root)||void 0===t?void 0:t.querySelector("gux-listbox-multi"),this.listboxElement&&(this.validateValue(this.value,this.listboxElement),this.hasCreate=!!this.root.querySelector("gux-create-option"))}async componentWillLoad(){d(this.root),this.i18n=await r(this.root,x),a(this.root,(()=>{i(this.root)}))}componentDidLoad(){this.applyListboxEventListeners()}componentWillRender(){this.listboxElement&&(this.validateValue(this.value,this.listboxElement),this.listboxElement.loading=this.loading,this.listboxElement.filterType=this.filterType,this.listboxElement.textInput=this.textInput)}validateValue(t,e){void 0!==t?this.getOptionElementByValue(t)?e.value=t:this.value=void 0:e&&(e.value=t)}hasTextInput(){return this.isFilterable()||this.hasCreate}applyListboxEventListeners(){var t,e;null===(t=this.listboxElement)||void 0===t||t.addEventListener("input",(t=>{t.stopPropagation(),this.updateValue(t.target.value)})),null===(e=this.listboxElement)||void 0===e||e.addEventListener("change",(t=>{t.stopPropagation()}))}isFilterable(){return this.filterable||"custom"===this.filterType||"starts-with"===this.filterType}stopPropagationOfInternalFocusEvents(t){if(this.root.contains(t.relatedTarget))return t.stopImmediatePropagation()}getOptionElementByValue(t){const e=Array.from(this.root.querySelectorAll("gux-option-multi")),i=t?t.split(","):void 0;if(i)return e.filter((t=>i.includes(t.value)))}fieldButtonClick(){this.expanded=!this.expanded}fieldButtonInputClick(){this.expanded||(this.expanded=!this.expanded)}filterInput(t){t.stopPropagation(),this.textInput=this.textInputElement.value}shiftTabFromExpandedFilterInput(t){return t.shiftKey&&this.hasTextInput()&&this.expanded&&!(document.activeElement===this.listboxElement)}shiftTabFromFilterListbox(t){return t.shiftKey&&this.hasTextInput()&&document.activeElement===this.listboxElement}emitCreateOption(){this.guxcreateoption.emit(this.textInput),this.textInput="",this.textInputElement.value=""}canCreateNewOption(){return this.hasCreate&&this.textInput&&!this.listboxElement.hasExactMatch}isActiveElement(){return document.activeElement===this.root}activeElementNotListbox(){return document.activeElement!==this.listboxElement}filterKeydown(t){if("ArrowDown"===t.key)return t.stopImmediatePropagation(),void this.listboxElement.focus()}filterKeyup(t){" "!==t.key||t.preventDefault()}collapseListbox(t){this.expanded&&(this.expanded=!1),"focusFieldButton"===t&&this.fieldButtonElement.focus()}updateValue(t){this.value!==t&&(this.value=t,l(this.root,"input"),l(this.root,"change"))}getTypeaheadText(t){var e;const i=t.length;if(i>0&&!this.loading){const s=h(this.listboxElement,t);if(s&&"custom"!==this.filterType){const t=null===(e=s.querySelector("[gux-slot-container]"))||void 0===e?void 0:e.textContent;return null==t?void 0:t.substring(i)}return""}}renderTargetDisplay(){return s("div",{class:"gux-placeholder"},this.placeholder||this.i18n("noSelection"),this.getSrSelectedText())}getSrSelectedText(){const t=this.getOptionElementByValue(this.value);if(null==t?void 0:t.length)return s("span",{class:"gux-sr-only"},this.i18n("numberSelected",{numberSelected:t.length.toString()}))}getInputAriaLabel(){return this.canCreateNewOption()&&this.isActiveElement()?this.i18n("pressEnterToCreate",{textInputValue:this.textInput}):this.i18n("textInputResults")}renderTag(){const t=this.getOptionElementByValue(this.value);if(null==t?void 0:t.length)return s("gux-dropdown-multi-tag",{disabled:this.disabled,"number-selected":t.length})}renderFilterInputField(){if(this.expanded&&this.hasTextInput())return s("div",{class:"gux-field gux-input-field"},s("div",{class:"gux-field-content"},s("div",{class:"gux-filter"},s("div",{class:"gux-filter-display"},s("span",{class:"gux-filter-text"},this.textInput),s("span",{class:"gux-filter-suggestion"},this.getTypeaheadText(this.textInput))),s("div",{class:"input-and-dropdown-button"},s("input",{onClick:this.fieldButtonInputClick.bind(this),placeholder:this.placeholder||this.i18n("noSelection"),class:"gux-filter-input",type:"text","aria-label":this.getInputAriaLabel(),ref:t=>this.textInputElement=t,onInput:this.filterInput.bind(this),onKeyDown:this.filterKeydown.bind(this),onKeyUp:this.filterKeyup.bind(this)})))))}renderPopup(){return s("div",{slot:"popup",class:"gux-listbox-container"},s("slot",null))}renderTarget(){return s("div",{class:{"gux-target-container":!0,"gux-target-container-expanded":this.expanded&&this.hasTextInput(),"gux-target-container-collapsed":!(this.expanded&&this.hasTextInput()),"gux-error":this.hasError},slot:"target"},this.renderFilterInputField(),s("button",{type:"button",class:"gux-field gux-field-button",disabled:this.disabled,onClick:this.fieldButtonClick.bind(this),ref:t=>this.fieldButtonElement=t,"aria-haspopup":"listbox","aria-expanded":this.expanded.toString()},this.renderTargetContent(),this.renderTag(),this.renderRadialLoading(),s("gux-icon",{class:{"gux-expand-icon":!0},"screenreader-text":this.i18n("dropdown"),iconName:"chevron-small-down"})))}renderTargetContent(){if(!this.expanded||!this.hasTextInput())return s("div",{class:"gux-field-content"},this.renderTargetDisplay())}renderRadialLoading(){if(this.loading&&!this.expanded)return s("gux-radial-loading",{context:"input"})}render(){return[s("div",{class:"gux-dropdown-container"},s("gux-popup",{expanded:this.expanded&&(!this.loading||this.isFilterable()),disabled:this.disabled},this.renderTarget(),this.renderPopup()))]}static get delegatesFocus(){return!0}get root(){return n(this)}static get watchers(){return{expanded:["focusSelectedItemAfterRender"],value:["watchValue"],textInput:["handleFilter"]}}};g([c({childList:!0,subtree:!0})],p.prototype,"onMutation",null),g([o({triggerEvents:"mousedown"})],p.prototype,"onClickOutside",null),p.style=":host{color:#2e394c}.gux-dropdown-container{position:relative}.gux-error.gux-target-container-collapsed .gux-field-button,.gux-error.gux-target-container-expanded{border-color:#ea0b0b}.gux-field,.gux-target-container-expanded{all:unset;box-sizing:border-box;display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:center;justify-content:center;width:100%;height:32px;padding:6px 0 6px 6px;font-family:inherit;font-size:12px;line-height:1.6667;cursor:pointer;background-color:#f6f7f9}.gux-field.gux-input-field{height:30px;cursor:text}.gux-field .gux-field-content{position:relative;display:flex;flex:1 1 0;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:flex-start;justify-content:flex-start;min-width:0;height:100%}.gux-field .gux-field-content .gux-filter,.gux-field .gux-field-content .gux-selected-option,.gux-field .gux-field-content .gux-placeholder{flex:1 1 auto;align-self:auto;order:0;padding-left:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gux-field .gux-field-content .gux-filter .gux-sr-only:not(:focus):not(:active),.gux-field .gux-field-content .gux-selected-option .gux-sr-only:not(:focus):not(:active),.gux-field .gux-field-content .gux-placeholder .gux-sr-only:not(:focus):not(:active){position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}.gux-field .gux-field-content .gux-filter{position:relative;height:100%;padding-left:0}.gux-field .gux-field-content .gux-filter .gux-filter-input{all:unset;width:100%;color:transparent;caret-color:#2e394c}.gux-field .gux-field-content .gux-filter .gux-filter-display{white-space:pre}.gux-field .gux-field-content .gux-filter .gux-filter-display .gux-filter-text{color:#2e394c}.gux-field .gux-field-content .gux-filter .gux-filter-display .gux-filter-suggestion{color:#596373}.gux-field .gux-field-content .gux-filter .gux-filter-input,.gux-field .gux-field-content .gux-filter .gux-filter-display{position:absolute}.gux-field .gux-field-content .gux-placeholder{color:#596373}.gux-field .gux-expand-icon{flex:0 0 auto;align-self:auto;order:0;width:16px;height:16px;padding:0 8px;color:#596373}.gux-target-container-expanded{border:1px solid #6b7585;border-radius:4px;box-shadow:inset 0 0 4px rgba(32, 41, 55, 0.16)}.gux-target-container-expanded:focus-visible,.gux-target-container-expanded:focus-within{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-target-container-expanded .gux-filter-input{background-color:inherit;border:none}.gux-target-container-expanded .gux-filter-input:focus{border:none;outline:none}.gux-target-container-expanded .gux-field-button{width:auto;height:30px;padding:0 0 0 8px;margin:0;background:inherit;border:none;outline:none;box-shadow:none}.gux-target-container-expanded .gux-field-button:focus{outline:none}.gux-target-container-collapsed .gux-field-button{border:1px solid #6b7585;border-radius:4px;box-shadow:inset 0 0 4px rgba(32, 41, 55, 0.16)}.gux-target-container-collapsed .gux-field-button:focus-visible,.gux-target-container-collapsed .gux-field-button:focus-within{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-listbox-container{box-sizing:border-box;margin:0;color:#2e394c}gux-popup::part(gux-popup-container){width:inherit}.gux-error-message-container{display:none;margin:4px 0}.gux-error-message-container.gux-show{display:flex}";export{p as gux_dropdown_multi_beta}
1
+ import{r as t,c as e,f as i,h as s,g as n}from"./p-7d26b2e1.js";import{O as o}from"./p-9d18d475.js";import{b as r}from"./p-deee079e.js";import{s as l}from"./p-d176c2ae.js";import{b as u}from"./p-091f51f6.js";import{o as a}from"./p-3f5341ea.js";import{t as d}from"./p-0db3479d.js";import{g as h}from"./p-55cf6d81.js";import{O as c}from"./p-f34ce7dc.js";import"./p-8a133b9b.js";const x={textInputResults:"Type to filter dropdown results",noSelection:"Select...",dropdown:"Dropdown",numberSelected:"{numberSelected} selected",pressEnterToCreate:"Press Enter to create new option, {textInputValue}"};var g=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};const p=class{constructor(i){t(this,i),this.guxcreateoption=e(this,"guxcreateoption",7),this.guxexpanded=e(this,"guxexpanded",7),this.guxcollapsed=e(this,"guxcollapsed",7),this.guxfilter=e(this,"guxfilter",7),this.value=void 0,this.disabled=!1,this.required=!1,this.loading=!1,this.placeholder=void 0,this.filterable=!1,this.filterType="none",this.hasError=!1,this.hasCreate=!1,this.expanded=!1,this.textInput=""}onMutation(){var t;this.listboxElement||(this.listboxElement=null===(t=this.root)||void 0===t?void 0:t.querySelector("gux-listbox-multi"),this.applyListboxEventListeners())}onInternalExpanded(t){t.stopPropagation(),this.guxexpanded.emit()}onInternalCollapsed(t){t.stopPropagation(),this.guxcollapsed.emit()}focusSelectedItemAfterRender(t){t&&this.listboxElement&&u((()=>{this.hasTextInput()?this.textInputElement.focus():this.listboxElement.focus()})),t||(this.textInput="")}watchValue(t){this.validateValue(t,this.listboxElement)}handleFilter(t){this.guxfilter.emit(t)}getSelectedValues(){var t;return Promise.resolve((null===(t=this.value)||void 0===t?void 0:t.split(","))||[])}onKeydown(t){switch(t.key){case"Escape":return this.hasTextInput()&&document.activeElement===this.listboxElement?this.textInputElement.focus():void this.collapseListbox("focusFieldButton");case"Tab":return this.shiftTabFromFilterListbox(t)?(t.preventDefault(),this.textInputElement.focus()):this.shiftTabFromExpandedFilterInput(t)?(t.preventDefault(),this.collapseListbox("focusFieldButton")):void this.collapseListbox("noFocusChange");case"ArrowDown":return void(this.activeElementNotListbox()&&(t.preventDefault(),this.expanded=!0));case"Enter":this.canCreateNewOption()&&this.isActiveElement()&&this.emitCreateOption()}}onInternallistboxoptionsupdated(t){t.stopPropagation(),i(this.root)}onClearselected(t){t.stopPropagation(),this.updateValue(""),this.listboxElement&&(this.listboxElement.value=void 0),this.validateValue(this.value,this.listboxElement),this.fieldButtonElement.focus()}onCreatenewoption(t){t.stopPropagation(),this.emitCreateOption()}onBlur(t){this.stopPropagationOfInternalFocusEvents(t)}onFocus(t){this.stopPropagationOfInternalFocusEvents(t)}onFocusout(t){this.stopPropagationOfInternalFocusEvents(t)}onFocusin(t){this.stopPropagationOfInternalFocusEvents(t)}onClickOutside(){this.collapseListbox("noFocusChange")}connectedCallback(){var t;this.listboxElement=null===(t=this.root)||void 0===t?void 0:t.querySelector("gux-listbox-multi"),this.listboxElement&&(this.validateValue(this.value,this.listboxElement),this.hasCreate=!!this.root.querySelector("gux-create-option"))}async componentWillLoad(){d(this.root),this.i18n=await r(this.root,x),a(this.root,(()=>{i(this.root)}))}componentDidLoad(){this.applyListboxEventListeners()}componentWillRender(){this.listboxElement&&(this.validateValue(this.value,this.listboxElement),this.listboxElement.loading=this.loading,this.listboxElement.filterType=this.filterType,this.listboxElement.textInput=this.textInput)}validateValue(t,e){void 0!==t?this.getOptionElementByValue(t)?e.value=t:this.value=void 0:e&&(e.value=t)}hasTextInput(){return this.isFilterable()||this.hasCreate}applyListboxEventListeners(){var t,e;null===(t=this.listboxElement)||void 0===t||t.addEventListener("input",(t=>{t.stopPropagation(),this.updateValue(t.target.value)})),null===(e=this.listboxElement)||void 0===e||e.addEventListener("change",(t=>{t.stopPropagation()}))}isFilterable(){return this.filterable||"custom"===this.filterType||"starts-with"===this.filterType}stopPropagationOfInternalFocusEvents(t){if(this.root.contains(t.relatedTarget))return t.stopImmediatePropagation()}getOptionElementByValue(t){const e=Array.from(this.root.querySelectorAll("gux-option-multi")),i=t?t.split(","):void 0;if(i)return e.filter((t=>i.includes(t.value)))}fieldButtonClick(){this.expanded=!this.expanded}fieldButtonInputClick(){this.expanded||(this.expanded=!this.expanded)}filterInput(t){t.stopPropagation(),this.textInput=this.textInputElement.value}shiftTabFromExpandedFilterInput(t){return t.shiftKey&&this.hasTextInput()&&this.expanded&&!(document.activeElement===this.listboxElement)}shiftTabFromFilterListbox(t){return t.shiftKey&&this.hasTextInput()&&document.activeElement===this.listboxElement}emitCreateOption(){this.guxcreateoption.emit(this.textInput),this.textInput="",this.textInputElement.value=""}canCreateNewOption(){return this.hasCreate&&this.textInput&&!this.listboxElement.hasExactMatch}isActiveElement(){return document.activeElement===this.root}activeElementNotListbox(){return document.activeElement!==this.listboxElement}filterKeydown(t){if("ArrowDown"===t.key)return t.stopImmediatePropagation(),void this.listboxElement.focus()}filterKeyup(t){" "!==t.key||t.preventDefault()}collapseListbox(t){this.expanded&&(this.expanded=!1),"focusFieldButton"===t&&this.fieldButtonElement.focus()}updateValue(t){this.value!==t&&(this.value=t,l(this.root,"input"),l(this.root,"change"))}getTypeaheadText(t){var e;const i=t.length;if(i>0&&!this.loading){const s=h(this.listboxElement,t);if(s&&"custom"!==this.filterType){const t=null===(e=s.querySelector("[gux-slot-container]"))||void 0===e?void 0:e.textContent;return null==t?void 0:t.substring(i)}return""}}renderTargetDisplay(){return s("div",{class:"gux-placeholder"},this.placeholder||this.i18n("noSelection"),this.getSrSelectedText())}getSrSelectedText(){const t=this.getOptionElementByValue(this.value);if(null==t?void 0:t.length)return s("span",{class:"gux-sr-only"},this.i18n("numberSelected",{numberSelected:t.length.toString()}))}getInputAriaLabel(){return this.canCreateNewOption()&&this.isActiveElement()?this.i18n("pressEnterToCreate",{textInputValue:this.textInput}):this.i18n("textInputResults")}renderTag(){const t=this.getOptionElementByValue(this.value);if(null==t?void 0:t.length)return s("gux-dropdown-multi-tag",{disabled:this.disabled,"number-selected":t.length})}renderFilterInputField(){if(this.expanded&&this.hasTextInput())return s("div",{class:"gux-field gux-input-field"},s("div",{class:"gux-field-content"},s("div",{class:"gux-filter"},s("div",{class:"gux-filter-display"},s("span",{class:"gux-filter-text"},this.textInput),s("span",{class:"gux-filter-suggestion"},this.getTypeaheadText(this.textInput))),s("div",{class:"input-and-dropdown-button"},s("input",{onClick:this.fieldButtonInputClick.bind(this),placeholder:this.placeholder||this.i18n("noSelection"),class:"gux-filter-input",type:"text","aria-label":this.getInputAriaLabel(),ref:t=>this.textInputElement=t,onInput:this.filterInput.bind(this),onKeyDown:this.filterKeydown.bind(this),onKeyUp:this.filterKeyup.bind(this)})))))}renderPopup(){return s("div",{slot:"popup",class:"gux-listbox-container"},s("slot",null))}renderTarget(){return s("div",{class:{"gux-target-container":!0,"gux-target-container-expanded":this.expanded&&this.hasTextInput(),"gux-target-container-collapsed":!(this.expanded&&this.hasTextInput()),"gux-error":this.hasError},slot:"target"},this.renderFilterInputField(),s("button",{type:"button",class:"gux-field gux-field-button",disabled:this.disabled,onClick:this.fieldButtonClick.bind(this),ref:t=>this.fieldButtonElement=t,"aria-haspopup":"listbox","aria-expanded":this.expanded.toString()},this.renderTargetContent(),this.renderTag(),this.renderRadialLoading(),s("gux-icon",{class:{"gux-expand-icon":!0},"screenreader-text":this.i18n("dropdown"),iconName:"chevron-small-down"})))}renderTargetContent(){if(!this.expanded||!this.hasTextInput())return s("div",{class:"gux-field-content"},this.renderTargetDisplay())}renderRadialLoading(){if(this.loading&&!this.expanded)return s("gux-radial-loading",{context:"input"})}render(){return[s("div",{class:"gux-dropdown-container"},s("gux-popup",{expanded:this.expanded&&(!this.loading||this.isFilterable()),disabled:this.disabled},this.renderTarget(),this.renderPopup()))]}static get delegatesFocus(){return!0}get root(){return n(this)}static get watchers(){return{expanded:["focusSelectedItemAfterRender"],value:["watchValue"],textInput:["handleFilter"]}}};g([c({childList:!0,subtree:!0})],p.prototype,"onMutation",null),g([o({triggerEvents:"mousedown"})],p.prototype,"onClickOutside",null),p.style=":host{color:#2e394c}.gux-dropdown-container{position:relative}.gux-error.gux-target-container-collapsed .gux-field-button,.gux-error.gux-target-container-expanded{border-color:#ea0b0b}.gux-field,.gux-target-container-expanded{all:unset;box-sizing:border-box;display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:center;justify-content:center;width:100%;height:32px;padding:6px 0 6px 6px;font-family:inherit;font-size:12px;line-height:1.6667;cursor:pointer;background-color:#f6f7f9}.gux-field.gux-input-field{height:30px;cursor:text}.gux-field .gux-field-content{position:relative;display:flex;flex:1 1 0;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:flex-start;justify-content:flex-start;min-width:0;height:100%}.gux-field .gux-field-content .gux-filter,.gux-field .gux-field-content .gux-selected-option,.gux-field .gux-field-content .gux-placeholder{flex:1 1 auto;align-self:auto;order:0;padding-left:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gux-field .gux-field-content .gux-filter .gux-sr-only:not(:focus):not(:active),.gux-field .gux-field-content .gux-selected-option .gux-sr-only:not(:focus):not(:active),.gux-field .gux-field-content .gux-placeholder .gux-sr-only:not(:focus):not(:active){position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}.gux-field .gux-field-content .gux-filter{position:relative;height:100%;padding-left:0}.gux-field .gux-field-content .gux-filter .gux-filter-input{all:unset;width:100%;color:transparent;caret-color:#2e394c}.gux-field .gux-field-content .gux-filter .gux-filter-display{white-space:pre}.gux-field .gux-field-content .gux-filter .gux-filter-display .gux-filter-text{color:#2e394c}.gux-field .gux-field-content .gux-filter .gux-filter-display .gux-filter-suggestion{color:#596373}.gux-field .gux-field-content .gux-filter .gux-filter-input,.gux-field .gux-field-content .gux-filter .gux-filter-display{position:absolute}.gux-field .gux-field-content .gux-placeholder{color:#596373}.gux-field .gux-expand-icon{flex:0 0 auto;align-self:auto;order:0;width:16px;height:16px;padding:0 8px;color:#596373}.gux-target-container-expanded{border:1px solid #6b7585;border-radius:4px;box-shadow:inset 0 0 4px rgba(32, 41, 55, 0.16)}.gux-target-container-expanded:focus-visible,.gux-target-container-expanded:focus-within{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-target-container-expanded .gux-filter-input{background-color:inherit;border:none}.gux-target-container-expanded .gux-filter-input:focus{border:none;outline:none}.gux-target-container-expanded .gux-field-button{width:auto;height:30px;padding:0 0 0 8px;margin:0;background:inherit;border:none;outline:none;box-shadow:none}.gux-target-container-expanded .gux-field-button:focus{outline:none}.gux-target-container-collapsed .gux-field-button{border:1px solid #6b7585;border-radius:4px;box-shadow:inset 0 0 4px rgba(32, 41, 55, 0.16)}.gux-target-container-collapsed .gux-field-button:focus-visible,.gux-target-container-collapsed .gux-field-button:focus-within{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-listbox-container{box-sizing:border-box;margin:0;color:#2e394c}gux-popup::part(gux-popup-container){width:inherit}.gux-error-message-container{display:none;margin:4px 0}.gux-error-message-container.gux-show{display:flex}";export{p as gux_dropdown_multi_beta}
@@ -1 +1 @@
1
- import{r as t,c as o,h as s,g as a}from"./p-7d26b2e1.js";import{t as i}from"./p-7ec9a1e2.js";import{h as e}from"./p-08bc2e6b.js";const r=class{constructor(s){t(this,s),this.guxdismiss=o(this,"guxdismiss",7),this.toastType="success",this.hasLink=!1,this.hasPrimaryButton=!1,this.hasSecondaryButton=!1}componentWillLoad(){i(this.root,{variant:this.toastType}),this.hasPrimaryButton=e(this.root,"primary-button"),this.hasSecondaryButton=e(this.root,"secondary-button"),this.hasLink=e(this.root,"link")}renderToastIcon(){switch(this.toastType){case"success":return s("gux-icon",{"icon-name":"fa/circle-check-solid",decorative:!0});case"warning":return s("gux-icon",{"icon-name":"fa/triangle-exclamation-solid",decorative:!0});case"error":return s("gux-icon",{"icon-name":"fa/hexagon-exclamation-solid",decorative:!0});case"info":return s("gux-icon",{"icon-name":"fa/circle-info-solid",decorative:!0});case"action":return s("slot",{name:"icon"})}}renderLink(){return s("div",{class:"gux-buttons-bar"},s("slot",{name:"link"}))}renderActions(){return s("div",{class:"gux-buttons-bar"},this.hasSecondaryButton&&s("gux-button-slot-beta",null,s("slot",{name:"secondary-button"})),s("gux-button-slot-beta",{accent:this.hasSecondaryButton?"primary":"tertiary"},s("slot",{name:"primary-button"})))}render(){return s("div",{class:`gux-toast gux-toast-${this.toastType}`},s("div",{class:`gux-icon gux-icon-${this.toastType}`},this.renderToastIcon()),s("div",{class:"gux-content"},s("div",{class:"gux-message"},s("gux-truncate",{class:"gux-message-title","max-lines":1},s("slot",{name:"title"})),s("gux-truncate",{class:"gux-message-body","max-lines":2},s("slot",{name:"message"}))),"action"!==this.toastType&&this.hasLink&&this.renderLink(),"action"===this.toastType&&this.hasPrimaryButton&&this.renderActions()),s("gux-dismiss-button",{position:"inherit",onClick:this.onDismissClickHandler.bind(this)}))}onDismissClickHandler(t){t.stopPropagation(),this.guxdismiss.emit().defaultPrevented||this.root.remove()}get root(){return a(this)}};r.style=".gux-toast{position:relative;display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:flex-start;justify-content:flex-start;gap:var(--gse-ui-toast-gap);width:var(--gse-ui-toast-wrappingWidth);padding:var(--gse-ui-toast-margin);margin-bottom:var(--gse-ui-toast-stacking-gap);border-radius:var(--gse-ui-toast-borderRadius);box-shadow:var(--gse-ui-toast-boxShadow-x) var(--gse-ui-toast-boxShadow-y) var(--gse-ui-toast-boxShadow-blur) var(--gse-ui-toast-boxShadow-spread) var(--gse-ui-toast-boxShadow-color)}.gux-toast .gux-icon ::slotted(gux-icon){width:var(--gse-ui-toast-icon) !important;height:var(--gse-ui-toast-icon) !important}.gux-toast .gux-icon gux-icon{width:var(--gse-ui-toast-icon) !important;height:var(--gse-ui-toast-icon) !important}.gux-toast .gux-icon.gux-icon-error{color:var(--gse-ui-toast-error-iconColor)}.gux-toast .gux-icon.gux-icon-warning{color:var(--gse-ui-toast-warning-iconColor)}.gux-toast .gux-icon.gux-icon-success{color:var(--gse-ui-toast-success-iconColor)}.gux-toast .gux-icon.gux-icon-info{color:var(--gse-ui-toast-info-iconColor)}.gux-toast .gux-icon.gux-icon-action{color:var(--gse-ui-toast-action-iconColor)}.gux-toast .gux-content{display:flex;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-content:stretch;align-items:flex-start;align-self:auto;justify-content:flex-start;order:0;gap:var(--gse-ui-toast-gapButton)}.gux-toast .gux-content .gux-message{display:flex;flex-direction:column;gap:var(--gse-ui-toast-gapText)}.gux-toast .gux-content .gux-message .gux-message-title{font-family:var(--gse-ui-toast-heading-fontFamily);line-height:var(--gse-ui-toast-heading-lineHeight);font-size:var(--gse-ui-toast-heading-fontSize);font-weight:var(--gse-ui-toast-heading-fontWeight)}.gux-toast .gux-content .gux-message .gux-message-body{font-family:var(--gse-ui-toast-text-fontFamily);line-height:var(--gse-ui-toast-text-lineHeight);font-size:var(--gse-ui-toast-text-fontSize)}.gux-toast .gux-content .gux-buttons-bar{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-start;gap:var(--gse-ui-toast-buttonBar-gap)}.gux-toast.gux-toast-success{background-color:var(--gse-ui-toast-success-backgroundColor)}.gux-toast.gux-toast-success .gux-message{color:var(--gse-ui-toast-success-foregroundColor)}.gux-toast.gux-toast-warning{background-color:var(--gse-ui-toast-warning-backgroundColor)}.gux-toast.gux-toast-warning .gux-message{color:var(--gse-ui-toast-warning-foregroundColor)}.gux-toast.gux-toast-error{background-color:var(--gse-ui-toast-error-backgroundColor)}.gux-toast.gux-toast-error .gux-message{color:var(--gse-ui-toast-error-foregroundColor)}.gux-toast.gux-toast-info{background-color:var(--gse-ui-toast-info-backgroundColor)}.gux-toast.gux-toast-info .gux-message{color:var(--gse-ui-toast-info-foregroundColor)}.gux-toast.gux-toast-action{background-color:var(--gse-ui-toast-action-backgroundColor)}.gux-toast.gux-toast-action .gux-message{color:var(--gse-ui-toast-action-foregroundColor)}";export{r as gux_toast}
1
+ import{r as t,c as o,h as s,g as a}from"./p-7d26b2e1.js";import{t as i}from"./p-0db3479d.js";import{h as e}from"./p-08bc2e6b.js";const r=class{constructor(s){t(this,s),this.guxdismiss=o(this,"guxdismiss",7),this.toastType="success",this.hasLink=!1,this.hasPrimaryButton=!1,this.hasSecondaryButton=!1}componentWillLoad(){i(this.root,{variant:this.toastType}),this.hasPrimaryButton=e(this.root,"primary-button"),this.hasSecondaryButton=e(this.root,"secondary-button"),this.hasLink=e(this.root,"link")}renderToastIcon(){switch(this.toastType){case"success":return s("gux-icon",{"icon-name":"fa/circle-check-solid",decorative:!0});case"warning":return s("gux-icon",{"icon-name":"fa/triangle-exclamation-solid",decorative:!0});case"error":return s("gux-icon",{"icon-name":"fa/hexagon-exclamation-solid",decorative:!0});case"info":return s("gux-icon",{"icon-name":"fa/circle-info-solid",decorative:!0});case"action":return s("slot",{name:"icon"})}}renderLink(){return s("div",{class:"gux-buttons-bar"},s("slot",{name:"link"}))}renderActions(){return s("div",{class:"gux-buttons-bar"},this.hasSecondaryButton&&s("gux-button-slot-beta",null,s("slot",{name:"secondary-button"})),s("gux-button-slot-beta",{accent:this.hasSecondaryButton?"primary":"tertiary"},s("slot",{name:"primary-button"})))}render(){return s("div",{class:`gux-toast gux-toast-${this.toastType}`},s("div",{class:`gux-icon gux-icon-${this.toastType}`},this.renderToastIcon()),s("div",{class:"gux-content"},s("div",{class:"gux-message"},s("gux-truncate",{class:"gux-message-title","max-lines":1},s("slot",{name:"title"})),s("gux-truncate",{class:"gux-message-body","max-lines":2},s("slot",{name:"message"}))),"action"!==this.toastType&&this.hasLink&&this.renderLink(),"action"===this.toastType&&this.hasPrimaryButton&&this.renderActions()),s("gux-dismiss-button",{position:"inherit",onClick:this.onDismissClickHandler.bind(this)}))}onDismissClickHandler(t){t.stopPropagation(),this.guxdismiss.emit().defaultPrevented||this.root.remove()}get root(){return a(this)}};r.style=".gux-toast{position:relative;display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:flex-start;justify-content:flex-start;gap:var(--gse-ui-toast-gap);width:var(--gse-ui-toast-wrappingWidth);padding:var(--gse-ui-toast-margin);margin-bottom:var(--gse-ui-toast-stacking-gap);border-radius:var(--gse-ui-toast-borderRadius);box-shadow:var(--gse-ui-toast-boxShadow-x) var(--gse-ui-toast-boxShadow-y) var(--gse-ui-toast-boxShadow-blur) var(--gse-ui-toast-boxShadow-spread) var(--gse-ui-toast-boxShadow-color)}.gux-toast .gux-icon ::slotted(gux-icon){width:var(--gse-ui-toast-icon) !important;height:var(--gse-ui-toast-icon) !important}.gux-toast .gux-icon gux-icon{width:var(--gse-ui-toast-icon) !important;height:var(--gse-ui-toast-icon) !important}.gux-toast .gux-icon.gux-icon-error{color:var(--gse-ui-toast-error-iconColor)}.gux-toast .gux-icon.gux-icon-warning{color:var(--gse-ui-toast-warning-iconColor)}.gux-toast .gux-icon.gux-icon-success{color:var(--gse-ui-toast-success-iconColor)}.gux-toast .gux-icon.gux-icon-info{color:var(--gse-ui-toast-info-iconColor)}.gux-toast .gux-icon.gux-icon-action{color:var(--gse-ui-toast-action-iconColor)}.gux-toast .gux-content{display:flex;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-content:stretch;align-items:flex-start;align-self:auto;justify-content:flex-start;order:0;gap:var(--gse-ui-toast-gapButton)}.gux-toast .gux-content .gux-message{display:flex;flex-direction:column;gap:var(--gse-ui-toast-gapText)}.gux-toast .gux-content .gux-message .gux-message-title{font-family:var(--gse-ui-toast-heading-fontFamily);line-height:var(--gse-ui-toast-heading-lineHeight);font-size:var(--gse-ui-toast-heading-fontSize);font-weight:var(--gse-ui-toast-heading-fontWeight)}.gux-toast .gux-content .gux-message .gux-message-body{font-family:var(--gse-ui-toast-text-fontFamily);line-height:var(--gse-ui-toast-text-lineHeight);font-size:var(--gse-ui-toast-text-fontSize)}.gux-toast .gux-content .gux-buttons-bar{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-start;gap:var(--gse-ui-toast-buttonBar-gap)}.gux-toast.gux-toast-success{background-color:var(--gse-ui-toast-success-backgroundColor)}.gux-toast.gux-toast-success .gux-message{color:var(--gse-ui-toast-success-foregroundColor)}.gux-toast.gux-toast-warning{background-color:var(--gse-ui-toast-warning-backgroundColor)}.gux-toast.gux-toast-warning .gux-message{color:var(--gse-ui-toast-warning-foregroundColor)}.gux-toast.gux-toast-error{background-color:var(--gse-ui-toast-error-backgroundColor)}.gux-toast.gux-toast-error .gux-message{color:var(--gse-ui-toast-error-foregroundColor)}.gux-toast.gux-toast-info{background-color:var(--gse-ui-toast-info-backgroundColor)}.gux-toast.gux-toast-info .gux-message{color:var(--gse-ui-toast-info-foregroundColor)}.gux-toast.gux-toast-action{background-color:var(--gse-ui-toast-action-backgroundColor)}.gux-toast.gux-toast-action .gux-message{color:var(--gse-ui-toast-action-foregroundColor)}";export{r as gux_toast}
@@ -1 +1 @@
1
- import{r as t,c as e,h as i,g as s}from"./p-7d26b2e1.js";import{a,c as n,o as r,f as d}from"./p-ec218689.js";import{r as c}from"./p-cbcbd1bb.js";import{a as u}from"./p-091f51f6.js";import{f as o,a as h,b as l,c as p}from"./p-4f26144b.js";import{O as x}from"./p-9d18d475.js";import{t as g}from"./p-7ec9a1e2.js";import{b as f}from"./p-deee079e.js";import"./p-8a133b9b.js";const k={start:"Start",end:"End",date:"Date",toggleCalendar:"Toggle calendar view"};function b(t,e){let i=new Date(e.getTime());return i.setDate(i.getDate()+t),t<0?i.getDate()>e.getDate()&&(i=new Date(e.getFullYear(),e.getMonth()+1,0,0,0,0)):i.getDate()<e.getDate()&&i.setMonth(i.getMonth()-1),i}function m(t,e){const i=new Date(e.valueOf()),s=function(t){let e=t;for(;e<0;)e+=12;return e%=12,e}(i.getMonth()+t);return i.setMonth(s),i.setFullYear(e.getFullYear()),i.getMonth()!==s?m(t,b(-1,e)):i}function y(t,e){const i=t[e];return i&&"/"!==i?i:t[e-1]}function w(t){return t.match(/\W/)[0]}function v(t){const e=w(t);return t.split(e).reduce(((t,e)=>t.concat(e[0])),[])}function D(t,e){return{selectionStart:t.indexOf(e),selectionEnd:t.lastIndexOf(e)+1}}const F=class{constructor(i){t(this,i),this.input=e(this,"input",7),this.yearFormat="yyyy",this.isSelectingRangeWithMouse=!1,this.lastYear=(new Date).getFullYear(),this.startInputId=c("gux-datepicker"),this.endInputId=c("gux-datepicker"),this.value=void 0,this.label="",this.numberOfMonths=1,this.startDayOfWeek=void 0,this.minDate="",this.maxDate="",this.mode="single",this.format="mm/dd/yyyy",this.disabled=!1,this.labelPosition="beside",this.formattedValue="",this.minDateDate=void 0,this.maxDateDate=void 0,this.toFormattedValue="",this.active=!1}watchValue(){this.updateDate()}watchMinDate(t){this.minDateDate=t?o(t):null}watchMaxDate(t){this.maxDateDate=t?o(t):null}watchFormat(t){t.includes("yyyy")||(this.yearFormat="yy"),this.intervalOrder=v(t),this.lastIntervalRange=this.initialIntervalRange}watchActiveCalendar(t){if(!0===t){const t=o(this.value.split("/")[0]);this.calendarElement.resetCalendarView(t)}}onKeyDown(t){if(this.isInputFieldEvent(t))switch(this.focusedField=this.getInputFieldFromEvent(t),t.key){case"Enter":case"Escape":this.focusedField.blur(),this.active=!1;break;case"Tab":break;case"ArrowDown":t.preventDefault(),this.increment(-1),this.setCursorRange();break;case"ArrowUp":t.preventDefault(),this.increment(1),this.setCursorRange();break;case"ArrowLeft":{t.preventDefault();const e=function(t,e){const i=v(t),s=y(t,e.selectionStart),a=i.indexOf(s);return D(t,i[(a+i.length-1)%i.length])}(this.format,this.intervalRange);this.setIntervalRange(e),this.setCursorRange();break}case"ArrowRight":{t.preventDefault();const e=function(t,e){const i=v(t),s=y(t,e.selectionStart),a=i.indexOf(s);return D(t,i[(a+1)%i.length])}(this.format,this.intervalRange);this.setIntervalRange(e),this.setCursorRange();break}default:t.preventDefault(),this.isSelectingRangeWithMouse||(this.setIntervalRange({selectionStart:this.focusedField.selectionStart,selectionEnd:this.focusedField.selectionEnd}),this.updateIntervalValue(t),this.setCursorRange())}else switch(t.key){case"Enter":case"Escape":case" ":{this.active=!1;const t=this.root.shadowRoot.querySelector(".gux-calendar-toggle-button");u((()=>{t.focus()}));break}case"Tab":this.active&&(this.active=!1)}}onMouseDown(t){this.isInputFieldEvent(t)&&(this.isSelectingRangeWithMouse=!0);const e=t.composedPath(),i=e.includes(this.datepickerElement);Array.from(this.root.shadowRoot.querySelectorAll(".gux-calendar-toggle-button")).every((t=>!e.includes(t)))&&(this.active=i)}onClickOutside(){this.active=!1}onInputFocusIn(t){this.focusedField=this.getInputFieldFromEvent(t),this.isSelectingRangeWithMouse||u((()=>this.setRange()))}onInputFocusOut(){this.lastIntervalRange=this.initialIntervalRange}onInputMouseUp(t){t.preventDefault(),this.lastIntervalRange=D(this.format,y(this.format,this.focusedField.selectionStart)),this.setRange(),this.isSelectingRangeWithMouse=!1}isInputFieldEvent(t){const e=t.composedPath();return e.includes(this.inputElement)||e.includes(this.toInputElement)}get initialIntervalRange(){return D(this.format,y(this.format,0))}getInputFieldFromEvent(t){return t.composedPath()[0]}updateIntervalValue(t){const e=parseInt(t.key,10);if(!isNaN(e)){const i=this.focusedField.value.slice(this.focusedField.selectionStart,this.focusedField.selectionEnd);"y"===y(this.format,this.focusedField.selectionStart)&&"yyyy"===this.yearFormat?this.typeYearValue(i,t.key):this.canSetDate(e)?(this.updateSelection(this.focusedField,`${i[1]}${t.key}`),this.setValue()):(this.updateSelection(this.focusedField,`0${t.key}`.replace("00","01")),this.setValue())}}updateSelection(t,e){t.value=t.value.substr(0,this.intervalRange.selectionStart)+e+t.value.substr(this.intervalRange.selectionEnd)}getCalendarLabels(){return function(t,e,i){const s=t.split(",").map((t=>t.trim()));return"range"===e?[s[0]||i[0],s[1]||i[1]]:"range"===e||s[0]?[s[0]]:[i[2]]}(this.label,this.mode,[this.i18n("start"),this.i18n("end"),this.i18n("date")])}stringToDate(t){const e=w(this.format),i=this.format.toLowerCase().split(e),s=t.split(e),a=parseInt(s[i.indexOf(this.yearFormat)],10),n=parseInt(s[i.indexOf("mm")],10)-1,r=parseInt(s[i.indexOf("dd")],10),d=new Date(a,n,r);return"yy"===this.yearFormat&&d.getFullYear()<1970&&this.lastYear>1970&&d.setFullYear(d.getFullYear()+100),d}onCalendarSelect(t){this.value=t.target.value,t.stopPropagation(),this.input.emit(this.value),this.updateDate(),this.inputElement.value=this.formattedValue,"range"===this.mode&&(this.toInputElement.value=this.toFormattedValue),document.activeElement===this.inputElement&&document.activeElement===this.toInputElement||(this.active=!1)}setValue(){if("range"===this.mode){const t=this.stringToDate(this.inputElement.value),e=this.stringToDate(this.toInputElement.value);this.value=h(t,e),this.updateDate(),this.calendarElement.setValue([t,e])}else{const t=this.stringToDate(this.inputElement.value);this.value=l(t),this.updateDate(),this.calendarElement.setValue(t)}this.input.emit(this.value)}setRange(){this.setIntervalRange(this.lastIntervalRange),this.setCursorRange()}typeYearValue(t,e){" "!==t[0]?this.updateSelection(this.focusedField,` ${e}`):(this.updateSelection(this.focusedField,`${t.substr(1)}${e}`),(t.substr(1)+e).includes(" ")||this.setValue())}canSetDate(t){const e=parseInt([this.focusedField.value[this.intervalRange.selectionEnd-1].toString(),t].join(""),10);if(e)switch(y(this.format,this.focusedField.selectionStart)){case"d":{const t=o(this.value);if(e<=new Date(t.getFullYear(),t.getMonth()+1,0).getDate())return!0;break}case"m":if(e<=12)return!0;break;case"y":return!0}return!1}getMapAndRegexFromField(t){const e={dd:`0${t.getDate()}`.slice(-2),mm:`0${t.getMonth()+1}`.slice(-2)};return"yyyy"===this.yearFormat?e.yyyy=t.getFullYear().toString():e.yy=t.getFullYear().toString().slice(-2),{map:e,regexp:new RegExp(Object.keys(e).join("|"),"gi")}}updateDate(){if("range"===this.mode){const[t,e]=p(this.value),{map:i,regexp:s}=this.getMapAndRegexFromField(t);this.formattedValue=this.format.replace(s,(t=>i[t]));const{map:a,regexp:n}=this.getMapAndRegexFromField(e);this.toFormattedValue=this.format.replace(n,(t=>a[t]))}else{const t=o(this.value),{map:e,regexp:i}=this.getMapAndRegexFromField(t);this.formattedValue=this.format.replace(i,(t=>e[t]))}}setCursorRange(){this.intervalRange&&(this.focusedField.setSelectionRange(0,100),this.focusedField.setSelectionRange(this.intervalRange.selectionStart,this.intervalRange.selectionEnd))}toggleCalendar(){this.active=!this.active,this.active&&u((()=>{this.calendarElement.focusPreviewDate()}))}setIntervalRange(t){this.intervalRange=t}getCombinedFocusedDateValue(){return"range"===this.mode?this.getRangeFocusedDateValue():this.getFocusedDateValue()}getFocusedDateValue(){return o(this.value)}getRangeFocusedDateValue(){const[t,e]=p(this.value);return this.focusedField===this.inputElement?t:e}increment(t){const e=y(this.format,this.focusedField.selectionStart),i=this.getCombinedFocusedDateValue();let s;switch(e){case"d":s=b(t,i);break;case"m":s=m(t,i);break;case"y":s=function(t,e){const i=new Date(e.valueOf());return i.setFullYear(e.getFullYear()+t),i}(t,i)}var a,n,r;a=s,n=this.minDateDate,((r=this.maxDateDate)&&r<a||n&&n>a)&&(s=i),this.lastYear=s.getFullYear(),this.setIntervalRange({selectionStart:this.focusedField.selectionStart,selectionEnd:this.focusedField.selectionEnd}),this.focusedField.value=function(t,e){const i=w(e),s=e.split(i).map((e=>{switch(e[0]){case"d":return function(t){return`0${t.getDate().toString()}`.slice(-2)}(t);case"m":return function(t){return`0${(t.getMonth()+1).toString()}`.slice(-2)}(t);case"y":return function(t,e){return"yyyy"===e?t.getFullYear().toString():t.getFullYear().toString().slice(-2)}(t,e)}})).join(i);return s}(s,this.format),this.setValue()}async componentWillLoad(){if(g(this.root,{variant:this.mode}),this.i18n=await f(this.root,k),this.watchMinDate(this.minDate),this.watchMaxDate(this.maxDate),this.watchFormat(this.format),!this.value){const t=new Date;t.setHours(0,0,0,0),this.value="range"===this.mode?h(t,t):l(t),"range"===this.mode&&this.numberOfMonths<2&&(this.numberOfMonths=2)}this.updateDate()}runUpdatePosition(){this.cleanupUpdatePosition=a(this.datepickerElement,this.calendarElement,(()=>this.updatePosition()),{ancestorScroll:!0,elementResize:!0,animationFrame:!0,ancestorResize:!0})}updatePosition(){n(this.datepickerElement,this.calendarElement,{strategy:"fixed",placement:"bottom-start",middleware:[r({crossAxis:-3}),d({fallbackStrategy:"initialPlacement"})]}).then((({x:t,y:e})=>{Object.assign(this.calendarElement.style,{left:`${t}px`,top:`${e}px`})}))}componentDidUpdate(){this.active?this.runUpdatePosition():this.cleanupUpdatePosition&&this.cleanupUpdatePosition()}disconnectedCallback(){this.cleanupUpdatePosition&&this.cleanupUpdatePosition()}renderCalendarToggleButton(){return i("button",{class:"gux-calendar-toggle-button",type:"button",onClick:()=>this.toggleCalendar(),"aria-expanded":this.active.toString(),"aria-label":this.i18n("toggleCalendar"),disabled:this.disabled},i("gux-icon",{decorative:!0,"icon-name":"calendar"}))}renderCalendar(){return i("gux-calendar",{tabIndex:-1,ref:t=>this.calendarElement=t,value:this.value,mode:this.mode,onCalendarSelect:t=>this.onCalendarSelect(t),minDate:this.minDate,maxDate:this.maxDate,numberOfMonths:this.numberOfMonths,startDayOfWeek:this.startDayOfWeek})}renderStartDateField(){return i("div",{class:{"gux-datepicker-field":!0,"gux-above":"above"===this.labelPosition}},i("label",{htmlFor:this.startInputId,class:{"gux-datepicker-field-label":!0,"gux-sr-only":"single"===this.mode&&!this.label}},this.getCalendarLabels()[0]),i("div",{class:"gux-datepicker-field-input"},i("div",{class:"gux-datepicker-field-text-input"},i("input",{id:this.startInputId,type:"text",onClick:t=>this.onInputMouseUp(t),onFocusin:t=>this.onInputFocusIn(t),onFocusout:()=>this.onInputFocusOut(),ref:t=>this.inputElement=t,value:this.formattedValue,disabled:this.disabled}),this.renderCalendarToggleButton()),this.renderCalendar()))}renderEndDateField(){return"single"===this.mode?null:i("div",{class:{"gux-datepicker-field":!0,"gux-above":"above"===this.labelPosition}},i("label",{htmlFor:this.endInputId,class:"gux-datepicker-field-label"},this.getCalendarLabels()[1]),i("div",{class:"gux-datepicker-field-input"},i("div",{class:"gux-datepicker-field-text-input"},i("input",{id:this.endInputId,type:"text",ref:t=>this.toInputElement=t,onMouseUp:t=>this.onInputMouseUp(t),onFocusin:t=>this.onInputFocusIn(t),onFocusout:()=>this.onInputFocusOut(),value:this.toFormattedValue,disabled:this.disabled}),this.renderCalendarToggleButton())))}render(){return i("div",{class:{"gux-datepicker":!0,"gux-active":this.active,"gux-disabled":this.disabled},ref:t=>this.datepickerElement=t},this.renderStartDateField(),this.renderEndDateField())}get root(){return s(this)}static get watchers(){return{value:["watchValue"],minDate:["watchMinDate"],maxDate:["watchMaxDate"],format:["watchFormat"],active:["watchActiveCalendar"]}}};(function(t,e,i,s){var a,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var d=t.length-1;d>=0;d--)(a=t[d])&&(r=(n<3?a(r):n>3?a(e,i,r):a(e,i))||r);n>3&&r&&Object.defineProperty(e,i,r)})([x({triggerEvents:"mousedown"})],F.prototype,"onClickOutside",null),F.style=":host{display:block}.gux-datepicker{display:inline-block}.gux-datepicker.gux-disabled{pointer-events:none;cursor:default}.gux-datepicker.gux-disabled .gux-datepicker-field .gux-datepicker-field-input{opacity:0.5}.gux-datepicker .gux-datepicker-field{display:inline-flex;flex-direction:row;flex-wrap:nowrap;align-content:flex-start;align-items:center;justify-content:flex-start}.gux-datepicker .gux-datepicker-field~.gux-datepicker-field{margin-left:20px}.gux-datepicker .gux-datepicker-field.gux-above{flex-direction:column;align-items:self-start}.gux-datepicker .gux-datepicker-field.gux-above .gux-datepicker-field-input{margin-top:0}.gux-datepicker .gux-datepicker-field.gux-above .gux-datepicker-field-label{margin-right:0}.gux-datepicker .gux-datepicker-field .gux-datepicker-field-label{flex:0 1 auto;align-self:auto;order:0;margin-right:8px;font-size:12px;font-weight:bold;line-height:20px}.gux-datepicker .gux-datepicker-field .gux-datepicker-field-input{position:relative;flex:0 1 auto;align-self:auto;order:0;margin:4px 0}.gux-datepicker .gux-datepicker-field .gux-datepicker-field-input .gux-datepicker-field-text-input{box-sizing:border-box;display:flex;flex-direction:row;flex-wrap:nowrap;gap:4px;align-content:stretch;align-items:center;justify-content:center;width:100%;height:32px;padding:4px 8px 4px 8px;font-family:inherit;font-size:12px;line-height:1.6667;color:#2e394c;background-color:#f6f7f9;background-image:none;border:1px solid #6b7585;border-radius:4px;box-shadow:inset 0 0 4px rgba(32, 41, 55, 0.16)}.gux-datepicker .gux-datepicker-field .gux-datepicker-field-input .gux-datepicker-field-text-input:focus-within{border-color:#2a60c8;outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-datepicker .gux-datepicker-field .gux-datepicker-field-input .gux-datepicker-field-text-input input{flex:1 1 auto;align-self:auto;order:0;width:100px;overflow:hidden;color:#2e394c;background-color:#f6f7f9;border:none;outline:none}.gux-datepicker .gux-datepicker-field .gux-datepicker-field-input .gux-datepicker-field-text-input input::placeholder{color:#596373;opacity:1}.gux-datepicker .gux-datepicker-field .gux-datepicker-field-input .gux-datepicker-field-text-input input::-webkit-search-cancel-button,.gux-datepicker .gux-datepicker-field .gux-datepicker-field-input .gux-datepicker-field-text-input input::-webkit-search-results-button,.gux-datepicker .gux-datepicker-field .gux-datepicker-field-input .gux-datepicker-field-text-input input::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none}.gux-datepicker .gux-datepicker-field .gux-datepicker-field-input .gux-datepicker-field-text-input button{display:flex;flex:0 1 auto;align-items:center;align-self:auto;justify-content:center;order:0;padding:2px;color:#596373;background:transparent;border:none;border-radius:4px;outline:none}.gux-datepicker .gux-datepicker-field .gux-datepicker-field-input .gux-datepicker-field-text-input button:focus-visible{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-datepicker .gux-datepicker-field .gux-datepicker-field-input .gux-datepicker-field-text-input button:not(:disabled):focus-visible,.gux-datepicker .gux-datepicker-field .gux-datepicker-field-input .gux-datepicker-field-text-input button:not(:disabled):hover{color:#2e394c;cursor:pointer}.gux-datepicker .gux-datepicker-field .gux-datepicker-field-input .gux-datepicker-field-text-input button gux-icon{width:16px;height:16px}.gux-datepicker .gux-datepicker-field .gux-datepicker-field-input gux-calendar{position:fixed;z-index:var(--gux-zindex-popup, 1);display:none;box-shadow:0 2px 4px rgba(32, 41, 55, 0.24)}.gux-datepicker.gux-active .gux-datepicker-field .gux-datepicker-field-input .gux-datepicker-field-text-input button{color:#2a60c8}.gux-datepicker.gux-active .gux-datepicker-field .gux-datepicker-field-input .gux-datepicker-field-text-input button:not(:disabled):focus-visible,.gux-datepicker.gux-active .gux-datepicker-field .gux-datepicker-field-input .gux-datepicker-field-text-input button:not(:disabled):hover{color:#2a60c8}.gux-datepicker.gux-active .gux-datepicker-field .gux-datepicker-field-input gux-calendar{display:block}.gux-sr-only{position:absolute;top:auto;left:-10000px;width:1px;height:1px;overflow:hidden}";export{F as gux_datepicker}
1
+ import{r as t,c as e,h as i,g as s}from"./p-7d26b2e1.js";import{a,c as n,o as r,f as d}from"./p-ec218689.js";import{r as c}from"./p-cbcbd1bb.js";import{a as u}from"./p-091f51f6.js";import{f as o,a as h,b as l,c as p}from"./p-4f26144b.js";import{O as x}from"./p-9d18d475.js";import{t as g}from"./p-0db3479d.js";import{b as f}from"./p-deee079e.js";import"./p-8a133b9b.js";const k={start:"Start",end:"End",date:"Date",toggleCalendar:"Toggle calendar view"};function b(t,e){let i=new Date(e.getTime());return i.setDate(i.getDate()+t),t<0?i.getDate()>e.getDate()&&(i=new Date(e.getFullYear(),e.getMonth()+1,0,0,0,0)):i.getDate()<e.getDate()&&i.setMonth(i.getMonth()-1),i}function m(t,e){const i=new Date(e.valueOf()),s=function(t){let e=t;for(;e<0;)e+=12;return e%=12,e}(i.getMonth()+t);return i.setMonth(s),i.setFullYear(e.getFullYear()),i.getMonth()!==s?m(t,b(-1,e)):i}function y(t,e){const i=t[e];return i&&"/"!==i?i:t[e-1]}function w(t){return t.match(/\W/)[0]}function v(t){const e=w(t);return t.split(e).reduce(((t,e)=>t.concat(e[0])),[])}function D(t,e){return{selectionStart:t.indexOf(e),selectionEnd:t.lastIndexOf(e)+1}}const F=class{constructor(i){t(this,i),this.input=e(this,"input",7),this.yearFormat="yyyy",this.isSelectingRangeWithMouse=!1,this.lastYear=(new Date).getFullYear(),this.startInputId=c("gux-datepicker"),this.endInputId=c("gux-datepicker"),this.value=void 0,this.label="",this.numberOfMonths=1,this.startDayOfWeek=void 0,this.minDate="",this.maxDate="",this.mode="single",this.format="mm/dd/yyyy",this.disabled=!1,this.labelPosition="beside",this.formattedValue="",this.minDateDate=void 0,this.maxDateDate=void 0,this.toFormattedValue="",this.active=!1}watchValue(){this.updateDate()}watchMinDate(t){this.minDateDate=t?o(t):null}watchMaxDate(t){this.maxDateDate=t?o(t):null}watchFormat(t){t.includes("yyyy")||(this.yearFormat="yy"),this.intervalOrder=v(t),this.lastIntervalRange=this.initialIntervalRange}watchActiveCalendar(t){if(!0===t){const t=o(this.value.split("/")[0]);this.calendarElement.resetCalendarView(t)}}onKeyDown(t){if(this.isInputFieldEvent(t))switch(this.focusedField=this.getInputFieldFromEvent(t),t.key){case"Enter":case"Escape":this.focusedField.blur(),this.active=!1;break;case"Tab":break;case"ArrowDown":t.preventDefault(),this.increment(-1),this.setCursorRange();break;case"ArrowUp":t.preventDefault(),this.increment(1),this.setCursorRange();break;case"ArrowLeft":{t.preventDefault();const e=function(t,e){const i=v(t),s=y(t,e.selectionStart),a=i.indexOf(s);return D(t,i[(a+i.length-1)%i.length])}(this.format,this.intervalRange);this.setIntervalRange(e),this.setCursorRange();break}case"ArrowRight":{t.preventDefault();const e=function(t,e){const i=v(t),s=y(t,e.selectionStart),a=i.indexOf(s);return D(t,i[(a+1)%i.length])}(this.format,this.intervalRange);this.setIntervalRange(e),this.setCursorRange();break}default:t.preventDefault(),this.isSelectingRangeWithMouse||(this.setIntervalRange({selectionStart:this.focusedField.selectionStart,selectionEnd:this.focusedField.selectionEnd}),this.updateIntervalValue(t),this.setCursorRange())}else switch(t.key){case"Enter":case"Escape":case" ":{this.active=!1;const t=this.root.shadowRoot.querySelector(".gux-calendar-toggle-button");u((()=>{t.focus()}));break}case"Tab":this.active&&(this.active=!1)}}onMouseDown(t){this.isInputFieldEvent(t)&&(this.isSelectingRangeWithMouse=!0);const e=t.composedPath(),i=e.includes(this.datepickerElement);Array.from(this.root.shadowRoot.querySelectorAll(".gux-calendar-toggle-button")).every((t=>!e.includes(t)))&&(this.active=i)}onClickOutside(){this.active=!1}onInputFocusIn(t){this.focusedField=this.getInputFieldFromEvent(t),this.isSelectingRangeWithMouse||u((()=>this.setRange()))}onInputFocusOut(){this.lastIntervalRange=this.initialIntervalRange}onInputMouseUp(t){t.preventDefault(),this.lastIntervalRange=D(this.format,y(this.format,this.focusedField.selectionStart)),this.setRange(),this.isSelectingRangeWithMouse=!1}isInputFieldEvent(t){const e=t.composedPath();return e.includes(this.inputElement)||e.includes(this.toInputElement)}get initialIntervalRange(){return D(this.format,y(this.format,0))}getInputFieldFromEvent(t){return t.composedPath()[0]}updateIntervalValue(t){const e=parseInt(t.key,10);if(!isNaN(e)){const i=this.focusedField.value.slice(this.focusedField.selectionStart,this.focusedField.selectionEnd);"y"===y(this.format,this.focusedField.selectionStart)&&"yyyy"===this.yearFormat?this.typeYearValue(i,t.key):this.canSetDate(e)?(this.updateSelection(this.focusedField,`${i[1]}${t.key}`),this.setValue()):(this.updateSelection(this.focusedField,`0${t.key}`.replace("00","01")),this.setValue())}}updateSelection(t,e){t.value=t.value.substr(0,this.intervalRange.selectionStart)+e+t.value.substr(this.intervalRange.selectionEnd)}getCalendarLabels(){return function(t,e,i){const s=t.split(",").map((t=>t.trim()));return"range"===e?[s[0]||i[0],s[1]||i[1]]:"range"===e||s[0]?[s[0]]:[i[2]]}(this.label,this.mode,[this.i18n("start"),this.i18n("end"),this.i18n("date")])}stringToDate(t){const e=w(this.format),i=this.format.toLowerCase().split(e),s=t.split(e),a=parseInt(s[i.indexOf(this.yearFormat)],10),n=parseInt(s[i.indexOf("mm")],10)-1,r=parseInt(s[i.indexOf("dd")],10),d=new Date(a,n,r);return"yy"===this.yearFormat&&d.getFullYear()<1970&&this.lastYear>1970&&d.setFullYear(d.getFullYear()+100),d}onCalendarSelect(t){this.value=t.target.value,t.stopPropagation(),this.input.emit(this.value),this.updateDate(),this.inputElement.value=this.formattedValue,"range"===this.mode&&(this.toInputElement.value=this.toFormattedValue),document.activeElement===this.inputElement&&document.activeElement===this.toInputElement||(this.active=!1)}setValue(){if("range"===this.mode){const t=this.stringToDate(this.inputElement.value),e=this.stringToDate(this.toInputElement.value);this.value=h(t,e),this.updateDate(),this.calendarElement.setValue([t,e])}else{const t=this.stringToDate(this.inputElement.value);this.value=l(t),this.updateDate(),this.calendarElement.setValue(t)}this.input.emit(this.value)}setRange(){this.setIntervalRange(this.lastIntervalRange),this.setCursorRange()}typeYearValue(t,e){" "!==t[0]?this.updateSelection(this.focusedField,` ${e}`):(this.updateSelection(this.focusedField,`${t.substr(1)}${e}`),(t.substr(1)+e).includes(" ")||this.setValue())}canSetDate(t){const e=parseInt([this.focusedField.value[this.intervalRange.selectionEnd-1].toString(),t].join(""),10);if(e)switch(y(this.format,this.focusedField.selectionStart)){case"d":{const t=o(this.value);if(e<=new Date(t.getFullYear(),t.getMonth()+1,0).getDate())return!0;break}case"m":if(e<=12)return!0;break;case"y":return!0}return!1}getMapAndRegexFromField(t){const e={dd:`0${t.getDate()}`.slice(-2),mm:`0${t.getMonth()+1}`.slice(-2)};return"yyyy"===this.yearFormat?e.yyyy=t.getFullYear().toString():e.yy=t.getFullYear().toString().slice(-2),{map:e,regexp:new RegExp(Object.keys(e).join("|"),"gi")}}updateDate(){if("range"===this.mode){const[t,e]=p(this.value),{map:i,regexp:s}=this.getMapAndRegexFromField(t);this.formattedValue=this.format.replace(s,(t=>i[t]));const{map:a,regexp:n}=this.getMapAndRegexFromField(e);this.toFormattedValue=this.format.replace(n,(t=>a[t]))}else{const t=o(this.value),{map:e,regexp:i}=this.getMapAndRegexFromField(t);this.formattedValue=this.format.replace(i,(t=>e[t]))}}setCursorRange(){this.intervalRange&&(this.focusedField.setSelectionRange(0,100),this.focusedField.setSelectionRange(this.intervalRange.selectionStart,this.intervalRange.selectionEnd))}toggleCalendar(){this.active=!this.active,this.active&&u((()=>{this.calendarElement.focusPreviewDate()}))}setIntervalRange(t){this.intervalRange=t}getCombinedFocusedDateValue(){return"range"===this.mode?this.getRangeFocusedDateValue():this.getFocusedDateValue()}getFocusedDateValue(){return o(this.value)}getRangeFocusedDateValue(){const[t,e]=p(this.value);return this.focusedField===this.inputElement?t:e}increment(t){const e=y(this.format,this.focusedField.selectionStart),i=this.getCombinedFocusedDateValue();let s;switch(e){case"d":s=b(t,i);break;case"m":s=m(t,i);break;case"y":s=function(t,e){const i=new Date(e.valueOf());return i.setFullYear(e.getFullYear()+t),i}(t,i)}var a,n,r;a=s,n=this.minDateDate,((r=this.maxDateDate)&&r<a||n&&n>a)&&(s=i),this.lastYear=s.getFullYear(),this.setIntervalRange({selectionStart:this.focusedField.selectionStart,selectionEnd:this.focusedField.selectionEnd}),this.focusedField.value=function(t,e){const i=w(e),s=e.split(i).map((e=>{switch(e[0]){case"d":return function(t){return`0${t.getDate().toString()}`.slice(-2)}(t);case"m":return function(t){return`0${(t.getMonth()+1).toString()}`.slice(-2)}(t);case"y":return function(t,e){return"yyyy"===e?t.getFullYear().toString():t.getFullYear().toString().slice(-2)}(t,e)}})).join(i);return s}(s,this.format),this.setValue()}async componentWillLoad(){if(g(this.root,{variant:this.mode}),this.i18n=await f(this.root,k),this.watchMinDate(this.minDate),this.watchMaxDate(this.maxDate),this.watchFormat(this.format),!this.value){const t=new Date;t.setHours(0,0,0,0),this.value="range"===this.mode?h(t,t):l(t),"range"===this.mode&&this.numberOfMonths<2&&(this.numberOfMonths=2)}this.updateDate()}runUpdatePosition(){this.cleanupUpdatePosition=a(this.datepickerElement,this.calendarElement,(()=>this.updatePosition()),{ancestorScroll:!0,elementResize:!0,animationFrame:!0,ancestorResize:!0})}updatePosition(){n(this.datepickerElement,this.calendarElement,{strategy:"fixed",placement:"bottom-start",middleware:[r({crossAxis:-3}),d({fallbackStrategy:"initialPlacement"})]}).then((({x:t,y:e})=>{Object.assign(this.calendarElement.style,{left:`${t}px`,top:`${e}px`})}))}componentDidUpdate(){this.active?this.runUpdatePosition():this.cleanupUpdatePosition&&this.cleanupUpdatePosition()}disconnectedCallback(){this.cleanupUpdatePosition&&this.cleanupUpdatePosition()}renderCalendarToggleButton(){return i("button",{class:"gux-calendar-toggle-button",type:"button",onClick:()=>this.toggleCalendar(),"aria-expanded":this.active.toString(),"aria-label":this.i18n("toggleCalendar"),disabled:this.disabled},i("gux-icon",{decorative:!0,"icon-name":"calendar"}))}renderCalendar(){return i("gux-calendar",{tabIndex:-1,ref:t=>this.calendarElement=t,value:this.value,mode:this.mode,onCalendarSelect:t=>this.onCalendarSelect(t),minDate:this.minDate,maxDate:this.maxDate,numberOfMonths:this.numberOfMonths,startDayOfWeek:this.startDayOfWeek})}renderStartDateField(){return i("div",{class:{"gux-datepicker-field":!0,"gux-above":"above"===this.labelPosition}},i("label",{htmlFor:this.startInputId,class:{"gux-datepicker-field-label":!0,"gux-sr-only":"single"===this.mode&&!this.label}},this.getCalendarLabels()[0]),i("div",{class:"gux-datepicker-field-input"},i("div",{class:"gux-datepicker-field-text-input"},i("input",{id:this.startInputId,type:"text",onClick:t=>this.onInputMouseUp(t),onFocusin:t=>this.onInputFocusIn(t),onFocusout:()=>this.onInputFocusOut(),ref:t=>this.inputElement=t,value:this.formattedValue,disabled:this.disabled}),this.renderCalendarToggleButton()),this.renderCalendar()))}renderEndDateField(){return"single"===this.mode?null:i("div",{class:{"gux-datepicker-field":!0,"gux-above":"above"===this.labelPosition}},i("label",{htmlFor:this.endInputId,class:"gux-datepicker-field-label"},this.getCalendarLabels()[1]),i("div",{class:"gux-datepicker-field-input"},i("div",{class:"gux-datepicker-field-text-input"},i("input",{id:this.endInputId,type:"text",ref:t=>this.toInputElement=t,onMouseUp:t=>this.onInputMouseUp(t),onFocusin:t=>this.onInputFocusIn(t),onFocusout:()=>this.onInputFocusOut(),value:this.toFormattedValue,disabled:this.disabled}),this.renderCalendarToggleButton())))}render(){return i("div",{class:{"gux-datepicker":!0,"gux-active":this.active,"gux-disabled":this.disabled},ref:t=>this.datepickerElement=t},this.renderStartDateField(),this.renderEndDateField())}get root(){return s(this)}static get watchers(){return{value:["watchValue"],minDate:["watchMinDate"],maxDate:["watchMaxDate"],format:["watchFormat"],active:["watchActiveCalendar"]}}};(function(t,e,i,s){var a,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var d=t.length-1;d>=0;d--)(a=t[d])&&(r=(n<3?a(r):n>3?a(e,i,r):a(e,i))||r);n>3&&r&&Object.defineProperty(e,i,r)})([x({triggerEvents:"mousedown"})],F.prototype,"onClickOutside",null),F.style=":host{display:block}.gux-datepicker{display:inline-block}.gux-datepicker.gux-disabled{pointer-events:none;cursor:default}.gux-datepicker.gux-disabled .gux-datepicker-field .gux-datepicker-field-input{opacity:0.5}.gux-datepicker .gux-datepicker-field{display:inline-flex;flex-direction:row;flex-wrap:nowrap;align-content:flex-start;align-items:center;justify-content:flex-start}.gux-datepicker .gux-datepicker-field~.gux-datepicker-field{margin-left:20px}.gux-datepicker .gux-datepicker-field.gux-above{flex-direction:column;align-items:self-start}.gux-datepicker .gux-datepicker-field.gux-above .gux-datepicker-field-input{margin-top:0}.gux-datepicker .gux-datepicker-field.gux-above .gux-datepicker-field-label{margin-right:0}.gux-datepicker .gux-datepicker-field .gux-datepicker-field-label{flex:0 1 auto;align-self:auto;order:0;margin-right:8px;font-size:12px;font-weight:bold;line-height:20px}.gux-datepicker .gux-datepicker-field .gux-datepicker-field-input{position:relative;flex:0 1 auto;align-self:auto;order:0;margin:4px 0}.gux-datepicker .gux-datepicker-field .gux-datepicker-field-input .gux-datepicker-field-text-input{box-sizing:border-box;display:flex;flex-direction:row;flex-wrap:nowrap;gap:4px;align-content:stretch;align-items:center;justify-content:center;width:100%;height:32px;padding:4px 8px 4px 8px;font-family:inherit;font-size:12px;line-height:1.6667;color:#2e394c;background-color:#f6f7f9;background-image:none;border:1px solid #6b7585;border-radius:4px;box-shadow:inset 0 0 4px rgba(32, 41, 55, 0.16)}.gux-datepicker .gux-datepicker-field .gux-datepicker-field-input .gux-datepicker-field-text-input:focus-within{border-color:#2a60c8;outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-datepicker .gux-datepicker-field .gux-datepicker-field-input .gux-datepicker-field-text-input input{flex:1 1 auto;align-self:auto;order:0;width:100px;overflow:hidden;color:#2e394c;background-color:#f6f7f9;border:none;outline:none}.gux-datepicker .gux-datepicker-field .gux-datepicker-field-input .gux-datepicker-field-text-input input::placeholder{color:#596373;opacity:1}.gux-datepicker .gux-datepicker-field .gux-datepicker-field-input .gux-datepicker-field-text-input input::-webkit-search-cancel-button,.gux-datepicker .gux-datepicker-field .gux-datepicker-field-input .gux-datepicker-field-text-input input::-webkit-search-results-button,.gux-datepicker .gux-datepicker-field .gux-datepicker-field-input .gux-datepicker-field-text-input input::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none}.gux-datepicker .gux-datepicker-field .gux-datepicker-field-input .gux-datepicker-field-text-input button{display:flex;flex:0 1 auto;align-items:center;align-self:auto;justify-content:center;order:0;padding:2px;color:#596373;background:transparent;border:none;border-radius:4px;outline:none}.gux-datepicker .gux-datepicker-field .gux-datepicker-field-input .gux-datepicker-field-text-input button:focus-visible{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-datepicker .gux-datepicker-field .gux-datepicker-field-input .gux-datepicker-field-text-input button:not(:disabled):focus-visible,.gux-datepicker .gux-datepicker-field .gux-datepicker-field-input .gux-datepicker-field-text-input button:not(:disabled):hover{color:#2e394c;cursor:pointer}.gux-datepicker .gux-datepicker-field .gux-datepicker-field-input .gux-datepicker-field-text-input button gux-icon{width:16px;height:16px}.gux-datepicker .gux-datepicker-field .gux-datepicker-field-input gux-calendar{position:fixed;z-index:var(--gux-zindex-popup, 1);display:none;box-shadow:0 2px 4px rgba(32, 41, 55, 0.24)}.gux-datepicker.gux-active .gux-datepicker-field .gux-datepicker-field-input .gux-datepicker-field-text-input button{color:#2a60c8}.gux-datepicker.gux-active .gux-datepicker-field .gux-datepicker-field-input .gux-datepicker-field-text-input button:not(:disabled):focus-visible,.gux-datepicker.gux-active .gux-datepicker-field .gux-datepicker-field-input .gux-datepicker-field-text-input button:not(:disabled):hover{color:#2a60c8}.gux-datepicker.gux-active .gux-datepicker-field .gux-datepicker-field-input gux-calendar{display:block}.gux-sr-only{position:absolute;top:auto;left:-10000px;width:1px;height:1px;overflow:hidden}";export{F as gux_datepicker}
@@ -1 +1 @@
1
- import{r as t,c as i,h as o,g as s}from"./p-7d26b2e1.js";import{O as n}from"./p-9d18d475.js";import{w as e}from"./p-76ff3e75.js";import{a}from"./p-091f51f6.js";import{t as r}from"./p-7ec9a1e2.js";import{b as c}from"./p-deee079e.js";import"./p-8a133b9b.js";const u=["primary","secondary","tertiary","danger"];function h(t){return u.find((i=>i===t))?t:"secondary"}const d={actionButtonDropdown:"Dropdown for {buttonTitle}"};const l=class{constructor(o){t(this,o),this.open=i(this,"open",7),this.close=i(this,"close",7),this.actionClick=i(this,"actionClick",7),this.type="button",this.text=void 0,this.disabled=!1,this.accent="secondary",this.isOpen=!1}handleKeydown(t){const i=t.composedPath();switch(t.key){case"Escape":this.isOpen=!1,i.includes(this.listElement)&&(t.preventDefault(),this.dropdownButton.focus());break;case"Tab":this.isOpen=!1;break;case"ArrowDown":case"Enter":i.includes(this.dropdownButton)&&(t.preventDefault(),this.isOpen=!0,this.focusFirstItemInPopupList())}}handleKeyup(t){if(" "===t.key)t.composedPath().includes(this.dropdownButton)&&(this.isOpen=!0,this.focusFirstItemInPopupList())}watchDisabled(t){t&&(this.isOpen=!1)}watchValue(t){t?this.open.emit():this.close.emit()}onClickOutside(t){null===t.relatedTarget&&(this.isOpen=!1)}toggle(){this.disabled||(this.isOpen=!this.isOpen,this.isOpen&&this.focusPopupList())}focusPopupList(){a((()=>{this.listElement.focus&&this.listElement.focus()}))}focusFirstItemInPopupList(){a((()=>{this.listElement.guxFocusFirstItem()}))}onActionClick(){this.disabled||(this.isOpen=!1,this.actionClick.emit())}onListClick(t){e("gux-list-item",t,(()=>{this.isOpen=!1,this.dropdownButton.focus()}))}async componentWillLoad(){r(this.root,{variant:this.type}),this.i18n=await c(this.root,d)}render(){return o("div",{class:"gux-action-button-container"},o("gux-popup",{expanded:this.isOpen,disabled:this.disabled},o("div",{slot:"target",class:"gux-action-button-container"},o("gux-button-slot-beta",{class:"gux-action-button",accent:h(this.accent)},o("button",{type:this.type,disabled:this.disabled,onClick:()=>this.onActionClick()},this.text)),o("gux-button-slot-beta",{class:"gux-dropdown-button",accent:h(this.accent)},o("button",{type:"button",disabled:this.disabled,ref:t=>this.dropdownButton=t,onMouseUp:()=>this.toggle(),"aria-haspopup":"true","aria-expanded":this.isOpen.toString(),"aria-label":this.i18n("actionButtonDropdown",{buttonTitle:this.text})},o("gux-icon",{decorative:!0,"icon-name":"chevron-small-down"})))),o("div",{class:"gux-list-container",slot:"popup"},o("gux-list",{onClick:t=>this.onListClick(t),ref:t=>this.listElement=t},o("slot",null)))))}get root(){return s(this)}static get watchers(){return{disabled:["watchDisabled"],isOpen:["watchValue"]}}};(function(t,i,o,s){var n,e=arguments.length,a=e<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,i,o,s);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(a=(e<3?n(a):e>3?n(i,o,a):n(i,o))||a);e>3&&a&&Object.defineProperty(i,o,a)})([n({triggerEvents:"click"})],l.prototype,"onClickOutside",null),l.style=":host{display:block;-webkit-user-select:none;user-select:none}.gux-action-button-container{min-width:128px}.gux-action-button-container>*{vertical-align:middle}.gux-action-button-container .gux-action-button{width:calc(100% - 33px);margin-right:1px}.gux-action-button-container .gux-action-button button{width:100%;max-width:none;text-align:center;border-top-right-radius:0;border-bottom-right-radius:0}.gux-action-button-container .gux-dropdown-button button{width:32px;padding:0;border-top-left-radius:0;border-bottom-left-radius:0}.gux-action-button-container .gux-dropdown-button button gux-icon{width:16px;height:16px}.gux-action-button-container .gux-list-container{padding:var(--gux-spacing-xs) 0;margin:0;list-style:none;background-color:var(--gse-ui-menu-wrapper-backgroundColor);border:1px solid var(--gse-ui-menu-wrapper-border);border-radius:4px;box-shadow:0px 4px 6px 1px rgba(35, 57, 92, 0.12)}";export{l as gux_action_button}
1
+ import{r as t,c as i,h as o,g as s}from"./p-7d26b2e1.js";import{O as n}from"./p-9d18d475.js";import{w as e}from"./p-76ff3e75.js";import{a}from"./p-091f51f6.js";import{t as r}from"./p-0db3479d.js";import{b as c}from"./p-deee079e.js";import"./p-8a133b9b.js";const u=["primary","secondary","tertiary","danger"];function h(t){return u.find((i=>i===t))?t:"secondary"}const d={actionButtonDropdown:"Dropdown for {buttonTitle}"};const l=class{constructor(o){t(this,o),this.open=i(this,"open",7),this.close=i(this,"close",7),this.actionClick=i(this,"actionClick",7),this.type="button",this.text=void 0,this.disabled=!1,this.accent="secondary",this.isOpen=!1}handleKeydown(t){const i=t.composedPath();switch(t.key){case"Escape":this.isOpen=!1,i.includes(this.listElement)&&(t.preventDefault(),this.dropdownButton.focus());break;case"Tab":this.isOpen=!1;break;case"ArrowDown":case"Enter":i.includes(this.dropdownButton)&&(t.preventDefault(),this.isOpen=!0,this.focusFirstItemInPopupList())}}handleKeyup(t){if(" "===t.key)t.composedPath().includes(this.dropdownButton)&&(this.isOpen=!0,this.focusFirstItemInPopupList())}watchDisabled(t){t&&(this.isOpen=!1)}watchValue(t){t?this.open.emit():this.close.emit()}onClickOutside(t){null===t.relatedTarget&&(this.isOpen=!1)}toggle(){this.disabled||(this.isOpen=!this.isOpen,this.isOpen&&this.focusPopupList())}focusPopupList(){a((()=>{this.listElement.focus&&this.listElement.focus()}))}focusFirstItemInPopupList(){a((()=>{this.listElement.guxFocusFirstItem()}))}onActionClick(){this.disabled||(this.isOpen=!1,this.actionClick.emit())}onListClick(t){e("gux-list-item",t,(()=>{this.isOpen=!1,this.dropdownButton.focus()}))}async componentWillLoad(){r(this.root,{variant:this.type}),this.i18n=await c(this.root,d)}render(){return o("div",{class:"gux-action-button-container"},o("gux-popup",{expanded:this.isOpen,disabled:this.disabled},o("div",{slot:"target",class:"gux-action-button-container"},o("gux-button-slot-beta",{class:"gux-action-button",accent:h(this.accent)},o("button",{type:this.type,disabled:this.disabled,onClick:()=>this.onActionClick()},this.text)),o("gux-button-slot-beta",{class:"gux-dropdown-button",accent:h(this.accent)},o("button",{type:"button",disabled:this.disabled,ref:t=>this.dropdownButton=t,onMouseUp:()=>this.toggle(),"aria-haspopup":"true","aria-expanded":this.isOpen.toString(),"aria-label":this.i18n("actionButtonDropdown",{buttonTitle:this.text})},o("gux-icon",{decorative:!0,"icon-name":"chevron-small-down"})))),o("div",{class:"gux-list-container",slot:"popup"},o("gux-list",{onClick:t=>this.onListClick(t),ref:t=>this.listElement=t},o("slot",null)))))}get root(){return s(this)}static get watchers(){return{disabled:["watchDisabled"],isOpen:["watchValue"]}}};(function(t,i,o,s){var n,e=arguments.length,a=e<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,i,o,s);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(a=(e<3?n(a):e>3?n(i,o,a):n(i,o))||a);e>3&&a&&Object.defineProperty(i,o,a)})([n({triggerEvents:"click"})],l.prototype,"onClickOutside",null),l.style=":host{display:block;-webkit-user-select:none;user-select:none}.gux-action-button-container{min-width:128px}.gux-action-button-container>*{vertical-align:middle}.gux-action-button-container .gux-action-button{width:calc(100% - 33px);margin-right:1px}.gux-action-button-container .gux-action-button button{width:100%;max-width:none;text-align:center;border-top-right-radius:0;border-bottom-right-radius:0}.gux-action-button-container .gux-dropdown-button button{width:32px;padding:0;border-top-left-radius:0;border-bottom-left-radius:0}.gux-action-button-container .gux-dropdown-button button gux-icon{width:16px;height:16px}.gux-action-button-container .gux-list-container{padding:var(--gux-spacing-xs) 0;margin:0;list-style:none;background-color:var(--gse-ui-menu-wrapper-backgroundColor);border:1px solid var(--gse-ui-menu-wrapper-border);border-radius:4px;box-shadow:0px 4px 6px 1px rgba(35, 57, 92, 0.12)}";export{l as gux_action_button}
@@ -1 +1 @@
1
- import{r as t,h as o,H as s,g as e}from"./p-7d26b2e1.js";import{a as i}from"./p-091f51f6.js";import{t as r}from"./p-7ec9a1e2.js";import{h as n}from"./p-837e3eff.js";import{c as a}from"./p-e459974a.js";const u=class{constructor(o){t(this,o),this.isShown=!1}forceUpdate(t){t&&this.popperInstance&&this.popperInstance.update()}onKeydown(t){if(t.stopPropagation(),this.isShown)switch(t.key){case"Escape":case"ArrowLeft":case"ArrowUp":return void this.root.focus();case"ArrowDown":return t.preventDefault(),void this.focusOnMenu();case"Enter":return void(this.hideDelayTimeout=i((()=>{this.focusOnMenu()})))}}onKeyup(t){t.stopPropagation()," "!==t.key||(this.menuContentElement.contains(document.activeElement)?this.root.focus():this.hideDelayTimeout=i((()=>{this.focusOnMenu()})))}onmouseenter(){this.show()}onMouseleave(){this.hide()}onClick(t){0!==t.detail&&this.hide(),this.root.focus()}onFocusin(){this.show()}onFocusout(){this.hide()}show(){clearTimeout(this.hideDelayTimeout),this.isShown=!0}hide(){this.isShown&&(this.hideDelayTimeout=setTimeout((()=>{this.isShown=!1}),n))}runPopper(){this.popperInstance=a(this.targetElement,document.querySelector("gux-menu"),{modifiers:[{name:"offset",options:{offset:[0,16]}},{name:"arrow",options:{padding:16}}],placement:"bottom-start"})}destroyPopper(){this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=null)}focusOnMenu(){if(this.menuContentElement.contains(document.activeElement))return;const t=this.root.querySelector("gux-menu");Array.from(t.children)[0].guxFocus()}componentWillLoad(){r(this.root)}componentDidLoad(){this.runPopper()}disconnectedCallback(){this.destroyPopper()}render(){return o(s,{tabIndex:0,"aria-haspopup":"true"},o("span",{ref:t=>this.targetElement=t},o("slot",{name:"target"})),o("div",{class:{"gux-flyout-menu-content":!0,"gux-shown":this.isShown},ref:t=>this.menuContentElement=t},o("slot",{name:"menu"})))}get root(){return e(this)}static get watchers(){return{isShown:["forceUpdate"]}}};u.style=":host{z-index:var(--gux-zindex-popover, 2);color:#2e394c;cursor:default}:host(:focus){outline:none}:host(:focus-visible){outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-flyout-menu-content{display:none;margin:0}.gux-flyout-menu-content.gux-shown{display:flex}.gux-arrow,.gux-arrow::before{position:absolute;top:-3px;width:10px;height:10px;background:inherit}.gux-arrow::before{visibility:visible;content:'';border-top:1px solid #b4bccb;border-left:1px solid #b4bccb;transform:rotate(45deg)}";export{u as gux_flyout_menu_beta}
1
+ import{r as t,h as o,H as s,g as e}from"./p-7d26b2e1.js";import{a as i}from"./p-091f51f6.js";import{t as r}from"./p-0db3479d.js";import{h as n}from"./p-837e3eff.js";import{c as a}from"./p-e459974a.js";const u=class{constructor(o){t(this,o),this.isShown=!1}forceUpdate(t){t&&this.popperInstance&&this.popperInstance.update()}onKeydown(t){if(t.stopPropagation(),this.isShown)switch(t.key){case"Escape":case"ArrowLeft":case"ArrowUp":return void this.root.focus();case"ArrowDown":return t.preventDefault(),void this.focusOnMenu();case"Enter":return void(this.hideDelayTimeout=i((()=>{this.focusOnMenu()})))}}onKeyup(t){t.stopPropagation()," "!==t.key||(this.menuContentElement.contains(document.activeElement)?this.root.focus():this.hideDelayTimeout=i((()=>{this.focusOnMenu()})))}onmouseenter(){this.show()}onMouseleave(){this.hide()}onClick(t){0!==t.detail&&this.hide(),this.root.focus()}onFocusin(){this.show()}onFocusout(){this.hide()}show(){clearTimeout(this.hideDelayTimeout),this.isShown=!0}hide(){this.isShown&&(this.hideDelayTimeout=setTimeout((()=>{this.isShown=!1}),n))}runPopper(){this.popperInstance=a(this.targetElement,document.querySelector("gux-menu"),{modifiers:[{name:"offset",options:{offset:[0,16]}},{name:"arrow",options:{padding:16}}],placement:"bottom-start"})}destroyPopper(){this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=null)}focusOnMenu(){if(this.menuContentElement.contains(document.activeElement))return;const t=this.root.querySelector("gux-menu");Array.from(t.children)[0].guxFocus()}componentWillLoad(){r(this.root)}componentDidLoad(){this.runPopper()}disconnectedCallback(){this.destroyPopper()}render(){return o(s,{tabIndex:0,"aria-haspopup":"true"},o("span",{ref:t=>this.targetElement=t},o("slot",{name:"target"})),o("div",{class:{"gux-flyout-menu-content":!0,"gux-shown":this.isShown},ref:t=>this.menuContentElement=t},o("slot",{name:"menu"})))}get root(){return e(this)}static get watchers(){return{isShown:["forceUpdate"]}}};u.style=":host{z-index:var(--gux-zindex-popover, 2);color:#2e394c;cursor:default}:host(:focus){outline:none}:host(:focus-visible){outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-flyout-menu-content{display:none;margin:0}.gux-flyout-menu-content.gux-shown{display:flex}.gux-arrow,.gux-arrow::before{position:absolute;top:-3px;width:10px;height:10px;background:inherit}.gux-arrow::before{visibility:visible;content:'';border-top:1px solid #b4bccb;border-left:1px solid #b4bccb;transform:rotate(45deg)}";export{u as gux_flyout_menu_beta}
@@ -0,0 +1 @@
1
+ import{h as e,r,g as s}from"./p-7d26b2e1.js";import{t}from"./p-0db3479d.js";import{a as o}from"./p-d0805f56.js";import{r as a}from"./p-cbcbd1bb.js";import{c as i}from"./p-9dd4b14a.js";const n=23.5,c=2*Math.PI*n;function l(e,r){return!(isNaN(e)||isNaN(r)||e>r||e<0||0===r)}const d=({value:r,max:s,scale:t,dropshadowId:o,screenreaderText:a})=>e("div",{role:"progressbar","aria-valuenow":r,"aria-valuemin":"0","aria-valuemax":s,"aria-label":a},e("svg",{class:"gux-svg-container",width:"60px",height:"60px",viewBox:"0 0 60 60",role:"presentation"},e("filter",{id:o},e("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"1.4"}),e("feOffset",{dx:"0",dy:"0",result:"offsetblur"}),e("feMerge",null,e("feMergeNode",null),e("feMergeNode",{in:"SourceGraphic"}))),e("circle",{cx:"50%",cy:"50%",r:n,class:"gux-static-circle"}),e("circle",{cx:"50%",cy:"50%",r:n,class:"gux-dynamic-circle-shadow","stroke-dashoffset":c*(1-r/s),"stroke-dasharray":c,"stroke-linecap":"round",filter:"url(#"+o+")"}),e("circle",{cx:"50%",cy:"50%",r:n,class:"gux-dynamic-circle","stroke-dashoffset":c*(1-r/s),"stroke-dasharray":c,"stroke-linecap":"round"}),e("text",{x:"50%",y:"50%","dominant-baseline":"central",class:{"gux-percentage":!0,"gux-small":![0,1].includes(t)}},function(e,r,s){const t=Math.pow(10,i(s,0,2));return Math.round((e+Number.EPSILON)/r*100*t)/t+"%"}(r,s,t)))),g=({screenreaderText:r})=>e("gux-radial-loading",{"screenreader-text":r,context:"modal"}),h=class{constructor(e){r(this,e),this.dropshadowId=a("gux-dropshadow"),this.value=void 0,this.max=100,this.scale=0,this.screenreaderText=""}componentWillLoad(){t(this.root)}componentDidLoad(){!this.screenreaderText&&l(this.value,this.max)&&o(this.root,"No screenreader-text provided. Provide a localized screenreader-text property for the component.")}render(){return l(this.value,this.max)?e(d,{value:this.value,max:this.max,scale:this.scale,dropshadowId:this.dropshadowId,screenreaderText:this.screenreaderText}):e(g,{screenreaderText:this.screenreaderText})}get root(){return s(this)}};h.style=":host{display:inline-block}div[role='progressbar'] .gux-svg-container{display:block}div[role='progressbar'] .gux-svg-container .gux-dynamic-circle{fill:none;stroke:#2a60c8;stroke-width:5;transform:rotate(-90deg);transform-origin:50% 50%}div[role='progressbar'] .gux-svg-container .gux-dynamic-circle-shadow{fill:none;stroke:#75a8ff;stroke-width:5;transform:rotate(-90deg);transform-origin:50% 50%}div[role='progressbar'] .gux-svg-container .gux-static-circle{fill:none;stroke:#deeaff;stroke-width:4}div[role='progressbar'] .gux-svg-container .gux-percentage{font-family:Roboto, sans-serif;font-weight:400;font-size:12px;line-height:20px;text-anchor:middle;fill:#2e394c}div[role='progressbar'] .gux-svg-container .gux-percentage.gux-small{font-family:Roboto, sans-serif;font-weight:400;font-size:11px;line-height:16px}";export{h as gux_radial_progress}
@@ -1 +1 @@
1
- import{r as e,h as o,g as l}from"./p-7d26b2e1.js";import{t}from"./p-7ec9a1e2.js";import{b as g}from"./p-deee079e.js";import"./p-8a133b9b.js";const r={neutral:"badge with label: {label}, color: neutral","neutral-bold":"badge with label: {label}, color: neutral bold",green:"badge with label: {label}, color: green","green-bold":"badge with label: {label}, color: green bold",yellow:"badge with label: {label}, color: yellow","yellow-bold":"badge with label: {label}, color: yellow bold",red:"badge with label: {label}, color: red","red-bold":"badge with label: {label}, color: red bold",inherit:"badge with label: {label}"},a=class{constructor(o){e(this,o),this.color="neutral",this.accent="info",this.bold=!1,this.label=void 0}onSlotChange(e){const o=e.composedPath()[0].assignedNodes();this.label=o.map((e=>e.textContent)).join("")}renderBadgeTitle(){return o("gux-tooltip-title",null,o("span",null,o("slot",{"aria-hidden":"true",onSlotchange:this.onSlotChange.bind(this)})))}renderSrText(){return o("div",{class:"gux-sr-only"},this.i18n(this.getVariant(),{label:this.label}))}getVariant(){return`${this.color}${this.bold?"-bold":""}`}async componentWillLoad(){t(this.root),this.i18n=await g(this.root,r)}render(){return o("div",{class:{"gux-badge":!0,[`gux-${this.color}`]:!0,[`gux-${this.accent}`]:!0,"gux-bold":this.bold}},this.renderBadgeTitle(),this.renderSrText())}get root(){return l(this)}};a.style=":host{display:inline-block;height:fit-content;border-radius:100%}.gux-badge{display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:center;justify-content:flex-start;height:20px;padding:2px 8px;color:#fdfdfd;background-color:#2e394c;border-radius:4px;font-family:Roboto, sans-serif;font-weight:400;font-weight:700;font-size:12px;line-height:16px}.gux-badge gux-tooltip-title{white-space:nowrap}.gux-badge gux-tooltip-title ::slotted(gux-icon){height:16px;font-size:16px}.gux-badge .gux-sr-only:not(:focus):not(:active){position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}.gux-badge.gux-info,.gux-badge.gux-neutral{color:#2e394c;background-color:#e2e6ee}.gux-badge.gux-info.gux-bold,.gux-badge.gux-neutral.gux-bold{color:#fdfdfd;background-color:#2e394c}.gux-badge.gux-error,.gux-badge.gux-red{color:#8f0707;background-color:#fceaea}.gux-badge.gux-error.gux-bold,.gux-badge.gux-red.gux-bold{color:#fdfdfd;background-color:#ea0b0b}.gux-badge.gux-warning,.gux-badge.gux-yellow{color:#976700;background-color:#fdf8ec}.gux-badge.gux-warning.gux-bold,.gux-badge.gux-yellow.gux-bold{color:#2e394c;background-color:#ffae00}.gux-badge.gux-success,.gux-badge.gux-green{color:#205a10;background-color:#eefcea}.gux-badge.gux-success.gux-bold,.gux-badge.gux-green.gux-bold{color:#fdfdfd;background-color:#3c8527}.gux-badge.gux-inherit{color:inherit;background-color:inherit}";export{a as gux_badge_beta}
1
+ import{r as e,h as o,g as l}from"./p-7d26b2e1.js";import{t}from"./p-0db3479d.js";import{b as g}from"./p-deee079e.js";import"./p-8a133b9b.js";const r={neutral:"badge with label: {label}, color: neutral","neutral-bold":"badge with label: {label}, color: neutral bold",green:"badge with label: {label}, color: green","green-bold":"badge with label: {label}, color: green bold",yellow:"badge with label: {label}, color: yellow","yellow-bold":"badge with label: {label}, color: yellow bold",red:"badge with label: {label}, color: red","red-bold":"badge with label: {label}, color: red bold",inherit:"badge with label: {label}"},a=class{constructor(o){e(this,o),this.color="neutral",this.accent="info",this.bold=!1,this.label=void 0}onSlotChange(e){const o=e.composedPath()[0].assignedNodes();this.label=o.map((e=>e.textContent)).join("")}renderBadgeTitle(){return o("gux-tooltip-title",null,o("span",null,o("slot",{"aria-hidden":"true",onSlotchange:this.onSlotChange.bind(this)})))}renderSrText(){return o("div",{class:"gux-sr-only"},this.i18n(this.getVariant(),{label:this.label}))}getVariant(){return`${this.color}${this.bold?"-bold":""}`}async componentWillLoad(){t(this.root),this.i18n=await g(this.root,r)}render(){return o("div",{class:{"gux-badge":!0,[`gux-${this.color}`]:!0,[`gux-${this.accent}`]:!0,"gux-bold":this.bold}},this.renderBadgeTitle(),this.renderSrText())}get root(){return l(this)}};a.style=":host{display:inline-block;height:fit-content;border-radius:100%}.gux-badge{display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:center;justify-content:flex-start;height:20px;padding:2px 8px;color:#fdfdfd;background-color:#2e394c;border-radius:4px;font-family:Roboto, sans-serif;font-weight:400;font-weight:700;font-size:12px;line-height:16px}.gux-badge gux-tooltip-title{white-space:nowrap}.gux-badge gux-tooltip-title ::slotted(gux-icon){height:16px;font-size:16px}.gux-badge .gux-sr-only:not(:focus):not(:active){position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}.gux-badge.gux-info,.gux-badge.gux-neutral{color:#2e394c;background-color:#e2e6ee}.gux-badge.gux-info.gux-bold,.gux-badge.gux-neutral.gux-bold{color:#fdfdfd;background-color:#2e394c}.gux-badge.gux-error,.gux-badge.gux-red{color:#8f0707;background-color:#fceaea}.gux-badge.gux-error.gux-bold,.gux-badge.gux-red.gux-bold{color:#fdfdfd;background-color:#ea0b0b}.gux-badge.gux-warning,.gux-badge.gux-yellow{color:#976700;background-color:#fdf8ec}.gux-badge.gux-warning.gux-bold,.gux-badge.gux-yellow.gux-bold{color:#2e394c;background-color:#ffae00}.gux-badge.gux-success,.gux-badge.gux-green{color:#205a10;background-color:#eefcea}.gux-badge.gux-success.gux-bold,.gux-badge.gux-green.gux-bold{color:#fdfdfd;background-color:#3c8527}.gux-badge.gux-inherit{color:inherit;background-color:inherit}";export{a as gux_badge_beta}
@@ -1 +1 @@
1
- import{r as t,c as e,h as n,g as a}from"./p-7d26b2e1.js";import{a as s}from"./p-091f51f6.js";import{a as i,c as r,b as o,f as d}from"./p-4f26144b.js";import{t as h}from"./p-7ec9a1e2.js";import{g as l,a as c}from"./p-deee079e.js";import{c as u}from"./p-251befef.js";import"./p-8a133b9b.js";function g(t,e){x(t,"remove",e)}function x(t=[],e,n){const a=[].concat(t);for(const t of a)t.classList[e](n)}function b(t,e){return u(t.toLocaleDateString(e,{year:"numeric",month:"long"}))}const f=class{constructor(n){t(this,n),this.calendarSelect=e(this,"calendarSelect",7),this.locale="en",this.value="",this.minDate="",this.maxDate="",this.mode="single",this.numberOfMonths=1,this.startDayOfWeek=void 0,this.previewValue=new Date,this.selectingDate=null}emitCalendarSelect(){this.calendarSelect.emit(this.value)}async setValue(t){if("range"===this.mode&&t instanceof Array){const[e,n]=t;this.value=i(e,n),this.previewValue=r(this.value)[0]}else{const e=t;this.value=o(e),this.previewValue=e}}async focusPreviewDate(){const t=this.root.shadowRoot.querySelector(`td[data-date="${this.previewValue.getTime()}"]`);t&&t.focus()}async resetCalendarView(t){this.previewValue=t}incrementPreviewDateByMonth(t){this.previewValue=new Date(this.previewValue.getFullYear(),this.previewValue.getMonth()+t,15,0,0,0),s((()=>{this.focusPreviewDate()}))}async setValueAndEmit(t){await this.setValue(t),this.emitCalendarSelect()}outOfBounds(t){return""!==this.maxDate&&d(this.maxDate)<t||""!==this.minDate&&d(this.minDate)>t}generateDatesFrom(t,e,n){const a=[],s=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0);for(let e=0;e<n;e++){const e=new Date(s.getFullYear(),s.getMonth(),s.getDate(),0,0,0,0),n=[];let i=!1,o=!1;e.getMonth()!==t&&(n.push("gux-not-in-month"),i=!0,"range"===this.mode&&(n.push("gux-hidden"),o=!0)),this.outOfBounds(e)&&(n.push("gux-disabled"),i=!0);let h=!1;if("range"===this.mode){const[t,a]=r(this.value),s=t.getTime(),i=a.getTime();e.getTime()===s?(h=!0,n.push("gux-selected"),n.push("gux-start-date")):e.getTime()===i&&(h=!0,n.push("gux-selected"),n.push("gux-end-date"))}else{const t=d(this.value).getTime();e.getTime()===t&&(h=!0,n.push("gux-selected"))}a.push({class:n.join(" "),date:e,hidden:o,disabled:i,selected:h}),s.setDate(s.getDate()+1)}return a}create2DArray(t,e){const n=[];for(let a=0;a<e-1;a++){const s=t.slice(a*e,a*e+e);this.weekShouldBeDisplayed(s)&&n.push(s)}return n}isFocusableDate(t){return t.selected||this.previewValue.getTime()===t.date.getTime()}weekShouldBeDisplayed(t){const e=t.find((t=>!t.hidden));return t.length&&!!e}getMonthDays(t){const e=new Date(this.previewValue.getTime());e.setDate(1),e.setMonth(e.getMonth()+t);const n=e.getMonth(),a=function(t,e,n){const a=new Date(e,t,1,1,0,0,0),s=-1*(n-a.getDay()-7)%7;return new Date(a.getTime()-864e5*s)}(n,e.getFullYear(),this.startDayOfWeek),s=this.generateDatesFrom(n,a,42);return this.create2DArray(s,7)}addDays(t,e){const n=new Date(t.valueOf());return n.setDate(n.getDate()+e),n}getAllDatesElements(){const t=this.root.shadowRoot.querySelectorAll("td");return Array.from(t)}getAllSelectableDatesElements(){const t=this.root.shadowRoot.querySelectorAll('td[tabindex="0"]');return Array.from(t)}getRangeDatesElements(t,e){const n=[];let a;a=e<t?this.getRangeDates(e,t):this.getRangeDates(t,e);for(const t of a){const e=this.root.shadowRoot.querySelector(`td[data-date="${t.getTime()}"]:not(.gux-hidden)`);e&&n.push(e)}return n}getRangeDates(t,e){const n=[];let a=t;for(;a<=e;)n.push(new Date(a)),a=this.addDays(a,1);return n}async onDateClick(t){if(!this.outOfBounds(t))if("range"!==this.mode)await this.setValueAndEmit(t);else if(null===this.selectingDate)g(this.getAllDatesElements(),"gux-hovered"),this.selectingDate=new Date(t.valueOf()),this.value=i(t,t);else{const e=this.root.shadowRoot.querySelector(`td[data-date="${t.getTime()}"]`);e&&e.classList.add("gux-selected"),this.updateRangeElements(),await this.setValueAndEmit([this.selectingDate,t]),this.previewValue=t,this.selectingDate=null}}onDateMouseEnter(t){"range"===this.mode&&null!==this.selectingDate&&(this.value=i(t,this.selectingDate),this.updateRangeElements())}updateRangeElements(){if("range"===this.mode){g(this.getAllDatesElements(),"gux-hovered");const[t,e]=r(this.value);x(this.getRangeDatesElements(t,e),"add","gux-hovered")}}async onKeyDown(t){switch(t.key){case" ":case"Enter":t.preventDefault(),await this.onDateClick(this.previewValue);break;case"ArrowDown":t.preventDefault(),this.previewValue=new Date(this.previewValue.setDate(this.previewValue.getDate()+7)),this.onDateMouseEnter(this.previewValue),s((()=>{this.focusPreviewDate()}));break;case"ArrowUp":t.preventDefault(),this.previewValue=new Date(this.previewValue.setDate(this.previewValue.getDate()-7)),this.onDateMouseEnter(this.previewValue),s((()=>{this.focusPreviewDate()}));break;case"ArrowLeft":t.preventDefault(),this.previewValue=new Date(this.previewValue.setDate(this.previewValue.getDate()-1)),this.onDateMouseEnter(this.previewValue),s((()=>{this.focusPreviewDate()}));break;case"ArrowRight":t.preventDefault(),this.previewValue=new Date(this.previewValue.setDate(this.previewValue.getDate()+1)),this.onDateMouseEnter(this.previewValue),s((()=>{this.focusPreviewDate()}));break;case"PageUp":this.incrementPreviewDateByMonth(1),this.onDateMouseEnter(this.previewValue);break;case"PageDown":this.incrementPreviewDateByMonth(-1),this.onDateMouseEnter(this.previewValue)}}componentWillLoad(){if(h(this.root,{variant:this.mode}),this.locale=l(this.root),this.startDayOfWeek=this.startDayOfWeek||c(this.locale),!this.value){const t=new Date;t.setHours(0,0,0,0),this.value="range"===this.mode?i(t,t):o(t)}this.previewValue=d(this.value)}componentDidRender(){this.updateRangeElements()}renderMonthHeader(){return n("div",{class:"gux-month-list"},Array.from(Array(this.numberOfMonths).keys()).map((t=>{const e=function(t,e){const n=new Date(t);return n.setDate(1),n.setMonth(n.getMonth()+e),n}(this.previewValue,t);return n("label",null,b(e,this.locale))})))}renderCalendarTable(t){return n("table",null,n("tr",null,function(t,e){const n=[],a=new Date(1970,0,4);for(let e=0;e<7;e++){const e=a.toLocaleString(t,{weekday:"narrow"});n.push(e),a.setDate(a.getDate()+1)}return(s=n).concat(s.splice(0,(i=e)>s.length?i%s.length:i));var s,i}(this.locale,this.startDayOfWeek).map((t=>n("th",null,t)))),this.getMonthDays(t).map((t=>n("tr",null,t.map((t=>n("td",{tabindex:this.isFocusableDate(t)?"0":"-1",class:t.class,"aria-hidden":t.hidden?"true":"false","aria-disabled":t.disabled?"true":"false","data-date":t.date.getTime(),onClick:()=>{this.onDateClick(t.date)},onMouseEnter:()=>this.onDateMouseEnter(t.date),onKeyDown:t=>{this.onKeyDown(t)}},t.date.getDate(),n("span",{class:"gux-sr-only"},b(t.date,this.locale)))))))))}render(){return n("div",{class:"gux-calendar"},n("div",{class:"gux-header"},n("button",{type:"button",class:"gux-left",onClick:()=>this.incrementPreviewDateByMonth(-1),tabindex:"-1","aria-hidden":"true"},n("gux-icon",{decorative:!0,"icon-name":"chevron-small-left"})),this.renderMonthHeader(),n("button",{type:"button",class:"gux-right",onClick:()=>this.incrementPreviewDateByMonth(1),tabindex:"-1","aria-hidden":"true"},n("gux-icon",{decorative:!0,"icon-name":"chevron-small-right"}))),n("div",{class:"gux-content"},Array.from(Array(this.numberOfMonths).keys()).map((t=>this.renderCalendarTable(t)))))}get root(){return a(this)}};f.style=":host{display:inline-block}.gux-calendar{margin-top:2px;border:1px solid #b4bccb;border-radius:4px}.gux-calendar .gux-header{position:relative;display:flex;align-items:center;justify-content:space-between;height:16px;padding:16px;color:#fdfdfd;background-color:#2a60c8;border-top-left-radius:3px;border-top-right-radius:3px}.gux-calendar .gux-header button{position:absolute;padding:5px;color:#fdfdfd;cursor:pointer;background:none;border:none;outline:none}.gux-calendar .gux-header button:focus-visible{outline:#75a8ff auto 5px}.gux-calendar .gux-header button.gux-left{left:18px}.gux-calendar .gux-header button.gux-right{right:18px}.gux-calendar .gux-header button gux-icon{width:16px;height:16px;pointer-events:none}.gux-calendar .gux-header .gux-month-list{display:flex;justify-content:space-between;width:100%}.gux-calendar .gux-header .gux-month-list label{width:100%;text-align:center;font-size:12px;line-height:20px;font-family:Roboto, sans-serif;font-weight:400;font-weight:700}.gux-calendar .gux-content{display:flex;align-items:flex-start;padding:20px 24px;color:#2e394c;background-color:#fdfdfd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.gux-calendar .gux-content table{width:168px;text-align:left;table-layout:fixed;border-spacing:0;-ms-user-select:none;user-select:none}.gux-calendar .gux-content table:not(:last-child){padding-right:24px}.gux-calendar .gux-content table tr{height:28px}.gux-calendar .gux-content table tr:empty{display:none}.gux-calendar .gux-content table tr th,.gux-calendar .gux-content table tr td{width:28px;height:28px;padding:0;margin:0;text-align:center;font-family:Roboto, sans-serif;font-weight:400;font-size:12px;line-height:20px}.gux-calendar .gux-content table tr th{font-family:Roboto, sans-serif;font-weight:400;font-weight:700}.gux-calendar .gux-content table tr td{cursor:pointer}.gux-calendar .gux-content table tr td.gux-hovered{background-color:#deeaff}.gux-calendar .gux-content table tr td.gux-selected{color:#fdfdfd;background-color:#2a60c8;border-radius:4px}.gux-calendar .gux-content table tr td.gux-selected.gux-start-date{border-radius:4px 0 0 4px}.gux-calendar .gux-content table tr td.gux-selected.gux-end-date{border-radius:0 4px 4px 0}.gux-calendar .gux-content table tr td:hover:not(.gux-calendar .gux-content table tr td.gux-start-date):not(.gux-calendar .gux-content table tr td.gux-end-date){color:#fdfdfd;background-color:#2a60c8;border-radius:4px}.gux-calendar .gux-content table tr td.gux-disabled{color:rgba(46, 57, 76, 0.5);pointer-events:none}.gux-calendar .gux-content table tr td.gux-not-in-month{color:rgba(107, 117, 133, 0.5)}.gux-calendar .gux-content table tr td.gux-not-in-month:hover{color:#2e394c;background-color:#e2e6ee}.gux-calendar .gux-content table tr td.gux-not-in-month.gux-hidden{visibility:hidden}.gux-sr-only{position:absolute;top:auto;left:-10000px;width:1px;height:1px;overflow:hidden}";export{f as gux_calendar}
1
+ import{r as t,c as e,h as n,g as a}from"./p-7d26b2e1.js";import{a as s}from"./p-091f51f6.js";import{a as i,c as r,b as o,f as d}from"./p-4f26144b.js";import{t as h}from"./p-0db3479d.js";import{g as l,a as c}from"./p-deee079e.js";import{c as u}from"./p-251befef.js";import"./p-8a133b9b.js";function g(t,e){x(t,"remove",e)}function x(t=[],e,n){const a=[].concat(t);for(const t of a)t.classList[e](n)}function b(t,e){return u(t.toLocaleDateString(e,{year:"numeric",month:"long"}))}const f=class{constructor(n){t(this,n),this.calendarSelect=e(this,"calendarSelect",7),this.locale="en",this.value="",this.minDate="",this.maxDate="",this.mode="single",this.numberOfMonths=1,this.startDayOfWeek=void 0,this.previewValue=new Date,this.selectingDate=null}emitCalendarSelect(){this.calendarSelect.emit(this.value)}async setValue(t){if("range"===this.mode&&t instanceof Array){const[e,n]=t;this.value=i(e,n),this.previewValue=r(this.value)[0]}else{const e=t;this.value=o(e),this.previewValue=e}}async focusPreviewDate(){const t=this.root.shadowRoot.querySelector(`td[data-date="${this.previewValue.getTime()}"]`);t&&t.focus()}async resetCalendarView(t){this.previewValue=t}incrementPreviewDateByMonth(t){this.previewValue=new Date(this.previewValue.getFullYear(),this.previewValue.getMonth()+t,15,0,0,0),s((()=>{this.focusPreviewDate()}))}async setValueAndEmit(t){await this.setValue(t),this.emitCalendarSelect()}outOfBounds(t){return""!==this.maxDate&&d(this.maxDate)<t||""!==this.minDate&&d(this.minDate)>t}generateDatesFrom(t,e,n){const a=[],s=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0);for(let e=0;e<n;e++){const e=new Date(s.getFullYear(),s.getMonth(),s.getDate(),0,0,0,0),n=[];let i=!1,o=!1;e.getMonth()!==t&&(n.push("gux-not-in-month"),i=!0,"range"===this.mode&&(n.push("gux-hidden"),o=!0)),this.outOfBounds(e)&&(n.push("gux-disabled"),i=!0);let h=!1;if("range"===this.mode){const[t,a]=r(this.value),s=t.getTime(),i=a.getTime();e.getTime()===s?(h=!0,n.push("gux-selected"),n.push("gux-start-date")):e.getTime()===i&&(h=!0,n.push("gux-selected"),n.push("gux-end-date"))}else{const t=d(this.value).getTime();e.getTime()===t&&(h=!0,n.push("gux-selected"))}a.push({class:n.join(" "),date:e,hidden:o,disabled:i,selected:h}),s.setDate(s.getDate()+1)}return a}create2DArray(t,e){const n=[];for(let a=0;a<e-1;a++){const s=t.slice(a*e,a*e+e);this.weekShouldBeDisplayed(s)&&n.push(s)}return n}isFocusableDate(t){return t.selected||this.previewValue.getTime()===t.date.getTime()}weekShouldBeDisplayed(t){const e=t.find((t=>!t.hidden));return t.length&&!!e}getMonthDays(t){const e=new Date(this.previewValue.getTime());e.setDate(1),e.setMonth(e.getMonth()+t);const n=e.getMonth(),a=function(t,e,n){const a=new Date(e,t,1,1,0,0,0),s=-1*(n-a.getDay()-7)%7;return new Date(a.getTime()-864e5*s)}(n,e.getFullYear(),this.startDayOfWeek),s=this.generateDatesFrom(n,a,42);return this.create2DArray(s,7)}addDays(t,e){const n=new Date(t.valueOf());return n.setDate(n.getDate()+e),n}getAllDatesElements(){const t=this.root.shadowRoot.querySelectorAll("td");return Array.from(t)}getAllSelectableDatesElements(){const t=this.root.shadowRoot.querySelectorAll('td[tabindex="0"]');return Array.from(t)}getRangeDatesElements(t,e){const n=[];let a;a=e<t?this.getRangeDates(e,t):this.getRangeDates(t,e);for(const t of a){const e=this.root.shadowRoot.querySelector(`td[data-date="${t.getTime()}"]:not(.gux-hidden)`);e&&n.push(e)}return n}getRangeDates(t,e){const n=[];let a=t;for(;a<=e;)n.push(new Date(a)),a=this.addDays(a,1);return n}async onDateClick(t){if(!this.outOfBounds(t))if("range"!==this.mode)await this.setValueAndEmit(t);else if(null===this.selectingDate)g(this.getAllDatesElements(),"gux-hovered"),this.selectingDate=new Date(t.valueOf()),this.value=i(t,t);else{const e=this.root.shadowRoot.querySelector(`td[data-date="${t.getTime()}"]`);e&&e.classList.add("gux-selected"),this.updateRangeElements(),await this.setValueAndEmit([this.selectingDate,t]),this.previewValue=t,this.selectingDate=null}}onDateMouseEnter(t){"range"===this.mode&&null!==this.selectingDate&&(this.value=i(t,this.selectingDate),this.updateRangeElements())}updateRangeElements(){if("range"===this.mode){g(this.getAllDatesElements(),"gux-hovered");const[t,e]=r(this.value);x(this.getRangeDatesElements(t,e),"add","gux-hovered")}}async onKeyDown(t){switch(t.key){case" ":case"Enter":t.preventDefault(),await this.onDateClick(this.previewValue);break;case"ArrowDown":t.preventDefault(),this.previewValue=new Date(this.previewValue.setDate(this.previewValue.getDate()+7)),this.onDateMouseEnter(this.previewValue),s((()=>{this.focusPreviewDate()}));break;case"ArrowUp":t.preventDefault(),this.previewValue=new Date(this.previewValue.setDate(this.previewValue.getDate()-7)),this.onDateMouseEnter(this.previewValue),s((()=>{this.focusPreviewDate()}));break;case"ArrowLeft":t.preventDefault(),this.previewValue=new Date(this.previewValue.setDate(this.previewValue.getDate()-1)),this.onDateMouseEnter(this.previewValue),s((()=>{this.focusPreviewDate()}));break;case"ArrowRight":t.preventDefault(),this.previewValue=new Date(this.previewValue.setDate(this.previewValue.getDate()+1)),this.onDateMouseEnter(this.previewValue),s((()=>{this.focusPreviewDate()}));break;case"PageUp":this.incrementPreviewDateByMonth(1),this.onDateMouseEnter(this.previewValue);break;case"PageDown":this.incrementPreviewDateByMonth(-1),this.onDateMouseEnter(this.previewValue)}}componentWillLoad(){if(h(this.root,{variant:this.mode}),this.locale=l(this.root),this.startDayOfWeek=this.startDayOfWeek||c(this.locale),!this.value){const t=new Date;t.setHours(0,0,0,0),this.value="range"===this.mode?i(t,t):o(t)}this.previewValue=d(this.value)}componentDidRender(){this.updateRangeElements()}renderMonthHeader(){return n("div",{class:"gux-month-list"},Array.from(Array(this.numberOfMonths).keys()).map((t=>{const e=function(t,e){const n=new Date(t);return n.setDate(1),n.setMonth(n.getMonth()+e),n}(this.previewValue,t);return n("label",null,b(e,this.locale))})))}renderCalendarTable(t){return n("table",null,n("tr",null,function(t,e){const n=[],a=new Date(1970,0,4);for(let e=0;e<7;e++){const e=a.toLocaleString(t,{weekday:"narrow"});n.push(e),a.setDate(a.getDate()+1)}return(s=n).concat(s.splice(0,(i=e)>s.length?i%s.length:i));var s,i}(this.locale,this.startDayOfWeek).map((t=>n("th",null,t)))),this.getMonthDays(t).map((t=>n("tr",null,t.map((t=>n("td",{tabindex:this.isFocusableDate(t)?"0":"-1",class:t.class,"aria-hidden":t.hidden?"true":"false","aria-disabled":t.disabled?"true":"false","data-date":t.date.getTime(),onClick:()=>{this.onDateClick(t.date)},onMouseEnter:()=>this.onDateMouseEnter(t.date),onKeyDown:t=>{this.onKeyDown(t)}},t.date.getDate(),n("span",{class:"gux-sr-only"},b(t.date,this.locale)))))))))}render(){return n("div",{class:"gux-calendar"},n("div",{class:"gux-header"},n("button",{type:"button",class:"gux-left",onClick:()=>this.incrementPreviewDateByMonth(-1),tabindex:"-1","aria-hidden":"true"},n("gux-icon",{decorative:!0,"icon-name":"chevron-small-left"})),this.renderMonthHeader(),n("button",{type:"button",class:"gux-right",onClick:()=>this.incrementPreviewDateByMonth(1),tabindex:"-1","aria-hidden":"true"},n("gux-icon",{decorative:!0,"icon-name":"chevron-small-right"}))),n("div",{class:"gux-content"},Array.from(Array(this.numberOfMonths).keys()).map((t=>this.renderCalendarTable(t)))))}get root(){return a(this)}};f.style=":host{display:inline-block}.gux-calendar{margin-top:2px;border:1px solid #b4bccb;border-radius:4px}.gux-calendar .gux-header{position:relative;display:flex;align-items:center;justify-content:space-between;height:16px;padding:16px;color:#fdfdfd;background-color:#2a60c8;border-top-left-radius:3px;border-top-right-radius:3px}.gux-calendar .gux-header button{position:absolute;padding:5px;color:#fdfdfd;cursor:pointer;background:none;border:none;outline:none}.gux-calendar .gux-header button:focus-visible{outline:#75a8ff auto 5px}.gux-calendar .gux-header button.gux-left{left:18px}.gux-calendar .gux-header button.gux-right{right:18px}.gux-calendar .gux-header button gux-icon{width:16px;height:16px;pointer-events:none}.gux-calendar .gux-header .gux-month-list{display:flex;justify-content:space-between;width:100%}.gux-calendar .gux-header .gux-month-list label{width:100%;text-align:center;font-size:12px;line-height:20px;font-family:Roboto, sans-serif;font-weight:400;font-weight:700}.gux-calendar .gux-content{display:flex;align-items:flex-start;padding:20px 24px;color:#2e394c;background-color:#fdfdfd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.gux-calendar .gux-content table{width:168px;text-align:left;table-layout:fixed;border-spacing:0;-ms-user-select:none;user-select:none}.gux-calendar .gux-content table:not(:last-child){padding-right:24px}.gux-calendar .gux-content table tr{height:28px}.gux-calendar .gux-content table tr:empty{display:none}.gux-calendar .gux-content table tr th,.gux-calendar .gux-content table tr td{width:28px;height:28px;padding:0;margin:0;text-align:center;font-family:Roboto, sans-serif;font-weight:400;font-size:12px;line-height:20px}.gux-calendar .gux-content table tr th{font-family:Roboto, sans-serif;font-weight:400;font-weight:700}.gux-calendar .gux-content table tr td{cursor:pointer}.gux-calendar .gux-content table tr td.gux-hovered{background-color:#deeaff}.gux-calendar .gux-content table tr td.gux-selected{color:#fdfdfd;background-color:#2a60c8;border-radius:4px}.gux-calendar .gux-content table tr td.gux-selected.gux-start-date{border-radius:4px 0 0 4px}.gux-calendar .gux-content table tr td.gux-selected.gux-end-date{border-radius:0 4px 4px 0}.gux-calendar .gux-content table tr td:hover:not(.gux-calendar .gux-content table tr td.gux-start-date):not(.gux-calendar .gux-content table tr td.gux-end-date){color:#fdfdfd;background-color:#2a60c8;border-radius:4px}.gux-calendar .gux-content table tr td.gux-disabled{color:rgba(46, 57, 76, 0.5);pointer-events:none}.gux-calendar .gux-content table tr td.gux-not-in-month{color:rgba(107, 117, 133, 0.5)}.gux-calendar .gux-content table tr td.gux-not-in-month:hover{color:#2e394c;background-color:#e2e6ee}.gux-calendar .gux-content table tr td.gux-not-in-month.gux-hidden{visibility:hidden}.gux-sr-only{position:absolute;top:auto;left:-10000px;width:1px;height:1px;overflow:hidden}";export{f as gux_calendar}