@orangelogic/design-system 2.94.0 → 2.95.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 (30) hide show
  1. package/library/chunks/{cropper.C3G5CGTF.js → cropper.uKGcvnPk.js} +2 -2
  2. package/library/chunks/{file-on-demand.Vj4PI0tu.js → file-on-demand.KQlA1JFF.js} +192 -189
  3. package/library/chunks/{image.C3LupRuN.js → image.C-Covc0H.js} +320 -299
  4. package/library/chunks/{image.ocYnNdYK.js → image.Dtdklw5q.js} +1 -1
  5. package/library/chunks/{index.B7slZiaV.js → index.BgXEXk4m.js} +3 -3
  6. package/library/chunks/{list-editor.CZzuw4XU.js → list-editor.BnHKqD0O.js} +1 -1
  7. package/library/chunks/number.CCF6IxpN.js +105 -0
  8. package/library/chunks/{time.wo2iH5iw.js → time.BNrE47-8.js} +1 -1
  9. package/library/components/asset-link-format.js +3 -3
  10. package/library/components/atoms.js +1 -1
  11. package/library/components/cropper.js +1 -1
  12. package/library/components/file-on-demand.js +2 -2
  13. package/library/components/format-time.js +1 -1
  14. package/library/components/image.js +1 -1
  15. package/library/components/list-editor.js +1 -1
  16. package/library/components/masonry.js +1 -1
  17. package/library/components/molecules.js +2 -2
  18. package/library/components/organisms.js +1 -1
  19. package/library/components/types.js +19 -15
  20. package/library/components/video.js +1 -1
  21. package/library/package.json +1 -1
  22. package/library/packages/base/src/resizable-element.d.ts +9 -1
  23. package/library/packages/molecules/src/mentions/mentions.d.ts +1 -0
  24. package/library/packages/organisms/src/file-on-demand/file-on-demand.constants.d.ts +1 -0
  25. package/library/packages/types/src/resizable-element.d.ts +5 -0
  26. package/library/packages/utils/src/number/number.d.ts +4 -1
  27. package/library/react-web-component.d.ts +8 -0
  28. package/library/utils.js +4 -4
  29. package/package.json +1 -1
  30. package/library/chunks/number.DE78rV_g.js +0 -104
