@orangelogic/design-system 2.0.0-29DUO2-beta-3 → 2.0.0-29IORR-beta-2

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 (307) hide show
  1. package/library/chunks/{AxisLabelRadial.CgPb7ghO.js → AxisLabelRadial.Bs1P_q_F.js} +1 -1
  2. package/library/chunks/{BaseColumnSeries.B6rG-Ylz.js → BaseColumnSeries.C7jwOxIJ.js} +1 -1
  3. package/library/chunks/{CandlestickSeries.C-YfO-57.js → CandlestickSeries.CkXGtRWE.js} +2 -2
  4. package/library/chunks/{Circle.DhoXSsjo.js → Circle.DBa5Ok8V.js} +1 -1
  5. package/library/chunks/{ColumnSeries.CZi2LBZ2.js → ColumnSeries.DGazbfza.js} +2 -2
  6. package/library/chunks/{EditableAxisLabel.CykTMTsG.js → EditableAxisLabel.wN0t_G2B.js} +2 -2
  7. package/library/chunks/{EditableLabel.BlQ7B4D0.js → EditableLabel.BWeq6fgX.js} +1 -1
  8. package/library/chunks/{Gradient.BQ0JzFEe.js → Gradient.CdcsPIru.js} +1 -1
  9. package/library/chunks/{LinearGradient.DuVS2EHe.js → LinearGradient.B1z9AGUt.js} +2 -2
  10. package/library/chunks/{Picture.DRO0jnR6.js → Picture.YSPC0l0Q.js} +1 -1
  11. package/library/chunks/{Polygon.DEO3f_qs.js → Polygon.BwMvXN2H.js} +1 -1
  12. package/library/chunks/{ProgressPie.Bryx2w1J.js → ProgressPie.DlCwXN17.js} +5 -5
  13. package/library/chunks/{RadialLabel.TyXECvYG.js → RadialLabel.DyVOf2K8.js} +1 -1
  14. package/library/chunks/{Scrollbar.DK48nKk4.js → Scrollbar.BdZVb_Z-.js} +1 -1
  15. package/library/chunks/{Slice.DbXRplXx.js → Slice.DiEswWa6.js} +1 -1
  16. package/library/chunks/{Slider.B27osQYu.js → Slider.C20No2z5.js} +1 -1
  17. package/library/chunks/{SpriteResizer.C4wFzD_x.js → SpriteResizer.DFnmcy0h.js} +1 -1
  18. package/library/chunks/{Triangle.BEmFiHyd.js → Triangle.BaOef7HV.js} +1 -1
  19. package/library/chunks/{ZoomTools.CBqjLDqb.js → ZoomTools.D5JPehoL.js} +1 -1
  20. package/library/chunks/{_baseUniq.Df-fLIBx.js → _baseUniq.BUihBa8c.js} +56 -53
  21. package/library/chunks/{am-chart.B_OdX4Q-.js → am-chart.H2jnOzFc.js} +254 -262
  22. package/library/chunks/{animation.DfUHRQry.js → animation.7ifl4x2S.js} +4 -8
  23. package/library/chunks/array.DCtvHiLS.js +81 -0
  24. package/library/chunks/asset.D7E0-cUV.js +460 -0
  25. package/library/chunks/{button.KnE3mcyM.js → button.CauAHfdl.js} +10 -45
  26. package/library/chunks/button.styles.CKqn956w.js +5 -0
  27. package/library/chunks/{capitalize.WSkCXkNE.js → capitalize.CNStXZBq.js} +1 -1
  28. package/library/chunks/{color-swatch-group.p3Sdqlat.js → color-swatch-group.D5BP2W3P.js} +50 -220
  29. package/library/chunks/{color-swatch.C0oPHfOu.js → color-swatch.2HS4bc3N.js} +20 -204
  30. package/library/chunks/{colorPicker.CJwbdhtn.js → colorPicker.06n6P3aK.js} +5 -5
  31. package/library/chunks/component.styles.CRO4Odto.js +5 -0
  32. package/library/chunks/confirm-popover.DmGAMS8X.js +121 -0
  33. package/library/chunks/{cropper.tSDgXKqJ.js → cropper.ZU2Dy-MM.js} +8182 -8540
  34. package/library/chunks/{dialog.DpZBbTCn.js → dialog.2UW1LNm1.js} +117 -314
  35. package/library/chunks/{dom.BQVKDNd8.js → dom.BslZF2Y_.js} +1 -1
  36. package/library/chunks/dot-pagination.DsAfSNzr.js +204 -0
  37. package/library/chunks/{endpoints.B7lcoc1N.js → endpoints.Fpyb8xvv.js} +214 -203
  38. package/library/chunks/{exporting.DCqJtW6l.js → exporting.Chnl3UWi.js} +2 -2
  39. package/library/chunks/file-on-demand.Dig_iVvx.js +1956 -0
  40. package/library/chunks/{flow.Ch1rU01m.js → flow.D2CqFQa7.js} +5 -5
  41. package/library/chunks/folder-select.BT1drT8C.js +775 -0
  42. package/library/chunks/form-control.styles.CaGWmeAS.js +5 -0
  43. package/library/chunks/{form.DgwYWi0O.js → form.CFc09rKh.js} +1 -1
  44. package/library/chunks/{gantt.rWdF_jmG.js → gantt.DSHD2gjO.js} +8 -8
  45. package/library/chunks/header.BePZwMCQ.js +170 -0
  46. package/library/chunks/{hierarchy.HoRJAu6S.js → hierarchy.DwVsMmsP.js} +5 -5
  47. package/library/chunks/{hub-connection.CfARlehM.js → hub-connection.Ot2odiCz.js} +1 -1
  48. package/library/chunks/{i18n.C0iakJkV.js → i18n.BFqTRDCA.js} +19 -12
  49. package/library/chunks/icon-button.rKe0N4VB.js +149 -0
  50. package/library/chunks/iframe.DznmlYpV.js +73 -0
  51. package/library/chunks/{image.C9avagDq.js → image.CEtCGsNL.js} +275 -488
  52. package/library/chunks/{index.D2JPKXqq.js → index.C9khsiad.js} +17 -17
  53. package/library/chunks/isObjectLike.z36Fu426.js +34 -0
  54. package/library/chunks/{isSymbol.huJ_Cvxt.js → isSymbol.L0C2ND_U.js} +1 -1
  55. package/library/chunks/{json.DHNMAC-m.js → json.zyETMOw-.js} +3 -3
  56. package/library/chunks/{list-editor.B2mFE9f7.js → list-editor.CJ96S1Np.js} +58 -372
  57. package/library/chunks/{map.BHmZ4Crx.js → map.CqM2O6LB.js} +2 -2
  58. package/library/chunks/option.COnEtd3X.js +123 -0
  59. package/library/chunks/{overlayscrollbars.XhGWx9Zk.js → overlayscrollbars.BMav4RQ4.js} +252 -958
  60. package/library/chunks/pagination.DaD9Yul6.js +334 -0
  61. package/library/chunks/{percent.CM9cr1H3.js → percent.DuQwbCCg.js} +3 -3
  62. package/library/chunks/{radar.CQUnnhGk.js → radar.FpYl3UH5.js} +4 -4
  63. package/library/chunks/{responsive.CrX-HUow.js → responsive.BndCeSg0.js} +1 -1
  64. package/library/chunks/{sliceGrouper.iv1p8MAK.js → sliceGrouper.BsE7fGMt.js} +1 -1
  65. package/library/chunks/{stock.CU0y6a5P.js → stock.BR-ag4Pt.js} +9 -9
  66. package/library/chunks/string.BigZhczf.js +185 -0
  67. package/library/chunks/{tab-group.05PY0smt.js → tab-group.0Po0eoxR.js} +33 -584
  68. package/library/chunks/{table.DNTm_GMS.js → table.WNd284in.js} +3535 -4852
  69. package/library/chunks/{timeline.yzdwtGKM.js → timeline.DkzkmgEM.js} +5 -5
  70. package/library/chunks/{toString.CRT5zqEU.js → toString.CL_lYXbK.js} +3 -3
  71. package/library/chunks/toast.B2cJgW5u.js +71 -0
  72. package/library/chunks/transformation.CzBptarI.js +140 -0
  73. package/library/chunks/{tree.CeMLCbs-.js → tree.QCQd_cuc.js} +32 -400
  74. package/library/chunks/typography.DJC_UXgs.js +52 -0
  75. package/library/chunks/url.Cj9cIQXJ.js +27 -0
  76. package/library/chunks/{venn.BOEi13la.js → venn.D739bOV3.js} +1 -1
  77. package/library/chunks/watch.BCJD77bD.js +547 -0
  78. package/library/chunks/{wc.V-lq02JF.js → wc.DzW311D-.js} +1 -1
  79. package/library/chunks/{xy.Df1hy9ac.js → xy.DCRDfTsa.js} +10 -10
  80. package/library/components/alert.js +11 -179
  81. package/library/components/am-chart.js +3 -3
  82. package/library/components/animated-image.js +13 -101
  83. package/library/components/animation.js +3 -3
  84. package/library/components/array-line-clamp.js +8 -89
  85. package/library/components/asset-link-format.js +718 -1380
  86. package/library/components/atoms.js +18 -18
  87. package/library/components/avatar.js +6 -95
  88. package/library/components/badge.js +11 -139
  89. package/library/components/bicolor-picker.js +4 -23
  90. package/library/components/border-input-group.js +5 -26
  91. package/library/components/breadcrumb-item.js +25 -156
  92. package/library/components/breadcrumb.js +4 -22
  93. package/library/components/button-group.js +3 -28
  94. package/library/components/button.js +6 -6
  95. package/library/components/card.js +4 -126
  96. package/library/components/checkbox.js +13 -254
  97. package/library/components/color-picker.js +57 -728
  98. package/library/components/color-swatch-group.js +9 -9
  99. package/library/components/color-swatch.js +5 -5
  100. package/library/components/confirm-popover.js +6 -6
  101. package/library/components/copy-button.js +11 -256
  102. package/library/components/corner-position-input-group.js +5 -58
  103. package/library/components/cropper.js +2 -2
  104. package/library/components/details.js +6 -152
  105. package/library/components/dialog.js +6 -6
  106. package/library/components/divider.js +6 -68
  107. package/library/components/dot-pagination.js +4 -4
  108. package/library/components/dot-status.js +25 -95
  109. package/library/components/drawer.js +11 -242
  110. package/library/components/dropdown.js +49 -151
  111. package/library/components/dynamic-select.js +10 -75
  112. package/library/components/e-chart.js +8 -51
  113. package/library/components/element-clamp.js +7 -80
  114. package/library/components/file-on-demand.js +13 -13
  115. package/library/components/folder-select.js +9 -7
  116. package/library/components/format-bytes.js +1 -1
  117. package/library/components/format-date.js +3 -7
  118. package/library/components/format-number.js +1 -1
  119. package/library/components/format-time.js +4 -14
  120. package/library/components/grid-item.js +5 -172
  121. package/library/components/grid.js +5 -41
  122. package/library/components/header.js +4 -4
  123. package/library/components/hub-connection.js +2 -2
  124. package/library/components/icon-button.js +14 -679
  125. package/library/components/icon.js +9 -2449
  126. package/library/components/iframe.js +4 -4
  127. package/library/components/image-comparer.js +9 -129
  128. package/library/components/image.js +4 -4
  129. package/library/components/include.js +3 -7
  130. package/library/components/input-group.js +4 -29
  131. package/library/components/input.js +358 -966
  132. package/library/components/line-clamp.js +7 -83
  133. package/library/components/list-editor.js +9 -9
  134. package/library/components/markdown.js +2 -4
  135. package/library/components/masonry.js +24 -223
  136. package/library/components/menu-item.js +155 -445
  137. package/library/components/menu-label.js +3 -20
  138. package/library/components/menu-section.js +3 -17
  139. package/library/components/menu.js +5 -113
  140. package/library/components/molecules.js +5 -5
  141. package/library/components/mutation-observer.js +3 -7
  142. package/library/components/option.js +4 -4
  143. package/library/components/organisms.js +2 -2
  144. package/library/components/padding-input-group.js +5 -16
  145. package/library/components/pagination.js +10 -8
  146. package/library/components/popup.js +385 -682
  147. package/library/components/position-picker.js +4 -94
  148. package/library/components/progress-bar.js +19 -136
  149. package/library/components/progress-ring.js +4 -95
  150. package/library/components/qr-code.js +5 -17
  151. package/library/components/radio-button.js +5 -25
  152. package/library/components/radio-card.js +8 -176
  153. package/library/components/radio-group.js +22 -153
  154. package/library/components/radio.js +14 -171
  155. package/library/components/range.js +123 -660
  156. package/library/components/rating.js +58 -238
  157. package/library/components/relative-time.js +3 -13
  158. package/library/components/resize-observer.js +4 -8
  159. package/library/components/select.js +305 -1012
  160. package/library/components/shadow-input-group.js +5 -24
  161. package/library/components/share-option-list.js +21 -313
  162. package/library/components/sidebar.js +15 -221
  163. package/library/components/size-input-group.js +12 -77
  164. package/library/components/skeleton.js +7 -80
  165. package/library/components/space.js +6 -143
  166. package/library/components/spinner.js +7 -76
  167. package/library/components/split-panel.js +18 -125
  168. package/library/components/step.js +21 -272
  169. package/library/components/stepper-wizard.js +9 -43
  170. package/library/components/stepper.js +17 -34
  171. package/library/components/switch.js +13 -276
  172. package/library/components/tab-group.js +7 -7
  173. package/library/components/tab-panel.js +5 -32
  174. package/library/components/tab.js +11 -257
  175. package/library/components/table.js +8 -8
  176. package/library/components/tag.js +15 -166
  177. package/library/components/textarea.js +183 -504
  178. package/library/components/timecode.js +6 -25
  179. package/library/components/tooltip.js +10 -94
  180. package/library/components/tree-item.js +4 -4
  181. package/library/components/tree.js +4 -4
  182. package/library/components/typeface.js +24 -123
  183. package/library/components/types.js +37225 -47339
  184. package/library/components/typography.js +2 -2
  185. package/library/components/video.js +3875 -6263
  186. package/library/components/visually-hidden.js +3 -15
  187. package/library/package.json +4 -1
  188. package/library/packages/atoms/src/components/dialog/dialog.d.ts +10 -0
  189. package/library/packages/atoms/src/components/icon-button/icon-button.d.ts +2 -1
  190. package/library/packages/atoms/src/components/image/image.d.ts +15 -1
  191. package/library/packages/atoms/src/components/input/auto-grow-controller.d.ts +23 -0
  192. package/library/packages/atoms/src/components/input/input.d.ts +10 -2
  193. package/library/packages/atoms/src/components/menu-item/menu-item.d.ts +4 -0
  194. package/library/packages/atoms/src/components/pagination/pagination.d.ts +32 -2
  195. package/library/packages/atoms/src/components/popup/overlay/Overlay.d.ts +10 -0
  196. package/library/packages/atoms/src/components/popup/popup.d.ts +1 -1
  197. package/library/packages/atoms/src/components/select/select.d.ts +11 -0
  198. package/library/packages/atoms/src/components/table/table.d.ts +49 -8
  199. package/library/packages/atoms/src/components/table/tabulator-tables/core/Tabulator.d.ts +1 -0
  200. package/library/packages/atoms/src/components/table/tabulator-tables/core/TabulatorFull.d.ts +1 -0
  201. package/library/packages/atoms/src/components/table/tabulator-tables/core/tools/DataLoader.d.ts +3 -1
  202. package/library/packages/atoms/src/components/table/tabulator-tables/modules/Ajax/Ajax.d.ts +1 -1
  203. package/library/packages/atoms/src/components/table/tabulator-tables/modules/Edit/Edit.d.ts +1 -0
  204. package/library/packages/atoms/src/components/table/tabulator-tables/modules/Edit/List.d.ts +40 -1
  205. package/library/packages/atoms/src/components/table/tabulator-tables/modules/Filter/Filter.d.ts +10 -3
  206. package/library/packages/atoms/src/components/table/tabulator-tables/modules/Filter/formatter-display-resolvers.d.ts +93 -0
  207. package/library/packages/atoms/src/components/table/tabulator-tables/modules/GroupRows/Group.d.ts +8 -0
  208. package/library/packages/atoms/src/components/table/tabulator-tables/modules/GroupRows/GroupComponent.d.ts +3 -1
  209. package/library/packages/atoms/src/components/table/tabulator-tables/modules/GroupRows/GroupLoadMore.d.ts +7 -0
  210. package/library/packages/atoms/src/components/table/tabulator-tables/modules/GroupRows/GroupRows.d.ts +2 -0
  211. package/library/packages/atoms/src/components/table/tabulator-tables/modules/Page/Page.d.ts +2 -2
  212. package/library/packages/atoms/src/components/textarea/textarea.d.ts +19 -4
  213. package/library/packages/atoms/src/components/video/video.d.ts +3 -1
  214. package/library/packages/events/src/cx-asset-transformation-dialog-cancel.d.ts +6 -0
  215. package/library/packages/events/src/cx-asset-transformation-dialog-confirm.d.ts +11 -0
  216. package/library/packages/events/src/cx-asset-transformation-dialog-delete.d.ts +6 -0
  217. package/library/packages/events/src/cx-bento-range-change.d.ts +9 -0
  218. package/library/packages/events/src/cx-content-builder-gallery-fetched.d.ts +10 -0
  219. package/library/packages/events/src/cx-lightbox-close.d.ts +6 -0
  220. package/library/packages/events/src/cx-lightbox-download.d.ts +11 -0
  221. package/library/packages/events/src/cx-unauthorized.d.ts +10 -0
  222. package/library/packages/events/src/cx-video-format-picker-delete.d.ts +6 -0
  223. package/library/packages/events/src/cx-video-format-picker-select.d.ts +8 -0
  224. package/library/packages/events/src/events.d.ts +11 -1
  225. package/library/packages/molecules/src/cropper/cropper.d.ts +2 -0
  226. package/library/packages/molecules/src/cropper/react/Cropper.d.ts +2 -0
  227. package/library/packages/molecules/src/estimated-reading-time/estimated-reading-time.d.ts +3 -2
  228. package/library/packages/molecules/src/folder-select/components/folder-select-tree/folder-select-tree.d.ts +26 -0
  229. package/library/packages/molecules/src/folder-select/components/folder-select-tree-item/folder-select-tree-item.d.ts +46 -0
  230. package/library/packages/molecules/src/folder-select/folder-select.d.ts +25 -0
  231. package/library/packages/molecules/src/index.d.ts +1 -0
  232. package/library/packages/molecules/src/storybook/storybook.d.ts +60 -23
  233. package/library/packages/molecules/src/timeline/timeline.d.ts +14 -0
  234. package/library/packages/molecules/src/video-format-picker/video-format-picker.d.ts +55 -0
  235. package/library/packages/molecules/src/video-format-picker/video-format-picker.styles.d.ts +2 -0
  236. package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +9 -1
  237. package/library/packages/organisms/src/asset-link-format/components/asset-link-format-rotation/asset-link-format-rotation.d.ts +7 -7
  238. package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.d.ts +95 -0
  239. package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.styles.d.ts +2 -0
  240. package/library/packages/organisms/src/bento-grid/bento-grid.d.ts +57 -26
  241. package/library/packages/organisms/src/bento-grid/bento-layout.d.ts +44 -0
  242. package/library/packages/organisms/src/carousel/carousel.d.ts +5 -1
  243. package/library/packages/organisms/src/comment/comment.d.ts +1 -0
  244. package/library/packages/organisms/src/content-builder/components/block-picker/block-picker.d.ts +7 -0
  245. package/library/packages/organisms/src/content-builder/components/config-form/config-form.d.ts +11 -0
  246. package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +10 -0
  247. package/library/packages/organisms/src/content-builder/components/folder-picker/folder-picker.d.ts +6 -0
  248. package/library/packages/organisms/src/content-builder/configs/carousel.d.ts +6 -2
  249. package/library/packages/organisms/src/content-builder/configs/gallery.d.ts +6 -2
  250. package/library/packages/organisms/src/content-builder/configs/image.d.ts +7 -4
  251. package/library/packages/organisms/src/content-builder/configs/timeline.d.ts +5 -2
  252. package/library/packages/organisms/src/content-builder/configs/video.d.ts +11 -2
  253. package/library/packages/organisms/src/content-builder/configs-controller.d.ts +45 -4
  254. package/library/packages/organisms/src/content-builder/content-builder.d.ts +13 -0
  255. package/library/packages/organisms/src/content-builder/plugins/gallery.d.ts +45 -1
  256. package/library/packages/organisms/src/content-builder/styleController.d.ts +20 -2
  257. package/library/packages/organisms/src/index.d.ts +2 -0
  258. package/library/packages/organisms/src/lightbox/lightbox.d.ts +79 -0
  259. package/library/packages/organisms/src/lightbox/lightbox.styles.d.ts +2 -0
  260. package/library/packages/services/src/api/asset/asset.d.ts +3 -2
  261. package/library/packages/services/src/api/asset/asset.types.d.ts +84 -0
  262. package/library/packages/services/src/api/asset/asset.utils.d.ts +9 -0
  263. package/library/packages/services/src/api/endpoints.d.ts +1 -1
  264. package/library/packages/tools/src/fetch-asset/fetch-asset.d.ts +2 -1
  265. package/library/packages/tools/src/fetch-image/fetch-image.d.ts +17 -5
  266. package/library/packages/types/src/asset-click-action.d.ts +3 -1
  267. package/library/packages/types/src/bento-grid.d.ts +37 -0
  268. package/library/packages/types/src/content-builder.d.ts +27 -1
  269. package/library/packages/types/src/gallery.d.ts +0 -6
  270. package/library/packages/types/src/icon-button.d.ts +7 -0
  271. package/library/packages/types/src/menu-item.d.ts +33 -0
  272. package/library/packages/types/src/storybook.d.ts +19 -0
  273. package/library/packages/types/src/table.d.ts +37 -1
  274. package/library/packages/types/src/textarea.d.ts +4 -0
  275. package/library/packages/types/src/video-format-picker.d.ts +11 -0
  276. package/library/packages/utils/src/actions/asset-click.d.ts +1 -3
  277. package/library/packages/utils/src/custom-element/i18n.d.ts +10 -3
  278. package/library/packages/utils/src/index.d.ts +1 -0
  279. package/library/packages/utils/src/string/string.d.ts +33 -0
  280. package/library/packages/utils/src/transformation/index.d.ts +1 -0
  281. package/library/packages/utils/src/url/url.d.ts +9 -0
  282. package/library/react-web-component.d.ts +293 -29
  283. package/library/utils.js +483 -178
  284. package/package.json +4 -1
  285. package/library/chunks/_baseRest.ClTMQtN1.js +0 -67
  286. package/library/chunks/asset.CG_yXtWK.js +0 -288
  287. package/library/chunks/button.styles.Dl5IQLHU.js +0 -718
  288. package/library/chunks/component.styles.DMSLciL5.js +0 -71
  289. package/library/chunks/confirm-popover.zmOFI4e-.js +0 -288
  290. package/library/chunks/content-builder.D_phDrlo.js +0 -127
  291. package/library/chunks/dot-pagination.COBkyhoJ.js +0 -325
  292. package/library/chunks/file-on-demand.CbE-qsiP.js +0 -3740
  293. package/library/chunks/folder-select.Bl_WkhVE.js +0 -844
  294. package/library/chunks/form-control.styles.CUGhvlfT.js +0 -67
  295. package/library/chunks/header.BduX6KJP.js +0 -777
  296. package/library/chunks/identity.ByMq8VxU.js +0 -6
  297. package/library/chunks/iframe.BPKV2K7z.js +0 -160
  298. package/library/chunks/index.B3wJT3XS.js +0 -373
  299. package/library/chunks/isObjectLike.D3cpZO39.js +0 -81
  300. package/library/chunks/option.DnpkE8Xi.js +0 -296
  301. package/library/chunks/pagination.C30LoTya.js +0 -341
  302. package/library/chunks/string.B_rEG27K.js +0 -160
  303. package/library/chunks/toast.BXNbwZV8.js +0 -25
  304. package/library/chunks/typography.oDzoLbZS.js +0 -149
  305. package/library/chunks/url.LjsR2sB5.js +0 -15
  306. package/library/chunks/watch.q1sEjPWL.js +0 -501
  307. /package/library/packages/{organisms/src/asset-link-format/asset-link-format.utils.d.ts → utils/src/transformation/transformation.d.ts} +0 -0
