@luscii-healthtech/web-ui 2.28.0 → 2.29.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.
@@ -12,6 +12,7 @@ export interface BaseButtonProps extends React.HTMLAttributes<HTMLButtonElement>
12
12
  isDisabled?: boolean;
13
13
  className?: string;
14
14
  }
15
+ export declare type NonPrimaryButtonProps = BaseButtonProps;
15
16
  /**
16
17
  * Extra properties that can be set when the variant of the button
17
18
  * supports the pending state
@@ -20,6 +21,7 @@ export interface BaseButtonProps extends React.HTMLAttributes<HTMLButtonElement>
20
21
  export interface ButtonWithPendingStateProps extends BaseButtonProps {
21
22
  isPending?: boolean;
22
23
  }
24
+ export declare type PrimaryButtonProps = ButtonWithPendingStateProps;
23
25
  /**
24
26
  * All properties of BaseButtonProps and ButtonWithPendingStateProps,
25
27
  * plus other properties that are assigned internally by the button variants.
@@ -6,7 +6,11 @@ declare type FlexContainerBase = {
6
6
  position?: "static" | "fixed" | "absolute" | "relative" | "sticky";
7
7
  verticalSpacing?: Spacing;
8
8
  horizontalSpacing?: Spacing;
9
+ /**
10
+ * Applies the default padding (`"p-4"`) inside the container.
11
+ */
9
12
  hasPadding?: boolean;
13
+ backgroundColor?: string;
10
14
  };
