@wizleap-inc/wiz-ui-react 2.4.0 → 2.4.1
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/base/inputs/checkbox-new/components/checkbox-new.d.ts +8 -8
- package/dist/components/base/inputs/radio-new/components/radio-new.d.ts +8 -8
- package/dist/components/base/message-box/components/message-box.d.ts +3 -3
- package/dist/components/base/text-area/components/text-area.d.ts +12 -12
- package/dist/components/custom/schedule/stories/schedule.stories.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/wiz-ui.es.js +30 -63
- package/dist/wiz-ui.umd.js +8 -8
- package/package.json +6 -5
package/dist/wiz-ui.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var pr = Object.defineProperty;
|
|
2
2
|
var qr = (r, t, a) => t in r ? pr(r, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : r[t] = a;
|
|
3
|
-
var u1 = (r, t, a) =>
|
|
3
|
+
var u1 = (r, t, a) => qr(r, typeof t != "symbol" ? t + "" : t, a);
|
|
4
4
|
import m5, { forwardRef as c1, useState as B, useEffect as J, useRef as P, useCallback as o1, useLayoutEffect as Re, useMemo as $, memo as M1, useId as v5, createContext as G1, useContext as g1, Fragment as p5 } from "react";
|
|
5
5
|
import { createPortal as q5 } from "react-dom";
|
|
6
6
|
var Me = { exports: {} }, $1 = {};
|
|
@@ -15,18 +15,14 @@ var Me = { exports: {} }, $1 = {};
|
|
|
15
15
|
*/
|
|
16
16
|
var lt;
|
|
17
17
|
function fr() {
|
|
18
|
-
if (lt)
|
|
19
|
-
return $1;
|
|
18
|
+
if (lt) return $1;
|
|
20
19
|
lt = 1;
|
|
21
20
|
var r = m5, t = Symbol.for("react.element"), a = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, l = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
22
21
|
function s(o, c, h) {
|
|
23
22
|
var u, v = {}, m = null, g = null;
|
|
24
23
|
h !== void 0 && (m = "" + h), c.key !== void 0 && (m = "" + c.key), c.ref !== void 0 && (g = c.ref);
|
|
25
|
-
for (u in c)
|
|
26
|
-
|
|
27
|
-
if (o && o.defaultProps)
|
|
28
|
-
for (u in c = o.defaultProps, c)
|
|
29
|
-
v[u] === void 0 && (v[u] = c[u]);
|
|
24
|
+
for (u in c) n.call(c, u) && !i.hasOwnProperty(u) && (v[u] = c[u]);
|
|
25
|
+
if (o && o.defaultProps) for (u in c = o.defaultProps, c) v[u] === void 0 && (v[u] = c[u]);
|
|
30
26
|
return { $$typeof: t, type: o, key: m, ref: g, props: v, _owner: l.current };
|
|
31
27
|
}
|
|
32
28
|
return $1.Fragment = a, $1.jsx = s, $1.jsxs = s, $1;
|
|
@@ -1117,20 +1113,13 @@ const f5 = (r) => {
|
|
|
1117
1113
|
var Nr = "_1hr6b226", Wr = "_1hr6b228", Cr = "_1hr6b227", Br = { xs: "_1hr6b229", sm: "_1hr6b22a", md: "_1hr6b22b", lg: "_1hr6b22c" }, kr = { primary: "_1hr6b221 _1hr6b220", sub: "_1hr6b222 _1hr6b220", danger: "_1hr6b223 _1hr6b220", "sub-danger": "_1hr6b224 _1hr6b220", gray: "_1hr6b225 _1hr6b220" };
|
|
1118
1114
|
function b5(r) {
|
|
1119
1115
|
var t, a, n = "";
|
|
1120
|
-
if (typeof r == "string" || typeof r == "number")
|
|
1121
|
-
|
|
1122
|
-
else
|
|
1123
|
-
if (Array.isArray(r))
|
|
1124
|
-
for (t = 0; t < r.length; t++)
|
|
1125
|
-
r[t] && (a = b5(r[t])) && (n && (n += " "), n += a);
|
|
1126
|
-
else
|
|
1127
|
-
for (t in r)
|
|
1128
|
-
r[t] && (n && (n += " "), n += t);
|
|
1116
|
+
if (typeof r == "string" || typeof r == "number") n += r;
|
|
1117
|
+
else if (typeof r == "object") if (Array.isArray(r)) for (t = 0; t < r.length; t++) r[t] && (a = b5(r[t])) && (n && (n += " "), n += a);
|
|
1118
|
+
else for (t in r) r[t] && (n && (n += " "), n += t);
|
|
1129
1119
|
return n;
|
|
1130
1120
|
}
|
|
1131
1121
|
function w() {
|
|
1132
|
-
for (var r, t, a = 0, n = ""; a < arguments.length; )
|
|
1133
|
-
(r = arguments[a++]) && (t = b5(r)) && (n && (n += " "), n += t);
|
|
1122
|
+
for (var r, t, a = 0, n = ""; a < arguments.length; ) (r = arguments[a++]) && (t = b5(r)) && (n && (n += " "), n += t);
|
|
1134
1123
|
return n;
|
|
1135
1124
|
}
|
|
1136
1125
|
const Zr = {
|
|
@@ -1656,10 +1645,8 @@ const M5 = c1(
|
|
|
1656
1645
|
...v
|
|
1657
1646
|
}, m) => {
|
|
1658
1647
|
const [g, f] = B(!0), y = $(() => n || c || "", [n, c]), x = $(() => i || (c && !n ? "gray.900" : "white.800"), [i, c, n]), _ = $(() => {
|
|
1659
|
-
if (s)
|
|
1660
|
-
|
|
1661
|
-
if (!n)
|
|
1662
|
-
return X.color.gray[400];
|
|
1648
|
+
if (s) return f5(s);
|
|
1649
|
+
if (!n) return X.color.gray[400];
|
|
1663
1650
|
const p = Array.from(n).map((N) => N.charCodeAt(0)).reduce((N, Z) => N + Z);
|
|
1664
1651
|
return `hsl(${p * p % 360}, 50%, 48%)`;
|
|
1665
1652
|
}, [s, n]);
|
|
@@ -1681,8 +1668,7 @@ const M5 = c1(
|
|
|
1681
1668
|
onClick: (p) => h && (u == null ? void 0 : u(p)),
|
|
1682
1669
|
onKeyDown: (p) => {
|
|
1683
1670
|
if (p.key === "Enter" || p.key === " ") {
|
|
1684
|
-
if (!h)
|
|
1685
|
-
return;
|
|
1671
|
+
if (!h) return;
|
|
1686
1672
|
p.target instanceof HTMLElement && (p.stopPropagation(), p.target.click());
|
|
1687
1673
|
}
|
|
1688
1674
|
},
|
|
@@ -1757,8 +1743,7 @@ const $8 = M5, E5 = c1(
|
|
|
1757
1743
|
return `0 ${f1(x)} ${f1(x)} 0`;
|
|
1758
1744
|
if (f)
|
|
1759
1745
|
return `${f1(f)} ${f1(f)} 0 0`;
|
|
1760
|
-
if (g)
|
|
1761
|
-
return f1(g);
|
|
1746
|
+
if (g) return f1(g);
|
|
1762
1747
|
})(), d1 = {
|
|
1763
1748
|
...t,
|
|
1764
1749
|
position: a,
|
|
@@ -4843,8 +4828,7 @@ function Z0(r, t) {
|
|
|
4843
4828
|
const n = a.label.includes(t);
|
|
4844
4829
|
if (!a.children || a.children.length === 0)
|
|
4845
4830
|
return n ? [a] : [];
|
|
4846
|
-
if (n)
|
|
4847
|
-
return [a];
|
|
4831
|
+
if (n) return [a];
|
|
4848
4832
|
const l = Z0(a.children, t);
|
|
4849
4833
|
return l.length === 0 ? [] : [
|
|
4850
4834
|
{
|
|
@@ -4878,10 +4862,8 @@ const M0 = ({
|
|
|
4878
4862
|
[_, a]
|
|
4879
4863
|
), Q = $(() => {
|
|
4880
4864
|
const I = /* @__PURE__ */ new Map(), A = (l1) => l1.flatMap((i1) => {
|
|
4881
|
-
if (!i1.children)
|
|
4882
|
-
|
|
4883
|
-
if (!y)
|
|
4884
|
-
return [i1, ...A(i1.children)];
|
|
4865
|
+
if (!i1.children) return [i1];
|
|
4866
|
+
if (!y) return [i1, ...A(i1.children)];
|
|
4885
4867
|
const m1 = i1.children.map((d1) => ({
|
|
4886
4868
|
...d1,
|
|
4887
4869
|
// 要件上、全角空白のため無視
|
|
@@ -5029,8 +5011,7 @@ const z1 = G1({}), O6 = ({
|
|
|
5029
5011
|
}, f = (x) => {
|
|
5030
5012
|
x.key === "Enter" && (h || a.option.onClick());
|
|
5031
5013
|
}, y = () => {
|
|
5032
|
-
if (h)
|
|
5033
|
-
return;
|
|
5014
|
+
if (h) return;
|
|
5034
5015
|
s(!0);
|
|
5035
5016
|
const x = () => {
|
|
5036
5017
|
s(!1), document.removeEventListener("mouseup", x);
|
|
@@ -5115,8 +5096,7 @@ const z1 = G1({}), O6 = ({
|
|
|
5115
5096
|
kind: "item",
|
|
5116
5097
|
item: f
|
|
5117
5098
|
};
|
|
5118
|
-
if (y + 1 === a.length)
|
|
5119
|
-
return [x];
|
|
5099
|
+
if (y + 1 === a.length) return [x];
|
|
5120
5100
|
switch (a[y].kind) {
|
|
5121
5101
|
case "group":
|
|
5122
5102
|
return c ? [x, m] : [x];
|
|
@@ -5169,10 +5149,8 @@ function G6(r, t) {
|
|
|
5169
5149
|
{ length: r.length + 1 },
|
|
5170
5150
|
() => Array(t.length + 1).fill(0)
|
|
5171
5151
|
);
|
|
5172
|
-
for (let n = 0; n < r.length + 1; n++)
|
|
5173
|
-
|
|
5174
|
-
for (let n = 0; n < t.length + 1; n++)
|
|
5175
|
-
a[0][n] = n;
|
|
5152
|
+
for (let n = 0; n < r.length + 1; n++) a[n][0] = n;
|
|
5153
|
+
for (let n = 0; n < t.length + 1; n++) a[0][n] = n;
|
|
5176
5154
|
for (let n = 1; n < r.length + 1; n++)
|
|
5177
5155
|
for (let l = 1; l < t.length + 1; l++) {
|
|
5178
5156
|
const i = r[n - 1] === t[l - 1] ? 0 : 1;
|
|
@@ -7098,8 +7076,7 @@ const $s = ({
|
|
|
7098
7076
|
const i = P(null), s = P(null), o = Os(a, l);
|
|
7099
7077
|
return J(() => {
|
|
7100
7078
|
const c = i.current, h = s.current;
|
|
7101
|
-
if (!c || !h)
|
|
7102
|
-
return;
|
|
7079
|
+
if (!c || !h) return;
|
|
7103
7080
|
const u = new ResizeObserver(() => {
|
|
7104
7081
|
c.style.width = a === 0 ? "0" : `max(${a}%, ${h.offsetWidth}px)`;
|
|
7105
7082
|
});
|
|
@@ -7297,11 +7274,9 @@ const q4 = ({
|
|
|
7297
7274
|
S.disconnect();
|
|
7298
7275
|
};
|
|
7299
7276
|
}, [g]), J(() => {
|
|
7300
|
-
if (n === 0)
|
|
7301
|
-
return;
|
|
7277
|
+
if (n === 0) return;
|
|
7302
7278
|
const f = v.current, y = u.current;
|
|
7303
|
-
if (!f || !y)
|
|
7304
|
-
return;
|
|
7279
|
+
if (!f || !y) return;
|
|
7305
7280
|
const x = () => {
|
|
7306
7281
|
if (y.offsetHeight > f.offsetHeight) {
|
|
7307
7282
|
y.style.top = "unset", y.style.bottom = "100%", y.style.color = "#606166";
|
|
@@ -7477,8 +7452,7 @@ const I4 = ({
|
|
|
7477
7452
|
);
|
|
7478
7453
|
}, [v.length]), J(() => {
|
|
7479
7454
|
const m = c.current, g = o.current;
|
|
7480
|
-
if (!m || !g)
|
|
7481
|
-
return;
|
|
7455
|
+
if (!m || !g) return;
|
|
7482
7456
|
if (s === 0) {
|
|
7483
7457
|
m.style.transform = "translateX(-50%)";
|
|
7484
7458
|
return;
|
|
@@ -7496,13 +7470,11 @@ const I4 = ({
|
|
|
7496
7470
|
};
|
|
7497
7471
|
}, [i, s]), J(() => {
|
|
7498
7472
|
const m = h.current, g = u.current;
|
|
7499
|
-
if (!m || !g)
|
|
7500
|
-
return;
|
|
7473
|
+
if (!m || !g) return;
|
|
7501
7474
|
const f = () => {
|
|
7502
7475
|
m.forEach((x, _) => {
|
|
7503
7476
|
const p = g[_];
|
|
7504
|
-
if (!p || !x)
|
|
7505
|
-
return;
|
|
7477
|
+
if (!p || !x) return;
|
|
7506
7478
|
const S = 8;
|
|
7507
7479
|
if (p.offsetHeight + S * 2 < x.offsetHeight) {
|
|
7508
7480
|
p.style.padding = `${S}px 0`;
|
|
@@ -7861,8 +7833,7 @@ const K4 = ({
|
|
|
7861
7833
|
}, f = (x) => {
|
|
7862
7834
|
x.key === "Enter" && (h || a.option.onClick());
|
|
7863
7835
|
}, y = () => {
|
|
7864
|
-
if (h)
|
|
7865
|
-
return;
|
|
7836
|
+
if (h) return;
|
|
7866
7837
|
s(!0);
|
|
7867
7838
|
const x = () => {
|
|
7868
7839
|
s(!1), document.removeEventListener("mouseup", x);
|
|
@@ -7947,8 +7918,7 @@ const K4 = ({
|
|
|
7947
7918
|
kind: "item",
|
|
7948
7919
|
item: f
|
|
7949
7920
|
};
|
|
7950
|
-
if (y + 1 === a.length)
|
|
7951
|
-
return [x];
|
|
7921
|
+
if (y + 1 === a.length) return [x];
|
|
7952
7922
|
switch (a[y].kind) {
|
|
7953
7923
|
case "group":
|
|
7954
7924
|
return c ? [x, m] : [x];
|
|
@@ -8294,8 +8264,7 @@ const So = f2, g2 = G1({
|
|
|
8294
8264
|
showSnackbar: () => {
|
|
8295
8265
|
}
|
|
8296
8266
|
}), jc = () => g1(g2), t5 = (() => {
|
|
8297
|
-
if (!window)
|
|
8298
|
-
return 0;
|
|
8267
|
+
if (!window) return 0;
|
|
8299
8268
|
const r = f1("md");
|
|
8300
8269
|
return !r || r === "auto" ? 0 : r === "9999px" ? 9999 : parseFloat(r) * parseFloat(window.getComputedStyle(document.documentElement).fontSize);
|
|
8301
8270
|
})(), Io = ({ children: r }) => {
|
|
@@ -8507,10 +8476,8 @@ const ke = ({ onKeyDown: r, ...t }) => /* @__PURE__ */ e(
|
|
|
8507
8476
|
sideLength: i = 2
|
|
8508
8477
|
}) => {
|
|
8509
8478
|
const s = Math.max(0, i), o = 2 * s + 1, c = (u) => {
|
|
8510
|
-
if (u < 1)
|
|
8511
|
-
|
|
8512
|
-
if (u > n)
|
|
8513
|
-
return l == null ? void 0 : l(n);
|
|
8479
|
+
if (u < 1) return l == null ? void 0 : l(1);
|
|
8480
|
+
if (u > n) return l == null ? void 0 : l(n);
|
|
8514
8481
|
l == null || l(u);
|
|
8515
8482
|
}, h = () => {
|
|
8516
8483
|
if (n < o)
|