@deepnoid/ui 0.1.200 → 0.1.202
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/.turbo/turbo-build.log +185 -185
- package/dist/{chunk-YBXBTE5T.mjs → chunk-COGGK5Q6.mjs} +1 -1
- package/dist/{chunk-VXO7B27Q.mjs → chunk-F6BQCZ54.mjs} +12 -6
- package/dist/{chunk-75ZDPLJ4.mjs → chunk-K2RW5KLO.mjs} +20 -0
- package/dist/components/list/index.mjs +3 -3
- package/dist/components/picker/index.js +17 -0
- package/dist/components/picker/index.mjs +5 -5
- package/dist/components/picker/timePicker.js +508 -60
- package/dist/components/picker/timePicker.mjs +10 -2
- package/dist/components/select/index.js +476 -28
- package/dist/components/select/index.mjs +9 -1
- package/dist/components/select/select.d.mts +1 -0
- package/dist/components/select/select.d.ts +1 -0
- package/dist/components/select/select.js +476 -28
- package/dist/components/select/select.mjs +9 -1
- package/dist/components/table/index.mjs +1 -1
- package/dist/components/table/table-body.mjs +1 -1
- package/dist/components/table/table-head.mjs +1 -1
- package/dist/components/table/table.mjs +1 -1
- package/dist/components/tree/index.js +11 -5
- package/dist/components/tree/index.mjs +1 -1
- package/dist/components/tree/tree.js +11 -5
- package/dist/components/tree/tree.mjs +1 -1
- package/dist/index.js +28 -5
- package/dist/index.mjs +48 -48
- package/package.json +1 -1
|
@@ -5184,13 +5184,17 @@ var TreeNodeItemBase = (0, import_react.forwardRef)(
|
|
|
5184
5184
|
const slots = (0, import_react.useMemo)(() => treeStyle(), []);
|
|
5185
5185
|
const hasSelectedInChildren = (0, import_react.useCallback)(
|
|
5186
5186
|
(children2) => {
|
|
5187
|
-
if (!children2) return false;
|
|
5187
|
+
if (!children2 || !selectedName) return false;
|
|
5188
5188
|
return children2.some((child) => child.selectedName === selectedName || hasSelectedInChildren(child.children));
|
|
5189
5189
|
},
|
|
5190
5190
|
[selectedName]
|
|
5191
5191
|
);
|
|
5192
5192
|
const [children, setChildren] = (0, import_react.useState)(node.children);
|
|
5193
|
-
const [isOpen, setIsOpen] = (0, import_react.useState)(() =>
|
|
5193
|
+
const [isOpen, setIsOpen] = (0, import_react.useState)(() => {
|
|
5194
|
+
if (!selectedName) return false;
|
|
5195
|
+
return hasSelectedInChildren(node.children);
|
|
5196
|
+
});
|
|
5197
|
+
const hasOpenedInitially = (0, import_react.useRef)(false);
|
|
5194
5198
|
const hasMore = (0, import_react.useMemo)(() => {
|
|
5195
5199
|
if (node.isLeaf) return false;
|
|
5196
5200
|
if (Array.isArray(children)) return children.length > 0;
|
|
@@ -5218,11 +5222,13 @@ var TreeNodeItemBase = (0, import_react.forwardRef)(
|
|
|
5218
5222
|
(_a = node.onRightClick) == null ? void 0 : _a.call(node, e);
|
|
5219
5223
|
};
|
|
5220
5224
|
(0, import_react.useEffect)(() => {
|
|
5221
|
-
|
|
5222
|
-
if (
|
|
5225
|
+
if (!selectedName) return;
|
|
5226
|
+
if (!hasOpenedInitially.current) {
|
|
5227
|
+
const shouldOpen = hasSelectedInChildren(children);
|
|
5223
5228
|
setIsOpen(shouldOpen);
|
|
5229
|
+
hasOpenedInitially.current = true;
|
|
5224
5230
|
}
|
|
5225
|
-
}, [selectedName, children, hasSelectedInChildren
|
|
5231
|
+
}, [selectedName, children, hasSelectedInChildren]);
|
|
5226
5232
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
5227
5233
|
"div",
|
|
5228
5234
|
{
|
|
@@ -5184,13 +5184,17 @@ var TreeNodeItemBase = (0, import_react.forwardRef)(
|
|
|
5184
5184
|
const slots = (0, import_react.useMemo)(() => treeStyle(), []);
|
|
5185
5185
|
const hasSelectedInChildren = (0, import_react.useCallback)(
|
|
5186
5186
|
(children2) => {
|
|
5187
|
-
if (!children2) return false;
|
|
5187
|
+
if (!children2 || !selectedName) return false;
|
|
5188
5188
|
return children2.some((child) => child.selectedName === selectedName || hasSelectedInChildren(child.children));
|
|
5189
5189
|
},
|
|
5190
5190
|
[selectedName]
|
|
5191
5191
|
);
|
|
5192
5192
|
const [children, setChildren] = (0, import_react.useState)(node.children);
|
|
5193
|
-
const [isOpen, setIsOpen] = (0, import_react.useState)(() =>
|
|
5193
|
+
const [isOpen, setIsOpen] = (0, import_react.useState)(() => {
|
|
5194
|
+
if (!selectedName) return false;
|
|
5195
|
+
return hasSelectedInChildren(node.children);
|
|
5196
|
+
});
|
|
5197
|
+
const hasOpenedInitially = (0, import_react.useRef)(false);
|
|
5194
5198
|
const hasMore = (0, import_react.useMemo)(() => {
|
|
5195
5199
|
if (node.isLeaf) return false;
|
|
5196
5200
|
if (Array.isArray(children)) return children.length > 0;
|
|
@@ -5218,11 +5222,13 @@ var TreeNodeItemBase = (0, import_react.forwardRef)(
|
|
|
5218
5222
|
(_a = node.onRightClick) == null ? void 0 : _a.call(node, e);
|
|
5219
5223
|
};
|
|
5220
5224
|
(0, import_react.useEffect)(() => {
|
|
5221
|
-
|
|
5222
|
-
if (
|
|
5225
|
+
if (!selectedName) return;
|
|
5226
|
+
if (!hasOpenedInitially.current) {
|
|
5227
|
+
const shouldOpen = hasSelectedInChildren(children);
|
|
5223
5228
|
setIsOpen(shouldOpen);
|
|
5229
|
+
hasOpenedInitially.current = true;
|
|
5224
5230
|
}
|
|
5225
|
-
}, [selectedName, children, hasSelectedInChildren
|
|
5231
|
+
}, [selectedName, children, hasSelectedInChildren]);
|
|
5226
5232
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
5227
5233
|
"div",
|
|
5228
5234
|
{
|
package/dist/index.js
CHANGED
|
@@ -9375,6 +9375,7 @@ var Select = (0, import_react21.forwardRef)((originalProps, ref) => {
|
|
|
9375
9375
|
dropdownIconName = "brace-up",
|
|
9376
9376
|
optionIconName,
|
|
9377
9377
|
optionIconPlacement,
|
|
9378
|
+
clearable,
|
|
9378
9379
|
...inputProps
|
|
9379
9380
|
} = props;
|
|
9380
9381
|
const slots = (0, import_react21.useMemo)(() => select({ ...variantProps }), [variantProps]);
|
|
@@ -9428,6 +9429,11 @@ var Select = (0, import_react21.forwardRef)((originalProps, ref) => {
|
|
|
9428
9429
|
setSelectedOptions(nextOptions);
|
|
9429
9430
|
onChange == null ? void 0 : onChange(nextOptions);
|
|
9430
9431
|
};
|
|
9432
|
+
const handleClear = (e) => {
|
|
9433
|
+
e.stopPropagation();
|
|
9434
|
+
setSelectedOptions([]);
|
|
9435
|
+
onChange == null ? void 0 : onChange([]);
|
|
9436
|
+
};
|
|
9431
9437
|
(0, import_react21.useEffect)(() => {
|
|
9432
9438
|
const handleClickOutside = (e) => {
|
|
9433
9439
|
var _a2;
|
|
@@ -9554,6 +9560,17 @@ var Select = (0, import_react21.forwardRef)((originalProps, ref) => {
|
|
|
9554
9560
|
}
|
|
9555
9561
|
),
|
|
9556
9562
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("input", { type: "hidden", name: inputProps.name, value: selectedValue }),
|
|
9563
|
+
clearable && selectedOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
9564
|
+
icon_button_default,
|
|
9565
|
+
{
|
|
9566
|
+
name: "close",
|
|
9567
|
+
variant: "ghost",
|
|
9568
|
+
size: "sm",
|
|
9569
|
+
color: "neutral",
|
|
9570
|
+
onClick: handleClear,
|
|
9571
|
+
classNames: { base: "pr-[2px]" }
|
|
9572
|
+
}
|
|
9573
|
+
),
|
|
9557
9574
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
9558
9575
|
Icon_default,
|
|
9559
9576
|
{
|
|
@@ -12222,13 +12239,17 @@ var TreeNodeItemBase = (0, import_react36.forwardRef)(
|
|
|
12222
12239
|
const slots = (0, import_react36.useMemo)(() => treeStyle(), []);
|
|
12223
12240
|
const hasSelectedInChildren = (0, import_react36.useCallback)(
|
|
12224
12241
|
(children2) => {
|
|
12225
|
-
if (!children2) return false;
|
|
12242
|
+
if (!children2 || !selectedName) return false;
|
|
12226
12243
|
return children2.some((child) => child.selectedName === selectedName || hasSelectedInChildren(child.children));
|
|
12227
12244
|
},
|
|
12228
12245
|
[selectedName]
|
|
12229
12246
|
);
|
|
12230
12247
|
const [children, setChildren] = (0, import_react36.useState)(node.children);
|
|
12231
|
-
const [isOpen, setIsOpen] = (0, import_react36.useState)(() =>
|
|
12248
|
+
const [isOpen, setIsOpen] = (0, import_react36.useState)(() => {
|
|
12249
|
+
if (!selectedName) return false;
|
|
12250
|
+
return hasSelectedInChildren(node.children);
|
|
12251
|
+
});
|
|
12252
|
+
const hasOpenedInitially = (0, import_react36.useRef)(false);
|
|
12232
12253
|
const hasMore = (0, import_react36.useMemo)(() => {
|
|
12233
12254
|
if (node.isLeaf) return false;
|
|
12234
12255
|
if (Array.isArray(children)) return children.length > 0;
|
|
@@ -12256,11 +12277,13 @@ var TreeNodeItemBase = (0, import_react36.forwardRef)(
|
|
|
12256
12277
|
(_a = node.onRightClick) == null ? void 0 : _a.call(node, e);
|
|
12257
12278
|
};
|
|
12258
12279
|
(0, import_react36.useEffect)(() => {
|
|
12259
|
-
|
|
12260
|
-
if (
|
|
12280
|
+
if (!selectedName) return;
|
|
12281
|
+
if (!hasOpenedInitially.current) {
|
|
12282
|
+
const shouldOpen = hasSelectedInChildren(children);
|
|
12261
12283
|
setIsOpen(shouldOpen);
|
|
12284
|
+
hasOpenedInitially.current = true;
|
|
12262
12285
|
}
|
|
12263
|
-
}, [selectedName, children, hasSelectedInChildren
|
|
12286
|
+
}, [selectedName, children, hasSelectedInChildren]);
|
|
12264
12287
|
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
12265
12288
|
"div",
|
|
12266
12289
|
{
|
package/dist/index.mjs
CHANGED
|
@@ -5,18 +5,14 @@ import {
|
|
|
5
5
|
} from "./chunk-5KC3IFNR.mjs";
|
|
6
6
|
import "./chunk-ZMOAFSYE.mjs";
|
|
7
7
|
import "./chunk-WSIADHVC.mjs";
|
|
8
|
-
import "./chunk-RRAZM5D3.mjs";
|
|
9
|
-
import {
|
|
10
|
-
textarea_default
|
|
11
|
-
} from "./chunk-Q22PRT24.mjs";
|
|
12
8
|
import "./chunk-MBLZYQCN.mjs";
|
|
13
9
|
import {
|
|
14
10
|
tree_default
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-F6BQCZ54.mjs";
|
|
12
|
+
import "./chunk-DX3KXNP6.mjs";
|
|
17
13
|
import {
|
|
18
|
-
|
|
19
|
-
} from "./chunk-
|
|
14
|
+
table_default
|
|
15
|
+
} from "./chunk-KYWCJIXI.mjs";
|
|
20
16
|
import "./chunk-LUWGOKLG.mjs";
|
|
21
17
|
import {
|
|
22
18
|
ToastProvider,
|
|
@@ -26,35 +22,37 @@ import "./chunk-ZOTHPHXA.mjs";
|
|
|
26
22
|
import {
|
|
27
23
|
toast_default
|
|
28
24
|
} from "./chunk-4F7SIDZB.mjs";
|
|
29
|
-
import "./chunk-DX3KXNP6.mjs";
|
|
30
|
-
import {
|
|
31
|
-
table_default
|
|
32
|
-
} from "./chunk-KYWCJIXI.mjs";
|
|
33
|
-
import "./chunk-OLQOLLKG.mjs";
|
|
34
|
-
import {
|
|
35
|
-
starRating_default
|
|
36
|
-
} from "./chunk-OX4T7OBC.mjs";
|
|
37
25
|
import "./chunk-LVFI2NOH.mjs";
|
|
38
26
|
import {
|
|
39
27
|
switch_default
|
|
40
28
|
} from "./chunk-AGE57VDD.mjs";
|
|
41
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-3MY6LO7N.mjs";
|
|
42
30
|
import {
|
|
43
|
-
|
|
44
|
-
} from "./chunk-
|
|
31
|
+
tabs_default
|
|
32
|
+
} from "./chunk-DW3BX4M2.mjs";
|
|
33
|
+
import "./chunk-RRAZM5D3.mjs";
|
|
34
|
+
import {
|
|
35
|
+
textarea_default
|
|
36
|
+
} from "./chunk-Q22PRT24.mjs";
|
|
45
37
|
import {
|
|
46
38
|
definition_table_default
|
|
47
39
|
} from "./chunk-DS5CGU2X.mjs";
|
|
48
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-MZ76AA76.mjs";
|
|
49
41
|
import {
|
|
50
|
-
|
|
51
|
-
} from "./chunk-
|
|
52
|
-
import "./chunk-
|
|
42
|
+
skeleton_default
|
|
43
|
+
} from "./chunk-6PN3DGOE.mjs";
|
|
44
|
+
import "./chunk-OLQOLLKG.mjs";
|
|
53
45
|
import {
|
|
54
|
-
|
|
55
|
-
} from "./chunk-
|
|
56
|
-
import "./chunk-F3HENRVM.mjs";
|
|
46
|
+
starRating_default
|
|
47
|
+
} from "./chunk-OX4T7OBC.mjs";
|
|
57
48
|
import "./chunk-4VWG4726.mjs";
|
|
49
|
+
import {
|
|
50
|
+
timePicker_default
|
|
51
|
+
} from "./chunk-COGGK5Q6.mjs";
|
|
52
|
+
import "./chunk-QCEKPS7U.mjs";
|
|
53
|
+
import {
|
|
54
|
+
select_default
|
|
55
|
+
} from "./chunk-K2RW5KLO.mjs";
|
|
58
56
|
import {
|
|
59
57
|
datePicker_default
|
|
60
58
|
} from "./chunk-2EUKWA4W.mjs";
|
|
@@ -62,24 +60,38 @@ import "./chunk-FWFEKWWD.mjs";
|
|
|
62
60
|
import {
|
|
63
61
|
day_default
|
|
64
62
|
} from "./chunk-XZYQFBCT.mjs";
|
|
63
|
+
import "./chunk-7B7LRG5J.mjs";
|
|
65
64
|
import {
|
|
66
|
-
|
|
67
|
-
} from "./chunk-
|
|
68
|
-
import "./chunk-
|
|
65
|
+
pagination_default
|
|
66
|
+
} from "./chunk-VVCSY7DG.mjs";
|
|
67
|
+
import "./chunk-F3HENRVM.mjs";
|
|
68
|
+
import "./chunk-TPFN22HR.mjs";
|
|
69
69
|
import {
|
|
70
|
-
|
|
71
|
-
} from "./chunk-
|
|
72
|
-
import "./chunk-
|
|
70
|
+
radio_default
|
|
71
|
+
} from "./chunk-PRNE3U26.mjs";
|
|
72
|
+
import "./chunk-RLXOHILK.mjs";
|
|
73
73
|
import {
|
|
74
|
-
|
|
75
|
-
} from "./chunk-
|
|
74
|
+
fileUpload_default
|
|
75
|
+
} from "./chunk-5JRZQLXQ.mjs";
|
|
76
|
+
import "./chunk-7VOQKIIK.mjs";
|
|
76
77
|
import {
|
|
77
|
-
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
progress_default
|
|
79
|
+
} from "./chunk-KH63CD55.mjs";
|
|
80
|
+
import "./chunk-2GCSFWHD.mjs";
|
|
81
|
+
import {
|
|
82
|
+
input_default
|
|
83
|
+
} from "./chunk-3RTVVQA3.mjs";
|
|
79
84
|
import "./chunk-DJOG6Z35.mjs";
|
|
80
85
|
import {
|
|
81
86
|
modal_default
|
|
82
87
|
} from "./chunk-D72ILS4A.mjs";
|
|
88
|
+
import "./chunk-7MVEAQ7Z.mjs";
|
|
89
|
+
import {
|
|
90
|
+
listItem_default
|
|
91
|
+
} from "./chunk-K3M3QEEV.mjs";
|
|
92
|
+
import {
|
|
93
|
+
list_default
|
|
94
|
+
} from "./chunk-NGRGAY42.mjs";
|
|
83
95
|
import "./chunk-QZ3LVYJW.mjs";
|
|
84
96
|
import "./chunk-MGEWSREV.mjs";
|
|
85
97
|
import {
|
|
@@ -89,18 +101,6 @@ import "./chunk-32GA3YW4.mjs";
|
|
|
89
101
|
import {
|
|
90
102
|
drawer_default
|
|
91
103
|
} from "./chunk-45Y7ANPK.mjs";
|
|
92
|
-
import "./chunk-RLXOHILK.mjs";
|
|
93
|
-
import {
|
|
94
|
-
fileUpload_default
|
|
95
|
-
} from "./chunk-5JRZQLXQ.mjs";
|
|
96
|
-
import "./chunk-7VOQKIIK.mjs";
|
|
97
|
-
import {
|
|
98
|
-
progress_default
|
|
99
|
-
} from "./chunk-KH63CD55.mjs";
|
|
100
|
-
import "./chunk-2GCSFWHD.mjs";
|
|
101
|
-
import {
|
|
102
|
-
input_default
|
|
103
|
-
} from "./chunk-3RTVVQA3.mjs";
|
|
104
104
|
import "./chunk-3OCNT22V.mjs";
|
|
105
105
|
import {
|
|
106
106
|
areaChart_default
|