@orangelogic/design-system 2.100.0 → 2.102.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 (70) hide show
  1. package/library/chunks/{asset.CKtT9q4k.js → asset.CtL7ACp7.js} +1 -1
  2. package/library/chunks/{color-swatch-group.Cfn8EGfK.js → color-swatch-group.C6c53two.js} +3 -3
  3. package/library/chunks/{color-swatch.BUwHT5Cx.js → color-swatch.GsiCvj1n.js} +1 -1
  4. package/library/chunks/{confirm-popover.BMGnWZnC.js → confirm-popover.PiSCZY6-.js} +1 -1
  5. package/library/chunks/debounce.CIEhztrj.js +97 -0
  6. package/library/chunks/{dialog._xvAZqaE.js → dialog.BTU6B2_4.js} +9 -10
  7. package/library/chunks/event.BeKOsirN.js +46 -0
  8. package/library/chunks/{file-on-demand.CIjtKP0H.js → file-on-demand.DCxabV6T.js} +4 -4
  9. package/library/chunks/{folder-select.D4Ft0qRc.js → folder-select.BM7yeAsU.js} +2 -2
  10. package/library/chunks/{image.BnB-fJ8g.js → image.D207g003.js} +1 -1
  11. package/library/chunks/{list-editor.B_mnvgtZ.js → list-editor.CMakbQyU.js} +182 -184
  12. package/library/chunks/{table.D4HIzy47.js → table.Cm-ynClk.js} +977 -962
  13. package/library/chunks/transformation.Dir8s_wm.js +151 -0
  14. package/library/chunks/{tree.Hh8WCK7l.js → tree.DAiWVFiY.js} +91 -80
  15. package/library/components/alert.js +7 -8
  16. package/library/components/asset-link-format.js +867 -672
  17. package/library/components/atoms.js +4 -4
  18. package/library/components/color-picker.js +1 -1
  19. package/library/components/color-swatch-group.js +4 -4
  20. package/library/components/color-swatch.js +2 -2
  21. package/library/components/confirm-popover.js +2 -2
  22. package/library/components/details.js +1 -2
  23. package/library/components/dialog.js +3 -4
  24. package/library/components/drawer.js +83 -73
  25. package/library/components/dropdown.js +7 -8
  26. package/library/components/dynamic-select.js +1 -1
  27. package/library/components/element-clamp.js +1 -2
  28. package/library/components/file-on-demand.js +5 -5
  29. package/library/components/folder-select.js +2 -2
  30. package/library/components/image.js +2 -2
  31. package/library/components/line-clamp.js +4 -5
  32. package/library/components/list-editor.js +4 -4
  33. package/library/components/masonry.js +1 -1
  34. package/library/components/molecules.js +4 -4
  35. package/library/components/organisms.js +2 -2
  36. package/library/components/popup.js +73 -74
  37. package/library/components/range.js +1 -1
  38. package/library/components/select.js +1 -2
  39. package/library/components/share-option-list.js +1 -1
  40. package/library/components/sidebar.js +6 -6
  41. package/library/components/table.js +1 -1
  42. package/library/components/tag.js +44 -31
  43. package/library/components/tooltip.js +1 -2
  44. package/library/components/tree-item.js +4 -3
  45. package/library/components/tree.js +1 -1
  46. package/library/components/types.js +760 -765
  47. package/library/components/video.js +2 -2
  48. package/library/package.json +1 -1
  49. package/library/packages/atoms/src/components/drawer/drawer.d.ts +8 -0
  50. package/library/packages/atoms/src/components/table/components/table-toolbar/table-toolbar.d.ts +11 -1
  51. package/library/packages/atoms/src/components/tag/tag.d.ts +11 -1
  52. package/library/packages/atoms/src/components/tree-item/tree-item.d.ts +10 -0
  53. package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +8 -0
  54. package/library/packages/organisms/src/asset-link-format/components/asset-link-format-crop/asset-link-format-crop.d.ts +4 -0
  55. package/library/packages/organisms/src/asset-link-format/components/asset-link-format-quality/asset-link-format-quality.d.ts +4 -0
  56. package/library/packages/organisms/src/asset-link-format/components/asset-link-format-resize/asset-link-format-resize.d.ts +4 -0
  57. package/library/packages/organisms/src/asset-link-format/components/asset-link-format-rotation/asset-link-format-rotation.d.ts +4 -0
  58. package/library/packages/organisms/src/content-builder/styleController.d.ts +2 -1
  59. package/library/packages/types/src/asset-link-format.d.ts +2 -0
  60. package/library/packages/types/src/content-builder.d.ts +5 -1
  61. package/library/packages/types/src/tag.d.ts +1 -0
  62. package/library/packages/utils/src/transformation/transformation.d.ts +4 -1
  63. package/library/react-web-component.d.ts +19 -3
  64. package/library/utils.js +138 -140
  65. package/package.json +1 -1
  66. package/library/chunks/animate.El-MpOws.js +0 -37
  67. package/library/chunks/browser.BHOCIF_A.js +0 -84
  68. package/library/chunks/debounce.DaHuiSGU.js +0 -15
  69. package/library/chunks/event.mFzZi4sr.js +0 -11
  70. package/library/chunks/transformation.Cqz3hPaQ.js +0 -144
