@agility/plenum-ui 2.0.5 → 2.0.7
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/index.d.ts +37 -9
- package/dist/index.js +1 -1
- package/dist/index.js.map +4 -4
- package/dist/types/stories/index.d.ts +3 -3
- package/dist/types/stories/molecules/inputs/NestedInputButton/NestedInputButton.d.ts +1 -4
- package/dist/types/stories/organisms/AnimatedFormInputWithAddons/AnimatedFormInputWithAddons.d.ts +21 -0
- package/dist/types/stories/organisms/AnimatedFormInputWithAddons/index.d.ts +3 -0
- package/dist/types/stories/organisms/index.d.ts +3 -2
- package/package.json +1 -1
- package/stories/index.ts +7 -3
- package/stories/molecules/inputs/NestedInputButton/NestedInputButton.tsx +17 -12
- package/stories/organisms/AnimatedFormInputWithAddons/AnimatedFormInputWithAddons.stories.tsx +1 -1
- package/stories/organisms/index.ts +5 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IAvatarProps, IBadgeProps, IButtonProps, ICapsuleProps, IDynamicIconProps, IIconWithShadowProps, ILoaderProps, IRadialProgressProps, UnifiedIconName, IconName, FAIconName, BTNActionType, Avatar, Badge, Button, Capsule, DynamicIcon, IconWithShadow, Loader, RadialProgress, isFAIcon, isHeroIcon, isTablerIcon, isUnifiedIconName } from "./atoms";
|
|
2
2
|
import { ICheckboxProps, IComboboxProps, IInputFieldProps, IInputLabelProps, INestedInputButtonProps, IRadioProps, ISelectProps, ITextareaProps, IToggleSwitchProps, AcceptedInputTypes, Checkbox, Combobox, InputField, InputLabel, NestedInputButton, Radio, Select, Textarea, ToggleSwitch, TextInput, ITextInputProps, ISimpleSelectOptions } from "./molecules";
|
|
3
|
-
import { IAnimatedLabelInputProps, AnimatedLabelTextArea, IAnimatedLabelTextAreaProps, IButtonDropdownProps, IDropdownProps, IEmptySectionPlaceholderProps, IItemProp, IFormInputWithAddonsProps, AnimatedLabelInput, ButtonDropdown, Dropdown, EmptySectionPlaceholder, FormInputWithAddons, TextInputSelect, ITextInputSelectProps } from "./organisms";
|
|
4
|
-
export type { IAvatarProps, IBadgeProps, IButtonProps, ICapsuleProps, ITextInputSelectProps, IDynamicIconProps, IIconWithShadowProps, ILoaderProps, IRadialProgressProps, ICheckboxProps, IComboboxProps, IInputFieldProps, IInputLabelProps, INestedInputButtonProps, IRadioProps, ISelectProps, ITextareaProps, IToggleSwitchProps, AcceptedInputTypes, IAnimatedLabelInputProps, IAnimatedLabelTextAreaProps, IButtonDropdownProps, IDropdownProps, IEmptySectionPlaceholderProps, IItemProp, IFormInputWithAddonsProps, UnifiedIconName, IconName, FAIconName, BTNActionType, ITextInputProps, ISimpleSelectOptions };
|
|
5
|
-
export { Avatar, Checkbox, Combobox, InputField, InputLabel, NestedInputButton, Radio, Select, Textarea, ToggleSwitch, AnimatedLabelInput, AnimatedLabelTextArea, ButtonDropdown, Dropdown, EmptySectionPlaceholder, FormInputWithAddons, Badge, Button, Capsule, DynamicIcon, IconWithShadow, Loader, RadialProgress, isFAIcon, isHeroIcon, isTablerIcon, isUnifiedIconName, TextInput, TextInputSelect };
|
|
3
|
+
import { IAnimatedLabelInputProps, AnimatedLabelTextArea, IAnimatedLabelTextAreaProps, IButtonDropdownProps, IDropdownProps, IEmptySectionPlaceholderProps, IItemProp, IFormInputWithAddonsProps, AnimatedLabelInput, ButtonDropdown, Dropdown, EmptySectionPlaceholder, FormInputWithAddons, TextInputSelect, ITextInputSelectProps, IAnimatedFormInputWithAddons, AnimatedFormInputWithAddons } from "./organisms";
|
|
4
|
+
export type { IAvatarProps, IBadgeProps, IButtonProps, ICapsuleProps, ITextInputSelectProps, IDynamicIconProps, IIconWithShadowProps, ILoaderProps, IRadialProgressProps, ICheckboxProps, IComboboxProps, IInputFieldProps, IInputLabelProps, INestedInputButtonProps, IRadioProps, ISelectProps, ITextareaProps, IToggleSwitchProps, AcceptedInputTypes, IAnimatedLabelInputProps, IAnimatedLabelTextAreaProps, IButtonDropdownProps, IDropdownProps, IEmptySectionPlaceholderProps, IItemProp, IFormInputWithAddonsProps, UnifiedIconName, IconName, FAIconName, BTNActionType, ITextInputProps, ISimpleSelectOptions, IAnimatedFormInputWithAddons };
|
|
5
|
+
export { Avatar, Checkbox, Combobox, InputField, InputLabel, NestedInputButton, Radio, Select, Textarea, ToggleSwitch, AnimatedLabelInput, AnimatedLabelTextArea, ButtonDropdown, Dropdown, EmptySectionPlaceholder, FormInputWithAddons, Badge, Button, Capsule, DynamicIcon, IconWithShadow, Loader, RadialProgress, isFAIcon, isHeroIcon, isTablerIcon, isUnifiedIconName, TextInput, TextInputSelect, AnimatedFormInputWithAddons };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { IDynamicIconProps } from "@/stories/atoms/icons";
|
|
3
|
-
export interface INestedInputButtonProps {
|
|
3
|
+
export interface INestedInputButtonProps extends Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> {
|
|
4
4
|
/** Icon to be included*/
|
|
5
5
|
icon?: IDynamicIconProps;
|
|
6
6
|
/** CTA label */
|
|
@@ -9,9 +9,6 @@ export interface INestedInputButtonProps {
|
|
|
9
9
|
align: "left" | "right";
|
|
10
10
|
/** Show the CTA without Background color and a border seperator */
|
|
11
11
|
isClear?: boolean;
|
|
12
|
-
/** Onclick callback */
|
|
13
|
-
onClickHandler?(): void;
|
|
14
|
-
buttonProps?: React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
|
|
15
12
|
}
|
|
16
13
|
declare const NestedInputButton: React.FC<INestedInputButtonProps>;
|
|
17
14
|
export default NestedInputButton;
|
package/dist/types/stories/organisms/AnimatedFormInputWithAddons/AnimatedFormInputWithAddons.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IInputFieldProps } from "@/stories/molecules/inputs/InputField";
|
|
3
|
+
import { INestedInputButtonProps } from "@/stories/molecules";
|
|
4
|
+
interface ILabelProps extends React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement> {
|
|
5
|
+
display: string;
|
|
6
|
+
}
|
|
7
|
+
export interface IAnimatedFormInputWithAddons extends Omit<IInputFieldProps, "handleChange"> {
|
|
8
|
+
id: string;
|
|
9
|
+
containerStyles?: string;
|
|
10
|
+
message?: string;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
isError?: boolean;
|
|
13
|
+
isShowCounter?: boolean;
|
|
14
|
+
maxLength?: number;
|
|
15
|
+
label: ILabelProps;
|
|
16
|
+
handleChange: (value: string) => void;
|
|
17
|
+
labelClassName?: string;
|
|
18
|
+
addonBTN: INestedInputButtonProps;
|
|
19
|
+
}
|
|
20
|
+
declare const AnimatedFormInputWithAddons: React.FC<IAnimatedFormInputWithAddons>;
|
|
21
|
+
export default AnimatedFormInputWithAddons;
|
|
@@ -5,5 +5,6 @@ import Dropdown, { IDropdownProps, IItemProp } from "./DropdownComponent";
|
|
|
5
5
|
import EmptySectionPlaceholder, { IEmptySectionPlaceholderProps } from "./EmptySectionPlaceholder";
|
|
6
6
|
import FormInputWithAddons, { IFormInputWithAddonsProps } from "./FormInputWithAddons";
|
|
7
7
|
import TextInputSelect, { ITextInputSelectProps } from "./TextInputSelect";
|
|
8
|
-
|
|
9
|
-
export {
|
|
8
|
+
import AnimatedFormInputWithAddons, { IAnimatedFormInputWithAddons } from "./AnimatedFormInputWithAddons";
|
|
9
|
+
export type { IAnimatedLabelInputProps, IAnimatedLabelTextAreaProps, IButtonDropdownProps, IDropdownProps, IEmptySectionPlaceholderProps, IItemProp, IFormInputWithAddonsProps, ITextInputSelectProps, IAnimatedFormInputWithAddons };
|
|
10
|
+
export { AnimatedLabelInput, AnimatedLabelTextArea, ButtonDropdown, Dropdown, EmptySectionPlaceholder, FormInputWithAddons, TextInputSelect, AnimatedFormInputWithAddons };
|
package/package.json
CHANGED
package/stories/index.ts
CHANGED
|
@@ -66,7 +66,9 @@ import {
|
|
|
66
66
|
EmptySectionPlaceholder,
|
|
67
67
|
FormInputWithAddons,
|
|
68
68
|
TextInputSelect,
|
|
69
|
-
ITextInputSelectProps
|
|
69
|
+
ITextInputSelectProps,
|
|
70
|
+
IAnimatedFormInputWithAddons,
|
|
71
|
+
AnimatedFormInputWithAddons
|
|
70
72
|
} from "./organisms"
|
|
71
73
|
|
|
72
74
|
export type {
|
|
@@ -101,7 +103,8 @@ export type {
|
|
|
101
103
|
FAIconName,
|
|
102
104
|
BTNActionType,
|
|
103
105
|
ITextInputProps,
|
|
104
|
-
ISimpleSelectOptions
|
|
106
|
+
ISimpleSelectOptions,
|
|
107
|
+
IAnimatedFormInputWithAddons
|
|
105
108
|
}
|
|
106
109
|
export {
|
|
107
110
|
Avatar,
|
|
@@ -132,5 +135,6 @@ export {
|
|
|
132
135
|
isTablerIcon,
|
|
133
136
|
isUnifiedIconName,
|
|
134
137
|
TextInput,
|
|
135
|
-
TextInputSelect
|
|
138
|
+
TextInputSelect,
|
|
139
|
+
AnimatedFormInputWithAddons
|
|
136
140
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { DynamicIcon, IDynamicIconProps } from "@/stories/atoms/icons"
|
|
3
3
|
import { default as cn } from "classnames"
|
|
4
|
-
export interface INestedInputButtonProps
|
|
4
|
+
export interface INestedInputButtonProps
|
|
5
|
+
extends Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> {
|
|
5
6
|
/** Icon to be included*/
|
|
6
7
|
icon?: IDynamicIconProps
|
|
7
8
|
/** CTA label */
|
|
@@ -10,9 +11,6 @@ export interface INestedInputButtonProps {
|
|
|
10
11
|
align: "left" | "right"
|
|
11
12
|
/** Show the CTA without Background color and a border seperator */
|
|
12
13
|
isClear?: boolean
|
|
13
|
-
/** Onclick callback */
|
|
14
|
-
onClickHandler?(): void
|
|
15
|
-
buttonProps?: React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>
|
|
16
14
|
}
|
|
17
15
|
|
|
18
16
|
const NestedInputButton: React.FC<INestedInputButtonProps> = ({
|
|
@@ -20,12 +18,10 @@ const NestedInputButton: React.FC<INestedInputButtonProps> = ({
|
|
|
20
18
|
ctaLabel,
|
|
21
19
|
align = "right",
|
|
22
20
|
isClear = false,
|
|
23
|
-
|
|
24
|
-
buttonProps
|
|
21
|
+
...props
|
|
25
22
|
}) => {
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
}
|
|
23
|
+
const { ...buttonProps } = props
|
|
24
|
+
const { onClick } = buttonProps
|
|
29
25
|
const buttonStyle = cn(
|
|
30
26
|
"relative flex items-center space-x-2 px-4 py-2 leading-5 border border-gray-300 text-sm font-medium focus:outline-none focus:ring-1 focus:ring-purple-500 focus:border-purple-500",
|
|
31
27
|
{
|
|
@@ -35,10 +31,10 @@ const NestedInputButton: React.FC<INestedInputButtonProps> = ({
|
|
|
35
31
|
"rounded-l text-gray-500 -mr-px": align === "left"
|
|
36
32
|
},
|
|
37
33
|
{
|
|
38
|
-
"cursor-default": !
|
|
34
|
+
"cursor-default": !onClick
|
|
39
35
|
},
|
|
40
36
|
{
|
|
41
|
-
"hover:bg-gray-100":
|
|
37
|
+
"hover:bg-gray-100": onClick && !isClear
|
|
42
38
|
},
|
|
43
39
|
{
|
|
44
40
|
"!border-l-white": isClear && align === "right"
|
|
@@ -54,7 +50,16 @@ const NestedInputButton: React.FC<INestedInputButtonProps> = ({
|
|
|
54
50
|
}
|
|
55
51
|
)
|
|
56
52
|
return (
|
|
57
|
-
<button
|
|
53
|
+
<button
|
|
54
|
+
{...{
|
|
55
|
+
...buttonProps,
|
|
56
|
+
className: buttonStyle,
|
|
57
|
+
onClick: (e) => {
|
|
58
|
+
e.preventDefault()
|
|
59
|
+
onClick && onClick(e)
|
|
60
|
+
}
|
|
61
|
+
}}
|
|
62
|
+
>
|
|
58
63
|
{icon && <DynamicIcon {...{ ...icon, className: "text-gray-400 h-5 w-5" }} />}
|
|
59
64
|
{ctaLabel && <span>{ctaLabel}</span>}
|
|
60
65
|
</button>
|
|
@@ -5,7 +5,7 @@ import Dropdown, { IDropdownProps, IItemProp } from "./DropdownComponent"
|
|
|
5
5
|
import EmptySectionPlaceholder, { IEmptySectionPlaceholderProps } from "./EmptySectionPlaceholder"
|
|
6
6
|
import FormInputWithAddons, { IFormInputWithAddonsProps } from "./FormInputWithAddons"
|
|
7
7
|
import TextInputSelect, { ITextInputSelectProps } from "./TextInputSelect"
|
|
8
|
-
|
|
8
|
+
import AnimatedFormInputWithAddons, { IAnimatedFormInputWithAddons } from "./AnimatedFormInputWithAddons"
|
|
9
9
|
export type {
|
|
10
10
|
IAnimatedLabelInputProps,
|
|
11
11
|
IAnimatedLabelTextAreaProps,
|
|
@@ -14,7 +14,8 @@ export type {
|
|
|
14
14
|
IEmptySectionPlaceholderProps,
|
|
15
15
|
IItemProp,
|
|
16
16
|
IFormInputWithAddonsProps,
|
|
17
|
-
ITextInputSelectProps
|
|
17
|
+
ITextInputSelectProps,
|
|
18
|
+
IAnimatedFormInputWithAddons
|
|
18
19
|
}
|
|
19
20
|
export {
|
|
20
21
|
AnimatedLabelInput,
|
|
@@ -23,5 +24,6 @@ export {
|
|
|
23
24
|
Dropdown,
|
|
24
25
|
EmptySectionPlaceholder,
|
|
25
26
|
FormInputWithAddons,
|
|
26
|
-
TextInputSelect
|
|
27
|
+
TextInputSelect,
|
|
28
|
+
AnimatedFormInputWithAddons
|
|
27
29
|
}
|