genesys-spark-components 4.0.0-beta.23 → 4.0.0-beta.24

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 (268) hide show
  1. package/dist/cjs/genesys-webcomponents.cjs.js +1 -1
  2. package/dist/cjs/gux-accordion.cjs.entry.js +1 -1
  3. package/dist/cjs/gux-action-button.cjs.entry.js +2 -2
  4. package/dist/cjs/gux-action-toast-legacy.cjs.entry.js +1 -1
  5. package/dist/cjs/gux-advanced-dropdown.cjs.entry.js +1 -1
  6. package/dist/cjs/gux-announce-beta.cjs.entry.js +1 -1
  7. package/dist/cjs/gux-badge.cjs.entry.js +68 -0
  8. package/dist/cjs/gux-blank-state-beta.cjs.entry.js +1 -1
  9. package/dist/cjs/gux-breadcrumbs.cjs.entry.js +1 -1
  10. package/dist/cjs/gux-button-multi.cjs.entry.js +1 -1
  11. package/dist/cjs/gux-button-slot.cjs.entry.js +1 -1
  12. package/dist/cjs/gux-button.cjs.entry.js +1 -1
  13. package/dist/cjs/gux-calendar.cjs.entry.js +1 -1
  14. package/dist/cjs/gux-card.cjs.entry.js +1 -1
  15. package/dist/cjs/gux-column-manager-beta.cjs.entry.js +1 -1
  16. package/dist/cjs/gux-content-search.cjs.entry.js +1 -1
  17. package/dist/cjs/gux-context-menu-beta.cjs.entry.js +1 -1
  18. package/dist/cjs/gux-copy-to-clipboard.cjs.entry.js +1 -1
  19. package/dist/cjs/gux-date-beta.cjs.entry.js +1 -1
  20. package/dist/cjs/gux-date-time-beta.cjs.entry.js +1 -1
  21. package/dist/cjs/gux-datepicker.cjs.entry.js +1 -1
  22. package/dist/cjs/gux-disclosure-button-legacy.cjs.entry.js +1 -1
  23. package/dist/cjs/gux-dismiss-button.cjs.entry.js +1 -1
  24. package/dist/cjs/gux-dropdown-multi-beta.cjs.entry.js +1 -1
  25. package/dist/cjs/gux-dropdown_3.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.cjs.entry.js +1 -1
  54. package/dist/cjs/gux-popup.cjs.entry.js +19 -9
  55. package/dist/cjs/gux-radial-loading.cjs.entry.js +1 -1
  56. package/dist/cjs/gux-radial-progress.cjs.entry.js +1 -1
  57. package/dist/cjs/gux-rating.cjs.entry.js +1 -1
  58. package/dist/cjs/gux-region-icon.cjs.entry.js +1 -1
  59. package/dist/cjs/gux-screen-reader-beta.cjs.entry.js +1 -1
  60. package/dist/cjs/gux-simple-toast-legacy.cjs.entry.js +1 -1
  61. package/dist/cjs/gux-skip-navigation-list-beta.cjs.entry.js +1 -1
  62. package/dist/cjs/gux-sort-control.cjs.entry.js +1 -1
  63. package/dist/cjs/gux-switch.cjs.entry.js +1 -1
  64. package/dist/cjs/gux-table-toolbar-action.cjs.entry.js +1 -1
  65. package/dist/cjs/gux-table-toolbar-custom-action.cjs.entry.js +1 -1
  66. package/dist/cjs/gux-table-toolbar-menu-button.cjs.entry.js +1 -1
  67. package/dist/cjs/gux-table-toolbar.cjs.entry.js +1 -1
  68. package/dist/cjs/gux-table.cjs.entry.js +1 -1
  69. package/dist/cjs/gux-tabs-advanced.cjs.entry.js +1 -1
  70. package/dist/cjs/gux-tabs.cjs.entry.js +1 -1
  71. package/dist/cjs/gux-tag-beta.cjs.entry.js +1 -1
  72. package/dist/cjs/gux-text-highlight.cjs.entry.js +1 -1
  73. package/dist/cjs/gux-time-beta.cjs.entry.js +1 -1
  74. package/dist/cjs/gux-time-picker.cjs.entry.js +1 -1
  75. package/dist/cjs/gux-time-zone-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/index-0d0fdb85.js +2 -2
  80. package/dist/cjs/loader.cjs.js +1 -1
  81. package/dist/cjs/{usage-4c4b807b.js → usage-350f4210.js} +1 -1
  82. package/dist/collection/collection-manifest.json +1 -1
  83. package/dist/collection/components/stable/gux-action-button/gux-action-button.css +1 -0
  84. package/dist/collection/components/stable/gux-badge/gux-badge.css +97 -0
  85. package/dist/collection/components/{beta → stable}/gux-badge/gux-badge.js +3 -28
  86. package/dist/collection/components/stable/gux-popup/gux-popup.css +1 -1
  87. package/dist/collection/components/stable/gux-popup/gux-popup.js +14 -8
  88. package/dist/collection/utils/dom/has-parent-element.js +4 -0
  89. package/dist/component-specs.json +14 -21
  90. package/dist/deploy-info.json +3 -3
  91. package/dist/esm/genesys-webcomponents.js +1 -1
  92. package/dist/esm/gux-accordion.entry.js +1 -1
  93. package/dist/esm/gux-action-button.entry.js +2 -2
  94. package/dist/esm/gux-action-toast-legacy.entry.js +1 -1
  95. package/dist/esm/gux-advanced-dropdown.entry.js +1 -1
  96. package/dist/esm/gux-announce-beta.entry.js +1 -1
  97. package/dist/esm/gux-badge.entry.js +64 -0
  98. package/dist/esm/gux-blank-state-beta.entry.js +1 -1
  99. package/dist/esm/gux-breadcrumbs.entry.js +1 -1
  100. package/dist/esm/gux-button-multi.entry.js +1 -1
  101. package/dist/esm/gux-button-slot.entry.js +1 -1
  102. package/dist/esm/gux-button.entry.js +1 -1
  103. package/dist/esm/gux-calendar.entry.js +1 -1
  104. package/dist/esm/gux-card.entry.js +1 -1
  105. package/dist/esm/gux-column-manager-beta.entry.js +1 -1
  106. package/dist/esm/gux-content-search.entry.js +1 -1
  107. package/dist/esm/gux-context-menu-beta.entry.js +1 -1
  108. package/dist/esm/gux-copy-to-clipboard.entry.js +1 -1
  109. package/dist/esm/gux-date-beta.entry.js +1 -1
  110. package/dist/esm/gux-date-time-beta.entry.js +1 -1
  111. package/dist/esm/gux-datepicker.entry.js +1 -1
  112. package/dist/esm/gux-disclosure-button-legacy.entry.js +1 -1
  113. package/dist/esm/gux-dismiss-button.entry.js +1 -1
  114. package/dist/esm/gux-dropdown-multi-beta.entry.js +1 -1
  115. package/dist/esm/gux-dropdown_3.entry.js +1 -1
  116. package/dist/esm/gux-flyout-menu-beta.entry.js +1 -1
  117. package/dist/esm/gux-form-field-checkbox.entry.js +1 -1
  118. package/dist/esm/gux-form-field-color.entry.js +1 -1
  119. package/dist/esm/gux-form-field-dropdown.entry.js +1 -1
  120. package/dist/esm/gux-form-field-input-clear-button.entry.js +1 -1
  121. package/dist/esm/gux-form-field-number_3.entry.js +1 -1
  122. package/dist/esm/gux-form-field-phone.entry.js +1 -1
  123. package/dist/esm/gux-form-field-radio.entry.js +1 -1
  124. package/dist/esm/gux-form-field-range.entry.js +1 -1
  125. package/dist/esm/gux-form-field-search.entry.js +1 -1
  126. package/dist/esm/gux-form-field-select.entry.js +1 -1
  127. package/dist/esm/gux-form-field-text-like.entry.js +1 -1
  128. package/dist/esm/gux-form-field-textarea.entry.js +1 -1
  129. package/dist/esm/gux-form-field-time-picker.entry.js +1 -1
  130. package/dist/esm/gux-icon.entry.js +1 -1
  131. package/dist/esm/gux-inline-alert.entry.js +1 -1
  132. package/dist/esm/gux-list.entry.js +1 -1
  133. package/dist/esm/gux-listbox-multi.entry.js +1 -1
  134. package/dist/esm/gux-loading-message-beta.entry.js +1 -1
  135. package/dist/esm/gux-modal.entry.js +1 -1
  136. package/dist/esm/gux-month-picker-beta.entry.js +1 -1
  137. package/dist/esm/gux-notification-toast-legacy.entry.js +1 -1
  138. package/dist/esm/gux-page-loading-spinner.entry.js +1 -1
  139. package/dist/esm/gux-pagination-beta.entry.js +1 -1
  140. package/dist/esm/gux-pagination-cursor.entry.js +1 -1
  141. package/dist/esm/gux-pagination.entry.js +1 -1
  142. package/dist/esm/gux-phone-input-beta.entry.js +1 -1
  143. package/dist/esm/gux-popover-list.entry.js +1 -1
  144. package/dist/esm/gux-popup.entry.js +20 -10
  145. package/dist/esm/gux-radial-loading.entry.js +1 -1
  146. package/dist/esm/gux-radial-progress.entry.js +1 -1
  147. package/dist/esm/gux-rating.entry.js +1 -1
  148. package/dist/esm/gux-region-icon.entry.js +1 -1
  149. package/dist/esm/gux-screen-reader-beta.entry.js +1 -1
  150. package/dist/esm/gux-simple-toast-legacy.entry.js +1 -1
  151. package/dist/esm/gux-skip-navigation-list-beta.entry.js +1 -1
  152. package/dist/esm/gux-sort-control.entry.js +1 -1
  153. package/dist/esm/gux-switch.entry.js +1 -1
  154. package/dist/esm/gux-table-toolbar-action.entry.js +1 -1
  155. package/dist/esm/gux-table-toolbar-custom-action.entry.js +1 -1
  156. package/dist/esm/gux-table-toolbar-menu-button.entry.js +1 -1
  157. package/dist/esm/gux-table-toolbar.entry.js +1 -1
  158. package/dist/esm/gux-table.entry.js +1 -1
  159. package/dist/esm/gux-tabs-advanced.entry.js +1 -1
  160. package/dist/esm/gux-tabs.entry.js +1 -1
  161. package/dist/esm/gux-tag-beta.entry.js +1 -1
  162. package/dist/esm/gux-text-highlight.entry.js +1 -1
  163. package/dist/esm/gux-time-beta.entry.js +1 -1
  164. package/dist/esm/gux-time-picker.entry.js +1 -1
  165. package/dist/esm/gux-time-zone-picker-beta.entry.js +1 -1
  166. package/dist/esm/gux-toast.entry.js +1 -1
  167. package/dist/esm/gux-toggle.entry.js +1 -1
  168. package/dist/esm/gux-tooltip.entry.js +1 -1
  169. package/dist/esm/index-0b66fe2c.js +2 -2
  170. package/dist/esm/loader.js +1 -1
  171. package/dist/esm/{usage-9ca50bf0.js → usage-144bdf70.js} +1 -1
  172. package/dist/genesys-webcomponents/genesys-webcomponents.esm.js +1 -1
  173. package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.en.json +1 -1
  174. package/dist/genesys-webcomponents/{p-e21c88c6.entry.js → p-081aaf02.entry.js} +1 -1
  175. package/dist/genesys-webcomponents/{p-81697e5d.entry.js → p-149233e1.entry.js} +1 -1
  176. package/dist/genesys-webcomponents/{p-9b28f6e5.entry.js → p-152851c5.entry.js} +1 -1
  177. package/dist/genesys-webcomponents/{p-dd486f21.entry.js → p-16867376.entry.js} +1 -1
  178. package/dist/genesys-webcomponents/{p-ec8f3ed6.entry.js → p-186085f3.entry.js} +1 -1
  179. package/dist/genesys-webcomponents/p-1b35958d.entry.js +1 -0
  180. package/dist/genesys-webcomponents/{p-8634ab05.entry.js → p-1bcb53c0.entry.js} +1 -1
  181. package/dist/genesys-webcomponents/{p-3d288a53.entry.js → p-1cd54bb6.entry.js} +1 -1
  182. package/dist/genesys-webcomponents/{p-716b25a2.entry.js → p-2987698a.entry.js} +1 -1
  183. package/dist/genesys-webcomponents/p-2a1a57db.entry.js +1 -0
  184. package/dist/genesys-webcomponents/{p-ee832fca.entry.js → p-2abcbff8.entry.js} +1 -1
  185. package/dist/genesys-webcomponents/{p-4da16ea2.entry.js → p-2bc99e5e.entry.js} +1 -1
  186. package/dist/genesys-webcomponents/{p-9f283002.entry.js → p-2e256680.entry.js} +1 -1
  187. package/dist/genesys-webcomponents/{p-7f7700f8.entry.js → p-2eb21361.entry.js} +1 -1
  188. package/dist/genesys-webcomponents/{p-79ae493b.entry.js → p-37051105.entry.js} +1 -1
  189. package/dist/genesys-webcomponents/{p-38c0fd4a.entry.js → p-39af23ba.entry.js} +1 -1
  190. package/dist/genesys-webcomponents/{p-19480ff9.entry.js → p-3d6c91b4.entry.js} +1 -1
  191. package/dist/genesys-webcomponents/p-3f818cd5.entry.js +1 -0
  192. package/dist/genesys-webcomponents/{p-b99d7b24.entry.js → p-41787744.entry.js} +1 -1
  193. package/dist/genesys-webcomponents/{p-5f619019.entry.js → p-42151d14.entry.js} +1 -1
  194. package/dist/genesys-webcomponents/{p-462c9fec.entry.js → p-49219c0d.entry.js} +1 -1
  195. package/dist/genesys-webcomponents/{p-edc3984d.entry.js → p-4e40fb5f.entry.js} +1 -1
  196. package/dist/genesys-webcomponents/{p-f11bc2b4.entry.js → p-5058a2ee.entry.js} +1 -1
  197. package/dist/genesys-webcomponents/{p-4f13d871.entry.js → p-5b57fc5a.entry.js} +1 -1
  198. package/dist/genesys-webcomponents/{p-fc2a0c5e.entry.js → p-5f572ff5.entry.js} +1 -1
  199. package/dist/genesys-webcomponents/{p-5f191d17.entry.js → p-6128be0b.entry.js} +1 -1
  200. package/dist/genesys-webcomponents/{p-c99e8934.entry.js → p-6bfa78c6.entry.js} +1 -1
  201. package/dist/genesys-webcomponents/{p-3be60800.entry.js → p-70c20c25.entry.js} +1 -1
  202. package/dist/genesys-webcomponents/{p-a3031b43.entry.js → p-77dfb786.entry.js} +1 -1
  203. package/dist/genesys-webcomponents/{p-88382b4f.entry.js → p-7e13a157.entry.js} +1 -1
  204. package/dist/genesys-webcomponents/{p-d3660752.entry.js → p-7e1e6609.entry.js} +1 -1
  205. package/dist/genesys-webcomponents/{p-e03f3c2d.entry.js → p-8107bee0.entry.js} +1 -1
  206. package/dist/genesys-webcomponents/p-836fbb2a.entry.js +1 -0
  207. package/dist/genesys-webcomponents/{p-da061d56.entry.js → p-85bc7ce7.entry.js} +1 -1
  208. package/dist/genesys-webcomponents/{p-09c7bd7d.entry.js → p-8ccc45cf.entry.js} +1 -1
  209. package/dist/genesys-webcomponents/{p-3a986247.entry.js → p-8f21ff40.entry.js} +1 -1
  210. package/dist/genesys-webcomponents/{p-1c74c4a6.entry.js → p-91c445ab.entry.js} +1 -1
  211. package/dist/genesys-webcomponents/{p-fc52401d.entry.js → p-93380bce.entry.js} +1 -1
  212. package/dist/genesys-webcomponents/{p-f7f3443e.js → p-9bf0a4a8.js} +1 -1
  213. package/dist/genesys-webcomponents/{p-a7e96d41.entry.js → p-a0ec6dde.entry.js} +1 -1
  214. package/dist/genesys-webcomponents/{p-a1cc19f6.entry.js → p-a4cb7a4a.entry.js} +1 -1
  215. package/dist/genesys-webcomponents/{p-b4693bc7.entry.js → p-a6378d29.entry.js} +1 -1
  216. package/dist/genesys-webcomponents/{p-0dbe2bda.entry.js → p-a756279a.entry.js} +1 -1
  217. package/dist/genesys-webcomponents/{p-178b38f9.entry.js → p-a7c56dad.entry.js} +1 -1
  218. package/dist/genesys-webcomponents/{p-e97693fd.entry.js → p-a961cc5e.entry.js} +1 -1
  219. package/dist/genesys-webcomponents/{p-dad21962.entry.js → p-b279643a.entry.js} +1 -1
  220. package/dist/genesys-webcomponents/{p-255828b2.entry.js → p-b3443cf0.entry.js} +1 -1
  221. package/dist/genesys-webcomponents/{p-d58c9460.entry.js → p-b73e2256.entry.js} +1 -1
  222. package/dist/genesys-webcomponents/{p-db42a7bf.entry.js → p-b98dcf72.entry.js} +1 -1
  223. package/dist/genesys-webcomponents/{p-84a5cc38.entry.js → p-baffb252.entry.js} +1 -1
  224. package/dist/genesys-webcomponents/{p-fe1f8064.entry.js → p-bbc47467.entry.js} +1 -1
  225. package/dist/genesys-webcomponents/{p-699ef85a.entry.js → p-bd12e46f.entry.js} +1 -1
  226. package/dist/genesys-webcomponents/{p-6c3aae28.entry.js → p-beceeda9.entry.js} +1 -1
  227. package/dist/genesys-webcomponents/{p-42d1b629.entry.js → p-c0c7fcd1.entry.js} +1 -1
  228. package/dist/genesys-webcomponents/p-c744ed0d.entry.js +1 -0
  229. package/dist/genesys-webcomponents/{p-1d9ec2d1.entry.js → p-c7c4227b.entry.js} +1 -1
  230. package/dist/genesys-webcomponents/{p-b938e322.entry.js → p-c858bbf5.entry.js} +1 -1
  231. package/dist/genesys-webcomponents/{p-e01c28fb.entry.js → p-c8dcfd36.entry.js} +1 -1
  232. package/dist/genesys-webcomponents/{p-3c10fc14.entry.js → p-cc043796.entry.js} +1 -1
  233. package/dist/genesys-webcomponents/{p-240eeb1b.entry.js → p-cdf3db02.entry.js} +1 -1
  234. package/dist/genesys-webcomponents/{p-95b41d1b.entry.js → p-ce78c6a2.entry.js} +1 -1
  235. package/dist/genesys-webcomponents/{p-e183299b.entry.js → p-cf1b7653.entry.js} +1 -1
  236. package/dist/genesys-webcomponents/{p-1661e5b6.entry.js → p-d275077a.entry.js} +1 -1
  237. package/dist/genesys-webcomponents/{p-3f3c6c2a.entry.js → p-d5ff613a.entry.js} +1 -1
  238. package/dist/genesys-webcomponents/{p-22a997cc.entry.js → p-da6575df.entry.js} +1 -1
  239. package/dist/genesys-webcomponents/{p-ff22af71.entry.js → p-dc0581c4.entry.js} +1 -1
  240. package/dist/genesys-webcomponents/{p-e243ca18.entry.js → p-df279eda.entry.js} +1 -1
  241. package/dist/genesys-webcomponents/{p-594b1278.entry.js → p-df3db717.entry.js} +1 -1
  242. package/dist/genesys-webcomponents/{p-fbd24ad9.entry.js → p-e4aa7b47.entry.js} +1 -1
  243. package/dist/genesys-webcomponents/{p-edae4d63.entry.js → p-e4e980c4.entry.js} +1 -1
  244. package/dist/genesys-webcomponents/{p-50f614f4.entry.js → p-e55b3774.entry.js} +1 -1
  245. package/dist/genesys-webcomponents/{p-16b8dd4e.entry.js → p-e7b25ec5.entry.js} +1 -1
  246. package/dist/genesys-webcomponents/{p-d62084d4.entry.js → p-e8d9d006.entry.js} +1 -1
  247. package/dist/genesys-webcomponents/{p-97b6a427.entry.js → p-ece938b3.entry.js} +1 -1
  248. package/dist/genesys-webcomponents/{p-402f9293.entry.js → p-ee52283b.entry.js} +1 -1
  249. package/dist/genesys-webcomponents/{p-6b027844.entry.js → p-eef539ab.entry.js} +1 -1
  250. package/dist/genesys-webcomponents/{p-9dab5671.entry.js → p-f4dd0fd2.entry.js} +1 -1
  251. package/dist/genesys-webcomponents/{p-fc151bf0.entry.js → p-f7a14a12.entry.js} +1 -1
  252. package/dist/stencil-wrapper.js +1 -1
  253. package/dist/types/components/{beta → stable}/gux-badge/gux-badge.d.ts +1 -2
  254. package/dist/types/components/{beta → stable}/gux-badge/gux-badge.types.d.ts +0 -1
  255. package/dist/types/components/stable/gux-popup/gux-popup.d.ts +1 -0
  256. package/dist/types/components.d.ts +11 -13
  257. package/dist/types/stencil-wrapper.d.ts +1 -1
  258. package/dist/types/utils/dom/has-parent-element.d.ts +1 -0
  259. package/package.json +1 -1
  260. package/dist/cjs/gux-badge-beta.cjs.entry.js +0 -70
  261. package/dist/collection/components/beta/gux-badge/gux-badge.css +0 -83
  262. package/dist/esm/gux-badge-beta.entry.js +0 -66
  263. package/dist/genesys-webcomponents/p-1e4d9d6a.entry.js +0 -1
  264. package/dist/genesys-webcomponents/p-1f349619.entry.js +0 -1
  265. package/dist/genesys-webcomponents/p-416f5a28.entry.js +0 -1
  266. package/dist/genesys-webcomponents/p-c68e0fbf.entry.js +0 -1
  267. package/dist/genesys-webcomponents/p-cf271c9a.entry.js +0 -1
  268. /package/dist/collection/components/{beta → stable}/gux-badge/gux-badge.types.js +0 -0
