@spectric/ui 0.0.11 → 0.0.12
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/dist/classes/DisposibleElement.d.ts +4 -2
- package/dist/components/Bitdisplay.d.ts +4 -4
- package/dist/components/Button.d.ts +1 -1
- package/dist/components/Header.d.ts +1 -1
- package/dist/components/input.d.ts +13 -12
- package/dist/components/splitview/splitview.d.ts +5 -5
- package/dist/components/table/body.d.ts +2 -1
- package/dist/components/table/cell.d.ts +1 -0
- package/dist/components/table/table.d.ts +10 -6
- package/dist/components/table/virtualBody.d.ts +49 -0
- package/dist/components/tooltip/tooltip.d.ts +15 -10
- package/dist/custom-elements.json +23 -9
- package/dist/index.es.js +1930 -1763
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +124 -91
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/classes/DisposibleElement.ts +15 -9
- package/src/components/Bitdisplay.ts +7 -7
- package/src/components/Button.ts +1 -1
- package/src/components/Header.ts +1 -1
- package/src/components/input.ts +18 -14
- package/src/components/splitview/splitview.ts +5 -5
- package/src/components/table/body.ts +13 -5
- package/src/components/table/cell.ts +4 -1
- package/src/components/table/header.ts +7 -2
- package/src/components/table/table.css +10 -6
- package/src/components/table/table.ts +45 -16
- package/src/components/table/virtualBody.css +13 -0
- package/src/components/table/virtualBody.ts +127 -0
- package/src/components/tooltip/tooltip.ts +36 -30
- package/src/docs/HTML-Vue-Python Integration.mdx +3 -3
- package/src/docs/html-include.png +0 -0
- package/src/docs/vue-example.png +0 -0
- package/src/docs/vue-include.png +0 -0
- package/src/stories/BitDisplay.stories.ts +2 -0
- package/src/stories/fixtures/data.ts +1 -1
- package/src/stories/pagination.stories.ts +2 -1
- package/src/stories/table.stories.ts +4 -2
|
@@ -2,6 +2,7 @@ import { LitElement } from 'lit-element/lit-element.js';
|
|
|
2
2
|
export interface IDisposable {
|
|
3
3
|
dispose(): void;
|
|
4
4
|
}
|
|
5
|
+
type DisposableTarget = HTMLElement | Promise<HTMLElement> | (() => HTMLElement);
|
|
5
6
|
export declare class DisposableElement extends LitElement {
|
|
6
7
|
private readonly _disposables;
|
|
7
8
|
private _isDisposed;
|
|
@@ -13,9 +14,10 @@ export declare class DisposableElement extends LitElement {
|
|
|
13
14
|
* @param event The event name
|
|
14
15
|
* @param handler The event handler
|
|
15
16
|
*/
|
|
16
|
-
addDisposableListener<K extends keyof GlobalEventHandlersEventMap>(target:
|
|
17
|
-
addDisposableListener<K extends keyof SpectricGlobalEvents>(target:
|
|
17
|
+
addDisposableListener<K extends keyof GlobalEventHandlersEventMap>(target: DisposableTarget, event: K, handler: (event: GlobalEventHandlersEventMap[K]) => void): void;
|
|
18
|
+
addDisposableListener<K extends keyof SpectricGlobalEvents>(target: DisposableTarget, event: K, handler: SpectricGlobalEvents[K]): void;
|
|
18
19
|
registerDisposable<T extends IDisposable>(o: T): T;
|
|
19
20
|
connectedCallback(): void;
|
|
20
21
|
disconnectedCallback(): void;
|
|
21
22
|
}
|
|
23
|
+
export {};
|
|
@@ -5,13 +5,13 @@ export interface BitDisplayProps {
|
|
|
5
5
|
/** Array buffer to display */
|
|
6
6
|
arrayBuffer: ArrayBuffer;
|
|
7
7
|
/** Bits per line */
|
|
8
|
-
frameWidth
|
|
8
|
+
frameWidth?: number;
|
|
9
9
|
/** How many pixels per bit */
|
|
10
|
-
scale
|
|
10
|
+
scale?: number;
|
|
11
11
|
/** Width of the display canvas */
|
|
12
|
-
width
|
|
12
|
+
width?: number;
|
|
13
13
|
/** Height of the display canvas */
|
|
14
|
-
height
|
|
14
|
+
height?: number;
|
|
15
15
|
}
|
|
16
16
|
type Position = {
|
|
17
17
|
x: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LitElement, TemplateResult } from 'lit';
|
|
1
|
+
import { LitElement, PropertyValues, TemplateResult } from 'lit';
|
|
2
2
|
import { ReactElementWithPropsAndEvents } from './types';
|
|
3
3
|
import { ButtonSizesTypes } from './Button';
|
|
4
4
|
export declare enum InputVariants {
|
|
@@ -17,29 +17,29 @@ export declare enum InputVariants {
|
|
|
17
17
|
type InputVariantsTypes = `${InputVariants}`;
|
|
18
18
|
export interface InputProps {
|
|
19
19
|
/** Input type */
|
|
20
|
-
variant
|
|
20
|
+
variant?: InputVariantsTypes;
|
|
21
21
|
/**Label to display above the input */
|
|
22
|
-
label
|
|
22
|
+
label?: string;
|
|
23
23
|
/**placeholder text to display*/
|
|
24
|
-
placeholder
|
|
25
|
-
disabled
|
|
26
|
-
readonly
|
|
24
|
+
placeholder?: string;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
readonly?: boolean;
|
|
27
27
|
/**
|
|
28
28
|
* The helper text.
|
|
29
29
|
*/
|
|
30
|
-
helperText
|
|
30
|
+
helperText?: string;
|
|
31
31
|
/**
|
|
32
32
|
* Specify if the currently value is invalid.
|
|
33
33
|
*/
|
|
34
|
-
invalid
|
|
34
|
+
invalid?: boolean;
|
|
35
35
|
/**
|
|
36
36
|
* Message which is displayed if the value is invalid.
|
|
37
37
|
*/
|
|
38
|
-
invalidText
|
|
38
|
+
invalidText?: string | TemplateResult<1>;
|
|
39
39
|
/**
|
|
40
40
|
* Max character count allowed for input. This is needed in order for enableCounter to display
|
|
41
41
|
*/
|
|
42
|
-
maxCount
|
|
42
|
+
maxCount?: number;
|
|
43
43
|
/**
|
|
44
44
|
* Boolean property to set the required status
|
|
45
45
|
*/
|
|
@@ -59,7 +59,7 @@ export interface InputProps {
|
|
|
59
59
|
/**
|
|
60
60
|
* The sets the autocomplete for the input.
|
|
61
61
|
*/
|
|
62
|
-
autocomplete
|
|
62
|
+
autocomplete?: HTMLInputElement['autocomplete'];
|
|
63
63
|
}
|
|
64
64
|
export declare class SpectricInput extends LitElement implements InputProps {
|
|
65
65
|
checked?: boolean;
|
|
@@ -106,7 +106,7 @@ export declare class SpectricInput extends LitElement implements InputProps {
|
|
|
106
106
|
* Pattern to validate the input against for HTML validity checking
|
|
107
107
|
*/
|
|
108
108
|
pattern: string;
|
|
109
|
-
maxCount:
|
|
109
|
+
maxCount: number;
|
|
110
110
|
/**
|
|
111
111
|
* The internal value.
|
|
112
112
|
*/
|
|
@@ -134,6 +134,7 @@ export declare class SpectricInput extends LitElement implements InputProps {
|
|
|
134
134
|
*/
|
|
135
135
|
protected _input?: HTMLInputElement;
|
|
136
136
|
private handleTogglePasswordVisibility;
|
|
137
|
+
protected updated(changedProperties: PropertyValues): void;
|
|
137
138
|
protected render(): unknown;
|
|
138
139
|
}
|
|
139
140
|
declare global {
|
|
@@ -7,15 +7,15 @@ export declare enum Orientations {
|
|
|
7
7
|
}
|
|
8
8
|
export interface SplitViewProps {
|
|
9
9
|
/** Controls the orientation of the splitter handle */
|
|
10
|
-
orientation
|
|
10
|
+
orientation?: `${Orientations}`;
|
|
11
11
|
/** the percentage to split the view default: 50*/
|
|
12
12
|
percentage?: number;
|
|
13
13
|
/** Should the splitter handle be invisible? */
|
|
14
14
|
invisible?: boolean;
|
|
15
15
|
/** Clamps the minimum split percentage default: 10 */
|
|
16
|
-
min
|
|
16
|
+
min?: number;
|
|
17
17
|
/** Clamps the maximum split percentage default: 90 */
|
|
18
|
-
max
|
|
18
|
+
max?: number;
|
|
19
19
|
/** save and load split state to localstorage splitter must have an id attribute default: true */
|
|
20
20
|
useSavedState?: boolean;
|
|
21
21
|
}
|
|
@@ -30,8 +30,8 @@ export declare class SplitView extends DisposableElement implements SplitViewPro
|
|
|
30
30
|
percentage: SplitViewProps['percentage'];
|
|
31
31
|
invisible: SplitViewProps['invisible'];
|
|
32
32
|
static styles: import('lit').CSSResult;
|
|
33
|
-
min:
|
|
34
|
-
max:
|
|
33
|
+
min: number;
|
|
34
|
+
max: number;
|
|
35
35
|
useSavedState: SplitViewProps['useSavedState'];
|
|
36
36
|
private isDragging;
|
|
37
37
|
private _error;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
2
|
import { HTMLElementTagWithEvents, ReactElementWithPropsAndEvents } from '../types';
|
|
3
3
|
import { ColumnSettings, TableElement } from './table';
|
|
4
4
|
export declare const TableBodyElementTag = "spectric-table-body";
|
|
@@ -14,6 +14,7 @@ export declare class TableBodyElement<T> extends LitElement implements BodyProps
|
|
|
14
14
|
columns: ColumnSettings<T>[];
|
|
15
15
|
table: TableElement<T>;
|
|
16
16
|
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
17
|
+
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
17
18
|
protected render(): unknown;
|
|
18
19
|
}
|
|
19
20
|
interface TableBodyEvents {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LitElement, TemplateResult } from 'lit';
|
|
1
|
+
import { LitElement, PropertyValues, TemplateResult } from 'lit';
|
|
2
2
|
import { HTMLElementTagWithEvents, ReactElementWithPropsAndEvents } from '../types';
|
|
3
|
-
import {
|
|
3
|
+
import { PaginationProps } from '../pagination';
|
|
4
4
|
import { FilterEvent } from './cell';
|
|
5
5
|
export declare const TableElementTag = "spectric-table";
|
|
6
6
|
export type { TableProps, TableEvents };
|
|
@@ -36,7 +36,7 @@ export type ColumnSettings<T> = {
|
|
|
36
36
|
/**
|
|
37
37
|
* Render function to render a table cell for displaying custom html
|
|
38
38
|
*/
|
|
39
|
-
render?: (row: T, table: TableElement<T>) => DomRenderable;
|
|
39
|
+
render?: (row: T, index: number, table: TableElement<T>) => DomRenderable;
|
|
40
40
|
/**
|
|
41
41
|
* Custom comparator function for sorting
|
|
42
42
|
*/
|
|
@@ -51,6 +51,7 @@ interface TableProps<T> extends TableDataOptions<T> {
|
|
|
51
51
|
data: T[];
|
|
52
52
|
select: TableSelectOptionsTypes;
|
|
53
53
|
sort?: TableSortOptionTypes;
|
|
54
|
+
rowHeight?: number;
|
|
54
55
|
}
|
|
55
56
|
type DomEvent<T> = Event & {
|
|
56
57
|
target: T;
|
|
@@ -66,6 +67,10 @@ export declare class TableElement<T> extends LitElement implements TableProps<T>
|
|
|
66
67
|
columns: ColumnSettings<T>[];
|
|
67
68
|
select: TableSelectOptionsTypes;
|
|
68
69
|
sort: TableSortOptionTypes;
|
|
70
|
+
/**
|
|
71
|
+
* Needed for virtualization
|
|
72
|
+
*/
|
|
73
|
+
rowHeight: number;
|
|
69
74
|
static getDefaultDataSorterAndPaginatior<T>(data: T[]): (props: TableDataOptions<T>) => T[];
|
|
70
75
|
private _handlePaginationChange;
|
|
71
76
|
private _handleSortChange;
|
|
@@ -74,12 +79,11 @@ export declare class TableElement<T> extends LitElement implements TableProps<T>
|
|
|
74
79
|
private selected;
|
|
75
80
|
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
76
81
|
_handleSelectAllChange: (e: DomEvent<HTMLInputElement>) => void;
|
|
82
|
+
protected update(changedProperties: PropertyValues): void;
|
|
77
83
|
protected render(): unknown;
|
|
78
84
|
}
|
|
79
85
|
interface TableEvents {
|
|
80
|
-
'change': (event: CustomEvent<
|
|
81
|
-
pagination: PaginationChangeProps;
|
|
82
|
-
}>) => void;
|
|
86
|
+
'change': (event: CustomEvent<TableDataOptions<any>>) => void;
|
|
83
87
|
'filter': (event: CustomEvent<FilterEvent<any>>) => void;
|
|
84
88
|
}
|
|
85
89
|
declare global {
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { HTMLElementTagWithEvents, ReactElementWithPropsAndEvents } from '../types';
|
|
2
|
+
import { ColumnSettings, TableElement } from './table';
|
|
3
|
+
import { DisposableElement } from '../../classes/DisposibleElement';
|
|
4
|
+
export declare const TableBodyElementTag = "spectric-table-virtual-body";
|
|
5
|
+
interface BodyProps<T> {
|
|
6
|
+
columns: ColumnSettings<T>[];
|
|
7
|
+
data: T[];
|
|
8
|
+
rowHeight: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Table Body Element
|
|
12
|
+
*/
|
|
13
|
+
export declare class TableVirtualBodyElement<T> extends DisposableElement implements BodyProps<T> {
|
|
14
|
+
data: T[];
|
|
15
|
+
columns: ColumnSettings<T>[];
|
|
16
|
+
rowHeight: number;
|
|
17
|
+
startIndex: number;
|
|
18
|
+
table: TableElement<T>;
|
|
19
|
+
constructor();
|
|
20
|
+
protected firstUpdated(): void;
|
|
21
|
+
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
22
|
+
protected render(): unknown;
|
|
23
|
+
}
|
|
24
|
+
interface TableBodyEvents {
|
|
25
|
+
}
|
|
26
|
+
declare global {
|
|
27
|
+
interface HTMLElementTagNameMap {
|
|
28
|
+
[TableBodyElementTag]: HTMLElementTagWithEvents<TableVirtualBodyElement<any>, TableBodyEvents>;
|
|
29
|
+
}
|
|
30
|
+
namespace JSX {
|
|
31
|
+
interface IntrinsicElements {
|
|
32
|
+
/**
|
|
33
|
+
* @see {@link DialogElement}
|
|
34
|
+
*/
|
|
35
|
+
[TableBodyElementTag]: ReactElementWithPropsAndEvents<TableVirtualBodyElement<any>, BodyProps<any>, TableBodyEvents>;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
namespace React {
|
|
39
|
+
namespace JSX {
|
|
40
|
+
interface IntrinsicElements {
|
|
41
|
+
/**
|
|
42
|
+
* @see {@link DialogElement}
|
|
43
|
+
*/
|
|
44
|
+
[TableBodyElementTag]: ReactElementWithPropsAndEvents<TableVirtualBodyElement<any>, BodyProps<any>, TableBodyEvents>;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HTMLElementTagWithEvents, ReactElementWithPropsAndEvents } from '../types';
|
|
2
|
-
import { CSSResultGroup
|
|
2
|
+
import { CSSResultGroup } from 'lit-element';
|
|
3
3
|
import { DomRenderable } from '../table';
|
|
4
|
+
import { DisposableElement } from '../../classes/DisposibleElement';
|
|
4
5
|
export declare const TooltipElementTag = "spectric-tooltip";
|
|
5
6
|
export type { TooltipProps, TooltipEvents };
|
|
6
7
|
export declare enum TooltipPostions {
|
|
@@ -15,11 +16,11 @@ interface TooltipProps {
|
|
|
15
16
|
/**
|
|
16
17
|
* How long you need to hover before the tooltip displays
|
|
17
18
|
*/
|
|
18
|
-
delay
|
|
19
|
+
delay?: number;
|
|
19
20
|
/**
|
|
20
21
|
* How long the fade in animation should run
|
|
21
22
|
*/
|
|
22
|
-
animationDuration
|
|
23
|
+
animationDuration?: number;
|
|
23
24
|
/**
|
|
24
25
|
* Tooltip contents
|
|
25
26
|
*/
|
|
@@ -27,24 +28,24 @@ interface TooltipProps {
|
|
|
27
28
|
/**
|
|
28
29
|
* Where to anchor the tooltip
|
|
29
30
|
*/
|
|
30
|
-
position
|
|
31
|
+
position?: TooltipPostionsTypes;
|
|
31
32
|
/**
|
|
32
|
-
* Sets a max width for the contents
|
|
33
|
+
* Sets a max width for the contents you can disable this by setting to 0 or -1
|
|
33
34
|
*/
|
|
34
35
|
maxWidth?: number;
|
|
35
36
|
/**
|
|
36
|
-
* Container the tool tip will be attached to.
|
|
37
|
+
* Container the tool tip will be attached to.
|
|
37
38
|
*/
|
|
38
39
|
portalTarget?: HTMLElement;
|
|
39
40
|
/**
|
|
40
|
-
* The element that triggers the tooltip.
|
|
41
|
+
* The element that triggers the tooltip. This is used for special cases like in the shadow dom if you want to target a host element instead of the immediate parent element
|
|
41
42
|
*/
|
|
42
43
|
triggerTarget?: HTMLElement;
|
|
43
44
|
}
|
|
44
45
|
/**
|
|
45
46
|
* Spectric tooltip will add a tooltip to any container
|
|
46
47
|
*/
|
|
47
|
-
export declare class TooltipElement extends
|
|
48
|
+
export declare class TooltipElement extends DisposableElement implements TooltipProps {
|
|
48
49
|
delay: number;
|
|
49
50
|
animationDuration: number;
|
|
50
51
|
text: DomRenderable;
|
|
@@ -56,9 +57,13 @@ export declare class TooltipElement extends LitElement implements TooltipProps {
|
|
|
56
57
|
portalTarget: HTMLElement;
|
|
57
58
|
private timer?;
|
|
58
59
|
private open;
|
|
59
|
-
mouseframe
|
|
60
|
-
|
|
60
|
+
private mouseframe?;
|
|
61
|
+
/**
|
|
62
|
+
* @default parentElement
|
|
63
|
+
*/
|
|
64
|
+
triggerTarget: HTMLElement;
|
|
61
65
|
private get target();
|
|
66
|
+
constructor();
|
|
62
67
|
connectedCallback(): void;
|
|
63
68
|
disconnectedCallback(): void;
|
|
64
69
|
private _getMousePosition;
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"name": "spectric-bit-display",
|
|
36
|
-
"description": "Events:\n\n * `bitMousemove` {} - emits BitDisplayMouseEvent on mousemove over the canvas\n\n * `bitClick` {} - emits BitDisplayMouseEvent on mouse click on the canvas\n\n * `bitDblclick` {} - emits BitDisplayMouseEvent on mouse double click on the canvas\n\n * `bitMousedown` {} - emits BitDisplayMouseEvent on mouse down onthe canvas\n\n * `bitMouseup` {} - emits BitDisplayMouseEvent on mouse up on the canvas\n\n * `bitContextmenu` {} - emits BitDisplayMouseEvent on mouse right click on the canvas\n\nAttributes:\n\n * `frameWidth` {`number`} - Bits per line\n\n * `scale` {`number`} - How many pixels per bit\n\n * `width` {`number`} - Width of the display canvas\n\n * `height` {`number`} - Height of the display canvas\n\nProperties:\n\n * `styles` {`CSSResult`} - \n\n * `state` {`{ scale?: number | undefined; }`} - \n\n * `yStart` {`number`} - \n\n * `xStart` {`number`} - \n\n * `_canvas` {`Promise<HTMLCanvasElement>`} - \n\n * `refs` {`{ viewport: Ref<HTMLDivElement>; canvas: Ref<HTMLCanvasElement>; scrollDiv: Ref<HTMLDivElement>; }`} - \n\n * `_bitArray` - \n\n * `color` {`string`} - \n\n * `onThemeChange` - \n\n * `onResize` - \n\n * `handleScroll` - \n\n * `resizeObserver` {`ResizeObserver & IDisposable`} - \n\n * `arrayBuffer` {`ArrayBuffer`} - Array buffer to display\n\n * `frameWidth` {`number`} - Bits per line\n\n * `scale` {`number`} - How many pixels per bit\n\n * `width` {`number`} - Width of the display canvas\n\n * `height` {`number`} - Height of the display canvas\n\n * `_disposables` {`Set<IDisposable>`} - \n\n * `_isDisposed` {`boolean`} - \n\n * `_disposableListeners` {`{ target:
|
|
36
|
+
"description": "Events:\n\n * `bitMousemove` {} - emits BitDisplayMouseEvent on mousemove over the canvas\n\n * `bitClick` {} - emits BitDisplayMouseEvent on mouse click on the canvas\n\n * `bitDblclick` {} - emits BitDisplayMouseEvent on mouse double click on the canvas\n\n * `bitMousedown` {} - emits BitDisplayMouseEvent on mouse down onthe canvas\n\n * `bitMouseup` {} - emits BitDisplayMouseEvent on mouse up on the canvas\n\n * `bitContextmenu` {} - emits BitDisplayMouseEvent on mouse right click on the canvas\n\nAttributes:\n\n * `frameWidth` {`number`} - Bits per line\n\n * `scale` {`number`} - How many pixels per bit\n\n * `width` {`number`} - Width of the display canvas\n\n * `height` {`number`} - Height of the display canvas\n\nProperties:\n\n * `styles` {`CSSResult`} - \n\n * `state` {`{ scale?: number | undefined; }`} - \n\n * `yStart` {`number`} - \n\n * `xStart` {`number`} - \n\n * `_canvas` {`Promise<HTMLCanvasElement>`} - \n\n * `refs` {`{ viewport: Ref<HTMLDivElement>; canvas: Ref<HTMLCanvasElement>; scrollDiv: Ref<HTMLDivElement>; }`} - \n\n * `_bitArray` - \n\n * `color` {`string`} - \n\n * `onThemeChange` - \n\n * `onResize` - \n\n * `handleScroll` - \n\n * `resizeObserver` {`ResizeObserver & IDisposable`} - \n\n * `arrayBuffer` {`ArrayBuffer`} - Array buffer to display\n\n * `frameWidth` {`number`} - Bits per line\n\n * `scale` {`number`} - How many pixels per bit\n\n * `width` {`number`} - Width of the display canvas\n\n * `height` {`number`} - Height of the display canvas\n\n * `_disposables` {`Set<IDisposable>`} - \n\n * `_isDisposed` {`boolean`} - \n\n * `_disposableListeners` {`{ target: DisposableTarget; event: string; handler: any; }[]`} - \n\n * `_connected` {`boolean`} - ",
|
|
37
37
|
"attributes": [
|
|
38
38
|
{
|
|
39
39
|
"name": "frameWidth",
|
|
@@ -432,7 +432,7 @@
|
|
|
432
432
|
},
|
|
433
433
|
{
|
|
434
434
|
"name": "spectric-input",
|
|
435
|
-
"description": "Events:\n\n * `change` {`Event`} - \n\nAttributes:\n\n * `checked` {`boolean | undefined`} - \n\n * `hidePasswordLabel` {`string`} - \"Hide password\" tooltip text on password visibility toggle\n\n * `showPasswordLabel` {`string`} - \"Show password\" tooltip text on password visibility toggle\n\n * `value` {`string | number | boolean`} - The value of the input.\n\n * `variant` {`\"number\" | \"text\" | \"text-area\" | \"color\" | \"date\" | \"datetime-local\" | \"email\" | \"file\" | \"hidden\" | \"password\" | \"checkbox\"`} - Input type\n\n * `label` {`string`} - Label to display above the input\n\n * `placeholder` {`string`} - placeholder text to display\n\n * `disabled` {`boolean`} - \n\n * `readonly` {`boolean`} - \n\n * `helperText` {`string`} - The helper text.\n\n * `invalid` {`boolean`} - Specify if the currently value is invalid.\n\n * `invalidText` {`string | TemplateResult<1
|
|
435
|
+
"description": "Events:\n\n * `change` {`Event`} - \n\nAttributes:\n\n * `checked` {`boolean | undefined`} - \n\n * `hidePasswordLabel` {`string`} - \"Hide password\" tooltip text on password visibility toggle\n\n * `showPasswordLabel` {`string`} - \"Show password\" tooltip text on password visibility toggle\n\n * `value` {`string | number | boolean`} - The value of the input.\n\n * `variant` {`\"number\" | \"text\" | \"text-area\" | \"color\" | \"date\" | \"datetime-local\" | \"email\" | \"file\" | \"hidden\" | \"password\" | \"checkbox\"`} - Input type\n\n * `label` {`string`} - Label to display above the input\n\n * `placeholder` {`string`} - placeholder text to display\n\n * `disabled` {`boolean`} - \n\n * `readonly` {`boolean`} - \n\n * `helperText` {`string`} - The helper text.\n\n * `invalid` {`boolean`} - Specify if the currently value is invalid.\n\n * `invalidText` {`string | TemplateResult<1> | undefined`} - Message which is displayed if the value is invalid.\n\n * `maxCount` {`number`} - Max character count allowed for input. This is needed in order for enableCounter to display\n\n * `required` {`boolean`} - Boolean property to set the required status\n\n * `showPasswordVisibilityToggle` {`boolean`} - Boolean property to render password visibility toggle\n\n * `name` {`string`} - Name for the input used for form data events //TODO make sure this works\n\n * `pattern` {`string`} - Pattern to validate the input against for HTML validity checking\n\n * `autocomplete` {`AutoFill`} - The sets the autocomplete for the input.\n\nProperties:\n\n * `checked` {`boolean | undefined`} - \n\n * `size` {`\"large\" | \"medium\" | \"small\" | \"xsmall\" | \"xxsmall\" | \"tiny\" | undefined`} - \n\n * `hidePasswordLabel` {`string`} - \"Hide password\" tooltip text on password visibility toggle\n\n * `showPasswordLabel` {`string`} - \"Show password\" tooltip text on password visibility toggle\n\n * `_value` {`string | number | boolean`} - The internal value.\n\n * `_showPassword` {`boolean`} - \n\n * `selectionStart` {`number | null`} - \n\n * `value` {`string | number | boolean`} - The value of the input.\n\n * `_handleInput` - Handles `oninput` event on the `<input>`.\n\n * `_input` {`HTMLInputElement | undefined`} - The underlying input element\n\n * `handleTogglePasswordVisibility` - \n\n * `variant` {`\"number\" | \"text\" | \"text-area\" | \"color\" | \"date\" | \"datetime-local\" | \"email\" | \"file\" | \"hidden\" | \"password\" | \"checkbox\"`} - Input type\n\n * `label` {`string`} - Label to display above the input\n\n * `placeholder` {`string`} - placeholder text to display\n\n * `disabled` {`boolean`} - \n\n * `readonly` {`boolean`} - \n\n * `helperText` {`string`} - The helper text.\n\n * `invalid` {`boolean`} - Specify if the currently value is invalid.\n\n * `invalidText` {`string | TemplateResult<1> | undefined`} - Message which is displayed if the value is invalid.\n\n * `maxCount` {`number`} - Max character count allowed for input. This is needed in order for enableCounter to display\n\n * `required` {`boolean`} - Boolean property to set the required status\n\n * `showPasswordVisibilityToggle` {`boolean`} - Boolean property to render password visibility toggle\n\n * `name` {`string`} - Name for the input used for form data events //TODO make sure this works\n\n * `pattern` {`string`} - Pattern to validate the input against for HTML validity checking\n\n * `autocomplete` {`AutoFill`} - The sets the autocomplete for the input.",
|
|
436
436
|
"attributes": [
|
|
437
437
|
{
|
|
438
438
|
"name": "checked",
|
|
@@ -520,7 +520,7 @@
|
|
|
520
520
|
},
|
|
521
521
|
{
|
|
522
522
|
"name": "invalidText",
|
|
523
|
-
"description": "`invalidText` {`string | TemplateResult<1
|
|
523
|
+
"description": "`invalidText` {`string | TemplateResult<1> | undefined`} - Message which is displayed if the value is invalid.\n\nProperty: invalidText\n\nDefault: ",
|
|
524
524
|
"values": []
|
|
525
525
|
},
|
|
526
526
|
{
|
|
@@ -547,7 +547,7 @@
|
|
|
547
547
|
},
|
|
548
548
|
{
|
|
549
549
|
"name": "autocomplete",
|
|
550
|
-
"description": "`autocomplete` {`AutoFill`} - The sets the autocomplete for the input.\n\nProperty: autocomplete\n\nDefault: ",
|
|
550
|
+
"description": "`autocomplete` {`AutoFill`} - The sets the autocomplete for the input.\n\nProperty: autocomplete\n\nDefault: off",
|
|
551
551
|
"values": [
|
|
552
552
|
{
|
|
553
553
|
"name": ""
|
|
@@ -1955,7 +1955,7 @@
|
|
|
1955
1955
|
},
|
|
1956
1956
|
{
|
|
1957
1957
|
"name": "spectric-splitview",
|
|
1958
|
-
"description": "Split view will take a container and split it horizontally or vertically. This element can only have two children.\nIf you supply the **id** attribute on the split view element it will save and load the state keeping the user defined position\n\nEvents:\n\n * `change` {`CustomEvent<SplitViewProps>`} - CustomEvent\\<SplitViewProps\\> Fired every time there is a change to the split percentage\n\nSlots:\n\n * ` ` {} - Element can only take 2 HTMLElements.\n\nAttributes:\n\n * `orientation` {`Orientations`} - Controls the orientation of the splitter handle\n\n * `percentage` {`number | undefined`} - the percentage to split the view default: 50\n\n * `invisible` {`boolean | undefined`} - Should the splitter handle be invisible?\n\n * `min` {`number`} - Clamps the minimum split percentage default: 10\n\n * `max` {`number`} - Clamps the maximum split percentage default: 90\n\n * `useSavedState` {`boolean | undefined`} - save and load split state to localstorage splitter must have an id attribute default: true\n\nProperties:\n\n * `styles` {`CSSResult`} - \n\n * `isDragging` {`boolean`} - \n\n * `_error` {`string | false`} - \n\n * `_splitter` {`Promise<HTMLElement>`} - \n\n * `_panel1` {`HTMLSlotElement`} - \n\n * `_panel2` {`HTMLSlotElement`} - \n\n * `_emitChange` - \n\n * `_onMouseMove` - \n\n * `_assignSlot` - \n\n * `orientation` {`Orientations`} - Controls the orientation of the splitter handle\n\n * `percentage` {`number | undefined`} - the percentage to split the view default: 50\n\n * `invisible` {`boolean | undefined`} - Should the splitter handle be invisible?\n\n * `min` {`number`} - Clamps the minimum split percentage default: 10\n\n * `max` {`number`} - Clamps the maximum split percentage default: 90\n\n * `useSavedState` {`boolean | undefined`} - save and load split state to localstorage splitter must have an id attribute default: true\n\n * `_disposables` {`Set<IDisposable>`} - \n\n * `_isDisposed` {`boolean`} - \n\n * `_disposableListeners` {`{ target:
|
|
1958
|
+
"description": "Split view will take a container and split it horizontally or vertically. This element can only have two children.\nIf you supply the **id** attribute on the split view element it will save and load the state keeping the user defined position\n\nEvents:\n\n * `change` {`CustomEvent<SplitViewProps>`} - CustomEvent\\<SplitViewProps\\> Fired every time there is a change to the split percentage\n\nSlots:\n\n * ` ` {} - Element can only take 2 HTMLElements.\n\nAttributes:\n\n * `orientation` {`Orientations`} - Controls the orientation of the splitter handle\n\n * `percentage` {`number | undefined`} - the percentage to split the view default: 50\n\n * `invisible` {`boolean | undefined`} - Should the splitter handle be invisible?\n\n * `min` {`number`} - Clamps the minimum split percentage default: 10\n\n * `max` {`number`} - Clamps the maximum split percentage default: 90\n\n * `useSavedState` {`boolean | undefined`} - save and load split state to localstorage splitter must have an id attribute default: true\n\nProperties:\n\n * `styles` {`CSSResult`} - \n\n * `isDragging` {`boolean`} - \n\n * `_error` {`string | false`} - \n\n * `_splitter` {`Promise<HTMLElement>`} - \n\n * `_panel1` {`HTMLSlotElement`} - \n\n * `_panel2` {`HTMLSlotElement`} - \n\n * `_emitChange` - \n\n * `_onMouseMove` - \n\n * `_assignSlot` - \n\n * `orientation` {`Orientations`} - Controls the orientation of the splitter handle\n\n * `percentage` {`number | undefined`} - the percentage to split the view default: 50\n\n * `invisible` {`boolean | undefined`} - Should the splitter handle be invisible?\n\n * `min` {`number`} - Clamps the minimum split percentage default: 10\n\n * `max` {`number`} - Clamps the maximum split percentage default: 90\n\n * `useSavedState` {`boolean | undefined`} - save and load split state to localstorage splitter must have an id attribute default: true\n\n * `_disposables` {`Set<IDisposable>`} - \n\n * `_isDisposed` {`boolean`} - \n\n * `_disposableListeners` {`{ target: DisposableTarget; event: string; handler: any; }[]`} - \n\n * `_connected` {`boolean`} - ",
|
|
1959
1959
|
"attributes": [
|
|
1960
1960
|
{
|
|
1961
1961
|
"name": "orientation",
|
|
@@ -2005,7 +2005,7 @@
|
|
|
2005
2005
|
},
|
|
2006
2006
|
{
|
|
2007
2007
|
"name": "spectric-table-cell",
|
|
2008
|
-
"description": "Pagination Element\n\nEvents:\n\n * `filter` {`CustomEvent<FilterEvent<T>>`} - \n\nProperties:\n\n * `columns` {`ColumnSettings<T>[]`} - \n\n * `table` {`TableElement<T>`} - \n\n * `td` {`HTMLTableCellElement`} - \n\n * `_handleFilterOut` - \n\n * `_handleFilterFor` - \n\n * `styleRules` {`CSSStyleDeclaration`} - \n\n * `column` {`ColumnSettings<T>`} - \n\n * `row` {`T`} - ",
|
|
2008
|
+
"description": "Pagination Element\n\nEvents:\n\n * `filter` {`CustomEvent<FilterEvent<T>>`} - \n\nProperties:\n\n * `index` {`number`} - \n\n * `columns` {`ColumnSettings<T>[]`} - \n\n * `table` {`TableElement<T>`} - \n\n * `td` {`HTMLTableCellElement`} - \n\n * `_handleFilterOut` - \n\n * `_handleFilterFor` - \n\n * `styleRules` {`CSSStyleDeclaration`} - \n\n * `column` {`ColumnSettings<T>`} - \n\n * `row` {`T`} - ",
|
|
2009
2009
|
"attributes": [
|
|
2010
2010
|
{
|
|
2011
2011
|
"name": "onfilter",
|
|
@@ -2025,7 +2025,7 @@
|
|
|
2025
2025
|
},
|
|
2026
2026
|
{
|
|
2027
2027
|
"name": "spectric-table",
|
|
2028
|
-
"description": "React example\n<iframe width=\"100%\" height=\"400px\" src=\"https://stackblitz.com/edit/react-ts-2ue7azag?ctl=1&embed=1&file=App.tsx&hideExplorer=1&hideNavigation=1\"/>\n\nEvents:\n\n * `change` {`CustomEvent<TableDataOptions<T>>`} - \n\n * `filter` {`CustomEvent<FilterEvent<T>>`} - \n\n * `selected` {`CustomEvent<T[]>`} - \n\nAttributes:\n\n * `select` {`\"none\" | \"multi\" | \"single\"`} - \n\n * `sort` {`\"multi\" | \"single\"`} - \n\nProperties:\n\n * `_handlePaginationChange` - \n\n * `_handleSortChange` - \n\n * `_emitChange` - \n\n * `__DO_NOT_USE_filter` - \n\n * `selected` {`T[]`} - \n\n * `_handleSelectAllChange` - \n\n * `data` {`T[]`} - \n\n * `select` {`\"none\" | \"multi\" | \"single\"`} - \n\n * `sort` {`\"multi\" | \"single\"`} - \n\n * `pagination` {`PaginationProps | undefined`} - \n\n * `columns` {`ColumnSettings<T>[]`} - ",
|
|
2028
|
+
"description": "React example\n<iframe width=\"100%\" height=\"400px\" src=\"https://stackblitz.com/edit/react-ts-2ue7azag?ctl=1&embed=1&file=App.tsx&hideExplorer=1&hideNavigation=1\"/>\n\nEvents:\n\n * `change` {`CustomEvent<TableDataOptions<T>>`} - \n\n * `filter` {`CustomEvent<FilterEvent<T>>`} - \n\n * `selected` {`CustomEvent<T[]>`} - \n\nAttributes:\n\n * `select` {`\"none\" | \"multi\" | \"single\"`} - \n\n * `sort` {`\"multi\" | \"single\"`} - \n\n * `rowHeight` {`number`} - Needed for virtualization\n\nProperties:\n\n * `_handlePaginationChange` - \n\n * `_handleSortChange` - \n\n * `_emitChange` - \n\n * `__DO_NOT_USE_filter` - \n\n * `selected` {`T[]`} - \n\n * `_handleSelectAllChange` - \n\n * `data` {`T[]`} - \n\n * `select` {`\"none\" | \"multi\" | \"single\"`} - \n\n * `sort` {`\"multi\" | \"single\"`} - \n\n * `rowHeight` {`number`} - Needed for virtualization\n\n * `pagination` {`PaginationProps | undefined`} - \n\n * `columns` {`ColumnSettings<T>[]`} - ",
|
|
2029
2029
|
"attributes": [
|
|
2030
2030
|
{
|
|
2031
2031
|
"name": "select",
|
|
@@ -2054,6 +2054,10 @@
|
|
|
2054
2054
|
}
|
|
2055
2055
|
]
|
|
2056
2056
|
},
|
|
2057
|
+
{
|
|
2058
|
+
"name": "rowHeight",
|
|
2059
|
+
"description": "`rowHeight` {`number`} - Needed for virtualization\n\nProperty: rowHeight\n\nDefault: 25"
|
|
2060
|
+
},
|
|
2057
2061
|
{
|
|
2058
2062
|
"name": "onchange",
|
|
2059
2063
|
"description": "`change` {`CustomEvent<TableDataOptions<T>>`} - "
|
|
@@ -2068,9 +2072,19 @@
|
|
|
2068
2072
|
}
|
|
2069
2073
|
]
|
|
2070
2074
|
},
|
|
2075
|
+
{
|
|
2076
|
+
"name": "spectric-table-virtual-body",
|
|
2077
|
+
"description": "Table Body Element\n\nAttributes:\n\n * `startIndex` {`number`} - \n\nProperties:\n\n * `startIndex` {`number`} - \n\n * `table` {`TableElement<T>`} - \n\n * `columns` {`ColumnSettings<T>[]`} - \n\n * `data` {`T[]`} - \n\n * `rowHeight` {`number`} - \n\n * `_disposables` {`Set<IDisposable>`} - \n\n * `_isDisposed` {`boolean`} - \n\n * `_disposableListeners` {`{ target: DisposableTarget; event: string; handler: any; }[]`} - \n\n * `_connected` {`boolean`} - ",
|
|
2078
|
+
"attributes": [
|
|
2079
|
+
{
|
|
2080
|
+
"name": "startIndex",
|
|
2081
|
+
"description": "`startIndex` {`number`} - \n\nProperty: startIndex\n\nDefault: 0"
|
|
2082
|
+
}
|
|
2083
|
+
]
|
|
2084
|
+
},
|
|
2071
2085
|
{
|
|
2072
2086
|
"name": "spectric-tooltip",
|
|
2073
|
-
"description": "Spectric tooltip will add a tooltip to any container\n\nAttributes:\n\n * `delay` {`number`} - How long you need to hover before the tooltip displays\n\n * `animationDuration` {`number`} - How long the fade in animation should run\n\n * `text` {`DomRenderable`} - Tooltip contents\n\n * `position` {`\"top\" | \"bottom\" | \"left\" | \"right\" | \"mouse\"`} - Where to anchor the tooltip\n\n * `maxWidth` {`number | undefined`} - Sets a max width for the contents
|
|
2087
|
+
"description": "Spectric tooltip will add a tooltip to any container\n\nAttributes:\n\n * `delay` {`number`} - How long you need to hover before the tooltip displays\n\n * `animationDuration` {`number`} - How long the fade in animation should run\n\n * `text` {`DomRenderable`} - Tooltip contents\n\n * `position` {`\"top\" | \"bottom\" | \"left\" | \"right\" | \"mouse\"`} - Where to anchor the tooltip\n\n * `maxWidth` {`number | undefined`} - Sets a max width for the contents you can disable this by setting to 0 or -1\n\nProperties:\n\n * `portalElement` {`HTMLDivElement`} - \n\n * `mouseLocation` {`{ left: number; top: number; } | undefined`} - \n\n * `styles` {`CSSResultGroup | undefined`} - \n\n * `timer` {`number | undefined`} - \n\n * `open` {`boolean`} - \n\n * `mouseframe` {`number | undefined`} - \n\n * `target` {`HTMLElement`} - \n\n * `_getMousePosition` - \n\n * `_hideTooltip` - \n\n * `showToolTip` - \n\n * `applyStyle` - \n\n * `positionTooltip` - \n\n * `delay` {`number`} - How long you need to hover before the tooltip displays\n\n * `animationDuration` {`number`} - How long the fade in animation should run\n\n * `text` {`DomRenderable`} - Tooltip contents\n\n * `position` {`\"top\" | \"bottom\" | \"left\" | \"right\" | \"mouse\"`} - Where to anchor the tooltip\n\n * `maxWidth` {`number | undefined`} - Sets a max width for the contents you can disable this by setting to 0 or -1\n\n * `portalTarget` {`HTMLElement`} - Container the tool tip will be attached to.\n\n * `triggerTarget` {`HTMLElement`} - The element that triggers the tooltip. This is used for special cases like in the shadow dom if you want to target a host element instead of the immediate parent element\n\n * `_disposables` {`Set<IDisposable>`} - \n\n * `_isDisposed` {`boolean`} - \n\n * `_disposableListeners` {`{ target: DisposableTarget; event: string; handler: any; }[]`} - \n\n * `_connected` {`boolean`} - ",
|
|
2074
2088
|
"attributes": [
|
|
2075
2089
|
{
|
|
2076
2090
|
"name": "delay",
|
|
@@ -2108,7 +2122,7 @@
|
|
|
2108
2122
|
},
|
|
2109
2123
|
{
|
|
2110
2124
|
"name": "maxWidth",
|
|
2111
|
-
"description": "`maxWidth` {`number | undefined`} - Sets a max width for the contents
|
|
2125
|
+
"description": "`maxWidth` {`number | undefined`} - Sets a max width for the contents you can disable this by setting to 0 or -1\n\nProperty: maxWidth\n\nDefault: 300",
|
|
2112
2126
|
"values": []
|
|
2113
2127
|
}
|
|
2114
2128
|
]
|