q2-tecton-elements 1.50.1 → 1.51.1

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 (578) hide show
  1. package/dist/cjs/click-elsewhere_2.cjs.entry.js +21 -12
  2. package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
  3. package/dist/cjs/index-9aa4a776.js +235 -0
  4. package/dist/cjs/index-9aa4a776.js.map +1 -0
  5. package/dist/cjs/{index-43010ce4.js → index-f69742cf.js} +1 -1
  6. package/dist/cjs/{index-43010ce4.js.map → index-f69742cf.js.map} +1 -1
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/q2-action-group.cjs.entry.js +50 -0
  9. package/dist/cjs/q2-action-group.cjs.entry.js.map +1 -0
  10. package/dist/cjs/q2-action-sheet.cjs.entry.js +1364 -3
  11. package/dist/cjs/q2-action-sheet.cjs.entry.js.map +1 -1
  12. package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
  13. package/dist/cjs/q2-badge_7.cjs.entry.js +23 -13
  14. package/dist/cjs/q2-badge_7.cjs.entry.js.map +1 -1
  15. package/dist/cjs/q2-calendar.cjs.entry.js +2 -2
  16. package/dist/cjs/q2-card.cjs.entry.js +1 -1
  17. package/dist/cjs/q2-carousel-pane.cjs.entry.js +3 -3
  18. package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
  19. package/dist/cjs/q2-chart-area.cjs.entry.js +2 -2
  20. package/dist/cjs/q2-chart-area.cjs.entry.js.map +1 -1
  21. package/dist/cjs/q2-chart-bar.cjs.entry.js +2 -2
  22. package/dist/cjs/q2-chart-bar.cjs.entry.js.map +1 -1
  23. package/dist/cjs/q2-chart-donut.cjs.entry.js +16 -16
  24. package/dist/cjs/q2-chart-donut.cjs.entry.js.map +1 -1
  25. package/dist/cjs/q2-checkbox-group.cjs.entry.js +2 -2
  26. package/dist/cjs/q2-checkbox-group.cjs.entry.js.map +1 -1
  27. package/dist/cjs/q2-checkbox.cjs.entry.js +1 -1
  28. package/dist/cjs/q2-currency.cjs.entry.js +1 -1
  29. package/dist/cjs/q2-data-table.cjs.entry.js +62 -62
  30. package/dist/cjs/q2-data-table.cjs.entry.js.map +1 -1
  31. package/dist/cjs/q2-detail.cjs.entry.js +2 -2
  32. package/dist/cjs/q2-dropdown-item.cjs.entry.js +2 -2
  33. package/dist/cjs/q2-dropdown-item.cjs.entry.js.map +1 -1
  34. package/dist/cjs/q2-dropdown.cjs.entry.js +79 -7
  35. package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
  36. package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
  37. package/dist/cjs/q2-formatted-text.cjs.entry.js +72 -0
  38. package/dist/cjs/q2-formatted-text.cjs.entry.js.map +1 -0
  39. package/dist/cjs/q2-item.cjs.entry.js +2 -2
  40. package/dist/cjs/q2-legend.cjs.entry.js +2 -2
  41. package/dist/cjs/q2-legend.cjs.entry.js.map +1 -1
  42. package/dist/cjs/q2-link.cjs.entry.js +64 -0
  43. package/dist/cjs/q2-link.cjs.entry.js.map +1 -0
  44. package/dist/cjs/q2-list.cjs.entry.js +2 -2
  45. package/dist/cjs/q2-loc.cjs.entry.js +2 -2
  46. package/dist/cjs/q2-message.cjs.entry.js +2 -2
  47. package/dist/cjs/q2-month-picker.cjs.entry.js +3 -3
  48. package/dist/cjs/q2-optgroup.cjs.entry.js +2 -2
  49. package/dist/cjs/q2-option-list.cjs.entry.js +9 -4
  50. package/dist/cjs/q2-option-list.cjs.entry.js.map +1 -1
  51. package/dist/cjs/q2-option.cjs.entry.js +1 -1
  52. package/dist/cjs/q2-pagination.cjs.entry.js +90 -9
  53. package/dist/cjs/q2-pagination.cjs.entry.js.map +1 -1
  54. package/dist/cjs/q2-pill.cjs.entry.js +26 -5
  55. package/dist/cjs/q2-pill.cjs.entry.js.map +1 -1
  56. package/dist/cjs/q2-radio-group.cjs.entry.js +2 -2
  57. package/dist/cjs/q2-radio-group.cjs.entry.js.map +1 -1
  58. package/dist/cjs/q2-radio.cjs.entry.js +1 -1
  59. package/dist/cjs/q2-relative-time.cjs.entry.js +3 -3
  60. package/dist/cjs/q2-resize-observer.cjs.entry.js +96 -0
  61. package/dist/cjs/q2-resize-observer.cjs.entry.js.map +1 -0
  62. package/dist/cjs/q2-section.cjs.entry.js +27 -3
  63. package/dist/cjs/q2-section.cjs.entry.js.map +1 -1
  64. package/dist/cjs/q2-select.cjs.entry.js +7 -6
  65. package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
  66. package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
  67. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +2 -2
  68. package/dist/cjs/q2-stepper.cjs.entry.js +39 -3
  69. package/dist/cjs/q2-stepper.cjs.entry.js.map +1 -1
  70. package/dist/cjs/q2-tag.cjs.entry.js +3 -2
  71. package/dist/cjs/q2-tag.cjs.entry.js.map +1 -1
  72. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  73. package/dist/cjs/q2-textarea.cjs.entry.js +46 -11
  74. package/dist/cjs/q2-textarea.cjs.entry.js.map +1 -1
  75. package/dist/cjs/q2-tooltip.cjs.entry.js +2 -2
  76. package/dist/cjs/q2-tooltip.cjs.entry.js.map +1 -1
  77. package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
  78. package/dist/collection/collection-manifest.json +4 -0
  79. package/dist/collection/components/q2-action-group/q2-action-group.css +99 -0
  80. package/dist/collection/components/q2-action-group/q2-action-group.js +120 -0
  81. package/dist/collection/components/q2-action-group/q2-action-group.js.map +1 -0
  82. package/dist/collection/components/q2-action-group/test/q2-action-group.e2e.js +30 -0
  83. package/dist/collection/components/q2-action-group/test/q2-action-group.e2e.js.map +1 -0
  84. package/dist/collection/components/q2-action-group/test/q2-action-group.spec.js +156 -0
  85. package/dist/collection/components/q2-action-group/test/q2-action-group.spec.js.map +1 -0
  86. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +3 -2
  87. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js.map +1 -1
  88. package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
  89. package/dist/collection/components/q2-avatar/test/q2-avatar-test.e2e.js +14 -9
  90. package/dist/collection/components/q2-avatar/test/q2-avatar-test.e2e.js.map +1 -1
  91. package/dist/collection/components/q2-badge/test/q2-badge-test.e2e.js +14 -9
  92. package/dist/collection/components/q2-badge/test/q2-badge-test.e2e.js.map +1 -1
  93. package/dist/collection/components/q2-btn/test/q2-btn-test.e2e.js +14 -9
  94. package/dist/collection/components/q2-btn/test/q2-btn-test.e2e.js.map +1 -1
  95. package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
  96. package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js +227 -223
  97. package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js.map +1 -1
  98. package/dist/collection/components/q2-card/test/q2-card-test.e2e.js +12 -7
  99. package/dist/collection/components/q2-card/test/q2-card-test.e2e.js.map +1 -1
  100. package/dist/collection/components/q2-carousel/test/q2-carousel-test.e2e.js +49 -45
  101. package/dist/collection/components/q2-carousel/test/q2-carousel-test.e2e.js.map +1 -1
  102. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
  103. package/dist/collection/components/q2-chart-area/q2-chart-area.js +2 -2
  104. package/dist/collection/components/q2-chart-area/q2-chart-area.js.map +1 -1
  105. package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.e2e.js +12 -7
  106. package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.e2e.js.map +1 -1
  107. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +2 -2
  108. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js.map +1 -1
  109. package/dist/collection/components/q2-chart-bar/test/q2-chart-bar-test.e2e.js +16 -11
  110. package/dist/collection/components/q2-chart-bar/test/q2-chart-bar-test.e2e.js.map +1 -1
  111. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +15 -15
  112. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js.map +1 -1
  113. package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.e2e.js +32 -26
  114. package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.e2e.js.map +1 -1
  115. package/dist/collection/components/q2-checkbox/test/q2-checkbox-test.e2e.js +12 -7
  116. package/dist/collection/components/q2-checkbox/test/q2-checkbox-test.e2e.js.map +1 -1
  117. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js +2 -2
  118. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js.map +1 -1
  119. package/dist/collection/components/q2-checkbox-group/test/q2-checkbox-group-test.e2e.js +22 -17
  120. package/dist/collection/components/q2-checkbox-group/test/q2-checkbox-group-test.e2e.js.map +1 -1
  121. package/dist/collection/components/q2-currency/q2-currency.js +1 -1
  122. package/dist/collection/components/q2-currency/test/q2-currency-test.e2e.js +12 -7
  123. package/dist/collection/components/q2-currency/test/q2-currency-test.e2e.js.map +1 -1
  124. package/dist/collection/components/q2-data-table/q2-data-table.js +104 -104
  125. package/dist/collection/components/q2-data-table/q2-data-table.js.map +1 -1
  126. package/dist/collection/components/q2-data-table/test/q2-data-table-test.e2e.js +42 -24
  127. package/dist/collection/components/q2-data-table/test/q2-data-table-test.e2e.js.map +1 -1
  128. package/dist/collection/components/q2-detail/q2-detail.js +1 -1
  129. package/dist/collection/components/q2-detail/test/q2-detail-test.e2e.js +12 -7
  130. package/dist/collection/components/q2-detail/test/q2-detail-test.e2e.js.map +1 -1
  131. package/dist/collection/components/q2-dropdown/q2-dropdown.js +207 -7
  132. package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
  133. package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js +297 -135
  134. package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js.map +1 -1
  135. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js +1 -1
  136. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js.map +1 -1
  137. package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js +18 -13
  138. package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js.map +1 -1
  139. package/dist/collection/components/q2-editable-field/test/q2-editable-field-test.e2e.js +14 -18
  140. package/dist/collection/components/q2-editable-field/test/q2-editable-field-test.e2e.js.map +1 -1
  141. package/dist/collection/components/q2-formatted-text/q2-formatted-text.css +94 -0
  142. package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +230 -0
  143. package/dist/collection/components/q2-formatted-text/q2-formatted-text.js.map +1 -0
  144. package/dist/collection/components/q2-formatted-text/test/q2-formatted-text-test.e2e.js +430 -0
  145. package/dist/collection/components/q2-formatted-text/test/q2-formatted-text-test.e2e.js.map +1 -0
  146. package/dist/collection/components/q2-icon/test/q2-icon-test.e2e.js +14 -9
  147. package/dist/collection/components/q2-icon/test/q2-icon-test.e2e.js.map +1 -1
  148. package/dist/collection/components/q2-input/q2-input.css +9 -0
  149. package/dist/collection/components/q2-input/q2-input.js +7 -8
  150. package/dist/collection/components/q2-input/q2-input.js.map +1 -1
  151. package/dist/collection/components/q2-input/test/q2-input-test.e2e.js +50 -33
  152. package/dist/collection/components/q2-input/test/q2-input-test.e2e.js.map +1 -1
  153. package/dist/collection/components/q2-item/q2-item.js +1 -1
  154. package/dist/collection/components/q2-item/test/q2-item-test.e2e.js +32 -7
  155. package/dist/collection/components/q2-item/test/q2-item-test.e2e.js.map +1 -1
  156. package/dist/collection/components/q2-legend/q2-legend.css +1 -1
  157. package/dist/collection/components/q2-legend/q2-legend.js +1 -1
  158. package/dist/collection/components/q2-legend/test/q2-legend-test.e2e.js +13 -8
  159. package/dist/collection/components/q2-legend/test/q2-legend-test.e2e.js.map +1 -1
  160. package/dist/collection/components/q2-link/q2-link.css +146 -0
  161. package/dist/collection/components/q2-link/q2-link.js +242 -0
  162. package/dist/collection/components/q2-link/q2-link.js.map +1 -0
  163. package/dist/collection/components/q2-link/test/q2-link-test.e2e.js +145 -0
  164. package/dist/collection/components/q2-link/test/q2-link-test.e2e.js.map +1 -0
  165. package/dist/collection/components/q2-list/q2-list.js +1 -1
  166. package/dist/collection/components/q2-list/test/q2-list-test.e2e.js +12 -7
  167. package/dist/collection/components/q2-list/test/q2-list-test.e2e.js.map +1 -1
  168. package/dist/collection/components/q2-loading/test/q2-loading-element-test.e2e.js +14 -9
  169. package/dist/collection/components/q2-loading/test/q2-loading-element-test.e2e.js.map +1 -1
  170. package/dist/collection/components/q2-loading/test/q2-loading-test.e2e.js +14 -9
  171. package/dist/collection/components/q2-loading/test/q2-loading-test.e2e.js.map +1 -1
  172. package/dist/collection/components/q2-loc/q2-loc.js +1 -1
  173. package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js +16 -11
  174. package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js.map +1 -1
  175. package/dist/collection/components/q2-message/q2-message.js +1 -1
  176. package/dist/collection/components/q2-message/test/q2-message-test.e2e.js +14 -9
  177. package/dist/collection/components/q2-message/test/q2-message-test.e2e.js.map +1 -1
  178. package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
  179. package/dist/collection/components/q2-optgroup/test/q2-optgroup-test.e2e.js +20 -13
  180. package/dist/collection/components/q2-optgroup/test/q2-optgroup-test.e2e.js.map +1 -1
  181. package/dist/collection/components/q2-option/q2-option.js +1 -1
  182. package/dist/collection/components/q2-option/test/q2-option-test.e2e.js +28 -12
  183. package/dist/collection/components/q2-option/test/q2-option-test.e2e.js.map +1 -1
  184. package/dist/collection/components/q2-option-list/q2-option-list.js +7 -5
  185. package/dist/collection/components/q2-option-list/q2-option-list.js.map +1 -1
  186. package/dist/collection/components/q2-option-list/test/q2-option-list-test.e2e.js +415 -405
  187. package/dist/collection/components/q2-option-list/test/q2-option-list-test.e2e.js.map +1 -1
  188. package/dist/collection/components/q2-pagination/q2-pagination.js +230 -14
  189. package/dist/collection/components/q2-pagination/q2-pagination.js.map +1 -1
  190. package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js +138 -15
  191. package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js.map +1 -1
  192. package/dist/collection/components/q2-pill/q2-pill.css +12 -0
  193. package/dist/collection/components/q2-pill/q2-pill.js +43 -3
  194. package/dist/collection/components/q2-pill/q2-pill.js.map +1 -1
  195. package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js +412 -212
  196. package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js.map +1 -1
  197. package/dist/collection/components/q2-popover/q2-popover.js +37 -11
  198. package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
  199. package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js +296 -236
  200. package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js.map +1 -1
  201. package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js +3 -3
  202. package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js.map +1 -1
  203. package/dist/collection/components/q2-radio/test/q2-radio-test.e2e.js +21 -7
  204. package/dist/collection/components/q2-radio/test/q2-radio-test.e2e.js.map +1 -1
  205. package/dist/collection/components/q2-radio-group/q2-radio-group.js +2 -2
  206. package/dist/collection/components/q2-radio-group/q2-radio-group.js.map +1 -1
  207. package/dist/collection/components/q2-radio-group/test/q2-radio-group-test.e2e.js +32 -26
  208. package/dist/collection/components/q2-radio-group/test/q2-radio-group-test.e2e.js.map +1 -1
  209. package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
  210. package/dist/collection/components/q2-relative-time/test/q2-relative-time-test.e2e.js +12 -7
  211. package/dist/collection/components/q2-relative-time/test/q2-relative-time-test.e2e.js.map +1 -1
  212. package/dist/collection/components/q2-resize-observer/q2-resize-observer.css +71 -0
  213. package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +166 -0
  214. package/dist/collection/components/q2-resize-observer/q2-resize-observer.js.map +1 -0
  215. package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.e2e.js +83 -0
  216. package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.e2e.js.map +1 -0
  217. package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.spec.js +66 -0
  218. package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.spec.js.map +1 -0
  219. package/dist/collection/components/q2-section/q2-section.js +78 -2
  220. package/dist/collection/components/q2-section/q2-section.js.map +1 -1
  221. package/dist/collection/components/q2-section/test/q2-section-test.e2e.js +39 -9
  222. package/dist/collection/components/q2-section/test/q2-section-test.e2e.js.map +1 -1
  223. package/dist/collection/components/q2-select/q2-select.js +23 -5
  224. package/dist/collection/components/q2-select/q2-select.js.map +1 -1
  225. package/dist/collection/components/q2-select/test/q2-select-test.e2e.js +695 -676
  226. package/dist/collection/components/q2-select/test/q2-select-test.e2e.js.map +1 -1
  227. package/dist/collection/components/q2-stepper/q2-stepper.js +76 -2
  228. package/dist/collection/components/q2-stepper/q2-stepper.js.map +1 -1
  229. package/dist/collection/components/q2-stepper/test/q2-stepper-test.e2e.js +183 -87
  230. package/dist/collection/components/q2-stepper/test/q2-stepper-test.e2e.js.map +1 -1
  231. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +2 -2
  232. package/dist/collection/components/q2-stepper-pane/test/q2-stepper-pane-test.e2e.js +20 -9
  233. package/dist/collection/components/q2-stepper-pane/test/q2-stepper-pane-test.e2e.js.map +1 -1
  234. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
  235. package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.e2e.js +71 -67
  236. package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.e2e.js.map +1 -1
  237. package/dist/collection/components/q2-tab-container/q2-tab-container.js +50 -7
  238. package/dist/collection/components/q2-tab-container/q2-tab-container.js.map +1 -1
  239. package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.e2e.js +89 -65
  240. package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.e2e.js.map +1 -1
  241. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
  242. package/dist/collection/components/q2-tab-pane/test/q2-tab-pane-test.e2e.js +14 -9
  243. package/dist/collection/components/q2-tab-pane/test/q2-tab-pane-test.e2e.js.map +1 -1
  244. package/dist/collection/components/q2-tag/q2-tag.js +19 -1
  245. package/dist/collection/components/q2-tag/q2-tag.js.map +1 -1
  246. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js +47 -28
  247. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js.map +1 -1
  248. package/dist/collection/components/q2-textarea/q2-textarea.js +51 -13
  249. package/dist/collection/components/q2-textarea/q2-textarea.js.map +1 -1
  250. package/dist/collection/components/q2-textarea/test/q2-textarea-test.e2e.js +31 -10
  251. package/dist/collection/components/q2-textarea/test/q2-textarea-test.e2e.js.map +1 -1
  252. package/dist/collection/components/q2-tooltip/q2-tooltip.css +5 -2
  253. package/dist/collection/components/q2-tooltip/test/q2-tooltip-test.e2e.js +51 -13
  254. package/dist/collection/components/q2-tooltip/test/q2-tooltip-test.e2e.js.map +1 -1
  255. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
  256. package/dist/collection/components/tecton-tab-pane/test/tecton-tab-pane-test.e2e.js +18 -13
  257. package/dist/collection/components/tecton-tab-pane/test/tecton-tab-pane-test.e2e.js.map +1 -1
  258. package/dist/collection/utils/helpers.js +65 -0
  259. package/dist/collection/utils/helpers.js.map +1 -1
  260. package/dist/collection/utils/index.js +11 -11
  261. package/dist/collection/utils/index.js.map +1 -1
  262. package/dist/collection/utils/sanitize-html-string.js +10 -0
  263. package/dist/collection/utils/sanitize-html-string.js.map +1 -0
  264. package/dist/collection/utils/sanitize-regex-string.js +4 -0
  265. package/dist/collection/utils/sanitize-regex-string.js.map +1 -0
  266. package/dist/components/index.js +8 -0
  267. package/dist/components/index.js.map +1 -1
  268. package/dist/components/index2.js +11 -1356
  269. package/dist/components/index2.js.map +1 -1
  270. package/dist/components/q2-action-group.d.ts +11 -0
  271. package/dist/components/q2-action-group.js +75 -0
  272. package/dist/components/q2-action-group.js.map +1 -0
  273. package/dist/components/q2-action-sheet.js +1363 -2
  274. package/dist/components/q2-action-sheet.js.map +1 -1
  275. package/dist/components/q2-avatar2.js +1 -1
  276. package/dist/components/q2-btn2.js +1 -1
  277. package/dist/components/q2-carousel-pane.js +2 -2
  278. package/dist/components/q2-chart-area.js +1 -1
  279. package/dist/components/q2-chart-area.js.map +1 -1
  280. package/dist/components/q2-chart-bar.js +1 -1
  281. package/dist/components/q2-chart-bar.js.map +1 -1
  282. package/dist/components/q2-chart-donut.js +15 -15
  283. package/dist/components/q2-chart-donut.js.map +1 -1
  284. package/dist/components/q2-checkbox-group.js +2 -2
  285. package/dist/components/q2-checkbox-group.js.map +1 -1
  286. package/dist/components/q2-currency.js +1 -1
  287. package/dist/components/q2-data-table.js +64 -64
  288. package/dist/components/q2-data-table.js.map +1 -1
  289. package/dist/components/q2-detail.js +1 -1
  290. package/dist/components/q2-dropdown-item2.js +1 -1
  291. package/dist/components/q2-dropdown-item2.js.map +1 -1
  292. package/dist/components/q2-dropdown.js +84 -7
  293. package/dist/components/q2-dropdown.js.map +1 -1
  294. package/dist/components/q2-formatted-text.d.ts +11 -0
  295. package/dist/components/q2-formatted-text.js +101 -0
  296. package/dist/components/q2-formatted-text.js.map +1 -0
  297. package/dist/components/q2-input2.js +4 -5
  298. package/dist/components/q2-input2.js.map +1 -1
  299. package/dist/components/q2-item.js +1 -1
  300. package/dist/components/q2-legend2.js +2 -2
  301. package/dist/components/q2-legend2.js.map +1 -1
  302. package/dist/components/q2-link.d.ts +11 -0
  303. package/dist/components/q2-link.js +93 -0
  304. package/dist/components/q2-link.js.map +1 -0
  305. package/dist/components/q2-list.js +1 -1
  306. package/dist/components/q2-loc.js +1 -1
  307. package/dist/components/q2-message2.js +1 -1
  308. package/dist/components/q2-month-picker.js +2 -2
  309. package/dist/components/q2-optgroup2.js +1 -1
  310. package/dist/components/q2-option-list2.js +8 -3
  311. package/dist/components/q2-option-list2.js.map +1 -1
  312. package/dist/components/q2-option2.js +1 -1
  313. package/dist/components/q2-pagination.js +97 -10
  314. package/dist/components/q2-pagination.js.map +1 -1
  315. package/dist/components/q2-pill.js +29 -5
  316. package/dist/components/q2-pill.js.map +1 -1
  317. package/dist/components/q2-popover2.js +22 -12
  318. package/dist/components/q2-popover2.js.map +1 -1
  319. package/dist/components/q2-radio-group.js +2 -2
  320. package/dist/components/q2-radio-group.js.map +1 -1
  321. package/dist/components/q2-relative-time.js +1 -1
  322. package/dist/components/q2-resize-observer.d.ts +11 -0
  323. package/dist/components/q2-resize-observer.js +8 -0
  324. package/dist/components/q2-resize-observer.js.map +1 -0
  325. package/dist/components/q2-resize-observer2.js +112 -0
  326. package/dist/components/q2-resize-observer2.js.map +1 -0
  327. package/dist/components/q2-section.js +30 -4
  328. package/dist/components/q2-section.js.map +1 -1
  329. package/dist/components/q2-select2.js +7 -5
  330. package/dist/components/q2-select2.js.map +1 -1
  331. package/dist/components/q2-stepper-vertical.js +1 -1
  332. package/dist/components/q2-stepper.js +40 -3
  333. package/dist/components/q2-stepper.js.map +1 -1
  334. package/dist/components/q2-tab-container.js +20 -8
  335. package/dist/components/q2-tab-container.js.map +1 -1
  336. package/dist/components/q2-tab-pane.js +1 -1
  337. package/dist/components/q2-tag.js +3 -1
  338. package/dist/components/q2-tag.js.map +1 -1
  339. package/dist/components/q2-textarea.js +49 -12
  340. package/dist/components/q2-textarea.js.map +1 -1
  341. package/dist/components/q2-tooltip.js +1 -1
  342. package/dist/components/q2-tooltip.js.map +1 -1
  343. package/dist/components/tecton-tab-pane.js +2 -2
  344. package/dist/esm/click-elsewhere_2.entry.js +21 -12
  345. package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
  346. package/dist/esm/{index-c6d74f10.js → index-3184c760.js} +1 -1
  347. package/dist/esm/{index-c6d74f10.js.map → index-3184c760.js.map} +1 -1
  348. package/dist/esm/index-844fc010.js +211 -0
  349. package/dist/esm/index-844fc010.js.map +1 -0
  350. package/dist/esm/loader.js +1 -1
  351. package/dist/esm/q2-action-group.entry.js +46 -0
  352. package/dist/esm/q2-action-group.entry.js.map +1 -0
  353. package/dist/esm/q2-action-sheet.entry.js +1363 -2
  354. package/dist/esm/q2-action-sheet.entry.js.map +1 -1
  355. package/dist/esm/q2-avatar.entry.js +1 -1
  356. package/dist/esm/q2-badge_7.entry.js +23 -13
  357. package/dist/esm/q2-badge_7.entry.js.map +1 -1
  358. package/dist/esm/q2-calendar.entry.js +2 -2
  359. package/dist/esm/q2-card.entry.js +1 -1
  360. package/dist/esm/q2-carousel-pane.entry.js +3 -3
  361. package/dist/esm/q2-carousel.entry.js +1 -1
  362. package/dist/esm/q2-chart-area.entry.js +2 -2
  363. package/dist/esm/q2-chart-area.entry.js.map +1 -1
  364. package/dist/esm/q2-chart-bar.entry.js +2 -2
  365. package/dist/esm/q2-chart-bar.entry.js.map +1 -1
  366. package/dist/esm/q2-chart-donut.entry.js +16 -16
  367. package/dist/esm/q2-chart-donut.entry.js.map +1 -1
  368. package/dist/esm/q2-checkbox-group.entry.js +2 -2
  369. package/dist/esm/q2-checkbox-group.entry.js.map +1 -1
  370. package/dist/esm/q2-checkbox.entry.js +1 -1
  371. package/dist/esm/q2-currency.entry.js +1 -1
  372. package/dist/esm/q2-data-table.entry.js +62 -62
  373. package/dist/esm/q2-data-table.entry.js.map +1 -1
  374. package/dist/esm/q2-detail.entry.js +2 -2
  375. package/dist/esm/q2-dropdown-item.entry.js +2 -2
  376. package/dist/esm/q2-dropdown-item.entry.js.map +1 -1
  377. package/dist/esm/q2-dropdown.entry.js +79 -7
  378. package/dist/esm/q2-dropdown.entry.js.map +1 -1
  379. package/dist/esm/q2-editable-field.entry.js +1 -1
  380. package/dist/esm/q2-formatted-text.entry.js +68 -0
  381. package/dist/esm/q2-formatted-text.entry.js.map +1 -0
  382. package/dist/esm/q2-item.entry.js +2 -2
  383. package/dist/esm/q2-legend.entry.js +2 -2
  384. package/dist/esm/q2-legend.entry.js.map +1 -1
  385. package/dist/esm/q2-link.entry.js +60 -0
  386. package/dist/esm/q2-link.entry.js.map +1 -0
  387. package/dist/esm/q2-list.entry.js +2 -2
  388. package/dist/esm/q2-loc.entry.js +2 -2
  389. package/dist/esm/q2-message.entry.js +2 -2
  390. package/dist/esm/q2-month-picker.entry.js +3 -3
  391. package/dist/esm/q2-optgroup.entry.js +2 -2
  392. package/dist/esm/q2-option-list.entry.js +9 -4
  393. package/dist/esm/q2-option-list.entry.js.map +1 -1
  394. package/dist/esm/q2-option.entry.js +1 -1
  395. package/dist/esm/q2-pagination.entry.js +90 -9
  396. package/dist/esm/q2-pagination.entry.js.map +1 -1
  397. package/dist/esm/q2-pill.entry.js +26 -5
  398. package/dist/esm/q2-pill.entry.js.map +1 -1
  399. package/dist/esm/q2-radio-group.entry.js +2 -2
  400. package/dist/esm/q2-radio-group.entry.js.map +1 -1
  401. package/dist/esm/q2-radio.entry.js +1 -1
  402. package/dist/esm/q2-relative-time.entry.js +3 -3
  403. package/dist/esm/q2-resize-observer.entry.js +92 -0
  404. package/dist/esm/q2-resize-observer.entry.js.map +1 -0
  405. package/dist/esm/q2-section.entry.js +27 -3
  406. package/dist/esm/q2-section.entry.js.map +1 -1
  407. package/dist/esm/q2-select.entry.js +7 -6
  408. package/dist/esm/q2-select.entry.js.map +1 -1
  409. package/dist/esm/q2-stepper-pane.entry.js +1 -1
  410. package/dist/esm/q2-stepper-vertical.entry.js +2 -2
  411. package/dist/esm/q2-stepper.entry.js +39 -3
  412. package/dist/esm/q2-stepper.entry.js.map +1 -1
  413. package/dist/esm/q2-tag.entry.js +3 -2
  414. package/dist/esm/q2-tag.entry.js.map +1 -1
  415. package/dist/esm/q2-tecton-elements.js +1 -1
  416. package/dist/esm/q2-textarea.entry.js +47 -12
  417. package/dist/esm/q2-textarea.entry.js.map +1 -1
  418. package/dist/esm/q2-tooltip.entry.js +2 -2
  419. package/dist/esm/q2-tooltip.entry.js.map +1 -1
  420. package/dist/esm/tecton-tab-pane.entry.js +2 -2
  421. package/dist/q2-tecton-elements/{p-0a3a804a.entry.js → p-06701928.entry.js} +2 -2
  422. package/dist/q2-tecton-elements/{p-0a3a804a.entry.js.map → p-06701928.entry.js.map} +1 -1
  423. package/dist/q2-tecton-elements/{p-5d936af5.entry.js → p-07d1c3ae.entry.js} +2 -2
  424. package/dist/q2-tecton-elements/p-1305f7ca.entry.js +2 -0
  425. package/dist/q2-tecton-elements/p-1305f7ca.entry.js.map +1 -0
  426. package/dist/q2-tecton-elements/p-15ac45d6.js +2 -0
  427. package/dist/q2-tecton-elements/p-15ac45d6.js.map +1 -0
  428. package/dist/q2-tecton-elements/{p-ce4e6b41.entry.js → p-16910682.entry.js} +2 -2
  429. package/dist/q2-tecton-elements/p-16910682.entry.js.map +1 -0
  430. package/dist/q2-tecton-elements/p-188eb162.entry.js +3 -0
  431. package/dist/q2-tecton-elements/p-188eb162.entry.js.map +1 -0
  432. package/dist/q2-tecton-elements/{p-58cafc0d.entry.js → p-1c760a89.entry.js} +2 -2
  433. package/dist/q2-tecton-elements/{p-074ae80c.entry.js → p-1c88d057.entry.js} +2 -2
  434. package/dist/q2-tecton-elements/{p-3b0d3cd4.entry.js → p-20a3d6ed.entry.js} +2 -2
  435. package/dist/q2-tecton-elements/p-20a3d6ed.entry.js.map +1 -0
  436. package/dist/q2-tecton-elements/{p-77a0cc0c.entry.js → p-2733583e.entry.js} +2 -2
  437. package/dist/q2-tecton-elements/{p-4116579f.entry.js → p-3e428290.entry.js} +2 -2
  438. package/dist/q2-tecton-elements/p-3e428290.entry.js.map +1 -0
  439. package/dist/q2-tecton-elements/{p-072c5877.entry.js → p-4774e5b3.entry.js} +2 -2
  440. package/dist/q2-tecton-elements/{p-77272c4c.entry.js → p-490ef8e5.entry.js} +2 -2
  441. package/dist/q2-tecton-elements/{p-0a1dff75.entry.js → p-4e10550d.entry.js} +2 -2
  442. package/dist/q2-tecton-elements/p-4e10550d.entry.js.map +1 -0
  443. package/dist/q2-tecton-elements/{p-2ca6d44f.entry.js → p-50f7328f.entry.js} +2 -2
  444. package/dist/q2-tecton-elements/p-5637c486.entry.js +2 -0
  445. package/dist/q2-tecton-elements/p-5637c486.entry.js.map +1 -0
  446. package/dist/q2-tecton-elements/p-56df21b0.entry.js +2 -0
  447. package/dist/q2-tecton-elements/p-56df21b0.entry.js.map +1 -0
  448. package/dist/q2-tecton-elements/{p-34856c71.entry.js → p-5a834214.entry.js} +2 -2
  449. package/dist/q2-tecton-elements/{p-34856c71.entry.js.map → p-5a834214.entry.js.map} +1 -1
  450. package/dist/q2-tecton-elements/p-5f99a4a8.entry.js +2 -0
  451. package/dist/q2-tecton-elements/p-5f99a4a8.entry.js.map +1 -0
  452. package/dist/q2-tecton-elements/p-72d948b4.entry.js +2 -0
  453. package/dist/q2-tecton-elements/p-72d948b4.entry.js.map +1 -0
  454. package/dist/q2-tecton-elements/{p-3c7be0bb.entry.js → p-7903cd15.entry.js} +2 -2
  455. package/dist/q2-tecton-elements/p-7903cd15.entry.js.map +1 -0
  456. package/dist/q2-tecton-elements/{p-d2e1631a.entry.js → p-7906f49e.entry.js} +2 -2
  457. package/dist/q2-tecton-elements/{p-d2e1631a.entry.js.map → p-7906f49e.entry.js.map} +1 -1
  458. package/dist/q2-tecton-elements/{p-2fcaf2d6.entry.js → p-7aef0c08.entry.js} +2 -2
  459. package/dist/q2-tecton-elements/{p-8a4b106d.entry.js → p-7c9a0122.entry.js} +2 -2
  460. package/dist/q2-tecton-elements/p-7c9f8b62.entry.js +2 -0
  461. package/dist/q2-tecton-elements/p-7c9f8b62.entry.js.map +1 -0
  462. package/dist/q2-tecton-elements/{p-cf32b5db.entry.js → p-81fbe718.entry.js} +2 -2
  463. package/dist/q2-tecton-elements/p-81fbe718.entry.js.map +1 -0
  464. package/dist/q2-tecton-elements/{p-6237c775.entry.js → p-896c7008.entry.js} +2 -2
  465. package/dist/q2-tecton-elements/{p-395904b4.entry.js → p-8d07cf91.entry.js} +2 -2
  466. package/dist/q2-tecton-elements/{p-fffb54e9.entry.js → p-8d2b02e1.entry.js} +2 -2
  467. package/dist/q2-tecton-elements/{p-6e6d9793.entry.js → p-95a7c042.entry.js} +2 -2
  468. package/dist/q2-tecton-elements/{p-45407ecc.entry.js → p-96b1406c.entry.js} +2 -2
  469. package/dist/q2-tecton-elements/{p-cb3f48de.entry.js → p-a47597dd.entry.js} +2 -2
  470. package/dist/q2-tecton-elements/p-a47597dd.entry.js.map +1 -0
  471. package/dist/q2-tecton-elements/p-a5d0e252.entry.js +2 -0
  472. package/dist/q2-tecton-elements/p-a5d0e252.entry.js.map +1 -0
  473. package/dist/q2-tecton-elements/{p-2c26295e.entry.js → p-ac6aa392.entry.js} +2 -2
  474. package/dist/q2-tecton-elements/{p-376a0589.entry.js → p-ad057d10.entry.js} +2 -2
  475. package/dist/q2-tecton-elements/{p-ad998f71.entry.js → p-b0e5e9dc.entry.js} +2 -2
  476. package/dist/q2-tecton-elements/p-b0e5e9dc.entry.js.map +1 -0
  477. package/dist/q2-tecton-elements/{p-34696e3f.entry.js → p-b1784be3.entry.js} +2 -2
  478. package/dist/q2-tecton-elements/{p-259b728a.entry.js → p-b7de110e.entry.js} +2 -2
  479. package/dist/q2-tecton-elements/{p-8111547c.entry.js → p-c235ab3f.entry.js} +2 -2
  480. package/dist/q2-tecton-elements/p-c5667d5d.entry.js +2 -0
  481. package/dist/q2-tecton-elements/p-c5667d5d.entry.js.map +1 -0
  482. package/dist/q2-tecton-elements/{p-c81d299a.entry.js → p-e216ef3f.entry.js} +2 -2
  483. package/dist/q2-tecton-elements/p-e2c800ef.entry.js +2 -0
  484. package/dist/q2-tecton-elements/p-e2c800ef.entry.js.map +1 -0
  485. package/dist/q2-tecton-elements/p-f135b265.entry.js +2 -0
  486. package/dist/q2-tecton-elements/p-f135b265.entry.js.map +1 -0
  487. package/dist/q2-tecton-elements/{p-721365be.js → p-f1e887f5.js} +1 -1
  488. package/dist/q2-tecton-elements/{p-6b7c53a8.entry.js → p-f5f23659.entry.js} +2 -2
  489. package/dist/q2-tecton-elements/p-f7867f21.entry.js +2 -0
  490. package/dist/q2-tecton-elements/p-f7867f21.entry.js.map +1 -0
  491. package/dist/q2-tecton-elements/p-ff8f1a32.entry.js +2 -0
  492. package/dist/q2-tecton-elements/p-ff8f1a32.entry.js.map +1 -0
  493. package/dist/q2-tecton-elements/p-fff01dc1.entry.js +2 -0
  494. package/dist/q2-tecton-elements/p-fff01dc1.entry.js.map +1 -0
  495. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  496. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
  497. package/dist/types/components/q2-action-group/q2-action-group.d.ts +30 -0
  498. package/dist/types/components/q2-chart-area/q2-chart-area.d.ts +1 -1
  499. package/dist/types/components/q2-chart-bar/q2-chart-bar.d.ts +1 -1
  500. package/dist/types/components/q2-chart-donut/q2-chart-donut.d.ts +2 -0
  501. package/dist/types/components/q2-data-table/q2-data-table.d.ts +15 -13
  502. package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +41 -2
  503. package/dist/types/components/q2-formatted-text/q2-formatted-text.d.ts +34 -0
  504. package/dist/types/components/q2-input/q2-input.d.ts +10 -9
  505. package/dist/types/components/q2-legend/q2-legend.d.ts +1 -0
  506. package/dist/types/components/q2-link/q2-link.d.ts +36 -0
  507. package/dist/types/components/q2-pagination/q2-pagination.d.ts +60 -3
  508. package/dist/types/components/q2-pill/q2-pill.d.ts +11 -0
  509. package/dist/types/components/q2-popover/q2-popover.d.ts +7 -1
  510. package/dist/types/components/q2-resize-observer/q2-resize-observer.d.ts +28 -0
  511. package/dist/types/components/q2-section/q2-section.d.ts +12 -0
  512. package/dist/types/components/q2-select/q2-select.d.ts +5 -0
  513. package/dist/types/components/q2-stepper/q2-stepper.d.ts +10 -1
  514. package/dist/types/components/q2-tab-container/q2-tab-container.d.ts +8 -2
  515. package/dist/types/components/q2-tag/q2-tag.d.ts +5 -0
  516. package/dist/types/components/q2-textarea/q2-textarea.d.ts +8 -3
  517. package/dist/types/components.d.ts +396 -18
  518. package/dist/types/utils/helpers.d.ts +28 -0
  519. package/dist/types/utils/index.d.ts +3 -3
  520. package/dist/types/utils/sanitize-html-string.d.ts +1 -0
  521. package/dist/types/utils/sanitize-regex-string.d.ts +1 -0
  522. package/package.json +4 -4
  523. package/dist/cjs/index-64d8b839.js +0 -1580
  524. package/dist/cjs/index-64d8b839.js.map +0 -1
  525. package/dist/esm/index-4a80972c.js +0 -1556
  526. package/dist/esm/index-4a80972c.js.map +0 -1
  527. package/dist/q2-tecton-elements/p-0a1dff75.entry.js.map +0 -1
  528. package/dist/q2-tecton-elements/p-3b0d3cd4.entry.js.map +0 -1
  529. package/dist/q2-tecton-elements/p-3c7be0bb.entry.js.map +0 -1
  530. package/dist/q2-tecton-elements/p-403bf3d4.entry.js +0 -2
  531. package/dist/q2-tecton-elements/p-403bf3d4.entry.js.map +0 -1
  532. package/dist/q2-tecton-elements/p-4116579f.entry.js.map +0 -1
  533. package/dist/q2-tecton-elements/p-661ed976.entry.js +0 -2
  534. package/dist/q2-tecton-elements/p-661ed976.entry.js.map +0 -1
  535. package/dist/q2-tecton-elements/p-9a1a4bc0.js +0 -3
  536. package/dist/q2-tecton-elements/p-9a1a4bc0.js.map +0 -1
  537. package/dist/q2-tecton-elements/p-a7a0b8aa.entry.js +0 -2
  538. package/dist/q2-tecton-elements/p-a7a0b8aa.entry.js.map +0 -1
  539. package/dist/q2-tecton-elements/p-aa57b657.entry.js +0 -2
  540. package/dist/q2-tecton-elements/p-aa57b657.entry.js.map +0 -1
  541. package/dist/q2-tecton-elements/p-ad998f71.entry.js.map +0 -1
  542. package/dist/q2-tecton-elements/p-adec9275.entry.js +0 -2
  543. package/dist/q2-tecton-elements/p-adec9275.entry.js.map +0 -1
  544. package/dist/q2-tecton-elements/p-adf0a7c9.entry.js +0 -2
  545. package/dist/q2-tecton-elements/p-adf0a7c9.entry.js.map +0 -1
  546. package/dist/q2-tecton-elements/p-b72fd065.entry.js +0 -2
  547. package/dist/q2-tecton-elements/p-b72fd065.entry.js.map +0 -1
  548. package/dist/q2-tecton-elements/p-c0c658d1.entry.js +0 -2
  549. package/dist/q2-tecton-elements/p-c0c658d1.entry.js.map +0 -1
  550. package/dist/q2-tecton-elements/p-cb3f48de.entry.js.map +0 -1
  551. package/dist/q2-tecton-elements/p-ce4e6b41.entry.js.map +0 -1
  552. package/dist/q2-tecton-elements/p-cf32b5db.entry.js.map +0 -1
  553. package/dist/q2-tecton-elements/p-cf966a0f.entry.js +0 -2
  554. package/dist/q2-tecton-elements/p-cf966a0f.entry.js.map +0 -1
  555. package/dist/q2-tecton-elements/p-dc77bf66.entry.js +0 -2
  556. package/dist/q2-tecton-elements/p-dc77bf66.entry.js.map +0 -1
  557. /package/dist/q2-tecton-elements/{p-5d936af5.entry.js.map → p-07d1c3ae.entry.js.map} +0 -0
  558. /package/dist/q2-tecton-elements/{p-58cafc0d.entry.js.map → p-1c760a89.entry.js.map} +0 -0
  559. /package/dist/q2-tecton-elements/{p-074ae80c.entry.js.map → p-1c88d057.entry.js.map} +0 -0
  560. /package/dist/q2-tecton-elements/{p-77a0cc0c.entry.js.map → p-2733583e.entry.js.map} +0 -0
  561. /package/dist/q2-tecton-elements/{p-072c5877.entry.js.map → p-4774e5b3.entry.js.map} +0 -0
  562. /package/dist/q2-tecton-elements/{p-77272c4c.entry.js.map → p-490ef8e5.entry.js.map} +0 -0
  563. /package/dist/q2-tecton-elements/{p-2ca6d44f.entry.js.map → p-50f7328f.entry.js.map} +0 -0
  564. /package/dist/q2-tecton-elements/{p-2fcaf2d6.entry.js.map → p-7aef0c08.entry.js.map} +0 -0
  565. /package/dist/q2-tecton-elements/{p-8a4b106d.entry.js.map → p-7c9a0122.entry.js.map} +0 -0
  566. /package/dist/q2-tecton-elements/{p-6237c775.entry.js.map → p-896c7008.entry.js.map} +0 -0
  567. /package/dist/q2-tecton-elements/{p-395904b4.entry.js.map → p-8d07cf91.entry.js.map} +0 -0
  568. /package/dist/q2-tecton-elements/{p-fffb54e9.entry.js.map → p-8d2b02e1.entry.js.map} +0 -0
  569. /package/dist/q2-tecton-elements/{p-6e6d9793.entry.js.map → p-95a7c042.entry.js.map} +0 -0
  570. /package/dist/q2-tecton-elements/{p-45407ecc.entry.js.map → p-96b1406c.entry.js.map} +0 -0
  571. /package/dist/q2-tecton-elements/{p-2c26295e.entry.js.map → p-ac6aa392.entry.js.map} +0 -0
  572. /package/dist/q2-tecton-elements/{p-376a0589.entry.js.map → p-ad057d10.entry.js.map} +0 -0
  573. /package/dist/q2-tecton-elements/{p-34696e3f.entry.js.map → p-b1784be3.entry.js.map} +0 -0
  574. /package/dist/q2-tecton-elements/{p-259b728a.entry.js.map → p-b7de110e.entry.js.map} +0 -0
  575. /package/dist/q2-tecton-elements/{p-8111547c.entry.js.map → p-c235ab3f.entry.js.map} +0 -0
  576. /package/dist/q2-tecton-elements/{p-c81d299a.entry.js.map → p-e216ef3f.entry.js.map} +0 -0
  577. /package/dist/q2-tecton-elements/{p-721365be.js.map → p-f1e887f5.js.map} +0 -0
  578. /package/dist/q2-tecton-elements/{p-6b7c53a8.entry.js.map → p-f5f23659.entry.js.map} +0 -0