@@ -0,0 +1,151 @@
1
+ import { T as r } from "./asset-link-format.BSRDqHg7.js";
2
+ function m({
3
+ asset: k,
4
+ baseUrl: h,
5
+ extension: y,
6
+ options: f,
7
+ parameters: c,
8
+ transformations: l,
9
+ useSession: _ = ""
10
+ }) {
11
+ if (h == null)
12
+ return "";
13
+ let a = h;
14
+ const v = l?.findLast(
15
+ (i) => i.key === r.Quality
16
+ );
17
+ if (v && (l = [
18
+ ...l?.filter(
19
+ (i) => i.key !== r.Quality
20
+ ) || [],
21
+ v
22
+ ]), l) {
23
+ const i = [];
24
+ for (let o = 0; o < l.length; o++) {
25
+ const t = l[o];
26
+ if (t.key === r.Rotate) {
27
+ let e = t.value.rotation ?? 0;
28
+ for (; l[o + 1]?.key === r.Rotate; )
29
+ o++, e += l[o].value.rotation ?? 0;
30
+ e !== 0 && i.push({ key: r.Rotate, value: { rotation: e } });
31
+ } else
32
+ i.push(t);
33
+ }
34
+ l = i;
35
+ }
36
+ l && l.length > 0 && (a += "/t/"), l?.forEach(({ key: i, value: o }) => {
37
+ if (i === r.Resize) {
38
+ const t = [
39
+ ...[
40
+ {
41
+ key: "re_w_",
42
+ value: Math.round(o.width ?? 0)
43
+ },
44
+ {
45
+ key: "re_h_",
46
+ value: Math.round(o.height ?? 0)
47
+ }
48
+ ].filter((e) => e.value !== void 0).map((e) => ({
49
+ key: e.key,
50
+ value: Math.round(Number(e.value))
51
+ })),
52
+ {
53
+ key: "re_rm_",
54
+ value: "stretch"
55
+ }
56
+ ];
57
+ t.forEach(({ key: e, value: u }, n) => {
58
+ a += `${e}${u}${n < t.length - 1 ? "," : ""}`;
59
+ }), a += "/";
60
+ }
61
+ if (i === r.Crop) {
62
+ const t = [
63
+ ...[
64
+ {
65
+ key: "c_",
66
+ value: o.mode
67
+ },
68
+ ...o.disabledSize ? [] : [
69
+ {
70
+ key: "c_w_",
71
+ value: Math.round(o.width ?? 0)
72
+ },
73
+ {
74
+ key: "c_h_",
75
+ value: Math.round(o.height ?? 0)
76
+ },
77
+ {
78
+ key: "c_x_",
79
+ value: Math.round(o.x ?? 0) === 0 && f?.omitZeroXY ? void 0 : Math.round(o.x ?? 0)
80
+ },
81
+ {
82
+ key: "c_y_",
83
+ value: Math.round(o.y ?? 0) === 0 && f?.omitZeroXY ? void 0 : Math.round(o.y ?? 0)
84
+ }
85
+ ],
86
+ ...o.focusMode && o.focusMode !== "manual" ? [
87
+ {
88
+ key: o.isFocusModeAuto ? "acm_" : "c_g_",
89
+ value: o.focusMode
90
+ }
91
+ ] : []
92
+ ].filter((e) => e.value !== void 0 && e.value !== null).map((e) => ({
93
+ key: e.key,
94
+ value: e.value
95
+ })),
96
+ {
97
+ key: "c_whu_",
98
+ value: "pixel"
99
+ }
100
+ ];
101
+ t.forEach(({ key: e, value: u }, n) => {
102
+ const s = ["c_w_", "c_h_", "c_x_", "c_y_"].includes(e);
103
+ a += `${e}${s ? Math.round(Number(u)) : u}${n < t.length - 1 ? "," : ""}`;
104
+ }), a += "/";
105
+ }
106
+ if (i === r.Rotate && ([
107
+ {
108
+ key: "r_a_",
109
+ value: o.rotation
110
+ }
111
+ ].filter((e) => e.value !== void 0).map((e) => ({
112
+ key: e.key,
113
+ value: Math.round(Number(e.value))
114
+ })).forEach(({ key: e, value: u }) => {
115
+ a += `${e}${u}`;
116
+ }), a += "/"), i === r.Quality) {
117
+ const t = [
118
+ {
119
+ key: "q_level_",
120
+ value: o.quality
121
+ }
122
+ ].filter((e) => e.value !== void 0).map((e) => ({
123
+ key: e.key,
124
+ value: Math.round(Number(e.value))
125
+ }));
126
+ t.forEach(({ key: e, value: u }, n) => {
127
+ a += `${e}${u}${n < t.length - 1 ? "," : ""}`;
128
+ }), a += "/";
129
+ }
130
+ if (i === r.Metadata) {
131
+ const t = [
132
+ {
133
+ key: "fl_keep_metadata",
134
+ value: o.keepMetadata
135
+ }
136
+ ].filter((e) => e.value !== void 0).map((e) => ({ key: e.key, value: e.value }));
137
+ t.forEach(({ key: e }, u) => {
138
+ a += `${e}${u < t.length - 1 ? "," : ""}`;
139
+ }), a += "/";
140
+ }
141
+ }), y && (a += `${k?.identifier ?? crypto.randomUUID()}${y}`);
142
+ const d = [];
143
+ return c && c.length > 0 && c.forEach(({ key: i, value: o }) => {
144
+ d.push(
145
+ `${encodeURIComponent(i.trim())}=${encodeURIComponent(o.trim())}`
146
+ );
147
+ }), h && _ && d.push(`UseSession=${encodeURIComponent(_)}`), d.length > 0 && (a += `?${d.join("&")}`), a.endsWith("/") && (a = a.slice(0, -1)), a;
148
+ }
149
+ export {
150
+ m as b
151
+ };
@@ -3,22 +3,23 @@ import { c as N } from "./component.styles.CRO4Odto.js";
3
3
  import { c as G } from "./custom-element.L4WJXn1j.js";
4
4
  import { L as M } from "./i18n.DK1uYlJT.js";
5
5
  import { c as K } from "./math.DqTA6ya4.js";
6
- import { w as b } from "./watch.BCJD77bD.js";
7
- import { i as Z, x as g, E as L } from "./lit-element.jLBm65_O.js";
6
+ import { w as f } from "./watch.BCJD77bD.js";
7
+ import { i as Z, x as b, E as D } from "./lit-element.jLBm65_O.js";
8
8
  import { r as y } from "./state.CSDxrqLd.js";
9
- import { e as f } from "./query.BBf1UFkC.js";
10
- import { s as z, a as U, b as $ } from "./animate.El-MpOws.js";
9
+ import { e as x } from "./query.BBf1UFkC.js";
10
+ import { s as z, a as U, b as $ } from "./event.BeKOsirN.js";
11
11
  import { e as C } from "./class-map.BiVq-cVR.js";
12
- import { o as _ } from "./if-defined.BRoBj_Rp.js";
12
+ import { o as E } from "./if-defined.BRoBj_Rp.js";
13
13
  import { l as W } from "./live.SCz6M8Gs.js";
14
- import { n as E } from "./when.Dr1es41R.js";
14
+ import { n as S } from "./when.Dr1es41R.js";
15
15
  import { g as P, s as H } from "./animation-registry.HmpwNuGH.js";
16
16
  import Y from "../components/checkbox.js";
17
17
  import J from "../components/icon.js";
