@haiilo/catalyst 0.15.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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.esm.js +1 -1
- package/dist/catalyst/p-10b0d7a2.js +10 -0
- package/dist/catalyst/p-10b0d7a2.js.map +1 -0
- package/dist/catalyst/p-a7f4d284.entry.js +10 -0
- package/dist/catalyst/p-a7f4d284.entry.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_24.cjs.entry.js → cat-alert_23.cjs.entry.js} +313 -7945
- 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} +72 -8
- 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.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} +30 -18
- 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 +21 -139
- package/dist/types/index.d.ts +1 -4
- package/package.json +9 -10
- package/dist/catalyst/p-311d10a7.entry.js +0 -12
- package/dist/catalyst/p-311d10a7.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.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 -209
- package/dist/collection/components/cat-select-remote/cat-select-remote.js +0 -798
- 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 -15139
- 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 -145
- 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,57 +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
|
+
/**
|
|
438
|
+
* Connect the functions of the select
|
|
439
|
+
* @param connector - The {@link CatSelectConnector} of the select.
|
|
440
|
+
*/
|
|
441
|
+
"connect": (connector: CatSelectConnector) => Promise<void>;
|
|
485
442
|
/**
|
|
486
443
|
* The debounce time for the search.
|
|
487
444
|
*/
|
|
@@ -519,7 +476,7 @@ export namespace Components {
|
|
|
519
476
|
*/
|
|
520
477
|
"placement": Placement;
|
|
521
478
|
/**
|
|
522
|
-
* A value is required or must be
|
|
479
|
+
* A value is required or must be checked for the form to be submittable.
|
|
523
480
|
*/
|
|
524
481
|
"required": boolean;
|
|
525
482
|
/**
|
|
@@ -527,7 +484,7 @@ export namespace Components {
|
|
|
527
484
|
*/
|
|
528
485
|
"value"?: string | string[];
|
|
529
486
|
}
|
|
530
|
-
interface
|
|
487
|
+
interface CatSelectDemo {
|
|
531
488
|
}
|
|
532
489
|
interface CatSkeleton {
|
|
533
490
|
/**
|
|
@@ -756,10 +713,6 @@ export interface CatSelectCustomEvent<T> extends CustomEvent<T> {
|
|
|
756
713
|
detail: T;
|
|
757
714
|
target: HTMLCatSelectElement;
|
|
758
715
|
}
|
|
759
|
-
export interface CatSelectRemoteCustomEvent<T> extends CustomEvent<T> {
|
|
760
|
-
detail: T;
|
|
761
|
-
target: HTMLCatSelectRemoteElement;
|
|
762
|
-
}
|
|
763
716
|
export interface CatTabCustomEvent<T> extends CustomEvent<T> {
|
|
764
717
|
detail: T;
|
|
765
718
|
target: HTMLCatTabElement;
|
|
@@ -857,17 +810,11 @@ declare global {
|
|
|
857
810
|
prototype: HTMLCatSelectElement;
|
|
858
811
|
new (): HTMLCatSelectElement;
|
|
859
812
|
};
|
|
860
|
-
interface
|
|
813
|
+
interface HTMLCatSelectDemoElement extends Components.CatSelectDemo, HTMLStencilElement {
|
|
861
814
|
}
|
|
862
|
-
var
|
|
863
|
-
prototype:
|
|
864
|
-
new ():
|
|
865
|
-
};
|
|
866
|
-
interface HTMLCatSelectRemoteTestElement extends Components.CatSelectRemoteTest, HTMLStencilElement {
|
|
867
|
-
}
|
|
868
|
-
var HTMLCatSelectRemoteTestElement: {
|
|
869
|
-
prototype: HTMLCatSelectRemoteTestElement;
|
|
870
|
-
new (): HTMLCatSelectRemoteTestElement;
|
|
815
|
+
var HTMLCatSelectDemoElement: {
|
|
816
|
+
prototype: HTMLCatSelectDemoElement;
|
|
817
|
+
new (): HTMLCatSelectDemoElement;
|
|
871
818
|
};
|
|
872
819
|
interface HTMLCatSkeletonElement extends Components.CatSkeleton, HTMLStencilElement {
|
|
873
820
|
}
|
|
@@ -932,8 +879,7 @@ declare global {
|
|
|
932
879
|
"cat-radio-group": HTMLCatRadioGroupElement;
|
|
933
880
|
"cat-scrollable": HTMLCatScrollableElement;
|
|
934
881
|
"cat-select": HTMLCatSelectElement;
|
|
935
|
-
"cat-select-
|
|
936
|
-
"cat-select-remote-test": HTMLCatSelectRemoteTestElement;
|
|
882
|
+
"cat-select-demo": HTMLCatSelectDemoElement;
|
|
937
883
|
"cat-skeleton": HTMLCatSkeletonElement;
|
|
938
884
|
"cat-spinner": HTMLCatSpinnerElement;
|
|
939
885
|
"cat-tab": HTMLCatTabElement;
|
|
@@ -1416,68 +1362,6 @@ declare namespace LocalJSX {
|
|
|
1416
1362
|
"scrolledBuffer"?: number;
|
|
1417
1363
|
}
|
|
1418
1364
|
interface CatSelect {
|
|
1419
|
-
/**
|
|
1420
|
-
* Disable the select.
|
|
1421
|
-
*/
|
|
1422
|
-
"disabled"?: boolean;
|
|
1423
|
-
/**
|
|
1424
|
-
* Optional hint text(s) to be displayed with the select.
|
|
1425
|
-
*/
|
|
1426
|
-
"hint"?: string | string[];
|
|
1427
|
-
/**
|
|
1428
|
-
* The available options for the input.
|
|
1429
|
-
*/
|
|
1430
|
-
"items"?: CatSelectItem[];
|
|
1431
|
-
/**
|
|
1432
|
-
* The label for the select.
|
|
1433
|
-
*/
|
|
1434
|
-
"label"?: string;
|
|
1435
|
-
/**
|
|
1436
|
-
* Visually hide the label, but still show it to assistive technologies like screen readers.
|
|
1437
|
-
*/
|
|
1438
|
-
"labelHidden"?: boolean;
|
|
1439
|
-
/**
|
|
1440
|
-
* Enable multiple selection.
|
|
1441
|
-
*/
|
|
1442
|
-
"multiple"?: boolean;
|
|
1443
|
-
/**
|
|
1444
|
-
* Emitted when the select loses focus.
|
|
1445
|
-
*/
|
|
1446
|
-
"onCatBlur"?: (event: CatSelectCustomEvent<FocusEvent>) => void;
|
|
1447
|
-
/**
|
|
1448
|
-
* Emitted when the value is changed.
|
|
1449
|
-
*/
|
|
1450
|
-
"onCatChange"?: (event: CatSelectCustomEvent<any>) => void;
|
|
1451
|
-
/**
|
|
1452
|
-
* Emitted when scrolled to the bottom.
|
|
1453
|
-
*/
|
|
1454
|
-
"onCatScrolledBottom"?: (event: CatSelectCustomEvent<any>) => void;
|
|
1455
|
-
/**
|
|
1456
|
-
* Emitted when the search is triggered.
|
|
1457
|
-
*/
|
|
1458
|
-
"onCatSearch"?: (event: CatSelectCustomEvent<any>) => void;
|
|
1459
|
-
/**
|
|
1460
|
-
* The placeholder for the select.
|
|
1461
|
-
*/
|
|
1462
|
-
"placeholder"?: string;
|
|
1463
|
-
/**
|
|
1464
|
-
* 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.
|
|
1465
|
-
*/
|
|
1466
|
-
"position"?: 'auto' | 'top' | 'bottom';
|
|
1467
|
-
/**
|
|
1468
|
-
* A value is required or must be check for the form to be submittable.
|
|
1469
|
-
*/
|
|
1470
|
-
"required"?: boolean;
|
|
1471
|
-
/**
|
|
1472
|
-
* Enable search for the select.
|
|
1473
|
-
*/
|
|
1474
|
-
"search"?: boolean;
|
|
1475
|
-
/**
|
|
1476
|
-
* The value of the select.
|
|
1477
|
-
*/
|
|
1478
|
-
"value"?: any;
|
|
1479
|
-
}
|
|
1480
|
-
interface CatSelectRemote {
|
|
1481
1365
|
/**
|
|
1482
1366
|
* Whether the select should show a clear button.
|
|
1483
1367
|
*/
|
|
@@ -1513,19 +1397,19 @@ declare namespace LocalJSX {
|
|
|
1513
1397
|
/**
|
|
1514
1398
|
* Emitted when the select loses the focus.
|
|
1515
1399
|
*/
|
|
1516
|
-
"onCatBlur"?: (event:
|
|
1400
|
+
"onCatBlur"?: (event: CatSelectCustomEvent<FocusEvent>) => void;
|
|
1517
1401
|
/**
|
|
1518
1402
|
* Emitted when the value is changed.
|
|
1519
1403
|
*/
|
|
1520
|
-
"onCatChange"?: (event:
|
|
1404
|
+
"onCatChange"?: (event: CatSelectCustomEvent<any>) => void;
|
|
1521
1405
|
/**
|
|
1522
1406
|
* Emitted when the select dropdown is closed.
|
|
1523
1407
|
*/
|
|
1524
|
-
"onCatClose"?: (event:
|
|
1408
|
+
"onCatClose"?: (event: CatSelectCustomEvent<FocusEvent>) => void;
|
|
1525
1409
|
/**
|
|
1526
1410
|
* Emitted when the select dropdown is opened.
|
|
1527
1411
|
*/
|
|
1528
|
-
"onCatOpen"?: (event:
|
|
1412
|
+
"onCatOpen"?: (event: CatSelectCustomEvent<FocusEvent>) => void;
|
|
1529
1413
|
/**
|
|
1530
1414
|
* The placeholder text to display within the select.
|
|
1531
1415
|
*/
|
|
@@ -1535,7 +1419,7 @@ declare namespace LocalJSX {
|
|
|
1535
1419
|
*/
|
|
1536
1420
|
"placement"?: Placement;
|
|
1537
1421
|
/**
|
|
1538
|
-
* A value is required or must be
|
|
1422
|
+
* A value is required or must be checked for the form to be submittable.
|
|
1539
1423
|
*/
|
|
1540
1424
|
"required"?: boolean;
|
|
1541
1425
|
/**
|
|
@@ -1543,7 +1427,7 @@ declare namespace LocalJSX {
|
|
|
1543
1427
|
*/
|
|
1544
1428
|
"value"?: string | string[];
|
|
1545
1429
|
}
|
|
1546
|
-
interface
|
|
1430
|
+
interface CatSelectDemo {
|
|
1547
1431
|
}
|
|
1548
1432
|
interface CatSkeleton {
|
|
1549
1433
|
/**
|
|
@@ -1772,8 +1656,7 @@ declare namespace LocalJSX {
|
|
|
1772
1656
|
"cat-radio-group": CatRadioGroup;
|
|
1773
1657
|
"cat-scrollable": CatScrollable;
|
|
1774
1658
|
"cat-select": CatSelect;
|
|
1775
|
-
"cat-select-
|
|
1776
|
-
"cat-select-remote-test": CatSelectRemoteTest;
|
|
1659
|
+
"cat-select-demo": CatSelectDemo;
|
|
1777
1660
|
"cat-skeleton": CatSkeleton;
|
|
1778
1661
|
"cat-spinner": CatSpinner;
|
|
1779
1662
|
"cat-tab": CatTab;
|
|
@@ -1802,8 +1685,7 @@ declare module "@stencil/core" {
|
|
|
1802
1685
|
"cat-radio-group": LocalJSX.CatRadioGroup & JSXBase.HTMLAttributes<HTMLCatRadioGroupElement>;
|
|
1803
1686
|
"cat-scrollable": LocalJSX.CatScrollable & JSXBase.HTMLAttributes<HTMLCatScrollableElement>;
|
|
1804
1687
|
"cat-select": LocalJSX.CatSelect & JSXBase.HTMLAttributes<HTMLCatSelectElement>;
|
|
1805
|
-
"cat-select-
|
|
1806
|
-
"cat-select-remote-test": LocalJSX.CatSelectRemoteTest & JSXBase.HTMLAttributes<HTMLCatSelectRemoteTestElement>;
|
|
1688
|
+
"cat-select-demo": LocalJSX.CatSelectDemo & JSXBase.HTMLAttributes<HTMLCatSelectDemoElement>;
|
|
1807
1689
|
"cat-skeleton": LocalJSX.CatSkeleton & JSXBase.HTMLAttributes<HTMLCatSkeletonElement>;
|
|
1808
1690
|
"cat-spinner": LocalJSX.CatSpinner & JSXBase.HTMLAttributes<HTMLCatSpinnerElement>;
|
|
1809
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.0",
|
|
4
4
|
"description": "Catalyst Design System",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -43,16 +43,15 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@floating-ui/dom": "0.4.1",
|
|
46
|
-
"@haiilo/catalyst-tokens": "0.
|
|
46
|
+
"@haiilo/catalyst-tokens": "1.0.0",
|
|
47
47
|
"@stencil/core": "2.17.0",
|
|
48
48
|
"autosize": "5.0.1",
|
|
49
49
|
"autosize-input": "^1.0.2",
|
|
50
50
|
"choices.js": "10.1.0",
|
|
51
|
-
"focus-trap": "
|
|
51
|
+
"focus-trap": "7.0.0",
|
|
52
52
|
"loglevel": "1.8.0",
|
|
53
53
|
"sanitize.css": "13.0.0",
|
|
54
|
-
"
|
|
55
|
-
"toastify-js": "1.11.2"
|
|
54
|
+
"toastify-js": "1.12.0"
|
|
56
55
|
},
|
|
57
56
|
"devDependencies": {
|
|
58
57
|
"@babel/core": "^7.16.5",
|
|
@@ -64,19 +63,19 @@
|
|
|
64
63
|
"@types/autosize": "^4.0.1",
|
|
65
64
|
"@types/jest": "^27.4.0",
|
|
66
65
|
"@types/toastify-js": "^1.11.0",
|
|
67
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
68
|
-
"@typescript-eslint/parser": "^5.
|
|
66
|
+
"@typescript-eslint/eslint-plugin": "^5.36.2",
|
|
67
|
+
"@typescript-eslint/parser": "^5.36.2",
|
|
69
68
|
"babel-loader": "^8.2.3",
|
|
70
|
-
"eslint": "^8.
|
|
69
|
+
"eslint": "^8.23.0",
|
|
71
70
|
"eslint-config-prettier": "^8.3.0",
|
|
72
71
|
"jest": "^27.5.1",
|
|
73
72
|
"jest-cli": "^27.5.1",
|
|
74
73
|
"prettier": "^2.7.1",
|
|
75
74
|
"puppeteer": "^13.5.2",
|
|
76
75
|
"rxjs": "^7.5.5",
|
|
77
|
-
"stylelint": "^14.
|
|
76
|
+
"stylelint": "^14.11.0",
|
|
78
77
|
"stylelint-config-prettier-scss": "^0.0.1",
|
|
79
|
-
"stylelint-config-standard-scss": "^
|
|
78
|
+
"stylelint-config-standard-scss": "^5.0.0",
|
|
80
79
|
"typescript": "^4.5.5"
|
|
81
80
|
}
|
|
82
81
|
}
|