@@ -1,249 +1,22 @@
1
- import { n as a, C as k } from "../chunks/lib-cortex-element.CVMmyPMC.js";
2
- import { c as S } from "../chunks/component.styles.DMSLciL5.js";
3
- import { c as w } from "../chunks/custom-element.L4WJXn1j.js";
4
- import { d as x, L as C } from "../chunks/i18n.C0iakJkV.js";
5
- import { H as _, g as M } from "../chunks/slot.j5oheLJC.js";
6
- import { w as f } from "../chunks/watch.q1sEjPWL.js";
7
- import { i as L, x as h } from "../chunks/lit-element.jLBm65_O.js";
8
- import { e as d } from "../chunks/query.BBf1UFkC.js";
1
+ import { n as a, C as w } from "../chunks/lib-cortex-element.CVMmyPMC.js";
2
+ import { c as C } from "../chunks/component.styles.CRO4Odto.js";
3
+ import { c as _ } from "../chunks/custom-element.L4WJXn1j.js";
4
+ import { d as g, L } from "../chunks/i18n.BFqTRDCA.js";
5
+ import { H as M, g as P } from "../chunks/slot.j5oheLJC.js";
6
+ import { w as v } from "../chunks/watch.BCJD77bD.js";
7
+ import { i as E, x as h, E as y } from "../chunks/lit-element.jLBm65_O.js";
8
+ import { e as p } from "../chunks/query.BBf1UFkC.js";
9
9
  import { e as b } from "../chunks/class-map.BiVq-cVR.js";