18
- import Q from "../components/spinner.js";
19
- import { i as ee } from "./browser.BHOCIF_A.js";
20
- import { S as te } from "./sortable.esm.oSzf6C5Q.js";
21
- function ie(e, t, i) {
18
+ import Q from "../components/line-clamp.js";
19
+ import ee from "../components/spinner.js";
20
+ import { i as te } from "./debounce.CIEhztrj.js";
21
+ import { S as ie } from "./sortable.esm.oSzf6C5Q.js";
22
+ function ne(e, t, i) {
22
23
  let n;
23
24
  return function(...r) {
24
25
  const a = this, d = function() {
@@ -30,31 +31,31 @@ function ie(e, t, i) {
30
31
  const p = [];
31
32
  for (let e = 0; e < 256; ++e)
32
33
  p.push((e + 256).toString(16).slice(1));
33
- function ne(e, t = 0) {
34
+ function ae(e, t = 0) {
34
35
  return (p[e[t + 0]] + p[e[t + 1]] + p[e[t + 2]] + p[e[t + 3]] + "-" + p[e[t + 4]] + p[e[t + 5]] + "-" + p[e[t + 6]] + p[e[t + 7]] + "-" + p[e[t + 8]] + p[e[t + 9]] + "-" + p[e[t + 10]] + p[e[t + 11]] + p[e[t + 12]] + p[e[t + 13]] + p[e[t + 14]] + p[e[t + 15]]).toLowerCase();
35
36
  }
36
37
  let I;
37
- const ae = new Uint8Array(16);
38
- function oe() {
38
+ const oe = new Uint8Array(16);
39
+ function re() {
39
40
  if (!I) {
40
41
  if (typeof crypto > "u" || !crypto.getRandomValues)
41
42
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
42
43
  I = crypto.getRandomValues.bind(crypto);
43
44
  }
44
- return I(ae);
45
+ return I(oe);
45
46
  }
46
- const re = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), F = { randomUUID: re };
47
- function se(e, t, i) {
47
+ const se = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), F = { randomUUID: se };
48
+ function le(e, t, i) {
48
49
  if (F.randomUUID && !e)
49
50
  return F.randomUUID();
50
51
  e = e || {};
51
- const n = e.random ?? e.rng?.() ?? oe();
52
+ const n = e.random ?? e.rng?.() ?? re();
52
53
  if (n.length < 16)
53
54
  throw new Error("Random bytes length must be >= 16");
54
- return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, ne(n);
55
+ return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, ae(n);
55
56
  }
56
- const le = Z`:host{--selected-color:var(--cx-color-primary-600);--selected-background-color:var(--cx-color-primary-50);--hover-background-color:var(--cx-menu-item-background-color-hover);--active-background-color:var(--cx-color-neutral-200);--item-padding:var(--cx-spacing-2x-small) var(--cx-spacing-x-small);outline:0;display:block}:host(:focus-visible) .tree-item{outline:var(--cx-focus-ring);outline-offset:calc(-1 * var(--cx-focus-ring-width))}[hidden]{display:none!important}slot:not([name])::slotted(cx-icon){margin-inline-end:var(--cx-spacing-x-small)}.tree-item{color:var(--cx-color-neutral);cursor:pointer;-webkit-user-select:none;user-select:none;flex-direction:column;align-items:stretch;display:flex;position:relative}.tree-item__checkbox{margin-inline-end:var(--cx-spacing-x-small)}.tree-item__expand-button,.tree-item__checkbox,.tree-item__label{font-family:var(--cx-font-sans);font-size:var(--cx-tree-item-font-size,var(--cx-font-size-small));font-weight:var(--cx-tree-item-font-weight,var(--cx-font-weight-medium));line-height:var(--cx-tree-item-line-height,var(--cx-line-height-large));letter-spacing:var(--cx-tree-item-letter-spacing,var(--cx-letter-spacing-normal))}.tree-item__checkbox::part(base){align-items:center;display:flex}.tree-item__checkbox::part(label){margin-inline-start:0}.tree-item__indentation{flex-shrink:0;width:1em;display:block}.tree-item__expand-spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.tree-item__expand-button{box-sizing:content-box;color:var(--cx-color-neutral-500);cursor:pointer;min-width:max(1em,1rem);min-height:max(1em,1rem);transition:var(--cx-transition-medium) rotate ease;flex-shrink:0;justify-content:center;align-items:center;display:flex;position:relative}.tree-item--expanded .tree-item__expand-button{rotate:90deg}.tree-item--expanded.tree-item--rtl .tree-item__expand-button{rotate:-90deg}.tree-item--expanded slot[name=expand-icon],.tree-item:not(.tree-item--expanded) slot[name=collapse-icon]{display:none}:host(:not([aria-disabled=true])) .tree-item--selected .tree-item__item .tree-item__expand-icon-slot{color:var(--selected-color)}.tree-item:not(.tree-item--has-expand-button) .tree-item__expand-icon-slot{visibility:hidden;opacity:0;pointer-events:none}.tree-item__expand-button--visible{cursor:pointer}.tree-item__item{border-radius:var(--cx-border-radius-large);padding:var(--item-padding,var(--cx-spacing-x-small) var(--cx-spacing-small));transition:var(--cx-transition-x-fast) background-color ease;align-items:center;display:flex}.tree-item__item:hover{background-color:var(--hover-background-color)}.tree-item__item:active{background-color:var(--active-background-color)}.tree-item--disabled .tree-item__item{opacity:.5;cursor:default;outline:none}:host(:not([aria-disabled=true])) .tree-item--selected .tree-item__item{background-color:var(--selected-background-color);color:var(--selected-color)}:host(:not([aria-disabled=true])) .tree-item__expand-button{color:var(--cx-color-neutral)}:host(:not([aria-disabled=true])) .tree-item--selected,:host(:not([aria-disabled=true])) .tree-item--selected .tree-item__expand-button,:host(:not([aria-disabled=true])) .tree-item--selected .tree-item__actions::slotted(cx-icon-button){color:var(--cx-color-neutral-0)}:host(:not([aria-disabled=true])) .tree-item--selected .tree-item__actions::slotted(cx-icon-button){--hover-background-color:var(--cx-color-neutral-0)}.tree-item__label{align-items:center;display:flex}.tree-item__actions{font-size:var(--cx-font-size-medium);align-items:center;width:fit-content;margin-inline-start:auto;display:flex}.tree-item__actions::slotted(*){visibility:hidden;opacity:0;transition:var(--cx-transition-x-fast) visibility, var(--cx-transition-x-fast) opacity ease}.tree-item__item:hover .tree-item__actions::slotted(*){visibility:visible;opacity:1}@supports not (overlay:auto){.tree-item__actions::slotted(cx-dropdown[open]){visibility:visible;opacity:1}}.tree-item__children{font-size:calc(1em + var(--indent-size,var(--cx-spacing-medium)));gap:var(--children-gap,0);flex-direction:column;display:flex}@media (forced-colors:active){:host(:not([aria-disabled=true])) .tree-item--selected .tree-item__item{outline:1px dashed selecteditem}}::slotted(cx-tree-item){--hover-background-color:inherit;--active-background-color:inherit;--selected-background-color:inherit;--selected-color:inherit}:host([data-dragging]){position:relative}:host([data-dragging=inside]){background-color:var(--cx-color-primary-400)}:host([data-dragging=before]):before{content:"";border-top:var(--cx-spacing-2x-small) solid var(--cx-color-primary-400);width:100%;position:absolute;top:0;left:0}:host([data-dragging=after]):before{content:"";border-bottom:var(--cx-spacing-2x-small) solid var(--cx-color-primary-400);width:100%;position:absolute;bottom:0;left:0}`, k = "tree-sortable", w = 0.2, O = (e) => e == null;
57
- function de() {
57
+ const de = Z`:host{--selected-color:var(--cx-color-primary-600);--selected-background-color:var(--cx-color-primary-50);--hover-background-color:var(--cx-menu-item-background-color-hover);--active-background-color:var(--cx-color-neutral-200);--item-padding:var(--cx-spacing-2x-small) var(--cx-spacing-x-small);outline:0;display:block}:host(:focus-visible) .tree-item{outline:var(--cx-focus-ring);outline-offset:calc(-1 * var(--cx-focus-ring-width))}[hidden]{display:none!important}slot:not([name])::slotted(cx-icon){margin-inline-end:var(--cx-spacing-x-small)}.tree-item{color:var(--cx-color-neutral);cursor:pointer;-webkit-user-select:none;user-select:none;flex-direction:column;align-items:stretch;display:flex;position:relative}.tree-item__checkbox{margin-inline-end:var(--cx-spacing-x-small)}.tree-item__expand-button,.tree-item__checkbox,.tree-item__label{font-family:var(--cx-font-sans);font-size:var(--cx-tree-item-font-size,var(--cx-font-size-small));font-weight:var(--cx-tree-item-font-weight,var(--cx-font-weight-medium));line-height:var(--cx-tree-item-line-height,var(--cx-line-height-large));letter-spacing:var(--cx-tree-item-letter-spacing,var(--cx-letter-spacing-normal))}.tree-item__checkbox::part(base){align-items:center;display:flex}.tree-item__checkbox::part(label){margin-inline-start:0}.tree-item__indentation{flex-shrink:0;width:1em;display:block}.tree-item__expand-spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.tree-item__expand-button{box-sizing:content-box;color:var(--cx-color-neutral-500);cursor:pointer;min-width:max(1em,1rem);min-height:max(1em,1rem);transition:var(--cx-transition-medium) rotate ease;flex-shrink:0;justify-content:center;align-items:center;display:flex;position:relative}.tree-item--expanded .tree-item__expand-button{rotate:90deg}.tree-item--expanded.tree-item--rtl .tree-item__expand-button{rotate:-90deg}.tree-item--expanded slot[name=expand-icon],.tree-item:not(.tree-item--expanded) slot[name=collapse-icon]{display:none}:host(:not([aria-disabled=true])) .tree-item--selected .tree-item__item .tree-item__expand-icon-slot{color:var(--selected-color)}.tree-item:not(.tree-item--has-expand-button) .tree-item__expand-icon-slot{visibility:hidden;opacity:0;pointer-events:none}.tree-item__expand-button--visible{cursor:pointer}.tree-item__item{border-radius:var(--cx-border-radius-large);padding:var(--item-padding,var(--cx-spacing-x-small) var(--cx-spacing-small));transition:var(--cx-transition-x-fast) background-color ease;align-items:center;display:flex}.tree-item__item:hover{background-color:var(--hover-background-color)}.tree-item__item:active{background-color:var(--active-background-color)}.tree-item--disabled .tree-item__item{opacity:.5;cursor:default;outline:none}:host(:not([aria-disabled=true])) .tree-item--selected .tree-item__item{background-color:var(--selected-background-color);color:var(--selected-color)}:host(:not([aria-disabled=true])) .tree-item__expand-button{color:var(--cx-color-neutral)}:host(:not([aria-disabled=true])) .tree-item--selected,:host(:not([aria-disabled=true])) .tree-item--selected .tree-item__expand-button,:host(:not([aria-disabled=true])) .tree-item--selected .tree-item__actions::slotted(cx-icon-button){color:var(--cx-color-neutral-0)}:host(:not([aria-disabled=true])) .tree-item--selected .tree-item__actions::slotted(cx-icon-button){--hover-background-color:var(--cx-color-neutral-0)}.tree-item__label{align-items:center;display:flex}.tree-item__actions{font-size:var(--cx-font-size-medium);align-items:center;width:fit-content;margin-inline-start:auto;display:flex}.tree-item__actions::slotted(*){visibility:hidden;opacity:0;transition:var(--cx-transition-x-fast) visibility, var(--cx-transition-x-fast) opacity ease}.tree-item__item:hover .tree-item__actions::slotted(*){visibility:visible;opacity:1}@supports not (overlay:auto){.tree-item__actions::slotted(cx-dropdown[open]){visibility:visible;opacity:1}}.tree-item__children{font-size:calc(1em + var(--indent-size,var(--cx-spacing-medium)));gap:var(--children-gap,0);flex-direction:column;display:flex}@media (forced-colors:active){:host(:not([aria-disabled=true])) .tree-item--selected .tree-item__item{outline:1px dashed selecteditem}}::slotted(cx-tree-item){--hover-background-color:inherit;--active-background-color:inherit;--selected-background-color:inherit;--selected-color:inherit}:host([data-dragging]){position:relative}:host([data-dragging=inside]){background-color:var(--cx-color-primary-400)}:host([data-dragging=before]):before{content:"";border-top:var(--cx-spacing-2x-small) solid var(--cx-color-primary-400);width:100%;position:absolute;top:0;left:0}:host([data-dragging=after]):before{content:"";border-bottom:var(--cx-spacing-2x-small) solid var(--cx-color-primary-400);width:100%;position:absolute;bottom:0;left:0}`, k = "tree-sortable", w = 0.2, O = (e) => e == null;
58
+ function ce() {
58
59
  function e() {
59
60
  }
60
61
  let t = null;
@@ -75,7 +76,7 @@ function de() {
75
76
  completed: a,
76
77
  dragEl: d,
77
78
  originalEvent: m,
78
- putSortable: x,
79
+ putSortable: g,
79
80
  target: u
80
81
  }) {
81
82
  if (t = null, !i || !i.options[k] || !i.options.getDropZone || O(i.options.insertBeforeZonePercentage) || O(i.options.insertAfterZonePercentage) || !["CX-TREE-ITEM", "CX-TREE"].includes(u.tagName) || u.hasAttribute("no-drag")) {
@@ -87,17 +88,17 @@ function de() {
87
88
  n();
88
89
  return;
89
90
  }
90
- const T = B.getBoundingClientRect(), D = (m.clientY - T.top) / T.height, v = x || this.sortable;
91
- v.captureAnimationState(), v !== i && i.captureAnimationState();
91
+ const T = B.getBoundingClientRect(), L = (m.clientY - T.top) / T.height, _ = g || this.sortable;
92
+ _.captureAnimationState(), _ !== i && i.captureAnimationState();
92
93
  const V = u.parentNode;
93
94
  if (d && V)
94
- if (D < i.options.insertBeforeZonePercentage)
95
+ if (L < i.options.insertBeforeZonePercentage)
95
96
  t = {
96
97
  dragEl: d,
97
98
  el: u,
98
99
  position: -1
99
100
  }, u.setAttribute("data-dragging", "before");
100
- else if (D > i.options.insertAfterZonePercentage)
101
+ else if (L > i.options.insertAfterZonePercentage)
101
102
  t = {
102
103
  dragEl: d,
103
104
  el: u,
@@ -114,7 +115,7 @@ function de() {
114
115
  position: 0
115
116
  }, u.setAttribute("data-dragging", "inside");
116
117
  }
117
- if (v.animateAll(), v !== i && i.animateAll(), t)
118
+ if (_.animateAll(), _ !== i && i.animateAll(), t)
118
119
  r(), a(!0), n();
119
120
  else
120
121
  return !0;
@@ -138,22 +139,22 @@ function de() {
138
139
  pluginName: k
139
140
  });
140
141
  }
141
- class S extends te {
142
+ class v extends ie {
142
143
  constructor(t, i) {
143
144
  super(t, i);
144
145
  }
145
146
  static create(t, i = {}) {
146
- return new S(t, i);
147
+ return new v(t, i);
147
148
  }
148
149
  }
149
- S.mount(new de());
150
+ v.mount(new ce());
150
151
  const j = (e) => ({
151
152
  ...e,
152
153
  animation: 100,
153
154
  draggable: "cx-tree-item:not([no-drag])",
154
155
  emptyInsertThreshold: 0,
155
156
  fallbackOnBody: !0,
156
- forceFallback: ee(),
157
+ forceFallback: te(),
157
158
  getDropZone: (t) => t?.shadowRoot?.querySelector(".tree-item__item"),
158
159
  insertAfterZonePercentage: 1 - w,
159
160
  insertBeforeZonePercentage: w,
@@ -167,14 +168,14 @@ const j = (e) => ({
167
168
  [k]: !0,
168
169
  swapThreshold: w
169
170
  });
170
- var ce = Object.defineProperty, he = Object.getOwnPropertyDescriptor, s = (e, t, i, n) => {
171
- for (var r = n > 1 ? void 0 : n ? he(t, i) : t, a = e.length - 1, d; a >= 0; a--)
171
+ var he = Object.defineProperty, pe = Object.getOwnPropertyDescriptor, s = (e, t, i, n) => {
172
+ for (var r = n > 1 ? void 0 : n ? pe(t, i) : t, a = e.length - 1, d; a >= 0; a--)
172
173
  (d = e[a]) && (r = (n ? d(t, i, r) : d(r)) || r);
173
- return n && r && ce(t, i, r), r;
174
+ return n && r && he(t, i, r), r;
174
175
  };
175
176
  let o = class extends R {
176
177
  constructor() {
177
- super(), this.localize = new M(this), this.expanded = !1, this.selected = !1, this.disabled = !1, this.readonly = !1, this.lazy = !1, this.href = "", this.rel = "noreferrer noopener", this.itemId = "", this.sortable = !1, this.noDrag = !1, this.noSelect = !1, this.noDragInside = !1, this.sortableGroup = void 0, this.expandButtonPlacement = "start", this.noForwardExpandButtonPlacement = !1, this.disabledSyncCheckboxes = !1, this.partialSyncCheckboxes = !1, this.previouslySelected = !1, this.focusable = !1, this.indeterminate = !1, this.isLeaf = !1, this.loading = !1, this.selectable = !1, this.sortableInstance = null, this.onDragStart = (e) => {
178
+ super(), this.localize = new M(this), this.expanded = !1, this.selected = !1, this.disabled = !1, this.readonly = !1, this.lazy = !1, this.href = "", this.rel = "noreferrer noopener", this.itemId = "", this.sortable = !1, this.noDrag = !1, this.noSelect = !1, this.noDragInside = !1, this.sortableGroup = void 0, this.expandButtonPlacement = "start", this.noForwardExpandButtonPlacement = !1, this.disabledSyncCheckboxes = !1, this.partialSyncCheckboxes = !1, this.previouslySelected = !1, this.focusable = !1, this.maxLines = -1, this.indeterminate = !1, this.isLeaf = !1, this.loading = !1, this.selectable = !1, this.sortableInstance = null, this.onDragStart = (e) => {
178
179
  if (e.dataTransfer) {
179
180
  const t = this.cloneNode(!0);
180
181
  t.style.backgroundColor = "red", t.style.display = "none", this.ownerDocument.body.appendChild(t), e.dataTransfer.setDragImage(t, 0, 0);
@@ -263,12 +264,12 @@ let o = class extends R {
263
264
  }
264
265
  renderExpandButton() {
265
266
  const e = this.localize.dir() === "rtl", t = this.showExpandButton;
266
- return g`<div part="expand-button" class=${C({
267
+ return b`<div part="expand-button" class=${C({
267
268
  "tree-item__expand-button": !0,
268
269
  "tree-item__expand-button--visible": t
269
- })} aria-hidden="true">${E(
270
+ })} aria-hidden="true">${S(
270
271
  this.loading,
271
- () => g`<cx-spinner part="spinner" class="tree-item__expand-spinner" exportparts="base:spinner__base"></cx-spinner>`
272
+ () => b`<cx-spinner part="spinner" class="tree-item__expand-spinner" exportparts="base:spinner__base"></cx-spinner>`
272
273
  )}<slot class="tree-item__expand-icon-slot" name="expand-icon"><cx-icon name=${e ? "chevron_left" : "chevron_right"}></cx-icon></slot><slot class="tree-item__expand-icon-slot" name="collapse-icon"><cx-icon name=${e ? "chevron_left" : "chevron_right"}></cx-icon></slot></div>`;
273
274
  }
274
275
  handleSortableUpdate(e) {
@@ -295,7 +296,7 @@ let o = class extends R {
295
296
  this.removeEventListener("dragstart", this.onDragStart), this.sortableInstance && (this.sortableInstance.destroy(), this.sortableInstance = null);
296
297
  }
297
298
  initSortable() {
298
- this.addEventListener("dragstart", this.onDragStart), this.focusable || this.setAttribute("tabindex", "-1"), this.sortableInstance = S.create(this, {
299
+ this.addEventListener("dragstart", this.onDragStart), this.focusable || this.setAttribute("tabindex", "-1"), this.sortableInstance = v.create(this, {
299
300
  ...j({
300
301
  group: this.sortableGroup,
301
302
  onAdd: this.handleSortableUpdate,
@@ -311,7 +312,7 @@ let o = class extends R {
311
312
  }
312
313
  renderBase(e) {
313
314
  const t = this.showExpandButton;
314
- return this.href ? g`<a id="anchor" part="base" class=${C({
315
+ return this.href ? b`<a id="anchor" part="base" class=${C({
315
316
  "tree-item": !0,
316
317
  "tree-item--disabled": this.disabled,
317
318
  "tree-item--expanded": this.expanded,
@@ -319,7 +320,7 @@ let o = class extends R {
319
320
  "tree-item--leaf": this.isLeaf,
320
321
  "tree-item--rtl": this.localize.dir() === "rtl",
321
322
  "tree-item--selected": this.selected
322
- })} href=${_(this.href)} target=${_(this.target)} download=${_(this.download)} rel=${_(this.rel)} ?inert=${this.disabled}>${e}</a>` : g`<div part="base" class=${C({
323
+ })} href=${E(this.href)} target=${E(this.target)} download=${E(this.download)} rel=${E(this.rel)} ?inert=${this.disabled}>${e}</a>` : b`<div part="base" class=${C({
323
324
  "tree-item": !0,
324
325
  "tree-item--disabled": this.disabled,
325
326
  "tree-item--expanded": this.expanded,
@@ -330,20 +331,20 @@ let o = class extends R {
330
331
  })}>${e}</div>`;
331
332
  }
332
333
  render() {
333
- return this.renderBase(g`<div class="tree-item__item" part="
334
+ return this.renderBase(b`<div class="tree-item__item" part="
334
335
  item
335
336
  ${this.disabled ? "item--disabled" : ""}
336
337
  ${this.expanded ? "item--expanded" : ""}
337
338
  ${this.indeterminate ? "item--indeterminate" : ""}
338
339
  ${this.selected ? "item--selected" : ""}
339
- "><div class="tree-item__indentation" part="indentation"></div>${E(
340
+ "><div class="tree-item__indentation" part="indentation"></div>${S(
340
341
  this.expandButtonPlacement === "start",
341
342
  this.renderExpandButton,
342
- () => L
343
+ () => D
343
344
  )}
344
- ${E(
345
+ ${S(
345
346
  this.selectable,
346
- () => g`<cx-checkbox part="checkbox" aria-label=${this.localize.term("checkbox")} exportparts="
347
+ () => b`<cx-checkbox part="checkbox" aria-label=${this.localize.term("checkbox")} exportparts="
347
348
  base:checkbox__base,
348
349
  control:checkbox__control,
349
350
  control--checked:checkbox__control--checked,
@@ -352,33 +353,40 @@ let o = class extends R {
352
353
  indeterminate-icon:checkbox__indeterminate-icon,
353
354
  label:checkbox__label
354
355
  " class="tree-item__checkbox" ?disabled=${this.disabled} ?checked=${W(this.selected)} ?indeterminate=${this.indeterminate} tabindex="-1"></cx-checkbox>`
355
- )}<slot class="tree-item__label" part="label"></slot><slot class="tree-item__actions" part="actions" name="actions"></slot>${E(
356
+ )}
357
+
358
+ ${S(
359
+ this.maxLines > 0,
360
+ () => b`<cx-line-clamp class="tree-item__label" part="label" lines=${this.maxLines}><slot></slot></cx-line-clamp>`,
361
+ () => b`<slot class="tree-item__label" part="label"></slot>`
362
+ )}<slot class="tree-item__actions" part="actions" name="actions"></slot>${S(
356
363
  this.expandButtonPlacement === "end",
357
364
  this.renderExpandButton,
358
- () => L
365
+ () => D
359
366
  )}</div><div class="tree-item__children" part="children" role="group"><slot name="children" @slotchange=${this.handleChildrenSlotChange}></slot></div>`);
360
367
  }
361
368
  };
362
- o.styles = [N, le];
369
+ o.styles = [N, de];
363
370
  o.dependencies = {
364
371
  "cx-checkbox": Y,
365
372
  "cx-icon": J,
366
- "cx-spinner": Q
373
+ "cx-line-clamp": Q,
374
+ "cx-spinner": ee
367
375
  };
368
376
  s([
369
- f("slot:not([name])")
377
+ x("slot:not([name])")
370
378
  ], o.prototype, "defaultSlot", 2);
371
379
  s([
372
- f("slot[name=children]")
380
+ x("slot[name=children]")
373
381
  ], o.prototype, "childrenSlot", 2);
374
382
  s([
375
- f(".tree-item__item")
383
+ x(".tree-item__item")
376
384
  ], o.prototype, "itemElement", 2);
377
385
  s([
378
- f(".tree-item__children")
386
+ x(".tree-item__children")
379
387
  ], o.prototype, "childrenContainer", 2);
380
388
  s([
381
- f(".tree-item__expand-button slot")
389
+ x(".tree-item__expand-button slot")
382
390
  ], o.prototype, "expandButtonSlot", 2);
383
391
  s([
384
392
  l({ reflect: !0, type: Boolean })
@@ -455,6 +463,9 @@ s([
455
463
  s([
456
464
  l({ reflect: !0, type: Boolean })
457
465
  ], o.prototype, "focusable", 2);
466
+ s([
467
+ l({ attribute: "max-lines", type: Number })
468
+ ], o.prototype, "maxLines", 2);
458
469
  s([
459
470
  y()
460
471
  ], o.prototype, "indeterminate", 2);
@@ -471,22 +482,22 @@ s([
471
482
  y()
472
483
  ], o.prototype, "sortableInstance", 2);
473
484
  s([
474
- b("loading", { waitUntilFirstUpdate: !0 })
485
+ f("loading", { waitUntilFirstUpdate: !0 })
475
486
  ], o.prototype, "handleLoadingChange", 1);
476
487
  s([
477
- b("disabled")
488
+ f("disabled")
478
489
  ], o.prototype, "handleDisabledChange", 1);
479
490
  s([
480
- b("selected")
491
+ f("selected")
481
492
  ], o.prototype, "handleSelectedChange", 1);
482
493
  s([
483
- b("expanded", { waitUntilFirstUpdate: !0 })
494
+ f("expanded", { waitUntilFirstUpdate: !0 })
484
495
  ], o.prototype, "handleExpandedChange", 1);
485
496
  s([
486
- b("expanded", { waitUntilFirstUpdate: !0 })
497
+ f("expanded", { waitUntilFirstUpdate: !0 })
487
498
  ], o.prototype, "handleExpandAnimation", 1);
488
499
  s([
489
- b("lazy", { waitUntilFirstUpdate: !0 })
500
+ f("lazy", { waitUntilFirstUpdate: !0 })
490
501
  ], o.prototype, "handleLazyChange", 1);
491
502
  o = s([
492
503
  G("cx-tree-item")
@@ -505,11 +516,11 @@ H("tree-item.collapse", {
505
516
  ],
506
517
  options: { duration: 200, easing: "cubic-bezier(0.4, 0.0, 0.2, 1)" }
507
518
  });
508
- const pe = Z`:host{--indent-guide-color:var(--cx-color-neutral-200);--indent-guide-offset:0;--indent-guide-style:solid;--indent-guide-width:0;--indent-size:var(--cx-spacing-large);font-size:0;display:block}:host::part(children){gap:var(--children-gap,0);flex-direction:column;display:flex}:host([dragging]) ::slotted(cx-tree-item){--hover-background-color:transparent!important;--active-background-color:transparent!important;--selected-background-color:transparent!important}`;
509
- var ue = Object.defineProperty, me = Object.getOwnPropertyDescriptor, h = (e, t, i, n) => {
510
- for (var r = n > 1 ? void 0 : n ? me(t, i) : t, a = e.length - 1, d; a >= 0; a--)
519
+ const ue = Z`:host{--indent-guide-color:var(--cx-color-neutral-200);--indent-guide-offset:0;--indent-guide-style:solid;--indent-guide-width:0;--indent-size:var(--cx-spacing-large);font-size:0;display:block}:host::part(children){gap:var(--children-gap,0);flex-direction:column;display:flex}:host([dragging]) ::slotted(cx-tree-item){--hover-background-color:transparent!important;--active-background-color:transparent!important;--selected-background-color:transparent!important}`;
520
+ var me = Object.defineProperty, be = Object.getOwnPropertyDescriptor, h = (e, t, i, n) => {
521
+ for (var r = n > 1 ? void 0 : n ? be(t, i) : t, a = e.length - 1, d; a >= 0; a--)
511
522
  (d = e[a]) && (r = (n ? d(t, i, r) : d(r)) || r);
512
- return n && r && ue(t, i, r), r;
523
+ return n && r && me(t, i, r), r;
513
524
  };
514
525
  function q(e) {
515
526
  const t = e.getChildrenItems({ includeDisabled: !1 });
@@ -541,7 +552,7 @@ let c = class extends R {
541
552
  }
542
553
  runConnectedCallback() {
543
554
  if (this.addEventListener("focusin", this.handleFocusIn), this.addEventListener("focusout", this.handleFocusOut), this.addEventListener("cx-lazy-change", this.handleSlotChange), this.setAttribute("role", "tree"), this.setAttribute("tabindex", "0"), this.mutationObserver = new MutationObserver(this.handleTreeChanged), this.mutationObserver.observe(this, { childList: !0, subtree: !0 }), this.autoExpandToSelected) {
544
- const e = ie(() => {
555
+ const e = ne(() => {
545
556
  customElements.whenDefined("cx-tree-item").then(() => {
546
557
  this.selectedItems.forEach((t) => {
547
558
  this.expandToItem(t);
@@ -654,11 +665,11 @@ let c = class extends R {
654
665
  const t = this.getFocusableItems(), i = this.localize.dir() === "ltr", n = this.localize.dir() === "rtl";
655
666
  if (t.length > 0) {
656
667
  e.preventDefault();
657
- const r = t.findIndex((x) => x.matches(":focus")), a = t[r], d = (x) => {
658
- const u = t[K(x, 0, t.length - 1)];
668
+ const r = t.findIndex((g) => g.matches(":focus")), a = t[r], d = (g) => {
669
+ const u = t[K(g, 0, t.length - 1)];
659
670
  this.focusItem(u);
660
- }, m = (x) => {
661
- a.expanded = x;
671
+ }, m = (g) => {
672
+ a.expanded = g;
662
673
  };
663
674
  e.key === "ArrowDown" ? d(r + 1) : e.key === "ArrowUp" ? d(r - 1) : i && e.key === "ArrowRight" || n && e.key === "ArrowLeft" ? !a || a.disabled || a.readonly || a.expanded || a.isLeaf && !a.lazy ? d(r + 1) : m(!0) : i && e.key === "ArrowLeft" || n && e.key === "ArrowRight" ? !a || a.disabled || a.readonly || a.isLeaf || !a.expanded ? d(r - 1) : m(!1) : e.key === "Home" ? d(0) : e.key === "End" ? d(t.length - 1) : (e.key === "Enter" || e.key === " ") && !a.disabled && !a.readonly && this.selectItem(a);
664
675
  }
@@ -716,7 +727,7 @@ let c = class extends R {
716
727
  }
717
728
  getSortableGroup() {
718
729
  if (!this.disabledSortableGroup)
719
- return this.sortableGroup || (this.sortableGroup = se()), this.sortableGroup;
730
+ return this.sortableGroup || (this.sortableGroup = le()), this.sortableGroup;
720
731
  }
721
732
  handleSortableStart() {
722
733
  this.setAttribute("dragging", "");
@@ -725,7 +736,7 @@ let c = class extends R {
725
736
  this.removeAttribute("dragging");
726
737
  }
727
738
  initSortable() {
728
- this.addEventListener("cx-drag-start", this.handleSortableStart), this.addEventListener("cx-drag-end", this.handleSortableEnd), this.sortableInstance = S.create(this, {
739
+ this.addEventListener("cx-drag-start", this.handleSortableStart), this.addEventListener("cx-drag-end", this.handleSortableEnd), this.sortableInstance = v.create(this, {
729
740
  ...j({
730
741
  group: this.getSortableGroup(),
731
742
  onAdd: this.handleSortableUpdate,
@@ -777,18 +788,18 @@ let c = class extends R {
777
788
  });
778
789
  }
779
790
  render() {
780
- return g`<div part="base" class="tree" @click=${this.handleClick} @keydown=${this.handleKeyDown} @mousedown=${this.handleMouseDown}><slot part="children" @slotchange=${this.handleSlotChange}></slot><span hidden aria-hidden="true"><slot name="expand-icon"></slot></span><span hidden aria-hidden="true"><slot name="collapse-icon"></slot></span></div>`;
791
+ return b`<div part="base" class="tree" @click=${this.handleClick} @keydown=${this.handleKeyDown} @mousedown=${this.handleMouseDown}><slot part="children" @slotchange=${this.handleSlotChange}></slot><span hidden aria-hidden="true"><slot name="expand-icon"></slot></span><span hidden aria-hidden="true"><slot name="collapse-icon"></slot></span></div>`;
781
792
  }
782
793
  };
783
- c.styles = [N, pe];
794
+ c.styles = [N, ue];
784
795
  h([
785
- f("slot:not([name])")
796
+ x("slot:not([name])")
786
797
  ], c.prototype, "defaultSlot", 2);
787
798
  h([
788
- f("slot[name=expand-icon]")
799
+ x("slot[name=expand-icon]")
789
800
  ], c.prototype, "expandedIconSlot", 2);
790
801
  h([
791
- f("slot[name=collapse-icon]")
802
+ x("slot[name=collapse-icon]")
792
803
  ], c.prototype, "collapsedIconSlot", 2);
793
804
  h([
794
805
  l({ reflect: !0, type: Boolean })
@@ -834,10 +845,10 @@ h([
834
845
  y()
835
846
  ], c.prototype, "sortableInstance", 2);
836
847
  h([
837
- b("sortable")
848
+ f("sortable")
838
849
  ], c.prototype, "initTreeItems", 1);
839
850
  h([
840
- b("selection")
851
+ f("selection")
841
852
  ], c.prototype, "handleSelectionChange", 1);
842
853
  c = h([
843
854
  G("cx-tree")
@@ -847,7 +858,7 @@ export {
847
858
  c as a,
848
859
  X as b,
849
860
  q as c,
850
- ie as d,
861
+ ne as d,
851
862
  A as s,
852
- se as v
863
+ le as v
853
864
  };
@@ -1,16 +1,15 @@
1
1
  import { n as s, C as x } from "../chunks/lib-cortex-element.CVMmyPMC.js";
2
2
  import { c as b } from "../chunks/component.styles.CRO4Odto.js";
3
- import { s as u, a as p } from "../chunks/animate.El-MpOws.js";
3
+ import { s as u, a as p, w as m } from "../chunks/event.BeKOsirN.js";
4
4
  import { c as y } from "../chunks/custom-element.L4WJXn1j.js";
5
- import { w as m } from "../chunks/event.mFzZi4sr.js";
6
5
  import { L as C } from "../chunks/i18n.DK1uYlJT.js";
7
6
  import { H as T } from "../chunks/slot.j5oheLJC.js";
8
7
  import { w } from "../chunks/watch.BCJD77bD.js";
9
8
  import { i as I, x as h } from "../chunks/lit-element.jLBm65_O.js";
10
9
  import { r as A } from "../chunks/state.CSDxrqLd.js";
11
10
  import { e as g } from "../chunks/query.BBf1UFkC.js";
12
- import { e as f } from "../chunks/class-map.BiVq-cVR.js";
13
- import { s as _, g as v } from "../chunks/animation-registry.HmpwNuGH.js";
11
+ import { e as v } from "../chunks/class-map.BiVq-cVR.js";
12
+ import { s as _, g as f } from "../chunks/animation-registry.HmpwNuGH.js";
14
13
  import { C as H } from "../chunks/icon-button.CN0NGNQx.js";
15
14
  const k = I`:host{margin:0;display:contents}.alert{background-color:var(--cx-panel-background-color);border:solid var(--cx-panel-border-width) var(--cx-panel-border-color);border-top-width:calc(var(--cx-panel-border-width) * 3);border-radius:var(--cx-border-radius-small);font-family:var(--cx-font-sans);font-size:var(--cx-font-size-small);font-weight:var(--cx-font-weight-regular);color:var(--cx-color-neutral-700);margin:inherit;align-items:stretch;line-height:1.6;display:flex;position:relative;overflow:hidden}.alert:not(.alert--has-icon) .alert__icon,.alert:not(.alert--closable) .alert__close-button{display:none}.alert__icon{font-size:var(--cx-font-size-large);flex:none;align-items:center;padding-inline-start:var(--cx-spacing-large);display:flex}.alert--has-countdown{border-bottom:none}.alert--primary{border-top-color:var(--cx-color-primary)}.alert--primary .alert__icon{color:var(--cx-color-primary)}.alert--success{border-top-color:var(--cx-color-success)}.alert--success .alert__icon{color:var(--cx-color-success)}.alert--neutral{border-top-color:var(--cx-color-neutral)}.alert--neutral .alert__icon{color:var(--cx-color-neutral)}.alert--warning{border-top-color:var(--cx-color-warning)}.alert--warning .alert__icon{color:var(--cx-color-warning)}.alert--danger{border-top-color:var(--cx-color-danger)}.alert--danger .alert__icon{color:var(--cx-color-danger)}.alert__message{padding:var(--cx-spacing-large);flex:auto;display:block;overflow:hidden}.alert__close-button{font-size:var(--cx-font-size-medium);flex:none;align-items:center;padding-inline-end:var(--cx-spacing-medium);display:flex}.alert__countdown{width:100%;height:calc(var(--cx-panel-border-width) * 3);background-color:var(--cx-panel-border-color);display:flex;position:absolute;bottom:0;left:0}.alert__countdown--ltr{justify-content:flex-end}.alert__countdown .alert__countdown-elapsed{width:0;height:100%}.alert--primary .alert__countdown-elapsed{background-color:var(--cx-color-primary)}.alert--success .alert__countdown-elapsed{background-color:var(--cx-color-success)}.alert--neutral .alert__countdown-elapsed{background-color:var(--cx-color-neutral-600)}.alert--warning .alert__countdown-elapsed{background-color:var(--cx-color-warning)}.alert--danger .alert__countdown-elapsed{background-color:var(--cx-color-danger)}.alert__timer{display:none}`;
16
15
  var z = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, t = (r, o, n, l) => {
@@ -69,13 +68,13 @@ let e = class extends x {
69
68
  async handleOpenChange() {
70
69
  if (this.open) {
71
70
  this.emit("cx-show"), this.duration < 1 / 0 && this.restartAutoHide(), await u(this.base), this.base.hidden = !1;
72
- const { keyframes: r, options: o } = v(this, "alert.show", {
71
+ const { keyframes: r, options: o } = f(this, "alert.show", {
73
72
  dir: this.localize.dir()
74
73
  });
75
74
  await p(this.base, r, o), this.emit("cx-after-show");
76
75
  } else {
77
76
  this.emit("cx-hide"), clearTimeout(this.autoHideTimeout), clearInterval(this.remainingTimeInterval), await u(this.base);
78
- const { keyframes: r, options: o } = v(this, "alert.hide", {
77
+ const { keyframes: r, options: o } = f(this, "alert.hide", {
79
78
  dir: this.localize.dir()
80
79
  });
81
80
  await p(this.base, r, o), this.base.hidden = !0, this.emit("cx-after-hide");
@@ -113,7 +112,7 @@ let e = class extends x {
113
112
  });
114
113
  }
115
114
  render() {
116
- return h`<div part="base" class=${f({
115
+ return h`<div part="base" class=${v({
117
116
  alert: !0,
118
117
  "alert--closable": this.closable,
119
118
  "alert--danger": this.variant === "danger",
@@ -124,7 +123,7 @@ let e = class extends x {
124
123
  "alert--primary": this.variant === "primary",
125
124
  "alert--success": this.variant === "success",
126
125
  "alert--warning": this.variant === "warning"
127
- })} role="alert" aria-hidden=${this.open ? "false" : "true"} @mouseenter=${this.pauseAutoHide} @mouseleave=${this.resumeAutoHide}><div part="icon" class="alert__icon"><slot name="icon"></slot></div><div part="message" class="alert__message" aria-live="polite"><slot></slot></div>${this.closable ? h`<cx-icon-button part="close-button" exportparts="base:close-button__base" class="alert__close-button" name="close" label=${this.localize.term("close")} @click=${this.handleCloseClick}></cx-icon-button>` : ""}<div role="timer" class="alert__timer">${this.remainingTime}</div>${this.countdown ? h`<div class=${f({
126
+ })} role="alert" aria-hidden=${this.open ? "false" : "true"} @mouseenter=${this.pauseAutoHide} @mouseleave=${this.resumeAutoHide}><div part="icon" class="alert__icon"><slot name="icon"></slot></div><div part="message" class="alert__message" aria-live="polite"><slot></slot></div>${this.closable ? h`<cx-icon-button part="close-button" exportparts="base:close-button__base" class="alert__close-button" name="close" label=${this.localize.term("close")} @click=${this.handleCloseClick}></cx-icon-button>` : ""}<div role="timer" class="alert__timer">${this.remainingTime}</div>${this.countdown ? h`<div class=${v({
128
127
  alert__countdown: !0,
129
128
  "alert__countdown--ltr": this.countdown === "ltr"
130
129
  })}><div class="alert__countdown-elapsed"></div></div>` : ""}</div>`;