@luscii-healthtech/web-ui 2.67.0 → 2.68.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.
@@ -8,6 +8,7 @@ import { PartialProperties } from "../../types/general.types";
8
8
  import { CheckboxProps } from "../Checkbox/Checkbox";
9
9
  import { CheckboxListProps } from "../CheckboxList/CheckboxList.types";
10
10
  import { TextareaProps } from "../Textarea/Textarea";
11
+ import { TitleProps } from "../Title/Title";
11
12
  export declare type AllowedTextInputTypes = Extract<HTMLInputTypeAttribute, "email" | "number" | "password" | "text">;
12
13
  export declare type FormFieldWidth = "sm" | "md" | "lg" | "xl" | "full";
13
14
  interface FormFieldBaseConfiguration<TFieldType> extends FormFieldLabelerProps {
@@ -32,7 +33,7 @@ export interface FormFieldLabelerProps {
32
33
  interface FieldVoidConfiguration extends Partial<FormFieldBaseConfiguration<never>> {
33
34
  type: "void";
34
35
  }
35
- export declare type FormFieldConfiguration<TFieldValues> = FieldInputConfiguration | FieldSelectConfiguration | FieldImagePickerConfiguration | FieldRadioGroupConfiguration | FieldRowConfiguration<TFieldValues> | FieldCheckboxConfiguration | FieldCheckboxListConfiguration | FieldTextareaConfiguration | FieldVoidConfiguration;
36
+ export declare type FormFieldConfiguration<TFieldValues> = FieldInputConfiguration | FieldSelectConfiguration | FieldImagePickerConfiguration | FieldRadioGroupConfiguration | FieldRowConfiguration<TFieldValues> | FieldCheckboxConfiguration | FieldCheckboxListConfiguration | FieldTextareaConfiguration | FieldTitleConfiguration | FieldVoidConfiguration;
36
37
  /**
37
38
  * @backwardscompatibility
38
39
  * @deprecated - this is an alias for `FormFieldConfiguration`, for backwards compatibility the name can remain for now, but
@@ -44,6 +45,9 @@ export interface FieldRowConfiguration<TFieldValues> extends Record<keyof FormFi
44
45
  key: string;
45
46
  fields: FormFieldConfiguration<TFieldValues>[];
46
47
  }
48
+ export interface FieldTitleConfiguration extends FormFieldBaseConfiguration<TitleProps> {
49
+ type: "title";
50
+ }
47
51
  export interface FieldInputConfiguration extends FormFieldBaseConfiguration<Omit<InputProps, "name">> {
48
52
  type: AllowedTextInputTypes;
49
53
  }
@@ -29,7 +29,7 @@ export declare type NotificationBannerProps = (NotificationBannerPropsWithChildr
29
29
  * When stretching the banner, you can also decide if the content should be centered or not.
30
30
  */
31
31
  centerContent?: boolean;
32
- noBorder?: boolean;
32
+ noBorder?: null | boolean;
33
33
  };
34
34
  export declare const NotificationBanner: {
35
35
  (props: NotificationBannerProps): JSX.Element;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import "./Title.scss";
2
3
  import { TextColor } from "../Text/Text";
3
4
  export declare type TitleStyle = "xs" | "sm" | "base" | "lg" | "xl" | "2xl";
@@ -6,6 +7,7 @@ export interface TitleProps {
6
7
  type?: TitleStyle;
7
8
  color?: TextColor;
8
9
  className?: string;
10
+ ref?: React.ForwardedRef<HTMLHeadingElement>;
9
11
  }
10
12
  export declare const Title: {
11
13
  (props: TitleProps): JSX.Element;
@@ -2143,7 +2143,8 @@ var Title = function Title(props) {
2143
2143
  }
2144
2144
 
2145
2145
  return /*#__PURE__*/React__default.createElement(ContainerElement, {
2146
- className: containerClassName
2146
+ className: containerClassName,
2147
+ ref: props.ref
2147
2148
  }, props.text);
2148
2149
  };
2149
2150
  Title.defaultProps = {
@@ -6787,7 +6788,7 @@ var PageHeader = function PageHeader(_ref) {
6787
6788
  }), /*#__PURE__*/React__default.createElement("div", {
6788
6789
  className: "mb-4 border-b border-slate-100"
6789
6790
  })), banner && /*#__PURE__*/React__default.createElement(NotificationBanner, {
6790
- noBorder: true,
6791
+ noBorder: banner.noBorder,
6791
6792
  color: banner.color,
6792
6793
  "data-test-id": "page-header-banner-" + title
6793
6794
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -8725,6 +8726,13 @@ function FormFieldMapper(formFieldProps, useFormReturn) {
8725
8726
  }, fieldProps));
8726
8727
  }
8727
8728
 
8729
+ case "title":
8730
+ {
8731
+ return /*#__PURE__*/React__default.createElement(Title, _extends({
8732
+ key: name
8733
+ }, fieldProps));
8734
+ }
8735
+
8728
8736
  case "void":
8729
8737
  return null;
8730
8738