10
10
  import { o as m } from "../chunks/if-defined.BRoBj_Rp.js";
11
- import P from "./icon.js";
12
- import E from "./popup.js";
13
- import z from "./spinner.js";
14
- import { e as D, n as R } from "../chunks/ref.bzeTdX0K.js";
15
- const $ = L`
16
- :host {
17
- --submenu-offset: -2px;
18
- --prefix-font-size: var(--cx-font-size-small);
19
- --prefix-color: var(--cx-color-neutral-500);
20
- --label-color: var(--cx-color-neutral);
21
- --suffix-color: var(--cx-color-neutral);
22
- --font-weight: var(--cx-font-weight-regular);
23
-
24
- display: block;
25
- }
26
-
27
- :host([inert]) {
28
- display: none;
29
- }
30
-
31
- .menu-item {
32
- position: relative;
33
- display: flex;
34
- align-items: stretch;
35
- text-decoration: none;
36
- font-family: var(--cx-font-sans);
37
- font-size: var(--cx-font-size-small);
38
- font-weight: var(--font-weight, var(--cx-font-weight-regular));
39
- line-height: var(--cx-line-height-large);
40
- letter-spacing: var(--cx-letter-spacing-normal);
41
- color: var(--cx-color-neutral);
42
- padding: var(--cx-spacing-x-small) var(--cx-spacing-small);
43
- transition: var(--cx-transition-fast) fill;
44
- background-color: var(--cx-menu-item-background-color, unset);
45
- user-select: none;
46
- -webkit-user-select: none;
47
- white-space: nowrap;
48
- cursor: pointer;
49
- }
50
-
51
- .menu-item.menu-item--disabled {
52
- outline: none;
53
- cursor: default;
54
- }
55
-
56
- .menu-item.menu-item--disabled .menu-item__label,
57
- .menu-item.menu-item--disabled .menu-item__prefix,
58
- .menu-item.menu-item--disabled .menu-item__chevron,
59
- .menu-item.menu-item--disabled .menu-item__check {
60
- opacity: 0.5;
61
- }
62
-
63
- .menu-item.menu-item--disabled .menu-item__suffix:not(:slotted(cx-tooltip)) {
64
- opacity: 0.5;
65
- }
66
-
67
- .menu-item.menu-item--loading {
68
- outline: none;
69
- cursor: wait;
70
- }
71
-
72
- .menu-item.menu-item--loading *:not(cx-spinner) {
73
- opacity: 0.5;
74
- }
75
-
76
- .menu-item--loading cx-spinner {
77
- --indicator-color: currentColor;
78
- --track-width: 1px;
79
- position: absolute;
80
- font-size: 0.75em;
81
- top: calc(50% - 0.5em);
82
- left: 0.65rem;
83
- opacity: 1;
84
- }
85
-
86
- .menu-item .menu-item__label {
87
- color: var(--label-color, var(--cx-color-neutral));
88
- flex: 1 1 auto;
89
- display: inline-block;
90
- text-overflow: ellipsis;
91
- overflow: hidden;
92
- margin: auto;
93
- }
94
-
95
- .menu-item--checked .menu-item__label {
96
- color: var(--cx-color-primary);
97
- }
98
-
99
- .menu-item .menu-item__prefix {
100
- color: var(--prefix-color, var(--cx-color-neutral-500));
101
- font-size: var(--prefix-font-size, var(--cx-font-size-small));
102
- flex: 0 0 auto;
103
- display: flex;
104
- align-items: center;
105
- }
106
-
107
- .menu-item--checked {
108
- --prefix-color: var(--cx-color-primary);
109
- --suffix-color: var(--cx-color-primary);
110
- }
111
-
112
- .menu-item--checked .menu-item__check {
113
- color: var(--cx-color-primary);
114
- }
115
-
116
- .menu-item .menu-item__prefix::slotted(*) {
117
- margin-inline-end: var(--cx-spacing-x-small);
118
- }
119
-
120
- .menu-item .menu-item__suffix {
121
- color: var(--suffix-color);
122
- flex: 0 0 auto;
123
- display: flex;
124
- align-items: center;
125
- }
126
-
127
- .menu-item .menu-item__suffix::slotted(*) {
128
- margin-inline-start: var(--cx-spacing-x-small);
129
- }
130
-
131
- /* Safe triangle */
132
- .menu-item--submenu-expanded::after {
133
- content: '';
134
- position: fixed;
135
- z-index: calc(var(--cx-z-index-dropdown) - 1);
136
- top: 0;
137
- right: 0;
138
- bottom: 0;
139
- left: 0;
140
- clip-path: polygon(
141
- var(--safe-triangle-cursor-x, 0) var(--safe-triangle-cursor-y, 0),
142
- var(--safe-triangle-submenu-start-x, 0)
143
- var(--safe-triangle-submenu-start-y, 0),
144
- var(--safe-triangle-submenu-end-x, 0)
145
- var(--safe-triangle-submenu-end-y, 0)
146
- );
147
- }
148
-
149
- @media (pointer: none), (pointer: coarse) {
150
- .menu-item--submenu-expanded::after {
151
- display: none;
152
- }
153
- }
154
-
155
- :host(:focus-visible) {
156
- outline: var(--cx-focus-ring);
157
- outline-offset: calc(-1 * var(--cx-focus-ring-width));
158
- }
159
-
160
- :host(:hover:not([aria-disabled='true'], :focus-visible, .disable-hover))
161
- .menu-item,
162
- .menu-item--submenu-expanded {
163
- background-color: var(--cx-menu-item-background-color-hover);
164
- color: var(--cx-color-neutral-1000);
165
- }
166
-
167
- :host(:not([aria-disabled='true'])) .menu-item--active {
168
- background-color: var(
169
- --cx-menu-item-background-color-active,
170
- var(--cx-menu-item-background-color-hover)
171
- );
172
- color: var(--cx-color-neutral-1000);
173
- }
174
-
175
- :host(:hover:not([aria-disabled='true'], :focus-visible, .disable-hover))
176
- .menu-item--active {
177
- background-color: var(
178
- --cx-menu-item-background-color-active-hover,
179
- var(--cx-menu-item-background-color-active)
180
- );
181
- }
182
-
183
- :host(:focus-visible) .menu-item {
184
- outline: none;
185
- background-color: var(--cx-menu-item-background-color-hover);
186
- opacity: 1;
187
- }
188
-
189
- .menu-item .menu-item__check,
190
- .menu-item .menu-item__chevron {
191
- flex: 0 0 auto;
192
- align-items: center;
193
- justify-content: center;
194
- width: 1.5em;
195
- visibility: hidden;
196
- }
197
-
198
- .menu-item .menu-item__check {
199
- display: var(--checked-icon-display, flex);
200
- margin-right: var(--cx-spacing-2x-small);
201
- }
202
-
203
- .menu-item .menu-item__check--always-show {
204
- visibility: visible;
205
- }
206
-
207
- .menu-item .menu-item__chevron {
208
- display: var(--submenu-icon-display, flex);
209
- }
210
-
211
- .menu-item--checked .menu-item__check,
212
- .menu-item--has-submenu .menu-item__chevron {
213
- visibility: visible;
214
- }
215
-
216
- /* Add elevation and z-index to submenus */
217
- cx-popup::part(popup) {
218
- border: var(--cx-panel-border-width) solid var(--cx-popup-border-color);
219
- border-radius: var(--cx-border-radius-large);
220
- box-shadow: var(--cx-shadow-large);
221
- z-index: var(--cx-z-index-dropdown);
222
- margin-left: var(--submenu-offset, -2px);
223
- overflow: hidden;
224
- }
225
-
226
- .menu-item--rtl cx-popup::part(popup) {
227
- margin-left: calc(-1 * var(--submenu-offset));
228
- }
229
-
230
- @media (forced-colors: active) {
231
- :host(:hover:not([aria-disabled='true'])) .menu-item,
232
- :host(:focus-visible) .menu-item {
233
- outline: dashed 1px SelectedItem;
234
- outline-offset: -1px;
235
- }
236
- }
237
-
238
- /* When users slot a menu, make sure it conforms to the popup's auto-size */
239
- ::slotted(cx-menu) {
240
- max-width: var(--auto-size-available-width) !important;
241
- max-height: var(--auto-size-available-height) !important;
242
- }
243
- `;
244
- class T {
245
- constructor(e, n) {
246
- this.popupRef = D(), this.parent = null, this.enableSubmenuTimer = -1, this.isHorizontalMenu = !1, this.isConnected = !1, this.isPopupConnected = !1, this.skidding = 0, this.submenuOpenDelay = 100, (this.host = e).addController(this), this.hasSlotController = n, this.handleMouseMove = this.handleMouseMove.bind(this), this.handleMouseOver = this.handleMouseOver.bind(this), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleClick = this.handleClick.bind(this), this.handleSubmenuIconClick = this.handleSubmenuIconClick.bind(this), this.handleDocumentMouseDown = this.handleDocumentMouseDown.bind(this), this.handleMouseLeave = this.handleMouseLeave.bind(this), this.handlePopupMouseover = this.handlePopupMouseover.bind(this), this.handlePopupReposition = this.handlePopupReposition.bind(this);
11
+ import z from "./icon.js";
12
+ import D from "./popup.js";
13
+ import $ from "./spinner.js";
14
+ import { e as R, n as T } from "../chunks/ref.bzeTdX0K.js";
15
+ var d = /* @__PURE__ */ ((n) => (n.Prefix = "prefix", n.Suffix = "suffix", n))(d || {});
16
+ const O = E`:host{--submenu-offset:-2px;--prefix-font-size:var(--cx-font-size-small);--prefix-color:var(--cx-color-neutral-500);--label-color:var(--cx-color-neutral);--suffix-color:var(--cx-color-neutral);--font-weight:var(--cx-font-weight-regular);display:block}:host([inert]){display:none}.menu-item{font-family:var(--cx-font-sans);font-size:var(--cx-font-size-small);font-weight:var(--font-weight,var(--cx-font-weight-regular));line-height:var(--cx-line-height-large);letter-spacing:var(--cx-letter-spacing-normal);color:var(--cx-color-neutral);padding:var(--cx-spacing-x-small) var(--cx-spacing-small);transition:var(--cx-transition-fast) fill;background-color:var(--cx-menu-item-background-color,unset);-webkit-user-select:none;user-select:none;white-space:nowrap;cursor:pointer;align-items:stretch;text-decoration:none;display:flex;position:relative}.menu-item.menu-item--disabled{cursor:default;outline:none}.menu-item.menu-item--disabled .menu-item__label,.menu-item.menu-item--disabled .menu-item__prefix,.menu-item.menu-item--disabled .menu-item__chevron,.menu-item.menu-item--disabled .menu-item__check{opacity:.5}.menu-item.menu-item--disabled .menu-item__suffix:not(:slotted(cx-tooltip)){opacity:.5}.menu-item.menu-item--loading{cursor:wait;outline:none}.menu-item.menu-item--loading :not(cx-spinner){opacity:.5}.menu-item--loading cx-spinner{--indicator-color:currentColor;--track-width:1px;opacity:1;font-size:.75em;position:absolute;top:calc(50% - .5em);left:.65rem}.menu-item .menu-item__label{color:var(--label-color,var(--cx-color-neutral));text-overflow:ellipsis;flex:auto;margin:auto;display:inline-block;overflow:hidden}.menu-item--checked .menu-item__label{color:var(--cx-color-primary)}.menu-item .menu-item__prefix{color:var(--prefix-color,var(--cx-color-neutral-500));font-size:var(--prefix-font-size,var(--cx-font-size-small));flex:none;align-items:center;display:flex}.menu-item--checked{--prefix-color:var(--cx-color-primary);--suffix-color:var(--cx-color-primary)}.menu-item--checked .menu-item__check{color:var(--cx-color-primary)}.menu-item .menu-item__prefix::slotted(*){margin-inline-end:var(--cx-spacing-x-small)}.menu-item .menu-item__suffix{color:var(--suffix-color);flex:none;align-items:center;display:flex}.menu-item .menu-item__suffix::slotted(*){margin-inline-start:var(--cx-spacing-x-small)}.menu-item--submenu-expanded:after{content:"";z-index:calc(var(--cx-z-index-dropdown) - 1);clip-path:polygon(var(--safe-triangle-cursor-x,0) var(--safe-triangle-cursor-y,0), var(--safe-triangle-submenu-start-x,0) var(--safe-triangle-submenu-start-y,0), var(--safe-triangle-submenu-end-x,0) var(--safe-triangle-submenu-end-y,0));position:fixed;inset:0}@media (pointer:none),(pointer:coarse){.menu-item--submenu-expanded:after{display:none}}:host(:focus-visible){outline:var(--cx-focus-ring);outline-offset:calc(-1 * var(--cx-focus-ring-width))}:host(:hover:not([aria-disabled=true],:focus-visible,.disable-hover)) .menu-item,.menu-item--submenu-expanded{background-color:var(--cx-menu-item-background-color-hover);color:var(--cx-color-neutral-1000)}:host(:not([aria-disabled=true])) .menu-item--active{background-color:var(--cx-menu-item-background-color-active,var(--cx-menu-item-background-color-hover));color:var(--cx-color-neutral-1000)}:host(:hover:not([aria-disabled=true],:focus-visible,.disable-hover)) .menu-item--active{background-color:var(--cx-menu-item-background-color-active-hover,var(--cx-menu-item-background-color-active,var(--cx-menu-item-background-color-hover)))}:host(:focus-visible) .menu-item{background-color:var(--cx-menu-item-background-color-hover);opacity:1;outline:none}.menu-item .menu-item__check,.menu-item .menu-item__chevron{visibility:hidden;flex:none;justify-content:center;align-items:center;width:1.5em}.menu-item .menu-item__check{display:var(--checked-icon-display,flex);margin-inline-end:var(--cx-spacing-2x-small)}.menu-item .menu-item__check--suffix{margin-inline:auto 0;padding-inline-start:var(--cx-spacing-2x-small)}.menu-item .menu-item__check--always-show{visibility:visible}.menu-item .menu-item__chevron{display:var(--submenu-icon-display,flex)}.menu-item--checked .menu-item__check,.menu-item--has-submenu .menu-item__chevron{visibility:visible}cx-popup::part(popup){border:var(--cx-panel-border-width) solid var(--cx-popup-border-color);border-radius:var(--cx-border-radius-large);box-shadow:var(--cx-shadow-large);z-index:var(--cx-z-index-dropdown);margin-left:var(--submenu-offset,-2px);overflow:hidden}.menu-item--rtl cx-popup::part(popup){margin-left:calc(-1 * var(--submenu-offset))}@media (forced-colors:active){:host(:hover:not([aria-disabled=true])) .menu-item,:host(:focus-visible) .menu-item{outline-offset:-1px;outline:1px dashed selecteditem}}::slotted(cx-menu){max-width:var(--auto-size-available-width)!important;max-height:var(--auto-size-available-height)!important}`;
17
+ class I {
18
+ constructor(e, s) {
19
+ this.popupRef = R(), this.parent = null, this.enableSubmenuTimer = -1, this.isHorizontalMenu = !1, this.isConnected = !1, this.isPopupConnected = !1, this.skidding = 0, this.submenuOpenDelay = 100, (this.host = e).addController(this), this.hasSlotController = s, this.handleMouseMove = this.handleMouseMove.bind(this), this.handleMouseOver = this.handleMouseOver.bind(this), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleClick = this.handleClick.bind(this), this.handleSubmenuIconClick = this.handleSubmenuIconClick.bind(this), this.handleDocumentMouseDown = this.handleDocumentMouseDown.bind(this), this.handleMouseLeave = this.handleMouseLeave.bind(this), this.handlePopupMouseover = this.handlePopupMouseover.bind(this), this.handlePopupReposition = this.handlePopupReposition.bind(this);
247
20
  }
248
21
  get popup() {
249
22
  return this.popupRef.value;
@@ -290,10 +63,10 @@ class T {
290
63
  }
291
64
  // Set the safe triangle cursor position
292
65
  handleMouseMove(e) {
293
- const n = getComputedStyle(this.host).direction === "rtl" || this.popupRef.value?.dataset.currentPlacement?.startsWith("left");
66
+ const s = getComputedStyle(this.host).direction === "rtl" || this.popupRef.value?.dataset.currentPlacement?.startsWith("left");
294
67
  this.host.style.setProperty(
295
68
  "--safe-triangle-cursor-x",
296
- `${e.clientX + (n ? 1 : 0)}px`
69
+ `${e.clientX + (s ? 1 : 0)}px`
297
70
  ), this.host.style.setProperty(
298
71
  "--safe-triangle-cursor-y",
299
72
  `${e.clientY}px`
@@ -303,32 +76,32 @@ class T {
303
76
  this.hasSlotController.test("submenu") && this.enableSubmenu();
304
77
  }
305
78
  handleSubmenuEntry(e) {
306
- const n = this.host.renderRoot.querySelector("slot[name='submenu']");
307
- if (!n) {
79
+ const s = this.host.renderRoot.querySelector("slot[name='submenu']");
80
+ if (!s) {
308
81
  console.error(
309
82
  "Cannot activate a submenu if no corresponding menuitem can be found.",
310
83
  this
311
84
  );
312
85
  return;
313
86
  }
314
- let i = null;
315
- for (const r of n.assignedElements())
316
- if (i = r.querySelectorAll("cx-menu-item, [role^='menuitem']"), i.length !== 0)
87
+ let t = null;
88
+ for (const r of s.assignedElements())
89
+ if (t = r.querySelectorAll("cx-menu-item, [role^='menuitem']"), t.length !== 0)
317
90
  break;
318
- if (!i || i.length === 0) {
91
+ if (!t || t.length === 0) {
319
92
  this.host.lazy && (e.preventDefault(), e.stopPropagation(), this.enableSubmenu(!1));
320
93
  return;
321
94
  }
322
- i[0].setAttribute("tabindex", "0");
323
- for (let r = 1; r !== i.length; ++r)
324
- i[r].setAttribute("tabindex", "-1");
325
- this.popupRef.value && (e.preventDefault(), e.stopPropagation(), this.popupRef.value.active ? i[0] instanceof HTMLElement && i[0].focus() : (this.enableSubmenu(!1), this.popupRef.value.addEventListener("cx-opened", () => {
326
- i[0] instanceof HTMLElement && i[0].focus();
95
+ t[0].setAttribute("tabindex", "0");
96
+ for (let r = 1; r !== t.length; ++r)
97
+ t[r].setAttribute("tabindex", "-1");
98
+ this.popupRef.value && (e.preventDefault(), e.stopPropagation(), this.popupRef.value.active ? t[0] instanceof HTMLElement && t[0].focus() : (this.enableSubmenu(!1), this.popupRef.value.addEventListener("cx-opened", () => {
99
+ t[0] instanceof HTMLElement && t[0].focus();
327
100
  }), this.host.requestUpdate()));
328
101
  }
329
102
  // Focus on the first menu-item of a submenu.
330
103
  handleKeyDown(e) {
331
- const n = () => {
104
+ const s = () => {
332
105
  e.preventDefault(), e.stopPropagation(), this.host.focus(), this.disableSubmenu();
333
106
  };
334
107
  switch (e.key) {
@@ -341,11 +114,11 @@ class T {
341
114
  break;
342
115
  }
343
116
  case "ArrowLeft": {
344
- e.target !== this.host && !this.isHorizontalMenu && n();
117
+ e.target !== this.host && !this.isHorizontalMenu && s();
345
118
  break;
346
119
  }
347
120
  case "ArrowUp": {
348
- e.target !== this.host && this.isHorizontalMenu && n();
121
+ e.target !== this.host && this.isHorizontalMenu && s();
349
122
  break;
350
123
  }
351
124
  case "ArrowRight": {
@@ -365,8 +138,8 @@ class T {
365
138
  e.preventDefault(), e.stopPropagation(), this.isExpanded() ? this.disableSubmenu() : this.enableSubmenu();
366
139
  }
367
140
  handleDocumentMouseDown(e) {
368
- const n = e.composedPath();
369
- this.host && !n.includes(this.host) && this.disableSubmenu();
141
+ const s = e.composedPath();
142
+ this.host && !s.includes(this.host) && this.disableSubmenu();
370
143
  }
371
144
  // Close this submenu on focus outside of the parent or any descendants.
372
145
  handleMouseLeave(e) {
@@ -378,16 +151,16 @@ class T {
378
151
  }
379
152
  // Set the safe triangle values for the submenu when the position changes
380
153
  handlePopupReposition() {
381
- const n = this.host.renderRoot.querySelector("slot[name='submenu']")?.assignedElements({ flatten: !0 }).filter((p) => p.localName === "cx-menu")[0], i = getComputedStyle(this.host).direction === "rtl" || this.popupRef.value?.dataset.currentPlacement?.startsWith("left");
382
- if (!n)
154
+ const s = this.host.renderRoot.querySelector("slot[name='submenu']")?.assignedElements({ flatten: !0 }).filter((f) => f.localName === "cx-menu")[0], t = getComputedStyle(this.host).direction === "rtl" || this.popupRef.value?.dataset.currentPlacement?.startsWith("left");
155
+ if (!s)
383
156
  return;
384
- const { height: r, left: l, top: u, width: c } = n.getBoundingClientRect();
157
+ const { height: r, left: l, top: u, width: c } = s.getBoundingClientRect();
385
158
  this.host.style.setProperty(
386
159
  "--safe-triangle-submenu-start-x",
387
- `${i ? l + c : l}px`
160
+ `${t ? l + c : l}px`
388
161
  ), this.host.style.setProperty("--safe-triangle-submenu-start-y", `${u}px`), this.host.style.setProperty(
389
162
  "--safe-triangle-submenu-end-x",
390
- `${i ? l + c : l}px`
163
+ `${t ? l + c : l}px`
391
164
  ), this.host.style.setProperty(
392
165
  "--safe-triangle-submenu-end-y",
393
166
  `${u + r}px`
@@ -410,12 +183,12 @@ class T {
410
183
  updateSkidding() {
411
184
  if (!this.host.parentElement?.computedStyleMap)
412
185
  return;
413
- const e = this.host.parentElement.computedStyleMap(), n = x(this.host) === "rtl", i = this.host.submenuPlacement ?? (n ? "left-start" : "right-start"), r = i.startsWith("left") || i.startsWith("right");
186
+ const e = this.host.parentElement.computedStyleMap(), s = g(this.host) === "rtl", t = this.host.submenuPlacement ?? (s ? "left-start" : "right-start"), r = t.startsWith("left") || t.startsWith("right");
414
187
  let l = [];
415
- r && (i.endsWith("-start") ? l = ["padding-top", "border-top-width", "margin-top"] : i.endsWith("-end") && (l = ["padding-bottom", "border-bottom-width", "margin-bottom"]));
416
- const u = l.reduce((c, p) => {
417
- const v = e.get(p) ?? new CSSUnitValue(0, "px"), g = (v instanceof CSSUnitValue ? v : new CSSUnitValue(0, "px")).to("px"), y = i.endsWith("-end") ? 1 : -1;
418
- return c + g.value * y;
188
+ r && (t.endsWith("-start") ? l = ["padding-top", "border-top-width", "margin-top"] : t.endsWith("-end") && (l = ["padding-bottom", "border-bottom-width", "margin-bottom"]));
189
+ const u = l.reduce((c, f) => {
190
+ const x = e.get(f) ?? new CSSUnitValue(0, "px"), k = (x instanceof CSSUnitValue ? x : new CSSUnitValue(0, "px")).to("px"), S = t.endsWith("-end") ? 1 : -1;
191
+ return c + k.value * S;
419
192
  }, 0);
420
193
  this.skidding = u;
421
194
  }
@@ -423,48 +196,30 @@ class T {
423
196
  return this.popupRef.value ? this.popupRef.value.active : !1;
424
197
  }
425
198
  renderSubmenu() {
426
- const e = x(this.host) === "rtl";
199
+ const e = g(this.host) === "rtl";
427
200
  if (!this.hasSlotController.test("submenu"))
428
201
  return null;
429
- const n = this.host.submenuPlacement ?? (e ? "left-start" : "right-start");
430
- return h`
431
- <cx-popup
432
- ${R(this.popupRef)}
433
- placement=${n}
434
- anchor="anchor"
435
- part="submenu-popup"
436
- flip
437
- flip-fallback-strategy="best-fit"
438
- skidding=${this.skidding}
439
- strategy="overlay"
440
- auto-size="both"
441
- auto-size-padding="10"
442
- ?shift=${!!this.host.shiftBoundary}
443
- .flipBoundary=${this.host.flipBoundary}
444
- .shiftBoundary=${this.host.shiftBoundary}
445
- >
446
- <slot name="submenu"></slot>
447
- </cx-popup>
448
- `;
202
+ const s = this.host.submenuPlacement ?? (e ? "left-start" : "right-start");
203
+ return h`<cx-popup ${T(this.popupRef)} placement=${s} anchor="anchor" part="submenu-popup" flip flip-fallback-strategy="best-fit" skidding=${this.skidding} strategy="overlay" auto-size="both" auto-size-padding="10" ?shift=${!!this.host.shiftBoundary} .flipBoundary=${this.host.flipBoundary} .shiftBoundary=${this.host.shiftBoundary}><slot name="submenu"></slot></cx-popup>`;
449
204
  }
450
205
  }
451
- var O = Object.defineProperty, I = Object.getOwnPropertyDescriptor, s = (o, e, n, i) => {
452
- for (var r = i > 1 ? void 0 : i ? I(e, n) : e, l = o.length - 1, u; l >= 0; l--)
453
- (u = o[l]) && (r = (i ? u(e, n, r) : u(r)) || r);
454
- return i && r && O(e, n, r), r;
206
+ var H = Object.defineProperty, B = Object.getOwnPropertyDescriptor, o = (n, e, s, t) => {
207
+ for (var r = t > 1 ? void 0 : t ? B(e, s) : e, l = n.length - 1, u; l >= 0; l--)
208
+ (u = n[l]) && (r = (t ? u(e, s, r) : u(r)) || r);
209
+ return t && r && H(e, s, r), r;
455
210
  };
456
- let t = class extends k {
211
+ let i = class extends w {
457
212
  constructor() {
458
- super(), this.type = "normal", this.submenuTrigger = "both", this.checked = !1, this.value = "", this.href = "", this.rel = "noreferrer noopener", this.loading = !1, this.disabled = !1, this.active = !1, this.readonly = !1, this.menu = "", this.alwaysShowCheckedIcon = !1, this.lazy = !1, this.localize = new C(this), this.hasSlotController = new _(
213
+ super(), this.type = "normal", this.submenuTrigger = "both", this.checked = !1, this.value = "", this.href = "", this.rel = "noreferrer noopener", this.loading = !1, this.disabled = !1, this.active = !1, this.readonly = !1, this.menu = "", this.alwaysShowCheckedIcon = !1, this.checkPlacement = d.Suffix, this.lazy = !1, this.localize = new L(this), this.hasSlotController = new M(
459
214
  this,
460
215
  "submenu",
461
216
  "submenu-icon"
462
- ), this.submenuController = new T(
217
+ ), this.submenuController = new I(
463
218
  this,
464
219
  this.hasSlotController
465
- ), this.handleDocumentWheel = (o) => {
466
- const e = o.composedPath();
467
- this.submenuController.isExpanded() && (!this.submenuController.popup || !e.includes(this.submenuController.popup)) && (o.preventDefault(), this.submenuController.disableSubmenu());
220
+ ), this.handleDocumentWheel = (n) => {
221
+ const e = n.composedPath();
222
+ this.submenuController.isExpanded() && (!this.submenuController.popup || !e.includes(this.submenuController.popup)) && (n.preventDefault(), this.submenuController.disableSubmenu());
468
223
  }, this.handleHostClick = this.handleHostClick.bind(this), this.handleMouseOver = this.handleMouseOver.bind(this);
469
224
  }
470
225
  runConnectedCallback() {
@@ -476,25 +231,25 @@ let t = class extends k {
476
231
  super.disconnectedCallback(), this.removeEventListener("click", this.handleHostClick), this.removeEventListener("mouseover", this.handleMouseOver), document.removeEventListener("wheel", this.handleDocumentWheel);
477
232
  }
478
233
  handleDefaultSlotChange() {
479
- const o = this.getTextLabel();
234
+ const n = this.getTextLabel();
480
235
  if (typeof this.cachedTextLabel > "u") {
481
- this.cachedTextLabel = o;
236
+ this.cachedTextLabel = n;
482
237
  return;
483
238
  }
484
- o !== this.cachedTextLabel && (this.cachedTextLabel = o, this.emit("slotchange", {
239
+ n !== this.cachedTextLabel && (this.cachedTextLabel = n, this.emit("slotchange", {
485
240
  bubbles: !0,
486
241
  cancelable: !1,
487
242
  composed: !1
488
243
  }));
489
244
  }
490
- handleHostClick(o) {
491
- (this.disabled || this.readonly) && (o.target === this && o.preventDefault(), o.stopImmediatePropagation()), this.href && this.anchor && this.anchor.click();
245
+ handleHostClick(n) {
246
+ (this.disabled || this.readonly) && (n.target === this && n.preventDefault(), n.stopImmediatePropagation()), this.href && this.anchor && this.anchor.click();
492
247
  }
493
- handleMouseOver(o) {
494
- o.stopPropagation();
248
+ handleMouseOver(n) {
249
+ n.stopPropagation();
495
250
  }
496
- handleAnchorClick(o) {
497
- o.stopPropagation();
251
+ handleAnchorClick(n) {
252
+ n.stopPropagation();
498
253
  }
499
254
  handleCheckedChange() {
500
255
  if (this.checked && this.type !== "checkbox") {
@@ -514,18 +269,14 @@ let t = class extends k {
514
269
  }
515
270
  /** Returns a text label based on the contents of the menu item's default slot. */
516
271
  getTextLabel() {
517
- return M(this.defaultSlot);
272
+ return P(this.defaultSlot);
518
273
  }
519
274
  isSubmenu() {
520
275
  return this.hasSlotController.test("submenu") || !!this.menu.trim();
521
276
  }
522
- renderBase(o) {
523
- const e = !!this.href, n = this.localize.dir() === "rtl", i = this.submenuController.isExpanded();
524
- return e ? h`
525
- <a
526
- id="anchor"
527
- part="base"
528
- class=${b({
277
+ renderBase(n) {
278
+ const e = !!this.href, s = this.localize.dir() === "rtl", t = this.submenuController.isExpanded();
279
+ return e ? h`<a id="anchor" part="base" class=${b({
529
280
  "menu-item": !0,
530
281
  "menu-item--active": this.active,
531
282
  "menu-item--checkbox": this.type === "checkbox",
@@ -533,25 +284,9 @@ let t = class extends k {
533
284
  "menu-item--disabled": this.disabled,
534
285
  "menu-item--has-submenu": this.isSubmenu(),
535
286
  "menu-item--loading": this.loading,
536
- "menu-item--rtl": n,
537
- "menu-item--submenu-expanded": i
538
- })}
539
- aria-haspopup=${this.isSubmenu()}
540
- href=${m(this.href)}
541
- target=${m(this.target)}
542
- download=${m(this.download)}
543
- rel=${m(this.rel)}
544
- aria-label=${this.getTextLabel()}
545
- ?inert=${this.disabled}
546
- @click=${this.handleAnchorClick}
547
- >
548
- ${o}
549
- </a>
550
- ` : h`
551
- <div
552
- id="anchor"
553
- part="base"
554
- class=${b({
287
+ "menu-item--rtl": s,
288
+ "menu-item--submenu-expanded": t
289
+ })} aria-haspopup=${this.isSubmenu()} href=${m(this.href)} target=${m(this.target)} download=${m(this.download)} rel=${m(this.rel)} aria-label=${this.getTextLabel()} ?inert=${this.disabled} @click=${this.handleAnchorClick}>${n}</a>` : h`<div id="anchor" part="base" class=${b({
555
290
  "menu-item": !0,
556
291
  "menu-item--active": this.active,
557
292
  "menu-item--checkbox": this.type === "checkbox",
@@ -559,139 +294,114 @@ let t = class extends k {
559
294
  "menu-item--disabled": this.disabled,
560
295
  "menu-item--has-submenu": this.isSubmenu(),
561
296
  "menu-item--loading": this.loading,
562
- "menu-item--rtl": n,
563
- "menu-item--submenu-expanded": i
564
- })}
565
- aria-haspopup=${this.isSubmenu()}
566
- aria-label=${this.getTextLabel()}
567
- >
568
- ${o}
569
- </div>
570
- `;
297
+ "menu-item--rtl": s,
298
+ "menu-item--submenu-expanded": t
299
+ })} aria-haspopup=${this.isSubmenu()} aria-label=${this.getTextLabel()}>${n}</div>`;
571
300
  }
572
301
  render() {
573
- const o = this.localize.dir() === "rtl";
302
+ const n = this.localize.dir() === "rtl";
574
303
  let e;
575
- return this.submenuPlacement && (this.submenuPlacement.startsWith("top") || this.submenuPlacement.startsWith("bottom")) ? e = "keyboard_arrow_down" : e = o ? "chevron_left" : "chevron_right", this.renderBase(h`
576
- <slot
577
- part="checked-icon"
578
- name="checked-icon"
579
- class=${b({
304
+ this.submenuPlacement && (this.submenuPlacement.startsWith("top") || this.submenuPlacement.startsWith("bottom")) ? e = "keyboard_arrow_down" : e = n ? "chevron_left" : "chevron_right";
305
+ const s = h`<slot part="checked-icon" name="checked-icon" class=${b({
580
306
  "menu-item__check": !0,
581
- "menu-item__check--always-show": this.alwaysShowCheckedIcon
582
- })}
583
- >
584
- <cx-icon name="check"></cx-icon>
585
- </slot>
586
-
587
- <slot name="prefix" part="prefix" class="menu-item__prefix"></slot>
588
-
589
- <slot
590
- part="label"
591
- class="menu-item__label"
592
- @slotchange=${this.handleDefaultSlotChange}
593
- ></slot>
594
-
595
- <slot name="suffix" part="suffix" class="menu-item__suffix"></slot>
596
-
597
- <slot name="submenu-icon" part="submenu-icon" class="menu-item__chevron">
598
- <cx-icon name=${e} aria-hidden="true"></cx-icon>
599
- </slot>
307
+ "menu-item__check--always-show": this.alwaysShowCheckedIcon,
308
+ "menu-item__check--suffix": this.checkPlacement === d.Suffix
309
+ })}><cx-icon name="check"></cx-icon></slot>`, t = this.checkPlacement === d.Suffix;
310
+ return this.renderBase(h`
311
+ ${t ? y : s}<slot name="prefix" part="prefix" class="menu-item__prefix"></slot><slot part="label" class="menu-item__label" @slotchange=${this.handleDefaultSlotChange}></slot><slot name="suffix" part="suffix" class="menu-item__suffix"></slot><slot name="submenu-icon" part="submenu-icon" class="menu-item__chevron"><cx-icon name=${e} aria-hidden="true"></cx-icon></slot>${t ? s : y}
600
312
 
601
313
  ${this.submenuController.renderSubmenu()}
602
- ${this.loading ? h`
603
- <cx-spinner
604
- part="spinner"
605
- exportparts="base:spinner__base"
606
- ></cx-spinner>
607
- ` : ""}
314
+ ${this.loading ? h`<cx-spinner part="spinner" exportparts="base:spinner__base"></cx-spinner>` : ""}
608
315
  `);
609
316
  }
610
317
  };
611
- t.styles = [S, $];
612
- t.dependencies = {
613
- "cx-icon": P,
614
- "cx-popup": E,
615
- "cx-spinner": z
318
+ i.styles = [C, O];
319
+ i.dependencies = {
320
+ "cx-icon": z,
321
+ "cx-popup": D,
322
+ "cx-spinner": $
616
323
  };
617
- s([
618
- d("slot:not([name])")
619
- ], t.prototype, "defaultSlot", 2);
620
- s([
621
- d("a#anchor", !0)
622
- ], t.prototype, "anchor", 2);
623
- s([
624
- d(".menu-item")
625
- ], t.prototype, "menuItem", 2);
626
- s([
627
- d(".menu-item__chevron")
628
- ], t.prototype, "submenuIcon", 2);
629
- s([
324
+ o([
325
+ p("slot:not([name])")
326
+ ], i.prototype, "defaultSlot", 2);
327
+ o([
328
+ p("a#anchor", !0)
329
+ ], i.prototype, "anchor", 2);
330
+ o([
331
+ p(".menu-item")
332
+ ], i.prototype, "menuItem", 2);
333
+ o([
334
+ p(".menu-item__chevron")
335
+ ], i.prototype, "submenuIcon", 2);
336
+ o([
630
337
  a()
631
- ], t.prototype, "type", 2);
632
- s([
338
+ ], i.prototype, "type", 2);
339
+ o([
633
340
  a({ attribute: "submenu-trigger" })
634
- ], t.prototype, "submenuTrigger", 2);
635
- s([
341
+ ], i.prototype, "submenuTrigger", 2);
342
+ o([
636
343
  a({ reflect: !0, type: Boolean })
637
- ], t.prototype, "checked", 2);
638
- s([
344
+ ], i.prototype, "checked", 2);
345
+ o([
639
346
  a()
640
- ], t.prototype, "value", 2);
641
- s([
347
+ ], i.prototype, "value", 2);
348
+ o([
642
349
  a()
643
- ], t.prototype, "href", 2);
644
- s([
350
+ ], i.prototype, "href", 2);
351
+ o([
645
352
  a()
646
- ], t.prototype, "target", 2);
647
- s([
353
+ ], i.prototype, "target", 2);
354
+ o([
648
355
  a()
649
- ], t.prototype, "rel", 2);
650
- s([
356
+ ], i.prototype, "rel", 2);
357
+ o([
651
358
  a()
652
- ], t.prototype, "download", 2);
653
- s([
359
+ ], i.prototype, "download", 2);
360
+ o([
654
361
  a({ reflect: !0, type: Boolean })
655
- ], t.prototype, "loading", 2);
656
- s([
362
+ ], i.prototype, "loading", 2);
363
+ o([
657
364
  a({ reflect: !0, type: Boolean })
658
- ], t.prototype, "disabled", 2);
659
- s([
365
+ ], i.prototype, "disabled", 2);
366
+ o([
660
367
  a({ reflect: !0, type: Boolean })
661
- ], t.prototype, "active", 2);
662
- s([
368
+ ], i.prototype, "active", 2);
369
+ o([
663
370
  a({ reflect: !0, type: Boolean })
664
- ], t.prototype, "readonly", 2);
665
- s([
371
+ ], i.prototype, "readonly", 2);
372
+ o([
666
373
  a({ attribute: "flip-boundary", type: Object })
667
- ], t.prototype, "flipBoundary", 2);
668
- s([
374
+ ], i.prototype, "flipBoundary", 2);
375
+ o([
669
376
  a({ attribute: "shift-boundary", type: Object })
670
- ], t.prototype, "shiftBoundary", 2);
671
- s([
377
+ ], i.prototype, "shiftBoundary", 2);
378
+ o([
672
379
  a({ reflect: !0 })
673
- ], t.prototype, "menu", 2);
674
- s([
380
+ ], i.prototype, "menu", 2);
381
+ o([
675
382
  a({ attribute: "always-show-checked-icon", reflect: !0, type: Boolean })
676
- ], t.prototype, "alwaysShowCheckedIcon", 2);
677
- s([
383
+ ], i.prototype, "alwaysShowCheckedIcon", 2);
384
+ o([
385
+ a({ attribute: "check-placement", reflect: !0 })
386
+ ], i.prototype, "checkPlacement", 2);
387
+ o([
678
388
  a({ attribute: "submenu-placement" })
679
- ], t.prototype, "submenuPlacement", 2);
680
- s([
389
+ ], i.prototype, "submenuPlacement", 2);
390
+ o([
681
391
  a({ reflect: !0, type: Boolean })
682
- ], t.prototype, "lazy", 2);
683
- s([
684
- f("checked")
685
- ], t.prototype, "handleCheckedChange", 1);
686
- s([
687
- f("disabled")
688
- ], t.prototype, "handleDisabledChange", 1);
689
- s([
690
- f("type")
691
- ], t.prototype, "handleTypeChange", 1);
692
- t = s([
693
- w("cx-menu-item")
694
- ], t);
392
+ ], i.prototype, "lazy", 2);
393
+ o([
394
+ v("checked")
395
+ ], i.prototype, "handleCheckedChange", 1);
396
+ o([
397
+ v("disabled")
398
+ ], i.prototype, "handleDisabledChange", 1);
399
+ o([
400
+ v("type")
401
+ ], i.prototype, "handleTypeChange", 1);
402
+ i = o([
403
+ _("cx-menu-item")
404
+ ], i);
695
405
  export {
696
- t as default
406
+ i as default
697
407
  };