@agility/plenum-ui 2.0.0-rc9 → 2.0.1
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/README.md +104 -31
- package/build.js +30 -25
- package/dist/index.d.ts +103 -79
- package/dist/index.js +1 -6295
- package/dist/index.js.map +4 -4
- package/dist/{lib/tailwind.css → tailwind.css} +3754 -8120
- package/dist/types/stories/atoms/buttons/Button/Alternative/Alternative.stories.d.ts +1 -0
- package/dist/types/stories/atoms/buttons/Button/Button.d.ts +3 -7
- package/dist/types/stories/atoms/buttons/Button/Danger/Danger.stories.d.ts +1 -0
- package/dist/types/stories/atoms/buttons/Button/Primary/Primary.stories.d.ts +1 -0
- package/dist/types/stories/atoms/buttons/Button/Secondary/Secondary.stories.d.ts +1 -0
- package/dist/types/stories/atoms/buttons/Capsule/Capsule.d.ts +1 -1
- package/dist/types/stories/atoms/icons/DynamicIcon.d.ts +2 -2
- package/dist/types/stories/atoms/icons/TablerIcon.d.ts +1 -1
- package/dist/types/stories/index.d.ts +4 -4
- package/dist/types/stories/molecules/inputs/InputField/InputField.d.ts +7 -7
- package/dist/types/stories/molecules/inputs/TextInput/TextInput.d.ts +1 -1
- package/dist/types/stories/molecules/inputs/checkbox/Checkbox.d.ts +2 -0
- package/dist/types/stories/molecules/inputs/select/Select.d.ts +4 -2
- package/dist/types/stories/molecules/inputs/textArea/TextArea.d.ts +5 -1
- package/dist/types/stories/molecules/inputs/toggleSwitch/ToggleSwitch.d.ts +10 -7
- package/dist/types/stories/organisms/AnimatedLabelInput/AnimatedLabelInput.d.ts +5 -5
- package/dist/types/stories/organisms/AnimatedLabelInput/index.d.ts +1 -1
- package/dist/types/stories/organisms/AnimatedLabelTextArea/AnimatedLabelTextArea.d.ts +12 -0
- package/dist/types/stories/organisms/AnimatedLabelTextArea/index.d.ts +3 -0
- package/dist/types/stories/organisms/ButtonDropdown/ButtonDropdown.d.ts +1 -0
- package/dist/types/stories/organisms/DropdownComponent/DropdownComponent.d.ts +24 -13
- package/dist/types/stories/organisms/DropdownComponent/index.d.ts +2 -2
- package/dist/types/stories/organisms/EmptySectionPlaceholder/index.d.ts +1 -1
- package/dist/types/stories/organisms/index.d.ts +4 -3
- package/local.sh +100 -0
- package/package.json +35 -18
- package/rollup.config.mjs +42 -0
- package/stories/atoms/badges/Badge.tsx +1 -1
- package/stories/atoms/buttons/Button/Alternative/Alternative.stories.ts +10 -0
- package/stories/atoms/buttons/Button/Button.tsx +111 -25
- package/stories/atoms/buttons/Button/Danger/Danger.stories.ts +14 -2
- package/stories/atoms/buttons/Button/Primary/Primary.stories.ts +14 -2
- package/stories/atoms/buttons/Button/Secondary/Secondary.stories.ts +13 -1
- package/stories/atoms/buttons/Button/defaultArgs.ts +1 -1
- package/stories/atoms/buttons/Capsule/Capsule.tsx +2 -1
- package/stories/atoms/icons/DynamicIcon.stories.ts +1 -1
- package/stories/atoms/icons/DynamicIcon.tsx +7 -7
- package/stories/atoms/icons/IconWithShadow.stories.ts +3 -3
- package/stories/atoms/icons/TablerIcon.tsx +1 -1
- package/stories/atoms/loaders/Loader.tsx +12 -6
- package/stories/atoms/loaders/NProgress/RadialProgress.tsx +0 -2
- package/stories/index.ts +8 -4
- package/stories/molecules/inputs/InputCounter/InputCounter.tsx +2 -2
- package/stories/molecules/inputs/InputField/InputField.tsx +31 -29
- package/stories/molecules/inputs/InputLabel/InputLabel.tsx +6 -6
- package/stories/molecules/inputs/TextInput/TextInput.stories.tsx +31 -1
- package/stories/molecules/inputs/TextInput/TextInput.tsx +15 -7
- package/stories/molecules/inputs/checkbox/Checkbox.stories.ts +1 -1
- package/stories/molecules/inputs/checkbox/Checkbox.tsx +7 -4
- package/stories/molecules/inputs/combobox/ComboBox.tsx +126 -135
- package/stories/molecules/inputs/radio/Radio.stories.ts +2 -2
- package/stories/molecules/inputs/select/Select.stories.tsx +53 -0
- package/stories/molecules/inputs/select/Select.tsx +11 -3
- package/stories/molecules/inputs/textArea/{TextArea.stories.ts → TextArea.stories.tsx} +25 -2
- package/stories/molecules/inputs/textArea/TextArea.tsx +58 -28
- package/stories/molecules/inputs/toggleSwitch/ToggleSwitch.stories.tsx +15 -16
- package/stories/molecules/inputs/toggleSwitch/ToggleSwitch.tsx +63 -57
- package/stories/molecules/tabs/index.tsx +2 -3
- package/stories/organisms/AnimatedLabelInput/AnimatedLabelInput.stories.tsx +32 -2
- package/stories/organisms/AnimatedLabelInput/AnimatedLabelInput.tsx +66 -37
- package/stories/organisms/AnimatedLabelInput/index.tsx +1 -1
- package/stories/organisms/AnimatedLabelTextArea/AnimatedLabelTextArea.stories.tsx +26 -0
- package/stories/organisms/AnimatedLabelTextArea/AnimatedLabelTextArea.tsx +61 -0
- package/stories/organisms/AnimatedLabelTextArea/index.tsx +3 -0
- package/stories/organisms/ButtonDropdown/ButtonDropdown.stories.tsx +59 -59
- package/stories/organisms/ButtonDropdown/ButtonDropdown.tsx +42 -30
- package/stories/organisms/DropdownComponent/Dropdown.stories.tsx +26 -2
- package/stories/organisms/DropdownComponent/DropdownComponent.tsx +232 -180
- package/stories/organisms/DropdownComponent/dropdownItems.ts +30 -9
- package/stories/organisms/DropdownComponent/index.ts +2 -2
- package/stories/organisms/EmptySectionPlaceholder/EmptySectionPlaceholder.stories.tsx +3 -3
- package/stories/organisms/EmptySectionPlaceholder/index.tsx +2 -1
- package/stories/organisms/FormInputWithAddons/FormInputWithAddons.stories.tsx +1 -1
- package/stories/organisms/FormInputWithAddons/FormInputWithAddons.tsx +7 -2
- package/stories/organisms/index.ts +12 -3
- package/tailwind.config.js +139 -38
- package/tsconfig.lib.json +13 -6
- package/watch.js +49 -0
- package/.yarnrc.yml +0 -1
- package/dist/types/stories/layouts/index.d.ts +0 -0
- package/dist/types/stories/molecules/inputs/select/Select.stories.d.ts +0 -6
- package/dist/types/stories/molecules/inputs/textArea/TextArea.stories.d.ts +0 -6
- package/stories/layouts/CardLayout/CardLayout.stories.tsx +0 -18
- package/stories/layouts/CardLayout/CardLayout.tsx +0 -22
- package/stories/layouts/CardLayout/index.tsx +0 -3
- package/stories/layouts/ModalLayout/ModalLayout.stories.tsx +0 -18
- package/stories/layouts/ModalLayout/ModalLayout.tsx +0 -22
- package/stories/layouts/ModalLayout/index.tsx +0 -3
- package/stories/layouts/index.ts +0 -0
- package/stories/molecules/inputs/select/Select.stories.ts +0 -23
- package/stories/organisms/DropdownComponent/Dropdown.test.tsx +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -72,6 +72,7 @@ declare module '@agility/plenum-ui/stories/atoms/buttons/Button/Alternative/Alte
|
|
|
72
72
|
export default meta;
|
|
73
73
|
type Story = StoryObj<typeof Button>;
|
|
74
74
|
export const Alternative: Story;
|
|
75
|
+
export const AlternativeDisabled: Story;
|
|
75
76
|
export const AlternativeTrailingIcon: Story;
|
|
76
77
|
export const AlternativeLeadingIcon: Story;
|
|
77
78
|
export const AlternativeExtraSmall: Story;
|
|
@@ -83,10 +84,10 @@ declare module '@agility/plenum-ui/stories/atoms/buttons/Button/Alternative/Alte
|
|
|
83
84
|
|
|
84
85
|
}
|
|
85
86
|
declare module '@agility/plenum-ui/stories/atoms/buttons/Button/Button' {
|
|
86
|
-
import { HTMLAttributeAnchorTarget } from "react";
|
|
87
|
+
import React, { HTMLAttributeAnchorTarget } from "react";
|
|
87
88
|
import { UnifiedIconName, IDynamicIconProps } from "@agility/plenum-ui/stories/atoms/icons/index";
|
|
88
89
|
export type BTNActionType = "primary" | "secondary" | "alternative" | "danger";
|
|
89
|
-
export interface IButtonProps extends React.
|
|
90
|
+
export interface IButtonProps extends Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> {
|
|
90
91
|
/** Is the button a Primary CTA, alternative or danger button? */
|
|
91
92
|
actionType?: BTNActionType;
|
|
92
93
|
/** How lg should the button be? - Defaults to 'base'. */
|
|
@@ -111,12 +112,8 @@ declare module '@agility/plenum-ui/stories/atoms/buttons/Button/Button' {
|
|
|
111
112
|
isLoading?: boolean;
|
|
112
113
|
className?: string;
|
|
113
114
|
iconObj?: React.ReactNode;
|
|
114
|
-
ref?: React.LegacyRef<HTMLButtonElement>;
|
|
115
115
|
}
|
|
116
|
-
|
|
117
|
-
* Primary UI component for user interaction
|
|
118
|
-
*/
|
|
119
|
-
const Button: ({ actionType, size, label, icon, iconObj, CustomSVGIcon, fullWidth, iconPosition, asLink, isLoading, className, ref, ...props }: IButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
116
|
+
const Button: React.ForwardRefExoticComponent<IButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
120
117
|
export default Button;
|
|
121
118
|
|
|
122
119
|
}
|
|
@@ -127,6 +124,7 @@ declare module '@agility/plenum-ui/stories/atoms/buttons/Button/Danger/Danger.st
|
|
|
127
124
|
export default meta;
|
|
128
125
|
type Story = StoryObj<typeof Button>;
|
|
129
126
|
export const Danger: Story;
|
|
127
|
+
export const DangerDisabled: Story;
|
|
130
128
|
export const DangerTrailingIcon: Story;
|
|
131
129
|
export const DangerLeadingIcon: Story;
|
|
132
130
|
export const DangerSimpleIconName: Story;
|
|
@@ -144,6 +142,7 @@ declare module '@agility/plenum-ui/stories/atoms/buttons/Button/Primary/Primary.
|
|
|
144
142
|
export default meta;
|
|
145
143
|
type Story = StoryObj<typeof Button>;
|
|
146
144
|
export const Primary: Story;
|
|
145
|
+
export const PrimaryDisabled: Story;
|
|
147
146
|
export const PrimaryLeadingIcon: Story;
|
|
148
147
|
export const PrimarySimpleIconName: Story;
|
|
149
148
|
export const PrimaryTrailingIcon: Story;
|
|
@@ -161,6 +160,7 @@ declare module '@agility/plenum-ui/stories/atoms/buttons/Button/Secondary/Second
|
|
|
161
160
|
export default meta;
|
|
162
161
|
type Story = StoryObj<typeof Button>;
|
|
163
162
|
export const Secondary: Story;
|
|
163
|
+
export const SecondaryDisabled: Story;
|
|
164
164
|
export const SecondaryTrailingIcon: Story;
|
|
165
165
|
export const SecondaryLeadingIcon: Story;
|
|
166
166
|
export const SecondarySimpleIconName: Story;
|
|
@@ -198,7 +198,7 @@ declare module '@agility/plenum-ui/stories/atoms/buttons/Capsule/Capsule' {
|
|
|
198
198
|
/**
|
|
199
199
|
* Capsule Style Button
|
|
200
200
|
*/
|
|
201
|
-
export interface ICapsuleProps extends React.
|
|
201
|
+
export interface ICapsuleProps extends React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
|
|
202
202
|
/** Is the button a Primary CTA, alternative or danger button? */
|
|
203
203
|
actionType: BTNActionType;
|
|
204
204
|
/** How lg should the button be? - Defaults to 'base'. */
|
|
@@ -271,12 +271,12 @@ declare module '@agility/plenum-ui/stories/atoms/icons/DynamicIcon' {
|
|
|
271
271
|
import { ClassNameWithAutocomplete } from "@/utils/types";
|
|
272
272
|
export type IconName = keyof typeof SolidIcons | keyof typeof OutlineIcons;
|
|
273
273
|
export type FAIconName = keyof typeof FA;
|
|
274
|
-
export type UnifiedIconName =
|
|
274
|
+
export type UnifiedIconName = TablerIconName | IconName | FAIconName;
|
|
275
275
|
export function isHeroIcon(name: UnifiedIconName): name is keyof typeof SolidIcons | keyof typeof OutlineIcons;
|
|
276
276
|
export function isTablerIcon(name: UnifiedIconName): name is TablerIconName;
|
|
277
277
|
export function isFAIcon(name: UnifiedIconName): name is keyof typeof FA;
|
|
278
278
|
export function isUnifiedIconName(name: UnifiedIconName): name is UnifiedIconName;
|
|
279
|
-
export interface IDynamicIconProps extends React.
|
|
279
|
+
export interface IDynamicIconProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
|
|
280
280
|
icon: UnifiedIconName;
|
|
281
281
|
className?: ClassNameWithAutocomplete;
|
|
282
282
|
outline?: boolean;
|
|
@@ -324,7 +324,7 @@ declare module '@agility/plenum-ui/stories/atoms/icons/TablerIcon' {
|
|
|
324
324
|
import React from "react";
|
|
325
325
|
import { TablerIconName } from "@agility/plenum-ui/stories/atoms/icons/tablerIconNames";
|
|
326
326
|
import { ClassNameWithAutocomplete } from "@/utils/types";
|
|
327
|
-
export interface ITablerIconProps extends React.
|
|
327
|
+
export interface ITablerIconProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
|
|
328
328
|
icon: TablerIconName;
|
|
329
329
|
className?: ClassNameWithAutocomplete;
|
|
330
330
|
}
|
|
@@ -401,13 +401,10 @@ 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, ITextareaProps, IToggleSwitchProps, AcceptedInputTypes, Checkbox, Combobox, InputField, InputLabel, NestedInputButton, Radio, Select, Textarea, ToggleSwitch, TextInput, ITextInputProps } from "@agility/plenum-ui/stories/molecules/index";
|
|
405
|
-
import { IAnimatedLabelInputProps,
|
|
406
|
-
export type { IAvatarProps, IBadgeProps, IButtonProps, ICapsuleProps, ITextInputSelectProps, IDynamicIconProps, IIconWithShadowProps, ILoaderProps, IRadialProgressProps, ICheckboxProps, IComboboxProps, IInputFieldProps, IInputLabelProps, INestedInputButtonProps, IRadioProps, ISelectProps, ITextareaProps, IToggleSwitchProps, AcceptedInputTypes, IAnimatedLabelInputProps,
|
|
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
|
-
|
|
409
|
-
}
|
|
410
|
-
declare module '@agility/plenum-ui/stories/layouts/index' {
|
|
404
|
+
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";
|
|
405
|
+
import { IAnimatedLabelInputProps, AnimatedLabelTextArea, IAnimatedLabelTextAreaProps, IButtonDropdownProps, 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, IAnimatedLabelTextAreaProps, IButtonDropdownProps, IDropdownProps, IEmptySectionPlaceholderProps, IItemProp, IFormInputWithAddonsProps, UnifiedIconName, IconName, FAIconName, BTNActionType, ITextInputProps, ISimpleSelectOptions };
|
|
407
|
+
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 };
|
|
411
408
|
|
|
412
409
|
}
|
|
413
410
|
declare module '@agility/plenum-ui/stories/molecules/index' {
|
|
@@ -437,13 +434,13 @@ declare module '@agility/plenum-ui/stories/molecules/inputs/InputCounter/index'
|
|
|
437
434
|
declare module '@agility/plenum-ui/stories/molecules/inputs/InputField/InputField' {
|
|
438
435
|
import React from "react";
|
|
439
436
|
export type AcceptedInputTypes = "date" | "datetime-local" | "email" | "month" | "number" | "password" | "search" | "submit" | "tel" | "text" | "url" | "currency";
|
|
440
|
-
export interface IInputFieldProps extends React.
|
|
437
|
+
export interface IInputFieldProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange"> {
|
|
441
438
|
/** Callback on change */
|
|
442
439
|
handleChange: (value: string) => void;
|
|
443
440
|
/** Input ID*/
|
|
444
|
-
id
|
|
441
|
+
id?: string;
|
|
445
442
|
/** Input Name */
|
|
446
|
-
name
|
|
443
|
+
name?: string;
|
|
447
444
|
/** Force the focus state on the input */
|
|
448
445
|
isFocused?: boolean;
|
|
449
446
|
/** Error condition */
|
|
@@ -460,11 +457,11 @@ declare module '@agility/plenum-ui/stories/molecules/inputs/InputField/InputFiel
|
|
|
460
457
|
required?: boolean;
|
|
461
458
|
/** use input psuedo classes for :valid and :invalid styles. on by default */
|
|
462
459
|
clientSideCheck?: boolean;
|
|
463
|
-
/**
|
|
464
|
-
|
|
460
|
+
/** Placeholder text */
|
|
461
|
+
placeholder?: string;
|
|
465
462
|
}
|
|
466
|
-
const
|
|
467
|
-
export default
|
|
463
|
+
const _InputField: React.ForwardRefExoticComponent<IInputFieldProps & React.RefAttributes<HTMLInputElement>>;
|
|
464
|
+
export default _InputField;
|
|
468
465
|
|
|
469
466
|
}
|
|
470
467
|
declare module '@agility/plenum-ui/stories/molecules/inputs/InputField/index' {
|
|
@@ -554,7 +551,7 @@ declare module '@agility/plenum-ui/stories/molecules/inputs/TextInput/TextInput'
|
|
|
554
551
|
/** Max length of input character */
|
|
555
552
|
maxLength?: number;
|
|
556
553
|
/** Callback on change */
|
|
557
|
-
|
|
554
|
+
handleChange(value: string): void;
|
|
558
555
|
/** input value */
|
|
559
556
|
value: string;
|
|
560
557
|
/**Placeholder input text*/
|
|
@@ -597,6 +594,8 @@ declare module '@agility/plenum-ui/stories/molecules/inputs/checkbox/Checkbox' {
|
|
|
597
594
|
hasBorder?: boolean;
|
|
598
595
|
/** any arbitrary classNames to add to the wrapper */
|
|
599
596
|
className?: string;
|
|
597
|
+
/** Label ClassName */
|
|
598
|
+
labelClassName?: string;
|
|
600
599
|
}
|
|
601
600
|
/** Comment */
|
|
602
601
|
const Checkbox: FC<ICheckboxProps>;
|
|
@@ -732,10 +731,10 @@ declare module '@agility/plenum-ui/stories/molecules/inputs/radio/index' {
|
|
|
732
731
|
}
|
|
733
732
|
declare module '@agility/plenum-ui/stories/molecules/inputs/select/Select' {
|
|
734
733
|
import React from "react";
|
|
735
|
-
export
|
|
734
|
+
export interface ISimpleSelectOptions {
|
|
736
735
|
label: string;
|
|
737
736
|
value: string;
|
|
738
|
-
}
|
|
737
|
+
}
|
|
739
738
|
export interface ISelectProps {
|
|
740
739
|
/** Label */
|
|
741
740
|
label?: string;
|
|
@@ -755,19 +754,12 @@ declare module '@agility/plenum-ui/stories/molecules/inputs/select/Select' {
|
|
|
755
754
|
isRequired?: boolean;
|
|
756
755
|
value?: string;
|
|
757
756
|
className?: string;
|
|
757
|
+
onFocus?: () => void;
|
|
758
|
+
onBlur?: () => void;
|
|
758
759
|
}
|
|
759
760
|
const Select: React.FC<ISelectProps>;
|
|
760
761
|
export default Select;
|
|
761
762
|
|
|
762
|
-
}
|
|
763
|
-
declare module '@agility/plenum-ui/stories/molecules/inputs/select/Select.stories' {
|
|
764
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
765
|
-
import Select from "@agility/plenum-ui/stories/molecules/inputs/select/Select";
|
|
766
|
-
const meta: Meta<typeof Select>;
|
|
767
|
-
type Story = StoryObj<typeof Select>;
|
|
768
|
-
export const DefaultSelect: Story;
|
|
769
|
-
export default meta;
|
|
770
|
-
|
|
771
763
|
}
|
|
772
764
|
declare module '@agility/plenum-ui/stories/molecules/inputs/select/index' {
|
|
773
765
|
import Select, { ISelectProps, ISimpleSelectOptions } from "@agility/plenum-ui/stories/molecules/inputs/select/Select";
|
|
@@ -777,13 +769,17 @@ declare module '@agility/plenum-ui/stories/molecules/inputs/select/index' {
|
|
|
777
769
|
}
|
|
778
770
|
declare module '@agility/plenum-ui/stories/molecules/inputs/textArea/TextArea' {
|
|
779
771
|
import React from "react";
|
|
772
|
+
interface ILabelProps extends React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement> {
|
|
773
|
+
display: string;
|
|
774
|
+
htmlFor?: string;
|
|
775
|
+
}
|
|
780
776
|
export interface ITextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "onChange"> {
|
|
781
777
|
/** Input ID */
|
|
782
778
|
id?: string;
|
|
783
779
|
/** Input Name */
|
|
784
780
|
name?: string;
|
|
785
781
|
/** Label for the input */
|
|
786
|
-
label?:
|
|
782
|
+
label?: ILabelProps;
|
|
787
783
|
/** Error state */
|
|
788
784
|
isError?: boolean;
|
|
789
785
|
/** If field is required */
|
|
@@ -812,15 +808,6 @@ declare module '@agility/plenum-ui/stories/molecules/inputs/textArea/TextArea' {
|
|
|
812
808
|
const Textarea: React.FC<ITextareaProps>;
|
|
813
809
|
export default Textarea;
|
|
814
810
|
|
|
815
|
-
}
|
|
816
|
-
declare module '@agility/plenum-ui/stories/molecules/inputs/textArea/TextArea.stories' {
|
|
817
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
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;
|
|
822
|
-
export default meta;
|
|
823
|
-
|
|
824
811
|
}
|
|
825
812
|
declare module '@agility/plenum-ui/stories/molecules/inputs/textArea/index' {
|
|
826
813
|
import TextArea, { ITextareaProps } from "@agility/plenum-ui/stories/molecules/inputs/textArea/TextArea";
|
|
@@ -831,19 +818,22 @@ declare module '@agility/plenum-ui/stories/molecules/inputs/textArea/index' {
|
|
|
831
818
|
declare module '@agility/plenum-ui/stories/molecules/inputs/toggleSwitch/ToggleSwitch' {
|
|
832
819
|
import React from "react";
|
|
833
820
|
import { IDynamicIconProps } from "@/stories/atoms";
|
|
821
|
+
interface ToggleSwitchLabel {
|
|
822
|
+
text: string | JSX.Element;
|
|
823
|
+
className?: string;
|
|
824
|
+
xPosition?: "left" | "right";
|
|
825
|
+
}
|
|
834
826
|
export interface IToggleSwitchProps {
|
|
835
827
|
isChecked: boolean;
|
|
836
828
|
onChange: (isChecked: boolean) => void;
|
|
837
|
-
label?:
|
|
838
|
-
|
|
839
|
-
className?: string;
|
|
840
|
-
xPosition?: "left" | "right";
|
|
841
|
-
};
|
|
842
|
-
screenReaderLabel: string;
|
|
829
|
+
label?: ToggleSwitchLabel;
|
|
830
|
+
screenReaderLabel?: string;
|
|
843
831
|
name: string;
|
|
844
832
|
id: string;
|
|
845
|
-
variant
|
|
833
|
+
variant?: "base" | "short";
|
|
846
834
|
withIcon?: IDynamicIconProps;
|
|
835
|
+
disabled?: boolean;
|
|
836
|
+
groupClassName?: string;
|
|
847
837
|
}
|
|
848
838
|
const ToggleSwitch: React.FC<IToggleSwitchProps>;
|
|
849
839
|
export default ToggleSwitch;
|
|
@@ -858,19 +848,19 @@ declare module '@agility/plenum-ui/stories/molecules/inputs/toggleSwitch/index'
|
|
|
858
848
|
declare module '@agility/plenum-ui/stories/organisms/AnimatedLabelInput/AnimatedLabelInput' {
|
|
859
849
|
import React from "react";
|
|
860
850
|
import { IInputFieldProps } from "@/stories/molecules/inputs/InputField";
|
|
861
|
-
|
|
862
|
-
interface ILabelProps extends React.ComponentPropsWithoutRef<"label"> {
|
|
851
|
+
interface ILabelProps extends React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement> {
|
|
863
852
|
display: string;
|
|
864
853
|
}
|
|
865
|
-
export interface IAnimatedLabelInputProps {
|
|
854
|
+
export interface IAnimatedLabelInputProps extends Omit<IInputFieldProps, "handleChange"> {
|
|
866
855
|
id: string;
|
|
867
856
|
containerStyles?: string;
|
|
868
857
|
message?: string;
|
|
869
|
-
input?: IInputFieldProps;
|
|
870
|
-
textarea?: ITextareaProps;
|
|
871
858
|
required?: boolean;
|
|
872
859
|
isError?: boolean;
|
|
860
|
+
isShowCounter?: boolean;
|
|
861
|
+
maxLength?: number;
|
|
873
862
|
label: ILabelProps;
|
|
863
|
+
handleChange: (value: string) => void;
|
|
874
864
|
}
|
|
875
865
|
const AnimatedLabelInput: React.FC<IAnimatedLabelInputProps>;
|
|
876
866
|
export default AnimatedLabelInput;
|
|
@@ -878,8 +868,29 @@ declare module '@agility/plenum-ui/stories/organisms/AnimatedLabelInput/Animated
|
|
|
878
868
|
}
|
|
879
869
|
declare module '@agility/plenum-ui/stories/organisms/AnimatedLabelInput/index' {
|
|
880
870
|
import AnimatedLabelInput, { IAnimatedLabelInputProps } from "@agility/plenum-ui/stories/organisms/AnimatedLabelInput/AnimatedLabelInput";
|
|
881
|
-
export default AnimatedLabelInput;
|
|
882
871
|
export type { IAnimatedLabelInputProps };
|
|
872
|
+
export default AnimatedLabelInput;
|
|
873
|
+
|
|
874
|
+
}
|
|
875
|
+
declare module '@agility/plenum-ui/stories/organisms/AnimatedLabelTextArea/AnimatedLabelTextArea' {
|
|
876
|
+
import React from "react";
|
|
877
|
+
import { ITextareaProps } from "@/stories/molecules/inputs/textArea";
|
|
878
|
+
export interface IAnimatedLabelTextAreaProps extends ITextareaProps {
|
|
879
|
+
id: string;
|
|
880
|
+
containerStyles?: string;
|
|
881
|
+
message?: string;
|
|
882
|
+
required?: boolean;
|
|
883
|
+
isError?: boolean;
|
|
884
|
+
handleChange: (value: string) => void;
|
|
885
|
+
}
|
|
886
|
+
const AnimatedLabelTextArea: React.FC<IAnimatedLabelTextAreaProps>;
|
|
887
|
+
export default AnimatedLabelTextArea;
|
|
888
|
+
|
|
889
|
+
}
|
|
890
|
+
declare module '@agility/plenum-ui/stories/organisms/AnimatedLabelTextArea/index' {
|
|
891
|
+
import AnimatedLabelTextArea, { IAnimatedLabelTextAreaProps } from "@agility/plenum-ui/stories/organisms/AnimatedLabelTextArea/AnimatedLabelTextArea";
|
|
892
|
+
export type { IAnimatedLabelTextAreaProps };
|
|
893
|
+
export default AnimatedLabelTextArea;
|
|
883
894
|
|
|
884
895
|
}
|
|
885
896
|
declare module '@agility/plenum-ui/stories/organisms/ButtonDropdown/ButtonDropdown' {
|
|
@@ -889,6 +900,7 @@ declare module '@agility/plenum-ui/stories/organisms/ButtonDropdown/ButtonDropdo
|
|
|
889
900
|
export interface IButtonDropdownProps {
|
|
890
901
|
button: IButtonProps;
|
|
891
902
|
dropDown: IDropdownProps;
|
|
903
|
+
hideDivider?: boolean;
|
|
892
904
|
placement?: IDropdownProps["placement"];
|
|
893
905
|
offsetOptions?: IDropdownProps["offsetOptions"];
|
|
894
906
|
}
|
|
@@ -909,36 +921,47 @@ declare module '@agility/plenum-ui/stories/organisms/DropdownComponent/DropdownC
|
|
|
909
921
|
import React, { HTMLAttributes } from "react";
|
|
910
922
|
import { Placement } from "@floating-ui/react";
|
|
911
923
|
import { ClassNameWithAutocomplete } from "utils/types";
|
|
912
|
-
import { IDynamicIconProps
|
|
913
|
-
export interface IItemProp
|
|
914
|
-
icon?: IDynamicIconProps
|
|
924
|
+
import { IDynamicIconProps } from "@/stories/atoms/icons";
|
|
925
|
+
export interface IItemProp {
|
|
926
|
+
icon?: IDynamicIconProps;
|
|
915
927
|
iconPosition?: "trailing" | "leading";
|
|
916
|
-
label: string;
|
|
928
|
+
label: string | JSX.Element;
|
|
917
929
|
onClick?(): void;
|
|
918
930
|
isEmphasized?: boolean;
|
|
919
931
|
key: React.Key;
|
|
920
|
-
|
|
921
|
-
export interface IDropdownClassnames {
|
|
922
|
-
groupClassname?: ClassNameWithAutocomplete;
|
|
923
|
-
itemsClassname?: ClassNameWithAutocomplete;
|
|
924
|
-
itemClassname?: ClassNameWithAutocomplete;
|
|
925
|
-
activeItemClassname?: ClassNameWithAutocomplete;
|
|
926
|
-
buttonClassname?: ClassNameWithAutocomplete;
|
|
932
|
+
iconObj?: JSX.Element;
|
|
927
933
|
}
|
|
928
934
|
export interface IDropdownProps extends HTMLAttributes<HTMLDivElement> {
|
|
929
935
|
items: IItemProp[][];
|
|
930
936
|
label: string;
|
|
931
937
|
CustomDropdownTrigger?: React.ReactNode;
|
|
932
938
|
id: string;
|
|
933
|
-
|
|
939
|
+
groupClassname?: ClassNameWithAutocomplete;
|
|
940
|
+
itemsClassname?: ClassNameWithAutocomplete;
|
|
941
|
+
itemClassname?: ClassNameWithAutocomplete;
|
|
942
|
+
activeItemClassname?: ClassNameWithAutocomplete;
|
|
943
|
+
buttonClassname?: ClassNameWithAutocomplete;
|
|
944
|
+
iconClassname?: ClassNameWithAutocomplete;
|
|
945
|
+
iconSpacingClassname?: ClassNameWithAutocomplete;
|
|
934
946
|
placement?: Placement;
|
|
935
947
|
offsetOptions?: Partial<{
|
|
936
948
|
mainAxis: number;
|
|
937
949
|
crossAxis: number;
|
|
938
950
|
alignmentAxis: number | null;
|
|
939
951
|
}>;
|
|
952
|
+
disabled?: boolean;
|
|
953
|
+
onFocus?: () => void;
|
|
954
|
+
onBlur?: () => void;
|
|
940
955
|
}
|
|
941
|
-
export const defaultClassNames:
|
|
956
|
+
export const defaultClassNames: {
|
|
957
|
+
groupClassname: string;
|
|
958
|
+
itemsClassname: string;
|
|
959
|
+
itemClassname: string;
|
|
960
|
+
activeItemClassname: string;
|
|
961
|
+
buttonClassname: string;
|
|
962
|
+
iconClassname: string;
|
|
963
|
+
iconSpacingClassname: string;
|
|
964
|
+
};
|
|
942
965
|
/** Comment */
|
|
943
966
|
const Dropdown: React.FC<IDropdownProps>;
|
|
944
967
|
export default Dropdown;
|
|
@@ -951,8 +974,8 @@ declare module '@agility/plenum-ui/stories/organisms/DropdownComponent/dropdownI
|
|
|
951
974
|
|
|
952
975
|
}
|
|
953
976
|
declare module '@agility/plenum-ui/stories/organisms/DropdownComponent/index' {
|
|
954
|
-
import Dropdown, { IItemProp,
|
|
955
|
-
export type { IItemProp,
|
|
977
|
+
import Dropdown, { IItemProp, IDropdownProps, defaultClassNames } from "@agility/plenum-ui/stories/organisms/DropdownComponent/DropdownComponent";
|
|
978
|
+
export type { IItemProp, IDropdownProps };
|
|
956
979
|
export { defaultClassNames };
|
|
957
980
|
export default Dropdown;
|
|
958
981
|
|
|
@@ -981,8 +1004,8 @@ declare module '@agility/plenum-ui/stories/organisms/EmptySectionPlaceholder/Emp
|
|
|
981
1004
|
}
|
|
982
1005
|
declare module '@agility/plenum-ui/stories/organisms/EmptySectionPlaceholder/index' {
|
|
983
1006
|
import EmptySectionPlaceholder, { IEmptySectionPlaceholderProps } from "@agility/plenum-ui/stories/organisms/EmptySectionPlaceholder/EmptySectionPlaceholder";
|
|
984
|
-
export default EmptySectionPlaceholder;
|
|
985
1007
|
export type { IEmptySectionPlaceholderProps };
|
|
1008
|
+
export default EmptySectionPlaceholder;
|
|
986
1009
|
|
|
987
1010
|
}
|
|
988
1011
|
declare module '@agility/plenum-ui/stories/organisms/FormInputWithAddons/FormInputWithAddons' {
|
|
@@ -1093,13 +1116,14 @@ declare module '@agility/plenum-ui/stories/organisms/TextInputSelect/index' {
|
|
|
1093
1116
|
}
|
|
1094
1117
|
declare module '@agility/plenum-ui/stories/organisms/index' {
|
|
1095
1118
|
import AnimatedLabelInput, { IAnimatedLabelInputProps } from "@agility/plenum-ui/stories/organisms/AnimatedLabelInput/index";
|
|
1119
|
+
import AnimatedLabelTextArea, { IAnimatedLabelTextAreaProps } from "@agility/plenum-ui/stories/organisms/AnimatedLabelTextArea/index";
|
|
1096
1120
|
import ButtonDropdown, { IButtonDropdownProps } from "@agility/plenum-ui/stories/organisms/ButtonDropdown/index";
|
|
1097
|
-
import Dropdown, {
|
|
1121
|
+
import Dropdown, { IDropdownProps, IItemProp } from "@agility/plenum-ui/stories/organisms/DropdownComponent/index";
|
|
1098
1122
|
import EmptySectionPlaceholder, { IEmptySectionPlaceholderProps } from "@agility/plenum-ui/stories/organisms/EmptySectionPlaceholder/index";
|
|
1099
1123
|
import FormInputWithAddons, { IFormInputWithAddonsProps } from "@agility/plenum-ui/stories/organisms/FormInputWithAddons/index";
|
|
1100
1124
|
import TextInputSelect, { ITextInputSelectProps } from "@agility/plenum-ui/stories/organisms/TextInputSelect/index";
|
|
1101
|
-
export type { IAnimatedLabelInputProps,
|
|
1102
|
-
export { AnimatedLabelInput, ButtonDropdown, Dropdown, EmptySectionPlaceholder, FormInputWithAddons, TextInputSelect };
|
|
1125
|
+
export type { IAnimatedLabelInputProps, IAnimatedLabelTextAreaProps, IButtonDropdownProps, IDropdownProps, IEmptySectionPlaceholderProps, IItemProp, IFormInputWithAddonsProps, ITextInputSelectProps };
|
|
1126
|
+
export { AnimatedLabelInput, AnimatedLabelTextArea, ButtonDropdown, Dropdown, EmptySectionPlaceholder, FormInputWithAddons, TextInputSelect };
|
|
1103
1127
|
|
|
1104
1128
|
}
|
|
1105
1129
|
declare module '@agility/plenum-ui/utils/types' {
|