anysystem-design 0.0.7 → 0.0.9
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/{combobox-CUB-N452.js → combobox-BFmS_epO.js} +1 -1
- package/dist/components/AutoComplete/AutoCompleteBase.js +25 -16
- package/dist/components/AutoComplete/AutoCompleteMultiple.js +29 -20
- package/dist/components/Checkbox/CheckboxBase.js +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +11 -0
- package/dist/components/DatePicker/DatePicker.js +6755 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/DatePicker/index.js +4 -0
- package/dist/components/Icon/Icon.js +1 -1
- package/dist/components/Selectbox/SelectboxBase.js +13 -12
- package/dist/components/Selectbox/SelectboxMultiple.js +16 -15
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +30 -28
- package/dist/floating-ui.react-dom-xElE0hWP.js +1113 -0
- package/dist/{index-DaQhM816.js → index-C197ia6B.js} +3 -1
- package/dist/index-vZEwQcSd.js +2538 -0
- package/dist/index.css +1 -1
- package/dist/index.js +34 -32
- package/dist/{listbox-BoGLpnJ5.js → listbox-uFQRPSYb.js} +20 -20
- package/package.json +8 -8
- package/dist/index-WJdgKpVa.js +0 -3632
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { s as $e, o as g, n as q, Q as Ke, aa as Ue, M as Re, W as re, K as qe, f as Ge, l as Je, T as Ye, g as Qe, h as te, F as Ze, z as Xe, v as et, i as tt, j as ce, k as nt, m as le, q as ot, y as de, r as it, C as De, p as st, I as be, G as rt, $ as Fe, w as ke, D as ge, x as lt, A as at, B as ut, R as ct, P as dt, E as pt, V as ft, J as ht, L as mt, N as vt, S as ye, U as bt, O as Ce, Y as gt, ab as xt, Z as we, _ as St, a2 as _, a3 as F, a5 as It, ac as Ot, a8 as Me, a9 as Et } from "./index-vZEwQcSd.js";
|
|
2
2
|
import * as ie from "react";
|
|
3
3
|
import $, { useEffect as xe, useRef as N, createContext as Se, useReducer as Tt, createRef as Rt, useCallback as _e, useMemo as G, useId as pe, useContext as Ie, useState as yt, Fragment as Ae } from "react";
|
|
4
4
|
import { r as X } from "./index-DsprzSCj.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as a, jsxs as f } from "react/jsx-runtime";
|
|
2
2
|
import d, { Fragment as p } from "react";
|
|
3
3
|
import { t as y } from "../../bundle-mjs-SHnj3fHy.js";
|
|
4
|
-
import { H as
|
|
5
|
-
import { b } from "../../index-wvw0O1v3.js";
|
|
4
|
+
import { H as g, X as b } from "../../index-vZEwQcSd.js";
|
|
5
|
+
import { b as x } from "../../index-wvw0O1v3.js";
|
|
6
6
|
import { getValue as u } from "../Selectbox/helper.js";
|
|
7
|
-
import { N as
|
|
8
|
-
const
|
|
7
|
+
import { N as C, G as E, H as w, z as N, K as L } from "../../combobox-BFmS_epO.js";
|
|
8
|
+
const S = (l, r) => r.type === "SEARCH" ? {
|
|
9
9
|
...l,
|
|
10
10
|
query: r.query,
|
|
11
11
|
filterList: l.list.filter((t) => t.label.toLowerCase().includes(r.query.toLowerCase()))
|
|
@@ -17,8 +17,16 @@ const L = (l, r) => r.type === "SEARCH" ? {
|
|
|
17
17
|
...l,
|
|
18
18
|
selected: r.selected,
|
|
19
19
|
value: u(r.selected, l.valueField) + ""
|
|
20
|
-
} : l,
|
|
21
|
-
|
|
20
|
+
} : l, H = ({
|
|
21
|
+
id: l,
|
|
22
|
+
name: r,
|
|
23
|
+
options: t,
|
|
24
|
+
value: i = "",
|
|
25
|
+
valueField: o = "value",
|
|
26
|
+
onChange: m,
|
|
27
|
+
placeholder: h
|
|
28
|
+
}, v) => {
|
|
29
|
+
const [c, s] = d.useReducer(S, {
|
|
22
30
|
list: t,
|
|
23
31
|
query: "",
|
|
24
32
|
filterList: t,
|
|
@@ -29,11 +37,11 @@ const L = (l, r) => r.type === "SEARCH" ? {
|
|
|
29
37
|
return i ? n === i : !1;
|
|
30
38
|
}) || null
|
|
31
39
|
});
|
|
32
|
-
return d.useImperativeHandle(
|
|
40
|
+
return d.useImperativeHandle(v, () => ({
|
|
33
41
|
search: (e) => s({ type: "SEARCH", query: e }),
|
|
34
42
|
setValue: (e) => s({ type: "SETVALUE", value: e })
|
|
35
43
|
})), /* @__PURE__ */ a(
|
|
36
|
-
|
|
44
|
+
C,
|
|
37
45
|
{
|
|
38
46
|
value: c.selected,
|
|
39
47
|
onChange: (e) => {
|
|
@@ -44,15 +52,16 @@ const L = (l, r) => r.type === "SEARCH" ? {
|
|
|
44
52
|
},
|
|
45
53
|
children: /* @__PURE__ */ f("div", { className: "relative", children: [
|
|
46
54
|
/* @__PURE__ */ a(
|
|
47
|
-
|
|
55
|
+
E,
|
|
48
56
|
{
|
|
57
|
+
placeholder: h,
|
|
49
58
|
onChange: (e) => s({ type: "SEARCH", query: e.target.value }),
|
|
50
59
|
autoComplete: "off",
|
|
51
60
|
displayValue: (e) => (e == null ? void 0 : e.label) || ""
|
|
52
61
|
}
|
|
53
62
|
),
|
|
54
|
-
/* @__PURE__ */ a(
|
|
55
|
-
|
|
63
|
+
/* @__PURE__ */ a(w, { className: "absolute inset-y-0 right-0 flex items-center pr-2", children: /* @__PURE__ */ a(
|
|
64
|
+
g,
|
|
56
65
|
{
|
|
57
66
|
className: "h-5 w-5 text-gray-400",
|
|
58
67
|
"aria-hidden": "true"
|
|
@@ -70,7 +79,7 @@ const L = (l, r) => r.type === "SEARCH" ? {
|
|
|
70
79
|
}
|
|
71
80
|
),
|
|
72
81
|
/* @__PURE__ */ a(
|
|
73
|
-
|
|
82
|
+
b,
|
|
74
83
|
{
|
|
75
84
|
as: p,
|
|
76
85
|
enter: "transition duration-100 ease-out",
|
|
@@ -80,7 +89,7 @@ const L = (l, r) => r.type === "SEARCH" ? {
|
|
|
80
89
|
leaveFrom: "scale-100 transform opacity-100",
|
|
81
90
|
leaveTo: "scale-95 transform opacity-0",
|
|
82
91
|
afterLeave: () => s({ type: "SEARCH", query: "" }),
|
|
83
|
-
children: /* @__PURE__ */ a(
|
|
92
|
+
children: /* @__PURE__ */ a(N, { className: "absolute z-50 mt-5 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black/5 focus:outline-none sm:text-sm", children: c.filterList.map((e) => /* @__PURE__ */ a(L, { as: p, value: e, children: ({ selected: n }) => /* @__PURE__ */ f(
|
|
84
93
|
"li",
|
|
85
94
|
{
|
|
86
95
|
className: y(
|
|
@@ -96,7 +105,7 @@ const L = (l, r) => r.type === "SEARCH" ? {
|
|
|
96
105
|
className: y(
|
|
97
106
|
"absolute inset-y-0 left-0 flex items-center pl-3 text-indigo-600"
|
|
98
107
|
),
|
|
99
|
-
children: /* @__PURE__ */ a(
|
|
108
|
+
children: /* @__PURE__ */ a(x, { className: "h-5 w-5", "aria-hidden": "true" })
|
|
100
109
|
}
|
|
101
110
|
) : null
|
|
102
111
|
]
|
|
@@ -107,7 +116,7 @@ const L = (l, r) => r.type === "SEARCH" ? {
|
|
|
107
116
|
] })
|
|
108
117
|
}
|
|
109
118
|
);
|
|
110
|
-
},
|
|
119
|
+
}, k = d.forwardRef(H);
|
|
111
120
|
export {
|
|
112
|
-
|
|
121
|
+
k as default
|
|
113
122
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
2
2
|
import f, { Fragment as h } from "react";
|
|
3
|
-
import { _ as
|
|
3
|
+
import { _ as x } from "../../lodash-XYp3qmxI.js";
|
|
4
4
|
import { t as v } from "../../bundle-mjs-SHnj3fHy.js";
|
|
5
|
-
import { H as
|
|
6
|
-
import { b } from "../../index-wvw0O1v3.js";
|
|
7
|
-
import { a as
|
|
5
|
+
import { H as C, X as b } from "../../index-vZEwQcSd.js";
|
|
6
|
+
import { b as w } from "../../index-wvw0O1v3.js";
|
|
7
|
+
import { a as N } from "../../index-C197ia6B.js";
|
|
8
8
|
import { getValue as o } from "../Selectbox/helper.js";
|
|
9
|
-
import { N, G as
|
|
10
|
-
const
|
|
9
|
+
import { N as S, G as L, H as T, z as q, K as A } from "../../combobox-BFmS_epO.js";
|
|
10
|
+
const R = (l, t) => {
|
|
11
11
|
if (t.type === "SEARCH")
|
|
12
12
|
return {
|
|
13
13
|
...l,
|
|
@@ -40,9 +40,17 @@ const A = (l, t) => {
|
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
return l;
|
|
43
|
-
},
|
|
43
|
+
}, H = ({
|
|
44
|
+
id: l,
|
|
45
|
+
name: t,
|
|
46
|
+
value: a = [],
|
|
47
|
+
options: n,
|
|
48
|
+
valueField: u = "value",
|
|
49
|
+
onChange: p,
|
|
50
|
+
placeholder: E
|
|
51
|
+
}, g) => {
|
|
44
52
|
var y;
|
|
45
|
-
const [s, c] = f.useReducer(
|
|
53
|
+
const [s, c] = f.useReducer(R, {
|
|
46
54
|
query: "",
|
|
47
55
|
list: n,
|
|
48
56
|
filterList: n,
|
|
@@ -50,10 +58,10 @@ const A = (l, t) => {
|
|
|
50
58
|
valueField: u,
|
|
51
59
|
selected: n.filter((e) => {
|
|
52
60
|
const i = o(e, u);
|
|
53
|
-
return
|
|
61
|
+
return x.some(a, (d) => d + "" == i + "");
|
|
54
62
|
}) || []
|
|
55
63
|
});
|
|
56
|
-
return f.useImperativeHandle(
|
|
64
|
+
return f.useImperativeHandle(g, () => ({
|
|
57
65
|
search: (e) => {
|
|
58
66
|
c({ type: "SEARCH", query: e });
|
|
59
67
|
},
|
|
@@ -61,7 +69,7 @@ const A = (l, t) => {
|
|
|
61
69
|
c({ type: "SETVALUE", value: e });
|
|
62
70
|
}
|
|
63
71
|
})), /* @__PURE__ */ r(
|
|
64
|
-
|
|
72
|
+
S,
|
|
65
73
|
{
|
|
66
74
|
value: s.selected,
|
|
67
75
|
onChange: (e) => {
|
|
@@ -80,13 +88,14 @@ const A = (l, t) => {
|
|
|
80
88
|
"button",
|
|
81
89
|
{
|
|
82
90
|
onClick: () => c({ type: "REMOVESELECT", selected: e }),
|
|
83
|
-
children: /* @__PURE__ */ r(
|
|
91
|
+
children: /* @__PURE__ */ r(N, { fontSize: 12, className: "font-bold" })
|
|
84
92
|
}
|
|
85
93
|
)
|
|
86
94
|
] }) }, i)) }),
|
|
87
95
|
/* @__PURE__ */ r(
|
|
88
|
-
|
|
96
|
+
L,
|
|
89
97
|
{
|
|
98
|
+
placeholder: E,
|
|
90
99
|
value: s.query,
|
|
91
100
|
onChange: (e) => c({ type: "SEARCH", query: e.target.value }),
|
|
92
101
|
onKeyDown: (e) => {
|
|
@@ -98,8 +107,8 @@ const A = (l, t) => {
|
|
|
98
107
|
autoComplete: "off"
|
|
99
108
|
}
|
|
100
109
|
),
|
|
101
|
-
/* @__PURE__ */ r(
|
|
102
|
-
|
|
110
|
+
/* @__PURE__ */ r(T, { className: "absolute inset-y-0 right-0 flex items-center pr-2", children: /* @__PURE__ */ r(
|
|
111
|
+
C,
|
|
103
112
|
{
|
|
104
113
|
className: "h-5 w-5 text-gray-400",
|
|
105
114
|
"aria-hidden": "true"
|
|
@@ -117,7 +126,7 @@ const A = (l, t) => {
|
|
|
117
126
|
}
|
|
118
127
|
),
|
|
119
128
|
/* @__PURE__ */ r(
|
|
120
|
-
|
|
129
|
+
b,
|
|
121
130
|
{
|
|
122
131
|
as: h,
|
|
123
132
|
enter: "transition duration-100 ease-out",
|
|
@@ -127,7 +136,7 @@ const A = (l, t) => {
|
|
|
127
136
|
leaveFrom: "scale-100 transform opacity-100",
|
|
128
137
|
leaveTo: "scale-95 transform opacity-0",
|
|
129
138
|
afterLeave: () => c({ type: "SEARCH", query: "" }),
|
|
130
|
-
children: /* @__PURE__ */ r(
|
|
139
|
+
children: /* @__PURE__ */ r(q, { className: "absolute mt-10 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black/5 focus:outline-none sm:text-sm", children: s.filterList.map((e) => /* @__PURE__ */ r(A, { as: h, value: e, children: ({ selected: i }) => /* @__PURE__ */ m(
|
|
131
140
|
"li",
|
|
132
141
|
{
|
|
133
142
|
className: v(
|
|
@@ -143,7 +152,7 @@ const A = (l, t) => {
|
|
|
143
152
|
className: v(
|
|
144
153
|
"absolute inset-y-0 left-0 flex items-center pl-3 text-indigo-600"
|
|
145
154
|
),
|
|
146
|
-
children: /* @__PURE__ */ r(
|
|
155
|
+
children: /* @__PURE__ */ r(w, { className: "h-5 w-5", "aria-hidden": "true" })
|
|
147
156
|
}
|
|
148
157
|
) : null
|
|
149
158
|
]
|
|
@@ -154,7 +163,7 @@ const A = (l, t) => {
|
|
|
154
163
|
] })
|
|
155
164
|
}
|
|
156
165
|
);
|
|
157
|
-
},
|
|
166
|
+
}, _ = f.forwardRef(H);
|
|
158
167
|
export {
|
|
159
|
-
|
|
168
|
+
_ as default
|
|
160
169
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type DatePickerProps = {
|
|
4
|
+
name: string;
|
|
5
|
+
value: number;
|
|
6
|
+
onChange: (value: number) => void;
|
|
7
|
+
showTime?: boolean;
|
|
8
|
+
readOnly?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const DatePicker: React.FC<DatePickerProps>;
|
|
11
|
+
export default DatePicker;
|