@orangelogic/design-system 3.0.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/library/chunks/{asset-link-format.D--xQVgR.js → asset-link-format.BnIUG_vO.js} +19 -18
  2. package/library/chunks/{button.BnkkUqiI.js → button.CpY4FCwE.js} +1 -1
  3. package/library/chunks/{color-swatch-group.CCgwey9f.js → color-swatch-group.CTcv62MK.js} +367 -330
  4. package/library/chunks/{color-swatch.D6Gg5bpz.js → color-swatch.Caved2kL.js} +1 -1
  5. package/library/chunks/{confirm-popover.CrQKEChc.js → confirm-popover.BSS1VhB2.js} +3 -3
  6. package/library/chunks/content-builder.BX4pHujE.js +60 -0
  7. package/library/chunks/{dialog.CWGtufDA.js → dialog.ICoCAj6Z.js} +4 -4
  8. package/library/chunks/{document-viewer.C90j1Xrr.js → document-viewer.D6PxGcEL.js} +8 -7
  9. package/library/chunks/{dot-pagination.BqGFeFXK.js → dot-pagination.CzVpiv00.js} +1 -1
  10. package/library/chunks/{folder-select.CIqVGGFl.js → folder-select.DN-JomDt.js} +4 -4
  11. package/library/chunks/{header.CWlWNree.js → header.BQg_JjHw.js} +1 -1
  12. package/library/chunks/{i18n.DbXTTLXx.js → i18n.BA19xtyU.js} +6 -3
  13. package/library/chunks/{icon-button.CVrxJcZq.js → icon-button.BWJ1Vqn5.js} +17 -11
  14. package/library/chunks/{iframe.-GCTFas1.js → iframe.Dm-nXSBv.js} +1 -1
  15. package/library/chunks/{image.CTMzUqCC.js → image.B-4cVbol.js} +187 -188
  16. package/library/chunks/{input.33UmFGqR.js → input.xgeLCG8I.js} +1 -1
  17. package/library/chunks/{markdown.DOHru2Rz.js → markdown.bkEjjjS9.js} +2 -2
  18. package/library/chunks/menu-item.DgUMVYe5.js +493 -0
  19. package/library/chunks/{option.B6odSlS2.js → option.jeaj7_Lr.js} +1 -1
  20. package/library/chunks/{pagination.mzolTIpF.js → pagination.CSPKsj4y.js} +5 -5
  21. package/library/chunks/{tab-group.uSHlsFu8.js → tab-group.BSl6GdIO.js} +4 -4
  22. package/library/chunks/{toast.CXEAfCvN.js → toast.C5Ir5yKA.js} +1 -1
  23. package/library/chunks/transformation.CWKaoGaY.js +254 -0
  24. package/library/chunks/{tree.CmEdKtzK.js → tree.DYFFjW1-.js} +1 -1
  25. package/library/components/alert.js +2 -2
  26. package/library/components/asset-link-format.js +4 -4
  27. package/library/components/atoms.js +31 -31
  28. package/library/components/audio.js +2 -2
  29. package/library/components/border-input-group.js +2 -2
  30. package/library/components/breadcrumb.js +1 -1
  31. package/library/components/button.js +2 -2
  32. package/library/components/color-picker.js +3 -3
  33. package/library/components/color-swatch-group.js +5 -5
  34. package/library/components/color-swatch.js +2 -2
  35. package/library/components/confirm-popover.js +4 -4
  36. package/library/components/copy-button.js +1 -1
  37. package/library/components/corner-position-input-group.js +3 -3
  38. package/library/components/date-calendar.js +1 -1
  39. package/library/components/details.js +1 -1
  40. package/library/components/dialog.js +3 -3
  41. package/library/components/document-viewer.js +3 -3
  42. package/library/components/dot-pagination.js +2 -2
  43. package/library/components/drawer.js +4 -4
  44. package/library/components/dropdown.js +2 -2
  45. package/library/components/dynamic-select.js +4 -4
  46. package/library/components/e-chart.js +1 -1
  47. package/library/components/element-clamp.js +2 -2
  48. package/library/components/file-on-demand.js +9 -9
  49. package/library/components/folder-select.js +4 -4
  50. package/library/components/format-bytes.js +1 -1
  51. package/library/components/format-date.js +1 -1
  52. package/library/components/format-number.js +1 -1
  53. package/library/components/format-time.js +1 -1
  54. package/library/components/header.js +2 -2
  55. package/library/components/icon-button.js +2 -2
  56. package/library/components/iframe.js +2 -2
  57. package/library/components/image-comparer.js +1 -1
  58. package/library/components/image.js +3 -4
  59. package/library/components/input.js +2 -2
  60. package/library/components/line-clamp.js +1 -1
  61. package/library/components/markdown.js +3 -3
  62. package/library/components/masonry.js +113 -100
  63. package/library/components/menu-item.js +15 -483
  64. package/library/components/menu.js +20 -20
  65. package/library/components/molecules.js +3 -3
  66. package/library/components/option.js +2 -2
  67. package/library/components/organisms.js +2 -2
  68. package/library/components/padding-input-group.js +1 -1
  69. package/library/components/pagination.js +6 -6
  70. package/library/components/popup.js +101 -98
  71. package/library/components/position-picker.js +1 -1
  72. package/library/components/progress-bar.js +1 -1
  73. package/library/components/progress-ring.js +1 -1
  74. package/library/components/range.js +1 -1
  75. package/library/components/rating.js +1 -1
  76. package/library/components/relative-time.js +1 -1
  77. package/library/components/select.js +18 -13
  78. package/library/components/shadow-input-group.js +1 -1
  79. package/library/components/share-option-list.js +1 -1
  80. package/library/components/sidebar.js +1 -1
  81. package/library/components/size-input-group.js +3 -3
  82. package/library/components/spinner.js +1 -1
  83. package/library/components/split-panel.js +1 -1
  84. package/library/components/tab-group.js +5 -5
  85. package/library/components/tab.js +2 -2
  86. package/library/components/tag.js +2 -2
  87. package/library/components/tooltip.js +1 -1
  88. package/library/components/tree-item.js +2 -2
  89. package/library/components/tree.js +2 -2
  90. package/library/components/typeface.js +2 -2
  91. package/library/components/types.js +18617 -18388
  92. package/library/components/video.js +2 -2
  93. package/library/package.json +1 -1
  94. package/library/packages/atoms/src/components/icon-button/icon-button.d.ts +11 -0
  95. package/library/packages/atoms/src/components/image/image.d.ts +30 -4
  96. package/library/packages/atoms/src/components/menu-item/menu-item.d.ts +5 -2
  97. package/library/packages/atoms/src/components/menu-item/submenu-controller.d.ts +1 -0
  98. package/library/packages/atoms/src/components/popup/popup.d.ts +11 -0
  99. package/library/packages/atoms/src/components/select/select.d.ts +8 -0
  100. package/library/packages/hybrid/table-core/src/table/styles/table-frozen.styles.d.ts +4 -4
  101. package/library/packages/hybrid/table-core/src/table/styles/table-overlay-scrollbar.styles.d.ts +8 -5
  102. package/library/packages/hybrid/table-core/src/table/table.d.ts +2 -12
  103. package/library/packages/hybrid/table-core/src/tabulator-tables/core/RowManager.d.ts +1 -0
  104. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/ResizeColumns/ResizeColumns.d.ts +5 -3
  105. package/library/packages/molecules/src/gallery-item/gallery-item.d.ts +10 -0
  106. package/library/packages/molecules/src/icon-picker/icon-picker.d.ts +1 -0
  107. package/library/packages/molecules/src/masonry/masonry.d.ts +9 -0
  108. package/library/packages/molecules/src/view-and-sort/view-and-sort.d.ts +8 -0
  109. package/library/packages/organisms/src/bento-grid/bento-grid.d.ts +88 -0
  110. package/library/packages/organisms/src/comment/components/comment-menu/comment-menu.d.ts +10 -0
  111. package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +11 -1
  112. package/library/packages/organisms/src/content-builder/content-builder.d.ts +31 -6
  113. package/library/packages/organisms/src/downloader/downloader.d.ts +1 -1
  114. package/library/packages/types/src/menu-item.d.ts +12 -1
  115. package/library/packages/utils/src/custom-element/i18n.d.ts +3 -0
  116. package/library/packages/utils/src/transformation/transformation.d.ts +52 -0
  117. package/library/react-web-component.d.ts +25 -1
  118. package/library/utils.js +173 -167
  119. package/package.json +1 -1
  120. package/library/chunks/transformation.8uLv6uwG.js +0 -264