@@ -73,6 +73,87 @@ export class Q2Pagination {
73
73
  }
74
74
  }
75
75
  // #endregion
76
+ // #region Public Methods API
77
+ /**
78
+ * Emulates clicking the button that controls moving to the first page, and emitting a change event with the updated page number.
79
+ *
80
+ * If the `<button>` is disabled, this method does nothing.
81
+ * @testOnly
82
+ */
83
+ async clickFirstPage() {
84
+ const button = this.firstPageBtn;
85
+ if (button === null || button === void 0 ? void 0 : button.disabled)
86
+ return;
87
+ button.click();
88
+ }
89
+ /**
90
+ * Emulates clicking the button that controls moving to the last page, and emitting a change event with the updated page number.
91
+ *
92
+ * If the `<button>` is disabled, this method does nothing.
93
+ * @testOnly
94
+ */
95
+ async clickLastPage() {
96
+ const button = this.lastPageBtn;
97
+ if (button === null || button === void 0 ? void 0 : button.disabled)
98
+ return;
99
+ button.click();
100
+ }
101
+ /**
102
+ * Emulates clicking the button that controls moving to the next page, and emitting a change event with the updated page number.
103
+ *
104
+ * If the `<button>` is disabled, this method does nothing.
105
+ * @testOnly
106
+ */
107
+ async clickNextPage() {
108
+ const button = this.nextPageBtn;
109
+ if (button === null || button === void 0 ? void 0 : button.disabled)
110
+ return;
111
+ button.click();
112
+ }
113
+ /**
114
+ * Emulates clicking the button that controls moving to the previous page, and emitting a change event with the updated page number.
115
+ *
116
+ * If the `<button>` is disabled, this method does nothing.
117
+ * @testOnly
118
+ */
119
+ async clickPreviousPage() {
120
+ const button = this.prevPageBtn;
121
+ if (button === null || button === void 0 ? void 0 : button.disabled)
122
+ return;
123
+ button.click();
124
+ }
125
+ /**
126
+ * Emulates selecting a `perPage` value from the `perPageIncrements` dropdown,
127
+ * and updates the value of the `perPage` property.
128
+ *
129
+ * If `value` is not in the `perPageIncrements` array, this method does nothing.
130
+ * @testOnly
131
+ */
132
+ async selectPerPageIncrementValue(value) {
133
+ var _a;
134
+ if (isNaN(value) || !this.showPerPageSelect || !this.perPageIncrements.includes(value))
135
+ return;
136
+ this.perPageSelect.focus();
137
+ this.perPageSelect.click();
138
+ const options = Array.from(this.perPageSelect.querySelectorAll('q2-option'));
139
+ (_a = options.find(option => option.value === `${value}`)) === null || _a === void 0 ? void 0 : _a.click();
140
+ }
141
+ /**
142
+ * Emulates setting the page value in the `<input>` field,
143
+ * and emitting a change event with the updated page number.
144
+ *
145
+ * If `value` is invalid, this method does nothing.
146
+ * @testOnly
147
+ */
148
+ async setPageValue(value) {
149
+ var _a, _b;
150
+ if (!this.inputField || isNaN(value) || value < 1 || value > this.totalPages)
151
+ return;
152
+ (_a = this.inputField) === null || _a === void 0 ? void 0 : _a.focus();
153
+ this.inputField.value = `${value}`;
154
+ (_b = this.inputField) === null || _b === void 0 ? void 0 : _b.blur();
155
+ }
156
+ // #endregion
76
157
  // #region Watchers
