q2-tecton-elements 1.18.0 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) hide show
  1. package/dist/cjs/click-elsewhere.cjs.entry.js +1 -1
  2. package/dist/cjs/{icons-e2bc9ee9.js → icons-afbdf88a.js} +1 -1
  3. package/dist/cjs/{index-eccd5617.js → index-3518c78c.js} +1 -1
  4. package/dist/cjs/{index-0128397d.js → index-734296a7.js} +476 -271
  5. package/dist/cjs/loader.cjs.js +3 -3
  6. package/dist/cjs/q2-avatar.cjs.entry.js +9 -6
  7. package/dist/cjs/q2-badge_2.cjs.entry.js +46 -7
  8. package/dist/cjs/q2-btn_2.cjs.entry.js +30 -5
  9. package/dist/cjs/q2-calendar.cjs.entry.js +89 -62
  10. package/dist/cjs/q2-card.cjs.entry.js +17 -6
  11. package/dist/cjs/q2-carousel-pane.cjs.entry.js +7 -3
  12. package/dist/cjs/q2-carousel.cjs.entry.js +196 -285
  13. package/dist/cjs/q2-chart-donut.cjs.entry.js +583 -504
  14. package/dist/cjs/q2-checkbox-group.cjs.entry.js +9 -7
  15. package/dist/cjs/q2-checkbox.cjs.entry.js +17 -4
  16. package/dist/cjs/q2-dropdown-item.cjs.entry.js +9 -3
  17. package/dist/cjs/q2-dropdown.cjs.entry.js +16 -5
  18. package/dist/cjs/q2-editable-field.cjs.entry.js +16 -6
  19. package/dist/cjs/q2-icon.cjs.entry.js +6 -4
  20. package/dist/cjs/q2-loading-element.cjs.entry.js +6 -2
  21. package/dist/cjs/q2-loc.cjs.entry.js +5 -3
  22. package/dist/cjs/q2-message.cjs.entry.js +4 -3
  23. package/dist/cjs/q2-month-picker.cjs.entry.js +9 -7
  24. package/dist/cjs/q2-optgroup.cjs.entry.js +6 -5
  25. package/dist/cjs/q2-option-list_2.cjs.entry.js +21 -7
  26. package/dist/cjs/q2-option.cjs.entry.js +12 -2
  27. package/dist/cjs/q2-pagination.cjs.entry.js +11 -3
  28. package/dist/cjs/q2-pill.cjs.entry.js +25 -7
  29. package/dist/cjs/q2-radio-group.cjs.entry.js +13 -6
  30. package/dist/cjs/q2-radio.cjs.entry.js +13 -8
  31. package/dist/cjs/q2-section.cjs.entry.js +9 -4
  32. package/dist/cjs/q2-select.cjs.entry.js +26 -17
  33. package/dist/cjs/q2-stepper-pane.cjs.entry.js +8 -3
  34. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +5 -4
  35. package/dist/cjs/q2-stepper.cjs.entry.js +9 -7
  36. package/dist/cjs/q2-tab-container.cjs.entry.js +14 -9
  37. package/dist/cjs/q2-tab-pane.cjs.entry.js +10 -2
  38. package/dist/cjs/q2-tag.cjs.entry.js +20 -7
  39. package/dist/cjs/q2-tecton-elements.cjs.js +3 -3
  40. package/dist/cjs/q2-textarea.cjs.entry.js +20 -4
  41. package/dist/cjs/q2-tooltip.cjs.entry.js +9 -3
  42. package/dist/cjs/{shapes-c1a60d46.js → shapes-aad2b98f.js} +1 -1
  43. package/dist/cjs/tecton-tab-pane.cjs.entry.js +17 -2
  44. package/dist/collection/collection-manifest.json +2 -2
  45. package/dist/collection/components/click-elsewhere/index.js +18 -17
  46. package/dist/collection/components/q2-avatar/index.js +100 -92
  47. package/dist/collection/components/q2-avatar/styles.css +1 -1
  48. package/dist/collection/components/q2-badge/index.js +119 -111
  49. package/dist/collection/components/q2-badge/styles.css +1 -1
  50. package/dist/collection/components/q2-btn/index.js +349 -322
  51. package/dist/collection/components/q2-btn/styles.css +7 -7
  52. package/dist/collection/components/q2-calendar/index.js +565 -551
  53. package/dist/collection/components/q2-calendar/q2-month-picker.css +1 -1
  54. package/dist/collection/components/q2-calendar/q2-month-picker.js +112 -116
  55. package/dist/collection/components/q2-calendar/styles.css +1 -1
  56. package/dist/collection/components/q2-card/index.js +262 -244
  57. package/dist/collection/components/q2-card/styles.css +9 -2
  58. package/dist/collection/components/q2-carousel/index.js +249 -253
  59. package/dist/collection/components/q2-carousel/styles.css +1 -1
  60. package/dist/collection/components/q2-carousel-pane/index.js +108 -96
  61. package/dist/collection/components/q2-carousel-pane/styles.css +5 -4
  62. package/dist/collection/components/q2-chart-donut/index.js +350 -334
  63. package/dist/collection/components/q2-chart-donut/styles.css +3 -3
  64. package/dist/collection/components/q2-checkbox/index.js +296 -287
  65. package/dist/collection/components/q2-checkbox/styles.css +2 -2
  66. package/dist/collection/components/q2-checkbox-group/index.js +156 -152
  67. package/dist/collection/components/q2-checkbox-group/styles.css +1 -1
  68. package/dist/collection/components/q2-dropdown/index.js +255 -240
  69. package/dist/collection/components/q2-dropdown/styles.css +1 -1
  70. package/dist/collection/components/q2-dropdown-item/index.js +134 -123
  71. package/dist/collection/components/q2-dropdown-item/styles.css +12 -10
  72. package/dist/collection/components/q2-editable-field/index.js +300 -293
  73. package/dist/collection/components/q2-editable-field/styles.css +1 -1
  74. package/dist/collection/components/q2-icon/icons.js +358 -2158
  75. package/dist/collection/components/q2-icon/index.js +59 -49
  76. package/dist/collection/components/q2-icon/styles.css +1 -1
  77. package/dist/collection/components/q2-input/index.js +729 -705
  78. package/dist/collection/components/q2-input/styles.css +2 -2
  79. package/dist/collection/components/q2-loading/index.js +143 -132
  80. package/dist/collection/components/q2-loading/skeleton/q2-loading-element/index.js +85 -74
  81. package/dist/collection/components/q2-loading/skeleton/shapes.js +23 -36
  82. package/dist/collection/components/q2-loading/styles.css +1 -1
  83. package/dist/collection/components/q2-loc/index.js +49 -39
  84. package/dist/collection/components/q2-loc/styles.css +1 -1
  85. package/dist/collection/components/q2-message/index.js +101 -92
  86. package/dist/collection/components/q2-message/styles.css +1 -1
  87. package/dist/collection/components/q2-optgroup/index.js +64 -56
  88. package/dist/collection/components/q2-optgroup/styles.css +1 -1
  89. package/dist/collection/components/q2-option/index.js +244 -229
  90. package/dist/collection/components/q2-option/styles.css +5 -1
  91. package/dist/collection/components/q2-option-list/index.js +291 -270
  92. package/dist/collection/components/q2-option-list/styles.css +1 -1
  93. package/dist/collection/components/q2-pagination/index.js +183 -179
  94. package/dist/collection/components/q2-pagination/styles.css +1 -1
  95. package/dist/collection/components/q2-pill/index.js +260 -208
  96. package/dist/collection/components/q2-pill/styles.css +1 -1
  97. package/dist/collection/components/q2-popover/index.js +169 -151
  98. package/dist/collection/components/q2-popover/styles.css +2 -2
  99. package/dist/collection/components/q2-radio/index.js +233 -224
  100. package/dist/collection/components/q2-radio/styles.css +3 -3
  101. package/dist/collection/components/q2-radio-group/index.js +252 -244
  102. package/dist/collection/components/q2-radio-group/styles.css +1 -1
  103. package/dist/collection/components/q2-section/index.js +134 -125
  104. package/dist/collection/components/q2-section/styles.css +12 -1
  105. package/dist/collection/components/q2-select/index.js +393 -381
  106. package/dist/collection/components/q2-select/styles.css +1 -1
  107. package/dist/collection/components/q2-stepper/index.js +124 -126
  108. package/dist/collection/components/q2-stepper/styles.css +2 -1
  109. package/dist/collection/components/q2-stepper-pane/index.js +165 -149
  110. package/dist/collection/components/q2-stepper-pane/styles.css +1 -1
  111. package/dist/collection/components/q2-stepper-vertical/index.js +86 -85
  112. package/dist/collection/components/q2-stepper-vertical/styles.css +1 -1
  113. package/dist/collection/components/q2-tab-container/index.js +189 -184
  114. package/dist/collection/components/q2-tab-container/styles.css +1 -1
  115. package/dist/collection/components/q2-tab-pane/index.js +185 -166
  116. package/dist/collection/components/q2-tab-pane/styles.css +1 -1
  117. package/dist/collection/components/q2-tag/index.js +168 -116
  118. package/dist/collection/components/q2-tag/styles.css +1 -1
  119. package/dist/collection/components/q2-textarea/index.js +344 -327
  120. package/dist/collection/components/q2-textarea/styles.css +2 -2
  121. package/dist/collection/components/q2-tooltip/index.js +147 -133
  122. package/dist/collection/components/q2-tooltip/styles.css +1 -1
  123. package/dist/collection/components/tecton-tab-pane/index.js +287 -266
  124. package/dist/collection/components/tecton-tab-pane/styles.css +1 -1
  125. package/dist/collection/utils/index.js +2 -6
  126. package/dist/esm/click-elsewhere.entry.js +1 -1
  127. package/dist/esm/{icons-ed54e307.js → icons-78da5dd2.js} +1 -1
  128. package/dist/esm/{index-eac6b89e.js → index-9c591682.js} +1 -1
  129. package/dist/esm/{index-6d5ed7cc.js → index-bb1c8c7f.js} +476 -271
  130. package/dist/esm/loader.js +3 -3
  131. package/dist/esm/polyfills/css-shim.js +1 -1
  132. package/dist/esm/q2-avatar.entry.js +9 -6
  133. package/dist/esm/q2-badge_2.entry.js +46 -7
  134. package/dist/esm/q2-btn_2.entry.js +30 -5
  135. package/dist/esm/q2-calendar.entry.js +89 -62
  136. package/dist/esm/q2-card.entry.js +17 -6
  137. package/dist/esm/q2-carousel-pane.entry.js +7 -3
  138. package/dist/esm/q2-carousel.entry.js +196 -285
  139. package/dist/esm/q2-chart-donut.entry.js +583 -504
  140. package/dist/esm/q2-checkbox-group.entry.js +9 -7
  141. package/dist/esm/q2-checkbox.entry.js +17 -4
  142. package/dist/esm/q2-dropdown-item.entry.js +9 -3
  143. package/dist/esm/q2-dropdown.entry.js +16 -5
  144. package/dist/esm/q2-editable-field.entry.js +16 -6
  145. package/dist/esm/q2-icon.entry.js +6 -4
  146. package/dist/esm/q2-loading-element.entry.js +6 -2
  147. package/dist/esm/q2-loc.entry.js +5 -3
  148. package/dist/esm/q2-message.entry.js +4 -3
  149. package/dist/esm/q2-month-picker.entry.js +9 -7
  150. package/dist/esm/q2-optgroup.entry.js +6 -5
  151. package/dist/esm/q2-option-list_2.entry.js +21 -7
  152. package/dist/esm/q2-option.entry.js +12 -2
  153. package/dist/esm/q2-pagination.entry.js +11 -3
  154. package/dist/esm/q2-pill.entry.js +25 -7
  155. package/dist/esm/q2-radio-group.entry.js +13 -6
  156. package/dist/esm/q2-radio.entry.js +13 -8
  157. package/dist/esm/q2-section.entry.js +9 -4
  158. package/dist/esm/q2-select.entry.js +26 -17
  159. package/dist/esm/q2-stepper-pane.entry.js +8 -3
  160. package/dist/esm/q2-stepper-vertical.entry.js +5 -4
  161. package/dist/esm/q2-stepper.entry.js +9 -7
  162. package/dist/esm/q2-tab-container.entry.js +14 -9
  163. package/dist/esm/q2-tab-pane.entry.js +10 -2
  164. package/dist/esm/q2-tag.entry.js +20 -7
  165. package/dist/esm/q2-tecton-elements.js +3 -3
  166. package/dist/esm/q2-textarea.entry.js +20 -4
  167. package/dist/esm/q2-tooltip.entry.js +9 -3
  168. package/dist/esm/{shapes-c32e3ba2.js → shapes-62b8a431.js} +1 -1
  169. package/dist/esm/tecton-tab-pane.entry.js +17 -2
  170. package/dist/loader/package.json +1 -0
  171. package/dist/q2-tecton-elements/p-0ba564b1.entry.js +1 -0
  172. package/dist/q2-tecton-elements/p-0fad9c5a.entry.js +1 -0
  173. package/dist/q2-tecton-elements/{p-73154834.js → p-13a639cf.js} +1 -1
  174. package/dist/q2-tecton-elements/p-16c11d74.entry.js +1 -0
  175. package/dist/q2-tecton-elements/p-17e0cbf1.entry.js +1 -0
  176. package/dist/q2-tecton-elements/p-18e095af.entry.js +1 -0
  177. package/dist/q2-tecton-elements/p-2c9b1308.entry.js +1 -0
  178. package/dist/q2-tecton-elements/p-2e832e42.entry.js +1 -0
  179. package/dist/q2-tecton-elements/p-315fdb74.entry.js +1 -0
  180. package/dist/q2-tecton-elements/{p-c608e3c9.entry.js → p-444415b5.entry.js} +1 -1
  181. package/dist/q2-tecton-elements/p-4d700630.entry.js +1 -0
  182. package/dist/q2-tecton-elements/p-4f0f45e7.entry.js +1 -0
  183. package/dist/q2-tecton-elements/p-54e792bd.entry.js +1 -0
  184. package/dist/q2-tecton-elements/{p-80014da0.js → p-5e374fbd.js} +1 -1
  185. package/dist/q2-tecton-elements/p-5f064e1e.entry.js +39 -0
  186. package/dist/q2-tecton-elements/p-692f2d09.entry.js +1 -0
  187. package/dist/q2-tecton-elements/p-6e6b5b80.entry.js +1 -0
  188. package/dist/q2-tecton-elements/p-7e8f43d1.entry.js +1 -0
  189. package/dist/q2-tecton-elements/p-8e380edf.entry.js +1 -0
  190. package/dist/q2-tecton-elements/p-926a3e80.js +2 -0
  191. package/dist/q2-tecton-elements/{p-93c00587.js → p-92e1faf8.js} +1 -1
  192. package/dist/q2-tecton-elements/p-9772b15f.entry.js +1 -0
  193. package/dist/q2-tecton-elements/p-97aa8423.entry.js +1 -0
  194. package/dist/q2-tecton-elements/{p-17cffd7d.entry.js → p-a987402e.entry.js} +1 -1
  195. package/dist/q2-tecton-elements/p-aaf42539.entry.js +1 -0
  196. package/dist/q2-tecton-elements/p-ac674c20.entry.js +1 -0
  197. package/dist/q2-tecton-elements/p-b8b00394.entry.js +1 -0
  198. package/dist/q2-tecton-elements/p-c444a60b.entry.js +1 -0
  199. package/dist/q2-tecton-elements/p-c6c489fe.entry.js +1 -0
  200. package/dist/q2-tecton-elements/p-ce015552.entry.js +1 -0
  201. package/dist/q2-tecton-elements/p-d464fccc.entry.js +1 -0
  202. package/dist/q2-tecton-elements/p-de164483.entry.js +1 -0
  203. package/dist/q2-tecton-elements/p-df91e954.entry.js +1 -0
  204. package/dist/q2-tecton-elements/p-e6d26f39.entry.js +1 -0
  205. package/dist/q2-tecton-elements/p-e8e113c2.entry.js +1 -0
  206. package/dist/q2-tecton-elements/p-f1d06917.entry.js +1 -0
  207. package/dist/q2-tecton-elements/p-f800fd1e.entry.js +1 -0
  208. package/dist/q2-tecton-elements/p-fb37e67e.entry.js +1 -0
  209. package/dist/q2-tecton-elements/p-fc134a5d.entry.js +1 -0
  210. package/dist/q2-tecton-elements/p-fe88e979.entry.js +1 -0
  211. package/dist/q2-tecton-elements/p-ffb48ccc.entry.js +1 -0
  212. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  213. package/dist/test/helpers.js +6 -0
  214. package/dist/types/components/q2-pill/index.d.ts +3 -0
  215. package/dist/types/components/q2-tag/index.d.ts +3 -0
  216. package/dist/types/components.d.ts +154 -38
  217. package/dist/types/stencil-public-runtime.d.ts +20 -4
  218. package/dist/types/workspace/workspace/Tecton_tecton-production_master/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +2 -0
  219. package/package.json +6 -6
  220. package/dist/q2-tecton-elements/p-02c1b7fd.entry.js +0 -1
  221. package/dist/q2-tecton-elements/p-04c743f2.entry.js +0 -1
  222. package/dist/q2-tecton-elements/p-07dc509c.entry.js +0 -1
  223. package/dist/q2-tecton-elements/p-12caa479.entry.js +0 -1
  224. package/dist/q2-tecton-elements/p-160dd1c2.entry.js +0 -1
  225. package/dist/q2-tecton-elements/p-1a3de749.entry.js +0 -1
  226. package/dist/q2-tecton-elements/p-2061c3fd.entry.js +0 -1
  227. package/dist/q2-tecton-elements/p-2a217895.entry.js +0 -1
  228. package/dist/q2-tecton-elements/p-2b94ae62.entry.js +0 -1
  229. package/dist/q2-tecton-elements/p-2e54f9a0.entry.js +0 -1
  230. package/dist/q2-tecton-elements/p-375569ff.entry.js +0 -1
  231. package/dist/q2-tecton-elements/p-3766cc6c.entry.js +0 -1
  232. package/dist/q2-tecton-elements/p-3eda2714.entry.js +0 -1
  233. package/dist/q2-tecton-elements/p-421af42d.entry.js +0 -1
  234. package/dist/q2-tecton-elements/p-4c53713d.entry.js +0 -1
  235. package/dist/q2-tecton-elements/p-4fd405f5.entry.js +0 -1
  236. package/dist/q2-tecton-elements/p-509c8924.entry.js +0 -1
  237. package/dist/q2-tecton-elements/p-55dc3dc1.entry.js +0 -1
  238. package/dist/q2-tecton-elements/p-5fffb28a.entry.js +0 -1
  239. package/dist/q2-tecton-elements/p-612e9974.entry.js +0 -1
  240. package/dist/q2-tecton-elements/p-64ca8c59.entry.js +0 -1
  241. package/dist/q2-tecton-elements/p-796c2bb5.entry.js +0 -1
  242. package/dist/q2-tecton-elements/p-86887866.entry.js +0 -1
  243. package/dist/q2-tecton-elements/p-9204c34d.entry.js +0 -1
  244. package/dist/q2-tecton-elements/p-9725d55f.entry.js +0 -1
  245. package/dist/q2-tecton-elements/p-a0fa416d.entry.js +0 -39
  246. package/dist/q2-tecton-elements/p-bd83e8e2.entry.js +0 -1
  247. package/dist/q2-tecton-elements/p-be0f2539.entry.js +0 -1
  248. package/dist/q2-tecton-elements/p-c05b0b55.entry.js +0 -1
  249. package/dist/q2-tecton-elements/p-c5691700.js +0 -1
  250. package/dist/q2-tecton-elements/p-d826d7ad.entry.js +0 -1
  251. package/dist/q2-tecton-elements/p-d9e9340c.entry.js +0 -1
  252. package/dist/q2-tecton-elements/p-e5757895.entry.js +0 -1
  253. package/dist/q2-tecton-elements/p-e68c9ef0.entry.js +0 -1
  254. package/dist/q2-tecton-elements/p-eb33bda4.entry.js +0 -1
  255. package/dist/q2-tecton-elements/p-f319549d.entry.js +0 -1
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as r,F as o,g as i}from"./p-926a3e80.js";import{d as s,o as a,i as l,l as p}from"./p-5e374fbd.js";s();const n=class{constructor(r){t(this,r),this.change=e(this,"change",7),this.scheduledAfterRender=[],this.onSlotChange=()=>{this.checkForPanes(),this.checkScrollState()},this.onScrollBtnClick=t=>{const e=Math.floor(this.listElement.clientWidth/2);this.listElement.scrollBy({left:"left"===t?-e:e,behavior:"smooth"})},this.onStepClick=(t,e)=>{t.stopPropagation();const{currentStep:r,stepCount:o,lastEnabledStep:i}=this;e>i||e===r||this.change.emit({selectedStep:e,lastEnabledStep:i,currentStep:r,stepCount:o})},this.onStepKeyDown=(t,e)=>{const{lastEnabledStep:r,stepCount:o}=this,{key:i}=t;let s;switch(i){case"ArrowLeft":t.preventDefault(),s=Math.max(e-1,0);break;case"ArrowRight":t.preventDefault(),s=Math.min(e+1,o);break;case"Home":t.preventDefault(),s=1;break;case"End":t.preventDefault(),s=r}s&&this.focusStep(s,!0)},this.checkForPanes=()=>{const{allPanes:t}=this;t.length&&(this.stepCount=t.length)},this.checkScrollState=()=>{if(!this.listElement)return;const{scrollLeft:t,scrollWidth:e,clientWidth:r}=this.listElement;this.scrollEnabled=e>r,this.showScrollLeft=!!t,this.showScrollRight=e!==t+r},this.currentStep=1,this.stepCount=void 0,this.lastEnabledStep=void 0,this.scrollEnabled=!1,this.showScrollLeft=!1,this.showScrollRight=!1}componentWillLoad(){this.lastEnabledStep||(this.lastEnabledStep=this.currentStep||1),this.resizeObserver=new ResizeObserver((()=>this.checkScrollState())),this.checkForPanes()}componentDidLoad(){this.resizeObserver.observe(this.listElement),this.checkScrollState(),a(this.hostElement),setTimeout((()=>this.showStep(this.currentStep||1)),0)}componentDidRender(){this.scheduledAfterRender.forEach((t=>t())),this.scheduledAfterRender=[]}disconnectedCallback(){this.resizeObserver.disconnect()}currentStepChanged(t){this.showStep(t)}defaultChangeHandler(t){const{hostElement:e}=this;t.target===e&&!e.getAttribute("onchange")&&t.detail&&(this.currentStep=t.detail.selectedStep)}delegateFocus(t){l(t,this.hostElement)&&this.focusStep(this.currentStep,!0,!0)}statusChangeHandler(t){const e=Array.from(this.allPanes).findIndex((e=>t.detail.id===e.id));e>-1&&(this.allPanes[e].status=t.detail.status,this.renderStepBtn(e))}get allPanes(){return this.hostElement.querySelectorAll("q2-stepper-pane")}showStep(t){if(t>this.lastEnabledStep){const{currentStep:e,stepCount:r}=this;this.lastEnabledStep=t,this.change.emit({selectedStep:null,lastEnabledStep:t,currentStep:e,stepCount:r})}this.scheduledAfterRender.push(this.resizeIframe),this.showStepPane(t),this.focusStep(t,this.scrollEnabled)}resizeIframe(){var t,e;return null===(e=null===(t=null===window||void 0===window?void 0:window.TectonElements)||void 0===t?void 0:t.resizeIframe)||void 0===e?void 0:e.call(t)}showStepPane(t){this.allPanes.forEach(((e,r)=>{e.isActive=t===r+1}))}focusStep(t,e,r){var o;const i=this.listElement.children[t-1],s=document.activeElement===this.hostElement;i&&((s||r)&&(null===(o=i.firstElementChild)||void 0===o||o.focus()),e)&&this.listElement.scrollTo({left:i.offsetLeft-this.listElement.clientWidth/2,behavior:"smooth"})}renderStepBtn(t){var e;const{allPanes:i,stepCount:s,currentStep:a,lastEnabledStep:l}=this,{id:n,label:c,description:b,status:d}=null!==(e=null==i?void 0:i[t])&&void 0!==e?e:{},h=t+1,v=h===a,u=c&&`label-${n}`,f=c&&b&&`description-${n}`,g=!c&&p("tecton.element.stepper.number",[`${h}`,`${s}`]);let m;"complete"===d?m="success":"error"===d&&(m="warning");const w=["step-btn"];d&&w.push(`status-${d}`);const x="locked"===d,z=x||h>l;return r("li",{role:"presentation"},r("button",{class:w.join(" "),type:"button","aria-labelledby":u,"aria-describedBy":f,"aria-label":g,"aria-selected":v,"aria-controls":n,"aria-disabled":z?"true":null,role:"tab",tabIndex:v?0:-1,onKeyDown:t=>this.onStepKeyDown(t,h),onClick:t=>!x&&this.onStepClick(t,h)},r(o,null,m?r("div",{class:"step-icon"},r("q2-icon",{type:m})):r("div",{class:"step-bubble"},h),c&&r("div",{class:"step-label",id:u},p(c)),c&&b&&r("div",{class:"step-description",id:f},p(b)))),t?r("hr",null):"")}render(){const{stepCount:t,scrollEnabled:e,showScrollLeft:i,showScrollRight:s}=this,a=["step-container"];return e&&a.push("has-scroll"),r(o,null,r("div",{class:a.join(" ")},e&&r(o,null,r("div",{class:"gradient-left",hidden:!i}),r("div",{class:"gradient-right",hidden:!s}),r("q2-btn",{class:"btn-left",hidden:!this.showScrollLeft,onClick:()=>this.onScrollBtnClick("left")},r("q2-icon",{type:"chevron-left"})),r("q2-btn",{class:"btn-right",hidden:!this.showScrollRight,onClick:()=>this.onScrollBtnClick("right")},r("q2-icon",{type:"chevron-right"}))),r("ul",{onScroll:this.checkScrollState,ref:t=>this.listElement=t,role:"tablist"},[...Array(t).keys()].map((t=>this.renderStepBtn(t))))),r("div",null,r("slot",{onSlotchange:()=>this.onSlotChange()})))}get hostElement(){return i(this)}static get watchers(){return{currentStep:["currentStepChanged"]}}};n.style='*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #33b4ff #06C)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:block;position:relative}ul{--comp-bullet-bg:var(--tct-stepper-bullet-active-bg, var(--t-stepper-bullet-active-bg, var(--t-primary, #0079c1)));--comp-bullet-font-color:var(--tct-stepper-bullet-active-font-color, var(--t-stepper-bullet-active-font-color, var(--t-primary-font-color, #ffffff)));--comp-bullet-size:var(--tct-stepper-btn-icon-size, var(--t-stepper-btn-icon-size, 24px));--comp-bullet-gap:var(--tct-stepper-btn-gap, var(--t-stepper-btn-gap, var(--app-scale-3x, 15px)));--comp-bullet-border-offset:var(--tct-stepper-bullet-border-offset, var(--t-stepper-bullet-border-offset, 4px));--comp-bullet-border:var(--tct-stepper-bullet-border, var(--t-stepper-bullet-border, 2px solid var(--t-primary-l3, #21acff)));--comp-bullet-font-size:var-list(var-prefixer(stepper-btn-label-font-size), 16px);--comp-step-width:var(--tct-stepper-step-width, var(--t-stepper-step-width, var(--t-stepper-step-width, 80px)));--comp-step-gap:var(--tct-stepper-step-gap, var(--t-stepper-step-gap, 5px));--comp-top-btn-icon-size:var(--tct-stepper-btn-icon-size, var(--t-stepper-btn-icon-size, 24px));--comp-btn-icon-size:var(--comp-top-btn-icon-size);--comp-btn-content-gap:var(--tct-stepper-btn-gap, var(--t-stepper-btn-gap, var(--app-scale-3x, 15px)));--comp-btn-label-font-size:var-list(var-prefixer(stepper-btn-label-font-size), 16px);--comp-btn-label-color:var(--tct-stepper-label-color, var(--t-stepper-label-color, var(--t-text, #4d4d4d)));--comp-tween:var(--tct-stepper-tween, var(--t-stepper-tween, var(--app-tween-1, 0.2s ease)));overflow-x:auto;display:flex;justify-content:center;list-style:none;padding:0;padding:var(--tct-stepper-list-padding, var(--t-stepper-list-padding, 2px));margin:0;gap:var(--comp-step-gap);--comp-scrollbar-size:var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));--comp-scrollbar-border-radius:var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 3px)));--comp-scrollbar-color:var(--tct-scrollbar-color, var(--t-scrollbar-color, var(--t-a11y-gray-color, #747474)));scrollbar-width:thin;scrollbar-color:var(--comp-scrollbar-color) transparent}ul::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}ul::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}ul::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}.has-scroll ul{justify-content:unset}li{min-height:var(--tct-stepper-min-height, var(--t-stepper-min-height, 50px));flex:0 0 auto;position:relative;width:var(--comp-step-width);text-align:center;max-width:150px;min-width:80px}.step-btn{position:relative;background:transparent;border:0;cursor:pointer;display:flex;flex-direction:column;align-items:center;height:calc(100% - 4px);width:100%;transition:var(--comp-tween);padding:0;transition-property:box-shadow;outline:none;margin-top:2px;--comp-active-color:var(--t-primary, #0079c1)}.step-btn.status-complete{--comp-active-color:var(--const-stoplight-success, #0e8a00)}.step-btn.status-error{--comp-active-color:var(--const-stoplight-alert, #c30000)}.step-btn[aria-disabled]{cursor:not-allowed}.step-btn[aria-disabled],.step-btn[aria-disabled]+hr{--comp-bullet-font-color:var(--tct-stepper-bullet-inactive-font-color, var(--t-stepper-bullet-inactive-font-color, var(--t-text, #4d4d4d)));--comp-bullet-bg:var(--tct-stepper-bullet-inactive-bg, var(--t-stepper-bullet-inactive-bg, var(--t-gray-12, #d9d9d9)))}.step-icon,.step-bubble{display:flex;justify-content:center;align-items:center;line-height:0;margin:var(--comp-bullet-gap) auto;color:var(--comp-bullet-font-color);width:var(--comp-btn-icon-size);height:var(--comp-btn-icon-size);min-height:var(--comp-btn-icon-size);font-size:var(--comp-bullet-font-size);transition:var(--comp-tween);transition-property:background, color;border-radius:50%;position:relative}.step-icon q2-icon,.step-bubble q2-icon{fill:var(--comp-active-color);--tct-icon-stroke-primary:var(--comp-active-color);--tct-icon-stroke-secondary:var(--t-base, #ffffff)}.status-complete .step-icon,.status-error .step-icon,.status-complete .step-bubble,.status-error .step-bubble{background:var(--comp-active-color)}[aria-selected] .step-icon,[aria-selected] .step-bubble{font-weight:var(--tct-stepper-bullet-active-font-weight, var(--t-stepper-bullet-active-font-weight, 600))}[aria-selected] .step-icon:before,[aria-selected] .step-bubble:before{content:"";position:absolute;inset:calc(var(--comp-bullet-border-offset) * -1);width:calc(var(--comp-bullet-size) + var(--comp-bullet-border-offset));height:calc(var(--comp-bullet-size) + var(--comp-bullet-border-offset));border-radius:50%;border:var(--comp-bullet-border);border-color:var(--comp-active-color)}.step-bubble{background:var(--comp-bullet-bg)}hr{width:calc(var(--comp-step-width) - var(--comp-step-gap) - var(--comp-bullet-gap) - var(--comp-bullet-size));top:calc(var(--comp-bullet-size) / 2 + var(--comp-bullet-gap));left:calc(var(--comp-step-width) * -0.5 + var(--comp-step-gap) + var(--comp-bullet-gap));border:0;border-top:1px solid var(--comp-bullet-bg);height:0;position:absolute;margin:0;transition:border var(--comp-tween)}.step-container{position:relative}.step-label{color:var(--tct-stepper-title-color, var(--t-stepper-title-color, var(--t-text, #4d4d4d)));font-size:var(--tct-stepper-title-font-size, var(--t-stepper-title-font-size, var(--app-font-size-small, 12px)));height:1.5em;text-overflow:ellipsis;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}[aria-selected] .step-label{font-weight:var(--tct-stepper-active-font-weight, var(--t-stepper-active-font-weight, 600))}[aria-describedby] .step-label{-webkit-line-clamp:1}.step-description{color:var(--tct-stepper-description-color, var(--t-stepper-description-color, var(--t-textA, rgba(77, 77, 77, 0.77))));font-size:var(--tct-stepper-description-font-size, var(--t-stepper-description-font-size, var(--app-font-size-small, 12px)));text-overflow:ellipsis;overflow:hidden;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;padding-bottom:0.2em}.gradient-left,.gradient-right{z-index:1;position:absolute;top:0;height:100%;width:18px}.gradient-left{background-image:linear-gradient(to left, var(--t-base-a0, rgba(255, 255, 255, 0)), var(--t-base-a2, rgba(255, 255, 255, 0.5)) 10%, var(--t-base, #ffffff) 100%);left:0}.gradient-right{background-image:linear-gradient(to right, var(--t-base-a0, rgba(255, 255, 255, 0)), var(--t-base-a2, rgba(255, 255, 255, 0.5)) 10%, var(--t-base, #ffffff) 100%);right:0}.btn-left,.btn-right{--tct-icon-size:18px;--tct-btn-icon-hover-bg:transparent;--tct-btn-icon-width:22px;--tct-icon-stroke-primary:var(--tct-stepper-scroll-arrow-color, var(--t-stepper-scroll-arrow-color, var(--t-text, #4d4d4d)));position:absolute;top:calc(50% - 22px);z-index:2}.btn-left q2-icon,.btn-right q2-icon{--tct-icon-stroke-width:3}.btn-left{left:0}.btn-right{right:0}';export{n as q2_stepper}
@@ -1 +1 @@
1
- import{h as o}from"./p-c5691700.js";var n,i=(function(o){o.exports={polyfill:function(){var o=window,n=document;if(!("scrollBehavior"in n.documentElement.style)||!0===o.__forceSmoothScrollPolyfill__){var i,t=o.HTMLElement||o.Element,e={scroll:o.scroll||o.scrollTo,scrollBy:o.scrollBy,elementScroll:t.prototype.scroll||a,scrollIntoView:t.prototype.scrollIntoView},r=o.performance&&o.performance.now?o.performance.now.bind(o.performance):Date.now,s=(i=o.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(i)?1:0);o.scroll=o.scrollTo=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?h.call(o,n.body,void 0!==arguments[0].left?~~arguments[0].left:o.scrollX||o.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:o.scrollY||o.pageYOffset):e.scroll.call(o,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:o.scrollX||o.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:o.scrollY||o.pageYOffset))},o.scrollBy=function(){void 0!==arguments[0]&&(l(arguments[0])?e.scrollBy.call(o,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):h.call(o,n.body,~~arguments[0].left+(o.scrollX||o.pageXOffset),~~arguments[0].top+(o.scrollY||o.pageYOffset)))},t.prototype.scroll=t.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==l(arguments[0])){var o=arguments[0].left,n=arguments[0].top;h.call(this,this,void 0===o?this.scrollLeft:~~o,void 0===n?this.scrollTop:~~n)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");e.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},t.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):e.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},t.prototype.scrollIntoView=function(){if(!0!==l(arguments[0])){var i=f(this),t=i.getBoundingClientRect(),r=this.getBoundingClientRect();i!==n.body?(h.call(this,i,i.scrollLeft+r.left-t.left,i.scrollTop+r.top-t.top),"fixed"!==o.getComputedStyle(i).position&&o.scrollBy({left:t.left,top:t.top,behavior:"smooth"})):o.scrollBy({left:r.left,top:r.top,behavior:"smooth"})}else e.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function a(o,n){this.scrollLeft=o,this.scrollTop=n}function l(o){if(null===o||"object"!=typeof o||void 0===o.behavior||"auto"===o.behavior||"instant"===o.behavior)return!0;if("object"==typeof o&&"smooth"===o.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+o.behavior+" is not a valid value for enumeration ScrollBehavior.")}function u(o,n){return"Y"===n?o.clientHeight+s<o.scrollHeight:"X"===n?o.clientWidth+s<o.scrollWidth:void 0}function c(n,i){var t=o.getComputedStyle(n,null)["overflow"+i];return"auto"===t||"scroll"===t}function d(o){var n=u(o,"Y")&&c(o,"Y"),i=u(o,"X")&&c(o,"X");return n||i}function f(o){for(;o!==n.body&&!1===d(o);)o=o.parentNode||o.host;return o}function v(n){var i,t,e,s=(r()-n.startTime)/468;s=s>1?1:s,i=.5*(1-Math.cos(Math.PI*s)),n.method.call(n.scrollable,t=n.startX+(n.x-n.startX)*i,e=n.startY+(n.y-n.startY)*i),t===n.x&&e===n.y||o.requestAnimationFrame(v.bind(o,n))}function h(i,t,s){var l,u,c,d,f=r();i===n.body?(l=o,u=o.scrollX||o.pageXOffset,c=o.scrollY||o.pageYOffset,d=e.scroll):(l=i,u=i.scrollLeft,c=i.scrollTop,d=a),v({scrollable:l,method:d,startTime:f,startX:u,startY:c,x:t,y:s})}}}}(n={path:undefined,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}}),n.exports);function t(o,n){return o.relatedTarget!==n&&!n.contains(o.relatedTarget)}function e(o,n){var i;return(null===(i=o.composedPath)||void 0===i?void 0:i.call(o)[0])===n}function r(o){o.focus=()=>null==o?void 0:o.dispatchEvent(new FocusEvent("focus",{bubbles:!1}))}function s(){return!!function(){const o=navigator.userAgent.toLowerCase();return o.includes("safari")&&!o.includes("chrome")}()&&(i.polyfill(),window.__forceSmoothScrollPolyfill__=!0)}function a(){return navigator.userAgent.toLowerCase().includes("firefox")}function l(){return"ontouchstart"in window||navigator.maxTouchPoints>0}let u=1e3;function c(){return u++}function d(o,n){n?o():requestAnimationFrame((()=>d(o,!0)))}function f(o,n){var i,t,e;return o?!0===(null===(i=window.Tecton)||void 0===i?void 0:i.noString)?o:null!==(e=null===(t=null===window||void 0===window?void 0:window.TectonElements)||void 0===t?void 0:t.loc(o,n))&&void 0!==e?e:o:""}function v(n){const{label:i,hideLabel:t}=n;if(!i||t)return;let e="";return n.optional&&(e=o("span",{class:"optional-tag"},f("tecton.element.input.optional"))),n.readonly&&(e=o("span",{class:"optional-tag"},f("tecton.element.input.readonly"))),o("label",{htmlFor:n.inputId,class:n.readonly?"readonly-field":""},f(n.label),e)}function h(o){const{ariaLabel:n}=o;n&&("hideLabel"in o&&(o.hideLabel=!0),o.label=f(n),o.ariaLabel=void 0)}function p(n){return o("div",{class:"messages-container"},o("q2-message",{appearance:"minimal",description:!0,type:n.hasError?"danger":"info"},o("ul",{id:n.inputDescribedBy},n.messages.map((n=>o("li",null,f(n)))))))}function w(o){const n=o.hostElement.shadowRoot.querySelector(".messages-container"),i=n.querySelector("q2-message");d((()=>{const t=o.showMessages&&o.hasFocus?i.getBoundingClientRect().height:0;n.style.getPropertyValue("height")!==`${t}px`&&(0===t?(i.classList.add("invisible"),n.style.removeProperty("height")):(i.classList.remove("invisible"),n.style.setProperty("height",`${t}px`)))}))}function m(o){const{dropdownContainer:n,popDirection:i}=o;if(n&&(n.style.maxHeight=null),i)return o.privatePopDirection=i;const t=o.inputField||o.controlElement,e=o.minPopHeight||null;n.classList.add("sizable");const r=n.getBoundingClientRect().height;n.classList.remove("sizable");const{top:s,height:a}=t.getBoundingClientRect(),l=window.innerHeight-s-a,u=r<=s;if(l>r)return o.privatePopDirection="down";if(u||!e)return b(o),o.privatePopDirection="up";if(l>=e+5){const i=Math.max(l-5,e);return n.style.maxHeight=`${i}px`,o.privatePopDirection="down"}{const i=Math.max(s,e);return n.style.maxHeight=`${i}px`,b(o),o.privatePopDirection="up"}}const b=({dropdownContainer:o,inputField:n})=>{var i,t;if(!n)return;const e=null===(t=null===(i=n.shadowRoot)||void 0===i?void 0:i.querySelector(".input-field"))||void 0===t?void 0:t.getBoundingClientRect().height;o.style.setProperty("--comp-dropup-offset",`${e}px`)},y=()=>{var o,n;return null===(n=null===(o=window.TectonElements)||void 0===o?void 0:o.resizeIframe)||void 0===n?void 0:n.call(o)},g=o=>{!o.intent&&["primary","secondary"].includes(o.color)&&(o.intent=`workflow-${o.color}`,o.color=void 0)};export{l as a,t as b,c,s as d,w as e,v as f,a as g,h,e as i,g as j,f as l,p as m,d as n,r as o,y as r,m as s}
1
+ import{h as o}from"./p-926a3e80.js";var n,i=(function(o){o.exports={polyfill:function(){var o=window,n=document;if(!("scrollBehavior"in n.documentElement.style)||!0===o.__forceSmoothScrollPolyfill__){var i,t=o.HTMLElement||o.Element,e={scroll:o.scroll||o.scrollTo,scrollBy:o.scrollBy,elementScroll:t.prototype.scroll||s,scrollIntoView:t.prototype.scrollIntoView},r=o.performance&&o.performance.now?o.performance.now.bind(o.performance):Date.now,a=(i=o.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(i)?1:0);o.scroll=o.scrollTo=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?h.call(o,n.body,void 0!==arguments[0].left?~~arguments[0].left:o.scrollX||o.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:o.scrollY||o.pageYOffset):e.scroll.call(o,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:o.scrollX||o.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:o.scrollY||o.pageYOffset))},o.scrollBy=function(){void 0!==arguments[0]&&(l(arguments[0])?e.scrollBy.call(o,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):h.call(o,n.body,~~arguments[0].left+(o.scrollX||o.pageXOffset),~~arguments[0].top+(o.scrollY||o.pageYOffset)))},t.prototype.scroll=t.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==l(arguments[0])){var o=arguments[0].left,n=arguments[0].top;h.call(this,this,void 0===o?this.scrollLeft:~~o,void 0===n?this.scrollTop:~~n)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");e.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},t.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):e.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},t.prototype.scrollIntoView=function(){if(!0!==l(arguments[0])){var i=f(this),t=i.getBoundingClientRect(),r=this.getBoundingClientRect();i!==n.body?(h.call(this,i,i.scrollLeft+r.left-t.left,i.scrollTop+r.top-t.top),"fixed"!==o.getComputedStyle(i).position&&o.scrollBy({left:t.left,top:t.top,behavior:"smooth"})):o.scrollBy({left:r.left,top:r.top,behavior:"smooth"})}else e.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function s(o,n){this.scrollLeft=o,this.scrollTop=n}function l(o){if(null===o||"object"!=typeof o||void 0===o.behavior||"auto"===o.behavior||"instant"===o.behavior)return!0;if("object"==typeof o&&"smooth"===o.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+o.behavior+" is not a valid value for enumeration ScrollBehavior.")}function u(o,n){return"Y"===n?o.clientHeight+a<o.scrollHeight:"X"===n?o.clientWidth+a<o.scrollWidth:void 0}function c(n,i){var t=o.getComputedStyle(n,null)["overflow"+i];return"auto"===t||"scroll"===t}function d(o){var n=u(o,"Y")&&c(o,"Y"),i=u(o,"X")&&c(o,"X");return n||i}function f(o){for(;o!==n.body&&!1===d(o);)o=o.parentNode||o.host;return o}function v(n){var i,t,e,a=(r()-n.startTime)/468;a=a>1?1:a,i=.5*(1-Math.cos(Math.PI*a)),n.method.call(n.scrollable,t=n.startX+(n.x-n.startX)*i,e=n.startY+(n.y-n.startY)*i),t===n.x&&e===n.y||o.requestAnimationFrame(v.bind(o,n))}function h(i,t,a){var l,u,c,d,f=r();i===n.body?(l=o,u=o.scrollX||o.pageXOffset,c=o.scrollY||o.pageYOffset,d=e.scroll):(l=i,u=i.scrollLeft,c=i.scrollTop,d=s),v({scrollable:l,method:d,startTime:f,startX:u,startY:c,x:t,y:a})}}}}(n={path:undefined,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}}),n.exports);function t(o,n){return o.relatedTarget!==n&&!n.contains(o.relatedTarget)}function e(o,n){var i;return(null===(i=o.composedPath)||void 0===i?void 0:i.call(o)[0])===n}function r(o){o.focus=()=>null==o?void 0:o.dispatchEvent(new FocusEvent("focus",{bubbles:!1}))}function a(){return!!function(){const o=navigator.userAgent.toLowerCase();return o.includes("safari")&&!o.includes("chrome")}()&&(i.polyfill(),window.__forceSmoothScrollPolyfill__=!0)}function s(){return navigator.userAgent.toLowerCase().includes("firefox")}function l(){return"ontouchstart"in window||navigator.maxTouchPoints>0}let u=1e3;function c(){return u++}function d(o,n){n?o():requestAnimationFrame((()=>d(o,!0)))}function f(o,n){var i,t,e;return o?!0===(null===(i=window.Tecton)||void 0===i?void 0:i.noString)?o:null!==(e=null===(t=null===window||void 0===window?void 0:window.TectonElements)||void 0===t?void 0:t.loc(o,n))&&void 0!==e?e:o:""}function v(n){const{label:i,hideLabel:t}=n;if(!i||t)return;let e="";return n.optional&&(e=o("span",{class:"optional-tag"},f("tecton.element.input.optional"))),n.readonly&&(e=o("span",{class:"optional-tag"},f("tecton.element.input.readonly"))),o("label",{htmlFor:n.inputId,class:n.readonly?"readonly-field":""},f(n.label),e)}function h(o){const{ariaLabel:n}=o;n&&("hideLabel"in o&&(o.hideLabel=!0),o.label=f(n),o.ariaLabel=void 0)}function p(n){return o("div",{class:"messages-container"},o("q2-message",{appearance:"minimal",description:!0,type:n.hasError?"danger":"info"},o("ul",{id:n.inputDescribedBy},n.messages.map((n=>o("li",null,f(n)))))))}function w(o){const n=o.hostElement.shadowRoot.querySelector(".messages-container"),i=n.querySelector("q2-message");d((()=>{const t=o.showMessages&&o.hasFocus?i.getBoundingClientRect().height:0;n.style.getPropertyValue("height")!==`${t}px`&&(0===t?(i.classList.add("invisible"),n.style.removeProperty("height")):(i.classList.remove("invisible"),n.style.setProperty("height",`${t}px`)))}))}function m(o){const{dropdownContainer:n,popDirection:i}=o;if(n&&(n.style.maxHeight=null),i)return o.privatePopDirection=i;const t=o.inputField||o.controlElement,e=o.minPopHeight||null;n.classList.add("sizable");const r=n.getBoundingClientRect().height;n.classList.remove("sizable");const{top:a,height:s}=t.getBoundingClientRect(),l=window.innerHeight-a-s,u=r<=a;if(l>r)return o.privatePopDirection="down";if(u||!e)return b(o),o.privatePopDirection="up";if(l>=e+5){const i=Math.max(l-5,e);return n.style.maxHeight=`${i}px`,o.privatePopDirection="down"}{const i=Math.max(a,e);return n.style.maxHeight=`${i}px`,b(o),o.privatePopDirection="up"}}const b=({dropdownContainer:o,inputField:n})=>{var i,t;if(!n)return;const e=null===(t=null===(i=n.shadowRoot)||void 0===i?void 0:i.querySelector(".input-field"))||void 0===t?void 0:t.getBoundingClientRect().height;o.style.setProperty("--comp-dropup-offset",`${e}px`)},y=()=>{var o,n;return null===(n=null===(o=window.TectonElements)||void 0===o?void 0:o.resizeIframe)||void 0===n?void 0:n.call(o)},g=o=>{!o.intent&&["primary","secondary"].includes(o.color)&&(o.intent=`workflow-${o.color}`,o.color=void 0)};export{l as a,t as b,c,a as d,w as e,v as f,s as g,h,e as i,g as j,f as l,p as m,d as n,r as o,y as r,m as s}