@orangelogic/design-system 3.0.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/library/chunks/{asset-link-format.D--xQVgR.js → asset-link-format.BnIUG_vO.js} +19 -18
  2. package/library/chunks/{button.BnkkUqiI.js → button.CpY4FCwE.js} +1 -1
  3. package/library/chunks/{color-swatch-group.CCgwey9f.js → color-swatch-group.CTcv62MK.js} +367 -330
  4. package/library/chunks/{color-swatch.D6Gg5bpz.js → color-swatch.Caved2kL.js} +1 -1
  5. package/library/chunks/{confirm-popover.CrQKEChc.js → confirm-popover.BSS1VhB2.js} +3 -3
  6. package/library/chunks/content-builder.BX4pHujE.js +60 -0
  7. package/library/chunks/{dialog.CWGtufDA.js → dialog.ICoCAj6Z.js} +4 -4
  8. package/library/chunks/{document-viewer.C90j1Xrr.js → document-viewer.D6PxGcEL.js} +8 -7
  9. package/library/chunks/{dot-pagination.BqGFeFXK.js → dot-pagination.CzVpiv00.js} +1 -1
  10. package/library/chunks/{folder-select.CIqVGGFl.js → folder-select.DN-JomDt.js} +4 -4
  11. package/library/chunks/{header.CWlWNree.js → header.BQg_JjHw.js} +1 -1
  12. package/library/chunks/{i18n.DbXTTLXx.js → i18n.BA19xtyU.js} +6 -3
  13. package/library/chunks/{icon-button.CVrxJcZq.js → icon-button.BWJ1Vqn5.js} +17 -11
  14. package/library/chunks/{iframe.-GCTFas1.js → iframe.Dm-nXSBv.js} +1 -1
  15. package/library/chunks/{image.CTMzUqCC.js → image.B-4cVbol.js} +187 -188
  16. package/library/chunks/{input.33UmFGqR.js → input.xgeLCG8I.js} +1 -1
  17. package/library/chunks/{markdown.DOHru2Rz.js → markdown.bkEjjjS9.js} +2 -2
  18. package/library/chunks/menu-item.DgUMVYe5.js +493 -0
  19. package/library/chunks/{option.B6odSlS2.js → option.jeaj7_Lr.js} +1 -1
  20. package/library/chunks/{pagination.mzolTIpF.js → pagination.CSPKsj4y.js} +5 -5
  21. package/library/chunks/{tab-group.uSHlsFu8.js → tab-group.BSl6GdIO.js} +4 -4
  22. package/library/chunks/{toast.CXEAfCvN.js → toast.C5Ir5yKA.js} +1 -1
  23. package/library/chunks/transformation.CWKaoGaY.js +254 -0
  24. package/library/chunks/{tree.CmEdKtzK.js → tree.DYFFjW1-.js} +1 -1
  25. package/library/components/alert.js +2 -2
  26. package/library/components/asset-link-format.js +4 -4
  27. package/library/components/atoms.js +31 -31
  28. package/library/components/audio.js +2 -2
  29. package/library/components/border-input-group.js +2 -2
  30. package/library/components/breadcrumb.js +1 -1
  31. package/library/components/button.js +2 -2
  32. package/library/components/color-picker.js +3 -3
  33. package/library/components/color-swatch-group.js +5 -5
  34. package/library/components/color-swatch.js +2 -2
  35. package/library/components/confirm-popover.js +4 -4
  36. package/library/components/copy-button.js +1 -1
  37. package/library/components/corner-position-input-group.js +3 -3
  38. package/library/components/date-calendar.js +1 -1
  39. package/library/components/details.js +1 -1
  40. package/library/components/dialog.js +3 -3
  41. package/library/components/document-viewer.js +3 -3
  42. package/library/components/dot-pagination.js +2 -2
  43. package/library/components/drawer.js +4 -4
  44. package/library/components/dropdown.js +2 -2
  45. package/library/components/dynamic-select.js +4 -4
  46. package/library/components/e-chart.js +1 -1
  47. package/library/components/element-clamp.js +2 -2
  48. package/library/components/file-on-demand.js +9 -9
  49. package/library/components/folder-select.js +4 -4
  50. package/library/components/format-bytes.js +1 -1
  51. package/library/components/format-date.js +1 -1
  52. package/library/components/format-number.js +1 -1
  53. package/library/components/format-time.js +1 -1
  54. package/library/components/header.js +2 -2
  55. package/library/components/icon-button.js +2 -2
  56. package/library/components/iframe.js +2 -2
  57. package/library/components/image-comparer.js +1 -1
  58. package/library/components/image.js +3 -4
  59. package/library/components/input.js +2 -2
  60. package/library/components/line-clamp.js +1 -1
  61. package/library/components/markdown.js +3 -3
  62. package/library/components/masonry.js +113 -100
  63. package/library/components/menu-item.js +15 -483
  64. package/library/components/menu.js +20 -20
  65. package/library/components/molecules.js +3 -3
  66. package/library/components/option.js +2 -2
  67. package/library/components/organisms.js +2 -2
  68. package/library/components/padding-input-group.js +1 -1
  69. package/library/components/pagination.js +6 -6
  70. package/library/components/popup.js +101 -98
  71. package/library/components/position-picker.js +1 -1
  72. package/library/components/progress-bar.js +1 -1
  73. package/library/components/progress-ring.js +1 -1
  74. package/library/components/range.js +1 -1
  75. package/library/components/rating.js +1 -1
  76. package/library/components/relative-time.js +1 -1
  77. package/library/components/select.js +18 -13
  78. package/library/components/shadow-input-group.js +1 -1
  79. package/library/components/share-option-list.js +1 -1
  80. package/library/components/sidebar.js +1 -1
  81. package/library/components/size-input-group.js +3 -3
  82. package/library/components/spinner.js +1 -1
  83. package/library/components/split-panel.js +1 -1
  84. package/library/components/tab-group.js +5 -5
  85. package/library/components/tab.js +2 -2
  86. package/library/components/tag.js +2 -2
  87. package/library/components/tooltip.js +1 -1
  88. package/library/components/tree-item.js +2 -2
  89. package/library/components/tree.js +2 -2
  90. package/library/components/typeface.js +2 -2
  91. package/library/components/types.js +18617 -18388
  92. package/library/components/video.js +2 -2
  93. package/library/package.json +1 -1
  94. package/library/packages/atoms/src/components/icon-button/icon-button.d.ts +11 -0
  95. package/library/packages/atoms/src/components/image/image.d.ts +30 -4
  96. package/library/packages/atoms/src/components/menu-item/menu-item.d.ts +5 -2
  97. package/library/packages/atoms/src/components/menu-item/submenu-controller.d.ts +1 -0
  98. package/library/packages/atoms/src/components/popup/popup.d.ts +11 -0
  99. package/library/packages/atoms/src/components/select/select.d.ts +8 -0
  100. package/library/packages/hybrid/table-core/src/table/styles/table-frozen.styles.d.ts +4 -4
  101. package/library/packages/hybrid/table-core/src/table/styles/table-overlay-scrollbar.styles.d.ts +8 -5
  102. package/library/packages/hybrid/table-core/src/table/table.d.ts +2 -12
  103. package/library/packages/hybrid/table-core/src/tabulator-tables/core/RowManager.d.ts +1 -0
  104. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/ResizeColumns/ResizeColumns.d.ts +5 -3
  105. package/library/packages/molecules/src/gallery-item/gallery-item.d.ts +10 -0
  106. package/library/packages/molecules/src/icon-picker/icon-picker.d.ts +1 -0
  107. package/library/packages/molecules/src/masonry/masonry.d.ts +9 -0
  108. package/library/packages/molecules/src/view-and-sort/view-and-sort.d.ts +8 -0
  109. package/library/packages/organisms/src/bento-grid/bento-grid.d.ts +88 -0
  110. package/library/packages/organisms/src/comment/components/comment-menu/comment-menu.d.ts +10 -0
  111. package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +11 -1
  112. package/library/packages/organisms/src/content-builder/content-builder.d.ts +31 -6
  113. package/library/packages/organisms/src/downloader/downloader.d.ts +1 -1
  114. package/library/packages/types/src/menu-item.d.ts +12 -1
  115. package/library/packages/utils/src/custom-element/i18n.d.ts +3 -0
  116. package/library/packages/utils/src/transformation/transformation.d.ts +52 -0
  117. package/library/react-web-component.d.ts +25 -1
  118. package/library/utils.js +173 -167
  119. package/package.json +1 -1
  120. package/library/chunks/transformation.8uLv6uwG.js +0 -264
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "3.0.0",
4
+ "version": "3.2.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {
@@ -1,264 +0,0 @@
1
- import { c as R } from "./capitalize.CIBKBL10.js";
2
- import { C as s, T as h, U as M } from "./asset-link-format.ClaYu_v8.js";
3
- import { P as u } from "./position-picker.DjnhxIKF.js";
4
- const E = window.location.origin.includes("localhost:") ? "https://local.orangelogic.com" : window.location.origin;
5
- function K(t, f, r, C = E) {
6
- const c = new URL(C + "/" + t);
7
- return Array.isArray(r) ? r.forEach((o) => {
8
- o[1] && c.searchParams.append(o[0], o[1]);
9
- }) : r && Object.keys(r).forEach((o) => {
10
- r[o] && c.searchParams.append(o, r[o]);
11
- }), fetch(c, f);
12
- }
13
- const H = "space-default";
14
- var L = /* @__PURE__ */ ((t) => (t.Desktop = "desktop", t.Mobile = "mobile", t.Tablet = "tablet", t))(L || {});
15
- const p = {
16
- canvasWidth: "",
17
- height: "",
18
- id: "desktop",
19
- maxWidth: "",
20
- name: R(
21
- "desktop"
22
- /* Desktop */
23
- )
24
- }, w = {
25
- canvasWidth: "770px",
26
- height: "",
27
- id: "tablet",
28
- maxWidth: "1280px",
29
- name: R(
30
- "tablet"
31
- /* Tablet */
32
- )
33
- }, T = {
34
- canvasWidth: "320px",
35
- height: "",
36
- id: "mobile",
37
- maxWidth: "480px",
38
- name: R(
39
- "mobile"
40
- /* Mobile */
41
- )
42
- }, Y = [p, w, T];
43
- var S = /* @__PURE__ */ ((t) => (t.All = "ALL", t.CanDelete = "CanDelete", t.CanDownload = "CanDownload", t.CanFind = "CanFind", t.CanManageRights = "CanManageRights", t.CanMove = "CanMove", t.CanRead = "CanRead", t.CanReadAll = "CanReadAll", t.CanReadAndWrite = "CanReadAndWrite", t.CanReadLarge = "CanReadLarge", t.CanReadMedium = "CanReadMedium", t.CanReadOriginal = "CanReadOriginal", t.CanShare = "CanShare", t.CanUpload = "CanUpload", t.CanWrite = "CanWrite", t.None = "NONE", t))(S || {}), O = /* @__PURE__ */ ((t) => (t.All = "all", t.Audio = "audio", t.Image = "image", t.Other = "other", t.Video = "video", t))(O || {}), N = /* @__PURE__ */ ((t) => (t.Content = "content", t.Template = "template", t))(N || {}), B = /* @__PURE__ */ ((t) => (t.Administrator = "Administrator", t.Designer = "Designer", t.Editor = "Editor", t))(B || {}), x = /* @__PURE__ */ ((t) => (t.Accordion = "BlockAccordion", t.Analytics = "BlockAnalytics", t.Audio = "BlockAudio", t.Button = "BlockButton", t.Carousel = "BlockCarousel", t.ColorSwatches = "BlockColorSwatches", t.Column = "BlockCell", t.ColumnGroup = "BlockColumns", t.DamView = "BlockDamView", t.Divider = "BlockDivider", t.DocumentViewer = "BlockDocumentViewer", t.FontKit = "BlockFontKit", t.Gallery = "BlockGallery", t.Header = "BlockHeader", t.Image = "BlockImage", t.RichText = "BlockRichText", t.SearchBox = "BlockSearchBox", t.TabGroup = "BlockTabs", t.Text = "BlockText", t.Timeline = "BlockTimeline", t.Video = "BlockVideo", t))(x || {});
44
- const z = Object.values(x).filter(
45
- (t) => t !== "BlockCell"
46
- /* Column */
47
- );
48
- var I = /* @__PURE__ */ ((t) => (t.Carousel = "carousel", t.Gallery = "gallery", t))(I || {}), W = /* @__PURE__ */ ((t) => (t.Templates = "TEMPLATES", t.TranslatableAttributes = "TRANSLATABLE_ATTRIBUTES", t.TranslatableTexts = "TRANSLATABLE_TEXTS", t))(W || {});
49
- const A = "/AssetLink/", D = {
50
- [u.BottomCenter]: s.South,
51
- [u.BottomLeft]: s.Southwest,
52
- [u.BottomRight]: s.Southeast,
53
- [u.CenterCenter]: s.Center,
54
- [u.CenterLeft]: s.West,
55
- [u.CenterRight]: s.East,
56
- [u.TopCenter]: s.North,
57
- [u.TopLeft]: s.Northwest,
58
- [u.TopRight]: s.Northeast
59
- };
60
- function U({
61
- asset: t,
62
- baseUrl: f,
63
- extension: r,
64
- options: C,
65
- parameters: c,
66
- transformations: o,
67
- useSession: v = ""
68
- }) {
69
- if (f == null)
70
- return "";
71
- let n = f;
72
- const g = o?.findLast(
73
- (l) => l.key === h.Quality
74
- );
75
- if (g && (o = [
76
- ...o?.filter(
77
- (l) => l.key !== h.Quality
78
- ) || [],
79
- g
80
- ]), o) {
81
- const l = [];
82
- for (let e = 0; e < o.length; e++) {
83
- const i = o[e];
84
- if (i.key === h.Rotate) {
85
- let a = i.value.rotation ?? 0;
86
- for (; o[e + 1]?.key === h.Rotate; )
87
- e++, a += o[e].value.rotation ?? 0;
88
- a !== 0 && l.push({ key: h.Rotate, value: { rotation: a } });
89
- } else
90
- l.push(i);
91
- }
92
- o = l;
93
- }
94
- o && o.length > 0 && (n += "/t/"), o?.forEach(({ key: l, value: e }) => {
95
- if (l === h.Resize) {
96
- if (e.unit === M.AspectRatio && e.ratioWidth && e.ratioHeight) {
97
- n += `re_ar_${e.ratioWidth}:${e.ratioHeight}/`;
98
- return;
99
- }
100
- const i = [
101
- ...[
102
- {
103
- key: "re_w_",
104
- value: Math.round(e.width ?? 0)
105
- },
106
- {
107
- key: "re_h_",
108
- value: Math.round(e.height ?? 0)
109
- }
110
- ].filter((a) => a.value !== void 0).map((a) => ({
111
- key: a.key,
112
- value: Math.round(Number(a.value))
113
- })),
114
- {
115
- key: "re_rm_",
116
- value: "stretch"
117
- }
118
- ];
119
- i.forEach(({ key: a, value: d }, m) => {
120
- n += `${a}${d}${m < i.length - 1 ? "," : ""}`;
121
- }), n += "/";
122
- }
123
- if (l === h.Crop) {
124
- const i = e.unit === M.AspectRatio && !!e.ratioWidth && !!e.ratioHeight, a = !e.disabledSize && !i, d = a && (e.x !== void 0 || e.y !== void 0), m = [
125
- ...[
126
- {
127
- key: "c_",
128
- value: e.mode
129
- },
130
- ...i ? [
131
- {
132
- key: "ar_",
133
- value: `${e.ratioWidth}:${e.ratioHeight}`
134
- }
135
- ] : [],
136
- ...a ? [
137
- {
138
- key: "c_w_",
139
- value: Math.round(e.width ?? 0)
140
- },
141
- {
142
- key: "c_h_",
143
- value: Math.round(e.height ?? 0)
144
- },
145
- {
146
- key: "c_x_",
147
- value: Math.round(e.x ?? 0) === 0 && C?.omitZeroXY ? void 0 : Math.round(e.x ?? 0)
148
- },
149
- {
150
- key: "c_y_",
151
- value: Math.round(e.y ?? 0) === 0 && C?.omitZeroXY ? void 0 : Math.round(e.y ?? 0)
152
- }
153
- ] : [],
154
- ...!d && e.focusMode && e.focusMode !== "manual" ? [
155
- {
156
- key: e.isFocusModeAuto ? "acm_" : "c_g_",
157
- value: e.focusMode
158
- }
159
- ] : [],
160
- ...!d && e.focusMode === "manual" && e.position ? [
161
- {
162
- key: "c_g_",
163
- value: D[e.position]
164
- }
165
- ] : []
166
- ].filter((_) => _.value !== void 0 && _.value !== null).map((_) => ({
167
- key: _.key,
168
- value: _.value
169
- })),
170
- ...i ? [] : [
171
- {
172
- key: "c_whu_",
173
- value: "pixel"
174
- }
175
- ]
176
- ];
177
- m.forEach(({ key: _, value: $ }, y) => {
178
- const b = ["c_w_", "c_h_", "c_x_", "c_y_"].includes(_);
179
- n += `${_}${b ? Math.round(Number($)) : $}${y < m.length - 1 ? "," : ""}`;
180
- }), n += "/";
181
- }
182
- if (l === h.Rotate && ([
183
- {
184
- key: "r_a_",
185
- value: e.rotation
186
- }
187
- ].filter((a) => a.value !== void 0).map((a) => ({
188
- key: a.key,
189
- value: Math.round(Number(a.value))
190
- })).forEach(({ key: a, value: d }) => {
191
- n += `${a}${d}`;
192
- }), n += "/"), l === h.Quality) {
193
- const i = [
194
- {
195
- key: "q_level_",
196
- value: e.quality
197
- }
198
- ].filter((a) => a.value !== void 0).map((a) => ({
199
- key: a.key,
200
- value: Math.round(Number(a.value))
201
- }));
202
- i.forEach(({ key: a, value: d }, m) => {
203
- n += `${a}${d}${m < i.length - 1 ? "," : ""}`;
204
- }), n += "/";
205
- }
206
- if (l === h.Metadata) {
207
- const i = [
208
- {
209
- key: "fl_keep_metadata",
210
- value: e.keepMetadata
211
- }
212
- ].filter((a) => a.value !== void 0).map((a) => ({ key: a.key, value: a.value }));
213
- i.forEach(({ key: a }, d) => {
214
- n += `${a}${d < i.length - 1 ? "," : ""}`;
215
- }), n += "/";
216
- }
217
- }), r && (n += `${t?.identifier ?? crypto.randomUUID()}${r}`);
218
- const k = [];
219
- return c && c.length > 0 && c.forEach(({ key: l, value: e }) => {
220
- k.push(
221
- `${encodeURIComponent(l.trim())}=${encodeURIComponent(e.trim())}`
222
- );
223
- }), f && v && k.push(`UseSession=${encodeURIComponent(v)}`), k.length > 0 && (n += `?${k.join("&")}`), n.endsWith("/") && (n = n.slice(0, -1)), n;
224
- }
225
- function Q(t, f) {
226
- if (!t || !f?.length)
227
- return t;
228
- const r = U({ baseUrl: "", transformations: f }).replace(
229
- /\/t\//g,
230
- ""
231
- );
232
- if (!r)
233
- return t;
234
- const C = t.indexOf(A);
235
- if (C < 0)
236
- return `${t}/t/${r}`;
237
- const c = t.slice(0, C + A.length), o = t.slice(C + A.length), v = o.indexOf("/t/");
238
- if (v >= 0) {
239
- const g = o.slice(0, v);
240
- return `${c}${g}/t/${r}`;
241
- }
242
- const n = o.indexOf("/");
243
- if (n >= 0) {
244
- const g = o.slice(0, n), k = o.slice(n);
245
- return `${c}${g}/t/${r}${k}`;
246
- }
247
- return `${t}/t/${r}`;
248
- }
249
- export {
250
- O as A,
251
- x as B,
252
- L as D,
253
- N as E,
254
- S as P,
255
- H as S,
256
- B as T,
257
- Q as a,
258
- U as b,
259
- I as c,
260
- W as d,
261
- z as e,
262
- K as f,
263
- Y as g
264
- };