77
158
  manageResizeObserver() {
78
159
  if (this.autoSize && !this.recordsOnly && !this.pagesOnly) {
@@ -119,6 +200,10 @@ export class Q2Pagination {
119
200
  get recordTypeWithDefault() {
120
201
  return this.recordType || loc('tecton.element.pagination.defaultRecordType');
121
202
  }
203
+ get showPerPageSelect() {
204
+ var _a;
205
+ return ((_a = this.perPageIncrements) === null || _a === void 0 ? void 0 : _a.length) > 1;
206
+ }
122
207
  get totalPages() {
123
208
  const { pagesOnly, totalWithDefault: total, perPageWithDefault: perPage, pages } = this;
124
209
  if (pagesOnly && pages && !isNaN(parseInt(`${pages}`)))
@@ -139,21 +224,17 @@ export class Q2Pagination {
139
224
  // #endregion
140
225
  // #region Render Methods
141
226
  renderPerPage() {
142
- var _a;
143
- if (!((_a = this.perPageIncrements) === null || _a === void 0 ? void 0 : _a.length)) {
144
- return '';
145
- }
146
227
  this.perPageIncrements = this.perPageIncrements
147
228
  .filter(perPage => !isNaN(perPage))
148
229
  .map(perPage => perPage * 1)
149
230
  .sort((a, b) => a - b);
150
231
  if (this.perPage === undefined)
151
232
  this.perPage = this.perPageIncrements[0];
152
- return (h("q2-select", { onChange: this.handlePerPageChange, value: this.perPageIncrements.includes(this.perPage) ? `${this.perPage}` : undefined }, this.perPageIncrements.map(perPage => (h("q2-option", { value: `${perPage}`, display: `${loc('tecton.element.pagination.view')} ${perPage}` }, `${loc('tecton.element.pagination.view')} ${perPage}`)))));
233
+ return (h("q2-select", { ref: el => (this.perPageSelect = el), onChange: this.handlePerPageChange, value: this.perPageIncrements.includes(this.perPage) ? `${this.perPage}` : undefined }, this.perPageIncrements.map(perPage => (h("q2-option", { value: `${perPage}`, display: `${loc('tecton.element.pagination.view')} ${perPage}` }, `${loc('tecton.element.pagination.view')} ${perPage}`)))));
153
234
  }
154
235
  render() {
155
236
  var _a;
156
- const { pagesOnly, recordsOnly, isFullViewHidden, recordTypeWithDefault: recordType, totalPages, totalWithDefault: total, pageWithDefault: page, currentRange, nextRange, prevRange, } = this;
237
+ const { pagesOnly, recordsOnly, isFullViewHidden, recordTypeWithDefault: recordType, totalPages, totalWithDefault: total, pageWithDefault: page, currentRange, nextRange, prevRange, showPerPageSelect, } = this;
157
238
  const onFirstPage = page === 1;
158
239
  const onLastPage = page === totalPages;
159
240
  let nextButtonLabel = loc('tecton.element.pagination.goToNext');
@@ -174,7 +255,7 @@ export class Q2Pagination {
174
255
  total,
175
256
  });
176
257
  }
177
- return (h("nav", { key: 'e501aad97cfb7e43c4126bdd18902f0c1b1f77c6', class: "container", ref: el => (this.containerElement = el), "aria-label": loc('tecton.element.pagination.title') }, h("div", { key: '268b28bc350d718b66ece79418564dd2235fea93', class: "description", "test-id": "description" }, pagesOnly
258
+ return (h("nav", { key: '417a7242c4873c1f2d4c12382f63f5e7534bda04', class: "container", ref: el => (this.containerElement = el), "aria-label": loc('tecton.element.pagination.title') }, h("div", { key: '5234d2c6d9f2249788d52970f69be1a0d38ad52e', class: "description", "test-id": "description" }, pagesOnly
178
259
  ? loc('tecton.element.pagination.pages', {
179
260
  current: page,
180
261
  total: totalPages,
@@ -183,7 +264,7 @@ export class Q2Pagination {
183
264
  range: currentRange,
184
265
  recordType: recordType.toLowerCase(),
185
266
  total: total.toLocaleString(),
186
- })), h("div", { key: '8e27861cab2a435ede48ab2650033616b9d09d53', class: "btn-group" }, h("q2-btn", { key: '9cdd1187767349a5645d9463aedc56685ffe02bf', label: loc('tecton.element.pagination.goToFirstPage'), disabled: onFirstPage, hidden: isFullViewHidden, onClick: () => this.handlePageChange(1), "test-id": "firstPageBtn", "hide-label": true }, h("q2-icon", { key: 'bb60151a25cf029fb4dec2aa5ae3596cf10d9fcf', type: "chevron-double-left" })), h("q2-btn", { key: '36d57ac9a5e65e7e19ce55dbac6d05d4975d733b', label: prevButtonLabel, disabled: onFirstPage, onClick: () => this.handlePageChange(page - 1), "test-id": "prevPageBtn", "hide-label": true }, h("q2-icon", { key: 'f2f7e0cadd9d9c5a8dee3f4d8b07b4a556457cbf', type: "chevron-left" }))), h("div", { key: 'bf92ddcd317f0422135b197216349f85463fa25f', class: "controls", hidden: isFullViewHidden, "test-id": "controls" }, h("span", { key: '22ebbb53459423fa8adb8730c0a4113161a905e8', "aria-hidden": "true" }, loc('tecton.element.pagination.page')), h("div", { key: '15c79963fb6dc7d5065e914131b258a348689292', class: "input-wrapper", onClick: () => this.inputField.dispatchEvent(new FocusEvent('focus')) }, h("q2-input", { key: '47050a9a458b5ef7bd21637f6e3cad0d395afe64', type: "number", value: `${page}`, min: 1, max: this.totalPages, hideLabel: true, optional: true, label: `${loc('tecton.element.pagination.page')} (${loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()])})`, onChange: event => this.handlePageChange(event.detail.value), "test-id": "pageInput", current: "page", ref: el => (this.inputField = el) })), h("span", { key: '0ff4acfb55fba8dee282afb378d2dc72b472cf4e', "aria-hidden": "true" }, loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()]))), h("div", { key: 'd9b8b4b6631df6d4520b68dcb516af262b2b9136', class: "btn-group" }, h("q2-btn", { key: 'b53b81c0613122be511d943624d6242fed3576a8', label: nextButtonLabel, disabled: onLastPage, onClick: () => this.handlePageChange(page + 1), "test-id": "nextPageBtn", "hide-label": true }, h("q2-icon", { key: 'a09c849be760fb2f1ff91375ea13c94a2b593c88', type: "chevron-right" })), h("q2-btn", { key: '6d2f35af70859cd5c3b383d3b99a7462d5c15c17', label: "tecton.element.pagination.goToLastPage", disabled: onLastPage, hidden: isFullViewHidden, onClick: () => this.handlePageChange(totalPages), "test-id": "lastPageBtn", "hide-label": true }, h("q2-icon", { key: 'a46d892e6acf87af73121feb0a132e9f4b379a0c', type: "chevron-double-right" }))), h("div", { key: '583cde036e73427c99b1187917b81b66ca3e2e7f', class: "per-page", hidden: isFullViewHidden || !((_a = this.perPageIncrements) === null || _a === void 0 ? void 0 : _a.length) }, this.renderPerPage())));
267
+ })), h("div", { key: 'f1809000bd2d37a8eedad140329ef72ad326bb6b', class: "btn-group" }, h("q2-btn", { key: '62612892b86508d1a834f18e9c242812ac339a21', ref: el => (this.firstPageBtn = el), label: loc('tecton.element.pagination.goToFirstPage'), disabled: onFirstPage, hidden: isFullViewHidden, onClick: () => this.handlePageChange(1), "test-id": "firstPageBtn", "hide-label": true }, h("q2-icon", { key: '2ff44c03d569a60d28b411b233818e8a8ed09af6', type: "chevron-double-left" })), h("q2-btn", { key: 'e36a4f8c021fd18248f4fc864aff5f194f248095', ref: el => (this.prevPageBtn = el), label: prevButtonLabel, disabled: onFirstPage, onClick: () => this.handlePageChange(page - 1), "test-id": "prevPageBtn", "hide-label": true }, h("q2-icon", { key: 'd103f86c52b8ed6809552126de4d3b52cda6b724', type: "chevron-left" }))), h("div", { key: 'e6f515d392ddb8e4a97b6406e6c7ed09503c4f9f', class: "controls", hidden: isFullViewHidden, "test-id": "controls" }, h("span", { key: '1ad86adf8bd04f8c658b8035d6f4c878b7214e38', "aria-hidden": "true" }, loc('tecton.element.pagination.page')), h("div", { key: '3d701869101717b2c4f73478e33013a923fd8f44', class: "input-wrapper", onClick: () => this.inputField.dispatchEvent(new FocusEvent('focus')) }, h("q2-input", { key: '63cf49a1292cc983fba7214116b73d423cabc64c', ref: el => (this.inputField = el), type: "number", value: `${page}`, min: 1, max: this.totalPages, hideLabel: true, optional: true, label: `${loc('tecton.element.pagination.page')} (${loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()])})`, onChange: event => this.handlePageChange(event.detail.value), "test-id": "pageInput", current: "page" })), h("span", { key: '526fd412a6dd8312d6bcf7a5c8baff1257642e4a', "aria-hidden": "true" }, loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()]))), h("div", { key: '069656ae8ee3523040eed22b8f2436fdde926358', class: "btn-group" }, h("q2-btn", { key: 'f215824b3c39eaf84cb6e974912ad2cd3e0ea71a', ref: el => (this.nextPageBtn = el), label: nextButtonLabel, disabled: onLastPage, onClick: () => this.handlePageChange(page + 1), "test-id": "nextPageBtn", "hide-label": true }, h("q2-icon", { key: 'd6d32de9af991e629b00632514ed2a96be42b825', type: "chevron-right" })), h("q2-btn", { key: '74ad02e29e5fadb2bff39cee2d7c6d2f62139bb7', ref: el => (this.lastPageBtn = el), label: "tecton.element.pagination.goToLastPage", disabled: onLastPage, hidden: isFullViewHidden, onClick: () => this.handlePageChange(totalPages), "test-id": "lastPageBtn", "hide-label": true }, h("q2-icon", { key: '970487bac61e8ad48acc77ce34f67a16f2d57dda', type: "chevron-double-right" }))), h("div", { key: 'dbd712331f2f14a3db1c8a247d36d7457fedeb8e', class: "per-page", hidden: isFullViewHidden || !((_a = this.perPageIncrements) === null || _a === void 0 ? void 0 : _a.length) }, showPerPageSelect && this.renderPerPage())));
187
268
  }