@@ -1,485 +1,17 @@
1
- import { n as r, C as w } from "../chunks/lib-cortex-element.CVMmyPMC.js";
2
- import { c as _ } from "../chunks/component.styles.CRO4Odto.js";
3
- import { c as L } from "../chunks/custom-element.L4WJXn1j.js";
4
- import { d as g, L as M } from "../chunks/i18n.DbXTTLXx.js";
5
- import { H as z, g as P } from "../chunks/slot.j5oheLJC.js";
6
- import { w as p } from "../chunks/watch.DJF5K-8U.js";
7
- import { i as E, x as h, E as y } from "../chunks/lit-element.jLBm65_O.js";
8
- import { e as b } from "../chunks/query.BBf1UFkC.js";
9
- import { e as v } from "../chunks/class-map.BiVq-cVR.js";
10
- import { o as m } from "../chunks/if-defined.BRoBj_Rp.js";
11
- import { C as T } from "../chunks/icon.CpHbi8tH.js";
12
- import R from "./popup.js";
13
- import $ from "./spinner.js";
14
- import { f as k } from "../chunks/focus-when-visible.jWSw9ks0.js";
15
- import { e as D, n as O } from "../chunks/ref.DktKp7fP.js";
16
- var d = /* @__PURE__ */ ((o) => (o.Prefix = "prefix", o.Suffix = "suffix", o))(d || {});
17
- const I = E`:host{--submenu-offset:0px;--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(--checked-icon-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-medium)}.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{width:var(--checked-icon-size,1.5em);visibility:hidden;flex:none;justify-content:center;align-items:center}.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,0px);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}`;
18
- class A {
19
- constructor(e, t) {
20
- 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.focusVisibilityTimeoutMs = 1e4, this.lazyLoadObserver = null, this.pendingFocusCancel = null, (this.host = e).addController(this), this.hasSlotController = t, 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);
21
- }
22
- get popup() {
23
- return this.popupRef.value;
24
- }
25
- hostConnected() {
26
- this.parent = this.host.closest("cx-menu"), this.hasSlotController.test("submenu") && !this.host.disabled && (this.addListeners(), this.updateSkidding()), this.parent && (this.syncIsHorizontalMenu(), this.parentObserver = new MutationObserver(() => {
27
- this.syncIsHorizontalMenu();
28
- }), this.parentObserver.observe(this.parent, {
29
- attributeFilter: ["horizontal"]
30
- }));
31
- }
32
- hostDisconnected() {
33
- this.removeListeners(), this.parentObserver && this.parentObserver.disconnect(), this.cancelPendingFocus();
34
- }
35
- hostUpdated() {
36
- this.removeListeners(), this.hasSlotController.test("submenu") && !this.host.disabled && (this.addListeners(), this.updateSkidding(), this.syncIsHorizontalMenu());
37
- }
38
- addListeners() {
39
- this.isConnected || (this.host.addEventListener("mousemove", this.handleMouseMove), (this.host.submenuTrigger === "both" || this.host.submenuTrigger === "hover") && (this.host.addEventListener("mouseover", this.handleMouseOver), this.host.addEventListener("mouseleave", this.handleMouseLeave)), (this.host.submenuTrigger === "both" || this.host.submenuTrigger === "click") && (this.host.addEventListener("click", this.handleClick), this.host.submenuIcon?.addEventListener(
40
- "click",
41
- this.handleSubmenuIconClick
42
- ), document.addEventListener("mousedown", this.handleDocumentMouseDown)), this.host.addEventListener("keydown", this.handleKeyDown), this.isConnected = !0), this.isPopupConnected || this.popupRef.value && (this.popupRef.value.addEventListener(
43
- "mouseover",
44
- this.handlePopupMouseover
45
- ), this.popupRef.value.addEventListener(
46
- "cx-reposition",
47
- this.handlePopupReposition
48
- ), this.isPopupConnected = !0);
49
- }
50
- removeListeners() {
51
- this.isConnected && (this.host.removeEventListener("mousemove", this.handleMouseMove), this.host.removeEventListener("mouseover", this.handleMouseOver), this.host.removeEventListener("mouseleave", this.handleMouseLeave), this.host.removeEventListener("click", this.handleClick), this.host.submenuIcon?.removeEventListener(
52
- "click",
53
- this.handleSubmenuIconClick
54
- ), document.removeEventListener("mousedown", this.handleDocumentMouseDown), this.host.removeEventListener("keydown", this.handleKeyDown), this.isConnected = !1), this.isPopupConnected && this.popupRef.value && (this.popupRef.value.removeEventListener(
55
- "mouseover",
56
- this.handlePopupMouseover
57
- ), this.popupRef.value.removeEventListener(
58
- "cx-reposition",
59
- this.handlePopupReposition
60
- ), this.isPopupConnected = !1);
61
- }
62
- syncIsHorizontalMenu() {
63
- this.parent && (this.isHorizontalMenu = this.parent.hasAttribute("horizontal"));
64
- }
65
- // Set the safe triangle cursor position
66
- handleMouseMove(e) {
67
- const t = getComputedStyle(this.host).direction === "rtl" || this.popupRef.value?.dataset.currentPlacement?.startsWith("left");
68
- this.host.style.setProperty(
69
- "--safe-triangle-cursor-x",
70
- `${e.clientX + (t ? 1 : 0)}px`
71
- ), this.host.style.setProperty(
72
- "--safe-triangle-cursor-y",
73
- `${e.clientY}px`
74
- );
75
- }
76
- handleMouseOver() {
77
- this.hasSlotController.test("submenu") && this.enableSubmenu();
78
- }
79
- handleSubmenuEntry(e) {
80
- const t = this.host.renderRoot.querySelector("slot[name='submenu']");
81
- if (!t) {
82
- console.error(
83
- "Cannot activate a submenu if no corresponding menuitem can be found.",
84
- this
85
- );
86
- return;
87
- }
88
- const s = this.queryMenuItems(t);
89
- if (!s || s.length === 0) {
90
- this.host.lazy && (e.preventDefault(), e.stopPropagation(), this.focusFirstMenuItemAfterLazyLoad(t));
91
- return;
92
- }
93
- this.setRovingTabIndex(s), this.popupRef.value && (e.preventDefault(), e.stopPropagation(), this.popupRef.value.active || this.enableSubmenu(!1), s[0] instanceof HTMLElement && (this.pendingFocusCancel?.(), this.pendingFocusCancel = k(
94
- s[0],
95
- this.focusVisibilityTimeoutMs
96
- )));
97
- }
98
- // Sets up the roving tabindex for a freshly revealed set of submenu items: first item tabbable, rest not.
99
- setRovingTabIndex(e) {
100
- e[0].setAttribute("tabindex", "0");
101
- for (let t = 1; t !== e.length; ++t)
102
- e[t].setAttribute("tabindex", "-1");
103
- }
104
- // Find the first menu-item (or menuitem-role element) assigned to the submenu slot, if any exist yet.
105
- queryMenuItems(e) {
106
- let t = null;
107
- for (const s of e.assignedElements())
108
- if (t = s.querySelectorAll("cx-menu-item, [role^='menuitem']"), t.length !== 0)
109
- break;
110
- return t;
111
- }
112
- // Disconnect any pending lazy-load item watch and cancel any pending focus attempt (submenu closed, host
113
- // disconnected, or the item was already found/focused).
114
- cancelPendingFocus() {
115
- this.lazyLoadObserver?.disconnect(), this.lazyLoadObserver = null, this.pendingFocusCancel?.(), this.pendingFocusCancel = null;
116
- }
117
- /**
118
- * Enables the submenu and, once its content finishes loading and the first menu-item appears, focuses it.
119
- * focusWhenVisible already tolerates the popup not being visually ready yet, so this only needs to wait for
120
- * the item itself to exist.
121
- */
122
- focusFirstMenuItemAfterLazyLoad(e) {
123
- this.lazyLoadObserver?.disconnect(), this.lazyLoadObserver = new MutationObserver(() => {
124
- const t = this.queryMenuItems(e), s = t?.[0];
125
- !(s instanceof HTMLElement) || !t || (this.setRovingTabIndex(t), this.lazyLoadObserver?.disconnect(), this.lazyLoadObserver = null, this.pendingFocusCancel?.(), this.pendingFocusCancel = k(
126
- s,
127
- this.focusVisibilityTimeoutMs
128
- ));
129
- });
130
- for (const t of e.assignedElements())
131
- this.lazyLoadObserver.observe(t, { childList: !0, subtree: !0 });
132
- this.enableSubmenu(!1);
133
- }
134
- // Focus on the first menu-item of a submenu.
135
- handleKeyDown(e) {
136
- const t = () => {
137
- e.preventDefault(), e.stopPropagation(), this.host.focus(), this.disableSubmenu();
138
- };
139
- switch (e.key) {
140
- case "Tab": {
141
- this.disableSubmenu();
142
- break;
143
- }
144
- case "Escape": {
145
- this.host.focus(), this.disableSubmenu();
146
- break;
147
- }
148
- case "ArrowLeft": {
149
- e.target !== this.host && !this.isHorizontalMenu && t();
150
- break;
151
- }
152
- case "ArrowUp": {
153
- e.target !== this.host && this.isHorizontalMenu && t();
154
- break;
155
- }
156
- case "ArrowRight": {
157
- this.isHorizontalMenu || this.handleSubmenuEntry(e);
158
- break;
159
- }
160
- case "ArrowDown": {
161
- this.isHorizontalMenu && this.handleSubmenuEntry(e);
162
- break;
163
- }
164
- case "Enter":
165
- case " ": {
166
- this.host.href || this.handleSubmenuEntry(e);
167
- break;
168
- }
169
- }
170
- }
171
- handleClick(e) {
172
- e.target !== this.host && e.target instanceof Element && (e.target.localName === "cx-menu-item" || e.target.role?.startsWith("menuitem")) || (e.preventDefault(), e.stopPropagation(), this.isExpanded() ? this.disableSubmenu() : e.isTrusted && this.enableSubmenu());
173
- }
174
- handleSubmenuIconClick(e) {
175
- e.preventDefault(), e.stopPropagation(), this.isExpanded() ? this.disableSubmenu() : this.enableSubmenu();
176
- }
177
- handleDocumentMouseDown(e) {
178
- const t = e.composedPath();
179
- this.host && !t.includes(this.host) && this.disableSubmenu();
180
- }
181
- // Close this submenu on focus outside of the parent or any descendants.
182
- handleMouseLeave(e) {
183
- e.relatedTarget && e.relatedTarget instanceof Element && this.host.contains(e.relatedTarget) || this.disableSubmenu();
184
- }
185
- // Prevent the parent menu-item from getting focus on mouse movement on the submenu
186
- handlePopupMouseover(e) {
187
- e.stopPropagation();
188
- }
189
- // Set the safe triangle values for the submenu when the position changes
190
- handlePopupReposition() {
191
- const t = this.host.renderRoot.querySelector("slot[name='submenu']")?.assignedElements({ flatten: !0 }).filter((f) => f.localName === "cx-menu")[0], s = getComputedStyle(this.host).direction === "rtl" || this.popupRef.value?.dataset.currentPlacement?.startsWith("left");
192
- if (!t)
193
- return;
194
- const { height: l, left: a, top: u, width: c } = t.getBoundingClientRect();
195
- this.host.style.setProperty(
196
- "--safe-triangle-submenu-start-x",
197
- `${s ? a + c : a}px`
198
- ), this.host.style.setProperty("--safe-triangle-submenu-start-y", `${u}px`), this.host.style.setProperty(
199
- "--safe-triangle-submenu-end-x",
200
- `${s ? a + c : a}px`
201
- ), this.host.style.setProperty(
202
- "--safe-triangle-submenu-end-y",
203
- `${u + l}px`
204
- );
205
- }
206
- setSubmenuState(e) {
207
- this.popupRef.value && this.popupRef.value.active !== e && (this.popupRef.value.active = e, this.host.requestUpdate());
208
- }
209
- // Shows the submenu. Supports disabling the opening delay, e.g. for keyboard events that want to set the focus to the
210
- // newly opened menu.
211
- enableSubmenu(e = !0) {
212
- this.host.lazy && this.host.emit("cx-lazy-load"), e ? (window.clearTimeout(this.enableSubmenuTimer), this.enableSubmenuTimer = window.setTimeout(() => {
213
- this.setSubmenuState(!0);
214
- }, this.submenuOpenDelay)) : this.setSubmenuState(!0);
215
- }
216
- disableSubmenu() {
217
- window.clearTimeout(this.enableSubmenuTimer), this.cancelPendingFocus(), this.setSubmenuState(!1), this.disableNestedSubmenus();
218
- }
219
- /**
220
- * Closing this submenu hides nested submenus visually (via the parent popup's own hidden state) without
221
- * resetting their own `active` flag, since they never receive a property change to react to. Left stale,
222
- * reopening a nested submenu later hits the "already active" fast path and skips the re-sync a fresh open
223
- * would normally do. Cascade the close so every nested submenu starts clean the next time it's opened.
224
- */
225
- disableNestedSubmenus() {
226
- if (!this.hasSlotController.test("submenu"))
227
- return;
228
- const e = this.host.renderRoot.querySelector("slot[name='submenu']");
229
- if (e)
230
- for (const t of e.assignedElements({ flatten: !0 }))
231
- t.querySelectorAll("cx-menu-item").forEach((s) => {
232
- s.closeSubmenu?.();
233
- });
234
- }
235
- // Schedule a recalculation of the skidding value
236
- updateSkidding() {
237
- requestAnimationFrame(() => {
238
- this.calculateSkidding();
239
- });
240
- }
241
- // Calculate the space the top of a menu takes-up, for aligning the popup menu-item with the activating element.
242
- calculateSkidding() {
243
- if (!this.host.parentElement?.computedStyleMap)
244
- return;
245
- const e = this.host.parentElement.computedStyleMap(), t = g(this.host) === "rtl", s = this.host.submenuPlacement ?? (t ? "left-start" : "right-start"), l = s.startsWith("left") || s.startsWith("right");
246
- let a = [];
247
- l && (s.endsWith("-start") ? a = ["padding-top", "border-top-width", "margin-top"] : s.endsWith("-end") && (a = ["padding-bottom", "border-bottom-width", "margin-bottom"]));
248
- const u = a.reduce((c, f) => {
249
- const x = e.get(f) ?? new CSSUnitValue(0, "px"), S = (x instanceof CSSUnitValue ? x : new CSSUnitValue(0, "px")).to("px"), C = s.endsWith("-end") ? 1 : -1;
250
- return c + S.value * C;
251
- }, 0);
252
- this.skidding = u;
253
- }
254
- isExpanded() {
255
- return this.popupRef.value ? this.popupRef.value.active : !1;
256
- }
257
- renderSubmenu() {
258
- const e = g(this.host) === "rtl";
259
- if (!this.hasSlotController.test("submenu"))
260
- return null;
261
- const t = this.host.submenuPlacement ?? (e ? "left-start" : "right-start");
262
- return h`<cx-popup ${O(this.popupRef)} placement=${t} 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} .autoSizeBoundary=${this.host.autoSizeBoundary}><slot name="submenu"></slot></cx-popup>`;
263
- }
264
- }
265
- var B = Object.defineProperty, H = Object.getOwnPropertyDescriptor, n = (o, e, t, s) => {
266
- for (var l = s > 1 ? void 0 : s ? H(e, t) : e, a = o.length - 1, u; a >= 0; a--)
267
- (u = o[a]) && (l = (s ? u(e, t, l) : u(l)) || l);
268
- return s && l && B(e, t, l), l;
269
- };
270
- let i = class extends w {
271
- constructor() {
272
- super(), this.type = "normal", this.submenuTrigger = "both", this.checked = !1, this.noUncheck = !1, this.value = "", this.href = "", this.rel = "noreferrer noopener", this.loading = !1, this.disabled = !1, this.active = !1, this.current = void 0, this.readonly = !1, this.menu = "", this.alwaysShowCheckedIcon = !1, this.checkPlacement = d.Suffix, this.lazy = !1, this.localize = new M(this), this.hasSlotController = new z(
273
- this,
274
- "submenu",
275
- "submenu-icon"
276
- ), this.submenuController = new A(
277
- this,
278
- this.hasSlotController
279
- ), this.handleDocumentWheel = (o) => {
280
- const e = o.composedPath();
281
- this.submenuController.isExpanded() && (!this.submenuController.popup || !e.includes(this.submenuController.popup)) && (o.preventDefault(), this.submenuController.disableSubmenu());
282
- }, this.handleHostClick = this.handleHostClick.bind(this), this.handleMouseOver = this.handleMouseOver.bind(this);
283
- }
284
- runConnectedCallback() {
285
- this.addEventListener("click", this.handleHostClick), this.addEventListener("mouseover", this.handleMouseOver), document.addEventListener("wheel", this.handleDocumentWheel, {
286
- passive: !1
287
- });
288
- }
289
- disconnectedCallback() {
290
- super.disconnectedCallback(), this.removeEventListener("click", this.handleHostClick), this.removeEventListener("mouseover", this.handleMouseOver), document.removeEventListener("wheel", this.handleDocumentWheel);
291
- }
292
- handleDefaultSlotChange() {
293
- const o = this.getTextLabel();
294
- if (typeof this.cachedTextLabel > "u") {
295
- this.cachedTextLabel = o;
296
- return;
297
- }
298
- o !== this.cachedTextLabel && (this.cachedTextLabel = o, this.emit("slotchange", {
299
- bubbles: !0,
300
- cancelable: !1,
301
- composed: !1
302
- }));
303
- }
304
- handleHostClick(o) {
305
- (this.disabled || this.readonly) && (o.target === this && o.preventDefault(), o.stopImmediatePropagation()), this.href && this.anchor && this.anchor.click();
306
- }
307
- handleMouseOver(o) {
308
- o.stopPropagation();
309
- }
310
- handleAnchorClick(o) {
311
- o.stopPropagation();
312
- }
313
- handleCheckedChange() {
314
- if (this.checked && this.type !== "checkbox") {
315
- this.checked = !1, console.error(
316
- 'The checked attribute can only be used on menu items with type="checkbox"',
317
- this
318
- );
319
- return;
320
- }
321
- this.type === "checkbox" ? this.setAttribute("aria-checked", this.checked ? "true" : "false") : this.removeAttribute("aria-checked");
322
- }
323
- handleDisabledChange() {
324
- this.setAttribute("aria-disabled", this.disabled ? "true" : "false");
325
- }
326
- handleCurrentChange() {
327
- this.current ? this.setAttribute("aria-current", this.current) : this.removeAttribute("aria-current");
328
- }
329
- handleTypeChange() {
330
- this.type === "checkbox" ? (this.setAttribute("role", "menuitemcheckbox"), this.setAttribute("aria-checked", this.checked ? "true" : "false")) : (this.setAttribute("role", "menuitem"), this.removeAttribute("aria-checked"));
331
- }
332
- /** Returns a text label based on the contents of the menu item's default slot. */
333
- getTextLabel() {
334
- return P(this.defaultSlot);
335
- }
336
- isSubmenu() {
337
- return this.hasSlotController.test("submenu") || !!this.menu.trim();
338
- }
339
- /** Closes this menu item's own submenu, if it has one open. Used to cascade-close nested submenus. */
340
- closeSubmenu() {
341
- this.submenuController.disableSubmenu();
342
- }
343
- renderBase(o) {
344
- const e = !!this.href, t = this.localize.dir() === "rtl", s = this.submenuController.isExpanded();
345
- return e ? h`<a id="anchor" part="base" class=${v({
346
- "menu-item": !0,
347
- "menu-item--active": this.active,
348
- "menu-item--checkbox": this.type === "checkbox",
349
- "menu-item--checked": this.checked,
350
- "menu-item--disabled": this.disabled,
351
- "menu-item--has-submenu": this.isSubmenu(),
352
- "menu-item--loading": this.loading,
353
- "menu-item--rtl": t,
354
- "menu-item--submenu-expanded": s
355
- })} 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}>${o}</a>` : h`<div id="anchor" part="base" class=${v({
356
- "menu-item": !0,
357
- "menu-item--active": this.active,
358
- "menu-item--checkbox": this.type === "checkbox",
359
- "menu-item--checked": this.checked,
360
- "menu-item--disabled": this.disabled,
361
- "menu-item--has-submenu": this.isSubmenu(),
362
- "menu-item--loading": this.loading,
363
- "menu-item--rtl": t,
364
- "menu-item--submenu-expanded": s
365
- })} aria-haspopup=${this.isSubmenu()} aria-label=${this.getTextLabel()}>${o}</div>`;
366
- }
367
- render() {
368
- const o = this.localize.dir() === "rtl";
369
- let e;
370
- this.submenuPlacement && (this.submenuPlacement.startsWith("top") || this.submenuPlacement.startsWith("bottom")) ? e = "keyboard_arrow_down" : e = o ? "chevron_left" : "chevron_right";
371
- const t = h`<slot part="checked-icon" name="checked-icon" class=${v({
372
- "menu-item__check": !0,
373
- "menu-item__check--always-show": this.alwaysShowCheckedIcon,
374
- "menu-item__check--suffix": this.checkPlacement === d.Suffix
375
- })}><cx-icon name="check"></cx-icon></slot>`, s = this.checkPlacement === d.Suffix;
376
- return this.renderBase(h`
377
- ${s ? y : t}<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>${s ? t : y}
378
-
379
- ${this.submenuController.renderSubmenu()}
380
- ${this.loading ? h`<cx-spinner part="spinner" exportparts="base:spinner__base"></cx-spinner>` : ""}
381
- `);
382
- }
383
- };
384
- i.styles = [_, I];
385
- i.dependencies = {
386
- "cx-icon": T,
387
- "cx-popup": R,
388
- "cx-spinner": $
389
- };
390
- n([
391
- b("slot:not([name])")
392
- ], i.prototype, "defaultSlot", 2);
393
- n([
394
- b("a#anchor", !0)
395
- ], i.prototype, "anchor", 2);
396
- n([
397
- b(".menu-item")
398
- ], i.prototype, "menuItem", 2);
399
- n([
400
- b(".menu-item__chevron")
401
- ], i.prototype, "submenuIcon", 2);
402
- n([
403
- r()
404
- ], i.prototype, "type", 2);
405
- n([
406
- r({ attribute: "submenu-trigger", type: String })
407
- ], i.prototype, "submenuTrigger", 2);
408
- n([
409
- r({ reflect: !0, type: Boolean })
410
- ], i.prototype, "checked", 2);
411
- n([
412
- r({ attribute: "no-uncheck", reflect: !0, type: Boolean })
413
- ], i.prototype, "noUncheck", 2);
414
- n([
415
- r()
416
- ], i.prototype, "value", 2);
417
- n([
418
- r()
419
- ], i.prototype, "href", 2);
420
- n([
421
- r()
422
- ], i.prototype, "target", 2);
423
- n([
424
- r()
425
- ], i.prototype, "rel", 2);
426
- n([
427
- r()
428
- ], i.prototype, "download", 2);
429
- n([
430
- r({ reflect: !0, type: Boolean })
431
- ], i.prototype, "loading", 2);
432
- n([
433
- r({ reflect: !0, type: Boolean })
434
- ], i.prototype, "disabled", 2);
435
- n([
436
- r({ reflect: !0, type: Boolean })
437
- ], i.prototype, "active", 2);
438
- n([
439
- r({ reflect: !0, type: String })
440
- ], i.prototype, "current", 2);
441
- n([
442
- r({ reflect: !0, type: Boolean })
443
- ], i.prototype, "readonly", 2);
444
- n([
445
- r({ attribute: "flip-boundary", type: Object })
446
- ], i.prototype, "flipBoundary", 2);
447
- n([
448
- r({ attribute: "shift-boundary", type: Object })
449
- ], i.prototype, "shiftBoundary", 2);
450
- n([
451
- r({ attribute: "auto-size-boundary", type: Object })
452
- ], i.prototype, "autoSizeBoundary", 2);
453
- n([
454
- r({ reflect: !0 })
455
- ], i.prototype, "menu", 2);
456
- n([
457
- r({ attribute: "always-show-checked-icon", reflect: !0, type: Boolean })
458
- ], i.prototype, "alwaysShowCheckedIcon", 2);
459
- n([
460
- r({ attribute: "check-placement", reflect: !0, type: String })
461
- ], i.prototype, "checkPlacement", 2);
462
- n([
463
- r({ attribute: "submenu-placement" })
464
- ], i.prototype, "submenuPlacement", 2);
465
- n([
466
- r({ reflect: !0, type: Boolean })
467
- ], i.prototype, "lazy", 2);
468
- n([
469
- p("checked")
470
- ], i.prototype, "handleCheckedChange", 1);
471
- n([
472
- p("disabled")
473
- ], i.prototype, "handleDisabledChange", 1);
474
- n([
475
- p("current")
476
- ], i.prototype, "handleCurrentChange", 1);
477
- n([
478
- p("type")
479
- ], i.prototype, "handleTypeChange", 1);
480
- i = n([
481
- L("cx-menu-item")
482
- ], i);
1
+ import "../chunks/lib-cortex-element.CVMmyPMC.js";
2
+ import "../chunks/component.styles.CRO4Odto.js";
3
+ import { C as b } from "../chunks/menu-item.DgUMVYe5.js";
4
+ import "../chunks/custom-element.L4WJXn1j.js";
5
+ import "../chunks/i18n.BA19xtyU.js";
6
+ import "../chunks/slot.j5oheLJC.js";
7
+ import "../chunks/watch.DJF5K-8U.js";
8
+ import "../chunks/lit-element.jLBm65_O.js";
9
+ import "../chunks/query.BBf1UFkC.js";
10
+ import "../chunks/class-map.BiVq-cVR.js";
11
+ import "../chunks/if-defined.BRoBj_Rp.js";
12
+ import "../chunks/icon.CpHbi8tH.js";
13
+ import "./popup.js";
14
+ import "./spinner.js";
483
15
  export {
484
- i as default
16
+ b as default
485
17
  };
