@agility/plenum-ui 2.1.8 → 2.1.10
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/dist/index.d.ts +3 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +3 -3
- package/dist/types/stories/organisms/DropdownComponent/DropdownComponent.d.ts +2 -0
- package/dist/types/stories/organisms/FormInputWithAddons/FormInputWithAddons.d.ts +1 -0
- package/package.json +1 -1
- package/stories/organisms/DropdownComponent/DropdownComponent.tsx +6 -3
- package/stories/organisms/FormInputWithAddons/FormInputWithAddons.tsx +4 -1
|
@@ -23,6 +23,7 @@ export interface IDropdownProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
23
23
|
buttonClassname?: ClassNameWithAutocomplete;
|
|
24
24
|
iconClassname?: ClassNameWithAutocomplete;
|
|
25
25
|
iconSpacingClassname?: ClassNameWithAutocomplete;
|
|
26
|
+
dividerClassname?: ClassNameWithAutocomplete;
|
|
26
27
|
placement?: Placement;
|
|
27
28
|
offsetOptions?: Partial<{
|
|
28
29
|
mainAxis: number;
|
|
@@ -43,6 +44,7 @@ export declare const defaultClassNames: {
|
|
|
43
44
|
buttonClassname: string;
|
|
44
45
|
iconClassname: string;
|
|
45
46
|
iconSpacingClassname: string;
|
|
47
|
+
dividerClassname: string;
|
|
46
48
|
};
|
|
47
49
|
/** Comment */
|
|
48
50
|
declare const Dropdown: React.FC<IDropdownProps>;
|
|
@@ -18,6 +18,7 @@ export interface IFormInputWithAddonsProps extends Omit<IInputFieldProps, "type"
|
|
|
18
18
|
customIconClass?: string;
|
|
19
19
|
type: AcceptedInputTypes;
|
|
20
20
|
addonBTN?: INestedInputButtonProps;
|
|
21
|
+
inputRef: React.RefObject<HTMLInputElement>;
|
|
21
22
|
}
|
|
22
23
|
declare const FormInputWithAddons: React.FC<IFormInputWithAddonsProps>;
|
|
23
24
|
export default FormInputWithAddons;
|
package/package.json
CHANGED
|
@@ -46,6 +46,7 @@ export interface IDropdownProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
46
46
|
buttonClassname?: ClassNameWithAutocomplete
|
|
47
47
|
iconClassname?: ClassNameWithAutocomplete
|
|
48
48
|
iconSpacingClassname?: ClassNameWithAutocomplete
|
|
49
|
+
dividerClassname?: ClassNameWithAutocomplete
|
|
49
50
|
placement?: Placement
|
|
50
51
|
offsetOptions?: Partial<{
|
|
51
52
|
mainAxis: number
|
|
@@ -67,7 +68,8 @@ export const defaultClassNames = {
|
|
|
67
68
|
buttonClassname:
|
|
68
69
|
"py-[2px] flex items-center rounded outline-purple-500 transition-all text-gray-400 hover:text-gray-600 ",
|
|
69
70
|
iconClassname: "ml-1 h-5 w-6",
|
|
70
|
-
iconSpacingClassname: "flex items-center gap-x-4"
|
|
71
|
+
iconSpacingClassname: "flex items-center gap-x-4",
|
|
72
|
+
dividerClassname: "border-b border-b-gray-100"
|
|
71
73
|
}
|
|
72
74
|
|
|
73
75
|
/** Comment */
|
|
@@ -82,6 +84,7 @@ const Dropdown: React.FC<IDropdownProps> = ({
|
|
|
82
84
|
buttonClassname,
|
|
83
85
|
iconClassname,
|
|
84
86
|
iconSpacingClassname,
|
|
87
|
+
dividerClassname,
|
|
85
88
|
CustomDropdownTrigger,
|
|
86
89
|
placement = "bottom-start",
|
|
87
90
|
offsetOptions,
|
|
@@ -195,8 +198,8 @@ const Dropdown: React.FC<IDropdownProps> = ({
|
|
|
195
198
|
//Add dividing line between stacks
|
|
196
199
|
stackIndex !== items.length - 1 &&
|
|
197
200
|
itemIndex === itemStack.length - 1 &&
|
|
198
|
-
|
|
199
|
-
|
|
201
|
+
`${dividerClassname ? dividerClassname : defaultClassNames.dividerClassname}`,
|
|
202
|
+
"w-full"
|
|
200
203
|
),
|
|
201
204
|
...rest,
|
|
202
205
|
...getItemProps(),
|
|
@@ -20,6 +20,7 @@ export interface IFormInputWithAddonsProps extends Omit<IInputFieldProps, "type"
|
|
|
20
20
|
customIconClass?: string
|
|
21
21
|
type: AcceptedInputTypes
|
|
22
22
|
addonBTN?: INestedInputButtonProps
|
|
23
|
+
inputRef: React.RefObject<HTMLInputElement>
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
const FormInputWithAddons: React.FC<IFormInputWithAddonsProps> = ({
|
|
@@ -46,6 +47,7 @@ const FormInputWithAddons: React.FC<IFormInputWithAddonsProps> = ({
|
|
|
46
47
|
customIconClass,
|
|
47
48
|
type,
|
|
48
49
|
addonBTN,
|
|
50
|
+
inputRef,
|
|
49
51
|
...rest
|
|
50
52
|
}) => {
|
|
51
53
|
// #region logic to determine the width of the lead and or trailing labels in order to offset the input padding by the appropriate amount.
|
|
@@ -114,7 +116,8 @@ const FormInputWithAddons: React.FC<IFormInputWithAddonsProps> = ({
|
|
|
114
116
|
style: {
|
|
115
117
|
paddingRight: `${trailLabelWidth + addonOffset}px`,
|
|
116
118
|
paddingLeft: `${leadLabelWidth + addonOffset}px`
|
|
117
|
-
}
|
|
119
|
+
},
|
|
120
|
+
inputRef
|
|
118
121
|
}}
|
|
119
122
|
/>
|
|
120
123
|
{(trailLabel || trailIcon) && (
|