188
269
  static get is() { return "q2-pagination"; }
189
270
  static get encapsulation() { return "shadow"; }
@@ -283,14 +364,14 @@ export class Q2Pagination {
283
364
  "optional": false,
284
365
  "docs": {
285
366
  "tags": [],
286
- "text": "Indicates to only display the current and total pages."
367
+ "text": "Indicates to display only the current and total pages."
287
368
  },
288
369
  "attribute": "pages-only",
289
370
  "reflect": true
290
371
  },
291
372
  "perPage": {
292
373
  "type": "number",
293
- "mutable": false,
374
+ "mutable": true,
294
375
  "complexType": {
295
376
  "original": "number",
296
377
  "resolved": "number",
@@ -303,7 +384,7 @@ export class Q2Pagination {
303
384
  "text": "The total number of records displayed on each page."
304
385
  },
305
386
  "attribute": "per-page",
306
- "reflect": false
387
+ "reflect": true
307
388
  },
308
389
  "perPageIncrements": {
309
390
  "type": "unknown",
@@ -316,8 +397,11 @@ export class Q2Pagination {
316
397
  "required": false,
317
398
  "optional": false,
318
399
  "docs": {
319
- "tags": [],
320
- "text": "The list of perPage to operate pagination. e.g.) [10, 25, 50]"
400
+ "tags": [{
401
+ "name": "snippet",
402
+ "text": "this.perPageIncrements = [10, 25, 50];"
403
+ }],
404
+ "text": "A list of perPage values.\nThis generates a [Select](https://tecton.q2developer.com/design-system/q2-select/) element that allows the user to modify the `perPage` value.\n\n**Example:**"
321
405
  }
322
406
  },
323
407
  "recordsOnly": {
@@ -332,7 +416,7 @@ export class Q2Pagination {
332
416
  "optional": false,
333
417
  "docs": {
334
418
  "tags": [],
335
- "text": "Indicates to only display the current and total records."
419
+ "text": "Indicates to display only the current and total records."
336
420
  },
337
421
  "attribute": "records-only",
338
422
  "reflect": true
@@ -399,6 +483,138 @@ export class Q2Pagination {
399
483
  }
400
484
  }];
401
485
  }
486
+ static get methods() {
487
+ return {
488
+ "clickFirstPage": {
489
+ "complexType": {
490
+ "signature": "() => Promise<void>",
491
+ "parameters": [],
492
+ "references": {
493
+ "Promise": {
494
+ "location": "global",
495
+ "id": "global::Promise"
496
+ }
497
+ },
498
+ "return": "Promise<void>"
499
+ },
500
+ "docs": {
501
+ "text": "Emulates clicking the button that controls moving to the first page, and emitting a change event with the updated page number.\n\nIf the `<button>` is disabled, this method does nothing.",
502
+ "tags": [{
503
+ "name": "testOnly",
504
+ "text": undefined
505
+ }]
506
+ }
507
+ },
508
+ "clickLastPage": {
509
+ "complexType": {
510
+ "signature": "() => Promise<void>",
511
+ "parameters": [],
512
+ "references": {
513
+ "Promise": {
514
+ "location": "global",
515
+ "id": "global::Promise"
516
+ }
517
+ },
518
+ "return": "Promise<void>"
519
+ },
520
+ "docs": {
521
+ "text": "Emulates clicking the button that controls moving to the last page, and emitting a change event with the updated page number.\n\nIf the `<button>` is disabled, this method does nothing.",
522
+ "tags": [{
523
+ "name": "testOnly",
524
+ "text": undefined
525
+ }]
526
+ }
527
+ },
528
+ "clickNextPage": {
529
+ "complexType": {
530
+ "signature": "() => Promise<void>",
531
+ "parameters": [],
532
+ "references": {
533
+ "Promise": {
534
+ "location": "global",
535
+ "id": "global::Promise"
536
+ }
537
+ },
538
+ "return": "Promise<void>"
539
+ },
540
+ "docs": {
541
+ "text": "Emulates clicking the button that controls moving to the next page, and emitting a change event with the updated page number.\n\nIf the `<button>` is disabled, this method does nothing.",
542
+ "tags": [{
543
+ "name": "testOnly",
544
+ "text": undefined
545
+ }]
546
+ }
547
+ },
548
+ "clickPreviousPage": {
549
+ "complexType": {
550
+ "signature": "() => Promise<void>",
551
+ "parameters": [],
552
+ "references": {
553
+ "Promise": {
554
+ "location": "global",
555
+ "id": "global::Promise"
556
+ }
557
+ },
558
+ "return": "Promise<void>"
559
+ },
560
+ "docs": {
561
+ "text": "Emulates clicking the button that controls moving to the previous page, and emitting a change event with the updated page number.\n\nIf the `<button>` is disabled, this method does nothing.",
562
+ "tags": [{
563
+ "name": "testOnly",
564
+ "text": undefined
565
+ }]
566
+ }
567
+ },
568
+ "selectPerPageIncrementValue": {
569
+ "complexType": {
570
+ "signature": "(value: number) => Promise<void>",
571
+ "parameters": [{
572
+ "name": "value",
573
+ "type": "number",
574
+ "docs": ""
575
+ }],
576
+ "references": {
577
+ "Promise": {
578
+ "location": "global",
579
+ "id": "global::Promise"
580
+ }
581
+ },
582
+ "return": "Promise<void>"
583
+ },
584
+ "docs": {
585
+ "text": "Emulates selecting a `perPage` value from the `perPageIncrements` dropdown,\nand updates the value of the `perPage` property.\n\nIf `value` is not in the `perPageIncrements` array, this method does nothing.",
586
+ "tags": [{
587
+ "name": "testOnly",
588
+ "text": undefined
589
+ }]
590
+ }
591
+ },
592
+ "setPageValue": {
593
+ "complexType": {
594
+ "signature": "(value: number) => Promise<void>",
595
+ "parameters": [{
596
+ "name": "value",
597
+ "type": "number",
598
+ "docs": ""
599
+ }],
600
+ "references": {
601
+ "Promise": {
602
+ "location": "global",
603
+ "id": "global::Promise"
604
+ }
605
+ },
606
+ "return": "Promise<void>"
607
+ },
608
+ "docs": {
609
+ "text": "Emulates setting the page value in the `<input>` field,\nand emitting a change event with the updated page number.\n\nIf `value` is invalid, this method does nothing.",
610
+ "tags": [{
611
+ "name": "testOnly",
612
+ "text": undefined
613
+ }]
614
+ }
615
+ }
616
+ };
617
+ }
402
618
  static get elementRef() { return "hostElement"; }
403
619
  static get watchers() {
404
620
  return [{
@@ -1 +1 @@
1
- {"version":3,"file":"q2-pagination.js","sourceRoot":"","sources":["../../../src/components/q2-pagination/q2-pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAA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ComponentInterface,\n Watch,\n Listen,\n Element,\n Event,\n EventEmitter,\n} from '@stencil/core';\nimport { isEventFromElement, loc, nextPaint, overrideFocus } from 'src/utils';\n\n@Component({ tag: 'q2-pagination', shadow: true, styleUrl: 'q2-pagination.scss' })\nexport class Q2Pagination implements ComponentInterface {\n // #region Own Properties\n\n containerElement: HTMLElement;\n containerWidth: number;\n inputField: HTMLQ2InputElement;\n resizeObserver: ResizeObserver;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region State Properties\n\n @State()\n isSmall: boolean;\n\n // #endregion\n // #region Public Property API\n\n /** Indicates the horizontal alignment of children elements */\n @Prop()\n alignment: string;\n\n /** Determines whether the component uses the dynamic resizing behavior. */\n @Prop({ reflect: true, mutable: true })\n autoSize: boolean = true;\n\n /** The current page that is being displayed. */\n @Prop({ reflect: true, mutable: true })\n page: number;\n\n /**\n * The number of pages that can be displayed.\n * @info\n * Only referenced when `pagesOnly` is true.\n */\n @Prop({ reflect: true, mutable: true })\n pages: number;\n\n /** Indicates to only display the current and total pages. */\n @Prop({ reflect: true, mutable: true })\n pagesOnly: boolean;\n\n /** The total number of records displayed on each page. */\n @Prop()\n perPage: number;\n\n /** The list of perPage to operate pagination. e.g.) [10, 25, 50] */\n @Prop()\n perPageIncrements: number[];\n\n /** Indicates to only display the current and total records. */\n @Prop({ reflect: true, mutable: true })\n recordsOnly: boolean;\n\n /** Description of the record type to be displayed alongside the record count. */\n @Prop()\n recordType: string;\n\n /** The total number of records to paginate. */\n @Prop({ reflect: true })\n total: number;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the page is changed.\n * @legacyEvent\n */\n @Event()\n change: EventEmitter<{ page: number }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n this.removeResizeObserver();\n }\n\n componentWillLoad(): void {\n this.manageResizeObserver();\n }\n\n componentDidLoad(): void {\n this.containerWidth = this.containerElement.clientWidth;\n\n overrideFocus(this.hostElement);\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('focus')\n onHostElementFocus(event) {\n if (!isEventFromElement(event, this.hostElement)) return;\n const { isFullViewHidden, containerElement, inputField } = this;\n if (isFullViewHidden) {\n containerElement.querySelector<HTMLElement>('q2-btn:not([disabled])')?.focus();\n } else {\n inputField.focus();\n }\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('recordsOnly')\n @Watch('pagesOnly')\n @Watch('autoSize')\n manageResizeObserver() {\n if (this.autoSize && !this.recordsOnly && !this.pagesOnly) {\n if (this.resizeObserver) return;\n this.resizeObserver = new ResizeObserver(() => this.checkSize());\n this.resizeObserver.observe(this.hostElement);\n window.addEventListener('resize', this.checkSize);\n } else {\n this.isSmall = false;\n this.removeResizeObserver();\n }\n }\n\n // #endregion\n // #region Local Methods\n\n get currentRange() {\n const { perPageWithDefault: perPage, totalWithDefault: total, pageWithDefault: page } = this;\n const start = (page - 1) * perPage + 1;\n const end = Math.min(page * perPage, total);\n return `${start} - ${end}`;\n }\n\n get isFullViewHidden() {\n return this.isSmall || this.recordsOnly || this.pagesOnly;\n }\n\n get nextRange() {\n const { perPageWithDefault: perPage, totalWithDefault: total, pageWithDefault: page } = this;\n const start = page * perPage + 1;\n const end = Math.min((page + 1) * perPage, total);\n return `${start} - ${end}`;\n }\n\n get pageWithDefault() {\n return this.page || 1;\n }\n\n get perPageWithDefault() {\n return this.perPage || 10;\n }\n\n get prevRange() {\n const { perPageWithDefault: perPage, pageWithDefault: page } = this;\n const start = Math.max(1, (page - 2) * perPage + 1);\n const end = (page - 1) * perPage;\n return `${start} - ${end}`;\n }\n\n get recordTypeWithDefault() {\n return this.recordType || loc('tecton.element.pagination.defaultRecordType');\n }\n\n get totalPages() {\n const { pagesOnly, totalWithDefault: total, perPageWithDefault: perPage, pages } = this;\n\n if (pagesOnly && pages && !isNaN(parseInt(`${pages}`))) return pages;\n\n return Math.ceil(total / perPage);\n }\n\n get totalWithDefault() {\n return this.total || 0;\n }\n\n checkSize = () => {\n const { hostElement, containerElement } = this;\n const isOverflowing = this.containerWidth > hostElement.clientWidth;\n this.isSmall = isOverflowing;\n if (isOverflowing) return;\n\n nextPaint(() => {\n const containerWidthHasNotChanged = this.containerWidth === containerElement.clientWidth;\n if (containerWidthHasNotChanged) return;\n this.containerWidth = containerElement.clientWidth;\n this.checkSize();\n });\n };\n\n handlePageChange = (page: number) => {\n const { totalPages, inputField } = this;\n if (page < 1) {\n page = 1;\n } else if (page > totalPages) {\n page = totalPages;\n }\n\n if (inputField.value !== `${page}`) inputField.value = `${page}`;\n\n if (!this.hostElement.onchange) {\n this.page = page;\n }\n\n this.change.emit({ page });\n };\n\n handlePerPageChange = (event: CustomEvent) => {\n this.perPage = event.detail.value * 1;\n };\n\n removeResizeObserver() {\n if (this.resizeObserver) {\n this.resizeObserver?.unobserve(this.hostElement);\n this.resizeObserver = null;\n window.removeEventListener('resize', this.checkSize);\n }\n }\n\n // #endregion\n // #region Render Methods\n\n renderPerPage() {\n if (!this.perPageIncrements?.length) {\n return '';\n }\n this.perPageIncrements = this.perPageIncrements\n .filter(perPage => !isNaN(perPage))\n .map(perPage => perPage * 1)\n .sort((a, b) => a - b);\n if (this.perPage === undefined) this.perPage = this.perPageIncrements[0];\n return (\n <q2-select\n onChange={this.handlePerPageChange}\n value={this.perPageIncrements.includes(this.perPage) ? `${this.perPage}` : undefined}\n >\n {this.perPageIncrements.map(perPage => (\n <q2-option\n value={`${perPage}`}\n display={`${loc('tecton.element.pagination.view')} ${perPage}`}\n >{`${loc('tecton.element.pagination.view')} ${perPage}`}</q2-option>\n ))}\n </q2-select>\n );\n }\n\n render() {\n const {\n pagesOnly,\n recordsOnly,\n isFullViewHidden,\n recordTypeWithDefault: recordType,\n totalPages,\n totalWithDefault: total,\n pageWithDefault: page,\n currentRange,\n nextRange,\n prevRange,\n } = this;\n const onFirstPage = page === 1;\n const onLastPage = page === totalPages;\n\n let nextButtonLabel: string = loc('tecton.element.pagination.goToNext');\n let prevButtonLabel: string = loc('tecton.element.pagination.goToPrevious');\n if (pagesOnly) {\n prevButtonLabel = loc('tecton.element.pagination.goToPages', { next: page - 1, total: totalPages });\n nextButtonLabel = loc('tecton.element.pagination.goToPages', { next: page + 1, total: totalPages });\n } else if (recordsOnly) {\n prevButtonLabel = loc('tecton.element.pagination.goToRecords', {\n range: prevRange,\n recordType: recordType.toLowerCase(),\n total,\n });\n nextButtonLabel = loc('tecton.element.pagination.goToRecords', {\n range: nextRange,\n recordType: recordType.toLowerCase(),\n total,\n });\n }\n\n return (\n <nav\n class=\"container\"\n ref={el => (this.containerElement = el)}\n aria-label={loc('tecton.element.pagination.title')}\n >\n <div\n class=\"description\"\n test-id=\"description\"\n >\n {pagesOnly\n ? loc('tecton.element.pagination.pages', {\n current: page,\n total: totalPages,\n })\n : loc('tecton.element.pagination.description', {\n range: currentRange,\n recordType: recordType.toLowerCase(),\n total: total.toLocaleString(),\n })}\n </div>\n <div class=\"btn-group\">\n <q2-btn\n label={loc('tecton.element.pagination.goToFirstPage')}\n disabled={onFirstPage}\n hidden={isFullViewHidden}\n onClick={() => this.handlePageChange(1)}\n test-id=\"firstPageBtn\"\n hide-label\n >\n <q2-icon type=\"chevron-double-left\" />\n </q2-btn>\n <q2-btn\n label={prevButtonLabel}\n disabled={onFirstPage}\n onClick={() => this.handlePageChange(page - 1)}\n test-id=\"prevPageBtn\"\n hide-label\n >\n <q2-icon type=\"chevron-left\" />\n </q2-btn>\n </div>\n <div\n class=\"controls\"\n hidden={isFullViewHidden}\n test-id=\"controls\"\n >\n <span aria-hidden=\"true\">{loc('tecton.element.pagination.page')}</span>\n <div\n class=\"input-wrapper\"\n onClick={() => this.inputField.dispatchEvent(new FocusEvent('focus'))}\n >\n <q2-input\n type=\"number\"\n value={`${page}`}\n min={1}\n max={this.totalPages}\n hideLabel\n optional\n label={`${loc('tecton.element.pagination.page')} (${loc(\n 'tecton.element.pagination.ofPages',\n [totalPages.toLocaleString()]\n )})`}\n onChange={event => this.handlePageChange(event.detail.value)}\n test-id=\"pageInput\"\n current=\"page\"\n ref={el => (this.inputField = el)}\n ></q2-input>\n </div>\n <span aria-hidden=\"true\">\n {loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()])}\n </span>\n </div>\n <div class=\"btn-group\">\n <q2-btn\n label={nextButtonLabel}\n disabled={onLastPage}\n onClick={() => this.handlePageChange(page + 1)}\n test-id=\"nextPageBtn\"\n hide-label\n >\n <q2-icon type=\"chevron-right\" />\n </q2-btn>\n <q2-btn\n label=\"tecton.element.pagination.goToLastPage\"\n disabled={onLastPage}\n hidden={isFullViewHidden}\n onClick={() => this.handlePageChange(totalPages)}\n test-id=\"lastPageBtn\"\n hide-label\n >\n <q2-icon type=\"chevron-double-right\" />\n </q2-btn>\n </div>\n <div\n class=\"per-page\"\n hidden={isFullViewHidden || !this.perPageIncrements?.length}\n >\n {this.renderPerPage()}\n </div>\n </nav>\n );\n }\n\n // #endregion\n}\n"]}
1
+ {"version":3,"file":"q2-pagination.js","sourceRoot":"","sources":["../../../src/components/q2-pagination/q2-pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,KAAK,EACL,IAAI,EACJ,CAAC,EAED,KAAK,EACL,MAAM,EACN,OAAO,EACP,MAAM,EACN,KAAK,GAER,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,kBAAkB,EAAE,GAAG,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG9E,MAAM,OAAO,YAAY;;QAwRrB,cAAS,GAAG,GAAG,EAAE;YACb,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAC;YAC/C,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,GAAG,WAAW,CAAC,WAAW,CAAC;YACpE,IAAI,CAAC,OAAO,GAAG,aAAa,CAAC;YAC7B,IAAI,aAAa;gBAAE,OAAO;YAE1B,SAAS,CAAC,GAAG,EAAE;gBACX,MAAM,2BAA2B,GAAG,IAAI,CAAC,c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AM,EAAE,gBAAgB,IAAI,CAAC,CAAA,MAAA,IAAI,CAAC,iBAAiB,0CAAE,MAAM,CAAA,IAE1D,iBAAiB,IAAI,IAAI,CAAC,aAAa,EAAE,CACxC,CACJ,CACT,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGJ","sourcesContent":["import {\n Component,\n State,\n Prop,\n h,\n ComponentInterface,\n Watch,\n Listen,\n Element,\n Method,\n Event,\n EventEmitter,\n} from '@stencil/core';\nimport { isEventFromElement, loc, nextPaint, overrideFocus } from 'src/utils';\n\n@Component({ tag: 'q2-pagination', shadow: true, styleUrl: 'q2-pagination.scss' })\nexport class Q2Pagination implements ComponentInterface {\n // #region Own Properties\n\n containerElement: HTMLElement;\n containerWidth: number;\n firstPageBtn: HTMLQ2BtnElement;\n inputField: HTMLQ2InputElement;\n lastPageBtn: HTMLQ2BtnElement;\n nextPageBtn: HTMLQ2BtnElement;\n perPageSelect: HTMLQ2SelectElement;\n prevPageBtn: HTMLQ2BtnElement;\n resizeObserver: ResizeObserver;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region State Properties\n\n @State()\n isSmall: boolean;\n\n // #endregion\n // #region Public Property API\n\n /** Indicates the horizontal alignment of children elements */\n @Prop()\n alignment: string;\n\n /** Determines whether the component uses the dynamic resizing behavior. */\n @Prop({ reflect: true, mutable: true })\n autoSize: boolean = true;\n\n /** The current page that is being displayed. */\n @Prop({ reflect: true, mutable: true })\n page: number;\n\n /**\n * The number of pages that can be displayed.\n * @info\n * Only referenced when `pagesOnly` is true.\n */\n @Prop({ reflect: true, mutable: true })\n pages: number;\n\n /** Indicates to display only the current and total pages. */\n @Prop({ reflect: true, mutable: true })\n pagesOnly: boolean;\n\n /** The total number of records displayed on each page. */\n @Prop({ reflect: true, mutable: true })\n perPage: number;\n\n /**\n * A list of perPage values.\n * This generates a [Select](https://tecton.q2developer.com/design-system/q2-select/) element that allows the user to modify the `perPage` value.\n *\n * **Example:**\n * @snippet\n * this.perPageIncrements = [10, 25, 50];\n */\n @Prop()\n perPageIncrements: number[];\n\n /** Indicates to display only the current and total records. */\n @Prop({ reflect: true, mutable: true })\n recordsOnly: boolean;\n\n /** Description of the record type to be displayed alongside the record count. */\n @Prop()\n recordType: string;\n\n /** The total number of records to paginate. */\n @Prop({ reflect: true })\n total: number;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the page is changed.\n * @legacyEvent\n */\n @Event()\n change: EventEmitter<{ page: number }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n this.removeResizeObserver();\n }\n\n componentWillLoad(): void {\n this.manageResizeObserver();\n }\n\n componentDidLoad(): void {\n this.containerWidth = this.containerElement.clientWidth;\n\n overrideFocus(this.hostElement);\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('focus')\n onHostElementFocus(event) {\n if (!isEventFromElement(event, this.hostElement)) return;\n const { isFullViewHidden, containerElement, inputField } = this;\n if (isFullViewHidden) {\n containerElement.querySelector<HTMLElement>('q2-btn:not([disabled])')?.focus();\n } else {\n inputField.focus();\n }\n }\n\n // #endregion\n // #region Public Methods API\n\n /**\n * Emulates clicking the button that controls moving to the first page, and emitting a change event with the updated page number.\n *\n * If the `<button>` is disabled, this method does nothing.\n * @testOnly\n */\n @Method()\n async clickFirstPage() {\n const button = this.firstPageBtn;\n if (button?.disabled) return;\n button.click();\n }\n\n /**\n * Emulates clicking the button that controls moving to the last page, and emitting a change event with the updated page number.\n *\n * If the `<button>` is disabled, this method does nothing.\n * @testOnly\n */\n @Method()\n async clickLastPage() {\n const button = this.lastPageBtn;\n if (button?.disabled) return;\n button.click();\n }\n\n /**\n * Emulates clicking the button that controls moving to the next page, and emitting a change event with the updated page number.\n *\n * If the `<button>` is disabled, this method does nothing.\n * @testOnly\n */\n @Method()\n async clickNextPage() {\n const button = this.nextPageBtn;\n if (button?.disabled) return;\n button.click();\n }\n\n /**\n * Emulates clicking the button that controls moving to the previous page, and emitting a change event with the updated page number.\n *\n * If the `<button>` is disabled, this method does nothing.\n * @testOnly\n */\n @Method()\n async clickPreviousPage() {\n const button = this.prevPageBtn;\n if (button?.disabled) return;\n button.click();\n }\n\n /**\n * Emulates selecting a `perPage` value from the `perPageIncrements` dropdown,\n * and updates the value of the `perPage` property.\n *\n * If `value` is not in the `perPageIncrements` array, this method does nothing.\n * @testOnly\n */\n @Method()\n async selectPerPageIncrementValue(value: number) {\n if (isNaN(value) || !this.showPerPageSelect || !this.perPageIncrements.includes(value)) return;\n this.perPageSelect.focus();\n this.perPageSelect.click();\n const options = Array.from(this.perPageSelect.querySelectorAll('q2-option'));\n options.find(option => option.value === `${value}`)?.click();\n }\n\n /**\n * Emulates setting the page value in the `<input>` field,\n * and emitting a change event with the updated page number.\n *\n * If `value` is invalid, this method does nothing.\n * @testOnly\n */\n @Method()\n async setPageValue(value: number) {\n if (!this.inputField || isNaN(value) || value < 1 || value > this.totalPages) return;\n this.inputField?.focus();\n this.inputField.value = `${value}`;\n this.inputField?.blur();\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('recordsOnly')\n @Watch('pagesOnly')\n @Watch('autoSize')\n manageResizeObserver() {\n if (this.autoSize && !this.recordsOnly && !this.pagesOnly) {\n if (this.resizeObserver) return;\n this.resizeObserver = new ResizeObserver(() => this.checkSize());\n this.resizeObserver.observe(this.hostElement);\n window.addEventListener('resize', this.checkSize);\n } else {\n this.isSmall = false;\n this.removeResizeObserver();\n }\n }\n\n // #endregion\n // #region Local Methods\n\n get currentRange() {\n const { perPageWithDefault: perPage, totalWithDefault: total, pageWithDefault: page } = this;\n const start = (page - 1) * perPage + 1;\n const end = Math.min(page * perPage, total);\n return `${start} - ${end}`;\n }\n\n get isFullViewHidden() {\n return this.isSmall || this.recordsOnly || this.pagesOnly;\n }\n\n get nextRange() {\n const { perPageWithDefault: perPage, totalWithDefault: total, pageWithDefault: page } = this;\n const start = page * perPage + 1;\n const end = Math.min((page + 1) * perPage, total);\n return `${start} - ${end}`;\n }\n\n get pageWithDefault() {\n return this.page || 1;\n }\n\n get perPageWithDefault() {\n return this.perPage || 10;\n }\n\n get prevRange() {\n const { perPageWithDefault: perPage, pageWithDefault: page } = this;\n const start = Math.max(1, (page - 2) * perPage + 1);\n const end = (page - 1) * perPage;\n return `${start} - ${end}`;\n }\n\n get recordTypeWithDefault() {\n return this.recordType || loc('tecton.element.pagination.defaultRecordType');\n }\n\n get showPerPageSelect() {\n return this.perPageIncrements?.length > 1;\n }\n\n get totalPages() {\n const { pagesOnly, totalWithDefault: total, perPageWithDefault: perPage, pages } = this;\n\n if (pagesOnly && pages && !isNaN(parseInt(`${pages}`))) return pages;\n\n return Math.ceil(total / perPage);\n }\n\n get totalWithDefault() {\n return this.total || 0;\n }\n\n checkSize = () => {\n const { hostElement, containerElement } = this;\n const isOverflowing = this.containerWidth > hostElement.clientWidth;\n this.isSmall = isOverflowing;\n if (isOverflowing) return;\n\n nextPaint(() => {\n const containerWidthHasNotChanged = this.containerWidth === containerElement.clientWidth;\n if (containerWidthHasNotChanged) return;\n this.containerWidth = containerElement.clientWidth;\n this.checkSize();\n });\n };\n\n handlePageChange = (page: number) => {\n const { totalPages, inputField } = this;\n if (page < 1) {\n page = 1;\n } else if (page > totalPages) {\n page = totalPages;\n }\n\n if (inputField.value !== `${page}`) inputField.value = `${page}`;\n\n if (!this.hostElement.onchange) {\n this.page = page;\n }\n\n this.change.emit({ page });\n };\n\n handlePerPageChange = (event: CustomEvent) => {\n this.perPage = event.detail.value * 1;\n };\n\n removeResizeObserver() {\n if (this.resizeObserver) {\n this.resizeObserver?.unobserve(this.hostElement);\n this.resizeObserver = null;\n window.removeEventListener('resize', this.checkSize);\n }\n }\n\n // #endregion\n // #region Render Methods\n\n renderPerPage() {\n this.perPageIncrements = this.perPageIncrements\n .filter(perPage => !isNaN(perPage))\n .map(perPage => perPage * 1)\n .sort((a, b) => a - b);\n if (this.perPage === undefined) this.perPage = this.perPageIncrements[0];\n return (\n <q2-select\n ref={el => (this.perPageSelect = el)}\n onChange={this.handlePerPageChange}\n value={this.perPageIncrements.includes(this.perPage) ? `${this.perPage}` : undefined}\n >\n {this.perPageIncrements.map(perPage => (\n <q2-option\n value={`${perPage}`}\n display={`${loc('tecton.element.pagination.view')} ${perPage}`}\n >{`${loc('tecton.element.pagination.view')} ${perPage}`}</q2-option>\n ))}\n </q2-select>\n );\n }\n\n render() {\n const {\n pagesOnly,\n recordsOnly,\n isFullViewHidden,\n recordTypeWithDefault: recordType,\n totalPages,\n totalWithDefault: total,\n pageWithDefault: page,\n currentRange,\n nextRange,\n prevRange,\n showPerPageSelect,\n } = this;\n const onFirstPage = page === 1;\n const onLastPage = page === totalPages;\n\n let nextButtonLabel: string = loc('tecton.element.pagination.goToNext');\n let prevButtonLabel: string = loc('tecton.element.pagination.goToPrevious');\n if (pagesOnly) {\n prevButtonLabel = loc('tecton.element.pagination.goToPages', { next: page - 1, total: totalPages });\n nextButtonLabel = loc('tecton.element.pagination.goToPages', { next: page + 1, total: totalPages });\n } else if (recordsOnly) {\n prevButtonLabel = loc('tecton.element.pagination.goToRecords', {\n range: prevRange,\n recordType: recordType.toLowerCase(),\n total,\n });\n nextButtonLabel = loc('tecton.element.pagination.goToRecords', {\n range: nextRange,\n recordType: recordType.toLowerCase(),\n total,\n });\n }\n\n return (\n <nav\n class=\"container\"\n ref={el => (this.containerElement = el)}\n aria-label={loc('tecton.element.pagination.title')}\n >\n <div\n class=\"description\"\n test-id=\"description\"\n >\n {pagesOnly\n ? loc('tecton.element.pagination.pages', {\n current: page,\n total: totalPages,\n })\n : loc('tecton.element.pagination.description', {\n range: currentRange,\n recordType: recordType.toLowerCase(),\n total: total.toLocaleString(),\n })}\n </div>\n <div class=\"btn-group\">\n <q2-btn\n ref={el => (this.firstPageBtn = el)}\n label={loc('tecton.element.pagination.goToFirstPage')}\n disabled={onFirstPage}\n hidden={isFullViewHidden}\n onClick={() => this.handlePageChange(1)}\n test-id=\"firstPageBtn\"\n hide-label\n >\n <q2-icon type=\"chevron-double-left\" />\n </q2-btn>\n <q2-btn\n ref={el => (this.prevPageBtn = el)}\n label={prevButtonLabel}\n disabled={onFirstPage}\n onClick={() => this.handlePageChange(page - 1)}\n test-id=\"prevPageBtn\"\n hide-label\n >\n <q2-icon type=\"chevron-left\" />\n </q2-btn>\n </div>\n <div\n class=\"controls\"\n hidden={isFullViewHidden}\n test-id=\"controls\"\n >\n <span aria-hidden=\"true\">{loc('tecton.element.pagination.page')}</span>\n <div\n class=\"input-wrapper\"\n onClick={() => this.inputField.dispatchEvent(new FocusEvent('focus'))}\n >\n <q2-input\n ref={el => (this.inputField = el)}\n type=\"number\"\n value={`${page}`}\n min={1}\n max={this.totalPages}\n hideLabel\n optional\n label={`${loc('tecton.element.pagination.page')} (${loc(\n 'tecton.element.pagination.ofPages',\n [totalPages.toLocaleString()]\n )})`}\n onChange={event => this.handlePageChange(event.detail.value)}\n test-id=\"pageInput\"\n current=\"page\"\n ></q2-input>\n </div>\n <span aria-hidden=\"true\">\n {loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()])}\n </span>\n </div>\n <div class=\"btn-group\">\n <q2-btn\n ref={el => (this.nextPageBtn = el)}\n label={nextButtonLabel}\n disabled={onLastPage}\n onClick={() => this.handlePageChange(page + 1)}\n test-id=\"nextPageBtn\"\n hide-label\n >\n <q2-icon type=\"chevron-right\" />\n </q2-btn>\n <q2-btn\n ref={el => (this.lastPageBtn = el)}\n label=\"tecton.element.pagination.goToLastPage\"\n disabled={onLastPage}\n hidden={isFullViewHidden}\n onClick={() => this.handlePageChange(totalPages)}\n test-id=\"lastPageBtn\"\n hide-label\n >\n <q2-icon type=\"chevron-double-right\" />\n </q2-btn>\n </div>\n <div\n class=\"per-page\"\n hidden={isFullViewHidden || !this.perPageIncrements?.length}\n >\n {showPerPageSelect && this.renderPerPage()}\n </div>\n </nav>\n );\n }\n\n // #endregion\n}\n"]}