@orangelogic/design-system 2.79.0 → 2.81.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.
- package/library/chunks/{asset.DWZ2Lzb6.js → asset.CVuNAhz3.js} +1 -1
- package/library/chunks/{color-swatch-group.DvllHUil.js → color-swatch-group.o7zyUsbZ.js} +1 -1
- package/library/chunks/{endpoints.B7lcoc1N.js → endpoints.BpAhLyZw.js} +126 -117
- package/library/chunks/{folder-select.DOsefkAC.js → folder-select.D6yLoXWU.js} +146 -120
- package/library/chunks/{list-editor.DNa6ROgr.js → list-editor.Hd2f8A0Y.js} +2 -2
- package/library/chunks/{table.B8LpbiGE.js → table.CLyePLwR.js} +252 -237
- package/library/components/asset-link-format.js +2 -2
- package/library/components/atoms.js +1 -1
- package/library/components/color-swatch-group.js +2 -2
- package/library/components/folder-select.js +2 -2
- package/library/components/list-editor.js +2 -2
- package/library/components/menu-item.js +1 -1
- package/library/components/molecules.js +2 -2
- package/library/components/organisms.js +1 -1
- package/library/components/table.js +1 -1
- package/library/components/types.js +18202 -18132
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/table/table.d.ts +2 -6
- package/library/packages/events/src/cx-unauthorized.d.ts +10 -0
- package/library/packages/events/src/events.d.ts +1 -0
- package/library/packages/molecules/src/folder-select/components/folder-select-tree/folder-select-tree.d.ts +1 -0
- package/library/packages/molecules/src/folder-select/components/folder-select-tree-item/folder-select-tree-item.d.ts +2 -0
- package/library/packages/molecules/src/folder-select/folder-select.d.ts +1 -0
- package/library/packages/molecules/src/storybook/storybook.d.ts +60 -24
- package/library/packages/types/src/storybook.d.ts +19 -0
- package/library/react-web-component.d.ts +7 -7
- package/package.json +1 -1
package/library/package.json
CHANGED
|
@@ -400,12 +400,6 @@ export default class CxTable extends CortexElement {
|
|
|
400
400
|
* to be inserted in a different column you can pass the field name of the column to the dataTreeElementColumn setup option
|
|
401
401
|
*/
|
|
402
402
|
dataTreeElementColumn: boolean | string | undefined;
|
|
403
|
-
/**
|
|
404
|
-
* The branch element is the right angled line running from parent to child to indicate its position in the tree.
|
|
405
|
-
* If false, the branch element will not be displayed.
|
|
406
|
-
* Alternatively, can provide a HTML string to use as the branch element.
|
|
407
|
-
*/
|
|
408
|
-
dataTreeBranchElement: boolean | string | undefined;
|
|
409
403
|
/**
|
|
410
404
|
* The amount of pixels to indent the child rows.
|
|
411
405
|
*/
|
|
@@ -717,6 +711,8 @@ export default class CxTable extends CortexElement {
|
|
|
717
711
|
handleGroupValuesChange(): void;
|
|
718
712
|
handleGroupLoadMoreMetaChange(): void;
|
|
719
713
|
handlePaginationSizeChange(): void;
|
|
714
|
+
handlePaginationChange(): Promise<void>;
|
|
715
|
+
private attachPaginatorToToolbar;
|
|
720
716
|
handlePaginationInitialPageChange(): void;
|
|
721
717
|
handleLoadingChange(): void;
|
|
722
718
|
setLoading(value: boolean): void;
|
|
@@ -138,6 +138,7 @@ export * from './cx-time-based-change';
|
|
|
138
138
|
export * from './cx-time-update';
|
|
139
139
|
export * from './cx-typeface-change';
|
|
140
140
|
export * from './cx-typeface-download';
|
|
141
|
+
export * from './cx-unauthorized';
|
|
141
142
|
export * from './cx-unmark-favorite';
|
|
142
143
|
export * from './cx-video-click';
|
|
143
144
|
export * from './cx-video-editor-track-canvas-ready';
|
|
@@ -34,6 +34,8 @@ export default class CxFolderSelectTreeItem extends CortexElement {
|
|
|
34
34
|
api?: FolderSelectApi;
|
|
35
35
|
excludeVirtualFolders: boolean;
|
|
36
36
|
url: string;
|
|
37
|
+
/** Overrides the default `folder` icon name when set. */
|
|
38
|
+
icon: string;
|
|
37
39
|
data: Folder[] | null;
|
|
38
40
|
hasMore: boolean;
|
|
39
41
|
loading: boolean;
|
|
@@ -34,6 +34,7 @@ export default class CxFolderSelect extends CortexElement {
|
|
|
34
34
|
excludeVirtualFolders: boolean;
|
|
35
35
|
extraFolderId: string;
|
|
36
36
|
extraFolderTitle: string;
|
|
37
|
+
extraFolderIcon: string;
|
|
37
38
|
firstFetchCallback: ((data: Folder[]) => void) | null;
|
|
38
39
|
searchTerm: string;
|
|
39
40
|
constructor();
|
|
@@ -1,57 +1,93 @@
|
|
|
1
1
|
import { default as CxButton } from '../../../atoms/src/components/button/button.ts';
|
|
2
2
|
import { default as CxCard } from '../../../atoms/src/components/card/card.ts';
|
|
3
3
|
import { default as CxCheckbox } from '../../../atoms/src/components/checkbox/checkbox.ts';
|
|
4
|
-
import { default as CxGrid } from '../../../atoms/src/components/grid/grid.ts';
|
|
5
|
-
import { default as CxGridItem } from '../../../atoms/src/components/grid-item/grid-item.ts';
|
|
6
4
|
import { default as CxIconButton } from '../../../atoms/src/components/icon-button/icon-button.ts';
|
|
7
5
|
import { default as CxInput } from '../../../atoms/src/components/input/input.ts';
|
|
8
6
|
import { default as CxMarkdown } from '../../../atoms/src/components/markdown/markdown.ts';
|
|
9
7
|
import { default as CxMutationObserver } from '../../../atoms/src/components/mutation-observer/mutation-observer.ts';
|
|
8
|
+
import { default as CxOption } from '../../../atoms/src/components/option/option.ts';
|
|
10
9
|
import { default as CxSelect } from '../../../atoms/src/components/select/select.ts';
|
|
11
|
-
import { default as
|
|
10
|
+
import { default as CxTextarea } from '../../../atoms/src/components/textarea/textarea.ts';
|
|
12
11
|
import { default as CortexElement } from '../../../base/src/cortex-element.ts';
|
|
12
|
+
import { CxMutationEvent } from '../../../events/src/events.ts';
|
|
13
|
+
import { StorybookPropConfig } from '../../../types/src/storybook';
|
|
13
14
|
import { CSSResultGroup, TemplateResult } from 'lit';
|
|
14
15
|
|
|
16
|
+
/**
|
|
17
|
+
* @summary A live playground that introspects a slotted Cortex component and
|
|
18
|
+
* renders editable controls for its public reactive properties and slots.
|
|
19
|
+
*
|
|
20
|
+
* @description Used in `apps/docs` pages to demonstrate components. The
|
|
21
|
+
* storybook reads `elementProperties` from the slotted target and renders a
|
|
22
|
+
* checkbox / input / select per property based on its declared `type`. Object
|
|
23
|
+
* and array properties accept JSON in the input. Function properties are
|
|
24
|
+
* intentionally **not** rendered — they cannot be expressed as text input and
|
|
25
|
+
* writing them as attributes corrupts their value (the function gets
|
|
26
|
+
* serialized to its source code string by `String(fn)`).
|
|
27
|
+
*
|
|
28
|
+
* @slot (default) - The component to demo. The first assigned element is
|
|
29
|
+
* inspected; pass `element-selector` to drill into a descendant.
|
|
30
|
+
*
|
|
31
|
+
* @csspart base - The card wrapper that hosts the demo and the controls.
|
|
32
|
+
*/
|
|
15
33
|
export default class CxStorybook extends CortexElement {
|
|
16
34
|
static readonly styles: CSSResultGroup;
|
|
17
35
|
static readonly dependencies: {
|
|
18
36
|
'cx-button': typeof CxButton;
|
|
19
37
|
'cx-card': typeof CxCard;
|
|
20
38
|
'cx-checkbox': typeof CxCheckbox;
|
|
21
|
-
'cx-grid': typeof CxGrid;
|
|
22
|
-
'cx-grid-item': typeof CxGridItem;
|
|
23
39
|
'cx-icon-button': typeof CxIconButton;
|
|
24
40
|
'cx-input': typeof CxInput;
|
|
25
41
|
'cx-markdown': typeof CxMarkdown;
|
|
26
42
|
'cx-mutation-observer': typeof CxMutationObserver;
|
|
43
|
+
'cx-option': typeof CxOption;
|
|
27
44
|
'cx-select': typeof CxSelect;
|
|
28
|
-
'cx-
|
|
45
|
+
'cx-textarea': typeof CxTextarea;
|
|
29
46
|
};
|
|
30
47
|
defaultSlot: HTMLSlotElement;
|
|
31
48
|
mutationObserver: CxMutationObserver;
|
|
49
|
+
/**
|
|
50
|
+
* CSS selector relative to the first slotted element. When set, the storybook
|
|
51
|
+
* targets the matching descendant instead of the slotted root element.
|
|
52
|
+
*/
|
|
32
53
|
elementSelector: string;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
54
|
+
/**
|
|
55
|
+
* Per-property metadata used to render richer controls:
|
|
56
|
+
*
|
|
57
|
+
* - Array of strings → renders a `cx-select` with each string as an option.
|
|
58
|
+
* - Special key `slot` → an array of slot names that the user can append.
|
|
59
|
+
*/
|
|
60
|
+
storybookConfig: Record<string, string[]>;
|
|
61
|
+
/** Introspected metadata for each editable public property of the target. */
|
|
62
|
+
config: Record<string, StorybookPropConfig>;
|
|
63
|
+
/** Live values for each editable property; mirrors the target component. */
|
|
64
|
+
props: Record<string, unknown>;
|
|
65
|
+
/** The component instance being demoed (the slotted root or a descendant). */
|
|
39
66
|
target: HTMLElement | null;
|
|
67
|
+
/** User-authored slot content keyed by slot name; each entry is an HTML string. */
|
|
40
68
|
slots: Record<string, string[]>;
|
|
41
|
-
constructor();
|
|
42
|
-
private handleInputChange;
|
|
43
|
-
private handleAddSlot;
|
|
44
|
-
private handleSlotInputChange;
|
|
45
|
-
private getDefaultSlotValues;
|
|
46
|
-
private getComponentDefaultProps;
|
|
47
|
-
private resolveAttrValue;
|
|
48
|
-
private updateRenderedComponent;
|
|
49
|
-
private handleAddSlotButtonClick;
|
|
50
|
-
private renderControls;
|
|
51
|
-
private handleAttributeChange;
|
|
52
69
|
connectedCallback(): void;
|
|
53
|
-
|
|
70
|
+
handleElementSelectorChange(): void;
|
|
54
71
|
handleSlotChange(): void;
|
|
72
|
+
handleAttributeChange(event: CxMutationEvent): void;
|
|
73
|
+
private resolveTargetFromSlot;
|
|
74
|
+
private introspectTargetConfig;
|
|
75
|
+
private collectExistingSlotEntries;
|
|
76
|
+
private readInitialProps;
|
|
77
|
+
private normalizePropValue;
|
|
78
|
+
private applyPropsToTarget;
|
|
79
|
+
private applyPropToTarget;
|
|
80
|
+
private syncPropFromAttribute;
|
|
81
|
+
private handlePropChange;
|
|
82
|
+
private handleSlotEntryChange;
|
|
83
|
+
private handleSlotEntryDelete;
|
|
84
|
+
private handleAddSlotButtonClick;
|
|
85
|
+
private appendSlotEntry;
|
|
86
|
+
private rerenderSlotEntries;
|
|
87
|
+
private renderControl;
|
|
88
|
+
private formatControlValue;
|
|
89
|
+
private renderSlotControls;
|
|
90
|
+
private renderControls;
|
|
55
91
|
render(): TemplateResult;
|
|
56
92
|
}
|
|
57
93
|
declare global {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lit-property type names that `cx-storybook` understands when introspecting the
|
|
3
|
+
* target component's `elementProperties`. Names match the lowercased function
|
|
4
|
+
* name of the corresponding constructor (`String`, `Number`, ...) plus a
|
|
5
|
+
* dedicated `'array'` slot for `type: Array` since `Array.name === 'Array'`.
|
|
6
|
+
*/
|
|
7
|
+
export declare enum StorybookPropType {
|
|
8
|
+
Array = "array",
|
|
9
|
+
Boolean = "boolean",
|
|
10
|
+
Function = "function",
|
|
11
|
+
Number = "number",
|
|
12
|
+
Object = "object",
|
|
13
|
+
String = "string"
|
|
14
|
+
}
|
|
15
|
+
/** Metadata `cx-storybook` builds per public reactive property of the target. */
|
|
16
|
+
export interface StorybookPropConfig {
|
|
17
|
+
default: unknown;
|
|
18
|
+
type: StorybookPropType;
|
|
19
|
+
}
|
|
@@ -4583,10 +4583,6 @@
|
|
|
4583
4583
|
* By default the toggle element will be inserted into the first column on the table. If you want the toggle element to be inserted in a different column you can pass the field name of the column to the dataTreeElementColumn setup option
|
|
4584
4584
|
*/
|
|
4585
4585
|
dataTreeElementColumn?: string | any;
|
|
4586
|
-
/**
|
|
4587
|
-
* The branch element is the right angled line running from parent to child to indicate its position in the tree. If false, the branch element will not be displayed. Alternatively, can provide a HTML string to use as the branch element.
|
|
4588
|
-
*/
|
|
4589
|
-
dataTreeBranchElement?: string | any;
|
|
4590
4586
|
/**
|
|
4591
4587
|
* The amount of pixels to indent the child rows.
|
|
4592
4588
|
*/
|
|
@@ -6061,6 +6057,10 @@
|
|
|
6061
6057
|
*
|
|
6062
6058
|
*/
|
|
6063
6059
|
extraFolderTitle?: string;
|
|
6060
|
+
/**
|
|
6061
|
+
*
|
|
6062
|
+
*/
|
|
6063
|
+
extraFolderIcon?: string;
|
|
6064
6064
|
/**
|
|
6065
6065
|
* Make localization attributes reactive eslint-disable-next-line lit/no-native-attributes
|
|
6066
6066
|
*/
|
|
@@ -6707,16 +6707,16 @@
|
|
|
6707
6707
|
preRender?: boolean;
|
|
6708
6708
|
}
|
|
6709
6709
|
/**
|
|
6710
|
-
*
|
|
6710
|
+
* A live playground that introspects a slotted Cortex component and renders editable controls for its public reactive properties and slots.
|
|
6711
6711
|
*/
|
|
6712
6712
|
interface CxStorybookAttributes extends HTMLAttributes<CxStorybook> {
|
|
6713
6713
|
|
|
6714
6714
|
/**
|
|
6715
|
-
*
|
|
6715
|
+
* CSS selector relative to the first slotted element. When set, the storybook targets the matching descendant instead of the slotted root element.
|
|
6716
6716
|
*/
|
|
6717
6717
|
elementSelector?: string;
|
|
6718
6718
|
/**
|
|
6719
|
-
*
|
|
6719
|
+
* Per-property metadata used to render richer controls: <br/> - Array of strings → renders a `cx-select` with each string as an option. - Special key `slot` → an array of slot names that the user can append.
|
|
6720
6720
|
*/
|
|
6721
6721
|
storybookConfig?: dictionary;
|
|
6722
6722
|
/**
|