globalfy-design-system 1.15.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.
@@ -1,3 +1,4 @@
1
- import { DatePickerProps } from './DatePicker.types';
1
+ import { DayPickerSingleProps } from 'react-day-picker';
2
2
 
3
- export declare const DatePicker: ({ ...props }: DatePickerProps) => JSX.Element;
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.types').DatePickerProps) => JSX.Element;
4
+ component: ({ selected, ...props }: import('./DatePicker').DatePickerProps) => JSX.Element;
5
5
  tags: string[];
6
6
  parameters: {
7
7
  layout: string;
@@ -1,2 +1 @@
1
1
  export * from './DatePicker';
2
- export * from './DatePicker.types';
@@ -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: string;
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: string;
6
+ label?: string | undefined;
7
7
  placeholder?: string | undefined;
8
8
  message?: string | undefined;
9
9
  icon?: import('react').ReactNode;
@@ -1,3 +1,2 @@
1
1
  export * from './Input';
2
2
  export * from './InputPassword';
3
- export * from './Input.types';
@@ -1,9 +1,18 @@
1
- /// <reference types="react" />
1
+ import { TextareaHTMLAttributes } from 'react';
2
+
3
+ export type TextAreaProps = {
4
+ label?: string;
5
+ message?: string;
6
+ isInvalid?: boolean;
7
+ isValid?: boolean;
8
+ allowResize?: boolean;
9
+ value?: string;
10
+ } & Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "size" | "defaultValue" | "color" | "onFocus" | "onBlur">;
2
11
  export declare const TextArea: import('react').ForwardRefExoticComponent<{
3
- label: string;
12
+ label?: string | undefined;
4
13
  message?: string | undefined;
5
14
  isInvalid?: boolean | undefined;
6
15
  isValid?: boolean | undefined;
7
16
  allowResize?: boolean | undefined;
8
17
  value?: string | undefined;
9
- } & Omit<import('react').TextareaHTMLAttributes<HTMLTextAreaElement>, "defaultValue" | "color" | "onFocus" | "onBlur" | "size"> & import('react').RefAttributes<HTMLTextAreaElement>>;
18
+ } & Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "defaultValue" | "color" | "onFocus" | "onBlur" | "size"> & import('react').RefAttributes<HTMLTextAreaElement>>;
@@ -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: string;
6
+ label?: string | undefined;
7
7
  message?: string | undefined;
8
8
  isInvalid?: boolean | undefined;
9
9
  isValid?: boolean | undefined;
@@ -1,2 +1 @@
1
1
  export * from './TextArea';
2
- export * from './TextArea.types';
@@ -1,3 +1,8 @@
1
- import { DatePickerInputProps } from './DatePickerInput.types';
2
-
3
- export declare const DatePickerInput: ({ label, initialDate, onSelect, dateFormat }: DatePickerInputProps) => import("react/jsx-runtime").JSX.Element;
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.types').DatePickerInputProps) => import("react/jsx-runtime").JSX.Element;
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;
@@ -1,2 +1 @@
1
1
  export * from './DatePickerInput';
2
- export * from './DatePickerInput.types';
@@ -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 = ({ ...e }) => /* @__PURE__ */ A.jsx(
51775
+ }, sX = ({
51776
+ selected: e,
51777
+ ...r
51778
+ }) => /* @__PURE__ */ A.jsx(
51776
51779
  aX,
51777
51780
  {
51778
- disabled: (r) => r > /* @__PURE__ */ new Date() || r < /* @__PURE__ */ new Date("1900-01-01"),
51781
+ ...r,
51782
+ mode: "single",
51779
51783
  components: {
51780
51784
  Caption: iX
51781
51785
  },
51782
51786
  showOutsideDays: !0,
51783
- ...e
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 [a, s] = p0(!1), [l, c] = p0(r), u = () => {
57954
- s(!0);
57955
- }, d = (p) => {
57956
- t && t(p), c(p), h();
57957
- }, h = () => {
57958
- s(!1);
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: a,
57964
- align: "end",
57965
- onInteractOutside: h,
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: l ? Ue(l, o ?? "dd/MM/yyyy") : "",
57978
- onClick: u,
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
  }