ab-ui-library 1.42.8 → 1.42.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.
@@ -132,6 +132,7 @@ var FormContainer = function FormContainer(props) {
132
132
  isDirty: isDirty,
133
133
  isSubmitted: isSubmitted,
134
134
  isSubmitting: isSubmitting,
135
+ isValid: formState.isValid,
135
136
  clearErrors: clearErrors,
136
137
  setError: setError,
137
138
  dirtyFields: dirtyFields,
@@ -168,7 +168,9 @@ var SideSheet = function SideSheet(props) {
168
168
  })), /*#__PURE__*/React.createElement("div", {
169
169
  className: "side-sheet__content scrollbar scrollbar--vertical",
170
170
  ref: scrollbarContainerRef
171
- }, children), footerButtons ? /*#__PURE__*/React.createElement(Footer, {
171
+ }, typeof children === 'function' ? children({
172
+ scrollbarContainerRef: scrollbarContainerRef
173
+ }) : children), footerButtons ? /*#__PURE__*/React.createElement(Footer, {
172
174
  footerButtons: footerButtons,
173
175
  isLoading: isLoading,
174
176
  onClose: onClose,
@@ -6,6 +6,9 @@ export type TCheckboxInfo = {
6
6
  label: string;
7
7
  isChecked: boolean;
8
8
  };
9
+ export type TSideSheetChildren = {
10
+ scrollbarContainerRef?: RefObject<HTMLDivElement>;
11
+ };
9
12
  export interface TSideSheetPropTypes {
10
13
  closeOnOutsideClick?: boolean;
11
14
  shouldRemoveCallback?: boolean;
@@ -24,7 +27,7 @@ export interface TSideSheetPropTypes {
24
27
  topLeftActions?: ReactNode;
25
28
  topRightActions?: ReactNode;
26
29
  tabItemsProps?: TTabProps;
27
- children?: ReactNode;
30
+ children?: ReactNode | (({ scrollbarContainerRef }: TSideSheetChildren) => ReactNode);
28
31
  className?: string;
29
32
  checkboxInfo?: TCheckboxInfo;
30
33
  headerContent?: ReactNode;
@@ -17,5 +17,6 @@ export type TFormContextProps = {
17
17
  trigger?: UseFormTrigger<TFormData>;
18
18
  getFieldState?: UseFormGetFieldState<TFormData>;
19
19
  unregister?: UseFormUnregister<TFormData>;
20
+ isValid: boolean;
20
21
  };
21
22
  export declare const FormContext: import("react").Context<TFormContextProps>;
package/context/types.js CHANGED
@@ -6,7 +6,8 @@ var FormContext = /*#__PURE__*/createContext({
6
6
  setValue: noop,
7
7
  isSubmitted: false,
8
8
  isSubmitting: false,
9
- dirtyFields: {}
9
+ dirtyFields: {},
10
+ isValid: false
10
11
  });
11
12
 
12
13
  export { FormContext };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ab-ui-library",
3
- "version": "1.42.8",
3
+ "version": "1.42.10",
4
4
  "description": "UI library for AM",
5
5
  "main": "./index.js",
6
6
  "module": "./index.js",