@dgshahr/ui-kit 0.0.79 → 0.0.81

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.
Files changed (116) hide show
  1. package/dist/Accordion/index.cjs +1 -1
  2. package/dist/Accordion/index.js +1 -1
  3. package/dist/AccordionItem-BYDG8XVW.cjs +1 -0
  4. package/dist/{AccordionItem-BBAVaF6W.js → AccordionItem-DhYhZ3vW.js} +1 -1
  5. package/dist/Alert/index.cjs +1 -1
  6. package/dist/Alert/index.js +1 -1
  7. package/dist/Breadcrumb/index.cjs +1 -1
  8. package/dist/Breadcrumb/index.d.ts.map +1 -1
  9. package/dist/Breadcrumb/index.js +1 -1
  10. package/dist/Drawer/index.cjs +1 -1
  11. package/dist/Drawer/index.js +1 -1
  12. package/dist/Form/Common/FieldBottomInfo/FieldBottomInfo.d.ts +11 -0
  13. package/dist/Form/Common/FieldBottomInfo/FieldBottomInfo.d.ts.map +1 -0
  14. package/dist/Form/Common/FieldLabel/FieldLabel.d.ts +14 -0
  15. package/dist/Form/Common/FieldLabel/FieldLabel.d.ts.map +1 -0
  16. package/dist/Form/Datepicker/Days.d.ts.map +1 -1
  17. package/dist/Form/Datepicker/Header.d.ts.map +1 -1
  18. package/dist/Form/Datepicker/Months.d.ts.map +1 -1
  19. package/dist/Form/Datepicker/Years.d.ts.map +1 -1
  20. package/dist/Form/Datepicker/index.cjs +1 -1
  21. package/dist/Form/Datepicker/index.js +41 -37
  22. package/dist/Form/FileUploader/FileUploader.d.ts +5 -0
  23. package/dist/Form/FileUploader/FileUploader.d.ts.map +1 -0
  24. package/dist/Form/FileUploader/Input/FileInput.d.ts +8 -0
  25. package/dist/Form/FileUploader/Input/FileInput.d.ts.map +1 -0
  26. package/dist/Form/FileUploader/Input/FileInputIcon.d.ts +4 -0
  27. package/dist/Form/FileUploader/Input/FileInputIcon.d.ts.map +1 -0
  28. package/dist/Form/FileUploader/Preview/FilePreview.d.ts +10 -0
  29. package/dist/Form/FileUploader/Preview/FilePreview.d.ts.map +1 -0
  30. package/dist/Form/FileUploader/Preview/MultipleMode/Grid/GridTypePreview.d.ts +6 -0
  31. package/dist/Form/FileUploader/Preview/MultipleMode/Grid/GridTypePreview.d.ts.map +1 -0
  32. package/dist/Form/FileUploader/Preview/MultipleMode/List/ListTypePreview.d.ts +6 -0
  33. package/dist/Form/FileUploader/Preview/MultipleMode/List/ListTypePreview.d.ts.map +1 -0
  34. package/dist/Form/FileUploader/Preview/MultipleMode/MultipleModePreveiw.d.ts +6 -0
  35. package/dist/Form/FileUploader/Preview/MultipleMode/MultipleModePreveiw.d.ts.map +1 -0
  36. package/dist/Form/FileUploader/Preview/SingleMode/SingleModePreview.d.ts +7 -0
  37. package/dist/Form/FileUploader/Preview/SingleMode/SingleModePreview.d.ts.map +1 -0
  38. package/dist/Form/FileUploader/Preview/types.d.ts +5 -0
  39. package/dist/Form/FileUploader/Preview/types.d.ts.map +1 -0
  40. package/dist/Form/FileUploader/Preview/utils.d.ts +7 -0
  41. package/dist/Form/FileUploader/Preview/utils.d.ts.map +1 -0
  42. package/dist/Form/FileUploader/constants.d.ts +10 -0
  43. package/dist/Form/FileUploader/constants.d.ts.map +1 -0
  44. package/dist/Form/FileUploader/index.d.ts +4 -0
  45. package/dist/Form/FileUploader/index.d.ts.map +1 -0
  46. package/dist/Form/FileUploader/types.d.ts +51 -0
  47. package/dist/Form/FileUploader/types.d.ts.map +1 -0
  48. package/dist/Form/Input/index.cjs +1 -1
  49. package/dist/Form/Input/index.d.ts.map +1 -1
  50. package/dist/Form/Input/index.js +7 -190
  51. package/dist/Form/OtpInput/index.cjs +1 -1
  52. package/dist/Form/OtpInput/index.d.ts.map +1 -1
  53. package/dist/Form/OtpInput/index.js +20 -20
  54. package/dist/Form/Select/OptionItem.d.ts.map +1 -1
  55. package/dist/Form/Select/Options.d.ts.map +1 -1
  56. package/dist/Form/Select/index.cjs +1 -1
  57. package/dist/Form/Select/index.js +4 -2
  58. package/dist/Form/Switch/index.cjs +1 -0
  59. package/dist/Form/Switch/index.d.ts +15 -0
  60. package/dist/Form/Switch/index.d.ts.map +1 -0
  61. package/dist/Form/Switch/index.js +84 -0
  62. package/dist/Form/Textarea/index.cjs +1 -1
  63. package/dist/Form/Textarea/index.js +1 -1
  64. package/dist/Form/Wrappers/PickerWrapper/PickerWrapper.d.ts.map +1 -1
  65. package/dist/Form/Wrappers/TextFieldWrapper/TextFieldWrapper.d.ts +4 -13
  66. package/dist/Form/Wrappers/TextFieldWrapper/TextFieldWrapper.d.ts.map +1 -1
  67. package/dist/{ArrowDown2-CMeKw_vj.js → IconArrowDown2-7ddwV5IE.js} +1 -1
  68. package/dist/{ArrowDown2-O11Hxz6e.cjs → IconArrowDown2-C1dLVveG.cjs} +1 -1
  69. package/dist/{ArrowLeft2-B76dkC-C.cjs → IconArrowLeft2-CNA3H0xY.cjs} +1 -1
  70. package/dist/{ArrowLeft2-jP2w1vwt.js → IconArrowLeft2-cxcPyDqS.js} +1 -1
  71. package/dist/{ArrowRight2-CcHdxGRE.js → IconArrowRight2-BoXg0Gkw.js} +1 -1
  72. package/dist/{ArrowRight2-CYowPzS8.cjs → IconArrowRight2-CF_bdH81.cjs} +1 -1
  73. package/dist/{CloseRemove-BzqPxkjk.js → IconCloseRemove-BPEWBqGA.js} +1 -1
  74. package/dist/{CloseRemove-BUG0Hjfl.cjs → IconCloseRemove-DwCc4o3b.cjs} +1 -1
  75. package/dist/Pagination/index.cjs +1 -1
  76. package/dist/Pagination/index.js +8 -8
  77. package/dist/PickerWrapper-CWSAzbwY.cjs +1 -0
  78. package/dist/{PickerWrapper-EWtj7K7M.js → PickerWrapper-ChkVx96j.js} +25 -24
  79. package/dist/Progress/Doughnut/index.cjs +1 -0
  80. package/dist/Progress/Doughnut/index.d.ts +5 -0
  81. package/dist/Progress/Doughnut/index.d.ts.map +1 -0
  82. package/dist/Progress/Doughnut/index.js +85 -0
  83. package/dist/Progress/Doughnut/types.d.ts +21 -0
  84. package/dist/Progress/Doughnut/types.d.ts.map +1 -0
  85. package/dist/Slide-BhtrgZAI.cjs +1 -0
  86. package/dist/{Slide-DsdG_6vc.js → Slide-CFSk8Dlg.js} +13 -13
  87. package/dist/Slider/index.cjs +1 -1
  88. package/dist/Slider/index.js +1 -1
  89. package/dist/Step-CcJeR_kj.cjs +1 -0
  90. package/dist/Step-pWxkk9vq.js +159 -0
  91. package/dist/Stepper/Horizontal/Step.d.ts +3 -0
  92. package/dist/Stepper/Horizontal/Step.d.ts.map +1 -1
  93. package/dist/Stepper/Horizontal/Stepper.d.ts +1 -0
  94. package/dist/Stepper/Horizontal/Stepper.d.ts.map +1 -1
  95. package/dist/Stepper/Horizontal/index.cjs +1 -1
  96. package/dist/Stepper/Horizontal/index.js +1 -1
  97. package/dist/{TextFieldWrapper-Crap8mNo.js → TextFieldWrapper-BJEouM80.js} +53 -53
  98. package/dist/TextFieldWrapper-BrWmggFz.cjs +1 -0
  99. package/dist/assets/styles.css +1 -1
  100. package/dist/index-BctRb68z.cjs +1 -0
  101. package/dist/index-CXKbrGQV.js +194 -0
  102. package/dist/index.cjs +1 -1
  103. package/dist/index.d.ts +2 -0
  104. package/dist/index.d.ts.map +1 -1
  105. package/dist/index.js +650 -45
  106. package/package.json +31 -1
  107. package/dist/AccordionItem-CpjwOEDp.cjs +0 -1
  108. package/dist/Form/Wrappers/TextFieldWrapper/FieldBottomInfo.d.ts +0 -9
  109. package/dist/Form/Wrappers/TextFieldWrapper/FieldBottomInfo.d.ts.map +0 -1
  110. package/dist/Form/Wrappers/TextFieldWrapper/FieldLabel.d.ts +0 -9
  111. package/dist/Form/Wrappers/TextFieldWrapper/FieldLabel.d.ts.map +0 -1
  112. package/dist/PickerWrapper-CY7PJM50.cjs +0 -1
  113. package/dist/Slide-aMCvZQnM.cjs +0 -1
  114. package/dist/Step-CZp-RQhJ.js +0 -129
  115. package/dist/Step-CtqJxQMY.cjs +0 -1
  116. package/dist/TextFieldWrapper-CmSiS8zD.cjs +0 -1
