@luscii-healthtech/web-ui 42.14.0 → 44.0.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.
@@ -1,6 +1,5 @@
1
1
  import type { BaseButtonProps } from "../ButtonV2/ButtonProps.type";
2
2
  import type { PageHeaderProps } from "../PageHeader";
3
- import type { StepsProps } from "../Steps/Steps";
4
3
  type CRUDPageButtonProps = Pick<BaseButtonProps, "onClick" | "text" | "isDisabled" | "form" | "type">;
5
4
  type CRUDPageTitle = {
6
5
  text: string;
@@ -32,9 +31,11 @@ type CRUDPagePropsWithoutHeaderOrTitle = {
32
31
  isSubmitting?: boolean;
33
32
  children?: React.ReactNode;
34
33
  steps?: {
35
- titles: StepsProps["orderedStepTitles"];
36
- currentStep: StepsProps["currentStep"];
37
- localization: StepsProps["localization"];
34
+ titles: Array<string>;
35
+ currentStep: number;
36
+ localization: {
37
+ step: string;
38
+ };
38
39
  };
39
40
  /**
40
41
  * When `true` will set the height of the
@@ -8,9 +8,16 @@ export interface RadioProps extends React.InputHTMLAttributes<HTMLInputElement>
8
8
  innerRef?: React.Ref<HTMLInputElement>;
9
9
  }
10
10
  /**
11
- * TODO: The CSS styling is all messed up, including isError
12
- * Warning: don't use this prop before this is resolved
13
- * Issue to track: https://github.com/Luscii/web-ui/issues/57
14
- * TODO: remove this comment once this is resolved
11
+ * @deprecated Use `LabeledRadio` components in a `LabeledRadioGroup` instead.
12
+ *
13
+ * E.g. with React Hook Form:
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * <LabeledRadioGroup>
18
+ * <LabeledRadio {...register("favoriteFruit")} label="Apple" value="apple" />
19
+ * <LabeledRadio {...register("favoriteFruit")} label="Banana" value="banana" />
20
+ * </LabeledRadioGroup>
21
+ * ```
15
22
  */
16
23
  export declare const RadioV2: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
@@ -7,4 +7,17 @@ export interface RadioGroupProps extends Omit<React.InputHTMLAttributes<HTMLInpu
7
7
  innerRef?: React.Ref<HTMLInputElement>;
8
8
  title?: string;
9
9
  }
10
+ /**
11
+ * @deprecated Use `LabeledRadio` components in a `LabeledRadioGroup` instead.
12
+ *
13
+ * E.g. with React Hook Form:
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * <LabeledRadioGroup>
18
+ * <LabeledRadio {...register("favoriteFruit")} label="Apple" value="apple" />
19
+ * <LabeledRadio {...register("favoriteFruit")} label="Banana" value="banana" />
20
+ * </LabeledRadioGroup>
21
+ * ```
22
+ */
10
23
  export declare const RadioGroupV2: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLInputElement>>;
@@ -26,7 +26,7 @@ type Props<C extends React.ElementType> = React.ComponentPropsWithoutRef<C> & {
26
26
  * Positioning of items along the Stack’s main axis.
27
27
  * The values are based on Tailwind's classnames and are therefore limited to the following:
28
28
  */
29
- justify?: "normal" | "start" | "end" | "center" | "between" | "around" | "evenly";
29
+ justify?: "normal" | "start" | "end" | "center" | "between" | "around" | "evenly" | "stretch";
30
30
  /**
31
31
  * Positioning of items along the Stack’s x (horizontal) or y (vertical) axis
32
32
  */
@@ -1,9 +1,11 @@
1
- export interface StepsProps {
2
- orderedStepTitles: Array<string>;
3
- currentStep: number;
1
+ import React from "react";
2
+ import { Step } from "./subcomponents/Step";
3
+ type Props = {
4
+ children?: React.ReactNode;
4
5
  className?: string;
5
- localization: {
6
- step: string;
7
- };
8
- }
9
- export declare const Steps: ({ orderedStepTitles, currentStep, className, localization, }: StepsProps) => JSX.Element;
6
+ };
7
+ type StaticProperties = {
8
+ Step: typeof Step;
9
+ };
10
+ export declare const Steps: React.FC<Props> & StaticProperties;
11
+ export {};
@@ -0,0 +1,7 @@
1
+ type Props = {
2
+ title: string;
3
+ subtitle?: string;
4
+ state: "completed" | "current" | "upcoming";
5
+ };
6
+ export declare const Step: React.FC<Props>;
7
+ export {};
@@ -65,8 +65,6 @@ export { Page, CRUDPage, type CRUDPageProps } from "./components/Page";
65
65
  export { PaginationMenu } from "./components/PaginationMenu/PaginationMenu";
66
66
  export { type PageSize as PaginationMenuPageSize, type OnPaginationChange as OnPaginationMenuChange, type Localization as PaginationMenuLocalization, type PaginationMenuProps, } from "./components/PaginationMenu/PaginationMenu.types";
67
67
  export { default as PreviewPhone } from "./components/PreviewPhone/PreviewPhone";
68
- export { default as Radio } from "./components/Radio/Radio";
69
- export { default as RadioGroup } from "./components/RadioGroup/RadioGroup";
70
68
  export { type RadioProps, RadioV2 } from "./components/Radio/RadioV2";
71
69
  export { type RadioGroupProps, RadioGroupV2, } from "./components/RadioGroup/RadioGroupV2";
72
70
  export { default as Section, type SectionProps, } from "./components/Section/Section";
@@ -11,7 +11,7 @@ declare const meta: {
11
11
  as?: import("react").ElementType | undefined;
12
12
  gap?: "none" | "s" | "xs" | "xl" | "m" | "xxxxs" | "xxxs" | "xxs" | "l" | "xxl";
13
13
  align?: "start" | "end" | "center" | "baseline" | "stretch" | "normal";
14
- justify?: "normal" | "start" | "end" | "center" | "between" | "around" | "evenly";
14
+ justify?: "normal" | "start" | "end" | "center" | "between" | "around" | "evenly" | "stretch";
15
15
  axis?: "x" | "y";
16
16
  reverse?: boolean;
17
17
  wrap?: boolean;
@@ -35,7 +35,7 @@ declare const meta: {
35
35
  as?: import("react").ElementType | undefined;
36
36
  gap?: "none" | "s" | "xs" | "xl" | "m" | "xxxxs" | "xxxs" | "xxs" | "l" | "xxl";
37
37
  align?: "start" | "end" | "center" | "baseline" | "stretch" | "normal";
38
- justify?: "normal" | "start" | "end" | "center" | "between" | "around" | "evenly";
38
+ justify?: "normal" | "start" | "end" | "center" | "between" | "around" | "evenly" | "stretch";
39
39
  axis?: "x" | "y";
40
40
  reverse?: boolean;
41
41
  wrap?: boolean;
@@ -1,6 +1,7 @@
1
1
  declare const _default: {
2
2
  title: string;
3
3
  component: import("react").ForwardRefExoticComponent<import("../src").RadioGroupProps & import("react").RefAttributes<HTMLInputElement>>;
4
+ tags: string[];
4
5
  };
5
6
  export default _default;
6
7
  export declare const RadioGroup: {
@@ -1,6 +1,7 @@
1
1
  declare const _default: {
2
2
  title: string;
3
3
  component: import("react").ForwardRefExoticComponent<import("../src").RadioProps & import("react").RefAttributes<HTMLInputElement>>;
4
+ tags: string[];
4
5
  };
5
6
  export default _default;
6
7
  export declare const Base: {
@@ -1,14 +1,26 @@
1
1
  declare const _default: {
2
2
  title: string;
3
- component: ({ orderedStepTitles, currentStep, className, localization, }: import("../src/components/Steps/Steps").StepsProps) => JSX.Element;
3
+ component: import("react").FC<{
4
+ children?: React.ReactNode;
5
+ className?: string;
6
+ }> & {
7
+ Step: typeof import("../src/components/Steps/subcomponents/Step").Step;
8
+ };
9
+ subcomponents: {
10
+ Step: import("react").FC<{
11
+ title: string;
12
+ subtitle?: string;
13
+ state: "completed" | "current" | "upcoming";
14
+ }>;
15
+ };
4
16
  };
5
17
  export default _default;
6
18
  export declare const Full: {
7
- args: {
8
- orderedStepTitles: string[];
9
- currentStep: number;
10
- localization: {
11
- step: string;
12
- };
13
- };
19
+ render: () => import("react/jsx-runtime").JSX.Element;
20
+ };
21
+ export declare const WithSubcomponents: {
22
+ render: () => import("react/jsx-runtime").JSX.Element;
23
+ };
24
+ export declare const WithSubcomponentsAndSubtitles: {
25
+ render: () => import("react/jsx-runtime").JSX.Element;
14
26
  };
@@ -8,7 +8,7 @@ declare const meta: {
8
8
  as?: import("react").ElementType | undefined;
9
9
  gap?: "none" | "s" | "xs" | "xl" | "m" | "xxxxs" | "xxxs" | "xxs" | "l" | "xxl";
10
10
  align?: "start" | "end" | "center" | "baseline" | "stretch" | "normal";
11
- justify?: "normal" | "start" | "end" | "center" | "between" | "around" | "evenly";
11
+ justify?: "normal" | "start" | "end" | "center" | "between" | "around" | "evenly" | "stretch";
12
12
  axis?: "x" | "y";
13
13
  reverse?: boolean;
14
14
  wrap?: boolean;
@@ -1591,8 +1591,8 @@ button, input:where([type='button'], [type='reset'], [type='submit']), ::file-se
1591
1591
  .ui\:justify-start {
1592
1592
  justify-content: flex-start;
1593
1593
  }
1594
- .ui\:justify-items-stretch {
1595
- justify-items: stretch;
1594
+ .ui\:justify-stretch {
1595
+ justify-content: stretch;
1596
1596
  }
1597
1597
  .ui\:gap-2 {
1598
1598
  gap: calc(var(--ui-spacing) * 2);
@@ -1711,13 +1711,6 @@ button, input:where([type='button'], [type='reset'], [type='submit']), ::file-se
1711
1711
  margin-inline-end: calc(calc(var(--ui-spacing) * 4) * calc(1 - var(--tw-space-x-reverse)));
1712
1712
  }
1713
1713
  }
1714
- .ui\:space-x-6 {
1715
- :where(& > :not(:last-child)) {
1716
- --tw-space-x-reverse: 0;
1717
- margin-inline-start: calc(calc(var(--ui-spacing) * 6) * var(--tw-space-x-reverse));
1718
- margin-inline-end: calc(calc(var(--ui-spacing) * 6) * calc(1 - var(--tw-space-x-reverse)));
1719
- }
1720
- }
1721
1714
  .ui\:space-x-8 {
1722
1715
  :where(& > :not(:last-child)) {
1723
1716
  --tw-space-x-reverse: 0;
@@ -3979,13 +3972,6 @@ button, input:where([type='button'], [type='reset'], [type='submit']), ::file-se
3979
3972
  }
3980
3973
  }
3981
3974
  }
3982
- .ui\:hover\:bg-primary-dark {
3983
- &:hover {
3984
- @media (hover: hover) {
3985
- background-color: var(--ui-color-blue-900);
3986
- }
3987
- }
3988
- }
3989
3975
  .ui\:hover\:bg-red-50 {
3990
3976
  &:hover {
3991
3977
  @media (hover: hover) {