@haiilo/catalyst 14.4.0 → 14.5.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 +15 -4
- package/dist/catalyst/catalyst.esm.js +1 -1
- package/dist/catalyst/{p-CFGROHMy.js → p-7uZgmxXB.js} +2 -2
- package/dist/catalyst/p-7uZgmxXB.js.map +1 -0
- package/dist/catalyst/p-c04eb2d3.entry.js +10 -0
- package/dist/catalyst/p-c04eb2d3.entry.js.map +1 -0
- package/dist/catalyst/scss/core/_nav.scss +2 -1
- package/dist/catalyst/scss/core/sanitize-overwrite.scss +3 -0
- package/dist/catalyst/scss/index.scss +1 -0
- package/dist/cjs/{cat-alert_30.cjs.entry.js → cat-alert_32.cjs.entry.js} +348 -102
- package/dist/cjs/catalyst.cjs.js +2 -2
- package/dist/cjs/{index-B8-TCsLD.js → index-Ddad39qn.js} +7 -4
- package/dist/cjs/index-Ddad39qn.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/cat-alert/cat-alert.js +1 -1
- package/dist/collection/components/cat-badge/cat-badge.js +1 -1
- package/dist/collection/components/cat-button/cat-button.css +13 -2
- package/dist/collection/components/cat-button-group/cat-button-group.js +1 -1
- package/dist/collection/components/cat-card/cat-card.js +1 -1
- package/dist/collection/components/cat-checkbox/cat-checkbox.js +2 -2
- package/dist/collection/components/cat-date/cat-date.js +2 -2
- package/dist/collection/components/cat-date-inline/cat-date-inline.js +4 -4
- package/dist/collection/components/cat-datepicker/cat-datepicker.js +3 -3
- package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.js +2 -2
- package/dist/collection/components/cat-dropdown/cat-dropdown.js +133 -47
- package/dist/collection/components/cat-dropdown/cat-dropdown.js.map +1 -1
- package/dist/collection/components/cat-menu/cat-menu.css +9 -0
- package/dist/collection/components/cat-menu/cat-menu.js +652 -0
- package/dist/collection/components/cat-menu/cat-menu.js.map +1 -0
- package/dist/collection/components/cat-menu-item/cat-menu-item.js +387 -0
- package/dist/collection/components/cat-menu-item/cat-menu-item.js.map +1 -0
- package/dist/collection/components/cat-pagination/cat-pagination.js +2 -2
- package/dist/collection/components/cat-radio/cat-radio.js +2 -2
- package/dist/collection/components/cat-radio-group/cat-radio-group.js +1 -1
- package/dist/collection/components/cat-scrollable/cat-scrollable.js +3 -3
- package/dist/collection/components/cat-select/cat-select.js +14 -18
- package/dist/collection/components/cat-select/cat-select.js.map +1 -1
- package/dist/collection/components/cat-select-demo/cat-select-demo.js +1 -1
- package/dist/collection/components/cat-skeleton/cat-skeleton.js +1 -1
- package/dist/collection/components/cat-spinner/cat-spinner.js +2 -2
- package/dist/collection/components/cat-tab/cat-tab.js +1 -1
- package/dist/collection/components/cat-tabs/cat-tabs.js +1 -1
- package/dist/collection/components/cat-tag/cat-tag.js +1 -1
- package/dist/collection/components/cat-textarea/cat-textarea.js +3 -3
- package/dist/collection/components/cat-time/cat-time.css +0 -9
- package/dist/collection/components/cat-time/cat-time.js +4 -5
- package/dist/collection/components/cat-time/cat-time.js.map +1 -1
- package/dist/collection/components/cat-toggle/cat-toggle.js +2 -2
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/scss/core/_nav.scss +2 -1
- package/dist/collection/scss/core/sanitize-overwrite.scss +3 -0
- package/dist/collection/scss/index.scss +1 -0
- package/dist/components/cat-alert.js +1 -1
- package/dist/components/cat-badge.js +1 -1
- package/dist/components/cat-button-group.js +1 -1
- package/dist/components/cat-button2.js +1 -1
- package/dist/components/cat-button2.js.map +1 -1
- package/dist/components/cat-card.js +1 -1
- package/dist/components/cat-checkbox2.js +2 -2
- package/dist/components/cat-date-inline2.js +4 -4
- package/dist/components/cat-date.js +2 -2
- package/dist/components/cat-datepicker-inline.js +2 -2
- package/dist/components/cat-datepicker.js +3 -3
- package/dist/components/cat-dropdown2.js +77 -44
- package/dist/components/cat-dropdown2.js.map +1 -1
- package/dist/components/cat-menu-item.d.ts +11 -0
- package/dist/components/cat-menu-item.js +9 -0
- package/dist/components/cat-menu-item.js.map +1 -0
- package/dist/components/cat-menu-item2.js +111 -0
- package/dist/components/cat-menu-item2.js.map +1 -0
- package/dist/components/cat-menu.d.ts +11 -0
- package/dist/components/cat-menu.js +9 -0
- package/dist/components/cat-menu.js.map +1 -0
- package/dist/components/cat-menu2.js +227 -0
- package/dist/components/cat-menu2.js.map +1 -0
- package/dist/components/cat-pagination.js +2 -2
- package/dist/components/cat-radio-group.js +1 -1
- package/dist/components/cat-radio.js +2 -2
- package/dist/components/cat-scrollable2.js +3 -3
- package/dist/components/cat-select-demo.js +1 -1
- package/dist/components/cat-select2.js +5 -5
- package/dist/components/cat-select2.js.map +1 -1
- package/dist/components/cat-skeleton2.js +1 -1
- package/dist/components/cat-spinner2.js +2 -2
- package/dist/components/cat-tab.js +1 -1
- package/dist/components/cat-tabs.js +1 -1
- package/dist/components/cat-tag.js +1 -1
- package/dist/components/cat-textarea.js +3 -3
- package/dist/components/cat-time.js +25 -14
- package/dist/components/cat-time.js.map +1 -1
- package/dist/components/cat-toggle.js +2 -2
- package/dist/esm/{cat-alert_30.entry.js → cat-alert_32.entry.js} +347 -103
- package/dist/esm/catalyst.js +3 -3
- package/dist/esm/{index-CFGROHMy.js → index-7uZgmxXB.js} +7 -4
- package/dist/esm/index-7uZgmxXB.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/cat-dropdown/cat-dropdown.d.ts +17 -2
- package/dist/types/components/cat-menu/cat-menu.d.ts +124 -0
- package/dist/types/components/cat-menu-item/cat-menu-item.d.ts +80 -0
- package/dist/types/components/cat-select/cat-select.d.ts +3 -2
- package/dist/types/components.d.ts +416 -9
- package/dist/types/index.d.ts +2 -1
- package/package.json +2 -2
- package/dist/catalyst/p-76436f4e.entry.js +0 -10
- package/dist/catalyst/p-76436f4e.entry.js.map +0 -1
- package/dist/catalyst/p-CFGROHMy.js.map +0 -1
- package/dist/cjs/index-B8-TCsLD.js.map +0 -1
- package/dist/esm/index-CFGROHMy.js.map +0 -1
|
@@ -12,7 +12,7 @@ import { CatDatepickerMode } from "./components/cat-datepicker/cat-datepicker.mo
|
|
|
12
12
|
import { BaseOptions } from "flatpickr/dist/types/options";
|
|
13
13
|
import { InputType } from "./components/cat-input/input-type";
|
|
14
14
|
import { FormatDateMaskOptions, FormatTimeMaskOptions } from "./components/cat-input/cat-input";
|
|
15
|
-
import { CatSelectConnector,
|
|
15
|
+
import { CatSelectConnector, CatSelectValue, Item } from "./components/cat-select/cat-select";
|
|
16
16
|
import { Observable } from "rxjs";
|
|
17
17
|
import { TooltipPlacement } from "./components/cat-tooltip/cat-tooltip";
|
|
18
18
|
export { Breakpoint } from "./utils/breakpoints";
|
|
@@ -22,7 +22,7 @@ export { CatDatepickerMode } from "./components/cat-datepicker/cat-datepicker.mo
|
|
|
22
22
|
export { BaseOptions } from "flatpickr/dist/types/options";
|
|
23
23
|
export { InputType } from "./components/cat-input/input-type";
|
|
24
24
|
export { FormatDateMaskOptions, FormatTimeMaskOptions } from "./components/cat-input/cat-input";
|
|
25
|
-
export { CatSelectConnector,
|
|
25
|
+
export { CatSelectConnector, CatSelectValue, Item } from "./components/cat-select/cat-select";
|
|
26
26
|
export { Observable } from "rxjs";
|
|
27
27
|
export { TooltipPlacement } from "./components/cat-tooltip/cat-tooltip";
|
|
28
28
|
export namespace Components {
|
|
@@ -769,18 +769,24 @@ export namespace Components {
|
|
|
769
769
|
interface CatDropdown {
|
|
770
770
|
/**
|
|
771
771
|
* Do not navigate focus inside the dropdown via vertical arrow keys.
|
|
772
|
+
* @deprecated use cat-menu
|
|
772
773
|
* @default 'vertical'
|
|
773
774
|
*/
|
|
774
775
|
"arrowNavigation": 'horizontal' | 'vertical' | 'none';
|
|
775
776
|
/**
|
|
776
777
|
* Closes the dropdown.
|
|
777
778
|
*/
|
|
778
|
-
"close": () => Promise<void>;
|
|
779
|
+
"close": (shouldReturnFocus?: boolean) => Promise<void>;
|
|
779
780
|
/**
|
|
780
781
|
* Whether the dropdown trigger should be initialized only before first opening. Can be useful when trigger is rendered dynamically.
|
|
781
782
|
* @default false
|
|
782
783
|
*/
|
|
783
784
|
"delayedTriggerInit": boolean;
|
|
785
|
+
/**
|
|
786
|
+
* Whether the focus should be trapped inside dropdown popup. Use it only when the dropdown popup content has role dialog.
|
|
787
|
+
* @default true
|
|
788
|
+
*/
|
|
789
|
+
"focusTrap": boolean;
|
|
784
790
|
/**
|
|
785
791
|
* Whether the dropdown is open.
|
|
786
792
|
* @readonly
|
|
@@ -808,7 +814,7 @@ export namespace Components {
|
|
|
808
814
|
*/
|
|
809
815
|
"noResize": boolean;
|
|
810
816
|
/**
|
|
811
|
-
* Trigger element will not receive focus when dropdown is closed.
|
|
817
|
+
* Trigger element will not receive focus when dropdown is closed. Please use this property carefully, consider using cat-menu over using this property
|
|
812
818
|
* @default false
|
|
813
819
|
*/
|
|
814
820
|
"noReturnFocus": boolean;
|
|
@@ -1047,6 +1053,174 @@ export namespace Components {
|
|
|
1047
1053
|
*/
|
|
1048
1054
|
"value"?: string;
|
|
1049
1055
|
}
|
|
1056
|
+
/**
|
|
1057
|
+
* A menu component that provides a dropdown with a built-in configurable trigger button
|
|
1058
|
+
* and proper ARIA semantics and keyboard navigation for menu items.
|
|
1059
|
+
* The trigger is always a cat-button with sensible defaults but fully configurable
|
|
1060
|
+
* through trigger-specific props.
|
|
1061
|
+
*/
|
|
1062
|
+
interface CatMenu {
|
|
1063
|
+
/**
|
|
1064
|
+
* The arrow key navigation direction for menu items.
|
|
1065
|
+
* @default 'vertical'
|
|
1066
|
+
*/
|
|
1067
|
+
"arrowNavigation": 'horizontal' | 'vertical';
|
|
1068
|
+
/**
|
|
1069
|
+
* Closes the menu.
|
|
1070
|
+
*/
|
|
1071
|
+
"close": () => Promise<void>;
|
|
1072
|
+
/**
|
|
1073
|
+
* Whether the dropdown trigger should be initialized only before first opening. Can be useful when trigger is rendered dynamically.
|
|
1074
|
+
* @default false
|
|
1075
|
+
*/
|
|
1076
|
+
"delayedTriggerInit": boolean;
|
|
1077
|
+
/**
|
|
1078
|
+
* Disable the menu.
|
|
1079
|
+
* @default false
|
|
1080
|
+
*/
|
|
1081
|
+
"disabled": boolean;
|
|
1082
|
+
/**
|
|
1083
|
+
* Make the dropdown match the width of the reference regardless of its contents. Note that this only applies to the minimum width of the dropdown. The maximum width is still limited by the viewport.
|
|
1084
|
+
* @default false
|
|
1085
|
+
*/
|
|
1086
|
+
"justify": boolean;
|
|
1087
|
+
/**
|
|
1088
|
+
* Do not change the size of the dropdown to ensure it isn’t too big to fit in the viewport (or more specifically, its clipping context).
|
|
1089
|
+
* @default false
|
|
1090
|
+
*/
|
|
1091
|
+
"noResize": boolean;
|
|
1092
|
+
/**
|
|
1093
|
+
* Opens the menu.
|
|
1094
|
+
*/
|
|
1095
|
+
"open": () => Promise<void>;
|
|
1096
|
+
/**
|
|
1097
|
+
* Allow overflow when dropdown is open.
|
|
1098
|
+
* @default false
|
|
1099
|
+
*/
|
|
1100
|
+
"overflow": boolean;
|
|
1101
|
+
/**
|
|
1102
|
+
* The placement of the dropdown.
|
|
1103
|
+
* @default 'bottom-start'
|
|
1104
|
+
*/
|
|
1105
|
+
"placement": Placement;
|
|
1106
|
+
/**
|
|
1107
|
+
* Toggles the menu.
|
|
1108
|
+
*/
|
|
1109
|
+
"toggle": () => Promise<void>;
|
|
1110
|
+
/**
|
|
1111
|
+
* The trigger button accessibility label. If not set, falls back to triggerLabel.
|
|
1112
|
+
*/
|
|
1113
|
+
"triggerA11yLabel"?: string;
|
|
1114
|
+
/**
|
|
1115
|
+
* Additional CSS class for the trigger button.
|
|
1116
|
+
*/
|
|
1117
|
+
"triggerClass"?: string;
|
|
1118
|
+
/**
|
|
1119
|
+
* The color palette of the trigger button.
|
|
1120
|
+
* @default 'secondary'
|
|
1121
|
+
*/
|
|
1122
|
+
"triggerColor": 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'danger';
|
|
1123
|
+
/**
|
|
1124
|
+
* The trigger button icon.
|
|
1125
|
+
*/
|
|
1126
|
+
"triggerIcon"?: string;
|
|
1127
|
+
/**
|
|
1128
|
+
* Show only the icon in the trigger button.
|
|
1129
|
+
*/
|
|
1130
|
+
"triggerIconOnly"?: boolean | Breakpoint;
|
|
1131
|
+
/**
|
|
1132
|
+
* The trigger button label.
|
|
1133
|
+
*/
|
|
1134
|
+
"triggerLabel"?: string;
|
|
1135
|
+
/**
|
|
1136
|
+
* Native attributes for the trigger button.
|
|
1137
|
+
*/
|
|
1138
|
+
"triggerNativeAttributes"?: { [key: string]: string };
|
|
1139
|
+
/**
|
|
1140
|
+
* The trigger button size.
|
|
1141
|
+
* @default 'm'
|
|
1142
|
+
*/
|
|
1143
|
+
"triggerSize": 'xs' | 's' | 'm' | 'l' | 'xl';
|
|
1144
|
+
/**
|
|
1145
|
+
* Test ID for the trigger button.
|
|
1146
|
+
*/
|
|
1147
|
+
"triggerTestId"?: string;
|
|
1148
|
+
/**
|
|
1149
|
+
* The trigger button variant.
|
|
1150
|
+
* @default 'text'
|
|
1151
|
+
*/
|
|
1152
|
+
"triggerVariant": 'filled' | 'outlined' | 'text';
|
|
1153
|
+
}
|
|
1154
|
+
/**
|
|
1155
|
+
* A menu item component that renders as a button with proper ARIA semantics.
|
|
1156
|
+
*/
|
|
1157
|
+
interface CatMenuItem {
|
|
1158
|
+
/**
|
|
1159
|
+
* Whether the menu item is active.
|
|
1160
|
+
* @default false
|
|
1161
|
+
*/
|
|
1162
|
+
"active": boolean;
|
|
1163
|
+
/**
|
|
1164
|
+
* The color of the menu item.
|
|
1165
|
+
*/
|
|
1166
|
+
"color"?: 'primary' | 'secondary' | 'danger' | 'warning' | 'success' | 'info';
|
|
1167
|
+
/**
|
|
1168
|
+
* Specifies that the menu item should be disabled.
|
|
1169
|
+
* @default false
|
|
1170
|
+
*/
|
|
1171
|
+
"disabled": boolean;
|
|
1172
|
+
/**
|
|
1173
|
+
* Programmatically remove focus from the menu item.
|
|
1174
|
+
*/
|
|
1175
|
+
"doBlur": () => Promise<void>;
|
|
1176
|
+
/**
|
|
1177
|
+
* Programmatically move focus to the menu item.
|
|
1178
|
+
*/
|
|
1179
|
+
"doFocus": (options?: FocusOptions) => Promise<void>;
|
|
1180
|
+
/**
|
|
1181
|
+
* The name of an icon to be displayed in the menu item.
|
|
1182
|
+
*/
|
|
1183
|
+
"icon"?: string;
|
|
1184
|
+
/**
|
|
1185
|
+
* Hide the actual button content and only display the icon.
|
|
1186
|
+
* @default false
|
|
1187
|
+
*/
|
|
1188
|
+
"iconOnly": boolean | Breakpoint;
|
|
1189
|
+
/**
|
|
1190
|
+
* Display the icon on the right.
|
|
1191
|
+
* @default false
|
|
1192
|
+
*/
|
|
1193
|
+
"iconRight": boolean;
|
|
1194
|
+
/**
|
|
1195
|
+
* A unique identifier for the menu item.
|
|
1196
|
+
*/
|
|
1197
|
+
"identifier"?: string;
|
|
1198
|
+
/**
|
|
1199
|
+
* The loading state of the menu item.
|
|
1200
|
+
*/
|
|
1201
|
+
"loading"?: boolean;
|
|
1202
|
+
/**
|
|
1203
|
+
* Attributes that will be added to the native HTML button element
|
|
1204
|
+
*/
|
|
1205
|
+
"nativeAttributes"?: { [key: string]: string };
|
|
1206
|
+
/**
|
|
1207
|
+
* A unique identifier for the underlying native element that is used for testing purposes. The attribute is added as `data-test` attribute and acts as a shorthand for `nativeAttributes={ 'data-test': 'test-Id' }`.
|
|
1208
|
+
*/
|
|
1209
|
+
"testId"?: string;
|
|
1210
|
+
/**
|
|
1211
|
+
* A destination to link to, rendered in the href attribute of a link.
|
|
1212
|
+
*/
|
|
1213
|
+
"url"?: string;
|
|
1214
|
+
/**
|
|
1215
|
+
* Specifies where to open the linked document.
|
|
1216
|
+
*/
|
|
1217
|
+
"urlTarget"?: '_blank' | '_self';
|
|
1218
|
+
/**
|
|
1219
|
+
* The variant of the menu item button.
|
|
1220
|
+
* @default 'text'
|
|
1221
|
+
*/
|
|
1222
|
+
"variant": 'filled' | 'outlined' | 'text';
|
|
1223
|
+
}
|
|
1050
1224
|
/**
|
|
1051
1225
|
* A navigation component to switch between different pages of paged chunks of
|
|
1052
1226
|
* data such as a table. Pagination is built with list HTML elements and a
|
|
@@ -1373,7 +1547,7 @@ export namespace Components {
|
|
|
1373
1547
|
/**
|
|
1374
1548
|
* The value of the select. <br /> <br /> The value of the select depends on whether it is allowed to choose a single item or several items. <br /> When only one item can be selected, the value is the id of the item, in case several items can be selected, the value is an array of ids of the selected items. <br /> <br /> In case the user can add new items to the select (tags activated), the value in the single select is an object (CatSelectTaggingValue) with the id of the item or the name of the created item, in the case of multiple select, it is an object (CatSelectMultipleTaggingValue) with the array of the ids of the items selected and the array of the names of the items created
|
|
1375
1549
|
*/
|
|
1376
|
-
"value"?:
|
|
1550
|
+
"value"?: CatSelectValue;
|
|
1377
1551
|
}
|
|
1378
1552
|
interface CatSelectDemo {
|
|
1379
1553
|
}
|
|
@@ -2024,6 +2198,14 @@ export interface CatInputCustomEvent<T> extends CustomEvent<T> {
|
|
|
2024
2198
|
detail: T;
|
|
2025
2199
|
target: HTMLCatInputElement;
|
|
2026
2200
|
}
|
|
2201
|
+
export interface CatMenuCustomEvent<T> extends CustomEvent<T> {
|
|
2202
|
+
detail: T;
|
|
2203
|
+
target: HTMLCatMenuElement;
|
|
2204
|
+
}
|
|
2205
|
+
export interface CatMenuItemCustomEvent<T> extends CustomEvent<T> {
|
|
2206
|
+
detail: T;
|
|
2207
|
+
target: HTMLCatMenuItemElement;
|
|
2208
|
+
}
|
|
2027
2209
|
export interface CatPaginationCustomEvent<T> extends CustomEvent<T> {
|
|
2028
2210
|
detail: T;
|
|
2029
2211
|
target: HTMLCatPaginationElement;
|
|
@@ -2319,6 +2501,51 @@ declare global {
|
|
|
2319
2501
|
prototype: HTMLCatInputElement;
|
|
2320
2502
|
new (): HTMLCatInputElement;
|
|
2321
2503
|
};
|
|
2504
|
+
interface HTMLCatMenuElementEventMap {
|
|
2505
|
+
"catOpen": FocusEvent;
|
|
2506
|
+
"catClose": FocusEvent;
|
|
2507
|
+
"catTriggerClick": MouseEvent;
|
|
2508
|
+
}
|
|
2509
|
+
/**
|
|
2510
|
+
* A menu component that provides a dropdown with a built-in configurable trigger button
|
|
2511
|
+
* and proper ARIA semantics and keyboard navigation for menu items.
|
|
2512
|
+
* The trigger is always a cat-button with sensible defaults but fully configurable
|
|
2513
|
+
* through trigger-specific props.
|
|
2514
|
+
*/
|
|
2515
|
+
interface HTMLCatMenuElement extends Components.CatMenu, HTMLStencilElement {
|
|
2516
|
+
addEventListener<K extends keyof HTMLCatMenuElementEventMap>(type: K, listener: (this: HTMLCatMenuElement, ev: CatMenuCustomEvent<HTMLCatMenuElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2517
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2518
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2519
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
2520
|
+
removeEventListener<K extends keyof HTMLCatMenuElementEventMap>(type: K, listener: (this: HTMLCatMenuElement, ev: CatMenuCustomEvent<HTMLCatMenuElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
2521
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2522
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2523
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
2524
|
+
}
|
|
2525
|
+
var HTMLCatMenuElement: {
|
|
2526
|
+
prototype: HTMLCatMenuElement;
|
|
2527
|
+
new (): HTMLCatMenuElement;
|
|
2528
|
+
};
|
|
2529
|
+
interface HTMLCatMenuItemElementEventMap {
|
|
2530
|
+
"catClick": MouseEvent;
|
|
2531
|
+
}
|
|
2532
|
+
/**
|
|
2533
|
+
* A menu item component that renders as a button with proper ARIA semantics.
|
|
2534
|
+
*/
|
|
2535
|
+
interface HTMLCatMenuItemElement extends Components.CatMenuItem, HTMLStencilElement {
|
|
2536
|
+
addEventListener<K extends keyof HTMLCatMenuItemElementEventMap>(type: K, listener: (this: HTMLCatMenuItemElement, ev: CatMenuItemCustomEvent<HTMLCatMenuItemElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2537
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2538
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2539
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
2540
|
+
removeEventListener<K extends keyof HTMLCatMenuItemElementEventMap>(type: K, listener: (this: HTMLCatMenuItemElement, ev: CatMenuItemCustomEvent<HTMLCatMenuItemElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
2541
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2542
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2543
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
2544
|
+
}
|
|
2545
|
+
var HTMLCatMenuItemElement: {
|
|
2546
|
+
prototype: HTMLCatMenuItemElement;
|
|
2547
|
+
new (): HTMLCatMenuItemElement;
|
|
2548
|
+
};
|
|
2322
2549
|
interface HTMLCatPaginationElementEventMap {
|
|
2323
2550
|
"catChange": number;
|
|
2324
2551
|
}
|
|
@@ -2414,7 +2641,7 @@ declare global {
|
|
|
2414
2641
|
interface HTMLCatSelectElementEventMap {
|
|
2415
2642
|
"catOpen": FocusEvent;
|
|
2416
2643
|
"catClose": FocusEvent;
|
|
2417
|
-
"catChange":
|
|
2644
|
+
"catChange": CatSelectValue;
|
|
2418
2645
|
"catBlur": FocusEvent;
|
|
2419
2646
|
}
|
|
2420
2647
|
/**
|
|
@@ -2618,6 +2845,8 @@ declare global {
|
|
|
2618
2845
|
"cat-form-group": HTMLCatFormGroupElement;
|
|
2619
2846
|
"cat-icon": HTMLCatIconElement;
|
|
2620
2847
|
"cat-input": HTMLCatInputElement;
|
|
2848
|
+
"cat-menu": HTMLCatMenuElement;
|
|
2849
|
+
"cat-menu-item": HTMLCatMenuItemElement;
|
|
2621
2850
|
"cat-pagination": HTMLCatPaginationElement;
|
|
2622
2851
|
"cat-radio": HTMLCatRadioElement;
|
|
2623
2852
|
"cat-radio-group": HTMLCatRadioGroupElement;
|
|
@@ -3369,6 +3598,7 @@ declare namespace LocalJSX {
|
|
|
3369
3598
|
interface CatDropdown {
|
|
3370
3599
|
/**
|
|
3371
3600
|
* Do not navigate focus inside the dropdown via vertical arrow keys.
|
|
3601
|
+
* @deprecated use cat-menu
|
|
3372
3602
|
* @default 'vertical'
|
|
3373
3603
|
*/
|
|
3374
3604
|
"arrowNavigation"?: 'horizontal' | 'vertical' | 'none';
|
|
@@ -3404,7 +3634,7 @@ declare namespace LocalJSX {
|
|
|
3404
3634
|
*/
|
|
3405
3635
|
"noResize"?: boolean;
|
|
3406
3636
|
/**
|
|
3407
|
-
* Trigger element will not receive focus when dropdown is closed.
|
|
3637
|
+
* Trigger element will not receive focus when dropdown is closed. Please use this property carefully, consider using cat-menu over using this property
|
|
3408
3638
|
* @default false
|
|
3409
3639
|
*/
|
|
3410
3640
|
"noReturnFocus"?: boolean;
|
|
@@ -3641,6 +3871,170 @@ declare namespace LocalJSX {
|
|
|
3641
3871
|
*/
|
|
3642
3872
|
"value"?: string;
|
|
3643
3873
|
}
|
|
3874
|
+
/**
|
|
3875
|
+
* A menu component that provides a dropdown with a built-in configurable trigger button
|
|
3876
|
+
* and proper ARIA semantics and keyboard navigation for menu items.
|
|
3877
|
+
* The trigger is always a cat-button with sensible defaults but fully configurable
|
|
3878
|
+
* through trigger-specific props.
|
|
3879
|
+
*/
|
|
3880
|
+
interface CatMenu {
|
|
3881
|
+
/**
|
|
3882
|
+
* The arrow key navigation direction for menu items.
|
|
3883
|
+
* @default 'vertical'
|
|
3884
|
+
*/
|
|
3885
|
+
"arrowNavigation"?: 'horizontal' | 'vertical';
|
|
3886
|
+
/**
|
|
3887
|
+
* Whether the dropdown trigger should be initialized only before first opening. Can be useful when trigger is rendered dynamically.
|
|
3888
|
+
* @default false
|
|
3889
|
+
*/
|
|
3890
|
+
"delayedTriggerInit"?: boolean;
|
|
3891
|
+
/**
|
|
3892
|
+
* Disable the menu.
|
|
3893
|
+
* @default false
|
|
3894
|
+
*/
|
|
3895
|
+
"disabled"?: boolean;
|
|
3896
|
+
/**
|
|
3897
|
+
* Make the dropdown match the width of the reference regardless of its contents. Note that this only applies to the minimum width of the dropdown. The maximum width is still limited by the viewport.
|
|
3898
|
+
* @default false
|
|
3899
|
+
*/
|
|
3900
|
+
"justify"?: boolean;
|
|
3901
|
+
/**
|
|
3902
|
+
* Do not change the size of the dropdown to ensure it isn’t too big to fit in the viewport (or more specifically, its clipping context).
|
|
3903
|
+
* @default false
|
|
3904
|
+
*/
|
|
3905
|
+
"noResize"?: boolean;
|
|
3906
|
+
/**
|
|
3907
|
+
* Emitted when the dropdown is closed.
|
|
3908
|
+
*/
|
|
3909
|
+
"onCatClose"?: (event: CatMenuCustomEvent<FocusEvent>) => void;
|
|
3910
|
+
/**
|
|
3911
|
+
* Emitted when the dropdown is opened.
|
|
3912
|
+
*/
|
|
3913
|
+
"onCatOpen"?: (event: CatMenuCustomEvent<FocusEvent>) => void;
|
|
3914
|
+
/**
|
|
3915
|
+
* Emitted when the trigger button is clicked.
|
|
3916
|
+
*/
|
|
3917
|
+
"onCatTriggerClick"?: (event: CatMenuCustomEvent<MouseEvent>) => void;
|
|
3918
|
+
/**
|
|
3919
|
+
* Allow overflow when dropdown is open.
|
|
3920
|
+
* @default false
|
|
3921
|
+
*/
|
|
3922
|
+
"overflow"?: boolean;
|
|
3923
|
+
/**
|
|
3924
|
+
* The placement of the dropdown.
|
|
3925
|
+
* @default 'bottom-start'
|
|
3926
|
+
*/
|
|
3927
|
+
"placement"?: Placement;
|
|
3928
|
+
/**
|
|
3929
|
+
* The trigger button accessibility label. If not set, falls back to triggerLabel.
|
|
3930
|
+
*/
|
|
3931
|
+
"triggerA11yLabel"?: string;
|
|
3932
|
+
/**
|
|
3933
|
+
* Additional CSS class for the trigger button.
|
|
3934
|
+
*/
|
|
3935
|
+
"triggerClass"?: string;
|
|
3936
|
+
/**
|
|
3937
|
+
* The color palette of the trigger button.
|
|
3938
|
+
* @default 'secondary'
|
|
3939
|
+
*/
|
|
3940
|
+
"triggerColor"?: 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'danger';
|
|
3941
|
+
/**
|
|
3942
|
+
* The trigger button icon.
|
|
3943
|
+
*/
|
|
3944
|
+
"triggerIcon"?: string;
|
|
3945
|
+
/**
|
|
3946
|
+
* Show only the icon in the trigger button.
|
|
3947
|
+
*/
|
|
3948
|
+
"triggerIconOnly"?: boolean | Breakpoint;
|
|
3949
|
+
/**
|
|
3950
|
+
* The trigger button label.
|
|
3951
|
+
*/
|
|
3952
|
+
"triggerLabel"?: string;
|
|
3953
|
+
/**
|
|
3954
|
+
* Native attributes for the trigger button.
|
|
3955
|
+
*/
|
|
3956
|
+
"triggerNativeAttributes"?: { [key: string]: string };
|
|
3957
|
+
/**
|
|
3958
|
+
* The trigger button size.
|
|
3959
|
+
* @default 'm'
|
|
3960
|
+
*/
|
|
3961
|
+
"triggerSize"?: 'xs' | 's' | 'm' | 'l' | 'xl';
|
|
3962
|
+
/**
|
|
3963
|
+
* Test ID for the trigger button.
|
|
3964
|
+
*/
|
|
3965
|
+
"triggerTestId"?: string;
|
|
3966
|
+
/**
|
|
3967
|
+
* The trigger button variant.
|
|
3968
|
+
* @default 'text'
|
|
3969
|
+
*/
|
|
3970
|
+
"triggerVariant"?: 'filled' | 'outlined' | 'text';
|
|
3971
|
+
}
|
|
3972
|
+
/**
|
|
3973
|
+
* A menu item component that renders as a button with proper ARIA semantics.
|
|
3974
|
+
*/
|
|
3975
|
+
interface CatMenuItem {
|
|
3976
|
+
/**
|
|
3977
|
+
* Whether the menu item is active.
|
|
3978
|
+
* @default false
|
|
3979
|
+
*/
|
|
3980
|
+
"active"?: boolean;
|
|
3981
|
+
/**
|
|
3982
|
+
* The color of the menu item.
|
|
3983
|
+
*/
|
|
3984
|
+
"color"?: 'primary' | 'secondary' | 'danger' | 'warning' | 'success' | 'info';
|
|
3985
|
+
/**
|
|
3986
|
+
* Specifies that the menu item should be disabled.
|
|
3987
|
+
* @default false
|
|
3988
|
+
*/
|
|
3989
|
+
"disabled"?: boolean;
|
|
3990
|
+
/**
|
|
3991
|
+
* The name of an icon to be displayed in the menu item.
|
|
3992
|
+
*/
|
|
3993
|
+
"icon"?: string;
|
|
3994
|
+
/**
|
|
3995
|
+
* Hide the actual button content and only display the icon.
|
|
3996
|
+
* @default false
|
|
3997
|
+
*/
|
|
3998
|
+
"iconOnly"?: boolean | Breakpoint;
|
|
3999
|
+
/**
|
|
4000
|
+
* Display the icon on the right.
|
|
4001
|
+
* @default false
|
|
4002
|
+
*/
|
|
4003
|
+
"iconRight"?: boolean;
|
|
4004
|
+
/**
|
|
4005
|
+
* A unique identifier for the menu item.
|
|
4006
|
+
*/
|
|
4007
|
+
"identifier"?: string;
|
|
4008
|
+
/**
|
|
4009
|
+
* The loading state of the menu item.
|
|
4010
|
+
*/
|
|
4011
|
+
"loading"?: boolean;
|
|
4012
|
+
/**
|
|
4013
|
+
* Attributes that will be added to the native HTML button element
|
|
4014
|
+
*/
|
|
4015
|
+
"nativeAttributes"?: { [key: string]: string };
|
|
4016
|
+
/**
|
|
4017
|
+
* Emitted when the trigger button is clicked.
|
|
4018
|
+
*/
|
|
4019
|
+
"onCatClick"?: (event: CatMenuItemCustomEvent<MouseEvent>) => void;
|
|
4020
|
+
/**
|
|
4021
|
+
* A unique identifier for the underlying native element that is used for testing purposes. The attribute is added as `data-test` attribute and acts as a shorthand for `nativeAttributes={ 'data-test': 'test-Id' }`.
|
|
4022
|
+
*/
|
|
4023
|
+
"testId"?: string;
|
|
4024
|
+
/**
|
|
4025
|
+
* A destination to link to, rendered in the href attribute of a link.
|
|
4026
|
+
*/
|
|
4027
|
+
"url"?: string;
|
|
4028
|
+
/**
|
|
4029
|
+
* Specifies where to open the linked document.
|
|
4030
|
+
*/
|
|
4031
|
+
"urlTarget"?: '_blank' | '_self';
|
|
4032
|
+
/**
|
|
4033
|
+
* The variant of the menu item button.
|
|
4034
|
+
* @default 'text'
|
|
4035
|
+
*/
|
|
4036
|
+
"variant"?: 'filled' | 'outlined' | 'text';
|
|
4037
|
+
}
|
|
3644
4038
|
/**
|
|
3645
4039
|
* A navigation component to switch between different pages of paged chunks of
|
|
3646
4040
|
* data such as a table. Pagination is built with list HTML elements and a
|
|
@@ -3952,7 +4346,7 @@ declare namespace LocalJSX {
|
|
|
3952
4346
|
/**
|
|
3953
4347
|
* Emitted when the value is changed.
|
|
3954
4348
|
*/
|
|
3955
|
-
"onCatChange"?: (event: CatSelectCustomEvent<
|
|
4349
|
+
"onCatChange"?: (event: CatSelectCustomEvent<CatSelectValue>) => void;
|
|
3956
4350
|
/**
|
|
3957
4351
|
* Emitted when the select dropdown is closed.
|
|
3958
4352
|
*/
|
|
@@ -3996,7 +4390,7 @@ declare namespace LocalJSX {
|
|
|
3996
4390
|
/**
|
|
3997
4391
|
* The value of the select. <br /> <br /> The value of the select depends on whether it is allowed to choose a single item or several items. <br /> When only one item can be selected, the value is the id of the item, in case several items can be selected, the value is an array of ids of the selected items. <br /> <br /> In case the user can add new items to the select (tags activated), the value in the single select is an object (CatSelectTaggingValue) with the id of the item or the name of the created item, in the case of multiple select, it is an object (CatSelectMultipleTaggingValue) with the array of the ids of the items selected and the array of the names of the items created
|
|
3998
4392
|
*/
|
|
3999
|
-
"value"?:
|
|
4393
|
+
"value"?: CatSelectValue;
|
|
4000
4394
|
}
|
|
4001
4395
|
interface CatSelectDemo {
|
|
4002
4396
|
}
|
|
@@ -4620,6 +5014,8 @@ declare namespace LocalJSX {
|
|
|
4620
5014
|
"cat-form-group": CatFormGroup;
|
|
4621
5015
|
"cat-icon": CatIcon;
|
|
4622
5016
|
"cat-input": CatInput;
|
|
5017
|
+
"cat-menu": CatMenu;
|
|
5018
|
+
"cat-menu-item": CatMenuItem;
|
|
4623
5019
|
"cat-pagination": CatPagination;
|
|
4624
5020
|
"cat-radio": CatRadio;
|
|
4625
5021
|
"cat-radio-group": CatRadioGroup;
|
|
@@ -4705,6 +5101,17 @@ declare module "@stencil/core" {
|
|
|
4705
5101
|
* including passwords and numbers.
|
|
4706
5102
|
*/
|
|
4707
5103
|
"cat-input": LocalJSX.CatInput & JSXBase.HTMLAttributes<HTMLCatInputElement>;
|
|
5104
|
+
/**
|
|
5105
|
+
* A menu component that provides a dropdown with a built-in configurable trigger button
|
|
5106
|
+
* and proper ARIA semantics and keyboard navigation for menu items.
|
|
5107
|
+
* The trigger is always a cat-button with sensible defaults but fully configurable
|
|
5108
|
+
* through trigger-specific props.
|
|
5109
|
+
*/
|
|
5110
|
+
"cat-menu": LocalJSX.CatMenu & JSXBase.HTMLAttributes<HTMLCatMenuElement>;
|
|
5111
|
+
/**
|
|
5112
|
+
* A menu item component that renders as a button with proper ARIA semantics.
|
|
5113
|
+
*/
|
|
5114
|
+
"cat-menu-item": LocalJSX.CatMenuItem & JSXBase.HTMLAttributes<HTMLCatMenuItemElement>;
|
|
4708
5115
|
/**
|
|
4709
5116
|
* A navigation component to switch between different pages of paged chunks of
|
|
4710
5117
|
* data such as a table. Pagination is built with list HTML elements and a
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,7 +2,8 @@ export { Components, JSX } from './components';
|
|
|
2
2
|
export { CatI18nRegistry, CatI18nTranslationFn, catI18nRegistry } from './components/cat-i18n/cat-i18n-registry';
|
|
3
3
|
export { CatIconRegistry, catIconRegistry } from './components/cat-icon/cat-icon-registry';
|
|
4
4
|
export { CatNotificationService, ToastOptions, catNotificationService } from './components/cat-notification/cat-notification';
|
|
5
|
-
export { CatSelectConnector, CatSelectMultipleTaggingValue, CatSelectTaggingValue, Item, Page, RenderInfo } from './components/cat-select/cat-select';
|
|
5
|
+
export { CatSelectConnector, CatSelectMultipleTaggingValue, CatSelectTaggingValue, Item, Page, RenderInfo, CatSelectValue } from './components/cat-select/cat-select';
|
|
6
6
|
export { objectArrayConnector, stringArrayConnector, stringMapConnector } from './components/cat-select/connectors';
|
|
7
7
|
export { TooltipPlacement } from './components/cat-tooltip/cat-tooltip';
|
|
8
8
|
export { FormatTimeMaskOptions, FormatDateMaskOptions } from './components/cat-input/cat-input';
|
|
9
|
+
export { DropdownPlacement } from './components/cat-dropdown/cat-dropdown';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haiilo/catalyst",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.5.1",
|
|
4
4
|
"description": "Catalyst Design System",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"sanitize.css": "13.0.0",
|
|
40
40
|
"tabbable": "6.2.0",
|
|
41
41
|
"toastify-js": "1.12.0",
|
|
42
|
-
"@haiilo/catalyst-tokens": "14.
|
|
42
|
+
"@haiilo/catalyst-tokens": "14.5.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@babel/core": "7.28.5",
|