@haiilo/catalyst 0.14.3 → 0.15.2
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/catalyst/catalyst.esm.js +1 -1
- package/dist/catalyst/catalyst.esm.js.map +1 -1
- package/dist/catalyst/index.cdn.js +17 -12
- package/dist/catalyst/p-7fff102c.entry.js +12 -0
- package/dist/catalyst/p-7fff102c.entry.js.map +1 -0
- package/dist/cjs/{cat-alert_22.cjs.entry.js → cat-alert_24.cjs.entry.js} +2234 -19
- package/dist/cjs/cat-alert_24.cjs.entry.js.map +1 -0
- package/dist/cjs/catalyst.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/cat-badge/cat-badge.css +5 -5
- package/dist/collection/components/cat-button/cat-button.css +4 -0
- package/dist/collection/components/cat-checkbox/cat-checkbox.css +1 -0
- package/dist/collection/components/cat-input/cat-input.css +1 -0
- package/dist/collection/components/cat-scrollable/cat-scrollable.css +0 -1
- package/dist/collection/components/cat-select-remote/cat-select-remote.css +210 -0
- package/dist/collection/components/cat-select-remote/cat-select-remote.js +818 -0
- package/dist/collection/components/cat-select-remote/cat-select-remote.js.map +1 -0
- package/dist/collection/components/cat-select-remote-test/cat-select-remote-test.js +1288 -0
- package/dist/collection/components/cat-select-remote-test/cat-select-remote-test.js.map +1 -0
- package/dist/collection/index.cdn.js +17 -12
- package/dist/collection/index.js.map +1 -1
- package/dist/components/cat-badge.js +1 -1
- package/dist/components/cat-badge.js.map +1 -1
- package/dist/components/cat-button2.js +1 -1
- package/dist/components/cat-button2.js.map +1 -1
- package/dist/components/cat-checkbox.js +1 -115
- package/dist/components/cat-checkbox.js.map +1 -1
- package/dist/components/cat-checkbox2.js +119 -0
- package/dist/components/cat-checkbox2.js.map +1 -0
- package/dist/components/cat-input.js +1 -1
- package/dist/components/cat-input.js.map +1 -1
- package/dist/components/cat-scrollable.js +1 -1355
- package/dist/components/cat-scrollable.js.map +1 -1
- package/dist/components/cat-scrollable2.js +1359 -0
- package/dist/components/cat-scrollable2.js.map +1 -0
- package/dist/components/cat-select-remote-test.d.ts +11 -0
- package/dist/components/cat-select-remote-test.js +1368 -0
- package/dist/components/cat-select-remote-test.js.map +1 -0
- package/dist/components/cat-select-remote.d.ts +11 -0
- package/dist/components/cat-select-remote.js +8 -0
- package/dist/components/cat-select-remote.js.map +1 -0
- package/dist/components/cat-select-remote2.js +987 -0
- package/dist/components/cat-select-remote2.js.map +1 -0
- package/dist/components/cat-skeleton.js +1 -71
- package/dist/components/cat-skeleton.js.map +1 -1
- package/dist/components/cat-skeleton2.js +75 -0
- package/dist/components/cat-skeleton2.js.map +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -1
- package/dist/esm/{cat-alert_22.entry.js → cat-alert_24.entry.js} +2233 -20
- package/dist/esm/cat-alert_24.entry.js.map +1 -0
- package/dist/esm/catalyst.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/cat-select-remote/autosize.d.ts +1 -0
- package/dist/types/components/cat-select-remote/cat-select-remote.d.ts +164 -0
- package/dist/types/components/cat-select-remote-test/cat-select-remote-test.d.ts +6 -0
- package/dist/types/components.d.ts +149 -0
- package/dist/types/index.d.ts +3 -0
- package/package.json +5 -4
- package/dist/catalyst/p-45547af1.entry.js +0 -12
- package/dist/catalyst/p-45547af1.entry.js.map +0 -1
- package/dist/cjs/cat-alert_22.cjs.entry.js.map +0 -1
- package/dist/esm/cat-alert_22.entry.js.map +0 -1
package/dist/esm/catalyst.js
CHANGED
|
@@ -13,7 +13,7 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["cat-
|
|
16
|
+
return bootstrapLazy([["cat-alert_24",[[1,"cat-select-remote-test"],[1,"cat-input",{"autoComplete":[1,"auto-complete"],"clearable":[4],"disabled":[4],"hint":[1],"icon":[1],"iconRight":[4,"icon-right"],"label":[1],"labelHidden":[4,"label-hidden"],"max":[8],"maxLength":[2,"max-length"],"min":[8],"minLength":[2,"min-length"],"name":[1],"placeholder":[1],"textPrefix":[1,"text-prefix"],"textSuffix":[1,"text-suffix"],"readonly":[4],"required":[4],"round":[4],"type":[1],"value":[1032],"hasSlottedLabel":[32],"setFocus":[64],"clear":[64]}],[1,"cat-modal",{"size":[1],"isVisible":[32],"show":[64]}],[1,"cat-select",{"label":[1],"labelHidden":[4,"label-hidden"],"required":[4],"items":[16],"value":[1032],"disabled":[4],"multiple":[4],"placeholder":[1],"position":[1],"search":[4],"hint":[1],"hasSlottedLabel":[32]},[[2,"blur","onBlur"]]],[1,"cat-tabs",{"activeTab":[1,"active-tab"],"tabsAlign":[1,"tabs-align"],"tabs":[32],"activeTabId":[32]},[[0,"keydown","onKeydown"]]],[0,"cat-toast-demo"],[1,"cat-alert",{"color":[1],"icon":[1],"noIcon":[4,"no-icon"]}],[1,"cat-avatar",{"size":[1],"round":[4],"label":[1],"initials":[1],"src":[1],"icon":[1],"url":[1],"urlTarget":[1,"url-target"],"backgroundImage":[32]}],[1,"cat-badge",{"variant":[1],"color":[1],"size":[1],"round":[4],"pulse":[4]}],[1,"cat-card"],[1,"cat-menu",{"placement":[1]},[[0,"catClick","clickHandler"]]],[1,"cat-radio",{"checked":[1028],"disabled":[4],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"required":[4],"value":[1],"hint":[1],"labelLeft":[4,"label-left"],"hasSlottedLabel":[32],"setFocus":[64]}],[1,"cat-radio-group",{"name":[1],"value":[1025],"disabled":[4],"a11yLabel":[1,"a11y-label"],"labelLeft":[4,"label-left"]},[[0,"keydown","onKeydown"],[0,"input","onInput"],[2,"blur","onBlur"]]],[1,"cat-tab",{"label":[513],"icon":[513],"iconOnly":[520,"icon-only"],"iconRight":[516,"icon-right"],"url":[513],"urlTarget":[513,"url-target"],"deactivated":[516]},[[0,"click","onClick"]]],[1,"cat-textarea",{"disabled":[4],"hint":[1],"label":[1],"labelHidden":[4,"label-hidden"],"maxLength":[2,"max-length"],"minLength":[2,"min-length"],"name":[1],"placeholder":[1],"readonly":[4],"required":[4],"rows":[2],"value":[1032],"hasSlottedLabel":[32],"setFocus":[64]}],[1,"cat-toggle",{"checked":[1028],"disabled":[4],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"required":[4],"value":[1032],"hint":[1],"labelLeft":[4,"label-left"],"hasSlottedLabel":[32],"setFocus":[64]}],[1,"cat-tooltip",{"content":[1],"disabled":[4],"placement":[1],"showDelay":[2,"show-delay"],"hideDelay":[2,"hide-delay"],"longTouchDuration":[2,"long-touch-duration"]},[[0,"keydown","handleKeyDown"]]],[1,"cat-select-remote",{"multiple":[4],"debounce":[2],"placement":[1],"value":[1025],"disabled":[4],"placeholder":[1],"hint":[1],"label":[1],"name":[1],"labelHidden":[4,"label-hidden"],"required":[4],"clearable":[4],"connector":[32],"state":[32],"hasSlottedLabel":[32],"connect":[64]},[[0,"blur","onBlur"],[0,"keydown","onKeyDown"],[0,"keyup","onKeyUp"]]],[1,"cat-checkbox",{"checked":[1028],"disabled":[4],"indeterminate":[4],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"required":[4],"value":[1032],"hint":[1],"labelLeft":[4,"label-left"],"hasSlottedLabel":[32],"setFocus":[64]}],[1,"cat-scrollable",{"noShadowX":[4,"no-shadow-x"],"noShadowY":[4,"no-shadow-y"],"noOverflowX":[4,"no-overflow-x"],"noOverflowY":[4,"no-overflow-y"],"noOverscroll":[4,"no-overscroll"],"noScrolledInit":[4,"no-scrolled-init"],"scrolledBuffer":[2,"scrolled-buffer"]}],[1,"cat-skeleton",{"effect":[1],"variant":[1],"size":[1],"lines":[2]}],[1,"cat-button",{"variant":[1],"color":[1],"active":[4],"size":[1],"name":[1],"value":[1],"disabled":[4],"loading":[4],"submit":[4],"noEllipsis":[4,"no-ellipsis"],"round":[4],"url":[1],"urlTarget":[1,"url-target"],"icon":[1],"iconOnly":[8,"icon-only"],"iconRight":[4,"icon-right"],"buttonId":[1,"button-id"],"a11yLabel":[1,"a11y-label"],"_iconOnly":[32],"setFocus":[64]},[[0,"click","haltDisabledEvents"]]],[1,"cat-spinner",{"size":[1],"a11yLabel":[1,"a11y-label"]}],[1,"cat-icon",{"icon":[1],"size":[1],"a11yLabel":[1,"a11y-label"]}]]]], options);
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
//# sourceMappingURL=catalyst.js.map
|
package/dist/esm/loader.js
CHANGED
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["cat-
|
|
13
|
+
return bootstrapLazy([["cat-alert_24",[[1,"cat-select-remote-test"],[1,"cat-input",{"autoComplete":[1,"auto-complete"],"clearable":[4],"disabled":[4],"hint":[1],"icon":[1],"iconRight":[4,"icon-right"],"label":[1],"labelHidden":[4,"label-hidden"],"max":[8],"maxLength":[2,"max-length"],"min":[8],"minLength":[2,"min-length"],"name":[1],"placeholder":[1],"textPrefix":[1,"text-prefix"],"textSuffix":[1,"text-suffix"],"readonly":[4],"required":[4],"round":[4],"type":[1],"value":[1032],"hasSlottedLabel":[32],"setFocus":[64],"clear":[64]}],[1,"cat-modal",{"size":[1],"isVisible":[32],"show":[64]}],[1,"cat-select",{"label":[1],"labelHidden":[4,"label-hidden"],"required":[4],"items":[16],"value":[1032],"disabled":[4],"multiple":[4],"placeholder":[1],"position":[1],"search":[4],"hint":[1],"hasSlottedLabel":[32]},[[2,"blur","onBlur"]]],[1,"cat-tabs",{"activeTab":[1,"active-tab"],"tabsAlign":[1,"tabs-align"],"tabs":[32],"activeTabId":[32]},[[0,"keydown","onKeydown"]]],[0,"cat-toast-demo"],[1,"cat-alert",{"color":[1],"icon":[1],"noIcon":[4,"no-icon"]}],[1,"cat-avatar",{"size":[1],"round":[4],"label":[1],"initials":[1],"src":[1],"icon":[1],"url":[1],"urlTarget":[1,"url-target"],"backgroundImage":[32]}],[1,"cat-badge",{"variant":[1],"color":[1],"size":[1],"round":[4],"pulse":[4]}],[1,"cat-card"],[1,"cat-menu",{"placement":[1]},[[0,"catClick","clickHandler"]]],[1,"cat-radio",{"checked":[1028],"disabled":[4],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"required":[4],"value":[1],"hint":[1],"labelLeft":[4,"label-left"],"hasSlottedLabel":[32],"setFocus":[64]}],[1,"cat-radio-group",{"name":[1],"value":[1025],"disabled":[4],"a11yLabel":[1,"a11y-label"],"labelLeft":[4,"label-left"]},[[0,"keydown","onKeydown"],[0,"input","onInput"],[2,"blur","onBlur"]]],[1,"cat-tab",{"label":[513],"icon":[513],"iconOnly":[520,"icon-only"],"iconRight":[516,"icon-right"],"url":[513],"urlTarget":[513,"url-target"],"deactivated":[516]},[[0,"click","onClick"]]],[1,"cat-textarea",{"disabled":[4],"hint":[1],"label":[1],"labelHidden":[4,"label-hidden"],"maxLength":[2,"max-length"],"minLength":[2,"min-length"],"name":[1],"placeholder":[1],"readonly":[4],"required":[4],"rows":[2],"value":[1032],"hasSlottedLabel":[32],"setFocus":[64]}],[1,"cat-toggle",{"checked":[1028],"disabled":[4],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"required":[4],"value":[1032],"hint":[1],"labelLeft":[4,"label-left"],"hasSlottedLabel":[32],"setFocus":[64]}],[1,"cat-tooltip",{"content":[1],"disabled":[4],"placement":[1],"showDelay":[2,"show-delay"],"hideDelay":[2,"hide-delay"],"longTouchDuration":[2,"long-touch-duration"]},[[0,"keydown","handleKeyDown"]]],[1,"cat-select-remote",{"multiple":[4],"debounce":[2],"placement":[1],"value":[1025],"disabled":[4],"placeholder":[1],"hint":[1],"label":[1],"name":[1],"labelHidden":[4,"label-hidden"],"required":[4],"clearable":[4],"connector":[32],"state":[32],"hasSlottedLabel":[32],"connect":[64]},[[0,"blur","onBlur"],[0,"keydown","onKeyDown"],[0,"keyup","onKeyUp"]]],[1,"cat-checkbox",{"checked":[1028],"disabled":[4],"indeterminate":[4],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"required":[4],"value":[1032],"hint":[1],"labelLeft":[4,"label-left"],"hasSlottedLabel":[32],"setFocus":[64]}],[1,"cat-scrollable",{"noShadowX":[4,"no-shadow-x"],"noShadowY":[4,"no-shadow-y"],"noOverflowX":[4,"no-overflow-x"],"noOverflowY":[4,"no-overflow-y"],"noOverscroll":[4,"no-overscroll"],"noScrolledInit":[4,"no-scrolled-init"],"scrolledBuffer":[2,"scrolled-buffer"]}],[1,"cat-skeleton",{"effect":[1],"variant":[1],"size":[1],"lines":[2]}],[1,"cat-button",{"variant":[1],"color":[1],"active":[4],"size":[1],"name":[1],"value":[1],"disabled":[4],"loading":[4],"submit":[4],"noEllipsis":[4,"no-ellipsis"],"round":[4],"url":[1],"urlTarget":[1,"url-target"],"icon":[1],"iconOnly":[8,"icon-only"],"iconRight":[4,"icon-right"],"buttonId":[1,"button-id"],"a11yLabel":[1,"a11y-label"],"_iconOnly":[32],"setFocus":[64]},[[0,"click","haltDisabledEvents"]]],[1,"cat-spinner",{"size":[1],"a11yLabel":[1,"a11y-label"]}],[1,"cat-icon",{"icon":[1],"size":[1],"a11yLabel":[1,"a11y-label"]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'autosize-input';
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { Placement } from '@floating-ui/dom';
|
|
2
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
export interface Item {
|
|
5
|
+
id: string;
|
|
6
|
+
}
|
|
7
|
+
export interface Page<T> {
|
|
8
|
+
content: T[];
|
|
9
|
+
last: boolean;
|
|
10
|
+
totalElements?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface RenderInfo {
|
|
13
|
+
label: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @property resolve - Resolves the value of the select.
|
|
18
|
+
* @property retrieve - Retrieves the options of the select.
|
|
19
|
+
* @property render - Renders the selected elements.
|
|
20
|
+
*/
|
|
21
|
+
export interface CatSelectRemoteConnector<T extends Item = any> {
|
|
22
|
+
resolve: (id: string[]) => Observable<T[]>;
|
|
23
|
+
retrieve: (term: string, page: number) => Observable<Page<T>>;
|
|
24
|
+
render: (item: T) => RenderInfo;
|
|
25
|
+
}
|
|
26
|
+
export interface CatSelectRemoteState {
|
|
27
|
+
term: string;
|
|
28
|
+
isOpen: boolean;
|
|
29
|
+
isLoading: boolean;
|
|
30
|
+
isResolving: boolean;
|
|
31
|
+
options: {
|
|
32
|
+
item: Item;
|
|
33
|
+
render: RenderInfo;
|
|
34
|
+
}[];
|
|
35
|
+
selection: {
|
|
36
|
+
item: Item;
|
|
37
|
+
render: RenderInfo;
|
|
38
|
+
}[];
|
|
39
|
+
activeOptionIndex: number;
|
|
40
|
+
activeSelectionIndex: number;
|
|
41
|
+
totalElements?: number;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Select lets user choose one option from an options' menu. Consider using
|
|
45
|
+
* select when you have 6 or more options. Select component supports any content
|
|
46
|
+
* type.
|
|
47
|
+
*
|
|
48
|
+
* @slot hint - Optional hint element to be displayed with the select.
|
|
49
|
+
* @slot label - The slotted label. If both the label property and the label slot are present, only the label slot will be displayed.
|
|
50
|
+
* @part label - The label content.
|
|
51
|
+
*/
|
|
52
|
+
export declare class CatSelectRemote {
|
|
53
|
+
private static readonly SKELETON_COUNT;
|
|
54
|
+
private static readonly DROPDOWN_OFFSET;
|
|
55
|
+
private readonly i18n;
|
|
56
|
+
private readonly id;
|
|
57
|
+
private dropdown?;
|
|
58
|
+
private trigger?;
|
|
59
|
+
private input?;
|
|
60
|
+
private subscription?;
|
|
61
|
+
private term$;
|
|
62
|
+
private more$;
|
|
63
|
+
hostElement: HTMLElement;
|
|
64
|
+
connector?: CatSelectRemoteConnector;
|
|
65
|
+
state: CatSelectRemoteState;
|
|
66
|
+
hasSlottedLabel: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Enable multiple selection.
|
|
69
|
+
*/
|
|
70
|
+
multiple: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* The debounce time for the search.
|
|
73
|
+
*/
|
|
74
|
+
debounce: number;
|
|
75
|
+
/**
|
|
76
|
+
* The placement of the select.
|
|
77
|
+
*/
|
|
78
|
+
placement: Placement;
|
|
79
|
+
/**
|
|
80
|
+
* The value of the select.
|
|
81
|
+
*/
|
|
82
|
+
value?: string | string[];
|
|
83
|
+
/**
|
|
84
|
+
* Whether the select is disabled.
|
|
85
|
+
*/
|
|
86
|
+
disabled: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* The placeholder text to display within the select.
|
|
89
|
+
*/
|
|
90
|
+
placeholder?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Optional hint text(s) to be displayed with the select.
|
|
93
|
+
*/
|
|
94
|
+
hint?: string | string[];
|
|
95
|
+
/**
|
|
96
|
+
* The label for the select.
|
|
97
|
+
*/
|
|
98
|
+
label: string;
|
|
99
|
+
/**
|
|
100
|
+
* The name of the form control. Submitted with the form as part of a name/value pair.
|
|
101
|
+
*/
|
|
102
|
+
name: string;
|
|
103
|
+
/**
|
|
104
|
+
* Visually hide the label, but still show it to assistive technologies like screen readers.
|
|
105
|
+
*/
|
|
106
|
+
labelHidden: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* A value is required or must be checked for the form to be submittable.
|
|
109
|
+
*/
|
|
110
|
+
required: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Whether the select should show a clear button.
|
|
113
|
+
*/
|
|
114
|
+
clearable: boolean;
|
|
115
|
+
onConnectorChange(connector: CatSelectRemoteConnector): void;
|
|
116
|
+
onStateChange(newState: CatSelectRemoteState, oldState: CatSelectRemoteState): void;
|
|
117
|
+
/**
|
|
118
|
+
* Emitted when the select dropdown is opened.
|
|
119
|
+
*/
|
|
120
|
+
catOpen: EventEmitter<FocusEvent>;
|
|
121
|
+
/**
|
|
122
|
+
* Emitted when the select dropdown is closed.
|
|
123
|
+
*/
|
|
124
|
+
catClose: EventEmitter<FocusEvent>;
|
|
125
|
+
/**
|
|
126
|
+
* Emitted when the value is changed.
|
|
127
|
+
*/
|
|
128
|
+
catChange: EventEmitter;
|
|
129
|
+
/**
|
|
130
|
+
* Emitted when the select loses the focus.
|
|
131
|
+
*/
|
|
132
|
+
catBlur: EventEmitter<FocusEvent>;
|
|
133
|
+
componentDidLoad(): void;
|
|
134
|
+
componentWillRender(): void;
|
|
135
|
+
onBlur(event: FocusEvent): void;
|
|
136
|
+
onKeyDown(event: KeyboardEvent): void;
|
|
137
|
+
onKeyUp(event: KeyboardEvent): void;
|
|
138
|
+
/**
|
|
139
|
+
* Connect the functions of the select
|
|
140
|
+
*
|
|
141
|
+
* @param connector - The {@link CatSelectRemoteConnector} of the select.
|
|
142
|
+
*/
|
|
143
|
+
connect(connector: CatSelectRemoteConnector): Promise<void>;
|
|
144
|
+
render(): any;
|
|
145
|
+
private get hintSection();
|
|
146
|
+
private get connectorSafe();
|
|
147
|
+
private resolve;
|
|
148
|
+
private show;
|
|
149
|
+
private hide;
|
|
150
|
+
private search;
|
|
151
|
+
private isSelected;
|
|
152
|
+
private select;
|
|
153
|
+
private deselect;
|
|
154
|
+
private toggle;
|
|
155
|
+
private clear;
|
|
156
|
+
private reset;
|
|
157
|
+
private onClick;
|
|
158
|
+
private onInput;
|
|
159
|
+
private update;
|
|
160
|
+
private patchState;
|
|
161
|
+
private isPillboxActive;
|
|
162
|
+
private get activeDescendant();
|
|
163
|
+
private onArrowKeyDown;
|
|
164
|
+
}
|
|
@@ -9,6 +9,8 @@ import { Breakpoint } from "./utils/breakpoints";
|
|
|
9
9
|
import { InputType } from "./components/cat-input/input-type";
|
|
10
10
|
import { Placement } from "@floating-ui/dom";
|
|
11
11
|
import { CatSelectItem } from "./components/cat-select/cat-select";
|
|
12
|
+
import { CatSelectRemoteConnector, Item } from "./components/cat-select-remote/cat-select-remote";
|
|
13
|
+
import { Observable } from "rxjs";
|
|
12
14
|
export namespace Components {
|
|
13
15
|
interface CatAlert {
|
|
14
16
|
/**
|
|
@@ -474,6 +476,63 @@ export namespace Components {
|
|
|
474
476
|
*/
|
|
475
477
|
"value"?: any;
|
|
476
478
|
}
|
|
479
|
+
interface CatSelectRemote {
|
|
480
|
+
/**
|
|
481
|
+
* Whether the select should show a clear button.
|
|
482
|
+
*/
|
|
483
|
+
"clearable": boolean;
|
|
484
|
+
/**
|
|
485
|
+
* Connect the functions of the select
|
|
486
|
+
* @param connector - The {@link CatSelectRemoteConnector} of the select.
|
|
487
|
+
*/
|
|
488
|
+
"connect": (connector: CatSelectRemoteConnector) => Promise<void>;
|
|
489
|
+
/**
|
|
490
|
+
* The debounce time for the search.
|
|
491
|
+
*/
|
|
492
|
+
"debounce": number;
|
|
493
|
+
/**
|
|
494
|
+
* Whether the select is disabled.
|
|
495
|
+
*/
|
|
496
|
+
"disabled": boolean;
|
|
497
|
+
/**
|
|
498
|
+
* Optional hint text(s) to be displayed with the select.
|
|
499
|
+
*/
|
|
500
|
+
"hint"?: string | string[];
|
|
501
|
+
/**
|
|
502
|
+
* The label for the select.
|
|
503
|
+
*/
|
|
504
|
+
"label": string;
|
|
505
|
+
/**
|
|
506
|
+
* Visually hide the label, but still show it to assistive technologies like screen readers.
|
|
507
|
+
*/
|
|
508
|
+
"labelHidden": boolean;
|
|
509
|
+
/**
|
|
510
|
+
* Enable multiple selection.
|
|
511
|
+
*/
|
|
512
|
+
"multiple": boolean;
|
|
513
|
+
/**
|
|
514
|
+
* The name of the form control. Submitted with the form as part of a name/value pair.
|
|
515
|
+
*/
|
|
516
|
+
"name": string;
|
|
517
|
+
/**
|
|
518
|
+
* The placeholder text to display within the select.
|
|
519
|
+
*/
|
|
520
|
+
"placeholder"?: string;
|
|
521
|
+
/**
|
|
522
|
+
* The placement of the select.
|
|
523
|
+
*/
|
|
524
|
+
"placement": Placement;
|
|
525
|
+
/**
|
|
526
|
+
* A value is required or must be checked for the form to be submittable.
|
|
527
|
+
*/
|
|
528
|
+
"required": boolean;
|
|
529
|
+
/**
|
|
530
|
+
* The value of the select.
|
|
531
|
+
*/
|
|
532
|
+
"value"?: string | string[];
|
|
533
|
+
}
|
|
534
|
+
interface CatSelectRemoteTest {
|
|
535
|
+
}
|
|
477
536
|
interface CatSkeleton {
|
|
478
537
|
/**
|
|
479
538
|
* The animation style of the skeleton.
|
|
@@ -701,6 +760,10 @@ export interface CatSelectCustomEvent<T> extends CustomEvent<T> {
|
|
|
701
760
|
detail: T;
|
|
702
761
|
target: HTMLCatSelectElement;
|
|
703
762
|
}
|
|
763
|
+
export interface CatSelectRemoteCustomEvent<T> extends CustomEvent<T> {
|
|
764
|
+
detail: T;
|
|
765
|
+
target: HTMLCatSelectRemoteElement;
|
|
766
|
+
}
|
|
704
767
|
export interface CatTabCustomEvent<T> extends CustomEvent<T> {
|
|
705
768
|
detail: T;
|
|
706
769
|
target: HTMLCatTabElement;
|
|
@@ -798,6 +861,18 @@ declare global {
|
|
|
798
861
|
prototype: HTMLCatSelectElement;
|
|
799
862
|
new (): HTMLCatSelectElement;
|
|
800
863
|
};
|
|
864
|
+
interface HTMLCatSelectRemoteElement extends Components.CatSelectRemote, HTMLStencilElement {
|
|
865
|
+
}
|
|
866
|
+
var HTMLCatSelectRemoteElement: {
|
|
867
|
+
prototype: HTMLCatSelectRemoteElement;
|
|
868
|
+
new (): HTMLCatSelectRemoteElement;
|
|
869
|
+
};
|
|
870
|
+
interface HTMLCatSelectRemoteTestElement extends Components.CatSelectRemoteTest, HTMLStencilElement {
|
|
871
|
+
}
|
|
872
|
+
var HTMLCatSelectRemoteTestElement: {
|
|
873
|
+
prototype: HTMLCatSelectRemoteTestElement;
|
|
874
|
+
new (): HTMLCatSelectRemoteTestElement;
|
|
875
|
+
};
|
|
801
876
|
interface HTMLCatSkeletonElement extends Components.CatSkeleton, HTMLStencilElement {
|
|
802
877
|
}
|
|
803
878
|
var HTMLCatSkeletonElement: {
|
|
@@ -861,6 +936,8 @@ declare global {
|
|
|
861
936
|
"cat-radio-group": HTMLCatRadioGroupElement;
|
|
862
937
|
"cat-scrollable": HTMLCatScrollableElement;
|
|
863
938
|
"cat-select": HTMLCatSelectElement;
|
|
939
|
+
"cat-select-remote": HTMLCatSelectRemoteElement;
|
|
940
|
+
"cat-select-remote-test": HTMLCatSelectRemoteTestElement;
|
|
864
941
|
"cat-skeleton": HTMLCatSkeletonElement;
|
|
865
942
|
"cat-spinner": HTMLCatSpinnerElement;
|
|
866
943
|
"cat-tab": HTMLCatTabElement;
|
|
@@ -1404,6 +1481,74 @@ declare namespace LocalJSX {
|
|
|
1404
1481
|
*/
|
|
1405
1482
|
"value"?: any;
|
|
1406
1483
|
}
|
|
1484
|
+
interface CatSelectRemote {
|
|
1485
|
+
/**
|
|
1486
|
+
* Whether the select should show a clear button.
|
|
1487
|
+
*/
|
|
1488
|
+
"clearable"?: boolean;
|
|
1489
|
+
/**
|
|
1490
|
+
* The debounce time for the search.
|
|
1491
|
+
*/
|
|
1492
|
+
"debounce"?: number;
|
|
1493
|
+
/**
|
|
1494
|
+
* Whether the select is disabled.
|
|
1495
|
+
*/
|
|
1496
|
+
"disabled"?: boolean;
|
|
1497
|
+
/**
|
|
1498
|
+
* Optional hint text(s) to be displayed with the select.
|
|
1499
|
+
*/
|
|
1500
|
+
"hint"?: string | string[];
|
|
1501
|
+
/**
|
|
1502
|
+
* The label for the select.
|
|
1503
|
+
*/
|
|
1504
|
+
"label"?: string;
|
|
1505
|
+
/**
|
|
1506
|
+
* Visually hide the label, but still show it to assistive technologies like screen readers.
|
|
1507
|
+
*/
|
|
1508
|
+
"labelHidden"?: boolean;
|
|
1509
|
+
/**
|
|
1510
|
+
* Enable multiple selection.
|
|
1511
|
+
*/
|
|
1512
|
+
"multiple"?: boolean;
|
|
1513
|
+
/**
|
|
1514
|
+
* The name of the form control. Submitted with the form as part of a name/value pair.
|
|
1515
|
+
*/
|
|
1516
|
+
"name"?: string;
|
|
1517
|
+
/**
|
|
1518
|
+
* Emitted when the select loses the focus.
|
|
1519
|
+
*/
|
|
1520
|
+
"onCatBlur"?: (event: CatSelectRemoteCustomEvent<FocusEvent>) => void;
|
|
1521
|
+
/**
|
|
1522
|
+
* Emitted when the value is changed.
|
|
1523
|
+
*/
|
|
1524
|
+
"onCatChange"?: (event: CatSelectRemoteCustomEvent<any>) => void;
|
|
1525
|
+
/**
|
|
1526
|
+
* Emitted when the select dropdown is closed.
|
|
1527
|
+
*/
|
|
1528
|
+
"onCatClose"?: (event: CatSelectRemoteCustomEvent<FocusEvent>) => void;
|
|
1529
|
+
/**
|
|
1530
|
+
* Emitted when the select dropdown is opened.
|
|
1531
|
+
*/
|
|
1532
|
+
"onCatOpen"?: (event: CatSelectRemoteCustomEvent<FocusEvent>) => void;
|
|
1533
|
+
/**
|
|
1534
|
+
* The placeholder text to display within the select.
|
|
1535
|
+
*/
|
|
1536
|
+
"placeholder"?: string;
|
|
1537
|
+
/**
|
|
1538
|
+
* The placement of the select.
|
|
1539
|
+
*/
|
|
1540
|
+
"placement"?: Placement;
|
|
1541
|
+
/**
|
|
1542
|
+
* A value is required or must be checked for the form to be submittable.
|
|
1543
|
+
*/
|
|
1544
|
+
"required"?: boolean;
|
|
1545
|
+
/**
|
|
1546
|
+
* The value of the select.
|
|
1547
|
+
*/
|
|
1548
|
+
"value"?: string | string[];
|
|
1549
|
+
}
|
|
1550
|
+
interface CatSelectRemoteTest {
|
|
1551
|
+
}
|
|
1407
1552
|
interface CatSkeleton {
|
|
1408
1553
|
/**
|
|
1409
1554
|
* The animation style of the skeleton.
|
|
@@ -1631,6 +1776,8 @@ declare namespace LocalJSX {
|
|
|
1631
1776
|
"cat-radio-group": CatRadioGroup;
|
|
1632
1777
|
"cat-scrollable": CatScrollable;
|
|
1633
1778
|
"cat-select": CatSelect;
|
|
1779
|
+
"cat-select-remote": CatSelectRemote;
|
|
1780
|
+
"cat-select-remote-test": CatSelectRemoteTest;
|
|
1634
1781
|
"cat-skeleton": CatSkeleton;
|
|
1635
1782
|
"cat-spinner": CatSpinner;
|
|
1636
1783
|
"cat-tab": CatTab;
|
|
@@ -1659,6 +1806,8 @@ declare module "@stencil/core" {
|
|
|
1659
1806
|
"cat-radio-group": LocalJSX.CatRadioGroup & JSXBase.HTMLAttributes<HTMLCatRadioGroupElement>;
|
|
1660
1807
|
"cat-scrollable": LocalJSX.CatScrollable & JSXBase.HTMLAttributes<HTMLCatScrollableElement>;
|
|
1661
1808
|
"cat-select": LocalJSX.CatSelect & JSXBase.HTMLAttributes<HTMLCatSelectElement>;
|
|
1809
|
+
"cat-select-remote": LocalJSX.CatSelectRemote & JSXBase.HTMLAttributes<HTMLCatSelectRemoteElement>;
|
|
1810
|
+
"cat-select-remote-test": LocalJSX.CatSelectRemoteTest & JSXBase.HTMLAttributes<HTMLCatSelectRemoteTestElement>;
|
|
1662
1811
|
"cat-skeleton": LocalJSX.CatSkeleton & JSXBase.HTMLAttributes<HTMLCatSkeletonElement>;
|
|
1663
1812
|
"cat-spinner": LocalJSX.CatSpinner & JSXBase.HTMLAttributes<HTMLCatSpinnerElement>;
|
|
1664
1813
|
"cat-tab": LocalJSX.CatTab & JSXBase.HTMLAttributes<HTMLCatTabElement>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,3 +3,6 @@ export { CatI18nRegistry } from './components/cat-i18n/cat-i18n-registry';
|
|
|
3
3
|
export { CatIconRegistry } from './components/cat-icon/cat-icon-registry';
|
|
4
4
|
export { NotificationsService } from './components/cat-notification/cat-notification';
|
|
5
5
|
export { CatSelectItem } from './components/cat-select/cat-select';
|
|
6
|
+
export { CatSelectRemoteConnector } from './components/cat-select-remote/cat-select-remote';
|
|
7
|
+
export { RenderInfo } from './components/cat-select-remote/cat-select-remote';
|
|
8
|
+
export { Page } from './components/cat-select-remote/cat-select-remote';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haiilo/catalyst",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.2",
|
|
4
4
|
"description": "Catalyst Design System",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -38,14 +38,15 @@
|
|
|
38
38
|
"reset": "rm -rf ./dist ./loader ./www ./node_modules"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@haiilo/catalyst-icons": ">=0.3.
|
|
41
|
+
"@haiilo/catalyst-icons": ">=0.3.10",
|
|
42
42
|
"rxjs": "^7.5.5"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@floating-ui/dom": "0.4.1",
|
|
46
|
-
"@haiilo/catalyst-tokens": "0.
|
|
46
|
+
"@haiilo/catalyst-tokens": "0.15.2",
|
|
47
47
|
"@stencil/core": "2.17.0",
|
|
48
48
|
"autosize": "5.0.1",
|
|
49
|
+
"autosize-input": "^1.0.2",
|
|
49
50
|
"choices.js": "10.1.0",
|
|
50
51
|
"focus-trap": "6.8.1",
|
|
51
52
|
"loglevel": "1.8.0",
|
|
@@ -55,7 +56,7 @@
|
|
|
55
56
|
},
|
|
56
57
|
"devDependencies": {
|
|
57
58
|
"@babel/core": "^7.16.5",
|
|
58
|
-
"@haiilo/catalyst-icons": "^0.3.
|
|
59
|
+
"@haiilo/catalyst-icons": "^0.3.10",
|
|
59
60
|
"@stencil/angular-output-target": "^0.4.0",
|
|
60
61
|
"@stencil/react-output-target": "^0.3.1",
|
|
61
62
|
"@stencil/sass": "^1.5.2",
|