globalfy-design-system 1.16.0 → 1.17.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/components/atoms/DatePicker/DatePicker.d.ts +3 -2
- package/dist/components/atoms/DatePicker/DatePicker.stories.d.ts +1 -1
- package/dist/components/atoms/DatePicker/index.d.ts +0 -1
- package/dist/components/atoms/Input/Input.d.ts +16 -1
- package/dist/components/atoms/Input/Input.stories.d.ts +1 -1
- package/dist/components/atoms/Input/index.d.ts +0 -1
- package/dist/components/molecules/DatePickerInput/DatePickerInput.d.ts +8 -3
- package/dist/components/molecules/DatePickerInput/DatePickerInput.stories.d.ts +1 -1
- package/dist/components/molecules/DatePickerInput/index.d.ts +0 -1
- package/dist/globalfy-design-system.js +24 -25
- package/dist/globalfy-design-system.umd.cjs +3 -3
- package/package.json +3 -2
- package/dist/components/atoms/DatePicker/DatePicker.types.d.ts +0 -3
- package/dist/components/atoms/Input/Input.types.d.ts +0 -16
- package/dist/components/molecules/DatePickerInput/DatePickerInput.types.d.ts +0 -6
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DayPickerSingleProps } from 'react-day-picker';
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export type DatePickerProps = Omit<DayPickerSingleProps, "mode">;
|
|
4
|
+
export declare const DatePicker: ({ selected, ...props }: DatePickerProps) => JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ ...props }: import('./DatePicker
|
|
4
|
+
component: ({ selected, ...props }: import('./DatePicker').DatePickerProps) => JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
parameters: {
|
|
7
7
|
layout: string;
|
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
|
|
3
|
+
export type InputProps = {
|
|
4
|
+
label?: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
message?: string;
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
isInvalid?: boolean;
|
|
9
|
+
isRequired?: boolean;
|
|
10
|
+
isValid?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
value?: string;
|
|
13
|
+
isDatePicker?: boolean;
|
|
14
|
+
iconAction?: () => void;
|
|
15
|
+
iconSize?: "small" | "large";
|
|
16
|
+
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "defaultValue" | "color" | "onFocus" | "onBlur">;
|
|
17
|
+
export type InputPasswordProps = Omit<InputProps, "icon" | "type" | "isDatePicker">;
|
|
3
18
|
export declare const Input: React.ForwardRefExoticComponent<{
|
|
4
|
-
label
|
|
19
|
+
label?: string | undefined;
|
|
5
20
|
placeholder?: string | undefined;
|
|
6
21
|
message?: string | undefined;
|
|
7
22
|
icon?: React.ReactNode;
|
|
@@ -3,7 +3,7 @@ import { StoryObj } from '@storybook/react';
|
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
5
|
component: import('react').ForwardRefExoticComponent<{
|
|
6
|
-
label
|
|
6
|
+
label?: string | undefined;
|
|
7
7
|
placeholder?: string | undefined;
|
|
8
8
|
message?: string | undefined;
|
|
9
9
|
icon?: import('react').ReactNode;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export type DatePickerInputProps = {
|
|
2
|
+
label?: string;
|
|
3
|
+
onSelect?: (date: Date | undefined) => void;
|
|
4
|
+
initialDate?: Date;
|
|
5
|
+
dateFormat?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const DatePickerInput: ({ label, initialDate, onSelect, dateFormat, disabled }: DatePickerInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react';
|
|
|
2
2
|
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ label, initialDate, onSelect, dateFormat }: import('./DatePickerInput
|
|
5
|
+
component: ({ label, initialDate, onSelect, dateFormat, disabled }: import('./DatePickerInput').DatePickerInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
tags: string[];
|
|
7
7
|
};
|
|
8
8
|
export default meta;
|
|
@@ -47731,7 +47731,7 @@ const Vj = Aj, Tj = Cj, Hj = Zj, zj = Ej, Av0 = ({
|
|
|
47731
47731
|
N
|
|
47732
47732
|
]);
|
|
47733
47733
|
return /* @__PURE__ */ A.jsx("div", { className: "w-full", children: /* @__PURE__ */ A.jsxs(x, { ...M(), children: [
|
|
47734
|
-
z ? S : null,
|
|
47734
|
+
z && C ? S : null,
|
|
47735
47735
|
/* @__PURE__ */ A.jsxs(
|
|
47736
47736
|
"div",
|
|
47737
47737
|
{
|
|
@@ -51772,15 +51772,19 @@ const iX = (e) => {
|
|
|
51772
51772
|
}
|
|
51773
51773
|
)
|
|
51774
51774
|
] });
|
|
51775
|
-
}, sX = ({
|
|
51775
|
+
}, sX = ({
|
|
51776
|
+
selected: e,
|
|
51777
|
+
...r
|
|
51778
|
+
}) => /* @__PURE__ */ A.jsx(
|
|
51776
51779
|
aX,
|
|
51777
51780
|
{
|
|
51778
|
-
|
|
51781
|
+
...r,
|
|
51782
|
+
mode: "single",
|
|
51779
51783
|
components: {
|
|
51780
51784
|
Caption: iX
|
|
51781
51785
|
},
|
|
51782
51786
|
showOutsideDays: !0,
|
|
51783
|
-
|
|
51787
|
+
selected: typeof e == "string" ? new Date(e) : void 0
|
|
51784
51788
|
}
|
|
51785
51789
|
), ZP = ({
|
|
51786
51790
|
children: e,
|
|
@@ -57948,37 +57952,32 @@ const Uv0 = ({
|
|
|
57948
57952
|
label: e,
|
|
57949
57953
|
initialDate: r,
|
|
57950
57954
|
onSelect: t,
|
|
57951
|
-
dateFormat: o
|
|
57955
|
+
dateFormat: o,
|
|
57956
|
+
disabled: a
|
|
57952
57957
|
}) => {
|
|
57953
|
-
const [
|
|
57954
|
-
|
|
57955
|
-
},
|
|
57956
|
-
t && t(
|
|
57957
|
-
},
|
|
57958
|
-
|
|
57958
|
+
const [s, l] = p0(!1), [c, u] = p0(r), d = () => {
|
|
57959
|
+
l(!0);
|
|
57960
|
+
}, h = (g) => {
|
|
57961
|
+
t && t(g), u(g), p();
|
|
57962
|
+
}, p = () => {
|
|
57963
|
+
l(!1);
|
|
57959
57964
|
};
|
|
57960
57965
|
return /* @__PURE__ */ A.jsx(
|
|
57961
57966
|
yW,
|
|
57962
57967
|
{
|
|
57963
|
-
isOpen:
|
|
57964
|
-
align: "
|
|
57965
|
-
onInteractOutside:
|
|
57966
|
-
content: /* @__PURE__ */ A.jsx(
|
|
57967
|
-
sX,
|
|
57968
|
-
{
|
|
57969
|
-
selected: l,
|
|
57970
|
-
onSelect: d,
|
|
57971
|
-
mode: "single"
|
|
57972
|
-
}
|
|
57973
|
-
),
|
|
57968
|
+
isOpen: s,
|
|
57969
|
+
align: "start",
|
|
57970
|
+
onInteractOutside: p,
|
|
57971
|
+
content: /* @__PURE__ */ A.jsx(sX, { selected: c, onSelect: h }),
|
|
57974
57972
|
children: /* @__PURE__ */ A.jsx("div", { children: /* @__PURE__ */ A.jsx(
|
|
57975
57973
|
kH,
|
|
57976
57974
|
{
|
|
57977
|
-
value:
|
|
57978
|
-
onClick:
|
|
57975
|
+
value: c ? Ue(c, o ?? "dd/MM/yyyy") : "",
|
|
57976
|
+
onClick: d,
|
|
57979
57977
|
isDatePicker: !0,
|
|
57980
57978
|
label: e,
|
|
57981
|
-
icon: "calendar"
|
|
57979
|
+
icon: "calendar",
|
|
57980
|
+
disabled: a
|
|
57982
57981
|
}
|
|
57983
57982
|
) })
|
|
57984
57983
|
}
|