@@ -1,25 +1,25 @@
1
1
  import { n as c, C as p } from "../chunks/lib-cortex-element.CVMmyPMC.js";
2
2
  import { c as b } from "../chunks/component.styles.CRO4Odto.js";
3
- import { c as g } from "../chunks/custom-element.L4WJXn1j.js";
4
- import { L as v } from "../chunks/i18n.DbXTTLXx.js";
5
- import { i as y, x as f } from "../chunks/lit-element.jLBm65_O.js";
6
- import { r as w } from "../chunks/state.CSDxrqLd.js";
7
- import { e as x } from "../chunks/query.BBf1UFkC.js";
8
- import { n as k } from "../chunks/when.Dr1es41R.js";
9
- import M from "./menu-item.js";
3
+ import { M as g, C as v } from "../chunks/menu-item.DgUMVYe5.js";
4
+ import { c as y } from "../chunks/custom-element.L4WJXn1j.js";
5
+ import { L as w } from "../chunks/i18n.BA19xtyU.js";
6
+ import { i as x, x as f } from "../chunks/lit-element.jLBm65_O.js";
7
+ import { r as k } from "../chunks/state.CSDxrqLd.js";
8
+ import { e as M } from "../chunks/query.BBf1UFkC.js";
9
+ import { n as A } from "../chunks/when.Dr1es41R.js";
10
10
  var d = /* @__PURE__ */ ((e) => (e.Default = "default", e.Multiple = "multiple", e))(d || {});
