denwa-react-shared 1.0.20 → 1.0.21
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/denwa-react-shared.cjs.js +1 -1
- package/dist/denwa-react-shared.es.js +36 -36
- package/dist/denwa-react-shared.umd.js +1285 -235
- package/dist/index-C9_FuY9g.cjs +2017 -0
- package/dist/index-DiC1uMp3.js +237858 -0
- package/dist/table-head-BwYEg8qE-B-KDj-et-DM8pxHve.cjs +1 -0
- package/dist/table-head-BwYEg8qE-B-KDj-et-cNKgPHwr.js +669 -0
- package/dist/{table-head-BWaThZCF.cjs → table-head-DRm_2s2D.cjs} +1 -1
- package/dist/table-head-DhiARHac-B8sucMHE.cjs +1 -0
- package/dist/table-head-DhiARHac-DCJED23g.js +669 -0
- package/dist/{table-head-BwYEg8qE.js → table-head-KbqJOlmi.js} +38 -38
- package/package.json +1 -1
- package/dist/index-DBF8ycw_.js +0 -122146
- package/dist/index-i5fJCims.cjs +0 -967
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as F, u as Ce, C as Re, a as G, c as
|
|
1
|
+
import { _ as F, u as Ce, C as Re, a as G, c as X, b as de, d as je, e as Oe, o as Ne, f as ie, g as L, h as ue, i as Me, m as Ie, r as Ee, j as He, k as B, l as Pe, t as De, n as Ve, p as Be, q as Te, I as Ae, s as ze, z as _e, H as Fe, v as Ke, w as Le, x as v, F as U, y as W, S as Q, A as We, B as Xe, D as qe, Y as Ue, T as J, E as oe, R as Ge } from "./index-DiC1uMp3.js";
|
|
2
2
|
import * as i from "react";
|
|
3
|
-
import { useState as Ye, useMemo as Je, cloneElement as
|
|
3
|
+
import { useState as Ye, useMemo as Je, cloneElement as Qe } from "react";
|
|
4
4
|
var le = function(t, n) {
|
|
5
5
|
if (!t) return null;
|
|
6
6
|
var a = {
|
|
@@ -29,15 +29,15 @@ var le = function(t, n) {
|
|
|
29
29
|
}, D = function(t) {
|
|
30
30
|
return t !== void 0 ? "".concat(t, "px") : void 0;
|
|
31
31
|
};
|
|
32
|
-
function
|
|
32
|
+
function Ze(e) {
|
|
33
33
|
var t = e.prefixCls, n = e.containerRef, a = e.value, o = e.getValueIndex, r = e.motionName, p = e.onMotionStart, h = e.onMotionEnd, b = e.direction, x = e.vertical, d = x === void 0 ? !1 : x, w = i.useRef(null), C = i.useState(a), R = F(C, 2), f = R[0], I = R[1], j = function(H) {
|
|
34
|
-
var u,
|
|
34
|
+
var u, _ = o(H), P = (u = n.current) === null || u === void 0 ? void 0 : u.querySelectorAll(".".concat(t, "-item"))[_];
|
|
35
35
|
return (P == null ? void 0 : P.offsetParent) && P;
|
|
36
36
|
}, N = i.useState(null), m = F(N, 2), l = m[0], M = m[1], T = i.useState(null), S = F(T, 2), s = S[0], E = S[1];
|
|
37
37
|
Ce(function() {
|
|
38
38
|
if (f !== a) {
|
|
39
|
-
var c = j(f), H = j(a), u = le(c, d),
|
|
40
|
-
I(a), M(u), E(
|
|
39
|
+
var c = j(f), H = j(a), u = le(c, d), _ = le(H, d);
|
|
40
|
+
I(a), M(u), E(_), c && H ? p() : h();
|
|
41
41
|
}
|
|
42
42
|
}, [a]);
|
|
43
43
|
var y = i.useMemo(function() {
|
|
@@ -68,7 +68,7 @@ function Qe(e) {
|
|
|
68
68
|
transform: "translateX(var(--thumb-active-left))",
|
|
69
69
|
width: "var(--thumb-active-width)"
|
|
70
70
|
};
|
|
71
|
-
},
|
|
71
|
+
}, z = function() {
|
|
72
72
|
M(null), E(null), h();
|
|
73
73
|
};
|
|
74
74
|
return !l || !s ? null : /* @__PURE__ */ i.createElement(Re, {
|
|
@@ -77,9 +77,9 @@ function Qe(e) {
|
|
|
77
77
|
motionAppear: !0,
|
|
78
78
|
onAppearStart: A,
|
|
79
79
|
onAppearActive: V,
|
|
80
|
-
onVisibleChanged:
|
|
80
|
+
onVisibleChanged: z
|
|
81
81
|
}, function(c, H) {
|
|
82
|
-
var u = c.className,
|
|
82
|
+
var u = c.className, _ = c.style, P = G(G({}, _), {}, {
|
|
83
83
|
"--thumb-start-left": y,
|
|
84
84
|
"--thumb-start-width": D(l == null ? void 0 : l.width),
|
|
85
85
|
"--thumb-active-left": O,
|
|
@@ -91,7 +91,7 @@ function Qe(e) {
|
|
|
91
91
|
}), q = {
|
|
92
92
|
ref: de(w, H),
|
|
93
93
|
style: P,
|
|
94
|
-
className:
|
|
94
|
+
className: X("".concat(t, "-thumb"), u)
|
|
95
95
|
};
|
|
96
96
|
return process.env.NODE_ENV === "test" && (q["data-test-style"] = JSON.stringify(P)), /* @__PURE__ */ i.createElement("div", q);
|
|
97
97
|
});
|
|
@@ -125,7 +125,7 @@ var at = function(t) {
|
|
|
125
125
|
o || d(m, b);
|
|
126
126
|
};
|
|
127
127
|
return /* @__PURE__ */ i.createElement("label", {
|
|
128
|
-
className:
|
|
128
|
+
className: X(a, L({}, "".concat(n, "-item-disabled"), o)),
|
|
129
129
|
onMouseDown: I
|
|
130
130
|
}, /* @__PURE__ */ i.createElement("input", {
|
|
131
131
|
name: x,
|
|
@@ -151,9 +151,9 @@ var at = function(t) {
|
|
|
151
151
|
}, [x]), s = Oe((n = S[0]) === null || n === void 0 ? void 0 : n.value, {
|
|
152
152
|
value: C,
|
|
153
153
|
defaultValue: w
|
|
154
|
-
}), E = F(s, 2), y = E[0], O = E[1], A = i.useState(!1), V = F(A, 2),
|
|
154
|
+
}), E = F(s, 2), y = E[0], O = E[1], A = i.useState(!1), V = F(A, 2), z = V[0], c = V[1], H = function($, K) {
|
|
155
155
|
O(K), f == null || f(K);
|
|
156
|
-
}, u = Ne(l, ["children"]),
|
|
156
|
+
}, u = Ne(l, ["children"]), _ = i.useState(!1), P = F(_, 2), q = P[0], k = P[1], ge = i.useState(!1), ee = F(ge, 2), he = ee[0], te = ee[1], be = function() {
|
|
157
157
|
te(!0);
|
|
158
158
|
}, pe = function() {
|
|
159
159
|
te(!1);
|
|
@@ -183,11 +183,11 @@ var at = function(t) {
|
|
|
183
183
|
"aria-label": "segmented control",
|
|
184
184
|
tabIndex: d ? void 0 : 0
|
|
185
185
|
}, u, {
|
|
186
|
-
className:
|
|
186
|
+
className: X(r, (a = {}, L(a, "".concat(r, "-rtl"), p === "rtl"), L(a, "".concat(r, "-disabled"), d), L(a, "".concat(r, "-vertical"), h), a), j),
|
|
187
187
|
ref: T
|
|
188
188
|
}), /* @__PURE__ */ i.createElement("div", {
|
|
189
189
|
className: "".concat(r, "-group")
|
|
190
|
-
}, /* @__PURE__ */ i.createElement(
|
|
190
|
+
}, /* @__PURE__ */ i.createElement(Ze, {
|
|
191
191
|
vertical: h,
|
|
192
192
|
prefixCls: r,
|
|
193
193
|
value: y,
|
|
@@ -211,7 +211,7 @@ var at = function(t) {
|
|
|
211
211
|
name: R,
|
|
212
212
|
key: g.value,
|
|
213
213
|
prefixCls: r,
|
|
214
|
-
className:
|
|
214
|
+
className: X(g.className, "".concat(r, "-item"), ($ = {}, L($, "".concat(r, "-item-selected"), g.value === y && !z), L($, "".concat(r, "-item-focused"), he && q && g.value === y), $)),
|
|
215
215
|
checked: g.value === y,
|
|
216
216
|
onChange: H,
|
|
217
217
|
onFocus: be,
|
|
@@ -460,15 +460,15 @@ const ct = /* @__PURE__ */ i.forwardRef((e, t) => {
|
|
|
460
460
|
const {
|
|
461
461
|
icon: A,
|
|
462
462
|
label: V
|
|
463
|
-
} = O,
|
|
464
|
-
return Object.assign(Object.assign({},
|
|
463
|
+
} = O, z = ce(O, ["icon", "label"]);
|
|
464
|
+
return Object.assign(Object.assign({}, z), {
|
|
465
465
|
label: /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement("span", {
|
|
466
466
|
className: `${m}-item-icon`
|
|
467
467
|
}, A), V && /* @__PURE__ */ i.createElement("span", null, V))
|
|
468
468
|
});
|
|
469
469
|
}
|
|
470
470
|
return O;
|
|
471
|
-
}), [h, m]), E =
|
|
471
|
+
}), [h, m]), E = X(o, r, j, {
|
|
472
472
|
[`${m}-block`]: p,
|
|
473
473
|
[`${m}-sm`]: S === "small",
|
|
474
474
|
[`${m}-lg`]: S === "large",
|
|
@@ -488,17 +488,17 @@ const ct = /* @__PURE__ */ i.forwardRef((e, t) => {
|
|
|
488
488
|
}), ve = ct;
|
|
489
489
|
process.env.NODE_ENV !== "production" && (ve.displayName = "Segmented");
|
|
490
490
|
var dt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M758.2 839.1C851.8 765.9 912 651.9 912 523.9 912 303 733.5 124.3 512.6 124 291.4 123.7 112 302.8 112 523.9c0 125.2 57.5 236.9 147.6 310.2 3.5 2.8 8.6 2.2 11.4-1.3l39.4-50.5c2.7-3.4 2.1-8.3-1.2-11.1-8.1-6.6-15.9-13.7-23.4-21.2a318.64 318.64 0 01-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 01-68.6 101.7c-9.3 9.3-19.1 18-29.3 26L668.2 724a8 8 0 00-14.1 3l-39.6 162.2c-1.2 5 2.6 9.9 7.7 9.9l167 .8c6.7 0 10.5-7.7 6.3-12.9l-37.3-47.9z" } }] }, name: "redo", theme: "outlined" };
|
|
491
|
-
function
|
|
492
|
-
return
|
|
491
|
+
function Z() {
|
|
492
|
+
return Z = Object.assign ? Object.assign.bind() : function(e) {
|
|
493
493
|
for (var t = 1; t < arguments.length; t++) {
|
|
494
494
|
var n = arguments[t];
|
|
495
495
|
for (var a in n)
|
|
496
496
|
Object.prototype.hasOwnProperty.call(n, a) && (e[a] = n[a]);
|
|
497
497
|
}
|
|
498
498
|
return e;
|
|
499
|
-
},
|
|
499
|
+
}, Z.apply(this, arguments);
|
|
500
500
|
}
|
|
501
|
-
const ut = (e, t) => /* @__PURE__ */ i.createElement(Ae,
|
|
501
|
+
const ut = (e, t) => /* @__PURE__ */ i.createElement(Ae, Z({}, e, {
|
|
502
502
|
ref: t,
|
|
503
503
|
icon: dt
|
|
504
504
|
})), fe = /* @__PURE__ */ i.forwardRef(ut);
|
|
@@ -526,7 +526,7 @@ const mt = ({
|
|
|
526
526
|
}) => {
|
|
527
527
|
const [l, M] = Ye(b), {
|
|
528
528
|
token: { borderRadius: T, colorBgBase: S, paddingXXS: s }
|
|
529
|
-
} =
|
|
529
|
+
} = ze.useToken(), { isMobileMaxWidth: E } = _e(), { isSmallMaxWidth: y } = Fe(), O = Je(() => y ? 2 : E ? 5 : 15, [E, y]);
|
|
530
530
|
Ke(
|
|
531
531
|
() => {
|
|
532
532
|
f == null || f(l);
|
|
@@ -538,7 +538,7 @@ const mt = ({
|
|
|
538
538
|
M("");
|
|
539
539
|
}, V = (u) => {
|
|
540
540
|
R(u), A();
|
|
541
|
-
},
|
|
541
|
+
}, z = (u) => {
|
|
542
542
|
M(u.target.value.replace(/"/g, ""));
|
|
543
543
|
}, c = (u) => {
|
|
544
544
|
j == null || j(u);
|
|
@@ -548,7 +548,7 @@ const mt = ({
|
|
|
548
548
|
return /* @__PURE__ */ v.jsxs(
|
|
549
549
|
U,
|
|
550
550
|
{
|
|
551
|
-
className:
|
|
551
|
+
className: W.flex,
|
|
552
552
|
gap: "small",
|
|
553
553
|
style: {
|
|
554
554
|
padding: s,
|
|
@@ -557,7 +557,7 @@ const mt = ({
|
|
|
557
557
|
},
|
|
558
558
|
children: [
|
|
559
559
|
/* @__PURE__ */ v.jsx(
|
|
560
|
-
|
|
560
|
+
Q,
|
|
561
561
|
{
|
|
562
562
|
defaultValue: o,
|
|
563
563
|
value: o,
|
|
@@ -567,22 +567,22 @@ const mt = ({
|
|
|
567
567
|
}
|
|
568
568
|
),
|
|
569
569
|
{
|
|
570
|
-
text: /* @__PURE__ */ v.jsx(qe, { placeholder: t, value: l, allowClear: !0, onChange:
|
|
570
|
+
text: /* @__PURE__ */ v.jsx(qe, { placeholder: t, value: l, allowClear: !0, onChange: z }),
|
|
571
571
|
radio: /* @__PURE__ */ v.jsx(
|
|
572
572
|
ve,
|
|
573
573
|
{
|
|
574
574
|
options: r,
|
|
575
|
-
defaultValue:
|
|
575
|
+
defaultValue: Xe,
|
|
576
576
|
onChange: I
|
|
577
577
|
}
|
|
578
578
|
),
|
|
579
|
-
date:
|
|
579
|
+
date: Qe(e, {
|
|
580
580
|
noDateText: n,
|
|
581
581
|
currentValue: x ?? "",
|
|
582
582
|
onChangeDate: c
|
|
583
583
|
}),
|
|
584
584
|
number: /* @__PURE__ */ v.jsx(
|
|
585
|
-
|
|
585
|
+
We,
|
|
586
586
|
{
|
|
587
587
|
emptyText: a,
|
|
588
588
|
value: d,
|
|
@@ -593,9 +593,9 @@ const mt = ({
|
|
|
593
593
|
}
|
|
594
594
|
),
|
|
595
595
|
multiselect: /* @__PURE__ */ v.jsx(
|
|
596
|
-
|
|
596
|
+
Q,
|
|
597
597
|
{
|
|
598
|
-
className:
|
|
598
|
+
className: W.select,
|
|
599
599
|
mode: "multiple",
|
|
600
600
|
placeholder: t,
|
|
601
601
|
maxTagCount: 1,
|
|
@@ -639,21 +639,21 @@ const mt = ({
|
|
|
639
639
|
/* @__PURE__ */ v.jsxs(U, { align: "center", gap: "middle", wrap: "wrap", children: [
|
|
640
640
|
/* @__PURE__ */ v.jsx(mt, { ...b }),
|
|
641
641
|
/* @__PURE__ */ v.jsx(J, { title: e, children: /* @__PURE__ */ v.jsx(
|
|
642
|
-
|
|
642
|
+
Q,
|
|
643
643
|
{
|
|
644
|
-
className:
|
|
644
|
+
className: W.sort,
|
|
645
645
|
value: r,
|
|
646
646
|
options: p,
|
|
647
647
|
onChange: R
|
|
648
648
|
}
|
|
649
649
|
) })
|
|
650
650
|
] }),
|
|
651
|
-
/* @__PURE__ */ v.jsxs(U, { className:
|
|
652
|
-
C && /* @__PURE__ */ v.jsx(J, { title: t, children: /* @__PURE__ */ v.jsx(oe, { className:
|
|
651
|
+
/* @__PURE__ */ v.jsxs(U, { className: W.buttonsContainer, gap: "small", align: "center", children: [
|
|
652
|
+
C && /* @__PURE__ */ v.jsx(J, { title: t, children: /* @__PURE__ */ v.jsx(oe, { className: W.button, icon: /* @__PURE__ */ v.jsx(fe, {}), onClick: C, children: n }) }),
|
|
653
653
|
!d && x && /* @__PURE__ */ v.jsx(J, { title: h ?? o, children: /* @__PURE__ */ v.jsx(
|
|
654
654
|
oe,
|
|
655
655
|
{
|
|
656
|
-
className:
|
|
656
|
+
className: W.button,
|
|
657
657
|
type: "primary",
|
|
658
658
|
icon: /* @__PURE__ */ v.jsx(Ge, {}),
|
|
659
659
|
onClick: w,
|