@orangelogic/design-system 2.145.0 → 2.146.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.
@@ -4,9 +4,9 @@
4
4
  */
5
5
 
6
6
  --cx-border-radius-small : 4px; /* 4px */
7
- --cx-border-radius-medium : 6px; /* 6px */
8
- --cx-border-radius-large : 8px; /* 8px */
9
- --cx-border-radius-x-large: 12px; /* 16px */
7
+ --cx-border-radius-medium : 8px; /* 8px */
8
+ --cx-border-radius-large : 12px; /* 12px */
9
+ --cx-border-radius-x-large: 16px; /* 16px */
10
10
  --cx-border-radius-circle : 50%;
11
11
  --cx-border-radius-pill : 9999px;
12
12
 
@@ -82,9 +82,9 @@
82
82
  */
83
83
 
84
84
  /* Buttons */
85
- --cx-button-border-radius-large : var(--cx-border-radius-large);
86
- --cx-button-border-radius-medium : var(--cx-border-radius-large);
87
- --cx-button-border-radius-small : var(--cx-border-radius-large);
85
+ --cx-button-border-radius-large : var(--cx-border-radius-medium);
86
+ --cx-button-border-radius-medium : var(--cx-border-radius-medium);
87
+ --cx-button-border-radius-small : var(--cx-border-radius-medium);
88
88
  --cx-button-font-size-large : var(--cx-font-size-medium);
89
89
  --cx-button-font-size-medium : var(--cx-font-size-small);
90
90
  --cx-button-font-size-small : var(--cx-font-size-x-small);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "2.145.0",
