@agility/plenum-ui 2.1.7 → 2.1.9
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/tailwind.css +20204 -5
- package/dist/types/stories/organisms/DropdownComponent/DropdownComponent.d.ts +2 -0
- package/dist/types/stories/organisms/TextInputSelect/TextInputSelect.d.ts +1 -0
- package/package.json +1 -1
- package/stories/organisms/DropdownComponent/DropdownComponent.tsx +6 -3
- package/stories/organisms/TextInputSelect/TextInputSelect.tsx +4 -2
|
@@ -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>;
|
|
@@ -43,6 +43,7 @@ export interface ITextInputSelectProps {
|
|
|
43
43
|
onChange?(value: string): void;
|
|
44
44
|
/** Callback on input select field */
|
|
45
45
|
onSelectOption?(value: string): void;
|
|
46
|
+
selectInputClassName?: string;
|
|
46
47
|
}
|
|
47
48
|
declare const TextInputSelect: FC<ITextInputSelectProps>;
|
|
48
49
|
export default TextInputSelect;
|
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(),
|
|
@@ -49,6 +49,7 @@ export interface ITextInputSelectProps {
|
|
|
49
49
|
onChange?(value: string): void
|
|
50
50
|
/** Callback on input select field */
|
|
51
51
|
onSelectOption?(value: string): void
|
|
52
|
+
selectInputClassName?: string
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
const TextInputSelect: FC<ITextInputSelectProps> = ({
|
|
@@ -70,7 +71,8 @@ const TextInputSelect: FC<ITextInputSelectProps> = ({
|
|
|
70
71
|
prefix,
|
|
71
72
|
onChange,
|
|
72
73
|
onSelectOption,
|
|
73
|
-
value: externalValue
|
|
74
|
+
value: externalValue,
|
|
75
|
+
selectInputClassName
|
|
74
76
|
}: ITextInputSelectProps) => {
|
|
75
77
|
const [isFocus, setIsFocus] = useState<boolean>(Boolean(isFocused))
|
|
76
78
|
const [value, setValue] = useState<string>(defaultValue || "")
|
|
@@ -168,7 +170,7 @@ const TextInputSelect: FC<ITextInputSelectProps> = ({
|
|
|
168
170
|
align={"right"}
|
|
169
171
|
onSelectOption={onSelectOption}
|
|
170
172
|
isDisabled={isDisabled}
|
|
171
|
-
className={cn(isError ? "border-red-500" : "")}
|
|
173
|
+
className={cn(selectInputClassName, isError ? "border-red-500" : "")}
|
|
172
174
|
/>
|
|
173
175
|
)}
|
|
174
176
|
</div>
|