@stenajs-webui/elements 14.1.1 → 15.0.0-alpha.10
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/components/ui/action-menu/UseActionMenuLogic.d.ts +2 -1
- package/dist/components/ui/icon/Icon.d.ts +4 -6
- package/dist/components/ui/icon/Icon.stories.d.ts +2 -14
- package/dist/index.es.js +219 -224
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +236 -223
- package/dist/index.js.map +1 -1
- package/package.json +5 -7
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { MouseEventHandler } from "react";
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import { ActionMenuItemProps } from "./ActionMenuItem";
|
|
3
4
|
interface Props extends Pick<ActionMenuItemProps, "disableCloseOnClick"> {
|
|
4
5
|
onClick?: React.MouseEventHandler;
|
|
5
6
|
}
|
|
6
7
|
export declare const useActionMenuLogic: <TElement extends HTMLElement>({ disableCloseOnClick, onClick }: Props, ref: React.Ref<TElement>) => {
|
|
7
|
-
onClickHandler:
|
|
8
|
+
onClickHandler: MouseEventHandler<TElement>;
|
|
8
9
|
onKeyDown: (event: React.KeyboardEvent<TElement>) => void;
|
|
9
10
|
innerRef: React.RefObject<NonNullable<TElement>>;
|
|
10
11
|
};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { IconDefinition } from "@fortawesome/fontawesome-svg-core";
|
|
2
|
-
import {
|
|
3
|
-
import { Omit } from "@stenajs-webui/core";
|
|
2
|
+
import { FontAwesomeIconProps } from "@fortawesome/react-fontawesome";
|
|
3
|
+
import { Omit, BoxProps } from "@stenajs-webui/core";
|
|
4
4
|
import * as React from "react";
|
|
5
|
-
export interface IconProps extends Omit<
|
|
5
|
+
export interface IconProps extends Omit<FontAwesomeIconProps, "color" | "size" | "icon" | "display">, Pick<BoxProps, "display"> {
|
|
6
6
|
icon?: IconDefinition;
|
|
7
|
-
hoverIcon?: IconDefinition;
|
|
8
7
|
color?: string;
|
|
9
|
-
hoverColor?: string;
|
|
10
8
|
size?: number;
|
|
11
9
|
}
|
|
12
|
-
export declare const Icon: React.
|
|
10
|
+
export declare const Icon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -3,7 +3,7 @@ import { IconProps } from "./Icon";
|
|
|
3
3
|
import { Story } from "@storybook/react";
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
component: React.
|
|
6
|
+
component: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
7
|
argTypes: {
|
|
8
8
|
color: {
|
|
9
9
|
control: {
|
|
@@ -11,32 +11,20 @@ declare const _default: {
|
|
|
11
11
|
options: string[];
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
|
-
hoverColor: {
|
|
15
|
-
control: {
|
|
16
|
-
type: string;
|
|
17
|
-
options: string[];
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
14
|
icon: {
|
|
21
15
|
control: {
|
|
22
16
|
disable: boolean;
|
|
23
17
|
};
|
|
24
18
|
};
|
|
25
|
-
hoverIcon: {
|
|
26
|
-
control: {
|
|
27
|
-
disable: boolean;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
19
|
};
|
|
31
20
|
};
|
|
32
21
|
export default _default;
|
|
33
22
|
export declare const Demo: Story<IconProps>;
|
|
34
23
|
export declare const WithColor: () => JSX.Element;
|
|
35
|
-
export declare const WithHoverColor: () => JSX.Element;
|
|
36
|
-
export declare const WithHoverIcon: () => JSX.Element;
|
|
37
24
|
export declare const WithSpin: () => JSX.Element;
|
|
38
25
|
export declare const WithPulse: () => JSX.Element;
|
|
39
26
|
export declare const HorizontalFlip: () => JSX.Element;
|
|
40
27
|
export declare const VerticalFlip: () => JSX.Element;
|
|
41
28
|
export declare const WithRotation: () => JSX.Element;
|
|
42
29
|
export declare const WithTransform: () => JSX.Element;
|
|
30
|
+
export declare const WithDisplay: () => JSX.Element;
|