11
- const A = y`:host{background:var(--cx-panel-background-color);border:solid var(--cx-panel-border-width) var(--cx-panel-border-color);border-radius:var(--cx-panel-border-radius,var(--cx-border-radius-large));padding:var(--cx-panel-padding,var(--cx-spacing-x-small) 0);--divider-color:var(--cx-panel-border-color);--divider-width:var(--cx-panel-border-width);--divider-spacing:var(--cx-spacing-x-small);display:block;position:relative;overflow:auto}:host([horizontal]){padding:0 var(--cx-spacing-x-small);flex-wrap:wrap;justify-content:space-between;display:flex}::slotted(cx-divider){--color:var(--divider-color);--width:var(--divider-width);--spacing:var(--divider-spacing)}::slotted([data-alternating-grouping]):before{content:" ";background-color:var(--divider-color);margin:var(--divider-spacing) 0;height:var(--divider-width);display:block}::slotted([data-alternating-grouping=horizontal]):before{height:100%;margin:0 var(--divider-spacing);width:var(--divider-width);display:inline-block}:host([horizontal]) ::slotted(cx-menu-section){flex-wrap:wrap;justify-content:space-between;display:flex}:host([horizontal]) ::slotted(cx-menu-item){display:flex}:host([variant=multiple]){position:relative;overflow:hidden}:host([variant=multiple]) ::slotted(cx-menu[name]){opacity:0;pointer-events:none;transition:opacity var(--cx-transition-fast) ease-in-out, transform var(--cx-transition-medium) ease-in-out;border:none;top:0;left:0;transform:translate(-50%);position:absolute!important}:host([variant=multiple]) ::slotted(cx-menu[active]){opacity:1;pointer-events:auto;transform:translate(0)}.back__button::part(checked-icon),.back__button::part(submenu-icon){display:none}.back__divider{--spacing:var(--cx-spacing-x-small)}`;
12
- var I = Object.defineProperty, C = Object.getOwnPropertyDescriptor, u = (e, t, r, i) => {
13
- for (var o = i > 1 ? void 0 : i ? C(t, r) : t, h = e.length - 1, n; h >= 0; h--)
11
+ const I = x`:host{background:var(--cx-panel-background-color);border:solid var(--cx-panel-border-width) var(--cx-panel-border-color);border-radius:var(--cx-panel-border-radius,var(--cx-border-radius-large));padding:var(--cx-panel-padding,var(--cx-spacing-x-small) 0);--divider-color:var(--cx-panel-border-color);--divider-width:var(--cx-panel-border-width);--divider-spacing:var(--cx-spacing-x-small);display:block;position:relative;overflow:auto}:host([horizontal]){padding:0 var(--cx-spacing-x-small);flex-wrap:wrap;justify-content:space-between;display:flex}::slotted(cx-divider){--color:var(--divider-color);--width:var(--divider-width);--spacing:var(--divider-spacing)}::slotted([data-alternating-grouping]):before{content:" ";background-color:var(--divider-color);margin:var(--divider-spacing) 0;height:var(--divider-width);display:block}::slotted([data-alternating-grouping=horizontal]):before{height:100%;margin:0 var(--divider-spacing);width:var(--divider-width);display:inline-block}:host([horizontal]) ::slotted(cx-menu-section){flex-wrap:wrap;justify-content:space-between;display:flex}:host([horizontal]) ::slotted(cx-menu-item){display:flex}:host([variant=multiple]){position:relative;overflow:hidden}:host([variant=multiple]) ::slotted(cx-menu[name]){opacity:0;pointer-events:none;transition:opacity var(--cx-transition-fast) ease-in-out, transform var(--cx-transition-medium) ease-in-out;border:none;top:0;left:0;transform:translate(-50%);position:absolute!important}:host([variant=multiple]) ::slotted(cx-menu[active]){opacity:1;pointer-events:auto;transform:translate(0)}.back__button::part(checked-icon),.back__button::part(submenu-icon){display:none}.back__divider{--spacing:var(--cx-spacing-x-small)}`;
12
+ var C = Object.defineProperty, S = Object.getOwnPropertyDescriptor, u = (e, t, r, i) => {
13
+ for (var o = i > 1 ? void 0 : i ? S(t, r) : t, h = e.length - 1, n; h >= 0; h--)
14
14
  (n = e[h]) && (o = (i ? n(t, r, o) : n(o)) || o);
15
- return i && o && I(t, r, o), o;
15
+ return i && o && C(t, r, o), o;
16
16
  };
17
17
  function m(e) {
18
18
  return e.tagName.toLowerCase() === "cx-menu" && e instanceof l && e.getAttribute("role") === "menu";
19
19
  }
20
20
  let l = class extends p {
21
21
  constructor() {
22
- super(...arguments), this.localize = new v(this), this.horizontal = !1, this.variant = d.Default, this.active = !1, this.name = "", this.back = "", this.default = !1, this.bubbleKeyDown = !1, this.ignoredKeys = [], this.disabledTabLoop = !1, this.noUncheck = !1, this.resizeObserver = null, this.slotMutationObserver = null;
22
+ super(...arguments), this.localize = new w(this), this.horizontal = !1, this.variant = d.Default, this.active = !1, this.name = "", this.back = "", this.default = !1, this.bubbleKeyDown = !1, this.ignoredKeys = [], this.disabledTabLoop = !1, this.noUncheck = !1, this.resizeObserver = null, this.slotMutationObserver = null;
23
23
  }
24
24
  connectedCallback() {
25
25
  super.connectedCallback(), this.slotMutationObserver = new MutationObserver(() => this.handleSlotChange()), this.slotMutationObserver.observe(this, {
@@ -40,7 +40,7 @@ let l = class extends p {
40
40
  }
41
41
  }
42
42
  handleClick(e) {
43
- const t = ["menuitem", "menuitemcheckbox"], r = e.composedPath(), i = r.find(
43
+ const t = ["menuitem", "menuitemcheckbox", "menuitemradio"], r = e.composedPath(), i = r.find(
44
44
  (a) => t.includes(a?.getAttribute?.("role") || "")
45
45
  );
46
46
  if (!i)
@@ -55,7 +55,7 @@ let l = class extends p {
55
55
  ) !== this)
56
56
  return;
57
57
  const s = i;
58
- s.type === "checkbox" && (s.checked && (this.noUncheck || s.noUncheck) || (s.checked = !s.checked)), this.emit("cx-select", { detail: { item: s } });
58
+ s.type === g.Checkbox && (s.checked && (this.noUncheck || s.noUncheck) || (s.checked = !s.checked)), this.emit("cx-select", { detail: { item: s } });
59
59
  }
60
60
  handleKeyDown(e) {
61
61
  if (!this.ignoredKeys.includes(e.key)) {
@@ -73,7 +73,7 @@ let l = class extends p {
73
73
  ].includes(e.key)) {
74
74
  const t = this.getAllItems(), r = this.getCurrentItem();
75
75
  let i = r ? t.indexOf(r) : 0;
76
- if (["ArrowLeft", "ArrowRight"].includes(e.key) && !this.bubbleKeyDown && !(this.parentElement instanceof l) && !(this.parentElement instanceof M) && e.stopPropagation(), t.length > 0) {
76
+ if (["ArrowLeft", "ArrowRight"].includes(e.key) && !this.bubbleKeyDown && !(this.parentElement instanceof l) && !(this.parentElement instanceof v) && e.stopPropagation(), t.length > 0) {
77
77
  const o = this.horizontal ? e.key === "ArrowRight" || i === t.length - 1 && e.key === "ArrowDown" : e.key === "ArrowDown", h = this.horizontal ? e.key === "ArrowLeft" || i === 0 && e.key === "ArrowUp" : e.key === "ArrowUp";
78
78
  if (["ArrowRight", "ArrowDown", "ArrowLeft", "ArrowUp"].includes(
79
79
  e.key
@@ -266,16 +266,16 @@ let l = class extends p {
266
266
  });
267
267
  }
268
268
  render() {
269
- const e = k(
269
+ const e = A(
270
270
  this.back,
271
271
  () => f`<slot name="back-button" role="menuitem" menu=${this.back}><cx-menu-item part="back-button" class="back__button" menu=${this.back}><cx-icon slot="prefix" name="chevron_left"></cx-icon>${this.localize.term("back")}</cx-menu-item><cx-divider class="back__divider"></cx-divider></slot>`
272
272
  );
273
273
  return this.variant === d.Multiple ? f`${e}<slot @slotchange=${this.handleSlotChange} @click=${this.handleClick} @keydown=${this.handleKeyDown} @mousedown=${this.handleMouseDown}></slot>` : f`${e}<slot @slotchange=${this.handleSlotChange} @click=${this.handleClick} @keydown=${this.handleKeyDown} @mousedown=${this.handleMouseDown}></slot>`;
274
274
  }
275
275
  };
276
- l.styles = [b, A];
276
+ l.styles = [b, I];
277
277
  u([
278
- x("slot")
278
+ M("slot")
279
279
  ], l.prototype, "defaultSlot", 2);
280
280
  u([
281
281
  c({ type: Boolean })
@@ -315,10 +315,10 @@ u([
315
315
  c({ attribute: "no-uncheck", reflect: !0, type: Boolean })
316
316
  ], l.prototype, "noUncheck", 2);
317
317
  u([
318
- w()
318
+ k()
319
319
  ], l.prototype, "resizeObserver", 2);
320
320
  l = u([
321
- g("cx-menu")
321
+ y("cx-menu")
322
322
  ], l);
323
323
  export {
324
324
  l as default
@@ -1,11 +1,11 @@
1
1
  import { default as e } from "./bicolor-picker.js";
2
2
  import { default as a } from "./border-input-group.js";
3
- import { C as x } from "../chunks/color-swatch.D6Gg5bpz.js";
4
- import { C as u } from "../chunks/confirm-popover.CrQKEChc.js";
3
+ import { C as x } from "../chunks/color-swatch.Caved2kL.js";
4
+ import { C as u } from "../chunks/confirm-popover.BSS1VhB2.js";
5
5
  import { default as d } from "./corner-position-input-group.js";
6
6
  import { default as l } from "./cropper.js";
7
7
  import { default as i } from "./dynamic-select.js";
8
- import { C as c } from "../chunks/folder-select.CIqVGGFl.js";
8
+ import { C as c } from "../chunks/folder-select.DN-JomDt.js";
9
9
  import { default as P } from "./masonry.js";
10
10
  import { default as I } from "./padding-input-group.js";
11
11
  import { default as y } from "./position-picker.js";
@@ -1,8 +1,8 @@
1
1
  import "../chunks/lib-cortex-element.CVMmyPMC.js";
2
2
  import "../chunks/component.styles.CRO4Odto.js";
3
- import { C } from "../chunks/option.B6odSlS2.js";
3
+ import { C } from "../chunks/option.jeaj7_Lr.js";
4
4
  import "../chunks/custom-element.L4WJXn1j.js";
5
- import "../chunks/i18n.DbXTTLXx.js";
5
+ import "../chunks/i18n.BA19xtyU.js";
6
6
  import "../chunks/watch.DJF5K-8U.js";
7
7
  import "../chunks/lit-element.jLBm65_O.js";
8
8
  import "../chunks/state.CSDxrqLd.js";
@@ -1,5 +1,5 @@
1
- import { C as a } from "../chunks/asset-link-format.D--xQVgR.js";
2
- import { C as t } from "../chunks/color-swatch-group.CCgwey9f.js";
1
+ import { C as a } from "../chunks/asset-link-format.BnIUG_vO.js";
2
+ import { C as t } from "../chunks/color-swatch-group.CTcv62MK.js";
3
3
  import { default as C } from "./file-on-demand.js";
4
4
  export {
5
5
  a as CxAssetLinkFormat,
@@ -1,4 +1,4 @@
1
- import { C as i } from "../chunks/input.33UmFGqR.js";
1
+ import { C as i } from "../chunks/input.xgeLCG8I.js";
2
2
  import l from "./input-group.js";
3
3
  import { n as c, C as x } from "../chunks/lib-cortex-element.CVMmyPMC.js";
4
4
  import { c as f } from "../chunks/component.styles.CRO4Odto.js";