mainstack-design-system 0.3.4 → 0.3.6

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.
@@ -63735,7 +63735,9 @@ const Xue = ({
63735
63735
  fontFamily: b,
63736
63736
  ...x
63737
63737
  }) => {
63738
- const [_, T] = Et(0), [k, M] = Et(!1), L = (I) => {
63738
+ const [_, T] = Et(
63739
+ (i == null ? void 0 : i.length) ?? (d == null ? void 0 : d.length) ?? 0
63740
+ ), [k, M] = Et(!1), L = (I) => {
63739
63741
  var O;
63740
63742
  const E = (O = I == null ? void 0 : I.target) == null ? void 0 : O.value;
63741
63743
  T(E.length), E.length > (v || 200) ? M(!0) : M(!1);
@@ -64874,9 +64876,11 @@ const t6e = ({
64874
64876
  handleChangeCoverImage: d,
64875
64877
  multiImagePopover: c,
64876
64878
  accept: m,
64877
- ...p
64879
+ canUploadMultiple: p = !0,
64880
+ uploadText: v,
64881
+ ...g
64878
64882
  }) => {
64879
- const v = Lt(null), [g] = Cb("(max-width: 767px)");
64883
+ const y = Lt(null), [b] = Cb("(max-width: 767px)");
64880
64884
  return /* @__PURE__ */ Q(tr, { children: [
64881
64885
  /* @__PURE__ */ f(pb, { templateColumns: "repeat(5, 1fr)", gap: "16px", children: a.length > 0 ? /* @__PURE__ */ f(Kg, { colSpan: 5, children: /* @__PURE__ */ f(
64882
64886
  n1,
@@ -64894,7 +64898,7 @@ const t6e = ({
64894
64898
  p: "24px",
64895
64899
  aspectRatio: 764 / 574,
64896
64900
  position: "relative",
64897
- ...p,
64901
+ ...g,
64898
64902
  children: e ? /* @__PURE__ */ f(
64899
64903
  $i,
64900
64904
  {
@@ -64930,9 +64934,9 @@ const t6e = ({
64930
64934
  /* @__PURE__ */ f(mf, {}),
64931
64935
  /* @__PURE__ */ f(Xs, { size: "6xs", lineHeight: "20px", children: "Change image" })
64932
64936
  ] }),
64933
- onClick: (y) => {
64934
- var b;
64935
- y.preventDefault(), (b = v.current) == null || b.click();
64937
+ onClick: (x) => {
64938
+ var _;
64939
+ x.preventDefault(), (_ = y.current) == null || _.click();
64936
64940
  }
64937
64941
  }
64938
64942
  ),
@@ -64964,35 +64968,39 @@ const t6e = ({
64964
64968
  _hover: {
64965
64969
  bgColor: oe.gray50
64966
64970
  },
64967
- p: g ? "16px" : "24px",
64971
+ p: b ? "16px" : "24px",
64968
64972
  aspectRatio: 764 / 574,
64969
64973
  position: "relative",
64970
- onClick: (y) => {
64971
- var b;
64972
- y.preventDefault(), (b = v.current) == null || b.click();
64974
+ onClick: (x) => {
64975
+ var _;
64976
+ x.preventDefault(), (_ = y.current) == null || _.click();
64973
64977
  },
64974
- ...p,
64978
+ ...g,
64975
64979
  children: [
64976
- /* @__PURE__ */ f($i, { boxSize: g ? "24px" : "40px", children: /* @__PURE__ */ f(mf, { fontSize: g ? "24px" : "40px" }) }),
64980
+ /* @__PURE__ */ f($i, { boxSize: b ? "24px" : "40px", children: /* @__PURE__ */ f(mf, { fontSize: b ? "24px" : "40px" }) }),
64977
64981
  /* @__PURE__ */ f(
64978
64982
  Xs,
64979
64983
  {
64980
- size: g ? "5xs" : "4xs",
64981
- mt: g ? "12px" : "24px",
64982
- children: "Drop your product images here."
64984
+ size: b ? "5xs" : "4xs",
64985
+ mt: b ? "12px" : "24px",
64986
+ children: v ?? "Drop your product images here."
64983
64987
  }
64984
64988
  ),
64985
- /* @__PURE__ */ f(
64989
+ /* @__PURE__ */ Q(
64986
64990
  Ya,
64987
64991
  {
64988
- size: g ? "xxs" : "xs",
64992
+ size: b ? "xxs" : "xs",
64989
64993
  color: oe.gray400,
64990
64994
  textAlign: "center",
64991
64995
  mt: "10px",
64992
- children: "1600 *1200 (4:3) recommended, up to 10MB each. You can add up-to 5 photos"
64996
+ children: [
64997
+ "1600 *1200 (4:3) recommended, up to 10MB",
64998
+ p && ` each. You can add up-to
64999
+ 5 photos`
65000
+ ]
64993
65001
  }
64994
65002
  ),
64995
- /* @__PURE__ */ f(v1, { position: "absolute", bottom: g ? "16px" : "24px", children: /* @__PURE__ */ f(
65003
+ /* @__PURE__ */ f(v1, { position: "absolute", bottom: b ? "16px" : "24px", children: /* @__PURE__ */ f(
64996
65004
  r5,
64997
65005
  {
64998
65006
  size: "small",
@@ -65010,16 +65018,16 @@ const t6e = ({
65010
65018
  e && /* @__PURE__ */ f(
65011
65019
  yO,
65012
65020
  {
65013
- minChildWidth: g ? "100%" : "140px",
65014
- gap: g ? "8px" : "16px",
65015
- mt: g ? "8px" : "16px",
65016
- children: [1, 2, 3, 4, 5].map((y, b) => /* @__PURE__ */ f(tr, { children: /* @__PURE__ */ f(
65021
+ minChildWidth: b ? "100%" : "140px",
65022
+ gap: b ? "8px" : "16px",
65023
+ mt: b ? "8px" : "16px",
65024
+ children: [1, 2, 3, 4, 5].map((x, _) => /* @__PURE__ */ f(tr, { children: /* @__PURE__ */ f(
65017
65025
  $i,
65018
65026
  {
65019
- borderRadius: g ? "16px" : "12px",
65027
+ borderRadius: b ? "16px" : "12px",
65020
65028
  aspectRatio: 764 / 574,
65021
- bgImage: a[b],
65022
- outline: a[b] ? "1px solid" : "1px dashed",
65029
+ bgImage: a[_],
65030
+ outline: a[_] ? "1px solid" : "1px dashed",
65023
65031
  outlineColor: oe.gray50,
65024
65032
  bgSize: "cover",
65025
65033
  bgPosition: "center",
@@ -65027,15 +65035,15 @@ const t6e = ({
65027
65035
  position: "relative",
65028
65036
  _hover: {
65029
65037
  outline: "3px solid",
65030
- outlineColor: a[b] ? oe.white100 : oe.black300,
65031
- bgColor: a[b] ? oe.white100 : oe.gray50
65038
+ outlineColor: a[_] ? oe.white100 : oe.black300,
65039
+ bgColor: a[_] ? oe.white100 : oe.gray50
65032
65040
  },
65033
- children: a[b] ? /* @__PURE__ */ f(v1, { position: "absolute", top: "8px", right: "8px", children: /* @__PURE__ */ Q(Tb, { placement: "bottom-end", children: [
65041
+ children: a[_] ? /* @__PURE__ */ f(v1, { position: "absolute", top: "8px", right: "8px", children: /* @__PURE__ */ Q(Tb, { placement: "bottom-end", children: [
65034
65042
  /* @__PURE__ */ f(_b, { children: /* @__PURE__ */ f(
65035
65043
  Sh,
65036
65044
  {
65037
65045
  bg: oe.white100,
65038
- size: g ? "24px" : "32px",
65046
+ size: b ? "24px" : "32px",
65039
65047
  cursor: "pointer",
65040
65048
  children: /* @__PURE__ */ f(GO, {})
65041
65049
  }
@@ -65056,7 +65064,7 @@ const t6e = ({
65056
65064
  alignItems: "center",
65057
65065
  gap: "8px",
65058
65066
  p: "14px",
65059
- onClick: () => d && d(b),
65067
+ onClick: () => d && d(_),
65060
65068
  children: [
65061
65069
  /* @__PURE__ */ f($i, { children: /* @__PURE__ */ f(nne, { fill: "red" }) }),
65062
65070
  /* @__PURE__ */ f(Xs, { size: "6xs", children: "Make cover image" })
@@ -65071,7 +65079,7 @@ const t6e = ({
65071
65079
  gap: "8px",
65072
65080
  p: "14px",
65073
65081
  onClick: () => {
65074
- d && l && (d(0), l(b));
65082
+ d && l && (d(0), l(_));
65075
65083
  },
65076
65084
  children: [
65077
65085
  /* @__PURE__ */ f(ry, {}),
@@ -65086,15 +65094,15 @@ const t6e = ({
65086
65094
  $i,
65087
65095
  {
65088
65096
  cursor: "pointer",
65089
- onClick: (x) => {
65090
- var _;
65091
- x.preventDefault(), (_ = v.current) == null || _.click();
65097
+ onClick: (T) => {
65098
+ var k;
65099
+ T.preventDefault(), (k = y.current) == null || k.click();
65092
65100
  },
65093
65101
  children: /* @__PURE__ */ f(Y1e, { fontSize: "24px" })
65094
65102
  }
65095
65103
  )
65096
65104
  },
65097
- b
65105
+ _
65098
65106
  ) }))
65099
65107
  }
65100
65108
  ),
@@ -65106,7 +65114,7 @@ const t6e = ({
65106
65114
  multiple: e,
65107
65115
  id: "inputFile",
65108
65116
  style: { display: "none" },
65109
- ref: v,
65117
+ ref: y,
65110
65118
  onChange: n
65111
65119
  }
65112
65120
  )
@@ -9,6 +9,8 @@ export interface IImageUpload {
9
9
  handleDeleteImage?: (e: any) => void;
10
10
  handleChangeCoverImage?: (e: any) => void;
11
11
  accept?: string;
12
+ uploadText?: string;
13
+ canUploadMultiple?: boolean;
12
14
  }
13
- declare const ImageUploader: ({ multiple, onHandleChange, imageArray, coverImageIndex, handleDeleteImage, handleChangeCoverImage, multiImagePopover, accept, ...props }: IImageUpload) => import("react/jsx-runtime").JSX.Element;
15
+ declare const ImageUploader: ({ multiple, onHandleChange, imageArray, coverImageIndex, handleDeleteImage, handleChangeCoverImage, multiImagePopover, accept, canUploadMultiple, uploadText, ...props }: IImageUpload) => import("react/jsx-runtime").JSX.Element;
14
16
  export default ImageUploader;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mainstack-design-system",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "type": "module",
5
5
  "main": "build/mainstack-design-system.js",
6
6
  "types": "build/src/index.d.ts",