@vincisys/eyeson 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type LucideIcon } from 'lucide-react';
|
|
1
2
|
import { type ChangeEvent, type ComponentProps } from 'react';
|
|
2
3
|
export type InputState = 'default' | 'valid' | 'loading' | 'invalid';
|
|
3
4
|
export type InputFormat = 'cep' | 'cpf' | 'cnpj' | 'cpfOrCnpj' | 'phone';
|
|
@@ -26,7 +27,9 @@ export type InputProps = Omit<ComponentProps<'input'>, 'className' | 'type' | 'r
|
|
|
26
27
|
disableAutocomplete?: boolean;
|
|
27
28
|
isLoading?: boolean;
|
|
28
29
|
loadingIconPosition?: 'start' | 'end';
|
|
30
|
+
/** Ícone decorativo exibido no início do campo (ex.: `Search` para um campo de busca). */
|
|
31
|
+
icon?: LucideIcon;
|
|
29
32
|
onChange?: (value: string, event: ChangeEvent<HTMLInputElement>) => void;
|
|
30
33
|
};
|
|
31
|
-
export default function Input({ className, label, disabled, state, size, inputType, required, placeholder, errorMessage, fluid, format, tooltip, linkText, linkUrl, supportLink, supportLinkUrl, supportingText, lazy, floatingLabel, disableAutocomplete, isLoading, loadingIconPosition, defaultValue, value, id, name, onBlur, onFocus, onKeyDown, onClick, onChange, ...props }: InputProps): import("react").JSX.Element;
|
|
34
|
+
export default function Input({ className, label, disabled, state, size, inputType, required, placeholder, errorMessage, fluid, format, tooltip, linkText, linkUrl, supportLink, supportLinkUrl, supportingText, lazy, floatingLabel, disableAutocomplete, isLoading, loadingIconPosition, icon: Icon, defaultValue, value, id, name, onBlur, onFocus, onKeyDown, onClick, onChange, ...props }: InputProps): import("react").JSX.Element;
|
|
32
35
|
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAmB,KAAK,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAmB/E,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;AACrE,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,WAAW,GAAG,OAAO,CAAC;AACzE,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAoB3C,MAAM,MAAM,UAAU,GAAG,IAAI,CAC5B,cAAc,CAAC,OAAO,CAAC,EACvB,WAAW,GAAG,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,CACvD,GAAG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,uDAAuD;IACvD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,mBAAmB,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IACtC,0FAA0F;IAC1F,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CACzE,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAC7B,SAAS,EACT,KAAe,EACf,QAAgB,EAChB,KAAiB,EACjB,IAAW,EACX,SAAkB,EAClB,QAAgB,EAChB,WAA8B,EAC9B,YAAkC,EAClC,KAAa,EACb,MAAM,EACN,OAAc,EACd,QAAe,EACf,OAAc,EACd,WAAkB,EAClB,cAAqB,EACrB,cAAmB,EACnB,IAAY,EACZ,aAAoB,EACpB,mBAA2B,EAC3B,SAAiB,EACjB,mBAA2B,EAC3B,IAAI,EAAE,IAAI,EACV,YAAY,EACZ,KAAK,EACL,EAAE,EACF,IAAI,EACJ,MAAM,EACN,OAAO,EACP,SAAS,EACT,OAAO,EACP,QAAQ,EACR,GAAG,KAAK,EACR,EAAE,UAAU,+BAgMZ"}
|
package/dist/index.js
CHANGED
|
@@ -114,32 +114,32 @@ var ne = [
|
|
|
114
114
|
"red-dark",
|
|
115
115
|
"red-main",
|
|
116
116
|
"red-middle"
|
|
117
|
-
], L = 365.2425,
|
|
117
|
+
], L = 365.2425, re = 6048e5, R = 864e5, ie = 3600 * 24;
|
|
118
118
|
ie * 7, ie * L / 12 * 3;
|
|
119
|
-
var
|
|
119
|
+
var ae = Symbol.for("constructDateFrom");
|
|
120
120
|
//#endregion
|
|
121
121
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructFrom.js
|
|
122
|
-
function
|
|
123
|
-
return typeof e == "function" ? e(t) : e && typeof e == "object" &&
|
|
122
|
+
function z(e, t) {
|
|
123
|
+
return typeof e == "function" ? e(t) : e && typeof e == "object" && ae in e ? e[ae](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
124
124
|
}
|
|
125
125
|
//#endregion
|
|
126
126
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/toDate.js
|
|
127
|
-
function
|
|
128
|
-
return
|
|
127
|
+
function B(e, t) {
|
|
128
|
+
return z(t || e, e);
|
|
129
129
|
}
|
|
130
130
|
//#endregion
|
|
131
131
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/addDays.js
|
|
132
|
-
function
|
|
133
|
-
let r =
|
|
134
|
-
return isNaN(t) ?
|
|
132
|
+
function oe(e, t, n) {
|
|
133
|
+
let r = B(e, n?.in);
|
|
134
|
+
return isNaN(t) ? z(n?.in || e, NaN) : (t && r.setDate(r.getDate() + t), r);
|
|
135
135
|
}
|
|
136
136
|
//#endregion
|
|
137
137
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/addMonths.js
|
|
138
|
-
function
|
|
139
|
-
let r =
|
|
140
|
-
if (isNaN(t)) return
|
|
138
|
+
function V(e, t, n) {
|
|
139
|
+
let r = B(e, n?.in);
|
|
140
|
+
if (isNaN(t)) return z(n?.in || e, NaN);
|
|
141
141
|
if (!t) return r;
|
|
142
|
-
let i = r.getDate(), a =
|
|
142
|
+
let i = r.getDate(), a = z(n?.in || e, r.getTime());
|
|
143
143
|
return a.setMonth(r.getMonth() + t + 1, 0), i >= a.getDate() ? a : (r.setFullYear(a.getFullYear(), a.getMonth(), i), r);
|
|
144
144
|
}
|
|
145
145
|
//#endregion
|
|
@@ -151,7 +151,7 @@ function H() {
|
|
|
151
151
|
//#endregion
|
|
152
152
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeek.js
|
|
153
153
|
function U(e, t) {
|
|
154
|
-
let n = H(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, i =
|
|
154
|
+
let n = H(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, i = B(e, t?.in), a = i.getDay(), o = (a < r ? 7 : 0) + a - r;
|
|
155
155
|
return i.setDate(i.getDate() - o), i.setHours(0, 0, 0, 0), i;
|
|
156
156
|
}
|
|
157
157
|
//#endregion
|
|
@@ -165,9 +165,9 @@ function W(e, t) {
|
|
|
165
165
|
//#endregion
|
|
166
166
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeekYear.js
|
|
167
167
|
function ce(e, t) {
|
|
168
|
-
let n =
|
|
168
|
+
let n = B(e, t?.in), r = n.getFullYear(), i = z(n, 0);
|
|
169
169
|
i.setFullYear(r + 1, 0, 4), i.setHours(0, 0, 0, 0);
|
|
170
|
-
let a = W(i), o =
|
|
170
|
+
let a = W(i), o = z(n, 0);
|
|
171
171
|
o.setFullYear(r, 0, 4), o.setHours(0, 0, 0, 0);
|
|
172
172
|
let s = W(o);
|
|
173
173
|
return n.getTime() >= a.getTime() ? r + 1 : n.getTime() >= s.getTime() ? r : r - 1;
|
|
@@ -175,37 +175,37 @@ function ce(e, t) {
|
|
|
175
175
|
//#endregion
|
|
176
176
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
|
|
177
177
|
function le(e) {
|
|
178
|
-
let t =
|
|
178
|
+
let t = B(e), n = new Date(Date.UTC(t.getFullYear(), t.getMonth(), t.getDate(), t.getHours(), t.getMinutes(), t.getSeconds(), t.getMilliseconds()));
|
|
179
179
|
return n.setUTCFullYear(t.getFullYear()), e - +n;
|
|
180
180
|
}
|
|
181
181
|
//#endregion
|
|
182
182
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/normalizeDates.js
|
|
183
183
|
function ue(e, ...t) {
|
|
184
|
-
let n =
|
|
184
|
+
let n = z.bind(null, e || t.find((e) => typeof e == "object"));
|
|
185
185
|
return t.map(n);
|
|
186
186
|
}
|
|
187
187
|
//#endregion
|
|
188
188
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfDay.js
|
|
189
189
|
function de(e, t) {
|
|
190
|
-
let n =
|
|
190
|
+
let n = B(e, t?.in);
|
|
191
191
|
return n.setHours(0, 0, 0, 0), n;
|
|
192
192
|
}
|
|
193
193
|
//#endregion
|
|
194
194
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/differenceInCalendarDays.js
|
|
195
195
|
function fe(e, t, n) {
|
|
196
196
|
let [r, i] = ue(n?.in, e, t), a = de(r), o = de(i), s = +a - le(a), c = +o - le(o);
|
|
197
|
-
return Math.round((s - c) /
|
|
197
|
+
return Math.round((s - c) / R);
|
|
198
198
|
}
|
|
199
199
|
//#endregion
|
|
200
200
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeekYear.js
|
|
201
201
|
function pe(e, t) {
|
|
202
|
-
let n = ce(e, t), r =
|
|
202
|
+
let n = ce(e, t), r = z(t?.in || e, 0);
|
|
203
203
|
return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), W(r);
|
|
204
204
|
}
|
|
205
205
|
//#endregion
|
|
206
206
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructNow.js
|
|
207
207
|
function me(e) {
|
|
208
|
-
return
|
|
208
|
+
return z(e, Date.now());
|
|
209
209
|
}
|
|
210
210
|
//#endregion
|
|
211
211
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isSameDay.js
|
|
@@ -221,30 +221,30 @@ function he(e) {
|
|
|
221
221
|
//#endregion
|
|
222
222
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isValid.js
|
|
223
223
|
function ge(e) {
|
|
224
|
-
return !(!he(e) && typeof e != "number" || isNaN(+
|
|
224
|
+
return !(!he(e) && typeof e != "number" || isNaN(+B(e)));
|
|
225
225
|
}
|
|
226
226
|
//#endregion
|
|
227
227
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/endOfMonth.js
|
|
228
228
|
function _e(e, t) {
|
|
229
|
-
let n =
|
|
229
|
+
let n = B(e, t?.in), r = n.getMonth();
|
|
230
230
|
return n.setFullYear(n.getFullYear(), r + 1, 0), n.setHours(23, 59, 59, 999), n;
|
|
231
231
|
}
|
|
232
232
|
//#endregion
|
|
233
233
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfMonth.js
|
|
234
234
|
function ve(e, t) {
|
|
235
|
-
let n =
|
|
235
|
+
let n = B(e, t?.in);
|
|
236
236
|
return n.setDate(1), n.setHours(0, 0, 0, 0), n;
|
|
237
237
|
}
|
|
238
238
|
//#endregion
|
|
239
239
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfYear.js
|
|
240
240
|
function ye(e, t) {
|
|
241
|
-
let n =
|
|
241
|
+
let n = B(e, t?.in);
|
|
242
242
|
return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
243
243
|
}
|
|
244
244
|
//#endregion
|
|
245
245
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/endOfWeek.js
|
|
246
246
|
function be(e, t) {
|
|
247
|
-
let n = H(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, i =
|
|
247
|
+
let n = H(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, i = B(e, t?.in), a = i.getDay(), o = (a < r ? -7 : 0) + 6 - (a - r);
|
|
248
248
|
return i.setDate(i.getDate() + o), i.setHours(23, 59, 59, 999), i;
|
|
249
249
|
}
|
|
250
250
|
//#endregion
|
|
@@ -748,21 +748,21 @@ var Ae = {
|
|
|
748
748
|
//#endregion
|
|
749
749
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getDayOfYear.js
|
|
750
750
|
function je(e, t) {
|
|
751
|
-
let n =
|
|
751
|
+
let n = B(e, t?.in);
|
|
752
752
|
return fe(n, ye(n)) + 1;
|
|
753
753
|
}
|
|
754
754
|
//#endregion
|
|
755
755
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeek.js
|
|
756
756
|
function Me(e, t) {
|
|
757
|
-
let n =
|
|
758
|
-
return Math.round(r /
|
|
757
|
+
let n = B(e, t?.in), r = W(n) - +pe(n);
|
|
758
|
+
return Math.round(r / re) + 1;
|
|
759
759
|
}
|
|
760
760
|
//#endregion
|
|
761
761
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeekYear.js
|
|
762
762
|
function Ne(e, t) {
|
|
763
|
-
let n =
|
|
763
|
+
let n = B(e, t?.in), r = n.getFullYear(), i = H(), a = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? i.firstWeekContainsDate ?? i.locale?.options?.firstWeekContainsDate ?? 1, o = z(t?.in || e, 0);
|
|
764
764
|
o.setFullYear(r + 1, 0, a), o.setHours(0, 0, 0, 0);
|
|
765
|
-
let s = U(o, t), c =
|
|
765
|
+
let s = U(o, t), c = z(t?.in || e, 0);
|
|
766
766
|
c.setFullYear(r, 0, a), c.setHours(0, 0, 0, 0);
|
|
767
767
|
let l = U(c, t);
|
|
768
768
|
return +n >= +s ? r + 1 : +n >= +l ? r : r - 1;
|
|
@@ -770,14 +770,14 @@ function Ne(e, t) {
|
|
|
770
770
|
//#endregion
|
|
771
771
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeekYear.js
|
|
772
772
|
function Pe(e, t) {
|
|
773
|
-
let n = H(), r = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, i = Ne(e, t), a =
|
|
773
|
+
let n = H(), r = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, i = Ne(e, t), a = z(t?.in || e, 0);
|
|
774
774
|
return a.setFullYear(i, 0, r), a.setHours(0, 0, 0, 0), U(a, t);
|
|
775
775
|
}
|
|
776
776
|
//#endregion
|
|
777
777
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeek.js
|
|
778
778
|
function Fe(e, t) {
|
|
779
|
-
let n =
|
|
780
|
-
return Math.round(r /
|
|
779
|
+
let n = B(e, t?.in), r = U(n, t) - +Pe(n, t);
|
|
780
|
+
return Math.round(r / re) + 1;
|
|
781
781
|
}
|
|
782
782
|
//#endregion
|
|
783
783
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/addLeadingZeros.js
|
|
@@ -1258,7 +1258,7 @@ function Ye(e, t, n) {
|
|
|
1258
1258
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/format.js
|
|
1259
1259
|
var Xe = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Ze = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Qe = /^'([^]*?)'?$/, $e = /''/g, et = /[a-zA-Z]/;
|
|
1260
1260
|
function Q(e, t, n) {
|
|
1261
|
-
let r = H(), i = n?.locale ?? r.locale ?? Ae, a = n?.firstWeekContainsDate ?? n?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, o = n?.weekStartsOn ?? n?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, s =
|
|
1261
|
+
let r = H(), i = n?.locale ?? r.locale ?? Ae, a = n?.firstWeekContainsDate ?? n?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, o = n?.weekStartsOn ?? n?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, s = B(e, n?.in);
|
|
1262
1262
|
if (!ge(s)) throw RangeError("Invalid time value");
|
|
1263
1263
|
let c = t.match(Ze).map((e) => {
|
|
1264
1264
|
let t = e[0];
|
|
@@ -1308,12 +1308,12 @@ function tt(e) {
|
|
|
1308
1308
|
//#endregion
|
|
1309
1309
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isAfter.js
|
|
1310
1310
|
function nt(e, t) {
|
|
1311
|
-
return +
|
|
1311
|
+
return +B(e) > +B(t);
|
|
1312
1312
|
}
|
|
1313
1313
|
//#endregion
|
|
1314
1314
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isBefore.js
|
|
1315
1315
|
function rt(e, t) {
|
|
1316
|
-
return +
|
|
1316
|
+
return +B(e) < +B(t);
|
|
1317
1317
|
}
|
|
1318
1318
|
//#endregion
|
|
1319
1319
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isSameMonth.js
|
|
@@ -1324,12 +1324,12 @@ function it(e, t, n) {
|
|
|
1324
1324
|
//#endregion
|
|
1325
1325
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isToday.js
|
|
1326
1326
|
function at(e, t) {
|
|
1327
|
-
return G(
|
|
1327
|
+
return G(z(t?.in || e, e), me(t?.in || e));
|
|
1328
1328
|
}
|
|
1329
1329
|
//#endregion
|
|
1330
1330
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/subMonths.js
|
|
1331
1331
|
function ot(e, t, n) {
|
|
1332
|
-
return
|
|
1332
|
+
return V(e, -t, n);
|
|
1333
1333
|
}
|
|
1334
1334
|
//#endregion
|
|
1335
1335
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/pt-BR/_lib/formatDistance.js
|
|
@@ -1822,7 +1822,7 @@ var mt = [
|
|
|
1822
1822
|
];
|
|
1823
1823
|
function ht(e, t) {
|
|
1824
1824
|
let n = U(ve(e), { weekStartsOn: t }), r = be(_e(e), { weekStartsOn: t }), i = [];
|
|
1825
|
-
for (let e = n; e <= r; e =
|
|
1825
|
+
for (let e = n; e <= r; e = oe(e, 1)) i.push(e);
|
|
1826
1826
|
return i;
|
|
1827
1827
|
}
|
|
1828
1828
|
function gt({ month: e, defaultMonth: t, onMonthChange: n, events: r = [], maxVisibleEvents: o = 3, weekStartsOn: s = 0, onDayClick: c, onEventClick: l, renderEvent: u, showNavigation: d = !0, className: m }) {
|
|
@@ -1856,7 +1856,7 @@ function gt({ month: e, defaultMonth: t, onMonthChange: n, events: r = [], maxVi
|
|
|
1856
1856
|
icon: a,
|
|
1857
1857
|
label: "Próximo mês",
|
|
1858
1858
|
size: "sm",
|
|
1859
|
-
onClick: () => w(
|
|
1859
|
+
onClick: () => w(V(v, 1))
|
|
1860
1860
|
})]
|
|
1861
1861
|
})]
|
|
1862
1862
|
}), /* @__PURE__ */ p("div", {
|
|
@@ -2205,7 +2205,7 @@ var Vt = {
|
|
|
2205
2205
|
];
|
|
2206
2206
|
function Wt(e, t) {
|
|
2207
2207
|
let n = U(ve(e), { weekStartsOn: t }), r = be(_e(e), { weekStartsOn: t }), i = [];
|
|
2208
|
-
for (let e = n; e <= r; e =
|
|
2208
|
+
for (let e = n; e <= r; e = oe(e, 1)) i.push(e);
|
|
2209
2209
|
return i;
|
|
2210
2210
|
}
|
|
2211
2211
|
function $(e) {
|
|
@@ -2224,11 +2224,11 @@ function Gt(e) {
|
|
|
2224
2224
|
} : e.value === void 0 ? void 0 : {
|
|
2225
2225
|
from: e.value ?? null,
|
|
2226
2226
|
to: null
|
|
2227
|
-
}, M = j !== void 0, [N, P] = x(k), F = M ? j : N, te = $(e) ? Math.max(1, e.numberOfMonths ?? 1) : 1, I = $(e) ? e.presets : void 0, [ne, L] = x(!1), [
|
|
2228
|
-
function
|
|
2229
|
-
o || (t &&
|
|
2227
|
+
}, M = j !== void 0, [N, P] = x(k), F = M ? j : N, te = $(e) ? Math.max(1, e.numberOfMonths ?? 1) : 1, I = $(e) ? e.presets : void 0, [ne, L] = x(!1), [re, R] = x(() => F.from ?? e.defaultMonth ?? /* @__PURE__ */ new Date()), ie = y(() => [...Ut.slice(g), ...Ut.slice(0, g)], [g]), ae = y(() => Array.from({ length: te }, (e, t) => V(re, t)), [re, te]);
|
|
2228
|
+
function z(t) {
|
|
2229
|
+
o || (t && R(F.from ?? e.defaultMonth ?? /* @__PURE__ */ new Date()), L(t));
|
|
2230
2230
|
}
|
|
2231
|
-
function
|
|
2231
|
+
function B(t) {
|
|
2232
2232
|
if ($(e)) {
|
|
2233
2233
|
let n = F, r;
|
|
2234
2234
|
r = !n.from || n.to ? {
|
|
@@ -2251,7 +2251,7 @@ function Gt(e) {
|
|
|
2251
2251
|
to: null
|
|
2252
2252
|
}), e.onValueChange?.(t), L(!1);
|
|
2253
2253
|
}
|
|
2254
|
-
function
|
|
2254
|
+
function oe(t) {
|
|
2255
2255
|
let n = {
|
|
2256
2256
|
from: t.from,
|
|
2257
2257
|
to: t.to ?? null
|
|
@@ -2259,7 +2259,7 @@ function Gt(e) {
|
|
|
2259
2259
|
M || P(n), $(e) && e.onValueChange?.({
|
|
2260
2260
|
from: t.from,
|
|
2261
2261
|
to: t.to ?? void 0
|
|
2262
|
-
}),
|
|
2262
|
+
}), R(t.from);
|
|
2263
2263
|
}
|
|
2264
2264
|
function se(e) {
|
|
2265
2265
|
return !F.from || !F.to || !e.range.to ? !1 : G(F.from, e.range.from) && G(F.to, e.range.to);
|
|
@@ -2283,7 +2283,7 @@ function Gt(e) {
|
|
|
2283
2283
|
}),
|
|
2284
2284
|
/* @__PURE__ */ p(T.Root, {
|
|
2285
2285
|
open: ne,
|
|
2286
|
-
onOpenChange:
|
|
2286
|
+
onOpenChange: z,
|
|
2287
2287
|
children: [/* @__PURE__ */ p(T.Trigger, {
|
|
2288
2288
|
id: E,
|
|
2289
2289
|
disabled: o,
|
|
@@ -2321,14 +2321,14 @@ function Gt(e) {
|
|
|
2321
2321
|
className: "flex w-40 shrink-0 flex-col gap-0.5 border-r border-eds-outline-border p-2 text-sm",
|
|
2322
2322
|
children: I.map((e) => /* @__PURE__ */ f("button", {
|
|
2323
2323
|
type: "button",
|
|
2324
|
-
onClick: () =>
|
|
2324
|
+
onClick: () => oe(e.range),
|
|
2325
2325
|
className: A("rounded-md px-3 py-1.5 text-left whitespace-nowrap", se(e) ? "bg-eds-blue-main text-white" : "text-eds-neutral-main hover:bg-eds-neutral-background"),
|
|
2326
2326
|
children: e.label
|
|
2327
2327
|
}, e.label))
|
|
2328
2328
|
}), /* @__PURE__ */ f("div", {
|
|
2329
2329
|
className: "flex",
|
|
2330
|
-
children:
|
|
2331
|
-
let n = t === 0, r = t ===
|
|
2330
|
+
children: ae.map((e, t) => {
|
|
2331
|
+
let n = t === 0, r = t === ae.length - 1, o = Wt(e, g);
|
|
2332
2332
|
return /* @__PURE__ */ p("div", {
|
|
2333
2333
|
className: A("w-[284px] shrink-0", !n && "border-l border-eds-outline-border"),
|
|
2334
2334
|
children: [/* @__PURE__ */ p("div", {
|
|
@@ -2338,7 +2338,7 @@ function Gt(e) {
|
|
|
2338
2338
|
icon: i,
|
|
2339
2339
|
label: "Mês anterior",
|
|
2340
2340
|
size: "sm",
|
|
2341
|
-
onClick: () =>
|
|
2341
|
+
onClick: () => R((e) => ot(e, 1))
|
|
2342
2342
|
}) : /* @__PURE__ */ f("span", {
|
|
2343
2343
|
className: "size-8 shrink-0",
|
|
2344
2344
|
"aria-hidden": !0
|
|
@@ -2351,7 +2351,7 @@ function Gt(e) {
|
|
|
2351
2351
|
icon: a,
|
|
2352
2352
|
label: "Próximo mês",
|
|
2353
2353
|
size: "sm",
|
|
2354
|
-
onClick: () =>
|
|
2354
|
+
onClick: () => R((e) => V(e, 1))
|
|
2355
2355
|
}) : /* @__PURE__ */ f("span", {
|
|
2356
2356
|
className: "size-8 shrink-0",
|
|
2357
2357
|
"aria-hidden": !0
|
|
@@ -2368,7 +2368,7 @@ function Gt(e) {
|
|
|
2368
2368
|
className: A("flex items-center justify-center py-0.5", o && (s || i || a) && "bg-eds-blue-main/10", o && i && "rounded-l-full", o && a && "rounded-r-full"),
|
|
2369
2369
|
children: /* @__PURE__ */ f("button", {
|
|
2370
2370
|
type: "button",
|
|
2371
|
-
onClick: () =>
|
|
2371
|
+
onClick: () => B(t),
|
|
2372
2372
|
"data-selected": c || void 0,
|
|
2373
2373
|
"data-today": r || void 0,
|
|
2374
2374
|
className: A("flex size-9 shrink-0 items-center justify-center rounded-full text-sm font-medium", c ? "bg-eds-blue-main text-white" : n ? "text-eds-neutral-main hover:bg-eds-neutral-background" : "text-eds-neutral-elements/50 hover:bg-eds-neutral-background", !c && r && "ring-1 ring-inset ring-eds-blue-main"),
|
|
@@ -2557,8 +2557,8 @@ var cn = /\D/g, ln = function(e) {
|
|
|
2557
2557
|
invalid: "not-focus-within:border-[color-mix(in_srgb,var(--color-eds-red-main)_55%,var(--color-eds-outline-border))]",
|
|
2558
2558
|
loading: "not-focus-within:border-[color-mix(in_srgb,var(--color-eds-blue-main)_45%,var(--color-eds-outline-border))]"
|
|
2559
2559
|
};
|
|
2560
|
-
function vn({ className: e, label: t = "Label", disabled: n = !1, state: r = "default", size: i = "md", inputType: a = "text", required: c = !1, placeholder: l = "Digite algo...", errorMessage: u = "Campo obrigatório", fluid: d = !1, format: m, tooltip: h = null, linkText: g = null, linkUrl: _ = null, supportLink: y = null, supportLinkUrl: b = null, supportingText: S = "", lazy: C = !1, floatingLabel: w = !0, disableAutocomplete: T = !1, isLoading: E = !1, loadingIconPosition: D = "end",
|
|
2561
|
-
let
|
|
2560
|
+
function vn({ className: e, label: t = "Label", disabled: n = !1, state: r = "default", size: i = "md", inputType: a = "text", required: c = !1, placeholder: l = "Digite algo...", errorMessage: u = "Campo obrigatório", fluid: d = !1, format: m, tooltip: h = null, linkText: g = null, linkUrl: _ = null, supportLink: y = null, supportLinkUrl: b = null, supportingText: S = "", lazy: C = !1, floatingLabel: w = !0, disableAutocomplete: T = !1, isLoading: E = !1, loadingIconPosition: D = "end", icon: O, defaultValue: k, value: j, id: M, name: N, onBlur: P, onFocus: F, onKeyDown: te, onClick: I, onChange: ne, ...L }) {
|
|
2561
|
+
let re = v(), R = M ?? re, [ie, ae] = x(() => k?.toString() ?? ""), z = j !== void 0, B = (z ? j : ie)?.toString() ?? "", oe = y ?? g, V = b ?? _, se = (e) => {
|
|
2562
2562
|
switch (m) {
|
|
2563
2563
|
case "cep": return un(e);
|
|
2564
2564
|
case "cpf": return fn(e);
|
|
@@ -2567,10 +2567,10 @@ function vn({ className: e, label: t = "Label", disabled: n = !1, state: r = "de
|
|
|
2567
2567
|
case "phone": return hn(e);
|
|
2568
2568
|
default: return e;
|
|
2569
2569
|
}
|
|
2570
|
-
},
|
|
2571
|
-
let n =
|
|
2572
|
-
z ||
|
|
2573
|
-
},
|
|
2570
|
+
}, H = (e, t) => {
|
|
2571
|
+
let n = se(e);
|
|
2572
|
+
z || ae(n), ne?.(n, t);
|
|
2573
|
+
}, U = r === "invalid", W = n || E, ce = gn[i], le = E ? /* @__PURE__ */ f("span", {
|
|
2574
2574
|
className: "inline-flex shrink-0 items-center justify-center text-eds-blue-main",
|
|
2575
2575
|
"data-position": D,
|
|
2576
2576
|
"aria-hidden": !0,
|
|
@@ -2600,73 +2600,78 @@ function vn({ className: e, label: t = "Label", disabled: n = !1, state: r = "de
|
|
|
2600
2600
|
className: "inline-flex size-7 cursor-help items-center justify-center rounded-md text-eds-neutral-elements focus-visible:outline-2 focus-visible:outline-eds-blue-main focus-visible:outline-offset-2",
|
|
2601
2601
|
"aria-label": h,
|
|
2602
2602
|
title: h,
|
|
2603
|
-
disabled:
|
|
2603
|
+
disabled: W,
|
|
2604
2604
|
children: /* @__PURE__ */ f(o, {
|
|
2605
2605
|
size: 16,
|
|
2606
2606
|
"aria-hidden": !0
|
|
2607
2607
|
})
|
|
2608
2608
|
})]
|
|
2609
|
-
}),
|
|
2609
|
+
}), oe && V && /* @__PURE__ */ f("a", {
|
|
2610
2610
|
className: "text-sm whitespace-nowrap text-eds-blue-main underline underline-offset-[0.15em] aria-disabled:pointer-events-none aria-disabled:opacity-60",
|
|
2611
|
-
href:
|
|
2612
|
-
"aria-disabled":
|
|
2613
|
-
tabIndex:
|
|
2611
|
+
href: V,
|
|
2612
|
+
"aria-disabled": W || void 0,
|
|
2613
|
+
tabIndex: W ? -1 : 0,
|
|
2614
2614
|
onClick: (e) => {
|
|
2615
|
-
|
|
2615
|
+
W && e.preventDefault();
|
|
2616
2616
|
},
|
|
2617
|
-
children:
|
|
2617
|
+
children: oe
|
|
2618
2618
|
})]
|
|
2619
2619
|
}),
|
|
2620
2620
|
/* @__PURE__ */ p("div", {
|
|
2621
|
-
className: A("group relative inline-flex w-full items-center rounded-eds-xs border border-eds-outline-border bg-white",
|
|
2622
|
-
"data-disabled":
|
|
2621
|
+
className: A("group relative inline-flex w-full items-center gap-2 rounded-eds-xs border border-eds-outline-border bg-white", ce.control, _n[r], "focus-within:border-[color-mix(in_srgb,var(--color-eds-neutral-elements)_35%,var(--color-eds-outline-border))] focus-within:shadow-[0_0_0_3px_var(--color-eds-outline-focus-ring)]", "data-disabled:cursor-not-allowed data-disabled:border-eds-outline-border data-disabled:bg-eds-neutral-background data-disabled:opacity-70"),
|
|
2622
|
+
"data-disabled": W || void 0,
|
|
2623
2623
|
"data-state": r,
|
|
2624
2624
|
"data-size": i,
|
|
2625
2625
|
"data-floating": w || void 0,
|
|
2626
2626
|
"data-has-value": B ? !0 : void 0,
|
|
2627
2627
|
children: [
|
|
2628
2628
|
w && /* @__PURE__ */ p("span", {
|
|
2629
|
-
className: It(
|
|
2629
|
+
className: It(ce.left),
|
|
2630
2630
|
children: [/* @__PURE__ */ f("span", { children: t }), c && /* @__PURE__ */ f("span", {
|
|
2631
2631
|
className: "text-eds-red-main",
|
|
2632
2632
|
"aria-hidden": "true",
|
|
2633
2633
|
children: "*"
|
|
2634
2634
|
})]
|
|
2635
2635
|
}),
|
|
2636
|
-
|
|
2636
|
+
O && /* @__PURE__ */ f(O, {
|
|
2637
|
+
className: "shrink-0 text-eds-neutral-elements",
|
|
2638
|
+
size: 16,
|
|
2639
|
+
"aria-hidden": !0
|
|
2640
|
+
}),
|
|
2641
|
+
D === "start" && le,
|
|
2637
2642
|
/* @__PURE__ */ f(ee, {
|
|
2638
|
-
...
|
|
2643
|
+
...L,
|
|
2639
2644
|
id: R,
|
|
2640
|
-
name:
|
|
2641
|
-
className: A("box-border min-w-0 flex-1 border-0 bg-transparent p-0 font-inherit text-eds-neutral-main outline-none placeholder:text-eds-neutral-elements placeholder:opacity-100",
|
|
2642
|
-
disabled:
|
|
2645
|
+
name: N,
|
|
2646
|
+
className: A("box-border min-w-0 flex-1 border-0 bg-transparent p-0 font-inherit text-eds-neutral-main outline-none placeholder:text-eds-neutral-elements placeholder:opacity-100", ce.text),
|
|
2647
|
+
disabled: W,
|
|
2643
2648
|
type: a,
|
|
2644
2649
|
required: c,
|
|
2645
2650
|
placeholder: l,
|
|
2646
|
-
autoComplete: T ? "off" :
|
|
2647
|
-
"aria-invalid":
|
|
2648
|
-
"aria-describedby":
|
|
2651
|
+
autoComplete: T ? "off" : L.autoComplete,
|
|
2652
|
+
"aria-invalid": U || void 0,
|
|
2653
|
+
"aria-describedby": U ? `${R}-desc` : void 0,
|
|
2649
2654
|
"aria-busy": E || void 0,
|
|
2650
|
-
value: z ?
|
|
2651
|
-
defaultValue: z ? void 0 :
|
|
2652
|
-
onClick:
|
|
2653
|
-
onKeyDown:
|
|
2654
|
-
onFocus:
|
|
2655
|
+
value: z ? j : void 0,
|
|
2656
|
+
defaultValue: z ? void 0 : k,
|
|
2657
|
+
onClick: I,
|
|
2658
|
+
onKeyDown: te,
|
|
2659
|
+
onFocus: F,
|
|
2655
2660
|
onBlur: (e) => {
|
|
2656
|
-
|
|
2661
|
+
P?.(e), C && H(e.currentTarget.value, e);
|
|
2657
2662
|
},
|
|
2658
2663
|
onChange: (e) => {
|
|
2659
|
-
C ||
|
|
2664
|
+
C || H(e.currentTarget.value, e);
|
|
2660
2665
|
}
|
|
2661
2666
|
}),
|
|
2662
|
-
D === "end" &&
|
|
2667
|
+
D === "end" && le
|
|
2663
2668
|
]
|
|
2664
2669
|
}),
|
|
2665
|
-
(
|
|
2670
|
+
(U || S) && /* @__PURE__ */ f("div", {
|
|
2666
2671
|
id: `${R}-desc`,
|
|
2667
2672
|
className: "text-xs text-eds-neutral-elements data-[state=invalid]:text-eds-red-main",
|
|
2668
|
-
"data-state":
|
|
2669
|
-
children:
|
|
2673
|
+
"data-state": U ? "invalid" : r,
|
|
2674
|
+
children: U ? u : S
|
|
2670
2675
|
})
|
|
2671
2676
|
]
|
|
2672
2677
|
});
|