@@ -1,4 +1,4 @@
1
- import { r as g } from "./number.DE78rV_g.js";
1
+ import { r as g } from "./number.CCF6IxpN.js";
2
2
  function m(n, t, e, i) {
3
3
  const o = n / t, r = e / i;
4
4
  let c = n, a = t;
@@ -19,13 +19,13 @@ import "./slot.j5oheLJC.js";
19
19
  import "./tabbable.CcMz3mIL.js";
20
20
  import "./user-agent.D9aPuOyL.js";
21
21
  import "./watch.BCJD77bD.js";
22
- import "./image.ocYnNdYK.js";
23
- import "./number.DE78rV_g.js";
22
+ import "./image.Dtdklw5q.js";
23
+ import "./number.CCF6IxpN.js";
24
24
  import "./parse.Cu5nBDTb.js";
25
25
  import "./responsive.D9TUCX5p.js";
26
26
  import "./string.DfV21HEI.js";
27
27
  import "./template.ClovJacp.js";
28
- import "./time.wo2iH5iw.js";
28
+ import "./time.BNrE47-8.js";
29
29
  var m = /* @__PURE__ */ ((t) => (t.DoNothing = "do-nothing", t.DownloadAsset = "download-asset", t.ExpandAssetInFullScreen = "expand-asset-in-full-screen", t.OpenAssetOverview = "open-asset-overview", t.OpenLink = "open-link", t.OpenPage = "open-page", t.OpenSpace = "open-space", t.ShareAsset = "share-asset", t.ShowAssetInLibrary = "show-asset-in-library", t))(m || {}), L = /* @__PURE__ */ ((t) => (t.Bento = "bento", t.Carousel = "carousel", t.Grid = "grid", t.Ribbon = "ribbon", t))(L || {}), x = /* @__PURE__ */ ((t) => (t.Expand = "expand", t.Split = "split", t))(x || {}), A = /* @__PURE__ */ ((t) => (t.Api = "api", t.Manual = "manual", t))(A || {}), b = /* @__PURE__ */ ((t) => (t.Automatic = "automatic", t.Custom = "custom", t))(b || {}), d = /* @__PURE__ */ ((t) => (t.DoNothing = "do-nothing", t.OpenAssetInLibrary = "open-asset-in-library", t.OpenAssetOverview = "open-asset-overview", t.Zoom = "zoom", t))(d || {});
30
30
  function ct(t) {
31
31
  if (!this.ownerDocument.defaultView?.Matrix3 || !t)
@@ -29,7 +29,7 @@ import { c as b } from "./repeat.DbF2p5ae.js";
29
29
  import { n as N } from "./when.Dr1es41R.js";
30
30
  import { t as ee } from "./toString.CL_lYXbK.js";
31
31
  import { C as ae } from "./icon-button.MqA-pNw8.js";
32
- import { C as te } from "./image.C3LupRuN.js";
32
+ import { C as te } from "./image.C-Covc0H.js";
33
33
  import { a as ie, D as $ } from "./asset.Duzr3O3z.js";
34
34
  import { a as ne } from "./index.Cpamj0jB.js";
35
35
  import { A as v, t as se } from "./toast.Bc4wpYJ1.js";
@@ -0,0 +1,105 @@
1
+ function h({
2
+ base: t = 1024,
3
+ decimals: n = 2,
4
+ inputUnit: e = "B",
5
+ targetUnit: r = "B",
6
+ value: s
7
+ }) {
8
+ const i = {
9
+ B: 1,
10
+ GB: t ** 3,
11
+ KB: t,
12
+ MB: t ** 2,
13
+ TB: t ** 4
14
+ }, o = {
15
+ Gb: t ** 3 / 8,
16
+ Kb: t / 8,
17
+ Mb: t ** 2 / 8,
18
+ Tb: t ** 4 / 8,
19
+ b: 1 / 8
20
+ }, a = { ...i, ...o }, d = a[r], f = s * a[e], c = parseFloat((f / d).toFixed(n));
21
+ return Number.isNaN(c) ? 0 : c;
22
+ }
23
+ function l(t) {
24
+ return t > 360 ? 360 : t < -360 ? -360 : t;
25
+ }
26
+ function u(t, n) {
27
+ return n === 0 ? t : u(n, t % n);
28
+ }
29
+ function m(t, n) {
30
+ if (!t || !n)
31
+ return "-- / --";
32
+ const e = u(t, n);
33
+ return `${t / e} / ${n / e}`;
34
+ }
35
+ function g(t, n) {
36
+ const e = Math.round(t), r = Math.round(n), s = u(e, r);
37
+ return {
38
+ height: r / s,
39
+ width: e / s
40
+ };
41
+ }
42
+ function N(t, n, e) {
43
+ const r = e * Math.PI / 180;
44
+ if (e % 90 === 0)
45
+ return {
46
+ height: e % 180 === 0 ? n : t,
47
+ width: e % 180 === 0 ? t : n
48
+ };
49
+ const s = Math.abs(Math.cos(r)), i = Math.abs(Math.sin(r)), o = t * s + n * i, a = t * i + n * s;
50
+ return {
51
+ height: Math.round(a),
52
+ width: Math.round(o)
53
+ };
54
+ }
55
+ function p(t) {
56
+ if (!t || typeof t != "string")
57
+ return 0;
58
+ const n = t.trim();
59
+ if (!n)
60
+ return 0;
61
+ if (n.endsWith("s") && !n.endsWith("ms")) {
62
+ const e = parseFloat(n);
63
+ return isNaN(e) || e < 0 ? 0 : e * 1e3;
64
+ }
65
+ if (n.endsWith("m")) {
66
+ const e = parseFloat(n);
67
+ return isNaN(e) || e < 0 ? 0 : e * 60 * 1e3;
68
+ }
69
+ if (n.endsWith("h")) {
70
+ const e = parseFloat(n);
71
+ return isNaN(e) || e < 0 ? 0 : e * 60 * 60 * 1e3;
72
+ }
73
+ if (n.endsWith("ms")) {
74
+ const e = parseFloat(n);
75
+ return isNaN(e) || e < 0 ? 0 : e;
76
+ }
77
+ return 0;
78
+ }
79
+ function v(t) {
80
+ const n = /^(-?\d*\.?\d+)([a-zA-Z%]*)$/.exec(t.trim());
81
+ if (!n)
82
+ return null;
83
+ const e = Number.parseFloat(n[1]);
84
+ return { unit: n[2] || "", value: e };
85
+ }
86
+ function M(t) {
87
+ if (!Number.isFinite(t))
88
+ return "0";
89
+ const [n, e] = String(t).split("."), r = n.startsWith("-"), i = (r ? n.slice(1) : n).replace(
90
+ /\B(?=(\d{3})+(?!\d))/g,
91
+ ","
92
+ ), o = r ? "-" : "";
93
+ return e !== void 0 ? `${o}${i}.${e}` : `${o}${i}`;
94
+ }
95
+ export {
96
+ h as a,
97
+ p as b,
98
+ g as c,
99
+ m as d,
100
+ v as e,
101
+ M as f,
102
+ u as g,
103
+ N as r,
104
+ l as s
105
+ };
@@ -1,4 +1,4 @@
1
- import { f as d } from "./number.DE78rV_g.js";
1
+ import { f as d } from "./number.CCF6IxpN.js";
2
2
  var g = /* @__PURE__ */ ((r) => (r.Millisecond = "ms", r.Second = "s", r))(g || {}), a = /* @__PURE__ */ ((r) => (r.Day = "d", r.DayHour = "d-h", r.DayHourMinute = "d-h-m", r.DayHourMinuteSecond = "d-h-m-s", r.Hour = "h", r.HourMinute = "h-m", r.HourMinuteSecond = "h-m-s", r.Minute = "m", r.MinuteSecond = "m-s", r.Second = "s", r))(a || {}), u = /* @__PURE__ */ ((r) => (r.Digital = "digital", r.Long = "long", r.Narrow = "narrow", r.Short = "short", r))(u || {}), h = /* @__PURE__ */ ((r) => (r.English = "en", r))(h || {});
3
3
  const f = [
4
4
  {
@@ -1,4 +1,4 @@
1
- import "../chunks/cropper.C3G5CGTF.js";
1
+ import "../chunks/cropper.uKGcvnPk.js";
2
2
  import { C as q } from "../chunks/button.BZjbVq8t.js";
3
3
  import H from "./space.js";
4
4
  import { C as W } from "../chunks/typography.DJC_UXgs.js";
@@ -9,7 +9,7 @@ import { T as c, U as o } from "../chunks/asset-link-format.BSRDqHg7.js";
9
9
  import { c as N } from "../chunks/custom-element.L4WJXn1j.js";
10
10
  import { L as O } from "../chunks/i18n.W6czbRms.js";
11
11
  import { w as k } from "../chunks/watch.BCJD77bD.js";
12
- import { s as it, c as st } from "../chunks/number.DE78rV_g.js";
12
+ import { s as it, c as st } from "../chunks/number.CCF6IxpN.js";
13
13
  import { i as U, x as b, E as lt } from "../chunks/lit-element.jLBm65_O.js";
14
14
  import { r as z } from "../chunks/state.CSDxrqLd.js";
15
15
  import { n as G } from "../chunks/when.Dr1es41R.js";
@@ -20,7 +20,7 @@ import { C as K } from "../chunks/icon-button.MqA-pNw8.js";
20
20
  import tt from "./input.js";
21
21
  import { C as X } from "../chunks/option.Cx54zrJq.js";
22
22
  import Y from "./select.js";
23
- import { c as ct } from "../chunks/image.ocYnNdYK.js";
23
+ import { c as ct } from "../chunks/image.Dtdklw5q.js";
24
24
  import { e as T } from "../chunks/query.BBf1UFkC.js";
25
25
  import { c as Q } from "../chunks/repeat.DbF2p5ae.js";
26
26
  import { o as M } from "../chunks/style-map.llVFPd__.js";
@@ -34,7 +34,7 @@ import { C as ge } from "../chunks/hub-connection.Ot2odiCz.js";
34
34
  import { default as be } from "./icon.js";
35
35
  import { C as Te } from "../chunks/icon-button.MqA-pNw8.js";
36
36
  import { C as Ae } from "../chunks/iframe.PcSPtm_O.js";
37
- import { C as De } from "../chunks/image.C3LupRuN.js";
37
+ import { C as De } from "../chunks/image.C-Covc0H.js";
38
38
  import { default as Pe } from "./image-comparer.js";
39
39
  import { default as Ge } from "./include.js";
40
40
  import { default as he } from "./input.js";
@@ -6,7 +6,7 @@ import "../chunks/lit-element.jLBm65_O.js";
6
6
  import "../chunks/state.CSDxrqLd.js";
7
7
  import "../chunks/query.BBf1UFkC.js";
8
8
  import "../chunks/when.Dr1es41R.js";
9
- import { C as l } from "../chunks/cropper.C3G5CGTF.js";
9
+ import { C as l } from "../chunks/cropper.uKGcvnPk.js";
10
10
  export {
11
11
  l as default
12
12
  };
@@ -1,4 +1,4 @@
1
- import { C as K } from "../chunks/file-on-demand.Vj4PI0tu.js";
1
+ import { C as K } from "../chunks/file-on-demand.KQlA1JFF.js";
2
2
  import "./avatar.js";
3
3
  import "../chunks/button.BZjbVq8t.js";
4
4
  import "../chunks/dialog.DRW8iwh-.js";
@@ -24,7 +24,7 @@ import "../chunks/custom-element.L4WJXn1j.js";
24
24
  import "../chunks/debounce.DaHuiSGU.js";
25
25
  import "../chunks/i18n.W6czbRms.js";
26
26
  import "../chunks/watch.BCJD77bD.js";
27
- import "../chunks/number.DE78rV_g.js";
27
+ import "../chunks/number.CCF6IxpN.js";
28
28
  import "../chunks/string.DfV21HEI.js";
29
29
  import "../chunks/url.Cj9cIQXJ.js";
30
30
  import "../chunks/lit-element.jLBm65_O.js";
@@ -1,6 +1,6 @@
1
1
  import { n as l, C as h } from "../chunks/lib-cortex-element.CVMmyPMC.js";
2
2
  import { c as y } from "../chunks/component.styles.CRO4Odto.js";
3
- import { U as r, D as u, L as D, F as d, g as S, f as F, c as U, a as g, S as _ } from "../chunks/time.wo2iH5iw.js";
3
+ import { U as r, D as u, L as D, F as d, g as S, f as F, c as U, a as g, S as _ } from "../chunks/time.BNrE47-8.js";
4
4
  import { c as b } from "../chunks/custom-element.L4WJXn1j.js";
5
5
  import { L as N } from "../chunks/i18n.W6czbRms.js";
6
6
  import { w as m } from "../chunks/watch.BCJD77bD.js";
@@ -1,4 +1,4 @@
1
- import { C as n } from "../chunks/image.C3LupRuN.js";
1
+ import { C as n } from "../chunks/image.C-Covc0H.js";
2
2
  import "../chunks/component.styles.CRO4Odto.js";
3
3
  import "../chunks/index.Cpamj0jB.js";
4
4
  import "../chunks/custom-element.L4WJXn1j.js";
@@ -18,7 +18,7 @@ import "../chunks/custom-element.L4WJXn1j.js";
18
18
  import "../chunks/debounce.DaHuiSGU.js";
19
19
  import "../chunks/i18n.W6czbRms.js";
20
20
  import "../chunks/watch.BCJD77bD.js";
21
- import { c as E, C as F } from "../chunks/list-editor.CZzuw4XU.js";
21
+ import { c as E, C as F } from "../chunks/list-editor.BnHKqD0O.js";
22
22
  import "../chunks/lit-element.jLBm65_O.js";
23
23
  import "../chunks/state.CSDxrqLd.js";
24
24
  import "../chunks/query.BBf1UFkC.js";
@@ -1,7 +1,7 @@
1
1
  import _ from "./grid.js";
2
2
  import f from "./grid-item.js";
3
3
  import { C as v } from "../chunks/icon-button.MqA-pNw8.js";
4
- import { C as S } from "../chunks/image.C3LupRuN.js";
4
+ import { C as S } from "../chunks/image.C-Covc0H.js";
5
5
  import $ from "./space.js";
6
6
  import C from "./tooltip.js";
7
7
  import { n, C as w } from "../chunks/lib-cortex-element.CVMmyPMC.js";
@@ -3,10 +3,10 @@ import { default as a } from "./border-input-group.js";
3
3
  import { C as p } from "../chunks/color-swatch.CbL_TpRZ.js";
4
4
  import { C } from "../chunks/confirm-popover.bBo9aPlX.js";
5
5
  import { default as u } from "./corner-position-input-group.js";
6
- import { C as m } from "../chunks/cropper.C3G5CGTF.js";
6
+ import { C as m } from "../chunks/cropper.uKGcvnPk.js";
7
7
  import { default as i } from "./dynamic-select.js";
8
8
  import { C as c } from "../chunks/folder-select.DxBOSyvo.js";
9
- import { C as P } from "../chunks/list-editor.CZzuw4XU.js";
9
+ import { C as P } from "../chunks/list-editor.BnHKqD0O.js";
10
10
  import { default as I } from "./masonry.js";
11
11
  import { default as y } from "./padding-input-group.js";
12
12
  import { default as w } from "./position-picker.js";
@@ -1,6 +1,6 @@
1
1
  import { default as a } from "./asset-link-format.js";
2
2
  import { C as t } from "../chunks/color-swatch-group.Q8ybVS0A.js";
3
- import { C } from "../chunks/file-on-demand.Vj4PI0tu.js";
3
+ import { C } from "../chunks/file-on-demand.KQlA1JFF.js";
4
4
  export {
5
5
  a as CxAssetLinkFormat,
6
6
  t as CxColorSwatchGroup,
@@ -35,7 +35,7 @@ import { C as GUt } from "../chunks/hub-connection.Ot2odiCz.js";
35
35
  import go from "./icon.js";
36
36
  import { C as Bo } from "../chunks/icon-button.MqA-pNw8.js";
37
37
  import { C as kK, a as _K } from "../chunks/iframe.PcSPtm_O.js";
38
- import { H as Si, C as pR, a as CK, b as _n, c as SK, d as Yo, e as Pa, f as eo } from "../chunks/image.C3LupRuN.js";
38
+ import { H as Si, C as pR, a as CK, b as _n, c as SK, d as Yo, e as Pa, f as eo } from "../chunks/image.C-Covc0H.js";
39
39
  import { default as YUt } from "./image-comparer.js";
40
40
  import { default as JUt } from "./include.js";
41
41
  import Zo from "./input.js";
@@ -105,27 +105,27 @@ import { r as Xqt } from "../chunks/i18n.W6czbRms.js";
105
105
  import { o as to } from "../chunks/map.D8heArFD.js";
106
106
  import { c as mh, b as eY } from "../chunks/capitalize.CNStXZBq.js";
107
107
  import { o as sr } from "../chunks/style-map.llVFPd__.js";
108
- import { r as wT, w as tY, i as kR, C as _R, a as vn, G as xi, S as Sr, b as ln, c as Zd, O as $u, d as nY, t as s9, o as rY, g as Uw, P as N_, f as N7, e as iY, h as oY } from "../chunks/index.B7slZiaV.js";
109
- import { D as Zqt, H as Qqt, K as eVt, m as tVt, u as nVt, x as rVt, p as iVt, j as oVt, k as aVt, l as sVt, z as cVt, A as lVt, y as dVt, v as uVt, s as pVt, q as hVt, n as gVt } from "../chunks/index.B7slZiaV.js";
108
+ import { r as wT, w as tY, i as kR, C as _R, a as vn, G as xi, S as Sr, b as ln, c as Zd, O as $u, d as nY, t as s9, o as rY, g as Uw, P as N_, f as N7, e as iY, h as oY } from "../chunks/index.BgXEXk4m.js";
109
+ import { D as Zqt, H as Qqt, K as eVt, m as tVt, u as nVt, x as rVt, p as iVt, j as oVt, k as aVt, l as sVt, z as cVt, A as lVt, y as dVt, v as uVt, s as pVt, q as hVt, n as gVt } from "../chunks/index.BgXEXk4m.js";
110
110
  import { a as lb, d as aY, e as sY, f as cY, F as L7, D as L_ } from "../chunks/asset.Duzr3O3z.js";
111
111
  import { H as CR } from "../chunks/slot.j5oheLJC.js";
112
112
  import { a as fVt, g as vVt } from "../chunks/slot.j5oheLJC.js";
113
113
  import { c as R7, G as fh, d as Yd, s as B7, T as SR, h as fn, i as TR, j as lY, t as F7, u as dY, f as w1, k as uY, F as Cf, M as qv } from "../chunks/string.DfV21HEI.js";
114
114
  import { b as bVt, a as wVt, e as xVt, g as kVt, p as _Vt, q as CVt, r as SVt, n as TVt, l as EVt, m as AVt, o as OVt } from "../chunks/string.DfV21HEI.js";
115
- import { a as c9, u as op, I as ER, C as pY } from "../chunks/list-editor.CZzuw4XU.js";
115
+ import { a as c9, u as op, I as ER, C as pY } from "../chunks/list-editor.BnHKqD0O.js";
116
116
  import hY from "./bicolor-picker.js";
117
117
  import AR from "./border-input-group.js";
118
118
  import { C as DVt } from "../chunks/color-swatch.CbL_TpRZ.js";
119
119
  import { C as l9, a as gY } from "../chunks/confirm-popover.bBo9aPlX.js";
120
120
  import mY from "./corner-position-input-group.js";
121
- import { r as J2, R as db, a as fY, b as qe, j as _e, w as vY, c as yY } from "../chunks/cropper.C3G5CGTF.js";
122
- import { C as PVt } from "../chunks/cropper.C3G5CGTF.js";
121
+ import { r as J2, R as db, a as fY, b as qe, j as _e, w as vY, c as yY } from "../chunks/cropper.uKGcvnPk.js";
122
+ import { C as PVt } from "../chunks/cropper.uKGcvnPk.js";
123
123
  import { h as lr, D as OR, c as z7, C as Sh, T as d9, d as bY, M as wY, e as IR } from "../chunks/asset.types.6DCzTOQm.js";
124
124
  import { o as rr } from "../chunks/if-defined.BRoBj_Rp.js";
125
125
  import { c as Hn } from "../chunks/repeat.DbF2p5ae.js";
126
126
  import u9 from "./dynamic-select.js";
127
- import { D as DR, M as xY, U as kY, F as _Y } from "../chunks/time.wo2iH5iw.js";
128
- import { c as LVt, a as RVt, f as BVt, g as FVt } from "../chunks/time.wo2iH5iw.js";
127
+ import { D as DR, M as xY, U as kY, F as _Y } from "../chunks/time.BNrE47-8.js";
128
+ import { c as LVt, a as RVt, f as BVt, g as FVt } from "../chunks/time.BNrE47-8.js";
129
129
  import { F as Qd, C as p9, a as R_ } from "../chunks/folder-select.DxBOSyvo.js";
130
130
  import { a as Lo, E as zn, b as Xm, O as jd, T as Zu, G as $7 } from "../chunks/index.Cpamj0jB.js";
131
131
  import { C as $Vt } from "../chunks/index.Cpamj0jB.js";
@@ -134,8 +134,8 @@ import { i as h9, T as F_, t as EY } from "../chunks/transform.BuqENXeT.js";
134
134
  import { d as MR } from "../chunks/timer.B39XOBYL.js";
135
135
  import { a as g9, c as ay } from "../chunks/_commonjsHelpers.DQNKXVTB.js";
136
136
  import { t as AY, d as PR } from "../chunks/debounce.C_J-9zJi.js";
137
- import { b as nv, d as V7, a as Z2, s as OY, o as IY, c as NR, i as iu, e as DY } from "../chunks/file-on-demand.Vj4PI0tu.js";
138
- import { C as HVt } from "../chunks/file-on-demand.Vj4PI0tu.js";
137
+ import { b as nv, d as V7, a as Z2, s as OY, o as IY, c as NR, i as iu, e as DY } from "../chunks/file-on-demand.KQlA1JFF.js";
138
+ import { C as HVt } from "../chunks/file-on-demand.KQlA1JFF.js";
139
139
  import { o as z_ } from "../chunks/accessors.BHk36ecy.js";
140
140
  import { N as MY, c as PY } from "../chunks/index.CZJTjkLp.js";
141
141
  import { e as NY, t as LY } from "../chunks/directive.oAbCiebi.js";
@@ -163,8 +163,8 @@ import { c as X7 } from "../chunks/animate.El-MpOws.js";
163
163
  import { a as oWt, p as aWt, b as sWt, s as cWt } from "../chunks/animate.El-MpOws.js";
164
164
  import { w as WY } from "../chunks/event.mFzZi4sr.js";
165
165
  import { c as gg } from "../chunks/math.DqTA6ya4.js";
166
- import { b as J7, e as GY } from "../chunks/number.DE78rV_g.js";
167
- import { a as dWt, c as uWt, d as pWt, f as hWt, g as gWt, r as mWt, s as fWt } from "../chunks/number.DE78rV_g.js";
166
+ import { b as J7, e as GY } from "../chunks/number.CCF6IxpN.js";
167
+ import { a as dWt, c as uWt, d as pWt, f as hWt, g as gWt, r as mWt, s as fWt } from "../chunks/number.CCF6IxpN.js";
168
168
  import { t as zR } from "../chunks/event-options.CYHYGOd8.js";
169
169
  import { a as Vw } from "../chunks/color-swatch-group.Q8ybVS0A.js";
170
170
  import { C as yWt } from "../chunks/color-swatch-group.Q8ybVS0A.js";
@@ -187,7 +187,7 @@ import { S as GR } from "../chunks/sortable.esm.oSzf6C5Q.js";
187
187
  import { r as KR } from "../chunks/query-async.CTgXGyQ5.js";
188
188
  import { a as FWt, b as zWt, g as $Wt } from "../chunks/modal.U1QltQKe.js";
189
189
  import { g as HWt, a as UWt } from "../chunks/tabbable.CcMz3mIL.js";
190
- import { c as VWt, f as WWt, e as GWt, b as KWt, g as YWt, d as XWt, i as JWt, r as ZWt, a as QWt } from "../chunks/image.ocYnNdYK.js";
190
+ import { c as VWt, f as WWt, e as GWt, b as KWt, g as YWt, d as XWt, i as JWt, r as ZWt, a as QWt } from "../chunks/image.Dtdklw5q.js";
191
191
  import { g as tGt, a as nGt } from "../chunks/template.ClovJacp.js";
192
192
  var sy = /* @__PURE__ */ ((n) => (n.Grid = "grid", n.Shadows = "shadows", n.Textures = "textures", n.Wireframe = "wireframe", n))(sy || {}), Qu = /* @__PURE__ */ ((n) => (n.Animation = "animation", n.Environment = "environment", n.Speed = "speed", n.Variant = "variant", n))(Qu || {});
193
193
  const Q7 = 30, uX = ["0.5", "1", "1.5", "2"], eO = 100, pX = 0.01, hX = 0.01, gX = 200, mX = 10, fX = 0.01, vX = 0.3, YR = "#2A2342";
@@ -15693,11 +15693,15 @@ let Ic = class extends Nn {
15693
15693
  constructor() {
15694
15694
  super(...arguments), this.active = !1, this.anchor = void 0, this.items = [], this.searchTerm = "", this.noItemsMessage = "", this.onSelect = void 0, this.selectedIndex = 0;
15695
15695
  }
15696
+ getMentionLabel(n) {
15697
+ const e = n.name || n.label || "";
15698
+ return new DOMParser().parseFromString(e, "text/html").body.textContent?.trim() ?? "";
15699
+ }
15696
15700
  handleSelect(n) {
15697
15701
  const e = n.detail.item.value, t = this.items.find((r) => r.id === e);
15698
15702
  !t || !this.onSelect || this.onSelect({
15699
15703
  id: e,
15700
- label: t.label,
15704
+ label: this.getMentionLabel(t),
15701
15705
  type: t.type
15702
15706
  });
15703
15707
  }
@@ -15717,7 +15721,7 @@ let Ic = class extends Nn {
15717
15721
  }
15718
15722
  this.onSelect({
15719
15723
  id: n,
15720
- label: e.label,
15724
+ label: this.getMentionLabel(e),
15721
15725
  type: e.type
15722
15726
  });
15723
15727
  }
@@ -1,6 +1,6 @@
1
1
  import { c as ps, a as kn } from "../chunks/_commonjsHelpers.DQNKXVTB.js";
2
2
  import { r as wb } from "../chunks/___vite-browser-external_commonjs-proxy.C2tf3HsQ.js";
3
- import { r as Sb, C as Cb, R as Mb } from "../chunks/image.C3LupRuN.js";
3
+ import { r as Sb, C as Cb, R as Mb } from "../chunks/image.C-Covc0H.js";
4
4
  import Db from "./resize-observer.js";
5
5
  import { c as Pb } from "../chunks/component.styles.CRO4Odto.js";
6
6
  import { b as Lb } from "../chunks/browser.BHOCIF_A.js";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "2.94.0",
4
+ "version": "2.95.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {
@@ -1,4 +1,4 @@
1
- import { HeightMode } from '../../types/src/resizable-element';
1
+ import { HeightMode, ResizeDirection } from '../../types/src/resizable-element';
2
2
  import { default as HighlightableElement } from './highlightable-element';
3
3
 
4
4
  export default class ResizableElement extends HighlightableElement {
@@ -11,6 +11,8 @@ export default class ResizableElement extends HighlightableElement {
11
11
  resizable: boolean;
12
12
  /** The height mode of the image. */
13
13
  heightMode: HeightMode;
14
+ /** Restricts resizing to a single axis. Use {@link ResizeDirection}. */
15
+ resizeDirection: ResizeDirection;
14
16
  /** Whether the image should be resized without a limit */
15
17
  noLimit: boolean;
16
18
  parentContainer: HTMLElement | null;
@@ -26,6 +28,8 @@ export default class ResizableElement extends HighlightableElement {
26
28
  private minHeight;
27
29
  get ratio(): number;
28
30
  get keepRatio(): boolean;
31
+ private get canResizeHorizontal();
32
+ private get canResizeVertical();
29
33
  constructor();
30
34
  handleDocumentMouseDown(event: MouseEvent): void;
31
35
  startResizing(): void;
@@ -35,5 +39,9 @@ export default class ResizableElement extends HighlightableElement {
35
39
  private handleResizeDraggingTopRight;
36
40
  private handleResizeDraggingBottomLeft;
37
41
  private handleResizeDraggingBottomRight;
42
+ private handleResizeDraggingLeft;
43
+ private handleResizeDraggingRight;
44
+ private handleResizeDraggingTop;
45
+ private handleResizeDraggingBottom;
38
46
  renderResizer(): import('lit').TemplateResult<1>;
39
47
  }
@@ -37,6 +37,7 @@ export default class CxMentions extends CortexElement {
37
37
  type?: string;
38
38
  } | undefined, key?: 'Enter') => void) | undefined;
39
39
  selectedIndex: number;
40
+ private getMentionLabel;
40
41
  private handleSelect;
41
42
  private handleUp;
42
43
  private handleDown;
@@ -31,5 +31,6 @@ export declare const GET_CONTENT_FIELDS: {
31
31
  TITLE_WITH_FALLBACK: string;
32
32
  };
33
33
  export declare const CACHE_SIZE_UNIT = "GB";
34
+ export declare const CACHE_SIZE_BASE = 1000;
34
35
  export declare const SYNC_INTERVAL = 60000;
35
36
  export declare const FOLDER_DOC_TYPES: string[];
@@ -2,3 +2,8 @@ export declare enum HeightMode {
2
2
  Auto = "auto",
3
3
  Fixed = "fixed"
4
4
  }
5
+ export declare enum ResizeDirection {
6
+ Both = "both",
7
+ Horizontal = "horizontal",
8
+ Vertical = "vertical"
9
+ }
@@ -6,11 +6,14 @@
6
6
  * @param {number} [decimals=2] - Number of decimal places to round the result to.
7
7
  * @param {'B'|'KB'|'MB'|'GB'|'TB'|'b'|'Kb'|'Mb'|'Gb'|'Tb'} [inputUnit='B'] - Unit of the input value.
8
8
  * @param {'B'|'KB'|'MB'|'GB'|'TB'|'b'|'Kb'|'Mb'|'Gb'|'Tb'} [targetUnit='B'] - Unit to convert the input value into.
9
+ * @param {1024|1000} [base=1024] - Unit base: 1024 for binary units (KiB/MiB/GiB, the default)
10
+ * or 1000 for decimal units (the SI convention used by `<cx-format-bytes>`).
9
11
  * @param {number} value - The numeric value to convert.
10
12
  * @returns {number} The converted value rounded to the specified decimal places.
11
13
  * Returns 0 if the input is invalid or results in NaN.
12
14
  */
13
- export declare function convertDataUnits({ decimals, inputUnit, targetUnit, value, }: {
15
+ export declare function convertDataUnits({ base, decimals, inputUnit, targetUnit, value, }: {
16
+ base?: 1024 | 1000;
14
17
  decimals?: number;
15
18
  inputUnit?: 'B' | 'KB' | 'MB' | 'GB' | 'TB' | 'b' | 'Kb' | 'Mb' | 'Gb' | 'Tb';
16
19
  targetUnit?: 'B' | 'KB' | 'MB' | 'GB' | 'TB' | 'b' | 'Kb' | 'Mb' | 'Gb' | 'Tb';
@@ -2866,6 +2866,10 @@
2866
2866
  * The height mode of the image.
2867
2867
  */
2868
2868
  heightMode?: 'auto' | 'fixed';
2869
+ /**
2870
+ * Restricts resizing to a single axis. Use {@link ResizeDirection}.
2871
+ */
2872
+ resizeDirection?: 'both' | 'horizontal' | 'vertical';
2869
2873
  /**
2870
2874
  * Whether the image should be resized without a limit
2871
2875
  */
@@ -5132,6 +5136,10 @@
5132
5136
  * The height mode of the image.
5133
5137
  */
5134
5138
  heightMode?: 'auto' | 'fixed';
5139
+ /**
5140
+ * Restricts resizing to a single axis. Use {@link ResizeDirection}.
5141
+ */
5142
+ resizeDirection?: 'both' | 'horizontal' | 'vertical';
5135
5143
  /**
5136
5144
  * Whether the image should be resized without a limit
5137
5145
  */
package/library/utils.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as t, D as s, H as o, K as r, P as i, m as l, e as n, f as m, u as p, x as g, g as c, h as d, p as f, d as x, i as u, o as A, j as C, k as T, l as I, z as S, A as E, y as v, r as y, v as R, s as h, q as L, n as D, t as b, w as F } from "./chunks/index.B7slZiaV.js";
1
+ import { C as t, D as s, H as o, K as r, P as i, m as l, e as n, f as m, u as p, x as g, g as c, h as d, p as f, d as x, i as u, o as A, j as C, k as T, l as I, z as S, A as E, y as v, r as y, v as R, s as h, q as L, n as D, t as b, w as F } from "./chunks/index.BgXEXk4m.js";
2
2
  import { n as P, h as B, f as _, g as H, k as M, i as O, e as w, l as k, m as N, j as G, r as U, t as X } from "./chunks/toast.Bc4wpYJ1.js";
3
3
  import { e as K, a as j, f as W, g as q, d as Z, b as J, c as Y, i as Q, p as $, s as aa } from "./chunks/browser.BHOCIF_A.js";
4
4
  import { d as ta, C as sa, e as oa, H as ra, R as ia, c as la, h as na, f as ma, g as pa, l as ga, p as ca, a as da, b as fa } from "./chunks/color.vLD2sNTs.js";
@@ -19,13 +19,13 @@ import { g as oe, a as re } from "./chunks/tabbable.CcMz3mIL.js";
19
19
  import { i as le } from "./chunks/user-agent.D9aPuOyL.js";
20
20
  import { w as me } from "./chunks/watch.BCJD77bD.js";
21
21
  import { c as ge, d as ce, k as de, j as fe, a as xe, g as ue, h as Ae, b as Ce, f as Te, i as Ie, e as Se, l as Ee, s as ve } from "./chunks/dom.DURaLV1d.js";
22
- import { c as Re, f as he, e as Le, b as De, g as be, d as Fe, i as Ve, r as Pe, a as Be } from "./chunks/image.ocYnNdYK.js";
23
- import { a as He, b as Me, c as Oe, e as we, d as ke, f as Ne, g as Ge, r as Ue, s as Xe } from "./chunks/number.DE78rV_g.js";
22
+ import { c as Re, f as he, e as Le, b as De, g as be, d as Fe, i as Ve, r as Pe, a as Be } from "./chunks/image.Dtdklw5q.js";
23
+ import { a as He, b as Me, c as Oe, e as we, d as ke, f as Ne, g as Ge, r as Ue, s as Xe } from "./chunks/number.CCF6IxpN.js";
24
24
  import { s as Ke } from "./chunks/parse.Cu5nBDTb.js";
25
25
  import { g as We, a as qe } from "./chunks/responsive.D9TUCX5p.js";
26
26
  import { b as Je, a as Ye, e as Qe, f as $e, k as at, g as et, i as tt, p as st, q as ot, r as rt, c as it, s as lt, j as nt, n as mt, l as pt, m as gt, o as ct, t as dt, u as ft } from "./chunks/string.DfV21HEI.js";
27
27
  import { g as ut, a as At } from "./chunks/template.ClovJacp.js";
28
- import { c as Tt, a as It, f as St, g as Et } from "./chunks/time.wo2iH5iw.js";
28
+ import { c as Tt, a as It, f as St, g as Et } from "./chunks/time.BNrE47-8.js";
29
29
  import { R as yt, U as Rt, c as ht, b as Lt, a as Dt, i as bt, t as Ft } from "./chunks/url.Cj9cIQXJ.js";
30
30
  export {
31
31
  ta as CMYK_VALIDATION_REGEX,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "2.94.0",
4
+ "version": "2.95.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {
@@ -1,104 +0,0 @@
1
- function f({
2
- decimals: e = 2,
3
- inputUnit: t = "B",
4
- targetUnit: n = "B",
5
- value: r
6
- }) {
7
- const s = {
8
- B: 1,
9
- GB: 1073741824,
10
- KB: 1024,
11
- MB: 1048576,
12
- TB: 1099511627776
13
- }, i = {
14
- Gb: 1024 ** 3 / 8,
15
- Kb: 1024 / 8,
16
- Mb: 1024 ** 2 / 8,
17
- Tb: 1024 ** 4 / 8,
18
- b: 1 / 8
19
- }, o = { ...s, ...i }, a = o[n], d = r * o[t], c = parseFloat((d / a).toFixed(e));
20
- return Number.isNaN(c) ? 0 : c;
21
- }
22
- function h(e) {
23
- return e > 360 ? 360 : e < -360 ? -360 : e;
24
- }
25
- function u(e, t) {
26
- return t === 0 ? e : u(t, e % t);
27
- }
28
- function l(e, t) {
29
- if (!e || !t)
30
- return "-- / --";
31
- const n = u(e, t);
32
- return `${e / n} / ${t / n}`;
33
- }
34
- function m(e, t) {
35
- const n = Math.round(e), r = Math.round(t), s = u(n, r);
36
- return {
37
- height: r / s,
38
- width: n / s
39
- };
40
- }
41
- function g(e, t, n) {
42
- const r = n * Math.PI / 180;
43
- if (n % 90 === 0)
44
- return {
45
- height: n % 180 === 0 ? t : e,
46
- width: n % 180 === 0 ? e : t
47
- };
48
- const s = Math.abs(Math.cos(r)), i = Math.abs(Math.sin(r)), o = e * s + t * i, a = e * i + t * s;
49
- return {
50
- height: Math.round(a),
51
- width: Math.round(o)
52
- };
53
- }
54
- function N(e) {
55
- if (!e || typeof e != "string")
56
- return 0;
57
- const t = e.trim();
58
- if (!t)
59
- return 0;
60
- if (t.endsWith("s") && !t.endsWith("ms")) {
61
- const n = parseFloat(t);
62
- return isNaN(n) || n < 0 ? 0 : n * 1e3;
63
- }
64
- if (t.endsWith("m")) {
65
- const n = parseFloat(t);
66
- return isNaN(n) || n < 0 ? 0 : n * 60 * 1e3;
67
- }
68
- if (t.endsWith("h")) {
69
- const n = parseFloat(t);
70
- return isNaN(n) || n < 0 ? 0 : n * 60 * 60 * 1e3;
71
- }
72
- if (t.endsWith("ms")) {
73
- const n = parseFloat(t);
74
- return isNaN(n) || n < 0 ? 0 : n;
75
- }
76
- return 0;
77
- }
78
- function b(e) {
79
- const t = /^(-?\d*\.?\d+)([a-zA-Z%]*)$/.exec(e.trim());
80
- if (!t)
81
- return null;
82
- const n = Number.parseFloat(t[1]);
83
- return { unit: t[2] || "", value: n };
84
- }
85
- function p(e) {
86
- if (!Number.isFinite(e))
87
- return "0";
88
- const [t, n] = String(e).split("."), r = t.startsWith("-"), i = (r ? t.slice(1) : t).replace(
89
- /\B(?=(\d{3})+(?!\d))/g,
90
- ","
91
- ), o = r ? "-" : "";
92
- return n !== void 0 ? `${o}${i}.${n}` : `${o}${i}`;
93
- }
94
- export {
95
- f as a,
96
- N as b,
97
- m as c,
98
- l as d,
99
- b as e,
100
- p as f,
101
- u as g,
102
- g as r,
103
- h as s
104
- };