@agility/plenum-ui 2.0.0-rc13 → 2.0.0-rc15
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/build.js +8 -4
- package/dist/index.d.ts +26 -24
- package/dist/index.js +1 -6372
- package/dist/index.js.map +3 -3
- package/dist/types/stories/atoms/buttons/Button/Button.d.ts +2 -2
- package/dist/types/stories/atoms/buttons/Capsule/Capsule.d.ts +1 -1
- package/dist/types/stories/atoms/icons/DynamicIcon.d.ts +1 -1
- package/dist/types/stories/atoms/icons/TablerIcon.d.ts +1 -1
- package/dist/types/stories/index.d.ts +2 -2
- package/dist/types/stories/organisms/AnimatedLabelInput/AnimatedLabelInput.d.ts +1 -1
- package/dist/types/stories/organisms/DropdownComponent/DropdownComponent.d.ts +14 -9
- package/dist/types/stories/organisms/DropdownComponent/index.d.ts +2 -2
- package/dist/types/stories/organisms/index.d.ts +2 -2
- package/package.json +18 -3
- package/rollup.config.mjs +42 -0
- package/stories/atoms/buttons/Button/Button.tsx +3 -2
- package/stories/atoms/buttons/Capsule/Capsule.tsx +2 -1
- package/stories/atoms/icons/DynamicIcon.tsx +2 -2
- package/stories/atoms/icons/TablerIcon.tsx +1 -1
- package/stories/atoms/loaders/Loader.tsx +12 -6
- package/stories/index.ts +0 -2
- package/stories/molecules/inputs/textArea/TextArea.tsx +13 -16
- package/stories/organisms/AnimatedLabelInput/AnimatedLabelInput.tsx +35 -33
- package/stories/organisms/AnimatedLabelTextArea/AnimatedLabelTextArea.tsx +3 -3
- package/stories/organisms/ButtonDropdown/ButtonDropdown.tsx +13 -16
- package/stories/organisms/DropdownComponent/DropdownComponent.tsx +17 -15
- package/stories/organisms/DropdownComponent/index.ts +2 -2
- package/stories/organisms/index.ts +10 -3
- package/tsconfig.lib.json +13 -6
- package/.yarnrc.yml +0 -1
- package/dist/types/stories/layouts/index.d.ts +0 -0
- 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/organisms/DropdownComponent/Dropdown.test.tsx +0 -0
- /package/dist/{lib/tailwind.css → tailwind.css} +0 -0
package/build.js
CHANGED
|
@@ -15,11 +15,17 @@ execSync("tsc --emitDeclarationOnly --project tsconfig.lib.json", { stdio: "inhe
|
|
|
15
15
|
// Build script using esbuild
|
|
16
16
|
esbuild
|
|
17
17
|
.build({
|
|
18
|
+
logLevel: "info",
|
|
18
19
|
entryPoints: [path.resolve(__dirname, "stories/index.ts")],
|
|
20
|
+
|
|
19
21
|
bundle: true,
|
|
20
22
|
platform: "browser",
|
|
21
|
-
target: ["
|
|
22
|
-
|
|
23
|
+
target: ["esnext"],
|
|
24
|
+
minify: true,
|
|
25
|
+
pure: ["React.createElement"],
|
|
26
|
+
jsx: 'transform',
|
|
27
|
+
loader: { '.js': 'jsx' },
|
|
28
|
+
|
|
23
29
|
outdir: path.resolve(__dirname, "dist"),
|
|
24
30
|
sourcemap: true,
|
|
25
31
|
external: [
|
|
@@ -32,8 +38,6 @@ esbuild
|
|
|
32
38
|
"@tabler/icons",
|
|
33
39
|
"@tabler/icons-react",
|
|
34
40
|
"classnames",
|
|
35
|
-
"react",
|
|
36
|
-
"react-dom",
|
|
37
41
|
"react-icons"
|
|
38
42
|
],
|
|
39
43
|
format: "esm"
|
package/dist/index.d.ts
CHANGED
|
@@ -83,10 +83,10 @@ declare module '@agility/plenum-ui/stories/atoms/buttons/Button/Alternative/Alte
|
|
|
83
83
|
|
|
84
84
|
}
|
|
85
85
|
declare module '@agility/plenum-ui/stories/atoms/buttons/Button/Button' {
|
|
86
|
-
import { HTMLAttributeAnchorTarget } from "react";
|
|
86
|
+
import React, { HTMLAttributeAnchorTarget } from "react";
|
|
87
87
|
import { UnifiedIconName, IDynamicIconProps } from "@agility/plenum-ui/stories/atoms/icons/index";
|
|
88
88
|
export type BTNActionType = "primary" | "secondary" | "alternative" | "danger";
|
|
89
|
-
export interface IButtonProps extends React.
|
|
89
|
+
export interface IButtonProps extends React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
|
|
90
90
|
/** Is the button a Primary CTA, alternative or danger button? */
|
|
91
91
|
actionType?: BTNActionType;
|
|
92
92
|
/** How lg should the button be? - Defaults to 'base'. */
|
|
@@ -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'. */
|
|
@@ -276,7 +276,7 @@ declare module '@agility/plenum-ui/stories/atoms/icons/DynamicIcon' {
|
|
|
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
|
}
|
|
@@ -402,13 +402,10 @@ declare module '@agility/plenum-ui/stories/atoms/loaders/index' {
|
|
|
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
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,
|
|
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,
|
|
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
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 };
|
|
408
408
|
|
|
409
|
-
}
|
|
410
|
-
declare module '@agility/plenum-ui/stories/layouts/index' {
|
|
411
|
-
|
|
412
409
|
}
|
|
413
410
|
declare module '@agility/plenum-ui/stories/molecules/index' {
|
|
414
411
|
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";
|
|
@@ -862,7 +859,7 @@ declare module '@agility/plenum-ui/stories/molecules/inputs/toggleSwitch/index'
|
|
|
862
859
|
declare module '@agility/plenum-ui/stories/organisms/AnimatedLabelInput/AnimatedLabelInput' {
|
|
863
860
|
import React from "react";
|
|
864
861
|
import { IInputFieldProps } from "@/stories/molecules/inputs/InputField";
|
|
865
|
-
interface ILabelProps extends React.
|
|
862
|
+
interface ILabelProps extends React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement> {
|
|
866
863
|
display: string;
|
|
867
864
|
}
|
|
868
865
|
export interface IAnimatedLabelInputProps extends Omit<IInputFieldProps, "handleChange"> {
|
|
@@ -941,19 +938,17 @@ declare module '@agility/plenum-ui/stories/organisms/DropdownComponent/DropdownC
|
|
|
941
938
|
isEmphasized?: boolean;
|
|
942
939
|
key: React.Key;
|
|
943
940
|
}
|
|
944
|
-
export interface IDropdownClassnames {
|
|
945
|
-
groupClassname?: ClassNameWithAutocomplete;
|
|
946
|
-
itemsClassname?: ClassNameWithAutocomplete;
|
|
947
|
-
itemClassname?: ClassNameWithAutocomplete;
|
|
948
|
-
activeItemClassname?: ClassNameWithAutocomplete;
|
|
949
|
-
buttonClassname?: ClassNameWithAutocomplete;
|
|
950
|
-
}
|
|
951
941
|
export interface IDropdownProps extends HTMLAttributes<HTMLDivElement> {
|
|
952
942
|
items: IItemProp[][];
|
|
953
943
|
label: string;
|
|
954
944
|
CustomDropdownTrigger?: React.ReactNode;
|
|
955
945
|
id: string;
|
|
956
|
-
|
|
946
|
+
groupClassname?: ClassNameWithAutocomplete;
|
|
947
|
+
itemsClassname?: ClassNameWithAutocomplete;
|
|
948
|
+
itemClassname?: ClassNameWithAutocomplete;
|
|
949
|
+
activeItemClassname?: ClassNameWithAutocomplete;
|
|
950
|
+
buttonClassname?: ClassNameWithAutocomplete;
|
|
951
|
+
iconClassname?: ClassNameWithAutocomplete;
|
|
957
952
|
placement?: Placement;
|
|
958
953
|
offsetOptions?: Partial<{
|
|
959
954
|
mainAxis: number;
|
|
@@ -961,7 +956,14 @@ declare module '@agility/plenum-ui/stories/organisms/DropdownComponent/DropdownC
|
|
|
961
956
|
alignmentAxis: number | null;
|
|
962
957
|
}>;
|
|
963
958
|
}
|
|
964
|
-
export const defaultClassNames:
|
|
959
|
+
export const defaultClassNames: {
|
|
960
|
+
groupClassname: string;
|
|
961
|
+
itemsClassname: string;
|
|
962
|
+
itemClassname: string;
|
|
963
|
+
activeItemClassname: string;
|
|
964
|
+
buttonClassname: string;
|
|
965
|
+
iconClassname: string;
|
|
966
|
+
};
|
|
965
967
|
/** Comment */
|
|
966
968
|
const Dropdown: React.FC<IDropdownProps>;
|
|
967
969
|
export default Dropdown;
|
|
@@ -974,8 +976,8 @@ declare module '@agility/plenum-ui/stories/organisms/DropdownComponent/dropdownI
|
|
|
974
976
|
|
|
975
977
|
}
|
|
976
978
|
declare module '@agility/plenum-ui/stories/organisms/DropdownComponent/index' {
|
|
977
|
-
import Dropdown, { IItemProp,
|
|
978
|
-
export type { IItemProp,
|
|
979
|
+
import Dropdown, { IItemProp, IDropdownProps, defaultClassNames } from "@agility/plenum-ui/stories/organisms/DropdownComponent/DropdownComponent";
|
|
980
|
+
export type { IItemProp, IDropdownProps };
|
|
979
981
|
export { defaultClassNames };
|
|
980
982
|
export default Dropdown;
|
|
981
983
|
|
|
@@ -1118,11 +1120,11 @@ declare module '@agility/plenum-ui/stories/organisms/index' {
|
|
|
1118
1120
|
import AnimatedLabelInput, { IAnimatedLabelInputProps } from "@agility/plenum-ui/stories/organisms/AnimatedLabelInput/index";
|
|
1119
1121
|
import AnimatedLabelTextArea, { IAnimatedLabelTextAreaProps } from "@agility/plenum-ui/stories/organisms/AnimatedLabelTextArea/index";
|
|
1120
1122
|
import ButtonDropdown, { IButtonDropdownProps } from "@agility/plenum-ui/stories/organisms/ButtonDropdown/index";
|
|
1121
|
-
import Dropdown, {
|
|
1123
|
+
import Dropdown, { IDropdownProps, IItemProp } from "@agility/plenum-ui/stories/organisms/DropdownComponent/index";
|
|
1122
1124
|
import EmptySectionPlaceholder, { IEmptySectionPlaceholderProps } from "@agility/plenum-ui/stories/organisms/EmptySectionPlaceholder/index";
|
|
1123
1125
|
import FormInputWithAddons, { IFormInputWithAddonsProps } from "@agility/plenum-ui/stories/organisms/FormInputWithAddons/index";
|
|
1124
1126
|
import TextInputSelect, { ITextInputSelectProps } from "@agility/plenum-ui/stories/organisms/TextInputSelect/index";
|
|
1125
|
-
export type { IAnimatedLabelInputProps, IAnimatedLabelTextAreaProps, IButtonDropdownProps,
|
|
1127
|
+
export type { IAnimatedLabelInputProps, IAnimatedLabelTextAreaProps, IButtonDropdownProps, IDropdownProps, IEmptySectionPlaceholderProps, IItemProp, IFormInputWithAddonsProps, ITextInputSelectProps };
|
|
1126
1128
|
export { AnimatedLabelInput, AnimatedLabelTextArea, ButtonDropdown, Dropdown, EmptySectionPlaceholder, FormInputWithAddons, TextInputSelect };
|
|
1127
1129
|
|
|
1128
1130
|
}
|