@agility/plenum-ui 2.0.0-rc2 → 2.0.0-rc21

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.
Files changed (99) hide show
  1. package/README.md +41 -11
  2. package/build.js +30 -25
  3. package/dist/index.d.ts +279 -93
  4. package/dist/index.js +1 -5935
  5. package/dist/index.js.map +4 -4
  6. package/dist/tailwind.css +63516 -0
  7. package/dist/types/stories/atoms/buttons/Button/Alternative/Alternative.stories.d.ts +1 -0
  8. package/dist/types/stories/atoms/buttons/Button/Button.d.ts +7 -9
  9. package/dist/types/stories/atoms/buttons/Button/Danger/Danger.stories.d.ts +1 -0
  10. package/dist/types/stories/atoms/buttons/Button/Primary/Primary.stories.d.ts +1 -0
  11. package/dist/types/stories/atoms/buttons/Button/Secondary/Secondary.stories.d.ts +1 -0
  12. package/dist/types/stories/atoms/buttons/Capsule/Capsule.d.ts +1 -1
  13. package/dist/types/stories/atoms/icons/DynamicIcon.d.ts +1 -1
  14. package/dist/types/stories/atoms/icons/TablerIcon.d.ts +1 -1
  15. package/dist/types/stories/index.d.ts +4 -4
  16. package/dist/types/stories/molecules/index.d.ts +3 -3
  17. package/dist/types/stories/molecules/inputs/InputCounter/InputCounter.d.ts +10 -0
  18. package/dist/types/stories/molecules/inputs/InputCounter/index.d.ts +2 -0
  19. package/dist/types/stories/molecules/inputs/InputField/InputField.d.ts +8 -4
  20. package/dist/types/stories/molecules/inputs/TextInput/TextInput.d.ts +39 -0
  21. package/dist/types/stories/molecules/inputs/TextInput/index.d.ts +4 -0
  22. package/dist/types/stories/molecules/inputs/index.d.ts +5 -4
  23. package/dist/types/stories/molecules/inputs/select/Select.d.ts +2 -2
  24. package/dist/types/stories/molecules/inputs/textArea/TextArea.d.ts +34 -21
  25. package/dist/types/stories/molecules/inputs/textArea/TextArea.stories.d.ts +4 -4
  26. package/dist/types/stories/molecules/inputs/textArea/index.d.ts +3 -3
  27. package/dist/types/stories/molecules/inputs/toggleSwitch/ToggleSwitch.d.ts +9 -7
  28. package/dist/types/stories/organisms/AnimatedLabelInput/AnimatedLabelInput.d.ts +3 -5
  29. package/dist/types/stories/organisms/AnimatedLabelInput/index.d.ts +1 -1
  30. package/dist/types/stories/organisms/AnimatedLabelTextArea/AnimatedLabelTextArea.d.ts +12 -0
  31. package/dist/types/stories/organisms/AnimatedLabelTextArea/index.d.ts +3 -0
  32. package/dist/types/stories/organisms/DropdownComponent/DropdownComponent.d.ts +18 -15
  33. package/dist/types/stories/organisms/DropdownComponent/index.d.ts +2 -2
  34. package/dist/types/stories/organisms/EmptySectionPlaceholder/index.d.ts +1 -1
  35. package/dist/types/stories/organisms/TextInputSelect/InputSelect.d.ts +16 -0
  36. package/dist/types/stories/organisms/TextInputSelect/TextInputSelect.d.ts +48 -0
  37. package/dist/types/stories/organisms/TextInputSelect/index.d.ts +3 -0
  38. package/dist/types/stories/organisms/index.d.ts +5 -3
  39. package/local.sh +100 -0
  40. package/package.json +35 -18
  41. package/rollup.config.mjs +42 -0
  42. package/stories/Introduction.mdx +1 -1
  43. package/stories/atoms/buttons/Button/Alternative/Alternative.stories.ts +7 -0
  44. package/stories/atoms/buttons/Button/Button.tsx +45 -17
  45. package/stories/atoms/buttons/Button/Danger/Danger.stories.ts +7 -0
  46. package/stories/atoms/buttons/Button/Primary/Primary.stories.ts +7 -0
  47. package/stories/atoms/buttons/Button/Secondary/Secondary.stories.ts +7 -0
  48. package/stories/atoms/buttons/Capsule/Capsule.tsx +2 -1
  49. package/stories/atoms/icons/DynamicIcon.tsx +3 -2
  50. package/stories/atoms/icons/TablerIcon.tsx +1 -1
  51. package/stories/atoms/loaders/Loader.tsx +12 -6
  52. package/stories/index.ts +22 -10
  53. package/stories/molecules/index.ts +22 -6
  54. package/stories/molecules/inputs/InputCounter/InputCounter.stories.tsx +18 -0
  55. package/stories/molecules/inputs/InputCounter/InputCounter.tsx +24 -0
  56. package/stories/molecules/inputs/InputCounter/index.tsx +3 -0
  57. package/stories/molecules/inputs/InputField/InputField.tsx +13 -7
  58. package/stories/molecules/inputs/TextInput/TextInput.stories.tsx +32 -0
  59. package/stories/molecules/inputs/TextInput/TextInput.tsx +165 -0
  60. package/stories/molecules/inputs/TextInput/index.tsx +5 -0
  61. package/stories/molecules/inputs/checkbox/Checkbox.tsx +1 -1
  62. package/stories/molecules/inputs/index.ts +18 -4
  63. package/stories/molecules/inputs/select/Select.tsx +1 -1
  64. package/stories/molecules/inputs/textArea/TextArea.stories.ts +7 -5
  65. package/stories/molecules/inputs/textArea/TextArea.tsx +139 -48
  66. package/stories/molecules/inputs/textArea/index.ts +3 -3
  67. package/stories/molecules/inputs/toggleSwitch/ToggleSwitch.tsx +61 -57
  68. package/stories/molecules/tabs/index.tsx +2 -3
  69. package/stories/organisms/AnimatedLabelInput/AnimatedLabelInput.stories.tsx +10 -1
  70. package/stories/organisms/AnimatedLabelInput/AnimatedLabelInput.tsx +43 -37
  71. package/stories/organisms/AnimatedLabelInput/index.tsx +1 -1
  72. package/stories/organisms/AnimatedLabelTextArea/AnimatedLabelTextArea.stories.tsx +26 -0
  73. package/stories/organisms/AnimatedLabelTextArea/AnimatedLabelTextArea.tsx +61 -0
  74. package/stories/organisms/AnimatedLabelTextArea/index.tsx +3 -0
  75. package/stories/organisms/ButtonDropdown/ButtonDropdown.stories.tsx +59 -58
  76. package/stories/organisms/ButtonDropdown/ButtonDropdown.tsx +13 -16
  77. package/stories/organisms/DropdownComponent/Dropdown.stories.tsx +1 -1
  78. package/stories/organisms/DropdownComponent/DropdownComponent.tsx +155 -131
  79. package/stories/organisms/DropdownComponent/dropdownItems.ts +32 -8
  80. package/stories/organisms/DropdownComponent/index.ts +2 -2
  81. package/stories/organisms/EmptySectionPlaceholder/index.tsx +2 -1
  82. package/stories/organisms/FormInputWithAddons/FormInputWithAddons.tsx +7 -2
  83. package/stories/organisms/TextInputSelect/InputSelect.tsx +59 -0
  84. package/stories/organisms/TextInputSelect/TextInputSelect.stories.tsx +33 -0
  85. package/stories/organisms/TextInputSelect/TextInputSelect.tsx +186 -0
  86. package/stories/organisms/TextInputSelect/index.tsx +3 -0
  87. package/stories/organisms/index.ts +15 -4
  88. package/tsconfig.lib.json +13 -6
  89. package/watch.js +50 -0
  90. package/.yarnrc.yml +0 -1
  91. package/dist/types/stories/layouts/index.d.ts +0 -0
  92. package/stories/layouts/CardLayout/CardLayout.stories.tsx +0 -18
  93. package/stories/layouts/CardLayout/CardLayout.tsx +0 -22
  94. package/stories/layouts/CardLayout/index.tsx +0 -3
  95. package/stories/layouts/ModalLayout/ModalLayout.stories.tsx +0 -18
  96. package/stories/layouts/ModalLayout/ModalLayout.tsx +0 -22
  97. package/stories/layouts/ModalLayout/index.tsx +0 -3
  98. package/stories/layouts/index.ts +0 -0
  99. package/stories/organisms/DropdownComponent/Dropdown.test.tsx +0 -0
