1mpacto-react-ui 2.0.25 → 2.0.27

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 (125) hide show
  1. package/dist/assets/_colors.scss +42 -0
  2. package/dist/assets/_mixins.scss +6 -1
  3. package/dist/assets/_typography.scss +37 -3
  4. package/dist/assets/core.css +1 -1
  5. package/dist/assets/fontfamily.css +1 -1
  6. package/dist/assets/style.css +1 -1
  7. package/dist/components/Breadcrumbs/Breadcrumbs.cjs +3 -3
  8. package/dist/components/Breadcrumbs/Breadcrumbs.config.cjs +1 -1
  9. package/dist/components/Breadcrumbs/Breadcrumbs.config.mjs +4 -3
  10. package/dist/components/Breadcrumbs/Breadcrumbs.mjs +33 -33
  11. package/dist/components/Breadcrumbs/style.module.scss.cjs +1 -1
  12. package/dist/components/Breadcrumbs/style.module.scss.mjs +13 -10
  13. package/dist/components/Button/Button.config.cjs +1 -1
  14. package/dist/components/Button/Button.config.mjs +67 -56
  15. package/dist/components/Button/style.module.scss.cjs +1 -1
  16. package/dist/components/Button/style.module.scss.mjs +63 -56
  17. package/dist/components/ButtonIcon/ButtonIcon.config.cjs +1 -1
  18. package/dist/components/ButtonIcon/ButtonIcon.config.mjs +58 -47
  19. package/dist/components/ButtonIcon/style.module.scss.cjs +1 -1
  20. package/dist/components/ButtonIcon/style.module.scss.mjs +53 -46
  21. package/dist/components/Calendar/Calendar.cjs +1 -1
  22. package/dist/components/Calendar/Calendar.config.cjs +1 -0
  23. package/dist/components/Calendar/Calendar.config.mjs +22 -0
  24. package/dist/components/Calendar/Calendar.mjs +221 -133
  25. package/dist/components/Calendar/CalendarCell.cjs +1 -1
  26. package/dist/components/Calendar/CalendarCell.mjs +9 -9
  27. package/dist/components/Calendar/CalendarMonth.cjs +1 -1
  28. package/dist/components/Calendar/CalendarMonth.mjs +23 -21
  29. package/dist/components/Calendar/CalendarRange.cjs +1 -1
  30. package/dist/components/Calendar/CalendarRange.mjs +100 -98
  31. package/dist/components/Calendar/CalendarYear.cjs +2 -2
  32. package/dist/components/Calendar/CalendarYear.mjs +25 -23
  33. package/dist/components/Calendar/style.module.scss.cjs +1 -1
  34. package/dist/components/Calendar/style.module.scss.mjs +35 -33
  35. package/dist/components/Chart/LineChart.cjs +1 -1
  36. package/dist/components/Chart/LineChart.mjs +1 -1
  37. package/dist/components/DatePicker/DatePicker.cjs +1 -1
  38. package/dist/components/DatePicker/DatePicker.mjs +78 -69
  39. package/dist/components/DatePicker/DateRangePicker.cjs +1 -1
  40. package/dist/components/DatePicker/DateRangePicker.mjs +91 -79
  41. package/dist/components/DatePicker/FilterDate.cjs +1 -1
  42. package/dist/components/DatePicker/FilterDate.mjs +181 -127
  43. package/dist/components/DatePicker/MonthYearPicker.cjs +1 -1
  44. package/dist/components/DatePicker/MonthYearPicker.mjs +58 -49
  45. package/dist/components/Input/InputInnerLabel.cjs +6 -6
  46. package/dist/components/Input/InputInnerLabel.config.cjs +1 -1
  47. package/dist/components/Input/InputInnerLabel.config.mjs +9 -5
  48. package/dist/components/Input/InputInnerLabel.mjs +36 -35
  49. package/dist/components/Input/InputInnerLabel.module.scss.cjs +1 -1
  50. package/dist/components/Input/InputInnerLabel.module.scss.mjs +19 -17
  51. package/dist/components/Modal/ModalDialog.cjs +1 -1
  52. package/dist/components/Modal/ModalDialog.config.cjs +1 -1
  53. package/dist/components/Modal/ModalDialog.config.mjs +11 -7
  54. package/dist/components/Modal/ModalDialog.mjs +24 -23
  55. package/dist/components/Modal/style.module.scss.cjs +1 -1
  56. package/dist/components/Modal/style.module.scss.mjs +13 -11
  57. package/dist/components/Popover/Popover.cjs +1 -1
  58. package/dist/components/Popover/Popover.config.cjs +1 -0
  59. package/dist/components/Popover/Popover.config.mjs +10 -0
  60. package/dist/components/Popover/Popover.mjs +42 -40
  61. package/dist/components/Popover/style.module.scss.cjs +1 -1
  62. package/dist/components/Popover/style.module.scss.mjs +7 -4
  63. package/dist/components/Sidebar/ItemSidebar.config.cjs +1 -1
  64. package/dist/components/Sidebar/ItemSidebar.config.mjs +6 -2
  65. package/dist/components/Sidebar/Sidebar.cjs +1 -1
  66. package/dist/components/Sidebar/Sidebar.config.cjs +1 -1
  67. package/dist/components/Sidebar/Sidebar.config.mjs +14 -12
  68. package/dist/components/Sidebar/Sidebar.mjs +78 -77
  69. package/dist/components/Sidebar/Sidebar.module.scss.cjs +1 -1
  70. package/dist/components/Sidebar/Sidebar.module.scss.mjs +25 -23
  71. package/dist/components/Sidebar/itemSidebar.module.scss.cjs +1 -1
  72. package/dist/components/Sidebar/itemSidebar.module.scss.mjs +25 -24
  73. package/dist/components/Textarea/TextareaFloatingInner.cjs +6 -5
  74. package/dist/components/Textarea/TextareaFloatingInner.config.cjs +1 -1
  75. package/dist/components/Textarea/TextareaFloatingInner.config.mjs +6 -2
  76. package/dist/components/Textarea/TextareaFloatingInner.mjs +38 -36
  77. package/dist/components/Textarea/TextareaFloatingInner.module.scss.cjs +1 -1
  78. package/dist/components/Textarea/TextareaFloatingInner.module.scss.mjs +14 -12
  79. package/dist/config/resources/index.cjs +1 -1
  80. package/dist/config/resources/index.mjs +1 -1
  81. package/dist/config/tailwind/colors.cjs +1 -1
  82. package/dist/config/tailwind/colors.mjs +22 -1
  83. package/dist/config/tailwind/typography.cjs +1 -1
  84. package/dist/config/tailwind/typography.mjs +79 -4
  85. package/dist/package.json.cjs +1 -1
  86. package/dist/package.json.d.ts +1 -1
  87. package/dist/package.json.mjs +1 -1
  88. package/dist/src/components/Breadcrumbs/Breadcrumbs.config.d.ts +1 -0
  89. package/dist/src/components/Button/Button.config.d.ts +11 -0
  90. package/dist/src/components/ButtonIcon/ButtonIcon.config.d.ts +11 -0
  91. package/dist/src/components/Calendar/Calendar.config.d.ts +19 -0
  92. package/dist/src/components/Calendar/Calendar.d.ts +5 -3
  93. package/dist/src/components/Calendar/Calendar.stories.d.ts +21 -5
  94. package/dist/src/components/Calendar/CalendarMonth.d.ts +1 -1
  95. package/dist/src/components/Calendar/CalendarRange.d.ts +1 -1
  96. package/dist/src/components/Calendar/CalendarYear.d.ts +1 -1
  97. package/dist/src/components/DatePicker/DatePicker.stories.d.ts +28 -0
  98. package/dist/src/components/DatePicker/FilterDate.d.ts +1 -1
  99. package/dist/src/components/DatePicker/FilterDate.stories.d.ts +29 -1
  100. package/dist/src/components/DatePicker/MonthYearPicker.d.ts +1 -1
  101. package/dist/src/components/DatePicker/MonthYearPicker.stories.d.ts +29 -1
  102. package/dist/src/components/Input/InputInnerLabel.config.d.ts +5 -1
  103. package/dist/src/components/Input/InputInnerLabel.stories.d.ts +16 -0
  104. package/dist/src/components/Modal/ModalDialog.config.d.ts +4 -0
  105. package/dist/src/components/Modal/ModalDialog.d.ts +1 -1
  106. package/dist/src/components/Modal/ModalDialog.stories.d.ts +1 -1
  107. package/dist/src/components/Popover/Popover.config.d.ts +7 -0
  108. package/dist/src/components/Sidebar/ItemSidebar.config.d.ts +4 -0
  109. package/dist/src/components/Sidebar/Sidebar.config.d.ts +2 -0
  110. package/dist/src/components/Textarea/TextareaFloatingInner.config.d.ts +5 -0
  111. package/dist/src/config/resources/index.d.ts +2 -2
  112. package/dist/src/config/tailwind/typography.d.ts +1 -0
  113. package/dist/src/interfaces/components/Breadcrumbs/index.d.ts +1 -1
  114. package/dist/src/interfaces/components/Button/index.d.ts +2 -2
  115. package/dist/src/interfaces/components/ButtonIcon/index.d.ts +2 -2
  116. package/dist/src/interfaces/components/Calendar/index.d.ts +41 -0
  117. package/dist/src/interfaces/components/DatePicker/index.d.ts +41 -1
  118. package/dist/src/interfaces/components/Input/index.d.ts +10 -0
  119. package/dist/src/interfaces/components/Modal/index.d.ts +5 -0
  120. package/dist/src/interfaces/components/Popover/index.d.ts +5 -0
  121. package/dist/src/interfaces/components/Sidebar/index.d.ts +6 -1
  122. package/dist/src/interfaces/components/Textarea/index.d.ts +5 -0
  123. package/dist/utils/common.cjs +1 -1
  124. package/dist/utils/common.mjs +7 -7
  125. package/package.json +1 -1