@@ -1,11 +1,11 @@
1
1
  import { jsx as h, jsxs as N, Fragment as vt } from "react/jsx-runtime";
2
- import { c as V } from "../../clsx-OuTLNxxd.js";
2
+ import { c as A } from "../../clsx-OuTLNxxd.js";
3
3
  import { createContext as Nt, useState as ot, useContext as Wt } from "react";
4
4
  import $ from "../../Button/index.js";
5
- import { u as Yt, P as St } from "../../PickerWrapper-EWtj7K7M.js";
6
- import { A as Tt } from "../../ArrowDown2-CMeKw_vj.js";
7
- import { A as Ct } from "../../ArrowLeft2-jP2w1vwt.js";
8
- import { A as Et } from "../../ArrowRight2-CcHdxGRE.js";
5
+ import { u as Yt, P as St } from "../../PickerWrapper-ChkVx96j.js";
6
+ import { I as Tt } from "../../IconArrowDown2-7ddwV5IE.js";
7
+ import { I as Ct } from "../../IconArrowLeft2-cxcPyDqS.js";
8
+ import { I as Et } from "../../IconArrowRight2-BoXg0Gkw.js";
9
9
  import '../../assets/styles.css';/* empty css */
10
10
  const Ft = {
11
11
  lessThanXSeconds: {
@@ -80,12 +80,12 @@ function G(t) {
80
80
  return t.formats[n] || t.formats[t.defaultWidth];
81
81
  };
82
82
  }
83
- const Ht = {
83
+ const It = {
84
84
  full: "EEEE do MMMM y",
85
85
  long: "do MMMM y",
86
86
  medium: "d MMM y",
87
87
  short: "yyyy/MM/dd"
88
- }, It = {
88
+ }, Ht = {
89
89
  full: "h:mm:ss a zzzz",
90
90
  long: "h:mm:ss a z",
91
91
  medium: "h:mm:ss a",
@@ -97,11 +97,11 @@ const Ht = {
97
97
  short: "{{date}}, {{time}}"
98
98
  }, qt = {
99
99
  date: G({
100
- formats: Ht,
100
+ formats: It,
101
101
  defaultWidth: "full"
102
102
  }),
103
103
  time: G({
104
- formats: It,
104
+ formats: Ht,
105
105
  defaultWidth: "full"
106
106
  }),
107
107
  dateTime: G({
@@ -234,7 +234,7 @@ const Bt = {
234
234
  evening: "عصر",
235
235
  night: "شب"
236
236
  }
237
- }, At = {
237
+ }, Vt = {
238
238
  narrow: {
239
239
  am: "ق",
240
240
  pm: "ب",
@@ -265,8 +265,8 @@ const Bt = {
265
265
  evening: "عصر",
266
266
  night: "شب"
267
267
  }
268
- }, Vt = (t, e) => Number(t) + "-ام", zt = {
269
- ordinalNumber: Vt,
268
+ }, At = (t, e) => Number(t) + "-ام", zt = {
269
+ ordinalNumber: At,
270
270
  era: C({
271
271
  values: Bt,
272
272
  defaultWidth: "wide"
@@ -287,7 +287,7 @@ const Bt = {
287
287
  dayPeriod: C({
288
288
  values: Gt,
289
289
  defaultWidth: "wide",
290
- formattingValues: At,
290
+ formattingValues: Vt,
291
291
  defaultFormattingWidth: "wide"
292
292
  })
293
293
  };
@@ -558,7 +558,7 @@ function ut(t) {
558
558
  );
559
559
  return n.setUTCFullYear(e.getFullYear()), +t - +n;
560
560
  }
561
- function H(t, ...e) {
561
+ function I(t, ...e) {
562
562
  const n = w.bind(
563
563
  null,
564
564
  e.find((r) => typeof r == "object")
@@ -570,7 +570,7 @@ function q(t, e) {
570
570
  return n.setHours(0, 0, 0, 0), n;
571
571
  }
572
572
  function Me(t, e, n) {
573
- const [r, i] = H(
573
+ const [r, i] = I(
574
574
  n?.in,
575
575
  t,
576
576
  e
@@ -1272,16 +1272,16 @@ function _e(t, e, n) {
1272
1272
  const r = t[0] === "Y" ? "years" : "days of the month";
1273
1273
  return `Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
1274
1274
  }
1275
- function He(t) {
1275
+ function Ie(t) {
1276
1276
  return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
1277
1277
  }
1278
- function Ie(t) {
1279
- return !(!He(t) && typeof t != "number" || isNaN(+f(t)));
1278
+ function He(t) {
1279
+ return !(!Ie(t) && typeof t != "number" || isNaN(+f(t)));
1280
1280
  }
1281
1281
  const $e = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, qe = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, je = /^'([^]*?)'?$/, Re = /''/g, Be = /[a-zA-Z]/;
1282
1282
  function b(t, e, n) {
1283
1283
  const r = _(), i = r.locale ?? le, a = r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, s = r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 6, c = f(t, n?.in);
1284
- if (!Ie(c))
1284
+ if (!He(c))
1285
1285
  throw new RangeError("Invalid time value");
1286
1286
  let o = e.match(qe).map((u) => {
1287
1287
  const g = u[0];
@@ -1360,10 +1360,10 @@ function J(t, e, n) {
1360
1360
  return isNaN(e) ? w(n?.in || t, NaN) : (e && S(r, x(r) + e), r);
1361
1361
  }
1362
1362
  function Z(t, e) {
1363
- const [n, r] = H(t, e.start, e.end);
1363
+ const [n, r] = I(t, e.start, e.end);
1364
1364
  return { start: n, end: r };
1365
1365
  }
1366
- function A(t, e) {
1366
+ function V(t, e) {
1367
1367
  const { start: n, end: r } = Z(e?.in, t);
1368
1368
  let i = +n > +r;
1369
1369
  const a = i ? +n : +r, s = i ? r : n;
@@ -1391,8 +1391,8 @@ function tt(t, e) {
1391
1391
  function et(t, e) {
1392
1392
  return +f(t) < +f(e);
1393
1393
  }
1394
- function I(t, e, n) {
1395
- const [r, i] = H(
1394
+ function H(t, e, n) {
1395
+ const [r, i] = I(
1396
1396
  n?.in,
1397
1397
  t,
1398
1398
  e
@@ -1413,15 +1413,15 @@ function B(t, e) {
1413
1413
  function xt(t, e, n) {
1414
1414
  return J(t, -e, n);
1415
1415
  }
1416
- const Ae = ["ش", "ی", "د", "س", "چ", "پ", "ج"];
1417
- function Ve(t) {
1416
+ const Ve = ["ش", "ی", "د", "س", "چ", "پ", "ج"];
1417
+ function Ae(t) {
1418
1418
  let e = [];
1419
- const n = R(t), r = B(t), i = A({
1419
+ const n = R(t), r = B(t), i = V({
1420
1420
  start: B(t),
1421
1421
  end: R(t)
1422
1422
  }).map((c) => ({ date: c, isInMonth: !0 })), a = gt(r), s = gt(n);
1423
1423
  if (a !== 6 ? e = [
1424
- ...A({
1424
+ ...V({
1425
1425
  start: W(r),
1426
1426
  end: xt(r, 1)
1427
1427
  }).map((o) => ({
@@ -1430,7 +1430,7 @@ function Ve(t) {
1430
1430
  })),
1431
1431
  ...i
1432
1432
  ] : e = [...i], s != 5) {
1433
- const c = A({
1433
+ const c = V({
1434
1434
  start: J(n, 1),
1435
1435
  end: Ge(n)
1436
1436
  }).map((o) => ({
@@ -1451,15 +1451,15 @@ function ze({
1451
1451
  }) {
1452
1452
  const s = e || n;
1453
1453
  if (!s) return "dgs-ui-kit-pointer-events-none";
1454
- const c = I(/* @__PURE__ */ new Date(), t), o = (i ? tt(t, i) : !0) && (a ? et(t, a) : !0), l = "!dgs-ui-kit-bg-primary-500 !dgs-ui-kit-text-white dgs-ui-kit-border-none";
1454
+ const c = H(/* @__PURE__ */ new Date(), t), o = (i ? tt(t, i) : !0) && (a ? et(t, a) : !0), l = "!dgs-ui-kit-bg-primary-500 !dgs-ui-kit-text-white dgs-ui-kit-border-none";
1455
1455
  let u = "dgs-ui-kit-py-1 dgs-ui-kit-rounded-2xl dgs-ui-kit-transition hover:dgs-ui-kit-bg-primary-50 hover:dgs-ui-kit-text-primary-500";
1456
- return c && (u = `${u} dgs-ui-kit-border dgs-ui-kit-border-primary-300`), !e && s ? u = `${u} dgs-ui-kit-text-gray-400` : u = `${u} dgs-ui-kit-text-gray-600`, o || (u = `${u} dgs-ui-kit-line-through dgs-ui-kit-pointer-events-none`), r instanceof Date ? I(r, t) && (u = `${u} ${l}`) : r.start && I(r.start, t) ? u = `${u} dgs-ui-kit-rounded-l-none ${l}` : r.end && I(r.end, t) ? u = `${u} dgs-ui-kit-rounded-r-none ${l}` : r.start && r.end && nt(t, {
1456
+ return c && (u = `${u} dgs-ui-kit-border dgs-ui-kit-border-primary-300`), !e && s ? u = `${u} dgs-ui-kit-text-gray-400` : u = `${u} dgs-ui-kit-text-gray-600`, o || (u = `${u} dgs-ui-kit-line-through dgs-ui-kit-pointer-events-none`), r instanceof Date ? H(r, t) && (u = `${u} ${l}`) : r.start && H(r.start, t) ? u = `${u} dgs-ui-kit-rounded-l-none ${l}` : r.end && H(r.end, t) ? u = `${u} dgs-ui-kit-rounded-r-none ${l}` : r.start && r.end && nt(t, {
1457
1457
  start: r.start,
1458
1458
  end: r.end
1459
1459
  }) && (u = `${u} dgs-ui-kit-rounded-none dgs-ui-kit-border-none dgs-ui-kit-bg-primary-50 dgs-ui-kit-text-primary-500`), u;
1460
1460
  }
1461
1461
  const Ke = () => {
1462
- const { internalDate: t, datepickerProps: e } = T(), { showExtraDays: n, onChange: r, acceptRange: i, value: a } = e, s = Ve(t);
1462
+ const { internalDate: t, datepickerProps: e } = T(), { showExtraDays: n, onChange: r, acceptRange: i, value: a } = e, s = Ae(t);
1463
1463
  function c(o) {
1464
1464
  i ? !a.start || a.end ? r({ start: o, end: null }) : r({
1465
1465
  start: a.start,
@@ -1467,10 +1467,11 @@ const Ke = () => {
1467
1467
  }) : r(o);
1468
1468
  }
1469
1469
  return /* @__PURE__ */ N(vt, { children: [
1470
- /* @__PURE__ */ h("div", { className: "dgs-ui-kit-bg-gray-50 dgs-ui-kit-p-3 dgs-ui-kit-font-button-small dgs-ui-kit-text-gray-600 dgs-ui-kit-text-center dgs-ui-kit-grid dgs-ui-kit-grid-rows-1 dgs-ui-kit-grid-cols-7", children: Ae.map((o) => /* @__PURE__ */ h("span", { children: o }, o)) }),
1470
+ /* @__PURE__ */ h("div", { className: "dgs-ui-kit-bg-gray-50 dgs-ui-kit-p-3 dgs-ui-kit-font-button-small dgs-ui-kit-text-gray-600 dgs-ui-kit-text-center dgs-ui-kit-grid dgs-ui-kit-grid-rows-1 dgs-ui-kit-grid-cols-7", children: Ve.map((o) => /* @__PURE__ */ h("span", { children: o }, o)) }),
1471
1471
  /* @__PURE__ */ h("div", { className: "dgs-ui-kit-grid dgs-ui-kit-grid-cols-7 dgs-ui-kit-text-center dgs-ui-kit-font-p3-medium ss02 dgs-ui-kit-p-3 dgs-ui-kit-gap-y-2", children: s.map((o) => /* @__PURE__ */ h(
1472
1472
  "button",
1473
1473
  {
1474
+ type: "button",
1474
1475
  className: ze({ ...o, ...e }),
1475
1476
  onClick: () => c(o.date),
1476
1477
  children: o.isInMonth || n ? b(o.date, "d") : ""
@@ -1499,7 +1500,7 @@ function K(t, e) {
1499
1500
  return P(n, r + 1, 0, 0), n.setHours(23, 59, 59, 999), n;
1500
1501
  }
1501
1502
  function L(t, e, n) {
1502
- const [r, i] = H(
1503
+ const [r, i] = I(
1503
1504
  n?.in,
1504
1505
  t,
1505
1506
  e
@@ -1527,6 +1528,7 @@ const Ze = () => {
1527
1528
  }).map((a) => /* @__PURE__ */ h(
1528
1529
  "button",
1529
1530
  {
1531
+ type: "button",
1530
1532
  className: Je({ month: a, ...e }),
1531
1533
  onClick: () => i(a),
1532
1534
  children: b(a, "MMMM")
@@ -1546,7 +1548,7 @@ function tn(t, e) {
1546
1548
  return i ? o.reverse() : o;
1547
1549
  }
1548
1550
  function X(t, e, n) {
1549
- const [r, i] = H(
1551
+ const [r, i] = I(
1550
1552
  n?.in,
1551
1553
  t,
1552
1554
  e
@@ -1590,6 +1592,7 @@ const an = () => {
1590
1592
  }).map((a) => /* @__PURE__ */ h(
1591
1593
  "button",
1592
1594
  {
1595
+ type: "button",
1593
1596
  onClick: () => i(a),
1594
1597
  className: rn({ year: a, ...r }),
1595
1598
  children: b(a, "yyyy")
@@ -1613,7 +1616,7 @@ const an = () => {
1613
1616
  return /* @__PURE__ */ N(
1614
1617
  "div",
1615
1618
  {
1616
- className: V(
1619
+ className: A(
1617
1620
  "dgs-ui-kit-flex dgs-ui-kit-p-3 dgs-ui-kit-items-center dgs-ui-kit-border-t dgs-ui-kit-border-gray-200 dgs-ui-kit-gap-4",
1618
1621
  a ? "dgs-ui-kit-justify-between" : "dgs-ui-kit-justify-end"
1619
1622
  ),
@@ -1736,6 +1739,7 @@ const ln = () => {
1736
1739
  /* @__PURE__ */ N(
1737
1740
  "button",
1738
1741
  {
1742
+ type: "button",
1739
1743
  className: "dgs-ui-kit-bg-gray-100 dgs-ui-kit-rounded-lg dgs-ui-kit-p-3 dgs-ui-kit-min-w-[50%] dgs-ui-kit-flex dgs-ui-kit-justify-between dgs-ui-kit-items-center disabled:dgs-ui-kit-cursor-not-allowed",
1740
1744
  disabled: e === m.Year,
1741
1745
  onClick: () => e !== m.Year && n(e + 1),
@@ -1781,8 +1785,8 @@ const xn = (t) => {
1781
1785
  const { showSubmitButton: e = !0, showTodayButton: n = !0, value: r } = t, i = { ...t };
1782
1786
  return i.dropdownType === "drawer" ? i.drawerProps = {
1783
1787
  ...i.drawerProps,
1784
- containerClassName: V("!dgs-ui-kit-p-0", i.drawerProps?.containerClassName)
1785
- } : i.popoverClassName = V(
1788
+ containerClassName: A("!dgs-ui-kit-p-0", i.drawerProps?.containerClassName)
1789
+ } : i.popoverClassName = A(
1786
1790
  "!dgs-ui-kit-p-0 dgs-ui-kit-max-h-max",
1787
1791
  i.popoverClassName
1788
1792
  ), i.customInput || (i.inputProps = {
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { FileUploaderProps } from './types';
3
+ declare const FileUploader: FC<FileUploaderProps>;
4
+ export default FileUploader;
5
+ //# sourceMappingURL=FileUploader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileUploader.d.ts","sourceRoot":"","sources":["../../../src/components/Form/FileUploader/FileUploader.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAI1C,OAAO,KAAK,EAA8B,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE7E,QAAA,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAwCvC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ import { FileInputProps, FilePreviewProps } from '../types';
3
+ interface Props extends FileInputProps {
4
+ previewtype?: FilePreviewProps['type'];
5
+ }
6
+ declare const FileInput: FC<Props>;
7
+ export default FileInput;
8
+ //# sourceMappingURL=FileInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileInput.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/FileUploader/Input/FileInput.tsx"],"names":[],"mappings":"AACA,OAAO,EAA4B,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAa1D,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAwBjE,UAAU,KAAM,SAAQ,cAAc;IACpC,WAAW,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;CACxC;AAED,QAAA,MAAM,SAAS,EAAE,EAAE,CAAC,KAAK,CAmExB,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ declare const FileInputIcon: FC;
3
+ export default FileInputIcon;
4
+ //# sourceMappingURL=FileInputIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileInputIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/FileUploader/Input/FileInputIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,QAAA,MAAM,aAAa,EAAE,EA4EpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { FileType } from '../types';
3
+ interface FilePreviewProps {
4
+ children?: ReactNode;
5
+ file: FileType;
6
+ className?: string;
7
+ }
8
+ declare const FilePreview: FC<FilePreviewProps>;
9
+ export default FilePreview;
10
+ //# sourceMappingURL=FilePreview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilePreview.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/FileUploader/Preview/FilePreview.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAkB,MAAM,OAAO,CAAC;AAI3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,UAAU,gBAAgB;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAwDrC,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { FC } from 'react';
2
+ import { FileType } from '../../../types';
3
+ import { PreviewProps } from '../../types';
4
+ declare const GridTypePreview: FC<PreviewProps<FileType>>;
5
+ export default GridTypePreview;
6
+ //# sourceMappingURL=GridTypePreview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridTypePreview.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/FileUploader/Preview/MultipleMode/Grid/GridTypePreview.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,QAAA,MAAM,eAAe,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,CAiC/C,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { FC } from 'react';
2
+ import { FileType } from '../../../types';
3
+ import { PreviewProps } from '../../types';
4
+ declare const ListTypePreview: FC<PreviewProps<FileType>>;
5
+ export default ListTypePreview;
6
+ //# sourceMappingURL=ListTypePreview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListTypePreview.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/FileUploader/Preview/MultipleMode/List/ListTypePreview.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAKhC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,QAAA,MAAM,eAAe,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,CAuE/C,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { FC } from 'react';
2
+ import { FileType } from '../../types';
3
+ import { PreviewProps } from '../types';
4
+ declare const MultipleModePreveiw: FC<PreviewProps<FileType[]>>;
5
+ export default MultipleModePreveiw;
6
+ //# sourceMappingURL=MultipleModePreveiw.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MultipleModePreveiw.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/FileUploader/Preview/MultipleMode/MultipleModePreveiw.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAM7C,QAAA,MAAM,mBAAmB,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,CAuBrD,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ import { FileType } from '../../types';
3
+ import { PreviewProps } from '../types';
4
+ export declare function getTitleClass(loading: FileType['loading'], errorMessage: FileType['errorMessage'], status?: FileType['status']): string;
5
+ declare const SingleModePreview: FC<PreviewProps<FileType>>;
6
+ export default SingleModePreview;
7
+ //# sourceMappingURL=SingleModePreview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SingleModePreview.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/FileUploader/Preview/SingleMode/SingleModePreview.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAMhC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAG7C,wBAAgB,aAAa,CAC3B,OAAO,EAAE,QAAQ,CAAC,SAAS,CAAC,EAC5B,YAAY,EAAE,QAAQ,CAAC,cAAc,CAAC,EACtC,MAAM,GAAE,QAAQ,CAAC,QAAQ,CAAa,UAOvC;AAED,QAAA,MAAM,iBAAiB,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,CAmEjD,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { FilePreviewProps, FileType } from '../types';
2
+ export interface PreviewProps<T extends FileType | FileType[]> extends FilePreviewProps {
3
+ files: T;
4
+ }
5
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/FileUploader/Preview/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAE3D,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,QAAQ,GAAG,QAAQ,EAAE,CAAE,SAAQ,gBAAgB;IACrF,KAAK,EAAE,CAAC,CAAC;CACV"}
@@ -0,0 +1,7 @@
1
+ import { ButtonProps } from '../../../Button';
2
+ import { FilePreviewProps, FileType } from '../types';
3
+ export declare function renderPreviewDefaultAction(button: FilePreviewProps['leftButton'], file: FileType, defaults?: Omit<ButtonProps, 'rightIcon' | 'leftIcon'> & {
4
+ icon?: ButtonProps['rightIcon'];
5
+ }): import("react/jsx-runtime").JSX.Element | null;
6
+ export declare function getPreviewBorder(loading: FileType['loading'], status: FileType['status']): string;
7
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/FileUploader/Preview/utils.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAE3D,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,gBAAgB,CAAC,YAAY,CAAC,EACtC,IAAI,EAAE,QAAQ,EACd,QAAQ,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,UAAU,CAAC,GAAG;IACvD,IAAI,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;CACjC,kDAwBF;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,UASxF"}
@@ -0,0 +1,10 @@
1
+ import { FileType } from './types';
2
+ export declare const DEFAULT_SIZE_CLASS = "dgs-ui-kit-h-[190px] dgs-ui-kit-w-[330px]";
3
+ export declare const DEFAULT_GRID_SIZE_CLASS = "dgs-ui-kit-size-[120px]";
4
+ export declare const ABSOLUTE_CENTER = "!dgs-ui-kit-absolute dgs-ui-kit-top-1/2 dgs-ui-kit-left-1/2 -dgs-ui-kit-translate-y-1/2 -dgs-ui-kit-translate-x-1/2";
5
+ export declare const FOCUS_CLASS = "dgs-ui-kit-ring-offset-1 dgs-ui-kit-ring-offset-transparent has-[:focus]:dgs-ui-kit-ring-offset-white dgs-ui-kit-ring-[3px] dgs-ui-kit-ring-transparent has-[:focus]:dgs-ui-kit-ring-primary-300";
6
+ export declare const ERROR_CLASS = "!dgs-ui-kit-border-error-500 dgs-ui-kit-ring-4 !dgs-ui-kit-ring-error-50";
7
+ export declare const DRAG_CLASS = "!dgs-ui-kit-border-primary-500 dgs-ui-kit-ring-4 !dgs-ui-kit-ring-gray-100 !dgs-ui-kit-bg-gray-50";
8
+ export declare const DISABLED_CLASS = "has-[:disabled]:dgs-ui-kit-opacity-50";
9
+ export declare const TITLE_CLASS: Record<Required<FileType>['status'] | 'loading', string>;
10
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/Form/FileUploader/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,eAAO,MAAM,kBAAkB,8CAA8C,CAAC;AAC9E,eAAO,MAAM,uBAAuB,4BAA4B,CAAC;AACjE,eAAO,MAAM,eAAe,wHAC2F,CAAC;AACxH,eAAO,MAAM,WAAW,qMAC4K,CAAC;AACrM,eAAO,MAAM,WAAW,6EACoD,CAAC;AAC7E,eAAO,MAAM,UAAU,sGAC8E,CAAC;AACtG,eAAO,MAAM,cAAc,0CAA0C,CAAC;AACtE,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,GAAG,SAAS,EAAE,MAAM,CAKhF,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { default as FileUploader } from './FileUploader';
2
+ export default FileUploader;
3
+ export * from './types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Form/FileUploader/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,kBAAkB,CAAC;AAE1B,eAAe,YAAY,CAAC;AAE5B,cAAc,SAAS,CAAC"}
@@ -0,0 +1,51 @@
1
+ import { DetailedHTMLProps, InputHTMLAttributes, MouseEvent } from 'react';
2
+ import { ButtonProps } from '../../Button';
3
+ import { FieldBottomInfoProps } from '../Common/FieldBottomInfo/FieldBottomInfo';
4
+ interface FileTypeBase extends Omit<FieldBottomInfoProps, 'disabled' | 'extraHelper'> {
5
+ file?: File;
6
+ src?: string;
7
+ loading?: boolean | number;
8
+ status?: 'warning' | 'error' | 'default';
9
+ title?: string;
10
+ }
11
+ export type FileType = FileTypeBase & (Required<Pick<FileTypeBase, 'file'>> | Required<Pick<FileTypeBase, 'src'>>);
12
+ interface PreviewCustomButtonInterface extends Omit<ButtonProps, 'onClick'> {
13
+ onClick?: (file: FileType, e: MouseEvent<HTMLButtonElement>) => void;
14
+ }
15
+ export interface FilePreviewProps {
16
+ type?: 'list' | 'grid';
17
+ leftButton?: boolean | PreviewCustomButtonInterface;
18
+ rightButton?: boolean | PreviewCustomButtonInterface;
19
+ exteraButton?: PreviewCustomButtonInterface;
20
+ wrapperClassName?: string;
21
+ previewClassName?: string;
22
+ }
23
+ export interface FileInputProps extends Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, 'type' | 'onChange' | 'onDragEnter' | 'onDragLeave' | 'onDrop'> {
24
+ title?: string;
25
+ description?: string;
26
+ hideIcon?: boolean;
27
+ button?: boolean | ButtonProps;
28
+ isError?: boolean;
29
+ onChange: FileUploaderPropsBase['onChange'];
30
+ helperProps?: Omit<FieldBottomInfoProps, 'disabled'>;
31
+ }
32
+ interface FileUploaderPropsBase {
33
+ fileInputProps?: Omit<FileInputProps, 'isError' | 'disabled' | 'onChange'>;
34
+ isError?: boolean;
35
+ disabled?: boolean;
36
+ onChange: (file: File | undefined) => void;
37
+ className?: string;
38
+ }
39
+ interface FileUploaderSingleMode {
40
+ mode?: 'single';
41
+ files?: FileType;
42
+ previewProps?: Omit<FilePreviewProps, 'type'>;
43
+ }
44
+ interface FileUploaderMultipleMode {
45
+ mode: 'multiple';
46
+ files?: FileType[];
47
+ previewProps?: FilePreviewProps;
48
+ }
49
+ export type FileUploaderProps = FileUploaderPropsBase & (FileUploaderSingleMode | FileUploaderMultipleMode);
50
+ export {};
51
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Form/FileUploader/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEtF,UAAU,YAAa,SAAQ,IAAI,CAAC,oBAAoB,EAAE,UAAU,GAAG,aAAa,CAAC;IACnF,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B,MAAM,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,QAAQ,GAAG,YAAY,GACjC,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;AAE/E,UAAU,4BAA6B,SAAQ,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC;IACzE,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;CACtE;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,GAAG,4BAA4B,CAAC;IACpD,WAAW,CAAC,EAAE,OAAO,GAAG,4BAA4B,CAAC;IACrD,YAAY,CAAC,EAAE,4BAA4B,CAAC;IAC5C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,cACf,SAAQ,IAAI,CACV,iBAAiB,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,EAC1E,MAAM,GAAG,UAAU,GAAG,aAAa,GAAG,aAAa,GAAG,QAAQ,CAC/D;IACD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAC5C,WAAW,CAAC,EAAE,IAAI,CAAC,oBAAoB,EAAE,UAAU,CAAC,CAAC;CACtD;AAED,UAAU,qBAAqB;IAC7B,cAAc,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC,CAAC;IAC3E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,KAAK,IAAI,CAAC;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,sBAAsB;IAC9B,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,YAAY,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;CAC/C;AAED,UAAU,wBAAwB;IAChC,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;IACnB,YAAY,CAAC,EAAE,gBAAgB,CAAC;CACjC;AAED,MAAM,MAAM,iBAAiB,GAAG,qBAAqB,GACnD,CAAC,sBAAsB,GAAG,wBAAwB,CAAC,CAAC"}
@@ -1 +1 @@
1
- "use strict";const e=require("react/jsx-runtime"),g=require("../../clsx-C11secjj.cjs"),h=require("react"),k=require("../../omitObjects-CtiYo0hv.cjs"),C=require("../../TextFieldWrapper-CmSiS8zD.cjs"),y=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24",...t,children:[e.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m15.456 9.595-5.852 5.852-1.061-1.06 5.853-5.853z",clipRule:"evenodd"}),e.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m9.6 8.532 5.856 5.858-1.06 1.06-5.857-5.857z",clipRule:"evenodd"}),e.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12m10-8.5a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17",clipRule:"evenodd"})]}),R=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24",...t,children:[e.jsx("path",{fill:"currentColor",d:"M12.247 20.812c-4.033 0-7.654-2.828-9.686-7.558a.75.75 0 0 1 0-.592c2.034-4.732 5.655-7.557 9.687-7.557s7.657 2.825 9.69 7.557a.75.75 0 0 1 0 .592c-2.032 4.73-5.653 7.554-9.685 7.557zm-8.182-7.853c1.806 3.983 4.846 6.352 8.18 6.352 3.334.002 6.373-2.369 8.18-6.352-1.808-3.986-4.848-6.354-8.182-6.354s-6.37 2.368-8.176 6.354z"}),e.jsx("path",{fill:"currentColor",d:"M12.247 16.789a3.825 3.825 0 1 1 0-7.651 3.825 3.825 0 0 1 0 7.65m0-6.152a2.326 2.326 0 1 0 0 4.651 2.326 2.326 0 0 0 0-4.651"})]}),I=t=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24",...t,children:e.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M20.417 3.22a.75.75 0 0 1 0 1.06L4.643 20.055a.744.744 0 0 1-1.06 0 .75.75 0 0 1 0-1.06l1.972-1.971c-1.413-1.293-2.613-3.036-3.493-5.089a.75.75 0 0 1 0-.593C3.082 8.977 4.52 7.02 6.22 5.683c3.292-2.606 7.621-2.744 11.048-.375l2.088-2.088a.75.75 0 0 1 1.06 0m-.37 4.82c.724.962 1.36 2.073 1.891 3.299a.74.74 0 0 1 0 .595C19.842 16.79 16.128 19.69 12 19.69a8.8 8.8 0 0 1-2.769-.451.75.75 0 0 1 .474-1.424A7.3 7.3 0 0 0 12 18.19c3.428 0 6.561-2.442 8.43-6.553a14.5 14.5 0 0 0-1.58-2.694.75.75 0 0 1 1.197-.902M7.15 6.862c-1.437 1.13-2.67 2.776-3.58 4.778.794 1.752 1.836 3.23 3.047 4.322l2.138-2.138a3.87 3.87 0 0 1-.67-2.184A3.92 3.92 0 0 1 12 7.722a3.9 3.9 0 0 1 2.187.669l2.001-2.002c-2.853-1.844-6.325-1.676-9.038.472m8.088 4.6a.75.75 0 0 1 .606.872 3.92 3.92 0 0 1-3.141 3.147.75.75 0 0 1-.268-1.476 2.41 2.41 0 0 0 1.932-1.937.754.754 0 0 1 .87-.606M12 9.221a2.418 2.418 0 0 0-2.152 3.509l3.245-3.246A2.4 2.4 0 0 0 12 9.222",clipRule:"evenodd"})}),N=h.forwardRef(function(a,f){const{dir:i="rtl",placeholderDir:m=i,containerClassName:w,leftIcon:u,prefix:d,postfix:x,onClear:n,value:r,...s}=a,j=k.omitObject(s,["labelAddon","labelContent","link","rightIcon","isError","errorMessage","hintMessage","wrapperClassName","showMaxLength"]),[c,v]=h.useState(s.type);function p(){return e.jsx("button",{onClick:()=>{typeof n=="function"&&n()},children:e.jsx(y,{className:"dgs-ui-kit-text-gray-600",width:20,height:20})})}return e.jsxs(C.TextFieldWrapper,{...a,containerClassName:g.clsx("dgs-ui-kit-items-center",w),value:r,children:[d&&e.jsx("span",{className:"dgs-ui-kit-font-p1-regular dgs-ui-kit-text-gray-500",children:d}),typeof n=="function"&&r&&i==="ltr"&&p(),e.jsx("input",{...j,ref:f,className:g.clsx("dgs-ui-kit-bg-transparent focus:dgs-ui-kit-outline-none dgs-ui-kit-flex-1",i==="rtl"?"dgs-ui-kit-text-right":"!dgs-ui-kit-text-left",m==="rtl"?"placeholder:dgs-ui-kit-text-right":"placeholder:dgs-ui-kit-text-left",{ss02:s.type!="password"},a.className),...i==="ltr"?{style:{direction:"ltr"}}:{},value:r,type:c,onInput:o=>{if(typeof s.onInput=="function"&&s.onInput(o)||c!=="number")return;const l=o.currentTarget;l.value.length>l.maxLength&&(l.value=l.value.slice(0,l.maxLength))}}),typeof n=="function"&&r&&i==="rtl"&&p(),x&&e.jsx("span",{className:"dgs-ui-kit-font-p1-regular dgs-ui-kit-text-gray-500",children:x}),u&&e.jsx("div",{className:"dgs-ui-kit-text-gray-600",children:u}),s.type==="password"&&e.jsx("button",{onClick:()=>v(o=>o==="text"?"password":"text"),className:"dgs-ui-kit-text-gray-600",children:c==="password"?e.jsx(R,{width:20,height:20}):e.jsx(I,{width:20,height:20})})]})});module.exports=N;
1
+ "use strict";require("react/jsx-runtime");require("../../clsx-C11secjj.cjs");require("react");const r=require("../../index-BctRb68z.cjs");require("../../omitObjects-CtiYo0hv.cjs");require("../../TextFieldWrapper-BrWmggFz.cjs");module.exports=r.Input;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Form/Input/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,mBAAmB,EAAwB,MAAM,OAAO,CAAC;AAM1F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AAExF,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,KAAK,CAAC,EACxD,kBAAkB;IACpB,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC;CACxE;AAED,QAAA,MAAM,KAAK,yGAyGT,CAAC;AACH,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Form/Input/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,mBAAmB,EAAwB,MAAM,OAAO,CAAC;AAM1F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AAExF,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,KAAK,CAAC,EACxD,kBAAkB;IACpB,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC;CACxE;AAED,QAAA,MAAM,KAAK,yGA0GT,CAAC;AACH,eAAe,KAAK,CAAC"}