@nice2dev/ui 1.0.18 → 1.0.20
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/CHANGELOG.md +64 -0
- package/dist/NiceErrorBoundary-Bzx-bOeb.cjs +1 -0
- package/dist/NiceErrorBoundary-DBCCmeyl.js +770 -0
- package/dist/NiceErrorBoundary-DvA00DOz.cjs +1 -0
- package/dist/NiceErrorBoundary-V6wkSSLP.cjs +1 -0
- package/dist/NiceErrorBoundary-eTwBEuSH.js +770 -0
- package/dist/NiceErrorBoundary-qp4IJ18o.js +770 -0
- package/dist/NiceForm-B1Okz7SW.cjs +382 -0
- package/dist/NiceForm-BXHPoTcH.cjs +382 -0
- package/dist/NiceForm-DL7Kxsi2.js +5383 -0
- package/dist/NiceForm-DLADlHAQ.js +5383 -0
- package/dist/NiceForm-DUkduLqG.cjs +382 -0
- package/dist/NiceForm-D_XZxq3a.js +5383 -0
- package/dist/NiceForm.css +1 -1
- package/dist/NiceModal-0Sg2HxIb.cjs +1 -0
- package/dist/NiceModal-BRih_XEH.js +95 -0
- package/dist/NiceModal-C4HIsjrn.js +95 -0
- package/dist/NiceModal-CUdeVj-j.js +95 -0
- package/dist/NiceModal-Cc8R-DpX.cjs +1 -0
- package/dist/NiceModal-DieswZtd.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel-4UEsYB5r.js +6553 -0
- package/dist/NiceModuleLifecyclePanel-C6agdtTI.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel-CEfeJxw_.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel-D4xWUswk.js +6777 -0
- package/dist/NiceModuleLifecyclePanel-jDzEfvDM.js +6553 -0
- package/dist/NiceModuleLifecyclePanel-sBJLlhJp.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel.css +1 -1
- package/dist/NicePagination-B2TC6MTL.cjs +1 -0
- package/dist/NicePagination-BAywVGwT.js +171 -0
- package/dist/NicePagination-Cqr3Pe_F.js +171 -0
- package/dist/NicePagination-DnnypBiE.js +171 -0
- package/dist/NicePagination-DyWWdtb3.cjs +1 -0
- package/dist/NicePagination-F8NyMfgc.cjs +1 -0
- package/dist/NicePinCodeInput-Bo8Ahkae.js +12240 -0
- package/dist/NicePinCodeInput-C6zJxUVf.cjs +419 -0
- package/dist/NicePinCodeInput-CpPtHZsK.js +12240 -0
- package/dist/NicePinCodeInput-Cpa01Yfg.cjs +419 -0
- package/dist/NicePinCodeInput-JvYd_LB_.cjs +419 -0
- package/dist/NicePinCodeInput-ltwzQf4r.js +12240 -0
- package/dist/NicePinCodeInput.css +1 -1
- package/dist/NiceSavedQueryPanel-BIXW0y1X.js +6455 -0
- package/dist/NiceSavedQueryPanel-BOBULytX.js +6455 -0
- package/dist/NiceSavedQueryPanel-CFHwMDIx.cjs +596 -0
- package/dist/NiceSavedQueryPanel-CTfC-qwV.cjs +596 -0
- package/dist/NiceSavedQueryPanel-DuonbEem.js +6584 -0
- package/dist/NiceSavedQueryPanel-MdKdGYNg.cjs +596 -0
- package/dist/NiceSavedQueryPanel.css +1 -1
- package/dist/NiceTabs-B9zxj6qd.js +1657 -0
- package/dist/NiceTabs-BjBtazRn.cjs +1 -0
- package/dist/NiceTabs-C-VQXNIa.cjs +1 -0
- package/dist/NiceTabs-CJ8G2t0-.js +1657 -0
- package/dist/NiceTabs-CNauJ4fu.cjs +1 -0
- package/dist/NiceTabs-v7HfeXIw.js +1657 -0
- package/dist/NiceWindow-BMiF-so6.cjs +1 -0
- package/dist/NiceWindow-Bo_yCa1o.js +1418 -0
- package/dist/NiceWindow-CysIgnn3.js +1418 -0
- package/dist/NiceWindow-D6SjpDc4.cjs +1 -0
- package/dist/NiceWindow-DPzJxOfx.cjs +1 -0
- package/dist/NiceWindow-DUTRQOaP.js +1418 -0
- package/dist/charts-C60va95_.js +4657 -0
- package/dist/charts-CJlMAHJG.cjs +761 -0
- package/dist/charts-CX4jiyVh.cjs +761 -0
- package/dist/charts-CYpqDxHd.js +4657 -0
- package/dist/charts-D_I1iwel.cjs +761 -0
- package/dist/charts-P6qura0j.js +4657 -0
- package/dist/charts.cjs +1 -1
- package/dist/charts.css +1 -1
- package/dist/charts.mjs +1 -1
- package/dist/core-Bcc4sz15.cjs +96 -0
- package/dist/core-BfeyB9A8.cjs +96 -0
- package/dist/core-BgGSTko-.js +22401 -0
- package/dist/core-DDJKu5LZ.cjs +96 -0
- package/dist/core-Da1dGJN3.js +22401 -0
- package/dist/core-XsWxyBHD.js +22767 -0
- package/dist/data.cjs +1 -1
- package/dist/data.d.ts +5 -0
- package/dist/data.mjs +1 -1
- package/dist/editors.cjs +1 -1
- package/dist/editors.d.ts +44 -1
- package/dist/editors.mjs +3 -3
- package/dist/feedback.cjs +1 -1
- package/dist/feedback.mjs +2 -2
- package/dist/index-CQIDqjZp.cjs +5194 -0
- package/dist/index-CXVXf_HY.cjs +5194 -0
- package/dist/index-CtikFbFa.js +64337 -0
- package/dist/index-DCDfWfAt.js +64336 -0
- package/dist/index-DpiCo0_e.cjs +5194 -0
- package/dist/index-xVJiF843.js +65040 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +450 -6
- package/dist/index.mjs +874 -860
- package/dist/lazy.cjs +1 -1
- package/dist/lazy.mjs +3 -3
- package/dist/navigation.cjs +1 -1
- package/dist/navigation.d.ts +50 -3
- package/dist/navigation.mjs +30 -30
- package/dist/overlays.cjs +1 -1
- package/dist/overlays.mjs +53 -53
- package/dist/style.css +6 -6
- package/package.json +3 -3
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { jsxs as u, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { b as y } from "./NiceTabs-CJ8G2t0-.js";
|
|
3
|
+
function M(i, a, l) {
|
|
4
|
+
const r = [];
|
|
5
|
+
if (a <= 1)
|
|
6
|
+
return a === 1 && r.push(1), r;
|
|
7
|
+
const s = Math.max(2, i - l), o = Math.min(a - 1, i + l);
|
|
8
|
+
r.push(1), s > 2 && r.push("dots");
|
|
9
|
+
for (let c = s; c <= o; c++)
|
|
10
|
+
r.push(c);
|
|
11
|
+
return o < a - 1 && r.push("dots"), r.push(a), r;
|
|
12
|
+
}
|
|
13
|
+
const L = ({
|
|
14
|
+
page: i,
|
|
15
|
+
totalPages: a,
|
|
16
|
+
onChange: l,
|
|
17
|
+
showInfo: r,
|
|
18
|
+
siblingCount: s = 1,
|
|
19
|
+
size: o = "md",
|
|
20
|
+
showFirstLast: c,
|
|
21
|
+
showJumpInput: m,
|
|
22
|
+
jumpInputLabel: h,
|
|
23
|
+
showPageSize: b,
|
|
24
|
+
pageSizeOptions: d,
|
|
25
|
+
pageSize: f,
|
|
26
|
+
onPageSizeChange: N,
|
|
27
|
+
disabled: t,
|
|
28
|
+
className: _,
|
|
29
|
+
style: v
|
|
30
|
+
}) => {
|
|
31
|
+
const g = M(i, a, s);
|
|
32
|
+
return /* @__PURE__ */ u(
|
|
33
|
+
"nav",
|
|
34
|
+
{
|
|
35
|
+
className: `nice-pagination nice-pagination--${o} ${_ || ""}`,
|
|
36
|
+
style: v,
|
|
37
|
+
"aria-label": "Pagination",
|
|
38
|
+
children: [
|
|
39
|
+
c && /* @__PURE__ */ e(
|
|
40
|
+
"button",
|
|
41
|
+
{
|
|
42
|
+
className: "nice-pagination__btn",
|
|
43
|
+
disabled: t || i <= 1,
|
|
44
|
+
onClick: () => l(1),
|
|
45
|
+
"aria-label": "First page",
|
|
46
|
+
title: "First page",
|
|
47
|
+
children: "⏮"
|
|
48
|
+
}
|
|
49
|
+
),
|
|
50
|
+
/* @__PURE__ */ e(
|
|
51
|
+
"button",
|
|
52
|
+
{
|
|
53
|
+
className: "nice-pagination__btn",
|
|
54
|
+
disabled: t || i <= 1,
|
|
55
|
+
onClick: () => l(i - 1),
|
|
56
|
+
"aria-label": "Previous",
|
|
57
|
+
children: /* @__PURE__ */ e("svg", { width: "14", height: "14", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ e(
|
|
58
|
+
"path",
|
|
59
|
+
{
|
|
60
|
+
fillRule: "evenodd",
|
|
61
|
+
d: "M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z",
|
|
62
|
+
clipRule: "evenodd"
|
|
63
|
+
}
|
|
64
|
+
) })
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
g.map(
|
|
68
|
+
(n, p) => n === "dots" ? /* @__PURE__ */ e("span", { className: "nice-pagination__ellipsis", children: "…" }, `dots-${p}`) : /* @__PURE__ */ e(
|
|
69
|
+
"button",
|
|
70
|
+
{
|
|
71
|
+
className: `nice-pagination__btn ${n === i ? "nice-pagination__btn--active" : ""}`,
|
|
72
|
+
disabled: t,
|
|
73
|
+
onClick: () => l(n),
|
|
74
|
+
"aria-current": n === i ? "page" : void 0,
|
|
75
|
+
children: n
|
|
76
|
+
},
|
|
77
|
+
n
|
|
78
|
+
)
|
|
79
|
+
),
|
|
80
|
+
/* @__PURE__ */ e(
|
|
81
|
+
"button",
|
|
82
|
+
{
|
|
83
|
+
className: "nice-pagination__btn",
|
|
84
|
+
disabled: t || i >= a,
|
|
85
|
+
onClick: () => l(i + 1),
|
|
86
|
+
"aria-label": "Next",
|
|
87
|
+
children: /* @__PURE__ */ e("svg", { width: "14", height: "14", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ e(
|
|
88
|
+
"path",
|
|
89
|
+
{
|
|
90
|
+
fillRule: "evenodd",
|
|
91
|
+
d: "M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z",
|
|
92
|
+
clipRule: "evenodd"
|
|
93
|
+
}
|
|
94
|
+
) })
|
|
95
|
+
}
|
|
96
|
+
),
|
|
97
|
+
c && /* @__PURE__ */ e(
|
|
98
|
+
"button",
|
|
99
|
+
{
|
|
100
|
+
className: "nice-pagination__btn",
|
|
101
|
+
disabled: t || i >= a,
|
|
102
|
+
onClick: () => l(a),
|
|
103
|
+
"aria-label": "Last page",
|
|
104
|
+
title: "Last page",
|
|
105
|
+
children: "⏭"
|
|
106
|
+
}
|
|
107
|
+
),
|
|
108
|
+
r && /* @__PURE__ */ u("span", { className: "nice-pagination__info", children: [
|
|
109
|
+
i,
|
|
110
|
+
" / ",
|
|
111
|
+
a
|
|
112
|
+
] }),
|
|
113
|
+
m && /* @__PURE__ */ u(
|
|
114
|
+
"span",
|
|
115
|
+
{
|
|
116
|
+
className: "nice-pagination__jump",
|
|
117
|
+
style: { display: "inline-flex", alignItems: "center", gap: 6, marginLeft: 8 },
|
|
118
|
+
children: [
|
|
119
|
+
/* @__PURE__ */ e("span", { style: { fontSize: "0.85rem", color: "var(--text-secondary)" }, children: h ?? "Go to" }),
|
|
120
|
+
/* @__PURE__ */ e(
|
|
121
|
+
y,
|
|
122
|
+
{
|
|
123
|
+
size: o === "lg" ? "md" : "sm",
|
|
124
|
+
min: 1,
|
|
125
|
+
max: a,
|
|
126
|
+
step: 1,
|
|
127
|
+
value: i,
|
|
128
|
+
disabled: t,
|
|
129
|
+
onChange: (n) => {
|
|
130
|
+
const p = typeof n == "number" ? n : Number(n);
|
|
131
|
+
if (!Number.isNaN(p)) {
|
|
132
|
+
const x = Math.max(1, Math.min(a, Math.floor(p)));
|
|
133
|
+
l(x);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
)
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
),
|
|
141
|
+
b && d && d.length > 0 && /* @__PURE__ */ e(
|
|
142
|
+
"select",
|
|
143
|
+
{
|
|
144
|
+
className: "nice-pagination__size",
|
|
145
|
+
value: f ?? d[0],
|
|
146
|
+
disabled: t,
|
|
147
|
+
onChange: (n) => N?.(Number(n.target.value)),
|
|
148
|
+
style: {
|
|
149
|
+
marginLeft: 8,
|
|
150
|
+
padding: "4px 8px",
|
|
151
|
+
border: "1px solid var(--border-color)",
|
|
152
|
+
borderRadius: 6,
|
|
153
|
+
background: "var(--bg-primary)",
|
|
154
|
+
color: "var(--text-primary)",
|
|
155
|
+
font: "inherit",
|
|
156
|
+
fontSize: "0.85rem"
|
|
157
|
+
},
|
|
158
|
+
"aria-label": "Rows per page",
|
|
159
|
+
children: d.map((n) => /* @__PURE__ */ u("option", { value: n, children: [
|
|
160
|
+
n,
|
|
161
|
+
" / page"
|
|
162
|
+
] }, n))
|
|
163
|
+
}
|
|
164
|
+
)
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
);
|
|
168
|
+
};
|
|
169
|
+
export {
|
|
170
|
+
L as N
|
|
171
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime"),g=require("./NiceTabs-CNauJ4fu.cjs");function v(e,a,t){const r=[];if(a<=1)return a===1&&r.push(1),r;const o=Math.max(2,e-t),c=Math.min(a-1,e+t);r.push(1),o>2&&r.push("dots");for(let s=o;s<=c;s++)r.push(s);return c<a-1&&r.push("dots"),r.push(a),r}const y=({page:e,totalPages:a,onChange:t,showInfo:r,siblingCount:o=1,size:c="md",showFirstLast:s,showJumpInput:p,jumpInputLabel:h,showPageSize:m,pageSizeOptions:u,pageSize:x,onPageSizeChange:b,disabled:l,className:f,style:N})=>{const _=v(e,a,o);return n.jsxs("nav",{className:`nice-pagination nice-pagination--${c} ${f||""}`,style:N,"aria-label":"Pagination",children:[s&&n.jsx("button",{className:"nice-pagination__btn",disabled:l||e<=1,onClick:()=>t(1),"aria-label":"First page",title:"First page",children:"⏮"}),n.jsx("button",{className:"nice-pagination__btn",disabled:l||e<=1,onClick:()=>t(e-1),"aria-label":"Previous",children:n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 20 20",fill:"currentColor",children:n.jsx("path",{fillRule:"evenodd",d:"M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z",clipRule:"evenodd"})})}),_.map((i,d)=>i==="dots"?n.jsx("span",{className:"nice-pagination__ellipsis",children:"…"},`dots-${d}`):n.jsx("button",{className:`nice-pagination__btn ${i===e?"nice-pagination__btn--active":""}`,disabled:l,onClick:()=>t(i),"aria-current":i===e?"page":void 0,children:i},i)),n.jsx("button",{className:"nice-pagination__btn",disabled:l||e>=a,onClick:()=>t(e+1),"aria-label":"Next",children:n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 20 20",fill:"currentColor",children:n.jsx("path",{fillRule:"evenodd",d:"M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z",clipRule:"evenodd"})})}),s&&n.jsx("button",{className:"nice-pagination__btn",disabled:l||e>=a,onClick:()=>t(a),"aria-label":"Last page",title:"Last page",children:"⏭"}),r&&n.jsxs("span",{className:"nice-pagination__info",children:[e," / ",a]}),p&&n.jsxs("span",{className:"nice-pagination__jump",style:{display:"inline-flex",alignItems:"center",gap:6,marginLeft:8},children:[n.jsx("span",{style:{fontSize:"0.85rem",color:"var(--text-secondary)"},children:h??"Go to"}),n.jsx(g.NiceNumberInput,{size:c==="lg"?"md":"sm",min:1,max:a,step:1,value:e,disabled:l,onChange:i=>{const d=typeof i=="number"?i:Number(i);if(!Number.isNaN(d)){const j=Math.max(1,Math.min(a,Math.floor(d)));t(j)}}})]}),m&&u&&u.length>0&&n.jsx("select",{className:"nice-pagination__size",value:x??u[0],disabled:l,onChange:i=>b?.(Number(i.target.value)),style:{marginLeft:8,padding:"4px 8px",border:"1px solid var(--border-color)",borderRadius:6,background:"var(--bg-primary)",color:"var(--text-primary)",font:"inherit",fontSize:"0.85rem"},"aria-label":"Rows per page",children:u.map(i=>n.jsxs("option",{value:i,children:[i," / page"]},i))})]})};exports.NicePagination=y;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime"),g=require("./NiceTabs-C-VQXNIa.cjs");function v(e,a,t){const r=[];if(a<=1)return a===1&&r.push(1),r;const o=Math.max(2,e-t),c=Math.min(a-1,e+t);r.push(1),o>2&&r.push("dots");for(let s=o;s<=c;s++)r.push(s);return c<a-1&&r.push("dots"),r.push(a),r}const y=({page:e,totalPages:a,onChange:t,showInfo:r,siblingCount:o=1,size:c="md",showFirstLast:s,showJumpInput:p,jumpInputLabel:h,showPageSize:m,pageSizeOptions:u,pageSize:x,onPageSizeChange:b,disabled:l,className:f,style:N})=>{const _=v(e,a,o);return n.jsxs("nav",{className:`nice-pagination nice-pagination--${c} ${f||""}`,style:N,"aria-label":"Pagination",children:[s&&n.jsx("button",{className:"nice-pagination__btn",disabled:l||e<=1,onClick:()=>t(1),"aria-label":"First page",title:"First page",children:"⏮"}),n.jsx("button",{className:"nice-pagination__btn",disabled:l||e<=1,onClick:()=>t(e-1),"aria-label":"Previous",children:n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 20 20",fill:"currentColor",children:n.jsx("path",{fillRule:"evenodd",d:"M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z",clipRule:"evenodd"})})}),_.map((i,d)=>i==="dots"?n.jsx("span",{className:"nice-pagination__ellipsis",children:"…"},`dots-${d}`):n.jsx("button",{className:`nice-pagination__btn ${i===e?"nice-pagination__btn--active":""}`,disabled:l,onClick:()=>t(i),"aria-current":i===e?"page":void 0,children:i},i)),n.jsx("button",{className:"nice-pagination__btn",disabled:l||e>=a,onClick:()=>t(e+1),"aria-label":"Next",children:n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 20 20",fill:"currentColor",children:n.jsx("path",{fillRule:"evenodd",d:"M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z",clipRule:"evenodd"})})}),s&&n.jsx("button",{className:"nice-pagination__btn",disabled:l||e>=a,onClick:()=>t(a),"aria-label":"Last page",title:"Last page",children:"⏭"}),r&&n.jsxs("span",{className:"nice-pagination__info",children:[e," / ",a]}),p&&n.jsxs("span",{className:"nice-pagination__jump",style:{display:"inline-flex",alignItems:"center",gap:6,marginLeft:8},children:[n.jsx("span",{style:{fontSize:"0.85rem",color:"var(--text-secondary)"},children:h??"Go to"}),n.jsx(g.NiceNumberInput,{size:c==="lg"?"md":"sm",min:1,max:a,step:1,value:e,disabled:l,onChange:i=>{const d=typeof i=="number"?i:Number(i);if(!Number.isNaN(d)){const j=Math.max(1,Math.min(a,Math.floor(d)));t(j)}}})]}),m&&u&&u.length>0&&n.jsx("select",{className:"nice-pagination__size",value:x??u[0],disabled:l,onChange:i=>b?.(Number(i.target.value)),style:{marginLeft:8,padding:"4px 8px",border:"1px solid var(--border-color)",borderRadius:6,background:"var(--bg-primary)",color:"var(--text-primary)",font:"inherit",fontSize:"0.85rem"},"aria-label":"Rows per page",children:u.map(i=>n.jsxs("option",{value:i,children:[i," / page"]},i))})]})};exports.NicePagination=y;
|