dgz-ui-shared 1.0.32 → 1.0.33
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/{DateRangePicker-BTdvl4c_.js → DateRangePicker-B5Zz2xL2.js} +5 -5
- package/dist/{DateRangePicker-DP6Lw6dT.cjs → DateRangePicker-bfcaZ9ZG.cjs} +1 -1
- package/dist/{FilterWrapper-BWrxmYDa.cjs → FilterWrapper-jQLGbL82.cjs} +2 -2
- package/dist/{FilterWrapper-BJc7AO1q.js → FilterWrapper-qOKMxUJo.js} +18 -18
- package/dist/{MyInput-qse97Dxt.js → MyInput-BkQ_0DAe.js} +4530 -4287
- package/dist/MyInput-rH9K7Y3x.cjs +139 -0
- package/dist/{MyLimitSelect-BZaXfEIA.js → MyLimitSelect-4fjHj19D.js} +5 -5
- package/dist/{MyLimitSelect-a6taXF34.cjs → MyLimitSelect-CoFGwVAo.cjs} +1 -1
- package/dist/MySelect-CfRB7qZ1.js +65 -0
- package/dist/MySelect-DfLA6Bb3.cjs +1 -0
- package/dist/{check-DE-1lGDl-C_ZPlJ0c.cjs → check-DE-1lGDl-BLIidSEC.cjs} +1 -1
- package/dist/{check-DE-1lGDl-24KCJ29m.js → check-DE-1lGDl-CvPk5Vd3.js} +2 -2
- package/dist/{chevron-right-HWBijj-I-BaBb7aQZ.js → chevron-right-HWBijj-I-D5AQ2F9h.js} +1 -1
- package/dist/{chevron-right-HWBijj-I-Bal8Z7kb.cjs → chevron-right-HWBijj-I-RhDWpejn.cjs} +1 -1
- package/dist/circle-CFpsrAGQ-DGKxpM6_.cjs +6 -0
- package/dist/circle-CFpsrAGQ-F3WgGVV2.js +182 -0
- package/dist/components/confirm/index.es.js +1 -1
- package/dist/components/confirm/index.umd.js +1 -1
- package/dist/components/datatable/index.es.js +46 -46
- package/dist/components/datatable/index.umd.js +5 -5
- package/dist/components/datepicker/index.es.js +1 -1
- package/dist/components/datepicker/index.umd.js +1 -1
- package/dist/components/filters/index.es.js +3 -3
- package/dist/components/filters/index.umd.js +1 -1
- package/dist/components/form/index.es.js +118 -116
- package/dist/components/form/index.umd.js +6 -6
- package/dist/components/modal/index.es.js +3 -3
- package/dist/components/modal/index.umd.js +1 -1
- package/dist/components/pagination/index.es.js +1 -1
- package/dist/components/pagination/index.umd.js +1 -1
- package/dist/components/theme/index.es.js +7 -7
- package/dist/components/theme/index.umd.js +3 -3
- package/dist/components/tooltip/index.es.js +3 -3
- package/dist/components/tooltip/index.umd.js +1 -1
- package/dist/{createLucideIcon-B950nf2d-DnAaS9t0.cjs → createLucideIcon-B950nf2d-DOfDOmgh.cjs} +1 -1
- package/dist/{createLucideIcon-B950nf2d-WasJb88J.js → createLucideIcon-B950nf2d-mI0JiH0D.js} +36 -36
- package/dist/dropdown-menu-Bi80BJE7-CZ8bC42v.cjs +1 -0
- package/dist/dropdown-menu-Bi80BJE7-DnJJs6em.js +874 -0
- package/dist/hooks/index.es.js +5 -5
- package/dist/hooks/index.umd.js +1 -1
- package/dist/{index-BTN0oPfn-DaQSYHfA.js → index-BTN0oPfn-B0IC9OK9.js} +2 -2
- package/dist/{index-BTN0oPfn-BJQJPuOc.cjs → index-BTN0oPfn-ZhUiP1mr.cjs} +1 -1
- package/dist/{index-CYIFqWxx-DtNoIOjh.js → index-CYIFqWxx-6SIsOs0F.js} +1 -1
- package/dist/{index-CYIFqWxx-Dq2O0Nts.cjs → index-CYIFqWxx-DM9vqAQw.cjs} +1 -1
- package/dist/{index-DFLDO_Wj-BDd-yI_U.js → index-DFLDO_Wj-7UPthv1Q.js} +1 -1
- package/dist/index-DFLDO_Wj-CidgM9ti.cjs +1 -0
- package/dist/{index-DqTIeHVj-CYOpXZHK.js → index-DqTIeHVj-CeLMF2B2.js} +2 -2
- package/dist/{index-DqTIeHVj-C_gsDkBV.cjs → index-DqTIeHVj-DlSOwhuZ.cjs} +1 -1
- package/dist/{popover-DDxpKohG-BbuLlzlz.js → popover-DDxpKohG-Bf7PdpKe.js} +3 -3
- package/dist/{popover-DDxpKohG-lwQEtZjs.cjs → popover-DDxpKohG-DqXqrdkw.cjs} +1 -1
- package/dist/{select-BehdTDP2-BxIxRb2_.js → select-BehdTDP2-Ub_7qPip.js} +5 -5
- package/dist/{select-BehdTDP2-DZ8kbyVp.cjs → select-BehdTDP2-ZYaN7yEJ.cjs} +2 -2
- package/dist/types/components/form/MyRadio.d.ts +8 -0
- package/dist/types/components/form/MyRadio.d.ts.map +1 -0
- package/dist/types/components/form/index.d.ts +1 -0
- package/dist/types/components/form/index.d.ts.map +1 -1
- package/dist/{unstyled-CCspPtop.js → unstyled-BBCn6yu0.js} +4 -4
- package/dist/{unstyled-Cc9io_SP.cjs → unstyled-jBitJhHo.cjs} +2 -2
- package/dist/{useDateRange-CDUxamWH.cjs → useDateRange-6jqBD48k.cjs} +1 -1
- package/dist/{useDateRange-BummrgFj.js → useDateRange-xETqXzAi.js} +1 -1
- package/dist/{useFilter-YZXVbbYx.js → useFilter-BD56qy6n.js} +3 -3
- package/dist/{useFilter-DVFoDmdH.cjs → useFilter-BunwCKR7.cjs} +1 -1
- package/dist/{useSortable-JADc91Wp.js → useSortable-Cus_bE9T.js} +1 -1
- package/dist/{useSortable-CFxjqcFf.cjs → useSortable-D4uVVpe1.cjs} +1 -1
- package/package.json +2 -2
- package/dist/MyInput-3qarivly.cjs +0 -139
- package/dist/MySelect-PTD5YCMn.cjs +0 -1
- package/dist/MySelect-U6BUrvYu.js +0 -65
- package/dist/dropdown-menu-D3ab2Xna-ClM4t858.js +0 -1045
- package/dist/dropdown-menu-D3ab2Xna-DfNVOtLW.cjs +0 -6
- package/dist/index-DFLDO_Wj-BSSol7QD.cjs +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { j as te } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
2
|
import g, { forwardRef as Tn, useState as xe, useEffect as Ue, useMemo as We, useCallback as re, useRef as Ae, createContext as En, useLayoutEffect as $n, useContext as Yn } from "react";
|
|
3
|
-
import { a as U } from "./index-DqTIeHVj-
|
|
4
|
-
import { u as ze, g as ct } from "./check-DE-1lGDl-
|
|
3
|
+
import { a as U } from "./index-DqTIeHVj-CeLMF2B2.js";
|
|
4
|
+
import { u as ze, g as ct } from "./check-DE-1lGDl-CvPk5Vd3.js";
|
|
5
5
|
import { m as ce, c as _n } from "./utils-D0f6bOsw-HrLsble-.js";
|
|
6
|
-
import { m as Ln, A as ft, U as ht, j as mt, $ as yt, I as vt } from "./select-BehdTDP2-
|
|
6
|
+
import { m as Ln, A as ft, U as ht, j as mt, $ as yt, I as vt } from "./select-BehdTDP2-Ub_7qPip.js";
|
|
7
7
|
import { o as jn, c as Pn, n as Fn } from "./index-Br4MVOGV-CUrOsbmR.js";
|
|
8
|
-
import { k as In } from "./createLucideIcon-B950nf2d-
|
|
8
|
+
import { k as In } from "./createLucideIcon-B950nf2d-mI0JiH0D.js";
|
|
9
9
|
import { d as He } from "./dayjs.min-DQzb66fB.js";
|
|
10
|
-
import { O as Bn, _ as Hn, u as An } from "./popover-DDxpKohG-
|
|
10
|
+
import { O as Bn, _ as Hn, u as An } from "./popover-DDxpKohG-Bf7PdpKe.js";
|
|
11
11
|
import { u as qn } from "./useTranslation-dH-uwymc.js";
|
|
12
12
|
import { c as Zn } from "./createLucideIcon-B950nf2d.js";
|
|
13
13
|
function zn(e, n) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const te=require("./jsx-runtime-DUiatUiq.cjs"),c=require("react"),U=require("./index-DqTIeHVj-
|
|
1
|
+
"use strict";const te=require("./jsx-runtime-DUiatUiq.cjs"),c=require("react"),U=require("./index-DqTIeHVj-DlSOwhuZ.cjs"),Ne=require("./check-DE-1lGDl-BLIidSEC.cjs"),se=require("./utils-D0f6bOsw-BmDOeWKv.cjs"),oe=require("./select-BehdTDP2-ZYaN7yEJ.cjs"),et=require("./index-Br4MVOGV-C9VUkdfQ.cjs"),On=require("./createLucideIcon-B950nf2d-DOfDOmgh.cjs"),Be=require("./dayjs.min-BoFVZSwB.cjs"),Ge=require("./popover-DDxpKohG-DqXqrdkw.cjs"),Sn=require("./useTranslation-CZf20ucv.cjs"),Nn=require("./createLucideIcon-BnAj0RnC.cjs");function Wn(e,n){for(var t=0;t<n.length;t++){const r=n[t];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const o=Object.getOwnPropertyDescriptor(r,a);o&&Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}/**
|
|
2
2
|
* @license lucide-react v0.511.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("./jsx-runtime-DUiatUiq.cjs"),
|
|
1
|
+
"use strict";const e=require("./jsx-runtime-DUiatUiq.cjs"),i=require("./MyInput-rH9K7Y3x.cjs"),a=require("./check-DE-1lGDl-BLIidSEC.cjs"),k=require("./useTranslation-CZf20ucv.cjs"),l=require("./createLucideIcon-BnAj0RnC.cjs"),o=require("react"),j=require("./popover-DDxpKohG-DqXqrdkw.cjs"),_=require("./MySelect-DfLA6Bb3.cjs"),D=require("./useFilter-BunwCKR7.cjs");/**
|
|
2
2
|
* @license lucide-react v0.511.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -18,4 +18,4 @@
|
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the ISC license.
|
|
20
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const O=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],T=l.createLucideIcon("search",O),A=({name:u="search",defaultValue:t,onSearchChange:n})=>{const{t:r}=k.useTranslation(),c=x=>{const p=new FormData(x.currentTarget);n(p.get(u)),x.preventDefault()};return e.jsxRuntimeExports.jsxs("form",{className:"relative min-w-40 w-full max-w-64",onSubmit:c,children:[e.jsxRuntimeExports.jsx(
|
|
21
|
+
*/const O=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],T=l.createLucideIcon("search",O),A=({name:u="search",defaultValue:t,onSearchChange:n})=>{const{t:r}=k.useTranslation(),c=x=>{const p=new FormData(x.currentTarget);n(p.get(u)),x.preventDefault()};return e.jsxRuntimeExports.jsxs("form",{className:"relative min-w-40 w-full max-w-64",onSubmit:c,children:[e.jsxRuntimeExports.jsx(i.qi,{className:"rounded-lg h-8",name:u,placeholder:r("Search..."),defaultValue:t?`${t}`:""}),e.jsxRuntimeExports.jsx(a.u,{type:"submit",variant:"ghost",className:"!bg-transparent absolute top-0 right-0 cursor-pointer rounded-md text-foreground",size:"sm",children:e.jsxRuntimeExports.jsx(T,{})})]})},W=o.memo(function({filters:t,params:n,onFilter:r,onChange:c,onCancel:x,...p}){const{t:d}=k.useTranslation(),[b,v]=o.useState(!1),[f,m]=o.useState(!1),{form:y}=D.useFilter({params:n}),{watch:M,getValues:N,handleSubmit:q,control:E,reset:R}=y;o.useEffect(()=>{let s=!1;t.map(w=>{const h=i.lodashExports.get(n,`${w.name}`);(Array.isArray(h)?h.length>0:h)&&(s=!0),v(s)})},[t,n]),o.useEffect(()=>{c&&c(N())},[M()]);const g=o.useCallback((s={})=>{r&&r(s),m(!1)},[r]),S=o.useCallback(()=>{R(),r&&n&&r({...n,...Object.fromEntries(t.map(s=>[s.name,void 0]))}),m(!1)},[r,R,n,t]);return e.jsxRuntimeExports.jsxs(j.Oe,{open:f,onOpenChange:m,children:[e.jsxRuntimeExports.jsx(j._e,{children:e.jsxRuntimeExports.jsx(a.u,{asChild:!0,size:"sm",variant:"secondary",className:"ml-auto px-3",...p,children:e.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[b?e.jsxRuntimeExports.jsx($,{size:20}):e.jsxRuntimeExports.jsx(C,{size:20})," ",e.jsxRuntimeExports.jsx("span",{className:"hidden md:inline",children:d("Filter")}),e.jsxRuntimeExports.jsx(I,{})]})})}),e.jsxRuntimeExports.jsx(j.ue,{side:"bottom",align:"end",className:"",children:e.jsxRuntimeExports.jsx(i.hp,{...y,children:e.jsxRuntimeExports.jsxs("form",{onSubmit:q(g),className:"space-y-2",children:[e.jsxRuntimeExports.jsx("div",{className:"h-full shrink p-1",children:t.map(s=>s.options?e.jsxRuntimeExports.jsx(_.MySelect,{control:E,name:s.name,placeholder:s.placeholder,isMulti:s.isMulti,options:s.options,label:s.label},s.name):e.jsxRuntimeExports.jsx(i.MyInput,{control:E,placeholder:s.placeholder,name:s.name,label:s.label},s.name))}),e.jsxRuntimeExports.jsxs("div",{className:"flex shrink-0 justify-end gap-2",children:[e.jsxRuntimeExports.jsx(a.u,{variant:"destructive",type:"reset",size:"sm",onClick:S,children:d("Reset")}),e.jsxRuntimeExports.jsx(a.u,{type:"submit",size:"sm",children:d("Apply")})]})]})})})]})});exports.FilterWrapper=W;exports.Search=A;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
-
import {
|
|
3
|
-
import { u as r } from "./check-DE-1lGDl-
|
|
4
|
-
import { u as
|
|
2
|
+
import { q as $, l as q, h as C, M as O } from "./MyInput-BkQ_0DAe.js";
|
|
3
|
+
import { u as r } from "./check-DE-1lGDl-CvPk5Vd3.js";
|
|
4
|
+
import { u as b } from "./useTranslation-dH-uwymc.js";
|
|
5
5
|
import { c } from "./createLucideIcon-B950nf2d.js";
|
|
6
|
-
import { memo as
|
|
7
|
-
import { O as
|
|
8
|
-
import { M as L } from "./MySelect-
|
|
9
|
-
import { u as R } from "./useFilter-
|
|
6
|
+
import { memo as D, useState as y, useEffect as f, useCallback as k } from "react";
|
|
7
|
+
import { O as E, _ as A, u as I } from "./popover-DDxpKohG-Bf7PdpKe.js";
|
|
8
|
+
import { M as L } from "./MySelect-CfRB7qZ1.js";
|
|
9
|
+
import { u as R } from "./useFilter-BD56qy6n.js";
|
|
10
10
|
/**
|
|
11
11
|
* @license lucide-react v0.511.0 - ISC
|
|
12
12
|
*
|
|
@@ -52,7 +52,7 @@ const G = [
|
|
|
52
52
|
defaultValue: a,
|
|
53
53
|
onSearchChange: t
|
|
54
54
|
}) => {
|
|
55
|
-
const { t: n } =
|
|
55
|
+
const { t: n } = b(), o = (i) => {
|
|
56
56
|
const d = new FormData(i.currentTarget);
|
|
57
57
|
t(d.get(l)), i.preventDefault();
|
|
58
58
|
};
|
|
@@ -84,7 +84,7 @@ const G = [
|
|
|
84
84
|
]
|
|
85
85
|
}
|
|
86
86
|
);
|
|
87
|
-
}, ne =
|
|
87
|
+
}, ne = D(function({
|
|
88
88
|
filters: a,
|
|
89
89
|
params: t,
|
|
90
90
|
onFilter: n,
|
|
@@ -92,22 +92,22 @@ const G = [
|
|
|
92
92
|
onCancel: i,
|
|
93
93
|
...d
|
|
94
94
|
}) {
|
|
95
|
-
const { t: m } =
|
|
95
|
+
const { t: m } = b(), [v, M] = y(!1), [N, h] = y(!1), { form: u } = R({ params: t }), { watch: g, getValues: w, handleSubmit: S, control: x, reset: j } = u;
|
|
96
96
|
f(() => {
|
|
97
97
|
let s = !1;
|
|
98
98
|
a.map((z) => {
|
|
99
|
-
const p =
|
|
100
|
-
(Array.isArray(p) ? p.length > 0 : p) && (s = !0),
|
|
99
|
+
const p = q.get(t, `${z.name}`);
|
|
100
|
+
(Array.isArray(p) ? p.length > 0 : p) && (s = !0), M(s);
|
|
101
101
|
});
|
|
102
102
|
}, [a, t]), f(() => {
|
|
103
103
|
o && o(w());
|
|
104
104
|
}, [g()]);
|
|
105
|
-
const _ =
|
|
105
|
+
const _ = k(
|
|
106
106
|
(s = {}) => {
|
|
107
107
|
n && n(s), h(!1);
|
|
108
108
|
},
|
|
109
109
|
[n]
|
|
110
|
-
), F =
|
|
110
|
+
), F = k(() => {
|
|
111
111
|
j(), n && t && n({
|
|
112
112
|
...t,
|
|
113
113
|
...Object.fromEntries(
|
|
@@ -115,7 +115,7 @@ const G = [
|
|
|
115
115
|
)
|
|
116
116
|
}), h(!1);
|
|
117
117
|
}, [n, j, t, a]);
|
|
118
|
-
return /* @__PURE__ */ e.jsxs(
|
|
118
|
+
return /* @__PURE__ */ e.jsxs(E, { open: N, onOpenChange: h, children: [
|
|
119
119
|
/* @__PURE__ */ e.jsx(A, { children: /* @__PURE__ */ e.jsx(
|
|
120
120
|
r,
|
|
121
121
|
{
|
|
@@ -125,14 +125,14 @@ const G = [
|
|
|
125
125
|
className: "ml-auto px-3",
|
|
126
126
|
...d,
|
|
127
127
|
children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
|
|
128
|
-
|
|
128
|
+
v ? /* @__PURE__ */ e.jsx(B, { size: 20 }) : /* @__PURE__ */ e.jsx(P, { size: 20 }),
|
|
129
129
|
" ",
|
|
130
130
|
/* @__PURE__ */ e.jsx("span", { className: "hidden md:inline", children: m("Filter") }),
|
|
131
131
|
/* @__PURE__ */ e.jsx(V, {})
|
|
132
132
|
] })
|
|
133
133
|
}
|
|
134
134
|
) }),
|
|
135
|
-
/* @__PURE__ */ e.jsx(I, { side: "bottom", align: "end", className: "", children: /* @__PURE__ */ e.jsx(
|
|
135
|
+
/* @__PURE__ */ e.jsx(I, { side: "bottom", align: "end", className: "", children: /* @__PURE__ */ e.jsx(C, { ...u, children: /* @__PURE__ */ e.jsxs("form", { onSubmit: S(_), className: "space-y-2", children: [
|
|
136
136
|
/* @__PURE__ */ e.jsx("div", { className: "h-full shrink p-1", children: a.map(
|
|
137
137
|
(s) => s.options ? /* @__PURE__ */ e.jsx(
|
|
138
138
|
L,
|
|
@@ -146,7 +146,7 @@ const G = [
|
|
|
146
146
|
},
|
|
147
147
|
s.name
|
|
148
148
|
) : /* @__PURE__ */ e.jsx(
|
|
149
|
-
|
|
149
|
+
O,
|
|
150
150
|
{
|
|
151
151
|
control: x,
|
|
152
152
|
placeholder: s.placeholder,
|