@agility/plenum-ui 2.0.0-rc16 → 2.0.0-rc18

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 CHANGED
@@ -58,7 +58,8 @@ import { Component } from '@agility/plenum-ui';
58
58
 
59
59
  ### Development and Build Scripts
60
60
 
61
- Run your development server with Storybook:
61
+
62
+ #### Run your development server with Storybook:
62
63
 
63
64
  ```bash
64
65
  npm run dev
@@ -66,7 +67,7 @@ npm run dev
66
67
  yarn dev
67
68
  ```
68
69
 
69
- Build your project:
70
+ #### Build your project:
70
71
 
71
72
  ```bash
72
73
  npm run build
@@ -74,7 +75,28 @@ npm run build
74
75
  yarn build
75
76
  ```
76
77
 
77
- Clean the \`dist\` directory:
78
+ #### Use yarn link to locally test the library in another project:
79
+
80
+ In the Plenum project directory after having run a build, run:
81
+ ```bash
82
+ yarn link.
83
+ ```
84
+ You should see the following in your terminal:
85
+ ```bash
86
+ yarn link v1.22.10
87
+ success Registered "@agility/plenum-ui".
88
+ ```
89
+ You can now run
90
+ ```bash
91
+ yarn link "@agility/plenum-ui"
92
+ ```
93
+ in the projects where you want to consume this package and it will be used instead. It should output a message like
94
+ ```bash
95
+ yarn link v1.22.10
96
+ success Using linked package for "@agility/plenum-ui".
97
+ ```
98
+
99
+ #### Clean the \`dist\` directory:
78
100
 
79
101
  ```bash
80
102
  npm run clean
@@ -82,7 +104,7 @@ npm run clean
82
104
  yarn clean
83
105
  ```
84
106
 
85
- Lint your project:
107
+ #### Lint your project:
86
108
 
87
109
  ```bash
88
110
  npm run lint
@@ -90,7 +112,7 @@ npm run lint
90
112
  yarn lint
91
113
  ```
92
114
 
93
- Build Tailwind CSS:
115
+ #### Build Tailwind CSS:
94
116
 
95
117
  ```bash
96
118
  npm run build:tw
@@ -100,7 +122,7 @@ yarn build:tw
100
122
 
101
123
  ### Storybook Scripts
102
124
 
103
- Build your Storybook:
125
+ #### Build your Storybook:
104
126
 
105
127
  ```bash
106
128
  npm run build-storybook
@@ -108,7 +130,7 @@ npm run build-storybook
108
130
  yarn build-storybook
109
131
  ```
110
132
 
111
- Run your Storybook in development mode:
133
+ #### Run your Storybook in development mode:
112
134
 
113
135
  ```bash
114
136
  npm run storybook:dev
@@ -116,7 +138,7 @@ npm run storybook:dev
116
138
  yarn storybook:dev
117
139
  ```
118
140
 
119
- Generate Tailwind CSS for Storybook and watch for changes:
141
+ #### Generate Tailwind CSS for Storybook and watch for changes:
120
142
 
121
143
  ```bash
122
144
  npm run storybook:tw
@@ -124,7 +146,7 @@ npm run storybook:tw
124
146
  yarn storybook:tw
125
147
  ```
126
148
 
127
- Build specific parts of Storybook:
149
+ #### Build specific parts of Storybook:
128
150
 
129
151
  ```bash
130
152
  # Build Storybook
@@ -138,7 +160,7 @@ npm run sb-build:tw
138
160
  yarn sb-build:tw
139
161
  ```
140
162
 
141
- Compile TypeScript files using custom build script:
163
+ #### Compile TypeScript files using custom build script:
142
164
 
143
165
  ```bash
144
166
  npm run build:tsc
package/dist/index.d.ts CHANGED
@@ -86,7 +86,7 @@ declare module '@agility/plenum-ui/stories/atoms/buttons/Button/Button' {
86
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.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
89
+ export interface IButtonProps extends Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> {
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'. */
@@ -111,12 +111,8 @@ declare module '@agility/plenum-ui/stories/atoms/buttons/Button/Button' {
111
111
  isLoading?: boolean;
112
112
  className?: string;
113
113
  iconObj?: React.ReactNode;
114
- ref?: React.LegacyRef<HTMLButtonElement>;
115
114
  }
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;
115
+ const Button: React.ForwardRefExoticComponent<IButtonProps & React.RefAttributes<HTMLButtonElement>>;
120
116
  export default Button;
121
117
 
122
118
  }
@@ -553,7 +549,7 @@ declare module '@agility/plenum-ui/stories/molecules/inputs/TextInput/TextInput'
553
549
  /** Max length of input character */
554
550
  maxLength?: number;
555
551
  /** Callback on change */
556
- onChange(value: string): void;
552
+ handleChange(value: string): void;
557
553
  /** input value */
558
554
  value: string;
559
555
  /**Placeholder input text*/
@@ -776,13 +772,17 @@ declare module '@agility/plenum-ui/stories/molecules/inputs/select/index' {
776
772
  }
777
773
  declare module '@agility/plenum-ui/stories/molecules/inputs/textArea/TextArea' {
778
774
  import React from "react";
775
+ interface ILabelProps extends React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement> {
776
+ display: string;
777
+ htmlFor?: string;
778
+ }
779
779
  export interface ITextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "onChange"> {
780
780
  /** Input ID */
781
781
  id?: string;
782
782
  /** Input Name */
783
783
  name?: string;
784
784
  /** Label for the input */
785
- label?: string;
785
+ label?: ILabelProps;
786
786
  /** Error state */
787
787
  isError?: boolean;
788
788
  /** If field is required */
@@ -949,6 +949,7 @@ declare module '@agility/plenum-ui/stories/organisms/DropdownComponent/DropdownC
949
949
  activeItemClassname?: ClassNameWithAutocomplete;
950
950
  buttonClassname?: ClassNameWithAutocomplete;
951
951
  iconClassname?: ClassNameWithAutocomplete;
952
+ iconSpacingClassname?: ClassNameWithAutocomplete;
952
953
  placement?: Placement;
953
954
  offsetOptions?: Partial<{
954
955
  mainAxis: number;
@@ -963,6 +964,7 @@ declare module '@agility/plenum-ui/stories/organisms/DropdownComponent/DropdownC
963
964
  activeItemClassname: string;
964
965
  buttonClassname: string;
965
966
  iconClassname: string;
967
+ iconSpacingClassname: string;
966
968
  };
967
969
  /** Comment */
968
970
  const Dropdown: React.FC<IDropdownProps>;