1mpacto-react-ui 2.0.20 → 2.0.22

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 (114) hide show
  1. package/dist/assets/_mixins.scss +72 -72
  2. package/dist/assets/icons/arrow-narrow-down.svg +3 -3
  3. package/dist/assets/style.css +1 -1
  4. package/dist/components/Alert/index.cjs +1 -1
  5. package/dist/components/Alert/index.mjs +40 -40
  6. package/dist/components/Breadcrumbs/Breadcrumbs.cjs +3 -3
  7. package/dist/components/Breadcrumbs/Breadcrumbs.mjs +43 -43
  8. package/dist/components/Button/Button.cjs +12 -12
  9. package/dist/components/Button/Button.config.cjs +1 -1
  10. package/dist/components/Button/Button.config.mjs +3 -1
  11. package/dist/components/Button/Button.mjs +24 -24
  12. package/dist/components/Button/style.module.scss.cjs +1 -1
  13. package/dist/components/Button/style.module.scss.mjs +57 -55
  14. package/dist/components/ButtonIcon/ButtonIcon.cjs +12 -12
  15. package/dist/components/ButtonIcon/ButtonIcon.mjs +20 -20
  16. package/dist/components/ButtonPopover/ButtonPopover.cjs +1 -1
  17. package/dist/components/ButtonPopover/ButtonPopover.mjs +28 -31
  18. package/dist/components/Calendar/Calendar.cjs +1 -1
  19. package/dist/components/Calendar/Calendar.mjs +98 -100
  20. package/dist/components/Calendar/CalendarMonth.cjs +1 -1
  21. package/dist/components/Calendar/CalendarMonth.mjs +41 -42
  22. package/dist/components/Calendar/CalendarRange.cjs +1 -1
  23. package/dist/components/Calendar/CalendarRange.mjs +59 -61
  24. package/dist/components/Calendar/CalendarYear.cjs +3 -3
  25. package/dist/components/Calendar/CalendarYear.mjs +39 -40
  26. package/dist/components/Chart/DoughnutChart.cjs +1 -1
  27. package/dist/components/Chart/DoughnutChart.mjs +93 -96
  28. package/dist/components/Chart/GradientBarChart.cjs +1 -1
  29. package/dist/components/Chart/GradientBarChart.mjs +80 -81
  30. package/dist/components/Chart/GradientLineChart.cjs +1 -1
  31. package/dist/components/Chart/GradientLineChart.mjs +50 -51
  32. package/dist/components/Chart/LineChart.cjs +1 -1
  33. package/dist/components/Chart/LineChart.mjs +23 -23
  34. package/dist/components/Chart/PieChart.cjs +1 -1
  35. package/dist/components/Chart/PieChart.mjs +45 -48
  36. package/dist/components/Collapse/Collapse.cjs +1 -1
  37. package/dist/components/Collapse/Collapse.mjs +23 -24
  38. package/dist/components/DatePicker/DatePicker.cjs +1 -1
  39. package/dist/components/DatePicker/DatePicker.mjs +86 -89
  40. package/dist/components/DatePicker/DateRangePicker.cjs +1 -1
  41. package/dist/components/DatePicker/DateRangePicker.mjs +91 -92
  42. package/dist/components/DatePicker/FilterDate.cjs +1 -1
  43. package/dist/components/DatePicker/FilterDate.mjs +107 -110
  44. package/dist/components/DatePicker/MonthYearPicker.cjs +1 -1
  45. package/dist/components/DatePicker/MonthYearPicker.mjs +51 -53
  46. package/dist/components/FilterContainer/FilterContainer.cjs +1 -1
  47. package/dist/components/FilterContainer/FilterContainer.mjs +27 -27
  48. package/dist/components/Input/InputFloatingInner.cjs +5 -5
  49. package/dist/components/Input/InputFloatingInner.mjs +24 -25
  50. package/dist/components/NumberFormat/NumberFormat.cjs +1 -1
  51. package/dist/components/NumberFormat/NumberFormat.mjs +12 -13
  52. package/dist/components/Pagination/Pagination.cjs +2 -2
  53. package/dist/components/Pagination/Pagination.mjs +76 -80
  54. package/dist/components/SelectDropdownContainer/SelectDropdownContainer.cjs +1 -1
  55. package/dist/components/SelectDropdownContainer/SelectDropdownContainer.mjs +98 -102
  56. package/dist/components/Sidebar/ItemSidebar.cjs +8 -8
  57. package/dist/components/Sidebar/ItemSidebar.mjs +71 -72
  58. package/dist/components/Sidebar/Sidebar.cjs +1 -1
  59. package/dist/components/Sidebar/Sidebar.mjs +65 -68
  60. package/dist/components/Slider/Slider.cjs +1 -0
  61. package/dist/components/Slider/Slider.mjs +61 -0
  62. package/dist/components/Slider/style.module.scss.cjs +1 -0
  63. package/dist/components/Slider/style.module.scss.mjs +14 -0
  64. package/dist/components/Step/Step.cjs +5 -5
  65. package/dist/components/Step/Step.mjs +52 -52
  66. package/dist/components/Table/Table.cjs +3 -3
  67. package/dist/components/Table/Table.mjs +275 -298
  68. package/dist/components/Table/TableSubMobile.cjs +1 -1
  69. package/dist/components/Table/TableSubMobile.mjs +32 -35
  70. package/dist/components/Tabs/Tabs.cjs +8 -8
  71. package/dist/components/Tabs/Tabs.mjs +66 -70
  72. package/dist/components/Textarea/Textarea.cjs +7 -7
  73. package/dist/components/Textarea/Textarea.mjs +47 -50
  74. package/dist/components/Textarea/TextareaFloatingInner.cjs +6 -6
  75. package/dist/components/Textarea/TextareaFloatingInner.mjs +56 -61
  76. package/dist/components/Textarea/TextareaInnerLabel.cjs +6 -6
  77. package/dist/components/Textarea/TextareaInnerLabel.mjs +47 -50
  78. package/dist/components/TimeRange/TimeRange.cjs +1 -1
  79. package/dist/components/TimeRange/TimeRange.mjs +88 -91
  80. package/dist/components/Tooltip/Tooltip.cjs +1 -1
  81. package/dist/components/Tooltip/Tooltip.mjs +44 -46
  82. package/dist/components/Upload/UploadFile.cjs +1 -1
  83. package/dist/components/Upload/UploadFile.mjs +50 -54
  84. package/dist/components/Upload/UploadImage.cjs +12 -12
  85. package/dist/components/Upload/UploadImage.mjs +73 -79
  86. package/dist/components/Upload/UploadMultipleFile.cjs +1 -1
  87. package/dist/components/Upload/UploadMultipleFile.mjs +61 -62
  88. package/dist/components/Virtualization/ListVirtualization.cjs +1 -1
  89. package/dist/components/Virtualization/ListVirtualization.mjs +52 -55
  90. package/dist/components/Virtualization/TableVirtualization.cjs +1 -1
  91. package/dist/components/Virtualization/TableVirtualization.mjs +56 -59
  92. package/dist/config/components/tinymce.cjs +2 -2
  93. package/dist/config/components/tinymce.mjs +3 -3
  94. package/dist/hooks/useCountdown.cjs +1 -1
  95. package/dist/hooks/useCountdown.mjs +15 -15
  96. package/dist/hooks/useDebounce.cjs +1 -1
  97. package/dist/hooks/useDebounce.mjs +19 -19
  98. package/dist/hooks/useOtpInput.cjs +1 -1
  99. package/dist/hooks/useOtpInput.mjs +47 -51
  100. package/dist/index.cjs +1 -1
  101. package/dist/index.mjs +48 -46
  102. package/dist/package.json.cjs +1 -1
  103. package/dist/package.json.d.ts +129 -128
  104. package/dist/package.json.mjs +1 -1
  105. package/dist/src/components/Button/Button.config.d.ts +2 -0
  106. package/dist/src/components/Slider/Slider.d.ts +3 -0
  107. package/dist/src/components/Slider/Slider.stories.d.ts +6 -0
  108. package/dist/src/components/index.d.ts +4 -2
  109. package/dist/src/interfaces/components/Button/index.d.ts +1 -1
  110. package/dist/src/interfaces/components/Slider/index.d.ts +51 -0
  111. package/dist/types-external/table.d.ts +15 -15
  112. package/dist/utils/common.cjs +1 -1
  113. package/dist/utils/common.mjs +172 -173
  114. package/package.json +128 -128
