@luscii-healthtech/web-ui 2.58.0 → 2.59.0

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.
@@ -6,6 +6,10 @@ export declare const Icon: React.FC<{
6
6
  /**
7
7
  * This is a temporary component to transition the way we pass icons to components.
8
8
  * Once all components are passed an IconKey instead of a function component we can replace it with the Icon component.
9
+ *
10
+ * If any expansion or customization must be made for all icons, do it in the iconWrapper.tsx component.
11
+ *
12
+ * @linkcode https://github.com/Luscii/web-ui/blob/main/src/components/Icons/iconWrapper/iconWrapper.tsx
9
13
  */
10
14
  export declare const IconComponentOrKey: React.FC<{
11
15
  name: React.FunctionComponent<IconProps> | IconKey;
@@ -1,4 +1,4 @@
1
1
  import { HTMLAttributes } from "react";
2
2
  import { IconProps } from "../types/IconProps.type";
3
- declare const iconWrapper: (SVGComponent: (props: IconProps & Pick<HTMLAttributes<SVGElement>, "role">) => JSX.Element) => (props: IconProps) => JSX.Element;
4
- export default iconWrapper;
3
+ declare const IconWrapper: (SVGComponent: (props: IconProps & Pick<HTMLAttributes<SVGElement>, "role">) => JSX.Element) => (props: IconProps) => JSX.Element;
4
+ export default IconWrapper;
@@ -1,22 +1,4 @@
1
1
  import React from "react";
2
- import { StepsProps } from "../Steps/Steps";
3
- import { ButtonProps } from "../Button/Button.types";
4
- declare type CRUDPageButtonProps = Pick<ButtonProps, "onClick" | "text">;
5
- declare type CRUDPageProps = {
6
- dataTestId?: string;
7
- title: string;
8
- submitButtonProps?: CRUDPageButtonProps;
9
- deleteButtonProps?: CRUDPageButtonProps;
10
- cancelButtonProps?: CRUDPageButtonProps;
11
- icon?: string;
12
- className?: string;
13
- isLoading?: boolean;
14
- isSubmitting?: boolean;
15
- navMenuComponent?: React.ReactNode;
16
- stepTitles?: StepsProps["orderedStepTitles"];
17
- currentStep?: StepsProps["currentStep"];
18
- localization?: StepsProps["localization"];
19
- children?: React.ReactNode;
20
- };
2
+ import type { CRUDPageProps } from "./CRUDPage.types";
21
3
  declare const CRUDPage: React.FC<CRUDPageProps>;
22
4
  export default CRUDPage;
@@ -0,0 +1,30 @@
1
+ /// <reference types="react" />
2
+ import type { BaseButtonProps } from "../ButtonV2/ButtonProps.type";
3
+ import type { PageHeaderProps } from "../PageHeader";
4
+ import type { StepsProps } from "../Steps/Steps";
5
+ declare type CRUDPageButtonProps = Pick<BaseButtonProps, "onClick" | "text">;
6
+ declare type CRUDPageTitle = {
7
+ text: string;
8
+ icon?: string;
9
+ };
10
+ declare type CRUDPageHeader = Omit<PageHeaderProps, "navigation" | "isPolling" | "accessories">;
11
+ declare type CRUDPagePropsWithoutHeaderOrTitle = {
12
+ dataTestId?: string;
13
+ submitButtonProps?: CRUDPageButtonProps;
14
+ cancelButtonProps?: CRUDPageButtonProps;
15
+ className?: string;
16
+ isLoading?: boolean;
17
+ isSubmitting?: boolean;
18
+ stepTitles?: StepsProps["orderedStepTitles"];
19
+ currentStep?: StepsProps["currentStep"];
20
+ localization?: StepsProps["localization"];
21
+ children?: React.ReactNode;
22
+ };
23
+ export declare type CRUDPageProps = (CRUDPagePropsWithoutHeaderOrTitle & {
24
+ title: CRUDPageTitle;
25
+ header?: never;
26
+ }) | (CRUDPagePropsWithoutHeaderOrTitle & {
27
+ header: CRUDPageHeader;
28
+ title?: never;
29
+ });
30
+ export {};
@@ -0,0 +1,3 @@
1
+ export { default as Page } from "./Page";
2
+ export { default as CRUDPage } from "./CRUDPage";
3
+ export type { CRUDPageProps } from "./CRUDPage.types";
@@ -1,12 +1,4 @@
1
1
  import React from "react";
2
- import { BreadcrumbProps } from "../Breadcrumbs/Breadcrumbs";
3
- import { TabbarProps } from "../Tabbar/Tabbar";
4
- export interface PageHeaderProps {
5
- navigation?: Omit<TabbarProps, "withoutPadding">;
6
- breadcrumbs?: BreadcrumbProps["crumbs"];
7
- dataTestId?: string;
8
- title: string;
9
- isPolling?: boolean;
10
- accessories?: React.ReactNode;
11
- }
12
- export declare const PageHeader: React.VoidFunctionComponent<PageHeaderProps>;
2
+ import { PageHeaderProps } from "./PageHeader.types";
3
+ declare const PageHeader: React.FC<PageHeaderProps>;
4
+ export default PageHeader;
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import type { BreadcrumbProps } from "../Breadcrumbs/Breadcrumbs";
3
+ import type { TabbarProps } from "../Tabbar/Tabbar";
4
+ export interface PageHeaderProps {
5
+ navigation?: Omit<TabbarProps, "withoutPadding">;
6
+ breadcrumbs?: BreadcrumbProps["crumbs"];
7
+ dataTestId?: string;
8
+ title: string;
9
+ isPolling?: boolean;
10
+ className?: string;
11
+ contained?: boolean;
12
+ accessories?: React.ReactNode;
13
+ }
@@ -0,0 +1,2 @@
1
+ export { default as PageHeader } from "./PageHeader";
2
+ export type { PageHeaderProps } from "./PageHeader.types";
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
- import { IconProps } from "../Icons/types/IconProps.type";
1
+ import { BaseButtonProps } from "../ButtonV2/ButtonProps.type";
3
2
  import { TagColorTheme } from "../Tag/Tag";
4
3
  export interface TableFieldConfig<Item> {
5
4
  key: string;
@@ -16,8 +15,11 @@ export interface TableFieldText {
16
15
  color: TagColorTheme;
17
16
  };
18
17
  }
19
- export interface TableFieldAction<Item> {
18
+ export declare type TableFieldAction<Item> = Pick<BaseButtonProps, "isDisabled" | "title" | "icon"> & {
20
19
  key: string;
21
- icon: React.FunctionComponent<IconProps>;
20
+ /**
21
+ * @param item - the data in the row when this clicked
22
+ * @returns void
23
+ */
22
24
  handleClick: (item: Item) => void;
23
- }
25
+ };
package/dist/index.d.ts CHANGED
@@ -38,8 +38,7 @@ export { MultiSelect } from "./components/MultiSelect/MultiSelect";
38
38
  export { NavLayout, NavMenuLayoutProps } from "./components/NavMenu/NavLayout";
39
39
  export { NavMenu } from "./components/NavMenu/NavMenu";
40
40
  export { NotificationBanner, NotificationBannerColor, NotificationBannerLinkProps, } from "./components/NotificationBanner/NotificationBanner";
41
- export { default as Page } from "./components/Page/Page";
42
- export { default as CRUDPage } from "./components/Page/CRUDPage";
41
+ export { Page, CRUDPage, CRUDPageProps } from "./components/Page";
43
42
  export { PaginationMenu } from "./components/PaginationMenu/PaginationMenu";
44
43
  export { PageSize as PaginationMenuPageSize, OnPaginationChange as OnPaginationMenuChange, Localization as PaginationMenuLocalization, PaginationMenuProps, } from "./components/PaginationMenu/PaginationMenu.types";
45
44
  export { default as PreviewPhone } from "./components/PreviewPhone/PreviewPhone";
@@ -58,7 +57,7 @@ export { default as Switcher } from "./components/Switcher/Switcher";
58
57
  export { ImagePicker, TargetProps } from "./components/ImagePicker/ImagePicker";
59
58
  export { default as Tabbar, TabbarProps, TabItemDetails, } from "./components/Tabbar/Tabbar";
60
59
  export { Breadcrumbs, BreadcrumbProps, } from "./components/Breadcrumbs/Breadcrumbs";
61
- export { PageHeader, PageHeaderProps, } from "./components/PageHeader/PageHeader";
60
+ export { PageHeader, PageHeaderProps } from "./components/PageHeader";
62
61
  export { default as TabLinks } from "./components/TabLinks/TabLinks";
63
62
  export { default as Tag } from "./components/Tag/Tag";
64
63
  export { default as TagGroup } from "./components/Tag/TagGroup";
@@ -1552,10 +1552,6 @@ video {
1552
1552
  margin-top: 4.25rem;
1553
1553
  }
1554
1554
 
1555
- .mb-20 {
1556
- margin-bottom: 5rem;
1557
- }
1558
-
1559
1555
  .mt-auto {
1560
1556
  margin-top: auto;
1561
1557
  }
@@ -1787,6 +1783,14 @@ video {
1787
1783
  padding-right: 4.25rem;
1788
1784
  }
1789
1785
 
1786
+ .pr-0 {
1787
+ padding-right: 0;
1788
+ }
1789
+
1790
+ .pl-0 {
1791
+ padding-left: 0;
1792
+ }
1793
+
1790
1794
  .pb-1 {
1791
1795
  padding-bottom: 0.25rem;
1792
1796
  }
@@ -1815,6 +1819,10 @@ video {
1815
1819
  padding-left: 1.5rem;
1816
1820
  }
1817
1821
 
1822
+ .pb-8 {
1823
+ padding-bottom: 2rem;
1824
+ }
1825
+
1818
1826
  .pt-11 {
1819
1827
  padding-top: 2.75rem;
1820
1828
  }