4
+ "version": "2.146.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {
@@ -76,6 +76,10 @@ export default class CxIconPicker extends CortexElement {
76
76
  * When true, adds a Font Awesome section alongside the default Cortex icon library.
77
77
  */
78
78
  fontAwesome: boolean;
79
+ /**
80
+ * When true, hides the "Custom" icon option (asset picker) from the select footer and button-mode menu.
81
+ */
82
+ noCustomOption: boolean;
79
83
  /**
80
84
  * When true, renders a cx-bicolor-picker below the icon selector.
81
85
  * @default false
@@ -40,6 +40,8 @@ export type CxAssetLinkFormatCropFocusModeChangeEvent = CustomEvent<{
40
40
  * @event `cx-asset-link-format-crop-changed` - Emitted when crop input changes are complete.
41
41
  * @event `cx-asset-link-format-crop-apply` - Emitted when the crop settings are applied.
42
42
  * @event `cx-asset-link-format-crop-auto` - Emitted when the auto cropping is applied.
43
+ *
44
+ * @property {boolean} no-ratio-modes - When true, hides the ratio mode select (Free, Widescreen, Square, etc.).
43
45
  */
44
46
  export default class CxAssetLinkFormatCrop extends CortexElement {
45
47
  static readonly styles: CSSResultGroup;
@@ -106,6 +108,12 @@ export default class CxAssetLinkFormatCrop extends CortexElement {
106
108
  * Whether the apply button is disabled.
107
109
  */
108
110
  disabledApply: boolean;
111
+ /**
112
+ * Whether to hide the ratio mode select (Free, Widescreen, Square, etc.).
113
+ * Useful when no asset is attached yet, since switching between ratios
114
+ * without known dimensions only produces tiny, meaningless pixel values.
115
+ */
116
+ noRatioModes: boolean;
109
117
  /**
110
118
  * The last applied crop settings for each unit.
111
119
  * This is used to restore the last applied settings when the component is closed.
@@ -74,6 +74,12 @@ export default class CxDamCustomToolbarButtonsEditor extends CortexElement {
74
74
  private apiGetDamViewAvailablePages;
75
75
  /** Tracks whether `subTypesApi` has resolved at least once for the current API. */
76
76
  private subTypesLoaded;
77
+ /**
78
+ * Full button config (backend `QuickAction`) for each available button option, keyed by
79
+ * its `value`. Populated by `availableButtonsApi` and consumed by
80
+ * `handleAvailableButtonSelect` to pre-fill the edit form for an existing button.
81
+ */
82
+ private availableButtonDetailsByValue;
77
83
  private readonly formApi;
78
84
  private readonly spaceApi;
79
85
  private readonly accessLevelApi;
@@ -148,6 +154,12 @@ export default class CxDamCustomToolbarButtonsEditor extends CortexElement {
148
154
  private findDefaultSubTypeFor;
149
155
  private createNewButton;
150
156
  private updateEditedItem;
157
+ /**
158
+ * True when another button (not the one currently being added/edited) already
159
+ * holds DamToolbarButtonType.Primary. Used to force/disable the "Primary" choice
160
+ * in the dialog so only one button can ever be Primary.
161
+ */
162
+ private hasOtherPrimaryButton;
151
163
  /**
152
164
  * Enforces the "single primary" constraint: at most one button may have
153
165
  * type === DamToolbarButtonType.Primary. When the button identified by
@@ -1,4 +1,5 @@
1
1
  import { EditorMode, Permission } from '../../../../types/src/content-builder';
2
+ import { DamCustomToolbarButton, DamViewAvailableButtonDetail } from '../../../../types/src/dam-view';
2
3
  import { AddTemplateRequest, AddTemplateResponse, GetAdhocPropertiesResponse, GetBlockTemplatesResponse, GetBlockTypesResponse, GetDamViewAssetStatusesResponse, GetDamViewAssetTypesResponse, GetDamViewAvailableButtonsResponse, GetDamViewAvailableFormsResponse, GetDamViewAvailableLevelsOfAccessResponse, GetDamViewAvailablePagesResponse, GetDamViewAvailablePanelsResponse, GetDamViewAvailableSpacesResponse, GetDamViewAvailableTemplatesResponse, GetDamViewDisplayModeOptionsResponse, GetPagesForBlockTemplateResponse, GetTemplatesResponse, UpdateTemplateRequest, UpdateTemplateResponse } from './cms5.types';
3
4
 
4
5
  export declare function apiAddTemplate({ blockType, description, name, settings, }: AddTemplateRequest): Promise<AddTemplateResponse | null>;
@@ -31,6 +32,12 @@ export declare function apiGetDamViewAvailableForms(params?: {
31
32
  export declare function apiGetDamViewAvailableButtons(params?: {
32
33
  teamspaceModule?: string;
33
34
  }): Promise<GetDamViewAvailableButtonsResponse>;
35
+ /**
36
+ * Maps the `detail` (backend `QuickAction`) of a `getavailablebuttons_42JU_v1` option
37
+ * onto the custom-toolbar-button editor's field shape, so selecting an existing button
38
+ * pre-fills its real action/config instead of the "new button" defaults.
39
+ */
40
+ export declare function mapDamViewAvailableButtonDetail(detail: DamViewAvailableButtonDetail | null): Partial<DamCustomToolbarButton>;
34
41
  export declare function apiGetDamViewAssetStatuses(): Promise<GetDamViewAssetStatusesResponse>;
35
42
  export declare function apiGetDamViewAssetTypes(): Promise<GetDamViewAssetTypesResponse>;
36
43
  export declare function apiGetDamViewAvailablePanels(params?: {
@@ -47,3 +47,26 @@ export type DamCustomToolbarButton = {
47
47
  type: DamToolbarButtonType;
48
48
  workflowId?: string;
49
49
  };
50
+ /**
51
+ * Full button configuration returned alongside each `getavailablebuttons_42JU_v1`
52
+ * option, used to pre-fill the edit form when the user selects an existing button.
53
+ * Enum-shaped fields (`actionOnClick`, `buttonAppearanceType`, `customButtonType`)
54
+ * carry the backend's PascalCase enum member names verbatim (e.g. `'OpenForm'`).
55
+ */
56
+ export type DamViewAvailableButtonDetail = {
57
+ actionOnClick: string;
58
+ buttonActionID: string;
59
+ buttonAppearanceType: string;
60
+ completionMessage: string;
61
+ customButtonType: string;
62
+ formToOpen: string;
63
+ icon: string;
64
+ levelOfAccess: string;
65
+ link: string;
66
+ openInNewTab: boolean;
67
+ pageID: string;
68
+ spaceID: string;
69
+ subType: string;
70
+ tooltip: string;
71
+ type: string;
72
+ };
@@ -6561,6 +6561,10 @@
6561
6561
  * When true, adds a Font Awesome section alongside the default Cortex icon library.
6562
6562
  */
6563
6563
  fontAwesome?: boolean;
6564
+ /**
6565
+ * When true, hides the "Custom" icon option (asset picker) from the select footer and button-mode menu.
6566
+ */
6567
+ noCustomOption?: boolean;
6564
6568
  /**
6565
6569
  * When true, renders a cx-bicolor-picker below the icon selector. <br/>@default false
6566
6570
  */
package/library/utils.js CHANGED
@@ -26,13 +26,13 @@ import { C as Sr } from "./chunks/calendar-grid.CvdcwfTo.js";
26
26
  import { b as Ar, e as Ir, f as Lr, g as vr, a as br, i as Rr, d as Vr, c as Fr, n as kr, p as Or, t as Yr } from "./chunks/date.dSYNLBVO.js";
27
27
  import { e as c, a as u, D as m } from "./chunks/date-picker.DTUICGb9.js";
28
28
  import { f as Ur } from "./chunks/content-builder.DZRw6hpX.js";
29
- import { c as _r, f as Hr, e as Xr, b as Wr, g as Br, d as $r, i as Gr, r as zr, a as qr } from "./chunks/image.BzmclWBR.js";
29
+ import { c as _r, f as Hr, e as Xr, b as Wr, g as Br, d as $r, i as Gr, r as zr, a as qr } from "./chunks/image.QVlPFadX.js";
30
30
  import { b as Zr, e as jr } from "./chunks/waveform.1U9U_0rd.js";
31
- import { a as Kr, b as ta, c as ea, e as ra, d as aa, f as sa, g as oa, r as na, s as ia } from "./chunks/number.B4PQLJIg.js";
31
+ import { a as Kr, b as ta, c as ea, e as ra, d as aa, f as sa, g as oa, r as na, s as ia } from "./chunks/number.CtCaI0T_.js";
32
32
  import { s as ca } from "./chunks/parse.Cu5nBDTb.js";
33
33
  import { b as ma, d as fa, e as ha, f as ga, m as da, g as pa, h as Da, l as Ta, p as wa, w as Ca, v as xa, a as Ma, c as ya, s as Sa, r as Ea, o as Aa, t as Ia, n as La, q as va, i as ba, u as Ra } from "./chunks/string.BmBJ_BLT.js";
34
34
  import { g as Fa, a as ka } from "./chunks/template.ClovJacp.js";
35
- import { c as Ya, f as Na, a as Ua, g as Pa } from "./chunks/time.BSmpFe2G.js";
35
+ import { c as Ya, f as Na, a as Ua, g as Pa } from "./chunks/time.DWfbnPnM.js";
36
36
  import { b as Ha } from "./chunks/transformation.c-RS37zA.js";
37
37
  function n(t) {
38
38
  const e = t.getFullYear(), r = String(t.getMonth() + 1).padStart(2, "0"), s = String(t.getDate()).padStart(2, "0");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "2.145.0",
4
+ "version": "2.146.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {