@milaboratories/uikit 2.15.36 → 2.15.38

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 (457) hide show
  1. package/.turbo/turbo-build.log +175 -175
  2. package/.turbo/turbo-formatter$colon$check.log +2 -2
  3. package/.turbo/turbo-linter$colon$check.log +2 -2
  4. package/.turbo/turbo-types$colon$check.log +1 -1
  5. package/CHANGELOG.md +12 -0
  6. package/dist/__tests__/default-testid.test.d.ts +2 -0
  7. package/dist/__tests__/default-testid.test.d.ts.map +1 -0
  8. package/dist/base/BtnBase.js.map +1 -1
  9. package/dist/base/BtnBase.vue.d.ts.map +1 -1
  10. package/dist/base/BtnBase.vue2.js +6 -1
  11. package/dist/base/BtnBase.vue2.js.map +1 -1
  12. package/dist/components/DropdownListItem.js.map +1 -1
  13. package/dist/components/DropdownListItem.vue.d.ts.map +1 -1
  14. package/dist/components/DropdownListItem.vue2.js +13 -4
  15. package/dist/components/DropdownListItem.vue2.js.map +1 -1
  16. package/dist/components/InputRange.js.map +1 -1
  17. package/dist/components/InputRange.vue.d.ts.map +1 -1
  18. package/dist/components/InputRange.vue2.js +10 -2
  19. package/dist/components/InputRange.vue2.js.map +1 -1
  20. package/dist/components/PlAccordion/PlAccordionSection.js.map +1 -1
  21. package/dist/components/PlAccordion/PlAccordionSection.style.js.map +1 -1
  22. package/dist/components/PlAccordion/PlAccordionSection.vue.d.ts.map +1 -1
  23. package/dist/components/PlAccordion/PlAccordionSection.vue2.js +7 -1
  24. package/dist/components/PlAccordion/PlAccordionSection.vue2.js.map +1 -1
  25. package/dist/components/PlAlert/PlAlert.js.map +1 -1
  26. package/dist/components/PlAlert/PlAlert.vue.d.ts.map +1 -1
  27. package/dist/components/PlAlert/PlAlert.vue2.js +10 -1
  28. package/dist/components/PlAlert/PlAlert.vue2.js.map +1 -1
  29. package/dist/components/PlAutocomplete/PlAutocomplete.js.map +1 -1
  30. package/dist/components/PlAutocomplete/PlAutocomplete.vue.d.ts.map +1 -1
  31. package/dist/components/PlAutocomplete/PlAutocomplete.vue2.js +29 -11
  32. package/dist/components/PlAutocomplete/PlAutocomplete.vue2.js.map +1 -1
  33. package/dist/components/PlAutocompleteMulti/PlAutocompleteMulti.js.map +1 -1
  34. package/dist/components/PlAutocompleteMulti/PlAutocompleteMulti.vue.d.ts.map +1 -1
  35. package/dist/components/PlAutocompleteMulti/PlAutocompleteMulti.vue2.js +30 -9
  36. package/dist/components/PlAutocompleteMulti/PlAutocompleteMulti.vue2.js.map +1 -1
  37. package/dist/components/PlBtnAccent/PlBtnAccent.js.map +1 -1
  38. package/dist/components/PlBtnAccent/PlBtnAccent.vue.d.ts.map +1 -1
  39. package/dist/components/PlBtnAccent/PlBtnAccent.vue2.js +4 -1
  40. package/dist/components/PlBtnAccent/PlBtnAccent.vue2.js.map +1 -1
  41. package/dist/components/PlBtnDanger/PlBtnDanger.js.map +1 -1
  42. package/dist/components/PlBtnDanger/PlBtnDanger.vue.d.ts.map +1 -1
  43. package/dist/components/PlBtnDanger/PlBtnDanger.vue2.js +4 -1
  44. package/dist/components/PlBtnDanger/PlBtnDanger.vue2.js.map +1 -1
  45. package/dist/components/PlBtnGhost/PlBtnGhost.js.map +1 -1
  46. package/dist/components/PlBtnGhost/PlBtnGhost.vue.d.ts.map +1 -1
  47. package/dist/components/PlBtnGhost/PlBtnGhost.vue2.js +7 -1
  48. package/dist/components/PlBtnGhost/PlBtnGhost.vue2.js.map +1 -1
  49. package/dist/components/PlBtnGroup/PlBtnGroup.js.map +1 -1
  50. package/dist/components/PlBtnGroup/PlBtnGroup.vue.d.ts.map +1 -1
  51. package/dist/components/PlBtnGroup/PlBtnGroup.vue2.js +19 -6
  52. package/dist/components/PlBtnGroup/PlBtnGroup.vue2.js.map +1 -1
  53. package/dist/components/PlBtnLink/PlBtnLink.js.map +1 -1
  54. package/dist/components/PlBtnLink/PlBtnLink.vue.d.ts.map +1 -1
  55. package/dist/components/PlBtnLink/PlBtnLink.vue2.js +2 -0
  56. package/dist/components/PlBtnLink/PlBtnLink.vue2.js.map +1 -1
  57. package/dist/components/PlBtnPrimary/PlBtnPrimary.js.map +1 -1
  58. package/dist/components/PlBtnPrimary/PlBtnPrimary.vue.d.ts.map +1 -1
  59. package/dist/components/PlBtnPrimary/PlBtnPrimary.vue2.js +4 -1
  60. package/dist/components/PlBtnPrimary/PlBtnPrimary.vue2.js.map +1 -1
  61. package/dist/components/PlBtnSecondary/PlBtnSecondary.js.map +1 -1
  62. package/dist/components/PlBtnSecondary/PlBtnSecondary.vue.d.ts.map +1 -1
  63. package/dist/components/PlBtnSecondary/PlBtnSecondary.vue2.js +1 -1
  64. package/dist/components/PlBtnSecondary/PlBtnSecondary.vue2.js.map +1 -1
  65. package/dist/components/PlBtnSplit/PlBtnSplit.js.map +1 -1
  66. package/dist/components/PlBtnSplit/PlBtnSplit.vue.d.ts.map +1 -1
  67. package/dist/components/PlBtnSplit/PlBtnSplit.vue2.js +6 -0
  68. package/dist/components/PlBtnSplit/PlBtnSplit.vue2.js.map +1 -1
  69. package/dist/components/PlChartHistogram/PlChartHistogram.js.map +1 -1
  70. package/dist/components/PlChartHistogram/PlChartHistogram.style.js.map +1 -1
  71. package/dist/components/PlChartHistogram/PlChartHistogram.vue.d.ts.map +1 -1
  72. package/dist/components/PlChartHistogram/PlChartHistogram.vue2.js +7 -2
  73. package/dist/components/PlChartHistogram/PlChartHistogram.vue2.js.map +1 -1
  74. package/dist/components/PlChartHistogram/createGridlines.d.ts.map +1 -1
  75. package/dist/components/PlChartHistogram/createGridlines.js +1 -1
  76. package/dist/components/PlChartHistogram/createGridlines.js.map +1 -1
  77. package/dist/components/PlChartHistogram/createLabels.d.ts.map +1 -1
  78. package/dist/components/PlChartHistogram/createLabels.js +1 -1
  79. package/dist/components/PlChartHistogram/createLabels.js.map +1 -1
  80. package/dist/components/PlChartHistogram/createSvgContainer.d.ts.map +1 -1
  81. package/dist/components/PlChartHistogram/createSvgContainer.js +1 -1
  82. package/dist/components/PlChartHistogram/createSvgContainer.js.map +1 -1
  83. package/dist/components/PlChartHistogram/drawBins.d.ts.map +1 -1
  84. package/dist/components/PlChartHistogram/drawBins.js +2 -2
  85. package/dist/components/PlChartHistogram/drawBins.js.map +1 -1
  86. package/dist/components/PlChartHistogram/drawThreshold.d.ts.map +1 -1
  87. package/dist/components/PlChartHistogram/drawThreshold.js +1 -1
  88. package/dist/components/PlChartHistogram/drawThreshold.js.map +1 -1
  89. package/dist/components/PlChartHistogram/histogram.d.ts.map +1 -1
  90. package/dist/components/PlChartHistogram/histogram.js +1 -1
  91. package/dist/components/PlChartHistogram/histogram.js.map +1 -1
  92. package/dist/components/PlChartStackedBar/Legends.js.map +1 -1
  93. package/dist/components/PlChartStackedBar/Legends.style.js.map +1 -1
  94. package/dist/components/PlChartStackedBar/Legends.vue.d.ts.map +1 -1
  95. package/dist/components/PlChartStackedBar/Legends.vue2.js +7 -1
  96. package/dist/components/PlChartStackedBar/Legends.vue2.js.map +1 -1
  97. package/dist/components/PlChartStackedBar/PlChartStackedBar.js.map +1 -1
  98. package/dist/components/PlChartStackedBar/PlChartStackedBar.style.js.map +1 -1
  99. package/dist/components/PlChartStackedBar/PlChartStackedBar.vue.d.ts.map +1 -1
  100. package/dist/components/PlChartStackedBar/PlChartStackedBar.vue2.js +5 -1
  101. package/dist/components/PlChartStackedBar/PlChartStackedBar.vue2.js.map +1 -1
  102. package/dist/components/PlChartStackedBar/PlChartStackedBarCompact.js.map +1 -1
  103. package/dist/components/PlChartStackedBar/PlChartStackedBarCompact.style.js.map +1 -1
  104. package/dist/components/PlChartStackedBar/PlChartStackedBarCompact.vue.d.ts.map +1 -1
  105. package/dist/components/PlChartStackedBar/PlChartStackedBarCompact.vue2.js +4 -1
  106. package/dist/components/PlChartStackedBar/PlChartStackedBarCompact.vue2.js.map +1 -1
  107. package/dist/components/PlChartStackedBar/StackedRow.js.map +1 -1
  108. package/dist/components/PlChartStackedBar/StackedRow.style.js.map +1 -1
  109. package/dist/components/PlChartStackedBar/StackedRow.vue.d.ts.map +1 -1
  110. package/dist/components/PlChartStackedBar/StackedRow.vue2.js +13 -3
  111. package/dist/components/PlChartStackedBar/StackedRow.vue2.js.map +1 -1
  112. package/dist/components/PlChartStackedBar/StackedRowCompact.js.map +1 -1
  113. package/dist/components/PlChartStackedBar/StackedRowCompact.style.js.map +1 -1
  114. package/dist/components/PlChartStackedBar/StackedRowCompact.vue.d.ts.map +1 -1
  115. package/dist/components/PlChartStackedBar/StackedRowCompact.vue2.js +8 -2
  116. package/dist/components/PlChartStackedBar/StackedRowCompact.vue2.js.map +1 -1
  117. package/dist/components/PlCheckbox/PlCheckbox.js.map +1 -1
  118. package/dist/components/PlCheckbox/PlCheckbox.vue.d.ts.map +1 -1
  119. package/dist/components/PlCheckbox/PlCheckbox.vue2.js +9 -2
  120. package/dist/components/PlCheckbox/PlCheckbox.vue2.js.map +1 -1
  121. package/dist/components/PlCheckbox/PlCheckboxBase.js.map +1 -1
  122. package/dist/components/PlCheckbox/PlCheckboxBase.vue.d.ts.map +1 -1
  123. package/dist/components/PlCheckbox/PlCheckboxBase.vue2.js +1 -0
  124. package/dist/components/PlCheckbox/PlCheckboxBase.vue2.js.map +1 -1
  125. package/dist/components/PlCheckboxGroup/PlCheckboxGroup.js.map +1 -1
  126. package/dist/components/PlCheckboxGroup/PlCheckboxGroup.vue.d.ts.map +1 -1
  127. package/dist/components/PlCheckboxGroup/PlCheckboxGroup.vue2.js +19 -5
  128. package/dist/components/PlCheckboxGroup/PlCheckboxGroup.vue2.js.map +1 -1
  129. package/dist/components/PlChip/PlChip.js.map +1 -1
  130. package/dist/components/PlChip/PlChip.vue.d.ts.map +1 -1
  131. package/dist/components/PlChip/PlChip.vue2.js +7 -1
  132. package/dist/components/PlChip/PlChip.vue2.js.map +1 -1
  133. package/dist/components/PlClipboard/PlClipboard.js.map +1 -1
  134. package/dist/components/PlClipboard/PlClipboard.style.js.map +1 -1
  135. package/dist/components/PlClipboard/PlClipboard.vue.d.ts.map +1 -1
  136. package/dist/components/PlClipboard/PlClipboard.vue2.js +1 -0
  137. package/dist/components/PlClipboard/PlClipboard.vue2.js.map +1 -1
  138. package/dist/components/PlConfirmDialog.js.map +1 -1
  139. package/dist/components/PlConfirmDialog.vue.d.ts.map +1 -1
  140. package/dist/components/PlConfirmDialog.vue2.js +9 -2
  141. package/dist/components/PlConfirmDialog.vue2.js.map +1 -1
  142. package/dist/components/PlDialogModal/PlDialogModal.js.map +1 -1
  143. package/dist/components/PlDialogModal/PlDialogModal.vue.d.ts.map +1 -1
  144. package/dist/components/PlDialogModal/PlDialogModal.vue2.js +12 -5
  145. package/dist/components/PlDialogModal/PlDialogModal.vue2.js.map +1 -1
  146. package/dist/components/PlDropdown/OptionList.js.map +1 -1
  147. package/dist/components/PlDropdown/OptionList.vue.d.ts.map +1 -1
  148. package/dist/components/PlDropdown/OptionList.vue2.js +11 -5
  149. package/dist/components/PlDropdown/OptionList.vue2.js.map +1 -1
  150. package/dist/components/PlDropdown/PlDropdown.js.map +1 -1
  151. package/dist/components/PlDropdown/PlDropdown.vue.d.ts.map +1 -1
  152. package/dist/components/PlDropdown/PlDropdown.vue2.js +26 -10
  153. package/dist/components/PlDropdown/PlDropdown.vue2.js.map +1 -1
  154. package/dist/components/PlDropdownLegacy/PlDropdownLegacy.js.map +1 -1
  155. package/dist/components/PlDropdownLegacy/PlDropdownLegacy.vue.d.ts.map +1 -1
  156. package/dist/components/PlDropdownLegacy/PlDropdownLegacy.vue2.js +32 -10
  157. package/dist/components/PlDropdownLegacy/PlDropdownLegacy.vue2.js.map +1 -1
  158. package/dist/components/PlDropdownLine/PlDropdownLine.js.map +1 -1
  159. package/dist/components/PlDropdownLine/PlDropdownLine.vue.d.ts.map +1 -1
  160. package/dist/components/PlDropdownLine/PlDropdownLine.vue2.js +17 -3
  161. package/dist/components/PlDropdownLine/PlDropdownLine.vue2.js.map +1 -1
  162. package/dist/components/PlDropdownLine/ResizableInput.js.map +1 -1
  163. package/dist/components/PlDropdownLine/ResizableInput.vue.d.ts.map +1 -1
  164. package/dist/components/PlDropdownLine/ResizableInput.vue2.js +5 -2
  165. package/dist/components/PlDropdownLine/ResizableInput.vue2.js.map +1 -1
  166. package/dist/components/PlDropdownMulti/PlDropdownMulti.js.map +1 -1
  167. package/dist/components/PlDropdownMulti/PlDropdownMulti.vue.d.ts.map +1 -1
  168. package/dist/components/PlDropdownMulti/PlDropdownMulti.vue2.js +31 -10
  169. package/dist/components/PlDropdownMulti/PlDropdownMulti.vue2.js.map +1 -1
  170. package/dist/components/PlDropdownMultiRef/PlDropdownMultiRef.js.map +1 -1
  171. package/dist/components/PlDropdownMultiRef/PlDropdownMultiRef.vue.d.ts.map +1 -1
  172. package/dist/components/PlDropdownMultiRef/PlDropdownMultiRef.vue2.js +1 -1
  173. package/dist/components/PlDropdownMultiRef/PlDropdownMultiRef.vue2.js.map +1 -1
  174. package/dist/components/PlDropdownRef/PlDropdownRef.js.map +1 -1
  175. package/dist/components/PlDropdownRef/PlDropdownRef.vue.d.ts.map +1 -1
  176. package/dist/components/PlDropdownRef/PlDropdownRef.vue2.js +1 -1
  177. package/dist/components/PlDropdownRef/PlDropdownRef.vue2.js.map +1 -1
  178. package/dist/components/PlEditableTitle/PlEditableTitle.js.map +1 -1
  179. package/dist/components/PlEditableTitle/PlEditableTitle.vue.d.ts.map +1 -1
  180. package/dist/components/PlEditableTitle/PlEditableTitle.vue2.js +9 -3
  181. package/dist/components/PlEditableTitle/PlEditableTitle.vue2.js.map +1 -1
  182. package/dist/components/PlElementList/PlElementList.js.map +1 -1
  183. package/dist/components/PlElementList/PlElementList.style.js.map +1 -1
  184. package/dist/components/PlElementList/PlElementList.vue.d.ts.map +1 -1
  185. package/dist/components/PlElementList/PlElementList.vue2.js +6 -1
  186. package/dist/components/PlElementList/PlElementList.vue2.js.map +1 -1
  187. package/dist/components/PlElementList/PlElementListItem.js.map +1 -1
  188. package/dist/components/PlElementList/PlElementListItem.style.js.map +1 -1
  189. package/dist/components/PlElementList/PlElementListItem.vue.d.ts.map +1 -1
  190. package/dist/components/PlElementList/PlElementListItem.vue2.js +34 -13
  191. package/dist/components/PlElementList/PlElementListItem.vue2.js.map +1 -1
  192. package/dist/components/PlErrorAlert/PlErrorAlert.js.map +1 -1
  193. package/dist/components/PlErrorAlert/PlErrorAlert.style.js.map +1 -1
  194. package/dist/components/PlErrorAlert/PlErrorAlert.vue.d.ts.map +1 -1
  195. package/dist/components/PlErrorAlert/PlErrorAlert.vue2.js +15 -3
  196. package/dist/components/PlErrorAlert/PlErrorAlert.vue2.js.map +1 -1
  197. package/dist/components/PlErrorBoundary/PlErrorBoundary.js.map +1 -1
  198. package/dist/components/PlErrorBoundary/PlErrorBoundary.vue.d.ts.map +1 -1
  199. package/dist/components/PlErrorBoundary/PlErrorBoundary.vue2.js +1 -0
  200. package/dist/components/PlErrorBoundary/PlErrorBoundary.vue2.js.map +1 -1
  201. package/dist/components/PlFileDialog/Local.js.map +1 -1
  202. package/dist/components/PlFileDialog/Local.vue.d.ts.map +1 -1
  203. package/dist/components/PlFileDialog/Local.vue2.js +23 -20
  204. package/dist/components/PlFileDialog/Local.vue2.js.map +1 -1
  205. package/dist/components/PlFileDialog/PlFileDialog.js.map +1 -1
  206. package/dist/components/PlFileDialog/PlFileDialog.vue.d.ts.map +1 -1
  207. package/dist/components/PlFileDialog/PlFileDialog.vue2.js +5 -1
  208. package/dist/components/PlFileDialog/PlFileDialog.vue2.js.map +1 -1
  209. package/dist/components/PlFileDialog/Remote.js.map +1 -1
  210. package/dist/components/PlFileDialog/Remote.vue.d.ts.map +1 -1
  211. package/dist/components/PlFileDialog/Remote.vue2.js +108 -94
  212. package/dist/components/PlFileDialog/Remote.vue2.js.map +1 -1
  213. package/dist/components/PlFileDialog/Shortcuts.js.map +1 -1
  214. package/dist/components/PlFileDialog/Shortcuts.style.js.map +1 -1
  215. package/dist/components/PlFileDialog/Shortcuts.vue.d.ts.map +1 -1
  216. package/dist/components/PlFileDialog/Shortcuts.vue2.js +2 -1
  217. package/dist/components/PlFileDialog/Shortcuts.vue2.js.map +1 -1
  218. package/dist/components/PlFileInput/PlFileInput.js.map +1 -1
  219. package/dist/components/PlFileInput/PlFileInput.vue.d.ts.map +1 -1
  220. package/dist/components/PlFileInput/PlFileInput.vue2.js +92 -71
  221. package/dist/components/PlFileInput/PlFileInput.vue2.js.map +1 -1
  222. package/dist/components/PlLoaderCircular/PlLoaderCircular.js.map +1 -1
  223. package/dist/components/PlLoaderCircular/PlLoaderCircular.vue.d.ts.map +1 -1
  224. package/dist/components/PlLoaderCircular/PlLoaderCircular.vue2.js +4 -1
  225. package/dist/components/PlLoaderCircular/PlLoaderCircular.vue2.js.map +1 -1
  226. package/dist/components/PlLoaderLogo.js.map +1 -1
  227. package/dist/components/PlLoaderLogo.style.js.map +1 -1
  228. package/dist/components/PlLoaderLogo.vue.css +1 -1
  229. package/dist/components/PlLoaderLogo.vue.d.ts.map +1 -1
  230. package/dist/components/PlLoaderLogo.vue2.js +4 -3
  231. package/dist/components/PlLoaderLogo.vue2.js.map +1 -1
  232. package/dist/components/PlLogView/PlLogView.js.map +1 -1
  233. package/dist/components/PlLogView/PlLogView.vue.d.ts.map +1 -1
  234. package/dist/components/PlLogView/PlLogView.vue2.js +13 -1
  235. package/dist/components/PlLogView/PlLogView.vue2.js.map +1 -1
  236. package/dist/components/PlNotificationAlert/PlNotificationAlert.js.map +1 -1
  237. package/dist/components/PlNotificationAlert/PlNotificationAlert.vue.d.ts.map +1 -1
  238. package/dist/components/PlNotificationAlert/PlNotificationAlert.vue2.js +8 -2
  239. package/dist/components/PlNotificationAlert/PlNotificationAlert.vue2.js.map +1 -1
  240. package/dist/components/PlNumberField/PlNumberField.js.map +1 -1
  241. package/dist/components/PlNumberField/PlNumberField.vue.d.ts.map +1 -1
  242. package/dist/components/PlNumberField/PlNumberField.vue2.js +12 -3
  243. package/dist/components/PlNumberField/PlNumberField.vue2.js.map +1 -1
  244. package/dist/components/PlProgressBar/PlProgressBar.js.map +1 -1
  245. package/dist/components/PlProgressBar/PlProgressBar.vue.d.ts.map +1 -1
  246. package/dist/components/PlProgressBar/PlProgressBar.vue2.js +9 -1
  247. package/dist/components/PlProgressBar/PlProgressBar.vue2.js.map +1 -1
  248. package/dist/components/PlProgressCell/PlProgressCell.js.map +1 -1
  249. package/dist/components/PlProgressCell/PlProgressCell.vue.d.ts.map +1 -1
  250. package/dist/components/PlProgressCell/PlProgressCell.vue2.js +19 -7
  251. package/dist/components/PlProgressCell/PlProgressCell.vue2.js.map +1 -1
  252. package/dist/components/PlRadio/PlRadio.js.map +1 -1
  253. package/dist/components/PlRadio/PlRadio.style.js.map +1 -1
  254. package/dist/components/PlRadio/PlRadio.vue.d.ts.map +1 -1
  255. package/dist/components/PlRadio/PlRadio.vue2.js +10 -3
  256. package/dist/components/PlRadio/PlRadio.vue2.js.map +1 -1
  257. package/dist/components/PlRadio/PlRadioGroup.js.map +1 -1
  258. package/dist/components/PlRadio/PlRadioGroup.style.js.map +1 -1
  259. package/dist/components/PlRadio/PlRadioGroup.vue.d.ts.map +1 -1
  260. package/dist/components/PlRadio/PlRadioGroup.vue2.js +10 -3
  261. package/dist/components/PlRadio/PlRadioGroup.vue2.js.map +1 -1
  262. package/dist/components/PlSearchField/PlSearchField.js.map +1 -1
  263. package/dist/components/PlSearchField/PlSearchField.style.js.map +1 -1
  264. package/dist/components/PlSearchField/PlSearchField.vue.d.ts.map +1 -1
  265. package/dist/components/PlSearchField/PlSearchField.vue2.js +11 -4
  266. package/dist/components/PlSearchField/PlSearchField.vue2.js.map +1 -1
  267. package/dist/components/PlSectionSeparator/PlSectionSeparator.js.map +1 -1
  268. package/dist/components/PlSectionSeparator/PlSectionSeparator.style.js.map +1 -1
  269. package/dist/components/PlSectionSeparator/PlSectionSeparator.vue.d.ts.map +1 -1
  270. package/dist/components/PlSectionSeparator/PlSectionSeparator.vue2.js +7 -1
  271. package/dist/components/PlSectionSeparator/PlSectionSeparator.vue2.js.map +1 -1
  272. package/dist/components/PlSidebar/PlSidebarGroup.js.map +1 -1
  273. package/dist/components/PlSidebar/PlSidebarGroup.style.js.map +1 -1
  274. package/dist/components/PlSidebar/PlSidebarGroup.vue.d.ts.map +1 -1
  275. package/dist/components/PlSidebar/PlSidebarGroup.vue2.js +5 -1
  276. package/dist/components/PlSidebar/PlSidebarGroup.vue2.js.map +1 -1
  277. package/dist/components/PlSidebar/PlSidebarItem.js.map +1 -1
  278. package/dist/components/PlSidebar/PlSidebarItem.style.js.map +1 -1
  279. package/dist/components/PlSidebar/PlSidebarItem.vue.d.ts.map +1 -1
  280. package/dist/components/PlSidebar/PlSidebarItem.vue2.js +7 -1
  281. package/dist/components/PlSidebar/PlSidebarItem.vue2.js.map +1 -1
  282. package/dist/components/PlSlideModal/PlPureSlideModal.js.map +1 -1
  283. package/dist/components/PlSlideModal/PlPureSlideModal.vue.d.ts.map +1 -1
  284. package/dist/components/PlSlideModal/PlPureSlideModal.vue2.js +4 -1
  285. package/dist/components/PlSlideModal/PlPureSlideModal.vue2.js.map +1 -1
  286. package/dist/components/PlSlideModal/PlSlideModal.js.map +1 -1
  287. package/dist/components/PlSlideModal/PlSlideModal.style.js.map +1 -1
  288. package/dist/components/PlSlideModal/PlSlideModal.vue.d.ts.map +1 -1
  289. package/dist/components/PlSlideModal/PlSlideModal.vue2.js +7 -2
  290. package/dist/components/PlSlideModal/PlSlideModal.vue2.js.map +1 -1
  291. package/dist/components/PlSpacer/PlSpacer.vue.d.ts.map +1 -1
  292. package/dist/components/PlSplash/PlSplash.js.map +1 -1
  293. package/dist/components/PlSplash/PlSplash.vue.d.ts.map +1 -1
  294. package/dist/components/PlSplash/PlSplash.vue2.js +13 -5
  295. package/dist/components/PlSplash/PlSplash.vue2.js.map +1 -1
  296. package/dist/components/PlStatusTag/PlStatusTag.js.map +1 -1
  297. package/dist/components/PlStatusTag/PlStatusTag.vue.d.ts.map +1 -1
  298. package/dist/components/PlStatusTag/PlStatusTag.vue2.js +4 -1
  299. package/dist/components/PlStatusTag/PlStatusTag.vue2.js.map +1 -1
  300. package/dist/components/PlTabs/PlTabs.js.map +1 -1
  301. package/dist/components/PlTabs/PlTabs.vue.d.ts.map +1 -1
  302. package/dist/components/PlTabs/PlTabs.vue2.js +16 -11
  303. package/dist/components/PlTabs/PlTabs.vue2.js.map +1 -1
  304. package/dist/components/PlTextArea/PlTextArea.js.map +1 -1
  305. package/dist/components/PlTextArea/PlTextArea.vue.d.ts.map +1 -1
  306. package/dist/components/PlTextArea/PlTextArea.vue2.js +21 -8
  307. package/dist/components/PlTextArea/PlTextArea.vue2.js.map +1 -1
  308. package/dist/components/PlTextField/PlTextField.js.map +1 -1
  309. package/dist/components/PlTextField/PlTextField.vue.d.ts.map +1 -1
  310. package/dist/components/PlTextField/PlTextField.vue2.js +23 -9
  311. package/dist/components/PlTextField/PlTextField.vue2.js.map +1 -1
  312. package/dist/components/PlToggleSwitch/PlToggleSwitch.js.map +1 -1
  313. package/dist/components/PlToggleSwitch/PlToggleSwitch.vue.d.ts.map +1 -1
  314. package/dist/components/PlToggleSwitch/PlToggleSwitch.vue2.js +10 -2
  315. package/dist/components/PlToggleSwitch/PlToggleSwitch.vue2.js.map +1 -1
  316. package/dist/components/PlTooltip/PlTooltip.js.map +1 -1
  317. package/dist/components/PlTooltip/PlTooltip.style.js.map +1 -1
  318. package/dist/components/PlTooltip/PlTooltip.vue.css +1 -1
  319. package/dist/components/PlTooltip/PlTooltip.vue.d.ts.map +1 -1
  320. package/dist/components/PlTooltip/PlTooltip.vue2.js +7 -2
  321. package/dist/components/PlTooltip/PlTooltip.vue2.js.map +1 -1
  322. package/dist/components/Slider.js.map +1 -1
  323. package/dist/components/Slider.vue.d.ts.map +1 -1
  324. package/dist/components/Slider.vue2.js +13 -1
  325. package/dist/components/Slider.vue2.js.map +1 -1
  326. package/dist/components/SliderRange.js.map +1 -1
  327. package/dist/components/SliderRange.vue.d.ts.map +1 -1
  328. package/dist/components/SliderRange.vue2.js +14 -1
  329. package/dist/components/SliderRange.vue2.js.map +1 -1
  330. package/dist/components/SliderRangeTriple.js.map +1 -1
  331. package/dist/components/SliderRangeTriple.vue.d.ts.map +1 -1
  332. package/dist/components/SliderRangeTriple.vue2.js +13 -1
  333. package/dist/components/SliderRangeTriple.vue2.js.map +1 -1
  334. package/dist/components/TabItem.js.map +1 -1
  335. package/dist/components/TabItem.vue.d.ts.map +1 -1
  336. package/dist/components/TabItem.vue2.js +8 -2
  337. package/dist/components/TabItem.vue2.js.map +1 -1
  338. package/dist/components/contextMenu/Menu.js +1 -1
  339. package/dist/components/contextMenu/Menu.js.map +1 -1
  340. package/dist/components/contextMenu/Menu.style.css +1 -1
  341. package/dist/components/contextMenu/Menu.vue.d.ts.map +1 -1
  342. package/dist/components/contextMenu/Menu.vue2.js +12 -8
  343. package/dist/components/contextMenu/Menu.vue2.js.map +1 -1
  344. package/dist/layout/PlBlockPage/PlBlockPage.js.map +1 -1
  345. package/dist/layout/PlBlockPage/PlBlockPage.style.js.map +1 -1
  346. package/dist/layout/PlBlockPage/PlBlockPage.vue.d.ts.map +1 -1
  347. package/dist/layout/PlBlockPage/PlBlockPage.vue2.js +45 -25
  348. package/dist/layout/PlBlockPage/PlBlockPage.vue2.js.map +1 -1
  349. package/dist/layout/PlContainer/PlContainer.js.map +1 -1
  350. package/dist/layout/PlContainer/PlContainer.vue.d.ts.map +1 -1
  351. package/dist/layout/PlContainer/PlContainer.vue2.js +1 -0
  352. package/dist/layout/PlContainer/PlContainer.vue2.js.map +1 -1
  353. package/dist/layout/PlGrid/PlGrid.js.map +1 -1
  354. package/dist/layout/PlGrid/PlGrid.vue.d.ts.map +1 -1
  355. package/dist/layout/PlGrid/PlGrid.vue2.js +1 -0
  356. package/dist/layout/PlGrid/PlGrid.vue2.js.map +1 -1
  357. package/dist/layout/PlPlaceholder/PlPlaceholder.js.map +1 -1
  358. package/dist/layout/PlPlaceholder/PlPlaceholder.style.js.map +1 -1
  359. package/dist/layout/PlPlaceholder/PlPlaceholder.vue.d.ts.map +1 -1
  360. package/dist/layout/PlPlaceholder/PlPlaceholder.vue2.js +25 -6
  361. package/dist/layout/PlPlaceholder/PlPlaceholder.vue2.js.map +1 -1
  362. package/dist/layout/PlRow/PlRow.js.map +1 -1
  363. package/dist/layout/PlRow/PlRow.vue.d.ts.map +1 -1
  364. package/dist/layout/PlRow/PlRow.vue2.js +7 -4
  365. package/dist/layout/PlRow/PlRow.vue2.js.map +1 -1
  366. package/dist/layout/PlSpacer/PlSpacer.js.map +1 -1
  367. package/dist/layout/PlSpacer/PlSpacer.vue.d.ts.map +1 -1
  368. package/dist/layout/PlSpacer/PlSpacer.vue2.js +1 -0
  369. package/dist/layout/PlSpacer/PlSpacer.vue2.js.map +1 -1
  370. package/package.json +4 -4
  371. package/src/__tests__/default-testid.test.ts +95 -0
  372. package/src/base/BtnBase.vue +3 -3
  373. package/src/components/DropdownListItem.vue +14 -4
  374. package/src/components/InputRange.vue +6 -2
  375. package/src/components/PlAccordion/PlAccordionSection.vue +13 -4
  376. package/src/components/PlAlert/PlAlert.vue +5 -3
  377. package/src/components/PlAutocomplete/PlAutocomplete.vue +47 -11
  378. package/src/components/PlAutocompleteMulti/PlAutocompleteMulti.vue +53 -11
  379. package/src/components/PlBtnAccent/PlBtnAccent.vue +1 -1
  380. package/src/components/PlBtnDanger/PlBtnDanger.vue +1 -1
  381. package/src/components/PlBtnGhost/PlBtnGhost.vue +4 -3
  382. package/src/components/PlBtnGroup/PlBtnGroup.vue +16 -6
  383. package/src/components/PlBtnLink/PlBtnLink.vue +2 -1
  384. package/src/components/PlBtnPrimary/PlBtnPrimary.vue +1 -1
  385. package/src/components/PlBtnSecondary/PlBtnSecondary.vue +1 -1
  386. package/src/components/PlBtnSplit/PlBtnSplit.vue +12 -2
  387. package/src/components/PlChartHistogram/PlChartHistogram.vue +9 -3
  388. package/src/components/PlChartHistogram/createGridlines.ts +2 -0
  389. package/src/components/PlChartHistogram/createLabels.ts +2 -0
  390. package/src/components/PlChartHistogram/createSvgContainer.ts +2 -0
  391. package/src/components/PlChartHistogram/drawBins.ts +2 -0
  392. package/src/components/PlChartHistogram/drawThreshold.ts +1 -0
  393. package/src/components/PlChartHistogram/histogram.ts +6 -1
  394. package/src/components/PlChartStackedBar/Legends.vue +18 -4
  395. package/src/components/PlChartStackedBar/PlChartStackedBar.vue +4 -2
  396. package/src/components/PlChartStackedBar/PlChartStackedBarCompact.vue +1 -1
  397. package/src/components/PlChartStackedBar/StackedRow.vue +12 -4
  398. package/src/components/PlChartStackedBar/StackedRowCompact.vue +10 -3
  399. package/src/components/PlCheckbox/PlCheckbox.vue +15 -4
  400. package/src/components/PlCheckbox/PlCheckboxBase.vue +1 -0
  401. package/src/components/PlCheckboxGroup/PlCheckboxGroup.vue +15 -4
  402. package/src/components/PlChip/PlChip.vue +4 -3
  403. package/src/components/PlClipboard/PlClipboard.vue +7 -1
  404. package/src/components/PlConfirmDialog.vue +8 -3
  405. package/src/components/PlDialogModal/PlDialogModal.vue +15 -2
  406. package/src/components/PlDropdown/OptionList.vue +13 -3
  407. package/src/components/PlDropdown/PlDropdown.vue +35 -11
  408. package/src/components/PlDropdownLegacy/PlDropdownLegacy.vue +51 -12
  409. package/src/components/PlDropdownLine/PlDropdownLine.vue +29 -5
  410. package/src/components/PlDropdownLine/ResizableInput.vue +2 -1
  411. package/src/components/PlDropdownMulti/PlDropdownMulti.vue +47 -11
  412. package/src/components/PlDropdownMultiRef/PlDropdownMultiRef.vue +1 -0
  413. package/src/components/PlDropdownRef/PlDropdownRef.vue +1 -0
  414. package/src/components/PlEditableTitle/PlEditableTitle.vue +11 -3
  415. package/src/components/PlElementList/PlElementList.vue +8 -3
  416. package/src/components/PlElementList/PlElementListItem.vue +16 -5
  417. package/src/components/PlErrorAlert/PlErrorAlert.vue +8 -6
  418. package/src/components/PlErrorBoundary/PlErrorBoundary.vue +7 -1
  419. package/src/components/PlFileDialog/Local.vue +12 -4
  420. package/src/components/PlFileDialog/PlFileDialog.vue +13 -3
  421. package/src/components/PlFileDialog/Remote.vue +39 -11
  422. package/src/components/PlFileDialog/Shortcuts.vue +7 -1
  423. package/src/components/PlFileInput/PlFileInput.vue +44 -19
  424. package/src/components/PlLoaderCircular/PlLoaderCircular.vue +1 -1
  425. package/src/components/PlLoaderLogo.vue +6 -1
  426. package/src/components/PlLogView/PlLogView.vue +30 -8
  427. package/src/components/PlNotificationAlert/PlNotificationAlert.vue +15 -3
  428. package/src/components/PlNumberField/PlNumberField.vue +14 -3
  429. package/src/components/PlProgressBar/PlProgressBar.vue +12 -4
  430. package/src/components/PlProgressCell/PlProgressCell.vue +13 -4
  431. package/src/components/PlRadio/PlRadio.vue +10 -3
  432. package/src/components/PlRadio/PlRadioGroup.vue +3 -2
  433. package/src/components/PlSearchField/PlSearchField.vue +5 -3
  434. package/src/components/PlSectionSeparator/PlSectionSeparator.vue +6 -2
  435. package/src/components/PlSidebar/PlSidebarGroup.vue +2 -2
  436. package/src/components/PlSidebar/PlSidebarItem.vue +12 -4
  437. package/src/components/PlSlideModal/PlPureSlideModal.vue +7 -1
  438. package/src/components/PlSlideModal/PlSlideModal.vue +4 -3
  439. package/src/components/PlSpacer/PlSpacer.vue +1 -1
  440. package/src/components/PlSplash/PlSplash.vue +6 -3
  441. package/src/components/PlStatusTag/PlStatusTag.vue +1 -0
  442. package/src/components/PlTabs/PlTabs.vue +6 -2
  443. package/src/components/PlTextArea/PlTextArea.vue +21 -8
  444. package/src/components/PlTextField/PlTextField.vue +23 -8
  445. package/src/components/PlToggleSwitch/PlToggleSwitch.vue +4 -3
  446. package/src/components/PlTooltip/PlTooltip.vue +3 -0
  447. package/src/components/Slider.vue +27 -7
  448. package/src/components/SliderRange.vue +28 -7
  449. package/src/components/SliderRangeTriple.vue +19 -5
  450. package/src/components/TabItem.vue +2 -2
  451. package/src/components/contextMenu/Menu.vue +8 -3
  452. package/src/layout/PlBlockPage/PlBlockPage.vue +40 -11
  453. package/src/layout/PlContainer/PlContainer.vue +1 -0
  454. package/src/layout/PlGrid/PlGrid.vue +1 -1
  455. package/src/layout/PlPlaceholder/PlPlaceholder.vue +20 -8
  456. package/src/layout/PlRow/PlRow.vue +5 -1
  457. package/src/layout/PlSpacer/PlSpacer.vue +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"PlBtnDanger.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/PlBtnDanger/PlBtnDanger.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Danger button\n */\nexport default {\n name: \"PlBtnDanger\",\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport \"./pl-btn-danger.scss\";\nimport type { MaskIconName16, Size } from \"../../types\";\nimport BtnBase from \"../../base/BtnBase.vue\";\n\nconst props = defineProps<{\n /**\n * If `true,` the button is disabled, cannot be interacted with, and shows a special 'loading' icon.\n */\n loading?: boolean;\n /**\n * Size of the button, the default value is 'medium'\n */\n size?: Size;\n /**\n * If `true` the shape is round.\n */\n round?: boolean;\n /**\n * Icon to display\n */\n icon?: MaskIconName16;\n /**\n * If `true`, an icon is displayed before the text.\n */\n reverse?: boolean;\n /**\n * Justify text at the center\n */\n justifyCenter?: boolean;\n}>();\n</script>\n\n<template>\n <BtnBase class=\"pl-btn-danger\" v-bind=\"props\">\n <slot />\n </BtnBase>\n</template>\n"],"mappings":";;;;CAKE,MAAM;;;;;;;;;;EASR,IAAM,IAAQ;yBA6BZ,EAEU,GAFV,EAEU,EAFD,OAAM,iBAAe,EAAS,EAAK,EAAA;oBAClC,CAAR,EAAQ,EAAA,QAAA,UAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"PlBtnDanger.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/PlBtnDanger/PlBtnDanger.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Danger button\n */\nexport default {\n name: \"PlBtnDanger\",\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport \"./pl-btn-danger.scss\";\nimport type { MaskIconName16, Size } from \"../../types\";\nimport BtnBase from \"../../base/BtnBase.vue\";\n\nconst props = defineProps<{\n /**\n * If `true,` the button is disabled, cannot be interacted with, and shows a special 'loading' icon.\n */\n loading?: boolean;\n /**\n * Size of the button, the default value is 'medium'\n */\n size?: Size;\n /**\n * If `true` the shape is round.\n */\n round?: boolean;\n /**\n * Icon to display\n */\n icon?: MaskIconName16;\n /**\n * If `true`, an icon is displayed before the text.\n */\n reverse?: boolean;\n /**\n * Justify text at the center\n */\n justifyCenter?: boolean;\n}>();\n</script>\n\n<template>\n <BtnBase data-testid=\"pl-btn-danger\" class=\"pl-btn-danger\" v-bind=\"props\">\n <slot />\n </BtnBase>\n</template>\n"],"mappings":";;;;CAKE,MAAM;;;;;;;;;;EASR,IAAM,IAAQ;yBA6BZ,EAEU,GAFV,EAEU;GAFD,eAAY;GAAgB,OAAM;KAAwB,EAAK,EAAA;oBAC9D,CAAR,EAAQ,EAAA,QAAA,UAAA,CAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"PlBtnGhost.js","names":[],"sources":["../../../src/components/PlBtnGhost/PlBtnGhost.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Ghost button\n */\nexport default {\n name: \"PlBtnGhost\",\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport \"./pl-btn-ghost.scss\";\nimport type { MaskIconName24, Size } from \"../../types\";\nimport { PlMaskIcon24 } from \"../PlMaskIcon24\";\nimport { computed, ref, useSlots } from \"vue\";\nimport { useRipple } from \"../../composition/useRipple\";\n\nconst props = withDefaults(\n defineProps<{\n /**\n * If `true,` the button is disabled, cannot be interacted with, and shows a special 'loading' icon.\n */\n loading?: boolean;\n /**\n * Size of the button, the default value is 'medium'\n */\n size?: Size;\n /**\n * If `true` the shape is round.\n */\n round?: boolean;\n /**\n * Icon to display\n */\n icon?: MaskIconName24;\n /**\n * If `true`, an icon is displayed before the text.\n */\n reverse?: boolean;\n /**\n * Justify text at the center (is `false` by default)\n */\n justifyCenter?: boolean;\n }>(),\n {\n size: undefined,\n icon: undefined,\n justifyCenter: false,\n },\n);\n\nconst small = computed(() => props.size === \"small\");\nconst large = computed(() => props.size === \"large\");\n\nconst btnRef = ref();\n\nconst slots = useSlots();\n\nuseRipple(btnRef);\n</script>\n\n<template>\n <button\n ref=\"btnRef\"\n tabindex=\"0\"\n class=\"pl-btn-ghost\"\n :class=\"{ loading, small, large, round, reverse, justifyCenter, [$attrs.class + '']: true }\"\n v-bind=\"{ ...$attrs, disabled: Boolean($attrs.disabled) || loading }\"\n >\n <span v-if=\"slots.default && !round\">\n <slot />\n </span>\n <slot name=\"icon\">\n <PlMaskIcon24 v-if=\"loading\" name=\"loading\" :size=\"size\" />\n <PlMaskIcon24 v-else-if=\"icon\" :name=\"icon\" :size=\"size\" />\n </slot>\n <slot name=\"append\" />\n </button>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"PlBtnGhost.js","names":[],"sources":["../../../src/components/PlBtnGhost/PlBtnGhost.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Ghost button\n */\nexport default {\n name: \"PlBtnGhost\",\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport \"./pl-btn-ghost.scss\";\nimport type { MaskIconName24, Size } from \"../../types\";\nimport { PlMaskIcon24 } from \"../PlMaskIcon24\";\nimport { computed, ref, useSlots } from \"vue\";\nimport { useRipple } from \"../../composition/useRipple\";\n\nconst props = withDefaults(\n defineProps<{\n /**\n * If `true,` the button is disabled, cannot be interacted with, and shows a special 'loading' icon.\n */\n loading?: boolean;\n /**\n * Size of the button, the default value is 'medium'\n */\n size?: Size;\n /**\n * If `true` the shape is round.\n */\n round?: boolean;\n /**\n * Icon to display\n */\n icon?: MaskIconName24;\n /**\n * If `true`, an icon is displayed before the text.\n */\n reverse?: boolean;\n /**\n * Justify text at the center (is `false` by default)\n */\n justifyCenter?: boolean;\n }>(),\n {\n size: undefined,\n icon: undefined,\n justifyCenter: false,\n },\n);\n\nconst small = computed(() => props.size === \"small\");\nconst large = computed(() => props.size === \"large\");\n\nconst btnRef = ref();\n\nconst slots = useSlots();\n\nuseRipple(btnRef);\n</script>\n\n<template>\n <button\n ref=\"btnRef\"\n tabindex=\"0\"\n data-testid=\"pl-btn-ghost\"\n class=\"pl-btn-ghost\"\n :class=\"{ loading, small, large, round, reverse, justifyCenter, [$attrs.class + '']: true }\"\n v-bind=\"{ ...$attrs, disabled: Boolean($attrs.disabled) || loading }\"\n >\n <span v-if=\"slots.default && !round\" data-testid=\"pl-btn-ghost-label\">\n <slot />\n </span>\n <slot name=\"icon\">\n <PlMaskIcon24 v-if=\"loading\" data-testid=\"pl-btn-ghost-loading\" name=\"loading\" :size=\"size\" />\n <PlMaskIcon24 v-else-if=\"icon\" data-testid=\"pl-btn-ghost-icon\" :name=\"icon\" :size=\"size\" />\n </slot>\n <slot name=\"append\" />\n </button>\n</template>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"PlBtnGhost.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PlBtnGhost/PlBtnGhost.vue"],"names":[],"mappings":"AAiFA,OAAO,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAMxD;;GAEG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAKzC,QAAA,MAAM,YAAY;IAEd;;OAEG;cACO,OAAO;IACjB;;OAEG;WACI,IAAI;IACX;;OAEG;YACK,OAAO;IACf;;OAEG;WACI,cAAc;IACrB;;OAEG;cACO,OAAO;IACjB;;OAEG;oBACa,OAAO;;IAvBvB;;OAEG;cACO,OAAO;IACjB;;OAEG;WACI,IAAI;IACX;;OAEG;YACK,OAAO;IACf;;OAEG;WACI,cAAc;IACrB;;OAEG;cACO,OAAO;IACjB;;OAEG;oBACa,OAAO;;UAhBhB,IAAI;UAQJ,cAAc;mBAQL,OAAO;;cAoGb,CAAC,KAAK,IAAgB,KAAK,GAAG;;WACjC,CAAC,KAAK,IAAgB,KAAK,GAAG;;aAC5B,CAAC,KAAK,IAAiB,KAAK,GAAG;EAYxC,CAAC;AAWL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"PlBtnGhost.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PlBtnGhost/PlBtnGhost.vue"],"names":[],"mappings":"AAkFA,OAAO,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAMxD;;GAEG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAKzC,QAAA,MAAM,YAAY;IAEd;;OAEG;cACO,OAAO;IACjB;;OAEG;WACI,IAAI;IACX;;OAEG;YACK,OAAO;IACf;;OAEG;WACI,cAAc;IACrB;;OAEG;cACO,OAAO;IACjB;;OAEG;oBACa,OAAO;;IAvBvB;;OAEG;cACO,OAAO;IACjB;;OAEG;WACI,IAAI;IACX;;OAEG;YACK,OAAO;IACf;;OAEG;WACI,cAAc;IACrB;;OAEG;cACO,OAAO;IACjB;;OAEG;oBACa,OAAO;;UAhBhB,IAAI;UAQJ,cAAc;mBAQL,OAAO;;cA0Gb,CAAC,KAAK,IAAgB,KAAK,GAAG;;WACjC,CAAC,KAAK,IAAgB,KAAK,GAAG;;aAC5B,CAAC,KAAK,IAAiB,KAAK,GAAG;EAYxC,CAAC;AAWL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -4,7 +4,10 @@ import { useRipple as t } from "../../composition/useRipple.js";
4
4
  import './pl-btn-ghost.css';/* empty css */
5
5
  import { computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, defineComponent as o, mergeProps as s, openBlock as c, ref as l, renderSlot as u, unref as d, useSlots as f } from "vue";
6
6
  //#region src/components/PlBtnGhost/PlBtnGhost.vue?vue&type=script&setup=true&lang.ts
7
- var p = { key: 0 }, m = /* @__PURE__ */ o({
7
+ var p = {
8
+ key: 0,
9
+ "data-testid": "pl-btn-ghost-label"
10
+ }, m = /* @__PURE__ */ o({
8
11
  name: "PlBtnGhost",
9
12
  props: {
10
13
  loading: { type: Boolean },
@@ -23,6 +26,7 @@ var p = { key: 0 }, m = /* @__PURE__ */ o({
23
26
  ref_key: "btnRef",
24
27
  ref: _,
25
28
  tabindex: "0",
29
+ "data-testid": "pl-btn-ghost",
26
30
  class: ["pl-btn-ghost", {
27
31
  loading: o.loading,
28
32
  small: h.value,
@@ -39,10 +43,12 @@ var p = { key: 0 }, m = /* @__PURE__ */ o({
39
43
  d(v).default && !o.round ? (c(), a("span", p, [u(t.$slots, "default")])) : i("", !0),
40
44
  u(t.$slots, "icon", {}, () => [o.loading ? (c(), r(d(e), {
41
45
  key: 0,
46
+ "data-testid": "pl-btn-ghost-loading",
42
47
  name: "loading",
43
48
  size: o.size
44
49
  }, null, 8, ["size"])) : o.icon ? (c(), r(d(e), {
45
50
  key: 1,
51
+ "data-testid": "pl-btn-ghost-icon",
46
52
  name: o.icon,
47
53
  size: o.size
48
54
  }, null, 8, ["name", "size"])) : i("", !0)]),
@@ -1 +1 @@
1
- {"version":3,"file":"PlBtnGhost.vue_vue_type_script_setup_true_lang.js","names":["$attrs"],"sources":["../../../src/components/PlBtnGhost/PlBtnGhost.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Ghost button\n */\nexport default {\n name: \"PlBtnGhost\",\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport \"./pl-btn-ghost.scss\";\nimport type { MaskIconName24, Size } from \"../../types\";\nimport { PlMaskIcon24 } from \"../PlMaskIcon24\";\nimport { computed, ref, useSlots } from \"vue\";\nimport { useRipple } from \"../../composition/useRipple\";\n\nconst props = withDefaults(\n defineProps<{\n /**\n * If `true,` the button is disabled, cannot be interacted with, and shows a special 'loading' icon.\n */\n loading?: boolean;\n /**\n * Size of the button, the default value is 'medium'\n */\n size?: Size;\n /**\n * If `true` the shape is round.\n */\n round?: boolean;\n /**\n * Icon to display\n */\n icon?: MaskIconName24;\n /**\n * If `true`, an icon is displayed before the text.\n */\n reverse?: boolean;\n /**\n * Justify text at the center (is `false` by default)\n */\n justifyCenter?: boolean;\n }>(),\n {\n size: undefined,\n icon: undefined,\n justifyCenter: false,\n },\n);\n\nconst small = computed(() => props.size === \"small\");\nconst large = computed(() => props.size === \"large\");\n\nconst btnRef = ref();\n\nconst slots = useSlots();\n\nuseRipple(btnRef);\n</script>\n\n<template>\n <button\n ref=\"btnRef\"\n tabindex=\"0\"\n class=\"pl-btn-ghost\"\n :class=\"{ loading, small, large, round, reverse, justifyCenter, [$attrs.class + '']: true }\"\n v-bind=\"{ ...$attrs, disabled: Boolean($attrs.disabled) || loading }\"\n >\n <span v-if=\"slots.default && !round\">\n <slot />\n </span>\n <slot name=\"icon\">\n <PlMaskIcon24 v-if=\"loading\" name=\"loading\" :size=\"size\" />\n <PlMaskIcon24 v-else-if=\"icon\" :name=\"icon\" :size=\"size\" />\n </slot>\n <slot name=\"append\" />\n </button>\n</template>\n"],"mappings":";;;;;;;CAKE,MAAM;;;;;;;;;;;;;EAWR,IAAM,IAAQ,GAkCR,IAAQ,QAAe,EAAM,SAAS,QAAQ,EAC9C,IAAQ,QAAe,EAAM,SAAS,QAAQ,EAE9C,IAAS,GAAK,EAEd,IAAQ,GAAU;SAExB,EAAU,EAAO,kBAIf,EAeS,UAfT,EAeS;YAdH;GAAJ,KAAI;GACJ,UAAS;GACT,OAAK,CAAC,gBAAc;IAAA,SACV,EAAA;IAAO,OAAE,EAAA;IAAK,OAAE,EAAA;IAAK,OAAE,EAAA;IAAK,SAAE,EAAA;IAAO,eAAE,EAAA;KAAgBA,EAAAA,OAAO,QAAK,KAAA;IAAA,CAAA;;MAChEA,EAAAA;GAAM,UAAY,EAAQA,EAAAA,OAAO,YAAa,EAAA;GAAO,CAAA,EAAA;GAEtD,EAAA,EAAK,CAAC,WAAO,CAAK,EAAA,SAAA,GAAA,EAA9B,EAEO,QAAA,GAAA,CADL,EAAQ,EAAA,QAAA,UAAA,CAAA,CAAA,IAAA,EAAA,IAAA,GAAA;GAEV,EAGO,EAAA,QAAA,QAAA,EAAA,QAAA,CAFe,EAAA,WAAA,GAAA,EAApB,EAA2D,EAAA,EAAA,EAAA;;IAA9B,MAAK;IAAW,MAAM,EAAA;4BAC1B,EAAA,QAAA,GAAA,EAAzB,EAA2D,EAAA,EAAA,EAAA;;IAA3B,MAAM,EAAA;IAAO,MAAM,EAAA;;GAErD,EAAsB,EAAA,QAAA,SAAA"}
1
+ {"version":3,"file":"PlBtnGhost.vue_vue_type_script_setup_true_lang.js","names":["$attrs"],"sources":["../../../src/components/PlBtnGhost/PlBtnGhost.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Ghost button\n */\nexport default {\n name: \"PlBtnGhost\",\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport \"./pl-btn-ghost.scss\";\nimport type { MaskIconName24, Size } from \"../../types\";\nimport { PlMaskIcon24 } from \"../PlMaskIcon24\";\nimport { computed, ref, useSlots } from \"vue\";\nimport { useRipple } from \"../../composition/useRipple\";\n\nconst props = withDefaults(\n defineProps<{\n /**\n * If `true,` the button is disabled, cannot be interacted with, and shows a special 'loading' icon.\n */\n loading?: boolean;\n /**\n * Size of the button, the default value is 'medium'\n */\n size?: Size;\n /**\n * If `true` the shape is round.\n */\n round?: boolean;\n /**\n * Icon to display\n */\n icon?: MaskIconName24;\n /**\n * If `true`, an icon is displayed before the text.\n */\n reverse?: boolean;\n /**\n * Justify text at the center (is `false` by default)\n */\n justifyCenter?: boolean;\n }>(),\n {\n size: undefined,\n icon: undefined,\n justifyCenter: false,\n },\n);\n\nconst small = computed(() => props.size === \"small\");\nconst large = computed(() => props.size === \"large\");\n\nconst btnRef = ref();\n\nconst slots = useSlots();\n\nuseRipple(btnRef);\n</script>\n\n<template>\n <button\n ref=\"btnRef\"\n tabindex=\"0\"\n data-testid=\"pl-btn-ghost\"\n class=\"pl-btn-ghost\"\n :class=\"{ loading, small, large, round, reverse, justifyCenter, [$attrs.class + '']: true }\"\n v-bind=\"{ ...$attrs, disabled: Boolean($attrs.disabled) || loading }\"\n >\n <span v-if=\"slots.default && !round\" data-testid=\"pl-btn-ghost-label\">\n <slot />\n </span>\n <slot name=\"icon\">\n <PlMaskIcon24 v-if=\"loading\" data-testid=\"pl-btn-ghost-loading\" name=\"loading\" :size=\"size\" />\n <PlMaskIcon24 v-else-if=\"icon\" data-testid=\"pl-btn-ghost-icon\" :name=\"icon\" :size=\"size\" />\n </slot>\n <slot name=\"append\" />\n </button>\n</template>\n"],"mappings":";;;;;;;;;;CAKE,MAAM;;;;;;;;;;;;;EAWR,IAAM,IAAQ,GAkCR,IAAQ,QAAe,EAAM,SAAS,QAAQ,EAC9C,IAAQ,QAAe,EAAM,SAAS,QAAQ,EAE9C,IAAS,GAAK,EAEd,IAAQ,GAAU;SAExB,EAAU,EAAO,kBAIf,EAgBS,UAhBT,EAgBS;YAfH;GAAJ,KAAI;GACJ,UAAS;GACT,eAAY;GACZ,OAAK,CAAC,gBAAc;IAAA,SACV,EAAA;IAAO,OAAE,EAAA;IAAK,OAAE,EAAA;IAAK,OAAE,EAAA;IAAK,SAAE,EAAA;IAAO,eAAE,EAAA;KAAgBA,EAAAA,OAAO,QAAK,KAAA;IAAA,CAAA;;MAChEA,EAAAA;GAAM,UAAY,EAAQA,EAAAA,OAAO,YAAa,EAAA;GAAO,CAAA,EAAA;GAEtD,EAAA,EAAK,CAAC,WAAO,CAAK,EAAA,SAAA,GAAA,EAA9B,EAEO,QAFP,GAEO,CADL,EAAQ,EAAA,QAAA,UAAA,CAAA,CAAA,IAAA,EAAA,IAAA,GAAA;GAEV,EAGO,EAAA,QAAA,QAAA,EAAA,QAAA,CAFe,EAAA,WAAA,GAAA,EAApB,EAA8F,EAAA,EAAA,EAAA;;IAAjE,eAAY;IAAuB,MAAK;IAAW,MAAM,EAAA;4BAC7D,EAAA,QAAA,GAAA,EAAzB,EAA2F,EAAA,EAAA,EAAA;;IAA5D,eAAY;IAAqB,MAAM,EAAA;IAAO,MAAM,EAAA;;GAErF,EAAsB,EAAA,QAAA,SAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"PlBtnGroup.js","names":[],"sources":["../../../src/components/PlBtnGroup/PlBtnGroup.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * A component for selecting one value from a list of options\n */\nexport default {\n name: \"PlBtnGroup\",\n};\n</script>\n\n<script lang=\"ts\" setup generic=\"M = unknown\">\nimport \"./pl-btn-group.scss\";\nimport { computed, useSlots } from \"vue\";\nimport { PlTooltip } from \"../PlTooltip\";\nimport InnerBorder from \"../../utils/InnerBorder.vue\";\nimport type { SimpleOption } from \"../../types\";\nimport { getErrorMessage } from \"../../helpers/error.ts\";\n\nconst slots = useSlots();\n\nconst emit = defineEmits<{\n /**\n * Emitted when the model value is updated.\n */\n (e: \"update:modelValue\", value: M): void;\n}>();\n\nconst emitModel = (v: M) => emit(\"update:modelValue\", v);\n\nconst props = defineProps<{\n /**\n * The current selected value.\n */\n modelValue?: M;\n /**\n * The label text for the component (optional)\n */\n label?: string;\n /**\n * List of available options for the component\n */\n options: Readonly<SimpleOption<M>[]>;\n /**\n * If `true`, the component is disabled and cannot be interacted with.\n */\n disabled?: boolean;\n /**\n * If `true`, the height of the component is 32px\n */\n compact?: boolean;\n /**\n * A helper text displayed below the component when there are no errors (optional).\n */\n helper?: string;\n /**\n * Error message displayed below the component (optional)\n */\n error?: unknown;\n}>();\n\nconst normalizedOptions = computed(() =>\n props.options.map((it) => ({\n label: \"label\" in it ? it.label : it.text,\n value: it.value,\n })),\n);\n</script>\n\n<template>\n <div class=\"pl-btn-group\" :class=\"{ disabled, compact }\">\n <label v-if=\"label\">\n <span>{{ label }}</span>\n <PlTooltip v-if=\"slots.tooltip\" class=\"info\" position=\"top\">\n <template #tooltip>\n <slot name=\"tooltip\" />\n </template>\n </PlTooltip>\n </label>\n <InnerBorder class=\"pl-btn-group__container\">\n <div\n v-for=\"(opt, i) in normalizedOptions\"\n :key=\"i\"\n class=\"pl-btn-group__option text-s\"\n :tabindex=\"modelValue === opt.value || disabled ? undefined : 0\"\n :class=\"{ active: modelValue === opt.value }\"\n @keydown.enter=\"emitModel(opt.value)\"\n @click=\"emitModel(opt.value)\"\n >\n {{ opt.label }}\n </div>\n </InnerBorder>\n <div v-if=\"helper\" class=\"pl-btn-group__helper\">{{ helper }}</div>\n <div v-else-if=\"error\" class=\"pl-btn-group__error\">{{ getErrorMessage(error) }}</div>\n </div>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"PlBtnGroup.js","names":[],"sources":["../../../src/components/PlBtnGroup/PlBtnGroup.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * A component for selecting one value from a list of options\n */\nexport default {\n name: \"PlBtnGroup\",\n};\n</script>\n\n<script lang=\"ts\" setup generic=\"M = unknown\">\nimport \"./pl-btn-group.scss\";\nimport { computed, useSlots } from \"vue\";\nimport { PlTooltip } from \"../PlTooltip\";\nimport InnerBorder from \"../../utils/InnerBorder.vue\";\nimport type { SimpleOption } from \"../../types\";\nimport { getErrorMessage } from \"../../helpers/error.ts\";\n\nconst slots = useSlots();\n\nconst emit = defineEmits<{\n /**\n * Emitted when the model value is updated.\n */\n (e: \"update:modelValue\", value: M): void;\n}>();\n\nconst emitModel = (v: M) => emit(\"update:modelValue\", v);\n\nconst props = defineProps<{\n /**\n * The current selected value.\n */\n modelValue?: M;\n /**\n * The label text for the component (optional)\n */\n label?: string;\n /**\n * List of available options for the component\n */\n options: Readonly<SimpleOption<M>[]>;\n /**\n * If `true`, the component is disabled and cannot be interacted with.\n */\n disabled?: boolean;\n /**\n * If `true`, the height of the component is 32px\n */\n compact?: boolean;\n /**\n * A helper text displayed below the component when there are no errors (optional).\n */\n helper?: string;\n /**\n * Error message displayed below the component (optional)\n */\n error?: unknown;\n}>();\n\nconst normalizedOptions = computed(() =>\n props.options.map((it) => ({\n label: \"label\" in it ? it.label : it.text,\n value: it.value,\n })),\n);\n</script>\n\n<template>\n <div data-testid=\"pl-btn-group\" class=\"pl-btn-group\" :class=\"{ disabled, compact }\">\n <label v-if=\"label\" data-testid=\"pl-btn-group-label\">\n <span>{{ label }}</span>\n <PlTooltip\n v-if=\"slots.tooltip\"\n data-testid=\"pl-btn-group-tooltip\"\n class=\"info\"\n position=\"top\"\n >\n <template #tooltip>\n <slot name=\"tooltip\" />\n </template>\n </PlTooltip>\n </label>\n <InnerBorder data-testid=\"pl-btn-group-options\" class=\"pl-btn-group__container\">\n <div\n v-for=\"(opt, i) in normalizedOptions\"\n :key=\"i\"\n data-testid=\"pl-btn-group-option\"\n class=\"pl-btn-group__option text-s\"\n :tabindex=\"modelValue === opt.value || disabled ? undefined : 0\"\n :class=\"{ active: modelValue === opt.value }\"\n @keydown.enter=\"emitModel(opt.value)\"\n @click=\"emitModel(opt.value)\"\n >\n {{ opt.label }}\n </div>\n </InnerBorder>\n <div v-if=\"helper\" data-testid=\"pl-btn-group-helper\" class=\"pl-btn-group__helper\">\n {{ helper }}\n </div>\n <div v-else-if=\"error\" data-testid=\"pl-btn-group-error\" class=\"pl-btn-group__error\">\n {{ getErrorMessage(error) }}\n </div>\n </div>\n</template>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"PlBtnGroup.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PlBtnGroup/PlBtnGroup.vue"],"names":[],"mappings":"AAiGA,OAAO,qBAAqB,CAAC;AAI7B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIhD;;GAEG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAKzC,QAAA,MAAM,YAAY,GAAK,CAAC,GAAG,OAAO,EACjC,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,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AC,CAAC,CAAC,CAAC;CAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,CAAC,GAAG,EAAE,CAAC"}
@@ -5,15 +5,20 @@ import './pl-btn-group.css';/* empty css */
5
5
  import n from "../../utils/InnerBorder.js";
6
6
  import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createVNode as l, defineComponent as u, normalizeClass as d, openBlock as f, renderList as p, renderSlot as m, toDisplayString as h, unref as g, useSlots as _, withCtx as v, withKeys as y } from "vue";
7
7
  //#region src/components/PlBtnGroup/PlBtnGroup.vue?vue&type=script&setup=true&lang.ts
8
- var b = { key: 0 }, x = [
8
+ var b = {
9
+ key: 0,
10
+ "data-testid": "pl-btn-group-label"
11
+ }, x = [
9
12
  "tabindex",
10
13
  "onKeydown",
11
14
  "onClick"
12
15
  ], S = {
13
16
  key: 1,
17
+ "data-testid": "pl-btn-group-helper",
14
18
  class: "pl-btn-group__helper"
15
19
  }, C = {
16
20
  key: 2,
21
+ "data-testid": "pl-btn-group-error",
17
22
  class: "pl-btn-group__error"
18
23
  }, w = /* @__PURE__ */ u({
19
24
  name: "PlBtnGroup",
@@ -32,21 +37,29 @@ var b = { key: 0 }, x = [
32
37
  label: "label" in e ? e.label : e.text,
33
38
  value: e.value
34
39
  })));
35
- return (i, _) => (f(), s("div", { class: d(["pl-btn-group", {
36
- disabled: u.disabled,
37
- compact: u.compact
38
- }]) }, [
40
+ return (i, _) => (f(), s("div", {
41
+ "data-testid": "pl-btn-group",
42
+ class: d(["pl-btn-group", {
43
+ disabled: u.disabled,
44
+ compact: u.compact
45
+ }])
46
+ }, [
39
47
  u.label ? (f(), s("label", b, [c("span", null, h(u.label), 1), g(T).tooltip ? (f(), a(g(e), {
40
48
  key: 0,
49
+ "data-testid": "pl-btn-group-tooltip",
41
50
  class: "info",
42
51
  position: "top"
43
52
  }, {
44
53
  tooltip: v(() => [m(i.$slots, "tooltip")]),
45
54
  _: 3
46
55
  })) : o("", !0)])) : o("", !0),
47
- l(n, { class: "pl-btn-group__container" }, {
56
+ l(n, {
57
+ "data-testid": "pl-btn-group-options",
58
+ class: "pl-btn-group__container"
59
+ }, {
48
60
  default: v(() => [(f(!0), s(r, null, p(k.value, (e, t) => (f(), s("div", {
49
61
  key: t,
62
+ "data-testid": "pl-btn-group-option",
50
63
  class: d(["pl-btn-group__option text-s", { active: u.modelValue === e.value }]),
51
64
  tabindex: u.modelValue === e.value || u.disabled ? void 0 : 0,
52
65
  onKeydown: y((t) => D(e.value), ["enter"]),
@@ -1 +1 @@
1
- {"version":3,"file":"PlBtnGroup.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/PlBtnGroup/PlBtnGroup.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * A component for selecting one value from a list of options\n */\nexport default {\n name: \"PlBtnGroup\",\n};\n</script>\n\n<script lang=\"ts\" setup generic=\"M = unknown\">\nimport \"./pl-btn-group.scss\";\nimport { computed, useSlots } from \"vue\";\nimport { PlTooltip } from \"../PlTooltip\";\nimport InnerBorder from \"../../utils/InnerBorder.vue\";\nimport type { SimpleOption } from \"../../types\";\nimport { getErrorMessage } from \"../../helpers/error.ts\";\n\nconst slots = useSlots();\n\nconst emit = defineEmits<{\n /**\n * Emitted when the model value is updated.\n */\n (e: \"update:modelValue\", value: M): void;\n}>();\n\nconst emitModel = (v: M) => emit(\"update:modelValue\", v);\n\nconst props = defineProps<{\n /**\n * The current selected value.\n */\n modelValue?: M;\n /**\n * The label text for the component (optional)\n */\n label?: string;\n /**\n * List of available options for the component\n */\n options: Readonly<SimpleOption<M>[]>;\n /**\n * If `true`, the component is disabled and cannot be interacted with.\n */\n disabled?: boolean;\n /**\n * If `true`, the height of the component is 32px\n */\n compact?: boolean;\n /**\n * A helper text displayed below the component when there are no errors (optional).\n */\n helper?: string;\n /**\n * Error message displayed below the component (optional)\n */\n error?: unknown;\n}>();\n\nconst normalizedOptions = computed(() =>\n props.options.map((it) => ({\n label: \"label\" in it ? it.label : it.text,\n value: it.value,\n })),\n);\n</script>\n\n<template>\n <div class=\"pl-btn-group\" :class=\"{ disabled, compact }\">\n <label v-if=\"label\">\n <span>{{ label }}</span>\n <PlTooltip v-if=\"slots.tooltip\" class=\"info\" position=\"top\">\n <template #tooltip>\n <slot name=\"tooltip\" />\n </template>\n </PlTooltip>\n </label>\n <InnerBorder class=\"pl-btn-group__container\">\n <div\n v-for=\"(opt, i) in normalizedOptions\"\n :key=\"i\"\n class=\"pl-btn-group__option text-s\"\n :tabindex=\"modelValue === opt.value || disabled ? undefined : 0\"\n :class=\"{ active: modelValue === opt.value }\"\n @keydown.enter=\"emitModel(opt.value)\"\n @click=\"emitModel(opt.value)\"\n >\n {{ opt.label }}\n </div>\n </InnerBorder>\n <div v-if=\"helper\" class=\"pl-btn-group__helper\">{{ helper }}</div>\n <div v-else-if=\"error\" class=\"pl-btn-group__error\">{{ getErrorMessage(error) }}</div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;CAKE,MAAM;;;;;;;;;;;;EAYR,IAAM,IAAQ,GAAU,EAElB,IAAO,GAOP,KAAa,MAAS,EAAK,qBAAqB,EAAE,EAElD,IAAQ,GA+BR,IAAoB,QACxB,EAAM,QAAQ,KAAK,OAAQ;GACzB,OAAO,WAAW,IAAK,EAAG,QAAQ,EAAG;GACrC,OAAO,EAAG;GACX,EAAE,CACJ;yBAIC,EAwBM,OAAA,EAxBD,OAAK,EAAA,CAAC,gBAAc;GAAA,UAAW,EAAA;GAAQ,SAAE,EAAA;GAAO,CAAA,CAAA,EAAA,EAAA;GACtC,EAAA,SAAA,GAAA,EAAb,EAOQ,SAAA,GAAA,CANN,EAAwB,QAAA,MAAA,EAAf,EAAA,MAAK,EAAA,EAAA,EACG,EAAA,EAAK,CAAC,WAAA,GAAA,EAAvB,EAIY,EAAA,EAAA,EAAA;;IAJoB,OAAM;IAAO,UAAS;;IACzC,SAAO,QACO,CAAvB,EAAuB,EAAA,QAAA,UAAA,CAAA,CAAA;;;GAI7B,EAYc,GAAA,EAZD,OAAM,2BAAyB,EAAA;qBAEH,EAAA,EAAA,GAAA,EADvC,EAUM,GAAA,MAAA,EATe,EAAA,QAAX,GAAK,YADf,EAUM,OAAA;KARH,KAAK;KACN,OAAK,EAAA,CAAC,+BAA6B,EAAA,QAEjB,EAAA,eAAe,EAAI,OAAK,CAAA,CAAA;KADzC,UAAU,EAAA,eAAe,EAAI,SAAS,EAAA,WAAW,KAAA,IAAS;KAE1D,WAAO,GAAA,MAAQ,EAAU,EAAI,MAAK,EAAA,CAAA,QAAA,CAAA;KAClC,UAAK,MAAE,EAAU,EAAI,MAAK;SAExB,EAAI,MAAK,EAAA,IAAA,EAAA;;;GAGL,EAAA,UAAA,GAAA,EAAX,EAAkE,OAAlE,GAAkE,EAAf,EAAA,OAAM,EAAA,EAAA,IACzC,EAAA,SAAA,GAAA,EAAhB,EAAqF,OAArF,GAAqF,EAA/B,EAAA,EAAe,CAAC,EAAA,MAAK,CAAA,EAAA,EAAA,IAAA,EAAA,IAAA,GAAA"}
1
+ {"version":3,"file":"PlBtnGroup.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/PlBtnGroup/PlBtnGroup.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * A component for selecting one value from a list of options\n */\nexport default {\n name: \"PlBtnGroup\",\n};\n</script>\n\n<script lang=\"ts\" setup generic=\"M = unknown\">\nimport \"./pl-btn-group.scss\";\nimport { computed, useSlots } from \"vue\";\nimport { PlTooltip } from \"../PlTooltip\";\nimport InnerBorder from \"../../utils/InnerBorder.vue\";\nimport type { SimpleOption } from \"../../types\";\nimport { getErrorMessage } from \"../../helpers/error.ts\";\n\nconst slots = useSlots();\n\nconst emit = defineEmits<{\n /**\n * Emitted when the model value is updated.\n */\n (e: \"update:modelValue\", value: M): void;\n}>();\n\nconst emitModel = (v: M) => emit(\"update:modelValue\", v);\n\nconst props = defineProps<{\n /**\n * The current selected value.\n */\n modelValue?: M;\n /**\n * The label text for the component (optional)\n */\n label?: string;\n /**\n * List of available options for the component\n */\n options: Readonly<SimpleOption<M>[]>;\n /**\n * If `true`, the component is disabled and cannot be interacted with.\n */\n disabled?: boolean;\n /**\n * If `true`, the height of the component is 32px\n */\n compact?: boolean;\n /**\n * A helper text displayed below the component when there are no errors (optional).\n */\n helper?: string;\n /**\n * Error message displayed below the component (optional)\n */\n error?: unknown;\n}>();\n\nconst normalizedOptions = computed(() =>\n props.options.map((it) => ({\n label: \"label\" in it ? it.label : it.text,\n value: it.value,\n })),\n);\n</script>\n\n<template>\n <div data-testid=\"pl-btn-group\" class=\"pl-btn-group\" :class=\"{ disabled, compact }\">\n <label v-if=\"label\" data-testid=\"pl-btn-group-label\">\n <span>{{ label }}</span>\n <PlTooltip\n v-if=\"slots.tooltip\"\n data-testid=\"pl-btn-group-tooltip\"\n class=\"info\"\n position=\"top\"\n >\n <template #tooltip>\n <slot name=\"tooltip\" />\n </template>\n </PlTooltip>\n </label>\n <InnerBorder data-testid=\"pl-btn-group-options\" class=\"pl-btn-group__container\">\n <div\n v-for=\"(opt, i) in normalizedOptions\"\n :key=\"i\"\n data-testid=\"pl-btn-group-option\"\n class=\"pl-btn-group__option text-s\"\n :tabindex=\"modelValue === opt.value || disabled ? undefined : 0\"\n :class=\"{ active: modelValue === opt.value }\"\n @keydown.enter=\"emitModel(opt.value)\"\n @click=\"emitModel(opt.value)\"\n >\n {{ opt.label }}\n </div>\n </InnerBorder>\n <div v-if=\"helper\" data-testid=\"pl-btn-group-helper\" class=\"pl-btn-group__helper\">\n {{ helper }}\n </div>\n <div v-else-if=\"error\" data-testid=\"pl-btn-group-error\" class=\"pl-btn-group__error\">\n {{ getErrorMessage(error) }}\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;CAKE,MAAM;;;;;;;;;;;;EAYR,IAAM,IAAQ,GAAU,EAElB,IAAO,GAOP,KA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,"file":"PlBtnLink.js","names":[],"sources":["../../../src/components/PlBtnLink/PlBtnLink.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport \"./pl-btn-link.scss\";\nimport type { MaskIconName16, Size } from \"../../types\";\nimport BtnSecondary from \"../PlBtnSecondary/PlBtnSecondary.vue\";\nimport { ref } from \"vue\";\n\nconst props = defineProps<{\n /**\n * If `true,` the button is disabled, cannot be interacted with, and shows a special 'loading' icon.\n */\n loading?: boolean;\n /**\n * Size of the button, the default value is 'medium'\n */\n size?: Size;\n /**\n * Icon to display\n */\n icon?: MaskIconName16;\n /**\n * If `true`, an icon is displayed before the text.\n */\n reverse?: boolean;\n /**\n * Justify text at the center (is `true` by default)\n */\n justifyCenter?: boolean;\n /**\n * If `true`, the button is disabled and cannot be interacted with.\n */\n disabled?: boolean;\n}>();\n\nconst hover = ref(false);\n</script>\n\n<template>\n <div\n class=\"ui-btn-link\"\n :class=\"{ disabled, loading, hover }\"\n @mouseover=\"hover = true\"\n @mouseleave=\"hover = false\"\n >\n <BtnSecondary round :hover=\"hover\" v-bind=\"props\" />\n <slot />\n </div>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"PlBtnLink.js","names":[],"sources":["../../../src/components/PlBtnLink/PlBtnLink.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport \"./pl-btn-link.scss\";\nimport type { MaskIconName16, Size } from \"../../types\";\nimport BtnSecondary from \"../PlBtnSecondary/PlBtnSecondary.vue\";\nimport { ref } from \"vue\";\n\nconst props = defineProps<{\n /**\n * If `true,` the button is disabled, cannot be interacted with, and shows a special 'loading' icon.\n */\n loading?: boolean;\n /**\n * Size of the button, the default value is 'medium'\n */\n size?: Size;\n /**\n * Icon to display\n */\n icon?: MaskIconName16;\n /**\n * If `true`, an icon is displayed before the text.\n */\n reverse?: boolean;\n /**\n * Justify text at the center (is `true` by default)\n */\n justifyCenter?: boolean;\n /**\n * If `true`, the button is disabled and cannot be interacted with.\n */\n disabled?: boolean;\n}>();\n\nconst hover = ref(false);\n</script>\n\n<template>\n <div\n data-testid=\"pl-btn-link\"\n class=\"ui-btn-link\"\n :class=\"{ disabled, loading, hover }\"\n @mouseover=\"hover = true\"\n @mouseleave=\"hover = false\"\n >\n <BtnSecondary data-testid=\"pl-btn-link-button\" round :hover=\"hover\" v-bind=\"props\" />\n <slot />\n </div>\n</template>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"PlBtnLink.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PlBtnLink/PlBtnLink.vue"],"names":[],"mappings":"AAkDA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAIxD,KAAK,WAAW,GAAG;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ;;OAEG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAuDF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK/C,QAAA,MAAM,UAAU,kSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"PlBtnLink.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PlBtnLink/PlBtnLink.vue"],"names":[],"mappings":"AAmDA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAIxD,KAAK,WAAW,GAAG;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ;;OAEG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AA0DF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK/C,QAAA,MAAM,UAAU,kSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -15,6 +15,7 @@ var l = /* @__PURE__ */ r({
15
15
  setup(r) {
16
16
  let l = r, u = s(!1);
17
17
  return (s, d) => (o(), t("div", {
18
+ "data-testid": "pl-btn-link",
18
19
  class: a(["ui-btn-link", {
19
20
  disabled: r.disabled,
20
21
  loading: r.loading,
@@ -23,6 +24,7 @@ var l = /* @__PURE__ */ r({
23
24
  onMouseover: d[0] ||= (e) => u.value = !0,
24
25
  onMouseleave: d[1] ||= (e) => u.value = !1
25
26
  }, [n(e, i({
27
+ "data-testid": "pl-btn-link-button",
26
28
  round: "",
27
29
  hover: u.value
28
30
  }, l), null, 16, ["hover"]), c(s.$slots, "default")], 34));
@@ -1 +1 @@
1
- {"version":3,"file":"PlBtnLink.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/PlBtnLink/PlBtnLink.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport \"./pl-btn-link.scss\";\nimport type { MaskIconName16, Size } from \"../../types\";\nimport BtnSecondary from \"../PlBtnSecondary/PlBtnSecondary.vue\";\nimport { ref } from \"vue\";\n\nconst props = defineProps<{\n /**\n * If `true,` the button is disabled, cannot be interacted with, and shows a special 'loading' icon.\n */\n loading?: boolean;\n /**\n * Size of the button, the default value is 'medium'\n */\n size?: Size;\n /**\n * Icon to display\n */\n icon?: MaskIconName16;\n /**\n * If `true`, an icon is displayed before the text.\n */\n reverse?: boolean;\n /**\n * Justify text at the center (is `true` by default)\n */\n justifyCenter?: boolean;\n /**\n * If `true`, the button is disabled and cannot be interacted with.\n */\n disabled?: boolean;\n}>();\n\nconst hover = ref(false);\n</script>\n\n<template>\n <div\n class=\"ui-btn-link\"\n :class=\"{ disabled, loading, hover }\"\n @mouseover=\"hover = true\"\n @mouseleave=\"hover = false\"\n >\n <BtnSecondary round :hover=\"hover\" v-bind=\"props\" />\n <slot />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;EAMA,IAAM,IAAQ,GA2BR,IAAQ,EAAI,GAAM;yBAItB,EAQM,OAAA;GAPJ,OAAK,EAAA,CAAC,eAAa;IAAA,UACT,EAAA;IAAQ,SAAE,EAAA;IAAO,OAAE,EAAA;IAAK,CAAA,CAAA;GACjC,aAAS,AAAA,EAAA,QAAA,MAAE,EAAA,QAAK;GAChB,cAAU,AAAA,EAAA,QAAA,MAAE,EAAA,QAAK;MAElB,EAAoD,GAApD,EAAoD;GAAtC,OAAA;GAAO,OAAO,EAAA;KAAe,EAAK,EAAA,MAAA,IAAA,CAAA,QAAA,CAAA,EAChD,EAAQ,EAAA,QAAA,UAAA,CAAA,EAAA,GAAA"}
1
+ {"version":3,"file":"PlBtnLink.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/PlBtnLink/PlBtnLink.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport \"./pl-btn-link.scss\";\nimport type { MaskIconName16, Size } from \"../../types\";\nimport BtnSecondary from \"../PlBtnSecondary/PlBtnSecondary.vue\";\nimport { ref } from \"vue\";\n\nconst props = defineProps<{\n /**\n * If `true,` the button is disabled, cannot be interacted with, and shows a special 'loading' icon.\n */\n loading?: boolean;\n /**\n * Size of the button, the default value is 'medium'\n */\n size?: Size;\n /**\n * Icon to display\n */\n icon?: MaskIconName16;\n /**\n * If `true`, an icon is displayed before the text.\n */\n reverse?: boolean;\n /**\n * Justify text at the center (is `true` by default)\n */\n justifyCenter?: boolean;\n /**\n * If `true`, the button is disabled and cannot be interacted with.\n */\n disabled?: boolean;\n}>();\n\nconst hover = ref(false);\n</script>\n\n<template>\n <div\n data-testid=\"pl-btn-link\"\n class=\"ui-btn-link\"\n :class=\"{ disabled, loading, hover }\"\n @mouseover=\"hover = true\"\n @mouseleave=\"hover = false\"\n >\n <BtnSecondary data-testid=\"pl-btn-link-button\" round :hover=\"hover\" v-bind=\"props\" />\n <slot />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;EAMA,IAAM,IAAQ,GA2BR,IAAQ,EAAI,GAAM;yBAItB,EASM,OAAA;GARJ,eAAY;GACZ,OAAK,EAAA,CAAC,eAAa;IAAA,UACT,EAAA;IAAQ,SAAE,EAAA;IAAO,OAAE,EAAA;IAAK,CAAA,CAAA;GACjC,aAAS,AAAA,EAAA,QAAA,MAAE,EAAA,QAAK;GAChB,cAAU,AAAA,EAAA,QAAA,MAAE,EAAA,QAAK;MAElB,EAAqF,GAArF,EAAqF;GAAvE,eAAY;GAAqB,OAAA;GAAO,OAAO,EAAA;KAAe,EAAK,EAAA,MAAA,IAAA,CAAA,QAAA,CAAA,EACjF,EAAQ,EAAA,QAAA,UAAA,CAAA,EAAA,GAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"PlBtnPrimary.js","names":[],"sources":["../../../src/components/PlBtnPrimary/PlBtnPrimary.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Primary button\n */\nexport default {\n name: \"PlBtnPrimary\",\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport \"./pl-btn-primary.scss\";\nimport type { MaskIconName16, Size } from \"../../types\";\nimport BtnBase from \"../../base/BtnBase.vue\";\n\nconst props = defineProps<{\n /**\n * If `true,` the button is disabled, cannot be interacted with, and shows a special 'loading' icon.\n */\n loading?: boolean;\n /**\n * Size of the button, the default value is 'medium'\n */\n size?: Size;\n /**\n * If `true` the shape is round.\n */\n round?: boolean;\n /**\n * Icon to display\n */\n icon?: MaskIconName16;\n /**\n * If `true`, an icon is displayed before the text.\n */\n reverse?: boolean;\n /**\n * Justify text at the center\n */\n justifyCenter?: boolean;\n}>();\n</script>\n\n<template>\n <BtnBase class=\"pl-btn-primary\" v-bind=\"props\">\n <slot />\n </BtnBase>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"PlBtnPrimary.js","names":[],"sources":["../../../src/components/PlBtnPrimary/PlBtnPrimary.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Primary button\n */\nexport default {\n name: \"PlBtnPrimary\",\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport \"./pl-btn-primary.scss\";\nimport type { MaskIconName16, Size } from \"../../types\";\nimport BtnBase from \"../../base/BtnBase.vue\";\n\nconst props = defineProps<{\n /**\n * If `true,` the button is disabled, cannot be interacted with, and shows a special 'loading' icon.\n */\n loading?: boolean;\n /**\n * Size of the button, the default value is 'medium'\n */\n size?: Size;\n /**\n * If `true` the shape is round.\n */\n round?: boolean;\n /**\n * Icon to display\n */\n icon?: MaskIconName16;\n /**\n * If `true`, an icon is displayed before the text.\n */\n reverse?: boolean;\n /**\n * Justify text at the center\n */\n justifyCenter?: boolean;\n}>();\n</script>\n\n<template>\n <BtnBase data-testid=\"pl-btn-primary\" class=\"pl-btn-primary\" v-bind=\"props\">\n <slot />\n </BtnBase>\n</template>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"PlBtnPrimary.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PlBtnPrimary/PlBtnPrimary.vue"],"names":[],"mappings":"AAkDA,OAAO,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAIxD;;GAEG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAKzC,QAAA,MAAM,YAAY;IAEhB;;OAEG;cACO,OAAO;IACjB;;OAEG;WACI,IAAI;IACX;;OAEG;YACK,OAAO;IACf;;OAEG;WACI,cAAc;IACrB;;OAEG;cACO,OAAO;IACjB;;OAEG;oBACa,OAAO;;IAvBvB;;OAEG;cACO,OAAO;IACjB;;OAEG;WACI,IAAI;IACX;;OAEG;YACK,OAAO;IACf;;OAEG;WACI,cAAc;IACrB;;OAEG;cACO,OAAO;IACjB;;OAEG;oBACa,OAAO;;cAoCX,CAAC,KAAK,IAAgB,KAAK,GAAG;EAOxC,CAAC;AACL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"PlBtnPrimary.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PlBtnPrimary/PlBtnPrimary.vue"],"names":[],"mappings":"AAkDA,OAAO,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAIxD;;GAEG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAKzC,QAAA,MAAM,YAAY;IAEhB;;OAEG;cACO,OAAO;IACjB;;OAEG;WACI,IAAI;IACX;;OAEG;YACK,OAAO;IACf;;OAEG;WACI,cAAc;IACrB;;OAEG;cACO,OAAO;IACjB;;OAEG;oBACa,OAAO;;IAvBvB;;OAEG;cACO,OAAO;IACjB;;OAEG;WACI,IAAI;IACX;;OAEG;YACK,OAAO;IACf;;OAEG;WACI,cAAc;IACrB;;OAEG;cACO,OAAO;IACjB;;OAEG;oBACa,OAAO;;cAsCX,CAAC,KAAK,IAAgB,KAAK,GAAG;EAOxC,CAAC;AACL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -13,7 +13,10 @@ var s = /* @__PURE__ */ n({
13
13
  },
14
14
  setup(n) {
15
15
  let s = n;
16
- return (n, c) => (i(), t(e, r({ class: "pl-btn-primary" }, s), {
16
+ return (n, c) => (i(), t(e, r({
17
+ "data-testid": "pl-btn-primary",
18
+ class: "pl-btn-primary"
19
+ }, s), {
17
20
  default: o(() => [a(n.$slots, "default")]),
18
21
  _: 3
19
22
  }, 16));
@@ -1 +1 @@
1
- {"version":3,"file":"PlBtnPrimary.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/PlBtnPrimary/PlBtnPrimary.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Primary button\n */\nexport default {\n name: \"PlBtnPrimary\",\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport \"./pl-btn-primary.scss\";\nimport type { MaskIconName16, Size } from \"../../types\";\nimport BtnBase from \"../../base/BtnBase.vue\";\n\nconst props = defineProps<{\n /**\n * If `true,` the button is disabled, cannot be interacted with, and shows a special 'loading' icon.\n */\n loading?: boolean;\n /**\n * Size of the button, the default value is 'medium'\n */\n size?: Size;\n /**\n * If `true` the shape is round.\n */\n round?: boolean;\n /**\n * Icon to display\n */\n icon?: MaskIconName16;\n /**\n * If `true`, an icon is displayed before the text.\n */\n reverse?: boolean;\n /**\n * Justify text at the center\n */\n justifyCenter?: boolean;\n}>();\n</script>\n\n<template>\n <BtnBase class=\"pl-btn-primary\" v-bind=\"props\">\n <slot />\n </BtnBase>\n</template>\n"],"mappings":";;;;CAKE,MAAM;;;;;;;;;;EASR,IAAM,IAAQ;yBA6BZ,EAEU,GAFV,EAEU,EAFD,OAAM,kBAAgB,EAAS,EAAK,EAAA;oBACnC,CAAR,EAAQ,EAAA,QAAA,UAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"PlBtnPrimary.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/PlBtnPrimary/PlBtnPrimary.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Primary button\n */\nexport default {\n name: \"PlBtnPrimary\",\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport \"./pl-btn-primary.scss\";\nimport type { MaskIconName16, Size } from \"../../types\";\nimport BtnBase from \"../../base/BtnBase.vue\";\n\nconst props = defineProps<{\n /**\n * If `true,` the button is disabled, cannot be interacted with, and shows a special 'loading' icon.\n */\n loading?: boolean;\n /**\n * Size of the button, the default value is 'medium'\n */\n size?: Size;\n /**\n * If `true` the shape is round.\n */\n round?: boolean;\n /**\n * Icon to display\n */\n icon?: MaskIconName16;\n /**\n * If `true`, an icon is displayed before the text.\n */\n reverse?: boolean;\n /**\n * Justify text at the center\n */\n justifyCenter?: boolean;\n}>();\n</script>\n\n<template>\n <BtnBase data-testid=\"pl-btn-primary\" class=\"pl-btn-primary\" v-bind=\"props\">\n <slot />\n </BtnBase>\n</template>\n"],"mappings":";;;;CAKE,MAAM;;;;;;;;;;EASR,IAAM,IAAQ;yBA6BZ,EAEU,GAFV,EAEU;GAFD,eAAY;GAAiB,OAAM;KAAyB,EAAK,EAAA;oBAChE,CAAR,EAAQ,EAAA,QAAA,UAAA,CAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"PlBtnSecondary.js","names":[],"sources":["../../../src/components/PlBtnSecondary/PlBtnSecondary.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Secondary button\n */\nexport default {\n name: \"PlBtnSecondary\",\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport \"./pl-btn-secondary.scss\";\nimport type { MaskIconName16, Size } from \"../../types\";\nimport BtnBase from \"../../base/BtnBase.vue\";\n\nconst props = defineProps<{\n /**\n * If `true,` the button is disabled, cannot be interacted with, and shows a special 'loading' icon.\n */\n loading?: boolean;\n /**\n * Size of the button, the default value is 'medium'\n */\n size?: Size;\n /**\n * If `true` the shape is round.\n */\n round?: boolean;\n /**\n * Icon to display\n */\n icon?: MaskIconName16;\n /**\n * If `true`, an icon is displayed before the text.\n */\n reverse?: boolean;\n /**\n * Justify text at the center\n */\n justifyCenter?: boolean;\n}>();\n</script>\n\n<template>\n <BtnBase v-bind=\"props\" class=\"pl-btn-secondary\">\n <slot />\n </BtnBase>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"PlBtnSecondary.js","names":[],"sources":["../../../src/components/PlBtnSecondary/PlBtnSecondary.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Secondary button\n */\nexport default {\n name: \"PlBtnSecondary\",\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport \"./pl-btn-secondary.scss\";\nimport type { MaskIconName16, Size } from \"../../types\";\nimport BtnBase from \"../../base/BtnBase.vue\";\n\nconst props = defineProps<{\n /**\n * If `true,` the button is disabled, cannot be interacted with, and shows a special 'loading' icon.\n */\n loading?: boolean;\n /**\n * Size of the button, the default value is 'medium'\n */\n size?: Size;\n /**\n * If `true` the shape is round.\n */\n round?: boolean;\n /**\n * Icon to display\n */\n icon?: MaskIconName16;\n /**\n * If `true`, an icon is displayed before the text.\n */\n reverse?: boolean;\n /**\n * Justify text at the center\n */\n justifyCenter?: boolean;\n}>();\n</script>\n\n<template>\n <BtnBase data-testid=\"pl-btn-secondary\" v-bind=\"props\" class=\"pl-btn-secondary\">\n <slot />\n </BtnBase>\n</template>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"PlBtnSecondary.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PlBtnSecondary/PlBtnSecondary.vue"],"names":[],"mappings":"AAkDA,OAAO,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAIxD;;GAEG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAKzC,QAAA,MAAM,YAAY;IAEhB;;OAEG;cACO,OAAO;IACjB;;OAEG;WACI,IAAI;IACX;;OAEG;YACK,OAAO;IACf;;OAEG;WACI,cAAc;IACrB;;OAEG;cACO,OAAO;IACjB;;OAEG;oBACa,OAAO;;IAvBvB;;OAEG;cACO,OAAO;IACjB;;OAEG;WACI,IAAI;IACX;;OAEG;YACK,OAAO;IACf;;OAEG;WACI,cAAc;IACrB;;OAEG;cACO,OAAO;IACjB;;OAEG;oBACa,OAAO;;cAoCX,CAAC,KAAK,IAAgB,KAAK,GAAG;EAOxC,CAAC;AACL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"PlBtnSecondary.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PlBtnSecondary/PlBtnSecondary.vue"],"names":[],"mappings":"AAkDA,OAAO,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAIxD;;GAEG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAKzC,QAAA,MAAM,YAAY;IAEhB;;OAEG;cACO,OAAO;IACjB;;OAEG;WACI,IAAI;IACX;;OAEG;YACK,OAAO;IACf;;OAEG;WACI,cAAc;IACrB;;OAEG;cACO,OAAO;IACjB;;OAEG;oBACa,OAAO;;IAvBvB;;OAEG;cACO,OAAO;IACjB;;OAEG;WACI,IAAI;IACX;;OAEG;YACK,OAAO;IACf;;OAEG;WACI,cAAc;IACrB;;OAEG;cACO,OAAO;IACjB;;OAEG;oBACa,OAAO;;cAsCX,CAAC,KAAK,IAAgB,KAAK,GAAG;EAOxC,CAAC;AACL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -13,7 +13,7 @@ var s = /* @__PURE__ */ n({
13
13
  },
14
14
  setup(n) {
15
15
  let s = n;
16
- return (n, c) => (i(), t(e, r(s, { class: "pl-btn-secondary" }), {
16
+ return (n, c) => (i(), t(e, r({ "data-testid": "pl-btn-secondary" }, s, { class: "pl-btn-secondary" }), {
17
17
  default: o(() => [a(n.$slots, "default")]),
18
18
  _: 3
19
19
  }, 16));
@@ -1 +1 @@
1
- {"version":3,"file":"PlBtnSecondary.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/PlBtnSecondary/PlBtnSecondary.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Secondary button\n */\nexport default {\n name: \"PlBtnSecondary\",\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport \"./pl-btn-secondary.scss\";\nimport type { MaskIconName16, Size } from \"../../types\";\nimport BtnBase from \"../../base/BtnBase.vue\";\n\nconst props = defineProps<{\n /**\n * If `true,` the button is disabled, cannot be interacted with, and shows a special 'loading' icon.\n */\n loading?: boolean;\n /**\n * Size of the button, the default value is 'medium'\n */\n size?: Size;\n /**\n * If `true` the shape is round.\n */\n round?: boolean;\n /**\n * Icon to display\n */\n icon?: MaskIconName16;\n /**\n * If `true`, an icon is displayed before the text.\n */\n reverse?: boolean;\n /**\n * Justify text at the center\n */\n justifyCenter?: boolean;\n}>();\n</script>\n\n<template>\n <BtnBase v-bind=\"props\" class=\"pl-btn-secondary\">\n <slot />\n </BtnBase>\n</template>\n"],"mappings":";;;;CAKE,MAAM;;;;;;;;;;EASR,IAAM,IAAQ;yBA6BZ,EAEU,GAFV,EAAiB,GAAK,EAAE,OAAM,oBAAkB,CAAA,EAAA;oBACtC,CAAR,EAAQ,EAAA,QAAA,UAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"PlBtnSecondary.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/PlBtnSecondary/PlBtnSecondary.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Secondary button\n */\nexport default {\n name: \"PlBtnSecondary\",\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport \"./pl-btn-secondary.scss\";\nimport type { MaskIconName16, Size } from \"../../types\";\nimport BtnBase from \"../../base/BtnBase.vue\";\n\nconst props = defineProps<{\n /**\n * If `true,` the button is disabled, cannot be interacted with, and shows a special 'loading' icon.\n */\n loading?: boolean;\n /**\n * Size of the button, the default value is 'medium'\n */\n size?: Size;\n /**\n * If `true` the shape is round.\n */\n round?: boolean;\n /**\n * Icon to display\n */\n icon?: MaskIconName16;\n /**\n * If `true`, an icon is displayed before the text.\n */\n reverse?: boolean;\n /**\n * Justify text at the center\n */\n justifyCenter?: boolean;\n}>();\n</script>\n\n<template>\n <BtnBase data-testid=\"pl-btn-secondary\" v-bind=\"props\" class=\"pl-btn-secondary\">\n <slot />\n </BtnBase>\n</template>\n"],"mappings":";;;;CAKE,MAAM;;;;;;;;;;EASR,IAAM,IAAQ;yBA6BZ,EAEU,GAFV,EAEU,EAFD,eAAY,oBAAkB,EAAS,GAAK,EAAE,OAAM,oBAAkB,CAAA,EAAA;oBACrE,CAAR,EAAQ,EAAA,QAAA,UAAA,CAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"PlBtnSplit.js","names":[],"sources":["../../../src/components/PlBtnSplit/PlBtnSplit.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"M = unknown\">\nimport { deepEqual } from \"@milaboratories/helpers\";\nimport { computed, reactive, ref, unref, watch } from \"vue\";\nimport { useElementPosition } from \"../../composition/usePosition\";\nimport { normalizeListOptions } from \"../../helpers/utils\";\nimport type { ListOption } from \"../../types\";\nimport DropdownListItem from \"../DropdownListItem.vue\";\nimport { PlIcon16 } from \"../PlIcon16\";\n\nimport \"./pl-btn-split.scss\";\n\nconst props = defineProps<{\n /**\n * List of available options for the dropdown menu\n */\n options?: Readonly<ListOption<M>[]>;\n\n /**\n * If `true`, the dropdown component is disabled and cannot be interacted with.\n */\n disabled?: boolean;\n\n /**\n * If `true,` the button is disabled, cannot be interacted with, and shows a special 'loading' icon.\n */\n loading?: boolean;\n}>();\n\nconst emits = defineEmits([\"click\"]);\n\nconst model = defineModel<M>({ required: true });\n\nconst root = ref<HTMLElement | undefined>();\nconst list = ref<HTMLElement | undefined>();\nconst menuActivator = ref<HTMLElement | undefined>();\nconst buttonAction = ref<HTMLElement | undefined>();\n\nconst data = reactive({\n open: false,\n optionsHeight: 0,\n activeIndex: -1,\n});\n\ndefineExpose({\n data,\n});\n\nconst optionsStyle = reactive({\n top: \"0px\",\n left: \"0px\",\n width: \"0px\",\n});\n\nwatch(\n list,\n (el) => {\n if (el) {\n const rect = el.getBoundingClientRect();\n data.optionsHeight = rect.height;\n window.dispatchEvent(new CustomEvent(\"adjust\"));\n }\n },\n { immediate: true },\n);\n\nconst iconName = computed(() => (data.open ? \"chevron-up\" : \"chevron-down\"));\n\nconst selectedIndex = computed(() => {\n return (props.options ?? []).findIndex((o) => deepEqual(o.value, model.value));\n});\n\nconst items = computed(() =>\n normalizeListOptions(props.options ?? []).map((opt, index) => ({\n ...opt,\n index,\n isSelected: index === selectedIndex.value,\n isActive: index === data.activeIndex,\n })),\n);\n\nconst isLoadingOptions = computed(() => props.loading || props.options === undefined);\n\nconst actionName = computed(\n () =>\n items.value.find((o) => deepEqual(o.value, model.value))?.label ??\n (props.options === undefined ? \"...\" : \"\"),\n);\n\nuseElementPosition(root, (pos) => {\n const focusWidth = 3;\n\n const downTopOffset = pos.top + pos.height + focusWidth;\n\n if (downTopOffset + data.optionsHeight > pos.clientHeight) {\n optionsStyle.top = pos.top - data.optionsHeight - focusWidth + \"px\";\n } else {\n optionsStyle.top = downTopOffset + \"px\";\n }\n\n optionsStyle.left = pos.left + \"px\";\n optionsStyle.width = pos.width + \"px\";\n});\n\nconst selectOption = (v: M | undefined) => {\n model.value = v!;\n data.open = false;\n root?.value?.focus();\n};\n\nfunction emitEnter() {\n emits(\"click\");\n}\n\nconst handleKeydown = (e: {\n code: string;\n preventDefault(): void;\n stopPropagation(): void;\n target: EventTarget | null;\n}) => {\n if (![\"ArrowDown\", \"ArrowUp\", \"Enter\", \"Escape\"].includes(e.code)) {\n return;\n } else {\n e.preventDefault();\n }\n\n if (e.target === buttonAction.value && e.code === \"Enter\") {\n emitEnter();\n return;\n }\n\n const { open, activeIndex } = data;\n\n if (!open && e.target === menuActivator.value) {\n if (e.code === \"Enter\") {\n data.open = true;\n }\n return;\n }\n\n if (e.code === \"Escape\") {\n data.open = false;\n root.value?.focus();\n }\n\n const filtered = unref(items);\n\n const { length } = filtered;\n\n if (!length) {\n return;\n }\n\n if (e.code === \"Enter\") {\n selectOption(filtered.find((it) => it.index === activeIndex)?.value);\n }\n\n const localIndex = filtered.findIndex((it) => it.index === activeIndex) ?? -1;\n\n const delta = e.code === \"ArrowDown\" ? 1 : e.code === \"ArrowUp\" ? -1 : 0;\n\n const newIndex = Math.abs(localIndex + delta + length) % length;\n\n data.activeIndex = items.value[newIndex].index ?? -1;\n};\n\nconst onFocusOut = (event: FocusEvent) => {\n const relatedTarget = event.relatedTarget as Node | null;\n\n if (!root.value?.contains(relatedTarget) && !list.value?.contains(relatedTarget)) {\n data.open = false;\n }\n};\n</script>\n<template>\n <div\n ref=\"root\"\n :class=\"{ disabled: disabled || isLoadingOptions, loading: isLoadingOptions }\"\n class=\"pl-btn-split d-flex\"\n @focusout=\"onFocusOut\"\n @keydown=\"handleKeydown\"\n >\n <div\n ref=\"buttonAction\"\n class=\"pl-btn-split__title flex-grow-1 d-flex align-center text-s-btn\"\n tabindex=\"0\"\n @click=\"emitEnter\"\n @keyup.stop.enter=\"emitEnter\"\n >\n {{ actionName }}\n </div>\n <div\n ref=\"menuActivator\"\n class=\"pl-btn-split__icon-container d-flex align-center justify-center\"\n tabindex=\"0\"\n @click=\"data.open = !data.open\"\n >\n <PlIcon16 v-if=\"isLoadingOptions\" name=\"loading\" />\n <PlIcon16 v-else :name=\"iconName\" class=\"pl-btn-split__icon\" />\n </div>\n\n <Teleport v-if=\"data.open\" to=\"body\">\n <div ref=\"list\" class=\"pl-dropdown__options\" :style=\"optionsStyle\" tabindex=\"-1\">\n <DropdownListItem\n v-for=\"(item, index) in items\"\n :key=\"index\"\n :option=\"item\"\n :is-selected=\"item.isSelected\"\n :is-hovered=\"item.isActive\"\n :size=\"'medium'\"\n @click.stop=\"selectOption(item.value)\"\n />\n </div>\n </Teleport>\n </div>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"PlBtnSplit.js","names":[],"sources":["../../../src/components/PlBtnSplit/PlBtnSplit.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"M = unknown\">\nimport { deepEqual } from \"@milaboratories/helpers\";\nimport { computed, reactive, ref, unref, watch } from \"vue\";\nimport { useElementPosition } from \"../../composition/usePosition\";\nimport { normalizeListOptions } from \"../../helpers/utils\";\nimport type { ListOption } from \"../../types\";\nimport DropdownListItem from \"../DropdownListItem.vue\";\nimport { PlIcon16 } from \"../PlIcon16\";\n\nimport \"./pl-btn-split.scss\";\n\nconst props = defineProps<{\n /**\n * List of available options for the dropdown menu\n */\n options?: Readonly<ListOption<M>[]>;\n\n /**\n * If `true`, the dropdown component is disabled and cannot be interacted with.\n */\n disabled?: boolean;\n\n /**\n * If `true,` the button is disabled, cannot be interacted with, and shows a special 'loading' icon.\n */\n loading?: boolean;\n}>();\n\nconst emits = defineEmits([\"click\"]);\n\nconst model = defineModel<M>({ required: true });\n\nconst root = ref<HTMLElement | undefined>();\nconst list = ref<HTMLElement | undefined>();\nconst menuActivator = ref<HTMLElement | undefined>();\nconst buttonAction = ref<HTMLElement | undefined>();\n\nconst data = reactive({\n open: false,\n optionsHeight: 0,\n activeIndex: -1,\n});\n\ndefineExpose({\n data,\n});\n\nconst optionsStyle = reactive({\n top: \"0px\",\n left: \"0px\",\n width: \"0px\",\n});\n\nwatch(\n list,\n (el) => {\n if (el) {\n const rect = el.getBoundingClientRect();\n data.optionsHeight = rect.height;\n window.dispatchEvent(new CustomEvent(\"adjust\"));\n }\n },\n { immediate: true },\n);\n\nconst iconName = computed(() => (data.open ? \"chevron-up\" : \"chevron-down\"));\n\nconst selectedIndex = computed(() => {\n return (props.options ?? []).findIndex((o) => deepEqual(o.value, model.value));\n});\n\nconst items = computed(() =>\n normalizeListOptions(props.options ?? []).map((opt, index) => ({\n ...opt,\n index,\n isSelected: index === selectedIndex.value,\n isActive: index === data.activeIndex,\n })),\n);\n\nconst isLoadingOptions = computed(() => props.loading || props.options === undefined);\n\nconst actionName = computed(\n () =>\n items.value.find((o) => deepEqual(o.value, model.value))?.label ??\n (props.options === undefined ? \"...\" : \"\"),\n);\n\nuseElementPosition(root, (pos) => {\n const focusWidth = 3;\n\n const downTopOffset = pos.top + pos.height + focusWidth;\n\n if (downTopOffset + data.optionsHeight > pos.clientHeight) {\n optionsStyle.top = pos.top - data.optionsHeight - focusWidth + \"px\";\n } else {\n optionsStyle.top = downTopOffset + \"px\";\n }\n\n optionsStyle.left = pos.left + \"px\";\n optionsStyle.width = pos.width + \"px\";\n});\n\nconst selectOption = (v: M | undefined) => {\n model.value = v!;\n data.open = false;\n root?.value?.focus();\n};\n\nfunction emitEnter() {\n emits(\"click\");\n}\n\nconst handleKeydown = (e: {\n code: string;\n preventDefault(): void;\n stopPropagation(): void;\n target: EventTarget | null;\n}) => {\n if (![\"ArrowDown\", \"ArrowUp\", \"Enter\", \"Escape\"].includes(e.code)) {\n return;\n } else {\n e.preventDefault();\n }\n\n if (e.target === buttonAction.value && e.code === \"Enter\") {\n emitEnter();\n return;\n }\n\n const { open, activeIndex } = data;\n\n if (!open && e.target === menuActivator.value) {\n if (e.code === \"Enter\") {\n data.open = true;\n }\n return;\n }\n\n if (e.code === \"Escape\") {\n data.open = false;\n root.value?.focus();\n }\n\n const filtered = unref(items);\n\n const { length } = filtered;\n\n if (!length) {\n return;\n }\n\n if (e.code === \"Enter\") {\n selectOption(filtered.find((it) => it.index === activeIndex)?.value);\n }\n\n const localIndex = filtered.findIndex((it) => it.index === activeIndex) ?? -1;\n\n const delta = e.code === \"ArrowDown\" ? 1 : e.code === \"ArrowUp\" ? -1 : 0;\n\n const newIndex = Math.abs(localIndex + delta + length) % length;\n\n data.activeIndex = items.value[newIndex].index ?? -1;\n};\n\nconst onFocusOut = (event: FocusEvent) => {\n const relatedTarget = event.relatedTarget as Node | null;\n\n if (!root.value?.contains(relatedTarget) && !list.value?.contains(relatedTarget)) {\n data.open = false;\n }\n};\n</script>\n<template>\n <div\n ref=\"root\"\n :class=\"{ disabled: disabled || isLoadingOptions, loading: isLoadingOptions }\"\n data-testid=\"pl-btn-split\"\n class=\"pl-btn-split d-flex\"\n @focusout=\"onFocusOut\"\n @keydown=\"handleKeydown\"\n >\n <div\n ref=\"buttonAction\"\n data-testid=\"pl-btn-split-action\"\n class=\"pl-btn-split__title flex-grow-1 d-flex align-center text-s-btn\"\n tabindex=\"0\"\n @click=\"emitEnter\"\n @keyup.stop.enter=\"emitEnter\"\n >\n {{ actionName }}\n </div>\n <div\n ref=\"menuActivator\"\n data-testid=\"pl-btn-split-toggle\"\n class=\"pl-btn-split__icon-container d-flex align-center justify-center\"\n tabindex=\"0\"\n @click=\"data.open = !data.open\"\n >\n <PlIcon16 v-if=\"isLoadingOptions\" data-testid=\"pl-btn-split-loading\" name=\"loading\" />\n <PlIcon16 v-else :name=\"iconName\" class=\"pl-btn-split__icon\" />\n </div>\n\n <Teleport v-if=\"data.open\" to=\"body\">\n <div\n ref=\"list\"\n data-testid=\"pl-btn-split-menu\"\n class=\"pl-dropdown__options\"\n :style=\"optionsStyle\"\n tabindex=\"-1\"\n >\n <DropdownListItem\n v-for=\"(item, index) in items\"\n data-testid=\"pl-btn-split-option\"\n :key=\"index\"\n :option=\"item\"\n :is-selected=\"item.isSelected\"\n :is-hovered=\"item.isActive\"\n :size=\"'medium'\"\n @click.stop=\"selectOption(item.value)\"\n />\n </div>\n </Teleport>\n </div>\n</template>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"PlBtnSplit.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PlBtnSplit/PlBtnSplit.vue"],"names":[],"mappings":"AA8NA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAI9C,OAAO,qBAAqB,CAAC;AAE7B,QAAA,MAAM,YAAY,GAAK,CAAC,GAAG,OAAO,EACjC,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,gBAAgB,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EAClE;WA6UO,OAAO,KAAK,EAAE,WAAW,GAAG,mBAAmB,CAAC;QA3UtD;;WAEG;kBACO,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;QAEnC;;WAEG;mBACQ,OAAO;QAElB;;WAEG;kBACO,OAAO;;oBAwJP,CAAC;;;;KAsK8E,CAAC,GAAG,CAAC,OAAO,UAAU,SAAS;QAAE,oBAAoB,EAAE,MAAM,CAAC,CAAA;KAAE,GAAG,CAAC,GAAG,EAAE,CAAC;YAC5J,CAAC,OAAO,EAAE,OAAO,KAAK,EAAE,gBAAgB;;;;;;MAAsB,KAAK,IAAI;WACxE,GAAG;WACH,EAAE;UACH,6FAAqC;EAExC,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,WAAW,CAAC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AAgB;;;;;;MAAsB,KAAK,IAAI;WACxE,GAAG;WACH,EAAE;UACH,6FAAqC;EAExC,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAA;CAAI,CAAC;wBACpE,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,CAAC,GAAG,EAAE,CAAC"}
@@ -83,12 +83,14 @@ var E = ["onKeyup"], D = /* @__PURE__ */ d({
83
83
  disabled: d.disabled || B.value,
84
84
  loading: B.value
85
85
  }, "pl-btn-split d-flex"]),
86
+ "data-testid": "pl-btn-split",
86
87
  onFocusout: G,
87
88
  onKeydown: W
88
89
  }, [
89
90
  u("div", {
90
91
  ref_key: "buttonAction",
91
92
  ref: P,
93
+ "data-testid": "pl-btn-split-action",
92
94
  class: "pl-btn-split__title flex-grow-1 d-flex align-center text-s-btn",
93
95
  tabindex: "0",
94
96
  onClick: U,
@@ -97,11 +99,13 @@ var E = ["onKeyup"], D = /* @__PURE__ */ d({
97
99
  u("div", {
98
100
  ref_key: "menuActivator",
99
101
  ref: N,
102
+ "data-testid": "pl-btn-split-toggle",
100
103
  class: "pl-btn-split__icon-container d-flex align-center justify-center",
101
104
  tabindex: "0",
102
105
  onClick: r[0] ||= (e) => F.open = !F.open
103
106
  }, [B.value ? (h(), s(b(n), {
104
107
  key: 0,
108
+ "data-testid": "pl-btn-split-loading",
105
109
  name: "loading"
106
110
  })) : (h(), s(b(n), {
107
111
  key: 1,
@@ -114,10 +118,12 @@ var E = ["onKeyup"], D = /* @__PURE__ */ d({
114
118
  }, [u("div", {
115
119
  ref_key: "list",
116
120
  ref: M,
121
+ "data-testid": "pl-btn-split-menu",
117
122
  class: "pl-dropdown__options",
118
123
  style: m(I),
119
124
  tabindex: "-1"
120
125
  }, [(h(!0), l(i, null, v(z.value, (t, n) => (h(), s(e, {
126
+ "data-testid": "pl-btn-split-option",
121
127
  key: n,
122
128
  option: t,
123
129
  "is-selected": t.isSelected,
@@ -1 +1 @@
1
- {"version":3,"file":"PlBtnSplit.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/PlBtnSplit/PlBtnSplit.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"M = unknown\">\nimport { deepEqual } from \"@milaboratories/helpers\";\nimport { computed, reactive, ref, unref, watch } from \"vue\";\nimport { useElementPosition } from \"../../composition/usePosition\";\nimport { normalizeListOptions } from \"../../helpers/utils\";\nimport type { ListOption } from \"../../types\";\nimport DropdownListItem from \"../DropdownListItem.vue\";\nimport { PlIcon16 } from \"../PlIcon16\";\n\nimport \"./pl-btn-split.scss\";\n\nconst props = defineProps<{\n /**\n * List of available options for the dropdown menu\n */\n options?: Readonly<ListOption<M>[]>;\n\n /**\n * If `true`, the dropdown component is disabled and cannot be interacted with.\n */\n disabled?: boolean;\n\n /**\n * If `true,` the button is disabled, cannot be interacted with, and shows a special 'loading' icon.\n */\n loading?: boolean;\n}>();\n\nconst emits = defineEmits([\"click\"]);\n\nconst model = defineModel<M>({ required: true });\n\nconst root = ref<HTMLElement | undefined>();\nconst list = ref<HTMLElement | undefined>();\nconst menuActivator = ref<HTMLElement | undefined>();\nconst buttonAction = ref<HTMLElement | undefined>();\n\nconst data = reactive({\n open: false,\n optionsHeight: 0,\n activeIndex: -1,\n});\n\ndefineExpose({\n data,\n});\n\nconst optionsStyle = reactive({\n top: \"0px\",\n left: \"0px\",\n width: \"0px\",\n});\n\nwatch(\n list,\n (el) => {\n if (el) {\n const rect = el.getBoundingClientRect();\n data.optionsHeight = rect.height;\n window.dispatchEvent(new CustomEvent(\"adjust\"));\n }\n },\n { immediate: true },\n);\n\nconst iconName = computed(() => (data.open ? \"chevron-up\" : \"chevron-down\"));\n\nconst selectedIndex = computed(() => {\n return (props.options ?? []).findIndex((o) => deepEqual(o.value, model.value));\n});\n\nconst items = computed(() =>\n normalizeListOptions(props.options ?? []).map((opt, index) => ({\n ...opt,\n index,\n isSelected: index === selectedIndex.value,\n isActive: index === data.activeIndex,\n })),\n);\n\nconst isLoadingOptions = computed(() => props.loading || props.options === undefined);\n\nconst actionName = computed(\n () =>\n items.value.find((o) => deepEqual(o.value, model.value))?.label ??\n (props.options === undefined ? \"...\" : \"\"),\n);\n\nuseElementPosition(root, (pos) => {\n const focusWidth = 3;\n\n const downTopOffset = pos.top + pos.height + focusWidth;\n\n if (downTopOffset + data.optionsHeight > pos.clientHeight) {\n optionsStyle.top = pos.top - data.optionsHeight - focusWidth + \"px\";\n } else {\n optionsStyle.top = downTopOffset + \"px\";\n }\n\n optionsStyle.left = pos.left + \"px\";\n optionsStyle.width = pos.width + \"px\";\n});\n\nconst selectOption = (v: M | undefined) => {\n model.value = v!;\n data.open = false;\n root?.value?.focus();\n};\n\nfunction emitEnter() {\n emits(\"click\");\n}\n\nconst handleKeydown = (e: {\n code: string;\n preventDefault(): void;\n stopPropagation(): void;\n target: EventTarget | null;\n}) => {\n if (![\"ArrowDown\", \"ArrowUp\", \"Enter\", \"Escape\"].includes(e.code)) {\n return;\n } else {\n e.preventDefault();\n }\n\n if (e.target === buttonAction.value && e.code === \"Enter\") {\n emitEnter();\n return;\n }\n\n const { open, activeIndex } = data;\n\n if (!open && e.target === menuActivator.value) {\n if (e.code === \"Enter\") {\n data.open = true;\n }\n return;\n }\n\n if (e.code === \"Escape\") {\n data.open = false;\n root.value?.focus();\n }\n\n const filtered = unref(items);\n\n const { length } = filtered;\n\n if (!length) {\n return;\n }\n\n if (e.code === \"Enter\") {\n selectOption(filtered.find((it) => it.index === activeIndex)?.value);\n }\n\n const localIndex = filtered.findIndex((it) => it.index === activeIndex) ?? -1;\n\n const delta = e.code === \"ArrowDown\" ? 1 : e.code === \"ArrowUp\" ? -1 : 0;\n\n const newIndex = Math.abs(localIndex + delta + length) % length;\n\n data.activeIndex = items.value[newIndex].index ?? -1;\n};\n\nconst onFocusOut = (event: FocusEvent) => {\n const relatedTarget = event.relatedTarget as Node | null;\n\n if (!root.value?.contains(relatedTarget) && !list.value?.contains(relatedTarget)) {\n data.open = false;\n }\n};\n</script>\n<template>\n <div\n ref=\"root\"\n :class=\"{ disabled: disabled || isLoadingOptions, loading: isLoadingOptions }\"\n class=\"pl-btn-split d-flex\"\n @focusout=\"onFocusOut\"\n @keydown=\"handleKeydown\"\n >\n <div\n ref=\"buttonAction\"\n class=\"pl-btn-split__title flex-grow-1 d-flex align-center text-s-btn\"\n tabindex=\"0\"\n @click=\"emitEnter\"\n @keyup.stop.enter=\"emitEnter\"\n >\n {{ actionName }}\n </div>\n <div\n ref=\"menuActivator\"\n class=\"pl-btn-split__icon-container d-flex align-center justify-center\"\n tabindex=\"0\"\n @click=\"data.open = !data.open\"\n >\n <PlIcon16 v-if=\"isLoadingOptions\" name=\"loading\" />\n <PlIcon16 v-else :name=\"iconName\" class=\"pl-btn-split__icon\" />\n </div>\n\n <Teleport v-if=\"data.open\" to=\"body\">\n <div ref=\"list\" class=\"pl-dropdown__options\" :style=\"optionsStyle\" tabindex=\"-1\">\n <DropdownListItem\n v-for=\"(item, index) in items\"\n :key=\"index\"\n :option=\"item\"\n :is-selected=\"item.isSelected\"\n :is-hovered=\"item.isActive\"\n :size=\"'medium'\"\n @click.stop=\"selectOption(item.value)\"\n />\n </div>\n </Teleport>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EAWA,IAAM,IAAQ,GAiBR,IAAQ,GAER,IAAQ,EAAc,GAAA,aAAoB,EAE1C,IAAO,GAA8B,EACrC,IAAO,GAA8B,EACrC,IAAgB,GAA8B,EAC9C,IAAe,GAA8B,EAE7C,IAAO,EAAS;GACpB,MAAM;G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AM;IACN,UAAS;IACR,SAAK,AAAA,EAAA,QAAA,MAAE,EAAK,OAAI,CAAI,EAAK;OAEV,EAAA,SAAA,GAAA,EAAhB,EAAmD,EAAA,EAAA,EAAA;;IAAjB,MAAK;eACvC,EAA+D,EAAA,EAAA,EAAA;;IAA7C,MAAM,EAAA;IAAU,OAAM;;GAG1B,EAAK,QAAA,GAAA,EAArB,EAYW,GAAA;;IAZgB,IAAG;OAC5B,EAUM,OAAA;aAVG;IAAJ,KAAI;IAAO,OAAM;IAAwB,OAAK,EAAE,EAAY;IAAE,UAAS;eAC1E,EAQE,GAAA,MAAA,EAPwB,EAAA,QAAhB,GAAM,YADhB,EAQE,GAAA;IANC,KAAK;IACL,QAAQ;IACR,eAAa,EAAK;IAClB,cAAY,EAAK;IACjB,MAAM;IACN,SAAK,GAAA,MAAO,EAAa,EAAK,MAAK,EAAA,CAAA,OAAA,CAAA"}
1
+ {"version":3,"file":"PlBtnSplit.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/PlBtnSplit/PlBtnSplit.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"M = unknown\">\nimport { deepEqual } from \"@milaboratories/helpers\";\nimport { computed, reactive, ref, unref, watch } from \"vue\";\nimport { useElementPosition } from \"../../composition/usePosition\";\nimport { normalizeListOptions } from \"../../helpers/utils\";\nimport type { ListOption } from \"../../types\";\nimport DropdownListItem from \"../DropdownListItem.vue\";\nimport { PlIcon16 } from \"../PlIcon16\";\n\nimport \"./pl-btn-split.scss\";\n\nconst props = defineProps<{\n /**\n * List of available options for the dropdown menu\n */\n options?: Readonly<ListOption<M>[]>;\n\n /**\n * If `true`, the dropdown component is disabled and cannot be interacted with.\n */\n disabled?: boolean;\n\n /**\n * If `true,` the button is disabled, cannot be interacted with, and shows a special 'loading' icon.\n */\n loading?: boolean;\n}>();\n\nconst emits = defineEmits([\"click\"]);\n\nconst model = defineModel<M>({ required: true });\n\nconst root = ref<HTMLElement | undefined>();\nconst list = ref<HTMLElement | undefined>();\nconst menuActivator = ref<HTMLElement | undefined>();\nconst buttonAction = ref<HTMLElement | undefined>();\n\nconst data = reactive({\n open: false,\n optionsHeight: 0,\n activeIndex: -1,\n});\n\ndefineExpose({\n data,\n});\n\nconst optionsStyle = reactive({\n top: \"0px\",\n left: \"0px\",\n width: \"0px\",\n});\n\nwatch(\n list,\n (el) => {\n if (el) {\n const rect = el.getBoundingClientRect();\n data.optionsHeight = rect.height;\n window.dispatchEvent(new CustomEvent(\"adjust\"));\n }\n },\n { immediate: true },\n);\n\nconst iconName = computed(() => (data.open ? \"chevron-up\" : \"chevron-down\"));\n\nconst selectedIndex = computed(() => {\n return (props.options ?? []).findIndex((o) => deepEqual(o.value, model.value));\n});\n\nconst items = computed(() =>\n normalizeListOptions(props.options ?? []).map((opt, index) => ({\n ...opt,\n index,\n isSelected: index === selectedIndex.value,\n isActive: index === data.activeIndex,\n })),\n);\n\nconst isLoadingOptions = computed(() => props.loading || props.options === undefined);\n\nconst actionName = computed(\n () =>\n items.value.find((o) => deepEqual(o.value, model.value))?.label ??\n (props.options === undefined ? \"...\" : \"\"),\n);\n\nuseElementPosition(root, (pos) => {\n const focusWidth = 3;\n\n const downTopOffset = pos.top + pos.height + focusWidth;\n\n if (downTopOffset + data.optionsHeight > pos.clientHeight) {\n optionsStyle.top = pos.top - data.optionsHeight - focusWidth + \"px\";\n } else {\n optionsStyle.top = downTopOffset + \"px\";\n }\n\n optionsStyle.left = pos.left + \"px\";\n optionsStyle.width = pos.width + \"px\";\n});\n\nconst selectOption = (v: M | undefined) => {\n model.value = v!;\n data.open = false;\n root?.value?.focus();\n};\n\nfunction emitEnter() {\n emits(\"click\");\n}\n\nconst handleKeydown = (e: {\n code: string;\n preventDefault(): void;\n stopPropagation(): void;\n target: EventTarget | null;\n}) => {\n if (![\"ArrowDown\", \"ArrowUp\", \"Enter\", \"Escape\"].includes(e.code)) {\n return;\n } else {\n e.preventDefault();\n }\n\n if (e.target === buttonAction.value && e.code === \"Enter\") {\n emitEnter();\n return;\n }\n\n const { open, activeIndex } = data;\n\n if (!open && e.target === menuActivator.value) {\n if (e.code === \"Enter\") {\n data.open = true;\n }\n return;\n }\n\n if (e.code === \"Escape\") {\n data.open = false;\n root.value?.focus();\n }\n\n const filtered = unref(items);\n\n const { length } = filtered;\n\n if (!length) {\n return;\n }\n\n if (e.code === \"Enter\") {\n selectOption(filtered.find((it) => it.index === activeIndex)?.value);\n }\n\n const localIndex = filtered.findIndex((it) => it.index === activeIndex) ?? -1;\n\n const delta = e.code === \"ArrowDown\" ? 1 : e.code === \"ArrowUp\" ? -1 : 0;\n\n const newIndex = Math.abs(localIndex + delta + length) % length;\n\n data.activeIndex = items.value[newIndex].index ?? -1;\n};\n\nconst onFocusOut = (event: FocusEvent) => {\n const relatedTarget = event.relatedTarget as Node | null;\n\n if (!root.value?.contains(relatedTarget) && !list.value?.contains(relatedTarget)) {\n data.open = false;\n }\n};\n</script>\n<template>\n <div\n ref=\"root\"\n :class=\"{ disabled: disabled || isLoadingOptions, loading: isLoadingOptions }\"\n data-testid=\"pl-btn-split\"\n class=\"pl-btn-split d-flex\"\n @focusout=\"onFocusOut\"\n @keydown=\"handleKeydown\"\n >\n <div\n ref=\"buttonAction\"\n data-testid=\"pl-btn-split-action\"\n class=\"pl-btn-split__title flex-grow-1 d-flex align-center text-s-btn\"\n tabindex=\"0\"\n @click=\"emitEnter\"\n @keyup.stop.enter=\"emitEnter\"\n >\n {{ actionName }}\n </div>\n <div\n ref=\"menuActivator\"\n data-testid=\"pl-btn-split-toggle\"\n class=\"pl-btn-split__icon-container d-flex align-center justify-center\"\n tabindex=\"0\"\n @click=\"data.open = !data.open\"\n >\n <PlIcon16 v-if=\"isLoadingOptions\" data-testid=\"pl-btn-split-loading\" name=\"loading\" />\n <PlIcon16 v-else :name=\"iconName\" class=\"pl-btn-split__icon\" />\n </div>\n\n <Teleport v-if=\"data.open\" to=\"body\">\n <div\n ref=\"list\"\n data-testid=\"pl-btn-split-menu\"\n class=\"pl-dropdown__options\"\n :style=\"optionsStyle\"\n tabindex=\"-1\"\n >\n <DropdownListItem\n v-for=\"(item, index) in items\"\n data-testid=\"pl-btn-split-option\"\n :key=\"index\"\n :option=\"item\"\n :is-selected=\"item.isSelected\"\n :is-hovered=\"item.isActive\"\n :size=\"'medium'\"\n @click.stop=\"selectOption(item.value)\"\n />\n </div>\n </Teleport>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EAWA,IAAM,IAAQ,GAiBR,IAAQ,GAER,IAAQ,EAAc,GAAA,aAAoB,EAE1C,IAAO,GAA8B,EACrC,IAAO,GAA8B,EACrC,IAAgB,GAA8B,EAC9C,IAAe,GAA8B,EAE7C,IAAO,EAAS;GACpB,MAAM;GACN,eAAe;GACf,aAAa;GACd,CAAC;AAEF,IAAa,EACX,SACD,CAAC;EAEF,IAAM,IAAe,EAAS;GAC5B,KAAK;GACL,MAAM;GACN,OAAO;GACR,CAAC;AAEF,IACE,IACC,MAAO;AACN,GAAI,MAEF,EAAK,gBADQ,EAAG,uBAAuB,CACb,QAC1B,OAAO,cAAc,IAAI,YAAY,SAAS,CAAC;KAGnD,EAAE,WAAW,IAAM,CACpB;EAED,IAAM,IAAW,QAAgB,EAAK,OAAO,eAAe,eAAgB,EAEtE,IAAgB,SACZ,EAAM,WAAW,EAAE,EAAE,WAAW,MAAM,EAAU,EAAE,OAAO,EAAM,MAAM,CAAC,CAC9E,EAEI,IAAQ,QACZ,EAAqB,EAAM,WAAW,EAAE,CAAC,CAAC,KAAK,GAAK,OAAW;GAC7D,GAAG;GACH;GACA,YAAY,MAAU,EAAc;GACpC,UAAU,MAAU,EAAK;GAC1B,EAAE,CACJ,EAEK,IAAmB,QAAe,EAAM,WAAW,EAAM,YAAY,KAAA,EAAU,EAE/E,IAAa,QAEf,EAAM,MAAM,MAAM,MAAM,EAAU,EAAE,OAAO,EAAM,MAAM,CAAC,EAAE,UACzD,EAAM,YAAY,KAAA,IAAY,QAAQ,IAC1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,OAAO,SAAS,EAAc,IAAI,CAAC,EAAK,OAAO,SAAS,EAAc,KAC9E,EAAK,OAAO;;yBAKd,EAiDM,OAAA;YAhDA;GAAJ,KAAI;GACH,OAAK,EAAA,CAAA;IAAA,UAAc,EAAA,YAAY,EAAA;IAAgB,SAAW,EAAA;IAAgB,EAErE,sBAAqB,CAAA;GAD3B,eAAY;GAEX,YAAU;GACV,WAAS;;GAEV,EASM,OAAA;aARA;IAAJ,KAAI;IACJ,eAAY;IACZ,OAAM;IACN,UAAS;IACR,SAAO;IACP,SAAK,EAAA,EAAa,GAAS,CAAA,OAAA,CAAA,EAAA,CAAA,QAAA,CAAA;QAEzB,EAAA,MAAU,EAAA,IAAA,EAAA;GAEf,EASM,OAAA;aARA;IAAJ,KAAI;IACJ,eAAY;IACZ,OAAM;IACN,UAAS;IACR,SAAK,AAAA,EAAA,QAAA,MAAE,EAAK,OAAI,CAAI,EAAK;OAEV,EAAA,SAAA,GAAA,EAAhB,EAAsF,EAAA,EAAA,EAAA;;IAApD,eAAY;IAAuB,MAAK;eAC1E,EAA+D,EAAA,EAAA,EAAA;;IAA7C,MAAM,EAAA;IAAU,OAAM;;GAG1B,EAAK,QAAA,GAAA,EAArB,EAmBW,GAAA;;IAnBgB,IAAG;OAC5B,EAiBM,OAAA;aAhBA;IAAJ,KAAI;IACJ,eAAY;IACZ,OAAM;IACL,OAAK,EAAE,EAAY;IACpB,UAAS;eAET,EASE,GAAA,MAAA,EARwB,EAAA,QAAhB,GAAM,YADhB,EASE,GAAA;IAPA,eAAY;IACX,KAAK;IACL,QAAQ;IACR,eAAa,EAAK;IAClB,cAAY,EAAK;IACjB,MAAM;IACN,SAAK,GAAA,MAAO,EAAa,EAAK,MAAK,EAAA,CAAA,OAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"PlChartHistogram.js","names":[],"sources":["../../../src/components/PlChartHistogram/PlChartHistogram.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed, onMounted, ref, watch } from \"vue\";\nimport { createHistogramFromBins, createHistogramLinear, createHistogramLog } from \"./histogram\";\nimport type { ChartOptions, PlChartHistogramSettings } from \"./types\";\n\nconst props = defineProps<{\n settings: PlChartHistogramSettings;\n}>();\n\nconst chart = ref<HTMLElement>();\n\nconst options = computed<ChartOptions>(() => {\n const {\n xAxisLabel,\n yAxisLabel,\n threshold,\n compact,\n totalWidth = 674,\n totalHeight = 252,\n } = props.settings;\n\n const margin = compact\n ? { top: 0, right: 0, bottom: 0, left: 0 }\n : { top: 0, right: 30, bottom: 40, left: 85 };\n const width = totalWidth - margin.left - margin.right;\n const height = totalHeight - margin.top - margin.bottom;\n\n return {\n width,\n height,\n margin,\n compact,\n nBins: \"nBins\" in props.settings ? props.settings.nBins : 10,\n xAxisLabel: xAxisLabel,\n yAxisLabel: yAxisLabel,\n threshold: threshold,\n };\n});\n\nconst createHistogram = () => {\n const settings = props.settings;\n\n if (settings.type === \"log-bins\") {\n createHistogramFromBins(chart.value!, options.value, settings.bins);\n return;\n }\n\n if (settings.log) {\n createHistogramLog(chart.value!, options.value, settings.numbers);\n } else {\n createHistogramLinear(chart.value!, options.value, settings.numbers);\n }\n};\n\nwatch(props, createHistogram);\n\nonMounted(createHistogram);\n</script>\n\n<template>\n <div :class=\"$style.component\">\n <div v-if=\"settings.title && !settings.compact\" :class=\"$style.title\">{{ settings.title }}</div>\n <div ref=\"chart\" />\n </div>\n</template>\n\n<style module>\n.component {\n display: flex;\n flex-direction: column;\n gap: 24px;\n svg {\n font-family: var(--font-family-base);\n }\n}\n\n.title {\n font-size: 20px;\n font-weight: 500;\n line-height: 24px; /* 120% */\n letter-spacing: -0.2px;\n}\n\n:global(.svg-tooltip) {\n font-family: var(--font-family-base);\n background: rgba(69, 77, 93, 0.9);\n border-radius: 0.1rem;\n color: #fff;\n display: block;\n font-size: 14px;\n max-width: 320px;\n padding: 0.2rem 0.4rem;\n position: absolute;\n text-overflow: ellipsis;\n white-space: pre;\n z-index: 300;\n visibility: hidden;\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"PlChartHistogram.js","names":[],"sources":["../../../src/components/PlChartHistogram/PlChartHistogram.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed, onMounted, ref, watch } from \"vue\";\nimport { createHistogramFromBins, createHistogramLinear, createHistogramLog } from \"./histogram\";\nimport type { ChartOptions, PlChartHistogramSettings } from \"./types\";\n\nconst props = defineProps<{\n settings: PlChartHistogramSettings;\n}>();\n\nconst chart = ref<HTMLElement>();\n\nconst options = computed<ChartOptions>(() => {\n const {\n xAxisLabel,\n yAxisLabel,\n threshold,\n compact,\n totalWidth = 674,\n totalHeight = 252,\n } = props.settings;\n\n const margin = compact\n ? { top: 0, right: 0, bottom: 0, left: 0 }\n : { top: 0, right: 30, bottom: 40, left: 85 };\n const width = totalWidth - margin.left - margin.right;\n const height = totalHeight - margin.top - margin.bottom;\n\n return {\n width,\n height,\n margin,\n compact,\n nBins: \"nBins\" in props.settings ? props.settings.nBins : 10,\n xAxisLabel: xAxisLabel,\n yAxisLabel: yAxisLabel,\n threshold: threshold,\n };\n});\n\nconst createHistogram = () => {\n const settings = props.settings;\n\n if (settings.type === \"log-bins\") {\n createHistogramFromBins(chart.value!, options.value, settings.bins);\n return;\n }\n\n if (settings.log) {\n createHistogramLog(chart.value!, options.value, settings.numbers);\n } else {\n createHistogramLinear(chart.value!, options.value, settings.numbers);\n }\n};\n\nwatch(props, createHistogram);\n\nonMounted(createHistogram);\n</script>\n\n<template>\n <div data-testid=\"pl-chart-histogram\" :class=\"$style.component\">\n <div\n v-if=\"settings.title && !settings.compact\"\n data-testid=\"pl-chart-histogram-title\"\n :class=\"$style.title\"\n >\n {{ settings.title }}\n </div>\n <div ref=\"chart\" data-testid=\"pl-chart-histogram-chart\" />\n </div>\n</template>\n\n<style module>\n.component {\n display: flex;\n flex-direction: column;\n gap: 24px;\n svg {\n font-family: var(--font-family-base);\n }\n}\n\n.title {\n font-size: 20px;\n font-weight: 500;\n line-height: 24px; /* 120% */\n letter-spacing: -0.2px;\n}\n\n:global(.svg-tooltip) {\n font-family: var(--font-family-base);\n background: rgba(69, 77, 93, 0.9);\n border-radius: 0.1rem;\n color: #fff;\n display: block;\n font-size: 14px;\n max-width: 320px;\n padding: 0.2rem 0.4rem;\n position: absolute;\n text-overflow: ellipsis;\n white-space: pre;\n z-index: 300;\n visibility: hidden;\n}\n</style>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"PlChartHistogram.vue_vue_type_style_index_0_lang.module.js","names":[],"sources":["../../../src/components/PlChartHistogram/PlChartHistogram.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed, onMounted, ref, watch } from \"vue\";\nimport { createHistogramFromBins, createHistogramLinear, createHistogramLog } from \"./histogram\";\nimport type { ChartOptions, PlChartHistogramSettings } from \"./types\";\n\nconst props = defineProps<{\n settings: PlChartHistogramSettings;\n}>();\n\nconst chart = ref<HTMLElement>();\n\nconst options = computed<ChartOptions>(() => {\n const {\n xAxisLabel,\n yAxisLabel,\n threshold,\n compact,\n totalWidth = 674,\n totalHeight = 252,\n } = props.settings;\n\n const margin = compact\n ? { top: 0, right: 0, bottom: 0, left: 0 }\n : { top: 0, right: 30, bottom: 40, left: 85 };\n const width = totalWidth - margin.left - margin.right;\n const height = totalHeight - margin.top - margin.bottom;\n\n return {\n width,\n height,\n margin,\n compact,\n nBins: \"nBins\" in props.settings ? props.settings.nBins : 10,\n xAxisLabel: xAxisLabel,\n yAxisLabel: yAxisLabel,\n threshold: threshold,\n };\n});\n\nconst createHistogram = () => {\n const settings = props.settings;\n\n if (settings.type === \"log-bins\") {\n createHistogramFromBins(chart.value!, options.value, settings.bins);\n return;\n }\n\n if (settings.log) {\n createHistogramLog(chart.value!, options.value, settings.numbers);\n } else {\n createHistogramLinear(chart.value!, options.value, settings.numbers);\n }\n};\n\nwatch(props, createHistogram);\n\nonMounted(createHistogram);\n</script>\n\n<template>\n <div :class=\"$style.component\">\n <div v-if=\"settings.title && !settings.compact\" :class=\"$style.title\">{{ settings.title }}</div>\n <div ref=\"chart\" />\n </div>\n</template>\n\n<style module>\n.component {\n display: flex;\n flex-direction: column;\n gap: 24px;\n svg {\n font-family: var(--font-family-base);\n }\n}\n\n.title {\n font-size: 20px;\n font-weight: 500;\n line-height: 24px; /* 120% */\n letter-spacing: -0.2px;\n}\n\n:global(.svg-tooltip) {\n font-family: var(--font-family-base);\n background: rgba(69, 77, 93, 0.9);\n border-radius: 0.1rem;\n color: #fff;\n display: block;\n font-size: 14px;\n max-width: 320px;\n padding: 0.2rem 0.4rem;\n position: absolute;\n text-overflow: ellipsis;\n white-space: pre;\n z-index: 300;\n visibility: hidden;\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"PlChartHistogram.vue_vue_type_style_index_0_lang.module.js","names":[],"sources":["../../../src/components/PlChartHistogram/PlChartHistogram.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed, onMounted, ref, watch } from \"vue\";\nimport { createHistogramFromBins, createHistogramLinear, createHistogramLog } from \"./histogram\";\nimport type { ChartOptions, PlChartHistogramSettings } from \"./types\";\n\nconst props = defineProps<{\n settings: PlChartHistogramSettings;\n}>();\n\nconst chart = ref<HTMLElement>();\n\nconst options = computed<ChartOptions>(() => {\n const {\n xAxisLabel,\n yAxisLabel,\n threshold,\n compact,\n totalWidth = 674,\n totalHeight = 252,\n } = props.settings;\n\n const margin = compact\n ? { top: 0, right: 0, bottom: 0, left: 0 }\n : { top: 0, right: 30, bottom: 40, left: 85 };\n const width = totalWidth - margin.left - margin.right;\n const height = totalHeight - margin.top - margin.bottom;\n\n return {\n width,\n height,\n margin,\n compact,\n nBins: \"nBins\" in props.settings ? props.settings.nBins : 10,\n xAxisLabel: xAxisLabel,\n yAxisLabel: yAxisLabel,\n threshold: threshold,\n };\n});\n\nconst createHistogram = () => {\n const settings = props.settings;\n\n if (settings.type === \"log-bins\") {\n createHistogramFromBins(chart.value!, options.value, settings.bins);\n return;\n }\n\n if (settings.log) {\n createHistogramLog(chart.value!, options.value, settings.numbers);\n } else {\n createHistogramLinear(chart.value!, options.value, settings.numbers);\n }\n};\n\nwatch(props, createHistogram);\n\nonMounted(createHistogram);\n</script>\n\n<template>\n <div data-testid=\"pl-chart-histogram\" :class=\"$style.component\">\n <div\n v-if=\"settings.title && !settings.compact\"\n data-testid=\"pl-chart-histogram-title\"\n :class=\"$style.title\"\n >\n {{ settings.title }}\n </div>\n <div ref=\"chart\" data-testid=\"pl-chart-histogram-chart\" />\n </div>\n</template>\n\n<style module>\n.component {\n display: flex;\n flex-direction: column;\n gap: 24px;\n svg {\n font-family: var(--font-family-base);\n }\n}\n\n.title {\n font-size: 20px;\n font-weight: 500;\n line-height: 24px; /* 120% */\n letter-spacing: -0.2px;\n}\n\n:global(.svg-tooltip) {\n font-family: var(--font-family-base);\n background: rgba(69, 77, 93, 0.9);\n border-radius: 0.1rem;\n color: #fff;\n display: block;\n font-size: 14px;\n max-width: 320px;\n padding: 0.2rem 0.4rem;\n position: absolute;\n text-overflow: ellipsis;\n white-space: pre;\n z-index: 300;\n visibility: hidden;\n}\n</style>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"PlChartHistogram.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PlChartHistogram/PlChartHistogram.vue"],"names":[],"mappings":"AAwGA,OAAO,KAAK,EAAgB,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEtE,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,wBAAwB,CAAC;CACpC,CAAC;AA0FF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"PlChartHistogram.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PlChartHistogram/PlChartHistogram.vue"],"names":[],"mappings":"AA8GA,OAAO,KAAK,EAAgB,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEtE,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,wBAAwB,CAAC;CACpC,CAAC;AA6FF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -35,12 +35,17 @@ var m = /* @__PURE__ */ s({
35
35
  }
36
36
  r.log ? n(h.value, g.value, r.numbers) : t(h.value, g.value, r.numbers);
37
37
  };
38
- return p(m, _), l(_), (e, t) => (u(), a("div", { class: c(e.$style.component) }, [s.settings.title && !s.settings.compact ? (u(), a("div", {
38
+ return p(m, _), l(_), (e, t) => (u(), a("div", {
39
+ "data-testid": "pl-chart-histogram",
40
+ class: c(e.$style.component)
41
+ }, [s.settings.title && !s.settings.compact ? (u(), a("div", {
39
42
  key: 0,
43
+ "data-testid": "pl-chart-histogram-title",
40
44
  class: c(e.$style.title)
41
45
  }, f(s.settings.title), 3)) : i("", !0), o("div", {
42
46
  ref_key: "chart",
43
- ref: h
47
+ ref: h,
48
+ "data-testid": "pl-chart-histogram-chart"
44
49
  }, null, 512)], 2));
45
50
  }
46
51
  });
@@ -1 +1 @@
1
- {"version":3,"file":"PlChartHistogram.vue_vue_type_script_setup_true_lang.js","names":["$style"],"sources":["../../../src/components/PlChartHistogram/PlChartHistogram.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed, onMounted, ref, watch } from \"vue\";\nimport { createHistogramFromBins, createHistogramLinear, createHistogramLog } from \"./histogram\";\nimport type { ChartOptions, PlChartHistogramSettings } from \"./types\";\n\nconst props = defineProps<{\n settings: PlChartHistogramSettings;\n}>();\n\nconst chart = ref<HTMLElement>();\n\nconst options = computed<ChartOptions>(() => {\n const {\n xAxisLabel,\n yAxisLabel,\n threshold,\n compact,\n totalWidth = 674,\n totalHeight = 252,\n } = props.settings;\n\n const margin = compact\n ? { top: 0, right: 0, bottom: 0, left: 0 }\n : { top: 0, right: 30, bottom: 40, left: 85 };\n const width = totalWidth - margin.left - margin.right;\n const height = totalHeight - margin.top - margin.bottom;\n\n return {\n width,\n height,\n margin,\n compact,\n nBins: \"nBins\" in props.settings ? props.settings.nBins : 10,\n xAxisLabel: xAxisLabel,\n yAxisLabel: yAxisLabel,\n threshold: threshold,\n };\n});\n\nconst createHistogram = () => {\n const settings = props.settings;\n\n if (settings.type === \"log-bins\") {\n createHistogramFromBins(chart.value!, options.value, settings.bins);\n return;\n }\n\n if (settings.log) {\n createHistogramLog(chart.value!, options.value, settings.numbers);\n } else {\n createHistogramLinear(chart.value!, options.value, settings.numbers);\n }\n};\n\nwatch(props, createHistogram);\n\nonMounted(createHistogram);\n</script>\n\n<template>\n <div :class=\"$style.component\">\n <div v-if=\"settings.title && !settings.compact\" :class=\"$style.title\">{{ settings.title }}</div>\n <div ref=\"chart\" />\n </div>\n</template>\n\n<style module>\n.component {\n display: flex;\n flex-direction: column;\n gap: 24px;\n svg {\n font-family: var(--font-family-base);\n }\n}\n\n.title {\n font-size: 20px;\n font-weight: 500;\n line-height: 24px; /* 120% */\n letter-spacing: -0.2px;\n}\n\n:global(.svg-tooltip) {\n font-family: var(--font-family-base);\n background: rgba(69, 77, 93, 0.9);\n border-radius: 0.1rem;\n color: #fff;\n display: block;\n font-size: 14px;\n max-width: 320px;\n padding: 0.2rem 0.4rem;\n position: absolute;\n text-overflow: ellipsis;\n white-space: pre;\n z-index: 300;\n visibility: hidden;\n}\n</style>\n"],"mappings":";;;;;;;EAKA,IAAM,IAAQ,GAIR,IAAQ,GAAkB,EAE1B,IAAU,QAA6B;GAC3C,IAAM,EACJ,eACA,eACA,cACA,YACA,gBAAa,KACb,iBAAc,QACZ,EAAM,UAEJ,IAAS,IACX;IAAE,KAAK;IAAG,OAAO;IAAG,QAAQ;IAAG,MAAM;IAAE,GACvC;IAAE,KAAK;IAAG,OAAO;IAAI,QAAQ;IAAI,MAAM;IAAI;AAI/C,UAAO;IACL,OAJY,IAAa,EAAO,OAAO,EAAO;IAK9C,QAJa,IAAc,EAAO,MAAM,EAAO;IAK/C;IACA;IACA,OAAO,WAAW,EAAM,WAAW,EAAM,SAAS,QAAQ;IAC9C;IACA;IACD;IACZ;IACD,EAEI,UAAwB;GAC5B,IAAM,IAAW,EAAM;AAEvB,OAAI,EAAS,SAAS,YAAY;AAChC,MAAwB,EAAM,OAAQ,EAAQ,OAAO,EAAS,KAAK;AACnE;;AAGF,GAAI,EAAS,MACX,EAAmB,EAAM,OAAQ,EAAQ,OAAO,EAAS,QAAQ,GAEjE,EAAsB,EAAM,OAAQ,EAAQ,OAAO,EAAS,QAAQ;;SAIxE,EAAM,GAAO,EAAgB,EAE7B,EAAU,EAAgB,kBAIxB,EAGM,OAAA,EAHA,OAAK,EAAEA,EAAAA,OAAO,UAAS,EAAA,EAAA,CAChB,EAAA,SAAS,SAAK,CAAK,EAAA,SAAS,WAAA,GAAA,EAAvC,EAAgG,OAAA;;GAA/C,OAAK,EAAEA,EAAAA,OAAO,MAAK;OAAK,EAAA,SAAS,MAAK,EAAA,EAAA,IAAA,EAAA,IAAA,GAAA,EACvF,EAAmB,OAAA;YAAV;GAAJ,KAAI"}
1
+ {"version":3,"file":"PlChartHistogram.vue_vue_type_script_setup_true_lang.js","names":["$style"],"sources":["../../../src/components/PlChartHistogram/PlChartHistogram.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed, onMounted, ref, watch } from \"vue\";\nimport { createHistogramFromBins, createHistogramLinear, createHistogramLog } from \"./histogram\";\nimport type { ChartOptions, PlChartHistogramSettings } from \"./types\";\n\nconst props = defineProps<{\n settings: PlChartHistogramSettings;\n}>();\n\nconst chart = ref<HTMLElement>();\n\nconst options = computed<ChartOptions>(() => {\n const {\n xAxisLabel,\n yAxisLabel,\n threshold,\n compact,\n totalWidth = 674,\n totalHeight = 252,\n } = props.settings;\n\n const margin = compact\n ? { top: 0, right: 0, bottom: 0, left: 0 }\n : { top: 0, right: 30, bottom: 40, left: 85 };\n const width = totalWidth - margin.left - margin.right;\n const height = totalHeight - margin.top - margin.bottom;\n\n return {\n width,\n height,\n margin,\n compact,\n nBins: \"nBins\" in props.settings ? props.settings.nBins : 10,\n xAxisLabel: xAxisLabel,\n yAxisLabel: yAxisLabel,\n threshold: threshold,\n };\n});\n\nconst createHistogram = () => {\n const settings = props.settings;\n\n if (settings.type === \"log-bins\") {\n createHistogramFromBins(chart.value!, options.value, settings.bins);\n return;\n }\n\n if (settings.log) {\n createHistogramLog(chart.value!, options.value, settings.numbers);\n } else {\n createHistogramLinear(chart.value!, options.value, settings.numbers);\n }\n};\n\nwatch(props, createHistogram);\n\nonMounted(createHistogram);\n</script>\n\n<template>\n <div data-testid=\"pl-chart-histogram\" :class=\"$style.component\">\n <div\n v-if=\"settings.title && !settings.compact\"\n data-testid=\"pl-chart-histogram-title\"\n :class=\"$style.title\"\n >\n {{ settings.title }}\n </div>\n <div ref=\"chart\" data-testid=\"pl-chart-histogram-chart\" />\n </div>\n</template>\n\n<style module>\n.component {\n display: flex;\n flex-direction: column;\n gap: 24px;\n svg {\n font-family: var(--font-family-base);\n }\n}\n\n.title {\n font-size: 20px;\n font-weight: 500;\n line-height: 24px; /* 120% */\n letter-spacing: -0.2px;\n}\n\n:global(.svg-tooltip) {\n font-family: var(--font-family-base);\n background: rgba(69, 77, 93, 0.9);\n border-radius: 0.1rem;\n color: #fff;\n display: block;\n font-size: 14px;\n max-width: 320px;\n padding: 0.2rem 0.4rem;\n position: absolute;\n text-overflow: ellipsis;\n white-space: pre;\n z-index: 300;\n visibility: hidden;\n}\n</style>\n"],"mappings":";;;;;;;EAKA,IAAM,IAAQ,GAIR,IAAQ,GAAkB,EAE1B,IAAU,QAA6B;GAC3C,IAAM,EACJ,eACA,eACA,cACA,YACA,gBAAa,KACb,iBAAc,QACZ,EAAM,UAEJ,IAAS,IACX;IAAE,KAAK;IAAG,OAAO;IAAG,QAAQ;IAAG,MAAM;IAAE,GACvC;IAAE,KAAK;IAAG,OAAO;IAAI,QAAQ;IAAI,MAAM;IAAI;AAI/C,UAAO;IACL,OAJY,IAAa,EAAO,OAAO,EAAO;IAK9C,QAJa,IAAc,EAAO,MAAM,EAAO;I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AW,CAAC,KAAK,IAAI,CAAC,WAAW,CAAC,QAwCpD"}
1
+ {"version":3,"file":"createGridlines.d.ts","sourceRoot":"","sources":["../../../src/components/PlChartHistogram/createGridlines.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAI5C,wBAAgB,eAAe,CAC7B,GAAG,EAAE,SAAS,CAAC,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,CAAC,EACrD,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC,WAAW,CAAC,QA0CpD"}
@@ -9,7 +9,7 @@ function r(r, i, a, o) {
9
9
  function u() {
10
10
  return o(t(a.x));
11
11
  }
12
- r.append("g").attr("class", "grid").attr("font-family", "'Manrope', sans-serif").call(l().tickSize(-s).tickFormat(() => "")), r.append("g").attr("class", "grid").attr("font-family", "'Manrope', sans-serif").attr("transform", `translate(0,${c})`).call(u().tickSize(-c).tickFormat(() => "")), e(".grid line").style("stroke", "#E1E3EB").style("opacity", .7);
12
+ r.append("g").attr("class", "grid").attr("data-testid", "pl-chart-histogram-grid").attr("font-family", "'Manrope', sans-serif").call(l().tickSize(-s).tickFormat(() => "")), r.append("g").attr("class", "grid").attr("data-testid", "pl-chart-histogram-grid").attr("font-family", "'Manrope', sans-serif").attr("transform", `translate(0,${c})`).call(u().tickSize(-c).tickFormat(() => "")), e(".grid line").style("stroke", "#E1E3EB").style("opacity", .7);
13
13
  }
14
14
  //#endregion
15
15
  export { r as createGridlines };