@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.
- package/library/chunks/{AxisLabelRadial.CgPb7ghO.js → AxisLabelRadial.Bs1P_q_F.js} +1 -1
- package/library/chunks/{BaseColumnSeries.B6rG-Ylz.js → BaseColumnSeries.C7jwOxIJ.js} +1 -1
- package/library/chunks/{CandlestickSeries.C-YfO-57.js → CandlestickSeries.CkXGtRWE.js} +2 -2
- package/library/chunks/{Circle.DhoXSsjo.js → Circle.DBa5Ok8V.js} +1 -1
- package/library/chunks/{ColumnSeries.CZi2LBZ2.js → ColumnSeries.DGazbfza.js} +2 -2
- package/library/chunks/{EditableAxisLabel.CykTMTsG.js → EditableAxisLabel.wN0t_G2B.js} +2 -2
- package/library/chunks/{EditableLabel.BlQ7B4D0.js → EditableLabel.BWeq6fgX.js} +1 -1
- package/library/chunks/{Gradient.BQ0JzFEe.js → Gradient.CdcsPIru.js} +1 -1
- package/library/chunks/{LinearGradient.DuVS2EHe.js → LinearGradient.B1z9AGUt.js} +2 -2
- package/library/chunks/{Picture.DRO0jnR6.js → Picture.YSPC0l0Q.js} +1 -1
- package/library/chunks/{Polygon.DEO3f_qs.js → Polygon.BwMvXN2H.js} +1 -1
- package/library/chunks/{ProgressPie.Bryx2w1J.js → ProgressPie.DlCwXN17.js} +5 -5
- package/library/chunks/{RadialLabel.TyXECvYG.js → RadialLabel.DyVOf2K8.js} +1 -1
- package/library/chunks/{Scrollbar.DK48nKk4.js → Scrollbar.BdZVb_Z-.js} +1 -1
- package/library/chunks/{Slice.DbXRplXx.js → Slice.DiEswWa6.js} +1 -1
- package/library/chunks/{Slider.B27osQYu.js → Slider.C20No2z5.js} +1 -1
- package/library/chunks/{SpriteResizer.C4wFzD_x.js → SpriteResizer.DFnmcy0h.js} +1 -1
- package/library/chunks/{Triangle.BEmFiHyd.js → Triangle.BaOef7HV.js} +1 -1
- package/library/chunks/{ZoomTools.CBqjLDqb.js → ZoomTools.D5JPehoL.js} +1 -1
- package/library/chunks/{_baseUniq.Df-fLIBx.js → _baseUniq.BUihBa8c.js} +56 -53
- package/library/chunks/{am-chart.B_OdX4Q-.js → am-chart.H2jnOzFc.js} +254 -262
- package/library/chunks/{animation.DfUHRQry.js → animation.7ifl4x2S.js} +4 -8
- package/library/chunks/array.DCtvHiLS.js +81 -0
- package/library/chunks/asset.D7E0-cUV.js +460 -0
- package/library/chunks/{button.KnE3mcyM.js → button.CauAHfdl.js} +10 -45
- package/library/chunks/button.styles.CKqn956w.js +5 -0
- package/library/chunks/{capitalize.WSkCXkNE.js → capitalize.CNStXZBq.js} +1 -1
- package/library/chunks/{color-swatch-group.p3Sdqlat.js → color-swatch-group.D5BP2W3P.js} +50 -220
- package/library/chunks/{color-swatch.C0oPHfOu.js → color-swatch.2HS4bc3N.js} +20 -204
- package/library/chunks/{colorPicker.CJwbdhtn.js → colorPicker.06n6P3aK.js} +5 -5
- package/library/chunks/component.styles.CRO4Odto.js +5 -0
- package/library/chunks/confirm-popover.DmGAMS8X.js +121 -0
- package/library/chunks/{cropper.tSDgXKqJ.js → cropper.ZU2Dy-MM.js} +8182 -8540
- package/library/chunks/{dialog.DpZBbTCn.js → dialog.2UW1LNm1.js} +117 -314
- package/library/chunks/{dom.BQVKDNd8.js → dom.BslZF2Y_.js} +1 -1
- package/library/chunks/dot-pagination.DsAfSNzr.js +204 -0
- package/library/chunks/{endpoints.B7lcoc1N.js → endpoints.Fpyb8xvv.js} +214 -203
- package/library/chunks/{exporting.DCqJtW6l.js → exporting.Chnl3UWi.js} +2 -2
- package/library/chunks/file-on-demand.Dig_iVvx.js +1956 -0
- package/library/chunks/{flow.Ch1rU01m.js → flow.D2CqFQa7.js} +5 -5
- package/library/chunks/folder-select.BT1drT8C.js +775 -0
- package/library/chunks/form-control.styles.CaGWmeAS.js +5 -0
- package/library/chunks/{form.DgwYWi0O.js → form.CFc09rKh.js} +1 -1
- package/library/chunks/{gantt.rWdF_jmG.js → gantt.DSHD2gjO.js} +8 -8
- package/library/chunks/header.BePZwMCQ.js +170 -0
- package/library/chunks/{hierarchy.HoRJAu6S.js → hierarchy.DwVsMmsP.js} +5 -5
- package/library/chunks/{hub-connection.CfARlehM.js → hub-connection.Ot2odiCz.js} +1 -1
- package/library/chunks/{i18n.C0iakJkV.js → i18n.BFqTRDCA.js} +19 -12
- package/library/chunks/icon-button.rKe0N4VB.js +149 -0
- package/library/chunks/iframe.DznmlYpV.js +73 -0
- package/library/chunks/{image.C9avagDq.js → image.CEtCGsNL.js} +275 -488
- package/library/chunks/{index.D2JPKXqq.js → index.C9khsiad.js} +17 -17
- package/library/chunks/isObjectLike.z36Fu426.js +34 -0
- package/library/chunks/{isSymbol.huJ_Cvxt.js → isSymbol.L0C2ND_U.js} +1 -1
- package/library/chunks/{json.DHNMAC-m.js → json.zyETMOw-.js} +3 -3
- package/library/chunks/{list-editor.B2mFE9f7.js → list-editor.CJ96S1Np.js} +58 -372
- package/library/chunks/{map.BHmZ4Crx.js → map.CqM2O6LB.js} +2 -2
- package/library/chunks/option.COnEtd3X.js +123 -0
- package/library/chunks/{overlayscrollbars.XhGWx9Zk.js → overlayscrollbars.BMav4RQ4.js} +252 -958
- package/library/chunks/pagination.DaD9Yul6.js +334 -0
- package/library/chunks/{percent.CM9cr1H3.js → percent.DuQwbCCg.js} +3 -3
- package/library/chunks/{radar.CQUnnhGk.js → radar.FpYl3UH5.js} +4 -4
- package/library/chunks/{responsive.CrX-HUow.js → responsive.BndCeSg0.js} +1 -1
- package/library/chunks/{sliceGrouper.iv1p8MAK.js → sliceGrouper.BsE7fGMt.js} +1 -1
- package/library/chunks/{stock.CU0y6a5P.js → stock.BR-ag4Pt.js} +9 -9
- package/library/chunks/string.BigZhczf.js +185 -0
- package/library/chunks/{tab-group.05PY0smt.js → tab-group.0Po0eoxR.js} +33 -584
- package/library/chunks/{table.DNTm_GMS.js → table.WNd284in.js} +3535 -4852
- package/library/chunks/{timeline.yzdwtGKM.js → timeline.DkzkmgEM.js} +5 -5
- package/library/chunks/{toString.CRT5zqEU.js → toString.CL_lYXbK.js} +3 -3
- package/library/chunks/toast.B2cJgW5u.js +71 -0
- package/library/chunks/transformation.CzBptarI.js +140 -0
- package/library/chunks/{tree.CeMLCbs-.js → tree.QCQd_cuc.js} +32 -400
- package/library/chunks/typography.DJC_UXgs.js +52 -0
- package/library/chunks/url.Cj9cIQXJ.js +27 -0
- package/library/chunks/{venn.BOEi13la.js → venn.D739bOV3.js} +1 -1
- package/library/chunks/watch.BCJD77bD.js +547 -0
- package/library/chunks/{wc.V-lq02JF.js → wc.DzW311D-.js} +1 -1
- package/library/chunks/{xy.Df1hy9ac.js → xy.DCRDfTsa.js} +10 -10
- package/library/components/alert.js +11 -179
- package/library/components/am-chart.js +3 -3
- package/library/components/animated-image.js +13 -101
- package/library/components/animation.js +3 -3
- package/library/components/array-line-clamp.js +8 -89
- package/library/components/asset-link-format.js +718 -1380
- package/library/components/atoms.js +18 -18
- package/library/components/avatar.js +6 -95
- package/library/components/badge.js +11 -139
- package/library/components/bicolor-picker.js +4 -23
- package/library/components/border-input-group.js +5 -26
- package/library/components/breadcrumb-item.js +25 -156
- package/library/components/breadcrumb.js +4 -22
- package/library/components/button-group.js +3 -28
- package/library/components/button.js +6 -6
- package/library/components/card.js +4 -126
- package/library/components/checkbox.js +13 -254
- package/library/components/color-picker.js +57 -728
- package/library/components/color-swatch-group.js +9 -9
- package/library/components/color-swatch.js +5 -5
- package/library/components/confirm-popover.js +6 -6
- package/library/components/copy-button.js +11 -256
- package/library/components/corner-position-input-group.js +5 -58
- package/library/components/cropper.js +2 -2
- package/library/components/details.js +6 -152
- package/library/components/dialog.js +6 -6
- package/library/components/divider.js +6 -68
- package/library/components/dot-pagination.js +4 -4
- package/library/components/dot-status.js +25 -95
- package/library/components/drawer.js +11 -242
- package/library/components/dropdown.js +49 -151
- package/library/components/dynamic-select.js +10 -75
- package/library/components/e-chart.js +8 -51
- package/library/components/element-clamp.js +7 -80
- package/library/components/file-on-demand.js +13 -13
- package/library/components/folder-select.js +9 -7
- package/library/components/format-bytes.js +1 -1
- package/library/components/format-date.js +3 -7
- package/library/components/format-number.js +1 -1
- package/library/components/format-time.js +4 -14
- package/library/components/grid-item.js +5 -172
- package/library/components/grid.js +5 -41
- package/library/components/header.js +4 -4
- package/library/components/hub-connection.js +2 -2
- package/library/components/icon-button.js +14 -679
- package/library/components/icon.js +9 -2449
- package/library/components/iframe.js +4 -4
- package/library/components/image-comparer.js +9 -129
- package/library/components/image.js +4 -4
- package/library/components/include.js +3 -7
- package/library/components/input-group.js +4 -29
- package/library/components/input.js +358 -966
- package/library/components/line-clamp.js +7 -83
- package/library/components/list-editor.js +9 -9
- package/library/components/markdown.js +2 -4
- package/library/components/masonry.js +24 -223
- package/library/components/menu-item.js +155 -445
- package/library/components/menu-label.js +3 -20
- package/library/components/menu-section.js +3 -17
- package/library/components/menu.js +5 -113
- package/library/components/molecules.js +5 -5
- package/library/components/mutation-observer.js +3 -7
- package/library/components/option.js +4 -4
- package/library/components/organisms.js +2 -2
- package/library/components/padding-input-group.js +5 -16
- package/library/components/pagination.js +10 -8
- package/library/components/popup.js +385 -682
- package/library/components/position-picker.js +4 -94
- package/library/components/progress-bar.js +19 -136
- package/library/components/progress-ring.js +4 -95
- package/library/components/qr-code.js +5 -17
- package/library/components/radio-button.js +5 -25
- package/library/components/radio-card.js +8 -176
- package/library/components/radio-group.js +22 -153
- package/library/components/radio.js +14 -171
- package/library/components/range.js +123 -660
- package/library/components/rating.js +58 -238
- package/library/components/relative-time.js +3 -13
- package/library/components/resize-observer.js +4 -8
- package/library/components/select.js +305 -1012
- package/library/components/shadow-input-group.js +5 -24
- package/library/components/share-option-list.js +21 -313
- package/library/components/sidebar.js +15 -221
- package/library/components/size-input-group.js +12 -77
- package/library/components/skeleton.js +7 -80
- package/library/components/space.js +6 -143
- package/library/components/spinner.js +7 -76
- package/library/components/split-panel.js +18 -125
- package/library/components/step.js +21 -272
- package/library/components/stepper-wizard.js +9 -43
- package/library/components/stepper.js +17 -34
- package/library/components/switch.js +13 -276
- package/library/components/tab-group.js +7 -7
- package/library/components/tab-panel.js +5 -32
- package/library/components/tab.js +11 -257
- package/library/components/table.js +8 -8
- package/library/components/tag.js +15 -166
- package/library/components/textarea.js +183 -504
- package/library/components/timecode.js +6 -25
- package/library/components/tooltip.js +10 -94
- package/library/components/tree-item.js +4 -4
- package/library/components/tree.js +4 -4
- package/library/components/typeface.js +24 -123
- package/library/components/types.js +37225 -47339
- package/library/components/typography.js +2 -2
- package/library/components/video.js +3875 -6263
- package/library/components/visually-hidden.js +3 -15
- package/library/package.json +4 -1
- package/library/packages/atoms/src/components/dialog/dialog.d.ts +10 -0
- package/library/packages/atoms/src/components/icon-button/icon-button.d.ts +2 -1
- package/library/packages/atoms/src/components/image/image.d.ts +15 -1
- package/library/packages/atoms/src/components/input/auto-grow-controller.d.ts +23 -0
- package/library/packages/atoms/src/components/input/input.d.ts +10 -2
- package/library/packages/atoms/src/components/menu-item/menu-item.d.ts +4 -0
- package/library/packages/atoms/src/components/pagination/pagination.d.ts +32 -2
- package/library/packages/atoms/src/components/popup/overlay/Overlay.d.ts +10 -0
- package/library/packages/atoms/src/components/popup/popup.d.ts +1 -1
- package/library/packages/atoms/src/components/select/select.d.ts +11 -0
- package/library/packages/atoms/src/components/table/table.d.ts +49 -8
- package/library/packages/atoms/src/components/table/tabulator-tables/core/Tabulator.d.ts +1 -0
- package/library/packages/atoms/src/components/table/tabulator-tables/core/TabulatorFull.d.ts +1 -0
- package/library/packages/atoms/src/components/table/tabulator-tables/core/tools/DataLoader.d.ts +3 -1
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/Ajax/Ajax.d.ts +1 -1
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/Edit/Edit.d.ts +1 -0
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/Edit/List.d.ts +40 -1
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/Filter/Filter.d.ts +10 -3
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/Filter/formatter-display-resolvers.d.ts +93 -0
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/GroupRows/Group.d.ts +8 -0
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/GroupRows/GroupComponent.d.ts +3 -1
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/GroupRows/GroupLoadMore.d.ts +7 -0
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/GroupRows/GroupRows.d.ts +2 -0
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/Page/Page.d.ts +2 -2
- package/library/packages/atoms/src/components/textarea/textarea.d.ts +19 -4
- package/library/packages/atoms/src/components/video/video.d.ts +3 -1
- package/library/packages/events/src/cx-asset-transformation-dialog-cancel.d.ts +6 -0
- package/library/packages/events/src/cx-asset-transformation-dialog-confirm.d.ts +11 -0
- package/library/packages/events/src/cx-asset-transformation-dialog-delete.d.ts +6 -0
- package/library/packages/events/src/cx-bento-range-change.d.ts +9 -0
- package/library/packages/events/src/cx-content-builder-gallery-fetched.d.ts +10 -0
- package/library/packages/events/src/cx-lightbox-close.d.ts +6 -0
- package/library/packages/events/src/cx-lightbox-download.d.ts +11 -0
- package/library/packages/events/src/cx-unauthorized.d.ts +10 -0
- package/library/packages/events/src/cx-video-format-picker-delete.d.ts +6 -0
- package/library/packages/events/src/cx-video-format-picker-select.d.ts +8 -0
- package/library/packages/events/src/events.d.ts +11 -1
- package/library/packages/molecules/src/cropper/cropper.d.ts +2 -0
- package/library/packages/molecules/src/cropper/react/Cropper.d.ts +2 -0
- package/library/packages/molecules/src/estimated-reading-time/estimated-reading-time.d.ts +3 -2
- package/library/packages/molecules/src/folder-select/components/folder-select-tree/folder-select-tree.d.ts +26 -0
- package/library/packages/molecules/src/folder-select/components/folder-select-tree-item/folder-select-tree-item.d.ts +46 -0
- package/library/packages/molecules/src/folder-select/folder-select.d.ts +25 -0
- package/library/packages/molecules/src/index.d.ts +1 -0
- package/library/packages/molecules/src/storybook/storybook.d.ts +60 -23
- package/library/packages/molecules/src/timeline/timeline.d.ts +14 -0
- package/library/packages/molecules/src/video-format-picker/video-format-picker.d.ts +55 -0
- package/library/packages/molecules/src/video-format-picker/video-format-picker.styles.d.ts +2 -0
- package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +9 -1
- package/library/packages/organisms/src/asset-link-format/components/asset-link-format-rotation/asset-link-format-rotation.d.ts +7 -7
- package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.d.ts +95 -0
- package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.styles.d.ts +2 -0
- package/library/packages/organisms/src/bento-grid/bento-grid.d.ts +57 -26
- package/library/packages/organisms/src/bento-grid/bento-layout.d.ts +44 -0
- package/library/packages/organisms/src/carousel/carousel.d.ts +5 -1
- package/library/packages/organisms/src/comment/comment.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/components/block-picker/block-picker.d.ts +7 -0
- package/library/packages/organisms/src/content-builder/components/config-form/config-form.d.ts +11 -0
- package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +10 -0
- package/library/packages/organisms/src/content-builder/components/folder-picker/folder-picker.d.ts +6 -0
- package/library/packages/organisms/src/content-builder/configs/carousel.d.ts +6 -2
- package/library/packages/organisms/src/content-builder/configs/gallery.d.ts +6 -2
- package/library/packages/organisms/src/content-builder/configs/image.d.ts +7 -4
- package/library/packages/organisms/src/content-builder/configs/timeline.d.ts +5 -2
- package/library/packages/organisms/src/content-builder/configs/video.d.ts +11 -2
- package/library/packages/organisms/src/content-builder/configs-controller.d.ts +45 -4
- package/library/packages/organisms/src/content-builder/content-builder.d.ts +13 -0
- package/library/packages/organisms/src/content-builder/plugins/gallery.d.ts +45 -1
- package/library/packages/organisms/src/content-builder/styleController.d.ts +20 -2
- package/library/packages/organisms/src/index.d.ts +2 -0
- package/library/packages/organisms/src/lightbox/lightbox.d.ts +79 -0
- package/library/packages/organisms/src/lightbox/lightbox.styles.d.ts +2 -0
- package/library/packages/services/src/api/asset/asset.d.ts +3 -2
- package/library/packages/services/src/api/asset/asset.types.d.ts +84 -0
- package/library/packages/services/src/api/asset/asset.utils.d.ts +9 -0
- package/library/packages/services/src/api/endpoints.d.ts +1 -1
- package/library/packages/tools/src/fetch-asset/fetch-asset.d.ts +2 -1
- package/library/packages/tools/src/fetch-image/fetch-image.d.ts +17 -5
- package/library/packages/types/src/asset-click-action.d.ts +3 -1
- package/library/packages/types/src/bento-grid.d.ts +37 -0
- package/library/packages/types/src/content-builder.d.ts +27 -1
- package/library/packages/types/src/gallery.d.ts +0 -6
- package/library/packages/types/src/icon-button.d.ts +7 -0
- package/library/packages/types/src/menu-item.d.ts +33 -0
- package/library/packages/types/src/storybook.d.ts +19 -0
- package/library/packages/types/src/table.d.ts +37 -1
- package/library/packages/types/src/textarea.d.ts +4 -0
- package/library/packages/types/src/video-format-picker.d.ts +11 -0
- package/library/packages/utils/src/actions/asset-click.d.ts +1 -3
- package/library/packages/utils/src/custom-element/i18n.d.ts +10 -3
- package/library/packages/utils/src/index.d.ts +1 -0
- package/library/packages/utils/src/string/string.d.ts +33 -0
- package/library/packages/utils/src/transformation/index.d.ts +1 -0
- package/library/packages/utils/src/url/url.d.ts +9 -0
- package/library/react-web-component.d.ts +293 -29
- package/library/utils.js +483 -178
- package/package.json +4 -1
- package/library/chunks/_baseRest.ClTMQtN1.js +0 -67
- package/library/chunks/asset.CG_yXtWK.js +0 -288
- package/library/chunks/button.styles.Dl5IQLHU.js +0 -718
- package/library/chunks/component.styles.DMSLciL5.js +0 -71
- package/library/chunks/confirm-popover.zmOFI4e-.js +0 -288
- package/library/chunks/content-builder.D_phDrlo.js +0 -127
- package/library/chunks/dot-pagination.COBkyhoJ.js +0 -325
- package/library/chunks/file-on-demand.CbE-qsiP.js +0 -3740
- package/library/chunks/folder-select.Bl_WkhVE.js +0 -844
- package/library/chunks/form-control.styles.CUGhvlfT.js +0 -67
- package/library/chunks/header.BduX6KJP.js +0 -777
- package/library/chunks/identity.ByMq8VxU.js +0 -6
- package/library/chunks/iframe.BPKV2K7z.js +0 -160
- package/library/chunks/index.B3wJT3XS.js +0 -373
- package/library/chunks/isObjectLike.D3cpZO39.js +0 -81
- package/library/chunks/option.DnpkE8Xi.js +0 -296
- package/library/chunks/pagination.C30LoTya.js +0 -341
- package/library/chunks/string.B_rEG27K.js +0 -160
- package/library/chunks/toast.BXNbwZV8.js +0 -25
- package/library/chunks/typography.oDzoLbZS.js +0 -149
- package/library/chunks/url.LjsR2sB5.js +0 -15
- package/library/chunks/watch.q1sEjPWL.js +0 -501
- /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
|
|
2
|
-
import { c as
|
|
3
|
-
import { c as
|
|
4
|
-
import { d as
|
|
5
|
-
import { H as
|
|
6
|
-
import { w as
|
|
7
|
-
import { i as
|
|
8
|
-
import { e as
|
|
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
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { e as
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
|
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 + (
|
|
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
|
|
307
|
-
if (!
|
|
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
|
|
315
|
-
for (const r of
|
|
316
|
-
if (
|
|
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 (!
|
|
91
|
+
if (!t || t.length === 0) {
|
|
319
92
|
this.host.lazy && (e.preventDefault(), e.stopPropagation(), this.enableSubmenu(!1));
|
|
320
93
|
return;
|
|
321
94
|
}
|
|
322
|
-
|
|
323
|
-
for (let r = 1; r !==
|
|
324
|
-
|
|
325
|
-
this.popupRef.value && (e.preventDefault(), e.stopPropagation(), this.popupRef.value.active ?
|
|
326
|
-
|
|
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
|
|
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 &&
|
|
117
|
+
e.target !== this.host && !this.isHorizontalMenu && s();
|
|
345
118
|
break;
|
|
346
119
|
}
|
|
347
120
|
case "ArrowUp": {
|
|
348
|
-
e.target !== this.host && this.isHorizontalMenu &&
|
|
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
|
|
369
|
-
this.host && !
|
|
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
|
|
382
|
-
if (!
|
|
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 } =
|
|
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
|
-
`${
|
|
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
|
-
`${
|
|
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(),
|
|
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 && (
|
|
416
|
-
const u = l.reduce((c,
|
|
417
|
-
const
|
|
418
|
-
return c +
|
|
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 =
|
|
199
|
+
const e = g(this.host) === "rtl";
|
|
427
200
|
if (!this.hasSlotController.test("submenu"))
|
|
428
201
|
return null;
|
|
429
|
-
const
|
|
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
|
|
452
|
-
for (var r =
|
|
453
|
-
(u =
|
|
454
|
-
return
|
|
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
|
|
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
|
|
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
|
|
217
|
+
), this.submenuController = new I(
|
|
463
218
|
this,
|
|
464
219
|
this.hasSlotController
|
|
465
|
-
), this.handleDocumentWheel = (
|
|
466
|
-
const e =
|
|
467
|
-
this.submenuController.isExpanded() && (!this.submenuController.popup || !e.includes(this.submenuController.popup)) && (
|
|
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
|
|
234
|
+
const n = this.getTextLabel();
|
|
480
235
|
if (typeof this.cachedTextLabel > "u") {
|
|
481
|
-
this.cachedTextLabel =
|
|
236
|
+
this.cachedTextLabel = n;
|
|
482
237
|
return;
|
|
483
238
|
}
|
|
484
|
-
|
|
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(
|
|
491
|
-
(this.disabled || this.readonly) && (
|
|
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(
|
|
494
|
-
|
|
248
|
+
handleMouseOver(n) {
|
|
249
|
+
n.stopPropagation();
|
|
495
250
|
}
|
|
496
|
-
handleAnchorClick(
|
|
497
|
-
|
|
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
|
|
272
|
+
return P(this.defaultSlot);
|
|
518
273
|
}
|
|
519
274
|
isSubmenu() {
|
|
520
275
|
return this.hasSlotController.test("submenu") || !!this.menu.trim();
|
|
521
276
|
}
|
|
522
|
-
renderBase(
|
|
523
|
-
const e = !!this.href,
|
|
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":
|
|
537
|
-
"menu-item--submenu-expanded":
|
|
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":
|
|
563
|
-
"menu-item--submenu-expanded":
|
|
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
|
|
302
|
+
const n = this.localize.dir() === "rtl";
|
|
574
303
|
let e;
|
|
575
|
-
|
|
576
|
-
|
|
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
|
-
|
|
585
|
-
|
|
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
|
-
|
|
612
|
-
|
|
613
|
-
"cx-icon":
|
|
614
|
-
"cx-popup":
|
|
615
|
-
"cx-spinner":
|
|
318
|
+
i.styles = [C, O];
|
|
319
|
+
i.dependencies = {
|
|
320
|
+
"cx-icon": z,
|
|
321
|
+
"cx-popup": D,
|
|
322
|
+
"cx-spinner": $
|
|
616
323
|
};
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
],
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
],
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
],
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
],
|
|
629
|
-
|
|
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
|
-
],
|
|
632
|
-
|
|
338
|
+
], i.prototype, "type", 2);
|
|
339
|
+
o([
|
|
633
340
|
a({ attribute: "submenu-trigger" })
|
|
634
|
-
],
|
|
635
|
-
|
|
341
|
+
], i.prototype, "submenuTrigger", 2);
|
|
342
|
+
o([
|
|
636
343
|
a({ reflect: !0, type: Boolean })
|
|
637
|
-
],
|
|
638
|
-
|
|
344
|
+
], i.prototype, "checked", 2);
|
|
345
|
+
o([
|
|
639
346
|
a()
|
|
640
|
-
],
|
|
641
|
-
|
|
347
|
+
], i.prototype, "value", 2);
|
|
348
|
+
o([
|
|
642
349
|
a()
|
|
643
|
-
],
|
|
644
|
-
|
|
350
|
+
], i.prototype, "href", 2);
|
|
351
|
+
o([
|
|
645
352
|
a()
|
|
646
|
-
],
|
|
647
|
-
|
|
353
|
+
], i.prototype, "target", 2);
|
|
354
|
+
o([
|
|
648
355
|
a()
|
|
649
|
-
],
|
|
650
|
-
|
|
356
|
+
], i.prototype, "rel", 2);
|
|
357
|
+
o([
|
|
651
358
|
a()
|
|
652
|
-
],
|
|
653
|
-
|
|
359
|
+
], i.prototype, "download", 2);
|
|
360
|
+
o([
|
|
654
361
|
a({ reflect: !0, type: Boolean })
|
|
655
|
-
],
|
|
656
|
-
|
|
362
|
+
], i.prototype, "loading", 2);
|
|
363
|
+
o([
|
|
657
364
|
a({ reflect: !0, type: Boolean })
|
|
658
|
-
],
|
|
659
|
-
|
|
365
|
+
], i.prototype, "disabled", 2);
|
|
366
|
+
o([
|
|
660
367
|
a({ reflect: !0, type: Boolean })
|
|
661
|
-
],
|
|
662
|
-
|
|
368
|
+
], i.prototype, "active", 2);
|
|
369
|
+
o([
|
|
663
370
|
a({ reflect: !0, type: Boolean })
|
|
664
|
-
],
|
|
665
|
-
|
|
371
|
+
], i.prototype, "readonly", 2);
|
|
372
|
+
o([
|
|
666
373
|
a({ attribute: "flip-boundary", type: Object })
|
|
667
|
-
],
|
|
668
|
-
|
|
374
|
+
], i.prototype, "flipBoundary", 2);
|
|
375
|
+
o([
|
|
669
376
|
a({ attribute: "shift-boundary", type: Object })
|
|
670
|
-
],
|
|
671
|
-
|
|
377
|
+
], i.prototype, "shiftBoundary", 2);
|
|
378
|
+
o([
|
|
672
379
|
a({ reflect: !0 })
|
|
673
|
-
],
|
|
674
|
-
|
|
380
|
+
], i.prototype, "menu", 2);
|
|
381
|
+
o([
|
|
675
382
|
a({ attribute: "always-show-checked-icon", reflect: !0, type: Boolean })
|
|
676
|
-
],
|
|
677
|
-
|
|
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
|
-
],
|
|
680
|
-
|
|
389
|
+
], i.prototype, "submenuPlacement", 2);
|
|
390
|
+
o([
|
|
681
391
|
a({ reflect: !0, type: Boolean })
|
|
682
|
-
],
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
],
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
],
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
],
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
],
|
|
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
|
-
|
|
406
|
+
i as default
|
|
697
407
|
};
|