@agility/plenum-ui 2.0.0-rc6 → 2.0.0-rc8
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 +129 -43
- package/dist/index.js +283 -96
- package/dist/index.js.map +4 -4
- package/dist/lib/tailwind.css +33 -8
- package/dist/types/stories/index.d.ts +4 -4
- package/dist/types/stories/molecules/index.d.ts +3 -3
- package/dist/types/stories/molecules/inputs/InputField/InputField.d.ts +1 -1
- package/dist/types/stories/molecules/inputs/index.d.ts +3 -3
- package/dist/types/stories/molecules/inputs/textArea/TextArea.d.ts +30 -21
- package/dist/types/stories/molecules/inputs/textArea/TextArea.stories.d.ts +4 -4
- package/dist/types/stories/molecules/inputs/textArea/index.d.ts +3 -3
- package/dist/types/stories/organisms/AnimatedLabelInput/AnimatedLabelInput.d.ts +2 -2
- package/dist/types/stories/organisms/TextInputSelect/InputSelect.d.ts +16 -0
- package/dist/types/stories/organisms/TextInputSelect/TextInputSelect.d.ts +48 -0
- package/dist/types/stories/organisms/TextInputSelect/index.d.ts +3 -0
- package/dist/types/stories/organisms/index.d.ts +3 -2
- package/package.json +1 -1
- package/stories/index.ts +10 -6
- package/stories/molecules/index.ts +4 -4
- package/stories/molecules/inputs/InputField/InputField.tsx +1 -0
- package/stories/molecules/inputs/index.ts +3 -3
- package/stories/molecules/inputs/textArea/TextArea.stories.ts +7 -5
- package/stories/molecules/inputs/textArea/TextArea.tsx +110 -49
- package/stories/molecules/inputs/textArea/index.ts +3 -3
- package/stories/organisms/AnimatedLabelInput/AnimatedLabelInput.tsx +3 -3
- package/stories/organisms/TextInputSelect/InputSelect.tsx +59 -0
- package/stories/organisms/TextInputSelect/TextInputSelect.stories.tsx +33 -0
- package/stories/organisms/TextInputSelect/TextInputSelect.tsx +186 -0
- package/stories/organisms/TextInputSelect/index.tsx +3 -0
- package/stories/organisms/index.ts +4 -2
package/dist/index.d.ts
CHANGED
|
@@ -401,19 +401,19 @@ declare module '@agility/plenum-ui/stories/atoms/loaders/index' {
|
|
|
401
401
|
}
|
|
402
402
|
declare module '@agility/plenum-ui/stories/index' {
|
|
403
403
|
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 "@agility/plenum-ui/stories/atoms/index";
|
|
404
|
-
import { ICheckboxProps, IComboboxProps, IInputFieldProps, IInputLabelProps, INestedInputButtonProps, IRadioProps, ISelectProps,
|
|
405
|
-
import { IAnimatedLabelInputProps, IButtonDropdownProps, IDropdownClassnames, IDropdownProps, IEmptySectionPlaceholderProps, IItemProp, IFormInputWithAddonsProps, AnimatedLabelInput, ButtonDropdown, Dropdown, EmptySectionPlaceholder, FormInputWithAddons } from "@agility/plenum-ui/stories/organisms/index";
|
|
406
|
-
export type { IAvatarProps, IBadgeProps, IButtonProps, ICapsuleProps, IDynamicIconProps, IIconWithShadowProps, ILoaderProps, IRadialProgressProps, ICheckboxProps, IComboboxProps, IInputFieldProps, IInputLabelProps, INestedInputButtonProps, IRadioProps, ISelectProps,
|
|
407
|
-
export { Avatar, Checkbox, Combobox, InputField, InputLabel, NestedInputButton, Radio, Select,
|
|
404
|
+
import { ICheckboxProps, IComboboxProps, IInputFieldProps, IInputLabelProps, INestedInputButtonProps, IRadioProps, ISelectProps, ITextareaProps, IToggleSwitchProps, AcceptedInputTypes, Checkbox, Combobox, InputField, InputLabel, NestedInputButton, Radio, Select, Textarea, ToggleSwitch, TextInput, ITextInputProps } from "@agility/plenum-ui/stories/molecules/index";
|
|
405
|
+
import { IAnimatedLabelInputProps, IButtonDropdownProps, IDropdownClassnames, IDropdownProps, IEmptySectionPlaceholderProps, IItemProp, IFormInputWithAddonsProps, AnimatedLabelInput, ButtonDropdown, Dropdown, EmptySectionPlaceholder, FormInputWithAddons, TextInputSelect, ITextInputSelectProps } from "@agility/plenum-ui/stories/organisms/index";
|
|
406
|
+
export type { IAvatarProps, IBadgeProps, IButtonProps, ICapsuleProps, ITextInputSelectProps, IDynamicIconProps, IIconWithShadowProps, ILoaderProps, IRadialProgressProps, ICheckboxProps, IComboboxProps, IInputFieldProps, IInputLabelProps, INestedInputButtonProps, IRadioProps, ISelectProps, ITextareaProps, IToggleSwitchProps, AcceptedInputTypes, IAnimatedLabelInputProps, IButtonDropdownProps, IDropdownClassnames, IDropdownProps, IEmptySectionPlaceholderProps, IItemProp, IFormInputWithAddonsProps, UnifiedIconName, IconName, FAIconName, BTNActionType, ITextInputProps };
|
|
407
|
+
export { Avatar, Checkbox, Combobox, InputField, InputLabel, NestedInputButton, Radio, Select, Textarea, ToggleSwitch, AnimatedLabelInput, ButtonDropdown, Dropdown, EmptySectionPlaceholder, FormInputWithAddons, Badge, Button, Capsule, DynamicIcon, IconWithShadow, Loader, RadialProgress, isFAIcon, isHeroIcon, isTablerIcon, isUnifiedIconName, TextInput, TextInputSelect };
|
|
408
408
|
|
|
409
409
|
}
|
|
410
410
|
declare module '@agility/plenum-ui/stories/layouts/index' {
|
|
411
411
|
|
|
412
412
|
}
|
|
413
413
|
declare module '@agility/plenum-ui/stories/molecules/index' {
|
|
414
|
-
import { ICheckboxProps, IComboboxProps, IInputFieldProps, IInputLabelProps, INestedInputButtonProps, IRadioProps, ISelectProps,
|
|
415
|
-
export type { ICheckboxProps, IComboboxProps, IInputFieldProps, IInputLabelProps, INestedInputButtonProps, IRadioProps, ISelectProps,
|
|
416
|
-
export { Checkbox, Combobox, InputField, InputLabel, NestedInputButton, Radio, Select,
|
|
414
|
+
import { ICheckboxProps, IComboboxProps, IInputFieldProps, IInputLabelProps, INestedInputButtonProps, IRadioProps, ISelectProps, ITextareaProps, IToggleSwitchProps, AcceptedInputTypes, Checkbox, Combobox, InputField, InputLabel, NestedInputButton, Radio, Select, Textarea, ToggleSwitch, ITextInputProps, TextInput } from "@agility/plenum-ui/stories/molecules/inputs/index";
|
|
415
|
+
export type { ICheckboxProps, IComboboxProps, IInputFieldProps, IInputLabelProps, INestedInputButtonProps, IRadioProps, ISelectProps, ITextareaProps, IToggleSwitchProps, AcceptedInputTypes, ITextInputProps };
|
|
416
|
+
export { Checkbox, Combobox, InputField, InputLabel, NestedInputButton, Radio, Select, Textarea, ToggleSwitch, TextInput };
|
|
417
417
|
|
|
418
418
|
}
|
|
419
419
|
declare module '@agility/plenum-ui/stories/molecules/inputs/InputCounter/InputCounter' {
|
|
@@ -436,7 +436,7 @@ declare module '@agility/plenum-ui/stories/molecules/inputs/InputCounter/index'
|
|
|
436
436
|
}
|
|
437
437
|
declare module '@agility/plenum-ui/stories/molecules/inputs/InputField/InputField' {
|
|
438
438
|
import React from "react";
|
|
439
|
-
export type AcceptedInputTypes = "date" | "datetime-local" | "email" | "month" | "number" | "password" | "search" | "submit" | "tel" | "text" | "url";
|
|
439
|
+
export type AcceptedInputTypes = "date" | "datetime-local" | "email" | "month" | "number" | "password" | "search" | "submit" | "tel" | "text" | "url" | "currency";
|
|
440
440
|
export interface IInputFieldProps extends React.ComponentPropsWithoutRef<"input"> {
|
|
441
441
|
/** Callback on change */
|
|
442
442
|
handleChange: (value: string) => void;
|
|
@@ -678,11 +678,11 @@ declare module '@agility/plenum-ui/stories/molecules/inputs/index' {
|
|
|
678
678
|
import NestedInputButton, { INestedInputButtonProps } from "@agility/plenum-ui/stories/molecules/inputs/NestedInputButton/index";
|
|
679
679
|
import Radio, { IRadioProps } from "@agility/plenum-ui/stories/molecules/inputs/radio/index";
|
|
680
680
|
import Select, { ISelectProps } from "@agility/plenum-ui/stories/molecules/inputs/select/index";
|
|
681
|
-
import
|
|
681
|
+
import Textarea, { ITextareaProps } from "@agility/plenum-ui/stories/molecules/inputs/textArea/index";
|
|
682
682
|
import TextInput, { ITextInputProps } from "@agility/plenum-ui/stories/molecules/inputs/TextInput/index";
|
|
683
683
|
import ToggleSwitch, { IToggleSwitchProps } from "@agility/plenum-ui/stories/molecules/inputs/toggleSwitch/index";
|
|
684
|
-
export type { ICheckboxProps, IComboboxProps, IInputFieldProps, IInputLabelProps, INestedInputButtonProps, IRadioProps, ISelectProps,
|
|
685
|
-
export { Checkbox, Combobox, InputField, InputLabel, NestedInputButton, Radio, Select,
|
|
684
|
+
export type { ICheckboxProps, IComboboxProps, IInputFieldProps, IInputLabelProps, INestedInputButtonProps, IRadioProps, ISelectProps, ITextareaProps, ITextInputProps, IToggleSwitchProps, AcceptedInputTypes };
|
|
685
|
+
export { Checkbox, Combobox, InputField, InputLabel, NestedInputButton, Radio, Select, Textarea, ToggleSwitch, TextInput };
|
|
686
686
|
|
|
687
687
|
}
|
|
688
688
|
declare module '@agility/plenum-ui/stories/molecules/inputs/radio/Radio' {
|
|
@@ -776,47 +776,56 @@ declare module '@agility/plenum-ui/stories/molecules/inputs/select/index' {
|
|
|
776
776
|
|
|
777
777
|
}
|
|
778
778
|
declare module '@agility/plenum-ui/stories/molecules/inputs/textArea/TextArea' {
|
|
779
|
-
|
|
780
|
-
export interface
|
|
781
|
-
/**
|
|
782
|
-
|
|
783
|
-
/**
|
|
784
|
-
|
|
785
|
-
/**
|
|
786
|
-
|
|
787
|
-
/**
|
|
788
|
-
isFocused?: boolean;
|
|
789
|
-
/** Error condition */
|
|
779
|
+
import React from "react";
|
|
780
|
+
export interface ITextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "onChange"> {
|
|
781
|
+
/** Input ID */
|
|
782
|
+
id?: string;
|
|
783
|
+
/** Input Name */
|
|
784
|
+
name?: string;
|
|
785
|
+
/** Label for the input */
|
|
786
|
+
label?: string;
|
|
787
|
+
/** Error state */
|
|
790
788
|
isError?: boolean;
|
|
789
|
+
/** If field is required */
|
|
790
|
+
isRequired?: boolean;
|
|
791
791
|
/** Disabled state */
|
|
792
792
|
isDisabled?: boolean;
|
|
793
|
-
/**
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
793
|
+
/** Set default value */
|
|
794
|
+
defaultValue?: string;
|
|
795
|
+
value?: string;
|
|
796
|
+
/** Message shown under the text field */
|
|
797
|
+
message?: string;
|
|
798
|
+
/** Input character counter */
|
|
799
|
+
isShowCounter?: boolean;
|
|
800
|
+
/** Max length of input character */
|
|
801
|
+
maxLength?: number;
|
|
802
|
+
/** Callback on change */
|
|
803
|
+
onChange?(value: string): void;
|
|
804
|
+
/** Number of rows */
|
|
805
|
+
rows?: number;
|
|
806
|
+
/** Number of cols */
|
|
807
|
+
cols?: number;
|
|
808
|
+
placeholder?: string;
|
|
801
809
|
className?: string;
|
|
810
|
+
ref?: React.LegacyRef<HTMLTextAreaElement>;
|
|
802
811
|
}
|
|
803
|
-
const
|
|
804
|
-
export default
|
|
812
|
+
const Textarea: React.FC<ITextareaProps>;
|
|
813
|
+
export default Textarea;
|
|
805
814
|
|
|
806
815
|
}
|
|
807
816
|
declare module '@agility/plenum-ui/stories/molecules/inputs/textArea/TextArea.stories' {
|
|
808
817
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
809
|
-
import
|
|
810
|
-
const meta: Meta<typeof
|
|
811
|
-
type Story = StoryObj<typeof
|
|
812
|
-
export const
|
|
818
|
+
import Textarea from "@agility/plenum-ui/stories/molecules/inputs/textArea/TextArea";
|
|
819
|
+
const meta: Meta<typeof Textarea>;
|
|
820
|
+
type Story = StoryObj<typeof Textarea>;
|
|
821
|
+
export const DefaultTextarea: Story;
|
|
813
822
|
export default meta;
|
|
814
823
|
|
|
815
824
|
}
|
|
816
825
|
declare module '@agility/plenum-ui/stories/molecules/inputs/textArea/index' {
|
|
817
|
-
import
|
|
818
|
-
export type {
|
|
819
|
-
export default
|
|
826
|
+
import TextArea, { ITextareaProps } from "@agility/plenum-ui/stories/molecules/inputs/textArea/TextArea";
|
|
827
|
+
export type { ITextareaProps };
|
|
828
|
+
export default TextArea;
|
|
820
829
|
|
|
821
830
|
}
|
|
822
831
|
declare module '@agility/plenum-ui/stories/molecules/inputs/toggleSwitch/ToggleSwitch' {
|
|
@@ -849,7 +858,7 @@ declare module '@agility/plenum-ui/stories/molecules/inputs/toggleSwitch/index'
|
|
|
849
858
|
declare module '@agility/plenum-ui/stories/organisms/AnimatedLabelInput/AnimatedLabelInput' {
|
|
850
859
|
import React from "react";
|
|
851
860
|
import { IInputFieldProps } from "@/stories/molecules/inputs/InputField";
|
|
852
|
-
import {
|
|
861
|
+
import { ITextareaProps } from "@/stories/molecules/inputs/textArea/TextArea";
|
|
853
862
|
interface ILabelProps extends React.ComponentPropsWithoutRef<"label"> {
|
|
854
863
|
display: string;
|
|
855
864
|
}
|
|
@@ -858,7 +867,7 @@ declare module '@agility/plenum-ui/stories/organisms/AnimatedLabelInput/Animated
|
|
|
858
867
|
containerStyles?: string;
|
|
859
868
|
message?: string;
|
|
860
869
|
input?: IInputFieldProps;
|
|
861
|
-
textarea?:
|
|
870
|
+
textarea?: ITextareaProps;
|
|
862
871
|
required?: boolean;
|
|
863
872
|
isError?: boolean;
|
|
864
873
|
label: ILabelProps;
|
|
@@ -1005,6 +1014,82 @@ declare module '@agility/plenum-ui/stories/organisms/FormInputWithAddons/index'
|
|
|
1005
1014
|
export type { IFormInputWithAddonsProps };
|
|
1006
1015
|
export default FormInputWithAddons;
|
|
1007
1016
|
|
|
1017
|
+
}
|
|
1018
|
+
declare module '@agility/plenum-ui/stories/organisms/TextInputSelect/InputSelect' {
|
|
1019
|
+
import { FC } from "react";
|
|
1020
|
+
export type SelectOptions = {
|
|
1021
|
+
label: string;
|
|
1022
|
+
value: string;
|
|
1023
|
+
};
|
|
1024
|
+
export interface InputSelectProps {
|
|
1025
|
+
align: "left" | "right";
|
|
1026
|
+
/** Show the CTA without Background color and a border seperator */
|
|
1027
|
+
inputOptions: SelectOptions[];
|
|
1028
|
+
/** Onclick callback */
|
|
1029
|
+
onSelectOption?(value: string): void;
|
|
1030
|
+
className?: string;
|
|
1031
|
+
isDisabled?: boolean;
|
|
1032
|
+
}
|
|
1033
|
+
/** Comment */
|
|
1034
|
+
export const InputSelect: FC<InputSelectProps>;
|
|
1035
|
+
|
|
1036
|
+
}
|
|
1037
|
+
declare module '@agility/plenum-ui/stories/organisms/TextInputSelect/TextInputSelect' {
|
|
1038
|
+
import { FC } from "react";
|
|
1039
|
+
import { AcceptedInputTypes } from "@/stories/molecules";
|
|
1040
|
+
export type SelectOptions = {
|
|
1041
|
+
label: string;
|
|
1042
|
+
value: string;
|
|
1043
|
+
};
|
|
1044
|
+
export interface ITextInputSelectProps {
|
|
1045
|
+
/** Input type*/
|
|
1046
|
+
type: AcceptedInputTypes;
|
|
1047
|
+
/** Input ID */
|
|
1048
|
+
id?: string;
|
|
1049
|
+
/** Input Name */
|
|
1050
|
+
name?: string;
|
|
1051
|
+
/** Label for the input */
|
|
1052
|
+
label?: string;
|
|
1053
|
+
/** placeholder for the input */
|
|
1054
|
+
placeholder?: string;
|
|
1055
|
+
/** Force the focus state on the input */
|
|
1056
|
+
isFocused?: boolean;
|
|
1057
|
+
/** Error state */
|
|
1058
|
+
isError?: boolean;
|
|
1059
|
+
/** If field is required */
|
|
1060
|
+
isRequired?: boolean;
|
|
1061
|
+
/** Disabled state */
|
|
1062
|
+
isDisabled?: boolean;
|
|
1063
|
+
/** Set default value */
|
|
1064
|
+
defaultValue?: string;
|
|
1065
|
+
/** Set value */
|
|
1066
|
+
value: string;
|
|
1067
|
+
/** Message shown under the text field */
|
|
1068
|
+
message?: string;
|
|
1069
|
+
/** Input character counter */
|
|
1070
|
+
isShowCounter?: boolean;
|
|
1071
|
+
/** Max length of input character */
|
|
1072
|
+
maxLength?: number;
|
|
1073
|
+
/** Select input location */
|
|
1074
|
+
selectLocation?: "left" | "right";
|
|
1075
|
+
/** Prefix */
|
|
1076
|
+
prefix?: string;
|
|
1077
|
+
/** List of options to show on the select field */
|
|
1078
|
+
inputOptions?: SelectOptions[];
|
|
1079
|
+
/** Callback on base input */
|
|
1080
|
+
onChange?(value: string): void;
|
|
1081
|
+
/** Callback on input select field */
|
|
1082
|
+
onSelectOption?(value: string): void;
|
|
1083
|
+
}
|
|
1084
|
+
const TextInputSelect: FC<ITextInputSelectProps>;
|
|
1085
|
+
export default TextInputSelect;
|
|
1086
|
+
|
|
1087
|
+
}
|
|
1088
|
+
declare module '@agility/plenum-ui/stories/organisms/TextInputSelect/index' {
|
|
1089
|
+
import TextInputSelect, { ITextInputSelectProps } from "@agility/plenum-ui/stories/organisms/TextInputSelect/TextInputSelect";
|
|
1090
|
+
export type { ITextInputSelectProps };
|
|
1091
|
+
export default TextInputSelect;
|
|
1092
|
+
|
|
1008
1093
|
}
|
|
1009
1094
|
declare module '@agility/plenum-ui/stories/organisms/index' {
|
|
1010
1095
|
import AnimatedLabelInput, { IAnimatedLabelInputProps } from "@agility/plenum-ui/stories/organisms/AnimatedLabelInput/index";
|
|
@@ -1012,8 +1097,9 @@ declare module '@agility/plenum-ui/stories/organisms/index' {
|
|
|
1012
1097
|
import Dropdown, { IDropdownClassnames, IDropdownProps, IItemProp } from "@agility/plenum-ui/stories/organisms/DropdownComponent/index";
|
|
1013
1098
|
import EmptySectionPlaceholder, { IEmptySectionPlaceholderProps } from "@agility/plenum-ui/stories/organisms/EmptySectionPlaceholder/index";
|
|
1014
1099
|
import FormInputWithAddons, { IFormInputWithAddonsProps } from "@agility/plenum-ui/stories/organisms/FormInputWithAddons/index";
|
|
1015
|
-
|
|
1016
|
-
export {
|
|
1100
|
+
import TextInputSelect, { ITextInputSelectProps } from "@agility/plenum-ui/stories/organisms/TextInputSelect/index";
|
|
1101
|
+
export type { IAnimatedLabelInputProps, IButtonDropdownProps, IDropdownClassnames, IDropdownProps, IEmptySectionPlaceholderProps, IItemProp, IFormInputWithAddonsProps, ITextInputSelectProps };
|
|
1102
|
+
export { AnimatedLabelInput, ButtonDropdown, Dropdown, EmptySectionPlaceholder, FormInputWithAddons, TextInputSelect };
|
|
1017
1103
|
|
|
1018
1104
|
}
|
|
1019
1105
|
declare module '@agility/plenum-ui/utils/types' {
|