@orangelogic/design-system 4.25.0 → 4.26.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/{bicolor-picker.CWCWYEwd.js → bicolor-picker.CojUr8VQ.js} +1 -1
- package/library/chunks/{block-width.0PyAzdj4.js → block-width.BHqoh68k.js} +11 -11
- package/library/chunks/{border-input-group.BL2Ur2wF.js → border-input-group.hX_u5As5.js} +1 -1
- package/library/chunks/{color-picker.4RmqHU3L.js → color-picker.C3u13jWP.js} +2 -2
- package/library/chunks/{color-swatch-group.DBw5rGgv.js → color-swatch-group.D4KGIN_7.js} +2 -2
- package/library/chunks/{config-manager.CgARMYCv.js → config-manager._UPFF51v.js} +9 -9
- package/library/chunks/{configs-controller.uHeyuYLg.js → configs-controller.CfLKthEL.js} +3 -3
- package/library/chunks/{confirm-popover.CAi2Ss8x.js → confirm-popover.Ca_p-aec.js} +1 -1
- package/library/chunks/{document-viewer.zlfXjbFZ.js → document-viewer.DvSw5R7C.js} +2 -2
- package/library/chunks/{dropdown.BSnnwEoA.js → dropdown.CLzQHntD.js} +7 -9
- package/library/chunks/{file-on-demand.C8wT6osZ.js → file-on-demand._LRRo_VV.js} +2 -2
- package/library/chunks/{menu.CsKDyzJq.js → menu.DDiovK72.js} +18 -16
- package/library/chunks/{shadow-input-group.CRW-REDm.js → shadow-input-group.CyzUfNfD.js} +1 -1
- package/library/chunks/{src.Bd_MAc58.js → src.DOywg1GE.js} +5 -5
- package/library/chunks/{tab-group.Bw2Rp1W9.js → tab-group.kPeSvnQU.js} +2 -2
- package/library/components/atoms.js +6 -6
- package/library/components/bicolor-picker.js +1 -1
- package/library/components/border-input-group.js +1 -1
- package/library/components/color-picker.js +1 -1
- package/library/components/color-swatch-group.js +1 -1
- package/library/components/confirm-popover.js +1 -1
- package/library/components/document-viewer.js +1 -1
- package/library/components/dropdown.js +1 -1
- package/library/components/file-on-demand.js +1 -1
- package/library/components/menu.js +1 -1
- package/library/components/molecules.js +4 -4
- package/library/components/organisms.js +2 -2
- package/library/components/shadow-input-group.js +1 -1
- package/library/components/tab-group.js +1 -1
- package/library/components/types.js +9460 -9421
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/dropdown/dropdown.d.ts +0 -1
- package/library/packages/atoms/src/components/menu/menu.d.ts +4 -3
- package/library/packages/hybrid/rich-text/src/components/rich-text-toolbar/rich-text-toolbar.d.ts +4 -5
- package/library/packages/hybrid/rich-text/src/components/rich-text-toolbar/toolbar-list-actions.d.ts +45 -0
- package/library/packages/hybrid/rich-text/src/rich-text.d.ts +7 -0
- package/library/packages/react-web-component.d.ts +0 -4
- package/library/react-web-component.d.ts +0 -4
- package/package.json +1 -1
package/library/package.json
CHANGED
|
@@ -112,7 +112,6 @@ export default class CxDropdown extends CortexElement {
|
|
|
112
112
|
private handleKeyDown;
|
|
113
113
|
private handleDocumentKeyDown;
|
|
114
114
|
private handleDocumentMouseDown;
|
|
115
|
-
private handleDocumentFocusIn;
|
|
116
115
|
private handlePanelSelect;
|
|
117
116
|
handleTriggerClick(): Promise<void>;
|
|
118
117
|
handleTriggerKeyDown(event: KeyboardEvent): void;
|
|
@@ -23,6 +23,7 @@ export default class CxMenu extends CortexElement {
|
|
|
23
23
|
static styles: CSSResultGroup;
|
|
24
24
|
private readonly localize;
|
|
25
25
|
defaultSlot: HTMLSlotElement;
|
|
26
|
+
backSlot: HTMLSlotElement | null;
|
|
26
27
|
horizontal: boolean;
|
|
27
28
|
/** The menu's variant */
|
|
28
29
|
variant: MenuMode.Default | MenuMode.Multiple;
|
|
@@ -38,8 +39,6 @@ export default class CxMenu extends CortexElement {
|
|
|
38
39
|
bubbleKeyDown: boolean;
|
|
39
40
|
/** Override the default keydown navigation behavior of the dropdown menu. */
|
|
40
41
|
ignoredKeys: string[];
|
|
41
|
-
/** @deprecated Only stops ArrowUp/ArrowDown wrapping now; Tab is no longer intercepted. */
|
|
42
|
-
disabledTabLoop: boolean;
|
|
43
42
|
/** When true, checkbox items don't toggle off when already checked (same as each item's own `no-uncheck`). */
|
|
44
43
|
noUncheck: boolean;
|
|
45
44
|
resizeObserver: ResizeObserver | null;
|
|
@@ -57,7 +56,9 @@ export default class CxMenu extends CortexElement {
|
|
|
57
56
|
private setRovingTabIndex;
|
|
58
57
|
private isMenuSection;
|
|
59
58
|
private isMenuItem;
|
|
60
|
-
/**
|
|
59
|
+
/** Focuses a panel's tab stop, so focus doesn't stay behind in the panel that is being hidden. */
|
|
60
|
+
private focusPanelTabStop;
|
|
61
|
+
/** @internal Gets all menu items, back button first, ignoring dividers, headers, and other elements. */
|
|
61
62
|
getAllItems(): CxMenuItem[];
|
|
62
63
|
/** @internal Gets all slotted submenus, used for 'multiple' variant */
|
|
63
64
|
getAllSubMenus(): CxMenu[];
|
package/library/packages/hybrid/rich-text/src/components/rich-text-toolbar/rich-text-toolbar.d.ts
CHANGED
|
@@ -279,13 +279,12 @@ export default class CxRichTextToolbar extends CortexElement {
|
|
|
279
279
|
private getOrderedListStyleForToolbar;
|
|
280
280
|
private applyBulletListStyle;
|
|
281
281
|
private applyOrderedListStyle;
|
|
282
|
-
/**
|
|
282
|
+
/** The touched blocks of each list scope as one run, as a `setTextSelection` span. */
|
|
283
283
|
private collectSelectedBlockGroups;
|
|
284
|
-
/**
|
|
285
|
-
* Flattens each touched blank-line-separated section to paragraphs, then lets `applyToGroup`
|
|
286
|
-
* turn each one into its own list. Toggling off passes nothing, so off mirrors on.
|
|
287
|
-
*/
|
|
284
|
+
/** Flattens each touched run to paragraphs, then lets `applyToGroup` turn it into a list. */
|
|
288
285
|
private flattenSelectionGroups;
|
|
286
|
+
/** Unlists only the selected lines; lifting them splits the list around the selection. */
|
|
287
|
+
private unlistSelection;
|
|
289
288
|
/**
|
|
290
289
|
* Whether every touched block is already this list type — i.e. a click should remove
|
|
291
290
|
* (vs. add). Block-level on purpose: Tiptap's `isActive` is range-coverage based and
|
package/library/packages/hybrid/rich-text/src/components/rich-text-toolbar/toolbar-list-actions.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Command } from '@tiptap/core';
|
|
2
|
+
import { Node as ProseMirrorNode } from '@tiptap/pm/model';
|
|
3
|
+
import { EditorState, Transaction } from '@tiptap/pm/state';
|
|
4
|
+
/** A block container the list toggles work inside, with the selection clipped to it. */
|
|
5
|
+
export type ListScope = {
|
|
6
|
+
from: number;
|
|
7
|
+
node: ProseMirrorNode;
|
|
8
|
+
/** Position of the container's first child. */
|
|
9
|
+
start: number;
|
|
10
|
+
to: number;
|
|
11
|
+
};
|
|
12
|
+
export type TouchedBlock = {
|
|
13
|
+
from: number;
|
|
14
|
+
node: ProseMirrorNode;
|
|
15
|
+
to: number;
|
|
16
|
+
};
|
|
17
|
+
export declare function isListNode(node: ProseMirrorNode): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* The toggles work inside the nearest container around the selection that is not part of a list
|
|
20
|
+
* (a table cell, a blockquote, the document), with one scope per cell for a cell selection.
|
|
21
|
+
*/
|
|
22
|
+
export declare function listScopes(state: EditorState): ListScope[];
|
|
23
|
+
/** The direct children of the scopes that the selection touches, in document order. */
|
|
24
|
+
export declare function touchedBlocks(scopes: ListScope[]): TouchedBlock[];
|
|
25
|
+
/**
|
|
26
|
+
* clearNodes collapses the selection to a cursor; re-select [from, to] through the mapping, with
|
|
27
|
+
* `between` since a lifted boundary can map outside any text.
|
|
28
|
+
*/
|
|
29
|
+
export declare function reselectMappedRange(from: number, to: number): Command;
|
|
30
|
+
/**
|
|
31
|
+
* Takes the selected textblocks out of their lists. Replaces Tiptap's clearNodes, which resets
|
|
32
|
+
* their attributes (alignment, line height…), strips non-list wrappers such as a blockquote too,
|
|
33
|
+
* and walks a cached doc that goes stale once an earlier command in the chain changed an ancestor.
|
|
34
|
+
*/
|
|
35
|
+
export declare function clearNodesKeepingAttrs(): Command;
|
|
36
|
+
/** List items holding nothing but nested lists, within `ranges`. */
|
|
37
|
+
export declare function nestedOnlyItemPositions(doc: ProseMirrorNode, ranges: Array<{
|
|
38
|
+
from: number;
|
|
39
|
+
to: number;
|
|
40
|
+
}>): number[];
|
|
41
|
+
/**
|
|
42
|
+
* Lifting a parent item out of its list leaves its nested list in an item with no text of its own,
|
|
43
|
+
* which renders as a bare marker. Moves the nested items at `positions` up into the enclosing list.
|
|
44
|
+
*/
|
|
45
|
+
export declare function liftNestedOnlyItems(tr: Transaction, positions: number[]): void;
|
|
@@ -288,6 +288,13 @@ export default class CxRichText extends CortexElement {
|
|
|
288
288
|
private teardownEditor;
|
|
289
289
|
private initializeEditor;
|
|
290
290
|
private emitRichTextChange;
|
|
291
|
+
/** Hides the caret until the selection and placeholder have painted, so it does not jump. */
|
|
292
|
+
private revealCaretAfterPaint;
|
|
293
|
+
/**
|
|
294
|
+
* No blur() here: hosts save on cx-rich-text-blur. The DOM selection is collapsed by hand since
|
|
295
|
+
* it still spans the emptied <p>, which shadowRoot.getSelection() wrongly reports as collapsed.
|
|
296
|
+
*/
|
|
297
|
+
private resetEmptyCaret;
|
|
291
298
|
private shouldCheckForbiddenKeys;
|
|
292
299
|
private getLegacyKeyCodeFromKeyboardEvent;
|
|
293
300
|
private getLegacyKeyCodeFromBeforeInputEvent;
|
|
@@ -5004,10 +5004,6 @@ interface CxMenuAttributes extends HTMLAttributes<CxMenu> {
|
|
|
5004
5004
|
* Override the default keydown navigation behavior of the dropdown menu.
|
|
5005
5005
|
*/
|
|
5006
5006
|
ignoredKeys?: string[];
|
|
5007
|
-
/**
|
|
5008
|
-
*
|
|
5009
|
-
*/
|
|
5010
|
-
disabledTabLoop?: boolean;
|
|
5011
5007
|
/**
|
|
5012
5008
|
* When true, checkbox items in this menu do not toggle off when already activated while checked—the same behavior as setting `no-uncheck` on each checkbox item.
|
|
5013
5009
|
*/
|
|
@@ -884,10 +884,6 @@
|
|
|
884
884
|
* Override the default keydown navigation behavior of the dropdown menu.
|
|
885
885
|
*/
|
|
886
886
|
ignoredKeys?: string[];
|
|
887
|
-
/**
|
|
888
|
-
* @deprecated Only stops ArrowUp/ArrowDown wrapping now; Tab is no longer intercepted.
|
|
889
|
-
*/
|
|
890
|
-
disabledTabLoop?: boolean;
|
|
891
887
|
/**
|
|
892
888
|
* When true, checkbox items don't toggle off when already checked (same as each item's own `no-uncheck`).
|
|
893
889
|
*/
|