@orangelogic/design-system 3.1.0 → 3.3.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 (112) hide show
  1. package/library/chunks/{asset-link-format.Ds5nq4mo.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.d5e1sYos.js → color-swatch-group.CTcv62MK.js} +11 -10
  4. package/library/chunks/{color-swatch.D6Gg5bpz.js → color-swatch.Caved2kL.js} +1 -1
  5. package/library/chunks/{confirm-popover.tftDINBg.js → confirm-popover.BSS1VhB2.js} +3 -3
  6. package/library/chunks/content-builder.BX4pHujE.js +60 -0
  7. package/library/chunks/{dialog.CzSaiGBF.js → dialog.ICoCAj6Z.js} +4 -4
  8. package/library/chunks/{document-viewer.B1EEIvUY.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.BHC52xvk.js → icon-button.BWJ1Vqn5.js} +1 -1
  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.Dga4_SbU.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.D50ned8_.js → pagination.CSPKsj4y.js} +5 -5
  21. package/library/chunks/{tab-group.DE0RsMX4.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 -486
  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 +16288 -16094
  92. package/library/components/video.js +2 -2
  93. package/library/package.json +1 -1
  94. package/library/packages/atoms/src/components/image/image.d.ts +30 -4
  95. package/library/packages/atoms/src/components/menu-item/menu-item.d.ts +5 -2
  96. package/library/packages/atoms/src/components/popup/popup.d.ts +11 -0
  97. package/library/packages/atoms/src/components/select/select.d.ts +8 -0
  98. package/library/packages/molecules/src/gallery-item/gallery-item.d.ts +10 -0
  99. package/library/packages/molecules/src/icon-picker/icon-picker.d.ts +1 -0
  100. package/library/packages/molecules/src/masonry/masonry.d.ts +9 -0
  101. package/library/packages/molecules/src/view-and-sort/view-and-sort.d.ts +8 -0
  102. package/library/packages/organisms/src/bento-grid/bento-grid.d.ts +88 -0
  103. package/library/packages/organisms/src/carousel/carousel.d.ts +13 -0
  104. package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +11 -1
  105. package/library/packages/organisms/src/content-builder/content-builder.d.ts +31 -6
  106. package/library/packages/types/src/menu-item.d.ts +12 -1
  107. package/library/packages/utils/src/custom-element/i18n.d.ts +3 -0
  108. package/library/packages/utils/src/transformation/transformation.d.ts +52 -0
  109. package/library/react-web-component.d.ts +17 -1
  110. package/library/utils.js +173 -167
  111. package/package.json +1 -1
  112. package/library/chunks/transformation.8uLv6uwG.js +0 -264
@@ -1,488 +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 E } from "../chunks/slot.j5oheLJC.js";
6
- import { w as p } from "../chunks/watch.DJF5K-8U.js";
7
- import { i as P, 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 = P`: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{outline:var(--cx-focus-ring);outline-offset:calc(-1 * var(--cx-focus-ring-width));background-color:var(--cx-menu-item-background-color-hover);opacity:1}.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(), this.syncAriaExpanded());
37
- }
38
- syncAriaExpanded() {
39
- this.host.setAttribute("aria-expanded", this.isExpanded() ? "true" : "false");
40
- }
41
- addListeners() {
42
- 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(
43
- "click",
44
- this.handleSubmenuIconClick
45
- ), document.addEventListener("mousedown", this.handleDocumentMouseDown)), this.host.addEventListener("keydown", this.handleKeyDown), this.isConnected = !0), this.isPopupConnected || this.popupRef.value && (this.popupRef.value.addEventListener(
46
- "mouseover",
47
- this.handlePopupMouseover
48
- ), this.popupRef.value.addEventListener(
49
- "cx-reposition",
50
- this.handlePopupReposition
51
- ), this.isPopupConnected = !0);
52
- }
53
- removeListeners() {
54
- 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(
55
- "click",
56
- this.handleSubmenuIconClick
57
- ), document.removeEventListener("mousedown", this.handleDocumentMouseDown), this.host.removeEventListener("keydown", this.handleKeyDown), this.isConnected = !1), this.isPopupConnected && this.popupRef.value && (this.popupRef.value.removeEventListener(
58
- "mouseover",
59
- this.handlePopupMouseover
60
- ), this.popupRef.value.removeEventListener(
61
- "cx-reposition",
62
- this.handlePopupReposition
63
- ), this.isPopupConnected = !1);
64
- }
65
- syncIsHorizontalMenu() {
66
- this.parent && (this.isHorizontalMenu = this.parent.hasAttribute("horizontal"));
67
- }
68
- // Set the safe triangle cursor position
69
- handleMouseMove(e) {
70
- const t = getComputedStyle(this.host).direction === "rtl" || this.popupRef.value?.dataset.currentPlacement?.startsWith("left");
71
- this.host.style.setProperty(
72
- "--safe-triangle-cursor-x",
73
- `${e.clientX + (t ? 1 : 0)}px`
74
- ), this.host.style.setProperty(
75
- "--safe-triangle-cursor-y",
76
- `${e.clientY}px`
77
- );
78
- }
79
- handleMouseOver() {
80
- this.hasSlotController.test("submenu") && this.enableSubmenu();
81
- }
82
- handleSubmenuEntry(e) {
83
- const t = this.host.renderRoot.querySelector("slot[name='submenu']");
84
- if (!t) {
85
- console.error(
86
- "Cannot activate a submenu if no corresponding menuitem can be found.",
87
- this
88
- );
89
- return;
90
- }
91
- const s = this.queryMenuItems(t);
92
- if (!s || s.length === 0) {
93
- this.host.lazy && (e.preventDefault(), e.stopPropagation(), this.focusFirstMenuItemAfterLazyLoad(t));
94
- return;
95
- }
96
- 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(
97
- s[0],
98
- this.focusVisibilityTimeoutMs
99
- )));
100
- }
101
- // Sets up the roving tabindex for a freshly revealed set of submenu items: first item tabbable, rest not.
102
- setRovingTabIndex(e) {
103
- e[0].setAttribute("tabindex", "0");
104
- for (let t = 1; t !== e.length; ++t)
105
- e[t].setAttribute("tabindex", "-1");
106
- }
107
- // Find the first menu-item (or menuitem-role element) assigned to the submenu slot, if any exist yet.
108
- queryMenuItems(e) {
109
- let t = null;
110
- for (const s of e.assignedElements())
111
- if (t = s.querySelectorAll("cx-menu-item, [role^='menuitem']"), t.length !== 0)
112
- break;
113
- return t;
114
- }
115
- // Disconnect any pending lazy-load item watch and cancel any pending focus attempt (submenu closed, host
116
- // disconnected, or the item was already found/focused).
117
- cancelPendingFocus() {
118
- this.lazyLoadObserver?.disconnect(), this.lazyLoadObserver = null, this.pendingFocusCancel?.(), this.pendingFocusCancel = null;
119
- }
120
- /**
121
- * Enables the submenu and, once its content finishes loading and the first menu-item appears, focuses it.
122
- * focusWhenVisible already tolerates the popup not being visually ready yet, so this only needs to wait for
123
- * the item itself to exist.
124
- */
125
- focusFirstMenuItemAfterLazyLoad(e) {
126
- this.lazyLoadObserver?.disconnect(), this.lazyLoadObserver = new MutationObserver(() => {
127
- const t = this.queryMenuItems(e), s = t?.[0];
128
- !(s instanceof HTMLElement) || !t || (this.setRovingTabIndex(t), this.lazyLoadObserver?.disconnect(), this.lazyLoadObserver = null, this.pendingFocusCancel?.(), this.pendingFocusCancel = k(
129
- s,
130
- this.focusVisibilityTimeoutMs
131
- ));
132
- });
133
- for (const t of e.assignedElements())
134
- this.lazyLoadObserver.observe(t, { childList: !0, subtree: !0 });
135
- this.enableSubmenu(!1);
136
- }
137
- // Focus on the first menu-item of a submenu.
138
- handleKeyDown(e) {
139
- const t = () => {
140
- e.preventDefault(), e.stopPropagation(), this.host.focus(), this.disableSubmenu();
141
- };
142
- switch (e.key) {
143
- case "Tab": {
144
- this.disableSubmenu();
145
- break;
146
- }
147
- case "Escape": {
148
- this.host.focus(), this.disableSubmenu();
149
- break;
150
- }
151
- case "ArrowLeft": {
152
- e.target !== this.host && !this.isHorizontalMenu && t();
153
- break;
154
- }
155
- case "ArrowUp": {
156
- e.target !== this.host && this.isHorizontalMenu && t();
157
- break;
158
- }
159
- case "ArrowRight": {
160
- this.isHorizontalMenu || this.handleSubmenuEntry(e);
161
- break;
162
- }
163
- case "ArrowDown": {
164
- this.isHorizontalMenu && this.handleSubmenuEntry(e);
165
- break;
166
- }
167
- case "Enter":
168
- case " ": {
169
- this.host.href || this.handleSubmenuEntry(e);
170
- break;
171
- }
172
- }
173
- }
174
- handleClick(e) {
175
- 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());
176
- }
177
- handleSubmenuIconClick(e) {
178
- e.preventDefault(), e.stopPropagation(), this.isExpanded() ? this.disableSubmenu() : this.enableSubmenu();
179
- }
180
- handleDocumentMouseDown(e) {
181
- const t = e.composedPath();
182
- this.host && !t.includes(this.host) && this.disableSubmenu();
183
- }
184
- // Close this submenu on focus outside of the parent or any descendants.
185
- handleMouseLeave(e) {
186
- e.relatedTarget && e.relatedTarget instanceof Element && this.host.contains(e.relatedTarget) || this.disableSubmenu();
187
- }
188
- // Prevent the parent menu-item from getting focus on mouse movement on the submenu
189
- handlePopupMouseover(e) {
190
- e.stopPropagation();
191
- }
192
- // Set the safe triangle values for the submenu when the position changes
193
- handlePopupReposition() {
194
- 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");
195
- if (!t)
196
- return;
197
- const { height: l, left: a, top: u, width: c } = t.getBoundingClientRect();
198
- this.host.style.setProperty(
199
- "--safe-triangle-submenu-start-x",
200
- `${s ? a + c : a}px`
201
- ), this.host.style.setProperty("--safe-triangle-submenu-start-y", `${u}px`), this.host.style.setProperty(
202
- "--safe-triangle-submenu-end-x",
203
- `${s ? a + c : a}px`
204
- ), this.host.style.setProperty(
205
- "--safe-triangle-submenu-end-y",
206
- `${u + l}px`
207
- );
208
- }
209
- setSubmenuState(e) {
210
- this.popupRef.value && this.popupRef.value.active !== e && (this.popupRef.value.active = e, this.host.requestUpdate());
211
- }
212
- // Shows the submenu. Supports disabling the opening delay, e.g. for keyboard events that want to set the focus to the
213
- // newly opened menu.
214
- enableSubmenu(e = !0) {
215
- this.host.lazy && this.host.emit("cx-lazy-load"), e ? (window.clearTimeout(this.enableSubmenuTimer), this.enableSubmenuTimer = window.setTimeout(() => {
216
- this.setSubmenuState(!0);
217
- }, this.submenuOpenDelay)) : this.setSubmenuState(!0);
218
- }
219
- disableSubmenu() {
220
- window.clearTimeout(this.enableSubmenuTimer), this.cancelPendingFocus(), this.setSubmenuState(!1), this.disableNestedSubmenus();
221
- }
222
- /**
223
- * Closing this submenu hides nested submenus visually (via the parent popup's own hidden state) without
224
- * resetting their own `active` flag, since they never receive a property change to react to. Left stale,
225
- * reopening a nested submenu later hits the "already active" fast path and skips the re-sync a fresh open
226
- * would normally do. Cascade the close so every nested submenu starts clean the next time it's opened.
227
- */
228
- disableNestedSubmenus() {
229
- if (!this.hasSlotController.test("submenu"))
230
- return;
231
- const e = this.host.renderRoot.querySelector("slot[name='submenu']");
232
- if (e)
233
- for (const t of e.assignedElements({ flatten: !0 }))
234
- t.querySelectorAll("cx-menu-item").forEach((s) => {
235
- s.closeSubmenu?.();
236
- });
237
- }
238
- // Schedule a recalculation of the skidding value
239
- updateSkidding() {
240
- requestAnimationFrame(() => {
241
- this.calculateSkidding();
242
- });
243
- }
244
- // Calculate the space the top of a menu takes-up, for aligning the popup menu-item with the activating element.
245
- calculateSkidding() {
246
- if (!this.host.parentElement?.computedStyleMap)
247
- return;
248
- 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");
249
- let a = [];
250
- l && (s.endsWith("-start") ? a = ["padding-top", "border-top-width", "margin-top"] : s.endsWith("-end") && (a = ["padding-bottom", "border-bottom-width", "margin-bottom"]));
251
- const u = a.reduce((c, f) => {
252
- 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;
253
- return c + S.value * C;
254
- }, 0);
255
- this.skidding = u;
256
- }
257
- isExpanded() {
258
- return this.popupRef.value ? this.popupRef.value.active : !1;
259
- }
260
- renderSubmenu() {
261
- const e = g(this.host) === "rtl";
262
- if (!this.hasSlotController.test("submenu"))
263
- return null;
264
- const t = this.host.submenuPlacement ?? (e ? "left-start" : "right-start");
265
- 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>`;
266
- }
267
- }
268
- var B = Object.defineProperty, H = Object.getOwnPropertyDescriptor, n = (o, e, t, s) => {
269
- for (var l = s > 1 ? void 0 : s ? H(e, t) : e, a = o.length - 1, u; a >= 0; a--)
270
- (u = o[a]) && (l = (s ? u(e, t, l) : u(l)) || l);
271
- return s && l && B(e, t, l), l;
272
- };
273
- let i = class extends w {
274
- constructor() {
275
- 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(
276
- this,
277
- "submenu",
278
- "submenu-icon"
279
- ), this.submenuController = new A(
280
- this,
281
- this.hasSlotController
282
- ), this.handleDocumentWheel = (o) => {
283
- const e = o.composedPath();
284
- this.submenuController.isExpanded() && (!this.submenuController.popup || !e.includes(this.submenuController.popup)) && (o.preventDefault(), this.submenuController.disableSubmenu());
285
- }, this.handleHostClick = this.handleHostClick.bind(this), this.handleMouseOver = this.handleMouseOver.bind(this);
286
- }
287
- runConnectedCallback() {
288
- this.addEventListener("click", this.handleHostClick), this.addEventListener("mouseover", this.handleMouseOver), document.addEventListener("wheel", this.handleDocumentWheel, {
289
- passive: !1
290
- });
291
- }
292
- disconnectedCallback() {
293
- super.disconnectedCallback(), this.removeEventListener("click", this.handleHostClick), this.removeEventListener("mouseover", this.handleMouseOver), document.removeEventListener("wheel", this.handleDocumentWheel);
294
- }
295
- handleDefaultSlotChange() {
296
- const o = this.getTextLabel();
297
- if (typeof this.cachedTextLabel > "u") {
298
- this.cachedTextLabel = o;
299
- return;
300
- }
301
- o !== this.cachedTextLabel && (this.cachedTextLabel = o, this.emit("slotchange", {
302
- bubbles: !0,
303
- cancelable: !1,
304
- composed: !1
305
- }));
306
- }
307
- handleHostClick(o) {
308
- (this.disabled || this.readonly) && (o.target === this && o.preventDefault(), o.stopImmediatePropagation()), this.href && this.anchor && this.anchor.click();
309
- }
310
- handleMouseOver(o) {
311
- o.stopPropagation();
312
- }
313
- handleAnchorClick(o) {
314
- o.stopPropagation();
315
- }
316
- handleCheckedChange() {
317
- if (this.checked && this.type !== "checkbox") {
318
- this.checked = !1, console.error(
319
- 'The checked attribute can only be used on menu items with type="checkbox"',
320
- this
321
- );
322
- return;
323
- }
324
- this.type === "checkbox" ? this.setAttribute("aria-checked", this.checked ? "true" : "false") : this.removeAttribute("aria-checked");
325
- }
326
- handleDisabledChange() {
327
- this.setAttribute("aria-disabled", this.disabled ? "true" : "false");
328
- }
329
- handleCurrentChange() {
330
- this.current ? this.setAttribute("aria-current", this.current) : this.removeAttribute("aria-current");
331
- }
332
- handleTypeChange() {
333
- this.type === "checkbox" ? (this.setAttribute("role", "menuitemcheckbox"), this.setAttribute("aria-checked", this.checked ? "true" : "false")) : (this.setAttribute("role", "menuitem"), this.removeAttribute("aria-checked"));
334
- }
335
- /** Returns a text label based on the contents of the menu item's default slot. */
336
- getTextLabel() {
337
- return E(this.defaultSlot);
338
- }
339
- isSubmenu() {
340
- return this.hasSlotController.test("submenu") || !!this.menu.trim();
341
- }
342
- /** Closes this menu item's own submenu, if it has one open. Used to cascade-close nested submenus. */
343
- closeSubmenu() {
344
- this.submenuController.disableSubmenu();
345
- }
346
- renderBase(o) {
347
- const e = !!this.href, t = this.localize.dir() === "rtl", s = this.submenuController.isExpanded();
348
- return e ? h`<a id="anchor" part="base" class=${v({
349
- "menu-item": !0,
350
- "menu-item--active": this.active,
351
- "menu-item--checkbox": this.type === "checkbox",
352
- "menu-item--checked": this.checked,
353
- "menu-item--disabled": this.disabled,
354
- "menu-item--has-submenu": this.isSubmenu(),
355
- "menu-item--loading": this.loading,
356
- "menu-item--rtl": t,
357
- "menu-item--submenu-expanded": s
358
- })} 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({
359
- "menu-item": !0,
360
- "menu-item--active": this.active,
361
- "menu-item--checkbox": this.type === "checkbox",
362
- "menu-item--checked": this.checked,
363
- "menu-item--disabled": this.disabled,
364
- "menu-item--has-submenu": this.isSubmenu(),
365
- "menu-item--loading": this.loading,
366
- "menu-item--rtl": t,
367
- "menu-item--submenu-expanded": s
368
- })} aria-haspopup=${this.isSubmenu()} aria-label=${this.getTextLabel()}>${o}</div>`;
369
- }
370
- render() {
371
- const o = this.localize.dir() === "rtl";
372
- let e;
373
- this.submenuPlacement && (this.submenuPlacement.startsWith("top") || this.submenuPlacement.startsWith("bottom")) ? e = "keyboard_arrow_down" : e = o ? "chevron_left" : "chevron_right";
374
- const t = h`<slot part="checked-icon" name="checked-icon" class=${v({
375
- "menu-item__check": !0,
376
- "menu-item__check--always-show": this.alwaysShowCheckedIcon,
377
- "menu-item__check--suffix": this.checkPlacement === d.Suffix
378
- })}><cx-icon name="check"></cx-icon></slot>`, s = this.checkPlacement === d.Suffix;
379
- return this.renderBase(h`
380
- ${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}
381
-
382
- ${this.submenuController.renderSubmenu()}
383
- ${this.loading ? h`<cx-spinner part="spinner" exportparts="base:spinner__base"></cx-spinner>` : ""}
384
- `);
385
- }
386
- };
387
- i.styles = [_, I];
388
- i.dependencies = {
389
- "cx-icon": T,
390
- "cx-popup": R,
391
- "cx-spinner": $
392
- };
393
- n([
394
- b("slot:not([name])")
395
- ], i.prototype, "defaultSlot", 2);
396
- n([
397
- b("a#anchor", !0)
398
- ], i.prototype, "anchor", 2);
399
- n([
400
- b(".menu-item")
401
- ], i.prototype, "menuItem", 2);
402
- n([
403
- b(".menu-item__chevron")
404
- ], i.prototype, "submenuIcon", 2);
405
- n([
406
- r()
407
- ], i.prototype, "type", 2);
408
- n([
409
- r({ attribute: "submenu-trigger", type: String })
410
- ], i.prototype, "submenuTrigger", 2);
411
- n([
412
- r({ reflect: !0, type: Boolean })
413
- ], i.prototype, "checked", 2);
414
- n([
415
- r({ attribute: "no-uncheck", reflect: !0, type: Boolean })
416
- ], i.prototype, "noUncheck", 2);
417
- n([
418
- r()
419
- ], i.prototype, "value", 2);
420
- n([
421
- r()
422
- ], i.prototype, "href", 2);
423
- n([
424
- r()
425
- ], i.prototype, "target", 2);
426
- n([
427
- r()
428
- ], i.prototype, "rel", 2);
429
- n([
430
- r()
431
- ], i.prototype, "download", 2);
432
- n([
433
- r({ reflect: !0, type: Boolean })
434
- ], i.prototype, "loading", 2);
435
- n([
436
- r({ reflect: !0, type: Boolean })
437
- ], i.prototype, "disabled", 2);
438
- n([
439
- r({ reflect: !0, type: Boolean })
440
- ], i.prototype, "active", 2);
441
- n([
442
- r({ reflect: !0, type: String })
443
- ], i.prototype, "current", 2);
444
- n([
445
- r({ reflect: !0, type: Boolean })
446
- ], i.prototype, "readonly", 2);
447
- n([
448
- r({ attribute: "flip-boundary", type: Object })
449
- ], i.prototype, "flipBoundary", 2);
450
- n([
451
- r({ attribute: "shift-boundary", type: Object })
452
- ], i.prototype, "shiftBoundary", 2);
453
- n([
454
- r({ attribute: "auto-size-boundary", type: Object })
455
- ], i.prototype, "autoSizeBoundary", 2);
456
- n([
457
- r({ reflect: !0 })
458
- ], i.prototype, "menu", 2);
459
- n([
460
- r({ attribute: "always-show-checked-icon", reflect: !0, type: Boolean })
461
- ], i.prototype, "alwaysShowCheckedIcon", 2);
462
- n([
463
- r({ attribute: "check-placement", reflect: !0, type: String })
464
- ], i.prototype, "checkPlacement", 2);
465
- n([
466
- r({ attribute: "submenu-placement" })
467
- ], i.prototype, "submenuPlacement", 2);
468
- n([
469
- r({ reflect: !0, type: Boolean })
470
- ], i.prototype, "lazy", 2);
471
- n([
472
- p("checked")
473
- ], i.prototype, "handleCheckedChange", 1);
474
- n([
475
- p("disabled")
476
- ], i.prototype, "handleDisabledChange", 1);
477
- n([
478
- p("current")
479
- ], i.prototype, "handleCurrentChange", 1);
480
- n([
481
- p("type")
482
- ], i.prototype, "handleTypeChange", 1);
483
- i = n([
484
- L("cx-menu-item")
485
- ], 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";
486
15
  export {
487
- i as default
16
+ b as default
488
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.tftDINBg.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.Ds5nq4mo.js";
2
- import { C as t } from "../chunks/color-swatch-group.d5e1sYos.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";