@luscii-healthtech/web-ui 2.65.0 → 2.67.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.
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import { Control, RegisterOptions } from "react-hook-form";
3
+ import { TextareaProps } from "../Textarea/Textarea";
4
+ import { FieldTextareaConfiguration, FormFieldLabelerWithFormProps } from "./form.types";
5
+ interface FormTextareaProps extends FieldTextareaConfiguration, Omit<TextareaProps, "name">, FormFieldLabelerWithFormProps {
6
+ control: Control;
7
+ rules?: Exclude<RegisterOptions, "valueAsNumber" | "valueAsDate" | "setValueAs">;
8
+ type: "textarea";
9
+ }
10
+ /**
11
+ * Input field that can be used in any react-hook-form context.
12
+ */
13
+ export declare const FormTextarea: React.ForwardRefExoticComponent<FormTextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
14
+ export {};
@@ -7,6 +7,7 @@ import { ImagePickerProps } from "../ImagePicker/ImagePicker";
7
7
  import { PartialProperties } from "../../types/general.types";
8
8
  import { CheckboxProps } from "../Checkbox/Checkbox";
9
9
  import { CheckboxListProps } from "../CheckboxList/CheckboxList.types";
10
+ import { TextareaProps } from "../Textarea/Textarea";
10
11
  export declare type AllowedTextInputTypes = Extract<HTMLInputTypeAttribute, "email" | "number" | "password" | "text">;
11
12
  export declare type FormFieldWidth = "sm" | "md" | "lg" | "xl" | "full";
