@agility/plenum-ui 2.1.27 → 2.2.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/.storybook/preview.tsx +7 -6
- package/dist/index.d.ts +130 -6
- package/dist/index.js +1 -1
- package/dist/index.js.map +4 -4
- package/dist/tailwind.css +106 -1
- package/dist/types/stories/atoms/Typography/Heading/Heading.d.ts +8 -0
- package/dist/types/stories/atoms/Typography/Heading/Heading.stories.d.ts +12 -0
- package/dist/types/stories/atoms/Typography/Heading/index.d.ts +3 -0
- package/dist/types/stories/atoms/Typography/Label/Label.d.ts +10 -0
- package/dist/types/stories/atoms/Typography/Label/Label.stories.d.ts +12 -0
- package/dist/types/stories/atoms/Typography/Label/index.d.ts +3 -0
- package/dist/types/stories/atoms/Typography/Paragraph/Paragraph.d.ts +10 -0
- package/dist/types/stories/atoms/Typography/Paragraph/Paragraph.stories.d.ts +11 -0
- package/dist/types/stories/atoms/Typography/Paragraph/index.d.ts +3 -0
- package/dist/types/stories/atoms/buttons/Button/Button.d.ts +1 -1
- package/dist/types/stories/atoms/buttons/Button/DangerSecondary/DangerSecondary.stories.d.ts +15 -0
- package/dist/types/stories/atoms/index.d.ts +5 -2
- package/dist/types/stories/index.d.ts +3 -3
- package/dist/types/stories/molecules/inputs/TextInput/TextInput.d.ts +4 -0
- package/package.json +1 -1
- package/stories/atoms/Typography/Heading/Heading.stories.ts +40 -0
- package/stories/atoms/Typography/Heading/Heading.tsx +26 -0
- package/stories/atoms/Typography/Heading/index.ts +3 -0
- package/stories/atoms/Typography/Label/Label.stories.ts +40 -0
- package/stories/atoms/Typography/Label/Label.tsx +25 -0
- package/stories/atoms/Typography/Label/index.ts +3 -0
- package/stories/atoms/Typography/Paragraph/Paragraph.stories.ts +36 -0
- package/stories/atoms/Typography/Paragraph/Paragraph.tsx +24 -0
- package/stories/atoms/Typography/Paragraph/index.ts +3 -0
- package/stories/atoms/buttons/Button/Button.tsx +39 -38
- package/stories/atoms/buttons/Button/DangerSecondary/DangerSecondary.stories.ts +90 -0
- package/stories/atoms/buttons/Button/tests/Button.test.tsx +0 -37
- package/stories/atoms/index.ts +16 -8
- package/stories/index.ts +15 -3
- package/stories/molecules/inputs/TextInput/TextInput.tsx +59 -46
- package/tailwind.config.js +1 -1
package/.storybook/preview.tsx
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { Preview } from "@storybook/react"
|
|
2
|
-
import Layout from "./Layout"
|
|
3
|
-
import React from "react"
|
|
4
|
-
import "../app/globals.css"
|
|
1
|
+
import { Preview } from "@storybook/react";
|
|
2
|
+
import Layout from "./Layout";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import "../app/globals.css";
|
|
5
5
|
// import "./fonts.css"
|
|
6
6
|
|
|
7
7
|
const preview: Preview = {
|
|
8
8
|
parameters: {
|
|
9
9
|
options: {
|
|
10
10
|
storySort: {
|
|
11
|
+
method: "alphabetical",
|
|
11
12
|
order: ["atoms", "molecules", "organisms"]
|
|
12
13
|
}
|
|
13
14
|
},
|
|
@@ -26,5 +27,5 @@ const preview: Preview = {
|
|
|
26
27
|
</Layout>
|
|
27
28
|
)
|
|
28
29
|
]
|
|
29
|
-
}
|
|
30
|
-
export default preview
|
|
30
|
+
};
|
|
31
|
+
export default preview;
|
package/dist/index.d.ts
CHANGED
|
@@ -35,6 +35,105 @@ declare module '@agility/plenum-ui/stories/atoms/Avatar/index' {
|
|
|
35
35
|
export default Avatar;
|
|
36
36
|
export type { IAvatarProps };
|
|
37
37
|
|
|
38
|
+
}
|
|
39
|
+
declare module '@agility/plenum-ui/stories/atoms/Typography/Heading/Heading' {
|
|
40
|
+
type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
41
|
+
export interface HeadingProps {
|
|
42
|
+
level: HeadingLevel;
|
|
43
|
+
children: React.ReactNode;
|
|
44
|
+
className?: string;
|
|
45
|
+
}
|
|
46
|
+
export default function Heading({ level, children, className }: HeadingProps): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
export {};
|
|
48
|
+
|
|
49
|
+
}
|
|
50
|
+
declare module '@agility/plenum-ui/stories/atoms/Typography/Heading/Heading.stories' {
|
|
51
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
52
|
+
import Heading from "@agility/plenum-ui/stories/atoms/Typography/Heading/Heading";
|
|
53
|
+
const meta: Meta<typeof Heading>;
|
|
54
|
+
type Story = StoryObj<typeof Heading>;
|
|
55
|
+
export const Heading1: Story;
|
|
56
|
+
export const Heading2: Story;
|
|
57
|
+
export const Heading3: Story;
|
|
58
|
+
export const Heading4: Story;
|
|
59
|
+
export const Heading5: Story;
|
|
60
|
+
export const Heading6: Story;
|
|
61
|
+
export const HeadingWithCustomClassName: Story;
|
|
62
|
+
export default meta;
|
|
63
|
+
|
|
64
|
+
}
|
|
65
|
+
declare module '@agility/plenum-ui/stories/atoms/Typography/Heading/index' {
|
|
66
|
+
import Heading, { HeadingProps } from "@agility/plenum-ui/stories/atoms/Typography/Heading/Heading";
|
|
67
|
+
export { Heading };
|
|
68
|
+
export type { HeadingProps };
|
|
69
|
+
|
|
70
|
+
}
|
|
71
|
+
declare module '@agility/plenum-ui/stories/atoms/Typography/Label/Label' {
|
|
72
|
+
type LabelAs = "span" | "p" | "label" | "strong" | "em";
|
|
73
|
+
type LabelSize = "xl" | "lg" | "md" | "sm" | "xs";
|
|
74
|
+
export interface LabelProps {
|
|
75
|
+
as?: LabelAs;
|
|
76
|
+
size?: LabelSize;
|
|
77
|
+
children: React.ReactNode;
|
|
78
|
+
className?: string;
|
|
79
|
+
}
|
|
80
|
+
export default function Label({ as, size, children, className }: LabelProps): import("react/jsx-runtime").JSX.Element;
|
|
81
|
+
export {};
|
|
82
|
+
|
|
83
|
+
}
|
|
84
|
+
declare module '@agility/plenum-ui/stories/atoms/Typography/Label/Label.stories' {
|
|
85
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
86
|
+
import Label from "@agility/plenum-ui/stories/atoms/Typography/Label/Label";
|
|
87
|
+
const meta: Meta<typeof Label>;
|
|
88
|
+
type Story = StoryObj<typeof Label>;
|
|
89
|
+
export const DefaultLabel: Story;
|
|
90
|
+
export const ExtraLargeLabel: Story;
|
|
91
|
+
export const LargeLabel: Story;
|
|
92
|
+
export const MediumLabel: Story;
|
|
93
|
+
export const SmallLabel: Story;
|
|
94
|
+
export const ExtraSmallLabel: Story;
|
|
95
|
+
export const LabelWithCustomStyle: Story;
|
|
96
|
+
export default meta;
|
|
97
|
+
|
|
98
|
+
}
|
|
99
|
+
declare module '@agility/plenum-ui/stories/atoms/Typography/Label/index' {
|
|
100
|
+
import Label, { LabelProps } from "@agility/plenum-ui/stories/atoms/Typography/Label/Label";
|
|
101
|
+
export { Label };
|
|
102
|
+
export type { LabelProps };
|
|
103
|
+
|
|
104
|
+
}
|
|
105
|
+
declare module '@agility/plenum-ui/stories/atoms/Typography/Paragraph/Paragraph' {
|
|
106
|
+
type ParagraphAs = "span" | "p" | "label" | "strong" | "em";
|
|
107
|
+
type ParagraphSize = "lg" | "md" | "sm" | "xs";
|
|
108
|
+
export interface ParagraphProps {
|
|
109
|
+
as?: ParagraphAs;
|
|
110
|
+
size?: ParagraphSize;
|
|
111
|
+
children: React.ReactNode;
|
|
112
|
+
className?: string;
|
|
113
|
+
}
|
|
114
|
+
export default function Paragraph({ as, size, children, className }: ParagraphProps): import("react/jsx-runtime").JSX.Element;
|
|
115
|
+
export {};
|
|
116
|
+
|
|
117
|
+
}
|
|
118
|
+
declare module '@agility/plenum-ui/stories/atoms/Typography/Paragraph/Paragraph.stories' {
|
|
119
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
120
|
+
import Paragraph from "@agility/plenum-ui/stories/atoms/Typography/Paragraph/Paragraph";
|
|
121
|
+
const meta: Meta<typeof Paragraph>;
|
|
122
|
+
type Story = StoryObj<typeof Paragraph>;
|
|
123
|
+
export const DefaultParagraph: Story;
|
|
124
|
+
export const LargeParagraph: Story;
|
|
125
|
+
export const MediumParagraph: Story;
|
|
126
|
+
export const SmallParagraph: Story;
|
|
127
|
+
export const ExtraSmallParagraph: Story;
|
|
128
|
+
export const ParagraphWithCustomStyle: Story;
|
|
129
|
+
export default meta;
|
|
130
|
+
|
|
131
|
+
}
|
|
132
|
+
declare module '@agility/plenum-ui/stories/atoms/Typography/Paragraph/index' {
|
|
133
|
+
import Paragraph, { ParagraphProps } from "@agility/plenum-ui/stories/atoms/Typography/Paragraph/Paragraph";
|
|
134
|
+
export { Paragraph };
|
|
135
|
+
export type { ParagraphProps };
|
|
136
|
+
|
|
38
137
|
}
|
|
39
138
|
declare module '@agility/plenum-ui/stories/atoms/badges/Badge' {
|
|
40
139
|
import React from "react";
|
|
@@ -87,7 +186,7 @@ declare module '@agility/plenum-ui/stories/atoms/buttons/Button/Alternative/Alte
|
|
|
87
186
|
declare module '@agility/plenum-ui/stories/atoms/buttons/Button/Button' {
|
|
88
187
|
import React, { HTMLAttributeAnchorTarget } from "react";
|
|
89
188
|
import { UnifiedIconName, IDynamicIconProps } from "@agility/plenum-ui/stories/atoms/icons/index";
|
|
90
|
-
export type BTNActionType = "primary" | "secondary" | "alternative" | "danger" | "warning";
|
|
189
|
+
export type BTNActionType = "primary" | "secondary" | "alternative" | "danger" | "danger-secondary" | "warning";
|
|
91
190
|
export interface IButtonProps extends Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> {
|
|
92
191
|
/** Is the button a Primary CTA, alternative or danger button? */
|
|
93
192
|
actionType?: BTNActionType;
|
|
@@ -136,6 +235,24 @@ declare module '@agility/plenum-ui/stories/atoms/buttons/Button/Danger/Danger.st
|
|
|
136
235
|
export const DangerLarge: Story;
|
|
137
236
|
export const DangerExtraLarge: Story;
|
|
138
237
|
|
|
238
|
+
}
|
|
239
|
+
declare module '@agility/plenum-ui/stories/atoms/buttons/Button/DangerSecondary/DangerSecondary.stories' {
|
|
240
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
241
|
+
import Button from "@agility/plenum-ui/stories/atoms/buttons/Button/Button";
|
|
242
|
+
const meta: Meta<typeof Button>;
|
|
243
|
+
export default meta;
|
|
244
|
+
type Story = StoryObj<typeof Button>;
|
|
245
|
+
export const DangerSecondary: Story;
|
|
246
|
+
export const DangerSecondaryDisabled: Story;
|
|
247
|
+
export const DangerSecondaryTrailingIcon: Story;
|
|
248
|
+
export const DangerSecondaryLeadingIcon: Story;
|
|
249
|
+
export const DangerSecondarySimpleIconName: Story;
|
|
250
|
+
export const DangerSecondaryExtraSmall: Story;
|
|
251
|
+
export const DangerSecondarySmall: Story;
|
|
252
|
+
export const DangerSecondaryMedium: Story;
|
|
253
|
+
export const DangerSecondaryLarge: Story;
|
|
254
|
+
export const DangerSecondaryExtraLarge: Story;
|
|
255
|
+
|
|
139
256
|
}
|
|
140
257
|
declare module '@agility/plenum-ui/stories/atoms/buttons/Button/Primary/Primary.stories' {
|
|
141
258
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
@@ -369,8 +486,11 @@ declare module '@agility/plenum-ui/stories/atoms/index' {
|
|
|
369
486
|
import { Button, Capsule, BTNActionType, IButtonProps, ICapsuleProps } from "@agility/plenum-ui/stories/atoms/buttons/index";
|
|
370
487
|
import { DynamicIcon, FAIconName, IDynamicIconProps, IIconWithShadowProps, IconName, IconWithShadow, UnifiedIconName, isFAIcon, isHeroIcon, isTablerIcon, isUnifiedIconName } from "@agility/plenum-ui/stories/atoms/icons/index";
|
|
371
488
|
import { ILoaderProps, IRadialProgressProps, Loader, RadialProgress } from "@agility/plenum-ui/stories/atoms/loaders/index";
|
|
372
|
-
|
|
373
|
-
|
|
489
|
+
import { Heading, HeadingProps } from "@agility/plenum-ui/stories/atoms/Typography/Heading/index";
|
|
490
|
+
import { Label, LabelProps } from "@agility/plenum-ui/stories/atoms/Typography/Label/index";
|
|
491
|
+
import { Paragraph, ParagraphProps } from "@agility/plenum-ui/stories/atoms/Typography/Paragraph/index";
|
|
492
|
+
export type { IAvatarProps, IBadgeProps, IButtonProps, ICapsuleProps, IDynamicIconProps, IIconWithShadowProps, ILoaderProps, IRadialProgressProps, HeadingProps, LabelProps, ParagraphProps, UnifiedIconName, IconName, FAIconName, BTNActionType };
|
|
493
|
+
export { Avatar, Badge, Button, Capsule, DynamicIcon, IconWithShadow, Loader, RadialProgress, Heading, Label, Paragraph, isFAIcon, isHeroIcon, isTablerIcon, isUnifiedIconName };
|
|
374
494
|
|
|
375
495
|
}
|
|
376
496
|
declare module '@agility/plenum-ui/stories/atoms/loaders/Loader' {
|
|
@@ -419,11 +539,11 @@ declare module '@agility/plenum-ui/stories/atoms/loaders/index' {
|
|
|
419
539
|
|
|
420
540
|
}
|
|
421
541
|
declare module '@agility/plenum-ui/stories/index' {
|
|
422
|
-
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";
|
|
542
|
+
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, Heading, HeadingProps, Label, LabelProps, Paragraph, ParagraphProps } from "@agility/plenum-ui/stories/atoms/index";
|
|
423
543
|
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";
|
|
424
544
|
import { IAnimatedLabelInputProps, AnimatedLabelTextArea, IAnimatedLabelTextAreaProps, IButtonDropdownProps, IDropdownProps, IEmptySectionPlaceholderProps, IItemProp, IFormInputWithAddonsProps, AnimatedLabelInput, ButtonDropdown, Dropdown, EmptySectionPlaceholder, FormInputWithAddons, TextInputSelect, ITextInputSelectProps, IAnimatedFormInputWithAddons, AnimatedFormInputWithAddons, DropdownWithMultiSelect, MultiSelectItemProps } from "@agility/plenum-ui/stories/organisms/index";
|
|
425
|
-
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, MultiSelectItemProps };
|
|
426
|
-
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, DropdownWithMultiSelect };
|
|
545
|
+
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, MultiSelectItemProps, HeadingProps, LabelProps, ParagraphProps };
|
|
546
|
+
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, DropdownWithMultiSelect, Heading, Label, Paragraph };
|
|
427
547
|
|
|
428
548
|
}
|
|
429
549
|
declare module '@agility/plenum-ui/stories/molecules/index' {
|
|
@@ -576,6 +696,10 @@ declare module '@agility/plenum-ui/stories/molecules/inputs/TextInput/TextInput'
|
|
|
576
696
|
/**Placeholder input text*/
|
|
577
697
|
placeholder?: string;
|
|
578
698
|
className?: string;
|
|
699
|
+
/** Callback on focus */
|
|
700
|
+
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
701
|
+
/** Callback on blur */
|
|
702
|
+
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
579
703
|
}
|
|
580
704
|
const _TextInput: React.ForwardRefExoticComponent<ITextInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
581
705
|
export default _TextInput;
|