@sigtes/ui 0.2.4 → 0.2.6

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.
@@ -0,0 +1,19 @@
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
+ export declare const date: {
10
+ getLocalDate: typeof getLocalDate;
11
+ getLocalDateTime: typeof getLocalDateTime;
12
+ getUTCDate: typeof getUTCDate;
13
+ getUTCtoDateMoreOneDay: typeof getUTCtoDateMoreOneDay;
14
+ now: typeof now;
15
+ differenceInDays: typeof differenceInDays;
16
+ addDays: typeof addDays;
17
+ format: typeof format;
18
+ };
19
+ export {};
@@ -0,0 +1 @@
1
+ export * from './date';
@@ -0,0 +1 @@
1
+ export * from './date';
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("dayjs");function U(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var h={exports:{}},C=h.exports,y;function j(){return y||(y=1,(function(e,s){(function(f,a){e.exports=a(i)})(C,(function(f){function a(n){return n&&typeof n=="object"&&"default"in n?n:{default:n}}var _=a(f),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(n){return n+"º"},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,T;function w(){return T||(T=1,(function(e,s){(function(f,a){e.exports=a()})(q,(function(){var f="minute",a=/[+-]\d\d(?::?\d\d)?/g,_=/([+-]|\d\d)/g;return function(Y,n,l){var r=n.prototype;l.utc=function(t){var o={date:t,utc:!0,args:arguments};return new n(o)},r.utc=function(t){var o=l(this.toDate(),{locale:this.$L,utc:!0});return t?o.add(this.utcOffset(),f):o},r.local=function(){return l(this.toDate(),{locale:this.$L,utc:!1})};var S=r.parse;r.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),S.call(this,t)};var L=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 L.call(this)};var O=r.utcOffset;r.utcOffset=function(t,o){var d=this.$utils().u;if(d(t))return this.$u?0:d(this.$offset)?O.call(this):this.$offset;if(typeof t=="string"&&(t=(function(D){D===void 0&&(D="");var p=D.match(a);if(!p)return null;var $=(""+p[0]).match(_)||["-",0,0],H=$[0],M=60*+$[1]+ +$[2];return M===0?0:H==="+"?M:-M})(t),t===null))return this;var c=Math.abs(t)<=16?60*t:t;if(c===0)return this.utc(o);var u=this.clone();if(o)return u.$offset=c,u.$u=!1,u;var g=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(u=this.local().add(c+g,f)).$offset=c,u.$x.$localOffset=g,u};var b=r.format;r.format=function(t){var o=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return b.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 x=r.toDate;r.toDate=function(t){return t==="s"&&this.$offset?l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():x.call(this)};var v=r.diff;r.diff=function(t,o,d){if(t&&this.$u===t.$u)return v.call(this,t,o,d);var c=this.local(),u=l(t).local();return v.call(c,u,o,d)}}}))})(m)),m.exports}var z=w();const B=U(z);i.extend(B);i.locale("pt-br");function P(e){return i(String(e)).format("DD/MM/YYYY")}function k(e){return i(e).utc().add(1,"day").format("YYYY-MM-DD")}function I(e){return i(String(e)).format("DD/MM/YYYY hh:mm:ss")}function E(e){if(e)return i(String(e)).utc().format("DD/MM/YYYY")}function F(){return i(new Date).format("YYYY-MM-DD")}function R(e,s){return i(e).diff(i(s),"day")}function W(e,s){return i(e).add(s,"day").toDate()}function Z(e,s){return i(new Date(e)).format(s)}const A={getLocalDate:P,getLocalDateTime:I,getUTCDate:E,getUTCtoDateMoreOneDay:k,now:F,differenceInDays:R,addDays:W,format:Z};exports.date=A;
@@ -0,0 +1,138 @@
1
+ import i from "dayjs";
2
+ function b(e) {
3
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
4
+ }
5
+ var h = { exports: {} }, C = h.exports, y;
6
+ function j() {
7
+ return y || (y = 1, (function(e, s) {
8
+ (function(f, a) {
9
+ e.exports = a(i);
10
+ })(C, (function(f) {
11
+ function a(n) {
12
+ return n && typeof n == "object" && "default" in n ? n : { default: n };
13
+ }
14
+ var _ = a(f), 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(n) {
15
+ return n + "º";
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
+ })(h)), h.exports;
20
+ }
21
+ j();
22
+ var m = { exports: {} }, q = m.exports, T;
23
+ function w() {
24
+ return T || (T = 1, (function(e, s) {
25
+ (function(f, a) {
26
+ e.exports = a();
27
+ })(q, (function() {
28
+ var f = "minute", a = /[+-]\d\d(?::?\d\d)?/g, _ = /([+-]|\d\d)/g;
29
+ return function(Y, n, l) {
30
+ var r = n.prototype;
31
+ l.utc = function(t) {
32
+ var o = { date: t, utc: !0, args: arguments };
33
+ return new n(o);
34
+ }, r.utc = function(t) {
35
+ var o = l(this.toDate(), { locale: this.$L, utc: !0 });
36
+ return t ? o.add(this.utcOffset(), f) : 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 x = 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 x.call(this);
50
+ };
51
+ var L = r.utcOffset;
52
+ r.utcOffset = function(t, o) {
53
+ var d = this.$utils().u;
54
+ if (d(t)) return this.$u ? 0 : d(this.$offset) ? L.call(this) : this.$offset;
55
+ if (typeof t == "string" && (t = (function(D) {
56
+ D === void 0 && (D = "");
57
+ var g = D.match(a);
58
+ if (!g) return null;
59
+ var $ = ("" + g[0]).match(_) || ["-", 0, 0], U = $[0], M = 60 * +$[1] + +$[2];
60
+ return M === 0 ? 0 : U === "+" ? 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 u = this.clone();
65
+ if (o) return u.$offset = c, u.$u = !1, u;
66
+ var v = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
67
+ return (u = this.local().add(c + v, f)).$offset = c, u.$x.$localOffset = v, u;
68
+ };
69
+ var O = r.format;
70
+ r.format = function(t) {
71
+ var o = t || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
72
+ return O.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 H = r.toDate;
84
+ r.toDate = function(t) {
85
+ return t === "s" && this.$offset ? l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : H.call(this);
86
+ };
87
+ var p = r.diff;
88
+ r.diff = function(t, o, d) {
89
+ if (t && this.$u === t.$u) return p.call(this, t, o, d);
90
+ var c = this.local(), u = l(t).local();
91
+ return p.call(c, u, o, d);
92
+ };
93
+ };
94
+ }));
95
+ })(m)), m.exports;
96
+ }
97
+ var z = w();
98
+ const B = /* @__PURE__ */ b(z);
99
+ i.extend(B);
100
+ i.locale("pt-br");
101
+ function k(e) {
102
+ return i(String(e)).format("DD/MM/YYYY");
103
+ }
104
+ function I(e) {
105
+ return i(e).utc().add(1, "day").format("YYYY-MM-DD");
106
+ }
107
+ function P(e) {
108
+ return i(String(e)).format("DD/MM/YYYY hh:mm:ss");
109
+ }
110
+ function E(e) {
111
+ if (e)
112
+ return i(String(e)).utc().format("DD/MM/YYYY");
113
+ }
114
+ function F() {
115
+ return i(/* @__PURE__ */ new Date()).format("YYYY-MM-DD");
116
+ }
117
+ function R(e, s) {
118
+ return i(e).diff(i(s), "day");
119
+ }
120
+ function W(e, s) {
121
+ return i(e).add(s, "day").toDate();
122
+ }
123
+ function Z(e, s) {
124
+ return i(new Date(e)).format(s);
125
+ }
126
+ const G = {
127
+ getLocalDate: k,
128
+ getLocalDateTime: P,
129
+ getUTCDate: E,
130
+ getUTCtoDateMoreOneDay: I,
131
+ now: F,
132
+ differenceInDays: R,
133
+ addDays: W,
134
+ format: Z
135
+ };
136
+ export {
137
+ G as date
138
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sigtes/ui",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -18,6 +18,11 @@
18
18
  "import": "./dist/hooks.es.js",
19
19
  "require": "./dist/hooks.cjs.js"
20
20
  },
21
+ "./models": {
22
+ "types": "./dist/models/index.d.ts",
23
+ "import": "./dist/models.es.js",
24
+ "require": "./dist/models.cjs.js"
25
+ },
21
26
  "./pages": {
22
27
  "types": "./dist/pages/index.d.ts",
23
28
  "import": "./dist/pages.es.js",
@@ -45,6 +50,7 @@
45
50
  "@hookform/resolvers": "^5.2.2",
46
51
  "@radix-ui/react-checkbox": "^1.3.3",
47
52
  "@radix-ui/react-collapsible": "^1.1.12",
53
+ "@radix-ui/react-dialog": "^1.1.15",
48
54
  "@radix-ui/react-dropdown-menu": "^2.1.16",
49
55
  "@radix-ui/react-label": "^2.1.7",
50
56
  "@radix-ui/react-popover": "^1.1.15",
@@ -54,11 +60,13 @@
54
60
  "@radix-ui/react-tabs": "^1.1.13",
55
61
  "@tabler/icons-react": "^3.35.0",
56
62
  "@tailwindcss/vite": "^4.1.13",
63
+ "@tanstack/react-query": "^5.90.2",
57
64
  "@tanstack/react-table": "^8.21.3",
58
65
  "class-variance-authority": "^0.7.1",
59
66
  "cmdk": "^1.1.1",
60
- "lucide-react": "^0.544.0",
61
- "next": "^15.4.4",
67
+ "dayjs": "^1.11.19",
68
+ "lucide-react": "^0.555.0",
69
+ "next": "^16.0.1",
62
70
  "next-themes": "^0.4.6",
63
71
  "react": "^19.1.0",
64
72
  "react-day-picker": "^9.11.0",
@@ -66,9 +74,7 @@
66
74
  "react-hook-form": "^7.63.0",
67
75
  "recharts": "^2.15.4",
68
76
  "sonner": "^2.0.7",
69
- "tailwind-merge": "^3.3.1",
70
- "@radix-ui/react-dialog": "^1.1.15",
71
- "@tanstack/react-query": "^5.90.2"
77
+ "tailwind-merge": "^3.3.1"
72
78
  },
73
79
  "devDependencies": {
74
80
  "@chromatic-com/storybook": "^4.1.1",