@@ -1,52 +1,104 @@
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
1
+ import { jsxs as w, Fragment as N, jsx as r } from "react/jsx-runtime";
2
+ import d, { isValidElement as te } from "react";
3
+ import ae from "./DateRangePicker.mjs";
4
+ import se from "../Popover/Popover.mjs";
5
+ import f from "../Calendar/style.module.scss.mjs";
6
+ import { formatDate as g } from "../../utils/common.mjs";
7
+ import ne from "../Button/Button.mjs";
8
+ import { configCalendar as V } from "../Calendar/Calendar.config.mjs";
9
+ const n = {
10
+ "en-US": {
11
+ Today: "Today",
12
+ "This week": "This week",
13
+ "This month": "This month",
14
+ "This year": "This year",
15
+ Yesterday: "Yesterday",
16
+ "Last week": "Last week",
17
+ "Last month": "Last month",
18
+ "Last year": "Last year",
19
+ Custom: "Custom",
20
+ Reset: "Reset"
21
+ },
22
+ "id-ID": {
23
+ Today: "Hari ini",
24
+ "This week": "Minggu ini",
25
+ "This month": "Bulan ini",
26
+ "This year": "Tahun ini",
27
+ Yesterday: "Kemarin",
28
+ "Last week": "Minggu lalu",
29
+ "Last month": "Bulan lalu",
30
+ "Last year": "Tahun lalu",
31
+ Custom: "Kustom",
32
+ Reset: "Reset"
33
+ },
34
+ "zh-CN": {
35
+ Today: "今天",
36
+ "This week": "本周",
37
+ "This month": "本月",
38
+ "This year": "今年",
39
+ Yesterday: "昨天",
40
+ "Last week": "上周",
41
+ "Last month": "上个月",
42
+ "Last year": "去年",
43
+ Custom: "自定义",
44
+ Reset: "重置"
45
+ },
46
+ "nl-NL": {
47
+ Today: "Vandaag",
48
+ "This week": "Deze week",
49
+ "This month": "Deze maand",
50
+ "This year": "Dit jaar",
51
+ Yesterday: "Gisteren",
52
+ "Last week": "Vorige week",
53
+ "Last month": "Vorige maand",
54
+ "Last year": "Vorig jaar",
55
+ Custom: "Aangepast",
56
+ Reset: "Reset"
57
+ }
58
+ }, me = ({
59
+ value: o,
60
+ prevIcon: H,
61
+ nextIcon: j,
62
+ buttonReset: T,
63
+ buttonSubmit: x,
64
+ className: W,
65
+ classNameButton: z,
66
+ buttonClick: c,
67
+ buttonList: p,
68
+ typePicker: B = "RANGE",
69
+ onChange: R,
70
+ idPopover: E = "filter-date-popover",
71
+ id: P = "filter-date",
72
+ floatingOptions: $ = {},
73
+ offsetPopover: I = 5,
74
+ zIndexPopper: K = 0,
75
+ defaultValueLabel: h,
76
+ isCustomTime: O = !1,
77
+ mountedExecuteChange: A = !0,
78
+ formatingDate: y,
79
+ variants: Y = "laba-blue-10",
80
+ locale: s = "id-ID"
29
81
  }) => {
30
- const p = [
31
- { key: "thisDay", value: "Hari ini" },
32
- { key: "thisWeek", value: "Minggu ini" },
33
- { key: "thisMonth", value: "Bulan ini" },
34
- { key: "thisYear", value: "Tahun ini" },
35
- { key: "yesterday", value: "Kemarin" },
36
- { key: "lastWeek", value: "Minggu lalu" },
37
- { key: "lastMonth", value: "Bulan lalu" },
38
- { key: "lastYear", value: "Tahun lalu" },
39
- { key: "custom", value: "Kustom" }
40
- ], S = o.useRef(null), [b, M] = o.useState(), [A, r] = o.useState(), [Y, F] = o.useState(), d = (e, t) => {
82
+ const L = [
83
+ { key: "thisDay", value: n[s].Today },
84
+ { key: "thisWeek", value: n[s]["This week"] },
85
+ { key: "thisMonth", value: n[s]["This month"] },
86
+ { key: "thisYear", value: n[s]["This year"] },
87
+ { key: "yesterday", value: n[s].Yesterday },
88
+ { key: "lastWeek", value: n[s]["Last week"] },
89
+ { key: "lastMonth", value: n[s]["Last month"] },
90
+ { key: "lastYear", value: n[s]["Last year"] },
91
+ { key: "custom", value: n[s].Custom }
92
+ ], S = d.useRef(null), [M, b] = d.useState(), [G, i] = d.useState(), [C, F] = d.useState(), m = (e, t) => {
41
93
  const a = new Date(e ?? /* @__PURE__ */ new Date());
42
94
  return t === "start" ? new Date(a.setHours(0, 0, 0)) : new Date(a.setHours(23, 59, 59));
43
- }, G = () => {
95
+ }, J = () => {
44
96
  const e = /* @__PURE__ */ new Date();
45
97
  return {
46
98
  startDate: e,
47
99
  endDate: e
48
100
  };
49
- }, I = () => {
101
+ }, U = () => {
50
102
  const e = /* @__PURE__ */ new Date();
51
103
  e.setDate(e.getDate() - e.getDay());
52
104
  const t = /* @__PURE__ */ new Date();
@@ -54,25 +106,25 @@ const le = ({
54
106
  startDate: e,
55
107
  endDate: t
56
108
  };
57
- }, J = () => {
109
+ }, q = () => {
58
110
  const e = /* @__PURE__ */ new Date(), t = new Date(e.getFullYear(), e.getMonth(), 1), a = new Date(e.getFullYear(), e.getMonth() + 1, 0);
59
111
  return {
60
112
  startDate: t,
61
113
  endDate: a
62
114
  };
63
- }, q = () => {
115
+ }, Q = () => {
64
116
  const e = new Date((/* @__PURE__ */ new Date()).getFullYear(), 0, 1), t = new Date((/* @__PURE__ */ new Date()).getFullYear(), 11, 31);
65
117
  return {
66
118
  startDate: e,
67
119
  endDate: t
68
120
  };
69
- }, C = () => {
121
+ }, X = () => {
70
122
  const e = new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate() - 1));
71
123
  return {
72
124
  startDate: e,
73
125
  endDate: e
74
126
  };
75
- }, L = () => {
127
+ }, Z = () => {
76
128
  const e = /* @__PURE__ */ new Date();
77
129
  e.setDate(e.getDate() - (7 + e.getDay()));
78
130
  const t = /* @__PURE__ */ new Date();
@@ -80,158 +132,160 @@ const le = ({
80
132
  startDate: e,
81
133
  endDate: t
82
134
  };
83
- }, Q = () => {
135
+ }, _ = () => {
84
136
  const e = /* @__PURE__ */ new Date(), t = new Date(e.getFullYear(), e.getMonth() - 1, 1), a = new Date(e.getFullYear(), e.getMonth(), 0);
85
137
  return {
86
138
  startDate: t,
87
139
  endDate: a
88
140
  };
89
- }, U = () => {
141
+ }, ee = () => {
90
142
  const e = new Date((/* @__PURE__ */ new Date()).getFullYear() - 1, 0, 1), t = new Date((/* @__PURE__ */ new Date()).getFullYear() - 1, 11, 31);
91
143
  return {
92
144
  startDate: e,
93
145
  endDate: t
94
146
  };
95
147
  }, u = (e, 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);
148
+ if (F(e), typeof R == "function") {
149
+ let D = e;
150
+ y === "string" && e ? D = {
151
+ startDate: g(e.startDate, y),
152
+ endDate: g(e.endDate, y)
153
+ } : typeof y == "boolean" && e && (D = {
154
+ startDate: g(e.startDate, "yyyy-MM-dd'T'HH:mm:ss.SSSxxx"),
155
+ endDate: g(e.endDate, "yyyy-MM-dd'T'HH:mm:ss.SSSxxx")
156
+ }), S.current?.setShow(!1), R(D, t ?? "", a);
105
157
  }
106
- }, y = (e, t) => {
107
- M(e);
158
+ }, l = (e, t) => {
159
+ b(e);
108
160
  let a;
109
161
  if (e?.key !== "custom") {
110
- switch (r(e), e?.key) {
162
+ switch (i(e), e?.key) {
111
163
  case "thisDay":
112
- a = G();
164
+ a = J();
113
165
  break;
114
166
  case "thisWeek":
115
- a = I();
167
+ a = U();
116
168
  break;
117
169
  case "thisMonth":
118
- a = J();
170
+ a = q();
119
171
  break;
120
172
  case "thisYear":
121
- a = q();
173
+ a = Q();
122
174
  break;
123
175
  case "yesterday":
124
- a = C();
176
+ a = X();
125
177
  break;
126
178
  case "lastWeek":
127
- a = L();
179
+ a = Z();
128
180
  break;
129
181
  case "lastMonth":
130
- a = Q();
182
+ a = _();
131
183
  break;
132
184
  case "lastYear":
133
- a = U();
185
+ a = ee();
134
186
  break;
135
187
  }
136
188
  a && t && u(
137
- { startDate: d(a.startDate, "start"), endDate: d(a.endDate, "end") },
189
+ { startDate: m(a.startDate, "start"), endDate: m(a.endDate, "end") },
138
190
  e?.value,
139
191
  e
140
192
  );
141
193
  }
142
- }, f = (e, t) => {
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(
194
+ }, k = (e, t) => {
195
+ const a = (p ?? L).find((D) => D.key === e);
196
+ !e && !a ? (t && u(), l(void 0, t), i(void 0)) : typeof e == "object" ? (t && u(
145
197
  {
146
- startDate: d(e.startDate, "start"),
147
- endDate: d(e.endDate, "end")
198
+ startDate: m(e.startDate, "start"),
199
+ endDate: m(e.endDate, "end")
148
200
  },
149
201
  "Kustom",
150
- { key: "custom", value: "Kustom" }
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
202
+ { key: "custom", value: n[s].Custom }
203
+ ), l({ key: "custom", value: n[s].Custom }, t), i({ key: "custom", value: n[s].Custom })) : (l(a, t), i(a));
204
+ }, v = () => {
205
+ if (o) {
206
+ F(o);
207
+ const e = (p ?? L)?.find(
208
+ (t) => t.key === o.label || t.value === o.label
157
209
  );
158
- Object.keys(e || {}).length > 0 && M(e);
210
+ Object.keys(e || {}).length > 0 && b(e);
159
211
  } else
160
- M(void 0), r(void 0);
212
+ b(void 0), i(void 0);
161
213
  };
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(
214
+ return d.useEffect(() => {
215
+ v();
216
+ }, [JSON.stringify(o)]), d.useEffect(() => {
217
+ k(h ?? o, A);
218
+ }, []), /* @__PURE__ */ w(N, { children: [
219
+ /* @__PURE__ */ w(
168
220
  "div",
169
221
  {
170
222
  onClick: (e) => {
171
- S.current?.handlerShow(e), K();
223
+ S.current?.handlerShow(e), v();
172
224
  },
173
- className: W,
174
- id: E,
225
+ className: z,
226
+ id: P,
175
227
  children: [
176
- X(l) && l,
177
- typeof l == "function" ? l(Y, A) : "Pilih Filter"
228
+ te(c) && c,
229
+ typeof c == "function" ? c(C, G) : "Pilih Filter"
178
230
  ]
179
231
  }
180
232
  ),
181
- /* @__PURE__ */ s(
182
- _,
233
+ /* @__PURE__ */ r(
234
+ se,
183
235
  {
184
- zIndex: O,
236
+ zIndex: K,
185
237
  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(
238
+ offset: I,
239
+ id: E,
240
+ floatingOptions: { placement: "bottom-end", ...$ },
241
+ children: /* @__PURE__ */ w("div", { className: `${V.selectedVariants[Y]} ${W}`, children: [
242
+ /* @__PURE__ */ w("div", { children: [
243
+ (p ?? L).map((e, t) => /* @__PURE__ */ r(
192
244
  "div",
193
245
  {
194
- className: `${h["button-filter-date"]} hover:iru-bg-laba-blue-01 ${b?.key === e.key ? "iru-text-laba-blue-10" : ""}`,
195
- onClick: () => y(e, !0),
246
+ className: `${f["button-filter-date"]} hover:iru-bg-laba-blue-01 ${M?.key === e.key ? f.selected : ""}`,
247
+ onClick: () => l(e, !0),
196
248
  children: e.value
197
249
  },
198
250
  t
199
251
  )),
200
- b?.key !== "custom" && /* @__PURE__ */ s(T, { children: typeof w == "function" ? /* @__PURE__ */ s(
252
+ M?.key !== "custom" && /* @__PURE__ */ r(N, { children: typeof T == "function" ? /* @__PURE__ */ r(
201
253
  "div",
202
254
  {
203
- className: h["button-filter-date-custome"],
204
- onClick: () => f(c, !0),
205
- children: w()
255
+ className: f["button-filter-date-custome"],
256
+ onClick: () => k(h, !0),
257
+ children: T()
206
258
  }
207
- ) : /* @__PURE__ */ s(
208
- ee,
259
+ ) : /* @__PURE__ */ r(
260
+ ne,
209
261
  {
210
- className: h["button-reset-filter-date"],
211
- variants: "nude-laba-blue-10",
262
+ className: f["button-reset-filter-date"],
263
+ variants: V.resetButtonVariant[Y],
212
264
  size: "small",
213
- onClick: () => f(c, !0),
214
- children: "Reset"
265
+ onClick: () => k(h, !0),
266
+ children: n[s].Reset
215
267
  }
216
268
  ) })
217
269
  ] }),
218
- b?.key === "custom" && /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
219
- Z,
270
+ M?.key === "custom" && /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(
271
+ ae,
220
272
  {
221
- defaultValue: Y,
222
- value: Y,
223
- prevIcon: x,
224
- nextIcon: H,
225
- buttonReset: w,
226
- buttonSubmit: N,
227
- isCustomTime: z,
273
+ defaultValue: C,
274
+ value: C,
275
+ prevIcon: H,
276
+ nextIcon: j,
277
+ buttonReset: T,
278
+ buttonSubmit: x,
279
+ isCustomTime: O,
280
+ variants: Y,
228
281
  onChange: (e) => {
229
- u(e, "Kustom", { key: "custom", value: "Kustom" }), r({ key: "custom", value: "Kustom" });
282
+ u(e, n[s].Custom, { key: "custom", value: n[s].Custom }), i({ key: "custom", value: n[s].Custom });
230
283
  },
231
284
  onReset: () => {
232
- f(c, !0);
285
+ k(h, !0);
233
286
  },
234
- typePicker: j,
287
+ typePicker: B,
288
+ locale: s,
235
289
  withConfirm: !0
236
290
  }
237
291
  ) })
@@ -241,5 +295,5 @@ const le = ({
241
295
  ] });
242
296
  };
243
297
  export {
244
- le as default
298
+ me as default
245
299
  };
@@ -1 +1 @@
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
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),w=require("react"),C=require("react-aria"),p=require("@internationalized/date"),D=require("../Popover/Popover.cjs"),T=require("../Calendar/Calendar.cjs"),c=(n,s)=>{let a;if(n){const o=new Intl.DateTimeFormat(s,{year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(new Date(n)),d=o.find(e=>e.type==="year")?.value,l=o.find(e=>e.type==="month")?.value,u=o.find(e=>e.type==="day")?.value;return a=p.parseDate(`${d}-${l}-${u}`),a}},k=({month:n,year:s,type:a=["month","year"],activeType:h="month",minDate:o,maxDate:d,className:l,classNameButton:u,onChange:e,buttonClick:m,id:g="date-picker",idPopover:v="date-picker-popover",floatingOptions:y={},offsetPopover:P=5,zIndexPopper:j=1,hiddenHeader:x,variants:$="laba-blue-10",locale:i="id-ID"})=>{const f=w.useRef(null),q=c(o,i),S=c(d,i),b=t=>{typeof e=="function"&&(e({month:t.month,year:t.year}),f.current?.setShow(!1))};return r.jsxs(r.Fragment,{children:[r.jsx("div",{id:g,onClick:t=>{t.stopPropagation(),f.current?.handlerShow(t)},className:u,children:typeof m=="function"?m({month:n,year:s}):"Pilih Tanggal"}),r.jsx("div",{className:l??"",children:r.jsx(D.default,{zIndex:j,ref:f,offset:P,id:v,floatingOptions:{placement:"bottom-end",...y},onClick:t=>t.stopPropagation(),children:r.jsx(C.I18nProvider,{locale:i,children:r.jsx(T.default,{minValue:q,maxValue:S,minDate:o,maxDate:d,activeType:a.length===1?a[0]:h,locale:i,value:c(`${s}/${n}/1`,i),createCalendar:p.createCalendar,defaultValue:c(`${s}/${n}/1`,i),onChange:b,handlerReset:()=>{},handlerSubmit:()=>{},withDateSelect:!1,type:a,hiddenHeader:x,variants:$})})})})]})};exports.default=k;
@@ -1,75 +1,84 @@
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) => {
1
+ import { jsxs as C, Fragment as I, jsx as d } from "react/jsx-runtime";
2
+ import S from "react";
3
+ import { I18nProvider as T } from "react-aria";
4
+ import { createCalendar as b, parseDate as R } from "@internationalized/date";
5
+ import V from "../Popover/Popover.mjs";
6
+ import j from "../Calendar/Calendar.mjs";
7
+ const m = (r, i) => {
8
8
  let o;
9
- const r = new Date(t ?? /* @__PURE__ */ new Date());
10
- return t && (o = y(new Date(r.setHours(r.getHours() + 7)).toISOString().slice(0, 10))), o;
11
- }, M = ({
12
- month: t,
13
- year: o,
14
- type: r = ["month", "year"],
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",
9
+ if (r) {
10
+ const n = new Intl.DateTimeFormat(i, {
11
+ year: "numeric",
12
+ month: "2-digit",
13
+ day: "2-digit"
14
+ }).formatToParts(new Date(r)), s = n.find((e) => e.type === "year")?.value, f = n.find((e) => e.type === "month")?.value, c = n.find((e) => e.type === "day")?.value;
15
+ return o = R(`${s}-${f}-${c}`), o;
16
+ }
17
+ }, q = ({
18
+ month: r,
19
+ year: i,
20
+ type: o = ["month", "year"],
21
+ activeType: p = "month",
22
+ minDate: n,
23
+ maxDate: s,
24
+ className: f,
25
+ classNameButton: c,
26
+ onChange: e,
27
+ buttonClick: h,
28
+ id: u = "date-picker",
29
+ idPopover: y = "date-picker-popover",
24
30
  floatingOptions: g = {},
25
31
  offsetPopover: v = 5,
26
32
  zIndexPopper: P = 1,
27
- hiddenHeader: w
33
+ hiddenHeader: $,
34
+ variants: w = "laba-blue-10",
35
+ locale: a = "id-ID"
28
36
  }) => {
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));
37
+ const l = S.useRef(null), D = m(n, a), k = m(s, a), x = (t) => {
38
+ typeof e == "function" && (e({ month: t.month, year: t.year }), l.current?.setShow(!1));
31
39
  };
32
40
  return /* @__PURE__ */ C(I, { children: [
33
- /* @__PURE__ */ a(
41
+ /* @__PURE__ */ d(
34
42
  "div",
35
43
  {
36
- id: h,
37
- onClick: (e) => {
38
- e.stopPropagation(), i.current?.handlerShow(e);
44
+ id: u,
45
+ onClick: (t) => {
46
+ t.stopPropagation(), l.current?.handlerShow(t);
39
47
  },
40
- className: p,
41
- children: typeof d == "function" ? d({ month: t, year: o }) : "Pilih Tanggal"
48
+ className: c,
49
+ children: typeof h == "function" ? h({ month: r, year: i }) : "Pilih Tanggal"
42
50
  }
43
51
  ),
44
- /* @__PURE__ */ a("div", { className: m ?? "", children: /* @__PURE__ */ a(
45
- H,
52
+ /* @__PURE__ */ d("div", { className: f ?? "", children: /* @__PURE__ */ d(
53
+ V,
46
54
  {
47
55
  zIndex: P,
48
- ref: i,
56
+ ref: l,
49
57
  offset: v,
50
- id: u,
58
+ id: y,
51
59
  floatingOptions: { placement: "bottom-end", ...g },
52
- onClick: (e) => e.stopPropagation(),
53
- children: /* @__PURE__ */ a(V, { locale: "id-ID", children: /* @__PURE__ */ a(
54
- N,
60
+ onClick: (t) => t.stopPropagation(),
61
+ children: /* @__PURE__ */ d(T, { locale: a, children: /* @__PURE__ */ d(
62
+ j,
55
63
  {
56
- minValue: S,
64
+ minValue: D,
57
65
  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`),
66
+ minDate: n,
67
+ maxDate: s,
68
+ activeType: o.length === 1 ? o[0] : p,
69
+ locale: a,
70
+ value: m(`${i}/${r}/1`, a),
71
+ createCalendar: b,
72
+ defaultValue: m(`${i}/${r}/1`, a),
65
73
  onChange: x,
66
74
  handlerReset: () => {
67
75
  },
68
76
  handlerSubmit: () => {
69
77
  },
70
78
  withDateSelect: !1,
71
- type: r,
72
- hiddenHeader: w
79
+ type: o,
80
+ hiddenHeader: $,
81
+ variants: w
73
82
  }
74
83
  ) })
75
84
  }
@@ -77,5 +86,5 @@ const n = (t) => {
77
86
  ] });
78
87
  };
79
88
  export {
80
- M as default
89
+ q as default
81
90
  };
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("react/jsx-runtime"),t=require("react"),e=require("./InputInnerLabel.module.scss.cjs"),y=require("./InputInnerLabel.config.cjs"),o=t.forwardRef((u,f)=>{const{isRequired:m,classNameContainer:b,className:p,classNameLabel:I,classNameLabelError:$,name:d,id:c,label:n,type:N="text",startIcon:s,endIcon:a,error:i,sizeInput:h="large",...r}=u,j=()=>typeof s=="function"||t.isValidElement(s),x=()=>typeof a=="function"||t.isValidElement(a);return l.jsxs("div",{className:`${y.configInputInnerLabel.size[h]} ${b??""}
2
- ${n?"":e.default["hidden-label"]}`,children:[l.jsxs("div",{className:`${e.default["container-input"]}`,children:[l.jsxs("div",{className:e.default["start-icon"],children:[typeof s=="function"&&s(),t.isValidElement(s)&&s]}),l.jsx("input",{id:c??d,className:`${e.default.input} ${i?e.default.error:""}
3
- ${j()?e.default["isset-left-icon"]:""}
4
- ${x()?e.default["isset-right-icon"]:""}
5
- ${p??""}`,ref:f,type:N,...r}),l.jsxs("div",{className:e.default["end-icon"],children:[typeof a=="function"&&a(),t.isValidElement(a)&&a]}),n&&l.jsxs("label",{htmlFor:c??d,className:`${e.default.label} ${r.disabled?e.default.disabled:""} ${I??""}`,children:[n," ",m&&l.jsx("span",{children:"*"})]})]}),i&&l.jsx("label",{className:`${e.default["label-error"]}
6
- ${r.disabled?e.default.disabled:""} ${$??""}`,children:i})]})});o.displayName="InputInnerLabel";exports.default=o;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react/jsx-runtime"),t=require("react"),e=require("./InputInnerLabel.module.scss.cjs"),o=require("./InputInnerLabel.config.cjs"),u=t.forwardRef((f,b)=>{const{isRequired:m,classNameContainer:p,className:I,classNameLabel:$,classNameLabelError:N,name:d,id:c,label:s,type:h="text",startIcon:l,endIcon:n,error:i,sizeInput:j="large",variant:x="bill-blue-800",...r}=f,v=()=>typeof l=="function"||t.isValidElement(l),L=()=>typeof n=="function"||t.isValidElement(n);return a.jsxs("div",{className:`${o.configInputInnerLabel.size[j]} ${o.configInputInnerLabel.variant[x]}
2
+ ${p??""} ${s?"":e.default["hidden-label"]}`,children:[a.jsxs("div",{className:`${e.default["container-input"]}`,children:[a.jsxs("div",{className:e.default["start-icon"],children:[typeof l=="function"&&l(),t.isValidElement(l)&&l]}),a.jsx("input",{id:c??d,className:`${e.default.input} ${i?e.default.error:""}
3
+ ${v()?e.default["isset-left-icon"]:""}
4
+ ${L()?e.default["isset-right-icon"]:""}
5
+ ${I??""}`,ref:b,type:h,...r}),a.jsxs("div",{className:e.default["end-icon"],children:[typeof n=="function"&&n(),t.isValidElement(n)&&n]}),s&&a.jsxs("label",{htmlFor:c??d,className:`${e.default.label} ${r.disabled?e.default.disabled:""} ${$??""}`,children:[s," ",m&&a.jsx("span",{children:"*"})]})]}),i&&a.jsx("label",{className:`${e.default["label-error"]}
6
+ ${r.disabled?e.default.disabled:""} ${N??""}`,children:i})]})});u.displayName="InputInnerLabel";exports.default=u;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./InputInnerLabel.module.scss.cjs"),n={size:{large:e.default["container-large"],small:e.default["container-small"]}};exports.configInputInnerLabel=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./InputInnerLabel.module.scss.cjs"),l={size:{large:e.default["container-large"],small:e.default["container-small"]},variant:{"bill-blue-800":e.default["bill-blue-800"],"fin-black":e.default["fin-black"]}};exports.configInputInnerLabel=l;
@@ -1,10 +1,14 @@
1
- import e from "./InputInnerLabel.module.scss.mjs";
2
- const l = {
1
+ import l from "./InputInnerLabel.module.scss.mjs";
2
+ const a = {
3
3
  size: {
4
- large: e["container-large"],
5
- small: e["container-small"]
4
+ large: l["container-large"],
5
+ small: l["container-small"]
6
+ },
7
+ variant: {
8
+ "bill-blue-800": l["bill-blue-800"],
9
+ "fin-black": l["fin-black"]
6
10
  }
7
11
  };
8
12
  export {
9
- l as configInputInnerLabel
13
+ a as configInputInnerLabel
10
14
  };