@haiilo/catalyst 0.15.2 → 1.0.1
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.css +2 -2
- package/dist/catalyst/catalyst.esm.js +1 -1
- package/dist/catalyst/catalyst.esm.js.map +1 -1
- package/dist/catalyst/index.cdn.js +7 -17
- package/dist/catalyst/index.esm.js +1 -1
- package/dist/catalyst/p-081aece8.entry.js +10 -0
- package/dist/catalyst/p-081aece8.entry.js.map +1 -0
- package/dist/catalyst/p-10b0d7a2.js +10 -0
- package/dist/catalyst/p-10b0d7a2.js.map +1 -0
- package/dist/catalyst/{p-a255bd64.js → p-f80e3399.js} +1 -1
- package/dist/catalyst/p-f80e3399.js.map +1 -0
- package/dist/catalyst/scss/_variables.scss +4 -13
- package/dist/catalyst/scss/core/_nav.scss +1 -1
- package/dist/catalyst/scss/core/_typography.scss +20 -11
- package/dist/catalyst/scss/index.scss +0 -52
- package/dist/cjs/cat-alert_23.cjs.entry.js +7534 -0
- package/dist/cjs/cat-alert_23.cjs.entry.js.map +1 -0
- package/dist/cjs/{cat-notification-6a438ad1.js → cat-notification-bcb9fb86.js} +14 -12
- package/dist/cjs/cat-notification-bcb9fb86.js.map +1 -0
- package/dist/cjs/catalyst.cjs.js +2 -2
- package/dist/cjs/catalyst.cjs.js.map +1 -1
- package/dist/cjs/{index-c7955116.js → index-8ab22379.js} +1 -1
- package/dist/cjs/index-8ab22379.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +1 -2
- package/dist/collection/components/cat-alert/cat-alert.css +12 -13
- package/dist/collection/components/cat-badge/cat-badge.css +7 -9
- package/dist/collection/components/cat-card/cat-card.css +1 -1
- package/dist/collection/components/cat-checkbox/cat-checkbox.css +15 -1
- package/dist/collection/components/cat-input/cat-input.css +12 -1
- package/dist/collection/components/cat-radio/cat-radio.css +12 -1
- package/dist/collection/components/cat-select/cat-select.css +121 -552
- package/dist/collection/components/cat-select/cat-select.js +534 -343
- package/dist/collection/components/cat-select/cat-select.js.map +1 -1
- package/dist/collection/components/{cat-select-remote-test/cat-select-remote-test.js → cat-select-demo/cat-select-demo.js} +71 -7
- package/dist/collection/components/cat-select-demo/cat-select-demo.js.map +1 -0
- package/dist/collection/components/cat-tabs/cat-tabs.css +1 -1
- package/dist/collection/components/cat-textarea/cat-textarea.css +5 -1
- package/dist/collection/components/cat-toggle/cat-toggle.css +16 -1
- package/dist/collection/index.cdn.js +7 -17
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/scss/_variables.scss +4 -13
- package/dist/collection/scss/core/_nav.scss +1 -1
- package/dist/collection/scss/core/_typography.scss +20 -11
- package/dist/collection/scss/index.scss +0 -52
- package/dist/components/cat-alert.js +1 -1
- package/dist/components/cat-alert.js.map +1 -1
- package/dist/components/cat-avatar.js +1 -118
- package/dist/components/cat-avatar.js.map +1 -1
- package/dist/components/cat-avatar2.js +122 -0
- package/dist/components/cat-avatar2.js.map +1 -0
- package/dist/components/cat-badge.js +1 -1
- package/dist/components/cat-badge.js.map +1 -1
- package/dist/components/cat-button2.js.map +1 -1
- package/dist/components/cat-card.js +1 -1
- package/dist/components/cat-card.js.map +1 -1
- package/dist/components/cat-checkbox2.js +1 -1
- package/dist/components/cat-checkbox2.js.map +1 -1
- package/dist/components/cat-input.js +1 -1
- package/dist/components/cat-input.js.map +1 -1
- package/dist/components/cat-modal.js.map +1 -1
- package/dist/components/cat-radio.js +1 -1
- package/dist/components/cat-radio.js.map +1 -1
- package/dist/components/cat-scrollable2.js.map +1 -1
- package/dist/components/{cat-select-remote.d.ts → cat-select-demo.d.ts} +4 -4
- package/dist/components/{cat-select-remote-test.js → cat-select-demo.js} +81 -13
- package/dist/components/cat-select-demo.js.map +1 -0
- package/dist/components/cat-select.js +1 -7864
- package/dist/components/cat-select.js.map +1 -1
- package/dist/components/{cat-select-remote2.js → cat-select2.js} +26 -19
- package/dist/components/cat-select2.js.map +1 -0
- package/dist/components/cat-tabs.js +1 -1
- package/dist/components/cat-tabs.js.map +1 -1
- package/dist/components/cat-textarea.js +1 -1
- package/dist/components/cat-textarea.js.map +1 -1
- package/dist/components/cat-toast-demo.js +13 -5
- package/dist/components/cat-toast-demo.js.map +1 -1
- package/dist/components/cat-toggle.js +1 -1
- package/dist/components/cat-toggle.js.map +1 -1
- package/dist/components/first-tabbable.js +110 -12
- package/dist/components/first-tabbable.js.map +1 -1
- package/dist/components/focus-trap.esm.js +27 -10
- package/dist/components/focus-trap.esm.js.map +1 -1
- package/dist/components/index.d.ts +1 -2
- package/dist/components/index.js +1 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/loglevel.js +1 -5
- package/dist/components/loglevel.js.map +1 -1
- package/dist/esm/cat-alert_23.entry.js +7508 -0
- package/dist/esm/cat-alert_23.entry.js.map +1 -0
- package/dist/esm/{cat-notification-5b6a2cd9.js → cat-notification-8bcf6fa2.js} +15 -11
- package/dist/esm/cat-notification-8bcf6fa2.js.map +1 -0
- package/dist/esm/catalyst.js +2 -2
- package/dist/esm/catalyst.js.map +1 -1
- package/dist/esm/{index-17d2bcf3.js → index-df195301.js} +1 -1
- package/dist/esm/index-df195301.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/loader.js.map +1 -1
- package/dist/types/components/{cat-select-remote → cat-select}/autosize.d.ts +0 -0
- package/dist/types/components/cat-select/cat-select.d.ts +116 -58
- package/dist/types/components/cat-select-demo/cat-select-demo.d.ts +8 -0
- package/dist/types/components.d.ts +16 -138
- package/dist/types/index.d.ts +1 -4
- package/package.json +9 -11
- package/dist/catalyst/p-7fff102c.entry.js +0 -12
- package/dist/catalyst/p-7fff102c.entry.js.map +0 -1
- package/dist/catalyst/p-933b6a7a.js +0 -10
- package/dist/catalyst/p-933b6a7a.js.map +0 -1
- package/dist/catalyst/p-a255bd64.js.map +0 -1
- package/dist/cjs/cat-alert_24.cjs.entry.js +0 -15171
- package/dist/cjs/cat-alert_24.cjs.entry.js.map +0 -1
- package/dist/cjs/cat-notification-6a438ad1.js.map +0 -1
- package/dist/cjs/index-c7955116.js.map +0 -1
- package/dist/collection/components/cat-select-remote/cat-select-remote.css +0 -210
- package/dist/collection/components/cat-select-remote/cat-select-remote.js +0 -818
- package/dist/collection/components/cat-select-remote/cat-select-remote.js.map +0 -1
- package/dist/collection/components/cat-select-remote-test/cat-select-remote-test.js.map +0 -1
- package/dist/components/cat-select-remote-test.d.ts +0 -11
- package/dist/components/cat-select-remote-test.js.map +0 -1
- package/dist/components/cat-select-remote.js +0 -8
- package/dist/components/cat-select-remote.js.map +0 -1
- package/dist/components/cat-select-remote2.js.map +0 -1
- package/dist/esm/cat-alert_24.entry.js +0 -15144
- package/dist/esm/cat-alert_24.entry.js.map +0 -1
- package/dist/esm/cat-notification-5b6a2cd9.js.map +0 -1
- package/dist/esm/index-17d2bcf3.js.map +0 -1
- package/dist/types/components/cat-select-remote/cat-select-remote.d.ts +0 -164
- package/dist/types/components/cat-select-remote-test/cat-select-remote-test.d.ts +0 -6
|
@@ -1,11 +1,51 @@
|
|
|
1
|
+
import { Placement } from '@floating-ui/dom';
|
|
1
2
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
-
import {
|
|
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
|
+
avatar?: {
|
|
16
|
+
src?: string;
|
|
17
|
+
round?: boolean;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
3
20
|
/**
|
|
4
|
-
*
|
|
21
|
+
* @property resolve - Resolves the value of the select.
|
|
22
|
+
* @property retrieve - Retrieves the options of the select.
|
|
23
|
+
* @property render - Renders the items of the select.
|
|
5
24
|
*/
|
|
6
|
-
export
|
|
25
|
+
export interface CatSelectConnector<T extends Item = any> {
|
|
26
|
+
resolve: (ids: string[]) => Observable<T[]>;
|
|
27
|
+
retrieve: (term: string, page: number) => Observable<Page<T>>;
|
|
28
|
+
render: (item: T) => RenderInfo;
|
|
29
|
+
}
|
|
30
|
+
export interface CatSelectState {
|
|
31
|
+
term: string;
|
|
32
|
+
isOpen: boolean;
|
|
33
|
+
isLoading: boolean;
|
|
34
|
+
isResolving: boolean;
|
|
35
|
+
options: {
|
|
36
|
+
item: Item;
|
|
37
|
+
render: RenderInfo;
|
|
38
|
+
}[];
|
|
39
|
+
selection: {
|
|
40
|
+
item: Item;
|
|
41
|
+
render: RenderInfo;
|
|
42
|
+
}[];
|
|
43
|
+
activeOptionIndex: number;
|
|
44
|
+
activeSelectionIndex: number;
|
|
45
|
+
totalElements?: number;
|
|
46
|
+
}
|
|
7
47
|
/**
|
|
8
|
-
* Select lets user choose one option from an options menu. Consider using
|
|
48
|
+
* Select lets user choose one option from an options' menu. Consider using
|
|
9
49
|
* select when you have 6 or more options. Select component supports any content
|
|
10
50
|
* type.
|
|
11
51
|
*
|
|
@@ -14,97 +54,115 @@ export declare type CatSelectItem = Pick<Choice, 'label' | 'value' | 'customProp
|
|
|
14
54
|
* @part label - The label content.
|
|
15
55
|
*/
|
|
16
56
|
export declare class CatSelect {
|
|
57
|
+
private static readonly SKELETON_COUNT;
|
|
58
|
+
private static readonly DROPDOWN_OFFSET;
|
|
17
59
|
private readonly i18n;
|
|
18
60
|
private readonly id;
|
|
19
|
-
private
|
|
20
|
-
private
|
|
21
|
-
private
|
|
22
|
-
private
|
|
23
|
-
private
|
|
24
|
-
private
|
|
25
|
-
private removeElement?;
|
|
61
|
+
private dropdown?;
|
|
62
|
+
private trigger?;
|
|
63
|
+
private input?;
|
|
64
|
+
private subscription?;
|
|
65
|
+
private term$;
|
|
66
|
+
private more$;
|
|
26
67
|
hostElement: HTMLElement;
|
|
68
|
+
connector?: CatSelectConnector;
|
|
69
|
+
state: CatSelectState;
|
|
27
70
|
hasSlottedLabel: boolean;
|
|
28
71
|
/**
|
|
29
|
-
*
|
|
30
|
-
*/
|
|
31
|
-
label: string;
|
|
32
|
-
/**
|
|
33
|
-
* Visually hide the label, but still show it to assistive technologies like screen readers.
|
|
72
|
+
* Enable multiple selection.
|
|
34
73
|
*/
|
|
35
|
-
|
|
74
|
+
multiple: boolean;
|
|
36
75
|
/**
|
|
37
|
-
*
|
|
76
|
+
* The debounce time for the search.
|
|
38
77
|
*/
|
|
39
|
-
|
|
78
|
+
debounce: number;
|
|
40
79
|
/**
|
|
41
|
-
* The
|
|
80
|
+
* The placement of the select.
|
|
42
81
|
*/
|
|
43
|
-
|
|
82
|
+
placement: Placement;
|
|
44
83
|
/**
|
|
45
84
|
* The value of the select.
|
|
46
85
|
*/
|
|
47
|
-
value?:
|
|
86
|
+
value?: string | string[];
|
|
48
87
|
/**
|
|
49
|
-
*
|
|
88
|
+
* Whether the select is disabled.
|
|
50
89
|
*/
|
|
51
90
|
disabled: boolean;
|
|
52
91
|
/**
|
|
53
|
-
*
|
|
92
|
+
* The placeholder text to display within the select.
|
|
54
93
|
*/
|
|
55
|
-
|
|
94
|
+
placeholder?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Optional hint text(s) to be displayed with the select.
|
|
97
|
+
*/
|
|
98
|
+
hint?: string | string[];
|
|
56
99
|
/**
|
|
57
|
-
* The
|
|
100
|
+
* The label for the select.
|
|
58
101
|
*/
|
|
59
|
-
|
|
102
|
+
label: string;
|
|
60
103
|
/**
|
|
61
|
-
*
|
|
62
|
-
* input. By default, if there is not enough space within the window the
|
|
63
|
-
* dropdown will appear above the input, otherwise below it.
|
|
104
|
+
* The name of the form control. Submitted with the form as part of a name/value pair.
|
|
64
105
|
*/
|
|
65
|
-
|
|
106
|
+
name: string;
|
|
66
107
|
/**
|
|
67
|
-
*
|
|
108
|
+
* Visually hide the label, but still show it to assistive technologies like screen readers.
|
|
68
109
|
*/
|
|
69
|
-
|
|
110
|
+
labelHidden: boolean;
|
|
70
111
|
/**
|
|
71
|
-
*
|
|
112
|
+
* A value is required or must be checked for the form to be submittable.
|
|
72
113
|
*/
|
|
73
|
-
|
|
114
|
+
required: boolean;
|
|
74
115
|
/**
|
|
75
|
-
*
|
|
116
|
+
* Whether the select should show a clear button.
|
|
76
117
|
*/
|
|
77
|
-
|
|
118
|
+
clearable: boolean;
|
|
119
|
+
onConnectorChange(connector: CatSelectConnector): void;
|
|
120
|
+
onStateChange(newState: CatSelectState, oldState: CatSelectState): void;
|
|
78
121
|
/**
|
|
79
|
-
* Emitted when the
|
|
122
|
+
* Emitted when the select dropdown is opened.
|
|
80
123
|
*/
|
|
81
|
-
|
|
124
|
+
catOpen: EventEmitter<FocusEvent>;
|
|
82
125
|
/**
|
|
83
|
-
* Emitted when
|
|
126
|
+
* Emitted when the select dropdown is closed.
|
|
84
127
|
*/
|
|
85
|
-
|
|
128
|
+
catClose: EventEmitter<FocusEvent>;
|
|
129
|
+
/**
|
|
130
|
+
* Emitted when the value is changed.
|
|
131
|
+
*/
|
|
132
|
+
catChange: EventEmitter;
|
|
86
133
|
/**
|
|
87
|
-
* Emitted when the select loses focus.
|
|
134
|
+
* Emitted when the select loses the focus.
|
|
88
135
|
*/
|
|
89
136
|
catBlur: EventEmitter<FocusEvent>;
|
|
90
|
-
setChoicesHandler(items: CatSelectItem[]): void;
|
|
91
|
-
setValueHandler(value?: any): void;
|
|
92
|
-
componentWillRender(): void;
|
|
93
137
|
componentDidLoad(): void;
|
|
94
|
-
|
|
138
|
+
componentWillRender(): void;
|
|
95
139
|
onBlur(event: FocusEvent): void;
|
|
140
|
+
onKeyDown(event: KeyboardEvent): void;
|
|
141
|
+
onKeyUp(event: KeyboardEvent): void;
|
|
142
|
+
/**
|
|
143
|
+
* Connect the functions of the select
|
|
144
|
+
*
|
|
145
|
+
* @param connector - The {@link CatSelectConnector} of the select.
|
|
146
|
+
*/
|
|
147
|
+
connect(connector: CatSelectConnector): Promise<void>;
|
|
96
148
|
render(): any;
|
|
97
|
-
private init;
|
|
98
149
|
private get hintSection();
|
|
99
|
-
private
|
|
100
|
-
private
|
|
101
|
-
private
|
|
102
|
-
private
|
|
103
|
-
private
|
|
104
|
-
private
|
|
105
|
-
private
|
|
106
|
-
private
|
|
107
|
-
private
|
|
108
|
-
private
|
|
109
|
-
private
|
|
150
|
+
private get connectorSafe();
|
|
151
|
+
private resolve;
|
|
152
|
+
private show;
|
|
153
|
+
private hide;
|
|
154
|
+
private search;
|
|
155
|
+
private isSelected;
|
|
156
|
+
private select;
|
|
157
|
+
private deselect;
|
|
158
|
+
private toggle;
|
|
159
|
+
private clear;
|
|
160
|
+
private reset;
|
|
161
|
+
private onClick;
|
|
162
|
+
private onInput;
|
|
163
|
+
private update;
|
|
164
|
+
private patchState;
|
|
165
|
+
private isPillboxActive;
|
|
166
|
+
private get activeDescendant();
|
|
167
|
+
private onArrowKeyDown;
|
|
110
168
|
}
|
|
@@ -8,8 +8,7 @@ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
|
8
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
|
-
import {
|
|
12
|
-
import { CatSelectRemoteConnector, Item } from "./components/cat-select-remote/cat-select-remote";
|
|
11
|
+
import { CatSelectConnector, Item } from "./components/cat-select/cat-select";
|
|
13
12
|
import { Observable } from "rxjs";
|
|
14
13
|
export namespace Components {
|
|
15
14
|
interface CatAlert {
|
|
@@ -431,61 +430,15 @@ export namespace Components {
|
|
|
431
430
|
"scrolledBuffer": number;
|
|
432
431
|
}
|
|
433
432
|
interface CatSelect {
|
|
434
|
-
/**
|
|
435
|
-
* Disable the select.
|
|
436
|
-
*/
|
|
437
|
-
"disabled": boolean;
|
|
438
|
-
/**
|
|
439
|
-
* Optional hint text(s) to be displayed with the select.
|
|
440
|
-
*/
|
|
441
|
-
"hint"?: string | string[];
|
|
442
|
-
/**
|
|
443
|
-
* The available options for the input.
|
|
444
|
-
*/
|
|
445
|
-
"items": CatSelectItem[];
|
|
446
|
-
/**
|
|
447
|
-
* The label for the select.
|
|
448
|
-
*/
|
|
449
|
-
"label": string;
|
|
450
|
-
/**
|
|
451
|
-
* Visually hide the label, but still show it to assistive technologies like screen readers.
|
|
452
|
-
*/
|
|
453
|
-
"labelHidden": boolean;
|
|
454
|
-
/**
|
|
455
|
-
* Enable multiple selection.
|
|
456
|
-
*/
|
|
457
|
-
"multiple": boolean;
|
|
458
|
-
/**
|
|
459
|
-
* The placeholder for the select.
|
|
460
|
-
*/
|
|
461
|
-
"placeholder": string;
|
|
462
|
-
/**
|
|
463
|
-
* Whether the dropdown should appear above `(top)` or below `(bottom)` the input. By default, if there is not enough space within the window the dropdown will appear above the input, otherwise below it.
|
|
464
|
-
*/
|
|
465
|
-
"position": 'auto' | 'top' | 'bottom';
|
|
466
|
-
/**
|
|
467
|
-
* A value is required or must be check for the form to be submittable.
|
|
468
|
-
*/
|
|
469
|
-
"required": boolean;
|
|
470
|
-
/**
|
|
471
|
-
* Enable search for the select.
|
|
472
|
-
*/
|
|
473
|
-
"search": boolean;
|
|
474
|
-
/**
|
|
475
|
-
* The value of the select.
|
|
476
|
-
*/
|
|
477
|
-
"value"?: any;
|
|
478
|
-
}
|
|
479
|
-
interface CatSelectRemote {
|
|
480
433
|
/**
|
|
481
434
|
* Whether the select should show a clear button.
|
|
482
435
|
*/
|
|
483
436
|
"clearable": boolean;
|
|
484
437
|
/**
|
|
485
438
|
* Connect the functions of the select
|
|
486
|
-
* @param connector - The {@link
|
|
439
|
+
* @param connector - The {@link CatSelectConnector} of the select.
|
|
487
440
|
*/
|
|
488
|
-
"connect": (connector:
|
|
441
|
+
"connect": (connector: CatSelectConnector) => Promise<void>;
|
|
489
442
|
/**
|
|
490
443
|
* The debounce time for the search.
|
|
491
444
|
*/
|
|
@@ -531,7 +484,7 @@ export namespace Components {
|
|
|
531
484
|
*/
|
|
532
485
|
"value"?: string | string[];
|
|
533
486
|
}
|
|
534
|
-
interface
|
|
487
|
+
interface CatSelectDemo {
|
|
535
488
|
}
|
|
536
489
|
interface CatSkeleton {
|
|
537
490
|
/**
|
|
@@ -760,10 +713,6 @@ export interface CatSelectCustomEvent<T> extends CustomEvent<T> {
|
|
|
760
713
|
detail: T;
|
|
761
714
|
target: HTMLCatSelectElement;
|
|
762
715
|
}
|
|
763
|
-
export interface CatSelectRemoteCustomEvent<T> extends CustomEvent<T> {
|
|
764
|
-
detail: T;
|
|
765
|
-
target: HTMLCatSelectRemoteElement;
|
|
766
|
-
}
|
|
767
716
|
export interface CatTabCustomEvent<T> extends CustomEvent<T> {
|
|
768
717
|
detail: T;
|
|
769
718
|
target: HTMLCatTabElement;
|
|
@@ -861,17 +810,11 @@ declare global {
|
|
|
861
810
|
prototype: HTMLCatSelectElement;
|
|
862
811
|
new (): HTMLCatSelectElement;
|
|
863
812
|
};
|
|
864
|
-
interface
|
|
865
|
-
}
|
|
866
|
-
var HTMLCatSelectRemoteElement: {
|
|
867
|
-
prototype: HTMLCatSelectRemoteElement;
|
|
868
|
-
new (): HTMLCatSelectRemoteElement;
|
|
869
|
-
};
|
|
870
|
-
interface HTMLCatSelectRemoteTestElement extends Components.CatSelectRemoteTest, HTMLStencilElement {
|
|
813
|
+
interface HTMLCatSelectDemoElement extends Components.CatSelectDemo, HTMLStencilElement {
|
|
871
814
|
}
|
|
872
|
-
var
|
|
873
|
-
prototype:
|
|
874
|
-
new ():
|
|
815
|
+
var HTMLCatSelectDemoElement: {
|
|
816
|
+
prototype: HTMLCatSelectDemoElement;
|
|
817
|
+
new (): HTMLCatSelectDemoElement;
|
|
875
818
|
};
|
|
876
819
|
interface HTMLCatSkeletonElement extends Components.CatSkeleton, HTMLStencilElement {
|
|
877
820
|
}
|
|
@@ -936,8 +879,7 @@ declare global {
|
|
|
936
879
|
"cat-radio-group": HTMLCatRadioGroupElement;
|
|
937
880
|
"cat-scrollable": HTMLCatScrollableElement;
|
|
938
881
|
"cat-select": HTMLCatSelectElement;
|
|
939
|
-
"cat-select-
|
|
940
|
-
"cat-select-remote-test": HTMLCatSelectRemoteTestElement;
|
|
882
|
+
"cat-select-demo": HTMLCatSelectDemoElement;
|
|
941
883
|
"cat-skeleton": HTMLCatSkeletonElement;
|
|
942
884
|
"cat-spinner": HTMLCatSpinnerElement;
|
|
943
885
|
"cat-tab": HTMLCatTabElement;
|
|
@@ -1420,68 +1362,6 @@ declare namespace LocalJSX {
|
|
|
1420
1362
|
"scrolledBuffer"?: number;
|
|
1421
1363
|
}
|
|
1422
1364
|
interface CatSelect {
|
|
1423
|
-
/**
|
|
1424
|
-
* Disable the select.
|
|
1425
|
-
*/
|
|
1426
|
-
"disabled"?: boolean;
|
|
1427
|
-
/**
|
|
1428
|
-
* Optional hint text(s) to be displayed with the select.
|
|
1429
|
-
*/
|
|
1430
|
-
"hint"?: string | string[];
|
|
1431
|
-
/**
|
|
1432
|
-
* The available options for the input.
|
|
1433
|
-
*/
|
|
1434
|
-
"items"?: CatSelectItem[];
|
|
1435
|
-
/**
|
|
1436
|
-
* The label for the select.
|
|
1437
|
-
*/
|
|
1438
|
-
"label"?: string;
|
|
1439
|
-
/**
|
|
1440
|
-
* Visually hide the label, but still show it to assistive technologies like screen readers.
|
|
1441
|
-
*/
|
|
1442
|
-
"labelHidden"?: boolean;
|
|
1443
|
-
/**
|
|
1444
|
-
* Enable multiple selection.
|
|
1445
|
-
*/
|
|
1446
|
-
"multiple"?: boolean;
|
|
1447
|
-
/**
|
|
1448
|
-
* Emitted when the select loses focus.
|
|
1449
|
-
*/
|
|
1450
|
-
"onCatBlur"?: (event: CatSelectCustomEvent<FocusEvent>) => void;
|
|
1451
|
-
/**
|
|
1452
|
-
* Emitted when the value is changed.
|
|
1453
|
-
*/
|
|
1454
|
-
"onCatChange"?: (event: CatSelectCustomEvent<any>) => void;
|
|
1455
|
-
/**
|
|
1456
|
-
* Emitted when scrolled to the bottom.
|
|
1457
|
-
*/
|
|
1458
|
-
"onCatScrolledBottom"?: (event: CatSelectCustomEvent<any>) => void;
|
|
1459
|
-
/**
|
|
1460
|
-
* Emitted when the search is triggered.
|
|
1461
|
-
*/
|
|
1462
|
-
"onCatSearch"?: (event: CatSelectCustomEvent<any>) => void;
|
|
1463
|
-
/**
|
|
1464
|
-
* The placeholder for the select.
|
|
1465
|
-
*/
|
|
1466
|
-
"placeholder"?: string;
|
|
1467
|
-
/**
|
|
1468
|
-
* Whether the dropdown should appear above `(top)` or below `(bottom)` the input. By default, if there is not enough space within the window the dropdown will appear above the input, otherwise below it.
|
|
1469
|
-
*/
|
|
1470
|
-
"position"?: 'auto' | 'top' | 'bottom';
|
|
1471
|
-
/**
|
|
1472
|
-
* A value is required or must be check for the form to be submittable.
|
|
1473
|
-
*/
|
|
1474
|
-
"required"?: boolean;
|
|
1475
|
-
/**
|
|
1476
|
-
* Enable search for the select.
|
|
1477
|
-
*/
|
|
1478
|
-
"search"?: boolean;
|
|
1479
|
-
/**
|
|
1480
|
-
* The value of the select.
|
|
1481
|
-
*/
|
|
1482
|
-
"value"?: any;
|
|
1483
|
-
}
|
|
1484
|
-
interface CatSelectRemote {
|
|
1485
1365
|
/**
|
|
1486
1366
|
* Whether the select should show a clear button.
|
|
1487
1367
|
*/
|
|
@@ -1517,19 +1397,19 @@ declare namespace LocalJSX {
|
|
|
1517
1397
|
/**
|
|
1518
1398
|
* Emitted when the select loses the focus.
|
|
1519
1399
|
*/
|
|
1520
|
-
"onCatBlur"?: (event:
|
|
1400
|
+
"onCatBlur"?: (event: CatSelectCustomEvent<FocusEvent>) => void;
|
|
1521
1401
|
/**
|
|
1522
1402
|
* Emitted when the value is changed.
|
|
1523
1403
|
*/
|
|
1524
|
-
"onCatChange"?: (event:
|
|
1404
|
+
"onCatChange"?: (event: CatSelectCustomEvent<any>) => void;
|
|
1525
1405
|
/**
|
|
1526
1406
|
* Emitted when the select dropdown is closed.
|
|
1527
1407
|
*/
|
|
1528
|
-
"onCatClose"?: (event:
|
|
1408
|
+
"onCatClose"?: (event: CatSelectCustomEvent<FocusEvent>) => void;
|
|
1529
1409
|
/**
|
|
1530
1410
|
* Emitted when the select dropdown is opened.
|
|
1531
1411
|
*/
|
|
1532
|
-
"onCatOpen"?: (event:
|
|
1412
|
+
"onCatOpen"?: (event: CatSelectCustomEvent<FocusEvent>) => void;
|
|
1533
1413
|
/**
|
|
1534
1414
|
* The placeholder text to display within the select.
|
|
1535
1415
|
*/
|
|
@@ -1547,7 +1427,7 @@ declare namespace LocalJSX {
|
|
|
1547
1427
|
*/
|
|
1548
1428
|
"value"?: string | string[];
|
|
1549
1429
|
}
|
|
1550
|
-
interface
|
|
1430
|
+
interface CatSelectDemo {
|
|
1551
1431
|
}
|
|
1552
1432
|
interface CatSkeleton {
|
|
1553
1433
|
/**
|
|
@@ -1776,8 +1656,7 @@ declare namespace LocalJSX {
|
|
|
1776
1656
|
"cat-radio-group": CatRadioGroup;
|
|
1777
1657
|
"cat-scrollable": CatScrollable;
|
|
1778
1658
|
"cat-select": CatSelect;
|
|
1779
|
-
"cat-select-
|
|
1780
|
-
"cat-select-remote-test": CatSelectRemoteTest;
|
|
1659
|
+
"cat-select-demo": CatSelectDemo;
|
|
1781
1660
|
"cat-skeleton": CatSkeleton;
|
|
1782
1661
|
"cat-spinner": CatSpinner;
|
|
1783
1662
|
"cat-tab": CatTab;
|
|
@@ -1806,8 +1685,7 @@ declare module "@stencil/core" {
|
|
|
1806
1685
|
"cat-radio-group": LocalJSX.CatRadioGroup & JSXBase.HTMLAttributes<HTMLCatRadioGroupElement>;
|
|
1807
1686
|
"cat-scrollable": LocalJSX.CatScrollable & JSXBase.HTMLAttributes<HTMLCatScrollableElement>;
|
|
1808
1687
|
"cat-select": LocalJSX.CatSelect & JSXBase.HTMLAttributes<HTMLCatSelectElement>;
|
|
1809
|
-
"cat-select-
|
|
1810
|
-
"cat-select-remote-test": LocalJSX.CatSelectRemoteTest & JSXBase.HTMLAttributes<HTMLCatSelectRemoteTestElement>;
|
|
1688
|
+
"cat-select-demo": LocalJSX.CatSelectDemo & JSXBase.HTMLAttributes<HTMLCatSelectDemoElement>;
|
|
1811
1689
|
"cat-skeleton": LocalJSX.CatSkeleton & JSXBase.HTMLAttributes<HTMLCatSkeletonElement>;
|
|
1812
1690
|
"cat-spinner": LocalJSX.CatSpinner & JSXBase.HTMLAttributes<HTMLCatSpinnerElement>;
|
|
1813
1691
|
"cat-tab": LocalJSX.CatTab & JSXBase.HTMLAttributes<HTMLCatTabElement>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,7 +2,4 @@ export { Components, JSX } from './components';
|
|
|
2
2
|
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
|
-
export {
|
|
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';
|
|
5
|
+
export { CatSelectConnector, Item, Page, RenderInfo } from './components/cat-select/cat-select';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haiilo/catalyst",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Catalyst Design System",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -43,16 +43,14 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@floating-ui/dom": "0.4.1",
|
|
46
|
-
"@haiilo/catalyst-tokens": "0.
|
|
46
|
+
"@haiilo/catalyst-tokens": "1.0.1",
|
|
47
47
|
"@stencil/core": "2.17.0",
|
|
48
48
|
"autosize": "5.0.1",
|
|
49
49
|
"autosize-input": "^1.0.2",
|
|
50
|
-
"
|
|
51
|
-
"focus-trap": "6.8.1",
|
|
50
|
+
"focus-trap": "7.0.0",
|
|
52
51
|
"loglevel": "1.8.0",
|
|
53
52
|
"sanitize.css": "13.0.0",
|
|
54
|
-
"
|
|
55
|
-
"toastify-js": "1.11.2"
|
|
53
|
+
"toastify-js": "1.12.0"
|
|
56
54
|
},
|
|
57
55
|
"devDependencies": {
|
|
58
56
|
"@babel/core": "^7.16.5",
|
|
@@ -64,19 +62,19 @@
|
|
|
64
62
|
"@types/autosize": "^4.0.1",
|
|
65
63
|
"@types/jest": "^27.4.0",
|
|
66
64
|
"@types/toastify-js": "^1.11.0",
|
|
67
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
68
|
-
"@typescript-eslint/parser": "^5.
|
|
65
|
+
"@typescript-eslint/eslint-plugin": "^5.36.2",
|
|
66
|
+
"@typescript-eslint/parser": "^5.36.2",
|
|
69
67
|
"babel-loader": "^8.2.3",
|
|
70
|
-
"eslint": "^8.
|
|
68
|
+
"eslint": "^8.23.0",
|
|
71
69
|
"eslint-config-prettier": "^8.3.0",
|
|
72
70
|
"jest": "^27.5.1",
|
|
73
71
|
"jest-cli": "^27.5.1",
|
|
74
72
|
"prettier": "^2.7.1",
|
|
75
73
|
"puppeteer": "^13.5.2",
|
|
76
74
|
"rxjs": "^7.5.5",
|
|
77
|
-
"stylelint": "^14.
|
|
75
|
+
"stylelint": "^14.11.0",
|
|
78
76
|
"stylelint-config-prettier-scss": "^0.0.1",
|
|
79
|
-
"stylelint-config-standard-scss": "^
|
|
77
|
+
"stylelint-config-standard-scss": "^5.0.0",
|
|
80
78
|
"typescript": "^4.5.5"
|
|
81
79
|
}
|
|
82
80
|
}
|