@db-ux/v-core-components 2.2.3 → 2.2.4

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.
@@ -389,6 +389,8 @@ export type TextProps = {
389
389
  */
390
390
  text?: string;
391
391
  };
392
+ export type GeneralEvent<T> = Event;
393
+ export type GeneralKeyboardEvent<T> = KeyboardEvent;
392
394
  export type ClickEvent<T> = MouseEvent;
393
395
  export type ClickEventProps<T> = {
394
396
  /**
@@ -400,24 +402,24 @@ export type ClickEventState<T> = {
400
402
  handleClick: (event: ClickEvent<T> | any) => void;
401
403
  };
402
404
  export type ToggleEventProps = {
403
- toggle?: (open: boolean | any) => void;
404
- onToggle?: (open: boolean | any) => void;
405
+ toggle?: (open: boolean) => void;
406
+ onToggle?: (open: boolean) => void;
405
407
  };
406
408
  export type ToggleEventState<T> = {
407
409
  handleToggle: (event?: ClickEvent<T> | any) => void;
408
410
  };
409
- export type CloseEventProps = {
411
+ export type CloseEventProps<T> = {
410
412
  /**
411
413
  * Function to handle button click (close).
412
414
  */
413
- onClose?: (event?: any) => void;
415
+ onClose?: (event?: T) => void;
414
416
  /**
415
417
  * Function to handle button click (close).
416
418
  */
417
- close?: (event?: any) => void;
419
+ close?: (event?: T) => void;
418
420
  };
419
- export type CloseEventState = {
420
- handleClose: (event: any, forceClose?: boolean) => void;
421
+ export type CloseEventState<T> = {
422
+ handleClose: (event?: T | void, forceClose?: boolean) => void;
421
423
  };
422
424
  export declare const AlignmentList: readonly ["start", "center"];
423
425
  export type AlignmentType = (typeof AlignmentList)[number];
@@ -1,3 +1,4 @@
1
+ import { ClickEvent, GeneralKeyboardEvent } from '../shared/model';
1
2
  export declare const uuid: () => string;
2
3
  export declare const addAttributeToChildren: (element: Element, attribute: {
3
4
  key: string;
@@ -36,3 +37,4 @@ export declare const getOptionKey: (option: {
36
37
  id?: string;
37
38
  value?: string | number | string[] | undefined;
38
39
  }, prefix: string) => string;
40
+ export declare const isKeyboardEvent: <T>(event?: ClickEvent<T> | GeneralKeyboardEvent<T>) => event is GeneralKeyboardEvent<T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@db-ux/v-core-components",
3
- "version": "2.2.3",
3
+ "version": "2.2.4",
4
4
  "type": "module",
5
5
  "description": "Vue components for @db-ux/core-components",
6
6
  "repository": {
@@ -53,7 +53,7 @@
53
53
  "sideEffects": false,
54
54
  "source": "src/index.ts",
55
55
  "dependencies": {
56
- "@db-ux/core-components": "2.2.3",
57
- "@db-ux/core-foundations": "2.2.3"
56
+ "@db-ux/core-components": "2.2.4",
57
+ "@db-ux/core-foundations": "2.2.4"
58
58
  }
59
59
  }