11
15
  export declare type FlexContainerBaseProps = FlexContainerBase & {
12
16
  children: React.ReactNode;
@@ -1,2 +1,6 @@
1
- /// <reference types="react" />
2
- export declare const Divider: () => JSX.Element;
1
+ import React from "react";
2
+ declare type DividerProps = {
3
+ dark?: boolean;
4
+ };
5
+ export declare const Divider: React.FC<DividerProps>;
6
+ export {};
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { ListProps, ListItemProps, OnAssetLoadErrorPayload } from "./List.types";
2
+ import { ListItemProps, ListProps, OnAssetLoadErrorPayload } from "./List.types";
3
3
  import "./List.scss";
4
4
  export { ListProps, ListItemProps, OnAssetLoadErrorPayload };
5
- export declare const List: ({ title, headerButton, headerTransparent, items, onAssetLoadError, onDragEnd, emptyStateMessage, isLoading, }: ListProps) => JSX.Element;
5
+ export declare const List: ({ title, headerButton, headerTransparent, items, onAssetLoadError, onDragEnd, emptyStateMessage, isLoading, dataTestId, }: ListProps) => JSX.Element;
6
6
  export default List;
@@ -31,4 +31,5 @@ export declare type ListProps = {
31
31
  onDragEnd?: (itemId: string | number, newIndex: number) => void;
32
32
  emptyStateMessage?: string;
33
33
  isLoading?: boolean;
34
+ dataTestId?: string;
34
35
  };
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
- import { NonPrimaryButtonProps, PrimaryButtonProps } from "../..";
3
- import { BaseButtonProps } from "../ButtonV2/ButtonProps.type";
2
+ import { BaseButtonProps, NonPrimaryButtonProps, PrimaryButtonProps } from "../ButtonV2/ButtonProps.type";
4
3
  export interface ModalFooterTrailingComponents {
5
4
  primaryButtonProps: PrimaryButtonProps;
6
5
  secondaryButtonProps?: NonPrimaryButtonProps;
@@ -1,9 +1,16 @@
1
1
  /// <reference types="react" />
2
- import { NavMenuItemProps } from "./NavMenuItem";
3
- export declare type NavMenuElement = NavMenuItemProps | {
4
- type: "separator" | "spacer";
5
- };
2
+ import { NavMenuFooterProps } from "./types/NavMenuFooterProps.type";
3
+ import { NavMenuItemProps } from "./types/NavMenuItemProps.type";
4
+ import { NavMenuHeaderProps } from "./types/NavMenuHeaderProps.type";
6
5
  export declare type NavMenuProps = {
7
- items: NavMenuElement[];
6
+ roleItems: NavMenuItemProps[];
7
+ publicItems: NavMenuItemProps[];
8
+ authenticationItems: {
9
+ login: NavMenuItemProps;
10
+ logout: NavMenuItemProps;
11
+ };
12
+ isUserAuthenticated?: boolean;
13
+ navMenuHeaderProps: NavMenuHeaderProps;
14
+ navMenuFooterProps: NavMenuFooterProps;
8
15
  };
9
- export declare function NavMenu({ items }: NavMenuProps): JSX.Element;
16
+ export declare function NavMenu(props: NavMenuProps): JSX.Element;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import { NavMenuProps } from "./NavMenu";
3
- export declare const NavMenuContent: ({ items }: NavMenuProps) => JSX.Element;
3
+ export declare const NavMenuContent: React.FC<NavMenuProps>;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { NavMenuFooterProps } from "./types/NavMenuFooterProps.type";
3
+ export declare const NavMenuFooter: React.FC<NavMenuFooterProps>;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { NavMenuHeaderProps } from "./types/NavMenuHeaderProps.type";
3
+ export declare const NavMenuHeader: React.FC<NavMenuHeaderProps>;
@@ -1,15 +1,3 @@
1
1
  /// <reference types="react" />
2
- export interface NavMenuItemProps {
3
- href?: string;
4
- linkTo?: string;
5
- title: string;
6
- isSelected: boolean;
7
- img: string;
8
- imgOnHover: string;
9
- dataTestId: string;
10
- gtmEvent?: string;
11
- isExternal?: boolean;
12
- type?: "base";
13
- track?: (event: string) => void;
14
- }
2
+ import { NavMenuItemProps } from "./types/NavMenuItemProps.type";
15
3
  export declare const NavMenuItem: (props: NavMenuItemProps) => JSX.Element;
@@ -0,0 +1,5 @@
1
+ export interface NavMenuFooterProps {
2
+ text: string;
3
+ subtext?: string;
4
+ visible?: boolean;
5
+ }
@@ -0,0 +1,5 @@
1
+ export interface NavMenuHeaderProps {
2
+ text: string;
3
+ visible?: boolean;
4
+ onClick?: () => void;
5
+ }
@@ -0,0 +1,12 @@
1
+ export declare type NavMenuItemProps = {
2
+ href?: string;
3
+ linkTo?: string;
4
+ title: string;
5
+ isSelected: boolean;
6
+ img: string;
7
+ imgOnHover: string;
8
+ dataTestId: string;
9
+ gtmEvent?: string;
10
+ isExternal?: boolean;
11
+ track?: (event: string) => void;
12
+ };
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { RestPropped } from "../../types/general.types";
3
- import "./Text.scss";
3
+ import "./Text.css";
4
4
  export declare type TextStyle = "sm" | "sm-strong" | "base" | "strong" | "lg" | "lg-strong" | "xl" | "xl-strong";
5
5
  export declare type TextColor = "base" | "slate-500" | "slate-200" | "white" | "blue-800" | "red" | "green" | "amber";
6
6
  export declare type TextHoverColor = "blue-900" | "white";
@@ -14,6 +14,12 @@ export interface TextProps extends RestPropped {
14
14
  className?: string;
15
15
  containsDangerousHtml?: boolean;
16
16
  truncate?: boolean;
17
+ /**
18
+ * When `true` will work together with the `truncate` props
19
+ * and allow a max of two lines when breaking text before applying
20
+ * elipsis. Defaults to "`false`"
21
+ */
22
+ clampLines?: boolean;
17
23
  "data-test-id"?: string;
18
24
  }
19
25
  export declare const Text: {
package/dist/index.d.ts CHANGED
@@ -36,7 +36,7 @@ export { CheckboxList, CheckboxListProps, } from "./components/CheckboxList/Chec
36
36
  export { CheckboxListModal, CheckboxListModalProps, } from "./components/CheckBoxListModal/CheckboxListModal";
37
37
  export { MultiSelect } from "./components/MultiSelect/MultiSelect";
38
38
  export { NavLayout, NavMenuLayoutProps } from "./components/NavMenu/NavLayout";
39
- export { NavMenu, NavMenuElement } from "./components/NavMenu/NavMenu";
39
+ export { NavMenu } from "./components/NavMenu/NavMenu";
40
40
  export { NotificationBanner, NotificationBannerColor, NotificationBannerLinkProps, } from "./components/NotificationBanner/NotificationBanner";
41
41
  export { default as Page } from "./components/Page/Page";
42
42
  export { default as CRUDPage } from "./components/Page/CRUDPage";
@@ -1391,16 +1391,6 @@ video {
1391
1391
  margin-bottom: 0.25rem;
1392
1392
  }
1393
1393
 
1394
- .my-2 {
1395
- margin-top: 0.5rem;
1396
- margin-bottom: 0.5rem;
1397
- }
1398
-
1399
- .mx-2 {
1400
- margin-left: 0.5rem;
1401
- margin-right: 0.5rem;
1402
- }
1403
-
1404
1394
  .my-4 {
1405
1395
  margin-top: 1rem;
1406
1396
  margin-bottom: 1rem;
@@ -1411,6 +1401,11 @@ video {
1411
1401
  margin-right: auto;
1412
1402
  }
1413
1403
 
1404
+ .-mx-1 {
1405
+ margin-left: -0.25rem;
1406
+ margin-right: -0.25rem;
1407
+ }
1408
+
1414
1409
  .ml-0 {
1415
1410
  margin-left: 0;
1416
1411
  }
@@ -1471,6 +1466,10 @@ video {
1471
1466
  margin-left: 1rem;
1472
1467
  }
1473
1468
 
1469
+ .mt-5 {
1470
+ margin-top: 1.25rem;
1471
+ }
1472
+
1474
1473
  .mt-6 {
1475
1474
  margin-top: 1.5rem;
1476
1475
  }
@@ -1543,6 +1542,14 @@ video {
1543
1542
  max-height: 100vh;
1544
1543
  }
1545
1544
 
1545
+ .max-w-50 {
1546
+ max-width: 12.5rem;
1547
+ }
1548
+
1549
+ .max-w-55 {
1550
+ max-width: 13.75rem;
1551
+ }
1552
+
1546
1553
  .max-w-3xl {
1547
1554
  max-width: 48rem;
1548
1555
  }
@@ -1654,6 +1661,11 @@ video {
1654
1661
  padding-bottom: 0.25rem;
1655
1662
  }
1656
1663
 
1664
+ .px-1 {
1665
+ padding-left: 0.25rem;
1666
+ padding-right: 0.25rem;
1667
+ }
1668
+
1657
1669
  .py-2 {
1658
1670
  padding-top: 0.5rem;
1659
1671
  padding-bottom: 0.5rem;
@@ -1709,14 +1721,18 @@ video {
1709
1721
  padding-right: 4.25rem;
1710
1722
  }
1711
1723
 
1712
- .pl-1 {
1713
- padding-left: 0.25rem;
1724
+ .pb-1 {
1725
+ padding-bottom: 0.25rem;
1714
1726
  }
1715
1727
 
1716
1728
  .pl-4 {
1717
1729
  padding-left: 1rem;
1718
1730
  }
1719
1731
 
1732
+ .pt-6 {
1733
+ padding-top: 1.5rem;
1734
+ }
1735
+
1720
1736
  .pr-6 {
1721
1737
  padding-right: 1.5rem;
1722
1738
  }
@@ -2113,6 +2129,12 @@ video {
2113
2129
  white-space: nowrap;
2114
2130
  }
2115
2131
 
2132
+ .break-normal {
2133
+ word-wrap: normal;
2134
+ overflow-wrap: normal;
2135
+ word-break: normal;
2136
+ }
2137
+
2116
2138
  .break-words {
2117
2139
  word-wrap: break-word;
2118
2140
  overflow-wrap: break-word;
@@ -2164,8 +2186,8 @@ video {
2164
2186
  width: 9rem;
2165
2187
  }
2166
2188
 
2167
- .w-46 {
2168
- width: 11.5rem;
2189
+ .w-60 {
2190
+ width: 15rem;
2169
2191
  }
2170
2192
 
2171
2193
  .w-80 {
@@ -2413,6 +2435,10 @@ video {
2413
2435
  flex-direction: row;
2414
2436
  }
2415
2437
 
2438
+ .lg\:h-full {
2439
+ height: 100%;
2440
+ }
2441
+
2416
2442
  .lg\:mb-0 {
2417
2443
  margin-bottom: 0;
2418
2444
  }