@orangelogic/design-system 3.73.0 → 3.75.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "3.73.0",
4
+ "version": "3.75.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {
@@ -3,7 +3,8 @@ export type CxContentBuilderTranslatableValueChangeEvent = CustomEvent<{
3
3
  values: Array<{
4
4
  attribute: string;
5
5
  type: 'attribute';
6
- value: string;
6
+ /** Text controls send a string; `switch` controls send their boolean (or configured checked/unchecked) value. */
7
+ value: string | boolean;
7
8
  }>;
8
9
  }>;
9
10
  declare global {
@@ -9,6 +9,7 @@ import { default as CxMenuItem } from '../../../../atoms/src/components/menu-ite
9
9
  import { default as CxPopup } from '../../../../atoms/src/components/popup/popup.ts';
10
10
  import { default as CxProgressBar } from '../../../../atoms/src/components/progress-bar/progress-bar.ts';
11
11
  import { default as CxResizeObserver } from '../../../../atoms/src/components/resize-observer/resize-observer.ts';
12
+ import { default as CxSpace } from '../../../../atoms/src/components/space/space.ts';
12
13
  import { default as CxSpinner } from '../../../../atoms/src/components/spinner/spinner.ts';
13
14
  import { default as CxTooltip } from '../../../../atoms/src/components/tooltip/tooltip.ts';
14
15
  import { default as CxTypography } from '../../../../atoms/src/components/typography/typography.ts';
@@ -44,6 +45,7 @@ export default class CxBookReader extends CortexElement {
44
45
  'cx-popup': typeof CxPopup;
45
46
  'cx-progress-bar': typeof CxProgressBar;
46
47
  'cx-resize-observer': typeof CxResizeObserver;
48
+ 'cx-space': typeof CxSpace;
47
49
  'cx-spinner': typeof CxSpinner;
48
50
  'cx-tooltip': typeof CxTooltip;
49
51
  'cx-typography': typeof CxTypography;
@@ -109,9 +109,15 @@ export default class CxSbImage extends CxImage {
109
109
  * A description of the image used by assistive devices in dark mode.
110
110
  */
111
111
  altDarkMode: string;
112
- /** Whether to use authored alt text instead of asset metadata. */
112
+ /**
113
+ * Whether to use authored alt text instead of asset metadata.
114
+ * Translatable per language, so `"false"` is read as off (see `translatableBooleanConverter`).
115
+ */
113
116
  useCustomAlt: boolean;
114
- /** Whether to use authored alt text for the dark-mode image. */
117
+ /**
118
+ * Whether to use authored alt text for the dark-mode image.
119
+ * Translatable per language, so `"false"` is read as off (see `translatableBooleanConverter`).
120
+ */
115
121
  useCustomAltDarkMode: boolean;
116
122
  altSourceField: string;
117
123
  /**
@@ -15,5 +15,13 @@ export declare class ConfigFormController implements ReactiveController {
15
15
  private renderInfoText;
16
16
  private renderBasicControl;
17
17
  renderBasicControls(configs: PropertyConfig[], parent?: PropertyConfig, tab?: TabType): TemplateResult<1>;
18
+ /**
19
+ * The attributes a translation row resolves its values from: the block attributes for the
20
+ * default language, otherwise that language's translations falling back to the default
21
+ * language's translations and then the block attributes (same order as the row's value).
22
+ */
23
+ private getTranslationAttributes;
24
+ /** Whether a translatable control is shown for one language, given that language's attributes. */
25
+ private isTranslationControlVisible;
18
26
  renderTranslationControls(): TemplateResult<1>;
19
27
  }
@@ -185,7 +185,7 @@ export default class CxConfigForm extends CortexElement {
185
185
  * This is used to store the values of the translatable controls.
186
186
  * @default []
187
187
  */
188
- translatableControlValues: Record<string, Record<string, string>>;
188
+ translatableControlValues: Record<string, Record<string, string | boolean>>;
189
189
  /**
190
190
  * The default language of the translatable controls.
191
191
  * This is used to store the default language of the translatable controls.
@@ -12,7 +12,7 @@ export type CxContentBuilderConfigureEvent = CustomEvent<{
12
12
  attributes: Record<string, string>;
13
13
  properties?: Record<string, unknown>;
14
14
  styleProps: StyleProps;
15
- translations: Record<string, Record<string, string>>;
15
+ translations: Record<string, Record<string, string | boolean>>;
16
16
  };
17
17
  templateId: string;
18
18
  }>;
@@ -197,7 +197,7 @@ export default class CxConfigManager extends CortexElement {
197
197
  * This is used to store the values of the translatable controls.
198
198
  * @default {}
199
199
  */
200
- translatableControlValuesMap: Record<string, Record<string, string>>;
200
+ translatableControlValuesMap: Record<string, Record<string, string | boolean>>;
201
201
  /**
202
202
  * The list of input controls to render in the configuration form.
203
203
  * These are the input controls that will support multiple languages.
@@ -310,7 +310,7 @@ export default class CxContentBuilder extends CortexElement {
310
310
  private canBackfillDefaultLanguageTextRecord;
311
311
  private hasDefaultLanguageAttributeRecord;
312
312
  storeTranslatableText(id: string, data: string, options?: TranslatableTextRecordOptions): void;
313
- storeTranslatableAttribute(id: string, data: Record<string, Record<string, string>>): void;
313
+ storeTranslatableAttribute(id: string, data: Record<string, Record<string, string | boolean>>): void;
314
314
  private updateFrameSize;
315
315
  handleSupportedLanguagesChange(): void;
316
316
  handleDeviceChange(): void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "3.73.0",
4
+ "version": "3.75.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {