@happeouikit/form-elements 2.4.8 → 2.5.1
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/DatePicker.d.ts +4 -34
- package/dist/DatePicker.types.d.ts +38 -0
- package/dist/Switch.d.ts +1 -1
- package/dist/Switch.types.d.ts +1 -1
- package/dist/index.cjs.js +351 -293
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +7011 -5628
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -3
package/dist/DatePicker.d.ts
CHANGED
|
@@ -1,34 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
locale?: string | undefined;
|
|
6
|
-
width: any;
|
|
7
|
-
date?: {
|
|
8
|
-
from: string;
|
|
9
|
-
to: string;
|
|
10
|
-
} | undefined;
|
|
11
|
-
type?: string | undefined;
|
|
12
|
-
fromMonth?: Date | undefined;
|
|
13
|
-
disabledDays?: {} | undefined;
|
|
14
|
-
value: any;
|
|
15
|
-
pickerRef: any;
|
|
16
|
-
inputProps?: {} | undefined;
|
|
17
|
-
dayPickerProps?: {} | undefined;
|
|
18
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
declare namespace DatePicker {
|
|
20
|
-
namespace propTypes {
|
|
21
|
-
let fromMonth: PropTypes.Requireable<NonNullable<string | Date | null | undefined>>;
|
|
22
|
-
let label: PropTypes.Requireable<NonNullable<string | object | null | undefined>>;
|
|
23
|
-
let locale: PropTypes.Requireable<string>;
|
|
24
|
-
let width: PropTypes.Requireable<string>;
|
|
25
|
-
let type: PropTypes.Requireable<string>;
|
|
26
|
-
let value: PropTypes.Requireable<Date>;
|
|
27
|
-
function date(props: any, propName: any): Error | null;
|
|
28
|
-
let disabledDays: PropTypes.Requireable<object>;
|
|
29
|
-
let pickerRef: PropTypes.Requireable<NonNullable<((...args: any[]) => any) | PropTypes.InferProps<{
|
|
30
|
-
current: PropTypes.Requireable<any>;
|
|
31
|
-
}> | null | undefined>>;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
import PropTypes from "prop-types";
|
|
1
|
+
import type { FC } from "react";
|
|
2
|
+
import type { DatePickerProps } from "./DatePicker.types";
|
|
3
|
+
declare const _default: FC<DatePickerProps>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { DayPickerProps } from "react-day-picker";
|
|
3
|
+
export interface DateRange {
|
|
4
|
+
from: Date | number | string;
|
|
5
|
+
to: Date | number | string;
|
|
6
|
+
}
|
|
7
|
+
export interface DisabledDays {
|
|
8
|
+
before?: Date | string | number;
|
|
9
|
+
after?: Date | string | number;
|
|
10
|
+
}
|
|
11
|
+
export interface DatePickerProps {
|
|
12
|
+
label?: React.ReactNode;
|
|
13
|
+
locale?: string;
|
|
14
|
+
width?: string;
|
|
15
|
+
date?: DateRange;
|
|
16
|
+
type?: "from" | "to";
|
|
17
|
+
fromMonth?: Date | string;
|
|
18
|
+
disabledDays?: DisabledDays;
|
|
19
|
+
value?: Date;
|
|
20
|
+
pickerRef?: React.RefObject<{
|
|
21
|
+
getInput: () => HTMLInputElement | null;
|
|
22
|
+
} | null>;
|
|
23
|
+
inputProps?: React.InputHTMLAttributes<HTMLInputElement> & {
|
|
24
|
+
id?: string;
|
|
25
|
+
};
|
|
26
|
+
dayPickerProps?: Partial<DayPickerProps>;
|
|
27
|
+
showOverlay?: boolean;
|
|
28
|
+
onDayChange?: (day: Date | null) => void;
|
|
29
|
+
onDayClick?: (day: Date) => void;
|
|
30
|
+
}
|
|
31
|
+
export interface MonthPickerProps {
|
|
32
|
+
date: Date;
|
|
33
|
+
disabledDays: DisabledDays;
|
|
34
|
+
onChange: (val: {
|
|
35
|
+
month: number;
|
|
36
|
+
year: number;
|
|
37
|
+
}) => void;
|
|
38
|
+
}
|
package/dist/Switch.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SwitchProps } from "./Switch.types";
|
|
2
|
-
declare const Switch: ({ label, subtitle, description, tabIndex, id, disabled, checked, defaultChecked, required, onChange, background, "data-tip": dataTip1, "data-tooltip-content": dataTip2, "data-tooltip-id": dataTipId, "data-testid": dataTestId, ...props }: SwitchProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const Switch: ({ label, subtitle, description, tabIndex, id, disabled, checked, defaultChecked, required, onChange, background, "data-tip": dataTip1, "data-tooltip-content": dataTip2, "data-tooltip-id": dataTipId, "data-testid": dataTestId, "aria-label": ariaLabel, ...props }: SwitchProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Switch;
|
package/dist/Switch.types.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ interface AriaLabelSwitchProps extends BaseSwitchProps {
|
|
|
24
24
|
}
|
|
25
25
|
interface LabelSwitchProps extends BaseSwitchProps {
|
|
26
26
|
label: React.ReactNode;
|
|
27
|
-
"aria-label"?:
|
|
27
|
+
"aria-label"?: string;
|
|
28
28
|
}
|
|
29
29
|
export type SwitchProps = AriaLabelSwitchProps | LabelSwitchProps;
|
|
30
30
|
export {};
|