@luscii-healthtech/web-ui 27.11.3 → 27.11.4

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.
@@ -25,6 +25,20 @@ type CRUDPagePropsWithoutHeaderOrTitle = {
25
25
  currentStep: StepsProps["currentStep"];
26
26
  localization: StepsProps["localization"];
27
27
  };
28
+ /**
29
+ * When `true` will set the height of the
30
+ * page to `100vh` and use `overflow-y: auto`
31
+ * to set a better mobile experience when this form is in use.
32
+ *
33
+ * By default in vitals the html, body and react container are
34
+ * set to `100vh` height with `overflow: hidden` and the pages.
35
+ *
36
+ * It would be probably best if the page by default had `100vh` and
37
+ * `overflow-y: auto` but it could cause strange layout behaviors in HiX,
38
+ * for the sake of avoiding breaking changes I'd rather keep it configurable.
39
+ *
40
+ */
41
+ isMobileFriendly?: boolean;
28
42
  };
29
43
  export type CRUDPageProps = (CRUDPagePropsWithoutHeaderOrTitle & {
30
44
  title: CRUDPageTitle;
@@ -32,7 +46,12 @@ export type CRUDPageProps = (CRUDPagePropsWithoutHeaderOrTitle & {
32
46
  }) | (CRUDPagePropsWithoutHeaderOrTitle & {
33
47
  header: CRUDPageHeader;
34
48
  title?: never;
35
- }) | (CRUDPagePropsWithoutHeaderOrTitle & {
49
+ })
50
+ /**
51
+ * For the minimalistic variant of the form, where no page title
52
+ * and no header components are needed.
53
+ */
54
+ | (CRUDPagePropsWithoutHeaderOrTitle & {
36
55
  header?: never;
37
56
  title?: never;
38
57
  });
@@ -4485,7 +4485,7 @@ const PageHeader = ({ navigation, breadcrumbs, dataTestId, accessories, isPollin
4485
4485
  );
4486
4486
  };
4487
4487
 
4488
- const CRUDPage = ({ submitButtonProps, cancelButtonProps, className, children, isLoading, isSubmitting, dataTestId = "page", title, header, steps }) => {
4488
+ const CRUDPage = ({ submitButtonProps, cancelButtonProps, className, children, isLoading, isSubmitting, dataTestId = "page", title, header, steps, isMobileFriendly }) => {
4489
4489
  const mergedClasses = classNames__default.default("cweb-crud-page", "ui-w-full ui-mb-0 ui-mx-auto ui-pb-8", className);
4490
4490
  const submitButton = submitButtonProps && React__namespace.default.createElement(PrimaryButton, Object.assign({ "data-test-id": "submit-button", key: "submit-button", role: BUTTON_ROLES.PRIMARY, isPending: isSubmitting }, submitButtonProps));
4491
4491
  const cancelButton = cancelButtonProps && React__namespace.default.createElement(TertiaryButton, Object.assign({ "data-test-id": "cancel-button", key: "cancel-button", role: BUTTON_ROLES.SECONDARY }, cancelButtonProps));
@@ -4503,7 +4503,9 @@ const CRUDPage = ({ submitButtonProps, cancelButtonProps, className, children, i
4503
4503
  }
4504
4504
  return React__namespace.default.createElement(
4505
4505
  "div",
4506
- { className: "cweb-crud-page-container", "data-test-id": dataTestId },
4506
+ { className: classNames__default.default("cweb-crud-page-container", {
4507
+ "ui-h-screen ui-overflow-y-auto": isMobileFriendly
4508
+ }), "data-test-id": dataTestId },
4507
4509
  React__namespace.default.createElement(
4508
4510
  "div",
4509
4511
  { className: mergedClasses, "data-test-id": dataTestId },