12
13
  interface FormFieldBaseConfiguration<TFieldType> extends FormFieldLabelerProps {
@@ -31,7 +32,7 @@ export interface FormFieldLabelerProps {
31
32
  interface FieldVoidConfiguration extends Partial<FormFieldBaseConfiguration<never>> {
32
33
  type: "void";
33
34
  }
34
- export declare type FormFieldConfiguration<TFieldValues> = FieldInputConfiguration | FieldSelectConfiguration | FieldImagePickerConfiguration | FieldRadioGroupConfiguration | FieldRowConfiguration<TFieldValues> | FieldCheckboxConfiguration | FieldCheckboxListConfiguration | FieldVoidConfiguration;
35
+ export declare type FormFieldConfiguration<TFieldValues> = FieldInputConfiguration | FieldSelectConfiguration | FieldImagePickerConfiguration | FieldRadioGroupConfiguration | FieldRowConfiguration<TFieldValues> | FieldCheckboxConfiguration | FieldCheckboxListConfiguration | FieldTextareaConfiguration | FieldVoidConfiguration;
35
36
  /**
36
37
  * @backwardscompatibility
37
38
  * @deprecated - this is an alias for `FormFieldConfiguration`, for backwards compatibility the name can remain for now, but
@@ -46,6 +47,9 @@ export interface FieldRowConfiguration<TFieldValues> extends Record<keyof FormFi
46
47
  export interface FieldInputConfiguration extends FormFieldBaseConfiguration<Omit<InputProps, "name">> {
47
48
  type: AllowedTextInputTypes;
48
49
  }
50
+ export interface FieldTextareaConfiguration extends FormFieldBaseConfiguration<Omit<TextareaProps, "name">> {
51
+ type: "textarea";
52
+ }
49
53
  export interface FieldRadioGroupConfiguration extends FormFieldBaseConfiguration<Omit<RadioGroupProps, "name">> {
50
54
  type: "radioGroup";
51
55
  }
@@ -1,5 +1,6 @@
1
1
  import React from "react";
2
2
  import { IconProps } from "../Icons/types/IconProps.type";
3
+ import "./NotificationBanner.css";
3
4
  export declare type NotificationBannerColor = "base" | "blue" | "red" | "green" | "amber";
4
5
  export interface NotificationBannerLinkProps {
5
6
  text: string;
@@ -28,6 +29,7 @@ export declare type NotificationBannerProps = (NotificationBannerPropsWithChildr
28
29
  * When stretching the banner, you can also decide if the content should be centered or not.
29
30
  */
30
31
  centerContent?: boolean;
32
+ noBorder?: boolean;
31
33
  };
32
34
  export declare const NotificationBanner: {
33
35
  (props: NotificationBannerProps): JSX.Element;
@@ -1,7 +1,18 @@
1
1
  /// <reference types="react" />
2
2
  import type { BreadcrumbProps } from "../Breadcrumbs";
3
+ import { NotificationBannerColor } from "../NotificationBanner/NotificationBanner";
3
4
  import type { TabbarProps } from "../Tabbar/Tabbar";
4
- export interface PageHeaderProps {
5
+ declare type WithPageHeaderBanner = {
6
+ banner?: {
7
+ title?: string;
8
+ text: {
9
+ content: string;
10
+ isHTML?: boolean;
11
+ };
12
+ color: NotificationBannerColor;
13
+ };
14
+ };
15
+ export declare type PageHeaderProps = {
5
16
  navigation?: Omit<TabbarProps, "withoutPadding">;
6
17
  breadcrumbs?: BreadcrumbProps["crumbs"];
7
18
  truncateBreadcrumbsAfter?: number;
@@ -11,4 +22,5 @@ export interface PageHeaderProps {
11
22
  className?: string;
12
23
  contained?: boolean;
13
24
  accessories?: React.ReactNode;
14
- }
25
+ } & WithPageHeaderBanner;
26
+ export {};
@@ -25,6 +25,7 @@ export declare const allowedColors: {
25
25
  readonly amber: "text-yellow-700";
26
26
  readonly white: "text-white";
27
27
  readonly "blue-800": "text-blue-800";
28
+ readonly current: "text-current";
28
29
  };
29
30
  declare const allowedHoverColors: {
30
31
  readonly "blue-900": "hover:text-blue-900";
@@ -1,22 +1,29 @@
1
- export default Textarea;
2
- declare function Textarea(props: any): JSX.Element;
3
- declare namespace Textarea {
4
- namespace propTypes {
5
- const className: PropTypes.Requireable<string>;
6
- const value: PropTypes.Requireable<string>;
7
- const name: PropTypes.Validator<string>;
8
- const placeholder: PropTypes.Requireable<string>;
9
- const maxLength: PropTypes.Requireable<number>;
10
- const rows: PropTypes.Requireable<number>;
11
- const resizable: PropTypes.Requireable<string>;
12
- const isDisabled: PropTypes.Requireable<boolean>;
13
- const icon: PropTypes.Requireable<string>;
14
- const onChange: PropTypes.Validator<(...args: any[]) => any>;
15
- const onBlur: PropTypes.Requireable<(...args: any[]) => any>;
16
- const onFocus: PropTypes.Requireable<(...args: any[]) => any>;
17
- const onKeyPress: PropTypes.Requireable<(...args: any[]) => any>;
18
- const onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
19
- const onCtrlEnter: PropTypes.Requireable<(...args: any[]) => any>;
20
- }
1
+ import React, { ChangeEvent, FocusEvent, KeyboardEvent } from "react";
2
+ import "./Textarea.scss";
3
+ declare const resizeTypes: {
4
+ readonly NONE: "none";
5
+ readonly BOTH: "both";
6
+ readonly HORIZONTAL: "horizontal";
7
+ readonly VERTICAL: "vertical";
8
+ };
9
+ export declare type ResizeTypes = (typeof resizeTypes)[keyof typeof resizeTypes];
10
+ export interface TextareaProps {
11
+ className?: string;
12
+ value?: string;
13
+ name?: string;
14
+ placeholder?: string;
15
+ maxLength?: number;
16
+ rows?: number;
17
+ resizable?: ResizeTypes;
18
+ isDisabled?: boolean;
19
+ icon?: string;
20
+ onChange: (event: ChangeEvent) => void;
21
+ onBlur?: (event: FocusEvent<HTMLTextAreaElement>) => void;
22
+ onFocus?: (event: FocusEvent<HTMLTextAreaElement>) => void;
23
+ onKeyPress?: (event: KeyboardEvent<HTMLTextAreaElement>) => void;
24
+ onKeyDown?: (event: KeyboardEvent<HTMLTextAreaElement>) => void;
25
+ onCtrlEnter?: () => void;
26
+ isError?: boolean;
21
27
  }
22
- import PropTypes from "prop-types";
28
+ export declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
29
+ export {};
package/dist/index.d.ts CHANGED
@@ -61,7 +61,7 @@ export { PageHeader, PageHeaderProps } from "./components/PageHeader";
61
61
  export { default as TabLinks } from "./components/TabLinks/TabLinks";
62
62
  export { default as Tag } from "./components/Tag/Tag";
63
63
  export { default as TagGroup } from "./components/Tag/TagGroup";
64
- export { default as TextArea } from "./components/Textarea/Textarea";
64
+ export { Textarea, TextareaProps, ResizeTypes, } from "./components/Textarea/Textarea";
65
65
  export { default as TextEditor } from "./components/TextEditor/TextEditor";
66
66
  export { default as TextEditorV2 } from "./components/TextEditorV2/TextEditorV2";
67
67
  export { TextLink, TextLinkProps } from "./components/TextLink/TextLink";
@@ -2006,6 +2006,10 @@ video {
2006
2006
  text-align: center;
2007
2007
  }
2008
2008
 
2009
+ .text-current {
2010
+ color: currentColor;
2011
+ }
2012
+
2009
2013
  .text-white {
2010
2014
  --text-opacity: 1;
2011
2015
  color: #fff;