@xplor-education/core-stencil-components 3.1.2 → 3.1.4
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/components/index.js +28 -3
- package/components/index.js.map +1 -1
- package/components/{p-B49oUO_9.js → p-AzuDJugb.js} +3 -3
- package/components/{p-B49oUO_9.js.map → p-AzuDJugb.js.map} +1 -1
- package/components/{p-D4jVa8dE.js → p-BQ6aLuGP.js} +4 -4
- package/components/{p-D4jVa8dE.js.map → p-BQ6aLuGP.js.map} +1 -1
- package/components/{p-VIJbFoA4.js → p-BZQ63ULK.js} +3 -3
- package/components/{p-VIJbFoA4.js.map → p-BZQ63ULK.js.map} +1 -1
- package/components/{p-BRWe4TXp.js → p-C-gHaxf1.js} +3 -3
- package/components/p-C-gHaxf1.js.map +1 -0
- package/components/{p-Bs_ocvfe.js → p-CyGsSa4H.js} +7 -4
- package/components/p-CyGsSa4H.js.map +1 -0
- package/components/{p-B3zR7peH.js → p-oanCZPh6.js} +4 -4
- package/components/{p-B3zR7peH.js.map → p-oanCZPh6.js.map} +1 -1
- package/components/xplor-alert-message.js +2 -2
- package/components/xplor-avatar-and-name.js +2 -2
- package/components/xplor-avatar.js +1 -1
- package/components/xplor-badge-active.js +1 -1
- package/components/xplor-badge-archived.js +1 -1
- package/components/xplor-badge-deleted.js +1 -1
- package/components/xplor-badge-expired.js +1 -1
- package/components/xplor-badge-inactive.js +1 -1
- package/components/xplor-badge-recalled.js +1 -1
- package/components/xplor-badge-upcoming.js +1 -1
- package/components/xplor-badge-waitlist.js +1 -1
- package/components/xplor-badge.js +1 -1
- package/components/xplor-btn-back-to-parent.js +1 -1
- package/components/xplor-btn-back.js +1 -1
- package/components/xplor-btn-icon.js +1 -1
- package/components/xplor-btn-toggle-group.js +1 -1
- package/components/xplor-btn-toggle-secondary.js +1 -1
- package/components/xplor-btn-toggle.js +1 -1
- package/components/xplor-btn-tooltip.js +3 -3
- package/components/xplor-button.js +1 -1
- package/components/xplor-canvas-editor.d.ts +11 -0
- package/components/xplor-canvas-editor.js +369 -0
- package/components/xplor-canvas-editor.js.map +1 -0
- package/components/xplor-chat-widget.js +3 -3
- package/components/xplor-checkbox.js +1 -1
- package/components/xplor-combobox.js +5 -5
- package/components/xplor-datatable.js +2 -2
- package/components/xplor-date-picker.js +5 -5
- package/components/xplor-drag-and-drop-input.js +26 -5
- package/components/xplor-drag-and-drop-input.js.map +1 -1
- package/components/xplor-dropdown.js +1 -1
- package/components/xplor-expansion-panel.js +4 -4
- package/components/xplor-expansion-panels.js +1 -1
- package/components/xplor-file-upload.js +2 -2
- package/components/xplor-inline-checkbox.js +2 -2
- package/components/xplor-inline-date-picker.js +1 -1
- package/components/xplor-inline-switch.js +1 -1
- package/components/xplor-input-file.js +1 -1
- package/components/xplor-input-search.js +2 -2
- package/components/xplor-input-select.js +2 -2
- package/components/xplor-input-send.js +3 -3
- package/components/xplor-input-text-area.js +2 -2
- package/components/xplor-input-text-secondary.js +2 -2
- package/components/xplor-input-text.js +2 -2
- package/components/xplor-input-title.js +1 -1
- package/components/xplor-links.js +1 -1
- package/components/xplor-modal-persistent.js +2 -2
- package/components/xplor-modal.js +1 -1
- package/components/xplor-nav-tabs.js +2 -2
- package/components/xplor-radio-btn.js +2 -2
- package/components/xplor-rich-text-editor.d.ts +11 -0
- package/components/xplor-rich-text-editor.js +23754 -0
- package/components/xplor-rich-text-editor.js.map +1 -0
- package/components/xplor-section-card.js +2 -2
- package/components/xplor-section-heading.js +2 -2
- package/components/xplor-table.js +5 -5
- package/components/xplor-text-bubble.js +2 -2
- package/components/xplor-text-field.js +2 -2
- package/components/xplor-time-picker.js +6 -6
- package/components/xplor-tooltip.js +1 -1
- package/dist/cjs/{index-BjAapk2n.js → index--_m3aUsf.js} +32 -7
- package/dist/cjs/index--_m3aUsf.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/xplor-alert-dialog_60.cjs.entry.js +29457 -0
- package/dist/cjs/xplor-alert-dialog_60.cjs.entry.js.map +1 -0
- package/dist/cjs/xplor-component-library.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/xplor-alert-message/xplor-alert-message.js +2 -2
- package/dist/collection/components/xplor-avatar/xplor-avatar.js +2 -2
- package/dist/collection/components/xplor-avatar-and-name/xplor-avatar-and-name.js +1 -1
- package/dist/collection/components/xplor-badge/xplor-badge.js +1 -1
- package/dist/collection/components/xplor-badge-active/xplor-badge-active.js +1 -1
- package/dist/collection/components/xplor-badge-archived/xplor-badge-archived.js +1 -1
- package/dist/collection/components/xplor-badge-deleted/xplor-badge-deleted.js +1 -1
- package/dist/collection/components/xplor-badge-expired/xplor-badge-expired.js +1 -1
- package/dist/collection/components/xplor-badge-inactive/xplor-badge-inactive.js +1 -1
- package/dist/collection/components/xplor-badge-recalled/xplor-badge-recalled.js +1 -1
- package/dist/collection/components/xplor-badge-upcoming/xplor-badge-upcoming.js +1 -1
- package/dist/collection/components/xplor-badge-waitlist/xplor-badge-waitlist.js +1 -1
- package/dist/collection/components/xplor-btn-back/xplor-btn-back.js +1 -1
- package/dist/collection/components/xplor-btn-back-to-parent/xplor-btn-back-to-parent.js +1 -1
- package/dist/collection/components/xplor-btn-icon/xplor-btn-icon.js +1 -1
- package/dist/collection/components/xplor-btn-toggle/xplor-btn-toggle.js +1 -1
- package/dist/collection/components/xplor-btn-toggle-group/xplor-btn-toggle-group.js +1 -1
- package/dist/collection/components/xplor-btn-toggle-secondary/xplor-btn-toggle-secondary.js +1 -1
- package/dist/collection/components/xplor-btn-tooltip/xplor-btn-tooltip.js +1 -1
- package/dist/collection/components/xplor-button/xplor-button.css +8 -3
- package/dist/collection/components/xplor-button/xplor-button.js +23 -1
- package/dist/collection/components/xplor-button/xplor-button.js.map +1 -1
- package/dist/collection/components/xplor-canvas-editor/xplor-canvas-editor.css +1224 -0
- package/dist/collection/components/xplor-canvas-editor/xplor-canvas-editor.js +520 -0
- package/dist/collection/components/xplor-canvas-editor/xplor-canvas-editor.js.map +1 -0
- package/dist/collection/components/xplor-canvas-editor/xplor-canvas-editor.stories.js +280 -0
- package/dist/collection/components/xplor-canvas-editor/xplor-canvas-editor.stories.js.map +1 -0
- package/dist/collection/components/xplor-chat-widget/xplor-chat-widget.js +1 -1
- package/dist/collection/components/xplor-checkbox/xplor-checkbox.js +1 -1
- package/dist/collection/components/xplor-combobox/xplor-combobox.js +5 -5
- package/dist/collection/components/xplor-datatable/xplor-datatable.js +2 -2
- package/dist/collection/components/xplor-date-picker/xplor-date-picker.js +4 -4
- package/dist/collection/components/xplor-drag-and-drop-input/xplor-drag-and-drop-input.css +62 -29
- package/dist/collection/components/xplor-drag-and-drop-input/xplor-drag-and-drop-input.js +25 -4
- package/dist/collection/components/xplor-drag-and-drop-input/xplor-drag-and-drop-input.js.map +1 -1
- package/dist/collection/components/xplor-dropdown/xplor-dropdown.js +1 -1
- package/dist/collection/components/xplor-expansion-panel/xplor-expansion-panel.js +4 -4
- package/dist/collection/components/xplor-expansion-panels/xplor-expansion-panels.js +1 -1
- package/dist/collection/components/xplor-file-upload/xplor-file-upload.js +2 -2
- package/dist/collection/components/xplor-inline-checkbox/xplor-inline-checkbox.js +2 -2
- package/dist/collection/components/xplor-inline-date-picker/xplor-inline-date-picker.js +1 -1
- package/dist/collection/components/xplor-inline-switch/xplor-inline-switch.js +1 -1
- package/dist/collection/components/xplor-input-file/xplor-input-file.js +1 -1
- package/dist/collection/components/xplor-input-search/xplor-input-search.js +2 -2
- package/dist/collection/components/xplor-input-select/xplor-input-select.js +2 -2
- package/dist/collection/components/xplor-input-send/xplor-input-send.js +2 -2
- package/dist/collection/components/xplor-input-text/xplor-input-text.js +2 -2
- package/dist/collection/components/xplor-input-text-area/xplor-input-text-area.js +2 -2
- package/dist/collection/components/xplor-input-text-secondary/xplor-input-text-secondary.js +2 -2
- package/dist/collection/components/xplor-input-title/xplor-input-title.js +1 -1
- package/dist/collection/components/xplor-links/xplor-links.js +1 -1
- package/dist/collection/components/xplor-modal/xplor-modal.css +10 -10
- package/dist/collection/components/xplor-modal-persistent/xplor-modal-persistent.js +1 -1
- package/dist/collection/components/xplor-nav-tabs/xplor-nav-tabs.js +2 -2
- package/dist/collection/components/xplor-radio-btn/xplor-radio-btn.js +2 -2
- package/dist/collection/components/xplor-rich-text-editor/xplor-rich-text-editor.css +1445 -0
- package/dist/collection/components/xplor-rich-text-editor/xplor-rich-text-editor.js +800 -0
- package/dist/collection/components/xplor-rich-text-editor/xplor-rich-text-editor.js.map +1 -0
- package/dist/collection/components/xplor-rich-text-editor/xplor-rich-text-editor.stories.js +260 -0
- package/dist/collection/components/xplor-rich-text-editor/xplor-rich-text-editor.stories.js.map +1 -0
- package/dist/collection/components/xplor-section-card/xplor-section-card.js +2 -2
- package/dist/collection/components/xplor-section-heading/xplor-section-heading.js +2 -2
- package/dist/collection/components/xplor-table/xplor-table.js +5 -5
- package/dist/collection/components/xplor-text-bubble/xplor-text-bubble.js +2 -2
- package/dist/collection/components/xplor-text-field/xplor-text-field.js +2 -2
- package/dist/collection/components/xplor-time-picker/xplor-time-picker.js +6 -6
- package/dist/collection/components/xplor-tooltip/xplor-tooltip.js +2 -2
- package/dist/collection/utils/slate-legacy-converter.js +223 -0
- package/dist/collection/utils/slate-legacy-converter.js.map +1 -0
- package/dist/components/index.js +28 -3
- package/dist/components/index.js.map +1 -1
- package/dist/components/{p-04oMLTZR.js → p-B7FEf2_x.js} +3 -3
- package/dist/components/p-B7FEf2_x.js.map +1 -0
- package/dist/components/{p--zhT6rvJ.js → p-DGaHlr-k.js} +4 -4
- package/dist/components/{p--zhT6rvJ.js.map → p-DGaHlr-k.js.map} +1 -1
- package/dist/components/{p-B5rS_jjI.js → p-DWaTb2EJ.js} +7 -4
- package/dist/components/p-DWaTb2EJ.js.map +1 -0
- package/dist/components/{p-J41B2nOt.js → p-DroQBoSo.js} +3 -3
- package/dist/components/{p-J41B2nOt.js.map → p-DroQBoSo.js.map} +1 -1
- package/dist/components/{p-DQ8MCJFX.js → p-TfYzqGwr.js} +3 -3
- package/dist/components/{p-DQ8MCJFX.js.map → p-TfYzqGwr.js.map} +1 -1
- package/dist/components/{p-DbQ6ZNvh.js → p-vl-J3tKJ.js} +4 -4
- package/dist/components/{p-DbQ6ZNvh.js.map → p-vl-J3tKJ.js.map} +1 -1
- package/dist/components/xplor-alert-message.js +2 -2
- package/dist/components/xplor-avatar-and-name.js +2 -2
- package/dist/components/xplor-avatar.js +1 -1
- package/dist/components/xplor-badge-active.js +1 -1
- package/dist/components/xplor-badge-archived.js +1 -1
- package/dist/components/xplor-badge-deleted.js +1 -1
- package/dist/components/xplor-badge-expired.js +1 -1
- package/dist/components/xplor-badge-inactive.js +1 -1
- package/dist/components/xplor-badge-recalled.js +1 -1
- package/dist/components/xplor-badge-upcoming.js +1 -1
- package/dist/components/xplor-badge-waitlist.js +1 -1
- package/dist/components/xplor-badge.js +1 -1
- package/dist/components/xplor-btn-back-to-parent.js +1 -1
- package/dist/components/xplor-btn-back.js +1 -1
- package/dist/components/xplor-btn-icon.js +1 -1
- package/dist/components/xplor-btn-toggle-group.js +1 -1
- package/dist/components/xplor-btn-toggle-secondary.js +1 -1
- package/dist/components/xplor-btn-toggle.js +1 -1
- package/dist/components/xplor-btn-tooltip.js +3 -3
- package/dist/components/xplor-button.js +1 -1
- package/dist/components/xplor-canvas-editor.d.ts +11 -0
- package/dist/components/xplor-canvas-editor.js +370 -0
- package/dist/components/xplor-canvas-editor.js.map +1 -0
- package/dist/components/xplor-chat-widget.js +3 -3
- package/dist/components/xplor-checkbox.js +1 -1
- package/dist/components/xplor-combobox.js +5 -5
- package/dist/components/xplor-datatable.js +2 -2
- package/dist/components/xplor-date-picker.js +5 -5
- package/dist/components/xplor-drag-and-drop-input.js +26 -5
- package/dist/components/xplor-drag-and-drop-input.js.map +1 -1
- package/dist/components/xplor-dropdown.js +1 -1
- package/dist/components/xplor-expansion-panel.js +4 -4
- package/dist/components/xplor-expansion-panels.js +1 -1
- package/dist/components/xplor-file-upload.js +2 -2
- package/dist/components/xplor-inline-checkbox.js +2 -2
- package/dist/components/xplor-inline-date-picker.js +1 -1
- package/dist/components/xplor-inline-switch.js +1 -1
- package/dist/components/xplor-input-file.js +1 -1
- package/dist/components/xplor-input-search.js +2 -2
- package/dist/components/xplor-input-select.js +2 -2
- package/dist/components/xplor-input-send.js +3 -3
- package/dist/components/xplor-input-text-area.js +2 -2
- package/dist/components/xplor-input-text-secondary.js +2 -2
- package/dist/components/xplor-input-text.js +2 -2
- package/dist/components/xplor-input-title.js +1 -1
- package/dist/components/xplor-links.js +1 -1
- package/dist/components/xplor-modal-persistent.js +2 -2
- package/dist/components/xplor-modal.js +1 -1
- package/dist/components/xplor-nav-tabs.js +2 -2
- package/dist/components/xplor-radio-btn.js +2 -2
- package/dist/components/xplor-rich-text-editor.d.ts +11 -0
- package/dist/components/xplor-rich-text-editor.js +23755 -0
- package/dist/components/xplor-rich-text-editor.js.map +1 -0
- package/dist/components/xplor-section-card.js +2 -2
- package/dist/components/xplor-section-heading.js +2 -2
- package/dist/components/xplor-table.js +5 -5
- package/dist/components/xplor-text-bubble.js +2 -2
- package/dist/components/xplor-text-field.js +2 -2
- package/dist/components/xplor-time-picker.js +6 -6
- package/dist/components/xplor-tooltip.js +1 -1
- package/dist/esm/{index-KRfMjDC2.js → index-QwDfQUbw.js} +32 -7
- package/dist/esm/index-QwDfQUbw.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/xplor-alert-dialog_60.entry.js +29396 -0
- package/dist/esm/xplor-alert-dialog_60.entry.js.map +1 -0
- package/dist/esm/xplor-component-library.js +3 -3
- package/dist/hydrate/index.js +24231 -96
- package/dist/hydrate/index.mjs +24231 -96
- package/dist/types/components/xplor-button/xplor-button.d.ts +2 -0
- package/dist/types/components/xplor-canvas-editor/xplor-canvas-editor.d.ts +63 -0
- package/dist/types/components/xplor-canvas-editor/xplor-canvas-editor.stories.d.ts +84 -0
- package/dist/types/components/xplor-drag-and-drop-input/xplor-drag-and-drop-input.d.ts +6 -0
- package/dist/types/components/xplor-rich-text-editor/xplor-rich-text-editor.d.ts +129 -0
- package/dist/types/components/xplor-rich-text-editor/xplor-rich-text-editor.stories.d.ts +105 -0
- package/dist/types/components.d.ts +286 -0
- package/dist/types/utils/slate-legacy-converter.d.ts +83 -0
- package/dist/xplor-component-library/p-0d477ec2.entry.js +2 -0
- package/dist/xplor-component-library/p-0d477ec2.entry.js.map +1 -0
- package/dist/xplor-component-library/p-QwDfQUbw.js +3 -0
- package/dist/xplor-component-library/p-QwDfQUbw.js.map +1 -0
- package/dist/xplor-component-library/xplor-component-library.css +1 -1
- package/dist/xplor-component-library/xplor-component-library.esm.js +1 -1
- package/package.json +7 -1
- package/components/p-BRWe4TXp.js.map +0 -1
- package/components/p-Bs_ocvfe.js.map +0 -1
- package/dist/cjs/index-BjAapk2n.js.map +0 -1
- package/dist/cjs/xplor-alert-dialog_58.cjs.entry.js +0 -5395
- package/dist/cjs/xplor-alert-dialog_58.cjs.entry.js.map +0 -1
- package/dist/components/p-04oMLTZR.js.map +0 -1
- package/dist/components/p-B5rS_jjI.js.map +0 -1
- package/dist/esm/index-KRfMjDC2.js.map +0 -1
- package/dist/esm/xplor-alert-dialog_58.entry.js +0 -5336
- package/dist/esm/xplor-alert-dialog_58.entry.js.map +0 -1
- package/dist/xplor-component-library/p-7ecb45dd.entry.js +0 -2
- package/dist/xplor-component-library/p-7ecb45dd.entry.js.map +0 -1
- package/dist/xplor-component-library/p-KRfMjDC2.js +0 -3
- package/dist/xplor-component-library/p-KRfMjDC2.js.map +0 -1
|
@@ -9,6 +9,8 @@ export declare class XplorButton {
|
|
|
9
9
|
ariaLabel: string;
|
|
10
10
|
/** Whether the button is disabled */
|
|
11
11
|
disabled: boolean;
|
|
12
|
+
/** Whether the button stretches to full width of its container */
|
|
13
|
+
fullWidth: boolean;
|
|
12
14
|
/**
|
|
13
15
|
* Icon position: 'start' | 'end' | null
|
|
14
16
|
*/
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
export interface Shape {
|
|
3
|
+
id: string;
|
|
4
|
+
type: 'rect' | 'circle' | 'line';
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
fill: string;
|
|
10
|
+
stroke: string;
|
|
11
|
+
}
|
|
12
|
+
export declare class XplorCanvasEditor {
|
|
13
|
+
el: HTMLElement;
|
|
14
|
+
private readonly componentId;
|
|
15
|
+
private svgEl;
|
|
16
|
+
private isDrawing;
|
|
17
|
+
private drawStart;
|
|
18
|
+
private isResizing;
|
|
19
|
+
private resizeHandle;
|
|
20
|
+
private resizeStart;
|
|
21
|
+
/** Width of the SVG canvas in pixels */
|
|
22
|
+
width: number;
|
|
23
|
+
/** Height of the SVG canvas in pixels */
|
|
24
|
+
height: number;
|
|
25
|
+
/**
|
|
26
|
+
* Initially active tool. The consumer can switch tool programmatically by
|
|
27
|
+
* updating this prop; the internal `activeTool` state takes over once the
|
|
28
|
+
* component mounts.
|
|
29
|
+
*/
|
|
30
|
+
tool: 'select' | 'rect' | 'circle' | 'line';
|
|
31
|
+
private shapes;
|
|
32
|
+
private selectedId;
|
|
33
|
+
private activeTool;
|
|
34
|
+
private draftShape;
|
|
35
|
+
/** Emitted when a new shape is committed to the canvas */
|
|
36
|
+
xplorShapeAdd: EventEmitter<Shape>;
|
|
37
|
+
/** Emitted when a shape is removed; payload is the shape id */
|
|
38
|
+
xplorShapeRemove: EventEmitter<string>;
|
|
39
|
+
/** Emitted when a shape's bounds are updated via resize */
|
|
40
|
+
xplorShapeChange: EventEmitter<Shape>;
|
|
41
|
+
componentWillLoad(): void;
|
|
42
|
+
/** Removes all shapes and clears the selection */
|
|
43
|
+
clearAll(): Promise<void>;
|
|
44
|
+
/** Returns a shallow copy of all current shapes */
|
|
45
|
+
getShapes(): Promise<Shape[]>;
|
|
46
|
+
private generateId;
|
|
47
|
+
private getSvgPoint;
|
|
48
|
+
private setActiveTool;
|
|
49
|
+
private deleteSelected;
|
|
50
|
+
private onSvgMouseDown;
|
|
51
|
+
private onSvgMouseMove;
|
|
52
|
+
private onSvgMouseUp;
|
|
53
|
+
private onShapeClick;
|
|
54
|
+
private onResizeHandleMouseDown;
|
|
55
|
+
private onResizeMouseMove;
|
|
56
|
+
private onResizeMouseUp;
|
|
57
|
+
private onKeyDown;
|
|
58
|
+
private renderShape;
|
|
59
|
+
private renderSelectionOverlay;
|
|
60
|
+
private renderResizeHandles;
|
|
61
|
+
private renderToolbar;
|
|
62
|
+
render(): any;
|
|
63
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
tags: string[];
|
|
4
|
+
parameters: {
|
|
5
|
+
actions: {
|
|
6
|
+
handles: string[];
|
|
7
|
+
};
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
argTypes: {
|
|
15
|
+
width: {
|
|
16
|
+
control: {
|
|
17
|
+
type: string;
|
|
18
|
+
min: number;
|
|
19
|
+
max: number;
|
|
20
|
+
step: number;
|
|
21
|
+
};
|
|
22
|
+
description: string;
|
|
23
|
+
};
|
|
24
|
+
height: {
|
|
25
|
+
control: {
|
|
26
|
+
type: string;
|
|
27
|
+
min: number;
|
|
28
|
+
max: number;
|
|
29
|
+
step: number;
|
|
30
|
+
};
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
tool: {
|
|
34
|
+
control: {
|
|
35
|
+
type: string;
|
|
36
|
+
};
|
|
37
|
+
options: string[];
|
|
38
|
+
description: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export default _default;
|
|
43
|
+
export declare const Default: any;
|
|
44
|
+
export declare const DrawMode: any;
|
|
45
|
+
export declare const CircleTool: any;
|
|
46
|
+
export declare const LineTool: any;
|
|
47
|
+
export declare const SmallCanvas: any;
|
|
48
|
+
export declare const WideCanvas: any;
|
|
49
|
+
export declare const PreloadedShapes: {
|
|
50
|
+
(): string;
|
|
51
|
+
storyName: string;
|
|
52
|
+
parameters: {
|
|
53
|
+
docs: {
|
|
54
|
+
description: {
|
|
55
|
+
story: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export declare const DarkMode: {
|
|
61
|
+
(): string;
|
|
62
|
+
storyName: string;
|
|
63
|
+
parameters: {
|
|
64
|
+
backgrounds: {
|
|
65
|
+
default: string;
|
|
66
|
+
};
|
|
67
|
+
docs: {
|
|
68
|
+
description: {
|
|
69
|
+
story: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
export declare const CustomTokens: {
|
|
75
|
+
(): string;
|
|
76
|
+
storyName: string;
|
|
77
|
+
parameters: {
|
|
78
|
+
docs: {
|
|
79
|
+
description: {
|
|
80
|
+
story: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
};
|
|
@@ -26,6 +26,8 @@ export declare class XplorDragAndDropInput {
|
|
|
26
26
|
progress: number;
|
|
27
27
|
dragover: boolean;
|
|
28
28
|
currentFile: File | null;
|
|
29
|
+
horizontal: boolean;
|
|
30
|
+
el: HTMLElement;
|
|
29
31
|
/**
|
|
30
32
|
* Emitted when a file is selected via drop or click
|
|
31
33
|
*/
|
|
@@ -35,6 +37,10 @@ export declare class XplorDragAndDropInput {
|
|
|
35
37
|
*/
|
|
36
38
|
fileClear: EventEmitter<void>;
|
|
37
39
|
private fileInputEl;
|
|
40
|
+
private resizeObserver;
|
|
41
|
+
connectedCallback(): void;
|
|
42
|
+
componentDidLoad(): void;
|
|
43
|
+
disconnectedCallback(): void;
|
|
38
44
|
/**
|
|
39
45
|
* Clears the currently selected file
|
|
40
46
|
*/
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
/** Payload emitted by xplorChange */
|
|
3
|
+
export interface RteChangePayload {
|
|
4
|
+
html: string;
|
|
5
|
+
text: string;
|
|
6
|
+
isEmpty: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare class XplorRichTextEditor {
|
|
9
|
+
el: HTMLElement;
|
|
10
|
+
private editor;
|
|
11
|
+
private editorEl;
|
|
12
|
+
private readonly editorId;
|
|
13
|
+
private readonly toolbarId;
|
|
14
|
+
private readonly charCountId;
|
|
15
|
+
private readonly labelId;
|
|
16
|
+
/**
|
|
17
|
+
* HTML string content of the editor. Supports two-way binding via xplorChange.
|
|
18
|
+
*/
|
|
19
|
+
value: string;
|
|
20
|
+
/**
|
|
21
|
+
* Stringified Slate 0.42.x document JSON for backwards compatibility.
|
|
22
|
+
* When supplied, this takes precedence over `value` as the initial content.
|
|
23
|
+
*/
|
|
24
|
+
legacySlateDocument: string;
|
|
25
|
+
/**
|
|
26
|
+
* Placeholder text shown when the editor is empty.
|
|
27
|
+
*/
|
|
28
|
+
placeholder: string;
|
|
29
|
+
/**
|
|
30
|
+
* Visible label above the editor.
|
|
31
|
+
*/
|
|
32
|
+
label: string;
|
|
33
|
+
/**
|
|
34
|
+
* Marks the field as required. Adds an asterisk to the label.
|
|
35
|
+
*/
|
|
36
|
+
required: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Whether the editor is in read-only mode. Content is visible but not editable.
|
|
39
|
+
* The toolbar is hidden in this mode.
|
|
40
|
+
*/
|
|
41
|
+
readonly: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Whether the editor is disabled. Content cannot be edited or interacted with.
|
|
44
|
+
*/
|
|
45
|
+
disabled: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Accessible label for the editor region. Used when no `label` prop or
|
|
48
|
+
* `ariaLabelledBy` is provided.
|
|
49
|
+
*/
|
|
50
|
+
ariaLabel: string;
|
|
51
|
+
/**
|
|
52
|
+
* ID of an external element that labels this editor (aria-labelledby).
|
|
53
|
+
*/
|
|
54
|
+
ariaLabelledBy: string;
|
|
55
|
+
/**
|
|
56
|
+
* Controls which toolbar buttons are rendered.
|
|
57
|
+
* - `full` — All formatting options (default)
|
|
58
|
+
* - `minimal` — Text style buttons only (bold, italic, underline, strike, code)
|
|
59
|
+
* - `none` — No toolbar; editor acts as a plain rich-text input
|
|
60
|
+
*/
|
|
61
|
+
toolbar: 'full' | 'minimal' | 'none';
|
|
62
|
+
/**
|
|
63
|
+
* Maximum character count. When set, a character counter is shown below the editor.
|
|
64
|
+
*/
|
|
65
|
+
maxLength: number | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Validation error message. Turns the editor border red and shows the message below.
|
|
68
|
+
*/
|
|
69
|
+
error: string;
|
|
70
|
+
/**
|
|
71
|
+
* Helper text shown below the editor when there is no error.
|
|
72
|
+
*/
|
|
73
|
+
helperText: string;
|
|
74
|
+
/**
|
|
75
|
+
* Emitted whenever the content changes.
|
|
76
|
+
* Payload: `{ html: string; text: string; isEmpty: boolean }`
|
|
77
|
+
*/
|
|
78
|
+
xplorChange: EventEmitter<RteChangePayload>;
|
|
79
|
+
/**
|
|
80
|
+
* Emitted when the editor gains focus.
|
|
81
|
+
*/
|
|
82
|
+
xplorFocus: EventEmitter<void>;
|
|
83
|
+
/**
|
|
84
|
+
* Emitted when the editor loses focus.
|
|
85
|
+
*/
|
|
86
|
+
xplorBlur: EventEmitter<void>;
|
|
87
|
+
/** Incremented on every TipTap transaction to force toolbar re-render */
|
|
88
|
+
private editorVersion;
|
|
89
|
+
private isFocused;
|
|
90
|
+
private showLinkPopover;
|
|
91
|
+
private linkUrl;
|
|
92
|
+
private charCount;
|
|
93
|
+
componentDidLoad(): void;
|
|
94
|
+
disconnectedCallback(): void;
|
|
95
|
+
handleValueChange(newValue: string): void;
|
|
96
|
+
handleReadonlyChange(): void;
|
|
97
|
+
handleDisabledChange(): void;
|
|
98
|
+
handleLegacyDocChange(newValue: string): void;
|
|
99
|
+
/**
|
|
100
|
+
* Returns the current content as an HTML string.
|
|
101
|
+
*/
|
|
102
|
+
getHTMLContent(): Promise<string>;
|
|
103
|
+
/**
|
|
104
|
+
* Returns the current content as plain text (all markup stripped).
|
|
105
|
+
*/
|
|
106
|
+
getText(): Promise<string>;
|
|
107
|
+
/**
|
|
108
|
+
* Replaces the editor content with the provided HTML string.
|
|
109
|
+
*/
|
|
110
|
+
setContent(html: string): Promise<void>;
|
|
111
|
+
/**
|
|
112
|
+
* Clears all content from the editor.
|
|
113
|
+
*/
|
|
114
|
+
clearContent(): Promise<void>;
|
|
115
|
+
/**
|
|
116
|
+
* Programmatically focuses the editor.
|
|
117
|
+
*/
|
|
118
|
+
focusEditor(): Promise<void>;
|
|
119
|
+
private initEditor;
|
|
120
|
+
private execCommand;
|
|
121
|
+
private handleLinkButtonClick;
|
|
122
|
+
private handleLinkSubmit;
|
|
123
|
+
private handleLinkCancel;
|
|
124
|
+
private handleLinkKeyDown;
|
|
125
|
+
private renderToolbarButton;
|
|
126
|
+
private renderLinkPopover;
|
|
127
|
+
private renderToolbar;
|
|
128
|
+
render(): any;
|
|
129
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
tags: string[];
|
|
4
|
+
parameters: {
|
|
5
|
+
actions: {
|
|
6
|
+
handles: string[];
|
|
7
|
+
};
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
argTypes: {
|
|
15
|
+
label: {
|
|
16
|
+
control: string;
|
|
17
|
+
description: string;
|
|
18
|
+
};
|
|
19
|
+
placeholder: {
|
|
20
|
+
control: string;
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
value: {
|
|
24
|
+
control: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
toolbar: {
|
|
28
|
+
control: {
|
|
29
|
+
type: string;
|
|
30
|
+
};
|
|
31
|
+
options: string[];
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
readonly: {
|
|
35
|
+
control: string;
|
|
36
|
+
description: string;
|
|
37
|
+
};
|
|
38
|
+
disabled: {
|
|
39
|
+
control: string;
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
42
|
+
required: {
|
|
43
|
+
control: string;
|
|
44
|
+
description: string;
|
|
45
|
+
};
|
|
46
|
+
error: {
|
|
47
|
+
control: string;
|
|
48
|
+
description: string;
|
|
49
|
+
};
|
|
50
|
+
helperText: {
|
|
51
|
+
control: string;
|
|
52
|
+
description: string;
|
|
53
|
+
};
|
|
54
|
+
maxLength: {
|
|
55
|
+
control: string;
|
|
56
|
+
description: string;
|
|
57
|
+
};
|
|
58
|
+
ariaLabel: {
|
|
59
|
+
control: string;
|
|
60
|
+
description: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
export default _default;
|
|
65
|
+
export declare const Default: any;
|
|
66
|
+
export declare const WithInitialContent: any;
|
|
67
|
+
export declare const LegacySlateDocument: {
|
|
68
|
+
(args: any): string;
|
|
69
|
+
args: {
|
|
70
|
+
label: string;
|
|
71
|
+
};
|
|
72
|
+
storyName: string;
|
|
73
|
+
parameters: {
|
|
74
|
+
docs: {
|
|
75
|
+
description: {
|
|
76
|
+
story: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
export declare const Readonly: any;
|
|
82
|
+
export declare const Disabled: any;
|
|
83
|
+
export declare const MinimalToolbar: any;
|
|
84
|
+
export declare const NoToolbar: any;
|
|
85
|
+
export declare const WithMaxLength: any;
|
|
86
|
+
export declare const WithError: any;
|
|
87
|
+
export declare const WithHelperText: any;
|
|
88
|
+
export declare const DarkMode: {
|
|
89
|
+
(args: any): string;
|
|
90
|
+
args: {
|
|
91
|
+
label: string;
|
|
92
|
+
placeholder: string;
|
|
93
|
+
};
|
|
94
|
+
storyName: string;
|
|
95
|
+
parameters: {
|
|
96
|
+
backgrounds: {
|
|
97
|
+
default: string;
|
|
98
|
+
};
|
|
99
|
+
docs: {
|
|
100
|
+
description: {
|
|
101
|
+
story: string;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
};
|