package/dist/index.d.ts CHANGED
@@ -75,6 +75,7 @@ declare module '@agility/plenum-ui/stories/atoms/buttons/Button/Alternative/Alte
75
75
  export const AlternativeTrailingIcon: Story;
76
76
  export const AlternativeLeadingIcon: Story;
77
77
  export const AlternativeExtraSmall: Story;
78
+ export const AlternativeSimpleIconName: Story;
78
79
  export const AlternativeSmall: Story;
79
80
  export const AlternativeMedium: Story;
80
81
  export const AlternativeLarge: Story;
@@ -82,18 +83,18 @@ declare module '@agility/plenum-ui/stories/atoms/buttons/Button/Alternative/Alte
82
83
 
83
84
  }
84
85
  declare module '@agility/plenum-ui/stories/atoms/buttons/Button/Button' {
85
- import { HTMLAttributeAnchorTarget } from "react";
86
- import { IDynamicIconProps } from "@agility/plenum-ui/stories/atoms/icons/index";
86
+ import React, { HTMLAttributeAnchorTarget } from "react";
87
+ import { UnifiedIconName, IDynamicIconProps } from "@agility/plenum-ui/stories/atoms/icons/index";
87
88
  export type BTNActionType = "primary" | "secondary" | "alternative" | "danger";
88
- export interface IButtonProps extends React.ComponentPropsWithoutRef<"button"> {
89
+ export interface IButtonProps extends Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> {
89
90
  /** Is the button a Primary CTA, alternative or danger button? */
90
- actionType: BTNActionType;
91
+ actionType?: BTNActionType;
91
92
  /** How lg should the button be? - Defaults to 'base'. */
92
93
  size?: "xs" | "sm" | "md" | "lg" | "xl";
93
94
  /** The Button's text content. */
94
95
  label: string;
95
96
  /** The Icon to be displayed inside the button. */
96
- icon?: IDynamicIconProps;
97
+ icon?: IDynamicIconProps | UnifiedIconName;
97
98
  /** Does the button width grow to fill it's container? */
98
99
  fullWidth?: boolean;
99
100
  /** Optionally render as anchor tag */
@@ -109,11 +110,9 @@ declare module '@agility/plenum-ui/stories/atoms/buttons/Button/Button' {
109
110
  /** Is the associated content loading? */
110
111
  isLoading?: boolean;
111
112
  className?: string;
113
+ iconObj?: React.ReactNode;
112
114
  }
113
- /**
114
- * Primary UI component for user interaction
115
- */
116
- const Button: ({ actionType, size, label, icon, CustomSVGIcon, fullWidth, iconPosition, asLink, isLoading, className, ...props }: IButtonProps) => import("react/jsx-runtime").JSX.Element;
115
+ const Button: React.ForwardRefExoticComponent<IButtonProps & React.RefAttributes<HTMLButtonElement>>;
117
116
  export default Button;
118
117
 
119
118
  }
@@ -126,6 +125,7 @@ declare module '@agility/plenum-ui/stories/atoms/buttons/Button/Danger/Danger.st
126
125
  export const Danger: Story;
127
126
  export const DangerTrailingIcon: Story;
128
127
  export const DangerLeadingIcon: Story;
128
+ export const DangerSimpleIconName: Story;
129
129
  export const DangerExtraSmall: Story;
130
130
  export const DangerSmall: Story;
131
131
  export const DangerMedium: Story;
@@ -141,6 +141,7 @@ declare module '@agility/plenum-ui/stories/atoms/buttons/Button/Primary/Primary.
141
141
  type Story = StoryObj<typeof Button>;
142
142
  export const Primary: Story;
143
143
  export const PrimaryLeadingIcon: Story;
144
+ export const PrimarySimpleIconName: Story;
144
145
  export const PrimaryTrailingIcon: Story;
145
146
  export const PrimaryExtraSmall: Story;
146
147
  export const PrimarySmall: Story;
@@ -158,6 +159,7 @@ declare module '@agility/plenum-ui/stories/atoms/buttons/Button/Secondary/Second
158
159
  export const Secondary: Story;
159
160
  export const SecondaryTrailingIcon: Story;
160
161
  export const SecondaryLeadingIcon: Story;
162
+ export const SecondarySimpleIconName: Story;
161
163
  export const SecondaryExtraSmall: Story;
162
164
  export const SecondarySmall: Story;
163
165
  export const SecondaryMedium: Story;
@@ -192,7 +194,7 @@ declare module '@agility/plenum-ui/stories/atoms/buttons/Capsule/Capsule' {
192
194
  /**
193
195
  * Capsule Style Button
194
196
  */
195
- export interface ICapsuleProps extends React.ComponentPropsWithoutRef<"button"> {
197
+ export interface ICapsuleProps extends React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
196
198
  /** Is the button a Primary CTA, alternative or danger button? */
197
199
  actionType: BTNActionType;
198
200
  /** How lg should the button be? - Defaults to 'base'. */
@@ -270,7 +272,7 @@ declare module '@agility/plenum-ui/stories/atoms/icons/DynamicIcon' {
270
272
  export function isTablerIcon(name: UnifiedIconName): name is TablerIconName;
271
273
  export function isFAIcon(name: UnifiedIconName): name is keyof typeof FA;
272
274
  export function isUnifiedIconName(name: UnifiedIconName): name is UnifiedIconName;
273
- export interface IDynamicIconProps extends React.ComponentProps<"i"> {
275
+ export interface IDynamicIconProps {
274
276
  icon: UnifiedIconName;
275
277
  className?: ClassNameWithAutocomplete;
276
278
  outline?: boolean;
@@ -318,7 +320,7 @@ declare module '@agility/plenum-ui/stories/atoms/icons/TablerIcon' {
318
320
  import React from "react";
319
321
  import { TablerIconName } from "@agility/plenum-ui/stories/atoms/icons/tablerIconNames";
320
322
  import { ClassNameWithAutocomplete } from "@/utils/types";
321
- export interface ITablerIconProps extends React.ComponentProps<"i"> {
323
+ export interface ITablerIconProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
322
324
  icon: TablerIconName;
323
325
  className?: ClassNameWithAutocomplete;
324
326
  }
@@ -395,31 +397,46 @@ declare module '@agility/plenum-ui/stories/atoms/loaders/index' {
395
397
  }
396
398
  declare module '@agility/plenum-ui/stories/index' {
397
399
  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";
398
- import { ICheckboxProps, IComboboxProps, IInputFieldProps, IInputLabelProps, INestedInputButtonProps, IRadioProps, ISelectProps, ITextAreaFieldProps, IToggleSwitchProps, AcceptedInputTypes, Checkbox, Combobox, InputField, InputLabel, NestedInputButton, Radio, Select, TextAreaField, ToggleSwitch } from "@agility/plenum-ui/stories/molecules/index";
399
- import { IAnimatedLabelInputProps, IButtonDropdownProps, IDropdownClassnames, IDropdownProps, IEmptySectionPlaceholderProps, IItemProp, IFormInputWithAddonsProps, AnimatedLabelInput, ButtonDropdown, Dropdown, EmptySectionPlaceholder, FormInputWithAddons } from "@agility/plenum-ui/stories/organisms/index";
400
- export type { IAvatarProps, IBadgeProps, IButtonProps, ICapsuleProps, IDynamicIconProps, IIconWithShadowProps, ILoaderProps, IRadialProgressProps, ICheckboxProps, IComboboxProps, IInputFieldProps, IInputLabelProps, INestedInputButtonProps, IRadioProps, ISelectProps, ITextAreaFieldProps, IToggleSwitchProps, AcceptedInputTypes, IAnimatedLabelInputProps, IButtonDropdownProps, IDropdownClassnames, IDropdownProps, IEmptySectionPlaceholderProps, IItemProp, IFormInputWithAddonsProps, UnifiedIconName, IconName, FAIconName, BTNActionType };
401
- export { Avatar, Checkbox, Combobox, InputField, InputLabel, NestedInputButton, Radio, Select, TextAreaField, ToggleSwitch, AnimatedLabelInput, ButtonDropdown, Dropdown, EmptySectionPlaceholder, FormInputWithAddons, Badge, Button, Capsule, DynamicIcon, IconWithShadow, Loader, RadialProgress, isFAIcon, isHeroIcon, isTablerIcon, isUnifiedIconName };
400
+ import { ICheckboxProps, IComboboxProps, IInputFieldProps, IInputLabelProps, INestedInputButtonProps, IRadioProps, ISelectProps, ITextareaProps, IToggleSwitchProps, AcceptedInputTypes, Checkbox, Combobox, InputField, InputLabel, NestedInputButton, Radio, Select, Textarea, ToggleSwitch, TextInput, ITextInputProps, ISimpleSelectOptions } from "@agility/plenum-ui/stories/molecules/index";
401
+ import { IAnimatedLabelInputProps, AnimatedLabelTextArea, IAnimatedLabelTextAreaProps, IButtonDropdownProps, IDropdownProps, IEmptySectionPlaceholderProps, IItemProp, IFormInputWithAddonsProps, AnimatedLabelInput, ButtonDropdown, Dropdown, EmptySectionPlaceholder, FormInputWithAddons, TextInputSelect, ITextInputSelectProps } from "@agility/plenum-ui/stories/organisms/index";
402
+ 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 };
403
+ 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 };
402
404
 
403
405
  }
404
- declare module '@agility/plenum-ui/stories/layouts/index' {
406
+ declare module '@agility/plenum-ui/stories/molecules/index' {
407
+ import { ICheckboxProps, IComboboxProps, IInputFieldProps, IInputLabelProps, INestedInputButtonProps, IRadioProps, ISelectProps, ISimpleSelectOptions, ITextareaProps, IToggleSwitchProps, AcceptedInputTypes, Checkbox, Combobox, InputField, InputLabel, NestedInputButton, Radio, Select, Textarea, ToggleSwitch, ITextInputProps, TextInput } from "@agility/plenum-ui/stories/molecules/inputs/index";
408
+ export type { ICheckboxProps, IComboboxProps, IInputFieldProps, IInputLabelProps, INestedInputButtonProps, IRadioProps, ISelectProps, ISimpleSelectOptions, ITextareaProps, IToggleSwitchProps, AcceptedInputTypes, ITextInputProps };
409
+ export { Checkbox, Combobox, InputField, InputLabel, NestedInputButton, Radio, Select, Textarea, ToggleSwitch, TextInput };
405
410
 
406
411
  }
407
- declare module '@agility/plenum-ui/stories/molecules/index' {
408
- import { ICheckboxProps, IComboboxProps, IInputFieldProps, IInputLabelProps, INestedInputButtonProps, IRadioProps, ISelectProps, ITextAreaFieldProps, IToggleSwitchProps, AcceptedInputTypes, Checkbox, Combobox, InputField, InputLabel, NestedInputButton, Radio, Select, TextAreaField, ToggleSwitch } from "@agility/plenum-ui/stories/molecules/inputs/index";
409
- export type { ICheckboxProps, IComboboxProps, IInputFieldProps, IInputLabelProps, INestedInputButtonProps, IRadioProps, ISelectProps, ITextAreaFieldProps, IToggleSwitchProps, AcceptedInputTypes };
410
- export { Checkbox, Combobox, InputField, InputLabel, NestedInputButton, Radio, Select, TextAreaField, ToggleSwitch };
412
+ declare module '@agility/plenum-ui/stories/molecules/inputs/InputCounter/InputCounter' {
413
+ import { FC } from "react";
414
+ export interface IInputCounterProps {
415
+ /** Counter limit */
416
+ limit: number | undefined;
417
+ /** Counter current number */
418
+ current: number;
419
+ }
420
+ /** Primary UI component for user interaction */
421
+ const InputCounter: FC<IInputCounterProps>;
422
+ export default InputCounter;
423
+
424
+ }
425
+ declare module '@agility/plenum-ui/stories/molecules/inputs/InputCounter/index' {
426
+ export { default } from '@agility/plenum-ui/stories/molecules/inputs/InputCounter/InputCounter';
427
+ export * from '@agility/plenum-ui/stories/molecules/inputs/InputCounter/InputCounter';
411
428
 
412
429
  }
413
430
  declare module '@agility/plenum-ui/stories/molecules/inputs/InputField/InputField' {
414
431
  import React from "react";
415
- export type AcceptedInputTypes = "date" | "datetime-local" | "email" | "month" | "number" | "password" | "search" | "submit" | "tel" | "text" | "url";
416
- export interface IInputFieldProps extends React.ComponentPropsWithoutRef<"input"> {
432
+ export type AcceptedInputTypes = "date" | "datetime-local" | "email" | "month" | "number" | "password" | "search" | "submit" | "tel" | "text" | "url" | "currency";
433
+ export interface IInputFieldProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange"> {
417
434
  /** Callback on change */
418
435
  handleChange: (value: string) => void;
419
436
  /** Input ID*/
420
- id: string;
437
+ id?: string;
421
438
  /** Input Name */
422
- name: string;
439
+ name?: string;
423
440
  /** Force the focus state on the input */
424
441
  isFocused?: boolean;
425
442
  /** Error condition */
@@ -436,6 +453,10 @@ declare module '@agility/plenum-ui/stories/molecules/inputs/InputField/InputFiel
436
453
  required?: boolean;
437
454
  /** use input psuedo classes for :valid and :invalid styles. on by default */
438
455
  clientSideCheck?: boolean;
456
+ /** Placeholder text */
457
+ placeholder?: string;
458
+ /**ref for input */
459
+ ref?: React.Ref<HTMLInputElement>;
439
460
  }
440
461
  const InputField: React.FC<IInputFieldProps>;
441
462
  export default InputField;
@@ -496,6 +517,55 @@ declare module '@agility/plenum-ui/stories/molecules/inputs/NestedInputButton/in
496
517
  export type { INestedInputButtonProps };
497
518
  export default NestedInputButton;
498
519
 
520
+ }
521
+ declare module '@agility/plenum-ui/stories/molecules/inputs/TextInput/TextInput' {
522
+ import React from "react";
523
+ import { AcceptedInputTypes } from "@agility/plenum-ui/stories/molecules/inputs/InputField/index";
524
+ export interface ITextInputProps {
525
+ /** Input type*/
526
+ type: AcceptedInputTypes;
527
+ /** Input ID */
528
+ id?: string;
529
+ /** Input Name */
530
+ name?: string;
531
+ /** Label for the input */
532
+ label?: string;
533
+ /** Force the focus state on the input */
534
+ isFocused?: boolean;
535
+ /** Error state */
536
+ isError?: boolean;
537
+ /** If field is required */
538
+ isRequired?: boolean;
539
+ /** Disabled state */
540
+ isDisabled?: boolean;
541
+ /** Readonly state */
542
+ isReadonly?: boolean;
543
+ /** Set default value */
544
+ defaultValue?: string;
545
+ /** Message shown under the text field */
546
+ message?: string;
547
+ /** Input character counter */
548
+ isShowCounter?: boolean;
549
+ /** Max length of input character */
550
+ maxLength?: number;
551
+ /** Callback on change */
552
+ handleChange(value: string): void;
553
+ /** input value */
554
+ value: string;
555
+ /**Placeholder input text*/
556
+ placeholder?: string;
557
+ className?: string;
558
+ }
559
+ const _TextInput: React.ForwardRefExoticComponent<ITextInputProps & React.RefAttributes<HTMLInputElement>>;
560
+ export default _TextInput;
561
+
562
+ }
563
+ declare module '@agility/plenum-ui/stories/molecules/inputs/TextInput/index' {
564
+ import TextInput from "@agility/plenum-ui/stories/molecules/inputs/TextInput/TextInput";
565
+ import { ITextInputProps } from "@agility/plenum-ui/stories/molecules/inputs/TextInput/TextInput";
566
+ export type { ITextInputProps };
567
+ export default TextInput;
568
+
499
569
  }
500
570
  declare module '@agility/plenum-ui/stories/molecules/inputs/checkbox/Checkbox' {
501
571
  import { FC } from "react";
@@ -602,11 +672,12 @@ declare module '@agility/plenum-ui/stories/molecules/inputs/index' {
602
672
  import InputLabel, { IInputLabelProps } from "@agility/plenum-ui/stories/molecules/inputs/InputLabel/index";
603
673
  import NestedInputButton, { INestedInputButtonProps } from "@agility/plenum-ui/stories/molecules/inputs/NestedInputButton/index";
604
674
  import Radio, { IRadioProps } from "@agility/plenum-ui/stories/molecules/inputs/radio/index";
605
- import Select, { ISelectProps } from "@agility/plenum-ui/stories/molecules/inputs/select/index";
606
- import TextAreaField, { ITextAreaFieldProps } from "@agility/plenum-ui/stories/molecules/inputs/textArea/index";
675
+ import Select, { ISelectProps, ISimpleSelectOptions } from "@agility/plenum-ui/stories/molecules/inputs/select/index";
676
+ import Textarea, { ITextareaProps } from "@agility/plenum-ui/stories/molecules/inputs/textArea/index";
677
+ import TextInput, { ITextInputProps } from "@agility/plenum-ui/stories/molecules/inputs/TextInput/index";
607
678
  import ToggleSwitch, { IToggleSwitchProps } from "@agility/plenum-ui/stories/molecules/inputs/toggleSwitch/index";
608
- export type { ICheckboxProps, IComboboxProps, IInputFieldProps, IInputLabelProps, INestedInputButtonProps, IRadioProps, ISelectProps, ITextAreaFieldProps, IToggleSwitchProps, AcceptedInputTypes };
609
- export { Checkbox, Combobox, InputField, InputLabel, NestedInputButton, Radio, Select, TextAreaField, ToggleSwitch };
679
+ export type { ICheckboxProps, IComboboxProps, IInputFieldProps, IInputLabelProps, INestedInputButtonProps, IRadioProps, ISelectProps, ISimpleSelectOptions, ITextareaProps, ITextInputProps, IToggleSwitchProps, AcceptedInputTypes };
680
+ export { Checkbox, Combobox, InputField, InputLabel, NestedInputButton, Radio, Select, Textarea, ToggleSwitch, TextInput };
610
681
 
611
682
  }
612
683
  declare module '@agility/plenum-ui/stories/molecules/inputs/radio/Radio' {
@@ -656,10 +727,10 @@ declare module '@agility/plenum-ui/stories/molecules/inputs/radio/index' {
656
727
  }
657
728
  declare module '@agility/plenum-ui/stories/molecules/inputs/select/Select' {
658
729
  import React from "react";
659
- export type ISimpleSelectOptions = {
730
+ export interface ISimpleSelectOptions {
660
731
  label: string;
661
732
  value: string;
662
- };
733
+ }
663
734
  export interface ISelectProps {
664
735
  /** Label */
665
736
  label?: string;
@@ -700,65 +771,80 @@ declare module '@agility/plenum-ui/stories/molecules/inputs/select/index' {
700
771
 
701
772
  }
702
773
  declare module '@agility/plenum-ui/stories/molecules/inputs/textArea/TextArea' {
703
- /// <reference types="react" />
704
- export interface ITextAreaFieldProps extends React.ComponentPropsWithoutRef<"textarea"> {
705
- /** Callback on change */
706
- handleChange: (value: string) => void;
707
- /** textarea ID*/
708
- id: string;
709
- /** textarea Name */
710
- name: string;
711
- /** Force the focus state on the textarea */
712
- isFocused?: boolean;
713
- /** Error condition */
774
+ import React from "react";
775
+ interface ILabelProps extends React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement> {
776
+ display: string;
777
+ htmlFor?: string;
778
+ }
779
+ export interface ITextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "onChange"> {
780
+ /** Input ID */
781
+ id?: string;
782
+ /** Input Name */
783
+ name?: string;
784
+ /** Label for the input */
785
+ label?: ILabelProps;
786
+ /** Error state */
714
787
  isError?: boolean;
788
+ /** If field is required */
789
+ isRequired?: boolean;
715
790
  /** Disabled state */
716
791
  isDisabled?: boolean;
717
- /** Readonly state */
718
- isReadonly?: boolean;
719
- /** textarea value */
720
- value: string;
721
- /** If field is required */
722
- required?: boolean;
723
- /**Allow Text Area Resize*/
724
- textAreaResize?: boolean;
792
+ /** Set default value */
793
+ defaultValue?: string;
794
+ value?: string;
795
+ /** Message shown under the text field */
796
+ message?: string;
797
+ /** Input character counter */
798
+ isShowCounter?: boolean;
799
+ /** Max length of input character */
800
+ maxLength?: number;
801
+ /** Callback on change */
802
+ onChange?(value: string): void;
803
+ /** Number of rows */
804
+ rows?: number;
805
+ /** Number of cols */
806
+ cols?: number;
807
+ placeholder?: string;
725
808
  className?: string;
809
+ ref?: React.LegacyRef<HTMLTextAreaElement>;
726
810
  }
727
- const TextAreaField: React.FC<ITextAreaFieldProps>;
728
- export default TextAreaField;
811
+ const Textarea: React.FC<ITextareaProps>;
812
+ export default Textarea;
729
813
 
730
814
  }
731
815
  declare module '@agility/plenum-ui/stories/molecules/inputs/textArea/TextArea.stories' {
732
816
  import type { Meta, StoryObj } from "@storybook/react";
733
- import TextArea from "@agility/plenum-ui/stories/molecules/inputs/textArea/TextArea";
734
- const meta: Meta<typeof TextArea>;
735
- type Story = StoryObj<typeof TextArea>;
736
- export const DefaultTextArea: Story;
817
+ import Textarea from "@agility/plenum-ui/stories/molecules/inputs/textArea/TextArea";
818
+ const meta: Meta<typeof Textarea>;
819
+ type Story = StoryObj<typeof Textarea>;
820
+ export const DefaultTextarea: Story;
737
821
  export default meta;
738
822
 
739
823
  }
740
824
  declare module '@agility/plenum-ui/stories/molecules/inputs/textArea/index' {
741
- import TextAreaField, { ITextAreaFieldProps } from "@agility/plenum-ui/stories/molecules/inputs/textArea/TextArea";
742
- export type { ITextAreaFieldProps };
743
- export default TextAreaField;
825
+ import TextArea, { ITextareaProps } from "@agility/plenum-ui/stories/molecules/inputs/textArea/TextArea";
826
+ export type { ITextareaProps };
827
+ export default TextArea;
744
828
 
745
829
  }
746
830
  declare module '@agility/plenum-ui/stories/molecules/inputs/toggleSwitch/ToggleSwitch' {
747
831
  import React from "react";
748
832
  import { IDynamicIconProps } from "@/stories/atoms";
833
+ interface ToggleSwitchLabel {
834
+ text: string | JSX.Element;
835
+ className?: string;
836
+ xPosition?: "left" | "right";
837
+ }
749
838
  export interface IToggleSwitchProps {
750
839
  isChecked: boolean;
751
840
  onChange: (isChecked: boolean) => void;
752
- label?: {
753
- text: string | JSX.Element;
754
- className?: string;
755
- xPosition?: "left" | "right";
756
- };
757
- screenReaderLabel: string;
841
+ label?: ToggleSwitchLabel;
842
+ screenReaderLabel?: string;
758
843
  name: string;
759
844
  id: string;
760
- variant: "base" | "short";
845
+ variant?: "base" | "short";
761
846
  withIcon?: IDynamicIconProps;
847
+ disabled?: boolean;
762
848
  }
763
849
  const ToggleSwitch: React.FC<IToggleSwitchProps>;
764
850
  export default ToggleSwitch;
@@ -773,19 +859,17 @@ declare module '@agility/plenum-ui/stories/molecules/inputs/toggleSwitch/index'
773
859
  declare module '@agility/plenum-ui/stories/organisms/AnimatedLabelInput/AnimatedLabelInput' {
774
860
  import React from "react";
775
861
  import { IInputFieldProps } from "@/stories/molecules/inputs/InputField";
776
- import { ITextAreaFieldProps } from "@/stories/molecules/inputs/textArea/TextArea";
777
- interface ILabelProps extends React.ComponentPropsWithoutRef<"label"> {
862
+ interface ILabelProps extends React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement> {
778
863
  display: string;
779
864
  }
780
- export interface IAnimatedLabelInputProps {
865
+ export interface IAnimatedLabelInputProps extends Omit<IInputFieldProps, "handleChange"> {
781
866
  id: string;
782
867
  containerStyles?: string;
783
868
  message?: string;
784
- input?: IInputFieldProps;
785
- textarea?: ITextAreaFieldProps;
786
869
  required?: boolean;
787
870
  isError?: boolean;
788
871
  label: ILabelProps;
872
+ handleChange: (value: string) => void;
789
873
  }
790
874
  const AnimatedLabelInput: React.FC<IAnimatedLabelInputProps>;
791
875
  export default AnimatedLabelInput;
@@ -793,8 +877,29 @@ declare module '@agility/plenum-ui/stories/organisms/AnimatedLabelInput/Animated
793
877
  }
794
878
  declare module '@agility/plenum-ui/stories/organisms/AnimatedLabelInput/index' {
795
879
  import AnimatedLabelInput, { IAnimatedLabelInputProps } from "@agility/plenum-ui/stories/organisms/AnimatedLabelInput/AnimatedLabelInput";
796
- export default AnimatedLabelInput;
797
880
  export type { IAnimatedLabelInputProps };
881
+ export default AnimatedLabelInput;
882
+
883
+ }
884
+ declare module '@agility/plenum-ui/stories/organisms/AnimatedLabelTextArea/AnimatedLabelTextArea' {
885
+ import React from "react";
886
+ import { ITextareaProps } from "@/stories/molecules/inputs/textArea";
887
+ export interface IAnimatedLabelTextAreaProps extends ITextareaProps {
888
+ id: string;
889
+ containerStyles?: string;
890
+ message?: string;
891
+ required?: boolean;
892
+ isError?: boolean;
893
+ handleChange: (value: string) => void;
894
+ }
895
+ const AnimatedLabelTextArea: React.FC<IAnimatedLabelTextAreaProps>;
896
+ export default AnimatedLabelTextArea;
897
+
898
+ }
899
+ declare module '@agility/plenum-ui/stories/organisms/AnimatedLabelTextArea/index' {
900
+ import AnimatedLabelTextArea, { IAnimatedLabelTextAreaProps } from "@agility/plenum-ui/stories/organisms/AnimatedLabelTextArea/AnimatedLabelTextArea";
901
+ export type { IAnimatedLabelTextAreaProps };
902
+ export default AnimatedLabelTextArea;
798
903
 
799
904
  }
800
905
  declare module '@agility/plenum-ui/stories/organisms/ButtonDropdown/ButtonDropdown' {
@@ -826,30 +931,25 @@ declare module '@agility/plenum-ui/stories/organisms/DropdownComponent/DropdownC
826
931
  import { ClassNameWithAutocomplete } from "utils/types";
827
932
  import { IDynamicIconProps } from "@/stories/atoms/icons";
828
933
  export interface IItemProp extends HTMLAttributes<HTMLButtonElement> {
829
- icon?: {
830
- name: IDynamicIconProps["icon"];
831
- className?: ClassNameWithAutocomplete;
832
- pos?: "trailing" | "leading";
833
- outline?: boolean;
834
- };
934
+ icon?: IDynamicIconProps;
935
+ iconPosition?: "trailing" | "leading";
835
936
  label: string;
836
937
  onClick?(): void;
837
938
  isEmphasized?: boolean;
838
939
  key: React.Key;
839
940
  }
840
- export interface IDropdownClassnames {
841
- groupClassname?: ClassNameWithAutocomplete;
842
- itemsClassname?: ClassNameWithAutocomplete;
843
- itemClassname?: ClassNameWithAutocomplete;
844
- activeItemClassname?: ClassNameWithAutocomplete;
845
- buttonClassname?: ClassNameWithAutocomplete;
846
- }
847
941
  export interface IDropdownProps extends HTMLAttributes<HTMLDivElement> {
848
942
  items: IItemProp[][];
849
943
  label: string;
850
944
  CustomDropdownTrigger?: React.ReactNode;
851
945
  id: string;
852
- classNames?: IDropdownClassnames;
946
+ groupClassname?: ClassNameWithAutocomplete;
947
+ itemsClassname?: ClassNameWithAutocomplete;
948
+ itemClassname?: ClassNameWithAutocomplete;
949
+ activeItemClassname?: ClassNameWithAutocomplete;
950
+ buttonClassname?: ClassNameWithAutocomplete;
951
+ iconClassname?: ClassNameWithAutocomplete;
952
+ iconSpacingClassname?: ClassNameWithAutocomplete;
853
953
  placement?: Placement;
854
954
  offsetOptions?: Partial<{
855
955
  mainAxis: number;
@@ -857,7 +957,15 @@ declare module '@agility/plenum-ui/stories/organisms/DropdownComponent/DropdownC
857
957
  alignmentAxis: number | null;
858
958
  }>;
859
959
  }
860
- export const defaultClassNames: IDropdownClassnames;
960
+ export const defaultClassNames: {
961
+ groupClassname: string;
962
+ itemsClassname: string;
963
+ itemClassname: string;
964
+ activeItemClassname: string;
965
+ buttonClassname: string;
966
+ iconClassname: string;
967
+ iconSpacingClassname: string;
968
+ };
861
969
  /** Comment */
862
970
  const Dropdown: React.FC<IDropdownProps>;
863
971
  export default Dropdown;
@@ -870,8 +978,8 @@ declare module '@agility/plenum-ui/stories/organisms/DropdownComponent/dropdownI
870
978
 
871
979
  }
872
980
  declare module '@agility/plenum-ui/stories/organisms/DropdownComponent/index' {
873
- import Dropdown, { IItemProp, IDropdownClassnames, IDropdownProps, defaultClassNames } from "@agility/plenum-ui/stories/organisms/DropdownComponent/DropdownComponent";
874
- export type { IItemProp, IDropdownClassnames, IDropdownProps };
981
+ import Dropdown, { IItemProp, IDropdownProps, defaultClassNames } from "@agility/plenum-ui/stories/organisms/DropdownComponent/DropdownComponent";
982
+ export type { IItemProp, IDropdownProps };
875
983
  export { defaultClassNames };
876
984
  export default Dropdown;
877
985
 
@@ -900,8 +1008,8 @@ declare module '@agility/plenum-ui/stories/organisms/EmptySectionPlaceholder/Emp
900
1008
  }
901
1009
  declare module '@agility/plenum-ui/stories/organisms/EmptySectionPlaceholder/index' {
902
1010
  import EmptySectionPlaceholder, { IEmptySectionPlaceholderProps } from "@agility/plenum-ui/stories/organisms/EmptySectionPlaceholder/EmptySectionPlaceholder";
903
- export default EmptySectionPlaceholder;
904
1011
  export type { IEmptySectionPlaceholderProps };
1012
+ export default EmptySectionPlaceholder;
905
1013
 
906
1014
  }
907
1015
  declare module '@agility/plenum-ui/stories/organisms/FormInputWithAddons/FormInputWithAddons' {
@@ -933,15 +1041,93 @@ declare module '@agility/plenum-ui/stories/organisms/FormInputWithAddons/index'
933
1041
  export type { IFormInputWithAddonsProps };
934
1042
  export default FormInputWithAddons;
935
1043
 
1044
+ }
1045
+ declare module '@agility/plenum-ui/stories/organisms/TextInputSelect/InputSelect' {
1046
+ import { FC } from "react";
1047
+ export type SelectOptions = {
1048
+ label: string;
1049
+ value: string;
1050
+ };
1051
+ export interface InputSelectProps {
1052
+ align: "left" | "right";
1053
+ /** Show the CTA without Background color and a border seperator */
1054
+ inputOptions: SelectOptions[];
1055
+ /** Onclick callback */
1056
+ onSelectOption?(value: string): void;
1057
+ className?: string;
1058
+ isDisabled?: boolean;
1059
+ }
1060
+ /** Comment */
1061
+ export const InputSelect: FC<InputSelectProps>;
1062
+
1063
+ }
1064
+ declare module '@agility/plenum-ui/stories/organisms/TextInputSelect/TextInputSelect' {
1065
+ import { FC } from "react";
1066
+ import { AcceptedInputTypes } from "@/stories/molecules";
1067
+ export type SelectOptions = {
1068
+ label: string;
1069
+ value: string;
1070
+ };
1071
+ export interface ITextInputSelectProps {
1072
+ /** Input type*/
1073
+ type: AcceptedInputTypes;
1074
+ /** Input ID */
1075
+ id?: string;
1076
+ /** Input Name */
1077
+ name?: string;
1078
+ /** Label for the input */
1079
+ label?: string;
1080
+ /** placeholder for the input */
1081
+ placeholder?: string;
1082
+ /** Force the focus state on the input */
1083
+ isFocused?: boolean;
1084
+ /** Error state */
1085
+ isError?: boolean;
1086
+ /** If field is required */
1087
+ isRequired?: boolean;
1088
+ /** Disabled state */
1089
+ isDisabled?: boolean;
1090
+ /** Set default value */
1091
+ defaultValue?: string;
1092
+ /** Set value */
1093
+ value: string;
1094
+ /** Message shown under the text field */
1095
+ message?: string;
1096
+ /** Input character counter */
1097
+ isShowCounter?: boolean;
1098
+ /** Max length of input character */
1099
+ maxLength?: number;
1100
+ /** Select input location */
1101
+ selectLocation?: "left" | "right";
1102
+ /** Prefix */
1103
+ prefix?: string;
1104
+ /** List of options to show on the select field */
1105
+ inputOptions?: SelectOptions[];
1106
+ /** Callback on base input */
1107
+ onChange?(value: string): void;
1108
+ /** Callback on input select field */
1109
+ onSelectOption?(value: string): void;
1110
+ }
1111
+ const TextInputSelect: FC<ITextInputSelectProps>;
1112
+ export default TextInputSelect;
1113
+
1114
+ }
1115
+ declare module '@agility/plenum-ui/stories/organisms/TextInputSelect/index' {
1116
+ import TextInputSelect, { ITextInputSelectProps } from "@agility/plenum-ui/stories/organisms/TextInputSelect/TextInputSelect";
1117
+ export type { ITextInputSelectProps };
1118
+ export default TextInputSelect;
1119
+
936
1120
  }
937
1121
  declare module '@agility/plenum-ui/stories/organisms/index' {
938
1122
  import AnimatedLabelInput, { IAnimatedLabelInputProps } from "@agility/plenum-ui/stories/organisms/AnimatedLabelInput/index";
1123
+ import AnimatedLabelTextArea, { IAnimatedLabelTextAreaProps } from "@agility/plenum-ui/stories/organisms/AnimatedLabelTextArea/index";
939
1124
  import ButtonDropdown, { IButtonDropdownProps } from "@agility/plenum-ui/stories/organisms/ButtonDropdown/index";
940
- import Dropdown, { IDropdownClassnames, IDropdownProps, IItemProp } from "@agility/plenum-ui/stories/organisms/DropdownComponent/index";
1125
+ import Dropdown, { IDropdownProps, IItemProp } from "@agility/plenum-ui/stories/organisms/DropdownComponent/index";
941
1126
  import EmptySectionPlaceholder, { IEmptySectionPlaceholderProps } from "@agility/plenum-ui/stories/organisms/EmptySectionPlaceholder/index";
942
1127
  import FormInputWithAddons, { IFormInputWithAddonsProps } from "@agility/plenum-ui/stories/organisms/FormInputWithAddons/index";
943
- export type { IAnimatedLabelInputProps, IButtonDropdownProps, IDropdownClassnames, IDropdownProps, IEmptySectionPlaceholderProps, IItemProp, IFormInputWithAddonsProps };
944
- export { AnimatedLabelInput, ButtonDropdown, Dropdown, EmptySectionPlaceholder, FormInputWithAddons };
1128
+ import TextInputSelect, { ITextInputSelectProps } from "@agility/plenum-ui/stories/organisms/TextInputSelect/index";
1129
+ export type { IAnimatedLabelInputProps, IAnimatedLabelTextAreaProps, IButtonDropdownProps, IDropdownProps, IEmptySectionPlaceholderProps, IItemProp, IFormInputWithAddonsProps, ITextInputSelectProps };
1130
+ export { AnimatedLabelInput, AnimatedLabelTextArea, ButtonDropdown, Dropdown, EmptySectionPlaceholder, FormInputWithAddons, TextInputSelect };
945
1131
 
946
1132
  }
947
1133
  declare module '@agility/plenum-ui/utils/types' {