@@ -1,33 +1,33 @@
1
- import { jsxs as h, Fragment as H, jsx as s } from "react/jsx-runtime";
2
- import i, { isValidElement as _ } from "react";
3
- import v from "./DateRangePicker.mjs";
4
- import ee from "../Popover/Popover.mjs";
5
- import k from "../Calendar/style.module.scss.mjs";
6
- import { formatDate as w } from "../../utils/common.mjs";
7
- import te from "../Button/Button.mjs";
8
- const De = ({
9
- value: r,
10
- prevIcon: N,
11
- nextIcon: R,
12
- buttonReset: g,
13
- buttonSubmit: W,
14
- className: j,
15
- classNameButton: B,
16
- buttonClick: c,
17
- buttonList: p,
18
- typePicker: E = "RANGE",
19
- onChange: K,
20
- idPopover: P = "filter-date-popover",
21
- id: $ = "filter-date",
22
- floatingOptions: O = {},
23
- offsetPopover: z = 5,
24
- zIndexPopper: V = 0,
25
- defaultValueLabel: D,
26
- isCustomTime: A = !1,
27
- mountedExecuteChange: G = !0,
28
- formatingDate: l
1
+ import { jsxs as m, Fragment as T, jsx as s } from "react/jsx-runtime";
2
+ import o, { isValidElement as X } from "react";
3
+ import Z from "./DateRangePicker.mjs";
4
+ import _ from "../Popover/Popover.mjs";
5
+ import h from "../Calendar/style.module.scss.mjs";
6
+ import { formatDate as k } from "../../utils/common.mjs";
7
+ import ee from "../Button/Button.mjs";
8
+ const le = ({
9
+ value: n,
10
+ prevIcon: x,
11
+ nextIcon: H,
12
+ buttonReset: w,
13
+ buttonSubmit: N,
14
+ className: R,
15
+ classNameButton: W,
16
+ buttonClick: l,
17
+ buttonList: g,
18
+ typePicker: j = "RANGE",
19
+ onChange: v,
20
+ idPopover: B = "filter-date-popover",
21
+ id: E = "filter-date",
22
+ floatingOptions: P = {},
23
+ offsetPopover: $ = 5,
24
+ zIndexPopper: O = 0,
25
+ defaultValueLabel: c,
26
+ isCustomTime: z = !1,
27
+ mountedExecuteChange: V = !0,
28
+ formatingDate: D
29
29
  }) => {
30
- const S = [
30
+ const p = [
31
31
  { key: "thisDay", value: "Hari ini" },
32
32
  { key: "thisWeek", value: "Minggu ini" },
33
33
  { key: "thisMonth", value: "Bulan ini" },
@@ -37,16 +37,16 @@ const De = ({
37
37
  { key: "lastMonth", value: "Bulan lalu" },
38
38
  { key: "lastYear", value: "Tahun lalu" },
39
39
  { key: "custom", value: "Kustom" }
40
- ], b = i.useRef(null), [n, M] = i.useState(), [I, o] = i.useState(), [Y, T] = i.useState(), d = (e, t) => {
40
+ ], S = o.useRef(null), [b, M] = o.useState(), [A, r] = o.useState(), [Y, F] = o.useState(), d = (e, t) => {
41
41
  const a = new Date(e ?? /* @__PURE__ */ new Date());
42
42
  return t === "start" ? new Date(a.setHours(0, 0, 0)) : new Date(a.setHours(23, 59, 59));
43
- }, J = () => {
43
+ }, G = () => {
44
44
  const e = /* @__PURE__ */ new Date();
45
45
  return {
46
46
  startDate: e,
47
47
  endDate: e
48
48
  };
49
- }, q = () => {
49
+ }, I = () => {
50
50
  const e = /* @__PURE__ */ new Date();
51
51
  e.setDate(e.getDate() - e.getDay());
52
52
  const t = /* @__PURE__ */ new Date();
@@ -54,25 +54,25 @@ const De = ({
54
54
  startDate: e,
55
55
  endDate: t
56
56
  };
57
- }, C = () => {
57
+ }, J = () => {
58
58
  const e = /* @__PURE__ */ new Date(), t = new Date(e.getFullYear(), e.getMonth(), 1), a = new Date(e.getFullYear(), e.getMonth() + 1, 0);
59
59
  return {
60
60
  startDate: t,
61
61
  endDate: a
62
62
  };
63
- }, L = () => {
63
+ }, q = () => {
64
64
  const e = new Date((/* @__PURE__ */ new Date()).getFullYear(), 0, 1), t = new Date((/* @__PURE__ */ new Date()).getFullYear(), 11, 31);
65
65
  return {
66
66
  startDate: e,
67
67
  endDate: t
68
68
  };
69
- }, Q = () => {
69
+ }, C = () => {
70
70
  const e = new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate() - 1));
71
71
  return {
72
72
  startDate: e,
73
73
  endDate: e
74
74
  };
75
- }, U = () => {
75
+ }, L = () => {
76
76
  const e = /* @__PURE__ */ new Date();
77
77
  e.setDate(e.getDate() - (7 + e.getDay()));
78
78
  const t = /* @__PURE__ */ new Date();
@@ -80,161 +80,158 @@ const De = ({
80
80
  startDate: e,
81
81
  endDate: t
82
82
  };
83
- }, X = () => {
83
+ }, Q = () => {
84
84
  const e = /* @__PURE__ */ new Date(), t = new Date(e.getFullYear(), e.getMonth() - 1, 1), a = new Date(e.getFullYear(), e.getMonth(), 0);
85
85
  return {
86
86
  startDate: t,
87
87
  endDate: a
88
88
  };
89
- }, Z = () => {
89
+ }, U = () => {
90
90
  const e = new Date((/* @__PURE__ */ new Date()).getFullYear() - 1, 0, 1), t = new Date((/* @__PURE__ */ new Date()).getFullYear() - 1, 11, 31);
91
91
  return {
92
92
  startDate: e,
93
93
  endDate: t
94
94
  };
95
95
  }, u = (e, t, a) => {
96
- var m;
97
- if (T(e), typeof K == "function") {
98
- let F = e;
99
- l === "string" && e ? F = {
100
- startDate: w(e.startDate, l),
101
- endDate: w(e.endDate, l)
102
- } : typeof l == "boolean" && e && (F = {
103
- startDate: w(e.startDate, "yyyy-MM-dd'T'HH:mm:ss.SSSxxx"),
104
- endDate: w(e.endDate, "yyyy-MM-dd'T'HH:mm:ss.SSSxxx")
105
- }), (m = b.current) == null || m.setShow(!1), K(F, t ?? "", a);
96
+ if (F(e), typeof v == "function") {
97
+ let i = e;
98
+ D === "string" && e ? i = {
99
+ startDate: k(e.startDate, D),
100
+ endDate: k(e.endDate, D)
101
+ } : typeof D == "boolean" && e && (i = {
102
+ startDate: k(e.startDate, "yyyy-MM-dd'T'HH:mm:ss.SSSxxx"),
103
+ endDate: k(e.endDate, "yyyy-MM-dd'T'HH:mm:ss.SSSxxx")
104
+ }), S.current?.setShow(!1), v(i, t ?? "", a);
106
105
  }
107
106
  }, y = (e, t) => {
108
107
  M(e);
109
108
  let a;
110
- if ((e == null ? void 0 : e.key) !== "custom") {
111
- switch (o(e), e == null ? void 0 : e.key) {
109
+ if (e?.key !== "custom") {
110
+ switch (r(e), e?.key) {
112
111
  case "thisDay":
113
- a = J();
112
+ a = G();
114
113
  break;
115
114
  case "thisWeek":
116
- a = q();
115
+ a = I();
117
116
  break;
118
117
  case "thisMonth":
119
- a = C();
118
+ a = J();
120
119
  break;
121
120
  case "thisYear":
122
- a = L();
121
+ a = q();
123
122
  break;
124
123
  case "yesterday":
125
- a = Q();
124
+ a = C();
126
125
  break;
127
126
  case "lastWeek":
128
- a = U();
127
+ a = L();
129
128
  break;
130
129
  case "lastMonth":
131
- a = X();
130
+ a = Q();
132
131
  break;
133
132
  case "lastYear":
134
- a = Z();
133
+ a = U();
135
134
  break;
136
135
  }
137
136
  a && t && u(
138
137
  { startDate: d(a.startDate, "start"), endDate: d(a.endDate, "end") },
139
- e == null ? void 0 : e.value,
138
+ e?.value,
140
139
  e
141
140
  );
142
141
  }
143
142
  }, f = (e, t) => {
144
- const a = (p ?? S).find((m) => m.key === e);
145
- !e && !a ? (t && u(), y(void 0, t), o(void 0)) : typeof e == "object" ? (t && u(
143
+ const a = (g ?? p).find((i) => i.key === e);
144
+ !e && !a ? (t && u(), y(void 0, t), r(void 0)) : typeof e == "object" ? (t && u(
146
145
  {
147
146
  startDate: d(e.startDate, "start"),
148
147
  endDate: d(e.endDate, "end")
149
148
  },
150
149
  "Kustom",
151
150
  { key: "custom", value: "Kustom" }
152
- ), y({ key: "custom", value: "Kustom" }, t), o({ key: "custom", value: "Kustom" })) : (y(a, t), o(a));
153
- }, x = () => {
154
- var e;
155
- if (r) {
156
- T(r);
157
- const t = (e = p ?? S) == null ? void 0 : e.find(
158
- (a) => a.key === r.label || a.value === r.label
151
+ ), y({ key: "custom", value: "Kustom" }, t), r({ key: "custom", value: "Kustom" })) : (y(a, t), r(a));
152
+ }, K = () => {
153
+ if (n) {
154
+ F(n);
155
+ const e = (g ?? p)?.find(
156
+ (t) => t.key === n.label || t.value === n.label
159
157
  );
160
- Object.keys(t || {}).length > 0 && M(t);
158
+ Object.keys(e || {}).length > 0 && M(e);
161
159
  } else
162
- M(void 0), o(void 0);
160
+ M(void 0), r(void 0);
163
161
  };
164
- return i.useEffect(() => {
165
- x();
166
- }, [JSON.stringify(r)]), i.useEffect(() => {
167
- f(D ?? r, G);
168
- }, []), /* @__PURE__ */ h(H, { children: [
169
- /* @__PURE__ */ h(
162
+ return o.useEffect(() => {
163
+ K();
164
+ }, [JSON.stringify(n)]), o.useEffect(() => {
165
+ f(c ?? n, V);
166
+ }, []), /* @__PURE__ */ m(T, { children: [
167
+ /* @__PURE__ */ m(
170
168
  "div",
171
169
  {
172
170
  onClick: (e) => {
173
- var t;
174
- (t = b.current) == null || t.handlerShow(e), x();
171
+ S.current?.handlerShow(e), K();
175
172
  },
176
- className: B,
177
- id: $,
173
+ className: W,
174
+ id: E,
178
175
  children: [
179
- _(c) && c,
180
- typeof c == "function" ? c(Y, I) : "Pilih Filter"
176
+ X(l) && l,
177
+ typeof l == "function" ? l(Y, A) : "Pilih Filter"
181
178
  ]
182
179
  }
183
180
  ),
184
181
  /* @__PURE__ */ s(
185
- ee,
182
+ _,
186
183
  {
187
- zIndex: V,
188
- ref: b,
189
- offset: z,
190
- id: P,
191
- floatingOptions: { placement: "bottom-end", ...O },
192
- children: /* @__PURE__ */ h("div", { className: `${k["container-filter-date"]} ${j}`, children: [
193
- /* @__PURE__ */ h("div", { children: [
194
- (p ?? S).map((e, t) => /* @__PURE__ */ s(
184
+ zIndex: O,
185
+ ref: S,
186
+ offset: $,
187
+ id: B,
188
+ floatingOptions: { placement: "bottom-end", ...P },
189
+ children: /* @__PURE__ */ m("div", { className: `${h["container-filter-date"]} ${R}`, children: [
190
+ /* @__PURE__ */ m("div", { children: [
191
+ (g ?? p).map((e, t) => /* @__PURE__ */ s(
195
192
  "div",
196
193
  {
197
- className: `${k["button-filter-date"]} hover:iru-bg-laba-blue-01 ${(n == null ? void 0 : n.key) === e.key ? "iru-text-laba-blue-10" : ""}`,
194
+ className: `${h["button-filter-date"]} hover:iru-bg-laba-blue-01 ${b?.key === e.key ? "iru-text-laba-blue-10" : ""}`,
198
195
  onClick: () => y(e, !0),
199
196
  children: e.value
200
197
  },
201
198
  t
202
199
  )),
203
- (n == null ? void 0 : n.key) !== "custom" && /* @__PURE__ */ s(H, { children: typeof g == "function" ? /* @__PURE__ */ s(
200
+ b?.key !== "custom" && /* @__PURE__ */ s(T, { children: typeof w == "function" ? /* @__PURE__ */ s(
204
201
  "div",
205
202
  {
206
- className: k["button-filter-date-custome"],
207
- onClick: () => f(D, !0),
208
- children: g()
203
+ className: h["button-filter-date-custome"],
204
+ onClick: () => f(c, !0),
205
+ children: w()
209
206
  }
210
207
  ) : /* @__PURE__ */ s(
211
- te,
208
+ ee,
212
209
  {
213
- className: k["button-reset-filter-date"],
210
+ className: h["button-reset-filter-date"],
214
211
  variants: "nude-laba-blue-10",
215
212
  size: "small",
216
- onClick: () => f(D, !0),
213
+ onClick: () => f(c, !0),
217
214
  children: "Reset"
218
215
  }
219
216
  ) })
220
217
  ] }),
221
- (n == null ? void 0 : n.key) === "custom" && /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
222
- v,
218
+ b?.key === "custom" && /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
219
+ Z,
223
220
  {
224
221
  defaultValue: Y,
225
222
  value: Y,
226
- prevIcon: N,
227
- nextIcon: R,
228
- buttonReset: g,
229
- buttonSubmit: W,
230
- isCustomTime: A,
223
+ prevIcon: x,
224
+ nextIcon: H,
225
+ buttonReset: w,
226
+ buttonSubmit: N,
227
+ isCustomTime: z,
231
228
  onChange: (e) => {
232
- u(e, "Kustom", { key: "custom", value: "Kustom" }), o({ key: "custom", value: "Kustom" });
229
+ u(e, "Kustom", { key: "custom", value: "Kustom" }), r({ key: "custom", value: "Kustom" });
233
230
  },
234
231
  onReset: () => {
235
- f(D, !0);
232
+ f(c, !0);
236
233
  },
237
- typePicker: E,
234
+ typePicker: j,
238
235
  withConfirm: !0
239
236
  }
240
237
  ) })
@@ -244,5 +241,5 @@ const De = ({
244
241
  ] });
245
242
  };
246
243
  export {
247
- De as default
244
+ le as default
248
245
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),k=require("react"),f=require("react-aria"),h=require("@internationalized/date"),I=require("../Popover/Popover.cjs"),R=require("../Calendar/Calendar.cjs"),s=r=>{let a;const n=new Date(r??new Date);return r&&(a=h.parseDate(new Date(n.setHours(n.getHours()+7)).toISOString().slice(0,10))),a},b=({month:r,year:a,type:n=["month","year"],activeType:p="month",minDate:i,maxDate:c,className:g,classNameButton:m,onChange:d,buttonClick:u,id:v="date-picker",idPopover:j="date-picker-popover",floatingOptions:x={},offsetPopover:P=5,zIndexPopper:S=1,hiddenHeader:q})=>{const{locale:w}=f.useLocale(),l=k.useRef(null),D=s(i),C=s(c),$=e=>{var o;typeof d=="function"&&(d({month:e.month,year:e.year}),(o=l.current)==null||o.setShow(!1))};return t.jsxs(t.Fragment,{children:[t.jsx("div",{id:v,onClick:e=>{var o;e.stopPropagation(),(o=l.current)==null||o.handlerShow(e)},className:m,children:typeof u=="function"?u({month:r,year:a}):"Pilih Tanggal"}),t.jsx("div",{className:g??"",children:t.jsx(I.default,{zIndex:S,ref:l,offset:P,id:j,floatingOptions:{placement:"bottom-end",...x},onClick:e=>e.stopPropagation(),children:t.jsx(f.I18nProvider,{locale:"id-ID",children:t.jsx(R.default,{minValue:D,maxValue:C,minDate:i,maxDate:c,activeType:n.length===1?n[0]:p,locale:w,value:s(`${a}/${r}/1`),createCalendar:h.createCalendar,defaultValue:s(`${a}/${r}/1`),onChange:$,handlerReset:()=>{},handlerSubmit:()=>{},withDateSelect:!1,type:n,hiddenHeader:q})})})})]})};exports.default=b;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),$=require("react"),u=require("react-aria"),f=require("@internationalized/date"),k=require("../Popover/Popover.cjs"),I=require("../Calendar/Calendar.cjs"),o=r=>{let a;const n=new Date(r??new Date);return r&&(a=f.parseDate(new Date(n.setHours(n.getHours()+7)).toISOString().slice(0,10))),a},R=({month:r,year:a,type:n=["month","year"],activeType:h="month",minDate:l,maxDate:i,className:p,classNameButton:g,onChange:c,buttonClick:d,id:m="date-picker",idPopover:v="date-picker-popover",floatingOptions:j={},offsetPopover:x=5,zIndexPopper:P=1,hiddenHeader:S})=>{const{locale:q}=u.useLocale(),s=$.useRef(null),w=o(l),D=o(i),C=e=>{typeof c=="function"&&(c({month:e.month,year:e.year}),s.current?.setShow(!1))};return t.jsxs(t.Fragment,{children:[t.jsx("div",{id:m,onClick:e=>{e.stopPropagation(),s.current?.handlerShow(e)},className:g,children:typeof d=="function"?d({month:r,year:a}):"Pilih Tanggal"}),t.jsx("div",{className:p??"",children:t.jsx(k.default,{zIndex:P,ref:s,offset:x,id:v,floatingOptions:{placement:"bottom-end",...j},onClick:e=>e.stopPropagation(),children:t.jsx(u.I18nProvider,{locale:"id-ID",children:t.jsx(I.default,{minValue:w,maxValue:D,minDate:l,maxDate:i,activeType:n.length===1?n[0]:h,locale:q,value:o(`${a}/${r}/1`),createCalendar:f.createCalendar,defaultValue:o(`${a}/${r}/1`),onChange:C,handlerReset:()=>{},handlerSubmit:()=>{},withDateSelect:!1,type:n,hiddenHeader:S})})})})]})};exports.default=R;
@@ -1,77 +1,75 @@
1
- import { jsxs as I, Fragment as $, jsx as n } from "react/jsx-runtime";
2
- import R from "react";
3
- import { useLocale as V, I18nProvider as j } from "react-aria";
4
- import { createCalendar as y, parseDate as H } from "@internationalized/date";
5
- import N from "../Popover/Popover.mjs";
6
- import O from "../Calendar/Calendar.mjs";
7
- const i = (t) => {
1
+ import { jsxs as C, Fragment as I, jsx as a } from "react/jsx-runtime";
2
+ import $ from "react";
3
+ import { useLocale as R, I18nProvider as V } from "react-aria";
4
+ import { createCalendar as j, parseDate as y } from "@internationalized/date";
5
+ import H from "../Popover/Popover.mjs";
6
+ import N from "../Calendar/Calendar.mjs";
7
+ const n = (t) => {
8
8
  let o;
9
9
  const r = new Date(t ?? /* @__PURE__ */ new Date());
10
- return t && (o = H(new Date(r.setHours(r.getHours() + 7)).toISOString().slice(0, 10))), o;
11
- }, Y = ({
10
+ return t && (o = y(new Date(r.setHours(r.getHours() + 7)).toISOString().slice(0, 10))), o;
11
+ }, M = ({
12
12
  month: t,
13
13
  year: o,
14
14
  type: r = ["month", "year"],
15
- activeType: m = "month",
16
- minDate: c,
17
- maxDate: s,
18
- className: p,
19
- classNameButton: h,
20
- onChange: d,
21
- buttonClick: f,
22
- id: u = "date-picker",
23
- idPopover: g = "date-picker-popover",
24
- floatingOptions: v = {},
25
- offsetPopover: P = 5,
26
- zIndexPopper: w = 1,
27
- hiddenHeader: D
15
+ activeType: f = "month",
16
+ minDate: l,
17
+ maxDate: c,
18
+ className: m,
19
+ classNameButton: p,
20
+ onChange: s,
21
+ buttonClick: d,
22
+ id: h = "date-picker",
23
+ idPopover: u = "date-picker-popover",
24
+ floatingOptions: g = {},
25
+ offsetPopover: v = 5,
26
+ zIndexPopper: P = 1,
27
+ hiddenHeader: w
28
28
  }) => {
29
- const { locale: S } = V(), l = R.useRef(null), k = i(c), x = i(s), C = (e) => {
30
- var a;
31
- typeof d == "function" && (d({ month: e.month, year: e.year }), (a = l.current) == null || a.setShow(!1));
29
+ const { locale: D } = R(), i = $.useRef(null), S = n(l), k = n(c), x = (e) => {
30
+ typeof s == "function" && (s({ month: e.month, year: e.year }), i.current?.setShow(!1));
32
31
  };
33
- return /* @__PURE__ */ I($, { children: [
34
- /* @__PURE__ */ n(
32
+ return /* @__PURE__ */ C(I, { children: [
33
+ /* @__PURE__ */ a(
35
34
  "div",
36
35
  {
37
- id: u,
36
+ id: h,
38
37
  onClick: (e) => {
39
- var a;
40
- e.stopPropagation(), (a = l.current) == null || a.handlerShow(e);
38
+ e.stopPropagation(), i.current?.handlerShow(e);
41
39
  },
42
- className: h,
43
- children: typeof f == "function" ? f({ month: t, year: o }) : "Pilih Tanggal"
40
+ className: p,
41
+ children: typeof d == "function" ? d({ month: t, year: o }) : "Pilih Tanggal"
44
42
  }
45
43
  ),
46
- /* @__PURE__ */ n("div", { className: p ?? "", children: /* @__PURE__ */ n(
47
- N,
44
+ /* @__PURE__ */ a("div", { className: m ?? "", children: /* @__PURE__ */ a(
45
+ H,
48
46
  {
49
- zIndex: w,
50
- ref: l,
51
- offset: P,
52
- id: g,
53
- floatingOptions: { placement: "bottom-end", ...v },
47
+ zIndex: P,
48
+ ref: i,
49
+ offset: v,
50
+ id: u,
51
+ floatingOptions: { placement: "bottom-end", ...g },
54
52
  onClick: (e) => e.stopPropagation(),
55
- children: /* @__PURE__ */ n(j, { locale: "id-ID", children: /* @__PURE__ */ n(
56
- O,
53
+ children: /* @__PURE__ */ a(V, { locale: "id-ID", children: /* @__PURE__ */ a(
54
+ N,
57
55
  {
58
- minValue: k,
59
- maxValue: x,
60
- minDate: c,
61
- maxDate: s,
62
- activeType: r.length === 1 ? r[0] : m,
63
- locale: S,
64
- value: i(`${o}/${t}/1`),
65
- createCalendar: y,
66
- defaultValue: i(`${o}/${t}/1`),
67
- onChange: C,
56
+ minValue: S,
57
+ maxValue: k,
58
+ minDate: l,
59
+ maxDate: c,
60
+ activeType: r.length === 1 ? r[0] : f,
61
+ locale: D,
62
+ value: n(`${o}/${t}/1`),
63
+ createCalendar: j,
64
+ defaultValue: n(`${o}/${t}/1`),
65
+ onChange: x,
68
66
  handlerReset: () => {
69
67
  },
70
68
  handlerSubmit: () => {
71
69
  },
72
70
  withDateSelect: !1,
73
71
  type: r,
74
- hiddenHeader: D
72
+ hiddenHeader: w
75
73
  }
76
74
  ) })
77
75
  }
@@ -79,5 +77,5 @@ const i = (t) => {
79
77
  ] });
80
78
  };
81
79
  export {
82
- Y as default
80
+ M as default
83
81
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const v=require("react/jsx-runtime"),p=require("react"),m=require("../../utils/common.cjs"),b=require("../../hooks/useDeepCompareEffect.cjs"),V=(i,f,l)=>{if((f==null?void 0:f.length)>0){const r={};return f.forEach(e=>{i[e]&&(r[e]=i[e]),l&&i[`${l}${e}`]&&(r[`${l}${e}`]=i[`${l}${e}`])}),r}return i},A=p.forwardRef((i,f)=>{const{children:l,onChange:r,prefixNativeValue:e="",defaultNativeValue:C,defaultValue:O,mountedExecuteChange:N=!0,keepKeys:g=[],resetPagination:P=!0,keyPageNumber:q="pageNumber",triggerReset:z={},reset:$}=i,y=P?{[q]:1}:{},[s,d]=p.useState(V(O??{},g,"")),[u,h]=p.useState(m.sanitizeObjectKeyPrefix(e,V(C??{},g,e))),[S,F]=p.useState(!1),x=(t,a)=>{const c={};return Object.keys(a).forEach(o=>{c[`${t}${o}`]=a[o]}),c},D=(t,a,c,o)=>{let n=t;const R=x(e,{[a]:t});Array.isArray(t)&&(c==="array-of-object-to-array"?n=m.transformArrayOfObjectToArray(t,o):c==="array-of-object-to-string"?n=m.transformArrayOfObjectToString(t,o):c==="array-to-string"&&(n=n.toString())),typeof r=="function"&&r({...s,[a]:n,...y},{...u,...R}),d(j=>({...j,[a]:n})),h(j=>({...j,...R}))},E=(t,a)=>{const o=x(e,{...a??t});typeof r=="function"&&r({...s,...t,...y},{...u,...o}),d(n=>({...n,...t})),h(n=>({...n,...o}))};return b.useDeepCompareEffect(()=>{!S&&typeof r=="function"&&N&&(r(s,u),F(!0))},[s,u,S,N]),b.useDeepCompareEffect(()=>{$&&(h(m.sanitizeObjectKeyPrefix(e,V(C??{},g,e))),d(V(O??{},g,"")))},[$,z]),p.useImperativeHandle(f,()=>({nativeValue:u,value:s,handlerOnChange:D,handlerOnChangeNative:E}),[b.useDeepCompareMemoize(s),b.useDeepCompareMemoize(u)]),v.jsx(v.Fragment,{children:l({handlerOnChange:D,handlerOnChangeNative:E,value:s,nativeValue:u})})});A.displayName="FilterContainer";exports.default=A;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const v=require("react/jsx-runtime"),l=require("react"),m=require("../../utils/common.cjs"),b=require("../../hooks/useDeepCompareEffect.cjs"),V=(i,p,f)=>{if(p?.length>0){const r={};return p.forEach(e=>{i[e]&&(r[e]=i[e]),f&&i[`${f}${e}`]&&(r[`${f}${e}`]=i[`${f}${e}`])}),r}return i},A=l.forwardRef((i,p)=>{const{children:f,onChange:r,prefixNativeValue:e="",defaultNativeValue:y,defaultValue:C,mountedExecuteChange:O=!0,keepKeys:g=[],resetPagination:P=!0,keyPageNumber:q="pageNumber",triggerReset:z={},reset:N}=i,$=P?{[q]:1}:{},[s,d]=l.useState(V(C??{},g,"")),[u,h]=l.useState(m.sanitizeObjectKeyPrefix(e,V(y??{},g,e))),[S,F]=l.useState(!1),x=(t,a)=>{const c={};return Object.keys(a).forEach(o=>{c[`${t}${o}`]=a[o]}),c},D=(t,a,c,o)=>{let n=t;const R=x(e,{[a]:t});Array.isArray(t)&&(c==="array-of-object-to-array"?n=m.transformArrayOfObjectToArray(t,o):c==="array-of-object-to-string"?n=m.transformArrayOfObjectToString(t,o):c==="array-to-string"&&(n=n.toString())),typeof r=="function"&&r({...s,[a]:n,...$},{...u,...R}),d(j=>({...j,[a]:n})),h(j=>({...j,...R}))},E=(t,a)=>{const o=x(e,{...a??t});typeof r=="function"&&r({...s,...t,...$},{...u,...o}),d(n=>({...n,...t})),h(n=>({...n,...o}))};return b.useDeepCompareEffect(()=>{!S&&typeof r=="function"&&O&&(r(s,u),F(!0))},[s,u,S,O]),b.useDeepCompareEffect(()=>{N&&(h(m.sanitizeObjectKeyPrefix(e,V(y??{},g,e))),d(V(C??{},g,"")))},[N,z]),l.useImperativeHandle(p,()=>({nativeValue:u,value:s,handlerOnChange:D,handlerOnChangeNative:E}),[b.useDeepCompareMemoize(s),b.useDeepCompareMemoize(u)]),v.jsx(v.Fragment,{children:f({handlerOnChange:D,handlerOnChangeNative:E,value:s,nativeValue:u})})});A.displayName="FilterContainer";exports.default=A;
@@ -1,57 +1,57 @@
1
1
  import { jsx as w, Fragment as z } from "react/jsx-runtime";
2
- import p from "react";
2
+ import l from "react";
3
3
  import { sanitizeObjectKeyPrefix as S, transformArrayOfObjectToArray as H, transformArrayOfObjectToString as I } from "../../utils/common.mjs";
4
4
  import { useDeepCompareEffect as E, useDeepCompareMemoize as F } from "../../hooks/useDeepCompareEffect.mjs";
5
- const g = (i, c, l) => {
6
- if ((c == null ? void 0 : c.length) > 0) {
5
+ const g = (i, p, c) => {
6
+ if (p?.length > 0) {
7
7
  const r = {};
8
- return c.forEach((e) => {
9
- i[e] && (r[e] = i[e]), l && i[`${l}${e}`] && (r[`${l}${e}`] = i[`${l}${e}`]);
8
+ return p.forEach((e) => {
9
+ i[e] && (r[e] = i[e]), c && i[`${c}${e}`] && (r[`${c}${e}`] = i[`${c}${e}`]);
10
10
  }), r;
11
11
  }
12
12
  return i;
13
- }, M = p.forwardRef((i, c) => {
13
+ }, M = l.forwardRef((i, p) => {
14
14
  const {
15
- children: l,
15
+ children: c,
16
16
  onChange: r,
17
17
  prefixNativeValue: e = "",
18
- defaultNativeValue: O,
19
- defaultValue: d,
20
- mountedExecuteChange: j = !0,
18
+ defaultNativeValue: y,
19
+ defaultValue: O,
20
+ mountedExecuteChange: d = !0,
21
21
  keepKeys: m = [],
22
22
  resetPagination: v = !0,
23
23
  keyPageNumber: D = "pageNumber",
24
24
  triggerReset: K = {},
25
- reset: C
26
- } = i, N = v ? { [D]: 1 } : {}, [s, V] = p.useState(g(d ?? {}, m, "")), [f, h] = p.useState(
27
- S(e, g(O ?? {}, m, e))
28
- ), [$, P] = p.useState(!1), x = (t, a) => {
25
+ reset: j
26
+ } = i, C = v ? { [D]: 1 } : {}, [s, V] = l.useState(g(O ?? {}, m, "")), [f, h] = l.useState(
27
+ S(e, g(y ?? {}, m, e))
28
+ ), [N, P] = l.useState(!1), $ = (t, a) => {
29
29
  const u = {};
30
30
  return Object.keys(a).forEach((o) => {
31
31
  u[`${t}${o}`] = a[o];
32
32
  }), u;
33
- }, y = (t, a, u, o) => {
33
+ }, x = (t, a, u, o) => {
34
34
  let n = t;
35
- const R = x(e, { [a]: t });
36
- Array.isArray(t) && (u === "array-of-object-to-array" ? n = H(t, o) : u === "array-of-object-to-string" ? n = I(t, o) : u === "array-to-string" && (n = n.toString())), typeof r == "function" && r({ ...s, [a]: n, ...N }, { ...f, ...R }), V((b) => ({ ...b, [a]: n })), h((b) => ({ ...b, ...R }));
35
+ const R = $(e, { [a]: t });
36
+ Array.isArray(t) && (u === "array-of-object-to-array" ? n = H(t, o) : u === "array-of-object-to-string" ? n = I(t, o) : u === "array-to-string" && (n = n.toString())), typeof r == "function" && r({ ...s, [a]: n, ...C }, { ...f, ...R }), V((b) => ({ ...b, [a]: n })), h((b) => ({ ...b, ...R }));
37
37
  }, A = (t, a) => {
38
- const o = x(e, { ...a ?? t });
39
- typeof r == "function" && r({ ...s, ...t, ...N }, { ...f, ...o }), V((n) => ({ ...n, ...t })), h((n) => ({ ...n, ...o }));
38
+ const o = $(e, { ...a ?? t });
39
+ typeof r == "function" && r({ ...s, ...t, ...C }, { ...f, ...o }), V((n) => ({ ...n, ...t })), h((n) => ({ ...n, ...o }));
40
40
  };
41
41
  return E(() => {
42
- !$ && typeof r == "function" && j && (r(s, f), P(!0));
43
- }, [s, f, $, j]), E(() => {
44
- C && (h(
42
+ !N && typeof r == "function" && d && (r(s, f), P(!0));
43
+ }, [s, f, N, d]), E(() => {
44
+ j && (h(
45
45
  S(
46
46
  e,
47
- g(O ?? {}, m, e)
47
+ g(y ?? {}, m, e)
48
48
  )
49
- ), V(g(d ?? {}, m, "")));
50
- }, [C, K]), p.useImperativeHandle(c, () => ({ nativeValue: f, value: s, handlerOnChange: y, handlerOnChangeNative: A }), [
49
+ ), V(g(O ?? {}, m, "")));
50
+ }, [j, K]), l.useImperativeHandle(p, () => ({ nativeValue: f, value: s, handlerOnChange: x, handlerOnChangeNative: A }), [
51
51
  F(s),
52
52
  F(f)
53
- ]), /* @__PURE__ */ w(z, { children: l({
54
- handlerOnChange: y,
53
+ ]), /* @__PURE__ */ w(z, { children: c({
54
+ handlerOnChange: x,
55
55
  handlerOnChangeNative: A,
56
56
  value: s,
57
57
  nativeValue: f
@@ -1,5 +1,5 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),s=require("react"),e=require("./InputFloatingInner.module.scss.cjs"),y=require("./InputFloatingInner.config.cjs"),d=s.forwardRef((u,f)=>{var c;const{isRequired:m,classNameContainer:p,classNameLabelError:I,classNameLabel:N,className:$,name:i,id:r,label:b,type:g="text",startIcon:n,endIcon:a,error:l,sizeInput:x="large",...o}=u,h=()=>typeof n=="function"||s.isValidElement(n),j=()=>typeof a=="function"||s.isValidElement(a);return t.jsxs("div",{className:`${e.default.container} ${(c=y.configInputFloatingInner.size)==null?void 0:c[x]} ${p??""}`,children:[t.jsxs("div",{className:e.default["container-input"],children:[t.jsx("input",{id:r??i,className:`${e.default.input} ${l?e.default.error:""}
2
- ${h()?e.default["isset-left-icon"]:""}
3
- ${j()?e.default["isset-right-icon"]:""}
4
- ${$??""}`,ref:f,type:g,...o}),t.jsxs("div",{className:e.default["start-icon"],children:[typeof n=="function"&&n(),s.isValidElement(n)&&n]}),t.jsxs("label",{className:`${e.default.label} ${N??""}`,htmlFor:r??i,children:[b," ",m&&t.jsx("span",{className:"iru-text-laba-red-08",children:"*"})]}),t.jsxs("div",{className:e.default["end-icon"],children:[typeof a=="function"&&a(),s.isValidElement(a)&&a]})]}),l&&t.jsx("label",{className:`${e.default["label-error"]}
5
- ${o.disabled?e.default.disabled:""} ${I??""}`,children:l})]})});d.displayName="InputFloatingInner";exports.default=d;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),s=require("react"),e=require("./InputFloatingInner.module.scss.cjs"),j=require("./InputFloatingInner.config.cjs"),c=s.forwardRef((d,u)=>{const{isRequired:f,classNameContainer:m,classNameLabelError:p,classNameLabel:I,className:N,name:i,id:r,label:$,type:b="text",startIcon:n,endIcon:a,error:l,sizeInput:g="large",...o}=d,x=()=>typeof n=="function"||s.isValidElement(n),h=()=>typeof a=="function"||s.isValidElement(a);return t.jsxs("div",{className:`${e.default.container} ${j.configInputFloatingInner.size?.[g]} ${m??""}`,children:[t.jsxs("div",{className:e.default["container-input"],children:[t.jsx("input",{id:r??i,className:`${e.default.input} ${l?e.default.error:""}
2
+ ${x()?e.default["isset-left-icon"]:""}
3
+ ${h()?e.default["isset-right-icon"]:""}
4
+ ${N??""}`,ref:u,type:b,...o}),t.jsxs("div",{className:e.default["start-icon"],children:[typeof n=="function"&&n(),s.isValidElement(n)&&n]}),t.jsxs("label",{className:`${e.default.label} ${I??""}`,htmlFor:r??i,children:[$," ",f&&t.jsx("span",{className:"iru-text-laba-red-08",children:"*"})]}),t.jsxs("div",{className:e.default["end-icon"],children:[typeof a=="function"&&a(),s.isValidElement(a)&&a]})]}),l&&t.jsx("label",{className:`${e.default["label-error"]}
5
+ ${o.disabled?e.default.disabled:""} ${p??""}`,children:l})]})});c.displayName="InputFloatingInner";exports.default=c;