@fluidattacks/design 2.5.0 → 2.7.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.
- package/dist/index.js +361 -257
- package/dist/index.mjs +15736 -11227
- package/dist/types/components/card/card-with-input/index.d.ts +3 -0
- package/dist/types/components/card/card-with-input/styles.d.ts +8 -0
- package/dist/types/components/card/index.d.ts +2 -1
- package/dist/types/components/card/types.d.ts +29 -1
- package/dist/types/components/form/index.d.ts +4 -5
- package/dist/types/components/form/styles.d.ts +1 -3
- package/dist/types/components/form/types.d.ts +14 -8
- package/dist/types/components/inputs/fields/date/calendar/cell/index.d.ts +3 -0
- package/dist/types/components/inputs/fields/date/calendar/grid/index.d.ts +3 -0
- package/dist/types/components/inputs/fields/date/calendar/header/index.d.ts +3 -0
- package/dist/types/components/inputs/fields/date/calendar/index.d.ts +6 -0
- package/dist/types/components/inputs/fields/date/calendar/styles.d.ts +13 -0
- package/dist/types/components/inputs/fields/date/index.d.ts +3 -0
- package/dist/types/components/inputs/fields/date/types.d.ts +34 -0
- package/dist/types/components/inputs/fields/date-range/calendar/index.d.ts +6 -0
- package/dist/types/components/inputs/fields/date-range/index.d.ts +4 -0
- package/dist/types/components/inputs/fields/date-range/styles.d.ts +5 -0
- package/dist/types/components/inputs/fields/date-time/calendar/index.d.ts +10 -0
- package/dist/types/components/inputs/fields/date-time/calendar/styles.d.ts +3 -0
- package/dist/types/components/inputs/fields/date-time/index.d.ts +4 -0
- package/dist/types/components/inputs/fields/editable/index.d.ts +5 -0
- package/dist/types/components/inputs/fields/editable/types.d.ts +19 -0
- package/dist/types/components/inputs/fields/input/index.d.ts +3 -0
- package/dist/types/components/inputs/fields/{text-input → input-file}/index.d.ts +2 -2
- package/dist/types/components/inputs/fields/input-file/styles.d.ts +6 -0
- package/dist/types/components/inputs/fields/input-tags/index.d.ts +3 -0
- package/dist/types/components/inputs/fields/input-tags/styles.d.ts +2 -0
- package/dist/types/components/inputs/fields/number/index.d.ts +3 -0
- package/dist/types/components/inputs/fields/number-range/index.d.ts +3 -0
- package/dist/types/components/inputs/fields/text-area/index.d.ts +3 -0
- package/dist/types/components/inputs/index.d.ts +11 -2
- package/dist/types/components/inputs/label/index.d.ts +1 -1
- package/dist/types/components/inputs/outline-container/index.d.ts +1 -1
- package/dist/types/components/inputs/types.d.ts +68 -8
- package/dist/types/components/inputs/utils/action-button/index.d.ts +3 -0
- package/dist/types/components/inputs/utils/calendar-button/index.d.ts +8 -0
- package/dist/types/components/inputs/utils/date-selector/index.d.ts +3 -0
- package/dist/types/components/inputs/utils/date-time-field/index.d.ts +4 -0
- package/dist/types/components/inputs/utils/dialog/index.d.ts +4 -0
- package/dist/types/components/inputs/utils/number-field/index.d.ts +6 -0
- package/dist/types/components/inputs/utils/popover/index.d.ts +4 -0
- package/dist/types/components/inputs/utils/styles.d.ts +17 -0
- package/dist/types/components/inputs/utils/types.d.ts +81 -0
- package/dist/types/components/inputs/utils.d.ts +3 -0
- package/dist/types/components/logo/types.d.ts +1 -1
- package/dist/types/components/slide-out-menu/styles.d.ts +1 -273
- package/dist/types/components/tag/index.d.ts +1 -1
- package/dist/types/components/tag/types.d.ts +15 -3
- package/dist/types/components/typography/styles.d.ts +3 -2
- package/dist/types/components/web-form/index.d.ts +5 -0
- package/dist/types/components/web-form/styles.d.ts +4 -0
- package/dist/types/components/web-form/types.d.ts +15 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utils/date.d.ts +3 -0
- package/package.json +26 -14
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ICardWithInputProps } from "../types";
|
|
2
|
+
declare const CardWithInput: ({ description, disabled, id, align, inputType, inputNumberProps, minHeight, minWidth, name, placeholder, tooltip, title, }: Readonly<ICardWithInputProps>) => JSX.Element;
|
|
3
|
+
export { CardWithInput };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Property } from "csstype";
|
|
2
|
+
interface ICardInputContainerProps {
|
|
3
|
+
$align?: Property.TextAlign;
|
|
4
|
+
$minHeight?: string;
|
|
5
|
+
$minWidth?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const CardInputContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ICardInputContainerProps>> & string;
|
|
8
|
+
export { CardInputContainer };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CardHeader } from "./card-header";
|
|
2
2
|
import { CardWithImage } from "./card-with-image";
|
|
3
|
+
import { CardWithInput } from "./card-with-input";
|
|
3
4
|
import { CardWithSelector } from "./card-with-selector";
|
|
4
5
|
import { CardWithSwitch } from "./card-with-switch";
|
|
5
|
-
export { CardHeader, CardWithImage, CardWithSelector, CardWithSwitch };
|
|
6
|
+
export { CardHeader, CardWithInput, CardWithImage, CardWithSelector, CardWithSwitch, };
|
|
@@ -5,6 +5,7 @@ import type { TSpacing } from "components/@core/types";
|
|
|
5
5
|
import type { TFileType } from "components/file-preview/types";
|
|
6
6
|
import { IRadioButtonProps } from "components/radio-button/types";
|
|
7
7
|
import { IToggleProps } from "components/toggle/types";
|
|
8
|
+
type TInputType = "date" | "number" | "text";
|
|
8
9
|
/**
|
|
9
10
|
* Card component shared props.
|
|
10
11
|
* @interface ISharedProps
|
|
@@ -90,4 +91,31 @@ interface ICardWithSelectorProps extends Pick<ISharedProps, "description" | "tit
|
|
|
90
91
|
selectorProps: IRadioButtonProps;
|
|
91
92
|
width?: string;
|
|
92
93
|
}
|
|
93
|
-
|
|
94
|
+
/**
|
|
95
|
+
* Card with input component props.
|
|
96
|
+
* @interface ICardWithInputProps
|
|
97
|
+
* @extends ICardHeader
|
|
98
|
+
* @property { string } [align] - Card input align.
|
|
99
|
+
* @property { Interface } [inputNumberProps] - Card input number props.
|
|
100
|
+
* @property { boolean } [disabled] - Card disabled.
|
|
101
|
+
* @property { string } [inputType] - Card input type.
|
|
102
|
+
* @property { string } [minHeight] - Card min height.
|
|
103
|
+
* @property { string } [minWidth] - Card min width.
|
|
104
|
+
* @property { string } name - Card name.
|
|
105
|
+
* @property { string } [placeholder] - Card placeholder.
|
|
106
|
+
*/
|
|
107
|
+
interface ICardWithInputProps extends ICardHeader {
|
|
108
|
+
align?: Property.TextAlign;
|
|
109
|
+
inputNumberProps?: {
|
|
110
|
+
decimalPlaces?: number;
|
|
111
|
+
max?: number;
|
|
112
|
+
min?: number;
|
|
113
|
+
};
|
|
114
|
+
disabled?: boolean;
|
|
115
|
+
inputType?: TInputType;
|
|
116
|
+
minHeight?: string;
|
|
117
|
+
minWidth?: string;
|
|
118
|
+
name: string;
|
|
119
|
+
placeholder?: string;
|
|
120
|
+
}
|
|
121
|
+
export type { ICardHeader, ICardWithImageProps, ICardWithSwitchProps, ICardWithSelectorProps, ICardWithInputProps, };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { PropsWithChildren } from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export { Form, FormItem };
|
|
1
|
+
import type { PropsWithChildren } from "react";
|
|
2
|
+
import type { IFormProps } from "./types";
|
|
3
|
+
declare const Form: import("react").ForwardRefExoticComponent<Readonly<PropsWithChildren<Partial<IFormProps>>> & import("react").RefAttributes<HTMLFormElement>>;
|
|
4
|
+
export { Form };
|
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
declare const StyledForm: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, never>> & string;
|
|
2
|
-
|
|
3
|
-
declare const FormItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
4
|
-
export { FormItem, StyledForm, StyledInnerContainer };
|
|
2
|
+
export { StyledForm };
|
|
@@ -1,15 +1,21 @@
|
|
|
1
|
+
import { FormHTMLAttributes } from "react";
|
|
1
2
|
/**
|
|
2
3
|
* Form component props.
|
|
3
4
|
* @interface IFormProps
|
|
4
|
-
* @
|
|
5
|
-
* @property {
|
|
6
|
-
* @property {
|
|
7
|
-
* @property {
|
|
5
|
+
* @extends FormHTMLAttributes<HTMLFormElement>
|
|
6
|
+
* @property { string } [cancelLabel] - The cancel button label.
|
|
7
|
+
* @property { string } [id] - The form id.
|
|
8
|
+
* @property { Function } [onCancel] - The cancel button callback.
|
|
9
|
+
* @property { "submit" | Function } [onConfirm] - The confirm button callback.
|
|
10
|
+
* @property { string } [submitLabel] - The submit button label.
|
|
11
|
+
* @property { boolean } [submitDisabled] - The submit button disabled state.
|
|
8
12
|
*/
|
|
9
|
-
interface IFormProps {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
interface IFormProps extends FormHTMLAttributes<HTMLFormElement> {
|
|
14
|
+
cancelLabel?: string;
|
|
15
|
+
id?: string;
|
|
16
|
+
onCancel?: () => void;
|
|
17
|
+
onConfirm?: "submit" | (() => void);
|
|
13
18
|
submitLabel?: string;
|
|
19
|
+
submitDisabled?: boolean;
|
|
14
20
|
}
|
|
15
21
|
export type { IFormProps };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const TitleContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
2
|
+
declare const YearSwitch: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
3
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
4
|
+
}>, never>, never>> & string;
|
|
5
|
+
declare const WeekDaysTr: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, never>> & string;
|
|
6
|
+
declare const DayHeaderTh: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, never>> & string;
|
|
7
|
+
declare const DayItemTd: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, never>> & string;
|
|
8
|
+
declare const DotIconContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
9
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
10
|
+
}>, never>, never>> & string;
|
|
11
|
+
declare const CaretButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
12
|
+
declare const FooterContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
13
|
+
export { CaretButton, DayItemTd, DayHeaderTh, DotIconContainer, FooterContainer, TitleContainer, WeekDaysTr, YearSwitch, };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { AriaCalendarCellProps, AriaCalendarGridProps, CalendarAria } from "@react-aria/calendar";
|
|
2
|
+
import type { DateValue } from "@react-aria/datepicker";
|
|
3
|
+
import type { CalendarState, RangeCalendarState } from "@react-stately/calendar";
|
|
4
|
+
import type { DatePickerStateOptions, DateRangePickerStateOptions } from "@react-stately/datepicker";
|
|
5
|
+
import { InputHTMLAttributes } from "react";
|
|
6
|
+
/**
|
|
7
|
+
* Calendar state props.
|
|
8
|
+
* @interface ICalendarState
|
|
9
|
+
* @property {CalendarState | RangeCalendarState} state - Calendar state.
|
|
10
|
+
*/
|
|
11
|
+
interface ICalendarState {
|
|
12
|
+
state: CalendarState | RangeCalendarState;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Date component props.
|
|
16
|
+
* @interface IDateProps
|
|
17
|
+
* @extends InputHTMLAttributes<HTMLInputElement>
|
|
18
|
+
* @property {string} [error] - Error message of the date input.
|
|
19
|
+
* @property {string} [label] - Label of the date input.
|
|
20
|
+
* @property {string} name - Name of the date input.
|
|
21
|
+
* @property {string} [tooltip] - Tooltip of the date input.
|
|
22
|
+
*/
|
|
23
|
+
interface IDateProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
24
|
+
error?: string;
|
|
25
|
+
label?: string;
|
|
26
|
+
name: string;
|
|
27
|
+
tooltip?: string;
|
|
28
|
+
}
|
|
29
|
+
type TInputDateProps = IDateProps & Omit<DatePickerStateOptions<DateValue>, "label">;
|
|
30
|
+
type TGridProps = AriaCalendarGridProps & ICalendarState;
|
|
31
|
+
type TCellProps = AriaCalendarCellProps & ICalendarState;
|
|
32
|
+
type THeaderProps = ICalendarState & Pick<CalendarAria, "nextButtonProps" | "prevButtonProps" | "title">;
|
|
33
|
+
type TInputDateRangeProps = IDateProps & Omit<DateRangePickerStateOptions, "label">;
|
|
34
|
+
export type { IDateProps, TInputDateProps, TCellProps, TGridProps, THeaderProps, TInputDateRangeProps, };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { RangeCalendarStateOptions } from "@react-stately/calendar";
|
|
2
|
+
declare const Calendar: ({ onClose, props, }: Readonly<{
|
|
3
|
+
onClose: () => void;
|
|
4
|
+
props: Omit<RangeCalendarStateOptions, "createCalendar" | "locale">;
|
|
5
|
+
}>) => JSX.Element;
|
|
6
|
+
export { Calendar };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { TInputDateRangeProps } from "../date/types";
|
|
2
|
+
declare const InputDateRange: import("react").ForwardRefExoticComponent<Readonly<TInputDateRangeProps> & import("react").RefAttributes<HTMLInputElement>>;
|
|
3
|
+
export type { TInputDateRangeProps };
|
|
4
|
+
export { InputDateRange };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
declare const DateSelectorOutline: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
2
|
+
$disabled?: boolean;
|
|
3
|
+
$show?: boolean;
|
|
4
|
+
}>> & string;
|
|
5
|
+
export { DateSelectorOutline };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { TimeValue } from "@react-aria/datepicker";
|
|
2
|
+
import type { CalendarStateOptions } from "@react-stately/calendar";
|
|
3
|
+
import type { DatePickerState } from "@react-stately/datepicker";
|
|
4
|
+
declare const Calendar: ({ handleTimeChange, onClose, props, timeState, }: Readonly<{
|
|
5
|
+
handleTimeChange: (selectedValue: TimeValue | null) => void;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
props: Omit<CalendarStateOptions, "createCalendar" | "locale">;
|
|
8
|
+
timeState: DatePickerState;
|
|
9
|
+
}>) => JSX.Element;
|
|
10
|
+
export { Calendar };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const TimeOutlineContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
2
|
+
declare const OutlineContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
+
export { OutlineContainer, TimeOutlineContainer };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PropsWithChildren } from "react";
|
|
2
|
+
import type { IEditableProps } from "./types";
|
|
3
|
+
declare const Editable: ({ children, currentValue, externalLink, isEditing, label, name, tooltip, }: Readonly<PropsWithChildren<IEditableProps>>) => JSX.Element;
|
|
4
|
+
export type { IEditableProps };
|
|
5
|
+
export { Editable };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Editable component props.
|
|
3
|
+
* @interface IEditableProps
|
|
4
|
+
* @property {string} [currentValue] - The current value of the editable field.
|
|
5
|
+
* @property {string} [externalLink] - The external link associated with the editable field.
|
|
6
|
+
* @property {boolean} isEditing - Indicates whether the editable field is being edited.
|
|
7
|
+
* @property {string} label - The label for the editable field.
|
|
8
|
+
* @property {string} name - The name of the editable field.
|
|
9
|
+
* @property {string} [tooltip] - The tooltip text for the editable field.
|
|
10
|
+
*/
|
|
11
|
+
interface IEditableProps {
|
|
12
|
+
currentValue?: string;
|
|
13
|
+
externalLink?: string;
|
|
14
|
+
isEditing: boolean;
|
|
15
|
+
label: string;
|
|
16
|
+
name: string;
|
|
17
|
+
tooltip?: string;
|
|
18
|
+
}
|
|
19
|
+
export type { IEditableProps };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { IInputProps } from "../../types";
|
|
2
|
-
declare const
|
|
3
|
-
export {
|
|
2
|
+
declare const InputFile: import("react").ForwardRefExoticComponent<Readonly<IInputProps> & import("react").RefAttributes<HTMLInputElement>>;
|
|
3
|
+
export { InputFile };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IStyledTextProps } from "components/typography/styles";
|
|
2
|
+
declare const StyledInputText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, keyof import("../../../@core").IPaddingModifiable | keyof import("../../../@core").IMarginModifiable | keyof import("../../../@core").IPositionModifiable | keyof import("../../../@core").IBorderModifiable | keyof import("../../../@core").IDisplayModifiable | keyof import("../../../@core").ITextModifiable | keyof import("../../../@core").IInteractionModifiable> & import("../../../@core").IBorderModifiable & import("../../../@core").IDisplayModifiable & import("../../../@core").IInteractionModifiable & import("../../../@core").IMarginModifiable & import("../../../@core").IPaddingModifiable & import("../../../@core").IPositionModifiable & import("../../../@core").ITextModifiable, "ref"> & {
|
|
3
|
+
ref?: ((instance: HTMLParagraphElement | null) => void) | import("react").RefObject<HTMLParagraphElement> | null | undefined;
|
|
4
|
+
}, keyof IStyledTextProps> & IStyledTextProps, IStyledTextProps>> & string;
|
|
5
|
+
declare const FileInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
|
|
6
|
+
export { StyledInputText, FileInput };
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
+
import { InputDate } from "./fields/date";
|
|
2
|
+
import { InputDateRange } from "./fields/date-range";
|
|
3
|
+
import { InputDateTime } from "./fields/date-time";
|
|
4
|
+
import { Editable } from "./fields/editable";
|
|
5
|
+
import { Input } from "./fields/input";
|
|
6
|
+
import { InputFile } from "./fields/input-file";
|
|
7
|
+
import { InputTags } from "./fields/input-tags";
|
|
8
|
+
import { InputNumber } from "./fields/number";
|
|
9
|
+
import { InputNumberRange } from "./fields/number-range";
|
|
1
10
|
import { PhoneInput } from "./fields/phone";
|
|
2
|
-
import {
|
|
11
|
+
import { TextArea } from "./fields/text-area";
|
|
3
12
|
import { OutlineContainer } from "./outline-container";
|
|
4
|
-
export { OutlineContainer, PhoneInput,
|
|
13
|
+
export { OutlineContainer, PhoneInput, Input, InputDate, InputDateRange, InputDateTime, InputFile, InputNumber, InputTags, InputNumberRange, TextArea, Editable, };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ILabelProps } from "../types";
|
|
2
|
-
declare const Label: ({ htmlFor, label,
|
|
2
|
+
declare const Label: ({ htmlFor, label, required, tooltip, weight, }: Readonly<ILabelProps>) => JSX.Element;
|
|
3
3
|
export { Label };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { PropsWithChildren } from "react";
|
|
2
2
|
import type { IOutlineContainerProps } from "../types";
|
|
3
|
-
declare const OutlineContainer: ({ children, error, htmlFor, label,
|
|
3
|
+
declare const OutlineContainer: ({ children, error, helpLink, helpLinkText, helpText, htmlFor, label, maxLength, required, tooltip, value, weight, }: Readonly<PropsWithChildren<IOutlineContainerProps>>) => JSX.Element;
|
|
4
4
|
export { OutlineContainer };
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import type { InputHTMLAttributes } from "react";
|
|
2
|
-
import { TMode } from "components/@core";
|
|
1
|
+
import type { InputHTMLAttributes, TextareaHTMLAttributes } from "react";
|
|
3
2
|
/**
|
|
4
3
|
* Label component props.
|
|
5
4
|
* @interface ILabelProps
|
|
6
5
|
* @property {string} htmlFor - The htmlFor of the input.
|
|
7
6
|
* @property {string | JSX.Element} [label] - The label of the input.
|
|
8
|
-
* @property {TMode} [mode] - The background theme: dark or light.
|
|
9
7
|
* @property {boolean} [required] - Whether the input is required.
|
|
10
8
|
* @property {string} [tooltip] - The tooltip of the input.
|
|
9
|
+
* @property {string} [weight] - The weight of the label.
|
|
11
10
|
*/
|
|
12
11
|
interface ILabelProps {
|
|
13
12
|
htmlFor: string;
|
|
14
13
|
label?: string | JSX.Element;
|
|
15
|
-
mode?: TMode;
|
|
16
14
|
required?: boolean;
|
|
17
15
|
tooltip?: string;
|
|
16
|
+
weight?: "bold" | "normal";
|
|
18
17
|
}
|
|
19
18
|
/**
|
|
20
19
|
* Outline container component props.
|
|
@@ -32,17 +31,78 @@ interface IOutlineContainerProps extends ILabelProps {
|
|
|
32
31
|
helpLinkText?: string;
|
|
33
32
|
helpText?: string;
|
|
34
33
|
maxLength?: number;
|
|
34
|
+
value?: string;
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
37
|
* Input text component props.
|
|
38
38
|
* @interface IInputProps
|
|
39
|
-
* @extends ILabelProps
|
|
40
39
|
* @extends InputHTMLAttributes<HTMLInputElement>
|
|
40
|
+
* @extends IOutlineContainerProps
|
|
41
|
+
* @property {boolean} [hasIcon] - Whether the input has an icon.
|
|
42
|
+
* @property {string} name - The name of the input.
|
|
43
|
+
* @property {boolean} [maskValue] - Whether the input has a mask value.
|
|
44
|
+
* @property {string[]} [suggestions] - The suggestions of the input.
|
|
45
|
+
*/
|
|
46
|
+
interface IInputProps extends InputHTMLAttributes<HTMLInputElement>, Partial<Omit<IOutlineContainerProps, "maxLength" | "value">> {
|
|
47
|
+
hasIcon?: boolean;
|
|
48
|
+
name: string;
|
|
49
|
+
maskValue?: boolean;
|
|
50
|
+
suggestions?: string[];
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Text area component props.
|
|
54
|
+
* @interface ITextAreaProps
|
|
55
|
+
* @extends TextareaHTMLAttributes<HTMLTextAreaElement>
|
|
56
|
+
* @extends IOutlineContainerProps
|
|
57
|
+
* @property {string} name - The name of the text area.
|
|
58
|
+
* @property {boolean} [maskValue] - Whether the input has a mask value.
|
|
59
|
+
*/
|
|
60
|
+
interface ITextAreaProps extends TextareaHTMLAttributes<HTMLTextAreaElement>, Partial<Omit<IOutlineContainerProps, "value">> {
|
|
61
|
+
name: string;
|
|
62
|
+
maskValue?: boolean;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Input number component props.
|
|
66
|
+
* @interface IInputNumberProps
|
|
67
|
+
* @extends InputHTMLAttributes<HTMLInputElement>
|
|
68
|
+
* @extends IOutlineContainerProps
|
|
69
|
+
* @property {number} [decimalPlaces] - The decimal places of the input.
|
|
70
|
+
* @property {string} name - The name of the input.
|
|
71
|
+
*/
|
|
72
|
+
interface IInputNumberProps extends InputHTMLAttributes<HTMLInputElement>, Partial<Omit<IOutlineContainerProps, "value">> {
|
|
73
|
+
decimalPlaces?: number;
|
|
74
|
+
name: string;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Input number range component props.
|
|
78
|
+
* @interface IInputNumberRangeProps
|
|
79
|
+
* @property {boolean} [disabled] - Whether the input is disabled.
|
|
41
80
|
* @property {string} [error] - The error message of the input.
|
|
42
|
-
* @property {string}
|
|
81
|
+
* @property {string} name - The name of the input.
|
|
82
|
+
* @property {string} [label] - The label of the input.
|
|
83
|
+
* @property {IInputNumberProps} propsMin - The props of the minimum input.
|
|
84
|
+
* @property {IInputNumberProps} propsMax - The props of the maximum input.
|
|
85
|
+
* @property {boolean} [required] - Whether the input is required.
|
|
86
|
+
* @property {string} [tooltip] - The tooltip of the input.
|
|
43
87
|
*/
|
|
44
|
-
interface
|
|
88
|
+
interface IInputNumberRangeProps {
|
|
89
|
+
disabled?: boolean;
|
|
45
90
|
error?: string;
|
|
46
91
|
name: string;
|
|
92
|
+
label?: string;
|
|
93
|
+
propsMin: IInputNumberProps;
|
|
94
|
+
propsMax: IInputNumberProps;
|
|
95
|
+
required?: boolean;
|
|
96
|
+
tooltip?: string;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Input number component props.
|
|
100
|
+
* @interface IInputNumberProps
|
|
101
|
+
* @extends InputHTMLAttributes<HTMLInputElement>
|
|
102
|
+
* @extends IOutlineContainerProps
|
|
103
|
+
* @property {Function} [onRemove] - The function to remove the tag.
|
|
104
|
+
*/
|
|
105
|
+
interface IInputTagProps extends InputHTMLAttributes<HTMLInputElement>, Partial<Omit<IOutlineContainerProps, "value">> {
|
|
106
|
+
onRemove?: (tag: string) => void;
|
|
47
107
|
}
|
|
48
|
-
export type { IInputProps,
|
|
108
|
+
export type { ILabelProps, IOutlineContainerProps, IInputProps, ITextAreaProps, IInputNumberProps, IInputNumberRangeProps, IInputTagProps, };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IconName } from "@fortawesome/free-solid-svg-icons";
|
|
2
|
+
import type { AriaButtonOptions } from "@react-aria/button";
|
|
3
|
+
declare const Button: ({ disabled, icon, props, }: Readonly<{
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
icon: IconName;
|
|
6
|
+
props: AriaButtonOptions<"button">;
|
|
7
|
+
}>) => JSX.Element;
|
|
8
|
+
export { Button };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { TDateFieldProps, TTimeFieldProps } from "../types";
|
|
2
|
+
declare const DateField: ({ disabled, error, props, }: Readonly<TDateFieldProps>) => JSX.Element;
|
|
3
|
+
declare const TimeField: (props: Readonly<TTimeFieldProps>) => JSX.Element;
|
|
4
|
+
export { DateField, TimeField };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Ref } from "react";
|
|
2
|
+
import type { IInputNumberProps } from "../../types";
|
|
3
|
+
declare const NumberField: ({ error, decimalPlaces, disabled, max, min, name, placeholder, ref, required, value, ...props }: Readonly<IInputNumberProps & {
|
|
4
|
+
ref: Ref<HTMLInputElement>;
|
|
5
|
+
}>) => JSX.Element;
|
|
6
|
+
export { NumberField };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IActionButtonProps } from "./types";
|
|
2
|
+
declare const StyledButtonAction: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, keyof import("components/@core").IPaddingModifiable | keyof import("components/@core").IMarginModifiable | keyof import("components/@core").IPositionModifiable | keyof import("components/@core").IBorderModifiable | keyof import("components/@core").IDisplayModifiable | keyof import("components/@core").ITextModifiable | keyof import("components/@core").IInteractionModifiable> & import("components/@core").IBorderModifiable & import("components/@core").IDisplayModifiable & import("components/@core").IInteractionModifiable & import("components/@core").IMarginModifiable & import("components/@core").IPaddingModifiable & import("components/@core").IPositionModifiable & import("components/@core").ITextModifiable, "ref"> & {
|
|
3
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
4
|
+
}, {
|
|
5
|
+
$margin: IActionButtonProps["margin"];
|
|
6
|
+
}>> & string;
|
|
7
|
+
declare const DialogContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
8
|
+
declare const CalendarButtonAction: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
9
|
+
$disabled: boolean;
|
|
10
|
+
$focus: boolean;
|
|
11
|
+
$header: boolean;
|
|
12
|
+
}>> & string;
|
|
13
|
+
declare const InputDateBox: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
14
|
+
declare const TimeOutlineContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
15
|
+
declare const TimePickerContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
16
|
+
declare const DayPeriodButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
17
|
+
export { StyledButtonAction, CalendarButtonAction, DayPeriodButton, DialogContainer, InputDateBox, TimeOutlineContainer, TimePickerContainer, };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { AriaDatePickerProps, DatePickerAria, DateValue } from "@react-aria/datepicker";
|
|
2
|
+
import type { AriaPopoverProps } from "@react-aria/overlays";
|
|
3
|
+
import type { DateFieldState, DateFieldStateOptions, DateSegment, TimeFieldStateOptions } from "@react-stately/datepicker";
|
|
4
|
+
import type { OverlayTriggerState } from "@react-stately/overlays";
|
|
5
|
+
import type { Property } from "csstype";
|
|
6
|
+
import { IBorderModifiable, IIconModifiable, IPaddingModifiable } from "components/@core";
|
|
7
|
+
/**
|
|
8
|
+
* Action button component props.
|
|
9
|
+
* @interface IActionButtonProps
|
|
10
|
+
* @extends IIconModifiable
|
|
11
|
+
* @extends IBorderModifiable
|
|
12
|
+
* @extends IPaddingModifiable
|
|
13
|
+
* @property {boolean} disabled - Indicates if the button is disabled.
|
|
14
|
+
* @property {Function} [onClick] - The function to be called when the button is clicked.
|
|
15
|
+
* @property {Property.Margin} [margin] - The button margin.
|
|
16
|
+
*/
|
|
17
|
+
interface IActionButtonProps extends Pick<IIconModifiable, "icon">, IBorderModifiable, IPaddingModifiable {
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
onClick?: () => void;
|
|
20
|
+
margin?: Property.Margin;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Popover component props.
|
|
24
|
+
* @interface IPopoverProps
|
|
25
|
+
* @extends AriaPopoverProps
|
|
26
|
+
* @property {boolean} [isFilter] - Indicates if the popover is a filter.
|
|
27
|
+
* @property {OverlayTriggerState} state - The state of the overlay trigger.
|
|
28
|
+
*/
|
|
29
|
+
interface IPopoverProps extends Omit<AriaPopoverProps, "popoverRef"> {
|
|
30
|
+
isFilter?: boolean;
|
|
31
|
+
state: OverlayTriggerState;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Date selector component props.
|
|
35
|
+
* @interface IDateSelectorProps
|
|
36
|
+
* @extends DatePickerAria
|
|
37
|
+
* @extends AriaDatePickerProps<DateValue>
|
|
38
|
+
* @property {string} [error] - The error message.
|
|
39
|
+
* @property {React.MutableRefObject<null>} datePickerRef - The ref of the date picker.
|
|
40
|
+
* @property {boolean} [disabled] - Indicates if the date selector is disabled.
|
|
41
|
+
* @property {Function} [handleOnChange] - The function to be called when the date is changed.
|
|
42
|
+
* @property {React.Ref<HTMLInputElement>} inputRef - The ref of the input.
|
|
43
|
+
* @property {boolean} isOpen - Indicates if the date selector is open.
|
|
44
|
+
* @property {string} name - The name of the date selector.
|
|
45
|
+
* @property {string} [variant] - The variant of the date selector.
|
|
46
|
+
*/
|
|
47
|
+
interface IDateSelectorProps extends Pick<DatePickerAria, "buttonProps" | "fieldProps" | "groupProps">, Pick<AriaDatePickerProps<DateValue>, "granularity"> {
|
|
48
|
+
error?: string;
|
|
49
|
+
datePickerRef: React.MutableRefObject<null>;
|
|
50
|
+
disabled?: boolean;
|
|
51
|
+
handleOnChange?: (value: DateValue) => void;
|
|
52
|
+
inputRef: React.Ref<HTMLInputElement>;
|
|
53
|
+
isOpen: boolean;
|
|
54
|
+
name: string;
|
|
55
|
+
variant?: "range";
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Date segment component props.
|
|
59
|
+
* @interface IDateSegmentProps
|
|
60
|
+
* @property {DateSegment} segment - The date segment.
|
|
61
|
+
* @property {DateFieldState} state - The date field state.
|
|
62
|
+
*/
|
|
63
|
+
interface IDateSegmentProps {
|
|
64
|
+
segment: DateSegment;
|
|
65
|
+
state: DateFieldState;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Date field component props.
|
|
69
|
+
* @interface IDateFieldProps
|
|
70
|
+
* @property {boolean} disabled - Indicates if the date field is disabled.
|
|
71
|
+
* @property {boolean} error - Indicates if the date field has an error.
|
|
72
|
+
*/
|
|
73
|
+
interface IDateFieldProps {
|
|
74
|
+
disabled: boolean;
|
|
75
|
+
error: boolean;
|
|
76
|
+
}
|
|
77
|
+
type TTimeFieldProps = Omit<TimeFieldStateOptions, "createCalendar" | "locale">;
|
|
78
|
+
type TDateFieldProps = IDateFieldProps & {
|
|
79
|
+
props: Omit<DateFieldStateOptions, "createCalendar" | "locale">;
|
|
80
|
+
};
|
|
81
|
+
export type { IActionButtonProps, IPopoverProps, IDateSelectorProps, IDateSegmentProps, TDateFieldProps, TTimeFieldProps, };
|