@@ -1 +1 @@
1
- import{r as e,c as t,h as g,H as i,g as l}from"./p-7d26b2e1.js";import{t as o}from"./p-f7f3443e.js";import{r as a}from"./p-cbcbd1bb.js";import{b as n}from"./p-deee079e.js";import"./p-8a133b9b.js";const s={defaultAriaLabel:"Toggle Switch",toggleIsLoading:"Toggle is loading",toggleIsFinishedLoading:"Toggle is finished loading"},r=class{constructor(g){e(this,g),this.check=t(this,"check",7),this.labelId=a("gux-toggle-label"),this.errorId=a("gux-toggle-error"),this.checked=!1,this.disabled=!1,this.loading=!1,this.checkedLabel=void 0,this.uncheckedLabel=void 0,this.labelPosition="right",this.errorMessage=void 0,this.displayInline=!1}handleLoading(e){this.announceElement.guxAnnounce(this.i18n(e?"toggleIsLoading":"toggleIsFinishedLoading"))}onClick(){this.toggle()}onKeydown(e){switch(e.key){case"Enter":case" ":e.preventDefault(),this.toggle()}}toggle(){this.disabled||this.loading||this.check.emit(!this.checked).defaultPrevented||(this.checked=!this.checked)}getAriaLabel(){return this.root.getAttribute("aria-label")||this.root.title||this.i18n("defaultAriaLabel")}async componentWillLoad(){this.i18n=await n(this.root,s),o(this.root,{variant:this.checkedLabel||this.uncheckedLabel?"labled":"unlabled"})}renderLoading(){if(this.loading)return g("div",{class:"gux-toggle-label-loading"},g("gux-radial-loading",{context:"input"}))}renderLabel(){if(this.uncheckedLabel&&this.checkedLabel)return g("div",{class:"gux-toggle-label-and-error"},g("div",{class:"gux-toggle-label"},g("div",{class:"gux-toggle-label-text"},g("span",{class:"gux-toggle-label-text-inner"},g("span",{id:this.labelId},this.checked?this.checkedLabel:this.uncheckedLabel),this.renderLoading()),g("span",{class:"gux-toggle-label-text-inner gux-hidden"},this.checkedLabel),g("span",{class:"gux-toggle-label-text-inner gux-hidden"},this.uncheckedLabel))))}renderError(){if(this.errorMessage)return g("div",{id:this.errorId,class:"gux-toggle-error"},g("div",{class:"gux-toggle-error-container"},g("gux-icon",{"icon-name":"alert-warning-octogon",decorative:!0}),g("div",{class:"gux-toggle-error-message"},this.errorMessage)))}render(){return g(i,{class:{"gux-display-inline":this.displayInline}},g("div",{class:{"gux-toggle-container":!0,"gux-toggle-label-left":"left"===this.labelPosition,"gux-disabled":this.disabled||this.loading}},g("div",{class:"gux-toggle-input"},g("gux-toggle-slider",{checked:this.checked,disabled:this.disabled||this.loading,guxAriaLabel:this.getAriaLabel(),labelId:this.checkedLabel&&this.uncheckedLabel?this.labelId:"",errorId:this.errorMessage?this.errorId:""}),this.renderLabel()),this.renderError()),g("gux-announce-beta",{ref:e=>this.announceElement=e}))}static get delegatesFocus(){return!0}get root(){return l(this)}static get watchers(){return{loading:["handleLoading"]}}};r.style=":host{display:block;margin:2px;color:#2e394c;outline:none}:host(.gux-display-inline){display:inline-block}.gux-toggle-container{cursor:pointer}.gux-toggle-container.gux-disabled{pointer-events:none;cursor:default}.gux-toggle-container.gux-disabled .gux-toggle-input .gux-toggle-label .gux-toggle-label-text{opacity:0.5}.gux-toggle-container.gux-toggle-label-left .gux-toggle-input{flex-direction:row-reverse}.gux-toggle-container.gux-toggle-label-left .gux-toggle-input .gux-toggle-label .gux-toggle-label-text{place-items:end}.gux-toggle-container.gux-toggle-label-left .gux-toggle-error{float:right}.gux-toggle-container .gux-toggle-input{display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:flex-start;justify-content:flex-start}.gux-toggle-container .gux-toggle-input .gux-toggle-label{position:relative;display:inline-block;padding:0 4px}.gux-toggle-container .gux-toggle-input .gux-toggle-label .gux-toggle-label-text{display:grid;grid-template-areas:'inner-div';place-items:start}.gux-toggle-container .gux-toggle-input .gux-toggle-label .gux-toggle-label-text .gux-toggle-label-text-inner{position:relative;grid-area:inner-div}.gux-toggle-container .gux-toggle-input .gux-toggle-label .gux-toggle-label-text .gux-toggle-label-text-inner.gux-hidden{visibility:hidden}.gux-toggle-container .gux-toggle-input .gux-toggle-label .gux-toggle-label-loading{position:absolute;inset:0;display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:center;justify-content:center}.gux-toggle-container .gux-toggle-error .gux-toggle-error-container{display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:flex-start;justify-content:flex-start;font-size:11px;color:#2e394c}.gux-toggle-container .gux-toggle-error .gux-toggle-error-container gux-icon{flex:0 1 auto;align-self:auto;order:0;width:16px;height:16px;margin:0 4px;color:#ea0b0b}.gux-toggle-container .gux-toggle-error .gux-toggle-error-container .gux-toggle-error-message{flex:0 1 auto;align-self:auto;order:0}";export{r as gux_toggle}
1
+ import{r as e,c as t,h as g,H as i,g as l}from"./p-7d26b2e1.js";import{t as o}from"./p-9bf0a4a8.js";import{r as a}from"./p-cbcbd1bb.js";import{b as n}from"./p-deee079e.js";import"./p-8a133b9b.js";const s={defaultAriaLabel:"Toggle Switch",toggleIsLoading:"Toggle is loading",toggleIsFinishedLoading:"Toggle is finished loading"},r=class{constructor(g){e(this,g),this.check=t(this,"check",7),this.labelId=a("gux-toggle-label"),this.errorId=a("gux-toggle-error"),this.checked=!1,this.disabled=!1,this.loading=!1,this.checkedLabel=void 0,this.uncheckedLabel=void 0,this.labelPosition="right",this.errorMessage=void 0,this.displayInline=!1}handleLoading(e){this.announceElement.guxAnnounce(this.i18n(e?"toggleIsLoading":"toggleIsFinishedLoading"))}onClick(){this.toggle()}onKeydown(e){switch(e.key){case"Enter":case" ":e.preventDefault(),this.toggle()}}toggle(){this.disabled||this.loading||this.check.emit(!this.checked).defaultPrevented||(this.checked=!this.checked)}getAriaLabel(){return this.root.getAttribute("aria-label")||this.root.title||this.i18n("defaultAriaLabel")}async componentWillLoad(){this.i18n=await n(this.root,s),o(this.root,{variant:this.checkedLabel||this.uncheckedLabel?"labled":"unlabled"})}renderLoading(){if(this.loading)return g("div",{class:"gux-toggle-label-loading"},g("gux-radial-loading",{context:"input"}))}renderLabel(){if(this.uncheckedLabel&&this.checkedLabel)return g("div",{class:"gux-toggle-label-and-error"},g("div",{class:"gux-toggle-label"},g("div",{class:"gux-toggle-label-text"},g("span",{class:"gux-toggle-label-text-inner"},g("span",{id:this.labelId},this.checked?this.checkedLabel:this.uncheckedLabel),this.renderLoading()),g("span",{class:"gux-toggle-label-text-inner gux-hidden"},this.checkedLabel),g("span",{class:"gux-toggle-label-text-inner gux-hidden"},this.uncheckedLabel))))}renderError(){if(this.errorMessage)return g("div",{id:this.errorId,class:"gux-toggle-error"},g("div",{class:"gux-toggle-error-container"},g("gux-icon",{"icon-name":"alert-warning-octogon",decorative:!0}),g("div",{class:"gux-toggle-error-message"},this.errorMessage)))}render(){return g(i,{class:{"gux-display-inline":this.displayInline}},g("div",{class:{"gux-toggle-container":!0,"gux-toggle-label-left":"left"===this.labelPosition,"gux-disabled":this.disabled||this.loading}},g("div",{class:"gux-toggle-input"},g("gux-toggle-slider",{checked:this.checked,disabled:this.disabled||this.loading,guxAriaLabel:this.getAriaLabel(),labelId:this.checkedLabel&&this.uncheckedLabel?this.labelId:"",errorId:this.errorMessage?this.errorId:""}),this.renderLabel()),this.renderError()),g("gux-announce-beta",{ref:e=>this.announceElement=e}))}static get delegatesFocus(){return!0}get root(){return l(this)}static get watchers(){return{loading:["handleLoading"]}}};r.style=":host{display:block;margin:2px;color:#2e394c;outline:none}:host(.gux-display-inline){display:inline-block}.gux-toggle-container{cursor:pointer}.gux-toggle-container.gux-disabled{pointer-events:none;cursor:default}.gux-toggle-container.gux-disabled .gux-toggle-input .gux-toggle-label .gux-toggle-label-text{opacity:0.5}.gux-toggle-container.gux-toggle-label-left .gux-toggle-input{flex-direction:row-reverse}.gux-toggle-container.gux-toggle-label-left .gux-toggle-input .gux-toggle-label .gux-toggle-label-text{place-items:end}.gux-toggle-container.gux-toggle-label-left .gux-toggle-error{float:right}.gux-toggle-container .gux-toggle-input{display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:flex-start;justify-content:flex-start}.gux-toggle-container .gux-toggle-input .gux-toggle-label{position:relative;display:inline-block;padding:0 4px}.gux-toggle-container .gux-toggle-input .gux-toggle-label .gux-toggle-label-text{display:grid;grid-template-areas:'inner-div';place-items:start}.gux-toggle-container .gux-toggle-input .gux-toggle-label .gux-toggle-label-text .gux-toggle-label-text-inner{position:relative;grid-area:inner-div}.gux-toggle-container .gux-toggle-input .gux-toggle-label .gux-toggle-label-text .gux-toggle-label-text-inner.gux-hidden{visibility:hidden}.gux-toggle-container .gux-toggle-input .gux-toggle-label .gux-toggle-label-loading{position:absolute;inset:0;display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:center;justify-content:center}.gux-toggle-container .gux-toggle-error .gux-toggle-error-container{display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:flex-start;justify-content:flex-start;font-size:11px;color:#2e394c}.gux-toggle-container .gux-toggle-error .gux-toggle-error-container gux-icon{flex:0 1 auto;align-self:auto;order:0;width:16px;height:16px;margin:0 4px;color:#ea0b0b}.gux-toggle-container .gux-toggle-error .gux-toggle-error-container .gux-toggle-error-message{flex:0 1 auto;align-self:auto;order:0}";export{r as gux_toggle}
@@ -1 +1 @@
1
- import{r as t,f as e,h as i,g as o,c as s,H as n}from"./p-7d26b2e1.js";import{b as r}from"./p-deee079e.js";import{c as a,o as p}from"./p-3f5341ea.js";import{O as l}from"./p-f34ce7dc.js";import{o as u}from"./p-3701eff0.js";import{p as h}from"./p-c10e41a9.js";import{h as c,d,G as g,a as f,g as x,v as b,b as m,e as v}from"./p-b3c9fd06.js";import{s as w}from"./p-d176c2ae.js";import{h as y}from"./p-08bc2e6b.js";import{G as j,a as k}from"./p-a733f4ca.js";import{t as C}from"./p-f7f3443e.js";import{t as R}from"./p-89af02eb.js";import{O as z}from"./p-9d18d475.js";import{b as O}from"./p-091f51f6.js";import{a as S,c as D,o as E,f as I,s as L,b as P}from"./p-4e2b5bcf.js";import{g as _}from"./p-3e6097e5.js";import{f as F}from"./p-82ffe3cc.js";import"./p-8a133b9b.js";import"./p-cbcbd1bb.js";import"./p-d0805f56.js";const T={increment:"Increment",decrement:"Decrement"};const $=class{constructor(e){t(this,e),this.clearable=void 0,this.labelPosition=void 0,this.computedLabelPosition="above",this.disabled=void 0,this.required=void 0,this.hasContent=!1,this.hasError=!1,this.hasHelp=!1}onMutation(){this.hasError=y(this.root,"error"),this.hasHelp=y(this.root,"help")}async guxForceUpdate(){this.hasContent=c(this.input),this.hasError=y(this.root,"error"),this.hasHelp=y(this.root,"help"),e(this.root)}async componentWillLoad(){this.getI18nValue=await r(this.root,T),this.setInput(),this.setLabel(),this.hasError=y(this.root,"error"),this.hasHelp=y(this.root,"help"),C(this.root,{variant:this.variant})}disconnectedCallback(){this.disabledObserver&&this.disabledObserver.disconnect(),this.requiredObserver&&this.requiredObserver.disconnect()}render(){const t=this.clearable&&this.hasContent&&!this.disabled;return i(k,{labelPosition:this.computedLabelPosition},i(j,{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},part:"input-section"},i("div",{class:{"gux-input-container":!0,"gux-disabled":this.disabled,"gux-clear":t}},i("slot",{name:"input",onSlotchange:()=>this.setInput()}),t&&i("gux-form-field-input-clear-button",{onClick:()=>d(this.input)})),this.renderStepButtons(this.input,this.getI18nValue,this.disabled)),i(g,{show:this.hasError},i("slot",{name:"error"})),i(f,{show:!this.hasError&&this.hasHelp},i("slot",{name:"help"}))))}get variant(){const t=this.labelPosition?this.labelPosition.toLowerCase():"none";return`${this.clearable?"clearable":"unclearable"}-${t}`}setInput(){this.input=x(this.root,'input[type="number"][slot="input"]'),this.hasContent=c(this.input),h(this.input),this.input.addEventListener("input",(()=>{this.hasContent=c(this.input)})),this.disabled=a(this.input),this.required=this.input.required,this.disabledObserver=p(this.input,(t=>{this.disabled=t})),this.requiredObserver=u(this.input,(t=>{this.required=t})),b(this.root,this.input)}setLabel(){this.label=this.root.querySelector('label[slot="label"]'),this.computedLabelPosition=m(this.label,this.labelPosition)}renderStepButtons(t,e,o){return i("div",{class:"gux-step-buttons-container"},i("button",{class:"gux-step-button",tabIndex:-1,type:"button",title:e("increment"),disabled:o,onClick:()=>this.stepUp(t)},i("gux-icon",{"icon-name":"chevron-small-up",decorative:!0})),i("button",{class:"gux-step-button",tabIndex:-1,type:"button",title:e("decrement"),disabled:o,onClick:()=>this.stepDown(t)},i("gux-icon",{"icon-name":"chevron-small-down",decorative:!0})))}stepDown(t){""===t.value?v(t,t.min||"0",!1):(t.stepDown(),this.simulateNativeInputAndChangeEvents(t))}stepUp(t){""===t.value?v(t,t.min||"0",!1):(t.stepUp(),this.simulateNativeInputAndChangeEvents(t))}simulateNativeInputAndChangeEvents(t){w(t,"input"),w(t,"change")}static get delegatesFocus(){return!0}get root(){return o(this)}};(function(t,e,i,o){var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);n>3&&r&&Object.defineProperty(e,i,r)})([l({childList:!0,subtree:!0})],$.prototype,"onMutation",null),$.style=".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:100%;overflow:hidden;font-size:12px;color:#2e394c;text-align:right;text-overflow:ellipsis;background-color:#f6f7f9;border:none;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;width:100%}.gux-input-and-error-container .gux-input .gux-input-container{box-sizing:border-box;display:flex;flex:1 1 auto;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:center;align-self:auto;justify-content:center;order:0;width:100%;height:32px;padding:4px 12px;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-input-and-error-container .gux-input .gux-input-container.gux-disabled{opacity:0.5}.gux-input-and-error-container .gux-input .gux-input-container.gux-clear{padding-right:0}.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-error .gux-input-container{border-color:#ea0b0b}.gux-step-buttons-container{flex:0 1 14px;align-self:auto;order:0;margin:0 4px}.gux-step-buttons-container .gux-step-button{display:flex;flex:0 1 auto;align-items:center;align-self:auto;justify-content:center;order:0;padding:0;color:#596373;background:transparent;border:none}.gux-step-buttons-container .gux-step-button:not(:disabled):focus-visible,.gux-step-buttons-container .gux-step-button:not(:disabled):hover{color:#2a60c8;cursor:pointer}.gux-step-buttons-container .gux-step-button gux-icon{flex:0 0 auto;width:14px;height:14px}";const U=class{constructor(e){t(this,e),this.goToPage=s(this,"goToPage",7),this.isOpen=!1,this.totalPages=void 0}handleKeyDown(t){const e=t.composedPath();switch(t.key){case"Escape":this.isOpen=!1,this.ellipsisButton.focus();break;case"Tab":this.isOpen=!1;break;case"ArrowDown":case"Enter":e.includes(this.ellipsisButton)&&(t.preventDefault(),this.isOpen=!0,this.focusInputElement())}}handleKeyup(t){if(" "===t.key)t.composedPath().includes(this.ellipsisButton)&&(this.isOpen=!0,this.focusInputElement())}toggle(){this.isOpen=!this.isOpen,this.isOpen&&this.focusInputElement()}onClickOutside(){this.isOpen=!1}focusInputElement(){O((()=>{this.inputElement.focus()}))}applyInputListener(){var t;null===(t=this.inputElement)||void 0===t||t.addEventListener("keydown",(t=>{"Enter"!=t.key&&" "!=t.key||(t.preventDefault(),this.goToPage.emit(t.target.value),this.isOpen=!1)}))}async componentWillLoad(){this.i18n=await r(this.root,R),C(this.root)}componentDidLoad(){this.applyInputListener()}render(){return i(n,null,i("button",{id:"popover-target",type:"button",ref:t=>this.ellipsisButton=t,onClick:()=>this.toggle(),"aria-haspopup":"true","aria-expanded":this.isOpen.toString()},i("gux-icon",{screenreaderText:this.i18n("goToPage"),"icon-name":"menu-kebab-horizontal"})),i("gux-tooltip",{for:"popover-target"},this.i18n("goToPage")),i("gux-popover",{"is-open":this.isOpen,for:"popover-target"},i("span",{slot:"title"},this.i18n("goToPage")),i("gux-form-field-number",null,i("input",{slot:"input",type:"number",ref:t=>this.inputElement=t,min:"1",max:this.totalPages,value:"1"}),i("label",{slot:"label"}))))}get root(){return o(this)}};(function(t,e,i,o){var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);n>3&&r&&Object.defineProperty(e,i,r)})([z({triggerEvents:"mousedown"})],U.prototype,"onClickOutside",null),U.style="button{color:var(--gse-ui-button-ghost-default-foregroundColor);cursor:pointer;background:none;border:none}button:hover{color:var(--gse-ui-button-ghost-hover-foregroundColor)}button:focus-visible{outline:var(--gse-semantic-focusRing-width) solid var(--gse-semantic-color-focus);outline-offset:var(--gse-semantic-focusRing-offset);border-radius:calc(var(--gse-semantic-focusRing-cornerRadius) - var(--gse-semantic-focusRing-offset))}button gux-icon{width:var(--gse-ui-icon-size-sm);height:var(--gse-ui-icon-size-sm);padding-top:4px}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}input[type=number]{-moz-appearance:textfield}";const B=class{constructor(e){t(this,e),this.guxdismiss=s(this,"guxdismiss",7),this.for=void 0,this.position="bottom",this.displayDismissButton=void 0,this.closeOnClickOutside=!1,this.isOpen=!1}checkForClickOutside(t){const e=t.composedPath(),i=F(this.root,this.for),o=e.includes(i);!this.closeOnClickOutside&&this.displayDismissButton||!this.isOpen||o||this.dismiss()}get titleSlot(){return _(this.root,"title")}runUpdatePosition(){this.root.isConnected?this.cleanupUpdatePosition=S(F(this.root,this.for),this.popupElement,(()=>this.updatePosition()),{ancestorScroll:!0,elementResize:!0,animationFrame:!0,ancestorResize:!0}):this.disconnectedCallback()}updatePosition(){const t=F(this.root,this.for);this.popupElement&&D(t,this.popupElement,{placement:this.position,middleware:[E(7),I(),L(),P({element:this.arrowElement,padding:16})]}).then((({x:t,y:e,middlewareData:i,placement:o})=>{Object.assign(this.popupElement.style,{left:`${t}px`,top:`${e}px`});const s={top:"bottom",right:"left",bottom:"top",left:"right"}[o.split("-")[0]];if(i.arrow){const{x:t,y:e}=i.arrow;this.popupElement.setAttribute("data-placement",o),Object.assign(this.arrowElement.style,{left:null!=t?`${t}px`:"",top:null!=e?`${e}px`:"",right:"",bottom:"",[s]:"-6.5px",transform:"rotate(45deg)"})}}))}dismiss(){this.guxdismiss.emit().defaultPrevented||(this.isOpen=!1)}connectedCallback(){C(this.root,{variant:this.position})}componentDidLoad(){this.isOpen&&this.runUpdatePosition()}componentDidUpdate(){this.isOpen?this.runUpdatePosition():this.cleanupUpdatePosition&&this.cleanupUpdatePosition()}disconnectedCallback(){this.cleanupUpdatePosition&&this.cleanupUpdatePosition()}renderDismissButton(){if(this.displayDismissButton)return i("gux-dismiss-button",{onClick:this.dismiss.bind(this),position:"inherit"})}render(){return i("div",{ref:t=>this.popupElement=t,class:{"gux-hidden":!this.isOpen,"gux-popover-wrapper":!0},"data-placement":!0},i("div",{ref:t=>this.arrowElement=t,class:"gux-arrow"}),i("div",{class:{"gux-popover-header":Boolean(this.titleSlot)}},i("slot",{name:"title"}),this.renderDismissButton()),i("div",{class:"gux-popover-content"},i("slot",null)))}get root(){return o(this)}};(function(t,e,i,o){var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);n>3&&r&&Object.defineProperty(e,i,r)})([z({triggerEvents:"mousedown"})],B.prototype,"checkForClickOutside",null),B.style=".gux-popover-wrapper{position:absolute;top:0;left:0;min-width:280px;z-index:var(--gux-zindex-popover, 2);display:inline-block;padding:var(--gse-ui-popover-gap);background-color:var(--gse-ui-popover-backgroundColor);border-radius:var(--gse-ui-popover-borderRadius);box-shadow:var(--gse-ui-popover-boxShadow-x) var(--gse-ui-popover-boxShadow-y) var(--gse-ui-popover-boxShadow-blur) var(--gse-ui-popover-boxShadow-spread) var(--gse-ui-tooltip-boxShadow-color)}.gux-popover-wrapper.gux-hidden{display:none}.gux-popover-wrapper .gux-arrow{position:absolute;width:var(--gse-ui-popover-anchor-width);height:var(--gse-ui-popover-anchor-width);background:var(--gse-ui-popover-backgroundColor)}.gux-popover-wrapper .gux-popover-header{font-family:var(--gse-ui-popover-title-text-fontFamily);font-size:var(--gse-ui-popover-title-text-fontSize);font-weight:var(--gse-ui-popover-title-text-fontWeight);line-height:var(--gse-ui-popover-title-text-lineHeight);color:--gse-ui-popover-headerColor;display:flex;flex-direction:row;align-content:center;align-items:center;justify-content:space-between;padding-bottom:var(--gse-ui-popover-gap)}.gux-popover-wrapper gux-dismiss-button{float:right}";export{$ as gux_form_field_number,U as gux_pagination_ellipsis_button,B as gux_popover}
1
+ import{r as t,f as e,h as i,g as o,c as s,H as n}from"./p-7d26b2e1.js";import{b as r}from"./p-deee079e.js";import{c as a,o as p}from"./p-3f5341ea.js";import{O as l}from"./p-f34ce7dc.js";import{o as u}from"./p-3701eff0.js";import{p as h}from"./p-c10e41a9.js";import{h as c,d,G as g,a as f,g as x,v as b,b as m,e as v}from"./p-b3c9fd06.js";import{s as w}from"./p-d176c2ae.js";import{h as y}from"./p-08bc2e6b.js";import{G as j,a as k}from"./p-a733f4ca.js";import{t as C}from"./p-9bf0a4a8.js";import{t as R}from"./p-89af02eb.js";import{O as z}from"./p-9d18d475.js";import{b as O}from"./p-091f51f6.js";import{a as S,c as D,o as E,f as I,s as L,b as P}from"./p-4e2b5bcf.js";import{g as _}from"./p-3e6097e5.js";import{f as F}from"./p-82ffe3cc.js";import"./p-8a133b9b.js";import"./p-cbcbd1bb.js";import"./p-d0805f56.js";const T={increment:"Increment",decrement:"Decrement"};const $=class{constructor(e){t(this,e),this.clearable=void 0,this.labelPosition=void 0,this.computedLabelPosition="above",this.disabled=void 0,this.required=void 0,this.hasContent=!1,this.hasError=!1,this.hasHelp=!1}onMutation(){this.hasError=y(this.root,"error"),this.hasHelp=y(this.root,"help")}async guxForceUpdate(){this.hasContent=c(this.input),this.hasError=y(this.root,"error"),this.hasHelp=y(this.root,"help"),e(this.root)}async componentWillLoad(){this.getI18nValue=await r(this.root,T),this.setInput(),this.setLabel(),this.hasError=y(this.root,"error"),this.hasHelp=y(this.root,"help"),C(this.root,{variant:this.variant})}disconnectedCallback(){this.disabledObserver&&this.disabledObserver.disconnect(),this.requiredObserver&&this.requiredObserver.disconnect()}render(){const t=this.clearable&&this.hasContent&&!this.disabled;return i(k,{labelPosition:this.computedLabelPosition},i(j,{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},part:"input-section"},i("div",{class:{"gux-input-container":!0,"gux-disabled":this.disabled,"gux-clear":t}},i("slot",{name:"input",onSlotchange:()=>this.setInput()}),t&&i("gux-form-field-input-clear-button",{onClick:()=>d(this.input)})),this.renderStepButtons(this.input,this.getI18nValue,this.disabled)),i(g,{show:this.hasError},i("slot",{name:"error"})),i(f,{show:!this.hasError&&this.hasHelp},i("slot",{name:"help"}))))}get variant(){const t=this.labelPosition?this.labelPosition.toLowerCase():"none";return`${this.clearable?"clearable":"unclearable"}-${t}`}setInput(){this.input=x(this.root,'input[type="number"][slot="input"]'),this.hasContent=c(this.input),h(this.input),this.input.addEventListener("input",(()=>{this.hasContent=c(this.input)})),this.disabled=a(this.input),this.required=this.input.required,this.disabledObserver=p(this.input,(t=>{this.disabled=t})),this.requiredObserver=u(this.input,(t=>{this.required=t})),b(this.root,this.input)}setLabel(){this.label=this.root.querySelector('label[slot="label"]'),this.computedLabelPosition=m(this.label,this.labelPosition)}renderStepButtons(t,e,o){return i("div",{class:"gux-step-buttons-container"},i("button",{class:"gux-step-button",tabIndex:-1,type:"button",title:e("increment"),disabled:o,onClick:()=>this.stepUp(t)},i("gux-icon",{"icon-name":"chevron-small-up",decorative:!0})),i("button",{class:"gux-step-button",tabIndex:-1,type:"button",title:e("decrement"),disabled:o,onClick:()=>this.stepDown(t)},i("gux-icon",{"icon-name":"chevron-small-down",decorative:!0})))}stepDown(t){""===t.value?v(t,t.min||"0",!1):(t.stepDown(),this.simulateNativeInputAndChangeEvents(t))}stepUp(t){""===t.value?v(t,t.min||"0",!1):(t.stepUp(),this.simulateNativeInputAndChangeEvents(t))}simulateNativeInputAndChangeEvents(t){w(t,"input"),w(t,"change")}static get delegatesFocus(){return!0}get root(){return o(this)}};(function(t,e,i,o){var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);n>3&&r&&Object.defineProperty(e,i,r)})([l({childList:!0,subtree:!0})],$.prototype,"onMutation",null),$.style=".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:100%;overflow:hidden;font-size:12px;color:#2e394c;text-align:right;text-overflow:ellipsis;background-color:#f6f7f9;border:none;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;width:100%}.gux-input-and-error-container .gux-input .gux-input-container{box-sizing:border-box;display:flex;flex:1 1 auto;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:center;align-self:auto;justify-content:center;order:0;width:100%;height:32px;padding:4px 12px;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-input-and-error-container .gux-input .gux-input-container.gux-disabled{opacity:0.5}.gux-input-and-error-container .gux-input .gux-input-container.gux-clear{padding-right:0}.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-error .gux-input-container{border-color:#ea0b0b}.gux-step-buttons-container{flex:0 1 14px;align-self:auto;order:0;margin:0 4px}.gux-step-buttons-container .gux-step-button{display:flex;flex:0 1 auto;align-items:center;align-self:auto;justify-content:center;order:0;padding:0;color:#596373;background:transparent;border:none}.gux-step-buttons-container .gux-step-button:not(:disabled):focus-visible,.gux-step-buttons-container .gux-step-button:not(:disabled):hover{color:#2a60c8;cursor:pointer}.gux-step-buttons-container .gux-step-button gux-icon{flex:0 0 auto;width:14px;height:14px}";const U=class{constructor(e){t(this,e),this.goToPage=s(this,"goToPage",7),this.isOpen=!1,this.totalPages=void 0}handleKeyDown(t){const e=t.composedPath();switch(t.key){case"Escape":this.isOpen=!1,this.ellipsisButton.focus();break;case"Tab":this.isOpen=!1;break;case"ArrowDown":case"Enter":e.includes(this.ellipsisButton)&&(t.preventDefault(),this.isOpen=!0,this.focusInputElement())}}handleKeyup(t){if(" "===t.key)t.composedPath().includes(this.ellipsisButton)&&(this.isOpen=!0,this.focusInputElement())}toggle(){this.isOpen=!this.isOpen,this.isOpen&&this.focusInputElement()}onClickOutside(){this.isOpen=!1}focusInputElement(){O((()=>{this.inputElement.focus()}))}applyInputListener(){var t;null===(t=this.inputElement)||void 0===t||t.addEventListener("keydown",(t=>{"Enter"!=t.key&&" "!=t.key||(t.preventDefault(),this.goToPage.emit(t.target.value),this.isOpen=!1)}))}async componentWillLoad(){this.i18n=await r(this.root,R),C(this.root)}componentDidLoad(){this.applyInputListener()}render(){return i(n,null,i("button",{id:"popover-target",type:"button",ref:t=>this.ellipsisButton=t,onClick:()=>this.toggle(),"aria-haspopup":"true","aria-expanded":this.isOpen.toString()},i("gux-icon",{screenreaderText:this.i18n("goToPage"),"icon-name":"menu-kebab-horizontal"})),i("gux-tooltip",{for:"popover-target"},this.i18n("goToPage")),i("gux-popover",{"is-open":this.isOpen,for:"popover-target"},i("span",{slot:"title"},this.i18n("goToPage")),i("gux-form-field-number",null,i("input",{slot:"input",type:"number",ref:t=>this.inputElement=t,min:"1",max:this.totalPages,value:"1"}),i("label",{slot:"label"}))))}get root(){return o(this)}};(function(t,e,i,o){var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);n>3&&r&&Object.defineProperty(e,i,r)})([z({triggerEvents:"mousedown"})],U.prototype,"onClickOutside",null),U.style="button{color:var(--gse-ui-button-ghost-default-foregroundColor);cursor:pointer;background:none;border:none}button:hover{color:var(--gse-ui-button-ghost-hover-foregroundColor)}button:focus-visible{outline:var(--gse-semantic-focusRing-width) solid var(--gse-semantic-color-focus);outline-offset:var(--gse-semantic-focusRing-offset);border-radius:calc(var(--gse-semantic-focusRing-cornerRadius) - var(--gse-semantic-focusRing-offset))}button gux-icon{width:var(--gse-ui-icon-size-sm);height:var(--gse-ui-icon-size-sm);padding-top:4px}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}input[type=number]{-moz-appearance:textfield}";const B=class{constructor(e){t(this,e),this.guxdismiss=s(this,"guxdismiss",7),this.for=void 0,this.position="bottom",this.displayDismissButton=void 0,this.closeOnClickOutside=!1,this.isOpen=!1}checkForClickOutside(t){const e=t.composedPath(),i=F(this.root,this.for),o=e.includes(i);!this.closeOnClickOutside&&this.displayDismissButton||!this.isOpen||o||this.dismiss()}get titleSlot(){return _(this.root,"title")}runUpdatePosition(){this.root.isConnected?this.cleanupUpdatePosition=S(F(this.root,this.for),this.popupElement,(()=>this.updatePosition()),{ancestorScroll:!0,elementResize:!0,animationFrame:!0,ancestorResize:!0}):this.disconnectedCallback()}updatePosition(){const t=F(this.root,this.for);this.popupElement&&D(t,this.popupElement,{placement:this.position,middleware:[E(7),I(),L(),P({element:this.arrowElement,padding:16})]}).then((({x:t,y:e,middlewareData:i,placement:o})=>{Object.assign(this.popupElement.style,{left:`${t}px`,top:`${e}px`});const s={top:"bottom",right:"left",bottom:"top",left:"right"}[o.split("-")[0]];if(i.arrow){const{x:t,y:e}=i.arrow;this.popupElement.setAttribute("data-placement",o),Object.assign(this.arrowElement.style,{left:null!=t?`${t}px`:"",top:null!=e?`${e}px`:"",right:"",bottom:"",[s]:"-6.5px",transform:"rotate(45deg)"})}}))}dismiss(){this.guxdismiss.emit().defaultPrevented||(this.isOpen=!1)}connectedCallback(){C(this.root,{variant:this.position})}componentDidLoad(){this.isOpen&&this.runUpdatePosition()}componentDidUpdate(){this.isOpen?this.runUpdatePosition():this.cleanupUpdatePosition&&this.cleanupUpdatePosition()}disconnectedCallback(){this.cleanupUpdatePosition&&this.cleanupUpdatePosition()}renderDismissButton(){if(this.displayDismissButton)return i("gux-dismiss-button",{onClick:this.dismiss.bind(this),position:"inherit"})}render(){return i("div",{ref:t=>this.popupElement=t,class:{"gux-hidden":!this.isOpen,"gux-popover-wrapper":!0},"data-placement":!0},i("div",{ref:t=>this.arrowElement=t,class:"gux-arrow"}),i("div",{class:{"gux-popover-header":Boolean(this.titleSlot)}},i("slot",{name:"title"}),this.renderDismissButton()),i("div",{class:"gux-popover-content"},i("slot",null)))}get root(){return o(this)}};(function(t,e,i,o){var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);n>3&&r&&Object.defineProperty(e,i,r)})([z({triggerEvents:"mousedown"})],B.prototype,"checkForClickOutside",null),B.style=".gux-popover-wrapper{position:absolute;top:0;left:0;min-width:280px;z-index:var(--gux-zindex-popover, 2);display:inline-block;padding:var(--gse-ui-popover-gap);background-color:var(--gse-ui-popover-backgroundColor);border-radius:var(--gse-ui-popover-borderRadius);box-shadow:var(--gse-ui-popover-boxShadow-x) var(--gse-ui-popover-boxShadow-y) var(--gse-ui-popover-boxShadow-blur) var(--gse-ui-popover-boxShadow-spread) var(--gse-ui-tooltip-boxShadow-color)}.gux-popover-wrapper.gux-hidden{display:none}.gux-popover-wrapper .gux-arrow{position:absolute;width:var(--gse-ui-popover-anchor-width);height:var(--gse-ui-popover-anchor-width);background:var(--gse-ui-popover-backgroundColor)}.gux-popover-wrapper .gux-popover-header{font-family:var(--gse-ui-popover-title-text-fontFamily);font-size:var(--gse-ui-popover-title-text-fontSize);font-weight:var(--gse-ui-popover-title-text-fontWeight);line-height:var(--gse-ui-popover-title-text-lineHeight);color:--gse-ui-popover-headerColor;display:flex;flex-direction:row;align-content:center;align-items:center;justify-content:space-between;padding-bottom:var(--gse-ui-popover-gap)}.gux-popover-wrapper gux-dismiss-button{float:right}";export{$ as gux_form_field_number,U as gux_pagination_ellipsis_button,B as gux_popover}
@@ -1 +1 @@
1
- import{r as o,c as t,h as f,H as i,g as e}from"./p-7d26b2e1.js";import{t as n}from"./p-f7f3443e.js";const l=class{constructor(f){o(this,f),this.guxdismiss=t(this,"guxdismiss",7),this.accent="neutral"}componentWillLoad(){n(this.root,{variant:this.accent})}render(){return f(i,null,f("div",{class:`gux-icon gux-${this.accent}`},f("slot",{name:"icon"})),f("div",{class:"gux-content"},f("gux-truncate",{class:"gux-title","max-lines":1},f("slot",{name:"title"})),f("gux-truncate",{class:"gux-message","max-lines":2},f("slot",{name:"message"}))),f("gux-dismiss-button",{onClick:this.onDismissClickHandler.bind(this)}))}onDismissClickHandler(o){o.stopPropagation(),this.guxdismiss.emit().defaultPrevented||this.root.remove()}get root(){return e(this)}};l.style='.gux-focus-ring-focused:focus{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-focus-ring-focused-within:focus-within{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-focus-ring-focused-visible:focus-visible{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-focus-ring-small-focused:focus{outline:2px solid #aac9ff;outline-offset:0}.gux-focus-ring-small-focused-within:focus-within{outline:2px solid #aac9ff;outline-offset:0}.gux-focus-ring-small-focused-visible:focus-visible{outline:2px solid #aac9ff;outline-offset:0}@font-face{font-family:Roboto;font-style:normal;font-weight:300;src:url("./fonts/roboto-v20-latin-300.eot");src:local("Roboto Light"), local("Roboto-Light"), url("./fonts/roboto-v20-latin-300.eot?#iefix") format("embedded-opentype"), url("./fonts/roboto-v20-latin-300.woff2") format("woff2"), url("./fonts/roboto-v20-latin-300.woff") format("woff"), url("./fonts/roboto-v20-latin-300.ttf") format("truetype"), url("./fonts/roboto-v20-latin-300.svg#Roboto") format("svg");}@font-face{font-family:Roboto;font-style:normal;font-weight:400;src:url("./fonts/roboto-v20-latin-regular.eot");src:local("Roboto"), local("Roboto-Regular"), url("./fonts/roboto-v20-latin-regular.eot?#iefix") format("embedded-opentype"), url("./fonts/roboto-v20-latin-regular.woff2") format("woff2"), url("./fonts/roboto-v20-latin-regular.woff") format("woff"), url("./fonts/roboto-v20-latin-regular.ttf") format("truetype"), url("./fonts/roboto-v20-latin-regular.svg#Roboto") format("svg");}@font-face{font-family:Roboto;font-style:italic;font-weight:400;src:url("./fonts/roboto-v20-latin-italic.eot");src:local("Roboto Italic"), local("Roboto-Italic"), url("./fonts/roboto-v20-latin-italic.eot?#iefix") format("embedded-opentype"), url("./fonts/roboto-v20-latin-italic.woff2") format("woff2"), url("./fonts/roboto-v20-latin-italic.woff") format("woff"), url("./fonts/roboto-v20-latin-italic.ttf") format("truetype"), url("./fonts/roboto-v20-latin-italic.svg#Roboto") format("svg");}@font-face{font-family:Roboto;font-style:normal;font-weight:700;src:url("./fonts/roboto-v20-latin-700.eot");src:local("Roboto Bold"), local("Roboto-Bold"), url("./fonts/roboto-v20-latin-700.eot?#iefix") format("embedded-opentype"), url("./fonts/roboto-v20-latin-700.woff2") format("woff2"), url("./fonts/roboto-v20-latin-700.woff") format("woff"), url("./fonts/roboto-v20-latin-700.ttf") format("truetype"), url("./fonts/roboto-v20-latin-700.svg#Roboto") format("svg");}body{font-family:Roboto, sans-serif;font-weight:400;font-size:12px;line-height:20px}h1{font-family:Roboto, sans-serif;font-weight:400;font-weight:300;font-size:24px;line-height:32px}h2{font-family:Roboto, sans-serif;font-weight:400;font-weight:300;font-size:18px;line-height:24px}h3{font-family:Roboto, sans-serif;font-weight:400;font-weight:700;font-size:14px;line-height:20px}h4,h5,h6{font-family:Roboto, sans-serif;font-weight:400;font-size:14px;line-height:20px}.gux-icon-anchor gux-icon{padding-right:2px}a{color:#2a60c8;text-decoration:underline;border-radius:2px}a:hover{color:#2754ac}a:active{color:#23478f}a:focus-visible{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}table a{color:#2a60c8;text-decoration:underline;border-radius:2px;text-decoration:none}table a:hover{color:#2754ac}table a:active{color:#23478f}table a:focus-visible{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}:host{position:relative;display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:flex-start;justify-content:flex-start;width:294px;padding:16px 8px 16px 16px;margin-bottom:4px;color:#2e394c;background:#f6f7f9;border:1px solid #b4bccb;border-color:#b4bccb;border-radius:4px;box-shadow:0 2px 4px rgba(32, 41, 55, 0.24)}.gux-icon{flex:0 1 auto;align-self:auto;order:0;margin:4px}.gux-icon ::slotted(gux-icon){width:24px !important;height:24px !important}.gux-icon.gux-alert{color:#ea0b0b}.gux-icon.gux-warning{color:#ffae00}.gux-icon.gux-positive{color:#3c8527}.gux-icon.gux-neutral{color:#203b73}.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;margin:0 12px 0 8px;color:#2e394c}.gux-content .gux-title,.gux-content .gux-message{flex:1 1 auto;align-self:auto;order:0}.gux-content .gux-title{font-family:Roboto, sans-serif;font-weight:400;font-size:14px;line-height:20px}';export{l as gux_notification_toast_legacy}
1
+ import{r as o,c as t,h as i,H as f,g as e}from"./p-7d26b2e1.js";import{t as n}from"./p-9bf0a4a8.js";const l=class{constructor(i){o(this,i),this.guxdismiss=t(this,"guxdismiss",7),this.accent="neutral"}componentWillLoad(){n(this.root,{variant:this.accent})}render(){return i(f,null,i("div",{class:`gux-icon gux-${this.accent}`},i("slot",{name:"icon"})),i("div",{class:"gux-content"},i("gux-truncate",{class:"gux-title","max-lines":1},i("slot",{name:"title"})),i("gux-truncate",{class:"gux-message","max-lines":2},i("slot",{name:"message"}))),i("gux-dismiss-button",{onClick:this.onDismissClickHandler.bind(this)}))}onDismissClickHandler(o){o.stopPropagation(),this.guxdismiss.emit().defaultPrevented||this.root.remove()}get root(){return e(this)}};l.style='.gux-focus-ring-focused:focus{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-focus-ring-focused-within:focus-within{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-focus-ring-focused-visible:focus-visible{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-focus-ring-small-focused:focus{outline:2px solid #aac9ff;outline-offset:0}.gux-focus-ring-small-focused-within:focus-within{outline:2px solid #aac9ff;outline-offset:0}.gux-focus-ring-small-focused-visible:focus-visible{outline:2px solid #aac9ff;outline-offset:0}@font-face{font-family:Roboto;font-style:normal;font-weight:300;src:url("./fonts/roboto-v20-latin-300.eot");src:local("Roboto Light"), local("Roboto-Light"), url("./fonts/roboto-v20-latin-300.eot?#iefix") format("embedded-opentype"), url("./fonts/roboto-v20-latin-300.woff2") format("woff2"), url("./fonts/roboto-v20-latin-300.woff") format("woff"), url("./fonts/roboto-v20-latin-300.ttf") format("truetype"), url("./fonts/roboto-v20-latin-300.svg#Roboto") format("svg");}@font-face{font-family:Roboto;font-style:normal;font-weight:400;src:url("./fonts/roboto-v20-latin-regular.eot");src:local("Roboto"), local("Roboto-Regular"), url("./fonts/roboto-v20-latin-regular.eot?#iefix") format("embedded-opentype"), url("./fonts/roboto-v20-latin-regular.woff2") format("woff2"), url("./fonts/roboto-v20-latin-regular.woff") format("woff"), url("./fonts/roboto-v20-latin-regular.ttf") format("truetype"), url("./fonts/roboto-v20-latin-regular.svg#Roboto") format("svg");}@font-face{font-family:Roboto;font-style:italic;font-weight:400;src:url("./fonts/roboto-v20-latin-italic.eot");src:local("Roboto Italic"), local("Roboto-Italic"), url("./fonts/roboto-v20-latin-italic.eot?#iefix") format("embedded-opentype"), url("./fonts/roboto-v20-latin-italic.woff2") format("woff2"), url("./fonts/roboto-v20-latin-italic.woff") format("woff"), url("./fonts/roboto-v20-latin-italic.ttf") format("truetype"), url("./fonts/roboto-v20-latin-italic.svg#Roboto") format("svg");}@font-face{font-family:Roboto;font-style:normal;font-weight:700;src:url("./fonts/roboto-v20-latin-700.eot");src:local("Roboto Bold"), local("Roboto-Bold"), url("./fonts/roboto-v20-latin-700.eot?#iefix") format("embedded-opentype"), url("./fonts/roboto-v20-latin-700.woff2") format("woff2"), url("./fonts/roboto-v20-latin-700.woff") format("woff"), url("./fonts/roboto-v20-latin-700.ttf") format("truetype"), url("./fonts/roboto-v20-latin-700.svg#Roboto") format("svg");}body{font-family:Roboto, sans-serif;font-weight:400;font-size:12px;line-height:20px}h1{font-family:Roboto, sans-serif;font-weight:400;font-weight:300;font-size:24px;line-height:32px}h2{font-family:Roboto, sans-serif;font-weight:400;font-weight:300;font-size:18px;line-height:24px}h3{font-family:Roboto, sans-serif;font-weight:400;font-weight:700;font-size:14px;line-height:20px}h4,h5,h6{font-family:Roboto, sans-serif;font-weight:400;font-size:14px;line-height:20px}.gux-icon-anchor gux-icon{padding-right:2px}a{color:#2a60c8;text-decoration:underline;border-radius:2px}a:hover{color:#2754ac}a:active{color:#23478f}a:focus-visible{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}table a{color:#2a60c8;text-decoration:underline;border-radius:2px;text-decoration:none}table a:hover{color:#2754ac}table a:active{color:#23478f}table a:focus-visible{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}:host{position:relative;display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:flex-start;justify-content:flex-start;width:294px;padding:16px 8px 16px 16px;margin-bottom:4px;color:#2e394c;background:#f6f7f9;border:1px solid #b4bccb;border-color:#b4bccb;border-radius:4px;box-shadow:0 2px 4px rgba(32, 41, 55, 0.24)}.gux-icon{flex:0 1 auto;align-self:auto;order:0;margin:4px}.gux-icon ::slotted(gux-icon){width:24px !important;height:24px !important}.gux-icon.gux-alert{color:#ea0b0b}.gux-icon.gux-warning{color:#ffae00}.gux-icon.gux-positive{color:#3c8527}.gux-icon.gux-neutral{color:#203b73}.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;margin:0 12px 0 8px;color:#2e394c}.gux-content .gux-title,.gux-content .gux-message{flex:1 1 auto;align-self:auto;order:0}.gux-content .gux-title{font-family:Roboto, sans-serif;font-weight:400;font-size:14px;line-height:20px}';export{l as gux_notification_toast_legacy}
@@ -0,0 +1 @@
1
+ import{r as e,h as r,g as o}from"./p-7d26b2e1.js";import{t as a}from"./p-9bf0a4a8.js";import{b as g}from"./p-deee079e.js";import"./p-8a133b9b.js";const i={info:"badge with label: {label}, accent: info","info-bold":"badge with label: {label}, accent: info bold",success:"badge with label: {label}, accent: success","success-bold":"badge with label: {label}, accent: success bold",warning:"badge with label: {label}, accent: warning","warning-bold":"badge with label: {label}, accent: warning bold",error:"badge with label: {label}, accent: error","error-bold":"badge with label: {label}, accent: error error",inherit:"badge with label: {label}"},l=class{constructor(r){e(this,r),this.accent="info",this.bold=!1,this.label=void 0}onSlotChange(e){const r=e.composedPath()[0].assignedNodes();this.label=r.map((e=>e.textContent)).join("")}renderBadgeTitle(){return r("gux-tooltip-title",null,r("span",null,r("slot",{"aria-hidden":"true",onSlotchange:this.onSlotChange.bind(this)})))}renderSrText(){return r("div",{class:"gux-sr-only"},this.i18n(this.getVariant(),{label:this.label}))}getVariant(){return`${this.accent}${this.bold?"-bold":""}`}async componentWillLoad(){a(this.root),this.i18n=await g(this.root,i)}render(){return r("div",{class:{"gux-badge":!0,[`gux-${this.accent}`]:!0,"gux-bold":this.bold}},this.renderBadgeTitle(),this.renderSrText())}get root(){return o(this)}};l.style=":host{display:inline-block;height:fit-content;border-radius:var(--gse-ui-badge-borderRadius)}.gux-badge{display:flex;flex-direction:row;justify-content:center;align-items:center;height:var(--gse-ui-badge-height);padding:var(--gse-ui-badge-padding);border-radius:var(--gse-ui-badge-borderRadius);gap:var(--gse-ui-badge-gap);font-family:var(--gse-ui-badge-text-fontFamily);font-size:var(--gse-ui-badge-text-fontSize);font-weight:var(--gse-ui-badge-text-fontWeight, 600);line-height:var(--gse-ui-badge-text-lineHeight)}.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{color:var(--gse-ui-badge-info-regular-foregroundColor);background-color:var(--gse-ui-badge-info-regular-backgroundColor)}.gux-badge.gux-info.gux-bold{color:var(--gse-ui-badge-info-bold-foregroundColor);background-color:var(--gse-ui-badge-info-bold-backgroundColor)}.gux-badge.gux-error{color:var(--gse-ui-badge-error-regular-foregroundColor);background-color:var(--gse-ui-badge-error-regular-backgroundColor)}.gux-badge.gux-error.gux-bold{color:var(--gse-ui-badge-error-bold-foregroundColor);background-color:var(--gse-ui-badge-error-bold-backgroundColor)}.gux-badge.gux-warning{color:var(--gse-ui-badge-warning-regular-foregroundColor);background-color:var(--gse-ui-badge-warning-regular-backgroundColor)}.gux-badge.gux-warning.gux-bold{color:var(--gse-ui-badge-warning-bold-foregroundColor);background-color:var(--gse-ui-badge-warning-bold-backgroundColor)}.gux-badge.gux-success{color:var(--gse-ui-badge-success-regular-foregroundColor);background-color:var(--gse-ui-badge-success-regular-backgroundColor)}.gux-badge.gux-success.gux-bold{color:var(--gse-ui-badge-success-bold-foregroundColor);background-color:var(--gse-ui-badge-success-bold-backgroundColor)}.gux-badge.gux-inherit{color:inherit;background-color:inherit}";export{l as gux_badge}
@@ -1 +1 @@
1
- import{r as t,c as o,h as a,g as i}from"./p-7d26b2e1.js";import{r as n}from"./p-cbcbd1bb.js";import{t as s}from"./p-f7f3443e.js";const e=class{constructor(a){t(this,a),this.guxdismiss=o(this,"guxdismiss",7),this.size="dynamic",this.trapFocus=!0,this.initialFocus=void 0}handleKeyEvent(t){"Escape"===t.key&&this.onDismissHandler(t)}connectedCallback(){this.triggerElement=document.activeElement}componentWillLoad(){s(this.root,{variant:`${this.size}-${this.trapFocus?"trapfocuson":"trapfocusoff"}`})}componentDidLoad(){var t,o,a;const i=this.getInitialFocusElement();i?null===(t=i.focus)||void 0===t||t.call(i):this.dismissButton&&(null===(a=(o=this.dismissButton).focus)||void 0===a||a.call(o))}render(){const t=this.hasModalTitleSlot(),o=this.hasFooterButtons(),i=n();return a("div",{class:"gux-modal",role:"dialog","aria-modal":"true","aria-labelledby":t?i:null},a("div",{class:`gux-modal-container gux-${this.size}`},this.renderModalTrapFocusEl(),t&&a("h1",{class:"gux-modal-header",id:i},a("slot",{name:"title"})),a("gux-dismiss-button",{onClick:this.onDismissHandler.bind(this),ref:t=>this.dismissButton=t}),a("div",{class:{"gux-modal-content":!0,"gux-no-buttons":!o}},a("p",null,a("slot",{name:"content"}))),o&&a("div",{class:"gux-button-footer"},a("div",{class:"gux-left-align-buttons"},a("slot",{name:"left-align-buttons"})),a("div",{class:"gux-right-align-buttons"},a("slot",{name:"right-align-buttons"}))),this.renderModalTrapFocusEl()))}renderModalTrapFocusEl(){if(this.trapFocus)return a("span",{onFocus:()=>this.dismissButton.focus(),tabindex:"0"})}getInitialFocusElement(){return this.initialFocus?this.root.querySelector(this.initialFocus):void 0}hasModalTitleSlot(){return Boolean(this.root.querySelector('[slot="title"]'))}hasFooterButtons(){return Boolean(this.root.querySelector('[slot="left-align-buttons"]'))||Boolean(this.root.querySelector('[slot="right-align-buttons"]'))}onDismissHandler(t){var o;t.stopPropagation(),this.guxdismiss.emit().defaultPrevented||(this.root.remove(),null===(o=this.triggerElement)||void 0===o||o.focus())}get root(){return i(this)}};e.style=":host .gux-modal{position:fixed;inset:0;z-index:var(--gux-zindex-modal, 1);display:flex;align-items:center;justify-content:center;color:#2e394c;background:rgba(32, 41, 55, 0.8)}:host .gux-modal .gux-modal-container{position:relative;box-sizing:border-box;display:flex;flex-direction:column;justify-content:space-between;padding:40px;background:#fdfdfd;border:1px solid #b4bccb;border-radius:4px;box-shadow:0 8px 24px rgba(32, 41, 55, 0.4)}:host .gux-modal .gux-modal-container.gux-small{width:416px;max-height:min(368px, 100vh - 2 * 24px)}:host .gux-modal .gux-modal-container.gux-medium{width:672px;max-height:min(640px, 100vh - 2 * 24px)}:host .gux-modal .gux-modal-container.gux-large{width:940px;max-height:min(640px, 100vh - 2 * 24px)}:host .gux-modal .gux-modal-container.gux-dynamic{max-width:calc(100vw - 2 * 24px);max-height:calc(100vh - 2 * 24px)}:host .gux-modal .gux-modal-container.gux-dynamic .gux-modal-content{max-height:none}:host .gux-modal .gux-modal-container .gux-modal-header{padding-bottom:24px;margin:0;font-family:Roboto, sans-serif;font-weight:400;font-weight:300;font-size:24px;line-height:32px}:host .gux-modal .gux-modal-container .gux-modal-content{max-height:432px;margin:0 8px 24px;overflow-y:auto}:host .gux-modal .gux-modal-container .gux-modal-content.gux-no-buttons{margin-bottom:0}:host .gux-modal .gux-modal-container .gux-button-footer{display:flex;justify-content:space-between}:host .gux-modal .gux-modal-container .gux-button-footer .gux-left-align-buttons gux-button{padding-right:5px}:host .gux-modal .gux-modal-container .gux-button-footer .gux-right-align-buttons gux-button{padding-left:5px}@media (max-width: 416px){:host .gux-modal .gux-modal-container.gux-small,:host .gux-modal .gux-modal-container.gux-medium,:host .gux-modal .gux-modal-container.gux-large{width:100%;height:100%}}";export{e as gux_modal}
1
+ import{r as t,c as o,h as a,g as i}from"./p-7d26b2e1.js";import{r as n}from"./p-cbcbd1bb.js";import{t as s}from"./p-9bf0a4a8.js";const e=class{constructor(a){t(this,a),this.guxdismiss=o(this,"guxdismiss",7),this.size="dynamic",this.trapFocus=!0,this.initialFocus=void 0}handleKeyEvent(t){"Escape"===t.key&&this.onDismissHandler(t)}connectedCallback(){this.triggerElement=document.activeElement}componentWillLoad(){s(this.root,{variant:`${this.size}-${this.trapFocus?"trapfocuson":"trapfocusoff"}`})}componentDidLoad(){var t,o,a;const i=this.getInitialFocusElement();i?null===(t=i.focus)||void 0===t||t.call(i):this.dismissButton&&(null===(a=(o=this.dismissButton).focus)||void 0===a||a.call(o))}render(){const t=this.hasModalTitleSlot(),o=this.hasFooterButtons(),i=n();return a("div",{class:"gux-modal",role:"dialog","aria-modal":"true","aria-labelledby":t?i:null},a("div",{class:`gux-modal-container gux-${this.size}`},this.renderModalTrapFocusEl(),t&&a("h1",{class:"gux-modal-header",id:i},a("slot",{name:"title"})),a("gux-dismiss-button",{onClick:this.onDismissHandler.bind(this),ref:t=>this.dismissButton=t}),a("div",{class:{"gux-modal-content":!0,"gux-no-buttons":!o}},a("p",null,a("slot",{name:"content"}))),o&&a("div",{class:"gux-button-footer"},a("div",{class:"gux-left-align-buttons"},a("slot",{name:"left-align-buttons"})),a("div",{class:"gux-right-align-buttons"},a("slot",{name:"right-align-buttons"}))),this.renderModalTrapFocusEl()))}renderModalTrapFocusEl(){if(this.trapFocus)return a("span",{onFocus:()=>this.dismissButton.focus(),tabindex:"0"})}getInitialFocusElement(){return this.initialFocus?this.root.querySelector(this.initialFocus):void 0}hasModalTitleSlot(){return Boolean(this.root.querySelector('[slot="title"]'))}hasFooterButtons(){return Boolean(this.root.querySelector('[slot="left-align-buttons"]'))||Boolean(this.root.querySelector('[slot="right-align-buttons"]'))}onDismissHandler(t){var o;t.stopPropagation(),this.guxdismiss.emit().defaultPrevented||(this.root.remove(),null===(o=this.triggerElement)||void 0===o||o.focus())}get root(){return i(this)}};e.style=":host .gux-modal{position:fixed;inset:0;z-index:var(--gux-zindex-modal, 1);display:flex;align-items:center;justify-content:center;color:#2e394c;background:rgba(32, 41, 55, 0.8)}:host .gux-modal .gux-modal-container{position:relative;box-sizing:border-box;display:flex;flex-direction:column;justify-content:space-between;padding:40px;background:#fdfdfd;border:1px solid #b4bccb;border-radius:4px;box-shadow:0 8px 24px rgba(32, 41, 55, 0.4)}:host .gux-modal .gux-modal-container.gux-small{width:416px;max-height:min(368px, 100vh - 2 * 24px)}:host .gux-modal .gux-modal-container.gux-medium{width:672px;max-height:min(640px, 100vh - 2 * 24px)}:host .gux-modal .gux-modal-container.gux-large{width:940px;max-height:min(640px, 100vh - 2 * 24px)}:host .gux-modal .gux-modal-container.gux-dynamic{max-width:calc(100vw - 2 * 24px);max-height:calc(100vh - 2 * 24px)}:host .gux-modal .gux-modal-container.gux-dynamic .gux-modal-content{max-height:none}:host .gux-modal .gux-modal-container .gux-modal-header{padding-bottom:24px;margin:0;font-family:Roboto, sans-serif;font-weight:400;font-weight:300;font-size:24px;line-height:32px}:host .gux-modal .gux-modal-container .gux-modal-content{max-height:432px;margin:0 8px 24px;overflow-y:auto}:host .gux-modal .gux-modal-container .gux-modal-content.gux-no-buttons{margin-bottom:0}:host .gux-modal .gux-modal-container .gux-button-footer{display:flex;justify-content:space-between}:host .gux-modal .gux-modal-container .gux-button-footer .gux-left-align-buttons gux-button{padding-right:5px}:host .gux-modal .gux-modal-container .gux-button-footer .gux-right-align-buttons gux-button{padding-left:5px}@media (max-width: 416px){:host .gux-modal .gux-modal-container.gux-small,:host .gux-modal .gux-modal-container.gux-medium,:host .gux-modal .gux-modal-container.gux-large{width:100%;height:100%}}";export{e as gux_modal}
@@ -1 +1 @@
1
- import{r as t,d as e,h as i,H as a,g as o}from"./p-7d26b2e1.js";import{O as n}from"./p-13dd4c6b.js";import{O as r}from"./p-f34ce7dc.js";import{t as s}from"./p-f7f3443e.js";import{g as l}from"./p-3e6097e5.js";function u(t,e){[].concat(t).forEach((t=>{null!=t&&(t.accent=e)}))}function h(t,...e){e.flat().filter((t=>null!==t&&!t.hasAttribute("icon-only"))).forEach((e=>e.iconOnly=t))}var c=function(t,e,i,a){var o,n=arguments.length,r=n<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,a);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,i,r):o(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const d=class{constructor(e){t(this,e),this.minimumSizes={full:0,iconOnly:0,condensed:0},this.displayedLayout="full",this.hasContextDivider=!1}onMutation(){this.hasContextDivider=this.needsContextDivider()}recordLayoutMinSize(){e((()=>{var t,e;const i=0|(null===(t=this.filterSlot)||void 0===t?void 0:t.clientWidth),a=0|(null===(e=this.actionsContainer)||void 0===e?void 0:e.clientWidth);this.minimumSizes[this.displayedLayout]=i+a+72}))}get actionsContainer(){return this.root.shadowRoot.querySelector(".gux-contextual-permanent-primary")}get filterSlot(){return l(this.root,"search-and-filter")}get menuActionSlot(){return l(this.root,"menu-actions")}get permanentSlot(){return l(this.root,"permanent-actions")}get contextualSlot(){return l(this.root,"contextual-actions")}get primaryAction(){var t;return null===(t=this.root)||void 0===t?void 0:t.querySelector("gux-table-toolbar-custom-action[slot]")}get permanentActions(){var t,e;if(null===(t=this.permanentSlot)||void 0===t?void 0:t.hasChildNodes)return Array.from(null===(e=this.permanentSlot)||void 0===e?void 0:e.querySelectorAll("gux-table-toolbar-action, gux-table-toolbar-custom-action"))}get menuActionsItems(){var t,e;if(null===(t=this.menuActionSlot)||void 0===t?void 0:t.hasChildNodes)return Array.from(null===(e=this.menuActionSlot)||void 0===e?void 0:e.querySelectorAll("gux-table-toolbar-action, gux-table-toolbar-custom-action"))}get contextualActions(){var t,e;if(null===(t=this.contextualSlot)||void 0===t?void 0:t.hasChildNodes)return Array.from(null===(e=this.contextualSlot)||void 0===e?void 0:e.querySelectorAll("gux-table-toolbar-action, gux-table-toolbar-custom-action"))}get filterActions(){var t,e;if(null===(t=this.filterSlot)||void 0===t?void 0:t.hasChildNodes)return Array.from(null===(e=this.filterSlot)||void 0===e?void 0:e.querySelectorAll("gux-table-toolbar-action, gux-table-toolbar-custom-action"))}get allFilterContextual(){var t;return null===(t=this.filterActions)||void 0===t?void 0:t.concat(this.contextualActions)}needsContextDivider(){var t;return(null===(t=this.contextualActions)||void 0===t?void 0:t.length)&&this.contextualSlot!==this.root.lastElementChild}renderMenu(){var t;return Boolean((null===(t=this.menuActionsItems)||void 0===t?void 0:t.length)||"condensed"==this.displayedLayout)}renderFullLayout(){this.displayedLayout="full",h(!1,this.primaryAction,...this.allFilterContextual,...this.permanentActions)}renderIconOnlyLayoutScaleDown(t){this.displayedLayout="iconOnly",h(!0,this.primaryAction,...this.allFilterContextual,...this.permanentActions),this.iconOnlySectionWidth=t}renderIconOnlyLayoutScaleUp(){var t,e;this.displayedLayout="iconOnly",u(this.permanentActions,"secondary"),u(this.primaryAction,"primary"),h(!0,this.primaryAction,...this.allFilterContextual,...this.permanentActions),this.permanentActions&&(null===(t=this.root)||void 0===t||t.appendChild(this.permanentSlot)),this.primaryAction&&(null===(e=this.root)||void 0===e||e.appendChild(this.primaryAction))}renderCondensedLayout(){var t,e;this.displayedLayout="condensed",this.permanentActions&&(null===(t=this.menuActionSlot)||void 0===t||t.appendChild(this.permanentSlot)),this.primaryAction&&(null===(e=this.menuActionSlot)||void 0===e||e.appendChild(this.primaryAction)),h(!0,...this.allFilterContextual),h(!1,...this.permanentActions),h(!1,this.primaryAction),u(this.menuActionsItems,"ghost")}componentWillLoad(){s(this.root),this.hasContextDivider=this.needsContextDivider()}componentDidLoad(){this.recordLayoutMinSize(),this.checkResponsiveLayout(),u(this.menuActionsItems,"ghost")}componentDidUpdate(){this.recordLayoutMinSize(),this.checkResponsiveLayout()}checkResponsiveLayout(){e((()=>{var t;const e=0|(null===(t=this.actionsContainer)||void 0===t?void 0:t.clientWidth),i=this.root.clientWidth;i<=this.minimumSizes.full&&i>=this.minimumSizes.iconOnly?"full"==this.displayedLayout?this.renderIconOnlyLayoutScaleDown(e):"condensed"==this.displayedLayout&&this.renderIconOnlyLayoutScaleUp():i<=this.minimumSizes.iconOnly?this.renderCondensedLayout():this.minimumSizes.iconOnly>this.minimumSizes.full?this.renderIconOnlyLayoutScaleUp():this.renderFullLayout()}))}render(){return i(a,{role:"toolbar","aria-orientation":"horizontal"},i("div",{class:"search-filter-container"},i("slot",{name:"search-and-filter"})),i("div",{class:"section-spacing"}),i("div",{class:"gux-contextual-permanent-primary"},i("div",{class:{"gux-contextual-wrapper":this.hasContextDivider}},i("slot",{name:"contextual-actions"})),i("div",{class:"gux-permanent-menu-primary-wrapper"},i("slot",{name:"permanent-actions"}),i("gux-table-toolbar-menu-button",{"show-menu":this.renderMenu()},i("slot",{name:"menu-actions"})),i("slot",{name:"primary-action"}))))}get root(){return o(this)}};c([r({childList:!0,subtree:!0})],d.prototype,"onMutation",null),c([n()],d.prototype,"checkResponsiveLayout",null),d.style=":host{display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;max-height:var(--gse-ui-dataTableItems-tableToolbar-height)}:host .search-filter-container{width:260px;min-width:260px;padding-right:var(--gse-ui-dataTableItems-tableToolbar-gap)}:host slot[name=search-and-filter]::slotted(*){display:flex;flex-direction:row;gap:var(--gse-ui-dataTableItems-tableToolbar-tableToolbarGroup-gap);align-content:flex-start;align-items:center}:host .section-spacing{display:flex;flex-direction:row;min-width:72px}:host .gux-contextual-permanent-primary{display:flex;flex-direction:row;justify-content:space-between;padding-left:var(--gse-ui-dataTableItems-tableToolbar-gap)}:host .gux-contextual-permanent-primary slot[name=permanent-actions]::slotted(*),:host .gux-contextual-permanent-primary slot[name=contextual-actions]::slotted(*){display:flex;flex-direction:row;flex-wrap:nowrap;gap:var(--gse-ui-dataTableItems-tableToolbar-tableToolbarGroup-gap);align-content:flex-end;align-items:center}:host .gux-contextual-permanent-primary .gux-contextual-wrapper{padding-right:var(--gse-ui-dataTableItems-tableToolbar-gap);border-right:var(--gse-ui-dataTableItems-tableToolbar-divider-width) solid var(--gse-ui-dataTableItems-tableToolbar-dividerColor)}:host .gux-contextual-permanent-primary .gux-permanent-menu-primary-wrapper{display:flex;flex-direction:row;flex-wrap:nowrap;gap:var(--gse-ui-dataTableItems-tableToolbar-tableToolbarGroup-gap);margin-left:var(--gse-ui-dataTableItems-tableToolbar-gap)}";export{d as gux_table_toolbar}
1
+ import{r as t,d as e,h as i,H as a,g as o}from"./p-7d26b2e1.js";import{O as n}from"./p-13dd4c6b.js";import{O as r}from"./p-f34ce7dc.js";import{t as s}from"./p-9bf0a4a8.js";import{g as l}from"./p-3e6097e5.js";function u(t,e){[].concat(t).forEach((t=>{null!=t&&(t.accent=e)}))}function h(t,...e){e.flat().filter((t=>null!==t&&!t.hasAttribute("icon-only"))).forEach((e=>e.iconOnly=t))}var c=function(t,e,i,a){var o,n=arguments.length,r=n<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,a);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,i,r):o(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const d=class{constructor(e){t(this,e),this.minimumSizes={full:0,iconOnly:0,condensed:0},this.displayedLayout="full",this.hasContextDivider=!1}onMutation(){this.hasContextDivider=this.needsContextDivider()}recordLayoutMinSize(){e((()=>{var t,e;const i=0|(null===(t=this.filterSlot)||void 0===t?void 0:t.clientWidth),a=0|(null===(e=this.actionsContainer)||void 0===e?void 0:e.clientWidth);this.minimumSizes[this.displayedLayout]=i+a+72}))}get actionsContainer(){return this.root.shadowRoot.querySelector(".gux-contextual-permanent-primary")}get filterSlot(){return l(this.root,"search-and-filter")}get menuActionSlot(){return l(this.root,"menu-actions")}get permanentSlot(){return l(this.root,"permanent-actions")}get contextualSlot(){return l(this.root,"contextual-actions")}get primaryAction(){var t;return null===(t=this.root)||void 0===t?void 0:t.querySelector("gux-table-toolbar-custom-action[slot]")}get permanentActions(){var t,e;if(null===(t=this.permanentSlot)||void 0===t?void 0:t.hasChildNodes)return Array.from(null===(e=this.permanentSlot)||void 0===e?void 0:e.querySelectorAll("gux-table-toolbar-action, gux-table-toolbar-custom-action"))}get menuActionsItems(){var t,e;if(null===(t=this.menuActionSlot)||void 0===t?void 0:t.hasChildNodes)return Array.from(null===(e=this.menuActionSlot)||void 0===e?void 0:e.querySelectorAll("gux-table-toolbar-action, gux-table-toolbar-custom-action"))}get contextualActions(){var t,e;if(null===(t=this.contextualSlot)||void 0===t?void 0:t.hasChildNodes)return Array.from(null===(e=this.contextualSlot)||void 0===e?void 0:e.querySelectorAll("gux-table-toolbar-action, gux-table-toolbar-custom-action"))}get filterActions(){var t,e;if(null===(t=this.filterSlot)||void 0===t?void 0:t.hasChildNodes)return Array.from(null===(e=this.filterSlot)||void 0===e?void 0:e.querySelectorAll("gux-table-toolbar-action, gux-table-toolbar-custom-action"))}get allFilterContextual(){var t;return null===(t=this.filterActions)||void 0===t?void 0:t.concat(this.contextualActions)}needsContextDivider(){var t;return(null===(t=this.contextualActions)||void 0===t?void 0:t.length)&&this.contextualSlot!==this.root.lastElementChild}renderMenu(){var t;return Boolean((null===(t=this.menuActionsItems)||void 0===t?void 0:t.length)||"condensed"==this.displayedLayout)}renderFullLayout(){this.displayedLayout="full",h(!1,this.primaryAction,...this.allFilterContextual,...this.permanentActions)}renderIconOnlyLayoutScaleDown(t){this.displayedLayout="iconOnly",h(!0,this.primaryAction,...this.allFilterContextual,...this.permanentActions),this.iconOnlySectionWidth=t}renderIconOnlyLayoutScaleUp(){var t,e;this.displayedLayout="iconOnly",u(this.permanentActions,"secondary"),u(this.primaryAction,"primary"),h(!0,this.primaryAction,...this.allFilterContextual,...this.permanentActions),this.permanentActions&&(null===(t=this.root)||void 0===t||t.appendChild(this.permanentSlot)),this.primaryAction&&(null===(e=this.root)||void 0===e||e.appendChild(this.primaryAction))}renderCondensedLayout(){var t,e;this.displayedLayout="condensed",this.permanentActions&&(null===(t=this.menuActionSlot)||void 0===t||t.appendChild(this.permanentSlot)),this.primaryAction&&(null===(e=this.menuActionSlot)||void 0===e||e.appendChild(this.primaryAction)),h(!0,...this.allFilterContextual),h(!1,...this.permanentActions),h(!1,this.primaryAction),u(this.menuActionsItems,"ghost")}componentWillLoad(){s(this.root),this.hasContextDivider=this.needsContextDivider()}componentDidLoad(){this.recordLayoutMinSize(),this.checkResponsiveLayout(),u(this.menuActionsItems,"ghost")}componentDidUpdate(){this.recordLayoutMinSize(),this.checkResponsiveLayout()}checkResponsiveLayout(){e((()=>{var t;const e=0|(null===(t=this.actionsContainer)||void 0===t?void 0:t.clientWidth),i=this.root.clientWidth;i<=this.minimumSizes.full&&i>=this.minimumSizes.iconOnly?"full"==this.displayedLayout?this.renderIconOnlyLayoutScaleDown(e):"condensed"==this.displayedLayout&&this.renderIconOnlyLayoutScaleUp():i<=this.minimumSizes.iconOnly?this.renderCondensedLayout():this.minimumSizes.iconOnly>this.minimumSizes.full?this.renderIconOnlyLayoutScaleUp():this.renderFullLayout()}))}render(){return i(a,{role:"toolbar","aria-orientation":"horizontal"},i("div",{class:"search-filter-container"},i("slot",{name:"search-and-filter"})),i("div",{class:"section-spacing"}),i("div",{class:"gux-contextual-permanent-primary"},i("div",{class:{"gux-contextual-wrapper":this.hasContextDivider}},i("slot",{name:"contextual-actions"})),i("div",{class:"gux-permanent-menu-primary-wrapper"},i("slot",{name:"permanent-actions"}),i("gux-table-toolbar-menu-button",{"show-menu":this.renderMenu()},i("slot",{name:"menu-actions"})),i("slot",{name:"primary-action"}))))}get root(){return o(this)}};c([r({childList:!0,subtree:!0})],d.prototype,"onMutation",null),c([n()],d.prototype,"checkResponsiveLayout",null),d.style=":host{display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;max-height:var(--gse-ui-dataTableItems-tableToolbar-height)}:host .search-filter-container{width:260px;min-width:260px;padding-right:var(--gse-ui-dataTableItems-tableToolbar-gap)}:host slot[name=search-and-filter]::slotted(*){display:flex;flex-direction:row;gap:var(--gse-ui-dataTableItems-tableToolbar-tableToolbarGroup-gap);align-content:flex-start;align-items:center}:host .section-spacing{display:flex;flex-direction:row;min-width:72px}:host .gux-contextual-permanent-primary{display:flex;flex-direction:row;justify-content:space-between;padding-left:var(--gse-ui-dataTableItems-tableToolbar-gap)}:host .gux-contextual-permanent-primary slot[name=permanent-actions]::slotted(*),:host .gux-contextual-permanent-primary slot[name=contextual-actions]::slotted(*){display:flex;flex-direction:row;flex-wrap:nowrap;gap:var(--gse-ui-dataTableItems-tableToolbar-tableToolbarGroup-gap);align-content:flex-end;align-items:center}:host .gux-contextual-permanent-primary .gux-contextual-wrapper{padding-right:var(--gse-ui-dataTableItems-tableToolbar-gap);border-right:var(--gse-ui-dataTableItems-tableToolbar-divider-width) solid var(--gse-ui-dataTableItems-tableToolbar-dividerColor)}:host .gux-contextual-permanent-primary .gux-permanent-menu-primary-wrapper{display:flex;flex-direction:row;flex-wrap:nowrap;gap:var(--gse-ui-dataTableItems-tableToolbar-tableToolbarGroup-gap);margin-left:var(--gse-ui-dataTableItems-tableToolbar-gap)}";export{d as gux_table_toolbar}
@@ -1 +1 @@
1
- import{r as t,c as o,f as e,d as i,h as s,H as a,g as l}from"./p-7d26b2e1.js";import{b as n}from"./p-deee079e.js";import{w as r}from"./p-76ff3e75.js";import{r as f}from"./p-cbcbd1bb.js";import{t as h}from"./p-f7f3443e.js";import{t as c}from"./p-1aa11396.js";import"./p-8a133b9b.js";const u=class{constructor(i){t(this,i),this.guxselectionchanged=o(this,"guxselectionchanged",7),this.guxsortchanged=o(this,"guxsortchanged",7),this.slotObserver=new MutationObserver((()=>e(this))),this.tableId=f("gux-table"),this.columnsWidths={},this.isVerticalScroll=!1,this.columnResizeHover=!1,this.compact=!1,this.objectTable=!1,this.emptyMessage=void 0,this.resizableColumns=void 0}async componentWillLoad(){h(this.root),this.i18n=await n(this.root,c)}componentDidLoad(){this.resizableColumns&&this.prepareResizableColumns(),this.prepareSelectableRows(),this.checkVerticalScroll(),!this.resizeObserver&&window.ResizeObserver&&(this.resizeObserver=new ResizeObserver((()=>{i((()=>{this.checkVerticalScroll()}))}))),this.resizeObserver&&(this.resizeObserver.observe(this.tableContainer),this.resizeObserver.observe(this.slottedTable)),this.slotObserver.observe(this.slottedTable,{subtree:!0,childList:!0})}checkVerticalScroll(){const t=this.tableContainer;this.isVerticalScroll=t.scrollHeight>t.clientHeight}disconnectedCallback(){this.resizeObserver&&(this.resizeObserver.unobserve(this.tableContainer),this.resizeObserver.unobserve(this.slottedTable)),this.resizableColumns&&document.getElementById(`${this.tableId}-resizable-styles`).remove()}onInternalAllRowSelectChange(t){t.stopPropagation(),this.handleSelectAllRows(t.detail)}onInternalRowSelectChange(t){t.stopPropagation();const o=t.target;o.selected=t.detail,this.handleRowSelection(o)}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 o=this.rowCheckboxes,e=o.filter((t=>!t.hasAttribute("disabled"))),i=e.filter((t=>t.selected)),s=Boolean(o.length),a=i.length===e.length,l=0===i.length;t.selected=s&&a,t.setIndeterminate(s&&!a&&!l)}}handleSelectAllRows(t){const o=this.selectAllCheckbox;this.rowCheckboxes.forEach((e=>{o.selected=t,e.hasAttribute("disabled")||(e.selected=t,this.updateRowSelection(e))})),this.emitSelectionEvent()}handleRowSelection(t){this.updateRowSelection(t),this.updateSelectAllBoxState(),this.emitSelectionEvent()}emitSelectionEvent(){this.guxselectionchanged.emit(this.getSelectedInternal())}updateRowSelection(t){const o=t.closest("tr");t.selected?o.setAttribute("data-selected-row",""):o.removeAttribute("data-selected-row")}prepareResizableColumns(){const t=document.createElement("style");t.id=`${this.tableId}-resizable-styles`,document.querySelector("head").appendChild(t),this.calculateColumnWidths(this.tableColumns).slice(0,-1).forEach((t=>this.columnsWidths[t.name]=t.width)),this.setResizableColumnsStyles()}updateResizeState(t){if(this.columnResizeState){const o=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===o?Object.assign(Object.assign({},t),{width:e}):t));this.columnsWidths[o]=i.find((t=>t.name===o)).width,this.setResizableColumnsStyles()}else this.columnResizeHover=!1,r("th",t,(o=>{this.tableColumns.length-1!==o.cellIndex&&this.isInResizeZone(t,o)&&(this.columnResizeHover=!0)}))}maybeStartResizing(t){r("th",t,(o=>{this.isInResizeZone(t,o)&&(this.columnResizeState={resizableColumn:o,columnResizeMouseStartX:t.pageX,resizableColumnInitialWidth:o.clientWidth})}))}stopResizing(){this.columnResizeState&&(this.columnResizeState=null)}isInResizeZone(t,o){return o.getBoundingClientRect().right-t.clientX<3}calculateColumnWidths(t){return t.map((t=>({name:t.dataset.columnName,width:t.clientWidth})))}setResizableColumnsStyles(){const t=document.getElementById(`${this.tableId}-resizable-styles`);let o="";Object.keys(this.columnsWidths).forEach((t=>{o+=`[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=o}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 s(a,{"gs-table-id":this.tableId,"gs-obj-table":this.objectTable,"gs-compact":this.compact},s("div",{class:"gux-table"},s("div",{tabindex:this.isVerticalScroll?"0":"-1",id:this.tableId,class:this.tableContainerClasses},s("slot",{name:"data"})),this.isTableEmpty&&s("div",{class:"gux-empty-table"},this.emptyMessage||this.i18n("emptyMessage"))))}get root(){return l(this)}};u.style='.gux-focus-ring-focused:focus{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-focus-ring-focused-within:focus-within{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-focus-ring-focused-visible:focus-visible{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-focus-ring-small-focused:focus{outline:2px solid #aac9ff;outline-offset:0}.gux-focus-ring-small-focused-within:focus-within{outline:2px solid #aac9ff;outline-offset:0}.gux-focus-ring-small-focused-visible:focus-visible{outline:2px solid #aac9ff;outline-offset:0}@font-face{font-family:Roboto;font-style:normal;font-weight:300;src:url("./fonts/roboto-v20-latin-300.eot");src:local("Roboto Light"), local("Roboto-Light"), url("./fonts/roboto-v20-latin-300.eot?#iefix") format("embedded-opentype"), url("./fonts/roboto-v20-latin-300.woff2") format("woff2"), url("./fonts/roboto-v20-latin-300.woff") format("woff"), url("./fonts/roboto-v20-latin-300.ttf") format("truetype"), url("./fonts/roboto-v20-latin-300.svg#Roboto") format("svg");}@font-face{font-family:Roboto;font-style:normal;font-weight:400;src:url("./fonts/roboto-v20-latin-regular.eot");src:local("Roboto"), local("Roboto-Regular"), url("./fonts/roboto-v20-latin-regular.eot?#iefix") format("embedded-opentype"), url("./fonts/roboto-v20-latin-regular.woff2") format("woff2"), url("./fonts/roboto-v20-latin-regular.woff") format("woff"), url("./fonts/roboto-v20-latin-regular.ttf") format("truetype"), url("./fonts/roboto-v20-latin-regular.svg#Roboto") format("svg");}@font-face{font-family:Roboto;font-style:italic;font-weight:400;src:url("./fonts/roboto-v20-latin-italic.eot");src:local("Roboto Italic"), local("Roboto-Italic"), url("./fonts/roboto-v20-latin-italic.eot?#iefix") format("embedded-opentype"), url("./fonts/roboto-v20-latin-italic.woff2") format("woff2"), url("./fonts/roboto-v20-latin-italic.woff") format("woff"), url("./fonts/roboto-v20-latin-italic.ttf") format("truetype"), url("./fonts/roboto-v20-latin-italic.svg#Roboto") format("svg");}@font-face{font-family:Roboto;font-style:normal;font-weight:700;src:url("./fonts/roboto-v20-latin-700.eot");src:local("Roboto Bold"), local("Roboto-Bold"), url("./fonts/roboto-v20-latin-700.eot?#iefix") format("embedded-opentype"), url("./fonts/roboto-v20-latin-700.woff2") format("woff2"), url("./fonts/roboto-v20-latin-700.woff") format("woff"), url("./fonts/roboto-v20-latin-700.ttf") format("truetype"), url("./fonts/roboto-v20-latin-700.svg#Roboto") format("svg");}body{font-family:Roboto, sans-serif;font-weight:400;font-size:12px;line-height:20px}h1{font-family:Roboto, sans-serif;font-weight:400;font-weight:300;font-size:24px;line-height:32px}h2{font-family:Roboto, sans-serif;font-weight:400;font-weight:300;font-size:18px;line-height:24px}h3{font-family:Roboto, sans-serif;font-weight:400;font-weight:700;font-size:14px;line-height:20px}h4,h5,h6{font-family:Roboto, sans-serif;font-weight:400;font-size:14px;line-height:20px}.gux-icon-anchor gux-icon{padding-right:2px}a{color:#2a60c8;text-decoration:underline;border-radius:2px}a:hover{color:#2754ac}a:active{color:#23478f}a:focus-visible{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}table a{color:#2a60c8;text-decoration:underline;border-radius:2px;text-decoration:none}table a:hover{color:#2754ac}table a:active{color:#23478f}table a:focus-visible{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}:host{display:block;isolation:isolate}:host .gux-table{position:relative;height:inherit}:host .gux-table .gux-table-container{max-height:100%;overflow:auto;scrollbar-color:var(--gse-ui-dataTableItems-scrollbar-foregroundColor);scrollbar-width:thin}: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:calc(100% - var(--gse-ui-dataTableItems-header-default-height));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}
1
+ import{r as t,c as o,f as e,d as i,h as s,H as a,g as l}from"./p-7d26b2e1.js";import{b as n}from"./p-deee079e.js";import{w as r}from"./p-76ff3e75.js";import{r as f}from"./p-cbcbd1bb.js";import{t as h}from"./p-9bf0a4a8.js";import{t as c}from"./p-1aa11396.js";import"./p-8a133b9b.js";const u=class{constructor(i){t(this,i),this.guxselectionchanged=o(this,"guxselectionchanged",7),this.guxsortchanged=o(this,"guxsortchanged",7),this.slotObserver=new MutationObserver((()=>e(this))),this.tableId=f("gux-table"),this.columnsWidths={},this.isVerticalScroll=!1,this.columnResizeHover=!1,this.compact=!1,this.objectTable=!1,this.emptyMessage=void 0,this.resizableColumns=void 0}async componentWillLoad(){h(this.root),this.i18n=await n(this.root,c)}componentDidLoad(){this.resizableColumns&&this.prepareResizableColumns(),this.prepareSelectableRows(),this.checkVerticalScroll(),!this.resizeObserver&&window.ResizeObserver&&(this.resizeObserver=new ResizeObserver((()=>{i((()=>{this.checkVerticalScroll()}))}))),this.resizeObserver&&(this.resizeObserver.observe(this.tableContainer),this.resizeObserver.observe(this.slottedTable)),this.slotObserver.observe(this.slottedTable,{subtree:!0,childList:!0})}checkVerticalScroll(){const t=this.tableContainer;this.isVerticalScroll=t.scrollHeight>t.clientHeight}disconnectedCallback(){this.resizeObserver&&(this.resizeObserver.unobserve(this.tableContainer),this.resizeObserver.unobserve(this.slottedTable)),this.resizableColumns&&document.getElementById(`${this.tableId}-resizable-styles`).remove()}onInternalAllRowSelectChange(t){t.stopPropagation(),this.handleSelectAllRows(t.detail)}onInternalRowSelectChange(t){t.stopPropagation();const o=t.target;o.selected=t.detail,this.handleRowSelection(o)}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 o=this.rowCheckboxes,e=o.filter((t=>!t.hasAttribute("disabled"))),i=e.filter((t=>t.selected)),s=Boolean(o.length),a=i.length===e.length,l=0===i.length;t.selected=s&&a,t.setIndeterminate(s&&!a&&!l)}}handleSelectAllRows(t){const o=this.selectAllCheckbox;this.rowCheckboxes.forEach((e=>{o.selected=t,e.hasAttribute("disabled")||(e.selected=t,this.updateRowSelection(e))})),this.emitSelectionEvent()}handleRowSelection(t){this.updateRowSelection(t),this.updateSelectAllBoxState(),this.emitSelectionEvent()}emitSelectionEvent(){this.guxselectionchanged.emit(this.getSelectedInternal())}updateRowSelection(t){const o=t.closest("tr");t.selected?o.setAttribute("data-selected-row",""):o.removeAttribute("data-selected-row")}prepareResizableColumns(){const t=document.createElement("style");t.id=`${this.tableId}-resizable-styles`,document.querySelector("head").appendChild(t),this.calculateColumnWidths(this.tableColumns).slice(0,-1).forEach((t=>this.columnsWidths[t.name]=t.width)),this.setResizableColumnsStyles()}updateResizeState(t){if(this.columnResizeState){const o=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===o?Object.assign(Object.assign({},t),{width:e}):t));this.columnsWidths[o]=i.find((t=>t.name===o)).width,this.setResizableColumnsStyles()}else this.columnResizeHover=!1,r("th",t,(o=>{this.tableColumns.length-1!==o.cellIndex&&this.isInResizeZone(t,o)&&(this.columnResizeHover=!0)}))}maybeStartResizing(t){r("th",t,(o=>{this.isInResizeZone(t,o)&&(this.columnResizeState={resizableColumn:o,columnResizeMouseStartX:t.pageX,resizableColumnInitialWidth:o.clientWidth})}))}stopResizing(){this.columnResizeState&&(this.columnResizeState=null)}isInResizeZone(t,o){return o.getBoundingClientRect().right-t.clientX<3}calculateColumnWidths(t){return t.map((t=>({name:t.dataset.columnName,width:t.clientWidth})))}setResizableColumnsStyles(){const t=document.getElementById(`${this.tableId}-resizable-styles`);let o="";Object.keys(this.columnsWidths).forEach((t=>{o+=`[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=o}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 s(a,{"gs-table-id":this.tableId,"gs-obj-table":this.objectTable,"gs-compact":this.compact},s("div",{class:"gux-table"},s("div",{tabindex:this.isVerticalScroll?"0":"-1",id:this.tableId,class:this.tableContainerClasses},s("slot",{name:"data"})),this.isTableEmpty&&s("div",{class:"gux-empty-table"},this.emptyMessage||this.i18n("emptyMessage"))))}get root(){return l(this)}};u.style='.gux-focus-ring-focused:focus{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-focus-ring-focused-within:focus-within{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-focus-ring-focused-visible:focus-visible{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-focus-ring-small-focused:focus{outline:2px solid #aac9ff;outline-offset:0}.gux-focus-ring-small-focused-within:focus-within{outline:2px solid #aac9ff;outline-offset:0}.gux-focus-ring-small-focused-visible:focus-visible{outline:2px solid #aac9ff;outline-offset:0}@font-face{font-family:Roboto;font-style:normal;font-weight:300;src:url("./fonts/roboto-v20-latin-300.eot");src:local("Roboto Light"), local("Roboto-Light"), url("./fonts/roboto-v20-latin-300.eot?#iefix") format("embedded-opentype"), url("./fonts/roboto-v20-latin-300.woff2") format("woff2"), url("./fonts/roboto-v20-latin-300.woff") format("woff"), url("./fonts/roboto-v20-latin-300.ttf") format("truetype"), url("./fonts/roboto-v20-latin-300.svg#Roboto") format("svg");}@font-face{font-family:Roboto;font-style:normal;font-weight:400;src:url("./fonts/roboto-v20-latin-regular.eot");src:local("Roboto"), local("Roboto-Regular"), url("./fonts/roboto-v20-latin-regular.eot?#iefix") format("embedded-opentype"), url("./fonts/roboto-v20-latin-regular.woff2") format("woff2"), url("./fonts/roboto-v20-latin-regular.woff") format("woff"), url("./fonts/roboto-v20-latin-regular.ttf") format("truetype"), url("./fonts/roboto-v20-latin-regular.svg#Roboto") format("svg");}@font-face{font-family:Roboto;font-style:italic;font-weight:400;src:url("./fonts/roboto-v20-latin-italic.eot");src:local("Roboto Italic"), local("Roboto-Italic"), url("./fonts/roboto-v20-latin-italic.eot?#iefix") format("embedded-opentype"), url("./fonts/roboto-v20-latin-italic.woff2") format("woff2"), url("./fonts/roboto-v20-latin-italic.woff") format("woff"), url("./fonts/roboto-v20-latin-italic.ttf") format("truetype"), url("./fonts/roboto-v20-latin-italic.svg#Roboto") format("svg");}@font-face{font-family:Roboto;font-style:normal;font-weight:700;src:url("./fonts/roboto-v20-latin-700.eot");src:local("Roboto Bold"), local("Roboto-Bold"), url("./fonts/roboto-v20-latin-700.eot?#iefix") format("embedded-opentype"), url("./fonts/roboto-v20-latin-700.woff2") format("woff2"), url("./fonts/roboto-v20-latin-700.woff") format("woff"), url("./fonts/roboto-v20-latin-700.ttf") format("truetype"), url("./fonts/roboto-v20-latin-700.svg#Roboto") format("svg");}body{font-family:Roboto, sans-serif;font-weight:400;font-size:12px;line-height:20px}h1{font-family:Roboto, sans-serif;font-weight:400;font-weight:300;font-size:24px;line-height:32px}h2{font-family:Roboto, sans-serif;font-weight:400;font-weight:300;font-size:18px;line-height:24px}h3{font-family:Roboto, sans-serif;font-weight:400;font-weight:700;font-size:14px;line-height:20px}h4,h5,h6{font-family:Roboto, sans-serif;font-weight:400;font-size:14px;line-height:20px}.gux-icon-anchor gux-icon{padding-right:2px}a{color:#2a60c8;text-decoration:underline;border-radius:2px}a:hover{color:#2754ac}a:active{color:#23478f}a:focus-visible{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}table a{color:#2a60c8;text-decoration:underline;border-radius:2px;text-decoration:none}table a:hover{color:#2754ac}table a:active{color:#23478f}table a:focus-visible{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}:host{display:block;isolation:isolate}:host .gux-table{position:relative;height:inherit}:host .gux-table .gux-table-container{max-height:100%;overflow:auto;scrollbar-color:var(--gse-ui-dataTableItems-scrollbar-foregroundColor);scrollbar-width:thin}: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:calc(100% - var(--gse-ui-dataTableItems-header-default-height));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}
@@ -1 +1 @@
1
- import{r as t,c as s,h as i,H as e,g as o}from"./p-7d26b2e1.js";import{s as n,c as a,a as h,b as r,h as d,d as l,e as c,f as u,i as p,j as g,o as x}from"./p-55cf6d81.js";import{b as m}from"./p-deee079e.js";import{w as f}from"./p-76ff3e75.js";import{s as v}from"./p-d176c2ae.js";import{t as b}from"./p-f7f3443e.js";import{b as w}from"./p-091f51f6.js";import"./p-8a133b9b.js";const O={add:"Add {name}",noMatches:"No matches",loading:"Loading..."},j=class{constructor(i){t(this,i),this.internallistboxoptionsupdated=s(this,"internallistboxoptionsupdated",7),this.value=void 0,this.loading=!1,this.filter="",this.textInput="",this.filterType="none",this.emptyMessage=void 0,this.listboxOptions=[],this.allListboxOptionsFiltered=void 0,this.hasExactMatch=!1}onFocus(){n(this.root)}onBlur(){a(this.root)}selectNewCustomOption(t){this.updateValue(t.detail)}onKeydown(t){var s;switch(t.key){case"Enter":return t.preventDefault(),void((null===(s=this.optionCreateElement)||void 0===s?void 0:s.active)?(this.optionCreateElement.guxEmitInternalCreateNewOption(),w((()=>{n(this.root)}))):p(this.root,(t=>this.updateValue(t))));case"ArrowDown":return t.preventDefault(),void(c(this.root)?(t.stopPropagation(),u(this.root)):r(this.root));case"ArrowUp":return t.preventDefault(),void(d(this.root)?(t.stopPropagation(),l(this.root)):h(this.root));case"Home":return t.preventDefault(),void r(this.root);case"End":return t.preventDefault(),void h(this.root);case" ":return void t.preventDefault()}1!==t.key.length||g(this.root,t.key)}onKeyup(t){var s;" "!==t.key||((null===(s=this.optionCreateElement)||void 0===s?void 0:s.active)?(this.optionCreateElement.guxEmitInternalCreateNewOption(),w((()=>{n(this.root)}))):p(this.root,(t=>this.updateValue(t))))}onMousemove(){a(this.root)}onClick(t){f("gux-option-multi",t,(t=>{x(t,(t=>this.updateValue(t)))}))}async guxSelectActive(){p(this.root,(t=>this.updateValue(t)))}getHasExactMatch(){let t=!1;return this.hasExactMatch=!1,this.listboxOptions.forEach((s=>{var i,e,o;(null===(o=null===(e=null===(i=s.querySelector("[gux-slot-container]"))||void 0===i?void 0:i.textContent)||void 0===e?void 0:e.toLowerCase())||void 0===o?void 0:o.trim())==this.textInput.toLowerCase().trim()&&(t=!0,this.hasExactMatch=!0)})),t}updateOptionMultiCreateValue(){this.optionCreateElement&&(this.optionCreateElement.value=this.textInput,this.optionCreateElement.filtered=!this.textInput||this.getHasExactMatch())}getSelectedValues(){return this.value?this.value.split(","):[]}updateOnSlotChange(){this.setListboxOptions(),this.updateListboxOptions(),n(this.root)}getOptionCreateElement(){this.optionCreateElement=this.root.querySelector("gux-create-option")}setListboxOptions(){this.listboxOptions=Array.from(this.root.children).filter((t=>"GUX-OPTION-MULTI"===t.tagName)),this.internallistboxoptionsupdated.emit()}updateListboxOptions(){this.listboxOptions.forEach((t=>{t.selected=this.getSelectedValues().includes(t.value),"custom"!==this.filterType&&(t.filtered=!t.textContent.toLowerCase().startsWith(this.textInput.toLowerCase()))}))}updateValue(t){if(this.getSelectedValues().includes(t))this.value=this.getSelectedValues().filter((s=>s!==t)).join(",");else{const s=[...this.getSelectedValues(),t];this.value=s.join(",")}v(this.root,"input"),v(this.root,"change")}async componentWillLoad(){b(this.root),this.i18n=await m(this.root,O),this.setListboxOptions(),this.getOptionCreateElement()}componentWillRender(){this.setListboxOptions(),this.updateListboxOptions(),this.allListboxOptionsFiltered=0===this.listboxOptions.filter((t=>!t.filtered)).length}renderHiddenSlot(){return i("div",{hidden:!0},i("slot",{onSlotchange:()=>this.setListboxOptions()}))}renderLoading(){return[i("div",{class:"gux-message-container"},i("gux-radial-loading",{context:"modal"}),i("span",null,this.i18n("loading"))),this.renderHiddenSlot()]}renderAllListboxOptionsFiltered(){if(this.allListboxOptionsFiltered)return[i("div",{class:"gux-message-container"},i("div",{class:"gux-no-matches"},this.emptyMessage||this.i18n("noMatches"))),this.renderHiddenSlot()]}renderCreateOptionSlot(){return i("slot",{name:"create"})}render(){return this.loading?this.renderLoading():i(e,{role:"listbox","aria-multiselectable":"true",tabindex:0},i("slot",{onSlotchange:()=>this.updateOnSlotChange()}),this.renderAllListboxOptionsFiltered(),this.renderCreateOptionSlot())}get root(){return o(this)}static get watchers(){return{textInput:["updateOptionMultiCreateValue"]}}};j.style=":host{box-sizing:border-box;display:block;max-height:20rem;padding:8px 0;margin:0;overflow-y:auto;color:#2e394c;background:#fdfdfd;border:1px solid #b4bccb;border-radius:4px;outline:none}:host(:focus-visible){outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-message-container{display:flex;flex-direction:column;flex-wrap:nowrap;align-content:stretch;align-items:center;justify-content:center}.gux-message-container .gux-no-matches{box-sizing:border-box;height:32px;padding:8px 16px;color:#2e394c}";export{j as gux_listbox_multi}
1
+ import{r as t,c as s,h as i,H as e,g as o}from"./p-7d26b2e1.js";import{s as n,c as a,a as h,b as r,h as d,d as l,e as c,f as u,i as p,j as g,o as x}from"./p-55cf6d81.js";import{b as m}from"./p-deee079e.js";import{w as f}from"./p-76ff3e75.js";import{s as b}from"./p-d176c2ae.js";import{t as v}from"./p-9bf0a4a8.js";import{b as w}from"./p-091f51f6.js";import"./p-8a133b9b.js";const O={add:"Add {name}",noMatches:"No matches",loading:"Loading..."},j=class{constructor(i){t(this,i),this.internallistboxoptionsupdated=s(this,"internallistboxoptionsupdated",7),this.value=void 0,this.loading=!1,this.filter="",this.textInput="",this.filterType="none",this.emptyMessage=void 0,this.listboxOptions=[],this.allListboxOptionsFiltered=void 0,this.hasExactMatch=!1}onFocus(){n(this.root)}onBlur(){a(this.root)}selectNewCustomOption(t){this.updateValue(t.detail)}onKeydown(t){var s;switch(t.key){case"Enter":return t.preventDefault(),void((null===(s=this.optionCreateElement)||void 0===s?void 0:s.active)?(this.optionCreateElement.guxEmitInternalCreateNewOption(),w((()=>{n(this.root)}))):p(this.root,(t=>this.updateValue(t))));case"ArrowDown":return t.preventDefault(),void(c(this.root)?(t.stopPropagation(),u(this.root)):r(this.root));case"ArrowUp":return t.preventDefault(),void(d(this.root)?(t.stopPropagation(),l(this.root)):h(this.root));case"Home":return t.preventDefault(),void r(this.root);case"End":return t.preventDefault(),void h(this.root);case" ":return void t.preventDefault()}1!==t.key.length||g(this.root,t.key)}onKeyup(t){var s;" "!==t.key||((null===(s=this.optionCreateElement)||void 0===s?void 0:s.active)?(this.optionCreateElement.guxEmitInternalCreateNewOption(),w((()=>{n(this.root)}))):p(this.root,(t=>this.updateValue(t))))}onMousemove(){a(this.root)}onClick(t){f("gux-option-multi",t,(t=>{x(t,(t=>this.updateValue(t)))}))}async guxSelectActive(){p(this.root,(t=>this.updateValue(t)))}getHasExactMatch(){let t=!1;return this.hasExactMatch=!1,this.listboxOptions.forEach((s=>{var i,e,o;(null===(o=null===(e=null===(i=s.querySelector("[gux-slot-container]"))||void 0===i?void 0:i.textContent)||void 0===e?void 0:e.toLowerCase())||void 0===o?void 0:o.trim())==this.textInput.toLowerCase().trim()&&(t=!0,this.hasExactMatch=!0)})),t}updateOptionMultiCreateValue(){this.optionCreateElement&&(this.optionCreateElement.value=this.textInput,this.optionCreateElement.filtered=!this.textInput||this.getHasExactMatch())}getSelectedValues(){return this.value?this.value.split(","):[]}updateOnSlotChange(){this.setListboxOptions(),this.updateListboxOptions(),n(this.root)}getOptionCreateElement(){this.optionCreateElement=this.root.querySelector("gux-create-option")}setListboxOptions(){this.listboxOptions=Array.from(this.root.children).filter((t=>"GUX-OPTION-MULTI"===t.tagName)),this.internallistboxoptionsupdated.emit()}updateListboxOptions(){this.listboxOptions.forEach((t=>{t.selected=this.getSelectedValues().includes(t.value),"custom"!==this.filterType&&(t.filtered=!t.textContent.toLowerCase().startsWith(this.textInput.toLowerCase()))}))}updateValue(t){if(this.getSelectedValues().includes(t))this.value=this.getSelectedValues().filter((s=>s!==t)).join(",");else{const s=[...this.getSelectedValues(),t];this.value=s.join(",")}b(this.root,"input"),b(this.root,"change")}async componentWillLoad(){v(this.root),this.i18n=await m(this.root,O),this.setListboxOptions(),this.getOptionCreateElement()}componentWillRender(){this.setListboxOptions(),this.updateListboxOptions(),this.allListboxOptionsFiltered=0===this.listboxOptions.filter((t=>!t.filtered)).length}renderHiddenSlot(){return i("div",{hidden:!0},i("slot",{onSlotchange:()=>this.setListboxOptions()}))}renderLoading(){return[i("div",{class:"gux-message-container"},i("gux-radial-loading",{context:"modal"}),i("span",null,this.i18n("loading"))),this.renderHiddenSlot()]}renderAllListboxOptionsFiltered(){if(this.allListboxOptionsFiltered)return[i("div",{class:"gux-message-container"},i("div",{class:"gux-no-matches"},this.emptyMessage||this.i18n("noMatches"))),this.renderHiddenSlot()]}renderCreateOptionSlot(){return i("slot",{name:"create"})}render(){return this.loading?this.renderLoading():i(e,{role:"listbox","aria-multiselectable":"true",tabindex:0},i("slot",{onSlotchange:()=>this.updateOnSlotChange()}),this.renderAllListboxOptionsFiltered(),this.renderCreateOptionSlot())}get root(){return o(this)}static get watchers(){return{textInput:["updateOptionMultiCreateValue"]}}};j.style=":host{box-sizing:border-box;display:block;max-height:20rem;padding:8px 0;margin:0;overflow-y:auto;color:#2e394c;background:#fdfdfd;border:1px solid #b4bccb;border-radius:4px;outline:none}:host(:focus-visible){outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-message-container{display:flex;flex-direction:column;flex-wrap:nowrap;align-content:stretch;align-items:center;justify-content:center}.gux-message-container .gux-no-matches{box-sizing:border-box;height:32px;padding:8px 16px;color:#2e394c}";export{j as gux_listbox_multi}
@@ -1 +1 @@
1
- import{r as e,d as t,h as i,g as n}from"./p-7d26b2e1.js";import{a}from"./p-091f51f6.js";import{t as o}from"./p-f7f3443e.js";const s=class{constructor(t){e(this,t),this.hasAdditionalGuidance=void 0,this.loadingMessageSize=void 0}updateLoadingMessageSize(){t((()=>{const e=this.root.clientWidth;this.loadingMessageSize=e<=160?"small":e<=300?"medium":"large"}))}componentWillLoad(){o(this.root)}componentDidLoad(){!this.resizeObserver&&window.ResizeObserver&&(this.resizeObserver=new ResizeObserver((()=>{this.updateLoadingMessageSize()}))),this.resizeObserver&&this.resizeObserver.observe(this.root),a((()=>{this.updateLoadingMessageSize()}),500)}disconnectedCallback(){this.resizeObserver&&this.resizeObserver.unobserve(this.root)}render(){return i("div",{class:{"gux-container":!0,[`gux-${this.loadingMessageSize}`]:!0},role:"alert","aria-live":"assertive"},i("slot",{name:"progress"}),i("slot",{name:"primary-message"}),i("slot",{name:"additional-guidance"}))}get root(){return n(this)}};s.style=":host{display:flex;flex-direction:column;align-items:center;justify-content:center}.gux-container{display:flex;flex-direction:column;align-items:center;justify-content:center}.gux-container slot[name='primary-message']{color:#364154;text-align:center}.gux-container slot[name='additional-guidance']{color:#596373;text-align:center}.gux-container.gux-small,.gux-container.gux-medium{padding:8px 0 4px}.gux-container.gux-small slot[name='primary-message'],.gux-container.gux-medium slot[name='primary-message']{font-family:Roboto, sans-serif;font-weight:400;font-weight:700;font-size:14px;line-height:20px}.gux-container.gux-small slot[name='additional-guidance'],.gux-container.gux-medium slot[name='additional-guidance']{font-family:Roboto, sans-serif;font-weight:400;font-size:11px;line-height:16px}.gux-container.gux-large{padding:16px 0 4px}.gux-container.gux-large slot[name='primary-message']{font-family:Roboto, sans-serif;font-weight:400;font-weight:300;font-size:24px;line-height:32px}.gux-container.gux-large slot[name='additional-guidance']{font-family:Roboto, sans-serif;font-weight:400;font-size:14px;line-height:24px}";export{s as gux_loading_message_beta}
1
+ import{r as e,d as t,h as i,g as n}from"./p-7d26b2e1.js";import{a}from"./p-091f51f6.js";import{t as o}from"./p-9bf0a4a8.js";const s=class{constructor(t){e(this,t),this.hasAdditionalGuidance=void 0,this.loadingMessageSize=void 0}updateLoadingMessageSize(){t((()=>{const e=this.root.clientWidth;this.loadingMessageSize=e<=160?"small":e<=300?"medium":"large"}))}componentWillLoad(){o(this.root)}componentDidLoad(){!this.resizeObserver&&window.ResizeObserver&&(this.resizeObserver=new ResizeObserver((()=>{this.updateLoadingMessageSize()}))),this.resizeObserver&&this.resizeObserver.observe(this.root),a((()=>{this.updateLoadingMessageSize()}),500)}disconnectedCallback(){this.resizeObserver&&this.resizeObserver.unobserve(this.root)}render(){return i("div",{class:{"gux-container":!0,[`gux-${this.loadingMessageSize}`]:!0},role:"alert","aria-live":"assertive"},i("slot",{name:"progress"}),i("slot",{name:"primary-message"}),i("slot",{name:"additional-guidance"}))}get root(){return n(this)}};s.style=":host{display:flex;flex-direction:column;align-items:center;justify-content:center}.gux-container{display:flex;flex-direction:column;align-items:center;justify-content:center}.gux-container slot[name='primary-message']{color:#364154;text-align:center}.gux-container slot[name='additional-guidance']{color:#596373;text-align:center}.gux-container.gux-small,.gux-container.gux-medium{padding:8px 0 4px}.gux-container.gux-small slot[name='primary-message'],.gux-container.gux-medium slot[name='primary-message']{font-family:Roboto, sans-serif;font-weight:400;font-weight:700;font-size:14px;line-height:20px}.gux-container.gux-small slot[name='additional-guidance'],.gux-container.gux-medium slot[name='additional-guidance']{font-family:Roboto, sans-serif;font-weight:400;font-size:11px;line-height:16px}.gux-container.gux-large{padding:16px 0 4px}.gux-container.gux-large slot[name='primary-message']{font-family:Roboto, sans-serif;font-weight:400;font-weight:300;font-size:24px;line-height:32px}.gux-container.gux-large slot[name='additional-guidance']{font-family:Roboto, sans-serif;font-weight:400;font-size:14px;line-height:24px}";export{s as gux_loading_message_beta}
@@ -1 +1 @@
1
- const t="4.0.0-beta.23",e=20,n=3e4,o=[function(t){const[e,n,...o]=t.split(".");return{name:"spark-library",metadata:{fullVersion:`${e}.${n}.${o.join(".")}`,majorVersion:e,minorVersion:`${e}.${n}`}}}(t)];function i(){const t=window.newrelic;if(t){for(let r=0;r<e;r++){if(0==o.length)return void setTimeout(i,n);const e=o.shift();t.addPageAction(e.name,Object.assign(Object.assign({},e.metadata),{queueDepth:o.length}))}setTimeout(i,n)}}let r=!1;function a(e,n){window.newrelic&&(r||(r=!0,i()),document.contains(e)&&o.push({name:"spark-component",metadata:Object.assign(Object.assign({},n),{component:e.tagName.toLowerCase(),version:t})}))}export{a as t}
1
+ const t="4.0.0-beta.24",e=20,n=3e4,o=[function(t){const[e,n,...o]=t.split(".");return{name:"spark-library",metadata:{fullVersion:`${e}.${n}.${o.join(".")}`,majorVersion:e,minorVersion:`${e}.${n}`}}}(t)];function i(){const t=window.newrelic;if(t){for(let r=0;r<e;r++){if(0==o.length)return void setTimeout(i,n);const e=o.shift();t.addPageAction(e.name,Object.assign(Object.assign({},e.metadata),{queueDepth:o.length}))}setTimeout(i,n)}}let r=!1;function a(e,n){window.newrelic&&(r||(r=!0,i()),document.contains(e)&&o.push({name:"spark-component",metadata:Object.assign(Object.assign({},n),{component:e.tagName.toLowerCase(),version:t})}))}export{a as t}
@@ -1 +1 @@
1
- import{r as t,c as n,h as e,g as i}from"./p-7d26b2e1.js";import{t as o}from"./p-f7f3443e.js";import{b as s}from"./p-deee079e.js";import{a}from"./p-3701eff0.js";import"./p-8a133b9b.js";const r={eraseBtnAria:"Clear search text",navigateNextBtn:"Highlight next match",navigatePreviousBtn:"Highlight previous match",totalMatches:"{currentMatch, number} of {matchCount, number}",clear:"Clear"},c=class{constructor(e){t(this,e),this.guxcurrentmatchchanged=n(this,"guxcurrentmatchchanged",7),this.matchCount=0,this.currentMatch=0,this.disabled=void 0,this.value=void 0}async clear(){this.disabled||(this.matchCount=0,this.currentMatch=0,this.value="",this.resetInputSlottedElement(),this.emitCurrentMatchChanged(),this.inputSlottedElement.focus())}async componentWillLoad(){o(this.root),this.i18n=await s(this.root,r),this.inputSlottedElement=this.root.querySelector("input"),this.disabled=this.inputSlottedElement.disabled,this.value=this.inputSlottedElement.value,this.disabledObserver=a(this.inputSlottedElement,(t=>{this.disabled=t})),this.inputSlottedElement.addEventListener("input",(t=>this.onInput(t)))}disconnectedCallback(){this.disabledObserver&&this.disabledObserver.disconnect()}render(){return e("div",{class:{"gux-content-search":!0,"gux-disabled":this.disabled}},e("div",{class:"gux-search-icon"},e("gux-icon",{decorative:!0,"icon-name":"search"})),e("slot",null),this.getNavigationPanel())}getNavigationPanel(){if(this.showNavigationPanel()){const t=this.disableNavigationPanel();return e("div",{class:"gux-content-control-panel"},e("div",{class:{"gux-navigation-panel":!0,"gux-navigation-disabled":t}},e("span",{class:{"gux-navigation-result":!0,"gux-navigation-result-disabled":t}},this.matchCountResult()),e("button",{type:"button",class:"gux-previous-button",title:this.i18n("navigatePreviousBtn"),"aria-label":this.i18n("navigatePreviousBtn"),onClick:()=>this.previousClick(),disabled:t},e("gux-icon",{decorative:!0,"icon-name":"arrow-solid-up"})),e("button",{type:"button",class:"gux-next-button",title:this.i18n("navigateNextBtn"),"aria-label":this.i18n("navigateNextBtn"),onClick:()=>this.nextClick(),disabled:t},e("gux-icon",{decorative:!0,"icon-name":"arrow-solid-down"}))),e("button",{class:"gux-clear-button",tabIndex:-1,type:"button",title:this.i18n("clear"),onClick:()=>{this.clear()}},e("gux-icon",{"icon-name":"close",decorative:!0})))}return null}matchCountResult(){return this.i18n("totalMatches",{currentMatch:this.getNormalizedCurrentMatch(),matchCount:this.getNormalizedMatchCount()})}showNavigationPanel(){return""!==this.value}disableNavigationPanel(){return this.disabled||this.getNormalizedMatchCount()<=0}getNormalizedMatchCount(){return this.matchCount&&Number.isInteger(this.matchCount)&&this.matchCount>=0?Number(this.matchCount):0}getNormalizedCurrentMatch(){return this.currentMatch&&Number.isInteger(this.currentMatch)&&this.currentMatch>=0&&this.currentMatch<=this.getNormalizedMatchCount()&&this.getNormalizedMatchCount()>0?Number(this.currentMatch):0}resetInputSlottedElement(){this.inputSlottedElement.value="",this.inputSlottedElement.dispatchEvent(new InputEvent("input",{bubbles:!0,cancelable:!0})),this.inputSlottedElement.dispatchEvent(new InputEvent("change",{bubbles:!0}))}nextClick(){this.disableNavigationPanel()||(this.currentMatch=this.getNormalizedCurrentMatch()===this.getNormalizedMatchCount()?1:this.getNormalizedCurrentMatch()+1,this.emitCurrentMatchChanged())}previousClick(){this.disableNavigationPanel()||(this.currentMatch=1===this.getNormalizedCurrentMatch()||0===this.getNormalizedCurrentMatch()?this.getNormalizedMatchCount():this.getNormalizedCurrentMatch()-1,this.emitCurrentMatchChanged())}onInput(t){this.value=t.target.value}emitCurrentMatchChanged(){this.guxcurrentmatchchanged.emit(this.getNormalizedCurrentMatch())}get root(){return i(this)}};c.style=":host{display:inline-block;width:300px;min-width:300px;color:#596373}::slotted(input){box-sizing:border-box;width:100%;height:32px;padding:4px 12px;font-family:inherit;font-size:12px;line-height:1.6667;background-color:#fdfdfd;background-image:none;border:1px solid #6b7585;border-radius:2px;flex-basis:100%;flex-shrink:1;min-width:0;height:22px;padding:0;color:#2e394c;background-color:#f6f7f9;border:0;border-radius:0;outline:none}::slotted(input)::placeholder{color:#596373}::slotted(input).gux-focused,::slotted(input):focus-visible{border:1px solid #2a60c8;outline:none;box-shadow:0 0 4px rgba(170, 201, 255, 0.5)}::slotted(input).gux-focused,::slotted(input):focus{border:0;outline:none;box-shadow:none}.gux-content-search{box-sizing:border-box;display:flex;flex-direction:row;width:100%;height:32px;padding:4px 0;margin:4px 0;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-content-search.gux-disabled{pointer-events:none;cursor:default;opacity:0.5}.gux-content-search:focus-visible,.gux-content-search:focus-within{border:1px solid #2a60c8;outline:none;box-shadow:0 0 4px #75a8ff}.gux-content-search .gux-search-icon{display:flex;flex-shrink:0;align-items:center;padding:0 4px 0 8px}.gux-content-search .gux-search-icon:disabled{pointer-events:none;cursor:default;opacity:0.5}.gux-content-search .gux-search-icon gux-icon{width:16px;height:16px}.gux-content-search .gux-content-control-panel{box-sizing:border-box;display:flex;flex-grow:1;flex-shrink:0;align-content:center;align-items:center;justify-content:flex-end;height:22px;padding:0;line-height:1.6667}.gux-content-search .gux-content-control-panel gux-icon{width:16px;height:16px}.gux-content-search .gux-content-control-panel button{display:block;align-items:center;overflow:hidden;color:#596373;cursor:pointer;background:none;border:none;border-radius:4px;outline:none}.gux-content-search .gux-content-control-panel button:disabled{pointer-events:none;cursor:default;opacity:0.5}.gux-content-search .gux-content-control-panel button:not(:disabled):hover,.gux-content-search .gux-content-control-panel button:not(:disabled):focus-visible{color:#2e394c}.gux-content-search .gux-content-control-panel button:not(.gux-clear-button):focus-visible:enabled{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-content-search .gux-content-control-panel button.gux-clear-button{flex-shrink:0;align-items:center;padding-right:0;padding-left:0;margin-right:8px;margin-left:8px}.gux-content-search .gux-content-control-panel button.gux-clear-button gux-icon{width:16px;height:16px}.gux-content-search .gux-content-control-panel .gux-navigation-disabled{pointer-events:auto;cursor:default;opacity:0.5}.gux-content-search .gux-content-control-panel .gux-navigation-panel{display:flex;align-content:center;align-items:center;justify-content:flex-end;border-right:1px solid #596373}.gux-content-search .gux-content-control-panel .gux-navigation-panel .gux-navigation-result{align-items:center;padding-left:8px;font-family:inherit;font-size:12px;white-space:nowrap}.gux-content-search .gux-content-control-panel .gux-navigation-panel .gux-previous-button{flex-shrink:0;align-items:center;padding-right:0;padding-left:0;margin-left:4px}.gux-content-search .gux-content-control-panel .gux-navigation-panel .gux-next-button{flex-shrink:0;align-items:center;padding-right:0;padding-left:0;margin-right:4px}";export{c as gux_content_search}
1
+ import{r as t,c as n,h as e,g as i}from"./p-7d26b2e1.js";import{t as o}from"./p-9bf0a4a8.js";import{b as s}from"./p-deee079e.js";import{a}from"./p-3701eff0.js";import"./p-8a133b9b.js";const r={eraseBtnAria:"Clear search text",navigateNextBtn:"Highlight next match",navigatePreviousBtn:"Highlight previous match",totalMatches:"{currentMatch, number} of {matchCount, number}",clear:"Clear"},c=class{constructor(e){t(this,e),this.guxcurrentmatchchanged=n(this,"guxcurrentmatchchanged",7),this.matchCount=0,this.currentMatch=0,this.disabled=void 0,this.value=void 0}async clear(){this.disabled||(this.matchCount=0,this.currentMatch=0,this.value="",this.resetInputSlottedElement(),this.emitCurrentMatchChanged(),this.inputSlottedElement.focus())}async componentWillLoad(){o(this.root),this.i18n=await s(this.root,r),this.inputSlottedElement=this.root.querySelector("input"),this.disabled=this.inputSlottedElement.disabled,this.value=this.inputSlottedElement.value,this.disabledObserver=a(this.inputSlottedElement,(t=>{this.disabled=t})),this.inputSlottedElement.addEventListener("input",(t=>this.onInput(t)))}disconnectedCallback(){this.disabledObserver&&this.disabledObserver.disconnect()}render(){return e("div",{class:{"gux-content-search":!0,"gux-disabled":this.disabled}},e("div",{class:"gux-search-icon"},e("gux-icon",{decorative:!0,"icon-name":"search"})),e("slot",null),this.getNavigationPanel())}getNavigationPanel(){if(this.showNavigationPanel()){const t=this.disableNavigationPanel();return e("div",{class:"gux-content-control-panel"},e("div",{class:{"gux-navigation-panel":!0,"gux-navigation-disabled":t}},e("span",{class:{"gux-navigation-result":!0,"gux-navigation-result-disabled":t}},this.matchCountResult()),e("button",{type:"button",class:"gux-previous-button",title:this.i18n("navigatePreviousBtn"),"aria-label":this.i18n("navigatePreviousBtn"),onClick:()=>this.previousClick(),disabled:t},e("gux-icon",{decorative:!0,"icon-name":"arrow-solid-up"})),e("button",{type:"button",class:"gux-next-button",title:this.i18n("navigateNextBtn"),"aria-label":this.i18n("navigateNextBtn"),onClick:()=>this.nextClick(),disabled:t},e("gux-icon",{decorative:!0,"icon-name":"arrow-solid-down"}))),e("button",{class:"gux-clear-button",tabIndex:-1,type:"button",title:this.i18n("clear"),onClick:()=>{this.clear()}},e("gux-icon",{"icon-name":"close",decorative:!0})))}return null}matchCountResult(){return this.i18n("totalMatches",{currentMatch:this.getNormalizedCurrentMatch(),matchCount:this.getNormalizedMatchCount()})}showNavigationPanel(){return""!==this.value}disableNavigationPanel(){return this.disabled||this.getNormalizedMatchCount()<=0}getNormalizedMatchCount(){return this.matchCount&&Number.isInteger(this.matchCount)&&this.matchCount>=0?Number(this.matchCount):0}getNormalizedCurrentMatch(){return this.currentMatch&&Number.isInteger(this.currentMatch)&&this.currentMatch>=0&&this.currentMatch<=this.getNormalizedMatchCount()&&this.getNormalizedMatchCount()>0?Number(this.currentMatch):0}resetInputSlottedElement(){this.inputSlottedElement.value="",this.inputSlottedElement.dispatchEvent(new InputEvent("input",{bubbles:!0,cancelable:!0})),this.inputSlottedElement.dispatchEvent(new InputEvent("change",{bubbles:!0}))}nextClick(){this.disableNavigationPanel()||(this.currentMatch=this.getNormalizedCurrentMatch()===this.getNormalizedMatchCount()?1:this.getNormalizedCurrentMatch()+1,this.emitCurrentMatchChanged())}previousClick(){this.disableNavigationPanel()||(this.currentMatch=1===this.getNormalizedCurrentMatch()||0===this.getNormalizedCurrentMatch()?this.getNormalizedMatchCount():this.getNormalizedCurrentMatch()-1,this.emitCurrentMatchChanged())}onInput(t){this.value=t.target.value}emitCurrentMatchChanged(){this.guxcurrentmatchchanged.emit(this.getNormalizedCurrentMatch())}get root(){return i(this)}};c.style=":host{display:inline-block;width:300px;min-width:300px;color:#596373}::slotted(input){box-sizing:border-box;width:100%;height:32px;padding:4px 12px;font-family:inherit;font-size:12px;line-height:1.6667;background-color:#fdfdfd;background-image:none;border:1px solid #6b7585;border-radius:2px;flex-basis:100%;flex-shrink:1;min-width:0;height:22px;padding:0;color:#2e394c;background-color:#f6f7f9;border:0;border-radius:0;outline:none}::slotted(input)::placeholder{color:#596373}::slotted(input).gux-focused,::slotted(input):focus-visible{border:1px solid #2a60c8;outline:none;box-shadow:0 0 4px rgba(170, 201, 255, 0.5)}::slotted(input).gux-focused,::slotted(input):focus{border:0;outline:none;box-shadow:none}.gux-content-search{box-sizing:border-box;display:flex;flex-direction:row;width:100%;height:32px;padding:4px 0;margin:4px 0;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-content-search.gux-disabled{pointer-events:none;cursor:default;opacity:0.5}.gux-content-search:focus-visible,.gux-content-search:focus-within{border:1px solid #2a60c8;outline:none;box-shadow:0 0 4px #75a8ff}.gux-content-search .gux-search-icon{display:flex;flex-shrink:0;align-items:center;padding:0 4px 0 8px}.gux-content-search .gux-search-icon:disabled{pointer-events:none;cursor:default;opacity:0.5}.gux-content-search .gux-search-icon gux-icon{width:16px;height:16px}.gux-content-search .gux-content-control-panel{box-sizing:border-box;display:flex;flex-grow:1;flex-shrink:0;align-content:center;align-items:center;justify-content:flex-end;height:22px;padding:0;line-height:1.6667}.gux-content-search .gux-content-control-panel gux-icon{width:16px;height:16px}.gux-content-search .gux-content-control-panel button{display:block;align-items:center;overflow:hidden;color:#596373;cursor:pointer;background:none;border:none;border-radius:4px;outline:none}.gux-content-search .gux-content-control-panel button:disabled{pointer-events:none;cursor:default;opacity:0.5}.gux-content-search .gux-content-control-panel button:not(:disabled):hover,.gux-content-search .gux-content-control-panel button:not(:disabled):focus-visible{color:#2e394c}.gux-content-search .gux-content-control-panel button:not(.gux-clear-button):focus-visible:enabled{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-content-search .gux-content-control-panel button.gux-clear-button{flex-shrink:0;align-items:center;padding-right:0;padding-left:0;margin-right:8px;margin-left:8px}.gux-content-search .gux-content-control-panel button.gux-clear-button gux-icon{width:16px;height:16px}.gux-content-search .gux-content-control-panel .gux-navigation-disabled{pointer-events:auto;cursor:default;opacity:0.5}.gux-content-search .gux-content-control-panel .gux-navigation-panel{display:flex;align-content:center;align-items:center;justify-content:flex-end;border-right:1px solid #596373}.gux-content-search .gux-content-control-panel .gux-navigation-panel .gux-navigation-result{align-items:center;padding-left:8px;font-family:inherit;font-size:12px;white-space:nowrap}.gux-content-search .gux-content-control-panel .gux-navigation-panel .gux-previous-button{flex-shrink:0;align-items:center;padding-right:0;padding-left:0;margin-left:4px}.gux-content-search .gux-content-control-panel .gux-navigation-panel .gux-next-button{flex-shrink:0;align-items:center;padding-right:0;padding-left:0;margin-right:4px}";export{c as gux_content_search}
@@ -1 +1 @@
1
- import{r as o,h as t,H as e,g as i}from"./p-7d26b2e1.js";import{c as r,o as n}from"./p-3f5341ea.js";import{O as a}from"./p-f34ce7dc.js";import{o as l}from"./p-3701eff0.js";import{p as s}from"./p-c10e41a9.js";import{h as f}from"./p-08bc2e6b.js";import{G as u,a as g,g as h,v as d,b as p}from"./p-b3c9fd06.js";import{a as c,G as x}from"./p-a733f4ca.js";import{t as b}from"./p-f7f3443e.js";import"./p-cbcbd1bb.js";import"./p-d0805f56.js";import"./p-d176c2ae.js";const m=class{constructor(t){o(this,t),this.displayUnits=void 0,this.valueInTooltip=void 0,this.labelPosition=void 0,this.computedLabelPosition="above",this.disabled=void 0,this.required=void 0,this.hasError=!1,this.hasHelp=!1,this.value=void 0,this.active=void 0,this.valueWatcherId=void 0}onInput(o){this.updateValue(o.target.value)}onMousedown(){this.disabled||(this.active=!0)}onMouseup(){this.active=!1}onMutation(){this.hasError=f(this.root,"error"),this.hasHelp=f(this.root,"help")}componentWillLoad(){this.setInput(),this.setLabel(),this.hasError=f(this.root,"error"),this.hasHelp=f(this.root,"help"),b(this.root,{variant:this.variant})}componentDidLoad(){this.updatePosition()}disconnectedCallback(){this.disabledObserver&&this.disabledObserver.disconnect(),this.requiredObserver&&this.requiredObserver.disconnect(),clearInterval(this.valueWatcherId)}render(){return t(e,{class:{"gux-active":this.active}},t(c,{labelPosition:this.computedLabelPosition},t(x,{position:this.computedLabelPosition,required:this.required},t("slot",{name:"label",onSlotchange:()=>this.setLabel()})),t("div",{class:"gux-input-and-error-container"},this.renderRangeInput(),t(u,{show:this.hasError},t("slot",{name:"error"})),t(g,{show:!this.hasError&&this.hasHelp},t("slot",{name:"help"})))))}get variant(){return this.labelPosition?this.labelPosition.toLowerCase():"none"}setInput(){this.input=h(this.root,'input[type="range"][slot="input"]'),s(this.input),this.disabled=r(this.input),this.required=this.input.required,this.value=this.input.value,this.disabledObserver=n(this.input,(o=>{this.disabled=o})),this.requiredObserver=l(this.input,(o=>{this.required=o})),clearInterval(this.valueWatcherId),this.valueWatcherId=setInterval((()=>{this.value!==this.input.value&&this.updateValue(this.input.value)}),100),d(this.root,this.input)}setLabel(){this.label=this.root.querySelector('label[slot="label"]'),this.computedLabelPosition=p(this.label,this.labelPosition)}renderRangeInput(){return t("div",{class:{"gux-range-input-container":!0,"gux-disabled":this.disabled}},t("div",{class:"gux-range"},t("div",{class:"gux-track"},t("div",{class:"gux-progress",ref:o=>this.progressElement=o})),t("slot",{name:"input"}),t("div",{class:{"gux-range-tooltip-container":!0,"gux-hidden":!this.valueInTooltip},ref:o=>this.sliderTooltipContainer=o},t("div",{class:"gux-range-tooltip",ref:o=>this.sliderTooltip=o},this.getDisplayValue()))),t("div",{class:{"gux-display":!0,"gux-hidden":this.valueInTooltip}},this.getDisplayValue()))}updateValue(o){this.value=o,this.updatePosition()}updatePosition(){const o=Number(this.input.value||0),t=Number(this.input.min||0),e=(o-t)/(Number(this.input.max||100)-t)*100;this.sliderTooltip&&(this.sliderTooltip.style.left=e-e/8/this.sliderTooltipContainer.offsetWidth*100+"%"),this.progressElement.style.width=`${e}%`}getDisplayValue(){return this.displayUnits?`${this.value}${this.displayUnits}`:this.value}get root(){return i(this)}};(function(o,t,e,i){var r,n=arguments.length,a=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(o,t,e,i);else for(var l=o.length-1;l>=0;l--)(r=o[l])&&(a=(n<3?r(a):n>3?r(t,e,a):r(t,e))||a);n>3&&a&&Object.defineProperty(t,e,a)})([a({childList:!0,subtree:!0})],m.prototype,"onMutation",null),m.style='.gux-focus-ring-focused:focus{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-focus-ring-focused-within:focus-within{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-focus-ring-focused-visible:focus-visible{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-focus-ring-small-focused:focus{outline:2px solid #aac9ff;outline-offset:0}.gux-focus-ring-small-focused-within:focus-within{outline:2px solid #aac9ff;outline-offset:0}.gux-focus-ring-small-focused-visible:focus-visible{outline:2px solid #aac9ff;outline-offset:0}@font-face{font-family:Roboto;font-style:normal;font-weight:300;src:url("./fonts/roboto-v20-latin-300.eot");src:local("Roboto Light"), local("Roboto-Light"), url("./fonts/roboto-v20-latin-300.eot?#iefix") format("embedded-opentype"), url("./fonts/roboto-v20-latin-300.woff2") format("woff2"), url("./fonts/roboto-v20-latin-300.woff") format("woff"), url("./fonts/roboto-v20-latin-300.ttf") format("truetype"), url("./fonts/roboto-v20-latin-300.svg#Roboto") format("svg");}@font-face{font-family:Roboto;font-style:normal;font-weight:400;src:url("./fonts/roboto-v20-latin-regular.eot");src:local("Roboto"), local("Roboto-Regular"), url("./fonts/roboto-v20-latin-regular.eot?#iefix") format("embedded-opentype"), url("./fonts/roboto-v20-latin-regular.woff2") format("woff2"), url("./fonts/roboto-v20-latin-regular.woff") format("woff"), url("./fonts/roboto-v20-latin-regular.ttf") format("truetype"), url("./fonts/roboto-v20-latin-regular.svg#Roboto") format("svg");}@font-face{font-family:Roboto;font-style:italic;font-weight:400;src:url("./fonts/roboto-v20-latin-italic.eot");src:local("Roboto Italic"), local("Roboto-Italic"), url("./fonts/roboto-v20-latin-italic.eot?#iefix") format("embedded-opentype"), url("./fonts/roboto-v20-latin-italic.woff2") format("woff2"), url("./fonts/roboto-v20-latin-italic.woff") format("woff"), url("./fonts/roboto-v20-latin-italic.ttf") format("truetype"), url("./fonts/roboto-v20-latin-italic.svg#Roboto") format("svg");}@font-face{font-family:Roboto;font-style:normal;font-weight:700;src:url("./fonts/roboto-v20-latin-700.eot");src:local("Roboto Bold"), local("Roboto-Bold"), url("./fonts/roboto-v20-latin-700.eot?#iefix") format("embedded-opentype"), url("./fonts/roboto-v20-latin-700.woff2") format("woff2"), url("./fonts/roboto-v20-latin-700.woff") format("woff"), url("./fonts/roboto-v20-latin-700.ttf") format("truetype"), url("./fonts/roboto-v20-latin-700.svg#Roboto") format("svg");}body{font-family:Roboto, sans-serif;font-weight:400;font-size:12px;line-height:20px}h1{font-family:Roboto, sans-serif;font-weight:400;font-weight:300;font-size:24px;line-height:32px}h2{font-family:Roboto, sans-serif;font-weight:400;font-weight:300;font-size:18px;line-height:24px}h3{font-family:Roboto, sans-serif;font-weight:400;font-weight:700;font-size:14px;line-height:20px}h4,h5,h6{font-family:Roboto, sans-serif;font-weight:400;font-size:14px;line-height:20px}.gux-icon-anchor gux-icon{padding-right:2px}a{color:#2a60c8;text-decoration:underline;border-radius:2px}a:hover{color:#2754ac}a:active{color:#23478f}a:focus-visible{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}table a{color:#2a60c8;text-decoration:underline;border-radius:2px;text-decoration:none}table a:hover{color:#2754ac}table a:active{color:#23478f}table a:focus-visible{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.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;padding:var(--gse-ui-formControl-helper-errorPadding);font-family:var(--gse-ui-formControl-helper-helperText-fontFamily);font-size:var(--gse-ui-formControl-helper-helperText-fontSize);line-height:var(--gse-ui-formControl-helper-helperText-lineHeight);color:var(--gse-ui-formControl-helper-errorColor)}.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:var(--gse-ui-icon-size-sm);min-height:var(--gse-ui-icon-size-sm);margin-right:var(--gse-ui-formControl-helper-gap);color:var(--gse-ui-formControl-helper-errorColor)}.gux-form-field-error .gux-message{flex:0 1 auto;align-self:auto;order:0}.gux-form-field-label.gux-required::after{color:var(--gse-ui-formControl-label-indicator-requiredColor);content:" *"}.gux-form-field-label.gux-beside{position:relative;top:8px;width:fit-content;min-width:45px;margin-right:var(--gse-ui-formControl-label-gap)}.gux-form-field-label.gux-above{padding:var(--gse-ui-formControl-label-padding)}.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;padding:var(--gse-ui-formControl-helper-padding);font-family:var(--gse-ui-formControl-helper-helperText-fontFamily);font-size:var(--gse-ui-formControl-helper-helperText-fontSize);line-height:var(--gse-ui-formControl-helper-helperText-lineHeight);color:var(--gse-ui-formControl-helper-defaultColor)}.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}::slotted(label){font-family:var(--gse-ui-formControl-label-text-fontFamily);line-height:var(--gse-ui-formControl-label-text-lineHeight);font-size:var(--gse-ui-formControl-label-text-fontSize);color:var(--gse-ui-formControl-label-labelColor);font-weight:var(--gse-ui-formControl-label-text-fontWeight)}::slotted(input[type=range]){position:absolute;width:100%;width:100%;height:var(--gse-ui-slider-bar-height);margin:calc(var(--gse-ui-slider-handle-width) / 2) 0;margin-top:calc(-1 * (var(--gse-ui-slider-handle-width) / 2 + var(--gse-ui-slider-bar-height)));-webkit-appearance:none;background:transparent}.gux-input-and-error-container{flex-grow:1}.gux-input-and-error-container .gux-range-input-container{display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:center;justify-content:flex-start;height:32px;font-size:var(--gse-ui-slider-label-text-fontSize)}.gux-input-and-error-container .gux-range-input-container.gux-disabled{opacity:var(--gse-ui-slider-disabled-opacity)}.gux-input-and-error-container .gux-range-input-container .gux-range{position:relative;flex:1 1 auto;align-self:center;order:0}.gux-input-and-error-container .gux-range-input-container .gux-range:hover .gux-range-tooltip,.gux-input-and-error-container .gux-range-input-container .gux-range:focus-within .gux-range-tooltip{visibility:visible}.gux-input-and-error-container .gux-range-input-container .gux-range .gux-track{width:100%;height:var(--gse-ui-slider-bar-height);margin:6px 0;background:var(--gse-ui-slider-bar-default-backgroundColor)}.gux-input-and-error-container .gux-range-input-container .gux-range .gux-track .gux-progress{height:var(--gse-ui-slider-bar-height);background-color:var(--gse-ui-slider-bar-selected-backgroundColor)}.gux-input-and-error-container .gux-range-input-container .gux-display{flex:0 1 auto;align-self:auto;order:0;margin:0 0 0 var(--gux-spacing-medium);line-height:var(--gse-ui-slider-label-text-lineHeight);font-weight:var(--gse-ui-slider-label-text-fontWeight);text-align:right;font-family:var(--gse-ui-slider-label-text-fontFamily);font-size:var(--gse-ui-slider-label-text-fontSize)}.gux-input-and-error-container .gux-range-input-container .gux-display.gux-hidden{display:none}.gux-input-and-error-container .gux-range-tooltip-container{position:absolute;top:-50px;width:100%;height:32px;pointer-events:none}.gux-input-and-error-container .gux-range-tooltip-container.gux-hidden{display:none}.gux-input-and-error-container .gux-range-tooltip-container .gux-range-tooltip{font-family:Roboto, sans-serif;font-weight:400;font-size:11px;line-height:16px;position:absolute;z-index:var(--gux-zindex-tooltip, 1);display:flex;align-items:center;justify-content:center;width:50px;height:32px;margin-left:-20px;visibility:hidden;background-color:#fdfdfd;border:1px solid var(--gux-grey-30);border-radius:4px;box-shadow:rgba(32, 41, 55, 0.24) 0px 2px 4px}.gux-input-and-error-container .gux-range-tooltip-container .gux-range-tooltip::after,.gux-input-and-error-container .gux-range-tooltip-container .gux-range-tooltip::before{position:absolute;top:100%;left:50%;width:0;height:0;pointer-events:none;content:" ";border:solid transparent}.gux-input-and-error-container .gux-range-tooltip-container .gux-range-tooltip::after{margin-left:-4px;border-width:4px;border-top-color:#fdfdfd}.gux-input-and-error-container .gux-range-tooltip-container .gux-range-tooltip::before{margin-left:-6px;border-width:6px;border-top-color:var(--gux-grey-30)}';export{m as gux_form_field_range}
1
+ import{r as o,h as t,H as e,g as i}from"./p-7d26b2e1.js";import{c as r,o as n}from"./p-3f5341ea.js";import{O as a}from"./p-f34ce7dc.js";import{o as l}from"./p-3701eff0.js";import{p as s}from"./p-c10e41a9.js";import{h as f}from"./p-08bc2e6b.js";import{G as u,a as g,g as h,v as d,b as p}from"./p-b3c9fd06.js";import{a as c,G as x}from"./p-a733f4ca.js";import{t as b}from"./p-9bf0a4a8.js";import"./p-cbcbd1bb.js";import"./p-d0805f56.js";import"./p-d176c2ae.js";const m=class{constructor(t){o(this,t),this.displayUnits=void 0,this.valueInTooltip=void 0,this.labelPosition=void 0,this.computedLabelPosition="above",this.disabled=void 0,this.required=void 0,this.hasError=!1,this.hasHelp=!1,this.value=void 0,this.active=void 0,this.valueWatcherId=void 0}onInput(o){this.updateValue(o.target.value)}onMousedown(){this.disabled||(this.active=!0)}onMouseup(){this.active=!1}onMutation(){this.hasError=f(this.root,"error"),this.hasHelp=f(this.root,"help")}componentWillLoad(){this.setInput(),this.setLabel(),this.hasError=f(this.root,"error"),this.hasHelp=f(this.root,"help"),b(this.root,{variant:this.variant})}componentDidLoad(){this.updatePosition()}disconnectedCallback(){this.disabledObserver&&this.disabledObserver.disconnect(),this.requiredObserver&&this.requiredObserver.disconnect(),clearInterval(this.valueWatcherId)}render(){return t(e,{class:{"gux-active":this.active}},t(c,{labelPosition:this.computedLabelPosition},t(x,{position:this.computedLabelPosition,required:this.required},t("slot",{name:"label",onSlotchange:()=>this.setLabel()})),t("div",{class:"gux-input-and-error-container"},this.renderRangeInput(),t(u,{show:this.hasError},t("slot",{name:"error"})),t(g,{show:!this.hasError&&this.hasHelp},t("slot",{name:"help"})))))}get variant(){return this.labelPosition?this.labelPosition.toLowerCase():"none"}setInput(){this.input=h(this.root,'input[type="range"][slot="input"]'),s(this.input),this.disabled=r(this.input),this.required=this.input.required,this.value=this.input.value,this.disabledObserver=n(this.input,(o=>{this.disabled=o})),this.requiredObserver=l(this.input,(o=>{this.required=o})),clearInterval(this.valueWatcherId),this.valueWatcherId=setInterval((()=>{this.value!==this.input.value&&this.updateValue(this.input.value)}),100),d(this.root,this.input)}setLabel(){this.label=this.root.querySelector('label[slot="label"]'),this.computedLabelPosition=p(this.label,this.labelPosition)}renderRangeInput(){return t("div",{class:{"gux-range-input-container":!0,"gux-disabled":this.disabled}},t("div",{class:"gux-range"},t("div",{class:"gux-track"},t("div",{class:"gux-progress",ref:o=>this.progressElement=o})),t("slot",{name:"input"}),t("div",{class:{"gux-range-tooltip-container":!0,"gux-hidden":!this.valueInTooltip},ref:o=>this.sliderTooltipContainer=o},t("div",{class:"gux-range-tooltip",ref:o=>this.sliderTooltip=o},this.getDisplayValue()))),t("div",{class:{"gux-display":!0,"gux-hidden":this.valueInTooltip}},this.getDisplayValue()))}updateValue(o){this.value=o,this.updatePosition()}updatePosition(){const o=Number(this.input.value||0),t=Number(this.input.min||0),e=(o-t)/(Number(this.input.max||100)-t)*100;this.sliderTooltip&&(this.sliderTooltip.style.left=e-e/8/this.sliderTooltipContainer.offsetWidth*100+"%"),this.progressElement.style.width=`${e}%`}getDisplayValue(){return this.displayUnits?`${this.value}${this.displayUnits}`:this.value}get root(){return i(this)}};(function(o,t,e,i){var r,n=arguments.length,a=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(o,t,e,i);else for(var l=o.length-1;l>=0;l--)(r=o[l])&&(a=(n<3?r(a):n>3?r(t,e,a):r(t,e))||a);n>3&&a&&Object.defineProperty(t,e,a)})([a({childList:!0,subtree:!0})],m.prototype,"onMutation",null),m.style='.gux-focus-ring-focused:focus{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-focus-ring-focused-within:focus-within{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-focus-ring-focused-visible:focus-visible{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-focus-ring-small-focused:focus{outline:2px solid #aac9ff;outline-offset:0}.gux-focus-ring-small-focused-within:focus-within{outline:2px solid #aac9ff;outline-offset:0}.gux-focus-ring-small-focused-visible:focus-visible{outline:2px solid #aac9ff;outline-offset:0}@font-face{font-family:Roboto;font-style:normal;font-weight:300;src:url("./fonts/roboto-v20-latin-300.eot");src:local("Roboto Light"), local("Roboto-Light"), url("./fonts/roboto-v20-latin-300.eot?#iefix") format("embedded-opentype"), url("./fonts/roboto-v20-latin-300.woff2") format("woff2"), url("./fonts/roboto-v20-latin-300.woff") format("woff"), url("./fonts/roboto-v20-latin-300.ttf") format("truetype"), url("./fonts/roboto-v20-latin-300.svg#Roboto") format("svg");}@font-face{font-family:Roboto;font-style:normal;font-weight:400;src:url("./fonts/roboto-v20-latin-regular.eot");src:local("Roboto"), local("Roboto-Regular"), url("./fonts/roboto-v20-latin-regular.eot?#iefix") format("embedded-opentype"), url("./fonts/roboto-v20-latin-regular.woff2") format("woff2"), url("./fonts/roboto-v20-latin-regular.woff") format("woff"), url("./fonts/roboto-v20-latin-regular.ttf") format("truetype"), url("./fonts/roboto-v20-latin-regular.svg#Roboto") format("svg");}@font-face{font-family:Roboto;font-style:italic;font-weight:400;src:url("./fonts/roboto-v20-latin-italic.eot");src:local("Roboto Italic"), local("Roboto-Italic"), url("./fonts/roboto-v20-latin-italic.eot?#iefix") format("embedded-opentype"), url("./fonts/roboto-v20-latin-italic.woff2") format("woff2"), url("./fonts/roboto-v20-latin-italic.woff") format("woff"), url("./fonts/roboto-v20-latin-italic.ttf") format("truetype"), url("./fonts/roboto-v20-latin-italic.svg#Roboto") format("svg");}@font-face{font-family:Roboto;font-style:normal;font-weight:700;src:url("./fonts/roboto-v20-latin-700.eot");src:local("Roboto Bold"), local("Roboto-Bold"), url("./fonts/roboto-v20-latin-700.eot?#iefix") format("embedded-opentype"), url("./fonts/roboto-v20-latin-700.woff2") format("woff2"), url("./fonts/roboto-v20-latin-700.woff") format("woff"), url("./fonts/roboto-v20-latin-700.ttf") format("truetype"), url("./fonts/roboto-v20-latin-700.svg#Roboto") format("svg");}body{font-family:Roboto, sans-serif;font-weight:400;font-size:12px;line-height:20px}h1{font-family:Roboto, sans-serif;font-weight:400;font-weight:300;font-size:24px;line-height:32px}h2{font-family:Roboto, sans-serif;font-weight:400;font-weight:300;font-size:18px;line-height:24px}h3{font-family:Roboto, sans-serif;font-weight:400;font-weight:700;font-size:14px;line-height:20px}h4,h5,h6{font-family:Roboto, sans-serif;font-weight:400;font-size:14px;line-height:20px}.gux-icon-anchor gux-icon{padding-right:2px}a{color:#2a60c8;text-decoration:underline;border-radius:2px}a:hover{color:#2754ac}a:active{color:#23478f}a:focus-visible{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}table a{color:#2a60c8;text-decoration:underline;border-radius:2px;text-decoration:none}table a:hover{color:#2754ac}table a:active{color:#23478f}table a:focus-visible{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.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;padding:var(--gse-ui-formControl-helper-errorPadding);font-family:var(--gse-ui-formControl-helper-helperText-fontFamily);font-size:var(--gse-ui-formControl-helper-helperText-fontSize);line-height:var(--gse-ui-formControl-helper-helperText-lineHeight);color:var(--gse-ui-formControl-helper-errorColor)}.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:var(--gse-ui-icon-size-sm);min-height:var(--gse-ui-icon-size-sm);margin-right:var(--gse-ui-formControl-helper-gap);color:var(--gse-ui-formControl-helper-errorColor)}.gux-form-field-error .gux-message{flex:0 1 auto;align-self:auto;order:0}.gux-form-field-label.gux-required::after{color:var(--gse-ui-formControl-label-indicator-requiredColor);content:" *"}.gux-form-field-label.gux-beside{position:relative;top:8px;width:fit-content;min-width:45px;margin-right:var(--gse-ui-formControl-label-gap)}.gux-form-field-label.gux-above{padding:var(--gse-ui-formControl-label-padding)}.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;padding:var(--gse-ui-formControl-helper-padding);font-family:var(--gse-ui-formControl-helper-helperText-fontFamily);font-size:var(--gse-ui-formControl-helper-helperText-fontSize);line-height:var(--gse-ui-formControl-helper-helperText-lineHeight);color:var(--gse-ui-formControl-helper-defaultColor)}.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}::slotted(label){font-family:var(--gse-ui-formControl-label-text-fontFamily);line-height:var(--gse-ui-formControl-label-text-lineHeight);font-size:var(--gse-ui-formControl-label-text-fontSize);color:var(--gse-ui-formControl-label-labelColor);font-weight:var(--gse-ui-formControl-label-text-fontWeight)}::slotted(input[type=range]){position:absolute;width:100%;width:100%;height:var(--gse-ui-slider-bar-height);margin:calc(var(--gse-ui-slider-handle-width) / 2) 0;margin-top:calc(-1 * (var(--gse-ui-slider-handle-width) / 2 + var(--gse-ui-slider-bar-height)));-webkit-appearance:none;background:transparent}.gux-input-and-error-container{flex-grow:1}.gux-input-and-error-container .gux-range-input-container{display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:center;justify-content:flex-start;height:32px;font-size:var(--gse-ui-slider-label-text-fontSize)}.gux-input-and-error-container .gux-range-input-container.gux-disabled{opacity:var(--gse-ui-slider-disabled-opacity)}.gux-input-and-error-container .gux-range-input-container .gux-range{position:relative;flex:1 1 auto;align-self:center;order:0}.gux-input-and-error-container .gux-range-input-container .gux-range:hover .gux-range-tooltip,.gux-input-and-error-container .gux-range-input-container .gux-range:focus-within .gux-range-tooltip{visibility:visible}.gux-input-and-error-container .gux-range-input-container .gux-range .gux-track{width:100%;height:var(--gse-ui-slider-bar-height);margin:6px 0;background:var(--gse-ui-slider-bar-default-backgroundColor)}.gux-input-and-error-container .gux-range-input-container .gux-range .gux-track .gux-progress{height:var(--gse-ui-slider-bar-height);background-color:var(--gse-ui-slider-bar-selected-backgroundColor)}.gux-input-and-error-container .gux-range-input-container .gux-display{flex:0 1 auto;align-self:auto;order:0;margin:0 0 0 var(--gux-spacing-medium);line-height:var(--gse-ui-slider-label-text-lineHeight);font-weight:var(--gse-ui-slider-label-text-fontWeight);text-align:right;font-family:var(--gse-ui-slider-label-text-fontFamily);font-size:var(--gse-ui-slider-label-text-fontSize)}.gux-input-and-error-container .gux-range-input-container .gux-display.gux-hidden{display:none}.gux-input-and-error-container .gux-range-tooltip-container{position:absolute;top:-50px;width:100%;height:32px;pointer-events:none}.gux-input-and-error-container .gux-range-tooltip-container.gux-hidden{display:none}.gux-input-and-error-container .gux-range-tooltip-container .gux-range-tooltip{font-family:Roboto, sans-serif;font-weight:400;font-size:11px;line-height:16px;position:absolute;z-index:var(--gux-zindex-tooltip, 1);display:flex;align-items:center;justify-content:center;width:50px;height:32px;margin-left:-20px;visibility:hidden;background-color:#fdfdfd;border:1px solid var(--gux-grey-30);border-radius:4px;box-shadow:rgba(32, 41, 55, 0.24) 0px 2px 4px}.gux-input-and-error-container .gux-range-tooltip-container .gux-range-tooltip::after,.gux-input-and-error-container .gux-range-tooltip-container .gux-range-tooltip::before{position:absolute;top:100%;left:50%;width:0;height:0;pointer-events:none;content:" ";border:solid transparent}.gux-input-and-error-container .gux-range-tooltip-container .gux-range-tooltip::after{margin-left:-4px;border-width:4px;border-top-color:#fdfdfd}.gux-input-and-error-container .gux-range-tooltip-container .gux-range-tooltip::before{margin-left:-6px;border-width:6px;border-top-color:var(--gux-grey-30)}';export{m as gux_form_field_range}
@@ -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-f7f3443e.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-9bf0a4a8.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,h as s,H as e,g as i}from"./p-7d26b2e1.js";import{t as o}from"./p-f7f3443e.js";import{D as r}from"./p-98b50eb3.js";import{g as a}from"./p-deee079e.js";import"./p-8a133b9b.js";const h=class{constructor(s){t(this,s),this.datetime=(new Date).toISOString(),this.format="short",this.timeZone=void 0}componentWillLoad(){o(this.root),this.formatter=new r(a(this.root))}render(){return s(e,null,this.formatter.formatDateTime(new Date(this.datetime),this.format,{timeZone:this.timeZone}))}get root(){return i(this)}};export{h as gux_date_time_beta}
1
+ import{r as t,h as s,H as e,g as i}from"./p-7d26b2e1.js";import{t as o}from"./p-9bf0a4a8.js";import{D as r}from"./p-98b50eb3.js";import{g as a}from"./p-deee079e.js";import"./p-8a133b9b.js";const h=class{constructor(s){t(this,s),this.datetime=(new Date).toISOString(),this.format="short",this.timeZone=void 0}componentWillLoad(){o(this.root),this.formatter=new r(a(this.root))}render(){return s(e,null,this.formatter.formatDateTime(new Date(this.datetime),this.format,{timeZone:this.timeZone}))}get root(){return i(this)}};export{h as gux_date_time_beta}
@@ -1 +1 @@
1
- import{r as s,c as i,h as t,H as o,g as e}from"./p-7d26b2e1.js";import{t as r}from"./p-f7f3443e.js";const a=class{constructor(t){s(this,t),this.guxdismiss=i(this,"guxdismiss",7),this.accent="neutral"}componentWillLoad(){r(this.root,{variant:this.accent})}render(){return t(o,null,t("div",{class:`gux-icon gux-${this.accent}`},t("slot",{name:"icon"})),t("gux-truncate",{class:"gux-message","max-lines":2},t("slot",{name:"message"})),t("gux-dismiss-button",{class:"gux-dismiss",position:"inherit",onClick:this.onDismissClickHandler.bind(this)}))}onDismissClickHandler(s){s.stopPropagation(),this.guxdismiss.emit().defaultPrevented||this.root.remove()}get root(){return e(this)}};a.style=":host{position:relative;display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:flex-start;justify-content:flex-start;width:286px;margin-bottom:4px;color:#2e394c;background:#f6f7f9;border:1px solid #b4bccb;border-radius:4px;box-shadow:0 2px 4px rgba(32, 41, 55, 0.24)}.gux-icon{flex:0 1 auto;align-self:auto;order:0;padding:8px 12px 8px 16px;margin:2px 0}.gux-icon.gux-alert{color:#ea0b0b}.gux-icon.gux-warning{color:#ffae00}.gux-icon.gux-positive{color:#3c8527}.gux-icon.gux-neutral{color:#203b73}.gux-icon ::slotted(gux-icon){width:16px;height:16px}.gux-message{flex:1 1 auto;align-self:center;order:0;margin:8px 0}.gux-dismiss{margin:4px 0}";export{a as gux_simple_toast_legacy}
1
+ import{r as s,c as i,h as t,H as o,g as a}from"./p-7d26b2e1.js";import{t as e}from"./p-9bf0a4a8.js";const r=class{constructor(t){s(this,t),this.guxdismiss=i(this,"guxdismiss",7),this.accent="neutral"}componentWillLoad(){e(this.root,{variant:this.accent})}render(){return t(o,null,t("div",{class:`gux-icon gux-${this.accent}`},t("slot",{name:"icon"})),t("gux-truncate",{class:"gux-message","max-lines":2},t("slot",{name:"message"})),t("gux-dismiss-button",{class:"gux-dismiss",position:"inherit",onClick:this.onDismissClickHandler.bind(this)}))}onDismissClickHandler(s){s.stopPropagation(),this.guxdismiss.emit().defaultPrevented||this.root.remove()}get root(){return a(this)}};r.style=":host{position:relative;display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:flex-start;justify-content:flex-start;width:286px;margin-bottom:4px;color:#2e394c;background:#f6f7f9;border:1px solid #b4bccb;border-radius:4px;box-shadow:0 2px 4px rgba(32, 41, 55, 0.24)}.gux-icon{flex:0 1 auto;align-self:auto;order:0;padding:8px 12px 8px 16px;margin:2px 0}.gux-icon.gux-alert{color:#ea0b0b}.gux-icon.gux-warning{color:#ffae00}.gux-icon.gux-positive{color:#3c8527}.gux-icon.gux-neutral{color:#203b73}.gux-icon ::slotted(gux-icon){width:16px;height:16px}.gux-message{flex:1 1 auto;align-self:center;order:0;margin:8px 0}.gux-dismiss{margin:4px 0}";export{r as gux_simple_toast_legacy}
@@ -1 +1 @@
1
- import{r as s,h as t,H as e,g as r}from"./p-7d26b2e1.js";import{l as a,n as o,f as i,p as n,b as c,c as l}from"./p-417354e9.js";import{t as u}from"./p-f7f3443e.js";const h=["gux-list-item"],m=class{constructor(t){s(this,t)}componentWillLoad(){u(this.root)}onKeyDown(s){switch(s.key){case"ArrowUp":s.preventDefault(),n(this.root,h);break;case"Home":s.preventDefault(),i(this.root,h);break;case"ArrowDown":s.preventDefault(),o(this.root,h);break;case"End":s.preventDefault(),a(this.root,h)}}async guxFocusFirstItem(){i(this.root,h)}async guxFocusItemById(s){c(this.root,h,s)}async guxFocusItemByClosestId(s){l(this.root,h,s)}async guxFocusLastItem(){a(this.root,h)}renderFocusTarget(){return t("span",{tabindex:"-1"})}render(){return t(e,{role:"list"},this.renderFocusTarget(),t("slot",null))}static get delegatesFocus(){return!0}get root(){return r(this)}};m.style=":host{display:flex;flex-direction:column;flex-wrap:nowrap;align-content:stretch;align-items:flex-start;justify-content:flex-start}";export{m as gux_list}
1
+ import{r as s,h as t,H as e,g as a}from"./p-7d26b2e1.js";import{l as r,n as o,f as i,p as n,b as c,c as l}from"./p-417354e9.js";import{t as u}from"./p-9bf0a4a8.js";const h=["gux-list-item"],m=class{constructor(t){s(this,t)}componentWillLoad(){u(this.root)}onKeyDown(s){switch(s.key){case"ArrowUp":s.preventDefault(),n(this.root,h);break;case"Home":s.preventDefault(),i(this.root,h);break;case"ArrowDown":s.preventDefault(),o(this.root,h);break;case"End":s.preventDefault(),r(this.root,h)}}async guxFocusFirstItem(){i(this.root,h)}async guxFocusItemById(s){c(this.root,h,s)}async guxFocusItemByClosestId(s){l(this.root,h,s)}async guxFocusLastItem(){r(this.root,h)}renderFocusTarget(){return t("span",{tabindex:"-1"})}render(){return t(e,{role:"list"},this.renderFocusTarget(),t("slot",null))}static get delegatesFocus(){return!0}get root(){return a(this)}};m.style=":host{display:flex;flex-direction:column;flex-wrap:nowrap;align-content:stretch;align-items:flex-start;justify-content:flex-start}";export{m as gux_list}
@@ -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-f7f3443e.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 f(t,e){return u(t.toLocaleDateString(e,{year:"numeric",month:"long"}))}const b=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,f(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"},f(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)}};b.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{b 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-9bf0a4a8.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}