@sigtes/ui 0.2.8 → 0.2.10
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.
- package/dist/components/checkbox/Checkbox.d.ts +1 -1
- package/dist/components/dialog/Dialog.d.ts +1 -1
- package/dist/components/dropdown-menu/Dropdown-Menu.d.ts +1 -1
- package/dist/components/form/Form.d.ts +1 -1
- package/dist/components/label/Label.d.ts +1 -1
- package/dist/components/select/Select.d.ts +1 -1
- package/dist/components/separator/Separator.d.ts +1 -1
- package/dist/components/table/index.d.ts +2 -2
- package/dist/components/tabs/Tabs.d.ts +1 -1
- package/dist/components.cjs.js +4 -4334
- package/dist/components.es.js +2678 -111341
- package/dist/pages.cjs.js +1 -1
- package/dist/pages.es.js +7 -8
- package/dist/providers.es-DW20XFKL.cjs +43 -0
- package/dist/providers.es-DkWBRd2l.js +2362 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +6 -17
- package/dist/Button-BOLYI9iw.js +0 -69
- package/dist/Button-ObM8zTKC.cjs +0 -1
- package/dist/UserProvider-Sov75KqP.cjs +0 -22
- package/dist/UserProvider-ultyW1kJ.js +0 -395
- package/dist/hooks/index.d.ts +0 -6
- package/dist/hooks/useAuthorization/index.d.ts +0 -1
- package/dist/hooks/useAuthorization/useAuthorization.d.ts +0 -2
- package/dist/hooks/useErrors/index.d.ts +0 -1
- package/dist/hooks/useErrors/useErrors.d.ts +0 -13
- package/dist/hooks/useFormState/index.d.ts +0 -1
- package/dist/hooks/useFormState/useFormState.d.ts +0 -18
- package/dist/hooks/useQuery/index.d.ts +0 -1
- package/dist/hooks/useQuery/useQuery.d.ts +0 -9
- package/dist/hooks.cjs.js +0 -1
- package/dist/hooks.es.js +0 -73
- package/dist/locale-provider-TirFJhph.cjs +0 -1
- package/dist/locale-provider-XVCCI6ZB.js +0 -831
- package/dist/models/date/date.d.ts +0 -21
- package/dist/models/date/index.d.ts +0 -1
- package/dist/models/index.d.ts +0 -1
- package/dist/models.cjs.js +0 -1
- package/dist/models.es.js +0 -143
- package/dist/providers/index.d.ts +0 -3
- package/dist/providers/locale-provider/index.d.ts +0 -1
- package/dist/providers/locale-provider/locale-provider.d.ts +0 -11
- package/dist/providers/theme-provider/ThemeProvider.d.ts +0 -3
- package/dist/providers/theme-provider/index.d.ts +0 -2
- package/dist/providers/user-provider/UserProvider.d.ts +0 -25
- package/dist/providers/user-provider/index.d.ts +0 -1
- package/dist/providers.cjs.js +0 -1
- package/dist/providers.es.js +0 -21
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
declare function getLocalDate(date: Date): string;
|
|
2
|
-
declare function getUTCtoDateMoreOneDay(date: Date): string;
|
|
3
|
-
declare function getLocalDateTime(date: Date): string;
|
|
4
|
-
declare function getUTCDate(date: Date | undefined): string | undefined;
|
|
5
|
-
declare function now(): string;
|
|
6
|
-
declare function differenceInDays(date1: Date, date2: Date): number;
|
|
7
|
-
declare function addDays(date: Date, days: number): Date;
|
|
8
|
-
declare function format(date: Date, format: string): string;
|
|
9
|
-
declare function toUTCDateString(date: Date): string;
|
|
10
|
-
export declare const date: {
|
|
11
|
-
getLocalDate: typeof getLocalDate;
|
|
12
|
-
getLocalDateTime: typeof getLocalDateTime;
|
|
13
|
-
getUTCDate: typeof getUTCDate;
|
|
14
|
-
getUTCtoDateMoreOneDay: typeof getUTCtoDateMoreOneDay;
|
|
15
|
-
now: typeof now;
|
|
16
|
-
differenceInDays: typeof differenceInDays;
|
|
17
|
-
addDays: typeof addDays;
|
|
18
|
-
format: typeof format;
|
|
19
|
-
toUTCDateString: typeof toUTCDateString;
|
|
20
|
-
};
|
|
21
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './date';
|
package/dist/models/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './date';
|
package/dist/models.cjs.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("dayjs");function x(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var h={exports:{}},H=h.exports,y;function j(){return y||(y=1,(function(e,i){(function(a,u){e.exports=u(n)})(H,(function(a){function u(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var _=u(a),Y={name:"pt-br",weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),ordinal:function(s){return s+"º"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},relativeTime:{future:"em %s",past:"há %s",s:"poucos segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"}};return _.default.locale(Y,null,!0),Y}))})(h)),h.exports}j();var m={exports:{}},q=m.exports,S;function w(){return S||(S=1,(function(e,i){(function(a,u){e.exports=u()})(q,(function(){var a="minute",u=/[+-]\d\d(?::?\d\d)?/g,_=/([+-]|\d\d)/g;return function(Y,s,l){var r=s.prototype;l.utc=function(t){var o={date:t,utc:!0,args:arguments};return new s(o)},r.utc=function(t){var o=l(this.toDate(),{locale:this.$L,utc:!0});return t?o.add(this.utcOffset(),a):o},r.local=function(){return l(this.toDate(),{locale:this.$L,utc:!1})};var T=r.parse;r.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),T.call(this,t)};var U=r.init;r.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else U.call(this)};var C=r.utcOffset;r.utcOffset=function(t,o){var d=this.$utils().u;if(d(t))return this.$u?0:d(this.$offset)?C.call(this):this.$offset;if(typeof t=="string"&&(t=(function($){$===void 0&&($="");var v=$.match(u);if(!v)return null;var D=(""+v[0]).match(_)||["-",0,0],b=D[0],g=60*+D[1]+ +D[2];return g===0?0:b==="+"?g:-g})(t),t===null))return this;var c=Math.abs(t)<=16?60*t:t;if(c===0)return this.utc(o);var f=this.clone();if(o)return f.$offset=c,f.$u=!1,f;var p=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(f=this.local().add(c+p,a)).$offset=c,f.$x.$localOffset=p,f};var L=r.format;r.format=function(t){var o=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return L.call(this,o)},r.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},r.isUTC=function(){return!!this.$u},r.toISOString=function(){return this.toDate().toISOString()},r.toString=function(){return this.toDate().toUTCString()};var O=r.toDate;r.toDate=function(t){return t==="s"&&this.$offset?l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():O.call(this)};var M=r.diff;r.diff=function(t,o,d){if(t&&this.$u===t.$u)return M.call(this,t,o,d);var c=this.local(),f=l(t).local();return M.call(c,f,o,d)}}}))})(m)),m.exports}var z=w();const B=x(z);n.extend(B);n.locale("pt-br");function P(e){return n(String(e)).format("DD/MM/YYYY")}function k(e){return n(e).utc().add(1,"day").format("YYYY-MM-DD")}function F(e){return n(String(e)).format("DD/MM/YYYY hh:mm:ss")}function I(e){if(e)return n(String(e)).utc().format("DD/MM/YYYY")}function E(){return n(new Date).format("YYYY-MM-DD")}function R(e,i){return n(e).diff(n(i),"day")}function W(e,i){return n(e).add(i,"day").toDate()}function Z(e,i){return n(new Date(e)).format(i)}function A(e){const i=e.getUTCDate().toString().padStart(2,"0"),a=(e.getUTCMonth()+1).toString().padStart(2,"0"),u=e.getUTCFullYear();return`${i}/${a}/${u}`}const G={getLocalDate:P,getLocalDateTime:F,getUTCDate:I,getUTCtoDateMoreOneDay:k,now:E,differenceInDays:R,addDays:W,format:Z,toUTCDateString:A};exports.date=G;
|
package/dist/models.es.js
DELETED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import n from "dayjs";
|
|
2
|
-
function H(e) {
|
|
3
|
-
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
|
-
}
|
|
5
|
-
var d = { exports: {} }, b = d.exports, T;
|
|
6
|
-
function j() {
|
|
7
|
-
return T || (T = 1, (function(e, i) {
|
|
8
|
-
(function(u, a) {
|
|
9
|
-
e.exports = a(n);
|
|
10
|
-
})(b, (function(u) {
|
|
11
|
-
function a(s) {
|
|
12
|
-
return s && typeof s == "object" && "default" in s ? s : { default: s };
|
|
13
|
-
}
|
|
14
|
-
var _ = a(u), Y = { name: "pt-br", weekdays: "domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"), weekdaysShort: "dom_seg_ter_qua_qui_sex_sáb".split("_"), weekdaysMin: "Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"), months: "janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"), monthsShort: "jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"), ordinal: function(s) {
|
|
15
|
-
return s + "º";
|
|
16
|
-
}, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "DD/MM/YYYY", LL: "D [de] MMMM [de] YYYY", LLL: "D [de] MMMM [de] YYYY [às] HH:mm", LLLL: "dddd, D [de] MMMM [de] YYYY [às] HH:mm" }, relativeTime: { future: "em %s", past: "há %s", s: "poucos segundos", m: "um minuto", mm: "%d minutos", h: "uma hora", hh: "%d horas", d: "um dia", dd: "%d dias", M: "um mês", MM: "%d meses", y: "um ano", yy: "%d anos" } };
|
|
17
|
-
return _.default.locale(Y, null, !0), Y;
|
|
18
|
-
}));
|
|
19
|
-
})(d)), d.exports;
|
|
20
|
-
}
|
|
21
|
-
j();
|
|
22
|
-
var m = { exports: {} }, q = m.exports, y;
|
|
23
|
-
function w() {
|
|
24
|
-
return y || (y = 1, (function(e, i) {
|
|
25
|
-
(function(u, a) {
|
|
26
|
-
e.exports = a();
|
|
27
|
-
})(q, (function() {
|
|
28
|
-
var u = "minute", a = /[+-]\d\d(?::?\d\d)?/g, _ = /([+-]|\d\d)/g;
|
|
29
|
-
return function(Y, s, l) {
|
|
30
|
-
var r = s.prototype;
|
|
31
|
-
l.utc = function(t) {
|
|
32
|
-
var o = { date: t, utc: !0, args: arguments };
|
|
33
|
-
return new s(o);
|
|
34
|
-
}, r.utc = function(t) {
|
|
35
|
-
var o = l(this.toDate(), { locale: this.$L, utc: !0 });
|
|
36
|
-
return t ? o.add(this.utcOffset(), u) : o;
|
|
37
|
-
}, r.local = function() {
|
|
38
|
-
return l(this.toDate(), { locale: this.$L, utc: !1 });
|
|
39
|
-
};
|
|
40
|
-
var S = r.parse;
|
|
41
|
-
r.parse = function(t) {
|
|
42
|
-
t.utc && (this.$u = !0), this.$utils().u(t.$offset) || (this.$offset = t.$offset), S.call(this, t);
|
|
43
|
-
};
|
|
44
|
-
var U = r.init;
|
|
45
|
-
r.init = function() {
|
|
46
|
-
if (this.$u) {
|
|
47
|
-
var t = this.$d;
|
|
48
|
-
this.$y = t.getUTCFullYear(), this.$M = t.getUTCMonth(), this.$D = t.getUTCDate(), this.$W = t.getUTCDay(), this.$H = t.getUTCHours(), this.$m = t.getUTCMinutes(), this.$s = t.getUTCSeconds(), this.$ms = t.getUTCMilliseconds();
|
|
49
|
-
} else U.call(this);
|
|
50
|
-
};
|
|
51
|
-
var C = r.utcOffset;
|
|
52
|
-
r.utcOffset = function(t, o) {
|
|
53
|
-
var h = this.$utils().u;
|
|
54
|
-
if (h(t)) return this.$u ? 0 : h(this.$offset) ? C.call(this) : this.$offset;
|
|
55
|
-
if (typeof t == "string" && (t = (function($) {
|
|
56
|
-
$ === void 0 && ($ = "");
|
|
57
|
-
var v = $.match(a);
|
|
58
|
-
if (!v) return null;
|
|
59
|
-
var D = ("" + v[0]).match(_) || ["-", 0, 0], O = D[0], M = 60 * +D[1] + +D[2];
|
|
60
|
-
return M === 0 ? 0 : O === "+" ? M : -M;
|
|
61
|
-
})(t), t === null)) return this;
|
|
62
|
-
var c = Math.abs(t) <= 16 ? 60 * t : t;
|
|
63
|
-
if (c === 0) return this.utc(o);
|
|
64
|
-
var f = this.clone();
|
|
65
|
-
if (o) return f.$offset = c, f.$u = !1, f;
|
|
66
|
-
var p = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
|
67
|
-
return (f = this.local().add(c + p, u)).$offset = c, f.$x.$localOffset = p, f;
|
|
68
|
-
};
|
|
69
|
-
var x = r.format;
|
|
70
|
-
r.format = function(t) {
|
|
71
|
-
var o = t || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
|
|
72
|
-
return x.call(this, o);
|
|
73
|
-
}, r.valueOf = function() {
|
|
74
|
-
var t = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
|
|
75
|
-
return this.$d.valueOf() - 6e4 * t;
|
|
76
|
-
}, r.isUTC = function() {
|
|
77
|
-
return !!this.$u;
|
|
78
|
-
}, r.toISOString = function() {
|
|
79
|
-
return this.toDate().toISOString();
|
|
80
|
-
}, r.toString = function() {
|
|
81
|
-
return this.toDate().toUTCString();
|
|
82
|
-
};
|
|
83
|
-
var L = r.toDate;
|
|
84
|
-
r.toDate = function(t) {
|
|
85
|
-
return t === "s" && this.$offset ? l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : L.call(this);
|
|
86
|
-
};
|
|
87
|
-
var g = r.diff;
|
|
88
|
-
r.diff = function(t, o, h) {
|
|
89
|
-
if (t && this.$u === t.$u) return g.call(this, t, o, h);
|
|
90
|
-
var c = this.local(), f = l(t).local();
|
|
91
|
-
return g.call(c, f, o, h);
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
}));
|
|
95
|
-
})(m)), m.exports;
|
|
96
|
-
}
|
|
97
|
-
var z = w();
|
|
98
|
-
const B = /* @__PURE__ */ H(z);
|
|
99
|
-
n.extend(B);
|
|
100
|
-
n.locale("pt-br");
|
|
101
|
-
function k(e) {
|
|
102
|
-
return n(String(e)).format("DD/MM/YYYY");
|
|
103
|
-
}
|
|
104
|
-
function F(e) {
|
|
105
|
-
return n(e).utc().add(1, "day").format("YYYY-MM-DD");
|
|
106
|
-
}
|
|
107
|
-
function I(e) {
|
|
108
|
-
return n(String(e)).format("DD/MM/YYYY hh:mm:ss");
|
|
109
|
-
}
|
|
110
|
-
function P(e) {
|
|
111
|
-
if (e)
|
|
112
|
-
return n(String(e)).utc().format("DD/MM/YYYY");
|
|
113
|
-
}
|
|
114
|
-
function E() {
|
|
115
|
-
return n(/* @__PURE__ */ new Date()).format("YYYY-MM-DD");
|
|
116
|
-
}
|
|
117
|
-
function R(e, i) {
|
|
118
|
-
return n(e).diff(n(i), "day");
|
|
119
|
-
}
|
|
120
|
-
function W(e, i) {
|
|
121
|
-
return n(e).add(i, "day").toDate();
|
|
122
|
-
}
|
|
123
|
-
function Z(e, i) {
|
|
124
|
-
return n(new Date(e)).format(i);
|
|
125
|
-
}
|
|
126
|
-
function A(e) {
|
|
127
|
-
const i = e.getUTCDate().toString().padStart(2, "0"), u = (e.getUTCMonth() + 1).toString().padStart(2, "0"), a = e.getUTCFullYear();
|
|
128
|
-
return `${i}/${u}/${a}`;
|
|
129
|
-
}
|
|
130
|
-
const J = {
|
|
131
|
-
getLocalDate: k,
|
|
132
|
-
getLocalDateTime: I,
|
|
133
|
-
getUTCDate: P,
|
|
134
|
-
getUTCtoDateMoreOneDay: F,
|
|
135
|
-
now: E,
|
|
136
|
-
differenceInDays: R,
|
|
137
|
-
addDays: W,
|
|
138
|
-
format: Z,
|
|
139
|
-
toUTCDateString: A
|
|
140
|
-
};
|
|
141
|
-
export {
|
|
142
|
-
J as date
|
|
143
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './locale-provider';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Locale } from 'react-day-picker/locale';
|
|
2
|
-
import { PropsWithChildren } from 'react';
|
|
3
|
-
type SupportedLocalesType = "ptBR" | "enUS";
|
|
4
|
-
type LocaleContextType = {
|
|
5
|
-
locale: Locale | undefined;
|
|
6
|
-
};
|
|
7
|
-
export declare function useLocale(): LocaleContextType;
|
|
8
|
-
export declare function LocaleProvider({ locale, children, }: PropsWithChildren<{
|
|
9
|
-
locale: SupportedLocalesType;
|
|
10
|
-
}>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
export interface UserProps {
|
|
3
|
-
id: string;
|
|
4
|
-
username: string;
|
|
5
|
-
email: string;
|
|
6
|
-
created_at: Date | null;
|
|
7
|
-
updated_at: Date | null;
|
|
8
|
-
features: Array<string>;
|
|
9
|
-
}
|
|
10
|
-
interface IUserContext {
|
|
11
|
-
user: UserProps;
|
|
12
|
-
isLoading: boolean;
|
|
13
|
-
fetchUser: () => Promise<void>;
|
|
14
|
-
logout: () => Promise<void>;
|
|
15
|
-
login: (email: string, password: string) => Promise<boolean>;
|
|
16
|
-
}
|
|
17
|
-
interface MyComponentProps {
|
|
18
|
-
sessionEndPoint: string;
|
|
19
|
-
userEndPoint: string;
|
|
20
|
-
children?: ReactNode;
|
|
21
|
-
useMock?: boolean;
|
|
22
|
-
}
|
|
23
|
-
export declare function UserProvider({ children, sessionEndPoint, userEndPoint, useMock, }: MyComponentProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
export declare function useUser(): IUserContext;
|
|
25
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './UserProvider';
|
package/dist/providers.cjs.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./locale-provider-TirFJhph.cjs"),e=require("./UserProvider-Sov75KqP.cjs");require("react");const o=require("next-themes");function t({children:s,...i}){return e.jsxRuntimeExports.jsx(o.ThemeProvider,{...i,children:s})}exports.LocaleProvider=r.LocaleProvider;exports.useLocale=r.useLocale;exports.UserProvider=e.UserProvider;exports.useUser=e.useUser;Object.defineProperty(exports,"useTheme",{enumerable:!0,get:()=>o.useTheme});exports.ThemeProvider=t;
|
package/dist/providers.es.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { L as x, u as f } from "./locale-provider-XVCCI6ZB.js";
|
|
3
|
-
import { j as o } from "./UserProvider-ultyW1kJ.js";
|
|
4
|
-
import { U as n, u as v } from "./UserProvider-ultyW1kJ.js";
|
|
5
|
-
import "react";
|
|
6
|
-
import { ThemeProvider as s } from "next-themes";
|
|
7
|
-
import { useTheme as c } from "next-themes";
|
|
8
|
-
function u({
|
|
9
|
-
children: e,
|
|
10
|
-
...r
|
|
11
|
-
}) {
|
|
12
|
-
return /* @__PURE__ */ o.jsx(s, { ...r, children: e });
|
|
13
|
-
}
|
|
14
|
-
export {
|
|
15
|
-
x as LocaleProvider,
|
|
16
|
-
u as ThemeProvider,
|
|
17
|
-
n as UserProvider,
|
|
18
|
-
f as useLocale,
|
|
19
|
-
c as useTheme,
|
|
20
|
-
v as useUser
|
|
21
|
-
};
|