globalfy-design-system 0.111.0 → 0.113.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.
@@ -6,6 +6,7 @@ export declare const Input: React.ForwardRefExoticComponent<{
6
6
  message?: string | undefined;
7
7
  icon?: React.ReactNode;
8
8
  isInvalid?: boolean | undefined;
9
+ isRequired?: boolean | undefined;
9
10
  isValid?: boolean | undefined;
10
11
  disabled?: boolean | undefined;
11
12
  value?: string | undefined;
@@ -8,6 +8,7 @@ declare const meta: {
8
8
  message?: string | undefined;
9
9
  icon?: import('react').ReactNode;
10
10
  isInvalid?: boolean | undefined;
11
+ isRequired?: boolean | undefined;
11
12
  isValid?: boolean | undefined;
12
13
  disabled?: boolean | undefined;
13
14
  value?: string | undefined;
@@ -5,6 +5,7 @@ export type InputProps = {
5
5
  message?: string;
6
6
  icon?: React.ReactNode;
7
7
  isInvalid?: boolean;
8
+ isRequired?: boolean;
8
9
  isValid?: boolean;
9
10
  disabled?: boolean;
10
11
  value?: string;
@@ -20943,13 +20943,14 @@ const bC = uC, vC = fC, yC = hC, xC = gC, wD = ({
20943
20943
  isDatePicker: t,
20944
20944
  isInvalid: n,
20945
20945
  isValid: r,
20946
- className: o,
20947
- icon: a,
20948
- message: i,
20949
- iconAction: s,
20950
- ...l
20951
- }, c) => {
20952
- const u = be({
20946
+ isRequired: o,
20947
+ className: a,
20948
+ icon: i,
20949
+ message: s,
20950
+ iconAction: l,
20951
+ ...c
20952
+ }, u) => {
20953
+ const d = be({
20953
20954
  base: "[&_input]:data-[filled-within=true]:!bg-transparent [&_label]:data-[filled-within=true]:!left-[15px] [&_label]:data-[filled-within=true]:!top-[20px] [&_label]:data-[filled-within=true]:!ml-[1px] [&_label]:data-[filled-within=true]:!text-xs [&_label]:data-[filled-within=true]:!text-primary-grey-800",
20954
20955
  variants: {
20955
20956
  isInvalid: {
@@ -20962,8 +20963,8 @@ const bC = uC, vC = fC, yC = hC, xC = gC, wD = ({
20962
20963
  true: "[&_label]:data-[filled-within=true]:!text-primary-grey-700"
20963
20964
  }
20964
20965
  }
20965
- }), d = be({
20966
- base: "left-[16px] top-6 font-satoshi text-sm text-primary-grey-800",
20966
+ }), f = be({
20967
+ base: "left-[16px] top-6 max-w-[calc(100%-40px)] font-satoshi text-sm text-primary-grey-800",
20967
20968
  variants: {
20968
20969
  isInvalid: {
20969
20970
  true: "text-complementary-red-500"
@@ -20973,9 +20974,12 @@ const bC = uC, vC = fC, yC = hC, xC = gC, wD = ({
20973
20974
  },
20974
20975
  disabled: {
20975
20976
  true: "text-primary-grey-700"
20977
+ },
20978
+ isRequired: {
20979
+ true: "after:content-['*']"
20976
20980
  }
20977
20981
  }
20978
- }), f = be({
20982
+ }), p = be({
20979
20983
  base: "text-left font-satoshi text-base",
20980
20984
  variants: {
20981
20985
  disabled: {
@@ -20985,7 +20989,7 @@ const bC = uC, vC = fC, yC = hC, xC = gC, wD = ({
20985
20989
  true: "!cursor-pointer"
20986
20990
  }
20987
20991
  }
20988
- }), p = be({
20992
+ }), m = be({
20989
20993
  base: "h-12 rounded-lg border border-primary-grey-700 !bg-white px-[15px] text-black !ring-0 !ring-offset-0",
20990
20994
  variants: {
20991
20995
  isInvalid: {
@@ -21001,7 +21005,7 @@ const bC = uC, vC = fC, yC = hC, xC = gC, wD = ({
21001
21005
  true: "!cursor-pointer"
21002
21006
  }
21003
21007
  }
21004
- }), m = be({
21008
+ }), h = be({
21005
21009
  base: "mt-[5px] pl-3 font-satoshi",
21006
21010
  variants: {
21007
21011
  isInvalid: {
@@ -21011,7 +21015,7 @@ const bC = uC, vC = fC, yC = hC, xC = gC, wD = ({
21011
21015
  true: "text-secondary-green-500"
21012
21016
  }
21013
21017
  }
21014
- }), h = be({
21018
+ }), g = be({
21015
21019
  base: "text-primary-grey-800",
21016
21020
  variants: {
21017
21021
  iconAction: {
@@ -21019,77 +21023,77 @@ const bC = uC, vC = fC, yC = hC, xC = gC, wD = ({
21019
21023
  }
21020
21024
  }
21021
21025
  }), {
21022
- Component: g,
21023
- label: v,
21024
- domRef: y,
21025
- startContent: x,
21026
- shouldLabelBeOutside: I,
21027
- shouldLabelBeInside: P,
21028
- getBaseProps: T,
21029
- getLabelProps: D,
21030
- getInputProps: C,
21031
- getInnerWrapperProps: R,
21032
- getInputWrapperProps: $,
21033
- getDescriptionProps: j
21026
+ Component: v,
21027
+ label: y,
21028
+ domRef: x,
21029
+ startContent: I,
21030
+ shouldLabelBeOutside: P,
21031
+ shouldLabelBeInside: T,
21032
+ getBaseProps: D,
21033
+ getLabelProps: C,
21034
+ getInputProps: R,
21035
+ getInnerWrapperProps: $,
21036
+ getInputWrapperProps: j,
21037
+ getDescriptionProps: F
21034
21038
  } = K9({
21035
- ...l,
21039
+ ...c,
21036
21040
  disabled: e,
21037
21041
  labelPlacement: "outside",
21038
- ref: c,
21042
+ ref: u,
21039
21043
  classNames: {
21040
- input: f({ disabled: e, isDatePicker: t }),
21041
- inputWrapper: p({
21044
+ input: p({ disabled: e, isDatePicker: t }),
21045
+ inputWrapper: m({
21042
21046
  isInvalid: n,
21043
21047
  isValid: r,
21044
21048
  disabled: e,
21045
21049
  isDatePicker: t
21046
21050
  }),
21047
- base: u({
21051
+ base: d({
21048
21052
  isInvalid: n,
21049
21053
  isValid: r,
21050
21054
  disabled: e,
21051
- className: o
21055
+ className: a
21052
21056
  }),
21053
- label: d({ isInvalid: n, isValid: r, disabled: e }),
21054
- description: m({ isInvalid: n, isValid: r })
21057
+ label: f({ isInvalid: n, isValid: r, disabled: e, isRequired: o }),
21058
+ description: h({ isInvalid: n, isValid: r })
21055
21059
  }
21056
- }), F = /* @__PURE__ */ S.jsx("label", { ...D(), children: v }), A = se.useMemo(() => x || a ? /* @__PURE__ */ S.jsxs("div", { ...R(), children: [
21057
- x,
21058
- /* @__PURE__ */ S.jsx("input", { ...C() }),
21059
- a && (typeof a == "string" ? /* @__PURE__ */ S.jsx(
21060
+ }), A = /* @__PURE__ */ S.jsx("label", { ...C(), children: y }), N = se.useMemo(() => I || i ? /* @__PURE__ */ S.jsxs("div", { ...$(), children: [
21061
+ I,
21062
+ /* @__PURE__ */ S.jsx("input", { ...R() }),
21063
+ i && (typeof i == "string" ? /* @__PURE__ */ S.jsx(
21060
21064
  lt,
21061
21065
  {
21062
- onClick: s,
21063
- name: a,
21064
- className: h({ iconAction: !!s })
21066
+ onClick: l,
21067
+ name: i,
21068
+ className: g({ iconAction: !!l })
21065
21069
  }
21066
- ) : a)
21067
- ] }) : /* @__PURE__ */ S.jsx("input", { ...C() }), [
21068
- x,
21069
- s,
21070
- h,
21071
- a,
21072
- C,
21073
- R
21070
+ ) : i)
21071
+ ] }) : /* @__PURE__ */ S.jsx("input", { ...R() }), [
21072
+ I,
21073
+ l,
21074
+ g,
21075
+ i,
21076
+ R,
21077
+ $
21074
21078
  ]);
21075
- return /* @__PURE__ */ S.jsx("div", { className: "w-full", children: /* @__PURE__ */ S.jsxs(g, { ...T(), children: [
21076
- I ? F : null,
21079
+ return /* @__PURE__ */ S.jsx("div", { className: "w-full", children: /* @__PURE__ */ S.jsxs(v, { ...D(), children: [
21080
+ P ? A : null,
21077
21081
  /* @__PURE__ */ S.jsxs(
21078
21082
  "div",
21079
21083
  {
21080
- ...$(),
21084
+ ...j(),
21081
21085
  role: "button",
21082
21086
  onClick: () => {
21083
- var N;
21084
- (N = y.current) == null || N.focus();
21087
+ var V;
21088
+ (V = x.current) == null || V.focus();
21085
21089
  },
21086
21090
  children: [
21087
- P ? F : null,
21088
- A
21091
+ T ? A : null,
21092
+ N
21089
21093
  ]
21090
21094
  }
21091
21095
  ),
21092
- i && /* @__PURE__ */ S.jsx("div", { ...j(), children: i })
21096
+ s && /* @__PURE__ */ S.jsx("div", { ...F(), children: s })
21093
21097
  ] }) });
21094
21098
  }
21095
21099
  ), ID = Ie(
@@ -30837,7 +30841,7 @@ const rD = ({
30837
30841
  }
30838
30842
  }
30839
30843
  }), h = be({
30840
- base: "absolute bottom-0 right-0 mb-3 mr-4 font-inter text-xs font-normal leading-normal text-primary-grey-800",
30844
+ base: "absolute bottom-3 right-3 font-inter text-xs font-normal leading-normal text-primary-grey-800",
30841
30845
  variants: {
30842
30846
  isInvalid: {
30843
30847
  true: "text-complementary-red-500"
@@ -30847,7 +30851,7 @@ const rD = ({
30847
30851
  }
30848
30852
  }
30849
30853
  }), g = be({
30850
- base: "mt-[5px] pl-3 font-inter text-xs font-normal leading-normal text-primary-grey-800",
30854
+ base: "pl-3 font-inter text-xs font-normal leading-normal text-primary-grey-800",
30851
30855
  variants: {
30852
30856
  isInvalid: {
30853
30857
  true: "text-complementary-red-500"
@@ -30857,7 +30861,7 @@ const rD = ({
30857
30861
  }
30858
30862
  }
30859
30863
  });
30860
- return /* @__PURE__ */ S.jsxs(S.Fragment, { children: [
30864
+ return /* @__PURE__ */ S.jsxs("div", { className: "flex flex-col", children: [
30861
30865
  /* @__PURE__ */ S.jsxs("div", { className: f(), children: [
30862
30866
  /* @__PURE__ */ S.jsx(
30863
30867
  "textarea",